byterover-cli 1.7.0 → 1.7.2

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 (1059) hide show
  1. package/README.md +7 -5
  2. package/dist/agent/infra/sandbox/local-sandbox.js +9 -2
  3. package/node_modules/@campfirein/brv-transport-client/README.md +409 -0
  4. package/node_modules/@campfirein/brv-transport-client/dist/constants.d.ts +19 -0
  5. package/node_modules/@campfirein/brv-transport-client/dist/constants.d.ts.map +1 -0
  6. package/node_modules/@campfirein/brv-transport-client/dist/constants.js +24 -0
  7. package/node_modules/@campfirein/brv-transport-client/dist/constants.js.map +1 -0
  8. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.d.ts +77 -0
  9. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.d.ts.map +1 -0
  10. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.js +135 -0
  11. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.js.map +1 -0
  12. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.d.ts +63 -0
  13. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.d.ts.map +1 -0
  14. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.js +104 -0
  15. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.js.map +1 -0
  16. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.d.ts +177 -0
  17. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.d.ts.map +1 -0
  18. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.js +319 -0
  19. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.js.map +1 -0
  20. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.d.ts +216 -0
  21. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.d.ts.map +1 -0
  22. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.js +172 -0
  23. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.js.map +1 -0
  24. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.d.ts +22 -0
  25. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.d.ts.map +1 -0
  26. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.js +23 -0
  27. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.js.map +1 -0
  28. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.d.ts +47 -0
  29. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.d.ts.map +1 -0
  30. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.js +7 -0
  31. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.js.map +1 -0
  32. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/common.d.ts +31 -0
  33. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/common.d.ts.map +1 -0
  34. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/common.js +49 -0
  35. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/common.js.map +1 -0
  36. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/event-name-validator.d.ts +21 -0
  37. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/event-name-validator.d.ts.map +1 -0
  38. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/event-name-validator.js +30 -0
  39. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/event-name-validator.js.map +1 -0
  40. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/index.d.ts +9 -0
  41. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/index.d.ts.map +1 -0
  42. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/index.js +9 -0
  43. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/index.js.map +1 -0
  44. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/room-name-validator.d.ts +21 -0
  45. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/room-name-validator.d.ts.map +1 -0
  46. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/room-name-validator.js +30 -0
  47. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/room-name-validator.js.map +1 -0
  48. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/url-validator.d.ts +29 -0
  49. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/url-validator.d.ts.map +1 -0
  50. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/url-validator.js +61 -0
  51. package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/url-validator.js.map +1 -0
  52. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.d.ts +44 -0
  53. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.d.ts.map +1 -0
  54. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.js +2 -0
  55. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.js.map +1 -0
  56. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-logger.d.ts +45 -0
  57. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-logger.d.ts.map +1 -0
  58. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-logger.js +2 -0
  59. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-logger.js.map +1 -0
  60. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client.d.ts +170 -0
  61. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client.d.ts.map +1 -0
  62. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client.js +2 -0
  63. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client.js.map +1 -0
  64. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-connection-state.d.ts +78 -0
  65. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-connection-state.d.ts.map +1 -0
  66. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-connection-state.js +2 -0
  67. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-connection-state.js.map +1 -0
  68. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-event-dispatcher.d.ts +33 -0
  69. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-event-dispatcher.d.ts.map +1 -0
  70. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-event-dispatcher.js +2 -0
  71. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-event-dispatcher.js.map +1 -0
  72. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-force-reconnect-manager.d.ts +42 -0
  73. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-force-reconnect-manager.d.ts.map +1 -0
  74. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-force-reconnect-manager.js +2 -0
  75. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-force-reconnect-manager.js.map +1 -0
  76. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.d.ts +45 -0
  77. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.d.ts.map +1 -0
  78. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.js +2 -0
  79. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.js.map +1 -0
  80. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.d.ts +19 -0
  81. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.d.ts.map +1 -0
  82. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.js +2 -0
  83. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.js.map +1 -0
  84. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-reconnection-strategy.d.ts +27 -0
  85. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-reconnection-strategy.d.ts.map +1 -0
  86. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-reconnection-strategy.js +2 -0
  87. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-reconnection-strategy.js.map +1 -0
  88. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-room-manager.d.ts +32 -0
  89. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-room-manager.d.ts.map +1 -0
  90. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-room-manager.js +2 -0
  91. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-room-manager.js.map +1 -0
  92. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket-provider.d.ts +45 -0
  93. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket-provider.d.ts.map +1 -0
  94. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket-provider.js +2 -0
  95. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket-provider.js.map +1 -0
  96. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket.d.ts +56 -0
  97. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket.d.ts.map +1 -0
  98. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket.js +2 -0
  99. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket.js.map +1 -0
  100. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-wake-detector.d.ts +35 -0
  101. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-wake-detector.d.ts.map +1 -0
  102. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-wake-detector.js +2 -0
  103. package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-wake-detector.js.map +1 -0
  104. package/node_modules/@campfirein/brv-transport-client/dist/index.d.ts +65 -0
  105. package/node_modules/@campfirein/brv-transport-client/dist/index.d.ts.map +1 -0
  106. package/node_modules/@campfirein/brv-transport-client/dist/index.js +73 -0
  107. package/node_modules/@campfirein/brv-transport-client/dist/index.js.map +1 -0
  108. package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.d.ts +283 -0
  109. package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.d.ts.map +1 -0
  110. package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.js +451 -0
  111. package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.js.map +1 -0
  112. package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.d.ts +90 -0
  113. package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.d.ts.map +1 -0
  114. package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.js +142 -0
  115. package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.js.map +1 -0
  116. package/node_modules/@campfirein/brv-transport-client/dist/infra/event-dispatcher.d.ts +168 -0
  117. package/node_modules/@campfirein/brv-transport-client/dist/infra/event-dispatcher.d.ts.map +1 -0
  118. package/node_modules/@campfirein/brv-transport-client/dist/infra/event-dispatcher.js +265 -0
  119. package/node_modules/@campfirein/brv-transport-client/dist/infra/event-dispatcher.js.map +1 -0
  120. package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.d.ts +32 -0
  121. package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.d.ts.map +1 -0
  122. package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.js +85 -0
  123. package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.js.map +1 -0
  124. package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.d.ts +16 -0
  125. package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.d.ts.map +1 -0
  126. package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.js +47 -0
  127. package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.js.map +1 -0
  128. package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.d.ts +102 -0
  129. package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.d.ts.map +1 -0
  130. package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.js +161 -0
  131. package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.js.map +1 -0
  132. package/node_modules/@campfirein/brv-transport-client/dist/infra/no-op-client-logger.d.ts +17 -0
  133. package/node_modules/@campfirein/brv-transport-client/dist/infra/no-op-client-logger.d.ts.map +1 -0
  134. package/node_modules/@campfirein/brv-transport-client/dist/infra/no-op-client-logger.js +24 -0
  135. package/node_modules/@campfirein/brv-transport-client/dist/infra/no-op-client-logger.js.map +1 -0
  136. package/node_modules/@campfirein/brv-transport-client/dist/infra/process-utils.d.ts +17 -0
  137. package/node_modules/@campfirein/brv-transport-client/dist/infra/process-utils.d.ts.map +1 -0
  138. package/node_modules/@campfirein/brv-transport-client/dist/infra/process-utils.js +40 -0
  139. package/node_modules/@campfirein/brv-transport-client/dist/infra/process-utils.js.map +1 -0
  140. package/node_modules/@campfirein/brv-transport-client/dist/infra/reconnection-strategy.d.ts +136 -0
  141. package/node_modules/@campfirein/brv-transport-client/dist/infra/reconnection-strategy.d.ts.map +1 -0
  142. package/node_modules/@campfirein/brv-transport-client/dist/infra/reconnection-strategy.js +174 -0
  143. package/node_modules/@campfirein/brv-transport-client/dist/infra/reconnection-strategy.js.map +1 -0
  144. package/node_modules/@campfirein/brv-transport-client/dist/infra/room-manager.d.ts +122 -0
  145. package/node_modules/@campfirein/brv-transport-client/dist/infra/room-manager.d.ts.map +1 -0
  146. package/node_modules/@campfirein/brv-transport-client/dist/infra/room-manager.js +306 -0
  147. package/node_modules/@campfirein/brv-transport-client/dist/infra/room-manager.js.map +1 -0
  148. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.d.ts +14 -0
  149. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.d.ts.map +1 -0
  150. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.js +28 -0
  151. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.js.map +1 -0
  152. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.d.ts +953 -0
  153. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.d.ts.map +1 -0
  154. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.js +476 -0
  155. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.js.map +1 -0
  156. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.d.ts +221 -0
  157. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.d.ts.map +1 -0
  158. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.js +2 -0
  159. package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.js.map +1 -0
  160. package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.d.ts +283 -0
  161. package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.d.ts.map +1 -0
  162. package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.js +668 -0
  163. package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.js.map +1 -0
  164. package/node_modules/@campfirein/brv-transport-client/dist/infra/utils/deep-freeze.d.ts +25 -0
  165. package/node_modules/@campfirein/brv-transport-client/dist/infra/utils/deep-freeze.d.ts.map +1 -0
  166. package/node_modules/@campfirein/brv-transport-client/dist/infra/utils/deep-freeze.js +54 -0
  167. package/node_modules/@campfirein/brv-transport-client/dist/infra/utils/deep-freeze.js.map +1 -0
  168. package/node_modules/@campfirein/brv-transport-client/dist/infra/wake-detector.d.ts +72 -0
  169. package/node_modules/@campfirein/brv-transport-client/dist/infra/wake-detector.d.ts.map +1 -0
  170. package/node_modules/@campfirein/brv-transport-client/dist/infra/wake-detector.js +130 -0
  171. package/node_modules/@campfirein/brv-transport-client/dist/infra/wake-detector.js.map +1 -0
  172. package/node_modules/@campfirein/brv-transport-client/package.json +62 -0
  173. package/node_modules/@socket.io/component-emitter/LICENSE +24 -0
  174. package/node_modules/@socket.io/component-emitter/Readme.md +79 -0
  175. package/node_modules/@socket.io/component-emitter/lib/cjs/index.d.ts +179 -0
  176. package/node_modules/@socket.io/component-emitter/lib/cjs/index.js +176 -0
  177. package/node_modules/@socket.io/component-emitter/lib/cjs/package.json +4 -0
  178. package/node_modules/@socket.io/component-emitter/lib/esm/index.d.ts +179 -0
  179. package/node_modules/@socket.io/component-emitter/lib/esm/index.js +169 -0
  180. package/node_modules/@socket.io/component-emitter/lib/esm/package.json +4 -0
  181. package/node_modules/@socket.io/component-emitter/package.json +28 -0
  182. package/node_modules/engine.io-client/LICENSE +22 -0
  183. package/node_modules/engine.io-client/README.md +331 -0
  184. package/node_modules/engine.io-client/build/cjs/browser-entrypoint.d.ts +3 -0
  185. package/node_modules/engine.io-client/build/cjs/browser-entrypoint.js +4 -0
  186. package/node_modules/engine.io-client/build/cjs/contrib/has-cors.d.ts +1 -0
  187. package/node_modules/engine.io-client/build/cjs/contrib/has-cors.js +14 -0
  188. package/node_modules/engine.io-client/build/cjs/contrib/parseqs.d.ts +15 -0
  189. package/node_modules/engine.io-client/build/cjs/contrib/parseqs.js +38 -0
  190. package/node_modules/engine.io-client/build/cjs/contrib/parseuri.d.ts +1 -0
  191. package/node_modules/engine.io-client/build/cjs/contrib/parseuri.js +67 -0
  192. package/node_modules/engine.io-client/build/cjs/globals.d.ts +4 -0
  193. package/node_modules/engine.io-client/build/cjs/globals.js +26 -0
  194. package/node_modules/engine.io-client/build/cjs/globals.node.d.ts +21 -0
  195. package/node_modules/engine.io-client/build/cjs/globals.node.js +97 -0
  196. package/node_modules/engine.io-client/build/cjs/index.d.ts +15 -0
  197. package/node_modules/engine.io-client/build/cjs/index.js +32 -0
  198. package/node_modules/engine.io-client/build/cjs/package.json +10 -0
  199. package/node_modules/engine.io-client/build/cjs/socket.d.ts +482 -0
  200. package/node_modules/engine.io-client/build/cjs/socket.js +765 -0
  201. package/node_modules/engine.io-client/build/cjs/transport.d.ts +106 -0
  202. package/node_modules/engine.io-client/build/cjs/transport.js +153 -0
  203. package/node_modules/engine.io-client/build/cjs/transports/index.d.ts +8 -0
  204. package/node_modules/engine.io-client/build/cjs/transports/index.js +11 -0
  205. package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.d.ts +15 -0
  206. package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.js +60 -0
  207. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts +108 -0
  208. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js +285 -0
  209. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.d.ts +11 -0
  210. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js +44 -0
  211. package/node_modules/engine.io-client/build/cjs/transports/polling.d.ts +52 -0
  212. package/node_modules/engine.io-client/build/cjs/transports/polling.js +165 -0
  213. package/node_modules/engine.io-client/build/cjs/transports/websocket.d.ts +36 -0
  214. package/node_modules/engine.io-client/build/cjs/transports/websocket.js +136 -0
  215. package/node_modules/engine.io-client/build/cjs/transports/websocket.node.d.ts +14 -0
  216. package/node_modules/engine.io-client/build/cjs/transports/websocket.node.js +68 -0
  217. package/node_modules/engine.io-client/build/cjs/transports/webtransport.d.ts +18 -0
  218. package/node_modules/engine.io-client/build/cjs/transports/webtransport.js +94 -0
  219. package/node_modules/engine.io-client/build/cjs/util.d.ts +7 -0
  220. package/node_modules/engine.io-client/build/cjs/util.js +65 -0
  221. package/node_modules/engine.io-client/build/esm/browser-entrypoint.d.ts +3 -0
  222. package/node_modules/engine.io-client/build/esm/browser-entrypoint.js +2 -0
  223. package/node_modules/engine.io-client/build/esm/contrib/has-cors.d.ts +1 -0
  224. package/node_modules/engine.io-client/build/esm/contrib/has-cors.js +11 -0
  225. package/node_modules/engine.io-client/build/esm/contrib/parseqs.d.ts +15 -0
  226. package/node_modules/engine.io-client/build/esm/contrib/parseqs.js +34 -0
  227. package/node_modules/engine.io-client/build/esm/contrib/parseuri.d.ts +1 -0
  228. package/node_modules/engine.io-client/build/esm/contrib/parseuri.js +64 -0
  229. package/node_modules/engine.io-client/build/esm/globals.d.ts +4 -0
  230. package/node_modules/engine.io-client/build/esm/globals.js +22 -0
  231. package/node_modules/engine.io-client/build/esm/globals.node.d.ts +21 -0
  232. package/node_modules/engine.io-client/build/esm/globals.node.js +91 -0
  233. package/node_modules/engine.io-client/build/esm/index.d.ts +15 -0
  234. package/node_modules/engine.io-client/build/esm/index.js +15 -0
  235. package/node_modules/engine.io-client/build/esm/package.json +10 -0
  236. package/node_modules/engine.io-client/build/esm/socket.d.ts +482 -0
  237. package/node_modules/engine.io-client/build/esm/socket.js +727 -0
  238. package/node_modules/engine.io-client/build/esm/transport.d.ts +106 -0
  239. package/node_modules/engine.io-client/build/esm/transport.js +142 -0
  240. package/node_modules/engine.io-client/build/esm/transports/index.d.ts +8 -0
  241. package/node_modules/engine.io-client/build/esm/transports/index.js +8 -0
  242. package/node_modules/engine.io-client/build/esm/transports/polling-fetch.d.ts +15 -0
  243. package/node_modules/engine.io-client/build/esm/transports/polling-fetch.js +56 -0
  244. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.d.ts +108 -0
  245. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +271 -0
  246. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.d.ts +11 -0
  247. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js +17 -0
  248. package/node_modules/engine.io-client/build/esm/transports/polling.d.ts +52 -0
  249. package/node_modules/engine.io-client/build/esm/transports/polling.js +145 -0
  250. package/node_modules/engine.io-client/build/esm/transports/websocket.d.ts +36 -0
  251. package/node_modules/engine.io-client/build/esm/transports/websocket.js +125 -0
  252. package/node_modules/engine.io-client/build/esm/transports/websocket.node.d.ts +14 -0
  253. package/node_modules/engine.io-client/build/esm/transports/websocket.node.js +41 -0
  254. package/node_modules/engine.io-client/build/esm/transports/webtransport.d.ts +18 -0
  255. package/node_modules/engine.io-client/build/esm/transports/webtransport.js +80 -0
  256. package/node_modules/engine.io-client/build/esm/util.d.ts +7 -0
  257. package/node_modules/engine.io-client/build/esm/util.js +59 -0
  258. package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.d.ts +3 -0
  259. package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.js +2 -0
  260. package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.d.ts +1 -0
  261. package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js +11 -0
  262. package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.d.ts +15 -0
  263. package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js +34 -0
  264. package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.d.ts +1 -0
  265. package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js +64 -0
  266. package/node_modules/engine.io-client/build/esm-debug/globals.d.ts +4 -0
  267. package/node_modules/engine.io-client/build/esm-debug/globals.js +22 -0
  268. package/node_modules/engine.io-client/build/esm-debug/globals.node.d.ts +21 -0
  269. package/node_modules/engine.io-client/build/esm-debug/globals.node.js +91 -0
  270. package/node_modules/engine.io-client/build/esm-debug/index.d.ts +15 -0
  271. package/node_modules/engine.io-client/build/esm-debug/index.js +15 -0
  272. package/node_modules/engine.io-client/build/esm-debug/package.json +10 -0
  273. package/node_modules/engine.io-client/build/esm-debug/socket.d.ts +482 -0
  274. package/node_modules/engine.io-client/build/esm-debug/socket.js +756 -0
  275. package/node_modules/engine.io-client/build/esm-debug/transport.d.ts +106 -0
  276. package/node_modules/engine.io-client/build/esm-debug/transport.js +145 -0
  277. package/node_modules/engine.io-client/build/esm-debug/transports/index.d.ts +8 -0
  278. package/node_modules/engine.io-client/build/esm-debug/transports/index.js +8 -0
  279. package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.d.ts +15 -0
  280. package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.js +56 -0
  281. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.d.ts +108 -0
  282. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js +276 -0
  283. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.d.ts +11 -0
  284. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.js +17 -0
  285. package/node_modules/engine.io-client/build/esm-debug/transports/polling.d.ts +52 -0
  286. package/node_modules/engine.io-client/build/esm-debug/transports/polling.js +158 -0
  287. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.d.ts +36 -0
  288. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.js +128 -0
  289. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.d.ts +14 -0
  290. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.js +41 -0
  291. package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.d.ts +18 -0
  292. package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.js +87 -0
  293. package/node_modules/engine.io-client/build/esm-debug/util.d.ts +7 -0
  294. package/node_modules/engine.io-client/build/esm-debug/util.js +59 -0
  295. package/node_modules/engine.io-client/dist/engine.io.esm.min.js +7 -0
  296. package/node_modules/engine.io-client/dist/engine.io.esm.min.js.map +1 -0
  297. package/node_modules/engine.io-client/dist/engine.io.js +2968 -0
  298. package/node_modules/engine.io-client/dist/engine.io.js.map +1 -0
  299. package/node_modules/engine.io-client/dist/engine.io.min.js +7 -0
  300. package/node_modules/engine.io-client/dist/engine.io.min.js.map +1 -0
  301. package/node_modules/engine.io-client/node_modules/debug/LICENSE +20 -0
  302. package/node_modules/engine.io-client/node_modules/debug/README.md +481 -0
  303. package/node_modules/engine.io-client/node_modules/debug/package.json +60 -0
  304. package/node_modules/engine.io-client/node_modules/debug/src/browser.js +271 -0
  305. package/node_modules/engine.io-client/node_modules/debug/src/common.js +274 -0
  306. package/node_modules/engine.io-client/node_modules/debug/src/index.js +10 -0
  307. package/node_modules/engine.io-client/node_modules/debug/src/node.js +263 -0
  308. package/node_modules/engine.io-client/node_modules/ws/LICENSE +20 -0
  309. package/node_modules/engine.io-client/node_modules/ws/README.md +548 -0
  310. package/node_modules/engine.io-client/node_modules/ws/browser.js +8 -0
  311. package/node_modules/engine.io-client/node_modules/ws/index.js +13 -0
  312. package/node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js +131 -0
  313. package/node_modules/engine.io-client/node_modules/ws/lib/constants.js +12 -0
  314. package/node_modules/engine.io-client/node_modules/ws/lib/event-target.js +292 -0
  315. package/node_modules/engine.io-client/node_modules/ws/lib/extension.js +203 -0
  316. package/node_modules/engine.io-client/node_modules/ws/lib/limiter.js +55 -0
  317. package/node_modules/engine.io-client/node_modules/ws/lib/permessage-deflate.js +514 -0
  318. package/node_modules/engine.io-client/node_modules/ws/lib/receiver.js +704 -0
  319. package/node_modules/engine.io-client/node_modules/ws/lib/sender.js +497 -0
  320. package/node_modules/engine.io-client/node_modules/ws/lib/stream.js +159 -0
  321. package/node_modules/engine.io-client/node_modules/ws/lib/subprotocol.js +62 -0
  322. package/node_modules/engine.io-client/node_modules/ws/lib/validation.js +130 -0
  323. package/node_modules/engine.io-client/node_modules/ws/lib/websocket-server.js +540 -0
  324. package/node_modules/engine.io-client/node_modules/ws/lib/websocket.js +1338 -0
  325. package/node_modules/engine.io-client/node_modules/ws/package.json +69 -0
  326. package/node_modules/engine.io-client/node_modules/ws/wrapper.mjs +8 -0
  327. package/node_modules/engine.io-client/package.json +95 -0
  328. package/node_modules/engine.io-parser/LICENSE +22 -0
  329. package/node_modules/engine.io-parser/Readme.md +158 -0
  330. package/node_modules/engine.io-parser/build/cjs/commons.d.ts +14 -0
  331. package/node_modules/engine.io-parser/build/cjs/commons.js +19 -0
  332. package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.d.ts +2 -0
  333. package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.js +48 -0
  334. package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.d.ts +2 -0
  335. package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.js +66 -0
  336. package/node_modules/engine.io-parser/build/cjs/decodePacket.d.ts +2 -0
  337. package/node_modules/engine.io-parser/build/cjs/decodePacket.js +59 -0
  338. package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.d.ts +4 -0
  339. package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.js +72 -0
  340. package/node_modules/engine.io-parser/build/cjs/encodePacket.d.ts +3 -0
  341. package/node_modules/engine.io-parser/build/cjs/encodePacket.js +38 -0
  342. package/node_modules/engine.io-parser/build/cjs/index.d.ts +9 -0
  343. package/node_modules/engine.io-parser/build/cjs/index.js +164 -0
  344. package/node_modules/engine.io-parser/build/cjs/package.json +8 -0
  345. package/node_modules/engine.io-parser/build/esm/commons.d.ts +14 -0
  346. package/node_modules/engine.io-parser/build/esm/commons.js +14 -0
  347. package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.d.ts +2 -0
  348. package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js +43 -0
  349. package/node_modules/engine.io-parser/build/esm/decodePacket.browser.d.ts +2 -0
  350. package/node_modules/engine.io-parser/build/esm/decodePacket.browser.js +62 -0
  351. package/node_modules/engine.io-parser/build/esm/decodePacket.d.ts +2 -0
  352. package/node_modules/engine.io-parser/build/esm/decodePacket.js +55 -0
  353. package/node_modules/engine.io-parser/build/esm/encodePacket.browser.d.ts +4 -0
  354. package/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +68 -0
  355. package/node_modules/engine.io-parser/build/esm/encodePacket.d.ts +3 -0
  356. package/node_modules/engine.io-parser/build/esm/encodePacket.js +33 -0
  357. package/node_modules/engine.io-parser/build/esm/index.d.ts +9 -0
  358. package/node_modules/engine.io-parser/build/esm/index.js +156 -0
  359. package/node_modules/engine.io-parser/build/esm/package.json +8 -0
  360. package/node_modules/engine.io-parser/package.json +46 -0
  361. package/node_modules/ms/index.js +162 -0
  362. package/node_modules/ms/license.md +21 -0
  363. package/node_modules/ms/package.json +38 -0
  364. package/node_modules/ms/readme.md +59 -0
  365. package/node_modules/socket.io-client/LICENSE +21 -0
  366. package/node_modules/socket.io-client/README.md +29 -0
  367. package/node_modules/socket.io-client/build/cjs/browser-entrypoint.d.ts +2 -0
  368. package/node_modules/socket.io-client/build/cjs/browser-entrypoint.js +4 -0
  369. package/node_modules/socket.io-client/build/cjs/contrib/backo2.d.ts +12 -0
  370. package/node_modules/socket.io-client/build/cjs/contrib/backo2.js +69 -0
  371. package/node_modules/socket.io-client/build/cjs/index.d.ts +29 -0
  372. package/node_modules/socket.io-client/build/cjs/index.js +76 -0
  373. package/node_modules/socket.io-client/build/cjs/manager.d.ts +295 -0
  374. package/node_modules/socket.io-client/build/cjs/manager.js +416 -0
  375. package/node_modules/socket.io-client/build/cjs/on.d.ts +2 -0
  376. package/node_modules/socket.io-client/build/cjs/on.js +9 -0
  377. package/node_modules/socket.io-client/build/cjs/socket.d.ts +593 -0
  378. package/node_modules/socket.io-client/build/cjs/socket.js +910 -0
  379. package/node_modules/socket.io-client/build/cjs/url.d.ts +33 -0
  380. package/node_modules/socket.io-client/build/cjs/url.js +69 -0
  381. package/node_modules/socket.io-client/build/esm/browser-entrypoint.d.ts +2 -0
  382. package/node_modules/socket.io-client/build/esm/browser-entrypoint.js +2 -0
  383. package/node_modules/socket.io-client/build/esm/contrib/backo2.d.ts +12 -0
  384. package/node_modules/socket.io-client/build/esm/contrib/backo2.js +66 -0
  385. package/node_modules/socket.io-client/build/esm/index.d.ts +29 -0
  386. package/node_modules/socket.io-client/build/esm/index.js +58 -0
  387. package/node_modules/socket.io-client/build/esm/manager.d.ts +295 -0
  388. package/node_modules/socket.io-client/build/esm/manager.js +367 -0
  389. package/node_modules/socket.io-client/build/esm/on.d.ts +2 -0
  390. package/node_modules/socket.io-client/build/esm/on.js +6 -0
  391. package/node_modules/socket.io-client/build/esm/package.json +5 -0
  392. package/node_modules/socket.io-client/build/esm/socket.d.ts +593 -0
  393. package/node_modules/socket.io-client/build/esm/socket.js +882 -0
  394. package/node_modules/socket.io-client/build/esm/url.d.ts +33 -0
  395. package/node_modules/socket.io-client/build/esm/url.js +59 -0
  396. package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.d.ts +2 -0
  397. package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.js +2 -0
  398. package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.d.ts +12 -0
  399. package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.js +66 -0
  400. package/node_modules/socket.io-client/build/esm-debug/index.d.ts +29 -0
  401. package/node_modules/socket.io-client/build/esm-debug/index.js +62 -0
  402. package/node_modules/socket.io-client/build/esm-debug/manager.d.ts +295 -0
  403. package/node_modules/socket.io-client/build/esm-debug/manager.js +386 -0
  404. package/node_modules/socket.io-client/build/esm-debug/on.d.ts +2 -0
  405. package/node_modules/socket.io-client/build/esm-debug/on.js +6 -0
  406. package/node_modules/socket.io-client/build/esm-debug/package.json +5 -0
  407. package/node_modules/socket.io-client/build/esm-debug/socket.d.ts +593 -0
  408. package/node_modules/socket.io-client/build/esm-debug/socket.js +903 -0
  409. package/node_modules/socket.io-client/build/esm-debug/url.d.ts +33 -0
  410. package/node_modules/socket.io-client/build/esm-debug/url.js +63 -0
  411. package/node_modules/socket.io-client/dist/socket.io.esm.min.js +7 -0
  412. package/node_modules/socket.io-client/dist/socket.io.esm.min.js.map +1 -0
  413. package/node_modules/socket.io-client/dist/socket.io.js +4908 -0
  414. package/node_modules/socket.io-client/dist/socket.io.js.map +1 -0
  415. package/node_modules/socket.io-client/dist/socket.io.min.js +7 -0
  416. package/node_modules/socket.io-client/dist/socket.io.min.js.map +1 -0
  417. package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js +7 -0
  418. package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js.map +1 -0
  419. package/node_modules/socket.io-client/node_modules/debug/LICENSE +20 -0
  420. package/node_modules/socket.io-client/node_modules/debug/README.md +481 -0
  421. package/node_modules/socket.io-client/node_modules/debug/package.json +60 -0
  422. package/node_modules/socket.io-client/node_modules/debug/src/browser.js +271 -0
  423. package/node_modules/socket.io-client/node_modules/debug/src/common.js +274 -0
  424. package/node_modules/socket.io-client/node_modules/debug/src/index.js +10 -0
  425. package/node_modules/socket.io-client/node_modules/debug/src/node.js +263 -0
  426. package/node_modules/socket.io-client/package.json +101 -0
  427. package/node_modules/socket.io-parser/LICENSE +20 -0
  428. package/node_modules/socket.io-parser/Readme.md +81 -0
  429. package/node_modules/socket.io-parser/build/cjs/binary.d.ts +20 -0
  430. package/node_modules/socket.io-parser/build/cjs/binary.js +88 -0
  431. package/node_modules/socket.io-parser/build/cjs/index.d.ts +90 -0
  432. package/node_modules/socket.io-parser/build/cjs/index.js +321 -0
  433. package/node_modules/socket.io-parser/build/cjs/is-binary.d.ts +7 -0
  434. package/node_modules/socket.io-parser/build/cjs/is-binary.js +55 -0
  435. package/node_modules/socket.io-parser/build/cjs/package.json +3 -0
  436. package/node_modules/socket.io-parser/build/esm/binary.d.ts +20 -0
  437. package/node_modules/socket.io-parser/build/esm/binary.js +83 -0
  438. package/node_modules/socket.io-parser/build/esm/index.d.ts +90 -0
  439. package/node_modules/socket.io-parser/build/esm/index.js +311 -0
  440. package/node_modules/socket.io-parser/build/esm/is-binary.d.ts +7 -0
  441. package/node_modules/socket.io-parser/build/esm/is-binary.js +50 -0
  442. package/node_modules/socket.io-parser/build/esm/package.json +3 -0
  443. package/node_modules/socket.io-parser/build/esm-debug/binary.d.ts +20 -0
  444. package/node_modules/socket.io-parser/build/esm-debug/binary.js +83 -0
  445. package/node_modules/socket.io-parser/build/esm-debug/index.d.ts +90 -0
  446. package/node_modules/socket.io-parser/build/esm-debug/index.js +316 -0
  447. package/node_modules/socket.io-parser/build/esm-debug/is-binary.d.ts +7 -0
  448. package/node_modules/socket.io-parser/build/esm-debug/is-binary.js +50 -0
  449. package/node_modules/socket.io-parser/build/esm-debug/package.json +3 -0
  450. package/node_modules/socket.io-parser/node_modules/debug/LICENSE +20 -0
  451. package/node_modules/socket.io-parser/node_modules/debug/README.md +481 -0
  452. package/node_modules/socket.io-parser/node_modules/debug/package.json +60 -0
  453. package/node_modules/socket.io-parser/node_modules/debug/src/browser.js +271 -0
  454. package/node_modules/socket.io-parser/node_modules/debug/src/common.js +274 -0
  455. package/node_modules/socket.io-parser/node_modules/debug/src/index.js +10 -0
  456. package/node_modules/socket.io-parser/node_modules/debug/src/node.js +263 -0
  457. package/node_modules/socket.io-parser/package.json +58 -0
  458. package/node_modules/xmlhttprequest-ssl/LICENSE +22 -0
  459. package/node_modules/xmlhttprequest-ssl/README.md +67 -0
  460. package/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js +689 -0
  461. package/node_modules/xmlhttprequest-ssl/package.json +40 -0
  462. package/node_modules/zod/LICENSE +21 -0
  463. package/node_modules/zod/README.md +208 -0
  464. package/node_modules/zod/index.cjs +33 -0
  465. package/node_modules/zod/index.d.cts +4 -0
  466. package/node_modules/zod/index.d.ts +4 -0
  467. package/node_modules/zod/index.js +4 -0
  468. package/node_modules/zod/package.json +118 -0
  469. package/node_modules/zod/src/index.ts +4 -0
  470. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  471. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  472. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  473. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  474. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  475. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  476. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  477. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  478. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  479. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  480. package/node_modules/zod/src/v3/errors.ts +13 -0
  481. package/node_modules/zod/src/v3/external.ts +6 -0
  482. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  483. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  484. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  485. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  486. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  487. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  488. package/node_modules/zod/src/v3/index.ts +4 -0
  489. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  490. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  491. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  492. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  493. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  494. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  495. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  496. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  497. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  498. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  499. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  500. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  501. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  502. package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
  503. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  504. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  505. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  506. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  507. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  508. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  509. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  510. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  511. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  512. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  513. package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
  514. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  515. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  516. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  517. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  518. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  519. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  520. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  521. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  522. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  523. package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
  524. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  525. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  526. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  527. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  528. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  529. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  530. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  531. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  532. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  533. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  534. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  535. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  536. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  537. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  538. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  539. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  540. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  541. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  542. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  543. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  544. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  545. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  546. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  547. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  548. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  549. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  550. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  551. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  552. package/node_modules/zod/src/v3/types.ts +5136 -0
  553. package/node_modules/zod/src/v4/classic/checks.ts +30 -0
  554. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  555. package/node_modules/zod/src/v4/classic/compat.ts +66 -0
  556. package/node_modules/zod/src/v4/classic/errors.ts +75 -0
  557. package/node_modules/zod/src/v4/classic/external.ts +50 -0
  558. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  559. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  560. package/node_modules/zod/src/v4/classic/parse.ts +33 -0
  561. package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
  562. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  563. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  564. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  565. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  566. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  567. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  568. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  569. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  570. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
  571. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  572. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  573. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  574. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  575. package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  576. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
  577. package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  578. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  579. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
  580. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  581. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
  582. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  583. package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
  584. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  585. package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  586. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  587. package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  588. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  589. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  590. package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  591. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  592. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
  593. package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  594. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  595. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  596. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  597. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  598. package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
  599. package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  600. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
  601. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
  602. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  603. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  604. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  605. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
  606. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  607. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  608. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  609. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  610. package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
  611. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
  612. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  613. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  614. package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  615. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  616. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  617. package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
  618. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  619. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
  620. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
  621. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
  622. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  623. package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
  624. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  625. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  626. package/node_modules/zod/src/v4/core/api.ts +1594 -0
  627. package/node_modules/zod/src/v4/core/checks.ts +1283 -0
  628. package/node_modules/zod/src/v4/core/config.ts +15 -0
  629. package/node_modules/zod/src/v4/core/core.ts +134 -0
  630. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  631. package/node_modules/zod/src/v4/core/errors.ts +424 -0
  632. package/node_modules/zod/src/v4/core/function.ts +176 -0
  633. package/node_modules/zod/src/v4/core/index.ts +15 -0
  634. package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
  635. package/node_modules/zod/src/v4/core/parse.ts +94 -0
  636. package/node_modules/zod/src/v4/core/regexes.ts +135 -0
  637. package/node_modules/zod/src/v4/core/registries.ts +96 -0
  638. package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
  639. package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
  640. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  641. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  642. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  643. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  644. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  645. package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
  646. package/node_modules/zod/src/v4/core/util.ts +775 -0
  647. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  648. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  649. package/node_modules/zod/src/v4/index.ts +4 -0
  650. package/node_modules/zod/src/v4/locales/ar.ts +125 -0
  651. package/node_modules/zod/src/v4/locales/az.ts +121 -0
  652. package/node_modules/zod/src/v4/locales/be.ts +184 -0
  653. package/node_modules/zod/src/v4/locales/ca.ts +127 -0
  654. package/node_modules/zod/src/v4/locales/cs.ts +142 -0
  655. package/node_modules/zod/src/v4/locales/de.ts +124 -0
  656. package/node_modules/zod/src/v4/locales/en.ts +127 -0
  657. package/node_modules/zod/src/v4/locales/eo.ts +125 -0
  658. package/node_modules/zod/src/v4/locales/es.ts +125 -0
  659. package/node_modules/zod/src/v4/locales/fa.ts +134 -0
  660. package/node_modules/zod/src/v4/locales/fi.ts +131 -0
  661. package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  662. package/node_modules/zod/src/v4/locales/fr.ts +124 -0
  663. package/node_modules/zod/src/v4/locales/he.ts +125 -0
  664. package/node_modules/zod/src/v4/locales/hu.ts +126 -0
  665. package/node_modules/zod/src/v4/locales/id.ts +125 -0
  666. package/node_modules/zod/src/v4/locales/index.ts +39 -0
  667. package/node_modules/zod/src/v4/locales/it.ts +125 -0
  668. package/node_modules/zod/src/v4/locales/ja.ts +122 -0
  669. package/node_modules/zod/src/v4/locales/kh.ts +126 -0
  670. package/node_modules/zod/src/v4/locales/ko.ts +131 -0
  671. package/node_modules/zod/src/v4/locales/mk.ts +127 -0
  672. package/node_modules/zod/src/v4/locales/ms.ts +124 -0
  673. package/node_modules/zod/src/v4/locales/nl.ts +126 -0
  674. package/node_modules/zod/src/v4/locales/no.ts +124 -0
  675. package/node_modules/zod/src/v4/locales/ota.ts +125 -0
  676. package/node_modules/zod/src/v4/locales/pl.ts +126 -0
  677. package/node_modules/zod/src/v4/locales/ps.ts +133 -0
  678. package/node_modules/zod/src/v4/locales/pt.ts +123 -0
  679. package/node_modules/zod/src/v4/locales/ru.ts +184 -0
  680. package/node_modules/zod/src/v4/locales/sl.ts +126 -0
  681. package/node_modules/zod/src/v4/locales/sv.ts +127 -0
  682. package/node_modules/zod/src/v4/locales/ta.ts +125 -0
  683. package/node_modules/zod/src/v4/locales/th.ts +126 -0
  684. package/node_modules/zod/src/v4/locales/tr.ts +121 -0
  685. package/node_modules/zod/src/v4/locales/ua.ts +126 -0
  686. package/node_modules/zod/src/v4/locales/ur.ts +126 -0
  687. package/node_modules/zod/src/v4/locales/vi.ts +125 -0
  688. package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  689. package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  690. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  691. package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
  692. package/node_modules/zod/src/v4/mini/external.ts +40 -0
  693. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  694. package/node_modules/zod/src/v4/mini/iso.ts +62 -0
  695. package/node_modules/zod/src/v4/mini/parse.ts +1 -0
  696. package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
  697. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  698. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  699. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  700. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  701. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  702. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  703. package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  704. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  705. package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  706. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  707. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  708. package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  709. package/node_modules/zod/src/v4-mini/index.ts +1 -0
  710. package/node_modules/zod/v3/ZodError.cjs +138 -0
  711. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  712. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  713. package/node_modules/zod/v3/ZodError.js +133 -0
  714. package/node_modules/zod/v3/errors.cjs +17 -0
  715. package/node_modules/zod/v3/errors.d.cts +5 -0
  716. package/node_modules/zod/v3/errors.d.ts +5 -0
  717. package/node_modules/zod/v3/errors.js +9 -0
  718. package/node_modules/zod/v3/external.cjs +22 -0
  719. package/node_modules/zod/v3/external.d.cts +6 -0
  720. package/node_modules/zod/v3/external.d.ts +6 -0
  721. package/node_modules/zod/v3/external.js +6 -0
  722. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  723. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  724. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  725. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  726. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  727. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  728. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  729. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  730. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  731. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  732. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  733. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  734. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  735. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  736. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  737. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  738. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  739. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  740. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  741. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  742. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  743. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  744. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  745. package/node_modules/zod/v3/helpers/util.js +133 -0
  746. package/node_modules/zod/v3/index.cjs +33 -0
  747. package/node_modules/zod/v3/index.d.cts +4 -0
  748. package/node_modules/zod/v3/index.d.ts +4 -0
  749. package/node_modules/zod/v3/index.js +4 -0
  750. package/node_modules/zod/v3/locales/en.cjs +111 -0
  751. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  752. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  753. package/node_modules/zod/v3/locales/en.js +109 -0
  754. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  755. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  756. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  757. package/node_modules/zod/v3/standard-schema.js +1 -0
  758. package/node_modules/zod/v3/types.cjs +3775 -0
  759. package/node_modules/zod/v3/types.d.cts +1031 -0
  760. package/node_modules/zod/v3/types.d.ts +1031 -0
  761. package/node_modules/zod/v3/types.js +3693 -0
  762. package/node_modules/zod/v4/classic/checks.cjs +32 -0
  763. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  764. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  765. package/node_modules/zod/v4/classic/checks.js +1 -0
  766. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  767. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  768. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  769. package/node_modules/zod/v4/classic/coerce.js +17 -0
  770. package/node_modules/zod/v4/classic/compat.cjs +57 -0
  771. package/node_modules/zod/v4/classic/compat.d.cts +46 -0
  772. package/node_modules/zod/v4/classic/compat.d.ts +46 -0
  773. package/node_modules/zod/v4/classic/compat.js +27 -0
  774. package/node_modules/zod/v4/classic/errors.cjs +67 -0
  775. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  776. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  777. package/node_modules/zod/v4/classic/errors.js +41 -0
  778. package/node_modules/zod/v4/classic/external.cjs +70 -0
  779. package/node_modules/zod/v4/classic/external.d.cts +13 -0
  780. package/node_modules/zod/v4/classic/external.d.ts +13 -0
  781. package/node_modules/zod/v4/classic/external.js +18 -0
  782. package/node_modules/zod/v4/classic/index.cjs +33 -0
  783. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  784. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  785. package/node_modules/zod/v4/classic/index.js +4 -0
  786. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  787. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  788. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  789. package/node_modules/zod/v4/classic/iso.js +30 -0
  790. package/node_modules/zod/v4/classic/parse.cjs +32 -0
  791. package/node_modules/zod/v4/classic/parse.d.cts +23 -0
  792. package/node_modules/zod/v4/classic/parse.d.ts +23 -0
  793. package/node_modules/zod/v4/classic/parse.js +6 -0
  794. package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
  795. package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
  796. package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
  797. package/node_modules/zod/v4/classic/schemas.js +1006 -0
  798. package/node_modules/zod/v4/core/api.cjs +1039 -0
  799. package/node_modules/zod/v4/core/api.d.cts +284 -0
  800. package/node_modules/zod/v4/core/api.d.ts +284 -0
  801. package/node_modules/zod/v4/core/api.js +906 -0
  802. package/node_modules/zod/v4/core/checks.cjs +591 -0
  803. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  804. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  805. package/node_modules/zod/v4/core/checks.js +565 -0
  806. package/node_modules/zod/v4/core/core.cjs +67 -0
  807. package/node_modules/zod/v4/core/core.d.cts +49 -0
  808. package/node_modules/zod/v4/core/core.d.ts +49 -0
  809. package/node_modules/zod/v4/core/core.js +61 -0
  810. package/node_modules/zod/v4/core/doc.cjs +39 -0
  811. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  812. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  813. package/node_modules/zod/v4/core/doc.js +35 -0
  814. package/node_modules/zod/v4/core/errors.cjs +226 -0
  815. package/node_modules/zod/v4/core/errors.d.cts +208 -0
  816. package/node_modules/zod/v4/core/errors.d.ts +208 -0
  817. package/node_modules/zod/v4/core/errors.js +195 -0
  818. package/node_modules/zod/v4/core/function.cjs +102 -0
  819. package/node_modules/zod/v4/core/function.d.cts +52 -0
  820. package/node_modules/zod/v4/core/function.d.ts +52 -0
  821. package/node_modules/zod/v4/core/function.js +75 -0
  822. package/node_modules/zod/v4/core/index.cjs +44 -0
  823. package/node_modules/zod/v4/core/index.d.cts +15 -0
  824. package/node_modules/zod/v4/core/index.d.ts +15 -0
  825. package/node_modules/zod/v4/core/index.js +15 -0
  826. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  827. package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
  828. package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
  829. package/node_modules/zod/v4/core/json-schema.js +1 -0
  830. package/node_modules/zod/v4/core/parse.cjs +87 -0
  831. package/node_modules/zod/v4/core/parse.d.cts +25 -0
  832. package/node_modules/zod/v4/core/parse.d.ts +25 -0
  833. package/node_modules/zod/v4/core/parse.js +57 -0
  834. package/node_modules/zod/v4/core/regexes.cjs +103 -0
  835. package/node_modules/zod/v4/core/regexes.d.cts +62 -0
  836. package/node_modules/zod/v4/core/regexes.d.ts +62 -0
  837. package/node_modules/zod/v4/core/regexes.js +95 -0
  838. package/node_modules/zod/v4/core/registries.cjs +56 -0
  839. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  840. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  841. package/node_modules/zod/v4/core/registries.js +51 -0
  842. package/node_modules/zod/v4/core/schemas.cjs +1748 -0
  843. package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
  844. package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
  845. package/node_modules/zod/v4/core/schemas.js +1717 -0
  846. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  847. package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
  848. package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
  849. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  850. package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
  851. package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
  852. package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
  853. package/node_modules/zod/v4/core/to-json-schema.js +849 -0
  854. package/node_modules/zod/v4/core/util.cjs +539 -0
  855. package/node_modules/zod/v4/core/util.d.cts +183 -0
  856. package/node_modules/zod/v4/core/util.d.ts +183 -0
  857. package/node_modules/zod/v4/core/util.js +493 -0
  858. package/node_modules/zod/v4/core/versions.cjs +8 -0
  859. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  860. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  861. package/node_modules/zod/v4/core/versions.js +5 -0
  862. package/node_modules/zod/v4/index.cjs +22 -0
  863. package/node_modules/zod/v4/index.d.cts +3 -0
  864. package/node_modules/zod/v4/index.d.ts +3 -0
  865. package/node_modules/zod/v4/index.js +3 -0
  866. package/node_modules/zod/v4/locales/ar.cjs +142 -0
  867. package/node_modules/zod/v4/locales/ar.d.cts +4 -0
  868. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  869. package/node_modules/zod/v4/locales/ar.js +116 -0
  870. package/node_modules/zod/v4/locales/az.cjs +141 -0
  871. package/node_modules/zod/v4/locales/az.d.cts +4 -0
  872. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  873. package/node_modules/zod/v4/locales/az.js +115 -0
  874. package/node_modules/zod/v4/locales/be.cjs +190 -0
  875. package/node_modules/zod/v4/locales/be.d.cts +4 -0
  876. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  877. package/node_modules/zod/v4/locales/be.js +164 -0
  878. package/node_modules/zod/v4/locales/ca.cjs +144 -0
  879. package/node_modules/zod/v4/locales/ca.d.cts +4 -0
  880. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  881. package/node_modules/zod/v4/locales/ca.js +118 -0
  882. package/node_modules/zod/v4/locales/cs.cjs +161 -0
  883. package/node_modules/zod/v4/locales/cs.d.cts +4 -0
  884. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  885. package/node_modules/zod/v4/locales/cs.js +135 -0
  886. package/node_modules/zod/v4/locales/de.cjs +142 -0
  887. package/node_modules/zod/v4/locales/de.d.cts +4 -0
  888. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  889. package/node_modules/zod/v4/locales/de.js +116 -0
  890. package/node_modules/zod/v4/locales/en.cjs +145 -0
  891. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  892. package/node_modules/zod/v4/locales/en.d.ts +5 -0
  893. package/node_modules/zod/v4/locales/en.js +117 -0
  894. package/node_modules/zod/v4/locales/eo.cjs +144 -0
  895. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  896. package/node_modules/zod/v4/locales/eo.d.ts +5 -0
  897. package/node_modules/zod/v4/locales/eo.js +116 -0
  898. package/node_modules/zod/v4/locales/es.cjs +143 -0
  899. package/node_modules/zod/v4/locales/es.d.cts +4 -0
  900. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  901. package/node_modules/zod/v4/locales/es.js +117 -0
  902. package/node_modules/zod/v4/locales/fa.cjs +148 -0
  903. package/node_modules/zod/v4/locales/fa.d.cts +4 -0
  904. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  905. package/node_modules/zod/v4/locales/fa.js +122 -0
  906. package/node_modules/zod/v4/locales/fi.cjs +148 -0
  907. package/node_modules/zod/v4/locales/fi.d.cts +4 -0
  908. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  909. package/node_modules/zod/v4/locales/fi.js +122 -0
  910. package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
  911. package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
  912. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  913. package/node_modules/zod/v4/locales/fr-CA.js +117 -0
  914. package/node_modules/zod/v4/locales/fr.cjs +142 -0
  915. package/node_modules/zod/v4/locales/fr.d.cts +4 -0
  916. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  917. package/node_modules/zod/v4/locales/fr.js +116 -0
  918. package/node_modules/zod/v4/locales/he.cjs +143 -0
  919. package/node_modules/zod/v4/locales/he.d.cts +4 -0
  920. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  921. package/node_modules/zod/v4/locales/he.js +117 -0
  922. package/node_modules/zod/v4/locales/hu.cjs +143 -0
  923. package/node_modules/zod/v4/locales/hu.d.cts +4 -0
  924. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  925. package/node_modules/zod/v4/locales/hu.js +117 -0
  926. package/node_modules/zod/v4/locales/id.cjs +142 -0
  927. package/node_modules/zod/v4/locales/id.d.cts +4 -0
  928. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  929. package/node_modules/zod/v4/locales/id.js +116 -0
  930. package/node_modules/zod/v4/locales/index.cjs +84 -0
  931. package/node_modules/zod/v4/locales/index.d.cts +39 -0
  932. package/node_modules/zod/v4/locales/index.d.ts +39 -0
  933. package/node_modules/zod/v4/locales/index.js +39 -0
  934. package/node_modules/zod/v4/locales/it.cjs +143 -0
  935. package/node_modules/zod/v4/locales/it.d.cts +4 -0
  936. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  937. package/node_modules/zod/v4/locales/it.js +117 -0
  938. package/node_modules/zod/v4/locales/ja.cjs +141 -0
  939. package/node_modules/zod/v4/locales/ja.d.cts +4 -0
  940. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  941. package/node_modules/zod/v4/locales/ja.js +115 -0
  942. package/node_modules/zod/v4/locales/kh.cjs +143 -0
  943. package/node_modules/zod/v4/locales/kh.d.cts +4 -0
  944. package/node_modules/zod/v4/locales/kh.d.ts +4 -0
  945. package/node_modules/zod/v4/locales/kh.js +117 -0
  946. package/node_modules/zod/v4/locales/ko.cjs +147 -0
  947. package/node_modules/zod/v4/locales/ko.d.cts +4 -0
  948. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  949. package/node_modules/zod/v4/locales/ko.js +121 -0
  950. package/node_modules/zod/v4/locales/mk.cjs +144 -0
  951. package/node_modules/zod/v4/locales/mk.d.cts +4 -0
  952. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  953. package/node_modules/zod/v4/locales/mk.js +118 -0
  954. package/node_modules/zod/v4/locales/ms.cjs +142 -0
  955. package/node_modules/zod/v4/locales/ms.d.cts +4 -0
  956. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  957. package/node_modules/zod/v4/locales/ms.js +116 -0
  958. package/node_modules/zod/v4/locales/nl.cjs +143 -0
  959. package/node_modules/zod/v4/locales/nl.d.cts +4 -0
  960. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  961. package/node_modules/zod/v4/locales/nl.js +117 -0
  962. package/node_modules/zod/v4/locales/no.cjs +142 -0
  963. package/node_modules/zod/v4/locales/no.d.cts +4 -0
  964. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  965. package/node_modules/zod/v4/locales/no.js +116 -0
  966. package/node_modules/zod/v4/locales/ota.cjs +143 -0
  967. package/node_modules/zod/v4/locales/ota.d.cts +4 -0
  968. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  969. package/node_modules/zod/v4/locales/ota.js +117 -0
  970. package/node_modules/zod/v4/locales/pl.cjs +143 -0
  971. package/node_modules/zod/v4/locales/pl.d.cts +4 -0
  972. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  973. package/node_modules/zod/v4/locales/pl.js +117 -0
  974. package/node_modules/zod/v4/locales/ps.cjs +148 -0
  975. package/node_modules/zod/v4/locales/ps.d.cts +4 -0
  976. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  977. package/node_modules/zod/v4/locales/ps.js +122 -0
  978. package/node_modules/zod/v4/locales/pt.cjs +142 -0
  979. package/node_modules/zod/v4/locales/pt.d.cts +4 -0
  980. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  981. package/node_modules/zod/v4/locales/pt.js +116 -0
  982. package/node_modules/zod/v4/locales/ru.cjs +190 -0
  983. package/node_modules/zod/v4/locales/ru.d.cts +4 -0
  984. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  985. package/node_modules/zod/v4/locales/ru.js +164 -0
  986. package/node_modules/zod/v4/locales/sl.cjs +143 -0
  987. package/node_modules/zod/v4/locales/sl.d.cts +4 -0
  988. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  989. package/node_modules/zod/v4/locales/sl.js +117 -0
  990. package/node_modules/zod/v4/locales/sv.cjs +144 -0
  991. package/node_modules/zod/v4/locales/sv.d.cts +4 -0
  992. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  993. package/node_modules/zod/v4/locales/sv.js +118 -0
  994. package/node_modules/zod/v4/locales/ta.cjs +143 -0
  995. package/node_modules/zod/v4/locales/ta.d.cts +4 -0
  996. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  997. package/node_modules/zod/v4/locales/ta.js +117 -0
  998. package/node_modules/zod/v4/locales/th.cjs +143 -0
  999. package/node_modules/zod/v4/locales/th.d.cts +4 -0
  1000. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  1001. package/node_modules/zod/v4/locales/th.js +117 -0
  1002. package/node_modules/zod/v4/locales/tr.cjs +143 -0
  1003. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  1004. package/node_modules/zod/v4/locales/tr.d.ts +5 -0
  1005. package/node_modules/zod/v4/locales/tr.js +115 -0
  1006. package/node_modules/zod/v4/locales/ua.cjs +143 -0
  1007. package/node_modules/zod/v4/locales/ua.d.cts +4 -0
  1008. package/node_modules/zod/v4/locales/ua.d.ts +4 -0
  1009. package/node_modules/zod/v4/locales/ua.js +117 -0
  1010. package/node_modules/zod/v4/locales/ur.cjs +143 -0
  1011. package/node_modules/zod/v4/locales/ur.d.cts +4 -0
  1012. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  1013. package/node_modules/zod/v4/locales/ur.js +117 -0
  1014. package/node_modules/zod/v4/locales/vi.cjs +142 -0
  1015. package/node_modules/zod/v4/locales/vi.d.cts +4 -0
  1016. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  1017. package/node_modules/zod/v4/locales/vi.js +116 -0
  1018. package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
  1019. package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
  1020. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  1021. package/node_modules/zod/v4/locales/zh-CN.js +116 -0
  1022. package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
  1023. package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
  1024. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  1025. package/node_modules/zod/v4/locales/zh-TW.js +117 -0
  1026. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  1027. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  1028. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  1029. package/node_modules/zod/v4/mini/checks.js +1 -0
  1030. package/node_modules/zod/v4/mini/coerce.cjs +47 -0
  1031. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  1032. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  1033. package/node_modules/zod/v4/mini/coerce.js +17 -0
  1034. package/node_modules/zod/v4/mini/external.cjs +62 -0
  1035. package/node_modules/zod/v4/mini/external.d.cts +11 -0
  1036. package/node_modules/zod/v4/mini/external.d.ts +11 -0
  1037. package/node_modules/zod/v4/mini/external.js +13 -0
  1038. package/node_modules/zod/v4/mini/index.cjs +32 -0
  1039. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  1040. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  1041. package/node_modules/zod/v4/mini/index.js +3 -0
  1042. package/node_modules/zod/v4/mini/iso.cjs +60 -0
  1043. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  1044. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  1045. package/node_modules/zod/v4/mini/iso.js +30 -0
  1046. package/node_modules/zod/v4/mini/parse.cjs +8 -0
  1047. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  1048. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  1049. package/node_modules/zod/v4/mini/parse.js +1 -0
  1050. package/node_modules/zod/v4/mini/schemas.cjs +839 -0
  1051. package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
  1052. package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
  1053. package/node_modules/zod/v4/mini/schemas.js +732 -0
  1054. package/node_modules/zod/v4-mini/index.cjs +17 -0
  1055. package/node_modules/zod/v4-mini/index.d.cts +1 -0
  1056. package/node_modules/zod/v4-mini/index.d.ts +1 -0
  1057. package/node_modules/zod/v4-mini/index.js +1 -0
  1058. package/oclif.manifest.json +1 -1
  1059. package/package.json +6 -2
@@ -0,0 +1,2968 @@
1
+ /*!
2
+ * Engine.IO v6.6.3
3
+ * (c) 2014-2025 Guillermo Rauch
4
+ * Released under the MIT License.
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
8
+ typeof define === 'function' && define.amd ? define(factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.eio = factory());
10
+ })(this, (function () { 'use strict';
11
+
12
+ function _arrayLikeToArray(r, a) {
13
+ (null == a || a > r.length) && (a = r.length);
14
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
15
+ return n;
16
+ }
17
+ function _arrayWithoutHoles(r) {
18
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
19
+ }
20
+ function _construct(t, e, r) {
21
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
22
+ var o = [null];
23
+ o.push.apply(o, e);
24
+ var p = new (t.bind.apply(t, o))();
25
+ return r && _setPrototypeOf(p, r.prototype), p;
26
+ }
27
+ function _defineProperties(e, r) {
28
+ for (var t = 0; t < r.length; t++) {
29
+ var o = r[t];
30
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
31
+ }
32
+ }
33
+ function _createClass(e, r, t) {
34
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
35
+ writable: !1
36
+ }), e;
37
+ }
38
+ function _extends() {
39
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
40
+ for (var e = 1; e < arguments.length; e++) {
41
+ var t = arguments[e];
42
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
43
+ }
44
+ return n;
45
+ }, _extends.apply(null, arguments);
46
+ }
47
+ function _getPrototypeOf(t) {
48
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
49
+ return t.__proto__ || Object.getPrototypeOf(t);
50
+ }, _getPrototypeOf(t);
51
+ }
52
+ function _inheritsLoose(t, o) {
53
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
54
+ }
55
+ function _isNativeFunction(t) {
56
+ try {
57
+ return -1 !== Function.toString.call(t).indexOf("[native code]");
58
+ } catch (n) {
59
+ return "function" == typeof t;
60
+ }
61
+ }
62
+ function _isNativeReflectConstruct() {
63
+ try {
64
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
65
+ } catch (t) {}
66
+ return (_isNativeReflectConstruct = function () {
67
+ return !!t;
68
+ })();
69
+ }
70
+ function _iterableToArray(r) {
71
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
72
+ }
73
+ function _nonIterableSpread() {
74
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
75
+ }
76
+ function _setPrototypeOf(t, e) {
77
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
78
+ return t.__proto__ = e, t;
79
+ }, _setPrototypeOf(t, e);
80
+ }
81
+ function _toConsumableArray(r) {
82
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
83
+ }
84
+ function _toPrimitive(t, r) {
85
+ if ("object" != typeof t || !t) return t;
86
+ var e = t[Symbol.toPrimitive];
87
+ if (void 0 !== e) {
88
+ var i = e.call(t, r || "default");
89
+ if ("object" != typeof i) return i;
90
+ throw new TypeError("@@toPrimitive must return a primitive value.");
91
+ }
92
+ return ("string" === r ? String : Number)(t);
93
+ }
94
+ function _toPropertyKey(t) {
95
+ var i = _toPrimitive(t, "string");
96
+ return "symbol" == typeof i ? i : i + "";
97
+ }
98
+ function _typeof(o) {
99
+ "@babel/helpers - typeof";
100
+
101
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
102
+ return typeof o;
103
+ } : function (o) {
104
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
105
+ }, _typeof(o);
106
+ }
107
+ function _unsupportedIterableToArray(r, a) {
108
+ if (r) {
109
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
110
+ var t = {}.toString.call(r).slice(8, -1);
111
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
112
+ }
113
+ }
114
+ function _wrapNativeSuper(t) {
115
+ var r = "function" == typeof Map ? new Map() : void 0;
116
+ return _wrapNativeSuper = function (t) {
117
+ if (null === t || !_isNativeFunction(t)) return t;
118
+ if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
119
+ if (void 0 !== r) {
120
+ if (r.has(t)) return r.get(t);
121
+ r.set(t, Wrapper);
122
+ }
123
+ function Wrapper() {
124
+ return _construct(t, arguments, _getPrototypeOf(this).constructor);
125
+ }
126
+ return Wrapper.prototype = Object.create(t.prototype, {
127
+ constructor: {
128
+ value: Wrapper,
129
+ enumerable: !1,
130
+ writable: !0,
131
+ configurable: !0
132
+ }
133
+ }), _setPrototypeOf(Wrapper, t);
134
+ }, _wrapNativeSuper(t);
135
+ }
136
+
137
+ var PACKET_TYPES = Object.create(null); // no Map = no polyfill
138
+ PACKET_TYPES["open"] = "0";
139
+ PACKET_TYPES["close"] = "1";
140
+ PACKET_TYPES["ping"] = "2";
141
+ PACKET_TYPES["pong"] = "3";
142
+ PACKET_TYPES["message"] = "4";
143
+ PACKET_TYPES["upgrade"] = "5";
144
+ PACKET_TYPES["noop"] = "6";
145
+ var PACKET_TYPES_REVERSE = Object.create(null);
146
+ Object.keys(PACKET_TYPES).forEach(function (key) {
147
+ PACKET_TYPES_REVERSE[PACKET_TYPES[key]] = key;
148
+ });
149
+ var ERROR_PACKET = {
150
+ type: "error",
151
+ data: "parser error"
152
+ };
153
+
154
+ var withNativeBlob = typeof Blob === "function" || typeof Blob !== "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]";
155
+ var withNativeArrayBuffer$1 = typeof ArrayBuffer === "function";
156
+ // ArrayBuffer.isView method is not defined in IE10
157
+ var isView = function isView(obj) {
158
+ return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj && obj.buffer instanceof ArrayBuffer;
159
+ };
160
+ var encodePacket = function encodePacket(_ref, supportsBinary, callback) {
161
+ var type = _ref.type,
162
+ data = _ref.data;
163
+ if (withNativeBlob && data instanceof Blob) {
164
+ if (supportsBinary) {
165
+ return callback(data);
166
+ } else {
167
+ return encodeBlobAsBase64(data, callback);
168
+ }
169
+ } else if (withNativeArrayBuffer$1 && (data instanceof ArrayBuffer || isView(data))) {
170
+ if (supportsBinary) {
171
+ return callback(data);
172
+ } else {
173
+ return encodeBlobAsBase64(new Blob([data]), callback);
174
+ }
175
+ }
176
+ // plain string
177
+ return callback(PACKET_TYPES[type] + (data || ""));
178
+ };
179
+ var encodeBlobAsBase64 = function encodeBlobAsBase64(data, callback) {
180
+ var fileReader = new FileReader();
181
+ fileReader.onload = function () {
182
+ var content = fileReader.result.split(",")[1];
183
+ callback("b" + (content || ""));
184
+ };
185
+ return fileReader.readAsDataURL(data);
186
+ };
187
+ function toArray(data) {
188
+ if (data instanceof Uint8Array) {
189
+ return data;
190
+ } else if (data instanceof ArrayBuffer) {
191
+ return new Uint8Array(data);
192
+ } else {
193
+ return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
194
+ }
195
+ }
196
+ var TEXT_ENCODER;
197
+ function encodePacketToBinary(packet, callback) {
198
+ if (withNativeBlob && packet.data instanceof Blob) {
199
+ return packet.data.arrayBuffer().then(toArray).then(callback);
200
+ } else if (withNativeArrayBuffer$1 && (packet.data instanceof ArrayBuffer || isView(packet.data))) {
201
+ return callback(toArray(packet.data));
202
+ }
203
+ encodePacket(packet, false, function (encoded) {
204
+ if (!TEXT_ENCODER) {
205
+ TEXT_ENCODER = new TextEncoder();
206
+ }
207
+ callback(TEXT_ENCODER.encode(encoded));
208
+ });
209
+ }
210
+
211
+ // imported from https://github.com/socketio/base64-arraybuffer
212
+ var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
213
+ // Use a lookup table to find the index.
214
+ var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
215
+ for (var i = 0; i < chars.length; i++) {
216
+ lookup[chars.charCodeAt(i)] = i;
217
+ }
218
+ var decode$1 = function decode(base64) {
219
+ var bufferLength = base64.length * 0.75,
220
+ len = base64.length,
221
+ i,
222
+ p = 0,
223
+ encoded1,
224
+ encoded2,
225
+ encoded3,
226
+ encoded4;
227
+ if (base64[base64.length - 1] === '=') {
228
+ bufferLength--;
229
+ if (base64[base64.length - 2] === '=') {
230
+ bufferLength--;
231
+ }
232
+ }
233
+ var arraybuffer = new ArrayBuffer(bufferLength),
234
+ bytes = new Uint8Array(arraybuffer);
235
+ for (i = 0; i < len; i += 4) {
236
+ encoded1 = lookup[base64.charCodeAt(i)];
237
+ encoded2 = lookup[base64.charCodeAt(i + 1)];
238
+ encoded3 = lookup[base64.charCodeAt(i + 2)];
239
+ encoded4 = lookup[base64.charCodeAt(i + 3)];
240
+ bytes[p++] = encoded1 << 2 | encoded2 >> 4;
241
+ bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
242
+ bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
243
+ }
244
+ return arraybuffer;
245
+ };
246
+
247
+ var withNativeArrayBuffer = typeof ArrayBuffer === "function";
248
+ var decodePacket = function decodePacket(encodedPacket, binaryType) {
249
+ if (typeof encodedPacket !== "string") {
250
+ return {
251
+ type: "message",
252
+ data: mapBinary(encodedPacket, binaryType)
253
+ };
254
+ }
255
+ var type = encodedPacket.charAt(0);
256
+ if (type === "b") {
257
+ return {
258
+ type: "message",
259
+ data: decodeBase64Packet(encodedPacket.substring(1), binaryType)
260
+ };
261
+ }
262
+ var packetType = PACKET_TYPES_REVERSE[type];
263
+ if (!packetType) {
264
+ return ERROR_PACKET;
265
+ }
266
+ return encodedPacket.length > 1 ? {
267
+ type: PACKET_TYPES_REVERSE[type],
268
+ data: encodedPacket.substring(1)
269
+ } : {
270
+ type: PACKET_TYPES_REVERSE[type]
271
+ };
272
+ };
273
+ var decodeBase64Packet = function decodeBase64Packet(data, binaryType) {
274
+ if (withNativeArrayBuffer) {
275
+ var decoded = decode$1(data);
276
+ return mapBinary(decoded, binaryType);
277
+ } else {
278
+ return {
279
+ base64: true,
280
+ data: data
281
+ }; // fallback for old browsers
282
+ }
283
+ };
284
+ var mapBinary = function mapBinary(data, binaryType) {
285
+ switch (binaryType) {
286
+ case "blob":
287
+ if (data instanceof Blob) {
288
+ // from WebSocket + binaryType "blob"
289
+ return data;
290
+ } else {
291
+ // from HTTP long-polling or WebTransport
292
+ return new Blob([data]);
293
+ }
294
+ case "arraybuffer":
295
+ default:
296
+ if (data instanceof ArrayBuffer) {
297
+ // from HTTP long-polling (base64) or WebSocket + binaryType "arraybuffer"
298
+ return data;
299
+ } else {
300
+ // from WebTransport (Uint8Array)
301
+ return data.buffer;
302
+ }
303
+ }
304
+ };
305
+
306
+ var SEPARATOR = String.fromCharCode(30); // see https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text
307
+ var encodePayload = function encodePayload(packets, callback) {
308
+ // some packets may be added to the array while encoding, so the initial length must be saved
309
+ var length = packets.length;
310
+ var encodedPackets = new Array(length);
311
+ var count = 0;
312
+ packets.forEach(function (packet, i) {
313
+ // force base64 encoding for binary packets
314
+ encodePacket(packet, false, function (encodedPacket) {
315
+ encodedPackets[i] = encodedPacket;
316
+ if (++count === length) {
317
+ callback(encodedPackets.join(SEPARATOR));
318
+ }
319
+ });
320
+ });
321
+ };
322
+ var decodePayload = function decodePayload(encodedPayload, binaryType) {
323
+ var encodedPackets = encodedPayload.split(SEPARATOR);
324
+ var packets = [];
325
+ for (var i = 0; i < encodedPackets.length; i++) {
326
+ var decodedPacket = decodePacket(encodedPackets[i], binaryType);
327
+ packets.push(decodedPacket);
328
+ if (decodedPacket.type === "error") {
329
+ break;
330
+ }
331
+ }
332
+ return packets;
333
+ };
334
+ function createPacketEncoderStream() {
335
+ return new TransformStream({
336
+ transform: function transform(packet, controller) {
337
+ encodePacketToBinary(packet, function (encodedPacket) {
338
+ var payloadLength = encodedPacket.length;
339
+ var header;
340
+ // inspired by the WebSocket format: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#decoding_payload_length
341
+ if (payloadLength < 126) {
342
+ header = new Uint8Array(1);
343
+ new DataView(header.buffer).setUint8(0, payloadLength);
344
+ } else if (payloadLength < 65536) {
345
+ header = new Uint8Array(3);
346
+ var view = new DataView(header.buffer);
347
+ view.setUint8(0, 126);
348
+ view.setUint16(1, payloadLength);
349
+ } else {
350
+ header = new Uint8Array(9);
351
+ var _view = new DataView(header.buffer);
352
+ _view.setUint8(0, 127);
353
+ _view.setBigUint64(1, BigInt(payloadLength));
354
+ }
355
+ // first bit indicates whether the payload is plain text (0) or binary (1)
356
+ if (packet.data && typeof packet.data !== "string") {
357
+ header[0] |= 0x80;
358
+ }
359
+ controller.enqueue(header);
360
+ controller.enqueue(encodedPacket);
361
+ });
362
+ }
363
+ });
364
+ }
365
+ var TEXT_DECODER;
366
+ function totalLength(chunks) {
367
+ return chunks.reduce(function (acc, chunk) {
368
+ return acc + chunk.length;
369
+ }, 0);
370
+ }
371
+ function concatChunks(chunks, size) {
372
+ if (chunks[0].length === size) {
373
+ return chunks.shift();
374
+ }
375
+ var buffer = new Uint8Array(size);
376
+ var j = 0;
377
+ for (var i = 0; i < size; i++) {
378
+ buffer[i] = chunks[0][j++];
379
+ if (j === chunks[0].length) {
380
+ chunks.shift();
381
+ j = 0;
382
+ }
383
+ }
384
+ if (chunks.length && j < chunks[0].length) {
385
+ chunks[0] = chunks[0].slice(j);
386
+ }
387
+ return buffer;
388
+ }
389
+ function createPacketDecoderStream(maxPayload, binaryType) {
390
+ if (!TEXT_DECODER) {
391
+ TEXT_DECODER = new TextDecoder();
392
+ }
393
+ var chunks = [];
394
+ var state = 0 /* State.READ_HEADER */;
395
+ var expectedLength = -1;
396
+ var isBinary = false;
397
+ return new TransformStream({
398
+ transform: function transform(chunk, controller) {
399
+ chunks.push(chunk);
400
+ while (true) {
401
+ if (state === 0 /* State.READ_HEADER */) {
402
+ if (totalLength(chunks) < 1) {
403
+ break;
404
+ }
405
+ var header = concatChunks(chunks, 1);
406
+ isBinary = (header[0] & 0x80) === 0x80;
407
+ expectedLength = header[0] & 0x7f;
408
+ if (expectedLength < 126) {
409
+ state = 3 /* State.READ_PAYLOAD */;
410
+ } else if (expectedLength === 126) {
411
+ state = 1 /* State.READ_EXTENDED_LENGTH_16 */;
412
+ } else {
413
+ state = 2 /* State.READ_EXTENDED_LENGTH_64 */;
414
+ }
415
+ } else if (state === 1 /* State.READ_EXTENDED_LENGTH_16 */) {
416
+ if (totalLength(chunks) < 2) {
417
+ break;
418
+ }
419
+ var headerArray = concatChunks(chunks, 2);
420
+ expectedLength = new DataView(headerArray.buffer, headerArray.byteOffset, headerArray.length).getUint16(0);
421
+ state = 3 /* State.READ_PAYLOAD */;
422
+ } else if (state === 2 /* State.READ_EXTENDED_LENGTH_64 */) {
423
+ if (totalLength(chunks) < 8) {
424
+ break;
425
+ }
426
+ var _headerArray = concatChunks(chunks, 8);
427
+ var view = new DataView(_headerArray.buffer, _headerArray.byteOffset, _headerArray.length);
428
+ var n = view.getUint32(0);
429
+ if (n > Math.pow(2, 53 - 32) - 1) {
430
+ // the maximum safe integer in JavaScript is 2^53 - 1
431
+ controller.enqueue(ERROR_PACKET);
432
+ break;
433
+ }
434
+ expectedLength = n * Math.pow(2, 32) + view.getUint32(4);
435
+ state = 3 /* State.READ_PAYLOAD */;
436
+ } else {
437
+ if (totalLength(chunks) < expectedLength) {
438
+ break;
439
+ }
440
+ var data = concatChunks(chunks, expectedLength);
441
+ controller.enqueue(decodePacket(isBinary ? data : TEXT_DECODER.decode(data), binaryType));
442
+ state = 0 /* State.READ_HEADER */;
443
+ }
444
+ if (expectedLength === 0 || expectedLength > maxPayload) {
445
+ controller.enqueue(ERROR_PACKET);
446
+ break;
447
+ }
448
+ }
449
+ }
450
+ });
451
+ }
452
+ var protocol = 4;
453
+
454
+ /**
455
+ * Initialize a new `Emitter`.
456
+ *
457
+ * @api public
458
+ */
459
+
460
+ function Emitter(obj) {
461
+ if (obj) return mixin(obj);
462
+ }
463
+
464
+ /**
465
+ * Mixin the emitter properties.
466
+ *
467
+ * @param {Object} obj
468
+ * @return {Object}
469
+ * @api private
470
+ */
471
+
472
+ function mixin(obj) {
473
+ for (var key in Emitter.prototype) {
474
+ obj[key] = Emitter.prototype[key];
475
+ }
476
+ return obj;
477
+ }
478
+
479
+ /**
480
+ * Listen on the given `event` with `fn`.
481
+ *
482
+ * @param {String} event
483
+ * @param {Function} fn
484
+ * @return {Emitter}
485
+ * @api public
486
+ */
487
+
488
+ Emitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) {
489
+ this._callbacks = this._callbacks || {};
490
+ (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn);
491
+ return this;
492
+ };
493
+
494
+ /**
495
+ * Adds an `event` listener that will be invoked a single
496
+ * time then automatically removed.
497
+ *
498
+ * @param {String} event
499
+ * @param {Function} fn
500
+ * @return {Emitter}
501
+ * @api public
502
+ */
503
+
504
+ Emitter.prototype.once = function (event, fn) {
505
+ function on() {
506
+ this.off(event, on);
507
+ fn.apply(this, arguments);
508
+ }
509
+ on.fn = fn;
510
+ this.on(event, on);
511
+ return this;
512
+ };
513
+
514
+ /**
515
+ * Remove the given callback for `event` or all
516
+ * registered callbacks.
517
+ *
518
+ * @param {String} event
519
+ * @param {Function} fn
520
+ * @return {Emitter}
521
+ * @api public
522
+ */
523
+
524
+ Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) {
525
+ this._callbacks = this._callbacks || {};
526
+
527
+ // all
528
+ if (0 == arguments.length) {
529
+ this._callbacks = {};
530
+ return this;
531
+ }
532
+
533
+ // specific event
534
+ var callbacks = this._callbacks['$' + event];
535
+ if (!callbacks) return this;
536
+
537
+ // remove all handlers
538
+ if (1 == arguments.length) {
539
+ delete this._callbacks['$' + event];
540
+ return this;
541
+ }
542
+
543
+ // remove specific handler
544
+ var cb;
545
+ for (var i = 0; i < callbacks.length; i++) {
546
+ cb = callbacks[i];
547
+ if (cb === fn || cb.fn === fn) {
548
+ callbacks.splice(i, 1);
549
+ break;
550
+ }
551
+ }
552
+
553
+ // Remove event specific arrays for event types that no
554
+ // one is subscribed for to avoid memory leak.
555
+ if (callbacks.length === 0) {
556
+ delete this._callbacks['$' + event];
557
+ }
558
+ return this;
559
+ };
560
+
561
+ /**
562
+ * Emit `event` with the given args.
563
+ *
564
+ * @param {String} event
565
+ * @param {Mixed} ...
566
+ * @return {Emitter}
567
+ */
568
+
569
+ Emitter.prototype.emit = function (event) {
570
+ this._callbacks = this._callbacks || {};
571
+ var args = new Array(arguments.length - 1),
572
+ callbacks = this._callbacks['$' + event];
573
+ for (var i = 1; i < arguments.length; i++) {
574
+ args[i - 1] = arguments[i];
575
+ }
576
+ if (callbacks) {
577
+ callbacks = callbacks.slice(0);
578
+ for (var i = 0, len = callbacks.length; i < len; ++i) {
579
+ callbacks[i].apply(this, args);
580
+ }
581
+ }
582
+ return this;
583
+ };
584
+
585
+ // alias used for reserved events (protected method)
586
+ Emitter.prototype.emitReserved = Emitter.prototype.emit;
587
+
588
+ /**
589
+ * Return array of callbacks for `event`.
590
+ *
591
+ * @param {String} event
592
+ * @return {Array}
593
+ * @api public
594
+ */
595
+
596
+ Emitter.prototype.listeners = function (event) {
597
+ this._callbacks = this._callbacks || {};
598
+ return this._callbacks['$' + event] || [];
599
+ };
600
+
601
+ /**
602
+ * Check if this emitter has `event` handlers.
603
+ *
604
+ * @param {String} event
605
+ * @return {Boolean}
606
+ * @api public
607
+ */
608
+
609
+ Emitter.prototype.hasListeners = function (event) {
610
+ return !!this.listeners(event).length;
611
+ };
612
+
613
+ var nextTick = function () {
614
+ var isPromiseAvailable = typeof Promise === "function" && typeof Promise.resolve === "function";
615
+ if (isPromiseAvailable) {
616
+ return function (cb) {
617
+ return Promise.resolve().then(cb);
618
+ };
619
+ } else {
620
+ return function (cb, setTimeoutFn) {
621
+ return setTimeoutFn(cb, 0);
622
+ };
623
+ }
624
+ }();
625
+ var globalThisShim = function () {
626
+ if (typeof self !== "undefined") {
627
+ return self;
628
+ } else if (typeof window !== "undefined") {
629
+ return window;
630
+ } else {
631
+ return Function("return this")();
632
+ }
633
+ }();
634
+ var defaultBinaryType = "arraybuffer";
635
+ function createCookieJar() {}
636
+
637
+ function pick(obj) {
638
+ for (var _len = arguments.length, attr = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
639
+ attr[_key - 1] = arguments[_key];
640
+ }
641
+ return attr.reduce(function (acc, k) {
642
+ if (obj.hasOwnProperty(k)) {
643
+ acc[k] = obj[k];
644
+ }
645
+ return acc;
646
+ }, {});
647
+ }
648
+ // Keep a reference to the real timeout functions so they can be used when overridden
649
+ var NATIVE_SET_TIMEOUT = globalThisShim.setTimeout;
650
+ var NATIVE_CLEAR_TIMEOUT = globalThisShim.clearTimeout;
651
+ function installTimerFunctions(obj, opts) {
652
+ if (opts.useNativeTimers) {
653
+ obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(globalThisShim);
654
+ obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(globalThisShim);
655
+ } else {
656
+ obj.setTimeoutFn = globalThisShim.setTimeout.bind(globalThisShim);
657
+ obj.clearTimeoutFn = globalThisShim.clearTimeout.bind(globalThisShim);
658
+ }
659
+ }
660
+ // base64 encoded buffers are about 33% bigger (https://en.wikipedia.org/wiki/Base64)
661
+ var BASE64_OVERHEAD = 1.33;
662
+ // we could also have used `new Blob([obj]).size`, but it isn't supported in IE9
663
+ function byteLength(obj) {
664
+ if (typeof obj === "string") {
665
+ return utf8Length(obj);
666
+ }
667
+ // arraybuffer or blob
668
+ return Math.ceil((obj.byteLength || obj.size) * BASE64_OVERHEAD);
669
+ }
670
+ function utf8Length(str) {
671
+ var c = 0,
672
+ length = 0;
673
+ for (var i = 0, l = str.length; i < l; i++) {
674
+ c = str.charCodeAt(i);
675
+ if (c < 0x80) {
676
+ length += 1;
677
+ } else if (c < 0x800) {
678
+ length += 2;
679
+ } else if (c < 0xd800 || c >= 0xe000) {
680
+ length += 3;
681
+ } else {
682
+ i++;
683
+ length += 4;
684
+ }
685
+ }
686
+ return length;
687
+ }
688
+ /**
689
+ * Generates a random 8-characters string.
690
+ */
691
+ function randomString() {
692
+ return Date.now().toString(36).substring(3) + Math.random().toString(36).substring(2, 5);
693
+ }
694
+
695
+ // imported from https://github.com/galkn/querystring
696
+ /**
697
+ * Compiles a querystring
698
+ * Returns string representation of the object
699
+ *
700
+ * @param {Object}
701
+ * @api private
702
+ */
703
+ function encode(obj) {
704
+ var str = '';
705
+ for (var i in obj) {
706
+ if (obj.hasOwnProperty(i)) {
707
+ if (str.length) str += '&';
708
+ str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);
709
+ }
710
+ }
711
+ return str;
712
+ }
713
+ /**
714
+ * Parses a simple querystring into an object
715
+ *
716
+ * @param {String} qs
717
+ * @api private
718
+ */
719
+ function decode(qs) {
720
+ var qry = {};
721
+ var pairs = qs.split('&');
722
+ for (var i = 0, l = pairs.length; i < l; i++) {
723
+ var pair = pairs[i].split('=');
724
+ qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
725
+ }
726
+ return qry;
727
+ }
728
+
729
+ function getDefaultExportFromCjs (x) {
730
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
731
+ }
732
+
733
+ var browser = {exports: {}};
734
+
735
+ var ms;
736
+ var hasRequiredMs;
737
+ function requireMs() {
738
+ if (hasRequiredMs) return ms;
739
+ hasRequiredMs = 1;
740
+ var s = 1000;
741
+ var m = s * 60;
742
+ var h = m * 60;
743
+ var d = h * 24;
744
+ var w = d * 7;
745
+ var y = d * 365.25;
746
+
747
+ /**
748
+ * Parse or format the given `val`.
749
+ *
750
+ * Options:
751
+ *
752
+ * - `long` verbose formatting [false]
753
+ *
754
+ * @param {String|Number} val
755
+ * @param {Object} [options]
756
+ * @throws {Error} throw an error if val is not a non-empty string or a number
757
+ * @return {String|Number}
758
+ * @api public
759
+ */
760
+
761
+ ms = function ms(val, options) {
762
+ options = options || {};
763
+ var type = _typeof(val);
764
+ if (type === 'string' && val.length > 0) {
765
+ return parse(val);
766
+ } else if (type === 'number' && isFinite(val)) {
767
+ return options["long"] ? fmtLong(val) : fmtShort(val);
768
+ }
769
+ throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
770
+ };
771
+
772
+ /**
773
+ * Parse the given `str` and return milliseconds.
774
+ *
775
+ * @param {String} str
776
+ * @return {Number}
777
+ * @api private
778
+ */
779
+
780
+ function parse(str) {
781
+ str = String(str);
782
+ if (str.length > 100) {
783
+ return;
784
+ }
785
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
786
+ if (!match) {
787
+ return;
788
+ }
789
+ var n = parseFloat(match[1]);
790
+ var type = (match[2] || 'ms').toLowerCase();
791
+ switch (type) {
792
+ case 'years':
793
+ case 'year':
794
+ case 'yrs':
795
+ case 'yr':
796
+ case 'y':
797
+ return n * y;
798
+ case 'weeks':
799
+ case 'week':
800
+ case 'w':
801
+ return n * w;
802
+ case 'days':
803
+ case 'day':
804
+ case 'd':
805
+ return n * d;
806
+ case 'hours':
807
+ case 'hour':
808
+ case 'hrs':
809
+ case 'hr':
810
+ case 'h':
811
+ return n * h;
812
+ case 'minutes':
813
+ case 'minute':
814
+ case 'mins':
815
+ case 'min':
816
+ case 'm':
817
+ return n * m;
818
+ case 'seconds':
819
+ case 'second':
820
+ case 'secs':
821
+ case 'sec':
822
+ case 's':
823
+ return n * s;
824
+ case 'milliseconds':
825
+ case 'millisecond':
826
+ case 'msecs':
827
+ case 'msec':
828
+ case 'ms':
829
+ return n;
830
+ default:
831
+ return undefined;
832
+ }
833
+ }
834
+
835
+ /**
836
+ * Short format for `ms`.
837
+ *
838
+ * @param {Number} ms
839
+ * @return {String}
840
+ * @api private
841
+ */
842
+
843
+ function fmtShort(ms) {
844
+ var msAbs = Math.abs(ms);
845
+ if (msAbs >= d) {
846
+ return Math.round(ms / d) + 'd';
847
+ }
848
+ if (msAbs >= h) {
849
+ return Math.round(ms / h) + 'h';
850
+ }
851
+ if (msAbs >= m) {
852
+ return Math.round(ms / m) + 'm';
853
+ }
854
+ if (msAbs >= s) {
855
+ return Math.round(ms / s) + 's';
856
+ }
857
+ return ms + 'ms';
858
+ }
859
+
860
+ /**
861
+ * Long format for `ms`.
862
+ *
863
+ * @param {Number} ms
864
+ * @return {String}
865
+ * @api private
866
+ */
867
+
868
+ function fmtLong(ms) {
869
+ var msAbs = Math.abs(ms);
870
+ if (msAbs >= d) {
871
+ return plural(ms, msAbs, d, 'day');
872
+ }
873
+ if (msAbs >= h) {
874
+ return plural(ms, msAbs, h, 'hour');
875
+ }
876
+ if (msAbs >= m) {
877
+ return plural(ms, msAbs, m, 'minute');
878
+ }
879
+ if (msAbs >= s) {
880
+ return plural(ms, msAbs, s, 'second');
881
+ }
882
+ return ms + ' ms';
883
+ }
884
+
885
+ /**
886
+ * Pluralization helper.
887
+ */
888
+
889
+ function plural(ms, msAbs, n, name) {
890
+ var isPlural = msAbs >= n * 1.5;
891
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
892
+ }
893
+ return ms;
894
+ }
895
+
896
+ /**
897
+ * This is the common logic for both the Node.js and web browser
898
+ * implementations of `debug()`.
899
+ */
900
+
901
+ function setup(env) {
902
+ createDebug.debug = createDebug;
903
+ createDebug["default"] = createDebug;
904
+ createDebug.coerce = coerce;
905
+ createDebug.disable = disable;
906
+ createDebug.enable = enable;
907
+ createDebug.enabled = enabled;
908
+ createDebug.humanize = requireMs();
909
+ createDebug.destroy = destroy;
910
+ Object.keys(env).forEach(function (key) {
911
+ createDebug[key] = env[key];
912
+ });
913
+
914
+ /**
915
+ * The currently active debug mode names, and names to skip.
916
+ */
917
+
918
+ createDebug.names = [];
919
+ createDebug.skips = [];
920
+
921
+ /**
922
+ * Map of special "%n" handling functions, for the debug "format" argument.
923
+ *
924
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
925
+ */
926
+ createDebug.formatters = {};
927
+
928
+ /**
929
+ * Selects a color for a debug namespace
930
+ * @param {String} namespace The namespace string for the debug instance to be colored
931
+ * @return {Number|String} An ANSI color code for the given namespace
932
+ * @api private
933
+ */
934
+ function selectColor(namespace) {
935
+ var hash = 0;
936
+ for (var i = 0; i < namespace.length; i++) {
937
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
938
+ hash |= 0; // Convert to 32bit integer
939
+ }
940
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
941
+ }
942
+ createDebug.selectColor = selectColor;
943
+
944
+ /**
945
+ * Create a debugger with the given `namespace`.
946
+ *
947
+ * @param {String} namespace
948
+ * @return {Function}
949
+ * @api public
950
+ */
951
+ function createDebug(namespace) {
952
+ var prevTime;
953
+ var enableOverride = null;
954
+ var namespacesCache;
955
+ var enabledCache;
956
+ function debug() {
957
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
958
+ args[_key] = arguments[_key];
959
+ }
960
+ // Disabled?
961
+ if (!debug.enabled) {
962
+ return;
963
+ }
964
+ var self = debug;
965
+
966
+ // Set `diff` timestamp
967
+ var curr = Number(new Date());
968
+ var ms = curr - (prevTime || curr);
969
+ self.diff = ms;
970
+ self.prev = prevTime;
971
+ self.curr = curr;
972
+ prevTime = curr;
973
+ args[0] = createDebug.coerce(args[0]);
974
+ if (typeof args[0] !== 'string') {
975
+ // Anything else let's inspect with %O
976
+ args.unshift('%O');
977
+ }
978
+
979
+ // Apply any `formatters` transformations
980
+ var index = 0;
981
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
982
+ // If we encounter an escaped % then don't increase the array index
983
+ if (match === '%%') {
984
+ return '%';
985
+ }
986
+ index++;
987
+ var formatter = createDebug.formatters[format];
988
+ if (typeof formatter === 'function') {
989
+ var val = args[index];
990
+ match = formatter.call(self, val);
991
+
992
+ // Now we need to remove `args[index]` since it's inlined in the `format`
993
+ args.splice(index, 1);
994
+ index--;
995
+ }
996
+ return match;
997
+ });
998
+
999
+ // Apply env-specific formatting (colors, etc.)
1000
+ createDebug.formatArgs.call(self, args);
1001
+ var logFn = self.log || createDebug.log;
1002
+ logFn.apply(self, args);
1003
+ }
1004
+ debug.namespace = namespace;
1005
+ debug.useColors = createDebug.useColors();
1006
+ debug.color = createDebug.selectColor(namespace);
1007
+ debug.extend = extend;
1008
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
1009
+
1010
+ Object.defineProperty(debug, 'enabled', {
1011
+ enumerable: true,
1012
+ configurable: false,
1013
+ get: function get() {
1014
+ if (enableOverride !== null) {
1015
+ return enableOverride;
1016
+ }
1017
+ if (namespacesCache !== createDebug.namespaces) {
1018
+ namespacesCache = createDebug.namespaces;
1019
+ enabledCache = createDebug.enabled(namespace);
1020
+ }
1021
+ return enabledCache;
1022
+ },
1023
+ set: function set(v) {
1024
+ enableOverride = v;
1025
+ }
1026
+ });
1027
+
1028
+ // Env-specific initialization logic for debug instances
1029
+ if (typeof createDebug.init === 'function') {
1030
+ createDebug.init(debug);
1031
+ }
1032
+ return debug;
1033
+ }
1034
+ function extend(namespace, delimiter) {
1035
+ var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
1036
+ newDebug.log = this.log;
1037
+ return newDebug;
1038
+ }
1039
+
1040
+ /**
1041
+ * Enables a debug mode by namespaces. This can include modes
1042
+ * separated by a colon and wildcards.
1043
+ *
1044
+ * @param {String} namespaces
1045
+ * @api public
1046
+ */
1047
+ function enable(namespaces) {
1048
+ createDebug.save(namespaces);
1049
+ createDebug.namespaces = namespaces;
1050
+ createDebug.names = [];
1051
+ createDebug.skips = [];
1052
+ var i;
1053
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
1054
+ var len = split.length;
1055
+ for (i = 0; i < len; i++) {
1056
+ if (!split[i]) {
1057
+ // ignore empty strings
1058
+ continue;
1059
+ }
1060
+ namespaces = split[i].replace(/\*/g, '.*?');
1061
+ if (namespaces[0] === '-') {
1062
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
1063
+ } else {
1064
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
1065
+ }
1066
+ }
1067
+ }
1068
+
1069
+ /**
1070
+ * Disable debug output.
1071
+ *
1072
+ * @return {String} namespaces
1073
+ * @api public
1074
+ */
1075
+ function disable() {
1076
+ var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {
1077
+ return '-' + namespace;
1078
+ }))).join(',');
1079
+ createDebug.enable('');
1080
+ return namespaces;
1081
+ }
1082
+
1083
+ /**
1084
+ * Returns true if the given mode name is enabled, false otherwise.
1085
+ *
1086
+ * @param {String} name
1087
+ * @return {Boolean}
1088
+ * @api public
1089
+ */
1090
+ function enabled(name) {
1091
+ if (name[name.length - 1] === '*') {
1092
+ return true;
1093
+ }
1094
+ var i;
1095
+ var len;
1096
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
1097
+ if (createDebug.skips[i].test(name)) {
1098
+ return false;
1099
+ }
1100
+ }
1101
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
1102
+ if (createDebug.names[i].test(name)) {
1103
+ return true;
1104
+ }
1105
+ }
1106
+ return false;
1107
+ }
1108
+
1109
+ /**
1110
+ * Convert regexp to namespace
1111
+ *
1112
+ * @param {RegExp} regxep
1113
+ * @return {String} namespace
1114
+ * @api private
1115
+ */
1116
+ function toNamespace(regexp) {
1117
+ return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
1118
+ }
1119
+
1120
+ /**
1121
+ * Coerce `val`.
1122
+ *
1123
+ * @param {Mixed} val
1124
+ * @return {Mixed}
1125
+ * @api private
1126
+ */
1127
+ function coerce(val) {
1128
+ if (val instanceof Error) {
1129
+ return val.stack || val.message;
1130
+ }
1131
+ return val;
1132
+ }
1133
+
1134
+ /**
1135
+ * XXX DO NOT USE. This is a temporary stub function.
1136
+ * XXX It WILL be removed in the next major release.
1137
+ */
1138
+ function destroy() {
1139
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
1140
+ }
1141
+ createDebug.enable(createDebug.load());
1142
+ return createDebug;
1143
+ }
1144
+ var common = setup;
1145
+
1146
+ /* eslint-env browser */
1147
+ browser.exports;
1148
+ (function (module, exports) {
1149
+ /**
1150
+ * This is the web browser implementation of `debug()`.
1151
+ */
1152
+
1153
+ exports.formatArgs = formatArgs;
1154
+ exports.save = save;
1155
+ exports.load = load;
1156
+ exports.useColors = useColors;
1157
+ exports.storage = localstorage();
1158
+ exports.destroy = function () {
1159
+ var warned = false;
1160
+ return function () {
1161
+ if (!warned) {
1162
+ warned = true;
1163
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
1164
+ }
1165
+ };
1166
+ }();
1167
+
1168
+ /**
1169
+ * Colors.
1170
+ */
1171
+
1172
+ exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
1173
+
1174
+ /**
1175
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
1176
+ * and the Firebug extension (any Firefox version) are known
1177
+ * to support "%c" CSS customizations.
1178
+ *
1179
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
1180
+ */
1181
+
1182
+ // eslint-disable-next-line complexity
1183
+ function useColors() {
1184
+ // NB: In an Electron preload script, document will be defined but not fully
1185
+ // initialized. Since we know we're in Chrome, we'll just detect this case
1186
+ // explicitly
1187
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
1188
+ return true;
1189
+ }
1190
+
1191
+ // Internet Explorer and Edge do not support colors.
1192
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
1193
+ return false;
1194
+ }
1195
+
1196
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
1197
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
1198
+ return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||
1199
+ // Is firebug? http://stackoverflow.com/a/398120/376773
1200
+ typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||
1201
+ // Is firefox >= v31?
1202
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
1203
+ typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||
1204
+ // Double check webkit in userAgent just in case we are in a worker
1205
+ typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
1206
+ }
1207
+
1208
+ /**
1209
+ * Colorize log arguments if enabled.
1210
+ *
1211
+ * @api public
1212
+ */
1213
+
1214
+ function formatArgs(args) {
1215
+ args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
1216
+ if (!this.useColors) {
1217
+ return;
1218
+ }
1219
+ var c = 'color: ' + this.color;
1220
+ args.splice(1, 0, c, 'color: inherit');
1221
+
1222
+ // The final "%c" is somewhat tricky, because there could be other
1223
+ // arguments passed either before or after the %c, so we need to
1224
+ // figure out the correct index to insert the CSS into
1225
+ var index = 0;
1226
+ var lastC = 0;
1227
+ args[0].replace(/%[a-zA-Z%]/g, function (match) {
1228
+ if (match === '%%') {
1229
+ return;
1230
+ }
1231
+ index++;
1232
+ if (match === '%c') {
1233
+ // We only are interested in the *last* %c
1234
+ // (the user may have provided their own)
1235
+ lastC = index;
1236
+ }
1237
+ });
1238
+ args.splice(lastC, 0, c);
1239
+ }
1240
+
1241
+ /**
1242
+ * Invokes `console.debug()` when available.
1243
+ * No-op when `console.debug` is not a "function".
1244
+ * If `console.debug` is not available, falls back
1245
+ * to `console.log`.
1246
+ *
1247
+ * @api public
1248
+ */
1249
+ exports.log = console.debug || console.log || function () {};
1250
+
1251
+ /**
1252
+ * Save `namespaces`.
1253
+ *
1254
+ * @param {String} namespaces
1255
+ * @api private
1256
+ */
1257
+ function save(namespaces) {
1258
+ try {
1259
+ if (namespaces) {
1260
+ exports.storage.setItem('debug', namespaces);
1261
+ } else {
1262
+ exports.storage.removeItem('debug');
1263
+ }
1264
+ } catch (error) {
1265
+ // Swallow
1266
+ // XXX (@Qix-) should we be logging these?
1267
+ }
1268
+ }
1269
+
1270
+ /**
1271
+ * Load `namespaces`.
1272
+ *
1273
+ * @return {String} returns the previously persisted debug modes
1274
+ * @api private
1275
+ */
1276
+ function load() {
1277
+ var r;
1278
+ try {
1279
+ r = exports.storage.getItem('debug');
1280
+ } catch (error) {
1281
+ // Swallow
1282
+ // XXX (@Qix-) should we be logging these?
1283
+ }
1284
+
1285
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
1286
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
1287
+ r = process.env.DEBUG;
1288
+ }
1289
+ return r;
1290
+ }
1291
+
1292
+ /**
1293
+ * Localstorage attempts to return the localstorage.
1294
+ *
1295
+ * This is necessary because safari throws
1296
+ * when a user disables cookies/localstorage
1297
+ * and you attempt to access it.
1298
+ *
1299
+ * @return {LocalStorage}
1300
+ * @api private
1301
+ */
1302
+
1303
+ function localstorage() {
1304
+ try {
1305
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
1306
+ // The Browser also has localStorage in the global context.
1307
+ return localStorage;
1308
+ } catch (error) {
1309
+ // Swallow
1310
+ // XXX (@Qix-) should we be logging these?
1311
+ }
1312
+ }
1313
+ module.exports = common(exports);
1314
+ var formatters = module.exports.formatters;
1315
+
1316
+ /**
1317
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
1318
+ */
1319
+
1320
+ formatters.j = function (v) {
1321
+ try {
1322
+ return JSON.stringify(v);
1323
+ } catch (error) {
1324
+ return '[UnexpectedJSONParseError]: ' + error.message;
1325
+ }
1326
+ };
1327
+ })(browser, browser.exports);
1328
+ var browserExports = browser.exports;
1329
+ var debugModule = /*@__PURE__*/getDefaultExportFromCjs(browserExports);
1330
+
1331
+ var debug$5 = debugModule("engine.io-client:transport"); // debug()
1332
+ var TransportError = /*#__PURE__*/function (_Error) {
1333
+ function TransportError(reason, description, context) {
1334
+ var _this;
1335
+ _this = _Error.call(this, reason) || this;
1336
+ _this.description = description;
1337
+ _this.context = context;
1338
+ _this.type = "TransportError";
1339
+ return _this;
1340
+ }
1341
+ _inheritsLoose(TransportError, _Error);
1342
+ return TransportError;
1343
+ }( /*#__PURE__*/_wrapNativeSuper(Error));
1344
+ var Transport = /*#__PURE__*/function (_Emitter) {
1345
+ /**
1346
+ * Transport abstract constructor.
1347
+ *
1348
+ * @param {Object} opts - options
1349
+ * @protected
1350
+ */
1351
+ function Transport(opts) {
1352
+ var _this2;
1353
+ _this2 = _Emitter.call(this) || this;
1354
+ _this2.writable = false;
1355
+ installTimerFunctions(_this2, opts);
1356
+ _this2.opts = opts;
1357
+ _this2.query = opts.query;
1358
+ _this2.socket = opts.socket;
1359
+ _this2.supportsBinary = !opts.forceBase64;
1360
+ return _this2;
1361
+ }
1362
+ /**
1363
+ * Emits an error.
1364
+ *
1365
+ * @param {String} reason
1366
+ * @param description
1367
+ * @param context - the error context
1368
+ * @return {Transport} for chaining
1369
+ * @protected
1370
+ */
1371
+ _inheritsLoose(Transport, _Emitter);
1372
+ var _proto = Transport.prototype;
1373
+ _proto.onError = function onError(reason, description, context) {
1374
+ _Emitter.prototype.emitReserved.call(this, "error", new TransportError(reason, description, context));
1375
+ return this;
1376
+ }
1377
+ /**
1378
+ * Opens the transport.
1379
+ */;
1380
+ _proto.open = function open() {
1381
+ this.readyState = "opening";
1382
+ this.doOpen();
1383
+ return this;
1384
+ }
1385
+ /**
1386
+ * Closes the transport.
1387
+ */;
1388
+ _proto.close = function close() {
1389
+ if (this.readyState === "opening" || this.readyState === "open") {
1390
+ this.doClose();
1391
+ this.onClose();
1392
+ }
1393
+ return this;
1394
+ }
1395
+ /**
1396
+ * Sends multiple packets.
1397
+ *
1398
+ * @param {Array} packets
1399
+ */;
1400
+ _proto.send = function send(packets) {
1401
+ if (this.readyState === "open") {
1402
+ this.write(packets);
1403
+ } else {
1404
+ // this might happen if the transport was silently closed in the beforeunload event handler
1405
+ debug$5("transport is not open, discarding packets");
1406
+ }
1407
+ }
1408
+ /**
1409
+ * Called upon open
1410
+ *
1411
+ * @protected
1412
+ */;
1413
+ _proto.onOpen = function onOpen() {
1414
+ this.readyState = "open";
1415
+ this.writable = true;
1416
+ _Emitter.prototype.emitReserved.call(this, "open");
1417
+ }
1418
+ /**
1419
+ * Called with data.
1420
+ *
1421
+ * @param {String} data
1422
+ * @protected
1423
+ */;
1424
+ _proto.onData = function onData(data) {
1425
+ var packet = decodePacket(data, this.socket.binaryType);
1426
+ this.onPacket(packet);
1427
+ }
1428
+ /**
1429
+ * Called with a decoded packet.
1430
+ *
1431
+ * @protected
1432
+ */;
1433
+ _proto.onPacket = function onPacket(packet) {
1434
+ _Emitter.prototype.emitReserved.call(this, "packet", packet);
1435
+ }
1436
+ /**
1437
+ * Called upon close.
1438
+ *
1439
+ * @protected
1440
+ */;
1441
+ _proto.onClose = function onClose(details) {
1442
+ this.readyState = "closed";
1443
+ _Emitter.prototype.emitReserved.call(this, "close", details);
1444
+ }
1445
+ /**
1446
+ * Pauses the transport, in order not to lose packets during an upgrade.
1447
+ *
1448
+ * @param onPause
1449
+ */;
1450
+ _proto.pause = function pause(onPause) {};
1451
+ _proto.createUri = function createUri(schema) {
1452
+ var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1453
+ return schema + "://" + this._hostname() + this._port() + this.opts.path + this._query(query);
1454
+ };
1455
+ _proto._hostname = function _hostname() {
1456
+ var hostname = this.opts.hostname;
1457
+ return hostname.indexOf(":") === -1 ? hostname : "[" + hostname + "]";
1458
+ };
1459
+ _proto._port = function _port() {
1460
+ if (this.opts.port && (this.opts.secure && Number(this.opts.port !== 443) || !this.opts.secure && Number(this.opts.port) !== 80)) {
1461
+ return ":" + this.opts.port;
1462
+ } else {
1463
+ return "";
1464
+ }
1465
+ };
1466
+ _proto._query = function _query(query) {
1467
+ var encodedQuery = encode(query);
1468
+ return encodedQuery.length ? "?" + encodedQuery : "";
1469
+ };
1470
+ return Transport;
1471
+ }(Emitter);
1472
+
1473
+ var debug$4 = debugModule("engine.io-client:polling"); // debug()
1474
+ var Polling = /*#__PURE__*/function (_Transport) {
1475
+ function Polling() {
1476
+ var _this;
1477
+ _this = _Transport.apply(this, arguments) || this;
1478
+ _this._polling = false;
1479
+ return _this;
1480
+ }
1481
+ _inheritsLoose(Polling, _Transport);
1482
+ var _proto = Polling.prototype;
1483
+ /**
1484
+ * Opens the socket (triggers polling). We write a PING message to determine
1485
+ * when the transport is open.
1486
+ *
1487
+ * @protected
1488
+ */
1489
+ _proto.doOpen = function doOpen() {
1490
+ this._poll();
1491
+ }
1492
+ /**
1493
+ * Pauses polling.
1494
+ *
1495
+ * @param {Function} onPause - callback upon buffers are flushed and transport is paused
1496
+ * @package
1497
+ */;
1498
+ _proto.pause = function pause(onPause) {
1499
+ var _this2 = this;
1500
+ this.readyState = "pausing";
1501
+ var pause = function pause() {
1502
+ debug$4("paused");
1503
+ _this2.readyState = "paused";
1504
+ onPause();
1505
+ };
1506
+ if (this._polling || !this.writable) {
1507
+ var total = 0;
1508
+ if (this._polling) {
1509
+ debug$4("we are currently polling - waiting to pause");
1510
+ total++;
1511
+ this.once("pollComplete", function () {
1512
+ debug$4("pre-pause polling complete");
1513
+ --total || pause();
1514
+ });
1515
+ }
1516
+ if (!this.writable) {
1517
+ debug$4("we are currently writing - waiting to pause");
1518
+ total++;
1519
+ this.once("drain", function () {
1520
+ debug$4("pre-pause writing complete");
1521
+ --total || pause();
1522
+ });
1523
+ }
1524
+ } else {
1525
+ pause();
1526
+ }
1527
+ }
1528
+ /**
1529
+ * Starts polling cycle.
1530
+ *
1531
+ * @private
1532
+ */;
1533
+ _proto._poll = function _poll() {
1534
+ debug$4("polling");
1535
+ this._polling = true;
1536
+ this.doPoll();
1537
+ this.emitReserved("poll");
1538
+ }
1539
+ /**
1540
+ * Overloads onData to detect payloads.
1541
+ *
1542
+ * @protected
1543
+ */;
1544
+ _proto.onData = function onData(data) {
1545
+ var _this3 = this;
1546
+ debug$4("polling got data %s", data);
1547
+ var callback = function callback(packet) {
1548
+ // if its the first message we consider the transport open
1549
+ if ("opening" === _this3.readyState && packet.type === "open") {
1550
+ _this3.onOpen();
1551
+ }
1552
+ // if its a close packet, we close the ongoing requests
1553
+ if ("close" === packet.type) {
1554
+ _this3.onClose({
1555
+ description: "transport closed by the server"
1556
+ });
1557
+ return false;
1558
+ }
1559
+ // otherwise bypass onData and handle the message
1560
+ _this3.onPacket(packet);
1561
+ };
1562
+ // decode payload
1563
+ decodePayload(data, this.socket.binaryType).forEach(callback);
1564
+ // if an event did not trigger closing
1565
+ if ("closed" !== this.readyState) {
1566
+ // if we got data we're not polling
1567
+ this._polling = false;
1568
+ this.emitReserved("pollComplete");
1569
+ if ("open" === this.readyState) {
1570
+ this._poll();
1571
+ } else {
1572
+ debug$4('ignoring poll - transport state "%s"', this.readyState);
1573
+ }
1574
+ }
1575
+ }
1576
+ /**
1577
+ * For polling, send a close packet.
1578
+ *
1579
+ * @protected
1580
+ */;
1581
+ _proto.doClose = function doClose() {
1582
+ var _this4 = this;
1583
+ var close = function close() {
1584
+ debug$4("writing close packet");
1585
+ _this4.write([{
1586
+ type: "close"
1587
+ }]);
1588
+ };
1589
+ if ("open" === this.readyState) {
1590
+ debug$4("transport open - closing");
1591
+ close();
1592
+ } else {
1593
+ // in case we're trying to close while
1594
+ // handshaking is in progress (GH-164)
1595
+ debug$4("transport not open - deferring close");
1596
+ this.once("open", close);
1597
+ }
1598
+ }
1599
+ /**
1600
+ * Writes a packets payload.
1601
+ *
1602
+ * @param {Array} packets - data packets
1603
+ * @protected
1604
+ */;
1605
+ _proto.write = function write(packets) {
1606
+ var _this5 = this;
1607
+ this.writable = false;
1608
+ encodePayload(packets, function (data) {
1609
+ _this5.doWrite(data, function () {
1610
+ _this5.writable = true;
1611
+ _this5.emitReserved("drain");
1612
+ });
1613
+ });
1614
+ }
1615
+ /**
1616
+ * Generates uri for connection.
1617
+ *
1618
+ * @private
1619
+ */;
1620
+ _proto.uri = function uri() {
1621
+ var schema = this.opts.secure ? "https" : "http";
1622
+ var query = this.query || {};
1623
+ // cache busting is forced
1624
+ if (false !== this.opts.timestampRequests) {
1625
+ query[this.opts.timestampParam] = randomString();
1626
+ }
1627
+ if (!this.supportsBinary && !query.sid) {
1628
+ query.b64 = 1;
1629
+ }
1630
+ return this.createUri(schema, query);
1631
+ };
1632
+ return _createClass(Polling, [{
1633
+ key: "name",
1634
+ get: function get() {
1635
+ return "polling";
1636
+ }
1637
+ }]);
1638
+ }(Transport);
1639
+
1640
+ // imported from https://github.com/component/has-cors
1641
+ var value = false;
1642
+ try {
1643
+ value = typeof XMLHttpRequest !== 'undefined' && 'withCredentials' in new XMLHttpRequest();
1644
+ } catch (err) {
1645
+ // if XMLHttp support is disabled in IE then it will throw
1646
+ // when trying to create
1647
+ }
1648
+ var hasCORS = value;
1649
+
1650
+ var debug$3 = debugModule("engine.io-client:polling"); // debug()
1651
+ function empty() {}
1652
+ var BaseXHR = /*#__PURE__*/function (_Polling) {
1653
+ /**
1654
+ * XHR Polling constructor.
1655
+ *
1656
+ * @param {Object} opts
1657
+ * @package
1658
+ */
1659
+ function BaseXHR(opts) {
1660
+ var _this;
1661
+ _this = _Polling.call(this, opts) || this;
1662
+ if (typeof location !== "undefined") {
1663
+ var isSSL = "https:" === location.protocol;
1664
+ var port = location.port;
1665
+ // some user agents have empty `location.port`
1666
+ if (!port) {
1667
+ port = isSSL ? "443" : "80";
1668
+ }
1669
+ _this.xd = typeof location !== "undefined" && opts.hostname !== location.hostname || port !== opts.port;
1670
+ }
1671
+ return _this;
1672
+ }
1673
+ /**
1674
+ * Sends data.
1675
+ *
1676
+ * @param {String} data to send.
1677
+ * @param {Function} called upon flush.
1678
+ * @private
1679
+ */
1680
+ _inheritsLoose(BaseXHR, _Polling);
1681
+ var _proto = BaseXHR.prototype;
1682
+ _proto.doWrite = function doWrite(data, fn) {
1683
+ var _this2 = this;
1684
+ var req = this.request({
1685
+ method: "POST",
1686
+ data: data
1687
+ });
1688
+ req.on("success", fn);
1689
+ req.on("error", function (xhrStatus, context) {
1690
+ _this2.onError("xhr post error", xhrStatus, context);
1691
+ });
1692
+ }
1693
+ /**
1694
+ * Starts a poll cycle.
1695
+ *
1696
+ * @private
1697
+ */;
1698
+ _proto.doPoll = function doPoll() {
1699
+ var _this3 = this;
1700
+ debug$3("xhr poll");
1701
+ var req = this.request();
1702
+ req.on("data", this.onData.bind(this));
1703
+ req.on("error", function (xhrStatus, context) {
1704
+ _this3.onError("xhr poll error", xhrStatus, context);
1705
+ });
1706
+ this.pollXhr = req;
1707
+ };
1708
+ return BaseXHR;
1709
+ }(Polling);
1710
+ var Request = /*#__PURE__*/function (_Emitter) {
1711
+ /**
1712
+ * Request constructor
1713
+ *
1714
+ * @param {Object} options
1715
+ * @package
1716
+ */
1717
+ function Request(createRequest, uri, opts) {
1718
+ var _this4;
1719
+ _this4 = _Emitter.call(this) || this;
1720
+ _this4.createRequest = createRequest;
1721
+ installTimerFunctions(_this4, opts);
1722
+ _this4._opts = opts;
1723
+ _this4._method = opts.method || "GET";
1724
+ _this4._uri = uri;
1725
+ _this4._data = undefined !== opts.data ? opts.data : null;
1726
+ _this4._create();
1727
+ return _this4;
1728
+ }
1729
+ /**
1730
+ * Creates the XHR object and sends the request.
1731
+ *
1732
+ * @private
1733
+ */
1734
+ _inheritsLoose(Request, _Emitter);
1735
+ var _proto2 = Request.prototype;
1736
+ _proto2._create = function _create() {
1737
+ var _this5 = this;
1738
+ var _a;
1739
+ var opts = pick(this._opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref");
1740
+ opts.xdomain = !!this._opts.xd;
1741
+ var xhr = this._xhr = this.createRequest(opts);
1742
+ try {
1743
+ debug$3("xhr open %s: %s", this._method, this._uri);
1744
+ xhr.open(this._method, this._uri, true);
1745
+ try {
1746
+ if (this._opts.extraHeaders) {
1747
+ // @ts-ignore
1748
+ xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);
1749
+ for (var i in this._opts.extraHeaders) {
1750
+ if (this._opts.extraHeaders.hasOwnProperty(i)) {
1751
+ xhr.setRequestHeader(i, this._opts.extraHeaders[i]);
1752
+ }
1753
+ }
1754
+ }
1755
+ } catch (e) {}
1756
+ if ("POST" === this._method) {
1757
+ try {
1758
+ xhr.setRequestHeader("Content-type", "text/plain;charset=UTF-8");
1759
+ } catch (e) {}
1760
+ }
1761
+ try {
1762
+ xhr.setRequestHeader("Accept", "*/*");
1763
+ } catch (e) {}
1764
+ (_a = this._opts.cookieJar) === null || _a === void 0 ? void 0 : _a.addCookies(xhr);
1765
+ // ie6 check
1766
+ if ("withCredentials" in xhr) {
1767
+ xhr.withCredentials = this._opts.withCredentials;
1768
+ }
1769
+ if (this._opts.requestTimeout) {
1770
+ xhr.timeout = this._opts.requestTimeout;
1771
+ }
1772
+ xhr.onreadystatechange = function () {
1773
+ var _a;
1774
+ if (xhr.readyState === 3) {
1775
+ (_a = _this5._opts.cookieJar) === null || _a === void 0 ? void 0 : _a.parseCookies(
1776
+ // @ts-ignore
1777
+ xhr.getResponseHeader("set-cookie"));
1778
+ }
1779
+ if (4 !== xhr.readyState) return;
1780
+ if (200 === xhr.status || 1223 === xhr.status) {
1781
+ _this5._onLoad();
1782
+ } else {
1783
+ // make sure the `error` event handler that's user-set
1784
+ // does not throw in the same tick and gets caught here
1785
+ _this5.setTimeoutFn(function () {
1786
+ _this5._onError(typeof xhr.status === "number" ? xhr.status : 0);
1787
+ }, 0);
1788
+ }
1789
+ };
1790
+ debug$3("xhr data %s", this._data);
1791
+ xhr.send(this._data);
1792
+ } catch (e) {
1793
+ // Need to defer since .create() is called directly from the constructor
1794
+ // and thus the 'error' event can only be only bound *after* this exception
1795
+ // occurs. Therefore, also, we cannot throw here at all.
1796
+ this.setTimeoutFn(function () {
1797
+ _this5._onError(e);
1798
+ }, 0);
1799
+ return;
1800
+ }
1801
+ if (typeof document !== "undefined") {
1802
+ this._index = Request.requestsCount++;
1803
+ Request.requests[this._index] = this;
1804
+ }
1805
+ }
1806
+ /**
1807
+ * Called upon error.
1808
+ *
1809
+ * @private
1810
+ */;
1811
+ _proto2._onError = function _onError(err) {
1812
+ this.emitReserved("error", err, this._xhr);
1813
+ this._cleanup(true);
1814
+ }
1815
+ /**
1816
+ * Cleans up house.
1817
+ *
1818
+ * @private
1819
+ */;
1820
+ _proto2._cleanup = function _cleanup(fromError) {
1821
+ if ("undefined" === typeof this._xhr || null === this._xhr) {
1822
+ return;
1823
+ }
1824
+ this._xhr.onreadystatechange = empty;
1825
+ if (fromError) {
1826
+ try {
1827
+ this._xhr.abort();
1828
+ } catch (e) {}
1829
+ }
1830
+ if (typeof document !== "undefined") {
1831
+ delete Request.requests[this._index];
1832
+ }
1833
+ this._xhr = null;
1834
+ }
1835
+ /**
1836
+ * Called upon load.
1837
+ *
1838
+ * @private
1839
+ */;
1840
+ _proto2._onLoad = function _onLoad() {
1841
+ var data = this._xhr.responseText;
1842
+ if (data !== null) {
1843
+ this.emitReserved("data", data);
1844
+ this.emitReserved("success");
1845
+ this._cleanup();
1846
+ }
1847
+ }
1848
+ /**
1849
+ * Aborts the request.
1850
+ *
1851
+ * @package
1852
+ */;
1853
+ _proto2.abort = function abort() {
1854
+ this._cleanup();
1855
+ };
1856
+ return Request;
1857
+ }(Emitter);
1858
+ Request.requestsCount = 0;
1859
+ Request.requests = {};
1860
+ /**
1861
+ * Aborts pending requests when unloading the window. This is needed to prevent
1862
+ * memory leaks (e.g. when using IE) and to ensure that no spurious error is
1863
+ * emitted.
1864
+ */
1865
+ if (typeof document !== "undefined") {
1866
+ // @ts-ignore
1867
+ if (typeof attachEvent === "function") {
1868
+ // @ts-ignore
1869
+ attachEvent("onunload", unloadHandler);
1870
+ } else if (typeof addEventListener === "function") {
1871
+ var terminationEvent = "onpagehide" in globalThisShim ? "pagehide" : "unload";
1872
+ addEventListener(terminationEvent, unloadHandler, false);
1873
+ }
1874
+ }
1875
+ function unloadHandler() {
1876
+ for (var i in Request.requests) {
1877
+ if (Request.requests.hasOwnProperty(i)) {
1878
+ Request.requests[i].abort();
1879
+ }
1880
+ }
1881
+ }
1882
+ var hasXHR2 = function () {
1883
+ var xhr = newRequest({
1884
+ xdomain: false
1885
+ });
1886
+ return xhr && xhr.responseType !== null;
1887
+ }();
1888
+ /**
1889
+ * HTTP long-polling based on the built-in `XMLHttpRequest` object.
1890
+ *
1891
+ * Usage: browser
1892
+ *
1893
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
1894
+ */
1895
+ var XHR = /*#__PURE__*/function (_BaseXHR) {
1896
+ function XHR(opts) {
1897
+ var _this6;
1898
+ _this6 = _BaseXHR.call(this, opts) || this;
1899
+ var forceBase64 = opts && opts.forceBase64;
1900
+ _this6.supportsBinary = hasXHR2 && !forceBase64;
1901
+ return _this6;
1902
+ }
1903
+ _inheritsLoose(XHR, _BaseXHR);
1904
+ var _proto3 = XHR.prototype;
1905
+ _proto3.request = function request() {
1906
+ var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1907
+ _extends(opts, {
1908
+ xd: this.xd
1909
+ }, this.opts);
1910
+ return new Request(newRequest, this.uri(), opts);
1911
+ };
1912
+ return XHR;
1913
+ }(BaseXHR);
1914
+ function newRequest(opts) {
1915
+ var xdomain = opts.xdomain;
1916
+ // XMLHttpRequest can be disabled on IE
1917
+ try {
1918
+ if ("undefined" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {
1919
+ return new XMLHttpRequest();
1920
+ }
1921
+ } catch (e) {}
1922
+ if (!xdomain) {
1923
+ try {
1924
+ return new globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
1925
+ } catch (e) {}
1926
+ }
1927
+ }
1928
+
1929
+ var debug$2 = debugModule("engine.io-client:websocket"); // debug()
1930
+ // detect ReactNative environment
1931
+ var isReactNative = typeof navigator !== "undefined" && typeof navigator.product === "string" && navigator.product.toLowerCase() === "reactnative";
1932
+ var BaseWS = /*#__PURE__*/function (_Transport) {
1933
+ function BaseWS() {
1934
+ return _Transport.apply(this, arguments) || this;
1935
+ }
1936
+ _inheritsLoose(BaseWS, _Transport);
1937
+ var _proto = BaseWS.prototype;
1938
+ _proto.doOpen = function doOpen() {
1939
+ var uri = this.uri();
1940
+ var protocols = this.opts.protocols;
1941
+ // React Native only supports the 'headers' option, and will print a warning if anything else is passed
1942
+ var opts = isReactNative ? {} : pick(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
1943
+ if (this.opts.extraHeaders) {
1944
+ opts.headers = this.opts.extraHeaders;
1945
+ }
1946
+ try {
1947
+ this.ws = this.createSocket(uri, protocols, opts);
1948
+ } catch (err) {
1949
+ return this.emitReserved("error", err);
1950
+ }
1951
+ this.ws.binaryType = this.socket.binaryType;
1952
+ this.addEventListeners();
1953
+ }
1954
+ /**
1955
+ * Adds event listeners to the socket
1956
+ *
1957
+ * @private
1958
+ */;
1959
+ _proto.addEventListeners = function addEventListeners() {
1960
+ var _this = this;
1961
+ this.ws.onopen = function () {
1962
+ if (_this.opts.autoUnref) {
1963
+ _this.ws._socket.unref();
1964
+ }
1965
+ _this.onOpen();
1966
+ };
1967
+ this.ws.onclose = function (closeEvent) {
1968
+ return _this.onClose({
1969
+ description: "websocket connection closed",
1970
+ context: closeEvent
1971
+ });
1972
+ };
1973
+ this.ws.onmessage = function (ev) {
1974
+ return _this.onData(ev.data);
1975
+ };
1976
+ this.ws.onerror = function (e) {
1977
+ return _this.onError("websocket error", e);
1978
+ };
1979
+ };
1980
+ _proto.write = function write(packets) {
1981
+ var _this2 = this;
1982
+ this.writable = false;
1983
+ // encodePacket efficient as it uses WS framing
1984
+ // no need for encodePayload
1985
+ var _loop = function _loop() {
1986
+ var packet = packets[i];
1987
+ var lastPacket = i === packets.length - 1;
1988
+ encodePacket(packet, _this2.supportsBinary, function (data) {
1989
+ // Sometimes the websocket has already been closed but the browser didn't
1990
+ // have a chance of informing us about it yet, in that case send will
1991
+ // throw an error
1992
+ try {
1993
+ _this2.doWrite(packet, data);
1994
+ } catch (e) {
1995
+ debug$2("websocket closed before onclose event");
1996
+ }
1997
+ if (lastPacket) {
1998
+ // fake drain
1999
+ // defer to next tick to allow Socket to clear writeBuffer
2000
+ nextTick(function () {
2001
+ _this2.writable = true;
2002
+ _this2.emitReserved("drain");
2003
+ }, _this2.setTimeoutFn);
2004
+ }
2005
+ });
2006
+ };
2007
+ for (var i = 0; i < packets.length; i++) {
2008
+ _loop();
2009
+ }
2010
+ };
2011
+ _proto.doClose = function doClose() {
2012
+ if (typeof this.ws !== "undefined") {
2013
+ this.ws.onerror = function () {};
2014
+ this.ws.close();
2015
+ this.ws = null;
2016
+ }
2017
+ }
2018
+ /**
2019
+ * Generates uri for connection.
2020
+ *
2021
+ * @private
2022
+ */;
2023
+ _proto.uri = function uri() {
2024
+ var schema = this.opts.secure ? "wss" : "ws";
2025
+ var query = this.query || {};
2026
+ // append timestamp to URI
2027
+ if (this.opts.timestampRequests) {
2028
+ query[this.opts.timestampParam] = randomString();
2029
+ }
2030
+ // communicate binary support capabilities
2031
+ if (!this.supportsBinary) {
2032
+ query.b64 = 1;
2033
+ }
2034
+ return this.createUri(schema, query);
2035
+ };
2036
+ return _createClass(BaseWS, [{
2037
+ key: "name",
2038
+ get: function get() {
2039
+ return "websocket";
2040
+ }
2041
+ }]);
2042
+ }(Transport);
2043
+ var WebSocketCtor = globalThisShim.WebSocket || globalThisShim.MozWebSocket;
2044
+ /**
2045
+ * WebSocket transport based on the built-in `WebSocket` object.
2046
+ *
2047
+ * Usage: browser, Node.js (since v21), Deno, Bun
2048
+ *
2049
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
2050
+ * @see https://caniuse.com/mdn-api_websocket
2051
+ * @see https://nodejs.org/api/globals.html#websocket
2052
+ */
2053
+ var WS = /*#__PURE__*/function (_BaseWS) {
2054
+ function WS() {
2055
+ return _BaseWS.apply(this, arguments) || this;
2056
+ }
2057
+ _inheritsLoose(WS, _BaseWS);
2058
+ var _proto2 = WS.prototype;
2059
+ _proto2.createSocket = function createSocket(uri, protocols, opts) {
2060
+ return !isReactNative ? protocols ? new WebSocketCtor(uri, protocols) : new WebSocketCtor(uri) : new WebSocketCtor(uri, protocols, opts);
2061
+ };
2062
+ _proto2.doWrite = function doWrite(_packet, data) {
2063
+ this.ws.send(data);
2064
+ };
2065
+ return WS;
2066
+ }(BaseWS);
2067
+
2068
+ var debug$1 = debugModule("engine.io-client:webtransport"); // debug()
2069
+ /**
2070
+ * WebTransport transport based on the built-in `WebTransport` object.
2071
+ *
2072
+ * Usage: browser, Node.js (with the `@fails-components/webtransport` package)
2073
+ *
2074
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/WebTransport
2075
+ * @see https://caniuse.com/webtransport
2076
+ */
2077
+ var WT = /*#__PURE__*/function (_Transport) {
2078
+ function WT() {
2079
+ return _Transport.apply(this, arguments) || this;
2080
+ }
2081
+ _inheritsLoose(WT, _Transport);
2082
+ var _proto = WT.prototype;
2083
+ _proto.doOpen = function doOpen() {
2084
+ var _this = this;
2085
+ try {
2086
+ // @ts-ignore
2087
+ this._transport = new WebTransport(this.createUri("https"), this.opts.transportOptions[this.name]);
2088
+ } catch (err) {
2089
+ return this.emitReserved("error", err);
2090
+ }
2091
+ this._transport.closed.then(function () {
2092
+ debug$1("transport closed gracefully");
2093
+ _this.onClose();
2094
+ })["catch"](function (err) {
2095
+ debug$1("transport closed due to %s", err);
2096
+ _this.onError("webtransport error", err);
2097
+ });
2098
+ // note: we could have used async/await, but that would require some additional polyfills
2099
+ this._transport.ready.then(function () {
2100
+ _this._transport.createBidirectionalStream().then(function (stream) {
2101
+ var decoderStream = createPacketDecoderStream(Number.MAX_SAFE_INTEGER, _this.socket.binaryType);
2102
+ var reader = stream.readable.pipeThrough(decoderStream).getReader();
2103
+ var encoderStream = createPacketEncoderStream();
2104
+ encoderStream.readable.pipeTo(stream.writable);
2105
+ _this._writer = encoderStream.writable.getWriter();
2106
+ var read = function read() {
2107
+ reader.read().then(function (_ref) {
2108
+ var done = _ref.done,
2109
+ value = _ref.value;
2110
+ if (done) {
2111
+ debug$1("session is closed");
2112
+ return;
2113
+ }
2114
+ debug$1("received chunk: %o", value);
2115
+ _this.onPacket(value);
2116
+ read();
2117
+ })["catch"](function (err) {
2118
+ debug$1("an error occurred while reading: %s", err);
2119
+ });
2120
+ };
2121
+ read();
2122
+ var packet = {
2123
+ type: "open"
2124
+ };
2125
+ if (_this.query.sid) {
2126
+ packet.data = "{\"sid\":\"".concat(_this.query.sid, "\"}");
2127
+ }
2128
+ _this._writer.write(packet).then(function () {
2129
+ return _this.onOpen();
2130
+ });
2131
+ });
2132
+ });
2133
+ };
2134
+ _proto.write = function write(packets) {
2135
+ var _this2 = this;
2136
+ this.writable = false;
2137
+ var _loop = function _loop() {
2138
+ var packet = packets[i];
2139
+ var lastPacket = i === packets.length - 1;
2140
+ _this2._writer.write(packet).then(function () {
2141
+ if (lastPacket) {
2142
+ nextTick(function () {
2143
+ _this2.writable = true;
2144
+ _this2.emitReserved("drain");
2145
+ }, _this2.setTimeoutFn);
2146
+ }
2147
+ });
2148
+ };
2149
+ for (var i = 0; i < packets.length; i++) {
2150
+ _loop();
2151
+ }
2152
+ };
2153
+ _proto.doClose = function doClose() {
2154
+ var _a;
2155
+ (_a = this._transport) === null || _a === void 0 ? void 0 : _a.close();
2156
+ };
2157
+ return _createClass(WT, [{
2158
+ key: "name",
2159
+ get: function get() {
2160
+ return "webtransport";
2161
+ }
2162
+ }]);
2163
+ }(Transport);
2164
+
2165
+ var transports = {
2166
+ websocket: WS,
2167
+ webtransport: WT,
2168
+ polling: XHR
2169
+ };
2170
+
2171
+ // imported from https://github.com/galkn/parseuri
2172
+ /**
2173
+ * Parses a URI
2174
+ *
2175
+ * Note: we could also have used the built-in URL object, but it isn't supported on all platforms.
2176
+ *
2177
+ * See:
2178
+ * - https://developer.mozilla.org/en-US/docs/Web/API/URL
2179
+ * - https://caniuse.com/url
2180
+ * - https://www.rfc-editor.org/rfc/rfc3986#appendix-B
2181
+ *
2182
+ * History of the parse() method:
2183
+ * - first commit: https://github.com/socketio/socket.io-client/commit/4ee1d5d94b3906a9c052b459f1a818b15f38f91c
2184
+ * - export into its own module: https://github.com/socketio/engine.io-client/commit/de2c561e4564efeb78f1bdb1ba39ef81b2822cb3
2185
+ * - reimport: https://github.com/socketio/engine.io-client/commit/df32277c3f6d622eec5ed09f493cae3f3391d242
2186
+ *
2187
+ * @author Steven Levithan <stevenlevithan.com> (MIT license)
2188
+ * @api private
2189
+ */
2190
+ var re = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;
2191
+ var parts = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'];
2192
+ function parse(str) {
2193
+ if (str.length > 8000) {
2194
+ throw "URI too long";
2195
+ }
2196
+ var src = str,
2197
+ b = str.indexOf('['),
2198
+ e = str.indexOf(']');
2199
+ if (b != -1 && e != -1) {
2200
+ str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);
2201
+ }
2202
+ var m = re.exec(str || ''),
2203
+ uri = {},
2204
+ i = 14;
2205
+ while (i--) {
2206
+ uri[parts[i]] = m[i] || '';
2207
+ }
2208
+ if (b != -1 && e != -1) {
2209
+ uri.source = src;
2210
+ uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');
2211
+ uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');
2212
+ uri.ipv6uri = true;
2213
+ }
2214
+ uri.pathNames = pathNames(uri, uri['path']);
2215
+ uri.queryKey = queryKey(uri, uri['query']);
2216
+ return uri;
2217
+ }
2218
+ function pathNames(obj, path) {
2219
+ var regx = /\/{2,9}/g,
2220
+ names = path.replace(regx, "/").split("/");
2221
+ if (path.slice(0, 1) == '/' || path.length === 0) {
2222
+ names.splice(0, 1);
2223
+ }
2224
+ if (path.slice(-1) == '/') {
2225
+ names.splice(names.length - 1, 1);
2226
+ }
2227
+ return names;
2228
+ }
2229
+ function queryKey(uri, query) {
2230
+ var data = {};
2231
+ query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {
2232
+ if ($1) {
2233
+ data[$1] = $2;
2234
+ }
2235
+ });
2236
+ return data;
2237
+ }
2238
+
2239
+ var debug = debugModule("engine.io-client:socket"); // debug()
2240
+ var withEventListeners = typeof addEventListener === "function" && typeof removeEventListener === "function";
2241
+ var OFFLINE_EVENT_LISTENERS = [];
2242
+ if (withEventListeners) {
2243
+ // within a ServiceWorker, any event handler for the 'offline' event must be added on the initial evaluation of the
2244
+ // script, so we create one single event listener here which will forward the event to the socket instances
2245
+ addEventListener("offline", function () {
2246
+ debug("closing %d connection(s) because the network was lost", OFFLINE_EVENT_LISTENERS.length);
2247
+ OFFLINE_EVENT_LISTENERS.forEach(function (listener) {
2248
+ return listener();
2249
+ });
2250
+ }, false);
2251
+ }
2252
+ /**
2253
+ * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
2254
+ * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
2255
+ *
2256
+ * This class comes without upgrade mechanism, which means that it will keep the first low-level transport that
2257
+ * successfully establishes the connection.
2258
+ *
2259
+ * In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.
2260
+ *
2261
+ * @example
2262
+ * import { SocketWithoutUpgrade, WebSocket } from "engine.io-client";
2263
+ *
2264
+ * const socket = new SocketWithoutUpgrade({
2265
+ * transports: [WebSocket]
2266
+ * });
2267
+ *
2268
+ * socket.on("open", () => {
2269
+ * socket.send("hello");
2270
+ * });
2271
+ *
2272
+ * @see SocketWithUpgrade
2273
+ * @see Socket
2274
+ */
2275
+ var SocketWithoutUpgrade = /*#__PURE__*/function (_Emitter) {
2276
+ /**
2277
+ * Socket constructor.
2278
+ *
2279
+ * @param {String|Object} uri - uri or options
2280
+ * @param {Object} opts - options
2281
+ */
2282
+ function SocketWithoutUpgrade(uri, opts) {
2283
+ var _this;
2284
+ _this = _Emitter.call(this) || this;
2285
+ _this.binaryType = defaultBinaryType;
2286
+ _this.writeBuffer = [];
2287
+ _this._prevBufferLen = 0;
2288
+ _this._pingInterval = -1;
2289
+ _this._pingTimeout = -1;
2290
+ _this._maxPayload = -1;
2291
+ /**
2292
+ * The expiration timestamp of the {@link _pingTimeoutTimer} object is tracked, in case the timer is throttled and the
2293
+ * callback is not fired on time. This can happen for example when a laptop is suspended or when a phone is locked.
2294
+ */
2295
+ _this._pingTimeoutTime = Infinity;
2296
+ if (uri && "object" === _typeof(uri)) {
2297
+ opts = uri;
2298
+ uri = null;
2299
+ }
2300
+ if (uri) {
2301
+ var parsedUri = parse(uri);
2302
+ opts.hostname = parsedUri.host;
2303
+ opts.secure = parsedUri.protocol === "https" || parsedUri.protocol === "wss";
2304
+ opts.port = parsedUri.port;
2305
+ if (parsedUri.query) opts.query = parsedUri.query;
2306
+ } else if (opts.host) {
2307
+ opts.hostname = parse(opts.host).host;
2308
+ }
2309
+ installTimerFunctions(_this, opts);
2310
+ _this.secure = null != opts.secure ? opts.secure : typeof location !== "undefined" && "https:" === location.protocol;
2311
+ if (opts.hostname && !opts.port) {
2312
+ // if no port is specified manually, use the protocol default
2313
+ opts.port = _this.secure ? "443" : "80";
2314
+ }
2315
+ _this.hostname = opts.hostname || (typeof location !== "undefined" ? location.hostname : "localhost");
2316
+ _this.port = opts.port || (typeof location !== "undefined" && location.port ? location.port : _this.secure ? "443" : "80");
2317
+ _this.transports = [];
2318
+ _this._transportsByName = {};
2319
+ opts.transports.forEach(function (t) {
2320
+ var transportName = t.prototype.name;
2321
+ _this.transports.push(transportName);
2322
+ _this._transportsByName[transportName] = t;
2323
+ });
2324
+ _this.opts = _extends({
2325
+ path: "/engine.io",
2326
+ agent: false,
2327
+ withCredentials: false,
2328
+ upgrade: true,
2329
+ timestampParam: "t",
2330
+ rememberUpgrade: false,
2331
+ addTrailingSlash: true,
2332
+ rejectUnauthorized: true,
2333
+ perMessageDeflate: {
2334
+ threshold: 1024
2335
+ },
2336
+ transportOptions: {},
2337
+ closeOnBeforeunload: false
2338
+ }, opts);
2339
+ _this.opts.path = _this.opts.path.replace(/\/$/, "") + (_this.opts.addTrailingSlash ? "/" : "");
2340
+ if (typeof _this.opts.query === "string") {
2341
+ _this.opts.query = decode(_this.opts.query);
2342
+ }
2343
+ if (withEventListeners) {
2344
+ if (_this.opts.closeOnBeforeunload) {
2345
+ // Firefox closes the connection when the "beforeunload" event is emitted but not Chrome. This event listener
2346
+ // ensures every browser behaves the same (no "disconnect" event at the Socket.IO level when the page is
2347
+ // closed/reloaded)
2348
+ _this._beforeunloadEventListener = function () {
2349
+ if (_this.transport) {
2350
+ // silently close the transport
2351
+ _this.transport.removeAllListeners();
2352
+ _this.transport.close();
2353
+ }
2354
+ };
2355
+ addEventListener("beforeunload", _this._beforeunloadEventListener, false);
2356
+ }
2357
+ if (_this.hostname !== "localhost") {
2358
+ debug("adding listener for the 'offline' event");
2359
+ _this._offlineEventListener = function () {
2360
+ _this._onClose("transport close", {
2361
+ description: "network connection lost"
2362
+ });
2363
+ };
2364
+ OFFLINE_EVENT_LISTENERS.push(_this._offlineEventListener);
2365
+ }
2366
+ }
2367
+ if (_this.opts.withCredentials) {
2368
+ _this._cookieJar = createCookieJar();
2369
+ }
2370
+ _this._open();
2371
+ return _this;
2372
+ }
2373
+ /**
2374
+ * Creates transport of the given type.
2375
+ *
2376
+ * @param {String} name - transport name
2377
+ * @return {Transport}
2378
+ * @private
2379
+ */
2380
+ _inheritsLoose(SocketWithoutUpgrade, _Emitter);
2381
+ var _proto = SocketWithoutUpgrade.prototype;
2382
+ _proto.createTransport = function createTransport(name) {
2383
+ debug('creating transport "%s"', name);
2384
+ var query = _extends({}, this.opts.query);
2385
+ // append engine.io protocol identifier
2386
+ query.EIO = protocol;
2387
+ // transport name
2388
+ query.transport = name;
2389
+ // session id if we already have one
2390
+ if (this.id) query.sid = this.id;
2391
+ var opts = _extends({}, this.opts, {
2392
+ query: query,
2393
+ socket: this,
2394
+ hostname: this.hostname,
2395
+ secure: this.secure,
2396
+ port: this.port
2397
+ }, this.opts.transportOptions[name]);
2398
+ debug("options: %j", opts);
2399
+ return new this._transportsByName[name](opts);
2400
+ }
2401
+ /**
2402
+ * Initializes transport to use and starts probe.
2403
+ *
2404
+ * @private
2405
+ */;
2406
+ _proto._open = function _open() {
2407
+ var _this2 = this;
2408
+ if (this.transports.length === 0) {
2409
+ // Emit error on next tick so it can be listened to
2410
+ this.setTimeoutFn(function () {
2411
+ _this2.emitReserved("error", "No transports available");
2412
+ }, 0);
2413
+ return;
2414
+ }
2415
+ var transportName = this.opts.rememberUpgrade && SocketWithoutUpgrade.priorWebsocketSuccess && this.transports.indexOf("websocket") !== -1 ? "websocket" : this.transports[0];
2416
+ this.readyState = "opening";
2417
+ var transport = this.createTransport(transportName);
2418
+ transport.open();
2419
+ this.setTransport(transport);
2420
+ }
2421
+ /**
2422
+ * Sets the current transport. Disables the existing one (if any).
2423
+ *
2424
+ * @private
2425
+ */;
2426
+ _proto.setTransport = function setTransport(transport) {
2427
+ var _this3 = this;
2428
+ debug("setting transport %s", transport.name);
2429
+ if (this.transport) {
2430
+ debug("clearing existing transport %s", this.transport.name);
2431
+ this.transport.removeAllListeners();
2432
+ }
2433
+ // set up transport
2434
+ this.transport = transport;
2435
+ // set up transport listeners
2436
+ transport.on("drain", this._onDrain.bind(this)).on("packet", this._onPacket.bind(this)).on("error", this._onError.bind(this)).on("close", function (reason) {
2437
+ return _this3._onClose("transport close", reason);
2438
+ });
2439
+ }
2440
+ /**
2441
+ * Called when connection is deemed open.
2442
+ *
2443
+ * @private
2444
+ */;
2445
+ _proto.onOpen = function onOpen() {
2446
+ debug("socket open");
2447
+ this.readyState = "open";
2448
+ SocketWithoutUpgrade.priorWebsocketSuccess = "websocket" === this.transport.name;
2449
+ this.emitReserved("open");
2450
+ this.flush();
2451
+ }
2452
+ /**
2453
+ * Handles a packet.
2454
+ *
2455
+ * @private
2456
+ */;
2457
+ _proto._onPacket = function _onPacket(packet) {
2458
+ if ("opening" === this.readyState || "open" === this.readyState || "closing" === this.readyState) {
2459
+ debug('socket receive: type "%s", data "%s"', packet.type, packet.data);
2460
+ this.emitReserved("packet", packet);
2461
+ // Socket is live - any packet counts
2462
+ this.emitReserved("heartbeat");
2463
+ switch (packet.type) {
2464
+ case "open":
2465
+ this.onHandshake(JSON.parse(packet.data));
2466
+ break;
2467
+ case "ping":
2468
+ this._sendPacket("pong");
2469
+ this.emitReserved("ping");
2470
+ this.emitReserved("pong");
2471
+ this._resetPingTimeout();
2472
+ break;
2473
+ case "error":
2474
+ var err = new Error("server error");
2475
+ // @ts-ignore
2476
+ err.code = packet.data;
2477
+ this._onError(err);
2478
+ break;
2479
+ case "message":
2480
+ this.emitReserved("data", packet.data);
2481
+ this.emitReserved("message", packet.data);
2482
+ break;
2483
+ }
2484
+ } else {
2485
+ debug('packet received with socket readyState "%s"', this.readyState);
2486
+ }
2487
+ }
2488
+ /**
2489
+ * Called upon handshake completion.
2490
+ *
2491
+ * @param {Object} data - handshake obj
2492
+ * @private
2493
+ */;
2494
+ _proto.onHandshake = function onHandshake(data) {
2495
+ this.emitReserved("handshake", data);
2496
+ this.id = data.sid;
2497
+ this.transport.query.sid = data.sid;
2498
+ this._pingInterval = data.pingInterval;
2499
+ this._pingTimeout = data.pingTimeout;
2500
+ this._maxPayload = data.maxPayload;
2501
+ this.onOpen();
2502
+ // In case open handler closes socket
2503
+ if ("closed" === this.readyState) return;
2504
+ this._resetPingTimeout();
2505
+ }
2506
+ /**
2507
+ * Sets and resets ping timeout timer based on server pings.
2508
+ *
2509
+ * @private
2510
+ */;
2511
+ _proto._resetPingTimeout = function _resetPingTimeout() {
2512
+ var _this4 = this;
2513
+ this.clearTimeoutFn(this._pingTimeoutTimer);
2514
+ var delay = this._pingInterval + this._pingTimeout;
2515
+ this._pingTimeoutTime = Date.now() + delay;
2516
+ this._pingTimeoutTimer = this.setTimeoutFn(function () {
2517
+ _this4._onClose("ping timeout");
2518
+ }, delay);
2519
+ if (this.opts.autoUnref) {
2520
+ this._pingTimeoutTimer.unref();
2521
+ }
2522
+ }
2523
+ /**
2524
+ * Called on `drain` event
2525
+ *
2526
+ * @private
2527
+ */;
2528
+ _proto._onDrain = function _onDrain() {
2529
+ this.writeBuffer.splice(0, this._prevBufferLen);
2530
+ // setting prevBufferLen = 0 is very important
2531
+ // for example, when upgrading, upgrade packet is sent over,
2532
+ // and a nonzero prevBufferLen could cause problems on `drain`
2533
+ this._prevBufferLen = 0;
2534
+ if (0 === this.writeBuffer.length) {
2535
+ this.emitReserved("drain");
2536
+ } else {
2537
+ this.flush();
2538
+ }
2539
+ }
2540
+ /**
2541
+ * Flush write buffers.
2542
+ *
2543
+ * @private
2544
+ */;
2545
+ _proto.flush = function flush() {
2546
+ if ("closed" !== this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length) {
2547
+ var packets = this._getWritablePackets();
2548
+ debug("flushing %d packets in socket", packets.length);
2549
+ this.transport.send(packets);
2550
+ // keep track of current length of writeBuffer
2551
+ // splice writeBuffer and callbackBuffer on `drain`
2552
+ this._prevBufferLen = packets.length;
2553
+ this.emitReserved("flush");
2554
+ }
2555
+ }
2556
+ /**
2557
+ * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP
2558
+ * long-polling)
2559
+ *
2560
+ * @private
2561
+ */;
2562
+ _proto._getWritablePackets = function _getWritablePackets() {
2563
+ var shouldCheckPayloadSize = this._maxPayload && this.transport.name === "polling" && this.writeBuffer.length > 1;
2564
+ if (!shouldCheckPayloadSize) {
2565
+ return this.writeBuffer;
2566
+ }
2567
+ var payloadSize = 1; // first packet type
2568
+ for (var i = 0; i < this.writeBuffer.length; i++) {
2569
+ var data = this.writeBuffer[i].data;
2570
+ if (data) {
2571
+ payloadSize += byteLength(data);
2572
+ }
2573
+ if (i > 0 && payloadSize > this._maxPayload) {
2574
+ debug("only send %d out of %d packets", i, this.writeBuffer.length);
2575
+ return this.writeBuffer.slice(0, i);
2576
+ }
2577
+ payloadSize += 2; // separator + packet type
2578
+ }
2579
+ debug("payload size is %d (max: %d)", payloadSize, this._maxPayload);
2580
+ return this.writeBuffer;
2581
+ }
2582
+ /**
2583
+ * Checks whether the heartbeat timer has expired but the socket has not yet been notified.
2584
+ *
2585
+ * Note: this method is private for now because it does not really fit the WebSocket API, but if we put it in the
2586
+ * `write()` method then the message would not be buffered by the Socket.IO client.
2587
+ *
2588
+ * @return {boolean}
2589
+ * @private
2590
+ */
2591
+ /* private */;
2592
+ _proto._hasPingExpired = function _hasPingExpired() {
2593
+ var _this5 = this;
2594
+ if (!this._pingTimeoutTime) return true;
2595
+ var hasExpired = Date.now() > this._pingTimeoutTime;
2596
+ if (hasExpired) {
2597
+ debug("throttled timer detected, scheduling connection close");
2598
+ this._pingTimeoutTime = 0;
2599
+ nextTick(function () {
2600
+ _this5._onClose("ping timeout");
2601
+ }, this.setTimeoutFn);
2602
+ }
2603
+ return hasExpired;
2604
+ }
2605
+ /**
2606
+ * Sends a message.
2607
+ *
2608
+ * @param {String} msg - message.
2609
+ * @param {Object} options.
2610
+ * @param {Function} fn - callback function.
2611
+ * @return {Socket} for chaining.
2612
+ */;
2613
+ _proto.write = function write(msg, options, fn) {
2614
+ this._sendPacket("message", msg, options, fn);
2615
+ return this;
2616
+ }
2617
+ /**
2618
+ * Sends a message. Alias of {@link Socket#write}.
2619
+ *
2620
+ * @param {String} msg - message.
2621
+ * @param {Object} options.
2622
+ * @param {Function} fn - callback function.
2623
+ * @return {Socket} for chaining.
2624
+ */;
2625
+ _proto.send = function send(msg, options, fn) {
2626
+ this._sendPacket("message", msg, options, fn);
2627
+ return this;
2628
+ }
2629
+ /**
2630
+ * Sends a packet.
2631
+ *
2632
+ * @param {String} type: packet type.
2633
+ * @param {String} data.
2634
+ * @param {Object} options.
2635
+ * @param {Function} fn - callback function.
2636
+ * @private
2637
+ */;
2638
+ _proto._sendPacket = function _sendPacket(type, data, options, fn) {
2639
+ if ("function" === typeof data) {
2640
+ fn = data;
2641
+ data = undefined;
2642
+ }
2643
+ if ("function" === typeof options) {
2644
+ fn = options;
2645
+ options = null;
2646
+ }
2647
+ if ("closing" === this.readyState || "closed" === this.readyState) {
2648
+ return;
2649
+ }
2650
+ options = options || {};
2651
+ options.compress = false !== options.compress;
2652
+ var packet = {
2653
+ type: type,
2654
+ data: data,
2655
+ options: options
2656
+ };
2657
+ this.emitReserved("packetCreate", packet);
2658
+ this.writeBuffer.push(packet);
2659
+ if (fn) this.once("flush", fn);
2660
+ this.flush();
2661
+ }
2662
+ /**
2663
+ * Closes the connection.
2664
+ */;
2665
+ _proto.close = function close() {
2666
+ var _this6 = this;
2667
+ var close = function close() {
2668
+ _this6._onClose("forced close");
2669
+ debug("socket closing - telling transport to close");
2670
+ _this6.transport.close();
2671
+ };
2672
+ var cleanupAndClose = function cleanupAndClose() {
2673
+ _this6.off("upgrade", cleanupAndClose);
2674
+ _this6.off("upgradeError", cleanupAndClose);
2675
+ close();
2676
+ };
2677
+ var waitForUpgrade = function waitForUpgrade() {
2678
+ // wait for upgrade to finish since we can't send packets while pausing a transport
2679
+ _this6.once("upgrade", cleanupAndClose);
2680
+ _this6.once("upgradeError", cleanupAndClose);
2681
+ };
2682
+ if ("opening" === this.readyState || "open" === this.readyState) {
2683
+ this.readyState = "closing";
2684
+ if (this.writeBuffer.length) {
2685
+ this.once("drain", function () {
2686
+ if (_this6.upgrading) {
2687
+ waitForUpgrade();
2688
+ } else {
2689
+ close();
2690
+ }
2691
+ });
2692
+ } else if (this.upgrading) {
2693
+ waitForUpgrade();
2694
+ } else {
2695
+ close();
2696
+ }
2697
+ }
2698
+ return this;
2699
+ }
2700
+ /**
2701
+ * Called upon transport error
2702
+ *
2703
+ * @private
2704
+ */;
2705
+ _proto._onError = function _onError(err) {
2706
+ debug("socket error %j", err);
2707
+ SocketWithoutUpgrade.priorWebsocketSuccess = false;
2708
+ if (this.opts.tryAllTransports && this.transports.length > 1 && this.readyState === "opening") {
2709
+ debug("trying next transport");
2710
+ this.transports.shift();
2711
+ return this._open();
2712
+ }
2713
+ this.emitReserved("error", err);
2714
+ this._onClose("transport error", err);
2715
+ }
2716
+ /**
2717
+ * Called upon transport close.
2718
+ *
2719
+ * @private
2720
+ */;
2721
+ _proto._onClose = function _onClose(reason, description) {
2722
+ if ("opening" === this.readyState || "open" === this.readyState || "closing" === this.readyState) {
2723
+ debug('socket close with reason: "%s"', reason);
2724
+ // clear timers
2725
+ this.clearTimeoutFn(this._pingTimeoutTimer);
2726
+ // stop event from firing again for transport
2727
+ this.transport.removeAllListeners("close");
2728
+ // ensure transport won't stay open
2729
+ this.transport.close();
2730
+ // ignore further transport communication
2731
+ this.transport.removeAllListeners();
2732
+ if (withEventListeners) {
2733
+ if (this._beforeunloadEventListener) {
2734
+ removeEventListener("beforeunload", this._beforeunloadEventListener, false);
2735
+ }
2736
+ if (this._offlineEventListener) {
2737
+ var i = OFFLINE_EVENT_LISTENERS.indexOf(this._offlineEventListener);
2738
+ if (i !== -1) {
2739
+ debug("removing listener for the 'offline' event");
2740
+ OFFLINE_EVENT_LISTENERS.splice(i, 1);
2741
+ }
2742
+ }
2743
+ }
2744
+ // set ready state
2745
+ this.readyState = "closed";
2746
+ // clear session id
2747
+ this.id = null;
2748
+ // emit close event
2749
+ this.emitReserved("close", reason, description);
2750
+ // clean buffers after, so users can still
2751
+ // grab the buffers on `close` event
2752
+ this.writeBuffer = [];
2753
+ this._prevBufferLen = 0;
2754
+ }
2755
+ };
2756
+ return SocketWithoutUpgrade;
2757
+ }(Emitter);
2758
+ SocketWithoutUpgrade.protocol = protocol;
2759
+ /**
2760
+ * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
2761
+ * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
2762
+ *
2763
+ * This class comes with an upgrade mechanism, which means that once the connection is established with the first
2764
+ * low-level transport, it will try to upgrade to a better transport.
2765
+ *
2766
+ * In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.
2767
+ *
2768
+ * @example
2769
+ * import { SocketWithUpgrade, WebSocket } from "engine.io-client";
2770
+ *
2771
+ * const socket = new SocketWithUpgrade({
2772
+ * transports: [WebSocket]
2773
+ * });
2774
+ *
2775
+ * socket.on("open", () => {
2776
+ * socket.send("hello");
2777
+ * });
2778
+ *
2779
+ * @see SocketWithoutUpgrade
2780
+ * @see Socket
2781
+ */
2782
+ var SocketWithUpgrade = /*#__PURE__*/function (_SocketWithoutUpgrade) {
2783
+ function SocketWithUpgrade() {
2784
+ var _this7;
2785
+ _this7 = _SocketWithoutUpgrade.apply(this, arguments) || this;
2786
+ _this7._upgrades = [];
2787
+ return _this7;
2788
+ }
2789
+ _inheritsLoose(SocketWithUpgrade, _SocketWithoutUpgrade);
2790
+ var _proto2 = SocketWithUpgrade.prototype;
2791
+ _proto2.onOpen = function onOpen() {
2792
+ _SocketWithoutUpgrade.prototype.onOpen.call(this);
2793
+ if ("open" === this.readyState && this.opts.upgrade) {
2794
+ debug("starting upgrade probes");
2795
+ for (var i = 0; i < this._upgrades.length; i++) {
2796
+ this._probe(this._upgrades[i]);
2797
+ }
2798
+ }
2799
+ }
2800
+ /**
2801
+ * Probes a transport.
2802
+ *
2803
+ * @param {String} name - transport name
2804
+ * @private
2805
+ */;
2806
+ _proto2._probe = function _probe(name) {
2807
+ var _this8 = this;
2808
+ debug('probing transport "%s"', name);
2809
+ var transport = this.createTransport(name);
2810
+ var failed = false;
2811
+ SocketWithoutUpgrade.priorWebsocketSuccess = false;
2812
+ var onTransportOpen = function onTransportOpen() {
2813
+ if (failed) return;
2814
+ debug('probe transport "%s" opened', name);
2815
+ transport.send([{
2816
+ type: "ping",
2817
+ data: "probe"
2818
+ }]);
2819
+ transport.once("packet", function (msg) {
2820
+ if (failed) return;
2821
+ if ("pong" === msg.type && "probe" === msg.data) {
2822
+ debug('probe transport "%s" pong', name);
2823
+ _this8.upgrading = true;
2824
+ _this8.emitReserved("upgrading", transport);
2825
+ if (!transport) return;
2826
+ SocketWithoutUpgrade.priorWebsocketSuccess = "websocket" === transport.name;
2827
+ debug('pausing current transport "%s"', _this8.transport.name);
2828
+ _this8.transport.pause(function () {
2829
+ if (failed) return;
2830
+ if ("closed" === _this8.readyState) return;
2831
+ debug("changing transport and sending upgrade packet");
2832
+ cleanup();
2833
+ _this8.setTransport(transport);
2834
+ transport.send([{
2835
+ type: "upgrade"
2836
+ }]);
2837
+ _this8.emitReserved("upgrade", transport);
2838
+ transport = null;
2839
+ _this8.upgrading = false;
2840
+ _this8.flush();
2841
+ });
2842
+ } else {
2843
+ debug('probe transport "%s" failed', name);
2844
+ var err = new Error("probe error");
2845
+ // @ts-ignore
2846
+ err.transport = transport.name;
2847
+ _this8.emitReserved("upgradeError", err);
2848
+ }
2849
+ });
2850
+ };
2851
+ function freezeTransport() {
2852
+ if (failed) return;
2853
+ // Any callback called by transport should be ignored since now
2854
+ failed = true;
2855
+ cleanup();
2856
+ transport.close();
2857
+ transport = null;
2858
+ }
2859
+ // Handle any error that happens while probing
2860
+ var onerror = function onerror(err) {
2861
+ var error = new Error("probe error: " + err);
2862
+ // @ts-ignore
2863
+ error.transport = transport.name;
2864
+ freezeTransport();
2865
+ debug('probe transport "%s" failed because of error: %s', name, err);
2866
+ _this8.emitReserved("upgradeError", error);
2867
+ };
2868
+ function onTransportClose() {
2869
+ onerror("transport closed");
2870
+ }
2871
+ // When the socket is closed while we're probing
2872
+ function onclose() {
2873
+ onerror("socket closed");
2874
+ }
2875
+ // When the socket is upgraded while we're probing
2876
+ function onupgrade(to) {
2877
+ if (transport && to.name !== transport.name) {
2878
+ debug('"%s" works - aborting "%s"', to.name, transport.name);
2879
+ freezeTransport();
2880
+ }
2881
+ }
2882
+ // Remove all listeners on the transport and on self
2883
+ var cleanup = function cleanup() {
2884
+ transport.removeListener("open", onTransportOpen);
2885
+ transport.removeListener("error", onerror);
2886
+ transport.removeListener("close", onTransportClose);
2887
+ _this8.off("close", onclose);
2888
+ _this8.off("upgrading", onupgrade);
2889
+ };
2890
+ transport.once("open", onTransportOpen);
2891
+ transport.once("error", onerror);
2892
+ transport.once("close", onTransportClose);
2893
+ this.once("close", onclose);
2894
+ this.once("upgrading", onupgrade);
2895
+ if (this._upgrades.indexOf("webtransport") !== -1 && name !== "webtransport") {
2896
+ // favor WebTransport
2897
+ this.setTimeoutFn(function () {
2898
+ if (!failed) {
2899
+ transport.open();
2900
+ }
2901
+ }, 200);
2902
+ } else {
2903
+ transport.open();
2904
+ }
2905
+ };
2906
+ _proto2.onHandshake = function onHandshake(data) {
2907
+ this._upgrades = this._filterUpgrades(data.upgrades);
2908
+ _SocketWithoutUpgrade.prototype.onHandshake.call(this, data);
2909
+ }
2910
+ /**
2911
+ * Filters upgrades, returning only those matching client transports.
2912
+ *
2913
+ * @param {Array} upgrades - server upgrades
2914
+ * @private
2915
+ */;
2916
+ _proto2._filterUpgrades = function _filterUpgrades(upgrades) {
2917
+ var filteredUpgrades = [];
2918
+ for (var i = 0; i < upgrades.length; i++) {
2919
+ if (~this.transports.indexOf(upgrades[i])) filteredUpgrades.push(upgrades[i]);
2920
+ }
2921
+ return filteredUpgrades;
2922
+ };
2923
+ return SocketWithUpgrade;
2924
+ }(SocketWithoutUpgrade);
2925
+ /**
2926
+ * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
2927
+ * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
2928
+ *
2929
+ * This class comes with an upgrade mechanism, which means that once the connection is established with the first
2930
+ * low-level transport, it will try to upgrade to a better transport.
2931
+ *
2932
+ * @example
2933
+ * import { Socket } from "engine.io-client";
2934
+ *
2935
+ * const socket = new Socket();
2936
+ *
2937
+ * socket.on("open", () => {
2938
+ * socket.send("hello");
2939
+ * });
2940
+ *
2941
+ * @see SocketWithoutUpgrade
2942
+ * @see SocketWithUpgrade
2943
+ */
2944
+ var Socket = /*#__PURE__*/function (_SocketWithUpgrade) {
2945
+ function Socket(uri) {
2946
+ var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2947
+ var o = _typeof(uri) === "object" ? uri : opts;
2948
+ if (!o.transports || o.transports && typeof o.transports[0] === "string") {
2949
+ o.transports = (o.transports || ["polling", "websocket", "webtransport"]).map(function (transportName) {
2950
+ return transports[transportName];
2951
+ }).filter(function (t) {
2952
+ return !!t;
2953
+ });
2954
+ }
2955
+ return _SocketWithUpgrade.call(this, uri, o) || this;
2956
+ }
2957
+ _inheritsLoose(Socket, _SocketWithUpgrade);
2958
+ return Socket;
2959
+ }(SocketWithUpgrade);
2960
+
2961
+ var browserEntrypoint = (function (uri, opts) {
2962
+ return new Socket(uri, opts);
2963
+ });
2964
+
2965
+ return browserEntrypoint;
2966
+
2967
+ }));
2968
+ //# sourceMappingURL=engine.io.js.map