9remote 3.0.32 → 3.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/dist/cli.cjs +169 -127
  2. package/dist/extension/background.js +225 -0
  3. package/dist/extension/icons/icon128.png +0 -0
  4. package/dist/extension/icons/icon16.png +0 -0
  5. package/dist/extension/icons/icon48.png +0 -0
  6. package/dist/extension/manifest.json +11 -0
  7. package/dist/extension/popup.html +58 -0
  8. package/dist/extension/popup.js +23 -0
  9. package/dist/ptyDaemon.cjs +9 -9
  10. package/dist/server.cjs +400 -288
  11. package/dist/ui/assets/index-DbuftNJF.js +8 -0
  12. package/dist/ui/index.html +1 -1
  13. package/dist/web/404.html +1 -1
  14. package/dist/web/__next.__PAGE__.txt +2 -2
  15. package/dist/web/__next._full.txt +8 -8
  16. package/dist/web/__next._head.txt +1 -1
  17. package/dist/web/__next._index.txt +7 -7
  18. package/dist/web/__next._tree.txt +2 -2
  19. package/dist/web/_next/static/chunks/1750.09ca4eade7a6e5d3.js +1 -0
  20. package/dist/web/_next/static/chunks/{4300-fb55814d743e1313.js → 4300-7d6c9b3328075562.js} +1 -1
  21. package/dist/web/_next/static/chunks/5788-d4b8dc2ab68396b6.js +1 -0
  22. package/dist/web/_next/static/chunks/{6552-f908d82b4c4161ed.js → 6552-cebe84e4399a184f.js} +1 -1
  23. package/dist/web/_next/static/chunks/6739.22a05398bfd34922.js +1 -0
  24. package/dist/web/_next/static/chunks/8207-45554e2570bc59e6.js +1 -0
  25. package/dist/web/_next/static/chunks/8762-cb470d05070f5ead.js +1 -0
  26. package/dist/web/_next/static/chunks/8922-8660f73e9cd42406.js +1 -0
  27. package/dist/web/_next/static/chunks/{9871-9cd97efc98617c33.js → 9871-c277aedb0437cb82.js} +1 -1
  28. package/dist/web/_next/static/chunks/app/admin/access/{page-3a49e3c597eea658.js → page-65febd13b3d1fc91.js} +1 -1
  29. package/dist/web/_next/static/chunks/app/admin/login/page-8ff8150184b7ccaa.js +1 -0
  30. package/dist/web/_next/static/chunks/app/admin/ota/{page-406ff48a5882efa4.js → page-d8766baa3680522d.js} +1 -1
  31. package/dist/web/_next/static/chunks/app/admin/{page-434461c255fd088a.js → page-6237b1487c05f33e.js} +1 -1
  32. package/dist/web/_next/static/chunks/app/admin/turn/{page-dd7552f387e08b36.js → page-6a6b695b67d59451.js} +1 -1
  33. package/dist/web/_next/static/chunks/app/dev/question/page-bdedfcfce7a3c516.js +1 -0
  34. package/dist/web/_next/static/chunks/app/layout-a0e78c8427f97e4f.js +1 -0
  35. package/dist/web/_next/static/chunks/app/login/{page-80cc1994a494dfed.js → page-edc7457ddecf9262.js} +1 -1
  36. package/dist/web/_next/static/chunks/app/{page-f416e79015c32480.js → page-b76772608a876c23.js} +2 -2
  37. package/dist/web/_next/static/chunks/app/workspace/layout-0fd9ea03182e9c89.js +15 -0
  38. package/dist/web/_next/static/chunks/{webpack-b56d3361b185b0cb.js → webpack-f3500fd1fae71c88.js} +1 -1
  39. package/dist/web/_next/static/css/1b307dedbb687210.css +1 -0
  40. package/dist/web/_not-found/__next._full.txt +7 -7
  41. package/dist/web/_not-found/__next._head.txt +1 -1
  42. package/dist/web/_not-found/__next._index.txt +7 -7
  43. package/dist/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
  44. package/dist/web/_not-found/__next._not-found.txt +1 -1
  45. package/dist/web/_not-found/__next._tree.txt +2 -2
  46. package/dist/web/_not-found.html +1 -1
  47. package/dist/web/_not-found.txt +7 -7
  48. package/dist/web/admin/__next._full.txt +8 -8
  49. package/dist/web/admin/__next._head.txt +1 -1
  50. package/dist/web/admin/__next._index.txt +7 -7
  51. package/dist/web/admin/__next._tree.txt +2 -2
  52. package/dist/web/admin/__next.admin.__PAGE__.txt +2 -2
  53. package/dist/web/admin/__next.admin.txt +1 -1
  54. package/dist/web/admin/access/__next._full.txt +8 -8
  55. package/dist/web/admin/access/__next._head.txt +1 -1
  56. package/dist/web/admin/access/__next._index.txt +7 -7
  57. package/dist/web/admin/access/__next._tree.txt +2 -2
  58. package/dist/web/admin/access/__next.admin.access.__PAGE__.txt +2 -2
  59. package/dist/web/admin/access/__next.admin.access.txt +1 -1
  60. package/dist/web/admin/access/__next.admin.txt +1 -1
  61. package/dist/web/admin/access.html +1 -1
  62. package/dist/web/admin/access.txt +8 -8
  63. package/dist/web/admin/login/__next._full.txt +8 -8
  64. package/dist/web/admin/login/__next._head.txt +1 -1
  65. package/dist/web/admin/login/__next._index.txt +7 -7
  66. package/dist/web/admin/login/__next._tree.txt +2 -2
  67. package/dist/web/admin/login/__next.admin.login.__PAGE__.txt +2 -2
  68. package/dist/web/admin/login/__next.admin.login.txt +1 -1
  69. package/dist/web/admin/login/__next.admin.txt +1 -1
  70. package/dist/web/admin/login.html +1 -1
  71. package/dist/web/admin/login.txt +8 -8
  72. package/dist/web/admin/ota/__next._full.txt +8 -8
  73. package/dist/web/admin/ota/__next._head.txt +1 -1
  74. package/dist/web/admin/ota/__next._index.txt +7 -7
  75. package/dist/web/admin/ota/__next._tree.txt +2 -2
  76. package/dist/web/admin/ota/__next.admin.ota.__PAGE__.txt +2 -2
  77. package/dist/web/admin/ota/__next.admin.ota.txt +1 -1
  78. package/dist/web/admin/ota/__next.admin.txt +1 -1
  79. package/dist/web/admin/ota.html +1 -1
  80. package/dist/web/admin/ota.txt +8 -8
  81. package/dist/web/admin/turn/__next._full.txt +8 -8
  82. package/dist/web/admin/turn/__next._head.txt +1 -1
  83. package/dist/web/admin/turn/__next._index.txt +7 -7
  84. package/dist/web/admin/turn/__next._tree.txt +2 -2
  85. package/dist/web/admin/turn/__next.admin.turn.__PAGE__.txt +2 -2
  86. package/dist/web/admin/turn/__next.admin.turn.txt +1 -1
  87. package/dist/web/admin/turn/__next.admin.txt +1 -1
  88. package/dist/web/admin/turn.html +1 -1
  89. package/dist/web/admin/turn.txt +8 -8
  90. package/dist/web/admin.html +1 -1
  91. package/dist/web/admin.txt +8 -8
  92. package/dist/web/dev/question/__next._full.txt +8 -8
  93. package/dist/web/dev/question/__next._head.txt +1 -1
  94. package/dist/web/dev/question/__next._index.txt +7 -7
  95. package/dist/web/dev/question/__next._tree.txt +2 -2
  96. package/dist/web/dev/question/__next.dev.question.__PAGE__.txt +2 -2
  97. package/dist/web/dev/question/__next.dev.question.txt +1 -1
  98. package/dist/web/dev/question/__next.dev.txt +1 -1
  99. package/dist/web/dev/question.html +1 -1
  100. package/dist/web/dev/question.txt +8 -8
  101. package/dist/web/download/__next._full.txt +8 -8
  102. package/dist/web/download/__next._head.txt +1 -1
  103. package/dist/web/download/__next._index.txt +7 -7
  104. package/dist/web/download/__next._tree.txt +2 -2
  105. package/dist/web/download/__next.download.__PAGE__.txt +2 -2
  106. package/dist/web/download/__next.download.txt +1 -1
  107. package/dist/web/download.html +1 -1
  108. package/dist/web/download.txt +8 -8
  109. package/dist/web/index.html +1 -1
  110. package/dist/web/index.txt +8 -8
  111. package/dist/web/login/__next._full.txt +8 -8
  112. package/dist/web/login/__next._head.txt +1 -1
  113. package/dist/web/login/__next._index.txt +7 -7
  114. package/dist/web/login/__next._tree.txt +2 -2
  115. package/dist/web/login/__next.login.__PAGE__.txt +2 -2
  116. package/dist/web/login/__next.login.txt +1 -1
  117. package/dist/web/login.html +1 -1
  118. package/dist/web/login.txt +8 -8
  119. package/dist/web/sw.js +2 -8
  120. package/dist/web/workspace/__next._full.txt +8 -8
  121. package/dist/web/workspace/__next._head.txt +1 -1
  122. package/dist/web/workspace/__next._index.txt +7 -7
  123. package/dist/web/workspace/__next._tree.txt +2 -2
  124. package/dist/web/workspace/__next.workspace.__PAGE__.txt +1 -1
  125. package/dist/web/workspace/__next.workspace.txt +2 -2
  126. package/dist/web/workspace/browse/__next._full.txt +8 -8
  127. package/dist/web/workspace/browse/__next._head.txt +1 -1
  128. package/dist/web/workspace/browse/__next._index.txt +7 -7
  129. package/dist/web/workspace/browse/__next._tree.txt +2 -2
  130. package/dist/web/workspace/browse/__next.workspace.browse.__PAGE__.txt +1 -1
  131. package/dist/web/workspace/browse/__next.workspace.browse.txt +1 -1
  132. package/dist/web/workspace/browse/__next.workspace.txt +2 -2
  133. package/dist/web/workspace/browse.html +1 -1
  134. package/dist/web/workspace/browse.txt +8 -8
  135. package/dist/web/workspace/editor/__next._full.txt +8 -8
  136. package/dist/web/workspace/editor/__next._head.txt +1 -1
  137. package/dist/web/workspace/editor/__next._index.txt +7 -7
  138. package/dist/web/workspace/editor/__next._tree.txt +2 -2
  139. package/dist/web/workspace/editor/__next.workspace.editor.__PAGE__.txt +1 -1
  140. package/dist/web/workspace/editor/__next.workspace.editor.txt +1 -1
  141. package/dist/web/workspace/editor/__next.workspace.txt +2 -2
  142. package/dist/web/workspace/editor.html +1 -1
  143. package/dist/web/workspace/editor.txt +8 -8
  144. package/dist/web/workspace/files/__next._full.txt +8 -8
  145. package/dist/web/workspace/files/__next._head.txt +1 -1
  146. package/dist/web/workspace/files/__next._index.txt +7 -7
  147. package/dist/web/workspace/files/__next._tree.txt +2 -2
  148. package/dist/web/workspace/files/__next.workspace.files.__PAGE__.txt +1 -1
  149. package/dist/web/workspace/files/__next.workspace.files.txt +1 -1
  150. package/dist/web/workspace/files/__next.workspace.txt +2 -2
  151. package/dist/web/workspace/files.html +1 -1
  152. package/dist/web/workspace/files.txt +8 -8
  153. package/dist/web/workspace/git/__next._full.txt +8 -8
  154. package/dist/web/workspace/git/__next._head.txt +1 -1
  155. package/dist/web/workspace/git/__next._index.txt +7 -7
  156. package/dist/web/workspace/git/__next._tree.txt +2 -2
  157. package/dist/web/workspace/git/__next.workspace.git.__PAGE__.txt +1 -1
  158. package/dist/web/workspace/git/__next.workspace.git.txt +1 -1
  159. package/dist/web/workspace/git/__next.workspace.txt +2 -2
  160. package/dist/web/workspace/git.html +1 -1
  161. package/dist/web/workspace/git.txt +8 -8
  162. package/dist/web/workspace/mobile/__next._full.txt +8 -8
  163. package/dist/web/workspace/mobile/__next._head.txt +1 -1
  164. package/dist/web/workspace/mobile/__next._index.txt +7 -7
  165. package/dist/web/workspace/mobile/__next._tree.txt +2 -2
  166. package/dist/web/workspace/mobile/__next.workspace.mobile.__PAGE__.txt +1 -1
  167. package/dist/web/workspace/mobile/__next.workspace.mobile.txt +1 -1
  168. package/dist/web/workspace/mobile/__next.workspace.txt +2 -2
  169. package/dist/web/workspace/mobile.html +1 -1
  170. package/dist/web/workspace/mobile.txt +8 -8
  171. package/dist/web/workspace/pair/__next._full.txt +8 -8
  172. package/dist/web/workspace/pair/__next._head.txt +1 -1
  173. package/dist/web/workspace/pair/__next._index.txt +7 -7
  174. package/dist/web/workspace/pair/__next._tree.txt +2 -2
  175. package/dist/web/workspace/pair/__next.workspace.pair.__PAGE__.txt +1 -1
  176. package/dist/web/workspace/pair/__next.workspace.pair.txt +1 -1
  177. package/dist/web/workspace/pair/__next.workspace.txt +2 -2
  178. package/dist/web/workspace/pair.html +1 -1
  179. package/dist/web/workspace/pair.txt +8 -8
  180. package/dist/web/workspace/remote/__next._full.txt +8 -8
  181. package/dist/web/workspace/remote/__next._head.txt +1 -1
  182. package/dist/web/workspace/remote/__next._index.txt +7 -7
  183. package/dist/web/workspace/remote/__next._tree.txt +2 -2
  184. package/dist/web/workspace/remote/__next.workspace.remote.__PAGE__.txt +1 -1
  185. package/dist/web/workspace/remote/__next.workspace.remote.txt +1 -1
  186. package/dist/web/workspace/remote/__next.workspace.txt +2 -2
  187. package/dist/web/workspace/remote.html +1 -1
  188. package/dist/web/workspace/remote.txt +8 -8
  189. package/dist/web/workspace/terminal/default/__next._full.txt +8 -8
  190. package/dist/web/workspace/terminal/default/__next._head.txt +1 -1
  191. package/dist/web/workspace/terminal/default/__next._index.txt +7 -7
  192. package/dist/web/workspace/terminal/default/__next._tree.txt +2 -2
  193. package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.__PAGE__.txt +1 -1
  194. package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.txt +1 -1
  195. package/dist/web/workspace/terminal/default/__next.workspace.terminal.txt +1 -1
  196. package/dist/web/workspace/terminal/default/__next.workspace.txt +2 -2
  197. package/dist/web/workspace/terminal/default.html +1 -1
  198. package/dist/web/workspace/terminal/default.txt +8 -8
  199. package/dist/web/workspace/welcome/__next._full.txt +8 -8
  200. package/dist/web/workspace/welcome/__next._head.txt +1 -1
  201. package/dist/web/workspace/welcome/__next._index.txt +7 -7
  202. package/dist/web/workspace/welcome/__next._tree.txt +2 -2
  203. package/dist/web/workspace/welcome/__next.workspace.txt +2 -2
  204. package/dist/web/workspace/welcome/__next.workspace.welcome.__PAGE__.txt +1 -1
  205. package/dist/web/workspace/welcome/__next.workspace.welcome.txt +1 -1
  206. package/dist/web/workspace/welcome.html +1 -1
  207. package/dist/web/workspace/welcome.txt +8 -8
  208. package/dist/web/workspace/workspaces/__next._full.txt +8 -8
  209. package/dist/web/workspace/workspaces/__next._head.txt +1 -1
  210. package/dist/web/workspace/workspaces/__next._index.txt +7 -7
  211. package/dist/web/workspace/workspaces/__next._tree.txt +2 -2
  212. package/dist/web/workspace/workspaces/__next.workspace.txt +2 -2
  213. package/dist/web/workspace/workspaces/__next.workspace.workspaces.__PAGE__.txt +1 -1
  214. package/dist/web/workspace/workspaces/__next.workspace.workspaces.txt +1 -1
  215. package/dist/web/workspace/workspaces.html +1 -1
  216. package/dist/web/workspace/workspaces.txt +8 -8
  217. package/dist/web/workspace.html +1 -1
  218. package/dist/web/workspace.txt +8 -8
  219. package/package.json +5 -2
  220. package/dist/ui/assets/index--4F7rf4t.js +0 -8
  221. package/dist/web/_next/static/chunks/1750.2cbe0f722b879a3b.js +0 -1
  222. package/dist/web/_next/static/chunks/5788-d574869f0879e799.js +0 -1
  223. package/dist/web/_next/static/chunks/6669-178477b6a852b251.js +0 -1
  224. package/dist/web/_next/static/chunks/6739.82570eba0a02cb26.js +0 -1
  225. package/dist/web/_next/static/chunks/8762-62e9a4a001d3e204.js +0 -1
  226. package/dist/web/_next/static/chunks/8922-6961d48ca52e1c93.js +0 -1
  227. package/dist/web/_next/static/chunks/app/admin/login/page-c7bdfdfbcc763df4.js +0 -1
  228. package/dist/web/_next/static/chunks/app/dev/question/page-ab488886d05baea5.js +0 -1
  229. package/dist/web/_next/static/chunks/app/layout-444afebe5b95afff.js +0 -1
  230. package/dist/web/_next/static/chunks/app/workspace/layout-a1024034aa67994d.js +0 -15
  231. package/dist/web/_next/static/css/630ce3b502aeea55.css +0 -1
  232. /package/dist/web/_next/static/{nx78GyCTuW2V1ns5cZIT_ → DdbafQkcX_ZaKRMjMeNKp}/_buildManifest.js +0 -0
  233. /package/dist/web/_next/static/{nx78GyCTuW2V1ns5cZIT_ → DdbafQkcX_ZaKRMjMeNKp}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1750],{71750:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});let a={common:{statusIdle:"Idle",statusWorking:"Working",statusBlocked:"Needs input",statusDone:"Your turn",loading:"Đang tải...",cancel:"Hủy",confirm:"X\xe1c nhận",save:"Lưu",delete:"X\xf3a",close:"Đ\xf3ng",back:"Quay lại",edit:"Sửa",rename:"Đổi t\xean",remove:"Gỡ bỏ",open:"Mở",clear:"X\xf3a nội dung",yes:"C\xf3",no:"Kh\xf4ng",ok:"OK",error:"Lỗi",success:"Th\xe0nh c\xf4ng",failed:"Thất bại",retry:"Thử lại",refresh:"Tải lại",clipboard:"Clipboard",clipboardCopy:"Copy",clipboardEmpty:"Clipboard is empty",search:"T\xecm kiếm",create:"Tạo",new:"Mới",add:"Th\xeam",copy:"Sao ch\xe9p",copied:"Đ\xe3 sao ch\xe9p",download:"Tải xuống",upload:"Tải l\xean",enabled:"Đ\xe3 bật",disabled:"Đ\xe3 tắt",on:"bật",off:"tắt",minute:"ph\xfat",hour:"giờ",day:"ng\xe0y",minutesAgo:"{n} ph\xfat trước",hoursAgo:"{n} giờ trước",daysAgo:"{n} ng\xe0y trước",done:"Xong"},agentSwitcher:{title:"Thiết bị của bạn",active:"ACTIVE",unnamed:"Chưa đặt t\xean",connecting:"Đang kết nối…",unreachable:"Kh\xf4ng kết nối được thiết bị n\xe0y. Thiết bị c\xf3 đang bật?"},login:{tagline:"Truy cập terminal của bạn từ mọi nơi",heroLine1:"Any machine.",heroLine2:"One terminal.",heroLine3:"In your pocket.",featureTerminal:"Terminal",featureDesktop:"Desktop",featureFiles:"Files",termConnected:"host connected",termTunnel:"tunnel established",termReady:"ready",accessKey:"Kh\xf3a truy cập",placeholder:"sk-xxx... hoặc M\xe3 d\xf9ng 1 lần (ABC123)",rememberKey:"Ghi nhớ kh\xf3a n\xe0y",connect:"Kết nối",connecting:"Đang kết nối...",authenticating:"Đang x\xe1c thực bằng token...",invalidKeyTail:"Wrong access key — check the last characters and try again.",scanQr:"Scan QR to login",qrScanTitle:"Scan QR Code",qrHint:"Point the camera at the QR code shown on the machine running 9Remote.",qrDetected:"QR Code detected!",qrAuthenticating:"Authenticating...",qrPleaseWait:"Please wait...",qrLibFail:"Failed to load the QR scanner library.",qrInitFail:"Could not start the scanner.",qrCamDenied:"Camera permission denied. Allow camera access and try again.",qrNoCamera:"No camera found on this device.",qrCamBusy:"Camera is in use by another app.",qrCamError:"Could not open the camera.",legacyKeyUpdateRequired:"Cần cập nhật 9remote",legacyKeyUpdateHint:"Thiết bị n\xe0y d\xf9ng định dạng key cũ. H\xe3y cập nhật 9remote tr\xean m\xe1y đ\xf3 để kết nối:",legacyKeyError:"Access key n\xe0y thuộc phi\xean bản cũ. Vui l\xf2ng cập nhật 9remote l\xean bản mới nhất tr\xean m\xe1y chủ.",updateRequired:"Cần cập nhật",savedKeys:"Kh\xf3a đ\xe3 lưu",login:"Đăng nhập",lastLogin:"Lần đăng nhập gần nhất",namePlaceholder:"Đặt t\xean cho kh\xf3a (t\xf9y chọn)",rename:"Đổi t\xean",deleteKeyTitle:"X\xf3a kh\xf3a",deleteKeyConfirm:'Bạn c\xf3 chắc muốn x\xf3a "{name}"?',justNow:"Vừa xong",minutesAgo:"{n} ph\xfat trước",hoursAgo:"{n} giờ trước",daysAgo:"{n} ng\xe0y trước",tapToScan:"Chạm để qu\xe9t",orEnterManually:"hoặc nhập kh\xf3a thủ c\xf4ng",addKey:"Add Key",secureTitle:"Secure & Encrypted",secureDesc:"All connections are end-to-end encrypted and secure.",featAccessTitle:"Access Anywhere",featAccessDesc:"Connect from any device, anywhere.",featSecureTitle:"Secure Connection",featSecureDesc:"End-to-end encryption keeps you safe.",featFastTitle:"Fast & Reliable",featFastDesc:"Low latency and high performance.",featSessionsTitle:"Multiple Sessions",featSessionsDesc:"Manage and switch between sessions.",home:"Trang chủ",docs:"T\xe0i liệu"},menu:{reloadRestart:"Tải lại & Khởi động lại",restartHost:"Khởi động lại 9remote host",restartConfirmTitle:"Khởi động lại 9remote host?",restartConfirmMessage:"Khởi động lại tiến tr\xecnh host (kh\xf4ng c\xe0i lại). Phi\xean terminal được giữ. Mất v\xe0i gi\xe2y.",restartStarting:"Đang khởi động lại host…",restartRestarting:"Đang khởi động lại 9remote…",restartDone:"Đ\xe3 khởi động lại! Đang kết nối lại…",restartTimeout:"Khởi động lại qu\xe1 l\xe2u",restartTimeoutHint:"Kết nối lại thủ c\xf4ng nếu kh\xf4ng tự phục hồi.",title:"Menu",language:"Ng\xf4n ngữ",theme:"Giao diện",notifications:"Th\xf4ng b\xe1o",webgl:"GPU Render (Faster)",webglHint:"Tắt nếu chữ hiển thị sai",notificationsHint:"B\xe1o khi Agent xong",files:"File Explorer",downloading:"Downloading",copying:"Copying",conflictTitle:"File already exists",conflictMessage:"{name} already exists. Replace or skip?",skip:"Skip",skipAll:"Skip all",replace:"Replace",replaceAll:"Replace all",sites:"Trang web",commandNotes:"Ghi ch\xfa lệnh",community:"Cộng đồng",installApp:"C\xe0i đặt ứng dụng",codespace:"Codespace",logout:"Đăng xuất",settingsGeneral:"General",settingsAppearance:"Appearance",settingsTerminalTab:"Terminal",settingsMcp:"Plugins",mcpIntro:"Extra abilities you can give your AI coding tools.",mcpTools:"Allow",mcpRestartHint:"Turning it off applies at once. Turning it on needs the AI tool restarted.",mcpUnavailable:"Update this host to use MCP.",artifactFormats:"Formats it can show",mcpClients:"Works with",settingsWorkspace:"Workspace",settingsApplication:"Application",settingsAccount:"Account",themeLight:"Light",themeDark:"Dark",reload:"Tải lại ứng dụng",remoteDesktop:"Điều khiển từ xa",settings:"C\xe0i đặt",enablePush:"Bật th\xf4ng b\xe1o đẩy",disablePush:"Tắt th\xf4ng b\xe1o đẩy",pushHint:"Bật th\xf4ng b\xe1o đẩy để được nhắc khi AI ho\xe0n th\xe0nh t\xe1c vụ",pushActiveHint:"Th\xf4ng b\xe1o đẩy đang bật cho thiết bị n\xe0y. Bạn sẽ được b\xe1o khi AI ho\xe0n th\xe0nh.",versionMismatch:"Host {version} đ\xe3 lỗi thời",versionMismatchHint:"Một số t\xednh năng c\xf3 thể kh\xf4ng hoạt động. Chạy:",updateNow:"Cập nhật ngay",updating:"Đang cập nhật… kết nối lại",webReloadTitle:"C\xf3 bản giao diện mới",webReloadHint:"Tải lại để cập nhật giao diện mới nhất.",reloadWeb:"Tải lại",updateAvailableTitle:"C\xf3 bản cập nhật 9Remote host",updateStarting:"Đang bắt đầu cập nhật…",updateInstalling:"Đang c\xe0i bản mới…",updateTimeout:"Cập nhật qu\xe1 l\xe2u",updateTimeoutHint:"Tải lại thủ c\xf4ng nếu kh\xf4ng phục hồi.",updateRestarting:"Đang khởi động lại host…",updateReconnecting:"Đang kết nối lại…",updateDone:"Đ\xe3 cập nhật! Đang tải lại…",version:"Phi\xean bản",orientation:"Xoay m\xe0n h\xecnh",orientationPortrait:"Dọc",orientationLandscape:"Ngang",orientationAuto:"Tự động"},workspace:{loading:"Đang tải...",logoutTitle:"Đăng xuất",logoutMessage:"Bạn c\xf3 chắc muốn đăng xuất?",failedCreateSession:"Kh\xf4ng tạo được session: {error}",failedRenameSession:"Kh\xf4ng đổi t\xean được session: {error}"},sessions:{headerTitle:"9remote.cc",connected:"Đ\xe3 kết nối",disconnected:"Mất kết nối",codespaceStopped:"Codespace đ\xe3 dừng",placeholder:"T\xean terminal (t\xf9y chọn)",newButton:"+ Tạo mới",empty:"Kh\xf4ng c\xf3 session n\xe0o",emptyHint:"Tạo session mới để bắt đầu",created:"Tạo l\xfac {time}",deleteTitle:"X\xf3a Session",deleteMessage:'Bạn c\xf3 chắc muốn x\xf3a "{name}"?',editName:"Sửa t\xean",maximize:"Ph\xf3ng to",restoreSplit:"Chia m\xe0n h\xecnh",openAsUi:"Mở dạng giao diện",openAsTerminal:"Mở dạng terminal",modeSwitchFailed:"Kh\xf4ng chuyển được chế độ",newTerminal:"Terminal mới",options:"Options"},workspaces:{title:"Workspace",newWorkspace:"Th\xeam workspace",newWorkspacePrompt:"T\xean workspace",defaultName:"Workspace mới",ungrouped:"Chưa c\xf3 workspace",addTerminal:"Terminal mới ở đ\xe2y",moveToWorkspace:"Chuyển sang workspace",rename:"Đổi t\xean workspace",delete:"Gỡ workspace",emptyWorkspace:"Chưa c\xf3 terminal",selectFolder:"Chọn thư mục",browse:"Duyệt",recentFolders:"Gần đ\xe2y",searchFolders:"Search folders...",parentFolder:"Up one level",drives:"Drives",homeFolder:"Home",hiddenFolders:"Hidden folders",selectNamed:'Choose "{name}"',enterPath:"Type a path and press Enter",pathNotFolder:"Đường dẫn n\xe0y kh\xf4ng phải thư mục",filterOrPath:"Search, or type a path like /home/me",notADirectory:'"{name}" is not a folder in {dir}',multipleDirMatches:'"{name}" matches several folders in {dir}',invalidPath:"Invalid path",openHere:"Terminal mới ở đ\xe2y",tabFiles:"File",tabGit:"Git",tabTrees:"Worktree",refreshRepos:"Qu\xe9t lại repo",onlyChanged:"Chỉ file đ\xe3 đổi",openFullFiles:"Open full file explorer",emptyTitle:"Chưa mở g\xec",cardWorkspaceTitle:"Workspace",cardWorkspaceDesc:"Mở thư mục v\xe0 chạy terminal trong đ\xf3",cardRemoteTitle:"Remote desktop",cardRemoteDesc:"Điều khiển m\xe0n h\xecnh m\xe1y n\xe0y",worktrees:"Worktree",branches:"Branch",newWorktree:"Worktree mới",worktreeName:"T\xean branch",worktreeRepoLabel:"Repo để tạo worktree",worktreeNameAscii:"T\xean n\xe0y kh\xf4ng tạo được branch — g\xf5 bằng chữ Latin.",addWorktree:"Th\xeam worktree",removeWorktree:"Gỡ worktree",removeWorktreeMessage:'Gỡ worktree ở "{path}"?',removeWorktreeFolder:"Thư mục: {path}",removeWorktreeBranchDelete:"Branch: {branch} (đ\xe3 merge — x\xf3a k\xe8m)",removeWorktreeBranchKeep:"Branch: {branch} (chưa merge — giữ lại)",removeWorktreeSessions:"{count} session b\xean trong: {names}",removeWorktreeBranch:'Branch "{branch}" cũng bị x\xf3a (nếu đ\xe3 merge).',worktreeBranchKept:'Branch "{branch}" được giữ lại: chưa merge.',worktreeBusy:"C\xf2n {count} terminal đang chạy trong worktree n\xe0y: {names}",worktreeDirty:"This worktree has modified or untracked files — forcing the removal deletes them for good. Continue?",checkedOut:"đang checkout",newBranch:"Branch mới",checkout:"Checkout",searchBranch:"T\xecm branch",worktreePath:"Đường dẫn worktree",nestedRepos:"{count} repo",showCleanRepos:"Hiện {count} repo kh\xf4ng đổi",showHiddenRepos:"Bỏ ẩn {count} repo",hideRepo:"Ẩn repo n\xe0y",scanDeeper:"Qu\xe9t s\xe2u hơn",deleteTitle:"Gỡ workspace",deleteMessage:'Gỡ workspace "{name}"? Terminal trong đ\xf3 sẽ đ\xf3ng. File tr\xean đĩa kh\xf4ng bị đụng.'},terminal:{quotaNoData:"No quota data",quotaUsageTitle:"usage",back:"Quay lại",menu:"Menu",newTerminal:"Terminal mới",remoteDesktop:"Điều khiển từ xa",defaultName:"Term"},files:{selectWorkspace:"Chọn Workspace",recentWorkspaces:"Workspace gần đ\xe2y",home:"Thư mục Home",root:"Thư mục gốc",drive:"Ổ đĩa {letter}",codespaces:"Codespaces",removeRecent:"X\xf3a khỏi danh s\xe1ch gần đ\xe2y",removeTitle:"X\xf3a Workspace",removeMessage:'X\xf3a "{name}" khỏi workspace gần đ\xe2y?',setAsWorkspace:"Chọn l\xe0m Workspace",openFolder:"Mở thư mục",newFile:"Tệp mới",newFolder:"Thư mục mới",rename:"Đổi t\xean",delete:"X\xf3a",deleteFile:"X\xf3a tệp",deleteFolder:"X\xf3a thư mục",deleteFileMessage:'X\xf3a "{name}"?',deleteFolderMessage:'X\xf3a thư mục "{name}" v\xe0 to\xe0n bộ nội dung?',emptyFolder:"Thư mục trống",git:"Git",parent:"Thư mục cha",workspace:"Workspace",failedLoad:"Kh\xf4ng tải được: {error}",failedDelete:"Kh\xf4ng x\xf3a được: {error}",failedCreate:"Kh\xf4ng tạo được: {error}",failedRename:"Kh\xf4ng đổi t\xean được: {error}",enterName:"Nhập t\xean",confirmRename:"Đổi t\xean th\xe0nh:",setWorkspace:"Đặt l\xe0m Workspace",setAsWorkspaceTitle:"Đặt l\xe0m workspace",switchWorkspace:"Đổi workspace",searchFiles:"T\xecm tệp",toggleHidden:"Ẩn/hiện tệp ẩn",searchPlaceholder:"T\xecm tệp...",searching:"Đang t\xecm...",noFilesFound:"Kh\xf4ng t\xecm thấy tệp",noGitRepo:"Kh\xf4ng c\xf3 git repository",cannotOpenBinary:"Kh\xf4ng thể mở tệp binary",createNew:"Tạo mới",file:"Tệp",folder:"Thư mục",placeholderFile:"filename.js",placeholderFolder:"ten-thu-muc",pickFile:"Choose files",pickFolder:"Choose folder",copyPath:"Sao ch\xe9p đường dẫn",copyRelPath:"Copy Relative Path",copyName:"Copy Filename",delete:"X\xf3a",rename:"Đổi t\xean",deleteConfirmTitle:"X\xf3a",deleteConfirmMessage:'X\xf3a "{name}"?'},editor:{save:"Lưu",saving:"Đang lưu...",saved:"Đ\xe3 lưu",unsaved:"C\xf3 thay đổi chưa lưu",close:"Đ\xf3ng",discard:"Bỏ thay đổi",discardTitle:"Bỏ thay đổi",discardMessage:"Bạn c\xf3 thay đổi chưa lưu. Bỏ thay đổi?",unsavedTitle:"Lưu thay đổi cho {name}?",unsavedBody:"Kh\xf4ng lưu th\xec c\xe1c thay đổi sẽ mất.",failedLoad:"Kh\xf4ng tải được tệp: {error}",failedSave:"Kh\xf4ng lưu được: {error}",openFull:"Open in full editor",artifact:"Artifact",readOnly:"Chỉ đọc",line:"D\xf2ng",column:"Cột",gitDiff:"Git Diff",typeText:"Nhập chữ v\xe0 ch\xe8n...",insert:"Ch\xe8n",statusModified:"Đ\xe3 sửa",statusAdded:"Đ\xe3 th\xeam",statusUntracked:"Chưa theo d\xf5i"},git:{title:"Git",branch:"Nh\xe1nh",changes:"Thay đổi",staged:"Đ\xe3 staged",unstaged:"Chưa staged",untracked:"Chưa theo d\xf5i",commit:"Commit",commitAndPush:"Commit & Push",commitSuccess:"Commit successful",pushSuccess:"Push successful",stageFailed:"Failed to stage changes",commitFailed:"Commit failed",pushFailed:"Push failed",pullSuccess:"Pull successful",pullFailed:"Pull failed",stageAllConfirmTitle:"Stage All & Commit",stageAllConfirmMessage:"No changes are staged. Stage all changes and commit?",stageAndCommit:"Stage & Commit",gitActions:"Git actions",commitPlaceholder:"Commit message…",stageAllNote:"Stage all \xb7 {count}",upToDate:"Everything up-to-date",commitMessage:"Nội dung commit",push:"Push",pull:"Pull",fetch:"Fetch",stage:"Stage",stageAll:"Stage tất cả",unstage:"Unstage",discard:"Bỏ thay đổi",discardChanges:"Bỏ thay đổi",discardMessage:'Bỏ thay đổi của "{name}"?',noChanges:"Kh\xf4ng c\xf3 thay đổi",diff:"Diff",pushing:"Đang push...",pulling:"Đang pull...",committing:"Đang commit...",failedCommit:"Kh\xf4ng commit được: {error}",failedPush:"Kh\xf4ng push được: {error}",failedPull:"Kh\xf4ng pull được: {error}",status:"Trạng th\xe1i",diffTab:"Diff",modified:"Đ\xe3 sửa",added:"Đ\xe3 th\xeam",deleted:"Đ\xe3 x\xf3a",untrackedTitle:"Chưa theo d\xf5i",openFile:"Mở tệp",discardChangesTitle:"Bỏ thay đổi",discardConfirmTitle:"Bỏ thay đổi",discardConfirmDelete:'Bạn c\xf3 chắc muốn x\xf3a "{name}"? Kh\xf4ng thể ho\xe0n t\xe1c.',discardConfirmDiscard:'Bạn c\xf3 chắc muốn bỏ thay đổi của "{name}"? Kh\xf4ng thể ho\xe0n t\xe1c.'},remote:{title:"Điều khiển từ xa",connecting:"Đang kết nối...",disconnected:"Mất kết nối",fullscreen:"To\xe0n m\xe0n h\xecnh",exitFullscreen:"Tho\xe1t to\xe0n m\xe0n h\xecnh",receivingImage:"Đang nhận h\xecnh…",keyboard:"B\xe0n ph\xedm",mouse:"Chuột",quality:"Chất lượng",fps:"FPS",debug:"Debug",help:"Trợ gi\xfap",close:"Đ\xf3ng",sendKey:"Gửi ph\xedm",helpTitle:"Trợ gi\xfap điều khiển từ xa",notAvailable:"Điều khiển từ xa kh\xf4ng khả dụng",customizeKeys:"T\xf9y chỉnh ph\xedm",back:"Quay lại",resetZoom:"Đặt lại zoom",refresh:"L\xe0m mới",rectangleSelection:"Chọn v\xf9ng chữ nhật",handMode:"Chế độ tay",toggleKeyboard:"Bật/tắt b\xe0n ph\xedm hệ thống",hideControls:"Hide controls",showControls:"Show controls",textBatchInput:"Nhập văn bản h\xe0ng loạt",extraKeys:"Ph\xedm mở rộng",customizeRemoteKeys:"T\xf9y chỉnh ph\xedm Remote",exitRemote:"Tho\xe1t điều khiển từ xa",debugTitle:"Thống k\xea Debug",minimize:"Thu nhỏ",transport:"Giao thức",latency:"Độ trễ",tilesPerSec:"Tiles/gi\xe2y",bandwidth:"Băng th\xf4ng",clearStats:"X\xf3a thống k\xea",lockTitle:"Windows đang kh\xf3a",lockGrantDesc:'Bật "Mở kh\xf3a m\xe1y từ xa" trong 9remote host tr\xean m\xe1y n\xe0y.',lockDesc:"Nhập m\xe3 PIN hoặc mật khẩu Windows của m\xe1y n\xe0y",lockPlaceholder:"M\xe3 PIN hoặc mật khẩu Windows",unlock:"Mở kh\xf3a",unlocking:"Đang mở kh\xf3a…",unlockFailed:"Mở kh\xf3a thất bại — kiểm tra m\xe3 PIN/mật khẩu v\xe0 thử lại."},remoteHelp:{modePc:"PC / Chuột",modeTrackpad:"Cảm ứng \xb7 Trackpad",modeDirect:"Cảm ứng \xb7 Trực tiếp",mouseTitle:"Chuột",keyboardTitle:"B\xe0n ph\xedm",gesturesTrackpadTitle:"Cử chỉ (Trackpad ✋)",gesturesDirectTitle:"Cử chỉ (Trực tiếp)",toolbarTitle:"Thanh c\xf4ng cụ",mouseClickKey:"Click / K\xe9o",mouseClickDesc:"Chuột tr\xe1i, k\xe9o để chọn/di chuyển",mouseRightKey:"Chuột phải",mouseRightDesc:"Mở menu ngữ cảnh tr\xean remote",mouseWheelKey:"Cuộn chuột",mouseWheelDesc:"Cuộn remote (Shift + Cuộn = ngang)",mouseDoubleKey:"Double-click",mouseDoubleDesc:"Nhấp đ\xfap tr\xean remote",keyPhysicalKey:"Ph\xedm vật l\xfd",keyPhysicalDesc:"Gửi trực tiếp (Tab, F-keys... được bắt)",keyModifierKey:"Ctrl / Alt / Shift / ⌘",keyModifierDesc:"Ph\xedm modifier d\xednh — kết hợp với ph\xedm tiếp theo",trackpadSwipeKey:"1 ng\xf3n vuốt",trackpadSwipeDesc:"Di chuyển con trỏ ảo",trackpadTapKey:"1 ng\xf3n chạm",trackpadTapDesc:"Click tr\xe1i tại con trỏ",trackpad2TapKey:"2 ng\xf3n chạm",trackpad2TapDesc:"Click phải tại con trỏ",trackpad2SwipeKey:"2 ng\xf3n vuốt",trackpad2SwipeDesc:"Cuộn tại vị tr\xed con trỏ",trackpadPinchKey:"2 ng\xf3n chụm",trackpadPinchDesc:"Zoom canvas",trackpadScrollLockKey:"Giữ + k\xe9o",trackpadScrollLockDesc:"Giữ để kh\xf3a cuộn, k\xe9o mọi hướng",directTapKey:"1 ng\xf3n chạm",directTapDesc:"Click tại vị tr\xed chạm",directLongKey:"1 ng\xf3n giữ l\xe2u",directLongDesc:"Click phải",directDoubleKey:"1 ng\xf3n chạm đ\xfap",directDoubleDesc:"Nhấp đ\xfap",directScrollKey:"2 ng\xf3n vuốt",directScrollDesc:"Cuộn remote",directPinchKey:"2 ng\xf3n chụm",directPinchDesc:"Zoom canvas",directPanKey:"1 ng\xf3n k\xe9o (zoom>1)",directPanDesc:"Di chuyển canvas",toolbarHandDesc:"Giữ chuột tr\xe1i (chế độ k\xe9o) — chạm lần nữa để thả",toolbarMouseDirectDesc:"Chuyển sang chế độ Trực tiếp",toolbarMouseTrackpadDesc:"Chuyển sang Trackpad (con trỏ ảo)",toolbarKeyboardDesc:"B\xe0n ph\xedm hệ thống / nhập văn bản h\xe0ng loạt",toolbarRectDesc:"Chế độ chọn v\xf9ng chữ nhật"},remoteControls:{enterToSend:"Tab / Ctrl+Số để chuyển tab",typeToSend:"Nhập văn bản để gửi...",send:"Gửi",trackpadMode:"Chế độ trackpad",directMode:"Chế độ direct",bottomRow:"H\xe0ng dưới",extraPanel:"Bảng mở rộng",exitConfirmMessage:"Bạn c\xf3 chắc muốn tho\xe1t phi\xean điều khiển từ xa hiện tại?"},connection:{retrying:"Đang kết nối lại...",waitingApproval:"Đang chờ ph\xea duyệt",approvalDescription:"9Remote host cần ph\xea duyệt thiết bị n\xe0y trước khi bạn c\xf3 thể kết nối.",approvalHint:"Kiểm tra terminal tr\xean m\xe1y của bạn.",rejectedTitle:"Thiết bị bị từ chối",rejectedDescription:"Thiết bị n\xe0y kh\xf4ng được 9Remote host ph\xea duyệt.",backToLogin:"Quay lại Đăng nhập",failed:"Kết nối thất bại",failedDescription:"Kh\xf4ng thể kết nối sau {n} lần thử",attemptOf:"Lần {n} / {total}",exit:"Tho\xe1t",cancel:"Hủy",retry:"Thử lại ngay"},notifications:{claudeCode:"Claude Code",codex:"Codex",geminiCli:"Gemini CLI",openCode:"OpenCode",title:"Th\xf4ng b\xe1o",empty:"Kh\xf4ng c\xf3 th\xf4ng b\xe1o",needsInput:"cần nhập liệu",badgeTitle:"{blocked} needs input, {done} your turn",replied:"đ\xe3 trả lời",agent:"Agent"},sites:{title:"Trang web",localSites:"Site cục bộ",selectSitePreview:"Chọn site để xem trước",browserNewTab:"New tab",browserAddressPlaceholder:"localhost:3000 or /path",browserNotConnected:"Connect to your host first",portPlaceholder:"cổng",loadingSites:"Đang tải Sites...",notConnected:"Chưa kết nối tới host",noSitesFound:"Kh\xf4ng t\xecm thấy site",startServerHint:"H\xe3y chạy local dev server để thấy tại đ\xe2y",siteNamePlaceholder:"T\xean site",saveTitle:"Lưu",editNameTitle:"Sửa t\xean",removeTitle:"X\xf3a",removePortTitle:"X\xf3a cổng",removePortMessage:"X\xf3a cổng {port} khỏi danh s\xe1ch đ\xe3 lưu?",popupBlocked:"Popup đ\xe3 bị chặn! H\xe3y cho ph\xe9p popup cho trang n\xe0y.",startProxyFailed:"Kh\xf4ng thể khởi tạo proxy cho {name}",foundCount:"T\xecm thấy {n} site{suffix}",focusOpenedTab:"Focus tab đ\xe3 mở",openInNewTab:"Mở tab mới",goBack:"Quay lại",goForward:"Tiến tới",loadingSite:"Đang tải...",empty:"Kh\xf4ng c\xf3 site n\xe0o đang chạy",emptyHint:"Chạy local server để xem ở đ\xe2y",open:"Mở",refresh:"Tải lại"},commandNotes:{title:"Ghi ch\xfa lệnh",noSavedCommands:"Chưa c\xf3 lệnh đ\xe3 lưu",addFirstBelow:"Th\xeam lệnh đầu ti\xean b\xean dưới",clickToCopy:"Bấm để sao ch\xe9p",copiedBang:"Đ\xe3 sao ch\xe9p!",copy:"Sao ch\xe9p",edit:"Sửa",delete:"X\xf3a",editCommandPlaceholder:"Sửa lệnh...",addCommandPlaceholder:"Th\xeam lệnh...",update:"Cập nhật",add:"Th\xeam",empty:"Chưa c\xf3 ghi ch\xfa",emptyHint:"Lưu lệnh để truy cập nhanh",add:"Th\xeam ghi ch\xfa",edit:"Sửa ghi ch\xfa",delete:"X\xf3a ghi ch\xfa",deleteMessage:"X\xf3a ghi ch\xfa n\xe0y?",name:"T\xean",command:"Lệnh",save:"Lưu",placeholderName:"vd: Khởi động dev server",placeholderCommand:"vd: npm run dev"},mobileKeyboard:{pasteHere:"D\xe1n v\xe0o đ\xe2y (Cmd+V)",enterToSend:"{shortcut} to switch tab",typeCommand:"Nhập lệnh v\xe0 gửi...",send:"Gửi",toggleExtraKeys:"Bật/tắt ph\xedm mở rộng",toggleTextInput:"Bật/tắt \xf4 nhập văn bản",customizeTerminalKeys:"T\xf9y chỉnh ph\xedm Terminal",mainBar:"Thanh ch\xednh",extraPanel:"Bảng mở rộng",fileTooLarge:"File qu\xe1 lớn (tối đa 5MB)",readFileFailed:"Kh\xf4ng thể đọc file",uploadFailed:"Tải file thất bại: {error}"},terminalPane:{scrollToBottom:"Cuộn xuống cuối",changedFiles:"Changed files",pasteOrType:"D\xe1n hoặc nhập tại đ\xe2y",paste:"D\xe1n"},pwaGuide:{copyYourKey:"Sao ch\xe9p Key của bạn",copyKeyHint:"Nhấn v\xe0o key b\xean dưới để sao ch\xe9p — bạn sẽ cần để đăng nhập sau khi c\xe0i",tapToCopyApiKey:"Nhấn để sao ch\xe9p API key",copiedBang:"Đ\xe3 sao ch\xe9p!",copy:"Sao ch\xe9p",tapShareButton:"Nhấn n\xfat Share",tapShareHint:"Nhấn n\xfat share ở dưới c\xf9ng của Safari",addToHome:"Th\xeam v\xe0o M\xe0n h\xecnh ch\xednh",addToHomeHint:'Cuộn xuống v\xe0 nhấn "Add to Home Screen"',openAppPasteKey:"Mở app v\xe0 d\xe1n key",openAppPasteKeyHint:"Mở app đ\xe3 c\xe0i v\xe0 d\xe1n key để đăng nhập",openMenu:"Mở Menu",openMenuHint:"Nhấn n\xfat menu (ba chấm) trong Chrome",installApp:"C\xe0i ứng dụng",installAppHint:'Nhấn "Install app" hoặc "Add to Home screen"',lookInstallIcon:"T\xecm icon c\xe0i đặt",lookInstallIconHint:"T\xecm icon c\xe0i đặt tr\xean thanh địa chỉ",clickInstallPaste:"Nhấn c\xe0i v\xe0 d\xe1n key",installNow:"Install Now",installNowHint:"Install 9Remote as an app for quick access",installing:"Installing...",clickInstallPasteHint:"Nhấn c\xe0i, mở app, v\xe0 d\xe1n key để đăng nhập",alternativeHint:'C\xe1ch kh\xe1c: Mở menu tr\xecnh duyệt → "Install 9Remote" hoặc "Create shortcut"',loadingPlatform:"Đang nhận diện nền tảng...",iosPlatform:"iOS (iPhone/iPad)",androidPlatform:"Android",macosPlatform:"macOS",windowsPlatform:"Windows",desktopPlatform:"Desktop",alreadyInstalled:"Đ\xe3 c\xe0i đặt!",alreadyInstalledHint:"Bạn đang d\xf9ng 9Remote dưới dạng app đ\xe3 c\xe0i",installationGuide:"Hướng dẫn c\xe0i đặt",installationSteps:"C\xe1c bước c\xe0i đặt:"},community:{title:"Cộng đồng",description:"Tham gia cộng đồng 9Remote"},pwa:{title:"C\xe0i đặt như Ứng dụng",description:"C\xe0i 9Remote v\xe0o thiết bị để c\xf3 trải nghiệm tốt nhất",iosTitle:"iOS Safari",androidTitle:"Android Chrome",desktopTitle:"M\xe1y t\xednh"},codespace:{title:"Codespace",name:"T\xean",status:"Trạng th\xe1i",running:"Đang chạy",autoStart:"Tự khởi động 9Remote",autoStartHint:"Khởi động 9Remote khi mở codespace",stop:"Dừng Codespace",stopHint:"Dừng để tiết kiệm t\xe0i nguy\xean",restartHint:"Để khởi động lại, v\xe0o GitHub",unknown:"Kh\xf4ng x\xe1c định"}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5788],{2163:(e,t,r)=>{r.d(t,{o:()=>n});function n(e){if(!e)return"";if(e.length<=14)return e;let t=e.substring(0,8),r=e.substring(e.length-6),n="•".repeat(12);return`${t}${n}${r}`}},2805:(e,t,r)=>{r.d(t,{Yr:()=>o,_r:()=>s,gJ:()=>l,rh:()=>c,sP:()=>a});var n=r(90076);let i=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;function s(){let e=window.location.hostname;return"localhost"===e||"::1"===e||"[::1]"===e||e.startsWith("127.")||e.endsWith(".localhost")}function a(){return s()||!!window.__TAURI__}function l(){return!!window.__TAURI__||window.location.port===String(n._8)||!0}function o(){if(s())return!0;let e=i.exec(window.location.hostname);if(!e||e.slice(1).some(e=>Number(e)>255))return!1;let t=Number(e[1]),r=Number(e[2]);return 10===t||192===t&&168===r||172===t&&!!(r>=16)&&!!(r<=31)}function c(e){return s()&&window.location.port!==String(n._8)?e?.loopbackOrigin||n.w||n.lE:null}},4018:(e,t,r)=>{r.d(t,{N:()=>i.N0,u:()=>o});var n=r(1521),i=r(86129);let s="9remote_api_keys",a=()=>{window.dispatchEvent(new Event(i.N0))};function l(e){try{return btoa(e)}catch{return e}}function o(){let e=(0,n.useCallback)(()=>{try{let e=localStorage.getItem(s);if(!e)return[];return JSON.parse(e).map(e=>({...e,key:function(e){try{return atob(e)}catch{return e}}(e.key)}))}catch(e){return console.error("Failed to load API keys:",e),[]}},[!0]),t=(0,n.useCallback)((t,r="")=>{if(t&&1)try{let n=e(),i=n.findIndex(e=>e.key===t);if(-1!==i){let e=n.map((e,t)=>({...e,key:l(e.key),lastLoginDate:t===i?new Date().toISOString():e.lastLoginDate}));localStorage.setItem(s,JSON.stringify(e));return}let o={id:Date.now().toString(),key:l(t),label:r||`Key ${n.length+1}`,createdAt:new Date().toISOString(),lastLoginDate:new Date().toISOString()},c=[...n.map(e=>({...e,key:l(e.key)})),o];localStorage.setItem(s,JSON.stringify(c)),a()}catch(e){console.error("Failed to save API key:",e)}},[!0,e]),r=(0,n.useCallback)(t=>{try{let r=e().filter(e=>e.id!==t).map(e=>({...e,key:l(e.key)}));localStorage.setItem(s,JSON.stringify(r)),a()}catch(e){console.error("Failed to remove API key:",e)}},[!0,e]),i=(0,n.useCallback)(()=>{try{localStorage.removeItem(s)}catch(e){console.error("Failed to clear API keys:",e)}},[!0]),o=(0,n.useCallback)(()=>{try{let e=localStorage.getItem(s);if(!e)return!1;return JSON.parse(e).length>0}catch{return!1}},[!0]),c=(0,n.useCallback)((t,r)=>{try{let n=e().map(e=>({...e,key:l(e.key),label:e.id===t?r:e.label||""}));localStorage.setItem(s,JSON.stringify(n)),a()}catch(e){console.error("Failed to rename API key:",e)}},[!0,e]),d=(0,n.useCallback)(t=>{if(t&&1)try{let r=e().map(e=>({...e,key:l(e.key),lastLoginDate:e.key===t?new Date().toISOString():e.lastLoginDate}));localStorage.setItem(s,JSON.stringify(r))}catch(e){console.error("Failed to update last login date:",e)}},[!0,e]);return{saveKey:t,loadKeys:e,removeKey:r,renameKey:c,clearKeys:i,hasStoredKeys:o,updateLastLogin:d}}},7938:(e,t,r)=>{r.d(t,{D5:()=>a,FO:()=>c,I9:()=>o,Ic:()=>l,eR:()=>n,ij:()=>s,tC:()=>i});let n={namespace:"/remote",enableWebRTC:!0,enableTurn:!1,debug:{transport:!1,remote:!1,panel:!1,showButton:!1},dcChunkSize:8,dcReliable:!1,dcOrdered:!1,hashRequestInterval:1500,lastDataThreshold:500,restreamDelay:200,mouseThrottle:8,keyThrottle:25,scrollInterval:100,tileLoadTimeout:600,batchSize:16,batchDelay:3,decodeQueueCap:48,resizeDebounceMs:100,resizeStableFrames:3,resizeMaxFrames:30,focusDebounce:50,longPressDelay:1e3,doubleClickDelay:300,moveThreshold:10,edgeScrollThreshold:15,edgeScrollMultiplier:1.5,momentumFriction:.94,momentumMinVelocity:.3,pointerMode:"trackpad",trackpadSensitivity:1.3,trackpadAcceleration:1.5,trackpadTapMaxMove:8,trackpadTapMaxDuration:220,trackpadCursorSize:20,trackpadEdgeMarginRatio:.25,clipboardBadgeTimeout:1e4,gestureLockDelay:80,gestureDistanceThreshold:15,gestureCentroidThreshold:10,gestureDominanceRatio:2,wheelScrollMultiplier:2.5,wheelLineHeight:40,wheelPageHeight:400,wheelZoomStep:.1,wheelBoostInterval:250,mouseButtonMap:{0:"left",1:"middle",2:"right"},pcModeControls:{rectangleSelect:!1,pointerModeToggle:!1,handMode:!1,keyboardToggle:!1,textPanel:!0,modifierRow:!0,help:!0}},i={ctrl:"control",cmd:"command",alt:"alt",shift:"shift"},s=[{id:"ctrl",label:"Ctrl",modifier:"ctrl",type:"modifier"},{id:"alt",label:"Alt",modifier:"alt",type:"modifier"},{id:"shift",label:"Shift",modifier:"shift",type:"modifier"},{id:"cmd",label:"⌘",modifier:"cmd",type:"modifier"},{id:"esc",label:"Esc",key:"escape",type:"key"},{id:"tab",label:"Tab",key:"tab",type:"key"},{id:"enter",label:"↵",key:"enter",type:"key",primary:!0},{id:"backspace",label:"⌫",key:"backspace",type:"key"},{id:"undo",label:"Undo",key:"z",modifiers:["control"],type:"combo",osAdaptive:!0},{id:"redo",label:"Redo",key:"z",modifiers:["control","shift"],type:"combo",osAdaptive:!0},{id:"up",label:"↑",key:"up",type:"arrow"},{id:"down",label:"↓",key:"down",type:"arrow"},{id:"left",label:"←",key:"left",type:"arrow"},{id:"right",label:"→",key:"right",type:"arrow"},{id:"home",label:"Home",key:"home",type:"key"},{id:"end",label:"End",key:"end",type:"key"},{id:"pgup",label:"PgUp",key:"pageup",type:"key"},{id:"pgdn",label:"PgDn",key:"pagedown",type:"key"},{id:"del",label:"Del",key:"delete",type:"key"},{id:"ins",label:"Ins",key:"insert",type:"key"},{id:"f1",label:"F1",key:"f1",type:"key"},{id:"f2",label:"F2",key:"f2",type:"key"},{id:"f3",label:"F3",key:"f3",type:"key"},{id:"f4",label:"F4",key:"f4",type:"key"},{id:"f5",label:"F5",key:"f5",type:"key"},{id:"f6",label:"F6",key:"f6",type:"key"},{id:"f7",label:"F7",key:"f7",type:"key"},{id:"f8",label:"F8",key:"f8",type:"key"},{id:"f9",label:"F9",key:"f9",type:"key"},{id:"f10",label:"F10",key:"f10",type:"key"},{id:"f11",label:"F11",key:"f11",type:"key"},{id:"f12",label:"F12",key:"f12",type:"key"},{id:"ctrlAltDel",label:"Ctl+Alt+Del",key:"delete",modifiers:["control","alt"],type:"combo"},{id:"ctrlShiftEsc",label:"Task Mgr",key:"escape",modifiers:["control","shift"],type:"combo"},{id:"altTab",label:"Alt+Tab",key:"tab",modifiers:["alt"],type:"combo"},{id:"altF4",label:"Alt+F4",key:"f4",modifiers:["alt"],type:"combo"},{id:"winKey",label:"Win",key:"command",type:"key"},{id:"printScreen",label:"PrtSc",key:"printscreen",type:"key"},{id:"paste",label:"Paste",key:"v",modifiers:["control"],type:"combo",osAdaptive:!0},{id:"cut",label:"Cut",key:"x",modifiers:["control"],type:"combo",osAdaptive:!0},{id:"selectAll",label:"All",key:"a",modifiers:["control"],type:"combo",osAdaptive:!0},{id:"desktopPrev",label:"◀ Desk",type:"desktop",direction:"prev"},{id:"desktopNext",label:"Desk ▶",type:"desktop",direction:"next"},{id:"desktopNew",label:"+ Desk",type:"desktop",direction:"new"}],a=["esc","undo","up","down","tab","ctrl","alt","shift","cmd","backspace"],l="enter",o=[["left","right","home","end","pgup","pgdn","del"],["f1","f2","f3","f4","f5","f6","f7","altTab"],["f9","f10","f11","f12","ctrlAltDel",,"desktopPrev","desktopNext","desktopNew"]],c={enter:"enter",return:"enter",space:" ",backspace:"backspace",tab:"tab",escape:"escape",Enter:"enter"," ":"space",Backspace:"backspace",Tab:"tab",Escape:"escape",ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown",Delete:"delete",Insert:"insert",F1:"f1",F2:"f2",F3:"f3",F4:"f4",F5:"f5",F6:"f6",F7:"f7",F8:"f8",F9:"f9",F10:"f10",F11:"f11",F12:"f12",CapsLock:"capslock",NumLock:"numlock",ScrollLock:"scrolllock",PrintScreen:"printscreen",ContextMenu:"menu"}},11155:(e,t,r)=>{function n(e){return"string"==typeof e&&!!e&&/^sk-[a-z0-9]{8}-[a-z0-9]{4}-[0-9a-f]{6}$/.test(e.trim().toLowerCase())}function i(e){if("string"!=typeof e||!/^sk-[a-z0-9]{8}-[a-np-z1-9]{8}-[a-np-z1-9]{8}$/.test(e))return e||null;let t=e.split("-");return`${t[0]}-${t[1]}-${t[2]}`}function s(e){return"string"==typeof e&&/^sk-[a-z0-9]{8}-[a-np-z1-9]{8}-[a-np-z1-9]{8}$/.test(e)?e.split("-")[3]:null}r.d(t,{Cj:()=>s,PF:()=>n,Uo:()=>i})},11865:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(73365),i=r(1521),s=r(64683),a=r(80186),l=r(78762);function o({isOpen:e,onClose:t,onScan:c}){let{t:d}=(0,l.s)(),u=(0,i.useRef)(null),p=(0,i.useRef)(null),h=(0,i.useRef)(null),m=(0,i.useRef)(null),f=(0,i.useRef)(null),[g,y]=(0,i.useState)(""),[_,b]=(0,i.useState)(""),w=(0,i.useCallback)(async e=>{if(p.current)try{await p.current.stop()}catch(e){}b("detected"),await new Promise(e=>setTimeout(e,300)),b("authenticating"),await c(e)||(b(""),f.current?.())},[c]),k=(0,i.useCallback)(async()=>{if(!h.current){let e=await Promise.all([r.e(3446),r.e(6075)]).then(r.bind(r,16075)).catch(()=>null);if(!e)return void y(d("login.qrLibFail"));h.current=e.Html5Qrcode}let e=document.getElementById("qr-reader");if(!e)return void y(d("login.qrInitFail"));try{e.innerHTML="";let t=new h.current("qr-reader");p.current=t,await t.start({facingMode:"environment"},{fps:10,qrbox:{width:250,height:250}},e=>{m.current?.(e)},()=>{})}catch(t){let e=t.toString();e.includes("NotAllowedError")?y(d("login.qrCamDenied")):e.includes("NotFoundError")?y(d("login.qrNoCamera")):e.includes("NotReadableError")?y(d("login.qrCamBusy")):y(d("login.qrCamError"))}},[d]),v=(0,i.useCallback)(async()=>{if(p.current){try{await p.current.stop()}catch(e){}p.current=null}y(""),b(""),t()},[t]);return((0,i.useEffect)(()=>{m.current=w},[w]),(0,i.useEffect)(()=>{if(!e)return;let t=!1;f.current=async()=>{p.current=null,await new Promise(e=>setTimeout(e,400)),t||k()};let r=setTimeout(()=>{t||k()},200);return()=>{if(t=!0,clearTimeout(r),f.current=null,p.current){try{p.current.stop()}catch(e){}p.current=null}}},[e,k]),e)?(0,n.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",children:(0,n.jsxs)("div",{className:"relative card-elev max-w-md w-full mx-4 overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[(0,n.jsx)("h2",{className:"text-xl font-bold text-text",children:d("login.qrScanTitle")}),(0,n.jsx)("button",{onClick:v,className:"text-text-muted hover:text-text transition-colors p-1",children:(0,n.jsx)(s.X,{size:24})})]}),(0,n.jsx)("div",{className:"relative bg-black",children:(0,n.jsx)("div",{id:"qr-reader",ref:u,className:"w-full",style:{minHeight:"300px"}})}),(0,n.jsxs)("div",{className:"p-4",children:[g?(0,n.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-red-500/10 rounded-brand text-red-400",children:[(0,n.jsx)(s.RI,{size:20,className:"flex-shrink-0 mt-0.5"}),(0,n.jsx)("p",{className:"text-sm",children:g})]}):"detected"===_?(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 p-3 bg-green-500/10 rounded-brand text-green-400",children:[(0,n.jsx)(s.vW,{size:22}),(0,n.jsx)("p",{className:"text-sm font-medium",children:d("login.qrDetected")})]}):"authenticating"===_?(0,n.jsx)("div",{className:"flex items-center justify-center gap-2 p-3 bg-brand-500/10 rounded-brand text-brand-400",children:(0,n.jsx)("p",{className:"text-sm font-medium",children:d("login.qrAuthenticating")})}):(0,n.jsx)("p",{className:"text-sm text-text-muted text-center",children:d("login.qrHint")}),(0,n.jsx)(a.A,{variant:"secondary",onClick:v,disabled:"authenticating"===_,className:"w-full mt-4",children:"authenticating"===_?d("login.qrPleaseWait"):d("common.cancel")})]})]})}):null}},18057:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(73365),i=r(1521),s=r(64683),a=r(8910),l=r(78762),o=r(52345);function c({isOpen:e,onClose:t}){let{t:r,locale:d,setLocale:u}=(0,l.s)();return((0,i.useEffect)(()=>{if(!e)return;let r=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e,t]),e)?(0,n.jsxs)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-[2px] animate-in fade-in duration-200",onClick:t}),(0,n.jsxs)("div",{className:"relative card-elev max-w-lg w-full max-h-[90dvh] flex flex-col animate-in zoom-in-95 duration-200",children:[(0,n.jsxs)("div",{className:"px-5 py-4 flex items-center justify-between flex-shrink-0",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-text",children:r("menu.language")}),(0,n.jsx)("button",{onClick:t,className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-all duration-150 ease-out","aria-label":r("common.close"),children:(0,n.jsx)(s.X,{size:20})})]}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto modal-scrollable p-3",children:(0,n.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-2",children:o.dI.map(e=>{let r=e.code===d;return(0,n.jsxs)("button",{onClick:()=>{var r;return r=e.code,void((0,a.e)(),u(r),t())},className:`px-2 py-2 rounded-brand flex items-center gap-2 transition-all duration-150 ease-out active:scale-[0.97] min-w-0 ${r?"bg-brand-500 text-white":"text-text hover:bg-surface-2"}`,children:[(0,n.jsx)("img",{src:`https://flagcdn.com/w80/${e.country}.png`,alt:e.label,className:"w-5 h-[14px] object-cover rounded-[2px] flex-shrink-0",loading:"lazy"}),(0,n.jsx)("span",{className:"flex-1 text-sm font-medium truncate text-left",children:e.label}),r&&(0,n.jsx)(s.aJ,{size:14,className:"flex-shrink-0"})]},e.code)})})})]})]}):null}},20464:(e,t,r)=>{r.d(t,{As:()=>f,zg:()=>u});var n=r(1521),i=r(29717),s=r(90076),a=r(11155),l=r(90084),o=r(2805),c=r(97711);let d="wrong-key-tail";async function u(e,t,r=s.qn){try{let t=new AbortController,n=setTimeout(()=>t.abort(),r),i=await fetch(`${e}/api/health`,{signal:t.signal});return clearTimeout(n),i.ok}catch{return!1}}async function p(e,{tail:t,tempKey:r},n=s.qn){try{let i=new AbortController,s=setTimeout(()=>i.abort(),n),a=await fetch(`${e}/api/verify-key`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tail:t||null,tempKey:r||null}),signal:i.signal});if(clearTimeout(s),!a.ok)return null;return(await a.json())?.ok===!0}catch{return null}}async function h(){return(0,o._r)()?(0,o.rh)(await m()):(0,o.Yr)()?window.location.origin:null}async function m(){try{let e=await fetch(s.TR);return e.ok?await e.json():null}catch{return null}}function f(){let[e,t]=(0,n.useState)(!1),[r,o]=(0,n.useState)(""),u=(0,i.useRouter)(),{setAuth:f}=(0,c.Fo)(),g=(0,n.useCallback)(async(e,{persistSession:r=!0}={})=>{t(!0),o("");try{let t,n=await h();if(n){let t=e.tail||(0,a.Cj)(e.apiKey||""),i=e.tempKey||(e.token?.length<=8?e.token:null),s=await m(),c=(0,a.Uo)(s?.permanentKey||""),u=(0,a.Uo)(e.apiKey||e.token||""),h=String(s?.oneTimeKey||"").slice(0,6).toUpperCase(),g=i?!!h&&h===i.toUpperCase():!!c&&!!u&&(0,a.Uo)(c)===u;try{let s=g?await p(n,{tail:t,tempKey:i}):null;if(!0===s){let s=e.apiKey||i||"",o=(0,a.Uo)(s)||"direct";return t&&(0,l.LG)(o,{tail:t}),r&&f({apiKey:o,tunnelUrl:n,mode:"local",tempKey:i?i.toUpperCase():null,localIp:null}),{success:!0,shouldAskToSave:!0,apiKey:o}}if(!1===s)return o(d),{success:!1,wrongTail:!0}}catch{}}let i=new AbortController,c=setTimeout(()=>i.abort(),s.cC);try{t=await fetch(s.Sn.connect,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,apiKey:(0,a.Uo)(e.apiKey)}),signal:i.signal})}catch(e){throw Error(e?.name==="AbortError"?"Connection timed out. Please try again.":"Network error. Please try again.")}finally{clearTimeout(c)}if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Authentication failed")}let u=await t.json(),g=(0,a.Uo)(e.apiKey||u.apiKey);u.hostKeys?.x&&(0,l.LG)(g,{hostSealKey:u.hostKeys.x,hostPubKey:u.hostKeys.ed||null});let y=e.tail||(0,a.Cj)(e.apiKey||"");if(u.tunnelUrl&&(y||e.tempKey)){let t=await p(u.tunnelUrl,{tail:y,tempKey:e.tempKey||null});if(!1===t)return o(d),{success:!1,wrongTail:!0}}return r&&f({apiKey:g,tunnelUrl:u.tunnelUrl||null,mode:"remote",tempKey:e.tempKey?e.tempKey.toUpperCase():null,localIp:u.localIp||null}),{success:!0,shouldAskToSave:!0,apiKey:g}}catch(e){return o(e.message),{success:!1,error:e.message}}finally{t(!1)}},[u,f]);return{loading:e,error:r,setError:o,authenticateWithToken:(0,n.useCallback)(async(e,t=!1,r=null,n)=>t?g({token:e,tempKey:e,tail:r},n):g({token:e},n),[g]),authenticateWithApiKey:(0,n.useCallback)((e,t)=>g({apiKey:e},t),[g])}}},27520:(e,t,r)=>{r.d(t,{FQ:()=>o,Lq:()=>m,UX:()=>l,k_:()=>d,yO:()=>c});var n=r(2805);let i=[],s=new Set,a=location.hostname.startsWith("dev.")||"localhost"===location.hostname&&!(0,n.gJ)()||"1"===localStorage.getItem("9remote:termLog");function l(){return a}function o(){return i}function c(e){return s.add(e),()=>s.delete(e)}function d(){for(let e of(i.length=0,s))try{e(null)}catch(e){}}function u(e){if(null==e)return"";if(e instanceof Uint8Array||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)return`<${e.byteLength}b>`;if("string"==typeof e)return e.length>120?`${e.slice(0,60)}…${e.length}b`:e;if("object"==typeof e)try{return JSON.stringify(e)}catch(e){}return String(e)}let p=new Set(["recv"]),h=null;function m(e,...t){if(!a)return;let r=Date.now(),n=t.map(u).join(" ");if(h&&h.category===e&&h.baseMsg===n&&r-h.ts<3e3||p.has(e)&&h&&h.category===e&&r-h.ts<300){h.count=(h.count||1)+1,h.ts=r,h.msg=`${n} \xd7${h.count}`,queueMicrotask(()=>{for(let e of s)try{e(h)}catch(e){}});return}let l={ts:r,category:e,msg:n,baseMsg:n,count:1};h=l,i.push(l),i.length>800&&i.shift();try{console.log(`[termLog ${e}] ${n}`)}catch{}queueMicrotask(()=>{for(let e of s)try{e(l)}catch(e){}})}},29091:(e,t,r)=>{r.d(t,{B:()=>h});var n=r(2074),i=r(11472),s=r(34277),a=r(61826),l=r(33897);let o=(e,{min:t,max:r})=>Math.max(t,Math.min(r,Math.round(e)));var c=r(79253);let d={name:null,value:null},u=null,p=()=>{if(u&&(clearTimeout(u),u=null),null===d.name)return;let{name:e,value:t}=d;d.name=null,d.value=null;try{localStorage.setItem(e,JSON.stringify(t))}catch{}};window.addEventListener("pagehide",p),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&p()});let h=(0,n.v)((0,i.Zr)((e,t,r)=>({...{viewStack:[{type:"list"}],openedSessions:[],activeWorkspaceId:null,setActiveWorkspaceId:t=>e(e=>({activeWorkspaceId:t,fullMode:!!e.fullModes?.[t??l.AD]})),livePanes:[],touchLivePane:t=>e(e=>{let r=Array.isArray(t)?t:[t];return{livePanes:[...e.livePanes.filter(e=>!r.includes(e)),...r].slice(-s.kn)}}),mountedWorkspaces:{},markWorkspaceMounted:t=>e(e=>{let r=t??l.AD;return e.mountedWorkspaces[r]?e:{mountedWorkspaces:{...e.mountedWorkspaces,[r]:!0}}}),isWorkspaceMounted:e=>{let r=e??l.AD;return!!t().mountedWorkspaces[r]},drafts:{},setDraft:(t,r)=>e(e=>({drafts:{...e.drafts,[t]:r}})),collapsedWorkspaces:{},toggleWorkspace:t=>e(e=>({collapsedWorkspaces:{...e.collapsedWorkspaces,[t]:!e.collapsedWorkspaces[t]}})),cwdBySession:{},setCwd:(t,r)=>{if(!t||!r)return;let n=(0,c.kb)(r);e(e=>e.cwdBySession[t]===n?e:{cwdBySession:{...e.cwdBySession,[t]:n}})},pushView:t=>e(e=>{let r=Array.isArray(e.viewStack)?e.viewStack:[];return{viewStack:[...a.yP.includes(t?.type)?r:r.filter((e,t)=>!(a.yP.includes(e?.type)&&t===r.length-1)),t]}}),popView:()=>e(e=>{let t=Array.isArray(e.viewStack)?e.viewStack:[];return{viewStack:t.length>1?t.slice(0,-1):[{type:"list"}]}}),setViewStack:t=>e({viewStack:t}),addOpenedSession:t=>e(e=>({openedSessions:e.openedSessions.includes(t)?e.openedSessions:[...e.openedSessions,t]})),removeOpenedSession:t=>e(e=>{let{[t]:r,...n}=e.drafts,{[t]:i,...s}=e.pendingStartup,{[t]:a,...l}=e.artifactsBySession;return{artifactsBySession:l,openedSessions:e.openedSessions.filter(e=>e!==t),livePanes:e.livePanes.filter(e=>e!==t),hiddenPaneSessionIds:e.hiddenPaneSessionIds?e.hiddenPaneSessionIds.filter(e=>e!==t):[],drafts:n,pendingStartup:s}}),replaceOpenedSession:(t,r)=>e(e=>{if(!r||t===r)return e;let n=e=>e===t?r:e;return{openedSessions:!t||e.openedSessions.includes(t)?e.openedSessions.map(n):e.openedSessions.includes(r)?e.openedSessions:[...e.openedSessions,r],livePanes:e.livePanes.map(n)}}),clearOpenedSessions:()=>e({openedSessions:[],livePanes:[]}),reorderOpenedSessions:t=>e(e=>{let r=new Set(t),n=t.filter(t=>e.openedSessions.includes(t));if(n.length<2)return{};let i=0;return{openedSessions:e.openedSessions.map(e=>r.has(e)?n[i++]:e)}}),closeSession:t=>e(e=>{let{[t]:r,...n}=e.drafts,{[t]:i,...s}=e.pendingStartup,{[t]:a,...l}=e.agentBySession,o=((e,t)=>{let r={};for(let[n,i]of Object.entries(e))r[n]={at:0,sessions:t?i.sessions.map(t):i.sessions};return r})(e.agentHistory,e=>e.openSessionId===t?{...e,openSessionId:null}:e);return{openedSessions:e.openedSessions.filter(e=>e!==t),livePanes:e.livePanes.filter(e=>e!==t),drafts:n,pendingStartup:s,agentBySession:l,agentHistory:o}}),getCurrentView:()=>{let{viewStack:e}=t();return e[e.length-1]},getSelectedSession:()=>{let{viewStack:e}=t();for(let t=e.length-1;t>=0;t--)if("terminal"===e[t].type)return e[t].sessionId;return null},reset:()=>e({viewStack:[{type:"list"}],openedSessions:[],livePanes:[],activeWorkspaceId:null})},...{sidebarCollapsed:!1,toggleSidebar:()=>e(e=>({sidebarCollapsed:!e.sidebarCollapsed})),setSidebarCollapsed:t=>e({sidebarCollapsed:!!t}),sidebarWidth:s.gH.default,setSidebarWidth:t=>e({sidebarWidth:o(t,s.gH)}),fullModes:{},fullMode:!1,toggleFullMode:t=>e(e=>{let r=t??e.activeWorkspaceId??l.AD,n=!e.fullModes[r];return{fullModes:{...e.fullModes,[r]:n},fullMode:r===(e.activeWorkspaceId??l.AD)?n:e.fullMode}}),setFullMode:(t,r)=>e(e=>{let n="boolean"==typeof t?e.activeWorkspaceId??l.AD:t??e.activeWorkspaceId??l.AD,i="boolean"==typeof t?t:!!r;return{fullModes:{...e.fullModes,[n]:i},fullMode:n===(e.activeWorkspaceId??l.AD)?i:e.fullMode}}),hiddenPaneSessionIds:[],toggleHidePane:t=>e(e=>({hiddenPaneSessionIds:e.hiddenPaneSessionIds.includes(t)?e.hiddenPaneSessionIds.filter(e=>e!==t):[...e.hiddenPaneSessionIds,t]})),unhidePane:t=>e(e=>({hiddenPaneSessionIds:e.hiddenPaneSessionIds.filter(e=>e!==t)})),paneWidths:{},setPaneWidth:(t,r)=>e(e=>({paneWidths:{...e.paneWidths,[t]:null==r?null:o(r,s.k9)}})),rightPanelOpen:window.innerWidth>=s.jK,rightPanelTabs:{},rightPanelWidth:s.Ds.default,toggleRightPanel:()=>e(e=>({rightPanelOpen:!e.rightPanelOpen,rightPanelWasOpen:null})),closeRightPanel:()=>e({rightPanelOpen:!1,rightPanelWasOpen:null}),openRightPanel:()=>e({rightPanelOpen:!0,rightPanelWasOpen:null}),setRightPanelTab:(t,r)=>e(e=>({rightPanelOpen:!0,rightPanelWasOpen:null,...null!=r?{rightPanelTabs:{...e.rightPanelTabs,[r]:t}}:{}})),rightPanelRoots:{},setRightPanelRoot:(t,r)=>e(e=>{if(null==t)return e;let n=e.rightPanelRoots[t],i=r&&r!==t?r:void 0;if(n===i)return e;let s={...e.rightPanelRoots};return i?s[t]=i:delete s[t],{rightPanelRoots:s}}),setRightPanelWidth:t=>e({rightPanelWidth:o(t,s.Ds)}),editorFilePath:null,editorPanelWidth:s.Ao.default,setEditorPanelWidth:t=>e({editorPanelWidth:o(t,s.Ao)}),editorPreviewSeq:0,artifactTitle:null,rightPanelWasOpen:null,artifactSessionId:null,openEditorFile:(t,r={})=>e(e=>({editorFilePath:t,editorPreviewSeq:r.preview?e.editorPreviewSeq+1:0,artifactTitle:r.artifactTitle||null,artifactSessionId:r.artifactSessionId||null,...r.artifactTitle?{rightPanelWasOpen:e.rightPanelWasOpen??e.rightPanelOpen,rightPanelOpen:!1}:{}})),closeEditorFile:()=>e(e=>({editorFilePath:null,editorPreviewSeq:0,artifactTitle:null,artifactSessionId:null,rightPanelWasOpen:null,...e.rightPanelWasOpen?{rightPanelOpen:!0}:{},...e.artifactSessionId&&e.editorFilePath?{artifactsBySession:((e,t,r)=>{let n=e[t];if(!n)return e;let i=n.filter(e=>e.path!==r);if(i.length===n.length)return e;let{[t]:s,...a}=e;return i.length?{...a,[t]:i}:a})(e.artifactsBySession,e.artifactSessionId,e.editorFilePath)}:{}})),hiddenHeaderButtons:["mobile"],hiddenHeaderButtonsMigrated:!1,toggleHeaderButton:t=>e(e=>({hiddenHeaderButtons:e.hiddenHeaderButtons.includes(t)?e.hiddenHeaderButtons.filter(e=>e!==t):[...e.hiddenHeaderButtons,t]})),mobileLowPower:!1,setMobileLowPower:t=>e({mobileLowPower:!!t}),mobileOpen:!1,mobileMode:"float",mobilePanelWidth:s.b5.default,mobileFloatRect:null,setMobileOpen:t=>e({mobileOpen:!!t}),setMobileMode:t=>e({mobileMode:t,mobileOpen:!0}),setMobilePanelWidth:t=>e({mobilePanelWidth:o(t,s.b5)}),setMobileFloatRect:t=>e({mobileFloatRect:t}),mobileSession:null,setMobileSession:t=>e(e=>({mobileSession:"function"==typeof t?t(e.mobileSession):t}))},...{webglEnabled:!0,setWebglEnabled:t=>e({webglEnabled:!!t}),fontSize:null,setFontSize:t=>e({fontSize:t?Math.max(10,Math.min(18,Math.round(t))):null}),terminalTheme:"default",setTerminalTheme:t=>e({terminalTheme:t||"default"}),terminalBackgrounds:["art8"],setTerminalBackgrounds:t=>e({terminalBackgrounds:Array.isArray(t)?t.filter(Boolean):[]}),terminalBackgroundOpacity:null,setTerminalBackgroundOpacity:t=>e({terminalBackgroundOpacity:null==t?s._z:Number(Math.max(s.DW.min,Math.min(s.DW.max,Math.round(t/s.DW.step)*s.DW.step)).toFixed(2))}),customBackgrounds:[],setCustomBackgrounds:t=>e({customBackgrounds:Array.isArray(t)?t.filter(e=>e?.id&&e?.dataUrl):[]}),backgroundBySession:{},setSessionBackground:(t,r)=>e(e=>{let n={...e.backgroundBySession};return r?n[t]=r:delete n[t],{backgroundBySession:n}}),showFolderButton:!0,showNoteButton:!1,setShowFolderButton:t=>e({showFolderButton:!!t}),setShowNoteButton:t=>e({showNoteButton:!!t}),noteChips:[],addNoteChip:t=>e(e=>({noteChips:[...e.noteChips,t]})),removeNoteChip:t=>e(e=>({noteChips:e.noteChips.filter(e=>e!==t)})),pinnedNotes:{},setNotePinned:(t,r)=>e(e=>{let n={...e.pinnedNotes};return r?n[t]=!0:delete n[t],{pinnedNotes:n}})},...{agentCaps:{},setAgentCaps:t=>e({agentCaps:t||{}}),artifactEnabled:!1,setArtifactEnabled:t=>e({artifactEnabled:!!t}),mcpClients:[],setMcpClients:t=>e({mcpClients:Array.isArray(t)?t:[]}),agentClisBy:{},setAgentClis:(t,r)=>e(e=>({agentClisBy:{...e.agentClisBy,[t]:{list:Array.isArray(r)?r:[],at:Date.now()}}})),agentHistory:{},setAgentHistory:(t,r)=>e(e=>({agentHistory:{...e.agentHistory,[t]:{at:Date.now(),sessions:Array.isArray(r)?r:[]}}})),invalidateAgentHistory:()=>e(e=>({agentHistory:(e=>{let t={};for(let[r,n]of Object.entries(e))t[r]={at:0,sessions:n.sessions};return t})(e.agentHistory)})),agentBySession:{},setSessionAgent:(t,r)=>e(e=>e.agentBySession[t]===r?e:{agentBySession:{...e.agentBySession,[t]:r}}),pendingStartup:{},queueStartup:(t,r)=>e(e=>({pendingStartup:{...e.pendingStartup,[t]:r}})),consumeStartup:r=>{let n=t().pendingStartup[r];return void 0===n?null:(e(e=>{let{[r]:t,...n}=e.pendingStartup;return{pendingStartup:n}}),n)},artifactsBySession:{},pushArtifact:(t,r)=>e(e=>{if(!t||!r?.path)return{};let n=(e.artifactsBySession[t]||[]).filter(e=>e.path!==r.path);return{artifactsBySession:{...e.artifactsBySession,[t]:[r,...n].slice(0,s.zv)}}}),removeArtifact:(t,r)=>e(e=>({artifactsBySession:((e,t,r)=>{let n=e[t];if(!n)return e;let i=n.filter(e=>e.path!==r);if(i.length===n.length)return e;let{[t]:s,...a}=e;return i.length?{...a,[t]:i}:a})(e.artifactsBySession,t,r)}))}}),{name:"terminal-ui-state",partialize:e=>({viewStack:e.viewStack,openedSessions:e.openedSessions,agentBySession:e.agentBySession,activeWorkspaceId:e.activeWorkspaceId,collapsedWorkspaces:e.collapsedWorkspaces,webglEnabled:e.webglEnabled,fontSize:e.fontSize,terminalTheme:e.terminalTheme,terminalBackgrounds:e.terminalBackgrounds,terminalBackgroundOpacity:e.terminalBackgroundOpacity,backgroundBySession:e.backgroundBySession,showFolderButton:e.showFolderButton,showNoteButton:e.showNoteButton,noteChips:e.noteChips,pinnedNotes:e.pinnedNotes,sidebarCollapsed:e.sidebarCollapsed,sidebarWidth:e.sidebarWidth,fullModes:e.fullModes||{},fullMode:e.fullMode,hiddenPaneSessionIds:e.hiddenPaneSessionIds||[],paneWidths:e.paneWidths,rightPanelOpen:e.rightPanelOpen,rightPanelTabs:e.rightPanelTabs,rightPanelWidth:e.rightPanelWidth,editorPanelWidth:e.editorPanelWidth,hiddenHeaderButtons:e.hiddenHeaderButtons,hiddenHeaderButtonsMigrated:e.hiddenHeaderButtonsMigrated,mobileLowPower:e.mobileLowPower,mobileMode:e.mobileMode,mobilePanelWidth:e.mobilePanelWidth,mobileFloatRect:e.mobileFloatRect,artifactsBySession:e.artifactsBySession}),storage:{getItem:e=>{try{let t=localStorage.getItem(e);if(!t)return null;let r=JSON.parse(t);return r&&!Array.isArray(r.viewStack)&&(r.viewStack=[{type:"list"}]),r}catch{return null}},setItem:(e,t)=>{d.name=e,d.value=t,u||(u=setTimeout(p,s.eu))},removeItem:e=>{d.name===e&&(d.name=null,d.value=null),localStorage.removeItem(e)}},onRehydrateStorage:()=>e=>{e&&(Array.isArray(e.viewStack)&&0!==e.viewStack.length||(e.viewStack=[{type:"list"}]),window.location.pathname.replace(/\/+$/,"")===a.U2&&(e.viewStack=[{type:"list"}]),e.viewStack=e.viewStack.filter(e=>!a.yP.includes(e?.type)),0===e.viewStack.length&&(e.viewStack=[{type:"list"}]),Array.isArray(e.terminalBackgrounds)||(e.terminalBackgrounds=[]),e.terminalBackground&&"none"!==e.terminalBackground&&0===e.terminalBackgrounds.length&&(e.terminalBackgrounds=[e.terminalBackground]),e.agentBySession&&"object"==typeof e.agentBySession||(e.agentBySession={}),window.innerWidth<s.jK&&(e.rightPanelOpen=!1),!e.hiddenHeaderButtonsMigrated&&(e.hiddenHeaderButtonsMigrated=!0,Array.isArray(e.hiddenHeaderButtons)?e.hiddenHeaderButtons.includes("mobile")||(e.hiddenHeaderButtons=[...e.hiddenHeaderButtons,"mobile"]):e.hiddenHeaderButtons=["mobile"]))}}))},31408:(e,t,r)=>{function n(e,t){if(e===t)return!0;if(!e||!t||"object"!=typeof e||"object"!=typeof t)return!1;let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n of r)if(!(n in t)||e[n]!==t[n])return!1;return!0}function i(e,t){if(e===t)return!0;if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function s(e,t){if(e===t)return!0;if(!e||!t)return!1;let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let i of r)if(!(i in t)||!n(e[i],t[i]))return!1;return!0}r.d(t,{dI:()=>n,h3:()=>s,nk:()=>i})},31735:(e,t,r)=>{r.d(t,{H$:()=>a,d6:()=>s});var n=r(1521),i=r(29717);let s=(e,t)=>{if(e&&t)try{localStorage.setItem("9remote_nav:"+e,t)}catch{}};function a(e){let t=(0,i.usePathname)(),r=(0,i.useSearchParams)();(0,n.useEffect)(()=>{if(!e||!t?.startsWith("/workspace"))return;let n=function(e,t){if(!e)return"";let r=t?.toString();return r?`${e}?${r}`:e}(t,r);n&&s(e,n)},[e,t,r])}},33897:(e,t,r)=>{r.d(t,{AD:()=>n,Jc:()=>o,Mt:()=>a,g4:()=>l,gk:()=>s,xs:()=>i});let n="__ungrouped__",i=e=>e?.workspaceId??e?.groupId??null;function s({sessions:e,openedSessions:t,livePanes:r,mountedWorkspaces:a,activeWorkspaceId:l,isDesktop:o}){let c=new Set(e.filter(e=>i(e)===(l??null)).map(e=>e.id)),d=t.filter(e=>c.has(e)),u=new Set([...d,...r.filter(e=>t.includes(e))]),p=t.filter(e=>u.has(e)),h=new Map(e.map(e=>[e.id,i(e)])),m=new Set(t.filter(e=>!!c.has(e)||!!o&&!!a[h.get(e)??n])),f=new Map(d.map((e,t)=>[e,t]));return{workspaceSessionIds:c,workspaceOpenedSessions:d,renderedSessions:p,mountedSet:m,workspaceIndex:f}}let a=(e,t,r)=>!t&&r.has(e)?120*r.get(e):0;function l({container:e,pane:t}){if(!e||!t||t.offsetWidth<=0)return null;let r=t.getBoundingClientRect().left-e.getBoundingClientRect().left;return Math.max(0,Math.min(e.scrollLeft+r-(e.clientWidth-t.offsetWidth)/2,e.scrollWidth-e.clientWidth))}function o({rowWidth:e,paneCount:t,sidebarWidth:r,sidePx:n,gapPx:i,paddingPx:s,minWidth:a}){return!(e>0)||t<=0?null:Math.max(a,Math.floor((e-r-s-n-(t-1)*i)/t))}},34277:(e,t,r)=>{r.d(t,{$Z:()=>ee,A_:()=>c,Ao:()=>h,B$:()=>K,BM:()=>es,DW:()=>H,Ds:()=>p,EE:()=>P,FC:()=>eg,Fz:()=>m,GL:()=>f,Gp:()=>et,IJ:()=>Y,Il:()=>ef,Jv:()=>l,KA:()=>b,KN:()=>$,Lo:()=>Q,M8:()=>er,Mg:()=>eS,Nz:()=>ew,OM:()=>eu,Pj:()=>j,Pz:()=>Z,Qe:()=>d,RF:()=>ey,RS:()=>V,TM:()=>D,Tb:()=>v,Tk:()=>w,Uc:()=>ea,VE:()=>ec,W$:()=>E,YA:()=>em,YS:()=>x,ZU:()=>U,_C:()=>eT,_O:()=>X,_z:()=>B,aD:()=>L,am:()=>T,ar:()=>N,b5:()=>g,b9:()=>eb,bl:()=>e_,bs:()=>C,c:()=>W,cK:()=>ev,dU:()=>ei,de:()=>eR,dt:()=>n,eE:()=>ed,eu:()=>I,fw:()=>ep,g$:()=>eA,gH:()=>u,hp:()=>R,i5:()=>eh,iW:()=>k,j4:()=>en,jK:()=>i,k9:()=>s,kn:()=>o,ll:()=>S,ok:()=>eC,pS:()=>a,pZ:()=>q,pt:()=>J,qQ:()=>A,qj:()=>y,qw:()=>el,t:()=>F,vP:()=>M,vk:()=>z,wu:()=>O,y:()=>ek,zm:()=>eo,zv:()=>_});let n=["git status","git add .",'git commit -m ""',"git push","git pull","git fetch","git diff","git log --oneline","git branch","git checkout","git checkout -b","git switch","git stash","git stash pop","git merge","git rebase","git clone","git remote -v","git restore","npm install","npm ci","npm run dev","npm run build","npm run test","npm run lint","npm outdated","pnpm install","pnpm dev","yarn dev","bun install","cd ..","cd ~","cd -","ls -la","ll","mkdir -p","cp -r","find . -name","du -sh","chmod +x","ln -s","grep -rn","grep -i","wc -l","tail -f","ps aux","df -h","free -h","lsof -i","netstat -tlnp","docker ps","docker ps -a","docker images","docker logs -f","docker exec -it","docker compose up -d","docker compose down","docker build -t","code .","claude","claude --continue","claude --resume","claude --dangerously-skip-permissions","claude mcp","codex","codex --full-auto"],i=760,s={min:400,max:1/0},a=2,l=0,o=12,c=250,d=8,u={default:190,min:180,max:1/0},p={default:190,min:190,max:1/0},h={default:420,min:280,max:1/0},m=[{id:"remote",labelKey:"menu.remoteDesktop",group:"header"},{id:"mobile",labelKey:"mobile.androidDevice",group:"header"},{id:"sites",labelKey:"menu.sites",group:"header"},{id:"notifications",labelKey:"menu.notificationsButton",group:"header"},{id:"folder",labelKey:"menu.showFolder",group:"pane",storeKey:"showFolderButton",setterKey:"setShowFolderButton"},{id:"note",labelKey:"menu.showNote",group:"pane",storeKey:"showNoteButton",setterKey:"setShowNoteButton"}],f=[{group:"header",titleKey:"menu.headerButtons"},{group:"pane",titleKey:"menu.showButtons"}],g={default:300,min:240,max:1/0},y={width:{default:300,min:240,max:900},height:{default:620,min:320},margin:12,defaultOffset:24},_=20,b=1e4,w={maxDepth:1,deepMaxDepth:3,cacheTtlMs:3e4},k={topThresholdLines:5,guardMs:600,minFetchBytes:256,chainMax:3,chainDebounceMs:300,disabled:!1},v=5242880,A=5,S=3e3,T=150,x=100,C=101,R=200,P={Escape:{data:"\x1b"},c:{ctrl:!0,data:"\x03",requireNoSelection:!0},d:{ctrl:!0,data:"\x04"},z:{ctrl:!0,data:"\x1a"},l:{ctrl:!0,data:"\f"}},I=250,$=999,D=["check again","continue","summarize"],L="terminal:noteSync",M="terminal:openSession",O=5e3,U=250,E=90,j={cursorBlink:!0,fontSize:12,fontSizeMobile:12,fontFamily:'ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", "Noto Sans Mono", Menlo, Monaco, "Courier New", monospace',scrollback:15e3,convertEol:!0,allowProposedApi:!0,scrollOnUserInput:!0,fastScrollModifier:"none",smoothScrollDuration:0,rescaleOverlappingGlyphs:!0,minimumContrastRatio:4.5,macOptionIsMeta:!0};function N(e){return null!=e?e:window.innerWidth<768?j.fontSizeMobile:j.fontSize}let B=.8,F=.25,W="16,16,20",q="116,120,136",K=.28,H={min:.3,max:.95,step:.01},z={none:{label:"None"},art1:{label:"Anime 1",src:"/backgrounds/bg9.jpg"},art2:{label:"Anime 2",src:"/backgrounds/bg2.jpg"},art3:{label:"Anime 3",src:"/backgrounds/bg3.jpg"},art4:{label:"Anime 4",src:"/backgrounds/bg4.jpg"},art5:{label:"Anime 5",src:"/backgrounds/bg5.jpg"},art7:{label:"Anime 7",src:"/backgrounds/bg7.jpg"},art8:{label:"Anime 8",src:"/backgrounds/bg8.jpg"},art9:{label:"Anime 9",src:"/backgrounds/bg10.jpg"},art10:{label:"Anime 10",src:"/backgrounds/bg11.jpg"},art11:{label:"Anime 11",src:"/backgrounds/bg12.jpg"},art12:{label:"Anime 12",src:"/backgrounds/bg13.jpg"}};function J(e,t){return e&&t&&"none"!==t&&(z[t]||String(t).startsWith("custom"))?{...e,background:"#10101400"}:e}function G(e){return"custom"===e?"custom":"string"==typeof e&&e.startsWith("custom:")?e.slice(7):null}function V(e,t=[]){let r=G(e);return r?t.find(e=>e?.id===r)?.dataUrl||null:z[e]?.src||null}function Z(e){return z[e]?.label||(G(e)?"Custom":z.none.label)}let X=4e3,Q=2e4;function Y(e,t=[]){return Array.isArray(e)?e.filter(e=>{let r=G(e);return r?t.some(e=>e?.id===r):"none"===e||!!z[e]}):[]}function ee(e,t,r=[],n=0){var i;return Y([e],r)[0]||(i=Y(t,r),Array.isArray(i)&&0!==i.length&&i[n%i.length]||"none")}let et={gpuAcceleration:"auto",smoothScrollDuration:125},er={clipboard:!0,search:!0,image:!0},en=30,ei=2,es=100,ea=600,el=150,eo=4e3,ec=3e3,ed=8e3,eu=6e4,ep=3e4,eh="28%",em=400,ef={lineHeight:18,sensitivity:1,friction:.95,minVelocity:.3,maxVelocity:55,wheelStepLines:1,tuiThrottleMs:50,momentumRenderCadenceMs:33,tuiBackpressureTimeoutMs:120,sgrUp:(e,t)=>`\x1b[<64;${e};${t}M`,sgrDown:(e,t)=>`\x1b[<65;${e};${t}M`},eg={longPressMs:450,moveTolerance:10,wordChars:/[A-Za-z0-9._\-/~:@]/},ey={verbs:["cd","ls","ll","cat","less","more","head","tail","vim","nvim","nano","bat","code","code-insiders","rm","cp","mv","mkdir","touch","chmod","open","grep"],ttlMs:3e5,debounceMs:120,maxDirs:20,maxResults:8},e_={minDistance:60,ratio:1.5,maxDuration:500},eb=e=>!!e&&27!==e.charCodeAt(0),ew=e=>"string"==typeof e&&(/^\x1b\[[?>=][0-9;]*c$/.test(e)||/^\x1b\[[0-9]+;[0-9]+R$/.test(e)||/^\x1b\[0n$/.test(e)||/^\x1b\]\d+;/.test(e)),ek=[{id:"ctrl",label:"Ctrl",key:"Ctrl",type:"modifier"},{id:"opt",label:"Opt",key:"Alt",type:"modifier"},{id:"shift",label:"Shift",key:"Shift",type:"modifier"},{id:"meta",label:"⌘",key:"Meta",type:"modifier"},{id:"esc",label:"Esc",key:"Escape",type:"key"},{id:"tab",label:"Tab",key:"Tab",type:"key"},{id:"enter",label:"↵",key:"Enter",type:"key"},{id:"backspace",label:"⌫",key:"Backspace",type:"key"},{id:"up",label:"↑",key:"ArrowUp",type:"arrow"},{id:"down",label:"↓",key:"ArrowDown",type:"arrow"},{id:"left",label:"←",key:"ArrowLeft",type:"arrow"},{id:"right",label:"→",key:"ArrowRight",type:"arrow"},{id:"home",label:"Home",key:"Home",type:"key"},{id:"end",label:"End",key:"End",type:"key"},{id:"pgup",label:"PgUp",key:"PageUp",type:"key"},{id:"pgdn",label:"PgDn",key:"PageDown",type:"key"},{id:"del",label:"Del",key:"Delete",type:"key"},{id:"ins",label:"Ins",key:"Insert",type:"key"},{id:"ctrlA",label:"^A",key:"a",type:"ctrl"},{id:"ctrlC",label:"^C",key:"c",type:"ctrl"},{id:"ctrlD",label:"^D",key:"d",type:"ctrl"},{id:"ctrlE",label:"^E",key:"e",type:"ctrl"},{id:"ctrlK",label:"^K",key:"k",type:"ctrl"},{id:"ctrlL",label:"^L",key:"l",type:"ctrl"},{id:"ctrlN",label:"^N",key:"n",type:"ctrl"},{id:"ctrlP",label:"^P",key:"p",type:"ctrl"},{id:"ctrlR",label:"^R",key:"r",type:"ctrl"},{id:"ctrlT",label:"^T",key:"t",type:"ctrl"},{id:"ctrlU",label:"^U",key:"u",type:"ctrl"},{id:"ctrlW",label:"^W",key:"w",type:"ctrl"},{id:"ctrlX",label:"^X",key:"x",type:"ctrl"},{id:"ctrlY",label:"^Y",key:"y",type:"ctrl"},{id:"ctrlZ",label:"^Z",key:"z",type:"ctrl"},{id:"f1",label:"F1",key:"F1",type:"key"},{id:"f2",label:"F2",key:"F2",type:"key"},{id:"f3",label:"F3",key:"F3",type:"key"},{id:"f4",label:"F4",key:"F4",type:"key"},{id:"f5",label:"F5",key:"F5",type:"key"},{id:"f6",label:"F6",key:"F6",type:"key"},{id:"f7",label:"F7",key:"F7",type:"key"},{id:"f8",label:"F8",key:"F8",type:"key"},{id:"f9",label:"F9",key:"F9",type:"key"},{id:"f10",label:"F10",key:"F10",type:"key"},{id:"f11",label:"F11",key:"F11",type:"key"},{id:"f12",label:"F12",key:"F12",type:"key"},{id:"pipe",label:"|",key:"|",type:"key"},{id:"tilde",label:"~",key:"~",type:"key"},{id:"slash",label:"/",key:"/",type:"key"},{id:"backslash",label:"\\",key:"\\",type:"key"},{id:"dash",label:"-",key:"-",type:"key"},{id:"underscore",label:"_",key:"_",type:"key"}],ev=["esc","up","down","ctrlC","ctrl","opt","shift","tab","slash"],eA="enter",eS=[["left","right","home","end","pgup","pgdn","del"],["ctrlZ","ctrlR","ctrlL","ctrlA","ctrlE","ctrlW","ctrlD"],["f1","f2","f3","f4","f5","f10","f11"]],eT={base:"flex items-center justify-center rounded-brand font-semibold transition-all duration-150 ease-out active:scale-[0.94]",textNormal:"text-xs",textSmall:"text-[11px]",normal:"bg-surface-2 hover:bg-surface-3 text-text",arrow:"bg-surface-2 hover:bg-surface-3 text-text text-sm",modifierActive:"bg-brand-500 text-white shadow-sm",pinned:"bg-brand-500/15 hover:bg-brand-500/25 text-brand-400",size:{minWidth:"34px",height:"32px",paddingLeft:"6px",paddingRight:"6px"},sizeLarge:{minWidth:"38px",height:"32px",paddingLeft:"8px",paddingRight:"8px"},sizeSmall:{width:"28px",height:"28px"}},ex=["main","master"],eC=e=>ex.includes(e),eR={DELAY_MS:400,GAP_PX:6,EDGE_PX:8,MAX_WIDTH_PX:320,EST_HEIGHT_PX:48,SLACK_PX:.5}},38415:(e,t,r)=>{r.d(t,{Gf:()=>c,Gi:()=>h,Hu:()=>o,Nn:()=>u,O8:()=>s,cu:()=>d,el:()=>a,ij:()=>p,l7:()=>l,no:()=>m,pe:()=>n,rl:()=>i,xO:()=>f});let n="https://api.github.com",i="https://github.com/decolua/9remote",s=`${n}/repos/decolua/9remote`,a=`${s}/releases?per_page=100`,l=!1,o=".devcontainer/devcontainer.json",c="NREMOTE_API_KEY",d={name:"9Remote",image:"mcr.microsoft.com/devcontainers/universal:latest",postCreateCommand:"npm install -g 9remote@latest",postAttachCommand:"nohup 9remote start > /tmp/9remote.log 2>&1 &",forwardPorts:[2208],portsAttributes:{2208:{label:"9Remote Server",onAutoForward:"silent",visibility:"public"}}},u=3e3,p=60,h={available:"Available",starting:"Starting",shutdown:"Shutdown",unknown:"Unknown"},m={user:"/user",codespaces:"/user/codespaces",codespaceByName:e=>`/user/codespaces/${e}`,startCodespace:e=>`/user/codespaces/${e}/start`,userReposList:"/user/repos?per_page=100&sort=updated&affiliation=owner,collaborator",repoContents:(e,t,r)=>`/repos/${e}/${t}/contents/${r}`,createCodespaceForRepo:(e,t)=>`/repos/${e}/${t}/codespaces`,codespaceSecretsPublicKey:"/user/codespaces/secrets/public-key",codespaceSecret:e=>`/user/codespaces/secrets/${e}`,codespaceSecretRepos:(e,t)=>`/user/codespaces/secrets/${e}/repositories/${t}`};function f(e){return`https://${e}-2208.app.github.dev`}},42174:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(73365),i=r(1521),s=r(98196),a=r(8910),l=r(78762),o=r(64683);function c({isOpen:e,onClose:t,onConfirm:r,title:d,message:u,confirmText:p,cancelText:h}){let{t:m}=(0,l.s)(),f=(0,i.useRef)(null),g=(0,i.useRef)(null),y=p??m("common.confirm"),_=h??m("common.cancel");return((0,i.useEffect)(()=>{if(!e)return;let t=requestAnimationFrame(()=>{g.current?.focus()});return()=>cancelAnimationFrame(t)},[e]),(0,i.useEffect)(()=>{if(!e)return;let n=e=>{if("Escape"===e.key)e.preventDefault(),e.stopPropagation(),t();else if("Enter"===e.key){if(f.current&&document.activeElement===f.current){e.preventDefault(),e.stopPropagation(),t();return}e.preventDefault(),e.stopPropagation(),(0,a.e)(),r?.(),t()}};return window.addEventListener("keydown",n,!0),()=>window.removeEventListener("keydown",n,!0)},[e,t,r]),!e||"u"<typeof document)?null:(0,s.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center px-4",style:{paddingTop:"max(1rem, env(safe-area-inset-top))",paddingBottom:"max(1rem, env(safe-area-inset-bottom))"},children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-[2px] animate-in fade-in duration-150",onClick:t}),(0,n.jsxs)("div",{role:"dialog","aria-modal":"true",className:"relative card-elev max-w-md w-full my-auto max-h-[min(85%,calc(var(--app-height,85vh)-2rem))] overflow-y-auto animate-in zoom-in-95 duration-200",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,n.jsx)("div",{className:"px-6 py-4",children:(0,n.jsx)("h3",{className:"text-lg font-semibold text-text",children:d})}),(0,n.jsx)("div",{className:"px-6 pb-4",children:(0,n.jsx)("p",{className:"text-text whitespace-pre-line",children:u})}),(0,n.jsxs)("div",{className:"px-6 py-4 flex justify-end gap-3",children:[(0,n.jsxs)("button",{ref:f,onClick:()=>{(0,a.e)(),t()},className:"px-4 py-2 bg-surface-2 hover:bg-surface-3 text-text rounded-brand transition-all duration-150 ease-out active:scale-[0.98] font-medium flex items-center gap-1.5",children:[(0,n.jsx)("span",{children:_}),(0,n.jsx)("kbd",{className:"hidden sm:inline-flex items-center text-[10px] font-mono px-1 py-0.5 rounded bg-surface-3 text-text-muted leading-none",children:"Esc"})]}),(0,n.jsxs)("button",{ref:g,onClick:()=>{(0,a.e)(),r?.(),t()},className:"px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded-brand transition-all duration-150 ease-out active:scale-[0.98] font-medium flex items-center gap-1.5 focus:outline-none focus:ring-2 focus:ring-red-500/50",children:[(0,n.jsx)("span",{children:y}),(0,n.jsx)("kbd",{className:"hidden sm:inline-flex items-center justify-center w-4 h-4 rounded bg-white/20 text-white",children:(0,n.jsx)(o.Lt,{size:10,strokeWidth:2.5})})]})]})]})]}),document.body)}},45111:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(73365);function i({size:e="md",text:t,className:r=""}){return(0,n.jsxs)("div",{className:`flex flex-col items-center justify-center gap-3 ${r}`,children:[(0,n.jsx)("div",{className:`animate-spin rounded-full border-brand-500 border-t-transparent ${{sm:"h-4 w-4 border-2",md:"h-8 w-8 border-2",lg:"h-12 w-12 border-b-2"}[e]}`}),t&&(0,n.jsx)("p",{className:"text-brand-500 text-sm font-medium",children:t})]})}},51627:(e,t,r)=>{r.d(t,{U:()=>n});function n(e,t){if(!e||!t)return!1;let r=String(e).split(".").map(Number),n=String(t).split(".").map(Number);for(let e=0;e<3;e++){let t=r[e]||0,i=n[e]||0;if(t!==i)return t>i}return!1}},52159:(e,t,r)=>{r.d(t,{c:()=>i});var n=r(7938);function i(e,...t){n.eR.debug?.[e]&&console.log(...t)}},61826:(e,t,r)=>{r.d(t,{O5:()=>c,U2:()=>n,dX:()=>d,mn:()=>o,yP:()=>s});let n="/workspace",i={list:()=>n,terminal:e=>`${n}/terminal/${encodeURIComponent(e.sessionId||"")}`,files:e=>l(`${n}/files`,{ws:e.workspace,p:e.currentPath}),editor:e=>l(`${n}/editor`,{path:e.path,line:e.line,col:e.column}),git:e=>l(`${n}/git`,{ws:e.workspace}),remote:()=>`${n}/remote`,mobile:()=>`${n}/mobile`,workspaces:()=>`${n}/workspaces`,browse:e=>l(`${n}/browse`,{path:e.path}),pair:()=>`${n}/pair`,welcome:()=>`${n}/welcome`},s=["site"],a={"":"list",terminal:"terminal",files:"files",editor:"editor",git:"git",remote:"remote",mobile:"mobile",workspaces:"workspaces",browse:"browse",pair:"pair",welcome:"welcome"};function l(e,t){let r=Object.entries(t).filter(([,e])=>null!=e&&""!==e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join("&");return r?`${e}?${r}`:e}function o(e,t){if(!e?.startsWith(n))return null;let[r,i]=e.slice(n.length).replace(/^\//,"").split("/"),s=a[r||""];if(!s)return null;let l=e=>t?.get(e)||void 0;switch(s){case"terminal":return{type:s,sessionId:i?decodeURIComponent(i):void 0};case"files":return{type:s,workspace:l("ws"),currentPath:l("p")};case"editor":return{type:s,path:l("path"),line:u(l("line")),column:u(l("col"))};case"git":return{type:s,workspace:l("ws")};case"browse":return{type:s,path:l("path")};default:return{type:s}}}function c(e){return(i[e?.type]||i.list)(e)}function d(e,t){let r=c(t),n=e.findIndex(e=>c(e)===r);if(-1!==n)return e.slice(0,n+1);if("terminal"===t.type&&e[e.length-1]?.type==="terminal"){let r=[...e];return r[r.length-1]=t,r}return null}function u(e){let t=Number(e);return Number.isFinite(t)?t:void 0}},63977:(e,t,r)=>{r.d(t,{freshAuth:()=>s});var n=r(90084),i=r(86251);async function s(e={},t){let r={...e,connectionMode:t},a=(0,n.lz)(e.apiKey),l=e.tempKey?(0,n.lz)(e.tempKey):null,o=l?.tail?l:a?.tail?a:a||l,c=o?.tail;if(delete r.keyTail,delete r.keyTailSealed,!c)return r;if(o?.hostSealKey){let e=await (0,i.Y)(c,o.hostSealKey);if(e)return r.keyTailSealed=e,r}return r.keyTail=c,r}},64683:(e,t,r)=>{r.d(t,{$o:()=>eE.A,AX:()=>e_.A,Ay:()=>tl,BK:()=>e5.A,BZ:()=>Q.A,Bm:()=>W.A,Cp:()=>z.A,Do:()=>l.A,F1:()=>o.A,FE:()=>e0.A,FW:()=>eO.A,Fc:()=>eM.A,GD:()=>O.A,GO:()=>ef.A,Gr:()=>I.A,Gv:()=>ew.A,Hx:()=>es.A,Ir:()=>d.A,J4:()=>eY.A,JG:()=>g.A,JU:()=>q.A,Jl:()=>m.A,Kq:()=>ts.A,LM:()=>ec.A,Lt:()=>x.A,M6:()=>eQ.A,MA:()=>c.A,Mr:()=>eU.A,P6:()=>et.A,QR:()=>T.A,Qp:()=>a.A,RI:()=>i.A,TB:()=>e8.A,Ud:()=>V.A,VA:()=>ey.A,Vn:()=>eH.A,W1:()=>em.A,WE:()=>b.A,We:()=>e3.A,Wn:()=>S.A,X:()=>ti.A,X_:()=>D.A,ZH:()=>M.A,ZU:()=>e4.A,Ze:()=>eD.A,Zr:()=>K.A,_O:()=>e7.A,_V:()=>ee.A,a4:()=>eb.A,aJ:()=>h.A,ak:()=>Z.A,bE:()=>e6.A,bd:()=>e2.A,cC:()=>u.A,c_:()=>y.A,dJ:()=>B.A,de:()=>tn.A,dx:()=>H.A,e6:()=>eS.A,e9:()=>eN.A,eM:()=>eW.A,ek:()=>eV.A,es:()=>eA.A,f2:()=>G.A,f5:()=>P.A,gH:()=>eI.A,h1:()=>ep.A,iU:()=>j.A,jG:()=>eL.A,jj:()=>eg.A,jl:()=>w.A,jz:()=>eC.A,kU:()=>$.A,kV:()=>er.A,kr:()=>eo.A,kt:()=>eF.A,lM:()=>e9.A,lP:()=>ev.A,m0:()=>k.A,mN:()=>X.A,nU:()=>eu.A,qz:()=>J.A,rX:()=>_.A,s3:()=>en.A,sU:()=>eX.A,sv:()=>N.A,ue:()=>eT.A,vR:()=>eP.A,vW:()=>ej.A,vd:()=>F.A,vj:()=>eK.A,vv:()=>ea.A,wB:()=>eJ.A,wO:()=>eZ.A,ww:()=>Y.A,xq:()=>eh.A,xv:()=>eR.A,y8:()=>el.A,yQ:()=>f.A,yU:()=>e$.A,yd:()=>s.A,zP:()=>p.A,zW:()=>te.A});var n=r(73365),i=r(87821),s=r(21878),a=r(79376),l=r(61659),o=r(6504),c=r(19307),d=r(74739),u=r(29967),p=r(17836),h=r(67494),m=r(66687),f=r(95188),g=r(54453),y=r(34582),_=r(70453),b=r(10949),w=r(64570),k=r(31258),v=r(59907),A=r(13374),S=r(17406),T=r(46431),x=r(29260),C=r(88433),R=r(49553),P=r(20478),I=r(17568),$=r(87831),D=r(1916),L=r(29418),M=r(18272),O=r(10550),U=r(9271),E=r(14251),j=r(50068),N=r(98173),B=r(10194),F=r(70362),W=r(17909),q=r(59437),K=r(33109),H=r(48433),z=r(86877),J=r(34271),G=r(60919),V=r(35723),Z=r(41046),X=r(64629),Q=r(6534),Y=r(5370),ee=r(59711),et=r(39831),er=r(9560),en=r(44159),ei=r(41098),es=r(20021),ea=r(14797),el=r(15504),eo=r(93292),ec=r(92165),ed=r(94304),eu=r(40789),ep=r(64871),eh=r(31805),em=r(19621),ef=r(40081),eg=r(38781),ey=r(88768),e_=r(68395),eb=r(88793),ew=r(25406),ek=r(10998),ev=r(64446),eA=r(12925),eS=r(93354),eT=r(73243),ex=r(89317),eC=r(12283),eR=r(1578),eP=r(90612),eI=r(43959),e$=r(76621),eD=r(59833),eL=r(67236),eM=r(37266),eO=r(97038),eU=r(72147),eE=r(68859),ej=r(93285),eN=r(20178),eB=r(65062),eF=r(87030),eW=r(67519),eq=r(457),eK=r(58450),eH=r(48088),ez=r(56023),eJ=r(59311),eG=r(38177),eV=r(60659),eZ=r(1838),eX=r(34969),eQ=r(42685),eY=r(99707),e0=r(6830),e1=r(20248),e2=r(11384),e3=r(50211),e5=r(64342),e8=r(60151),e9=r(81610),e4=r(11990),e6=r(52715),e7=r(49387),te=r(894),tt=r(2031),tr=r(58573),tn=r(51328),ti=r(3382),ts=r(57717);let ta={AlertCircle:i.A,ArrowDown:s.A,ArrowRight:a.A,ArrowUp:l.A,ArrowUpRight:o.A,Ban:c.A,Bell:d.A,Bot:u.A,Bug:p.A,Check:h.A,CheckCircle2:m.A,ChevronDown:f.A,ChevronLeft:g.A,ChevronRight:y.A,ChevronUp:_.A,ChevronsDownUp:b.A,Circle:w.A,ClipboardPaste:k.A,Command:v.A,Compass:A.A,Columns2:S.A,Copy:T.A,CornerDownLeft:x.A,Crown:C.A,Delete:R.A,Download:P.A,ExternalLink:I.A,Eye:$.A,EyeOff:D.A,Facebook:L.A,File:M.A,FileCode:O.A,FileJson:U.A,FilePlus:E.A,FileText:j.A,Files:N.A,Filter:B.A,Folder:F.A,FolderOpen:W.A,FolderPlus:q.A,GitBranch:K.A,GitFork:H.A,Github:z.A,Globe:J.A,GripVertical:G.A,Hand:V.A,HardDrive:Z.A,HelpCircle:X.A,History:Q.A,Home:Y.A,Image:ee.A,ImageOff:et.A,KeyRound:er.A,Keyboard:en.A,Laptop:ei.A,LayoutDashboard:es.A,Link2:ea.A,ListChecks:el.A,Loader2:eo.A,Lock:ec.A,LogIn:ed.A,LogOut:eu.A,Maximize2:ep.A,Minimize2:eh.A,Menu:em.A,Mic:ef.A,MicOff:eg.A,Monitor:ey.A,Moon:e_.A,MoreHorizontal:eb.A,MoreVertical:ew.A,MousePointer2:ek.A,Package:ev.A,Palette:eA.A,PanelLeft:eS.A,PanelLeftClose:eT.A,PanelLeftOpen:ex.A,PanelRight:eC.A,Paperclip:eR.A,Pause:eP.A,Pencil:eI.A,Pin:e$.A,PinOff:eD.A,Play:eL.A,Plug:eM.A,Plus:eO.A,Power:eU.A,PowerOff:eE.A,QrCode:ej.A,RefreshCw:eN.A,Replace:eB.A,RotateCw:eF.A,Save:eW.A,Scissors:eq.A,Search:eK.A,Send:eH.A,SendHorizontal:ez.A,Settings:eJ.A,Share:eG.A,Shield:eV.A,Smartphone:eZ.A,Sparkles:eX.A,Square:eQ.A,SquarePen:eY.A,Star:e0.A,StickyNote:e1.A,Sun:e2.A,Target:e3.A,Terminal:e5.A,Trash2:e8.A,Triangle:e9.A,Type:e4.A,Undo2:e6.A,Upload:e7.A,Users:te.A,Volume2:tt.A,VolumeX:tr.A,Wallpaper:tn.A,X:ti.A,Zap:ts.A};function tl({name:e,size:t=20,className:r="",...i}){let s=ta[e];return s?(0,n.jsx)(s,{size:t,className:r,strokeWidth:2,...i}):(console.warn(`Icon "${e}" not found in the icon registry`),null)}},73426:(e,t,r)=>{r.d(t,{U:()=>h,x$:()=>p,zm:()=>m});var n=r(90076),i=r(20464),s=r(31735),a=r(97711),l=r(11155),o=r(98988),c=r(90084),d=r(86129);let u=0;async function p(e,{currentKey:t}={}){let r=++u,c=o.rh.getState(),d=t||c.hosts[c.currentKey]?.full||c.currentKey;d&&((0,s.d6)(d,window.location.pathname+window.location.search),o.rh.getState().setAutoConnect((0,l.Uo)(d),!0));let h=await fetch(n.Sn.connect,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:e})});if(!h.ok)throw Error("connect failed");let m=await h.json(),f=!1;for(let t=0;t<n.jP&&!f;t++)(f=await (0,i.zg)(m.tunnelUrl,e))||!(t<n.jP-1)||await new Promise(e=>setTimeout(e,n.dM));if(!f)throw Error("unreachable");r===u&&(0,a.vd)({apiKey:e,tunnelUrl:m.tunnelUrl,mode:"remote",localIp:m.localIp||null})}function h(e){try{e?sessionStorage.setItem(d.aS,"1"):sessionStorage.removeItem(d.aS)}catch{}}function m(e,{remember:t=!0,leavingHead:r=null,navigate:n=!0}={}){e?.tail&&e.tempKey&&(0,c.LG)(e.tempKey,{tail:e.tail}),h(t),r&&((0,s.d6)(r,window.location.pathname+window.location.search),o.rh.getState().setAutoConnect((0,l.Uo)(r),!0)),n&&(window.location.href="/workspace/")}},75687:(e,t,r)=>{r.d(t,{k:()=>n});function n(e){let t=String(e||"").trim(),r=e=>({tempKey:e.slice(0,6).toUpperCase(),tail:e.slice(6,8).toUpperCase()}),n=/#([A-NP-Z1-9]{6}-?[a-np-z1-9]{2})$/i.exec(t);if(n)return r(n[1].replace(/-/g,""));let i=/^([A-NP-Z1-9]{6}-?[a-np-z1-9]{2})$/i.exec(t);if(i)return r(i[1].replace(/-/g,""));let s=/[?&]k=([A-NP-Z1-9]{6})(?:[^A-NP-Z1-9]|$)/i.exec(t);return s?{tempKey:s[1].toUpperCase()}:/^[A-NP-Z1-9]{6}$/i.test(t)?{tempKey:t.toUpperCase()}:null}},79253:(e,t,r)=>{r.d(t,{$b:()=>b,A0:()=>z,AE:()=>g,Ax:()=>$,Dk:()=>P,GW:()=>q,Jl:()=>W,Kr:()=>H,L0:()=>X,L8:()=>y,LN:()=>j,Qw:()=>M,RV:()=>function e(t){let r;if(!t||"object"!=typeof t)return t;if(Array.isArray(t)){let r=!1,n=t.map(t=>{let n=e(t);return n!==t&&(r=!0),n});return r?n:t}for(let s of Object.keys(t)){let a=t[s];if(i.has(s)&&"string"==typeof a&&a.includes("\\"))(r||={...t})[s]=n(a);else if(a&&"object"==typeof a){let n=e(a);n!==a&&((r||={...t})[s]=n)}}return r||t},W5:()=>Q,YO:()=>k,ZH:()=>_,_C:()=>B,bd:()=>Z,cv:()=>F,d5:()=>K,fQ:()=>v,gh:()=>C,hh:()=>O,iB:()=>w,kS:()=>N,kb:()=>n,mv:()=>x,n2:()=>D,pA:()=>I,qu:()=>L,rL:()=>G,so:()=>A,u:()=>f,vd:()=>U,vs:()=>S,xW:()=>T,xl:()=>J,xr:()=>V,zT:()=>E});let n=e=>"string"==typeof e?e.replace(/\\/g,"/"):e,i=new Set(["path","currentPath","parentPath","dirPath","filePath","repoPath","oldPath","newPath","fullPath","relativePath"]),s=[".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".svg",".avif",".apng",".tif",".tiff",".heic",".heif"],a=[".mp4",".m4v",".webm",".ogv",".mov",".mkv",".avi",".3gp"],l=[".mp3",".wav",".ogg",".oga",".flac",".m4a",".aac",".opus"],o=[".pdf"],c=[".docx"],d=[".xlsx",".xls",".csv",".tsv"],u=[".html",".htm",".xhtml"],p=[".mmd",".mermaid"],h=[".md",".markdown",".mdx"];function m(e,t){if(!e)return!1;let r=e.toLowerCase();return t.some(e=>r.endsWith(e))}let f=e=>m(e,s),g=e=>m(e,a),y=e=>m(e,l),_=e=>m(e,o),b=e=>m(e,c),w=e=>m(e,d);function k(e){return e?m(e,u)?"html":m(e,h)?"markdown":m(e,p)?"mermaid":null:null}let v="9remote-preview",A={".js":"javascript",".jsx":"javascript",".ts":"javascript",".tsx":"javascript",".mjs":"javascript",".cjs":"javascript",".html":"html",".htm":"html",".xhtml":"html",".css":"css",".scss":"css",".sass":"css",".less":"css",".styl":"css",".json":"json",".json5":"json",".jsonc":"json",".md":"markdown",".markdown":"markdown",".mdx":"markdown",".py":"python",".pyw":"python",".rb":"ruby",".php":"php",".go":"go",".rs":"rust",".java":"java",".kt":"kotlin",".kts":"kotlin",".swift":"swift",".scala":"scala",".clj":"clojure",".cljs":"clojure",".ex":"elixir",".exs":"elixir",".erl":"erlang",".hs":"haskell",".ml":"ocaml",".mli":"ocaml",".jl":"julia",".pl":"perl",".pm":"perl",".tcl":"tcl",".lua":"lua",".r":"r",".dart":"dart",".groovy":"groovy",".gradle":"groovy",".c":"c",".h":"c",".cpp":"cpp",".cc":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".cs":"csharp",".m":"objectivec",".sh":"shell",".bash":"shell",".zsh":"shell",".fish":"shell",".ps1":"powershell",".bat":"batch",".cmd":"batch",".yml":"yaml",".yaml":"yaml",".toml":"toml",".ini":"ini",".cfg":"ini",".conf":"ini",".properties":"ini",".xml":"xml",".sql":"sql",".graphql":"graphql",".gql":"graphql",".proto":"protobuf",".vue":"vue",".svelte":"svelte",".csv":"csv",".tsv":"csv",".log":"log",".diff":"diff",".patch":"diff",".dockerfile":"dockerfile",".makefile":"makefile",".mk":"makefile",".env":"env",".gitignore":"gitignore"},S={M:"text-git-modified",A:"text-git-added",D:"text-git-deleted","?":"text-git-untracked",U:"text-git-modified"},T={normal:{indentBase:12,indentStep:12,icon:16,chevron:14,text:"text-[15px] sm:text-sm",padY:"py-1 sm:py-0.5"},compact:{indentBase:8,indentStep:8,icon:14,chevron:12,text:"text-[13px] sm:text-[12px]",padY:"py-0.5 sm:py-[1px]"}},x=e=>e?"folder-changed"===e?22:32:4,C=768,R="git-diff:",P=(e,t)=>`${R}${e}:${t}`,I=e=>"string"==typeof e&&e.startsWith(R),$=e=>{let t=e.slice(R.length),r=t.indexOf(":");return{status:t.slice(0,r),absPath:t.slice(r+1)}},D=(e,t,r)=>`${R}${e}:${t}\u0000${r}`,L=e=>{let{status:t,absPath:r}=$(e),n=r.indexOf("\0");return -1===n?{status:t,repoPath:null,filePath:r}:{status:t,repoPath:r.slice(0,n),filePath:r.slice(n+1)}},M=18,O=12,U=40,E=48,j=30,N=10,B=70,F=20,W={MAX_DIRS:40,DEBOUNCE_MS:300,PREVIEW_DEBOUNCE_MS:1e3,IDLE_UNWATCH_MS:6e4},q="fileExplorer:gitRefresh",K={sidebarWidth:"fileExplorer.sidebarWidth",sidebarVisible:"fileExplorer.sidebarVisible",bottomPanelVisible:"fileExplorer.bottomPanelVisible",bottomPanelHeight:"fileExplorer.bottomPanelHeight",activityPanel:"fileExplorer.activityPanel",recentFiles:"fileExplorer.recentFiles",openTabs:"fileExplorer.openTabs",editorFontSize:"fileExplorer.editorFontSize",wordWrap:"fileExplorer.wordWrap",expandedFolders:"fileExplorer.expandedFolders",showHidden:"fileExplorer.showHidden"},H={explorer:"explorer",search:"search",scm:"scm",settings:"settings"},z=14,J=4,G=9,V=10,Z=28,X=5,Q=4194304},79453:(e,t,r)=>{r.d(t,{g:()=>J});var n=r(86129);class i{static{this.id="base"}static{this.capabilities={control:!1,binary:!1,signaling:"none"}}static{this.priority={control:0,binary:0}}constructor(){this._listeners=new Map,this._state=n.Of.idle}get state(){return this._state}get ready(){return this._state===n.Of.open}supports(e){return!!this.constructor.capabilities[e]}getPriority(e){return this.constructor.priority[e]??0}on(e,t){this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(t)}off(e,t){this._listeners.get(e)?.delete(t)}_emit(e,...t){let r=this._listeners.get(e);if(r)for(let e of r)e(...t)}_setState(e){this._state!==e&&(this._state=e,this._emit("stateChange",e))}connect(e){throw Error("Not implemented: connect")}disconnect(){throw Error("Not implemented: disconnect")}send(e,t){throw Error("Not implemented: send")}}var s=r(48193),a=r(63977);let l={transports:["websocket"],reconnection:!1,reconnectionDelay:1e3,reconnectionDelayMax:5e3};class o{constructor({tunnelUrl:e,namespace:t="",socketOptions:r={}}){this._tunnelUrl=e,this._namespace=t,this._socketOptions=r}connect({onSocket:e,onFail:t}){let r=this._namespace?`${this._tunnelUrl}${this._namespace}`:this._tunnelUrl,n=this._tunnelUrl===window.location.origin?"local":"tunnel",i=(0,s.io)(r,{...l,...this._socketOptions,path:"/socket.io",auth:e=>{(0,a.freshAuth)(this._socketOptions.auth,n).then(e)}}),o=!1;i.once("connect",()=>{o||(o=!0,e(i,n))}),i.once("connect_error",()=>{o||(o=!0,t?.())})}}let c={transports:["websocket"],reconnection:!1};class d{constructor({tunnelUrl:e,localIp:t,namespace:r="",socketOptions:n={}}){this._tunnelUrl=e,this._localIp=t,this._namespace=r,this._socketOptions=n}connect({onSocket:e,onFail:t}){let r=!1,n=(t,n)=>{if(r){try{t.disconnect()}catch{}return}r=!0,e(t,n)},i=e=>this._namespace?`${e}${this._namespace}`:e,l=e=>({...c,...this._socketOptions,path:"/socket.io",auth:t=>{(0,a.freshAuth)(this._socketOptions.auth,e).then(t)}}),o=()=>{let e=this._tunnelUrl===window.location.origin?"local":"tunnel",a=(0,s.io)(i(this._tunnelUrl),l(e));a.once("connect",()=>n(a,e)),a.once("connect_error",()=>void(!r&&(r=!0,t?.())))};if(!this._localIp||"https:"===window.location.protocol)return void o();let d=(0,s.io)(i(`http://${this._localIp}`),l("local"));d.once("connect",()=>n(d,"local")),d.once("connect_error",()=>{r||(d.disconnect(),o())})}}var u=r(90076);let p=3;var h=r(52159),m=r(27520);let f=2e3,g=15,y=15,_=15,b=45;class w extends i{static{this.id="ws"}static{this.capabilities={control:!0,binary:!0,file:!0,signaling:"ws"}}static{this.priority={control:100,binary:10,file:10}}constructor(){super(),this._socket=null,this._connectionMode="local",this._retryTimer=null,this._retryAttempt=0,this._retryScheduled=!1,this._retryNowTimer=null,this._destroyed=!1,this._blocked=!1,this._updating=!1,this._connecting=!1,this._visibilityHandler=null,this._lastInboundAt=Date.now(),this._lastMsgAt=0,this._zombieWatchdogTimer=null,this._retrySeq=0}get lastInboundAt(){return this._lastInboundAt}get lastMsgAt(){return this._lastMsgAt}get socket(){return this._socket}get connectionMode(){return this._connectionMode}get blocked(){return this._blocked}setUpdating(e){this._updating=e,e&&(this._maxAttempts=b,this._retryAttempt=0,(0,h.c)("transport",`[ws] updating=true maxAttempts=${this._maxAttempts}`))}forceReconnect(){this._destroyed||this._forceReconnect()}retryNow(e="?"){if(this._blocked)return void(0,m.Lq)("switch",`ws retryNow SKIP by=${e} (blocked)`);let t=Date.now(),r=t-(this._lastRetryNowAt||0);if(r<3e3){this._retryNowTimer||(this._retryNowTimer=setTimeout(()=>{this._retryNowTimer=null,this.retryNow(`${e}-deferred`)},3e3-r)),(0,h.c)("transport","[ws] retryNow throttled → deferred"),(0,m.Lq)("switch",`ws retryNow DEFER by=${e} (${3e3-r}ms left)`);return}(0,m.Lq)("switch",`ws retryNow GO by=${e} (drops attempt ${this._retryAttempt})`),this._retrySeq++,this._lastRetryNowAt=t,clearTimeout(this._retryNowTimer),this._retryNowTimer=null,clearTimeout(this._retryTimer),clearTimeout(this._connectingTimer),this._retryTimer=null,this._retryScheduled=!1,this._retryAttempt=0,this._connecting=!1,this._destroyed=!0,this._detachSocketEvents(),this._socket?.disconnect(),this._socket=null,this._destroyed=!1,this._ctx?.onRetryStatus?.({isRetrying:!0,attempt:1,maxAttempts:this._maxAttempts,failed:!1}),this._setState(n.Of.connecting),this._connectInternal()}setBlocked(e){this._blocked=e,(0,h.c)("transport",`[ws] blocked=${e}`),e?(this._cancelRetry(),this._socket?.disconnect()):this._socket?.connected||this._destroyed||this._connectInternal()}connect(e){this._ctx=e,this._auth=e.auth,this._maxAttempts=this._auth.tempKey?g:y,this._reconnectMaxAttempts=_,this._destroyed=!1,this._attachNetworkListeners(),this._setState(n.Of.connecting),this._connectInternal()}disconnect(){this._destroyed=!0,this._retrySeq++,this._cancelRetry(),clearTimeout(this._zombieWatchdogTimer),this._removeNetworkListeners(),this._detachSocketEvents(),this._socket?.disconnect(),this._socket=null,this._setState(n.Of.closed)}send(e,t){if(!this._socket?.connected)return!1;if(e===n.l_.control){let{event:e,args:r=[],cb:n}=t;return n?this._socket.emit(e,...r,n):this._socket.emit(e,...r),!0}return e===n.l_.binary?(this._socket.emit("tiles-bin-v2",t),!0):e===n.l_.file&&(this._socket.emit("file-bin",t),!0)}_connectInternal(){if(this._connecting||this._socket?.connected||this._destroyed)return;if(!this._auth.tunnelUrl&&!this._auth.localIp){(0,h.c)("transport","[ws] connect HOLD (no tunnelUrl/localIp yet) → retry"),(0,m.Lq)("switch","ws connect HOLD (no url yet) → fetch on retry"),this._setState(n.Of.degraded),this._scheduleRetry();return}this._connecting=!0,clearTimeout(this._connectingTimer),this._connectingTimer=setTimeout(()=>{this._connecting=!1},f);let e={tunnelUrl:this._auth.tunnelUrl,namespace:this._auth.namespace||"",socketOptions:this._auth.socketOptions||{}};(0,h.c)("transport",`[ws] connect: tunnelUrl=${this._auth.tunnelUrl} localIp=${this._auth.localIp||"none"}`),new o(e).connect({onSocket:(e,t)=>{if(this._connecting=!1,clearTimeout(this._connectingTimer),this._socket?.connected&&this._socket!==e){try{e.disconnect()}catch{}return}this._connectionMode=t,this._socket=e,this._retryAttempt=0,this._updating=!1,this._maxAttempts=this._reconnectMaxAttempts,this._cancelRetry(),this._attachSocketEvents(e),(0,h.c)("transport",`[ws] connect mode=${t}`),(0,m.Lq)("switch",`ws open mode=${t}`),this._setState(n.Of.open)},onFail:()=>{this._connecting=!1,clearTimeout(this._connectingTimer),(0,h.c)("transport","[ws] connect FAIL → schedule retry"),this._scheduleRetry()}})}_attachSocketEvents(e){e.on("disconnect",e=>{(0,h.c)("transport",`[ws] disconnect reason=${e}`),(0,m.Lq)("switch",`ws disconnect reason=${e}`),this._setState(n.Of.degraded),this._destroyed||this._forceReconnect()}),e.on("connect_error",e=>{(0,h.c)("transport",`[ws] connect_error ${e?.message||e}`),this._setState(n.Of.degraded),this._forceReconnect()});let t=()=>{clearTimeout(this._zombieWatchdogTimer),this._zombieWatchdogTimer=setTimeout(()=>{if(!this._destroyed&&this._socket===e){if(Date.now()-this._lastInboundAt<n.Rh)return void t();(0,m.Lq)("switch","ws zombie watchdog → force reconnect"),this.forceReconnect()}},n.Rh)};t(),e.io?.on?.("ping",()=>{this._lastInboundAt=Date.now(),t()}),e.on("connect",()=>{this._lastInboundAt=Date.now(),t()}),e.onAny((e,t)=>{this._lastMsgAt=Date.now(),this._emit("message",{event:e,data:t,source:"ws"})})}_attachNetworkListeners(){this._visibilityHandler||(this._visibilityHandler=()=>{"visible"!==document.visibilityState||this._socket?.connected||this._connecting||this.retryNow("visible")},this._offlineHandler=()=>{(0,m.Lq)("switch","ws offline event → drop socket, degraded"),this._socket?.disconnect(),this._socket=null,this._setState(n.Of.degraded)},this._onlineHandler=()=>{this._socket?.connected||this._connecting?(0,m.Lq)("switch",`ws online event → skip (${this._connecting?"handshaking":"already up"})`):this.retryNow("online")},this._pagehideHandler=()=>{try{this._socket?.disconnect()}catch{}},window.addEventListener("pagehide",this._pagehideHandler),document.addEventListener("visibilitychange",this._visibilityHandler),window.addEventListener("offline",this._offlineHandler),window.addEventListener("online",this._onlineHandler))}_detachSocketEvents(){if(this._socket)try{this._socket.offAny()}catch{}}_removeNetworkListeners(){this._pagehideHandler&&(window.removeEventListener("pagehide",this._pagehideHandler),this._pagehideHandler=null),this._visibilityHandler&&(document.removeEventListener("visibilitychange",this._visibilityHandler),this._visibilityHandler=null),this._offlineHandler&&(window.removeEventListener("offline",this._offlineHandler),this._offlineHandler=null),this._onlineHandler&&(window.removeEventListener("online",this._onlineHandler),this._onlineHandler=null)}_forceReconnect(){if(!this._destroyed&&!this._blocked&&!this._retryScheduled&&!this._connecting){if(this._retrySeq++,this._retryAttempt++,this._retryAttempt>p){this._retryAttempt=0,this._scheduleRetry();return}this._socket?.disconnect(),this._socket=null,this._connectInternal()}}_scheduleRetry(){this._retryScheduled||this._destroyed||this._blocked||(this._retryScheduled=!0,this._retryTimer=setTimeout(()=>this._doRetry(),f))}async _doRetry(){if(this._destroyed)return;if("u">typeof document&&"hidden"===document.visibilityState){(0,m.Lq)("switch",`ws retry HOLD (hidden, still at ${this._retryAttempt}/${this._maxAttempts})`),this._retryScheduled=!1,this._scheduleRetry();return}this._retryAttempt++;let e=this._retryAttempt,t=this._retrySeq;if(e>this._maxAttempts){this._retryScheduled=!1,(0,m.Lq)("switch",`ws GAVE UP after ${this._maxAttempts} attempts → closed`),this._ctx?.onRetryStatus?.({isRetrying:!1,attempt:e,maxAttempts:this._maxAttempts,failed:!0}),this._setState(n.Of.closed);return}(0,h.c)("transport",`[ws] retry attempt=${e}/${this._maxAttempts}`),(0,m.Lq)("switch",`ws retry ${e}/${this._maxAttempts}`),this._ctx?.onRetryStatus?.({isRetrying:!0,attempt:e,maxAttempts:this._maxAttempts,failed:!1});try{let e=await fetch(u.Sn.connect,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:this._auth.apiKey})});if(!e.ok)throw Error("Failed");let{tunnelUrl:r,localIp:n}=await e.json();if(t!==this._retrySeq)return void(0,m.Lq)("switch","ws retry ABORT (superseded mid-fetch)");this._auth.tunnelUrl=r,this._auth.localIp=n||null,this._connectionMode="local",this._ctx?.onUrlUpdate?.({tunnelUrl:r,localIp:n}),this._socket?.disconnect(),this._retryScheduled=!1,this._connectInternal()}catch{if(t!==this._retrySeq)return;this._retryScheduled=!1,this._scheduleRetry()}}_cancelRetry(){clearTimeout(this._retryTimer),this._retryTimer=null,clearTimeout(this._retryNowTimer),this._retryNowTimer=null,this._retrySeq++,this._retryAttempt=0,this._retryScheduled=!1,this._ctx?.onRetryStatus?.({isRetrying:!1,attempt:0,maxAttempts:this._maxAttempts,failed:!1})}}function k(e,t){if(t instanceof Uint8Array){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return{__b:btoa(e)}}return t}function v(e,t){if(t&&"object"==typeof t&&"string"==typeof t.__b){let e=atob(t.__b),r=new Uint8Array(e.length);for(let t=0;t<e.length;t++)r[t]=e.charCodeAt(t);return r}return t}function A(e){return JSON.stringify(e,k)}function S(e,t=null){let r=[],n={event:e.event,args:function e(t,r){if(t instanceof ArrayBuffer)return r.push(new Uint8Array(t)),{__B:r.length-1};if(ArrayBuffer.isView(t))return r.push(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),{__B:r.length-1};if(Array.isArray(t))return t.map(t=>e(t,r));if(t&&"object"==typeof t){let n={};for(let i of Object.keys(t))n[i]=e(t[i],r);return n}return t}(e.args||[],r),ackId:e.ackId??null,lens:r.map(e=>e.length)};t&&(n.frag=t.id,n.part=t.part,n.parts=t.parts);let i=new TextEncoder().encode(JSON.stringify(n)),s=new Uint8Array(4+i.length+r.reduce((e,t)=>e+t.length,0));new DataView(s.buffer).setUint32(0,i.length,!0),s.set(i,4);let a=4+i.length;for(let e of r)s.set(e,a),a+=e.length;return s}function T(e){let t=e instanceof Uint8Array?e:new Uint8Array(e);if(t.length<4)throw Error("frame too short");let r=4+new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(0,!0);if(r>t.length)throw Error("frame header truncated");let n=JSON.parse(new TextDecoder().decode(t.subarray(4,r))),i=[],s=r;for(let e of n.lens||[]){if(s+e>t.length)throw Error("frame part truncated");i.push(t.subarray(s,s+e)),s+=e}return{event:n.event,args:function e(t,r){if(Array.isArray(t))return t.map(t=>e(t,r));if(t&&"object"==typeof t){if("number"==typeof t.__B)return r[t.__B]??null;let n={};for(let i of Object.keys(t))n[i]=e(t[i],r);return n}return t}(n.args||[],i),ackId:n.ackId??null,frag:n.frag,part:n.part,parts:n.parts}}function x(){let e=new Map;return{push(t){let{frag:r,part:n,parts:i}=t;if(null==r)return t;if(!Number.isInteger(n)||!Number.isInteger(i)||n<0||i<1||n>=i||i>4096)return null;let s=e.get(r);s||(e.size>=4&&e.delete(e.keys().next().value),s={slices:Array(i),got:0},e.set(r,s));let a=t.args?.[0];if(null==a||(!s.slices[n]&&(s.slices[n]=a,s.got++),s.got<i))return null;e.delete(r);let l=new Uint8Array(s.slices.reduce((e,t)=>e+t.byteLength,0)),o=0;for(let e of s.slices)l.set(e,o),o+=e.byteLength;return T(l)}}}var C=r(90084),R=r(7938);let P=null,I=0,$=new Map,D=0;async function L(e,t){let r=`9remote_turn_cache_${t?.slice(0,12)||"anon"}`;try{let e="u">typeof localStorage?localStorage.getItem(r):null;if(e){let t=JSON.parse(e);if(t?.expiresAt>Date.now()&&Array.isArray(t.iceServers)&&t.iceServers.length)return t.iceServers}}catch{}try{let n=await fetch(e,{headers:{"X-API-Key":t},signal:AbortSignal.timeout(4e3)});if(n.ok){let e=await n.json();if(e?.iceServers?.length){try{"u">typeof localStorage&&localStorage.setItem(r,JSON.stringify({iceServers:e.iceServers,expiresAt:Date.now()+828e5}))}catch{}return e.iceServers}}}catch(e){console.warn("[WebRtcProtocol] TURN fetch failed:",e.message)}return null}class M extends i{static{this.id="rtc"}static{this.capabilities={control:!0,binary:!0,file:!0,signaling:"external"}}static{this.priority={control:50,binary:100,file:100}}constructor(){super(),this._pc=null,this._dcControl=null,this._dcBinary=null,this._dcFile=null,this._dcMobile=null,this._typeDetail="dc-stun",this._localCandidateTypes=new Set,this._answerApplied=!1,this._pendingCandidates=[],this._iceReachedChecking=!1,this._everOpened=!1,this._isLoopback=!1,this._pendingEmit=null,this._flushTimer=null,this._latestTileTs=new Map,this._hbTimer=null,this._hbLastPing=0,this._peerEnv2=!1,this._peerFragCtl=!1,this._v2Announced=!1,this._v2RxSeen=!1,this._fragSeq=0,this._reassemble=x(),this._lastInboundAt=0,this._signalingHandlers={},this._signaling=null,this._useTurn=!1}get lastInboundAt(){return this._lastInboundAt}getPriority(e){return"dc-turn"===this._typeDetail?5:150}async connect(e){this._ctx=e,this._cleanupPeer(),this._peerEpoch=(this._peerEpoch??0)+1,this._localCandidateTypes=new Set,this._answerApplied=!1,this._pendingCandidates=[],this._iceReachedChecking=!1,this._everOpened=!1,this._isLoopback=!1,this._typeDetail="dc-stun",this._lastMid=null,this._remoteGatheringDone=!1,this._setState(n.Of.connecting),this.connectingSince=Date.now(),this.connectDeadline=this.connectingSince+n.AC,clearTimeout(this._connectTimer),this._connectTimer=setTimeout(()=>{this._state!==n.Of.open&&((0,h.c)("transport",`[rtc] connect timeout (${n.AC}ms, state=${this._state}) → close + retry`),this._closePeer(`connect-timeout (state=${this._state})`))},n.AC);let t=[{urls:["stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302","stun:stun3.l.google.com:19302","stun:stun4.l.google.com:19302"]},{urls:"stun:global.stun.twilio.com:3478"},{urls:"stun:stun.cloudflare.com:3478"}];if(this._useTurn=!!(e.useTurn||e.profile?.rtc?.enableTurn),e.iceServers?.length)t=e.iceServers;else if(this._useTurn){let r=await L(u.Sn.turnCredentials,e.auth?.apiKey);r?.length&&(t=r)}let r=new RTCPeerConnection({iceServers:t,iceCandidatePoolSize:4,bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"});this._pc=r;let i=e.profile?.rtc?.dcControl?.ordered??!0,s=r.createDataChannel("control",{ordered:i}),a=r.createDataChannel("binary",{ordered:!1,maxPacketLifeTime:500}),l=r.createDataChannel("file",{ordered:!0}),o=r.createDataChannel("mobile",{ordered:!0});a.binaryType="arraybuffer",s.binaryType="arraybuffer",l.binaryType="arraybuffer",o.binaryType="arraybuffer",this._dcControl=s,this._dcBinary=a,this._dcFile=l,this._dcMobile=o;let c=async()=>{if("open"!==s.readyState||"open"!==a.readyState)return;let e="";try{let t=await r.getStats();t.forEach(r=>{if("candidate-pair"===r.type&&"succeeded"===r.state){let n=[...t.values()].find(e=>e.id===r.localCandidateId),i=[...t.values()].find(e=>e.id===r.remoteCandidateId);(n?.candidateType==="relay"||i?.candidateType==="relay")&&(this._typeDetail="dc-turn");let s=n?.address||n?.ip||"",a=i?.address||i?.ip||"";("127.0.0.1"===s||"::1"===s||"127.0.0.1"===a||"::1"===a)&&(this._isLoopback=!0),e=`local=${n?.candidateType}/${n?.protocol} remote=${i?.candidateType}/${i?.protocol}`}})}catch{}this.send(n.l_.control,{event:"rtc:linkType",args:[this._typeDetail]}),(0,h.c)("transport",`[rtc] dc OPEN type=${this._typeDetail} ${e}`),(0,m.Lq)("switch",`rtc dc OPEN (${this._typeDetail} ${e})`),clearTimeout(this._connectTimer),this._connectTimer=null,this._everOpened=!0,this._lastInboundAt=Date.now(),this._setState(n.Of.open)};s.onopen=c,a.onopen=c;let d=()=>{let e=!this._dcControl||"closed"===this._dcControl.readyState,t=!this._dcBinary||"closed"===this._dcBinary.readyState;(0,m.Lq)("switch",`rtc dc-close (ctrl=${this._dcControl?.readyState} bin=${this._dcBinary?.readyState})`),e&&t?this._setState(n.Of.closed):this._setState(n.Of.degraded)};s.onclose=d,a.onclose=d,l.onclose=()=>{this._dcFile=null},o.onclose=()=>{this._dcMobile=null},s.onerror=e=>{let t=e.error?.message??"unknown";t.includes("User-Initiated")||console.error("[rtc] dcControl ERROR:",t)},a.onerror=e=>{let t=e.error?.message??"unknown";t.includes("User-Initiated")||console.error("[rtc] dcBinary ERROR:",t)},l.onerror=e=>{let t=e.error?.message??"unknown";t.includes("User-Initiated")||console.error("[rtc] dcFile ERROR:",t)},s.onmessage=({data:e})=>{let t;this._lastInboundAt=Date.now();try{let r;if("string"==typeof e)r=JSON.parse("string"==typeof e?e:new TextDecoder().decode(e),v);else r=T(e),this._v2RxSeen||(this._v2RxSeen=!0,(0,m.Lq)("switch","env2: first v2 binary frame DECODED from agent (mutual upgrade confirmed)"));t=this._reassemble.push(r)}catch(e){console.error("[rtc] control parse error:",e.message);return}if(t){if("__ping"===t.event){this._hbTimer||this._startHeartbeatWatch(),this._hbLastPing=Date.now();try{s.send(A({event:"__pong",args:t.args||[]}))}catch{}return}this._emit("message",{event:t.event,data:t,source:"rtc"})}},a.onmessage=({data:e})=>{this._lastInboundAt=Date.now(),e instanceof ArrayBuffer&&this._receiveTile(e)},l.onmessage=({data:e})=>{this._lastInboundAt=Date.now(),e instanceof ArrayBuffer&&this._emit("binary",{channel:"file",buffer:e,source:"rtc"})},o.onmessage=({data:e})=>{this._lastInboundAt=Date.now(),e instanceof ArrayBuffer&&this._emit("binary",{channel:"mobile",buffer:e,source:"rtc"})},r.onicecandidate=({candidate:e})=>{var t;if(!e)return void this._sendSignaling({type:"ice",candidate:"",mid:this._lastMid||"0"});this._lastMid=e.sdpMid;let r=/typ (host|srflx|relay|prflx)/.exec(e.candidate||"");r&&this._localCandidateTypes.add(r[1]);let n=(t=e.candidate)&&t.includes("typ srflx")&&t.split(" ")[4]||null;n&&this._emit("netFingerprint",n),this._sendSignaling({type:"ice",candidate:e.candidate,mid:e.sdpMid})},r.oniceconnectionstatechange=()=>{(0,h.c)("transport",`[rtc] iceState=${r.iceConnectionState}`),(0,m.Lq)("switch",`rtc ice=${r.iceConnectionState} types=[${[...this._localCandidateTypes].join(",")}]`),"checking"===r.iceConnectionState&&(this._iceReachedChecking=!0),"disconnected"===r.iceConnectionState?this._setState(n.Of.degraded):"failed"===r.iceConnectionState?this._closePeer("ice-failed"):"connected"===r.iceConnectionState&&this._dcControl?.readyState==="open"&&this._dcBinary?.readyState==="open"&&this._setState(n.Of.open)},this._signaling=e.signaling,this._signaling?.on?.(e=>this._handleSignal(e));try{let e=await r.createOffer();await r.setLocalDescription(e),(0,h.c)("transport","[rtc] offer sent"),(0,m.Lq)("switch","rtc offer sent"),this._sendSignaling({type:"offer",sdp:e.sdp,useTurn:this._useTurn})}catch(e){console.error("[rtc] createOffer error:",e.message),this._closePeer(`create-offer:${e.message}`)}}disconnect(e="?"){this._closePeer(`manual-disconnect by=${e} state=${this._state}`),this._signaling?.off?.(),this._signaling=null}send(e,t){if(e===n.l_.control){if(this._dcControl?.readyState!=="open")return!1;let e={event:t.event,args:t.args||[],ackId:t.ackId||null};if(this._peerEnv2)return!!this._sendFramed(e)&&(this._v2Announced||(this._v2Announced=!0,(0,m.Lq)("switch","env2: client→agent control now SENT as v2 binary frames")),!0);try{return this._dcControl.send(A(e)),!0}catch(e){return!1}}if(e===n.l_.binary){if(this._dcBinary?.readyState!=="open")return!1;try{return this._dcBinary.send(t),!0}catch(e){return console.error("[rtc] send binary error:",e.message),!1}}if(e===n.l_.file){if(this._dcFile?.readyState!=="open")return!1;try{if(this._dcFile.bufferedAmount>n.HE.dcBufferThreshold)return!1;return this._dcFile.send(t),!0}catch(e){console.error("[rtc] send file error:",e.message)}}return!1}get typeDetail(){return this._typeDetail}get isLoopback(){return this._isLoopback}_closePeer(e){(0,m.Lq)("switch",`rtc→closed reason=${e}`),this._cleanupPeer(),this._setState(n.Of.closed)}setPeerCaps(e){this._peerEnv2=!!e?.env2,this._peerFragCtl=!!e?.fragCtl}get maxControlBytes(){return this._pc?.sctp?.maxMessageSize||n.dT}_sendFramed(e){var t;let r,n,i=this._peerFragCtl?this.maxControlBytes:1/0,s=(t=++this._fragSeq,(n=function(e,t){if(e.byteLength<=t)return[e];let r=t-192;if(r<=0)return null;let n=Math.ceil(e.byteLength/r);if(n>4096)return null;let i=[];for(let t=0;t<n;t++)i.push(e.subarray(t*r,Math.min((t+1)*r,e.byteLength)));return i}(r=S(e),i))?1===n.length?[r]:n.map((r,i)=>S({event:e.event,args:[r]},{id:t,part:i,parts:n.length})):null);if(!s)return!1;try{for(let e of s)this._dcControl.send(e);return!0}catch(e){return(0,h.c)("transport",`[rtc] control send refused: ${e.message}`),!1}}_startHeartbeatWatch(){this._hbTimer&&(clearInterval(this._hbTimer),this._hbTimer=null),this._hbLastPing=Date.now(),this._hbTimer=setInterval(()=>{if(this._state!==n.Of.open){clearInterval(this._hbTimer),this._hbTimer=null;return}let e=Date.now()-this._hbLastPing;e>n.An&&((0,h.c)("transport",`[rtc] heartbeat: no ping for ${e}ms → closing stalled peer`),this._closePeer(`heartbeat-stale (${e}ms)`))},n.KF)}async _addRemoteCandidate({candidate:e,mid:t}){e||(this._remoteGatheringDone=!0),await this._pc.addIceCandidate(new RTCIceCandidate(e?{candidate:e,sdpMid:t}:{candidate:"",sdpMid:t||"0"})).catch(()=>{})}_startDeadPathWatch(){clearInterval(this._deadPathTimer),this._deadPathTimer=setInterval(async()=>{if(this._state===n.Of.open||!this._pc)return this._stopDeadPathWatch();if(!this._remoteGatheringDone||"complete"!==this._pc.iceGatheringState)return;let e=0,t=0;try{(await this._pc.getStats()).forEach(r=>{"candidate-pair"===r.type&&(e++,"failed"===r.state&&t++)})}catch{return}e&&!(t<e)&&(this._stopDeadPathWatch(),this._closePeer(`dead-path (${t} pair(s) failed)`))},n.QS)}_stopDeadPathWatch(){clearInterval(this._deadPathTimer),this._deadPathTimer=null}_sendSignaling(e){this._signaling?.send?.(e)}async _handleSignal(e){if((0,h.c)("transport",`[rtc] signal: ${e.type}`),(0,m.Lq)("switch",`rtc signal recv=${e.type}`),this._pc)try{if("answer"===e.type){if(this._answerApplied||"stable"===this._pc.signalingState){(0,h.c)("transport","[rtc] duplicate answer ignored"),(0,m.Lq)("switch","rtc duplicate answer ignored");return}if(e.pub&&e.sig){let t=await this._verifyHostAnswer(e);if(t){console.error(`[rtc] host key verification FAILED (${t}) — relayed answer rejected`),this._closePeer(`host-key-rejected:${t}`);return}}await this._pc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e.sdp})),this._answerApplied=!0,(0,h.c)("transport","[rtc] answer set"),(0,m.Lq)("switch","rtc answer applied");let t=this._pendingCandidates;for(let e of(this._pendingCandidates=[],t))await this._addRemoteCandidate(e);clearTimeout(this._connectTimer),this.connectDeadline=Date.now()+n.HJ,this._startDeadPathWatch(),this._connectTimer=setTimeout(async()=>{if(this._state!==n.Of.open){try{let e=await this._pc.getStats();e.forEach(t=>{if("candidate-pair"!==t.type)return;let r=e.get(t.localCandidateId),n=e.get(t.remoteCandidateId),i=(r?.address||r?.ip||"?").split(":")[0].slice(-12),s=n?.address||n?.ip||"?";(0,m.Lq)("switch",`pair ${t.state} ${r?.candidateType}:${i}→${n?.candidateType}:${s}`)})}catch{}this._closePeer(`ice-timeout (state=${this._state})`)}},n.HJ)}else if("ice"===e.type){if(!this._answerApplied)return void this._pendingCandidates.push(e);await this._addRemoteCandidate(e)}else"error"===e.type&&((0,h.c)("transport",`[rtc] server error: ${e.message}`),this._closePeer(`server-error:${e.message}`))}catch(e){console.error("[rtc] signal handle error:",e.message)}}async _verifyHostAnswer(e){let t=this._ctx?.auth?.apiKey;if(!t)return null;let r=(0,C.lz)(t),n=r?.hostPubKey?r:null,i=!!r?.hostSealKey;if((0,h.c)("auth","[seal] verify answer:",{hostSentXpub:!!e.xpub,agentSentXpub:!!e.xpub,pinned:!!n,stalePin:!!(r?.hostPubKey&&!i),pendingFp2:(0,C.e1)()}),n){if(n.hostPubKey!==e.pub){let r=(0,C.e1)();return r&&await (0,C.t8)(e.pub,e.xpub)===r?((0,C.LG)(t,{hostPubKey:e.pub,hostSealKey:e.xpub,fp2:r}),(0,h.c)("transport","[rtc] host key re-pinned via fresh pairing fp2"),null):((0,h.c)("auth","[seal] REJECT answer — pinned pub differs (host key rotated?) and no fresh fp2 to re-pin"),"pinned-pub-mismatch")}let r=await (0,C.D5)(e.pub,e.sdp,e.sig);if(!1===r)return(0,h.c)("auth","[seal] REJECT answer — signature invalid (relay tampering?)"),"sig-invalid";if(null===r){if(!i)return(0,h.c)("auth","[seal] REJECT answer — no Ed25519 in browser and pinned fp2 predates sealing"),"no-ed25519-old-pin";let t=await (0,C.t8)(e.pub,e.xpub)===n.fp2;return t||(0,h.c)("auth","[seal] REJECT answer — fp2 fallback mismatch vs pinned",n.fp2),t?null:"fp2-mismatch"}return null}let s=(0,C.e1)();if(s){let r=await (0,C.t8)(e.pub,e.xpub);if(r!==s)return(0,h.c)("auth","[seal] REJECTED — fp2",r,"!= code",s,e.xpub?"":"(agent sent no sealing key — needs the source build)"),(0,C.HY)(),"pairing-fp2-mismatch";(0,C.LG)(t,{hostPubKey:e.pub,hostSealKey:e.xpub,fp2:r}),(0,h.c)("auth","[seal] pinned via RTC — fp2",r,"sealing key stored"),(0,h.c)("transport","[rtc] host key pinned via pairing fp2")}return null}natVerdict(){let e=this._localCandidateTypes;return this._everOpened||e.has("relay")?"ok":0===e.size||e.has("srflx")&&(!this._answerApplied||this._iceReachedChecking)?"unknown":"hard"}_cleanupPeer(){for(let e of(clearTimeout(this._connectTimer),this._connectTimer=null,this._stopDeadPathWatch(),this._hbTimer&&(clearInterval(this._hbTimer),this._hbTimer=null),[this._dcControl,this._dcBinary,this._dcFile,this._dcMobile]))if(e){e.onopen=null,e.onclose=null,e.onerror=null,e.onmessage=null;try{e.close()}catch{}}if(this._dcControl=null,this._dcBinary=null,this._dcFile=null,this._dcMobile=null,this._isLoopback=!1,this._typeDetail="dc-stun",this._pc){this._pc.onicecandidate=null,this._pc.oniceconnectionstatechange=null;try{this._pc.close()}catch{}this._pc=null}this._pendingEmit=null,this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=null),this._latestTileTs.clear(),this._reassemble=x()}_receiveTile(e){let t=++I,n=e.byteLength;new Promise(n=>{let i=setTimeout(()=>{$.has(t)&&($.delete(t),n(null))},8e3),s=R.eR.decodeQueueCap;for(;$.size>=s;){let e=$.keys().next().value,t=$.get(e);if(!t)break;clearTimeout(t.timer),$.delete(e),t.resolve(null)}let a=function(){if(!1===P)return null;if(P)return P;try{P=new Worker(r.tu(new URL(r.p+r.u(3692),r.b)))}catch{return P=!1,null}return P.onmessage=({data:{tiles:e,timestamp:t,id:r,hasBitmap:n,error:i}})=>{D=0;let s=$.get(r);if(!s){if(e)for(let t of e)t.bitmap?.close?.();return}clearTimeout(s.timer),$.delete(r),s.resolve(i?null:{tiles:e,timestamp:t,hasBitmap:n})},P.onerror=e=>{console.error("[Worker] tileDecoder:",e.message),function(){if(P)try{P.terminate()}catch{}for(let{resolve:e}of(P=null,$.values()))try{e(null)}catch{}$.clear()}(),++D>=3&&(P=!1)},P}();if(!a){clearTimeout(i),$.delete(t),n(null);return}$.set(t,{resolve:n,timer:i}),a.postMessage({buffer:e,id:t,v:2},[e])}).then(e=>{if(!e)return;let{tiles:t,timestamp:r,hasBitmap:i}=e;for(let e of(this._pendingEmit||(this._pendingEmit={tiles:new Map,timestamp:r,hasBitmap:i,bytes:0}),this._pendingEmit.bytes+=n,t))r>=(this._latestTileTs.get(e.tileIndex)??0)?(this._latestTileTs.set(e.tileIndex,r),this._pendingEmit.tiles.get(e.tileIndex)?.bitmap?.close?.(),this._pendingEmit.tiles.set(e.tileIndex,e),r>this._pendingEmit.timestamp&&(this._pendingEmit.timestamp=r)):e.bitmap?.close?.();this._flushTimer&&clearTimeout(this._flushTimer),this._flushTimer=setTimeout(()=>{if(this._flushTimer=null,!this._pendingEmit)return;let{tiles:e,timestamp:t,hasBitmap:r,bytes:n}=this._pendingEmit;this._pendingEmit=null;let i=[...e.values()];i.length&&this._emit("message",{event:"tiles-data",data:{tiles:i,timestamp:t,hasBitmap:r,bytes:n,transport:this._typeDetail},source:"rtc"})},0)})}}let O=new Map;function U(e){if(!e?.id)throw Error("Adapter missing static id");O.set(e.id,e)}function E({urls:e,timeoutMs:t,PeerConnection:r}={}){let i=r||("u">typeof RTCPeerConnection?RTCPeerConnection:null);if(!i)return Promise.resolve(null);let s=[{urls:e||n.cx.urls}];return new Promise(e=>{let r,a,l=!1,o=t=>{if(!l){l=!0,clearTimeout(a);try{r.onicecandidate=null,r.close()}catch{}e(t)}};try{r=new i({iceServers:s,iceCandidatePoolSize:0})}catch{return e(null)}a=setTimeout(()=>o(null),t??n.cx.timeoutMs),r.onicecandidate=({candidate:e})=>{var t;if(!e)return o(null);let r=(t=e.candidate)&&t.includes("typ srflx")&&t.split(" ")[4]||null;r&&o(r)};try{r.createDataChannel("probe"),r.createOffer().then(e=>r.setLocalDescription(e)).catch(()=>o(null))}catch{o(null)}})}let j="no-public-ip";function N(e){let t=0,r=!1;for(let n of e.values())"candidate-pair"===n.type&&(n.nominated||n.selected)&&(r=!0,t+=(n.bytesReceived??0)+(n.responsesReceived??0));return r?t:null}function B(e,t="stale"){let r=e._adapters.get("ws"),i=Math.max(r?.lastInboundAt??0,r?.lastMsgAt??0),s=r?.ready&&function({ready:e=!0,lastInboundAt:t=0,now:r}={}){return!!e&&(!t||r-t>=n.Rh)}({ready:!0,lastInboundAt:i,now:Date.now()});if(r){let e=r.lastInboundAt??0,n=r.lastMsgAt??0,i=Date.now();(0,m.Lq)("switch",`zombie check (${t}): verdict=${!!s} ready=${!!r.ready} lastPong=${e?`${i-e}ms`:"never"} lastMsg=${n?`${i-n}ms`:"never"}`)}if(!s)return!1;(0,h.c)("transport",`[pm] ws zombie (${t}) → force reconnect`);try{r.forceReconnect?.()}catch{}return!0}function F(e,t){let r=e._adapters.get("rtc"),i=r?._pc;if(!i||"failed"===i.connectionState)return void e._forceRestartRtc(`${t}-pc-failed`);if(e._probeLive?.rtc===r)return void(0,m.Lq)("switch",`${t} probe shared (already measuring this peer)`);clearTimeout(e._resumeProbeTimer);let s=++e._probeToken;e._probeLive={rtc:r,token:s},(async()=>{let t=N(await i.getStats());return null==t||(await new Promise(t=>{e._resumeProbeTimer=setTimeout(t,n.UT)}),s!==e._probeToken)?null:N(await i.getStats())-t})().then(i=>{if(s!==e._probeToken)return;let a=r?.lastInboundAt&&Date.now()-r.lastInboundAt<n.An;null!=i&&i>0||a?(0,m.Lq)("switch",`${t} probe alive (Δ=${i}, recent=${!!a})`):((0,m.Lq)("switch",`${t} probe DEAD (Δ=${i}) → forceRestartRtc`),e._forceRestartRtc(`${t}-probe-dead`))}).catch(()=>{s!==e._probeToken||(r?.lastInboundAt&&Date.now()-r.lastInboundAt<n.An?(0,m.Lq)("switch",`${t} probe error ignored (rtc recently active)`):((0,m.Lq)("switch",`${t} probe error → forceRestartRtc`),e._forceRestartRtc(`${t}-probe-error`)))}).finally(()=>{e._probeLive?.token===s&&(e._probeLive=null)})}function W(e,t){if(t?.type!=="error")return!1;let r=t.message===n.bg.pending?"pending":t.message===n.bg.rejected?"rejected":null;return!!r&&((0,h.c)("transport",`[pm] device ${r} → approval UI`),e._awaitingApproval=!0,e._wsCallbacks.onApproval?.(r),!0)}function q(e){if((0,m.Lq)("switch","signaling ready"),H(e),e._awaitingApproval)return;let t=e._adapters.get("rtc");if(!t){(0,m.Lq)("switch","sig-ready → start rtc (was deferred)"),e._startSecondaryAdapters();return}t.state===n.Of.closed&&((0,m.Lq)("switch","sig-ready → restartRtc (rtc was closed)"),e._restartRtc("sig-ready"))}function K(e,t){!(e._sig?.ready&&e._sig.send(t))&&("offer"===t.type&&(e._sigBuffer=e._sigBuffer.filter(e=>"offer"!==e.type&&"ice"!==e.type)),e._sigBuffer.push(t),e._sigBuffer.length>32&&e._sigBuffer.shift())}function H(e){if(!e._sigBuffer.length)return;let t=e._sigBuffer;for(let r of(e._sigBuffer=[],t))K(e,r)}async function z(e){if(e._auth.tunnelUrl!==window.location.origin)try{(0,h.c)("transport",`[pm] refreshTunnelUrl: fetching from ${u.O}/api/connect`);let t=await fetch(`${u.O}/api/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:e._auth.apiKey})});if(!t.ok)return void(0,h.c)("transport",`[pm] refreshTunnelUrl: HTTP ${t.status}`);let r=await t.json();(0,h.c)("transport",`[pm] refreshTunnelUrl: got ${r.tunnelUrl} (was ${e._auth.tunnelUrl})`),r.tunnelUrl&&r.tunnelUrl!==e._auth.tunnelUrl&&(e._auth.tunnelUrl=r.tunnelUrl)}catch(e){(0,h.c)("transport",`[pm] refreshTunnelUrl: error ${e.message}`)}}U(w),U(M);class J{constructor(e,t){const{profile:r,auth:i,wsCallbacks:s,rtcCallbacks:a,peerId:l}=function(e,t){let r=t?.enableWebRTC?"remoteDesktop":"clientApp",i={...n.j3[r]};t?.enableWebRTC||(i.enabled=["ws"]),t?.enableTurn&&(i.rtc={...i.rtc,enableTurn:!0});let s={tunnelUrl:e.tunnelUrl,localIp:e.localIp,apiKey:e.apiKey,tempKey:e.tempKey,deviceId:e.deviceId,namespace:e.namespace,socketOptions:e.socketOptions},a={onConnect:e.onConnect,onDisconnect:e.onDisconnect,onRetryStatus:e.onRetryStatus,onUrlUpdate:e.onUrlUpdate,onApproval:e.onApproval},l=t?{onUpgrade:t.onUpgrade,onFallback:t.onFallback,onTransportChange:t.onTransportChange}:{},o=`${e.deviceId}:${Math.random().toString(36).slice(2,10)}`;return s.socketOptions?.auth&&(s.socketOptions.auth.peerId=o),{profile:i,auth:s,wsCallbacks:a,rtcCallbacks:l,peerId:o}}(e,t);for(const e of(this._profile=r,this._auth=i,this._wsCallbacks=s,this._rtcCallbacks=a,this._peerId=l,Object.assign(this,{_adapters:new Map,_buffer:[],_pendingAcks:new Map,_ackTimers:new Map,_ackSeq:0,_rtcRestartAttempts:0,_rtcRestartTimer:null,_rtcRestartDueAt:0,_probeAttempts:0,_rtcGivenUp:!1,_giveUpIp:null,_lastStunProbeAt:0,_rejoinDebounceTimer:null,_netFingerprint:null,_awaitingApproval:!1,_ackTimeoutMs:n.QZ.ackTimeoutMs,_hiddenAt:null,_resumeProbeTimer:null,_probeToken:0,_probeLive:null,_connected:!1,_type:"ws",_connectionMode:"tunnel",_lastWsState:null,_rawSocket:null,_onConnectFired:!1,_rtcSignalingHandler:null,_sig:null,_sigDestroyed:!1,_sigBuffer:[],_wsFallbackTimer:null}),this._bus=function(e){let t=new Map,r=(e,r)=>{t.has(e)||t.set(e,[]),t.get(e).push(r)},n=(e,r)=>{let n=t.get(e);if(!n)return;let i=n.findIndex(e=>e===r||e._original===r);-1!==i&&n.splice(i,1)};return{_listeners:t,get connected(){return e._anyAdapterReady()},get id(){return e._rawSocket?.id||null},emit(t,...r){e._sendControl(t,r)},on(e,t){r(e,t)},off(e,t){n(e,t)},once(e,t){let i=(...r)=>{n(e,i),t(...r)};i._original=t,r(e,i)},listeners:e=>[...t.get(e)||[]],dispatch(e,r=[]){let n=t.get(e);if(n?.length){for(let e of[...n])if(n.includes(e))try{e(...r)}catch{}}},clear(){t.clear()},disconnect(){e._rawSocket?.disconnect()},kickWsZombie:t=>e.kickWsZombie(t)}}(this),this.busRef={current:this._bus},C.IU))this._bus.on(e,t=>(0,C.lu)(this,e,t));this._watchers=function(e){let t=()=>{let t;if((0,m.Lq)("switch",`visibility=${document.visibilityState}`),"visible"!==document.visibilityState)return;let r=e._adapters.get("ws"),i=e._adapters.get("rtc");if((0,m.Lq)("switch",`resume check: ws=${r?.ready?"ready":r?.state} rtc=${i?.ready?"ready":i?.state}`),B(e,"resume"),e._awaitingApproval)return;if(e._rtcGivenUp)return void e._maybeRearmRtc();if(t=e._rtcRestartTimer?Math.max(e._rtcRestartDueAt-Date.now(),0):-1,(0,m.Lq)("switch",`RESET attempts (was ${e._rtcRestartAttempts}) reason=resume pendingIn=${t}ms`),e._rtcRestartAttempts=0,e._probeAttempts=0,t<=n.QZ.backoffMs[0]||((0,m.Lq)("switch",`resume: pending rung was ${t}ms out → re-arm fast`),e._disarmRestart(),e._scheduleRtcRestart("resume-rearm")),!e._canSignal())return void e._sig?.retryNow("resume-no-carrier");let s=i?.state;i&&s!==n.Of.closed&&s!==n.Of.degraded?function(e){let t=e._adapters.get("rtc");if(!t?.ready)return e._restartRtc("resume-not-ready");let r=e._hiddenAt?Date.now()-e._hiddenAt:0;if("function"==typeof matchMedia&&matchMedia("(pointer: coarse)").matches&&r>n.Tr){(0,m.Lq)("switch",`resume: hidden ${Math.round(r/1e3)}s on touch → skip probe, force restart`),(0,h.c)("transport",`[pm] resume: hidden ${Math.round(r/1e3)}s → immediate restart`),e._forceRestartRtc("resume-hidden-touch");return}F(e,"resume")}(e):((0,m.Lq)("switch",`visibility → restartRtc (rtc=${s||"absent"})`),e._restartRtc("resume-dead-rtc"))},r=()=>{if("hidden"===document.visibilityState){e._hiddenAt=Date.now();return}clearTimeout(e._resumeCoalesceTimer),e._resumeCoalesceTimer=setTimeout(t,150)};document.addEventListener("visibilitychange",r);let i=!1,s=r=>{let n=!!r.detail?.hidden;if(n!==i){if(i=n,n){e._hiddenAt=Date.now();return}clearTimeout(e._resumeCoalesceTimer),e._resumeCoalesceTimer=setTimeout(t,150)}};document.addEventListener("app-visibility",s);let a=()=>{"visible"===document.visibilityState&&r()},l=()=>{e._hiddenAt=Date.now()};document.addEventListener("resume",a),document.addEventListener("freeze",l);let o=()=>{clearTimeout(e._netDebounceTimer),e._netDebounceTimer=setTimeout(()=>{!1===navigator.onLine?(0,m.Lq)("switch","net-change: still offline → wait"):((0,h.c)("transport","[pm] network change → probe rtc"),(0,m.Lq)("switch",`net-change: online=${navigator.onLine} → kick sig + ws + rtc`),e._sig?.retryNow("net-change"),e.retryNow("net-change"),(0,m.Lq)("switch",`RESET attempts (was ${e._rtcRestartAttempts}) givenUp=${e._rtcGivenUp} reason=net-change`),e._rtcRestartAttempts=0,e._probeAttempts=0,e._rtcGivenUp=!1,e._giveUpIp=null,e._shouldRenegotiate()&&e._restartRtc("net-change"))},n.o_.debounceMs)};return window.addEventListener("online",o),navigator.connection?.addEventListener?.("change",o),{visibilityHandler:r,detach(){document.removeEventListener("visibilitychange",r),document.removeEventListener("app-visibility",s),document.removeEventListener("resume",a),document.removeEventListener("freeze",l),window.removeEventListener("online",o),navigator.connection?.removeEventListener?.("change",o),clearTimeout(e._netDebounceTimer),e._netDebounceTimer=null,clearTimeout(e._resumeCoalesceTimer),e._resumeCoalesceTimer=null}}}(this)}get type(){return this._type}get connected(){return this._connected}get connectionMode(){return this._connectionMode}get wsBlocked(){return this._adapters.get("ws")?.blocked||!1}setWsBlocked(e){this._adapters.get("ws")?.setBlocked(e)}setUpdating(e){this._adapters.get("ws")?.setUpdating(e)}retryNow(e="user"){let t=this._adapters.get("ws");t?t.retryNow?.(e):((0,m.Lq)("switch",`retryNow by=${e}: no ws adapter → full connect()`),this.connect())}kickWsZombie(e="stale"){return B(this,e)}emit(e,...t){this._sendControl(e,t)}sendBinary(e,t){let r=this._pickAdapter(e);return!!r&&r.send(e,t)}connect(){this._sigDestroyed=!1;let e=this._profile.enabled.includes("rtc");e&&this._initSignalingClient(),e&&(this._canSignal()?this._startSecondaryAdapters():((0,m.Lq)("switch","rtc deferred — waiting for signaling relay"),clearTimeout(this._rtcDeferTimer),this._rtcDeferTimer=setTimeout(()=>{this._sigDestroyed||this._adapters.has("rtc")||((0,m.Lq)("switch","rtc defer expired → start anyway"),this._startSecondaryAdapters())},n.BF))),this._startWsFallback(),(0,h.c)("transport","[pm] connect: RTC + WS parallel (RTC preferred, WS warm standby)."),(0,m.Lq)("switch","connect: RTC + WS parallel")}async _startWsFallback(){if(!(this._adapters.has("ws")||this._sigDestroyed||this._adapters.get("rtc")?.isLoopback)){if((0,m.Lq)("switch","ws-fallback: start (refresh url)"),await this._refreshTunnelUrl(),this._adapters.has("ws")||this._sigDestroyed||this._adapters.get("rtc")?.isLoopback)return void(0,m.Lq)("switch","ws-fallback: aborted (destroyed, loopback or already attached)");(0,m.Lq)("switch","ws-fallback: connecting"),this._instantiate("ws"),this._adapters.get("ws")?.connect(this._buildCtx("ws"))}}async _refreshTunnelUrl(){return z(this)}_initSignalingClient(){!function(e){if(!n.gI.enabled||e._sig||e._sigDestroyed||!e._auth.deviceId||!e._auth.apiKey)return;let t=u.O.replace(/^http/,"ws")+"/signaling";r.e(6739).then(r.bind(r,46739)).then(({SignalingClient:r})=>{e._sig||e._sigDestroyed||(e._sig=new r({url:t,role:"client",roomId:e._auth.apiKey,apiKey:e._auth.apiKey,from:e._peerId,onReady:()=>q(e),pingMs:n.gI.pingMs}),e._sig.on(t=>{if("error"===t.type&&"rtc-disabled"===t.message){e._rtcTestDisabled=!0,(0,m.Lq)("switch","rtc-disabled by host → stop RTC retry (use WS)");return}W(e,t)||e._rtcSignalingHandler?.(t)}),e._sig.connect())}).catch(e=>(0,h.c)("transport",`[pm] SignalingClient load failed: ${e?.message||e}`))}(this)}_instantiate(e){if(this._adapters.has(e))return;let t=O.get(e);if(!t)return;let r=new t;r.on("stateChange",t=>this._onAdapterStateChange(e,t)),r.on("message",({event:e,data:t,source:r})=>this._dispatch(e,t,r)),r.on("binary",e=>this._onBinary(e)),"rtc"===e&&(r.on("netFingerprint",e=>this._onNetFingerprint(e)),this._srvCaps&&r.setPeerCaps?.(this._srvCaps)),this._adapters.set(e,r)}_onNetFingerprint(e){if(!e||e===this._netFingerprint)return;let t=this._netFingerprint;this._netFingerprint=e,t&&(0,h.c)("transport",`[pm] net fingerprint ${t}→${e} (same network — no backoff reset)`)}_maybeRearmRtc(){if(!this._rtcGivenUp)return;let e=Date.now();e-this._lastStunProbeAt<n.cx.minIntervalMs||(this._lastStunProbeAt=e,E().then(e=>{var t;if(this._sigDestroyed||!this._rtcGivenUp)return;let r=e||(this._giveUpIp===j?j:null);(t=this._giveUpIp,r&&(!t||r!==t))?((0,m.Lq)("switch",`rearm check: ip ${this._giveUpIp||"unknown"}→${r} changed → re-arm RTC`),(0,h.c)("transport","[pm] public ip changed → re-arm rtc"),this._rtcGivenUp=!1,this._giveUpIp=null,this._probeAttempts=0,this._rtcRestartAttempts=0,this._netFingerprint=e,this._canSignal())?this._shouldRenegotiate()&&this._restartRtc("stun-rearm"):this._sig?.retryNow("stun-rearm"):(0,m.Lq)("switch",`rearm check: ip=${r||"unknown"} same as give-up → stay WS-only`)}).catch(()=>{}))}_startSecondaryAdapters(){for(let e of((0,h.c)("transport",`[pm] startSecondary enabled=${this._profile.enabled}`),(0,h.c)("transport",`[pm] startSecondary rtcTestDisabled=${!!this._rtcTestDisabled}`),this._profile.enabled))"ws"!==e&&("rtc"!==e||!this._rtcTestDisabled)&&(this._adapters.has(e)||((0,h.c)("transport",`[pm] start adapter ${e}`),this._instantiate(e),this._adapters.get(e)?.connect(this._buildCtx(e))))}_handleApprovalSignal(e){return W(this,e)}_onSignalingReady(){q(this)}_canSignal(){return!!this._sig?.ready}_shouldRenegotiate(){return!this._awaitingApproval&&this._canSignal()}_restartRtc(e="?"){(0,m.Lq)("switch",`restartRtc CALLED by=${e} attempts=${this._rtcRestartAttempts}`);let t=this._adapters.get("rtc"),r=function({testDisabled:e,givenUp:t,rtcState:r,hasRtc:i}){return e?"skip-test-disabled":t?"skip-given-up":i&&(r===n.Of.connecting||r===n.Of.open)?"skip-in-flight":i?"restart":"start-fresh"}({testDisabled:!!this._rtcTestDisabled,givenUp:this._rtcGivenUp,rtcState:t?.state,hasRtc:!!t});if("skip-test-disabled"===r)return void(0,m.Lq)("switch","restartRtc skipped (rtcTestDisabled)");if("skip-given-up"===r)return void(0,m.Lq)("switch","restartRtc skipped (hard NAT → WS-only)");if("skip-in-flight"===r)return void(0,m.Lq)("switch",`restartRtc skipped (rtc=${t.state})`);if("start-fresh"===r){(0,m.Lq)("switch","restartRtc: no rtc → startSecondary"),this._startSecondaryAdapters();return}(0,m.Lq)("switch","restartRtc: tear down + renegotiate"),(0,h.c)("transport","[pm] ws reconnected → restart rtc");try{t.disconnect(`restart:${e}`)}catch{}this._adapters.delete("rtc"),this._rtcSignalingHandler=null,this._startSecondaryAdapters()}_forceRestartRtc(e="?"){(0,m.Lq)("switch",`forceRestartRtc CALLED by=${e}`);let t=this._adapters.get("rtc");if(t){try{t.disconnect(`force:${e}`)}catch{}this._adapters.delete("rtc"),this._rtcSignalingHandler=null}this._rtcGivenUp?(0,m.Lq)("switch","forceRestartRtc: torn down, no renegotiate (hard NAT)"):this._startSecondaryAdapters()}disconnect(){this._watchers?.detach(),this._watchers=null,clearTimeout(this._resumeProbeTimer),this._resumeProbeTimer=null,clearTimeout(this._rtcDeferTimer),this._rtcDeferTimer=null,this._probeToken++;try{this._sig?.disconnect()}catch{}for(let e of(this._sig=null,this._sigDestroyed=!0,this._sigBuffer=[],clearTimeout(this._wsFallbackTimer),clearTimeout(this._rejoinDebounceTimer),this._rejoinDebounceTimer=null,this._adapters.values()))try{e.disconnect("pm-disconnect")}catch{}for(let e of(this._adapters.clear(),this._bus.clear(),this._buffer=[],this._connected=!1,this._rawSocket=null,this._disarmRestart(),(0,m.Lq)("switch",`RESET attempts (was ${this._rtcRestartAttempts}) reason=pm-disconnect`),this._rtcRestartAttempts=0,this._probeAttempts=0,this._rtcGivenUp=!1,this._giveUpIp=null,this._lastStunProbeAt=0,this._ackTimers.values()))clearTimeout(e);this._ackTimers.clear()}_buildCtx(e,t){let r={auth:this._auth,profile:this._profile};return"ws"===e&&(r.onRetryStatus=this._wsCallbacks.onRetryStatus,r.onUrlUpdate=e=>{e.tunnelUrl&&(this._auth.tunnelUrl=e.tunnelUrl),void 0!==e.localIp&&(this._auth.localIp=e.localIp),this._wsCallbacks.onUrlUpdate?.(e)}),"rtc"===e&&(r.signaling={send:e=>this._sendSignaling(e),on:e=>{this._rtcSignalingHandler=e},off:()=>{this._rtcSignalingHandler=null}}),r}_onAdapterStateChange(e,t){(0,h.c)("transport",`[pm] ${e} state=${t}`),("rtc"!==e||t!==n.Of.closed)&&(0,m.Lq)("switch",`${e}→${t}`),"ws"===e&&function(e,t){let r=e._adapters.get("ws");if(t===n.Of.open){let t=e._lastWsState===n.Of.degraded;e._connected=!0,e._connectionMode=r?.connectionMode||"tunnel",e._rawSocket=r?.socket||null,t&&e._maybeFireRejoin("ws","ws reconnect while rtc ready"),e._lastWsState!==n.Of.open&&(e._onConnectFired?e._wsCallbacks.onUrlUpdate?.({}):(e._onConnectFired=!0,(0,m.Lq)("switch",`onConnect FIRE (ws, mode=${e._connectionMode})`),e._wsCallbacks.onConnect?.(e._bus,e._connectionMode)))}else e._rawSocket=null,e._lastWsState===n.Of.open&&((0,m.Lq)("switch","ws down"),e._anyAdapterReady()&&(0,m.Lq)("switch","ws down but rtc alive → skip onDisconnect"));e._lastWsState=t}(this,t),"rtc"===e&&function(e,t){if(t===n.Of.open){let t=e._onConnectFired;clearTimeout(e._wsFallbackTimer),e._rtcCallbacks.onUpgrade?.(e._adapters.get("rtc")?.typeDetail||"dc-stun"),e._onConnectFired||(e._onConnectFired=!0,e._connected=!0,e._connectionMode="webrtc",(0,m.Lq)("switch","onConnect FIRE (rtc, mode=webrtc)"),e._wsCallbacks.onConnect?.(e._bus,e._connectionMode)),e._rtcRestartAttempts=0,e._probeAttempts=0,e._rtcGivenUp=!1,e._giveUpIp=null,e._disarmRestart(),clearTimeout(e._rejoinDebounceTimer),e._rejoinDebounceTimer=null;let r=e._adapters.get("rtc");if(r?.isLoopback){(0,m.Lq)("switch","rtc loopback detected (same machine) → drop ws standby");let t=e._adapters.get("ws");if(t){try{t.disconnect()}catch{}e._adapters.delete("ws")}}t&&e._maybeFireRejoin("rtc","rtc reconnect while ws ready")}if(t===n.Of.closed){for(let t of(e._rtcCallbacks.onFallback?.("ws"),(0,m.Lq)("switch","rtc closed → startWsFallback + scheduleRtcRestart"),e._startWsFallback(),clearTimeout(e._wsFallbackTimer),e._pendingAcks.values()))try{t({error:"rtc-closed"})}catch{}for(let t of(e._pendingAcks.clear(),e._ackTimers.values()))clearTimeout(t);e._ackTimers.clear(),e._scheduleRtcRestart("rtc-closed")}}(this,t),"rtc"===e&&t===n.Of.open&&((0,h.c)("auth","[seal] rtc OPEN → sending proof"),(0,C.pV)(this)),this._recomputeType();let r=this._anyAdapterReady();r!==this._connected&&(this._connected=r,r||(this._onConnectFired=!1,(0,m.Lq)("switch",`onDisconnect FIRE (last carrier gone: ${e}→${t})`),this._wsCallbacks.onDisconnect?.(`${e}-${t}`))),this._flushBuffer()}_maybeFireRejoin(e,t){let r="ws"===e?this._adapters.get("rtc"):this._adapters.get("ws");if(r?.ready){(0,h.c)("transport",`[pm] ${t} → skip rejoin (other ready)`),(0,m.Lq)("switch",`${t} → skip rejoin (other ready)`);return}if("ws"===e&&r&&r.state===n.Of.connecting){(0,h.c)("transport",`[pm] ${t} → debounce rejoin (rtc connecting)`),(0,m.Lq)("switch",`${t} → debounce rejoin ${n.ZN}ms (rtc connecting)`),clearTimeout(this._rejoinDebounceTimer),this._rejoinDebounceTimer=setTimeout(()=>{this._rejoinDebounceTimer=null;let e=this._adapters.get("rtc");e?.ready?(0,m.Lq)("switch","debounce: rtc opened → skip rejoin"):((0,m.Lq)("switch",`debounce expired → FIRE rejoin (rtc=${e?.state||"absent"})`),this._bus.dispatch("connect",[]))},n.ZN);return}(0,m.Lq)("switch",`${t} → FIRE rejoin`),this._bus.dispatch("connect",[])}_recomputeType(){let e=this._pickAdapter(n.l_.binary)||this._pickAdapter(n.l_.control),t=e&&"rtc"===e.constructor.id?e.typeDetail||"dc-stun":"ws";t!==this._type&&(this._type=t,this._rtcCallbacks.onTransportChange?.(t))}_anyAdapterReady(){for(let e of this._adapters.values())if(e.ready)return!0;return!1}_pickAdapter(e){return function(e,t,r){let n=t.channels[r];if(!n)return null;let i=[...e.values()].filter(e=>e.supports(r)&&e.ready);return i.length?(i.sort((e,t)=>{let i=t.getPriority?t.getPriority(r):t.constructor.priority[r]??0,s=e.getPriority?e.getPriority(r):e.constructor.priority[r]??0;if(i!==s)return i-s;if(n.prefer){if(t.constructor.id===n.prefer)return 1;if(e.constructor.id===n.prefer)return -1}return 0}),i[0]||null):null}(this._adapters,this._profile,e)}_sendControl(e,t){!function(e,t,r){let i="function"==typeof r[r.length-1]?r.pop():null,s=e._pickAdapter(n.l_.control);if(!s){(0,h.c)("transport",`[pm] buffer event=${t} (no adapter ready)`),(0,m.Lq)("switch",`buffer "${t}" (no adapter)`),e._buffer.push({event:t,args:r,cb:i});return}if((0,h.c)("transport",`[pm] send control event=${t} via=${s.constructor.id}`),"rtc"===s.constructor.id){let a=null;if(i&&(a=`c_${++e._ackSeq}`,e._pendingAcks.set(a,i),e._scheduleAckTimeout(a,{event:t,args:r})),!s.send(n.l_.control,{event:t,args:r,ackId:a})){let l=e._pickAdapter(n.l_.control);if(l&&l!==s&&l.send(n.l_.control,i?{event:t,args:r,ackId:a,cb:i}:{event:t,args:r,ackId:a}))return;(0,h.c)("transport",`[pm] rtc refused event=${t} → buffered`),e._buffer.push({event:t,args:r,cb:i})}}else s.send(n.l_.control,{event:t,args:r,cb:i})}(this,e,t)}_flushBuffer(){!function(e){if(!e._buffer.length)return;let t=e._pickAdapter(n.l_.control);if(!t)return;let r=e._buffer.splice(0);for(let{event:n,args:i,cb:s}of((0,h.c)("transport",`[pm] flush ${r.length} buffered via=${t.constructor.id}`),r))e._sendControl(n,s?[...i,s]:i)}(this)}_dispatch(e,t,r){!function(e,t,r,i){if("srvCaps"===t){let t="rtc"===i?r?.args?.[0]:r;(0,h.c)("transport",`[pm] srvCaps from host via ${i}: ${JSON.stringify(t)}`),e._srvCaps=t||{},e._adapters.get("rtc")?.setPeerCaps?.(e._srvCaps)}if("__ack"===t){let{ackId:t,args:n}=r||{},i=e._pendingAcks.get(t);if(i){e._pendingAcks.delete(t);let r=e._ackTimers.get(t);r&&(clearTimeout(r),e._ackTimers.delete(t)),i(...n||[])}return}if("device:approved"===t){e._awaitingApproval=!1;let t=e._adapters.get("rtc");e._canSignal()&&(!t||t.state===n.Of.closed)&&e._restartRtc("device-approved")}if("rtc:enabled"===t){e._rtcTestDisabled&&(e._rtcTestDisabled=!1,(0,m.Lq)("switch","rtc:enabled by host → clear flag + restart RTC"),e._restartRtc("rtc-enabled"));return}if("tunnel:updated"===t){let t="rtc"===i?r?.args?.[0]:r;if(t){let{tunnelUrl:r,localIp:n,status:i}=t;if(e._auth.tunnelUrl===window.location?.origin)return(0,m.Lq)("switch",`tunnel:updated ignored (carrier is the page origin; got url=${r||"none"})`);if((0,m.Lq)("switch",`tunnel:updated recv (status=${i} url=${r||"none"})`),"ready"===i&&r){let t=e._auth.tunnelUrl!==r;e._auth.tunnelUrl=r,n&&(e._auth.localIp=n),e._wsCallbacks.onUrlUpdate?.({tunnelUrl:r,localIp:n});let i=e._adapters.get("ws");if(i&&(!i.ready||t)){(0,m.Lq)("switch",`tunnel:updated → ${t?"url changed":"ws not ready"} → retry ws with new URL`);try{i.retryNow("tunnel-updated")}catch{}}}else"down"===i&&(e._auth.tunnelUrl="",e._wsCallbacks.onUrlUpdate?.({tunnelUrl:"",localIp:n}))}return}let s="rtc"===i&&Array.isArray(r?.args)?r.args:[r];e._bus?.dispatch(t,s)}(this,e,t,r)}_onBinary(e){e&&("mobile"===e.channel?this._bus?.dispatch("mobile-bin",[e.buffer]):"file"===e.channel&&this._bus?.dispatch("file-bin",[e.buffer]))}_scheduleAckTimeout(e){var t;let r;t=this,r=setTimeout(()=>{t._ackTimers.delete(e),(0,h.c)("transport",`[pm] ack timeout ackId=${e} event=undefined → suspect zombie RTC`);let r=t._pendingAcks.get(e),i=t._adapters.get("rtc");t._adapters.get("ws");let s=Date.now(),a=i?.lastInboundAt||0;i?.ready&&a&&s-a<n.An?(0,m.Lq)("switch",`ack-timeout ? ignored (rtc active, lastInbound=${s-a}ms ago)`):i?.state===n.Of.open?F(t,"ack-timeout:?"):t._scheduleRtcRestart("ack-timeout")},t._ackTimeoutMs),t._ackTimers.set(e,r)}_armRestart(e,t){clearTimeout(this._rtcRestartTimer),this._rtcRestartDueAt=Date.now()+t,this._rtcRestartTimer=setTimeout(e,t)}_disarmRestart(){let e=this._rtcRestartTimer?Math.max(this._rtcRestartDueAt-Date.now(),0):-1;return clearTimeout(this._rtcRestartTimer),this._rtcRestartTimer=null,this._rtcRestartDueAt=0,e}_scheduleRtcRestart(e="?"){if((0,m.Lq)("switch",`rtcRestart REQ by=${e} attempts=${this._rtcRestartAttempts} probe=${this._probeAttempts} givenUp=${this._rtcGivenUp} pending=${!!this._rtcRestartTimer}`),this._rtcRestartTimer){let t=Math.max(this._rtcRestartDueAt-Date.now(),0);(0,m.Lq)("switch",`rtcRestart SKIP by=${e} (pending rung ${this._rtcRestartAttempts} fires in ${t}ms)`);return}if(this._rtcGivenUp){(0,m.Lq)("switch","scheduleRtcRestart skipped (hard NAT → WS-only)"),(0,h.c)("transport","[pm] rtc probe skipped (given up — hard NAT)");return}let t=function({attempts:e,probeAttempts:t,verdict:r}){let i,s,a=e>=n.QZ.maxAttempts,l=t;if(a){if(i=n.QZ.probeBackoffMs[t]??n.QZ.probeBackoffMs.at(-1),(l=t+1)>=n.QZ.classifyAfterProbes){if("hard"===(s=r?.()??"unknown"))return{giveUp:!0,verdict:s,probeAttempts:l};l=0}}else i=n.QZ.backoffMs[e]??n.QZ.backoffMs.at(-1);return{delay:i,isProbe:a,attempts:e+1,probeAttempts:l,verdict:s}}({attempts:this._rtcRestartAttempts,probeAttempts:this._probeAttempts,verdict:()=>this._adapters.get("rtc")?.natVerdict?.()??"unknown"});if(void 0!==t.verdict&&((0,m.Lq)("switch",`scheduleRtcRestart natVerdict=${t.verdict} probeAttempts=${t.probeAttempts}`),(0,h.c)("transport",`[pm] rtc nat verdict=${t.verdict} after ${t.probeAttempts} probes`)),t.giveUp){this._probeAttempts=t.probeAttempts,this._rtcGivenUp=!0,this._giveUpIp=this._netFingerprint,this._giveUpIp||E().then(e=>{this._rtcGivenUp&&!this._giveUpIp&&(this._giveUpIp=e||j,(0,m.Lq)("switch",`give-up baseline from probe: ip=${this._giveUpIp}`))}).catch(()=>{}),(0,m.Lq)("switch",`RTC give-up: hard NAT → WS-only (ip=${this._giveUpIp||"pending"})`);return}let{delay:r,isProbe:i}=t;this._probeAttempts=t.probeAttempts,this._rtcRestartAttempts=t.attempts,(0,m.Lq)("switch",`rtcRestart ARM by=${e} rung=${this._rtcRestartAttempts} delay=${r}ms probe=${i}`),(0,h.c)("transport",`[pm] schedule rtc ${i?"probe":"restart"} #${this._rtcRestartAttempts} in ${r}ms`);let s=()=>{if(this._disarmRestart(),this._awaitingApproval||!this._sig?.ready)return;let e=this._adapters.get("rtc");if(e){let t=function({state:e,connectingSince:t,connectDeadline:r,now:i,connectTimeoutMs:s}){return e!==n.Of.connecting?"restart":i<function({connectingSince:e,connectDeadline:t,connectTimeoutMs:r}){return t??(e??0)+r}({connectingSince:t,connectDeadline:r,connectTimeoutMs:s})?"wait":"teardown"}({state:e.state,connectingSince:e.connectingSince,connectDeadline:e.connectDeadline,now:Date.now(),connectTimeoutMs:n.AC});if("wait"===t){let t=Math.max(function({connectingSince:e,connectDeadline:t,connectTimeoutMs:r}){return t??(e??0)+r}({connectingSince:e.connectingSince,connectDeadline:e.connectDeadline,connectTimeoutMs:n.AC})-Date.now(),r);(0,m.Lq)("switch",`restart tick: peer still young (rung ${this._rtcRestartAttempts}) → re-arm in ${t}ms, no rung spent`),this._armRestart(s,t);return}if("teardown"===t){try{e.disconnect(`rung-${this._rtcRestartAttempts}-teardown`)}catch{}this._adapters.delete("rtc"),this._rtcSignalingHandler=null}}this._restartRtc(`rung-${this._rtcRestartAttempts}`)};this._armRestart(s,r)}_sendSignaling(e){K(this,e)}_flushSigBuffer(){H(this)}}},80186:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(73365);function i({children:e,variant:t="primary",size:r="md",disabled:s=!1,loading:a=!1,onClick:l,className:o="",...c}){let d=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[t]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[r]} ${s||a?"cursor-not-allowed":""} ${o}`;return(0,n.jsx)("button",{onClick:l,disabled:s||a,className:d,...c,children:a?(0,n.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,n.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},86129:(e,t,r)=>{r.d(t,{AC:()=>u,An:()=>d,BF:()=>m,El:()=>v,HE:()=>P,HJ:()=>p,Ic:()=>x,J2:()=>w,Jd:()=>T,KF:()=>c,ML:()=>b,N0:()=>S,Of:()=>I,QS:()=>h,QZ:()=>s,Rh:()=>R,Tr:()=>g,UT:()=>f,ZN:()=>l,aS:()=>A,bg:()=>_,cx:()=>a,dT:()=>i,gI:()=>y,j3:()=>$,l_:()=>n,o_:()=>C,qM:()=>k,si:()=>o});let n={control:"control",binary:"binary",file:"file",mobile:"mobile"},i=65536,s={ackTimeoutMs:5e3,maxAttempts:3,backoffMs:[500,1500,3e3],probeBackoffMs:[3e4,6e4,12e4,3e5],classifyAfterProbes:3},a={urls:["stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302"],timeoutMs:2500,minIntervalMs:15e3},l=500,o=3,c=1e4,d=25e3,u=4e3,p=15e3,h=1e3,m=12e3,f=2e3,g=1e4,y={enabled:!0,pingMs:25e3},_={pending:"pending-approval",rejected:"device-rejected"},b={mismatch:"mismatch",sealUnreadable:"seal-unreadable",timeout:"proof-timeout"},w={pending:"pending",approved:"approved",rejected:"rejected",reconnect:"reconnect"},k=8,v="9remote_pending_save",A="9remote_wants_save",S="9remote:keys-changed",T="9remote_login_error",x="strict",C={debounceMs:500},R=3e4,P={chunkSize:65528,windowSize:64,dcBufferThreshold:8388608,maxUploadSize:0x3200000,maxDownloadSize:0xc800000,maxStreamMediaSize:524288e3},I={idle:"idle",connecting:"connecting",open:"open",degraded:"degraded",closed:"closed"},$={clientApp:{enabled:["ws","rtc"],parallel:!0,channels:{control:{strategy:"priority",prefer:"rtc"},binary:{strategy:"priority",prefer:"rtc"},file:{strategy:"priority",prefer:"rtc"},mobile:{strategy:"priority",prefer:"rtc"}},rtc:{enableTurn:!0,dcControl:{ordered:!0}}},remoteDesktop:{enabled:["ws","rtc"],parallel:!0,channels:{control:{strategy:"priority",prefer:"rtc"},binary:{strategy:"priority",prefer:"rtc"},file:{strategy:"priority",prefer:"rtc"},mobile:{strategy:"priority",prefer:"rtc"}},rtc:{enableTurn:!0,dcControl:{ordered:!0}}}}},86251:(e,t,r)=>{r.d(t,{O:()=>u,Y:()=>c});let n=new Uint8Array([48,42,48,5,6,3,43,101,110,3,33,0]);function i(e){let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}function s(e){let t="",r=new Uint8Array(e);for(let e=0;e<r.length;e++)t+=String.fromCharCode(r[e]);return btoa(t)}function a(...e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}async function l(e){let t;try{t=i(String(e))}catch{return null}if(32!==t.length)return null;try{return await crypto.subtle.importKey("spki",a(n,t),{name:"X25519"},!0,[])}catch{return null}}async function o(e,t,r,n){let i=await crypto.subtle.deriveBits({name:"X25519",public:t},e,256),s=await crypto.subtle.importKey("raw",i,"HKDF",!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:a(r,n),info:new TextEncoder().encode("9remote-tail-seal-v1")},s,{name:"AES-GCM",length:256},!1,["encrypt"])}async function c(e,t){if("string"!=typeof e||!e||"string"!=typeof t||!t)return null;let r=await l(t);if(!r)return null;try{let t=await crypto.subtle.generateKey({name:"X25519"},!0,["deriveBits"]),n=new Uint8Array(await crypto.subtle.exportKey("spki",t.publicKey)).slice(-32),i=new Uint8Array(await crypto.subtle.exportKey("spki",r)).slice(-32),a=await o(t.privateKey,r,n,i),l=crypto.getRandomValues(new Uint8Array(12)),c=await crypto.subtle.encrypt({name:"AES-GCM",iv:l},a,new TextEncoder().encode(e));return{epk:s(n),iv:s(l),ct:s(c)}}catch{return null}}let d="ABCDEFGHJKLMNPQRSTUVWXYZ23456789";async function u(e,t){if("u"<typeof crypto||!crypto.subtle)return null;let r=[e,t].map(e=>{let t;try{t=i(String(e||""))}catch{t=new Uint8Array(0)}let r=new Uint8Array(2);return new DataView(r.buffer).setUint16(0,t.length),a(r,t)}),n=new Uint8Array(await crypto.subtle.digest("SHA-256",a(...r)));return d[n[0]%32]+d[n[1]%32]}},90076:(e,t,r)=>{r.d(t,{O:()=>n,Sn:()=>c,TR:()=>o,_8:()=>s,cC:()=>h,dM:()=>u,fm:()=>i,jP:()=>d,lE:()=>l,qn:()=>p,w:()=>a});let n="https://9remote.cc",i="https://9remote.cc/",s=2208,a=`http://127.0.0.1:${s}`,l=a,o=`${a}/api/ui/state`,c={connect:`${n}/api/connect`,tempKeyCreate:`${n}/api/temp-key/create`,tempKeyVerify:`${n}/api/temp-key/verify`,tempKeyRemove:`${n}/api/temp-key/remove`,localSites:"/api/local-sites",turnCredentials:`${n}/api/webrtc/turn-credentials`},d=5,u=2e3,p=5e3,h=1e4},90084:(e,t,r)=>{r.d(t,{$4:()=>d,D5:()=>b,HY:()=>h,I8:()=>g,IU:()=>w,LG:()=>u,cH:()=>y,e1:()=>m,lu:()=>k,lz:()=>c,pV:()=>v,t8:()=>p});var n=r(86129);r(52159);var i=r(86251);let s="9remote_device_trust",a="9remote_pending_fp2";function l(){try{return JSON.parse(localStorage.getItem(s)||"{}")}catch{return{}}}function o(e){localStorage.setItem(s,JSON.stringify(e))}function c(e){return l()[e]||null}function d(e){if(!e)return e;let t=c(e)?.tail;return t?`${e}-${t}`:e}function u(e,t){let r=l();r[e]={...r[e]||{},...t},o(r)}async function p(e,t){return e&&t?await (0,i.O)(e,t):null}function h(){let e=sessionStorage.getItem(a);return sessionStorage.removeItem(a),e?JSON.parse(e).fp2??null:null}function m(){try{let e=sessionStorage.getItem(a);if(!e)return null;let{fp2:t,exp:r}=JSON.parse(e);if(!t||Date.now()>r)return sessionStorage.removeItem(a),null;return t}catch{return null}}let f="9remote_api_keys";function g(){try{let e=sessionStorage.getItem(n.El);if(!e)return;sessionStorage.removeItem(n.El);let t=JSON.parse(localStorage.getItem(f)||"[]");if(t.some(t=>{try{return atob(t.key)===e}catch{return!1}}))return;t.push({id:String(Date.now()),key:btoa(e),label:`Key ${t.length+1}`,createdAt:new Date().toISOString(),lastLoginDate:new Date().toISOString()}),localStorage.setItem(f,JSON.stringify(t));try{window.dispatchEvent(new Event(n.N0))}catch{}}catch{}}function y(e){if(e)try{let t=l();delete t[e],o(t)}catch{}}function _(e){let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}async function b(e,t,r){try{let n=await crypto.subtle.importKey("raw",_(e),{name:"Ed25519"},!1,["verify"]);return await crypto.subtle.verify("Ed25519",n,_(r),new TextEncoder().encode(t))}catch{return null}}let w=["device:keyIssued","device:tailRejected"];function k(e,t,r){let i=e._auth?.apiKey;if(!i)return!1;if("device:keyIssued"===t){e._auth.tempKey=null,e._auth.socketOptions?.auth&&(e._auth.socketOptions.auth.tempKey=null);try{sessionStorage.removeItem("tempKey")}catch{}let t=r?.tail;return!t||(u(i,{tail:t}),e._tailProofSent=e._adapters.get("rtc")?._peerEpoch??0,sessionStorage.getItem(n.aS)&&(sessionStorage.removeItem(n.aS),sessionStorage.setItem(n.El,`${i}-${t}`),g()),!0)}return"device:tailRejected"===t&&(r?.reason===n.ML.sealUnreadable&&u(i,{hostSealKey:null}),!0)}async function v(e){let t=e._auth?.apiKey;if(!t)return;let i=e._adapters.get("rtc");if(!i?.ready)return;let s=i._peerEpoch??0;if(e._tailProofSent===s)return;let{freshAuth:a}=await Promise.resolve().then(r.bind(r,63977)),l=await a({apiKey:t,tempKey:e._auth?.tempKey||null},"rtc");(l.keyTail||l.keyTailSealed)&&i.send(n.l_.control,{event:"device:tailProof",args:[{keyTail:l.keyTail,keyTailSealed:l.keyTailSealed,tempKey:e._auth?.tempKey||null}]})&&(e._tailProofSent=s)}},94858:(e,t,r)=>{r.d(t,{d:()=>s});var n=r(2074),i=r(86129);let s=(0,n.v)(e=>({bus:null,busRef:{current:null},protocolRef:{current:null},connected:!1,everConnected:!1,deliberate:!1,connectionMode:"tunnel",carrier:"ws",approvalStatus:null,admitted:!1,authKey:null,endpoint:null,retryStatus:{isRetrying:!1,attempt:0,maxAttempts:10,failed:!1},setConnection:t=>e(e=>({...e,...t})),setConnected:t=>e({connected:t}),setCarrier:t=>e({carrier:t}),setConnectionMode:t=>e({connectionMode:t}),setRetryStatus:t=>e({retryStatus:t}),setAuthKey:t=>e({authKey:t}),setAdmitted:t=>e({admitted:t}),applyApproval:t=>e(e=>{let r=e.approvalStatus;return t===i.J2.reconnect?r===i.J2.approved?{approvalStatus:null}:{}:r===i.J2.approved&&t===i.J2.pending?{}:{approvalStatus:t}}),reset:()=>e({bus:null,connected:!1,deliberate:!1,everConnected:!1,connectionMode:"tunnel",carrier:"ws",endpoint:null,approvalStatus:null,admitted:!1,retryStatus:{isRetrying:!1,attempt:0,maxAttempts:10,failed:!1}})}))},97711:(e,t,r)=>{r.d(t,{Fo:()=>u,U0:()=>o,vd:()=>d});var n=r(1521),i=r(94858);let s="9remote_auth",a="9remote_auth_state",l=["apiKey","tunnelUrl","mode","localIp"];function o(){try{localStorage.removeItem(a)}catch{}}function c(e){"u">typeof document&&(document.cookie=`${s}=${e}; path=/; max-age=86400; SameSite=Lax`)}function d({apiKey:e,tunnelUrl:t,mode:r="remote",tempKey:n=null,localIp:s=null}){if(!e){try{localStorage.removeItem(a)}catch{}return}try{sessionStorage.setItem("apiKey",e),sessionStorage.setItem("tunnelUrl",t),sessionStorage.setItem("mode",r||"remote"),n?sessionStorage.setItem("tempKey",n):sessionStorage.removeItem("tempKey"),s?sessionStorage.setItem("localIp",s):sessionStorage.removeItem("localIp")}catch{}c(e);try{sessionStorage.removeItem("9remote_manual_disconnect")}catch{}try{!function(){try{return"false"!==localStorage.getItem("9remote_remember_key_preference")}catch{return!1}}()?localStorage.removeItem(a):localStorage.setItem(a,JSON.stringify({apiKey:e,tunnelUrl:t,mode:r,localIp:s}))}catch{}i.d.getState().setAuthKey(e)}function u(){let e=(0,n.useCallback)(()=>{let e,t,r,n,i;try{e=sessionStorage.getItem("apiKey"),t=sessionStorage.getItem("tunnelUrl"),r=sessionStorage.getItem("mode"),n=sessionStorage.getItem("tempKey"),i=sessionStorage.getItem("localIp")}catch{return null}if(!e){let n=function(){try{return JSON.parse(localStorage.getItem(a)||"null")}catch{return null}}();if(!n?.apiKey)return null;try{for(let e of l)n[e]&&sessionStorage.setItem(e,n[e])}catch{}e=n.apiKey,t=n.tunnelUrl??null,r=n.mode??null,i=n.localIp??null}return c(e),{apiKey:e,tunnelUrl:t,mode:r,tempKey:n,localIp:i}},[]);return{getAuth:e,setAuth:(0,n.useCallback)(e=>d(e),[]),clearAuth:(0,n.useCallback)(()=>{try{sessionStorage.clear()}catch{}try{localStorage.removeItem(a)}catch{}"u">typeof document&&(document.cookie=`${s}=; path=/; max-age=0`)},[])}}},98988:(e,t,r)=>{r.d(t,{Nw:()=>x,eJ:()=>S,d:()=>T,rh:()=>A});var n=r(2074),i=r(29091),s=r(94858),a=r(79453),l=r(7938),o=r(11155),c=r(90084);let d="9remote_fleet_connected";function u(){try{return JSON.parse(localStorage.getItem(d)||"[]")}catch{return[]}}class p{constructor({hostOf:e,patch:t,bindBus:r,ready:n,probeTargets:i,servedBy:s=null,servedBus:a=null}){this._hostOf=e,this._patch=t,this._bindBus=r,this._ready=n,this._probeTargets=i,this._servedBy=s||(()=>!1),this._servedBus=a||(()=>null),this.buses=new Map,this._connectTimers=new Map,this.pending=new Map,this._probeTimer=null,this._probeVisible=null}busOf(e){return e&&this.buses.get(e)?.busRef?.current||null}pmOf(e){return this.buses.get(e)||null}has(e){return this.buses.has(e)}whenReady(e,t){let r=this._hostOf(e);if(!e||!r)return;if(this._servedBy(e)){let r=this._servedBus(e);r&&t(r);return}let n=this.busOf(e);if(n&&"online"===r.status)return void t(n);if(!this._canOpen(r,e))return;this.open(e,r);let i=this.pending.get(e)||[];i.push(t),this.pending.set(e,i)}persistIntent(e,t){if(e)try{let r=new Set(u());t?r.add(e):r.delete(e),localStorage.setItem(d,JSON.stringify([...r]))}catch{}}_canOpen(e,t){return!(!e||this._servedBy(t))&&!!e.full}open(e,t){if(this.has(e))return;let r=function(){try{return localStorage.getItem("9remote_deviceId")}catch{return null}}();if(!this._canOpen(t,e)||!r)return;this.persistIntent(e,!0);let n=(0,o.Cj)(t.full);n&&(0,c.LG)(e,{tail:n});let i=t=>this._patch(e,t),s=!1,d=new a.g({tunnelUrl:null,localIp:null,namespace:"",socketOptions:{auth:{apiKey:e,tempKey:null,deviceId:r}},apiKey:e,deviceId:r,tempKey:null,onConnect:t=>{clearTimeout(this._connectTimers.get(e)),this._connectTimers.delete(e),i({status:"online",lastSeenAt:Date.now(),updating:!1,approval:null});let r=this.pending.get(e);if(r)for(let n of(this.pending.delete(e),r))try{n(t)}catch{}s||(s=!0,this._bindBus(t,e)),this._ready(t,e)},onDisconnect:()=>{this.pending.delete(e),i({status:"offline",lastSeenAt:Date.now()})}},{enableWebRTC:l.eR.enableWebRTC,enableTurn:l.eR.enableTurn,apiKey:e,onTransportChange:e=>i({carrier:e||"ws"})});this.buses.set(e,d),i({status:"connecting"}),this._connectTimers.set(e,setTimeout(()=>this._onConnectTimeout(e),15e3)),d.connect()}_onConnectTimeout(e){this._connectTimers.delete(e),this.buses.has(e)&&this._hostOf(e)?.status==="connecting"&&(this._patch(e,{status:"offline"}),this._hostOf(e)?.approval!=="pending"&&this.persistIntent(e,!1))}drop(e){let t=this.buses.get(e);t&&(t.disconnect(),this.buses.delete(e)),clearTimeout(this._connectTimers.get(e)),this._connectTimers.delete(e),this.pending.delete(e)}retry(e){this.drop(e),this.open(e,this._hostOf(e))}closeAll(){for(let e of this.buses.values())e.disconnect();for(let e of(this.buses.clear(),this._connectTimers.values()))clearTimeout(e);this._connectTimers.clear(),this.pending.clear(),this.disarmProbe()}armProbe(){this._probeTimer||(this._probeTimer=setInterval(()=>{document.hidden||this.probeOnce()},6e4),this._probeVisible=()=>{"visible"===document.visibilityState&&this.probeOnce()},document.addEventListener("visibilitychange",this._probeVisible))}disarmProbe(){this._probeTimer&&(clearInterval(this._probeTimer),this._probeTimer=null,document.removeEventListener("visibilitychange",this._probeVisible),this._probeVisible=null)}probeOnce(){let e=this._probeTargets().filter(e=>!this.has(e));e.length&&fetch("/api/host-status",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({heads:e})}).then(e=>e.ok?e.json():null).then(t=>{for(let r of e){if(this.has(r))continue;let e=t?.hosts?.[r];e&&this._patch(r,{status:e.online?"online":"offline"})}}).catch(()=>{})}}var h=r(51627),m=r(31408),f=r(27520);let g="9remote_fleet_cache",y=null;function _(e){clearTimeout(y),y=setTimeout(()=>{y=null;let t={};for(let[r,n]of Object.entries(e().hosts))t[r]={label:n.label,platform:n.platform,version:n.version,sessions:n.sessions,workspaces:n.workspaces,statusMap:n.statusMap,lastSeenAt:n.lastSeenAt};try{localStorage.setItem(g,JSON.stringify(t))}catch{}},1e3)}let b=e=>({key:e,full:null,label:"",status:"offline",carrier:"ws",sessions:[],workspaces:[],statusMap:{},platform:null,version:null,lastSeenAt:null,updateAvailable:null,canSelfUpdate:!1,updating:!1,approval:null,remoteAvailable:!1,mobileAvailable:!1,isCodespaces:!1,mobileDeviceCount:0}),w=(e,t)=>A.getState()._patchHost(e,t),k=(e,t)=>{e?.emit("getSessions",e=>{Array.isArray(e)&&w(t,{sessions:e})}),e?.emit("getWorkspaces",e=>{Array.isArray(e)&&w(t,{workspaces:e})}),e?.emit("getStatusState")},v=null,A=(0,n.v)((e,t)=>({hosts:{},currentKey:null,sync(r,n){let i=n||"",s=new Map;for(let e of r){let t=(0,o.Uo)(e.key);t&&!s.has(t)&&s.set(t,{full:e.key,label:e.label||""})}i&&!s.has(i)&&s.set(i,{full:null,label:""});let a=[...s.keys()].filter(e=>e!==i).slice(0,8),l=new Set(a);for(let e of[...v.buses.keys()])l.has(e)||v.drop(e);let c=function(){try{return JSON.parse(localStorage.getItem(g)||"{}")}catch{return{}}}(),d=new Set(u()),p=!1;try{p="1"===sessionStorage.getItem("9remote_manual_disconnect")}catch{}for(let r of(e(e=>{let t={};for(let[r,n]of s){let s=e.hosts[r]||{...b(r),...c[r]||{}};t[r]={...s,key:r,full:n.full,label:n.label||s.label,status:r===i?p?"offline":"full":l.has(r)&&("online"===s.status||"connecting"===s.status)?s.status:"offline"}}return{hosts:t,currentKey:i}}),a))d.has(r)&&v.open(r,t().hosts[r]);v.probeOnce(),v.armProbe()},_patchHost(r,n){e(e=>{let t=e.hosts[r];return t?{hosts:{...e.hosts,[r]:{...t,...n}}}:e}),_(t)},applyStatusState(r,n){let i=n||{};e(e=>{let t=e.hosts[r];return!t||(0,m.h3)(t.statusMap,i)?e:{hosts:{...e.hosts,[r]:{...t,statusMap:i}}}}),_(t)},applyStatusChange(r,{sessionId:n,state:i,tool:s,since:a,conversationId:l}={}){n&&(e(e=>{let t=e.hosts[r];if(!t)return e;let o=t.statusMap[n],c={state:i,tool:void 0!==s?s:o?.tool,since:a,...l||o?.conversationId?{conversationId:l||o?.conversationId}:{}};return(0,m.dI)(o,c)?e:{hosts:{...e.hosts,[r]:{...t,statusMap:{...t.statusMap,[n]:c}}}}}),_(t))},applyStatusCleared(r,n){n&&(e(e=>{let t=e.hosts[r],i=t?.statusMap?.[n];return i?{hosts:{...e.hosts,[r]:{...t,statusMap:{...t.statusMap,[n]:{...i,state:"idle"}}}}}:e}),_(t))},_closeHost(e,r={}){v.drop(e),t()._patchHost(e,{status:"offline",lastSeenAt:Date.now(),approval:null,...r})},ensureHost(e){e===t().currentKey||v.has(e)||v.open(e,t().hosts[e])},connectHost(e){t().retryHost(e)},requestHostUpdate(e,r="update"){let n=t().hosts[e];if(!n||n.updating)return;let i={updating:!0,updateAvailable:null};if("full"===n.status){let n=s.d.getState(),a=n.busRef?.current;if(!a?.connected)return void(0,f.Lq)("update",`request ${r} on ACTIVE ${e} dropped: bus not connected`);t()._patchHost(e,i),n.protocolRef?.current?.setUpdating?.(!0),a.emit("restart"===r?"requestRestart":"requestUpdate")}else t()._patchHost(e,i),v.pmOf(e)?.setUpdating?.(!0),v.whenReady(e,t=>{v.pmOf(e)?.setUpdating?.(!0),(0,f.Lq)("update",`request ${r} sent on fleet bus ${e}`),t.emit("restart"===r?"requestRestart":"requestUpdate")});setTimeout(()=>{t().hosts[e]?.updating&&t()._patchHost(e,{updating:!1})},12e4)},setAutoConnect(e,t){v.persistIntent(e,t)},retryHost(e){v.retry(e)},disconnectHost(e){v.persistIntent(e,!1),t()._closeHost(e)},closeAll(){v.closeAll()}}));function S(e){return v?.busOf(e)||null}function T(e){return v?.pmOf(e)||null}function x(e,t){v?.whenReady(e,t)}v=new p({hostOf:e=>A.getState().hosts[e],patch:w,bindBus:(e,t)=>{e.on("connect",()=>{e.emit("device:clientReady"),k(e,t)}),e.on("serverInfo",e=>{let r=!!A.getState().hosts[t]?.updating;w(t,{platform:e?.platform||null,isCodespaces:!!e?.isCodespaces,version:e?.version||null,updateAvailable:!r&&(0,h.U)(e?.updateAvailable?.version,e?.version)?e.updateAvailable:null,canSelfUpdate:!!e?.canSelfUpdate,remoteAvailable:!!e?.remoteAvailable,mobileAvailable:!!e?.mobileAvailable})}),e.on("statusState",e=>A.getState().applyStatusState(t,e)),e.on("statusChange",e=>A.getState().applyStatusChange(t,e)),e.on("statusCleared",e=>A.getState().applyStatusCleared(t,e)),e.on("sessionsChanged",()=>k(e,t)),e.on("workspacesChanged",()=>k(e,t)),e.on("session-renamed",()=>k(e,t)),e.on("sessionClosed",r=>{r&&i.B.getState().closeSession(r),k(e,t)}),e.on("device:pendingApproval",()=>w(t,{approval:"pending"})),e.on("device:approved",()=>w(t,{approval:null})),e.on("device:rejected",()=>A.getState()._closeHost(t,{approval:"rejected"})),e.on("device:tailRejected",()=>A.getState()._closeHost(t))},ready:(e,t)=>{e.emit("device:clientReady"),k(e,t)},probeTargets:()=>{let e=A.getState(),t=new Set(u());return Object.values(e.hosts).filter(r=>r.key!==e.currentKey&&t.has(r.key)).map(e=>e.key)},servedBy:e=>!!e&&e===A.getState().currentKey,servedBus:()=>{let e=s.d.getState();return e.connected?e.busRef?.current||e.bus:null}})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6669],{457:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]])},894:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},1578:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]])},1838:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]])},1916:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},2031:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])},3382:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},5370:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]])},6504:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]])},6534:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]])},6830:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])},9271:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]])},9560:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])},10194:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]])},10550:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]])},10949:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("chevrons-down-up",[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]])},10998:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]])},11384:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},11990:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]])},12283:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("panel-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]])},12925:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]])},13374:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},14251:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},14797:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},15504:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])},17406:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("columns-2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]])},17568:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},17836:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]])},17909:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]])},18272:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]])},19307:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},19621:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},20021:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])},20178:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},20248:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},20478:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},21878:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},25406:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]])},29260:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("corner-down-left",[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]])},29418:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]])},29967:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},31258:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("clipboard-paste",[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]])},31805:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]])},33109:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]])},34271:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},34582:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},34969:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},35723:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("hand",[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]])},37266:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]])},38177:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("share",[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]])},38781:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("mic-off",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]])},39831:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]])},40081:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]])},40789:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]])},41046:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("hard-drive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},41098:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("laptop",[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]])},42685:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},43959:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},44159:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]])},46431:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},48088:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},48433:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]])},49387:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},49553:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("delete",[["path",{d:"M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",key:"1yo7s0"}],["path",{d:"m12 9 6 6",key:"anjzzh"}],["path",{d:"m18 9-6 6",key:"1fp51s"}]])},50068:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},50211:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},51328:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("wallpaper",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["path",{d:"m9 17 6.1-6.1a2 2 0 0 1 2.81.01L22 15",key:"1sl52q"}],["circle",{cx:"8",cy:"9",r:"2",key:"gjzl9d"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]])},52715:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]])},54453:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},56023:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("send-horizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]])},57717:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},58450:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},58573:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("volume-x",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},59311:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},59437:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},59711:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},59833:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("pin-off",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]])},59907:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]])},60151:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},60659:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},60919:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]])},61659:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},64342:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},64446:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]])},64570:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},64629:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},64871:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},65062:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("replace",[["path",{d:"M14 4a1 1 0 0 1 1-1",key:"dhj8ez"}],["path",{d:"M15 10a1 1 0 0 1-1-1",key:"1mnyi5"}],["path",{d:"M21 4a1 1 0 0 0-1-1",key:"sfs9ap"}],["path",{d:"M21 9a1 1 0 0 1-1 1",key:"mp6qeo"}],["path",{d:"m3 7 3 3 3-3",key:"x25e72"}],["path",{d:"M6 10V5a2 2 0 0 1 2-2h2",key:"15xut4"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}]])},66687:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},67236:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},67494:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},67519:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},68395:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]])},68859:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("power-off",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},69725:(e,a,t)=>{t.d(a,{A:()=>p});var h=t(1521);let y=(...e)=>e.filter((e,a,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===a).join(" ").trim(),d=e=>{let a=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,a,t)=>t?t.toUpperCase():a.toLowerCase());return a.charAt(0).toUpperCase()+a.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let k=(0,h.forwardRef)(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:d,className:k="",children:p,iconNode:c,...r},A)=>(0,h.createElement)("svg",{ref:A,...l,width:a,height:a,stroke:e,strokeWidth:d?24*Number(t)/Number(a):t,className:y("lucide",k),...!p&&!(e=>{for(let a in e)if(a.startsWith("aria-")||"role"===a||"title"===a)return!0;return!1})(r)&&{"aria-hidden":"true"},...r},[...c.map(([e,a])=>(0,h.createElement)(e,a)),...Array.isArray(p)?p:[p]])),p=(e,a)=>{let t=(0,h.forwardRef)(({className:t,...l},p)=>(0,h.createElement)(k,{ref:p,iconNode:a,className:y(`lucide-${d(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,t),...l}));return t.displayName=d(e),t}},70362:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},70453:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},72147:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]])},73243:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]])},74739:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},76621:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]])},79376:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},81610:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]])},86877:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]])},87030:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},87821:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},87831:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},88433:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]])},88768:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]])},88793:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},89317:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]])},90612:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]])},92165:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},93285:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("qr-code",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]])},93292:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},93354:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]])},94304:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("log-in",[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]])},95188:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},97038:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},98173:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]])},99707:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(69725).A)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6739],{46739:(t,e,s)=>{s.r(e),s.d(e,{SignalingClient:()=>o});var i=s(86129),n=s(52159),r=s(27520);let h={agent:"client",client:"agent"};class o{static{this.id="sig"}constructor({url:t,role:e,roomId:s,apiKey:n,from:r,onReady:h,pingMs:o=25e3}){this._url=`${t}/ws/${encodeURIComponent(s)}?role=${e}&apiKey=${encodeURIComponent(n)}&from=${encodeURIComponent(r||e)}`,this._from=r||e,this._onReady=h||null,this._role=e,this._roomId=s,this._pingMs=o,this._ws=null,this._handler=null,this._pingTimer=null,this._reconnectTimer=null,this._attempt=0,this._preOpenFails=0,this._openedOnce=!1,this._closed=!1,this._state=i.Of.idle,this._lastRetryNowAt=0,this._connectingSince=0,this._retryNowTimer=null}get ready(){return this._ws?.readyState===1}connect(){this._closed=!1,this._open()}send(t){if((0,n.c)("transport",`[sig] send ${t.type} ready=${this.ready}`),!this.ready)return!1;try{return this._ws.send(JSON.stringify({to:t.to||h[this._role],from:this._from,type:t.type,payload:"offer"===t.type?{sdp:t.sdp}:"answer"===t.type?{sdp:t.sdp,pub:t.pub,xpub:t.xpub,sig:t.sig}:"ice"===t.type?{candidate:t.candidate,mid:t.mid}:t})),!0}catch{return!1}}on(t){this._handler=t}off(){this._handler=null}retryNow(t="?"){if(this._closed||this.ready)return;let e=Date.now(),s=e-this._lastRetryNowAt;if(s<3e3){(0,r.Lq)("switch",`sig retryNow DEFER by=${t} (throttled)`),this._scheduleRetryNow(3e3-s,t);return}if(this._state===i.Of.connecting&&e-this._connectingSince<5e3){(0,r.Lq)("switch",`sig retryNow DEFER by=${t} (handshake ${e-this._connectingSince}ms old)`),this._scheduleRetryNow(5e3-(e-this._connectingSince),t);return}(0,r.Lq)("switch",`sig retryNow GO by=${t}`),this._lastRetryNowAt=e,this._attempt=0,this._preOpenFails=0,clearTimeout(this._reconnectTimer),this._reconnectTimer=null;let n=this._ws;this._ws=null;try{n?.close()}catch{}this._open()}_scheduleRetryNow(t,e="?"){this._retryNowTimer||(this._retryNowTimer=setTimeout(()=>{this._retryNowTimer=null,this.retryNow(`${e}-deferred`)},t))}disconnect(){this._closed=!0,this._stopPing(),clearTimeout(this._retryNowTimer),this._retryNowTimer=null,clearTimeout(this._reconnectTimer);try{this._ws?.close()}catch{}this._ws=null,this._setState(i.Of.closed)}_open(){this._setState(i.Of.connecting),this._connectingSince=Date.now();let t=new WebSocket(this._url);this._ws=t,t.addEventListener("open",()=>{this._attempt=0,this._preOpenFails=0,this._openedOnce=!0,this._setState(i.Of.open),this._startPing(),(0,n.c)("transport",`[sig] ${this._role} connected room=${this._roomId}`),(0,r.Lq)("switch",`sig open (after ${this._attempt} retries)`),this._onReady?.()}),t.addEventListener("message",t=>{let e;if("pong"!==t.data){try{e=JSON.parse(t.data)}catch{return}(0,n.c)("transport",`[sig] recv ${e.type} from=${e.from}`),this._handler?.({type:e.type,from:e.from,...e.payload})}}),t.addEventListener("close",()=>{this._ws===t&&this._onClose()}),t.addEventListener("error",()=>{this._ws===t&&this._onClose()})}_onClose(){if(this._stopPing(),this._ws=null,this._setState(i.Of.closed),!this._closed){if(!this._openedOnce&&(this._preOpenFails++,this._preOpenFails>5)){(0,n.c)("transport",`[sig] ${this._role} giving up — ${this._preOpenFails-1} pre-open failures`),(0,r.Lq)("switch",`sig GAVE UP (${this._preOpenFails-1} pre-open failures) — retryNow is the only way back`);return}this._scheduleReconnect()}}_scheduleReconnect(){if(this._closed)return;this._attempt++;let t=Math.min(1e3*2**(this._attempt-1),3e4)+1e3*Math.random();(0,n.c)("transport",`[sig] ${this._role} reconnect in ${t}ms (attempt ${this._attempt})`),(0,r.Lq)("switch",`sig reconnect in ${Math.round(t)}ms (attempt ${this._attempt})`),this._reconnectTimer=setTimeout(()=>{this._closed||this._open()},t)}_startPing(){this._stopPing(),this._pingTimer=setInterval(()=>{if(this.ready)try{this._ws.send("ping")}catch{}},this._pingMs)}_stopPing(){this._pingTimer&&(clearInterval(this._pingTimer),this._pingTimer=null)}_setState(t){this._state=t}}}}]);