@m4l/components 9.3.10-BE250825-beta.1 → 9.3.10-BE250825-beta.2

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,1942 +1,2305 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { createTheme, ThemeProvider, Paper, Box, SvgIcon, NoSsr, InputBase } from "@mui/material";
3
- import { useMemo, createContext, useState, useEffect, useContext, useRef, useCallback, memo } from "react";
4
- import { create, createStore, useStore } from "zustand";
5
- import { g as getDefaultExportFromCjs } from "../commonjs/index.js";
6
- var toggleSelection;
7
- var hasRequiredToggleSelection;
8
- function requireToggleSelection() {
9
- if (hasRequiredToggleSelection) return toggleSelection;
10
- hasRequiredToggleSelection = 1;
11
- toggleSelection = function() {
12
- var selection = document.getSelection();
13
- if (!selection.rangeCount) {
14
- return function() {
15
- };
16
- }
17
- var active = document.activeElement;
18
- var ranges = [];
19
- for (var i = 0; i < selection.rangeCount; i++) {
20
- ranges.push(selection.getRangeAt(i));
21
- }
22
- switch (active.tagName.toUpperCase()) {
23
- // .toUpperCase handles XHTML
24
- case "INPUT":
25
- case "TEXTAREA":
26
- active.blur();
27
- break;
28
- default:
29
- active = null;
30
- break;
31
- }
32
- selection.removeAllRanges();
33
- return function() {
34
- selection.type === "Caret" && selection.removeAllRanges();
35
- if (!selection.rangeCount) {
36
- ranges.forEach(function(range) {
37
- selection.addRange(range);
38
- });
39
- }
40
- active && active.focus();
41
- };
42
- };
43
- return toggleSelection;
44
- }
45
- var copyToClipboard$1;
46
- var hasRequiredCopyToClipboard;
47
- function requireCopyToClipboard() {
48
- if (hasRequiredCopyToClipboard) return copyToClipboard$1;
49
- hasRequiredCopyToClipboard = 1;
50
- var deselectCurrent = requireToggleSelection();
51
- var clipboardToIE11Formatting = {
52
- "text/plain": "Text",
53
- "text/html": "Url",
54
- "default": "Text"
55
- };
56
- var defaultMessage = "Copy to clipboard: #{key}, Enter";
57
- function format(message) {
58
- var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
59
- return message.replace(/#{\s*key\s*}/g, copyKey);
60
- }
61
- function copy(text, options) {
62
- var debug, message, reselectPrevious, range, selection, mark, success = false;
63
- if (!options) {
64
- options = {};
65
- }
66
- debug = options.debug || false;
67
- try {
68
- reselectPrevious = deselectCurrent();
69
- range = document.createRange();
70
- selection = document.getSelection();
71
- mark = document.createElement("span");
72
- mark.textContent = text;
73
- mark.ariaHidden = "true";
74
- mark.style.all = "unset";
75
- mark.style.position = "fixed";
76
- mark.style.top = 0;
77
- mark.style.clip = "rect(0, 0, 0, 0)";
78
- mark.style.whiteSpace = "pre";
79
- mark.style.webkitUserSelect = "text";
80
- mark.style.MozUserSelect = "text";
81
- mark.style.msUserSelect = "text";
82
- mark.style.userSelect = "text";
83
- mark.addEventListener("copy", function(e) {
84
- e.stopPropagation();
85
- if (options.format) {
86
- e.preventDefault();
87
- if (typeof e.clipboardData === "undefined") {
88
- debug && console.warn("unable to use e.clipboardData");
89
- debug && console.warn("trying IE specific stuff");
90
- window.clipboardData.clearData();
91
- var format2 = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"];
92
- window.clipboardData.setData(format2, text);
93
- } else {
94
- e.clipboardData.clearData();
95
- e.clipboardData.setData(options.format, text);
1
+ import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "../commonjs/index.js";
2
+ import React from "react";
3
+ var main$1 = { exports: {} };
4
+ var main = main$1.exports;
5
+ var hasRequiredMain;
6
+ function requireMain() {
7
+ if (hasRequiredMain) return main$1.exports;
8
+ hasRequiredMain = 1;
9
+ (function(module, exports) {
10
+ !function(e, t) {
11
+ module.exports = t(React);
12
+ }(main, (e) => (() => {
13
+ var t = { 9735: (e2, t2) => {
14
+ t2.__esModule = true, t2.default = { scheme: "apathy", author: "jannik siebert (https://github.com/janniks)", base00: "#031A16", base01: "#0B342D", base02: "#184E45", base03: "#2B685E", base04: "#5F9C92", base05: "#81B5AC", base06: "#A7CEC8", base07: "#D2E7E4", base08: "#3E9688", base09: "#3E7996", base0A: "#3E4C96", base0B: "#883E96", base0C: "#963E4C", base0D: "#96883E", base0E: "#4C963E", base0F: "#3E965B" }, e2.exports = t2.default;
15
+ }, 294: (e2, t2) => {
16
+ t2.__esModule = true, t2.default = { scheme: "ashes", author: "jannik siebert (https://github.com/janniks)", base00: "#1C2023", base01: "#393F45", base02: "#565E65", base03: "#747C84", base04: "#ADB3BA", base05: "#C7CCD1", base06: "#DFE2E5", base07: "#F3F4F5", base08: "#C7AE95", base09: "#C7C795", base0A: "#AEC795", base0B: "#95C7AE", base0C: "#95AEC7", base0D: "#AE95C7", base0E: "#C795AE", base0F: "#C79595" }, e2.exports = t2.default;
17
+ }, 1733: (e2, t2) => {
18
+ t2.__esModule = true, t2.default = { scheme: "atelier dune", author: "bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)", base00: "#20201d", base01: "#292824", base02: "#6e6b5e", base03: "#7d7a68", base04: "#999580", base05: "#a6a28c", base06: "#e8e4cf", base07: "#fefbec", base08: "#d73737", base09: "#b65611", base0A: "#cfb017", base0B: "#60ac39", base0C: "#1fad83", base0D: "#6684e1", base0E: "#b854d4", base0F: "#d43552" }, e2.exports = t2.default;
19
+ }, 8974: (e2, t2) => {
20
+ t2.__esModule = true, t2.default = { scheme: "atelier forest", author: "bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)", base00: "#1b1918", base01: "#2c2421", base02: "#68615e", base03: "#766e6b", base04: "#9c9491", base05: "#a8a19f", base06: "#e6e2e0", base07: "#f1efee", base08: "#f22c40", base09: "#df5320", base0A: "#d5911a", base0B: "#5ab738", base0C: "#00ad9c", base0D: "#407ee7", base0E: "#6666ea", base0F: "#c33ff3" }, e2.exports = t2.default;
21
+ }, 6933: (e2, t2) => {
22
+ t2.__esModule = true, t2.default = { scheme: "atelier heath", author: "bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)", base00: "#1b181b", base01: "#292329", base02: "#695d69", base03: "#776977", base04: "#9e8f9e", base05: "#ab9bab", base06: "#d8cad8", base07: "#f7f3f7", base08: "#ca402b", base09: "#a65926", base0A: "#bb8a35", base0B: "#379a37", base0C: "#159393", base0D: "#516aec", base0E: "#7b59c0", base0F: "#cc33cc" }, e2.exports = t2.default;
23
+ }, 523: (e2, t2) => {
24
+ t2.__esModule = true, t2.default = { scheme: "atelier lakeside", author: "bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)", base00: "#161b1d", base01: "#1f292e", base02: "#516d7b", base03: "#5a7b8c", base04: "#7195a8", base05: "#7ea2b4", base06: "#c1e4f6", base07: "#ebf8ff", base08: "#d22d72", base09: "#935c25", base0A: "#8a8a0f", base0B: "#568c3b", base0C: "#2d8f6f", base0D: "#257fad", base0E: "#5d5db1", base0F: "#b72dd2" }, e2.exports = t2.default;
25
+ }, 1223: (e2, t2) => {
26
+ t2.__esModule = true, t2.default = { scheme: "atelier seaside", author: "bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)", base00: "#131513", base01: "#242924", base02: "#5e6e5e", base03: "#687d68", base04: "#809980", base05: "#8ca68c", base06: "#cfe8cf", base07: "#f0fff0", base08: "#e6193c", base09: "#87711d", base0A: "#c3c322", base0B: "#29a329", base0C: "#1999b3", base0D: "#3d62f5", base0E: "#ad2bee", base0F: "#e619c3" }, e2.exports = t2.default;
27
+ }, 1233: (e2, t2) => {
28
+ t2.__esModule = true, t2.default = { scheme: "bespin", author: "jan t. sott", base00: "#28211c", base01: "#36312e", base02: "#5e5d5c", base03: "#666666", base04: "#797977", base05: "#8a8986", base06: "#9d9b97", base07: "#baae9e", base08: "#cf6a4c", base09: "#cf7d34", base0A: "#f9ee98", base0B: "#54be0d", base0C: "#afc4db", base0D: "#5ea6ea", base0E: "#9b859d", base0F: "#937121" }, e2.exports = t2.default;
29
+ }, 2847: (e2, t2) => {
30
+ t2.__esModule = true, t2.default = { scheme: "brewer", author: "timothée poisot (http://github.com/tpoisot)", base00: "#0c0d0e", base01: "#2e2f30", base02: "#515253", base03: "#737475", base04: "#959697", base05: "#b7b8b9", base06: "#dadbdc", base07: "#fcfdfe", base08: "#e31a1c", base09: "#e6550d", base0A: "#dca060", base0B: "#31a354", base0C: "#80b1d3", base0D: "#3182bd", base0E: "#756bb1", base0F: "#b15928" }, e2.exports = t2.default;
31
+ }, 8120: (e2, t2) => {
32
+ t2.__esModule = true, t2.default = { scheme: "bright", author: "chris kempson (http://chriskempson.com)", base00: "#000000", base01: "#303030", base02: "#505050", base03: "#b0b0b0", base04: "#d0d0d0", base05: "#e0e0e0", base06: "#f5f5f5", base07: "#ffffff", base08: "#fb0120", base09: "#fc6d24", base0A: "#fda331", base0B: "#a1c659", base0C: "#76c7b7", base0D: "#6fb3d2", base0E: "#d381c3", base0F: "#be643c" }, e2.exports = t2.default;
33
+ }, 6305: (e2, t2) => {
34
+ t2.__esModule = true, t2.default = { scheme: "chalk", author: "chris kempson (http://chriskempson.com)", base00: "#151515", base01: "#202020", base02: "#303030", base03: "#505050", base04: "#b0b0b0", base05: "#d0d0d0", base06: "#e0e0e0", base07: "#f5f5f5", base08: "#fb9fb1", base09: "#eda987", base0A: "#ddb26f", base0B: "#acc267", base0C: "#12cfc0", base0D: "#6fc2ef", base0E: "#e1a3ee", base0F: "#deaf8f" }, e2.exports = t2.default;
35
+ }, 525: (e2, t2) => {
36
+ t2.__esModule = true, t2.default = { scheme: "codeschool", author: "brettof86", base00: "#232c31", base01: "#1c3657", base02: "#2a343a", base03: "#3f4944", base04: "#84898c", base05: "#9ea7a6", base06: "#a7cfa3", base07: "#b5d8f6", base08: "#2a5491", base09: "#43820d", base0A: "#a03b1e", base0B: "#237986", base0C: "#b02f30", base0D: "#484d79", base0E: "#c59820", base0F: "#c98344" }, e2.exports = t2.default;
37
+ }, 4124: (e2, t2) => {
38
+ t2.__esModule = true, t2.default = { scheme: "colors", author: "mrmrs (http://clrs.cc)", base00: "#111111", base01: "#333333", base02: "#555555", base03: "#777777", base04: "#999999", base05: "#bbbbbb", base06: "#dddddd", base07: "#ffffff", base08: "#ff4136", base09: "#ff851b", base0A: "#ffdc00", base0B: "#2ecc40", base0C: "#7fdbff", base0D: "#0074d9", base0E: "#b10dc9", base0F: "#85144b" }, e2.exports = t2.default;
39
+ }, 7167: (e2, t2) => {
40
+ t2.__esModule = true, t2.default = { scheme: "default", author: "chris kempson (http://chriskempson.com)", base00: "#181818", base01: "#282828", base02: "#383838", base03: "#585858", base04: "#b8b8b8", base05: "#d8d8d8", base06: "#e8e8e8", base07: "#f8f8f8", base08: "#ab4642", base09: "#dc9656", base0A: "#f7ca88", base0B: "#a1b56c", base0C: "#86c1b9", base0D: "#7cafc2", base0E: "#ba8baf", base0F: "#a16946" }, e2.exports = t2.default;
41
+ }, 4582: (e2, t2) => {
42
+ t2.__esModule = true, t2.default = { scheme: "eighties", author: "chris kempson (http://chriskempson.com)", base00: "#2d2d2d", base01: "#393939", base02: "#515151", base03: "#747369", base04: "#a09f93", base05: "#d3d0c8", base06: "#e8e6df", base07: "#f2f0ec", base08: "#f2777a", base09: "#f99157", base0A: "#ffcc66", base0B: "#99cc99", base0C: "#66cccc", base0D: "#6699cc", base0E: "#cc99cc", base0F: "#d27b53" }, e2.exports = t2.default;
43
+ }, 7096: (e2, t2) => {
44
+ t2.__esModule = true, t2.default = { scheme: "embers", author: "jannik siebert (https://github.com/janniks)", base00: "#16130F", base01: "#2C2620", base02: "#433B32", base03: "#5A5047", base04: "#8A8075", base05: "#A39A90", base06: "#BEB6AE", base07: "#DBD6D1", base08: "#826D57", base09: "#828257", base0A: "#6D8257", base0B: "#57826D", base0C: "#576D82", base0D: "#6D5782", base0E: "#82576D", base0F: "#825757" }, e2.exports = t2.default;
45
+ }, 9887: (e2, t2) => {
46
+ t2.__esModule = true, t2.default = { scheme: "flat", author: "chris kempson (http://chriskempson.com)", base00: "#2C3E50", base01: "#34495E", base02: "#7F8C8D", base03: "#95A5A6", base04: "#BDC3C7", base05: "#e0e0e0", base06: "#f5f5f5", base07: "#ECF0F1", base08: "#E74C3C", base09: "#E67E22", base0A: "#F1C40F", base0B: "#2ECC71", base0C: "#1ABC9C", base0D: "#3498DB", base0E: "#9B59B6", base0F: "#be643c" }, e2.exports = t2.default;
47
+ }, 7199: (e2, t2) => {
48
+ t2.__esModule = true, t2.default = { scheme: "google", author: "seth wright (http://sethawright.com)", base00: "#1d1f21", base01: "#282a2e", base02: "#373b41", base03: "#969896", base04: "#b4b7b4", base05: "#c5c8c6", base06: "#e0e0e0", base07: "#ffffff", base08: "#CC342B", base09: "#F96A38", base0A: "#FBA922", base0B: "#198844", base0C: "#3971ED", base0D: "#3971ED", base0E: "#A36AC7", base0F: "#3971ED" }, e2.exports = t2.default;
49
+ }, 1985: (e2, t2) => {
50
+ t2.__esModule = true, t2.default = { scheme: "grayscale", author: "alexandre gavioli (https://github.com/alexx2/)", base00: "#101010", base01: "#252525", base02: "#464646", base03: "#525252", base04: "#ababab", base05: "#b9b9b9", base06: "#e3e3e3", base07: "#f7f7f7", base08: "#7c7c7c", base09: "#999999", base0A: "#a0a0a0", base0B: "#8e8e8e", base0C: "#868686", base0D: "#686868", base0E: "#747474", base0F: "#5e5e5e" }, e2.exports = t2.default;
51
+ }, 8093: (e2, t2) => {
52
+ t2.__esModule = true, t2.default = { scheme: "green screen", author: "chris kempson (http://chriskempson.com)", base00: "#001100", base01: "#003300", base02: "#005500", base03: "#007700", base04: "#009900", base05: "#00bb00", base06: "#00dd00", base07: "#00ff00", base08: "#007700", base09: "#009900", base0A: "#007700", base0B: "#00bb00", base0C: "#005500", base0D: "#009900", base0E: "#00bb00", base0F: "#005500" }, e2.exports = t2.default;
53
+ }, 1615: (e2, t2) => {
54
+ t2.__esModule = true, t2.default = { scheme: "harmonic16", author: "jannik siebert (https://github.com/janniks)", base00: "#0b1c2c", base01: "#223b54", base02: "#405c79", base03: "#627e99", base04: "#aabcce", base05: "#cbd6e2", base06: "#e5ebf1", base07: "#f7f9fb", base08: "#bf8b56", base09: "#bfbf56", base0A: "#8bbf56", base0B: "#56bf8b", base0C: "#568bbf", base0D: "#8b56bf", base0E: "#bf568b", base0F: "#bf5656" }, e2.exports = t2.default;
55
+ }, 9063: (e2, t2) => {
56
+ t2.__esModule = true, t2.default = { scheme: "hopscotch", author: "jan t. sott", base00: "#322931", base01: "#433b42", base02: "#5c545b", base03: "#797379", base04: "#989498", base05: "#b9b5b8", base06: "#d5d3d5", base07: "#ffffff", base08: "#dd464c", base09: "#fd8b19", base0A: "#fdcc59", base0B: "#8fc13e", base0C: "#149b93", base0D: "#1290bf", base0E: "#c85e7c", base0F: "#b33508" }, e2.exports = t2.default;
57
+ }, 9446: (e2, t2, a2) => {
58
+ function r2(e3) {
59
+ return e3 && e3.__esModule ? e3.default : e3;
60
+ }
61
+ t2.__esModule = true;
62
+ var n2 = a2(1308);
63
+ t2.threezerotwofour = r2(n2);
64
+ var o = a2(9735);
65
+ t2.apathy = r2(o);
66
+ var s = a2(294);
67
+ t2.ashes = r2(s);
68
+ var i = a2(1733);
69
+ t2.atelierDune = r2(i);
70
+ var l = a2(8974);
71
+ t2.atelierForest = r2(l);
72
+ var c = a2(6933);
73
+ t2.atelierHeath = r2(c);
74
+ var u = a2(523);
75
+ t2.atelierLakeside = r2(u);
76
+ var d = a2(1223);
77
+ t2.atelierSeaside = r2(d);
78
+ var b = a2(1233);
79
+ t2.bespin = r2(b);
80
+ var p = a2(2847);
81
+ t2.brewer = r2(p);
82
+ var f = a2(8120);
83
+ t2.bright = r2(f);
84
+ var h = a2(6305);
85
+ t2.chalk = r2(h);
86
+ var m = a2(525);
87
+ t2.codeschool = r2(m);
88
+ var v = a2(4124);
89
+ t2.colors = r2(v);
90
+ var g = a2(7167);
91
+ t2.default = r2(g);
92
+ var y = a2(4582);
93
+ t2.eighties = r2(y);
94
+ var k = a2(7096);
95
+ t2.embers = r2(k);
96
+ var E = a2(9887);
97
+ t2.flat = r2(E);
98
+ var j = a2(7199);
99
+ t2.google = r2(j);
100
+ var w = a2(1985);
101
+ t2.grayscale = r2(w);
102
+ var x = a2(8093);
103
+ t2.greenscreen = r2(x);
104
+ var C = a2(1615);
105
+ t2.harmonic = r2(C);
106
+ var O = a2(9063);
107
+ t2.hopscotch = r2(O);
108
+ var M = a2(9033);
109
+ t2.isotope = r2(M);
110
+ var S = a2(4112);
111
+ t2.marrakesh = r2(S);
112
+ var _ = a2(9600);
113
+ t2.mocha = r2(_);
114
+ var A = a2(1240);
115
+ t2.monokai = r2(A);
116
+ var F = a2(9768);
117
+ t2.ocean = r2(F);
118
+ var P = a2(8293);
119
+ t2.paraiso = r2(P);
120
+ var D = a2(3093);
121
+ t2.pop = r2(D);
122
+ var I = a2(1951);
123
+ t2.railscasts = r2(I);
124
+ var R = a2(6368);
125
+ t2.shapeshifter = r2(R);
126
+ var z = a2(2317);
127
+ t2.solarized = r2(z);
128
+ var B = a2(1091);
129
+ t2.summerfruit = r2(B);
130
+ var N = a2(6943);
131
+ t2.tomorrow = r2(N);
132
+ var L = a2(5670);
133
+ t2.tube = r2(L);
134
+ var q = a2(2536);
135
+ t2.twilight = r2(q);
136
+ }, 9033: (e2, t2) => {
137
+ t2.__esModule = true, t2.default = { scheme: "isotope", author: "jan t. sott", base00: "#000000", base01: "#404040", base02: "#606060", base03: "#808080", base04: "#c0c0c0", base05: "#d0d0d0", base06: "#e0e0e0", base07: "#ffffff", base08: "#ff0000", base09: "#ff9900", base0A: "#ff0099", base0B: "#33ff00", base0C: "#00ffff", base0D: "#0066ff", base0E: "#cc00ff", base0F: "#3300ff" }, e2.exports = t2.default;
138
+ }, 4112: (e2, t2) => {
139
+ t2.__esModule = true, t2.default = { scheme: "marrakesh", author: "alexandre gavioli (http://github.com/alexx2/)", base00: "#201602", base01: "#302e00", base02: "#5f5b17", base03: "#6c6823", base04: "#86813b", base05: "#948e48", base06: "#ccc37a", base07: "#faf0a5", base08: "#c35359", base09: "#b36144", base0A: "#a88339", base0B: "#18974e", base0C: "#75a738", base0D: "#477ca1", base0E: "#8868b3", base0F: "#b3588e" }, e2.exports = t2.default;
140
+ }, 9600: (e2, t2) => {
141
+ t2.__esModule = true, t2.default = { scheme: "mocha", author: "chris kempson (http://chriskempson.com)", base00: "#3B3228", base01: "#534636", base02: "#645240", base03: "#7e705a", base04: "#b8afad", base05: "#d0c8c6", base06: "#e9e1dd", base07: "#f5eeeb", base08: "#cb6077", base09: "#d28b71", base0A: "#f4bc87", base0B: "#beb55b", base0C: "#7bbda4", base0D: "#8ab3b5", base0E: "#a89bb9", base0F: "#bb9584" }, e2.exports = t2.default;
142
+ }, 1240: (e2, t2) => {
143
+ t2.__esModule = true, t2.default = { scheme: "monokai", author: "wimer hazenberg (http://www.monokai.nl)", base00: "#272822", base01: "#383830", base02: "#49483e", base03: "#75715e", base04: "#a59f85", base05: "#f8f8f2", base06: "#f5f4f1", base07: "#f9f8f5", base08: "#f92672", base09: "#fd971f", base0A: "#f4bf75", base0B: "#a6e22e", base0C: "#a1efe4", base0D: "#66d9ef", base0E: "#ae81ff", base0F: "#cc6633" }, e2.exports = t2.default;
144
+ }, 9768: (e2, t2) => {
145
+ t2.__esModule = true, t2.default = { scheme: "ocean", author: "chris kempson (http://chriskempson.com)", base00: "#2b303b", base01: "#343d46", base02: "#4f5b66", base03: "#65737e", base04: "#a7adba", base05: "#c0c5ce", base06: "#dfe1e8", base07: "#eff1f5", base08: "#bf616a", base09: "#d08770", base0A: "#ebcb8b", base0B: "#a3be8c", base0C: "#96b5b4", base0D: "#8fa1b3", base0E: "#b48ead", base0F: "#ab7967" }, e2.exports = t2.default;
146
+ }, 8293: (e2, t2) => {
147
+ t2.__esModule = true, t2.default = { scheme: "paraiso", author: "jan t. sott", base00: "#2f1e2e", base01: "#41323f", base02: "#4f424c", base03: "#776e71", base04: "#8d8687", base05: "#a39e9b", base06: "#b9b6b0", base07: "#e7e9db", base08: "#ef6155", base09: "#f99b15", base0A: "#fec418", base0B: "#48b685", base0C: "#5bc4bf", base0D: "#06b6ef", base0E: "#815ba4", base0F: "#e96ba8" }, e2.exports = t2.default;
148
+ }, 3093: (e2, t2) => {
149
+ t2.__esModule = true, t2.default = { scheme: "pop", author: "chris kempson (http://chriskempson.com)", base00: "#000000", base01: "#202020", base02: "#303030", base03: "#505050", base04: "#b0b0b0", base05: "#d0d0d0", base06: "#e0e0e0", base07: "#ffffff", base08: "#eb008a", base09: "#f29333", base0A: "#f8ca12", base0B: "#37b349", base0C: "#00aabb", base0D: "#0e5a94", base0E: "#b31e8d", base0F: "#7a2d00" }, e2.exports = t2.default;
150
+ }, 1951: (e2, t2) => {
151
+ t2.__esModule = true, t2.default = { scheme: "railscasts", author: "ryan bates (http://railscasts.com)", base00: "#2b2b2b", base01: "#272935", base02: "#3a4055", base03: "#5a647e", base04: "#d4cfc9", base05: "#e6e1dc", base06: "#f4f1ed", base07: "#f9f7f3", base08: "#da4939", base09: "#cc7833", base0A: "#ffc66d", base0B: "#a5c261", base0C: "#519f50", base0D: "#6d9cbe", base0E: "#b6b3eb", base0F: "#bc9458" }, e2.exports = t2.default;
152
+ }, 6368: (e2, t2) => {
153
+ t2.__esModule = true, t2.default = { scheme: "shapeshifter", author: "tyler benziger (http://tybenz.com)", base00: "#000000", base01: "#040404", base02: "#102015", base03: "#343434", base04: "#555555", base05: "#ababab", base06: "#e0e0e0", base07: "#f9f9f9", base08: "#e92f2f", base09: "#e09448", base0A: "#dddd13", base0B: "#0ed839", base0C: "#23edda", base0D: "#3b48e3", base0E: "#f996e2", base0F: "#69542d" }, e2.exports = t2.default;
154
+ }, 2317: (e2, t2) => {
155
+ t2.__esModule = true, t2.default = { scheme: "solarized", author: "ethan schoonover (http://ethanschoonover.com/solarized)", base00: "#002b36", base01: "#073642", base02: "#586e75", base03: "#657b83", base04: "#839496", base05: "#93a1a1", base06: "#eee8d5", base07: "#fdf6e3", base08: "#dc322f", base09: "#cb4b16", base0A: "#b58900", base0B: "#859900", base0C: "#2aa198", base0D: "#268bd2", base0E: "#6c71c4", base0F: "#d33682" }, e2.exports = t2.default;
156
+ }, 1091: (e2, t2) => {
157
+ t2.__esModule = true, t2.default = { scheme: "summerfruit", author: "christopher corley (http://cscorley.github.io/)", base00: "#151515", base01: "#202020", base02: "#303030", base03: "#505050", base04: "#B0B0B0", base05: "#D0D0D0", base06: "#E0E0E0", base07: "#FFFFFF", base08: "#FF0086", base09: "#FD8900", base0A: "#ABA800", base0B: "#00C918", base0C: "#1faaaa", base0D: "#3777E6", base0E: "#AD00A1", base0F: "#cc6633" }, e2.exports = t2.default;
158
+ }, 1308: (e2, t2) => {
159
+ t2.__esModule = true, t2.default = { scheme: "threezerotwofour", author: "jan t. sott (http://github.com/idleberg)", base00: "#090300", base01: "#3a3432", base02: "#4a4543", base03: "#5c5855", base04: "#807d7c", base05: "#a5a2a2", base06: "#d6d5d4", base07: "#f7f7f7", base08: "#db2d20", base09: "#e8bbd0", base0A: "#fded02", base0B: "#01a252", base0C: "#b5e4f4", base0D: "#01a0e4", base0E: "#a16a94", base0F: "#cdab53" }, e2.exports = t2.default;
160
+ }, 6943: (e2, t2) => {
161
+ t2.__esModule = true, t2.default = { scheme: "tomorrow", author: "chris kempson (http://chriskempson.com)", base00: "#1d1f21", base01: "#282a2e", base02: "#373b41", base03: "#969896", base04: "#b4b7b4", base05: "#c5c8c6", base06: "#e0e0e0", base07: "#ffffff", base08: "#cc6666", base09: "#de935f", base0A: "#f0c674", base0B: "#b5bd68", base0C: "#8abeb7", base0D: "#81a2be", base0E: "#b294bb", base0F: "#a3685a" }, e2.exports = t2.default;
162
+ }, 5670: (e2, t2) => {
163
+ t2.__esModule = true, t2.default = { scheme: "london tube", author: "jan t. sott", base00: "#231f20", base01: "#1c3f95", base02: "#5a5758", base03: "#737171", base04: "#959ca1", base05: "#d9d8d8", base06: "#e7e7e8", base07: "#ffffff", base08: "#ee2e24", base09: "#f386a1", base0A: "#ffd204", base0B: "#00853e", base0C: "#85cebc", base0D: "#009ddc", base0E: "#98005d", base0F: "#b06110" }, e2.exports = t2.default;
164
+ }, 2536: (e2, t2) => {
165
+ t2.__esModule = true, t2.default = { scheme: "twilight", author: "david hart (http://hart-dev.com)", base00: "#1e1e1e", base01: "#323537", base02: "#464b50", base03: "#5f5a60", base04: "#838184", base05: "#a7a7a7", base06: "#c3c3c3", base07: "#ffffff", base08: "#cf6a4c", base09: "#cda869", base0A: "#f9ee98", base0B: "#8f9d6a", base0C: "#afc4db", base0D: "#7587a6", base0E: "#9b859d", base0F: "#9b703f" }, e2.exports = t2.default;
166
+ }, 6481: (e2, t2, a2) => {
167
+ var r2 = a2(4176), n2 = {};
168
+ for (var o in r2) r2.hasOwnProperty(o) && (n2[r2[o]] = o);
169
+ var s = e2.exports = { rgb: { channels: 3, labels: "rgb" }, hsl: { channels: 3, labels: "hsl" }, hsv: { channels: 3, labels: "hsv" }, hwb: { channels: 3, labels: "hwb" }, cmyk: { channels: 4, labels: "cmyk" }, xyz: { channels: 3, labels: "xyz" }, lab: { channels: 3, labels: "lab" }, lch: { channels: 3, labels: "lch" }, hex: { channels: 1, labels: ["hex"] }, keyword: { channels: 1, labels: ["keyword"] }, ansi16: { channels: 1, labels: ["ansi16"] }, ansi256: { channels: 1, labels: ["ansi256"] }, hcg: { channels: 3, labels: ["h", "c", "g"] }, apple: { channels: 3, labels: ["r16", "g16", "b16"] }, gray: { channels: 1, labels: ["gray"] } };
170
+ for (var i in s) if (s.hasOwnProperty(i)) {
171
+ if (!("channels" in s[i])) throw new Error("missing channels property: " + i);
172
+ if (!("labels" in s[i])) throw new Error("missing channel labels property: " + i);
173
+ if (s[i].labels.length !== s[i].channels) throw new Error("channel and label counts mismatch: " + i);
174
+ var l = s[i].channels, c = s[i].labels;
175
+ delete s[i].channels, delete s[i].labels, Object.defineProperty(s[i], "channels", { value: l }), Object.defineProperty(s[i], "labels", { value: c });
176
+ }
177
+ s.rgb.hsl = function(e3) {
178
+ var t3, a3, r3 = e3[0] / 255, n3 = e3[1] / 255, o2 = e3[2] / 255, s2 = Math.min(r3, n3, o2), i2 = Math.max(r3, n3, o2), l2 = i2 - s2;
179
+ return i2 === s2 ? t3 = 0 : r3 === i2 ? t3 = (n3 - o2) / l2 : n3 === i2 ? t3 = 2 + (o2 - r3) / l2 : o2 === i2 && (t3 = 4 + (r3 - n3) / l2), (t3 = Math.min(60 * t3, 360)) < 0 && (t3 += 360), a3 = (s2 + i2) / 2, [t3, 100 * (i2 === s2 ? 0 : a3 <= 0.5 ? l2 / (i2 + s2) : l2 / (2 - i2 - s2)), 100 * a3];
180
+ }, s.rgb.hsv = function(e3) {
181
+ var t3, a3, r3, n3, o2, s2 = e3[0] / 255, i2 = e3[1] / 255, l2 = e3[2] / 255, c2 = Math.max(s2, i2, l2), u = c2 - Math.min(s2, i2, l2), d = function(e4) {
182
+ return (c2 - e4) / 6 / u + 0.5;
183
+ };
184
+ return 0 === u ? n3 = o2 = 0 : (o2 = u / c2, t3 = d(s2), a3 = d(i2), r3 = d(l2), s2 === c2 ? n3 = r3 - a3 : i2 === c2 ? n3 = 1 / 3 + t3 - r3 : l2 === c2 && (n3 = 2 / 3 + a3 - t3), n3 < 0 ? n3 += 1 : n3 > 1 && (n3 -= 1)), [360 * n3, 100 * o2, 100 * c2];
185
+ }, s.rgb.hwb = function(e3) {
186
+ var t3 = e3[0], a3 = e3[1], r3 = e3[2];
187
+ return [s.rgb.hsl(e3)[0], 100 * (1 / 255 * Math.min(t3, Math.min(a3, r3))), 100 * (r3 = 1 - 1 / 255 * Math.max(t3, Math.max(a3, r3)))];
188
+ }, s.rgb.cmyk = function(e3) {
189
+ var t3, a3 = e3[0] / 255, r3 = e3[1] / 255, n3 = e3[2] / 255;
190
+ return [100 * ((1 - a3 - (t3 = Math.min(1 - a3, 1 - r3, 1 - n3))) / (1 - t3) || 0), 100 * ((1 - r3 - t3) / (1 - t3) || 0), 100 * ((1 - n3 - t3) / (1 - t3) || 0), 100 * t3];
191
+ }, s.rgb.keyword = function(e3) {
192
+ var t3 = n2[e3];
193
+ if (t3) return t3;
194
+ var a3, o2, s2, i2 = 1 / 0;
195
+ for (var l2 in r2) if (r2.hasOwnProperty(l2)) {
196
+ var c2 = r2[l2], u = (o2 = e3, s2 = c2, Math.pow(o2[0] - s2[0], 2) + Math.pow(o2[1] - s2[1], 2) + Math.pow(o2[2] - s2[2], 2));
197
+ u < i2 && (i2 = u, a3 = l2);
198
+ }
199
+ return a3;
200
+ }, s.keyword.rgb = function(e3) {
201
+ return r2[e3];
202
+ }, s.rgb.xyz = function(e3) {
203
+ var t3 = e3[0] / 255, a3 = e3[1] / 255, r3 = e3[2] / 255;
204
+ return [100 * (0.4124 * (t3 = t3 > 0.04045 ? Math.pow((t3 + 0.055) / 1.055, 2.4) : t3 / 12.92) + 0.3576 * (a3 = a3 > 0.04045 ? Math.pow((a3 + 0.055) / 1.055, 2.4) : a3 / 12.92) + 0.1805 * (r3 = r3 > 0.04045 ? Math.pow((r3 + 0.055) / 1.055, 2.4) : r3 / 12.92)), 100 * (0.2126 * t3 + 0.7152 * a3 + 0.0722 * r3), 100 * (0.0193 * t3 + 0.1192 * a3 + 0.9505 * r3)];
205
+ }, s.rgb.lab = function(e3) {
206
+ var t3 = s.rgb.xyz(e3), a3 = t3[0], r3 = t3[1], n3 = t3[2];
207
+ return r3 /= 100, n3 /= 108.883, a3 = (a3 /= 95.047) > 8856e-6 ? Math.pow(a3, 1 / 3) : 7.787 * a3 + 16 / 116, [116 * (r3 = r3 > 8856e-6 ? Math.pow(r3, 1 / 3) : 7.787 * r3 + 16 / 116) - 16, 500 * (a3 - r3), 200 * (r3 - (n3 = n3 > 8856e-6 ? Math.pow(n3, 1 / 3) : 7.787 * n3 + 16 / 116))];
208
+ }, s.hsl.rgb = function(e3) {
209
+ var t3, a3, r3, n3, o2, s2 = e3[0] / 360, i2 = e3[1] / 100, l2 = e3[2] / 100;
210
+ if (0 === i2) return [o2 = 255 * l2, o2, o2];
211
+ t3 = 2 * l2 - (a3 = l2 < 0.5 ? l2 * (1 + i2) : l2 + i2 - l2 * i2), n3 = [0, 0, 0];
212
+ for (var c2 = 0; c2 < 3; c2++) (r3 = s2 + 1 / 3 * -(c2 - 1)) < 0 && r3++, r3 > 1 && r3--, o2 = 6 * r3 < 1 ? t3 + 6 * (a3 - t3) * r3 : 2 * r3 < 1 ? a3 : 3 * r3 < 2 ? t3 + (a3 - t3) * (2 / 3 - r3) * 6 : t3, n3[c2] = 255 * o2;
213
+ return n3;
214
+ }, s.hsl.hsv = function(e3) {
215
+ var t3 = e3[0], a3 = e3[1] / 100, r3 = e3[2] / 100, n3 = a3, o2 = Math.max(r3, 0.01);
216
+ return a3 *= (r3 *= 2) <= 1 ? r3 : 2 - r3, n3 *= o2 <= 1 ? o2 : 2 - o2, [t3, 100 * (0 === r3 ? 2 * n3 / (o2 + n3) : 2 * a3 / (r3 + a3)), 100 * ((r3 + a3) / 2)];
217
+ }, s.hsv.rgb = function(e3) {
218
+ var t3 = e3[0] / 60, a3 = e3[1] / 100, r3 = e3[2] / 100, n3 = Math.floor(t3) % 6, o2 = t3 - Math.floor(t3), s2 = 255 * r3 * (1 - a3), i2 = 255 * r3 * (1 - a3 * o2), l2 = 255 * r3 * (1 - a3 * (1 - o2));
219
+ switch (r3 *= 255, n3) {
220
+ case 0:
221
+ return [r3, l2, s2];
222
+ case 1:
223
+ return [i2, r3, s2];
224
+ case 2:
225
+ return [s2, r3, l2];
226
+ case 3:
227
+ return [s2, i2, r3];
228
+ case 4:
229
+ return [l2, s2, r3];
230
+ case 5:
231
+ return [r3, s2, i2];
96
232
  }
233
+ }, s.hsv.hsl = function(e3) {
234
+ var t3, a3, r3, n3 = e3[0], o2 = e3[1] / 100, s2 = e3[2] / 100, i2 = Math.max(s2, 0.01);
235
+ return r3 = (2 - o2) * s2, a3 = o2 * i2, [n3, 100 * (a3 = (a3 /= (t3 = (2 - o2) * i2) <= 1 ? t3 : 2 - t3) || 0), 100 * (r3 /= 2)];
236
+ }, s.hwb.rgb = function(e3) {
237
+ var t3, a3, r3, n3, o2, s2, i2, l2 = e3[0] / 360, c2 = e3[1] / 100, u = e3[2] / 100, d = c2 + u;
238
+ switch (d > 1 && (c2 /= d, u /= d), r3 = 6 * l2 - (t3 = Math.floor(6 * l2)), 1 & t3 && (r3 = 1 - r3), n3 = c2 + r3 * ((a3 = 1 - u) - c2), t3) {
239
+ default:
240
+ case 6:
241
+ case 0:
242
+ o2 = a3, s2 = n3, i2 = c2;
243
+ break;
244
+ case 1:
245
+ o2 = n3, s2 = a3, i2 = c2;
246
+ break;
247
+ case 2:
248
+ o2 = c2, s2 = a3, i2 = n3;
249
+ break;
250
+ case 3:
251
+ o2 = c2, s2 = n3, i2 = a3;
252
+ break;
253
+ case 4:
254
+ o2 = n3, s2 = c2, i2 = a3;
255
+ break;
256
+ case 5:
257
+ o2 = a3, s2 = c2, i2 = n3;
258
+ }
259
+ return [255 * o2, 255 * s2, 255 * i2];
260
+ }, s.cmyk.rgb = function(e3) {
261
+ var t3 = e3[0] / 100, a3 = e3[1] / 100, r3 = e3[2] / 100, n3 = e3[3] / 100;
262
+ return [255 * (1 - Math.min(1, t3 * (1 - n3) + n3)), 255 * (1 - Math.min(1, a3 * (1 - n3) + n3)), 255 * (1 - Math.min(1, r3 * (1 - n3) + n3))];
263
+ }, s.xyz.rgb = function(e3) {
264
+ var t3, a3, r3, n3 = e3[0] / 100, o2 = e3[1] / 100, s2 = e3[2] / 100;
265
+ return a3 = -0.9689 * n3 + 1.8758 * o2 + 0.0415 * s2, r3 = 0.0557 * n3 + -0.204 * o2 + 1.057 * s2, t3 = (t3 = 3.2406 * n3 + -1.5372 * o2 + -0.4986 * s2) > 31308e-7 ? 1.055 * Math.pow(t3, 1 / 2.4) - 0.055 : 12.92 * t3, a3 = a3 > 31308e-7 ? 1.055 * Math.pow(a3, 1 / 2.4) - 0.055 : 12.92 * a3, r3 = r3 > 31308e-7 ? 1.055 * Math.pow(r3, 1 / 2.4) - 0.055 : 12.92 * r3, [255 * (t3 = Math.min(Math.max(0, t3), 1)), 255 * (a3 = Math.min(Math.max(0, a3), 1)), 255 * (r3 = Math.min(Math.max(0, r3), 1))];
266
+ }, s.xyz.lab = function(e3) {
267
+ var t3 = e3[0], a3 = e3[1], r3 = e3[2];
268
+ return a3 /= 100, r3 /= 108.883, t3 = (t3 /= 95.047) > 8856e-6 ? Math.pow(t3, 1 / 3) : 7.787 * t3 + 16 / 116, [116 * (a3 = a3 > 8856e-6 ? Math.pow(a3, 1 / 3) : 7.787 * a3 + 16 / 116) - 16, 500 * (t3 - a3), 200 * (a3 - (r3 = r3 > 8856e-6 ? Math.pow(r3, 1 / 3) : 7.787 * r3 + 16 / 116))];
269
+ }, s.lab.xyz = function(e3) {
270
+ var t3, a3, r3, n3 = e3[0];
271
+ t3 = e3[1] / 500 + (a3 = (n3 + 16) / 116), r3 = a3 - e3[2] / 200;
272
+ var o2 = Math.pow(a3, 3), s2 = Math.pow(t3, 3), i2 = Math.pow(r3, 3);
273
+ return a3 = o2 > 8856e-6 ? o2 : (a3 - 16 / 116) / 7.787, t3 = s2 > 8856e-6 ? s2 : (t3 - 16 / 116) / 7.787, r3 = i2 > 8856e-6 ? i2 : (r3 - 16 / 116) / 7.787, [t3 *= 95.047, a3 *= 100, r3 *= 108.883];
274
+ }, s.lab.lch = function(e3) {
275
+ var t3, a3 = e3[0], r3 = e3[1], n3 = e3[2];
276
+ return (t3 = 360 * Math.atan2(n3, r3) / 2 / Math.PI) < 0 && (t3 += 360), [a3, Math.sqrt(r3 * r3 + n3 * n3), t3];
277
+ }, s.lch.lab = function(e3) {
278
+ var t3, a3 = e3[0], r3 = e3[1];
279
+ return t3 = e3[2] / 360 * 2 * Math.PI, [a3, r3 * Math.cos(t3), r3 * Math.sin(t3)];
280
+ }, s.rgb.ansi16 = function(e3) {
281
+ var t3 = e3[0], a3 = e3[1], r3 = e3[2], n3 = 1 in arguments ? arguments[1] : s.rgb.hsv(e3)[2];
282
+ if (0 === (n3 = Math.round(n3 / 50))) return 30;
283
+ var o2 = 30 + (Math.round(r3 / 255) << 2 | Math.round(a3 / 255) << 1 | Math.round(t3 / 255));
284
+ return 2 === n3 && (o2 += 60), o2;
285
+ }, s.hsv.ansi16 = function(e3) {
286
+ return s.rgb.ansi16(s.hsv.rgb(e3), e3[2]);
287
+ }, s.rgb.ansi256 = function(e3) {
288
+ var t3 = e3[0], a3 = e3[1], r3 = e3[2];
289
+ return t3 === a3 && a3 === r3 ? t3 < 8 ? 16 : t3 > 248 ? 231 : Math.round((t3 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(t3 / 255 * 5) + 6 * Math.round(a3 / 255 * 5) + Math.round(r3 / 255 * 5);
290
+ }, s.ansi16.rgb = function(e3) {
291
+ var t3 = e3 % 10;
292
+ if (0 === t3 || 7 === t3) return e3 > 50 && (t3 += 3.5), [t3 = t3 / 10.5 * 255, t3, t3];
293
+ var a3 = 0.5 * (1 + ~~(e3 > 50));
294
+ return [(1 & t3) * a3 * 255, (t3 >> 1 & 1) * a3 * 255, (t3 >> 2 & 1) * a3 * 255];
295
+ }, s.ansi256.rgb = function(e3) {
296
+ if (e3 >= 232) {
297
+ var t3 = 10 * (e3 - 232) + 8;
298
+ return [t3, t3, t3];
299
+ }
300
+ var a3;
301
+ return e3 -= 16, [Math.floor(e3 / 36) / 5 * 255, Math.floor((a3 = e3 % 36) / 6) / 5 * 255, a3 % 6 / 5 * 255];
302
+ }, s.rgb.hex = function(e3) {
303
+ var t3 = (((255 & Math.round(e3[0])) << 16) + ((255 & Math.round(e3[1])) << 8) + (255 & Math.round(e3[2]))).toString(16).toUpperCase();
304
+ return "000000".substring(t3.length) + t3;
305
+ }, s.hex.rgb = function(e3) {
306
+ var t3 = e3.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
307
+ if (!t3) return [0, 0, 0];
308
+ var a3 = t3[0];
309
+ 3 === t3[0].length && (a3 = a3.split("").map(function(e4) {
310
+ return e4 + e4;
311
+ }).join(""));
312
+ var r3 = parseInt(a3, 16);
313
+ return [r3 >> 16 & 255, r3 >> 8 & 255, 255 & r3];
314
+ }, s.rgb.hcg = function(e3) {
315
+ var t3, a3 = e3[0] / 255, r3 = e3[1] / 255, n3 = e3[2] / 255, o2 = Math.max(Math.max(a3, r3), n3), s2 = Math.min(Math.min(a3, r3), n3), i2 = o2 - s2;
316
+ return t3 = i2 <= 0 ? 0 : o2 === a3 ? (r3 - n3) / i2 % 6 : o2 === r3 ? 2 + (n3 - a3) / i2 : 4 + (a3 - r3) / i2 + 4, t3 /= 6, [360 * (t3 %= 1), 100 * i2, 100 * (i2 < 1 ? s2 / (1 - i2) : 0)];
317
+ }, s.hsl.hcg = function(e3) {
318
+ var t3 = e3[1] / 100, a3 = e3[2] / 100, r3 = 1, n3 = 0;
319
+ return (r3 = a3 < 0.5 ? 2 * t3 * a3 : 2 * t3 * (1 - a3)) < 1 && (n3 = (a3 - 0.5 * r3) / (1 - r3)), [e3[0], 100 * r3, 100 * n3];
320
+ }, s.hsv.hcg = function(e3) {
321
+ var t3 = e3[1] / 100, a3 = e3[2] / 100, r3 = t3 * a3, n3 = 0;
322
+ return r3 < 1 && (n3 = (a3 - r3) / (1 - r3)), [e3[0], 100 * r3, 100 * n3];
323
+ }, s.hcg.rgb = function(e3) {
324
+ var t3 = e3[0] / 360, a3 = e3[1] / 100, r3 = e3[2] / 100;
325
+ if (0 === a3) return [255 * r3, 255 * r3, 255 * r3];
326
+ var n3, o2 = [0, 0, 0], s2 = t3 % 1 * 6, i2 = s2 % 1, l2 = 1 - i2;
327
+ switch (Math.floor(s2)) {
328
+ case 0:
329
+ o2[0] = 1, o2[1] = i2, o2[2] = 0;
330
+ break;
331
+ case 1:
332
+ o2[0] = l2, o2[1] = 1, o2[2] = 0;
333
+ break;
334
+ case 2:
335
+ o2[0] = 0, o2[1] = 1, o2[2] = i2;
336
+ break;
337
+ case 3:
338
+ o2[0] = 0, o2[1] = l2, o2[2] = 1;
339
+ break;
340
+ case 4:
341
+ o2[0] = i2, o2[1] = 0, o2[2] = 1;
342
+ break;
343
+ default:
344
+ o2[0] = 1, o2[1] = 0, o2[2] = l2;
345
+ }
346
+ return n3 = (1 - a3) * r3, [255 * (a3 * o2[0] + n3), 255 * (a3 * o2[1] + n3), 255 * (a3 * o2[2] + n3)];
347
+ }, s.hcg.hsv = function(e3) {
348
+ var t3 = e3[1] / 100, a3 = t3 + e3[2] / 100 * (1 - t3), r3 = 0;
349
+ return a3 > 0 && (r3 = t3 / a3), [e3[0], 100 * r3, 100 * a3];
350
+ }, s.hcg.hsl = function(e3) {
351
+ var t3 = e3[1] / 100, a3 = e3[2] / 100 * (1 - t3) + 0.5 * t3, r3 = 0;
352
+ return a3 > 0 && a3 < 0.5 ? r3 = t3 / (2 * a3) : a3 >= 0.5 && a3 < 1 && (r3 = t3 / (2 * (1 - a3))), [e3[0], 100 * r3, 100 * a3];
353
+ }, s.hcg.hwb = function(e3) {
354
+ var t3 = e3[1] / 100, a3 = t3 + e3[2] / 100 * (1 - t3);
355
+ return [e3[0], 100 * (a3 - t3), 100 * (1 - a3)];
356
+ }, s.hwb.hcg = function(e3) {
357
+ var t3 = e3[1] / 100, a3 = 1 - e3[2] / 100, r3 = a3 - t3, n3 = 0;
358
+ return r3 < 1 && (n3 = (a3 - r3) / (1 - r3)), [e3[0], 100 * r3, 100 * n3];
359
+ }, s.apple.rgb = function(e3) {
360
+ return [e3[0] / 65535 * 255, e3[1] / 65535 * 255, e3[2] / 65535 * 255];
361
+ }, s.rgb.apple = function(e3) {
362
+ return [e3[0] / 255 * 65535, e3[1] / 255 * 65535, e3[2] / 255 * 65535];
363
+ }, s.gray.rgb = function(e3) {
364
+ return [e3[0] / 100 * 255, e3[0] / 100 * 255, e3[0] / 100 * 255];
365
+ }, s.gray.hsl = s.gray.hsv = function(e3) {
366
+ return [0, 0, e3[0]];
367
+ }, s.gray.hwb = function(e3) {
368
+ return [0, 100, e3[0]];
369
+ }, s.gray.cmyk = function(e3) {
370
+ return [0, 0, 0, e3[0]];
371
+ }, s.gray.lab = function(e3) {
372
+ return [e3[0], 0, 0];
373
+ }, s.gray.hex = function(e3) {
374
+ var t3 = 255 & Math.round(e3[0] / 100 * 255), a3 = ((t3 << 16) + (t3 << 8) + t3).toString(16).toUpperCase();
375
+ return "000000".substring(a3.length) + a3;
376
+ }, s.rgb.gray = function(e3) {
377
+ return [(e3[0] + e3[1] + e3[2]) / 3 / 255 * 100];
378
+ };
379
+ }, 4732: (e2, t2, a2) => {
380
+ var r2 = a2(6481), n2 = a2(1157), o = {};
381
+ Object.keys(r2).forEach(function(e3) {
382
+ o[e3] = {}, Object.defineProperty(o[e3], "channels", { value: r2[e3].channels }), Object.defineProperty(o[e3], "labels", { value: r2[e3].labels });
383
+ var t3 = n2(e3);
384
+ Object.keys(t3).forEach(function(a3) {
385
+ var r3 = t3[a3];
386
+ o[e3][a3] = function(e4) {
387
+ var t4 = function(t5) {
388
+ if (null == t5) return t5;
389
+ arguments.length > 1 && (t5 = Array.prototype.slice.call(arguments));
390
+ var a4 = e4(t5);
391
+ if ("object" == typeof a4) for (var r4 = a4.length, n3 = 0; n3 < r4; n3++) a4[n3] = Math.round(a4[n3]);
392
+ return a4;
393
+ };
394
+ return "conversion" in e4 && (t4.conversion = e4.conversion), t4;
395
+ }(r3), o[e3][a3].raw = function(e4) {
396
+ var t4 = function(t5) {
397
+ return null == t5 ? t5 : (arguments.length > 1 && (t5 = Array.prototype.slice.call(arguments)), e4(t5));
398
+ };
399
+ return "conversion" in e4 && (t4.conversion = e4.conversion), t4;
400
+ }(r3);
401
+ });
402
+ }), e2.exports = o;
403
+ }, 1157: (e2, t2, a2) => {
404
+ var r2 = a2(6481);
405
+ function n2(e3) {
406
+ var t3 = function() {
407
+ for (var e4 = {}, t4 = Object.keys(r2), a4 = t4.length, n4 = 0; n4 < a4; n4++) e4[t4[n4]] = { distance: -1, parent: null };
408
+ return e4;
409
+ }(), a3 = [e3];
410
+ for (t3[e3].distance = 0; a3.length; ) for (var n3 = a3.pop(), o2 = Object.keys(r2[n3]), s2 = o2.length, i = 0; i < s2; i++) {
411
+ var l = o2[i], c = t3[l];
412
+ -1 === c.distance && (c.distance = t3[n3].distance + 1, c.parent = n3, a3.unshift(l));
413
+ }
414
+ return t3;
97
415
  }
98
- if (options.onCopy) {
99
- e.preventDefault();
100
- options.onCopy(e.clipboardData);
416
+ function o(e3, t3) {
417
+ return function(a3) {
418
+ return t3(e3(a3));
419
+ };
101
420
  }
102
- });
103
- document.body.appendChild(mark);
104
- range.selectNodeContents(mark);
105
- selection.addRange(range);
106
- var successful = document.execCommand("copy");
107
- if (!successful) {
108
- throw new Error("copy command was unsuccessful");
109
- }
110
- success = true;
111
- } catch (err) {
112
- debug && console.error("unable to copy using execCommand: ", err);
113
- debug && console.warn("trying IE specific stuff");
114
- try {
115
- window.clipboardData.setData(options.format || "text", text);
116
- options.onCopy && options.onCopy(window.clipboardData);
117
- success = true;
118
- } catch (err2) {
119
- debug && console.error("unable to copy using clipboardData: ", err2);
120
- debug && console.error("falling back to prompt");
121
- message = format("message" in options ? options.message : defaultMessage);
122
- window.prompt(message, text);
123
- }
124
- } finally {
125
- if (selection) {
126
- if (typeof selection.removeRange == "function") {
127
- selection.removeRange(range);
128
- } else {
129
- selection.removeAllRanges();
421
+ function s(e3, t3) {
422
+ for (var a3 = [t3[e3].parent, e3], n3 = r2[t3[e3].parent][e3], s2 = t3[e3].parent; t3[s2].parent; ) a3.unshift(t3[s2].parent), n3 = o(r2[t3[s2].parent][s2], n3), s2 = t3[s2].parent;
423
+ return n3.conversion = a3, n3;
130
424
  }
131
- }
132
- if (mark) {
133
- document.body.removeChild(mark);
134
- }
135
- reselectPrevious();
136
- }
137
- return success;
138
- }
139
- copyToClipboard$1 = copy;
140
- return copyToClipboard$1;
141
- }
142
- var copyToClipboardExports = requireCopyToClipboard();
143
- const copyToClipboard = /* @__PURE__ */ getDefaultExportFromCjs(copyToClipboardExports);
144
- function r(e) {
145
- var t, f, n = "";
146
- if ("string" == typeof e || "number" == typeof e) n += e;
147
- else if ("object" == typeof e) if (Array.isArray(e)) {
148
- var o = e.length;
149
- for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
150
- } else for (f in e) e[f] && (n && (n += " "), n += f);
151
- return n;
152
- }
153
- function clsx() {
154
- for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
155
- return n;
156
- }
157
- const lightColorspace = {
158
- scheme: "Light Theme",
159
- author: "mac gainor (https://github.com/mac-s-g)",
160
- base00: "rgba(0, 0, 0, 0)",
161
- base01: "rgb(245, 245, 245)",
162
- base02: "rgb(235, 235, 235)",
163
- base03: "#93a1a1",
164
- base04: "rgba(0, 0, 0, 0.3)",
165
- base05: "#586e75",
166
- base06: "#073642",
167
- base07: "#002b36",
168
- base08: "#d33682",
169
- base09: "#cb4b16",
170
- base0A: "#ffd500",
171
- base0B: "#859900",
172
- base0C: "#6c71c4",
173
- base0D: "#586e75",
174
- base0E: "#2aa198",
175
- base0F: "#268bd2"
176
- };
177
- const darkColorspace = {
178
- scheme: "Dark Theme",
179
- author: "Chris Kempson (http://chriskempson.com)",
180
- base00: "#181818",
181
- base01: "#282828",
182
- base02: "#383838",
183
- base03: "#585858",
184
- base04: "#b8b8b8",
185
- base05: "#d8d8d8",
186
- base06: "#e8e8e8",
187
- base07: "#f8f8f8",
188
- base08: "#ab4642",
189
- base09: "#dc9656",
190
- base0A: "#f7ca88",
191
- base0B: "#a1b56c",
192
- base0C: "#86c1b9",
193
- base0D: "#7cafc2",
194
- base0E: "#ba8baf",
195
- base0F: "#a16946"
196
- };
197
- const DefaultKeyRenderer = () => null;
198
- DefaultKeyRenderer.when = () => false;
199
- const createJsonViewerStore = (props) => {
200
- return create()((set, get) => {
201
- var _props_rootName, _props_indentWidth, _props_keyRenderer, _props_enableAdd, _props_enableDelete, _props_enableClipboard, _props_editable, _props_onChange, _props_onCopy, _props_onSelect, _props_onAdd, _props_onDelete, _props_defaultInspectDepth, _props_defaultInspectControl, _props_maxDisplayLength, _props_groupArraysAfterLength, _props_collapseStringsAfterLength, _props_objectSortKeys, _props_quotesOnKeys, _props_displayDataTypes, _props_displaySize, _props_displayComma, _props_highlightUpdates;
202
- return {
203
- // provided by user
204
- rootName: (_props_rootName = props.rootName) !== null && _props_rootName !== void 0 ? _props_rootName : "root",
205
- indentWidth: (_props_indentWidth = props.indentWidth) !== null && _props_indentWidth !== void 0 ? _props_indentWidth : 3,
206
- keyRenderer: (_props_keyRenderer = props.keyRenderer) !== null && _props_keyRenderer !== void 0 ? _props_keyRenderer : DefaultKeyRenderer,
207
- enableAdd: (_props_enableAdd = props.enableAdd) !== null && _props_enableAdd !== void 0 ? _props_enableAdd : false,
208
- enableDelete: (_props_enableDelete = props.enableDelete) !== null && _props_enableDelete !== void 0 ? _props_enableDelete : false,
209
- enableClipboard: (_props_enableClipboard = props.enableClipboard) !== null && _props_enableClipboard !== void 0 ? _props_enableClipboard : true,
210
- editable: (_props_editable = props.editable) !== null && _props_editable !== void 0 ? _props_editable : false,
211
- onChange: (_props_onChange = props.onChange) !== null && _props_onChange !== void 0 ? _props_onChange : () => {
212
- },
213
- onCopy: (_props_onCopy = props.onCopy) !== null && _props_onCopy !== void 0 ? _props_onCopy : void 0,
214
- onSelect: (_props_onSelect = props.onSelect) !== null && _props_onSelect !== void 0 ? _props_onSelect : void 0,
215
- onAdd: (_props_onAdd = props.onAdd) !== null && _props_onAdd !== void 0 ? _props_onAdd : void 0,
216
- onDelete: (_props_onDelete = props.onDelete) !== null && _props_onDelete !== void 0 ? _props_onDelete : void 0,
217
- defaultInspectDepth: (_props_defaultInspectDepth = props.defaultInspectDepth) !== null && _props_defaultInspectDepth !== void 0 ? _props_defaultInspectDepth : 5,
218
- defaultInspectControl: (_props_defaultInspectControl = props.defaultInspectControl) !== null && _props_defaultInspectControl !== void 0 ? _props_defaultInspectControl : void 0,
219
- maxDisplayLength: (_props_maxDisplayLength = props.maxDisplayLength) !== null && _props_maxDisplayLength !== void 0 ? _props_maxDisplayLength : 30,
220
- groupArraysAfterLength: (_props_groupArraysAfterLength = props.groupArraysAfterLength) !== null && _props_groupArraysAfterLength !== void 0 ? _props_groupArraysAfterLength : 100,
221
- collapseStringsAfterLength: props.collapseStringsAfterLength === false ? Number.MAX_VALUE : (_props_collapseStringsAfterLength = props.collapseStringsAfterLength) !== null && _props_collapseStringsAfterLength !== void 0 ? _props_collapseStringsAfterLength : 50,
222
- objectSortKeys: (_props_objectSortKeys = props.objectSortKeys) !== null && _props_objectSortKeys !== void 0 ? _props_objectSortKeys : false,
223
- quotesOnKeys: (_props_quotesOnKeys = props.quotesOnKeys) !== null && _props_quotesOnKeys !== void 0 ? _props_quotesOnKeys : true,
224
- displayDataTypes: (_props_displayDataTypes = props.displayDataTypes) !== null && _props_displayDataTypes !== void 0 ? _props_displayDataTypes : true,
225
- displaySize: (_props_displaySize = props.displaySize) !== null && _props_displaySize !== void 0 ? _props_displaySize : true,
226
- displayComma: (_props_displayComma = props.displayComma) !== null && _props_displayComma !== void 0 ? _props_displayComma : false,
227
- highlightUpdates: (_props_highlightUpdates = props.highlightUpdates) !== null && _props_highlightUpdates !== void 0 ? _props_highlightUpdates : false,
228
- // internal state
229
- inspectCache: {},
230
- hoverPath: null,
231
- colorspace: lightColorspace,
232
- value: props.value,
233
- prevValue: void 0,
234
- getInspectCache: (path, nestedIndex) => {
235
- const target = nestedIndex !== void 0 ? path.join(".") + "[".concat(nestedIndex, "]nt") : path.join(".");
236
- return get().inspectCache[target];
237
- },
238
- setInspectCache: (path, action, nestedIndex) => {
239
- const target = nestedIndex !== void 0 ? path.join(".") + "[".concat(nestedIndex, "]nt") : path.join(".");
240
- set((state) => ({
241
- inspectCache: {
242
- ...state.inspectCache,
243
- [target]: typeof action === "function" ? action(state.inspectCache[target]) : action
244
- }
245
- }));
246
- },
247
- setHover: (path, nestedIndex) => {
248
- set({
249
- hoverPath: path ? {
250
- path,
251
- nestedIndex
252
- } : null
253
- });
254
- }
255
- };
256
- });
257
- };
258
- const JsonViewerStoreContext = createContext(void 0);
259
- JsonViewerStoreContext.Provider;
260
- const useJsonViewerStore = (selector, equalityFn) => {
261
- const store = useContext(JsonViewerStoreContext);
262
- return useStore(store, selector, equalityFn);
263
- };
264
- const useTextColor = () => {
265
- return useJsonViewerStore((store) => store.colorspace.base07);
266
- };
267
- const objectCtorString = Object.prototype.constructor.toString();
268
- function isPlainObject(value) {
269
- if (!value || typeof value !== "object") return false;
270
- const proto = Object.getPrototypeOf(value);
271
- if (proto === null) return true;
272
- const Ctor = Object.hasOwnProperty.call(proto, "constructor") && proto.constructor;
273
- if (Ctor === Object) return true;
274
- return typeof Ctor === "function" && Function.toString.call(Ctor) === objectCtorString;
275
- }
276
- const isCycleReference = (root, path, value) => {
277
- if (root === null || value === null) {
278
- return false;
279
- }
280
- if (typeof root !== "object") {
281
- return false;
282
- }
283
- if (typeof value !== "object") {
284
- return false;
285
- }
286
- if (Object.is(root, value) && path.length !== 0) {
287
- return "";
288
- }
289
- const currentPath = [];
290
- const arr = [
291
- ...path
292
- ];
293
- let currentRoot = root;
294
- while (currentRoot !== value || arr.length !== 0) {
295
- if (typeof currentRoot !== "object" || currentRoot === null) {
296
- return false;
297
- }
298
- if (Object.is(currentRoot, value)) {
299
- return currentPath.reduce((path2, value2, currentIndex) => {
300
- if (typeof value2 === "number") {
301
- return path2 + "[".concat(value2, "]");
302
- }
303
- return path2 + "".concat(currentIndex === 0 ? "" : ".").concat(value2);
304
- }, "");
305
- }
306
- const target = arr.shift();
307
- currentPath.push(target);
308
- currentRoot = currentRoot[target];
309
- }
310
- return false;
311
- };
312
- function getValueSize(value) {
313
- if (value === null || void 0) {
314
- return 0;
315
- } else if (Array.isArray(value)) {
316
- return value.length;
317
- } else if (value instanceof Map || value instanceof Set) {
318
- return value.size;
319
- } else if (value instanceof Date) {
320
- return 1;
321
- } else if (typeof value === "object") {
322
- return Object.keys(value).length;
323
- } else if (typeof value === "string") {
324
- return value.length;
325
- }
326
- return 1;
327
- }
328
- function segmentArray(arr, size) {
329
- const result = [];
330
- let index = 0;
331
- while (index < arr.length) {
332
- result.push(arr.slice(index, index + size));
333
- index += size;
334
- }
335
- return result;
336
- }
337
- function safeStringify(obj, space) {
338
- const seenValues = [];
339
- function replacer(key, value) {
340
- if (typeof value === "bigint") return value.toString();
341
- if (value instanceof Map) {
342
- if ("toJSON" in value && typeof value.toJSON === "function") return value.toJSON();
343
- if (value.size === 0) return {};
344
- if (seenValues.includes(value)) return "[Circular]";
345
- seenValues.push(value);
346
- const entries = Array.from(value.entries());
347
- if (entries.every((param) => {
348
- let [key2] = param;
349
- return typeof key2 === "string" || typeof key2 === "number";
350
- })) {
351
- return Object.fromEntries(entries);
352
- }
353
- return {};
354
- }
355
- if (value instanceof Set) {
356
- if ("toJSON" in value && typeof value.toJSON === "function") return value.toJSON();
357
- if (seenValues.includes(value)) return "[Circular]";
358
- seenValues.push(value);
359
- return Array.from(value.values());
360
- }
361
- if (typeof value === "object" && value !== null && Object.keys(value).length) {
362
- const stackSize = seenValues.length;
363
- if (stackSize) {
364
- for (let n = stackSize - 1; n >= 0 && seenValues[n][key] !== value; --n) {
365
- seenValues.pop();
366
- }
367
- if (seenValues.includes(value)) return "[Circular]";
368
- }
369
- seenValues.push(value);
370
- }
371
- return value;
372
- }
373
- return JSON.stringify(obj, replacer, space);
374
- }
375
- async function copyString(value) {
376
- if ("clipboard" in navigator) {
377
- try {
378
- await navigator.clipboard.writeText(value);
379
- } catch {
380
- }
381
- }
382
- copyToClipboard(value);
383
- }
384
- function useClipboard() {
385
- let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
386
- const [copied, setCopied] = useState(false);
387
- const copyTimeout = useRef(null);
388
- const handleCopyResult = useCallback((value) => {
389
- const current = copyTimeout.current;
390
- if (current) {
391
- window.clearTimeout(current);
392
- }
393
- copyTimeout.current = window.setTimeout(() => setCopied(false), timeout);
394
- setCopied(value);
395
- }, [
396
- timeout
397
- ]);
398
- const onCopy = useJsonViewerStore((store) => store.onCopy);
399
- const copy = useCallback(async (path, value) => {
400
- if (typeof onCopy === "function") {
401
- try {
402
- await onCopy(path, value, copyString);
403
- handleCopyResult(true);
404
- } catch (error) {
405
- console.error("error when copy ".concat(path.length === 0 ? "src" : "src[".concat(path.join(".")), "]"), error);
406
- }
407
- } else {
408
- try {
409
- const valueToCopy = safeStringify(typeof value === "function" ? value.toString() : value, " ");
410
- await copyString(valueToCopy);
411
- handleCopyResult(true);
412
- } catch (error) {
413
- console.error("error when copy ".concat(path.length === 0 ? "src" : "src[".concat(path.join(".")), "]"), error);
414
- }
415
- }
416
- }, [
417
- handleCopyResult,
418
- onCopy
419
- ]);
420
- const reset = useCallback(() => {
421
- setCopied(false);
422
- if (copyTimeout.current) {
423
- clearTimeout(copyTimeout.current);
424
- }
425
- }, []);
426
- return {
427
- copy,
428
- reset,
429
- copied
430
- };
431
- }
432
- function useIsCycleReference(path, value) {
433
- const rootValue = useJsonViewerStore((store) => store.value);
434
- return useMemo(() => isCycleReference(rootValue, path, value), [
435
- path,
436
- value,
437
- rootValue
438
- ]);
439
- }
440
- function useInspect(path, value, nestedIndex) {
441
- const depth = path.length;
442
- const isTrap = useIsCycleReference(path, value);
443
- const getInspectCache = useJsonViewerStore((store) => store.getInspectCache);
444
- const setInspectCache = useJsonViewerStore((store) => store.setInspectCache);
445
- const defaultInspectDepth = useJsonViewerStore((store) => store.defaultInspectDepth);
446
- const defaultInspectControl = useJsonViewerStore((store) => store.defaultInspectControl);
447
- useEffect(() => {
448
- const inspect2 = getInspectCache(path, nestedIndex);
449
- if (inspect2 !== void 0) {
450
- return;
451
- }
452
- if (nestedIndex !== void 0) {
453
- setInspectCache(path, false, nestedIndex);
454
- return;
455
- }
456
- const shouldInspect = isTrap ? false : typeof defaultInspectControl === "function" ? defaultInspectControl(path, value) : depth < defaultInspectDepth;
457
- setInspectCache(path, shouldInspect);
458
- }, [
459
- defaultInspectDepth,
460
- defaultInspectControl,
461
- depth,
462
- getInspectCache,
463
- isTrap,
464
- nestedIndex,
465
- path,
466
- value,
467
- setInspectCache
468
- ]);
469
- const [inspect, set] = useState(() => {
470
- const shouldInspect = getInspectCache(path, nestedIndex);
471
- if (shouldInspect !== void 0) {
472
- return shouldInspect;
473
- }
474
- if (nestedIndex !== void 0) {
475
- return false;
476
- }
477
- return isTrap ? false : typeof defaultInspectControl === "function" ? defaultInspectControl(path, value) : depth < defaultInspectDepth;
478
- });
479
- const setInspect = useCallback((apply) => {
480
- set((oldState) => {
481
- const newState = typeof apply === "boolean" ? apply : apply(oldState);
482
- setInspectCache(path, newState, nestedIndex);
483
- return newState;
484
- });
485
- }, [
486
- nestedIndex,
487
- path,
488
- setInspectCache
489
- ]);
490
- return [
491
- inspect,
492
- setInspect
493
- ];
494
- }
495
- const DataBox = (props) => /* @__PURE__ */ jsx(Box, {
496
- component: "div",
497
- ...props,
498
- sx: {
499
- display: "inline-block",
500
- ...props.sx
501
- }
502
- });
503
- const DataTypeLabel = (param) => {
504
- let { dataType, enable = true } = param;
505
- if (!enable) return null;
506
- return /* @__PURE__ */ jsx(DataBox, {
507
- className: "data-type-label",
508
- sx: {
509
- mx: 0.5,
510
- fontSize: "0.7rem",
511
- opacity: 0.8,
512
- userSelect: "none"
513
- },
514
- children: dataType
515
- });
516
- };
517
- function defineEasyType(param) {
518
- let { is, serialize, deserialize, type, colorKey, displayTypeLabel = true, Renderer } = param;
519
- const Render = /* @__PURE__ */ memo(Renderer);
520
- const EasyType = (props) => {
521
- const storeDisplayDataTypes = useJsonViewerStore((store) => store.displayDataTypes);
522
- const color = useJsonViewerStore((store) => store.colorspace[colorKey]);
523
- const onSelect = useJsonViewerStore((store) => store.onSelect);
524
- return /* @__PURE__ */ jsxs(DataBox, {
525
- onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(props.path, props.value),
526
- sx: {
527
- color
528
- },
529
- children: [
530
- displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ jsx(DataTypeLabel, {
531
- dataType: type
532
- }),
533
- /* @__PURE__ */ jsx(DataBox, {
534
- className: "".concat(type, "-value"),
535
- children: /* @__PURE__ */ jsx(Render, {
536
- path: props.path,
537
- inspect: props.inspect,
538
- setInspect: props.setInspect,
539
- value: props.value,
540
- prevValue: props.prevValue
541
- })
542
- })
543
- ]
544
- });
545
- };
546
- EasyType.displayName = "easy-".concat(type, "-type");
547
- if (!serialize || !deserialize) {
548
- return {
549
- is,
550
- Component: EasyType
551
- };
552
- }
553
- const EasyTypeEditor = (param2) => {
554
- let { value, setValue, abortEditing, commitEditing } = param2;
555
- const color = useJsonViewerStore((store) => store.colorspace[colorKey]);
556
- const handleKeyDown = useCallback((event) => {
557
- if (event.key === "Enter") {
558
- event.preventDefault();
559
- commitEditing(value);
560
- }
561
- if (event.key === "Escape") {
562
- event.preventDefault();
563
- abortEditing();
564
- }
565
- }, [
566
- abortEditing,
567
- commitEditing,
568
- value
569
- ]);
570
- const handleChange = useCallback((event) => {
571
- setValue(event.target.value);
572
- }, [
573
- setValue
574
- ]);
575
- return /* @__PURE__ */ jsx(InputBase, {
576
- autoFocus: true,
577
- value,
578
- onChange: handleChange,
579
- onKeyDown: handleKeyDown,
580
- size: "small",
581
- multiline: true,
582
- sx: {
583
- color,
584
- padding: 0.5,
585
- borderStyle: "solid",
586
- borderColor: "black",
587
- borderWidth: 1,
588
- fontSize: "0.8rem",
589
- fontFamily: "monospace",
590
- display: "inline-flex"
591
- }
592
- });
593
- };
594
- EasyTypeEditor.displayName = "easy-".concat(type, "-type-editor");
595
- return {
596
- is,
597
- serialize,
598
- deserialize,
599
- Component: EasyType,
600
- Editor: EasyTypeEditor
601
- };
602
- }
603
- const booleanType = defineEasyType({
604
- is: (value) => typeof value === "boolean",
605
- type: "bool",
606
- colorKey: "base0E",
607
- serialize: (value) => value.toString(),
608
- deserialize: (value) => {
609
- if (value === "true") return true;
610
- if (value === "false") return false;
611
- throw new Error("Invalid boolean value");
612
- },
613
- Renderer: (param) => {
614
- let { value } = param;
615
- return /* @__PURE__ */ jsx(Fragment, {
616
- children: value ? "true" : "false"
617
- });
618
- }
619
- });
620
- const displayOptions = {
621
- weekday: "short",
622
- year: "numeric",
623
- month: "short",
624
- day: "numeric",
625
- hour: "2-digit",
626
- minute: "2-digit"
627
- };
628
- const dateType = defineEasyType({
629
- is: (value) => value instanceof Date,
630
- type: "date",
631
- colorKey: "base0D",
632
- Renderer: (param) => {
633
- let { value } = param;
634
- return /* @__PURE__ */ jsx(Fragment, {
635
- children: value.toLocaleTimeString("en-us", displayOptions)
636
- });
637
- }
638
- });
639
- const functionBody = (func) => {
640
- const funcString = func.toString();
641
- let isUsualFunction = true;
642
- const parenthesisPos = funcString.indexOf(")");
643
- const arrowPos = funcString.indexOf("=>");
644
- if (arrowPos !== -1 && arrowPos > parenthesisPos) {
645
- isUsualFunction = false;
646
- }
647
- if (isUsualFunction) {
648
- return funcString.substring(funcString.indexOf("{", parenthesisPos) + 1, funcString.lastIndexOf("}"));
649
- }
650
- return funcString.substring(funcString.indexOf("=>") + 2);
651
- };
652
- const functionName = (func) => {
653
- const funcString = func.toString();
654
- const isUsualFunction = funcString.indexOf("function") !== -1;
655
- if (isUsualFunction) {
656
- return funcString.substring(8, funcString.indexOf("{")).trim();
657
- }
658
- return funcString.substring(0, funcString.indexOf("=>") + 2).trim();
659
- };
660
- const lb = "{";
661
- const rb = "}";
662
- const PreFunctionType = (props) => {
663
- return /* @__PURE__ */ jsxs(NoSsr, {
664
- children: [
665
- /* @__PURE__ */ jsx(DataTypeLabel, {
666
- dataType: "function"
667
- }),
668
- /* @__PURE__ */ jsxs(Box, {
669
- component: "span",
670
- className: "data-function-start",
671
- sx: {
672
- letterSpacing: 0.5
673
- },
674
- children: [
675
- functionName(props.value),
676
- " ",
677
- lb
678
- ]
679
- })
680
- ]
681
- });
682
- };
683
- const PostFunctionType = () => {
684
- return /* @__PURE__ */ jsx(NoSsr, {
685
- children: /* @__PURE__ */ jsx(Box, {
686
- component: "span",
687
- className: "data-function-end",
688
- children: rb
689
- })
690
- });
691
- };
692
- const FunctionType = (props) => {
693
- const functionColor = useJsonViewerStore((store) => store.colorspace.base05);
694
- return /* @__PURE__ */ jsx(NoSsr, {
695
- children: /* @__PURE__ */ jsx(Box, {
696
- className: "data-function",
697
- sx: {
698
- display: props.inspect ? "block" : "inline-block",
699
- pl: props.inspect ? 2 : 0,
700
- color: functionColor
701
- },
702
- children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ jsx(Box, {
703
- component: "span",
704
- className: "data-function-body",
705
- onClick: () => props.setInspect(true),
706
- sx: {
707
- "&:hover": {
708
- cursor: "pointer"
709
- },
710
- padding: 0.5
711
- },
712
- children: "…"
713
- })
714
- })
715
- });
716
- };
717
- const functionType = {
718
- is: (value) => typeof value === "function",
719
- Component: FunctionType,
720
- PreComponent: PreFunctionType,
721
- PostComponent: PostFunctionType
722
- };
723
- const nullType = defineEasyType({
724
- is: (value) => value === null,
725
- type: "null",
726
- colorKey: "base08",
727
- displayTypeLabel: false,
728
- Renderer: () => {
729
- const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
730
- return /* @__PURE__ */ jsx(Box, {
731
- sx: {
732
- fontSize: "0.8rem",
733
- backgroundColor,
734
- fontWeight: "bold",
735
- borderRadius: "3px",
736
- padding: "0.5px 2px"
737
- },
738
- children: "NULL"
739
- });
740
- }
741
- });
742
- const isInt = (n) => n % 1 === 0;
743
- const nanType = defineEasyType({
744
- is: (value) => typeof value === "number" && isNaN(value),
745
- type: "NaN",
746
- colorKey: "base08",
747
- displayTypeLabel: false,
748
- serialize: () => "NaN",
749
- // allow deserialize the value back to number
750
- deserialize: (value) => parseFloat(value),
751
- Renderer: () => {
752
- const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
753
- return /* @__PURE__ */ jsx(Box, {
754
- sx: {
755
- backgroundColor,
756
- fontSize: "0.8rem",
757
- fontWeight: "bold",
758
- borderRadius: "3px",
759
- padding: "0.5px 2px"
760
- },
761
- children: "NaN"
762
- });
763
- }
764
- });
765
- const floatType = defineEasyType({
766
- is: (value) => typeof value === "number" && !isInt(value) && !isNaN(value),
767
- type: "float",
768
- colorKey: "base0B",
769
- serialize: (value) => value.toString(),
770
- deserialize: (value) => parseFloat(value),
771
- Renderer: (param) => {
772
- let { value } = param;
773
- return /* @__PURE__ */ jsx(Fragment, {
774
- children: value
775
- });
776
- }
777
- });
778
- const intType = defineEasyType({
779
- is: (value) => typeof value === "number" && isInt(value),
780
- type: "int",
781
- colorKey: "base0F",
782
- serialize: (value) => value.toString(),
783
- // allow deserialize the value to float
784
- deserialize: (value) => parseFloat(value),
785
- Renderer: (param) => {
786
- let { value } = param;
787
- return /* @__PURE__ */ jsx(Fragment, {
788
- children: value
789
- });
790
- }
791
- });
792
- const bigIntType = defineEasyType({
793
- is: (value) => typeof value === "bigint",
794
- type: "bigint",
795
- colorKey: "base0F",
796
- serialize: (value) => value.toString(),
797
- deserialize: (value) => BigInt(value.replace(/\D/g, "")),
798
- Renderer: (param) => {
799
- let { value } = param;
800
- return /* @__PURE__ */ jsx(Fragment, {
801
- children: "".concat(value, "n")
802
- });
803
- }
804
- });
805
- const BaseIcon = (param) => {
806
- let { d, ...props } = param;
807
- return /* @__PURE__ */ jsx(SvgIcon, {
808
- ...props,
809
- children: /* @__PURE__ */ jsx("path", {
810
- d
811
- })
812
- });
813
- };
814
- const AddBox = "M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4z";
815
- const Check = "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z";
816
- const ChevronRight = "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z";
817
- const CircularArrows = "M 12 2 C 10.615 1.998 9.214625 2.2867656 7.890625 2.8847656 L 8.9003906 4.6328125 C 9.9043906 4.2098125 10.957 3.998 12 4 C 15.080783 4 17.738521 5.7633175 19.074219 8.3222656 L 17.125 9 L 21.25 11 L 22.875 7 L 20.998047 7.6523438 C 19.377701 4.3110398 15.95585 2 12 2 z M 6.5097656 4.4882812 L 2.2324219 5.0820312 L 3.734375 6.3808594 C 1.6515335 9.4550558 1.3615962 13.574578 3.3398438 17 C 4.0308437 18.201 4.9801562 19.268234 6.1601562 20.115234 L 7.1699219 18.367188 C 6.3019219 17.710187 5.5922656 16.904 5.0722656 16 C 3.5320014 13.332354 3.729203 10.148679 5.2773438 7.7128906 L 6.8398438 9.0625 L 6.5097656 4.4882812 z M 19.929688 13 C 19.794687 14.08 19.450734 15.098 18.927734 16 C 17.386985 18.668487 14.531361 20.090637 11.646484 19.966797 L 12.035156 17.9375 L 8.2402344 20.511719 L 10.892578 23.917969 L 11.265625 21.966797 C 14.968963 22.233766 18.681899 20.426323 20.660156 17 C 21.355156 15.801 21.805219 14.445 21.949219 13 L 19.929688 13 z";
818
- const Close = "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z";
819
- const ContentCopy = "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z";
820
- const Edit = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z";
821
- const ExpandMore = "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z";
822
- const Delete = "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z";
823
- const AddBoxIcon = (props) => {
824
- return /* @__PURE__ */ jsx(BaseIcon, {
825
- d: AddBox,
826
- ...props
827
- });
828
- };
829
- const CheckIcon = (props) => {
830
- return /* @__PURE__ */ jsx(BaseIcon, {
831
- d: Check,
832
- ...props
833
- });
834
- };
835
- const ChevronRightIcon = (props) => {
836
- return /* @__PURE__ */ jsx(BaseIcon, {
837
- d: ChevronRight,
838
- ...props
839
- });
840
- };
841
- const CircularArrowsIcon = (props) => {
842
- return /* @__PURE__ */ jsx(BaseIcon, {
843
- d: CircularArrows,
844
- ...props
845
- });
846
- };
847
- const CloseIcon = (props) => {
848
- return /* @__PURE__ */ jsx(BaseIcon, {
849
- d: Close,
850
- ...props
851
- });
852
- };
853
- const ContentCopyIcon = (props) => {
854
- return /* @__PURE__ */ jsx(BaseIcon, {
855
- d: ContentCopy,
856
- ...props
857
- });
858
- };
859
- const EditIcon = (props) => {
860
- return /* @__PURE__ */ jsx(BaseIcon, {
861
- d: Edit,
862
- ...props
863
- });
864
- };
865
- const ExpandMoreIcon = (props) => {
866
- return /* @__PURE__ */ jsx(BaseIcon, {
867
- d: ExpandMore,
868
- ...props
869
- });
870
- };
871
- const DeleteIcon = (props) => {
872
- return /* @__PURE__ */ jsx(BaseIcon, {
873
- d: Delete,
874
- ...props
875
- });
876
- };
877
- const objectLb = "{";
878
- const arrayLb = "[";
879
- const objectRb = "}";
880
- const arrayRb = "]";
881
- function inspectMetadata(value) {
882
- const length = getValueSize(value);
883
- let name = "";
884
- if (value instanceof Map || value instanceof Set) {
885
- name = value[Symbol.toStringTag];
886
- }
887
- if (Object.prototype.hasOwnProperty.call(value, Symbol.toStringTag)) {
888
- name = value[Symbol.toStringTag];
889
- }
890
- const itemsPluralized = length === 1 ? "Item" : "Items";
891
- return "".concat(length, " ").concat(itemsPluralized).concat(name ? " (".concat(name, ")") : "");
892
- }
893
- const PreObjectType = (props) => {
894
- const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
895
- const textColor = useTextColor();
896
- const isArrayLike = useMemo(() => Array.isArray(props.value) || props.value instanceof Set, [
897
- props.value
898
- ]);
899
- const isEmptyValue = useMemo(() => getValueSize(props.value) === 0, [
900
- props.value
901
- ]);
902
- const sizeOfValue = useMemo(() => inspectMetadata(props.value), [
903
- props.value
904
- ]);
905
- const displaySize = useJsonViewerStore((store) => store.displaySize);
906
- const shouldDisplaySize = useMemo(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
907
- displaySize,
908
- props.path,
909
- props.value
910
- ]);
911
- const isTrap = useIsCycleReference(props.path, props.value);
912
- return /* @__PURE__ */ jsxs(Box, {
913
- component: "span",
914
- className: "data-object-start",
915
- sx: {
916
- letterSpacing: 0.5
917
- },
918
- children: [
919
- isArrayLike ? arrayLb : objectLb,
920
- shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ jsx(Box, {
921
- component: "span",
922
- sx: {
923
- pl: 0.5,
924
- fontStyle: "italic",
925
- color: metadataColor,
926
- userSelect: "none"
927
- },
928
- children: sizeOfValue
929
- }),
930
- isTrap && !props.inspect && /* @__PURE__ */ jsxs(Fragment, {
931
- children: [
932
- /* @__PURE__ */ jsx(CircularArrowsIcon, {
933
- sx: {
934
- fontSize: 12,
935
- color: textColor,
936
- mx: 0.5
425
+ e2.exports = function(e3) {
426
+ for (var t3 = n2(e3), a3 = {}, r3 = Object.keys(t3), o2 = r3.length, i = 0; i < o2; i++) {
427
+ var l = r3[i];
428
+ null !== t3[l].parent && (a3[l] = s(l, t3));
429
+ }
430
+ return a3;
431
+ };
432
+ }, 4176: (e2) => {
433
+ e2.exports = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], grey: [128, 128, 128], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], rebeccapurple: [102, 51, 153], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] };
434
+ }, 4877: (e2) => {
435
+ e2.exports = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], grey: [128, 128, 128], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], rebeccapurple: [102, 51, 153], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] };
436
+ }, 6138: (e2, t2, a2) => {
437
+ var r2 = a2(4877), n2 = a2(301), o = Object.hasOwnProperty, s = /* @__PURE__ */ Object.create(null);
438
+ for (var i in r2) o.call(r2, i) && (s[r2[i]] = i);
439
+ var l = e2.exports = { to: {}, get: {} };
440
+ function c(e3, t3, a3) {
441
+ return Math.min(Math.max(t3, e3), a3);
442
+ }
443
+ function u(e3) {
444
+ var t3 = Math.round(e3).toString(16).toUpperCase();
445
+ return t3.length < 2 ? "0" + t3 : t3;
446
+ }
447
+ l.get = function(e3) {
448
+ var t3, a3;
449
+ switch (e3.substring(0, 3).toLowerCase()) {
450
+ case "hsl":
451
+ t3 = l.get.hsl(e3), a3 = "hsl";
452
+ break;
453
+ case "hwb":
454
+ t3 = l.get.hwb(e3), a3 = "hwb";
455
+ break;
456
+ default:
457
+ t3 = l.get.rgb(e3), a3 = "rgb";
458
+ }
459
+ return t3 ? { model: a3, value: t3 } : null;
460
+ }, l.get.rgb = function(e3) {
461
+ if (!e3) return null;
462
+ var t3, a3, n3, s2 = [0, 0, 0, 1];
463
+ if (t3 = e3.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)) {
464
+ for (n3 = t3[2], t3 = t3[1], a3 = 0; a3 < 3; a3++) {
465
+ var i2 = 2 * a3;
466
+ s2[a3] = parseInt(t3.slice(i2, i2 + 2), 16);
937
467
  }
938
- }),
939
- /* @__PURE__ */ jsx(DataBox, {
940
- sx: {
941
- cursor: "pointer",
942
- userSelect: "none"
943
- },
944
- children: isTrap
945
- })
946
- ]
947
- })
948
- ]
949
- });
950
- };
951
- const PostObjectType = (props) => {
952
- const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
953
- const textColor = useTextColor();
954
- const isArrayLike = useMemo(() => Array.isArray(props.value) || props.value instanceof Set, [
955
- props.value
956
- ]);
957
- const isEmptyValue = useMemo(() => getValueSize(props.value) === 0, [
958
- props.value
959
- ]);
960
- const sizeOfValue = useMemo(() => inspectMetadata(props.value), [
961
- props.value
962
- ]);
963
- const displaySize = useJsonViewerStore((store) => store.displaySize);
964
- const shouldDisplaySize = useMemo(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
965
- displaySize,
966
- props.path,
967
- props.value
968
- ]);
969
- return /* @__PURE__ */ jsxs(Box, {
970
- component: "span",
971
- className: "data-object-end",
972
- sx: {
973
- lineHeight: 1.5,
974
- color: textColor,
975
- letterSpacing: 0.5,
976
- opacity: 0.8
977
- },
978
- children: [
979
- isArrayLike ? arrayRb : objectRb,
980
- shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ jsx(Box, {
981
- component: "span",
982
- sx: {
983
- pl: 0.5,
984
- fontStyle: "italic",
985
- color: metadataColor,
986
- userSelect: "none"
987
- },
988
- children: sizeOfValue
989
- }) : null
990
- ]
991
- });
992
- };
993
- function getIterator(value) {
994
- return typeof (value === null || value === void 0 ? void 0 : value[Symbol.iterator]) === "function";
995
- }
996
- const ObjectType = (props) => {
997
- const keyColor = useTextColor();
998
- const borderColor = useJsonViewerStore((store) => store.colorspace.base02);
999
- const groupArraysAfterLength = useJsonViewerStore((store) => store.groupArraysAfterLength);
1000
- const isTrap = useIsCycleReference(props.path, props.value);
1001
- const [displayLength, setDisplayLength] = useState(useJsonViewerStore((store) => store.maxDisplayLength));
1002
- const objectSortKeys = useJsonViewerStore((store) => store.objectSortKeys);
1003
- const elements = useMemo(() => {
1004
- if (!props.inspect) {
1005
- return null;
1006
- }
1007
- const value = props.value;
1008
- const iterator = getIterator(value);
1009
- if (iterator && !Array.isArray(value)) {
1010
- const elements3 = [];
1011
- if (value instanceof Map) {
1012
- const lastIndex2 = value.size - 1;
1013
- let index = 0;
1014
- value.forEach((value2, k) => {
1015
- const key = k.toString();
1016
- const path = [
1017
- ...props.path,
1018
- key
1019
- ];
1020
- elements3.push(/* @__PURE__ */ jsx(DataKeyPair, {
1021
- path,
1022
- value: value2,
1023
- prevValue: props.prevValue instanceof Map ? props.prevValue.get(k) : void 0,
1024
- editable: false,
1025
- last: index === lastIndex2
1026
- }, key));
1027
- index++;
468
+ n3 && (s2[3] = parseInt(n3, 16) / 255);
469
+ } else if (t3 = e3.match(/^#([a-f0-9]{3,4})$/i)) {
470
+ for (n3 = (t3 = t3[1])[3], a3 = 0; a3 < 3; a3++) s2[a3] = parseInt(t3[a3] + t3[a3], 16);
471
+ n3 && (s2[3] = parseInt(n3 + n3, 16) / 255);
472
+ } else if (t3 = e3.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)) {
473
+ for (a3 = 0; a3 < 3; a3++) s2[a3] = parseInt(t3[a3 + 1], 0);
474
+ t3[4] && (t3[5] ? s2[3] = 0.01 * parseFloat(t3[4]) : s2[3] = parseFloat(t3[4]));
475
+ } else {
476
+ if (!(t3 = e3.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))) return (t3 = e3.match(/^(\w+)$/)) ? "transparent" === t3[1] ? [0, 0, 0, 0] : o.call(r2, t3[1]) ? ((s2 = r2[t3[1]])[3] = 1, s2) : null : null;
477
+ for (a3 = 0; a3 < 3; a3++) s2[a3] = Math.round(2.55 * parseFloat(t3[a3 + 1]));
478
+ t3[4] && (t3[5] ? s2[3] = 0.01 * parseFloat(t3[4]) : s2[3] = parseFloat(t3[4]));
479
+ }
480
+ for (a3 = 0; a3 < 3; a3++) s2[a3] = c(s2[a3], 0, 255);
481
+ return s2[3] = c(s2[3], 0, 1), s2;
482
+ }, l.get.hsl = function(e3) {
483
+ if (!e3) return null;
484
+ var t3 = e3.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);
485
+ if (t3) {
486
+ var a3 = parseFloat(t3[4]);
487
+ return [(parseFloat(t3[1]) % 360 + 360) % 360, c(parseFloat(t3[2]), 0, 100), c(parseFloat(t3[3]), 0, 100), c(isNaN(a3) ? 1 : a3, 0, 1)];
488
+ }
489
+ return null;
490
+ }, l.get.hwb = function(e3) {
491
+ if (!e3) return null;
492
+ var t3 = e3.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);
493
+ if (t3) {
494
+ var a3 = parseFloat(t3[4]);
495
+ return [(parseFloat(t3[1]) % 360 + 360) % 360, c(parseFloat(t3[2]), 0, 100), c(parseFloat(t3[3]), 0, 100), c(isNaN(a3) ? 1 : a3, 0, 1)];
496
+ }
497
+ return null;
498
+ }, l.to.hex = function() {
499
+ var e3 = n2(arguments);
500
+ return "#" + u(e3[0]) + u(e3[1]) + u(e3[2]) + (e3[3] < 1 ? u(Math.round(255 * e3[3])) : "");
501
+ }, l.to.rgb = function() {
502
+ var e3 = n2(arguments);
503
+ return e3.length < 4 || 1 === e3[3] ? "rgb(" + Math.round(e3[0]) + ", " + Math.round(e3[1]) + ", " + Math.round(e3[2]) + ")" : "rgba(" + Math.round(e3[0]) + ", " + Math.round(e3[1]) + ", " + Math.round(e3[2]) + ", " + e3[3] + ")";
504
+ }, l.to.rgb.percent = function() {
505
+ var e3 = n2(arguments), t3 = Math.round(e3[0] / 255 * 100), a3 = Math.round(e3[1] / 255 * 100), r3 = Math.round(e3[2] / 255 * 100);
506
+ return e3.length < 4 || 1 === e3[3] ? "rgb(" + t3 + "%, " + a3 + "%, " + r3 + "%)" : "rgba(" + t3 + "%, " + a3 + "%, " + r3 + "%, " + e3[3] + ")";
507
+ }, l.to.hsl = function() {
508
+ var e3 = n2(arguments);
509
+ return e3.length < 4 || 1 === e3[3] ? "hsl(" + e3[0] + ", " + e3[1] + "%, " + e3[2] + "%)" : "hsla(" + e3[0] + ", " + e3[1] + "%, " + e3[2] + "%, " + e3[3] + ")";
510
+ }, l.to.hwb = function() {
511
+ var e3 = n2(arguments), t3 = "";
512
+ return e3.length >= 4 && 1 !== e3[3] && (t3 = ", " + e3[3]), "hwb(" + e3[0] + ", " + e3[1] + "%, " + e3[2] + "%" + t3 + ")";
513
+ }, l.to.keyword = function(e3) {
514
+ return s[e3.slice(0, 3)];
515
+ };
516
+ }, 3639: (e2, t2, a2) => {
517
+ var r2 = a2(6138), n2 = a2(4732), o = [].slice, s = ["keyword", "gray", "hex"], i = {};
518
+ Object.keys(n2).forEach(function(e3) {
519
+ i[o.call(n2[e3].labels).sort().join("")] = e3;
1028
520
  });
1029
- } else {
1030
- const iterator2 = value[Symbol.iterator]();
1031
- let result = iterator2.next();
1032
- let count = 0;
1033
- while (true) {
1034
- const nextResult = iterator2.next();
1035
- var _nextResult_done;
1036
- elements3.push(/* @__PURE__ */ jsx(DataKeyPair, {
1037
- path: [
1038
- ...props.path,
1039
- "iterator:".concat(count)
1040
- ],
1041
- value: result.value,
1042
- nestedIndex: count,
1043
- editable: false,
1044
- last: (_nextResult_done = nextResult.done) !== null && _nextResult_done !== void 0 ? _nextResult_done : false
1045
- }, count));
1046
- if (nextResult.done) {
1047
- break;
1048
- }
1049
- count++;
1050
- result = nextResult;
521
+ var l = {};
522
+ function c(e3, t3) {
523
+ if (!(this instanceof c)) return new c(e3, t3);
524
+ if (t3 && t3 in s && (t3 = null), t3 && !(t3 in n2)) throw new Error("Unknown model: " + t3);
525
+ var a3, u2;
526
+ if (null == e3) this.model = "rgb", this.color = [0, 0, 0], this.valpha = 1;
527
+ else if (e3 instanceof c) this.model = e3.model, this.color = e3.color.slice(), this.valpha = e3.valpha;
528
+ else if ("string" == typeof e3) {
529
+ var d2 = r2.get(e3);
530
+ if (null === d2) throw new Error("Unable to parse color from string: " + e3);
531
+ this.model = d2.model, u2 = n2[this.model].channels, this.color = d2.value.slice(0, u2), this.valpha = "number" == typeof d2.value[u2] ? d2.value[u2] : 1;
532
+ } else if (e3.length) {
533
+ this.model = t3 || "rgb", u2 = n2[this.model].channels;
534
+ var p = o.call(e3, 0, u2);
535
+ this.color = b(p, u2), this.valpha = "number" == typeof e3[u2] ? e3[u2] : 1;
536
+ } else if ("number" == typeof e3) e3 &= 16777215, this.model = "rgb", this.color = [e3 >> 16 & 255, e3 >> 8 & 255, 255 & e3], this.valpha = 1;
537
+ else {
538
+ this.valpha = 1;
539
+ var f = Object.keys(e3);
540
+ "alpha" in e3 && (f.splice(f.indexOf("alpha"), 1), this.valpha = "number" == typeof e3.alpha ? e3.alpha : 0);
541
+ var h = f.sort().join("");
542
+ if (!(h in i)) throw new Error("Unable to parse color from object: " + JSON.stringify(e3));
543
+ this.model = i[h];
544
+ var m = n2[this.model].labels, v = [];
545
+ for (a3 = 0; a3 < m.length; a3++) v.push(e3[m[a3]]);
546
+ this.color = b(v);
547
+ }
548
+ if (l[this.model]) for (u2 = n2[this.model].channels, a3 = 0; a3 < u2; a3++) {
549
+ var g = l[this.model][a3];
550
+ g && (this.color[a3] = g(this.color[a3]));
551
+ }
552
+ this.valpha = Math.max(0, Math.min(1, this.valpha)), Object.freeze && Object.freeze(this);
1051
553
  }
1052
- }
1053
- return elements3;
1054
- }
1055
- if (Array.isArray(value)) {
1056
- const lastIndex2 = value.length - 1;
1057
- if (value.length <= groupArraysAfterLength) {
1058
- const elements4 = value.slice(0, displayLength).map((value2, _index) => {
1059
- const index = props.nestedIndex ? props.nestedIndex * groupArraysAfterLength + _index : _index;
1060
- const path = [
1061
- ...props.path,
1062
- index
1063
- ];
1064
- return /* @__PURE__ */ jsx(DataKeyPair, {
1065
- path,
1066
- value: value2,
1067
- prevValue: Array.isArray(props.prevValue) ? props.prevValue[index] : void 0,
1068
- last: _index === lastIndex2
1069
- }, index);
1070
- });
1071
- if (value.length > displayLength) {
1072
- const rest = value.length - displayLength;
1073
- elements4.push(/* @__PURE__ */ jsxs(DataBox, {
1074
- sx: {
1075
- cursor: "pointer",
1076
- lineHeight: 1.5,
1077
- color: keyColor,
1078
- letterSpacing: 0.5,
1079
- opacity: 0.8,
1080
- userSelect: "none"
1081
- },
1082
- onClick: () => setDisplayLength((length) => length * 2),
1083
- children: [
1084
- "hidden ",
1085
- rest,
1086
- " items…"
1087
- ]
1088
- }, "last"));
1089
- }
1090
- return elements4;
1091
- }
1092
- const elements3 = segmentArray(value, groupArraysAfterLength);
1093
- const prevElements = Array.isArray(props.prevValue) ? segmentArray(props.prevValue, groupArraysAfterLength) : void 0;
1094
- const elementsLastIndex = elements3.length - 1;
1095
- return elements3.map((list, index) => {
1096
- return /* @__PURE__ */ jsx(DataKeyPair, {
1097
- path: props.path,
1098
- value: list,
1099
- nestedIndex: index,
1100
- prevValue: prevElements === null || prevElements === void 0 ? void 0 : prevElements[index],
1101
- last: index === elementsLastIndex
1102
- }, index);
1103
- });
1104
- }
1105
- let entries = Object.entries(value);
1106
- if (objectSortKeys) {
1107
- entries = objectSortKeys === true ? entries.sort((param, param1) => {
1108
- let [a] = param, [b] = param1;
1109
- return a.localeCompare(b);
1110
- }) : entries.sort((param, param1) => {
1111
- let [a] = param, [b] = param1;
1112
- return objectSortKeys(a, b);
1113
- });
1114
- }
1115
- const lastIndex = entries.length - 1;
1116
- const elements2 = entries.slice(0, displayLength).map((param, index) => {
1117
- let [key, value2] = param;
1118
- var _props_prevValue;
1119
- const path = [
1120
- ...props.path,
1121
- key
1122
- ];
1123
- return /* @__PURE__ */ jsx(DataKeyPair, {
1124
- path,
1125
- value: value2,
1126
- prevValue: (_props_prevValue = props.prevValue) === null || _props_prevValue === void 0 ? void 0 : _props_prevValue[key],
1127
- last: index === lastIndex
1128
- }, key);
1129
- });
1130
- if (entries.length > displayLength) {
1131
- const rest = entries.length - displayLength;
1132
- elements2.push(/* @__PURE__ */ jsxs(DataBox, {
1133
- sx: {
1134
- cursor: "pointer",
1135
- lineHeight: 1.5,
1136
- color: keyColor,
1137
- letterSpacing: 0.5,
1138
- opacity: 0.8,
1139
- userSelect: "none"
1140
- },
1141
- onClick: () => setDisplayLength((length) => length * 2),
1142
- children: [
1143
- "hidden ",
1144
- rest,
1145
- " items…"
1146
- ]
1147
- }, "last"));
1148
- }
1149
- return elements2;
1150
- }, [
1151
- props.inspect,
1152
- props.value,
1153
- props.prevValue,
1154
- props.path,
1155
- props.nestedIndex,
1156
- groupArraysAfterLength,
1157
- displayLength,
1158
- keyColor,
1159
- objectSortKeys
1160
- ]);
1161
- const marginLeft = props.inspect ? 0.6 : 0;
1162
- const width = useJsonViewerStore((store) => store.indentWidth);
1163
- const indentWidth = props.inspect ? width - marginLeft : width;
1164
- const isEmptyValue = useMemo(() => getValueSize(props.value) === 0, [
1165
- props.value
1166
- ]);
1167
- if (isEmptyValue) {
1168
- return null;
1169
- }
1170
- return /* @__PURE__ */ jsx(Box, {
1171
- className: "data-object",
1172
- sx: {
1173
- display: props.inspect ? "block" : "inline-block",
1174
- pl: props.inspect ? indentWidth - 0.6 : 0,
1175
- marginLeft,
1176
- color: keyColor,
1177
- borderLeft: props.inspect ? "1px solid ".concat(borderColor) : "none"
1178
- },
1179
- children: props.inspect ? elements : !isTrap && /* @__PURE__ */ jsx(Box, {
1180
- component: "span",
1181
- className: "data-object-body",
1182
- onClick: () => props.setInspect(true),
1183
- sx: {
1184
- "&:hover": {
1185
- cursor: "pointer"
1186
- },
1187
- padding: 0.5,
1188
- userSelect: "none"
1189
- },
1190
- children: "…"
1191
- })
1192
- });
1193
- };
1194
- const objectType = {
1195
- is: (value) => typeof value === "object",
1196
- Component: ObjectType,
1197
- PreComponent: PreObjectType,
1198
- PostComponent: PostObjectType
1199
- };
1200
- const stringType = defineEasyType({
1201
- is: (value) => typeof value === "string",
1202
- type: "string",
1203
- colorKey: "base09",
1204
- serialize: (value) => value,
1205
- deserialize: (value) => value,
1206
- Renderer: (props) => {
1207
- const [showRest, setShowRest] = useState(false);
1208
- const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
1209
- const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
1210
- const hasRest = props.value.length > collapseStringsAfterLength;
1211
- return /* @__PURE__ */ jsxs(Box, {
1212
- component: "span",
1213
- sx: {
1214
- overflowWrap: "anywhere",
1215
- cursor: hasRest ? "pointer" : "inherit"
1216
- },
1217
- onClick: () => {
1218
- var _window_getSelection;
1219
- if (((_window_getSelection = window.getSelection()) === null || _window_getSelection === void 0 ? void 0 : _window_getSelection.type) === "Range") {
1220
- return;
1221
- }
1222
- if (hasRest) {
1223
- setShowRest((value2) => !value2);
1224
- }
1225
- },
1226
- children: [
1227
- '"',
1228
- value,
1229
- hasRest && !showRest && /* @__PURE__ */ jsx(Box, {
1230
- component: "span",
1231
- sx: {
1232
- padding: 0.5
1233
- },
1234
- children: "…"
1235
- }),
1236
- '"'
1237
- ]
1238
- });
1239
- }
1240
- });
1241
- const undefinedType = defineEasyType({
1242
- is: (value) => value === void 0,
1243
- type: "undefined",
1244
- colorKey: "base05",
1245
- displayTypeLabel: false,
1246
- Renderer: () => {
1247
- const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
1248
- return /* @__PURE__ */ jsx(Box, {
1249
- sx: {
1250
- fontSize: "0.7rem",
1251
- backgroundColor,
1252
- borderRadius: "3px",
1253
- padding: "0.5px 2px"
1254
- },
1255
- children: "undefined"
1256
- });
1257
- }
1258
- });
1259
- function memorizeDataType(dataType) {
1260
- function compare(prevProps, nextProps) {
1261
- var _prevProps_path, _nextProps_path;
1262
- return Object.is(prevProps.value, nextProps.value) && prevProps.inspect && nextProps.inspect && ((_prevProps_path = prevProps.path) === null || _prevProps_path === void 0 ? void 0 : _prevProps_path.join(".")) === ((_nextProps_path = nextProps.path) === null || _nextProps_path === void 0 ? void 0 : _nextProps_path.join("."));
1263
- }
1264
- dataType.Component = /* @__PURE__ */ memo(dataType.Component, compare);
1265
- if (dataType.Editor) {
1266
- dataType.Editor = /* @__PURE__ */ memo(dataType.Editor, function compare2(prevProps, nextProps) {
1267
- return Object.is(prevProps.value, nextProps.value);
1268
- });
1269
- }
1270
- if (dataType.PreComponent) {
1271
- dataType.PreComponent = /* @__PURE__ */ memo(dataType.PreComponent, compare);
1272
- }
1273
- if (dataType.PostComponent) {
1274
- dataType.PostComponent = /* @__PURE__ */ memo(dataType.PostComponent, compare);
1275
- }
1276
- return dataType;
1277
- }
1278
- const predefinedTypes = [
1279
- memorizeDataType(booleanType),
1280
- memorizeDataType(dateType),
1281
- memorizeDataType(nullType),
1282
- memorizeDataType(undefinedType),
1283
- memorizeDataType(stringType),
1284
- memorizeDataType(functionType),
1285
- memorizeDataType(nanType),
1286
- memorizeDataType(intType),
1287
- memorizeDataType(floatType),
1288
- memorizeDataType(bigIntType)
1289
- ];
1290
- const createTypeRegistryStore = () => {
1291
- return createStore()((set) => ({
1292
- registry: predefinedTypes,
1293
- registerTypes: (setState) => {
1294
- set((state) => ({
1295
- registry: typeof setState === "function" ? setState(state.registry) : setState
1296
- }));
1297
- }
1298
- }));
1299
- };
1300
- const TypeRegistryStoreContext = /* @__PURE__ */ createContext(void 0);
1301
- TypeRegistryStoreContext.Provider;
1302
- const useTypeRegistryStore = (selector, equalityFn) => {
1303
- const store = useContext(TypeRegistryStoreContext);
1304
- return useStore(store, selector, equalityFn);
1305
- };
1306
- function matchTypeComponents(value, path, registry) {
1307
- let potential;
1308
- for (const T of registry) {
1309
- if (T.is(value, path)) {
1310
- potential = T;
1311
- }
1312
- }
1313
- if (potential === void 0) {
1314
- if (typeof value === "object") {
1315
- return objectType;
1316
- }
1317
- throw new Error("No type matched for value: ".concat(value));
1318
- }
1319
- return potential;
1320
- }
1321
- function useTypeComponents(value, path) {
1322
- const registry = useTypeRegistryStore((store) => store.registry);
1323
- return useMemo(() => matchTypeComponents(value, path, registry), [
1324
- value,
1325
- path,
1326
- registry
1327
- ]);
1328
- }
1329
- const IconBox = (props) => /* @__PURE__ */ jsx(Box, {
1330
- component: "span",
1331
- ...props,
1332
- sx: {
1333
- cursor: "pointer",
1334
- paddingLeft: "0.7rem",
1335
- ...props.sx
1336
- }
1337
- });
1338
- const DataKeyPair = (props) => {
1339
- const { value, prevValue, path, nestedIndex, last } = props;
1340
- const { Component, PreComponent, PostComponent, Editor, serialize, deserialize } = useTypeComponents(value, path);
1341
- var _props_editable;
1342
- const propsEditable = (_props_editable = props.editable) !== null && _props_editable !== void 0 ? _props_editable : void 0;
1343
- const storeEditable = useJsonViewerStore((store) => store.editable);
1344
- const editable = useMemo(() => {
1345
- if (storeEditable === false) {
1346
- return false;
1347
- }
1348
- if (propsEditable === false) {
1349
- return false;
1350
- }
1351
- if (typeof storeEditable === "function") {
1352
- return !!storeEditable(path, value);
1353
- }
1354
- return storeEditable;
1355
- }, [
1356
- path,
1357
- propsEditable,
1358
- storeEditable,
1359
- value
1360
- ]);
1361
- const [tempValue, setTempValue] = useState("");
1362
- const depth = path.length;
1363
- const key = path[depth - 1];
1364
- const hoverPath = useJsonViewerStore((store) => store.hoverPath);
1365
- const isHover = useMemo(() => {
1366
- return hoverPath && path.every((value2, index) => value2 === hoverPath.path[index] && nestedIndex === hoverPath.nestedIndex);
1367
- }, [
1368
- hoverPath,
1369
- path,
1370
- nestedIndex
1371
- ]);
1372
- const setHover = useJsonViewerStore((store) => store.setHover);
1373
- const root = useJsonViewerStore((store) => store.value);
1374
- const [inspect, setInspect] = useInspect(path, value, nestedIndex);
1375
- const [editing, setEditing] = useState(false);
1376
- const onChange = useJsonViewerStore((store) => store.onChange);
1377
- const keyColor = useTextColor();
1378
- const numberKeyColor = useJsonViewerStore((store) => store.colorspace.base0C);
1379
- const highlightColor = useJsonViewerStore((store) => store.colorspace.base0A);
1380
- const displayComma = useJsonViewerStore((store) => store.displayComma);
1381
- const quotesOnKeys = useJsonViewerStore((store) => store.quotesOnKeys);
1382
- const rootName = useJsonViewerStore((store) => store.rootName);
1383
- const isRoot = root === value;
1384
- const isNumberKey = Number.isInteger(Number(key));
1385
- const storeEnableAdd = useJsonViewerStore((store) => store.enableAdd);
1386
- const onAdd = useJsonViewerStore((store) => store.onAdd);
1387
- const enableAdd = useMemo(() => {
1388
- if (!onAdd || nestedIndex !== void 0) return false;
1389
- if (storeEnableAdd === false) {
1390
- return false;
1391
- }
1392
- if (propsEditable === false) {
1393
- return false;
1394
- }
1395
- if (typeof storeEnableAdd === "function") {
1396
- return !!storeEnableAdd(path, value);
1397
- }
1398
- if (Array.isArray(value) || isPlainObject(value)) {
1399
- return true;
1400
- }
1401
- return false;
1402
- }, [
1403
- onAdd,
1404
- nestedIndex,
1405
- path,
1406
- storeEnableAdd,
1407
- propsEditable,
1408
- value
1409
- ]);
1410
- const storeEnableDelete = useJsonViewerStore((store) => store.enableDelete);
1411
- const onDelete = useJsonViewerStore((store) => store.onDelete);
1412
- const enableDelete = useMemo(() => {
1413
- if (!onDelete || nestedIndex !== void 0) return false;
1414
- if (isRoot) {
1415
- return false;
1416
- }
1417
- if (storeEnableDelete === false) {
1418
- return false;
1419
- }
1420
- if (propsEditable === false) {
1421
- return false;
1422
- }
1423
- if (typeof storeEnableDelete === "function") {
1424
- return !!storeEnableDelete(path, value);
1425
- }
1426
- return storeEnableDelete;
1427
- }, [
1428
- onDelete,
1429
- nestedIndex,
1430
- isRoot,
1431
- path,
1432
- storeEnableDelete,
1433
- propsEditable,
1434
- value
1435
- ]);
1436
- const enableClipboard = useJsonViewerStore((store) => store.enableClipboard);
1437
- const { copy, copied } = useClipboard();
1438
- const highlightUpdates = useJsonViewerStore((store) => store.highlightUpdates);
1439
- const isHighlight = useMemo(() => {
1440
- if (!highlightUpdates || prevValue === void 0) return false;
1441
- if (typeof value !== typeof prevValue) {
1442
- return true;
1443
- }
1444
- if (typeof value === "number") {
1445
- if (isNaN(value) && isNaN(prevValue)) return false;
1446
- return value !== prevValue;
1447
- }
1448
- if (Array.isArray(value) !== Array.isArray(prevValue)) {
1449
- return true;
1450
- }
1451
- if (typeof value === "object" || typeof value === "function") {
1452
- return false;
1453
- }
1454
- if (value !== prevValue) {
1455
- return true;
1456
- }
1457
- return false;
1458
- }, [
1459
- highlightUpdates,
1460
- prevValue,
1461
- value
1462
- ]);
1463
- const highlightContainer = useRef();
1464
- useEffect(() => {
1465
- if (highlightContainer.current && isHighlight && "animate" in highlightContainer.current) {
1466
- highlightContainer.current.animate([
1467
- {
1468
- backgroundColor: highlightColor
1469
- },
1470
- {
1471
- backgroundColor: ""
1472
- }
1473
- ], {
1474
- duration: 1e3,
1475
- easing: "ease-in"
1476
- });
1477
- }
1478
- }, [
1479
- highlightColor,
1480
- isHighlight,
1481
- prevValue,
1482
- value
1483
- ]);
1484
- const startEditing = useCallback((event) => {
1485
- event.preventDefault();
1486
- if (serialize) setTempValue(serialize(value));
1487
- setEditing(true);
1488
- }, [
1489
- serialize,
1490
- value
1491
- ]);
1492
- const abortEditing = useCallback(() => {
1493
- setEditing(false);
1494
- setTempValue("");
1495
- }, [
1496
- setEditing,
1497
- setTempValue
1498
- ]);
1499
- const commitEditing = useCallback((newValue) => {
1500
- setEditing(false);
1501
- if (!deserialize) return;
1502
- try {
1503
- onChange(path, value, deserialize(newValue));
1504
- } catch {
1505
- }
1506
- }, [
1507
- setEditing,
1508
- deserialize,
1509
- onChange,
1510
- path,
1511
- value
1512
- ]);
1513
- const actionIcons = useMemo(() => {
1514
- if (editing) {
1515
- return /* @__PURE__ */ jsxs(Fragment, {
1516
- children: [
1517
- /* @__PURE__ */ jsx(IconBox, {
1518
- children: /* @__PURE__ */ jsx(CloseIcon, {
1519
- sx: {
1520
- fontSize: ".8rem"
1521
- },
1522
- onClick: abortEditing
1523
- })
1524
- }),
1525
- /* @__PURE__ */ jsx(IconBox, {
1526
- children: /* @__PURE__ */ jsx(CheckIcon, {
1527
- sx: {
1528
- fontSize: ".8rem"
1529
- },
1530
- onClick: () => commitEditing(tempValue)
1531
- })
1532
- })
1533
- ]
1534
- });
1535
- }
1536
- return /* @__PURE__ */ jsxs(Fragment, {
1537
- children: [
1538
- enableClipboard && /* @__PURE__ */ jsx(IconBox, {
1539
- onClick: (event) => {
1540
- event.preventDefault();
1541
- try {
1542
- copy(path, value, copyString);
1543
- } catch (e) {
1544
- console.error(e);
554
+ function u(e3, t3, a3) {
555
+ return (e3 = Array.isArray(e3) ? e3 : [e3]).forEach(function(e4) {
556
+ (l[e4] || (l[e4] = []))[t3] = a3;
557
+ }), e3 = e3[0], function(r3) {
558
+ var n3;
559
+ return arguments.length ? (a3 && (r3 = a3(r3)), (n3 = this[e3]()).color[t3] = r3, n3) : (n3 = this[e3]().color[t3], a3 && (n3 = a3(n3)), n3);
560
+ };
561
+ }
562
+ function d(e3) {
563
+ return function(t3) {
564
+ return Math.max(0, Math.min(e3, t3));
565
+ };
566
+ }
567
+ function b(e3, t3) {
568
+ for (var a3 = 0; a3 < t3; a3++) "number" != typeof e3[a3] && (e3[a3] = 0);
569
+ return e3;
570
+ }
571
+ c.prototype = { toString: function() {
572
+ return this.string();
573
+ }, toJSON: function() {
574
+ return this[this.model]();
575
+ }, string: function(e3) {
576
+ var t3 = this.model in r2.to ? this : this.rgb(), a3 = 1 === (t3 = t3.round("number" == typeof e3 ? e3 : 1)).valpha ? t3.color : t3.color.concat(this.valpha);
577
+ return r2.to[t3.model](a3);
578
+ }, percentString: function(e3) {
579
+ var t3 = this.rgb().round("number" == typeof e3 ? e3 : 1), a3 = 1 === t3.valpha ? t3.color : t3.color.concat(this.valpha);
580
+ return r2.to.rgb.percent(a3);
581
+ }, array: function() {
582
+ return 1 === this.valpha ? this.color.slice() : this.color.concat(this.valpha);
583
+ }, object: function() {
584
+ for (var e3 = {}, t3 = n2[this.model].channels, a3 = n2[this.model].labels, r3 = 0; r3 < t3; r3++) e3[a3[r3]] = this.color[r3];
585
+ return 1 !== this.valpha && (e3.alpha = this.valpha), e3;
586
+ }, unitArray: function() {
587
+ var e3 = this.rgb().color;
588
+ return e3[0] /= 255, e3[1] /= 255, e3[2] /= 255, 1 !== this.valpha && e3.push(this.valpha), e3;
589
+ }, unitObject: function() {
590
+ var e3 = this.rgb().object();
591
+ return e3.r /= 255, e3.g /= 255, e3.b /= 255, 1 !== this.valpha && (e3.alpha = this.valpha), e3;
592
+ }, round: function(e3) {
593
+ return e3 = Math.max(e3 || 0, 0), new c(this.color.map(/* @__PURE__ */ function(e4) {
594
+ return function(t3) {
595
+ return function(e5, t4) {
596
+ return Number(e5.toFixed(t4));
597
+ }(t3, e4);
598
+ };
599
+ }(e3)).concat(this.valpha), this.model);
600
+ }, alpha: function(e3) {
601
+ return arguments.length ? new c(this.color.concat(Math.max(0, Math.min(1, e3))), this.model) : this.valpha;
602
+ }, red: u("rgb", 0, d(255)), green: u("rgb", 1, d(255)), blue: u("rgb", 2, d(255)), hue: u(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, function(e3) {
603
+ return (e3 % 360 + 360) % 360;
604
+ }), saturationl: u("hsl", 1, d(100)), lightness: u("hsl", 2, d(100)), saturationv: u("hsv", 1, d(100)), value: u("hsv", 2, d(100)), chroma: u("hcg", 1, d(100)), gray: u("hcg", 2, d(100)), white: u("hwb", 1, d(100)), wblack: u("hwb", 2, d(100)), cyan: u("cmyk", 0, d(100)), magenta: u("cmyk", 1, d(100)), yellow: u("cmyk", 2, d(100)), black: u("cmyk", 3, d(100)), x: u("xyz", 0, d(100)), y: u("xyz", 1, d(100)), z: u("xyz", 2, d(100)), l: u("lab", 0, d(100)), a: u("lab", 1), b: u("lab", 2), keyword: function(e3) {
605
+ return arguments.length ? new c(e3) : n2[this.model].keyword(this.color);
606
+ }, hex: function(e3) {
607
+ return arguments.length ? new c(e3) : r2.to.hex(this.rgb().round().color);
608
+ }, rgbNumber: function() {
609
+ var e3 = this.rgb().color;
610
+ return (255 & e3[0]) << 16 | (255 & e3[1]) << 8 | 255 & e3[2];
611
+ }, luminosity: function() {
612
+ for (var e3 = this.rgb().color, t3 = [], a3 = 0; a3 < e3.length; a3++) {
613
+ var r3 = e3[a3] / 255;
614
+ t3[a3] = r3 <= 0.03928 ? r3 / 12.92 : Math.pow((r3 + 0.055) / 1.055, 2.4);
615
+ }
616
+ return 0.2126 * t3[0] + 0.7152 * t3[1] + 0.0722 * t3[2];
617
+ }, contrast: function(e3) {
618
+ var t3 = this.luminosity(), a3 = e3.luminosity();
619
+ return t3 > a3 ? (t3 + 0.05) / (a3 + 0.05) : (a3 + 0.05) / (t3 + 0.05);
620
+ }, level: function(e3) {
621
+ var t3 = this.contrast(e3);
622
+ return t3 >= 7.1 ? "AAA" : t3 >= 4.5 ? "AA" : "";
623
+ }, isDark: function() {
624
+ var e3 = this.rgb().color;
625
+ return (299 * e3[0] + 587 * e3[1] + 114 * e3[2]) / 1e3 < 128;
626
+ }, isLight: function() {
627
+ return !this.isDark();
628
+ }, negate: function() {
629
+ for (var e3 = this.rgb(), t3 = 0; t3 < 3; t3++) e3.color[t3] = 255 - e3.color[t3];
630
+ return e3;
631
+ }, lighten: function(e3) {
632
+ var t3 = this.hsl();
633
+ return t3.color[2] += t3.color[2] * e3, t3;
634
+ }, darken: function(e3) {
635
+ var t3 = this.hsl();
636
+ return t3.color[2] -= t3.color[2] * e3, t3;
637
+ }, saturate: function(e3) {
638
+ var t3 = this.hsl();
639
+ return t3.color[1] += t3.color[1] * e3, t3;
640
+ }, desaturate: function(e3) {
641
+ var t3 = this.hsl();
642
+ return t3.color[1] -= t3.color[1] * e3, t3;
643
+ }, whiten: function(e3) {
644
+ var t3 = this.hwb();
645
+ return t3.color[1] += t3.color[1] * e3, t3;
646
+ }, blacken: function(e3) {
647
+ var t3 = this.hwb();
648
+ return t3.color[2] += t3.color[2] * e3, t3;
649
+ }, grayscale: function() {
650
+ var e3 = this.rgb().color, t3 = 0.3 * e3[0] + 0.59 * e3[1] + 0.11 * e3[2];
651
+ return c.rgb(t3, t3, t3);
652
+ }, fade: function(e3) {
653
+ return this.alpha(this.valpha - this.valpha * e3);
654
+ }, opaquer: function(e3) {
655
+ return this.alpha(this.valpha + this.valpha * e3);
656
+ }, rotate: function(e3) {
657
+ var t3 = this.hsl(), a3 = t3.color[0];
658
+ return a3 = (a3 = (a3 + e3) % 360) < 0 ? 360 + a3 : a3, t3.color[0] = a3, t3;
659
+ }, mix: function(e3, t3) {
660
+ if (!e3 || !e3.rgb) throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof e3);
661
+ var a3 = e3.rgb(), r3 = this.rgb(), n3 = void 0 === t3 ? 0.5 : t3, o2 = 2 * n3 - 1, s2 = a3.alpha() - r3.alpha(), i2 = ((o2 * s2 == -1 ? o2 : (o2 + s2) / (1 + o2 * s2)) + 1) / 2, l2 = 1 - i2;
662
+ return c.rgb(i2 * a3.red() + l2 * r3.red(), i2 * a3.green() + l2 * r3.green(), i2 * a3.blue() + l2 * r3.blue(), a3.alpha() * n3 + r3.alpha() * (1 - n3));
663
+ } }, Object.keys(n2).forEach(function(e3) {
664
+ if (-1 === s.indexOf(e3)) {
665
+ var t3 = n2[e3].channels;
666
+ c.prototype[e3] = function() {
667
+ if (this.model === e3) return new c(this);
668
+ if (arguments.length) return new c(arguments, e3);
669
+ var a3, r3 = "number" == typeof arguments[t3] ? t3 : this.valpha;
670
+ return new c((a3 = n2[this.model][e3].raw(this.color), Array.isArray(a3) ? a3 : [a3]).concat(r3), e3);
671
+ }, c[e3] = function(a3) {
672
+ return "number" == typeof a3 && (a3 = b(o.call(arguments), t3)), new c(a3, e3);
673
+ };
674
+ }
675
+ }), e2.exports = c;
676
+ }, 9784: (e2) => {
677
+ var t2, a2 = "object" == typeof Reflect ? Reflect : null, r2 = a2 && "function" == typeof a2.apply ? a2.apply : function(e3, t3, a3) {
678
+ return Function.prototype.apply.call(e3, t3, a3);
679
+ };
680
+ t2 = a2 && "function" == typeof a2.ownKeys ? a2.ownKeys : Object.getOwnPropertySymbols ? function(e3) {
681
+ return Object.getOwnPropertyNames(e3).concat(Object.getOwnPropertySymbols(e3));
682
+ } : function(e3) {
683
+ return Object.getOwnPropertyNames(e3);
684
+ };
685
+ var n2 = Number.isNaN || function(e3) {
686
+ return e3 != e3;
687
+ };
688
+ function o() {
689
+ o.init.call(this);
690
+ }
691
+ e2.exports = o, e2.exports.once = function(e3, t3) {
692
+ return new Promise(function(a3, r3) {
693
+ function n3(a4) {
694
+ e3.removeListener(t3, o2), r3(a4);
695
+ }
696
+ function o2() {
697
+ "function" == typeof e3.removeListener && e3.removeListener("error", n3), a3([].slice.call(arguments));
698
+ }
699
+ h(e3, t3, o2, { once: true }), "error" !== t3 && function(e4, t4, a4) {
700
+ "function" == typeof e4.on && h(e4, "error", t4, a4);
701
+ }(e3, n3, { once: true });
702
+ });
703
+ }, o.EventEmitter = o, o.prototype._events = void 0, o.prototype._eventsCount = 0, o.prototype._maxListeners = void 0;
704
+ var s = 10;
705
+ function i(e3) {
706
+ if ("function" != typeof e3) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e3);
707
+ }
708
+ function l(e3) {
709
+ return void 0 === e3._maxListeners ? o.defaultMaxListeners : e3._maxListeners;
710
+ }
711
+ function c(e3, t3, a3, r3) {
712
+ var n3, o2, s2, c2;
713
+ if (i(a3), void 0 === (o2 = e3._events) ? (o2 = e3._events = /* @__PURE__ */ Object.create(null), e3._eventsCount = 0) : (void 0 !== o2.newListener && (e3.emit("newListener", t3, a3.listener ? a3.listener : a3), o2 = e3._events), s2 = o2[t3]), void 0 === s2) s2 = o2[t3] = a3, ++e3._eventsCount;
714
+ else if ("function" == typeof s2 ? s2 = o2[t3] = r3 ? [a3, s2] : [s2, a3] : r3 ? s2.unshift(a3) : s2.push(a3), (n3 = l(e3)) > 0 && s2.length > n3 && !s2.warned) {
715
+ s2.warned = true;
716
+ var u2 = new Error("Possible EventEmitter memory leak detected. " + s2.length + " " + String(t3) + " listeners added. Use emitter.setMaxListeners() to increase limit");
717
+ u2.name = "MaxListenersExceededWarning", u2.emitter = e3, u2.type = t3, u2.count = s2.length, c2 = u2, console && console.warn && console.warn(c2);
718
+ }
719
+ return e3;
720
+ }
721
+ function u() {
722
+ if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = true, 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
723
+ }
724
+ function d(e3, t3, a3) {
725
+ var r3 = { fired: false, wrapFn: void 0, target: e3, type: t3, listener: a3 }, n3 = u.bind(r3);
726
+ return n3.listener = a3, r3.wrapFn = n3, n3;
727
+ }
728
+ function b(e3, t3, a3) {
729
+ var r3 = e3._events;
730
+ if (void 0 === r3) return [];
731
+ var n3 = r3[t3];
732
+ return void 0 === n3 ? [] : "function" == typeof n3 ? a3 ? [n3.listener || n3] : [n3] : a3 ? function(e4) {
733
+ for (var t4 = new Array(e4.length), a4 = 0; a4 < t4.length; ++a4) t4[a4] = e4[a4].listener || e4[a4];
734
+ return t4;
735
+ }(n3) : f(n3, n3.length);
736
+ }
737
+ function p(e3) {
738
+ var t3 = this._events;
739
+ if (void 0 !== t3) {
740
+ var a3 = t3[e3];
741
+ if ("function" == typeof a3) return 1;
742
+ if (void 0 !== a3) return a3.length;
743
+ }
744
+ return 0;
745
+ }
746
+ function f(e3, t3) {
747
+ for (var a3 = new Array(t3), r3 = 0; r3 < t3; ++r3) a3[r3] = e3[r3];
748
+ return a3;
749
+ }
750
+ function h(e3, t3, a3, r3) {
751
+ if ("function" == typeof e3.on) r3.once ? e3.once(t3, a3) : e3.on(t3, a3);
752
+ else {
753
+ if ("function" != typeof e3.addEventListener) throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e3);
754
+ e3.addEventListener(t3, function n3(o2) {
755
+ r3.once && e3.removeEventListener(t3, n3), a3(o2);
756
+ });
757
+ }
758
+ }
759
+ Object.defineProperty(o, "defaultMaxListeners", { enumerable: true, get: function() {
760
+ return s;
761
+ }, set: function(e3) {
762
+ if ("number" != typeof e3 || e3 < 0 || n2(e3)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e3 + ".");
763
+ s = e3;
764
+ } }), o.init = function() {
765
+ void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
766
+ }, o.prototype.setMaxListeners = function(e3) {
767
+ if ("number" != typeof e3 || e3 < 0 || n2(e3)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e3 + ".");
768
+ return this._maxListeners = e3, this;
769
+ }, o.prototype.getMaxListeners = function() {
770
+ return l(this);
771
+ }, o.prototype.emit = function(e3) {
772
+ for (var t3 = [], a3 = 1; a3 < arguments.length; a3++) t3.push(arguments[a3]);
773
+ var n3 = "error" === e3, o2 = this._events;
774
+ if (void 0 !== o2) n3 = n3 && void 0 === o2.error;
775
+ else if (!n3) return false;
776
+ if (n3) {
777
+ var s2;
778
+ if (t3.length > 0 && (s2 = t3[0]), s2 instanceof Error) throw s2;
779
+ var i2 = new Error("Unhandled error." + (s2 ? " (" + s2.message + ")" : ""));
780
+ throw i2.context = s2, i2;
781
+ }
782
+ var l2 = o2[e3];
783
+ if (void 0 === l2) return false;
784
+ if ("function" == typeof l2) r2(l2, this, t3);
785
+ else {
786
+ var c2 = l2.length, u2 = f(l2, c2);
787
+ for (a3 = 0; a3 < c2; ++a3) r2(u2[a3], this, t3);
788
+ }
789
+ return true;
790
+ }, o.prototype.addListener = function(e3, t3) {
791
+ return c(this, e3, t3, false);
792
+ }, o.prototype.on = o.prototype.addListener, o.prototype.prependListener = function(e3, t3) {
793
+ return c(this, e3, t3, true);
794
+ }, o.prototype.once = function(e3, t3) {
795
+ return i(t3), this.on(e3, d(this, e3, t3)), this;
796
+ }, o.prototype.prependOnceListener = function(e3, t3) {
797
+ return i(t3), this.prependListener(e3, d(this, e3, t3)), this;
798
+ }, o.prototype.removeListener = function(e3, t3) {
799
+ var a3, r3, n3, o2, s2;
800
+ if (i(t3), void 0 === (r3 = this._events)) return this;
801
+ if (void 0 === (a3 = r3[e3])) return this;
802
+ if (a3 === t3 || a3.listener === t3) 0 == --this._eventsCount ? this._events = /* @__PURE__ */ Object.create(null) : (delete r3[e3], r3.removeListener && this.emit("removeListener", e3, a3.listener || t3));
803
+ else if ("function" != typeof a3) {
804
+ for (n3 = -1, o2 = a3.length - 1; o2 >= 0; o2--) if (a3[o2] === t3 || a3[o2].listener === t3) {
805
+ s2 = a3[o2].listener, n3 = o2;
806
+ break;
1545
807
  }
1546
- },
1547
- children: copied ? /* @__PURE__ */ jsx(CheckIcon, {
1548
- sx: {
1549
- fontSize: ".8rem"
808
+ if (n3 < 0) return this;
809
+ 0 === n3 ? a3.shift() : function(e4, t4) {
810
+ for (; t4 + 1 < e4.length; t4++) e4[t4] = e4[t4 + 1];
811
+ e4.pop();
812
+ }(a3, n3), 1 === a3.length && (r3[e3] = a3[0]), void 0 !== r3.removeListener && this.emit("removeListener", e3, s2 || t3);
813
+ }
814
+ return this;
815
+ }, o.prototype.off = o.prototype.removeListener, o.prototype.removeAllListeners = function(e3) {
816
+ var t3, a3, r3;
817
+ if (void 0 === (a3 = this._events)) return this;
818
+ if (void 0 === a3.removeListener) return 0 === arguments.length ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : void 0 !== a3[e3] && (0 == --this._eventsCount ? this._events = /* @__PURE__ */ Object.create(null) : delete a3[e3]), this;
819
+ if (0 === arguments.length) {
820
+ var n3, o2 = Object.keys(a3);
821
+ for (r3 = 0; r3 < o2.length; ++r3) "removeListener" !== (n3 = o2[r3]) && this.removeAllListeners(n3);
822
+ return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
823
+ }
824
+ if ("function" == typeof (t3 = a3[e3])) this.removeListener(e3, t3);
825
+ else if (void 0 !== t3) for (r3 = t3.length - 1; r3 >= 0; r3--) this.removeListener(e3, t3[r3]);
826
+ return this;
827
+ }, o.prototype.listeners = function(e3) {
828
+ return b(this, e3, true);
829
+ }, o.prototype.rawListeners = function(e3) {
830
+ return b(this, e3, false);
831
+ }, o.listenerCount = function(e3, t3) {
832
+ return "function" == typeof e3.listenerCount ? e3.listenerCount(t3) : p.call(e3, t3);
833
+ }, o.prototype.listenerCount = p, o.prototype.eventNames = function() {
834
+ return this._eventsCount > 0 ? t2(this._events) : [];
835
+ };
836
+ }, 8336: (e2) => {
837
+ e2.exports = function(e3) {
838
+ return !(!e3 || "string" == typeof e3) && (e3 instanceof Array || Array.isArray(e3) || e3.length >= 0 && (e3.splice instanceof Function || Object.getOwnPropertyDescriptor(e3, e3.length - 1) && "String" !== e3.constructor.name));
839
+ };
840
+ }, 3989: (e2) => {
841
+ var t2 = "__lodash_placeholder__", a2 = 32, r2 = 1 / 0, n2 = NaN, o = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", a2], ["partialRight", 64], ["rearg", 256]], s = "[object Function]", i = "[object GeneratorFunction]", l = /^\s+|\s+$/g, c = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, u = /\{\n\/\* \[wrapped with (.+)\] \*/, d = /,? & /, b = /^[-+]0x[0-9a-f]+$/i, p = /^0b[01]+$/i, f = /^\[object .+?Constructor\]$/, h = /^0o[0-7]+$/i, m = /^(?:0|[1-9]\d*)$/, v = parseInt, g = "object" == typeof commonjsGlobal && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal, y = "object" == typeof self && self && self.Object === Object && self, k = g || y || Function("return this")();
842
+ function E(e3, t3, a3) {
843
+ switch (a3.length) {
844
+ case 0:
845
+ return e3.call(t3);
846
+ case 1:
847
+ return e3.call(t3, a3[0]);
848
+ case 2:
849
+ return e3.call(t3, a3[0], a3[1]);
850
+ case 3:
851
+ return e3.call(t3, a3[0], a3[1], a3[2]);
852
+ }
853
+ return e3.apply(t3, a3);
854
+ }
855
+ function j(e3, t3) {
856
+ return !!(e3 ? e3.length : 0) && function(e4, t4, a3) {
857
+ if (t4 != t4) return function(e5, t5, a4, r4) {
858
+ var n4 = e5.length, o2 = a4 + -1;
859
+ for (; ++o2 < n4; ) if (t5(e5[o2], o2, e5)) return o2;
860
+ return -1;
861
+ }(e4, w, a3);
862
+ var r3 = a3 - 1, n3 = e4.length;
863
+ for (; ++r3 < n3; ) if (e4[r3] === t4) return r3;
864
+ return -1;
865
+ }(e3, t3, 0) > -1;
866
+ }
867
+ function w(e3) {
868
+ return e3 != e3;
869
+ }
870
+ function x(e3, a3) {
871
+ for (var r3 = -1, n3 = e3.length, o2 = 0, s2 = []; ++r3 < n3; ) {
872
+ var i2 = e3[r3];
873
+ i2 !== a3 && i2 !== t2 || (e3[r3] = t2, s2[o2++] = r3);
874
+ }
875
+ return s2;
876
+ }
877
+ var C, O, M, S = Function.prototype, _ = Object.prototype, A = k["__core-js_shared__"], F = (C = /[^.]+$/.exec(A && A.keys && A.keys.IE_PROTO || "")) ? "Symbol(src)_1." + C : "", P = S.toString, D = _.hasOwnProperty, I = _.toString, R = RegExp("^" + P.call(D).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), z = Object.create, B = Math.max, N = Math.min, L = (O = H(Object, "defineProperty"), (M = H.name) && M.length > 2 ? O : void 0);
878
+ function q(e3) {
879
+ if (!X(e3) || function(e4) {
880
+ return !!F && F in e4;
881
+ }(e3)) return false;
882
+ var t3 = function(e4) {
883
+ var t4 = X(e4) ? I.call(e4) : "";
884
+ return t4 == s || t4 == i;
885
+ }(e3) || function(e4) {
886
+ var t4 = false;
887
+ if (null != e4 && "function" != typeof e4.toString) try {
888
+ t4 = !!(e4 + "");
889
+ } catch (e5) {
1550
890
  }
1551
- }) : /* @__PURE__ */ jsx(ContentCopyIcon, {
1552
- sx: {
1553
- fontSize: ".8rem"
891
+ return t4;
892
+ }(e3) ? R : f;
893
+ return t3.test(function(e4) {
894
+ if (null != e4) {
895
+ try {
896
+ return P.call(e4);
897
+ } catch (e5) {
898
+ }
899
+ try {
900
+ return e4 + "";
901
+ } catch (e5) {
902
+ }
1554
903
  }
1555
- })
1556
- }),
1557
- Editor && editable && serialize && deserialize && /* @__PURE__ */ jsx(IconBox, {
1558
- onClick: startEditing,
1559
- children: /* @__PURE__ */ jsx(EditIcon, {
1560
- sx: {
1561
- fontSize: ".8rem"
904
+ return "";
905
+ }(e3));
906
+ }
907
+ function V(e3) {
908
+ return function() {
909
+ var t3 = arguments;
910
+ switch (t3.length) {
911
+ case 0:
912
+ return new e3();
913
+ case 1:
914
+ return new e3(t3[0]);
915
+ case 2:
916
+ return new e3(t3[0], t3[1]);
917
+ case 3:
918
+ return new e3(t3[0], t3[1], t3[2]);
919
+ case 4:
920
+ return new e3(t3[0], t3[1], t3[2], t3[3]);
921
+ case 5:
922
+ return new e3(t3[0], t3[1], t3[2], t3[3], t3[4]);
923
+ case 6:
924
+ return new e3(t3[0], t3[1], t3[2], t3[3], t3[4], t3[5]);
925
+ case 7:
926
+ return new e3(t3[0], t3[1], t3[2], t3[3], t3[4], t3[5], t3[6]);
927
+ }
928
+ var a3, r3 = X(a3 = e3.prototype) ? z(a3) : {}, n3 = e3.apply(r3, t3);
929
+ return X(n3) ? n3 : r3;
930
+ };
931
+ }
932
+ function T(e3, t3, a3, r3, n3, o2, s2, i2, l2, c2) {
933
+ var u2 = 128 & t3, d2 = 1 & t3, b2 = 2 & t3, p2 = 24 & t3, f2 = 512 & t3, h2 = b2 ? void 0 : V(e3);
934
+ return function m2() {
935
+ for (var v2 = arguments.length, g2 = Array(v2), y2 = v2; y2--; ) g2[y2] = arguments[y2];
936
+ if (p2) var E2 = U(m2), j2 = function(e4, t4) {
937
+ for (var a4 = e4.length, r4 = 0; a4--; ) e4[a4] === t4 && r4++;
938
+ return r4;
939
+ }(g2, E2);
940
+ if (r3 && (g2 = function(e4, t4, a4, r4) {
941
+ for (var n4 = -1, o3 = e4.length, s3 = a4.length, i3 = -1, l3 = t4.length, c3 = B(o3 - s3, 0), u3 = Array(l3 + c3), d3 = !r4; ++i3 < l3; ) u3[i3] = t4[i3];
942
+ for (; ++n4 < s3; ) (d3 || n4 < o3) && (u3[a4[n4]] = e4[n4]);
943
+ for (; c3--; ) u3[i3++] = e4[n4++];
944
+ return u3;
945
+ }(g2, r3, n3, p2)), o2 && (g2 = function(e4, t4, a4, r4) {
946
+ for (var n4 = -1, o3 = e4.length, s3 = -1, i3 = a4.length, l3 = -1, c3 = t4.length, u3 = B(o3 - i3, 0), d3 = Array(u3 + c3), b3 = !r4; ++n4 < u3; ) d3[n4] = e4[n4];
947
+ for (var p3 = n4; ++l3 < c3; ) d3[p3 + l3] = t4[l3];
948
+ for (; ++s3 < i3; ) (b3 || n4 < o3) && (d3[p3 + a4[s3]] = e4[n4++]);
949
+ return d3;
950
+ }(g2, o2, s2, p2)), v2 -= j2, p2 && v2 < c2) {
951
+ var w2 = x(g2, E2);
952
+ return K(e3, t3, T, m2.placeholder, a3, g2, w2, i2, l2, c2 - v2);
1562
953
  }
1563
- })
1564
- }),
1565
- enableAdd && /* @__PURE__ */ jsx(IconBox, {
1566
- onClick: (event) => {
1567
- event.preventDefault();
1568
- onAdd === null || onAdd === void 0 ? void 0 : onAdd(path);
1569
- },
1570
- children: /* @__PURE__ */ jsx(AddBoxIcon, {
1571
- sx: {
1572
- fontSize: ".8rem"
954
+ var C2 = d2 ? a3 : this, O2 = b2 ? C2[e3] : e3;
955
+ return v2 = g2.length, i2 ? g2 = function(e4, t4) {
956
+ var a4 = e4.length, r4 = N(t4.length, a4), n4 = function(e5, t5) {
957
+ var a5 = -1, r5 = e5.length;
958
+ for (t5 || (t5 = Array(r5)); ++a5 < r5; ) t5[a5] = e5[a5];
959
+ return t5;
960
+ }(e4);
961
+ for (; r4--; ) {
962
+ var o3 = t4[r4];
963
+ e4[r4] = J(o3, a4) ? n4[o3] : void 0;
964
+ }
965
+ return e4;
966
+ }(g2, i2) : f2 && v2 > 1 && g2.reverse(), u2 && l2 < v2 && (g2.length = l2), this && this !== k && this instanceof m2 && (O2 = h2 || V(O2)), O2.apply(C2, g2);
967
+ };
968
+ }
969
+ function K(e3, t3, r3, n3, o2, s2, i2, l2, c2, u2) {
970
+ var d2 = 8 & t3;
971
+ t3 |= d2 ? a2 : 64, 4 & (t3 &= ~(d2 ? 64 : a2)) || (t3 &= -4);
972
+ var b2 = r3(e3, t3, o2, d2 ? s2 : void 0, d2 ? i2 : void 0, d2 ? void 0 : s2, d2 ? void 0 : i2, l2, c2, u2);
973
+ return b2.placeholder = n3, G(b2, e3, t3);
974
+ }
975
+ function W(e3, t3, r3, n3, o2, s2, i2, l2) {
976
+ var c2 = 2 & t3;
977
+ if (!c2 && "function" != typeof e3) throw new TypeError("Expected a function");
978
+ var u2 = n3 ? n3.length : 0;
979
+ if (u2 || (t3 &= -97, n3 = o2 = void 0), i2 = void 0 === i2 ? i2 : B(te(i2), 0), l2 = void 0 === l2 ? l2 : te(l2), u2 -= o2 ? o2.length : 0, 64 & t3) {
980
+ var d2 = n3, b2 = o2;
981
+ n3 = o2 = void 0;
982
+ }
983
+ var p2 = [e3, t3, r3, n3, o2, d2, b2, s2, i2, l2];
984
+ if (e3 = p2[0], t3 = p2[1], r3 = p2[2], n3 = p2[3], o2 = p2[4], !(l2 = p2[9] = null == p2[9] ? c2 ? 0 : e3.length : B(p2[9] - u2, 0)) && 24 & t3 && (t3 &= -25), t3 && 1 != t3) f2 = 8 == t3 || 16 == t3 ? function(e4, t4, a3) {
985
+ var r4 = V(e4);
986
+ return function n4() {
987
+ for (var o3 = arguments.length, s3 = Array(o3), i3 = o3, l3 = U(n4); i3--; ) s3[i3] = arguments[i3];
988
+ var c3 = o3 < 3 && s3[0] !== l3 && s3[o3 - 1] !== l3 ? [] : x(s3, l3);
989
+ return (o3 -= c3.length) < a3 ? K(e4, t4, T, n4.placeholder, void 0, s3, c3, void 0, void 0, a3 - o3) : E(this && this !== k && this instanceof n4 ? r4 : e4, this, s3);
990
+ };
991
+ }(e3, t3, l2) : t3 != a2 && 33 != t3 || o2.length ? T.apply(void 0, p2) : function(e4, t4, a3, r4) {
992
+ var n4 = 1 & t4, o3 = V(e4);
993
+ return function t5() {
994
+ for (var s3 = -1, i3 = arguments.length, l3 = -1, c3 = r4.length, u3 = Array(c3 + i3), d3 = this && this !== k && this instanceof t5 ? o3 : e4; ++l3 < c3; ) u3[l3] = r4[l3];
995
+ for (; i3--; ) u3[l3++] = arguments[++s3];
996
+ return E(d3, n4 ? a3 : this, u3);
997
+ };
998
+ }(e3, t3, r3, n3);
999
+ else var f2 = function(e4, t4, a3) {
1000
+ var r4 = 1 & t4, n4 = V(e4);
1001
+ return function t5() {
1002
+ return (this && this !== k && this instanceof t5 ? n4 : e4).apply(r4 ? a3 : this, arguments);
1003
+ };
1004
+ }(e3, t3, r3);
1005
+ return G(f2, e3, t3);
1006
+ }
1007
+ function U(e3) {
1008
+ return e3.placeholder;
1009
+ }
1010
+ function H(e3, t3) {
1011
+ var a3 = function(e4, t4) {
1012
+ return null == e4 ? void 0 : e4[t4];
1013
+ }(e3, t3);
1014
+ return q(a3) ? a3 : void 0;
1015
+ }
1016
+ function $(e3) {
1017
+ var t3 = e3.match(u);
1018
+ return t3 ? t3[1].split(d) : [];
1019
+ }
1020
+ function Y(e3, t3) {
1021
+ var a3 = t3.length, r3 = a3 - 1;
1022
+ return t3[r3] = (a3 > 1 ? "& " : "") + t3[r3], t3 = t3.join(a3 > 2 ? ", " : " "), e3.replace(c, "{\n/* [wrapped with " + t3 + "] */\n");
1023
+ }
1024
+ function J(e3, t3) {
1025
+ return !!(t3 = null == t3 ? 9007199254740991 : t3) && ("number" == typeof e3 || m.test(e3)) && e3 > -1 && e3 % 1 == 0 && e3 < t3;
1026
+ }
1027
+ var G = L ? function(e3, t3, a3) {
1028
+ var r3, n3 = t3 + "";
1029
+ return L(e3, "toString", { configurable: true, enumerable: false, value: (r3 = Y(n3, Q($(n3), a3)), function() {
1030
+ return r3;
1031
+ }) });
1032
+ } : function(e3) {
1033
+ return e3;
1034
+ };
1035
+ function Q(e3, t3) {
1036
+ return function(e4, t4) {
1037
+ for (var a3 = -1, r3 = e4 ? e4.length : 0; ++a3 < r3 && false !== t4(e4[a3], a3, e4); ) ;
1038
+ }(o, function(a3) {
1039
+ var r3 = "_." + a3[0];
1040
+ t3 & a3[1] && !j(e3, r3) && e3.push(r3);
1041
+ }), e3.sort();
1042
+ }
1043
+ function Z(e3, t3, a3) {
1044
+ var r3 = W(e3, 8, void 0, void 0, void 0, void 0, void 0, t3 = a3 ? void 0 : t3);
1045
+ return r3.placeholder = Z.placeholder, r3;
1046
+ }
1047
+ function X(e3) {
1048
+ var t3 = typeof e3;
1049
+ return !!e3 && ("object" == t3 || "function" == t3);
1050
+ }
1051
+ function ee(e3) {
1052
+ return e3 ? (e3 = function(e4) {
1053
+ if ("number" == typeof e4) return e4;
1054
+ if (function(e5) {
1055
+ return "symbol" == typeof e5 || /* @__PURE__ */ function(e6) {
1056
+ return !!e6 && "object" == typeof e6;
1057
+ }(e5) && "[object Symbol]" == I.call(e5);
1058
+ }(e4)) return n2;
1059
+ if (X(e4)) {
1060
+ var t3 = "function" == typeof e4.valueOf ? e4.valueOf() : e4;
1061
+ e4 = X(t3) ? t3 + "" : t3;
1573
1062
  }
1574
- })
1575
- }),
1576
- enableDelete && /* @__PURE__ */ jsx(IconBox, {
1577
- onClick: (event) => {
1578
- event.preventDefault();
1579
- onDelete === null || onDelete === void 0 ? void 0 : onDelete(path, value);
1580
- },
1581
- children: /* @__PURE__ */ jsx(DeleteIcon, {
1582
- sx: {
1583
- fontSize: ".9rem"
1063
+ if ("string" != typeof e4) return 0 === e4 ? e4 : +e4;
1064
+ e4 = e4.replace(l, "");
1065
+ var a3 = p.test(e4);
1066
+ return a3 || h.test(e4) ? v(e4.slice(2), a3 ? 2 : 8) : b.test(e4) ? n2 : +e4;
1067
+ }(e3)) === r2 || e3 === -1 / 0 ? 17976931348623157e292 * (e3 < 0 ? -1 : 1) : e3 == e3 ? e3 : 0 : 0 === e3 ? e3 : 0;
1068
+ }
1069
+ function te(e3) {
1070
+ var t3 = ee(e3), a3 = t3 % 1;
1071
+ return t3 == t3 ? a3 ? t3 - a3 : t3 : 0;
1072
+ }
1073
+ Z.placeholder = {}, e2.exports = Z;
1074
+ }, 301: (e2, t2, a2) => {
1075
+ var r2 = a2(8336), n2 = Array.prototype.concat, o = Array.prototype.slice, s = e2.exports = function(e3) {
1076
+ for (var t3 = [], a3 = 0, s2 = e3.length; a3 < s2; a3++) {
1077
+ var i = e3[a3];
1078
+ r2(i) ? t3 = n2.call(t3, o.call(i)) : t3.push(i);
1079
+ }
1080
+ return t3;
1081
+ };
1082
+ s.wrap = function(e3) {
1083
+ return function() {
1084
+ return e3(s(arguments));
1085
+ };
1086
+ };
1087
+ }, 4119: (t2) => {
1088
+ t2.exports = e;
1089
+ } }, a = {};
1090
+ function r(e2) {
1091
+ var n2 = a[e2];
1092
+ if (void 0 !== n2) return n2.exports;
1093
+ var o = a[e2] = { exports: {} };
1094
+ return t[e2](o, o.exports, r), o.exports;
1095
+ }
1096
+ r.n = (e2) => {
1097
+ var t2 = e2 && e2.__esModule ? () => e2.default : () => e2;
1098
+ return r.d(t2, { a: t2 }), t2;
1099
+ }, r.d = (e2, t2) => {
1100
+ for (var a2 in t2) r.o(t2, a2) && !r.o(e2, a2) && Object.defineProperty(e2, a2, { enumerable: true, get: t2[a2] });
1101
+ }, r.o = (e2, t2) => Object.prototype.hasOwnProperty.call(e2, t2), r.r = (e2) => {
1102
+ "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e2, "__esModule", { value: true });
1103
+ };
1104
+ var n = {};
1105
+ return (() => {
1106
+ function e2(t3) {
1107
+ return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
1108
+ return typeof e3;
1109
+ } : function(e3) {
1110
+ return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
1111
+ }, e2(t3);
1112
+ }
1113
+ function t2(t3) {
1114
+ var a3 = function(t4, a4) {
1115
+ if ("object" != e2(t4) || !t4) return t4;
1116
+ var r2 = t4[Symbol.toPrimitive];
1117
+ if (void 0 !== r2) {
1118
+ var n2 = r2.call(t4, a4);
1119
+ if ("object" != e2(n2)) return n2;
1120
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1584
1121
  }
1585
- })
1586
- })
1587
- ]
1588
- });
1589
- }, [
1590
- Editor,
1591
- serialize,
1592
- deserialize,
1593
- copied,
1594
- copy,
1595
- editable,
1596
- editing,
1597
- enableClipboard,
1598
- enableAdd,
1599
- enableDelete,
1600
- tempValue,
1601
- path,
1602
- value,
1603
- onAdd,
1604
- onDelete,
1605
- startEditing,
1606
- abortEditing,
1607
- commitEditing
1608
- ]);
1609
- const isEmptyValue = useMemo(() => getValueSize(value) === 0, [
1610
- value
1611
- ]);
1612
- const expandable = !isEmptyValue && !!(PreComponent && PostComponent);
1613
- const KeyRenderer = useJsonViewerStore((store) => store.keyRenderer);
1614
- const downstreamProps = useMemo(() => ({
1615
- path,
1616
- inspect,
1617
- setInspect,
1618
- value,
1619
- prevValue,
1620
- nestedIndex
1621
- }), [
1622
- inspect,
1623
- path,
1624
- setInspect,
1625
- value,
1626
- prevValue,
1627
- nestedIndex
1628
- ]);
1629
- return /* @__PURE__ */ jsxs(Box, {
1630
- className: "data-key-pair",
1631
- "data-testid": "data-key-pair" + path.join("."),
1632
- sx: {
1633
- userSelect: "text"
1634
- },
1635
- onMouseEnter: useCallback(() => setHover(path, nestedIndex), [
1636
- setHover,
1637
- path,
1638
- nestedIndex
1639
- ]),
1640
- children: [
1641
- /* @__PURE__ */ jsxs(DataBox, {
1642
- component: "span",
1643
- className: "data-key",
1644
- sx: {
1645
- lineHeight: 1.5,
1646
- color: keyColor,
1647
- letterSpacing: 0.5,
1648
- opacity: 0.8
1649
- },
1650
- onClick: useCallback((event) => {
1651
- if (event.isDefaultPrevented()) {
1652
- return;
1653
- }
1654
- if (!isEmptyValue) {
1655
- setInspect((state) => !state);
1656
- }
1657
- }, [
1658
- isEmptyValue,
1659
- setInspect
1660
- ]),
1661
- children: [
1662
- expandable ? inspect ? /* @__PURE__ */ jsx(ExpandMoreIcon, {
1663
- className: "data-key-toggle-expanded",
1664
- sx: {
1665
- fontSize: ".8rem",
1666
- "&:hover": {
1667
- cursor: "pointer"
1122
+ return ("string" === a4 ? String : Number)(t4);
1123
+ }(t3, "string");
1124
+ return "symbol" == e2(a3) ? a3 : a3 + "";
1125
+ }
1126
+ function a2(e3, a3, r2) {
1127
+ return (a3 = t2(a3)) in e3 ? Object.defineProperty(e3, a3, { value: r2, enumerable: true, configurable: true, writable: true }) : e3[a3] = r2, e3;
1128
+ }
1129
+ function o(e3, t3) {
1130
+ var a3 = Object.keys(e3);
1131
+ if (Object.getOwnPropertySymbols) {
1132
+ var r2 = Object.getOwnPropertySymbols(e3);
1133
+ t3 && (r2 = r2.filter(function(t4) {
1134
+ return Object.getOwnPropertyDescriptor(e3, t4).enumerable;
1135
+ })), a3.push.apply(a3, r2);
1136
+ }
1137
+ return a3;
1138
+ }
1139
+ function s(e3) {
1140
+ for (var t3 = 1; t3 < arguments.length; t3++) {
1141
+ var r2 = null != arguments[t3] ? arguments[t3] : {};
1142
+ t3 % 2 ? o(Object(r2), true).forEach(function(t4) {
1143
+ a2(e3, t4, r2[t4]);
1144
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e3, Object.getOwnPropertyDescriptors(r2)) : o(Object(r2)).forEach(function(t4) {
1145
+ Object.defineProperty(e3, t4, Object.getOwnPropertyDescriptor(r2, t4));
1146
+ });
1147
+ }
1148
+ return e3;
1149
+ }
1150
+ function i(e3, t3) {
1151
+ if (!(e3 instanceof t3)) throw new TypeError("Cannot call a class as a function");
1152
+ }
1153
+ function l(e3, a3) {
1154
+ for (var r2 = 0; r2 < a3.length; r2++) {
1155
+ var n2 = a3[r2];
1156
+ n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(e3, t2(n2.key), n2);
1157
+ }
1158
+ }
1159
+ function c(e3, t3, a3) {
1160
+ return t3 && l(e3.prototype, t3), a3 && l(e3, a3), Object.defineProperty(e3, "prototype", { writable: false }), e3;
1161
+ }
1162
+ function u(e3) {
1163
+ return u = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e4) {
1164
+ return e4.__proto__ || Object.getPrototypeOf(e4);
1165
+ }, u(e3);
1166
+ }
1167
+ function d() {
1168
+ try {
1169
+ var e3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1170
+ }));
1171
+ } catch (e4) {
1172
+ }
1173
+ return (d = function() {
1174
+ return !!e3;
1175
+ })();
1176
+ }
1177
+ function b(t3, a3) {
1178
+ if (a3 && ("object" == e2(a3) || "function" == typeof a3)) return a3;
1179
+ if (void 0 !== a3) throw new TypeError("Derived constructors may only return object or undefined");
1180
+ return function(e3) {
1181
+ if (void 0 === e3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1182
+ return e3;
1183
+ }(t3);
1184
+ }
1185
+ function p(e3, t3, a3) {
1186
+ return t3 = u(t3), b(e3, d() ? Reflect.construct(t3, a3 || [], u(e3).constructor) : t3.apply(e3, a3));
1187
+ }
1188
+ function f(e3, t3) {
1189
+ return f = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e4, t4) {
1190
+ return e4.__proto__ = t4, e4;
1191
+ }, f(e3, t3);
1192
+ }
1193
+ function h(e3, t3) {
1194
+ if ("function" != typeof t3 && null !== t3) throw new TypeError("Super expression must either be null or a function");
1195
+ e3.prototype = Object.create(t3 && t3.prototype, { constructor: { value: e3, writable: true, configurable: true } }), Object.defineProperty(e3, "prototype", { writable: false }), t3 && f(e3, t3);
1196
+ }
1197
+ r.r(n), r.d(n, { default: () => gt });
1198
+ var m = r(4119), v = r.n(m);
1199
+ function g() {
1200
+ var e3 = this.constructor.getDerivedStateFromProps(this.props, this.state);
1201
+ null != e3 && this.setState(e3);
1202
+ }
1203
+ function y(e3) {
1204
+ this.setState(function(t3) {
1205
+ var a3 = this.constructor.getDerivedStateFromProps(e3, t3);
1206
+ return null != a3 ? a3 : null;
1207
+ }.bind(this));
1208
+ }
1209
+ function k(e3, t3) {
1210
+ try {
1211
+ var a3 = this.props, r2 = this.state;
1212
+ this.props = e3, this.state = t3, this.__reactInternalSnapshotFlag = true, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(a3, r2);
1213
+ } finally {
1214
+ this.props = a3, this.state = r2;
1215
+ }
1216
+ }
1217
+ function E(e3) {
1218
+ var t3 = e3.prototype;
1219
+ if (!t3 || !t3.isReactComponent) throw new Error("Can only polyfill class components");
1220
+ if ("function" != typeof e3.getDerivedStateFromProps && "function" != typeof t3.getSnapshotBeforeUpdate) return e3;
1221
+ var a3 = null, r2 = null, n2 = null;
1222
+ if ("function" == typeof t3.componentWillMount ? a3 = "componentWillMount" : "function" == typeof t3.UNSAFE_componentWillMount && (a3 = "UNSAFE_componentWillMount"), "function" == typeof t3.componentWillReceiveProps ? r2 = "componentWillReceiveProps" : "function" == typeof t3.UNSAFE_componentWillReceiveProps && (r2 = "UNSAFE_componentWillReceiveProps"), "function" == typeof t3.componentWillUpdate ? n2 = "componentWillUpdate" : "function" == typeof t3.UNSAFE_componentWillUpdate && (n2 = "UNSAFE_componentWillUpdate"), null !== a3 || null !== r2 || null !== n2) {
1223
+ var o2 = e3.displayName || e3.name, s2 = "function" == typeof e3.getDerivedStateFromProps ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
1224
+ throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n" + o2 + " uses " + s2 + " but also contains the following legacy lifecycles:" + (null !== a3 ? "\n " + a3 : "") + (null !== r2 ? "\n " + r2 : "") + (null !== n2 ? "\n " + n2 : "") + "\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks");
1225
+ }
1226
+ if ("function" == typeof e3.getDerivedStateFromProps && (t3.componentWillMount = g, t3.componentWillReceiveProps = y), "function" == typeof t3.getSnapshotBeforeUpdate) {
1227
+ if ("function" != typeof t3.componentDidUpdate) throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");
1228
+ t3.componentWillUpdate = k;
1229
+ var i2 = t3.componentDidUpdate;
1230
+ t3.componentDidUpdate = function(e4, t4, a4) {
1231
+ var r3 = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : a4;
1232
+ i2.call(this, e4, t4, r3);
1233
+ };
1234
+ }
1235
+ return e3;
1236
+ }
1237
+ function j(e3, t3) {
1238
+ if (null == e3) return {};
1239
+ var a3 = {};
1240
+ for (var r2 in e3) if ({}.hasOwnProperty.call(e3, r2)) {
1241
+ if (t3.includes(r2)) continue;
1242
+ a3[r2] = e3[r2];
1243
+ }
1244
+ return a3;
1245
+ }
1246
+ function w(e3, t3) {
1247
+ if (null == e3) return {};
1248
+ var a3, r2, n2 = j(e3, t3);
1249
+ if (Object.getOwnPropertySymbols) {
1250
+ var o2 = Object.getOwnPropertySymbols(e3);
1251
+ for (r2 = 0; r2 < o2.length; r2++) a3 = o2[r2], t3.includes(a3) || {}.propertyIsEnumerable.call(e3, a3) && (n2[a3] = e3[a3]);
1252
+ }
1253
+ return n2;
1254
+ }
1255
+ function x(e3, t3) {
1256
+ if (t3 && (null == e3 ? void 0 : e3.constructor) === t3) return "bigNumber";
1257
+ var a3 = function(e4) {
1258
+ return {}.toString.call(e4).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
1259
+ }(e3);
1260
+ return "number" === a3 && (a3 = isNaN(e3) ? "nan" : (0 | e3) != e3 ? "float" : "integer"), a3;
1261
+ }
1262
+ function C(e3) {
1263
+ return e3.replace(/\\/g, "\\\\").replace(/\n/g, "\\n").replace(/\t/g, "\\t").replace(/\r/g, "\\r").replace(/\f/g, "\\f");
1264
+ }
1265
+ g.__suppressDeprecationWarning = true, y.__suppressDeprecationWarning = true, k.__suppressDeprecationWarning = true;
1266
+ var O = { scheme: "rjv-default", author: "mac gainor", base00: "rgba(0, 0, 0, 0)", base01: "rgb(245, 245, 245)", base02: "rgb(235, 235, 235)", base03: "#93a1a1", base04: "rgba(0, 0, 0, 0.3)", base05: "#586e75", base06: "#073642", base07: "#002b36", base08: "#d33682", base09: "#cb4b16", base0A: "#dc322f", base0B: "#859900", base0C: "#6c71c4", base0D: "#586e75", base0E: "#2aa198", base0F: "#268bd2" }, M = { scheme: "rjv-grey", author: "mac gainor", base00: "rgba(1, 1, 1, 0)", base01: "rgba(1, 1, 1, 0.1)", base02: "rgba(0, 0, 0, 0.2)", base03: "rgba(1, 1, 1, 0.3)", base04: "rgba(0, 0, 0, 0.4)", base05: "rgba(1, 1, 1, 0.5)", base06: "rgba(1, 1, 1, 0.6)", base07: "rgba(1, 1, 1, 0.7)", base08: "rgba(1, 1, 1, 0.8)", base09: "rgba(1, 1, 1, 0.8)", base0A: "rgba(1, 1, 1, 0.8)", base0B: "rgba(1, 1, 1, 0.8)", base0C: "rgba(1, 1, 1, 0.8)", base0D: "rgba(1, 1, 1, 0.8)", base0E: "rgba(1, 1, 1, 0.8)", base0F: "rgba(1, 1, 1, 0.8)" };
1267
+ const S = { globalFontFamily: "monospace", globalCursor: "default", braceFontWeight: "bold", braceCursor: "pointer", ellipsisFontSize: "18px", ellipsisLineHeight: "10px", ellipsisCursor: "pointer", keyMargin: "0px 5px", keyLetterSpacing: "0.5px", keyFontStyle: "none", keyVerticalAlign: "top", keyOpacity: "0.85", keyOpacityHover: "1", keyValPaddingTop: "3px", keyValPaddingBottom: "3px", keyValPaddingRight: "5px", keyValBorderLeft: "1px solid", keyValBorderHover: "2px solid", pushedContentMarginLeft: "6px", variableValuePaddingRight: "6px", nullFontSize: "11px", nullFontWeight: "bold", nullPadding: "1px 2px", nullBorderRadius: "3px", nanFontSize: "11px", nanFontWeight: "bold", nanPadding: "1px 2px", nanBorderRadius: "3px", undefinedFontSize: "11px", undefinedPadding: "1px 2px", undefinedBorderRadius: "3px", dataTypeFontSize: "11px", dataTypeMarginRight: "4px", datatypeOpacity: "0.8", objectSizeBorderRadius: "3px", objectSizeFontStyle: "italic", objectSizeMargin: "0px 6px 0px 0px", clipboardCursor: "pointer", clipboardCheckMarginLeft: "-12px", metaDataPadding: "0px 0px 0px 10px", arrayGroupMetaPadding: "0px 0px 0px 4px", iconContainerWidth: "17px", tooltipPadding: "4px", editInputMinWidth: "130px", editInputBorderRadius: "2px", editInputPadding: "5px", editInputMarginRight: "4px", editInputFontFamily: "monospace", iconCursor: "pointer", iconFontSize: "15px", iconPaddingRight: "1px", dateValueMarginLeft: "2px", iconMarginRight: "3px", detectedRowPaddingTop: "3px", addKeyCoverBackground: "rgba(255, 255, 255, 0.3)", addKeyCoverPosition: "absolute", addKeyCoverPositionPx: "0px", addKeyModalWidth: "200px", addKeyModalMargin: "auto", addKeyModalPadding: "10px", addKeyModalRadius: "3px" };
1268
+ function _(e3, t3) {
1269
+ (null == t3 || t3 > e3.length) && (t3 = e3.length);
1270
+ for (var a3 = 0, r2 = Array(t3); a3 < t3; a3++) r2[a3] = e3[a3];
1271
+ return r2;
1272
+ }
1273
+ function A(e3, t3) {
1274
+ if (e3) {
1275
+ if ("string" == typeof e3) return _(e3, t3);
1276
+ var a3 = {}.toString.call(e3).slice(8, -1);
1277
+ return "Object" === a3 && e3.constructor && (a3 = e3.constructor.name), "Map" === a3 || "Set" === a3 ? Array.from(e3) : "Arguments" === a3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a3) ? _(e3, t3) : void 0;
1278
+ }
1279
+ }
1280
+ function F(e3, t3) {
1281
+ return function(e4) {
1282
+ if (Array.isArray(e4)) return e4;
1283
+ }(e3) || function(e4, t4) {
1284
+ var a3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
1285
+ if (null != a3) {
1286
+ var r2, n2, o2, s2, i2 = [], l2 = true, c2 = false;
1287
+ try {
1288
+ if (o2 = (a3 = a3.call(e4)).next, 0 === t4) {
1289
+ if (Object(a3) !== a3) return;
1290
+ l2 = false;
1291
+ } else for (; !(l2 = (r2 = o2.call(a3)).done) && (i2.push(r2.value), i2.length !== t4); l2 = true) ;
1292
+ } catch (e5) {
1293
+ c2 = true, n2 = e5;
1294
+ } finally {
1295
+ try {
1296
+ if (!l2 && null != a3.return && (s2 = a3.return(), Object(s2) !== s2)) return;
1297
+ } finally {
1298
+ if (c2) throw n2;
1299
+ }
1668
1300
  }
1301
+ return i2;
1669
1302
  }
1670
- }) : /* @__PURE__ */ jsx(ChevronRightIcon, {
1671
- className: "data-key-toggle-collapsed",
1672
- sx: {
1673
- fontSize: ".8rem",
1674
- "&:hover": {
1675
- cursor: "pointer"
1303
+ }(e3, t3) || A(e3, t3) || function() {
1304
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1305
+ }();
1306
+ }
1307
+ var P = r(9446), D = r(3639), I = r.n(D), R = r(3989), z = r.n(R);
1308
+ function B(e3, t3) {
1309
+ var a3 = Object.keys(e3);
1310
+ if (Object.getOwnPropertySymbols) {
1311
+ var r2 = Object.getOwnPropertySymbols(e3);
1312
+ t3 && (r2 = r2.filter(function(t4) {
1313
+ return Object.getOwnPropertyDescriptor(e3, t4).enumerable;
1314
+ })), a3.push.apply(a3, r2);
1315
+ }
1316
+ return a3;
1317
+ }
1318
+ function N(e3) {
1319
+ for (var t3 = 1; t3 < arguments.length; t3++) {
1320
+ var r2 = null != arguments[t3] ? arguments[t3] : {};
1321
+ t3 % 2 ? B(Object(r2), true).forEach(function(t4) {
1322
+ a2(e3, t4, r2[t4]);
1323
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e3, Object.getOwnPropertyDescriptors(r2)) : B(Object(r2)).forEach(function(t4) {
1324
+ Object.defineProperty(e3, t4, Object.getOwnPropertyDescriptor(r2, t4));
1325
+ });
1326
+ }
1327
+ return e3;
1328
+ }
1329
+ var L = P.default, q = Object.keys(L), V = function(e3) {
1330
+ var t3, a3 = function(e4) {
1331
+ var t4 = e4[0] / 255, a4 = e4[1] / 255, r3 = e4[2] / 255;
1332
+ return [0.299 * t4 + 0.587 * a4 + 0.114 * r3, -0.14713 * t4 + -0.28886 * a4 + 0.436 * r3, 0.615 * t4 + -0.51499 * a4 + -0.10001 * r3];
1333
+ }(I()(e3).array()), r2 = F(a3, 3), n2 = r2[0], o2 = r2[1], s2 = r2[2], i2 = function(e4) {
1334
+ var t4, a4, r3, n3 = e4[0], o3 = e4[1], s3 = e4[2];
1335
+ return t4 = 1 * n3 + 0 * o3 + 1.13983 * s3, a4 = 1 * n3 + -0.39465 * o3 + -0.5806 * s3, r3 = 1 * n3 + 2.02311 * o3 + 0 * s3, [255 * (t4 = Math.min(Math.max(0, t4), 1)), 255 * (a4 = Math.min(Math.max(0, a4), 1)), 255 * (r3 = Math.min(Math.max(0, r3), 1))];
1336
+ }([(t3 = n2, t3 < 0.25 ? 1 : t3 < 0.5 ? 0.9 - t3 : 1.1 - t3), o2, s2]);
1337
+ return I().rgb(i2).hex();
1338
+ }, T = function(e3) {
1339
+ return function(t3) {
1340
+ return { className: [t3.className, e3.className].filter(Boolean).join(" "), style: N(N({}, t3.style || {}), e3.style || {}) };
1341
+ };
1342
+ }, K = function(t3, a3) {
1343
+ var r2 = Object.keys(a3);
1344
+ for (var n2 in t3) -1 === r2.indexOf(n2) && r2.push(n2);
1345
+ return r2.reduce(function(r3, n3) {
1346
+ return r3[n3] = function(t4, a4) {
1347
+ if (void 0 === t4) return a4;
1348
+ if (void 0 === a4) return t4;
1349
+ var r4 = e2(t4), n4 = e2(a4);
1350
+ switch (r4) {
1351
+ case "string":
1352
+ switch (n4) {
1353
+ case "string":
1354
+ return [a4, t4].filter(Boolean).join(" ");
1355
+ case "object":
1356
+ return T({ className: t4, style: a4 });
1357
+ case "function":
1358
+ return function(e3) {
1359
+ for (var r5 = arguments.length, n5 = new Array(r5 > 1 ? r5 - 1 : 0), o2 = 1; o2 < r5; o2++) n5[o2 - 1] = arguments[o2];
1360
+ return T({ className: t4 })(a4.apply(void 0, [e3].concat(n5)));
1361
+ };
1362
+ }
1363
+ break;
1364
+ case "object":
1365
+ switch (n4) {
1366
+ case "string":
1367
+ return T({ className: a4, style: t4 });
1368
+ case "object":
1369
+ return N(N({}, a4), t4);
1370
+ case "function":
1371
+ return function(e3) {
1372
+ for (var r5 = arguments.length, n5 = new Array(r5 > 1 ? r5 - 1 : 0), o2 = 1; o2 < r5; o2++) n5[o2 - 1] = arguments[o2];
1373
+ return T({ style: t4 })(a4.apply(void 0, [e3].concat(n5)));
1374
+ };
1375
+ }
1376
+ break;
1377
+ case "function":
1378
+ switch (n4) {
1379
+ case "string":
1380
+ return function(e3) {
1381
+ for (var r5 = arguments.length, n5 = new Array(r5 > 1 ? r5 - 1 : 0), o2 = 1; o2 < r5; o2++) n5[o2 - 1] = arguments[o2];
1382
+ return t4.apply(void 0, [T(e3)({ className: a4 })].concat(n5));
1383
+ };
1384
+ case "object":
1385
+ return function(e3) {
1386
+ for (var r5 = arguments.length, n5 = new Array(r5 > 1 ? r5 - 1 : 0), o2 = 1; o2 < r5; o2++) n5[o2 - 1] = arguments[o2];
1387
+ return t4.apply(void 0, [T(e3)({ style: a4 })].concat(n5));
1388
+ };
1389
+ case "function":
1390
+ return function(e3) {
1391
+ for (var r5 = arguments.length, n5 = new Array(r5 > 1 ? r5 - 1 : 0), o2 = 1; o2 < r5; o2++) n5[o2 - 1] = arguments[o2];
1392
+ return t4.apply(void 0, [a4.apply(void 0, [e3].concat(n5))].concat(n5));
1393
+ };
1394
+ }
1395
+ }
1396
+ }(t3[n3], a3[n3]), r3;
1397
+ }, {});
1398
+ }, W = function(t3, a3) {
1399
+ for (var r2 = arguments.length, n2 = new Array(r2 > 2 ? r2 - 2 : 0), o2 = 2; o2 < r2; o2++) n2[o2 - 2] = arguments[o2];
1400
+ if (null === a3) return t3;
1401
+ Array.isArray(a3) || (a3 = [a3]);
1402
+ var s2 = a3.map(function(e3) {
1403
+ return t3[e3];
1404
+ }).filter(Boolean).reduce(function(t4, a4) {
1405
+ return "string" == typeof a4 ? t4.className = [t4.className, a4].filter(Boolean).join(" ") : "object" === e2(a4) ? t4.style = N(N({}, t4.style), a4) : "function" == typeof a4 && (t4 = N(N({}, t4), a4.apply(void 0, [t4].concat(n2)))), t4;
1406
+ }, { className: "", style: {} });
1407
+ return s2.className || delete s2.className, 0 === Object.keys(s2.style).length && delete s2.style, s2;
1408
+ }, U = function(e3) {
1409
+ return Object.keys(e3).reduce(function(t3, a3) {
1410
+ return t3[a3] = /^base/.test(a3) ? V(e3[a3]) : "scheme" === a3 ? e3[a3] + ":inverted" : e3[a3], t3;
1411
+ }, {});
1412
+ }, H = z()(function(e3) {
1413
+ var t3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, a3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r2 = t3.defaultBase16, n2 = void 0 === r2 ? L : r2, o2 = t3.base16Themes, s2 = Y(a3, void 0 === o2 ? null : o2);
1414
+ s2 && (a3 = N(N({}, s2), a3));
1415
+ for (var i2 = q.reduce(function(e4, t4) {
1416
+ return e4[t4] = a3[t4] || n2[t4], e4;
1417
+ }, {}), l2 = Object.keys(a3).reduce(function(e4, t4) {
1418
+ return -1 === q.indexOf(t4) ? (e4[t4] = a3[t4], e4) : e4;
1419
+ }, {}), c2 = e3(i2), u2 = K(l2, c2), d2 = arguments.length, b2 = new Array(d2 > 3 ? d2 - 3 : 0), p2 = 3; p2 < d2; p2++) b2[p2 - 3] = arguments[p2];
1420
+ return z()(W, 2).apply(void 0, [u2].concat(b2));
1421
+ }, 3), $ = function(e3) {
1422
+ return !!e3.extend;
1423
+ }, Y = function(e3, t3) {
1424
+ if (e3 && $(e3) && e3.extend && (e3 = e3.extend), "string" == typeof e3) {
1425
+ var a3 = F(e3.split(":"), 2), r2 = a3[0], n2 = a3[1];
1426
+ e3 = t3 ? t3[r2] : P[r2], "inverted" === n2 && (e3 = U(e3));
1427
+ }
1428
+ return e3 && Object.prototype.hasOwnProperty.call(e3, "base00") ? e3 : void 0;
1429
+ }, J = function(e3) {
1430
+ var t3 = function(e4) {
1431
+ return { backgroundColor: e4.base00, ellipsisColor: e4.base09, braceColor: e4.base07, expandedIcon: e4.base0D, collapsedIcon: e4.base0E, keyColor: e4.base07, arrayKeyColor: e4.base0C, objectSize: e4.base04, copyToClipboard: e4.base0F, copyToClipboardCheck: e4.base0D, objectBorder: e4.base02, dataTypes: { boolean: e4.base0E, date: e4.base0D, float: e4.base0B, function: e4.base0D, integer: e4.base0F, string: e4.base09, nan: e4.base08, null: e4.base0A, undefined: e4.base05, regexp: e4.base0A, background: e4.base02, bigNumber: e4.base09 }, editVariable: { editIcon: e4.base0E, cancelIcon: e4.base09, removeIcon: e4.base09, addIcon: e4.base0E, checkIcon: e4.base0E, background: e4.base01, color: e4.base0A, border: e4.base07 }, addKeyModal: { background: e4.base05, border: e4.base04, color: e4.base0A, labelColor: e4.base01 }, validationFailure: { background: e4.base09, iconColor: e4.base01, fontColor: e4.base01 } };
1432
+ }(e3);
1433
+ return { "app-container": { fontFamily: S.globalFontFamily, cursor: S.globalCursor, backgroundColor: t3.backgroundColor, position: "relative" }, ellipsis: { display: "inline-block", color: t3.ellipsisColor, fontSize: S.ellipsisFontSize, lineHeight: S.ellipsisLineHeight, cursor: S.ellipsisCursor }, "brace-row": { display: "inline-block", cursor: "pointer" }, brace: { display: "inline-block", cursor: S.braceCursor, fontWeight: S.braceFontWeight, color: t3.braceColor }, "expanded-icon": { color: t3.expandedIcon }, "collapsed-icon": { color: t3.collapsedIcon }, colon: { display: "inline-block", margin: S.keyMargin, color: t3.keyColor, verticalAlign: "top" }, objectKeyVal: function(e4, a3) {
1434
+ return { style: s({ paddingTop: S.keyValPaddingTop, paddingRight: S.keyValPaddingRight, paddingBottom: S.keyValPaddingBottom, borderLeft: S.keyValBorderLeft + " " + t3.objectBorder, ":hover": { paddingLeft: a3.paddingLeft - 1 + "px", borderLeft: S.keyValBorderHover + " " + t3.objectBorder } }, a3) };
1435
+ }, "object-key-val-no-border": { padding: S.keyValPadding }, "pushed-content": { marginLeft: S.pushedContentMarginLeft }, variableValue: function(e4, t4) {
1436
+ return { style: s({ display: "inline-block", paddingRight: S.variableValuePaddingRight, position: "relative" }, t4) };
1437
+ }, "object-name": { display: "inline-block", color: t3.keyColor, letterSpacing: S.keyLetterSpacing, fontStyle: S.keyFontStyle, verticalAlign: S.keyVerticalAlign, opacity: S.keyOpacity, ":hover": { opacity: S.keyOpacityHover } }, "array-key": { display: "inline-block", color: t3.arrayKeyColor, letterSpacing: S.keyLetterSpacing, fontStyle: S.keyFontStyle, verticalAlign: S.keyVerticalAlign, opacity: S.keyOpacity, ":hover": { opacity: S.keyOpacityHover } }, "object-size": { color: t3.objectSize, borderRadius: S.objectSizeBorderRadius, fontStyle: S.objectSizeFontStyle, margin: S.objectSizeMargin, cursor: "default" }, "data-type-label": { fontSize: S.dataTypeFontSize, marginRight: S.dataTypeMarginRight, opacity: S.datatypeOpacity }, boolean: { display: "inline-block", color: t3.dataTypes.boolean }, date: { display: "inline-block", color: t3.dataTypes.date }, "date-value": { marginLeft: S.dateValueMarginLeft }, float: { display: "inline-block", color: t3.dataTypes.float }, function: { display: "inline-block", color: t3.dataTypes.function, cursor: "pointer", whiteSpace: "pre-line" }, "function-value": { fontStyle: "italic" }, integer: { display: "inline-block", color: t3.dataTypes.integer }, bigNumber: { display: "inline-block", color: t3.dataTypes.bigNumber }, string: { display: "inline-block", color: t3.dataTypes.string }, nan: { display: "inline-block", color: t3.dataTypes.nan, fontSize: S.nanFontSize, fontWeight: S.nanFontWeight, backgroundColor: t3.dataTypes.background, padding: S.nanPadding, borderRadius: S.nanBorderRadius }, null: { display: "inline-block", color: t3.dataTypes.null, fontSize: S.nullFontSize, fontWeight: S.nullFontWeight, backgroundColor: t3.dataTypes.background, padding: S.nullPadding, borderRadius: S.nullBorderRadius }, undefined: { display: "inline-block", color: t3.dataTypes.undefined, fontSize: S.undefinedFontSize, padding: S.undefinedPadding, borderRadius: S.undefinedBorderRadius, backgroundColor: t3.dataTypes.background }, regexp: { display: "inline-block", color: t3.dataTypes.regexp }, "copy-to-clipboard": { cursor: S.clipboardCursor }, "copy-icon": { color: t3.copyToClipboard, fontSize: S.iconFontSize, marginRight: S.iconMarginRight, verticalAlign: "top" }, "copy-icon-copied": { color: t3.copyToClipboardCheck, marginLeft: S.clipboardCheckMarginLeft }, "array-group-meta-data": { display: "inline-block", padding: S.arrayGroupMetaPadding }, "object-meta-data": { display: "inline-block", padding: S.metaDataPadding }, "icon-container": { display: "inline-block", width: S.iconContainerWidth }, tooltip: { padding: S.tooltipPadding }, removeVarIcon: { verticalAlign: "top", display: "inline-block", color: t3.editVariable.removeIcon, cursor: S.iconCursor, fontSize: S.iconFontSize, marginRight: S.iconMarginRight }, addVarIcon: { verticalAlign: "top", display: "inline-block", color: t3.editVariable.addIcon, cursor: S.iconCursor, fontSize: S.iconFontSize, marginRight: S.iconMarginRight }, editVarIcon: { verticalAlign: "top", display: "inline-block", color: t3.editVariable.editIcon, cursor: S.iconCursor, fontSize: S.iconFontSize, marginRight: S.iconMarginRight }, "edit-icon-container": { display: "inline-block", verticalAlign: "top" }, "check-icon": { display: "inline-block", cursor: S.iconCursor, color: t3.editVariable.checkIcon, fontSize: S.iconFontSize, paddingRight: S.iconPaddingRight }, "cancel-icon": { display: "inline-block", cursor: S.iconCursor, color: t3.editVariable.cancelIcon, fontSize: S.iconFontSize, paddingRight: S.iconPaddingRight }, "edit-input": { display: "inline-block", minWidth: S.editInputMinWidth, borderRadius: S.editInputBorderRadius, backgroundColor: t3.editVariable.background, color: t3.editVariable.color, padding: S.editInputPadding, marginRight: S.editInputMarginRight, fontFamily: S.editInputFontFamily }, "detected-row": { paddingTop: S.detectedRowPaddingTop }, "key-modal-request": { position: S.addKeyCoverPosition, top: S.addKeyCoverPositionPx, left: S.addKeyCoverPositionPx, right: S.addKeyCoverPositionPx, bottom: S.addKeyCoverPositionPx, backgroundColor: S.addKeyCoverBackground }, "key-modal": { width: S.addKeyModalWidth, backgroundColor: t3.addKeyModal.background, marginLeft: S.addKeyModalMargin, marginRight: S.addKeyModalMargin, padding: S.addKeyModalPadding, borderRadius: S.addKeyModalRadius, marginTop: "15px", position: "relative" }, "key-modal-label": { color: t3.addKeyModal.labelColor, marginLeft: "2px", marginBottom: "5px", fontSize: "11px" }, "key-modal-input-container": { overflow: "hidden" }, "key-modal-input": { width: "100%", padding: "3px 6px", fontFamily: "monospace", color: t3.addKeyModal.color, border: "none", boxSizing: "border-box", borderRadius: "2px" }, "key-modal-cancel": { backgroundColor: t3.editVariable.removeIcon, position: "absolute", top: "0px", right: "0px", borderRadius: "0px 3px 0px 3px", cursor: "pointer" }, "key-modal-cancel-icon": { color: t3.addKeyModal.labelColor, fontSize: S.iconFontSize, transform: "rotate(45deg)" }, "key-modal-submit": { color: t3.editVariable.addIcon, fontSize: S.iconFontSize, position: "absolute", right: "2px", top: "3px", cursor: "pointer" }, "function-ellipsis": { display: "inline-block", color: t3.ellipsisColor, fontSize: S.ellipsisFontSize, lineHeight: S.ellipsisLineHeight, cursor: S.ellipsisCursor }, "validation-failure": { float: "right", padding: "3px 6px", borderRadius: "2px", cursor: "pointer", color: t3.validationFailure.fontColor, backgroundColor: t3.validationFailure.background }, "validation-failure-label": { marginRight: "6px" }, "validation-failure-clear": { position: "relative", verticalAlign: "top", cursor: "pointer", color: t3.validationFailure.iconColor, fontSize: S.iconFontSize, transform: "rotate(45deg)" } };
1438
+ };
1439
+ function G(e3, t3, a3) {
1440
+ return e3 || console.error("theme has not been set"), function(e4) {
1441
+ var t4 = O;
1442
+ return false !== e4 && "none" !== e4 || (t4 = M), H(J, { defaultBase16: t4 })(e4);
1443
+ }(e3)(t3, a3);
1444
+ }
1445
+ var Q = function(e3) {
1446
+ function t3() {
1447
+ return i(this, t3), p(this, t3, arguments);
1448
+ }
1449
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1450
+ var e4 = this.props, t4 = (e4.rjvId, e4.type_name), a3 = e4.displayDataTypes, r2 = e4.theme;
1451
+ return a3 ? v().createElement("span", Object.assign({ className: "data-type-label" }, G(r2, "data-type-label")), t4) : null;
1452
+ } }]);
1453
+ }(v().PureComponent), Z = function(e3) {
1454
+ function t3() {
1455
+ return i(this, t3), p(this, t3, arguments);
1456
+ }
1457
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1458
+ var e4 = this.props;
1459
+ return v().createElement("div", G(e4.theme, "boolean"), v().createElement(Q, Object.assign({ type_name: "bool" }, e4)), e4.value ? "true" : "false");
1460
+ } }]);
1461
+ }(v().PureComponent), X = function(e3) {
1462
+ function t3() {
1463
+ return i(this, t3), p(this, t3, arguments);
1464
+ }
1465
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1466
+ var e4 = this.props;
1467
+ return v().createElement("div", G(e4.theme, "date"), v().createElement(Q, Object.assign({ type_name: "date" }, e4)), v().createElement("span", Object.assign({ className: "date-value" }, G(e4.theme, "date-value")), e4.value.toLocaleTimeString("en-us", { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" })));
1468
+ } }]);
1469
+ }(v().PureComponent), ee = function(e3) {
1470
+ function t3() {
1471
+ return i(this, t3), p(this, t3, arguments);
1472
+ }
1473
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1474
+ var e4 = this.props;
1475
+ return v().createElement("div", G(e4.theme, "float"), v().createElement(Q, Object.assign({ type_name: "float" }, e4)), this.props.value);
1476
+ } }]);
1477
+ }(v().PureComponent);
1478
+ function te(e3) {
1479
+ return function(e4) {
1480
+ if (Array.isArray(e4)) return _(e4);
1481
+ }(e3) || function(e4) {
1482
+ if ("undefined" != typeof Symbol && null != e4[Symbol.iterator] || null != e4["@@iterator"]) return Array.from(e4);
1483
+ }(e3) || A(e3) || function() {
1484
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1485
+ }();
1486
+ }
1487
+ var ae = r(9784), re = function() {
1488
+ return c(function e3() {
1489
+ i(this, e3), this.handler = function() {
1490
+ };
1491
+ }, [{ key: "register", value: function(e3) {
1492
+ this.handler = e3;
1493
+ } }, { key: "dispatch", value: function(e3) {
1494
+ var t3;
1495
+ null === (t3 = this.handler) || void 0 === t3 || t3.call(this, e3);
1496
+ } }]);
1497
+ }();
1498
+ globalThis.__globalDispatcherInstance || (globalThis.__globalDispatcherInstance = new re());
1499
+ const ne = globalThis.__globalDispatcherInstance;
1500
+ var oe = new (function(e3) {
1501
+ function t3() {
1502
+ var e4;
1503
+ i(this, t3);
1504
+ for (var a3 = arguments.length, r2 = new Array(a3), n2 = 0; n2 < a3; n2++) r2[n2] = arguments[n2];
1505
+ return (e4 = p(this, t3, [].concat(r2))).objects = {}, e4.set = function(t4, a4, r3, n3) {
1506
+ void 0 === e4.objects[t4] && (e4.objects[t4] = {}), void 0 === e4.objects[t4][a4] && (e4.objects[t4][a4] = {}), e4.objects[t4][a4][r3] = n3;
1507
+ }, e4.get = function(t4, a4, r3, n3) {
1508
+ return void 0 === e4.objects[t4] || void 0 === e4.objects[t4][a4] || null == e4.objects[t4][a4][r3] ? n3 : e4.objects[t4][a4][r3];
1509
+ }, e4.handleAction = function(t4) {
1510
+ var a4 = t4.rjvId, r3 = t4.data;
1511
+ switch (t4.name) {
1512
+ case "RESET":
1513
+ e4.emit("reset-" + a4);
1514
+ break;
1515
+ case "VARIABLE_UPDATED":
1516
+ t4.data.updated_src = e4.updateSrc(a4, r3), e4.set(a4, "action", "variable-update", s(s({}, r3), {}, { type: "variable-edited" })), e4.emit("variable-update-" + a4);
1517
+ break;
1518
+ case "VARIABLE_REMOVED":
1519
+ t4.data.updated_src = e4.updateSrc(a4, r3), e4.set(a4, "action", "variable-update", s(s({}, r3), {}, { type: "variable-removed" })), e4.emit("variable-update-" + a4);
1520
+ break;
1521
+ case "VARIABLE_ADDED":
1522
+ t4.data.updated_src = e4.updateSrc(a4, r3), e4.set(a4, "action", "variable-update", s(s({}, r3), {}, { type: "variable-added" })), e4.emit("variable-update-" + a4);
1523
+ break;
1524
+ case "ADD_VARIABLE_KEY_REQUEST":
1525
+ e4.set(a4, "action", "new-key-request", r3), e4.emit("add-key-request-" + a4);
1526
+ }
1527
+ }, e4.updateSrc = function(t4, a4) {
1528
+ var r3 = a4.name, n3 = a4.namespace, o2 = a4.new_value, s2 = (a4.existing_value, a4.variable_removed);
1529
+ n3.shift();
1530
+ var i2, l2 = e4.get(t4, "global", "src"), c2 = e4.deepCopy(l2, te(n3)), u2 = c2, d2 = function(e5, t5) {
1531
+ var a5 = "undefined" != typeof Symbol && e5[Symbol.iterator] || e5["@@iterator"];
1532
+ if (!a5) {
1533
+ if (Array.isArray(e5) || (a5 = A(e5)) || t5) {
1534
+ a5 && (e5 = a5);
1535
+ var r4 = 0, n4 = function() {
1536
+ };
1537
+ return { s: n4, n: function() {
1538
+ return r4 >= e5.length ? { done: true } : { done: false, value: e5[r4++] };
1539
+ }, e: function(e6) {
1540
+ throw e6;
1541
+ }, f: n4 };
1542
+ }
1543
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1544
+ }
1545
+ var o3, s3 = true, i3 = false;
1546
+ return { s: function() {
1547
+ a5 = a5.call(e5);
1548
+ }, n: function() {
1549
+ var e6 = a5.next();
1550
+ return s3 = e6.done, e6;
1551
+ }, e: function(e6) {
1552
+ i3 = true, o3 = e6;
1553
+ }, f: function() {
1554
+ try {
1555
+ s3 || null == a5.return || a5.return();
1556
+ } finally {
1557
+ if (i3) throw o3;
1558
+ }
1559
+ } };
1560
+ }(n3);
1561
+ try {
1562
+ for (d2.s(); !(i2 = d2.n()).done; ) {
1563
+ u2 = u2[i2.value];
1564
+ }
1565
+ } catch (e5) {
1566
+ d2.e(e5);
1567
+ } finally {
1568
+ d2.f();
1676
1569
  }
1570
+ return s2 ? "array" == x(u2) ? u2.splice(r3, 1) : delete u2[r3] : null !== r3 ? u2[r3] = o2 : c2 = o2, e4.set(t4, "global", "src", c2), c2;
1571
+ }, e4.deepCopy = function(t4, a4) {
1572
+ var r3, n3 = x(t4), o2 = a4.shift();
1573
+ return "array" == n3 ? r3 = te(t4) : "object" == n3 && (r3 = s({}, t4)), void 0 !== o2 && (r3[o2] = e4.deepCopy(t4[o2], a4)), r3;
1574
+ }, e4;
1575
+ }
1576
+ return h(t3, e3), c(t3);
1577
+ }(ae.EventEmitter))();
1578
+ ne.register(oe.handleAction.bind(oe));
1579
+ const se = oe;
1580
+ var ie = function(e3) {
1581
+ function t3(e4) {
1582
+ var a3;
1583
+ return i(this, t3), (a3 = p(this, t3, [e4])).toggleCollapsed = function() {
1584
+ a3.setState({ collapsed: !a3.state.collapsed }, function() {
1585
+ se.set(a3.props.rjvId, a3.props.namespace, "collapsed", a3.state.collapsed);
1586
+ });
1587
+ }, a3.getFunctionDisplay = function(e5) {
1588
+ var t4 = a3.props;
1589
+ return e5 ? v().createElement("span", null, a3.props.value.toString().slice(9, -1).replace(/\{[\s\S]+/, ""), v().createElement("span", { className: "function-collapsed", style: { fontWeight: "bold" } }, v().createElement("span", null, "{"), v().createElement("span", G(t4.theme, "ellipsis"), "..."), v().createElement("span", null, "}"))) : a3.props.value.toString().slice(9, -1);
1590
+ }, a3.state = { collapsed: se.get(e4.rjvId, e4.namespace, "collapsed", true) }, a3;
1591
+ }
1592
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1593
+ var e4 = this.props, t4 = this.state.collapsed;
1594
+ return v().createElement("div", G(e4.theme, "function"), v().createElement(Q, Object.assign({ type_name: "function" }, e4)), v().createElement("span", Object.assign({}, G(e4.theme, "function-value"), { className: "rjv-function-container", onClick: this.toggleCollapsed }), this.getFunctionDisplay(t4)));
1595
+ } }]);
1596
+ }(v().PureComponent), le = function(e3) {
1597
+ function t3() {
1598
+ return i(this, t3), p(this, t3, arguments);
1599
+ }
1600
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1601
+ return v().createElement("div", G(this.props.theme, "nan"), "NaN");
1602
+ } }]);
1603
+ }(v().PureComponent), ce = function(e3) {
1604
+ function t3() {
1605
+ return i(this, t3), p(this, t3, arguments);
1606
+ }
1607
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1608
+ return v().createElement("div", G(this.props.theme, "null"), "NULL");
1609
+ } }]);
1610
+ }(v().PureComponent), ue = function(e3) {
1611
+ function t3() {
1612
+ return i(this, t3), p(this, t3, arguments);
1613
+ }
1614
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1615
+ var e4 = this.props;
1616
+ return v().createElement("div", G(e4.theme, "integer"), v().createElement(Q, Object.assign({ type_name: "int" }, e4)), this.props.value);
1617
+ } }]);
1618
+ }(v().PureComponent), de = function(e3) {
1619
+ function t3() {
1620
+ return i(this, t3), p(this, t3, arguments);
1621
+ }
1622
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1623
+ var e4 = this.props;
1624
+ return v().createElement("div", G(e4.theme, "regexp"), v().createElement(Q, Object.assign({ type_name: "regexp" }, e4)), this.props.value.toString());
1625
+ } }]);
1626
+ }(v().PureComponent), be = function(e3) {
1627
+ function t3(e4) {
1628
+ var a3;
1629
+ return i(this, t3), (a3 = p(this, t3, [e4])).toggleCollapsed = function() {
1630
+ a3.setState({ collapsed: !a3.state.collapsed }, function() {
1631
+ se.set(a3.props.rjvId, a3.props.namespace, "collapsed", a3.state.collapsed);
1632
+ });
1633
+ }, a3.state = { collapsed: se.get(e4.rjvId, e4.namespace, "collapsed", true) }, a3;
1634
+ }
1635
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1636
+ var e4 = this.state.collapsed, t4 = this.props, a3 = t4.collapseStringsAfterLength, r2 = t4.theme, n2 = t4.escapeStrings, o2 = t4.value, s2 = "integer" === x(a3), i2 = { style: { cursor: "default" } };
1637
+ return n2 && (o2 = C(o2)), s2 && o2.length > a3 && (i2.style.cursor = "pointer", e4 && (o2 = v().createElement("span", null, o2.substring(0, a3), v().createElement("span", G(r2, "ellipsis"), " ...")))), v().createElement("div", G(r2, "string"), v().createElement(Q, Object.assign({ type_name: "string" }, t4)), v().createElement("span", Object.assign({ className: "string-value" }, i2, { onClick: this.toggleCollapsed }), '"', o2, '"'));
1638
+ } }]);
1639
+ }(v().PureComponent), pe = function(e3) {
1640
+ function t3() {
1641
+ return i(this, t3), p(this, t3, arguments);
1642
+ }
1643
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1644
+ return v().createElement("div", G(this.props.theme, "undefined"), "undefined");
1645
+ } }]);
1646
+ }(v().PureComponent), fe = function(e3) {
1647
+ function t3() {
1648
+ return i(this, t3), p(this, t3, arguments);
1649
+ }
1650
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1651
+ var e4 = this.props;
1652
+ return v().createElement("div", G(e4.theme, "bigNumber"), v().createElement(Q, Object.assign({ type_name: "bigNumber" }, e4)), this.props.value.toString());
1653
+ } }]);
1654
+ }(v().PureComponent);
1655
+ function he() {
1656
+ return he = Object.assign ? Object.assign.bind() : function(e3) {
1657
+ for (var t3 = 1; t3 < arguments.length; t3++) {
1658
+ var a3 = arguments[t3];
1659
+ for (var r2 in a3) ({}).hasOwnProperty.call(a3, r2) && (e3[r2] = a3[r2]);
1677
1660
  }
1678
- }) : null,
1679
- /* @__PURE__ */ jsx(Box, {
1680
- ref: highlightContainer,
1681
- className: "data-key-key",
1682
- component: "span",
1683
- children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ jsxs(Fragment, {
1684
- children: [
1685
- '"',
1686
- rootName,
1687
- '"'
1688
- ]
1689
- }) : /* @__PURE__ */ jsx(Fragment, {
1690
- children: rootName
1691
- }) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ jsx(KeyRenderer, {
1692
- ...downstreamProps
1693
- }) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ jsx(Box, {
1694
- component: "span",
1695
- style: {
1696
- color: numberKeyColor,
1697
- userSelect: isNumberKey ? "none" : "auto"
1698
- },
1699
- children: key
1700
- }) : quotesOnKeys ? /* @__PURE__ */ jsxs(Fragment, {
1701
- children: [
1702
- '"',
1703
- key,
1704
- '"'
1705
- ]
1706
- }) : /* @__PURE__ */ jsx(Fragment, {
1707
- children: key
1708
- }))
1709
- }),
1710
- isRoot ? rootName !== false && /* @__PURE__ */ jsx(DataBox, {
1711
- className: "data-key-colon",
1712
- sx: {
1713
- mr: 0.5
1714
- },
1715
- children: ":"
1716
- }) : nestedIndex === void 0 && /* @__PURE__ */ jsx(DataBox, {
1717
- className: "data-key-colon",
1718
- sx: {
1719
- mr: 0.5,
1720
- ".data-key-key:empty + &": {
1721
- display: "none"
1722
- },
1723
- userSelect: isNumberKey ? "none" : "auto"
1724
- },
1725
- children: ":"
1726
- }),
1727
- PreComponent && /* @__PURE__ */ jsx(PreComponent, {
1728
- ...downstreamProps
1729
- }),
1730
- isHover && expandable && inspect && actionIcons
1731
- ]
1732
- }),
1733
- editing && editable ? Editor && /* @__PURE__ */ jsx(Editor, {
1734
- path,
1735
- value: tempValue,
1736
- setValue: setTempValue,
1737
- abortEditing,
1738
- commitEditing
1739
- }) : Component ? /* @__PURE__ */ jsx(Component, {
1740
- ...downstreamProps
1741
- }) : /* @__PURE__ */ jsx(Box, {
1742
- component: "span",
1743
- className: "data-value-fallback",
1744
- children: "fallback: ".concat(value)
1745
- }),
1746
- PostComponent && /* @__PURE__ */ jsx(PostComponent, {
1747
- ...downstreamProps
1748
- }),
1749
- !last && displayComma && /* @__PURE__ */ jsx(DataBox, {
1750
- children: ","
1751
- }),
1752
- isHover && expandable && !inspect && actionIcons,
1753
- isHover && !expandable && actionIcons,
1754
- !isHover && editing && actionIcons
1755
- ]
1756
- });
1757
- };
1758
- const query = "(prefers-color-scheme: dark)";
1759
- function useThemeDetector() {
1760
- const [isDark, setIsDark] = useState(false);
1761
- useEffect(() => {
1762
- const listener = (e) => setIsDark(e.matches);
1763
- setIsDark(window.matchMedia(query).matches);
1764
- const queryMedia = window.matchMedia(query);
1765
- queryMedia.addEventListener("change", listener);
1766
- return () => queryMedia.removeEventListener("change", listener);
1767
- }, []);
1768
- return isDark;
1769
- }
1770
- function useSetIfNotUndefinedEffect(key, value) {
1771
- const { setState } = useContext(JsonViewerStoreContext);
1772
- useEffect(() => {
1773
- if (value !== void 0) {
1774
- setState({
1775
- [key]: value
1776
- });
1777
- }
1778
- }, [
1779
- key,
1780
- value,
1781
- setState
1782
- ]);
1783
- }
1784
- const JsonViewerInner = (props) => {
1785
- const { setState } = useContext(JsonViewerStoreContext);
1786
- useEffect(() => {
1787
- setState((state) => ({
1788
- prevValue: state.value,
1789
- value: props.value
1790
- }));
1791
- }, [
1792
- props.value,
1793
- setState
1794
- ]);
1795
- useSetIfNotUndefinedEffect("rootName", props.rootName);
1796
- useSetIfNotUndefinedEffect("indentWidth", props.indentWidth);
1797
- useSetIfNotUndefinedEffect("keyRenderer", props.keyRenderer);
1798
- useSetIfNotUndefinedEffect("enableAdd", props.enableAdd);
1799
- useSetIfNotUndefinedEffect("enableDelete", props.enableDelete);
1800
- useSetIfNotUndefinedEffect("enableClipboard", props.enableClipboard);
1801
- useSetIfNotUndefinedEffect("editable", props.editable);
1802
- useSetIfNotUndefinedEffect("onChange", props.onChange);
1803
- useSetIfNotUndefinedEffect("onCopy", props.onCopy);
1804
- useSetIfNotUndefinedEffect("onSelect", props.onSelect);
1805
- useSetIfNotUndefinedEffect("onAdd", props.onAdd);
1806
- useSetIfNotUndefinedEffect("onDelete", props.onDelete);
1807
- useSetIfNotUndefinedEffect("maxDisplayLength", props.maxDisplayLength);
1808
- useSetIfNotUndefinedEffect("groupArraysAfterLength", props.groupArraysAfterLength);
1809
- useSetIfNotUndefinedEffect("quotesOnKeys", props.quotesOnKeys);
1810
- useSetIfNotUndefinedEffect("displayDataTypes", props.displayDataTypes);
1811
- useSetIfNotUndefinedEffect("displaySize", props.displaySize);
1812
- useSetIfNotUndefinedEffect("displayComma", props.displayComma);
1813
- useSetIfNotUndefinedEffect("highlightUpdates", props.highlightUpdates);
1814
- useEffect(() => {
1815
- if (props.theme === "light") {
1816
- setState({
1817
- colorspace: lightColorspace
1818
- });
1819
- } else if (props.theme === "dark") {
1820
- setState({
1821
- colorspace: darkColorspace
1822
- });
1823
- } else if (typeof props.theme === "object") {
1824
- setState({
1825
- colorspace: props.theme
1826
- });
1827
- }
1828
- }, [
1829
- setState,
1830
- props.theme
1831
- ]);
1832
- const themeCls = useMemo(() => {
1833
- if (typeof props.theme === "object") return "json-viewer-theme-custom";
1834
- return props.theme === "dark" ? "json-viewer-theme-dark" : "json-viewer-theme-light";
1835
- }, [
1836
- props.theme
1837
- ]);
1838
- const onceRef = useRef(true);
1839
- const registerTypes = useTypeRegistryStore((store) => store.registerTypes);
1840
- if (onceRef.current) {
1841
- const allTypes = props.valueTypes ? [
1842
- ...predefinedTypes,
1843
- ...props.valueTypes
1844
- ] : [
1845
- ...predefinedTypes
1846
- ];
1847
- registerTypes(allTypes);
1848
- onceRef.current = false;
1849
- }
1850
- useEffect(() => {
1851
- const allTypes = props.valueTypes ? [
1852
- ...predefinedTypes,
1853
- ...props.valueTypes
1854
- ] : [
1855
- ...predefinedTypes
1856
- ];
1857
- registerTypes(allTypes);
1858
- }, [
1859
- props.valueTypes,
1860
- registerTypes
1861
- ]);
1862
- const value = useJsonViewerStore((store) => store.value);
1863
- const prevValue = useJsonViewerStore((store) => store.prevValue);
1864
- const emptyPath = useMemo(() => [], []);
1865
- const setHover = useJsonViewerStore((store) => store.setHover);
1866
- const onMouseLeave = useCallback(() => setHover(null), [
1867
- setHover
1868
- ]);
1869
- return /* @__PURE__ */ jsx(Paper, {
1870
- elevation: 0,
1871
- className: clsx(themeCls, props.className),
1872
- style: props.style,
1873
- sx: {
1874
- fontFamily: "monospace",
1875
- userSelect: "none",
1876
- contentVisibility: "auto",
1877
- ...props.sx
1878
- },
1879
- onMouseLeave,
1880
- children: /* @__PURE__ */ jsx(DataKeyPair, {
1881
- value,
1882
- prevValue,
1883
- path: emptyPath,
1884
- last: true
1885
- })
1886
- });
1887
- };
1888
- const JsonViewer = function JsonViewer2(props) {
1889
- const isAutoDarkTheme = useThemeDetector();
1890
- const themeType = useMemo(() => {
1891
- var _props_theme;
1892
- return props.theme === "auto" ? isAutoDarkTheme ? "dark" : "light" : (_props_theme = props.theme) !== null && _props_theme !== void 0 ? _props_theme : "light";
1893
- }, [
1894
- isAutoDarkTheme,
1895
- props.theme
1896
- ]);
1897
- const theme = useMemo(() => {
1898
- const backgroundColor = typeof themeType === "object" ? themeType.base00 : themeType === "dark" ? darkColorspace.base00 : lightColorspace.base00;
1899
- const foregroundColor = typeof themeType === "object" ? themeType.base07 : themeType === "dark" ? darkColorspace.base07 : lightColorspace.base07;
1900
- return createTheme({
1901
- components: {
1902
- MuiPaper: {
1903
- styleOverrides: {
1904
- root: {
1905
- backgroundColor,
1906
- color: foregroundColor
1661
+ return e3;
1662
+ }, he.apply(null, arguments);
1663
+ }
1664
+ const me = m.useLayoutEffect;
1665
+ var ve = function(e3, t3) {
1666
+ "function" != typeof e3 ? e3.current = t3 : e3(t3);
1667
+ };
1668
+ const ge = function(e3, t3) {
1669
+ var a3 = (0, m.useRef)();
1670
+ return (0, m.useCallback)(function(r2) {
1671
+ e3.current = r2, a3.current && ve(a3.current, null), a3.current = t3, t3 && ve(t3, r2);
1672
+ }, [t3]);
1673
+ };
1674
+ var ye = { "min-height": "0", "max-height": "none", height: "0", visibility: "hidden", overflow: "hidden", position: "absolute", "z-index": "-1000", top: "0", right: "0" }, ke = function(e3) {
1675
+ Object.keys(ye).forEach(function(t3) {
1676
+ e3.style.setProperty(t3, ye[t3], "important");
1677
+ });
1678
+ }, Ee = null;
1679
+ var je = function() {
1680
+ }, we = ["borderBottomWidth", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "boxSizing", "fontFamily", "fontSize", "fontStyle", "fontWeight", "letterSpacing", "lineHeight", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "tabSize", "textIndent", "textRendering", "textTransform", "width", "wordBreak"], xe = !!document.documentElement.currentStyle, Ce = function(e3) {
1681
+ var t3, a3, r2 = (t3 = e3, a3 = m.useRef(t3), me(function() {
1682
+ a3.current = t3;
1683
+ }), a3);
1684
+ (0, m.useLayoutEffect)(function() {
1685
+ var e4 = function(e5) {
1686
+ r2.current(e5);
1687
+ };
1688
+ return window.addEventListener("resize", e4), function() {
1689
+ window.removeEventListener("resize", e4);
1690
+ };
1691
+ }, []);
1692
+ }, Oe = function(e3, t3) {
1693
+ var a3 = e3.cacheMeasurements, r2 = e3.maxRows, n2 = e3.minRows, o2 = e3.onChange, s2 = void 0 === o2 ? je : o2, i2 = e3.onHeightChange, l2 = void 0 === i2 ? je : i2, c2 = j(e3, ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"]);
1694
+ var u2 = void 0 !== c2.value, d2 = (0, m.useRef)(null), b2 = ge(d2, t3), p2 = (0, m.useRef)(0), f2 = (0, m.useRef)(), h2 = function() {
1695
+ var e4 = d2.current, t4 = a3 && f2.current ? f2.current : function(e5) {
1696
+ var t5 = window.getComputedStyle(e5);
1697
+ if (null === t5) return null;
1698
+ var a4, r3 = (a4 = t5, we.reduce(function(e6, t6) {
1699
+ return e6[t6] = a4[t6], e6;
1700
+ }, {})), n3 = r3.boxSizing;
1701
+ return "" === n3 ? null : (xe && "border-box" === n3 && (r3.width = parseFloat(r3.width) + parseFloat(r3.borderRightWidth) + parseFloat(r3.borderLeftWidth) + parseFloat(r3.paddingRight) + parseFloat(r3.paddingLeft) + "px"), { sizingStyle: r3, paddingSize: parseFloat(r3.paddingBottom) + parseFloat(r3.paddingTop), borderSize: parseFloat(r3.borderBottomWidth) + parseFloat(r3.borderTopWidth) });
1702
+ }(e4);
1703
+ if (t4) {
1704
+ f2.current = t4;
1705
+ var o3 = function(e5, t5, a4, r3) {
1706
+ void 0 === a4 && (a4 = 1), void 0 === r3 && (r3 = 1 / 0), Ee || ((Ee = document.createElement("textarea")).setAttribute("tabindex", "-1"), Ee.setAttribute("aria-hidden", "true"), ke(Ee)), null === Ee.parentNode && document.body.appendChild(Ee);
1707
+ var n3 = e5.paddingSize, o4 = e5.borderSize, s4 = e5.sizingStyle, i4 = s4.boxSizing;
1708
+ Object.keys(s4).forEach(function(e6) {
1709
+ var t6 = e6;
1710
+ Ee.style[t6] = s4[t6];
1711
+ }), ke(Ee), Ee.value = t5;
1712
+ var l3 = function(e6, t6) {
1713
+ var a5 = e6.scrollHeight;
1714
+ return "border-box" === t6.sizingStyle.boxSizing ? a5 + t6.borderSize : a5 - t6.paddingSize;
1715
+ }(Ee, e5);
1716
+ Ee.value = "x";
1717
+ var c3 = Ee.scrollHeight - n3, u3 = c3 * a4;
1718
+ "border-box" === i4 && (u3 = u3 + n3 + o4), l3 = Math.max(u3, l3);
1719
+ var d3 = c3 * r3;
1720
+ return "border-box" === i4 && (d3 = d3 + n3 + o4), [l3 = Math.min(d3, l3), c3];
1721
+ }(t4, e4.value || e4.placeholder || "x", n2, r2), s3 = o3[0], i3 = o3[1];
1722
+ p2.current !== s3 && (p2.current = s3, e4.style.setProperty("height", s3 + "px", "important"), l2(s3, { rowHeight: i3 }));
1907
1723
  }
1724
+ };
1725
+ return (0, m.useLayoutEffect)(h2), Ce(h2), (0, m.createElement)("textarea", he({}, c2, { onChange: function(e4) {
1726
+ u2 || h2(), s2(e4);
1727
+ }, ref: b2 }));
1728
+ };
1729
+ const Me = (0, m.forwardRef)(Oe);
1730
+ function Se(e3, t3) {
1731
+ e3 = e3.trim();
1732
+ try {
1733
+ if ("[" === (e3 = structuredClone(e3))[0]) return _e("array", JSON.parse(e3));
1734
+ if ("{" === e3[0]) return _e("object", JSON.parse(e3));
1735
+ if (e3.match(/\-?\d+\.\d+/) && e3.match(/\-?\d+\.\d+/)[0] === e3) return t3 && parseFloat(e3).toString() !== e3 ? _e("bigNumber", e3) : _e("float", parseFloat(e3));
1736
+ if (e3.match(/\-?\d+e-\d+/) && e3.match(/\-?\d+e-\d+/)[0] === e3) return _e("float", Number(e3));
1737
+ if (e3.match(/\-?\d+/) && e3.match(/\-?\d+/)[0] === e3) return t3 && parseInt(e3).toString() !== e3 ? _e("bigNumber", e3) : _e("integer", parseInt(e3));
1738
+ if (e3.match(/\-?\d+e\+\d+/) && e3.match(/\-?\d+e\+\d+/)[0] === e3) return _e("integer", Number(e3));
1739
+ } catch (e4) {
1740
+ }
1741
+ switch (e3 = e3.toLowerCase()) {
1742
+ case "undefined":
1743
+ return _e("undefined", void 0);
1744
+ case "nan":
1745
+ return _e("nan", NaN);
1746
+ case "null":
1747
+ return _e("null", null);
1748
+ case "true":
1749
+ return _e("boolean", true);
1750
+ case "false":
1751
+ return _e("boolean", false);
1752
+ default:
1753
+ if (e3 = Date.parse(e3)) return _e("date", new Date(e3));
1908
1754
  }
1755
+ return _e(false, null);
1909
1756
  }
1910
- },
1911
- palette: {
1912
- mode: themeType === "dark" ? "dark" : "light",
1913
- background: {
1914
- default: backgroundColor
1757
+ function _e(e3, t3) {
1758
+ return { type: e3, value: t3 };
1915
1759
  }
1916
- }
1917
- });
1918
- }, [
1919
- themeType
1920
- ]);
1921
- const mixedProps = {
1922
- ...props,
1923
- theme: themeType
1924
- };
1925
- const jsonViewerStore = useMemo(() => createJsonViewerStore(props), []);
1926
- const typeRegistryStore = useMemo(() => createTypeRegistryStore(), []);
1927
- return /* @__PURE__ */ jsx(ThemeProvider, {
1928
- theme,
1929
- children: /* @__PURE__ */ jsx(TypeRegistryStoreContext.Provider, {
1930
- value: typeRegistryStore,
1931
- children: /* @__PURE__ */ jsx(JsonViewerStoreContext.Provider, {
1932
- value: jsonViewerStore,
1933
- children: /* @__PURE__ */ jsx(JsonViewerInner, {
1934
- ...mixedProps
1935
- })
1936
- })
1937
- })
1938
- });
1939
- };
1760
+ var Ae = ["style"], Fe = ["style"], Pe = ["style"], De = ["style"], Ie = ["style"], Re = ["style"], ze = ["style"], Be = ["style"], Ne = ["style"], Le = ["style"], qe = ["style"], Ve = ["style"], Te = function(e3) {
1761
+ function t3() {
1762
+ return i(this, t3), p(this, t3, arguments);
1763
+ }
1764
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1765
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, Ae);
1766
+ return v().createElement("span", a3, v().createElement("svg", Object.assign({}, et(t4), { viewBox: "0 0 24 24", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), v().createElement("path", { d: "M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7" })));
1767
+ } }]);
1768
+ }(v().PureComponent), Ke = function(e3) {
1769
+ function t3() {
1770
+ return i(this, t3), p(this, t3, arguments);
1771
+ }
1772
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1773
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, Fe);
1774
+ return v().createElement("span", a3, v().createElement("svg", Object.assign({}, et(t4), { viewBox: "0 0 24 24", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), v().createElement("path", { d: "M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z" })));
1775
+ } }]);
1776
+ }(v().PureComponent), We = function(e3) {
1777
+ function t3() {
1778
+ return i(this, t3), p(this, t3, arguments);
1779
+ }
1780
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1781
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, Pe), r2 = et(t4).style;
1782
+ return v().createElement("span", a3, v().createElement("svg", { fill: r2.color, width: r2.height, height: r2.width, style: r2, viewBox: "0 0 1792 1792" }, v().createElement("path", { d: "M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z" })));
1783
+ } }]);
1784
+ }(v().PureComponent), Ue = function(e3) {
1785
+ function t3() {
1786
+ return i(this, t3), p(this, t3, arguments);
1787
+ }
1788
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1789
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, De), r2 = et(t4).style;
1790
+ return v().createElement("span", a3, v().createElement("svg", { fill: r2.color, width: r2.height, height: r2.width, style: r2, viewBox: "0 0 1792 1792" }, v().createElement("path", { d: "M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z" })));
1791
+ } }]);
1792
+ }(v().PureComponent), He = function(e3) {
1793
+ function t3() {
1794
+ return i(this, t3), p(this, t3, arguments);
1795
+ }
1796
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1797
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, Ie);
1798
+ return v().createElement("span", a3, v().createElement("svg", { style: s(s({}, et(t4).style), {}, { paddingLeft: "2px", verticalAlign: "top" }), viewBox: "0 0 15 15", fill: "currentColor" }, v().createElement("path", { d: "M0 14l6-6-6-6z" })));
1799
+ } }]);
1800
+ }(v().PureComponent), $e = function(e3) {
1801
+ function t3() {
1802
+ return i(this, t3), p(this, t3, arguments);
1803
+ }
1804
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1805
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, Re);
1806
+ return v().createElement("span", a3, v().createElement("svg", { style: s(s({}, et(t4).style), {}, { paddingLeft: "2px", verticalAlign: "top" }), viewBox: "0 0 15 15", fill: "currentColor" }, v().createElement("path", { d: "M0 5l6 6 6-6z" })));
1807
+ } }]);
1808
+ }(v().PureComponent), Ye = function(e3) {
1809
+ function t3() {
1810
+ return i(this, t3), p(this, t3, arguments);
1811
+ }
1812
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1813
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, ze);
1814
+ return v().createElement("span", a3, v().createElement("svg", Object.assign({}, et(t4), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), v().createElement("g", null, v().createElement("path", { d: "m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z" }))));
1815
+ } }]);
1816
+ }(v().PureComponent), Je = function(e3) {
1817
+ function t3() {
1818
+ return i(this, t3), p(this, t3, arguments);
1819
+ }
1820
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1821
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, Be);
1822
+ return v().createElement("span", a3, v().createElement("svg", Object.assign({}, et(t4), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), v().createElement("g", null, v().createElement("path", { d: "m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z" }))));
1823
+ } }]);
1824
+ }(v().PureComponent), Ge = function(e3) {
1825
+ function t3() {
1826
+ return i(this, t3), p(this, t3, arguments);
1827
+ }
1828
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1829
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, Ne);
1830
+ return v().createElement("span", a3, v().createElement("svg", Object.assign({}, et(t4), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), v().createElement("g", null, v().createElement("path", { d: "m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z" }))));
1831
+ } }]);
1832
+ }(v().PureComponent), Qe = function(e3) {
1833
+ function t3() {
1834
+ return i(this, t3), p(this, t3, arguments);
1835
+ }
1836
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1837
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, Le);
1838
+ return v().createElement("span", a3, v().createElement("svg", Object.assign({}, et(t4), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), v().createElement("g", null, v().createElement("path", { d: "m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z" }))));
1839
+ } }]);
1840
+ }(v().PureComponent), Ze = function(e3) {
1841
+ function t3() {
1842
+ return i(this, t3), p(this, t3, arguments);
1843
+ }
1844
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1845
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, qe);
1846
+ return v().createElement("span", a3, v().createElement("svg", Object.assign({}, et(t4), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), v().createElement("g", null, v().createElement("path", { d: "m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z" }))));
1847
+ } }]);
1848
+ }(v().PureComponent), Xe = function(e3) {
1849
+ function t3() {
1850
+ return i(this, t3), p(this, t3, arguments);
1851
+ }
1852
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
1853
+ var e4 = this.props, t4 = e4.style, a3 = w(e4, Ve);
1854
+ return v().createElement("span", a3, v().createElement("svg", Object.assign({}, et(t4), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), v().createElement("g", null, v().createElement("path", { d: "m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z" }))));
1855
+ } }]);
1856
+ }(v().PureComponent);
1857
+ function et(e3) {
1858
+ return e3 || (e3 = {}), { style: s(s({ verticalAlign: "middle" }, e3), {}, { color: e3.color ? e3.color : "#000000", height: "1em", width: "1em" }) };
1859
+ }
1860
+ var tt = function(e3) {
1861
+ function t3(e4) {
1862
+ var a3;
1863
+ return i(this, t3), (a3 = p(this, t3, [e4])).copiedTimer = null, a3.copyToClipboardFallback = function(e5) {
1864
+ var t4 = document.createElement("textarea");
1865
+ t4.value = e5, document.body.appendChild(t4), t4.select(), document.execCommand("copy"), document.body.removeChild(t4);
1866
+ }, a3.handleCopy = function() {
1867
+ var e5 = a3.props, t4 = e5.clickCallback, r2 = e5.src, n2 = e5.namespace, o2 = JSON.stringify(a3.clipboardValue(r2), null, " ");
1868
+ navigator.clipboard ? navigator.clipboard.writeText(o2).catch(function() {
1869
+ a3.copyToClipboardFallback(o2);
1870
+ }) : a3.copyToClipboardFallback(o2), a3.copiedTimer = setTimeout(function() {
1871
+ a3.setState({ copied: false });
1872
+ }, 5500), a3.setState({ copied: true }, function() {
1873
+ "function" == typeof t4 && t4({ src: r2, namespace: n2, name: n2[n2.length - 1] });
1874
+ });
1875
+ }, a3.getClippyIcon = function() {
1876
+ var e5 = a3.props.theme;
1877
+ return a3.state.copied ? v().createElement("span", null, v().createElement(Ye, Object.assign({ className: "copy-icon" }, G(e5, "copy-icon"))), v().createElement("span", G(e5, "copy-icon-copied"), "✔")) : v().createElement(Ye, Object.assign({ className: "copy-icon" }, G(e5, "copy-icon")));
1878
+ }, a3.clipboardValue = function(e5) {
1879
+ switch (x(e5)) {
1880
+ case "function":
1881
+ case "regexp":
1882
+ return e5.toString();
1883
+ default:
1884
+ return e5;
1885
+ }
1886
+ }, a3.state = { copied: false }, a3;
1887
+ }
1888
+ return h(t3, e3), c(t3, [{ key: "componentWillUnmount", value: function() {
1889
+ this.copiedTimer && (clearTimeout(this.copiedTimer), this.copiedTimer = null);
1890
+ } }, { key: "render", value: function() {
1891
+ var e4 = this.props, t4 = (e4.src, e4.theme), a3 = e4.hidden, r2 = e4.rowHovered, n2 = G(t4, "copy-to-clipboard").style, o2 = "inline";
1892
+ return a3 && (o2 = "none"), v().createElement("span", { className: "copy-to-clipboard-container", title: "Copy to clipboard", style: { verticalAlign: "top", display: r2 ? "inline-block" : "none" } }, v().createElement("span", { style: s(s({}, n2), {}, { display: o2 }), onClick: this.handleCopy }, this.getClippyIcon()));
1893
+ } }]);
1894
+ }(v().PureComponent);
1895
+ const at = function(e3) {
1896
+ function t3(e4) {
1897
+ var a3;
1898
+ return i(this, t3), (a3 = p(this, t3, [e4])).getEditIcon = function() {
1899
+ var e5 = a3.props, t4 = e5.variable, r2 = e5.theme;
1900
+ return v().createElement("div", { className: "click-to-edit", style: { verticalAlign: "top", display: a3.state.hovered ? "inline-block" : "none" } }, v().createElement(Ze, Object.assign({ className: "click-to-edit-icon" }, G(r2, "editVarIcon"), { onClick: function() {
1901
+ a3.prepopInput(t4);
1902
+ } })));
1903
+ }, a3.prepopInput = function(e5) {
1904
+ if (false !== a3.props.onEdit) {
1905
+ var t4 = function(e6, t5) {
1906
+ var a4;
1907
+ switch (x(e6, t5)) {
1908
+ case "undefined":
1909
+ a4 = "undefined";
1910
+ break;
1911
+ case "nan":
1912
+ a4 = "NaN";
1913
+ break;
1914
+ case "string":
1915
+ a4 = e6;
1916
+ break;
1917
+ case "bigNumber":
1918
+ case "date":
1919
+ case "function":
1920
+ case "regexp":
1921
+ a4 = e6.toString();
1922
+ break;
1923
+ default:
1924
+ try {
1925
+ a4 = JSON.stringify(e6, null, " ");
1926
+ } catch (e7) {
1927
+ a4 = "";
1928
+ }
1929
+ }
1930
+ return a4;
1931
+ }(e5.value, a3.props.bigNumber), r2 = Se(t4, a3.props.bigNumber);
1932
+ a3.setState({ editMode: true, editValue: t4, parsedInput: { type: r2.type, value: r2.value } });
1933
+ }
1934
+ }, a3.getRemoveIcon = function() {
1935
+ var e5 = a3.props, t4 = e5.variable, r2 = e5.namespace, n2 = e5.theme, o2 = e5.rjvId;
1936
+ return v().createElement("div", { className: "click-to-remove", style: { verticalAlign: "top", display: a3.state.hovered ? "inline-block" : "none" } }, v().createElement(Je, Object.assign({ className: "click-to-remove-icon" }, G(n2, "removeVarIcon"), { onClick: function() {
1937
+ ne.dispatch({ name: "VARIABLE_REMOVED", rjvId: o2, data: { name: t4.name, namespace: r2, existing_value: t4.value, variable_removed: true } });
1938
+ } })));
1939
+ }, a3.getValue = function(e5, t4) {
1940
+ var r2 = !t4 && e5.type, n2 = a3.props;
1941
+ switch (r2) {
1942
+ case false:
1943
+ return a3.getEditInput();
1944
+ case "string":
1945
+ return v().createElement(be, Object.assign({ value: e5.value }, n2));
1946
+ case "integer":
1947
+ return v().createElement(ue, Object.assign({ value: e5.value }, n2));
1948
+ case "float":
1949
+ return v().createElement(ee, Object.assign({ value: e5.value }, n2));
1950
+ case "boolean":
1951
+ return v().createElement(Z, Object.assign({ value: e5.value }, n2));
1952
+ case "function":
1953
+ return v().createElement(ie, Object.assign({ value: e5.value }, n2));
1954
+ case "null":
1955
+ return v().createElement(ce, n2);
1956
+ case "nan":
1957
+ return v().createElement(le, n2);
1958
+ case "undefined":
1959
+ return v().createElement(pe, n2);
1960
+ case "date":
1961
+ return v().createElement(X, Object.assign({ value: e5.value }, n2));
1962
+ case "regexp":
1963
+ return v().createElement(de, Object.assign({ value: e5.value }, n2));
1964
+ case "bigNumber":
1965
+ return v().createElement(fe, Object.assign({ value: e5.value }, n2));
1966
+ default:
1967
+ return v().createElement("div", { className: "object-value" }, JSON.stringify(e5.value));
1968
+ }
1969
+ }, a3.getEditInput = function() {
1970
+ var e5 = a3.props, t4 = e5.keyModifier, r2 = e5.selectOnFocus, n2 = e5.theme, o2 = a3.state.editValue;
1971
+ return v().createElement("div", null, v().createElement(Me, Object.assign({ type: "text", ref: function(e6) {
1972
+ e6 && e6[r2 ? "select" : "focus"]();
1973
+ }, value: o2, className: "variable-editor", onChange: function(e6) {
1974
+ var t5 = e6.target.value, r3 = Se(t5, a3.props.bigNumber);
1975
+ a3.setState({ editValue: t5, parsedInput: { type: r3.type, value: r3.value } });
1976
+ }, onKeyDown: function(e6) {
1977
+ switch (e6.key) {
1978
+ case "Escape":
1979
+ a3.setState({ editMode: false, editValue: "" });
1980
+ break;
1981
+ case "Enter":
1982
+ t4(e6, "submit") && a3.submitEdit(true);
1983
+ }
1984
+ e6.stopPropagation();
1985
+ }, placeholder: "update this value", minRows: 2 }, G(n2, "edit-input"))), v().createElement("div", G(n2, "edit-icon-container"), v().createElement(Je, Object.assign({ className: "edit-cancel" }, G(n2, "cancel-icon"), { onClick: function(e6) {
1986
+ e6 && e6.stopPropagation(), a3.setState({ editMode: false, editValue: "" });
1987
+ } })), v().createElement(Xe, Object.assign({ className: "edit-check string-value" }, G(n2, "check-icon"), { onClick: function(e6) {
1988
+ e6 && e6.stopPropagation(), a3.submitEdit();
1989
+ } })), v().createElement("div", null, a3.showDetected())));
1990
+ }, a3.submitEdit = function(e5) {
1991
+ var t4 = a3.props, r2 = t4.variable, n2 = t4.namespace, o2 = t4.rjvId, s2 = t4.bigNumber, i2 = a3.state, l2 = i2.editValue, c2 = i2.parsedInput, u2 = l2;
1992
+ e5 && c2.type && (u2 = c2.value, s2 && "bigNumber" === c2.type && (u2 = new s2(u2))), a3.setState({ editMode: false }), ne.dispatch({ name: "VARIABLE_UPDATED", rjvId: o2, data: { name: r2.name, namespace: n2, existing_value: r2.value, new_value: u2, variable_removed: false } });
1993
+ }, a3.showDetected = function() {
1994
+ var e5 = a3.props, t4 = e5.theme, r2 = (e5.variable, e5.namespace, e5.rjvId, a3.state.parsedInput), n2 = (r2.type, r2.value, a3.getDetectedInput());
1995
+ if (n2) return v().createElement("div", null, v().createElement("div", G(t4, "detected-row"), n2, v().createElement(Xe, { className: "edit-check detected", style: s({ verticalAlign: "top", paddingLeft: "3px" }, G(t4, "check-icon").style), onClick: function(e6) {
1996
+ e6 && e6.stopPropagation(), a3.submitEdit(true);
1997
+ } })));
1998
+ }, a3.getDetectedInput = function() {
1999
+ var e5 = a3.state.parsedInput, t4 = e5.type, r2 = e5.value, n2 = a3.props, o2 = n2.theme;
2000
+ if (false !== t4) switch (t4.toLowerCase()) {
2001
+ case "object":
2002
+ return v().createElement("span", null, v().createElement("span", { style: s(s({}, G(o2, "brace").style), {}, { cursor: "default" }) }, "{"), v().createElement("span", { style: s(s({}, G(o2, "ellipsis").style), {}, { cursor: "default" }) }, "..."), v().createElement("span", { style: s(s({}, G(o2, "brace").style), {}, { cursor: "default" }) }, "}"));
2003
+ case "array":
2004
+ return v().createElement("span", null, v().createElement("span", { style: s(s({}, G(o2, "brace").style), {}, { cursor: "default" }) }, "["), v().createElement("span", { style: s(s({}, G(o2, "ellipsis").style), {}, { cursor: "default" }) }, "..."), v().createElement("span", { style: s(s({}, G(o2, "brace").style), {}, { cursor: "default" }) }, "]"));
2005
+ case "string":
2006
+ return v().createElement(be, Object.assign({ value: r2 }, n2));
2007
+ case "integer":
2008
+ return v().createElement(ue, Object.assign({ value: r2 }, n2));
2009
+ case "float":
2010
+ return v().createElement(ee, Object.assign({ value: r2 }, n2));
2011
+ case "boolean":
2012
+ return v().createElement(Z, Object.assign({ value: r2 }, n2));
2013
+ case "function":
2014
+ return v().createElement(ie, Object.assign({ value: r2 }, n2));
2015
+ case "null":
2016
+ return v().createElement(ce, n2);
2017
+ case "nan":
2018
+ return v().createElement(le, n2);
2019
+ case "undefined":
2020
+ return v().createElement(pe, n2);
2021
+ case "date":
2022
+ return v().createElement(X, Object.assign({ value: new Date(r2) }, n2));
2023
+ case "bignumber":
2024
+ return v().createElement(fe, Object.assign({ value: r2 }, n2));
2025
+ }
2026
+ }, a3.state = { editMode: false, editValue: "", hovered: false, renameKey: false, parsedInput: { type: false, value: null } }, a3;
2027
+ }
2028
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
2029
+ var e4 = this, t4 = this.props, a3 = t4.variable, r2 = t4.singleIndent, n2 = t4.type, o2 = t4.theme, i2 = t4.namespace, l2 = t4.indentWidth, c2 = t4.enableClipboard, u2 = t4.onEdit, d2 = t4.onDelete, b2 = t4.onSelect, p2 = t4.displayArrayKey, f2 = t4.quotesOnKeys, h2 = t4.keyModifier, m2 = this.state.editMode;
2030
+ return v().createElement("div", Object.assign({}, G(o2, "objectKeyVal", { paddingLeft: l2 * r2 }), { onMouseEnter: function() {
2031
+ return e4.setState(s(s({}, e4.state), {}, { hovered: true }));
2032
+ }, onMouseLeave: function() {
2033
+ return e4.setState(s(s({}, e4.state), {}, { hovered: false }));
2034
+ }, className: "variable-row", key: a3.name }), "array" == n2 ? p2 ? v().createElement("span", Object.assign({}, G(o2, "array-key"), { key: a3.name + "_" + i2 }), a3.name, v().createElement("div", G(o2, "colon"), ":")) : null : v().createElement("span", null, v().createElement("span", Object.assign({}, G(o2, "object-name"), { className: "object-key", key: a3.name + "_" + i2 }), !!f2 && v().createElement("span", { style: { verticalAlign: "top" } }, '"'), v().createElement("span", { style: { display: "inline-block" } }, C(a3.name)), !!f2 && v().createElement("span", { style: { verticalAlign: "top" } }, '"')), v().createElement("span", G(o2, "colon"), ":")), v().createElement("div", Object.assign({ className: "variable-value", onClick: false === b2 && false === u2 ? null : function(t5) {
2035
+ var r3 = te(i2);
2036
+ h2(t5, "edit") && false !== u2 ? e4.prepopInput(a3) : false !== b2 && (r3.shift(), b2(s(s({}, a3), {}, { namespace: r3 })));
2037
+ } }, G(o2, "variableValue", { cursor: false === b2 ? "default" : "pointer" })), this.getValue(a3, m2)), c2 ? v().createElement(tt, { rowHovered: this.state.hovered, hidden: m2, src: a3.value, clickCallback: c2, theme: o2, namespace: [].concat(te(i2), [a3.name]) }) : null, false !== u2 && 0 == m2 ? this.getEditIcon() : null, false !== d2 && 0 == m2 ? this.getRemoveIcon() : null);
2038
+ } }]);
2039
+ }(v().PureComponent);
2040
+ var rt = function(e3) {
2041
+ function t3() {
2042
+ var e4;
2043
+ i(this, t3);
2044
+ for (var a3 = arguments.length, r2 = new Array(a3), n2 = 0; n2 < a3; n2++) r2[n2] = arguments[n2];
2045
+ return (e4 = p(this, t3, [].concat(r2))).getObjectSize = function() {
2046
+ var t4 = e4.props, a4 = t4.size, r3 = t4.theme;
2047
+ if (t4.displayObjectSize) return v().createElement("span", Object.assign({ className: "object-size" }, G(r3, "object-size")), a4, " item", 1 === a4 ? "" : "s");
2048
+ }, e4.getAddAttribute = function(t4) {
2049
+ var a4 = e4.props, r3 = a4.theme, n3 = a4.namespace, o2 = a4.name, i2 = a4.src, l2 = a4.rjvId, c2 = a4.depth;
2050
+ return v().createElement("span", { className: "click-to-add", style: { verticalAlign: "top", display: t4 ? "inline-block" : "none" } }, v().createElement(Ge, Object.assign({ className: "click-to-add-icon" }, G(r3, "addVarIcon"), { onClick: function() {
2051
+ var e5 = { name: c2 > 0 ? o2 : null, namespace: n3.splice(0, n3.length - 1), existing_value: i2, variable_removed: false, key_name: null };
2052
+ "object" === x(i2) ? ne.dispatch({ name: "ADD_VARIABLE_KEY_REQUEST", rjvId: l2, data: e5 }) : ne.dispatch({ name: "VARIABLE_ADDED", rjvId: l2, data: s(s({}, e5), {}, { new_value: [].concat(te(i2), [null]) }) });
2053
+ } })));
2054
+ }, e4.getRemoveObject = function(t4) {
2055
+ var a4 = e4.props, r3 = a4.theme, n3 = (a4.hover, a4.namespace), o2 = a4.name, s2 = a4.src, i2 = a4.rjvId;
2056
+ if (1 !== n3.length) return v().createElement("span", { className: "click-to-remove", style: { display: t4 ? "inline-block" : "none" } }, v().createElement(Je, Object.assign({ className: "click-to-remove-icon" }, G(r3, "removeVarIcon"), { onClick: function() {
2057
+ ne.dispatch({ name: "VARIABLE_REMOVED", rjvId: i2, data: { name: o2, namespace: n3.splice(0, n3.length - 1), existing_value: s2, variable_removed: true } });
2058
+ } })));
2059
+ }, e4.render = function() {
2060
+ var t4 = e4.props, a4 = t4.theme, r3 = t4.onDelete, n3 = t4.onAdd, o2 = t4.enableClipboard, s2 = t4.src, i2 = t4.namespace, l2 = t4.rowHovered;
2061
+ return v().createElement("div", Object.assign({}, G(a4, "object-meta-data"), { className: "object-meta-data", onClick: function(e5) {
2062
+ e5.stopPropagation();
2063
+ } }), e4.getObjectSize(), o2 ? v().createElement(tt, { rowHovered: l2, clickCallback: o2, src: s2, theme: a4, namespace: i2 }) : null, false !== n3 ? e4.getAddAttribute(l2) : null, false !== r3 ? e4.getRemoveObject(l2) : null);
2064
+ }, e4;
2065
+ }
2066
+ return h(t3, e3), c(t3);
2067
+ }(v().PureComponent);
2068
+ function nt(e3) {
2069
+ var t3 = e3.parent_type, a3 = e3.namespace, r2 = e3.quotesOnKeys, n2 = e3.theme, o2 = e3.jsvRoot, s2 = e3.name, i2 = e3.displayArrayKey, l2 = e3.name ? e3.name : "";
2070
+ return !o2 || false !== s2 && null !== s2 ? "array" == t3 ? i2 ? v().createElement("span", Object.assign({}, G(n2, "array-key"), { key: a3 }), v().createElement("span", { className: "array-key" }, l2), v().createElement("span", G(n2, "colon"), ":")) : v().createElement("span", null) : v().createElement("span", Object.assign({}, G(n2, "object-name"), { key: a3 }), v().createElement("span", { className: "object-key" }, r2 && v().createElement("span", { style: { verticalAlign: "top" } }, '"'), v().createElement("span", null, l2), r2 && v().createElement("span", { style: { verticalAlign: "top" } }, '"')), v().createElement("span", G(n2, "colon"), ":")) : v().createElement("span", null);
2071
+ }
2072
+ function ot(e3) {
2073
+ var t3 = e3.theme;
2074
+ switch (e3.iconStyle) {
2075
+ case "triangle":
2076
+ return v().createElement($e, Object.assign({}, G(t3, "expanded-icon"), { className: "expanded-icon" }));
2077
+ case "square":
2078
+ return v().createElement(We, Object.assign({}, G(t3, "expanded-icon"), { className: "expanded-icon" }));
2079
+ default:
2080
+ return v().createElement(Te, Object.assign({}, G(t3, "expanded-icon"), { className: "expanded-icon" }));
2081
+ }
2082
+ }
2083
+ function st(e3) {
2084
+ var t3 = e3.theme;
2085
+ switch (e3.iconStyle) {
2086
+ case "triangle":
2087
+ return v().createElement(He, Object.assign({}, G(t3, "collapsed-icon"), { className: "collapsed-icon" }));
2088
+ case "square":
2089
+ return v().createElement(Ue, Object.assign({}, G(t3, "collapsed-icon"), { className: "collapsed-icon" }));
2090
+ default:
2091
+ return v().createElement(Ke, Object.assign({}, G(t3, "collapsed-icon"), { className: "collapsed-icon" }));
2092
+ }
2093
+ }
2094
+ var it = ["src", "groupArraysAfterLength", "depth", "name", "theme", "jsvRoot", "namespace", "parent_type"], lt = function(e3) {
2095
+ function t3(e4) {
2096
+ var a3;
2097
+ return i(this, t3), (a3 = p(this, t3, [e4])).toggleCollapsed = function(e5) {
2098
+ var t4 = [];
2099
+ for (var r2 in a3.state.expanded) t4.push(a3.state.expanded[r2]);
2100
+ t4[e5] = !t4[e5], a3.setState({ expanded: t4 });
2101
+ }, a3.state = { expanded: [] }, a3;
2102
+ }
2103
+ return h(t3, e3), c(t3, [{ key: "getExpandedIcon", value: function(e4) {
2104
+ var t4 = this.props, a3 = t4.theme, r2 = t4.iconStyle;
2105
+ return this.state.expanded[e4] ? v().createElement(ot, { theme: a3, iconStyle: r2 }) : v().createElement(st, { theme: a3, iconStyle: r2 });
2106
+ } }, { key: "render", value: function() {
2107
+ var e4 = this, t4 = this.props, a3 = t4.src, r2 = t4.groupArraysAfterLength, n2 = (t4.depth, t4.name), o2 = t4.theme, s2 = t4.jsvRoot, i2 = t4.namespace, l2 = (t4.parent_type, w(t4, it)), c2 = 0, u2 = 5 * this.props.indentWidth;
2108
+ s2 || (c2 = 5 * this.props.indentWidth);
2109
+ var d2 = r2, b2 = Math.ceil(a3.length / d2);
2110
+ return v().createElement("div", Object.assign({ className: "object-key-val" }, G(o2, s2 ? "jsv-root" : "objectKeyVal", { paddingLeft: c2 })), v().createElement(nt, this.props), v().createElement("span", null, v().createElement(rt, Object.assign({ size: a3.length }, this.props))), te(Array(b2)).map(function(t5, r3) {
2111
+ return v().createElement("div", Object.assign({ key: r3, className: "object-key-val array-group" }, G(o2, "objectKeyVal", { marginLeft: 6, paddingLeft: u2 })), v().createElement("span", G(o2, "brace-row"), v().createElement("div", Object.assign({ className: "icon-container" }, G(o2, "icon-container"), { onClick: function(t6) {
2112
+ e4.toggleCollapsed(r3);
2113
+ } }), e4.getExpandedIcon(r3)), e4.state.expanded[r3] ? v().createElement(bt, Object.assign({ key: n2 + r3, depth: 0, name: false, collapsed: false, groupArraysAfterLength: d2, index_offset: r3 * d2, src: a3.slice(r3 * d2, r3 * d2 + d2), namespace: i2, type: "array", parent_type: "array_group", theme: o2 }, l2)) : v().createElement("span", Object.assign({}, G(o2, "brace"), { onClick: function(t6) {
2114
+ e4.toggleCollapsed(r3);
2115
+ }, className: "array-group-brace" }), "[", v().createElement("div", Object.assign({}, G(o2, "array-group-meta-data"), { className: "array-group-meta-data" }), v().createElement("span", Object.assign({ className: "object-size" }, G(o2, "object-size")), r3 * d2, " - ", r3 * d2 + d2 > a3.length ? a3.length : r3 * d2 + d2)), "]")));
2116
+ }));
2117
+ } }]);
2118
+ }(v().PureComponent), ct = ["depth", "src", "namespace", "name", "type", "parent_type", "theme", "jsvRoot", "iconStyle"], ut = function(e3) {
2119
+ function t3(e4) {
2120
+ var a3;
2121
+ i(this, t3), (a3 = p(this, t3, [e4])).toggleCollapsed = function() {
2122
+ a3.setState({ expanded: !a3.state.expanded }, function() {
2123
+ se.set(a3.props.rjvId, a3.props.namespace, "expanded", a3.state.expanded);
2124
+ });
2125
+ }, a3.getObjectContent = function(e5, t4, r3) {
2126
+ return v().createElement("div", { className: "pushed-content object-container" }, v().createElement("div", Object.assign({ className: "object-content" }, G(a3.props.theme, "pushed-content")), a3.renderObjectContents(t4, r3)));
2127
+ }, a3.getEllipsis = function() {
2128
+ return 0 === a3.state.size ? null : v().createElement("div", Object.assign({}, G(a3.props.theme, "ellipsis"), { className: "node-ellipsis", onClick: a3.toggleCollapsed }), "...");
2129
+ }, a3.getObjectMetaData = function(e5) {
2130
+ var t4 = a3.props, r3 = (t4.rjvId, t4.theme, a3.state), n2 = r3.size, o2 = r3.hovered;
2131
+ return v().createElement(rt, Object.assign({ rowHovered: o2, size: n2 }, a3.props));
2132
+ }, a3.renderObjectContents = function(e5, t4) {
2133
+ var r3, n2 = a3.props, o2 = n2.depth, s2 = n2.parent_type, i2 = n2.index_offset, l2 = n2.groupArraysAfterLength, c2 = n2.namespace, u2 = a3.state.object_type, d2 = [], b2 = Object.keys(e5 || {});
2134
+ return a3.props.sortKeys && "array" !== u2 && (b2 = b2.sort()), b2.forEach(function(n3) {
2135
+ if (r3 = new dt(n3, e5[n3], t4.bigNumber), "array_group" === s2 && i2 && (r3.name = parseInt(r3.name) + i2), Object.prototype.hasOwnProperty.call(e5, n3)) if ("object" === r3.type) d2.push(v().createElement(bt, Object.assign({ key: r3.name, depth: o2 + 1, name: r3.name, src: r3.value, namespace: c2.concat(r3.name), parent_type: u2 }, t4)));
2136
+ else if ("array" === r3.type) {
2137
+ var b3 = bt;
2138
+ l2 && r3.value.length > l2 && (b3 = lt), d2.push(v().createElement(b3, Object.assign({ key: r3.name, depth: o2 + 1, name: r3.name, src: r3.value, namespace: c2.concat(r3.name), type: "array", parent_type: u2 }, t4)));
2139
+ } else d2.push(v().createElement(at, Object.assign({ key: r3.name + "_" + c2, variable: r3, singleIndent: 5, namespace: c2, type: a3.props.type }, t4)));
2140
+ }), d2;
2141
+ };
2142
+ var r2 = t3.getState(e4);
2143
+ return a3.state = s(s({}, r2), {}, { prevProps: {} }), a3;
2144
+ }
2145
+ return h(t3, e3), c(t3, [{ key: "getBraceStart", value: function(e4, t4) {
2146
+ var a3 = this, r2 = this.props, n2 = r2.src, o2 = r2.theme, s2 = r2.iconStyle;
2147
+ if ("array_group" === r2.parent_type) return v().createElement("span", null, v().createElement("span", G(o2, "brace"), "array" === e4 ? "[" : "{"), t4 ? this.getObjectMetaData(n2) : null);
2148
+ var i2 = t4 ? ot : st;
2149
+ return v().createElement("span", null, v().createElement("span", Object.assign({ onClick: function(e5) {
2150
+ a3.toggleCollapsed();
2151
+ } }, G(o2, "brace-row")), v().createElement("div", Object.assign({ className: "icon-container" }, G(o2, "icon-container")), v().createElement(i2, { theme: o2, iconStyle: s2 })), v().createElement(nt, this.props), v().createElement("span", G(o2, "brace"), "array" === e4 ? "[" : "{")), t4 ? this.getObjectMetaData(n2) : null);
2152
+ } }, { key: "render", value: function() {
2153
+ var e4 = this, t4 = this.props, a3 = t4.depth, r2 = t4.src, n2 = (t4.namespace, t4.name, t4.type, t4.parent_type), o2 = t4.theme, i2 = t4.jsvRoot, l2 = t4.iconStyle, c2 = w(t4, ct), u2 = this.state, d2 = u2.object_type, b2 = u2.expanded, p2 = {};
2154
+ return i2 || "array_group" === n2 ? "array_group" === n2 && (p2.borderLeft = 0, p2.display = "inline") : p2.paddingLeft = 5 * this.props.indentWidth, v().createElement("div", Object.assign({ className: "object-key-val", onMouseEnter: function() {
2155
+ return e4.setState(s(s({}, e4.state), {}, { hovered: true }));
2156
+ }, onMouseLeave: function() {
2157
+ return e4.setState(s(s({}, e4.state), {}, { hovered: false }));
2158
+ } }, G(o2, i2 ? "jsv-root" : "objectKeyVal", p2)), this.getBraceStart(d2, b2), b2 ? this.getObjectContent(a3, r2, s({ theme: o2, iconStyle: l2 }, c2)) : this.getEllipsis(), v().createElement("span", { className: "brace-row" }, v().createElement("span", { style: s(s({}, G(o2, "brace").style), {}, { paddingLeft: b2 ? "3px" : "0px" }) }, "array" === d2 ? "]" : "}"), b2 ? null : this.getObjectMetaData(r2)));
2159
+ } }], [{ key: "getDerivedStateFromProps", value: function(e4, a3) {
2160
+ var r2 = a3.prevProps;
2161
+ return e4.src !== r2.src || e4.collapsed !== r2.collapsed || e4.name !== r2.name || e4.namespace !== r2.namespace || e4.rjvId !== r2.rjvId ? s(s({}, t3.getState(e4)), {}, { prevProps: e4 }) : null;
2162
+ } }]);
2163
+ }(v().PureComponent);
2164
+ ut.getState = function(e3) {
2165
+ var t3 = Object.keys(e3.src).length, a3 = (false === e3.collapsed || true !== e3.collapsed && e3.collapsed > e3.depth) && (!e3.shouldCollapse || false === e3.shouldCollapse({ name: e3.name, src: e3.src, type: x(e3.src), namespace: e3.namespace })) && 0 !== t3;
2166
+ return { expanded: se.get(e3.rjvId, e3.namespace, "expanded", a3), object_type: "array" === e3.type ? "array" : "object", parent_type: "array" === e3.type ? "array" : "object", size: t3, hovered: false };
2167
+ };
2168
+ var dt = c(function e3(t3, a3, r2) {
2169
+ i(this, e3), this.name = t3, this.value = a3, this.type = x(a3, r2);
2170
+ });
2171
+ E(ut);
2172
+ const bt = ut;
2173
+ var pt = function(e3) {
2174
+ function t3() {
2175
+ var e4;
2176
+ i(this, t3);
2177
+ for (var a3 = arguments.length, r2 = new Array(a3), n2 = 0; n2 < a3; n2++) r2[n2] = arguments[n2];
2178
+ return (e4 = p(this, t3, [].concat(r2))).render = function() {
2179
+ var t4, a4, r3, n3, o2 = e4.props, s2 = [o2.name], i2 = bt;
2180
+ "object" != typeof o2.name || Array.isArray(o2.name) || (s2 = [(null === (t4 = o2.name) || void 0 === t4 ? void 0 : t4.displayName) || (null === (a4 = o2.name) || void 0 === a4 ? void 0 : a4.name) || (null === (r3 = o2.name) || void 0 === r3 || null === (n3 = r3.type) || void 0 === n3 ? void 0 : n3.name) || "Anonymous"]);
2181
+ return Array.isArray(o2.src) && o2.groupArraysAfterLength && o2.src.length > o2.groupArraysAfterLength && (i2 = lt), v().createElement("div", { className: "pretty-json-container object-container" }, v().createElement("div", { className: "object-content" }, v().createElement(i2, Object.assign({ namespace: s2, depth: 0, jsvRoot: true }, o2))));
2182
+ }, e4;
2183
+ }
2184
+ return h(t3, e3), c(t3);
2185
+ }(v().PureComponent), ft = function(e3) {
2186
+ function t3(e4) {
2187
+ var a3;
2188
+ return i(this, t3), (a3 = p(this, t3, [e4])).closeModal = function() {
2189
+ ne.dispatch({ rjvId: a3.props.rjvId, name: "RESET" });
2190
+ }, a3.submit = function() {
2191
+ a3.props.submit(a3.state.input);
2192
+ }, a3.state = { input: e4.input ? e4.input : "" }, a3;
2193
+ }
2194
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
2195
+ var e4 = this, t4 = this.props, a3 = t4.theme, r2 = t4.rjvId, n2 = t4.isValid, o2 = this.state.input, s2 = n2(o2);
2196
+ return v().createElement("div", Object.assign({ className: "key-modal-request" }, G(a3, "key-modal-request"), { onClick: this.closeModal }), v().createElement("div", Object.assign({}, G(a3, "key-modal"), { onClick: function(e5) {
2197
+ e5.stopPropagation();
2198
+ } }), v().createElement("div", G(a3, "key-modal-label"), "Key Name:"), v().createElement("div", { style: { position: "relative" } }, v().createElement("input", Object.assign({}, G(a3, "key-modal-input"), { className: "key-modal-input", ref: function(e5) {
2199
+ return e5 && e5.focus();
2200
+ }, spellCheck: false, value: o2, placeholder: "...", onChange: function(t5) {
2201
+ e4.setState({ input: t5.target.value });
2202
+ }, onKeyPress: function(t5) {
2203
+ s2 && "Enter" === t5.key ? e4.submit() : "Escape" === t5.key && e4.closeModal();
2204
+ } })), s2 ? v().createElement(Xe, Object.assign({}, G(a3, "key-modal-submit"), { className: "key-modal-submit", onClick: function(t5) {
2205
+ return e4.submit();
2206
+ } })) : null), v().createElement("span", G(a3, "key-modal-cancel"), v().createElement(Qe, Object.assign({}, G(a3, "key-modal-cancel-icon"), { className: "key-modal-cancel", onClick: function() {
2207
+ ne.dispatch({ rjvId: r2, name: "RESET" });
2208
+ } })))));
2209
+ } }]);
2210
+ }(v().PureComponent), ht = function(e3) {
2211
+ function t3() {
2212
+ var e4;
2213
+ i(this, t3);
2214
+ for (var a3 = arguments.length, r2 = new Array(a3), n2 = 0; n2 < a3; n2++) r2[n2] = arguments[n2];
2215
+ return (e4 = p(this, t3, [].concat(r2))).isValid = function(t4) {
2216
+ var a4 = e4.props.rjvId, r3 = se.get(a4, "action", "new-key-request");
2217
+ return "" != t4 && -1 === Object.keys(r3.existing_value).indexOf(t4);
2218
+ }, e4.submit = function(t4) {
2219
+ var a4 = e4.props.rjvId, r3 = se.get(a4, "action", "new-key-request");
2220
+ r3.new_value = s({}, r3.existing_value), r3.new_value[t4] = e4.props.defaultValue, ne.dispatch({ name: "VARIABLE_ADDED", rjvId: a4, data: r3 });
2221
+ }, e4;
2222
+ }
2223
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
2224
+ var e4 = this.props, t4 = e4.active, a3 = e4.theme, r2 = e4.rjvId;
2225
+ return t4 ? v().createElement(ft, { rjvId: r2, theme: a3, isValid: this.isValid, submit: this.submit }) : null;
2226
+ } }]);
2227
+ }(v().PureComponent), mt = function(e3) {
2228
+ function t3() {
2229
+ return i(this, t3), p(this, t3, arguments);
2230
+ }
2231
+ return h(t3, e3), c(t3, [{ key: "render", value: function() {
2232
+ var e4 = this.props, t4 = e4.message, a3 = e4.active, r2 = e4.theme, n2 = e4.rjvId;
2233
+ return a3 ? v().createElement("div", Object.assign({ className: "validation-failure" }, G(r2, "validation-failure"), { onClick: function() {
2234
+ ne.dispatch({ rjvId: n2, name: "RESET" });
2235
+ } }), v().createElement("span", G(r2, "validation-failure-label"), t4), v().createElement(Qe, G(r2, "validation-failure-clear"))) : null;
2236
+ } }]);
2237
+ }(v().PureComponent), vt = function(e3) {
2238
+ function t3(e4) {
2239
+ var a3;
2240
+ return i(this, t3), (a3 = p(this, t3, [e4])).rjvId = Date.now().toString() + Math.random().toString(36).slice(2), a3.getListeners = function() {
2241
+ return { reset: a3.resetState, "variable-update": a3.updateSrc, "add-key-request": a3.addKeyRequest };
2242
+ }, a3.updateSrc = function() {
2243
+ var e5, t4 = se.get(a3.rjvId, "action", "variable-update"), r2 = t4.name, n2 = t4.namespace, o2 = t4.new_value, s2 = t4.existing_value, i2 = t4.updated_src, l2 = t4.type, c2 = a3.props, u2 = c2.onEdit, d2 = c2.onDelete, b2 = c2.onAdd, p2 = { existing_src: a3.state.src, new_value: o2, updated_src: i2, name: r2, namespace: n2, existing_value: s2 };
2244
+ switch (l2) {
2245
+ case "variable-added":
2246
+ e5 = b2(p2);
2247
+ break;
2248
+ case "variable-edited":
2249
+ e5 = u2(p2);
2250
+ break;
2251
+ case "variable-removed":
2252
+ e5 = d2(p2);
2253
+ }
2254
+ false !== e5 ? (se.set(a3.rjvId, "global", "src", i2), a3.setState({ src: i2 })) : a3.setState({ validationFailure: true });
2255
+ }, a3.addKeyRequest = function() {
2256
+ a3.setState({ addKeyRequest: true });
2257
+ }, a3.resetState = function() {
2258
+ a3.setState({ validationFailure: false, addKeyRequest: false });
2259
+ }, a3.state = { addKeyRequest: false, editKeyRequest: false, validationFailure: false, src: t3.defaultProps.src, name: t3.defaultProps.name, theme: t3.defaultProps.theme, validationMessage: t3.defaultProps.validationMessage, prevSrc: t3.defaultProps.src, prevName: t3.defaultProps.name, prevTheme: t3.defaultProps.theme }, a3;
2260
+ }
2261
+ return h(t3, e3), c(t3, [{ key: "componentDidMount", value: function() {
2262
+ se.set(this.rjvId, "global", "src", this.state.src);
2263
+ var e4 = this.getListeners();
2264
+ for (var t4 in e4) se.on(t4 + "-" + this.rjvId, e4[t4]);
2265
+ this.setState({ addKeyRequest: false, editKeyRequest: false });
2266
+ } }, { key: "componentDidUpdate", value: function(e4, t4) {
2267
+ false !== t4.addKeyRequest && this.setState({ addKeyRequest: false }), false !== t4.editKeyRequest && this.setState({ editKeyRequest: false }), e4.src !== this.state.src && se.set(this.rjvId, "global", "src", this.state.src);
2268
+ } }, { key: "componentWillUnmount", value: function() {
2269
+ var e4 = this.getListeners();
2270
+ for (var t4 in e4) se.removeListener(t4 + "-" + this.rjvId, e4[t4]);
2271
+ } }, { key: "render", value: function() {
2272
+ var e4 = this.state, t4 = e4.validationFailure, a3 = e4.validationMessage, r2 = e4.addKeyRequest, n2 = e4.theme, o2 = e4.src, i2 = e4.name, l2 = this.props, c2 = l2.style, u2 = l2.defaultValue;
2273
+ return v().createElement("div", { className: "react-json-view", style: s(s({}, G(n2, "app-container").style), c2) }, v().createElement(mt, { message: a3, active: t4, theme: n2, rjvId: this.rjvId }), v().createElement(pt, Object.assign({}, this.props, { src: o2, name: i2, theme: n2, type: x(o2), rjvId: this.rjvId })), v().createElement(ht, { active: r2, theme: n2, rjvId: this.rjvId, defaultValue: u2 }));
2274
+ } }], [{ key: "getDerivedStateFromProps", value: function(e4, a3) {
2275
+ if (e4.src !== a3.prevSrc || e4.name !== a3.prevName || e4.theme !== a3.prevTheme) {
2276
+ var r2 = { src: e4.src, name: e4.name, theme: e4.theme, validationMessage: e4.validationMessage, prevSrc: e4.src, prevName: e4.name, prevTheme: e4.theme };
2277
+ return t3.validateState(r2);
2278
+ }
2279
+ return null;
2280
+ } }]);
2281
+ }(v().PureComponent);
2282
+ vt.defaultProps = { src: {}, name: "root", theme: "rjv-default", collapsed: false, collapseStringsAfterLength: false, shouldCollapse: false, sortKeys: false, quotesOnKeys: true, groupArraysAfterLength: 100, indentWidth: 4, enableClipboard: true, escapeStrings: true, displayObjectSize: true, displayDataTypes: true, onEdit: false, onDelete: false, onAdd: false, onSelect: false, iconStyle: "triangle", style: {}, validationMessage: "Validation Error", defaultValue: null, displayArrayKey: true, selectOnFocus: false, keyModifier: function(e3) {
2283
+ return e3.metaKey || e3.ctrlKey;
2284
+ }, bigNumber: null }, vt.validateState = function(e3) {
2285
+ var t3 = {};
2286
+ return "object" !== x(e3.theme) || function(e4) {
2287
+ var t4 = ["base00", "base01", "base02", "base03", "base04", "base05", "base06", "base07", "base08", "base09", "base0A", "base0B", "base0C", "base0D", "base0E", "base0F"];
2288
+ if ("object" === x(e4)) {
2289
+ for (var a3 = 0; a3 < t4.length; a3++) if (!(t4[a3] in e4)) return false;
2290
+ return true;
2291
+ }
2292
+ return false;
2293
+ }(e3.theme) || (console.error("react-json-view error:", "theme prop must be a theme name or valid base-16 theme object.", 'defaulting to "rjv-default" theme'), t3.theme = "rjv-default"), "object" !== x(e3.src) && "array" !== x(e3.src) && (console.error("react-json-view error:", "src property must be a valid json object"), t3.name = "ERROR", t3.src = { message: "src property must be a valid json object" }), s(s({}, e3), t3);
2294
+ }, E(vt);
2295
+ const gt = vt;
2296
+ })(), n;
2297
+ })());
2298
+ })(main$1);
2299
+ return main$1.exports;
2300
+ }
2301
+ var mainExports = requireMain();
2302
+ const ReactJson = /* @__PURE__ */ getDefaultExportFromCjs(mainExports);
1940
2303
  export {
1941
- JsonViewer as J
2304
+ ReactJson as R
1942
2305
  };