@frankieone/one-sdk 0.1.0-poc.18 → 0.2.2-alpha

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 (437) hide show
  1. package/dist/commit.txt +1 -1
  2. package/dist/esm/modules/biometrics/constants.d.ts +2 -0
  3. package/dist/esm/modules/biometrics/constants.js +2 -0
  4. package/dist/esm/modules/biometrics/constants.js.map +1 -0
  5. package/dist/esm/modules/biometrics/index.d.ts +4 -0
  6. package/dist/esm/modules/biometrics/index.js +71 -0
  7. package/dist/esm/modules/biometrics/index.js.map +1 -0
  8. package/dist/esm/modules/biometrics/parseConfiguration.d.ts +4 -0
  9. package/dist/esm/modules/biometrics/parseConfiguration.js +9 -0
  10. package/dist/esm/modules/biometrics/parseConfiguration.js.map +1 -0
  11. package/dist/esm/modules/biometrics/types/events.d.ts +23 -0
  12. package/dist/esm/modules/biometrics/types/events.js +2 -0
  13. package/dist/esm/modules/biometrics/types/events.js.map +1 -0
  14. package/dist/esm/modules/biometrics/types/index.d.ts +3 -0
  15. package/dist/esm/modules/biometrics/types/index.js +4 -0
  16. package/dist/esm/modules/biometrics/types/index.js.map +1 -0
  17. package/dist/esm/modules/biometrics/types/module.d.ts +8 -0
  18. package/dist/esm/modules/biometrics/types/module.js +2 -0
  19. package/dist/esm/modules/biometrics/types/module.js.map +1 -0
  20. package/dist/esm/modules/biometrics/types/wrapper.d.ts +19 -0
  21. package/dist/esm/modules/biometrics/types/wrapper.js +2 -0
  22. package/dist/esm/modules/biometrics/types/wrapper.js.map +1 -0
  23. package/dist/esm/modules/biometrics/wrappers/OcrLabs/index.d.ts +2 -0
  24. package/dist/esm/modules/biometrics/wrappers/OcrLabs/index.js +221 -0
  25. package/dist/esm/modules/biometrics/wrappers/OcrLabs/index.js.map +1 -0
  26. package/dist/esm/modules/biometrics/wrappers/dummy-biometrics/green-tick-svg.d.ts +1 -0
  27. package/dist/esm/modules/biometrics/wrappers/dummy-biometrics/green-tick-svg.js +2 -0
  28. package/dist/esm/modules/biometrics/wrappers/dummy-biometrics/green-tick-svg.js.map +1 -0
  29. package/dist/esm/modules/biometrics/wrappers/dummy-biometrics/index.d.ts +2 -0
  30. package/dist/esm/modules/biometrics/wrappers/dummy-biometrics/index.js +98 -0
  31. package/dist/esm/modules/biometrics/wrappers/dummy-biometrics/index.js.map +1 -0
  32. package/dist/esm/modules/common/constants.d.ts +5 -2
  33. package/dist/esm/modules/common/constants.js +5 -1
  34. package/dist/esm/modules/common/constants.js.map +1 -1
  35. package/dist/esm/modules/common/index.d.ts +6 -3
  36. package/dist/esm/modules/common/index.js +6 -3
  37. package/dist/esm/modules/common/index.js.map +1 -1
  38. package/dist/esm/modules/common/modules/ReactiveStore.d.ts +29 -0
  39. package/dist/esm/modules/common/modules/ReactiveStore.js +98 -0
  40. package/dist/esm/modules/common/modules/ReactiveStore.js.map +1 -0
  41. package/dist/esm/modules/common/modules/UnpersistedModel.d.ts +17 -0
  42. package/dist/esm/modules/common/modules/UnpersistedModel.js +33 -0
  43. package/dist/esm/modules/common/modules/UnpersistedModel.js.map +1 -0
  44. package/dist/esm/modules/common/modules/base64.d.ts +4 -4
  45. package/dist/esm/modules/common/modules/base64.js +7 -7
  46. package/dist/esm/modules/common/modules/base64.js.map +1 -1
  47. package/dist/esm/modules/common/modules/env2url.d.ts +2 -1
  48. package/dist/esm/modules/common/modules/env2url.js +3 -0
  49. package/dist/esm/modules/common/modules/env2url.js.map +1 -1
  50. package/dist/esm/modules/common/modules/error.d.ts +3 -0
  51. package/dist/esm/modules/common/modules/error.js +8 -0
  52. package/dist/esm/modules/common/modules/error.js.map +1 -0
  53. package/dist/esm/modules/common/modules/eventHub.d.ts +30 -4
  54. package/dist/esm/modules/common/modules/eventHub.js +9 -3
  55. package/dist/esm/modules/common/modules/eventHub.js.map +1 -1
  56. package/dist/esm/modules/common/modules/objectUtils.d.ts +14 -0
  57. package/dist/esm/modules/common/modules/objectUtils.js +64 -0
  58. package/dist/esm/modules/common/modules/objectUtils.js.map +1 -0
  59. package/dist/esm/modules/common/modules/rxjsOperators.d.ts +1 -0
  60. package/dist/esm/modules/common/modules/rxjsOperators.js +5 -0
  61. package/dist/esm/modules/common/modules/rxjsOperators.js.map +1 -0
  62. package/dist/esm/modules/common/shared/KvpList.d.ts +29 -0
  63. package/dist/esm/modules/common/shared/KvpList.js +134 -0
  64. package/dist/esm/modules/common/shared/KvpList.js.map +1 -0
  65. package/dist/esm/modules/common/shared/data/aus_states.json +10 -0
  66. package/dist/esm/modules/common/shared/data/country.json +19592 -0
  67. package/dist/esm/modules/common/shared/models/Address.d.ts +67 -0
  68. package/dist/esm/modules/common/shared/models/Address.js +155 -0
  69. package/dist/esm/modules/common/shared/models/Address.js.map +1 -0
  70. package/dist/esm/modules/common/shared/models/Admin.d.ts +1295 -0
  71. package/dist/esm/modules/common/shared/models/Admin.js +6 -0
  72. package/dist/esm/modules/common/shared/models/Admin.js.map +1 -0
  73. package/dist/esm/modules/common/shared/models/AmlCheckResult.d.ts +77 -0
  74. package/dist/esm/modules/common/shared/models/AmlCheckResult.js +45 -0
  75. package/dist/esm/modules/common/shared/models/AmlCheckResult.js.map +1 -0
  76. package/dist/esm/modules/common/shared/models/AmlMatchDetails.d.ts +37 -0
  77. package/dist/esm/modules/common/shared/models/AmlMatchDetails.js +19 -0
  78. package/dist/esm/modules/common/shared/models/AmlMatchDetails.js.map +1 -0
  79. package/dist/esm/modules/common/shared/models/Applicant.d.ts +119 -0
  80. package/dist/esm/modules/common/shared/models/Applicant.js +167 -0
  81. package/dist/esm/modules/common/shared/models/Applicant.js.map +1 -0
  82. package/dist/esm/modules/common/shared/models/ApplicantSummary.d.ts +90 -0
  83. package/dist/esm/modules/common/shared/models/ApplicantSummary.js +52 -0
  84. package/dist/esm/modules/common/shared/models/ApplicantSummary.js.map +1 -0
  85. package/dist/esm/modules/common/shared/models/AssociatedParty.d.ts +42 -0
  86. package/dist/esm/modules/common/shared/models/AssociatedParty.js +39 -0
  87. package/dist/esm/modules/common/shared/models/AssociatedParty.js.map +1 -0
  88. package/dist/esm/modules/common/shared/models/AuditEntry.d.ts +81 -0
  89. package/dist/esm/modules/common/shared/models/AuditEntry.js +106 -0
  90. package/dist/esm/modules/common/shared/models/AuditEntry.js.map +1 -0
  91. package/dist/esm/modules/common/shared/models/AuditLogV2.d.ts +57 -0
  92. package/dist/esm/modules/common/shared/models/AuditLogV2.js +75 -0
  93. package/dist/esm/modules/common/shared/models/AuditLogV2.js.map +1 -0
  94. package/dist/esm/modules/common/shared/models/BiometryReport.d.ts +35 -0
  95. package/dist/esm/modules/common/shared/models/BiometryReport.js +22 -0
  96. package/dist/esm/modules/common/shared/models/BiometryReport.js.map +1 -0
  97. package/dist/esm/modules/common/shared/models/BlockListSummary.d.ts +46 -0
  98. package/dist/esm/modules/common/shared/models/BlockListSummary.js +56 -0
  99. package/dist/esm/modules/common/shared/models/BlockListSummary.js.map +1 -0
  100. package/dist/esm/modules/common/shared/models/Blueprint.d.ts +26 -0
  101. package/dist/esm/modules/common/shared/models/Blueprint.js +2 -0
  102. package/dist/esm/modules/common/shared/models/Blueprint.js.map +1 -0
  103. package/dist/esm/modules/common/shared/models/BusinessInfo.d.ts +32 -0
  104. package/dist/esm/modules/common/shared/models/BusinessInfo.js +66 -0
  105. package/dist/esm/modules/common/shared/models/BusinessInfo.js.map +1 -0
  106. package/dist/esm/modules/common/shared/models/CheckSummary.d.ts +190 -0
  107. package/dist/esm/modules/common/shared/models/CheckSummary.js +233 -0
  108. package/dist/esm/modules/common/shared/models/CheckSummary.js.map +1 -0
  109. package/dist/esm/modules/common/shared/models/Comment.d.ts +19 -0
  110. package/dist/esm/modules/common/shared/models/Comment.js +19 -0
  111. package/dist/esm/modules/common/shared/models/Comment.js.map +1 -0
  112. package/dist/esm/modules/common/shared/models/ConfigurationWrapper.d.ts +15 -0
  113. package/dist/esm/modules/common/shared/models/ConfigurationWrapper.js +44 -0
  114. package/dist/esm/modules/common/shared/models/ConfigurationWrapper.js.map +1 -0
  115. package/dist/esm/modules/common/shared/models/Core.d.ts +2898 -0
  116. package/dist/esm/modules/common/shared/models/Core.js +6 -0
  117. package/dist/esm/modules/common/shared/models/Core.js.map +1 -0
  118. package/dist/esm/modules/common/shared/models/Document.d.ts +124 -0
  119. package/dist/esm/modules/common/shared/models/Document.js +139 -0
  120. package/dist/esm/modules/common/shared/models/Document.js.map +1 -0
  121. package/dist/esm/modules/common/shared/models/Duplicate.d.ts +38 -0
  122. package/dist/esm/modules/common/shared/models/Duplicate.js +26 -0
  123. package/dist/esm/modules/common/shared/models/Duplicate.js.map +1 -0
  124. package/dist/esm/modules/common/shared/models/DynamicUIComponent.d.ts +52 -0
  125. package/dist/esm/modules/common/shared/models/DynamicUIComponent.js +118 -0
  126. package/dist/esm/modules/common/shared/models/DynamicUIComponent.js.map +1 -0
  127. package/dist/esm/modules/common/shared/models/Event.d.ts +16 -0
  128. package/dist/esm/modules/common/shared/models/Event.js +15 -0
  129. package/dist/esm/modules/common/shared/models/Event.js.map +1 -0
  130. package/dist/esm/modules/common/shared/models/EventFactory.d.ts +16 -0
  131. package/dist/esm/modules/common/shared/models/EventFactory.js +11 -0
  132. package/dist/esm/modules/common/shared/models/EventFactory.js.map +1 -0
  133. package/dist/esm/modules/common/shared/models/File.d.ts +24 -0
  134. package/dist/esm/modules/common/shared/models/File.js +25 -0
  135. package/dist/esm/modules/common/shared/models/File.js.map +1 -0
  136. package/dist/esm/modules/common/shared/models/FraudCheckResult.d.ts +10 -0
  137. package/dist/esm/modules/common/shared/models/FraudCheckResult.js +15 -0
  138. package/dist/esm/modules/common/shared/models/FraudCheckResult.js.map +1 -0
  139. package/dist/esm/modules/common/shared/models/FraudMatchDetail.d.ts +48 -0
  140. package/dist/esm/modules/common/shared/models/FraudMatchDetail.js +41 -0
  141. package/dist/esm/modules/common/shared/models/FraudMatchDetail.js.map +1 -0
  142. package/dist/esm/modules/common/shared/models/IChangeStamp.d.ts +11 -0
  143. package/dist/esm/modules/common/shared/models/IChangeStamp.js +7 -0
  144. package/dist/esm/modules/common/shared/models/IChangeStamp.js.map +1 -0
  145. package/dist/esm/modules/common/shared/models/KYCHostedFlow.d.ts +17 -0
  146. package/dist/esm/modules/common/shared/models/KYCHostedFlow.js +20 -0
  147. package/dist/esm/modules/common/shared/models/KYCHostedFlow.js.map +1 -0
  148. package/dist/esm/modules/common/shared/models/KvpList.d.ts +29 -0
  149. package/dist/esm/modules/common/shared/models/KvpList.js +134 -0
  150. package/dist/esm/modules/common/shared/models/KvpList.js.map +1 -0
  151. package/dist/esm/modules/common/shared/models/OCRDocumentDetail.d.ts +49 -0
  152. package/dist/esm/modules/common/shared/models/OCRDocumentDetail.js +33 -0
  153. package/dist/esm/modules/common/shared/models/OCRDocumentDetail.js.map +1 -0
  154. package/dist/esm/modules/common/shared/models/OCRReport.d.ts +20 -0
  155. package/dist/esm/modules/common/shared/models/OCRReport.js +17 -0
  156. package/dist/esm/modules/common/shared/models/OCRReport.js.map +1 -0
  157. package/dist/esm/modules/common/shared/models/Organisation.d.ts +36 -0
  158. package/dist/esm/modules/common/shared/models/Organisation.js +51 -0
  159. package/dist/esm/modules/common/shared/models/Organisation.js.map +1 -0
  160. package/dist/esm/modules/common/shared/models/OrganizationAnalytics.d.ts +14 -0
  161. package/dist/esm/modules/common/shared/models/OrganizationAnalytics.js +149 -0
  162. package/dist/esm/modules/common/shared/models/OrganizationAnalytics.js.map +1 -0
  163. package/dist/esm/modules/common/shared/models/PortalFeatureConfig.d.ts +79 -0
  164. package/dist/esm/modules/common/shared/models/PortalFeatureConfig.js +83 -0
  165. package/dist/esm/modules/common/shared/models/PortalFeatureConfig.js.map +1 -0
  166. package/dist/esm/modules/common/shared/models/Profile.d.ts +27 -0
  167. package/dist/esm/modules/common/shared/models/Profile.js +96 -0
  168. package/dist/esm/modules/common/shared/models/Profile.js.map +1 -0
  169. package/dist/esm/modules/common/shared/models/ReportAttributes.d.ts +21 -0
  170. package/dist/esm/modules/common/shared/models/ReportAttributes.js +18 -0
  171. package/dist/esm/modules/common/shared/models/ReportAttributes.js.map +1 -0
  172. package/dist/esm/modules/common/shared/models/RiskIndicator.d.ts +48 -0
  173. package/dist/esm/modules/common/shared/models/RiskIndicator.js +30 -0
  174. package/dist/esm/modules/common/shared/models/RiskIndicator.js.map +1 -0
  175. package/dist/esm/modules/common/shared/models/Session.d.ts +5 -0
  176. package/dist/esm/modules/common/shared/models/Session.js +2 -0
  177. package/dist/esm/modules/common/shared/models/Session.js.map +1 -0
  178. package/dist/esm/modules/common/shared/models/SupportingDocument.d.ts +96 -0
  179. package/dist/esm/modules/common/shared/models/SupportingDocument.js +91 -0
  180. package/dist/esm/modules/common/shared/models/SupportingDocument.js.map +1 -0
  181. package/dist/esm/modules/common/shared/models/TApplicantIssue.d.ts +12 -0
  182. package/dist/esm/modules/common/shared/models/TApplicantIssue.js +2 -0
  183. package/dist/esm/modules/common/shared/models/TApplicantIssue.js.map +1 -0
  184. package/dist/esm/modules/common/shared/models/TApplicantStatus.d.ts +7 -0
  185. package/dist/esm/modules/common/shared/models/TApplicantStatus.js +2 -0
  186. package/dist/esm/modules/common/shared/models/TApplicantStatus.js.map +1 -0
  187. package/dist/esm/modules/common/shared/models/TKycMethod.d.ts +1 -0
  188. package/dist/esm/modules/common/shared/models/TKycMethod.js +2 -0
  189. package/dist/esm/modules/common/shared/models/TKycMethod.js.map +1 -0
  190. package/dist/esm/modules/common/shared/models/TValidation.d.ts +6 -0
  191. package/dist/esm/modules/common/shared/models/TValidation.js +2 -0
  192. package/dist/esm/modules/common/shared/models/TValidation.js.map +1 -0
  193. package/dist/esm/modules/common/shared/models/TransactionDetails.d.ts +70 -0
  194. package/dist/esm/modules/common/shared/models/TransactionDetails.js +53 -0
  195. package/dist/esm/modules/common/shared/models/TransactionDetails.js.map +1 -0
  196. package/dist/esm/modules/common/shared/models/UBOData.d.ts +485 -0
  197. package/dist/esm/modules/common/shared/models/UBOData.js +618 -0
  198. package/dist/esm/modules/common/shared/models/UBOData.js.map +1 -0
  199. package/dist/esm/modules/common/shared/models/UIBlueprint.d.ts +33 -0
  200. package/dist/esm/modules/common/shared/models/UIBlueprint.js +164 -0
  201. package/dist/esm/modules/common/shared/models/UIBlueprint.js.map +1 -0
  202. package/dist/esm/modules/common/shared/models/User.d.ts +27 -0
  203. package/dist/esm/modules/common/shared/models/User.js +2 -0
  204. package/dist/esm/modules/common/shared/models/User.js.map +1 -0
  205. package/dist/esm/modules/common/shared/models/api.d.ts +124 -0
  206. package/dist/esm/modules/common/shared/models/api.js +2 -0
  207. package/dist/esm/modules/common/shared/models/api.js.map +1 -0
  208. package/dist/esm/modules/common/shared/models/general.d.ts +31 -0
  209. package/dist/esm/modules/common/shared/models/general.js +2 -0
  210. package/dist/esm/modules/common/shared/models/general.js.map +1 -0
  211. package/dist/esm/modules/common/shared/transformers/apiAlert.d.ts +4 -0
  212. package/dist/esm/modules/common/shared/transformers/apiAlert.js +104 -0
  213. package/dist/esm/modules/common/shared/transformers/apiAlert.js.map +1 -0
  214. package/dist/esm/modules/common/shared/transformers/apiGetRiskLevel.d.ts +2 -0
  215. package/dist/esm/modules/common/shared/transformers/apiGetRiskLevel.js +40 -0
  216. package/dist/esm/modules/common/shared/transformers/apiGetRiskLevel.js.map +1 -0
  217. package/dist/esm/modules/common/shared/transformers/apiState.d.ts +23 -0
  218. package/dist/esm/modules/common/shared/transformers/apiState.js +100 -0
  219. package/dist/esm/modules/common/shared/transformers/apiState.js.map +1 -0
  220. package/dist/esm/modules/common/shared/transformers/index.d.ts +3 -0
  221. package/dist/esm/modules/common/shared/transformers/index.js +4 -0
  222. package/dist/esm/modules/common/shared/transformers/index.js.map +1 -0
  223. package/dist/esm/modules/common/shared/utils/address.d.ts +2 -0
  224. package/dist/esm/modules/common/shared/utils/address.js +21 -0
  225. package/dist/esm/modules/common/shared/utils/address.js.map +1 -0
  226. package/dist/esm/modules/common/shared/utils/base64.d.ts +11 -0
  227. package/dist/esm/modules/common/shared/utils/base64.js +37 -0
  228. package/dist/esm/modules/common/shared/utils/base64.js.map +1 -0
  229. package/dist/esm/modules/common/shared/utils/buildCycleUtils.d.ts +1 -0
  230. package/dist/esm/modules/common/shared/utils/buildCycleUtils.js +28 -0
  231. package/dist/esm/modules/common/shared/utils/buildCycleUtils.js.map +1 -0
  232. package/dist/esm/modules/common/shared/utils/constants.d.ts +75 -0
  233. package/dist/esm/modules/common/shared/utils/constants.js +220 -0
  234. package/dist/esm/modules/common/shared/utils/constants.js.map +1 -0
  235. package/dist/esm/modules/common/shared/utils/date.d.ts +5 -0
  236. package/dist/esm/modules/common/shared/utils/date.js +66 -0
  237. package/dist/esm/modules/common/shared/utils/date.js.map +1 -0
  238. package/dist/esm/modules/common/shared/utils/dotNotation.d.ts +4 -0
  239. package/dist/esm/modules/common/shared/utils/dotNotation.js +12 -0
  240. package/dist/esm/modules/common/shared/utils/dotNotation.js.map +1 -0
  241. package/dist/esm/modules/common/shared/utils/getCountryDetails.d.ts +9 -0
  242. package/dist/esm/modules/common/shared/utils/getCountryDetails.js +15 -0
  243. package/dist/esm/modules/common/shared/utils/getCountryDetails.js.map +1 -0
  244. package/dist/esm/modules/common/shared/utils/getDocumentDetails.d.ts +8 -0
  245. package/dist/esm/modules/common/shared/utils/getDocumentDetails.js +6 -0
  246. package/dist/esm/modules/common/shared/utils/getDocumentDetails.js.map +1 -0
  247. package/dist/esm/modules/common/shared/utils/helper.d.ts +4 -0
  248. package/dist/esm/modules/common/shared/utils/helper.js +31 -0
  249. package/dist/esm/modules/common/shared/utils/helper.js.map +1 -0
  250. package/dist/esm/modules/common/shared/utils/index.d.ts +11 -0
  251. package/dist/esm/modules/common/shared/utils/index.js +12 -0
  252. package/dist/esm/modules/common/shared/utils/index.js.map +1 -0
  253. package/dist/esm/modules/common/shared/utils/isEmpty.d.ts +5 -0
  254. package/dist/esm/modules/common/shared/utils/isEmpty.js +23 -0
  255. package/dist/esm/modules/common/shared/utils/isEmpty.js.map +1 -0
  256. package/dist/esm/modules/common/shared/utils/sanitiser.d.ts +7 -0
  257. package/dist/esm/modules/common/shared/utils/sanitiser.js +23 -0
  258. package/dist/esm/modules/common/shared/utils/sanitiser.js.map +1 -0
  259. package/dist/esm/modules/common/shared/utils/string.d.ts +1 -0
  260. package/dist/esm/modules/common/shared/utils/string.js +3 -0
  261. package/dist/esm/modules/common/shared/utils/string.js.map +1 -0
  262. package/dist/esm/modules/common/types/Accessors.d.ts +19 -0
  263. package/dist/esm/modules/common/types/Accessors.js +2 -0
  264. package/dist/esm/modules/common/types/Accessors.js.map +1 -0
  265. package/dist/esm/modules/common/types/Configuration.d.ts +9 -8
  266. package/dist/esm/modules/common/types/Object.d.ts +3 -0
  267. package/dist/esm/modules/common/types/Object.js +2 -0
  268. package/dist/esm/modules/common/types/Object.js.map +1 -0
  269. package/dist/esm/modules/common/types/Session.d.ts +16 -0
  270. package/dist/esm/modules/common/types/Session.js +2 -0
  271. package/dist/esm/modules/common/types/Session.js.map +1 -0
  272. package/dist/esm/modules/device/index.d.ts +1 -1
  273. package/dist/esm/modules/device/index.js +23 -17
  274. package/dist/esm/modules/device/index.js.map +1 -1
  275. package/dist/esm/modules/device/parseConfiguration.d.ts +2 -2
  276. package/dist/esm/modules/device/parseConfiguration.js +2 -8
  277. package/dist/esm/modules/device/parseConfiguration.js.map +1 -1
  278. package/dist/esm/modules/device/types/events.d.ts +3 -2
  279. package/dist/esm/modules/device/types/index.d.ts +1 -1
  280. package/dist/esm/modules/device/types/index.js +1 -1
  281. package/dist/esm/modules/device/types/index.js.map +1 -1
  282. package/dist/esm/modules/device/types/module.d.ts +5 -6
  283. package/dist/esm/modules/device/types/{vendor.d.ts → wrapper.d.ts} +1 -2
  284. package/dist/esm/modules/device/types/wrapper.js +2 -0
  285. package/dist/esm/modules/device/types/wrapper.js.map +1 -0
  286. package/dist/esm/modules/device/vendors/Sardine.d.ts +3 -3
  287. package/dist/esm/modules/device/vendors/Sardine.js +63 -48
  288. package/dist/esm/modules/device/vendors/Sardine.js.map +1 -1
  289. package/dist/esm/modules/device/vendors/Threatmetrix/index.d.ts +2 -3
  290. package/dist/esm/modules/device/vendors/Threatmetrix/index.js +49 -34
  291. package/dist/esm/modules/device/vendors/Threatmetrix/index.js.map +1 -1
  292. package/dist/esm/modules/device/vendors/Threatmetrix/{fp-clientlib-v4.d.ts → nolint_fp-clientlib-v4.d.ts} +0 -0
  293. package/dist/esm/modules/device/vendors/Threatmetrix/{fp-clientlib-v4.js → nolint_fp-clientlib-v4.js} +1 -1
  294. package/dist/esm/modules/device/vendors/Threatmetrix/nolint_fp-clientlib-v4.js.map +1 -0
  295. package/dist/esm/modules/frankie-client/ClientsDictionary.d.ts +13 -0
  296. package/dist/esm/modules/frankie-client/ClientsDictionary.js +2 -0
  297. package/dist/esm/modules/frankie-client/ClientsDictionary.js.map +1 -0
  298. package/dist/esm/modules/frankie-client/DummyFrankieApiClient.d.ts +40 -5
  299. package/dist/esm/modules/frankie-client/DummyFrankieApiClient.js +185 -23
  300. package/dist/esm/modules/frankie-client/DummyFrankieApiClient.js.map +1 -1
  301. package/dist/esm/modules/frankie-client/FrankieApiClient.d.ts +15 -7
  302. package/dist/esm/modules/frankie-client/FrankieApiClient.js +77 -42
  303. package/dist/esm/modules/frankie-client/FrankieApiClient.js.map +1 -1
  304. package/dist/esm/modules/frankie-client/clients/ApplicantClient.d.ts +24 -0
  305. package/dist/esm/modules/frankie-client/clients/ApplicantClient.js +102 -0
  306. package/dist/esm/modules/frankie-client/clients/ApplicantClient.js.map +1 -0
  307. package/dist/esm/modules/frankie-client/clients/BaseClient.d.ts +10 -0
  308. package/dist/esm/modules/frankie-client/clients/BaseClient.js +16 -0
  309. package/dist/esm/modules/frankie-client/clients/BaseClient.js.map +1 -0
  310. package/dist/esm/modules/frankie-client/clients/ConfigurationClient.d.ts +10 -0
  311. package/dist/esm/modules/frankie-client/clients/ConfigurationClient.js +30 -0
  312. package/dist/esm/modules/frankie-client/clients/ConfigurationClient.js.map +1 -0
  313. package/dist/esm/modules/frankie-client/clients/IDVClient.d.ts +15 -0
  314. package/dist/esm/modules/frankie-client/clients/IDVClient.js +21 -0
  315. package/dist/esm/modules/frankie-client/clients/IDVClient.js.map +1 -0
  316. package/dist/esm/modules/frankie-client/clients/OCRClient.d.ts +30 -0
  317. package/dist/esm/modules/frankie-client/clients/OCRClient.js +116 -0
  318. package/dist/esm/modules/frankie-client/clients/OCRClient.js.map +1 -0
  319. package/dist/esm/modules/frankie-client/index.d.ts +8 -13
  320. package/dist/esm/modules/frankie-client/index.js +42 -10
  321. package/dist/esm/modules/frankie-client/index.js.map +1 -1
  322. package/dist/esm/modules/frankie-client/mocks/biometrics/idvSubmissoin.d.ts +3 -0
  323. package/dist/esm/modules/frankie-client/mocks/biometrics/idvSubmissoin.js +25 -0
  324. package/dist/esm/modules/frankie-client/mocks/biometrics/idvSubmissoin.js.map +1 -0
  325. package/dist/esm/modules/frankie-client/mocks/index.d.ts +12 -0
  326. package/dist/esm/modules/frankie-client/mocks/index.js +24 -0
  327. package/dist/esm/modules/frankie-client/mocks/index.js.map +1 -0
  328. package/dist/esm/modules/frankie-client/mocks/individual/loadIndividual.d.ts +8 -0
  329. package/dist/esm/modules/frankie-client/mocks/individual/loadIndividual.js +58 -0
  330. package/dist/esm/modules/frankie-client/mocks/individual/loadIndividual.js.map +1 -0
  331. package/dist/esm/modules/frankie-client/mocks/individual/submitData.d.ts +3 -0
  332. package/dist/esm/modules/frankie-client/mocks/individual/submitData.js +28 -0
  333. package/dist/esm/modules/frankie-client/mocks/individual/submitData.js.map +1 -0
  334. package/dist/esm/modules/frankie-client/mocks/initialisation/loadConfiguration.d.ts +2 -0
  335. package/dist/esm/modules/frankie-client/mocks/initialisation/loadConfiguration.js +22 -0
  336. package/dist/esm/modules/frankie-client/mocks/initialisation/loadConfiguration.js.map +1 -0
  337. package/dist/esm/modules/frankie-client/mocks/initialisation/validateToken.d.ts +2 -0
  338. package/dist/esm/modules/frankie-client/mocks/initialisation/validateToken.js +8 -0
  339. package/dist/esm/modules/frankie-client/mocks/initialisation/validateToken.js.map +1 -0
  340. package/dist/esm/modules/frankie-client/mocks/ocr/driversLicence.d.ts +15 -0
  341. package/dist/esm/modules/frankie-client/mocks/ocr/driversLicence.js +115 -0
  342. package/dist/esm/modules/frankie-client/mocks/ocr/driversLicence.js.map +1 -0
  343. package/dist/esm/modules/index.d.ts +9 -5
  344. package/dist/esm/modules/index.js +4 -2
  345. package/dist/esm/modules/index.js.map +1 -1
  346. package/dist/esm/modules/individual/actions/consents.d.ts +4 -0
  347. package/dist/esm/modules/individual/actions/consents.js +7 -0
  348. package/dist/esm/modules/individual/actions/consents.js.map +1 -0
  349. package/dist/esm/modules/individual/actions/documents.d.ts +9 -0
  350. package/dist/esm/modules/individual/actions/documents.js +21 -0
  351. package/dist/esm/modules/individual/actions/documents.js.map +1 -0
  352. package/dist/esm/modules/individual/actions/emitEvents.d.ts +6 -0
  353. package/dist/esm/modules/individual/actions/emitEvents.js +7 -0
  354. package/dist/esm/modules/individual/actions/emitEvents.js.map +1 -0
  355. package/dist/esm/modules/individual/actions/search.d.ts +17 -0
  356. package/dist/esm/modules/individual/actions/search.js +51 -0
  357. package/dist/esm/modules/individual/actions/search.js.map +1 -0
  358. package/dist/esm/modules/individual/actions/submit.d.ts +15 -0
  359. package/dist/esm/modules/individual/actions/submit.js +37 -0
  360. package/dist/esm/modules/individual/actions/submit.js.map +1 -0
  361. package/dist/esm/modules/individual/index.d.ts +2 -0
  362. package/dist/esm/modules/individual/index.js +74 -0
  363. package/dist/esm/modules/individual/index.js.map +1 -0
  364. package/dist/esm/modules/individual/types/events.d.ts +7 -0
  365. package/dist/esm/modules/individual/types/events.js +2 -0
  366. package/dist/esm/modules/individual/types/events.js.map +1 -0
  367. package/dist/esm/modules/individual/types/index.d.ts +2 -0
  368. package/dist/esm/modules/individual/types/index.js +3 -0
  369. package/dist/esm/modules/individual/types/index.js.map +1 -0
  370. package/dist/esm/modules/individual/types/module.d.ts +31 -0
  371. package/dist/esm/modules/individual/types/module.js +2 -0
  372. package/dist/esm/modules/individual/types/module.js.map +1 -0
  373. package/dist/esm/modules/ocr/actions/start.d.ts +51 -0
  374. package/dist/esm/modules/ocr/actions/start.js +268 -0
  375. package/dist/esm/modules/ocr/actions/start.js.map +1 -0
  376. package/dist/esm/modules/ocr/index.d.ts +12 -0
  377. package/dist/esm/modules/ocr/index.js +61 -0
  378. package/dist/esm/modules/ocr/index.js.map +1 -0
  379. package/dist/esm/modules/ocr/types/events.d.ts +21 -0
  380. package/dist/esm/modules/ocr/types/events.js +2 -0
  381. package/dist/esm/modules/ocr/types/events.js.map +1 -0
  382. package/dist/esm/modules/ocr/types/index.d.ts +2 -0
  383. package/dist/esm/modules/ocr/types/index.js +3 -0
  384. package/dist/esm/modules/ocr/types/index.js.map +1 -0
  385. package/dist/esm/modules/ocr/types/module.d.ts +26 -0
  386. package/dist/esm/modules/ocr/types/module.js +2 -0
  387. package/dist/esm/modules/ocr/types/module.js.map +1 -0
  388. package/dist/esm/modules/sdk/ComponentLoader.d.ts +12 -6
  389. package/dist/esm/modules/sdk/ComponentLoader.js +27 -16
  390. package/dist/esm/modules/sdk/ComponentLoader.js.map +1 -1
  391. package/dist/esm/modules/sdk/index.d.ts +3 -4
  392. package/dist/esm/modules/sdk/index.js +24 -16
  393. package/dist/esm/modules/sdk/index.js.map +1 -1
  394. package/dist/esm/modules/sdk/parseConfiguration.d.ts +3 -0
  395. package/dist/esm/modules/sdk/parseConfiguration.js +91 -0
  396. package/dist/esm/modules/sdk/parseConfiguration.js.map +1 -0
  397. package/dist/esm/modules/sdk/types/components.d.ts +25 -0
  398. package/dist/esm/modules/sdk/types/components.js +2 -0
  399. package/dist/esm/modules/sdk/types/components.js.map +1 -0
  400. package/dist/esm/modules/sdk/types/configuration.d.ts +76 -0
  401. package/dist/esm/modules/sdk/types/configuration.js +38 -0
  402. package/dist/esm/modules/sdk/types/configuration.js.map +1 -0
  403. package/dist/esm/modules/sdk/types/events.d.ts +5 -0
  404. package/dist/esm/modules/sdk/types/events.js +2 -0
  405. package/dist/esm/modules/sdk/types/events.js.map +1 -0
  406. package/dist/esm/modules/sdk/types/index.d.ts +4 -0
  407. package/dist/esm/modules/sdk/types/index.js +5 -0
  408. package/dist/esm/modules/sdk/types/index.js.map +1 -0
  409. package/dist/esm/modules/sdk/types/module.d.ts +16 -0
  410. package/dist/esm/modules/sdk/types/module.js +2 -0
  411. package/dist/esm/modules/sdk/types/module.js.map +1 -0
  412. package/dist/esm/types/Utilities.d.ts +6 -1
  413. package/dist/release.txt +1 -1
  414. package/dist/umd/727.js +3 -0
  415. package/dist/umd/727.js.LICENSE.txt +377 -0
  416. package/dist/umd/727.js.map +1 -0
  417. package/dist/umd/biometrics-dummy.js +2 -0
  418. package/dist/umd/biometrics-dummy.js.map +1 -0
  419. package/dist/umd/biometrics-ocrlabs.js +2 -0
  420. package/dist/umd/biometrics-ocrlabs.js.map +1 -0
  421. package/dist/umd/device-sardine.js +1 -1
  422. package/dist/umd/device-sardine.js.map +1 -1
  423. package/dist/umd/device-threatmetrix.js +1 -1
  424. package/dist/umd/device-threatmetrix.js.map +1 -1
  425. package/dist/umd/oneSdk.umd.js +1 -1
  426. package/dist/umd/oneSdk.umd.js.LICENSE.txt +13 -0
  427. package/dist/umd/oneSdk.umd.js.map +1 -1
  428. package/package.json +31 -11
  429. package/dist/esm/modules/device/types/vendor.js +0 -2
  430. package/dist/esm/modules/device/types/vendor.js.map +0 -1
  431. package/dist/esm/modules/device/vendors/Threatmetrix/fp-clientlib-v4.js.map +0 -1
  432. package/dist/esm/modules/sdk/onInitialisation.d.ts +0 -2
  433. package/dist/esm/modules/sdk/onInitialisation.js +0 -68
  434. package/dist/esm/modules/sdk/onInitialisation.js.map +0 -1
  435. package/dist/esm/modules/sdk/types.d.ts +0 -101
  436. package/dist/esm/modules/sdk/types.js +0 -2
  437. package/dist/esm/modules/sdk/types.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"727.js","mappings":";yFAAA,IAAiDA,gBASxC,WACT,OAAgB,SAAUC,GAEhB,IAAIC,EAAmB,GAGvB,SAAS,EAAoBC,GAG5B,GAAGD,EAAiBC,GACnB,OAAOD,EAAiBC,GAAUC,QAGnC,IAAIC,EAASH,EAAiBC,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAH,EAAQE,GAAUK,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAAS,GAG/DC,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDA,EAAoBK,EAAIR,EAGxB,EAAoBS,EAAIR,EAGxB,EAAoBS,EAAI,SAASP,EAASQ,EAAMC,GAC3C,EAAoBC,EAAEV,EAASQ,IAClCG,OAAOC,eAAeZ,EAASQ,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhE,EAAoBM,EAAI,SAASf,GACX,oBAAXgB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeZ,EAASgB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeZ,EAAS,aAAc,CAAEkB,OAAO,KAQvD,EAAoBC,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQ,EAAoBA,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA,EAAoBR,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAO,EAAoBX,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIR,EAAoBI,EAAI,SAASzB,GAChC,IAAIQ,EAASR,GAAUA,EAAOoB,WAC7B,WAAwB,OAAOpB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADA,EAAoBM,EAAEE,EAAQ,IAAKA,GAC5BA,GAIR,EAAoBC,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG,EAAoBG,EAAI,GAIjB,EAAoB,EAAoBC,EAAI,kBAnF7C,CAsFN,CAEJ,uDAKA,SAAU/B,OAAQD,SAExBiC,KAAK,kjHAIC,yCAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,mhMAIC,iCAKA,SAAUhC,OAAQD,SAExBiC,KAAK,qhDAIC,mEAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,y2EAIC,oCAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,kjIAIC,+BAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,glzBAIC,iCAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,yojDAIC,sCAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,4qNAIC,qCAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,ygOAIC,kEAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,ybAIC,qDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,msDAIC,sDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,yooBAIC,yDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,ygHAIC,gEAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,wyBAIC,sEAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,soSAIC,kEAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,szLAIC,wFAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,o5CAIC,oEAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,05QAIC,iFAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,8vCAIC,oDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,i8CAIC,uDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,6gCAIC,oEAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,msEAIC,oEAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,syDAIC,qDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,g8EAIC,kCAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,wmeAIC,gDAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,2waAIC,mCAKA,SAAUhC,OAAQD,SAExBiC,KAAK,weAIC,kCAKA,SAAUhC,OAAQD,SAExBiC,KAAK,ywEAIC,kCAKA,SAAUhC,OAAQD,SAExBiC,KAAK,mNAIC,kDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,8hKAIC,sDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,0vJAIC,sDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,07KAIC,gDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,4qiBAIC,8DAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,+4CAIC,gDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,u6CAIC,kDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,wrRAIC,uDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,yQAIC,wDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,kKAIC,mDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,89vBAIC,gDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,+uCAIC,2DAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,wrtBAIC,2DAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,oixBAIC,2DAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,o7yBAIC,2DAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,q/zBAIC,yDAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,oxiBAIC,4DAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,+k1BAIC,mEAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,owBAIC,8DAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,2hvBAIC,2DAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,+xwBAIC,2DAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,isxBAIC,iEAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,msGAIC,mEAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,05wBAIC,gEAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,s2XAIC,kEAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,ggOAIC,iEAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,m6JAIC,uEAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,wsIAIC,+CAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,6wEAIC,8CAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,imlCAIC,0DAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,0pBAIC,+CAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,y1DAIC,+CAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,4mBAIC,6BAKA,SAAUhC,OAAQD,SAExBiC,KAAK,yrGAIC,kCAKA,SAAUhC,OAAQD,SAExBiC,KAAK,mzBAIC,mCAKA,SAAUhC,OAAQD,SAExBiC,KAAK,+7DAIC,oCAKA,SAAUhC,OAAQD,SAExBiC,KAAK,8iLAIC,8CAKA,SAAUhC,OAAQD,SAExBiC,KAAK,ipeAIC,4CAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,yrBAIC,6CAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,86GAIC,6CAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,ywGAIC,qDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,slGAIC,uDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,s/XAIC,kDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,8WAIC,sDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,8odAIC,mDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,wwEAIC,sDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,qiGAIC,qDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,kgUAIC,yDAKA,SAAUhC,OAAQkC,oBAAqBD,qBAE7C,aACAD,KAAK,88DAIC,+CAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,mk6CAIC,gDAKA,SAAUhC,OAAQD,SAExBiC,KAAK,0QAIC,2CAKA,SAAUhC,OAAQD,SAExBiC,KAAK,wjBAIC,gCAKA,SAAUhC,OAAQD,QAASkC,qBAEjC,aACAD,KAAK,u8CAIC,kBAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,kgIAIC,iBAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,66FAIC,iBAKA,SAAUhC,OAAQD,QAASkC,qBAEjCD,KAAK,i/VArjCHhC,OAAOD,QAAUJ","sources":["webpack://OneSdk/./node_modules/liveness/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Liveness\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Liveness\"] = factory();\n\telse\n\t\troot[\"Liveness\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./node_modules/@socket.io/component-emitter/index.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/@socket.io/component-emitter/index.js ***!\n \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"\\n/**\\n * Expose `Emitter`.\\n */\\n\\nexports.Emitter = Emitter;\\n\\n/**\\n * Initialize a new `Emitter`.\\n *\\n * @api public\\n */\\n\\nfunction Emitter(obj) {\\n if (obj) return mixin(obj);\\n}\\n\\n/**\\n * Mixin the emitter properties.\\n *\\n * @param {Object} obj\\n * @return {Object}\\n * @api private\\n */\\n\\nfunction mixin(obj) {\\n for (var key in Emitter.prototype) {\\n obj[key] = Emitter.prototype[key];\\n }\\n return obj;\\n}\\n\\n/**\\n * Listen on the given `event` with `fn`.\\n *\\n * @param {String} event\\n * @param {Function} fn\\n * @return {Emitter}\\n * @api public\\n */\\n\\nEmitter.prototype.on =\\nEmitter.prototype.addEventListener = function(event, fn){\\n this._callbacks = this._callbacks || {};\\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\\n .push(fn);\\n return this;\\n};\\n\\n/**\\n * Adds an `event` listener that will be invoked a single\\n * time then automatically removed.\\n *\\n * @param {String} event\\n * @param {Function} fn\\n * @return {Emitter}\\n * @api public\\n */\\n\\nEmitter.prototype.once = function(event, fn){\\n function on() {\\n this.off(event, on);\\n fn.apply(this, arguments);\\n }\\n\\n on.fn = fn;\\n this.on(event, on);\\n return this;\\n};\\n\\n/**\\n * Remove the given callback for `event` or all\\n * registered callbacks.\\n *\\n * @param {String} event\\n * @param {Function} fn\\n * @return {Emitter}\\n * @api public\\n */\\n\\nEmitter.prototype.off =\\nEmitter.prototype.removeListener =\\nEmitter.prototype.removeAllListeners =\\nEmitter.prototype.removeEventListener = function(event, fn){\\n this._callbacks = this._callbacks || {};\\n\\n // all\\n if (0 == arguments.length) {\\n this._callbacks = {};\\n return this;\\n }\\n\\n // specific event\\n var callbacks = this._callbacks['$' + event];\\n if (!callbacks) return this;\\n\\n // remove all handlers\\n if (1 == arguments.length) {\\n delete this._callbacks['$' + event];\\n return this;\\n }\\n\\n // remove specific handler\\n var cb;\\n for (var i = 0; i < callbacks.length; i++) {\\n cb = callbacks[i];\\n if (cb === fn || cb.fn === fn) {\\n callbacks.splice(i, 1);\\n break;\\n }\\n }\\n\\n // Remove event specific arrays for event types that no\\n // one is subscribed for to avoid memory leak.\\n if (callbacks.length === 0) {\\n delete this._callbacks['$' + event];\\n }\\n\\n return this;\\n};\\n\\n/**\\n * Emit `event` with the given args.\\n *\\n * @param {String} event\\n * @param {Mixed} ...\\n * @return {Emitter}\\n */\\n\\nEmitter.prototype.emit = function(event){\\n this._callbacks = this._callbacks || {};\\n\\n var args = new Array(arguments.length - 1)\\n , callbacks = this._callbacks['$' + event];\\n\\n for (var i = 1; i < arguments.length; i++) {\\n args[i - 1] = arguments[i];\\n }\\n\\n if (callbacks) {\\n callbacks = callbacks.slice(0);\\n for (var i = 0, len = callbacks.length; i < len; ++i) {\\n callbacks[i].apply(this, args);\\n }\\n }\\n\\n return this;\\n};\\n\\n// alias used for reserved events (protected method)\\nEmitter.prototype.emitReserved = Emitter.prototype.emit;\\n\\n/**\\n * Return array of callbacks for `event`.\\n *\\n * @param {String} event\\n * @return {Array}\\n * @api public\\n */\\n\\nEmitter.prototype.listeners = function(event){\\n this._callbacks = this._callbacks || {};\\n return this._callbacks['$' + event] || [];\\n};\\n\\n/**\\n * Check if this emitter has `event` handlers.\\n *\\n * @param {String} event\\n * @return {Boolean}\\n * @api public\\n */\\n\\nEmitter.prototype.hasListeners = function(event){\\n return !! this.listeners(event).length;\\n};\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/@socket.io/component-emitter/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/awaitqueue/lib/index.js\":\n/*!**********************************************!*\\\n !*** ./node_modules/awaitqueue/lib/index.js ***!\n \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nclass AwaitQueue {\\n constructor({ ClosedErrorClass = Error, StoppedErrorClass = Error } = {\\n ClosedErrorClass: Error,\\n StoppedErrorClass: Error\\n }) {\\n // Closed flag.\\n this.closed = false;\\n // Queue of pending tasks.\\n this.pendingTasks = [];\\n // Error class used when rejecting a task due to AwaitQueue being closed.\\n this.ClosedErrorClass = Error;\\n // Error class used when rejecting a task due to AwaitQueue being stopped.\\n this.StoppedErrorClass = Error;\\n this.ClosedErrorClass = ClosedErrorClass;\\n this.StoppedErrorClass = StoppedErrorClass;\\n }\\n /**\\n * The number of ongoing enqueued tasks.\\n */\\n get size() {\\n return this.pendingTasks.length;\\n }\\n /**\\n * Closes the AwaitQueue. Pending tasks will be rejected with ClosedErrorClass\\n * error.\\n */\\n close() {\\n if (this.closed)\\n return;\\n this.closed = true;\\n for (const pendingTask of this.pendingTasks) {\\n pendingTask.stopped = true;\\n pendingTask.reject(new this.ClosedErrorClass('AwaitQueue closed'));\\n }\\n // Enpty the pending tasks array.\\n this.pendingTasks.length = 0;\\n }\\n /**\\n * Accepts a task as argument (and an optional task name) and enqueues it after\\n * pending tasks. Once processed, the push() method resolves (or rejects) with\\n * the result returned by the given task.\\n *\\n * The given task must return a Promise or directly a value.\\n */\\n push(task, name) {\\n return __awaiter(this, void 0, void 0, function* () {\\n if (this.closed)\\n throw new this.ClosedErrorClass('AwaitQueue closed');\\n if (typeof task !== 'function')\\n throw new TypeError('given task is not a function');\\n if (!task.name && name) {\\n try {\\n Object.defineProperty(task, 'name', { value: name });\\n }\\n catch (error) { }\\n }\\n return new Promise((resolve, reject) => {\\n const pendingTask = {\\n task,\\n name,\\n resolve,\\n reject,\\n stopped: false,\\n enqueuedAt: new Date(),\\n executedAt: undefined\\n };\\n // Append task to the queue.\\n this.pendingTasks.push(pendingTask);\\n // And run it if this is the only task in the queue.\\n if (this.pendingTasks.length === 1)\\n this.next();\\n });\\n });\\n }\\n /**\\n * Make ongoing pending tasks reject with the given StoppedErrorClass error.\\n * The AwaitQueue instance is still usable for future tasks added via push()\\n * method.\\n */\\n stop() {\\n if (this.closed)\\n return;\\n for (const pendingTask of this.pendingTasks) {\\n pendingTask.stopped = true;\\n pendingTask.reject(new this.StoppedErrorClass('AwaitQueue stopped'));\\n }\\n // Enpty the pending tasks array.\\n this.pendingTasks.length = 0;\\n }\\n dump() {\\n const now = new Date();\\n return this.pendingTasks.map((pendingTask) => {\\n return {\\n task: pendingTask.task,\\n name: pendingTask.name,\\n enqueuedTime: pendingTask.executedAt\\n ? pendingTask.executedAt.getTime() - pendingTask.enqueuedAt.getTime()\\n : now.getTime() - pendingTask.enqueuedAt.getTime(),\\n executingTime: pendingTask.executedAt\\n ? now.getTime() - pendingTask.executedAt.getTime()\\n : 0\\n };\\n });\\n }\\n next() {\\n return __awaiter(this, void 0, void 0, function* () {\\n // Take the first pending task.\\n const pendingTask = this.pendingTasks[0];\\n if (!pendingTask)\\n return;\\n // Execute it.\\n yield this.executeTask(pendingTask);\\n // Remove the first pending task (the completed one) from the queue.\\n this.pendingTasks.shift();\\n // And continue.\\n this.next();\\n });\\n }\\n executeTask(pendingTask) {\\n return __awaiter(this, void 0, void 0, function* () {\\n // If the task is stopped, ignore it.\\n if (pendingTask.stopped)\\n return;\\n pendingTask.executedAt = new Date();\\n try {\\n const result = yield pendingTask.task();\\n // If the task is stopped, ignore it.\\n if (pendingTask.stopped)\\n return;\\n // Resolve the task with the returned result (if any).\\n pendingTask.resolve(result);\\n }\\n catch (error) {\\n // If the task is stopped, ignore it.\\n if (pendingTask.stopped)\\n return;\\n // Reject the task with its own error.\\n pendingTask.reject(error);\\n }\\n });\\n }\\n}\\nexports.AwaitQueue = AwaitQueue;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/awaitqueue/lib/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/backo2/index.js\":\n/*!**************************************!*\\\n !*** ./node_modules/backo2/index.js ***!\n \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"\\n/**\\n * Expose `Backoff`.\\n */\\n\\nmodule.exports = Backoff;\\n\\n/**\\n * Initialize backoff timer with `opts`.\\n *\\n * - `min` initial timeout in milliseconds [100]\\n * - `max` max timeout [10000]\\n * - `jitter` [0]\\n * - `factor` [2]\\n *\\n * @param {Object} opts\\n * @api public\\n */\\n\\nfunction Backoff(opts) {\\n opts = opts || {};\\n this.ms = opts.min || 100;\\n this.max = opts.max || 10000;\\n this.factor = opts.factor || 2;\\n this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\\n this.attempts = 0;\\n}\\n\\n/**\\n * Return the backoff duration.\\n *\\n * @return {Number}\\n * @api public\\n */\\n\\nBackoff.prototype.duration = function(){\\n var ms = this.ms * Math.pow(this.factor, this.attempts++);\\n if (this.jitter) {\\n var rand = Math.random();\\n var deviation = Math.floor(rand * this.jitter * ms);\\n ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;\\n }\\n return Math.min(ms, this.max) | 0;\\n};\\n\\n/**\\n * Reset the number of attempts.\\n *\\n * @api public\\n */\\n\\nBackoff.prototype.reset = function(){\\n this.attempts = 0;\\n};\\n\\n/**\\n * Set the minimum duration\\n *\\n * @api public\\n */\\n\\nBackoff.prototype.setMin = function(min){\\n this.ms = min;\\n};\\n\\n/**\\n * Set the maximum duration\\n *\\n * @api public\\n */\\n\\nBackoff.prototype.setMax = function(max){\\n this.max = max;\\n};\\n\\n/**\\n * Set the jitter\\n *\\n * @api public\\n */\\n\\nBackoff.prototype.setJitter = function(jitter){\\n this.jitter = jitter;\\n};\\n\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/backo2/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js\":\n/*!************************************************************************!*\\\n !*** ./node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js ***!\n \\************************************************************************/\n/*! exports provided: decode, encode */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"decode\\\", function() { return decode; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"encode\\\", function() { return encode; });\\n/*\\n * base64-arraybuffer 1.0.1 <https://github.com/niklasvh/base64-arraybuffer>\\n * Copyright (c) 2021 Niklas von Hertzen <https://hertzen.com>\\n * Released under MIT License\\n */\\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\\n// Use a lookup table to find the index.\\nvar lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\\nfor (var i = 0; i < chars.length; i++) {\\n lookup[chars.charCodeAt(i)] = i;\\n}\\nvar encode = function (arraybuffer) {\\n var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\\n for (i = 0; i < len; i += 3) {\\n base64 += chars[bytes[i] >> 2];\\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\\n base64 += chars[bytes[i + 2] & 63];\\n }\\n if (len % 3 === 2) {\\n base64 = base64.substring(0, base64.length - 1) + '=';\\n }\\n else if (len % 3 === 1) {\\n base64 = base64.substring(0, base64.length - 2) + '==';\\n }\\n return base64;\\n};\\nvar decode = function (base64) {\\n var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\\n if (base64[base64.length - 1] === '=') {\\n bufferLength--;\\n if (base64[base64.length - 2] === '=') {\\n bufferLength--;\\n }\\n }\\n var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\\n for (i = 0; i < len; i += 4) {\\n encoded1 = lookup[base64.charCodeAt(i)];\\n encoded2 = lookup[base64.charCodeAt(i + 1)];\\n encoded3 = lookup[base64.charCodeAt(i + 2)];\\n encoded4 = lookup[base64.charCodeAt(i + 3)];\\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\\n }\\n return arraybuffer;\\n};\\n\\n\\n//# sourceMappingURL=base64-arraybuffer.es5.js.map\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/base64-js/index.js\":\n/*!*****************************************!*\\\n !*** ./node_modules/base64-js/index.js ***!\n \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nexports.byteLength = byteLength\\nexports.toByteArray = toByteArray\\nexports.fromByteArray = fromByteArray\\n\\nvar lookup = []\\nvar revLookup = []\\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\\n\\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\\nfor (var i = 0, len = code.length; i < len; ++i) {\\n lookup[i] = code[i]\\n revLookup[code.charCodeAt(i)] = i\\n}\\n\\n// Support decoding URL-safe base64 strings, as Node.js does.\\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\\nrevLookup['-'.charCodeAt(0)] = 62\\nrevLookup['_'.charCodeAt(0)] = 63\\n\\nfunction getLens (b64) {\\n var len = b64.length\\n\\n if (len % 4 > 0) {\\n throw new Error('Invalid string. Length must be a multiple of 4')\\n }\\n\\n // Trim off extra bytes after placeholder bytes are found\\n // See: https://github.com/beatgammit/base64-js/issues/42\\n var validLen = b64.indexOf('=')\\n if (validLen === -1) validLen = len\\n\\n var placeHoldersLen = validLen === len\\n ? 0\\n : 4 - (validLen % 4)\\n\\n return [validLen, placeHoldersLen]\\n}\\n\\n// base64 is 4/3 + up to two characters of the original data\\nfunction byteLength (b64) {\\n var lens = getLens(b64)\\n var validLen = lens[0]\\n var placeHoldersLen = lens[1]\\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\\n}\\n\\nfunction _byteLength (b64, validLen, placeHoldersLen) {\\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\\n}\\n\\nfunction toByteArray (b64) {\\n var tmp\\n var lens = getLens(b64)\\n var validLen = lens[0]\\n var placeHoldersLen = lens[1]\\n\\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\\n\\n var curByte = 0\\n\\n // if there are placeholders, only get up to the last complete 4 chars\\n var len = placeHoldersLen > 0\\n ? validLen - 4\\n : validLen\\n\\n var i\\n for (i = 0; i < len; i += 4) {\\n tmp =\\n (revLookup[b64.charCodeAt(i)] << 18) |\\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\\n revLookup[b64.charCodeAt(i + 3)]\\n arr[curByte++] = (tmp >> 16) & 0xFF\\n arr[curByte++] = (tmp >> 8) & 0xFF\\n arr[curByte++] = tmp & 0xFF\\n }\\n\\n if (placeHoldersLen === 2) {\\n tmp =\\n (revLookup[b64.charCodeAt(i)] << 2) |\\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\\n arr[curByte++] = tmp & 0xFF\\n }\\n\\n if (placeHoldersLen === 1) {\\n tmp =\\n (revLookup[b64.charCodeAt(i)] << 10) |\\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\\n arr[curByte++] = (tmp >> 8) & 0xFF\\n arr[curByte++] = tmp & 0xFF\\n }\\n\\n return arr\\n}\\n\\nfunction tripletToBase64 (num) {\\n return lookup[num >> 18 & 0x3F] +\\n lookup[num >> 12 & 0x3F] +\\n lookup[num >> 6 & 0x3F] +\\n lookup[num & 0x3F]\\n}\\n\\nfunction encodeChunk (uint8, start, end) {\\n var tmp\\n var output = []\\n for (var i = start; i < end; i += 3) {\\n tmp =\\n ((uint8[i] << 16) & 0xFF0000) +\\n ((uint8[i + 1] << 8) & 0xFF00) +\\n (uint8[i + 2] & 0xFF)\\n output.push(tripletToBase64(tmp))\\n }\\n return output.join('')\\n}\\n\\nfunction fromByteArray (uint8) {\\n var tmp\\n var len = uint8.length\\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\\n var parts = []\\n var maxChunkLength = 16383 // must be multiple of 3\\n\\n // go through the array every three bytes, we'll deal with trailing stuff later\\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\\n }\\n\\n // pad the end with zeros, but make sure to not forget the extra bytes\\n if (extraBytes === 1) {\\n tmp = uint8[len - 1]\\n parts.push(\\n lookup[tmp >> 2] +\\n lookup[(tmp << 4) & 0x3F] +\\n '=='\\n )\\n } else if (extraBytes === 2) {\\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\\n parts.push(\\n lookup[tmp >> 10] +\\n lookup[(tmp >> 4) & 0x3F] +\\n lookup[(tmp << 2) & 0x3F] +\\n '='\\n )\\n }\\n\\n return parts.join('')\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/base64-js/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/bowser/es5.js\":\n/*!************************************!*\\\n !*** ./node_modules/bowser/es5.js ***!\n \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"!function(e,t){ true?module.exports=t():undefined}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\\\"undefined\\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\\"Module\\\"}),Object.defineProperty(e,\\\"__esModule\\\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\\\"object\\\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\\\"default\\\",{enumerable:!0,value:e}),2&t&&\\\"string\\\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\\\"a\\\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\\\"\\\",r(r.s=90)}({17:function(e,t,r){\\\"use strict\\\";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||\\\"\\\"},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||\\\"\\\"},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case\\\"NT\\\":return\\\"NT\\\";case\\\"XP\\\":return\\\"XP\\\";case\\\"NT 5.0\\\":return\\\"2000\\\";case\\\"NT 5.1\\\":return\\\"XP\\\";case\\\"NT 5.2\\\":return\\\"2003\\\";case\\\"NT 6.0\\\":return\\\"Vista\\\";case\\\"NT 6.1\\\":return\\\"7\\\";case\\\"NT 6.2\\\":return\\\"8\\\";case\\\"NT 6.3\\\":return\\\"8.1\\\";case\\\"NT 10.0\\\":return\\\"10\\\";default:return}},e.getMacOSVersionName=function(e){var t=e.split(\\\".\\\").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return\\\"Leopard\\\";case 6:return\\\"Snow Leopard\\\";case 7:return\\\"Lion\\\";case 8:return\\\"Mountain Lion\\\";case 9:return\\\"Mavericks\\\";case 10:return\\\"Yosemite\\\";case 11:return\\\"El Capitan\\\";case 12:return\\\"Sierra\\\";case 13:return\\\"High Sierra\\\";case 14:return\\\"Mojave\\\";case 15:return\\\"Catalina\\\";default:return}},e.getAndroidVersionName=function(e){var t=e.split(\\\".\\\").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?\\\"Cupcake\\\":1===t[0]&&t[1]>=6?\\\"Donut\\\":2===t[0]&&t[1]<2?\\\"Eclair\\\":2===t[0]&&2===t[1]?\\\"Froyo\\\":2===t[0]&&t[1]>2?\\\"Gingerbread\\\":3===t[0]?\\\"Honeycomb\\\":4===t[0]&&t[1]<1?\\\"Ice Cream Sandwich\\\":4===t[0]&&t[1]<4?\\\"Jelly Bean\\\":4===t[0]&&t[1]>=4?\\\"KitKat\\\":5===t[0]?\\\"Lollipop\\\":6===t[0]?\\\"Marshmallow\\\":7===t[0]?\\\"Nougat\\\":8===t[0]?\\\"Oreo\\\":9===t[0]?\\\"Pie\\\":void 0},e.getVersionPrecision=function(e){return e.split(\\\".\\\").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(r),a=Math.max(i,s),o=0,u=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(\\\".0\\\");return e.map(n.split(\\\".\\\"),(function(e){return new Array(20-e.length).join(\\\"0\\\")+e})).reverse()}));for(n&&(o=a-Math.min(i,s)),a-=1;a>=o;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===o)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var o=function(){var e=s[t];\\\"object\\\"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=s.length;t<r;t+=1)o();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||\\\"\\\"},e}();t.default=i,e.exports=t.default},18:function(e,t,r){\\\"use strict\\\";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0;t.BROWSER_ALIASES_MAP={\\\"Amazon Silk\\\":\\\"amazon_silk\\\",\\\"Android Browser\\\":\\\"android\\\",Bada:\\\"bada\\\",BlackBerry:\\\"blackberry\\\",Chrome:\\\"chrome\\\",Chromium:\\\"chromium\\\",Electron:\\\"electron\\\",Epiphany:\\\"epiphany\\\",Firefox:\\\"firefox\\\",Focus:\\\"focus\\\",Generic:\\\"generic\\\",\\\"Google Search\\\":\\\"google_search\\\",Googlebot:\\\"googlebot\\\",\\\"Internet Explorer\\\":\\\"ie\\\",\\\"K-Meleon\\\":\\\"k_meleon\\\",Maxthon:\\\"maxthon\\\",\\\"Microsoft Edge\\\":\\\"edge\\\",\\\"MZ Browser\\\":\\\"mz\\\",\\\"NAVER Whale Browser\\\":\\\"naver\\\",Opera:\\\"opera\\\",\\\"Opera Coast\\\":\\\"opera_coast\\\",PhantomJS:\\\"phantomjs\\\",Puffin:\\\"puffin\\\",QupZilla:\\\"qupzilla\\\",QQ:\\\"qq\\\",QQLite:\\\"qqlite\\\",Safari:\\\"safari\\\",Sailfish:\\\"sailfish\\\",\\\"Samsung Internet for Android\\\":\\\"samsung_internet\\\",SeaMonkey:\\\"seamonkey\\\",Sleipnir:\\\"sleipnir\\\",Swing:\\\"swing\\\",Tizen:\\\"tizen\\\",\\\"UC Browser\\\":\\\"uc\\\",Vivaldi:\\\"vivaldi\\\",\\\"WebOS Browser\\\":\\\"webos\\\",WeChat:\\\"wechat\\\",\\\"Yandex Browser\\\":\\\"yandex\\\",Roku:\\\"roku\\\"};t.BROWSER_MAP={amazon_silk:\\\"Amazon Silk\\\",android:\\\"Android Browser\\\",bada:\\\"Bada\\\",blackberry:\\\"BlackBerry\\\",chrome:\\\"Chrome\\\",chromium:\\\"Chromium\\\",electron:\\\"Electron\\\",epiphany:\\\"Epiphany\\\",firefox:\\\"Firefox\\\",focus:\\\"Focus\\\",generic:\\\"Generic\\\",googlebot:\\\"Googlebot\\\",google_search:\\\"Google Search\\\",ie:\\\"Internet Explorer\\\",k_meleon:\\\"K-Meleon\\\",maxthon:\\\"Maxthon\\\",edge:\\\"Microsoft Edge\\\",mz:\\\"MZ Browser\\\",naver:\\\"NAVER Whale Browser\\\",opera:\\\"Opera\\\",opera_coast:\\\"Opera Coast\\\",phantomjs:\\\"PhantomJS\\\",puffin:\\\"Puffin\\\",qupzilla:\\\"QupZilla\\\",qq:\\\"QQ Browser\\\",qqlite:\\\"QQ Browser Lite\\\",safari:\\\"Safari\\\",sailfish:\\\"Sailfish\\\",samsung_internet:\\\"Samsung Internet for Android\\\",seamonkey:\\\"SeaMonkey\\\",sleipnir:\\\"Sleipnir\\\",swing:\\\"Swing\\\",tizen:\\\"Tizen\\\",uc:\\\"UC Browser\\\",vivaldi:\\\"Vivaldi\\\",webos:\\\"WebOS Browser\\\",wechat:\\\"WeChat\\\",yandex:\\\"Yandex Browser\\\"};t.PLATFORMS_MAP={tablet:\\\"tablet\\\",mobile:\\\"mobile\\\",desktop:\\\"desktop\\\",tv:\\\"tv\\\"};t.OS_MAP={WindowsPhone:\\\"Windows Phone\\\",Windows:\\\"Windows\\\",MacOS:\\\"macOS\\\",iOS:\\\"iOS\\\",Android:\\\"Android\\\",WebOS:\\\"WebOS\\\",BlackBerry:\\\"BlackBerry\\\",Bada:\\\"Bada\\\",Tizen:\\\"Tizen\\\",Linux:\\\"Linux\\\",ChromeOS:\\\"Chrome OS\\\",PlayStation4:\\\"PlayStation 4\\\",Roku:\\\"Roku\\\"};t.ENGINE_MAP={EdgeHTML:\\\"EdgeHTML\\\",Blink:\\\"Blink\\\",Trident:\\\"Trident\\\",Presto:\\\"Presto\\\",Gecko:\\\"Gecko\\\",WebKit:\\\"WebKit\\\"}},90:function(e,t,r){\\\"use strict\\\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},s=r(18);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\\\"value\\\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function e(){}var t,r,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),\\\"string\\\"!=typeof e)throw new Error(\\\"UserAgent should be a string\\\");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,n=[{key:\\\"BROWSER_MAP\\\",get:function(){return s.BROWSER_MAP}},{key:\\\"ENGINE_MAP\\\",get:function(){return s.ENGINE_MAP}},{key:\\\"OS_MAP\\\",get:function(){return s.OS_MAP}},{key:\\\"PLATFORMS_MAP\\\",get:function(){return s.PLATFORMS_MAP}}],(r=null)&&a(t.prototype,r),n&&a(t,n),e}();t.default=o,e.exports=t.default},91:function(e,t,r){\\\"use strict\\\";t.__esModule=!0,t.default=void 0;var n=u(r(92)),i=u(r(93)),s=u(r(94)),a=u(r(95)),o=u(r(17));function u(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||\\\"\\\"===e)throw new Error(\\\"UserAgent parameter can't be empty\\\");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=o.default.find(n.default,(function(t){if(\\\"function\\\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\\\"Browser's test function is not valid\\\")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||\\\"\\\":this.getBrowser().name||\\\"\\\"},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=o.default.find(i.default,(function(t){if(\\\"function\\\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\\\"Browser's test function is not valid\\\")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||\\\"\\\":t||\\\"\\\"},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||\\\"\\\":t||\\\"\\\"},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=o.default.find(s.default,(function(t){if(\\\"function\\\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\\\"Browser's test function is not valid\\\")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||\\\"\\\":this.getEngine().name||\\\"\\\"},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=o.default.find(a.default,(function(t){if(\\\"function\\\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\\\"Browser's test function is not valid\\\")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return o.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},s=0;if(Object.keys(e).forEach((function(t){var a=e[t];\\\"string\\\"==typeof a?(i[t]=a,s+=1):\\\"object\\\"==typeof a&&(r[t]=a,n+=1)})),n>0){var a=Object.keys(r),u=o.default.find(a,(function(e){return t.isOS(e)}));if(u){var d=this.satisfies(r[u]);if(void 0!==d)return d}var c=o.default.find(a,(function(e){return t.isPlatform(e)}));if(c){var f=this.satisfies(r[c]);if(void 0!==f)return f}}if(s>0){var l=Object.keys(i),h=o.default.find(l,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=o.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if(\\\"string\\\"==typeof i)return\\\">\\\"===e[0]||\\\"<\\\"===e[0]?(r=e.substr(1),\\\"=\\\"===e[1]?(n=!0,r=e.substr(2)):t=[],\\\">\\\"===e[0]?t.push(1):t.push(-1)):\\\"=\\\"===e[0]?r=e.substr(1):\\\"~\\\"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(o.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=d,e.exports=t.default},92:function(e,t,r){\\\"use strict\\\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n};var s=/version\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:\\\"Googlebot\\\"},r=i.default.getFirstMatch(/googlebot\\\\/(\\\\d+(\\\\.\\\\d+))/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:\\\"Opera\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\\\\/|opios/i],describe:function(e){var t={name:\\\"Opera\\\"},r=i.default.getFirstMatch(/(?:opr|opios)[\\\\s/](\\\\S+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:\\\"Samsung Internet for Android\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:\\\"NAVER Whale Browser\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\\\\s/](\\\\d+(?:\\\\.\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:\\\"MZ Browser\\\"},r=i.default.getFirstMatch(/(?:MZBrowser)[\\\\s/](\\\\d+(?:\\\\.\\\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:\\\"Focus\\\"},r=i.default.getFirstMatch(/(?:focus)[\\\\s/](\\\\d+(?:\\\\.\\\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:\\\"Swing\\\"},r=i.default.getFirstMatch(/(?:swing)[\\\\s/](\\\\d+(?:\\\\.\\\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:\\\"Opera Coast\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\\\\/\\\\d+(?:.?_?\\\\d+)+/i],describe:function(e){var t={name:\\\"Opera Touch\\\"},r=i.default.getFirstMatch(/(?:opt)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:\\\"Yandex Browser\\\"},r=i.default.getFirstMatch(/(?:yabrowser)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:\\\"UC Browser\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:\\\"Maxthon\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:\\\"Epiphany\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:\\\"Puffin\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:\\\"Sleipnir\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:\\\"K-Meleon\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:\\\"WeChat\\\"},r=i.default.getFirstMatch(/(?:micromessenger)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?\\\"QQ Browser Lite\\\":\\\"QQ Browser\\\"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:\\\"Internet Explorer\\\"},r=i.default.getFirstMatch(/(?:msie |rv:)(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\\\\sedg\\\\//i],describe:function(e){var t={name:\\\"Microsoft Edge\\\"},r=i.default.getFirstMatch(/\\\\sedg\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:\\\"Microsoft Edge\\\"},r=i.default.getSecondMatch(/edg([ea]|ios)\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:\\\"Vivaldi\\\"},r=i.default.getFirstMatch(/vivaldi\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:\\\"SeaMonkey\\\"},r=i.default.getFirstMatch(/seamonkey\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:\\\"Sailfish\\\"},r=i.default.getFirstMatch(/sailfish\\\\s?browser\\\\/(\\\\d+(\\\\.\\\\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:\\\"Amazon Silk\\\"},r=i.default.getFirstMatch(/silk\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:\\\"PhantomJS\\\"},r=i.default.getFirstMatch(/phantomjs\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:\\\"SlimerJS\\\"},r=i.default.getFirstMatch(/slimerjs\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\\\\bbb\\\\d+/i,/rim\\\\stablet/i],describe:function(e){var t={name:\\\"BlackBerry\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\\\\d]+\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:\\\"WebOS Browser\\\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:\\\"Bada\\\"},r=i.default.getFirstMatch(/dolfin\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:\\\"Tizen\\\"},r=i.default.getFirstMatch(/(?:tizen\\\\s?)?browser\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:\\\"QupZilla\\\"},r=i.default.getFirstMatch(/(?:qupzilla)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:\\\"Firefox\\\"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:\\\"Electron\\\"},r=i.default.getFirstMatch(/(?:electron)\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:\\\"Miui\\\"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:\\\"Chromium\\\"},r=i.default.getFirstMatch(/(?:chromium)[\\\\s/](\\\\d+(\\\\.?_?\\\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:\\\"Chrome\\\"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:\\\"Google Search\\\"},r=i.default.getFirstMatch(/(?:GSA)\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:\\\"Android Browser\\\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:\\\"PlayStation 4\\\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:\\\"Safari\\\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search(\\\"\\\\\\\\(\\\")?/^(.*)\\\\/(.*)[ \\\\t]\\\\((.*)/:/^(.*)\\\\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){\\\"use strict\\\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:[/Roku\\\\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\\\\/DVP-(\\\\d+\\\\.\\\\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\\\\s?(\\\\d+(\\\\.\\\\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \\\\d\\\\d?.\\\\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\\\\//],describe:function(e){var t={name:s.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\\\\/)(\\\\d[\\\\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\\\\d+(\\\\.?_?\\\\d+)+)/i,e).replace(/[_\\\\s]/g,\\\".\\\"),r=i.default.getMacOSVersionName(t),n={name:s.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\\\\d+([_\\\\s]\\\\d+)*) like mac os x/i,e).replace(/[_\\\\s]/g,\\\".\\\");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\\\\s/-](\\\\d+(\\\\.\\\\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:s.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\\\\/(\\\\d+(\\\\.\\\\d+)*)/i,e),r={name:s.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\\\\bbb\\\\d+/i,/rim\\\\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\\\\stablet\\\\sos\\\\s(\\\\d+(\\\\.\\\\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\\\\d+\\\\/(\\\\d+([_\\\\s]\\\\d+)*)/i,e)||i.default.getFirstMatch(/\\\\bbb(\\\\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\\\\/(\\\\d+(\\\\.\\\\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\\\\s](\\\\d+(\\\\.\\\\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\\\\s](\\\\d+(\\\\.\\\\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){\\\"use strict\\\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:[/googlebot/i],describe:function(){return{type:\\\"bot\\\",vendor:\\\"Google\\\"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&\\\"Nova\\\",r={type:s.PLATFORMS_MAP.mobile,vendor:\\\"Huawei\\\"};return t&&(r.model=t),r}},{test:[/nexus\\\\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\\\"Nexus\\\"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\\\"Apple\\\",model:\\\"iPad\\\"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\\\\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\\\"Apple\\\",model:\\\"iPad\\\"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\\\"Amazon\\\",model:\\\"Kindle Fire HD 7\\\"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\\\"Amazon\\\"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:\\\"Apple\\\",model:t}}},{test:[/nexus\\\\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\\\"Nexus\\\"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\\\"blackberry\\\"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\\\"BlackBerry\\\"}}},{test:function(e){return\\\"bada\\\"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\\\"windows phone\\\"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\\\"Microsoft\\\"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(\\\".\\\")[0]);return\\\"android\\\"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return\\\"android\\\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\\\"macos\\\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:\\\"Apple\\\"}}},{test:function(e){return\\\"windows\\\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return\\\"linux\\\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return\\\"playstation 4\\\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return\\\"roku\\\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){\\\"use strict\\\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:function(e){return\\\"microsoft edge\\\"===e.getBrowserName(!0)},describe:function(e){if(/\\\\sedg\\\\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\\\\/537\\\\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\\\\/(\\\\d+(\\\\.?_?\\\\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})}));\\n\\n//# sourceURL=webpack://Liveness/./node_modules/bowser/es5.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/buffer/index.js\":\n/*!**************************************!*\\\n !*** ./node_modules/buffer/index.js ***!\n \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/* WEBPACK VAR INJECTION */(function(global) {/*!\\n * The buffer module from node.js, for the browser.\\n *\\n * @author Feross Aboukhadijeh <http://feross.org>\\n * @license MIT\\n */\\n/* eslint-disable no-proto */\\n\\n\\n\\nvar base64 = __webpack_require__(/*! base64-js */ \\\"./node_modules/base64-js/index.js\\\")\\nvar ieee754 = __webpack_require__(/*! ieee754 */ \\\"./node_modules/ieee754/index.js\\\")\\nvar isArray = __webpack_require__(/*! isarray */ \\\"./node_modules/isarray/index.js\\\")\\n\\nexports.Buffer = Buffer\\nexports.SlowBuffer = SlowBuffer\\nexports.INSPECT_MAX_BYTES = 50\\n\\n/**\\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\\n * === true Use Uint8Array implementation (fastest)\\n * === false Use Object implementation (most compatible, even IE6)\\n *\\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\\n * Opera 11.6+, iOS 4.2+.\\n *\\n * Due to various browser bugs, sometimes the Object implementation will be used even\\n * when the browser supports typed arrays.\\n *\\n * Note:\\n *\\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\\n *\\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\\n *\\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\\n * incorrect length in some situations.\\n\\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\\n * get the Object implementation, which is slower but behaves correctly.\\n */\\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\\n ? global.TYPED_ARRAY_SUPPORT\\n : typedArraySupport()\\n\\n/*\\n * Export kMaxLength after typed array support is determined.\\n */\\nexports.kMaxLength = kMaxLength()\\n\\nfunction typedArraySupport () {\\n try {\\n var arr = new Uint8Array(1)\\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\\n return arr.foo() === 42 && // typed array instances can be augmented\\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\\n } catch (e) {\\n return false\\n }\\n}\\n\\nfunction kMaxLength () {\\n return Buffer.TYPED_ARRAY_SUPPORT\\n ? 0x7fffffff\\n : 0x3fffffff\\n}\\n\\nfunction createBuffer (that, length) {\\n if (kMaxLength() < length) {\\n throw new RangeError('Invalid typed array length')\\n }\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n // Return an augmented `Uint8Array` instance, for best performance\\n that = new Uint8Array(length)\\n that.__proto__ = Buffer.prototype\\n } else {\\n // Fallback: Return an object instance of the Buffer class\\n if (that === null) {\\n that = new Buffer(length)\\n }\\n that.length = length\\n }\\n\\n return that\\n}\\n\\n/**\\n * The Buffer constructor returns instances of `Uint8Array` that have their\\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\\n * returns a single octet.\\n *\\n * The `Uint8Array` prototype remains unmodified.\\n */\\n\\nfunction Buffer (arg, encodingOrOffset, length) {\\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\\n return new Buffer(arg, encodingOrOffset, length)\\n }\\n\\n // Common case.\\n if (typeof arg === 'number') {\\n if (typeof encodingOrOffset === 'string') {\\n throw new Error(\\n 'If encoding is specified then the first argument must be a string'\\n )\\n }\\n return allocUnsafe(this, arg)\\n }\\n return from(this, arg, encodingOrOffset, length)\\n}\\n\\nBuffer.poolSize = 8192 // not used by this implementation\\n\\n// TODO: Legacy, not needed anymore. Remove in next major version.\\nBuffer._augment = function (arr) {\\n arr.__proto__ = Buffer.prototype\\n return arr\\n}\\n\\nfunction from (that, value, encodingOrOffset, length) {\\n if (typeof value === 'number') {\\n throw new TypeError('\\\"value\\\" argument must not be a number')\\n }\\n\\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\\n return fromArrayBuffer(that, value, encodingOrOffset, length)\\n }\\n\\n if (typeof value === 'string') {\\n return fromString(that, value, encodingOrOffset)\\n }\\n\\n return fromObject(that, value)\\n}\\n\\n/**\\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\\n * if value is a number.\\n * Buffer.from(str[, encoding])\\n * Buffer.from(array)\\n * Buffer.from(buffer)\\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\\n **/\\nBuffer.from = function (value, encodingOrOffset, length) {\\n return from(null, value, encodingOrOffset, length)\\n}\\n\\nif (Buffer.TYPED_ARRAY_SUPPORT) {\\n Buffer.prototype.__proto__ = Uint8Array.prototype\\n Buffer.__proto__ = Uint8Array\\n if (typeof Symbol !== 'undefined' && Symbol.species &&\\n Buffer[Symbol.species] === Buffer) {\\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\\n Object.defineProperty(Buffer, Symbol.species, {\\n value: null,\\n configurable: true\\n })\\n }\\n}\\n\\nfunction assertSize (size) {\\n if (typeof size !== 'number') {\\n throw new TypeError('\\\"size\\\" argument must be a number')\\n } else if (size < 0) {\\n throw new RangeError('\\\"size\\\" argument must not be negative')\\n }\\n}\\n\\nfunction alloc (that, size, fill, encoding) {\\n assertSize(size)\\n if (size <= 0) {\\n return createBuffer(that, size)\\n }\\n if (fill !== undefined) {\\n // Only pay attention to encoding if it's a string. This\\n // prevents accidentally sending in a number that would\\n // be interpretted as a start offset.\\n return typeof encoding === 'string'\\n ? createBuffer(that, size).fill(fill, encoding)\\n : createBuffer(that, size).fill(fill)\\n }\\n return createBuffer(that, size)\\n}\\n\\n/**\\n * Creates a new filled Buffer instance.\\n * alloc(size[, fill[, encoding]])\\n **/\\nBuffer.alloc = function (size, fill, encoding) {\\n return alloc(null, size, fill, encoding)\\n}\\n\\nfunction allocUnsafe (that, size) {\\n assertSize(size)\\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\\n for (var i = 0; i < size; ++i) {\\n that[i] = 0\\n }\\n }\\n return that\\n}\\n\\n/**\\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\\n * */\\nBuffer.allocUnsafe = function (size) {\\n return allocUnsafe(null, size)\\n}\\n/**\\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\\n */\\nBuffer.allocUnsafeSlow = function (size) {\\n return allocUnsafe(null, size)\\n}\\n\\nfunction fromString (that, string, encoding) {\\n if (typeof encoding !== 'string' || encoding === '') {\\n encoding = 'utf8'\\n }\\n\\n if (!Buffer.isEncoding(encoding)) {\\n throw new TypeError('\\\"encoding\\\" must be a valid string encoding')\\n }\\n\\n var length = byteLength(string, encoding) | 0\\n that = createBuffer(that, length)\\n\\n var actual = that.write(string, encoding)\\n\\n if (actual !== length) {\\n // Writing a hex string, for example, that contains invalid characters will\\n // cause everything after the first invalid character to be ignored. (e.g.\\n // 'abxxcd' will be treated as 'ab')\\n that = that.slice(0, actual)\\n }\\n\\n return that\\n}\\n\\nfunction fromArrayLike (that, array) {\\n var length = array.length < 0 ? 0 : checked(array.length) | 0\\n that = createBuffer(that, length)\\n for (var i = 0; i < length; i += 1) {\\n that[i] = array[i] & 255\\n }\\n return that\\n}\\n\\nfunction fromArrayBuffer (that, array, byteOffset, length) {\\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\\n\\n if (byteOffset < 0 || array.byteLength < byteOffset) {\\n throw new RangeError('\\\\'offset\\\\' is out of bounds')\\n }\\n\\n if (array.byteLength < byteOffset + (length || 0)) {\\n throw new RangeError('\\\\'length\\\\' is out of bounds')\\n }\\n\\n if (byteOffset === undefined && length === undefined) {\\n array = new Uint8Array(array)\\n } else if (length === undefined) {\\n array = new Uint8Array(array, byteOffset)\\n } else {\\n array = new Uint8Array(array, byteOffset, length)\\n }\\n\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n // Return an augmented `Uint8Array` instance, for best performance\\n that = array\\n that.__proto__ = Buffer.prototype\\n } else {\\n // Fallback: Return an object instance of the Buffer class\\n that = fromArrayLike(that, array)\\n }\\n return that\\n}\\n\\nfunction fromObject (that, obj) {\\n if (Buffer.isBuffer(obj)) {\\n var len = checked(obj.length) | 0\\n that = createBuffer(that, len)\\n\\n if (that.length === 0) {\\n return that\\n }\\n\\n obj.copy(that, 0, 0, len)\\n return that\\n }\\n\\n if (obj) {\\n if ((typeof ArrayBuffer !== 'undefined' &&\\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\\n return createBuffer(that, 0)\\n }\\n return fromArrayLike(that, obj)\\n }\\n\\n if (obj.type === 'Buffer' && isArray(obj.data)) {\\n return fromArrayLike(that, obj.data)\\n }\\n }\\n\\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\\n}\\n\\nfunction checked (length) {\\n // Note: cannot use `length < kMaxLength()` here because that fails when\\n // length is NaN (which is otherwise coerced to zero.)\\n if (length >= kMaxLength()) {\\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\\n }\\n return length | 0\\n}\\n\\nfunction SlowBuffer (length) {\\n if (+length != length) { // eslint-disable-line eqeqeq\\n length = 0\\n }\\n return Buffer.alloc(+length)\\n}\\n\\nBuffer.isBuffer = function isBuffer (b) {\\n return !!(b != null && b._isBuffer)\\n}\\n\\nBuffer.compare = function compare (a, b) {\\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\\n throw new TypeError('Arguments must be Buffers')\\n }\\n\\n if (a === b) return 0\\n\\n var x = a.length\\n var y = b.length\\n\\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\\n if (a[i] !== b[i]) {\\n x = a[i]\\n y = b[i]\\n break\\n }\\n }\\n\\n if (x < y) return -1\\n if (y < x) return 1\\n return 0\\n}\\n\\nBuffer.isEncoding = function isEncoding (encoding) {\\n switch (String(encoding).toLowerCase()) {\\n case 'hex':\\n case 'utf8':\\n case 'utf-8':\\n case 'ascii':\\n case 'latin1':\\n case 'binary':\\n case 'base64':\\n case 'ucs2':\\n case 'ucs-2':\\n case 'utf16le':\\n case 'utf-16le':\\n return true\\n default:\\n return false\\n }\\n}\\n\\nBuffer.concat = function concat (list, length) {\\n if (!isArray(list)) {\\n throw new TypeError('\\\"list\\\" argument must be an Array of Buffers')\\n }\\n\\n if (list.length === 0) {\\n return Buffer.alloc(0)\\n }\\n\\n var i\\n if (length === undefined) {\\n length = 0\\n for (i = 0; i < list.length; ++i) {\\n length += list[i].length\\n }\\n }\\n\\n var buffer = Buffer.allocUnsafe(length)\\n var pos = 0\\n for (i = 0; i < list.length; ++i) {\\n var buf = list[i]\\n if (!Buffer.isBuffer(buf)) {\\n throw new TypeError('\\\"list\\\" argument must be an Array of Buffers')\\n }\\n buf.copy(buffer, pos)\\n pos += buf.length\\n }\\n return buffer\\n}\\n\\nfunction byteLength (string, encoding) {\\n if (Buffer.isBuffer(string)) {\\n return string.length\\n }\\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\\n return string.byteLength\\n }\\n if (typeof string !== 'string') {\\n string = '' + string\\n }\\n\\n var len = string.length\\n if (len === 0) return 0\\n\\n // Use a for loop to avoid recursion\\n var loweredCase = false\\n for (;;) {\\n switch (encoding) {\\n case 'ascii':\\n case 'latin1':\\n case 'binary':\\n return len\\n case 'utf8':\\n case 'utf-8':\\n case undefined:\\n return utf8ToBytes(string).length\\n case 'ucs2':\\n case 'ucs-2':\\n case 'utf16le':\\n case 'utf-16le':\\n return len * 2\\n case 'hex':\\n return len >>> 1\\n case 'base64':\\n return base64ToBytes(string).length\\n default:\\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\\n encoding = ('' + encoding).toLowerCase()\\n loweredCase = true\\n }\\n }\\n}\\nBuffer.byteLength = byteLength\\n\\nfunction slowToString (encoding, start, end) {\\n var loweredCase = false\\n\\n // No need to verify that \\\"this.length <= MAX_UINT32\\\" since it's a read-only\\n // property of a typed array.\\n\\n // This behaves neither like String nor Uint8Array in that we set start/end\\n // to their upper/lower bounds if the value passed is out of range.\\n // undefined is handled specially as per ECMA-262 6th Edition,\\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\\n if (start === undefined || start < 0) {\\n start = 0\\n }\\n // Return early if start > this.length. Done here to prevent potential uint32\\n // coercion fail below.\\n if (start > this.length) {\\n return ''\\n }\\n\\n if (end === undefined || end > this.length) {\\n end = this.length\\n }\\n\\n if (end <= 0) {\\n return ''\\n }\\n\\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\\n end >>>= 0\\n start >>>= 0\\n\\n if (end <= start) {\\n return ''\\n }\\n\\n if (!encoding) encoding = 'utf8'\\n\\n while (true) {\\n switch (encoding) {\\n case 'hex':\\n return hexSlice(this, start, end)\\n\\n case 'utf8':\\n case 'utf-8':\\n return utf8Slice(this, start, end)\\n\\n case 'ascii':\\n return asciiSlice(this, start, end)\\n\\n case 'latin1':\\n case 'binary':\\n return latin1Slice(this, start, end)\\n\\n case 'base64':\\n return base64Slice(this, start, end)\\n\\n case 'ucs2':\\n case 'ucs-2':\\n case 'utf16le':\\n case 'utf-16le':\\n return utf16leSlice(this, start, end)\\n\\n default:\\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\\n encoding = (encoding + '').toLowerCase()\\n loweredCase = true\\n }\\n }\\n}\\n\\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\\n// Buffer instances.\\nBuffer.prototype._isBuffer = true\\n\\nfunction swap (b, n, m) {\\n var i = b[n]\\n b[n] = b[m]\\n b[m] = i\\n}\\n\\nBuffer.prototype.swap16 = function swap16 () {\\n var len = this.length\\n if (len % 2 !== 0) {\\n throw new RangeError('Buffer size must be a multiple of 16-bits')\\n }\\n for (var i = 0; i < len; i += 2) {\\n swap(this, i, i + 1)\\n }\\n return this\\n}\\n\\nBuffer.prototype.swap32 = function swap32 () {\\n var len = this.length\\n if (len % 4 !== 0) {\\n throw new RangeError('Buffer size must be a multiple of 32-bits')\\n }\\n for (var i = 0; i < len; i += 4) {\\n swap(this, i, i + 3)\\n swap(this, i + 1, i + 2)\\n }\\n return this\\n}\\n\\nBuffer.prototype.swap64 = function swap64 () {\\n var len = this.length\\n if (len % 8 !== 0) {\\n throw new RangeError('Buffer size must be a multiple of 64-bits')\\n }\\n for (var i = 0; i < len; i += 8) {\\n swap(this, i, i + 7)\\n swap(this, i + 1, i + 6)\\n swap(this, i + 2, i + 5)\\n swap(this, i + 3, i + 4)\\n }\\n return this\\n}\\n\\nBuffer.prototype.toString = function toString () {\\n var length = this.length | 0\\n if (length === 0) return ''\\n if (arguments.length === 0) return utf8Slice(this, 0, length)\\n return slowToString.apply(this, arguments)\\n}\\n\\nBuffer.prototype.equals = function equals (b) {\\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\\n if (this === b) return true\\n return Buffer.compare(this, b) === 0\\n}\\n\\nBuffer.prototype.inspect = function inspect () {\\n var str = ''\\n var max = exports.INSPECT_MAX_BYTES\\n if (this.length > 0) {\\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\\n if (this.length > max) str += ' ... '\\n }\\n return '<Buffer ' + str + '>'\\n}\\n\\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\\n if (!Buffer.isBuffer(target)) {\\n throw new TypeError('Argument must be a Buffer')\\n }\\n\\n if (start === undefined) {\\n start = 0\\n }\\n if (end === undefined) {\\n end = target ? target.length : 0\\n }\\n if (thisStart === undefined) {\\n thisStart = 0\\n }\\n if (thisEnd === undefined) {\\n thisEnd = this.length\\n }\\n\\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\\n throw new RangeError('out of range index')\\n }\\n\\n if (thisStart >= thisEnd && start >= end) {\\n return 0\\n }\\n if (thisStart >= thisEnd) {\\n return -1\\n }\\n if (start >= end) {\\n return 1\\n }\\n\\n start >>>= 0\\n end >>>= 0\\n thisStart >>>= 0\\n thisEnd >>>= 0\\n\\n if (this === target) return 0\\n\\n var x = thisEnd - thisStart\\n var y = end - start\\n var len = Math.min(x, y)\\n\\n var thisCopy = this.slice(thisStart, thisEnd)\\n var targetCopy = target.slice(start, end)\\n\\n for (var i = 0; i < len; ++i) {\\n if (thisCopy[i] !== targetCopy[i]) {\\n x = thisCopy[i]\\n y = targetCopy[i]\\n break\\n }\\n }\\n\\n if (x < y) return -1\\n if (y < x) return 1\\n return 0\\n}\\n\\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\\n//\\n// Arguments:\\n// - buffer - a Buffer to search\\n// - val - a string, Buffer, or number\\n// - byteOffset - an index into `buffer`; will be clamped to an int32\\n// - encoding - an optional encoding, relevant is val is a string\\n// - dir - true for indexOf, false for lastIndexOf\\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\\n // Empty buffer means no match\\n if (buffer.length === 0) return -1\\n\\n // Normalize byteOffset\\n if (typeof byteOffset === 'string') {\\n encoding = byteOffset\\n byteOffset = 0\\n } else if (byteOffset > 0x7fffffff) {\\n byteOffset = 0x7fffffff\\n } else if (byteOffset < -0x80000000) {\\n byteOffset = -0x80000000\\n }\\n byteOffset = +byteOffset // Coerce to Number.\\n if (isNaN(byteOffset)) {\\n // byteOffset: it it's undefined, null, NaN, \\\"foo\\\", etc, search whole buffer\\n byteOffset = dir ? 0 : (buffer.length - 1)\\n }\\n\\n // Normalize byteOffset: negative offsets start from the end of the buffer\\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\\n if (byteOffset >= buffer.length) {\\n if (dir) return -1\\n else byteOffset = buffer.length - 1\\n } else if (byteOffset < 0) {\\n if (dir) byteOffset = 0\\n else return -1\\n }\\n\\n // Normalize val\\n if (typeof val === 'string') {\\n val = Buffer.from(val, encoding)\\n }\\n\\n // Finally, search either indexOf (if dir is true) or lastIndexOf\\n if (Buffer.isBuffer(val)) {\\n // Special case: looking for empty string/buffer always fails\\n if (val.length === 0) {\\n return -1\\n }\\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\\n } else if (typeof val === 'number') {\\n val = val & 0xFF // Search for a byte value [0-255]\\n if (Buffer.TYPED_ARRAY_SUPPORT &&\\n typeof Uint8Array.prototype.indexOf === 'function') {\\n if (dir) {\\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\\n } else {\\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\\n }\\n }\\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\\n }\\n\\n throw new TypeError('val must be string, number or Buffer')\\n}\\n\\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\\n var indexSize = 1\\n var arrLength = arr.length\\n var valLength = val.length\\n\\n if (encoding !== undefined) {\\n encoding = String(encoding).toLowerCase()\\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\\n encoding === 'utf16le' || encoding === 'utf-16le') {\\n if (arr.length < 2 || val.length < 2) {\\n return -1\\n }\\n indexSize = 2\\n arrLength /= 2\\n valLength /= 2\\n byteOffset /= 2\\n }\\n }\\n\\n function read (buf, i) {\\n if (indexSize === 1) {\\n return buf[i]\\n } else {\\n return buf.readUInt16BE(i * indexSize)\\n }\\n }\\n\\n var i\\n if (dir) {\\n var foundIndex = -1\\n for (i = byteOffset; i < arrLength; i++) {\\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\\n if (foundIndex === -1) foundIndex = i\\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\\n } else {\\n if (foundIndex !== -1) i -= i - foundIndex\\n foundIndex = -1\\n }\\n }\\n } else {\\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\\n for (i = byteOffset; i >= 0; i--) {\\n var found = true\\n for (var j = 0; j < valLength; j++) {\\n if (read(arr, i + j) !== read(val, j)) {\\n found = false\\n break\\n }\\n }\\n if (found) return i\\n }\\n }\\n\\n return -1\\n}\\n\\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\\n return this.indexOf(val, byteOffset, encoding) !== -1\\n}\\n\\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\\n}\\n\\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\\n}\\n\\nfunction hexWrite (buf, string, offset, length) {\\n offset = Number(offset) || 0\\n var remaining = buf.length - offset\\n if (!length) {\\n length = remaining\\n } else {\\n length = Number(length)\\n if (length > remaining) {\\n length = remaining\\n }\\n }\\n\\n // must be an even number of digits\\n var strLen = string.length\\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\\n\\n if (length > strLen / 2) {\\n length = strLen / 2\\n }\\n for (var i = 0; i < length; ++i) {\\n var parsed = parseInt(string.substr(i * 2, 2), 16)\\n if (isNaN(parsed)) return i\\n buf[offset + i] = parsed\\n }\\n return i\\n}\\n\\nfunction utf8Write (buf, string, offset, length) {\\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\\n}\\n\\nfunction asciiWrite (buf, string, offset, length) {\\n return blitBuffer(asciiToBytes(string), buf, offset, length)\\n}\\n\\nfunction latin1Write (buf, string, offset, length) {\\n return asciiWrite(buf, string, offset, length)\\n}\\n\\nfunction base64Write (buf, string, offset, length) {\\n return blitBuffer(base64ToBytes(string), buf, offset, length)\\n}\\n\\nfunction ucs2Write (buf, string, offset, length) {\\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\\n}\\n\\nBuffer.prototype.write = function write (string, offset, length, encoding) {\\n // Buffer#write(string)\\n if (offset === undefined) {\\n encoding = 'utf8'\\n length = this.length\\n offset = 0\\n // Buffer#write(string, encoding)\\n } else if (length === undefined && typeof offset === 'string') {\\n encoding = offset\\n length = this.length\\n offset = 0\\n // Buffer#write(string, offset[, length][, encoding])\\n } else if (isFinite(offset)) {\\n offset = offset | 0\\n if (isFinite(length)) {\\n length = length | 0\\n if (encoding === undefined) encoding = 'utf8'\\n } else {\\n encoding = length\\n length = undefined\\n }\\n // legacy write(string, encoding, offset, length) - remove in v0.13\\n } else {\\n throw new Error(\\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\\n )\\n }\\n\\n var remaining = this.length - offset\\n if (length === undefined || length > remaining) length = remaining\\n\\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\\n throw new RangeError('Attempt to write outside buffer bounds')\\n }\\n\\n if (!encoding) encoding = 'utf8'\\n\\n var loweredCase = false\\n for (;;) {\\n switch (encoding) {\\n case 'hex':\\n return hexWrite(this, string, offset, length)\\n\\n case 'utf8':\\n case 'utf-8':\\n return utf8Write(this, string, offset, length)\\n\\n case 'ascii':\\n return asciiWrite(this, string, offset, length)\\n\\n case 'latin1':\\n case 'binary':\\n return latin1Write(this, string, offset, length)\\n\\n case 'base64':\\n // Warning: maxLength not taken into account in base64Write\\n return base64Write(this, string, offset, length)\\n\\n case 'ucs2':\\n case 'ucs-2':\\n case 'utf16le':\\n case 'utf-16le':\\n return ucs2Write(this, string, offset, length)\\n\\n default:\\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\\n encoding = ('' + encoding).toLowerCase()\\n loweredCase = true\\n }\\n }\\n}\\n\\nBuffer.prototype.toJSON = function toJSON () {\\n return {\\n type: 'Buffer',\\n data: Array.prototype.slice.call(this._arr || this, 0)\\n }\\n}\\n\\nfunction base64Slice (buf, start, end) {\\n if (start === 0 && end === buf.length) {\\n return base64.fromByteArray(buf)\\n } else {\\n return base64.fromByteArray(buf.slice(start, end))\\n }\\n}\\n\\nfunction utf8Slice (buf, start, end) {\\n end = Math.min(buf.length, end)\\n var res = []\\n\\n var i = start\\n while (i < end) {\\n var firstByte = buf[i]\\n var codePoint = null\\n var bytesPerSequence = (firstByte > 0xEF) ? 4\\n : (firstByte > 0xDF) ? 3\\n : (firstByte > 0xBF) ? 2\\n : 1\\n\\n if (i + bytesPerSequence <= end) {\\n var secondByte, thirdByte, fourthByte, tempCodePoint\\n\\n switch (bytesPerSequence) {\\n case 1:\\n if (firstByte < 0x80) {\\n codePoint = firstByte\\n }\\n break\\n case 2:\\n secondByte = buf[i + 1]\\n if ((secondByte & 0xC0) === 0x80) {\\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\\n if (tempCodePoint > 0x7F) {\\n codePoint = tempCodePoint\\n }\\n }\\n break\\n case 3:\\n secondByte = buf[i + 1]\\n thirdByte = buf[i + 2]\\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\\n codePoint = tempCodePoint\\n }\\n }\\n break\\n case 4:\\n secondByte = buf[i + 1]\\n thirdByte = buf[i + 2]\\n fourthByte = buf[i + 3]\\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\\n codePoint = tempCodePoint\\n }\\n }\\n }\\n }\\n\\n if (codePoint === null) {\\n // we did not generate a valid codePoint so insert a\\n // replacement char (U+FFFD) and advance only 1 byte\\n codePoint = 0xFFFD\\n bytesPerSequence = 1\\n } else if (codePoint > 0xFFFF) {\\n // encode to utf16 (surrogate pair dance)\\n codePoint -= 0x10000\\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\\n codePoint = 0xDC00 | codePoint & 0x3FF\\n }\\n\\n res.push(codePoint)\\n i += bytesPerSequence\\n }\\n\\n return decodeCodePointsArray(res)\\n}\\n\\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\\n// the lowest limit is Chrome, with 0x10000 args.\\n// We go 1 magnitude less, for safety\\nvar MAX_ARGUMENTS_LENGTH = 0x1000\\n\\nfunction decodeCodePointsArray (codePoints) {\\n var len = codePoints.length\\n if (len <= MAX_ARGUMENTS_LENGTH) {\\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\\n }\\n\\n // Decode in chunks to avoid \\\"call stack size exceeded\\\".\\n var res = ''\\n var i = 0\\n while (i < len) {\\n res += String.fromCharCode.apply(\\n String,\\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\\n )\\n }\\n return res\\n}\\n\\nfunction asciiSlice (buf, start, end) {\\n var ret = ''\\n end = Math.min(buf.length, end)\\n\\n for (var i = start; i < end; ++i) {\\n ret += String.fromCharCode(buf[i] & 0x7F)\\n }\\n return ret\\n}\\n\\nfunction latin1Slice (buf, start, end) {\\n var ret = ''\\n end = Math.min(buf.length, end)\\n\\n for (var i = start; i < end; ++i) {\\n ret += String.fromCharCode(buf[i])\\n }\\n return ret\\n}\\n\\nfunction hexSlice (buf, start, end) {\\n var len = buf.length\\n\\n if (!start || start < 0) start = 0\\n if (!end || end < 0 || end > len) end = len\\n\\n var out = ''\\n for (var i = start; i < end; ++i) {\\n out += toHex(buf[i])\\n }\\n return out\\n}\\n\\nfunction utf16leSlice (buf, start, end) {\\n var bytes = buf.slice(start, end)\\n var res = ''\\n for (var i = 0; i < bytes.length; i += 2) {\\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\\n }\\n return res\\n}\\n\\nBuffer.prototype.slice = function slice (start, end) {\\n var len = this.length\\n start = ~~start\\n end = end === undefined ? len : ~~end\\n\\n if (start < 0) {\\n start += len\\n if (start < 0) start = 0\\n } else if (start > len) {\\n start = len\\n }\\n\\n if (end < 0) {\\n end += len\\n if (end < 0) end = 0\\n } else if (end > len) {\\n end = len\\n }\\n\\n if (end < start) end = start\\n\\n var newBuf\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n newBuf = this.subarray(start, end)\\n newBuf.__proto__ = Buffer.prototype\\n } else {\\n var sliceLen = end - start\\n newBuf = new Buffer(sliceLen, undefined)\\n for (var i = 0; i < sliceLen; ++i) {\\n newBuf[i] = this[i + start]\\n }\\n }\\n\\n return newBuf\\n}\\n\\n/*\\n * Need to make sure that buffer isn't trying to write out of bounds.\\n */\\nfunction checkOffset (offset, ext, length) {\\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\\n}\\n\\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\\n offset = offset | 0\\n byteLength = byteLength | 0\\n if (!noAssert) checkOffset(offset, byteLength, this.length)\\n\\n var val = this[offset]\\n var mul = 1\\n var i = 0\\n while (++i < byteLength && (mul *= 0x100)) {\\n val += this[offset + i] * mul\\n }\\n\\n return val\\n}\\n\\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\\n offset = offset | 0\\n byteLength = byteLength | 0\\n if (!noAssert) {\\n checkOffset(offset, byteLength, this.length)\\n }\\n\\n var val = this[offset + --byteLength]\\n var mul = 1\\n while (byteLength > 0 && (mul *= 0x100)) {\\n val += this[offset + --byteLength] * mul\\n }\\n\\n return val\\n}\\n\\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 1, this.length)\\n return this[offset]\\n}\\n\\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 2, this.length)\\n return this[offset] | (this[offset + 1] << 8)\\n}\\n\\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 2, this.length)\\n return (this[offset] << 8) | this[offset + 1]\\n}\\n\\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n return ((this[offset]) |\\n (this[offset + 1] << 8) |\\n (this[offset + 2] << 16)) +\\n (this[offset + 3] * 0x1000000)\\n}\\n\\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n return (this[offset] * 0x1000000) +\\n ((this[offset + 1] << 16) |\\n (this[offset + 2] << 8) |\\n this[offset + 3])\\n}\\n\\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\\n offset = offset | 0\\n byteLength = byteLength | 0\\n if (!noAssert) checkOffset(offset, byteLength, this.length)\\n\\n var val = this[offset]\\n var mul = 1\\n var i = 0\\n while (++i < byteLength && (mul *= 0x100)) {\\n val += this[offset + i] * mul\\n }\\n mul *= 0x80\\n\\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\\n\\n return val\\n}\\n\\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\\n offset = offset | 0\\n byteLength = byteLength | 0\\n if (!noAssert) checkOffset(offset, byteLength, this.length)\\n\\n var i = byteLength\\n var mul = 1\\n var val = this[offset + --i]\\n while (i > 0 && (mul *= 0x100)) {\\n val += this[offset + --i] * mul\\n }\\n mul *= 0x80\\n\\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\\n\\n return val\\n}\\n\\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 1, this.length)\\n if (!(this[offset] & 0x80)) return (this[offset])\\n return ((0xff - this[offset] + 1) * -1)\\n}\\n\\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 2, this.length)\\n var val = this[offset] | (this[offset + 1] << 8)\\n return (val & 0x8000) ? val | 0xFFFF0000 : val\\n}\\n\\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 2, this.length)\\n var val = this[offset + 1] | (this[offset] << 8)\\n return (val & 0x8000) ? val | 0xFFFF0000 : val\\n}\\n\\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n return (this[offset]) |\\n (this[offset + 1] << 8) |\\n (this[offset + 2] << 16) |\\n (this[offset + 3] << 24)\\n}\\n\\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n return (this[offset] << 24) |\\n (this[offset + 1] << 16) |\\n (this[offset + 2] << 8) |\\n (this[offset + 3])\\n}\\n\\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 4, this.length)\\n return ieee754.read(this, offset, true, 23, 4)\\n}\\n\\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 4, this.length)\\n return ieee754.read(this, offset, false, 23, 4)\\n}\\n\\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 8, this.length)\\n return ieee754.read(this, offset, true, 52, 8)\\n}\\n\\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\\n if (!noAssert) checkOffset(offset, 8, this.length)\\n return ieee754.read(this, offset, false, 52, 8)\\n}\\n\\nfunction checkInt (buf, value, offset, ext, max, min) {\\n if (!Buffer.isBuffer(buf)) throw new TypeError('\\\"buffer\\\" argument must be a Buffer instance')\\n if (value > max || value < min) throw new RangeError('\\\"value\\\" argument is out of bounds')\\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\\n}\\n\\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\\n value = +value\\n offset = offset | 0\\n byteLength = byteLength | 0\\n if (!noAssert) {\\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\\n checkInt(this, value, offset, byteLength, maxBytes, 0)\\n }\\n\\n var mul = 1\\n var i = 0\\n this[offset] = value & 0xFF\\n while (++i < byteLength && (mul *= 0x100)) {\\n this[offset + i] = (value / mul) & 0xFF\\n }\\n\\n return offset + byteLength\\n}\\n\\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\\n value = +value\\n offset = offset | 0\\n byteLength = byteLength | 0\\n if (!noAssert) {\\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\\n checkInt(this, value, offset, byteLength, maxBytes, 0)\\n }\\n\\n var i = byteLength - 1\\n var mul = 1\\n this[offset + i] = value & 0xFF\\n while (--i >= 0 && (mul *= 0x100)) {\\n this[offset + i] = (value / mul) & 0xFF\\n }\\n\\n return offset + byteLength\\n}\\n\\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\\n this[offset] = (value & 0xff)\\n return offset + 1\\n}\\n\\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\\n if (value < 0) value = 0xffff + value + 1\\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\\n (littleEndian ? i : 1 - i) * 8\\n }\\n}\\n\\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n this[offset] = (value & 0xff)\\n this[offset + 1] = (value >>> 8)\\n } else {\\n objectWriteUInt16(this, value, offset, true)\\n }\\n return offset + 2\\n}\\n\\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n this[offset] = (value >>> 8)\\n this[offset + 1] = (value & 0xff)\\n } else {\\n objectWriteUInt16(this, value, offset, false)\\n }\\n return offset + 2\\n}\\n\\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\\n if (value < 0) value = 0xffffffff + value + 1\\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\\n }\\n}\\n\\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n this[offset + 3] = (value >>> 24)\\n this[offset + 2] = (value >>> 16)\\n this[offset + 1] = (value >>> 8)\\n this[offset] = (value & 0xff)\\n } else {\\n objectWriteUInt32(this, value, offset, true)\\n }\\n return offset + 4\\n}\\n\\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n this[offset] = (value >>> 24)\\n this[offset + 1] = (value >>> 16)\\n this[offset + 2] = (value >>> 8)\\n this[offset + 3] = (value & 0xff)\\n } else {\\n objectWriteUInt32(this, value, offset, false)\\n }\\n return offset + 4\\n}\\n\\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) {\\n var limit = Math.pow(2, 8 * byteLength - 1)\\n\\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\\n }\\n\\n var i = 0\\n var mul = 1\\n var sub = 0\\n this[offset] = value & 0xFF\\n while (++i < byteLength && (mul *= 0x100)) {\\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\\n sub = 1\\n }\\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\\n }\\n\\n return offset + byteLength\\n}\\n\\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) {\\n var limit = Math.pow(2, 8 * byteLength - 1)\\n\\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\\n }\\n\\n var i = byteLength - 1\\n var mul = 1\\n var sub = 0\\n this[offset + i] = value & 0xFF\\n while (--i >= 0 && (mul *= 0x100)) {\\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\\n sub = 1\\n }\\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\\n }\\n\\n return offset + byteLength\\n}\\n\\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\\n if (value < 0) value = 0xff + value + 1\\n this[offset] = (value & 0xff)\\n return offset + 1\\n}\\n\\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n this[offset] = (value & 0xff)\\n this[offset + 1] = (value >>> 8)\\n } else {\\n objectWriteUInt16(this, value, offset, true)\\n }\\n return offset + 2\\n}\\n\\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n this[offset] = (value >>> 8)\\n this[offset + 1] = (value & 0xff)\\n } else {\\n objectWriteUInt16(this, value, offset, false)\\n }\\n return offset + 2\\n}\\n\\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n this[offset] = (value & 0xff)\\n this[offset + 1] = (value >>> 8)\\n this[offset + 2] = (value >>> 16)\\n this[offset + 3] = (value >>> 24)\\n } else {\\n objectWriteUInt32(this, value, offset, true)\\n }\\n return offset + 4\\n}\\n\\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\\n value = +value\\n offset = offset | 0\\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\\n if (value < 0) value = 0xffffffff + value + 1\\n if (Buffer.TYPED_ARRAY_SUPPORT) {\\n this[offset] = (value >>> 24)\\n this[offset + 1] = (value >>> 16)\\n this[offset + 2] = (value >>> 8)\\n this[offset + 3] = (value & 0xff)\\n } else {\\n objectWriteUInt32(this, value, offset, false)\\n }\\n return offset + 4\\n}\\n\\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\\n if (offset < 0) throw new RangeError('Index out of range')\\n}\\n\\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\\n if (!noAssert) {\\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\\n }\\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\\n return offset + 4\\n}\\n\\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\\n return writeFloat(this, value, offset, true, noAssert)\\n}\\n\\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\\n return writeFloat(this, value, offset, false, noAssert)\\n}\\n\\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\\n if (!noAssert) {\\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\\n }\\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\\n return offset + 8\\n}\\n\\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\\n return writeDouble(this, value, offset, true, noAssert)\\n}\\n\\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\\n return writeDouble(this, value, offset, false, noAssert)\\n}\\n\\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\\n if (!start) start = 0\\n if (!end && end !== 0) end = this.length\\n if (targetStart >= target.length) targetStart = target.length\\n if (!targetStart) targetStart = 0\\n if (end > 0 && end < start) end = start\\n\\n // Copy 0 bytes; we're done\\n if (end === start) return 0\\n if (target.length === 0 || this.length === 0) return 0\\n\\n // Fatal error conditions\\n if (targetStart < 0) {\\n throw new RangeError('targetStart out of bounds')\\n }\\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\\n\\n // Are we oob?\\n if (end > this.length) end = this.length\\n if (target.length - targetStart < end - start) {\\n end = target.length - targetStart + start\\n }\\n\\n var len = end - start\\n var i\\n\\n if (this === target && start < targetStart && targetStart < end) {\\n // descending copy from end\\n for (i = len - 1; i >= 0; --i) {\\n target[i + targetStart] = this[i + start]\\n }\\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\\n // ascending copy from start\\n for (i = 0; i < len; ++i) {\\n target[i + targetStart] = this[i + start]\\n }\\n } else {\\n Uint8Array.prototype.set.call(\\n target,\\n this.subarray(start, start + len),\\n targetStart\\n )\\n }\\n\\n return len\\n}\\n\\n// Usage:\\n// buffer.fill(number[, offset[, end]])\\n// buffer.fill(buffer[, offset[, end]])\\n// buffer.fill(string[, offset[, end]][, encoding])\\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\\n // Handle string cases:\\n if (typeof val === 'string') {\\n if (typeof start === 'string') {\\n encoding = start\\n start = 0\\n end = this.length\\n } else if (typeof end === 'string') {\\n encoding = end\\n end = this.length\\n }\\n if (val.length === 1) {\\n var code = val.charCodeAt(0)\\n if (code < 256) {\\n val = code\\n }\\n }\\n if (encoding !== undefined && typeof encoding !== 'string') {\\n throw new TypeError('encoding must be a string')\\n }\\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\\n throw new TypeError('Unknown encoding: ' + encoding)\\n }\\n } else if (typeof val === 'number') {\\n val = val & 255\\n }\\n\\n // Invalid ranges are not set to a default, so can range check early.\\n if (start < 0 || this.length < start || this.length < end) {\\n throw new RangeError('Out of range index')\\n }\\n\\n if (end <= start) {\\n return this\\n }\\n\\n start = start >>> 0\\n end = end === undefined ? this.length : end >>> 0\\n\\n if (!val) val = 0\\n\\n var i\\n if (typeof val === 'number') {\\n for (i = start; i < end; ++i) {\\n this[i] = val\\n }\\n } else {\\n var bytes = Buffer.isBuffer(val)\\n ? val\\n : utf8ToBytes(new Buffer(val, encoding).toString())\\n var len = bytes.length\\n for (i = 0; i < end - start; ++i) {\\n this[i + start] = bytes[i % len]\\n }\\n }\\n\\n return this\\n}\\n\\n// HELPER FUNCTIONS\\n// ================\\n\\nvar INVALID_BASE64_RE = /[^+\\\\/0-9A-Za-z-_]/g\\n\\nfunction base64clean (str) {\\n // Node strips out invalid characters like \\\\n and \\\\t from the string, base64-js does not\\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\\n // Node converts strings with length < 2 to ''\\n if (str.length < 2) return ''\\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\\n while (str.length % 4 !== 0) {\\n str = str + '='\\n }\\n return str\\n}\\n\\nfunction stringtrim (str) {\\n if (str.trim) return str.trim()\\n return str.replace(/^\\\\s+|\\\\s+$/g, '')\\n}\\n\\nfunction toHex (n) {\\n if (n < 16) return '0' + n.toString(16)\\n return n.toString(16)\\n}\\n\\nfunction utf8ToBytes (string, units) {\\n units = units || Infinity\\n var codePoint\\n var length = string.length\\n var leadSurrogate = null\\n var bytes = []\\n\\n for (var i = 0; i < length; ++i) {\\n codePoint = string.charCodeAt(i)\\n\\n // is surrogate component\\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\\n // last char was a lead\\n if (!leadSurrogate) {\\n // no lead yet\\n if (codePoint > 0xDBFF) {\\n // unexpected trail\\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n continue\\n } else if (i + 1 === length) {\\n // unpaired lead\\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n continue\\n }\\n\\n // valid lead\\n leadSurrogate = codePoint\\n\\n continue\\n }\\n\\n // 2 leads in a row\\n if (codePoint < 0xDC00) {\\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n leadSurrogate = codePoint\\n continue\\n }\\n\\n // valid surrogate pair\\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\\n } else if (leadSurrogate) {\\n // valid bmp char, but last char was a lead\\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n }\\n\\n leadSurrogate = null\\n\\n // encode utf8\\n if (codePoint < 0x80) {\\n if ((units -= 1) < 0) break\\n bytes.push(codePoint)\\n } else if (codePoint < 0x800) {\\n if ((units -= 2) < 0) break\\n bytes.push(\\n codePoint >> 0x6 | 0xC0,\\n codePoint & 0x3F | 0x80\\n )\\n } else if (codePoint < 0x10000) {\\n if ((units -= 3) < 0) break\\n bytes.push(\\n codePoint >> 0xC | 0xE0,\\n codePoint >> 0x6 & 0x3F | 0x80,\\n codePoint & 0x3F | 0x80\\n )\\n } else if (codePoint < 0x110000) {\\n if ((units -= 4) < 0) break\\n bytes.push(\\n codePoint >> 0x12 | 0xF0,\\n codePoint >> 0xC & 0x3F | 0x80,\\n codePoint >> 0x6 & 0x3F | 0x80,\\n codePoint & 0x3F | 0x80\\n )\\n } else {\\n throw new Error('Invalid code point')\\n }\\n }\\n\\n return bytes\\n}\\n\\nfunction asciiToBytes (str) {\\n var byteArray = []\\n for (var i = 0; i < str.length; ++i) {\\n // Node's code seems to be doing this and not & 0x7F..\\n byteArray.push(str.charCodeAt(i) & 0xFF)\\n }\\n return byteArray\\n}\\n\\nfunction utf16leToBytes (str, units) {\\n var c, hi, lo\\n var byteArray = []\\n for (var i = 0; i < str.length; ++i) {\\n if ((units -= 2) < 0) break\\n\\n c = str.charCodeAt(i)\\n hi = c >> 8\\n lo = c % 256\\n byteArray.push(lo)\\n byteArray.push(hi)\\n }\\n\\n return byteArray\\n}\\n\\nfunction base64ToBytes (str) {\\n return base64.toByteArray(base64clean(str))\\n}\\n\\nfunction blitBuffer (src, dst, offset, length) {\\n for (var i = 0; i < length; ++i) {\\n if ((i + offset >= dst.length) || (i >= src.length)) break\\n dst[i + offset] = src[i]\\n }\\n return i\\n}\\n\\nfunction isnan (val) {\\n return val !== val // eslint-disable-line no-self-compare\\n}\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \\\"./node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://Liveness/./node_modules/buffer/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/debug/src/browser.js\":\n/*!*******************************************!*\\\n !*** ./node_modules/debug/src/browser.js ***!\n \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(process) {/* eslint-env browser */\\n\\n/**\\n * This is the web browser implementation of `debug()`.\\n */\\n\\nexports.formatArgs = formatArgs;\\nexports.save = save;\\nexports.load = load;\\nexports.useColors = useColors;\\nexports.storage = localstorage();\\nexports.destroy = (() => {\\n\\tlet warned = false;\\n\\n\\treturn () => {\\n\\t\\tif (!warned) {\\n\\t\\t\\twarned = true;\\n\\t\\t\\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\\n\\t\\t}\\n\\t};\\n})();\\n\\n/**\\n * Colors.\\n */\\n\\nexports.colors = [\\n\\t'#0000CC',\\n\\t'#0000FF',\\n\\t'#0033CC',\\n\\t'#0033FF',\\n\\t'#0066CC',\\n\\t'#0066FF',\\n\\t'#0099CC',\\n\\t'#0099FF',\\n\\t'#00CC00',\\n\\t'#00CC33',\\n\\t'#00CC66',\\n\\t'#00CC99',\\n\\t'#00CCCC',\\n\\t'#00CCFF',\\n\\t'#3300CC',\\n\\t'#3300FF',\\n\\t'#3333CC',\\n\\t'#3333FF',\\n\\t'#3366CC',\\n\\t'#3366FF',\\n\\t'#3399CC',\\n\\t'#3399FF',\\n\\t'#33CC00',\\n\\t'#33CC33',\\n\\t'#33CC66',\\n\\t'#33CC99',\\n\\t'#33CCCC',\\n\\t'#33CCFF',\\n\\t'#6600CC',\\n\\t'#6600FF',\\n\\t'#6633CC',\\n\\t'#6633FF',\\n\\t'#66CC00',\\n\\t'#66CC33',\\n\\t'#9900CC',\\n\\t'#9900FF',\\n\\t'#9933CC',\\n\\t'#9933FF',\\n\\t'#99CC00',\\n\\t'#99CC33',\\n\\t'#CC0000',\\n\\t'#CC0033',\\n\\t'#CC0066',\\n\\t'#CC0099',\\n\\t'#CC00CC',\\n\\t'#CC00FF',\\n\\t'#CC3300',\\n\\t'#CC3333',\\n\\t'#CC3366',\\n\\t'#CC3399',\\n\\t'#CC33CC',\\n\\t'#CC33FF',\\n\\t'#CC6600',\\n\\t'#CC6633',\\n\\t'#CC9900',\\n\\t'#CC9933',\\n\\t'#CCCC00',\\n\\t'#CCCC33',\\n\\t'#FF0000',\\n\\t'#FF0033',\\n\\t'#FF0066',\\n\\t'#FF0099',\\n\\t'#FF00CC',\\n\\t'#FF00FF',\\n\\t'#FF3300',\\n\\t'#FF3333',\\n\\t'#FF3366',\\n\\t'#FF3399',\\n\\t'#FF33CC',\\n\\t'#FF33FF',\\n\\t'#FF6600',\\n\\t'#FF6633',\\n\\t'#FF9900',\\n\\t'#FF9933',\\n\\t'#FFCC00',\\n\\t'#FFCC33'\\n];\\n\\n/**\\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\\n * and the Firebug extension (any Firefox version) are known\\n * to support \\\"%c\\\" CSS customizations.\\n *\\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\\n */\\n\\n// eslint-disable-next-line complexity\\nfunction useColors() {\\n\\t// NB: In an Electron preload script, document will be defined but not fully\\n\\t// initialized. Since we know we're in Chrome, we'll just detect this case\\n\\t// explicitly\\n\\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\\n\\t\\treturn true;\\n\\t}\\n\\n\\t// Internet Explorer and Edge do not support colors.\\n\\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\\\/(\\\\d+)/)) {\\n\\t\\treturn false;\\n\\t}\\n\\n\\t// Is webkit? http://stackoverflow.com/a/16459606/376773\\n\\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\\n\\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\\n\\t\\t// Is firebug? http://stackoverflow.com/a/398120/376773\\n\\t\\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\\n\\t\\t// Is firefox >= v31?\\n\\t\\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\\n\\t\\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\\\/(\\\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\\n\\t\\t// Double check webkit in userAgent just in case we are in a worker\\n\\t\\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\\\/(\\\\d+)/));\\n}\\n\\n/**\\n * Colorize log arguments if enabled.\\n *\\n * @api public\\n */\\n\\nfunction formatArgs(args) {\\n\\targs[0] = (this.useColors ? '%c' : '') +\\n\\t\\tthis.namespace +\\n\\t\\t(this.useColors ? ' %c' : ' ') +\\n\\t\\targs[0] +\\n\\t\\t(this.useColors ? '%c ' : ' ') +\\n\\t\\t'+' + module.exports.humanize(this.diff);\\n\\n\\tif (!this.useColors) {\\n\\t\\treturn;\\n\\t}\\n\\n\\tconst c = 'color: ' + this.color;\\n\\targs.splice(1, 0, c, 'color: inherit');\\n\\n\\t// The final \\\"%c\\\" is somewhat tricky, because there could be other\\n\\t// arguments passed either before or after the %c, so we need to\\n\\t// figure out the correct index to insert the CSS into\\n\\tlet index = 0;\\n\\tlet lastC = 0;\\n\\targs[0].replace(/%[a-zA-Z%]/g, match => {\\n\\t\\tif (match === '%%') {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\tindex++;\\n\\t\\tif (match === '%c') {\\n\\t\\t\\t// We only are interested in the *last* %c\\n\\t\\t\\t// (the user may have provided their own)\\n\\t\\t\\tlastC = index;\\n\\t\\t}\\n\\t});\\n\\n\\targs.splice(lastC, 0, c);\\n}\\n\\n/**\\n * Invokes `console.debug()` when available.\\n * No-op when `console.debug` is not a \\\"function\\\".\\n * If `console.debug` is not available, falls back\\n * to `console.log`.\\n *\\n * @api public\\n */\\nexports.log = console.debug || console.log || (() => {});\\n\\n/**\\n * Save `namespaces`.\\n *\\n * @param {String} namespaces\\n * @api private\\n */\\nfunction save(namespaces) {\\n\\ttry {\\n\\t\\tif (namespaces) {\\n\\t\\t\\texports.storage.setItem('debug', namespaces);\\n\\t\\t} else {\\n\\t\\t\\texports.storage.removeItem('debug');\\n\\t\\t}\\n\\t} catch (error) {\\n\\t\\t// Swallow\\n\\t\\t// XXX (@Qix-) should we be logging these?\\n\\t}\\n}\\n\\n/**\\n * Load `namespaces`.\\n *\\n * @return {String} returns the previously persisted debug modes\\n * @api private\\n */\\nfunction load() {\\n\\tlet r;\\n\\ttry {\\n\\t\\tr = exports.storage.getItem('debug');\\n\\t} catch (error) {\\n\\t\\t// Swallow\\n\\t\\t// XXX (@Qix-) should we be logging these?\\n\\t}\\n\\n\\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\\n\\tif (!r && typeof process !== 'undefined' && 'env' in process) {\\n\\t\\tr = process.env.DEBUG;\\n\\t}\\n\\n\\treturn r;\\n}\\n\\n/**\\n * Localstorage attempts to return the localstorage.\\n *\\n * This is necessary because safari throws\\n * when a user disables cookies/localstorage\\n * and you attempt to access it.\\n *\\n * @return {LocalStorage}\\n * @api private\\n */\\n\\nfunction localstorage() {\\n\\ttry {\\n\\t\\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\\n\\t\\t// The Browser also has localStorage in the global context.\\n\\t\\treturn localStorage;\\n\\t} catch (error) {\\n\\t\\t// Swallow\\n\\t\\t// XXX (@Qix-) should we be logging these?\\n\\t}\\n}\\n\\nmodule.exports = __webpack_require__(/*! ./common */ \\\"./node_modules/debug/src/common.js\\\")(exports);\\n\\nconst {formatters} = module.exports;\\n\\n/**\\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\\n */\\n\\nformatters.j = function (v) {\\n\\ttry {\\n\\t\\treturn JSON.stringify(v);\\n\\t} catch (error) {\\n\\t\\treturn '[UnexpectedJSONParseError]: ' + error.message;\\n\\t}\\n};\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \\\"./node_modules/process/browser.js\\\")))\\n\\n//# sourceURL=webpack://Liveness/./node_modules/debug/src/browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/debug/src/common.js\":\n/*!******************************************!*\\\n !*** ./node_modules/debug/src/common.js ***!\n \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"\\n/**\\n * This is the common logic for both the Node.js and web browser\\n * implementations of `debug()`.\\n */\\n\\nfunction setup(env) {\\n\\tcreateDebug.debug = createDebug;\\n\\tcreateDebug.default = createDebug;\\n\\tcreateDebug.coerce = coerce;\\n\\tcreateDebug.disable = disable;\\n\\tcreateDebug.enable = enable;\\n\\tcreateDebug.enabled = enabled;\\n\\tcreateDebug.humanize = __webpack_require__(/*! ms */ \\\"./node_modules/ms/index.js\\\");\\n\\tcreateDebug.destroy = destroy;\\n\\n\\tObject.keys(env).forEach(key => {\\n\\t\\tcreateDebug[key] = env[key];\\n\\t});\\n\\n\\t/**\\n\\t* The currently active debug mode names, and names to skip.\\n\\t*/\\n\\n\\tcreateDebug.names = [];\\n\\tcreateDebug.skips = [];\\n\\n\\t/**\\n\\t* Map of special \\\"%n\\\" handling functions, for the debug \\\"format\\\" argument.\\n\\t*\\n\\t* Valid key names are a single, lower or upper-case letter, i.e. \\\"n\\\" and \\\"N\\\".\\n\\t*/\\n\\tcreateDebug.formatters = {};\\n\\n\\t/**\\n\\t* Selects a color for a debug namespace\\n\\t* @param {String} namespace The namespace string for the debug instance to be colored\\n\\t* @return {Number|String} An ANSI color code for the given namespace\\n\\t* @api private\\n\\t*/\\n\\tfunction selectColor(namespace) {\\n\\t\\tlet hash = 0;\\n\\n\\t\\tfor (let i = 0; i < namespace.length; i++) {\\n\\t\\t\\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\\n\\t\\t\\thash |= 0; // Convert to 32bit integer\\n\\t\\t}\\n\\n\\t\\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\\n\\t}\\n\\tcreateDebug.selectColor = selectColor;\\n\\n\\t/**\\n\\t* Create a debugger with the given `namespace`.\\n\\t*\\n\\t* @param {String} namespace\\n\\t* @return {Function}\\n\\t* @api public\\n\\t*/\\n\\tfunction createDebug(namespace) {\\n\\t\\tlet prevTime;\\n\\t\\tlet enableOverride = null;\\n\\t\\tlet namespacesCache;\\n\\t\\tlet enabledCache;\\n\\n\\t\\tfunction debug(...args) {\\n\\t\\t\\t// Disabled?\\n\\t\\t\\tif (!debug.enabled) {\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\n\\t\\t\\tconst self = debug;\\n\\n\\t\\t\\t// Set `diff` timestamp\\n\\t\\t\\tconst curr = Number(new Date());\\n\\t\\t\\tconst ms = curr - (prevTime || curr);\\n\\t\\t\\tself.diff = ms;\\n\\t\\t\\tself.prev = prevTime;\\n\\t\\t\\tself.curr = curr;\\n\\t\\t\\tprevTime = curr;\\n\\n\\t\\t\\targs[0] = createDebug.coerce(args[0]);\\n\\n\\t\\t\\tif (typeof args[0] !== 'string') {\\n\\t\\t\\t\\t// Anything else let's inspect with %O\\n\\t\\t\\t\\targs.unshift('%O');\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Apply any `formatters` transformations\\n\\t\\t\\tlet index = 0;\\n\\t\\t\\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\\n\\t\\t\\t\\t// If we encounter an escaped % then don't increase the array index\\n\\t\\t\\t\\tif (match === '%%') {\\n\\t\\t\\t\\t\\treturn '%';\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tindex++;\\n\\t\\t\\t\\tconst formatter = createDebug.formatters[format];\\n\\t\\t\\t\\tif (typeof formatter === 'function') {\\n\\t\\t\\t\\t\\tconst val = args[index];\\n\\t\\t\\t\\t\\tmatch = formatter.call(self, val);\\n\\n\\t\\t\\t\\t\\t// Now we need to remove `args[index]` since it's inlined in the `format`\\n\\t\\t\\t\\t\\targs.splice(index, 1);\\n\\t\\t\\t\\t\\tindex--;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn match;\\n\\t\\t\\t});\\n\\n\\t\\t\\t// Apply env-specific formatting (colors, etc.)\\n\\t\\t\\tcreateDebug.formatArgs.call(self, args);\\n\\n\\t\\t\\tconst logFn = self.log || createDebug.log;\\n\\t\\t\\tlogFn.apply(self, args);\\n\\t\\t}\\n\\n\\t\\tdebug.namespace = namespace;\\n\\t\\tdebug.useColors = createDebug.useColors();\\n\\t\\tdebug.color = createDebug.selectColor(namespace);\\n\\t\\tdebug.extend = extend;\\n\\t\\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\\n\\n\\t\\tObject.defineProperty(debug, 'enabled', {\\n\\t\\t\\tenumerable: true,\\n\\t\\t\\tconfigurable: false,\\n\\t\\t\\tget: () => {\\n\\t\\t\\t\\tif (enableOverride !== null) {\\n\\t\\t\\t\\t\\treturn enableOverride;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif (namespacesCache !== createDebug.namespaces) {\\n\\t\\t\\t\\t\\tnamespacesCache = createDebug.namespaces;\\n\\t\\t\\t\\t\\tenabledCache = createDebug.enabled(namespace);\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\treturn enabledCache;\\n\\t\\t\\t},\\n\\t\\t\\tset: v => {\\n\\t\\t\\t\\tenableOverride = v;\\n\\t\\t\\t}\\n\\t\\t});\\n\\n\\t\\t// Env-specific initialization logic for debug instances\\n\\t\\tif (typeof createDebug.init === 'function') {\\n\\t\\t\\tcreateDebug.init(debug);\\n\\t\\t}\\n\\n\\t\\treturn debug;\\n\\t}\\n\\n\\tfunction extend(namespace, delimiter) {\\n\\t\\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\\n\\t\\tnewDebug.log = this.log;\\n\\t\\treturn newDebug;\\n\\t}\\n\\n\\t/**\\n\\t* Enables a debug mode by namespaces. This can include modes\\n\\t* separated by a colon and wildcards.\\n\\t*\\n\\t* @param {String} namespaces\\n\\t* @api public\\n\\t*/\\n\\tfunction enable(namespaces) {\\n\\t\\tcreateDebug.save(namespaces);\\n\\t\\tcreateDebug.namespaces = namespaces;\\n\\n\\t\\tcreateDebug.names = [];\\n\\t\\tcreateDebug.skips = [];\\n\\n\\t\\tlet i;\\n\\t\\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\\\s,]+/);\\n\\t\\tconst len = split.length;\\n\\n\\t\\tfor (i = 0; i < len; i++) {\\n\\t\\t\\tif (!split[i]) {\\n\\t\\t\\t\\t// ignore empty strings\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t}\\n\\n\\t\\t\\tnamespaces = split[i].replace(/\\\\*/g, '.*?');\\n\\n\\t\\t\\tif (namespaces[0] === '-') {\\n\\t\\t\\t\\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t/**\\n\\t* Disable debug output.\\n\\t*\\n\\t* @return {String} namespaces\\n\\t* @api public\\n\\t*/\\n\\tfunction disable() {\\n\\t\\tconst namespaces = [\\n\\t\\t\\t...createDebug.names.map(toNamespace),\\n\\t\\t\\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\\n\\t\\t].join(',');\\n\\t\\tcreateDebug.enable('');\\n\\t\\treturn namespaces;\\n\\t}\\n\\n\\t/**\\n\\t* Returns true if the given mode name is enabled, false otherwise.\\n\\t*\\n\\t* @param {String} name\\n\\t* @return {Boolean}\\n\\t* @api public\\n\\t*/\\n\\tfunction enabled(name) {\\n\\t\\tif (name[name.length - 1] === '*') {\\n\\t\\t\\treturn true;\\n\\t\\t}\\n\\n\\t\\tlet i;\\n\\t\\tlet len;\\n\\n\\t\\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\\n\\t\\t\\tif (createDebug.skips[i].test(name)) {\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\\n\\t\\t\\tif (createDebug.names[i].test(name)) {\\n\\t\\t\\t\\treturn true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn false;\\n\\t}\\n\\n\\t/**\\n\\t* Convert regexp to namespace\\n\\t*\\n\\t* @param {RegExp} regxep\\n\\t* @return {String} namespace\\n\\t* @api private\\n\\t*/\\n\\tfunction toNamespace(regexp) {\\n\\t\\treturn regexp.toString()\\n\\t\\t\\t.substring(2, regexp.toString().length - 2)\\n\\t\\t\\t.replace(/\\\\.\\\\*\\\\?$/, '*');\\n\\t}\\n\\n\\t/**\\n\\t* Coerce `val`.\\n\\t*\\n\\t* @param {Mixed} val\\n\\t* @return {Mixed}\\n\\t* @api private\\n\\t*/\\n\\tfunction coerce(val) {\\n\\t\\tif (val instanceof Error) {\\n\\t\\t\\treturn val.stack || val.message;\\n\\t\\t}\\n\\t\\treturn val;\\n\\t}\\n\\n\\t/**\\n\\t* XXX DO NOT USE. This is a temporary stub function.\\n\\t* XXX It WILL be removed in the next major release.\\n\\t*/\\n\\tfunction destroy() {\\n\\t\\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\\n\\t}\\n\\n\\tcreateDebug.enable(createDebug.load());\\n\\n\\treturn createDebug;\\n}\\n\\nmodule.exports = setup;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/debug/src/common.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/globalThis.browser.js\":\n/*!***********************************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/globalThis.browser.js ***!\n \\***********************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = ((() => {\\n if (typeof self !== \\\"undefined\\\") {\\n return self;\\n }\\n else if (typeof window !== \\\"undefined\\\") {\\n return window;\\n }\\n else {\\n return Function(\\\"return this\\\")();\\n }\\n})());\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/globalThis.browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/index.js\":\n/*!**********************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/index.js ***!\n \\**********************************************************/\n/*! exports provided: Socket, protocol, Transport, transports, installTimerFunctions */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"protocol\\\", function() { return protocol; });\\n/* harmony import */ var _socket_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./socket.js */ \\\"./node_modules/engine.io-client/build/esm/socket.js\\\");\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\"Socket\\\", function() { return _socket_js__WEBPACK_IMPORTED_MODULE_0__[\\\"Socket\\\"]; });\\n\\n/* harmony import */ var _transport_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transport.js */ \\\"./node_modules/engine.io-client/build/esm/transport.js\\\");\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\"Transport\\\", function() { return _transport_js__WEBPACK_IMPORTED_MODULE_1__[\\\"Transport\\\"]; });\\n\\n/* harmony import */ var _transports_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transports/index.js */ \\\"./node_modules/engine.io-client/build/esm/transports/index.js\\\");\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\"transports\\\", function() { return _transports_index_js__WEBPACK_IMPORTED_MODULE_2__[\\\"transports\\\"]; });\\n\\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util.js */ \\\"./node_modules/engine.io-client/build/esm/util.js\\\");\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\"installTimerFunctions\\\", function() { return _util_js__WEBPACK_IMPORTED_MODULE_3__[\\\"installTimerFunctions\\\"]; });\\n\\n\\n\\nconst protocol = _socket_js__WEBPACK_IMPORTED_MODULE_0__[\\\"Socket\\\"].protocol;\\n\\n\\n\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/socket.js\":\n/*!***********************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/socket.js ***!\n \\***********************************************************/\n/*! exports provided: Socket */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Socket\\\", function() { return Socket; });\\n/* harmony import */ var _transports_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transports/index.js */ \\\"./node_modules/engine.io-client/build/esm/transports/index.js\\\");\\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util.js */ \\\"./node_modules/engine.io-client/build/esm/util.js\\\");\\n/* harmony import */ var parseqs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! parseqs */ \\\"./node_modules/parseqs/index.js\\\");\\n/* harmony import */ var parseqs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(parseqs__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var parseuri__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! parseuri */ \\\"./node_modules/parseuri/index.js\\\");\\n/* harmony import */ var parseuri__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(parseuri__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @socket.io/component-emitter */ \\\"./node_modules/@socket.io/component-emitter/index.js\\\");\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! engine.io-parser */ \\\"./node_modules/engine.io-parser/build/esm/index.js\\\");\\n\\n\\n\\n\\n\\n\\nclass Socket extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_4__[\\\"Emitter\\\"] {\\n /**\\n * Socket constructor.\\n *\\n * @param {String|Object} uri or options\\n * @param {Object} opts - options\\n * @api public\\n */\\n constructor(uri, opts = {}) {\\n super();\\n if (uri && \\\"object\\\" === typeof uri) {\\n opts = uri;\\n uri = null;\\n }\\n if (uri) {\\n uri = parseuri__WEBPACK_IMPORTED_MODULE_3___default()(uri);\\n opts.hostname = uri.host;\\n opts.secure = uri.protocol === \\\"https\\\" || uri.protocol === \\\"wss\\\";\\n opts.port = uri.port;\\n if (uri.query)\\n opts.query = uri.query;\\n }\\n else if (opts.host) {\\n opts.hostname = parseuri__WEBPACK_IMPORTED_MODULE_3___default()(opts.host).host;\\n }\\n Object(_util_js__WEBPACK_IMPORTED_MODULE_1__[\\\"installTimerFunctions\\\"])(this, opts);\\n this.secure =\\n null != opts.secure\\n ? opts.secure\\n : typeof location !== \\\"undefined\\\" && \\\"https:\\\" === location.protocol;\\n if (opts.hostname && !opts.port) {\\n // if no port is specified manually, use the protocol default\\n opts.port = this.secure ? \\\"443\\\" : \\\"80\\\";\\n }\\n this.hostname =\\n opts.hostname ||\\n (typeof location !== \\\"undefined\\\" ? location.hostname : \\\"localhost\\\");\\n this.port =\\n opts.port ||\\n (typeof location !== \\\"undefined\\\" && location.port\\n ? location.port\\n : this.secure\\n ? \\\"443\\\"\\n : \\\"80\\\");\\n this.transports = opts.transports || [\\\"polling\\\", \\\"websocket\\\"];\\n this.readyState = \\\"\\\";\\n this.writeBuffer = [];\\n this.prevBufferLen = 0;\\n this.opts = Object.assign({\\n path: \\\"/engine.io\\\",\\n agent: false,\\n withCredentials: false,\\n upgrade: true,\\n timestampParam: \\\"t\\\",\\n rememberUpgrade: false,\\n rejectUnauthorized: true,\\n perMessageDeflate: {\\n threshold: 1024\\n },\\n transportOptions: {},\\n closeOnBeforeunload: true\\n }, opts);\\n this.opts.path = this.opts.path.replace(/\\\\/$/, \\\"\\\") + \\\"/\\\";\\n if (typeof this.opts.query === \\\"string\\\") {\\n this.opts.query = parseqs__WEBPACK_IMPORTED_MODULE_2___default.a.decode(this.opts.query);\\n }\\n // set on handshake\\n this.id = null;\\n this.upgrades = null;\\n this.pingInterval = null;\\n this.pingTimeout = null;\\n // set on heartbeat\\n this.pingTimeoutTimer = null;\\n if (typeof addEventListener === \\\"function\\\") {\\n if (this.opts.closeOnBeforeunload) {\\n // Firefox closes the connection when the \\\"beforeunload\\\" event is emitted but not Chrome. This event listener\\n // ensures every browser behaves the same (no \\\"disconnect\\\" event at the Socket.IO level when the page is\\n // closed/reloaded)\\n addEventListener(\\\"beforeunload\\\", () => {\\n if (this.transport) {\\n // silently close the transport\\n this.transport.removeAllListeners();\\n this.transport.close();\\n }\\n }, false);\\n }\\n if (this.hostname !== \\\"localhost\\\") {\\n this.offlineEventListener = () => {\\n this.onClose(\\\"transport close\\\");\\n };\\n addEventListener(\\\"offline\\\", this.offlineEventListener, false);\\n }\\n }\\n this.open();\\n }\\n /**\\n * Creates transport of the given type.\\n *\\n * @param {String} transport name\\n * @return {Transport}\\n * @api private\\n */\\n createTransport(name) {\\n const query = clone(this.opts.query);\\n // append engine.io protocol identifier\\n query.EIO = engine_io_parser__WEBPACK_IMPORTED_MODULE_5__[\\\"protocol\\\"];\\n // transport name\\n query.transport = name;\\n // session id if we already have one\\n if (this.id)\\n query.sid = this.id;\\n const opts = Object.assign({}, this.opts.transportOptions[name], this.opts, {\\n query,\\n socket: this,\\n hostname: this.hostname,\\n secure: this.secure,\\n port: this.port\\n });\\n return new _transports_index_js__WEBPACK_IMPORTED_MODULE_0__[\\\"transports\\\"][name](opts);\\n }\\n /**\\n * Initializes transport to use and starts probe.\\n *\\n * @api private\\n */\\n open() {\\n let transport;\\n if (this.opts.rememberUpgrade &&\\n Socket.priorWebsocketSuccess &&\\n this.transports.indexOf(\\\"websocket\\\") !== -1) {\\n transport = \\\"websocket\\\";\\n }\\n else if (0 === this.transports.length) {\\n // Emit error on next tick so it can be listened to\\n this.setTimeoutFn(() => {\\n this.emitReserved(\\\"error\\\", \\\"No transports available\\\");\\n }, 0);\\n return;\\n }\\n else {\\n transport = this.transports[0];\\n }\\n this.readyState = \\\"opening\\\";\\n // Retry with the next transport if the transport is disabled (jsonp: false)\\n try {\\n transport = this.createTransport(transport);\\n }\\n catch (e) {\\n this.transports.shift();\\n this.open();\\n return;\\n }\\n transport.open();\\n this.setTransport(transport);\\n }\\n /**\\n * Sets the current transport. Disables the existing one (if any).\\n *\\n * @api private\\n */\\n setTransport(transport) {\\n if (this.transport) {\\n this.transport.removeAllListeners();\\n }\\n // set up transport\\n this.transport = transport;\\n // set up transport listeners\\n transport\\n .on(\\\"drain\\\", this.onDrain.bind(this))\\n .on(\\\"packet\\\", this.onPacket.bind(this))\\n .on(\\\"error\\\", this.onError.bind(this))\\n .on(\\\"close\\\", () => {\\n this.onClose(\\\"transport close\\\");\\n });\\n }\\n /**\\n * Probes a transport.\\n *\\n * @param {String} transport name\\n * @api private\\n */\\n probe(name) {\\n let transport = this.createTransport(name);\\n let failed = false;\\n Socket.priorWebsocketSuccess = false;\\n const onTransportOpen = () => {\\n if (failed)\\n return;\\n transport.send([{ type: \\\"ping\\\", data: \\\"probe\\\" }]);\\n transport.once(\\\"packet\\\", msg => {\\n if (failed)\\n return;\\n if (\\\"pong\\\" === msg.type && \\\"probe\\\" === msg.data) {\\n this.upgrading = true;\\n this.emitReserved(\\\"upgrading\\\", transport);\\n if (!transport)\\n return;\\n Socket.priorWebsocketSuccess = \\\"websocket\\\" === transport.name;\\n this.transport.pause(() => {\\n if (failed)\\n return;\\n if (\\\"closed\\\" === this.readyState)\\n return;\\n cleanup();\\n this.setTransport(transport);\\n transport.send([{ type: \\\"upgrade\\\" }]);\\n this.emitReserved(\\\"upgrade\\\", transport);\\n transport = null;\\n this.upgrading = false;\\n this.flush();\\n });\\n }\\n else {\\n const err = new Error(\\\"probe error\\\");\\n // @ts-ignore\\n err.transport = transport.name;\\n this.emitReserved(\\\"upgradeError\\\", err);\\n }\\n });\\n };\\n function freezeTransport() {\\n if (failed)\\n return;\\n // Any callback called by transport should be ignored since now\\n failed = true;\\n cleanup();\\n transport.close();\\n transport = null;\\n }\\n // Handle any error that happens while probing\\n const onerror = err => {\\n const error = new Error(\\\"probe error: \\\" + err);\\n // @ts-ignore\\n error.transport = transport.name;\\n freezeTransport();\\n this.emitReserved(\\\"upgradeError\\\", error);\\n };\\n function onTransportClose() {\\n onerror(\\\"transport closed\\\");\\n }\\n // When the socket is closed while we're probing\\n function onclose() {\\n onerror(\\\"socket closed\\\");\\n }\\n // When the socket is upgraded while we're probing\\n function onupgrade(to) {\\n if (transport && to.name !== transport.name) {\\n freezeTransport();\\n }\\n }\\n // Remove all listeners on the transport and on self\\n const cleanup = () => {\\n transport.removeListener(\\\"open\\\", onTransportOpen);\\n transport.removeListener(\\\"error\\\", onerror);\\n transport.removeListener(\\\"close\\\", onTransportClose);\\n this.off(\\\"close\\\", onclose);\\n this.off(\\\"upgrading\\\", onupgrade);\\n };\\n transport.once(\\\"open\\\", onTransportOpen);\\n transport.once(\\\"error\\\", onerror);\\n transport.once(\\\"close\\\", onTransportClose);\\n this.once(\\\"close\\\", onclose);\\n this.once(\\\"upgrading\\\", onupgrade);\\n transport.open();\\n }\\n /**\\n * Called when connection is deemed open.\\n *\\n * @api private\\n */\\n onOpen() {\\n this.readyState = \\\"open\\\";\\n Socket.priorWebsocketSuccess = \\\"websocket\\\" === this.transport.name;\\n this.emitReserved(\\\"open\\\");\\n this.flush();\\n // we check for `readyState` in case an `open`\\n // listener already closed the socket\\n if (\\\"open\\\" === this.readyState &&\\n this.opts.upgrade &&\\n this.transport.pause) {\\n let i = 0;\\n const l = this.upgrades.length;\\n for (; i < l; i++) {\\n this.probe(this.upgrades[i]);\\n }\\n }\\n }\\n /**\\n * Handles a packet.\\n *\\n * @api private\\n */\\n onPacket(packet) {\\n if (\\\"opening\\\" === this.readyState ||\\n \\\"open\\\" === this.readyState ||\\n \\\"closing\\\" === this.readyState) {\\n this.emitReserved(\\\"packet\\\", packet);\\n // Socket is live - any packet counts\\n this.emitReserved(\\\"heartbeat\\\");\\n switch (packet.type) {\\n case \\\"open\\\":\\n this.onHandshake(JSON.parse(packet.data));\\n break;\\n case \\\"ping\\\":\\n this.resetPingTimeout();\\n this.sendPacket(\\\"pong\\\");\\n this.emitReserved(\\\"ping\\\");\\n this.emitReserved(\\\"pong\\\");\\n break;\\n case \\\"error\\\":\\n const err = new Error(\\\"server error\\\");\\n // @ts-ignore\\n err.code = packet.data;\\n this.onError(err);\\n break;\\n case \\\"message\\\":\\n this.emitReserved(\\\"data\\\", packet.data);\\n this.emitReserved(\\\"message\\\", packet.data);\\n break;\\n }\\n }\\n else {\\n }\\n }\\n /**\\n * Called upon handshake completion.\\n *\\n * @param {Object} data - handshake obj\\n * @api private\\n */\\n onHandshake(data) {\\n this.emitReserved(\\\"handshake\\\", data);\\n this.id = data.sid;\\n this.transport.query.sid = data.sid;\\n this.upgrades = this.filterUpgrades(data.upgrades);\\n this.pingInterval = data.pingInterval;\\n this.pingTimeout = data.pingTimeout;\\n this.onOpen();\\n // In case open handler closes socket\\n if (\\\"closed\\\" === this.readyState)\\n return;\\n this.resetPingTimeout();\\n }\\n /**\\n * Sets and resets ping timeout timer based on server pings.\\n *\\n * @api private\\n */\\n resetPingTimeout() {\\n this.clearTimeoutFn(this.pingTimeoutTimer);\\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\\n this.onClose(\\\"ping timeout\\\");\\n }, this.pingInterval + this.pingTimeout);\\n if (this.opts.autoUnref) {\\n this.pingTimeoutTimer.unref();\\n }\\n }\\n /**\\n * Called on `drain` event\\n *\\n * @api private\\n */\\n onDrain() {\\n this.writeBuffer.splice(0, this.prevBufferLen);\\n // setting prevBufferLen = 0 is very important\\n // for example, when upgrading, upgrade packet is sent over,\\n // and a nonzero prevBufferLen could cause problems on `drain`\\n this.prevBufferLen = 0;\\n if (0 === this.writeBuffer.length) {\\n this.emitReserved(\\\"drain\\\");\\n }\\n else {\\n this.flush();\\n }\\n }\\n /**\\n * Flush write buffers.\\n *\\n * @api private\\n */\\n flush() {\\n if (\\\"closed\\\" !== this.readyState &&\\n this.transport.writable &&\\n !this.upgrading &&\\n this.writeBuffer.length) {\\n this.transport.send(this.writeBuffer);\\n // keep track of current length of writeBuffer\\n // splice writeBuffer and callbackBuffer on `drain`\\n this.prevBufferLen = this.writeBuffer.length;\\n this.emitReserved(\\\"flush\\\");\\n }\\n }\\n /**\\n * Sends a message.\\n *\\n * @param {String} message.\\n * @param {Function} callback function.\\n * @param {Object} options.\\n * @return {Socket} for chaining.\\n * @api public\\n */\\n write(msg, options, fn) {\\n this.sendPacket(\\\"message\\\", msg, options, fn);\\n return this;\\n }\\n send(msg, options, fn) {\\n this.sendPacket(\\\"message\\\", msg, options, fn);\\n return this;\\n }\\n /**\\n * Sends a packet.\\n *\\n * @param {String} packet type.\\n * @param {String} data.\\n * @param {Object} options.\\n * @param {Function} callback function.\\n * @api private\\n */\\n sendPacket(type, data, options, fn) {\\n if (\\\"function\\\" === typeof data) {\\n fn = data;\\n data = undefined;\\n }\\n if (\\\"function\\\" === typeof options) {\\n fn = options;\\n options = null;\\n }\\n if (\\\"closing\\\" === this.readyState || \\\"closed\\\" === this.readyState) {\\n return;\\n }\\n options = options || {};\\n options.compress = false !== options.compress;\\n const packet = {\\n type: type,\\n data: data,\\n options: options\\n };\\n this.emitReserved(\\\"packetCreate\\\", packet);\\n this.writeBuffer.push(packet);\\n if (fn)\\n this.once(\\\"flush\\\", fn);\\n this.flush();\\n }\\n /**\\n * Closes the connection.\\n *\\n * @api public\\n */\\n close() {\\n const close = () => {\\n this.onClose(\\\"forced close\\\");\\n this.transport.close();\\n };\\n const cleanupAndClose = () => {\\n this.off(\\\"upgrade\\\", cleanupAndClose);\\n this.off(\\\"upgradeError\\\", cleanupAndClose);\\n close();\\n };\\n const waitForUpgrade = () => {\\n // wait for upgrade to finish since we can't send packets while pausing a transport\\n this.once(\\\"upgrade\\\", cleanupAndClose);\\n this.once(\\\"upgradeError\\\", cleanupAndClose);\\n };\\n if (\\\"opening\\\" === this.readyState || \\\"open\\\" === this.readyState) {\\n this.readyState = \\\"closing\\\";\\n if (this.writeBuffer.length) {\\n this.once(\\\"drain\\\", () => {\\n if (this.upgrading) {\\n waitForUpgrade();\\n }\\n else {\\n close();\\n }\\n });\\n }\\n else if (this.upgrading) {\\n waitForUpgrade();\\n }\\n else {\\n close();\\n }\\n }\\n return this;\\n }\\n /**\\n * Called upon transport error\\n *\\n * @api private\\n */\\n onError(err) {\\n Socket.priorWebsocketSuccess = false;\\n this.emitReserved(\\\"error\\\", err);\\n this.onClose(\\\"transport error\\\", err);\\n }\\n /**\\n * Called upon transport close.\\n *\\n * @api private\\n */\\n onClose(reason, desc) {\\n if (\\\"opening\\\" === this.readyState ||\\n \\\"open\\\" === this.readyState ||\\n \\\"closing\\\" === this.readyState) {\\n // clear timers\\n this.clearTimeoutFn(this.pingTimeoutTimer);\\n // stop event from firing again for transport\\n this.transport.removeAllListeners(\\\"close\\\");\\n // ensure transport won't stay open\\n this.transport.close();\\n // ignore further transport communication\\n this.transport.removeAllListeners();\\n if (typeof removeEventListener === \\\"function\\\") {\\n removeEventListener(\\\"offline\\\", this.offlineEventListener, false);\\n }\\n // set ready state\\n this.readyState = \\\"closed\\\";\\n // clear session id\\n this.id = null;\\n // emit close event\\n this.emitReserved(\\\"close\\\", reason, desc);\\n // clean buffers after, so users can still\\n // grab the buffers on `close` event\\n this.writeBuffer = [];\\n this.prevBufferLen = 0;\\n }\\n }\\n /**\\n * Filters upgrades, returning only those matching client transports.\\n *\\n * @param {Array} server upgrades\\n * @api private\\n *\\n */\\n filterUpgrades(upgrades) {\\n const filteredUpgrades = [];\\n let i = 0;\\n const j = upgrades.length;\\n for (; i < j; i++) {\\n if (~this.transports.indexOf(upgrades[i]))\\n filteredUpgrades.push(upgrades[i]);\\n }\\n return filteredUpgrades;\\n }\\n}\\nSocket.protocol = engine_io_parser__WEBPACK_IMPORTED_MODULE_5__[\\\"protocol\\\"];\\nfunction clone(obj) {\\n const o = {};\\n for (let i in obj) {\\n if (obj.hasOwnProperty(i)) {\\n o[i] = obj[i];\\n }\\n }\\n return o;\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/socket.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/transport.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/transport.js ***!\n \\**************************************************************/\n/*! exports provided: Transport */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Transport\\\", function() { return Transport; });\\n/* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! engine.io-parser */ \\\"./node_modules/engine.io-parser/build/esm/index.js\\\");\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @socket.io/component-emitter */ \\\"./node_modules/@socket.io/component-emitter/index.js\\\");\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util.js */ \\\"./node_modules/engine.io-client/build/esm/util.js\\\");\\n\\n\\n\\nclass Transport extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_1__[\\\"Emitter\\\"] {\\n /**\\n * Transport abstract constructor.\\n *\\n * @param {Object} options.\\n * @api private\\n */\\n constructor(opts) {\\n super();\\n this.writable = false;\\n Object(_util_js__WEBPACK_IMPORTED_MODULE_2__[\\\"installTimerFunctions\\\"])(this, opts);\\n this.opts = opts;\\n this.query = opts.query;\\n this.readyState = \\\"\\\";\\n this.socket = opts.socket;\\n }\\n /**\\n * Emits an error.\\n *\\n * @param {String} str\\n * @return {Transport} for chaining\\n * @api protected\\n */\\n onError(msg, desc) {\\n const err = new Error(msg);\\n // @ts-ignore\\n err.type = \\\"TransportError\\\";\\n // @ts-ignore\\n err.description = desc;\\n super.emit(\\\"error\\\", err);\\n return this;\\n }\\n /**\\n * Opens the transport.\\n *\\n * @api public\\n */\\n open() {\\n if (\\\"closed\\\" === this.readyState || \\\"\\\" === this.readyState) {\\n this.readyState = \\\"opening\\\";\\n this.doOpen();\\n }\\n return this;\\n }\\n /**\\n * Closes the transport.\\n *\\n * @api public\\n */\\n close() {\\n if (\\\"opening\\\" === this.readyState || \\\"open\\\" === this.readyState) {\\n this.doClose();\\n this.onClose();\\n }\\n return this;\\n }\\n /**\\n * Sends multiple packets.\\n *\\n * @param {Array} packets\\n * @api public\\n */\\n send(packets) {\\n if (\\\"open\\\" === this.readyState) {\\n this.write(packets);\\n }\\n else {\\n // this might happen if the transport was silently closed in the beforeunload event handler\\n }\\n }\\n /**\\n * Called upon open\\n *\\n * @api protected\\n */\\n onOpen() {\\n this.readyState = \\\"open\\\";\\n this.writable = true;\\n super.emit(\\\"open\\\");\\n }\\n /**\\n * Called with data.\\n *\\n * @param {String} data\\n * @api protected\\n */\\n onData(data) {\\n const packet = Object(engine_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"decodePacket\\\"])(data, this.socket.binaryType);\\n this.onPacket(packet);\\n }\\n /**\\n * Called with a decoded packet.\\n *\\n * @api protected\\n */\\n onPacket(packet) {\\n super.emit(\\\"packet\\\", packet);\\n }\\n /**\\n * Called upon close.\\n *\\n * @api protected\\n */\\n onClose() {\\n this.readyState = \\\"closed\\\";\\n super.emit(\\\"close\\\");\\n }\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/transport.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/transports/index.js\":\n/*!*********************************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/transports/index.js ***!\n \\*********************************************************************/\n/*! exports provided: transports */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"transports\\\", function() { return transports; });\\n/* harmony import */ var _polling_xhr_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polling-xhr.js */ \\\"./node_modules/engine.io-client/build/esm/transports/polling-xhr.js\\\");\\n/* harmony import */ var _websocket_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./websocket.js */ \\\"./node_modules/engine.io-client/build/esm/transports/websocket.js\\\");\\n\\n\\nconst transports = {\\n websocket: _websocket_js__WEBPACK_IMPORTED_MODULE_1__[\\\"WS\\\"],\\n polling: _polling_xhr_js__WEBPACK_IMPORTED_MODULE_0__[\\\"XHR\\\"]\\n};\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/transports/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/transports/polling-xhr.js\":\n/*!***************************************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/transports/polling-xhr.js ***!\n \\***************************************************************************/\n/*! exports provided: XHR, Request */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"XHR\\\", function() { return XHR; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Request\\\", function() { return Request; });\\n/* harmony import */ var _xmlhttprequest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./xmlhttprequest.js */ \\\"./node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js\\\");\\n/* harmony import */ var _globalThis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../globalThis.js */ \\\"./node_modules/engine.io-client/build/esm/globalThis.browser.js\\\");\\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util.js */ \\\"./node_modules/engine.io-client/build/esm/util.js\\\");\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @socket.io/component-emitter */ \\\"./node_modules/@socket.io/component-emitter/index.js\\\");\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _polling_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./polling.js */ \\\"./node_modules/engine.io-client/build/esm/transports/polling.js\\\");\\n/* global attachEvent */\\n\\n\\n\\n\\n\\n/**\\n * Empty function\\n */\\nfunction empty() { }\\nconst hasXHR2 = (function () {\\n const xhr = new _xmlhttprequest_js__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"]({\\n xdomain: false\\n });\\n return null != xhr.responseType;\\n})();\\nclass XHR extends _polling_js__WEBPACK_IMPORTED_MODULE_4__[\\\"Polling\\\"] {\\n /**\\n * XHR Polling constructor.\\n *\\n * @param {Object} opts\\n * @api public\\n */\\n constructor(opts) {\\n super(opts);\\n if (typeof location !== \\\"undefined\\\") {\\n const isSSL = \\\"https:\\\" === location.protocol;\\n let port = location.port;\\n // some user agents have empty `location.port`\\n if (!port) {\\n port = isSSL ? \\\"443\\\" : \\\"80\\\";\\n }\\n this.xd =\\n (typeof location !== \\\"undefined\\\" &&\\n opts.hostname !== location.hostname) ||\\n port !== opts.port;\\n this.xs = opts.secure !== isSSL;\\n }\\n /**\\n * XHR supports binary\\n */\\n const forceBase64 = opts && opts.forceBase64;\\n this.supportsBinary = hasXHR2 && !forceBase64;\\n }\\n /**\\n * Creates a request.\\n *\\n * @param {String} method\\n * @api private\\n */\\n request(opts = {}) {\\n Object.assign(opts, { xd: this.xd, xs: this.xs }, this.opts);\\n return new Request(this.uri(), opts);\\n }\\n /**\\n * Sends data.\\n *\\n * @param {String} data to send.\\n * @param {Function} called upon flush.\\n * @api private\\n */\\n doWrite(data, fn) {\\n const req = this.request({\\n method: \\\"POST\\\",\\n data: data\\n });\\n req.on(\\\"success\\\", fn);\\n req.on(\\\"error\\\", err => {\\n this.onError(\\\"xhr post error\\\", err);\\n });\\n }\\n /**\\n * Starts a poll cycle.\\n *\\n * @api private\\n */\\n doPoll() {\\n const req = this.request();\\n req.on(\\\"data\\\", this.onData.bind(this));\\n req.on(\\\"error\\\", err => {\\n this.onError(\\\"xhr poll error\\\", err);\\n });\\n this.pollXhr = req;\\n }\\n}\\nclass Request extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_3__[\\\"Emitter\\\"] {\\n /**\\n * Request constructor\\n *\\n * @param {Object} options\\n * @api public\\n */\\n constructor(uri, opts) {\\n super();\\n Object(_util_js__WEBPACK_IMPORTED_MODULE_2__[\\\"installTimerFunctions\\\"])(this, opts);\\n this.opts = opts;\\n this.method = opts.method || \\\"GET\\\";\\n this.uri = uri;\\n this.async = false !== opts.async;\\n this.data = undefined !== opts.data ? opts.data : null;\\n this.create();\\n }\\n /**\\n * Creates the XHR object and sends the request.\\n *\\n * @api private\\n */\\n create() {\\n const opts = Object(_util_js__WEBPACK_IMPORTED_MODULE_2__[\\\"pick\\\"])(this.opts, \\\"agent\\\", \\\"pfx\\\", \\\"key\\\", \\\"passphrase\\\", \\\"cert\\\", \\\"ca\\\", \\\"ciphers\\\", \\\"rejectUnauthorized\\\", \\\"autoUnref\\\");\\n opts.xdomain = !!this.opts.xd;\\n opts.xscheme = !!this.opts.xs;\\n const xhr = (this.xhr = new _xmlhttprequest_js__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"](opts));\\n try {\\n xhr.open(this.method, this.uri, this.async);\\n try {\\n if (this.opts.extraHeaders) {\\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\\n for (let i in this.opts.extraHeaders) {\\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\\n }\\n }\\n }\\n }\\n catch (e) { }\\n if (\\\"POST\\\" === this.method) {\\n try {\\n xhr.setRequestHeader(\\\"Content-type\\\", \\\"text/plain;charset=UTF-8\\\");\\n }\\n catch (e) { }\\n }\\n try {\\n xhr.setRequestHeader(\\\"Accept\\\", \\\"*/*\\\");\\n }\\n catch (e) { }\\n // ie6 check\\n if (\\\"withCredentials\\\" in xhr) {\\n xhr.withCredentials = this.opts.withCredentials;\\n }\\n if (this.opts.requestTimeout) {\\n xhr.timeout = this.opts.requestTimeout;\\n }\\n xhr.onreadystatechange = () => {\\n if (4 !== xhr.readyState)\\n return;\\n if (200 === xhr.status || 1223 === xhr.status) {\\n this.onLoad();\\n }\\n else {\\n // make sure the `error` event handler that's user-set\\n // does not throw in the same tick and gets caught here\\n this.setTimeoutFn(() => {\\n this.onError(typeof xhr.status === \\\"number\\\" ? xhr.status : 0);\\n }, 0);\\n }\\n };\\n xhr.send(this.data);\\n }\\n catch (e) {\\n // Need to defer since .create() is called directly from the constructor\\n // and thus the 'error' event can only be only bound *after* this exception\\n // occurs. Therefore, also, we cannot throw here at all.\\n this.setTimeoutFn(() => {\\n this.onError(e);\\n }, 0);\\n return;\\n }\\n if (typeof document !== \\\"undefined\\\") {\\n this.index = Request.requestsCount++;\\n Request.requests[this.index] = this;\\n }\\n }\\n /**\\n * Called upon successful response.\\n *\\n * @api private\\n */\\n onSuccess() {\\n this.emit(\\\"success\\\");\\n this.cleanup();\\n }\\n /**\\n * Called if we have data.\\n *\\n * @api private\\n */\\n onData(data) {\\n this.emit(\\\"data\\\", data);\\n this.onSuccess();\\n }\\n /**\\n * Called upon error.\\n *\\n * @api private\\n */\\n onError(err) {\\n this.emit(\\\"error\\\", err);\\n this.cleanup(true);\\n }\\n /**\\n * Cleans up house.\\n *\\n * @api private\\n */\\n cleanup(fromError) {\\n if (\\\"undefined\\\" === typeof this.xhr || null === this.xhr) {\\n return;\\n }\\n this.xhr.onreadystatechange = empty;\\n if (fromError) {\\n try {\\n this.xhr.abort();\\n }\\n catch (e) { }\\n }\\n if (typeof document !== \\\"undefined\\\") {\\n delete Request.requests[this.index];\\n }\\n this.xhr = null;\\n }\\n /**\\n * Called upon load.\\n *\\n * @api private\\n */\\n onLoad() {\\n const data = this.xhr.responseText;\\n if (data !== null) {\\n this.onData(data);\\n }\\n }\\n /**\\n * Aborts the request.\\n *\\n * @api public\\n */\\n abort() {\\n this.cleanup();\\n }\\n}\\nRequest.requestsCount = 0;\\nRequest.requests = {};\\n/**\\n * Aborts pending requests when unloading the window. This is needed to prevent\\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\\n * emitted.\\n */\\nif (typeof document !== \\\"undefined\\\") {\\n // @ts-ignore\\n if (typeof attachEvent === \\\"function\\\") {\\n // @ts-ignore\\n attachEvent(\\\"onunload\\\", unloadHandler);\\n }\\n else if (typeof addEventListener === \\\"function\\\") {\\n const terminationEvent = \\\"onpagehide\\\" in _globalThis_js__WEBPACK_IMPORTED_MODULE_1__[\\\"default\\\"] ? \\\"pagehide\\\" : \\\"unload\\\";\\n addEventListener(terminationEvent, unloadHandler, false);\\n }\\n}\\nfunction unloadHandler() {\\n for (let i in Request.requests) {\\n if (Request.requests.hasOwnProperty(i)) {\\n Request.requests[i].abort();\\n }\\n }\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/transports/polling-xhr.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/transports/polling.js\":\n/*!***********************************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/transports/polling.js ***!\n \\***********************************************************************/\n/*! exports provided: Polling */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Polling\\\", function() { return Polling; });\\n/* harmony import */ var _transport_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transport.js */ \\\"./node_modules/engine.io-client/build/esm/transport.js\\\");\\n/* harmony import */ var yeast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! yeast */ \\\"./node_modules/yeast/index.js\\\");\\n/* harmony import */ var yeast__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(yeast__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var parseqs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! parseqs */ \\\"./node_modules/parseqs/index.js\\\");\\n/* harmony import */ var parseqs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(parseqs__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! engine.io-parser */ \\\"./node_modules/engine.io-parser/build/esm/index.js\\\");\\n\\n\\n\\n\\nclass Polling extends _transport_js__WEBPACK_IMPORTED_MODULE_0__[\\\"Transport\\\"] {\\n constructor() {\\n super(...arguments);\\n this.polling = false;\\n }\\n /**\\n * Transport name.\\n */\\n get name() {\\n return \\\"polling\\\";\\n }\\n /**\\n * Opens the socket (triggers polling). We write a PING message to determine\\n * when the transport is open.\\n *\\n * @api private\\n */\\n doOpen() {\\n this.poll();\\n }\\n /**\\n * Pauses polling.\\n *\\n * @param {Function} callback upon buffers are flushed and transport is paused\\n * @api private\\n */\\n pause(onPause) {\\n this.readyState = \\\"pausing\\\";\\n const pause = () => {\\n this.readyState = \\\"paused\\\";\\n onPause();\\n };\\n if (this.polling || !this.writable) {\\n let total = 0;\\n if (this.polling) {\\n total++;\\n this.once(\\\"pollComplete\\\", function () {\\n --total || pause();\\n });\\n }\\n if (!this.writable) {\\n total++;\\n this.once(\\\"drain\\\", function () {\\n --total || pause();\\n });\\n }\\n }\\n else {\\n pause();\\n }\\n }\\n /**\\n * Starts polling cycle.\\n *\\n * @api public\\n */\\n poll() {\\n this.polling = true;\\n this.doPoll();\\n this.emit(\\\"poll\\\");\\n }\\n /**\\n * Overloads onData to detect payloads.\\n *\\n * @api private\\n */\\n onData(data) {\\n const callback = packet => {\\n // if its the first message we consider the transport open\\n if (\\\"opening\\\" === this.readyState && packet.type === \\\"open\\\") {\\n this.onOpen();\\n }\\n // if its a close packet, we close the ongoing requests\\n if (\\\"close\\\" === packet.type) {\\n this.onClose();\\n return false;\\n }\\n // otherwise bypass onData and handle the message\\n this.onPacket(packet);\\n };\\n // decode payload\\n Object(engine_io_parser__WEBPACK_IMPORTED_MODULE_3__[\\\"decodePayload\\\"])(data, this.socket.binaryType).forEach(callback);\\n // if an event did not trigger closing\\n if (\\\"closed\\\" !== this.readyState) {\\n // if we got data we're not polling\\n this.polling = false;\\n this.emit(\\\"pollComplete\\\");\\n if (\\\"open\\\" === this.readyState) {\\n this.poll();\\n }\\n else {\\n }\\n }\\n }\\n /**\\n * For polling, send a close packet.\\n *\\n * @api private\\n */\\n doClose() {\\n const close = () => {\\n this.write([{ type: \\\"close\\\" }]);\\n };\\n if (\\\"open\\\" === this.readyState) {\\n close();\\n }\\n else {\\n // in case we're trying to close while\\n // handshaking is in progress (GH-164)\\n this.once(\\\"open\\\", close);\\n }\\n }\\n /**\\n * Writes a packets payload.\\n *\\n * @param {Array} data packets\\n * @param {Function} drain callback\\n * @api private\\n */\\n write(packets) {\\n this.writable = false;\\n Object(engine_io_parser__WEBPACK_IMPORTED_MODULE_3__[\\\"encodePayload\\\"])(packets, data => {\\n this.doWrite(data, () => {\\n this.writable = true;\\n this.emit(\\\"drain\\\");\\n });\\n });\\n }\\n /**\\n * Generates uri for connection.\\n *\\n * @api private\\n */\\n uri() {\\n let query = this.query || {};\\n const schema = this.opts.secure ? \\\"https\\\" : \\\"http\\\";\\n let port = \\\"\\\";\\n // cache busting is forced\\n if (false !== this.opts.timestampRequests) {\\n query[this.opts.timestampParam] = yeast__WEBPACK_IMPORTED_MODULE_1___default()();\\n }\\n if (!this.supportsBinary && !query.sid) {\\n query.b64 = 1;\\n }\\n // avoid port if default for schema\\n if (this.opts.port &&\\n ((\\\"https\\\" === schema && Number(this.opts.port) !== 443) ||\\n (\\\"http\\\" === schema && Number(this.opts.port) !== 80))) {\\n port = \\\":\\\" + this.opts.port;\\n }\\n const encodedQuery = parseqs__WEBPACK_IMPORTED_MODULE_2___default.a.encode(query);\\n const ipv6 = this.opts.hostname.indexOf(\\\":\\\") !== -1;\\n return (schema +\\n \\\"://\\\" +\\n (ipv6 ? \\\"[\\\" + this.opts.hostname + \\\"]\\\" : this.opts.hostname) +\\n port +\\n this.opts.path +\\n (encodedQuery.length ? \\\"?\\\" + encodedQuery : \\\"\\\"));\\n }\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/transports/polling.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js\":\n/*!*********************************************************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js ***!\n \\*********************************************************************************************/\n/*! exports provided: nextTick, WebSocket, usingBrowserWebSocket, defaultBinaryType */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"nextTick\\\", function() { return nextTick; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"WebSocket\\\", function() { return WebSocket; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"usingBrowserWebSocket\\\", function() { return usingBrowserWebSocket; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"defaultBinaryType\\\", function() { return defaultBinaryType; });\\n/* harmony import */ var _globalThis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../globalThis.js */ \\\"./node_modules/engine.io-client/build/esm/globalThis.browser.js\\\");\\n\\nconst nextTick = (() => {\\n const isPromiseAvailable = typeof Promise === \\\"function\\\" && typeof Promise.resolve === \\\"function\\\";\\n if (isPromiseAvailable) {\\n return cb => Promise.resolve().then(cb);\\n }\\n else {\\n return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);\\n }\\n})();\\nconst WebSocket = _globalThis_js__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"].WebSocket || _globalThis_js__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"].MozWebSocket;\\nconst usingBrowserWebSocket = true;\\nconst defaultBinaryType = \\\"arraybuffer\\\";\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/transports/websocket.js\":\n/*!*************************************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/transports/websocket.js ***!\n \\*************************************************************************/\n/*! exports provided: WS */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"WS\\\", function() { return WS; });\\n/* harmony import */ var _transport_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transport.js */ \\\"./node_modules/engine.io-client/build/esm/transport.js\\\");\\n/* harmony import */ var parseqs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! parseqs */ \\\"./node_modules/parseqs/index.js\\\");\\n/* harmony import */ var parseqs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(parseqs__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var yeast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! yeast */ \\\"./node_modules/yeast/index.js\\\");\\n/* harmony import */ var yeast__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(yeast__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util.js */ \\\"./node_modules/engine.io-client/build/esm/util.js\\\");\\n/* harmony import */ var _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./websocket-constructor.js */ \\\"./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js\\\");\\n/* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! engine.io-parser */ \\\"./node_modules/engine.io-parser/build/esm/index.js\\\");\\n\\n\\n\\n\\n\\n\\n// detect ReactNative environment\\nconst isReactNative = typeof navigator !== \\\"undefined\\\" &&\\n typeof navigator.product === \\\"string\\\" &&\\n navigator.product.toLowerCase() === \\\"reactnative\\\";\\nclass WS extends _transport_js__WEBPACK_IMPORTED_MODULE_0__[\\\"Transport\\\"] {\\n /**\\n * WebSocket transport constructor.\\n *\\n * @api {Object} connection options\\n * @api public\\n */\\n constructor(opts) {\\n super(opts);\\n this.supportsBinary = !opts.forceBase64;\\n }\\n /**\\n * Transport name.\\n *\\n * @api public\\n */\\n get name() {\\n return \\\"websocket\\\";\\n }\\n /**\\n * Opens socket.\\n *\\n * @api private\\n */\\n doOpen() {\\n if (!this.check()) {\\n // let probe timeout\\n return;\\n }\\n const uri = this.uri();\\n const protocols = this.opts.protocols;\\n // React Native only supports the 'headers' option, and will print a warning if anything else is passed\\n const opts = isReactNative\\n ? {}\\n : Object(_util_js__WEBPACK_IMPORTED_MODULE_3__[\\\"pick\\\"])(this.opts, \\\"agent\\\", \\\"perMessageDeflate\\\", \\\"pfx\\\", \\\"key\\\", \\\"passphrase\\\", \\\"cert\\\", \\\"ca\\\", \\\"ciphers\\\", \\\"rejectUnauthorized\\\", \\\"localAddress\\\", \\\"protocolVersion\\\", \\\"origin\\\", \\\"maxPayload\\\", \\\"family\\\", \\\"checkServerIdentity\\\");\\n if (this.opts.extraHeaders) {\\n opts.headers = this.opts.extraHeaders;\\n }\\n try {\\n this.ws =\\n _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[\\\"usingBrowserWebSocket\\\"] && !isReactNative\\n ? protocols\\n ? new _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[\\\"WebSocket\\\"](uri, protocols)\\n : new _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[\\\"WebSocket\\\"](uri)\\n : new _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[\\\"WebSocket\\\"](uri, protocols, opts);\\n }\\n catch (err) {\\n return this.emit(\\\"error\\\", err);\\n }\\n this.ws.binaryType = this.socket.binaryType || _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[\\\"defaultBinaryType\\\"];\\n this.addEventListeners();\\n }\\n /**\\n * Adds event listeners to the socket\\n *\\n * @api private\\n */\\n addEventListeners() {\\n this.ws.onopen = () => {\\n if (this.opts.autoUnref) {\\n this.ws._socket.unref();\\n }\\n this.onOpen();\\n };\\n this.ws.onclose = this.onClose.bind(this);\\n this.ws.onmessage = ev => this.onData(ev.data);\\n this.ws.onerror = e => this.onError(\\\"websocket error\\\", e);\\n }\\n /**\\n * Writes data to socket.\\n *\\n * @param {Array} array of packets.\\n * @api private\\n */\\n write(packets) {\\n this.writable = false;\\n // encodePacket efficient as it uses WS framing\\n // no need for encodePayload\\n for (let i = 0; i < packets.length; i++) {\\n const packet = packets[i];\\n const lastPacket = i === packets.length - 1;\\n Object(engine_io_parser__WEBPACK_IMPORTED_MODULE_5__[\\\"encodePacket\\\"])(packet, this.supportsBinary, data => {\\n // always create a new object (GH-437)\\n const opts = {};\\n if (!_websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[\\\"usingBrowserWebSocket\\\"]) {\\n if (packet.options) {\\n opts.compress = packet.options.compress;\\n }\\n if (this.opts.perMessageDeflate) {\\n const len = \\\"string\\\" === typeof data ? Buffer.byteLength(data) : data.length;\\n if (len < this.opts.perMessageDeflate.threshold) {\\n opts.compress = false;\\n }\\n }\\n }\\n // Sometimes the websocket has already been closed but the browser didn't\\n // have a chance of informing us about it yet, in that case send will\\n // throw an error\\n try {\\n if (_websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[\\\"usingBrowserWebSocket\\\"]) {\\n // TypeError is thrown when passing the second argument on Safari\\n this.ws.send(data);\\n }\\n else {\\n this.ws.send(data, opts);\\n }\\n }\\n catch (e) {\\n }\\n if (lastPacket) {\\n // fake drain\\n // defer to next tick to allow Socket to clear writeBuffer\\n Object(_websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[\\\"nextTick\\\"])(() => {\\n this.writable = true;\\n this.emit(\\\"drain\\\");\\n }, this.setTimeoutFn);\\n }\\n });\\n }\\n }\\n /**\\n * Closes socket.\\n *\\n * @api private\\n */\\n doClose() {\\n if (typeof this.ws !== \\\"undefined\\\") {\\n this.ws.close();\\n this.ws = null;\\n }\\n }\\n /**\\n * Generates uri for connection.\\n *\\n * @api private\\n */\\n uri() {\\n let query = this.query || {};\\n const schema = this.opts.secure ? \\\"wss\\\" : \\\"ws\\\";\\n let port = \\\"\\\";\\n // avoid port if default for schema\\n if (this.opts.port &&\\n ((\\\"wss\\\" === schema && Number(this.opts.port) !== 443) ||\\n (\\\"ws\\\" === schema && Number(this.opts.port) !== 80))) {\\n port = \\\":\\\" + this.opts.port;\\n }\\n // append timestamp to URI\\n if (this.opts.timestampRequests) {\\n query[this.opts.timestampParam] = yeast__WEBPACK_IMPORTED_MODULE_2___default()();\\n }\\n // communicate binary support capabilities\\n if (!this.supportsBinary) {\\n query.b64 = 1;\\n }\\n const encodedQuery = parseqs__WEBPACK_IMPORTED_MODULE_1___default.a.encode(query);\\n const ipv6 = this.opts.hostname.indexOf(\\\":\\\") !== -1;\\n return (schema +\\n \\\"://\\\" +\\n (ipv6 ? \\\"[\\\" + this.opts.hostname + \\\"]\\\" : this.opts.hostname) +\\n port +\\n this.opts.path +\\n (encodedQuery.length ? \\\"?\\\" + encodedQuery : \\\"\\\"));\\n }\\n /**\\n * Feature detection for WebSocket.\\n *\\n * @return {Boolean} whether this transport is available.\\n * @api public\\n */\\n check() {\\n return (!!_websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[\\\"WebSocket\\\"] &&\\n !(\\\"__initialize\\\" in _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[\\\"WebSocket\\\"] && this.name === WS.prototype.name));\\n }\\n}\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../buffer/index.js */ \\\"./node_modules/buffer/index.js\\\").Buffer))\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/transports/websocket.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js\":\n/*!**************************************************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js ***!\n \\**************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var has_cors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! has-cors */ \\\"./node_modules/has-cors/index.js\\\");\\n/* harmony import */ var has_cors__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(has_cors__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _globalThis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../globalThis.js */ \\\"./node_modules/engine.io-client/build/esm/globalThis.browser.js\\\");\\n// browser shim for xmlhttprequest module\\n\\n\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (function (opts) {\\n const xdomain = opts.xdomain;\\n // XMLHttpRequest can be disabled on IE\\n try {\\n if (\\\"undefined\\\" !== typeof XMLHttpRequest && (!xdomain || has_cors__WEBPACK_IMPORTED_MODULE_0___default.a)) {\\n return new XMLHttpRequest();\\n }\\n }\\n catch (e) { }\\n if (!xdomain) {\\n try {\\n return new _globalThis_js__WEBPACK_IMPORTED_MODULE_1__[\\\"default\\\"][[\\\"Active\\\"].concat(\\\"Object\\\").join(\\\"X\\\")](\\\"Microsoft.XMLHTTP\\\");\\n }\\n catch (e) { }\\n }\\n});\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-client/build/esm/util.js\":\n/*!*********************************************************!*\\\n !*** ./node_modules/engine.io-client/build/esm/util.js ***!\n \\*********************************************************/\n/*! exports provided: pick, installTimerFunctions */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"pick\\\", function() { return pick; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"installTimerFunctions\\\", function() { return installTimerFunctions; });\\n/* harmony import */ var _globalThis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./globalThis.js */ \\\"./node_modules/engine.io-client/build/esm/globalThis.browser.js\\\");\\n\\nfunction pick(obj, ...attr) {\\n return attr.reduce((acc, k) => {\\n if (obj.hasOwnProperty(k)) {\\n acc[k] = obj[k];\\n }\\n return acc;\\n }, {});\\n}\\n// Keep a reference to the real timeout functions so they can be used when overridden\\nconst NATIVE_SET_TIMEOUT = setTimeout;\\nconst NATIVE_CLEAR_TIMEOUT = clearTimeout;\\nfunction installTimerFunctions(obj, opts) {\\n if (opts.useNativeTimers) {\\n obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(_globalThis_js__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"]);\\n obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(_globalThis_js__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"]);\\n }\\n else {\\n obj.setTimeoutFn = setTimeout.bind(_globalThis_js__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"]);\\n obj.clearTimeoutFn = clearTimeout.bind(_globalThis_js__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"]);\\n }\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-client/build/esm/util.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-parser/build/esm/commons.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/engine.io-parser/build/esm/commons.js ***!\n \\************************************************************/\n/*! exports provided: PACKET_TYPES, PACKET_TYPES_REVERSE, ERROR_PACKET */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"PACKET_TYPES\\\", function() { return PACKET_TYPES; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"PACKET_TYPES_REVERSE\\\", function() { return PACKET_TYPES_REVERSE; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"ERROR_PACKET\\\", function() { return ERROR_PACKET; });\\nconst PACKET_TYPES = Object.create(null); // no Map = no polyfill\\nPACKET_TYPES[\\\"open\\\"] = \\\"0\\\";\\nPACKET_TYPES[\\\"close\\\"] = \\\"1\\\";\\nPACKET_TYPES[\\\"ping\\\"] = \\\"2\\\";\\nPACKET_TYPES[\\\"pong\\\"] = \\\"3\\\";\\nPACKET_TYPES[\\\"message\\\"] = \\\"4\\\";\\nPACKET_TYPES[\\\"upgrade\\\"] = \\\"5\\\";\\nPACKET_TYPES[\\\"noop\\\"] = \\\"6\\\";\\nconst PACKET_TYPES_REVERSE = Object.create(null);\\nObject.keys(PACKET_TYPES).forEach(key => {\\n PACKET_TYPES_REVERSE[PACKET_TYPES[key]] = key;\\n});\\nconst ERROR_PACKET = { type: \\\"error\\\", data: \\\"parser error\\\" };\\n\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-parser/build/esm/commons.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-parser/build/esm/decodePacket.browser.js\":\n/*!*************************************************************************!*\\\n !*** ./node_modules/engine.io-parser/build/esm/decodePacket.browser.js ***!\n \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./commons.js */ \\\"./node_modules/engine.io-parser/build/esm/commons.js\\\");\\n/* harmony import */ var base64_arraybuffer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! base64-arraybuffer */ \\\"./node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js\\\");\\n\\n\\nconst withNativeArrayBuffer = typeof ArrayBuffer === \\\"function\\\";\\nconst decodePacket = (encodedPacket, binaryType) => {\\n if (typeof encodedPacket !== \\\"string\\\") {\\n return {\\n type: \\\"message\\\",\\n data: mapBinary(encodedPacket, binaryType)\\n };\\n }\\n const type = encodedPacket.charAt(0);\\n if (type === \\\"b\\\") {\\n return {\\n type: \\\"message\\\",\\n data: decodeBase64Packet(encodedPacket.substring(1), binaryType)\\n };\\n }\\n const packetType = _commons_js__WEBPACK_IMPORTED_MODULE_0__[\\\"PACKET_TYPES_REVERSE\\\"][type];\\n if (!packetType) {\\n return _commons_js__WEBPACK_IMPORTED_MODULE_0__[\\\"ERROR_PACKET\\\"];\\n }\\n return encodedPacket.length > 1\\n ? {\\n type: _commons_js__WEBPACK_IMPORTED_MODULE_0__[\\\"PACKET_TYPES_REVERSE\\\"][type],\\n data: encodedPacket.substring(1)\\n }\\n : {\\n type: _commons_js__WEBPACK_IMPORTED_MODULE_0__[\\\"PACKET_TYPES_REVERSE\\\"][type]\\n };\\n};\\nconst decodeBase64Packet = (data, binaryType) => {\\n if (withNativeArrayBuffer) {\\n const decoded = Object(base64_arraybuffer__WEBPACK_IMPORTED_MODULE_1__[\\\"decode\\\"])(data);\\n return mapBinary(decoded, binaryType);\\n }\\n else {\\n return { base64: true, data }; // fallback for old browsers\\n }\\n};\\nconst mapBinary = (data, binaryType) => {\\n switch (binaryType) {\\n case \\\"blob\\\":\\n return data instanceof ArrayBuffer ? new Blob([data]) : data;\\n case \\\"arraybuffer\\\":\\n default:\\n return data; // assuming the data is already an ArrayBuffer\\n }\\n};\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (decodePacket);\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-parser/build/esm/decodePacket.browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-parser/build/esm/encodePacket.browser.js\":\n/*!*************************************************************************!*\\\n !*** ./node_modules/engine.io-parser/build/esm/encodePacket.browser.js ***!\n \\*************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./commons.js */ \\\"./node_modules/engine.io-parser/build/esm/commons.js\\\");\\n\\nconst withNativeBlob = typeof Blob === \\\"function\\\" ||\\n (typeof Blob !== \\\"undefined\\\" &&\\n Object.prototype.toString.call(Blob) === \\\"[object BlobConstructor]\\\");\\nconst withNativeArrayBuffer = typeof ArrayBuffer === \\\"function\\\";\\n// ArrayBuffer.isView method is not defined in IE10\\nconst isView = obj => {\\n return typeof ArrayBuffer.isView === \\\"function\\\"\\n ? ArrayBuffer.isView(obj)\\n : obj && obj.buffer instanceof ArrayBuffer;\\n};\\nconst encodePacket = ({ type, data }, supportsBinary, callback) => {\\n if (withNativeBlob && data instanceof Blob) {\\n if (supportsBinary) {\\n return callback(data);\\n }\\n else {\\n return encodeBlobAsBase64(data, callback);\\n }\\n }\\n else if (withNativeArrayBuffer &&\\n (data instanceof ArrayBuffer || isView(data))) {\\n if (supportsBinary) {\\n return callback(data);\\n }\\n else {\\n return encodeBlobAsBase64(new Blob([data]), callback);\\n }\\n }\\n // plain string\\n return callback(_commons_js__WEBPACK_IMPORTED_MODULE_0__[\\\"PACKET_TYPES\\\"][type] + (data || \\\"\\\"));\\n};\\nconst encodeBlobAsBase64 = (data, callback) => {\\n const fileReader = new FileReader();\\n fileReader.onload = function () {\\n const content = fileReader.result.split(\\\",\\\")[1];\\n callback(\\\"b\\\" + content);\\n };\\n return fileReader.readAsDataURL(data);\\n};\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (encodePacket);\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-parser/build/esm/encodePacket.browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/engine.io-parser/build/esm/index.js\":\n/*!**********************************************************!*\\\n !*** ./node_modules/engine.io-parser/build/esm/index.js ***!\n \\**********************************************************/\n/*! exports provided: protocol, encodePacket, encodePayload, decodePacket, decodePayload */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"protocol\\\", function() { return protocol; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"encodePayload\\\", function() { return encodePayload; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"decodePayload\\\", function() { return decodePayload; });\\n/* harmony import */ var _encodePacket_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./encodePacket.js */ \\\"./node_modules/engine.io-parser/build/esm/encodePacket.browser.js\\\");\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\"encodePacket\\\", function() { return _encodePacket_js__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"]; });\\n\\n/* harmony import */ var _decodePacket_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./decodePacket.js */ \\\"./node_modules/engine.io-parser/build/esm/decodePacket.browser.js\\\");\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\"decodePacket\\\", function() { return _decodePacket_js__WEBPACK_IMPORTED_MODULE_1__[\\\"default\\\"]; });\\n\\n\\n\\nconst SEPARATOR = String.fromCharCode(30); // see https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text\\nconst encodePayload = (packets, callback) => {\\n // some packets may be added to the array while encoding, so the initial length must be saved\\n const length = packets.length;\\n const encodedPackets = new Array(length);\\n let count = 0;\\n packets.forEach((packet, i) => {\\n // force base64 encoding for binary packets\\n Object(_encodePacket_js__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"])(packet, false, encodedPacket => {\\n encodedPackets[i] = encodedPacket;\\n if (++count === length) {\\n callback(encodedPackets.join(SEPARATOR));\\n }\\n });\\n });\\n};\\nconst decodePayload = (encodedPayload, binaryType) => {\\n const encodedPackets = encodedPayload.split(SEPARATOR);\\n const packets = [];\\n for (let i = 0; i < encodedPackets.length; i++) {\\n const decodedPacket = Object(_decodePacket_js__WEBPACK_IMPORTED_MODULE_1__[\\\"default\\\"])(encodedPackets[i], binaryType);\\n packets.push(decodedPacket);\\n if (decodedPacket.type === \\\"error\\\") {\\n break;\\n }\\n }\\n return packets;\\n};\\nconst protocol = 4;\\n\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/engine.io-parser/build/esm/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/events/events.js\":\n/*!***************************************!*\\\n !*** ./node_modules/events/events.js ***!\n \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n\\n\\nvar R = typeof Reflect === 'object' ? Reflect : null\\nvar ReflectApply = R && typeof R.apply === 'function'\\n ? R.apply\\n : function ReflectApply(target, receiver, args) {\\n return Function.prototype.apply.call(target, receiver, args);\\n }\\n\\nvar ReflectOwnKeys\\nif (R && typeof R.ownKeys === 'function') {\\n ReflectOwnKeys = R.ownKeys\\n} else if (Object.getOwnPropertySymbols) {\\n ReflectOwnKeys = function ReflectOwnKeys(target) {\\n return Object.getOwnPropertyNames(target)\\n .concat(Object.getOwnPropertySymbols(target));\\n };\\n} else {\\n ReflectOwnKeys = function ReflectOwnKeys(target) {\\n return Object.getOwnPropertyNames(target);\\n };\\n}\\n\\nfunction ProcessEmitWarning(warning) {\\n if (console && console.warn) console.warn(warning);\\n}\\n\\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\\n return value !== value;\\n}\\n\\nfunction EventEmitter() {\\n EventEmitter.init.call(this);\\n}\\nmodule.exports = EventEmitter;\\nmodule.exports.once = once;\\n\\n// Backwards-compat with node 0.10.x\\nEventEmitter.EventEmitter = EventEmitter;\\n\\nEventEmitter.prototype._events = undefined;\\nEventEmitter.prototype._eventsCount = 0;\\nEventEmitter.prototype._maxListeners = undefined;\\n\\n// By default EventEmitters will print a warning if more than 10 listeners are\\n// added to it. This is a useful default which helps finding memory leaks.\\nvar defaultMaxListeners = 10;\\n\\nfunction checkListener(listener) {\\n if (typeof listener !== 'function') {\\n throw new TypeError('The \\\"listener\\\" argument must be of type Function. Received type ' + typeof listener);\\n }\\n}\\n\\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\\n enumerable: true,\\n get: function() {\\n return defaultMaxListeners;\\n },\\n set: function(arg) {\\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\\n throw new RangeError('The value of \\\"defaultMaxListeners\\\" is out of range. It must be a non-negative number. Received ' + arg + '.');\\n }\\n defaultMaxListeners = arg;\\n }\\n});\\n\\nEventEmitter.init = function() {\\n\\n if (this._events === undefined ||\\n this._events === Object.getPrototypeOf(this)._events) {\\n this._events = Object.create(null);\\n this._eventsCount = 0;\\n }\\n\\n this._maxListeners = this._maxListeners || undefined;\\n};\\n\\n// Obviously not all Emitters should be limited to 10. This function allows\\n// that to be increased. Set to zero for unlimited.\\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\\n throw new RangeError('The value of \\\"n\\\" is out of range. It must be a non-negative number. Received ' + n + '.');\\n }\\n this._maxListeners = n;\\n return this;\\n};\\n\\nfunction _getMaxListeners(that) {\\n if (that._maxListeners === undefined)\\n return EventEmitter.defaultMaxListeners;\\n return that._maxListeners;\\n}\\n\\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\\n return _getMaxListeners(this);\\n};\\n\\nEventEmitter.prototype.emit = function emit(type) {\\n var args = [];\\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\\n var doError = (type === 'error');\\n\\n var events = this._events;\\n if (events !== undefined)\\n doError = (doError && events.error === undefined);\\n else if (!doError)\\n return false;\\n\\n // If there is no 'error' event listener then throw.\\n if (doError) {\\n var er;\\n if (args.length > 0)\\n er = args[0];\\n if (er instanceof Error) {\\n // Note: The comments on the `throw` lines are intentional, they show\\n // up in Node's output if this results in an unhandled exception.\\n throw er; // Unhandled 'error' event\\n }\\n // At least give some kind of context to the user\\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\\n err.context = er;\\n throw err; // Unhandled 'error' event\\n }\\n\\n var handler = events[type];\\n\\n if (handler === undefined)\\n return false;\\n\\n if (typeof handler === 'function') {\\n ReflectApply(handler, this, args);\\n } else {\\n var len = handler.length;\\n var listeners = arrayClone(handler, len);\\n for (var i = 0; i < len; ++i)\\n ReflectApply(listeners[i], this, args);\\n }\\n\\n return true;\\n};\\n\\nfunction _addListener(target, type, listener, prepend) {\\n var m;\\n var events;\\n var existing;\\n\\n checkListener(listener);\\n\\n events = target._events;\\n if (events === undefined) {\\n events = target._events = Object.create(null);\\n target._eventsCount = 0;\\n } else {\\n // To avoid recursion in the case that type === \\\"newListener\\\"! Before\\n // adding it to the listeners, first emit \\\"newListener\\\".\\n if (events.newListener !== undefined) {\\n target.emit('newListener', type,\\n listener.listener ? listener.listener : listener);\\n\\n // Re-assign `events` because a newListener handler could have caused the\\n // this._events to be assigned to a new object\\n events = target._events;\\n }\\n existing = events[type];\\n }\\n\\n if (existing === undefined) {\\n // Optimize the case of one listener. Don't need the extra array object.\\n existing = events[type] = listener;\\n ++target._eventsCount;\\n } else {\\n if (typeof existing === 'function') {\\n // Adding the second element, need to change to array.\\n existing = events[type] =\\n prepend ? [listener, existing] : [existing, listener];\\n // If we've already got an array, just append.\\n } else if (prepend) {\\n existing.unshift(listener);\\n } else {\\n existing.push(listener);\\n }\\n\\n // Check for listener leak\\n m = _getMaxListeners(target);\\n if (m > 0 && existing.length > m && !existing.warned) {\\n existing.warned = true;\\n // No error code for this since it is a Warning\\n // eslint-disable-next-line no-restricted-syntax\\n var w = new Error('Possible EventEmitter memory leak detected. ' +\\n existing.length + ' ' + String(type) + ' listeners ' +\\n 'added. Use emitter.setMaxListeners() to ' +\\n 'increase limit');\\n w.name = 'MaxListenersExceededWarning';\\n w.emitter = target;\\n w.type = type;\\n w.count = existing.length;\\n ProcessEmitWarning(w);\\n }\\n }\\n\\n return target;\\n}\\n\\nEventEmitter.prototype.addListener = function addListener(type, listener) {\\n return _addListener(this, type, listener, false);\\n};\\n\\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\\n\\nEventEmitter.prototype.prependListener =\\n function prependListener(type, listener) {\\n return _addListener(this, type, listener, true);\\n };\\n\\nfunction onceWrapper() {\\n if (!this.fired) {\\n this.target.removeListener(this.type, this.wrapFn);\\n this.fired = true;\\n if (arguments.length === 0)\\n return this.listener.call(this.target);\\n return this.listener.apply(this.target, arguments);\\n }\\n}\\n\\nfunction _onceWrap(target, type, listener) {\\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\\n var wrapped = onceWrapper.bind(state);\\n wrapped.listener = listener;\\n state.wrapFn = wrapped;\\n return wrapped;\\n}\\n\\nEventEmitter.prototype.once = function once(type, listener) {\\n checkListener(listener);\\n this.on(type, _onceWrap(this, type, listener));\\n return this;\\n};\\n\\nEventEmitter.prototype.prependOnceListener =\\n function prependOnceListener(type, listener) {\\n checkListener(listener);\\n this.prependListener(type, _onceWrap(this, type, listener));\\n return this;\\n };\\n\\n// Emits a 'removeListener' event if and only if the listener was removed.\\nEventEmitter.prototype.removeListener =\\n function removeListener(type, listener) {\\n var list, events, position, i, originalListener;\\n\\n checkListener(listener);\\n\\n events = this._events;\\n if (events === undefined)\\n return this;\\n\\n list = events[type];\\n if (list === undefined)\\n return this;\\n\\n if (list === listener || list.listener === listener) {\\n if (--this._eventsCount === 0)\\n this._events = Object.create(null);\\n else {\\n delete events[type];\\n if (events.removeListener)\\n this.emit('removeListener', type, list.listener || listener);\\n }\\n } else if (typeof list !== 'function') {\\n position = -1;\\n\\n for (i = list.length - 1; i >= 0; i--) {\\n if (list[i] === listener || list[i].listener === listener) {\\n originalListener = list[i].listener;\\n position = i;\\n break;\\n }\\n }\\n\\n if (position < 0)\\n return this;\\n\\n if (position === 0)\\n list.shift();\\n else {\\n spliceOne(list, position);\\n }\\n\\n if (list.length === 1)\\n events[type] = list[0];\\n\\n if (events.removeListener !== undefined)\\n this.emit('removeListener', type, originalListener || listener);\\n }\\n\\n return this;\\n };\\n\\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\\n\\nEventEmitter.prototype.removeAllListeners =\\n function removeAllListeners(type) {\\n var listeners, events, i;\\n\\n events = this._events;\\n if (events === undefined)\\n return this;\\n\\n // not listening for removeListener, no need to emit\\n if (events.removeListener === undefined) {\\n if (arguments.length === 0) {\\n this._events = Object.create(null);\\n this._eventsCount = 0;\\n } else if (events[type] !== undefined) {\\n if (--this._eventsCount === 0)\\n this._events = Object.create(null);\\n else\\n delete events[type];\\n }\\n return this;\\n }\\n\\n // emit removeListener for all listeners on all events\\n if (arguments.length === 0) {\\n var keys = Object.keys(events);\\n var key;\\n for (i = 0; i < keys.length; ++i) {\\n key = keys[i];\\n if (key === 'removeListener') continue;\\n this.removeAllListeners(key);\\n }\\n this.removeAllListeners('removeListener');\\n this._events = Object.create(null);\\n this._eventsCount = 0;\\n return this;\\n }\\n\\n listeners = events[type];\\n\\n if (typeof listeners === 'function') {\\n this.removeListener(type, listeners);\\n } else if (listeners !== undefined) {\\n // LIFO order\\n for (i = listeners.length - 1; i >= 0; i--) {\\n this.removeListener(type, listeners[i]);\\n }\\n }\\n\\n return this;\\n };\\n\\nfunction _listeners(target, type, unwrap) {\\n var events = target._events;\\n\\n if (events === undefined)\\n return [];\\n\\n var evlistener = events[type];\\n if (evlistener === undefined)\\n return [];\\n\\n if (typeof evlistener === 'function')\\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\\n\\n return unwrap ?\\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\\n}\\n\\nEventEmitter.prototype.listeners = function listeners(type) {\\n return _listeners(this, type, true);\\n};\\n\\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\\n return _listeners(this, type, false);\\n};\\n\\nEventEmitter.listenerCount = function(emitter, type) {\\n if (typeof emitter.listenerCount === 'function') {\\n return emitter.listenerCount(type);\\n } else {\\n return listenerCount.call(emitter, type);\\n }\\n};\\n\\nEventEmitter.prototype.listenerCount = listenerCount;\\nfunction listenerCount(type) {\\n var events = this._events;\\n\\n if (events !== undefined) {\\n var evlistener = events[type];\\n\\n if (typeof evlistener === 'function') {\\n return 1;\\n } else if (evlistener !== undefined) {\\n return evlistener.length;\\n }\\n }\\n\\n return 0;\\n}\\n\\nEventEmitter.prototype.eventNames = function eventNames() {\\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\\n};\\n\\nfunction arrayClone(arr, n) {\\n var copy = new Array(n);\\n for (var i = 0; i < n; ++i)\\n copy[i] = arr[i];\\n return copy;\\n}\\n\\nfunction spliceOne(list, index) {\\n for (; index + 1 < list.length; index++)\\n list[index] = list[index + 1];\\n list.pop();\\n}\\n\\nfunction unwrapListeners(arr) {\\n var ret = new Array(arr.length);\\n for (var i = 0; i < ret.length; ++i) {\\n ret[i] = arr[i].listener || arr[i];\\n }\\n return ret;\\n}\\n\\nfunction once(emitter, name) {\\n return new Promise(function (resolve, reject) {\\n function errorListener(err) {\\n emitter.removeListener(name, resolver);\\n reject(err);\\n }\\n\\n function resolver() {\\n if (typeof emitter.removeListener === 'function') {\\n emitter.removeListener('error', errorListener);\\n }\\n resolve([].slice.call(arguments));\\n };\\n\\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\\n if (name !== 'error') {\\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\\n }\\n });\\n}\\n\\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\\n if (typeof emitter.on === 'function') {\\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\\n }\\n}\\n\\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\\n if (typeof emitter.on === 'function') {\\n if (flags.once) {\\n emitter.once(name, listener);\\n } else {\\n emitter.on(name, listener);\\n }\\n } else if (typeof emitter.addEventListener === 'function') {\\n // EventTarget does not have `error` event semantics like Node\\n // EventEmitters, we do not listen for `error` events here.\\n emitter.addEventListener(name, function wrapListener(arg) {\\n // IE does not have builtin `{ once: true }` support so we\\n // have to do it manually.\\n if (flags.once) {\\n emitter.removeEventListener(name, wrapListener);\\n }\\n listener(arg);\\n });\\n } else {\\n throw new TypeError('The \\\"emitter\\\" argument must be of type EventEmitter. Received type ' + typeof emitter);\\n }\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/events/events.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/h264-profile-level-id/index.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/h264-profile-level-id/index.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"const debug = __webpack_require__(/*! debug */ \\\"./node_modules/debug/src/browser.js\\\")('h264-profile-level-id');\\n\\n/* eslint-disable no-console */\\ndebug.log = console.info.bind(console);\\n/* eslint-enable no-console */\\n\\nconst ProfileConstrainedBaseline = 1;\\nconst ProfileBaseline = 2;\\nconst ProfileMain = 3;\\nconst ProfileConstrainedHigh = 4;\\nconst ProfileHigh = 5;\\n\\nexports.ProfileConstrainedBaseline = ProfileConstrainedBaseline;\\nexports.ProfileBaseline = ProfileBaseline;\\nexports.ProfileMain = ProfileMain;\\nexports.ProfileConstrainedHigh = ProfileConstrainedHigh;\\nexports.ProfileHigh = ProfileHigh;\\n\\n// All values are equal to ten times the level number, except level 1b which is\\n// special.\\nconst Level1_b = 0;\\nconst Level1 = 10;\\nconst Level1_1 = 11;\\nconst Level1_2 = 12;\\nconst Level1_3 = 13;\\nconst Level2 = 20;\\nconst Level2_1 = 21;\\nconst Level2_2 = 22;\\nconst Level3 = 30;\\nconst Level3_1 = 31;\\nconst Level3_2 = 32;\\nconst Level4 = 40;\\nconst Level4_1 = 41;\\nconst Level4_2 = 42;\\nconst Level5 = 50;\\nconst Level5_1 = 51;\\nconst Level5_2 = 52;\\n\\nexports.Level1_b = Level1_b;\\nexports.Level1 = Level1;\\nexports.Level1_1 = Level1_1;\\nexports.Level1_2 = Level1_2;\\nexports.Level1_3 = Level1_3;\\nexports.Level2 = Level2;\\nexports.Level2_1 = Level2_1;\\nexports.Level2_2 = Level2_2;\\nexports.Level3 = Level3;\\nexports.Level3_1 = Level3_1;\\nexports.Level3_2 = Level3_2;\\nexports.Level4 = Level4;\\nexports.Level4_1 = Level4_1;\\nexports.Level4_2 = Level4_2;\\nexports.Level5 = Level5;\\nexports.Level5_1 = Level5_1;\\nexports.Level5_2 = Level5_2;\\n\\nclass ProfileLevelId\\n{\\n\\tconstructor(profile, level)\\n\\t{\\n\\t\\tthis.profile = profile;\\n\\t\\tthis.level = level;\\n\\t}\\n}\\n\\nexports.ProfileLevelId = ProfileLevelId;\\n\\n// Default ProfileLevelId.\\n//\\n// TODO: The default should really be profile Baseline and level 1 according to\\n// the spec: https://tools.ietf.org/html/rfc6184#section-8.1. In order to not\\n// break backwards compatibility with older versions of WebRTC where external\\n// codecs don't have any parameters, use profile ConstrainedBaseline level 3_1\\n// instead. This workaround will only be done in an interim period to allow\\n// external clients to update their code.\\n//\\n// http://crbug/webrtc/6337.\\nconst DefaultProfileLevelId =\\n\\tnew ProfileLevelId(ProfileConstrainedBaseline, Level3_1);\\n\\n// For level_idc=11 and profile_idc=0x42, 0x4D, or 0x58, the constraint set3\\n// flag specifies if level 1b or level 1.1 is used.\\nconst ConstraintSet3Flag = 0x10;\\n\\n// Class for matching bit patterns such as \\\"x1xx0000\\\" where 'x' is allowed to be\\n// either 0 or 1.\\nclass BitPattern\\n{\\n\\tconstructor(str)\\n\\t{\\n\\t\\tthis._mask = ~byteMaskString('x', str);\\n\\t\\tthis._maskedValue = byteMaskString('1', str);\\n\\t}\\n\\n\\tisMatch(value)\\n\\t{\\n\\t\\treturn this._maskedValue === (value & this._mask);\\n\\t}\\n}\\n\\n// Class for converting between profile_idc/profile_iop to Profile.\\nclass ProfilePattern\\n{\\n\\tconstructor(profile_idc, profile_iop, profile)\\n\\t{\\n\\t\\tthis.profile_idc = profile_idc;\\n\\t\\tthis.profile_iop = profile_iop;\\n\\t\\tthis.profile = profile;\\n\\t}\\n}\\n\\n// This is from https://tools.ietf.org/html/rfc6184#section-8.1.\\nconst ProfilePatterns =\\n[\\n\\tnew ProfilePattern(0x42, new BitPattern('x1xx0000'), ProfileConstrainedBaseline),\\n\\tnew ProfilePattern(0x4D, new BitPattern('1xxx0000'), ProfileConstrainedBaseline),\\n\\tnew ProfilePattern(0x58, new BitPattern('11xx0000'), ProfileConstrainedBaseline),\\n\\tnew ProfilePattern(0x42, new BitPattern('x0xx0000'), ProfileBaseline),\\n\\tnew ProfilePattern(0x58, new BitPattern('10xx0000'), ProfileBaseline),\\n\\tnew ProfilePattern(0x4D, new BitPattern('0x0x0000'), ProfileMain),\\n\\tnew ProfilePattern(0x64, new BitPattern('00000000'), ProfileHigh),\\n\\tnew ProfilePattern(0x64, new BitPattern('00001100'), ProfileConstrainedHigh)\\n];\\n\\n/**\\n * Parse profile level id that is represented as a string of 3 hex bytes.\\n * Nothing will be returned if the string is not a recognized H264 profile\\n * level id.\\n *\\n * @param {String} str - profile-level-id value as a string of 3 hex bytes.\\n *\\n * @returns {ProfileLevelId}\\n */\\nexports.parseProfileLevelId = function(str)\\n{\\n\\t// The string should consist of 3 bytes in hexadecimal format.\\n\\tif (typeof str !== 'string' || str.length !== 6)\\n\\t\\treturn null;\\n\\n\\tconst profile_level_id_numeric = parseInt(str, 16);\\n\\n\\tif (profile_level_id_numeric === 0)\\n\\t\\treturn null;\\n\\n\\t// Separate into three bytes.\\n\\tconst level_idc = profile_level_id_numeric & 0xFF;\\n\\tconst profile_iop = (profile_level_id_numeric >> 8) & 0xFF;\\n\\tconst profile_idc = (profile_level_id_numeric >> 16) & 0xFF;\\n\\n\\t// Parse level based on level_idc and constraint set 3 flag.\\n\\tlet level;\\n\\n\\tswitch (level_idc)\\n\\t{\\n\\t\\tcase Level1_1:\\n\\t\\t{\\n\\t\\t\\tlevel = (profile_iop & ConstraintSet3Flag) !== 0 ? Level1_b : Level1_1;\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t\\tcase Level1:\\n\\t\\tcase Level1_2:\\n\\t\\tcase Level1_3:\\n\\t\\tcase Level2:\\n\\t\\tcase Level2_1:\\n\\t\\tcase Level2_2:\\n\\t\\tcase Level3:\\n\\t\\tcase Level3_1:\\n\\t\\tcase Level3_2:\\n\\t\\tcase Level4:\\n\\t\\tcase Level4_1:\\n\\t\\tcase Level4_2:\\n\\t\\tcase Level5:\\n\\t\\tcase Level5_1:\\n\\t\\tcase Level5_2:\\n\\t\\t{\\n\\t\\t\\tlevel = level_idc;\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t\\t// Unrecognized level_idc.\\n\\t\\tdefault:\\n\\t\\t{\\n\\t\\t\\tdebug('parseProfileLevelId() | unrecognized level_idc:%s', level_idc);\\n\\n\\t\\t\\treturn null;\\n\\t\\t}\\n\\t}\\n\\n\\t// Parse profile_idc/profile_iop into a Profile enum.\\n\\tfor (const pattern of ProfilePatterns)\\n\\t{\\n\\t\\tif (\\n\\t\\t\\tprofile_idc === pattern.profile_idc &&\\n\\t\\t\\tpattern.profile_iop.isMatch(profile_iop)\\n\\t\\t)\\n\\t\\t{\\n\\t\\t\\treturn new ProfileLevelId(pattern.profile, level);\\n\\t\\t}\\n\\t}\\n\\n\\tdebug('parseProfileLevelId() | unrecognized profile_idc/profile_iop combination');\\n\\n\\treturn null;\\n};\\n\\n/**\\n * Returns canonical string representation as three hex bytes of the profile\\n * level id, or returns nothing for invalid profile level ids.\\n *\\n * @param {ProfileLevelId} profile_level_id\\n *\\n * @returns {String}\\n */\\nexports.profileLevelIdToString = function(profile_level_id)\\n{\\n\\t// Handle special case level == 1b.\\n\\tif (profile_level_id.level == Level1_b)\\n\\t{\\n\\t\\tswitch (profile_level_id.profile)\\n\\t\\t{\\n\\t\\t\\tcase ProfileConstrainedBaseline:\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn '42f00b';\\n\\t\\t\\t}\\n\\t\\t\\tcase ProfileBaseline:\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn '42100b';\\n\\t\\t\\t}\\n\\t\\t\\tcase ProfileMain:\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn '4d100b';\\n\\t\\t\\t}\\n\\t\\t\\t// Level 1_b is not allowed for other profiles.\\n\\t\\t\\tdefault:\\n\\t\\t\\t{\\n\\t\\t\\t\\tdebug(\\n\\t\\t\\t\\t\\t'profileLevelIdToString() | Level 1_b not is allowed for profile:%s',\\n\\t\\t\\t\\t\\tprofile_level_id.profile);\\n\\n\\t\\t\\t\\treturn null;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\tlet profile_idc_iop_string;\\n\\n\\tswitch (profile_level_id.profile)\\n\\t{\\n\\t\\tcase ProfileConstrainedBaseline:\\n\\t\\t{\\n\\t\\t\\tprofile_idc_iop_string = '42e0';\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t\\tcase ProfileBaseline:\\n\\t\\t{\\n\\t\\t\\tprofile_idc_iop_string = '4200';\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t\\tcase ProfileMain:\\n\\t\\t{\\n\\t\\t\\tprofile_idc_iop_string = '4d00';\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t\\tcase ProfileConstrainedHigh:\\n\\t\\t{\\n\\t\\t\\tprofile_idc_iop_string = '640c';\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t\\tcase ProfileHigh:\\n\\t\\t{\\n\\t\\t\\tprofile_idc_iop_string = '6400';\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t\\tdefault:\\n\\t\\t{\\n\\t\\t\\tdebug(\\n\\t\\t\\t\\t'profileLevelIdToString() | unrecognized profile:%s',\\n\\t\\t\\t\\tprofile_level_id.profile);\\n\\n\\t\\t\\treturn null;\\n\\t\\t}\\n\\t}\\n\\n\\tlet levelStr = (profile_level_id.level).toString(16);\\n\\n\\tif (levelStr.length === 1)\\n\\t\\tlevelStr = `0${levelStr}`;\\n\\n\\treturn `${profile_idc_iop_string}${levelStr}`;\\n};\\n\\n/**\\n * Parse profile level id that is represented as a string of 3 hex bytes\\n * contained in an SDP key-value map. A default profile level id will be\\n * returned if the profile-level-id key is missing. Nothing will be returned if\\n * the key is present but the string is invalid.\\n *\\n * @param {Object} [params={}] - Codec parameters object.\\n *\\n * @returns {ProfileLevelId}\\n */\\nexports.parseSdpProfileLevelId = function(params = {})\\n{\\n\\tconst profile_level_id = params['profile-level-id'];\\n\\n\\treturn !profile_level_id\\n\\t\\t? DefaultProfileLevelId\\n\\t\\t: exports.parseProfileLevelId(profile_level_id);\\n};\\n\\n/**\\n * Returns true if the parameters have the same H264 profile, i.e. the same\\n * H264 profile (Baseline, High, etc).\\n *\\n * @param {Object} [params1={}] - Codec parameters object.\\n * @param {Object} [params2={}] - Codec parameters object.\\n *\\n * @returns {Boolean}\\n */\\nexports.isSameProfile = function(params1 = {}, params2 = {})\\n{\\n\\tconst profile_level_id_1 = exports.parseSdpProfileLevelId(params1);\\n\\tconst profile_level_id_2 = exports.parseSdpProfileLevelId(params2);\\n\\n\\t// Compare H264 profiles, but not levels.\\n\\treturn Boolean(\\n\\t\\tprofile_level_id_1 &&\\n\\t\\tprofile_level_id_2 &&\\n\\t\\tprofile_level_id_1.profile === profile_level_id_2.profile\\n\\t);\\n};\\n\\n/**\\n * Generate codec parameters that will be used as answer in an SDP negotiation\\n * based on local supported parameters and remote offered parameters. Both\\n * local_supported_params and remote_offered_params represent sendrecv media\\n * descriptions, i.e they are a mix of both encode and decode capabilities. In\\n * theory, when the profile in local_supported_params represent a strict superset\\n * of the profile in remote_offered_params, we could limit the profile in the\\n * answer to the profile in remote_offered_params.\\n *\\n * However, to simplify the code, each supported H264 profile should be listed\\n * explicitly in the list of local supported codecs, even if they are redundant.\\n * Then each local codec in the list should be tested one at a time against the\\n * remote codec, and only when the profiles are equal should this function be\\n * called. Therefore, this function does not need to handle profile intersection,\\n * and the profile of local_supported_params and remote_offered_params must be\\n * equal before calling this function. The parameters that are used when\\n * negotiating are the level part of profile-level-id and level-asymmetry-allowed.\\n *\\n * @param {Object} [local_supported_params={}]\\n * @param {Object} [remote_offered_params={}]\\n *\\n * @returns {String} Canonical string representation as three hex bytes of the\\n * profile level id, or null if no one of the params have profile-level-id.\\n *\\n * @throws {TypeError} If Profile mismatch or invalid params.\\n */\\nexports.generateProfileLevelIdForAnswer = function(\\n\\tlocal_supported_params = {},\\n\\tremote_offered_params = {}\\n)\\n{\\n\\t// If both local and remote params do not contain profile-level-id, they are\\n\\t// both using the default profile. In this case, don't return anything.\\n\\tif (\\n\\t\\t!local_supported_params['profile-level-id'] &&\\n\\t\\t!remote_offered_params['profile-level-id']\\n\\t)\\n\\t{\\n\\t\\tdebug(\\n\\t\\t\\t'generateProfileLevelIdForAnswer() | no profile-level-id in local and remote params');\\n\\n\\t\\treturn null;\\n\\t}\\n\\n\\t// Parse profile-level-ids.\\n\\tconst local_profile_level_id =\\n\\t\\texports.parseSdpProfileLevelId(local_supported_params);\\n\\tconst remote_profile_level_id =\\n\\t\\texports.parseSdpProfileLevelId(remote_offered_params);\\n\\n\\t// The local and remote codec must have valid and equal H264 Profiles.\\n\\tif (!local_profile_level_id)\\n\\t\\tthrow new TypeError('invalid local_profile_level_id');\\n\\n\\tif (!remote_profile_level_id)\\n\\t\\tthrow new TypeError('invalid remote_profile_level_id');\\n\\n\\tif (local_profile_level_id.profile !== remote_profile_level_id.profile)\\n\\t\\tthrow new TypeError('H264 Profile mismatch');\\n\\n\\t// Parse level information.\\n\\tconst level_asymmetry_allowed = (\\n\\t\\tisLevelAsymmetryAllowed(local_supported_params) &&\\n\\t\\tisLevelAsymmetryAllowed(remote_offered_params)\\n\\t);\\n\\n\\tconst local_level = local_profile_level_id.level;\\n\\tconst remote_level = remote_profile_level_id.level;\\n\\tconst min_level = minLevel(local_level, remote_level);\\n\\n\\t// Determine answer level. When level asymmetry is not allowed, level upgrade\\n\\t// is not allowed, i.e., the level in the answer must be equal to or lower\\n\\t// than the level in the offer.\\n\\tconst answer_level = level_asymmetry_allowed ? local_level : min_level;\\n\\n\\tdebug(\\n\\t\\t'generateProfileLevelIdForAnswer() | result: [profile:%s, level:%s]',\\n\\t\\tlocal_profile_level_id.profile, answer_level);\\n\\n\\t// Return the resulting profile-level-id for the answer parameters.\\n\\treturn exports.profileLevelIdToString(\\n\\t\\tnew ProfileLevelId(local_profile_level_id.profile, answer_level));\\n};\\n\\n// Convert a string of 8 characters into a byte where the positions containing\\n// character c will have their bit set. For example, c = 'x', str = \\\"x1xx0000\\\"\\n// will return 0b10110000.\\nfunction byteMaskString(c, str)\\n{\\n\\treturn (\\n\\t\\t((str[0] === c) << 7) | ((str[1] === c) << 6) | ((str[2] === c) << 5) |\\n\\t\\t((str[3] === c) << 4)\\t| ((str[4] === c) << 3)\\t| ((str[5] === c) << 2)\\t|\\n\\t\\t((str[6] === c) << 1)\\t| ((str[7] === c) << 0)\\n\\t);\\n}\\n\\n// Compare H264 levels and handle the level 1b case.\\nfunction isLessLevel(a, b)\\n{\\n\\tif (a === Level1_b)\\n\\t\\treturn b !== Level1 && b !== Level1_b;\\n\\n\\tif (b === Level1_b)\\n\\t\\treturn a !== Level1;\\n\\n\\treturn a < b;\\n}\\n\\nfunction minLevel(a, b)\\n{\\n\\treturn isLessLevel(a, b) ? a : b;\\n}\\n\\nfunction isLevelAsymmetryAllowed(params = {})\\n{\\n\\tconst level_asymmetry_allowed = params['level-asymmetry-allowed'];\\n\\n\\treturn (\\n\\t\\tlevel_asymmetry_allowed === 1 ||\\n\\t\\tlevel_asymmetry_allowed === '1'\\n\\t);\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/h264-profile-level-id/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/has-cors/index.js\":\n/*!****************************************!*\\\n !*** ./node_modules/has-cors/index.js ***!\n \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"\\n/**\\n * Module exports.\\n *\\n * Logic borrowed from Modernizr:\\n *\\n * - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js\\n */\\n\\ntry {\\n module.exports = typeof XMLHttpRequest !== 'undefined' &&\\n 'withCredentials' in new XMLHttpRequest();\\n} catch (err) {\\n // if XMLHttp support is disabled in IE then it will throw\\n // when trying to create\\n module.exports = false;\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/has-cors/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/ieee754/index.js\":\n/*!***************************************!*\\\n !*** ./node_modules/ieee754/index.js ***!\n \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\\n var e, m\\n var eLen = (nBytes * 8) - mLen - 1\\n var eMax = (1 << eLen) - 1\\n var eBias = eMax >> 1\\n var nBits = -7\\n var i = isLE ? (nBytes - 1) : 0\\n var d = isLE ? -1 : 1\\n var s = buffer[offset + i]\\n\\n i += d\\n\\n e = s & ((1 << (-nBits)) - 1)\\n s >>= (-nBits)\\n nBits += eLen\\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\\n\\n m = e & ((1 << (-nBits)) - 1)\\n e >>= (-nBits)\\n nBits += mLen\\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\\n\\n if (e === 0) {\\n e = 1 - eBias\\n } else if (e === eMax) {\\n return m ? NaN : ((s ? -1 : 1) * Infinity)\\n } else {\\n m = m + Math.pow(2, mLen)\\n e = e - eBias\\n }\\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\\n}\\n\\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\\n var e, m, c\\n var eLen = (nBytes * 8) - mLen - 1\\n var eMax = (1 << eLen) - 1\\n var eBias = eMax >> 1\\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\\n var i = isLE ? 0 : (nBytes - 1)\\n var d = isLE ? 1 : -1\\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\\n\\n value = Math.abs(value)\\n\\n if (isNaN(value) || value === Infinity) {\\n m = isNaN(value) ? 1 : 0\\n e = eMax\\n } else {\\n e = Math.floor(Math.log(value) / Math.LN2)\\n if (value * (c = Math.pow(2, -e)) < 1) {\\n e--\\n c *= 2\\n }\\n if (e + eBias >= 1) {\\n value += rt / c\\n } else {\\n value += rt * Math.pow(2, 1 - eBias)\\n }\\n if (value * c >= 2) {\\n e++\\n c /= 2\\n }\\n\\n if (e + eBias >= eMax) {\\n m = 0\\n e = eMax\\n } else if (e + eBias >= 1) {\\n m = ((value * c) - 1) * Math.pow(2, mLen)\\n e = e + eBias\\n } else {\\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\\n e = 0\\n }\\n }\\n\\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\\n\\n e = (e << mLen) | m\\n eLen += mLen\\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\\n\\n buffer[offset + i - d] |= s * 128\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/ieee754/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/isarray/index.js\":\n/*!***************************************!*\\\n !*** ./node_modules/isarray/index.js ***!\n \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"var toString = {}.toString;\\n\\nmodule.exports = Array.isArray || function (arr) {\\n return toString.call(arr) == '[object Array]';\\n};\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/isarray/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/Consumer.js\":\n/*!*******************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/Consumer.js ***!\n \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Consumer = void 0;\\nconst Logger_1 = __webpack_require__(/*! ./Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst EnhancedEventEmitter_1 = __webpack_require__(/*! ./EnhancedEventEmitter */ \\\"./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js\\\");\\nconst errors_1 = __webpack_require__(/*! ./errors */ \\\"./node_modules/mediasoup-client/lib/errors.js\\\");\\nconst logger = new Logger_1.Logger('Consumer');\\nclass Consumer extends EnhancedEventEmitter_1.EnhancedEventEmitter {\\n /**\\n * @emits transportclose\\n * @emits trackended\\n * @emits @getstats\\n * @emits @close\\n * @emits @pause\\n * @emits @resume\\n */\\n constructor({ id, localId, producerId, rtpReceiver, track, rtpParameters, appData }) {\\n super();\\n // Closed flag.\\n this._closed = false;\\n // Observer instance.\\n this._observer = new EnhancedEventEmitter_1.EnhancedEventEmitter();\\n logger.debug('constructor()');\\n this._id = id;\\n this._localId = localId;\\n this._producerId = producerId;\\n this._rtpReceiver = rtpReceiver;\\n this._track = track;\\n this._rtpParameters = rtpParameters;\\n this._paused = !track.enabled;\\n this._appData = appData;\\n this._onTrackEnded = this._onTrackEnded.bind(this);\\n this._handleTrack();\\n }\\n /**\\n * Consumer id.\\n */\\n get id() {\\n return this._id;\\n }\\n /**\\n * Local id.\\n */\\n get localId() {\\n return this._localId;\\n }\\n /**\\n * Associated Producer id.\\n */\\n get producerId() {\\n return this._producerId;\\n }\\n /**\\n * Whether the Consumer is closed.\\n */\\n get closed() {\\n return this._closed;\\n }\\n /**\\n * Media kind.\\n */\\n get kind() {\\n return this._track.kind;\\n }\\n /**\\n * Associated RTCRtpReceiver.\\n */\\n get rtpReceiver() {\\n return this._rtpReceiver;\\n }\\n /**\\n * The associated track.\\n */\\n get track() {\\n return this._track;\\n }\\n /**\\n * RTP parameters.\\n */\\n get rtpParameters() {\\n return this._rtpParameters;\\n }\\n /**\\n * Whether the Consumer is paused.\\n */\\n get paused() {\\n return this._paused;\\n }\\n /**\\n * App custom data.\\n */\\n get appData() {\\n return this._appData;\\n }\\n /**\\n * Invalid setter.\\n */\\n set appData(appData) {\\n throw new Error('cannot override appData object');\\n }\\n /**\\n * Observer.\\n *\\n * @emits close\\n * @emits pause\\n * @emits resume\\n * @emits trackended\\n */\\n get observer() {\\n return this._observer;\\n }\\n /**\\n * Closes the Consumer.\\n */\\n close() {\\n if (this._closed)\\n return;\\n logger.debug('close()');\\n this._closed = true;\\n this._destroyTrack();\\n this.emit('@close');\\n // Emit observer event.\\n this._observer.safeEmit('close');\\n }\\n /**\\n * Transport was closed.\\n */\\n transportClosed() {\\n if (this._closed)\\n return;\\n logger.debug('transportClosed()');\\n this._closed = true;\\n this._destroyTrack();\\n this.safeEmit('transportclose');\\n // Emit observer event.\\n this._observer.safeEmit('close');\\n }\\n /**\\n * Get associated RTCRtpReceiver stats.\\n */\\n async getStats() {\\n if (this._closed)\\n throw new errors_1.InvalidStateError('closed');\\n return this.safeEmitAsPromise('@getstats');\\n }\\n /**\\n * Pauses receiving media.\\n */\\n pause() {\\n logger.debug('pause()');\\n if (this._closed) {\\n logger.error('pause() | Consumer closed');\\n return;\\n }\\n this._paused = true;\\n this._track.enabled = false;\\n this.emit('@pause');\\n // Emit observer event.\\n this._observer.safeEmit('pause');\\n }\\n /**\\n * Resumes receiving media.\\n */\\n resume() {\\n logger.debug('resume()');\\n if (this._closed) {\\n logger.error('resume() | Consumer closed');\\n return;\\n }\\n this._paused = false;\\n this._track.enabled = true;\\n this.emit('@resume');\\n // Emit observer event.\\n this._observer.safeEmit('resume');\\n }\\n _onTrackEnded() {\\n logger.debug('track \\\"ended\\\" event');\\n this.safeEmit('trackended');\\n // Emit observer event.\\n this._observer.safeEmit('trackended');\\n }\\n _handleTrack() {\\n this._track.addEventListener('ended', this._onTrackEnded);\\n }\\n _destroyTrack() {\\n try {\\n this._track.removeEventListener('ended', this._onTrackEnded);\\n this._track.stop();\\n }\\n catch (error) { }\\n }\\n}\\nexports.Consumer = Consumer;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/Consumer.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/DataConsumer.js\":\n/*!***********************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/DataConsumer.js ***!\n \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.DataConsumer = void 0;\\nconst Logger_1 = __webpack_require__(/*! ./Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst EnhancedEventEmitter_1 = __webpack_require__(/*! ./EnhancedEventEmitter */ \\\"./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js\\\");\\nconst logger = new Logger_1.Logger('DataConsumer');\\nclass DataConsumer extends EnhancedEventEmitter_1.EnhancedEventEmitter {\\n /**\\n * @emits transportclose\\n * @emits open\\n * @emits error - (error: Error)\\n * @emits close\\n * @emits message - (message: any)\\n * @emits @close\\n */\\n constructor({ id, dataProducerId, dataChannel, sctpStreamParameters, appData }) {\\n super();\\n // Closed flag.\\n this._closed = false;\\n // Observer instance.\\n this._observer = new EnhancedEventEmitter_1.EnhancedEventEmitter();\\n logger.debug('constructor()');\\n this._id = id;\\n this._dataProducerId = dataProducerId;\\n this._dataChannel = dataChannel;\\n this._sctpStreamParameters = sctpStreamParameters;\\n this._appData = appData;\\n this._handleDataChannel();\\n }\\n /**\\n * DataConsumer id.\\n */\\n get id() {\\n return this._id;\\n }\\n /**\\n * Associated DataProducer id.\\n */\\n get dataProducerId() {\\n return this._dataProducerId;\\n }\\n /**\\n * Whether the DataConsumer is closed.\\n */\\n get closed() {\\n return this._closed;\\n }\\n /**\\n * SCTP stream parameters.\\n */\\n get sctpStreamParameters() {\\n return this._sctpStreamParameters;\\n }\\n /**\\n * DataChannel readyState.\\n */\\n get readyState() {\\n return this._dataChannel.readyState;\\n }\\n /**\\n * DataChannel label.\\n */\\n get label() {\\n return this._dataChannel.label;\\n }\\n /**\\n * DataChannel protocol.\\n */\\n get protocol() {\\n return this._dataChannel.protocol;\\n }\\n /**\\n * DataChannel binaryType.\\n */\\n get binaryType() {\\n return this._dataChannel.binaryType;\\n }\\n /**\\n * Set DataChannel binaryType.\\n */\\n set binaryType(binaryType) {\\n this._dataChannel.binaryType = binaryType;\\n }\\n /**\\n * App custom data.\\n */\\n get appData() {\\n return this._appData;\\n }\\n /**\\n * Invalid setter.\\n */\\n set appData(appData) {\\n throw new Error('cannot override appData object');\\n }\\n /**\\n * Observer.\\n *\\n * @emits close\\n */\\n get observer() {\\n return this._observer;\\n }\\n /**\\n * Closes the DataConsumer.\\n */\\n close() {\\n if (this._closed)\\n return;\\n logger.debug('close()');\\n this._closed = true;\\n this._dataChannel.close();\\n this.emit('@close');\\n // Emit observer event.\\n this._observer.safeEmit('close');\\n }\\n /**\\n * Transport was closed.\\n */\\n transportClosed() {\\n if (this._closed)\\n return;\\n logger.debug('transportClosed()');\\n this._closed = true;\\n this._dataChannel.close();\\n this.safeEmit('transportclose');\\n // Emit observer event.\\n this._observer.safeEmit('close');\\n }\\n _handleDataChannel() {\\n this._dataChannel.addEventListener('open', () => {\\n if (this._closed)\\n return;\\n logger.debug('DataChannel \\\"open\\\" event');\\n this.safeEmit('open');\\n });\\n this._dataChannel.addEventListener('error', (event) => {\\n if (this._closed)\\n return;\\n let { error } = event;\\n if (!error)\\n error = new Error('unknown DataChannel error');\\n if (error.errorDetail === 'sctp-failure') {\\n logger.error('DataChannel SCTP error [sctpCauseCode:%s]: %s', error.sctpCauseCode, error.message);\\n }\\n else {\\n logger.error('DataChannel \\\"error\\\" event: %o', error);\\n }\\n this.safeEmit('error', error);\\n });\\n this._dataChannel.addEventListener('close', () => {\\n if (this._closed)\\n return;\\n logger.warn('DataChannel \\\"close\\\" event');\\n this._closed = true;\\n this.emit('@close');\\n this.safeEmit('close');\\n });\\n this._dataChannel.addEventListener('message', (event) => {\\n if (this._closed)\\n return;\\n this.safeEmit('message', event.data);\\n });\\n }\\n}\\nexports.DataConsumer = DataConsumer;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/DataConsumer.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/DataProducer.js\":\n/*!***********************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/DataProducer.js ***!\n \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.DataProducer = void 0;\\nconst Logger_1 = __webpack_require__(/*! ./Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst EnhancedEventEmitter_1 = __webpack_require__(/*! ./EnhancedEventEmitter */ \\\"./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js\\\");\\nconst errors_1 = __webpack_require__(/*! ./errors */ \\\"./node_modules/mediasoup-client/lib/errors.js\\\");\\nconst logger = new Logger_1.Logger('DataProducer');\\nclass DataProducer extends EnhancedEventEmitter_1.EnhancedEventEmitter {\\n /**\\n * @emits transportclose\\n * @emits open\\n * @emits error - (error: Error)\\n * @emits close\\n * @emits bufferedamountlow\\n * @emits @close\\n */\\n constructor({ id, dataChannel, sctpStreamParameters, appData }) {\\n super();\\n // Closed flag.\\n this._closed = false;\\n // Observer instance.\\n this._observer = new EnhancedEventEmitter_1.EnhancedEventEmitter();\\n logger.debug('constructor()');\\n this._id = id;\\n this._dataChannel = dataChannel;\\n this._sctpStreamParameters = sctpStreamParameters;\\n this._appData = appData;\\n this._handleDataChannel();\\n }\\n /**\\n * DataProducer id.\\n */\\n get id() {\\n return this._id;\\n }\\n /**\\n * Whether the DataProducer is closed.\\n */\\n get closed() {\\n return this._closed;\\n }\\n /**\\n * SCTP stream parameters.\\n */\\n get sctpStreamParameters() {\\n return this._sctpStreamParameters;\\n }\\n /**\\n * DataChannel readyState.\\n */\\n get readyState() {\\n return this._dataChannel.readyState;\\n }\\n /**\\n * DataChannel label.\\n */\\n get label() {\\n return this._dataChannel.label;\\n }\\n /**\\n * DataChannel protocol.\\n */\\n get protocol() {\\n return this._dataChannel.protocol;\\n }\\n /**\\n * DataChannel bufferedAmount.\\n */\\n get bufferedAmount() {\\n return this._dataChannel.bufferedAmount;\\n }\\n /**\\n * DataChannel bufferedAmountLowThreshold.\\n */\\n get bufferedAmountLowThreshold() {\\n return this._dataChannel.bufferedAmountLowThreshold;\\n }\\n /**\\n * Set DataChannel bufferedAmountLowThreshold.\\n */\\n set bufferedAmountLowThreshold(bufferedAmountLowThreshold) {\\n this._dataChannel.bufferedAmountLowThreshold = bufferedAmountLowThreshold;\\n }\\n /**\\n * App custom data.\\n */\\n get appData() {\\n return this._appData;\\n }\\n /**\\n * Invalid setter.\\n */\\n set appData(appData) {\\n throw new Error('cannot override appData object');\\n }\\n /**\\n * Observer.\\n *\\n * @emits close\\n */\\n get observer() {\\n return this._observer;\\n }\\n /**\\n * Closes the DataProducer.\\n */\\n close() {\\n if (this._closed)\\n return;\\n logger.debug('close()');\\n this._closed = true;\\n this._dataChannel.close();\\n this.emit('@close');\\n // Emit observer event.\\n this._observer.safeEmit('close');\\n }\\n /**\\n * Transport was closed.\\n */\\n transportClosed() {\\n if (this._closed)\\n return;\\n logger.debug('transportClosed()');\\n this._closed = true;\\n this._dataChannel.close();\\n this.safeEmit('transportclose');\\n // Emit observer event.\\n this._observer.safeEmit('close');\\n }\\n /**\\n * Send a message.\\n *\\n * @param {String|Blob|ArrayBuffer|ArrayBufferView} data.\\n */\\n send(data) {\\n logger.debug('send()');\\n if (this._closed)\\n throw new errors_1.InvalidStateError('closed');\\n this._dataChannel.send(data);\\n }\\n _handleDataChannel() {\\n this._dataChannel.addEventListener('open', () => {\\n if (this._closed)\\n return;\\n logger.debug('DataChannel \\\"open\\\" event');\\n this.safeEmit('open');\\n });\\n this._dataChannel.addEventListener('error', (event) => {\\n if (this._closed)\\n return;\\n let { error } = event;\\n if (!error)\\n error = new Error('unknown DataChannel error');\\n if (error.errorDetail === 'sctp-failure') {\\n logger.error('DataChannel SCTP error [sctpCauseCode:%s]: %s', error.sctpCauseCode, error.message);\\n }\\n else {\\n logger.error('DataChannel \\\"error\\\" event: %o', error);\\n }\\n this.safeEmit('error', error);\\n });\\n this._dataChannel.addEventListener('close', () => {\\n if (this._closed)\\n return;\\n logger.warn('DataChannel \\\"close\\\" event');\\n this._closed = true;\\n this.emit('@close');\\n this.safeEmit('close');\\n });\\n this._dataChannel.addEventListener('message', () => {\\n if (this._closed)\\n return;\\n logger.warn('DataChannel \\\"message\\\" event in a DataProducer, message discarded');\\n });\\n this._dataChannel.addEventListener('bufferedamountlow', () => {\\n if (this._closed)\\n return;\\n this.safeEmit('bufferedamountlow');\\n });\\n }\\n}\\nexports.DataProducer = DataProducer;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/DataProducer.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/Device.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/Device.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n/* global RTCRtpTransceiver */\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nvar __importDefault = (this && this.__importDefault) || function (mod) {\\n return (mod && mod.__esModule) ? mod : { \\\"default\\\": mod };\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Device = exports.detectDevice = void 0;\\nconst bowser_1 = __importDefault(__webpack_require__(/*! bowser */ \\\"./node_modules/bowser/es5.js\\\"));\\nconst Logger_1 = __webpack_require__(/*! ./Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst EnhancedEventEmitter_1 = __webpack_require__(/*! ./EnhancedEventEmitter */ \\\"./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js\\\");\\nconst errors_1 = __webpack_require__(/*! ./errors */ \\\"./node_modules/mediasoup-client/lib/errors.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ./utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ./ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst Transport_1 = __webpack_require__(/*! ./Transport */ \\\"./node_modules/mediasoup-client/lib/Transport.js\\\");\\nconst Chrome74_1 = __webpack_require__(/*! ./handlers/Chrome74 */ \\\"./node_modules/mediasoup-client/lib/handlers/Chrome74.js\\\");\\nconst Chrome70_1 = __webpack_require__(/*! ./handlers/Chrome70 */ \\\"./node_modules/mediasoup-client/lib/handlers/Chrome70.js\\\");\\nconst Chrome67_1 = __webpack_require__(/*! ./handlers/Chrome67 */ \\\"./node_modules/mediasoup-client/lib/handlers/Chrome67.js\\\");\\nconst Chrome55_1 = __webpack_require__(/*! ./handlers/Chrome55 */ \\\"./node_modules/mediasoup-client/lib/handlers/Chrome55.js\\\");\\nconst Firefox60_1 = __webpack_require__(/*! ./handlers/Firefox60 */ \\\"./node_modules/mediasoup-client/lib/handlers/Firefox60.js\\\");\\nconst Safari12_1 = __webpack_require__(/*! ./handlers/Safari12 */ \\\"./node_modules/mediasoup-client/lib/handlers/Safari12.js\\\");\\nconst Safari11_1 = __webpack_require__(/*! ./handlers/Safari11 */ \\\"./node_modules/mediasoup-client/lib/handlers/Safari11.js\\\");\\nconst Edge11_1 = __webpack_require__(/*! ./handlers/Edge11 */ \\\"./node_modules/mediasoup-client/lib/handlers/Edge11.js\\\");\\nconst ReactNative_1 = __webpack_require__(/*! ./handlers/ReactNative */ \\\"./node_modules/mediasoup-client/lib/handlers/ReactNative.js\\\");\\nconst logger = new Logger_1.Logger('Device');\\nfunction detectDevice() {\\n // React-Native.\\n // NOTE: react-native-webrtc >= 1.75.0 is required.\\n if (typeof navigator === 'object' && navigator.product === 'ReactNative') {\\n if (typeof RTCPeerConnection === 'undefined') {\\n logger.warn('this._detectDevice() | unsupported ReactNative without RTCPeerConnection');\\n return undefined;\\n }\\n logger.debug('this._detectDevice() | ReactNative handler chosen');\\n return 'ReactNative';\\n }\\n // Browser.\\n else if (typeof navigator === 'object' && typeof navigator.userAgent === 'string') {\\n const ua = navigator.userAgent;\\n const browser = bowser_1.default.getParser(ua);\\n const engine = browser.getEngine();\\n // Chrome, Chromium, and Edge.\\n if (browser.satisfies({ chrome: '>=74', chromium: '>=74', 'microsoft edge': '>=88' })) {\\n return 'Chrome74';\\n }\\n else if (browser.satisfies({ chrome: '>=70', chromium: '>=70' })) {\\n return 'Chrome70';\\n }\\n else if (browser.satisfies({ chrome: '>=67', chromium: '>=67' })) {\\n return 'Chrome67';\\n }\\n else if (browser.satisfies({ chrome: '>=55', chromium: '>=55' })) {\\n return 'Chrome55';\\n }\\n // Firefox.\\n else if (browser.satisfies({ firefox: '>=60' })) {\\n return 'Firefox60';\\n }\\n // Firefox on iOS.\\n else if (browser.satisfies({ ios: { OS: '>=14.3', firefox: '>=30.0' } })) {\\n return 'Safari12';\\n }\\n // Safari with Unified-Plan support enabled.\\n else if (browser.satisfies({ safari: '>=12.0' }) &&\\n typeof RTCRtpTransceiver !== 'undefined' &&\\n RTCRtpTransceiver.prototype.hasOwnProperty('currentDirection')) {\\n return 'Safari12';\\n }\\n // Safari with Plab-B support.\\n else if (browser.satisfies({ safari: '>=11' })) {\\n return 'Safari11';\\n }\\n // Old Edge with ORTC support.\\n else if (browser.satisfies({ 'microsoft edge': '>=11' }) &&\\n browser.satisfies({ 'microsoft edge': '<=18' })) {\\n return 'Edge11';\\n }\\n // Best effort for Chromium based browsers.\\n else if (engine.name && engine.name.toLowerCase() === 'blink') {\\n const match = ua.match(/(?:(?:Chrome|Chromium))[ /](\\\\w+)/i);\\n if (match) {\\n const version = Number(match[1]);\\n if (version >= 74) {\\n return 'Chrome74';\\n }\\n else if (version >= 70) {\\n return 'Chrome70';\\n }\\n else if (version >= 67) {\\n return 'Chrome67';\\n }\\n else {\\n return 'Chrome55';\\n }\\n }\\n else {\\n return 'Chrome74';\\n }\\n }\\n // Unsupported browser.\\n else {\\n logger.warn('this._detectDevice() | browser not supported [name:%s, version:%s]', browser.getBrowserName(), browser.getBrowserVersion());\\n return undefined;\\n }\\n }\\n // Unknown device.\\n else {\\n logger.warn('this._detectDevice() | unknown device');\\n return undefined;\\n }\\n}\\nexports.detectDevice = detectDevice;\\nclass Device {\\n /**\\n * Create a new Device to connect to mediasoup server.\\n *\\n * @throws {UnsupportedError} if device is not supported.\\n */\\n constructor({ handlerName, handlerFactory, Handler } = {}) {\\n // Loaded flag.\\n this._loaded = false;\\n // Observer instance.\\n this._observer = new EnhancedEventEmitter_1.EnhancedEventEmitter();\\n logger.debug('constructor()');\\n // Handle deprecated option.\\n if (Handler) {\\n logger.warn('constructor() | Handler option is DEPRECATED, use handlerName or handlerFactory instead');\\n if (typeof Handler === 'string')\\n handlerName = Handler;\\n else\\n throw new TypeError('non string Handler option no longer supported, use handlerFactory instead');\\n }\\n if (handlerName && handlerFactory) {\\n throw new TypeError('just one of handlerName or handlerInterface can be given');\\n }\\n if (handlerFactory) {\\n this._handlerFactory = handlerFactory;\\n }\\n else {\\n if (handlerName) {\\n logger.debug('constructor() | handler given: %s', handlerName);\\n }\\n else {\\n handlerName = detectDevice();\\n if (handlerName)\\n logger.debug('constructor() | detected handler: %s', handlerName);\\n else\\n throw new errors_1.UnsupportedError('device not supported');\\n }\\n switch (handlerName) {\\n case 'Chrome74':\\n this._handlerFactory = Chrome74_1.Chrome74.createFactory();\\n break;\\n case 'Chrome70':\\n this._handlerFactory = Chrome70_1.Chrome70.createFactory();\\n break;\\n case 'Chrome67':\\n this._handlerFactory = Chrome67_1.Chrome67.createFactory();\\n break;\\n case 'Chrome55':\\n this._handlerFactory = Chrome55_1.Chrome55.createFactory();\\n break;\\n case 'Firefox60':\\n this._handlerFactory = Firefox60_1.Firefox60.createFactory();\\n break;\\n case 'Safari12':\\n this._handlerFactory = Safari12_1.Safari12.createFactory();\\n break;\\n case 'Safari11':\\n this._handlerFactory = Safari11_1.Safari11.createFactory();\\n break;\\n case 'Edge11':\\n this._handlerFactory = Edge11_1.Edge11.createFactory();\\n break;\\n case 'ReactNative':\\n this._handlerFactory = ReactNative_1.ReactNative.createFactory();\\n break;\\n default:\\n throw new TypeError(`unknown handlerName \\\"${handlerName}\\\"`);\\n }\\n }\\n // Create a temporal handler to get its name.\\n const handler = this._handlerFactory();\\n this._handlerName = handler.name;\\n handler.close();\\n this._extendedRtpCapabilities = undefined;\\n this._recvRtpCapabilities = undefined;\\n this._canProduceByKind =\\n {\\n audio: false,\\n video: false\\n };\\n this._sctpCapabilities = undefined;\\n }\\n /**\\n * The RTC handler name.\\n */\\n get handlerName() {\\n return this._handlerName;\\n }\\n /**\\n * Whether the Device is loaded.\\n */\\n get loaded() {\\n return this._loaded;\\n }\\n /**\\n * RTP capabilities of the Device for receiving media.\\n *\\n * @throws {InvalidStateError} if not loaded.\\n */\\n get rtpCapabilities() {\\n if (!this._loaded)\\n throw new errors_1.InvalidStateError('not loaded');\\n return this._recvRtpCapabilities;\\n }\\n /**\\n * SCTP capabilities of the Device.\\n *\\n * @throws {InvalidStateError} if not loaded.\\n */\\n get sctpCapabilities() {\\n if (!this._loaded)\\n throw new errors_1.InvalidStateError('not loaded');\\n return this._sctpCapabilities;\\n }\\n /**\\n * Observer.\\n *\\n * @emits newtransport - (transport: Transport)\\n */\\n get observer() {\\n return this._observer;\\n }\\n /**\\n * Initialize the Device.\\n */\\n async load({ routerRtpCapabilities }) {\\n logger.debug('load() [routerRtpCapabilities:%o]', routerRtpCapabilities);\\n routerRtpCapabilities = utils.clone(routerRtpCapabilities, undefined);\\n // Temporal handler to get its capabilities.\\n let handler;\\n try {\\n if (this._loaded)\\n throw new errors_1.InvalidStateError('already loaded');\\n // This may throw.\\n ortc.validateRtpCapabilities(routerRtpCapabilities);\\n handler = this._handlerFactory();\\n const nativeRtpCapabilities = await handler.getNativeRtpCapabilities();\\n logger.debug('load() | got native RTP capabilities:%o', nativeRtpCapabilities);\\n // This may throw.\\n ortc.validateRtpCapabilities(nativeRtpCapabilities);\\n // Get extended RTP capabilities.\\n this._extendedRtpCapabilities = ortc.getExtendedRtpCapabilities(nativeRtpCapabilities, routerRtpCapabilities);\\n logger.debug('load() | got extended RTP capabilities:%o', this._extendedRtpCapabilities);\\n // Check whether we can produce audio/video.\\n this._canProduceByKind.audio =\\n ortc.canSend('audio', this._extendedRtpCapabilities);\\n this._canProduceByKind.video =\\n ortc.canSend('video', this._extendedRtpCapabilities);\\n // Generate our receiving RTP capabilities for receiving media.\\n this._recvRtpCapabilities =\\n ortc.getRecvRtpCapabilities(this._extendedRtpCapabilities);\\n // This may throw.\\n ortc.validateRtpCapabilities(this._recvRtpCapabilities);\\n logger.debug('load() | got receiving RTP capabilities:%o', this._recvRtpCapabilities);\\n // Generate our SCTP capabilities.\\n this._sctpCapabilities = await handler.getNativeSctpCapabilities();\\n logger.debug('load() | got native SCTP capabilities:%o', this._sctpCapabilities);\\n // This may throw.\\n ortc.validateSctpCapabilities(this._sctpCapabilities);\\n logger.debug('load() succeeded');\\n this._loaded = true;\\n handler.close();\\n }\\n catch (error) {\\n if (handler)\\n handler.close();\\n throw error;\\n }\\n }\\n /**\\n * Whether we can produce audio/video.\\n *\\n * @throws {InvalidStateError} if not loaded.\\n * @throws {TypeError} if wrong arguments.\\n */\\n canProduce(kind) {\\n if (!this._loaded)\\n throw new errors_1.InvalidStateError('not loaded');\\n else if (kind !== 'audio' && kind !== 'video')\\n throw new TypeError(`invalid kind \\\"${kind}\\\"`);\\n return this._canProduceByKind[kind];\\n }\\n /**\\n * Creates a Transport for sending media.\\n *\\n * @throws {InvalidStateError} if not loaded.\\n * @throws {TypeError} if wrong arguments.\\n */\\n createSendTransport({ id, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, appData = {} }) {\\n logger.debug('createSendTransport()');\\n return this._createTransport({\\n direction: 'send',\\n id: id,\\n iceParameters: iceParameters,\\n iceCandidates: iceCandidates,\\n dtlsParameters: dtlsParameters,\\n sctpParameters: sctpParameters,\\n iceServers: iceServers,\\n iceTransportPolicy: iceTransportPolicy,\\n additionalSettings: additionalSettings,\\n proprietaryConstraints: proprietaryConstraints,\\n appData: appData\\n });\\n }\\n /**\\n * Creates a Transport for receiving media.\\n *\\n * @throws {InvalidStateError} if not loaded.\\n * @throws {TypeError} if wrong arguments.\\n */\\n createRecvTransport({ id, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, appData = {} }) {\\n logger.debug('createRecvTransport()');\\n return this._createTransport({\\n direction: 'recv',\\n id: id,\\n iceParameters: iceParameters,\\n iceCandidates: iceCandidates,\\n dtlsParameters: dtlsParameters,\\n sctpParameters: sctpParameters,\\n iceServers: iceServers,\\n iceTransportPolicy: iceTransportPolicy,\\n additionalSettings: additionalSettings,\\n proprietaryConstraints: proprietaryConstraints,\\n appData: appData\\n });\\n }\\n _createTransport({ direction, id, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, appData = {} }) {\\n if (!this._loaded)\\n throw new errors_1.InvalidStateError('not loaded');\\n else if (typeof id !== 'string')\\n throw new TypeError('missing id');\\n else if (typeof iceParameters !== 'object')\\n throw new TypeError('missing iceParameters');\\n else if (!Array.isArray(iceCandidates))\\n throw new TypeError('missing iceCandidates');\\n else if (typeof dtlsParameters !== 'object')\\n throw new TypeError('missing dtlsParameters');\\n else if (sctpParameters && typeof sctpParameters !== 'object')\\n throw new TypeError('wrong sctpParameters');\\n else if (appData && typeof appData !== 'object')\\n throw new TypeError('if given, appData must be an object');\\n // Create a new Transport.\\n const transport = new Transport_1.Transport({\\n direction,\\n id,\\n iceParameters,\\n iceCandidates,\\n dtlsParameters,\\n sctpParameters,\\n iceServers,\\n iceTransportPolicy,\\n additionalSettings,\\n proprietaryConstraints,\\n appData,\\n handlerFactory: this._handlerFactory,\\n extendedRtpCapabilities: this._extendedRtpCapabilities,\\n canProduceByKind: this._canProduceByKind\\n });\\n // Emit observer event.\\n this._observer.safeEmit('newtransport', transport);\\n return transport;\\n }\\n}\\nexports.Device = Device;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/Device.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js\":\n/*!*******************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js ***!\n \\*******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.EnhancedEventEmitter = void 0;\\nconst events_1 = __webpack_require__(/*! events */ \\\"./node_modules/events/events.js\\\");\\nconst Logger_1 = __webpack_require__(/*! ./Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst logger = new Logger_1.Logger('EnhancedEventEmitter');\\nclass EnhancedEventEmitter extends events_1.EventEmitter {\\n constructor() {\\n super();\\n this.setMaxListeners(Infinity);\\n }\\n safeEmit(event, ...args) {\\n const numListeners = this.listenerCount(event);\\n try {\\n return this.emit(event, ...args);\\n }\\n catch (error) {\\n logger.error('safeEmit() | event listener threw an error [event:%s]:%o', event, error);\\n return Boolean(numListeners);\\n }\\n }\\n async safeEmitAsPromise(event, ...args) {\\n return new Promise((resolve, reject) => {\\n try {\\n this.emit(event, ...args, resolve, reject);\\n }\\n catch (error) {\\n logger.error('safeEmitAsPromise() | event listener threw an error [event:%s]:%o', event, error);\\n reject(error);\\n }\\n });\\n }\\n}\\nexports.EnhancedEventEmitter = EnhancedEventEmitter;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/Logger.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/Logger.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __importDefault = (this && this.__importDefault) || function (mod) {\\n return (mod && mod.__esModule) ? mod : { \\\"default\\\": mod };\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Logger = void 0;\\nconst debug_1 = __importDefault(__webpack_require__(/*! debug */ \\\"./node_modules/debug/src/browser.js\\\"));\\nconst APP_NAME = 'mediasoup-client';\\nclass Logger {\\n constructor(prefix) {\\n if (prefix) {\\n this._debug = (0, debug_1.default)(`${APP_NAME}:${prefix}`);\\n this._warn = (0, debug_1.default)(`${APP_NAME}:WARN:${prefix}`);\\n this._error = (0, debug_1.default)(`${APP_NAME}:ERROR:${prefix}`);\\n }\\n else {\\n this._debug = (0, debug_1.default)(APP_NAME);\\n this._warn = (0, debug_1.default)(`${APP_NAME}:WARN`);\\n this._error = (0, debug_1.default)(`${APP_NAME}:ERROR`);\\n }\\n /* eslint-disable no-console */\\n this._debug.log = console.info.bind(console);\\n this._warn.log = console.warn.bind(console);\\n this._error.log = console.error.bind(console);\\n /* eslint-enable no-console */\\n }\\n get debug() {\\n return this._debug;\\n }\\n get warn() {\\n return this._warn;\\n }\\n get error() {\\n return this._error;\\n }\\n}\\nexports.Logger = Logger;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/Logger.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/Producer.js\":\n/*!*******************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/Producer.js ***!\n \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Producer = void 0;\\nconst Logger_1 = __webpack_require__(/*! ./Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst EnhancedEventEmitter_1 = __webpack_require__(/*! ./EnhancedEventEmitter */ \\\"./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js\\\");\\nconst errors_1 = __webpack_require__(/*! ./errors */ \\\"./node_modules/mediasoup-client/lib/errors.js\\\");\\nconst logger = new Logger_1.Logger('Producer');\\nclass Producer extends EnhancedEventEmitter_1.EnhancedEventEmitter {\\n /**\\n * @emits transportclose\\n * @emits trackended\\n * @emits @replacetrack - (track: MediaStreamTrack | null)\\n * @emits @setmaxspatiallayer - (spatialLayer: string)\\n * @emits @setrtpencodingparameters - (params: any)\\n * @emits @getstats\\n * @emits @close\\n */\\n constructor({ id, localId, rtpSender, track, rtpParameters, stopTracks, disableTrackOnPause, zeroRtpOnPause, appData }) {\\n super();\\n // Closed flag.\\n this._closed = false;\\n // Observer instance.\\n this._observer = new EnhancedEventEmitter_1.EnhancedEventEmitter();\\n logger.debug('constructor()');\\n this._id = id;\\n this._localId = localId;\\n this._rtpSender = rtpSender;\\n this._track = track;\\n this._kind = track.kind;\\n this._rtpParameters = rtpParameters;\\n this._paused = disableTrackOnPause ? !track.enabled : false;\\n this._maxSpatialLayer = undefined;\\n this._stopTracks = stopTracks;\\n this._disableTrackOnPause = disableTrackOnPause;\\n this._zeroRtpOnPause = zeroRtpOnPause;\\n this._appData = appData;\\n this._onTrackEnded = this._onTrackEnded.bind(this);\\n // NOTE: Minor issue. If zeroRtpOnPause is true, we cannot emit the\\n // '@replacetrack' event here, so RTCRtpSender.track won't be null.\\n this._handleTrack();\\n }\\n /**\\n * Producer id.\\n */\\n get id() {\\n return this._id;\\n }\\n /**\\n * Local id.\\n */\\n get localId() {\\n return this._localId;\\n }\\n /**\\n * Whether the Producer is closed.\\n */\\n get closed() {\\n return this._closed;\\n }\\n /**\\n * Media kind.\\n */\\n get kind() {\\n return this._kind;\\n }\\n /**\\n * Associated RTCRtpSender.\\n */\\n get rtpSender() {\\n return this._rtpSender;\\n }\\n /**\\n * The associated track.\\n */\\n get track() {\\n return this._track;\\n }\\n /**\\n * RTP parameters.\\n */\\n get rtpParameters() {\\n return this._rtpParameters;\\n }\\n /**\\n * Whether the Producer is paused.\\n */\\n get paused() {\\n return this._paused;\\n }\\n /**\\n * Max spatial layer.\\n *\\n * @type {Number | undefined}\\n */\\n get maxSpatialLayer() {\\n return this._maxSpatialLayer;\\n }\\n /**\\n * App custom data.\\n */\\n get appData() {\\n return this._appData;\\n }\\n /**\\n * Invalid setter.\\n */\\n set appData(appData) {\\n throw new Error('cannot override appData object');\\n }\\n /**\\n * Observer.\\n *\\n * @emits close\\n * @emits pause\\n * @emits resume\\n * @emits trackended\\n */\\n get observer() {\\n return this._observer;\\n }\\n /**\\n * Closes the Producer.\\n */\\n close() {\\n if (this._closed)\\n return;\\n logger.debug('close()');\\n this._closed = true;\\n this._destroyTrack();\\n this.emit('@close');\\n // Emit observer event.\\n this._observer.safeEmit('close');\\n }\\n /**\\n * Transport was closed.\\n */\\n transportClosed() {\\n if (this._closed)\\n return;\\n logger.debug('transportClosed()');\\n this._closed = true;\\n this._destroyTrack();\\n this.safeEmit('transportclose');\\n // Emit observer event.\\n this._observer.safeEmit('close');\\n }\\n /**\\n * Get associated RTCRtpSender stats.\\n */\\n async getStats() {\\n if (this._closed)\\n throw new errors_1.InvalidStateError('closed');\\n return this.safeEmitAsPromise('@getstats');\\n }\\n /**\\n * Pauses sending media.\\n */\\n pause() {\\n logger.debug('pause()');\\n if (this._closed) {\\n logger.error('pause() | Producer closed');\\n return;\\n }\\n this._paused = true;\\n if (this._track && this._disableTrackOnPause) {\\n this._track.enabled = false;\\n }\\n if (this._zeroRtpOnPause) {\\n this.safeEmitAsPromise('@replacetrack', null)\\n .catch(() => { });\\n }\\n // Emit observer event.\\n this._observer.safeEmit('pause');\\n }\\n /**\\n * Resumes sending media.\\n */\\n resume() {\\n logger.debug('resume()');\\n if (this._closed) {\\n logger.error('resume() | Producer closed');\\n return;\\n }\\n this._paused = false;\\n if (this._track && this._disableTrackOnPause) {\\n this._track.enabled = true;\\n }\\n if (this._zeroRtpOnPause) {\\n this.safeEmitAsPromise('@replacetrack', this._track)\\n .catch(() => { });\\n }\\n // Emit observer event.\\n this._observer.safeEmit('resume');\\n }\\n /**\\n * Replaces the current track with a new one or null.\\n */\\n async replaceTrack({ track }) {\\n logger.debug('replaceTrack() [track:%o]', track);\\n if (this._closed) {\\n // This must be done here. Otherwise there is no chance to stop the given\\n // track.\\n if (track && this._stopTracks) {\\n try {\\n track.stop();\\n }\\n catch (error) { }\\n }\\n throw new errors_1.InvalidStateError('closed');\\n }\\n else if (track && track.readyState === 'ended') {\\n throw new errors_1.InvalidStateError('track ended');\\n }\\n // Do nothing if this is the same track as the current handled one.\\n if (track === this._track) {\\n logger.debug('replaceTrack() | same track, ignored');\\n return;\\n }\\n if (!this._zeroRtpOnPause || !this._paused) {\\n await this.safeEmitAsPromise('@replacetrack', track);\\n }\\n // Destroy the previous track.\\n this._destroyTrack();\\n // Set the new track.\\n this._track = track;\\n // If this Producer was paused/resumed and the state of the new\\n // track does not match, fix it.\\n if (this._track && this._disableTrackOnPause) {\\n if (!this._paused)\\n this._track.enabled = true;\\n else if (this._paused)\\n this._track.enabled = false;\\n }\\n // Handle the effective track.\\n this._handleTrack();\\n }\\n /**\\n * Sets the video max spatial layer to be sent.\\n */\\n async setMaxSpatialLayer(spatialLayer) {\\n if (this._closed)\\n throw new errors_1.InvalidStateError('closed');\\n else if (this._kind !== 'video')\\n throw new errors_1.UnsupportedError('not a video Producer');\\n else if (typeof spatialLayer !== 'number')\\n throw new TypeError('invalid spatialLayer');\\n if (spatialLayer === this._maxSpatialLayer)\\n return;\\n await this.safeEmitAsPromise('@setmaxspatiallayer', spatialLayer);\\n this._maxSpatialLayer = spatialLayer;\\n }\\n /**\\n * Sets the DSCP value.\\n */\\n async setRtpEncodingParameters(params) {\\n if (this._closed)\\n throw new errors_1.InvalidStateError('closed');\\n else if (typeof params !== 'object')\\n throw new TypeError('invalid params');\\n await this.safeEmitAsPromise('@setrtpencodingparameters', params);\\n }\\n _onTrackEnded() {\\n logger.debug('track \\\"ended\\\" event');\\n this.safeEmit('trackended');\\n // Emit observer event.\\n this._observer.safeEmit('trackended');\\n }\\n _handleTrack() {\\n if (!this._track)\\n return;\\n this._track.addEventListener('ended', this._onTrackEnded);\\n }\\n _destroyTrack() {\\n if (!this._track)\\n return;\\n try {\\n this._track.removeEventListener('ended', this._onTrackEnded);\\n // Just stop the track unless the app set stopTracks: false.\\n if (this._stopTracks)\\n this._track.stop();\\n }\\n catch (error) { }\\n }\\n}\\nexports.Producer = Producer;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/Producer.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/RtpParameters.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/RtpParameters.js ***!\n \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n/**\\n * The RTP capabilities define what mediasoup or an endpoint can receive at\\n * media level.\\n */\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/RtpParameters.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/SctpParameters.js\":\n/*!*************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/SctpParameters.js ***!\n \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/SctpParameters.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/Transport.js\":\n/*!********************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/Transport.js ***!\n \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Transport = void 0;\\nconst awaitqueue_1 = __webpack_require__(/*! awaitqueue */ \\\"./node_modules/awaitqueue/lib/index.js\\\");\\nconst Logger_1 = __webpack_require__(/*! ./Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst EnhancedEventEmitter_1 = __webpack_require__(/*! ./EnhancedEventEmitter */ \\\"./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js\\\");\\nconst errors_1 = __webpack_require__(/*! ./errors */ \\\"./node_modules/mediasoup-client/lib/errors.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ./utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ./ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst Producer_1 = __webpack_require__(/*! ./Producer */ \\\"./node_modules/mediasoup-client/lib/Producer.js\\\");\\nconst Consumer_1 = __webpack_require__(/*! ./Consumer */ \\\"./node_modules/mediasoup-client/lib/Consumer.js\\\");\\nconst DataProducer_1 = __webpack_require__(/*! ./DataProducer */ \\\"./node_modules/mediasoup-client/lib/DataProducer.js\\\");\\nconst DataConsumer_1 = __webpack_require__(/*! ./DataConsumer */ \\\"./node_modules/mediasoup-client/lib/DataConsumer.js\\\");\\nconst logger = new Logger_1.Logger('Transport');\\nclass Transport extends EnhancedEventEmitter_1.EnhancedEventEmitter {\\n /**\\n * @emits connect - (transportLocalParameters: any, callback: Function, errback: Function)\\n * @emits connectionstatechange - (connectionState: ConnectionState)\\n * @emits produce - (producerLocalParameters: any, callback: Function, errback: Function)\\n * @emits producedata - (dataProducerLocalParameters: any, callback: Function, errback: Function)\\n */\\n constructor({ direction, id, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, appData, handlerFactory, extendedRtpCapabilities, canProduceByKind }) {\\n super();\\n // Closed flag.\\n this._closed = false;\\n // Transport connection state.\\n this._connectionState = 'new';\\n // Map of Producers indexed by id.\\n this._producers = new Map();\\n // Map of Consumers indexed by id.\\n this._consumers = new Map();\\n // Map of DataProducers indexed by id.\\n this._dataProducers = new Map();\\n // Map of DataConsumers indexed by id.\\n this._dataConsumers = new Map();\\n // Whether the Consumer for RTP probation has been created.\\n this._probatorConsumerCreated = false;\\n // AwaitQueue instance to make async tasks happen sequentially.\\n this._awaitQueue = new awaitqueue_1.AwaitQueue({ ClosedErrorClass: errors_1.InvalidStateError });\\n // Observer instance.\\n this._observer = new EnhancedEventEmitter_1.EnhancedEventEmitter();\\n logger.debug('constructor() [id:%s, direction:%s]', id, direction);\\n this._id = id;\\n this._direction = direction;\\n this._extendedRtpCapabilities = extendedRtpCapabilities;\\n this._canProduceByKind = canProduceByKind;\\n this._maxSctpMessageSize =\\n sctpParameters ? sctpParameters.maxMessageSize : null;\\n // Clone and sanitize additionalSettings.\\n additionalSettings = utils.clone(additionalSettings, {});\\n delete additionalSettings.iceServers;\\n delete additionalSettings.iceTransportPolicy;\\n delete additionalSettings.bundlePolicy;\\n delete additionalSettings.rtcpMuxPolicy;\\n delete additionalSettings.sdpSemantics;\\n this._handler = handlerFactory();\\n this._handler.run({\\n direction,\\n iceParameters,\\n iceCandidates,\\n dtlsParameters,\\n sctpParameters,\\n iceServers,\\n iceTransportPolicy,\\n additionalSettings,\\n proprietaryConstraints,\\n extendedRtpCapabilities\\n });\\n this._appData = appData;\\n this._handleHandler();\\n }\\n /**\\n * Transport id.\\n */\\n get id() {\\n return this._id;\\n }\\n /**\\n * Whether the Transport is closed.\\n */\\n get closed() {\\n return this._closed;\\n }\\n /**\\n * Transport direction.\\n */\\n get direction() {\\n return this._direction;\\n }\\n /**\\n * RTC handler instance.\\n */\\n get handler() {\\n return this._handler;\\n }\\n /**\\n * Connection state.\\n */\\n get connectionState() {\\n return this._connectionState;\\n }\\n /**\\n * App custom data.\\n */\\n get appData() {\\n return this._appData;\\n }\\n /**\\n * Invalid setter.\\n */\\n set appData(appData) {\\n throw new Error('cannot override appData object');\\n }\\n /**\\n * Observer.\\n *\\n * @emits close\\n * @emits newproducer - (producer: Producer)\\n * @emits newconsumer - (producer: Producer)\\n * @emits newdataproducer - (dataProducer: DataProducer)\\n * @emits newdataconsumer - (dataProducer: DataProducer)\\n */\\n get observer() {\\n return this._observer;\\n }\\n /**\\n * Close the Transport.\\n */\\n close() {\\n if (this._closed)\\n return;\\n logger.debug('close()');\\n this._closed = true;\\n // Close the AwaitQueue.\\n this._awaitQueue.close();\\n // Close the handler.\\n this._handler.close();\\n // Close all Producers.\\n for (const producer of this._producers.values()) {\\n producer.transportClosed();\\n }\\n this._producers.clear();\\n // Close all Consumers.\\n for (const consumer of this._consumers.values()) {\\n consumer.transportClosed();\\n }\\n this._consumers.clear();\\n // Close all DataProducers.\\n for (const dataProducer of this._dataProducers.values()) {\\n dataProducer.transportClosed();\\n }\\n this._dataProducers.clear();\\n // Close all DataConsumers.\\n for (const dataConsumer of this._dataConsumers.values()) {\\n dataConsumer.transportClosed();\\n }\\n this._dataConsumers.clear();\\n // Emit observer event.\\n this._observer.safeEmit('close');\\n }\\n /**\\n * Get associated Transport (RTCPeerConnection) stats.\\n *\\n * @returns {RTCStatsReport}\\n */\\n async getStats() {\\n if (this._closed)\\n throw new errors_1.InvalidStateError('closed');\\n return this._handler.getTransportStats();\\n }\\n /**\\n * Restart ICE connection.\\n */\\n async restartIce({ iceParameters }) {\\n logger.debug('restartIce()');\\n if (this._closed)\\n throw new errors_1.InvalidStateError('closed');\\n else if (!iceParameters)\\n throw new TypeError('missing iceParameters');\\n // Enqueue command.\\n return this._awaitQueue.push(async () => this._handler.restartIce(iceParameters), 'transport.restartIce()');\\n }\\n /**\\n * Update ICE servers.\\n */\\n async updateIceServers({ iceServers } = {}) {\\n logger.debug('updateIceServers()');\\n if (this._closed)\\n throw new errors_1.InvalidStateError('closed');\\n else if (!Array.isArray(iceServers))\\n throw new TypeError('missing iceServers');\\n // Enqueue command.\\n return this._awaitQueue.push(async () => this._handler.updateIceServers(iceServers), 'transport.updateIceServers()');\\n }\\n /**\\n * Create a Producer.\\n */\\n async produce({ track, encodings, codecOptions, codec, stopTracks = true, disableTrackOnPause = true, zeroRtpOnPause = false, appData = {} } = {}) {\\n logger.debug('produce() [track:%o]', track);\\n if (!track)\\n throw new TypeError('missing track');\\n else if (this._direction !== 'send')\\n throw new errors_1.UnsupportedError('not a sending Transport');\\n else if (!this._canProduceByKind[track.kind])\\n throw new errors_1.UnsupportedError(`cannot produce ${track.kind}`);\\n else if (track.readyState === 'ended')\\n throw new errors_1.InvalidStateError('track ended');\\n else if (this.listenerCount('connect') === 0 && this._connectionState === 'new')\\n throw new TypeError('no \\\"connect\\\" listener set into this transport');\\n else if (this.listenerCount('produce') === 0)\\n throw new TypeError('no \\\"produce\\\" listener set into this transport');\\n else if (appData && typeof appData !== 'object')\\n throw new TypeError('if given, appData must be an object');\\n // Enqueue command.\\n return this._awaitQueue.push(async () => {\\n let normalizedEncodings;\\n if (encodings && !Array.isArray(encodings)) {\\n throw TypeError('encodings must be an array');\\n }\\n else if (encodings && encodings.length === 0) {\\n normalizedEncodings = undefined;\\n }\\n else if (encodings) {\\n normalizedEncodings = encodings\\n .map((encoding) => {\\n const normalizedEncoding = { active: true };\\n if (encoding.active === false)\\n normalizedEncoding.active = false;\\n if (typeof encoding.dtx === 'boolean')\\n normalizedEncoding.dtx = encoding.dtx;\\n if (typeof encoding.scalabilityMode === 'string')\\n normalizedEncoding.scalabilityMode = encoding.scalabilityMode;\\n if (typeof encoding.scaleResolutionDownBy === 'number')\\n normalizedEncoding.scaleResolutionDownBy = encoding.scaleResolutionDownBy;\\n if (typeof encoding.maxBitrate === 'number')\\n normalizedEncoding.maxBitrate = encoding.maxBitrate;\\n if (typeof encoding.maxFramerate === 'number')\\n normalizedEncoding.maxFramerate = encoding.maxFramerate;\\n if (typeof encoding.adaptivePtime === 'boolean')\\n normalizedEncoding.adaptivePtime = encoding.adaptivePtime;\\n if (typeof encoding.priority === 'string')\\n normalizedEncoding.priority = encoding.priority;\\n if (typeof encoding.networkPriority === 'string')\\n normalizedEncoding.networkPriority = encoding.networkPriority;\\n return normalizedEncoding;\\n });\\n }\\n const { localId, rtpParameters, rtpSender } = await this._handler.send({\\n track,\\n encodings: normalizedEncodings,\\n codecOptions,\\n codec\\n });\\n try {\\n // This will fill rtpParameters's missing fields with default values.\\n ortc.validateRtpParameters(rtpParameters);\\n const { id } = await this.safeEmitAsPromise('produce', {\\n kind: track.kind,\\n rtpParameters,\\n appData\\n });\\n const producer = new Producer_1.Producer({\\n id,\\n localId,\\n rtpSender,\\n track,\\n rtpParameters,\\n stopTracks,\\n disableTrackOnPause,\\n zeroRtpOnPause,\\n appData\\n });\\n this._producers.set(producer.id, producer);\\n this._handleProducer(producer);\\n // Emit observer event.\\n this._observer.safeEmit('newproducer', producer);\\n return producer;\\n }\\n catch (error) {\\n this._handler.stopSending(localId)\\n .catch(() => { });\\n throw error;\\n }\\n }, 'transport.produce()')\\n // This catch is needed to stop the given track if the command above\\n // failed due to closed Transport.\\n .catch((error) => {\\n if (stopTracks) {\\n try {\\n track.stop();\\n }\\n catch (error2) { }\\n }\\n throw error;\\n });\\n }\\n /**\\n * Create a Consumer to consume a remote Producer.\\n */\\n async consume({ id, producerId, kind, rtpParameters, appData = {} }) {\\n logger.debug('consume()');\\n rtpParameters = utils.clone(rtpParameters, undefined);\\n if (this._closed)\\n throw new errors_1.InvalidStateError('closed');\\n else if (this._direction !== 'recv')\\n throw new errors_1.UnsupportedError('not a receiving Transport');\\n else if (typeof id !== 'string')\\n throw new TypeError('missing id');\\n else if (typeof producerId !== 'string')\\n throw new TypeError('missing producerId');\\n else if (kind !== 'audio' && kind !== 'video')\\n throw new TypeError(`invalid kind '${kind}'`);\\n else if (this.listenerCount('connect') === 0 && this._connectionState === 'new')\\n throw new TypeError('no \\\"connect\\\" listener set into this transport');\\n else if (appData && typeof appData !== 'object')\\n throw new TypeError('if given, appData must be an object');\\n // Enqueue command.\\n return this._awaitQueue.push(async () => {\\n // Ensure the device can consume it.\\n const canConsume = ortc.canReceive(rtpParameters, this._extendedRtpCapabilities);\\n if (!canConsume)\\n throw new errors_1.UnsupportedError('cannot consume this Producer');\\n const { localId, rtpReceiver, track } = await this._handler.receive({ trackId: id, kind, rtpParameters });\\n const consumer = new Consumer_1.Consumer({\\n id,\\n localId,\\n producerId,\\n rtpReceiver,\\n track,\\n rtpParameters,\\n appData\\n });\\n this._consumers.set(consumer.id, consumer);\\n this._handleConsumer(consumer);\\n // If this is the first video Consumer and the Consumer for RTP probation\\n // has not yet been created, create it now.\\n if (!this._probatorConsumerCreated && kind === 'video') {\\n try {\\n const probatorRtpParameters = ortc.generateProbatorRtpParameters(consumer.rtpParameters);\\n await this._handler.receive({\\n trackId: 'probator',\\n kind: 'video',\\n rtpParameters: probatorRtpParameters\\n });\\n logger.debug('consume() | Consumer for RTP probation created');\\n this._probatorConsumerCreated = true;\\n }\\n catch (error) {\\n logger.error('consume() | failed to create Consumer for RTP probation:%o', error);\\n }\\n }\\n // Emit observer event.\\n this._observer.safeEmit('newconsumer', consumer);\\n return consumer;\\n }, 'transport.consume()');\\n }\\n /**\\n * Create a DataProducer\\n */\\n async produceData({ ordered = true, maxPacketLifeTime, maxRetransmits, label = '', protocol = '', appData = {} } = {}) {\\n logger.debug('produceData()');\\n if (this._direction !== 'send')\\n throw new errors_1.UnsupportedError('not a sending Transport');\\n else if (!this._maxSctpMessageSize)\\n throw new errors_1.UnsupportedError('SCTP not enabled by remote Transport');\\n else if (this.listenerCount('connect') === 0 && this._connectionState === 'new')\\n throw new TypeError('no \\\"connect\\\" listener set into this transport');\\n else if (this.listenerCount('producedata') === 0)\\n throw new TypeError('no \\\"producedata\\\" listener set into this transport');\\n else if (appData && typeof appData !== 'object')\\n throw new TypeError('if given, appData must be an object');\\n if (maxPacketLifeTime || maxRetransmits)\\n ordered = false;\\n // Enqueue command.\\n return this._awaitQueue.push(async () => {\\n const { dataChannel, sctpStreamParameters } = await this._handler.sendDataChannel({\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmits,\\n label,\\n protocol\\n });\\n // This will fill sctpStreamParameters's missing fields with default values.\\n ortc.validateSctpStreamParameters(sctpStreamParameters);\\n const { id } = await this.safeEmitAsPromise('producedata', {\\n sctpStreamParameters,\\n label,\\n protocol,\\n appData\\n });\\n const dataProducer = new DataProducer_1.DataProducer({ id, dataChannel, sctpStreamParameters, appData });\\n this._dataProducers.set(dataProducer.id, dataProducer);\\n this._handleDataProducer(dataProducer);\\n // Emit observer event.\\n this._observer.safeEmit('newdataproducer', dataProducer);\\n return dataProducer;\\n }, 'transport.produceData()');\\n }\\n /**\\n * Create a DataConsumer\\n */\\n async consumeData({ id, dataProducerId, sctpStreamParameters, label = '', protocol = '', appData = {} }) {\\n logger.debug('consumeData()');\\n sctpStreamParameters = utils.clone(sctpStreamParameters, undefined);\\n if (this._closed)\\n throw new errors_1.InvalidStateError('closed');\\n else if (this._direction !== 'recv')\\n throw new errors_1.UnsupportedError('not a receiving Transport');\\n else if (!this._maxSctpMessageSize)\\n throw new errors_1.UnsupportedError('SCTP not enabled by remote Transport');\\n else if (typeof id !== 'string')\\n throw new TypeError('missing id');\\n else if (typeof dataProducerId !== 'string')\\n throw new TypeError('missing dataProducerId');\\n else if (this.listenerCount('connect') === 0 && this._connectionState === 'new')\\n throw new TypeError('no \\\"connect\\\" listener set into this transport');\\n else if (appData && typeof appData !== 'object')\\n throw new TypeError('if given, appData must be an object');\\n // This may throw.\\n ortc.validateSctpStreamParameters(sctpStreamParameters);\\n // Enqueue command.\\n return this._awaitQueue.push(async () => {\\n const { dataChannel } = await this._handler.receiveDataChannel({\\n sctpStreamParameters,\\n label,\\n protocol\\n });\\n const dataConsumer = new DataConsumer_1.DataConsumer({\\n id,\\n dataProducerId,\\n dataChannel,\\n sctpStreamParameters,\\n appData\\n });\\n this._dataConsumers.set(dataConsumer.id, dataConsumer);\\n this._handleDataConsumer(dataConsumer);\\n // Emit observer event.\\n this._observer.safeEmit('newdataconsumer', dataConsumer);\\n return dataConsumer;\\n }, 'transport.consumeData()');\\n }\\n _handleHandler() {\\n const handler = this._handler;\\n handler.on('@connect', ({ dtlsParameters }, callback, errback) => {\\n if (this._closed) {\\n errback(new errors_1.InvalidStateError('closed'));\\n return;\\n }\\n this.safeEmit('connect', { dtlsParameters }, callback, errback);\\n });\\n handler.on('@connectionstatechange', (connectionState) => {\\n if (connectionState === this._connectionState)\\n return;\\n logger.debug('connection state changed to %s', connectionState);\\n this._connectionState = connectionState;\\n if (!this._closed)\\n this.safeEmit('connectionstatechange', connectionState);\\n });\\n }\\n _handleProducer(producer) {\\n producer.on('@close', () => {\\n this._producers.delete(producer.id);\\n if (this._closed)\\n return;\\n this._awaitQueue.push(async () => this._handler.stopSending(producer.localId), 'producer @close event')\\n .catch((error) => logger.warn('producer.close() failed:%o', error));\\n });\\n producer.on('@replacetrack', (track, callback, errback) => {\\n this._awaitQueue.push(async () => this._handler.replaceTrack(producer.localId, track), 'producer @replacetrack event')\\n .then(callback)\\n .catch(errback);\\n });\\n producer.on('@setmaxspatiallayer', (spatialLayer, callback, errback) => {\\n this._awaitQueue.push(async () => (this._handler.setMaxSpatialLayer(producer.localId, spatialLayer)), 'producer @setmaxspatiallayer event')\\n .then(callback)\\n .catch(errback);\\n });\\n producer.on('@setrtpencodingparameters', (params, callback, errback) => {\\n this._awaitQueue.push(async () => (this._handler.setRtpEncodingParameters(producer.localId, params)), 'producer @setrtpencodingparameters event')\\n .then(callback)\\n .catch(errback);\\n });\\n producer.on('@getstats', (callback, errback) => {\\n if (this._closed)\\n return errback(new errors_1.InvalidStateError('closed'));\\n this._handler.getSenderStats(producer.localId)\\n .then(callback)\\n .catch(errback);\\n });\\n }\\n _handleConsumer(consumer) {\\n consumer.on('@close', () => {\\n this._consumers.delete(consumer.id);\\n if (this._closed)\\n return;\\n this._awaitQueue.push(async () => this._handler.stopReceiving(consumer.localId), 'consumer @close event')\\n .catch(() => { });\\n });\\n consumer.on('@pause', () => {\\n this._awaitQueue.push(async () => this._handler.pauseReceiving(consumer.localId), 'consumer @pause event')\\n .catch(() => { });\\n });\\n consumer.on('@resume', () => {\\n this._awaitQueue.push(async () => this._handler.resumeReceiving(consumer.localId), 'consumer @resume event')\\n .catch(() => { });\\n });\\n consumer.on('@getstats', (callback, errback) => {\\n if (this._closed)\\n return errback(new errors_1.InvalidStateError('closed'));\\n this._handler.getReceiverStats(consumer.localId)\\n .then(callback)\\n .catch(errback);\\n });\\n }\\n _handleDataProducer(dataProducer) {\\n dataProducer.on('@close', () => {\\n this._dataProducers.delete(dataProducer.id);\\n });\\n }\\n _handleDataConsumer(dataConsumer) {\\n dataConsumer.on('@close', () => {\\n this._dataConsumers.delete(dataConsumer.id);\\n });\\n }\\n}\\nexports.Transport = Transport;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/Transport.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/errors.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/errors.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.InvalidStateError = exports.UnsupportedError = void 0;\\n/**\\n * Error indicating not support for something.\\n */\\nclass UnsupportedError extends Error {\\n constructor(message) {\\n super(message);\\n this.name = 'UnsupportedError';\\n if (Error.hasOwnProperty('captureStackTrace')) // Just in V8.\\n {\\n // @ts-ignore\\n Error.captureStackTrace(this, UnsupportedError);\\n }\\n else {\\n this.stack = (new Error(message)).stack;\\n }\\n }\\n}\\nexports.UnsupportedError = UnsupportedError;\\n/**\\n * Error produced when calling a method in an invalid state.\\n */\\nclass InvalidStateError extends Error {\\n constructor(message) {\\n super(message);\\n this.name = 'InvalidStateError';\\n if (Error.hasOwnProperty('captureStackTrace')) // Just in V8.\\n {\\n // @ts-ignore\\n Error.captureStackTrace(this, InvalidStateError);\\n }\\n else {\\n this.stack = (new Error(message)).stack;\\n }\\n }\\n}\\nexports.InvalidStateError = InvalidStateError;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/errors.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/Chrome55.js\":\n/*!****************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/Chrome55.js ***!\n \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Chrome55 = void 0;\\nconst sdpTransform = __importStar(__webpack_require__(/*! sdp-transform */ \\\"./node_modules/sdp-transform/lib/index.js\\\"));\\nconst Logger_1 = __webpack_require__(/*! ../Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst errors_1 = __webpack_require__(/*! ../errors */ \\\"./node_modules/mediasoup-client/lib/errors.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ../ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst sdpCommonUtils = __importStar(__webpack_require__(/*! ./sdp/commonUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js\\\"));\\nconst sdpPlanBUtils = __importStar(__webpack_require__(/*! ./sdp/planBUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/planBUtils.js\\\"));\\nconst HandlerInterface_1 = __webpack_require__(/*! ./HandlerInterface */ \\\"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\\\");\\nconst RemoteSdp_1 = __webpack_require__(/*! ./sdp/RemoteSdp */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js\\\");\\nconst logger = new Logger_1.Logger('Chrome55');\\nconst SCTP_NUM_STREAMS = { OS: 1024, MIS: 1024 };\\nclass Chrome55 extends HandlerInterface_1.HandlerInterface {\\n constructor() {\\n super();\\n // Local stream for sending.\\n this._sendStream = new MediaStream();\\n // Map of sending MediaStreamTracks indexed by localId.\\n this._mapSendLocalIdTrack = new Map();\\n // Next sending localId.\\n this._nextSendLocalId = 0;\\n // Map of MID, RTP parameters and RTCRtpReceiver indexed by local id.\\n // Value is an Object with mid, rtpParameters and rtpReceiver.\\n this._mapRecvLocalIdInfo = new Map();\\n // Whether a DataChannel m=application section has been created.\\n this._hasDataChannelMediaSection = false;\\n // Sending DataChannel id value counter. Incremented for each new DataChannel.\\n this._nextSendSctpStreamId = 0;\\n // Got transport local and remote parameters.\\n this._transportReady = false;\\n }\\n /**\\n * Creates a factory function.\\n */\\n static createFactory() {\\n return () => new Chrome55();\\n }\\n get name() {\\n return 'Chrome55';\\n }\\n close() {\\n logger.debug('close()');\\n // Close RTCPeerConnection.\\n if (this._pc) {\\n try {\\n this._pc.close();\\n }\\n catch (error) { }\\n }\\n }\\n async getNativeRtpCapabilities() {\\n logger.debug('getNativeRtpCapabilities()');\\n const pc = new RTCPeerConnection({\\n iceServers: [],\\n iceTransportPolicy: 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'plan-b'\\n });\\n try {\\n const offer = await pc.createOffer({\\n offerToReceiveAudio: true,\\n offerToReceiveVideo: true\\n });\\n try {\\n pc.close();\\n }\\n catch (error) { }\\n const sdpObject = sdpTransform.parse(offer.sdp);\\n const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({ sdpObject });\\n return nativeRtpCapabilities;\\n }\\n catch (error) {\\n try {\\n pc.close();\\n }\\n catch (error2) { }\\n throw error;\\n }\\n }\\n async getNativeSctpCapabilities() {\\n logger.debug('getNativeSctpCapabilities()');\\n return {\\n numStreams: SCTP_NUM_STREAMS\\n };\\n }\\n run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities }) {\\n logger.debug('run()');\\n this._direction = direction;\\n this._remoteSdp = new RemoteSdp_1.RemoteSdp({\\n iceParameters,\\n iceCandidates,\\n dtlsParameters,\\n sctpParameters,\\n planB: true\\n });\\n this._sendingRtpParametersByKind =\\n {\\n audio: ortc.getSendingRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRtpParameters('video', extendedRtpCapabilities)\\n };\\n this._sendingRemoteRtpParametersByKind =\\n {\\n audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)\\n };\\n if (dtlsParameters.role && dtlsParameters.role !== 'auto') {\\n this._forcedLocalDtlsRole = dtlsParameters.role === 'server'\\n ? 'client'\\n : 'server';\\n }\\n this._pc = new RTCPeerConnection({\\n iceServers: iceServers || [],\\n iceTransportPolicy: iceTransportPolicy || 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'plan-b',\\n ...additionalSettings\\n }, proprietaryConstraints);\\n // Handle RTCPeerConnection connection status.\\n this._pc.addEventListener('iceconnectionstatechange', () => {\\n switch (this._pc.iceConnectionState) {\\n case 'checking':\\n this.emit('@connectionstatechange', 'connecting');\\n break;\\n case 'connected':\\n case 'completed':\\n this.emit('@connectionstatechange', 'connected');\\n break;\\n case 'failed':\\n this.emit('@connectionstatechange', 'failed');\\n break;\\n case 'disconnected':\\n this.emit('@connectionstatechange', 'disconnected');\\n break;\\n case 'closed':\\n this.emit('@connectionstatechange', 'closed');\\n break;\\n }\\n });\\n }\\n async updateIceServers(iceServers) {\\n logger.debug('updateIceServers()');\\n const configuration = this._pc.getConfiguration();\\n configuration.iceServers = iceServers;\\n this._pc.setConfiguration(configuration);\\n }\\n async restartIce(iceParameters) {\\n logger.debug('restartIce()');\\n // Provide the remote SDP handler with new remote ICE parameters.\\n this._remoteSdp.updateIceParameters(iceParameters);\\n if (!this._transportReady)\\n return;\\n if (this._direction === 'send') {\\n const offer = await this._pc.createOffer({ iceRestart: true });\\n logger.debug('restartIce() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n else {\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('restartIce() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n }\\n async getTransportStats() {\\n return this._pc.getStats();\\n }\\n async send({ track, encodings, codecOptions, codec }) {\\n var _a;\\n this._assertSendDirection();\\n logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);\\n if (codec) {\\n logger.warn('send() | codec selection is not available in %s handler', this.name);\\n }\\n this._sendStream.addTrack(track);\\n this._pc.addStream(this._sendStream);\\n let offer = await this._pc.createOffer();\\n let localSdpObject = sdpTransform.parse(offer.sdp);\\n let offerMediaObject;\\n const sendingRtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});\\n sendingRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRtpParameters.codecs);\\n const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});\\n sendingRemoteRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRemoteRtpParameters.codecs);\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n if (track.kind === 'video' && encodings && encodings.length > 1) {\\n logger.debug('send() | enabling simulcast');\\n localSdpObject = sdpTransform.parse(offer.sdp);\\n offerMediaObject = localSdpObject.media.find((m) => m.type === 'video');\\n sdpPlanBUtils.addLegacySimulcast({\\n offerMediaObject,\\n track,\\n numStreams: encodings.length\\n });\\n offer = { type: 'offer', sdp: sdpTransform.write(localSdpObject) };\\n }\\n logger.debug('send() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n offerMediaObject = localSdpObject.media\\n .find((m) => m.type === track.kind);\\n // Set RTCP CNAME.\\n sendingRtpParameters.rtcp.cname =\\n sdpCommonUtils.getCname({ offerMediaObject });\\n // Set RTP encodings.\\n sendingRtpParameters.encodings =\\n sdpPlanBUtils.getRtpEncodings({ offerMediaObject, track });\\n // Complete encodings with given values.\\n if (encodings) {\\n for (let idx = 0; idx < sendingRtpParameters.encodings.length; ++idx) {\\n if (encodings[idx])\\n Object.assign(sendingRtpParameters.encodings[idx], encodings[idx]);\\n }\\n }\\n // If VP8 and there is effective simulcast, add scalabilityMode to each\\n // encoding.\\n if (sendingRtpParameters.encodings.length > 1 &&\\n sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8') {\\n for (const encoding of sendingRtpParameters.encodings) {\\n encoding.scalabilityMode = 'S1T3';\\n }\\n }\\n this._remoteSdp.send({\\n offerMediaObject,\\n offerRtpParameters: sendingRtpParameters,\\n answerRtpParameters: sendingRemoteRtpParameters,\\n codecOptions\\n });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('send() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n const localId = String(this._nextSendLocalId);\\n this._nextSendLocalId++;\\n // Insert into the map.\\n this._mapSendLocalIdTrack.set(localId, track);\\n return {\\n localId: localId,\\n rtpParameters: sendingRtpParameters\\n };\\n }\\n async stopSending(localId) {\\n this._assertSendDirection();\\n logger.debug('stopSending() [localId:%s]', localId);\\n const track = this._mapSendLocalIdTrack.get(localId);\\n if (!track)\\n throw new Error('track not found');\\n this._mapSendLocalIdTrack.delete(localId);\\n this._sendStream.removeTrack(track);\\n this._pc.addStream(this._sendStream);\\n const offer = await this._pc.createOffer();\\n logger.debug('stopSending() | calling pc.setLocalDescription() [offer:%o]', offer);\\n try {\\n await this._pc.setLocalDescription(offer);\\n }\\n catch (error) {\\n // NOTE: If there are no sending tracks, setLocalDescription() will fail with\\n // \\\"Failed to create channels\\\". If so, ignore it.\\n if (this._sendStream.getTracks().length === 0) {\\n logger.warn('stopSending() | ignoring expected error due no sending tracks: %s', error.toString());\\n return;\\n }\\n throw error;\\n }\\n if (this._pc.signalingState === 'stable')\\n return;\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n async replaceTrack(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId, track) {\\n throw new errors_1.UnsupportedError('not implemented');\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n async setMaxSpatialLayer(localId, spatialLayer) {\\n throw new errors_1.UnsupportedError(' not implemented');\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n async setRtpEncodingParameters(localId, params) {\\n throw new errors_1.UnsupportedError('not supported');\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n async getSenderStats(localId) {\\n throw new errors_1.UnsupportedError('not implemented');\\n }\\n async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {\\n var _a;\\n this._assertSendDirection();\\n const options = {\\n negotiated: true,\\n id: this._nextSendSctpStreamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmitTime: maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('sendDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // Increase next id.\\n this._nextSendSctpStreamId =\\n ++this._nextSendSctpStreamId % SCTP_NUM_STREAMS.MIS;\\n // If this is the first DataChannel we need to create the SDP answer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n const offer = await this._pc.createOffer();\\n const localSdpObject = sdpTransform.parse(offer.sdp);\\n const offerMediaObject = localSdpObject.media\\n .find((m) => m.type === 'application');\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n this._remoteSdp.sendSctpAssociation({ offerMediaObject });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n const sctpStreamParameters = {\\n streamId: options.id,\\n ordered: options.ordered,\\n maxPacketLifeTime: options.maxPacketLifeTime,\\n maxRetransmits: options.maxRetransmits\\n };\\n return { dataChannel, sctpStreamParameters };\\n }\\n async receive({ trackId, kind, rtpParameters }) {\\n var _a;\\n this._assertRecvDirection();\\n logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);\\n const localId = trackId;\\n const mid = kind;\\n const streamId = rtpParameters.rtcp.cname;\\n this._remoteSdp.receive({\\n mid,\\n kind,\\n offerRtpParameters: rtpParameters,\\n streamId,\\n trackId\\n });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receive() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n let answer = await this._pc.createAnswer();\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n const answerMediaObject = localSdpObject.media\\n .find((m) => String(m.mid) === mid);\\n // May need to modify codec parameters in the answer based on codec\\n // parameters in the offer.\\n sdpCommonUtils.applyCodecParameters({\\n offerRtpParameters: rtpParameters,\\n answerMediaObject\\n });\\n answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n const stream = this._pc.getRemoteStreams()\\n .find((s) => s.id === streamId);\\n const track = stream.getTrackById(localId);\\n if (!track)\\n throw new Error('remote track not found');\\n // Insert into the map.\\n this._mapRecvLocalIdInfo.set(localId, { mid, rtpParameters });\\n return { localId, track };\\n }\\n async stopReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('stopReceiving() [localId:%s]', localId);\\n const { mid, rtpParameters } = this._mapRecvLocalIdInfo.get(localId) || {};\\n // Remove from the map.\\n this._mapRecvLocalIdInfo.delete(localId);\\n this._remoteSdp.planBStopReceiving({ mid: mid, offerRtpParameters: rtpParameters });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n async pauseReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n async resumeReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n async getReceiverStats(localId) {\\n throw new errors_1.UnsupportedError('not implemented');\\n }\\n async receiveDataChannel({ sctpStreamParameters, label, protocol }) {\\n var _a;\\n this._assertRecvDirection();\\n const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;\\n const options = {\\n negotiated: true,\\n id: streamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmitTime: maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('receiveDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // If this is the first DataChannel we need to create the SDP offer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n this._remoteSdp.receiveSctpAssociation({ oldDataChannelSpec: true });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n if (!this._transportReady) {\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n return { dataChannel };\\n }\\n async _setupTransport({ localDtlsRole, localSdpObject }) {\\n if (!localSdpObject)\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n // Get our local DTLS parameters.\\n const dtlsParameters = sdpCommonUtils.extractDtlsParameters({ sdpObject: localSdpObject });\\n // Set our DTLS role.\\n dtlsParameters.role = localDtlsRole;\\n // Update the remote DTLS role in the SDP.\\n this._remoteSdp.updateDtlsRole(localDtlsRole === 'client' ? 'server' : 'client');\\n // Need to tell the remote transport about our parameters.\\n await this.safeEmitAsPromise('@connect', { dtlsParameters });\\n this._transportReady = true;\\n }\\n _assertSendDirection() {\\n if (this._direction !== 'send') {\\n throw new Error('method can just be called for handlers with \\\"send\\\" direction');\\n }\\n }\\n _assertRecvDirection() {\\n if (this._direction !== 'recv') {\\n throw new Error('method can just be called for handlers with \\\"recv\\\" direction');\\n }\\n }\\n}\\nexports.Chrome55 = Chrome55;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/Chrome55.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/Chrome67.js\":\n/*!****************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/Chrome67.js ***!\n \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Chrome67 = void 0;\\nconst sdpTransform = __importStar(__webpack_require__(/*! sdp-transform */ \\\"./node_modules/sdp-transform/lib/index.js\\\"));\\nconst Logger_1 = __webpack_require__(/*! ../Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ../ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst sdpCommonUtils = __importStar(__webpack_require__(/*! ./sdp/commonUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js\\\"));\\nconst sdpPlanBUtils = __importStar(__webpack_require__(/*! ./sdp/planBUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/planBUtils.js\\\"));\\nconst HandlerInterface_1 = __webpack_require__(/*! ./HandlerInterface */ \\\"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\\\");\\nconst RemoteSdp_1 = __webpack_require__(/*! ./sdp/RemoteSdp */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js\\\");\\nconst logger = new Logger_1.Logger('Chrome67');\\nconst SCTP_NUM_STREAMS = { OS: 1024, MIS: 1024 };\\nclass Chrome67 extends HandlerInterface_1.HandlerInterface {\\n constructor() {\\n super();\\n // Local stream for sending.\\n this._sendStream = new MediaStream();\\n // Map of RTCRtpSender indexed by localId.\\n this._mapSendLocalIdRtpSender = new Map();\\n // Next sending localId.\\n this._nextSendLocalId = 0;\\n // Map of MID, RTP parameters and RTCRtpReceiver indexed by local id.\\n // Value is an Object with mid, rtpParameters and rtpReceiver.\\n this._mapRecvLocalIdInfo = new Map();\\n // Whether a DataChannel m=application section has been created.\\n this._hasDataChannelMediaSection = false;\\n // Sending DataChannel id value counter. Incremented for each new DataChannel.\\n this._nextSendSctpStreamId = 0;\\n // Got transport local and remote parameters.\\n this._transportReady = false;\\n }\\n /**\\n * Creates a factory function.\\n */\\n static createFactory() {\\n return () => new Chrome67();\\n }\\n get name() {\\n return 'Chrome67';\\n }\\n close() {\\n logger.debug('close()');\\n // Close RTCPeerConnection.\\n if (this._pc) {\\n try {\\n this._pc.close();\\n }\\n catch (error) { }\\n }\\n }\\n async getNativeRtpCapabilities() {\\n logger.debug('getNativeRtpCapabilities()');\\n const pc = new RTCPeerConnection({\\n iceServers: [],\\n iceTransportPolicy: 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'plan-b'\\n });\\n try {\\n const offer = await pc.createOffer({\\n offerToReceiveAudio: true,\\n offerToReceiveVideo: true\\n });\\n try {\\n pc.close();\\n }\\n catch (error) { }\\n const sdpObject = sdpTransform.parse(offer.sdp);\\n const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({ sdpObject });\\n return nativeRtpCapabilities;\\n }\\n catch (error) {\\n try {\\n pc.close();\\n }\\n catch (error2) { }\\n throw error;\\n }\\n }\\n async getNativeSctpCapabilities() {\\n logger.debug('getNativeSctpCapabilities()');\\n return {\\n numStreams: SCTP_NUM_STREAMS\\n };\\n }\\n run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities }) {\\n logger.debug('run()');\\n this._direction = direction;\\n this._remoteSdp = new RemoteSdp_1.RemoteSdp({\\n iceParameters,\\n iceCandidates,\\n dtlsParameters,\\n sctpParameters,\\n planB: true\\n });\\n this._sendingRtpParametersByKind =\\n {\\n audio: ortc.getSendingRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRtpParameters('video', extendedRtpCapabilities)\\n };\\n this._sendingRemoteRtpParametersByKind =\\n {\\n audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)\\n };\\n if (dtlsParameters.role && dtlsParameters.role !== 'auto') {\\n this._forcedLocalDtlsRole = dtlsParameters.role === 'server'\\n ? 'client'\\n : 'server';\\n }\\n this._pc = new RTCPeerConnection({\\n iceServers: iceServers || [],\\n iceTransportPolicy: iceTransportPolicy || 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'plan-b',\\n ...additionalSettings\\n }, proprietaryConstraints);\\n // Handle RTCPeerConnection connection status.\\n this._pc.addEventListener('iceconnectionstatechange', () => {\\n switch (this._pc.iceConnectionState) {\\n case 'checking':\\n this.emit('@connectionstatechange', 'connecting');\\n break;\\n case 'connected':\\n case 'completed':\\n this.emit('@connectionstatechange', 'connected');\\n break;\\n case 'failed':\\n this.emit('@connectionstatechange', 'failed');\\n break;\\n case 'disconnected':\\n this.emit('@connectionstatechange', 'disconnected');\\n break;\\n case 'closed':\\n this.emit('@connectionstatechange', 'closed');\\n break;\\n }\\n });\\n }\\n async updateIceServers(iceServers) {\\n logger.debug('updateIceServers()');\\n const configuration = this._pc.getConfiguration();\\n configuration.iceServers = iceServers;\\n this._pc.setConfiguration(configuration);\\n }\\n async restartIce(iceParameters) {\\n logger.debug('restartIce()');\\n // Provide the remote SDP handler with new remote ICE parameters.\\n this._remoteSdp.updateIceParameters(iceParameters);\\n if (!this._transportReady)\\n return;\\n if (this._direction === 'send') {\\n const offer = await this._pc.createOffer({ iceRestart: true });\\n logger.debug('restartIce() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n else {\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('restartIce() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n }\\n async getTransportStats() {\\n return this._pc.getStats();\\n }\\n async send({ track, encodings, codecOptions, codec }) {\\n var _a;\\n this._assertSendDirection();\\n logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);\\n if (codec) {\\n logger.warn('send() | codec selection is not available in %s handler', this.name);\\n }\\n this._sendStream.addTrack(track);\\n this._pc.addTrack(track, this._sendStream);\\n let offer = await this._pc.createOffer();\\n let localSdpObject = sdpTransform.parse(offer.sdp);\\n let offerMediaObject;\\n const sendingRtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});\\n sendingRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRtpParameters.codecs);\\n const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});\\n sendingRemoteRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRemoteRtpParameters.codecs);\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n if (track.kind === 'video' && encodings && encodings.length > 1) {\\n logger.debug('send() | enabling simulcast');\\n localSdpObject = sdpTransform.parse(offer.sdp);\\n offerMediaObject = localSdpObject.media\\n .find((m) => m.type === 'video');\\n sdpPlanBUtils.addLegacySimulcast({\\n offerMediaObject,\\n track,\\n numStreams: encodings.length\\n });\\n offer = { type: 'offer', sdp: sdpTransform.write(localSdpObject) };\\n }\\n logger.debug('send() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n offerMediaObject = localSdpObject.media\\n .find((m) => m.type === track.kind);\\n // Set RTCP CNAME.\\n sendingRtpParameters.rtcp.cname =\\n sdpCommonUtils.getCname({ offerMediaObject });\\n // Set RTP encodings.\\n sendingRtpParameters.encodings =\\n sdpPlanBUtils.getRtpEncodings({ offerMediaObject, track });\\n // Complete encodings with given values.\\n if (encodings) {\\n for (let idx = 0; idx < sendingRtpParameters.encodings.length; ++idx) {\\n if (encodings[idx])\\n Object.assign(sendingRtpParameters.encodings[idx], encodings[idx]);\\n }\\n }\\n // If VP8 and there is effective simulcast, add scalabilityMode to each\\n // encoding.\\n if (sendingRtpParameters.encodings.length > 1 &&\\n sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8') {\\n for (const encoding of sendingRtpParameters.encodings) {\\n encoding.scalabilityMode = 'S1T3';\\n }\\n }\\n this._remoteSdp.send({\\n offerMediaObject,\\n offerRtpParameters: sendingRtpParameters,\\n answerRtpParameters: sendingRemoteRtpParameters,\\n codecOptions\\n });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('send() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n const localId = String(this._nextSendLocalId);\\n this._nextSendLocalId++;\\n const rtpSender = this._pc.getSenders()\\n .find((s) => s.track === track);\\n // Insert into the map.\\n this._mapSendLocalIdRtpSender.set(localId, rtpSender);\\n return {\\n localId: localId,\\n rtpParameters: sendingRtpParameters,\\n rtpSender\\n };\\n }\\n async stopSending(localId) {\\n this._assertSendDirection();\\n logger.debug('stopSending() [localId:%s]', localId);\\n const rtpSender = this._mapSendLocalIdRtpSender.get(localId);\\n if (!rtpSender)\\n throw new Error('associated RTCRtpSender not found');\\n this._pc.removeTrack(rtpSender);\\n if (rtpSender.track)\\n this._sendStream.removeTrack(rtpSender.track);\\n this._mapSendLocalIdRtpSender.delete(localId);\\n const offer = await this._pc.createOffer();\\n logger.debug('stopSending() | calling pc.setLocalDescription() [offer:%o]', offer);\\n try {\\n await this._pc.setLocalDescription(offer);\\n }\\n catch (error) {\\n // NOTE: If there are no sending tracks, setLocalDescription() will fail with\\n // \\\"Failed to create channels\\\". If so, ignore it.\\n if (this._sendStream.getTracks().length === 0) {\\n logger.warn('stopSending() | ignoring expected error due no sending tracks: %s', error.toString());\\n return;\\n }\\n throw error;\\n }\\n if (this._pc.signalingState === 'stable')\\n return;\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n async replaceTrack(localId, track) {\\n this._assertSendDirection();\\n if (track) {\\n logger.debug('replaceTrack() [localId:%s, track.id:%s]', localId, track.id);\\n }\\n else {\\n logger.debug('replaceTrack() [localId:%s, no track]', localId);\\n }\\n const rtpSender = this._mapSendLocalIdRtpSender.get(localId);\\n if (!rtpSender)\\n throw new Error('associated RTCRtpSender not found');\\n const oldTrack = rtpSender.track;\\n await rtpSender.replaceTrack(track);\\n // Remove the old track from the local stream.\\n if (oldTrack)\\n this._sendStream.removeTrack(oldTrack);\\n // Add the new track to the local stream.\\n if (track)\\n this._sendStream.addTrack(track);\\n }\\n async setMaxSpatialLayer(localId, spatialLayer) {\\n this._assertSendDirection();\\n logger.debug('setMaxSpatialLayer() [localId:%s, spatialLayer:%s]', localId, spatialLayer);\\n const rtpSender = this._mapSendLocalIdRtpSender.get(localId);\\n if (!rtpSender)\\n throw new Error('associated RTCRtpSender not found');\\n const parameters = rtpSender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n if (idx <= spatialLayer)\\n encoding.active = true;\\n else\\n encoding.active = false;\\n });\\n await rtpSender.setParameters(parameters);\\n }\\n async setRtpEncodingParameters(localId, params) {\\n this._assertSendDirection();\\n logger.debug('setRtpEncodingParameters() [localId:%s, params:%o]', localId, params);\\n const rtpSender = this._mapSendLocalIdRtpSender.get(localId);\\n if (!rtpSender)\\n throw new Error('associated RTCRtpSender not found');\\n const parameters = rtpSender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n parameters.encodings[idx] = { ...encoding, ...params };\\n });\\n await rtpSender.setParameters(parameters);\\n }\\n async getSenderStats(localId) {\\n this._assertSendDirection();\\n const rtpSender = this._mapSendLocalIdRtpSender.get(localId);\\n if (!rtpSender)\\n throw new Error('associated RTCRtpSender not found');\\n return rtpSender.getStats();\\n }\\n async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {\\n var _a;\\n this._assertSendDirection();\\n const options = {\\n negotiated: true,\\n id: this._nextSendSctpStreamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmitTime: maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('sendDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // Increase next id.\\n this._nextSendSctpStreamId =\\n ++this._nextSendSctpStreamId % SCTP_NUM_STREAMS.MIS;\\n // If this is the first DataChannel we need to create the SDP answer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n const offer = await this._pc.createOffer();\\n const localSdpObject = sdpTransform.parse(offer.sdp);\\n const offerMediaObject = localSdpObject.media\\n .find((m) => m.type === 'application');\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n this._remoteSdp.sendSctpAssociation({ offerMediaObject });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n const sctpStreamParameters = {\\n streamId: options.id,\\n ordered: options.ordered,\\n maxPacketLifeTime: options.maxPacketLifeTime,\\n maxRetransmits: options.maxRetransmits\\n };\\n return { dataChannel, sctpStreamParameters };\\n }\\n async receive({ trackId, kind, rtpParameters }) {\\n var _a;\\n this._assertRecvDirection();\\n logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);\\n const localId = trackId;\\n const mid = kind;\\n this._remoteSdp.receive({\\n mid,\\n kind,\\n offerRtpParameters: rtpParameters,\\n streamId: rtpParameters.rtcp.cname,\\n trackId\\n });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receive() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n let answer = await this._pc.createAnswer();\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n const answerMediaObject = localSdpObject.media\\n .find((m) => String(m.mid) === mid);\\n // May need to modify codec parameters in the answer based on codec\\n // parameters in the offer.\\n sdpCommonUtils.applyCodecParameters({\\n offerRtpParameters: rtpParameters,\\n answerMediaObject\\n });\\n answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n const rtpReceiver = this._pc.getReceivers()\\n .find((r) => r.track && r.track.id === localId);\\n if (!rtpReceiver)\\n throw new Error('new RTCRtpReceiver not');\\n // Insert into the map.\\n this._mapRecvLocalIdInfo.set(localId, { mid, rtpParameters, rtpReceiver });\\n return {\\n localId,\\n track: rtpReceiver.track,\\n rtpReceiver\\n };\\n }\\n async stopReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('stopReceiving() [localId:%s]', localId);\\n const { mid, rtpParameters } = this._mapRecvLocalIdInfo.get(localId) || {};\\n // Remove from the map.\\n this._mapRecvLocalIdInfo.delete(localId);\\n this._remoteSdp.planBStopReceiving({ mid: mid, offerRtpParameters: rtpParameters });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n async pauseReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n async resumeReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n async getReceiverStats(localId) {\\n this._assertRecvDirection();\\n const { rtpReceiver } = this._mapRecvLocalIdInfo.get(localId) || {};\\n if (!rtpReceiver)\\n throw new Error('associated RTCRtpReceiver not found');\\n return rtpReceiver.getStats();\\n }\\n async receiveDataChannel({ sctpStreamParameters, label, protocol }) {\\n var _a;\\n this._assertRecvDirection();\\n const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;\\n const options = {\\n negotiated: true,\\n id: streamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmitTime: maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('receiveDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // If this is the first DataChannel we need to create the SDP offer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n this._remoteSdp.receiveSctpAssociation({ oldDataChannelSpec: true });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n if (!this._transportReady) {\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n return { dataChannel };\\n }\\n async _setupTransport({ localDtlsRole, localSdpObject }) {\\n if (!localSdpObject)\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n // Get our local DTLS parameters.\\n const dtlsParameters = sdpCommonUtils.extractDtlsParameters({ sdpObject: localSdpObject });\\n // Set our DTLS role.\\n dtlsParameters.role = localDtlsRole;\\n // Update the remote DTLS role in the SDP.\\n this._remoteSdp.updateDtlsRole(localDtlsRole === 'client' ? 'server' : 'client');\\n // Need to tell the remote transport about our parameters.\\n await this.safeEmitAsPromise('@connect', { dtlsParameters });\\n this._transportReady = true;\\n }\\n _assertSendDirection() {\\n if (this._direction !== 'send') {\\n throw new Error('method can just be called for handlers with \\\"send\\\" direction');\\n }\\n }\\n _assertRecvDirection() {\\n if (this._direction !== 'recv') {\\n throw new Error('method can just be called for handlers with \\\"recv\\\" direction');\\n }\\n }\\n}\\nexports.Chrome67 = Chrome67;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/Chrome67.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/Chrome70.js\":\n/*!****************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/Chrome70.js ***!\n \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Chrome70 = void 0;\\nconst sdpTransform = __importStar(__webpack_require__(/*! sdp-transform */ \\\"./node_modules/sdp-transform/lib/index.js\\\"));\\nconst Logger_1 = __webpack_require__(/*! ../Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ../ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst sdpCommonUtils = __importStar(__webpack_require__(/*! ./sdp/commonUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js\\\"));\\nconst sdpUnifiedPlanUtils = __importStar(__webpack_require__(/*! ./sdp/unifiedPlanUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/unifiedPlanUtils.js\\\"));\\nconst HandlerInterface_1 = __webpack_require__(/*! ./HandlerInterface */ \\\"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\\\");\\nconst RemoteSdp_1 = __webpack_require__(/*! ./sdp/RemoteSdp */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js\\\");\\nconst scalabilityModes_1 = __webpack_require__(/*! ../scalabilityModes */ \\\"./node_modules/mediasoup-client/lib/scalabilityModes.js\\\");\\nconst logger = new Logger_1.Logger('Chrome70');\\nconst SCTP_NUM_STREAMS = { OS: 1024, MIS: 1024 };\\nclass Chrome70 extends HandlerInterface_1.HandlerInterface {\\n constructor() {\\n super();\\n // Map of RTCTransceivers indexed by MID.\\n this._mapMidTransceiver = new Map();\\n // Local stream for sending.\\n this._sendStream = new MediaStream();\\n // Whether a DataChannel m=application section has been created.\\n this._hasDataChannelMediaSection = false;\\n // Sending DataChannel id value counter. Incremented for each new DataChannel.\\n this._nextSendSctpStreamId = 0;\\n // Got transport local and remote parameters.\\n this._transportReady = false;\\n }\\n /**\\n * Creates a factory function.\\n */\\n static createFactory() {\\n return () => new Chrome70();\\n }\\n get name() {\\n return 'Chrome70';\\n }\\n close() {\\n logger.debug('close()');\\n // Close RTCPeerConnection.\\n if (this._pc) {\\n try {\\n this._pc.close();\\n }\\n catch (error) { }\\n }\\n }\\n async getNativeRtpCapabilities() {\\n logger.debug('getNativeRtpCapabilities()');\\n const pc = new RTCPeerConnection({\\n iceServers: [],\\n iceTransportPolicy: 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'unified-plan'\\n });\\n try {\\n pc.addTransceiver('audio');\\n pc.addTransceiver('video');\\n const offer = await pc.createOffer();\\n try {\\n pc.close();\\n }\\n catch (error) { }\\n const sdpObject = sdpTransform.parse(offer.sdp);\\n const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({ sdpObject });\\n return nativeRtpCapabilities;\\n }\\n catch (error) {\\n try {\\n pc.close();\\n }\\n catch (error2) { }\\n throw error;\\n }\\n }\\n async getNativeSctpCapabilities() {\\n logger.debug('getNativeSctpCapabilities()');\\n return {\\n numStreams: SCTP_NUM_STREAMS\\n };\\n }\\n run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities }) {\\n logger.debug('run()');\\n this._direction = direction;\\n this._remoteSdp = new RemoteSdp_1.RemoteSdp({\\n iceParameters,\\n iceCandidates,\\n dtlsParameters,\\n sctpParameters\\n });\\n this._sendingRtpParametersByKind =\\n {\\n audio: ortc.getSendingRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRtpParameters('video', extendedRtpCapabilities)\\n };\\n this._sendingRemoteRtpParametersByKind =\\n {\\n audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)\\n };\\n if (dtlsParameters.role && dtlsParameters.role !== 'auto') {\\n this._forcedLocalDtlsRole = dtlsParameters.role === 'server'\\n ? 'client'\\n : 'server';\\n }\\n this._pc = new RTCPeerConnection({\\n iceServers: iceServers || [],\\n iceTransportPolicy: iceTransportPolicy || 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'unified-plan',\\n ...additionalSettings\\n }, proprietaryConstraints);\\n // Handle RTCPeerConnection connection status.\\n this._pc.addEventListener('iceconnectionstatechange', () => {\\n switch (this._pc.iceConnectionState) {\\n case 'checking':\\n this.emit('@connectionstatechange', 'connecting');\\n break;\\n case 'connected':\\n case 'completed':\\n this.emit('@connectionstatechange', 'connected');\\n break;\\n case 'failed':\\n this.emit('@connectionstatechange', 'failed');\\n break;\\n case 'disconnected':\\n this.emit('@connectionstatechange', 'disconnected');\\n break;\\n case 'closed':\\n this.emit('@connectionstatechange', 'closed');\\n break;\\n }\\n });\\n }\\n async updateIceServers(iceServers) {\\n logger.debug('updateIceServers()');\\n const configuration = this._pc.getConfiguration();\\n configuration.iceServers = iceServers;\\n this._pc.setConfiguration(configuration);\\n }\\n async restartIce(iceParameters) {\\n logger.debug('restartIce()');\\n // Provide the remote SDP handler with new remote ICE parameters.\\n this._remoteSdp.updateIceParameters(iceParameters);\\n if (!this._transportReady)\\n return;\\n if (this._direction === 'send') {\\n const offer = await this._pc.createOffer({ iceRestart: true });\\n logger.debug('restartIce() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n else {\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('restartIce() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n }\\n async getTransportStats() {\\n return this._pc.getStats();\\n }\\n async send({ track, encodings, codecOptions, codec }) {\\n var _a;\\n this._assertSendDirection();\\n logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);\\n const sendingRtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});\\n // This may throw.\\n sendingRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRtpParameters.codecs, codec);\\n const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});\\n // This may throw.\\n sendingRemoteRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRemoteRtpParameters.codecs, codec);\\n const mediaSectionIdx = this._remoteSdp.getNextMediaSectionIdx();\\n const transceiver = this._pc.addTransceiver(track, { direction: 'sendonly', streams: [this._sendStream] });\\n let offer = await this._pc.createOffer();\\n let localSdpObject = sdpTransform.parse(offer.sdp);\\n let offerMediaObject;\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n if (encodings && encodings.length > 1) {\\n logger.debug('send() | enabling legacy simulcast');\\n localSdpObject = sdpTransform.parse(offer.sdp);\\n offerMediaObject = localSdpObject.media[mediaSectionIdx.idx];\\n sdpUnifiedPlanUtils.addLegacySimulcast({\\n offerMediaObject,\\n numStreams: encodings.length\\n });\\n offer = { type: 'offer', sdp: sdpTransform.write(localSdpObject) };\\n }\\n // Special case for VP9 with SVC.\\n let hackVp9Svc = false;\\n const layers = (0, scalabilityModes_1.parse)((encodings || [{}])[0].scalabilityMode);\\n if (encodings &&\\n encodings.length === 1 &&\\n layers.spatialLayers > 1 &&\\n sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp9') {\\n logger.debug('send() | enabling legacy simulcast for VP9 SVC');\\n hackVp9Svc = true;\\n localSdpObject = sdpTransform.parse(offer.sdp);\\n offerMediaObject = localSdpObject.media[mediaSectionIdx.idx];\\n sdpUnifiedPlanUtils.addLegacySimulcast({\\n offerMediaObject,\\n numStreams: layers.spatialLayers\\n });\\n offer = { type: 'offer', sdp: sdpTransform.write(localSdpObject) };\\n }\\n logger.debug('send() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n // If encodings are given, apply them now.\\n if (encodings) {\\n logger.debug('send() | applying given encodings');\\n const parameters = transceiver.sender.getParameters();\\n for (let idx = 0; idx < (parameters.encodings || []).length; ++idx) {\\n const encoding = parameters.encodings[idx];\\n const desiredEncoding = encodings[idx];\\n // Should not happen but just in case.\\n if (!desiredEncoding)\\n break;\\n parameters.encodings[idx] = Object.assign(encoding, desiredEncoding);\\n }\\n await transceiver.sender.setParameters(parameters);\\n }\\n // We can now get the transceiver.mid.\\n const localId = transceiver.mid;\\n // Set MID.\\n sendingRtpParameters.mid = localId;\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n offerMediaObject = localSdpObject.media[mediaSectionIdx.idx];\\n // Set RTCP CNAME.\\n sendingRtpParameters.rtcp.cname =\\n sdpCommonUtils.getCname({ offerMediaObject });\\n // Set RTP encodings.\\n sendingRtpParameters.encodings =\\n sdpUnifiedPlanUtils.getRtpEncodings({ offerMediaObject });\\n // Complete encodings with given values.\\n if (encodings) {\\n for (let idx = 0; idx < sendingRtpParameters.encodings.length; ++idx) {\\n if (encodings[idx])\\n Object.assign(sendingRtpParameters.encodings[idx], encodings[idx]);\\n }\\n }\\n // Hack for VP9 SVC.\\n if (hackVp9Svc) {\\n sendingRtpParameters.encodings = [sendingRtpParameters.encodings[0]];\\n }\\n // If VP8 or H264 and there is effective simulcast, add scalabilityMode to\\n // each encoding.\\n if (sendingRtpParameters.encodings.length > 1 &&\\n (sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8' ||\\n sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {\\n for (const encoding of sendingRtpParameters.encodings) {\\n encoding.scalabilityMode = 'S1T3';\\n }\\n }\\n this._remoteSdp.send({\\n offerMediaObject,\\n reuseMid: mediaSectionIdx.reuseMid,\\n offerRtpParameters: sendingRtpParameters,\\n answerRtpParameters: sendingRemoteRtpParameters,\\n codecOptions\\n });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('send() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n // Store in the map.\\n this._mapMidTransceiver.set(localId, transceiver);\\n return {\\n localId,\\n rtpParameters: sendingRtpParameters,\\n rtpSender: transceiver.sender\\n };\\n }\\n async stopSending(localId) {\\n this._assertSendDirection();\\n logger.debug('stopSending() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n transceiver.sender.replaceTrack(null);\\n this._pc.removeTrack(transceiver.sender);\\n this._remoteSdp.closeMediaSection(transceiver.mid);\\n const offer = await this._pc.createOffer();\\n logger.debug('stopSending() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._mapMidTransceiver.delete(localId);\\n }\\n async replaceTrack(localId, track) {\\n this._assertSendDirection();\\n if (track) {\\n logger.debug('replaceTrack() [localId:%s, track.id:%s]', localId, track.id);\\n }\\n else {\\n logger.debug('replaceTrack() [localId:%s, no track]', localId);\\n }\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n await transceiver.sender.replaceTrack(track);\\n }\\n async setMaxSpatialLayer(localId, spatialLayer) {\\n this._assertSendDirection();\\n logger.debug('setMaxSpatialLayer() [localId:%s, spatialLayer:%s]', localId, spatialLayer);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n const parameters = transceiver.sender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n if (idx <= spatialLayer)\\n encoding.active = true;\\n else\\n encoding.active = false;\\n });\\n await transceiver.sender.setParameters(parameters);\\n }\\n async setRtpEncodingParameters(localId, params) {\\n this._assertSendDirection();\\n logger.debug('setRtpEncodingParameters() [localId:%s, params:%o]', localId, params);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n const parameters = transceiver.sender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n parameters.encodings[idx] = { ...encoding, ...params };\\n });\\n await transceiver.sender.setParameters(parameters);\\n }\\n async getSenderStats(localId) {\\n this._assertSendDirection();\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n return transceiver.sender.getStats();\\n }\\n async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {\\n var _a;\\n this._assertSendDirection();\\n const options = {\\n negotiated: true,\\n id: this._nextSendSctpStreamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmitTime: maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('sendDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // Increase next id.\\n this._nextSendSctpStreamId =\\n ++this._nextSendSctpStreamId % SCTP_NUM_STREAMS.MIS;\\n // If this is the first DataChannel we need to create the SDP answer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n const offer = await this._pc.createOffer();\\n const localSdpObject = sdpTransform.parse(offer.sdp);\\n const offerMediaObject = localSdpObject.media\\n .find((m) => m.type === 'application');\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n this._remoteSdp.sendSctpAssociation({ offerMediaObject });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n const sctpStreamParameters = {\\n streamId: options.id,\\n ordered: options.ordered,\\n maxPacketLifeTime: options.maxPacketLifeTime,\\n maxRetransmits: options.maxRetransmits\\n };\\n return { dataChannel, sctpStreamParameters };\\n }\\n async receive({ trackId, kind, rtpParameters }) {\\n var _a;\\n this._assertRecvDirection();\\n logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);\\n const localId = rtpParameters.mid || String(this._mapMidTransceiver.size);\\n this._remoteSdp.receive({\\n mid: localId,\\n kind,\\n offerRtpParameters: rtpParameters,\\n streamId: rtpParameters.rtcp.cname,\\n trackId\\n });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receive() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n let answer = await this._pc.createAnswer();\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n const answerMediaObject = localSdpObject.media\\n .find((m) => String(m.mid) === localId);\\n // May need to modify codec parameters in the answer based on codec\\n // parameters in the offer.\\n sdpCommonUtils.applyCodecParameters({\\n offerRtpParameters: rtpParameters,\\n answerMediaObject\\n });\\n answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n const transceiver = this._pc.getTransceivers()\\n .find((t) => t.mid === localId);\\n if (!transceiver)\\n throw new Error('new RTCRtpTransceiver not found');\\n // Store in the map.\\n this._mapMidTransceiver.set(localId, transceiver);\\n return {\\n localId,\\n track: transceiver.receiver.track,\\n rtpReceiver: transceiver.receiver\\n };\\n }\\n async stopReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('stopReceiving() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n this._remoteSdp.closeMediaSection(transceiver.mid);\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._mapMidTransceiver.delete(localId);\\n }\\n async pauseReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n async resumeReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n async getReceiverStats(localId) {\\n this._assertRecvDirection();\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n return transceiver.receiver.getStats();\\n }\\n async receiveDataChannel({ sctpStreamParameters, label, protocol }) {\\n var _a;\\n this._assertRecvDirection();\\n const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;\\n const options = {\\n negotiated: true,\\n id: streamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmitTime: maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('receiveDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // If this is the first DataChannel we need to create the SDP offer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n this._remoteSdp.receiveSctpAssociation();\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n if (!this._transportReady) {\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n return { dataChannel };\\n }\\n async _setupTransport({ localDtlsRole, localSdpObject }) {\\n if (!localSdpObject)\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n // Get our local DTLS parameters.\\n const dtlsParameters = sdpCommonUtils.extractDtlsParameters({ sdpObject: localSdpObject });\\n // Set our DTLS role.\\n dtlsParameters.role = localDtlsRole;\\n // Update the remote DTLS role in the SDP.\\n this._remoteSdp.updateDtlsRole(localDtlsRole === 'client' ? 'server' : 'client');\\n // Need to tell the remote transport about our parameters.\\n await this.safeEmitAsPromise('@connect', { dtlsParameters });\\n this._transportReady = true;\\n }\\n _assertSendDirection() {\\n if (this._direction !== 'send') {\\n throw new Error('method can just be called for handlers with \\\"send\\\" direction');\\n }\\n }\\n _assertRecvDirection() {\\n if (this._direction !== 'recv') {\\n throw new Error('method can just be called for handlers with \\\"recv\\\" direction');\\n }\\n }\\n}\\nexports.Chrome70 = Chrome70;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/Chrome70.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/Chrome74.js\":\n/*!****************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/Chrome74.js ***!\n \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Chrome74 = void 0;\\nconst sdpTransform = __importStar(__webpack_require__(/*! sdp-transform */ \\\"./node_modules/sdp-transform/lib/index.js\\\"));\\nconst Logger_1 = __webpack_require__(/*! ../Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ../ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst sdpCommonUtils = __importStar(__webpack_require__(/*! ./sdp/commonUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js\\\"));\\nconst sdpUnifiedPlanUtils = __importStar(__webpack_require__(/*! ./sdp/unifiedPlanUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/unifiedPlanUtils.js\\\"));\\nconst HandlerInterface_1 = __webpack_require__(/*! ./HandlerInterface */ \\\"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\\\");\\nconst RemoteSdp_1 = __webpack_require__(/*! ./sdp/RemoteSdp */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js\\\");\\nconst scalabilityModes_1 = __webpack_require__(/*! ../scalabilityModes */ \\\"./node_modules/mediasoup-client/lib/scalabilityModes.js\\\");\\nconst logger = new Logger_1.Logger('Chrome74');\\nconst SCTP_NUM_STREAMS = { OS: 1024, MIS: 1024 };\\nclass Chrome74 extends HandlerInterface_1.HandlerInterface {\\n constructor() {\\n super();\\n // Map of RTCTransceivers indexed by MID.\\n this._mapMidTransceiver = new Map();\\n // Local stream for sending.\\n this._sendStream = new MediaStream();\\n // Whether a DataChannel m=application section has been created.\\n this._hasDataChannelMediaSection = false;\\n // Sending DataChannel id value counter. Incremented for each new DataChannel.\\n this._nextSendSctpStreamId = 0;\\n // Got transport local and remote parameters.\\n this._transportReady = false;\\n }\\n /**\\n * Creates a factory function.\\n */\\n static createFactory() {\\n return () => new Chrome74();\\n }\\n get name() {\\n return 'Chrome74';\\n }\\n close() {\\n logger.debug('close()');\\n // Close RTCPeerConnection.\\n if (this._pc) {\\n try {\\n this._pc.close();\\n }\\n catch (error) { }\\n }\\n }\\n async getNativeRtpCapabilities() {\\n logger.debug('getNativeRtpCapabilities()');\\n const pc = new RTCPeerConnection({\\n iceServers: [],\\n iceTransportPolicy: 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'unified-plan'\\n });\\n try {\\n pc.addTransceiver('audio');\\n pc.addTransceiver('video');\\n const offer = await pc.createOffer();\\n try {\\n pc.close();\\n }\\n catch (error) { }\\n const sdpObject = sdpTransform.parse(offer.sdp);\\n const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({ sdpObject });\\n return nativeRtpCapabilities;\\n }\\n catch (error) {\\n try {\\n pc.close();\\n }\\n catch (error2) { }\\n throw error;\\n }\\n }\\n async getNativeSctpCapabilities() {\\n logger.debug('getNativeSctpCapabilities()');\\n return {\\n numStreams: SCTP_NUM_STREAMS\\n };\\n }\\n run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities }) {\\n logger.debug('run()');\\n this._direction = direction;\\n this._remoteSdp = new RemoteSdp_1.RemoteSdp({\\n iceParameters,\\n iceCandidates,\\n dtlsParameters,\\n sctpParameters\\n });\\n this._sendingRtpParametersByKind =\\n {\\n audio: ortc.getSendingRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRtpParameters('video', extendedRtpCapabilities)\\n };\\n this._sendingRemoteRtpParametersByKind =\\n {\\n audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)\\n };\\n if (dtlsParameters.role && dtlsParameters.role !== 'auto') {\\n this._forcedLocalDtlsRole = dtlsParameters.role === 'server'\\n ? 'client'\\n : 'server';\\n }\\n this._pc = new RTCPeerConnection({\\n iceServers: iceServers || [],\\n iceTransportPolicy: iceTransportPolicy || 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'unified-plan',\\n ...additionalSettings\\n }, proprietaryConstraints);\\n // Handle RTCPeerConnection connection status.\\n this._pc.addEventListener('iceconnectionstatechange', () => {\\n switch (this._pc.iceConnectionState) {\\n case 'checking':\\n this.emit('@connectionstatechange', 'connecting');\\n break;\\n case 'connected':\\n case 'completed':\\n this.emit('@connectionstatechange', 'connected');\\n break;\\n case 'failed':\\n this.emit('@connectionstatechange', 'failed');\\n break;\\n case 'disconnected':\\n this.emit('@connectionstatechange', 'disconnected');\\n break;\\n case 'closed':\\n this.emit('@connectionstatechange', 'closed');\\n break;\\n }\\n });\\n }\\n async updateIceServers(iceServers) {\\n logger.debug('updateIceServers()');\\n const configuration = this._pc.getConfiguration();\\n configuration.iceServers = iceServers;\\n this._pc.setConfiguration(configuration);\\n }\\n async restartIce(iceParameters) {\\n logger.debug('restartIce()');\\n // Provide the remote SDP handler with new remote ICE parameters.\\n this._remoteSdp.updateIceParameters(iceParameters);\\n if (!this._transportReady)\\n return;\\n if (this._direction === 'send') {\\n const offer = await this._pc.createOffer({ iceRestart: true });\\n logger.debug('restartIce() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n else {\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('restartIce() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n }\\n async getTransportStats() {\\n return this._pc.getStats();\\n }\\n async send({ track, encodings, codecOptions, codec }) {\\n var _a;\\n this._assertSendDirection();\\n logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);\\n if (encodings && encodings.length > 1) {\\n encodings.forEach((encoding, idx) => {\\n encoding.rid = `r${idx}`;\\n });\\n }\\n const sendingRtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});\\n // This may throw.\\n sendingRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRtpParameters.codecs, codec);\\n const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});\\n // This may throw.\\n sendingRemoteRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRemoteRtpParameters.codecs, codec);\\n const mediaSectionIdx = this._remoteSdp.getNextMediaSectionIdx();\\n const transceiver = this._pc.addTransceiver(track, {\\n direction: 'sendonly',\\n streams: [this._sendStream],\\n sendEncodings: encodings\\n });\\n let offer = await this._pc.createOffer();\\n let localSdpObject = sdpTransform.parse(offer.sdp);\\n let offerMediaObject;\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n // Special case for VP9 with SVC.\\n let hackVp9Svc = false;\\n const layers = (0, scalabilityModes_1.parse)((encodings || [{}])[0].scalabilityMode);\\n if (encodings &&\\n encodings.length === 1 &&\\n layers.spatialLayers > 1 &&\\n sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp9') {\\n logger.debug('send() | enabling legacy simulcast for VP9 SVC');\\n hackVp9Svc = true;\\n localSdpObject = sdpTransform.parse(offer.sdp);\\n offerMediaObject = localSdpObject.media[mediaSectionIdx.idx];\\n sdpUnifiedPlanUtils.addLegacySimulcast({\\n offerMediaObject,\\n numStreams: layers.spatialLayers\\n });\\n offer = { type: 'offer', sdp: sdpTransform.write(localSdpObject) };\\n }\\n logger.debug('send() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n // We can now get the transceiver.mid.\\n const localId = transceiver.mid;\\n // Set MID.\\n sendingRtpParameters.mid = localId;\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n offerMediaObject = localSdpObject.media[mediaSectionIdx.idx];\\n // Set RTCP CNAME.\\n sendingRtpParameters.rtcp.cname =\\n sdpCommonUtils.getCname({ offerMediaObject });\\n // Set RTP encodings by parsing the SDP offer if no encodings are given.\\n if (!encodings) {\\n sendingRtpParameters.encodings =\\n sdpUnifiedPlanUtils.getRtpEncodings({ offerMediaObject });\\n }\\n // Set RTP encodings by parsing the SDP offer and complete them with given\\n // one if just a single encoding has been given.\\n else if (encodings.length === 1) {\\n let newEncodings = sdpUnifiedPlanUtils.getRtpEncodings({ offerMediaObject });\\n Object.assign(newEncodings[0], encodings[0]);\\n // Hack for VP9 SVC.\\n if (hackVp9Svc)\\n newEncodings = [newEncodings[0]];\\n sendingRtpParameters.encodings = newEncodings;\\n }\\n // Otherwise if more than 1 encoding are given use them verbatim.\\n else {\\n sendingRtpParameters.encodings = encodings;\\n }\\n // If VP8 or H264 and there is effective simulcast, add scalabilityMode to\\n // each encoding.\\n if (sendingRtpParameters.encodings.length > 1 &&\\n (sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8' ||\\n sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {\\n for (const encoding of sendingRtpParameters.encodings) {\\n encoding.scalabilityMode = 'S1T3';\\n }\\n }\\n this._remoteSdp.send({\\n offerMediaObject,\\n reuseMid: mediaSectionIdx.reuseMid,\\n offerRtpParameters: sendingRtpParameters,\\n answerRtpParameters: sendingRemoteRtpParameters,\\n codecOptions,\\n extmapAllowMixed: true\\n });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('send() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n // Store in the map.\\n this._mapMidTransceiver.set(localId, transceiver);\\n return {\\n localId,\\n rtpParameters: sendingRtpParameters,\\n rtpSender: transceiver.sender\\n };\\n }\\n async stopSending(localId) {\\n this._assertSendDirection();\\n logger.debug('stopSending() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n transceiver.sender.replaceTrack(null);\\n this._pc.removeTrack(transceiver.sender);\\n this._remoteSdp.closeMediaSection(transceiver.mid);\\n const offer = await this._pc.createOffer();\\n logger.debug('stopSending() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._mapMidTransceiver.delete(localId);\\n }\\n async replaceTrack(localId, track) {\\n this._assertSendDirection();\\n if (track) {\\n logger.debug('replaceTrack() [localId:%s, track.id:%s]', localId, track.id);\\n }\\n else {\\n logger.debug('replaceTrack() [localId:%s, no track]', localId);\\n }\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n await transceiver.sender.replaceTrack(track);\\n }\\n async setMaxSpatialLayer(localId, spatialLayer) {\\n this._assertSendDirection();\\n logger.debug('setMaxSpatialLayer() [localId:%s, spatialLayer:%s]', localId, spatialLayer);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n const parameters = transceiver.sender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n if (idx <= spatialLayer)\\n encoding.active = true;\\n else\\n encoding.active = false;\\n });\\n await transceiver.sender.setParameters(parameters);\\n }\\n async setRtpEncodingParameters(localId, params) {\\n this._assertSendDirection();\\n logger.debug('setRtpEncodingParameters() [localId:%s, params:%o]', localId, params);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n const parameters = transceiver.sender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n parameters.encodings[idx] = { ...encoding, ...params };\\n });\\n await transceiver.sender.setParameters(parameters);\\n }\\n async getSenderStats(localId) {\\n this._assertSendDirection();\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n return transceiver.sender.getStats();\\n }\\n async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {\\n var _a;\\n this._assertSendDirection();\\n const options = {\\n negotiated: true,\\n id: this._nextSendSctpStreamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('sendDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // Increase next id.\\n this._nextSendSctpStreamId =\\n ++this._nextSendSctpStreamId % SCTP_NUM_STREAMS.MIS;\\n // If this is the first DataChannel we need to create the SDP answer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n const offer = await this._pc.createOffer();\\n const localSdpObject = sdpTransform.parse(offer.sdp);\\n const offerMediaObject = localSdpObject.media\\n .find((m) => m.type === 'application');\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n this._remoteSdp.sendSctpAssociation({ offerMediaObject });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n const sctpStreamParameters = {\\n streamId: options.id,\\n ordered: options.ordered,\\n maxPacketLifeTime: options.maxPacketLifeTime,\\n maxRetransmits: options.maxRetransmits\\n };\\n return { dataChannel, sctpStreamParameters };\\n }\\n async receive({ trackId, kind, rtpParameters }) {\\n var _a;\\n this._assertRecvDirection();\\n logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);\\n const localId = rtpParameters.mid || String(this._mapMidTransceiver.size);\\n this._remoteSdp.receive({\\n mid: localId,\\n kind,\\n offerRtpParameters: rtpParameters,\\n streamId: rtpParameters.rtcp.cname,\\n trackId\\n });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receive() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n let answer = await this._pc.createAnswer();\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n const answerMediaObject = localSdpObject.media\\n .find((m) => String(m.mid) === localId);\\n // May need to modify codec parameters in the answer based on codec\\n // parameters in the offer.\\n sdpCommonUtils.applyCodecParameters({\\n offerRtpParameters: rtpParameters,\\n answerMediaObject\\n });\\n answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n const transceiver = this._pc.getTransceivers()\\n .find((t) => t.mid === localId);\\n if (!transceiver)\\n throw new Error('new RTCRtpTransceiver not found');\\n // Store in the map.\\n this._mapMidTransceiver.set(localId, transceiver);\\n return {\\n localId,\\n track: transceiver.receiver.track,\\n rtpReceiver: transceiver.receiver\\n };\\n }\\n async stopReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('stopReceiving() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n this._remoteSdp.closeMediaSection(transceiver.mid);\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._mapMidTransceiver.delete(localId);\\n }\\n async pauseReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('pauseReceiving() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n transceiver.direction = 'inactive';\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('pauseReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n async resumeReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('resumeReceiving() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n transceiver.direction = 'recvonly';\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('resumeReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n async getReceiverStats(localId) {\\n this._assertRecvDirection();\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n return transceiver.receiver.getStats();\\n }\\n async receiveDataChannel({ sctpStreamParameters, label, protocol }) {\\n var _a;\\n this._assertRecvDirection();\\n const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;\\n const options = {\\n negotiated: true,\\n id: streamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('receiveDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // If this is the first DataChannel we need to create the SDP offer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n this._remoteSdp.receiveSctpAssociation();\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n if (!this._transportReady) {\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n return { dataChannel };\\n }\\n async _setupTransport({ localDtlsRole, localSdpObject }) {\\n if (!localSdpObject)\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n // Get our local DTLS parameters.\\n const dtlsParameters = sdpCommonUtils.extractDtlsParameters({ sdpObject: localSdpObject });\\n // Set our DTLS role.\\n dtlsParameters.role = localDtlsRole;\\n // Update the remote DTLS role in the SDP.\\n this._remoteSdp.updateDtlsRole(localDtlsRole === 'client' ? 'server' : 'client');\\n // Need to tell the remote transport about our parameters.\\n await this.safeEmitAsPromise('@connect', { dtlsParameters });\\n this._transportReady = true;\\n }\\n _assertSendDirection() {\\n if (this._direction !== 'send') {\\n throw new Error('method can just be called for handlers with \\\"send\\\" direction');\\n }\\n }\\n _assertRecvDirection() {\\n if (this._direction !== 'recv') {\\n throw new Error('method can just be called for handlers with \\\"recv\\\" direction');\\n }\\n }\\n}\\nexports.Chrome74 = Chrome74;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/Chrome74.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/Edge11.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/Edge11.js ***!\n \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Edge11 = void 0;\\nconst Logger_1 = __webpack_require__(/*! ../Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst errors_1 = __webpack_require__(/*! ../errors */ \\\"./node_modules/mediasoup-client/lib/errors.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ../ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst edgeUtils = __importStar(__webpack_require__(/*! ./ortc/edgeUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/ortc/edgeUtils.js\\\"));\\nconst HandlerInterface_1 = __webpack_require__(/*! ./HandlerInterface */ \\\"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\\\");\\nconst logger = new Logger_1.Logger('Edge11');\\nclass Edge11 extends HandlerInterface_1.HandlerInterface {\\n constructor() {\\n super();\\n // Map of RTCRtpSenders indexed by id.\\n this._rtpSenders = new Map();\\n // Map of RTCRtpReceivers indexed by id.\\n this._rtpReceivers = new Map();\\n // Next localId for sending tracks.\\n this._nextSendLocalId = 0;\\n // Got transport local and remote parameters.\\n this._transportReady = false;\\n }\\n /**\\n * Creates a factory function.\\n */\\n static createFactory() {\\n return () => new Edge11();\\n }\\n get name() {\\n return 'Edge11';\\n }\\n close() {\\n logger.debug('close()');\\n // Close the ICE gatherer.\\n // NOTE: Not yet implemented by Edge.\\n try {\\n this._iceGatherer.close();\\n }\\n catch (error) { }\\n // Close the ICE transport.\\n try {\\n this._iceTransport.stop();\\n }\\n catch (error) { }\\n // Close the DTLS transport.\\n try {\\n this._dtlsTransport.stop();\\n }\\n catch (error) { }\\n // Close RTCRtpSenders.\\n for (const rtpSender of this._rtpSenders.values()) {\\n try {\\n rtpSender.stop();\\n }\\n catch (error) { }\\n }\\n // Close RTCRtpReceivers.\\n for (const rtpReceiver of this._rtpReceivers.values()) {\\n try {\\n rtpReceiver.stop();\\n }\\n catch (error) { }\\n }\\n }\\n async getNativeRtpCapabilities() {\\n logger.debug('getNativeRtpCapabilities()');\\n return edgeUtils.getCapabilities();\\n }\\n async getNativeSctpCapabilities() {\\n logger.debug('getNativeSctpCapabilities()');\\n return {\\n numStreams: { OS: 0, MIS: 0 }\\n };\\n }\\n run({ direction, // eslint-disable-line @typescript-eslint/no-unused-vars\\n iceParameters, iceCandidates, dtlsParameters, sctpParameters, // eslint-disable-line @typescript-eslint/no-unused-vars\\n iceServers, iceTransportPolicy, additionalSettings, // eslint-disable-line @typescript-eslint/no-unused-vars\\n proprietaryConstraints, // eslint-disable-line @typescript-eslint/no-unused-vars\\n extendedRtpCapabilities }) {\\n logger.debug('run()');\\n this._sendingRtpParametersByKind =\\n {\\n audio: ortc.getSendingRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRtpParameters('video', extendedRtpCapabilities)\\n };\\n this._remoteIceParameters = iceParameters;\\n this._remoteIceCandidates = iceCandidates;\\n this._remoteDtlsParameters = dtlsParameters;\\n this._cname = `CNAME-${utils.generateRandomNumber()}`;\\n this._setIceGatherer({ iceServers, iceTransportPolicy });\\n this._setIceTransport();\\n this._setDtlsTransport();\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n async updateIceServers(iceServers) {\\n // NOTE: Edge 11 does not implement iceGatherer.gater().\\n throw new errors_1.UnsupportedError('not supported');\\n }\\n async restartIce(iceParameters) {\\n logger.debug('restartIce()');\\n this._remoteIceParameters = iceParameters;\\n if (!this._transportReady)\\n return;\\n logger.debug('restartIce() | calling iceTransport.start()');\\n this._iceTransport.start(this._iceGatherer, iceParameters, 'controlling');\\n for (const candidate of this._remoteIceCandidates) {\\n this._iceTransport.addRemoteCandidate(candidate);\\n }\\n this._iceTransport.addRemoteCandidate({});\\n }\\n async getTransportStats() {\\n return this._iceTransport.getStats();\\n }\\n async send(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n { track, encodings, codecOptions, codec }) {\\n logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);\\n if (!this._transportReady)\\n await this._setupTransport({ localDtlsRole: 'server' });\\n logger.debug('send() | calling new RTCRtpSender()');\\n const rtpSender = new RTCRtpSender(track, this._dtlsTransport);\\n const rtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});\\n rtpParameters.codecs = ortc.reduceCodecs(rtpParameters.codecs, codec);\\n const useRtx = rtpParameters.codecs\\n .some((_codec) => /.+\\\\/rtx$/i.test(_codec.mimeType));\\n if (!encodings)\\n encodings = [{}];\\n for (const encoding of encodings) {\\n encoding.ssrc = utils.generateRandomNumber();\\n if (useRtx)\\n encoding.rtx = { ssrc: utils.generateRandomNumber() };\\n }\\n rtpParameters.encodings = encodings;\\n // Fill RTCRtpParameters.rtcp.\\n rtpParameters.rtcp =\\n {\\n cname: this._cname,\\n reducedSize: true,\\n mux: true\\n };\\n // NOTE: Convert our standard RTCRtpParameters into those that Edge\\n // expects.\\n const edgeRtpParameters = edgeUtils.mangleRtpParameters(rtpParameters);\\n logger.debug('send() | calling rtpSender.send() [params:%o]', edgeRtpParameters);\\n await rtpSender.send(edgeRtpParameters);\\n const localId = String(this._nextSendLocalId);\\n this._nextSendLocalId++;\\n // Store it.\\n this._rtpSenders.set(localId, rtpSender);\\n return { localId, rtpParameters, rtpSender };\\n }\\n async stopSending(localId) {\\n logger.debug('stopSending() [localId:%s]', localId);\\n const rtpSender = this._rtpSenders.get(localId);\\n if (!rtpSender)\\n throw new Error('RTCRtpSender not found');\\n this._rtpSenders.delete(localId);\\n try {\\n logger.debug('stopSending() | calling rtpSender.stop()');\\n rtpSender.stop();\\n }\\n catch (error) {\\n logger.warn('stopSending() | rtpSender.stop() failed:%o', error);\\n throw error;\\n }\\n }\\n async replaceTrack(localId, track) {\\n if (track) {\\n logger.debug('replaceTrack() [localId:%s, track.id:%s]', localId, track.id);\\n }\\n else {\\n logger.debug('replaceTrack() [localId:%s, no track]', localId);\\n }\\n const rtpSender = this._rtpSenders.get(localId);\\n if (!rtpSender)\\n throw new Error('RTCRtpSender not found');\\n rtpSender.setTrack(track);\\n }\\n async setMaxSpatialLayer(localId, spatialLayer) {\\n logger.debug('setMaxSpatialLayer() [localId:%s, spatialLayer:%s]', localId, spatialLayer);\\n const rtpSender = this._rtpSenders.get(localId);\\n if (!rtpSender)\\n throw new Error('RTCRtpSender not found');\\n const parameters = rtpSender.getParameters();\\n parameters.encodings\\n .forEach((encoding, idx) => {\\n if (idx <= spatialLayer)\\n encoding.active = true;\\n else\\n encoding.active = false;\\n });\\n await rtpSender.setParameters(parameters);\\n }\\n async setRtpEncodingParameters(localId, params) {\\n logger.debug('setRtpEncodingParameters() [localId:%s, params:%o]', localId, params);\\n const rtpSender = this._rtpSenders.get(localId);\\n if (!rtpSender)\\n throw new Error('RTCRtpSender not found');\\n const parameters = rtpSender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n parameters.encodings[idx] = { ...encoding, ...params };\\n });\\n await rtpSender.setParameters(parameters);\\n }\\n async getSenderStats(localId) {\\n const rtpSender = this._rtpSenders.get(localId);\\n if (!rtpSender)\\n throw new Error('RTCRtpSender not found');\\n return rtpSender.getStats();\\n }\\n async sendDataChannel(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n options) {\\n throw new errors_1.UnsupportedError('not implemented');\\n }\\n async receive({ trackId, kind, rtpParameters }) {\\n logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);\\n if (!this._transportReady)\\n await this._setupTransport({ localDtlsRole: 'server' });\\n logger.debug('receive() | calling new RTCRtpReceiver()');\\n const rtpReceiver = new RTCRtpReceiver(this._dtlsTransport, kind);\\n rtpReceiver.addEventListener('error', (event) => {\\n logger.error('rtpReceiver \\\"error\\\" event [event:%o]', event);\\n });\\n // NOTE: Convert our standard RTCRtpParameters into those that Edge\\n // expects.\\n const edgeRtpParameters = edgeUtils.mangleRtpParameters(rtpParameters);\\n logger.debug('receive() | calling rtpReceiver.receive() [params:%o]', edgeRtpParameters);\\n await rtpReceiver.receive(edgeRtpParameters);\\n const localId = trackId;\\n // Store it.\\n this._rtpReceivers.set(localId, rtpReceiver);\\n return {\\n localId,\\n track: rtpReceiver.track,\\n rtpReceiver\\n };\\n }\\n async stopReceiving(localId) {\\n logger.debug('stopReceiving() [localId:%s]', localId);\\n const rtpReceiver = this._rtpReceivers.get(localId);\\n if (!rtpReceiver)\\n throw new Error('RTCRtpReceiver not found');\\n this._rtpReceivers.delete(localId);\\n try {\\n logger.debug('stopReceiving() | calling rtpReceiver.stop()');\\n rtpReceiver.stop();\\n }\\n catch (error) {\\n logger.warn('stopReceiving() | rtpReceiver.stop() failed:%o', error);\\n }\\n }\\n async pauseReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n async resumeReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n async getReceiverStats(localId) {\\n const rtpReceiver = this._rtpReceivers.get(localId);\\n if (!rtpReceiver)\\n throw new Error('RTCRtpReceiver not found');\\n return rtpReceiver.getStats();\\n }\\n async receiveDataChannel(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n options) {\\n throw new errors_1.UnsupportedError('not implemented');\\n }\\n _setIceGatherer({ iceServers, iceTransportPolicy }) {\\n // @ts-ignore\\n const iceGatherer = new RTCIceGatherer({\\n iceServers: iceServers || [],\\n gatherPolicy: iceTransportPolicy || 'all'\\n });\\n iceGatherer.addEventListener('error', (event) => {\\n logger.error('iceGatherer \\\"error\\\" event [event:%o]', event);\\n });\\n // NOTE: Not yet implemented by Edge, which starts gathering automatically.\\n try {\\n iceGatherer.gather();\\n }\\n catch (error) {\\n logger.debug('_setIceGatherer() | iceGatherer.gather() failed: %s', error.toString());\\n }\\n this._iceGatherer = iceGatherer;\\n }\\n _setIceTransport() {\\n const iceTransport = new RTCIceTransport(this._iceGatherer);\\n // NOTE: Not yet implemented by Edge.\\n iceTransport.addEventListener('statechange', () => {\\n switch (iceTransport.state) {\\n case 'checking':\\n this.emit('@connectionstatechange', 'connecting');\\n break;\\n case 'connected':\\n case 'completed':\\n this.emit('@connectionstatechange', 'connected');\\n break;\\n case 'failed':\\n this.emit('@connectionstatechange', 'failed');\\n break;\\n case 'disconnected':\\n this.emit('@connectionstatechange', 'disconnected');\\n break;\\n case 'closed':\\n this.emit('@connectionstatechange', 'closed');\\n break;\\n }\\n });\\n // NOTE: Not standard, but implemented by Edge.\\n iceTransport.addEventListener('icestatechange', () => {\\n switch (iceTransport.state) {\\n case 'checking':\\n this.emit('@connectionstatechange', 'connecting');\\n break;\\n case 'connected':\\n case 'completed':\\n this.emit('@connectionstatechange', 'connected');\\n break;\\n case 'failed':\\n this.emit('@connectionstatechange', 'failed');\\n break;\\n case 'disconnected':\\n this.emit('@connectionstatechange', 'disconnected');\\n break;\\n case 'closed':\\n this.emit('@connectionstatechange', 'closed');\\n break;\\n }\\n });\\n iceTransport.addEventListener('candidatepairchange', (event) => {\\n logger.debug('iceTransport \\\"candidatepairchange\\\" event [pair:%o]', event.pair);\\n });\\n this._iceTransport = iceTransport;\\n }\\n _setDtlsTransport() {\\n const dtlsTransport = new RTCDtlsTransport(this._iceTransport);\\n // NOTE: Not yet implemented by Edge.\\n dtlsTransport.addEventListener('statechange', () => {\\n logger.debug('dtlsTransport \\\"statechange\\\" event [state:%s]', dtlsTransport.state);\\n });\\n // NOTE: Not standard, but implemented by Edge.\\n dtlsTransport.addEventListener('dtlsstatechange', () => {\\n logger.debug('dtlsTransport \\\"dtlsstatechange\\\" event [state:%s]', dtlsTransport.state);\\n if (dtlsTransport.state === 'closed')\\n this.emit('@connectionstatechange', 'closed');\\n });\\n dtlsTransport.addEventListener('error', (event) => {\\n logger.error('dtlsTransport \\\"error\\\" event [event:%o]', event);\\n });\\n this._dtlsTransport = dtlsTransport;\\n }\\n async _setupTransport({ localDtlsRole }) {\\n logger.debug('_setupTransport()');\\n // Get our local DTLS parameters.\\n const dtlsParameters = this._dtlsTransport.getLocalParameters();\\n dtlsParameters.role = localDtlsRole;\\n // Need to tell the remote transport about our parameters.\\n await this.safeEmitAsPromise('@connect', { dtlsParameters });\\n // Start the RTCIceTransport.\\n this._iceTransport.start(this._iceGatherer, this._remoteIceParameters, 'controlling');\\n // Add remote ICE candidates.\\n for (const candidate of this._remoteIceCandidates) {\\n this._iceTransport.addRemoteCandidate(candidate);\\n }\\n // Also signal a 'complete' candidate as per spec.\\n // NOTE: It should be {complete: true} but Edge prefers {}.\\n // NOTE: If we don't signal end of candidates, the Edge RTCIceTransport\\n // won't enter the 'completed' state.\\n this._iceTransport.addRemoteCandidate({});\\n // NOTE: Edge does not like SHA less than 256.\\n this._remoteDtlsParameters.fingerprints = this._remoteDtlsParameters.fingerprints\\n .filter((fingerprint) => {\\n return (fingerprint.algorithm === 'sha-256' ||\\n fingerprint.algorithm === 'sha-384' ||\\n fingerprint.algorithm === 'sha-512');\\n });\\n // Start the RTCDtlsTransport.\\n this._dtlsTransport.start(this._remoteDtlsParameters);\\n this._transportReady = true;\\n }\\n}\\nexports.Edge11 = Edge11;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/Edge11.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/Firefox60.js\":\n/*!*****************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/Firefox60.js ***!\n \\*****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Firefox60 = void 0;\\nconst sdpTransform = __importStar(__webpack_require__(/*! sdp-transform */ \\\"./node_modules/sdp-transform/lib/index.js\\\"));\\nconst Logger_1 = __webpack_require__(/*! ../Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst errors_1 = __webpack_require__(/*! ../errors */ \\\"./node_modules/mediasoup-client/lib/errors.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ../ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst sdpCommonUtils = __importStar(__webpack_require__(/*! ./sdp/commonUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js\\\"));\\nconst sdpUnifiedPlanUtils = __importStar(__webpack_require__(/*! ./sdp/unifiedPlanUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/unifiedPlanUtils.js\\\"));\\nconst HandlerInterface_1 = __webpack_require__(/*! ./HandlerInterface */ \\\"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\\\");\\nconst RemoteSdp_1 = __webpack_require__(/*! ./sdp/RemoteSdp */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js\\\");\\nconst logger = new Logger_1.Logger('Firefox60');\\nconst SCTP_NUM_STREAMS = { OS: 16, MIS: 2048 };\\nclass Firefox60 extends HandlerInterface_1.HandlerInterface {\\n constructor() {\\n super();\\n // Map of RTCTransceivers indexed by MID.\\n this._mapMidTransceiver = new Map();\\n // Local stream for sending.\\n this._sendStream = new MediaStream();\\n // Whether a DataChannel m=application section has been created.\\n this._hasDataChannelMediaSection = false;\\n // Sending DataChannel id value counter. Incremented for each new DataChannel.\\n this._nextSendSctpStreamId = 0;\\n // Got transport local and remote parameters.\\n this._transportReady = false;\\n }\\n /**\\n * Creates a factory function.\\n */\\n static createFactory() {\\n return () => new Firefox60();\\n }\\n get name() {\\n return 'Firefox60';\\n }\\n close() {\\n logger.debug('close()');\\n // Close RTCPeerConnection.\\n if (this._pc) {\\n try {\\n this._pc.close();\\n }\\n catch (error) { }\\n }\\n }\\n async getNativeRtpCapabilities() {\\n logger.debug('getNativeRtpCapabilities()');\\n const pc = new RTCPeerConnection({\\n iceServers: [],\\n iceTransportPolicy: 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require'\\n });\\n // NOTE: We need to add a real video track to get the RID extension mapping.\\n const canvas = document.createElement('canvas');\\n // NOTE: Otherwise Firefox fails in next line.\\n canvas.getContext('2d');\\n const fakeStream = canvas.captureStream();\\n const fakeVideoTrack = fakeStream.getVideoTracks()[0];\\n try {\\n pc.addTransceiver('audio', { direction: 'sendrecv' });\\n const videoTransceiver = pc.addTransceiver(fakeVideoTrack, { direction: 'sendrecv' });\\n const parameters = videoTransceiver.sender.getParameters();\\n const encodings = [\\n { rid: 'r0', maxBitrate: 100000 },\\n { rid: 'r1', maxBitrate: 500000 }\\n ];\\n parameters.encodings = encodings;\\n await videoTransceiver.sender.setParameters(parameters);\\n const offer = await pc.createOffer();\\n try {\\n canvas.remove();\\n }\\n catch (error) { }\\n try {\\n fakeVideoTrack.stop();\\n }\\n catch (error) { }\\n try {\\n pc.close();\\n }\\n catch (error) { }\\n const sdpObject = sdpTransform.parse(offer.sdp);\\n const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({ sdpObject });\\n return nativeRtpCapabilities;\\n }\\n catch (error) {\\n try {\\n canvas.remove();\\n }\\n catch (error2) { }\\n try {\\n fakeVideoTrack.stop();\\n }\\n catch (error2) { }\\n try {\\n pc.close();\\n }\\n catch (error2) { }\\n throw error;\\n }\\n }\\n async getNativeSctpCapabilities() {\\n logger.debug('getNativeSctpCapabilities()');\\n return {\\n numStreams: SCTP_NUM_STREAMS\\n };\\n }\\n run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities }) {\\n logger.debug('run()');\\n this._direction = direction;\\n this._remoteSdp = new RemoteSdp_1.RemoteSdp({\\n iceParameters,\\n iceCandidates,\\n dtlsParameters,\\n sctpParameters\\n });\\n this._sendingRtpParametersByKind =\\n {\\n audio: ortc.getSendingRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRtpParameters('video', extendedRtpCapabilities)\\n };\\n this._sendingRemoteRtpParametersByKind =\\n {\\n audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)\\n };\\n this._pc = new RTCPeerConnection({\\n iceServers: iceServers || [],\\n iceTransportPolicy: iceTransportPolicy || 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n ...additionalSettings\\n }, proprietaryConstraints);\\n // Handle RTCPeerConnection connection status.\\n this._pc.addEventListener('iceconnectionstatechange', () => {\\n switch (this._pc.iceConnectionState) {\\n case 'checking':\\n this.emit('@connectionstatechange', 'connecting');\\n break;\\n case 'connected':\\n case 'completed':\\n this.emit('@connectionstatechange', 'connected');\\n break;\\n case 'failed':\\n this.emit('@connectionstatechange', 'failed');\\n break;\\n case 'disconnected':\\n this.emit('@connectionstatechange', 'disconnected');\\n break;\\n case 'closed':\\n this.emit('@connectionstatechange', 'closed');\\n break;\\n }\\n });\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n async updateIceServers(iceServers) {\\n // NOTE: Firefox does not implement pc.setConfiguration().\\n throw new errors_1.UnsupportedError('not supported');\\n }\\n async restartIce(iceParameters) {\\n logger.debug('restartIce()');\\n // Provide the remote SDP handler with new remote ICE parameters.\\n this._remoteSdp.updateIceParameters(iceParameters);\\n if (!this._transportReady)\\n return;\\n if (this._direction === 'send') {\\n const offer = await this._pc.createOffer({ iceRestart: true });\\n logger.debug('restartIce() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n else {\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('restartIce() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n }\\n async getTransportStats() {\\n return this._pc.getStats();\\n }\\n async send({ track, encodings, codecOptions, codec }) {\\n this._assertSendDirection();\\n logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);\\n if (encodings) {\\n encodings = utils.clone(encodings, []);\\n if (encodings.length > 1) {\\n encodings.forEach((encoding, idx) => {\\n encoding.rid = `r${idx}`;\\n });\\n // Clone the encodings and reverse them because Firefox likes them\\n // from high to low.\\n encodings.reverse();\\n }\\n }\\n const sendingRtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});\\n // This may throw.\\n sendingRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRtpParameters.codecs, codec);\\n const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});\\n // This may throw.\\n sendingRemoteRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRemoteRtpParameters.codecs, codec);\\n // NOTE: Firefox fails sometimes to properly anticipate the closed media\\n // section that it should use, so don't reuse closed media sections.\\n // https://github.com/versatica/mediasoup-client/issues/104\\n //\\n // const mediaSectionIdx = this._remoteSdp!.getNextMediaSectionIdx();\\n const transceiver = this._pc.addTransceiver(track, { direction: 'sendonly', streams: [this._sendStream] });\\n // NOTE: This is not spec compliants. Encodings should be given in addTransceiver\\n // second argument, but Firefox does not support it.\\n if (encodings) {\\n const parameters = transceiver.sender.getParameters();\\n parameters.encodings = encodings;\\n await transceiver.sender.setParameters(parameters);\\n }\\n const offer = await this._pc.createOffer();\\n let localSdpObject = sdpTransform.parse(offer.sdp);\\n // In Firefox use DTLS role client even if we are the \\\"offerer\\\" since\\n // Firefox does not respect ICE-Lite.\\n if (!this._transportReady)\\n await this._setupTransport({ localDtlsRole: 'client', localSdpObject });\\n logger.debug('send() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n // We can now get the transceiver.mid.\\n const localId = transceiver.mid;\\n // Set MID.\\n sendingRtpParameters.mid = localId;\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n const offerMediaObject = localSdpObject.media[localSdpObject.media.length - 1];\\n // Set RTCP CNAME.\\n sendingRtpParameters.rtcp.cname =\\n sdpCommonUtils.getCname({ offerMediaObject });\\n // Set RTP encodings by parsing the SDP offer if no encodings are given.\\n if (!encodings) {\\n sendingRtpParameters.encodings =\\n sdpUnifiedPlanUtils.getRtpEncodings({ offerMediaObject });\\n }\\n // Set RTP encodings by parsing the SDP offer and complete them with given\\n // one if just a single encoding has been given.\\n else if (encodings.length === 1) {\\n const newEncodings = sdpUnifiedPlanUtils.getRtpEncodings({ offerMediaObject });\\n Object.assign(newEncodings[0], encodings[0]);\\n sendingRtpParameters.encodings = newEncodings;\\n }\\n // Otherwise if more than 1 encoding are given use them verbatim (but\\n // reverse them back since we reversed them above to satisfy Firefox).\\n else {\\n sendingRtpParameters.encodings = encodings.reverse();\\n }\\n // If VP8 or H264 and there is effective simulcast, add scalabilityMode to\\n // each encoding.\\n if (sendingRtpParameters.encodings.length > 1 &&\\n (sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8' ||\\n sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {\\n for (const encoding of sendingRtpParameters.encodings) {\\n encoding.scalabilityMode = 'S1T3';\\n }\\n }\\n this._remoteSdp.send({\\n offerMediaObject,\\n offerRtpParameters: sendingRtpParameters,\\n answerRtpParameters: sendingRemoteRtpParameters,\\n codecOptions,\\n extmapAllowMixed: true\\n });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('send() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n // Store in the map.\\n this._mapMidTransceiver.set(localId, transceiver);\\n return {\\n localId,\\n rtpParameters: sendingRtpParameters,\\n rtpSender: transceiver.sender\\n };\\n }\\n async stopSending(localId) {\\n logger.debug('stopSending() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated transceiver not found');\\n transceiver.sender.replaceTrack(null);\\n this._pc.removeTrack(transceiver.sender);\\n // NOTE: Cannot use closeMediaSection() due to the the note above in send()\\n // method.\\n // this._remoteSdp!.closeMediaSection(transceiver.mid);\\n this._remoteSdp.disableMediaSection(transceiver.mid);\\n const offer = await this._pc.createOffer();\\n logger.debug('stopSending() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._mapMidTransceiver.delete(localId);\\n }\\n async replaceTrack(localId, track) {\\n this._assertSendDirection();\\n if (track) {\\n logger.debug('replaceTrack() [localId:%s, track.id:%s]', localId, track.id);\\n }\\n else {\\n logger.debug('replaceTrack() [localId:%s, no track]', localId);\\n }\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n await transceiver.sender.replaceTrack(track);\\n }\\n async setMaxSpatialLayer(localId, spatialLayer) {\\n this._assertSendDirection();\\n logger.debug('setMaxSpatialLayer() [localId:%s, spatialLayer:%s]', localId, spatialLayer);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated transceiver not found');\\n const parameters = transceiver.sender.getParameters();\\n // NOTE: We require encodings given from low to high, however Firefox\\n // requires them in reverse order, so do magic here.\\n spatialLayer = parameters.encodings.length - 1 - spatialLayer;\\n parameters.encodings.forEach((encoding, idx) => {\\n if (idx >= spatialLayer)\\n encoding.active = true;\\n else\\n encoding.active = false;\\n });\\n await transceiver.sender.setParameters(parameters);\\n }\\n async setRtpEncodingParameters(localId, params) {\\n this._assertSendDirection();\\n logger.debug('setRtpEncodingParameters() [localId:%s, params:%o]', localId, params);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n const parameters = transceiver.sender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n parameters.encodings[idx] = { ...encoding, ...params };\\n });\\n await transceiver.sender.setParameters(parameters);\\n }\\n async getSenderStats(localId) {\\n this._assertSendDirection();\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n return transceiver.sender.getStats();\\n }\\n async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {\\n this._assertSendDirection();\\n const options = {\\n negotiated: true,\\n id: this._nextSendSctpStreamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('sendDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // Increase next id.\\n this._nextSendSctpStreamId =\\n ++this._nextSendSctpStreamId % SCTP_NUM_STREAMS.MIS;\\n // If this is the first DataChannel we need to create the SDP answer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n const offer = await this._pc.createOffer();\\n const localSdpObject = sdpTransform.parse(offer.sdp);\\n const offerMediaObject = localSdpObject.media\\n .find((m) => m.type === 'application');\\n if (!this._transportReady)\\n await this._setupTransport({ localDtlsRole: 'client', localSdpObject });\\n logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n this._remoteSdp.sendSctpAssociation({ offerMediaObject });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n const sctpStreamParameters = {\\n streamId: options.id,\\n ordered: options.ordered,\\n maxPacketLifeTime: options.maxPacketLifeTime,\\n maxRetransmits: options.maxRetransmits\\n };\\n return { dataChannel, sctpStreamParameters };\\n }\\n async receive({ trackId, kind, rtpParameters }) {\\n this._assertRecvDirection();\\n logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);\\n const localId = rtpParameters.mid || String(this._mapMidTransceiver.size);\\n this._remoteSdp.receive({\\n mid: localId,\\n kind,\\n offerRtpParameters: rtpParameters,\\n streamId: rtpParameters.rtcp.cname,\\n trackId\\n });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receive() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n let answer = await this._pc.createAnswer();\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n const answerMediaObject = localSdpObject.media\\n .find((m) => String(m.mid) === localId);\\n // May need to modify codec parameters in the answer based on codec\\n // parameters in the offer.\\n sdpCommonUtils.applyCodecParameters({\\n offerRtpParameters: rtpParameters,\\n answerMediaObject\\n });\\n answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };\\n if (!this._transportReady)\\n await this._setupTransport({ localDtlsRole: 'client', localSdpObject });\\n logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n const transceiver = this._pc.getTransceivers()\\n .find((t) => t.mid === localId);\\n if (!transceiver)\\n throw new Error('new RTCRtpTransceiver not found');\\n // Store in the map.\\n this._mapMidTransceiver.set(localId, transceiver);\\n return {\\n localId,\\n track: transceiver.receiver.track,\\n rtpReceiver: transceiver.receiver\\n };\\n }\\n async stopReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('stopReceiving() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n this._remoteSdp.closeMediaSection(transceiver.mid);\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._mapMidTransceiver.delete(localId);\\n }\\n async pauseReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('pauseReceiving() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n transceiver.direction = 'inactive';\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('pauseReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n async resumeReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('resumeReceiving() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n transceiver.direction = 'recvonly';\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('resumeReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n async getReceiverStats(localId) {\\n this._assertRecvDirection();\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n return transceiver.receiver.getStats();\\n }\\n async receiveDataChannel({ sctpStreamParameters, label, protocol }) {\\n this._assertRecvDirection();\\n const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;\\n const options = {\\n negotiated: true,\\n id: streamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('receiveDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // If this is the first DataChannel we need to create the SDP offer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n this._remoteSdp.receiveSctpAssociation();\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n if (!this._transportReady) {\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n await this._setupTransport({ localDtlsRole: 'client', localSdpObject });\\n }\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n return { dataChannel };\\n }\\n async _setupTransport({ localDtlsRole, localSdpObject }) {\\n if (!localSdpObject)\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n // Get our local DTLS parameters.\\n const dtlsParameters = sdpCommonUtils.extractDtlsParameters({ sdpObject: localSdpObject });\\n // Set our DTLS role.\\n dtlsParameters.role = localDtlsRole;\\n // Update the remote DTLS role in the SDP.\\n this._remoteSdp.updateDtlsRole(localDtlsRole === 'client' ? 'server' : 'client');\\n // Need to tell the remote transport about our parameters.\\n await this.safeEmitAsPromise('@connect', { dtlsParameters });\\n this._transportReady = true;\\n }\\n _assertSendDirection() {\\n if (this._direction !== 'send') {\\n throw new Error('method can just be called for handlers with \\\"send\\\" direction');\\n }\\n }\\n _assertRecvDirection() {\\n if (this._direction !== 'recv') {\\n throw new Error('method can just be called for handlers with \\\"recv\\\" direction');\\n }\\n }\\n}\\nexports.Firefox60 = Firefox60;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/Firefox60.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\":\n/*!************************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js ***!\n \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.HandlerInterface = void 0;\\nconst EnhancedEventEmitter_1 = __webpack_require__(/*! ../EnhancedEventEmitter */ \\\"./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js\\\");\\nclass HandlerInterface extends EnhancedEventEmitter_1.EnhancedEventEmitter {\\n /**\\n * @emits @connect - (\\n * { dtlsParameters: DtlsParameters },\\n * callback: Function,\\n * errback: Function\\n * )\\n * @emits @connectionstatechange - (connectionState: ConnectionState)\\n */\\n constructor() {\\n super();\\n }\\n}\\nexports.HandlerInterface = HandlerInterface;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/ReactNative.js\":\n/*!*******************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/ReactNative.js ***!\n \\*******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.ReactNative = void 0;\\nconst sdpTransform = __importStar(__webpack_require__(/*! sdp-transform */ \\\"./node_modules/sdp-transform/lib/index.js\\\"));\\nconst Logger_1 = __webpack_require__(/*! ../Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst errors_1 = __webpack_require__(/*! ../errors */ \\\"./node_modules/mediasoup-client/lib/errors.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ../ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst sdpCommonUtils = __importStar(__webpack_require__(/*! ./sdp/commonUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js\\\"));\\nconst sdpPlanBUtils = __importStar(__webpack_require__(/*! ./sdp/planBUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/planBUtils.js\\\"));\\nconst HandlerInterface_1 = __webpack_require__(/*! ./HandlerInterface */ \\\"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\\\");\\nconst RemoteSdp_1 = __webpack_require__(/*! ./sdp/RemoteSdp */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js\\\");\\nconst logger = new Logger_1.Logger('ReactNative');\\nconst SCTP_NUM_STREAMS = { OS: 1024, MIS: 1024 };\\nclass ReactNative extends HandlerInterface_1.HandlerInterface {\\n constructor() {\\n super();\\n // Local stream for sending.\\n this._sendStream = new MediaStream();\\n // Map of sending MediaStreamTracks indexed by localId.\\n this._mapSendLocalIdTrack = new Map();\\n // Next sending localId.\\n this._nextSendLocalId = 0;\\n // Map of MID, RTP parameters and RTCRtpReceiver indexed by local id.\\n // Value is an Object with mid, rtpParameters and rtpReceiver.\\n this._mapRecvLocalIdInfo = new Map();\\n // Whether a DataChannel m=application section has been created.\\n this._hasDataChannelMediaSection = false;\\n // Sending DataChannel id value counter. Incremented for each new DataChannel.\\n this._nextSendSctpStreamId = 0;\\n // Got transport local and remote parameters.\\n this._transportReady = false;\\n }\\n /**\\n * Creates a factory function.\\n */\\n static createFactory() {\\n return () => new ReactNative();\\n }\\n get name() {\\n return 'ReactNative';\\n }\\n close() {\\n logger.debug('close()');\\n // Free/dispose native MediaStream but DO NOT free/dispose native\\n // MediaStreamTracks (that is parent's business).\\n // @ts-ignore (proprietary API in react-native-webrtc).\\n this._sendStream.release(/* releaseTracks */ false);\\n // Close RTCPeerConnection.\\n if (this._pc) {\\n try {\\n this._pc.close();\\n }\\n catch (error) { }\\n }\\n }\\n async getNativeRtpCapabilities() {\\n logger.debug('getNativeRtpCapabilities()');\\n const pc = new RTCPeerConnection({\\n iceServers: [],\\n iceTransportPolicy: 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'plan-b'\\n });\\n try {\\n const offer = await pc.createOffer({\\n offerToReceiveAudio: true,\\n offerToReceiveVideo: true\\n });\\n try {\\n pc.close();\\n }\\n catch (error) { }\\n const sdpObject = sdpTransform.parse(offer.sdp);\\n const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({ sdpObject });\\n return nativeRtpCapabilities;\\n }\\n catch (error) {\\n try {\\n pc.close();\\n }\\n catch (error2) { }\\n throw error;\\n }\\n }\\n async getNativeSctpCapabilities() {\\n logger.debug('getNativeSctpCapabilities()');\\n return {\\n numStreams: SCTP_NUM_STREAMS\\n };\\n }\\n run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities }) {\\n logger.debug('run()');\\n this._direction = direction;\\n this._remoteSdp = new RemoteSdp_1.RemoteSdp({\\n iceParameters,\\n iceCandidates,\\n dtlsParameters,\\n sctpParameters,\\n planB: true\\n });\\n this._sendingRtpParametersByKind =\\n {\\n audio: ortc.getSendingRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRtpParameters('video', extendedRtpCapabilities)\\n };\\n this._sendingRemoteRtpParametersByKind =\\n {\\n audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)\\n };\\n if (dtlsParameters.role && dtlsParameters.role !== 'auto') {\\n this._forcedLocalDtlsRole = dtlsParameters.role === 'server'\\n ? 'client'\\n : 'server';\\n }\\n this._pc = new RTCPeerConnection({\\n iceServers: iceServers || [],\\n iceTransportPolicy: iceTransportPolicy || 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'plan-b',\\n ...additionalSettings\\n }, proprietaryConstraints);\\n // Handle RTCPeerConnection connection status.\\n this._pc.addEventListener('iceconnectionstatechange', () => {\\n switch (this._pc.iceConnectionState) {\\n case 'checking':\\n this.emit('@connectionstatechange', 'connecting');\\n break;\\n case 'connected':\\n case 'completed':\\n this.emit('@connectionstatechange', 'connected');\\n break;\\n case 'failed':\\n this.emit('@connectionstatechange', 'failed');\\n break;\\n case 'disconnected':\\n this.emit('@connectionstatechange', 'disconnected');\\n break;\\n case 'closed':\\n this.emit('@connectionstatechange', 'closed');\\n break;\\n }\\n });\\n }\\n async updateIceServers(iceServers) {\\n logger.debug('updateIceServers()');\\n const configuration = this._pc.getConfiguration();\\n configuration.iceServers = iceServers;\\n this._pc.setConfiguration(configuration);\\n }\\n async restartIce(iceParameters) {\\n logger.debug('restartIce()');\\n // Provide the remote SDP handler with new remote ICE parameters.\\n this._remoteSdp.updateIceParameters(iceParameters);\\n if (!this._transportReady)\\n return;\\n if (this._direction === 'send') {\\n const offer = await this._pc.createOffer({ iceRestart: true });\\n logger.debug('restartIce() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n else {\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('restartIce() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n }\\n async getTransportStats() {\\n return this._pc.getStats();\\n }\\n async send({ track, encodings, codecOptions, codec }) {\\n var _a;\\n this._assertSendDirection();\\n logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);\\n if (codec) {\\n logger.warn('send() | codec selection is not available in %s handler', this.name);\\n }\\n this._sendStream.addTrack(track);\\n this._pc.addStream(this._sendStream);\\n let offer = await this._pc.createOffer();\\n let localSdpObject = sdpTransform.parse(offer.sdp);\\n let offerMediaObject;\\n const sendingRtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});\\n sendingRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRtpParameters.codecs);\\n const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});\\n sendingRemoteRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRemoteRtpParameters.codecs);\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n if (track.kind === 'video' && encodings && encodings.length > 1) {\\n logger.debug('send() | enabling simulcast');\\n localSdpObject = sdpTransform.parse(offer.sdp);\\n offerMediaObject = localSdpObject.media\\n .find((m) => m.type === 'video');\\n sdpPlanBUtils.addLegacySimulcast({\\n offerMediaObject,\\n track,\\n numStreams: encodings.length\\n });\\n offer = { type: 'offer', sdp: sdpTransform.write(localSdpObject) };\\n }\\n logger.debug('send() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n offerMediaObject = localSdpObject.media\\n .find((m) => m.type === track.kind);\\n // Set RTCP CNAME.\\n sendingRtpParameters.rtcp.cname =\\n sdpCommonUtils.getCname({ offerMediaObject });\\n // Set RTP encodings.\\n sendingRtpParameters.encodings =\\n sdpPlanBUtils.getRtpEncodings({ offerMediaObject, track });\\n // Complete encodings with given values.\\n if (encodings) {\\n for (let idx = 0; idx < sendingRtpParameters.encodings.length; ++idx) {\\n if (encodings[idx])\\n Object.assign(sendingRtpParameters.encodings[idx], encodings[idx]);\\n }\\n }\\n // If VP8 or H264 and there is effective simulcast, add scalabilityMode to\\n // each encoding.\\n if (sendingRtpParameters.encodings.length > 1 &&\\n (sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8' ||\\n sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {\\n for (const encoding of sendingRtpParameters.encodings) {\\n encoding.scalabilityMode = 'S1T3';\\n }\\n }\\n this._remoteSdp.send({\\n offerMediaObject,\\n offerRtpParameters: sendingRtpParameters,\\n answerRtpParameters: sendingRemoteRtpParameters,\\n codecOptions\\n });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('send() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n const localId = String(this._nextSendLocalId);\\n this._nextSendLocalId++;\\n // Insert into the map.\\n this._mapSendLocalIdTrack.set(localId, track);\\n return {\\n localId: localId,\\n rtpParameters: sendingRtpParameters\\n };\\n }\\n async stopSending(localId) {\\n this._assertSendDirection();\\n logger.debug('stopSending() [localId:%s]', localId);\\n const track = this._mapSendLocalIdTrack.get(localId);\\n if (!track)\\n throw new Error('track not found');\\n this._mapSendLocalIdTrack.delete(localId);\\n this._sendStream.removeTrack(track);\\n this._pc.addStream(this._sendStream);\\n const offer = await this._pc.createOffer();\\n logger.debug('stopSending() | calling pc.setLocalDescription() [offer:%o]', offer);\\n try {\\n await this._pc.setLocalDescription(offer);\\n }\\n catch (error) {\\n // NOTE: If there are no sending tracks, setLocalDescription() will fail with\\n // \\\"Failed to create channels\\\". If so, ignore it.\\n if (this._sendStream.getTracks().length === 0) {\\n logger.warn('stopSending() | ignoring expected error due no sending tracks: %s', error.toString());\\n return;\\n }\\n throw error;\\n }\\n if (this._pc.signalingState === 'stable')\\n return;\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n async replaceTrack(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId, track) {\\n throw new errors_1.UnsupportedError('not implemented');\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n async setMaxSpatialLayer(localId, spatialLayer) {\\n throw new errors_1.UnsupportedError('not implemented');\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n async setRtpEncodingParameters(localId, params) {\\n throw new errors_1.UnsupportedError('not implemented');\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n async getSenderStats(localId) {\\n throw new errors_1.UnsupportedError('not implemented');\\n }\\n async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {\\n var _a;\\n this._assertSendDirection();\\n const options = {\\n negotiated: true,\\n id: this._nextSendSctpStreamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmitTime: maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('sendDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // Increase next id.\\n this._nextSendSctpStreamId =\\n ++this._nextSendSctpStreamId % SCTP_NUM_STREAMS.MIS;\\n // If this is the first DataChannel we need to create the SDP answer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n const offer = await this._pc.createOffer();\\n const localSdpObject = sdpTransform.parse(offer.sdp);\\n const offerMediaObject = localSdpObject.media\\n .find((m) => m.type === 'application');\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n this._remoteSdp.sendSctpAssociation({ offerMediaObject });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n const sctpStreamParameters = {\\n streamId: options.id,\\n ordered: options.ordered,\\n maxPacketLifeTime: options.maxPacketLifeTime,\\n maxRetransmits: options.maxRetransmits\\n };\\n return { dataChannel, sctpStreamParameters };\\n }\\n async receive({ trackId, kind, rtpParameters }) {\\n var _a;\\n this._assertRecvDirection();\\n logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);\\n const localId = trackId;\\n const mid = kind;\\n let streamId = rtpParameters.rtcp.cname;\\n // NOTE: In React-Native we cannot reuse the same remote MediaStream for new\\n // remote tracks. This is because react-native-webrtc does not react on new\\n // tracks generated within already existing streams, so force the streamId\\n // to be different.\\n logger.debug('receive() | forcing a random remote streamId to avoid well known bug in react-native-webrtc');\\n streamId += `-hack-${utils.generateRandomNumber()}`;\\n this._remoteSdp.receive({\\n mid,\\n kind,\\n offerRtpParameters: rtpParameters,\\n streamId,\\n trackId\\n });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receive() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n let answer = await this._pc.createAnswer();\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n const answerMediaObject = localSdpObject.media\\n .find((m) => String(m.mid) === mid);\\n // May need to modify codec parameters in the answer based on codec\\n // parameters in the offer.\\n sdpCommonUtils.applyCodecParameters({\\n offerRtpParameters: rtpParameters,\\n answerMediaObject\\n });\\n answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n const stream = this._pc.getRemoteStreams()\\n .find((s) => s.id === streamId);\\n const track = stream.getTrackById(localId);\\n if (!track)\\n throw new Error('remote track not found');\\n // Insert into the map.\\n this._mapRecvLocalIdInfo.set(localId, { mid, rtpParameters });\\n return { localId, track };\\n }\\n async stopReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('stopReceiving() [localId:%s]', localId);\\n const { mid, rtpParameters } = this._mapRecvLocalIdInfo.get(localId) || {};\\n // Remove from the map.\\n this._mapRecvLocalIdInfo.delete(localId);\\n this._remoteSdp.planBStopReceiving({ mid: mid, offerRtpParameters: rtpParameters });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n async pauseReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n async resumeReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n async getReceiverStats(localId) {\\n throw new errors_1.UnsupportedError('not implemented');\\n }\\n async receiveDataChannel({ sctpStreamParameters, label, protocol }) {\\n var _a;\\n this._assertRecvDirection();\\n const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;\\n const options = {\\n negotiated: true,\\n id: streamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmitTime: maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('receiveDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // If this is the first DataChannel we need to create the SDP offer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n this._remoteSdp.receiveSctpAssociation({ oldDataChannelSpec: true });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n if (!this._transportReady) {\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n return { dataChannel };\\n }\\n async _setupTransport({ localDtlsRole, localSdpObject }) {\\n if (!localSdpObject)\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n // Get our local DTLS parameters.\\n const dtlsParameters = sdpCommonUtils.extractDtlsParameters({ sdpObject: localSdpObject });\\n // Set our DTLS role.\\n dtlsParameters.role = localDtlsRole;\\n // Update the remote DTLS role in the SDP.\\n this._remoteSdp.updateDtlsRole(localDtlsRole === 'client' ? 'server' : 'client');\\n // Need to tell the remote transport about our parameters.\\n await this.safeEmitAsPromise('@connect', { dtlsParameters });\\n this._transportReady = true;\\n }\\n _assertSendDirection() {\\n if (this._direction !== 'send') {\\n throw new Error('method can just be called for handlers with \\\"send\\\" direction');\\n }\\n }\\n _assertRecvDirection() {\\n if (this._direction !== 'recv') {\\n throw new Error('method can just be called for handlers with \\\"recv\\\" direction');\\n }\\n }\\n}\\nexports.ReactNative = ReactNative;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/ReactNative.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/Safari11.js\":\n/*!****************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/Safari11.js ***!\n \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Safari11 = void 0;\\nconst sdpTransform = __importStar(__webpack_require__(/*! sdp-transform */ \\\"./node_modules/sdp-transform/lib/index.js\\\"));\\nconst Logger_1 = __webpack_require__(/*! ../Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ../ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst sdpCommonUtils = __importStar(__webpack_require__(/*! ./sdp/commonUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js\\\"));\\nconst sdpPlanBUtils = __importStar(__webpack_require__(/*! ./sdp/planBUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/planBUtils.js\\\"));\\nconst HandlerInterface_1 = __webpack_require__(/*! ./HandlerInterface */ \\\"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\\\");\\nconst RemoteSdp_1 = __webpack_require__(/*! ./sdp/RemoteSdp */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js\\\");\\nconst logger = new Logger_1.Logger('Safari11');\\nconst SCTP_NUM_STREAMS = { OS: 1024, MIS: 1024 };\\nclass Safari11 extends HandlerInterface_1.HandlerInterface {\\n constructor() {\\n super();\\n // Local stream for sending.\\n this._sendStream = new MediaStream();\\n // Map of RTCRtpSender indexed by localId.\\n this._mapSendLocalIdRtpSender = new Map();\\n // Next sending localId.\\n this._nextSendLocalId = 0;\\n // Map of MID, RTP parameters and RTCRtpReceiver indexed by local id.\\n // Value is an Object with mid, rtpParameters and rtpReceiver.\\n this._mapRecvLocalIdInfo = new Map();\\n // Whether a DataChannel m=application section has been created.\\n this._hasDataChannelMediaSection = false;\\n // Sending DataChannel id value counter. Incremented for each new DataChannel.\\n this._nextSendSctpStreamId = 0;\\n // Got transport local and remote parameters.\\n this._transportReady = false;\\n }\\n /**\\n * Creates a factory function.\\n */\\n static createFactory() {\\n return () => new Safari11();\\n }\\n get name() {\\n return 'Safari11';\\n }\\n close() {\\n logger.debug('close()');\\n // Close RTCPeerConnection.\\n if (this._pc) {\\n try {\\n this._pc.close();\\n }\\n catch (error) { }\\n }\\n }\\n async getNativeRtpCapabilities() {\\n logger.debug('getNativeRtpCapabilities()');\\n const pc = new RTCPeerConnection({\\n iceServers: [],\\n iceTransportPolicy: 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n sdpSemantics: 'plan-b'\\n });\\n try {\\n const offer = await pc.createOffer({\\n offerToReceiveAudio: true,\\n offerToReceiveVideo: true\\n });\\n try {\\n pc.close();\\n }\\n catch (error) { }\\n const sdpObject = sdpTransform.parse(offer.sdp);\\n const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({ sdpObject });\\n return nativeRtpCapabilities;\\n }\\n catch (error) {\\n try {\\n pc.close();\\n }\\n catch (error2) { }\\n throw error;\\n }\\n }\\n async getNativeSctpCapabilities() {\\n logger.debug('getNativeSctpCapabilities()');\\n return {\\n numStreams: SCTP_NUM_STREAMS\\n };\\n }\\n run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities }) {\\n logger.debug('run()');\\n this._direction = direction;\\n this._remoteSdp = new RemoteSdp_1.RemoteSdp({\\n iceParameters,\\n iceCandidates,\\n dtlsParameters,\\n sctpParameters,\\n planB: true\\n });\\n this._sendingRtpParametersByKind =\\n {\\n audio: ortc.getSendingRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRtpParameters('video', extendedRtpCapabilities)\\n };\\n this._sendingRemoteRtpParametersByKind =\\n {\\n audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)\\n };\\n if (dtlsParameters.role && dtlsParameters.role !== 'auto') {\\n this._forcedLocalDtlsRole = dtlsParameters.role === 'server'\\n ? 'client'\\n : 'server';\\n }\\n this._pc = new RTCPeerConnection({\\n iceServers: iceServers || [],\\n iceTransportPolicy: iceTransportPolicy || 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n ...additionalSettings\\n }, proprietaryConstraints);\\n // Handle RTCPeerConnection connection status.\\n this._pc.addEventListener('iceconnectionstatechange', () => {\\n switch (this._pc.iceConnectionState) {\\n case 'checking':\\n this.emit('@connectionstatechange', 'connecting');\\n break;\\n case 'connected':\\n case 'completed':\\n this.emit('@connectionstatechange', 'connected');\\n break;\\n case 'failed':\\n this.emit('@connectionstatechange', 'failed');\\n break;\\n case 'disconnected':\\n this.emit('@connectionstatechange', 'disconnected');\\n break;\\n case 'closed':\\n this.emit('@connectionstatechange', 'closed');\\n break;\\n }\\n });\\n }\\n async updateIceServers(iceServers) {\\n logger.debug('updateIceServers()');\\n const configuration = this._pc.getConfiguration();\\n configuration.iceServers = iceServers;\\n this._pc.setConfiguration(configuration);\\n }\\n async restartIce(iceParameters) {\\n logger.debug('restartIce()');\\n // Provide the remote SDP handler with new remote ICE parameters.\\n this._remoteSdp.updateIceParameters(iceParameters);\\n if (!this._transportReady)\\n return;\\n if (this._direction === 'send') {\\n const offer = await this._pc.createOffer({ iceRestart: true });\\n logger.debug('restartIce() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n else {\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('restartIce() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n }\\n async getTransportStats() {\\n return this._pc.getStats();\\n }\\n async send({ track, encodings, codecOptions, codec }) {\\n var _a;\\n this._assertSendDirection();\\n logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);\\n if (codec) {\\n logger.warn('send() | codec selection is not available in %s handler', this.name);\\n }\\n this._sendStream.addTrack(track);\\n this._pc.addTrack(track, this._sendStream);\\n let offer = await this._pc.createOffer();\\n let localSdpObject = sdpTransform.parse(offer.sdp);\\n let offerMediaObject;\\n const sendingRtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});\\n sendingRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRtpParameters.codecs);\\n const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});\\n sendingRemoteRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRemoteRtpParameters.codecs);\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n if (track.kind === 'video' && encodings && encodings.length > 1) {\\n logger.debug('send() | enabling simulcast');\\n localSdpObject = sdpTransform.parse(offer.sdp);\\n offerMediaObject = localSdpObject.media.find((m) => m.type === 'video');\\n sdpPlanBUtils.addLegacySimulcast({\\n offerMediaObject,\\n track,\\n numStreams: encodings.length\\n });\\n offer = { type: 'offer', sdp: sdpTransform.write(localSdpObject) };\\n }\\n logger.debug('send() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n offerMediaObject = localSdpObject.media\\n .find((m) => m.type === track.kind);\\n // Set RTCP CNAME.\\n sendingRtpParameters.rtcp.cname =\\n sdpCommonUtils.getCname({ offerMediaObject });\\n // Set RTP encodings.\\n sendingRtpParameters.encodings =\\n sdpPlanBUtils.getRtpEncodings({ offerMediaObject, track });\\n // Complete encodings with given values.\\n if (encodings) {\\n for (let idx = 0; idx < sendingRtpParameters.encodings.length; ++idx) {\\n if (encodings[idx])\\n Object.assign(sendingRtpParameters.encodings[idx], encodings[idx]);\\n }\\n }\\n // If VP8 and there is effective simulcast, add scalabilityMode to each\\n // encoding.\\n if (sendingRtpParameters.encodings.length > 1 &&\\n sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8') {\\n for (const encoding of sendingRtpParameters.encodings) {\\n encoding.scalabilityMode = 'S1T3';\\n }\\n }\\n this._remoteSdp.send({\\n offerMediaObject,\\n offerRtpParameters: sendingRtpParameters,\\n answerRtpParameters: sendingRemoteRtpParameters,\\n codecOptions\\n });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('send() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n const localId = String(this._nextSendLocalId);\\n this._nextSendLocalId++;\\n const rtpSender = this._pc.getSenders()\\n .find((s) => s.track === track);\\n // Insert into the map.\\n this._mapSendLocalIdRtpSender.set(localId, rtpSender);\\n return {\\n localId: localId,\\n rtpParameters: sendingRtpParameters,\\n rtpSender\\n };\\n }\\n async stopSending(localId) {\\n this._assertSendDirection();\\n const rtpSender = this._mapSendLocalIdRtpSender.get(localId);\\n if (!rtpSender)\\n throw new Error('associated RTCRtpSender not found');\\n if (rtpSender.track)\\n this._sendStream.removeTrack(rtpSender.track);\\n this._mapSendLocalIdRtpSender.delete(localId);\\n const offer = await this._pc.createOffer();\\n logger.debug('stopSending() | calling pc.setLocalDescription() [offer:%o]', offer);\\n try {\\n await this._pc.setLocalDescription(offer);\\n }\\n catch (error) {\\n // NOTE: If there are no sending tracks, setLocalDescription() will fail with\\n // \\\"Failed to create channels\\\". If so, ignore it.\\n if (this._sendStream.getTracks().length === 0) {\\n logger.warn('stopSending() | ignoring expected error due no sending tracks: %s', error.toString());\\n return;\\n }\\n throw error;\\n }\\n if (this._pc.signalingState === 'stable')\\n return;\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n async replaceTrack(localId, track) {\\n this._assertSendDirection();\\n if (track) {\\n logger.debug('replaceTrack() [localId:%s, track.id:%s]', localId, track.id);\\n }\\n else {\\n logger.debug('replaceTrack() [localId:%s, no track]', localId);\\n }\\n const rtpSender = this._mapSendLocalIdRtpSender.get(localId);\\n if (!rtpSender)\\n throw new Error('associated RTCRtpSender not found');\\n const oldTrack = rtpSender.track;\\n await rtpSender.replaceTrack(track);\\n // Remove the old track from the local stream.\\n if (oldTrack)\\n this._sendStream.removeTrack(oldTrack);\\n // Add the new track to the local stream.\\n if (track)\\n this._sendStream.addTrack(track);\\n }\\n async setMaxSpatialLayer(localId, spatialLayer) {\\n this._assertSendDirection();\\n logger.debug('setMaxSpatialLayer() [localId:%s, spatialLayer:%s]', localId, spatialLayer);\\n const rtpSender = this._mapSendLocalIdRtpSender.get(localId);\\n if (!rtpSender)\\n throw new Error('associated RTCRtpSender not found');\\n const parameters = rtpSender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n if (idx <= spatialLayer)\\n encoding.active = true;\\n else\\n encoding.active = false;\\n });\\n await rtpSender.setParameters(parameters);\\n }\\n async setRtpEncodingParameters(localId, params) {\\n this._assertSendDirection();\\n logger.debug('setRtpEncodingParameters() [localId:%s, params:%o]', localId, params);\\n const rtpSender = this._mapSendLocalIdRtpSender.get(localId);\\n if (!rtpSender)\\n throw new Error('associated RTCRtpSender not found');\\n const parameters = rtpSender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n parameters.encodings[idx] = { ...encoding, ...params };\\n });\\n await rtpSender.setParameters(parameters);\\n }\\n async getSenderStats(localId) {\\n this._assertSendDirection();\\n const rtpSender = this._mapSendLocalIdRtpSender.get(localId);\\n if (!rtpSender)\\n throw new Error('associated RTCRtpSender not found');\\n return rtpSender.getStats();\\n }\\n async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {\\n var _a;\\n this._assertSendDirection();\\n const options = {\\n negotiated: true,\\n id: this._nextSendSctpStreamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('sendDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // Increase next id.\\n this._nextSendSctpStreamId =\\n ++this._nextSendSctpStreamId % SCTP_NUM_STREAMS.MIS;\\n // If this is the first DataChannel we need to create the SDP answer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n const offer = await this._pc.createOffer();\\n const localSdpObject = sdpTransform.parse(offer.sdp);\\n const offerMediaObject = localSdpObject.media\\n .find((m) => m.type === 'application');\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n this._remoteSdp.sendSctpAssociation({ offerMediaObject });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n const sctpStreamParameters = {\\n streamId: options.id,\\n ordered: options.ordered,\\n maxPacketLifeTime: options.maxPacketLifeTime,\\n maxRetransmits: options.maxRetransmits\\n };\\n return { dataChannel, sctpStreamParameters };\\n }\\n async receive({ trackId, kind, rtpParameters }) {\\n var _a;\\n this._assertRecvDirection();\\n logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);\\n const localId = trackId;\\n const mid = kind;\\n this._remoteSdp.receive({\\n mid,\\n kind,\\n offerRtpParameters: rtpParameters,\\n streamId: rtpParameters.rtcp.cname,\\n trackId\\n });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receive() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n let answer = await this._pc.createAnswer();\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n const answerMediaObject = localSdpObject.media\\n .find((m) => String(m.mid) === mid);\\n // May need to modify codec parameters in the answer based on codec\\n // parameters in the offer.\\n sdpCommonUtils.applyCodecParameters({\\n offerRtpParameters: rtpParameters,\\n answerMediaObject\\n });\\n answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n const rtpReceiver = this._pc.getReceivers()\\n .find((r) => r.track && r.track.id === localId);\\n if (!rtpReceiver)\\n throw new Error('new RTCRtpReceiver not');\\n // Insert into the map.\\n this._mapRecvLocalIdInfo.set(localId, { mid, rtpParameters, rtpReceiver });\\n return {\\n localId,\\n track: rtpReceiver.track,\\n rtpReceiver\\n };\\n }\\n async stopReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('stopReceiving() [localId:%s]', localId);\\n const { mid, rtpParameters } = this._mapRecvLocalIdInfo.get(localId) || {};\\n // Remove from the map.\\n this._mapRecvLocalIdInfo.delete(localId);\\n this._remoteSdp.planBStopReceiving({ mid: mid, offerRtpParameters: rtpParameters });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n async getReceiverStats(localId) {\\n this._assertRecvDirection();\\n const { rtpReceiver } = this._mapRecvLocalIdInfo.get(localId) || {};\\n if (!rtpReceiver)\\n throw new Error('associated RTCRtpReceiver not found');\\n return rtpReceiver.getStats();\\n }\\n async pauseReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n async resumeReceiving(\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n localId) {\\n // Unimplemented.\\n }\\n async receiveDataChannel({ sctpStreamParameters, label, protocol }) {\\n var _a;\\n this._assertRecvDirection();\\n const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;\\n const options = {\\n negotiated: true,\\n id: streamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('receiveDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // If this is the first DataChannel we need to create the SDP offer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n this._remoteSdp.receiveSctpAssociation({ oldDataChannelSpec: true });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n if (!this._transportReady) {\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n return { dataChannel };\\n }\\n async _setupTransport({ localDtlsRole, localSdpObject }) {\\n if (!localSdpObject)\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n // Get our local DTLS parameters.\\n const dtlsParameters = sdpCommonUtils.extractDtlsParameters({ sdpObject: localSdpObject });\\n // Set our DTLS role.\\n dtlsParameters.role = localDtlsRole;\\n // Update the remote DTLS role in the SDP.\\n this._remoteSdp.updateDtlsRole(localDtlsRole === 'client' ? 'server' : 'client');\\n // Need to tell the remote transport about our parameters.\\n await this.safeEmitAsPromise('@connect', { dtlsParameters });\\n this._transportReady = true;\\n }\\n _assertSendDirection() {\\n if (this._direction !== 'send') {\\n throw new Error('method can just be called for handlers with \\\"send\\\" direction');\\n }\\n }\\n _assertRecvDirection() {\\n if (this._direction !== 'recv') {\\n throw new Error('method can just be called for handlers with \\\"recv\\\" direction');\\n }\\n }\\n}\\nexports.Safari11 = Safari11;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/Safari11.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/Safari12.js\":\n/*!****************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/Safari12.js ***!\n \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.Safari12 = void 0;\\nconst sdpTransform = __importStar(__webpack_require__(/*! sdp-transform */ \\\"./node_modules/sdp-transform/lib/index.js\\\"));\\nconst Logger_1 = __webpack_require__(/*! ../Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst utils = __importStar(__webpack_require__(/*! ../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst ortc = __importStar(__webpack_require__(/*! ../ortc */ \\\"./node_modules/mediasoup-client/lib/ortc.js\\\"));\\nconst sdpCommonUtils = __importStar(__webpack_require__(/*! ./sdp/commonUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js\\\"));\\nconst sdpUnifiedPlanUtils = __importStar(__webpack_require__(/*! ./sdp/unifiedPlanUtils */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/unifiedPlanUtils.js\\\"));\\nconst HandlerInterface_1 = __webpack_require__(/*! ./HandlerInterface */ \\\"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\\\");\\nconst RemoteSdp_1 = __webpack_require__(/*! ./sdp/RemoteSdp */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js\\\");\\nconst logger = new Logger_1.Logger('Safari12');\\nconst SCTP_NUM_STREAMS = { OS: 1024, MIS: 1024 };\\nclass Safari12 extends HandlerInterface_1.HandlerInterface {\\n constructor() {\\n super();\\n // Map of RTCTransceivers indexed by MID.\\n this._mapMidTransceiver = new Map();\\n // Local stream for sending.\\n this._sendStream = new MediaStream();\\n // Whether a DataChannel m=application section has been created.\\n this._hasDataChannelMediaSection = false;\\n // Sending DataChannel id value counter. Incremented for each new DataChannel.\\n this._nextSendSctpStreamId = 0;\\n // Got transport local and remote parameters.\\n this._transportReady = false;\\n }\\n /**\\n * Creates a factory function.\\n */\\n static createFactory() {\\n return () => new Safari12();\\n }\\n get name() {\\n return 'Safari12';\\n }\\n close() {\\n logger.debug('close()');\\n // Close RTCPeerConnection.\\n if (this._pc) {\\n try {\\n this._pc.close();\\n }\\n catch (error) { }\\n }\\n }\\n async getNativeRtpCapabilities() {\\n logger.debug('getNativeRtpCapabilities()');\\n const pc = new RTCPeerConnection({\\n iceServers: [],\\n iceTransportPolicy: 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require'\\n });\\n try {\\n pc.addTransceiver('audio');\\n pc.addTransceiver('video');\\n const offer = await pc.createOffer();\\n try {\\n pc.close();\\n }\\n catch (error) { }\\n const sdpObject = sdpTransform.parse(offer.sdp);\\n const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({ sdpObject });\\n return nativeRtpCapabilities;\\n }\\n catch (error) {\\n try {\\n pc.close();\\n }\\n catch (error2) { }\\n throw error;\\n }\\n }\\n async getNativeSctpCapabilities() {\\n logger.debug('getNativeSctpCapabilities()');\\n return {\\n numStreams: SCTP_NUM_STREAMS\\n };\\n }\\n run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities }) {\\n logger.debug('run()');\\n this._direction = direction;\\n this._remoteSdp = new RemoteSdp_1.RemoteSdp({\\n iceParameters,\\n iceCandidates,\\n dtlsParameters,\\n sctpParameters\\n });\\n this._sendingRtpParametersByKind =\\n {\\n audio: ortc.getSendingRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRtpParameters('video', extendedRtpCapabilities)\\n };\\n this._sendingRemoteRtpParametersByKind =\\n {\\n audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),\\n video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)\\n };\\n if (dtlsParameters.role && dtlsParameters.role !== 'auto') {\\n this._forcedLocalDtlsRole = dtlsParameters.role === 'server'\\n ? 'client'\\n : 'server';\\n }\\n this._pc = new RTCPeerConnection({\\n iceServers: iceServers || [],\\n iceTransportPolicy: iceTransportPolicy || 'all',\\n bundlePolicy: 'max-bundle',\\n rtcpMuxPolicy: 'require',\\n ...additionalSettings\\n }, proprietaryConstraints);\\n // Handle RTCPeerConnection connection status.\\n this._pc.addEventListener('iceconnectionstatechange', () => {\\n switch (this._pc.iceConnectionState) {\\n case 'checking':\\n this.emit('@connectionstatechange', 'connecting');\\n break;\\n case 'connected':\\n case 'completed':\\n this.emit('@connectionstatechange', 'connected');\\n break;\\n case 'failed':\\n this.emit('@connectionstatechange', 'failed');\\n break;\\n case 'disconnected':\\n this.emit('@connectionstatechange', 'disconnected');\\n break;\\n case 'closed':\\n this.emit('@connectionstatechange', 'closed');\\n break;\\n }\\n });\\n }\\n async updateIceServers(iceServers) {\\n logger.debug('updateIceServers()');\\n const configuration = this._pc.getConfiguration();\\n configuration.iceServers = iceServers;\\n this._pc.setConfiguration(configuration);\\n }\\n async restartIce(iceParameters) {\\n logger.debug('restartIce()');\\n // Provide the remote SDP handler with new remote ICE parameters.\\n this._remoteSdp.updateIceParameters(iceParameters);\\n if (!this._transportReady)\\n return;\\n if (this._direction === 'send') {\\n const offer = await this._pc.createOffer({ iceRestart: true });\\n logger.debug('restartIce() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n }\\n else {\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('restartIce() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('restartIce() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n }\\n async getTransportStats() {\\n return this._pc.getStats();\\n }\\n async send({ track, encodings, codecOptions, codec }) {\\n var _a;\\n this._assertSendDirection();\\n logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);\\n const sendingRtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});\\n // This may throw.\\n sendingRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRtpParameters.codecs, codec);\\n const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});\\n // This may throw.\\n sendingRemoteRtpParameters.codecs =\\n ortc.reduceCodecs(sendingRemoteRtpParameters.codecs, codec);\\n const mediaSectionIdx = this._remoteSdp.getNextMediaSectionIdx();\\n const transceiver = this._pc.addTransceiver(track, { direction: 'sendonly', streams: [this._sendStream] });\\n let offer = await this._pc.createOffer();\\n let localSdpObject = sdpTransform.parse(offer.sdp);\\n let offerMediaObject;\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n if (encodings && encodings.length > 1) {\\n logger.debug('send() | enabling legacy simulcast');\\n localSdpObject = sdpTransform.parse(offer.sdp);\\n offerMediaObject = localSdpObject.media[mediaSectionIdx.idx];\\n sdpUnifiedPlanUtils.addLegacySimulcast({\\n offerMediaObject,\\n numStreams: encodings.length\\n });\\n offer = { type: 'offer', sdp: sdpTransform.write(localSdpObject) };\\n }\\n logger.debug('send() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n // We can now get the transceiver.mid.\\n const localId = transceiver.mid;\\n // Set MID.\\n sendingRtpParameters.mid = localId;\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n offerMediaObject = localSdpObject.media[mediaSectionIdx.idx];\\n // Set RTCP CNAME.\\n sendingRtpParameters.rtcp.cname =\\n sdpCommonUtils.getCname({ offerMediaObject });\\n // Set RTP encodings.\\n sendingRtpParameters.encodings =\\n sdpUnifiedPlanUtils.getRtpEncodings({ offerMediaObject });\\n // Complete encodings with given values.\\n if (encodings) {\\n for (let idx = 0; idx < sendingRtpParameters.encodings.length; ++idx) {\\n if (encodings[idx])\\n Object.assign(sendingRtpParameters.encodings[idx], encodings[idx]);\\n }\\n }\\n // If VP8 or H264 and there is effective simulcast, add scalabilityMode to\\n // each encoding.\\n if (sendingRtpParameters.encodings.length > 1 &&\\n (sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8' ||\\n sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {\\n for (const encoding of sendingRtpParameters.encodings) {\\n encoding.scalabilityMode = 'S1T3';\\n }\\n }\\n this._remoteSdp.send({\\n offerMediaObject,\\n reuseMid: mediaSectionIdx.reuseMid,\\n offerRtpParameters: sendingRtpParameters,\\n answerRtpParameters: sendingRemoteRtpParameters,\\n codecOptions\\n });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('send() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n // Store in the map.\\n this._mapMidTransceiver.set(localId, transceiver);\\n return {\\n localId,\\n rtpParameters: sendingRtpParameters,\\n rtpSender: transceiver.sender\\n };\\n }\\n async stopSending(localId) {\\n this._assertSendDirection();\\n logger.debug('stopSending() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n transceiver.sender.replaceTrack(null);\\n this._pc.removeTrack(transceiver.sender);\\n this._remoteSdp.closeMediaSection(transceiver.mid);\\n const offer = await this._pc.createOffer();\\n logger.debug('stopSending() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._mapMidTransceiver.delete(localId);\\n }\\n async replaceTrack(localId, track) {\\n this._assertSendDirection();\\n if (track) {\\n logger.debug('replaceTrack() [localId:%s, track.id:%s]', localId, track.id);\\n }\\n else {\\n logger.debug('replaceTrack() [localId:%s, no track]', localId);\\n }\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n await transceiver.sender.replaceTrack(track);\\n }\\n async setMaxSpatialLayer(localId, spatialLayer) {\\n this._assertSendDirection();\\n logger.debug('setMaxSpatialLayer() [localId:%s, spatialLayer:%s]', localId, spatialLayer);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n const parameters = transceiver.sender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n if (idx <= spatialLayer)\\n encoding.active = true;\\n else\\n encoding.active = false;\\n });\\n await transceiver.sender.setParameters(parameters);\\n }\\n async setRtpEncodingParameters(localId, params) {\\n this._assertSendDirection();\\n logger.debug('setRtpEncodingParameters() [localId:%s, params:%o]', localId, params);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n const parameters = transceiver.sender.getParameters();\\n parameters.encodings.forEach((encoding, idx) => {\\n parameters.encodings[idx] = { ...encoding, ...params };\\n });\\n await transceiver.sender.setParameters(parameters);\\n }\\n async getSenderStats(localId) {\\n this._assertSendDirection();\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n return transceiver.sender.getStats();\\n }\\n async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {\\n var _a;\\n this._assertSendDirection();\\n const options = {\\n negotiated: true,\\n id: this._nextSendSctpStreamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('sendDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // Increase next id.\\n this._nextSendSctpStreamId =\\n ++this._nextSendSctpStreamId % SCTP_NUM_STREAMS.MIS;\\n // If this is the first DataChannel we need to create the SDP answer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n const offer = await this._pc.createOffer();\\n const localSdpObject = sdpTransform.parse(offer.sdp);\\n const offerMediaObject = localSdpObject.media\\n .find((m) => m.type === 'application');\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);\\n await this._pc.setLocalDescription(offer);\\n this._remoteSdp.sendSctpAssociation({ offerMediaObject });\\n const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setRemoteDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n const sctpStreamParameters = {\\n streamId: options.id,\\n ordered: options.ordered,\\n maxPacketLifeTime: options.maxPacketLifeTime,\\n maxRetransmits: options.maxRetransmits\\n };\\n return { dataChannel, sctpStreamParameters };\\n }\\n async receive({ trackId, kind, rtpParameters }) {\\n var _a;\\n this._assertRecvDirection();\\n logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);\\n const localId = rtpParameters.mid || String(this._mapMidTransceiver.size);\\n this._remoteSdp.receive({\\n mid: localId,\\n kind,\\n offerRtpParameters: rtpParameters,\\n streamId: rtpParameters.rtcp.cname,\\n trackId\\n });\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receive() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n let answer = await this._pc.createAnswer();\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n const answerMediaObject = localSdpObject.media\\n .find((m) => String(m.mid) === localId);\\n // May need to modify codec parameters in the answer based on codec\\n // parameters in the offer.\\n sdpCommonUtils.applyCodecParameters({\\n offerRtpParameters: rtpParameters,\\n answerMediaObject\\n });\\n answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };\\n if (!this._transportReady) {\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n const transceiver = this._pc.getTransceivers()\\n .find((t) => t.mid === localId);\\n if (!transceiver)\\n throw new Error('new RTCRtpTransceiver not found');\\n // Store in the map.\\n this._mapMidTransceiver.set(localId, transceiver);\\n return {\\n localId,\\n track: transceiver.receiver.track,\\n rtpReceiver: transceiver.receiver\\n };\\n }\\n async stopReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('stopReceiving() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n this._remoteSdp.closeMediaSection(transceiver.mid);\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('stopReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._mapMidTransceiver.delete(localId);\\n }\\n async pauseReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('pauseReceiving() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n transceiver.direction = 'inactive';\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('pauseReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n async resumeReceiving(localId) {\\n this._assertRecvDirection();\\n logger.debug('resumeReceiving() [localId:%s]', localId);\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n transceiver.direction = 'recvonly';\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n logger.debug('resumeReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n }\\n async getReceiverStats(localId) {\\n this._assertRecvDirection();\\n const transceiver = this._mapMidTransceiver.get(localId);\\n if (!transceiver)\\n throw new Error('associated RTCRtpTransceiver not found');\\n return transceiver.receiver.getStats();\\n }\\n async receiveDataChannel({ sctpStreamParameters, label, protocol }) {\\n var _a;\\n this._assertRecvDirection();\\n const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;\\n const options = {\\n negotiated: true,\\n id: streamId,\\n ordered,\\n maxPacketLifeTime,\\n maxRetransmits,\\n protocol\\n };\\n logger.debug('receiveDataChannel() [options:%o]', options);\\n const dataChannel = this._pc.createDataChannel(label, options);\\n // If this is the first DataChannel we need to create the SDP offer with\\n // m=application section.\\n if (!this._hasDataChannelMediaSection) {\\n this._remoteSdp.receiveSctpAssociation();\\n const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]', offer);\\n await this._pc.setRemoteDescription(offer);\\n const answer = await this._pc.createAnswer();\\n if (!this._transportReady) {\\n const localSdpObject = sdpTransform.parse(answer.sdp);\\n await this._setupTransport({\\n localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',\\n localSdpObject\\n });\\n }\\n logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);\\n await this._pc.setLocalDescription(answer);\\n this._hasDataChannelMediaSection = true;\\n }\\n return { dataChannel };\\n }\\n async _setupTransport({ localDtlsRole, localSdpObject }) {\\n if (!localSdpObject)\\n localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);\\n // Get our local DTLS parameters.\\n const dtlsParameters = sdpCommonUtils.extractDtlsParameters({ sdpObject: localSdpObject });\\n // Set our DTLS role.\\n dtlsParameters.role = localDtlsRole;\\n // Update the remote DTLS role in the SDP.\\n this._remoteSdp.updateDtlsRole(localDtlsRole === 'client' ? 'server' : 'client');\\n // Need to tell the remote transport about our parameters.\\n await this.safeEmitAsPromise('@connect', { dtlsParameters });\\n this._transportReady = true;\\n }\\n _assertSendDirection() {\\n if (this._direction !== 'send') {\\n throw new Error('method can just be called for handlers with \\\"send\\\" direction');\\n }\\n }\\n _assertRecvDirection() {\\n if (this._direction !== 'recv') {\\n throw new Error('method can just be called for handlers with \\\"recv\\\" direction');\\n }\\n }\\n}\\nexports.Safari12 = Safari12;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/Safari12.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/ortc/edgeUtils.js\":\n/*!**********************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/ortc/edgeUtils.js ***!\n \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.mangleRtpParameters = exports.getCapabilities = void 0;\\nconst utils = __importStar(__webpack_require__(/*! ../../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\n/**\\n * Normalize ORTC based Edge's RTCRtpReceiver.getCapabilities() to produce a full\\n * compliant ORTC RTCRtpCapabilities.\\n */\\nfunction getCapabilities() {\\n const nativeCaps = RTCRtpReceiver.getCapabilities();\\n const caps = utils.clone(nativeCaps, {});\\n for (const codec of caps.codecs) {\\n // Rename numChannels to channels.\\n codec.channels = codec.numChannels;\\n delete codec.numChannels;\\n // Add mimeType.\\n codec.mimeType = codec.mimeType || `${codec.kind}/${codec.name}`;\\n // NOTE: Edge sets some numeric parameters as string rather than number. Fix them.\\n if (codec.parameters) {\\n const parameters = codec.parameters;\\n if (parameters.apt)\\n parameters.apt = Number(parameters.apt);\\n if (parameters['packetization-mode'])\\n parameters['packetization-mode'] = Number(parameters['packetization-mode']);\\n }\\n // Delete emty parameter String in rtcpFeedback.\\n for (const feedback of codec.rtcpFeedback || []) {\\n if (!feedback.parameter)\\n feedback.parameter = '';\\n }\\n }\\n return caps;\\n}\\nexports.getCapabilities = getCapabilities;\\n/**\\n * Generate RTCRtpParameters as ORTC based Edge likes.\\n */\\nfunction mangleRtpParameters(rtpParameters) {\\n const params = utils.clone(rtpParameters, {});\\n // Rename mid to muxId.\\n if (params.mid) {\\n params.muxId = params.mid;\\n delete params.mid;\\n }\\n for (const codec of params.codecs) {\\n // Rename channels to numChannels.\\n if (codec.channels) {\\n codec.numChannels = codec.channels;\\n delete codec.channels;\\n }\\n // Add codec.name (requried by Edge).\\n if (codec.mimeType && !codec.name)\\n codec.name = codec.mimeType.split('/')[1];\\n // Remove mimeType.\\n delete codec.mimeType;\\n }\\n return params;\\n}\\nexports.mangleRtpParameters = mangleRtpParameters;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/ortc/edgeUtils.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/sdp/MediaSection.js\":\n/*!************************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/sdp/MediaSection.js ***!\n \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.OfferMediaSection = exports.AnswerMediaSection = exports.MediaSection = void 0;\\nconst utils = __importStar(__webpack_require__(/*! ../../utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nclass MediaSection {\\n constructor({ iceParameters, iceCandidates, dtlsParameters, planB = false }) {\\n this._mediaObject = {};\\n this._planB = planB;\\n if (iceParameters) {\\n this.setIceParameters(iceParameters);\\n }\\n if (iceCandidates) {\\n this._mediaObject.candidates = [];\\n for (const candidate of iceCandidates) {\\n const candidateObject = {};\\n // mediasoup does mandates rtcp-mux so candidates component is always\\n // RTP (1).\\n candidateObject.component = 1;\\n candidateObject.foundation = candidate.foundation;\\n candidateObject.ip = candidate.ip;\\n candidateObject.port = candidate.port;\\n candidateObject.priority = candidate.priority;\\n candidateObject.transport = candidate.protocol;\\n candidateObject.type = candidate.type;\\n if (candidate.tcpType)\\n candidateObject.tcptype = candidate.tcpType;\\n this._mediaObject.candidates.push(candidateObject);\\n }\\n this._mediaObject.endOfCandidates = 'end-of-candidates';\\n this._mediaObject.iceOptions = 'renomination';\\n }\\n if (dtlsParameters) {\\n this.setDtlsRole(dtlsParameters.role);\\n }\\n }\\n get mid() {\\n return String(this._mediaObject.mid);\\n }\\n get closed() {\\n return this._mediaObject.port === 0;\\n }\\n getObject() {\\n return this._mediaObject;\\n }\\n setIceParameters(iceParameters) {\\n this._mediaObject.iceUfrag = iceParameters.usernameFragment;\\n this._mediaObject.icePwd = iceParameters.password;\\n }\\n disable() {\\n this._mediaObject.direction = 'inactive';\\n delete this._mediaObject.ext;\\n delete this._mediaObject.ssrcs;\\n delete this._mediaObject.ssrcGroups;\\n delete this._mediaObject.simulcast;\\n delete this._mediaObject.simulcast_03;\\n delete this._mediaObject.rids;\\n }\\n close() {\\n this._mediaObject.direction = 'inactive';\\n this._mediaObject.port = 0;\\n delete this._mediaObject.ext;\\n delete this._mediaObject.ssrcs;\\n delete this._mediaObject.ssrcGroups;\\n delete this._mediaObject.simulcast;\\n delete this._mediaObject.simulcast_03;\\n delete this._mediaObject.rids;\\n delete this._mediaObject.extmapAllowMixed;\\n }\\n}\\nexports.MediaSection = MediaSection;\\nclass AnswerMediaSection extends MediaSection {\\n constructor({ iceParameters, iceCandidates, dtlsParameters, sctpParameters, plainRtpParameters, planB = false, offerMediaObject, offerRtpParameters, answerRtpParameters, codecOptions, extmapAllowMixed = false }) {\\n super({ iceParameters, iceCandidates, dtlsParameters, planB });\\n this._mediaObject.mid = String(offerMediaObject.mid);\\n this._mediaObject.type = offerMediaObject.type;\\n this._mediaObject.protocol = offerMediaObject.protocol;\\n if (!plainRtpParameters) {\\n this._mediaObject.connection = { ip: '127.0.0.1', version: 4 };\\n this._mediaObject.port = 7;\\n }\\n else {\\n this._mediaObject.connection =\\n {\\n ip: plainRtpParameters.ip,\\n version: plainRtpParameters.ipVersion\\n };\\n this._mediaObject.port = plainRtpParameters.port;\\n }\\n switch (offerMediaObject.type) {\\n case 'audio':\\n case 'video':\\n {\\n this._mediaObject.direction = 'recvonly';\\n this._mediaObject.rtp = [];\\n this._mediaObject.rtcpFb = [];\\n this._mediaObject.fmtp = [];\\n for (const codec of answerRtpParameters.codecs) {\\n const rtp = {\\n payload: codec.payloadType,\\n codec: getCodecName(codec),\\n rate: codec.clockRate\\n };\\n if (codec.channels > 1)\\n rtp.encoding = codec.channels;\\n this._mediaObject.rtp.push(rtp);\\n const codecParameters = utils.clone(codec.parameters, {});\\n if (codecOptions) {\\n const { opusStereo, opusFec, opusDtx, opusMaxPlaybackRate, opusMaxAverageBitrate, opusPtime, videoGoogleStartBitrate, videoGoogleMaxBitrate, videoGoogleMinBitrate } = codecOptions;\\n const offerCodec = offerRtpParameters.codecs\\n .find((c) => (c.payloadType === codec.payloadType));\\n switch (codec.mimeType.toLowerCase()) {\\n case 'audio/opus':\\n {\\n if (opusStereo !== undefined) {\\n offerCodec.parameters['sprop-stereo'] = opusStereo ? 1 : 0;\\n codecParameters.stereo = opusStereo ? 1 : 0;\\n }\\n if (opusFec !== undefined) {\\n offerCodec.parameters.useinbandfec = opusFec ? 1 : 0;\\n codecParameters.useinbandfec = opusFec ? 1 : 0;\\n }\\n if (opusDtx !== undefined) {\\n offerCodec.parameters.usedtx = opusDtx ? 1 : 0;\\n codecParameters.usedtx = opusDtx ? 1 : 0;\\n }\\n if (opusMaxPlaybackRate !== undefined) {\\n codecParameters.maxplaybackrate = opusMaxPlaybackRate;\\n }\\n if (opusMaxAverageBitrate !== undefined) {\\n codecParameters.maxaveragebitrate = opusMaxAverageBitrate;\\n }\\n if (opusPtime !== undefined) {\\n offerCodec.parameters.ptime = opusPtime;\\n codecParameters.ptime = opusPtime;\\n }\\n break;\\n }\\n case 'video/vp8':\\n case 'video/vp9':\\n case 'video/h264':\\n case 'video/h265':\\n {\\n if (videoGoogleStartBitrate !== undefined)\\n codecParameters['x-google-start-bitrate'] = videoGoogleStartBitrate;\\n if (videoGoogleMaxBitrate !== undefined)\\n codecParameters['x-google-max-bitrate'] = videoGoogleMaxBitrate;\\n if (videoGoogleMinBitrate !== undefined)\\n codecParameters['x-google-min-bitrate'] = videoGoogleMinBitrate;\\n break;\\n }\\n }\\n }\\n const fmtp = {\\n payload: codec.payloadType,\\n config: ''\\n };\\n for (const key of Object.keys(codecParameters)) {\\n if (fmtp.config)\\n fmtp.config += ';';\\n fmtp.config += `${key}=${codecParameters[key]}`;\\n }\\n if (fmtp.config)\\n this._mediaObject.fmtp.push(fmtp);\\n for (const fb of codec.rtcpFeedback) {\\n this._mediaObject.rtcpFb.push({\\n payload: codec.payloadType,\\n type: fb.type,\\n subtype: fb.parameter\\n });\\n }\\n }\\n this._mediaObject.payloads = answerRtpParameters.codecs\\n .map((codec) => codec.payloadType)\\n .join(' ');\\n this._mediaObject.ext = [];\\n for (const ext of answerRtpParameters.headerExtensions) {\\n // Don't add a header extension if not present in the offer.\\n const found = (offerMediaObject.ext || [])\\n .some((localExt) => localExt.uri === ext.uri);\\n if (!found)\\n continue;\\n this._mediaObject.ext.push({\\n uri: ext.uri,\\n value: ext.id\\n });\\n }\\n // Allow both 1 byte and 2 bytes length header extensions.\\n if (extmapAllowMixed &&\\n offerMediaObject.extmapAllowMixed === 'extmap-allow-mixed') {\\n this._mediaObject.extmapAllowMixed = 'extmap-allow-mixed';\\n }\\n // Simulcast.\\n if (offerMediaObject.simulcast) {\\n this._mediaObject.simulcast =\\n {\\n dir1: 'recv',\\n list1: offerMediaObject.simulcast.list1\\n };\\n this._mediaObject.rids = [];\\n for (const rid of offerMediaObject.rids || []) {\\n if (rid.direction !== 'send')\\n continue;\\n this._mediaObject.rids.push({\\n id: rid.id,\\n direction: 'recv'\\n });\\n }\\n }\\n // Simulcast (draft version 03).\\n else if (offerMediaObject.simulcast_03) {\\n // eslint-disable-next-line camelcase\\n this._mediaObject.simulcast_03 =\\n {\\n value: offerMediaObject.simulcast_03.value.replace(/send/g, 'recv')\\n };\\n this._mediaObject.rids = [];\\n for (const rid of offerMediaObject.rids || []) {\\n if (rid.direction !== 'send')\\n continue;\\n this._mediaObject.rids.push({\\n id: rid.id,\\n direction: 'recv'\\n });\\n }\\n }\\n this._mediaObject.rtcpMux = 'rtcp-mux';\\n this._mediaObject.rtcpRsize = 'rtcp-rsize';\\n if (this._planB && this._mediaObject.type === 'video')\\n this._mediaObject.xGoogleFlag = 'conference';\\n break;\\n }\\n case 'application':\\n {\\n // New spec.\\n if (typeof offerMediaObject.sctpPort === 'number') {\\n this._mediaObject.payloads = 'webrtc-datachannel';\\n this._mediaObject.sctpPort = sctpParameters.port;\\n this._mediaObject.maxMessageSize = sctpParameters.maxMessageSize;\\n }\\n // Old spec.\\n else if (offerMediaObject.sctpmap) {\\n this._mediaObject.payloads = sctpParameters.port;\\n this._mediaObject.sctpmap =\\n {\\n app: 'webrtc-datachannel',\\n sctpmapNumber: sctpParameters.port,\\n maxMessageSize: sctpParameters.maxMessageSize\\n };\\n }\\n break;\\n }\\n }\\n }\\n setDtlsRole(role) {\\n switch (role) {\\n case 'client':\\n this._mediaObject.setup = 'active';\\n break;\\n case 'server':\\n this._mediaObject.setup = 'passive';\\n break;\\n case 'auto':\\n this._mediaObject.setup = 'actpass';\\n break;\\n }\\n }\\n}\\nexports.AnswerMediaSection = AnswerMediaSection;\\nclass OfferMediaSection extends MediaSection {\\n constructor({ iceParameters, iceCandidates, dtlsParameters, sctpParameters, plainRtpParameters, planB = false, mid, kind, offerRtpParameters, streamId, trackId, oldDataChannelSpec = false }) {\\n super({ iceParameters, iceCandidates, dtlsParameters, planB });\\n this._mediaObject.mid = String(mid);\\n this._mediaObject.type = kind;\\n if (!plainRtpParameters) {\\n this._mediaObject.connection = { ip: '127.0.0.1', version: 4 };\\n if (!sctpParameters)\\n this._mediaObject.protocol = 'UDP/TLS/RTP/SAVPF';\\n else\\n this._mediaObject.protocol = 'UDP/DTLS/SCTP';\\n this._mediaObject.port = 7;\\n }\\n else {\\n this._mediaObject.connection =\\n {\\n ip: plainRtpParameters.ip,\\n version: plainRtpParameters.ipVersion\\n };\\n this._mediaObject.protocol = 'RTP/AVP';\\n this._mediaObject.port = plainRtpParameters.port;\\n }\\n switch (kind) {\\n case 'audio':\\n case 'video':\\n {\\n this._mediaObject.direction = 'sendonly';\\n this._mediaObject.rtp = [];\\n this._mediaObject.rtcpFb = [];\\n this._mediaObject.fmtp = [];\\n if (!this._planB)\\n this._mediaObject.msid = `${streamId || '-'} ${trackId}`;\\n for (const codec of offerRtpParameters.codecs) {\\n const rtp = {\\n payload: codec.payloadType,\\n codec: getCodecName(codec),\\n rate: codec.clockRate\\n };\\n if (codec.channels > 1)\\n rtp.encoding = codec.channels;\\n this._mediaObject.rtp.push(rtp);\\n const fmtp = {\\n payload: codec.payloadType,\\n config: ''\\n };\\n for (const key of Object.keys(codec.parameters)) {\\n if (fmtp.config)\\n fmtp.config += ';';\\n fmtp.config += `${key}=${codec.parameters[key]}`;\\n }\\n if (fmtp.config)\\n this._mediaObject.fmtp.push(fmtp);\\n for (const fb of codec.rtcpFeedback) {\\n this._mediaObject.rtcpFb.push({\\n payload: codec.payloadType,\\n type: fb.type,\\n subtype: fb.parameter\\n });\\n }\\n }\\n this._mediaObject.payloads = offerRtpParameters.codecs\\n .map((codec) => codec.payloadType)\\n .join(' ');\\n this._mediaObject.ext = [];\\n for (const ext of offerRtpParameters.headerExtensions) {\\n this._mediaObject.ext.push({\\n uri: ext.uri,\\n value: ext.id\\n });\\n }\\n this._mediaObject.rtcpMux = 'rtcp-mux';\\n this._mediaObject.rtcpRsize = 'rtcp-rsize';\\n const encoding = offerRtpParameters.encodings[0];\\n const ssrc = encoding.ssrc;\\n const rtxSsrc = (encoding.rtx && encoding.rtx.ssrc)\\n ? encoding.rtx.ssrc\\n : undefined;\\n this._mediaObject.ssrcs = [];\\n this._mediaObject.ssrcGroups = [];\\n if (offerRtpParameters.rtcp.cname) {\\n this._mediaObject.ssrcs.push({\\n id: ssrc,\\n attribute: 'cname',\\n value: offerRtpParameters.rtcp.cname\\n });\\n }\\n if (this._planB) {\\n this._mediaObject.ssrcs.push({\\n id: ssrc,\\n attribute: 'msid',\\n value: `${streamId || '-'} ${trackId}`\\n });\\n }\\n if (rtxSsrc) {\\n if (offerRtpParameters.rtcp.cname) {\\n this._mediaObject.ssrcs.push({\\n id: rtxSsrc,\\n attribute: 'cname',\\n value: offerRtpParameters.rtcp.cname\\n });\\n }\\n if (this._planB) {\\n this._mediaObject.ssrcs.push({\\n id: rtxSsrc,\\n attribute: 'msid',\\n value: `${streamId || '-'} ${trackId}`\\n });\\n }\\n // Associate original and retransmission SSRCs.\\n this._mediaObject.ssrcGroups.push({\\n semantics: 'FID',\\n ssrcs: `${ssrc} ${rtxSsrc}`\\n });\\n }\\n break;\\n }\\n case 'application':\\n {\\n // New spec.\\n if (!oldDataChannelSpec) {\\n this._mediaObject.payloads = 'webrtc-datachannel';\\n this._mediaObject.sctpPort = sctpParameters.port;\\n this._mediaObject.maxMessageSize = sctpParameters.maxMessageSize;\\n }\\n // Old spec.\\n else {\\n this._mediaObject.payloads = sctpParameters.port;\\n this._mediaObject.sctpmap =\\n {\\n app: 'webrtc-datachannel',\\n sctpmapNumber: sctpParameters.port,\\n maxMessageSize: sctpParameters.maxMessageSize\\n };\\n }\\n break;\\n }\\n }\\n }\\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\\n setDtlsRole(role) {\\n // Always 'actpass'.\\n this._mediaObject.setup = 'actpass';\\n }\\n planBReceive({ offerRtpParameters, streamId, trackId }) {\\n const encoding = offerRtpParameters.encodings[0];\\n const ssrc = encoding.ssrc;\\n const rtxSsrc = (encoding.rtx && encoding.rtx.ssrc)\\n ? encoding.rtx.ssrc\\n : undefined;\\n const payloads = this._mediaObject.payloads.split(' ');\\n for (const codec of offerRtpParameters.codecs) {\\n if (payloads.includes(String(codec.payloadType))) {\\n continue;\\n }\\n const rtp = {\\n payload: codec.payloadType,\\n codec: getCodecName(codec),\\n rate: codec.clockRate\\n };\\n if (codec.channels > 1)\\n rtp.encoding = codec.channels;\\n this._mediaObject.rtp.push(rtp);\\n const fmtp = {\\n payload: codec.payloadType,\\n config: ''\\n };\\n for (const key of Object.keys(codec.parameters)) {\\n if (fmtp.config)\\n fmtp.config += ';';\\n fmtp.config += `${key}=${codec.parameters[key]}`;\\n }\\n if (fmtp.config)\\n this._mediaObject.fmtp.push(fmtp);\\n for (const fb of codec.rtcpFeedback) {\\n this._mediaObject.rtcpFb.push({\\n payload: codec.payloadType,\\n type: fb.type,\\n subtype: fb.parameter\\n });\\n }\\n }\\n this._mediaObject.payloads += ` ${offerRtpParameters\\n .codecs\\n .filter((codec) => !this._mediaObject.payloads.includes(codec.payloadType))\\n .map((codec) => codec.payloadType)\\n .join(' ')}`;\\n this._mediaObject.payloads = this._mediaObject.payloads.trim();\\n if (offerRtpParameters.rtcp.cname) {\\n this._mediaObject.ssrcs.push({\\n id: ssrc,\\n attribute: 'cname',\\n value: offerRtpParameters.rtcp.cname\\n });\\n }\\n this._mediaObject.ssrcs.push({\\n id: ssrc,\\n attribute: 'msid',\\n value: `${streamId || '-'} ${trackId}`\\n });\\n if (rtxSsrc) {\\n if (offerRtpParameters.rtcp.cname) {\\n this._mediaObject.ssrcs.push({\\n id: rtxSsrc,\\n attribute: 'cname',\\n value: offerRtpParameters.rtcp.cname\\n });\\n }\\n this._mediaObject.ssrcs.push({\\n id: rtxSsrc,\\n attribute: 'msid',\\n value: `${streamId || '-'} ${trackId}`\\n });\\n // Associate original and retransmission SSRCs.\\n this._mediaObject.ssrcGroups.push({\\n semantics: 'FID',\\n ssrcs: `${ssrc} ${rtxSsrc}`\\n });\\n }\\n }\\n planBStopReceiving({ offerRtpParameters }) {\\n const encoding = offerRtpParameters.encodings[0];\\n const ssrc = encoding.ssrc;\\n const rtxSsrc = (encoding.rtx && encoding.rtx.ssrc)\\n ? encoding.rtx.ssrc\\n : undefined;\\n this._mediaObject.ssrcs = this._mediaObject.ssrcs\\n .filter((s) => s.id !== ssrc && s.id !== rtxSsrc);\\n if (rtxSsrc) {\\n this._mediaObject.ssrcGroups = this._mediaObject.ssrcGroups\\n .filter((group) => group.ssrcs !== `${ssrc} ${rtxSsrc}`);\\n }\\n }\\n}\\nexports.OfferMediaSection = OfferMediaSection;\\nfunction getCodecName(codec) {\\n const MimeTypeRegex = new RegExp('^(audio|video)/(.+)', 'i');\\n const mimeTypeMatch = MimeTypeRegex.exec(codec.mimeType);\\n if (!mimeTypeMatch)\\n throw new TypeError('invalid codec.mimeType');\\n return mimeTypeMatch[2];\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/sdp/MediaSection.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js\":\n/*!*********************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js ***!\n \\*********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.RemoteSdp = void 0;\\nconst sdpTransform = __importStar(__webpack_require__(/*! sdp-transform */ \\\"./node_modules/sdp-transform/lib/index.js\\\"));\\nconst Logger_1 = __webpack_require__(/*! ../../Logger */ \\\"./node_modules/mediasoup-client/lib/Logger.js\\\");\\nconst MediaSection_1 = __webpack_require__(/*! ./MediaSection */ \\\"./node_modules/mediasoup-client/lib/handlers/sdp/MediaSection.js\\\");\\nconst logger = new Logger_1.Logger('RemoteSdp');\\nclass RemoteSdp {\\n constructor({ iceParameters, iceCandidates, dtlsParameters, sctpParameters, plainRtpParameters, planB = false }) {\\n // MediaSection instances with same order as in the SDP.\\n this._mediaSections = [];\\n // MediaSection indices indexed by MID.\\n this._midToIndex = new Map();\\n this._iceParameters = iceParameters;\\n this._iceCandidates = iceCandidates;\\n this._dtlsParameters = dtlsParameters;\\n this._sctpParameters = sctpParameters;\\n this._plainRtpParameters = plainRtpParameters;\\n this._planB = planB;\\n this._sdpObject =\\n {\\n version: 0,\\n origin: {\\n address: '0.0.0.0',\\n ipVer: 4,\\n netType: 'IN',\\n sessionId: 10000,\\n sessionVersion: 0,\\n username: 'mediasoup-client'\\n },\\n name: '-',\\n timing: { start: 0, stop: 0 },\\n media: []\\n };\\n // If ICE parameters are given, add ICE-Lite indicator.\\n if (iceParameters && iceParameters.iceLite) {\\n this._sdpObject.icelite = 'ice-lite';\\n }\\n // If DTLS parameters are given, assume WebRTC and BUNDLE.\\n if (dtlsParameters) {\\n this._sdpObject.msidSemantic = { semantic: 'WMS', token: '*' };\\n // NOTE: We take the latest fingerprint.\\n const numFingerprints = this._dtlsParameters.fingerprints.length;\\n this._sdpObject.fingerprint =\\n {\\n type: dtlsParameters.fingerprints[numFingerprints - 1].algorithm,\\n hash: dtlsParameters.fingerprints[numFingerprints - 1].value\\n };\\n this._sdpObject.groups = [{ type: 'BUNDLE', mids: '' }];\\n }\\n // If there are plain RPT parameters, override SDP origin.\\n if (plainRtpParameters) {\\n this._sdpObject.origin.address = plainRtpParameters.ip;\\n this._sdpObject.origin.ipVer = plainRtpParameters.ipVersion;\\n }\\n }\\n updateIceParameters(iceParameters) {\\n logger.debug('updateIceParameters() [iceParameters:%o]', iceParameters);\\n this._iceParameters = iceParameters;\\n this._sdpObject.icelite = iceParameters.iceLite ? 'ice-lite' : undefined;\\n for (const mediaSection of this._mediaSections) {\\n mediaSection.setIceParameters(iceParameters);\\n }\\n }\\n updateDtlsRole(role) {\\n logger.debug('updateDtlsRole() [role:%s]', role);\\n this._dtlsParameters.role = role;\\n for (const mediaSection of this._mediaSections) {\\n mediaSection.setDtlsRole(role);\\n }\\n }\\n getNextMediaSectionIdx() {\\n // If a closed media section is found, return its index.\\n for (let idx = 0; idx < this._mediaSections.length; ++idx) {\\n const mediaSection = this._mediaSections[idx];\\n if (mediaSection.closed)\\n return { idx, reuseMid: mediaSection.mid };\\n }\\n // If no closed media section is found, return next one.\\n return { idx: this._mediaSections.length };\\n }\\n send({ offerMediaObject, reuseMid, offerRtpParameters, answerRtpParameters, codecOptions, extmapAllowMixed = false }) {\\n const mediaSection = new MediaSection_1.AnswerMediaSection({\\n iceParameters: this._iceParameters,\\n iceCandidates: this._iceCandidates,\\n dtlsParameters: this._dtlsParameters,\\n plainRtpParameters: this._plainRtpParameters,\\n planB: this._planB,\\n offerMediaObject,\\n offerRtpParameters,\\n answerRtpParameters,\\n codecOptions,\\n extmapAllowMixed\\n });\\n // Unified-Plan with closed media section replacement.\\n if (reuseMid) {\\n this._replaceMediaSection(mediaSection, reuseMid);\\n }\\n // Unified-Plan or Plan-B with different media kind.\\n else if (!this._midToIndex.has(mediaSection.mid)) {\\n this._addMediaSection(mediaSection);\\n }\\n // Plan-B with same media kind.\\n else {\\n this._replaceMediaSection(mediaSection);\\n }\\n }\\n receive({ mid, kind, offerRtpParameters, streamId, trackId }) {\\n const idx = this._midToIndex.get(mid);\\n let mediaSection;\\n if (idx !== undefined)\\n mediaSection = this._mediaSections[idx];\\n // Unified-Plan or different media kind.\\n if (!mediaSection) {\\n mediaSection = new MediaSection_1.OfferMediaSection({\\n iceParameters: this._iceParameters,\\n iceCandidates: this._iceCandidates,\\n dtlsParameters: this._dtlsParameters,\\n plainRtpParameters: this._plainRtpParameters,\\n planB: this._planB,\\n mid,\\n kind,\\n offerRtpParameters,\\n streamId,\\n trackId\\n });\\n // Let's try to recycle a closed media section (if any).\\n // NOTE: Yes, we can recycle a closed m=audio section with a new m=video.\\n const oldMediaSection = this._mediaSections.find((m) => (m.closed));\\n if (oldMediaSection) {\\n this._replaceMediaSection(mediaSection, oldMediaSection.mid);\\n }\\n else {\\n this._addMediaSection(mediaSection);\\n }\\n }\\n // Plan-B.\\n else {\\n mediaSection.planBReceive({ offerRtpParameters, streamId, trackId });\\n this._replaceMediaSection(mediaSection);\\n }\\n }\\n disableMediaSection(mid) {\\n const idx = this._midToIndex.get(mid);\\n if (idx === undefined) {\\n throw new Error(`no media section found with mid '${mid}'`);\\n }\\n const mediaSection = this._mediaSections[idx];\\n mediaSection.disable();\\n }\\n closeMediaSection(mid) {\\n const idx = this._midToIndex.get(mid);\\n if (idx === undefined) {\\n throw new Error(`no media section found with mid '${mid}'`);\\n }\\n const mediaSection = this._mediaSections[idx];\\n // NOTE: Closing the first m section is a pain since it invalidates the\\n // bundled transport, so let's avoid it.\\n if (mid === this._firstMid) {\\n logger.debug('closeMediaSection() | cannot close first media section, disabling it instead [mid:%s]', mid);\\n this.disableMediaSection(mid);\\n return;\\n }\\n mediaSection.close();\\n // Regenerate BUNDLE mids.\\n this._regenerateBundleMids();\\n }\\n planBStopReceiving({ mid, offerRtpParameters }) {\\n const idx = this._midToIndex.get(mid);\\n if (idx === undefined) {\\n throw new Error(`no media section found with mid '${mid}'`);\\n }\\n const mediaSection = this._mediaSections[idx];\\n mediaSection.planBStopReceiving({ offerRtpParameters });\\n this._replaceMediaSection(mediaSection);\\n }\\n sendSctpAssociation({ offerMediaObject }) {\\n const mediaSection = new MediaSection_1.AnswerMediaSection({\\n iceParameters: this._iceParameters,\\n iceCandidates: this._iceCandidates,\\n dtlsParameters: this._dtlsParameters,\\n sctpParameters: this._sctpParameters,\\n plainRtpParameters: this._plainRtpParameters,\\n offerMediaObject\\n });\\n this._addMediaSection(mediaSection);\\n }\\n receiveSctpAssociation({ oldDataChannelSpec = false } = {}) {\\n const mediaSection = new MediaSection_1.OfferMediaSection({\\n iceParameters: this._iceParameters,\\n iceCandidates: this._iceCandidates,\\n dtlsParameters: this._dtlsParameters,\\n sctpParameters: this._sctpParameters,\\n plainRtpParameters: this._plainRtpParameters,\\n mid: 'datachannel',\\n kind: 'application',\\n oldDataChannelSpec\\n });\\n this._addMediaSection(mediaSection);\\n }\\n getSdp() {\\n // Increase SDP version.\\n this._sdpObject.origin.sessionVersion++;\\n return sdpTransform.write(this._sdpObject);\\n }\\n _addMediaSection(newMediaSection) {\\n if (!this._firstMid)\\n this._firstMid = newMediaSection.mid;\\n // Add to the vector.\\n this._mediaSections.push(newMediaSection);\\n // Add to the map.\\n this._midToIndex.set(newMediaSection.mid, this._mediaSections.length - 1);\\n // Add to the SDP object.\\n this._sdpObject.media.push(newMediaSection.getObject());\\n // Regenerate BUNDLE mids.\\n this._regenerateBundleMids();\\n }\\n _replaceMediaSection(newMediaSection, reuseMid) {\\n // Store it in the map.\\n if (typeof reuseMid === 'string') {\\n const idx = this._midToIndex.get(reuseMid);\\n if (idx === undefined) {\\n throw new Error(`no media section found for reuseMid '${reuseMid}'`);\\n }\\n const oldMediaSection = this._mediaSections[idx];\\n // Replace the index in the vector with the new media section.\\n this._mediaSections[idx] = newMediaSection;\\n // Update the map.\\n this._midToIndex.delete(oldMediaSection.mid);\\n this._midToIndex.set(newMediaSection.mid, idx);\\n // Update the SDP object.\\n this._sdpObject.media[idx] = newMediaSection.getObject();\\n // Regenerate BUNDLE mids.\\n this._regenerateBundleMids();\\n }\\n else {\\n const idx = this._midToIndex.get(newMediaSection.mid);\\n if (idx === undefined) {\\n throw new Error(`no media section found with mid '${newMediaSection.mid}'`);\\n }\\n // Replace the index in the vector with the new media section.\\n this._mediaSections[idx] = newMediaSection;\\n // Update the SDP object.\\n this._sdpObject.media[idx] = newMediaSection.getObject();\\n }\\n }\\n _regenerateBundleMids() {\\n if (!this._dtlsParameters)\\n return;\\n this._sdpObject.groups[0].mids = this._mediaSections\\n .filter((mediaSection) => !mediaSection.closed)\\n .map((mediaSection) => mediaSection.mid)\\n .join(' ');\\n }\\n}\\nexports.RemoteSdp = RemoteSdp;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js\":\n/*!***********************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js ***!\n \\***********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.applyCodecParameters = exports.getCname = exports.extractDtlsParameters = exports.extractRtpCapabilities = void 0;\\nconst sdpTransform = __importStar(__webpack_require__(/*! sdp-transform */ \\\"./node_modules/sdp-transform/lib/index.js\\\"));\\nfunction extractRtpCapabilities({ sdpObject }) {\\n // Map of RtpCodecParameters indexed by payload type.\\n const codecsMap = new Map();\\n // Array of RtpHeaderExtensions.\\n const headerExtensions = [];\\n // Whether a m=audio/video section has been already found.\\n let gotAudio = false;\\n let gotVideo = false;\\n for (const m of sdpObject.media) {\\n const kind = m.type;\\n switch (kind) {\\n case 'audio':\\n {\\n if (gotAudio)\\n continue;\\n gotAudio = true;\\n break;\\n }\\n case 'video':\\n {\\n if (gotVideo)\\n continue;\\n gotVideo = true;\\n break;\\n }\\n default:\\n {\\n continue;\\n }\\n }\\n // Get codecs.\\n for (const rtp of m.rtp) {\\n const codec = {\\n kind: kind,\\n mimeType: `${kind}/${rtp.codec}`,\\n preferredPayloadType: rtp.payload,\\n clockRate: rtp.rate,\\n channels: rtp.encoding,\\n parameters: {},\\n rtcpFeedback: []\\n };\\n codecsMap.set(codec.preferredPayloadType, codec);\\n }\\n // Get codec parameters.\\n for (const fmtp of m.fmtp || []) {\\n const parameters = sdpTransform.parseParams(fmtp.config);\\n const codec = codecsMap.get(fmtp.payload);\\n if (!codec)\\n continue;\\n // Specials case to convert parameter value to string.\\n if (parameters && parameters.hasOwnProperty('profile-level-id'))\\n parameters['profile-level-id'] = String(parameters['profile-level-id']);\\n codec.parameters = parameters;\\n }\\n // Get RTCP feedback for each codec.\\n for (const fb of m.rtcpFb || []) {\\n const codec = codecsMap.get(fb.payload);\\n if (!codec)\\n continue;\\n const feedback = {\\n type: fb.type,\\n parameter: fb.subtype\\n };\\n if (!feedback.parameter)\\n delete feedback.parameter;\\n codec.rtcpFeedback.push(feedback);\\n }\\n // Get RTP header extensions.\\n for (const ext of m.ext || []) {\\n // Ignore encrypted extensions (not yet supported in mediasoup).\\n if (ext['encrypt-uri'])\\n continue;\\n const headerExtension = {\\n kind: kind,\\n uri: ext.uri,\\n preferredId: ext.value\\n };\\n headerExtensions.push(headerExtension);\\n }\\n }\\n const rtpCapabilities = {\\n codecs: Array.from(codecsMap.values()),\\n headerExtensions: headerExtensions\\n };\\n return rtpCapabilities;\\n}\\nexports.extractRtpCapabilities = extractRtpCapabilities;\\nfunction extractDtlsParameters({ sdpObject }) {\\n const mediaObject = (sdpObject.media || [])\\n .find((m) => (m.iceUfrag && m.port !== 0));\\n if (!mediaObject)\\n throw new Error('no active media section found');\\n const fingerprint = mediaObject.fingerprint || sdpObject.fingerprint;\\n let role;\\n switch (mediaObject.setup) {\\n case 'active':\\n role = 'client';\\n break;\\n case 'passive':\\n role = 'server';\\n break;\\n case 'actpass':\\n role = 'auto';\\n break;\\n }\\n const dtlsParameters = {\\n role,\\n fingerprints: [\\n {\\n algorithm: fingerprint.type,\\n value: fingerprint.hash\\n }\\n ]\\n };\\n return dtlsParameters;\\n}\\nexports.extractDtlsParameters = extractDtlsParameters;\\nfunction getCname({ offerMediaObject }) {\\n const ssrcCnameLine = (offerMediaObject.ssrcs || [])\\n .find((line) => line.attribute === 'cname');\\n if (!ssrcCnameLine)\\n return '';\\n return ssrcCnameLine.value;\\n}\\nexports.getCname = getCname;\\n/**\\n * Apply codec parameters in the given SDP m= section answer based on the\\n * given RTP parameters of an offer.\\n */\\nfunction applyCodecParameters({ offerRtpParameters, answerMediaObject }) {\\n for (const codec of offerRtpParameters.codecs) {\\n const mimeType = codec.mimeType.toLowerCase();\\n // Avoid parsing codec parameters for unhandled codecs.\\n if (mimeType !== 'audio/opus')\\n continue;\\n const rtp = (answerMediaObject.rtp || [])\\n .find((r) => r.payload === codec.payloadType);\\n if (!rtp)\\n continue;\\n // Just in case.\\n answerMediaObject.fmtp = answerMediaObject.fmtp || [];\\n let fmtp = answerMediaObject.fmtp\\n .find((f) => f.payload === codec.payloadType);\\n if (!fmtp) {\\n fmtp = { payload: codec.payloadType, config: '' };\\n answerMediaObject.fmtp.push(fmtp);\\n }\\n const parameters = sdpTransform.parseParams(fmtp.config);\\n switch (mimeType) {\\n case 'audio/opus':\\n {\\n const spropStereo = codec.parameters['sprop-stereo'];\\n if (spropStereo !== undefined)\\n parameters.stereo = spropStereo ? 1 : 0;\\n break;\\n }\\n }\\n // Write the codec fmtp.config back.\\n fmtp.config = '';\\n for (const key of Object.keys(parameters)) {\\n if (fmtp.config)\\n fmtp.config += ';';\\n fmtp.config += `${key}=${parameters[key]}`;\\n }\\n }\\n}\\nexports.applyCodecParameters = applyCodecParameters;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/sdp/planBUtils.js\":\n/*!**********************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/sdp/planBUtils.js ***!\n \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.addLegacySimulcast = exports.getRtpEncodings = void 0;\\nfunction getRtpEncodings({ offerMediaObject, track }) {\\n // First media SSRC (or the only one).\\n let firstSsrc;\\n const ssrcs = new Set();\\n for (const line of offerMediaObject.ssrcs || []) {\\n if (line.attribute !== 'msid')\\n continue;\\n const trackId = line.value.split(' ')[1];\\n if (trackId === track.id) {\\n const ssrc = line.id;\\n ssrcs.add(ssrc);\\n if (!firstSsrc)\\n firstSsrc = ssrc;\\n }\\n }\\n if (ssrcs.size === 0)\\n throw new Error(`a=ssrc line with msid information not found [track.id:${track.id}]`);\\n const ssrcToRtxSsrc = new Map();\\n // First assume RTX is used.\\n for (const line of offerMediaObject.ssrcGroups || []) {\\n if (line.semantics !== 'FID')\\n continue;\\n let [ssrc, rtxSsrc] = line.ssrcs.split(/\\\\s+/);\\n ssrc = Number(ssrc);\\n rtxSsrc = Number(rtxSsrc);\\n if (ssrcs.has(ssrc)) {\\n // Remove both the SSRC and RTX SSRC from the set so later we know that they\\n // are already handled.\\n ssrcs.delete(ssrc);\\n ssrcs.delete(rtxSsrc);\\n // Add to the map.\\n ssrcToRtxSsrc.set(ssrc, rtxSsrc);\\n }\\n }\\n // If the set of SSRCs is not empty it means that RTX is not being used, so take\\n // media SSRCs from there.\\n for (const ssrc of ssrcs) {\\n // Add to the map.\\n ssrcToRtxSsrc.set(ssrc, null);\\n }\\n const encodings = [];\\n for (const [ssrc, rtxSsrc] of ssrcToRtxSsrc) {\\n const encoding = { ssrc };\\n if (rtxSsrc)\\n encoding.rtx = { ssrc: rtxSsrc };\\n encodings.push(encoding);\\n }\\n return encodings;\\n}\\nexports.getRtpEncodings = getRtpEncodings;\\n/**\\n * Adds multi-ssrc based simulcast into the given SDP media section offer.\\n */\\nfunction addLegacySimulcast({ offerMediaObject, track, numStreams }) {\\n if (numStreams <= 1)\\n throw new TypeError('numStreams must be greater than 1');\\n let firstSsrc;\\n let firstRtxSsrc;\\n let streamId;\\n // Get the SSRC.\\n const ssrcMsidLine = (offerMediaObject.ssrcs || [])\\n .find((line) => {\\n if (line.attribute !== 'msid')\\n return false;\\n const trackId = line.value.split(' ')[1];\\n if (trackId === track.id) {\\n firstSsrc = line.id;\\n streamId = line.value.split(' ')[0];\\n return true;\\n }\\n else {\\n return false;\\n }\\n });\\n if (!ssrcMsidLine)\\n throw new Error(`a=ssrc line with msid information not found [track.id:${track.id}]`);\\n // Get the SSRC for RTX.\\n (offerMediaObject.ssrcGroups || [])\\n .some((line) => {\\n if (line.semantics !== 'FID')\\n return false;\\n const ssrcs = line.ssrcs.split(/\\\\s+/);\\n if (Number(ssrcs[0]) === firstSsrc) {\\n firstRtxSsrc = Number(ssrcs[1]);\\n return true;\\n }\\n else {\\n return false;\\n }\\n });\\n const ssrcCnameLine = offerMediaObject.ssrcs\\n .find((line) => (line.attribute === 'cname' && line.id === firstSsrc));\\n if (!ssrcCnameLine)\\n throw new Error(`a=ssrc line with cname information not found [track.id:${track.id}]`);\\n const cname = ssrcCnameLine.value;\\n const ssrcs = [];\\n const rtxSsrcs = [];\\n for (let i = 0; i < numStreams; ++i) {\\n ssrcs.push(firstSsrc + i);\\n if (firstRtxSsrc)\\n rtxSsrcs.push(firstRtxSsrc + i);\\n }\\n offerMediaObject.ssrcGroups = offerMediaObject.ssrcGroups || [];\\n offerMediaObject.ssrcs = offerMediaObject.ssrcs || [];\\n offerMediaObject.ssrcGroups.push({\\n semantics: 'SIM',\\n ssrcs: ssrcs.join(' ')\\n });\\n for (let i = 0; i < ssrcs.length; ++i) {\\n const ssrc = ssrcs[i];\\n offerMediaObject.ssrcs.push({\\n id: ssrc,\\n attribute: 'cname',\\n value: cname\\n });\\n offerMediaObject.ssrcs.push({\\n id: ssrc,\\n attribute: 'msid',\\n value: `${streamId} ${track.id}`\\n });\\n }\\n for (let i = 0; i < rtxSsrcs.length; ++i) {\\n const ssrc = ssrcs[i];\\n const rtxSsrc = rtxSsrcs[i];\\n offerMediaObject.ssrcs.push({\\n id: rtxSsrc,\\n attribute: 'cname',\\n value: cname\\n });\\n offerMediaObject.ssrcs.push({\\n id: rtxSsrc,\\n attribute: 'msid',\\n value: `${streamId} ${track.id}`\\n });\\n offerMediaObject.ssrcGroups.push({\\n semantics: 'FID',\\n ssrcs: `${ssrc} ${rtxSsrc}`\\n });\\n }\\n}\\nexports.addLegacySimulcast = addLegacySimulcast;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/sdp/planBUtils.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/handlers/sdp/unifiedPlanUtils.js\":\n/*!****************************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/handlers/sdp/unifiedPlanUtils.js ***!\n \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.addLegacySimulcast = exports.getRtpEncodings = void 0;\\nfunction getRtpEncodings({ offerMediaObject }) {\\n const ssrcs = new Set();\\n for (const line of offerMediaObject.ssrcs || []) {\\n const ssrc = line.id;\\n ssrcs.add(ssrc);\\n }\\n if (ssrcs.size === 0)\\n throw new Error('no a=ssrc lines found');\\n const ssrcToRtxSsrc = new Map();\\n // First assume RTX is used.\\n for (const line of offerMediaObject.ssrcGroups || []) {\\n if (line.semantics !== 'FID')\\n continue;\\n let [ssrc, rtxSsrc] = line.ssrcs.split(/\\\\s+/);\\n ssrc = Number(ssrc);\\n rtxSsrc = Number(rtxSsrc);\\n if (ssrcs.has(ssrc)) {\\n // Remove both the SSRC and RTX SSRC from the set so later we know that they\\n // are already handled.\\n ssrcs.delete(ssrc);\\n ssrcs.delete(rtxSsrc);\\n // Add to the map.\\n ssrcToRtxSsrc.set(ssrc, rtxSsrc);\\n }\\n }\\n // If the set of SSRCs is not empty it means that RTX is not being used, so take\\n // media SSRCs from there.\\n for (const ssrc of ssrcs) {\\n // Add to the map.\\n ssrcToRtxSsrc.set(ssrc, null);\\n }\\n const encodings = [];\\n for (const [ssrc, rtxSsrc] of ssrcToRtxSsrc) {\\n const encoding = { ssrc };\\n if (rtxSsrc)\\n encoding.rtx = { ssrc: rtxSsrc };\\n encodings.push(encoding);\\n }\\n return encodings;\\n}\\nexports.getRtpEncodings = getRtpEncodings;\\n/**\\n * Adds multi-ssrc based simulcast into the given SDP media section offer.\\n */\\nfunction addLegacySimulcast({ offerMediaObject, numStreams }) {\\n if (numStreams <= 1)\\n throw new TypeError('numStreams must be greater than 1');\\n // Get the SSRC.\\n const ssrcMsidLine = (offerMediaObject.ssrcs || [])\\n .find((line) => line.attribute === 'msid');\\n if (!ssrcMsidLine)\\n throw new Error('a=ssrc line with msid information not found');\\n const [streamId, trackId] = ssrcMsidLine.value.split(' ');\\n const firstSsrc = ssrcMsidLine.id;\\n let firstRtxSsrc;\\n // Get the SSRC for RTX.\\n (offerMediaObject.ssrcGroups || [])\\n .some((line) => {\\n if (line.semantics !== 'FID')\\n return false;\\n const ssrcs = line.ssrcs.split(/\\\\s+/);\\n if (Number(ssrcs[0]) === firstSsrc) {\\n firstRtxSsrc = Number(ssrcs[1]);\\n return true;\\n }\\n else {\\n return false;\\n }\\n });\\n const ssrcCnameLine = offerMediaObject.ssrcs\\n .find((line) => line.attribute === 'cname');\\n if (!ssrcCnameLine)\\n throw new Error('a=ssrc line with cname information not found');\\n const cname = ssrcCnameLine.value;\\n const ssrcs = [];\\n const rtxSsrcs = [];\\n for (let i = 0; i < numStreams; ++i) {\\n ssrcs.push(firstSsrc + i);\\n if (firstRtxSsrc)\\n rtxSsrcs.push(firstRtxSsrc + i);\\n }\\n offerMediaObject.ssrcGroups = [];\\n offerMediaObject.ssrcs = [];\\n offerMediaObject.ssrcGroups.push({\\n semantics: 'SIM',\\n ssrcs: ssrcs.join(' ')\\n });\\n for (let i = 0; i < ssrcs.length; ++i) {\\n const ssrc = ssrcs[i];\\n offerMediaObject.ssrcs.push({\\n id: ssrc,\\n attribute: 'cname',\\n value: cname\\n });\\n offerMediaObject.ssrcs.push({\\n id: ssrc,\\n attribute: 'msid',\\n value: `${streamId} ${trackId}`\\n });\\n }\\n for (let i = 0; i < rtxSsrcs.length; ++i) {\\n const ssrc = ssrcs[i];\\n const rtxSsrc = rtxSsrcs[i];\\n offerMediaObject.ssrcs.push({\\n id: rtxSsrc,\\n attribute: 'cname',\\n value: cname\\n });\\n offerMediaObject.ssrcs.push({\\n id: rtxSsrc,\\n attribute: 'msid',\\n value: `${streamId} ${trackId}`\\n });\\n offerMediaObject.ssrcGroups.push({\\n semantics: 'FID',\\n ssrcs: `${ssrc} ${rtxSsrc}`\\n });\\n }\\n}\\nexports.addLegacySimulcast = addLegacySimulcast;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/handlers/sdp/unifiedPlanUtils.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/index.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/index.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nvar __importDefault = (this && this.__importDefault) || function (mod) {\\n return (mod && mod.__esModule) ? mod : { \\\"default\\\": mod };\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.debug = exports.parseScalabilityMode = exports.detectDevice = exports.Device = exports.version = exports.types = void 0;\\nconst debug_1 = __importDefault(__webpack_require__(/*! debug */ \\\"./node_modules/debug/src/browser.js\\\"));\\nexports.debug = debug_1.default;\\nconst Device_1 = __webpack_require__(/*! ./Device */ \\\"./node_modules/mediasoup-client/lib/Device.js\\\");\\nObject.defineProperty(exports, \\\"Device\\\", { enumerable: true, get: function () { return Device_1.Device; } });\\nObject.defineProperty(exports, \\\"detectDevice\\\", { enumerable: true, get: function () { return Device_1.detectDevice; } });\\nconst types = __importStar(__webpack_require__(/*! ./types */ \\\"./node_modules/mediasoup-client/lib/types.js\\\"));\\nexports.types = types;\\n/**\\n * Expose mediasoup-client version.\\n */\\nexports.version = '3.6.47';\\n/**\\n * Expose parseScalabilityMode() function.\\n */\\nvar scalabilityModes_1 = __webpack_require__(/*! ./scalabilityModes */ \\\"./node_modules/mediasoup-client/lib/scalabilityModes.js\\\");\\nObject.defineProperty(exports, \\\"parseScalabilityMode\\\", { enumerable: true, get: function () { return scalabilityModes_1.parse; } });\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/ortc.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/ortc.js ***!\n \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\\n Object.defineProperty(o, \\\"default\\\", { enumerable: true, value: v });\\n}) : function(o, v) {\\n o[\\\"default\\\"] = v;\\n});\\nvar __importStar = (this && this.__importStar) || function (mod) {\\n if (mod && mod.__esModule) return mod;\\n var result = {};\\n if (mod != null) for (var k in mod) if (k !== \\\"default\\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\\n __setModuleDefault(result, mod);\\n return result;\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.canReceive = exports.canSend = exports.generateProbatorRtpParameters = exports.reduceCodecs = exports.getSendingRemoteRtpParameters = exports.getSendingRtpParameters = exports.getRecvRtpCapabilities = exports.getExtendedRtpCapabilities = exports.validateSctpStreamParameters = exports.validateSctpParameters = exports.validateNumSctpStreams = exports.validateSctpCapabilities = exports.validateRtcpParameters = exports.validateRtpEncodingParameters = exports.validateRtpHeaderExtensionParameters = exports.validateRtpCodecParameters = exports.validateRtpParameters = exports.validateRtpHeaderExtension = exports.validateRtcpFeedback = exports.validateRtpCodecCapability = exports.validateRtpCapabilities = void 0;\\nconst h264 = __importStar(__webpack_require__(/*! h264-profile-level-id */ \\\"./node_modules/h264-profile-level-id/index.js\\\"));\\nconst utils = __importStar(__webpack_require__(/*! ./utils */ \\\"./node_modules/mediasoup-client/lib/utils.js\\\"));\\nconst RTP_PROBATOR_MID = 'probator';\\nconst RTP_PROBATOR_SSRC = 1234;\\nconst RTP_PROBATOR_CODEC_PAYLOAD_TYPE = 127;\\n/**\\n * Validates RtpCapabilities. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateRtpCapabilities(caps) {\\n if (typeof caps !== 'object')\\n throw new TypeError('caps is not an object');\\n // codecs is optional. If unset, fill with an empty array.\\n if (caps.codecs && !Array.isArray(caps.codecs))\\n throw new TypeError('caps.codecs is not an array');\\n else if (!caps.codecs)\\n caps.codecs = [];\\n for (const codec of caps.codecs) {\\n validateRtpCodecCapability(codec);\\n }\\n // headerExtensions is optional. If unset, fill with an empty array.\\n if (caps.headerExtensions && !Array.isArray(caps.headerExtensions))\\n throw new TypeError('caps.headerExtensions is not an array');\\n else if (!caps.headerExtensions)\\n caps.headerExtensions = [];\\n for (const ext of caps.headerExtensions) {\\n validateRtpHeaderExtension(ext);\\n }\\n}\\nexports.validateRtpCapabilities = validateRtpCapabilities;\\n/**\\n * Validates RtpCodecCapability. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateRtpCodecCapability(codec) {\\n const MimeTypeRegex = new RegExp('^(audio|video)/(.+)', 'i');\\n if (typeof codec !== 'object')\\n throw new TypeError('codec is not an object');\\n // mimeType is mandatory.\\n if (!codec.mimeType || typeof codec.mimeType !== 'string')\\n throw new TypeError('missing codec.mimeType');\\n const mimeTypeMatch = MimeTypeRegex.exec(codec.mimeType);\\n if (!mimeTypeMatch)\\n throw new TypeError('invalid codec.mimeType');\\n // Just override kind with media component of mimeType.\\n codec.kind = mimeTypeMatch[1].toLowerCase();\\n // preferredPayloadType is optional.\\n if (codec.preferredPayloadType && typeof codec.preferredPayloadType !== 'number')\\n throw new TypeError('invalid codec.preferredPayloadType');\\n // clockRate is mandatory.\\n if (typeof codec.clockRate !== 'number')\\n throw new TypeError('missing codec.clockRate');\\n // channels is optional. If unset, set it to 1 (just if audio).\\n if (codec.kind === 'audio') {\\n if (typeof codec.channels !== 'number')\\n codec.channels = 1;\\n }\\n else {\\n delete codec.channels;\\n }\\n // parameters is optional. If unset, set it to an empty object.\\n if (!codec.parameters || typeof codec.parameters !== 'object')\\n codec.parameters = {};\\n for (const key of Object.keys(codec.parameters)) {\\n let value = codec.parameters[key];\\n if (value === undefined) {\\n codec.parameters[key] = '';\\n value = '';\\n }\\n if (typeof value !== 'string' && typeof value !== 'number') {\\n throw new TypeError(`invalid codec parameter [key:${key}s, value:${value}]`);\\n }\\n // Specific parameters validation.\\n if (key === 'apt') {\\n if (typeof value !== 'number')\\n throw new TypeError('invalid codec apt parameter');\\n }\\n }\\n // rtcpFeedback is optional. If unset, set it to an empty array.\\n if (!codec.rtcpFeedback || !Array.isArray(codec.rtcpFeedback))\\n codec.rtcpFeedback = [];\\n for (const fb of codec.rtcpFeedback) {\\n validateRtcpFeedback(fb);\\n }\\n}\\nexports.validateRtpCodecCapability = validateRtpCodecCapability;\\n/**\\n * Validates RtcpFeedback. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateRtcpFeedback(fb) {\\n if (typeof fb !== 'object')\\n throw new TypeError('fb is not an object');\\n // type is mandatory.\\n if (!fb.type || typeof fb.type !== 'string')\\n throw new TypeError('missing fb.type');\\n // parameter is optional. If unset set it to an empty string.\\n if (!fb.parameter || typeof fb.parameter !== 'string')\\n fb.parameter = '';\\n}\\nexports.validateRtcpFeedback = validateRtcpFeedback;\\n/**\\n * Validates RtpHeaderExtension. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateRtpHeaderExtension(ext) {\\n if (typeof ext !== 'object')\\n throw new TypeError('ext is not an object');\\n // kind is mandatory.\\n if (ext.kind !== 'audio' && ext.kind !== 'video')\\n throw new TypeError('invalid ext.kind');\\n // uri is mandatory.\\n if (!ext.uri || typeof ext.uri !== 'string')\\n throw new TypeError('missing ext.uri');\\n // preferredId is mandatory.\\n if (typeof ext.preferredId !== 'number')\\n throw new TypeError('missing ext.preferredId');\\n // preferredEncrypt is optional. If unset set it to false.\\n if (ext.preferredEncrypt && typeof ext.preferredEncrypt !== 'boolean')\\n throw new TypeError('invalid ext.preferredEncrypt');\\n else if (!ext.preferredEncrypt)\\n ext.preferredEncrypt = false;\\n // direction is optional. If unset set it to sendrecv.\\n if (ext.direction && typeof ext.direction !== 'string')\\n throw new TypeError('invalid ext.direction');\\n else if (!ext.direction)\\n ext.direction = 'sendrecv';\\n}\\nexports.validateRtpHeaderExtension = validateRtpHeaderExtension;\\n/**\\n * Validates RtpParameters. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateRtpParameters(params) {\\n if (typeof params !== 'object')\\n throw new TypeError('params is not an object');\\n // mid is optional.\\n if (params.mid && typeof params.mid !== 'string')\\n throw new TypeError('params.mid is not a string');\\n // codecs is mandatory.\\n if (!Array.isArray(params.codecs))\\n throw new TypeError('missing params.codecs');\\n for (const codec of params.codecs) {\\n validateRtpCodecParameters(codec);\\n }\\n // headerExtensions is optional. If unset, fill with an empty array.\\n if (params.headerExtensions && !Array.isArray(params.headerExtensions))\\n throw new TypeError('params.headerExtensions is not an array');\\n else if (!params.headerExtensions)\\n params.headerExtensions = [];\\n for (const ext of params.headerExtensions) {\\n validateRtpHeaderExtensionParameters(ext);\\n }\\n // encodings is optional. If unset, fill with an empty array.\\n if (params.encodings && !Array.isArray(params.encodings))\\n throw new TypeError('params.encodings is not an array');\\n else if (!params.encodings)\\n params.encodings = [];\\n for (const encoding of params.encodings) {\\n validateRtpEncodingParameters(encoding);\\n }\\n // rtcp is optional. If unset, fill with an empty object.\\n if (params.rtcp && typeof params.rtcp !== 'object')\\n throw new TypeError('params.rtcp is not an object');\\n else if (!params.rtcp)\\n params.rtcp = {};\\n validateRtcpParameters(params.rtcp);\\n}\\nexports.validateRtpParameters = validateRtpParameters;\\n/**\\n * Validates RtpCodecParameters. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateRtpCodecParameters(codec) {\\n const MimeTypeRegex = new RegExp('^(audio|video)/(.+)', 'i');\\n if (typeof codec !== 'object')\\n throw new TypeError('codec is not an object');\\n // mimeType is mandatory.\\n if (!codec.mimeType || typeof codec.mimeType !== 'string')\\n throw new TypeError('missing codec.mimeType');\\n const mimeTypeMatch = MimeTypeRegex.exec(codec.mimeType);\\n if (!mimeTypeMatch)\\n throw new TypeError('invalid codec.mimeType');\\n // payloadType is mandatory.\\n if (typeof codec.payloadType !== 'number')\\n throw new TypeError('missing codec.payloadType');\\n // clockRate is mandatory.\\n if (typeof codec.clockRate !== 'number')\\n throw new TypeError('missing codec.clockRate');\\n const kind = mimeTypeMatch[1].toLowerCase();\\n // channels is optional. If unset, set it to 1 (just if audio).\\n if (kind === 'audio') {\\n if (typeof codec.channels !== 'number')\\n codec.channels = 1;\\n }\\n else {\\n delete codec.channels;\\n }\\n // parameters is optional. If unset, set it to an empty object.\\n if (!codec.parameters || typeof codec.parameters !== 'object')\\n codec.parameters = {};\\n for (const key of Object.keys(codec.parameters)) {\\n let value = codec.parameters[key];\\n if (value === undefined) {\\n codec.parameters[key] = '';\\n value = '';\\n }\\n if (typeof value !== 'string' && typeof value !== 'number') {\\n throw new TypeError(`invalid codec parameter [key:${key}s, value:${value}]`);\\n }\\n // Specific parameters validation.\\n if (key === 'apt') {\\n if (typeof value !== 'number')\\n throw new TypeError('invalid codec apt parameter');\\n }\\n }\\n // rtcpFeedback is optional. If unset, set it to an empty array.\\n if (!codec.rtcpFeedback || !Array.isArray(codec.rtcpFeedback))\\n codec.rtcpFeedback = [];\\n for (const fb of codec.rtcpFeedback) {\\n validateRtcpFeedback(fb);\\n }\\n}\\nexports.validateRtpCodecParameters = validateRtpCodecParameters;\\n/**\\n * Validates RtpHeaderExtensionParameteters. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateRtpHeaderExtensionParameters(ext) {\\n if (typeof ext !== 'object')\\n throw new TypeError('ext is not an object');\\n // uri is mandatory.\\n if (!ext.uri || typeof ext.uri !== 'string')\\n throw new TypeError('missing ext.uri');\\n // id is mandatory.\\n if (typeof ext.id !== 'number')\\n throw new TypeError('missing ext.id');\\n // encrypt is optional. If unset set it to false.\\n if (ext.encrypt && typeof ext.encrypt !== 'boolean')\\n throw new TypeError('invalid ext.encrypt');\\n else if (!ext.encrypt)\\n ext.encrypt = false;\\n // parameters is optional. If unset, set it to an empty object.\\n if (!ext.parameters || typeof ext.parameters !== 'object')\\n ext.parameters = {};\\n for (const key of Object.keys(ext.parameters)) {\\n let value = ext.parameters[key];\\n if (value === undefined) {\\n ext.parameters[key] = '';\\n value = '';\\n }\\n if (typeof value !== 'string' && typeof value !== 'number')\\n throw new TypeError('invalid header extension parameter');\\n }\\n}\\nexports.validateRtpHeaderExtensionParameters = validateRtpHeaderExtensionParameters;\\n/**\\n * Validates RtpEncodingParameters. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateRtpEncodingParameters(encoding) {\\n if (typeof encoding !== 'object')\\n throw new TypeError('encoding is not an object');\\n // ssrc is optional.\\n if (encoding.ssrc && typeof encoding.ssrc !== 'number')\\n throw new TypeError('invalid encoding.ssrc');\\n // rid is optional.\\n if (encoding.rid && typeof encoding.rid !== 'string')\\n throw new TypeError('invalid encoding.rid');\\n // rtx is optional.\\n if (encoding.rtx && typeof encoding.rtx !== 'object') {\\n throw new TypeError('invalid encoding.rtx');\\n }\\n else if (encoding.rtx) {\\n // RTX ssrc is mandatory if rtx is present.\\n if (typeof encoding.rtx.ssrc !== 'number')\\n throw new TypeError('missing encoding.rtx.ssrc');\\n }\\n // dtx is optional. If unset set it to false.\\n if (!encoding.dtx || typeof encoding.dtx !== 'boolean')\\n encoding.dtx = false;\\n // scalabilityMode is optional.\\n if (encoding.scalabilityMode && typeof encoding.scalabilityMode !== 'string')\\n throw new TypeError('invalid encoding.scalabilityMode');\\n}\\nexports.validateRtpEncodingParameters = validateRtpEncodingParameters;\\n/**\\n * Validates RtcpParameters. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateRtcpParameters(rtcp) {\\n if (typeof rtcp !== 'object')\\n throw new TypeError('rtcp is not an object');\\n // cname is optional.\\n if (rtcp.cname && typeof rtcp.cname !== 'string')\\n throw new TypeError('invalid rtcp.cname');\\n // reducedSize is optional. If unset set it to true.\\n if (!rtcp.reducedSize || typeof rtcp.reducedSize !== 'boolean')\\n rtcp.reducedSize = true;\\n}\\nexports.validateRtcpParameters = validateRtcpParameters;\\n/**\\n * Validates SctpCapabilities. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateSctpCapabilities(caps) {\\n if (typeof caps !== 'object')\\n throw new TypeError('caps is not an object');\\n // numStreams is mandatory.\\n if (!caps.numStreams || typeof caps.numStreams !== 'object')\\n throw new TypeError('missing caps.numStreams');\\n validateNumSctpStreams(caps.numStreams);\\n}\\nexports.validateSctpCapabilities = validateSctpCapabilities;\\n/**\\n * Validates NumSctpStreams. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateNumSctpStreams(numStreams) {\\n if (typeof numStreams !== 'object')\\n throw new TypeError('numStreams is not an object');\\n // OS is mandatory.\\n if (typeof numStreams.OS !== 'number')\\n throw new TypeError('missing numStreams.OS');\\n // MIS is mandatory.\\n if (typeof numStreams.MIS !== 'number')\\n throw new TypeError('missing numStreams.MIS');\\n}\\nexports.validateNumSctpStreams = validateNumSctpStreams;\\n/**\\n * Validates SctpParameters. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateSctpParameters(params) {\\n if (typeof params !== 'object')\\n throw new TypeError('params is not an object');\\n // port is mandatory.\\n if (typeof params.port !== 'number')\\n throw new TypeError('missing params.port');\\n // OS is mandatory.\\n if (typeof params.OS !== 'number')\\n throw new TypeError('missing params.OS');\\n // MIS is mandatory.\\n if (typeof params.MIS !== 'number')\\n throw new TypeError('missing params.MIS');\\n // maxMessageSize is mandatory.\\n if (typeof params.maxMessageSize !== 'number')\\n throw new TypeError('missing params.maxMessageSize');\\n}\\nexports.validateSctpParameters = validateSctpParameters;\\n/**\\n * Validates SctpStreamParameters. It may modify given data by adding missing\\n * fields with default values.\\n * It throws if invalid.\\n */\\nfunction validateSctpStreamParameters(params) {\\n if (typeof params !== 'object')\\n throw new TypeError('params is not an object');\\n // streamId is mandatory.\\n if (typeof params.streamId !== 'number')\\n throw new TypeError('missing params.streamId');\\n // ordered is optional.\\n let orderedGiven = false;\\n if (typeof params.ordered === 'boolean')\\n orderedGiven = true;\\n else\\n params.ordered = true;\\n // maxPacketLifeTime is optional.\\n if (params.maxPacketLifeTime && typeof params.maxPacketLifeTime !== 'number')\\n throw new TypeError('invalid params.maxPacketLifeTime');\\n // maxRetransmits is optional.\\n if (params.maxRetransmits && typeof params.maxRetransmits !== 'number')\\n throw new TypeError('invalid params.maxRetransmits');\\n if (params.maxPacketLifeTime && params.maxRetransmits)\\n throw new TypeError('cannot provide both maxPacketLifeTime and maxRetransmits');\\n if (orderedGiven &&\\n params.ordered &&\\n (params.maxPacketLifeTime || params.maxRetransmits)) {\\n throw new TypeError('cannot be ordered with maxPacketLifeTime or maxRetransmits');\\n }\\n else if (!orderedGiven && (params.maxPacketLifeTime || params.maxRetransmits)) {\\n params.ordered = false;\\n }\\n // label is optional.\\n if (params.label && typeof params.label !== 'string')\\n throw new TypeError('invalid params.label');\\n // protocol is optional.\\n if (params.protocol && typeof params.protocol !== 'string')\\n throw new TypeError('invalid params.protocol');\\n}\\nexports.validateSctpStreamParameters = validateSctpStreamParameters;\\n/**\\n * Generate extended RTP capabilities for sending and receiving.\\n */\\nfunction getExtendedRtpCapabilities(localCaps, remoteCaps) {\\n const extendedRtpCapabilities = {\\n codecs: [],\\n headerExtensions: []\\n };\\n // Match media codecs and keep the order preferred by remoteCaps.\\n for (const remoteCodec of remoteCaps.codecs || []) {\\n if (isRtxCodec(remoteCodec))\\n continue;\\n const matchingLocalCodec = (localCaps.codecs || [])\\n .find((localCodec) => (matchCodecs(localCodec, remoteCodec, { strict: true, modify: true })));\\n if (!matchingLocalCodec)\\n continue;\\n const extendedCodec = {\\n mimeType: matchingLocalCodec.mimeType,\\n kind: matchingLocalCodec.kind,\\n clockRate: matchingLocalCodec.clockRate,\\n channels: matchingLocalCodec.channels,\\n localPayloadType: matchingLocalCodec.preferredPayloadType,\\n localRtxPayloadType: undefined,\\n remotePayloadType: remoteCodec.preferredPayloadType,\\n remoteRtxPayloadType: undefined,\\n localParameters: matchingLocalCodec.parameters,\\n remoteParameters: remoteCodec.parameters,\\n rtcpFeedback: reduceRtcpFeedback(matchingLocalCodec, remoteCodec)\\n };\\n extendedRtpCapabilities.codecs.push(extendedCodec);\\n }\\n // Match RTX codecs.\\n for (const extendedCodec of extendedRtpCapabilities.codecs) {\\n const matchingLocalRtxCodec = localCaps.codecs\\n .find((localCodec) => (isRtxCodec(localCodec) &&\\n localCodec.parameters.apt === extendedCodec.localPayloadType));\\n const matchingRemoteRtxCodec = remoteCaps.codecs\\n .find((remoteCodec) => (isRtxCodec(remoteCodec) &&\\n remoteCodec.parameters.apt === extendedCodec.remotePayloadType));\\n if (matchingLocalRtxCodec && matchingRemoteRtxCodec) {\\n extendedCodec.localRtxPayloadType = matchingLocalRtxCodec.preferredPayloadType;\\n extendedCodec.remoteRtxPayloadType = matchingRemoteRtxCodec.preferredPayloadType;\\n }\\n }\\n // Match header extensions.\\n for (const remoteExt of remoteCaps.headerExtensions) {\\n const matchingLocalExt = localCaps.headerExtensions\\n .find((localExt) => (matchHeaderExtensions(localExt, remoteExt)));\\n if (!matchingLocalExt)\\n continue;\\n const extendedExt = {\\n kind: remoteExt.kind,\\n uri: remoteExt.uri,\\n sendId: matchingLocalExt.preferredId,\\n recvId: remoteExt.preferredId,\\n encrypt: matchingLocalExt.preferredEncrypt,\\n direction: 'sendrecv'\\n };\\n switch (remoteExt.direction) {\\n case 'sendrecv':\\n extendedExt.direction = 'sendrecv';\\n break;\\n case 'recvonly':\\n extendedExt.direction = 'sendonly';\\n break;\\n case 'sendonly':\\n extendedExt.direction = 'recvonly';\\n break;\\n case 'inactive':\\n extendedExt.direction = 'inactive';\\n break;\\n }\\n extendedRtpCapabilities.headerExtensions.push(extendedExt);\\n }\\n return extendedRtpCapabilities;\\n}\\nexports.getExtendedRtpCapabilities = getExtendedRtpCapabilities;\\n/**\\n * Generate RTP capabilities for receiving media based on the given extended\\n * RTP capabilities.\\n */\\nfunction getRecvRtpCapabilities(extendedRtpCapabilities) {\\n const rtpCapabilities = {\\n codecs: [],\\n headerExtensions: []\\n };\\n for (const extendedCodec of extendedRtpCapabilities.codecs) {\\n const codec = {\\n mimeType: extendedCodec.mimeType,\\n kind: extendedCodec.kind,\\n preferredPayloadType: extendedCodec.remotePayloadType,\\n clockRate: extendedCodec.clockRate,\\n channels: extendedCodec.channels,\\n parameters: extendedCodec.localParameters,\\n rtcpFeedback: extendedCodec.rtcpFeedback\\n };\\n rtpCapabilities.codecs.push(codec);\\n // Add RTX codec.\\n if (!extendedCodec.remoteRtxPayloadType)\\n continue;\\n const rtxCodec = {\\n mimeType: `${extendedCodec.kind}/rtx`,\\n kind: extendedCodec.kind,\\n preferredPayloadType: extendedCodec.remoteRtxPayloadType,\\n clockRate: extendedCodec.clockRate,\\n parameters: {\\n apt: extendedCodec.remotePayloadType\\n },\\n rtcpFeedback: []\\n };\\n rtpCapabilities.codecs.push(rtxCodec);\\n // TODO: In the future, we need to add FEC, CN, etc, codecs.\\n }\\n for (const extendedExtension of extendedRtpCapabilities.headerExtensions) {\\n // Ignore RTP extensions not valid for receiving.\\n if (extendedExtension.direction !== 'sendrecv' &&\\n extendedExtension.direction !== 'recvonly') {\\n continue;\\n }\\n const ext = {\\n kind: extendedExtension.kind,\\n uri: extendedExtension.uri,\\n preferredId: extendedExtension.recvId,\\n preferredEncrypt: extendedExtension.encrypt,\\n direction: extendedExtension.direction\\n };\\n rtpCapabilities.headerExtensions.push(ext);\\n }\\n return rtpCapabilities;\\n}\\nexports.getRecvRtpCapabilities = getRecvRtpCapabilities;\\n/**\\n * Generate RTP parameters of the given kind for sending media.\\n * NOTE: mid, encodings and rtcp fields are left empty.\\n */\\nfunction getSendingRtpParameters(kind, extendedRtpCapabilities) {\\n const rtpParameters = {\\n mid: undefined,\\n codecs: [],\\n headerExtensions: [],\\n encodings: [],\\n rtcp: {}\\n };\\n for (const extendedCodec of extendedRtpCapabilities.codecs) {\\n if (extendedCodec.kind !== kind)\\n continue;\\n const codec = {\\n mimeType: extendedCodec.mimeType,\\n payloadType: extendedCodec.localPayloadType,\\n clockRate: extendedCodec.clockRate,\\n channels: extendedCodec.channels,\\n parameters: extendedCodec.localParameters,\\n rtcpFeedback: extendedCodec.rtcpFeedback\\n };\\n rtpParameters.codecs.push(codec);\\n // Add RTX codec.\\n if (extendedCodec.localRtxPayloadType) {\\n const rtxCodec = {\\n mimeType: `${extendedCodec.kind}/rtx`,\\n payloadType: extendedCodec.localRtxPayloadType,\\n clockRate: extendedCodec.clockRate,\\n parameters: {\\n apt: extendedCodec.localPayloadType\\n },\\n rtcpFeedback: []\\n };\\n rtpParameters.codecs.push(rtxCodec);\\n }\\n }\\n for (const extendedExtension of extendedRtpCapabilities.headerExtensions) {\\n // Ignore RTP extensions of a different kind and those not valid for sending.\\n if ((extendedExtension.kind && extendedExtension.kind !== kind) ||\\n (extendedExtension.direction !== 'sendrecv' &&\\n extendedExtension.direction !== 'sendonly')) {\\n continue;\\n }\\n const ext = {\\n uri: extendedExtension.uri,\\n id: extendedExtension.sendId,\\n encrypt: extendedExtension.encrypt,\\n parameters: {}\\n };\\n rtpParameters.headerExtensions.push(ext);\\n }\\n return rtpParameters;\\n}\\nexports.getSendingRtpParameters = getSendingRtpParameters;\\n/**\\n * Generate RTP parameters of the given kind suitable for the remote SDP answer.\\n */\\nfunction getSendingRemoteRtpParameters(kind, extendedRtpCapabilities) {\\n const rtpParameters = {\\n mid: undefined,\\n codecs: [],\\n headerExtensions: [],\\n encodings: [],\\n rtcp: {}\\n };\\n for (const extendedCodec of extendedRtpCapabilities.codecs) {\\n if (extendedCodec.kind !== kind)\\n continue;\\n const codec = {\\n mimeType: extendedCodec.mimeType,\\n payloadType: extendedCodec.localPayloadType,\\n clockRate: extendedCodec.clockRate,\\n channels: extendedCodec.channels,\\n parameters: extendedCodec.remoteParameters,\\n rtcpFeedback: extendedCodec.rtcpFeedback\\n };\\n rtpParameters.codecs.push(codec);\\n // Add RTX codec.\\n if (extendedCodec.localRtxPayloadType) {\\n const rtxCodec = {\\n mimeType: `${extendedCodec.kind}/rtx`,\\n payloadType: extendedCodec.localRtxPayloadType,\\n clockRate: extendedCodec.clockRate,\\n parameters: {\\n apt: extendedCodec.localPayloadType\\n },\\n rtcpFeedback: []\\n };\\n rtpParameters.codecs.push(rtxCodec);\\n }\\n }\\n for (const extendedExtension of extendedRtpCapabilities.headerExtensions) {\\n // Ignore RTP extensions of a different kind and those not valid for sending.\\n if ((extendedExtension.kind && extendedExtension.kind !== kind) ||\\n (extendedExtension.direction !== 'sendrecv' &&\\n extendedExtension.direction !== 'sendonly')) {\\n continue;\\n }\\n const ext = {\\n uri: extendedExtension.uri,\\n id: extendedExtension.sendId,\\n encrypt: extendedExtension.encrypt,\\n parameters: {}\\n };\\n rtpParameters.headerExtensions.push(ext);\\n }\\n // Reduce codecs' RTCP feedback. Use Transport-CC if available, REMB otherwise.\\n if (rtpParameters.headerExtensions.some((ext) => (ext.uri === 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01'))) {\\n for (const codec of rtpParameters.codecs) {\\n codec.rtcpFeedback = (codec.rtcpFeedback || [])\\n .filter((fb) => fb.type !== 'goog-remb');\\n }\\n }\\n else if (rtpParameters.headerExtensions.some((ext) => (ext.uri === 'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time'))) {\\n for (const codec of rtpParameters.codecs) {\\n codec.rtcpFeedback = (codec.rtcpFeedback || [])\\n .filter((fb) => fb.type !== 'transport-cc');\\n }\\n }\\n else {\\n for (const codec of rtpParameters.codecs) {\\n codec.rtcpFeedback = (codec.rtcpFeedback || [])\\n .filter((fb) => (fb.type !== 'transport-cc' &&\\n fb.type !== 'goog-remb'));\\n }\\n }\\n return rtpParameters;\\n}\\nexports.getSendingRemoteRtpParameters = getSendingRemoteRtpParameters;\\n/**\\n * Reduce given codecs by returning an array of codecs \\\"compatible\\\" with the\\n * given capability codec. If no capability codec is given, take the first\\n * one(s).\\n *\\n * Given codecs must be generated by ortc.getSendingRtpParameters() or\\n * ortc.getSendingRemoteRtpParameters().\\n *\\n * The returned array of codecs also include a RTX codec if available.\\n */\\nfunction reduceCodecs(codecs, capCodec) {\\n const filteredCodecs = [];\\n // If no capability codec is given, take the first one (and RTX).\\n if (!capCodec) {\\n filteredCodecs.push(codecs[0]);\\n if (isRtxCodec(codecs[1]))\\n filteredCodecs.push(codecs[1]);\\n }\\n // Otherwise look for a compatible set of codecs.\\n else {\\n for (let idx = 0; idx < codecs.length; ++idx) {\\n if (matchCodecs(codecs[idx], capCodec)) {\\n filteredCodecs.push(codecs[idx]);\\n if (isRtxCodec(codecs[idx + 1]))\\n filteredCodecs.push(codecs[idx + 1]);\\n break;\\n }\\n }\\n if (filteredCodecs.length === 0)\\n throw new TypeError('no matching codec found');\\n }\\n return filteredCodecs;\\n}\\nexports.reduceCodecs = reduceCodecs;\\n/**\\n * Create RTP parameters for a Consumer for the RTP probator.\\n */\\nfunction generateProbatorRtpParameters(videoRtpParameters) {\\n // Clone given reference video RTP parameters.\\n videoRtpParameters = utils.clone(videoRtpParameters, {});\\n // This may throw.\\n validateRtpParameters(videoRtpParameters);\\n const rtpParameters = {\\n mid: RTP_PROBATOR_MID,\\n codecs: [],\\n headerExtensions: [],\\n encodings: [{ ssrc: RTP_PROBATOR_SSRC }],\\n rtcp: { cname: 'probator' }\\n };\\n rtpParameters.codecs.push(videoRtpParameters.codecs[0]);\\n rtpParameters.codecs[0].payloadType = RTP_PROBATOR_CODEC_PAYLOAD_TYPE;\\n rtpParameters.headerExtensions = videoRtpParameters.headerExtensions;\\n return rtpParameters;\\n}\\nexports.generateProbatorRtpParameters = generateProbatorRtpParameters;\\n/**\\n * Whether media can be sent based on the given RTP capabilities.\\n */\\nfunction canSend(kind, extendedRtpCapabilities) {\\n return extendedRtpCapabilities.codecs.\\n some((codec) => codec.kind === kind);\\n}\\nexports.canSend = canSend;\\n/**\\n * Whether the given RTP parameters can be received with the given RTP\\n * capabilities.\\n */\\nfunction canReceive(rtpParameters, extendedRtpCapabilities) {\\n // This may throw.\\n validateRtpParameters(rtpParameters);\\n if (rtpParameters.codecs.length === 0)\\n return false;\\n const firstMediaCodec = rtpParameters.codecs[0];\\n return extendedRtpCapabilities.codecs\\n .some((codec) => codec.remotePayloadType === firstMediaCodec.payloadType);\\n}\\nexports.canReceive = canReceive;\\nfunction isRtxCodec(codec) {\\n if (!codec)\\n return false;\\n return /.+\\\\/rtx$/i.test(codec.mimeType);\\n}\\nfunction matchCodecs(aCodec, bCodec, { strict = false, modify = false } = {}) {\\n const aMimeType = aCodec.mimeType.toLowerCase();\\n const bMimeType = bCodec.mimeType.toLowerCase();\\n if (aMimeType !== bMimeType)\\n return false;\\n if (aCodec.clockRate !== bCodec.clockRate)\\n return false;\\n if (aCodec.channels !== bCodec.channels)\\n return false;\\n // Per codec special checks.\\n switch (aMimeType) {\\n case 'video/h264':\\n {\\n // If strict matching check profile-level-id.\\n if (strict) {\\n const aPacketizationMode = aCodec.parameters['packetization-mode'] || 0;\\n const bPacketizationMode = bCodec.parameters['packetization-mode'] || 0;\\n if (aPacketizationMode !== bPacketizationMode)\\n return false;\\n if (!h264.isSameProfile(aCodec.parameters, bCodec.parameters))\\n return false;\\n let selectedProfileLevelId;\\n try {\\n selectedProfileLevelId =\\n h264.generateProfileLevelIdForAnswer(aCodec.parameters, bCodec.parameters);\\n }\\n catch (error) {\\n return false;\\n }\\n if (modify) {\\n if (selectedProfileLevelId) {\\n aCodec.parameters['profile-level-id'] = selectedProfileLevelId;\\n bCodec.parameters['profile-level-id'] = selectedProfileLevelId;\\n }\\n else {\\n delete aCodec.parameters['profile-level-id'];\\n delete bCodec.parameters['profile-level-id'];\\n }\\n }\\n }\\n break;\\n }\\n case 'video/vp9':\\n {\\n // If strict matching check profile-id.\\n if (strict) {\\n const aProfileId = aCodec.parameters['profile-id'] || 0;\\n const bProfileId = bCodec.parameters['profile-id'] || 0;\\n if (aProfileId !== bProfileId)\\n return false;\\n }\\n break;\\n }\\n }\\n return true;\\n}\\nfunction matchHeaderExtensions(aExt, bExt) {\\n if (aExt.kind && bExt.kind && aExt.kind !== bExt.kind)\\n return false;\\n if (aExt.uri !== bExt.uri)\\n return false;\\n return true;\\n}\\nfunction reduceRtcpFeedback(codecA, codecB) {\\n const reducedRtcpFeedback = [];\\n for (const aFb of codecA.rtcpFeedback || []) {\\n const matchingBFb = (codecB.rtcpFeedback || [])\\n .find((bFb) => (bFb.type === aFb.type &&\\n (bFb.parameter === aFb.parameter || (!bFb.parameter && !aFb.parameter))));\\n if (matchingBFb)\\n reducedRtcpFeedback.push(matchingBFb);\\n }\\n return reducedRtcpFeedback;\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/ortc.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/scalabilityModes.js\":\n/*!***************************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/scalabilityModes.js ***!\n \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.parse = void 0;\\nconst ScalabilityModeRegex = new RegExp('^[LS]([1-9]\\\\\\\\d{0,1})T([1-9]\\\\\\\\d{0,1})');\\nfunction parse(scalabilityMode) {\\n const match = ScalabilityModeRegex.exec(scalabilityMode || '');\\n if (match) {\\n return {\\n spatialLayers: Number(match[1]),\\n temporalLayers: Number(match[2])\\n };\\n }\\n else {\\n return {\\n spatialLayers: 1,\\n temporalLayers: 1\\n };\\n }\\n}\\nexports.parse = parse;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/scalabilityModes.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/types.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/types.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\\n}) : (function(o, m, k, k2) {\\n if (k2 === undefined) k2 = k;\\n o[k2] = m[k];\\n}));\\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\\n for (var p in m) if (p !== \\\"default\\\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\n__exportStar(__webpack_require__(/*! ./Device */ \\\"./node_modules/mediasoup-client/lib/Device.js\\\"), exports);\\n__exportStar(__webpack_require__(/*! ./Transport */ \\\"./node_modules/mediasoup-client/lib/Transport.js\\\"), exports);\\n__exportStar(__webpack_require__(/*! ./Producer */ \\\"./node_modules/mediasoup-client/lib/Producer.js\\\"), exports);\\n__exportStar(__webpack_require__(/*! ./Consumer */ \\\"./node_modules/mediasoup-client/lib/Consumer.js\\\"), exports);\\n__exportStar(__webpack_require__(/*! ./DataProducer */ \\\"./node_modules/mediasoup-client/lib/DataProducer.js\\\"), exports);\\n__exportStar(__webpack_require__(/*! ./DataConsumer */ \\\"./node_modules/mediasoup-client/lib/DataConsumer.js\\\"), exports);\\n__exportStar(__webpack_require__(/*! ./RtpParameters */ \\\"./node_modules/mediasoup-client/lib/RtpParameters.js\\\"), exports);\\n__exportStar(__webpack_require__(/*! ./SctpParameters */ \\\"./node_modules/mediasoup-client/lib/SctpParameters.js\\\"), exports);\\n__exportStar(__webpack_require__(/*! ./handlers/HandlerInterface */ \\\"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js\\\"), exports);\\n__exportStar(__webpack_require__(/*! ./errors */ \\\"./node_modules/mediasoup-client/lib/errors.js\\\"), exports);\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/types.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/mediasoup-client/lib/utils.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/mediasoup-client/lib/utils.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", { value: true });\\nexports.generateRandomNumber = exports.clone = void 0;\\n/**\\n * Clones the given data.\\n */\\nfunction clone(data, defaultValue) {\\n if (typeof data === 'undefined')\\n return defaultValue;\\n return JSON.parse(JSON.stringify(data));\\n}\\nexports.clone = clone;\\n/**\\n * Generates a random positive integer.\\n */\\nfunction generateRandomNumber() {\\n return Math.round(Math.random() * 10000000);\\n}\\nexports.generateRandomNumber = generateRandomNumber;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/mediasoup-client/lib/utils.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/ms/index.js\":\n/*!**********************************!*\\\n !*** ./node_modules/ms/index.js ***!\n \\**********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/**\\n * Helpers.\\n */\\n\\nvar s = 1000;\\nvar m = s * 60;\\nvar h = m * 60;\\nvar d = h * 24;\\nvar w = d * 7;\\nvar y = d * 365.25;\\n\\n/**\\n * Parse or format the given `val`.\\n *\\n * Options:\\n *\\n * - `long` verbose formatting [false]\\n *\\n * @param {String|Number} val\\n * @param {Object} [options]\\n * @throws {Error} throw an error if val is not a non-empty string or a number\\n * @return {String|Number}\\n * @api public\\n */\\n\\nmodule.exports = function(val, options) {\\n options = options || {};\\n var type = typeof val;\\n if (type === 'string' && val.length > 0) {\\n return parse(val);\\n } else if (type === 'number' && isFinite(val)) {\\n return options.long ? fmtLong(val) : fmtShort(val);\\n }\\n throw new Error(\\n 'val is not a non-empty string or a valid number. val=' +\\n JSON.stringify(val)\\n );\\n};\\n\\n/**\\n * Parse the given `str` and return milliseconds.\\n *\\n * @param {String} str\\n * @return {Number}\\n * @api private\\n */\\n\\nfunction parse(str) {\\n str = String(str);\\n if (str.length > 100) {\\n return;\\n }\\n 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(\\n str\\n );\\n if (!match) {\\n return;\\n }\\n var n = parseFloat(match[1]);\\n var type = (match[2] || 'ms').toLowerCase();\\n switch (type) {\\n case 'years':\\n case 'year':\\n case 'yrs':\\n case 'yr':\\n case 'y':\\n return n * y;\\n case 'weeks':\\n case 'week':\\n case 'w':\\n return n * w;\\n case 'days':\\n case 'day':\\n case 'd':\\n return n * d;\\n case 'hours':\\n case 'hour':\\n case 'hrs':\\n case 'hr':\\n case 'h':\\n return n * h;\\n case 'minutes':\\n case 'minute':\\n case 'mins':\\n case 'min':\\n case 'm':\\n return n * m;\\n case 'seconds':\\n case 'second':\\n case 'secs':\\n case 'sec':\\n case 's':\\n return n * s;\\n case 'milliseconds':\\n case 'millisecond':\\n case 'msecs':\\n case 'msec':\\n case 'ms':\\n return n;\\n default:\\n return undefined;\\n }\\n}\\n\\n/**\\n * Short format for `ms`.\\n *\\n * @param {Number} ms\\n * @return {String}\\n * @api private\\n */\\n\\nfunction fmtShort(ms) {\\n var msAbs = Math.abs(ms);\\n if (msAbs >= d) {\\n return Math.round(ms / d) + 'd';\\n }\\n if (msAbs >= h) {\\n return Math.round(ms / h) + 'h';\\n }\\n if (msAbs >= m) {\\n return Math.round(ms / m) + 'm';\\n }\\n if (msAbs >= s) {\\n return Math.round(ms / s) + 's';\\n }\\n return ms + 'ms';\\n}\\n\\n/**\\n * Long format for `ms`.\\n *\\n * @param {Number} ms\\n * @return {String}\\n * @api private\\n */\\n\\nfunction fmtLong(ms) {\\n var msAbs = Math.abs(ms);\\n if (msAbs >= d) {\\n return plural(ms, msAbs, d, 'day');\\n }\\n if (msAbs >= h) {\\n return plural(ms, msAbs, h, 'hour');\\n }\\n if (msAbs >= m) {\\n return plural(ms, msAbs, m, 'minute');\\n }\\n if (msAbs >= s) {\\n return plural(ms, msAbs, s, 'second');\\n }\\n return ms + ' ms';\\n}\\n\\n/**\\n * Pluralization helper.\\n */\\n\\nfunction plural(ms, msAbs, n, name) {\\n var isPlural = msAbs >= n * 1.5;\\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/ms/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/parseqs/index.js\":\n/*!***************************************!*\\\n !*** ./node_modules/parseqs/index.js ***!\n \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/**\\n * Compiles a querystring\\n * Returns string representation of the object\\n *\\n * @param {Object}\\n * @api private\\n */\\n\\nexports.encode = function (obj) {\\n var str = '';\\n\\n for (var i in obj) {\\n if (obj.hasOwnProperty(i)) {\\n if (str.length) str += '&';\\n str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\\n }\\n }\\n\\n return str;\\n};\\n\\n/**\\n * Parses a simple querystring into an object\\n *\\n * @param {String} qs\\n * @api private\\n */\\n\\nexports.decode = function(qs){\\n var qry = {};\\n var pairs = qs.split('&');\\n for (var i = 0, l = pairs.length; i < l; i++) {\\n var pair = pairs[i].split('=');\\n qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\\n }\\n return qry;\\n};\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/parseqs/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/parseuri/index.js\":\n/*!****************************************!*\\\n !*** ./node_modules/parseuri/index.js ***!\n \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/**\\n * Parses an URI\\n *\\n * @author Steven Levithan <stevenlevithan.com> (MIT license)\\n * @api private\\n */\\n\\nvar re = /^(?:(?![^:@]+:[^:@\\\\/]*@)(http|https|ws|wss):\\\\/\\\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\\\/?#]*)(?::(\\\\d*))?)(((\\\\/(?:[^?#](?![^?#\\\\/]*\\\\.[^?#\\\\/.]+(?:[?#]|$)))*\\\\/?)?([^?#\\\\/]*))(?:\\\\?([^#]*))?(?:#(.*))?)/;\\n\\nvar parts = [\\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\\n];\\n\\nmodule.exports = function parseuri(str) {\\n var src = str,\\n b = str.indexOf('['),\\n e = str.indexOf(']');\\n\\n if (b != -1 && e != -1) {\\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\\n }\\n\\n var m = re.exec(str || ''),\\n uri = {},\\n i = 14;\\n\\n while (i--) {\\n uri[parts[i]] = m[i] || '';\\n }\\n\\n if (b != -1 && e != -1) {\\n uri.source = src;\\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\\n uri.ipv6uri = true;\\n }\\n\\n uri.pathNames = pathNames(uri, uri['path']);\\n uri.queryKey = queryKey(uri, uri['query']);\\n\\n return uri;\\n};\\n\\nfunction pathNames(obj, path) {\\n var regx = /\\\\/{2,9}/g,\\n names = path.replace(regx, \\\"/\\\").split(\\\"/\\\");\\n\\n if (path.substr(0, 1) == '/' || path.length === 0) {\\n names.splice(0, 1);\\n }\\n if (path.substr(path.length - 1, 1) == '/') {\\n names.splice(names.length - 1, 1);\\n }\\n\\n return names;\\n}\\n\\nfunction queryKey(uri, query) {\\n var data = {};\\n\\n query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {\\n if ($1) {\\n data[$1] = $2;\\n }\\n });\\n\\n return data;\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/parseuri/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/process/browser.js\":\n/*!*****************************************!*\\\n !*** ./node_modules/process/browser.js ***!\n \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"// shim for using process in browser\\nvar process = module.exports = {};\\n\\n// cached from whatever global is present so that test runners that stub it\\n// don't break things. But we need to wrap it in a try catch in case it is\\n// wrapped in strict mode code which doesn't define any globals. It's inside a\\n// function because try/catches deoptimize in certain engines.\\n\\nvar cachedSetTimeout;\\nvar cachedClearTimeout;\\n\\nfunction defaultSetTimout() {\\n throw new Error('setTimeout has not been defined');\\n}\\nfunction defaultClearTimeout () {\\n throw new Error('clearTimeout has not been defined');\\n}\\n(function () {\\n try {\\n if (typeof setTimeout === 'function') {\\n cachedSetTimeout = setTimeout;\\n } else {\\n cachedSetTimeout = defaultSetTimout;\\n }\\n } catch (e) {\\n cachedSetTimeout = defaultSetTimout;\\n }\\n try {\\n if (typeof clearTimeout === 'function') {\\n cachedClearTimeout = clearTimeout;\\n } else {\\n cachedClearTimeout = defaultClearTimeout;\\n }\\n } catch (e) {\\n cachedClearTimeout = defaultClearTimeout;\\n }\\n} ())\\nfunction runTimeout(fun) {\\n if (cachedSetTimeout === setTimeout) {\\n //normal enviroments in sane situations\\n return setTimeout(fun, 0);\\n }\\n // if setTimeout wasn't available but was latter defined\\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\\n cachedSetTimeout = setTimeout;\\n return setTimeout(fun, 0);\\n }\\n try {\\n // when when somebody has screwed with setTimeout but no I.E. maddness\\n return cachedSetTimeout(fun, 0);\\n } catch(e){\\n try {\\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\\n return cachedSetTimeout.call(null, fun, 0);\\n } catch(e){\\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\\n return cachedSetTimeout.call(this, fun, 0);\\n }\\n }\\n\\n\\n}\\nfunction runClearTimeout(marker) {\\n if (cachedClearTimeout === clearTimeout) {\\n //normal enviroments in sane situations\\n return clearTimeout(marker);\\n }\\n // if clearTimeout wasn't available but was latter defined\\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\\n cachedClearTimeout = clearTimeout;\\n return clearTimeout(marker);\\n }\\n try {\\n // when when somebody has screwed with setTimeout but no I.E. maddness\\n return cachedClearTimeout(marker);\\n } catch (e){\\n try {\\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\\n return cachedClearTimeout.call(null, marker);\\n } catch (e){\\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\\n return cachedClearTimeout.call(this, marker);\\n }\\n }\\n\\n\\n\\n}\\nvar queue = [];\\nvar draining = false;\\nvar currentQueue;\\nvar queueIndex = -1;\\n\\nfunction cleanUpNextTick() {\\n if (!draining || !currentQueue) {\\n return;\\n }\\n draining = false;\\n if (currentQueue.length) {\\n queue = currentQueue.concat(queue);\\n } else {\\n queueIndex = -1;\\n }\\n if (queue.length) {\\n drainQueue();\\n }\\n}\\n\\nfunction drainQueue() {\\n if (draining) {\\n return;\\n }\\n var timeout = runTimeout(cleanUpNextTick);\\n draining = true;\\n\\n var len = queue.length;\\n while(len) {\\n currentQueue = queue;\\n queue = [];\\n while (++queueIndex < len) {\\n if (currentQueue) {\\n currentQueue[queueIndex].run();\\n }\\n }\\n queueIndex = -1;\\n len = queue.length;\\n }\\n currentQueue = null;\\n draining = false;\\n runClearTimeout(timeout);\\n}\\n\\nprocess.nextTick = function (fun) {\\n var args = new Array(arguments.length - 1);\\n if (arguments.length > 1) {\\n for (var i = 1; i < arguments.length; i++) {\\n args[i - 1] = arguments[i];\\n }\\n }\\n queue.push(new Item(fun, args));\\n if (queue.length === 1 && !draining) {\\n runTimeout(drainQueue);\\n }\\n};\\n\\n// v8 likes predictible objects\\nfunction Item(fun, array) {\\n this.fun = fun;\\n this.array = array;\\n}\\nItem.prototype.run = function () {\\n this.fun.apply(null, this.array);\\n};\\nprocess.title = 'browser';\\nprocess.browser = true;\\nprocess.env = {};\\nprocess.argv = [];\\nprocess.version = ''; // empty string to avoid regexp issues\\nprocess.versions = {};\\n\\nfunction noop() {}\\n\\nprocess.on = noop;\\nprocess.addListener = noop;\\nprocess.once = noop;\\nprocess.off = noop;\\nprocess.removeListener = noop;\\nprocess.removeAllListeners = noop;\\nprocess.emit = noop;\\nprocess.prependListener = noop;\\nprocess.prependOnceListener = noop;\\n\\nprocess.listeners = function (name) { return [] }\\n\\nprocess.binding = function (name) {\\n throw new Error('process.binding is not supported');\\n};\\n\\nprocess.cwd = function () { return '/' };\\nprocess.chdir = function (dir) {\\n throw new Error('process.chdir is not supported');\\n};\\nprocess.umask = function() { return 0; };\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/process/browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/sdp-transform/lib/grammar.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/sdp-transform/lib/grammar.js ***!\n \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"var grammar = module.exports = {\\n v: [{\\n name: 'version',\\n reg: /^(\\\\d*)$/\\n }],\\n o: [{\\n // o=- 20518 0 IN IP4 203.0.113.1\\n // NB: sessionId will be a String in most cases because it is huge\\n name: 'origin',\\n reg: /^(\\\\S*) (\\\\d*) (\\\\d*) (\\\\S*) IP(\\\\d) (\\\\S*)/,\\n names: ['username', 'sessionId', 'sessionVersion', 'netType', 'ipVer', 'address'],\\n format: '%s %s %d %s IP%d %s'\\n }],\\n // default parsing of these only (though some of these feel outdated)\\n s: [{ name: 'name' }],\\n i: [{ name: 'description' }],\\n u: [{ name: 'uri' }],\\n e: [{ name: 'email' }],\\n p: [{ name: 'phone' }],\\n z: [{ name: 'timezones' }], // TODO: this one can actually be parsed properly...\\n r: [{ name: 'repeats' }], // TODO: this one can also be parsed properly\\n // k: [{}], // outdated thing ignored\\n t: [{\\n // t=0 0\\n name: 'timing',\\n reg: /^(\\\\d*) (\\\\d*)/,\\n names: ['start', 'stop'],\\n format: '%d %d'\\n }],\\n c: [{\\n // c=IN IP4 10.47.197.26\\n name: 'connection',\\n reg: /^IN IP(\\\\d) (\\\\S*)/,\\n names: ['version', 'ip'],\\n format: 'IN IP%d %s'\\n }],\\n b: [{\\n // b=AS:4000\\n push: 'bandwidth',\\n reg: /^(TIAS|AS|CT|RR|RS):(\\\\d*)/,\\n names: ['type', 'limit'],\\n format: '%s:%s'\\n }],\\n m: [{\\n // m=video 51744 RTP/AVP 126 97 98 34 31\\n // NB: special - pushes to session\\n // TODO: rtp/fmtp should be filtered by the payloads found here?\\n reg: /^(\\\\w*) (\\\\d*) ([\\\\w/]*)(?: (.*))?/,\\n names: ['type', 'port', 'protocol', 'payloads'],\\n format: '%s %d %s %s'\\n }],\\n a: [\\n {\\n // a=rtpmap:110 opus/48000/2\\n push: 'rtp',\\n reg: /^rtpmap:(\\\\d*) ([\\\\w\\\\-.]*)(?:\\\\s*\\\\/(\\\\d*)(?:\\\\s*\\\\/(\\\\S*))?)?/,\\n names: ['payload', 'codec', 'rate', 'encoding'],\\n format: function (o) {\\n return (o.encoding)\\n ? 'rtpmap:%d %s/%s/%s'\\n : o.rate\\n ? 'rtpmap:%d %s/%s'\\n : 'rtpmap:%d %s';\\n }\\n },\\n {\\n // a=fmtp:108 profile-level-id=24;object=23;bitrate=64000\\n // a=fmtp:111 minptime=10; useinbandfec=1\\n push: 'fmtp',\\n reg: /^fmtp:(\\\\d*) ([\\\\S| ]*)/,\\n names: ['payload', 'config'],\\n format: 'fmtp:%d %s'\\n },\\n {\\n // a=control:streamid=0\\n name: 'control',\\n reg: /^control:(.*)/,\\n format: 'control:%s'\\n },\\n {\\n // a=rtcp:65179 IN IP4 193.84.77.194\\n name: 'rtcp',\\n reg: /^rtcp:(\\\\d*)(?: (\\\\S*) IP(\\\\d) (\\\\S*))?/,\\n names: ['port', 'netType', 'ipVer', 'address'],\\n format: function (o) {\\n return (o.address != null)\\n ? 'rtcp:%d %s IP%d %s'\\n : 'rtcp:%d';\\n }\\n },\\n {\\n // a=rtcp-fb:98 trr-int 100\\n push: 'rtcpFbTrrInt',\\n reg: /^rtcp-fb:(\\\\*|\\\\d*) trr-int (\\\\d*)/,\\n names: ['payload', 'value'],\\n format: 'rtcp-fb:%s trr-int %d'\\n },\\n {\\n // a=rtcp-fb:98 nack rpsi\\n push: 'rtcpFb',\\n reg: /^rtcp-fb:(\\\\*|\\\\d*) ([\\\\w-_]*)(?: ([\\\\w-_]*))?/,\\n names: ['payload', 'type', 'subtype'],\\n format: function (o) {\\n return (o.subtype != null)\\n ? 'rtcp-fb:%s %s %s'\\n : 'rtcp-fb:%s %s';\\n }\\n },\\n {\\n // a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\\n // a=extmap:1/recvonly URI-gps-string\\n // a=extmap:3 urn:ietf:params:rtp-hdrext:encrypt urn:ietf:params:rtp-hdrext:smpte-tc 25@600/24\\n push: 'ext',\\n reg: /^extmap:(\\\\d+)(?:\\\\/(\\\\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\\\\S*)(?: (\\\\S*))?/,\\n names: ['value', 'direction', 'encrypt-uri', 'uri', 'config'],\\n format: function (o) {\\n return (\\n 'extmap:%d' +\\n (o.direction ? '/%s' : '%v') +\\n (o['encrypt-uri'] ? ' %s' : '%v') +\\n ' %s' +\\n (o.config ? ' %s' : '')\\n );\\n }\\n },\\n {\\n // a=extmap-allow-mixed\\n name: 'extmapAllowMixed',\\n reg: /^(extmap-allow-mixed)/\\n },\\n {\\n // a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:32\\n push: 'crypto',\\n reg: /^crypto:(\\\\d*) ([\\\\w_]*) (\\\\S*)(?: (\\\\S*))?/,\\n names: ['id', 'suite', 'config', 'sessionConfig'],\\n format: function (o) {\\n return (o.sessionConfig != null)\\n ? 'crypto:%d %s %s %s'\\n : 'crypto:%d %s %s';\\n }\\n },\\n {\\n // a=setup:actpass\\n name: 'setup',\\n reg: /^setup:(\\\\w*)/,\\n format: 'setup:%s'\\n },\\n {\\n // a=connection:new\\n name: 'connectionType',\\n reg: /^connection:(new|existing)/,\\n format: 'connection:%s'\\n },\\n {\\n // a=mid:1\\n name: 'mid',\\n reg: /^mid:([^\\\\s]*)/,\\n format: 'mid:%s'\\n },\\n {\\n // a=msid:0c8b064d-d807-43b4-b434-f92a889d8587 98178685-d409-46e0-8e16-7ef0db0db64a\\n name: 'msid',\\n reg: /^msid:(.*)/,\\n format: 'msid:%s'\\n },\\n {\\n // a=ptime:20\\n name: 'ptime',\\n reg: /^ptime:(\\\\d*(?:\\\\.\\\\d*)*)/,\\n format: 'ptime:%d'\\n },\\n {\\n // a=maxptime:60\\n name: 'maxptime',\\n reg: /^maxptime:(\\\\d*(?:\\\\.\\\\d*)*)/,\\n format: 'maxptime:%d'\\n },\\n {\\n // a=sendrecv\\n name: 'direction',\\n reg: /^(sendrecv|recvonly|sendonly|inactive)/\\n },\\n {\\n // a=ice-lite\\n name: 'icelite',\\n reg: /^(ice-lite)/\\n },\\n {\\n // a=ice-ufrag:F7gI\\n name: 'iceUfrag',\\n reg: /^ice-ufrag:(\\\\S*)/,\\n format: 'ice-ufrag:%s'\\n },\\n {\\n // a=ice-pwd:x9cml/YzichV2+XlhiMu8g\\n name: 'icePwd',\\n reg: /^ice-pwd:(\\\\S*)/,\\n format: 'ice-pwd:%s'\\n },\\n {\\n // a=fingerprint:SHA-1 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33\\n name: 'fingerprint',\\n reg: /^fingerprint:(\\\\S*) (\\\\S*)/,\\n names: ['type', 'hash'],\\n format: 'fingerprint:%s %s'\\n },\\n {\\n // a=candidate:0 1 UDP 2113667327 203.0.113.1 54400 typ host\\n // a=candidate:1162875081 1 udp 2113937151 192.168.34.75 60017 typ host generation 0 network-id 3 network-cost 10\\n // a=candidate:3289912957 2 udp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 generation 0 network-id 3 network-cost 10\\n // a=candidate:229815620 1 tcp 1518280447 192.168.150.19 60017 typ host tcptype active generation 0 network-id 3 network-cost 10\\n // a=candidate:3289912957 2 tcp 1845501695 193.84.77.194 60017 typ srflx raddr 192.168.34.75 rport 60017 tcptype passive generation 0 network-id 3 network-cost 10\\n push:'candidates',\\n reg: /^candidate:(\\\\S*) (\\\\d*) (\\\\S*) (\\\\d*) (\\\\S*) (\\\\d*) typ (\\\\S*)(?: raddr (\\\\S*) rport (\\\\d*))?(?: tcptype (\\\\S*))?(?: generation (\\\\d*))?(?: network-id (\\\\d*))?(?: network-cost (\\\\d*))?/,\\n names: ['foundation', 'component', 'transport', 'priority', 'ip', 'port', 'type', 'raddr', 'rport', 'tcptype', 'generation', 'network-id', 'network-cost'],\\n format: function (o) {\\n var str = 'candidate:%s %d %s %d %s %d typ %s';\\n\\n str += (o.raddr != null) ? ' raddr %s rport %d' : '%v%v';\\n\\n // NB: candidate has three optional chunks, so %void middles one if it's missing\\n str += (o.tcptype != null) ? ' tcptype %s' : '%v';\\n\\n if (o.generation != null) {\\n str += ' generation %d';\\n }\\n\\n str += (o['network-id'] != null) ? ' network-id %d' : '%v';\\n str += (o['network-cost'] != null) ? ' network-cost %d' : '%v';\\n return str;\\n }\\n },\\n {\\n // a=end-of-candidates (keep after the candidates line for readability)\\n name: 'endOfCandidates',\\n reg: /^(end-of-candidates)/\\n },\\n {\\n // a=remote-candidates:1 203.0.113.1 54400 2 203.0.113.1 54401 ...\\n name: 'remoteCandidates',\\n reg: /^remote-candidates:(.*)/,\\n format: 'remote-candidates:%s'\\n },\\n {\\n // a=ice-options:google-ice\\n name: 'iceOptions',\\n reg: /^ice-options:(\\\\S*)/,\\n format: 'ice-options:%s'\\n },\\n {\\n // a=ssrc:2566107569 cname:t9YU8M1UxTF8Y1A1\\n push: 'ssrcs',\\n reg: /^ssrc:(\\\\d*) ([\\\\w_-]*)(?::(.*))?/,\\n names: ['id', 'attribute', 'value'],\\n format: function (o) {\\n var str = 'ssrc:%d';\\n if (o.attribute != null) {\\n str += ' %s';\\n if (o.value != null) {\\n str += ':%s';\\n }\\n }\\n return str;\\n }\\n },\\n {\\n // a=ssrc-group:FEC 1 2\\n // a=ssrc-group:FEC-FR 3004364195 1080772241\\n push: 'ssrcGroups',\\n // token-char = %x21 / %x23-27 / %x2A-2B / %x2D-2E / %x30-39 / %x41-5A / %x5E-7E\\n reg: /^ssrc-group:([\\\\x21\\\\x23\\\\x24\\\\x25\\\\x26\\\\x27\\\\x2A\\\\x2B\\\\x2D\\\\x2E\\\\w]*) (.*)/,\\n names: ['semantics', 'ssrcs'],\\n format: 'ssrc-group:%s %s'\\n },\\n {\\n // a=msid-semantic: WMS Jvlam5X3SX1OP6pn20zWogvaKJz5Hjf9OnlV\\n name: 'msidSemantic',\\n reg: /^msid-semantic:\\\\s?(\\\\w*) (\\\\S*)/,\\n names: ['semantic', 'token'],\\n format: 'msid-semantic: %s %s' // space after ':' is not accidental\\n },\\n {\\n // a=group:BUNDLE audio video\\n push: 'groups',\\n reg: /^group:(\\\\w*) (.*)/,\\n names: ['type', 'mids'],\\n format: 'group:%s %s'\\n },\\n {\\n // a=rtcp-mux\\n name: 'rtcpMux',\\n reg: /^(rtcp-mux)/\\n },\\n {\\n // a=rtcp-rsize\\n name: 'rtcpRsize',\\n reg: /^(rtcp-rsize)/\\n },\\n {\\n // a=sctpmap:5000 webrtc-datachannel 1024\\n name: 'sctpmap',\\n reg: /^sctpmap:([\\\\w_/]*) (\\\\S*)(?: (\\\\S*))?/,\\n names: ['sctpmapNumber', 'app', 'maxMessageSize'],\\n format: function (o) {\\n return (o.maxMessageSize != null)\\n ? 'sctpmap:%s %s %s'\\n : 'sctpmap:%s %s';\\n }\\n },\\n {\\n // a=x-google-flag:conference\\n name: 'xGoogleFlag',\\n reg: /^x-google-flag:([^\\\\s]*)/,\\n format: 'x-google-flag:%s'\\n },\\n {\\n // a=rid:1 send max-width=1280;max-height=720;max-fps=30;depend=0\\n push: 'rids',\\n reg: /^rid:([\\\\d\\\\w]+) (\\\\w+)(?: ([\\\\S| ]*))?/,\\n names: ['id', 'direction', 'params'],\\n format: function (o) {\\n return (o.params) ? 'rid:%s %s %s' : 'rid:%s %s';\\n }\\n },\\n {\\n // a=imageattr:97 send [x=800,y=640,sar=1.1,q=0.6] [x=480,y=320] recv [x=330,y=250]\\n // a=imageattr:* send [x=800,y=640] recv *\\n // a=imageattr:100 recv [x=320,y=240]\\n push: 'imageattrs',\\n reg: new RegExp(\\n // a=imageattr:97\\n '^imageattr:(\\\\\\\\d+|\\\\\\\\*)' +\\n // send [x=800,y=640,sar=1.1,q=0.6] [x=480,y=320]\\n '[\\\\\\\\s\\\\\\\\t]+(send|recv)[\\\\\\\\s\\\\\\\\t]+(\\\\\\\\*|\\\\\\\\[\\\\\\\\S+\\\\\\\\](?:[\\\\\\\\s\\\\\\\\t]+\\\\\\\\[\\\\\\\\S+\\\\\\\\])*)' +\\n // recv [x=330,y=250]\\n '(?:[\\\\\\\\s\\\\\\\\t]+(recv|send)[\\\\\\\\s\\\\\\\\t]+(\\\\\\\\*|\\\\\\\\[\\\\\\\\S+\\\\\\\\](?:[\\\\\\\\s\\\\\\\\t]+\\\\\\\\[\\\\\\\\S+\\\\\\\\])*))?'\\n ),\\n names: ['pt', 'dir1', 'attrs1', 'dir2', 'attrs2'],\\n format: function (o) {\\n return 'imageattr:%s %s %s' + (o.dir2 ? ' %s %s' : '');\\n }\\n },\\n {\\n // a=simulcast:send 1,2,3;~4,~5 recv 6;~7,~8\\n // a=simulcast:recv 1;4,5 send 6;7\\n name: 'simulcast',\\n reg: new RegExp(\\n // a=simulcast:\\n '^simulcast:' +\\n // send 1,2,3;~4,~5\\n '(send|recv) ([a-zA-Z0-9\\\\\\\\-_~;,]+)' +\\n // space + recv 6;~7,~8\\n '(?:\\\\\\\\s?(send|recv) ([a-zA-Z0-9\\\\\\\\-_~;,]+))?' +\\n // end\\n '$'\\n ),\\n names: ['dir1', 'list1', 'dir2', 'list2'],\\n format: function (o) {\\n return 'simulcast:%s %s' + (o.dir2 ? ' %s %s' : '');\\n }\\n },\\n {\\n // old simulcast draft 03 (implemented by Firefox)\\n // https://tools.ietf.org/html/draft-ietf-mmusic-sdp-simulcast-03\\n // a=simulcast: recv pt=97;98 send pt=97\\n // a=simulcast: send rid=5;6;7 paused=6,7\\n name: 'simulcast_03',\\n reg: /^simulcast:[\\\\s\\\\t]+([\\\\S+\\\\s\\\\t]+)$/,\\n names: ['value'],\\n format: 'simulcast: %s'\\n },\\n {\\n // a=framerate:25\\n // a=framerate:29.97\\n name: 'framerate',\\n reg: /^framerate:(\\\\d+(?:$|\\\\.\\\\d+))/,\\n format: 'framerate:%s'\\n },\\n {\\n // RFC4570\\n // a=source-filter: incl IN IP4 239.5.2.31 10.1.15.5\\n name: 'sourceFilter',\\n reg: /^source-filter: *(excl|incl) (\\\\S*) (IP4|IP6|\\\\*) (\\\\S*) (.*)/,\\n names: ['filterMode', 'netType', 'addressTypes', 'destAddress', 'srcList'],\\n format: 'source-filter: %s %s %s %s %s'\\n },\\n {\\n // a=bundle-only\\n name: 'bundleOnly',\\n reg: /^(bundle-only)/\\n },\\n {\\n // a=label:1\\n name: 'label',\\n reg: /^label:(.+)/,\\n format: 'label:%s'\\n },\\n {\\n // RFC version 26 for SCTP over DTLS\\n // https://tools.ietf.org/html/draft-ietf-mmusic-sctp-sdp-26#section-5\\n name: 'sctpPort',\\n reg: /^sctp-port:(\\\\d+)$/,\\n format: 'sctp-port:%s'\\n },\\n {\\n // RFC version 26 for SCTP over DTLS\\n // https://tools.ietf.org/html/draft-ietf-mmusic-sctp-sdp-26#section-6\\n name: 'maxMessageSize',\\n reg: /^max-message-size:(\\\\d+)$/,\\n format: 'max-message-size:%s'\\n },\\n {\\n // RFC7273\\n // a=ts-refclk:ptp=IEEE1588-2008:39-A7-94-FF-FE-07-CB-D0:37\\n push:'tsRefClocks',\\n reg: /^ts-refclk:([^\\\\s=]*)(?:=(\\\\S*))?/,\\n names: ['clksrc', 'clksrcExt'],\\n format: function (o) {\\n return 'ts-refclk:%s' + (o.clksrcExt != null ? '=%s' : '');\\n }\\n },\\n {\\n // RFC7273\\n // a=mediaclk:direct=963214424\\n name:'mediaClk',\\n reg: /^mediaclk:(?:id=(\\\\S*))? *([^\\\\s=]*)(?:=(\\\\S*))?(?: *rate=(\\\\d+)\\\\/(\\\\d+))?/,\\n names: ['id', 'mediaClockName', 'mediaClockValue', 'rateNumerator', 'rateDenominator'],\\n format: function (o) {\\n var str = 'mediaclk:';\\n str += (o.id != null ? 'id=%s %s' : '%v%s');\\n str += (o.mediaClockValue != null ? '=%s' : '');\\n str += (o.rateNumerator != null ? ' rate=%s' : '');\\n str += (o.rateDenominator != null ? '/%s' : '');\\n return str;\\n }\\n },\\n {\\n // a=keywds:keywords\\n name: 'keywords',\\n reg: /^keywds:(.+)$/,\\n format: 'keywds:%s'\\n },\\n {\\n // a=content:main\\n name: 'content',\\n reg: /^content:(.+)/,\\n format: 'content:%s'\\n },\\n // BFCP https://tools.ietf.org/html/rfc4583\\n {\\n // a=floorctrl:c-s\\n name: 'bfcpFloorCtrl',\\n reg: /^floorctrl:(c-only|s-only|c-s)/,\\n format: 'floorctrl:%s'\\n },\\n {\\n // a=confid:1\\n name: 'bfcpConfId',\\n reg: /^confid:(\\\\d+)/,\\n format: 'confid:%s'\\n },\\n {\\n // a=userid:1\\n name: 'bfcpUserId',\\n reg: /^userid:(\\\\d+)/,\\n format: 'userid:%s'\\n },\\n {\\n // a=floorid:1\\n name: 'bfcpFloorId',\\n reg: /^floorid:(.+) (?:m-stream|mstrm):(.+)/,\\n names: ['id', 'mStream'],\\n format: 'floorid:%s mstrm:%s'\\n },\\n {\\n // any a= that we don't understand is kept verbatim on media.invalid\\n push: 'invalid',\\n names: ['value']\\n }\\n ]\\n};\\n\\n// set sensible defaults to avoid polluting the grammar with boring details\\nObject.keys(grammar).forEach(function (key) {\\n var objs = grammar[key];\\n objs.forEach(function (obj) {\\n if (!obj.reg) {\\n obj.reg = /(.*)/;\\n }\\n if (!obj.format) {\\n obj.format = '%s';\\n }\\n });\\n});\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/sdp-transform/lib/grammar.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/sdp-transform/lib/index.js\":\n/*!*************************************************!*\\\n !*** ./node_modules/sdp-transform/lib/index.js ***!\n \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"var parser = __webpack_require__(/*! ./parser */ \\\"./node_modules/sdp-transform/lib/parser.js\\\");\\nvar writer = __webpack_require__(/*! ./writer */ \\\"./node_modules/sdp-transform/lib/writer.js\\\");\\n\\nexports.write = writer;\\nexports.parse = parser.parse;\\nexports.parseParams = parser.parseParams;\\nexports.parseFmtpConfig = parser.parseFmtpConfig; // Alias of parseParams().\\nexports.parsePayloads = parser.parsePayloads;\\nexports.parseRemoteCandidates = parser.parseRemoteCandidates;\\nexports.parseImageAttributes = parser.parseImageAttributes;\\nexports.parseSimulcastStreamList = parser.parseSimulcastStreamList;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/sdp-transform/lib/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/sdp-transform/lib/parser.js\":\n/*!**************************************************!*\\\n !*** ./node_modules/sdp-transform/lib/parser.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"var toIntIfInt = function (v) {\\n return String(Number(v)) === v ? Number(v) : v;\\n};\\n\\nvar attachProperties = function (match, location, names, rawName) {\\n if (rawName && !names) {\\n location[rawName] = toIntIfInt(match[1]);\\n }\\n else {\\n for (var i = 0; i < names.length; i += 1) {\\n if (match[i+1] != null) {\\n location[names[i]] = toIntIfInt(match[i+1]);\\n }\\n }\\n }\\n};\\n\\nvar parseReg = function (obj, location, content) {\\n var needsBlank = obj.name && obj.names;\\n if (obj.push && !location[obj.push]) {\\n location[obj.push] = [];\\n }\\n else if (needsBlank && !location[obj.name]) {\\n location[obj.name] = {};\\n }\\n var keyLocation = obj.push ?\\n {} : // blank object that will be pushed\\n needsBlank ? location[obj.name] : location; // otherwise, named location or root\\n\\n attachProperties(content.match(obj.reg), keyLocation, obj.names, obj.name);\\n\\n if (obj.push) {\\n location[obj.push].push(keyLocation);\\n }\\n};\\n\\nvar grammar = __webpack_require__(/*! ./grammar */ \\\"./node_modules/sdp-transform/lib/grammar.js\\\");\\nvar validLine = RegExp.prototype.test.bind(/^([a-z])=(.*)/);\\n\\nexports.parse = function (sdp) {\\n var session = {}\\n , media = []\\n , location = session; // points at where properties go under (one of the above)\\n\\n // parse lines we understand\\n sdp.split(/(\\\\r\\\\n|\\\\r|\\\\n)/).filter(validLine).forEach(function (l) {\\n var type = l[0];\\n var content = l.slice(2);\\n if (type === 'm') {\\n media.push({rtp: [], fmtp: []});\\n location = media[media.length-1]; // point at latest media line\\n }\\n\\n for (var j = 0; j < (grammar[type] || []).length; j += 1) {\\n var obj = grammar[type][j];\\n if (obj.reg.test(content)) {\\n return parseReg(obj, location, content);\\n }\\n }\\n });\\n\\n session.media = media; // link it up\\n return session;\\n};\\n\\nvar paramReducer = function (acc, expr) {\\n var s = expr.split(/=(.+)/, 2);\\n if (s.length === 2) {\\n acc[s[0]] = toIntIfInt(s[1]);\\n } else if (s.length === 1 && expr.length > 1) {\\n acc[s[0]] = undefined;\\n }\\n return acc;\\n};\\n\\nexports.parseParams = function (str) {\\n return str.split(/;\\\\s?/).reduce(paramReducer, {});\\n};\\n\\n// For backward compatibility - alias will be removed in 3.0.0\\nexports.parseFmtpConfig = exports.parseParams;\\n\\nexports.parsePayloads = function (str) {\\n return str.toString().split(' ').map(Number);\\n};\\n\\nexports.parseRemoteCandidates = function (str) {\\n var candidates = [];\\n var parts = str.split(' ').map(toIntIfInt);\\n for (var i = 0; i < parts.length; i += 3) {\\n candidates.push({\\n component: parts[i],\\n ip: parts[i + 1],\\n port: parts[i + 2]\\n });\\n }\\n return candidates;\\n};\\n\\nexports.parseImageAttributes = function (str) {\\n return str.split(' ').map(function (item) {\\n return item.substring(1, item.length-1).split(',').reduce(paramReducer, {});\\n });\\n};\\n\\nexports.parseSimulcastStreamList = function (str) {\\n return str.split(';').map(function (stream) {\\n return stream.split(',').map(function (format) {\\n var scid, paused = false;\\n\\n if (format[0] !== '~') {\\n scid = toIntIfInt(format);\\n } else {\\n scid = toIntIfInt(format.substring(1, format.length));\\n paused = true;\\n }\\n\\n return {\\n scid: scid,\\n paused: paused\\n };\\n });\\n });\\n};\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/sdp-transform/lib/parser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/sdp-transform/lib/writer.js\":\n/*!**************************************************!*\\\n !*** ./node_modules/sdp-transform/lib/writer.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"var grammar = __webpack_require__(/*! ./grammar */ \\\"./node_modules/sdp-transform/lib/grammar.js\\\");\\n\\n// customized util.format - discards excess arguments and can void middle ones\\nvar formatRegExp = /%[sdv%]/g;\\nvar format = function (formatStr) {\\n var i = 1;\\n var args = arguments;\\n var len = args.length;\\n return formatStr.replace(formatRegExp, function (x) {\\n if (i >= len) {\\n return x; // missing argument\\n }\\n var arg = args[i];\\n i += 1;\\n switch (x) {\\n case '%%':\\n return '%';\\n case '%s':\\n return String(arg);\\n case '%d':\\n return Number(arg);\\n case '%v':\\n return '';\\n }\\n });\\n // NB: we discard excess arguments - they are typically undefined from makeLine\\n};\\n\\nvar makeLine = function (type, obj, location) {\\n var str = obj.format instanceof Function ?\\n (obj.format(obj.push ? location : location[obj.name])) :\\n obj.format;\\n\\n var args = [type + '=' + str];\\n if (obj.names) {\\n for (var i = 0; i < obj.names.length; i += 1) {\\n var n = obj.names[i];\\n if (obj.name) {\\n args.push(location[obj.name][n]);\\n }\\n else { // for mLine and push attributes\\n args.push(location[obj.names[i]]);\\n }\\n }\\n }\\n else {\\n args.push(location[obj.name]);\\n }\\n return format.apply(null, args);\\n};\\n\\n// RFC specified order\\n// TODO: extend this with all the rest\\nvar defaultOuterOrder = [\\n 'v', 'o', 's', 'i',\\n 'u', 'e', 'p', 'c',\\n 'b', 't', 'r', 'z', 'a'\\n];\\nvar defaultInnerOrder = ['i', 'c', 'b', 'a'];\\n\\n\\nmodule.exports = function (session, opts) {\\n opts = opts || {};\\n // ensure certain properties exist\\n if (session.version == null) {\\n session.version = 0; // 'v=0' must be there (only defined version atm)\\n }\\n if (session.name == null) {\\n session.name = ' '; // 's= ' must be there if no meaningful name set\\n }\\n session.media.forEach(function (mLine) {\\n if (mLine.payloads == null) {\\n mLine.payloads = '';\\n }\\n });\\n\\n var outerOrder = opts.outerOrder || defaultOuterOrder;\\n var innerOrder = opts.innerOrder || defaultInnerOrder;\\n var sdp = [];\\n\\n // loop through outerOrder for matching properties on session\\n outerOrder.forEach(function (type) {\\n grammar[type].forEach(function (obj) {\\n if (obj.name in session && session[obj.name] != null) {\\n sdp.push(makeLine(type, obj, session));\\n }\\n else if (obj.push in session && session[obj.push] != null) {\\n session[obj.push].forEach(function (el) {\\n sdp.push(makeLine(type, obj, el));\\n });\\n }\\n });\\n });\\n\\n // then for each media line, follow the innerOrder\\n session.media.forEach(function (mLine) {\\n sdp.push(makeLine('m', grammar.m[0], mLine));\\n\\n innerOrder.forEach(function (type) {\\n grammar[type].forEach(function (obj) {\\n if (obj.name in mLine && mLine[obj.name] != null) {\\n sdp.push(makeLine(type, obj, mLine));\\n }\\n else if (obj.push in mLine && mLine[obj.push] != null) {\\n mLine[obj.push].forEach(function (el) {\\n sdp.push(makeLine(type, obj, el));\\n });\\n }\\n });\\n });\\n });\\n\\n return sdp.join('\\\\r\\\\n') + '\\\\r\\\\n';\\n};\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/sdp-transform/lib/writer.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/socket.io-client/build/esm/index.js\":\n/*!**********************************************************!*\\\n !*** ./node_modules/socket.io-client/build/esm/index.js ***!\n \\**********************************************************/\n/*! exports provided: protocol, Manager, Socket, io, connect, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"io\\\", function() { return lookup; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"connect\\\", function() { return lookup; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"default\\\", function() { return lookup; });\\n/* harmony import */ var _url_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./url.js */ \\\"./node_modules/socket.io-client/build/esm/url.js\\\");\\n/* harmony import */ var _manager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./manager.js */ \\\"./node_modules/socket.io-client/build/esm/manager.js\\\");\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\"Manager\\\", function() { return _manager_js__WEBPACK_IMPORTED_MODULE_1__[\\\"Manager\\\"]; });\\n\\n/* harmony import */ var _socket_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./socket.js */ \\\"./node_modules/socket.io-client/build/esm/socket.js\\\");\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\"Socket\\\", function() { return _socket_js__WEBPACK_IMPORTED_MODULE_2__[\\\"Socket\\\"]; });\\n\\n/* harmony import */ var socket_io_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! socket.io-parser */ \\\"./node_modules/socket.io-parser/build/esm/index.js\\\");\\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \\\"protocol\\\", function() { return socket_io_parser__WEBPACK_IMPORTED_MODULE_3__[\\\"protocol\\\"]; });\\n\\n\\n\\n\\n/**\\n * Managers cache.\\n */\\nconst cache = {};\\nfunction lookup(uri, opts) {\\n if (typeof uri === \\\"object\\\") {\\n opts = uri;\\n uri = undefined;\\n }\\n opts = opts || {};\\n const parsed = Object(_url_js__WEBPACK_IMPORTED_MODULE_0__[\\\"url\\\"])(uri, opts.path || \\\"/socket.io\\\");\\n const source = parsed.source;\\n const id = parsed.id;\\n const path = parsed.path;\\n const sameNamespace = cache[id] && path in cache[id][\\\"nsps\\\"];\\n const newConnection = opts.forceNew ||\\n opts[\\\"force new connection\\\"] ||\\n false === opts.multiplex ||\\n sameNamespace;\\n let io;\\n if (newConnection) {\\n io = new _manager_js__WEBPACK_IMPORTED_MODULE_1__[\\\"Manager\\\"](source, opts);\\n }\\n else {\\n if (!cache[id]) {\\n cache[id] = new _manager_js__WEBPACK_IMPORTED_MODULE_1__[\\\"Manager\\\"](source, opts);\\n }\\n io = cache[id];\\n }\\n if (parsed.query && !opts.query) {\\n opts.query = parsed.queryKey;\\n }\\n return io.socket(parsed.path, opts);\\n}\\n// so that \\\"lookup\\\" can be used both as a function (e.g. `io(...)`) and as a\\n// namespace (e.g. `io.connect(...)`), for backward compatibility\\nObject.assign(lookup, {\\n Manager: _manager_js__WEBPACK_IMPORTED_MODULE_1__[\\\"Manager\\\"],\\n Socket: _socket_js__WEBPACK_IMPORTED_MODULE_2__[\\\"Socket\\\"],\\n io: lookup,\\n connect: lookup,\\n});\\n/**\\n * Protocol version.\\n *\\n * @public\\n */\\n\\n/**\\n * Expose constructors for standalone build.\\n *\\n * @public\\n */\\n\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/socket.io-client/build/esm/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/socket.io-client/build/esm/manager.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/socket.io-client/build/esm/manager.js ***!\n \\************************************************************/\n/*! exports provided: Manager */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Manager\\\", function() { return Manager; });\\n/* harmony import */ var engine_io_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! engine.io-client */ \\\"./node_modules/engine.io-client/build/esm/index.js\\\");\\n/* harmony import */ var _socket_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./socket.js */ \\\"./node_modules/socket.io-client/build/esm/socket.js\\\");\\n/* harmony import */ var socket_io_parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! socket.io-parser */ \\\"./node_modules/socket.io-parser/build/esm/index.js\\\");\\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./on.js */ \\\"./node_modules/socket.io-client/build/esm/on.js\\\");\\n/* harmony import */ var backo2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! backo2 */ \\\"./node_modules/backo2/index.js\\\");\\n/* harmony import */ var backo2__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(backo2__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @socket.io/component-emitter */ \\\"./node_modules/@socket.io/component-emitter/index.js\\\");\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_5__);\\n\\n\\n\\n\\n\\n\\nclass Manager extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_5__[\\\"Emitter\\\"] {\\n constructor(uri, opts) {\\n var _a;\\n super();\\n this.nsps = {};\\n this.subs = [];\\n if (uri && \\\"object\\\" === typeof uri) {\\n opts = uri;\\n uri = undefined;\\n }\\n opts = opts || {};\\n opts.path = opts.path || \\\"/socket.io\\\";\\n this.opts = opts;\\n Object(engine_io_client__WEBPACK_IMPORTED_MODULE_0__[\\\"installTimerFunctions\\\"])(this, opts);\\n this.reconnection(opts.reconnection !== false);\\n this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);\\n this.reconnectionDelay(opts.reconnectionDelay || 1000);\\n this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);\\n this.randomizationFactor((_a = opts.randomizationFactor) !== null && _a !== void 0 ? _a : 0.5);\\n this.backoff = new backo2__WEBPACK_IMPORTED_MODULE_4___default.a({\\n min: this.reconnectionDelay(),\\n max: this.reconnectionDelayMax(),\\n jitter: this.randomizationFactor(),\\n });\\n this.timeout(null == opts.timeout ? 20000 : opts.timeout);\\n this._readyState = \\\"closed\\\";\\n this.uri = uri;\\n const _parser = opts.parser || socket_io_parser__WEBPACK_IMPORTED_MODULE_2__;\\n this.encoder = new _parser.Encoder();\\n this.decoder = new _parser.Decoder();\\n this._autoConnect = opts.autoConnect !== false;\\n if (this._autoConnect)\\n this.open();\\n }\\n reconnection(v) {\\n if (!arguments.length)\\n return this._reconnection;\\n this._reconnection = !!v;\\n return this;\\n }\\n reconnectionAttempts(v) {\\n if (v === undefined)\\n return this._reconnectionAttempts;\\n this._reconnectionAttempts = v;\\n return this;\\n }\\n reconnectionDelay(v) {\\n var _a;\\n if (v === undefined)\\n return this._reconnectionDelay;\\n this._reconnectionDelay = v;\\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMin(v);\\n return this;\\n }\\n randomizationFactor(v) {\\n var _a;\\n if (v === undefined)\\n return this._randomizationFactor;\\n this._randomizationFactor = v;\\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setJitter(v);\\n return this;\\n }\\n reconnectionDelayMax(v) {\\n var _a;\\n if (v === undefined)\\n return this._reconnectionDelayMax;\\n this._reconnectionDelayMax = v;\\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMax(v);\\n return this;\\n }\\n timeout(v) {\\n if (!arguments.length)\\n return this._timeout;\\n this._timeout = v;\\n return this;\\n }\\n /**\\n * Starts trying to reconnect if reconnection is enabled and we have not\\n * started reconnecting yet\\n *\\n * @private\\n */\\n maybeReconnectOnOpen() {\\n // Only try to reconnect if it's the first time we're connecting\\n if (!this._reconnecting &&\\n this._reconnection &&\\n this.backoff.attempts === 0) {\\n // keeps reconnection from firing twice for the same reconnection loop\\n this.reconnect();\\n }\\n }\\n /**\\n * Sets the current transport `socket`.\\n *\\n * @param {Function} fn - optional, callback\\n * @return self\\n * @public\\n */\\n open(fn) {\\n if (~this._readyState.indexOf(\\\"open\\\"))\\n return this;\\n this.engine = new engine_io_client__WEBPACK_IMPORTED_MODULE_0__[\\\"Socket\\\"](this.uri, this.opts);\\n const socket = this.engine;\\n const self = this;\\n this._readyState = \\\"opening\\\";\\n this.skipReconnect = false;\\n // emit `open`\\n const openSubDestroy = Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[\\\"on\\\"])(socket, \\\"open\\\", function () {\\n self.onopen();\\n fn && fn();\\n });\\n // emit `error`\\n const errorSub = Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[\\\"on\\\"])(socket, \\\"error\\\", (err) => {\\n self.cleanup();\\n self._readyState = \\\"closed\\\";\\n this.emitReserved(\\\"error\\\", err);\\n if (fn) {\\n fn(err);\\n }\\n else {\\n // Only do this if there is no fn to handle the error\\n self.maybeReconnectOnOpen();\\n }\\n });\\n if (false !== this._timeout) {\\n const timeout = this._timeout;\\n if (timeout === 0) {\\n openSubDestroy(); // prevents a race condition with the 'open' event\\n }\\n // set timer\\n const timer = this.setTimeoutFn(() => {\\n openSubDestroy();\\n socket.close();\\n // @ts-ignore\\n socket.emit(\\\"error\\\", new Error(\\\"timeout\\\"));\\n }, timeout);\\n if (this.opts.autoUnref) {\\n timer.unref();\\n }\\n this.subs.push(function subDestroy() {\\n clearTimeout(timer);\\n });\\n }\\n this.subs.push(openSubDestroy);\\n this.subs.push(errorSub);\\n return this;\\n }\\n /**\\n * Alias for open()\\n *\\n * @return self\\n * @public\\n */\\n connect(fn) {\\n return this.open(fn);\\n }\\n /**\\n * Called upon transport open.\\n *\\n * @private\\n */\\n onopen() {\\n // clear old subs\\n this.cleanup();\\n // mark as open\\n this._readyState = \\\"open\\\";\\n this.emitReserved(\\\"open\\\");\\n // add new subs\\n const socket = this.engine;\\n this.subs.push(Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[\\\"on\\\"])(socket, \\\"ping\\\", this.onping.bind(this)), Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[\\\"on\\\"])(socket, \\\"data\\\", this.ondata.bind(this)), Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[\\\"on\\\"])(socket, \\\"error\\\", this.onerror.bind(this)), Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[\\\"on\\\"])(socket, \\\"close\\\", this.onclose.bind(this)), Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[\\\"on\\\"])(this.decoder, \\\"decoded\\\", this.ondecoded.bind(this)));\\n }\\n /**\\n * Called upon a ping.\\n *\\n * @private\\n */\\n onping() {\\n this.emitReserved(\\\"ping\\\");\\n }\\n /**\\n * Called with data.\\n *\\n * @private\\n */\\n ondata(data) {\\n this.decoder.add(data);\\n }\\n /**\\n * Called when parser fully decodes a packet.\\n *\\n * @private\\n */\\n ondecoded(packet) {\\n this.emitReserved(\\\"packet\\\", packet);\\n }\\n /**\\n * Called upon socket error.\\n *\\n * @private\\n */\\n onerror(err) {\\n this.emitReserved(\\\"error\\\", err);\\n }\\n /**\\n * Creates a new socket for the given `nsp`.\\n *\\n * @return {Socket}\\n * @public\\n */\\n socket(nsp, opts) {\\n let socket = this.nsps[nsp];\\n if (!socket) {\\n socket = new _socket_js__WEBPACK_IMPORTED_MODULE_1__[\\\"Socket\\\"](this, nsp, opts);\\n this.nsps[nsp] = socket;\\n }\\n return socket;\\n }\\n /**\\n * Called upon a socket close.\\n *\\n * @param socket\\n * @private\\n */\\n _destroy(socket) {\\n const nsps = Object.keys(this.nsps);\\n for (const nsp of nsps) {\\n const socket = this.nsps[nsp];\\n if (socket.active) {\\n return;\\n }\\n }\\n this._close();\\n }\\n /**\\n * Writes a packet.\\n *\\n * @param packet\\n * @private\\n */\\n _packet(packet) {\\n const encodedPackets = this.encoder.encode(packet);\\n for (let i = 0; i < encodedPackets.length; i++) {\\n this.engine.write(encodedPackets[i], packet.options);\\n }\\n }\\n /**\\n * Clean up transport subscriptions and packet buffer.\\n *\\n * @private\\n */\\n cleanup() {\\n this.subs.forEach((subDestroy) => subDestroy());\\n this.subs.length = 0;\\n this.decoder.destroy();\\n }\\n /**\\n * Close the current socket.\\n *\\n * @private\\n */\\n _close() {\\n this.skipReconnect = true;\\n this._reconnecting = false;\\n this.onclose(\\\"forced close\\\");\\n if (this.engine)\\n this.engine.close();\\n }\\n /**\\n * Alias for close()\\n *\\n * @private\\n */\\n disconnect() {\\n return this._close();\\n }\\n /**\\n * Called upon engine close.\\n *\\n * @private\\n */\\n onclose(reason) {\\n this.cleanup();\\n this.backoff.reset();\\n this._readyState = \\\"closed\\\";\\n this.emitReserved(\\\"close\\\", reason);\\n if (this._reconnection && !this.skipReconnect) {\\n this.reconnect();\\n }\\n }\\n /**\\n * Attempt a reconnection.\\n *\\n * @private\\n */\\n reconnect() {\\n if (this._reconnecting || this.skipReconnect)\\n return this;\\n const self = this;\\n if (this.backoff.attempts >= this._reconnectionAttempts) {\\n this.backoff.reset();\\n this.emitReserved(\\\"reconnect_failed\\\");\\n this._reconnecting = false;\\n }\\n else {\\n const delay = this.backoff.duration();\\n this._reconnecting = true;\\n const timer = this.setTimeoutFn(() => {\\n if (self.skipReconnect)\\n return;\\n this.emitReserved(\\\"reconnect_attempt\\\", self.backoff.attempts);\\n // check again for the case socket closed in above events\\n if (self.skipReconnect)\\n return;\\n self.open((err) => {\\n if (err) {\\n self._reconnecting = false;\\n self.reconnect();\\n this.emitReserved(\\\"reconnect_error\\\", err);\\n }\\n else {\\n self.onreconnect();\\n }\\n });\\n }, delay);\\n if (this.opts.autoUnref) {\\n timer.unref();\\n }\\n this.subs.push(function subDestroy() {\\n clearTimeout(timer);\\n });\\n }\\n }\\n /**\\n * Called upon successful reconnect.\\n *\\n * @private\\n */\\n onreconnect() {\\n const attempt = this.backoff.attempts;\\n this._reconnecting = false;\\n this.backoff.reset();\\n this.emitReserved(\\\"reconnect\\\", attempt);\\n }\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/socket.io-client/build/esm/manager.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/socket.io-client/build/esm/on.js\":\n/*!*******************************************************!*\\\n !*** ./node_modules/socket.io-client/build/esm/on.js ***!\n \\*******************************************************/\n/*! exports provided: on */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"on\\\", function() { return on; });\\nfunction on(obj, ev, fn) {\\n obj.on(ev, fn);\\n return function subDestroy() {\\n obj.off(ev, fn);\\n };\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/socket.io-client/build/esm/on.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/socket.io-client/build/esm/socket.js\":\n/*!***********************************************************!*\\\n !*** ./node_modules/socket.io-client/build/esm/socket.js ***!\n \\***********************************************************/\n/*! exports provided: Socket */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Socket\\\", function() { return Socket; });\\n/* harmony import */ var socket_io_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! socket.io-parser */ \\\"./node_modules/socket.io-parser/build/esm/index.js\\\");\\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./on.js */ \\\"./node_modules/socket.io-client/build/esm/on.js\\\");\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @socket.io/component-emitter */ \\\"./node_modules/@socket.io/component-emitter/index.js\\\");\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_2__);\\n\\n\\n\\n/**\\n * Internal events.\\n * These events can't be emitted by the user.\\n */\\nconst RESERVED_EVENTS = Object.freeze({\\n connect: 1,\\n connect_error: 1,\\n disconnect: 1,\\n disconnecting: 1,\\n // EventEmitter reserved events: https://nodejs.org/api/events.html#events_event_newlistener\\n newListener: 1,\\n removeListener: 1,\\n});\\nclass Socket extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_2__[\\\"Emitter\\\"] {\\n /**\\n * `Socket` constructor.\\n *\\n * @public\\n */\\n constructor(io, nsp, opts) {\\n super();\\n this.connected = false;\\n this.disconnected = true;\\n this.receiveBuffer = [];\\n this.sendBuffer = [];\\n this.ids = 0;\\n this.acks = {};\\n this.flags = {};\\n this.io = io;\\n this.nsp = nsp;\\n if (opts && opts.auth) {\\n this.auth = opts.auth;\\n }\\n if (this.io._autoConnect)\\n this.open();\\n }\\n /**\\n * Subscribe to open, close and packet events\\n *\\n * @private\\n */\\n subEvents() {\\n if (this.subs)\\n return;\\n const io = this.io;\\n this.subs = [\\n Object(_on_js__WEBPACK_IMPORTED_MODULE_1__[\\\"on\\\"])(io, \\\"open\\\", this.onopen.bind(this)),\\n Object(_on_js__WEBPACK_IMPORTED_MODULE_1__[\\\"on\\\"])(io, \\\"packet\\\", this.onpacket.bind(this)),\\n Object(_on_js__WEBPACK_IMPORTED_MODULE_1__[\\\"on\\\"])(io, \\\"error\\\", this.onerror.bind(this)),\\n Object(_on_js__WEBPACK_IMPORTED_MODULE_1__[\\\"on\\\"])(io, \\\"close\\\", this.onclose.bind(this)),\\n ];\\n }\\n /**\\n * Whether the Socket will try to reconnect when its Manager connects or reconnects\\n */\\n get active() {\\n return !!this.subs;\\n }\\n /**\\n * \\\"Opens\\\" the socket.\\n *\\n * @public\\n */\\n connect() {\\n if (this.connected)\\n return this;\\n this.subEvents();\\n if (!this.io[\\\"_reconnecting\\\"])\\n this.io.open(); // ensure open\\n if (\\\"open\\\" === this.io._readyState)\\n this.onopen();\\n return this;\\n }\\n /**\\n * Alias for connect()\\n */\\n open() {\\n return this.connect();\\n }\\n /**\\n * Sends a `message` event.\\n *\\n * @return self\\n * @public\\n */\\n send(...args) {\\n args.unshift(\\\"message\\\");\\n this.emit.apply(this, args);\\n return this;\\n }\\n /**\\n * Override `emit`.\\n * If the event is in `events`, it's emitted normally.\\n *\\n * @return self\\n * @public\\n */\\n emit(ev, ...args) {\\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\\n throw new Error('\\\"' + ev + '\\\" is a reserved event name');\\n }\\n args.unshift(ev);\\n const packet = {\\n type: socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].EVENT,\\n data: args,\\n };\\n packet.options = {};\\n packet.options.compress = this.flags.compress !== false;\\n // event ack callback\\n if (\\\"function\\\" === typeof args[args.length - 1]) {\\n const id = this.ids++;\\n const ack = args.pop();\\n this._registerAckCallback(id, ack);\\n packet.id = id;\\n }\\n const isTransportWritable = this.io.engine &&\\n this.io.engine.transport &&\\n this.io.engine.transport.writable;\\n const discardPacket = this.flags.volatile && (!isTransportWritable || !this.connected);\\n if (discardPacket) {\\n }\\n else if (this.connected) {\\n this.packet(packet);\\n }\\n else {\\n this.sendBuffer.push(packet);\\n }\\n this.flags = {};\\n return this;\\n }\\n /**\\n * @private\\n */\\n _registerAckCallback(id, ack) {\\n const timeout = this.flags.timeout;\\n if (timeout === undefined) {\\n this.acks[id] = ack;\\n return;\\n }\\n // @ts-ignore\\n const timer = this.io.setTimeoutFn(() => {\\n delete this.acks[id];\\n for (let i = 0; i < this.sendBuffer.length; i++) {\\n if (this.sendBuffer[i].id === id) {\\n this.sendBuffer.splice(i, 1);\\n }\\n }\\n ack.call(this, new Error(\\\"operation has timed out\\\"));\\n }, timeout);\\n this.acks[id] = (...args) => {\\n // @ts-ignore\\n this.io.clearTimeoutFn(timer);\\n ack.apply(this, [null, ...args]);\\n };\\n }\\n /**\\n * Sends a packet.\\n *\\n * @param packet\\n * @private\\n */\\n packet(packet) {\\n packet.nsp = this.nsp;\\n this.io._packet(packet);\\n }\\n /**\\n * Called upon engine `open`.\\n *\\n * @private\\n */\\n onopen() {\\n if (typeof this.auth == \\\"function\\\") {\\n this.auth((data) => {\\n this.packet({ type: socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].CONNECT, data });\\n });\\n }\\n else {\\n this.packet({ type: socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].CONNECT, data: this.auth });\\n }\\n }\\n /**\\n * Called upon engine or manager `error`.\\n *\\n * @param err\\n * @private\\n */\\n onerror(err) {\\n if (!this.connected) {\\n this.emitReserved(\\\"connect_error\\\", err);\\n }\\n }\\n /**\\n * Called upon engine `close`.\\n *\\n * @param reason\\n * @private\\n */\\n onclose(reason) {\\n this.connected = false;\\n this.disconnected = true;\\n delete this.id;\\n this.emitReserved(\\\"disconnect\\\", reason);\\n }\\n /**\\n * Called with socket packet.\\n *\\n * @param packet\\n * @private\\n */\\n onpacket(packet) {\\n const sameNamespace = packet.nsp === this.nsp;\\n if (!sameNamespace)\\n return;\\n switch (packet.type) {\\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].CONNECT:\\n if (packet.data && packet.data.sid) {\\n const id = packet.data.sid;\\n this.onconnect(id);\\n }\\n else {\\n this.emitReserved(\\\"connect_error\\\", new Error(\\\"It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)\\\"));\\n }\\n break;\\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].EVENT:\\n this.onevent(packet);\\n break;\\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].BINARY_EVENT:\\n this.onevent(packet);\\n break;\\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].ACK:\\n this.onack(packet);\\n break;\\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].BINARY_ACK:\\n this.onack(packet);\\n break;\\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].DISCONNECT:\\n this.ondisconnect();\\n break;\\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].CONNECT_ERROR:\\n this.destroy();\\n const err = new Error(packet.data.message);\\n // @ts-ignore\\n err.data = packet.data.data;\\n this.emitReserved(\\\"connect_error\\\", err);\\n break;\\n }\\n }\\n /**\\n * Called upon a server event.\\n *\\n * @param packet\\n * @private\\n */\\n onevent(packet) {\\n const args = packet.data || [];\\n if (null != packet.id) {\\n args.push(this.ack(packet.id));\\n }\\n if (this.connected) {\\n this.emitEvent(args);\\n }\\n else {\\n this.receiveBuffer.push(Object.freeze(args));\\n }\\n }\\n emitEvent(args) {\\n if (this._anyListeners && this._anyListeners.length) {\\n const listeners = this._anyListeners.slice();\\n for (const listener of listeners) {\\n listener.apply(this, args);\\n }\\n }\\n super.emit.apply(this, args);\\n }\\n /**\\n * Produces an ack callback to emit with an event.\\n *\\n * @private\\n */\\n ack(id) {\\n const self = this;\\n let sent = false;\\n return function (...args) {\\n // prevent double callbacks\\n if (sent)\\n return;\\n sent = true;\\n self.packet({\\n type: socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].ACK,\\n id: id,\\n data: args,\\n });\\n };\\n }\\n /**\\n * Called upon a server acknowlegement.\\n *\\n * @param packet\\n * @private\\n */\\n onack(packet) {\\n const ack = this.acks[packet.id];\\n if (\\\"function\\\" === typeof ack) {\\n ack.apply(this, packet.data);\\n delete this.acks[packet.id];\\n }\\n else {\\n }\\n }\\n /**\\n * Called upon server connect.\\n *\\n * @private\\n */\\n onconnect(id) {\\n this.id = id;\\n this.connected = true;\\n this.disconnected = false;\\n this.emitBuffered();\\n this.emitReserved(\\\"connect\\\");\\n }\\n /**\\n * Emit buffered events (received and emitted).\\n *\\n * @private\\n */\\n emitBuffered() {\\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\\n this.receiveBuffer = [];\\n this.sendBuffer.forEach((packet) => this.packet(packet));\\n this.sendBuffer = [];\\n }\\n /**\\n * Called upon server disconnect.\\n *\\n * @private\\n */\\n ondisconnect() {\\n this.destroy();\\n this.onclose(\\\"io server disconnect\\\");\\n }\\n /**\\n * Called upon forced client/server side disconnections,\\n * this method ensures the manager stops tracking us and\\n * that reconnections don't get triggered for this.\\n *\\n * @private\\n */\\n destroy() {\\n if (this.subs) {\\n // clean subscriptions to avoid reconnections\\n this.subs.forEach((subDestroy) => subDestroy());\\n this.subs = undefined;\\n }\\n this.io[\\\"_destroy\\\"](this);\\n }\\n /**\\n * Disconnects the socket manually.\\n *\\n * @return self\\n * @public\\n */\\n disconnect() {\\n if (this.connected) {\\n this.packet({ type: socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\\\"PacketType\\\"].DISCONNECT });\\n }\\n // remove socket from pool\\n this.destroy();\\n if (this.connected) {\\n // fire events\\n this.onclose(\\\"io client disconnect\\\");\\n }\\n return this;\\n }\\n /**\\n * Alias for disconnect()\\n *\\n * @return self\\n * @public\\n */\\n close() {\\n return this.disconnect();\\n }\\n /**\\n * Sets the compress flag.\\n *\\n * @param compress - if `true`, compresses the sending data\\n * @return self\\n * @public\\n */\\n compress(compress) {\\n this.flags.compress = compress;\\n return this;\\n }\\n /**\\n * Sets a modifier for a subsequent event emission that the event message will be dropped when this socket is not\\n * ready to send messages.\\n *\\n * @returns self\\n * @public\\n */\\n get volatile() {\\n this.flags.volatile = true;\\n return this;\\n }\\n /**\\n * Sets a modifier for a subsequent event emission that the callback will be called with an error when the\\n * given number of milliseconds have elapsed without an acknowledgement from the server:\\n *\\n * ```\\n * socket.timeout(5000).emit(\\\"my-event\\\", (err) => {\\n * if (err) {\\n * // the server did not acknowledge the event in the given delay\\n * }\\n * });\\n * ```\\n *\\n * @returns self\\n * @public\\n */\\n timeout(timeout) {\\n this.flags.timeout = timeout;\\n return this;\\n }\\n /**\\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\\n * callback.\\n *\\n * @param listener\\n * @public\\n */\\n onAny(listener) {\\n this._anyListeners = this._anyListeners || [];\\n this._anyListeners.push(listener);\\n return this;\\n }\\n /**\\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\\n * callback. The listener is added to the beginning of the listeners array.\\n *\\n * @param listener\\n * @public\\n */\\n prependAny(listener) {\\n this._anyListeners = this._anyListeners || [];\\n this._anyListeners.unshift(listener);\\n return this;\\n }\\n /**\\n * Removes the listener that will be fired when any event is emitted.\\n *\\n * @param listener\\n * @public\\n */\\n offAny(listener) {\\n if (!this._anyListeners) {\\n return this;\\n }\\n if (listener) {\\n const listeners = this._anyListeners;\\n for (let i = 0; i < listeners.length; i++) {\\n if (listener === listeners[i]) {\\n listeners.splice(i, 1);\\n return this;\\n }\\n }\\n }\\n else {\\n this._anyListeners = [];\\n }\\n return this;\\n }\\n /**\\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\\n * e.g. to remove listeners.\\n *\\n * @public\\n */\\n listenersAny() {\\n return this._anyListeners || [];\\n }\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/socket.io-client/build/esm/socket.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/socket.io-client/build/esm/url.js\":\n/*!********************************************************!*\\\n !*** ./node_modules/socket.io-client/build/esm/url.js ***!\n \\********************************************************/\n/*! exports provided: url */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"url\\\", function() { return url; });\\n/* harmony import */ var parseuri__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! parseuri */ \\\"./node_modules/parseuri/index.js\\\");\\n/* harmony import */ var parseuri__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(parseuri__WEBPACK_IMPORTED_MODULE_0__);\\n\\n/**\\n * URL parser.\\n *\\n * @param uri - url\\n * @param path - the request path of the connection\\n * @param loc - An object meant to mimic window.location.\\n * Defaults to window.location.\\n * @public\\n */\\nfunction url(uri, path = \\\"\\\", loc) {\\n let obj = uri;\\n // default to window.location\\n loc = loc || (typeof location !== \\\"undefined\\\" && location);\\n if (null == uri)\\n uri = loc.protocol + \\\"//\\\" + loc.host;\\n // relative path support\\n if (typeof uri === \\\"string\\\") {\\n if (\\\"/\\\" === uri.charAt(0)) {\\n if (\\\"/\\\" === uri.charAt(1)) {\\n uri = loc.protocol + uri;\\n }\\n else {\\n uri = loc.host + uri;\\n }\\n }\\n if (!/^(https?|wss?):\\\\/\\\\//.test(uri)) {\\n if (\\\"undefined\\\" !== typeof loc) {\\n uri = loc.protocol + \\\"//\\\" + uri;\\n }\\n else {\\n uri = \\\"https://\\\" + uri;\\n }\\n }\\n // parse\\n obj = parseuri__WEBPACK_IMPORTED_MODULE_0___default()(uri);\\n }\\n // make sure we treat `localhost:80` and `localhost` equally\\n if (!obj.port) {\\n if (/^(http|ws)$/.test(obj.protocol)) {\\n obj.port = \\\"80\\\";\\n }\\n else if (/^(http|ws)s$/.test(obj.protocol)) {\\n obj.port = \\\"443\\\";\\n }\\n }\\n obj.path = obj.path || \\\"/\\\";\\n const ipv6 = obj.host.indexOf(\\\":\\\") !== -1;\\n const host = ipv6 ? \\\"[\\\" + obj.host + \\\"]\\\" : obj.host;\\n // define unique id\\n obj.id = obj.protocol + \\\"://\\\" + host + \\\":\\\" + obj.port + path;\\n // define href\\n obj.href =\\n obj.protocol +\\n \\\"://\\\" +\\n host +\\n (loc && loc.port === obj.port ? \\\"\\\" : \\\":\\\" + obj.port);\\n return obj;\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/socket.io-client/build/esm/url.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/socket.io-parser/build/esm/binary.js\":\n/*!***********************************************************!*\\\n !*** ./node_modules/socket.io-parser/build/esm/binary.js ***!\n \\***********************************************************/\n/*! exports provided: deconstructPacket, reconstructPacket */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"deconstructPacket\\\", function() { return deconstructPacket; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"reconstructPacket\\\", function() { return reconstructPacket; });\\n/* harmony import */ var _is_binary_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-binary.js */ \\\"./node_modules/socket.io-parser/build/esm/is-binary.js\\\");\\n\\n/**\\n * Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.\\n *\\n * @param {Object} packet - socket.io event packet\\n * @return {Object} with deconstructed packet and list of buffers\\n * @public\\n */\\nfunction deconstructPacket(packet) {\\n const buffers = [];\\n const packetData = packet.data;\\n const pack = packet;\\n pack.data = _deconstructPacket(packetData, buffers);\\n pack.attachments = buffers.length; // number of binary 'attachments'\\n return { packet: pack, buffers: buffers };\\n}\\nfunction _deconstructPacket(data, buffers) {\\n if (!data)\\n return data;\\n if (Object(_is_binary_js__WEBPACK_IMPORTED_MODULE_0__[\\\"isBinary\\\"])(data)) {\\n const placeholder = { _placeholder: true, num: buffers.length };\\n buffers.push(data);\\n return placeholder;\\n }\\n else if (Array.isArray(data)) {\\n const newData = new Array(data.length);\\n for (let i = 0; i < data.length; i++) {\\n newData[i] = _deconstructPacket(data[i], buffers);\\n }\\n return newData;\\n }\\n else if (typeof data === \\\"object\\\" && !(data instanceof Date)) {\\n const newData = {};\\n for (const key in data) {\\n if (data.hasOwnProperty(key)) {\\n newData[key] = _deconstructPacket(data[key], buffers);\\n }\\n }\\n return newData;\\n }\\n return data;\\n}\\n/**\\n * Reconstructs a binary packet from its placeholder packet and buffers\\n *\\n * @param {Object} packet - event packet with placeholders\\n * @param {Array} buffers - binary buffers to put in placeholder positions\\n * @return {Object} reconstructed packet\\n * @public\\n */\\nfunction reconstructPacket(packet, buffers) {\\n packet.data = _reconstructPacket(packet.data, buffers);\\n packet.attachments = undefined; // no longer useful\\n return packet;\\n}\\nfunction _reconstructPacket(data, buffers) {\\n if (!data)\\n return data;\\n if (data && data._placeholder) {\\n return buffers[data.num]; // appropriate buffer (should be natural order anyway)\\n }\\n else if (Array.isArray(data)) {\\n for (let i = 0; i < data.length; i++) {\\n data[i] = _reconstructPacket(data[i], buffers);\\n }\\n }\\n else if (typeof data === \\\"object\\\") {\\n for (const key in data) {\\n if (data.hasOwnProperty(key)) {\\n data[key] = _reconstructPacket(data[key], buffers);\\n }\\n }\\n }\\n return data;\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/socket.io-parser/build/esm/binary.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/socket.io-parser/build/esm/index.js\":\n/*!**********************************************************!*\\\n !*** ./node_modules/socket.io-parser/build/esm/index.js ***!\n \\**********************************************************/\n/*! exports provided: protocol, PacketType, Encoder, Decoder */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"protocol\\\", function() { return protocol; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"PacketType\\\", function() { return PacketType; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Encoder\\\", function() { return Encoder; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Decoder\\\", function() { return Decoder; });\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @socket.io/component-emitter */ \\\"./node_modules/@socket.io/component-emitter/index.js\\\");\\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _binary_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./binary.js */ \\\"./node_modules/socket.io-parser/build/esm/binary.js\\\");\\n/* harmony import */ var _is_binary_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-binary.js */ \\\"./node_modules/socket.io-parser/build/esm/is-binary.js\\\");\\n\\n\\n\\n/**\\n * Protocol version.\\n *\\n * @public\\n */\\nconst protocol = 5;\\nvar PacketType;\\n(function (PacketType) {\\n PacketType[PacketType[\\\"CONNECT\\\"] = 0] = \\\"CONNECT\\\";\\n PacketType[PacketType[\\\"DISCONNECT\\\"] = 1] = \\\"DISCONNECT\\\";\\n PacketType[PacketType[\\\"EVENT\\\"] = 2] = \\\"EVENT\\\";\\n PacketType[PacketType[\\\"ACK\\\"] = 3] = \\\"ACK\\\";\\n PacketType[PacketType[\\\"CONNECT_ERROR\\\"] = 4] = \\\"CONNECT_ERROR\\\";\\n PacketType[PacketType[\\\"BINARY_EVENT\\\"] = 5] = \\\"BINARY_EVENT\\\";\\n PacketType[PacketType[\\\"BINARY_ACK\\\"] = 6] = \\\"BINARY_ACK\\\";\\n})(PacketType || (PacketType = {}));\\n/**\\n * A socket.io Encoder instance\\n */\\nclass Encoder {\\n /**\\n * Encode a packet as a single string if non-binary, or as a\\n * buffer sequence, depending on packet type.\\n *\\n * @param {Object} obj - packet object\\n */\\n encode(obj) {\\n if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {\\n if (Object(_is_binary_js__WEBPACK_IMPORTED_MODULE_2__[\\\"hasBinary\\\"])(obj)) {\\n obj.type =\\n obj.type === PacketType.EVENT\\n ? PacketType.BINARY_EVENT\\n : PacketType.BINARY_ACK;\\n return this.encodeAsBinary(obj);\\n }\\n }\\n return [this.encodeAsString(obj)];\\n }\\n /**\\n * Encode packet as string.\\n */\\n encodeAsString(obj) {\\n // first is type\\n let str = \\\"\\\" + obj.type;\\n // attachments if we have them\\n if (obj.type === PacketType.BINARY_EVENT ||\\n obj.type === PacketType.BINARY_ACK) {\\n str += obj.attachments + \\\"-\\\";\\n }\\n // if we have a namespace other than `/`\\n // we append it followed by a comma `,`\\n if (obj.nsp && \\\"/\\\" !== obj.nsp) {\\n str += obj.nsp + \\\",\\\";\\n }\\n // immediately followed by the id\\n if (null != obj.id) {\\n str += obj.id;\\n }\\n // json data\\n if (null != obj.data) {\\n str += JSON.stringify(obj.data);\\n }\\n return str;\\n }\\n /**\\n * Encode packet as 'buffer sequence' by removing blobs, and\\n * deconstructing packet into object with placeholders and\\n * a list of buffers.\\n */\\n encodeAsBinary(obj) {\\n const deconstruction = Object(_binary_js__WEBPACK_IMPORTED_MODULE_1__[\\\"deconstructPacket\\\"])(obj);\\n const pack = this.encodeAsString(deconstruction.packet);\\n const buffers = deconstruction.buffers;\\n buffers.unshift(pack); // add packet info to beginning of data list\\n return buffers; // write all the buffers\\n }\\n}\\n/**\\n * A socket.io Decoder instance\\n *\\n * @return {Object} decoder\\n */\\nclass Decoder extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_0__[\\\"Emitter\\\"] {\\n constructor() {\\n super();\\n }\\n /**\\n * Decodes an encoded packet string into packet JSON.\\n *\\n * @param {String} obj - encoded packet\\n */\\n add(obj) {\\n let packet;\\n if (typeof obj === \\\"string\\\") {\\n packet = this.decodeString(obj);\\n if (packet.type === PacketType.BINARY_EVENT ||\\n packet.type === PacketType.BINARY_ACK) {\\n // binary packet's json\\n this.reconstructor = new BinaryReconstructor(packet);\\n // no attachments, labeled binary but no binary data to follow\\n if (packet.attachments === 0) {\\n super.emitReserved(\\\"decoded\\\", packet);\\n }\\n }\\n else {\\n // non-binary full packet\\n super.emitReserved(\\\"decoded\\\", packet);\\n }\\n }\\n else if (Object(_is_binary_js__WEBPACK_IMPORTED_MODULE_2__[\\\"isBinary\\\"])(obj) || obj.base64) {\\n // raw binary data\\n if (!this.reconstructor) {\\n throw new Error(\\\"got binary data when not reconstructing a packet\\\");\\n }\\n else {\\n packet = this.reconstructor.takeBinaryData(obj);\\n if (packet) {\\n // received final buffer\\n this.reconstructor = null;\\n super.emitReserved(\\\"decoded\\\", packet);\\n }\\n }\\n }\\n else {\\n throw new Error(\\\"Unknown type: \\\" + obj);\\n }\\n }\\n /**\\n * Decode a packet String (JSON data)\\n *\\n * @param {String} str\\n * @return {Object} packet\\n */\\n decodeString(str) {\\n let i = 0;\\n // look up type\\n const p = {\\n type: Number(str.charAt(0)),\\n };\\n if (PacketType[p.type] === undefined) {\\n throw new Error(\\\"unknown packet type \\\" + p.type);\\n }\\n // look up attachments if type binary\\n if (p.type === PacketType.BINARY_EVENT ||\\n p.type === PacketType.BINARY_ACK) {\\n const start = i + 1;\\n while (str.charAt(++i) !== \\\"-\\\" && i != str.length) { }\\n const buf = str.substring(start, i);\\n if (buf != Number(buf) || str.charAt(i) !== \\\"-\\\") {\\n throw new Error(\\\"Illegal attachments\\\");\\n }\\n p.attachments = Number(buf);\\n }\\n // look up namespace (if any)\\n if (\\\"/\\\" === str.charAt(i + 1)) {\\n const start = i + 1;\\n while (++i) {\\n const c = str.charAt(i);\\n if (\\\",\\\" === c)\\n break;\\n if (i === str.length)\\n break;\\n }\\n p.nsp = str.substring(start, i);\\n }\\n else {\\n p.nsp = \\\"/\\\";\\n }\\n // look up id\\n const next = str.charAt(i + 1);\\n if (\\\"\\\" !== next && Number(next) == next) {\\n const start = i + 1;\\n while (++i) {\\n const c = str.charAt(i);\\n if (null == c || Number(c) != c) {\\n --i;\\n break;\\n }\\n if (i === str.length)\\n break;\\n }\\n p.id = Number(str.substring(start, i + 1));\\n }\\n // look up json data\\n if (str.charAt(++i)) {\\n const payload = tryParse(str.substr(i));\\n if (Decoder.isPayloadValid(p.type, payload)) {\\n p.data = payload;\\n }\\n else {\\n throw new Error(\\\"invalid payload\\\");\\n }\\n }\\n return p;\\n }\\n static isPayloadValid(type, payload) {\\n switch (type) {\\n case PacketType.CONNECT:\\n return typeof payload === \\\"object\\\";\\n case PacketType.DISCONNECT:\\n return payload === undefined;\\n case PacketType.CONNECT_ERROR:\\n return typeof payload === \\\"string\\\" || typeof payload === \\\"object\\\";\\n case PacketType.EVENT:\\n case PacketType.BINARY_EVENT:\\n return Array.isArray(payload) && payload.length > 0;\\n case PacketType.ACK:\\n case PacketType.BINARY_ACK:\\n return Array.isArray(payload);\\n }\\n }\\n /**\\n * Deallocates a parser's resources\\n */\\n destroy() {\\n if (this.reconstructor) {\\n this.reconstructor.finishedReconstruction();\\n }\\n }\\n}\\nfunction tryParse(str) {\\n try {\\n return JSON.parse(str);\\n }\\n catch (e) {\\n return false;\\n }\\n}\\n/**\\n * A manager of a binary event's 'buffer sequence'. Should\\n * be constructed whenever a packet of type BINARY_EVENT is\\n * decoded.\\n *\\n * @param {Object} packet\\n * @return {BinaryReconstructor} initialized reconstructor\\n */\\nclass BinaryReconstructor {\\n constructor(packet) {\\n this.packet = packet;\\n this.buffers = [];\\n this.reconPack = packet;\\n }\\n /**\\n * Method to be called when binary data received from connection\\n * after a BINARY_EVENT packet.\\n *\\n * @param {Buffer | ArrayBuffer} binData - the raw binary data received\\n * @return {null | Object} returns null if more binary data is expected or\\n * a reconstructed packet object if all buffers have been received.\\n */\\n takeBinaryData(binData) {\\n this.buffers.push(binData);\\n if (this.buffers.length === this.reconPack.attachments) {\\n // done with buffer list\\n const packet = Object(_binary_js__WEBPACK_IMPORTED_MODULE_1__[\\\"reconstructPacket\\\"])(this.reconPack, this.buffers);\\n this.finishedReconstruction();\\n return packet;\\n }\\n return null;\\n }\\n /**\\n * Cleans up binary packet reconstruction variables.\\n */\\n finishedReconstruction() {\\n this.reconPack = null;\\n this.buffers = [];\\n }\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/socket.io-parser/build/esm/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/socket.io-parser/build/esm/is-binary.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/socket.io-parser/build/esm/is-binary.js ***!\n \\**************************************************************/\n/*! exports provided: isBinary, hasBinary */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"isBinary\\\", function() { return isBinary; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"hasBinary\\\", function() { return hasBinary; });\\nconst withNativeArrayBuffer = typeof ArrayBuffer === \\\"function\\\";\\nconst isView = (obj) => {\\n return typeof ArrayBuffer.isView === \\\"function\\\"\\n ? ArrayBuffer.isView(obj)\\n : obj.buffer instanceof ArrayBuffer;\\n};\\nconst toString = Object.prototype.toString;\\nconst withNativeBlob = typeof Blob === \\\"function\\\" ||\\n (typeof Blob !== \\\"undefined\\\" &&\\n toString.call(Blob) === \\\"[object BlobConstructor]\\\");\\nconst withNativeFile = typeof File === \\\"function\\\" ||\\n (typeof File !== \\\"undefined\\\" &&\\n toString.call(File) === \\\"[object FileConstructor]\\\");\\n/**\\n * Returns true if obj is a Buffer, an ArrayBuffer, a Blob or a File.\\n *\\n * @private\\n */\\nfunction isBinary(obj) {\\n return ((withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj))) ||\\n (withNativeBlob && obj instanceof Blob) ||\\n (withNativeFile && obj instanceof File));\\n}\\nfunction hasBinary(obj, toJSON) {\\n if (!obj || typeof obj !== \\\"object\\\") {\\n return false;\\n }\\n if (Array.isArray(obj)) {\\n for (let i = 0, l = obj.length; i < l; i++) {\\n if (hasBinary(obj[i])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n if (isBinary(obj)) {\\n return true;\\n }\\n if (obj.toJSON &&\\n typeof obj.toJSON === \\\"function\\\" &&\\n arguments.length === 1) {\\n return hasBinary(obj.toJSON(), true);\\n }\\n for (const key in obj) {\\n if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {\\n return true;\\n }\\n }\\n return false;\\n}\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/socket.io-parser/build/esm/is-binary.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/ua-parser-js/src/ua-parser.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/ua-parser-js/src/ua-parser.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"var __WEBPACK_AMD_DEFINE_RESULT__;/////////////////////////////////////////////////////////////////////////////////\\n/* UAParser.js v1.0.2\\n Copyright © 2012-2021 Faisal Salman <f@faisalman.com>\\n MIT License *//*\\n Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.\\n Supports browser & node.js environment. \\n Demo : https://faisalman.github.io/ua-parser-js\\n Source : https://github.com/faisalman/ua-parser-js */\\n/////////////////////////////////////////////////////////////////////////////////\\n\\n(function (window, undefined) {\\n\\n 'use strict';\\n\\n //////////////\\n // Constants\\n /////////////\\n\\n\\n var LIBVERSION = '1.0.2',\\n EMPTY = '',\\n UNKNOWN = '?',\\n FUNC_TYPE = 'function',\\n UNDEF_TYPE = 'undefined',\\n OBJ_TYPE = 'object',\\n STR_TYPE = 'string',\\n MAJOR = 'major',\\n MODEL = 'model',\\n NAME = 'name',\\n TYPE = 'type',\\n VENDOR = 'vendor',\\n VERSION = 'version',\\n ARCHITECTURE= 'architecture',\\n CONSOLE = 'console',\\n MOBILE = 'mobile',\\n TABLET = 'tablet',\\n SMARTTV = 'smarttv',\\n WEARABLE = 'wearable',\\n EMBEDDED = 'embedded',\\n UA_MAX_LENGTH = 255;\\n\\n var AMAZON = 'Amazon',\\n APPLE = 'Apple',\\n ASUS = 'ASUS',\\n BLACKBERRY = 'BlackBerry',\\n BROWSER = 'Browser',\\n CHROME = 'Chrome',\\n EDGE = 'Edge',\\n FIREFOX = 'Firefox',\\n GOOGLE = 'Google',\\n HUAWEI = 'Huawei',\\n LG = 'LG',\\n MICROSOFT = 'Microsoft',\\n MOTOROLA = 'Motorola',\\n OPERA = 'Opera',\\n SAMSUNG = 'Samsung',\\n SONY = 'Sony',\\n XIAOMI = 'Xiaomi',\\n ZEBRA = 'Zebra',\\n FACEBOOK = 'Facebook';\\n\\n ///////////\\n // Helper\\n //////////\\n\\n var extend = function (regexes, extensions) {\\n var mergedRegexes = {};\\n for (var i in regexes) {\\n if (extensions[i] && extensions[i].length % 2 === 0) {\\n mergedRegexes[i] = extensions[i].concat(regexes[i]);\\n } else {\\n mergedRegexes[i] = regexes[i];\\n }\\n }\\n return mergedRegexes;\\n },\\n enumerize = function (arr) {\\n var enums = {};\\n for (var i=0; i<arr.length; i++) {\\n enums[arr[i].toUpperCase()] = arr[i];\\n }\\n return enums;\\n },\\n has = function (str1, str2) {\\n return typeof str1 === STR_TYPE ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;\\n },\\n lowerize = function (str) {\\n return str.toLowerCase();\\n },\\n majorize = function (version) {\\n return typeof(version) === STR_TYPE ? version.replace(/[^\\\\d\\\\.]/g, EMPTY).split('.')[0] : undefined;\\n },\\n trim = function (str, len) {\\n if (typeof(str) === STR_TYPE) {\\n str = str.replace(/^\\\\s\\\\s*/, EMPTY).replace(/\\\\s\\\\s*$/, EMPTY);\\n return typeof(len) === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);\\n }\\n };\\n\\n ///////////////\\n // Map helper\\n //////////////\\n\\n var rgxMapper = function (ua, arrays) {\\n\\n var i = 0, j, k, p, q, matches, match;\\n\\n // loop through all regexes maps\\n while (i < arrays.length && !matches) {\\n\\n var regex = arrays[i], // even sequence (0,2,4,..)\\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\\n j = k = 0;\\n\\n // try matching uastring with regexes\\n while (j < regex.length && !matches) {\\n\\n matches = regex[j++].exec(ua);\\n\\n if (!!matches) {\\n for (p = 0; p < props.length; p++) {\\n match = matches[++k];\\n q = props[p];\\n // check if given property is actually array\\n if (typeof q === OBJ_TYPE && q.length > 0) {\\n if (q.length === 2) {\\n if (typeof q[1] == FUNC_TYPE) {\\n // assign modified match\\n this[q[0]] = q[1].call(this, match);\\n } else {\\n // assign given value, ignore regex match\\n this[q[0]] = q[1];\\n }\\n } else if (q.length === 3) {\\n // check whether function or regex\\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\\n // call function (usually string mapper)\\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\\n } else {\\n // sanitize match using given regex\\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\\n }\\n } else if (q.length === 4) {\\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\\n }\\n } else {\\n this[q] = match ? match : undefined;\\n }\\n }\\n }\\n }\\n i += 2;\\n }\\n },\\n\\n strMapper = function (str, map) {\\n\\n for (var i in map) {\\n // check if current value is array\\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\\n for (var j = 0; j < map[i].length; j++) {\\n if (has(map[i][j], str)) {\\n return (i === UNKNOWN) ? undefined : i;\\n }\\n }\\n } else if (has(map[i], str)) {\\n return (i === UNKNOWN) ? undefined : i;\\n }\\n }\\n return str;\\n };\\n\\n ///////////////\\n // String map\\n //////////////\\n\\n // Safari < 3.0\\n var oldSafariMap = {\\n '1.0' : '/8',\\n '1.2' : '/1',\\n '1.3' : '/3',\\n '2.0' : '/412',\\n '2.0.2' : '/416',\\n '2.0.3' : '/417',\\n '2.0.4' : '/419',\\n '?' : '/'\\n },\\n windowsVersionMap = {\\n 'ME' : '4.90',\\n 'NT 3.11' : 'NT3.51',\\n 'NT 4.0' : 'NT4.0',\\n '2000' : 'NT 5.0',\\n 'XP' : ['NT 5.1', 'NT 5.2'],\\n 'Vista' : 'NT 6.0',\\n '7' : 'NT 6.1',\\n '8' : 'NT 6.2',\\n '8.1' : 'NT 6.3',\\n '10' : ['NT 6.4', 'NT 10.0'],\\n 'RT' : 'ARM'\\n };\\n\\n //////////////\\n // Regex map\\n /////////////\\n\\n var regexes = {\\n\\n browser : [[\\n\\n /\\\\b(?:crmo|crios)\\\\/([\\\\w\\\\.]+)/i // Chrome for Android/iOS\\n ], [VERSION, [NAME, 'Chrome']], [\\n /edg(?:e|ios|a)?\\\\/([\\\\w\\\\.]+)/i // Microsoft Edge\\n ], [VERSION, [NAME, 'Edge']], [\\n\\n // Presto based\\n /(opera mini)\\\\/([-\\\\w\\\\.]+)/i, // Opera Mini\\n /(opera [mobiletab]{3,6})\\\\b.+version\\\\/([-\\\\w\\\\.]+)/i, // Opera Mobi/Tablet\\n /(opera)(?:.+version\\\\/|[\\\\/ ]+)([\\\\w\\\\.]+)/i // Opera\\n ], [NAME, VERSION], [\\n /opios[\\\\/ ]+([\\\\w\\\\.]+)/i // Opera mini on iphone >= 8.0\\n ], [VERSION, [NAME, OPERA+' Mini']], [\\n /\\\\bopr\\\\/([\\\\w\\\\.]+)/i // Opera Webkit\\n ], [VERSION, [NAME, OPERA]], [\\n\\n // Mixed\\n /(kindle)\\\\/([\\\\w\\\\.]+)/i, // Kindle\\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\\\/ ]?([\\\\w\\\\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer\\n // Trident based\\n /(avant |iemobile|slim)(?:browser)?[\\\\/ ]?([\\\\w\\\\.]*)/i, // Avant/IEMobile/SlimBrowser\\n /(ba?idubrowser)[\\\\/ ]?([\\\\w\\\\.]+)/i, // Baidu Browser\\n /(?:ms|\\\\()(ie) ([\\\\w\\\\.]+)/i, // Internet Explorer\\n\\n // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon\\n /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\\\\/([-\\\\w\\\\.]+)/i,\\n // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ\\n /(weibo)__([\\\\d\\\\.]+)/i // Weibo\\n ], [NAME, VERSION], [\\n /(?:\\\\buc? ?browser|(?:juc.+)ucweb)[\\\\/ ]?([\\\\w\\\\.]+)/i // UCBrowser\\n ], [VERSION, [NAME, 'UC'+BROWSER]], [\\n /\\\\bqbcore\\\\/([\\\\w\\\\.]+)/i // WeChat Desktop for Windows Built-in Browser\\n ], [VERSION, [NAME, 'WeChat(Win) Desktop']], [\\n /micromessenger\\\\/([\\\\w\\\\.]+)/i // WeChat\\n ], [VERSION, [NAME, 'WeChat']], [\\n /konqueror\\\\/([\\\\w\\\\.]+)/i // Konqueror\\n ], [VERSION, [NAME, 'Konqueror']], [\\n /trident.+rv[: ]([\\\\w\\\\.]{1,9})\\\\b.+like gecko/i // IE11\\n ], [VERSION, [NAME, 'IE']], [\\n /yabrowser\\\\/([\\\\w\\\\.]+)/i // Yandex\\n ], [VERSION, [NAME, 'Yandex']], [\\n /(avast|avg)\\\\/([\\\\w\\\\.]+)/i // Avast/AVG Secure Browser\\n ], [[NAME, /(.+)/, '$1 Secure '+BROWSER], VERSION], [\\n /\\\\bfocus\\\\/([\\\\w\\\\.]+)/i // Firefox Focus\\n ], [VERSION, [NAME, FIREFOX+' Focus']], [\\n /\\\\bopt\\\\/([\\\\w\\\\.]+)/i // Opera Touch\\n ], [VERSION, [NAME, OPERA+' Touch']], [\\n /coc_coc\\\\w+\\\\/([\\\\w\\\\.]+)/i // Coc Coc Browser\\n ], [VERSION, [NAME, 'Coc Coc']], [\\n /dolfin\\\\/([\\\\w\\\\.]+)/i // Dolphin\\n ], [VERSION, [NAME, 'Dolphin']], [\\n /coast\\\\/([\\\\w\\\\.]+)/i // Opera Coast\\n ], [VERSION, [NAME, OPERA+' Coast']], [\\n /miuibrowser\\\\/([\\\\w\\\\.]+)/i // MIUI Browser\\n ], [VERSION, [NAME, 'MIUI '+BROWSER]], [\\n /fxios\\\\/([-\\\\w\\\\.]+)/i // Firefox for iOS\\n ], [VERSION, [NAME, FIREFOX]], [\\n /\\\\bqihu|(qi?ho?o?|360)browser/i // 360\\n ], [[NAME, '360 '+BROWSER]], [\\n /(oculus|samsung|sailfish)browser\\\\/([\\\\w\\\\.]+)/i\\n ], [[NAME, /(.+)/, '$1 '+BROWSER], VERSION], [ // Oculus/Samsung/Sailfish Browser\\n /(comodo_dragon)\\\\/([\\\\w\\\\.]+)/i // Comodo Dragon\\n ], [[NAME, /_/g, ' '], VERSION], [\\n /(electron)\\\\/([\\\\w\\\\.]+) safari/i, // Electron-based App\\n /(tesla)(?: qtcarbrowser|\\\\/(20\\\\d\\\\d\\\\.[-\\\\w\\\\.]+))/i, // Tesla\\n /m?(qqbrowser|baiduboxapp|2345Explorer)[\\\\/ ]?([\\\\w\\\\.]+)/i // QQBrowser/Baidu App/2345 Browser\\n ], [NAME, VERSION], [\\n /(metasr)[\\\\/ ]?([\\\\w\\\\.]+)/i, // SouGouBrowser\\n /(lbbrowser)/i // LieBao Browser\\n ], [NAME], [\\n\\n // WebView\\n /((?:fban\\\\/fbios|fb_iab\\\\/fb4a)(?!.+fbav)|;fbav\\\\/([\\\\w\\\\.]+);)/i // Facebook App for iOS & Android\\n ], [[NAME, FACEBOOK], VERSION], [\\n /safari (line)\\\\/([\\\\w\\\\.]+)/i, // Line App for iOS\\n /\\\\b(line)\\\\/([\\\\w\\\\.]+)\\\\/iab/i, // Line App for Android\\n /(chromium|instagram)[\\\\/ ]([-\\\\w\\\\.]+)/i // Chromium/Instagram\\n ], [NAME, VERSION], [\\n /\\\\bgsa\\\\/([\\\\w\\\\.]+) .*safari\\\\//i // Google Search Appliance on iOS\\n ], [VERSION, [NAME, 'GSA']], [\\n\\n /headlesschrome(?:\\\\/([\\\\w\\\\.]+)| )/i // Chrome Headless\\n ], [VERSION, [NAME, CHROME+' Headless']], [\\n\\n / wv\\\\).+(chrome)\\\\/([\\\\w\\\\.]+)/i // Chrome WebView\\n ], [[NAME, CHROME+' WebView'], VERSION], [\\n\\n /droid.+ version\\\\/([\\\\w\\\\.]+)\\\\b.+(?:mobile safari|safari)/i // Android Browser\\n ], [VERSION, [NAME, 'Android '+BROWSER]], [\\n\\n /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\\\/v?([\\\\w\\\\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia\\n ], [NAME, VERSION], [\\n\\n /version\\\\/([\\\\w\\\\.]+) .*mobile\\\\/\\\\w+ (safari)/i // Mobile Safari\\n ], [VERSION, [NAME, 'Mobile Safari']], [\\n /version\\\\/([\\\\w\\\\.]+) .*(mobile ?safari|safari)/i // Safari & Safari Mobile\\n ], [VERSION, NAME], [\\n /webkit.+?(mobile ?safari|safari)(\\\\/[\\\\w\\\\.]+)/i // Safari < 3.0\\n ], [NAME, [VERSION, strMapper, oldSafariMap]], [\\n\\n /(webkit|khtml)\\\\/([\\\\w\\\\.]+)/i\\n ], [NAME, VERSION], [\\n\\n // Gecko based\\n /(navigator|netscape\\\\d?)\\\\/([-\\\\w\\\\.]+)/i // Netscape\\n ], [[NAME, 'Netscape'], VERSION], [\\n /mobile vr; rv:([\\\\w\\\\.]+)\\\\).+firefox/i // Firefox Reality\\n ], [VERSION, [NAME, FIREFOX+' Reality']], [\\n /ekiohf.+(flow)\\\\/([\\\\w\\\\.]+)/i, // Flow\\n /(swiftfox)/i, // Swiftfox\\n /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\\\\/ ]?([\\\\w\\\\.\\\\+]+)/i,\\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar\\n /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\\\/([-\\\\w\\\\.]+)$/i,\\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\\n /(firefox)\\\\/([\\\\w\\\\.]+)/i, // Other Firefox-based\\n /(mozilla)\\\\/([\\\\w\\\\.]+) .+rv\\\\:.+gecko\\\\/\\\\d+/i, // Mozilla\\n\\n // Other\\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\\\\. ]?browser)[-\\\\/ ]?v?([\\\\w\\\\.]+)/i,\\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser\\n /(links) \\\\(([\\\\w\\\\.]+)/i // Links\\n ], [NAME, VERSION]\\n ],\\n\\n cpu : [[\\n\\n /(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\\\)]/i // AMD64 (x64)\\n ], [[ARCHITECTURE, 'amd64']], [\\n\\n /(ia32(?=;))/i // IA32 (quicktime)\\n ], [[ARCHITECTURE, lowerize]], [\\n\\n /((?:i[346]|x)86)[;\\\\)]/i // IA32 (x86)\\n ], [[ARCHITECTURE, 'ia32']], [\\n\\n /\\\\b(aarch64|arm(v?8e?l?|_?64))\\\\b/i // ARM64\\n ], [[ARCHITECTURE, 'arm64']], [\\n\\n /\\\\b(arm(?:v[67])?ht?n?[fl]p?)\\\\b/i // ARMHF\\n ], [[ARCHITECTURE, 'armhf']], [\\n\\n // PocketPC mistakenly identified as PowerPC\\n /windows (ce|mobile); ppc;/i\\n ], [[ARCHITECTURE, 'arm']], [\\n\\n /((?:ppc|powerpc)(?:64)?)(?: mac|;|\\\\))/i // PowerPC\\n ], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [\\n\\n /(sun4\\\\w)[;\\\\)]/i // SPARC\\n ], [[ARCHITECTURE, 'sparc']], [\\n\\n /((?:avr32|ia64(?=;))|68k(?=\\\\))|\\\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\\\b|pa-risc)/i\\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\\n ], [[ARCHITECTURE, lowerize]]\\n ],\\n\\n device : [[\\n\\n //////////////////////////\\n // MOBILES & TABLETS\\n // Ordered by popularity\\n /////////////////////////\\n\\n // Samsung\\n /\\\\b(sch-i[89]0\\\\d|shw-m380s|sm-[pt]\\\\w{2,4}|gt-[pn]\\\\d{2,4}|sgh-t8[56]9|nexus 10)/i\\n ], [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]], [\\n /\\\\b((?:s[cgp]h|gt|sm)-\\\\w+|galaxy nexus)/i,\\n /samsung[- ]([-\\\\w]+)/i,\\n /sec-(sgh\\\\w+)/i\\n ], [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]], [\\n\\n // Apple\\n /\\\\((ip(?:hone|od)[\\\\w ]*);/i // iPod/iPhone\\n ], [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]], [\\n /\\\\((ipad);[-\\\\w\\\\),; ]+apple/i, // iPad\\n /applecoremedia\\\\/[\\\\w\\\\.]+ \\\\((ipad)/i,\\n /\\\\b(ipad)\\\\d\\\\d?,\\\\d\\\\d?[;\\\\]].+ios/i\\n ], [MODEL, [VENDOR, APPLE], [TYPE, TABLET]], [\\n\\n // Huawei\\n /\\\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\\\d{2})\\\\b(?!.+d\\\\/s)/i\\n ], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [\\n /(?:huawei|honor)([-\\\\w ]+)[;\\\\)]/i,\\n /\\\\b(nexus 6p|\\\\w{2,4}-[atu]?[ln][01259x][012359][an]?)\\\\b(?!.+d\\\\/s)/i\\n ], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [\\n\\n // Xiaomi\\n /\\\\b(poco[\\\\w ]+)(?: bui|\\\\))/i, // Xiaomi POCO\\n /\\\\b; (\\\\w+) build\\\\/hm\\\\1/i, // Xiaomi Hongmi 'numeric' models\\n /\\\\b(hm[-_ ]?note?[_ ]?(?:\\\\d\\\\w)?) bui/i, // Xiaomi Hongmi\\n /\\\\b(redmi[\\\\-_ ]?(?:note|k)?[\\\\w_ ]+)(?: bui|\\\\))/i, // Xiaomi Redmi\\n /\\\\b(mi[-_ ]?(?:a\\\\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\\\\d?\\\\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\\\\))/i // Xiaomi Mi\\n ], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [\\n /\\\\b(mi[-_ ]?(?:pad)(?:[\\\\w_ ]+))(?: bui|\\\\))/i // Mi Pad tablets\\n ],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [\\n\\n // OPPO\\n /; (\\\\w+) bui.+ oppo/i,\\n /\\\\b(cph[12]\\\\d{3}|p(?:af|c[al]|d\\\\w|e[ar])[mt]\\\\d0|x9007|a101op)\\\\b/i\\n ], [MODEL, [VENDOR, 'OPPO'], [TYPE, MOBILE]], [\\n\\n // Vivo\\n /vivo (\\\\w+)(?: bui|\\\\))/i,\\n /\\\\b(v[12]\\\\d{3}\\\\w?[at])(?: bui|;)/i\\n ], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [\\n\\n // Realme\\n /\\\\b(rmx[12]\\\\d{3})(?: bui|;|\\\\))/i\\n ], [MODEL, [VENDOR, 'Realme'], [TYPE, MOBILE]], [\\n\\n // Motorola\\n /\\\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\\\b[\\\\w ]+build\\\\//i,\\n /\\\\bmot(?:orola)?[- ](\\\\w*)/i,\\n /((?:moto[\\\\w\\\\(\\\\) ]+|xt\\\\d{3,4}|nexus 6)(?= bui|\\\\)))/i\\n ], [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]], [\\n /\\\\b(mz60\\\\d|xoom[2 ]{0,2}) build\\\\//i\\n ], [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]], [\\n\\n // LG\\n /((?=lg)?[vl]k\\\\-?\\\\d{3}) bui| 3\\\\.[-\\\\w; ]{10}lg?-([06cv9]{3,4})/i\\n ], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [\\n /(lm(?:-?f100[nv]?|-[\\\\w\\\\.]+)(?= bui|\\\\))|nexus [45])/i,\\n /\\\\blg[-e;\\\\/ ]+((?!browser|netcast|android tv)\\\\w+)/i,\\n /\\\\blg-?([\\\\d\\\\w]+) bui/i\\n ], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [\\n\\n // Lenovo\\n /(ideatab[-\\\\w ]+)/i,\\n /lenovo ?(s[56]000[-\\\\w]+|tab(?:[\\\\w ]+)|yt[-\\\\d\\\\w]{6}|tb[-\\\\d\\\\w]{6})/i\\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\\n\\n // Nokia\\n /(?:maemo|nokia).*(n900|lumia \\\\d+)/i,\\n /nokia[-_ ]?([-\\\\w\\\\.]*)/i\\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Nokia'], [TYPE, MOBILE]], [\\n\\n // Google\\n /(pixel c)\\\\b/i // Google Pixel C\\n ], [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]], [\\n /droid.+; (pixel[\\\\daxl ]{0,6})(?: bui|\\\\))/i // Google Pixel\\n ], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [\\n\\n // Sony\\n /droid.+ ([c-g]\\\\d{4}|so[-gl]\\\\w+|xq-a\\\\w[4-7][12])(?= bui|\\\\).+chrome\\\\/(?![1-6]{0,1}\\\\d\\\\.))/i\\n ], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [\\n /sony tablet [ps]/i,\\n /\\\\b(?:sony)?sgp\\\\w+(?: bui|\\\\))/i\\n ], [[MODEL, 'Xperia Tablet'], [VENDOR, SONY], [TYPE, TABLET]], [\\n\\n // OnePlus\\n / (kb2005|in20[12]5|be20[12][59])\\\\b/i,\\n /(?:one)?(?:plus)? (a\\\\d0\\\\d\\\\d)(?: b|\\\\))/i\\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\\n\\n // Amazon\\n /(alexa)webm/i,\\n /(kf[a-z]{2}wi)( bui|\\\\))/i, // Kindle Fire without Silk\\n /(kf[a-z]+)( bui|\\\\)).+silk\\\\//i // Kindle Fire HD\\n ], [MODEL, [VENDOR, AMAZON], [TYPE, TABLET]], [\\n /((?:sd|kf)[0349hijorstuw]+)( bui|\\\\)).+silk\\\\//i // Fire Phone\\n ], [[MODEL, /(.+)/g, 'Fire Phone $1'], [VENDOR, AMAZON], [TYPE, MOBILE]], [\\n\\n // BlackBerry\\n /(playbook);[-\\\\w\\\\),; ]+(rim)/i // BlackBerry PlayBook\\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\\n /\\\\b((?:bb[a-f]|st[hv])100-\\\\d)/i,\\n /\\\\(bb10; (\\\\w+)/i // BlackBerry 10\\n ], [MODEL, [VENDOR, BLACKBERRY], [TYPE, MOBILE]], [\\n\\n // Asus\\n /(?:\\\\b|asus_)(transfo[prime ]{4,10} \\\\w+|eeepc|slider \\\\w+|nexus 7|padfone|p00[cj])/i\\n ], [MODEL, [VENDOR, ASUS], [TYPE, TABLET]], [\\n / (z[bes]6[027][012][km][ls]|zenfone \\\\d\\\\w?)\\\\b/i\\n ], [MODEL, [VENDOR, ASUS], [TYPE, MOBILE]], [\\n\\n // HTC\\n /(nexus 9)/i // HTC Nexus 9\\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\\n /(htc)[-;_ ]{1,2}([\\\\w ]+(?=\\\\)| bui)|\\\\w+)/i, // HTC\\n\\n // ZTE\\n /(zte)[- ]([\\\\w ]+?)(?: bui|\\\\/|\\\\))/i,\\n /(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\\\\w]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony\\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\\n\\n // Acer\\n /droid.+; ([ab][1-7]-?[0178a]\\\\d\\\\d?)/i\\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\\n\\n // Meizu\\n /droid.+; (m[1-5] note) bui/i,\\n /\\\\bmz-([-\\\\w]{2,})/i\\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [\\n\\n // Sharp\\n /\\\\b(sh-?[altvz]?\\\\d\\\\d[a-ekm]?)/i\\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, MOBILE]], [\\n\\n // MIXED\\n /(blackberry|benq|palm(?=\\\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\\\\w]*)/i,\\n // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\\n /(hp) ([\\\\w ]+\\\\w)/i, // HP iPAQ\\n /(asus)-?(\\\\w+)/i, // Asus\\n /(microsoft); (lumia[\\\\w ]+)/i, // Microsoft Lumia\\n /(lenovo)[-_ ]?([-\\\\w]+)/i, // Lenovo\\n /(jolla)/i, // Jolla\\n /(oppo) ?([\\\\w ]+) bui/i // OPPO\\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\\n\\n /(archos) (gamepad2?)/i, // Archos\\n /(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad\\n /(kindle)\\\\/([\\\\w\\\\.]+)/i, // Kindle\\n /(nook)[\\\\w ]+build\\\\/(\\\\w+)/i, // Nook\\n /(dell) (strea[kpr\\\\d ]*[\\\\dko])/i, // Dell Streak\\n /(le[- ]+pan)[- ]+(\\\\w{1,9}) bui/i, // Le Pan Tablets\\n /(trinity)[- ]*(t\\\\d{3}) bui/i, // Trinity Tablets\\n /(gigaset)[- ]+(q\\\\w{1,9}) bui/i, // Gigaset Tablets\\n /(vodafone) ([\\\\w ]+)(?:\\\\)| bui)/i // Vodafone\\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\\n\\n /(surface duo)/i // Surface Duo\\n ], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [\\n /droid [\\\\d\\\\.]+; (fp\\\\du?)(?: b|\\\\))/i // Fairphone\\n ], [MODEL, [VENDOR, 'Fairphone'], [TYPE, MOBILE]], [\\n /(u304aa)/i // AT&T\\n ], [MODEL, [VENDOR, 'AT&T'], [TYPE, MOBILE]], [\\n /\\\\bsie-(\\\\w*)/i // Siemens\\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\\n /\\\\b(rct\\\\w+) b/i // RCA Tablets\\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\\n /\\\\b(venue[\\\\d ]{2,7}) b/i // Dell Venue Tablets\\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\\n /\\\\b(q(?:mv|ta)\\\\w+) b/i // Verizon Tablet\\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\\n /\\\\b(?:barnes[& ]+noble |bn[rt])([\\\\w\\\\+ ]*) b/i // Barnes & Noble Tablet\\n ], [MODEL, [VENDOR, 'Barnes & Noble'], [TYPE, TABLET]], [\\n /\\\\b(tm\\\\d{3}\\\\w+) b/i\\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\\n /\\\\b(k88) b/i // ZTE K Series Tablet\\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [\\n /\\\\b(nx\\\\d{3}j) b/i // ZTE Nubia\\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [\\n /\\\\b(gen\\\\d{3}) b.+49h/i // Swiss GEN Mobile\\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\\n /\\\\b(zur\\\\d{3}) b/i // Swiss ZUR Tablet\\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\\n /\\\\b((zeki)?tb.*\\\\b) b/i // Zeki Tablets\\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\\n /\\\\b([yr]\\\\d{2}) b/i,\\n /\\\\b(dragon[- ]+touch |dt)(\\\\w{5}) b/i // Dragon Touch Tablet\\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\\n /\\\\b(ns-?\\\\w{0,9}) b/i // Insignia Tablets\\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\\n /\\\\b((nxa|next)-?\\\\w{0,9}) b/i // NextBook Tablets\\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\\n /\\\\b(xtreme\\\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i // Voice Xtreme Phones\\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [\\n /\\\\b(lvtel\\\\-)?(v1[12]) b/i // LvTel Phones\\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\\n /\\\\b(ph-1) /i // Essential PH-1\\n ], [MODEL, [VENDOR, 'Essential'], [TYPE, MOBILE]], [\\n /\\\\b(v(100md|700na|7011|917g).*\\\\b) b/i // Envizen Tablets\\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\\n /\\\\b(trio[-\\\\w\\\\. ]+) b/i // MachSpeed Tablets\\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\\n /\\\\btu_(1491) b/i // Rotor Tablets\\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\\n /(shield[\\\\w ]+) b/i // Nvidia Shield Tablets\\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, TABLET]], [\\n /(sprint) (\\\\w+)/i // Sprint Phones\\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\\n /(kin\\\\.[onetw]{3})/i // Microsoft Kin\\n ], [[MODEL, /\\\\./g, ' '], [VENDOR, MICROSOFT], [TYPE, MOBILE]], [\\n /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\\\)/i // Zebra\\n ], [MODEL, [VENDOR, ZEBRA], [TYPE, TABLET]], [\\n /droid.+; (ec30|ps20|tc[2-8]\\\\d[kx])\\\\)/i\\n ], [MODEL, [VENDOR, ZEBRA], [TYPE, MOBILE]], [\\n\\n ///////////////////\\n // CONSOLES\\n ///////////////////\\n\\n /(ouya)/i, // Ouya\\n /(nintendo) ([wids3utch]+)/i // Nintendo\\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\\n /droid.+; (shield) bui/i // Nvidia\\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\\n /(playstation [345portablevi]+)/i // Playstation\\n ], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [\\n /\\\\b(xbox(?: one)?(?!; xbox))[\\\\); ]/i // Microsoft Xbox\\n ], [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]], [\\n\\n ///////////////////\\n // SMARTTVS\\n ///////////////////\\n\\n /smart-tv.+(samsung)/i // Samsung\\n ], [VENDOR, [TYPE, SMARTTV]], [\\n /hbbtv.+maple;(\\\\d+)/i\\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, SAMSUNG], [TYPE, SMARTTV]], [\\n /(nux; netcast.+smarttv|lg (netcast\\\\.tv-201\\\\d|android tv))/i // LG SmartTV\\n ], [[VENDOR, LG], [TYPE, SMARTTV]], [\\n /(apple) ?tv/i // Apple TV\\n ], [VENDOR, [MODEL, APPLE+' TV'], [TYPE, SMARTTV]], [\\n /crkey/i // Google Chromecast\\n ], [[MODEL, CHROME+'cast'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [\\n /droid.+aft(\\\\w)( bui|\\\\))/i // Fire TV\\n ], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [\\n /\\\\(dtv[\\\\);].+(aquos)/i // Sharp\\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [\\n /\\\\b(roku)[\\\\dx]*[\\\\)\\\\/]((?:dvp-)?[\\\\d\\\\.]*)/i, // Roku\\n /hbbtv\\\\/\\\\d+\\\\.\\\\d+\\\\.\\\\d+ +\\\\([\\\\w ]*; *(\\\\w[^;]*);([^;]*)/i // HbbTV devices\\n ], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [\\n /\\\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\\\b/i // SmartTV from Unidentified Vendors\\n ], [[TYPE, SMARTTV]], [\\n\\n ///////////////////\\n // WEARABLES\\n ///////////////////\\n\\n /((pebble))app/i // Pebble\\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\\n /droid.+; (glass) \\\\d/i // Google Glass\\n ], [MODEL, [VENDOR, GOOGLE], [TYPE, WEARABLE]], [\\n /droid.+; (wt63?0{2,3})\\\\)/i\\n ], [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]], [\\n /(quest( 2)?)/i // Oculus Quest\\n ], [MODEL, [VENDOR, FACEBOOK], [TYPE, WEARABLE]], [\\n\\n ///////////////////\\n // EMBEDDED\\n ///////////////////\\n\\n /(tesla)(?: qtcarbrowser|\\\\/[-\\\\w\\\\.]+)/i // Tesla\\n ], [VENDOR, [TYPE, EMBEDDED]], [\\n\\n ////////////////////\\n // MIXED (GENERIC)\\n ///////////////////\\n\\n /droid .+?; ([^;]+?)(?: bui|\\\\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors\\n ], [MODEL, [TYPE, MOBILE]], [\\n /droid .+?; ([^;]+?)(?: bui|\\\\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors\\n ], [MODEL, [TYPE, TABLET]], [\\n /\\\\b((tablet|tab)[;\\\\/]|focus\\\\/\\\\d(?!.+mobile))/i // Unidentifiable Tablet\\n ], [[TYPE, TABLET]], [\\n /(phone|mobile(?:[;\\\\/]| safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile\\n ], [[TYPE, MOBILE]], [\\n /(android[-\\\\w\\\\. ]{0,9});.+buil/i // Generic Android Device\\n ], [MODEL, [VENDOR, 'Generic']]\\n ],\\n\\n engine : [[\\n\\n /windows.+ edge\\\\/([\\\\w\\\\.]+)/i // EdgeHTML\\n ], [VERSION, [NAME, EDGE+'HTML']], [\\n\\n /webkit\\\\/537\\\\.36.+chrome\\\\/(?!27)([\\\\w\\\\.]+)/i // Blink\\n ], [VERSION, [NAME, 'Blink']], [\\n\\n /(presto)\\\\/([\\\\w\\\\.]+)/i, // Presto\\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\\\/([\\\\w\\\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna\\n /ekioh(flow)\\\\/([\\\\w\\\\.]+)/i, // Flow\\n /(khtml|tasman|links)[\\\\/ ]\\\\(?([\\\\w\\\\.]+)/i, // KHTML/Tasman/Links\\n /(icab)[\\\\/ ]([23]\\\\.[\\\\d\\\\.]+)/i // iCab\\n ], [NAME, VERSION], [\\n\\n /rv\\\\:([\\\\w\\\\.]{1,9})\\\\b.+(gecko)/i // Gecko\\n ], [VERSION, NAME]\\n ],\\n\\n os : [[\\n\\n // Windows\\n /microsoft (windows) (vista|xp)/i // Windows (iTunes)\\n ], [NAME, VERSION], [\\n /(windows) nt 6\\\\.2; (arm)/i, // Windows RT\\n /(windows (?:phone(?: os)?|mobile))[\\\\/ ]?([\\\\d\\\\.\\\\w ]*)/i, // Windows Phone\\n /(windows)[\\\\/ ]?([ntce\\\\d\\\\. ]+\\\\w)(?!.+xbox)/i\\n ], [NAME, [VERSION, strMapper, windowsVersionMap]], [\\n /(win(?=3|9|n)|win 9x )([nt\\\\d\\\\.]+)/i\\n ], [[NAME, 'Windows'], [VERSION, strMapper, windowsVersionMap]], [\\n\\n // iOS/macOS\\n /ip[honead]{2,4}\\\\b(?:.*os ([\\\\w]+) like mac|; opera)/i, // iOS\\n /cfnetwork\\\\/.+darwin/i\\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\\n /(mac os x) ?([\\\\w\\\\. ]*)/i,\\n /(macintosh|mac_powerpc\\\\b)(?!.+haiku)/i // Mac OS\\n ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [\\n\\n // Mobile OSes\\n /droid ([\\\\w\\\\.]+)\\\\b.+(android[- ]x86)/i // Android-x86\\n ], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS\\n /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\\\/ ]?([\\\\w\\\\.]*)/i,\\n /(blackberry)\\\\w*\\\\/([\\\\w\\\\.]*)/i, // Blackberry\\n /(tizen|kaios)[\\\\/ ]([\\\\w\\\\.]+)/i, // Tizen/KaiOS\\n /\\\\((series40);/i // Series 40\\n ], [NAME, VERSION], [\\n /\\\\(bb(10);/i // BlackBerry 10\\n ], [VERSION, [NAME, BLACKBERRY]], [\\n /(?:symbian ?os|symbos|s60(?=;)|series60)[-\\\\/ ]?([\\\\w\\\\.]*)/i // Symbian\\n ], [VERSION, [NAME, 'Symbian']], [\\n /mozilla\\\\/[\\\\d\\\\.]+ \\\\((?:mobile|tablet|tv|mobile; [\\\\w ]+); rv:.+ gecko\\\\/([\\\\w\\\\.]+)/i // Firefox OS\\n ], [VERSION, [NAME, FIREFOX+' OS']], [\\n /web0s;.+rt(tv)/i,\\n /\\\\b(?:hp)?wos(?:browser)?\\\\/([\\\\w\\\\.]+)/i // WebOS\\n ], [VERSION, [NAME, 'webOS']], [\\n\\n // Google Chromecast\\n /crkey\\\\/([\\\\d\\\\.]+)/i // Google Chromecast\\n ], [VERSION, [NAME, CHROME+'cast']], [\\n /(cros) [\\\\w]+ ([\\\\w\\\\.]+\\\\w)/i // Chromium OS\\n ], [[NAME, 'Chromium OS'], VERSION],[\\n\\n // Console\\n /(nintendo|playstation) ([wids345portablevuch]+)/i, // Nintendo/Playstation\\n /(xbox); +xbox ([^\\\\);]+)/i, // Microsoft Xbox (360, One, X, S, Series X, Series S)\\n\\n // Other\\n /\\\\b(joli|palm)\\\\b ?(?:os)?\\\\/?([\\\\w\\\\.]*)/i, // Joli/Palm\\n /(mint)[\\\\/\\\\(\\\\) ]?(\\\\w*)/i, // Mint\\n /(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux\\n /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\\\/ ]?(?!chrom|package)([-\\\\w\\\\.]*)/i,\\n // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire\\n /(hurd|linux) ?([\\\\w\\\\.]*)/i, // Hurd/Linux\\n /(gnu) ?([\\\\w\\\\.]*)/i, // GNU\\n /\\\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\\\/ ]?(?!amd|[ix346]{1,2}86)([\\\\w\\\\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly\\n /(haiku) (\\\\w+)/i // Haiku\\n ], [NAME, VERSION], [\\n /(sunos) ?([\\\\w\\\\.\\\\d]*)/i // Solaris\\n ], [[NAME, 'Solaris'], VERSION], [\\n /((?:open)?solaris)[-\\\\/ ]?([\\\\w\\\\.]*)/i, // Solaris\\n /(aix) ((\\\\d)(?=\\\\.|\\\\)| )[\\\\w\\\\.])*/i, // AIX\\n /\\\\b(beos|os\\\\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX\\n /(unix) ?([\\\\w\\\\.]*)/i // UNIX\\n ], [NAME, VERSION]\\n ]\\n };\\n\\n /////////////////\\n // Constructor\\n ////////////////\\n\\n var UAParser = function (ua, extensions) {\\n\\n if (typeof ua === OBJ_TYPE) {\\n extensions = ua;\\n ua = undefined;\\n }\\n\\n if (!(this instanceof UAParser)) {\\n return new UAParser(ua, extensions).getResult();\\n }\\n\\n var _ua = ua || ((typeof window !== UNDEF_TYPE && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);\\n var _rgxmap = extensions ? extend(regexes, extensions) : regexes;\\n\\n this.getBrowser = function () {\\n var _browser = {};\\n _browser[NAME] = undefined;\\n _browser[VERSION] = undefined;\\n rgxMapper.call(_browser, _ua, _rgxmap.browser);\\n _browser.major = majorize(_browser.version);\\n return _browser;\\n };\\n this.getCPU = function () {\\n var _cpu = {};\\n _cpu[ARCHITECTURE] = undefined;\\n rgxMapper.call(_cpu, _ua, _rgxmap.cpu);\\n return _cpu;\\n };\\n this.getDevice = function () {\\n var _device = {};\\n _device[VENDOR] = undefined;\\n _device[MODEL] = undefined;\\n _device[TYPE] = undefined;\\n rgxMapper.call(_device, _ua, _rgxmap.device);\\n return _device;\\n };\\n this.getEngine = function () {\\n var _engine = {};\\n _engine[NAME] = undefined;\\n _engine[VERSION] = undefined;\\n rgxMapper.call(_engine, _ua, _rgxmap.engine);\\n return _engine;\\n };\\n this.getOS = function () {\\n var _os = {};\\n _os[NAME] = undefined;\\n _os[VERSION] = undefined;\\n rgxMapper.call(_os, _ua, _rgxmap.os);\\n return _os;\\n };\\n this.getResult = function () {\\n return {\\n ua : this.getUA(),\\n browser : this.getBrowser(),\\n engine : this.getEngine(),\\n os : this.getOS(),\\n device : this.getDevice(),\\n cpu : this.getCPU()\\n };\\n };\\n this.getUA = function () {\\n return _ua;\\n };\\n this.setUA = function (ua) {\\n _ua = (typeof ua === STR_TYPE && ua.length > UA_MAX_LENGTH) ? trim(ua, UA_MAX_LENGTH) : ua;\\n return this;\\n };\\n this.setUA(_ua);\\n return this;\\n };\\n\\n UAParser.VERSION = LIBVERSION;\\n UAParser.BROWSER = enumerize([NAME, VERSION, MAJOR]);\\n UAParser.CPU = enumerize([ARCHITECTURE]);\\n UAParser.DEVICE = enumerize([MODEL, VENDOR, TYPE, CONSOLE, MOBILE, SMARTTV, TABLET, WEARABLE, EMBEDDED]);\\n UAParser.ENGINE = UAParser.OS = enumerize([NAME, VERSION]);\\n\\n ///////////\\n // Export\\n //////////\\n\\n // check js environment\\n if (typeof(exports) !== UNDEF_TYPE) {\\n // nodejs env\\n if (typeof module !== UNDEF_TYPE && module.exports) {\\n exports = module.exports = UAParser;\\n }\\n exports.UAParser = UAParser;\\n } else {\\n // requirejs env (optional)\\n if (\\\"function\\\" === FUNC_TYPE && __webpack_require__(/*! !webpack amd options */ \\\"./node_modules/webpack/buildin/amd-options.js\\\")) {\\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\\n return UAParser;\\n }).call(exports, __webpack_require__, exports, module),\\n\\t\\t\\t\\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n } else if (typeof window !== UNDEF_TYPE) {\\n // browser env\\n window.UAParser = UAParser;\\n }\\n }\\n\\n // jQuery/Zepto specific (optional)\\n // Note:\\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\\n // and we should catch that.\\n var $ = typeof window !== UNDEF_TYPE && (window.jQuery || window.Zepto);\\n if ($ && !$.ua) {\\n var parser = new UAParser();\\n $.ua = parser.getResult();\\n $.ua.get = function () {\\n return parser.getUA();\\n };\\n $.ua.set = function (ua) {\\n parser.setUA(ua);\\n var result = parser.getResult();\\n for (var prop in result) {\\n $.ua[prop] = result[prop];\\n }\\n };\\n }\\n\\n})(typeof window === 'object' ? window : this);\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/ua-parser-js/src/ua-parser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/webpack/buildin/amd-options.js\":\n/*!****************************************!*\\\n !*** (webpack)/buildin/amd-options.js ***!\n \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */\\nmodule.exports = __webpack_amd_options__;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, {}))\\n\\n//# sourceURL=webpack://Liveness/(webpack)/buildin/amd-options.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/webpack/buildin/global.js\":\n/*!***********************************!*\\\n !*** (webpack)/buildin/global.js ***!\n \\***********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"var g;\\n\\n// This works in non-strict mode\\ng = (function() {\\n\\treturn this;\\n})();\\n\\ntry {\\n\\t// This works if eval is allowed (see CSP)\\n\\tg = g || new Function(\\\"return this\\\")();\\n} catch (e) {\\n\\t// This works if the window reference is available\\n\\tif (typeof window === \\\"object\\\") g = window;\\n}\\n\\n// g can still be undefined, but nothing to do about it...\\n// We return undefined, instead of nothing here, so it's\\n// easier to handle this case. if(!global) { ...}\\n\\nmodule.exports = g;\\n\\n\\n//# sourceURL=webpack://Liveness/(webpack)/buildin/global.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/yeast/index.js\":\n/*!*************************************!*\\\n !*** ./node_modules/yeast/index.js ***!\n \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nvar alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('')\\n , length = 64\\n , map = {}\\n , seed = 0\\n , i = 0\\n , prev;\\n\\n/**\\n * Return a string representing the specified number.\\n *\\n * @param {Number} num The number to convert.\\n * @returns {String} The string representation of the number.\\n * @api public\\n */\\nfunction encode(num) {\\n var encoded = '';\\n\\n do {\\n encoded = alphabet[num % length] + encoded;\\n num = Math.floor(num / length);\\n } while (num > 0);\\n\\n return encoded;\\n}\\n\\n/**\\n * Return the integer value specified by the given string.\\n *\\n * @param {String} str The string to convert.\\n * @returns {Number} The integer value represented by the string.\\n * @api public\\n */\\nfunction decode(str) {\\n var decoded = 0;\\n\\n for (i = 0; i < str.length; i++) {\\n decoded = decoded * length + map[str.charAt(i)];\\n }\\n\\n return decoded;\\n}\\n\\n/**\\n * Yeast: A tiny growing id generator.\\n *\\n * @returns {String} A unique id.\\n * @api public\\n */\\nfunction yeast() {\\n var now = encode(+new Date());\\n\\n if (now !== prev) return seed = 0, prev = now;\\n return now +'.'+ encode(seed++);\\n}\\n\\n//\\n// Map each character to its index.\\n//\\nfor (; i < length; i++) map[alphabet[i]] = i;\\n\\n//\\n// Expose the `yeast`, `encode` and `decode` functions.\\n//\\nyeast.encode = encode;\\nyeast.decode = decode;\\nmodule.exports = yeast;\\n\\n\\n//# sourceURL=webpack://Liveness/./node_modules/yeast/index.js?\");\n\n/***/ }),\n\n/***/ \"./src/client.js\":\n/*!***********************!*\\\n !*** ./src/client.js ***!\n \\***********************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"const { EventEmitter } = __webpack_require__(/*! events */ \\\"./node_modules/events/events.js\\\");\\nconst Media = __webpack_require__(/*! ./media */ \\\"./src/media.js\\\");\\n\\nclass Client {\\n constructor() {\\n this.media = new Media();\\n\\n this.socket = undefined;\\n this.observer = new EventEmitter();\\n\\n this.results = {};\\n this.detecting = {\\n face: false,\\n smile: false,\\n head_left: false,\\n head_right: false,\\n };\\n }\\n\\n /**\\n * Create a session.\\n * @param {String} wss\\n */\\n async createSession(wss, options = {}) {\\n return new Promise((resolve, reject) => {\\n this.media\\n .connect(wss, options)\\n .then((ws) => {\\n this.socket = ws;\\n this.media\\n .createSession()\\n .then((sessionId) => resolve(sessionId))\\n .catch(reject);\\n\\n this.socket.on('detect', (results) => {\\n this.results = this.formatResults(results);\\n });\\n\\n this.media.on('error', (error) => this.observer.emit('error', error));\\n this.socket.on('issue', (issue) => this.observer.emit('error', issue));\\n this.socket.on('restart', (iceParameters, callback) => {\\n this.media.engineTransport.restartIce({ iceParameters });\\n callback();\\n });\\n })\\n .catch((e) => {\\n if (e.message === 'Authentication') {\\n return reject({ code: 'E01', message: 'Authentication' });\\n }\\n reject(e);\\n });\\n });\\n }\\n\\n /**\\n * Detect emotions.\\n * @param {String} type\\n * @param {Number} timeout\\n */\\n async process(type, timeout = 8000) {\\n this.detecting[type] = true;\\n this.socket.emit('setDetect', true);\\n return new Promise((resovle) => {\\n const inter = setInterval(() => {\\n if (this.results[type] === '1') {\\n this.detecting[type] = false;\\n resovle(true);\\n this.socket.emit('setDetect', false);\\n clearInterval(inter);\\n }\\n }, 0);\\n setTimeout(() => {\\n if (this.detecting[type]) {\\n this.socket.emit('setDetect', false);\\n this.detecting[type] = false;\\n clearInterval(inter);\\n resovle(false);\\n }\\n }, timeout);\\n });\\n }\\n\\n /**\\n *\\n * @param {String} type\\n */\\n async detect(type, options = {}, redo = false) {\\n return new Promise((resolve, reject) => {\\n this.process(type, options.timeout || 8000).then(async (status) => {\\n if (status) {\\n resolve();\\n } else {\\n if (!redo && options.retry) {\\n if (options['onRepeat']) options.onRepeat();\\n return this.detect(type, options, true).then(resolve).catch(reject);\\n }\\n\\n reject();\\n }\\n });\\n });\\n }\\n\\n /**\\n * Close the session.\\n */\\n async close() {\\n return new Promise((resolve, reject) => {\\n this.media\\n .close()\\n .then(() => resolve())\\n .catch((e) => reject(e));\\n });\\n }\\n\\n /**\\n * Format results.\\n * @param {String} results\\n */\\n formatResults(results) {\\n return {\\n face: results[0],\\n smile: results[1],\\n head_right: results[2],\\n head_left: results[3],\\n };\\n }\\n}\\n\\nmodule.exports = Client;\\n\\n\\n//# sourceURL=webpack://Liveness/./src/client.js?\");\n\n/***/ }),\n\n/***/ \"./src/index.js\":\n/*!**********************!*\\\n !*** ./src/index.js ***!\n \\**********************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"const Liveness = __webpack_require__(/*! ./client */ \\\"./src/client.js\\\");\\nmodule.exports = new Liveness();\\n\\n// // const m = new Media({\\n// // localVideoEl: document.getElementById('videoInput'),\\n// // mediaConstraints: {},\\n// // });\\n\\n// function id(id) {\\n// return document.querySelector(id);\\n// }\\n\\n// // let results = {};\\n\\n// // function reset() {\\n// // id('#face').style.color = '#ff2525';\\n// // id('#left').style.color = '#ff2525';\\n// // id('#right').style.color = '#ff2525';\\n// // id('#smile').style.color = '#ff2525';\\n// // }\\n\\n// // document.getElementById('videoInput').style.opacity = 1;\\n\\n// const videoElement = document.getElementById('videoInput');\\n\\n// const rtc = new Client();\\n// // rtc.createSession('wss://scanrtc.com:8443', {\\n// rtc.createSession('wss://engine.au.staging.v3.liveness.idkit.io', {\\n// videoElement,\\n// auth: {\\n// session_id: '11e867f6-79e6-5cce-832a-3c01b1bf794e',\\n// tx_id: 'ec06d768-468f-577f-a0d3-ec0f1a31acab',\\n// },\\n// })\\n// .then((sessionId) => {\\n// id('#msg').style.color = 'white';\\n// console.log('sessionId', sessionId);\\n// const handleFail = () => {\\n// id('#msg').innerHTML = 'Failed';\\n// };\\n// const setText = (msg) => (id('#msg').innerHTML = msg);\\n// setText('Please postion your face.');\\n// rtc.detect('face', {\\n// onRepeat: () => setText('Please postion your face x2.'),\\n// })\\n// .then(() => {\\n// id('#msg').innerHTML = 'Thanks!';\\n\\n// setTimeout(() => {\\n// setText('Please give us a big smile.');\\n// rtc.detect('smile', {\\n// onRepeat: () => setText('Please give us a big smile x2.'),\\n// })\\n// .then(() => {\\n// id('#msg').innerHTML = 'Thanks!';\\n\\n// setTimeout(() => {\\n// setText('Please turn your head to the left.');\\n// rtc.detect('head_right', {\\n// onRepeat: () => setText('Please turn your head to the left x2.'),\\n// })\\n// .then(() => {\\n// id('#msg').innerHTML = 'Completed!';\\n// location.reload();\\n// })\\n// .catch(() => handleFail());\\n// }, 1000);\\n// })\\n// .catch(() => handleFail());\\n// }, 1000);\\n// })\\n// .catch(() => handleFail());\\n// })\\n// .catch((error) => {\\n// console.error(error);\\n// });\\n\\n\\n//# sourceURL=webpack://Liveness/./src/index.js?\");\n\n/***/ }),\n\n/***/ \"./src/media.js\":\n/*!**********************!*\\\n !*** ./src/media.js ***!\n \\**********************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"const mediasoupClient = __webpack_require__(/*! mediasoup-client */ \\\"./node_modules/mediasoup-client/lib/index.js\\\");\\nconst UAParser = __webpack_require__(/*! ua-parser-js */ \\\"./node_modules/ua-parser-js/src/ua-parser.js\\\");\\nconst { io } = __webpack_require__(/*! socket.io-client */ \\\"./node_modules/socket.io-client/build/esm/index.js\\\");\\n\\nclass Media {\\n constructor() {\\n /**\\n * Web socket model.\\n */\\n this.socket = null;\\n /**\\n * WebRTC producer transport.\\n */\\n this.producerTransport = [];\\n /**\\n * WebRTC device.\\n */\\n this.device = null;\\n /**\\n * Producers.\\n */\\n this.producers = new Map();\\n /**\\n * Map that contains a mediatype as key and producer_id as value\\n */\\n this.producerLabel = new Map();\\n /**\\n * Event Listeners.\\n */\\n this.eventListeners = new Map();\\n\\n this.engineTransport = {};\\n\\n ['started', 'closed', 'error'].forEach(\\n function (evt) {\\n this.eventListeners.set(evt, []);\\n }.bind(this),\\n );\\n }\\n\\n /**\\n * Connect to the server.\\n */\\n async connect(wss, options = {}) {\\n if (options['videoElement']) {\\n this.localVideoEl = options['videoElement'];\\n }\\n this.mediaConstraints = {};\\n if (options['mediaConstraints']) {\\n this.mediaConstraints = options['mediaConstraints'];\\n }\\n return new Promise(async (reslove, reject) => {\\n options.transports = ['websocket'];\\n this.socket = io(wss, {\\n ...options,\\n reconnection: true,\\n reconnectionDelay: 1000,\\n reconnectionDelayMax: 5000,\\n reconnectionAttempts: 5,\\n });\\n\\n /**\\n * A sample request function.\\n */\\n this.socket.request = async (type, data = {}) => {\\n return new Promise((resolve, reject) => {\\n this.socket.emit(type, data, (res) => {\\n if (res && res.error) {\\n reject(res.error);\\n } else {\\n resolve(res);\\n }\\n });\\n });\\n };\\n\\n this.socket.on('connect', async () => {\\n reslove(this.socket);\\n });\\n\\n this.socket.on('connect_error', (error) => {\\n reject(error);\\n this.socket.disconnect();\\n });\\n\\n this.socket.on('error', (error) => {\\n reject(error);\\n this.socket.disconnect();\\n });\\n\\n window.onbeforeunload = () => {\\n if (this.socket) {\\n this.socket.disconnect();\\n }\\n };\\n });\\n }\\n\\n /**\\n * Starts the call.\\n */\\n async createSession() {\\n return new Promise((resolve, reject) => {\\n this.socket\\n .request('createSession')\\n .then(async (sessionId) => {\\n try {\\n const data = await this.socket.request('getRouterRtpCapabilities');\\n const device = await this.loadDevice(data.rtpCapabilities);\\n this.device = device;\\n await this.getUserMedia(data.mediaConstraints);\\n await this.createAndProducer();\\n this.initSockets();\\n await this.socket.request('start');\\n resolve(sessionId);\\n } catch (error) {\\n reject(error);\\n }\\n })\\n .catch(reject);\\n });\\n }\\n\\n /**\\n * Create Transport and produce it.\\n */\\n async createAndProducer(restart = false) {\\n if (!restart) {\\n const transport = await this.createTransports();\\n await this.produce(transport);\\n } else {\\n if (this.engineTransport) this.engineTransport.close();\\n }\\n\\n const transport = await this.createTransports(true);\\n await this.produce(transport, true);\\n }\\n\\n /**\\n * Loads the device.\\n * @param {Object} routerRtpCapabilities\\n */\\n async loadDevice(routerRtpCapabilities) {\\n let device;\\n\\n try {\\n device = new mediasoupClient.Device();\\n } catch (error) {\\n throw new Error(error);\\n }\\n\\n const isSafariMobile = () => {\\n const uaParser = new UAParser();\\n const { name } = uaParser.getBrowser();\\n return name === 'Mobile Safari';\\n };\\n\\n if (isSafariMobile()) {\\n routerRtpCapabilities.headerExtensions = routerRtpCapabilities.headerExtensions.filter(\\n (ext) => ext.uri !== 'urn:3gpp:video-orientation',\\n );\\n }\\n\\n await device.load({\\n routerRtpCapabilities,\\n });\\n\\n return device;\\n }\\n\\n /**\\n * Init sockets events.\\n * @return {void}\\n */\\n initSockets() {}\\n\\n /**\\n * Initia transports.\\n */\\n async createTransports(isSecond) {\\n const producerData = await this.socket.request('createWebRtcTransport', {\\n forceTcp: false,\\n rtpCapabilities: this.device.rtpCapabilities,\\n isSecond,\\n });\\n\\n if (producerData.error) {\\n this.handleError(producerData.error);\\n throw new Error(producerData.error);\\n }\\n\\n const producerTransport = this.device.createSendTransport(producerData);\\n\\n producerTransport.on('connect', async ({ dtlsParameters }, callback, errback) => {\\n this.socket\\n .request('connectTransport', {\\n dtlsParameters,\\n transport_id: producerData.id,\\n isSecond,\\n })\\n .then(callback)\\n .catch(errback);\\n });\\n\\n producerTransport.on('produce', async ({ kind, rtpParameters }, callback, errback) => {\\n try {\\n const { producer_id } = await this.socket.request('produce', {\\n producerTransportId: producerTransport.id,\\n kind,\\n rtpParameters,\\n isSecond,\\n });\\n callback({\\n id: producer_id,\\n });\\n } catch (err) {\\n errback(err);\\n }\\n });\\n\\n producerTransport.on('connectionstatechange', (state) => {\\n if (state === 'failed') {\\n producerTransport.close();\\n }\\n });\\n\\n if (isSecond) {\\n this.engineTransport = producerTransport;\\n }\\n\\n this.producerTransport.push(producerTransport);\\n\\n return producerTransport;\\n }\\n\\n /**\\n * Init Producer Transport.\\n * @return {void}\\n */\\n async initProducerTransport(data) {\\n return data;\\n }\\n\\n /**\\n * Create a producer.\\n * @param {String} type\\n */\\n async produce(transport, isSecond) {\\n if (!this.device.canProduce('video')) {\\n const error = 'Cannot produce video.';\\n this.handleError(error);\\n throw new Error(error);\\n }\\n\\n try {\\n const videoTrack = this.stream.getVideoTracks()[0];\\n const audioTrack = this.stream.getAudioTracks()[0];\\n\\n const videoProducer = await transport.produce({\\n track: videoTrack,\\n });\\n\\n this.producers.set(videoProducer.id, videoProducer);\\n\\n this.producerEvent(videoProducer);\\n\\n if (!isSecond) {\\n this.localVideoEl.srcObject = this.stream;\\n\\n if (this.mediaConstraints.audio) {\\n const audioProducer = await transport.produce({\\n track: audioTrack,\\n });\\n this.producers.set(audioProducer.id, audioProducer);\\n this.producerEvent(audioProducer);\\n }\\n }\\n } catch (err) {\\n this.handleError(err);\\n throw new Error(err);\\n }\\n }\\n\\n /**\\n *\\n * @param {*} producer\\n */\\n producerEvent(producer) {\\n producer.on('trackended', () => {\\n this.closeProducer(producer);\\n });\\n\\n producer.on('transportclose', () => {\\n this.producers.delete(producer.id);\\n });\\n\\n producer.on('close', () => {\\n this.producers.delete(producer.id);\\n });\\n }\\n\\n /**\\n * Get or create user media.\\n */\\n async getUserMedia(constraints) {\\n this.stream = await navigator.mediaDevices.getUserMedia({\\n audio: constraints.audio,\\n video: {\\n ...this.mediaConstraints.video,\\n ...constraints.video,\\n },\\n });\\n\\n return this.stream;\\n }\\n\\n /**\\n * Close the producer.\\n * @param {Object} producer\\n */\\n closeProducer(producer) {\\n this.socket.emit('producerClosed', {\\n producerId: producer.id,\\n });\\n this.producers.get(producer.id).close();\\n this.producers.delete(producer.id);\\n }\\n\\n /**\\n * Exits the call.\\n * @param {Boolean} offline\\n */\\n async close() {\\n return new Promise(async (resovle, reject) => {\\n this._isOpen = false;\\n if (this.producerTransport) {\\n for (const transport of this.producerTransport) {\\n transport.close();\\n }\\n }\\n\\n try {\\n await this.socket.request('complete');\\n resovle();\\n if (this.socket) {\\n this.socket.off('disconnect');\\n this.socket.disconnect();\\n }\\n\\n this.event('closed');\\n } catch (e) {\\n console.error(e);\\n reject(e);\\n }\\n });\\n }\\n\\n /**\\n * Creates an event.\\n * @param {String} eventName\\n */\\n event(eventName, any = {}) {\\n if (this.eventListeners.has(eventName)) {\\n this.eventListeners.get(eventName).forEach((callback) => callback(any));\\n }\\n }\\n\\n /**\\n * The listener.\\n * @param {Strion} eventName\\n * @param {Object} callback\\n */\\n on(eventName, callback) {\\n if (callback) {\\n this.eventListeners.get(eventName).push(callback);\\n }\\n }\\n\\n /**\\n * Handles errors.\\n */\\n handleError(error) {\\n console.error(error);\\n this.event('error', error);\\n }\\n}\\n\\nmodule.exports = Media;\\n\\n\\n//# sourceURL=webpack://Liveness/./src/media.js?\");\n\n/***/ })\n\n/******/ });\n});"],"names":["factory","modules","installedModules","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","eval","__webpack_require__","__webpack_exports__"],"sourceRoot":""}