@thestatic-tv/dcl-sdk 2.12.0 → 2.14.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.
package/dist/index.mjs CHANGED
@@ -1272,7 +1272,7 @@ async function signedRequest(url, init = {}) {
1272
1272
  }
1273
1273
 
1274
1274
  // src/ui/guide-ui.tsx
1275
- import ReactEcs3, { UiEntity as UiEntity3, Input as Input2, Label as Label2 } from "@dcl/sdk/react-ecs";
1275
+ import ReactEcs2, { UiEntity as UiEntity2, Input as Input2, Label as Label2 } from "@dcl/sdk/react-ecs";
1276
1276
  import { Color4 as Color43 } from "@dcl/sdk/math";
1277
1277
  import { openExternalUrl as openExternalUrl2 } from "~system/RestrictedActions";
1278
1278
 
@@ -1515,105 +1515,8 @@ function truncateText(text, maxLength) {
1515
1515
  return text.substring(0, maxLength - 3) + "...";
1516
1516
  }
1517
1517
 
1518
- // src/ui/toolbar-button.ts
1519
- import ReactEcs2, { UiEntity as UiEntity2 } from "@dcl/sdk/react-ecs";
1520
-
1521
- // src/ui/toolbar.ts
1522
- var TOOLBAR = { edge: 20, gap: 10, buttonWidth: 100, buttonHeight: 45, bottom: 10 };
1523
- var COLUMN_SLOTS = 5;
1524
- function platformOf(answer) {
1525
- const raw = answer?.platform;
1526
- if (typeof raw !== "string") return "unknown";
1527
- const p = raw.trim().toLowerCase();
1528
- return p === "desktop" || p === "mobile" || p === "vr" || p === "web" ? p : "unknown";
1529
- }
1530
- function isPhonePlatform(platform) {
1531
- return platform === "mobile";
1532
- }
1533
- var scaled = (value, uiScale) => Math.round(value * uiScale);
1534
- function rowRight(slot, uiScale = 1) {
1535
- return TOOLBAR.edge + slot * (scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap);
1536
- }
1537
- function columnSlot(slot, uiScale = 1) {
1538
- const h = scaled(TOOLBAR.buttonHeight, uiScale);
1539
- return {
1540
- right: TOOLBAR.edge,
1541
- boxHeight: COLUMN_SLOTS * h + (COLUMN_SLOTS - 1) * TOOLBAR.gap,
1542
- above: Math.max(0, slot) * (h + TOOLBAR.gap)
1543
- };
1544
- }
1545
- function panelRight(phone, desktopRight, uiScale = 1) {
1546
- return phone ? TOOLBAR.edge + scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap : desktopRight;
1547
- }
1548
- var DESKTOP_CLOSES = { guide: ["admin"], admin: ["guide"] };
1549
- function panelsToClose(opened, registered, phone) {
1550
- if (phone) return registered.filter((name) => name !== opened);
1551
- const closes = DESKTOP_CLOSES[opened] ?? [];
1552
- return registered.filter((name) => closes.includes(name));
1553
- }
1554
- var PanelRules = class {
1555
- constructor(phone) {
1556
- this.hides = /* @__PURE__ */ new Map();
1557
- this.phone = phone;
1558
- }
1559
- /** Register (or replace) a panel; its hide runs when another panel opens and the rule says so */
1560
- register(name, hide) {
1561
- this.hides.set(name, hide);
1562
- }
1563
- /** A panel opened: close the ones the rule names. One failing hide does not stop the rest. */
1564
- opened(name) {
1565
- for (const other of panelsToClose(name, [...this.hides.keys()], this.phone())) {
1566
- try {
1567
- this.hides.get(other)?.();
1568
- } catch {
1569
- }
1570
- }
1571
- }
1572
- get names() {
1573
- return [...this.hides.keys()];
1574
- }
1575
- };
1576
-
1577
- // src/ui/toolbar-button.ts
1578
- function toolbarButton(slot, props, phone, uiScale = 1) {
1579
- const width = Math.round(TOOLBAR.buttonWidth * uiScale);
1580
- const height = Math.round(TOOLBAR.buttonHeight * uiScale);
1581
- if (!phone) {
1582
- return ReactEcs2.createElement(UiEntity2, {
1583
- ...props,
1584
- uiTransform: {
1585
- positionType: "absolute",
1586
- position: { right: rowRight(slot, uiScale), bottom: TOOLBAR.bottom },
1587
- width,
1588
- height,
1589
- ...props.uiTransform
1590
- }
1591
- });
1592
- }
1593
- const place = columnSlot(slot, uiScale);
1594
- return ReactEcs2.createElement(UiEntity2, {
1595
- uiTransform: {
1596
- positionType: "absolute",
1597
- position: { right: place.right, top: 0 },
1598
- width,
1599
- height: "100%",
1600
- flexDirection: "column",
1601
- justifyContent: "center"
1602
- },
1603
- children: [
1604
- ReactEcs2.createElement(UiEntity2, {
1605
- uiTransform: { width, height: place.boxHeight, flexDirection: "column", flexShrink: 0 },
1606
- children: [
1607
- ReactEcs2.createElement(UiEntity2, { uiTransform: { width, height: place.above, flexShrink: 0 } }),
1608
- ReactEcs2.createElement(UiEntity2, {
1609
- ...props,
1610
- uiTransform: { width, height, flexShrink: 0, ...props.uiTransform }
1611
- })
1612
- ]
1613
- })
1614
- ]
1615
- });
1616
- }
1518
+ // src/version.ts
1519
+ var SDK_VERSION = true ? "2.14.0" : "unknown";
1617
1520
 
1618
1521
  // src/ui/guide-ui.tsx
1619
1522
  function withLock(mapped, v, fallback) {
@@ -1650,7 +1553,7 @@ var GuideUIModule = class {
1650
1553
  if (this.client.isVisitorBlocked) return null;
1651
1554
  const windowW = UI_DIMENSIONS.guide.width;
1652
1555
  const windowH = UI_DIMENSIONS.guide.height;
1653
- return ReactEcs3.createElement(UiEntity3, {
1556
+ return ReactEcs2.createElement(UiEntity2, {
1654
1557
  key: `guide-root-${this.client.uiScale}`,
1655
1558
  uiTransform: {
1656
1559
  width: "100%",
@@ -1662,14 +1565,14 @@ var GuideUIModule = class {
1662
1565
  this.renderToggleButton(),
1663
1566
  // Render panel when visible - Guide positioned relative to Chat's scaled width
1664
1567
  // Guide.right = Chat.right + Chat.scaledWidth + gap (10px)
1665
- this._isVisible ? ReactEcs3.createElement(UiEntity3, {
1568
+ // On a phone centered beside the toolbar's column (2.13.0, src/ui/toolbar-panel.ts); elsewhere as here
1569
+ this._isVisible ? this.client.toolbarPanel({
1666
1570
  key: `guide-panel-${this.client.uiScale}`,
1667
1571
  uiTransform: {
1668
1572
  width: windowW,
1669
1573
  height: windowH,
1670
1574
  positionType: "absolute",
1671
- // On a phone, left of the toolbar's column (2.12.0); elsewhere left of the chat panel, as before
1672
- position: { bottom: UI_DIMENSIONS.guide.bottom, right: this.client.panelRight(UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10) },
1575
+ position: { bottom: UI_DIMENSIONS.guide.bottom, right: UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10 },
1673
1576
  flexDirection: "row",
1674
1577
  border: { top: 2, bottom: 2, left: 2, right: 2 },
1675
1578
  borderColor: THEME.colors.panelBorder
@@ -1879,7 +1782,7 @@ var GuideUIModule = class {
1879
1782
  const nodesPlaylist = this.featuredPlaylists.find((p) => p.name === "NODES");
1880
1783
  const nodesCount = nodesPlaylist ? nodesPlaylist.videos.filter((v) => v.isCreator).length : 0;
1881
1784
  const displayedPlaylists = this.featuredPlaylists.filter((p) => p.name !== "NODES").slice(0, 6);
1882
- return ReactEcs3.createElement(UiEntity3, {
1785
+ return ReactEcs2.createElement(UiEntity2, {
1883
1786
  uiTransform: {
1884
1787
  width: sidebarW,
1885
1788
  minWidth: sidebarW,
@@ -1893,11 +1796,11 @@ var GuideUIModule = class {
1893
1796
  uiBackground: { color: Color43.create(0, 0, 0, 0.4) },
1894
1797
  children: [
1895
1798
  // Header & Search
1896
- ReactEcs3.createElement(UiEntity3, {
1799
+ ReactEcs2.createElement(UiEntity2, {
1897
1800
  uiTransform: { width: "100%", flexDirection: "column", padding: 10 },
1898
1801
  children: [
1899
1802
  // Title row
1900
- ReactEcs3.createElement(UiEntity3, {
1803
+ ReactEcs2.createElement(UiEntity2, {
1901
1804
  uiTransform: {
1902
1805
  width: "100%",
1903
1806
  height: this.s(40),
@@ -1907,7 +1810,7 @@ var GuideUIModule = class {
1907
1810
  },
1908
1811
  children: [
1909
1812
  // Title
1910
- ReactEcs3.createElement(UiEntity3, {
1813
+ ReactEcs2.createElement(UiEntity2, {
1911
1814
  uiText: {
1912
1815
  value: "THE STATIC TV",
1913
1816
  fontSize: this.s(UI_DIMENSIONS.guide.sidebar.headerSize),
@@ -1918,7 +1821,7 @@ var GuideUIModule = class {
1918
1821
  ]
1919
1822
  }),
1920
1823
  // Random Signal button
1921
- ReactEcs3.createElement(UiEntity3, {
1824
+ ReactEcs2.createElement(UiEntity2, {
1922
1825
  uiTransform: {
1923
1826
  width: "100%",
1924
1827
  height: this.s(40),
@@ -1936,13 +1839,13 @@ var GuideUIModule = class {
1936
1839
  }
1937
1840
  },
1938
1841
  children: [
1939
- ReactEcs3.createElement(UiEntity3, {
1842
+ ReactEcs2.createElement(UiEntity2, {
1940
1843
  uiText: { value: ">> RANDOM SIGNAL <<", fontSize: this.s(14), color: THEME.colors.cyan }
1941
1844
  })
1942
1845
  ]
1943
1846
  }),
1944
1847
  // Search input
1945
- ReactEcs3.createElement(Input2, {
1848
+ ReactEcs2.createElement(Input2, {
1946
1849
  placeholder: "SCAN FREQ...",
1947
1850
  fontSize: this.s(UI_DIMENSIONS.guide.sidebar.fontSize),
1948
1851
  uiTransform: {
@@ -1962,11 +1865,11 @@ var GuideUIModule = class {
1962
1865
  ]
1963
1866
  }),
1964
1867
  // Menu items
1965
- ReactEcs3.createElement(UiEntity3, {
1868
+ ReactEcs2.createElement(UiEntity2, {
1966
1869
  uiTransform: { flexGrow: 1, flexDirection: "column", width: "100%", padding: { top: 5 } },
1967
1870
  children: [
1968
1871
  // Section header
1969
- ReactEcs3.createElement(UiEntity3, {
1872
+ ReactEcs2.createElement(UiEntity2, {
1970
1873
  uiTransform: { padding: { left: 10, bottom: 8, top: 5 } },
1971
1874
  uiText: { value: "GLOBAL NETWORK", fontSize: this.s(12), color: THEME.colors.cyan }
1972
1875
  }),
@@ -1975,12 +1878,12 @@ var GuideUIModule = class {
1975
1878
  this.renderMenuButton("SIGNALS", signalCount, THEME.colors.white, void 0, "VODS & RECORDINGS"),
1976
1879
  this.renderMenuButton("NODES", nodesCount, THEME.colors.magenta, void 0, "CHANNELS & CREATORS"),
1977
1880
  // Divider
1978
- ReactEcs3.createElement(UiEntity3, {
1881
+ ReactEcs2.createElement(UiEntity2, {
1979
1882
  uiTransform: { height: 1, width: "90%", margin: { top: 12, bottom: 8, left: 5 } },
1980
1883
  uiBackground: { color: THEME.colors.panelBorder }
1981
1884
  }),
1982
1885
  // Archives section
1983
- ReactEcs3.createElement(UiEntity3, {
1886
+ ReactEcs2.createElement(UiEntity2, {
1984
1887
  uiTransform: { padding: { left: 10, bottom: 8 } },
1985
1888
  uiText: { value: "ARCHIVES", fontSize: this.s(12), color: THEME.colors.cyan }
1986
1889
  }),
@@ -1989,6 +1892,11 @@ var GuideUIModule = class {
1989
1892
  (pl) => this.renderMenuButton(pl.name.toUpperCase(), pl.videos.length, THEME.colors.white, void 0, "PLAYLIST")
1990
1893
  )
1991
1894
  ]
1895
+ }),
1896
+ // The SDK's version, small and dim at the bottom, for a visitor reporting a problem (2.14.0)
1897
+ ReactEcs2.createElement(UiEntity2, {
1898
+ uiTransform: { width: "100%", flexShrink: 0, padding: { left: 10, bottom: 6, top: 4 } },
1899
+ uiText: { value: `TheStatic SDK ${SDK_VERSION}`, fontSize: this.s(11), color: THEME.colors.grayText, textAlign: "bottom-left" }
1992
1900
  })
1993
1901
  ]
1994
1902
  });
@@ -1996,7 +1904,7 @@ var GuideUIModule = class {
1996
1904
  renderMenuButton(label, count, color, badge, subtitle) {
1997
1905
  const isActive = this.activeTab === label;
1998
1906
  const buttonHeight = this.s(UI_DIMENSIONS.guide.sidebar.buttonHeight);
1999
- return ReactEcs3.createElement(UiEntity3, {
1907
+ return ReactEcs2.createElement(UiEntity2, {
2000
1908
  key: label,
2001
1909
  uiTransform: {
2002
1910
  width: "100%",
@@ -2015,10 +1923,10 @@ var GuideUIModule = class {
2015
1923
  this.currentPage = 0;
2016
1924
  },
2017
1925
  children: [
2018
- ReactEcs3.createElement(UiEntity3, {
1926
+ ReactEcs2.createElement(UiEntity2, {
2019
1927
  uiTransform: { flexDirection: "column", alignItems: "flex-start", justifyContent: "center", gap: 0 },
2020
1928
  children: [
2021
- ReactEcs3.createElement(UiEntity3, {
1929
+ ReactEcs2.createElement(UiEntity2, {
2022
1930
  uiTransform: { height: this.s(18) },
2023
1931
  uiText: {
2024
1932
  value: `${label} [${count}]`,
@@ -2028,7 +1936,7 @@ var GuideUIModule = class {
2028
1936
  }
2029
1937
  }),
2030
1938
  ...subtitle ? [
2031
- ReactEcs3.createElement(UiEntity3, {
1939
+ ReactEcs2.createElement(UiEntity2, {
2032
1940
  key: "subtitle",
2033
1941
  uiTransform: { height: this.s(12), marginTop: -2 },
2034
1942
  uiText: {
@@ -2042,7 +1950,7 @@ var GuideUIModule = class {
2042
1950
  ]
2043
1951
  }),
2044
1952
  ...badge ? [
2045
- ReactEcs3.createElement(UiEntity3, {
1953
+ ReactEcs2.createElement(UiEntity2, {
2046
1954
  key: "badge",
2047
1955
  uiText: { value: badge, fontSize: this.s(UI_DIMENSIONS.guide.sidebar.fontSize), color: THEME.colors.red }
2048
1956
  })
@@ -2071,7 +1979,7 @@ var GuideUIModule = class {
2071
1979
  const start = this.currentPage * this.itemsPerPage;
2072
1980
  const paged = videosToShow.slice(start, start + this.itemsPerPage);
2073
1981
  const totalPages = Math.ceil(videosToShow.length / this.itemsPerPage);
2074
- return ReactEcs3.createElement(UiEntity3, {
1982
+ return ReactEcs2.createElement(UiEntity2, {
2075
1983
  uiTransform: {
2076
1984
  flexGrow: 1,
2077
1985
  flexDirection: "column",
@@ -2082,7 +1990,7 @@ var GuideUIModule = class {
2082
1990
  this.renderCardGrid(paged),
2083
1991
  // Pagination
2084
1992
  ...totalPages > 1 ? [
2085
- ReactEcs3.createElement(UiEntity3, {
1993
+ ReactEcs2.createElement(UiEntity2, {
2086
1994
  key: "pagination",
2087
1995
  uiTransform: {
2088
1996
  width: "100%",
@@ -2095,7 +2003,7 @@ var GuideUIModule = class {
2095
2003
  },
2096
2004
  children: [
2097
2005
  ...this.currentPage > 0 ? [
2098
- ReactEcs3.createElement(UiEntity3, {
2006
+ ReactEcs2.createElement(UiEntity2, {
2099
2007
  key: "prev",
2100
2008
  uiText: {
2101
2009
  value: "< PREV",
@@ -2105,7 +2013,7 @@ var GuideUIModule = class {
2105
2013
  onMouseDown: () => this.currentPage--
2106
2014
  })
2107
2015
  ] : [],
2108
- ReactEcs3.createElement(UiEntity3, {
2016
+ ReactEcs2.createElement(UiEntity2, {
2109
2017
  uiText: {
2110
2018
  value: `${this.currentPage + 1}/${totalPages}`,
2111
2019
  fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize),
@@ -2113,7 +2021,7 @@ var GuideUIModule = class {
2113
2021
  }
2114
2022
  }),
2115
2023
  ...this.currentPage < totalPages - 1 ? [
2116
- ReactEcs3.createElement(UiEntity3, {
2024
+ ReactEcs2.createElement(UiEntity2, {
2117
2025
  key: "next",
2118
2026
  uiText: {
2119
2027
  value: "NEXT >",
@@ -2131,7 +2039,7 @@ var GuideUIModule = class {
2131
2039
  }
2132
2040
  renderCardGrid(videos) {
2133
2041
  if (videos.length === 0) {
2134
- return ReactEcs3.createElement(UiEntity3, {
2042
+ return ReactEcs2.createElement(UiEntity2, {
2135
2043
  uiTransform: { width: "100%", flexGrow: 1, justifyContent: "center", alignItems: "center" },
2136
2044
  uiText: { value: "NO SIGNAL", fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize), color: THEME.colors.gray }
2137
2045
  });
@@ -2141,7 +2049,7 @@ var GuideUIModule = class {
2141
2049
  rows.push(videos.slice(i, i + 2));
2142
2050
  }
2143
2051
  const cardH = this.s(UI_DIMENSIONS.guide.content.cardHeight);
2144
- return ReactEcs3.createElement(UiEntity3, {
2052
+ return ReactEcs2.createElement(UiEntity2, {
2145
2053
  uiTransform: {
2146
2054
  width: "100%",
2147
2055
  flexGrow: 1,
@@ -2150,7 +2058,7 @@ var GuideUIModule = class {
2150
2058
  gap: 8
2151
2059
  },
2152
2060
  children: rows.map(
2153
- (row, rowIndex) => ReactEcs3.createElement(UiEntity3, {
2061
+ (row, rowIndex) => ReactEcs2.createElement(UiEntity2, {
2154
2062
  key: `row-${rowIndex}`,
2155
2063
  uiTransform: {
2156
2064
  width: "100%",
@@ -2177,7 +2085,7 @@ var GuideUIModule = class {
2177
2085
  } else if (isActive) {
2178
2086
  cardBgColor = Color43.create(0, 0.4, 0, 0.5);
2179
2087
  }
2180
- return ReactEcs3.createElement(UiEntity3, {
2088
+ return ReactEcs2.createElement(UiEntity2, {
2181
2089
  key: video.id,
2182
2090
  uiTransform: {
2183
2091
  width: cardW,
@@ -2192,7 +2100,7 @@ var GuideUIModule = class {
2192
2100
  uiBackground: { color: cardBgColor },
2193
2101
  children: [
2194
2102
  // Main click area
2195
- ReactEcs3.createElement(UiEntity3, {
2103
+ ReactEcs2.createElement(UiEntity2, {
2196
2104
  uiTransform: {
2197
2105
  width: "100%",
2198
2106
  height: "70%",
@@ -2202,7 +2110,7 @@ var GuideUIModule = class {
2202
2110
  },
2203
2111
  onMouseDown: () => this.handleVideoSelect(video),
2204
2112
  children: [
2205
- ReactEcs3.createElement(UiEntity3, {
2113
+ ReactEcs2.createElement(UiEntity2, {
2206
2114
  uiText: {
2207
2115
  value: truncateText(video.name || "Unknown", 22),
2208
2116
  fontSize: this.s(UI_DIMENSIONS.guide.content.headerSize),
@@ -2211,7 +2119,7 @@ var GuideUIModule = class {
2211
2119
  }),
2212
2120
  // Status indicator: OFFLINE > CONNECTING > PLAYING > LIVE
2213
2121
  ...isOffline ? [
2214
- ReactEcs3.createElement(UiEntity3, {
2122
+ ReactEcs2.createElement(UiEntity2, {
2215
2123
  key: "offline",
2216
2124
  uiText: {
2217
2125
  value: "OFFLINE",
@@ -2220,7 +2128,7 @@ var GuideUIModule = class {
2220
2128
  }
2221
2129
  })
2222
2130
  ] : isConnecting ? [
2223
- ReactEcs3.createElement(UiEntity3, {
2131
+ ReactEcs2.createElement(UiEntity2, {
2224
2132
  key: "connecting",
2225
2133
  uiText: {
2226
2134
  value: "CONNECTING...",
@@ -2229,7 +2137,7 @@ var GuideUIModule = class {
2229
2137
  }
2230
2138
  })
2231
2139
  ] : isActive ? [
2232
- ReactEcs3.createElement(UiEntity3, {
2140
+ ReactEcs2.createElement(UiEntity2, {
2233
2141
  key: "playing",
2234
2142
  uiText: {
2235
2143
  value: "PLAYING",
@@ -2238,18 +2146,18 @@ var GuideUIModule = class {
2238
2146
  }
2239
2147
  })
2240
2148
  ] : video.isLive ? [
2241
- ReactEcs3.createElement(UiEntity3, {
2149
+ ReactEcs2.createElement(UiEntity2, {
2242
2150
  key: "live",
2243
2151
  uiTransform: { padding: { left: 4, right: 4, top: 2, bottom: 2 }, marginTop: 4 },
2244
2152
  uiBackground: { color: THEME.colors.red },
2245
2153
  children: [
2246
- ReactEcs3.createElement(Label2, { value: "LIVE", fontSize: this.s(10), color: THEME.colors.white })
2154
+ ReactEcs2.createElement(Label2, { value: "LIVE", fontSize: this.s(10), color: THEME.colors.white })
2247
2155
  ]
2248
2156
  })
2249
2157
  ] : [],
2250
2158
  // A locked channel (2026-11-20): its badge, the words a refused pick shows - one line, 12px in the 260px card
2251
2159
  ...video.locked === true ? [
2252
- ReactEcs3.createElement(UiEntity3, {
2160
+ ReactEcs2.createElement(UiEntity2, {
2253
2161
  key: "locked",
2254
2162
  uiTransform: { height: this.s(16), marginTop: 4 },
2255
2163
  uiText: { value: LOCKED_LINE, fontSize: this.s(12), color: THEME.colors.yellow }
@@ -2258,7 +2166,7 @@ var GuideUIModule = class {
2258
2166
  ]
2259
2167
  }),
2260
2168
  // Channel link
2261
- ReactEcs3.createElement(UiEntity3, {
2169
+ ReactEcs2.createElement(UiEntity2, {
2262
2170
  uiTransform: {
2263
2171
  width: "100%",
2264
2172
  height: "30%",
@@ -2269,7 +2177,7 @@ var GuideUIModule = class {
2269
2177
  uiBackground: { color: Color43.create(0, 0, 0, 0.3) },
2270
2178
  onMouseDown: () => this.handleChannelClick(video),
2271
2179
  children: [
2272
- ReactEcs3.createElement(UiEntity3, {
2180
+ ReactEcs2.createElement(UiEntity2, {
2273
2181
  uiText: {
2274
2182
  value: "CHANNEL",
2275
2183
  fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize),
@@ -2286,7 +2194,7 @@ var GuideUIModule = class {
2286
2194
  const buttonW = this.s(170);
2287
2195
  const buttonH = this.s(44);
2288
2196
  const bodyH = this.s(UI_DIMENSIONS.guide.content.bodySize * 1.5 * 2);
2289
- return ReactEcs3.createElement(UiEntity3, {
2197
+ return ReactEcs2.createElement(UiEntity2, {
2290
2198
  key: "age-choice",
2291
2199
  uiTransform: {
2292
2200
  positionType: "absolute",
@@ -2300,7 +2208,7 @@ var GuideUIModule = class {
2300
2208
  },
2301
2209
  uiBackground: { color: Color43.create(0, 0, 0, 0.85) },
2302
2210
  children: [
2303
- ReactEcs3.createElement(UiEntity3, {
2211
+ ReactEcs2.createElement(UiEntity2, {
2304
2212
  uiTransform: {
2305
2213
  width: this.s(480),
2306
2214
  flexDirection: "column",
@@ -2311,15 +2219,15 @@ var GuideUIModule = class {
2311
2219
  },
2312
2220
  uiBackground: { color: THEME.colors.panel },
2313
2221
  children: [
2314
- ReactEcs3.createElement(UiEntity3, {
2222
+ ReactEcs2.createElement(UiEntity2, {
2315
2223
  uiTransform: { marginBottom: this.s(8) },
2316
2224
  uiText: { value: "MATURE CONTENT", fontSize: this.s(24), color: THEME.colors.red }
2317
2225
  }),
2318
- ReactEcs3.createElement(UiEntity3, {
2226
+ ReactEcs2.createElement(UiEntity2, {
2319
2227
  uiTransform: { marginBottom: this.s(12) },
2320
2228
  uiText: { value: truncateText(video.name || "Unknown", 40), fontSize: this.s(16), color: THEME.colors.cyan }
2321
2229
  }),
2322
- ReactEcs3.createElement(UiEntity3, {
2230
+ ReactEcs2.createElement(UiEntity2, {
2323
2231
  uiTransform: { width: "100%", minHeight: bodyH, marginBottom: this.s(20) },
2324
2232
  uiText: {
2325
2233
  value: "This channel is for viewers aged 18 and older. Are you 18 or older?",
@@ -2329,21 +2237,21 @@ var GuideUIModule = class {
2329
2237
  textWrap: "wrap"
2330
2238
  }
2331
2239
  }),
2332
- ReactEcs3.createElement(UiEntity3, {
2240
+ ReactEcs2.createElement(UiEntity2, {
2333
2241
  uiTransform: { flexDirection: "row", justifyContent: "center", gap: this.s(16) },
2334
2242
  children: [
2335
- ReactEcs3.createElement(UiEntity3, {
2243
+ ReactEcs2.createElement(UiEntity2, {
2336
2244
  key: "age-yes",
2337
2245
  uiTransform: { width: buttonW, height: buttonH, justifyContent: "center", alignItems: "center" },
2338
2246
  uiBackground: { color: THEME.colors.red },
2339
2247
  onMouseDown: () => this.answerAge(true),
2340
2248
  children: [
2341
- ReactEcs3.createElement(UiEntity3, {
2249
+ ReactEcs2.createElement(UiEntity2, {
2342
2250
  uiText: { value: "YES, I AM 18+", fontSize: this.s(14), color: THEME.colors.white }
2343
2251
  })
2344
2252
  ]
2345
2253
  }),
2346
- ReactEcs3.createElement(UiEntity3, {
2254
+ ReactEcs2.createElement(UiEntity2, {
2347
2255
  key: "age-no",
2348
2256
  uiTransform: {
2349
2257
  width: buttonW,
@@ -2356,7 +2264,7 @@ var GuideUIModule = class {
2356
2264
  uiBackground: { color: THEME.colors.buttonBackground },
2357
2265
  onMouseDown: () => this.answerAge(false),
2358
2266
  children: [
2359
- ReactEcs3.createElement(UiEntity3, {
2267
+ ReactEcs2.createElement(UiEntity2, {
2360
2268
  uiText: { value: "NO", fontSize: this.s(14), color: THEME.colors.white }
2361
2269
  })
2362
2270
  ]
@@ -2370,7 +2278,7 @@ var GuideUIModule = class {
2370
2278
  }
2371
2279
  renderCloseButton() {
2372
2280
  const closeSize = this.s(UI_DIMENSIONS.closeButton.size);
2373
- return ReactEcs3.createElement(UiEntity3, {
2281
+ return ReactEcs2.createElement(UiEntity2, {
2374
2282
  uiTransform: {
2375
2283
  positionType: "absolute",
2376
2284
  position: { top: -5, right: -5 },
@@ -2382,7 +2290,7 @@ var GuideUIModule = class {
2382
2290
  uiBackground: { color: THEME.colors.panel },
2383
2291
  onMouseDown: () => this.hide(),
2384
2292
  children: [
2385
- ReactEcs3.createElement(UiEntity3, {
2293
+ ReactEcs2.createElement(UiEntity2, {
2386
2294
  uiText: { value: "X", fontSize: this.s(UI_DIMENSIONS.closeButton.fontSize), color: THEME.colors.red }
2387
2295
  })
2388
2296
  ]
@@ -2391,7 +2299,7 @@ var GuideUIModule = class {
2391
2299
  renderToggleButton() {
2392
2300
  const buttonText = this._isVisible ? "CLOSE" : "GUIDE";
2393
2301
  const buttonColor = this._isVisible ? Color43.create(0.2, 0.2, 0.28, 0.9) : Color43.create(0, 0.5, 0.5, 0.9);
2394
- const label = ReactEcs3.createElement(UiEntity3, {
2302
+ const label = ReactEcs2.createElement(UiEntity2, {
2395
2303
  uiText: {
2396
2304
  value: buttonText,
2397
2305
  fontSize: this.s(14),
@@ -2400,16 +2308,16 @@ var GuideUIModule = class {
2400
2308
  }
2401
2309
  });
2402
2310
  const press = () => this._isVisible ? this.hide() : this.show();
2403
- if (this.client.isPhone) {
2404
- return toolbarButton(1, {
2311
+ if (this.client.isPhone || this.client.toolbarCollapsed) {
2312
+ return this.client.toolbarButton(1, {
2405
2313
  uiTransform: { justifyContent: "center", alignItems: "center" },
2406
2314
  uiBackground: { color: buttonColor },
2407
2315
  onMouseDown: press,
2408
2316
  children: [label]
2409
- }, true, this.client.uiScale);
2317
+ });
2410
2318
  }
2411
2319
  const buttonPos = 20 + this.s(100) + 10;
2412
- return ReactEcs3.createElement(UiEntity3, {
2320
+ return ReactEcs2.createElement(UiEntity2, {
2413
2321
  uiTransform: {
2414
2322
  positionType: "absolute",
2415
2323
  position: { right: buttonPos, bottom: 10 },
@@ -2426,7 +2334,7 @@ var GuideUIModule = class {
2426
2334
  };
2427
2335
 
2428
2336
  // src/ui/chat-ui.tsx
2429
- import ReactEcs4, { UiEntity as UiEntity4, Label as Label3, Input as Input3, Button as Button2 } from "@dcl/sdk/react-ecs";
2337
+ import ReactEcs3, { UiEntity as UiEntity3, Label as Label3, Input as Input3, Button as Button2 } from "@dcl/sdk/react-ecs";
2430
2338
  import { Color4 as Color44 } from "@dcl/sdk/math";
2431
2339
  import { signedFetch as signedFetch3 } from "~system/SignedFetch";
2432
2340
  import { getPlayer } from "@dcl/sdk/players";
@@ -2477,7 +2385,7 @@ var ChatUIModule = class {
2477
2385
  if (this.client.isVisitorBlocked) return null;
2478
2386
  const scaledTheme = scaleChatTheme(DEFAULT_CHAT_THEME, this.client.uiScale);
2479
2387
  const positionStyle = this.getPositionStyle();
2480
- return ReactEcs4.createElement(UiEntity4, {
2388
+ return ReactEcs3.createElement(UiEntity3, {
2481
2389
  uiTransform: {
2482
2390
  width: "100%",
2483
2391
  height: "100%",
@@ -2486,16 +2394,18 @@ var ChatUIModule = class {
2486
2394
  children: [
2487
2395
  // Always render toggle button
2488
2396
  this.renderToggleButton(),
2397
+ // The toolbar's collapse handle, drawn here once for the whole toolbar (2.14.0; nothing while collapsed)
2398
+ this.client.toolbarHandle(),
2489
2399
  // Render panel when visible - scaled sizes, fixed position
2490
2400
  // Key includes uiScale to force re-render when scale changes from other panels
2491
- this._isVisible ? ReactEcs4.createElement(UiEntity4, {
2401
+ // On a phone centered beside the toolbar's column (2.13.0, src/ui/toolbar-panel.ts); elsewhere as here
2402
+ this._isVisible ? this.client.toolbarPanel({
2492
2403
  key: `chat-panel-${this.client.uiScale}`,
2493
2404
  uiTransform: {
2494
2405
  width: this.s(UI_DIMENSIONS.chat.width),
2495
2406
  height: this.s(UI_DIMENSIONS.chat.height),
2496
2407
  positionType: "absolute",
2497
- // On a phone, left of the toolbar's column (2.12.0); elsewhere at the right edge, as before
2498
- position: { bottom: UI_DIMENSIONS.chat.bottom, right: this.client.panelRight(UI_DIMENSIONS.chat.right) },
2408
+ position: { bottom: UI_DIMENSIONS.chat.bottom, right: UI_DIMENSIONS.chat.right },
2499
2409
  flexDirection: "column",
2500
2410
  border: { top: 2, bottom: 2, left: 2, right: 2 },
2501
2411
  borderColor: THEME.colors.panelBorder
@@ -2505,7 +2415,7 @@ var ChatUIModule = class {
2505
2415
  this.renderHeader(),
2506
2416
  this.renderChannelButton(scaledTheme),
2507
2417
  this.renderMessagesArea(scaledTheme),
2508
- ReactEcs4.createElement(UiEntity4, {
2418
+ ReactEcs3.createElement(UiEntity3, {
2509
2419
  uiTransform: { width: "100%", height: 1, flexShrink: 0 },
2510
2420
  uiBackground: { color: THEME.colors.panelBorder }
2511
2421
  }),
@@ -2847,7 +2757,7 @@ var ChatUIModule = class {
2847
2757
  renderChannelButton(theme) {
2848
2758
  const currentChannel = this.channels.find((c) => c.id === this.currentChannelId);
2849
2759
  const displayName = currentChannel?.name || this.currentChannelId;
2850
- return ReactEcs4.createElement(UiEntity4, {
2760
+ return ReactEcs3.createElement(UiEntity3, {
2851
2761
  uiTransform: {
2852
2762
  height: 40,
2853
2763
  width: "100%",
@@ -2862,12 +2772,12 @@ var ChatUIModule = class {
2862
2772
  this.showChannelDropdown = !this.showChannelDropdown;
2863
2773
  },
2864
2774
  children: [
2865
- ReactEcs4.createElement(Label3, {
2775
+ ReactEcs3.createElement(Label3, {
2866
2776
  value: `// ${truncateText(displayName, 24)}`,
2867
2777
  fontSize: theme.channelButton,
2868
2778
  color: THEME.colors.white
2869
2779
  }),
2870
- ReactEcs4.createElement(Label3, {
2780
+ ReactEcs3.createElement(Label3, {
2871
2781
  value: this.showChannelDropdown ? "\u25B2" : "\u25BC",
2872
2782
  fontSize: 10,
2873
2783
  color: THEME.colors.cyan
@@ -2896,7 +2806,7 @@ var ChatUIModule = class {
2896
2806
  const visibleMessages = allMessages.slice(startIdx, endIdx);
2897
2807
  const canScrollUp = this.chatScrollOffset < maxOffset;
2898
2808
  const canScrollDown = this.chatScrollOffset > 0;
2899
- return ReactEcs4.createElement(UiEntity4, {
2809
+ return ReactEcs3.createElement(UiEntity3, {
2900
2810
  uiTransform: { flexGrow: 1, width: "100%", flexDirection: "row", overflow: "hidden" },
2901
2811
  children: [
2902
2812
  // Messages - anchored at the bottom, so the newest stays in view now that a row grows with its text
@@ -2904,7 +2814,7 @@ var ChatUIModule = class {
2904
2814
  // past it; now its oldest clips at the top, one scroll up away. The rows keep their height
2905
2815
  // (flexShrink 0 - the protocol's default of 1 squeezes them onto each other) in one column
2906
2816
  // (nowrap - the protocol documents wrap as its default).
2907
- ReactEcs4.createElement(UiEntity4, {
2817
+ ReactEcs3.createElement(UiEntity3, {
2908
2818
  uiTransform: {
2909
2819
  flexGrow: 1,
2910
2820
  flexDirection: "column",
@@ -2918,7 +2828,7 @@ var ChatUIModule = class {
2918
2828
  )
2919
2829
  }),
2920
2830
  // Scroll controls
2921
- ReactEcs4.createElement(UiEntity4, {
2831
+ ReactEcs3.createElement(UiEntity3, {
2922
2832
  uiTransform: {
2923
2833
  width: 28,
2924
2834
  height: "100%",
@@ -2928,22 +2838,22 @@ var ChatUIModule = class {
2928
2838
  gap: 8
2929
2839
  },
2930
2840
  children: [
2931
- ReactEcs4.createElement(UiEntity4, {
2841
+ ReactEcs3.createElement(UiEntity3, {
2932
2842
  uiTransform: { width: 26, height: 36, justifyContent: "center", alignItems: "center" },
2933
2843
  uiBackground: { color: canScrollUp ? THEME.colors.buttonBackground : Color44.create(0.1, 0.1, 0.1, 0.3) },
2934
2844
  onMouseDown: () => {
2935
2845
  if (canScrollUp) this.chatScrollOffset += 1;
2936
2846
  },
2937
2847
  children: [
2938
- ReactEcs4.createElement(UiEntity4, {
2848
+ ReactEcs3.createElement(UiEntity3, {
2939
2849
  uiText: { value: "\u25B2", fontSize: 14, color: canScrollUp ? THEME.colors.cyan : THEME.colors.gray }
2940
2850
  })
2941
2851
  ]
2942
2852
  }),
2943
- ReactEcs4.createElement(UiEntity4, {
2853
+ ReactEcs3.createElement(UiEntity3, {
2944
2854
  uiTransform: { width: 26, height: 24, justifyContent: "center", alignItems: "center" },
2945
2855
  children: [
2946
- ReactEcs4.createElement(UiEntity4, {
2856
+ ReactEcs3.createElement(UiEntity3, {
2947
2857
  uiText: {
2948
2858
  value: totalMessages > UI_DIMENSIONS.chat.messagesPerPage ? `${this.chatScrollOffset}` : "-",
2949
2859
  fontSize: 10,
@@ -2952,14 +2862,14 @@ var ChatUIModule = class {
2952
2862
  })
2953
2863
  ]
2954
2864
  }),
2955
- ReactEcs4.createElement(UiEntity4, {
2865
+ ReactEcs3.createElement(UiEntity3, {
2956
2866
  uiTransform: { width: 26, height: 36, justifyContent: "center", alignItems: "center" },
2957
2867
  uiBackground: { color: canScrollDown ? THEME.colors.buttonBackground : Color44.create(0.1, 0.1, 0.1, 0.3) },
2958
2868
  onMouseDown: () => {
2959
2869
  if (canScrollDown) this.chatScrollOffset -= 1;
2960
2870
  },
2961
2871
  children: [
2962
- ReactEcs4.createElement(UiEntity4, {
2872
+ ReactEcs3.createElement(UiEntity3, {
2963
2873
  uiText: { value: "\u25BC", fontSize: 14, color: canScrollDown ? THEME.colors.cyan : THEME.colors.gray }
2964
2874
  })
2965
2875
  ]
@@ -2970,7 +2880,7 @@ var ChatUIModule = class {
2970
2880
  });
2971
2881
  }
2972
2882
  renderSystemMessage(msg, theme) {
2973
- return ReactEcs4.createElement(UiEntity4, {
2883
+ return ReactEcs3.createElement(UiEntity3, {
2974
2884
  key: msg.id,
2975
2885
  uiTransform: { width: "100%", height: 24, marginBottom: 4, flexShrink: 0 },
2976
2886
  uiText: {
@@ -2990,12 +2900,12 @@ var ChatUIModule = class {
2990
2900
  if (displayName.toLowerCase().includes("admin")) accentColor = THEME.colors.magenta;
2991
2901
  else if (isCurrentUser) accentColor = THEME.colors.green;
2992
2902
  const textRoom = this.messageTextRoom(msg.text, theme.chatMessage);
2993
- return ReactEcs4.createElement(UiEntity4, {
2903
+ return ReactEcs3.createElement(UiEntity3, {
2994
2904
  key: msg.id,
2995
2905
  uiTransform: { width: "100%", flexDirection: "column", marginBottom: 16, flexShrink: 0 },
2996
2906
  children: [
2997
2907
  // Header row
2998
- ReactEcs4.createElement(UiEntity4, {
2908
+ ReactEcs3.createElement(UiEntity3, {
2999
2909
  uiTransform: {
3000
2910
  width: "100%",
3001
2911
  height: 24,
@@ -3005,23 +2915,23 @@ var ChatUIModule = class {
3005
2915
  marginBottom: 4
3006
2916
  },
3007
2917
  children: [
3008
- ReactEcs4.createElement(UiEntity4, {
2918
+ ReactEcs3.createElement(UiEntity3, {
3009
2919
  uiText: { value: displayName, fontSize: theme.chatUsername, color: accentColor, textAlign: "middle-left" }
3010
2920
  }),
3011
- ReactEcs4.createElement(UiEntity4, {
2921
+ ReactEcs3.createElement(UiEntity3, {
3012
2922
  uiText: { value: time, fontSize: theme.chatTimestamp, color: THEME.colors.gray, textAlign: "middle-right" }
3013
2923
  })
3014
2924
  ]
3015
2925
  }),
3016
2926
  // Message content
3017
- ReactEcs4.createElement(UiEntity4, {
2927
+ ReactEcs3.createElement(UiEntity3, {
3018
2928
  uiTransform: { width: "100%", flexDirection: "row", alignItems: "stretch", paddingLeft: 8 },
3019
2929
  children: [
3020
- ReactEcs4.createElement(UiEntity4, {
2930
+ ReactEcs3.createElement(UiEntity3, {
3021
2931
  uiTransform: { width: 3, minHeight: textRoom },
3022
2932
  uiBackground: { color: accentColor }
3023
2933
  }),
3024
- ReactEcs4.createElement(UiEntity4, {
2934
+ ReactEcs3.createElement(UiEntity3, {
3025
2935
  uiTransform: { flexGrow: 1, minHeight: textRoom, paddingLeft: 12, paddingTop: 4, paddingBottom: 4 },
3026
2936
  uiText: {
3027
2937
  value: msg.text,
@@ -3037,7 +2947,7 @@ var ChatUIModule = class {
3037
2947
  });
3038
2948
  }
3039
2949
  renderUserInfoBar(theme) {
3040
- return ReactEcs4.createElement(UiEntity4, {
2950
+ return ReactEcs3.createElement(UiEntity3, {
3041
2951
  uiTransform: {
3042
2952
  width: "100%",
3043
2953
  height: 34,
@@ -3049,12 +2959,12 @@ var ChatUIModule = class {
3049
2959
  },
3050
2960
  uiBackground: { color: Color44.create(0.03, 0.03, 0.05, 1) },
3051
2961
  children: [
3052
- ReactEcs4.createElement(Label3, {
2962
+ ReactEcs3.createElement(Label3, {
3053
2963
  value: `// ${this.currentUsername || "Guest"}`,
3054
2964
  fontSize: theme.userInfo,
3055
2965
  color: THEME.colors.yellow
3056
2966
  }),
3057
- ReactEcs4.createElement(Label3, {
2967
+ ReactEcs3.createElement(Label3, {
3058
2968
  value: this.isRegisteredUser ? "\u25CF CITIZEN" : "\u25CB GUEST",
3059
2969
  fontSize: theme.authStatus,
3060
2970
  color: this.isRegisteredUser ? THEME.colors.green : THEME.colors.gray
@@ -3065,7 +2975,7 @@ var ChatUIModule = class {
3065
2975
  renderInputArea(theme) {
3066
2976
  const baseUrl = this.getBaseUrl();
3067
2977
  if (!this.isRegisteredUser) {
3068
- return ReactEcs4.createElement(UiEntity4, {
2978
+ return ReactEcs3.createElement(UiEntity3, {
3069
2979
  uiTransform: {
3070
2980
  height: 75,
3071
2981
  minHeight: 75,
@@ -3079,14 +2989,14 @@ var ChatUIModule = class {
3079
2989
  },
3080
2990
  uiBackground: { color: Color44.create(0.08, 0.08, 0.1, 1) },
3081
2991
  children: [
3082
- ReactEcs4.createElement(Label3, {
2992
+ ReactEcs3.createElement(Label3, {
3083
2993
  value: "ACCESS RESTRICTED: CITIZENS ONLY",
3084
2994
  fontSize: 12,
3085
2995
  color: THEME.colors.red,
3086
2996
  textAlign: "middle-center",
3087
2997
  uiTransform: { marginBottom: 5 }
3088
2998
  }),
3089
- ReactEcs4.createElement(Button2, {
2999
+ ReactEcs3.createElement(Button2, {
3090
3000
  value: "REGISTER IDENTITY",
3091
3001
  fontSize: 14,
3092
3002
  uiTransform: { width: 200, height: 30 },
@@ -3099,7 +3009,7 @@ var ChatUIModule = class {
3099
3009
  ]
3100
3010
  });
3101
3011
  }
3102
- return ReactEcs4.createElement(UiEntity4, {
3012
+ return ReactEcs3.createElement(UiEntity3, {
3103
3013
  uiTransform: {
3104
3014
  height: 75,
3105
3015
  minHeight: 75,
@@ -3111,7 +3021,7 @@ var ChatUIModule = class {
3111
3021
  },
3112
3022
  uiBackground: { color: Color44.create(0.08, 0.08, 0.1, 1) },
3113
3023
  children: [
3114
- ReactEcs4.createElement(Input3, {
3024
+ ReactEcs3.createElement(Input3, {
3115
3025
  onChange: (v) => {
3116
3026
  this.inputText = v;
3117
3027
  },
@@ -3124,7 +3034,7 @@ var ChatUIModule = class {
3124
3034
  uiBackground: { color: Color44.create(0.12, 0.12, 0.14, 1) },
3125
3035
  uiTransform: { flexGrow: 1, height: "100%", margin: { right: 10 } }
3126
3036
  }),
3127
- ReactEcs4.createElement(Button2, {
3037
+ ReactEcs3.createElement(Button2, {
3128
3038
  value: this.isSigningIn ? "..." : "SEND",
3129
3039
  onMouseDown: () => this.handleSend(),
3130
3040
  uiTransform: { width: 80, height: "100%" },
@@ -3141,7 +3051,7 @@ var ChatUIModule = class {
3141
3051
  const endIdx = startIdx + UI_DIMENSIONS.chat.channelsPerPage;
3142
3052
  const visibleChannels = this.channels.slice(startIdx, endIdx);
3143
3053
  const totalPages = Math.ceil(this.channels.length / UI_DIMENSIONS.chat.channelsPerPage);
3144
- return ReactEcs4.createElement(UiEntity4, {
3054
+ return ReactEcs3.createElement(UiEntity3, {
3145
3055
  uiTransform: {
3146
3056
  width: "100%",
3147
3057
  height: 260,
@@ -3152,13 +3062,13 @@ var ChatUIModule = class {
3152
3062
  uiBackground: { color: Color44.create(0.08, 0.1, 0.14, 1) },
3153
3063
  children: [
3154
3064
  // Top border
3155
- ReactEcs4.createElement(UiEntity4, {
3065
+ ReactEcs3.createElement(UiEntity3, {
3156
3066
  uiTransform: { width: "100%", height: 2, flexShrink: 0 },
3157
3067
  uiBackground: { color: THEME.colors.cyan }
3158
3068
  }),
3159
3069
  // Channel list
3160
3070
  ...visibleChannels.map(
3161
- (channel) => ReactEcs4.createElement(UiEntity4, {
3071
+ (channel) => ReactEcs3.createElement(UiEntity3, {
3162
3072
  key: channel.id,
3163
3073
  uiTransform: {
3164
3074
  height: 38,
@@ -3171,7 +3081,7 @@ var ChatUIModule = class {
3171
3081
  },
3172
3082
  onMouseDown: () => this.switchChannel(channel.id),
3173
3083
  children: [
3174
- ReactEcs4.createElement(Label3, {
3084
+ ReactEcs3.createElement(Label3, {
3175
3085
  value: channel.id === this.currentChannelId ? `\u25B8 ${channel.name}` : channel.name,
3176
3086
  fontSize: theme.channelDropdown,
3177
3087
  color: channel.id === this.currentChannelId ? THEME.colors.cyan : THEME.colors.gray
@@ -3181,7 +3091,7 @@ var ChatUIModule = class {
3181
3091
  ),
3182
3092
  // Pagination
3183
3093
  ...totalPages > 1 ? [
3184
- ReactEcs4.createElement(UiEntity4, {
3094
+ ReactEcs3.createElement(UiEntity3, {
3185
3095
  key: "pagination",
3186
3096
  uiTransform: {
3187
3097
  width: "100%",
@@ -3194,11 +3104,11 @@ var ChatUIModule = class {
3194
3104
  },
3195
3105
  children: [
3196
3106
  ...this.channelPage > 0 ? [
3197
- ReactEcs4.createElement(UiEntity4, {
3107
+ ReactEcs3.createElement(UiEntity3, {
3198
3108
  key: "prev",
3199
3109
  onMouseDown: () => this.channelPage--,
3200
3110
  children: [
3201
- ReactEcs4.createElement(Label3, {
3111
+ ReactEcs3.createElement(Label3, {
3202
3112
  value: "<< PREV",
3203
3113
  fontSize: 10,
3204
3114
  color: THEME.colors.cyan
@@ -3206,17 +3116,17 @@ var ChatUIModule = class {
3206
3116
  ]
3207
3117
  })
3208
3118
  ] : [],
3209
- ReactEcs4.createElement(Label3, {
3119
+ ReactEcs3.createElement(Label3, {
3210
3120
  value: `${this.channelPage + 1}/${totalPages}`,
3211
3121
  fontSize: 10,
3212
3122
  color: THEME.colors.gray
3213
3123
  }),
3214
3124
  ...this.channelPage < totalPages - 1 ? [
3215
- ReactEcs4.createElement(UiEntity4, {
3125
+ ReactEcs3.createElement(UiEntity3, {
3216
3126
  key: "next",
3217
3127
  onMouseDown: () => this.channelPage++,
3218
3128
  children: [
3219
- ReactEcs4.createElement(Label3, {
3129
+ ReactEcs3.createElement(Label3, {
3220
3130
  value: "NEXT >>",
3221
3131
  fontSize: 10,
3222
3132
  color: THEME.colors.cyan
@@ -3228,7 +3138,7 @@ var ChatUIModule = class {
3228
3138
  })
3229
3139
  ] : [],
3230
3140
  // Bottom border
3231
- ReactEcs4.createElement(UiEntity4, {
3141
+ ReactEcs3.createElement(UiEntity3, {
3232
3142
  uiTransform: { width: "100%", height: 1, flexShrink: 0 },
3233
3143
  uiBackground: { color: THEME.colors.panelBorder }
3234
3144
  })
@@ -3239,7 +3149,7 @@ var ChatUIModule = class {
3239
3149
  const unreadBadge = this._unreadCount > 0 ? ` (${this._unreadCount})` : "";
3240
3150
  const buttonText = this._isVisible ? "CLOSE" : `CHAT${unreadBadge}`;
3241
3151
  const buttonColor = this._isVisible ? Color44.create(0.2, 0.2, 0.28, 0.9) : Color44.create(0.6, 0, 0.5, 0.9);
3242
- const label = ReactEcs4.createElement(UiEntity4, {
3152
+ const label = ReactEcs3.createElement(UiEntity3, {
3243
3153
  uiText: {
3244
3154
  value: buttonText,
3245
3155
  fontSize: this.s(14),
@@ -3248,15 +3158,15 @@ var ChatUIModule = class {
3248
3158
  }
3249
3159
  });
3250
3160
  const press = () => this._isVisible ? this.hide() : this.show();
3251
- if (this.client.isPhone) {
3252
- return toolbarButton(0, {
3161
+ if (this.client.isPhone || this.client.toolbarCollapsed) {
3162
+ return this.client.toolbarButton(0, {
3253
3163
  uiTransform: { justifyContent: "center", alignItems: "center" },
3254
3164
  uiBackground: { color: buttonColor },
3255
3165
  onMouseDown: press,
3256
3166
  children: [label]
3257
- }, true, this.client.uiScale);
3167
+ });
3258
3168
  }
3259
- return ReactEcs4.createElement(UiEntity4, {
3169
+ return ReactEcs3.createElement(UiEntity3, {
3260
3170
  uiTransform: {
3261
3171
  positionType: "absolute",
3262
3172
  position: { right: 20, bottom: 10 },
@@ -3273,13 +3183,13 @@ var ChatUIModule = class {
3273
3183
  };
3274
3184
 
3275
3185
  // src/ui/admin-panel-ui.tsx
3276
- import ReactEcs7, { UiEntity as UiEntity7, Button as Button4, Label as Label6, Input as Input4 } from "@dcl/sdk/react-ecs";
3186
+ import ReactEcs6, { UiEntity as UiEntity6, Button as Button4, Label as Label6, Input as Input4 } from "@dcl/sdk/react-ecs";
3277
3187
  import { Color4 as Color46 } from "@dcl/sdk/math";
3278
3188
  import { getPlayer as getPlayer2 } from "@dcl/sdk/players";
3279
3189
  import { openExternalUrl as openExternalUrl5 } from "~system/RestrictedActions";
3280
3190
 
3281
3191
  // src/ui/ui-renderer.tsx
3282
- import ReactEcs5, { ReactEcsRenderer, UiEntity as UiEntity5, Label as Label4 } from "@dcl/sdk/react-ecs";
3192
+ import ReactEcs4, { ReactEcsRenderer, UiEntity as UiEntity4, Label as Label4 } from "@dcl/sdk/react-ecs";
3283
3193
  import { engine as engine3 } from "@dcl/sdk/ecs";
3284
3194
  var notificationText = "";
3285
3195
  var notificationVisible = false;
@@ -3312,8 +3222,8 @@ function NotificationBanner() {
3312
3222
  if (!notificationVisible) return null;
3313
3223
  return (
3314
3224
  // Full-width container to center the notification
3315
- /* @__PURE__ */ ReactEcs5.createElement(
3316
- UiEntity5,
3225
+ /* @__PURE__ */ ReactEcs4.createElement(
3226
+ UiEntity4,
3317
3227
  {
3318
3228
  uiTransform: {
3319
3229
  positionType: "absolute",
@@ -3323,8 +3233,8 @@ function NotificationBanner() {
3323
3233
  alignItems: "center"
3324
3234
  }
3325
3235
  },
3326
- /* @__PURE__ */ ReactEcs5.createElement(
3327
- UiEntity5,
3236
+ /* @__PURE__ */ ReactEcs4.createElement(
3237
+ UiEntity4,
3328
3238
  {
3329
3239
  uiTransform: {
3330
3240
  width: N.width,
@@ -3334,8 +3244,8 @@ function NotificationBanner() {
3334
3244
  },
3335
3245
  uiBackground: { color: C.panel }
3336
3246
  },
3337
- /* @__PURE__ */ ReactEcs5.createElement(
3338
- UiEntity5,
3247
+ /* @__PURE__ */ ReactEcs4.createElement(
3248
+ UiEntity4,
3339
3249
  {
3340
3250
  uiTransform: {
3341
3251
  width: N.borderWidth,
@@ -3344,8 +3254,8 @@ function NotificationBanner() {
3344
3254
  uiBackground: { color: C.cyan }
3345
3255
  }
3346
3256
  ),
3347
- /* @__PURE__ */ ReactEcs5.createElement(
3348
- UiEntity5,
3257
+ /* @__PURE__ */ ReactEcs4.createElement(
3258
+ UiEntity4,
3349
3259
  {
3350
3260
  uiTransform: {
3351
3261
  flexGrow: 1,
@@ -3355,7 +3265,7 @@ function NotificationBanner() {
3355
3265
  alignItems: "flex-start"
3356
3266
  }
3357
3267
  },
3358
- /* @__PURE__ */ ReactEcs5.createElement(
3268
+ /* @__PURE__ */ ReactEcs4.createElement(
3359
3269
  Label4,
3360
3270
  {
3361
3271
  value: notificationText,
@@ -3365,8 +3275,8 @@ function NotificationBanner() {
3365
3275
  }
3366
3276
  )
3367
3277
  ),
3368
- /* @__PURE__ */ ReactEcs5.createElement(
3369
- UiEntity5,
3278
+ /* @__PURE__ */ ReactEcs4.createElement(
3279
+ UiEntity4,
3370
3280
  {
3371
3281
  uiTransform: {
3372
3282
  width: 5,
@@ -3388,8 +3298,8 @@ function createStaticUI(client) {
3388
3298
  const guideComponent = client.guideUI?.getComponent() ?? null;
3389
3299
  const chatComponent = client.chatUI?.getComponent() ?? null;
3390
3300
  const adminComponent = client.adminPanel?.getComponent() ?? null;
3391
- return /* @__PURE__ */ ReactEcs5.createElement(
3392
- UiEntity5,
3301
+ return /* @__PURE__ */ ReactEcs4.createElement(
3302
+ UiEntity4,
3393
3303
  {
3394
3304
  key: `static-ui-root-${currentScale}`,
3395
3305
  uiTransform: {
@@ -3400,7 +3310,7 @@ function createStaticUI(client) {
3400
3310
  alignItems: "center"
3401
3311
  }
3402
3312
  },
3403
- blocked ? null : /* @__PURE__ */ ReactEcs5.createElement(NotificationBanner, null),
3313
+ blocked ? null : /* @__PURE__ */ ReactEcs4.createElement(NotificationBanner, null),
3404
3314
  guideComponent,
3405
3315
  chatComponent,
3406
3316
  adminComponent
@@ -3413,7 +3323,7 @@ function setupStaticUI(client) {
3413
3323
  }
3414
3324
 
3415
3325
  // src/ui/blocked-notice.tsx
3416
- import ReactEcs6, { UiEntity as UiEntity6, Label as Label5, Button as Button3 } from "@dcl/sdk/react-ecs";
3326
+ import ReactEcs5, { UiEntity as UiEntity5, Label as Label5, Button as Button3 } from "@dcl/sdk/react-ecs";
3417
3327
  import { Color4 as Color45 } from "@dcl/sdk/math";
3418
3328
  import { openExternalUrl as openExternalUrl4 } from "~system/RestrictedActions";
3419
3329
  var DEFAULT_SITE_URL = "https://thestatic.tv";
@@ -3440,8 +3350,8 @@ function BlockedNotice(props) {
3440
3350
  const s = (v) => Math.round(v * props.scale);
3441
3351
  const [title, ...body] = lines;
3442
3352
  const action = blockedNoticeAction(props.standing, props.siteUrl || DEFAULT_SITE_URL);
3443
- return /* @__PURE__ */ ReactEcs6.createElement(
3444
- UiEntity6,
3353
+ return /* @__PURE__ */ ReactEcs5.createElement(
3354
+ UiEntity5,
3445
3355
  {
3446
3356
  uiTransform: {
3447
3357
  width: "100%",
@@ -3451,15 +3361,15 @@ function BlockedNotice(props) {
3451
3361
  alignItems: "center"
3452
3362
  }
3453
3363
  },
3454
- /* @__PURE__ */ ReactEcs6.createElement(
3455
- UiEntity6,
3364
+ /* @__PURE__ */ ReactEcs5.createElement(
3365
+ UiEntity5,
3456
3366
  {
3457
3367
  uiTransform: { width: s(460), flexDirection: "column", alignItems: "center", padding: s(20) },
3458
3368
  uiBackground: { color: Color45.create(0.05, 0.05, 0.08, 0.95) }
3459
3369
  },
3460
- /* @__PURE__ */ ReactEcs6.createElement(Label5, { value: title, fontSize: s(22), color: Color45.create(0.9, 0.2, 0.2, 1), uiTransform: { height: s(34) } }),
3461
- body.map((line, i) => /* @__PURE__ */ ReactEcs6.createElement(Label5, { key: `blocked-line-${i}`, value: line, fontSize: s(16), color: Color45.White(), uiTransform: { height: s(26) } })),
3462
- action && /* @__PURE__ */ ReactEcs6.createElement(
3370
+ /* @__PURE__ */ ReactEcs5.createElement(Label5, { value: title, fontSize: s(22), color: Color45.create(0.9, 0.2, 0.2, 1), uiTransform: { height: s(34) } }),
3371
+ body.map((line, i) => /* @__PURE__ */ ReactEcs5.createElement(Label5, { key: `blocked-line-${i}`, value: line, fontSize: s(16), color: Color45.White(), uiTransform: { height: s(26) } })),
3372
+ action && /* @__PURE__ */ ReactEcs5.createElement(
3463
3373
  Button3,
3464
3374
  {
3465
3375
  uiTransform: { width: s(220), height: s(36), margin: { top: s(12) } },
@@ -3950,15 +3860,15 @@ var AdminPanelUIModule = class {
3950
3860
  this.privateStatus = line;
3951
3861
  } };
3952
3862
  // --- UI Components ---
3953
- this.SectionHead = ({ label, color }) => /* @__PURE__ */ ReactEcs7.createElement(
3954
- UiEntity7,
3863
+ this.SectionHead = ({ label, color }) => /* @__PURE__ */ ReactEcs6.createElement(
3864
+ UiEntity6,
3955
3865
  {
3956
3866
  uiTransform: { width: "100%", height: this.s(UI_DIMENSIONS.admin.sectionHeadHeight), margin: { bottom: 8 }, padding: { left: 10 }, alignItems: "center" },
3957
3867
  uiBackground: { color: Color46.create(color.r * 0.3, color.g * 0.3, color.b * 0.3, 0.5) }
3958
3868
  },
3959
- /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: label, fontSize: this.theme.sectionHead, color })
3869
+ /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: label, fontSize: this.theme.sectionHead, color })
3960
3870
  );
3961
- this.TabBtn = ({ label, tab }) => /* @__PURE__ */ ReactEcs7.createElement(
3871
+ this.TabBtn = ({ label, tab }) => /* @__PURE__ */ ReactEcs6.createElement(
3962
3872
  Button4,
3963
3873
  {
3964
3874
  uiTransform: { flexGrow: 1, height: this.s(UI_DIMENSIONS.admin.tabHeight), justifyContent: "center", alignItems: "center" },
@@ -3977,7 +3887,7 @@ var AdminPanelUIModule = class {
3977
3887
  */
3978
3888
  this.ControlsTab = () => {
3979
3889
  const t = this.theme;
3980
- return /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.controls.map((control) => /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { key: `control-${control.id}`, uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: control.label, color: C2.cyan }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, control.options.map((option) => this.controlButton(control, option.id, option.label)), control.off === true && this.controlButton(control, "off", "OFF")))), this.controlStatus && /* @__PURE__ */ ReactEcs7.createElement(
3890
+ return /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.controls.map((control) => /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { key: `control-${control.id}`, uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: control.label, color: C2.cyan }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, control.options.map((option) => this.controlButton(control, option.id, option.label)), control.off === true && this.controlButton(control, "off", "OFF")))), this.controlStatus && /* @__PURE__ */ ReactEcs6.createElement(
3981
3891
  Label6,
3982
3892
  {
3983
3893
  value: this.controlStatus,
@@ -3992,7 +3902,7 @@ var AdminPanelUIModule = class {
3992
3902
  this.fetchStreamData();
3993
3903
  }
3994
3904
  const t = this.theme;
3995
- return /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, !this.streamData?.hasChannel && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "LIVE STREAM", color: C2.btn }), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "No streaming channel linked", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { bottom: 8 } } }), this.isOwner && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column" } }, this.streamData?.trialAvailable && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs7.createElement(
3905
+ return /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, !this.streamData?.hasChannel && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "LIVE STREAM", color: C2.btn }), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "No streaming channel linked", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { bottom: 8 } } }), this.isOwner && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column" } }, this.streamData?.trialAvailable && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs6.createElement(
3996
3906
  Button4,
3997
3907
  {
3998
3908
  uiTransform: { width: this.s(200), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: { bottom: 6 } },
@@ -4002,7 +3912,7 @@ var AdminPanelUIModule = class {
4002
3912
  color: C2.text,
4003
3913
  onMouseDown: () => this.claimTrial()
4004
3914
  }
4005
- ), this.trialClaimError && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: this.trialClaimError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: trialNoteText(this.streamData?.trialSparks), fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })), !this.streamData?.trialAvailable && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column" } }, /* @__PURE__ */ ReactEcs7.createElement(
3915
+ ), this.trialClaimError && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: this.trialClaimError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: trialNoteText(this.streamData?.trialSparks), fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })), !this.streamData?.trialAvailable && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column" } }, /* @__PURE__ */ ReactEcs6.createElement(
4006
3916
  Button4,
4007
3917
  {
4008
3918
  uiTransform: { width: this.s(170), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: { bottom: 6 } },
@@ -4012,14 +3922,14 @@ var AdminPanelUIModule = class {
4012
3922
  color: C2.text,
4013
3923
  onMouseDown: () => this.createChannel()
4014
3924
  }
4015
- ), this.channelCreateError && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: this.channelCreateError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Relay tier \u2022 $25/mo \u2022 8 hours streaming", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })))), this.streamData?.hasChannel && this.isOwner && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: this.streamData.isLive ? "LIVE STREAM" : "STREAM SETTINGS", color: this.streamData.isLive ? C2.red : C2.yellow }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 8 } } }, /* @__PURE__ */ ReactEcs7.createElement(
3925
+ ), this.channelCreateError && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: this.channelCreateError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Relay tier \u2022 $25/mo \u2022 8 hours streaming", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })))), this.streamData?.hasChannel && this.isOwner && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: this.streamData.isLive ? "LIVE STREAM" : "STREAM SETTINGS", color: this.streamData.isLive ? C2.red : C2.yellow }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 8 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4016
3926
  Label6,
4017
3927
  {
4018
3928
  value: this.streamData.isLive ? `LIVE \u2022 ${this.streamData.currentViewers || 0} viewers` : "OFFLINE",
4019
3929
  fontSize: t.label,
4020
3930
  color: this.streamData.isLive ? C2.red : C2.textDim
4021
3931
  }
4022
- ), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: ` \u2022 ${this.streamData.tier?.toUpperCase() || "RELAY"}`, fontSize: t.labelSmall, color: C2.cyan }), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: ` \u2022 ${this.streamData.sparksBalance || 0} Sparks`, fontSize: t.labelSmall, color: C2.textDim })), /* @__PURE__ */ ReactEcs7.createElement(
3932
+ ), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: ` \u2022 ${this.streamData.tier?.toUpperCase() || "RELAY"}`, fontSize: t.labelSmall, color: C2.cyan }), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: ` \u2022 ${this.streamData.sparksBalance || 0} Sparks`, fontSize: t.labelSmall, color: C2.textDim })), /* @__PURE__ */ ReactEcs6.createElement(
4023
3933
  Label6,
4024
3934
  {
4025
3935
  value: `Channel: ${this.streamData.channelName || this.streamData.channelId}`,
@@ -4027,7 +3937,7 @@ var AdminPanelUIModule = class {
4027
3937
  color: C2.textDim,
4028
3938
  uiTransform: { margin: { bottom: 10 } }
4029
3939
  }
4030
- ), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "RTMP Server:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs7.createElement(
3940
+ ), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "RTMP Server:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs6.createElement(
4031
3941
  Label6,
4032
3942
  {
4033
3943
  value: this.streamData.rtmpUrl || "Loading...",
@@ -4035,7 +3945,7 @@ var AdminPanelUIModule = class {
4035
3945
  color: this.streamData.rtmpUrl ? C2.text : C2.textDim,
4036
3946
  uiTransform: { margin: { left: 6 } }
4037
3947
  }
4038
- )), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Stream Key:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs7.createElement(
3948
+ )), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Stream Key:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs6.createElement(
4039
3949
  Label6,
4040
3950
  {
4041
3951
  value: this.streamData.streamKey || "Loading...",
@@ -4043,7 +3953,7 @@ var AdminPanelUIModule = class {
4043
3953
  color: this.streamData.streamKey ? C2.cyan : C2.textDim,
4044
3954
  uiTransform: { margin: { left: 6 } }
4045
3955
  }
4046
- )), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "HLS Playback:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs7.createElement(
3956
+ )), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "HLS Playback:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs6.createElement(
4047
3957
  Label6,
4048
3958
  {
4049
3959
  value: this.streamData.locked === true ? LOCKED_LINE : this.streamData.hlsUrl || "Not available",
@@ -4051,7 +3961,7 @@ var AdminPanelUIModule = class {
4051
3961
  color: this.streamData.locked === true ? C2.yellow : this.streamData.hlsUrl ? C2.green : C2.textDim,
4052
3962
  uiTransform: { margin: { left: 6 } }
4053
3963
  }
4054
- )), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, !this.streamData.isLive && /* @__PURE__ */ ReactEcs7.createElement(
3964
+ )), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, !this.streamData.isLive && /* @__PURE__ */ ReactEcs6.createElement(
4055
3965
  Button4,
4056
3966
  {
4057
3967
  uiTransform: { width: this.s(110), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4061,7 +3971,7 @@ var AdminPanelUIModule = class {
4061
3971
  color: C2.text,
4062
3972
  onMouseDown: () => this.startStream()
4063
3973
  }
4064
- ), this.streamData.isLive && /* @__PURE__ */ ReactEcs7.createElement(
3974
+ ), this.streamData.isLive && /* @__PURE__ */ ReactEcs6.createElement(
4065
3975
  Button4,
4066
3976
  {
4067
3977
  uiTransform: { width: this.s(110), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4071,7 +3981,7 @@ var AdminPanelUIModule = class {
4071
3981
  color: C2.text,
4072
3982
  onMouseDown: () => this.stopStream()
4073
3983
  }
4074
- ), this.streamData.isLive && (this.streamData.hlsUrl || this.streamData.locked === true) && /* @__PURE__ */ ReactEcs7.createElement(
3984
+ ), this.streamData.isLive && (this.streamData.hlsUrl || this.streamData.locked === true) && /* @__PURE__ */ ReactEcs6.createElement(
4075
3985
  Button4,
4076
3986
  {
4077
3987
  uiTransform: { width: this.s(100), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4081,7 +3991,7 @@ var AdminPanelUIModule = class {
4081
3991
  color: C2.text,
4082
3992
  onMouseDown: () => this.playStreamOnScreen()
4083
3993
  }
4084
- )), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs7.createElement(
3994
+ )), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4085
3995
  Button4,
4086
3996
  {
4087
3997
  uiTransform: { width: this.s(80), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4091,7 +4001,7 @@ var AdminPanelUIModule = class {
4091
4001
  color: C2.text,
4092
4002
  onMouseDown: () => this.refreshStreamStatus()
4093
4003
  }
4094
- ), /* @__PURE__ */ ReactEcs7.createElement(
4004
+ ), /* @__PURE__ */ ReactEcs6.createElement(
4095
4005
  Button4,
4096
4006
  {
4097
4007
  uiTransform: { width: this.s(95), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4101,7 +4011,7 @@ var AdminPanelUIModule = class {
4101
4011
  color: C2.text,
4102
4012
  onMouseDown: () => this.rotateStreamKey()
4103
4013
  }
4104
- ), !this.streamData.isLive && !this.channelDeleteLook && /* @__PURE__ */ ReactEcs7.createElement(
4014
+ ), !this.streamData.isLive && !this.channelDeleteLook && /* @__PURE__ */ ReactEcs6.createElement(
4105
4015
  Button4,
4106
4016
  {
4107
4017
  uiTransform: { width: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4111,7 +4021,7 @@ var AdminPanelUIModule = class {
4111
4021
  color: C2.text,
4112
4022
  onMouseDown: () => this.deleteChannel()
4113
4023
  }
4114
- )), !this.streamData.isLive && this.channelDeleteLook && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 6 }, padding: 6 }, uiBackground: { color: C2.section } }, /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "DELETE THIS CHANNEL?", fontSize: t.labelSmall, color: C2.red, uiTransform: { height: this.s(18) } }), channelDeleteLines(this.channelDeleteLook, this.channelDeleteChanged).map((line, i) => /* @__PURE__ */ ReactEcs7.createElement(Label6, { key: `delete-line-${i}`, value: line, fontSize: t.status, color: line.startsWith("WHAT") ? C2.yellow : C2.text, uiTransform: { height: this.s(18) } })), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", margin: { top: 4 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4024
+ )), !this.streamData.isLive && this.channelDeleteLook && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 6 }, padding: 6 }, uiBackground: { color: C2.section } }, /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "DELETE THIS CHANNEL?", fontSize: t.labelSmall, color: C2.red, uiTransform: { height: this.s(18) } }), channelDeleteLines(this.channelDeleteLook, this.channelDeleteChanged).map((line, i) => /* @__PURE__ */ ReactEcs6.createElement(Label6, { key: `delete-line-${i}`, value: line, fontSize: t.status, color: line.startsWith("WHAT") ? C2.yellow : C2.text, uiTransform: { height: this.s(18) } })), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", margin: { top: 4 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4115
4025
  Button4,
4116
4026
  {
4117
4027
  uiTransform: { width: this.s(120), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4121,7 +4031,7 @@ var AdminPanelUIModule = class {
4121
4031
  color: C2.text,
4122
4032
  onMouseDown: () => this.confirmDeleteChannel()
4123
4033
  }
4124
- ), /* @__PURE__ */ ReactEcs7.createElement(
4034
+ ), /* @__PURE__ */ ReactEcs6.createElement(
4125
4035
  Button4,
4126
4036
  {
4127
4037
  uiTransform: { width: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4131,7 +4041,7 @@ var AdminPanelUIModule = class {
4131
4041
  color: C2.text,
4132
4042
  onMouseDown: () => this.cancelDeleteChannel()
4133
4043
  }
4134
- ))), this.streamControlStatus === "started" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Stream started - begin broadcasting in OBS", fontSize: t.status, color: C2.green }), this.streamControlStatus === "stopped" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Stream stopped", fontSize: t.status, color: C2.textDim }), this.keyRotateStatus === "success" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Key rotated! Update OBS", fontSize: t.status, color: C2.green }), this.keyRotateStatus === "error" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Failed to rotate key", fontSize: t.status, color: C2.red }), this.channelDeleteError && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: this.channelDeleteError, fontSize: t.status, color: C2.red }), this.streamControlStatus === "error" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Stream control failed", fontSize: t.status, color: C2.red })), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "PLAY NOW", color: C2.orange }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4044
+ ))), this.streamControlStatus === "started" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Stream started - begin broadcasting in OBS", fontSize: t.status, color: C2.green }), this.streamControlStatus === "stopped" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Stream stopped", fontSize: t.status, color: C2.textDim }), this.keyRotateStatus === "success" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Key rotated! Update OBS", fontSize: t.status, color: C2.green }), this.keyRotateStatus === "error" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Failed to rotate key", fontSize: t.status, color: C2.red }), this.channelDeleteError && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: this.channelDeleteError, fontSize: t.status, color: C2.red }), this.streamControlStatus === "error" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Stream control failed", fontSize: t.status, color: C2.red })), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "PLAY NOW", color: C2.orange }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4135
4045
  Input4,
4136
4046
  {
4137
4047
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4145,7 +4055,7 @@ var AdminPanelUIModule = class {
4145
4055
  this.customVideoUrl = val;
4146
4056
  }
4147
4057
  }
4148
- ), /* @__PURE__ */ ReactEcs7.createElement(
4058
+ ), /* @__PURE__ */ ReactEcs6.createElement(
4149
4059
  Button4,
4150
4060
  {
4151
4061
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4155,7 +4065,7 @@ var AdminPanelUIModule = class {
4155
4065
  color: C2.text,
4156
4066
  onMouseDown: () => this.playNow()
4157
4067
  }
4158
- ), /* @__PURE__ */ ReactEcs7.createElement(
4068
+ ), /* @__PURE__ */ ReactEcs6.createElement(
4159
4069
  Button4,
4160
4070
  {
4161
4071
  uiTransform: { width: this.s(65), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 6 } },
@@ -4167,7 +4077,7 @@ var AdminPanelUIModule = class {
4167
4077
  this.customVideoUrl = "";
4168
4078
  }
4169
4079
  }
4170
- )), this.videoStatus && /* @__PURE__ */ ReactEcs7.createElement(
4080
+ )), this.videoStatus && /* @__PURE__ */ ReactEcs6.createElement(
4171
4081
  Label6,
4172
4082
  {
4173
4083
  value: this.videoStatus,
@@ -4175,7 +4085,7 @@ var AdminPanelUIModule = class {
4175
4085
  color: this.videoStatus.startsWith("Not sent") || this.videoStatus === LOCKED_LINE || this.videoStatus === UNAVAILABLE_LINE ? C2.red : C2.green,
4176
4086
  uiTransform: { height: this.s(18), margin: { bottom: 6 } }
4177
4087
  }
4178
- ), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "PLAYBACK", color: C2.green }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4088
+ ), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "PLAYBACK", color: C2.green }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4179
4089
  Button4,
4180
4090
  {
4181
4091
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4185,7 +4095,7 @@ var AdminPanelUIModule = class {
4185
4095
  color: C2.text,
4186
4096
  onMouseDown: () => this.playbackPlay()
4187
4097
  }
4188
- ), /* @__PURE__ */ ReactEcs7.createElement(
4098
+ ), /* @__PURE__ */ ReactEcs6.createElement(
4189
4099
  Button4,
4190
4100
  {
4191
4101
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4195,7 +4105,7 @@ var AdminPanelUIModule = class {
4195
4105
  color: C2.text,
4196
4106
  onMouseDown: () => this.playbackStop()
4197
4107
  }
4198
- ), /* @__PURE__ */ ReactEcs7.createElement(
4108
+ ), /* @__PURE__ */ ReactEcs6.createElement(
4199
4109
  Button4,
4200
4110
  {
4201
4111
  uiTransform: { width: this.s(100), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4205,7 +4115,7 @@ var AdminPanelUIModule = class {
4205
4115
  color: C2.text,
4206
4116
  onMouseDown: () => this.resetDefault()
4207
4117
  }
4208
- )), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "VIDEO SLOTS", color: C2.cyan }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 10 } } }, ["slot1", "slot2", "slot3", "slot4", "slot5"].map((slot, i) => /* @__PURE__ */ ReactEcs7.createElement(
4118
+ )), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "VIDEO SLOTS", color: C2.cyan }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 10 } } }, ["slot1", "slot2", "slot3", "slot4", "slot5"].map((slot, i) => /* @__PURE__ */ ReactEcs6.createElement(
4209
4119
  Button4,
4210
4120
  {
4211
4121
  key: `play-${slot}`,
@@ -4216,7 +4126,7 @@ var AdminPanelUIModule = class {
4216
4126
  color: C2.text,
4217
4127
  onMouseDown: () => this.pressSlot(slot)
4218
4128
  }
4219
- ))), /* @__PURE__ */ ReactEcs7.createElement(
4129
+ ))), /* @__PURE__ */ ReactEcs6.createElement(
4220
4130
  Button4,
4221
4131
  {
4222
4132
  uiTransform: { height: this.s(24) },
@@ -4230,7 +4140,7 @@ var AdminPanelUIModule = class {
4230
4140
  };
4231
4141
  this.ModTab = () => {
4232
4142
  const t = this.theme;
4233
- return /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.modStatus === "loading" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Loading...", fontSize: t.status, color: C2.yellow }), this.modStatus === "saved" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Saved!", fontSize: t.status, color: C2.green }), this.modStatus === "error" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Error - check input", fontSize: t.status, color: C2.red }), this.kickStatus && /* @__PURE__ */ ReactEcs7.createElement(
4143
+ return /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.modStatus === "loading" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Loading...", fontSize: t.status, color: C2.yellow }), this.modStatus === "saved" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Saved!", fontSize: t.status, color: C2.green }), this.modStatus === "error" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Error - check input", fontSize: t.status, color: C2.red }), this.kickStatus && /* @__PURE__ */ ReactEcs6.createElement(
4234
4144
  Label6,
4235
4145
  {
4236
4146
  value: this.kickStatus,
@@ -4238,7 +4148,7 @@ var AdminPanelUIModule = class {
4238
4148
  color: this.kickStatus.startsWith("Kick not sent") ? C2.red : C2.green,
4239
4149
  uiTransform: { height: this.s(18) }
4240
4150
  }
4241
- ), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "BROADCAST", color: C2.orange }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4151
+ ), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "BROADCAST", color: C2.orange }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4242
4152
  Input4,
4243
4153
  {
4244
4154
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4252,7 +4162,7 @@ var AdminPanelUIModule = class {
4252
4162
  this.broadcastText = val;
4253
4163
  }
4254
4164
  }
4255
- ), /* @__PURE__ */ ReactEcs7.createElement(
4165
+ ), /* @__PURE__ */ ReactEcs6.createElement(
4256
4166
  Button4,
4257
4167
  {
4258
4168
  uiTransform: { width: this.s(65), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4262,7 +4172,7 @@ var AdminPanelUIModule = class {
4262
4172
  color: C2.text,
4263
4173
  onMouseDown: () => this.sendBroadcast()
4264
4174
  }
4265
- )), this.broadcastStatus && /* @__PURE__ */ ReactEcs7.createElement(
4175
+ )), this.broadcastStatus && /* @__PURE__ */ ReactEcs6.createElement(
4266
4176
  Label6,
4267
4177
  {
4268
4178
  value: this.broadcastStatus,
@@ -4270,7 +4180,7 @@ var AdminPanelUIModule = class {
4270
4180
  color: this.broadcastStatus.startsWith("Not sent") ? C2.red : C2.green,
4271
4181
  uiTransform: { height: this.s(18), margin: { bottom: 6 } }
4272
4182
  }
4273
- ), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "CHAOS MODE", color: C2.red }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4183
+ ), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "CHAOS MODE", color: C2.red }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4274
4184
  Button4,
4275
4185
  {
4276
4186
  uiTransform: { width: this.s(130), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: 4 },
@@ -4280,7 +4190,7 @@ var AdminPanelUIModule = class {
4280
4190
  color: C2.text,
4281
4191
  onMouseDown: () => this.kickAll()
4282
4192
  }
4283
- )), this.venue && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "PRIVATE MODE", color: C2.yellow }), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "While ON, only citizens get in", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { height: this.s(18), margin: { bottom: 4 } } }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, [true, false].map((on) => /* @__PURE__ */ ReactEcs7.createElement(
4193
+ )), this.venue && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "PRIVATE MODE", color: C2.yellow }), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "While ON, only citizens get in", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { height: this.s(18), margin: { bottom: 4 } } }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, [true, false].map((on) => /* @__PURE__ */ ReactEcs6.createElement(
4284
4194
  Button4,
4285
4195
  {
4286
4196
  key: `private-${on ? "on" : "off"}`,
@@ -4291,7 +4201,7 @@ var AdminPanelUIModule = class {
4291
4201
  color: this.privateModeOn === on ? Color46.Black() : C2.text,
4292
4202
  onMouseDown: () => this.setPrivateMode(on)
4293
4203
  }
4294
- ))), this.privateStatus && /* @__PURE__ */ ReactEcs7.createElement(
4204
+ ))), this.privateStatus && /* @__PURE__ */ ReactEcs6.createElement(
4295
4205
  Label6,
4296
4206
  {
4297
4207
  value: this.privateStatus,
@@ -4299,13 +4209,13 @@ var AdminPanelUIModule = class {
4299
4209
  color: this.privateStatus.startsWith("Not sent") ? C2.red : C2.green,
4300
4210
  uiTransform: { height: this.s(18) }
4301
4211
  }
4302
- )), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "SCENE ADMINS", color: C2.purple }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.sceneAdmins.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "No scene admins", fontSize: t.labelSmall, color: C2.textDim }), this.sceneAdmins.map((wallet, i) => /* @__PURE__ */ ReactEcs7.createElement(
4303
- UiEntity7,
4212
+ )), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "SCENE ADMINS", color: C2.purple }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.sceneAdmins.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "No scene admins", fontSize: t.labelSmall, color: C2.textDim }), this.sceneAdmins.map((wallet, i) => /* @__PURE__ */ ReactEcs6.createElement(
4213
+ UiEntity6,
4304
4214
  {
4305
4215
  key: `admin-${i}`,
4306
4216
  uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 5 }, width: "100%" }
4307
4217
  },
4308
- /* @__PURE__ */ ReactEcs7.createElement(
4218
+ /* @__PURE__ */ ReactEcs6.createElement(
4309
4219
  Label6,
4310
4220
  {
4311
4221
  value: `${wallet.slice(0, 6)}...${wallet.slice(-4)}`,
@@ -4314,7 +4224,7 @@ var AdminPanelUIModule = class {
4314
4224
  uiTransform: { width: this.s(130) }
4315
4225
  }
4316
4226
  ),
4317
- /* @__PURE__ */ ReactEcs7.createElement(
4227
+ /* @__PURE__ */ ReactEcs6.createElement(
4318
4228
  Button4,
4319
4229
  {
4320
4230
  uiTransform: { width: this.s(70), height: this.s(28), margin: { left: 8 } },
@@ -4325,7 +4235,7 @@ var AdminPanelUIModule = class {
4325
4235
  onMouseDown: () => this.removeSceneAdmin(wallet)
4326
4236
  }
4327
4237
  )
4328
- ))), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4238
+ ))), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4329
4239
  Input4,
4330
4240
  {
4331
4241
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4339,7 +4249,7 @@ var AdminPanelUIModule = class {
4339
4249
  this.newAdminWallet = val;
4340
4250
  }
4341
4251
  }
4342
- ), /* @__PURE__ */ ReactEcs7.createElement(
4252
+ ), /* @__PURE__ */ ReactEcs6.createElement(
4343
4253
  Button4,
4344
4254
  {
4345
4255
  uiTransform: { width: this.s(60), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4351,13 +4261,13 @@ var AdminPanelUIModule = class {
4351
4261
  if (this.newAdminWallet) this.addSceneAdmin(this.newAdminWallet);
4352
4262
  }
4353
4263
  }
4354
- )), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "BANNED WALLETS", color: C2.red }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.bannedWallets.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "No banned wallets", fontSize: t.labelSmall, color: C2.textDim }), this.bannedWallets.map((wallet, i) => /* @__PURE__ */ ReactEcs7.createElement(
4355
- UiEntity7,
4264
+ )), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "BANNED WALLETS", color: C2.red }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.bannedWallets.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "No banned wallets", fontSize: t.labelSmall, color: C2.textDim }), this.bannedWallets.map((wallet, i) => /* @__PURE__ */ ReactEcs6.createElement(
4265
+ UiEntity6,
4356
4266
  {
4357
4267
  key: `ban-${i}`,
4358
4268
  uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 5 }, width: "100%" }
4359
4269
  },
4360
- /* @__PURE__ */ ReactEcs7.createElement(
4270
+ /* @__PURE__ */ ReactEcs6.createElement(
4361
4271
  Label6,
4362
4272
  {
4363
4273
  value: `${wallet.slice(0, 6)}...${wallet.slice(-4)}`,
@@ -4366,7 +4276,7 @@ var AdminPanelUIModule = class {
4366
4276
  uiTransform: { width: this.s(130) }
4367
4277
  }
4368
4278
  ),
4369
- /* @__PURE__ */ ReactEcs7.createElement(
4279
+ /* @__PURE__ */ ReactEcs6.createElement(
4370
4280
  Button4,
4371
4281
  {
4372
4282
  uiTransform: { width: this.s(70), height: this.s(28), margin: { left: 8 } },
@@ -4377,7 +4287,7 @@ var AdminPanelUIModule = class {
4377
4287
  onMouseDown: () => this.unbanWallet(wallet)
4378
4288
  }
4379
4289
  )
4380
- ))), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4290
+ ))), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4381
4291
  Input4,
4382
4292
  {
4383
4293
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4391,7 +4301,7 @@ var AdminPanelUIModule = class {
4391
4301
  this.newBanWallet = val;
4392
4302
  }
4393
4303
  }
4394
- ), /* @__PURE__ */ ReactEcs7.createElement(
4304
+ ), /* @__PURE__ */ ReactEcs6.createElement(
4395
4305
  Button4,
4396
4306
  {
4397
4307
  uiTransform: { width: this.s(60), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4403,7 +4313,7 @@ var AdminPanelUIModule = class {
4403
4313
  if (this.newBanWallet) this.banWallet(this.newBanWallet);
4404
4314
  }
4405
4315
  }
4406
- )), /* @__PURE__ */ ReactEcs7.createElement(
4316
+ )), /* @__PURE__ */ ReactEcs6.createElement(
4407
4317
  Button4,
4408
4318
  {
4409
4319
  uiTransform: { height: this.s(24) },
@@ -4450,8 +4360,8 @@ var AdminPanelUIModule = class {
4450
4360
  if (!tabs.find((tab) => tab.id === this.activeTab) && tabs.length > 0) {
4451
4361
  this.activeTab = tabs[0].id;
4452
4362
  }
4453
- return /* @__PURE__ */ ReactEcs7.createElement(
4454
- UiEntity7,
4363
+ return /* @__PURE__ */ ReactEcs6.createElement(
4364
+ UiEntity6,
4455
4365
  {
4456
4366
  uiTransform: {
4457
4367
  width: "100%",
@@ -4460,8 +4370,11 @@ var AdminPanelUIModule = class {
4460
4370
  }
4461
4371
  },
4462
4372
  this.renderScaledNotification(),
4463
- this.client.isPhone ? toolbarButton(2, { children: [this.renderToggleFace()] }, true, this.client.uiScale) : /* @__PURE__ */ ReactEcs7.createElement(
4464
- UiEntity7,
4373
+ this.client.isPhone || this.client.toolbarCollapsed ? this.client.toolbarButton(2, {
4374
+ uiBackground: { color: this.panelOpen ? C2.btn : C2.header },
4375
+ children: [this.renderToggleFace()]
4376
+ }) : /* @__PURE__ */ ReactEcs6.createElement(
4377
+ UiEntity6,
4465
4378
  {
4466
4379
  uiTransform: {
4467
4380
  position: { right: 20 + this.s(100) + 10 + this.s(100) + 10, bottom: 10 },
@@ -4470,87 +4383,89 @@ var AdminPanelUIModule = class {
4470
4383
  },
4471
4384
  this.renderToggleFace()
4472
4385
  ),
4473
- this.panelOpen && /* @__PURE__ */ ReactEcs7.createElement(
4474
- UiEntity7,
4475
- {
4476
- key: `admin-panel-${this.client.uiScale}`,
4477
- uiTransform: {
4478
- width: this.s(UI_DIMENSIONS.admin.width),
4479
- height: this.s(UI_DIMENSIONS.admin.height),
4480
- maxHeight: this.s(UI_DIMENSIONS.admin.maxHeight),
4481
- // On a phone, left of the toolbar's column (2.12.0); elsewhere left of the chat panel, as before
4482
- position: { right: this.client.panelRight(UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10), bottom: UI_DIMENSIONS.admin.bottom },
4483
- positionType: "absolute",
4484
- flexDirection: "column"
4485
- },
4486
- uiBackground: { color: C2.bg }
4386
+ this.panelOpen && this.client.toolbarPanel({
4387
+ key: `admin-panel-${this.client.uiScale}`,
4388
+ uiTransform: {
4389
+ width: this.s(UI_DIMENSIONS.admin.width),
4390
+ height: this.s(UI_DIMENSIONS.admin.height),
4391
+ maxHeight: this.s(UI_DIMENSIONS.admin.maxHeight),
4392
+ position: { right: UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10, bottom: UI_DIMENSIONS.admin.bottom },
4393
+ positionType: "absolute",
4394
+ flexDirection: "column"
4487
4395
  },
4488
- /* @__PURE__ */ ReactEcs7.createElement(
4489
- UiEntity7,
4490
- {
4491
- uiTransform: {
4492
- width: "100%",
4493
- height: this.s(UI_DIMENSIONS.admin.headerHeight),
4494
- justifyContent: "space-between",
4495
- alignItems: "center",
4496
- flexDirection: "row",
4497
- padding: { left: 12, right: 8 }
4396
+ uiBackground: { color: C2.bg },
4397
+ children: [
4398
+ // Header with font controls
4399
+ /* @__PURE__ */ ReactEcs6.createElement(
4400
+ UiEntity6,
4401
+ {
4402
+ uiTransform: {
4403
+ width: "100%",
4404
+ height: this.s(UI_DIMENSIONS.admin.headerHeight),
4405
+ justifyContent: "space-between",
4406
+ alignItems: "center",
4407
+ flexDirection: "row",
4408
+ padding: { left: 12, right: 8 }
4409
+ },
4410
+ uiBackground: { color: C2.header }
4498
4411
  },
4499
- uiBackground: { color: C2.header }
4500
- },
4501
- /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: this.config.title || "ADMIN PANEL", fontSize: t.header, color: C2.text }),
4502
- /* @__PURE__ */ ReactEcs7.createElement(
4503
- Button4,
4412
+ /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: this.config.title || "ADMIN PANEL", fontSize: t.header, color: C2.text }),
4413
+ /* @__PURE__ */ ReactEcs6.createElement(
4414
+ Button4,
4415
+ {
4416
+ uiTransform: { width: this.s(28), height: this.s(28) },
4417
+ uiBackground: { color: Color46.create(0, 0, 0, 0.3) },
4418
+ value: "X",
4419
+ fontSize: t.header,
4420
+ color: THEME.colors.red,
4421
+ onMouseDown: () => this.hide()
4422
+ }
4423
+ )
4424
+ ),
4425
+ // Tabs
4426
+ /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { width: "100%", height: this.s(UI_DIMENSIONS.admin.tabHeight), flexDirection: "row" } }, tabs.map((tab) => /* @__PURE__ */ ReactEcs6.createElement(this.TabBtn, { label: tab.label, tab: tab.id }))),
4427
+ // Content
4428
+ /* @__PURE__ */ ReactEcs6.createElement(
4429
+ UiEntity6,
4504
4430
  {
4505
- uiTransform: { width: this.s(28), height: this.s(28) },
4506
- uiBackground: { color: Color46.create(0, 0, 0, 0.3) },
4507
- value: "X",
4508
- fontSize: t.header,
4509
- color: THEME.colors.red,
4510
- onMouseDown: () => this.hide()
4511
- }
4512
- )
4513
- ),
4514
- /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { width: "100%", height: this.s(UI_DIMENSIONS.admin.tabHeight), flexDirection: "row" } }, tabs.map((tab) => /* @__PURE__ */ ReactEcs7.createElement(this.TabBtn, { label: tab.label, tab: tab.id }))),
4515
- /* @__PURE__ */ ReactEcs7.createElement(
4516
- UiEntity7,
4517
- {
4518
- uiTransform: {
4519
- width: "100%",
4520
- flexGrow: 1,
4521
- overflow: "scroll",
4522
- flexDirection: "column"
4523
- }
4524
- },
4525
- this.activeTab === "controls" && this.venue && this.controls.length > 0 && /* @__PURE__ */ ReactEcs7.createElement(this.ControlsTab, null),
4526
- this.activeTab === "video" && /* @__PURE__ */ ReactEcs7.createElement(this.VideoTab, null),
4527
- this.activeTab === "mod" && this.isOwner && /* @__PURE__ */ ReactEcs7.createElement(this.ModTab, null),
4528
- this.config.sceneTabs?.map((tab) => this.activeTab === tab.id && tab.render())
4529
- ),
4530
- /* @__PURE__ */ ReactEcs7.createElement(
4531
- UiEntity7,
4532
- {
4533
- uiTransform: {
4534
- width: "100%",
4535
- height: this.s(UI_DIMENSIONS.admin.footerHeight),
4536
- justifyContent: "center",
4537
- alignItems: "center"
4431
+ uiTransform: {
4432
+ width: "100%",
4433
+ flexGrow: 1,
4434
+ overflow: "scroll",
4435
+ flexDirection: "column"
4436
+ }
4538
4437
  },
4539
- uiBackground: { color: C2.section }
4540
- },
4541
- /* @__PURE__ */ ReactEcs7.createElement(
4542
- Button4,
4438
+ this.activeTab === "controls" && this.venue && this.controls.length > 0 && /* @__PURE__ */ ReactEcs6.createElement(this.ControlsTab, null),
4439
+ this.activeTab === "video" && /* @__PURE__ */ ReactEcs6.createElement(this.VideoTab, null),
4440
+ this.activeTab === "mod" && this.isOwner && /* @__PURE__ */ ReactEcs6.createElement(this.ModTab, null),
4441
+ this.config.sceneTabs?.map((tab) => this.activeTab === tab.id && tab.render())
4442
+ ),
4443
+ // Footer
4444
+ /* @__PURE__ */ ReactEcs6.createElement(
4445
+ UiEntity6,
4543
4446
  {
4544
- uiTransform: { height: this.s(24) },
4545
- uiBackground: { color: Color46.create(0, 0, 0, 0) },
4546
- value: `thestatic.tv/scene/${this.config.sceneId}`,
4547
- fontSize: t.labelSmall,
4548
- color: C2.cyan,
4549
- onMouseDown: () => openExternalUrl5({ url: this.config.footerLink || `https://thestatic.tv/scene/${this.config.sceneId}` })
4550
- }
4447
+ uiTransform: {
4448
+ width: "100%",
4449
+ height: this.s(UI_DIMENSIONS.admin.footerHeight),
4450
+ justifyContent: "center",
4451
+ alignItems: "center"
4452
+ },
4453
+ uiBackground: { color: C2.section }
4454
+ },
4455
+ /* @__PURE__ */ ReactEcs6.createElement(
4456
+ Button4,
4457
+ {
4458
+ uiTransform: { height: this.s(24) },
4459
+ uiBackground: { color: Color46.create(0, 0, 0, 0) },
4460
+ value: `thestatic.tv/scene/${this.config.sceneId}`,
4461
+ fontSize: t.labelSmall,
4462
+ color: C2.cyan,
4463
+ onMouseDown: () => openExternalUrl5({ url: this.config.footerLink || `https://thestatic.tv/scene/${this.config.sceneId}` })
4464
+ }
4465
+ )
4551
4466
  )
4552
- )
4553
- )
4467
+ ]
4468
+ })
4554
4469
  );
4555
4470
  };
4556
4471
  this.client = client;
@@ -5706,7 +5621,7 @@ var AdminPanelUIModule = class {
5706
5621
  /** A control's button (2026-11-18): the option's label, highlighted while that option is current on this copy */
5707
5622
  controlButton(control, option, label) {
5708
5623
  const current = this.currentOption[control.id] === option;
5709
- return /* @__PURE__ */ ReactEcs7.createElement(
5624
+ return /* @__PURE__ */ ReactEcs6.createElement(
5710
5625
  Button4,
5711
5626
  {
5712
5627
  key: `control-${control.id}-${option}`,
@@ -5729,8 +5644,8 @@ var AdminPanelUIModule = class {
5729
5644
  if (!state.visible) return null;
5730
5645
  const N2 = UI_DIMENSIONS.notification;
5731
5646
  const colors = THEME.colors;
5732
- return /* @__PURE__ */ ReactEcs7.createElement(
5733
- UiEntity7,
5647
+ return /* @__PURE__ */ ReactEcs6.createElement(
5648
+ UiEntity6,
5734
5649
  {
5735
5650
  uiTransform: {
5736
5651
  positionType: "absolute",
@@ -5740,8 +5655,8 @@ var AdminPanelUIModule = class {
5740
5655
  alignItems: "center"
5741
5656
  }
5742
5657
  },
5743
- /* @__PURE__ */ ReactEcs7.createElement(
5744
- UiEntity7,
5658
+ /* @__PURE__ */ ReactEcs6.createElement(
5659
+ UiEntity6,
5745
5660
  {
5746
5661
  uiTransform: {
5747
5662
  minWidth: this.s(200),
@@ -5753,15 +5668,15 @@ var AdminPanelUIModule = class {
5753
5668
  },
5754
5669
  uiBackground: { color: colors.panel }
5755
5670
  },
5756
- /* @__PURE__ */ ReactEcs7.createElement(
5757
- UiEntity7,
5671
+ /* @__PURE__ */ ReactEcs6.createElement(
5672
+ UiEntity6,
5758
5673
  {
5759
5674
  uiTransform: { width: N2.borderWidth, height: "100%" },
5760
5675
  uiBackground: { color: colors.cyan }
5761
5676
  }
5762
5677
  ),
5763
- /* @__PURE__ */ ReactEcs7.createElement(
5764
- UiEntity7,
5678
+ /* @__PURE__ */ ReactEcs6.createElement(
5679
+ UiEntity6,
5765
5680
  {
5766
5681
  uiTransform: {
5767
5682
  flexGrow: 1,
@@ -5771,7 +5686,7 @@ var AdminPanelUIModule = class {
5771
5686
  alignItems: "center"
5772
5687
  }
5773
5688
  },
5774
- /* @__PURE__ */ ReactEcs7.createElement(
5689
+ /* @__PURE__ */ ReactEcs6.createElement(
5775
5690
  Label6,
5776
5691
  {
5777
5692
  value: state.text,
@@ -5781,8 +5696,8 @@ var AdminPanelUIModule = class {
5781
5696
  }
5782
5697
  )
5783
5698
  ),
5784
- /* @__PURE__ */ ReactEcs7.createElement(
5785
- UiEntity7,
5699
+ /* @__PURE__ */ ReactEcs6.createElement(
5700
+ UiEntity6,
5786
5701
  {
5787
5702
  uiTransform: { width: 5, height: 5, margin: { right: 10 } },
5788
5703
  uiBackground: { color: colors.cyan }
@@ -5793,7 +5708,7 @@ var AdminPanelUIModule = class {
5793
5708
  }
5794
5709
  /** The ADMIN / CLOSE button itself; its place is the row's or, on a phone, the column's (2.12.0) */
5795
5710
  renderToggleFace() {
5796
- return /* @__PURE__ */ ReactEcs7.createElement(
5711
+ return /* @__PURE__ */ ReactEcs6.createElement(
5797
5712
  Button4,
5798
5713
  {
5799
5714
  uiTransform: { width: this.s(100), height: this.s(45) },
@@ -5809,6 +5724,247 @@ var AdminPanelUIModule = class {
5809
5724
 
5810
5725
  // src/StaticTVClient.ts
5811
5726
  import { getExplorerInformation } from "~system/Runtime";
5727
+
5728
+ // src/ui/toolbar.ts
5729
+ var TOOLBAR = { edge: 20, gap: 10, buttonWidth: 100, buttonHeight: 45, bottom: 10 };
5730
+ var COLUMN_SLOTS = 5;
5731
+ var PHONE_EDGE = 0;
5732
+ var HANDLE = 24;
5733
+ var STRIP = { phone: 12, desktop: 10 };
5734
+ function platformOf(answer) {
5735
+ const raw = answer?.platform;
5736
+ if (typeof raw !== "string") return "unknown";
5737
+ const p = raw.trim().toLowerCase();
5738
+ return p === "desktop" || p === "mobile" || p === "vr" || p === "web" ? p : "unknown";
5739
+ }
5740
+ function isPhonePlatform(platform) {
5741
+ return platform === "mobile";
5742
+ }
5743
+ var scaled = (value, uiScale) => Math.round(value * uiScale);
5744
+ function rowRight(slot, uiScale = 1) {
5745
+ return TOOLBAR.edge + slot * (scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap);
5746
+ }
5747
+ function columnSlot(slot, uiScale = 1) {
5748
+ const h = scaled(TOOLBAR.buttonHeight, uiScale);
5749
+ const handle = scaled(HANDLE, uiScale) + TOOLBAR.gap;
5750
+ return {
5751
+ right: PHONE_EDGE,
5752
+ boxHeight: handle + COLUMN_SLOTS * h + (COLUMN_SLOTS - 1) * TOOLBAR.gap,
5753
+ above: handle + Math.max(0, slot) * (h + TOOLBAR.gap)
5754
+ };
5755
+ }
5756
+ function handlePlace(phone, lastSlot, uiScale = 1) {
5757
+ if (phone) {
5758
+ return {
5759
+ right: PHONE_EDGE,
5760
+ width: scaled(TOOLBAR.buttonWidth, uiScale),
5761
+ height: scaled(HANDLE, uiScale),
5762
+ boxHeight: columnSlot(0, uiScale).boxHeight,
5763
+ above: 0
5764
+ };
5765
+ }
5766
+ return {
5767
+ right: rowRight(Math.max(0, lastSlot) + 1, uiScale),
5768
+ bottom: TOOLBAR.bottom,
5769
+ width: scaled(HANDLE, uiScale),
5770
+ height: scaled(TOOLBAR.buttonHeight, uiScale)
5771
+ };
5772
+ }
5773
+ function stripPlace(slot, phone, uiScale = 1) {
5774
+ if (phone) return { right: PHONE_EDGE, width: scaled(STRIP.phone, uiScale), height: scaled(TOOLBAR.buttonHeight, uiScale) };
5775
+ return { right: rowRight(slot, uiScale), bottom: 0, width: scaled(TOOLBAR.buttonWidth, uiScale), height: scaled(STRIP.desktop, uiScale) };
5776
+ }
5777
+ var ToolbarFold = class {
5778
+ constructor(closeAll) {
5779
+ this._collapsed = false;
5780
+ this._sceneLast = -1;
5781
+ this.closeAll = closeAll;
5782
+ }
5783
+ get collapsed() {
5784
+ return this._collapsed;
5785
+ }
5786
+ collapse() {
5787
+ if (this._collapsed) return;
5788
+ this.closeAll();
5789
+ this._collapsed = true;
5790
+ }
5791
+ expand() {
5792
+ this._collapsed = false;
5793
+ }
5794
+ /** A button was drawn in `slot` */
5795
+ seen(slot) {
5796
+ if (slot > this._sceneLast) this._sceneLast = slot;
5797
+ }
5798
+ /** The row's last slot: the SDK's own last (ADMIN's 2 when drawn, else GUIDE's 1) or a scene's, whichever is higher */
5799
+ lastSlot(sdkLast) {
5800
+ return Math.max(sdkLast, this._sceneLast);
5801
+ }
5802
+ };
5803
+ function panelRight(phone, desktopRight, uiScale = 1) {
5804
+ return phone ? PHONE_EDGE + scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap : desktopRight;
5805
+ }
5806
+ var DESKTOP_CLOSES = { guide: ["admin"], admin: ["guide"] };
5807
+ var GUIDE_PLACE = ["guide", "admin"];
5808
+ function panelsToClose(opened, registered, phone, coversGuide = []) {
5809
+ if (phone) return registered.filter((name) => name !== opened);
5810
+ const closes = [...DESKTOP_CLOSES[opened] ?? []];
5811
+ if (GUIDE_PLACE.includes(opened)) closes.push(...coversGuide);
5812
+ if (coversGuide.includes(opened)) closes.push(...GUIDE_PLACE);
5813
+ return registered.filter((name) => name !== opened && closes.includes(name));
5814
+ }
5815
+ var PanelRules = class {
5816
+ constructor(phone) {
5817
+ this.hides = /* @__PURE__ */ new Map();
5818
+ this.coveringGuide = /* @__PURE__ */ new Set();
5819
+ this.phone = phone;
5820
+ }
5821
+ /** Register (or replace) a panel; its hide runs when another panel opens and the rule says so */
5822
+ register(name, hide, options = {}) {
5823
+ this.hides.set(name, hide);
5824
+ if (options.coversGuide === true) this.coveringGuide.add(name);
5825
+ else this.coveringGuide.delete(name);
5826
+ }
5827
+ /** Close every registered panel (2.14.0, the toolbar collapsing). One failing hide does not stop the rest. */
5828
+ closeAll() {
5829
+ for (const hide of this.hides.values()) {
5830
+ try {
5831
+ hide();
5832
+ } catch {
5833
+ }
5834
+ }
5835
+ }
5836
+ /** A panel opened: close the ones the rule names. One failing hide does not stop the rest. */
5837
+ opened(name) {
5838
+ for (const other of panelsToClose(name, [...this.hides.keys()], this.phone(), [...this.coveringGuide])) {
5839
+ try {
5840
+ this.hides.get(other)?.();
5841
+ } catch {
5842
+ }
5843
+ }
5844
+ }
5845
+ get names() {
5846
+ return [...this.hides.keys()];
5847
+ }
5848
+ };
5849
+
5850
+ // src/ui/toolbar-button.ts
5851
+ import ReactEcs7, { UiEntity as UiEntity7 } from "@dcl/sdk/react-ecs";
5852
+ function inColumn(width, boxHeight, above, right, entity) {
5853
+ return ReactEcs7.createElement(UiEntity7, {
5854
+ uiTransform: {
5855
+ positionType: "absolute",
5856
+ position: { right, top: 0 },
5857
+ width,
5858
+ height: "100%",
5859
+ flexDirection: "column",
5860
+ justifyContent: "center"
5861
+ },
5862
+ children: [
5863
+ ReactEcs7.createElement(UiEntity7, {
5864
+ uiTransform: { width, height: boxHeight, flexDirection: "column", flexShrink: 0 },
5865
+ children: [
5866
+ ReactEcs7.createElement(UiEntity7, { uiTransform: { width, height: above, flexShrink: 0 } }),
5867
+ entity
5868
+ ]
5869
+ })
5870
+ ]
5871
+ });
5872
+ }
5873
+ function toolbarButton(slot, props, phone, uiScale = 1, fold) {
5874
+ const width = Math.round(TOOLBAR.buttonWidth * uiScale);
5875
+ const height = Math.round(TOOLBAR.buttonHeight * uiScale);
5876
+ if (fold?.collapsed) {
5877
+ const strip = stripPlace(slot, phone, uiScale);
5878
+ const face = { uiBackground: props.uiBackground, onMouseDown: () => fold.expand() };
5879
+ if (!phone) {
5880
+ return ReactEcs7.createElement(UiEntity7, {
5881
+ ...face,
5882
+ uiTransform: {
5883
+ positionType: "absolute",
5884
+ position: { right: strip.right, bottom: strip.bottom },
5885
+ width: strip.width,
5886
+ height: strip.height
5887
+ }
5888
+ });
5889
+ }
5890
+ const place2 = columnSlot(slot, uiScale);
5891
+ return inColumn(strip.width, place2.boxHeight, place2.above, strip.right, ReactEcs7.createElement(UiEntity7, {
5892
+ ...face,
5893
+ uiTransform: { width: strip.width, height: strip.height, flexShrink: 0 }
5894
+ }));
5895
+ }
5896
+ if (!phone) {
5897
+ return ReactEcs7.createElement(UiEntity7, {
5898
+ ...props,
5899
+ uiTransform: {
5900
+ positionType: "absolute",
5901
+ position: { right: rowRight(slot, uiScale), bottom: TOOLBAR.bottom },
5902
+ width,
5903
+ height,
5904
+ ...props.uiTransform
5905
+ }
5906
+ });
5907
+ }
5908
+ const place = columnSlot(slot, uiScale);
5909
+ return inColumn(width, place.boxHeight, place.above, place.right, ReactEcs7.createElement(UiEntity7, {
5910
+ ...props,
5911
+ uiTransform: { width, height, flexShrink: 0, ...props.uiTransform }
5912
+ }));
5913
+ }
5914
+ function toolbarHandle(phone, lastSlot, collapse, uiScale = 1) {
5915
+ const place = handlePlace(phone, lastSlot, uiScale);
5916
+ const face = {
5917
+ uiBackground: { color: THEME.colors.buttonBackground },
5918
+ onMouseDown: collapse,
5919
+ children: [
5920
+ ReactEcs7.createElement(UiEntity7, {
5921
+ uiText: { value: ">", fontSize: Math.round(14 * uiScale), color: THEME.colors.gray, textAlign: "middle-center" }
5922
+ })
5923
+ ]
5924
+ };
5925
+ if (!phone) {
5926
+ return ReactEcs7.createElement(UiEntity7, {
5927
+ ...face,
5928
+ uiTransform: {
5929
+ positionType: "absolute",
5930
+ position: { right: place.right, bottom: place.bottom },
5931
+ width: place.width,
5932
+ height: place.height,
5933
+ justifyContent: "center",
5934
+ alignItems: "center"
5935
+ }
5936
+ });
5937
+ }
5938
+ return inColumn(place.width, place.boxHeight, place.above, place.right, ReactEcs7.createElement(UiEntity7, {
5939
+ ...face,
5940
+ uiTransform: { width: place.width, height: place.height, flexShrink: 0, justifyContent: "center", alignItems: "center" }
5941
+ }));
5942
+ }
5943
+
5944
+ // src/ui/toolbar-panel.ts
5945
+ import ReactEcs8, { UiEntity as UiEntity8 } from "@dcl/sdk/react-ecs";
5946
+ function toolbarPanel(props, phone, uiScale = 1) {
5947
+ if (!phone) return ReactEcs8.createElement(UiEntity8, props);
5948
+ const { key, uiTransform = {}, ...rest } = props;
5949
+ const { position: _position, positionType: _positionType, ...ownLayout } = uiTransform;
5950
+ const spacer = () => ReactEcs8.createElement(UiEntity8, { uiTransform: { height: 0, flexGrow: 1 } });
5951
+ return ReactEcs8.createElement(UiEntity8, {
5952
+ key,
5953
+ uiTransform: {
5954
+ positionType: "absolute",
5955
+ position: { right: panelRight(true, 0, uiScale), top: 0 },
5956
+ height: "100%",
5957
+ flexDirection: "column"
5958
+ },
5959
+ children: [
5960
+ spacer(),
5961
+ ReactEcs8.createElement(UiEntity8, { ...rest, uiTransform: { ...ownLayout, flexShrink: 0 } }),
5962
+ spacer()
5963
+ ]
5964
+ });
5965
+ }
5966
+
5967
+ // src/StaticTVClient.ts
5812
5968
  import { VideoPlayer, videoEventsSystem, VideoState } from "@dcl/sdk/ecs";
5813
5969
  import * as utils from "@dcl-sdk/utils";
5814
5970
  var DEFAULT_BASE_URL = "https://thestatic.tv/api/v1/dcl";
@@ -5882,6 +6038,8 @@ var _StaticTVClient = class _StaticTVClient {
5882
6038
  * scene's (registerPanel); elsewhere the guide and the admin panel close each other, as before.
5883
6039
  */
5884
6040
  this.panelRules = new PanelRules(() => this.isPhone);
6041
+ /** The toolbar collapsed to strips or not, for the visit (2.14.0): collapsing closes every panel first */
6042
+ this.fold = new ToolbarFold(() => this.panelRules.closeAll());
5885
6043
  // =============================================================================
5886
6044
  // --- VIDEO PLAYBACK (Internal handler for videoScreen) ---
5887
6045
  // =============================================================================
@@ -6815,7 +6973,8 @@ var _StaticTVClient = class _StaticTVClient {
6815
6973
  * placed its own by hand before), the column on a phone. Slots count from the right (the row) or the top (the
6816
6974
  * column): 0 is CHAT's, 1 GUIDE's, 2 ADMIN's (for a non-admin the scene's first button may take it), then the
6817
6975
  * scene's. `props` is the button's face - its uiBackground, onMouseDown and children - the slot gives its place and
6818
- * size (a width or height in props.uiTransform wins).
6976
+ * size (a width or height in props.uiTransform wins). Collapsed (2.14.0) it draws a strip in the face's uiBackground
6977
+ * color instead, flush on the edge, and a press on any strip expands the toolbar.
6819
6978
  *
6820
6979
  * @example
6821
6980
  * ```typescript
@@ -6828,26 +6987,72 @@ var _StaticTVClient = class _StaticTVClient {
6828
6987
  * ```
6829
6988
  */
6830
6989
  toolbarButton(slot, props) {
6831
- return toolbarButton(slot, props, this.isPhone, this.uiScale);
6990
+ this.fold.seen(slot);
6991
+ return toolbarButton(slot, props, this.isPhone, this.uiScale, {
6992
+ collapsed: this.fold.collapsed,
6993
+ expand: () => this.fold.expand()
6994
+ });
6995
+ }
6996
+ /**
6997
+ * The toolbar collapsed to strips (2.14.0, his ask: "small tabs out of users way"): the `>` handle collapses it and
6998
+ * closes every open panel, the scene's registered ones too; any strip expands it. For the visit only; it starts
6999
+ * expanded. A scene drawing its buttons through toolbarButton needs nothing more.
7000
+ */
7001
+ get toolbarCollapsed() {
7002
+ return this.fold.collapsed;
6832
7003
  }
6833
- /** Where a scene's own panel's right edge goes: on a phone just left of the column; elsewhere `desktopRight` */
7004
+ /**
7005
+ * The `>` handle, drawn by the SDK's chat (2.14.0): on a phone a bar on top of the column, on desktop a tab one slot
7006
+ * past the row's last button (ADMIN's or a scene's), so no button moves. Nothing while collapsed.
7007
+ * @internal
7008
+ */
7009
+ toolbarHandle() {
7010
+ if (this.fold.collapsed) return null;
7011
+ const sdkLast = this.adminPanel?.hasAccess === true ? 2 : 1;
7012
+ return toolbarHandle(this.isPhone, this.fold.lastSlot(sdkLast), () => this.fold.collapse(), this.uiScale);
7013
+ }
7014
+ /** Where a scene's own panel's right edge goes: on a phone one gap left of the column; elsewhere `desktopRight` */
6834
7015
  panelRight(desktopRight) {
6835
7016
  return panelRight(this.isPhone, desktopRight, this.uiScale);
6836
7017
  }
6837
7018
  /**
6838
- * Put one of the scene's own panels under the one-panel rule: on a phone, when another panel opens (the SDK's or the
6839
- * scene's), `hide` runs. The SDK's own names (guide, chat, admin) are taken. Call panelOpened(name) when it opens.
7019
+ * Draw one of the scene's own panels in its place (2.13.0): on desktop exactly as `props` say (their absolute
7020
+ * position included), on a phone centered on the screen's height one gap left of the toolbar's column, its top at
7021
+ * (canvas height - panel height) / 2 - or at the canvas's top when the panel is taller, so its header and close
7022
+ * button stay on screen. `props` is the panel's UiEntity props as on desktop: key, uiTransform, uiBackground,
7023
+ * children. The SDK's own chat, guide and admin panel draw through it.
7024
+ *
7025
+ * @example
7026
+ * ```typescript
7027
+ * myPanel.isOpen ? staticTV.toolbarPanel({
7028
+ * uiTransform: { positionType: 'absolute', position: { right: 20, bottom: 55 }, width: 380, height: 580 },
7029
+ * uiBackground: { color: Color4.create(0.05, 0.05, 0.08, 0.98) },
7030
+ * children: [header, body],
7031
+ * }) : null
7032
+ * ```
7033
+ */
7034
+ toolbarPanel(props) {
7035
+ return toolbarPanel(props, this.isPhone, this.uiScale);
7036
+ }
7037
+ /**
7038
+ * Put one of the scene's own panels under the panel rule: on a phone, when another panel opens (the SDK's or the
7039
+ * scene's), `hide` runs. On desktop (2.13.0), with `{ coversGuide: true }`, the panel and the guide's place close
7040
+ * each other: opening it closes the guide and the admin panel, and opening either runs `hide`; without it, the SDK
7041
+ * leaves the panel to the scene there. The SDK's own names (guide, chat, admin) are taken. Call panelOpened(name)
7042
+ * when it opens.
6840
7043
  */
6841
- registerPanel(name, hide) {
7044
+ registerPanel(name, hide, options = {}) {
6842
7045
  if (_StaticTVClient.OWN_PANELS.includes(name)) {
6843
7046
  this.log(`registerPanel: '${name}' is one of the SDK's own panels - pick another name`);
6844
7047
  return;
6845
7048
  }
6846
- this.panelRules.register(name, hide);
7049
+ this.panelRules.register(name, hide, options);
6847
7050
  }
6848
7051
  /**
6849
- * A panel opened: on a phone every other one closes, the SDK's and the scene's registered ones; elsewhere the guide
6850
- * and the admin panel close each other, as before, and a scene's own panel closes nothing here.
7052
+ * A panel opened: on a phone every other one closes, the SDK's and the scene's registered ones. Elsewhere a panel
7053
+ * closes any panel it would cover: the guide and the admin panel close each other, and each closes a scene's panel
7054
+ * registered with coversGuide, as that panel closes them (2.13.0); the chat stays open beside the guide or the admin
7055
+ * panel, and a scene's other panels are left to the scene.
6851
7056
  */
6852
7057
  panelOpened(name) {
6853
7058
  this.panelRules.opened(name);