@xenon-device-management/xenon 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/README.md +446 -0
  2. package/lib/package.json +207 -0
  3. package/lib/public/assets/Layouts-7IT8aFLI.js +11 -0
  4. package/lib/public/assets/Layouts-DPMls9vh.css +1 -0
  5. package/lib/public/assets/ai-settings-BbnfgdEx.js +11 -0
  6. package/lib/public/assets/apps-CRMrI4_p.js +16 -0
  7. package/lib/public/assets/apps-CcM77dgg.css +1 -0
  8. package/lib/public/assets/badge-B1nKs8zj.css +1 -0
  9. package/lib/public/assets/badge-CSvl5xIU.js +11 -0
  10. package/lib/public/assets/button-CJlKn4PZ.css +1 -0
  11. package/lib/public/assets/button-CvLaGFYj.js +26 -0
  12. package/lib/public/assets/calendar-6w-D6Oaw.js +6 -0
  13. package/lib/public/assets/clock-DcdeWBPr.js +6 -0
  14. package/lib/public/assets/cpu-DiSoXT9n.js +6 -0
  15. package/lib/public/assets/device-explorer-CajM63OJ.js +193 -0
  16. package/lib/public/assets/device-explorer-CxdUAoTL.css +1 -0
  17. package/lib/public/assets/index-ByQwMN5T.js +174 -0
  18. package/lib/public/assets/index-C1DBaoSh.js +1 -0
  19. package/lib/public/assets/index-qzCez_kk.css +1 -0
  20. package/lib/public/assets/lock-B23ibZmo.js +6 -0
  21. package/lib/public/assets/maintenance-settings-CirzA6yG.js +6 -0
  22. package/lib/public/assets/mouse-pointer-2-Cz76SHFb.js +6 -0
  23. package/lib/public/assets/plus-BBwlIevt.js +6 -0
  24. package/lib/public/assets/session-dashboard-C2k7FFv_.css +1 -0
  25. package/lib/public/assets/session-dashboard-HPDtwPOZ.js +62 -0
  26. package/lib/public/assets/settings-DrZsZwdc.js +1 -0
  27. package/lib/public/assets/trash-2-DQpvzJec.js +6 -0
  28. package/lib/public/assets/useSocket-Dxsqae2a.js +16 -0
  29. package/lib/public/assets/webhook-settings-CDPgsgkb.css +1 -0
  30. package/lib/public/assets/webhook-settings-Cp-B4Nrw.js +1 -0
  31. package/lib/public/assets/zap-DovP6iow.js +6 -0
  32. package/lib/public/favicon.ico +0 -0
  33. package/lib/public/favicon.png +0 -0
  34. package/lib/public/favicon.svg +9 -0
  35. package/lib/public/index.html +46 -0
  36. package/lib/public/logo.svg +17 -0
  37. package/lib/public/logo192.png +0 -0
  38. package/lib/public/logo512.png +0 -0
  39. package/lib/public/manifest.json +25 -0
  40. package/lib/public/robots.txt +3 -0
  41. package/lib/schema.json +348 -0
  42. package/lib/src/InternalHttpClient.js +212 -0
  43. package/lib/src/PluginContext.js +29 -0
  44. package/lib/src/XenonCapabilityManager.js +199 -0
  45. package/lib/src/app/index.js +167 -0
  46. package/lib/src/app/routers/apps.js +79 -0
  47. package/lib/src/app/routers/config.js +131 -0
  48. package/lib/src/app/routers/control.js +835 -0
  49. package/lib/src/app/routers/dashboard.js +301 -0
  50. package/lib/src/app/routers/grid.js +352 -0
  51. package/lib/src/app/routers/reservation.js +190 -0
  52. package/lib/src/app/routers/webhook.js +83 -0
  53. package/lib/src/app/swagger-docs.js +203 -0
  54. package/lib/src/app/swagger.js +366 -0
  55. package/lib/src/chromeUtils.js +148 -0
  56. package/lib/src/commands/handle.js +19 -0
  57. package/lib/src/commands/index.js +8 -0
  58. package/lib/src/config.js +73 -0
  59. package/lib/src/dashboard/asset-manager.js +84 -0
  60. package/lib/src/dashboard/commands.js +284 -0
  61. package/lib/src/dashboard/event-manager.js +699 -0
  62. package/lib/src/dashboard/services/app-service.js +134 -0
  63. package/lib/src/dashboard/services/failure-analysis-service.js +173 -0
  64. package/lib/src/dashboard/services/session-service.js +113 -0
  65. package/lib/src/data-service/CircuitBreaker.js +83 -0
  66. package/lib/src/data-service/config-service.js +155 -0
  67. package/lib/src/data-service/db.js +122 -0
  68. package/lib/src/data-service/device-service.js +320 -0
  69. package/lib/src/data-service/device-store.interface.js +2 -0
  70. package/lib/src/data-service/device-store.js +345 -0
  71. package/lib/src/data-service/pending-sessions-service.js +25 -0
  72. package/lib/src/data-service/pluginArgs.js +25 -0
  73. package/lib/src/data-service/prisma-service.js +31 -0
  74. package/lib/src/data-service/prisma-store.js +385 -0
  75. package/lib/src/data-service/queue-service.js +150 -0
  76. package/lib/src/data-service/web-config-service.js +130 -0
  77. package/lib/src/device-managers/AndroidDeviceManager.js +1155 -0
  78. package/lib/src/device-managers/ChromeDriverManager.js +68 -0
  79. package/lib/src/device-managers/HealthMonitorService.js +325 -0
  80. package/lib/src/device-managers/IOSDeviceManager.js +351 -0
  81. package/lib/src/device-managers/NodeDevices.js +82 -0
  82. package/lib/src/device-managers/android/AndroidStreamService.js +370 -0
  83. package/lib/src/device-managers/android/DeviceLockManager.js +45 -0
  84. package/lib/src/device-managers/cloud/CapabilityManager.js +26 -0
  85. package/lib/src/device-managers/cloud/Devices.js +86 -0
  86. package/lib/src/device-managers/iOSTracker.js +44 -0
  87. package/lib/src/device-managers/index.js +89 -0
  88. package/lib/src/device-managers/ios/IOSDiscoveryService.js +268 -0
  89. package/lib/src/device-managers/ios/IOSStreamService.js +893 -0
  90. package/lib/src/device-managers/ios/WDAClient.js +866 -0
  91. package/lib/src/device-utils.js +663 -0
  92. package/lib/src/enums/Capabilities.js +8 -0
  93. package/lib/src/enums/Cloud.js +11 -0
  94. package/lib/src/enums/Platform.js +9 -0
  95. package/lib/src/enums/SessionType.js +9 -0
  96. package/lib/src/enums/SocketEvents.js +15 -0
  97. package/lib/src/helpers/UniversalMjpegProxy.js +273 -0
  98. package/lib/src/helpers/index.js +229 -0
  99. package/lib/src/index.js +95 -0
  100. package/lib/src/interceptors/CommandInterceptor.js +524 -0
  101. package/lib/src/interfaces/ICloudManager.js +2 -0
  102. package/lib/src/interfaces/IDevice.js +2 -0
  103. package/lib/src/interfaces/IDeviceFilterOptions.js +2 -0
  104. package/lib/src/interfaces/IDeviceManager.js +2 -0
  105. package/lib/src/interfaces/IOptions.js +2 -0
  106. package/lib/src/interfaces/IPluginArgs.js +55 -0
  107. package/lib/src/interfaces/ISessionCapability.js +2 -0
  108. package/lib/src/logger.js +225 -0
  109. package/lib/src/plugin.js +244 -0
  110. package/lib/src/prisma.js +12 -0
  111. package/lib/src/profiling/AndroidAppProfiler.js +213 -0
  112. package/lib/src/proxy/wd-command-proxy.js +221 -0
  113. package/lib/src/scripts/generate-database-migration.js +59 -0
  114. package/lib/src/scripts/initialize-database.js +55 -0
  115. package/lib/src/scripts/install-go-ios.js +66 -0
  116. package/lib/src/scripts/prepare-prisma.js +89 -0
  117. package/lib/src/services/AICommandService.js +143 -0
  118. package/lib/src/services/AIService.js +466 -0
  119. package/lib/src/services/CleanupService.js +141 -0
  120. package/lib/src/services/EventBus.js +74 -0
  121. package/lib/src/services/InspectorService.js +395 -0
  122. package/lib/src/services/MetricsService.js +134 -0
  123. package/lib/src/services/NetworkConditioningService.js +173 -0
  124. package/lib/src/services/NotificationService.js +163 -0
  125. package/lib/src/services/RequestLogService.js +252 -0
  126. package/lib/src/services/ResourceIsolationService.js +122 -0
  127. package/lib/src/services/SecurityService.js +120 -0
  128. package/lib/src/services/ServerManager.js +284 -0
  129. package/lib/src/services/SessionHeartbeatService.js +158 -0
  130. package/lib/src/services/SessionLifecycleService.js +572 -0
  131. package/lib/src/services/SocketClient.js +71 -0
  132. package/lib/src/services/SocketServer.js +87 -0
  133. package/lib/src/services/TracingService.js +132 -0
  134. package/lib/src/services/VideoPipelineService.js +220 -0
  135. package/lib/src/services/healing/FuzzyXmlHealingProvider.js +333 -0
  136. package/lib/src/services/healing/HealEtalonService.js +98 -0
  137. package/lib/src/services/healing/HealedLocatorGenerator.js +132 -0
  138. package/lib/src/services/healing/HealingOrchestrator.js +165 -0
  139. package/lib/src/services/healing/LlmHealingProvider.js +77 -0
  140. package/lib/src/services/healing/OcrHealingProvider.js +119 -0
  141. package/lib/src/services/healing/ResilioTreeHealingProvider.js +100 -0
  142. package/lib/src/services/healing/VisualAiHealingProvider.js +90 -0
  143. package/lib/src/services/healing/types.js +12 -0
  144. package/lib/src/services/omni-vision/OmniVisionService.js +718 -0
  145. package/lib/src/services/omni-vision/VisionAssertionService.js +68 -0
  146. package/lib/src/sessions/CloudSession.js +42 -0
  147. package/lib/src/sessions/LocalSession.js +313 -0
  148. package/lib/src/sessions/RemoteSession.js +287 -0
  149. package/lib/src/sessions/SessionManager.js +238 -0
  150. package/lib/src/sessions/XenonSession.js +44 -0
  151. package/lib/src/types/CLIArgs.js +2 -0
  152. package/lib/src/types/CloudArgs.js +2 -0
  153. package/lib/src/types/CloudSchema.js +131 -0
  154. package/lib/src/types/DeviceType.js +2 -0
  155. package/lib/src/types/DeviceUpdate.js +2 -0
  156. package/lib/src/types/IOSDevice.js +2 -0
  157. package/lib/src/types/Platform.js +2 -0
  158. package/lib/src/types/SessionStatus.js +11 -0
  159. package/lib/src/validators/CapabilityValidator.js +93 -0
  160. package/lib/test/e2e/android/conf.spec.js +43 -0
  161. package/lib/test/e2e/android/conf2.spec.js +44 -0
  162. package/lib/test/e2e/android/conf3.spec.js +44 -0
  163. package/lib/test/e2e/e2ehelper.js +113 -0
  164. package/lib/test/e2e/hubnode/forward-request.spec.js +224 -0
  165. package/lib/test/e2e/hubnode/hubnode.spec.js +214 -0
  166. package/lib/test/e2e/ios/conf1.spec.js +39 -0
  167. package/lib/test/e2e/ios/conf2.spec.js +39 -0
  168. package/lib/test/e2e/plugin-harness.js +236 -0
  169. package/lib/test/e2e/plugin.spec.js +97 -0
  170. package/lib/test/e2e/telemetry_verification.spec.js +83 -0
  171. package/lib/test/e2e/video-recording-test.spec.js +63 -0
  172. package/lib/test/helpers/test-container.js +112 -0
  173. package/lib/test/integration/androidDevices.spec.js +137 -0
  174. package/lib/test/integration/cliArgs.js +73 -0
  175. package/lib/test/integration/ios/01iOSSimulator.spec.js +291 -0
  176. package/lib/test/integration/ios/02iOSDevices.spec.js +75 -0
  177. package/lib/test/integration/testHelpers.js +74 -0
  178. package/lib/test/unit/AndroidDeviceManager.spec.js +178 -0
  179. package/lib/test/unit/ChromeDriverManager.spec.js +26 -0
  180. package/lib/test/unit/CleanupService.spec.js +21 -0
  181. package/lib/test/unit/DeviceModel.spec.js +157 -0
  182. package/lib/test/unit/FuzzyXmlHealingProvider.test.js +294 -0
  183. package/lib/test/unit/GetAdbOriginal.js +42 -0
  184. package/lib/test/unit/HealingCascade.test.js +128 -0
  185. package/lib/test/unit/IOSDeviceManager.spec.js +261 -0
  186. package/lib/test/unit/RemoteIOs.spec.js +78 -0
  187. package/lib/test/unit/ResilioTreeHealingProvider.test.js +96 -0
  188. package/lib/test/unit/commands.spec.js +27 -0
  189. package/lib/test/unit/config.spec.js +27 -0
  190. package/lib/test/unit/device-service.spec.js +307 -0
  191. package/lib/test/unit/device-utils.spec.js +313 -0
  192. package/lib/test/unit/fixtures/device.config.js +4 -0
  193. package/lib/test/unit/fixtures/devices.js +89 -0
  194. package/lib/test/unit/helpers.spec.js +62 -0
  195. package/lib/test/unit/omni-vision.spec.js +100 -0
  196. package/lib/test/unit/plugin.spec.js +133 -0
  197. package/lib/tsconfig.tsbuildinfo +1 -0
  198. package/package.json +207 -0
  199. package/prisma/data.db +0 -0
  200. package/prisma/dev.db +0 -0
  201. package/prisma/dev.db-journal +0 -0
  202. package/prisma/migrations/20231011074725_initial_tables/migration.sql +47 -0
  203. package/prisma/migrations/20231226115334_update_session_log/migration.sql +2 -0
  204. package/prisma/migrations/20251204113710_add_video_recording_enabled/migration.sql +29 -0
  205. package/prisma/migrations/20251204132449_add_log_table/migration.sql +11 -0
  206. package/prisma/migrations/20251205050111_add_profiling_support/migration.sql +47 -0
  207. package/prisma/migrations/20251205050947_add_is_error_field/migration.sql +24 -0
  208. package/prisma/migrations/20260126201337_add_app_model/migration.sql +18 -0
  209. package/prisma/migrations/20260130115722_add_performance_trace_and_xenon_sync/migration.sql +2 -0
  210. package/prisma/migrations/20260130135114_add_device_models/migration.sql +57 -0
  211. package/prisma/migrations/20260130140655_make_systemport_optional/migration.sql +45 -0
  212. package/prisma/migrations/20260130140932_make_device_fields_optional/migration.sql +45 -0
  213. package/prisma/migrations/20260130141040_final_schema_fix/migration.sql +45 -0
  214. package/prisma/migrations/20260130143234_add_device_health_fields/migration.sql +4 -0
  215. package/prisma/migrations/20260130144921_add_failure_category/migration.sql +2 -0
  216. package/prisma/migrations/20260131151456_add_webhook_config/migration.sql +10 -0
  217. package/prisma/migrations/20260201094507_add_device_tags/migration.sql +11 -0
  218. package/prisma/migrations/20260201103410_add_managed_process/migration.sql +15 -0
  219. package/prisma/migrations/20260201140637_add_web_config/migration.sql +22 -0
  220. package/prisma/migrations/20260201162232_add_session_progress/migration.sql +2 -0
  221. package/prisma/migrations/20260201174231_add_total_healed_count/migration.sql +2 -0
  222. package/prisma/migrations/migration_lock.toml +3 -0
  223. package/prisma/schema.prisma +210 -0
  224. package/schema.json +348 -0
  225. package/scripts/build-xenon.sh +32 -0
  226. package/scripts/dev/debug-gemini.ts +44 -0
  227. package/scripts/generate-types-from-schema.js +86 -0
  228. package/scripts/install-compatible-driver.js +39 -0
@@ -0,0 +1,16 @@
1
+ import{c as V,r as E}from"./index-ByQwMN5T.js";/**
2
+ * @license lucide-react v0.555.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const le=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],ft=V("camera",le);/**
7
+ * @license lucide-react v0.555.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const de=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],lt=V("chevron-right",de);/**
12
+ * @license lucide-react v0.555.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const pe=[["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"}]],dt=V("hard-drive",pe);function ye(n){if(typeof n!="number")throw new TypeError("Expected a number");const e=n>0?Math.floor:Math.ceil;return{days:e(n/864e5),hours:e(n/36e5)%24,minutes:e(n/6e4)%60,seconds:e(n/1e3)%60,milliseconds:e(n)%1e3,microseconds:e(n*1e3)%1e3,nanoseconds:e(n*1e6)%1e3}}const me=(n,e)=>e===1?n:`${n}s`,ge=1e-7;function pt(n,e={}){if(!Number.isFinite(n))throw new TypeError("Expected a finite number");e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=!1,e.verbose=!1),e.compact&&(e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);const t=[],s=(o,c)=>{const a=Math.floor(o*10**c+ge);return(Math.round(a)/10**c).toFixed(c)},i=(o,c,a,u)=>{if((t.length===0||!e.colonNotation)&&o===0&&!(e.colonNotation&&a==="m"))return;u=(u||o||"0").toString();let f,d;if(e.colonNotation){f=t.length>0?":":"",d="";const _=u.includes(".")?u.split(".")[0].length:u.length,fe=t.length>0?2:1;u="0".repeat(Math.max(0,fe-_))+u}else f="",d=e.verbose?" "+me(c,o):a;t.push(f+u+d)},r=ye(n);if(i(Math.trunc(r.days/365),"year","y"),i(r.days%365,"day","d"),i(r.hours,"hour","h"),i(r.minutes,"minute","m"),e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&n<1e3)if(i(r.seconds,"second","s"),e.formatSubMilliseconds)i(r.milliseconds,"millisecond","ms"),i(r.microseconds,"microsecond","µs"),i(r.nanoseconds,"nanosecond","ns");else{const o=r.milliseconds+r.microseconds/1e3+r.nanoseconds/1e6,c=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,a=o>=1?Math.round(o):Math.ceil(o),u=c?o.toFixed(c):a;i(Number.parseFloat(u),"millisecond","ms",u)}else{const o=n/1e3%60,c=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,a=s(o,c),u=e.keepDecimalsOnWholeSeconds?a:a.replace(/\.0+$/,"");i(Number.parseFloat(u),"second","s",u)}if(t.length===0)return"0"+(e.verbose?" milliseconds":"ms");if(e.compact)return t[0];if(typeof e.unitCount=="number"){const o=e.colonNotation?"":" ";return t.slice(0,Math.max(e.unitCount,1)).join(o)}return e.colonNotation?t.join(""):t.join(" ")}const g=Object.create(null);g.open="0";g.close="1";g.ping="2";g.pong="3";g.message="4";g.upgrade="5";g.noop="6";const R=Object.create(null);Object.keys(g).forEach(n=>{R[g[n]]=n});const P={type:"error",data:"parser error"},G=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Z=typeof ArrayBuffer=="function",ee=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,H=({type:n,data:e},t,s)=>G&&e instanceof Blob?t?s(e):Y(e,s):Z&&(e instanceof ArrayBuffer||ee(e))?t?s(e):Y(new Blob([e]),s):s(g[n]+(e||"")),Y=(n,e)=>{const t=new FileReader;return t.onload=function(){const s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(n)};function J(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let B;function _e(n,e){if(G&&n.data instanceof Blob)return n.data.arrayBuffer().then(J).then(e);if(Z&&(n.data instanceof ArrayBuffer||ee(n.data)))return e(J(n.data));H(n,!1,t=>{B||(B=new TextEncoder),e(B.encode(t))})}const X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<X.length;n++)k[X.charCodeAt(n)]=n;const be=n=>{let e=n.length*.75,t=n.length,s,i=0,r,o,c,a;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const u=new ArrayBuffer(e),f=new Uint8Array(u);for(s=0;s<t;s+=4)r=k[n.charCodeAt(s)],o=k[n.charCodeAt(s+1)],c=k[n.charCodeAt(s+2)],a=k[n.charCodeAt(s+3)],f[i++]=r<<2|o>>4,f[i++]=(o&15)<<4|c>>2,f[i++]=(c&3)<<6|a&63;return u},we=typeof ArrayBuffer=="function",$=(n,e)=>{if(typeof n!="string")return{type:"message",data:te(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:Ee(n.substring(1),e)}:R[t]?n.length>1?{type:R[t],data:n.substring(1)}:{type:R[t]}:P},Ee=(n,e)=>{if(we){const t=be(n);return te(t,e)}else return{base64:!0,data:n}},te=(n,e)=>{switch(e){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},se="",ve=(n,e)=>{const t=n.length,s=new Array(t);let i=0;n.forEach((r,o)=>{H(r,!1,c=>{s[o]=c,++i===t&&e(s.join(se))})})},ke=(n,e)=>{const t=n.split(se),s=[];for(let i=0;i<t.length;i++){const r=$(t[i],e);if(s.push(r),r.type==="error")break}return s};function Ae(){return new TransformStream({transform(n,e){_e(n,t=>{const s=t.length;let i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);const r=new DataView(i.buffer);r.setUint8(0,126),r.setUint16(1,s)}else{i=new Uint8Array(9);const r=new DataView(i.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let L;function A(n){return n.reduce((e,t)=>e+t.length,0)}function T(n,e){if(n[0].length===e)return n.shift();const t=new Uint8Array(e);let s=0;for(let i=0;i<e;i++)t[i]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),t}function Te(n,e){L||(L=new TextDecoder);const t=[];let s=0,i=-1,r=!1;return new TransformStream({transform(o,c){for(t.push(o);;){if(s===0){if(A(t)<1)break;const a=T(t,1);r=(a[0]&128)===128,i=a[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(A(t)<2)break;const a=T(t,2);i=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),s=3}else if(s===2){if(A(t)<8)break;const a=T(t,8),u=new DataView(a.buffer,a.byteOffset,a.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){c.enqueue(P);break}i=f*Math.pow(2,32)+u.getUint32(4),s=3}else{if(A(t)<i)break;const a=T(t,i);c.enqueue($(r?a:L.decode(a),e)),s=0}if(i===0||i>n){c.enqueue(P);break}}}})}const ne=4;function l(n){if(n)return Re(n)}function Re(n){for(var e in l.prototype)n[e]=l.prototype[e];return n}l.prototype.on=l.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};l.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};l.prototype.off=l.prototype.removeListener=l.prototype.removeAllListeners=l.prototype.removeEventListener=function(n,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+n];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+n],this};l.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+n],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,i=t.length;s<i;++s)t[s].apply(this,e)}return this};l.prototype.emitReserved=l.prototype.emit;l.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};l.prototype.hasListeners=function(n){return!!this.listeners(n).length};const x=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),p=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Oe="arraybuffer";function ie(n,...e){return e.reduce((t,s)=>(n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}const Ce=p.setTimeout,Se=p.clearTimeout;function N(n,e){e.useNativeTimers?(n.setTimeoutFn=Ce.bind(p),n.clearTimeoutFn=Se.bind(p)):(n.setTimeoutFn=p.setTimeout.bind(p),n.clearTimeoutFn=p.clearTimeout.bind(p))}const xe=1.33;function Ne(n){return typeof n=="string"?Be(n):Math.ceil((n.byteLength||n.size)*xe)}function Be(n){let e=0,t=0;for(let s=0,i=n.length;s<i;s++)e=n.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function re(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Le(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function De(n){let e={},t=n.split("&");for(let s=0,i=t.length;s<i;s++){let r=t[s].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}class Pe extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class K extends l{constructor(e){super(),this.writable=!1,N(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new Pe(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=$(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Le(e);return t.length?"?"+t:""}}class qe extends K{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};ke(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,ve(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=re()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let oe=!1;try{oe=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ie=oe;function Me(){}class Ue extends qe{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,r)=>{this.onError("xhr post error",i,r)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}}class m extends l{constructor(e,t,s){super(),this.createRequest=e,N(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const t=ie(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&s.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var i;s.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=m.requestsCount++,m.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Me,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete m.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}m.requestsCount=0;m.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Q);else if(typeof addEventListener=="function"){const n="onpagehide"in p?"pagehide":"unload";addEventListener(n,Q,!1)}}function Q(){for(let n in m.requests)m.requests.hasOwnProperty(n)&&m.requests[n].abort()}const Fe=function(){const n=ce({xdomain:!1});return n&&n.responseType!==null}();class Ve extends Ue{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=Fe&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new m(ce,this.uri(),e)}}function ce(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Ie))return new XMLHttpRequest}catch{}if(!e)try{return new p[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ae=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class He extends K{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=ae?{}:ie(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],i=t===e.length-1;H(s,this.supportsBinary,r=>{try{this.doWrite(s,r)}catch{}i&&x(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=re()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const D=p.WebSocket||p.MozWebSocket;class $e extends He{createSocket(e,t,s){return ae?new D(e,t,s):t?new D(e,t):new D(e)}doWrite(e,t){this.ws.send(t)}}class Ke extends K{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=Te(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=Ae();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const r=()=>{s.read().then(({done:c,value:a})=>{c||(this.onPacket(a),r())}).catch(c=>{})};r();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&x(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const We={websocket:$e,webtransport:Ke,polling:Ve},ze=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ye=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function q(n){if(n.length>8e3)throw"URI too long";const e=n,t=n.indexOf("["),s=n.indexOf("]");t!=-1&&s!=-1&&(n=n.substring(0,t)+n.substring(t,s).replace(/:/g,";")+n.substring(s,n.length));let i=ze.exec(n||""),r={},o=14;for(;o--;)r[Ye[o]]=i[o]||"";return t!=-1&&s!=-1&&(r.source=e,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=Je(r,r.path),r.queryKey=Xe(r,r.query),r}function Je(n,e){const t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function Xe(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,r){i&&(t[i]=r)}),t}const I=typeof addEventListener=="function"&&typeof removeEventListener=="function",O=[];I&&addEventListener("offline",()=>{O.forEach(n=>n())},!1);class b extends l{constructor(e,t){if(super(),this.binaryType=Oe,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const s=q(e);t.hostname=s.host,t.secure=s.protocol==="https"||s.protocol==="wss",t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=q(t.host).host);N(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(s=>{const i=s.prototype.name;this.transports.push(i),this._transportsByName[i]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=De(this.opts.query)),I&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},O.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=ne,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&b.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",b.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let s=0;s<this.writeBuffer.length;s++){const i=this.writeBuffer[s].data;if(i&&(t+=Ne(i)),s>0&&t>this._maxPayload)return this.writeBuffer.slice(0,s);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,x(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,i){if(typeof t=="function"&&(i=t,t=void 0),typeof s=="function"&&(i=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const r={type:e,data:t,options:s};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(b.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),I&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=O.indexOf(this._offlineEventListener);s!==-1&&O.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}b.protocol=ne;class Qe extends b{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;b.priorWebsocketSuccess=!1;const i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",d=>{if(!s)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;b.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(f(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const _=new Error("probe error");_.transport=t.name,this.emitReserved("upgradeError",_)}}))};function r(){s||(s=!0,f(),t.close(),t=null)}const o=d=>{const _=new Error("probe error: "+d);_.transport=t.name,r(),this.emitReserved("upgradeError",_)};function c(){o("transport closed")}function a(){o("socket closed")}function u(d){t&&d.name!==t.name&&r()}const f=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",c),this.off("close",a),this.off("upgrading",u)};t.once("open",i),t.once("error",o),t.once("close",c),this.once("close",a),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let je=class extends Qe{constructor(e,t={}){const s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>We[i]).filter(i=>!!i)),super(e,s)}};function Ge(n,e="",t){let s=n;t=t||typeof location<"u"&&location,n==null&&(n=t.protocol+"//"+t.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=t.protocol+n:n=t.host+n),/^(https?|wss?):\/\//.test(n)||(typeof t<"u"?n=t.protocol+"//"+n:n="https://"+n),s=q(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const r=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+r+":"+s.port+e,s.href=s.protocol+"://"+r+(t&&t.port===s.port?"":":"+s.port),s}const Ze=typeof ArrayBuffer=="function",et=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,he=Object.prototype.toString,tt=typeof Blob=="function"||typeof Blob<"u"&&he.call(Blob)==="[object BlobConstructor]",st=typeof File=="function"||typeof File<"u"&&he.call(File)==="[object FileConstructor]";function W(n){return Ze&&(n instanceof ArrayBuffer||et(n))||tt&&n instanceof Blob||st&&n instanceof File}function C(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,s=n.length;t<s;t++)if(C(n[t]))return!0;return!1}if(W(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return C(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&C(n[t]))return!0;return!1}function nt(n){const e=[],t=n.data,s=n;return s.data=M(t,e),s.attachments=e.length,{packet:s,buffers:e}}function M(n,e){if(!n)return n;if(W(n)){const t={_placeholder:!0,num:e.length};return e.push(n),t}else if(Array.isArray(n)){const t=new Array(n.length);for(let s=0;s<n.length;s++)t[s]=M(n[s],e);return t}else if(typeof n=="object"&&!(n instanceof Date)){const t={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=M(n[s],e));return t}return n}function it(n,e){return n.data=U(n.data,e),delete n.attachments,n}function U(n,e){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<e.length)return e[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let t=0;t<n.length;t++)n[t]=U(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=U(n[t],e));return n}const rt=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var h;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(h||(h={}));class ot{constructor(e){this.replacer=e}encode(e){return(e.type===h.EVENT||e.type===h.ACK)&&C(e)?this.encodeAsBinary({type:e.type===h.EVENT?h.BINARY_EVENT:h.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===h.BINARY_EVENT||e.type===h.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=nt(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}}class z extends l{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===h.BINARY_EVENT;s||t.type===h.BINARY_ACK?(t.type=s?h.EVENT:h.ACK,this.reconstructor=new ct(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(W(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(h[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===h.BINARY_EVENT||s.type===h.BINARY_ACK){const r=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const o=e.substring(r,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(e.charAt(t+1)==="/"){const r=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(r,t)}else s.nsp="/";const i=e.charAt(t+1);if(i!==""&&Number(i)==i){const r=t+1;for(;++t;){const o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(z.isPayloadValid(s.type,r))s.data=r;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case h.CONNECT:return j(t);case h.DISCONNECT:return t===void 0;case h.CONNECT_ERROR:return typeof t=="string"||j(t);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&rt.indexOf(t[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ct{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=it(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function j(n){return Object.prototype.toString.call(n)==="[object Object]"}const at=Object.freeze(Object.defineProperty({__proto__:null,Decoder:z,Encoder:ot,get PacketType(){return h}},Symbol.toStringTag,{value:"Module"}));function y(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const ht=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ue extends l{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[y(e,"open",this.onopen.bind(this)),y(e,"packet",this.onpacket.bind(this)),y(e,"error",this.onerror.bind(this)),y(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,i,r;if(ht.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const o={type:h.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const f=this.ids++,d=t.pop();this._registerAckCallback(f,d),o.id=f}const c=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,a=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;const i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===e&&this.sendBuffer.splice(c,1);t.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(r),t.apply(this,c)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{const r=(o,c)=>o?i(o):s(c);r.withError=!0,t.push(r),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...r)=>(this._queue[0],i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...r)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:h.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case h.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.EVENT:case h.BINARY_EVENT:this.onevent(e);break;case h.ACK:case h.BINARY_ACK:this.onack(e);break;case h.DISCONNECT:this.ondisconnect();break;case h.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...i){s||(s=!0,t.packet({type:h.ACK,id:e,data:i}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:h.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function w(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}w.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*n);n=Math.floor(e*10)&1?n+t:n-t}return Math.min(n,this.max)|0};w.prototype.reset=function(){this.attempts=0};w.prototype.setMin=function(n){this.ms=n};w.prototype.setMax=function(n){this.max=n};w.prototype.setJitter=function(n){this.jitter=n};class F extends l{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,N(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new w({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const i=t.parser||at;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new je(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const i=y(t,"open",function(){s.onopen(),e&&e()}),r=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),e?e(c):this.maybeReconnectOnOpen()},o=y(t,"error",r);if(this._timeout!==!1){const c=this._timeout,a=this.setTimeoutFn(()=>{i(),r(new Error("timeout")),t.close()},c);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(y(e,"ping",this.onping.bind(this)),y(e,"data",this.ondata.bind(this)),y(e,"error",this.onerror.bind(this)),y(e,"close",this.onclose.bind(this)),y(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){x(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new ue(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t)if(this.nsps[s].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const v={};function S(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=Ge(n,e.path||"/socket.io"),s=t.source,i=t.id,r=t.path,o=v[i]&&r in v[i].nsps,c=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let a;return c?a=new F(s,e):(v[i]||(v[i]=new F(s,e)),a=v[i]),t.query&&!e.query&&(e.query=t.queryKey),a.socket(t.path,e)}Object.assign(S,{Manager:F,Socket:ue,io:S,connect:S});const mt=()=>{const[n,e]=E.useState(null),[t,s]=E.useState(!1),i=E.useRef(new Map);E.useEffect(()=>{const o=window.location.origin,c=S(o,{path:"/socket.io",reconnection:!0});e(c),c.on("connect",()=>{console.log("[Socket] Connected to Hub"),s(!0),c.emit("register_dashboard")}),c.on("disconnect",()=>{console.log("[Socket] Disconnected from Hub"),s(!1)});const a=(u,f)=>{const d=i.current.get(u);d&&d.forEach(_=>_(f))};return c.onAny((u,f)=>{a(u,f)}),()=>{c.close()}},[]);const r=E.useCallback((o,c)=>{var a;return i.current.has(o)||i.current.set(o,[]),(a=i.current.get(o))==null||a.push(c),()=>{const u=i.current.get(o);u&&i.current.set(o,u.filter(f=>f!==c))}},[]);return{socket:n,isConnected:t,on:r}};export{lt as C,dt as H,ft as a,pt as p,mt as u};
@@ -0,0 +1 @@
1
+ .webhook-settings-container{padding:24px 40px;color:var(--text-body);font-family:Inter,sans-serif;max-width:800px;margin:0 auto;min-height:calc(100vh - 40px);background:var(--bg-page);position:relative;display:flex;flex-direction:column}.webhook-header{margin-bottom:24px;padding-bottom:24px;border-bottom:2px solid var(--border-visible)}.webhook-title{display:flex;align-items:center;gap:16px;margin-bottom:8px}.webhook-icon{color:var(--color-primary)}.webhook-title h2{font-size:2rem;font-weight:800;margin:0;color:var(--text-bright);letter-spacing:-.01em;text-transform:uppercase;font-family:Outfit,sans-serif}.webhook-subtitle{color:var(--text-dim);font-size:14px;margin:0;line-height:1.6}.webhook-list{display:flex;flex-direction:column;gap:16px;margin-bottom:40px}.webhook-card{background:var(--bg-surface);border:1px solid var(--border-visible);border-radius:6px;padding:24px 32px;transition:all .2s cubic-bezier(.16,1,.3,1);box-shadow:0 10px 30px #0000004d}.webhook-card:hover{border-color:var(--color-primary);background:#ffffff03;transform:translateY(-2px);box-shadow:0 20px 50px #00000080}.platform-tag{background:#0006;color:var(--color-primary);font-size:var(--fs-xs);font-weight:800;padding:2px 12px;border-radius:6px;text-transform:uppercase;letter-spacing:.1em;border:1px solid rgba(0,255,136,.2);font-family:JetBrains Mono,monospace}.url-text{font-family:JetBrains Mono,monospace;font-size:13px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.event-pill{display:flex;align-items:center;gap:8px;background:#0000004d;border:1px solid var(--border-visible);padding:6px 14px;border-radius:6px;font-size:var(--fs-xs);color:var(--text-dim);font-weight:800;text-transform:uppercase;letter-spacing:.05em;font-family:JetBrains Mono,monospace}.empty-webhook-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:#1e293b4d;border-radius:8px;border:2px dashed rgba(255,255,255,.05);color:#64748b;gap:16px}.empty-icon{opacity:.5;color:#475569;animation:pulse-glow 2s ease-in-out infinite}@keyframes pulse-glow{0%,to{opacity:.4;transform:scale(1)}50%{opacity:.6;transform:scale(1.05)}}.add-webhook-form{background:var(--bg-surface);border:1px solid var(--border-visible);border-radius:6px;padding:0;display:flex;flex-direction:column;max-height:calc(100vh - 400px);box-shadow:0 10px 40px #0006}.form-scrollable-content{flex:1;overflow-y:auto;padding:32px 32px 0}.form-scrollable-content h3{font-size:14px;font-weight:800;margin:0 0 24px;color:var(--color-primary);text-transform:uppercase;letter-spacing:.1em;font-family:JetBrains Mono,monospace}.form-group{margin-bottom:24px}.webhook-input{width:100%;background:#0000004d;border:1px solid var(--border-visible);border-radius:6px;padding:12px 16px;color:var(--text-bright);font-size:13px;font-family:JetBrains Mono,monospace;transition:all .2s;box-sizing:border-box}.webhook-input:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 15px #00ff881a}.events-selection label{display:block;font-size:11px;font-weight:800;color:var(--text-dim);margin-bottom:12px;text-transform:uppercase;letter-spacing:.05em;font-family:JetBrains Mono,monospace}.events-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;margin-bottom:32px}.event-checkbox{display:flex;align-items:center;gap:12px;padding:14px;background:#0000004d;border:1px solid var(--border-visible);border-radius:6px;cursor:pointer;transition:all .2s;font-size:13px;color:var(--text-dim);-webkit-user-select:none;user-select:none}.event-checkbox:hover{border-color:var(--text-muted);background:#ffffff05}.event-checkbox.selected{background:#00ff880d;border-color:var(--color-primary);color:var(--color-primary);font-weight:600}.template-section{background:#0003;border:1px solid var(--border-visible);border-radius:6px;margin-bottom:24px;overflow:hidden}.template-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .2s}.template-header:hover{background:#ffffff08}.template-toggle{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--text-muted);font-weight:700;text-transform:uppercase;letter-spacing:.05em}.toggle-indicator{font-size:18px;color:var(--text-dim);font-weight:700}.template-editor{padding:24px;border-top:1px solid var(--border-visible);background:#0000001a}.template-hint{color:var(--text-dim);font-size:12px;margin:0 0 16px;line-height:1.6}.template-hint code{background:#0000004d;padding:2px 6px;border-radius:6px;color:var(--color-primary);font-family:JetBrains Mono,monospace}.variable-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}.variable-chip{background:#0000004d;border:1px solid var(--border-visible);color:var(--color-primary);padding:6px 12px;border-radius:6px;font-size:var(--fs-xs);cursor:pointer;font-family:JetBrains Mono,monospace;transition:all .2s}.variable-chip:hover{border-color:var(--color-primary);background:#00ff880d;transform:translateY(-1px)}.template-textarea{width:100%;background:#0000004d;border:1px solid var(--border-visible);border-radius:6px;color:var(--text-bright);padding:16px;font-family:JetBrains Mono,monospace;font-size:12px;line-height:1.6;resize:vertical;min-height:100px;box-sizing:border-box;transition:border-color .2s}.template-textarea:focus{outline:none;border-color:var(--color-primary)}.form-actions{display:flex;justify-content:flex-end;gap:16px;padding:0 32px 32px;background:transparent;border:none;flex-shrink:0}.add-btn{background:var(--color-primary);color:var(--bg-page);font-weight:800;padding:12px 32px;border-radius:6px;border:none;cursor:pointer;font-size:12px;transition:all .2s;box-shadow:0 0 20px #0f83;text-transform:uppercase;font-family:JetBrains Mono,monospace}.add-btn:hover:not(:disabled){background:#00e67a;transform:translateY(-1px);box-shadow:0 0 30px #0f86}.add-btn:disabled{background:var(--bg-elevated);color:var(--text-dim);cursor:not-allowed;box-shadow:none}.test-btn{background:transparent;border:1px solid var(--border-visible);color:var(--text-muted);font-weight:700;padding:11px 24px;border-radius:6px;cursor:pointer;font-size:12px;transition:all .2s;text-transform:uppercase;font-family:JetBrains Mono,monospace}.test-btn:hover:not(:disabled){color:var(--text-bright);border-color:var(--text-dim);background:#ffffff0d}.test-btn.success{border-color:var(--color-primary);color:var(--color-primary);background:#00ff880d}.test-btn.error{border-color:#ff4d4d;color:#ff4d4d;background:#ff4d4d0d}
@@ -0,0 +1 @@
1
+ import{r as i,j as e,k,i as A,C as _}from"./index-ByQwMN5T.js";import{X as n}from"./index-C1DBaoSh.js";import{T as g}from"./trash-2-DQpvzJec.js";import{Z as W}from"./zap-DovP6iow.js";import{P as O}from"./plus-BBwlIevt.js";const v=[{id:"device_offline",label:"Device Offline",icon:e.jsx(_,{size:14,className:"text-red-400"})},{id:"device_new",label:"New Device",icon:e.jsx(O,{size:14,className:"text-green-400"})},{id:"session_failed",label:"Session Failed",icon:e.jsx(g,{size:14,className:"text-orange-400"})}],J=()=>{const[x,w]=i.useState([]),[t,p]=i.useState(""),[r,j]=i.useState(["device_offline","session_failed"]),[N,u]=i.useState(!1),[d,o]=i.useState("idle"),[c,b]=i.useState(!1),[f,h]=i.useState("");i.useEffect(()=>{m()},[]);const m=async()=>{try{const s=await n.getWebhookConfigs();w(s||[])}catch(s){console.error("Failed to load webhook configs",s)}},y=async()=>{if(t){u(!0);try{await n.addWebhookConfig(t,r,"slack",f||void 0),p(""),h(""),b(!1),j(["device_offline","session_failed"]),await m()}catch(s){console.error("Failed to add webhook",s)}finally{u(!1)}}},S=async s=>{try{await n.deleteWebhookConfig(s),await m()}catch(a){console.error("Failed to delete webhook",a)}},C=async()=>{if(t){o("idle");try{await n.testWebhook(t,"slack"),o("success"),setTimeout(()=>o("idle"),3e3)}catch{o("error"),setTimeout(()=>o("idle"),3e3)}}},T=s=>{j(a=>a.includes(s)?a.filter(l=>l!==s):[...a,s])},E=s=>{h(a=>a+`{{${s}}} `)};return e.jsxs("div",{className:"webhook-settings-container",children:[e.jsx("div",{className:"scanline",style:{position:"absolute",inset:0,pointerEvents:"none",opacity:.05,zIndex:1001}}),e.jsxs("div",{className:"webhook-header",children:[e.jsxs("div",{className:"webhook-title",children:[e.jsx(k,{className:"webhook-icon",size:20}),e.jsx("h2",{children:"Notification Webhooks"})]}),e.jsx("p",{className:"webhook-subtitle",children:"Configure Slack or generic webhooks to receive alerts for critical infrastructure events."})]}),e.jsxs("div",{className:"webhook-list",children:[x.map(s=>e.jsxs("div",{className:"webhook-card",children:[e.jsxs("div",{className:"webhook-card-header",children:[e.jsxs("div",{className:"webhook-url-display",children:[e.jsx("span",{className:"platform-tag",children:s.payloadTemplate?"CUSTOM":"SLACK"}),e.jsx("span",{className:"url-text",children:s.url})]}),e.jsx("button",{className:"delete-btn",onClick:()=>S(s.id),children:e.jsx(g,{size:16})})]}),e.jsx("div",{className:"webhook-events-list",children:JSON.parse(s.events).map(a=>{const l=v.find(z=>z.id===a);return e.jsxs("span",{className:"event-pill",children:[l==null?void 0:l.icon,(l==null?void 0:l.label)||a]},a)})})]},s.id)),x.length===0&&e.jsxs("div",{className:"empty-webhook-state",children:[e.jsx(k,{size:48,className:"empty-icon"}),e.jsx("p",{children:"No webhooks configured yet."})]})]}),e.jsxs("div",{className:"add-webhook-form",children:[e.jsxs("div",{className:"form-scrollable-content",children:[e.jsx("h3",{children:"Add New Webhook"}),e.jsx("div",{className:"form-group",children:e.jsx("input",{type:"text",className:"webhook-input",placeholder:"https://hooks.slack.com/services/...",value:t,onChange:s=>p(s.target.value)})}),e.jsxs("div",{className:"events-selection",children:[e.jsx("label",{children:"Trigger Events:"}),e.jsx("div",{className:"events-grid",children:v.map(s=>e.jsxs("div",{className:`event-checkbox ${r.includes(s.id)?"selected":""}`,onClick:()=>T(s.id),children:[s.icon,e.jsx("span",{children:s.label}),r.includes(s.id)&&e.jsx(A,{size:14,className:"check-icon"})]},s.id))})]}),e.jsxs("div",{className:"template-section",children:[e.jsxs("div",{className:"template-header",onClick:()=>b(!c),children:[e.jsxs("div",{className:"template-toggle",children:[e.jsx(W,{size:16,className:c?"text-yellow-400":"text-gray-400"}),e.jsx("span",{children:"Use Custom Payload (Optional)"})]}),e.jsx("span",{className:"toggle-indicator",children:c?"−":"+"})]}),c&&e.jsxs("div",{className:"template-editor",children:[e.jsxs("p",{className:"template-hint",children:["Define a JSON or text template. Use variables like ",e.jsx("code",{children:"{{udid}}"})," to insert dynamic data."]}),e.jsx("div",{className:"variable-chips",children:["udid","host","name","sessionId","failureReason","eventType","platform"].map(s=>e.jsx("span",{className:"variable-chip",onClick:()=>E(s),children:s},s))}),e.jsx("textarea",{className:"template-textarea",placeholder:'Example JSON: { "text": "Alert: Device {{udid}} is offline!" }',value:f,onChange:s=>h(s.target.value),rows:3})]})]})]}),e.jsxs("div",{className:"form-actions",children:[e.jsx("button",{className:`test-btn ${d}`,onClick:C,disabled:!t,children:d==="success"?"Sent!":d==="error"?"Failed":"Test Payload"}),e.jsx("button",{className:"add-btn",onClick:y,disabled:!t||N,children:N?"Saving...":"Save Configuration"})]})]})]})};export{J as WebhookSettings};
@@ -0,0 +1,6 @@
1
+ import{c as a}from"./index-ByQwMN5T.js";/**
2
+ * @license lucide-react v0.555.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const o=[["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"}]],e=a("zap",o);export{e as Z};
Binary file
Binary file
@@ -0,0 +1,9 @@
1
+ <svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="12" y="4" width="40" height="56" rx="7" stroke="#22c55e" stroke-width="1.5" fill="none"/>
3
+ <rect x="17" y="11" width="30" height="36" rx="2" fill="rgba(34,197,94,0.08)" stroke="rgba(34,197,94,0.25)" stroke-width="0.8"/>
4
+ <rect x="27" y="52" width="10" height="2" rx="1" fill="#22c55e" opacity="0.4"/>
5
+ <circle cx="32" cy="8" r="1.5" fill="#22c55e" opacity="0.4"/>
6
+ <line x1="23" y1="17" x2="41" y2="41" stroke="#22c55e" stroke-width="2.5" stroke-linecap="round"/>
7
+ <line x1="41" y1="17" x2="23" y2="41" stroke="#22c55e" stroke-width="2.5" stroke-linecap="round"/>
8
+ <circle cx="44" cy="12" r="3" fill="#22c55e"/>
9
+ </svg>
@@ -0,0 +1,46 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8" />
6
+ <link rel="icon" href="favicon.png" />
7
+ <link rel="icon" type="image/svg+xml" href="favicon.svg" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
9
+ <meta name="theme-color" content="#000000" />
10
+ <meta name="description" content="Web site created using create-react-app" />
11
+ <link rel="apple-touch-icon" href="logo192.png" />
12
+ <!--
13
+ manifest.json provides metadata used when your web app is installed on a
14
+ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
15
+ -->
16
+ <link rel="manifest" href="/xenon/manifest.json" />
17
+ <!--
18
+ Notice the use of / in the tags above.
19
+ It will be replaced with the URL of the `public` folder during the build.
20
+ Only files inside the `public` folder can be referenced from the HTML.
21
+
22
+ Unlike "/favicon.ico" or "favicon.ico", "/favicon.ico" will
23
+ work correctly both with client-side routing and a non-root public URL.
24
+ Learn how to configure a non-root public URL by running `npm run build`.
25
+ -->
26
+ <title>Xenon</title>
27
+ <script type="module" crossorigin src="/xenon/assets/index-ByQwMN5T.js"></script>
28
+ <link rel="stylesheet" crossorigin href="/xenon/assets/index-qzCez_kk.css">
29
+ </head>
30
+
31
+ <body>
32
+ <noscript>You need to enable JavaScript to run this app.</noscript>
33
+ <div id="root"></div>
34
+ <!--
35
+ This HTML file is a template.
36
+ If you open it directly in the browser, you will see an empty page.
37
+
38
+ You can add webfonts, meta tags, or analytics to this file.
39
+ The build step will place the bundled scripts into the <body> tag.
40
+
41
+ To begin the development, run `npm start` or `yarn start`.
42
+ To create a production bundle, use `npm run build` or `yarn build`.
43
+ -->
44
+ </body>
45
+
46
+ </html>
@@ -0,0 +1,17 @@
1
+ <svg width="280" height="64" viewBox="0 0 280 64" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- ICON MARK -->
3
+ <rect x="2" y="4" width="40" height="56" rx="7" stroke="#22c55e" stroke-width="1.5" fill="none"/>
4
+ <rect x="7" y="11" width="30" height="36" rx="2" fill="rgba(34,197,94,0.08)" stroke="rgba(34,197,94,0.3)" stroke-width="0.8"/>
5
+ <rect x="17" y="52" width="10" height="2" rx="1" fill="#22c55e" opacity="0.5"/>
6
+ <circle cx="22" cy="8" r="1.5" fill="#22c55e" opacity="0.4"/>
7
+ <line x1="13" y1="17" x2="31" y2="41" stroke="#22c55e" stroke-width="2.5" stroke-linecap="round"/>
8
+ <line x1="31" y1="17" x2="13" y2="41" stroke="#22c55e" stroke-width="2.5" stroke-linecap="round"/>
9
+ <circle cx="34" cy="12" r="3" fill="#22c55e"/>
10
+ <!-- WORDMARK -->
11
+ <text x="58" y="38" font-family="Inter, -apple-system, sans-serif" font-weight="700" font-size="32" fill="#e2e8f0" letter-spacing="-1">XENON</text>
12
+ <!-- OSS badge -->
13
+ <rect x="58" y="48" width="28" height="13" rx="3" fill="rgba(34,197,94,0.15)" stroke="rgba(34,197,94,0.4)" stroke-width="0.8"/>
14
+ <text x="63" y="58" font-family="Geist Mono, monospace" font-weight="500" font-size="8" fill="#22c55e" letter-spacing="0.8">OSS</text>
15
+ <!-- Tagline -->
16
+ <text x="100" y="58" font-family="Inter, -apple-system, sans-serif" font-weight="400" font-size="9" fill="#4a5f7a" letter-spacing="0.5">DEVICE MANAGEMENT</text>
17
+ </svg>
Binary file
Binary file
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "Xenon",
3
+ "name": "Xenon - Intelligent Mobile Infrastructure",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#3B82F6",
24
+ "background_color": "#0F172A"
25
+ }
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
@@ -0,0 +1,348 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "additionalProperties": false,
4
+ "description": "Appium configuration schema for the Xenon plugin.",
5
+ "properties": {
6
+ "platform": {
7
+ "type": "string",
8
+ "enum": [
9
+ "ios",
10
+ "android",
11
+ "both"
12
+ ],
13
+ "default": "both"
14
+ },
15
+ "androidDeviceType": {
16
+ "title": "DeviceTypeToInclude",
17
+ "type": "string",
18
+ "enum": [
19
+ "both",
20
+ "real",
21
+ "simulated"
22
+ ],
23
+ "default": "both"
24
+ },
25
+ "simulators": {
26
+ "type": "array",
27
+ "items": {
28
+ "$ref": "#/definitions/SimulatorConfig"
29
+ },
30
+ "default": []
31
+ },
32
+ "iosDeviceType": {
33
+ "title": "DeviceTypeToInclude1",
34
+ "type": "string",
35
+ "enum": [
36
+ "both",
37
+ "real",
38
+ "simulated"
39
+ ],
40
+ "default": "both"
41
+ },
42
+ "hub": {
43
+ "type": "string"
44
+ },
45
+ "remoteMachineProxyIP": {
46
+ "type": "string"
47
+ },
48
+ "adbRemote": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string"
52
+ },
53
+ "default": []
54
+ },
55
+ "skipChromeDownload": {
56
+ "type": "boolean",
57
+ "default": true
58
+ },
59
+ "maxSessions": {
60
+ "type": "number",
61
+ "default": 8
62
+ },
63
+ "cloud": {
64
+ "type": "object",
65
+ "description": "Cloud configuration object. See CloudConfig interface for details."
66
+ },
67
+ "derivedDataPath": {
68
+ "title": "IDerivedDataPath",
69
+ "type": "object",
70
+ "additionalProperties": {
71
+ "type": "string"
72
+ },
73
+ "description": "Map of derived data paths for iOS simulators/devices."
74
+ },
75
+ "emulators": {
76
+ "type": "array",
77
+ "items": {
78
+ "$ref": "#/definitions/EmulatorConfig"
79
+ },
80
+ "default": []
81
+ },
82
+ "proxy": {
83
+ "type": "object",
84
+ "description": "Proxy configuration object. See AxiosProxy interface for details."
85
+ },
86
+ "deviceAvailabilityTimeoutMs": {
87
+ "type": "number",
88
+ "default": 300000
89
+ },
90
+ "deviceAvailabilityQueryIntervalMs": {
91
+ "type": "number",
92
+ "default": 10000
93
+ },
94
+ "sendNodeDevicesToHubIntervalMs": {
95
+ "type": "number",
96
+ "default": 30000
97
+ },
98
+ "checkStaleDevicesIntervalMs": {
99
+ "type": "number",
100
+ "default": 30000
101
+ },
102
+ "checkBlockedDevicesIntervalMs": {
103
+ "type": "number",
104
+ "default": 30000
105
+ },
106
+ "newCommandTimeoutSec": {
107
+ "type": "number",
108
+ "default": 60
109
+ },
110
+ "bindHostOrIp": {
111
+ "type": "string",
112
+ "default": "127.0.0.1"
113
+ },
114
+ "enableDashboard": {
115
+ "type": "boolean",
116
+ "default": false
117
+ },
118
+ "bootedSimulators": {
119
+ "type": "boolean",
120
+ "default": false
121
+ },
122
+ "removeDevicesFromDatabaseBeforeRunningThePlugin": {
123
+ "type": "boolean",
124
+ "default": false
125
+ },
126
+ "healthCheckIntervalMs": {
127
+ "type": "number",
128
+ "default": 86400000
129
+ },
130
+ "healthCheckSchedule": {
131
+ "type": "string"
132
+ },
133
+ "databaseProvider": {
134
+ "type": "string",
135
+ "enum": [
136
+ "sqlite",
137
+ "postgresql"
138
+ ]
139
+ },
140
+ "databaseUrl": {
141
+ "type": "string"
142
+ },
143
+ "aiProvider": {
144
+ "type": "string",
145
+ "enum": [
146
+ "gemini",
147
+ "openai",
148
+ "anthropic",
149
+ "ollama"
150
+ ]
151
+ },
152
+ "aiModel": {
153
+ "type": "string"
154
+ },
155
+ "aiBaseUrl": {
156
+ "type": "string"
157
+ },
158
+ "geminiApiKey": {
159
+ "type": "string"
160
+ },
161
+ "openaiApiKey": {
162
+ "type": "string"
163
+ },
164
+ "anthropicApiKey": {
165
+ "type": "string"
166
+ },
167
+ "enableSelfHealing": {
168
+ "type": "boolean",
169
+ "default": true
170
+ },
171
+ "buildCleanupDays": {
172
+ "type": "number",
173
+ "default": 30
174
+ },
175
+ "buildCleanupMaxCount": {
176
+ "type": "number",
177
+ "default": 100
178
+ },
179
+ "buildCleanupSchedule": {
180
+ "type": "string",
181
+ "default": "0 0 * * *"
182
+ },
183
+ "deleteBuildAssets": {
184
+ "type": "boolean",
185
+ "default": true
186
+ },
187
+ "sessionHeartbeatIntervalMs": {
188
+ "type": "number",
189
+ "default": 30000
190
+ },
191
+ "enableJsonLogging": {
192
+ "type": "boolean",
193
+ "default": false
194
+ },
195
+ "tlsRejectUnauthorized": {
196
+ "type": "boolean",
197
+ "default": true,
198
+ "description": "Whether to verify TLS certificates for internal outgoing requests. Default is true. Set to false only for dev/test."
199
+ }
200
+ },
201
+ "required": [
202
+ "platform",
203
+ "androidDeviceType",
204
+ "iosDeviceType",
205
+ "skipChromeDownload",
206
+ "maxSessions",
207
+ "deviceAvailabilityTimeoutMs",
208
+ "deviceAvailabilityQueryIntervalMs",
209
+ "sendNodeDevicesToHubIntervalMs",
210
+ "checkStaleDevicesIntervalMs",
211
+ "checkBlockedDevicesIntervalMs",
212
+ "newCommandTimeoutSec",
213
+ "bindHostOrIp",
214
+ "enableDashboard",
215
+ "bootedSimulators",
216
+ "removeDevicesFromDatabaseBeforeRunningThePlugin",
217
+ "healthCheckIntervalMs",
218
+ "enableSelfHealing",
219
+ "buildCleanupDays",
220
+ "buildCleanupMaxCount",
221
+ "buildCleanupSchedule",
222
+ "deleteBuildAssets",
223
+ "sessionHeartbeatIntervalMs",
224
+ "enableJsonLogging"
225
+ ],
226
+ "title": "IPluginArgs",
227
+ "type": "object",
228
+ "definitions": {
229
+ "AxiosProxy": {
230
+ "type": "object",
231
+ "title": "AxiosProxy",
232
+ "properties": {
233
+ "host": {
234
+ "type": "string"
235
+ },
236
+ "port": {
237
+ "type": "integer"
238
+ },
239
+ "protocol": {
240
+ "type": "string",
241
+ "enum": [
242
+ "http",
243
+ "https"
244
+ ]
245
+ },
246
+ "auth": {
247
+ "type": "object"
248
+ }
249
+ },
250
+ "additionalProperties": true,
251
+ "description": "Proxy configuration object. Contains 'host', 'port', 'auth', 'protocol'."
252
+ },
253
+ "CloudConfig": {
254
+ "type": "object",
255
+ "title": "CloudConfig",
256
+ "additionalProperties": false,
257
+ "description": "Cloud configuration object. Should be provided via config file.",
258
+ "properties": {
259
+ "cloudName": {
260
+ "type": "string",
261
+ "description": "Name of the cloud provider (e.g. browserstack, saucelabs, pcloudy, lambdatest)"
262
+ },
263
+ "url": {
264
+ "type": "string",
265
+ "format": "uri",
266
+ "description": "URL of the cloud provider hub"
267
+ },
268
+ "apiKey": {
269
+ "type": "string",
270
+ "description": "API Key for the cloud provider"
271
+ },
272
+ "apiUrl": {
273
+ "type": "string",
274
+ "format": "uri",
275
+ "description": "API URL for the cloud provider"
276
+ },
277
+ "devices": {
278
+ "type": "array",
279
+ "items": {
280
+ "$ref": "#/definitions/CloudDevice"
281
+ }
282
+ }
283
+ },
284
+ "required": [
285
+ "cloudName",
286
+ "url",
287
+ "apiKey",
288
+ "devices"
289
+ ]
290
+ },
291
+ "CloudDevice": {
292
+ "type": "object",
293
+ "title": "CloudDevice",
294
+ "additionalProperties": true,
295
+ "description": "Device configuration object",
296
+ "properties": {
297
+ "deviceName": {
298
+ "type": "string"
299
+ },
300
+ "platform": {
301
+ "type": "string"
302
+ },
303
+ "os_version": {
304
+ "type": "string"
305
+ },
306
+ "platformVersion": {
307
+ "type": "string"
308
+ },
309
+ "pCloudy_DeviceManufacturer": {
310
+ "type": "string"
311
+ },
312
+ "pCloudy_DeviceVersion": {
313
+ "type": "string"
314
+ }
315
+ }
316
+ },
317
+ "SimulatorConfig": {
318
+ "type": "object",
319
+ "title": "SimulatorConfig",
320
+ "properties": {
321
+ "name": {
322
+ "type": "string"
323
+ },
324
+ "sdk": {
325
+ "type": "string"
326
+ }
327
+ },
328
+ "required": [
329
+ "name",
330
+ "sdk"
331
+ ],
332
+ "additionalProperties": true
333
+ },
334
+ "EmulatorConfig": {
335
+ "type": "object",
336
+ "title": "EmulatorConfig",
337
+ "properties": {
338
+ "avdName": {
339
+ "type": "string"
340
+ }
341
+ },
342
+ "required": [
343
+ "avdName"
344
+ ],
345
+ "additionalProperties": true
346
+ }
347
+ }
348
+ }