Particle Accelerator Console TGUI update (#26949)

* initial version

* particle sprite sheet

* starting to make a grid

* still can't figure out grids

* Adds the grid. Still need to figure out tooltips

* Sorted everything

* oops

* remove redundant particle accelerator asset file

* Rebuild Tgui

* Rebuild TGUI

* Rebuild TGUI

* rebuild TGUI

* tgui rebuild

* rebuild tgui

* Rebuild TGUI

* rebuild TGUI

* Rebuild TGUI

* Rebuild tgui

* Remove redundant newlines and clean up the UI

* tgui rebuild

* rebuild TGUI

* Rebuild TGUI

* TGUI rebuild

* Capitalizes first letter in the title of the layout part of the interface

* Uses the capitalize function instead of implementing capitalization inline

* Clean and rebuild TGUI

* Update tgui.bundle.js

* Update tgui.bundle.js

* Update tgui.bundle.js

* Properly mirrors the interface when pointing south or west

* Adds part names to the interface

* No longer displays the layout when the EM acceleration chamber is missing

* Clean and Rebuild TGUI

* Puts the grid and table into components and makes the layout disappear when the PA is fully assembled

* Update tgui.bundle.js

* Adds some comments and moves the column/row order reversal to the UI. Also makes the UI a bit more compact

* Update tgui.bundle.js

* Uses spans and </br> to separate the tooltip into lines
This commit is contained in:
Migratingcocofruit
2024-11-27 01:05:02 +02:00
committed by GitHub
parent 95c60f6a94
commit d1cfe46055
6 changed files with 406 additions and 97 deletions
@@ -1,3 +1,12 @@
#define PARTICLE_LEFT 1
#define PARTICLE_CENTER 2
#define PARTICLE_RIGHT 3
#define EMITTER 1
#define POWER_BOX 2
#define FUEL_CHAMBER 3
#define END_CAP 4
/obj/machinery/particle_accelerator/control_box
name = "Particle Accelerator Control Console"
desc = "This part controls the density of the particles."
@@ -18,6 +27,13 @@
var/assembled = 0
var/parts = null
var/datum/wires/particle_acc/control_box/wires = null
/// Layout of the particle accelerator. Used by the UI
var/list/layout = list(
list(list("name" = "EM Containment Grid Left", "icon_state" = "emitter_right", "status" = "", "dir" = "1"), list("name" = "Blank1", "icon_state" = "blank", "status" = "good", "dir" = "1"), list("name" = "Blank2", "icon_state" = "blank", "status" = "good", "dir" = "1"), list("name" = "Blank3", "icon_state" = "blank", "status" = "good", "dir" = "1")),
list(list("name" = "EM Containment Grid Center", "icon_state" = "emitter_center", "status" = "", "dir" = "1"), list("name" = "Particle Focusing EM Lens", "icon_state" = "power_box", "status" = "", "dir" = "1"), list("name" = "EM Acceleration Chamber", "icon_state" = "fuel_chamber", "status" = "", "dir" = "1"), list("name" = "Alpha Particle Generation Array", "icon_state" = "end_cap", "status" = "", "dir" = "1")),
list(list("name" = "EM Containment Grid Right", "icon_state" = "emitter_left", "status" = "", "dir" = "1"), list("name" = "Blank4", "icon_state" = "blank", "status" = "good", "dir" = "1"), list("name" = "Blank5", "icon_state" = "blank", "status" = "good", "dir" = "1"), list("name" = "Blank6", "icon_state" = "blank", "status" = "good", "dir" = "1")))
/// The expected orientation of the accelerator this is trying to link. In text form so the UI can use it
var/dir_text
/obj/machinery/particle_accelerator/control_box/Initialize(mapload)
. = ..()
@@ -146,34 +162,47 @@
/obj/machinery/particle_accelerator/control_box/proc/part_scan()
dir_text = null
var/turf/T
for(var/obj/structure/particle_accelerator/fuel_chamber/F in orange(1,src))
dir = F.dir
T = F.loc
if(!T)
return 0
dir_text = dir2text(dir) // Only set dir_text if we found an EM acceleration chamber
connected_parts = list()
var/tally = 0
var/ldir = turn(dir,-90)
var/rdir = turn(dir,90)
var/odir = turn(dir,180)
var/turf/T = loc
T = get_step(T,rdir)
if(check_part(T,/obj/structure/particle_accelerator/fuel_chamber))
if(check_part(T,/obj/structure/particle_accelerator/fuel_chamber, PARTICLE_CENTER, FUEL_CHAMBER))
tally++
layout[PARTICLE_CENTER][FUEL_CHAMBER]["status"] = "good"
T = get_step(T,odir)
if(check_part(T,/obj/structure/particle_accelerator/end_cap))
if(check_part(T,/obj/structure/particle_accelerator/end_cap, PARTICLE_CENTER, END_CAP))
tally++
layout[PARTICLE_CENTER][END_CAP]["status"] = "good"
T = get_step(T,dir)
T = get_step(T,dir)
if(check_part(T,/obj/structure/particle_accelerator/power_box))
if(check_part(T,/obj/structure/particle_accelerator/power_box, PARTICLE_CENTER, POWER_BOX))
tally++
layout[PARTICLE_CENTER][POWER_BOX]["status"] = "good"
T = get_step(T,dir)
if(check_part(T,/obj/structure/particle_accelerator/particle_emitter/center))
if(check_part(T,/obj/structure/particle_accelerator/particle_emitter/center, PARTICLE_CENTER, EMITTER))
tally++
layout[PARTICLE_CENTER][EMITTER]["status"] = "good"
T = get_step(T,ldir)
if(check_part(T,/obj/structure/particle_accelerator/particle_emitter/left))
if(check_part(T,/obj/structure/particle_accelerator/particle_emitter/left, PARTICLE_LEFT, EMITTER))
tally++
layout[PARTICLE_LEFT][EMITTER]["status"] = "good"
T = get_step(T,rdir)
T = get_step(T,rdir)
if(check_part(T,/obj/structure/particle_accelerator/particle_emitter/right))
if(check_part(T,/obj/structure/particle_accelerator/particle_emitter/right, PARTICLE_RIGHT, EMITTER))
tally++
layout[PARTICLE_RIGHT][EMITTER]["status"] = "good"
if(tally >= 6)
assembled = 1
return 1
@@ -181,7 +210,7 @@
assembled = 0
return 0
/obj/machinery/particle_accelerator/control_box/proc/check_part(turf/T, type)
/obj/machinery/particle_accelerator/control_box/proc/check_part(turf/T, type, column, row)
if(!(T)||!(type))
return 0
var/obj/structure/particle_accelerator/PA = locate(/obj/structure/particle_accelerator) in T
@@ -190,6 +219,16 @@
if(PA.report_ready(src))
connected_parts.Add(PA)
return 1
else if(PA)
layout[column][row]["status"] = "Incomplete"
else if(PA)
layout[column][row]["status"] = "Wrong Orientation"
layout[column][row]["dir"] = PA.dir
layout[column][row]["icon_state"] = PA.icon_state
else
layout[column][row]["status"] = "Not In Position"
return 0
/obj/machinery/particle_accelerator/control_box/proc/toggle_power()
@@ -224,10 +263,30 @@
/obj/machinery/particle_accelerator/control_box/ui_data(mob/user)
var/list/data = list()
var/list/ui_col_1 = list()
var/list/ui_col_2 = list()
var/list/ui_col_3 = list()
if(dir == NORTH || dir == WEST)
ui_col_1 = layout[PARTICLE_RIGHT]
ui_col_2 = layout[PARTICLE_CENTER]
ui_col_3 = layout[PARTICLE_LEFT]
else // If we are pointing east or south we need to reverse the order of the lists
var/len = length(layout[PARTICLE_CENTER])
for(var/i in 0 to (len - 1))
ui_col_1.Add(list(layout[PARTICLE_RIGHT][len - i]))
ui_col_2.Add(list(layout[PARTICLE_CENTER][len - i]))
ui_col_3.Add(list(layout[PARTICLE_LEFT][len - i]))
data["assembled"] = assembled
data["power"] = active
data["strength"] = strength
data["max_strength"] = strength_upper_limit
// If we are pointing east or south we need to reverse the order of the columns/rows
data["layout_1"] = ui_col_1
data["layout_2"] = ui_col_2
data["layout_3"] = ui_col_3
data["orientation"] = dir_text ? dir_text : FALSE
data["icon"] = icon
return data
/obj/machinery/particle_accelerator/control_box/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
@@ -260,3 +319,11 @@
if(.)
update_icon()
#undef PARTICLE_LEFT
#undef PARTICLE_CENTER
#undef PARTICLE_RIGHT
#undef EMITTER
#undef POWER_BOX
#undef FUEL_CHAMBER
#undef END_CAP
Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 112 KiB

@@ -46,6 +46,8 @@ type Props = Partial<{
dmIcon: string | null;
/** Parameter `icon_state` of component `DmIcon`. */
dmIconState: string | null;
/** Parameter `direction` of component `DmIcon`. */
dmDirection: number | null;
/**
* Changes the layout of the button, making it fill the entire horizontally available space.
* Allows the use of `title`
@@ -81,6 +83,7 @@ export const ImageButton = (props: Props) => {
color,
disabled,
dmFallback,
dmDirection,
dmIcon,
dmIconState,
fluid,
@@ -141,6 +144,7 @@ export const ImageButton = (props: Props) => {
<DmIcon
icon={dmIcon}
icon_state={dmIconState}
direction={dmDirection}
fallback={dmFallback ? dmFallback : getFallback('spinner', true)}
height={`${imageSize}px`}
width={`${imageSize}px`}
@@ -1,16 +1,55 @@
import { useBackend } from '../backend';
import { Box, Button, LabeledList, Section } from '../components';
import {
Box,
Button,
Grid,
LabeledList,
Section,
Stack,
ImageButton,
Flex,
Table,
Tooltip,
DmIcon,
} from '../components';
import { capitalize } from 'common/string';
import { GridColumn } from '../components/Grid';
import { TableRow } from '../components/Table';
import { Window } from '../layouts';
import { classes } from 'common/react';
import { StationAlertConsole } from './StationAlertConsole';
const dir2text = (dir) => {
switch (dir) {
case 1.0:
return 'north';
case 2.0:
return 'south';
case 4.0:
return 'east';
case 8.0:
return 'west';
case 5.0:
return 'northeast';
case 6.0:
return 'southeast';
case 9.0:
return 'northwest';
case 10.0:
return 'southwest';
}
return '';
};
export const ParticleAccelerator = (props, context) => {
const { act, data } = useBackend(context);
const { assembled, power, strength, max_strength } = data;
const { assembled, power, strength, max_strength, icon, layout_1, layout_2, layout_3, orientation } = data;
return (
<Window width={350} height={160}>
<Window.Content>
<Window width={395} height={assembled ? 160 : orientation === 'north' || orientation === 'south' ? 540 : 465}>
<Window.Content scrollable>
<Section
title="Control Panel"
buttons={<Button icon={'sync'} content={'Connect'} onClick={() => act('scan')} />}
buttons={<Button dmIcon={'sync'} content={'Connect'} onClick={() => act('scan')} />}
>
<LabeledList>
<LabeledList.Item label="Status" mb="5px">
@@ -42,7 +81,206 @@ export const ParticleAccelerator = (props, context) => {
</LabeledList.Item>
</LabeledList>
</Section>
{assembled ? (
''
) : (
<Section
title={
orientation
? 'EM Acceleration Chamber Orientation: ' + capitalize(orientation)
: 'Place EM Acceleration Chamber Next To Console'
}
>
{orientation === 0 ? (
''
) : orientation === 'north' || orientation === 'south' ? (
<LayoutVertical />
) : (
<LayoutHorizontal />
)}
</Section>
)}
</Window.Content>
</Window>
);
};
const LayoutHorizontal = (props, context) => {
const { act, data } = useBackend(context);
const { assembled, power, strength, max_strength, icon, layout_1, layout_2, layout_3, orientation } = data;
return (
<Table>
<TableRow width="40px">
{(orientation === 'east' ? layout_1 : layout_3).slice().map((item) => (
<Table.Cell key={item.name}>
<Tooltip
content={
<span style={{ wordWrap: 'break-word' }}>
{item.name} <br /> {`Status: ${item.status}`}
<br />
{`Direction: ${dir2text(item.dir)}`}
</span>
}
>
<ImageButton
dmIcon={icon}
dmIconState={item.icon_state}
dmDirection={item.dir}
style={{
'border-style': 'solid',
'border-width': '2px',
'border-color': item.status === 'good' ? 'green' : item.status === 'Incomplete' ? 'orange' : 'red',
padding: '2px',
}}
/>
</Tooltip>
</Table.Cell>
))}
</TableRow>
<TableRow width="40px">
{layout_2.slice().map((item) => (
<Table.Cell key={item.name}>
<Tooltip
content={
<span style={{ wordWrap: 'break-word' }}>
{item.name} <br /> {`Status: ${item.status}`}
<br />
{`Direction: ${dir2text(item.dir)}`}
</span>
}
>
<ImageButton
dmIcon={icon}
dmIconState={item.icon_state}
dmDirection={item.dir}
style={{
'border-style': 'solid',
'border-width': '2px',
'border-color': item.status === 'good' ? 'green' : item.status === 'Incomplete' ? 'orange' : 'red',
padding: '2px',
}}
/>
</Tooltip>
</Table.Cell>
))}
</TableRow>
<TableRow width="40px">
{(orientation === 'east' ? layout_3 : layout_1).slice().map((item) => (
<Table.Cell key={item.name}>
<Tooltip
content={
<span style={{ wordWrap: 'break-word' }}>
{item.name} <br /> {`Status: ${item.status}`}
<br />
{`Direction: ${dir2text(item.dir)}`}
</span>
}
>
<ImageButton
dmIcon={icon}
dmIconState={item.icon_state}
dmDirection={item.dir}
style={{
'border-style': 'solid',
'border-width': '2px',
'border-color': item.status === 'good' ? 'green' : item.status === 'Incomplete' ? 'orange' : 'red',
padding: '2px',
}}
/>
</Tooltip>
</Table.Cell>
))}
</TableRow>
</Table>
);
};
const LayoutVertical = (props, context) => {
const { act, data } = useBackend(context);
const { assembled, power, strength, max_strength, icon, layout_1, layout_2, layout_3, orientation } = data;
return (
<Grid>
<GridColumn width="40px">
{(orientation === 'north' ? layout_1 : layout_3).slice().map((item) => (
<Stack.Item grow key={item.name}>
<Tooltip
content={
<span style={{ wordWrap: 'break-word' }}>
{item.name} <br /> {`Status: ${item.status}`}
<br />
{`Direction: ${dir2text(item.dir)}`}
</span>
}
>
<ImageButton
dmIcon={icon}
dmIconState={item.icon_state}
dmDirection={item.dir}
style={{
'border-style': 'solid',
'border-width': '2px',
'border-color': item.status === 'good' ? 'green' : item.status === 'Incomplete' ? 'orange' : 'red',
padding: '2px',
}}
/>
</Tooltip>
</Stack.Item>
))}
</GridColumn>
<GridColumn>
{layout_2.slice().map((item) => (
<Stack.Item grow key={item.name}>
<Tooltip
content={
<span style={{ wordWrap: 'break-word' }}>
{item.name} <br /> {`Status: ${item.status}`}
<br />
{`Direction: ${dir2text(item.dir)}`}
</span>
}
>
<ImageButton
dmIcon={icon}
dmIconState={item.icon_state}
dmDirection={item.dir}
style={{
'border-style': 'solid',
'border-width': '2px',
'border-color': item.status === 'good' ? 'green' : item.status === 'Incomplete' ? 'orange' : 'red',
padding: '2px',
}}
/>
</Tooltip>
</Stack.Item>
))}
</GridColumn>
<GridColumn width="40px">
{(orientation === 'north' ? layout_3 : layout_1).slice().map((item) => (
<Stack.Item grow key={item.name} tooltip={item.status}>
<Tooltip
content={
<span style={{ wordWrap: 'break-word' }}>
{item.name} <br /> {`Status: ${item.status}`}
<br />
{`Direction: ${dir2text(item.dir)}`}
</span>
}
>
<ImageButton
dmIcon={icon}
dmIconState={item.icon_state}
dmDirection={item.dir}
style={{
'border-style': 'solid',
'border-width': '2px',
'border-color': item.status === 'good' ? 'green' : item.status === 'Incomplete' ? 'orange' : 'red',
padding: '2px',
}}
/>
</Tooltip>
</Stack.Item>
))}
</GridColumn>
</Grid>
);
};
+2 -2
View File
@@ -300,11 +300,11 @@
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/function u(i,d){if(i==null)return{};var c={};for(var g in i)if({}.hasOwnProperty.call(i,g)){if(d.includes(g))continue;c[g]=i[g]}return c}var l=/-o$/,p=e.Icon=function(){function i(d){var c=d.name,g=d.size,v=d.spin,h=d.className,m=d.style,E=m===void 0?{}:m,I=d.rotation,O=d.inverse,C=u(d,a);g&&(E["font-size"]=g*100+"%"),typeof I=="number"&&(E.transform="rotate("+I+"deg)");var S=l.test(c),T=c.replace(l,"");return(0,n.normalizeProps)((0,n.createComponentVNode)(2,o.Box,Object.assign({as:"i",className:(0,r.classes)(["Icon",h,S?"far":"fas","fa-"+T,v&&"fa-spin"]),style:E},C)))}return i}();p.defaultHooks=r.pureComponentHooks;var f=e.IconStack=function(){function i(d){var c=d.className,g=d.style,v=g===void 0?{}:g,h=d.children,m=u(d,s);return(0,n.normalizeProps)((0,n.createComponentVNode)(2,o.Box,Object.assign({as:"span",class:(0,r.classes)(["IconStack",c]),style:v},m,{children:h})))}return i}();p.Stack=f},91225:function(y,e,t){"use strict";e.__esModule=!0,e.Image=void 0;var n=t(89005),r=t(55937),o=["fixBlur","fixErrors","objectFit","src"];function a(f,i){if(f==null)return{};var d={};for(var c in f)if({}.hasOwnProperty.call(f,c)){if(i.includes(c))continue;d[c]=f[c]}return d}function s(f,i){f.prototype=Object.create(i.prototype),f.prototype.constructor=f,u(f,i)}function u(f,i){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,c){return d.__proto__=c,d},u(f,i)}var l=5,p=e.Image=function(f){function i(){for(var c,g=arguments.length,v=new Array(g),h=0;h<g;h++)v[h]=arguments[h];return c=f.call.apply(f,[this].concat(v))||this,c.attempts=0,c.handleError=function(m){var E=c.props,I=E.fixErrors,O=E.src;if(I&&c.attempts<l){var C=m.currentTarget;setTimeout(function(){C.src=O+"?attempt="+c.attempts,c.attempts++},1e3)}},c}s(i,f);var d=i.prototype;return d.render=function(){function c(){var g=this.props,v=g.fixBlur,h=v===void 0?!0:v,m=g.fixErrors,E=m===void 0?!1:m,I=g.objectFit,O=I===void 0?"fill":I,C=g.src,S=a(g,o),T=(0,r.computeBoxProps)(Object.assign({style:{"-ms-interpolation-mode":h?"nearest-neighbor":"auto","image-rendering":h?"pixelated":"auto","object-fit":""+O}},S));return T.className?(0,n.normalizeProps)((0,n.createVNode)(1,"div",null,null,1,Object.assign({onError:this.handleError},T))):(0,n.normalizeProps)((0,n.createVNode)(1,"img",null,null,1,Object.assign({onError:this.handleError,src:C},T)))}return c}(),i}(n.Component)},79825:function(y,e,t){"use strict";e.__esModule=!0,e.ImageButton=void 0;var n=t(89005),r=t(35840),o=t(55937),a=t(1331),s=t(91225),u=t(60218),l=t(96690),p=t(62147),f=["asset","base64","buttons","buttonsAlt","children","className","color","disabled","dmFallback","dmIcon","dmIconState","fluid","imageSize","imageSrc","onClick","onRightClick","selected","title","tooltip","tooltipPosition"];/**
*/function u(i,d){if(i==null)return{};var c={};for(var g in i)if({}.hasOwnProperty.call(i,g)){if(d.includes(g))continue;c[g]=i[g]}return c}var l=/-o$/,p=e.Icon=function(){function i(d){var c=d.name,g=d.size,v=d.spin,h=d.className,m=d.style,E=m===void 0?{}:m,I=d.rotation,O=d.inverse,C=u(d,a);g&&(E["font-size"]=g*100+"%"),typeof I=="number"&&(E.transform="rotate("+I+"deg)");var S=l.test(c),T=c.replace(l,"");return(0,n.normalizeProps)((0,n.createComponentVNode)(2,o.Box,Object.assign({as:"i",className:(0,r.classes)(["Icon",h,S?"far":"fas","fa-"+T,v&&"fa-spin"]),style:E},C)))}return i}();p.defaultHooks=r.pureComponentHooks;var f=e.IconStack=function(){function i(d){var c=d.className,g=d.style,v=g===void 0?{}:g,h=d.children,m=u(d,s);return(0,n.normalizeProps)((0,n.createComponentVNode)(2,o.Box,Object.assign({as:"span",class:(0,r.classes)(["IconStack",c]),style:v},m,{children:h})))}return i}();p.Stack=f},91225:function(y,e,t){"use strict";e.__esModule=!0,e.Image=void 0;var n=t(89005),r=t(55937),o=["fixBlur","fixErrors","objectFit","src"];function a(f,i){if(f==null)return{};var d={};for(var c in f)if({}.hasOwnProperty.call(f,c)){if(i.includes(c))continue;d[c]=f[c]}return d}function s(f,i){f.prototype=Object.create(i.prototype),f.prototype.constructor=f,u(f,i)}function u(f,i){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,c){return d.__proto__=c,d},u(f,i)}var l=5,p=e.Image=function(f){function i(){for(var c,g=arguments.length,v=new Array(g),h=0;h<g;h++)v[h]=arguments[h];return c=f.call.apply(f,[this].concat(v))||this,c.attempts=0,c.handleError=function(m){var E=c.props,I=E.fixErrors,O=E.src;if(I&&c.attempts<l){var C=m.currentTarget;setTimeout(function(){C.src=O+"?attempt="+c.attempts,c.attempts++},1e3)}},c}s(i,f);var d=i.prototype;return d.render=function(){function c(){var g=this.props,v=g.fixBlur,h=v===void 0?!0:v,m=g.fixErrors,E=m===void 0?!1:m,I=g.objectFit,O=I===void 0?"fill":I,C=g.src,S=a(g,o),T=(0,r.computeBoxProps)(Object.assign({style:{"-ms-interpolation-mode":h?"nearest-neighbor":"auto","image-rendering":h?"pixelated":"auto","object-fit":""+O}},S));return T.className?(0,n.normalizeProps)((0,n.createVNode)(1,"div",null,null,1,Object.assign({onError:this.handleError},T))):(0,n.normalizeProps)((0,n.createVNode)(1,"img",null,null,1,Object.assign({onError:this.handleError,src:C},T)))}return c}(),i}(n.Component)},79825:function(y,e,t){"use strict";e.__esModule=!0,e.ImageButton=void 0;var n=t(89005),r=t(35840),o=t(55937),a=t(1331),s=t(91225),u=t(60218),l=t(96690),p=t(62147),f=["asset","base64","buttons","buttonsAlt","children","className","color","disabled","dmFallback","dmDirection","dmIcon","dmIconState","fluid","imageSize","imageSrc","onClick","onRightClick","selected","title","tooltip","tooltipPosition"];/**
* @file
* @copyright 2024 Aylong (https://github.com/AyIong)
* @license MIT
*/function i(c,g){if(c==null)return{};var v={};for(var h in c)if({}.hasOwnProperty.call(c,h)){if(g.includes(h))continue;v[h]=c[h]}return v}var d=e.ImageButton=function(){function c(g){var v=g.asset,h=g.base64,m=g.buttons,E=g.buttonsAlt,I=g.children,O=g.className,C=g.color,S=g.disabled,T=g.dmFallback,b=g.dmIcon,A=g.dmIconState,P=g.fluid,M=g.imageSize,w=M===void 0?64:M,V=g.imageSrc,U=g.onClick,j=g.onRightClick,G=g.selected,$=g.title,x=g.tooltip,B=g.tooltipPosition,F=i(g,f),H=function(){function W(q,ut){return(0,n.createComponentVNode)(2,l.Stack,{height:w+"px",width:w+"px",children:(0,n.createComponentVNode)(2,l.Stack.Item,{grow:!0,textAlign:"center",align:"center",children:(0,n.createComponentVNode)(2,a.Icon,{spin:ut,name:q,color:"gray",style:{"font-size":"calc("+w+"px * 0.75)"}})})})}return W}(),K=(0,n.createVNode)(1,"div",(0,r.classes)(["container",m&&"hasButtons",!U&&!j&&"noAction",G&&"selected",S&&"disabled",C&&typeof C=="string"?"color__"+C:"color__default"]),[(0,n.createVNode)(1,"div",(0,r.classes)(["image"]),h||v||V?(0,n.createComponentVNode)(2,s.Image,{className:(0,r.classes)(!h&&!V&&v||[]),src:h?"data:image/jpeg;base64,"+h:V,height:w+"px",width:w+"px"}):b&&A?(0,n.createComponentVNode)(2,u.DmIcon,{icon:b,icon_state:A,fallback:T||H("spinner",!0),height:w+"px",width:w+"px"}):H("question",!1),0),P?(0,n.createVNode)(1,"div",(0,r.classes)(["info"]),[$&&(0,n.createVNode)(1,"span",(0,r.classes)(["title",I&&"divider"]),$,0),I&&(0,n.createVNode)(1,"span",(0,r.classes)(["contentFluid"]),I,0)],0):I&&(0,n.createVNode)(1,"span",(0,r.classes)(["content",G&&"contentSelected",S&&"contentDisabled",C&&typeof C=="string"?"contentColor__"+C:"contentColor__default"]),I,0)],0,{tabIndex:S?void 0:0,onClick:function(){function W(q){!S&&U&&U(q)}return W}(),onContextMenu:function(){function W(q){q.preventDefault(),!S&&j&&j(q)}return W}(),style:{width:P?"auto":"calc("+w+"px + 0.5em + 2px)"}});return x&&(K=(0,n.createComponentVNode)(2,p.Tooltip,{content:x,position:B,children:K})),(0,n.normalizeProps)((0,n.createVNode)(1,"div",(0,r.classes)(["ImageButton",P&&"fluid",O]),[K,m&&(0,n.createVNode)(1,"div",(0,r.classes)(["buttonsContainer",!I&&"buttonsEmpty",P&&C&&typeof C=="string"?"buttonsContainerColor__"+C:P&&"buttonsContainerColor__default"]),m,0,{style:{width:"auto"}}),E&&(0,n.createVNode)(1,"div",(0,r.classes)(["buttonsContainer","buttonsAltContainer",!I&&"buttonsEmpty",P&&C&&typeof C=="string"?"buttonsContainerColor__"+C:P&&"buttonsContainerColor__default"]),E,0,{style:{width:"calc("+w+"px + "+(P?0:.5)+"em)","max-width":!P&&"calc("+w+"px + 0.5em)"}})],0,Object.assign({},(0,o.computeBoxProps)(F))))}return c}()},79652:function(y,e,t){"use strict";e.__esModule=!0,e.toInputValue=e.Input=void 0;var n=t(89005),r=t(35840),o=t(55937),a=t(92986),s=["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus","disabled","multiline","cols","rows"],u=["className","fluid","monospace"];function l(c,g){if(c==null)return{};var v={};for(var h in c)if({}.hasOwnProperty.call(c,h)){if(g.includes(h))continue;v[h]=c[h]}return v}function p(c,g){c.prototype=Object.create(g.prototype),c.prototype.constructor=c,f(c,g)}function f(c,g){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,h){return v.__proto__=h,v},f(c,g)}/**
*/function i(c,g){if(c==null)return{};var v={};for(var h in c)if({}.hasOwnProperty.call(c,h)){if(g.includes(h))continue;v[h]=c[h]}return v}var d=e.ImageButton=function(){function c(g){var v=g.asset,h=g.base64,m=g.buttons,E=g.buttonsAlt,I=g.children,O=g.className,C=g.color,S=g.disabled,T=g.dmFallback,b=g.dmDirection,A=g.dmIcon,P=g.dmIconState,M=g.fluid,w=g.imageSize,V=w===void 0?64:w,U=g.imageSrc,j=g.onClick,G=g.onRightClick,$=g.selected,x=g.title,B=g.tooltip,F=g.tooltipPosition,H=i(g,f),K=function(){function q(ut,ct){return(0,n.createComponentVNode)(2,l.Stack,{height:V+"px",width:V+"px",children:(0,n.createComponentVNode)(2,l.Stack.Item,{grow:!0,textAlign:"center",align:"center",children:(0,n.createComponentVNode)(2,a.Icon,{spin:ct,name:ut,color:"gray",style:{"font-size":"calc("+V+"px * 0.75)"}})})})}return q}(),W=(0,n.createVNode)(1,"div",(0,r.classes)(["container",m&&"hasButtons",!j&&!G&&"noAction",$&&"selected",S&&"disabled",C&&typeof C=="string"?"color__"+C:"color__default"]),[(0,n.createVNode)(1,"div",(0,r.classes)(["image"]),h||v||U?(0,n.createComponentVNode)(2,s.Image,{className:(0,r.classes)(!h&&!U&&v||[]),src:h?"data:image/jpeg;base64,"+h:U,height:V+"px",width:V+"px"}):A&&P?(0,n.createComponentVNode)(2,u.DmIcon,{icon:A,icon_state:P,direction:b,fallback:T||K("spinner",!0),height:V+"px",width:V+"px"}):K("question",!1),0),M?(0,n.createVNode)(1,"div",(0,r.classes)(["info"]),[x&&(0,n.createVNode)(1,"span",(0,r.classes)(["title",I&&"divider"]),x,0),I&&(0,n.createVNode)(1,"span",(0,r.classes)(["contentFluid"]),I,0)],0):I&&(0,n.createVNode)(1,"span",(0,r.classes)(["content",$&&"contentSelected",S&&"contentDisabled",C&&typeof C=="string"?"contentColor__"+C:"contentColor__default"]),I,0)],0,{tabIndex:S?void 0:0,onClick:function(){function q(ut){!S&&j&&j(ut)}return q}(),onContextMenu:function(){function q(ut){ut.preventDefault(),!S&&G&&G(ut)}return q}(),style:{width:M?"auto":"calc("+V+"px + 0.5em + 2px)"}});return B&&(W=(0,n.createComponentVNode)(2,p.Tooltip,{content:B,position:F,children:W})),(0,n.normalizeProps)((0,n.createVNode)(1,"div",(0,r.classes)(["ImageButton",M&&"fluid",O]),[W,m&&(0,n.createVNode)(1,"div",(0,r.classes)(["buttonsContainer",!I&&"buttonsEmpty",M&&C&&typeof C=="string"?"buttonsContainerColor__"+C:M&&"buttonsContainerColor__default"]),m,0,{style:{width:"auto"}}),E&&(0,n.createVNode)(1,"div",(0,r.classes)(["buttonsContainer","buttonsAltContainer",!I&&"buttonsEmpty",M&&C&&typeof C=="string"?"buttonsContainerColor__"+C:M&&"buttonsContainerColor__default"]),E,0,{style:{width:"calc("+V+"px + "+(M?0:.5)+"em)","max-width":!M&&"calc("+V+"px + 0.5em)"}})],0,Object.assign({},(0,o.computeBoxProps)(H))))}return c}()},79652:function(y,e,t){"use strict";e.__esModule=!0,e.toInputValue=e.Input=void 0;var n=t(89005),r=t(35840),o=t(55937),a=t(92986),s=["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus","disabled","multiline","cols","rows"],u=["className","fluid","monospace"];function l(c,g){if(c==null)return{};var v={};for(var h in c)if({}.hasOwnProperty.call(c,h)){if(g.includes(h))continue;v[h]=c[h]}return v}function p(c,g){c.prototype=Object.create(g.prototype),c.prototype.constructor=c,f(c,g)}function f(c,g){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,h){return v.__proto__=h,v},f(c,g)}/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
File diff suppressed because one or more lines are too long