@antimatter-audio/antimatter-ui 14.7.1 → 14.9.0

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.
Files changed (43) hide show
  1. package/dist/advanced/ModuleFooter/InputModTab.d.ts.map +1 -1
  2. package/dist/advanced/Oscilloscope/Oscilloscope.d.ts.map +1 -1
  3. package/dist/advanced/VUMeter/VUMeter.d.ts +8 -6
  4. package/dist/advanced/VUMeter/VUMeter.d.ts.map +1 -1
  5. package/dist/advanced/VUMeter/worker.d.ts +8 -0
  6. package/dist/advanced/VUMeter/worker.d.ts.map +1 -0
  7. package/dist/core/Chart/Bar.d.ts +19 -0
  8. package/dist/core/Chart/Bar.d.ts.map +1 -0
  9. package/dist/core/Chart/Chart.d.ts +19 -2
  10. package/dist/core/Chart/Chart.d.ts.map +1 -1
  11. package/dist/core/Chart/LineChart/LineChart.d.ts +2 -2
  12. package/dist/core/Chart/LineChart/LineChart.d.ts.map +1 -1
  13. package/dist/core/Chart/StackedChart.d.ts +2 -2
  14. package/dist/core/Chart/StackedChart.d.ts.map +1 -1
  15. package/dist/core/Indicators/IndicatorLight.d.ts +1 -0
  16. package/dist/core/Indicators/IndicatorLight.d.ts.map +1 -1
  17. package/dist/hooks/useDataBuffer.d.ts +11 -0
  18. package/dist/hooks/useDataBuffer.d.ts.map +1 -0
  19. package/dist/index.js +1228 -1044
  20. package/dist/index.js.map +1 -1
  21. package/dist/src/advanced/LFOVisualizer/LFOVisualizer.d.ts.map +1 -1
  22. package/dist/src/advanced/ModuleFooter/InputModTab.d.ts.map +1 -1
  23. package/dist/src/advanced/ModuleFooter/SeqPanel.d.ts.map +1 -1
  24. package/dist/src/advanced/Oscilloscope/Oscilloscope.d.ts.map +1 -1
  25. package/dist/src/advanced/VUMeter/VUMeter.d.ts +8 -6
  26. package/dist/src/advanced/VUMeter/VUMeter.d.ts.map +1 -1
  27. package/dist/src/common/types.d.ts +9 -0
  28. package/dist/src/common/types.d.ts.map +1 -1
  29. package/dist/src/core/Chart/Bar.d.ts +19 -0
  30. package/dist/src/core/Chart/Bar.d.ts.map +1 -0
  31. package/dist/src/core/Chart/Chart.d.ts +38 -6
  32. package/dist/src/core/Chart/Chart.d.ts.map +1 -1
  33. package/dist/src/core/Chart/LineChart/LineChart.d.ts +2 -2
  34. package/dist/src/core/Chart/LineChart/LineChart.d.ts.map +1 -1
  35. package/dist/src/core/Chart/StackedChart.d.ts +2 -2
  36. package/dist/src/core/Chart/StackedChart.d.ts.map +1 -1
  37. package/dist/src/core/Chart/Ticks.d.ts +4 -1
  38. package/dist/src/core/Chart/Ticks.d.ts.map +1 -1
  39. package/dist/src/core/Indicators/IndicatorLight.d.ts +4 -6
  40. package/dist/src/core/Indicators/IndicatorLight.d.ts.map +1 -1
  41. package/dist/src/core/Slider/RotaryCombobox.d.ts.map +1 -1
  42. package/dist/src/core/Slider/RotarySlider.d.ts.map +1 -1
  43. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -34,8 +34,8 @@ function styleInject(css, ref) {
34
34
  }
35
35
  }
36
36
 
37
- var css_248z$f = "@theme static {\n --color-brand: #bb68d9;\n --color-brand-900: #1b181c;\n /* --color-brand-900: #443342; */\n --color-brand-700: #932eb8;\n --color-brand-600: #ac47d1;\n --color-brand-400: #d199e6;\n --color-brand-300: #f3d4f4;\n --color-brand-secondary: #18d6d6;\n --color-alert: #8a0101;\n --color-text: #bab6cf;\n --color-gray-100: #c7c3de;\n --color-gray-200: #9a96ab;\n --color-gray-300: #838091;\n --color-gray-400: #595763;\n --color-gray-500: #4c4a54;\n --color-gray-600: #2e2c33;\n --color-gray-700: #1e1d21;\n --color-gray-800: #101012;\n --color-gray-900: #09090a;\n\n --color-VFDBlue-100: #0d3814;\n --color-VFDBlue-200: #234e4a;\n --color-VFDBlue-300: #128073;\n --color-VFDBlue-400: #138c6e;\n --color-VFDBlue-500: #1abe95;\n --color-VFDBlue-600: #23d8a4;\n --color-VFDBlue-700: #4aeea4;\n --color-VFDBlue-1000: #35edb4;\n --spacing-none: 0px;\n --spacing-xs: 2px;\n --spacing-sm: 4px;\n --spacing-ms: 6px;\n --spacing-md: 8px;\n --spacing-ml: 12px;\n --spacing-lg: 16px;\n --spacing-xl: 20px;\n --m-none: 0px;\n --m-xs: 2px;\n --m-sm: 4px;\n --m-ms: 6px;\n --m-md: 8px;\n --m-ml: 12px;\n --m-lg: 16px;\n --m-xl: 20px;\n --mt-none: 0px;\n --mt-xs: 2px;\n --mt-sm: 4px;\n --mt-ms: 6px;\n --mt-md: 8px;\n --mt-ml: 12px;\n --mt-lg: 16px;\n --mt-xl: 20px;\n --mr-none: 0px;\n --mr-xs: 2px;\n --mr-sm: 4px;\n --mr-ms: 6px;\n --mr-md: 8px;\n --mr-ml: 12px;\n --mr-lg: 16px;\n --mr-xl: 20px;\n --mb-none: 0px;\n --mb-xs: 2px;\n --mb-sm: 4px;\n --mb-ms: 6px;\n --mb-md: 8px;\n --mb-ml: 12px;\n --mb-lg: 16px;\n --mb-xl: 20px;\n --ml-none: 0px;\n --ml-xs: 2px;\n --ml-sm: 4px;\n --ml-ms: 6px;\n --ml-md: 8px;\n --ml-ml: 12px;\n --ml-lg: 16px;\n --ml-xl: 20px;\n --p-none: 0px;\n --p-xs: 2px;\n --p-sm: 4px;\n --p-ms: 6px;\n --p-md: 8px;\n --p-ml: 12px;\n --p-lg: 16px;\n --p-xl: 20px;\n --pt-none: 0px;\n --pt-xs: 2px;\n --pt-sm: 4px;\n --pt-ms: 6px;\n --pt-md: 8px;\n --pt-ml: 12px;\n --pt-lg: 16px;\n --pt-xl: 20px;\n --pr-none: 0px;\n --pr-xs: 2px;\n --pr-sm: 4px;\n --pr-ms: 6px;\n --pr-md: 8px;\n --pr-ml: 12px;\n --pr-lg: 16px;\n --pr-xl: 20px;\n --pb-none: 0px;\n --pb-xs: 2px;\n --pb-sm: 4px;\n --pb-ms: 6px;\n --pb-md: 8px;\n --pb-ml: 12px;\n --pb-lg: 16px;\n --pb-xl: 20px;\n --pl-none: 0px;\n --pl-xs: 2px;\n --pl-sm: 4px;\n --pl-ms: 6px;\n --pl-md: 8px;\n --pl-ml: 12px;\n --pl-lg: 16px;\n --pl-xl: 20px;\n --bg-lv1: #0e0e12;\n --bg-lv2: #121216;\n --bg-lv3: #16171d;\n --bg-lv4: #212128;\n --bg-lv5: #2b2b31;\n --bg-lv6: #34343a;\n --bg-lv7: #3b3b41;\n --bg-lv8: #49494d;\n --bg-lv9: #535357;\n --bg-lv10: #797887;\n --bg-lv11: #9999a7;\n --bg-lv12: #c1c1c1;\n --bg-selected: #2e2c33;\n\n /* --bg-lv3-brightened: #1a1b21; */\n\n --font-leagueSpartan: 'LeagueSpartan';\n --text-xs: 0.625rem;\n --text-sm: 0.75rem;\n --text-ms: 0.813rem;\n --text-md: 0.875rem;\n --text-lg: 1rem;\n --text-xl: 1.25rem;\n --text-title: 1.75rem;\n --gap-none: 0px;\n --gap-xs: 2px;\n --gap-sm: 4px;\n --gap-ms: 6px;\n --gap-md: 8px;\n --gap-ml: 12px;\n --gap-lg: 16px;\n --gap-xl: 20px;\n}\n\ninput,\ninput:hover,\ninput:focus,\ninput:focus-visible {\n background: transparent;\n border: none;\n outline: none;\n appearance: textfield;\n}\n\nbutton,\nbutton:hover,\nbutton:focus,\nbutton:focus-visible {\n outline: none;\n}\n\nbutton:disabled,\ninput:disabled {\n cursor: default;\n}\n\ndiv:focus,\ndiv:focus-visible {\n outline: none;\n appearance: textfield;\n}\n\n.cursor-hidden * {\n cursor: none !important;\n}\n::-webkit-scrollbar,\n::-webkit-scrollbar-track {\n background-color: var(--color-gray-600);\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #252429;\n}\n\n* {\n -ms-overflow-style: none;\n}\n\n/* div::-webkit-scrollbar {\n display: none;\n} */\n\n@font-face {\n font-family: LeagueSpartan;\n /* ascent-override: 70%; */\n src: url('./common/assets/fonts/LeagueSpartan-Regular.ttf');\n}\n\n@font-face {\n font-family: LeagueSpartan;\n /* ascent-override: 70%; */\n src: url('./common/assets/fonts/LeagueSpartan-Thin.ttf');\n font-weight: lighter;\n}\n";
38
- styleInject(css_248z$f);
37
+ var css_248z$g = "@theme static {\n --color-brand: #bb68d9;\n --color-brand-900: #1b181c;\n /* --color-brand-900: #443342; */\n --color-brand-700: #932eb8;\n --color-brand-600: #ac47d1;\n --color-brand-400: #d199e6;\n --color-brand-300: #f3d4f4;\n --color-brand-secondary: #18d6d6;\n --color-alert: #8a0101;\n --color-text: #bab6cf;\n --color-gray-100: #c7c3de;\n --color-gray-200: #9a96ab;\n --color-gray-300: #838091;\n --color-gray-400: #595763;\n --color-gray-500: #4c4a54;\n --color-gray-600: #2e2c33;\n --color-gray-700: #1e1d21;\n --color-gray-800: #101012;\n --color-gray-900: #09090a;\n\n --color-VFDBlue-100: #0d3814;\n --color-VFDBlue-200: #234e4a;\n --color-VFDBlue-300: #128073;\n --color-VFDBlue-400: #138c6e;\n --color-VFDBlue-500: #1abe95;\n --color-VFDBlue-600: #23d8a4;\n --color-VFDBlue-700: #4aeea4;\n --color-VFDBlue-1000: #35edb4;\n --spacing-none: 0px;\n --spacing-xs: 2px;\n --spacing-sm: 4px;\n --spacing-ms: 6px;\n --spacing-md: 8px;\n --spacing-ml: 12px;\n --spacing-lg: 16px;\n --spacing-xl: 20px;\n --m-none: 0px;\n --m-xs: 2px;\n --m-sm: 4px;\n --m-ms: 6px;\n --m-md: 8px;\n --m-ml: 12px;\n --m-lg: 16px;\n --m-xl: 20px;\n --mt-none: 0px;\n --mt-xs: 2px;\n --mt-sm: 4px;\n --mt-ms: 6px;\n --mt-md: 8px;\n --mt-ml: 12px;\n --mt-lg: 16px;\n --mt-xl: 20px;\n --mr-none: 0px;\n --mr-xs: 2px;\n --mr-sm: 4px;\n --mr-ms: 6px;\n --mr-md: 8px;\n --mr-ml: 12px;\n --mr-lg: 16px;\n --mr-xl: 20px;\n --mb-none: 0px;\n --mb-xs: 2px;\n --mb-sm: 4px;\n --mb-ms: 6px;\n --mb-md: 8px;\n --mb-ml: 12px;\n --mb-lg: 16px;\n --mb-xl: 20px;\n --ml-none: 0px;\n --ml-xs: 2px;\n --ml-sm: 4px;\n --ml-ms: 6px;\n --ml-md: 8px;\n --ml-ml: 12px;\n --ml-lg: 16px;\n --ml-xl: 20px;\n --p-none: 0px;\n --p-xs: 2px;\n --p-sm: 4px;\n --p-ms: 6px;\n --p-md: 8px;\n --p-ml: 12px;\n --p-lg: 16px;\n --p-xl: 20px;\n --pt-none: 0px;\n --pt-xs: 2px;\n --pt-sm: 4px;\n --pt-ms: 6px;\n --pt-md: 8px;\n --pt-ml: 12px;\n --pt-lg: 16px;\n --pt-xl: 20px;\n --pr-none: 0px;\n --pr-xs: 2px;\n --pr-sm: 4px;\n --pr-ms: 6px;\n --pr-md: 8px;\n --pr-ml: 12px;\n --pr-lg: 16px;\n --pr-xl: 20px;\n --pb-none: 0px;\n --pb-xs: 2px;\n --pb-sm: 4px;\n --pb-ms: 6px;\n --pb-md: 8px;\n --pb-ml: 12px;\n --pb-lg: 16px;\n --pb-xl: 20px;\n --pl-none: 0px;\n --pl-xs: 2px;\n --pl-sm: 4px;\n --pl-ms: 6px;\n --pl-md: 8px;\n --pl-ml: 12px;\n --pl-lg: 16px;\n --pl-xl: 20px;\n --bg-lv1: #0e0e12;\n --bg-lv2: #121216;\n --bg-lv3: #16171d;\n --bg-lv4: #212128;\n --bg-lv5: #2b2b31;\n --bg-lv6: #34343a;\n --bg-lv7: #3b3b41;\n --bg-lv8: #49494d;\n --bg-lv9: #535357;\n --bg-lv10: #797887;\n --bg-lv11: #9999a7;\n --bg-lv12: #c1c1c1;\n --bg-selected: #2e2c33;\n\n /* --bg-lv3-brightened: #1a1b21; */\n\n --font-leagueSpartan: 'LeagueSpartan';\n --text-xs: 0.625rem;\n --text-sm: 0.75rem;\n --text-ms: 0.813rem;\n --text-md: 0.875rem;\n --text-lg: 1rem;\n --text-xl: 1.25rem;\n --text-title: 1.75rem;\n --gap-none: 0px;\n --gap-xs: 2px;\n --gap-sm: 4px;\n --gap-ms: 6px;\n --gap-md: 8px;\n --gap-ml: 12px;\n --gap-lg: 16px;\n --gap-xl: 20px;\n}\n\ninput,\ninput:hover,\ninput:focus,\ninput:focus-visible {\n background: transparent;\n border: none;\n outline: none;\n appearance: textfield;\n}\n\nbutton,\nbutton:hover,\nbutton:focus,\nbutton:focus-visible {\n outline: none;\n}\n\nbutton:disabled,\ninput:disabled {\n cursor: default;\n}\n\ndiv:focus,\ndiv:focus-visible {\n outline: none;\n appearance: textfield;\n}\n\n.cursor-hidden * {\n cursor: none !important;\n}\n::-webkit-scrollbar,\n::-webkit-scrollbar-track {\n background-color: var(--color-gray-600);\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #252429;\n}\n\n* {\n -ms-overflow-style: none;\n}\n\n/* div::-webkit-scrollbar {\n display: none;\n} */\n\n@font-face {\n font-family: LeagueSpartan;\n /* ascent-override: 70%; */\n src: url('./common/assets/fonts/LeagueSpartan-Regular.ttf');\n}\n\n@font-face {\n font-family: LeagueSpartan;\n /* ascent-override: 70%; */\n src: url('./common/assets/fonts/LeagueSpartan-Thin.ttf');\n font-weight: lighter;\n}\n";
38
+ styleInject(css_248z$g);
39
39
 
40
40
  var Spacing = /*#__PURE__*/ function(Spacing) {
41
41
  Spacing["none"] = "none";
@@ -123,12 +123,23 @@ var GradientStyles = /*#__PURE__*/ function(GradientStyles) {
123
123
  GradientStyles["multicolor"] = "multicolor";
124
124
  return GradientStyles;
125
125
  }({});
126
+ var GraphicRenderOptions = /*#__PURE__*/ function(GraphicRenderOptions) {
127
+ GraphicRenderOptions["svg"] = "svg";
128
+ GraphicRenderOptions["canvas"] = "canvas";
129
+ return GraphicRenderOptions;
130
+ }({});
131
+ var StrokeStyle = /*#__PURE__*/ function(StrokeStyle) {
132
+ StrokeStyle["solid"] = "solid";
133
+ StrokeStyle["dashed"] = "dashed";
134
+ StrokeStyle["dotted"] = "dotted";
135
+ return StrokeStyle;
136
+ }({});
126
137
 
127
- var css_248z$e = ".Tabs {\n display: flex;\n font-size: 1rem;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-transform: uppercase;\n text-align: center;\n border: 0;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.Tabs-item {\n &:disabled {\n cursor: default;\n }\n}\n\n.Tabs-item::-moz-selection {\n background: transparent;\n}\n.Tabs-item::selection {\n background: transparent;\n}\n\n/* Tab styles */\n/* TODO: Refactor to use utility classes? */\n/* TODO: Clean up */\n/* TODO how do we want to style the scrollbars? */\n\n/* .Tabs-item {\n color: var(--bg-lv11);\n font-family: var(--font-leagueSpartan);\n background: var(--bg-lv2);\n} */\n\n.Tabs-item[data-headlessui-state='hover'],\n.Tabs-item[data-headlessui-state='hover active'],\n.tabs-item:focus,\n.tabs-item:focus-visible {\n filter: brightness(80%);\n}\n/* \n.Tabs-item[data-headlessui-state='selected hover'],\n.Tabs-item[data-headlessui-state='selected hover active'],\n.Tabs-item[data-headlessui-state='selected'],\n.Tabs-item[data-headlessui-state='selected focus'] {\n background: var(--bg-lv3);\n}\n\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] svg polyline,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] svg polyline,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] svg polyline,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] svg polyline {\n stroke: var(--color-brand) !important;\n}\n\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] .Label,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] .Label,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] .Label,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] .Label {\n color: var(--color-brand) !important;\n} */\n";
128
- styleInject(css_248z$e);
138
+ var css_248z$f = ".Tabs {\n display: flex;\n font-size: 1rem;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-transform: uppercase;\n text-align: center;\n border: 0;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.Tabs-item {\n &:disabled {\n cursor: default;\n }\n}\n\n.Tabs-item::-moz-selection {\n background: transparent;\n}\n.Tabs-item::selection {\n background: transparent;\n}\n\n/* Tab styles */\n/* TODO: Refactor to use utility classes? */\n/* TODO: Clean up */\n/* TODO how do we want to style the scrollbars? */\n\n/* .Tabs-item {\n color: var(--bg-lv11);\n font-family: var(--font-leagueSpartan);\n background: var(--bg-lv2);\n} */\n\n.Tabs-item[data-headlessui-state='hover'],\n.Tabs-item[data-headlessui-state='hover active'],\n.tabs-item:focus,\n.tabs-item:focus-visible {\n filter: brightness(80%);\n}\n/* \n.Tabs-item[data-headlessui-state='selected hover'],\n.Tabs-item[data-headlessui-state='selected hover active'],\n.Tabs-item[data-headlessui-state='selected'],\n.Tabs-item[data-headlessui-state='selected focus'] {\n background: var(--bg-lv3);\n}\n\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] svg polyline,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] svg polyline,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] svg polyline,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] svg polyline {\n stroke: var(--color-brand) !important;\n}\n\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] .Label,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] .Label,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] .Label,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] .Label {\n color: var(--color-brand) !important;\n} */\n";
139
+ styleInject(css_248z$f);
129
140
 
130
- var css_248z$d = ".Button {\n font-size: var(--text-xs);\n display: flex;\n align-items: center;\n justify-content: center;\n padding-right: var(--spacing-ms);\n padding-left: var(--spacing-ms);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-align: enter;\n border: 0;\n appearance: none;\n user-select: none;\n color: var(--color-text);\n -webkit-user-select: none;\n &.xSmall {\n width: var(--spacing-ml);\n height: var(--spacing-ml);\n }\n &.small {\n font-size: var(--text-xs);\n min-width: 1rem;\n min-height: var(--spacing-sm);\n }\n &.large {\n border-radius: var(--radius-sm);\n min-width: 1rem;\n min-height: var(--spacing-xl);\n }\n}\n";
131
- styleInject(css_248z$d);
141
+ var css_248z$e = ".Button {\n font-size: var(--text-xs);\n display: flex;\n align-items: center;\n justify-content: center;\n padding-right: var(--spacing-ms);\n padding-left: var(--spacing-ms);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-align: enter;\n border: 0;\n appearance: none;\n user-select: none;\n color: var(--color-text);\n -webkit-user-select: none;\n &.xSmall {\n width: var(--spacing-ml);\n height: var(--spacing-ml);\n }\n &.small {\n font-size: var(--text-xs);\n min-width: 1rem;\n min-height: var(--spacing-sm);\n }\n &.large {\n border-radius: var(--radius-sm);\n min-width: 1rem;\n min-height: var(--spacing-xl);\n }\n}\n";
142
+ styleInject(css_248z$e);
132
143
 
133
144
  var ButtonSize = /*#__PURE__*/ function(ButtonSize) {
134
145
  ButtonSize["xSmall"] = "xSmall";
@@ -182,30 +193,30 @@ function useObservable(param) {
182
193
  };
183
194
  }
184
195
 
185
- function _array_like_to_array$m(arr, len) {
196
+ function _array_like_to_array$j(arr, len) {
186
197
  if (len == null || len > arr.length) len = arr.length;
187
198
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
188
199
  return arr2;
189
200
  }
190
- function _array_without_holes$4(arr) {
191
- if (Array.isArray(arr)) return _array_like_to_array$m(arr);
201
+ function _array_without_holes$3(arr) {
202
+ if (Array.isArray(arr)) return _array_like_to_array$j(arr);
192
203
  }
193
- function _iterable_to_array$4(iter) {
204
+ function _iterable_to_array$3(iter) {
194
205
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
195
206
  }
196
- function _non_iterable_spread$4() {
207
+ function _non_iterable_spread$3() {
197
208
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
198
209
  }
199
- function _to_consumable_array$4(arr) {
200
- return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$m(arr) || _non_iterable_spread$4();
210
+ function _to_consumable_array$3(arr) {
211
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$j(arr) || _non_iterable_spread$3();
201
212
  }
202
- function _unsupported_iterable_to_array$m(o, minLen) {
213
+ function _unsupported_iterable_to_array$j(o, minLen) {
203
214
  if (!o) return;
204
- if (typeof o === "string") return _array_like_to_array$m(o, minLen);
215
+ if (typeof o === "string") return _array_like_to_array$j(o, minLen);
205
216
  var n = Object.prototype.toString.call(o).slice(8, -1);
206
217
  if (n === "Object" && o.constructor) n = o.constructor.name;
207
218
  if (n === "Map" || n === "Set") return Array.from(n);
208
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$m(o, minLen);
219
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$j(o, minLen);
209
220
  }
210
221
  // export const roundUpToTwoDecimals = (val: number) => Math.ceil(val * 100) / 100;
211
222
  // mocks the `normalisedToScaledValue` internal method from JUCE
@@ -255,7 +266,7 @@ var getValidValueForInput = function(param) {
255
266
  // TODO: Clean up
256
267
  var matchCriteria = /^-?(?:\d+\.\d+|\d+|\.\d+)$/g;
257
268
  var splitValue = value.toString().matchAll(matchCriteria);
258
- var splitValueArray = _to_consumable_array$4(splitValue);
269
+ var splitValueArray = _to_consumable_array$3(splitValue);
259
270
  var validValue = splitValueArray === null || splitValueArray === void 0 ? void 0 : (_splitValueArray_ = splitValueArray[0]) === null || _splitValueArray_ === void 0 ? void 0 : _splitValueArray_[0];
260
271
  var start = properties.start, end = properties.end;
261
272
  if (validValue !== null && validValue !== undefined) {
@@ -348,7 +359,7 @@ function throttle(mainFunction, delay) {
348
359
  args[_key] = arguments[_key];
349
360
  }
350
361
  if (timerFlag === null) {
351
- mainFunction.apply(void 0, _to_consumable_array$4(args));
362
+ mainFunction.apply(void 0, _to_consumable_array$3(args));
352
363
  timerFlag = setTimeout(function() {
353
364
  timerFlag = null;
354
365
  }, delay);
@@ -356,16 +367,16 @@ function throttle(mainFunction, delay) {
356
367
  };
357
368
  }
358
369
 
359
- function _array_like_to_array$l(arr, len) {
370
+ function _array_like_to_array$i(arr, len) {
360
371
  if (len == null || len > arr.length) len = arr.length;
361
372
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
362
373
  return arr2;
363
374
  }
364
- function _array_with_holes$k(arr) {
375
+ function _array_with_holes$h(arr) {
365
376
  if (Array.isArray(arr)) return arr;
366
377
  }
367
- function _array_without_holes$3(arr) {
368
- if (Array.isArray(arr)) return _array_like_to_array$l(arr);
378
+ function _array_without_holes$2(arr) {
379
+ if (Array.isArray(arr)) return _array_like_to_array$i(arr);
369
380
  }
370
381
  function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
371
382
  try {
@@ -396,7 +407,7 @@ function _async_to_generator$4(fn) {
396
407
  });
397
408
  };
398
409
  }
399
- function _define_property$m(obj, key, value) {
410
+ function _define_property$n(obj, key, value) {
400
411
  if (key in obj) {
401
412
  Object.defineProperty(obj, key, {
402
413
  value: value,
@@ -409,10 +420,10 @@ function _define_property$m(obj, key, value) {
409
420
  }
410
421
  return obj;
411
422
  }
412
- function _iterable_to_array$3(iter) {
423
+ function _iterable_to_array$2(iter) {
413
424
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
414
425
  }
415
- function _iterable_to_array_limit$k(arr, i) {
426
+ function _iterable_to_array_limit$h(arr, i) {
416
427
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
417
428
  if (_i == null) return;
418
429
  var _arr = [];
@@ -436,13 +447,13 @@ function _iterable_to_array_limit$k(arr, i) {
436
447
  }
437
448
  return _arr;
438
449
  }
439
- function _non_iterable_rest$k() {
450
+ function _non_iterable_rest$h() {
440
451
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
441
452
  }
442
- function _non_iterable_spread$3() {
453
+ function _non_iterable_spread$2() {
443
454
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
444
455
  }
445
- function _object_spread$l(target) {
456
+ function _object_spread$m(target) {
446
457
  for(var i = 1; i < arguments.length; i++){
447
458
  var source = arguments[i] != null ? arguments[i] : {};
448
459
  var ownKeys = Object.keys(source);
@@ -452,7 +463,7 @@ function _object_spread$l(target) {
452
463
  }));
453
464
  }
454
465
  ownKeys.forEach(function(key) {
455
- _define_property$m(target, key, source[key]);
466
+ _define_property$n(target, key, source[key]);
456
467
  });
457
468
  }
458
469
  return target;
@@ -476,19 +487,19 @@ function _object_spread_props$4(target, source) {
476
487
  }
477
488
  return target;
478
489
  }
479
- function _sliced_to_array$k(arr, i) {
480
- return _array_with_holes$k(arr) || _iterable_to_array_limit$k(arr, i) || _unsupported_iterable_to_array$l(arr, i) || _non_iterable_rest$k();
490
+ function _sliced_to_array$h(arr, i) {
491
+ return _array_with_holes$h(arr) || _iterable_to_array_limit$h(arr, i) || _unsupported_iterable_to_array$i(arr, i) || _non_iterable_rest$h();
481
492
  }
482
- function _to_consumable_array$3(arr) {
483
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$l(arr) || _non_iterable_spread$3();
493
+ function _to_consumable_array$2(arr) {
494
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$i(arr) || _non_iterable_spread$2();
484
495
  }
485
- function _unsupported_iterable_to_array$l(o, minLen) {
496
+ function _unsupported_iterable_to_array$i(o, minLen) {
486
497
  if (!o) return;
487
- if (typeof o === "string") return _array_like_to_array$l(o, minLen);
498
+ if (typeof o === "string") return _array_like_to_array$i(o, minLen);
488
499
  var n = Object.prototype.toString.call(o).slice(8, -1);
489
500
  if (n === "Object" && o.constructor) n = o.constructor.name;
490
501
  if (n === "Map" || n === "Set") return Array.from(n);
491
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$l(o, minLen);
502
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$i(o, minLen);
492
503
  }
493
504
  function _ts_generator$4(thisArg, body) {
494
505
  var f, y, t, _ = {
@@ -608,61 +619,61 @@ var defaultGlobalStateValue = {
608
619
  var reducer = function(state, action) {
609
620
  switch(action.type){
610
621
  case 'HIGHLIGHTED_ITEM_CHANGED':
611
- return _object_spread_props$4(_object_spread$l({}, state), {
622
+ return _object_spread_props$4(_object_spread$m({}, state), {
612
623
  highlightedItem: action.payload
613
624
  });
614
625
  // case 'FOCUSED_ITEM_CHANGED':
615
626
  // return { ...state, focusedItem: action.payload };
616
627
  case 'ADVANCED_VIEW_TOGGLED':
617
- return _object_spread_props$4(_object_spread$l({}, state), {
628
+ return _object_spread_props$4(_object_spread$m({}, state), {
618
629
  advancedView: action.payload
619
630
  });
620
631
  case 'AUTOMATABLE_PARAMS_LIST_RECEIVED':
621
- return _object_spread_props$4(_object_spread$l({}, state), {
632
+ return _object_spread_props$4(_object_spread$m({}, state), {
622
633
  automatableParamsList: action.payload
623
634
  });
624
635
  case 'AUTOMATABLE_PARAM_LABELS_RECEIVED':
625
- return _object_spread_props$4(_object_spread$l({}, state), {
636
+ return _object_spread_props$4(_object_spread$m({}, state), {
626
637
  automatableParamLabels: action.payload
627
638
  });
628
639
  case 'PARAMETER_TYPES_RECEIVED':
629
- return _object_spread_props$4(_object_spread$l({}, state), {
640
+ return _object_spread_props$4(_object_spread$m({}, state), {
630
641
  parameterTypes: action.payload
631
642
  });
632
643
  case 'ALL_PARAMETERS_RECEIVED':
633
- return _object_spread_props$4(_object_spread$l({}, state), {
644
+ return _object_spread_props$4(_object_spread$m({}, state), {
634
645
  allParameters: action.payload
635
646
  });
636
647
  case 'MOD_SLOTS_RECEIVED':
637
- return _object_spread_props$4(_object_spread$l({}, state), {
648
+ return _object_spread_props$4(_object_spread$m({}, state), {
638
649
  modSlotIds: action.payload.map(function(val) {
639
650
  return val[0];
640
651
  })
641
652
  });
642
653
  case 'MOD_SLOT_ROW_TARGETS_RECEIVED':
643
654
  var _action_payload;
644
- return _object_spread_props$4(_object_spread$l({}, state), {
655
+ return _object_spread_props$4(_object_spread$m({}, state), {
645
656
  modSlotTargets: action === null || action === void 0 ? void 0 : (_action_payload = action.payload) === null || _action_payload === void 0 ? void 0 : _action_payload.reduce(function(acc, val) {
646
- return _object_spread_props$4(_object_spread$l({}, acc), _define_property$m({}, val[0], val[1]));
657
+ return _object_spread_props$4(_object_spread$m({}, acc), _define_property$n({}, val[0], val[1]));
647
658
  }, {})
648
659
  });
649
660
  case 'MOD_SLOT_ROW_TARGET_UPDATED':
650
661
  var _action_payload1, _action_payload2;
651
- return _object_spread_props$4(_object_spread$l({}, state), {
652
- modSlotTargets: _object_spread_props$4(_object_spread$l({}, state === null || state === void 0 ? void 0 : state.modSlotTargets), _define_property$m({}, (_action_payload1 = action.payload) === null || _action_payload1 === void 0 ? void 0 : _action_payload1.id, action === null || action === void 0 ? void 0 : (_action_payload2 = action.payload) === null || _action_payload2 === void 0 ? void 0 : _action_payload2.value))
662
+ return _object_spread_props$4(_object_spread$m({}, state), {
663
+ modSlotTargets: _object_spread_props$4(_object_spread$m({}, state === null || state === void 0 ? void 0 : state.modSlotTargets), _define_property$n({}, (_action_payload1 = action.payload) === null || _action_payload1 === void 0 ? void 0 : _action_payload1.id, action === null || action === void 0 ? void 0 : (_action_payload2 = action.payload) === null || _action_payload2 === void 0 ? void 0 : _action_payload2.value))
653
664
  });
654
665
  case 'MOD_SLOT_PREVIEW_TARGET_INDEX_UPDATED':
655
666
  {
656
- return _object_spread_props$4(_object_spread$l({}, state), {
657
- modSlotPreview: _object_spread_props$4(_object_spread$l({}, state.modSlotPreview), {
667
+ return _object_spread_props$4(_object_spread$m({}, state), {
668
+ modSlotPreview: _object_spread_props$4(_object_spread$m({}, state.modSlotPreview), {
658
669
  targetIndex: action.payload
659
670
  })
660
671
  });
661
672
  }
662
673
  case 'MOD_SLOT_PREVIEW_SLOT_ID_UPDATED':
663
674
  {
664
- return _object_spread_props$4(_object_spread$l({}, state), {
665
- modSlotPreview: _object_spread_props$4(_object_spread$l({}, state.modSlotPreview), {
675
+ return _object_spread_props$4(_object_spread$m({}, state), {
676
+ modSlotPreview: _object_spread_props$4(_object_spread$m({}, state.modSlotPreview), {
666
677
  slotId: action === null || action === void 0 ? void 0 : action.payload
667
678
  })
668
679
  });
@@ -670,7 +681,7 @@ var reducer = function(state, action) {
670
681
  case 'SET_NEW_MOD_SLOT_PREVIEW':
671
682
  {
672
683
  var _state_modSlotIds_find;
673
- return _object_spread_props$4(_object_spread$l({}, state), {
684
+ return _object_spread_props$4(_object_spread$m({}, state), {
674
685
  modSlotPreview: {
675
686
  slotId: (_state_modSlotIds_find = state.modSlotIds.find(function(item) {
676
687
  return state.modSlotTargets[item] <= 0;
@@ -682,7 +693,7 @@ var reducer = function(state, action) {
682
693
  }
683
694
  case 'CLEAR_MOD_SLOT_PREVIEW':
684
695
  {
685
- return _object_spread_props$4(_object_spread$l({}, state), {
696
+ return _object_spread_props$4(_object_spread$m({}, state), {
686
697
  modSlotPreview: {
687
698
  slotId: '',
688
699
  isEditable: false,
@@ -692,26 +703,26 @@ var reducer = function(state, action) {
692
703
  }
693
704
  case 'MOD_SLOT_PREVIEW_IS_EDITABLE_UPDATED':
694
705
  {
695
- return _object_spread_props$4(_object_spread$l({}, state), {
696
- modSlotPreview: _object_spread_props$4(_object_spread$l({}, state.modSlotPreview), {
706
+ return _object_spread_props$4(_object_spread$m({}, state), {
707
+ modSlotPreview: _object_spread_props$4(_object_spread$m({}, state.modSlotPreview), {
697
708
  isEditable: action === null || action === void 0 ? void 0 : action.payload
698
709
  })
699
710
  });
700
711
  }
701
712
  case 'MOD_SLOT_PARAMS_LIST_RECEIVED':
702
713
  var modSlotNames = Object.keys(state.modSlotTargets);
703
- return _object_spread_props$4(_object_spread$l({}, state), {
714
+ return _object_spread_props$4(_object_spread$m({}, state), {
704
715
  modSlotParams: action === null || action === void 0 ? void 0 : action.payload.reduce(function(acc, item, i) {
705
716
  acc[modSlotNames[i]] = item;
706
717
  return acc;
707
718
  }, {})
708
719
  });
709
720
  case 'DEFAULT_PARAM_VALUES_RECEIVED':
710
- return _object_spread_props$4(_object_spread$l({}, state), {
721
+ return _object_spread_props$4(_object_spread$m({}, state), {
711
722
  defaultParamValues: action === null || action === void 0 ? void 0 : action.payload
712
723
  });
713
724
  case 'MOD_SLOT_PARAM_LABELS_RECIEVED':
714
- return _object_spread_props$4(_object_spread$l({}, state), {
725
+ return _object_spread_props$4(_object_spread$m({}, state), {
715
726
  modSlotParamLabels: action === null || action === void 0 ? void 0 : action.payload
716
727
  });
717
728
  default:
@@ -730,7 +741,7 @@ function useGlobalContext(selector) {
730
741
  // Context provider
731
742
  function GlobalContextProvider(param) {
732
743
  var children = param.children;
733
- var _useReducer = _sliced_to_array$k(useReducer(reducer, defaultGlobalStateValue), 2), state = _useReducer[0], dispatch = _useReducer[1];
744
+ var _useReducer = _sliced_to_array$h(useReducer(reducer, defaultGlobalStateValue), 2), state = _useReducer[0], dispatch = _useReducer[1];
734
745
  var highlightedItemChanged = useCallback(function(highlightedItem) {
735
746
  dispatch({
736
747
  type: 'HIGHLIGHTED_ITEM_CHANGED',
@@ -751,7 +762,7 @@ function GlobalContextProvider(param) {
751
762
  type: 'AUTOMATABLE_PARAMS_LIST_RECEIVED',
752
763
  payload: [
753
764
  'none'
754
- ].concat(_to_consumable_array$3(automatableParamsList))
765
+ ].concat(_to_consumable_array$2(automatableParamsList))
755
766
  });
756
767
  }, []);
757
768
  var allParametersReceived = useCallback(function(allParameters) {
@@ -998,15 +1009,15 @@ function GlobalContextProvider(param) {
998
1009
  }, children);
999
1010
  }
1000
1011
 
1001
- function _array_like_to_array$k(arr, len) {
1012
+ function _array_like_to_array$h(arr, len) {
1002
1013
  if (len == null || len > arr.length) len = arr.length;
1003
1014
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1004
1015
  return arr2;
1005
1016
  }
1006
- function _array_with_holes$j(arr) {
1017
+ function _array_with_holes$g(arr) {
1007
1018
  if (Array.isArray(arr)) return arr;
1008
1019
  }
1009
- function _define_property$l(obj, key, value) {
1020
+ function _define_property$m(obj, key, value) {
1010
1021
  if (key in obj) {
1011
1022
  Object.defineProperty(obj, key, {
1012
1023
  value: value,
@@ -1019,7 +1030,7 @@ function _define_property$l(obj, key, value) {
1019
1030
  }
1020
1031
  return obj;
1021
1032
  }
1022
- function _iterable_to_array_limit$j(arr, i) {
1033
+ function _iterable_to_array_limit$g(arr, i) {
1023
1034
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1024
1035
  if (_i == null) return;
1025
1036
  var _arr = [];
@@ -1043,10 +1054,10 @@ function _iterable_to_array_limit$j(arr, i) {
1043
1054
  }
1044
1055
  return _arr;
1045
1056
  }
1046
- function _non_iterable_rest$j() {
1057
+ function _non_iterable_rest$g() {
1047
1058
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1048
1059
  }
1049
- function _object_spread$k(target) {
1060
+ function _object_spread$l(target) {
1050
1061
  for(var i = 1; i < arguments.length; i++){
1051
1062
  var source = arguments[i] != null ? arguments[i] : {};
1052
1063
  var ownKeys = Object.keys(source);
@@ -1056,21 +1067,21 @@ function _object_spread$k(target) {
1056
1067
  }));
1057
1068
  }
1058
1069
  ownKeys.forEach(function(key) {
1059
- _define_property$l(target, key, source[key]);
1070
+ _define_property$m(target, key, source[key]);
1060
1071
  });
1061
1072
  }
1062
1073
  return target;
1063
1074
  }
1064
- function _sliced_to_array$j(arr, i) {
1065
- return _array_with_holes$j(arr) || _iterable_to_array_limit$j(arr, i) || _unsupported_iterable_to_array$k(arr, i) || _non_iterable_rest$j();
1075
+ function _sliced_to_array$g(arr, i) {
1076
+ return _array_with_holes$g(arr) || _iterable_to_array_limit$g(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$g();
1066
1077
  }
1067
- function _unsupported_iterable_to_array$k(o, minLen) {
1078
+ function _unsupported_iterable_to_array$h(o, minLen) {
1068
1079
  if (!o) return;
1069
- if (typeof o === "string") return _array_like_to_array$k(o, minLen);
1080
+ if (typeof o === "string") return _array_like_to_array$h(o, minLen);
1070
1081
  var n = Object.prototype.toString.call(o).slice(8, -1);
1071
1082
  if (n === "Object" && o.constructor) n = o.constructor.name;
1072
1083
  if (n === "Map" || n === "Set") return Array.from(n);
1073
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$k(o, minLen);
1084
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
1074
1085
  }
1075
1086
  function Button(param) {
1076
1087
  var disabled = param.disabled, text = param.text, id = param.id, className = param.className, style = param.style, onClick = param.onClick, children = param.children, _param_padding = param.padding, padding = _param_padding === void 0 ? [
@@ -1078,7 +1089,7 @@ function Button(param) {
1078
1089
  ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
1079
1090
  Spacing.none
1080
1091
  ] : _param_margin, _param_type = param.type, type = _param_type === void 0 ? ButtonType.latch : _param_type, size = param.size;
1081
- var _React_useState = _sliced_to_array$j(React__default.useState(false), 2), isSelected = _React_useState[0], setIsSelected = _React_useState[1];
1092
+ var _React_useState = _sliced_to_array$g(React__default.useState(false), 2), isSelected = _React_useState[0], setIsSelected = _React_useState[1];
1082
1093
  var buttonState = Juce.getToggleState(id);
1083
1094
  var isLocalhost = window.location.hostname === 'localhost';
1084
1095
  var setModSlotRowTargetAsPreview = useGlobalContext().setModSlotRowTargetAsPreview;
@@ -1140,7 +1151,7 @@ function Button(param) {
1140
1151
  onMouseDown: handleMouseDown,
1141
1152
  disabled: disabled,
1142
1153
  onClick: onClick && onClick,
1143
- style: _object_spread$k({
1154
+ style: _object_spread$l({
1144
1155
  paddingTop: "var(--p-".concat(padding[0], ")"),
1145
1156
  paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
1146
1157
  paddingBottom: "var(--p-".concat((_padding_1 = padding[2]) !== null && _padding_1 !== void 0 ? _padding_1 : padding[0], ")"),
@@ -1158,8 +1169,8 @@ Button.margin = Spacing;
1158
1169
  Button.type = ButtonType;
1159
1170
  Button.size = ButtonSize;
1160
1171
 
1161
- var css_248z$c = ".IconButton {\n cursor: pointer;\n}\n.IconButton:hover:not(:disabled) {\n filter: brightness(80%);\n}\n";
1162
- styleInject(css_248z$c);
1172
+ var css_248z$d = ".IconButton {\n cursor: pointer;\n}\n.IconButton:hover:not(:disabled) {\n filter: brightness(80%);\n}\n";
1173
+ styleInject(css_248z$d);
1163
1174
 
1164
1175
  var JustifyContent = /*#__PURE__*/ function(JustifyContent) {
1165
1176
  JustifyContent["flexStart"] = "flex-start";
@@ -1189,7 +1200,7 @@ var LayoutTags = /*#__PURE__*/ function(LayoutTags) {
1189
1200
  return LayoutTags;
1190
1201
  }({});
1191
1202
 
1192
- function _define_property$k(obj, key, value) {
1203
+ function _define_property$l(obj, key, value) {
1193
1204
  if (key in obj) {
1194
1205
  Object.defineProperty(obj, key, {
1195
1206
  value: value,
@@ -1202,7 +1213,7 @@ function _define_property$k(obj, key, value) {
1202
1213
  }
1203
1214
  return obj;
1204
1215
  }
1205
- function _object_spread$j(target) {
1216
+ function _object_spread$k(target) {
1206
1217
  for(var i = 1; i < arguments.length; i++){
1207
1218
  var source = arguments[i] != null ? arguments[i] : {};
1208
1219
  var ownKeys = Object.keys(source);
@@ -1212,7 +1223,7 @@ function _object_spread$j(target) {
1212
1223
  }));
1213
1224
  }
1214
1225
  ownKeys.forEach(function(key) {
1215
- _define_property$k(target, key, source[key]);
1226
+ _define_property$l(target, key, source[key]);
1216
1227
  });
1217
1228
  }
1218
1229
  return target;
@@ -1303,13 +1314,13 @@ function Box(_param) {
1303
1314
  ]);
1304
1315
  var Tag = tag;
1305
1316
  var _padding_, _padding_1, _padding_2, _ref;
1306
- return /*#__PURE__*/ React__default.createElement(Tag, _object_spread_props$3(_object_spread$j({
1317
+ return /*#__PURE__*/ React__default.createElement(Tag, _object_spread_props$3(_object_spread$k({
1307
1318
  // id="globalValues"
1308
1319
  key: key,
1309
1320
  className: className,
1310
1321
  onClick: onClick
1311
1322
  }, rest), {
1312
- style: _object_spread$j({
1323
+ style: _object_spread$k({
1313
1324
  flexWrap: flexWrap,
1314
1325
  display: display,
1315
1326
  width: width,
@@ -1345,10 +1356,10 @@ Box.padding = Spacing;
1345
1356
  Box.flexWrap = FlexWrap;
1346
1357
  Box.tag = LayoutTags;
1347
1358
 
1348
- var css_248z$b = ".Icon svg {\n width: 100%;\n}\n";
1349
- styleInject(css_248z$b);
1359
+ var css_248z$c = ".Icon svg {\n width: 100%;\n}\n";
1360
+ styleInject(css_248z$c);
1350
1361
 
1351
- function _define_property$j(obj, key, value) {
1362
+ function _define_property$k(obj, key, value) {
1352
1363
  if (key in obj) {
1353
1364
  Object.defineProperty(obj, key, {
1354
1365
  value: value,
@@ -1361,7 +1372,7 @@ function _define_property$j(obj, key, value) {
1361
1372
  }
1362
1373
  return obj;
1363
1374
  }
1364
- function _object_spread$i(target) {
1375
+ function _object_spread$j(target) {
1365
1376
  for(var i = 1; i < arguments.length; i++){
1366
1377
  var source = arguments[i] != null ? arguments[i] : {};
1367
1378
  var ownKeys = Object.keys(source);
@@ -1371,7 +1382,7 @@ function _object_spread$i(target) {
1371
1382
  }));
1372
1383
  }
1373
1384
  ownKeys.forEach(function(key) {
1374
- _define_property$j(target, key, source[key]);
1385
+ _define_property$k(target, key, source[key]);
1375
1386
  });
1376
1387
  }
1377
1388
  return target;
@@ -1720,7 +1731,7 @@ function Icon(param) {
1720
1731
  className: "Icon ".concat(className ? className : ''),
1721
1732
  onClick: onClick,
1722
1733
  padding: padding,
1723
- style: _object_spread$i({
1734
+ style: _object_spread$j({
1724
1735
  width: width,
1725
1736
  height: height !== null && height !== void 0 ? height : width
1726
1737
  }, style)
@@ -1733,7 +1744,7 @@ Icon.icon = Icons;
1733
1744
  Icon.padding = Spacing;
1734
1745
  Icon.margin = Spacing;
1735
1746
 
1736
- function _define_property$i(obj, key, value) {
1747
+ function _define_property$j(obj, key, value) {
1737
1748
  if (key in obj) {
1738
1749
  Object.defineProperty(obj, key, {
1739
1750
  value: value,
@@ -1746,7 +1757,7 @@ function _define_property$i(obj, key, value) {
1746
1757
  }
1747
1758
  return obj;
1748
1759
  }
1749
- function _object_spread$h(target) {
1760
+ function _object_spread$i(target) {
1750
1761
  for(var i = 1; i < arguments.length; i++){
1751
1762
  var source = arguments[i] != null ? arguments[i] : {};
1752
1763
  var ownKeys = Object.keys(source);
@@ -1756,7 +1767,7 @@ function _object_spread$h(target) {
1756
1767
  }));
1757
1768
  }
1758
1769
  ownKeys.forEach(function(key) {
1759
- _define_property$i(target, key, source[key]);
1770
+ _define_property$j(target, key, source[key]);
1760
1771
  });
1761
1772
  }
1762
1773
  return target;
@@ -1769,7 +1780,7 @@ function Label(param) {
1769
1780
  return /*#__PURE__*/ React.createElement("label", {
1770
1781
  id: id,
1771
1782
  htmlFor: htmlFor,
1772
- style: _object_spread$h({
1783
+ style: _object_spread$i({
1773
1784
  fontSize: "var(--text-".concat(fontSize, ")"),
1774
1785
  lineHeight: "var(--text-".concat(fontSize, ")"),
1775
1786
  paddingTop: "var(--p-".concat(padding[0], ")"),
@@ -1789,7 +1800,7 @@ function Label(param) {
1789
1800
  Label.padding = Spacing;
1790
1801
  Label.fontSize = FontSizes;
1791
1802
 
1792
- function _define_property$h(obj, key, value) {
1803
+ function _define_property$i(obj, key, value) {
1793
1804
  if (key in obj) {
1794
1805
  Object.defineProperty(obj, key, {
1795
1806
  value: value,
@@ -1802,7 +1813,7 @@ function _define_property$h(obj, key, value) {
1802
1813
  }
1803
1814
  return obj;
1804
1815
  }
1805
- function _object_spread$g(target) {
1816
+ function _object_spread$h(target) {
1806
1817
  for(var i = 1; i < arguments.length; i++){
1807
1818
  var source = arguments[i] != null ? arguments[i] : {};
1808
1819
  var ownKeys = Object.keys(source);
@@ -1812,7 +1823,7 @@ function _object_spread$g(target) {
1812
1823
  }));
1813
1824
  }
1814
1825
  ownKeys.forEach(function(key) {
1815
- _define_property$h(target, key, source[key]);
1826
+ _define_property$i(target, key, source[key]);
1816
1827
  });
1817
1828
  }
1818
1829
  return target;
@@ -1836,7 +1847,7 @@ function IconButton(param) {
1836
1847
  padding: padding,
1837
1848
  margin: margin,
1838
1849
  disabled: disabled,
1839
- style: _object_spread$g({
1850
+ style: _object_spread$h({
1840
1851
  backgroundColor: backgroundColor,
1841
1852
  width: width,
1842
1853
  height: height !== null && height !== void 0 ? height : 'auto'
@@ -1857,15 +1868,15 @@ IconButton.icon = Icons;
1857
1868
  IconButton.padding = Spacing;
1858
1869
  IconButton.margin = Spacing;
1859
1870
 
1860
- function _array_like_to_array$j(arr, len) {
1871
+ function _array_like_to_array$g(arr, len) {
1861
1872
  if (len == null || len > arr.length) len = arr.length;
1862
1873
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1863
1874
  return arr2;
1864
1875
  }
1865
- function _array_with_holes$i(arr) {
1876
+ function _array_with_holes$f(arr) {
1866
1877
  if (Array.isArray(arr)) return arr;
1867
1878
  }
1868
- function _iterable_to_array_limit$i(arr, i) {
1879
+ function _iterable_to_array_limit$f(arr, i) {
1869
1880
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1870
1881
  if (_i == null) return;
1871
1882
  var _arr = [];
@@ -1889,27 +1900,27 @@ function _iterable_to_array_limit$i(arr, i) {
1889
1900
  }
1890
1901
  return _arr;
1891
1902
  }
1892
- function _non_iterable_rest$i() {
1903
+ function _non_iterable_rest$f() {
1893
1904
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1894
1905
  }
1895
- function _sliced_to_array$i(arr, i) {
1896
- return _array_with_holes$i(arr) || _iterable_to_array_limit$i(arr, i) || _unsupported_iterable_to_array$j(arr, i) || _non_iterable_rest$i();
1906
+ function _sliced_to_array$f(arr, i) {
1907
+ return _array_with_holes$f(arr) || _iterable_to_array_limit$f(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$f();
1897
1908
  }
1898
- function _unsupported_iterable_to_array$j(o, minLen) {
1909
+ function _unsupported_iterable_to_array$g(o, minLen) {
1899
1910
  if (!o) return;
1900
- if (typeof o === "string") return _array_like_to_array$j(o, minLen);
1911
+ if (typeof o === "string") return _array_like_to_array$g(o, minLen);
1901
1912
  var n = Object.prototype.toString.call(o).slice(8, -1);
1902
1913
  if (n === "Object" && o.constructor) n = o.constructor.name;
1903
1914
  if (n === "Map" || n === "Set") return Array.from(n);
1904
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$j(o, minLen);
1915
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
1905
1916
  }
1906
1917
  var useDropdown = function(param) {
1907
1918
  var id = param.id, // TODO: Is there a better way to handle mod matrix dropdowns?
1908
1919
  rowId = param.rowId, label = param.label, _param_items = param.items, items = _param_items === void 0 ? [] : _param_items, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, filter = param.filter, onChange = param.onChange, _param_displayValInHeader = param.displayValInHeader, displayValInHeader = _param_displayValInHeader === void 0 ? true : _param_displayValInHeader;
1909
1920
  var _properties_choices;
1910
1921
  var comboBoxState = Juce.getComboBoxState(id);
1911
- var _useState = _sliced_to_array$i(useState(comboBoxState.getChoiceIndex()), 2), index = _useState[0], setIndex = _useState[1];
1912
- var _useState1 = _sliced_to_array$i(useState(comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
1922
+ var _useState = _sliced_to_array$f(useState(comboBoxState.getChoiceIndex()), 2), index = _useState[0], setIndex = _useState[1];
1923
+ var _useState1 = _sliced_to_array$f(useState(comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
1913
1924
  var _useGlobalContext = useGlobalContext(), highlightedItemChanged = _useGlobalContext.highlightedItemChanged, setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview;
1914
1925
  var choices = items.length ? items : (properties === null || properties === void 0 ? void 0 : (_properties_choices = properties.choices) === null || _properties_choices === void 0 ? void 0 : _properties_choices.length) ? properties === null || properties === void 0 ? void 0 : properties.choices : [];
1915
1926
  var filteredChoices = filter ? choices === null || choices === void 0 ? void 0 : choices.filter(function(item) {
@@ -2005,15 +2016,15 @@ var useDropdown = function(param) {
2005
2016
  };
2006
2017
  };
2007
2018
 
2008
- function _array_like_to_array$i(arr, len) {
2019
+ function _array_like_to_array$f(arr, len) {
2009
2020
  if (len == null || len > arr.length) len = arr.length;
2010
2021
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2011
2022
  return arr2;
2012
2023
  }
2013
- function _array_with_holes$h(arr) {
2024
+ function _array_with_holes$e(arr) {
2014
2025
  if (Array.isArray(arr)) return arr;
2015
2026
  }
2016
- function _iterable_to_array_limit$h(arr, i) {
2027
+ function _iterable_to_array_limit$e(arr, i) {
2017
2028
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2018
2029
  if (_i == null) return;
2019
2030
  var _arr = [];
@@ -2037,19 +2048,19 @@ function _iterable_to_array_limit$h(arr, i) {
2037
2048
  }
2038
2049
  return _arr;
2039
2050
  }
2040
- function _non_iterable_rest$h() {
2051
+ function _non_iterable_rest$e() {
2041
2052
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2042
2053
  }
2043
- function _sliced_to_array$h(arr, i) {
2044
- return _array_with_holes$h(arr) || _iterable_to_array_limit$h(arr, i) || _unsupported_iterable_to_array$i(arr, i) || _non_iterable_rest$h();
2054
+ function _sliced_to_array$e(arr, i) {
2055
+ return _array_with_holes$e(arr) || _iterable_to_array_limit$e(arr, i) || _unsupported_iterable_to_array$f(arr, i) || _non_iterable_rest$e();
2045
2056
  }
2046
- function _unsupported_iterable_to_array$i(o, minLen) {
2057
+ function _unsupported_iterable_to_array$f(o, minLen) {
2047
2058
  if (!o) return;
2048
- if (typeof o === "string") return _array_like_to_array$i(o, minLen);
2059
+ if (typeof o === "string") return _array_like_to_array$f(o, minLen);
2049
2060
  var n = Object.prototype.toString.call(o).slice(8, -1);
2050
2061
  if (n === "Object" && o.constructor) n = o.constructor.name;
2051
2062
  if (n === "Map" || n === "Set") return Array.from(n);
2052
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$i(o, minLen);
2063
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
2053
2064
  }
2054
2065
  function Tabs(param) {
2055
2066
  var items = param.items, _param_id = param.id, id = _param_id === void 0 ? '' : _param_id, className = param.className, _param_padding = param.padding, padding = _param_padding === void 0 ? [
@@ -2057,7 +2068,7 @@ function Tabs(param) {
2057
2068
  ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
2058
2069
  Spacing.none
2059
2070
  ] : _param_margin, _param_gap = param.gap, gap = _param_gap === void 0 ? Spacing.small : _param_gap, width = param.width, height = param.height, tabWidth = param.tabWidth, tabHeight = param.tabHeight, _param_orientation = param.orientation, orientation = _param_orientation === void 0 ? Orientation.horizontal : _param_orientation, _param_justifyContent = param.justifyContent, justifyContent = _param_justifyContent === void 0 ? JustifyContent$1.stretch : _param_justifyContent, _param_alignItems = param.alignItems, alignItems = _param_alignItems === void 0 ? AlignItems$1.stretch : _param_alignItems, _param_color = param.color, color = _param_color === void 0 ? 'var(--bg-lv11)' : _param_color, _param_selectedColor = param.selectedColor, selectedColor = _param_selectedColor === void 0 ? 'var(--color-brand)' : _param_selectedColor, _param_backgroundColor = param.backgroundColor, backgroundColor = _param_backgroundColor === void 0 ? 'transparent' : _param_backgroundColor, _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.small : _param_fontSize, selectedBackgroundColor = param.selectedBackgroundColor, icons = param.icons, onChange = param.onChange;
2060
- var _useState = _sliced_to_array$h(useState(0), 2), selectedIndex = _useState[0], setSelectedIndex = _useState[1];
2071
+ var _useState = _sliced_to_array$e(useState(0), 2), selectedIndex = _useState[0], setSelectedIndex = _useState[1];
2061
2072
  var _useDropdown = useDropdown({
2062
2073
  id: id,
2063
2074
  onChange: onChange
@@ -2144,10 +2155,10 @@ Tabs.justifyContent = JustifyContent$1;
2144
2155
  Tabs.alignItems = AlignItems$1;
2145
2156
  Tabs.fontSize = FontSizes;
2146
2157
 
2147
- var css_248z$a = ".Dropdown-button {\n font-size: var(--text-sm);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--spacing-ml);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-align: center;\n border-radius: 4px;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n height: 26px;\n border: 1px solid var(--bg-lv9);\n /* background: var(--color-gray-800); */\n /* color: var(--color-text); */\n}\n\n.Dropdown-button:hover,\n.Dropdown-button[data-open] {\n outline: none;\n cursor: pointer;\n border: 1px solid var(--color-brand-secondary);\n}\n\n.Dropdown-button:hover .Label {\n cursor: pointer;\n}\n\n.Dropdown-button:disabled {\n cursor: default;\n}\n\n.Dropdown-items {\n border: 1px solid var(--bg-lv9);\n background: var(--bg-lv4);\n box-shadow: rgba(0, 0, 0, 0.25) 0px 0px 5px 3px;\n border-radius: 4px;\n width: 150px;\n z-index: 50;\n}\n\n.Dropdown-item {\n font-size: var(--text-sm);\n padding: var(--spacing-md) var(--spacing-xl);\n min-width: 100px;\n color: var(--color-text);\n cursor: pointer;\n /* text-align: center; */\n}\n\n.Dropdown-item[data-selected] {\n color: var(--color-brand-secondary);\n}\n\n.Dropdown-item:hover {\n background-color: var(--bg-lv7);\n}\n\n.Dropdown-item:hover:not([data-selected]) {\n color: var(--color-text);\n}\n";
2148
- styleInject(css_248z$a);
2158
+ var css_248z$b = ".Dropdown-button {\n font-size: var(--text-sm);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--spacing-ml);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-align: center;\n border-radius: 4px;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n height: 26px;\n border: 1px solid var(--bg-lv9);\n /* background: var(--color-gray-800); */\n /* color: var(--color-text); */\n}\n\n.Dropdown-button:hover,\n.Dropdown-button[data-open] {\n outline: none;\n cursor: pointer;\n border: 1px solid var(--color-brand-secondary);\n}\n\n.Dropdown-button:hover .Label {\n cursor: pointer;\n}\n\n.Dropdown-button:disabled {\n cursor: default;\n}\n\n.Dropdown-items {\n border: 1px solid var(--bg-lv9);\n background: var(--bg-lv4);\n box-shadow: rgba(0, 0, 0, 0.25) 0px 0px 5px 3px;\n border-radius: 4px;\n width: 150px;\n z-index: 50;\n}\n\n.Dropdown-item {\n font-size: var(--text-sm);\n padding: var(--spacing-md) var(--spacing-xl);\n min-width: 100px;\n color: var(--color-text);\n cursor: pointer;\n /* text-align: center; */\n}\n\n.Dropdown-item[data-selected] {\n color: var(--color-brand-secondary);\n}\n\n.Dropdown-item:hover {\n background-color: var(--bg-lv7);\n}\n\n.Dropdown-item:hover:not([data-selected]) {\n color: var(--color-text);\n}\n";
2159
+ styleInject(css_248z$b);
2149
2160
 
2150
- function _define_property$g(obj, key, value) {
2161
+ function _define_property$h(obj, key, value) {
2151
2162
  if (key in obj) {
2152
2163
  Object.defineProperty(obj, key, {
2153
2164
  value: value,
@@ -2160,7 +2171,7 @@ function _define_property$g(obj, key, value) {
2160
2171
  }
2161
2172
  return obj;
2162
2173
  }
2163
- function _object_spread$f(target) {
2174
+ function _object_spread$g(target) {
2164
2175
  for(var i = 1; i < arguments.length; i++){
2165
2176
  var source = arguments[i] != null ? arguments[i] : {};
2166
2177
  var ownKeys = Object.keys(source);
@@ -2170,7 +2181,7 @@ function _object_spread$f(target) {
2170
2181
  }));
2171
2182
  }
2172
2183
  ownKeys.forEach(function(key) {
2173
- _define_property$g(target, key, source[key]);
2184
+ _define_property$h(target, key, source[key]);
2174
2185
  });
2175
2186
  }
2176
2187
  return target;
@@ -2243,7 +2254,7 @@ function Dropdown(param) {
2243
2254
  onClick: incrementValue
2244
2255
  })), /*#__PURE__*/ React__default.createElement(ListboxButton, {
2245
2256
  className: classnames('Combobox Dropdown-button', className),
2246
- style: _object_spread$f({
2257
+ style: _object_spread$g({
2247
2258
  color: "".concat(color ? color : 'initial'),
2248
2259
  width: "".concat(width ? width : '100%'),
2249
2260
  height: height,
@@ -2278,18 +2289,18 @@ function Dropdown(param) {
2278
2289
  }))));
2279
2290
  }
2280
2291
 
2281
- var css_248z$9 = ".TextInput {\n pointer-events: auto;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.TextInput::-moz-selection {\n background: transparent;\n}\n.TextInput::selection {\n background: transparent;\n}\n\n.TextInput:disabled {\n -webkit-user-select: none;\n user-select: none;\n}\n\n.isActive .TextInput {\n -webkit-user-select: auto;\n -moz-user-select: auto;\n -ms-user-select: auto;\n user-select: auto;\n}\n";
2282
- styleInject(css_248z$9);
2292
+ var css_248z$a = ".TextInput {\n pointer-events: auto;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.TextInput::-moz-selection {\n background: transparent;\n}\n.TextInput::selection {\n background: transparent;\n}\n\n.TextInput:disabled {\n -webkit-user-select: none;\n user-select: none;\n}\n\n.isActive .TextInput {\n -webkit-user-select: auto;\n -moz-user-select: auto;\n -ms-user-select: auto;\n user-select: auto;\n}\n";
2293
+ styleInject(css_248z$a);
2283
2294
 
2284
- function _array_like_to_array$h(arr, len) {
2295
+ function _array_like_to_array$e(arr, len) {
2285
2296
  if (len == null || len > arr.length) len = arr.length;
2286
2297
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2287
2298
  return arr2;
2288
2299
  }
2289
- function _array_with_holes$g(arr) {
2300
+ function _array_with_holes$d(arr) {
2290
2301
  if (Array.isArray(arr)) return arr;
2291
2302
  }
2292
- function _define_property$f(obj, key, value) {
2303
+ function _define_property$g(obj, key, value) {
2293
2304
  if (key in obj) {
2294
2305
  Object.defineProperty(obj, key, {
2295
2306
  value: value,
@@ -2302,7 +2313,7 @@ function _define_property$f(obj, key, value) {
2302
2313
  }
2303
2314
  return obj;
2304
2315
  }
2305
- function _iterable_to_array_limit$g(arr, i) {
2316
+ function _iterable_to_array_limit$d(arr, i) {
2306
2317
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2307
2318
  if (_i == null) return;
2308
2319
  var _arr = [];
@@ -2326,10 +2337,10 @@ function _iterable_to_array_limit$g(arr, i) {
2326
2337
  }
2327
2338
  return _arr;
2328
2339
  }
2329
- function _non_iterable_rest$g() {
2340
+ function _non_iterable_rest$d() {
2330
2341
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2331
2342
  }
2332
- function _object_spread$e(target) {
2343
+ function _object_spread$f(target) {
2333
2344
  for(var i = 1; i < arguments.length; i++){
2334
2345
  var source = arguments[i] != null ? arguments[i] : {};
2335
2346
  var ownKeys = Object.keys(source);
@@ -2339,21 +2350,21 @@ function _object_spread$e(target) {
2339
2350
  }));
2340
2351
  }
2341
2352
  ownKeys.forEach(function(key) {
2342
- _define_property$f(target, key, source[key]);
2353
+ _define_property$g(target, key, source[key]);
2343
2354
  });
2344
2355
  }
2345
2356
  return target;
2346
2357
  }
2347
- function _sliced_to_array$g(arr, i) {
2348
- return _array_with_holes$g(arr) || _iterable_to_array_limit$g(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$g();
2358
+ function _sliced_to_array$d(arr, i) {
2359
+ return _array_with_holes$d(arr) || _iterable_to_array_limit$d(arr, i) || _unsupported_iterable_to_array$e(arr, i) || _non_iterable_rest$d();
2349
2360
  }
2350
- function _unsupported_iterable_to_array$h(o, minLen) {
2361
+ function _unsupported_iterable_to_array$e(o, minLen) {
2351
2362
  if (!o) return;
2352
- if (typeof o === "string") return _array_like_to_array$h(o, minLen);
2363
+ if (typeof o === "string") return _array_like_to_array$e(o, minLen);
2353
2364
  var n = Object.prototype.toString.call(o).slice(8, -1);
2354
2365
  if (n === "Object" && o.constructor) n = o.constructor.name;
2355
2366
  if (n === "Map" || n === "Set") return Array.from(n);
2356
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
2367
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
2357
2368
  }
2358
2369
  // import { decimalToPercent, percentToDecimal } from '../../common/utils';
2359
2370
  // import debounce from 'lodash.debounce';
@@ -2365,9 +2376,9 @@ var InputTypes = /*#__PURE__*/ function(InputTypes) {
2365
2376
  function Input(param) {
2366
2377
  var onComplete = param.onComplete, value = param.value; param.min; param.max; var _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.xSmall : _param_fontSize, style = param.style, className = param.className, isDisabled = param.isDisabled, id = param.id, _param_textColor = param.textColor, textColor = _param_textColor === void 0 ? 'var(--color-text)' : _param_textColor, _param_textAlign = param.textAlign, textAlign = _param_textAlign === void 0 ? TextAlign.center : _param_textAlign;
2367
2378
  var _inputRef_current;
2368
- var _useState = _sliced_to_array$g(useState(value), 2), internalValue = _useState[0], setInternalValue = _useState[1];
2379
+ var _useState = _sliced_to_array$d(useState(value), 2), internalValue = _useState[0], setInternalValue = _useState[1];
2369
2380
  // const [hasError, setHasError] = useState<boolean>(false);
2370
- var _useState1 = _sliced_to_array$g(useState(false), 2), isHighlighted = _useState1[0], setIsHighlighted = _useState1[1];
2381
+ var _useState1 = _sliced_to_array$d(useState(false), 2), isHighlighted = _useState1[0], setIsHighlighted = _useState1[1];
2371
2382
  var valueRef = useRef(null);
2372
2383
  var isLocalhost = window.location.hostname === 'localhost';
2373
2384
  // Sets up listeners to handle changes on the backend
@@ -2485,7 +2496,7 @@ function Input(param) {
2485
2496
  id: "".concat(id, "-input"),
2486
2497
  ref: inputRef,
2487
2498
  className: classnames('TextInput', isHighlighted ? 'is-highlighted' : '', className),
2488
- style: _object_spread$e({
2499
+ style: _object_spread$f({
2489
2500
  fontSize: "var(--text-".concat(fontSize),
2490
2501
  textAlign: textAlign,
2491
2502
  color: textColor
@@ -2508,7 +2519,7 @@ Input.type = InputTypes;
2508
2519
  Input.textAlign = TextAlign;
2509
2520
  Input.fontSize = FontSizes;
2510
2521
 
2511
- function _define_property$e(obj, key, value) {
2522
+ function _define_property$f(obj, key, value) {
2512
2523
  if (key in obj) {
2513
2524
  Object.defineProperty(obj, key, {
2514
2525
  value: value,
@@ -2538,23 +2549,23 @@ var RotarySliderSizes = /*#__PURE__*/ function(RotarySliderSizes) {
2538
2549
  return RotarySliderSizes;
2539
2550
  }({});
2540
2551
  var _obj;
2541
- var rotarySliderSizeMap = (_obj = {}, _define_property$e(_obj, "small", {
2552
+ var rotarySliderSizeMap = (_obj = {}, _define_property$f(_obj, "small", {
2542
2553
  width: 40,
2543
2554
  height: 40
2544
- }), _define_property$e(_obj, "large", {
2555
+ }), _define_property$f(_obj, "large", {
2545
2556
  width: 65,
2546
2557
  height: 65
2547
2558
  }), _obj);
2548
2559
 
2549
- function _array_like_to_array$g(arr, len) {
2560
+ function _array_like_to_array$d(arr, len) {
2550
2561
  if (len == null || len > arr.length) len = arr.length;
2551
2562
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2552
2563
  return arr2;
2553
2564
  }
2554
- function _array_with_holes$f(arr) {
2565
+ function _array_with_holes$c(arr) {
2555
2566
  if (Array.isArray(arr)) return arr;
2556
2567
  }
2557
- function _iterable_to_array_limit$f(arr, i) {
2568
+ function _iterable_to_array_limit$c(arr, i) {
2558
2569
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2559
2570
  if (_i == null) return;
2560
2571
  var _arr = [];
@@ -2578,19 +2589,19 @@ function _iterable_to_array_limit$f(arr, i) {
2578
2589
  }
2579
2590
  return _arr;
2580
2591
  }
2581
- function _non_iterable_rest$f() {
2592
+ function _non_iterable_rest$c() {
2582
2593
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2583
2594
  }
2584
- function _sliced_to_array$f(arr, i) {
2585
- return _array_with_holes$f(arr) || _iterable_to_array_limit$f(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$f();
2595
+ function _sliced_to_array$c(arr, i) {
2596
+ return _array_with_holes$c(arr) || _iterable_to_array_limit$c(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$c();
2586
2597
  }
2587
- function _unsupported_iterable_to_array$g(o, minLen) {
2598
+ function _unsupported_iterable_to_array$d(o, minLen) {
2588
2599
  if (!o) return;
2589
- if (typeof o === "string") return _array_like_to_array$g(o, minLen);
2600
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
2590
2601
  var n = Object.prototype.toString.call(o).slice(8, -1);
2591
2602
  if (n === "Object" && o.constructor) n = o.constructor.name;
2592
2603
  if (n === "Map" || n === "Set") return Array.from(n);
2593
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
2604
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
2594
2605
  }
2595
2606
  // 20.0f, 15000.0f, 0.1f, 0.7f),800.0f
2596
2607
  // ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, ValueType skewFactor, bool useSymmetricSkew=false)
@@ -2613,9 +2624,9 @@ var useSlider = function(param) {
2613
2624
  * AudioProcessorParameter::getValue() (C++).
2614
2625
  */ // See https://github.com/juce-framework/JUCE/blob/51d11a2be6d5c97ccf12b4e5e827006e19f0555a/modules/juce_gui_extra/native/javascript/index.js#L230C1-L238C6
2615
2626
  // NOTE: We can think of this as a percentage value, in 0 to 1 format
2616
- var _useState = _sliced_to_array$f(useState(0), 2), scaledValue = _useState[0], setScaledValue = _useState[1];
2627
+ var _useState = _sliced_to_array$c(useState(0), 2), scaledValue = _useState[0], setScaledValue = _useState[1];
2617
2628
  // const [normalisedValue, setNormalisedValue] = useState(0);
2618
- var _useState1 = _sliced_to_array$f(useState(), 2), properties = _useState1[0], setProperties = _useState1[1];
2629
+ var _useState1 = _sliced_to_array$c(useState(), 2), properties = _useState1[0], setProperties = _useState1[1];
2619
2630
  var scaledValueRef = useRef(null);
2620
2631
  var normalisedValueRef = useRef(null);
2621
2632
  var sliderState = Juce.getSliderState(id);
@@ -2852,21 +2863,21 @@ var useSlider = function(param) {
2852
2863
  };
2853
2864
  };
2854
2865
 
2855
- var css_248z$8 = ".RotarySlider {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: center;\n aspect-ratio: 1 / 1;\n}\n\n.RotarySlider-Inner {\n height: 100%;\n width: 100%;\n right: 0;\n top: 0;\n bottom: 0;\n left: 0;\n}\n\n.RotarySlider-Indicator-marker {\n position: absolute;\n top: 3px;\n right: 0;\n left: 50%;\n width: 3px;\n height: 50%;\n transform: translate(-50%, 0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);\n}\n\n.RotarySlider-center-marker {\n width: 3px;\n height: 6px;\n}\n\n.RotarySlider-CenterCircle {\n position: relative;\n border-radius: 100%;\n border: 2px solid var(--color-gray-300);\n /* background: var(--color-gray-800); */\n background: radial-gradient(\n circle at center,\n var(--bg-lv4) 50%,\n var(--bg-lv3) 80%\n );\n}\n\n.RotarySlider-CenterCircle:after {\n content: '';\n width: 4px;\n height: 4px;\n background: var(--color-gray-300);\n border-radius: 100%;\n position: absolute;\n left: 8px;\n top: 3px;\n}\n\n.RotarySlider-positioning-wrapper {\n position: absolute;\n height: 100%;\n width: 100%;\n}\n.ProgressCircle {\n fill: none;\n pointer-events: none;\n}\n\n.ProgressCircle-value {\n text-align: center;\n margin-top: -4px;\n height: 0.8rem;\n line-height: 0.8rem;\n}\n\n.ProgressCircle-bg {\n stroke-width: 3px;\n transform-origin: center;\n /* transform: rotate(135deg); */\n font-size: var(--text-sm);\n pointer-events: none;\n}\n.ProgressCircle-fg {\n stroke-width: 3px;\n /* stroke-dasharray: 75; */\n /* stroke-dashoffset: calc(880 - (660 * 0) / 100); */\n transform-origin: center;\n pointer-events: none;\n}\n\n.corner-border {\n --b: 1px; /* thickness of the border */\n --c: var(--color-gray-500); /* color of the border */\n --w: 5px; /* width of border */\n\n border: var(--b) solid #0000; /* space for the border */\n --_g: #0000 90deg, var(--c) 0;\n --_p: var(--w) var(--w) border-box no-repeat;\n background:\n conic-gradient(from 90deg at top var(--b) left var(--b), var(--_g)) 0 0 /\n var(--_p),\n conic-gradient(from 180deg at top var(--b) right var(--b), var(--_g)) 100% 0 /\n var(--_p),\n conic-gradient(from 0deg at bottom var(--b) left var(--b), var(--_g)) 0 100% /\n var(--_p),\n conic-gradient(from -90deg at bottom var(--b) right var(--b), var(--_g))\n 100% 100% / var(--_p);\n}\n";
2856
- styleInject(css_248z$8);
2866
+ var css_248z$9 = ".RotarySlider {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: center;\n aspect-ratio: 1 / 1;\n}\n\n.RotarySlider-Inner {\n height: 100%;\n width: 100%;\n right: 0;\n top: 0;\n bottom: 0;\n left: 0;\n}\n\n.RotarySlider-Indicator-marker {\n position: absolute;\n top: 3px;\n right: 0;\n left: 50%;\n width: 3px;\n height: 50%;\n transform: translate(-50%, 0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);\n}\n\n.RotarySlider-center-marker {\n width: 3px;\n height: 6px;\n}\n\n.RotarySlider-CenterCircle {\n position: relative;\n border-radius: 100%;\n border: 2px solid var(--color-gray-300);\n /* background: var(--color-gray-800); */\n background: radial-gradient(\n circle at center,\n var(--bg-lv4) 50%,\n var(--bg-lv3) 80%\n );\n}\n\n.RotarySlider-CenterCircle:after {\n content: '';\n width: 4px;\n height: 4px;\n background: var(--color-gray-300);\n border-radius: 100%;\n position: absolute;\n left: 8px;\n top: 3px;\n}\n\n.RotarySlider-positioning-wrapper {\n position: absolute;\n height: 100%;\n width: 100%;\n}\n.ProgressCircle {\n fill: none;\n pointer-events: none;\n}\n\n.ProgressCircle-value {\n text-align: center;\n margin-top: -4px;\n height: 0.8rem;\n line-height: 0.8rem;\n}\n\n.ProgressCircle-bg {\n stroke-width: 3px;\n transform-origin: center;\n /* transform: rotate(135deg); */\n font-size: var(--text-sm);\n pointer-events: none;\n}\n.ProgressCircle-fg {\n stroke-width: 3px;\n /* stroke-dasharray: 75; */\n /* stroke-dashoffset: calc(880 - (660 * 0) / 100); */\n transform-origin: center;\n pointer-events: none;\n}\n\n.corner-border {\n --b: 1px; /* thickness of the border */\n --c: var(--color-gray-500); /* color of the border */\n --w: 5px; /* width of border */\n\n border: var(--b) solid #0000; /* space for the border */\n --_g: #0000 90deg, var(--c) 0;\n --_p: var(--w) var(--w) border-box no-repeat;\n background:\n conic-gradient(from 90deg at top var(--b) left var(--b), var(--_g)) 0 0 /\n var(--_p),\n conic-gradient(from 180deg at top var(--b) right var(--b), var(--_g)) 100% 0 /\n var(--_p),\n conic-gradient(from 0deg at bottom var(--b) left var(--b), var(--_g)) 0 100% /\n var(--_p),\n conic-gradient(from -90deg at bottom var(--b) right var(--b), var(--_g))\n 100% 100% / var(--_p);\n}\n";
2867
+ styleInject(css_248z$9);
2857
2868
 
2858
- var css_248z$7 = "";
2859
- styleInject(css_248z$7);
2869
+ var css_248z$8 = "";
2870
+ styleInject(css_248z$8);
2860
2871
 
2861
- function _array_like_to_array$f(arr, len) {
2872
+ function _array_like_to_array$c(arr, len) {
2862
2873
  if (len == null || len > arr.length) len = arr.length;
2863
2874
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2864
2875
  return arr2;
2865
2876
  }
2866
- function _array_with_holes$e(arr) {
2877
+ function _array_with_holes$b(arr) {
2867
2878
  if (Array.isArray(arr)) return arr;
2868
2879
  }
2869
- function _iterable_to_array_limit$e(arr, i) {
2880
+ function _iterable_to_array_limit$b(arr, i) {
2870
2881
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2871
2882
  if (_i == null) return;
2872
2883
  var _arr = [];
@@ -2890,19 +2901,19 @@ function _iterable_to_array_limit$e(arr, i) {
2890
2901
  }
2891
2902
  return _arr;
2892
2903
  }
2893
- function _non_iterable_rest$e() {
2904
+ function _non_iterable_rest$b() {
2894
2905
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2895
2906
  }
2896
- function _sliced_to_array$e(arr, i) {
2897
- return _array_with_holes$e(arr) || _iterable_to_array_limit$e(arr, i) || _unsupported_iterable_to_array$f(arr, i) || _non_iterable_rest$e();
2907
+ function _sliced_to_array$b(arr, i) {
2908
+ return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$b();
2898
2909
  }
2899
- function _unsupported_iterable_to_array$f(o, minLen) {
2910
+ function _unsupported_iterable_to_array$c(o, minLen) {
2900
2911
  if (!o) return;
2901
- if (typeof o === "string") return _array_like_to_array$f(o, minLen);
2912
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
2902
2913
  var n = Object.prototype.toString.call(o).slice(8, -1);
2903
2914
  if (n === "Object" && o.constructor) n = o.constructor.name;
2904
2915
  if (n === "Map" || n === "Set") return Array.from(n);
2905
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
2916
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
2906
2917
  }
2907
2918
  function ControlGroup(param) {
2908
2919
  var id = param.id, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, className = param.className, onChangeActiveState = param.onChangeActiveState, children = param.children, width = param.width;
@@ -2912,7 +2923,7 @@ function ControlGroup(param) {
2912
2923
  // <Input id={id-input}></Input>
2913
2924
  // </ControlGroup>
2914
2925
  var groupId = "".concat(id, "-control-group");
2915
- var _useState = _sliced_to_array$e(useState(false), 2), isActive = _useState[0], setIsActive = _useState[1];
2926
+ var _useState = _sliced_to_array$b(useState(false), 2), isActive = _useState[0], setIsActive = _useState[1];
2916
2927
  var sliderState = Juce.getSliderState(id);
2917
2928
  var clickListener = function(event) {
2918
2929
  if (!isDisabled) {
@@ -3211,7 +3222,7 @@ var BarSliderMarker = function(param) {
3211
3222
  }))));
3212
3223
  };
3213
3224
 
3214
- function _define_property$d(obj, key, value) {
3225
+ function _define_property$e(obj, key, value) {
3215
3226
  if (key in obj) {
3216
3227
  Object.defineProperty(obj, key, {
3217
3228
  value: value,
@@ -3224,7 +3235,7 @@ function _define_property$d(obj, key, value) {
3224
3235
  }
3225
3236
  return obj;
3226
3237
  }
3227
- function _object_spread$d(target) {
3238
+ function _object_spread$e(target) {
3228
3239
  for(var i = 1; i < arguments.length; i++){
3229
3240
  var source = arguments[i] != null ? arguments[i] : {};
3230
3241
  var ownKeys = Object.keys(source);
@@ -3234,7 +3245,7 @@ function _object_spread$d(target) {
3234
3245
  }));
3235
3246
  }
3236
3247
  ownKeys.forEach(function(key) {
3237
- _define_property$d(target, key, source[key]);
3248
+ _define_property$e(target, key, source[key]);
3238
3249
  });
3239
3250
  }
3240
3251
  return target;
@@ -3265,8 +3276,8 @@ function RotaryCircle(param) {
3265
3276
  var radius = (width - trackWidth * 2) / 2;
3266
3277
  var circ = 2 * 3.14 * radius;
3267
3278
  var activeZone = circ - circ * 0.25;
3268
- console.log(markerShape, 'MARKERSHAPE');
3269
- return /*#__PURE__*/ React__default.createElement(Box, _object_spread_props$2(_object_spread$d({
3279
+ // console.log(markerShape, 'MARKERSHAPE');
3280
+ return /*#__PURE__*/ React__default.createElement(Box, _object_spread_props$2(_object_spread$e({
3270
3281
  id: id,
3271
3282
  key: "RotaryCircle-".concat(id),
3272
3283
  tabIndex: 0,
@@ -3275,7 +3286,7 @@ function RotaryCircle(param) {
3275
3286
  onDoubleClick: function() {
3276
3287
  onDoubleClick && onDoubleClick();
3277
3288
  },
3278
- style: _object_spread$d({
3289
+ style: _object_spread$e({
3279
3290
  touchAction: 'none',
3280
3291
  height: "".concat(height !== null && height !== void 0 ? height : width, "px"),
3281
3292
  width: "".concat(width, "px")
@@ -3322,7 +3333,7 @@ function RotaryCircle(param) {
3322
3333
  RotaryCircle.polarity = Polarity;
3323
3334
  RotaryCircle.size = RotarySliderSizes;
3324
3335
 
3325
- function _define_property$c(obj, key, value) {
3336
+ function _define_property$d(obj, key, value) {
3326
3337
  if (key in obj) {
3327
3338
  Object.defineProperty(obj, key, {
3328
3339
  value: value,
@@ -3335,7 +3346,7 @@ function _define_property$c(obj, key, value) {
3335
3346
  }
3336
3347
  return obj;
3337
3348
  }
3338
- function _object_spread$c(target) {
3349
+ function _object_spread$d(target) {
3339
3350
  for(var i = 1; i < arguments.length; i++){
3340
3351
  var source = arguments[i] != null ? arguments[i] : {};
3341
3352
  var ownKeys = Object.keys(source);
@@ -3345,7 +3356,7 @@ function _object_spread$c(target) {
3345
3356
  }));
3346
3357
  }
3347
3358
  ownKeys.forEach(function(key) {
3348
- _define_property$c(target, key, source[key]);
3359
+ _define_property$d(target, key, source[key]);
3349
3360
  });
3350
3361
  }
3351
3362
  return target;
@@ -3357,7 +3368,7 @@ function PositioningWrapper(param) {
3357
3368
  return /*#__PURE__*/ React__default.createElement("div", {
3358
3369
  id: id,
3359
3370
  className: className,
3360
- style: _object_spread$c({
3371
+ style: _object_spread$d({
3361
3372
  position: 'relative',
3362
3373
  height: height,
3363
3374
  width: width,
@@ -3374,140 +3385,61 @@ function PositioningWrapper(param) {
3374
3385
  }, positionedElement ? positionedElement : null));
3375
3386
  }
3376
3387
 
3377
- function _array_like_to_array$e(arr, len) {
3378
- if (len == null || len > arr.length) len = arr.length;
3379
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3380
- return arr2;
3388
+ var DataTypes = /*#__PURE__*/ function(DataTypes) {
3389
+ DataTypes["json"] = "json";
3390
+ DataTypes["number"] = "number";
3391
+ return DataTypes;
3392
+ }(DataTypes || {});
3393
+ function AnimationDataWrapper(param) {
3394
+ var renderFunction = param.renderFunction, eventId = param.eventId, children = param.children, _param_dataType = param.dataType, dataType = _param_dataType === void 0 ? "json" : _param_dataType;
3395
+ useEffect(function() {
3396
+ //@ts-expect-error
3397
+ var dataRegistrationId = window.__JUCE__.backend.addEventListener(eventId, function(event) {
3398
+ if (dataType === "json") {
3399
+ fetch(Juce.getBackendResourceAddress("".concat(eventId, ".json"))).then(function(response) {
3400
+ return response.text();
3401
+ }).then(function(text) {
3402
+ var data = JSON.parse(text);
3403
+ var func = function() {
3404
+ return renderFunction(data);
3405
+ };
3406
+ window.requestAnimationFrame(func);
3407
+ });
3408
+ } else {
3409
+ var func = function() {
3410
+ return renderFunction(event);
3411
+ };
3412
+ window.requestAnimationFrame(func);
3413
+ }
3414
+ });
3415
+ return function() {
3416
+ //@ts-expect-error
3417
+ window.__JUCE__.backend.removeEventListener(dataRegistrationId);
3418
+ };
3419
+ }, [
3420
+ window
3421
+ ]);
3422
+ return /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, children);
3381
3423
  }
3382
- function _array_with_holes$d(arr) {
3383
- if (Array.isArray(arr)) return arr;
3424
+ AnimationDataWrapper.dataTypes = DataTypes;
3425
+
3426
+ var css_248z$7 = ".canvasContainer {\n --color-brand: #bb68d9;\n}\n";
3427
+ styleInject(css_248z$7);
3428
+
3429
+ function _define_property$c(obj, key, value) {
3430
+ if (key in obj) {
3431
+ Object.defineProperty(obj, key, {
3432
+ value: value,
3433
+ enumerable: true,
3434
+ configurable: true,
3435
+ writable: true
3436
+ });
3437
+ } else {
3438
+ obj[key] = value;
3439
+ }
3440
+ return obj;
3384
3441
  }
3385
- function _iterable_to_array_limit$d(arr, i) {
3386
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3387
- if (_i == null) return;
3388
- var _arr = [];
3389
- var _n = true;
3390
- var _d = false;
3391
- var _s, _e;
3392
- try {
3393
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
3394
- _arr.push(_s.value);
3395
- if (i && _arr.length === i) break;
3396
- }
3397
- } catch (err) {
3398
- _d = true;
3399
- _e = err;
3400
- } finally{
3401
- try {
3402
- if (!_n && _i["return"] != null) _i["return"]();
3403
- } finally{
3404
- if (_d) throw _e;
3405
- }
3406
- }
3407
- return _arr;
3408
- }
3409
- function _non_iterable_rest$d() {
3410
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3411
- }
3412
- function _sliced_to_array$d(arr, i) {
3413
- return _array_with_holes$d(arr) || _iterable_to_array_limit$d(arr, i) || _unsupported_iterable_to_array$e(arr, i) || _non_iterable_rest$d();
3414
- }
3415
- function _unsupported_iterable_to_array$e(o, minLen) {
3416
- if (!o) return;
3417
- if (typeof o === "string") return _array_like_to_array$e(o, minLen);
3418
- var n = Object.prototype.toString.call(o).slice(8, -1);
3419
- if (n === "Object" && o.constructor) n = o.constructor.name;
3420
- if (n === "Map" || n === "Set") return Array.from(n);
3421
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
3422
- }
3423
- // 20.0f, 15000.0f, 0.1f, 0.7f),800.0f
3424
- // ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, ValueType skewFactor, bool useSymmetricSkew=false)
3425
- var DataSource = /*#__PURE__*/ function(DataSource) {
3426
- DataSource["sliderAttachment"] = "sliderAttachment";
3427
- DataSource["buttonAttachment"] = "buttonAttachment";
3428
- DataSource["event"] = "event";
3429
- return DataSource;
3430
- }({});
3431
- var useIndicator = function(param) {
3432
- var id = param.id, _param_dataSource = param.dataSource, dataSource = _param_dataSource === void 0 ? "buttonAttachment" : _param_dataSource;
3433
- var isLocalhost = window.location.hostname === 'localhost';
3434
- // This value should be a range from 0 to 1
3435
- var _useState = _sliced_to_array$d(useState(0), 2), brightness = _useState[0], setBrightness = _useState[1];
3436
- var updateState = function() {
3437
- if (!isLocalhost && dataSource === "buttonAttachment") {
3438
- var _Juce_getToggleState;
3439
- var toggleState = (_Juce_getToggleState = Juce.getToggleState(id)) === null || _Juce_getToggleState === void 0 ? void 0 : _Juce_getToggleState.value;
3440
- setBrightness(toggleState);
3441
- } else if (!isLocalhost && dataSource === "sliderAttachment") {
3442
- var sliderState = Juce.getSliderState(id);
3443
- setBrightness(sliderState === null || sliderState === void 0 ? void 0 : sliderState.normalisedValue);
3444
- }
3445
- };
3446
- // Set the initial state
3447
- useEffect(function() {
3448
- updateState();
3449
- }, []);
3450
- // Update the local state when the ID changes
3451
- useEffect(function() {
3452
- updateState();
3453
- }, [
3454
- id
3455
- ]);
3456
- // Sets up listeners to handle changes on the backend
3457
- useEffect(function() {
3458
- if (!isLocalhost && dataSource === "buttonAttachment") {
3459
- var _toggleState_valueChangedEvent;
3460
- var toggleState = Juce.getToggleState(id);
3461
- var valueListenerId = toggleState === null || toggleState === void 0 ? void 0 : (_toggleState_valueChangedEvent = toggleState.valueChangedEvent) === null || _toggleState_valueChangedEvent === void 0 ? void 0 : _toggleState_valueChangedEvent.addListener(function() {
3462
- setBrightness(toggleState);
3463
- });
3464
- return function cleanup() {
3465
- var _toggleState_valueChangedEvent;
3466
- toggleState === null || toggleState === void 0 ? void 0 : (_toggleState_valueChangedEvent = toggleState.valueChangedEvent) === null || _toggleState_valueChangedEvent === void 0 ? void 0 : _toggleState_valueChangedEvent.removeListener(valueListenerId);
3467
- };
3468
- } else if (!isLocalhost && dataSource === "sliderAttachment") {
3469
- var _sliderState_valueChangedEvent;
3470
- var sliderState = Juce.getSliderState(id);
3471
- var valueListenerId1 = sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_valueChangedEvent = sliderState.valueChangedEvent) === null || _sliderState_valueChangedEvent === void 0 ? void 0 : _sliderState_valueChangedEvent.addListener(function() {
3472
- setBrightness(sliderState);
3473
- });
3474
- return function cleanup() {
3475
- var _sliderState_valueChangedEvent;
3476
- sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_valueChangedEvent = sliderState.valueChangedEvent) === null || _sliderState_valueChangedEvent === void 0 ? void 0 : _sliderState_valueChangedEvent.removeListener(valueListenerId1);
3477
- };
3478
- } else if (!isLocalhost && dataSource === "event") {
3479
- var getLFOOutdata = id && //@ts-expect-error
3480
- window.__JUCE__.backend.addEventListener("".concat(id), function(event) {
3481
- setBrightness(event);
3482
- });
3483
- return function cleanup() {
3484
- //@ts-expect-error
3485
- window.__JUCE__.backend.removeEventListener(getLFOOutdata);
3486
- };
3487
- } else {
3488
- return;
3489
- }
3490
- });
3491
- return {
3492
- dataSource: dataSource,
3493
- brightness: brightness
3494
- };
3495
- };
3496
-
3497
- function _define_property$b(obj, key, value) {
3498
- if (key in obj) {
3499
- Object.defineProperty(obj, key, {
3500
- value: value,
3501
- enumerable: true,
3502
- configurable: true,
3503
- writable: true
3504
- });
3505
- } else {
3506
- obj[key] = value;
3507
- }
3508
- return obj;
3509
- }
3510
- function _object_spread$b(target) {
3442
+ function _object_spread$c(target) {
3511
3443
  for(var i = 1; i < arguments.length; i++){
3512
3444
  var source = arguments[i] != null ? arguments[i] : {};
3513
3445
  var ownKeys = Object.keys(source);
@@ -3517,35 +3449,71 @@ function _object_spread$b(target) {
3517
3449
  }));
3518
3450
  }
3519
3451
  ownKeys.forEach(function(key) {
3520
- _define_property$b(target, key, source[key]);
3452
+ _define_property$c(target, key, source[key]);
3521
3453
  });
3522
3454
  }
3523
3455
  return target;
3524
3456
  }
3525
3457
  function IndicatorLight(param) {
3526
- var id = param.id, className = param.className, label = param.label, dataSource = param.dataSource, _param_activeColor = param.activeColor, activeColor = _param_activeColor === void 0 ? 'var(--color-brand)' : _param_activeColor, _param_inactiveColor = param.inactiveColor, inactiveColor = _param_inactiveColor === void 0 ? 'var(--bg-lv1)' : _param_inactiveColor, _param_shape = param.shape, shape = _param_shape === void 0 ? "round" : _param_shape, style = param.style;
3527
- var brightness = useIndicator({
3528
- id: id,
3529
- dataSource: dataSource
3530
- }).brightness;
3531
- return /*#__PURE__*/ React__default.createElement(Box, {
3458
+ var id = param.id, className = param.className, label = param.label, _param_width = param.width, width = _param_width === void 0 ? 12 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 12 : _param_height; param.// dataSource,
3459
+ activeColor; var _param_inactiveColor = param.inactiveColor, inactiveColor = _param_inactiveColor === void 0 ? 'var(--bg-lv1)' : _param_inactiveColor, _param_shape = param.shape, shape = _param_shape === void 0 ? "round" : _param_shape, style = param.style;
3460
+ // const { brightness } = useIndicator({ id, dataSource });
3461
+ // const canvasCtx = useRef<CanvasRenderingContext2D>(null);
3462
+ useEffect(function() {
3463
+ var canvas = document.getElementById("".concat(id));
3464
+ // console.log(canvas, 'CAN');
3465
+ canvas.width = width;
3466
+ canvas.height = height;
3467
+ var canvasContainer = document.querySelector('.canvasContainer');
3468
+ var containerStyles = canvasContainer && getComputedStyle(canvasContainer);
3469
+ var fillColor = containerStyles === null || containerStyles === void 0 ? void 0 : containerStyles.getPropertyValue('--color-brand');
3470
+ var ctx = canvas === null || canvas === void 0 ? void 0 : canvas.getContext('2d');
3471
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
3472
+ ctx.save();
3473
+ ctx.beginPath();
3474
+ ctx.arc(width / 2, height / 2, width, 0, 2 * Math.PI);
3475
+ ctx.fillStyle = fillColor || '';
3476
+ ctx.fill();
3477
+ }, [
3478
+ window
3479
+ ]);
3480
+ var renderFuction = function(opacity) {
3481
+ // const canvas: any = document.getElementById(`${id}`);
3482
+ // canvas.style.opacity = opacity;
3483
+ // canvas.style.transition = 'opacity 0.5s ease-in-out';
3484
+ // console.log(opacity, 'OPACITY');
3485
+ // const ctx: CanvasRenderingContext2D = canvas?.getContext('2d');
3486
+ // console.log(opacity, ctx, 'ctx in rf');
3487
+ // if (opacity != null && ctx != null) {
3488
+ // ctx.clearRect(0, 0, canvas.width, canvas.height);
3489
+ // ctx.save();
3490
+ // ctx.globalAlpha = opacity;
3491
+ // fill: 'none',
3492
+ // 'shape-rendering': 'crispEdges',
3493
+ };
3494
+ return /*#__PURE__*/ React__default.createElement(AnimationDataWrapper, {
3495
+ renderFunction: renderFuction,
3496
+ eventId: id,
3497
+ dataType: AnimationDataWrapper.dataTypes.number
3498
+ }, /*#__PURE__*/ React__default.createElement(Box, {
3532
3499
  flexDirection: Box.flexDirection.column,
3533
3500
  gap: Box.gap.small,
3534
3501
  alignItems: Box.alignItems.center,
3535
3502
  width: "auto"
3536
3503
  }, /*#__PURE__*/ React__default.createElement("div", {
3537
- style: _object_spread$b({
3504
+ className: "canvasContainer",
3505
+ style: _object_spread$c({
3538
3506
  position: 'relative',
3539
- width: '12px',
3540
- height: '12px',
3507
+ width: "".concat(width, "px"),
3508
+ height: "".concat(height, "px"),
3541
3509
  borderRadius: shape === "round" ? '100%' : 'initial',
3542
3510
  overflow: 'hidden'
3543
3511
  }, style)
3544
3512
  }, /*#__PURE__*/ React__default.createElement("div", {
3545
3513
  className: classnames('IndicatorLight-bg', 'bg-panel', className),
3546
3514
  style: {
3547
- width: '12px',
3548
- height: '12px',
3515
+ width: "".concat(width, "px"),
3516
+ height: "".concat(height, "px"),
3549
3517
  position: 'absolute',
3550
3518
  top: 0,
3551
3519
  right: 0,
@@ -3553,15 +3521,14 @@ function IndicatorLight(param) {
3553
3521
  left: 0,
3554
3522
  background: inactiveColor
3555
3523
  }
3556
- }), /*#__PURE__*/ React__default.createElement("div", {
3557
- className: classnames('IndicatorLight', 'bg-panel', className),
3524
+ }), /*#__PURE__*/ React__default.createElement("canvas", {
3525
+ className: classnames(className),
3526
+ id: id,
3558
3527
  style: {
3559
- opacity: brightness,
3560
3528
  // transition: `opacity 500ms ease-in`,
3561
- background: activeColor,
3562
3529
  position: 'absolute',
3563
- width: '12px',
3564
- height: '12px',
3530
+ width: "".concat(width, "px"),
3531
+ height: "".concat(height, "px"),
3565
3532
  top: 0,
3566
3533
  right: 0,
3567
3534
  bottom: 0,
@@ -3569,9 +3536,8 @@ function IndicatorLight(param) {
3569
3536
  }
3570
3537
  })), label ? /*#__PURE__*/ React__default.createElement(Label, {
3571
3538
  value: label
3572
- }) : null);
3539
+ }) : null));
3573
3540
  }
3574
- IndicatorLight.dataSource = DataSource;
3575
3541
 
3576
3542
  // Rotary Slider UI component.
3577
3543
  // Connects to Juce's Slider element
@@ -3619,8 +3585,7 @@ function RotarySlider(param) {
3619
3585
  width: "".concat(rotarySliderSizeMap === null || rotarySliderSizeMap === void 0 ? void 0 : (_rotarySliderSizeMap_size = rotarySliderSizeMap[size]) === null || _rotarySliderSizeMap_size === void 0 ? void 0 : _rotarySliderSizeMap_size.width, "px"),
3620
3586
  height: "".concat(rotarySliderSizeMap === null || rotarySliderSizeMap === void 0 ? void 0 : (_rotarySliderSizeMap_size1 = rotarySliderSizeMap[size]) === null || _rotarySliderSizeMap_size1 === void 0 ? void 0 : _rotarySliderSizeMap_size1.height, "px"),
3621
3587
  positionedElement: indicatorId ? /*#__PURE__*/ React__default.createElement(IndicatorLight, {
3622
- id: indicatorId,
3623
- dataSource: IndicatorLight.dataSource.event
3588
+ id: indicatorId
3624
3589
  }) : null
3625
3590
  }, /*#__PURE__*/ React__default.createElement(RotaryCircle, {
3626
3591
  polarity: polarity,
@@ -3670,7 +3635,7 @@ RotarySlider.markerShape = RotarySliderMarkerShapes;
3670
3635
  var css_248z$6 = ".BarSlider {\n --maxNarrowTrackIndicatorWidth: 6px;\n --maxNarrowTrackWidth: 20px;\n --minHorizontalWidth: 75px;\n --minVerticalHeight: 75px;\n --narrowTrackMargin: 8px;\n --narrowTrackBorderRadius: 20px;\n}\n\n.BarSlider:hover {\n cursor: pointer;\n}\n\n.BarSlider-Track {\n touch-action: none;\n position: relative;\n width: 100%;\n height: 100%;\n max-height: 100%;\n max-width: 100%;\n background-color: var(--bg-lv5);\n}\n\n.BarSlider-Track.isHighlighted {\n background-color: var(--bg-lv6);\n}\n.Barslider-IndicatorLineWrapper,\n.BarSlider-MarkerWrapper {\n width: 100%;\n height: 100%;\n position: absolute;\n pointer-events: none;\n}\n\n.BarSlider-IndicatorLine {\n position: absolute;\n top: 0;\n /* left: 0; */\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n.BarSlider-Marker {\n position: absolute;\n pointer-events: none;\n}\n\n/* Narrow variant */\n.BarSlider--narrowTrack .BarSlider-Track {\n border-radius: var(--narrowTrackBorderRadius);\n background-color: var(--bg-lv3);\n box-shadow: inset 0px 2px 6px rgba(0, 0, 0, 0.25);\n}\n\n/* .BarSlider--narrowTrack .BarSlider-IndicatorLine {\n border-radius: var(--narrowTrackBorderRadius);\n} */\n\n.BarSlider--narrowTrack .BarSlider-Marker {\n border-radius: var(--narrowTrackBorderRadius);\n}\n\n.BarSlider--narrowTrack .Barslider-IndicatorLineWrapper {\n border-radius: var(--narrowTrackBorderRadius);\n overflow: hidden;\n}\n\n.BarSlider--narrowTrack.BarSlider--isVertical .Barslider-IndicatorLineWrapper,\n.BarSlider--narrowTrack.BarSlider--isVertical .BarSlider-MarkerWrapper {\n bottom: var(--maxNarrowTrackIndicatorWidth);\n left: calc(50% - (var(--maxNarrowTrackIndicatorWidth) / 2));\n width: var(--maxNarrowTrackIndicatorWidth);\n height: calc(100% - (var(--narrowTrackMargin) * 2));\n /* margin-left: var(--narrowTrackMargin); */\n}\n\n.BarSlider--narrowTrack.BarSlider--isHorizontal .Barslider-IndicatorLineWrapper,\n.BarSlider--narrowTrack.BarSlider--isHorizontal .BarSlider-MarkerWrapper {\n top: calc(50% - (var(--maxNarrowTrackIndicatorWidth) / 2));\n left: var(--maxNarrowTrackIndicatorWidth);\n height: var(--maxNarrowTrackIndicatorWidth);\n width: calc(100% - (var(--narrowTrackMargin) * 2));\n margin-bottom: var(--narrowTrackMargin);\n}\n\n.BarSlider--narrowTrack.BarSlider--isVertical .BarSlider-Track {\n height: 100%;\n max-height: 100%;\n width: var(--maxNarrowTrackWidth);\n min-height: var(--minVerticalHeight);\n max-width: var(--maxNarrowTrackWidth);\n}\n\n.BarSlider--narrowTrack.BarSlider--isHorizontal .BarSlider-Track {\n width: 100%;\n max-width: 100%;\n height: var(--maxNarrowTrackWidth);\n max-height: var(--maxNarrowTrackWidth);\n min-width: var(--minHorizontalWidth);\n}\n\n.BarSlider--narrowTrack.BarSlider--isVertical .BarSlider-IndicatorLine {\n max-width: var(--maxNarrowTrackIndicatorWidth);\n max-height: 100%;\n left: calc(50% - (var(--maxNarrowTrackIndicatorWidth) / 2));\n}\n\n.BarSlider--narrowTrack.BarSlider--isHorizontal .BarSlider-IndicatorLine {\n width: 100%;\n max-width: 100%;\n max-height: var(--maxNarrowTrackIndicatorWidth);\n top: calc(50% - (var(--maxNarrowTrackIndicatorWidth) / 2));\n /* left: var(--narrowTrackMargin);\n right: calc(100% - var(--narrowTrackMargin)); */\n}\n/* Wide variant */\n\n.BarSlider--wideTrack .BarSlider-Track {\n border-radius: 2px;\n}\n\n.BarSlider--wideTrack.BarSlider--isVertical .BarSlider-Track {\n min-height: var(--minVerticalHeight);\n}\n\n.BarSlider-Input {\n font-weight: bold;\n width: 100%;\n}\n.BarSlider-Input.includeValueInHeightIsTrue {\n}\n\n.BarSlider-Input.includeValueInHeightIsFalse {\n position: absolute;\n bottom: -1.7em;\n left: 0;\n right: 0;\n z-index: 10;\n}\n";
3671
3636
  styleInject(css_248z$6);
3672
3637
 
3673
- function _define_property$a(obj, key, value) {
3638
+ function _define_property$b(obj, key, value) {
3674
3639
  if (key in obj) {
3675
3640
  Object.defineProperty(obj, key, {
3676
3641
  value: value,
@@ -3683,7 +3648,7 @@ function _define_property$a(obj, key, value) {
3683
3648
  }
3684
3649
  return obj;
3685
3650
  }
3686
- function _object_spread$a(target) {
3651
+ function _object_spread$b(target) {
3687
3652
  for(var i = 1; i < arguments.length; i++){
3688
3653
  var source = arguments[i] != null ? arguments[i] : {};
3689
3654
  var ownKeys = Object.keys(source);
@@ -3693,7 +3658,7 @@ function _object_spread$a(target) {
3693
3658
  }));
3694
3659
  }
3695
3660
  ownKeys.forEach(function(key) {
3696
- _define_property$a(target, key, source[key]);
3661
+ _define_property$b(target, key, source[key]);
3697
3662
  });
3698
3663
  }
3699
3664
  return target;
@@ -3742,7 +3707,7 @@ function Slider$1(param) {
3742
3707
  var multiColorGradient = "linear-gradient(".concat(isHorizontal ? 'to right' : 'to top', ", var(--color-brand) 0%, var(--color-brand-secondary) 100%");
3743
3708
  var singleColorGradient = "linear-gradient(".concat(isHorizontal ? 'to right' : 'to top', ", var(--color-brand-700) 0%, var(--color-brand) 100%");
3744
3709
  var _obj;
3745
- var selectedGradientMap = (_obj = {}, _define_property$a(_obj, GradientStyles.multicolor, multiColorGradient), _define_property$a(_obj, GradientStyles.unicolor, singleColorGradient), _obj);
3710
+ var selectedGradientMap = (_obj = {}, _define_property$b(_obj, GradientStyles.multicolor, multiColorGradient), _define_property$b(_obj, GradientStyles.unicolor, singleColorGradient), _obj);
3746
3711
  var _useSlider = useSlider({
3747
3712
  id: id,
3748
3713
  label: label,
@@ -3785,12 +3750,12 @@ function Slider$1(param) {
3785
3750
  Box.padding.none
3786
3751
  ],
3787
3752
  height: "100%"
3788
- }, /*#__PURE__*/ React__default.createElement("div", _object_spread_props$1(_object_spread$a({
3753
+ }, /*#__PURE__*/ React__default.createElement("div", _object_spread_props$1(_object_spread$b({
3789
3754
  className: classnames('BarSlider-Track', isHighlighted && 'isHighlighted')
3790
3755
  }, drag()), {
3791
3756
  // onMouseEnter={onMouseEnter}
3792
3757
  id: id,
3793
- style: _object_spread$a({
3758
+ style: _object_spread$b({
3794
3759
  background: trackColor,
3795
3760
  stroke: trackStrokeColor ? "1px solid ".concat(trackStrokeColor) : 'none'
3796
3761
  }, style)
@@ -3800,7 +3765,7 @@ function Slider$1(param) {
3800
3765
  // TODO: Why aren't the Tailwind classes working?
3801
3766
  // className={classnames('h-full', 'w-full', 'absolute', 'bg-panel')}
3802
3767
  className: "BarSlider-IndicatorLine",
3803
- style: _object_spread$a({
3768
+ style: _object_spread$b({
3804
3769
  background: indicatorLineGradient ? selectedGradientMap[indicatorLineGradient] : indicatorLineColor,
3805
3770
  opacity: isStandalone || isHighlighted ? '100%' : '80%',
3806
3771
  top: "".concat(isHorizontal && isNarrowTrack && 'calc(50% - 3px)'),
@@ -3845,15 +3810,15 @@ Slider$1.sliderType = SliderType;
3845
3810
  Slider$1.polarity = Polarity;
3846
3811
  Slider$1.orientation = Orientation;
3847
3812
 
3848
- function _array_like_to_array$d(arr, len) {
3813
+ function _array_like_to_array$b(arr, len) {
3849
3814
  if (len == null || len > arr.length) len = arr.length;
3850
3815
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3851
3816
  return arr2;
3852
3817
  }
3853
- function _array_with_holes$c(arr) {
3818
+ function _array_with_holes$a(arr) {
3854
3819
  if (Array.isArray(arr)) return arr;
3855
3820
  }
3856
- function _iterable_to_array_limit$c(arr, i) {
3821
+ function _iterable_to_array_limit$a(arr, i) {
3857
3822
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3858
3823
  if (_i == null) return;
3859
3824
  var _arr = [];
@@ -3877,26 +3842,26 @@ function _iterable_to_array_limit$c(arr, i) {
3877
3842
  }
3878
3843
  return _arr;
3879
3844
  }
3880
- function _non_iterable_rest$c() {
3845
+ function _non_iterable_rest$a() {
3881
3846
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3882
3847
  }
3883
- function _sliced_to_array$c(arr, i) {
3884
- return _array_with_holes$c(arr) || _iterable_to_array_limit$c(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$c();
3848
+ function _sliced_to_array$a(arr, i) {
3849
+ return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$a();
3885
3850
  }
3886
- function _unsupported_iterable_to_array$d(o, minLen) {
3851
+ function _unsupported_iterable_to_array$b(o, minLen) {
3887
3852
  if (!o) return;
3888
- if (typeof o === "string") return _array_like_to_array$d(o, minLen);
3853
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
3889
3854
  var n = Object.prototype.toString.call(o).slice(8, -1);
3890
3855
  if (n === "Object" && o.constructor) n = o.constructor.name;
3891
3856
  if (n === "Map" || n === "Set") return Array.from(n);
3892
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
3857
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
3893
3858
  }
3894
3859
  var useCombobox = function(param) {
3895
3860
  var id = param.id, label = param.label, filter = param.filter; param.onChange; var _param_displayValInHeader = param.displayValInHeader, displayValInHeader = _param_displayValInHeader === void 0 ? true : _param_displayValInHeader, isDisabled = param.isDisabled;
3896
3861
  var _Object_values, _properties_choices;
3897
3862
  var comboBoxState = Juce.getComboBoxState(id);
3898
- var _useState = _sliced_to_array$c(useState(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties), 2), properties = _useState[0], setProperties = _useState[1];
3899
- var _useState1 = _sliced_to_array$c(useState(0), 2), index = _useState1[0], setIndex = _useState1[1];
3863
+ var _useState = _sliced_to_array$a(useState(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties), 2), properties = _useState[0], setProperties = _useState[1];
3864
+ var _useState1 = _sliced_to_array$a(useState(0), 2), index = _useState1[0], setIndex = _useState1[1];
3900
3865
  var prevIndex = useRef(null);
3901
3866
  var nextIndex = useRef(null);
3902
3867
  var prevDragDirection = useRef(null);
@@ -4075,8 +4040,7 @@ function RotaryCombobox(param) {
4075
4040
  width: "".concat(rotarySliderSizeMap === null || rotarySliderSizeMap === void 0 ? void 0 : (_rotarySliderSizeMap_size = rotarySliderSizeMap[size]) === null || _rotarySliderSizeMap_size === void 0 ? void 0 : _rotarySliderSizeMap_size.width, "px"),
4076
4041
  height: "".concat(rotarySliderSizeMap === null || rotarySliderSizeMap === void 0 ? void 0 : (_rotarySliderSizeMap_size1 = rotarySliderSizeMap[size]) === null || _rotarySliderSizeMap_size1 === void 0 ? void 0 : _rotarySliderSizeMap_size1.height, "px"),
4077
4042
  positionedElement: indicatorId ? /*#__PURE__*/ React__default.createElement(IndicatorLight, {
4078
- id: indicatorId,
4079
- dataSource: IndicatorLight.dataSource.event
4043
+ id: indicatorId
4080
4044
  }) : null
4081
4045
  }, /*#__PURE__*/ React__default.createElement(RotaryCircle, {
4082
4046
  polarity: polarity,
@@ -4201,7 +4165,7 @@ var HeadingTags = /*#__PURE__*/ function(HeadingTags) {
4201
4165
  return HeadingTags;
4202
4166
  }({});
4203
4167
 
4204
- function _define_property$9(obj, key, value) {
4168
+ function _define_property$a(obj, key, value) {
4205
4169
  if (key in obj) {
4206
4170
  Object.defineProperty(obj, key, {
4207
4171
  value: value,
@@ -4214,7 +4178,7 @@ function _define_property$9(obj, key, value) {
4214
4178
  }
4215
4179
  return obj;
4216
4180
  }
4217
- function _object_spread$9(target) {
4181
+ function _object_spread$a(target) {
4218
4182
  for(var i = 1; i < arguments.length; i++){
4219
4183
  var source = arguments[i] != null ? arguments[i] : {};
4220
4184
  var ownKeys = Object.keys(source);
@@ -4224,7 +4188,7 @@ function _object_spread$9(target) {
4224
4188
  }));
4225
4189
  }
4226
4190
  ownKeys.forEach(function(key) {
4227
- _define_property$9(target, key, source[key]);
4191
+ _define_property$a(target, key, source[key]);
4228
4192
  });
4229
4193
  }
4230
4194
  return target;
@@ -4237,7 +4201,7 @@ function Heading(param) {
4237
4201
  var _padding_, _padding_1, _padding_2, _ref;
4238
4202
  return /*#__PURE__*/ React.createElement(Tag, {
4239
4203
  id: id,
4240
- style: _object_spread$9({
4204
+ style: _object_spread$a({
4241
4205
  fontSize: "var(--text-".concat(fontSize),
4242
4206
  paddingTop: "var(--p-".concat(padding[0], ")"),
4243
4207
  paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
@@ -4256,7 +4220,7 @@ Heading.fontSize = FontSizes;
4256
4220
  Heading.tag = HeadingTags;
4257
4221
  Heading.padding = Spacing;
4258
4222
 
4259
- function _define_property$8(obj, key, value) {
4223
+ function _define_property$9(obj, key, value) {
4260
4224
  if (key in obj) {
4261
4225
  Object.defineProperty(obj, key, {
4262
4226
  value: value,
@@ -4269,7 +4233,7 @@ function _define_property$8(obj, key, value) {
4269
4233
  }
4270
4234
  return obj;
4271
4235
  }
4272
- function _object_spread$8(target) {
4236
+ function _object_spread$9(target) {
4273
4237
  for(var i = 1; i < arguments.length; i++){
4274
4238
  var source = arguments[i] != null ? arguments[i] : {};
4275
4239
  var ownKeys = Object.keys(source);
@@ -4279,7 +4243,7 @@ function _object_spread$8(target) {
4279
4243
  }));
4280
4244
  }
4281
4245
  ownKeys.forEach(function(key) {
4282
- _define_property$8(target, key, source[key]);
4246
+ _define_property$9(target, key, source[key]);
4283
4247
  });
4284
4248
  }
4285
4249
  return target;
@@ -4291,7 +4255,7 @@ function KeyValueDisplayScreen(param) {
4291
4255
  // justifyContent={Box.justifyContent.flexStart}
4292
4256
  alignItems: Box.alignItems.flexStart,
4293
4257
  gap: Box.gap.small,
4294
- style: _object_spread$8({}, style),
4258
+ style: _object_spread$9({}, style),
4295
4259
  padding: [
4296
4260
  Box.padding.small,
4297
4261
  Box.padding.none,
@@ -4331,194 +4295,599 @@ function KeyValueDisplayScreen(param) {
4331
4295
  }, "Antimatter Audio")), /*#__PURE__*/ React__default.createElement(Box, null, /*#__PURE__*/ React__default.createElement(Label, null))));
4332
4296
  }
4333
4297
 
4334
- function LinePlot(param) {
4335
- var data = param.data, _param_width = param.width, width = _param_width === void 0 ? 600 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 200 : _param_height, _param_marginTop = param.marginTop, marginTop = _param_marginTop === void 0 ? 20 : _param_marginTop, _param_marginRight = param.marginRight, marginRight = _param_marginRight === void 0 ? 20 : _param_marginRight, _param_marginBottom = param.marginBottom, marginBottom = _param_marginBottom === void 0 ? 20 : _param_marginBottom, _param_marginLeft = param.marginLeft, marginLeft = _param_marginLeft === void 0 ? 20 : _param_marginLeft, _param_displayGrid = param.displayGrid, displayGrid = _param_displayGrid === void 0 ? true : _param_displayGrid;
4336
- //TODO: Figure out why some data is null
4337
- var filteredData = data ? Array.isArray(data) ? data === null || data === void 0 ? void 0 : data.filter(function(item) {
4338
- return item !== null;
4339
- }) : [
4340
- data
4341
- ] : [];
4342
- var x = d3.scaleLinear([
4343
- 0,
4344
- (filteredData === null || filteredData === void 0 ? void 0 : filteredData.length) - 1
4345
- ], [
4346
- marginLeft,
4347
- width - marginRight
4348
- ]);
4349
- // @ts-expect-error
4350
- var y = d3.scaleLinear(d3.extent(filteredData), [
4351
- height - marginBottom,
4352
- marginTop
4353
- ]);
4354
- var line = d3.line(function(_, i) {
4355
- return x(i);
4356
- }, y);
4357
- return /*#__PURE__*/ React__default.createElement("div", {
4358
- style: {
4359
- position: 'relative'
4360
- }
4361
- }, /*#__PURE__*/ React__default.createElement("svg", {
4362
- width: width,
4363
- height: height
4364
- }, /*#__PURE__*/ React__default.createElement("filter", {
4365
- id: "blur"
4366
- }, /*#__PURE__*/ React__default.createElement("feDropShadow", {
4367
- dx: "0",
4368
- dy: "0",
4369
- stdDeviation: "3",
4370
- floodOpacity: "1",
4371
- floodColor: "#6FFFF5"
4372
- })), /*#__PURE__*/ React__default.createElement("path", {
4373
- fill: "none",
4374
- stroke: "#6FFFF5",
4375
- strokeWidth: "2",
4376
- filter: "url(#blur)",
4377
- // @ts-expect-error
4378
- d: line(filteredData)
4379
- })), displayGrid ? /*#__PURE__*/ React__default.createElement("svg", {
4380
- style: {
4381
- position: 'absolute',
4382
- top: 0,
4383
- right: 0,
4384
- bottom: 1,
4385
- left: 0
4386
- },
4387
- width: width,
4388
- height: height,
4389
- xmlns: "http://www.w3.org/2000/svg"
4390
- }, /*#__PURE__*/ React__default.createElement("defs", null, /*#__PURE__*/ React__default.createElement("pattern", {
4391
- id: "grid",
4392
- width: "40",
4393
- height: "40",
4394
- patternUnits: "userSpaceOnUse"
4395
- }, /*#__PURE__*/ React__default.createElement("path", {
4396
- d: "M 40 0 L 0 0 0 40",
4397
- fill: "none",
4398
- stroke: "#366F46",
4399
- strokeWidth: "1"
4400
- }))), /*#__PURE__*/ React__default.createElement("rect", {
4401
- width: width,
4402
- height: width,
4403
- fill: "url(#grid)"
4404
- })) : null);
4405
- }
4406
-
4407
- var css_248z$5 = ".Oscilloscope {\n background: #0EAC8B;\n box-shadow: inset 0 0 20px #086350;\n height: 200px;\n };";
4298
+ var css_248z$5 = ".Oscilloscope {\n background: #1f9b9f;\n height: 200px;\n}\n";
4408
4299
  styleInject(css_248z$5);
4409
4300
 
4410
- function _array_like_to_array$c(arr, len) {
4411
- if (len == null || len > arr.length) len = arr.length;
4412
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4413
- return arr2;
4414
- }
4415
- function _array_with_holes$b(arr) {
4416
- if (Array.isArray(arr)) return arr;
4417
- }
4418
- function _define_property$7(obj, key, value) {
4419
- if (key in obj) {
4420
- Object.defineProperty(obj, key, {
4421
- value: value,
4422
- enumerable: true,
4423
- configurable: true,
4424
- writable: true
4301
+ function Ticks(param) {
4302
+ var xScale = param.xScale, yScale = param.yScale, innerHeight = param.innerHeight, innerWidth = param.innerWidth, _param_centerLine = param.centerLine, centerLine = _param_centerLine === void 0 ? true : _param_centerLine, _param_strokeColor = param.strokeColor, strokeColor = _param_strokeColor === void 0 ? 'var(--color-brand-900)' : _param_strokeColor, strokeStyle = param.strokeStyle, _param_centerLineColor = param.centerLineColor, centerLineColor = _param_centerLineColor === void 0 ? 'var(--color-brand-900)' : _param_centerLineColor; param.tickFormat; var _param_numberOfTicks = param.numberOfTicks, numberOfTicks = _param_numberOfTicks === void 0 ? 25 : _param_numberOfTicks; param.tickOffset;
4303
+ var _xAxis_tickValues, _yAxis_tickValues;
4304
+ var dashArray = '2,3';
4305
+ var customTicks = d3.range(0, innerWidth, numberOfTicks);
4306
+ var yAxis = d3.axisLeft(yScale).tickValues(customTicks);
4307
+ var xAxis = d3.axisLeft(xScale).tickValues(customTicks);
4308
+ return /*#__PURE__*/ React__default.createElement("g", {
4309
+ className: "ticks",
4310
+ height: innerHeight,
4311
+ width: innerWidth
4312
+ }, xScale ? /*#__PURE__*/ React__default.createElement("g", {
4313
+ className: "xScale",
4314
+ height: innerHeight,
4315
+ width: innerWidth
4316
+ }, xAxis === null || xAxis === void 0 ? void 0 : (_xAxis_tickValues = xAxis.tickValues()) === null || _xAxis_tickValues === void 0 ? void 0 : _xAxis_tickValues.map(function(tickValue, i) {
4317
+ return /*#__PURE__*/ React__default.createElement("line", {
4318
+ x1: tickValue,
4319
+ "stroke-linecap": "round",
4320
+ key: tickValue,
4321
+ y1: 0,
4322
+ y2: innerHeight,
4323
+ x2: tickValue,
4324
+ stroke: strokeColor,
4325
+ "stroke-dasharray": strokeStyle === StrokeStyle.dashed ? dashArray : null
4425
4326
  });
4426
- } else {
4427
- obj[key] = value;
4428
- }
4429
- return obj;
4430
- }
4431
- function _iterable_to_array_limit$b(arr, i) {
4432
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
4433
- if (_i == null) return;
4434
- var _arr = [];
4435
- var _n = true;
4436
- var _d = false;
4437
- var _s, _e;
4438
- try {
4439
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
4440
- _arr.push(_s.value);
4441
- if (i && _arr.length === i) break;
4442
- }
4443
- } catch (err) {
4444
- _d = true;
4445
- _e = err;
4446
- } finally{
4447
- try {
4448
- if (!_n && _i["return"] != null) _i["return"]();
4449
- } finally{
4450
- if (_d) throw _e;
4451
- }
4452
- }
4453
- return _arr;
4454
- }
4455
- function _non_iterable_rest$b() {
4456
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4457
- }
4458
- function _object_spread$7(target) {
4459
- for(var i = 1; i < arguments.length; i++){
4460
- var source = arguments[i] != null ? arguments[i] : {};
4461
- var ownKeys = Object.keys(source);
4462
- if (typeof Object.getOwnPropertySymbols === "function") {
4463
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
4464
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
4465
- }));
4466
- }
4467
- ownKeys.forEach(function(key) {
4468
- _define_property$7(target, key, source[key]);
4327
+ })) : null, yScale ? /*#__PURE__*/ React__default.createElement("g", {
4328
+ className: "yScale",
4329
+ height: innerHeight,
4330
+ width: innerWidth
4331
+ }, yAxis === null || yAxis === void 0 ? void 0 : (_yAxis_tickValues = yAxis.tickValues()) === null || _yAxis_tickValues === void 0 ? void 0 : _yAxis_tickValues.map(function(tickValue) {
4332
+ return /*#__PURE__*/ React__default.createElement("line", {
4333
+ x1: 0,
4334
+ "stroke-linecap": "round",
4335
+ x2: innerWidth,
4336
+ key: tickValue,
4337
+ y1: tickValue,
4338
+ y2: tickValue,
4339
+ stroke: strokeColor,
4340
+ "stroke-dasharray": strokeStyle === StrokeStyle.dashed ? dashArray : null
4469
4341
  });
4470
- }
4471
- return target;
4472
- }
4473
- function _sliced_to_array$b(arr, i) {
4474
- return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$b();
4342
+ })) : null, centerLine ? /*#__PURE__*/ React__default.createElement("g", {
4343
+ className: "centerLine"
4344
+ }, /*#__PURE__*/ React__default.createElement("line", {
4345
+ "stroke-dasharray": strokeStyle === StrokeStyle.dashed ? dashArray : null,
4346
+ x1: 0,
4347
+ y1: "".concat(innerHeight / 2),
4348
+ y2: "".concat(innerHeight / 2),
4349
+ x2: "".concat(innerWidth),
4350
+ stroke: centerLineColor,
4351
+ strokeWidth: '3px'
4352
+ })) : null);
4475
4353
  }
4476
- function _unsupported_iterable_to_array$c(o, minLen) {
4477
- if (!o) return;
4478
- if (typeof o === "string") return _array_like_to_array$c(o, minLen);
4479
- var n = Object.prototype.toString.call(o).slice(8, -1);
4480
- if (n === "Object" && o.constructor) n = o.constructor.name;
4481
- if (n === "Map" || n === "Set") return Array.from(n);
4482
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
4354
+
4355
+ function Line(param) {
4356
+ var data = param.data; param.width; var xScale = param.xScale, yScale = param.yScale, _param_strokeColor = param.strokeColor, strokeColor = _param_strokeColor === void 0 ? 'var(--color-brand-600)' : _param_strokeColor, _param_strokeWidth = param.strokeWidth, strokeWidth = _param_strokeWidth === void 0 ? '3px' : _param_strokeWidth;
4357
+ return /*#__PURE__*/ React__default.createElement("g", {
4358
+ className: "marks"
4359
+ }, /*#__PURE__*/ React__default.createElement("path", {
4360
+ fill: "none",
4361
+ // fill={fillGradient ? `url(#${fillGradient}-gradient)` : fillColor}
4362
+ filter: "url(#dropshadow)",
4363
+ stroke: strokeColor,
4364
+ strokeWidth: strokeWidth,
4365
+ //@ts-expect-error
4366
+ d: line().x(function(d) {
4367
+ return xScale(d.x);
4368
+ }).y(function(d) {
4369
+ return yScale(d.y);
4370
+ }).curve(curveBasis)(data)
4371
+ }), /*#__PURE__*/ React__default.createElement("defs", null, /*#__PURE__*/ React__default.createElement("filter", {
4372
+ id: "dropshadow"
4373
+ }, /*#__PURE__*/ React__default.createElement("feDropShadow", {
4374
+ dx: "0",
4375
+ dy: "0",
4376
+ stdDeviation: ".5",
4377
+ "flood-color": "var(--color-brand-600)",
4378
+ "flood-opacity": ".5"
4379
+ }))));
4483
4380
  }
4484
- function Oscilloscope(param) {
4485
- var width = param.width, height = param.height, className = param.className, style = param.style, id = param.id;
4486
- var _useState = _sliced_to_array$b(useState([]), 2), viewData = _useState[0], setViewData = _useState[1];
4487
- var cycleLength = useRef(0);
4488
- useEffect(function() {
4381
+
4382
+ function Area(param) {
4383
+ var data = param.data, xScale = param.xScale, yScale = param.yScale, _param_fillColor = param.fillColor, fillColor = _param_fillColor === void 0 ? 'var(--color-brand)' : _param_fillColor, fillGradient = param.fillGradient;
4384
+ return /*#__PURE__*/ React__default.createElement("g", {
4385
+ className: "marks"
4386
+ }, /*#__PURE__*/ React__default.createElement("path", {
4387
+ fill: fillGradient ? "url(#".concat(fillGradient, "-gradient)") : fillColor,
4388
+ stroke: "none",
4489
4389
  //@ts-expect-error
4490
- var getOscData = window.__JUCE__.backend.addEventListener('oscData', function() {
4491
- fetch(Juce.getBackendResourceAddress('oscData.json')).then(function(response) {
4492
- return response.text();
4493
- }).then(function(oscOutput) {
4494
- var _JSON_parse;
4495
- setViewData((_JSON_parse = JSON.parse(oscOutput)) === null || _JSON_parse === void 0 ? void 0 : _JSON_parse.oscData.slice(0, cycleLength.current));
4496
- });
4390
+ d: area().x(function(d) {
4391
+ return xScale(d.x);
4392
+ }).y0(function() {
4393
+ return yScale(-1);
4394
+ }).y1(function(d) {
4395
+ return yScale(d.y);
4396
+ }).curve(curveBasis)(data)
4397
+ }), /*#__PURE__*/ React__default.createElement("defs", null, /*#__PURE__*/ React__default.createElement("linearGradient", {
4398
+ id: "unicolor-gradient",
4399
+ x1: "0",
4400
+ y1: "0",
4401
+ x2: "0",
4402
+ y2: "1"
4403
+ }, /*#__PURE__*/ React__default.createElement("stop", {
4404
+ offset: "0%",
4405
+ "stop-color": "var(--color-brand-700)",
4406
+ "stop-opacity": 0.2
4407
+ }), /*#__PURE__*/ React__default.createElement("stop", {
4408
+ offset: "20%",
4409
+ "stop-color": "var(--color-brand-700)",
4410
+ "stop-opacity": 0.15
4411
+ }), /*#__PURE__*/ React__default.createElement("stop", {
4412
+ offset: "30%",
4413
+ "stop-color": "var(--color-brand-700)",
4414
+ "stop-opacity": 0.1
4415
+ }), /*#__PURE__*/ React__default.createElement("stop", {
4416
+ offset: "55%",
4417
+ "stop-color": "var(--color-brand-700)",
4418
+ "stop-opacity": 0
4419
+ })), /*#__PURE__*/ React__default.createElement("linearGradient", {
4420
+ id: "multicolor-gradient"
4421
+ }, /*#__PURE__*/ React__default.createElement("stop", {
4422
+ offset: "0%",
4423
+ "stop-color": "var(--color-brand)",
4424
+ "stop-opacity": 0.2
4425
+ }), /*#__PURE__*/ React__default.createElement("stop", {
4426
+ offset: "20%",
4427
+ "stop-color": "var(--color-brand)",
4428
+ "stop-opacity": 0.15
4429
+ }), /*#__PURE__*/ React__default.createElement("stop", {
4430
+ offset: "30%",
4431
+ "stop-color": "var(--color-brand)",
4432
+ "stop-opacity": 0.1
4433
+ }), /*#__PURE__*/ React__default.createElement("stop", {
4434
+ offset: "55%",
4435
+ "stop-color": "var(--color-brand-secondary)",
4436
+ "stop-opacity": 0
4437
+ }))));
4438
+ }
4439
+
4440
+ function LineChartSvg(param) {
4441
+ var data = param.data, width = param.width, height = param.height, xScale = param.xScale, yScale = param.yScale, fillColor = param.fillColor, fillGradient = param.fillGradient, strokeColor = param.strokeColor, _param_displayGrid = param.displayGrid, displayGrid = _param_displayGrid === void 0 ? true : _param_displayGrid, _param_displayCenterLine = param.displayCenterLine, displayCenterLine = _param_displayCenterLine === void 0 ? true : _param_displayCenterLine, gridColor = param.gridColor, gridStroke = param.gridStroke, numberOfTicks = param.numberOfTicks;
4442
+ return /*#__PURE__*/ React__default.createElement("svg", {
4443
+ width: width,
4444
+ height: height
4445
+ }, displayGrid ? /*#__PURE__*/ React__default.createElement(Ticks, {
4446
+ numberOfTicks: numberOfTicks,
4447
+ xScale: xScale,
4448
+ yScale: yScale,
4449
+ innerHeight: height,
4450
+ innerWidth: width,
4451
+ centerLine: displayCenterLine,
4452
+ strokeColor: gridColor,
4453
+ strokeStyle: gridStroke,
4454
+ centerLineColor: gridColor
4455
+ }) : null, /*#__PURE__*/ React__default.createElement("g", null, fillColor || fillGradient ? /*#__PURE__*/ React__default.createElement(Area, {
4456
+ fillColor: fillColor,
4457
+ fillGradient: fillGradient,
4458
+ data: data,
4459
+ xScale: xScale,
4460
+ yScale: yScale
4461
+ }) : null, /*#__PURE__*/ React__default.createElement(Line, {
4462
+ width: width,
4463
+ strokeColor: strokeColor,
4464
+ data: data,
4465
+ xScale: xScale,
4466
+ yScale: yScale
4467
+ })));
4468
+ }
4469
+
4470
+ function LineChartCanvas(param) {
4471
+ param.data; var id = param.id, width = param.width, height = param.height, xScale = param.xScale, yScale = param.yScale; param.margin; param.fillColor; param.fillGradient; param.strokeColor; var displayGrid = param.displayGrid, displayCenterLine = param.displayCenterLine, gridColor = param.gridColor, gridStroke = param.gridStroke, numberOfTicks = param.numberOfTicks;
4472
+ var canvasRef = useRef(null);
4473
+ return /*#__PURE__*/ React__default.createElement("div", {
4474
+ style: {
4475
+ width: width,
4476
+ height: height,
4477
+ position: 'relative'
4478
+ }
4479
+ }, displayGrid ? /*#__PURE__*/ React__default.createElement("div", {
4480
+ style: {
4481
+ position: 'absolute',
4482
+ top: 0,
4483
+ right: 0,
4484
+ bottom: 0,
4485
+ left: 0
4486
+ }
4487
+ }, /*#__PURE__*/ React__default.createElement("svg", {
4488
+ width: width,
4489
+ height: height
4490
+ }, ' ', /*#__PURE__*/ React__default.createElement(Ticks, {
4491
+ xScale: xScale,
4492
+ yScale: yScale,
4493
+ numberOfTicks: numberOfTicks,
4494
+ innerHeight: height,
4495
+ innerWidth: width,
4496
+ centerLine: displayCenterLine,
4497
+ strokeColor: gridColor,
4498
+ strokeStyle: gridStroke,
4499
+ centerLineColor: gridColor
4500
+ }))) : null, /*#__PURE__*/ React__default.createElement("div", {
4501
+ style: {
4502
+ position: 'absolute',
4503
+ top: 0,
4504
+ right: 0,
4505
+ bottom: 0,
4506
+ left: 0,
4507
+ height: '100%',
4508
+ width: '100%'
4509
+ }
4510
+ }, /*#__PURE__*/ React__default.createElement("canvas", {
4511
+ id: id,
4512
+ ref: canvasRef,
4513
+ width: width,
4514
+ height: height
4515
+ })));
4516
+ }
4517
+
4518
+ function LineChart(param) {
4519
+ var data = param.data, id = param.id, _param_width = param.width, width = _param_width === void 0 ? 100 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 100 : _param_height, _param_renderAs = param.renderAs, renderAs = _param_renderAs === void 0 ? GraphicRenderOptions.svg : _param_renderAs, _param_margin = param.margin, margin = _param_margin === void 0 ? 5 : _param_margin, _param_yScaleDomain = param.yScaleDomain, yScaleDomain = _param_yScaleDomain === void 0 ? [
4520
+ 0,
4521
+ 1
4522
+ ] : _param_yScaleDomain, strokeColor = param.strokeColor, fillColor = param.fillColor, fillGradient = param.fillGradient, displayGrid = param.displayGrid, displayCenterLine = param.displayCenterLine, numberOfTicks = param.numberOfTicks, gridColor = param.gridColor, gridStroke = param.gridStroke;
4523
+ var _data_current;
4524
+ // const innerHeight = height - margin * 2;
4525
+ // const innerWidth = width - margin * 2;
4526
+ // const xAxisTickFormat = timeFormat('%a');
4527
+ // const maxArrayLength = 512;
4528
+ var dataLength = Array.isArray(data) ? data === null || data === void 0 ? void 0 : data.length : data === null || data === void 0 ? void 0 : (_data_current = data.current) === null || _data_current === void 0 ? void 0 : _data_current.length;
4529
+ var xScale = width && scaleLinear().domain([
4530
+ 0,
4531
+ dataLength
4532
+ ]).range([
4533
+ 0,
4534
+ width
4535
+ ]);
4536
+ var yScale = height && scaleLinear().domain(yScaleDomain).range([
4537
+ height - margin,
4538
+ margin
4539
+ ]);
4540
+ return /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, renderAs === GraphicRenderOptions.svg ? /*#__PURE__*/ React__default.createElement(LineChartSvg, {
4541
+ data: data,
4542
+ width: width,
4543
+ height: height,
4544
+ margin: margin,
4545
+ xScale: xScale,
4546
+ yScale: yScale,
4547
+ strokeColor: strokeColor,
4548
+ fillColor: fillColor,
4549
+ fillGradient: fillGradient,
4550
+ displayGrid: displayGrid,
4551
+ displayCenterLine: displayCenterLine,
4552
+ gridColor: gridColor,
4553
+ gridStroke: gridStroke,
4554
+ numberOfTicks: numberOfTicks
4555
+ }) : /*#__PURE__*/ React__default.createElement(LineChartCanvas, {
4556
+ data: data,
4557
+ id: id,
4558
+ width: width,
4559
+ height: height,
4560
+ margin: margin,
4561
+ xScale: xScale,
4562
+ yScale: yScale,
4563
+ strokeColor: strokeColor,
4564
+ fillColor: fillColor,
4565
+ fillGradient: fillGradient,
4566
+ displayGrid: displayGrid,
4567
+ displayCenterLine: displayCenterLine,
4568
+ gridColor: gridColor,
4569
+ gridStroke: gridStroke,
4570
+ numberOfTicks: numberOfTicks
4571
+ }));
4572
+ }
4573
+ LineChart.fillGradient = GradientStyles;
4574
+
4575
+ // import 'd3-transition';
4576
+ // import AxisBottom from './AxisBottom';
4577
+ // import AxisLeft from './AxisLeft';
4578
+ // import Ticks from './Ticks';
4579
+ function StackedChart(param) {
4580
+ var bands = param.bands, _param_width = param.width, width = _param_width === void 0 ? 100 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 100 : _param_height, _param_backgroundColor = param.backgroundColor, backgroundColor = _param_backgroundColor === void 0 ? 'var(--bg-lv2)' : _param_backgroundColor, _param_colors = param.colors, colors = _param_colors === void 0 ? [
4581
+ '#1cf667',
4582
+ '#f38e27',
4583
+ '#fd151b'
4584
+ ] : _param_colors;
4585
+ var _stack_keys, _Object, _stack;
4586
+ var series = (_stack = stack()) === null || _stack === void 0 ? void 0 : (_stack_keys = _stack.keys((_Object = Object) === null || _Object === void 0 ? void 0 : _Object.keys(bands[0]))) === null || _stack_keys === void 0 ? void 0 : _stack_keys(bands);
4587
+ var xScale = scaleLinear().range([
4588
+ 0,
4589
+ width
4590
+ ]);
4591
+ var yScale = scaleLinear().domain([
4592
+ 0,
4593
+ 1
4594
+ ]).range([
4595
+ height,
4596
+ 0
4597
+ ]);
4598
+ // const { ref, attrState } = useD3Transition({
4599
+ // attrsToTransitionTo: { yScale: yScale }, // attributes to transition to smoothly
4600
+ // duration: 1000,
4601
+ // deps: [yScale], // hook dependencies (typically identical to the attributes to transition to)
4602
+ // });
4603
+ var color = scaleOrdinal().domain(series.map(function(d, i) {
4604
+ return "".concat(i);
4605
+ })).range(colors).unknown('#ccc');
4606
+ return /*#__PURE__*/ React__default.createElement("svg", {
4607
+ width: width,
4608
+ height: height
4609
+ }, /*#__PURE__*/ React__default.createElement("g", null, /*#__PURE__*/ React__default.createElement("rect", {
4610
+ width: width,
4611
+ height: height,
4612
+ fill: backgroundColor
4613
+ })), /*#__PURE__*/ React__default.createElement("g", null, series.map(function(item, i) {
4614
+ return /*#__PURE__*/ React__default.createElement("rect", {
4615
+ className: "StackedChart",
4616
+ // ref={ref}
4617
+ //@ts-expect-error
4618
+ fill: color("".concat(i)),
4619
+ transform: "translate(0, 100) scale(1, -1)",
4620
+ width: width,
4621
+ height: yScale(1 - (item[0][1] - item[0][0])),
4622
+ x: function(d) {
4623
+ return xScale(0);
4624
+ }(),
4625
+ y: function(d) {
4626
+ return yScale(1 - d[i][0][0]);
4627
+ }(series)
4497
4628
  });
4498
- //@ts-expect-error
4499
- var updateCycleLength = window.__JUCE__.backend.addEventListener('oscWaveLengthChanged', function(value) {
4500
- if (cycleLength && value !== cycleLength.current) {
4501
- cycleLength.current = value;
4502
- }
4629
+ })));
4630
+ }
4631
+
4632
+ function BarChart(param) {
4633
+ var // data,
4634
+ id = param.id, _param_width = param.width, width = _param_width === void 0 ? 40 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 100 : _param_height; param.xScale; param.yScale; param.margin; param.fillColor; param.fillGradient; param.displayTicks; param.displayCenterLine; param.gridColor; param.gridStroke; param.numberOfTicks;
4635
+ var canvasRef = useRef(null);
4636
+ return /*#__PURE__*/ React__default.createElement("div", {
4637
+ style: {
4638
+ width: width,
4639
+ height: height,
4640
+ position: 'relative'
4641
+ }
4642
+ }, /*#__PURE__*/ React__default.createElement("div", {
4643
+ style: {
4644
+ position: 'absolute',
4645
+ top: 0,
4646
+ right: 0,
4647
+ bottom: 0,
4648
+ left: 0,
4649
+ height: '100%',
4650
+ width: '100%'
4651
+ }
4652
+ }, /*#__PURE__*/ React__default.createElement("canvas", {
4653
+ id: id,
4654
+ ref: canvasRef,
4655
+ width: width,
4656
+ height: height
4657
+ })));
4658
+ }
4659
+
4660
+ var ChartTypes = /*#__PURE__*/ function(ChartTypes) {
4661
+ ChartTypes["stacked"] = "stacked";
4662
+ ChartTypes["line"] = "line";
4663
+ ChartTypes["bar"] = "bar";
4664
+ return ChartTypes;
4665
+ }(ChartTypes || {});
4666
+ function Chart(param) {
4667
+ var _param_chartType = param.chartType, chartType = _param_chartType === void 0 ? "line" : _param_chartType, data = param.data, id = param.id, width = param.width, height = param.height, _param_margin = param.margin, margin = _param_margin === void 0 ? 5 : _param_margin, bands = param.bands, strokeColor = param.strokeColor, fillColor = param.fillColor, fillGradient = param.fillGradient, stackedChartColors = param.stackedChartColors, _param_displayGrid = param.displayGrid, displayGrid = _param_displayGrid === void 0 ? true : _param_displayGrid, displayCenterLine = param.displayCenterLine, gridColor = param.gridColor, gridStroke = param.gridStroke, yScaleDomain = param.yScaleDomain, numberOfTicks = param.numberOfTicks, _param_renderAs = param.renderAs, renderAs = _param_renderAs === void 0 ? GraphicRenderOptions.svg : _param_renderAs;
4668
+ return /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, chartType === "line" ? /*#__PURE__*/ React__default.createElement(LineChart, {
4669
+ data: data || [],
4670
+ yScaleDomain: yScaleDomain,
4671
+ renderAs: renderAs,
4672
+ width: width,
4673
+ height: height,
4674
+ margin: margin,
4675
+ strokeColor: strokeColor,
4676
+ fillColor: fillColor,
4677
+ fillGradient: fillGradient,
4678
+ displayGrid: displayGrid,
4679
+ displayCenterLine: displayCenterLine,
4680
+ gridColor: gridColor,
4681
+ gridStroke: gridStroke,
4682
+ numberOfTicks: numberOfTicks,
4683
+ id: id
4684
+ }) : null, chartType === "bar" ? /*#__PURE__*/ React__default.createElement(BarChart, {
4685
+ // data={data || []}
4686
+ // yScaleDomain={yScaleDomain}
4687
+ // renderAs={renderAs}
4688
+ width: width,
4689
+ height: height,
4690
+ margin: margin,
4691
+ // strokeColor={strokeColor}
4692
+ displayTicks: displayGrid,
4693
+ fillColor: fillColor,
4694
+ fillGradient: fillGradient,
4695
+ // displayGrid={displayGrid}
4696
+ displayCenterLine: displayCenterLine,
4697
+ gridColor: gridColor,
4698
+ gridStroke: gridStroke,
4699
+ numberOfTicks: numberOfTicks,
4700
+ id: id
4701
+ }) : null, chartType === "stacked" ? /*#__PURE__*/ React__default.createElement(StackedChart, {
4702
+ bands: bands || [],
4703
+ width: width,
4704
+ height: height,
4705
+ colors: stackedChartColors
4706
+ }) : null);
4707
+ }
4708
+ Chart.gridStroke = StrokeStyle;
4709
+ Chart.fillGradient = GradientStyles;
4710
+ Chart.chartType = ChartTypes;
4711
+ Chart.renderAs = GraphicRenderOptions;
4712
+
4713
+ var WorkerClass$1 = null;
4714
+
4715
+ try {
4716
+ var WorkerThreads$1 =
4717
+ typeof module !== 'undefined' && typeof module.require === 'function' && module.require('worker_threads') ||
4718
+ typeof __non_webpack_require__ === 'function' && __non_webpack_require__('worker_threads') ||
4719
+ typeof require === 'function' && require('worker_threads');
4720
+ WorkerClass$1 = WorkerThreads$1.Worker;
4721
+ } catch(e) {} // eslint-disable-line
4722
+
4723
+ function decodeBase64$3(base64, enableUnicode) {
4724
+ return Buffer.from(base64, 'base64').toString('utf8');
4725
+ }
4726
+
4727
+ function createBase64WorkerFactory$5(base64, sourcemapArg, enableUnicodeArg) {
4728
+ var sourcemap = sourcemapArg;
4729
+ var source = decodeBase64$3(base64);
4730
+ var start = source.indexOf('\n', 10) + 1;
4731
+ var body = source.substring(start) + ('\/\/# sourceMappingURL=' + sourcemap );
4732
+ return function WorkerFactory(options) {
4733
+ return new WorkerClass$1(body, Object.assign({}, options, { eval: true }));
4734
+ };
4735
+ }
4736
+
4737
+ function decodeBase64$2(base64, enableUnicode) {
4738
+ var binaryString = atob(base64);
4739
+ return binaryString;
4740
+ }
4741
+
4742
+ function createURL$1(base64, sourcemapArg, enableUnicodeArg) {
4743
+ var sourcemap = sourcemapArg;
4744
+ var source = decodeBase64$2(base64);
4745
+ var start = source.indexOf('\n', 10) + 1;
4746
+ var body = source.substring(start) + ('\/\/# sourceMappingURL=' + sourcemap );
4747
+ var blob = new Blob([body], { type: 'application/javascript' });
4748
+ return URL.createObjectURL(blob);
4749
+ }
4750
+
4751
+ function createBase64WorkerFactory$4(base64, sourcemapArg, enableUnicodeArg) {
4752
+ var url;
4753
+ return function WorkerFactory(options) {
4754
+ url = url || createURL$1(base64, sourcemapArg);
4755
+ return new Worker(url, options);
4756
+ };
4757
+ }
4758
+
4759
+ var kIsNodeJS$1 = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
4760
+
4761
+ function isNodeJS$1() {
4762
+ return kIsNodeJS$1;
4763
+ }
4764
+
4765
+ function createBase64WorkerFactory$3(base64, sourcemapArg, enableUnicodeArg) {
4766
+ if (isNodeJS$1()) {
4767
+ return createBase64WorkerFactory$5(base64, sourcemapArg);
4768
+ }
4769
+ return createBase64WorkerFactory$4(base64, sourcemapArg);
4770
+ }
4771
+
4772
+ var WorkerFactory$1 = /*#__PURE__*/createBase64WorkerFactory$3('Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgaW1wb3J0U2NyaXB0cygnaHR0cHM6Ly9kM2pzLm9yZy9kMy52Ny5taW4uanMnKTsKICB2YXIgY2FudmFzOwogIHNlbGYub25tZXNzYWdlID0gZnVuY3Rpb24oZXZlbnQpIHsKICAgICAgdmFyIGRhdGEgPSBldmVudC5kYXRhOwogICAgICAvLyBjb25zb2xlLmxvZyhldmVudC5kYXRhLnR5cGUsICdldmVudC50eXBlJyk7CiAgICAgIGlmIChkYXRhLnR5cGUgPT09ICdpbml0JykgewogICAgICAgICAgY2FudmFzID0gZGF0YS5jYW52YXM7CiAgICAgIH0KICAgICAgaWYgKGRhdGEudHlwZSA9PT0gJ3VwZGF0ZScpIHsKICAgICAgICAgIHZhciBfZGF0YV9yZW5kZXJEYXRhXzsKICAgICAgICAgIHZhciBldmVudElkID0gJ29zY0RhdGEnOwogICAgICAgICAgdmFyIG1hcmdpbiA9IDEwOwogICAgICAgICAgdmFyIHNsaWNlZERhdGEgPSBkYXRhID09PSBudWxsIHx8IGRhdGEgPT09IHZvaWQgMCA/IHZvaWQgMCA6IChfZGF0YV9yZW5kZXJEYXRhXyA9IGRhdGEucmVuZGVyRGF0YVsiIi5jb25jYXQoZXZlbnRJZCldKSA9PT0gbnVsbCB8fCBfZGF0YV9yZW5kZXJEYXRhXyA9PT0gdm9pZCAwID8gdm9pZCAwIDogX2RhdGFfcmVuZGVyRGF0YV8uc2xpY2UoMCwgZGF0YS5jeWNsZUxlbmd0aCk7CiAgICAgICAgICBjb25zb2xlLmxvZyhkYXRhLmN5Y2xlTGVuZ3RoLCAnU0xJQ0VEJyk7CiAgICAgICAgICB2YXIgeFNjYWxlID0gZDMuc2NhbGVMaW5lYXIoKS5kb21haW4oWwogICAgICAgICAgICAgIDAsCiAgICAgICAgICAgICAgc2xpY2VkRGF0YSA9PT0gbnVsbCB8fCBzbGljZWREYXRhID09PSB2b2lkIDAgPyB2b2lkIDAgOiBzbGljZWREYXRhLmxlbmd0aAogICAgICAgICAgXSkucmFuZ2UoWwogICAgICAgICAgICAgIG1hcmdpbiwKICAgICAgICAgICAgICBkYXRhLndpZHRoIC0gbWFyZ2luCiAgICAgICAgICBdKTsKICAgICAgICAgIC8vIC5uaWNlKCk7CiAgICAgICAgICB2YXIgeVNjYWxlID0gZDMuc2NhbGVMaW5lYXIoKS5kb21haW4oZGF0YSA9PT0gbnVsbCB8fCBkYXRhID09PSB2b2lkIDAgPyB2b2lkIDAgOiBkYXRhLnlTY2FsZURvbWFpbikucmFuZ2UoWwogICAgICAgICAgICAgIGRhdGEuaGVpZ2h0IC0gbWFyZ2luLAogICAgICAgICAgICAgIG1hcmdpbgogICAgICAgICAgXSk7CiAgICAgICAgICAvLyAubmljZSgpOwogICAgICAgICAgaWYgKHNsaWNlZERhdGEgIT0gbnVsbCkgewogICAgICAgICAgICAgIC8vIGZpbGw6ICdub25lJywKICAgICAgICAgICAgICAvLyAnc2hhcGUtcmVuZGVyaW5nJzogJ2NyaXNwRWRnZXMnLAogICAgICAgICAgICAgIHZhciBjdHggPSBjYW52YXMgPT09IG51bGwgfHwgY2FudmFzID09PSB2b2lkIDAgPyB2b2lkIDAgOiBjYW52YXMuZ2V0Q29udGV4dCgnMmQnKTsKICAgICAgICAgICAgICB2YXIgbGluZSA9IGQzLmxpbmUoZnVuY3Rpb24oXywgaSkgewogICAgICAgICAgICAgICAgICByZXR1cm4geFNjYWxlKGkpOwogICAgICAgICAgICAgIH0sIHlTY2FsZSkuY29udGV4dChjdHgpOwogICAgICAgICAgICAgIHZhciBsaW5lRGF0YSA9IHNsaWNlZERhdGE7CiAgICAgICAgICAgICAgY3R4LmNsZWFyUmVjdCgwLCAwLCBjYW52YXMud2lkdGgsIGNhbnZhcy5oZWlnaHQpOwogICAgICAgICAgICAgIGN0eC5zYXZlKCk7CiAgICAgICAgICAgICAgY3R4LmJlZ2luUGF0aCgpOwogICAgICAgICAgICAgIGxpbmUuY3VydmUoZDMuY3VydmVCYXNpcykobGluZURhdGEpOwogICAgICAgICAgICAgIGN0eC5saW5lV2lkdGggPSAyOwogICAgICAgICAgICAgIGN0eC5zdHJva2VTdHlsZSA9ICcjNkZGRkY1JzsKICAgICAgICAgICAgICBjdHguc2hhZG93Q29sb3IgPSAncmdiYSgxMTEsIDI1NSwgMjQ1LCAuNyknOwogICAgICAgICAgICAgIGN0eC5pbWFnZVNtb290aGluZ0VuYWJsZWQgPSBmYWxzZTsKICAgICAgICAgICAgICBjdHguc2hhZG93Qmx1ciA9IDU7CiAgICAgICAgICAgICAgY3R4LnNoYWRvd09mZnNldFggPSAwOwogICAgICAgICAgICAgIGN0eC5zaGFkb3dPZmZzZXRZID0gMDsKICAgICAgICAgICAgICBjdHguc3Ryb2tlKCk7CiAgICAgICAgICAgICAgY2FudmFzID09PSBudWxsIHx8IGNhbnZhcyA9PT0gdm9pZCAwID8gdm9pZCAwIDogY2FudmFzLmdldENvbnRleHQoJzJkJykuZHJhd0ltYWdlKGNhbnZhcywgMCwgMCk7CiAgICAgICAgICAgICAgdmFyIGJpdG1hcCA9IGNhbnZhcyA9PT0gbnVsbCB8fCBjYW52YXMgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGNhbnZhcy50cmFuc2ZlclRvSW1hZ2VCaXRtYXAoKTsKICAgICAgICAgICAgICBzZWxmLnBvc3RNZXNzYWdlKGJpdG1hcCk7CiAgICAgICAgICB9CiAgICAgIH0KICB9OwoKfSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9d29ya2VyLmpzLm1hcAoK', 'data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==');
4773
+ /* eslint-enable */
4774
+
4775
+ function _define_property$8(obj, key, value) {
4776
+ if (key in obj) {
4777
+ Object.defineProperty(obj, key, {
4778
+ value: value,
4779
+ enumerable: true,
4780
+ configurable: true,
4781
+ writable: true
4503
4782
  });
4504
- return function() {
4505
- //@ts-expect-error
4506
- window.__JUCE__.backend.removeEventListener(getOscData);
4507
- //@ts-expect-error
4508
- window.__JUCE__.backend.removeEventListener(updateCycleLength);
4783
+ } else {
4784
+ obj[key] = value;
4785
+ }
4786
+ return obj;
4787
+ }
4788
+ function _object_spread$8(target) {
4789
+ for(var i = 1; i < arguments.length; i++){
4790
+ var source = arguments[i] != null ? arguments[i] : {};
4791
+ var ownKeys = Object.keys(source);
4792
+ if (typeof Object.getOwnPropertySymbols === "function") {
4793
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
4794
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
4795
+ }));
4796
+ }
4797
+ ownKeys.forEach(function(key) {
4798
+ _define_property$8(target, key, source[key]);
4799
+ });
4800
+ }
4801
+ return target;
4802
+ }
4803
+ function Oscilloscope(param) {
4804
+ var _param_width = param.width, width = _param_width === void 0 ? 200 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 200 : _param_height, className = param.className, style = param.style, id = param.id;
4805
+ var workerRef = useRef(null);
4806
+ var yScaleDomain = [
4807
+ -1,
4808
+ 1
4809
+ ];
4810
+ useEffect(function() {
4811
+ var canvas = document.createElement('canvas');
4812
+ if (canvas) {
4813
+ canvas.width = width;
4814
+ canvas.height = height;
4815
+ }
4816
+ var worker = new WorkerFactory$1();
4817
+ var offscreenCanvas = canvas.transferControlToOffscreen();
4818
+ worker.postMessage({
4819
+ type: 'init',
4820
+ canvas: offscreenCanvas
4821
+ }, [
4822
+ offscreenCanvas
4823
+ ]);
4824
+ workerRef.current = worker;
4825
+ }, [
4826
+ window
4827
+ ]);
4828
+ var renderFuction = function(data) {
4829
+ workerRef === null || workerRef === void 0 ? void 0 : workerRef.current.postMessage({
4830
+ type: 'update',
4831
+ cycleLength: data === null || data === void 0 ? void 0 : data.waveLength,
4832
+ renderData: data,
4833
+ height: height,
4834
+ width: width,
4835
+ yScaleDomain: yScaleDomain
4836
+ });
4837
+ workerRef.current.onmessage = function(e) {
4838
+ var _document_getElementById, _document;
4839
+ var imageBitmap = e === null || e === void 0 ? void 0 : e.data;
4840
+ var canvas = (_document = document) === null || _document === void 0 ? void 0 : (_document_getElementById = _document.getElementById("".concat(id))) === null || _document_getElementById === void 0 ? void 0 : _document_getElementById.getContext('bitmaprenderer');
4841
+ canvas === null || canvas === void 0 ? void 0 : canvas.transferFromImageBitmap(imageBitmap);
4509
4842
  };
4510
- }, []);
4843
+ };
4511
4844
  return /*#__PURE__*/ React__default.createElement("div", {
4512
- id: id,
4513
- style: _object_spread$7({
4514
- height: height
4845
+ style: _object_spread$8({
4846
+ height: height,
4847
+ width: width,
4848
+ flex: "0 0 ".concat(width)
4515
4849
  }, style),
4516
4850
  className: classnames('Oscilloscope', className)
4517
- }, /*#__PURE__*/ React__default.createElement(LinePlot, {
4851
+ }, /*#__PURE__*/ React__default.createElement("div", {
4852
+ style: {
4853
+ position: 'relative',
4854
+ width: width,
4855
+ height: height
4856
+ }
4857
+ }, /*#__PURE__*/ React__default.createElement("div", {
4858
+ style: {
4859
+ position: 'absolute',
4860
+ top: 0,
4861
+ bottom: 0,
4862
+ right: 0,
4863
+ left: 0,
4864
+ height: height,
4865
+ width: width
4866
+ }
4867
+ }, /*#__PURE__*/ React__default.createElement(AnimationDataWrapper, {
4868
+ renderFunction: renderFuction,
4869
+ eventId: "oscData"
4870
+ }, /*#__PURE__*/ React__default.createElement(Chart, {
4871
+ chartType: Chart.chartType.line,
4872
+ renderAs: Chart.renderAs.canvas,
4518
4873
  width: width,
4519
4874
  height: height,
4520
- data: viewData
4521
- }));
4875
+ yScaleDomain: yScaleDomain,
4876
+ id: id,
4877
+ gridColor: "#167585",
4878
+ strokeColor: "#3cf1bf"
4879
+ }))), /*#__PURE__*/ React__default.createElement("div", {
4880
+ style: {
4881
+ position: 'absolute',
4882
+ top: 0,
4883
+ bottom: 0,
4884
+ right: 0,
4885
+ left: 0,
4886
+ height: height,
4887
+ width: width,
4888
+ boxShadow: 'inset 0 0 30px #0f242a'
4889
+ }
4890
+ })));
4522
4891
  }
4523
4892
 
4524
4893
  var css_248z$4 = "@import '../../styles.css';\n.ModuleHeader {\n background-color: var(--bg-lv3);\n font-weight: normal;\n font-family: var(--font-leagueSpartan);\n max-height: 64px;\n}\n\n/* TODO: Use Tailwind classes */\n#advancedLayoutButton {\n background-color: var(--bg-lv1);\n color: var(--color-text);\n /* border: 2px solid var(--color-brand); */\n border-radius: 3px;\n height: 30px;\n font-size: var(--text-md);\n &:hover,\n &:active {\n background: var(--color-gray-900);\n color: var(--color-brand);\n }\n}\n\n#advancedLayoutButton.selected {\n color: var(--color-brand);\n}\n\n.advancedLayoutButtonLabel {\n cursor: pointer;\n font-family: var(--font-leagueSpartan);\n /* display: inline-block;\n vertical-align: middle;\n height: 1rem;\n line-height: 1.25; */\n}\n";
@@ -4527,12 +4896,12 @@ styleInject(css_248z$4);
4527
4896
  var css_248z$3 = ".PresetManagerContainer {\n width: 100%;\n height: 100%;\n background-color: var(--bg-lv1);\n color: var(--color-text);\n}\n\n.PresetManagerButton {\n width: 100%;\n height: 100%;\n max-width: 300px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: relative;\n cursor: pointer;\n font-family: var(--font-leagueSpartan);\n}\n.PresetManagerButtonLabel {\n cursor: pointer;\n text-align: center;\n font-family: var(--font-leagueSpartan);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 225px;\n display: inline-block;\n vertical-align: middle;\n height: 1rem;\n line-height: 1.25;\n /* position: relative; */\n &:hover,\n &:active {\n background: var(--color-gray-900);\n }\n /* &.isDirty {\n &::after {\n content: '*';\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n }\n } */\n}\n\n.PresetManagerButtonLabelContainer.isDirty::after {\n content: '*';\n position: absolute;\n height: 1rem;\n width: 1rem;\n right: -0.75rem;\n top: 0;\n}\n\n.PresetManagerButtonLabelOuterContainer {\n position: relative;\n width: auto;\n}\n\n[data-headlessui-state='open active'] .PresetManagerButtonLabel {\n background: var(--color-gray-900);\n}\n.PresetManagerPanel {\n position: absolute;\n font-family: var(--font-leagueSpartan);\n right: 0px;\n left: 0px;\n width: 100%;\n max-width: 400px !important;\n color: var(--color-text);\n background: var(--bg-lv5);\n}\n\n.PresetManagerPanel:focus,\n.PresetManagerPanel:focus-visible {\n outline: none;\n}\n\n.PresetManagerListItem {\n cursor: pointer;\n background: var(--color-gray-800);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100%;\n}\n\n.PresetManagerListItem:hover,\n.PresetManagerListItem.isSelected {\n background: var(--bg-selected);\n}\n\n.PresetManagerListItemText {\n display: inline-block;\n vertical-align: middle;\n height: 1.5rem;\n line-height: 1.75;\n}\n";
4528
4897
  styleInject(css_248z$3);
4529
4898
 
4530
- function _array_like_to_array$b(arr, len) {
4899
+ function _array_like_to_array$a(arr, len) {
4531
4900
  if (len == null || len > arr.length) len = arr.length;
4532
4901
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4533
4902
  return arr2;
4534
4903
  }
4535
- function _array_with_holes$a(arr) {
4904
+ function _array_with_holes$9(arr) {
4536
4905
  if (Array.isArray(arr)) return arr;
4537
4906
  }
4538
4907
  function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
@@ -4564,7 +4933,7 @@ function _async_to_generator$3(fn) {
4564
4933
  });
4565
4934
  };
4566
4935
  }
4567
- function _iterable_to_array_limit$a(arr, i) {
4936
+ function _iterable_to_array_limit$9(arr, i) {
4568
4937
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
4569
4938
  if (_i == null) return;
4570
4939
  var _arr = [];
@@ -4588,23 +4957,23 @@ function _iterable_to_array_limit$a(arr, i) {
4588
4957
  }
4589
4958
  return _arr;
4590
4959
  }
4591
- function _non_iterable_rest$a() {
4960
+ function _non_iterable_rest$9() {
4592
4961
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4593
4962
  }
4594
4963
  function _object_destructuring_empty(o) {
4595
4964
  if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
4596
4965
  return o;
4597
4966
  }
4598
- function _sliced_to_array$a(arr, i) {
4599
- return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$a();
4967
+ function _sliced_to_array$9(arr, i) {
4968
+ return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$9();
4600
4969
  }
4601
- function _unsupported_iterable_to_array$b(o, minLen) {
4970
+ function _unsupported_iterable_to_array$a(o, minLen) {
4602
4971
  if (!o) return;
4603
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
4972
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
4604
4973
  var n = Object.prototype.toString.call(o).slice(8, -1);
4605
4974
  if (n === "Object" && o.constructor) n = o.constructor.name;
4606
4975
  if (n === "Map" || n === "Set") return Array.from(n);
4607
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
4976
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
4608
4977
  }
4609
4978
  function _ts_generator$3(thisArg, body) {
4610
4979
  var f, y, t, _ = {
@@ -4699,16 +5068,16 @@ function _ts_generator$3(thisArg, body) {
4699
5068
  }
4700
5069
  function PresetManager(param) {
4701
5070
  _object_destructuring_empty(param);
4702
- var _useState = _sliced_to_array$a(useState([]), 2), presetList = _useState[0], setPresetList = _useState[1];
4703
- var _useState1 = _sliced_to_array$a(useState(false), 2); _useState1[0]; var setIsSaving = _useState1[1];
5071
+ var _useState = _sliced_to_array$9(useState([]), 2), presetList = _useState[0], setPresetList = _useState[1];
5072
+ var _useState1 = _sliced_to_array$9(useState(false), 2); _useState1[0]; var setIsSaving = _useState1[1];
4704
5073
  var savePresetFunc = Juce.getNativeFunction('savePreset');
4705
5074
  var loadPresetFunc = Juce.getNativeFunction('loadPreset');
4706
5075
  var getAllPresetsFunc = Juce.getNativeFunction('getAllPresets');
4707
5076
  var getCurrentPresetFunc = Juce.getNativeFunction('getCurrentPreset');
4708
5077
  var isDirtyFunc = Juce.getNativeFunction('canUndo');
4709
- var _useState2 = _sliced_to_array$a(useState(), 2), selectedPreset = _useState2[0], setSelectedPreset = _useState2[1];
5078
+ var _useState2 = _sliced_to_array$9(useState(), 2), selectedPreset = _useState2[0], setSelectedPreset = _useState2[1];
4710
5079
  var isLocalhost = window.location.hostname === 'localhost';
4711
- var _useState3 = _sliced_to_array$a(useState(false), 2), isDirty = _useState3[0], setIsDirty = _useState3[1];
5080
+ var _useState3 = _sliced_to_array$9(useState(false), 2), isDirty = _useState3[0], setIsDirty = _useState3[1];
4712
5081
  useEffect(function() {
4713
5082
  if (!isLocalhost) {
4714
5083
  var isDirtyListenerId = //@ts-expect-error
@@ -4986,12 +5355,12 @@ function PresetManager(param) {
4986
5355
  }))))));
4987
5356
  }
4988
5357
 
4989
- function _array_like_to_array$a(arr, len) {
5358
+ function _array_like_to_array$9(arr, len) {
4990
5359
  if (len == null || len > arr.length) len = arr.length;
4991
5360
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4992
5361
  return arr2;
4993
5362
  }
4994
- function _array_with_holes$9(arr) {
5363
+ function _array_with_holes$8(arr) {
4995
5364
  if (Array.isArray(arr)) return arr;
4996
5365
  }
4997
5366
  function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
@@ -5023,7 +5392,7 @@ function _async_to_generator$2(fn) {
5023
5392
  });
5024
5393
  };
5025
5394
  }
5026
- function _define_property$6(obj, key, value) {
5395
+ function _define_property$7(obj, key, value) {
5027
5396
  if (key in obj) {
5028
5397
  Object.defineProperty(obj, key, {
5029
5398
  value: value,
@@ -5036,7 +5405,7 @@ function _define_property$6(obj, key, value) {
5036
5405
  }
5037
5406
  return obj;
5038
5407
  }
5039
- function _iterable_to_array_limit$9(arr, i) {
5408
+ function _iterable_to_array_limit$8(arr, i) {
5040
5409
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
5041
5410
  if (_i == null) return;
5042
5411
  var _arr = [];
@@ -5060,10 +5429,10 @@ function _iterable_to_array_limit$9(arr, i) {
5060
5429
  }
5061
5430
  return _arr;
5062
5431
  }
5063
- function _non_iterable_rest$9() {
5432
+ function _non_iterable_rest$8() {
5064
5433
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5065
5434
  }
5066
- function _object_spread$6(target) {
5435
+ function _object_spread$7(target) {
5067
5436
  for(var i = 1; i < arguments.length; i++){
5068
5437
  var source = arguments[i] != null ? arguments[i] : {};
5069
5438
  var ownKeys = Object.keys(source);
@@ -5073,21 +5442,21 @@ function _object_spread$6(target) {
5073
5442
  }));
5074
5443
  }
5075
5444
  ownKeys.forEach(function(key) {
5076
- _define_property$6(target, key, source[key]);
5445
+ _define_property$7(target, key, source[key]);
5077
5446
  });
5078
5447
  }
5079
5448
  return target;
5080
5449
  }
5081
- function _sliced_to_array$9(arr, i) {
5082
- return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$9();
5450
+ function _sliced_to_array$8(arr, i) {
5451
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$8();
5083
5452
  }
5084
- function _unsupported_iterable_to_array$a(o, minLen) {
5453
+ function _unsupported_iterable_to_array$9(o, minLen) {
5085
5454
  if (!o) return;
5086
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
5455
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
5087
5456
  var n = Object.prototype.toString.call(o).slice(8, -1);
5088
5457
  if (n === "Object" && o.constructor) n = o.constructor.name;
5089
5458
  if (n === "Map" || n === "Set") return Array.from(n);
5090
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
5459
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
5091
5460
  }
5092
5461
  function _ts_generator$2(thisArg, body) {
5093
5462
  var f, y, t, _ = {
@@ -5270,8 +5639,8 @@ function ModuleHeader(param) {
5270
5639
  }, [
5271
5640
  window
5272
5641
  ]);
5273
- var _useState = _sliced_to_array$9(useState(false), 2), canUndo = _useState[0], setCanUndo = _useState[1];
5274
- var _useState1 = _sliced_to_array$9(useState(false), 2), canRedo = _useState1[0], setCanRedo = _useState1[1];
5642
+ var _useState = _sliced_to_array$8(useState(false), 2), canUndo = _useState[0], setCanUndo = _useState[1];
5643
+ var _useState1 = _sliced_to_array$8(useState(false), 2), canRedo = _useState1[0], setCanRedo = _useState1[1];
5275
5644
  var handleUndo = function() {
5276
5645
  undo();
5277
5646
  };
@@ -5438,7 +5807,7 @@ function ModuleHeader(param) {
5438
5807
  ],
5439
5808
  className: classnames('ModuleHeader', className),
5440
5809
  height: "72px",
5441
- style: _object_spread$6({}, style)
5810
+ style: _object_spread$7({}, style)
5442
5811
  }, /*#__PURE__*/ React__default.createElement(Box, {
5443
5812
  style: {
5444
5813
  width: '1000px'
@@ -5524,15 +5893,15 @@ var targetColors = [
5524
5893
  var ComboboxCellWidth = '217px';
5525
5894
  var DeleteButtonCellWidth = '50px';
5526
5895
 
5527
- function _array_like_to_array$9(arr, len) {
5896
+ function _array_like_to_array$8(arr, len) {
5528
5897
  if (len == null || len > arr.length) len = arr.length;
5529
5898
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5530
5899
  return arr2;
5531
5900
  }
5532
- function _array_with_holes$8(arr) {
5901
+ function _array_with_holes$7(arr) {
5533
5902
  if (Array.isArray(arr)) return arr;
5534
5903
  }
5535
- function _define_property$5(obj, key, value) {
5904
+ function _define_property$6(obj, key, value) {
5536
5905
  if (key in obj) {
5537
5906
  Object.defineProperty(obj, key, {
5538
5907
  value: value,
@@ -5545,7 +5914,7 @@ function _define_property$5(obj, key, value) {
5545
5914
  }
5546
5915
  return obj;
5547
5916
  }
5548
- function _iterable_to_array_limit$8(arr, i) {
5917
+ function _iterable_to_array_limit$7(arr, i) {
5549
5918
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
5550
5919
  if (_i == null) return;
5551
5920
  var _arr = [];
@@ -5569,10 +5938,10 @@ function _iterable_to_array_limit$8(arr, i) {
5569
5938
  }
5570
5939
  return _arr;
5571
5940
  }
5572
- function _non_iterable_rest$8() {
5941
+ function _non_iterable_rest$7() {
5573
5942
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5574
5943
  }
5575
- function _object_spread$5(target) {
5944
+ function _object_spread$6(target) {
5576
5945
  for(var i = 1; i < arguments.length; i++){
5577
5946
  var source = arguments[i] != null ? arguments[i] : {};
5578
5947
  var ownKeys = Object.keys(source);
@@ -5582,25 +5951,25 @@ function _object_spread$5(target) {
5582
5951
  }));
5583
5952
  }
5584
5953
  ownKeys.forEach(function(key) {
5585
- _define_property$5(target, key, source[key]);
5954
+ _define_property$6(target, key, source[key]);
5586
5955
  });
5587
5956
  }
5588
5957
  return target;
5589
5958
  }
5590
- function _sliced_to_array$8(arr, i) {
5591
- return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$8();
5959
+ function _sliced_to_array$7(arr, i) {
5960
+ return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$7();
5592
5961
  }
5593
- function _unsupported_iterable_to_array$9(o, minLen) {
5962
+ function _unsupported_iterable_to_array$8(o, minLen) {
5594
5963
  if (!o) return;
5595
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
5964
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
5596
5965
  var n = Object.prototype.toString.call(o).slice(8, -1);
5597
5966
  if (n === "Object" && o.constructor) n = o.constructor.name;
5598
5967
  if (n === "Map" || n === "Set") return Array.from(n);
5599
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
5968
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
5600
5969
  }
5601
5970
  function ModMatrixComboboxCell(param) {
5602
5971
  var rowId = param.rowId, key = param.key, color = param.color, style = param.style;
5603
- var _useState = _sliced_to_array$8(useState(''), 2), filterString = _useState[0], setFilterString = _useState[1];
5972
+ var _useState = _sliced_to_array$7(useState(''), 2), filterString = _useState[0], setFilterString = _useState[1];
5604
5973
  var _useGlobalContext = useGlobalContext(), updateModSlotRowTarget = _useGlobalContext.updateModSlotRowTarget, setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview, clearModSlotPreview = _useGlobalContext.clearModSlotPreview, setNewModSlotPreview = _useGlobalContext.setNewModSlotPreview, _useGlobalContext_globalState = _useGlobalContext.globalState, modSlotPreview = _useGlobalContext_globalState.modSlotPreview, automatableParamLabels = _useGlobalContext_globalState.automatableParamLabels;
5605
5974
  var _useCombobox = useCombobox({
5606
5975
  id: rowId,
@@ -5632,7 +6001,7 @@ function ModMatrixComboboxCell(param) {
5632
6001
  className: "ModMatrixCell ModMatrixComboboxCell",
5633
6002
  justifyContent: Box.justifyContent.flexEnd,
5634
6003
  flexDirection: Box.flexDirection.column,
5635
- style: _object_spread$5({
6004
+ style: _object_spread$6({
5636
6005
  color: color
5637
6006
  }, style),
5638
6007
  padding: [
@@ -5679,7 +6048,7 @@ function ModMatrixComboboxCell(param) {
5679
6048
  }))));
5680
6049
  }
5681
6050
 
5682
- function _define_property$4(obj, key, value) {
6051
+ function _define_property$5(obj, key, value) {
5683
6052
  if (key in obj) {
5684
6053
  Object.defineProperty(obj, key, {
5685
6054
  value: value,
@@ -5692,7 +6061,7 @@ function _define_property$4(obj, key, value) {
5692
6061
  }
5693
6062
  return obj;
5694
6063
  }
5695
- function _object_spread$4(target) {
6064
+ function _object_spread$5(target) {
5696
6065
  for(var i = 1; i < arguments.length; i++){
5697
6066
  var source = arguments[i] != null ? arguments[i] : {};
5698
6067
  var ownKeys = Object.keys(source);
@@ -5702,7 +6071,7 @@ function _object_spread$4(target) {
5702
6071
  }));
5703
6072
  }
5704
6073
  ownKeys.forEach(function(key) {
5705
- _define_property$4(target, key, source[key]);
6074
+ _define_property$5(target, key, source[key]);
5706
6075
  });
5707
6076
  }
5708
6077
  return target;
@@ -5724,7 +6093,7 @@ function ModMatrixToggleCell(param) {
5724
6093
  justifyContent: Box.justifyContent.flexEnd,
5725
6094
  alignItems: Box.alignItems.flexStart,
5726
6095
  flexDirection: Box.flexDirection.column,
5727
- style: _object_spread$4({
6096
+ style: _object_spread$5({
5728
6097
  color: color,
5729
6098
  pointerEvents: 'all'
5730
6099
  }, style),
@@ -5748,7 +6117,7 @@ function ModMatrixToggleCell(param) {
5748
6117
  }, Object.keys(Polarity)[index] || '0')));
5749
6118
  }
5750
6119
 
5751
- function _define_property$3(obj, key, value) {
6120
+ function _define_property$4(obj, key, value) {
5752
6121
  if (key in obj) {
5753
6122
  Object.defineProperty(obj, key, {
5754
6123
  value: value,
@@ -5761,7 +6130,7 @@ function _define_property$3(obj, key, value) {
5761
6130
  }
5762
6131
  return obj;
5763
6132
  }
5764
- function _object_spread$3(target) {
6133
+ function _object_spread$4(target) {
5765
6134
  for(var i = 1; i < arguments.length; i++){
5766
6135
  var source = arguments[i] != null ? arguments[i] : {};
5767
6136
  var ownKeys = Object.keys(source);
@@ -5771,7 +6140,7 @@ function _object_spread$3(target) {
5771
6140
  }));
5772
6141
  }
5773
6142
  ownKeys.forEach(function(key) {
5774
- _define_property$3(target, key, source[key]);
6143
+ _define_property$4(target, key, source[key]);
5775
6144
  });
5776
6145
  }
5777
6146
  return target;
@@ -5788,7 +6157,7 @@ function SingleBarViz(param) {
5788
6157
  }
5789
6158
  }, /*#__PURE__*/ React__default.createElement("div", {
5790
6159
  className: "SingleBarViz",
5791
- style: _object_spread$3({
6160
+ style: _object_spread$4({
5792
6161
  position: 'absolute',
5793
6162
  background: sliderColor
5794
6163
  }, getBarTransformStyles({
@@ -5801,15 +6170,15 @@ function SingleBarViz(param) {
5801
6170
  }
5802
6171
  SingleBarViz.polarity = Polarity;
5803
6172
 
5804
- function _array_like_to_array$8(arr, len) {
6173
+ function _array_like_to_array$7(arr, len) {
5805
6174
  if (len == null || len > arr.length) len = arr.length;
5806
6175
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5807
6176
  return arr2;
5808
6177
  }
5809
- function _array_with_holes$7(arr) {
6178
+ function _array_with_holes$6(arr) {
5810
6179
  if (Array.isArray(arr)) return arr;
5811
6180
  }
5812
- function _define_property$2(obj, key, value) {
6181
+ function _define_property$3(obj, key, value) {
5813
6182
  if (key in obj) {
5814
6183
  Object.defineProperty(obj, key, {
5815
6184
  value: value,
@@ -5822,7 +6191,7 @@ function _define_property$2(obj, key, value) {
5822
6191
  }
5823
6192
  return obj;
5824
6193
  }
5825
- function _iterable_to_array_limit$7(arr, i) {
6194
+ function _iterable_to_array_limit$6(arr, i) {
5826
6195
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
5827
6196
  if (_i == null) return;
5828
6197
  var _arr = [];
@@ -5846,10 +6215,10 @@ function _iterable_to_array_limit$7(arr, i) {
5846
6215
  }
5847
6216
  return _arr;
5848
6217
  }
5849
- function _non_iterable_rest$7() {
6218
+ function _non_iterable_rest$6() {
5850
6219
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5851
6220
  }
5852
- function _object_spread$2(target) {
6221
+ function _object_spread$3(target) {
5853
6222
  for(var i = 1; i < arguments.length; i++){
5854
6223
  var source = arguments[i] != null ? arguments[i] : {};
5855
6224
  var ownKeys = Object.keys(source);
@@ -5859,7 +6228,7 @@ function _object_spread$2(target) {
5859
6228
  }));
5860
6229
  }
5861
6230
  ownKeys.forEach(function(key) {
5862
- _define_property$2(target, key, source[key]);
6231
+ _define_property$3(target, key, source[key]);
5863
6232
  });
5864
6233
  }
5865
6234
  return target;
@@ -5883,22 +6252,22 @@ function _object_spread_props(target, source) {
5883
6252
  }
5884
6253
  return target;
5885
6254
  }
5886
- function _sliced_to_array$7(arr, i) {
5887
- return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$7();
6255
+ function _sliced_to_array$6(arr, i) {
6256
+ return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$6();
5888
6257
  }
5889
- function _unsupported_iterable_to_array$8(o, minLen) {
6258
+ function _unsupported_iterable_to_array$7(o, minLen) {
5890
6259
  if (!o) return;
5891
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
6260
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
5892
6261
  var n = Object.prototype.toString.call(o).slice(8, -1);
5893
6262
  if (n === "Object" && o.constructor) n = o.constructor.name;
5894
6263
  if (n === "Map" || n === "Set") return Array.from(n);
5895
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
6264
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
5896
6265
  }
5897
6266
  function ModMatrixCell(param) {
5898
6267
  var modifier = param.modifier, rowId = param.rowId, isDisabled = param.isDisabled, color = param.color, style = param.style;
5899
6268
  var _SingleBarViz_polarity;
5900
6269
  var _useGlobalContext = useGlobalContext(), setDefaultParameter = _useGlobalContext.setDefaultParameter, saveModSlotPreviewRowTargetToBackend = _useGlobalContext.saveModSlotPreviewRowTargetToBackend;
5901
- var _useState = _sliced_to_array$7(useState(false), 2); _useState[0]; var setIsActive = _useState[1];
6270
+ var _useState = _sliced_to_array$6(useState(false), 2); _useState[0]; var setIsActive = _useState[1];
5902
6271
  var _useSlider = useSlider({
5903
6272
  id: modifier,
5904
6273
  rowId: rowId,
@@ -5916,12 +6285,12 @@ function ModMatrixCell(param) {
5916
6285
  onChangeActiveState: function(isActive) {
5917
6286
  return setIsActive(isActive);
5918
6287
  }
5919
- }, /*#__PURE__*/ React__default.createElement(Box, _object_spread_props(_object_spread$2({
6288
+ }, /*#__PURE__*/ React__default.createElement(Box, _object_spread_props(_object_spread$3({
5920
6289
  className: "ModMatrixCell ".concat(isDisabled ? 'isDisabled' : ''),
5921
6290
  justifyContent: Box.justifyContent.flexEnd,
5922
6291
  alignItems: Box.alignItems.flexStart,
5923
6292
  flexDirection: Box.flexDirection.column,
5924
- style: _object_spread$2({
6293
+ style: _object_spread$3({
5925
6294
  color: color,
5926
6295
  pointerEvents: 'all'
5927
6296
  }, style),
@@ -5970,7 +6339,7 @@ function ModMatrixCell(param) {
5970
6339
  // isActive ? 'var(--color-gray-500)' : 'var(--color-gray-600)'
5971
6340
  // }
5972
6341
  sliderColor: color,
5973
- style: _object_spread$2({
6342
+ style: _object_spread$3({
5974
6343
  alignSelf: 'flex-end',
5975
6344
  pointerEvents: 'none'
5976
6345
  }, getBarTransformStyles({
@@ -6041,16 +6410,16 @@ function ModMatrixRow(param) {
6041
6410
  })));
6042
6411
  }
6043
6412
 
6044
- function _array_like_to_array$7(arr, len) {
6413
+ function _array_like_to_array$6(arr, len) {
6045
6414
  if (len == null || len > arr.length) len = arr.length;
6046
6415
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6047
6416
  return arr2;
6048
6417
  }
6049
- function _array_with_holes$6(arr) {
6418
+ function _array_with_holes$5(arr) {
6050
6419
  if (Array.isArray(arr)) return arr;
6051
6420
  }
6052
- function _array_without_holes$2(arr) {
6053
- if (Array.isArray(arr)) return _array_like_to_array$7(arr);
6421
+ function _array_without_holes$1(arr) {
6422
+ if (Array.isArray(arr)) return _array_like_to_array$6(arr);
6054
6423
  }
6055
6424
  function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
6056
6425
  try {
@@ -6081,7 +6450,7 @@ function _async_to_generator$1(fn) {
6081
6450
  });
6082
6451
  };
6083
6452
  }
6084
- function _define_property$1(obj, key, value) {
6453
+ function _define_property$2(obj, key, value) {
6085
6454
  if (key in obj) {
6086
6455
  Object.defineProperty(obj, key, {
6087
6456
  value: value,
@@ -6094,10 +6463,10 @@ function _define_property$1(obj, key, value) {
6094
6463
  }
6095
6464
  return obj;
6096
6465
  }
6097
- function _iterable_to_array$2(iter) {
6466
+ function _iterable_to_array$1(iter) {
6098
6467
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
6099
6468
  }
6100
- function _iterable_to_array_limit$6(arr, i) {
6469
+ function _iterable_to_array_limit$5(arr, i) {
6101
6470
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
6102
6471
  if (_i == null) return;
6103
6472
  var _arr = [];
@@ -6121,13 +6490,13 @@ function _iterable_to_array_limit$6(arr, i) {
6121
6490
  }
6122
6491
  return _arr;
6123
6492
  }
6124
- function _non_iterable_rest$6() {
6493
+ function _non_iterable_rest$5() {
6125
6494
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6126
6495
  }
6127
- function _non_iterable_spread$2() {
6496
+ function _non_iterable_spread$1() {
6128
6497
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6129
6498
  }
6130
- function _object_spread$1(target) {
6499
+ function _object_spread$2(target) {
6131
6500
  for(var i = 1; i < arguments.length; i++){
6132
6501
  var source = arguments[i] != null ? arguments[i] : {};
6133
6502
  var ownKeys = Object.keys(source);
@@ -6137,24 +6506,24 @@ function _object_spread$1(target) {
6137
6506
  }));
6138
6507
  }
6139
6508
  ownKeys.forEach(function(key) {
6140
- _define_property$1(target, key, source[key]);
6509
+ _define_property$2(target, key, source[key]);
6141
6510
  });
6142
6511
  }
6143
6512
  return target;
6144
6513
  }
6145
- function _sliced_to_array$6(arr, i) {
6146
- return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$6();
6514
+ function _sliced_to_array$5(arr, i) {
6515
+ return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$5();
6147
6516
  }
6148
- function _to_consumable_array$2(arr) {
6149
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$2();
6517
+ function _to_consumable_array$1(arr) {
6518
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$1();
6150
6519
  }
6151
- function _unsupported_iterable_to_array$7(o, minLen) {
6520
+ function _unsupported_iterable_to_array$6(o, minLen) {
6152
6521
  if (!o) return;
6153
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
6522
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
6154
6523
  var n = Object.prototype.toString.call(o).slice(8, -1);
6155
6524
  if (n === "Object" && o.constructor) n = o.constructor.name;
6156
6525
  if (n === "Map" || n === "Set") return Array.from(n);
6157
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
6526
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
6158
6527
  }
6159
6528
  function _ts_generator$1(thisArg, body) {
6160
6529
  var f, y, t, _ = {
@@ -6253,7 +6622,7 @@ function ModMatrix(param) {
6253
6622
  var getAutomatableParamsListFunc = Juce.getNativeFunction('getAutomatableParamsList');
6254
6623
  var getAllModSlotsFunc = Juce.getNativeFunction('getAllModSlots');
6255
6624
  var getModSlotParamsFunc = Juce.getNativeFunction('getModSlotParams');
6256
- var _useState = _sliced_to_array$6(useState([]), 2), displayedModSlots = _useState[0], setDisplayedModSlots = _useState[1];
6625
+ var _useState = _sliced_to_array$5(useState([]), 2), displayedModSlots = _useState[0], setDisplayedModSlots = _useState[1];
6257
6626
  var _useGlobalContext = useGlobalContext(), automatableParamsListReceived = _useGlobalContext.automatableParamsListReceived, automatableParamLabelsReceived = _useGlobalContext.automatableParamLabelsReceived, modSlotsReceived = _useGlobalContext.modSlotsReceived, modSlotRowTargetsReceived = _useGlobalContext.modSlotRowTargetsReceived, setNewModSlotPreview = _useGlobalContext.setNewModSlotPreview, modSlotParamsListReceived = _useGlobalContext.modSlotParamsListReceived, modSlotParamLabelsReceived = _useGlobalContext.modSlotParamLabelsReceived, _useGlobalContext_globalState = _useGlobalContext.globalState, modSlotParamLabels = _useGlobalContext_globalState.modSlotParamLabels, modSlotTargets = _useGlobalContext_globalState.modSlotTargets, modSlotIds = _useGlobalContext_globalState.modSlotIds, modSlotPreview = _useGlobalContext_globalState.modSlotPreview;
6258
6627
  // Empty state preview row
6259
6628
  useEffect(function() {
@@ -6285,7 +6654,7 @@ function ModMatrix(param) {
6285
6654
  return modSlotTargets[item] <= 0;
6286
6655
  });
6287
6656
  if (unassignedModSlots.length > 0 && modSlotPreview.slotId) {
6288
- setDisplayedModSlots(_to_consumable_array$2(displayedSlots).concat([
6657
+ setDisplayedModSlots(_to_consumable_array$1(displayedSlots).concat([
6289
6658
  modSlotPreview.slotId
6290
6659
  ]));
6291
6660
  } else {
@@ -6360,7 +6729,7 @@ function ModMatrix(param) {
6360
6729
  ]);
6361
6730
  var headers = [
6362
6731
  'Target'
6363
- ].concat(_to_consumable_array$2(modSlotParamLabels), [
6732
+ ].concat(_to_consumable_array$1(modSlotParamLabels), [
6364
6733
  ''
6365
6734
  ]);
6366
6735
  return /*#__PURE__*/ React__default.createElement(Box, {
@@ -6370,7 +6739,7 @@ function ModMatrix(param) {
6370
6739
  Box.padding.large
6371
6740
  ],
6372
6741
  className: "ModMatrix ".concat(className ? className : ''),
6373
- style: _object_spread$1({
6742
+ style: _object_spread$2({
6374
6743
  backgroundColor: 'var(--bg-lvl2)'
6375
6744
  }, style),
6376
6745
  flexDirection: Box.flexDirection.column
@@ -6415,30 +6784,30 @@ var WaveTypes = /*#__PURE__*/ function(WaveTypes) {
6415
6784
  return WaveTypes;
6416
6785
  }({});
6417
6786
 
6418
- function _array_like_to_array$6(arr, len) {
6787
+ function _array_like_to_array$5(arr, len) {
6419
6788
  if (len == null || len > arr.length) len = arr.length;
6420
6789
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6421
6790
  return arr2;
6422
6791
  }
6423
- function _array_without_holes$1(arr) {
6424
- if (Array.isArray(arr)) return _array_like_to_array$6(arr);
6792
+ function _array_without_holes(arr) {
6793
+ if (Array.isArray(arr)) return _array_like_to_array$5(arr);
6425
6794
  }
6426
- function _iterable_to_array$1(iter) {
6795
+ function _iterable_to_array(iter) {
6427
6796
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
6428
6797
  }
6429
- function _non_iterable_spread$1() {
6798
+ function _non_iterable_spread() {
6430
6799
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6431
6800
  }
6432
- function _to_consumable_array$1(arr) {
6433
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$1();
6801
+ function _to_consumable_array(arr) {
6802
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread();
6434
6803
  }
6435
- function _unsupported_iterable_to_array$6(o, minLen) {
6804
+ function _unsupported_iterable_to_array$5(o, minLen) {
6436
6805
  if (!o) return;
6437
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
6806
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
6438
6807
  var n = Object.prototype.toString.call(o).slice(8, -1);
6439
6808
  if (n === "Object" && o.constructor) n = o.constructor.name;
6440
6809
  if (n === "Map" || n === "Set") return Array.from(n);
6441
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
6810
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
6442
6811
  }
6443
6812
  var getPointArray = function(param) {
6444
6813
  var waveType = param.waveType, hz = param.hz, phaseValue = param.phaseValue, _param_pulseWidth = param.pulseWidth, pulseWidth = _param_pulseWidth === void 0 ? 1 : _param_pulseWidth, _param_ampValue = param.ampValue, ampValue = _param_ampValue === void 0 ? 0.5 : _param_ampValue, _param_randValue = param.randValue, randValue = _param_randValue === void 0 ? 1 : _param_randValue, _param_maxArrayLength = param.maxArrayLength, maxArrayLength = _param_maxArrayLength;
@@ -6580,7 +6949,7 @@ var getPointArray = function(param) {
6580
6949
  for(var i = 0; i < maxArrayLength; i++){
6581
6950
  var _phasedAllCycles_i;
6582
6951
  var phaseVal = flattenedAllCycles.length * (phaseValue / 4);
6583
- var arrayToUse = waveType === WaveTypes.Sine ? _to_consumable_array$1(sineRandomizedAllCycles) : _to_consumable_array$1(flattenedAllCycles);
6952
+ var arrayToUse = waveType === WaveTypes.Sine ? _to_consumable_array(sineRandomizedAllCycles) : _to_consumable_array(flattenedAllCycles);
6584
6953
  var phasedAllCycles = arrayToUse.concat(arrayToUse.splice(0, phaseVal));
6585
6954
  output.push({
6586
6955
  x: i,
@@ -6593,187 +6962,15 @@ var getPointArray = function(param) {
6593
6962
  var css_248z$1 = "/* *[id^='outerglow'] {\n opacity: 0.5;\n} */\n.area {\n fill: url(#area-gradient);\n /* stroke-width: 0px;w */\n}\n";
6594
6963
  styleInject(css_248z$1);
6595
6964
 
6596
- function Line(param) {
6597
- var data = param.data; param.width; var xScale = param.xScale, yScale = param.yScale, _param_strokeColor = param.strokeColor, strokeColor = _param_strokeColor === void 0 ? 'var(--color-brand-600)' : _param_strokeColor, _param_strokeWidth = param.strokeWidth, strokeWidth = _param_strokeWidth === void 0 ? '3px' : _param_strokeWidth;
6598
- return /*#__PURE__*/ React__default.createElement("g", {
6599
- className: "marks"
6600
- }, /*#__PURE__*/ React__default.createElement("path", {
6601
- fill: "none",
6602
- // fill={fillGradient ? `url(#${fillGradient}-gradient)` : fillColor}
6603
- filter: "url(#dropshadow)",
6604
- stroke: strokeColor,
6605
- strokeWidth: strokeWidth,
6606
- //@ts-expect-error
6607
- d: line().x(function(d) {
6608
- return xScale(d.x);
6609
- }).y(function(d) {
6610
- return yScale(d.y);
6611
- }).curve(curveBasis)(data)
6612
- }), /*#__PURE__*/ React__default.createElement("defs", null, /*#__PURE__*/ React__default.createElement("filter", {
6613
- id: "dropshadow"
6614
- }, /*#__PURE__*/ React__default.createElement("feDropShadow", {
6615
- dx: "0",
6616
- dy: "0",
6617
- stdDeviation: ".5",
6618
- "flood-color": "var(--color-brand-600)",
6619
- "flood-opacity": ".5"
6620
- }))));
6621
- }
6622
-
6623
- function Area(param) {
6624
- var data = param.data, xScale = param.xScale, yScale = param.yScale, _param_fillColor = param.fillColor, fillColor = _param_fillColor === void 0 ? 'var(--color-brand)' : _param_fillColor, fillGradient = param.fillGradient;
6625
- return /*#__PURE__*/ React__default.createElement("g", {
6626
- className: "marks"
6627
- }, /*#__PURE__*/ React__default.createElement("path", {
6628
- fill: fillGradient ? "url(#".concat(fillGradient, "-gradient)") : fillColor,
6629
- stroke: "none",
6630
- //@ts-expect-error
6631
- d: area().x(function(d) {
6632
- return xScale(d.x);
6633
- }).y0(function() {
6634
- return yScale(-1);
6635
- }).y1(function(d) {
6636
- return yScale(d.y);
6637
- }).curve(curveBasis)(data)
6638
- }), /*#__PURE__*/ React__default.createElement("defs", null, /*#__PURE__*/ React__default.createElement("linearGradient", {
6639
- id: "unicolor-gradient",
6640
- x1: "0",
6641
- y1: "0",
6642
- x2: "0",
6643
- y2: "1"
6644
- }, /*#__PURE__*/ React__default.createElement("stop", {
6645
- offset: "0%",
6646
- "stop-color": "var(--color-brand-700)",
6647
- "stop-opacity": 0.2
6648
- }), /*#__PURE__*/ React__default.createElement("stop", {
6649
- offset: "20%",
6650
- "stop-color": "var(--color-brand-700)",
6651
- "stop-opacity": 0.15
6652
- }), /*#__PURE__*/ React__default.createElement("stop", {
6653
- offset: "30%",
6654
- "stop-color": "var(--color-brand-700)",
6655
- "stop-opacity": 0.1
6656
- }), /*#__PURE__*/ React__default.createElement("stop", {
6657
- offset: "55%",
6658
- "stop-color": "var(--color-brand-700)",
6659
- "stop-opacity": 0
6660
- })), /*#__PURE__*/ React__default.createElement("linearGradient", {
6661
- id: "multicolor-gradient"
6662
- }, /*#__PURE__*/ React__default.createElement("stop", {
6663
- offset: "0%",
6664
- "stop-color": "var(--color-brand)",
6665
- "stop-opacity": 0.2
6666
- }), /*#__PURE__*/ React__default.createElement("stop", {
6667
- offset: "20%",
6668
- "stop-color": "var(--color-brand)",
6669
- "stop-opacity": 0.15
6670
- }), /*#__PURE__*/ React__default.createElement("stop", {
6671
- offset: "30%",
6672
- "stop-color": "var(--color-brand)",
6673
- "stop-opacity": 0.1
6674
- }), /*#__PURE__*/ React__default.createElement("stop", {
6675
- offset: "55%",
6676
- "stop-color": "var(--color-brand-secondary)",
6677
- "stop-opacity": 0
6678
- }))));
6679
- }
6680
-
6681
- function Ticks(param) {
6682
- var xScale = param.xScale, yScale = param.yScale, innerHeight = param.innerHeight, innerWidth = param.innerWidth, _param_centerLine = param.centerLine, centerLine = _param_centerLine === void 0 ? true : _param_centerLine, _param_strokeColor = param.strokeColor, strokeColor = _param_strokeColor === void 0 ? 'var(--color-brand-900)' : _param_strokeColor, _param_centerLineColor = param.centerLineColor, centerLineColor = _param_centerLineColor === void 0 ? 'var(--color-brand-900)' : _param_centerLineColor; param.tickFormat; param.tickOffset;
6683
- var _xScale_ticks, _yScale_ticks;
6684
- return /*#__PURE__*/ React__default.createElement("g", {
6685
- className: "ticks"
6686
- }, xScale ? /*#__PURE__*/ React__default.createElement("g", {
6687
- className: "xScale"
6688
- }, xScale === null || xScale === void 0 ? void 0 : (_xScale_ticks = xScale.ticks(25)) === null || _xScale_ticks === void 0 ? void 0 : _xScale_ticks.map(function(tickValue, i) {
6689
- return /*#__PURE__*/ React__default.createElement("line", {
6690
- x1: tickValue,
6691
- key: tickValue,
6692
- y1: 0,
6693
- y2: innerHeight,
6694
- x2: tickValue,
6695
- stroke: strokeColor,
6696
- "stroke-dasharray": "2,2"
6697
- });
6698
- })) : null, yScale ? /*#__PURE__*/ React__default.createElement("g", {
6699
- className: "yScale"
6700
- }, yScale === null || yScale === void 0 ? void 0 : (_yScale_ticks = yScale.ticks(25)) === null || _yScale_ticks === void 0 ? void 0 : _yScale_ticks.map(function(tickValue) {
6701
- return /*#__PURE__*/ React__default.createElement("line", {
6702
- x1: 0,
6703
- x2: innerWidth,
6704
- key: tickValue,
6705
- y1: tickValue * 400,
6706
- y2: tickValue * 400,
6707
- "stroke-dasharray": "2,2",
6708
- stroke: strokeColor
6709
- });
6710
- })) : null, centerLine ? /*#__PURE__*/ React__default.createElement("g", {
6711
- className: "centerLine"
6712
- }, /*#__PURE__*/ React__default.createElement("line", {
6713
- "stroke-dasharray": "2,2",
6714
- x1: 0,
6715
- y1: "".concat(innerHeight / 2),
6716
- y2: "".concat(innerHeight / 2),
6717
- x2: "".concat(innerWidth),
6718
- stroke: centerLineColor,
6719
- strokeWidth: '3px'
6720
- })) : null);
6721
- }
6722
-
6723
- function LineChart(param) {
6724
- var data = param.data, width = param.width, height = param.height; param.margin; var strokeColor = param.strokeColor, fillColor = param.fillColor, fillGradient = param.fillGradient;
6725
- // const innerHeight = height - margin * 2;
6726
- // const innerWidth = width - margin * 2;
6727
- // const xAxisTickFormat = timeFormat('%a');
6728
- var maxArrayLength = 512;
6729
- var xScale = width && scaleLinear().domain([
6730
- 0,
6731
- maxArrayLength
6732
- ]).range([
6733
- 0,
6734
- width
6735
- ]);
6736
- var yScale = height && scaleLinear().domain([
6737
- 0,
6738
- 1
6739
- ]).range([
6740
- height - 5,
6741
- 5
6742
- ]);
6743
- return /*#__PURE__*/ React__default.createElement("svg", {
6744
- width: width,
6745
- height: height
6746
- }, ' ', /*#__PURE__*/ React__default.createElement(Ticks, {
6747
- xScale: xScale,
6748
- yScale: yScale,
6749
- centerLine: true,
6750
- innerHeight: height,
6751
- innerWidth: width
6752
- }), /*#__PURE__*/ React__default.createElement("g", null, fillColor || fillGradient ? /*#__PURE__*/ React__default.createElement(Area, {
6753
- fillColor: fillColor,
6754
- fillGradient: fillGradient,
6755
- data: data,
6756
- xScale: xScale,
6757
- yScale: yScale
6758
- }) : null, /*#__PURE__*/ React__default.createElement(Line, {
6759
- width: width,
6760
- strokeColor: strokeColor,
6761
- data: data,
6762
- xScale: xScale,
6763
- yScale: yScale
6764
- })));
6765
- }
6766
- LineChart.fillGradient = GradientStyles;
6767
-
6768
- function _array_like_to_array$5(arr, len) {
6965
+ function _array_like_to_array$4(arr, len) {
6769
6966
  if (len == null || len > arr.length) len = arr.length;
6770
6967
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6771
6968
  return arr2;
6772
6969
  }
6773
- function _array_with_holes$5(arr) {
6970
+ function _array_with_holes$4(arr) {
6774
6971
  if (Array.isArray(arr)) return arr;
6775
6972
  }
6776
- function _iterable_to_array_limit$5(arr, i) {
6973
+ function _iterable_to_array_limit$4(arr, i) {
6777
6974
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
6778
6975
  if (_i == null) return;
6779
6976
  var _arr = [];
@@ -6797,41 +6994,41 @@ function _iterable_to_array_limit$5(arr, i) {
6797
6994
  }
6798
6995
  return _arr;
6799
6996
  }
6800
- function _non_iterable_rest$5() {
6997
+ function _non_iterable_rest$4() {
6801
6998
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6802
6999
  }
6803
- function _sliced_to_array$5(arr, i) {
6804
- return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$5();
7000
+ function _sliced_to_array$4(arr, i) {
7001
+ return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
6805
7002
  }
6806
- function _unsupported_iterable_to_array$5(o, minLen) {
7003
+ function _unsupported_iterable_to_array$4(o, minLen) {
6807
7004
  if (!o) return;
6808
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
7005
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
6809
7006
  var n = Object.prototype.toString.call(o).slice(8, -1);
6810
7007
  if (n === "Object" && o.constructor) n = o.constructor.name;
6811
7008
  if (n === "Map" || n === "Set") return Array.from(n);
6812
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
7009
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
6813
7010
  }
6814
7011
  function LFOVisualizer(param) {
6815
7012
  var id = param.id, _param_width = param.width, width = _param_width === void 0 ? 365 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 160 : _param_height;
6816
7013
  // const svgRef = useRef(null);
6817
7014
  var isLocalhost = window.location.hostname === 'localhost';
6818
- var _useState = _sliced_to_array$5(useState(0), 2), waveValue = _useState[0], setWaveValue = _useState[1];
6819
- var _useState1 = _sliced_to_array$5(useState(0), 2), hzValue = _useState1[0], setHzValue = _useState1[1];
6820
- var _useState2 = _sliced_to_array$5(useState(0), 2), hzHiValue = _useState2[0], setHzHiValue = _useState2[1];
7015
+ var _useState = _sliced_to_array$4(useState(0), 2), waveValue = _useState[0], setWaveValue = _useState[1];
7016
+ var _useState1 = _sliced_to_array$4(useState(0), 2), hzValue = _useState1[0], setHzValue = _useState1[1];
7017
+ var _useState2 = _sliced_to_array$4(useState(0), 2), hzHiValue = _useState2[0], setHzHiValue = _useState2[1];
6821
7018
  //@ts-expect-error
6822
- var _useState3 = _sliced_to_array$5(useState(0), 2); _useState3[0]; var setSyncRateValue = _useState3[1];
6823
- var _useState4 = _sliced_to_array$5(useState(0), 2), syncTypeValue = _useState4[0], setSyncTypeValue = _useState4[1];
7019
+ var _useState3 = _sliced_to_array$4(useState(0), 2); _useState3[0]; var setSyncRateValue = _useState3[1];
7020
+ var _useState4 = _sliced_to_array$4(useState(0), 2), syncTypeValue = _useState4[0], setSyncTypeValue = _useState4[1];
6824
7021
  //@ts-expect-error
6825
- var _useState5 = _sliced_to_array$5(useState(0), 2); _useState5[0]; var setSixteenthsValue = _useState5[1];
7022
+ var _useState5 = _sliced_to_array$4(useState(0), 2); _useState5[0]; var setSixteenthsValue = _useState5[1];
6826
7023
  //@ts-expect-error
6827
- var _useState6 = _sliced_to_array$5(useState(0), 2); _useState6[0]; var setThirdsValue = _useState6[1];
7024
+ var _useState6 = _sliced_to_array$4(useState(0), 2); _useState6[0]; var setThirdsValue = _useState6[1];
6828
7025
  //@ts-expect-error
6829
- var _useState7 = _sliced_to_array$5(useState(0), 2); _useState7[0]; var setSyncOffsetValue = _useState7[1];
6830
- var _useState8 = _sliced_to_array$5(useState(0), 2), phaseValue = _useState8[0], setPhaseValue = _useState8[1];
6831
- var _useState9 = _sliced_to_array$5(useState(0), 2), widthValue = _useState9[0], setWidthValue = _useState9[1];
6832
- var _useState10 = _sliced_to_array$5(useState(0), 2), ampValue = _useState10[0], setAmpValue = _useState10[1];
6833
- var _useState11 = _sliced_to_array$5(useState(0), 2), randValue = _useState11[0], setRandValue = _useState11[1];
6834
- var _useState12 = _sliced_to_array$5(useState([]), 2), points = _useState12[0], setPoints = _useState12[1];
7026
+ var _useState7 = _sliced_to_array$4(useState(0), 2); _useState7[0]; var setSyncOffsetValue = _useState7[1];
7027
+ var _useState8 = _sliced_to_array$4(useState(0), 2), phaseValue = _useState8[0], setPhaseValue = _useState8[1];
7028
+ var _useState9 = _sliced_to_array$4(useState(0), 2), widthValue = _useState9[0], setWidthValue = _useState9[1];
7029
+ var _useState10 = _sliced_to_array$4(useState(0), 2), ampValue = _useState10[0], setAmpValue = _useState10[1];
7030
+ var _useState11 = _sliced_to_array$4(useState(0), 2), randValue = _useState11[0], setRandValue = _useState11[1];
7031
+ var _useState12 = _sliced_to_array$4(useState([]), 2), points = _useState12[0], setPoints = _useState12[1];
6835
7032
  // const [numLoops, setNumLoops] = useState(1);
6836
7033
  var maxArrayLength = 512;
6837
7034
  // useEffect(() => {
@@ -7125,19 +7322,21 @@ function LFOVisualizer(param) {
7125
7322
  margin: 0,
7126
7323
  width: width,
7127
7324
  height: height,
7128
- fillGradient: LineChart.fillGradient.unicolor
7325
+ fillGradient: LineChart.fillGradient.unicolor,
7326
+ numberOfTicks: 20,
7327
+ gridStroke: StrokeStyle.dashed
7129
7328
  })));
7130
7329
  }
7131
7330
 
7132
- function _array_like_to_array$4(arr, len) {
7331
+ function _array_like_to_array$3(arr, len) {
7133
7332
  if (len == null || len > arr.length) len = arr.length;
7134
7333
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7135
7334
  return arr2;
7136
7335
  }
7137
- function _array_with_holes$4(arr) {
7336
+ function _array_with_holes$3(arr) {
7138
7337
  if (Array.isArray(arr)) return arr;
7139
7338
  }
7140
- function _iterable_to_array_limit$4(arr, i) {
7339
+ function _iterable_to_array_limit$3(arr, i) {
7141
7340
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
7142
7341
  if (_i == null) return;
7143
7342
  var _arr = [];
@@ -7161,23 +7360,23 @@ function _iterable_to_array_limit$4(arr, i) {
7161
7360
  }
7162
7361
  return _arr;
7163
7362
  }
7164
- function _non_iterable_rest$4() {
7363
+ function _non_iterable_rest$3() {
7165
7364
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7166
7365
  }
7167
- function _sliced_to_array$4(arr, i) {
7168
- return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
7366
+ function _sliced_to_array$3(arr, i) {
7367
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
7169
7368
  }
7170
- function _unsupported_iterable_to_array$4(o, minLen) {
7369
+ function _unsupported_iterable_to_array$3(o, minLen) {
7171
7370
  if (!o) return;
7172
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
7371
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
7173
7372
  var n = Object.prototype.toString.call(o).slice(8, -1);
7174
7373
  if (n === "Object" && o.constructor) n = o.constructor.name;
7175
7374
  if (n === "Map" || n === "Set") return Array.from(n);
7176
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
7375
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
7177
7376
  }
7178
7377
  function LFOBox(param) {
7179
7378
  var id = param.id;
7180
- var _useState = _sliced_to_array$4(useState(0), 2), syncType = _useState[0], setSyncType = _useState[1];
7379
+ var _useState = _sliced_to_array$3(useState(0), 2), syncType = _useState[0], setSyncType = _useState[1];
7181
7380
  useEffect(function() {
7182
7381
  var _Juce_getComboBoxState;
7183
7382
  var syncType = (_Juce_getComboBoxState = Juce.getComboBoxState("LFO".concat(id, "_SyncType"))) === null || _Juce_getComboBoxState === void 0 ? void 0 : _Juce_getComboBoxState.getChoiceIndex();
@@ -7367,15 +7566,15 @@ function LFOTab() {
7367
7566
  }));
7368
7567
  }
7369
7568
 
7370
- function _array_like_to_array$3(arr, len) {
7569
+ function _array_like_to_array$2(arr, len) {
7371
7570
  if (len == null || len > arr.length) len = arr.length;
7372
7571
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7373
7572
  return arr2;
7374
7573
  }
7375
- function _array_with_holes$3(arr) {
7574
+ function _array_with_holes$2(arr) {
7376
7575
  if (Array.isArray(arr)) return arr;
7377
7576
  }
7378
- function _iterable_to_array_limit$3(arr, i) {
7577
+ function _iterable_to_array_limit$2(arr, i) {
7379
7578
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
7380
7579
  if (_i == null) return;
7381
7580
  var _arr = [];
@@ -7399,24 +7598,24 @@ function _iterable_to_array_limit$3(arr, i) {
7399
7598
  }
7400
7599
  return _arr;
7401
7600
  }
7402
- function _non_iterable_rest$3() {
7601
+ function _non_iterable_rest$2() {
7403
7602
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7404
7603
  }
7405
- function _sliced_to_array$3(arr, i) {
7406
- return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
7604
+ function _sliced_to_array$2(arr, i) {
7605
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
7407
7606
  }
7408
- function _unsupported_iterable_to_array$3(o, minLen) {
7607
+ function _unsupported_iterable_to_array$2(o, minLen) {
7409
7608
  if (!o) return;
7410
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
7609
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
7411
7610
  var n = Object.prototype.toString.call(o).slice(8, -1);
7412
7611
  if (n === "Object" && o.constructor) n = o.constructor.name;
7413
7612
  if (n === "Map" || n === "Set") return Array.from(n);
7414
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
7613
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
7415
7614
  }
7416
7615
  function StepSequencer(param) {
7417
7616
  var seqId = param.seqId, _param_numSteps = param.numSteps, numSteps = _param_numSteps === void 0 ? 16 : _param_numSteps;
7418
7617
  var isLocalhost = window.location.hostname === 'localhost';
7419
- var _useState = _sliced_to_array$3(useState(1), 2), currentSeqStep = _useState[0], setCurrentSeqStep = _useState[1];
7618
+ var _useState = _sliced_to_array$2(useState(1), 2), currentSeqStep = _useState[0], setCurrentSeqStep = _useState[1];
7420
7619
  var steps = new Array(numSteps).fill(0);
7421
7620
  // const currentElementRef = useRef<string>(null);
7422
7621
  // const isMouseDownRef = useRef<boolean>(false);
@@ -7497,15 +7696,15 @@ function StepSequencer(param) {
7497
7696
  }));
7498
7697
  }
7499
7698
 
7500
- function _array_like_to_array$2(arr, len) {
7699
+ function _array_like_to_array$1(arr, len) {
7501
7700
  if (len == null || len > arr.length) len = arr.length;
7502
7701
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7503
7702
  return arr2;
7504
7703
  }
7505
- function _array_with_holes$2(arr) {
7704
+ function _array_with_holes$1(arr) {
7506
7705
  if (Array.isArray(arr)) return arr;
7507
7706
  }
7508
- function _iterable_to_array_limit$2(arr, i) {
7707
+ function _iterable_to_array_limit$1(arr, i) {
7509
7708
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
7510
7709
  if (_i == null) return;
7511
7710
  var _arr = [];
@@ -7529,23 +7728,23 @@ function _iterable_to_array_limit$2(arr, i) {
7529
7728
  }
7530
7729
  return _arr;
7531
7730
  }
7532
- function _non_iterable_rest$2() {
7731
+ function _non_iterable_rest$1() {
7533
7732
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7534
7733
  }
7535
- function _sliced_to_array$2(arr, i) {
7536
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
7734
+ function _sliced_to_array$1(arr, i) {
7735
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
7537
7736
  }
7538
- function _unsupported_iterable_to_array$2(o, minLen) {
7737
+ function _unsupported_iterable_to_array$1(o, minLen) {
7539
7738
  if (!o) return;
7540
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
7739
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
7541
7740
  var n = Object.prototype.toString.call(o).slice(8, -1);
7542
7741
  if (n === "Object" && o.constructor) n = o.constructor.name;
7543
7742
  if (n === "Map" || n === "Set") return Array.from(n);
7544
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
7743
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
7545
7744
  }
7546
7745
  function SeqTab$1(param) {
7547
7746
  var seqId = param.seqId;
7548
- var _useState = _sliced_to_array$2(useState(0), 2), syncType = _useState[0], setSyncType = _useState[1];
7747
+ var _useState = _sliced_to_array$1(useState(0), 2), syncType = _useState[0], setSyncType = _useState[1];
7549
7748
  useEffect(function() {
7550
7749
  var _Juce_getSliderState;
7551
7750
  var syncType = (_Juce_getSliderState = Juce.getSliderState("seq".concat(seqId, "_syncType"))) === null || _Juce_getSliderState === void 0 ? void 0 : _Juce_getSliderState.scaledValue;
@@ -7579,8 +7778,7 @@ function SeqTab$1(param) {
7579
7778
  ],
7580
7779
  color: "var(--color-brand)"
7581
7780
  }, "Seq ".concat(seqId)), /*#__PURE__*/ React__default.createElement(IndicatorLight, {
7582
- id: "SEQ".concat(seqId, "_Out"),
7583
- dataSource: IndicatorLight.dataSource.event
7781
+ id: "SEQ".concat(seqId, "_Out")
7584
7782
  })), /*#__PURE__*/ React__default.createElement(Box, {
7585
7783
  flexDirection: Box.flexDirection.column,
7586
7784
  gap: Box.gap.medium,
@@ -7720,205 +7918,171 @@ function SeqTab() {
7720
7918
  }));
7721
7919
  }
7722
7920
 
7723
- // import 'd3-transition';
7724
- // import AxisBottom from './AxisBottom';
7725
- // import AxisLeft from './AxisLeft';
7726
- // import Ticks from './Ticks';
7727
- function StackedChart(param) {
7728
- var bands = param.bands, width = param.width, height = param.height, _param_backgroundColor = param.backgroundColor, backgroundColor = _param_backgroundColor === void 0 ? 'var(--bg-lv2)' : _param_backgroundColor, _param_colors = param.colors, colors = _param_colors === void 0 ? [
7729
- '#1cf667',
7730
- '#f38e27',
7731
- '#fd151b'
7732
- ] : _param_colors;
7733
- var _stack_keys, _Object, _stack;
7734
- var series = (_stack = stack()) === null || _stack === void 0 ? void 0 : (_stack_keys = _stack.keys((_Object = Object) === null || _Object === void 0 ? void 0 : _Object.keys(bands[0]))) === null || _stack_keys === void 0 ? void 0 : _stack_keys(bands);
7735
- var xScale = scaleLinear().range([
7736
- 0,
7737
- width
7738
- ]);
7739
- var yScale = scaleLinear().domain([
7740
- 0,
7741
- 1
7742
- ]).range([
7743
- height,
7744
- 0
7745
- ]);
7746
- // const { ref, attrState } = useD3Transition({
7747
- // attrsToTransitionTo: { yScale: yScale }, // attributes to transition to smoothly
7748
- // duration: 1000,
7749
- // deps: [yScale], // hook dependencies (typically identical to the attributes to transition to)
7750
- // });
7751
- var color = scaleOrdinal().domain(series.map(function(d, i) {
7752
- return "".concat(i);
7753
- })).range(colors).unknown('#ccc');
7754
- return /*#__PURE__*/ React__default.createElement("svg", {
7755
- width: width,
7756
- height: height
7757
- }, /*#__PURE__*/ React__default.createElement("g", null, /*#__PURE__*/ React__default.createElement("rect", {
7758
- width: width,
7759
- height: height,
7760
- fill: backgroundColor
7761
- })), /*#__PURE__*/ React__default.createElement("g", null, series.map(function(item, i) {
7762
- return /*#__PURE__*/ React__default.createElement("rect", {
7763
- className: "StackedChart",
7764
- // ref={ref}
7765
- //@ts-expect-error
7766
- fill: color("".concat(i)),
7767
- transform: "translate(0, 100) scale(1, -1)",
7768
- width: width,
7769
- height: yScale(1 - (item[0][1] - item[0][0])),
7770
- x: function(d) {
7771
- return xScale(0);
7772
- }(),
7773
- y: function(d) {
7774
- return yScale(1 - d[i][0][0]);
7775
- }(series)
7776
- });
7777
- })));
7921
+ var WorkerClass = null;
7922
+
7923
+ try {
7924
+ var WorkerThreads =
7925
+ typeof module !== 'undefined' && typeof module.require === 'function' && module.require('worker_threads') ||
7926
+ typeof __non_webpack_require__ === 'function' && __non_webpack_require__('worker_threads') ||
7927
+ typeof require === 'function' && require('worker_threads');
7928
+ WorkerClass = WorkerThreads.Worker;
7929
+ } catch(e) {} // eslint-disable-line
7930
+
7931
+ function decodeBase64$1(base64, enableUnicode) {
7932
+ return Buffer.from(base64, 'base64').toString('utf8');
7778
7933
  }
7779
7934
 
7780
- var ChartTypes = /*#__PURE__*/ function(ChartTypes) {
7781
- ChartTypes["stacked"] = "stacked";
7782
- ChartTypes["line"] = "line";
7783
- return ChartTypes;
7784
- }(ChartTypes || {});
7785
- function Chart(param) {
7786
- var _param_chartType = param.chartType, chartType = _param_chartType === void 0 ? "line" : _param_chartType, data = param.data, width = param.width, height = param.height, _param_margin = param.margin, margin = _param_margin === void 0 ? 5 : _param_margin, bands = param.bands, strokeColor = param.strokeColor, fillColor = param.fillColor, fillGradient = param.fillGradient, stackedChartColors = param.stackedChartColors;
7787
- return /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, chartType === "line" ? /*#__PURE__*/ React__default.createElement(LineChart, {
7788
- data: data || [],
7789
- width: width,
7790
- height: height,
7791
- margin: margin,
7792
- strokeColor: strokeColor,
7793
- fillColor: fillColor,
7794
- fillGradient: fillGradient
7795
- }) : null, chartType === "stacked" ? /*#__PURE__*/ React__default.createElement(StackedChart, {
7796
- bands: bands || [],
7797
- width: width,
7798
- height: height,
7799
- colors: stackedChartColors
7800
- }) : null);
7935
+ function createBase64WorkerFactory$2(base64, sourcemapArg, enableUnicodeArg) {
7936
+ var sourcemap = sourcemapArg;
7937
+ var source = decodeBase64$1(base64);
7938
+ var start = source.indexOf('\n', 10) + 1;
7939
+ var body = source.substring(start) + ('\/\/# sourceMappingURL=' + sourcemap );
7940
+ return function WorkerFactory(options) {
7941
+ return new WorkerClass(body, Object.assign({}, options, { eval: true }));
7942
+ };
7801
7943
  }
7802
- Chart.fillGradient = GradientStyles;
7803
- Chart.chartType = ChartTypes;
7804
7944
 
7805
- function _array_like_to_array$1(arr, len) {
7806
- if (len == null || len > arr.length) len = arr.length;
7807
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7808
- return arr2;
7945
+ function decodeBase64(base64, enableUnicode) {
7946
+ var binaryString = atob(base64);
7947
+ return binaryString;
7809
7948
  }
7810
- function _array_with_holes$1(arr) {
7811
- if (Array.isArray(arr)) return arr;
7949
+
7950
+ function createURL(base64, sourcemapArg, enableUnicodeArg) {
7951
+ var sourcemap = sourcemapArg;
7952
+ var source = decodeBase64(base64);
7953
+ var start = source.indexOf('\n', 10) + 1;
7954
+ var body = source.substring(start) + ('\/\/# sourceMappingURL=' + sourcemap );
7955
+ var blob = new Blob([body], { type: 'application/javascript' });
7956
+ return URL.createObjectURL(blob);
7812
7957
  }
7813
- function _array_without_holes(arr) {
7814
- if (Array.isArray(arr)) return _array_like_to_array$1(arr);
7958
+
7959
+ function createBase64WorkerFactory$1(base64, sourcemapArg, enableUnicodeArg) {
7960
+ var url;
7961
+ return function WorkerFactory(options) {
7962
+ url = url || createURL(base64, sourcemapArg);
7963
+ return new Worker(url, options);
7964
+ };
7815
7965
  }
7816
- function _iterable_to_array(iter) {
7817
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
7966
+
7967
+ var kIsNodeJS = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
7968
+
7969
+ function isNodeJS() {
7970
+ return kIsNodeJS;
7818
7971
  }
7819
- function _iterable_to_array_limit$1(arr, i) {
7820
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
7821
- if (_i == null) return;
7822
- var _arr = [];
7823
- var _n = true;
7824
- var _d = false;
7825
- var _s, _e;
7826
- try {
7827
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
7828
- _arr.push(_s.value);
7829
- if (i && _arr.length === i) break;
7830
- }
7831
- } catch (err) {
7832
- _d = true;
7833
- _e = err;
7834
- } finally{
7835
- try {
7836
- if (!_n && _i["return"] != null) _i["return"]();
7837
- } finally{
7838
- if (_d) throw _e;
7839
- }
7972
+
7973
+ function createBase64WorkerFactory(base64, sourcemapArg, enableUnicodeArg) {
7974
+ if (isNodeJS()) {
7975
+ return createBase64WorkerFactory$2(base64, sourcemapArg);
7840
7976
  }
7841
- return _arr;
7842
- }
7843
- function _non_iterable_rest$1() {
7844
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7845
- }
7846
- function _non_iterable_spread() {
7847
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7977
+ return createBase64WorkerFactory$1(base64, sourcemapArg);
7848
7978
  }
7849
- function _sliced_to_array$1(arr, i) {
7850
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
7851
- }
7852
- function _to_consumable_array(arr) {
7853
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread();
7979
+
7980
+ var WorkerFactory = /*#__PURE__*/createBase64WorkerFactory('Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgaW1wb3J0U2NyaXB0cygnaHR0cHM6Ly9kM2pzLm9yZy9kMy52Ny5taW4uanMnKTsKICB2YXIgdnVNZXRlckNhbnZhczsKICBzZWxmLm9ubWVzc2FnZSA9IGZ1bmN0aW9uKGV2ZW50KSB7CiAgICAgIHZhciBkYXRhID0gZXZlbnQuZGF0YTsKICAgICAgdmFyIG1hcmdpbiA9IDE0OwogICAgICB2YXIgaW5uZXJXaWR0aCA9IChkYXRhID09PSBudWxsIHx8IGRhdGEgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGRhdGEud2lkdGgpIC0gbWFyZ2luICogMjsKICAgICAgaWYgKGRhdGEudHlwZSA9PT0gJ2luaXQnKSB7CiAgICAgICAgICB2dU1ldGVyQ2FudmFzID0gZGF0YSA9PT0gbnVsbCB8fCBkYXRhID09PSB2b2lkIDAgPyB2b2lkIDAgOiBkYXRhLmNhbnZhczsKICAgICAgfQogICAgICBpZiAoZGF0YS50eXBlID09PSAndXBkYXRlJykgewogICAgICAgICAgLy8gY29uc3QgZXZlbnRJZCA9ICdWVU1ldGVyU2lnbmFsJzsKICAgICAgICAgIHZhciB4U2NhbGUgPSBkMy5zY2FsZUJhbmQoKS5kb21haW4oT2JqZWN0LmtleXMoZGF0YSA9PT0gbnVsbCB8fCBkYXRhID09PSB2b2lkIDAgPyB2b2lkIDAgOiBkYXRhLnJlbmRlckRhdGEpLm1hcChmdW5jdGlvbihkKSB7CiAgICAgICAgICAgICAgcmV0dXJuIGQ7CiAgICAgICAgICB9KSkucmFuZ2UoWwogICAgICAgICAgICAgIDAsCiAgICAgICAgICAgICAgaW5uZXJXaWR0aAogICAgICAgICAgXSkucGFkZGluZ0lubmVyKDAuMikucGFkZGluZ091dGVyKDApOwogICAgICAgICAgdmFyIHlTY2FsZSA9IGQzLnNjYWxlTGluZWFyKCkuZG9tYWluKGRhdGEgPT09IG51bGwgfHwgZGF0YSA9PT0gdm9pZCAwID8gdm9pZCAwIDogZGF0YS55U2NhbGVEb21haW4pLnJhbmdlKFsKICAgICAgICAgICAgICBkYXRhLmhlaWdodCwKICAgICAgICAgICAgICAwCiAgICAgICAgICBdKTsKICAgICAgICAgIHZhciB5QXhpcyA9IGQzLmF4aXNCb3R0b20oeFNjYWxlKS50aWNrVmFsdWVzKFsKICAgICAgICAgICAgICAnMC4yNScsCiAgICAgICAgICAgICAgJzAuNScsCiAgICAgICAgICAgICAgJzAuNzUnLAogICAgICAgICAgICAgICcwLjknCiAgICAgICAgICBdKTsKICAgICAgICAgIHZhciB0aWNrVmFsdWVzID0geUF4aXMudGlja3MoNikudGlja1ZhbHVlcygpOwogICAgICAgICAgLy8gLm5pY2UoKTsKICAgICAgICAgIGlmIChkYXRhICE9IG51bGwpIHsKICAgICAgICAgICAgICB2YXIgY3R4ID0gdnVNZXRlckNhbnZhcyA9PT0gbnVsbCB8fCB2dU1ldGVyQ2FudmFzID09PSB2b2lkIDAgPyB2b2lkIDAgOiB2dU1ldGVyQ2FudmFzLmdldENvbnRleHQoJzJkJyk7CiAgICAgICAgICAgICAgY3R4LmNsZWFyUmVjdCgwLCAwLCB2dU1ldGVyQ2FudmFzID09PSBudWxsIHx8IHZ1TWV0ZXJDYW52YXMgPT09IHZvaWQgMCA/IHZvaWQgMCA6IHZ1TWV0ZXJDYW52YXMud2lkdGgsIHZ1TWV0ZXJDYW52YXMuaGVpZ2h0KTsKICAgICAgICAgICAgICAvLyBjb25zdCBhdmVyYWdlVmFsdWVzID0gVlVCdWZmZXIucmVkdWNlKAogICAgICAgICAgICAgIC8vICAgKGFjYzogVlVNZXRlckRhdGEsIGl0ZW06IFZVTWV0ZXJEYXRhKSA9PiB7CiAgICAgICAgICAgICAgLy8gICAgIGFjY1snbCddICs9IGl0ZW1bJ2wnXTsKICAgICAgICAgICAgICAvLyAgICAgYWNjWydyJ10gKz0gaXRlbVsnciddOwogICAgICAgICAgICAgIC8vICAgICByZXR1cm4gYWNjOwogICAgICAgICAgICAgIC8vICAgfSwKICAgICAgICAgICAgICAvLyAgIHsKICAgICAgICAgICAgICAvLyAgICAgbDogMCwKICAgICAgICAgICAgICAvLyAgICAgcjogMCwKICAgICAgICAgICAgICAvLyAgIH0sCiAgICAgICAgICAgICAgLy8gKTsKICAgICAgICAgICAgICAvLyBjb25zdCBzdW1tZWRWYWx1ZXMgPSB7CiAgICAgICAgICAgICAgLy8gICBsOiBhdmVyYWdlVmFsdWVzWydsJ10gLyBWVUJ1ZmZlci5sZW5ndGgsCiAgICAgICAgICAgICAgLy8gICByOiBhdmVyYWdlVmFsdWVzWydyJ10gLyBWVUJ1ZmZlci5sZW5ndGgsCiAgICAgICAgICAgICAgLy8gfTsKICAgICAgICAgICAgICBPYmplY3QudmFsdWVzKGRhdGEgPT09IG51bGwgfHwgZGF0YSA9PT0gdm9pZCAwID8gdm9pZCAwIDogZGF0YS5yZW5kZXJEYXRhKS5mb3JFYWNoKGZ1bmN0aW9uKGQsIGkpIHsKICAgICAgICAgICAgICAgICAgdmFyIHkgPSB5U2NhbGUoZCk7CiAgICAgICAgICAgICAgICAgIHZhciB3aWR0aCA9IHhTY2FsZS5iYW5kd2lkdGgoKTsKICAgICAgICAgICAgICAgICAgdmFyIGhlaWdodCA9IHZ1TWV0ZXJDYW52YXMuaGVpZ2h0IC0geTsKICAgICAgICAgICAgICAgICAgdmFyIGxpbmVhckdyYWRpZW50ID0gY3R4LmNyZWF0ZUxpbmVhckdyYWRpZW50KDAsIDAsIDAsIGhlaWdodCk7IC8vIHgwLCB5MCwgeDEsIHkxCiAgICAgICAgICAgICAgICAgIHZhciB4UG9zID0geFNjYWxlKE9iamVjdC5rZXlzKGRhdGEgPT09IG51bGwgfHwgZGF0YSA9PT0gdm9pZCAwID8gdm9pZCAwIDogZGF0YS5yZW5kZXJEYXRhKVtpXSkgfHwgMDsKICAgICAgICAgICAgICAgICAgY3R4LmZpbGxTdHlsZSA9ICcjMGUwZTEyJzsKICAgICAgICAgICAgICAgICAgY3R4LmZpbGxSZWN0KHhQb3MgKyBtYXJnaW4gLyAyLCAxLCB3aWR0aCwgdnVNZXRlckNhbnZhcy5oZWlnaHQpOwogICAgICAgICAgICAgICAgICBsaW5lYXJHcmFkaWVudC5hZGRDb2xvclN0b3AoMCwgJyNlOTM1MjYnKTsKICAgICAgICAgICAgICAgICAgbGluZWFyR3JhZGllbnQuYWRkQ29sb3JTdG9wKDAuMSwgJyNlOTM1MjYnKTsKICAgICAgICAgICAgICAgICAgbGluZWFyR3JhZGllbnQuYWRkQ29sb3JTdG9wKDAuMywgJyNlZGQ3NDcnKTsKICAgICAgICAgICAgICAgICAgbGluZWFyR3JhZGllbnQuYWRkQ29sb3JTdG9wKDAuNCwgJyNlZGQ3NDcnKTsKICAgICAgICAgICAgICAgICAgbGluZWFyR3JhZGllbnQuYWRkQ29sb3JTdG9wKDAuNSwgJyM3MWYzNmQnKTsKICAgICAgICAgICAgICAgICAgbGluZWFyR3JhZGllbnQuYWRkQ29sb3JTdG9wKDAuOSwgJyM3MWYzNmQnKTsKICAgICAgICAgICAgICAgICAgY3R4LmZpbGxTdHlsZSA9IGxpbmVhckdyYWRpZW50OwogICAgICAgICAgICAgICAgICBjdHguZmlsbFJlY3QoeFBvcyArIG1hcmdpbiAvIDIsIHksIHdpZHRoLCBoZWlnaHQpOwogICAgICAgICAgICAgICAgICBjdHguYmVnaW5QYXRoKCk7CiAgICAgICAgICAgICAgICAgIGN0eC5tb3ZlVG8oeFBvcyArIG1hcmdpbiAvIDIsIE51bWJlcih5U2NhbGUoTnVtYmVyKHRpY2tWYWx1ZXMgPT09IG51bGwgfHwgdGlja1ZhbHVlcyA9PT0gdm9pZCAwID8gdm9pZCAwIDogdGlja1ZhbHVlc1szXSkpKSk7CiAgICAgICAgICAgICAgICAgIGN0eC5saW5lVG8oeFBvcyArIG1hcmdpbiAvIDIgKyB3aWR0aCwgTnVtYmVyKHlTY2FsZShOdW1iZXIodGlja1ZhbHVlcyA9PT0gbnVsbCB8fCB0aWNrVmFsdWVzID09PSB2b2lkIDAgPyB2b2lkIDAgOiB0aWNrVmFsdWVzWzNdKSkpKTsKICAgICAgICAgICAgICAgICAgY3R4LmxpbmVXaWR0aCA9IDM7CiAgICAgICAgICAgICAgICAgIGN0eC5zdHJva2VTdHlsZSA9ICcjMTYxNzFkJzsKICAgICAgICAgICAgICAgICAgY3R4LnN0cm9rZSgpOwogICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgIHRpY2tWYWx1ZXMgPT09IG51bGwgfHwgdGlja1ZhbHVlcyA9PT0gdm9pZCAwID8gdm9pZCAwIDogdGlja1ZhbHVlcy5mb3JFYWNoKGZ1bmN0aW9uKHRpY2tWYWx1ZSkgewogICAgICAgICAgICAgICAgICBpZiAodGlja1ZhbHVlID09PSAwIHx8IHRpY2tWYWx1ZSA9PT0gMSkgewogICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIHZhciB5UG9zID0geVNjYWxlKHRpY2tWYWx1ZSk7CiAgICAgICAgICAgICAgICAgIC8vIERyYXcgdGljayBtYXJrCiAgICAgICAgICAgICAgICAgIGN0eC5iZWdpblBhdGgoKTsKICAgICAgICAgICAgICAgICAgY3R4Lm1vdmVUbyhtYXJnaW4gLyAyIC0gMywgeVBvcyk7CiAgICAgICAgICAgICAgICAgIGN0eC5saW5lV2lkdGggPSAwLjU7CiAgICAgICAgICAgICAgICAgIGN0eC5saW5lVG8oLTEwLCB5UG9zKTsKICAgICAgICAgICAgICAgICAgY3R4LnN0cm9rZVN0eWxlID0gJyM5OTk5YTcnOwogICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlKCk7CiAgICAgICAgICAgICAgICAgIC8vIERyYXcgbGFiZWwKICAgICAgICAgICAgICAgICAgY3R4LmZvbnQgPSAnOXB4IHNhbnMtc2VyaWYnOwogICAgICAgICAgICAgICAgICBjdHgudGV4dEJhc2VsaW5lID0gJ21pZGRsZSc7CiAgICAgICAgICAgICAgICAgIGN0eC5maWxsU3R5bGUgPSAnIzk5OTlhNyc7CiAgICAgICAgICAgICAgICAgIGN0eC5maWxsVGV4dCgiIi5jb25jYXQodGlja1ZhbHVlICogMTAwKSwgaW5uZXJXaWR0aCArIG1hcmdpbiwgeVBvcyk7CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgdnVNZXRlckNhbnZhcyA9PT0gbnVsbCB8fCB2dU1ldGVyQ2FudmFzID09PSB2b2lkIDAgPyB2b2lkIDAgOiB2dU1ldGVyQ2FudmFzLmdldENvbnRleHQoJzJkJykuZHJhd0ltYWdlKHZ1TWV0ZXJDYW52YXMsIDAsIDApOwogICAgICAgICAgICAgIHZhciBiaXRtYXAgPSB2dU1ldGVyQ2FudmFzID09PSBudWxsIHx8IHZ1TWV0ZXJDYW52YXMgPT09IHZvaWQgMCA/IHZvaWQgMCA6IHZ1TWV0ZXJDYW52YXMudHJhbnNmZXJUb0ltYWdlQml0bWFwKCk7CiAgICAgICAgICAgICAgc2VsZi5wb3N0TWVzc2FnZShiaXRtYXApOwogICAgICAgICAgfQogICAgICB9CiAgfTsKCn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPXdvcmtlci5qcy5tYXAKCg==', 'data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9');
7981
+ /* eslint-enable */
7982
+
7983
+ function _define_property$1(obj, key, value) {
7984
+ if (key in obj) {
7985
+ Object.defineProperty(obj, key, {
7986
+ value: value,
7987
+ enumerable: true,
7988
+ configurable: true,
7989
+ writable: true
7990
+ });
7991
+ } else {
7992
+ obj[key] = value;
7993
+ }
7994
+ return obj;
7854
7995
  }
7855
- function _unsupported_iterable_to_array$1(o, minLen) {
7856
- if (!o) return;
7857
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
7858
- var n = Object.prototype.toString.call(o).slice(8, -1);
7859
- if (n === "Object" && o.constructor) n = o.constructor.name;
7860
- if (n === "Map" || n === "Set") return Array.from(n);
7861
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
7996
+ function _object_spread$1(target) {
7997
+ for(var i = 1; i < arguments.length; i++){
7998
+ var source = arguments[i] != null ? arguments[i] : {};
7999
+ var ownKeys = Object.keys(source);
8000
+ if (typeof Object.getOwnPropertySymbols === "function") {
8001
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
8002
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
8003
+ }));
8004
+ }
8005
+ ownKeys.forEach(function(key) {
8006
+ _define_property$1(target, key, source[key]);
8007
+ });
8008
+ }
8009
+ return target;
7862
8010
  }
7863
8011
  function VUMeter(param) {
7864
- var width = param.width, height = param.height; param.backgroundColor; var _param_colors = param.colors, colors = _param_colors === void 0 ? [
7865
- '#1cf667',
7866
- '#f38e27',
7867
- '#fd151b'
7868
- ] : _param_colors;
7869
- var thresholds = {
7870
- med: 0.75,
7871
- high: 0.9,
7872
- max: 1
7873
- };
7874
- var isLocalhost = window.location.hostname === 'localhost';
7875
- var _useState = _sliced_to_array$1(useState(0), 2), value = _useState[0], setValue = _useState[1];
7876
- var eventAvgRef = useRef([]);
8012
+ var _param_width = param.width, width = _param_width === void 0 ? 80 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 150 : _param_height, className = param.className, style = param.style, id = param.id;
8013
+ var workerRef = useRef(null);
8014
+ var yScaleDomain = [
8015
+ 0,
8016
+ 1
8017
+ ];
7877
8018
  useEffect(function() {
7878
- if (!isLocalhost) {
7879
- var currentSeqStepChangedListenerId = //@ts-expect-error
7880
- window.__JUCE__.backend.addEventListener("InputSignal0", function(event) {
7881
- var posEvent = Math.abs(event);
7882
- if (eventAvgRef.current.length > 1) {
7883
- var newArray = eventAvgRef.current.slice(1);
7884
- eventAvgRef.current = _to_consumable_array(newArray).concat([
7885
- posEvent
7886
- ]);
7887
- } else {
7888
- eventAvgRef.current.push(posEvent);
7889
- }
7890
- var sum = eventAvgRef.current.reduce(function(acc, currentVal) {
7891
- return acc + currentVal;
7892
- }, 0);
7893
- setValue(sum / eventAvgRef.current.length);
7894
- });
7895
- return function cleanup() {
7896
- //@ts-expect-error
7897
- window.__JUCE__.backend.removeEventListener(currentSeqStepChangedListenerId);
7898
- };
7899
- } else {
7900
- return;
7901
- }
8019
+ // const canvas = document.getElementById(`${id}`);
8020
+ var canvas = document.createElement('canvas');
8021
+ if (canvas) {
8022
+ canvas.width = width;
8023
+ canvas.height = height;
8024
+ }
8025
+ var worker = new WorkerFactory();
8026
+ var offscreenCanvas = canvas.transferControlToOffscreen();
8027
+ worker.postMessage({
8028
+ type: 'init',
8029
+ canvas: offscreenCanvas
8030
+ }, [
8031
+ offscreenCanvas
8032
+ ]);
8033
+ workerRef.current = worker;
7902
8034
  }, [
7903
8035
  window
7904
8036
  ]);
7905
- var getBands = function(data) {
7906
- return [
7907
- {
7908
- low: Math.min(data, thresholds.med),
7909
- med: Math.min(Math.max(data - thresholds.med, 0), thresholds.high - thresholds.med),
7910
- high: Math.min(Math.max(data - thresholds.high, 0), thresholds.max - thresholds.high)
7911
- }
7912
- ];
8037
+ var renderFuction = function(data) {
8038
+ workerRef === null || workerRef === void 0 ? void 0 : workerRef.current.postMessage({
8039
+ type: 'update',
8040
+ renderData: data,
8041
+ height: height,
8042
+ width: width,
8043
+ yScaleDomain: yScaleDomain
8044
+ });
8045
+ workerRef.current.onmessage = function(e) {
8046
+ var _document_getElementById, _document;
8047
+ var imageBitmap = e === null || e === void 0 ? void 0 : e.data;
8048
+ var canvas = (_document = document) === null || _document === void 0 ? void 0 : (_document_getElementById = _document.getElementById("".concat(id))) === null || _document_getElementById === void 0 ? void 0 : _document_getElementById.getContext('bitmaprenderer');
8049
+ canvas === null || canvas === void 0 ? void 0 : canvas.transferFromImageBitmap(imageBitmap);
8050
+ };
7913
8051
  };
7914
- var bands = getBands(value);
7915
- return /*#__PURE__*/ React__default.createElement(Chart, {
7916
- chartType: Chart.chartType.stacked,
7917
- bands: bands,
8052
+ return /*#__PURE__*/ React__default.createElement("div", {
8053
+ style: _object_spread$1({
8054
+ height: height,
8055
+ width: width,
8056
+ flex: "0 0 ".concat(width)
8057
+ }, style),
8058
+ className: classnames('VUMeter', className)
8059
+ }, /*#__PURE__*/ React__default.createElement("div", {
8060
+ style: {
8061
+ position: 'relative',
8062
+ width: width,
8063
+ height: height
8064
+ }
8065
+ }, /*#__PURE__*/ React__default.createElement("div", {
8066
+ style: {
8067
+ position: 'absolute',
8068
+ top: 0,
8069
+ bottom: 0,
8070
+ right: 0,
8071
+ left: 0,
8072
+ height: height,
8073
+ width: width
8074
+ }
8075
+ }, /*#__PURE__*/ React__default.createElement(AnimationDataWrapper, {
8076
+ renderFunction: renderFuction,
8077
+ eventId: "VUMeterSignal"
8078
+ }, /*#__PURE__*/ React__default.createElement(Chart, {
8079
+ chartType: Chart.chartType.bar,
8080
+ renderAs: Chart.renderAs.canvas,
7918
8081
  width: width,
7919
8082
  height: height,
7920
- stackedChartColors: colors
7921
- });
8083
+ yScaleDomain: yScaleDomain,
8084
+ id: id
8085
+ })))));
7922
8086
  }
7923
8087
 
7924
8088
  function InputModTab$1() {
@@ -7934,21 +8098,41 @@ function InputModTab$1() {
7934
8098
  width: Box.width.auto,
7935
8099
  padding: [
7936
8100
  Box.padding.medium
7937
- ]
8101
+ ],
8102
+ gap: Box.gap.mediumLarge
7938
8103
  }, /*#__PURE__*/ React__default.createElement(Slider, {
7939
8104
  id: "inputLevel",
7940
- label: "Input level"
8105
+ label: "Inputlevel"
8106
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
8107
+ id: "gate_threshold",
8108
+ label: "gate_threshold"
8109
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
8110
+ id: "gate_hold",
8111
+ label: "gate_hold"
8112
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
8113
+ id: "envFollowAttack",
8114
+ label: "envFollowAttack"
8115
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
8116
+ id: "envFollowRelease",
8117
+ label: "envFollowRelease"
8118
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
8119
+ id: "envFollowLevel",
8120
+ label: "envFollowLevel"
8121
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
8122
+ id: "inputSource",
8123
+ label: "inputSource"
8124
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
8125
+ id: "inputLRM",
8126
+ label: "inputLRM"
7941
8127
  })), /*#__PURE__*/ React__default.createElement(Box, {
7942
8128
  width: Box.width.auto,
7943
8129
  padding: [
7944
8130
  Box.padding.medium
7945
8131
  ]
7946
8132
  }, /*#__PURE__*/ React__default.createElement(VUMeter, {
7947
- width: 15,
7948
- height: 100
7949
- }), /*#__PURE__*/ React__default.createElement(VUMeter, {
7950
- width: 15,
7951
- height: 100
8133
+ width: 50,
8134
+ height: 125,
8135
+ id: "VUMeter"
7952
8136
  })));
7953
8137
  }
7954
8138