rnxsim 0.1.375 → 0.1.377

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 (295) hide show
  1. package/README.md +28 -25
  2. package/cli/app-config.ts +9 -12
  3. package/cli/app-fonts.ts +3 -3
  4. package/cli/app-project.ts +8 -8
  5. package/cli/auth.ts +7 -9
  6. package/cli/bin.ts +16 -31
  7. package/cli/bridge-flow-runner.ts +3 -3
  8. package/cli/browser-backend.ts +44 -0
  9. package/cli/command-contract.ts +221 -0
  10. package/cli/command-registry.ts +291 -0
  11. package/cli/commands/agent-wrapper.ts +2 -2
  12. package/cli/commands/app-fonts.ts +2 -2
  13. package/cli/commands/assert.ts +3 -3
  14. package/cli/commands/auth.ts +1 -1
  15. package/cli/commands/box/cloud-box.ts +1 -1
  16. package/cli/commands/box/plane-share.ts +2 -2
  17. package/cli/commands/box.ts +4 -6
  18. package/cli/commands/compat.ts +1 -1
  19. package/cli/commands/config.ts +2 -2
  20. package/cli/commands/control.ts +42 -28
  21. package/cli/commands/cpu-profile.ts +7 -7
  22. package/cli/commands/daemon-mac-app.ts +7 -7
  23. package/cli/commands/daemon.ts +10 -10
  24. package/cli/commands/debug.ts +11 -11
  25. package/cli/commands/detox.ts +13 -13
  26. package/cli/commands/diagnose.ts +6 -6
  27. package/cli/commands/do-chain.ts +1 -2
  28. package/cli/commands/electron.ts +1 -3
  29. package/cli/commands/film.ts +3 -3
  30. package/cli/commands/flow.ts +43 -43
  31. package/cli/commands/inspect/count.ts +1 -1
  32. package/cli/commands/inspect/describe.ts +1 -1
  33. package/cli/commands/inspect/env.ts +2 -2
  34. package/cli/commands/inspect/get-layout.ts +1 -1
  35. package/cli/commands/inspect/keyboard.ts +1 -1
  36. package/cli/commands/inspect/list.ts +1 -1
  37. package/cli/commands/inspect/memory.ts +1 -1
  38. package/cli/commands/inspect/resolve-target.ts +1 -1
  39. package/cli/commands/inspect/screens.ts +1 -1
  40. package/cli/commands/inspect/tree.ts +1 -1
  41. package/cli/commands/inspect/url.ts +1 -1
  42. package/cli/commands/inspect/wait-event.ts +5 -5
  43. package/cli/commands/inspect.ts +34 -34
  44. package/cli/commands/install-desktop.ts +3 -3
  45. package/cli/commands/login.ts +6 -6
  46. package/cli/commands/maestro-generate.ts +5 -5
  47. package/cli/commands/maestro.ts +5 -5
  48. package/cli/commands/profile.ts +1 -1
  49. package/cli/commands/record.ts +9 -9
  50. package/cli/commands/runtime.ts +18 -18
  51. package/cli/commands/screenshot-command.ts +1 -1
  52. package/cli/commands/screenshot-layers.ts +5 -5
  53. package/cli/commands/screenshot-mode.ts +1 -1
  54. package/cli/commands/screenshot.ts +8 -8
  55. package/cli/commands/screenshots-capture.ts +5 -5
  56. package/cli/commands/serve.ts +3 -3
  57. package/cli/commands/setup.ts +20 -12
  58. package/cli/commands/skills.ts +5 -5
  59. package/cli/commands/slides.ts +1 -1
  60. package/cli/commands/telemetry.ts +1 -1
  61. package/cli/commands/three-mode.ts +1 -1
  62. package/cli/commands/timeline.ts +8 -8
  63. package/cli/commands/upgrade.ts +116 -131
  64. package/cli/commands/upload.ts +12 -12
  65. package/cli/commands/version.ts +7 -7
  66. package/cli/commands/what-happened.ts +9 -9
  67. package/cli/current-sim.ts +3 -3
  68. package/cli/desktop-companion.ts +1 -1
  69. package/cli/drivers/playwright.ts +9 -9
  70. package/cli/drivers/registry.ts +1 -1
  71. package/cli/drivers/types.ts +1 -1
  72. package/cli/flow-file.ts +2 -2
  73. package/cli/flow-session.ts +1 -1
  74. package/cli/help-core.ts +136 -0
  75. package/cli/help.ts +17 -53
  76. package/cli/hints.ts +5 -5
  77. package/cli/inspect-notice-state.ts +1 -1
  78. package/cli/maestro-js.ts +1 -1
  79. package/cli/outbound-endpoints.ts +23 -5
  80. package/cli/parse-args.ts +19 -66
  81. package/cli/recording-access.ts +1 -1
  82. package/cli/registry.ts +1 -0
  83. package/cli/run-registry.ts +1 -1
  84. package/cli/run-rnx-core.ts +148 -0
  85. package/cli/run-rnx.ts +6 -9
  86. package/cli/runtime-notes.ts +3 -3
  87. package/cli/standalone.ts +4 -0
  88. package/cli/ws-bridge.ts +8 -8
  89. package/detox/config-loader.ts +2 -2
  90. package/detox/index.ts +8 -8
  91. package/detox/jest-preset.cjs +1 -1
  92. package/detox/navigation.ts +2 -2
  93. package/dist-lib/agent-daemon-client.cjs +5 -5
  94. package/dist-lib/agent-events.cjs +1 -1
  95. package/dist-lib/agent-identity.cjs +2 -2
  96. package/dist-lib/agent-sessions.cjs +10 -10
  97. package/dist-lib/attached-projects.cjs +6 -6
  98. package/dist-lib/auth/shared-session.cjs +6 -6
  99. package/dist-lib/backend-origin.cjs +1 -1
  100. package/dist-lib/beta.cjs +1 -1
  101. package/dist-lib/beta.mjs +1 -1
  102. package/dist-lib/bridge-constants.cjs +1 -1
  103. package/dist-lib/bridge-contract-input.cjs +1 -1
  104. package/dist-lib/bridge-contract-input.mjs +1 -1
  105. package/dist-lib/bridge-contract.cjs +1 -1
  106. package/dist-lib/bridge-contract.mjs +1 -1
  107. package/dist-lib/cli-constants.cjs +1 -1
  108. package/dist-lib/config.cjs +25 -25
  109. package/dist-lib/detox/index.cjs +9 -9
  110. package/dist-lib/detox/jest-preset.cjs +1 -1
  111. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  112. package/dist-lib/home-paths.cjs +29 -29
  113. package/dist-lib/host/bridge-host.cjs +274 -181
  114. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  117. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  118. package/dist-lib/host/websocket-proxy.cjs +1 -1
  119. package/dist-lib/index.cjs +14 -14
  120. package/dist-lib/jump-to-source-babel.cjs +1 -1
  121. package/dist-lib/menu.cjs +1 -1
  122. package/dist-lib/menu.mjs +1 -1
  123. package/dist-lib/metro-production-bundle.cjs +1 -1
  124. package/dist-lib/metro-production-bundle.mjs +1 -1
  125. package/dist-lib/metro.cjs +8 -8
  126. package/dist-lib/profiles.cjs +12 -12
  127. package/dist-lib/public-brand.cjs +1 -1
  128. package/dist-lib/react-native-host-modules.cjs +1 -1
  129. package/dist-lib/react-native-host-modules.mjs +1 -1
  130. package/dist-lib/render-mode.cjs +1 -1
  131. package/dist-lib/scripts/dev-server-scanner.cjs +25 -11
  132. package/dist-lib/sdk.cjs +1 -1
  133. package/dist-lib/sdk.mjs +1 -1
  134. package/dist-lib/skills.cjs +470 -322
  135. package/dist-lib/vite.cjs +9 -9
  136. package/package.json +4 -11
  137. package/scripts/dev-server-scanner.ts +25 -7
  138. package/scripts/optional-demo-registry.ts +1 -1
  139. package/skills/contrast/SKILL.md +3 -3
  140. package/skills/rnx-debug/SKILL.md +1 -1
  141. package/skills/rnx-test/SKILL.md +2 -2
  142. package/src/agent-identity.ts +1 -1
  143. package/src/agent-sessions.ts +7 -5
  144. package/src/cli-version.ts +12 -4
  145. package/src/config.ts +26 -28
  146. package/src/disk-cleanup.ts +11 -11
  147. package/src/home-paths.ts +28 -28
  148. package/src/host/bridge-host.ts +16 -16
  149. package/src/metro-plugin.ts +2 -2
  150. package/src/profiles.ts +2 -2
  151. package/src/runtime-assets.ts +7 -7
  152. package/src/runtime-delivery.ts +13 -13
  153. package/src/screenshots/orchestrate.ts +1 -1
  154. package/src/screenshots/schema.ts +2 -2
  155. package/src/skills/builtin/a11y-review.ts +2 -2
  156. package/src/skills/builtin/compat-check.ts +2 -2
  157. package/src/skills/builtin/maestro-test.ts +2 -2
  158. package/src/skills/builtin/perf-profile.ts +2 -2
  159. package/src/skills/builtin/screenshot-all.ts +2 -2
  160. package/src/skills/builtin/visual-diff.ts +2 -2
  161. package/src/skills/registry.ts +8 -8
  162. package/src/skills/types.ts +1 -1
  163. package/src/vite-plugin-one.ts +3 -3
  164. package/src/vite-plugin.ts +15 -2
  165. package/dist-cli/bin.js +0 -15
  166. package/dist-cli/chunks/agent-JJN7U6FR.js +0 -48
  167. package/dist-cli/chunks/agent-wrapper-AVVUJ3WF.js +0 -17
  168. package/dist-cli/chunks/app-fonts-QJ22CNAZ.js +0 -4
  169. package/dist-cli/chunks/assert-PZZKIY3K.js +0 -49
  170. package/dist-cli/chunks/auth-5AVDJO33.js +0 -12
  171. package/dist-cli/chunks/beta-PFRGP266.js +0 -4
  172. package/dist-cli/chunks/box-ILC2O7ZO.js +0 -1730
  173. package/dist-cli/chunks/camera-J3V62PP7.js +0 -33
  174. package/dist-cli/chunks/chunk-25KRGDZT.js +0 -4
  175. package/dist-cli/chunks/chunk-2BRBFLWA.js +0 -38
  176. package/dist-cli/chunks/chunk-2GXNAZHB.js +0 -74
  177. package/dist-cli/chunks/chunk-2IUMRRYV.js +0 -7
  178. package/dist-cli/chunks/chunk-4ALPWIMP.js +0 -10
  179. package/dist-cli/chunks/chunk-4CEZZKRY.js +0 -4
  180. package/dist-cli/chunks/chunk-4EUKOIAV.js +0 -4
  181. package/dist-cli/chunks/chunk-4IKE4YUS.js +0 -32
  182. package/dist-cli/chunks/chunk-4ZXR2M3D.js +0 -4
  183. package/dist-cli/chunks/chunk-5CGJFU27.js +0 -7
  184. package/dist-cli/chunks/chunk-5HHWECGT.js +0 -4
  185. package/dist-cli/chunks/chunk-5PZVYF42.js +0 -312
  186. package/dist-cli/chunks/chunk-7NCPUZ52.js +0 -27
  187. package/dist-cli/chunks/chunk-7OSIJCBR.js +0 -107
  188. package/dist-cli/chunks/chunk-AQ5TMOAI.js +0 -4
  189. package/dist-cli/chunks/chunk-BQCEI37V.js +0 -5
  190. package/dist-cli/chunks/chunk-C6B5FOP3.js +0 -4
  191. package/dist-cli/chunks/chunk-CCMZSHJB.js +0 -71
  192. package/dist-cli/chunks/chunk-CX7VCKAT.js +0 -14
  193. package/dist-cli/chunks/chunk-DQUPSAHE.js +0 -4
  194. package/dist-cli/chunks/chunk-DSD2UBZI.js +0 -4
  195. package/dist-cli/chunks/chunk-EWPAI4MO.js +0 -7
  196. package/dist-cli/chunks/chunk-EZXV6U2N.js +0 -497
  197. package/dist-cli/chunks/chunk-F5F7FIPM.js +0 -6
  198. package/dist-cli/chunks/chunk-FUTYK55H.js +0 -30
  199. package/dist-cli/chunks/chunk-FW6AN7I2.js +0 -3
  200. package/dist-cli/chunks/chunk-FZDRA7Z4.js +0 -4
  201. package/dist-cli/chunks/chunk-GDLE4NIV.js +0 -4
  202. package/dist-cli/chunks/chunk-GEX7RVHY.js +0 -5
  203. package/dist-cli/chunks/chunk-H4MYYOYJ.js +0 -5
  204. package/dist-cli/chunks/chunk-HEV7BAPE.js +0 -11
  205. package/dist-cli/chunks/chunk-HNDWYCND.js +0 -506
  206. package/dist-cli/chunks/chunk-HNPHODBD.js +0 -4
  207. package/dist-cli/chunks/chunk-HWDVC6YA.js +0 -11
  208. package/dist-cli/chunks/chunk-JOHJZUGG.js +0 -4
  209. package/dist-cli/chunks/chunk-JWUDT4QK.js +0 -5
  210. package/dist-cli/chunks/chunk-K7QQWKGE.js +0 -4
  211. package/dist-cli/chunks/chunk-LAOKTKT4.js +0 -4
  212. package/dist-cli/chunks/chunk-LD7I266X.js +0 -24
  213. package/dist-cli/chunks/chunk-LMHBU5LZ.js +0 -4
  214. package/dist-cli/chunks/chunk-LSOGXSDV.js +0 -535
  215. package/dist-cli/chunks/chunk-MP2GPO4T.js +0 -4
  216. package/dist-cli/chunks/chunk-MXJ2UWRV.js +0 -4
  217. package/dist-cli/chunks/chunk-OJNKRIZF.js +0 -15
  218. package/dist-cli/chunks/chunk-PBOWUNXO.js +0 -4
  219. package/dist-cli/chunks/chunk-PNRJFHX4.js +0 -4
  220. package/dist-cli/chunks/chunk-QJQOK34O.js +0 -28
  221. package/dist-cli/chunks/chunk-RLCQLMFF.js +0 -142
  222. package/dist-cli/chunks/chunk-S65CK3RI.js +0 -9
  223. package/dist-cli/chunks/chunk-SWBUNMQS.js +0 -4
  224. package/dist-cli/chunks/chunk-SXBFGGAM.js +0 -4
  225. package/dist-cli/chunks/chunk-T4ISWS5H.js +0 -4
  226. package/dist-cli/chunks/chunk-TPPVAA7Z.js +0 -5
  227. package/dist-cli/chunks/chunk-USM3P74H.js +0 -4
  228. package/dist-cli/chunks/chunk-V4EJJHF5.js +0 -4
  229. package/dist-cli/chunks/chunk-V7RGRZOL.js +0 -423
  230. package/dist-cli/chunks/chunk-XUBV77WH.js +0 -130
  231. package/dist-cli/chunks/chunk-XYSDYGKC.js +0 -4
  232. package/dist-cli/chunks/chunk-YNHRSDVG.js +0 -5
  233. package/dist-cli/chunks/chunk-YX52RJKO.js +0 -4
  234. package/dist-cli/chunks/chunk-Z5O5H4O7.js +0 -99
  235. package/dist-cli/chunks/chunk-Z6LOIW46.js +0 -7
  236. package/dist-cli/chunks/chunk-ZXFVBYJY.js +0 -5
  237. package/dist-cli/chunks/cleanup-KPUW4SFK.js +0 -25
  238. package/dist-cli/chunks/cli-version-APGT6GAT.js +0 -4
  239. package/dist-cli/chunks/compat-XXRFD2TW.js +0 -23
  240. package/dist-cli/chunks/config-DDMFDQ7F.js +0 -13
  241. package/dist-cli/chunks/connect-IPG47YXM.js +0 -4
  242. package/dist-cli/chunks/control-O22Z3UJ5.js +0 -4
  243. package/dist-cli/chunks/daemon-PADUIMJV.js +0 -4
  244. package/dist-cli/chunks/debug-MYIP46TM.js +0 -200
  245. package/dist-cli/chunks/desktop-ENFFBQAA.js +0 -31
  246. package/dist-cli/chunks/detox-J5WVK6OH.js +0 -52
  247. package/dist-cli/chunks/device-RAVQVL75.js +0 -18
  248. package/dist-cli/chunks/diagnose-PJMPXKJY.js +0 -43
  249. package/dist-cli/chunks/disk-cleanup-YLAY445J.js +0 -4
  250. package/dist-cli/chunks/do-chain-UBE7GIOU.js +0 -5
  251. package/dist-cli/chunks/drivers-ZFNX3T5Z.js +0 -4
  252. package/dist-cli/chunks/env-Y5XJSNRD.js +0 -4
  253. package/dist-cli/chunks/film-W3V6VURB.js +0 -74
  254. package/dist-cli/chunks/flow-VMLI7BYM.js +0 -4
  255. package/dist-cli/chunks/help-PKZCWHJJ.js +0 -4
  256. package/dist-cli/chunks/hidden-runtime-alias-S5DJ7EDF.js +0 -4
  257. package/dist-cli/chunks/home-paths-5O4IZPYV.js +0 -4
  258. package/dist-cli/chunks/inspect-LT4MXK37.js +0 -4
  259. package/dist-cli/chunks/install-desktop-EXCFMXFS.js +0 -4
  260. package/dist-cli/chunks/login-V6TZ54ZH.js +0 -26
  261. package/dist-cli/chunks/logout-SPMLFWYA.js +0 -4
  262. package/dist-cli/chunks/maestro-5ISTBAZE.js +0 -108
  263. package/dist-cli/chunks/maestro-generate-WUI64NHR.js +0 -36
  264. package/dist-cli/chunks/mode-QPNBYXUF.js +0 -26
  265. package/dist-cli/chunks/optional-demo-registry-CBSYF4CG.js +0 -4
  266. package/dist-cli/chunks/perf-T6N5PVYV.js +0 -48
  267. package/dist-cli/chunks/permissions-YZ7RRSZJ.js +0 -13
  268. package/dist-cli/chunks/platform-XDQAA72X.js +0 -6
  269. package/dist-cli/chunks/privacy-54FIGXLT.js +0 -4
  270. package/dist-cli/chunks/record-QGYXRUKP.js +0 -72
  271. package/dist-cli/chunks/report-issue-VUUTGX7V.js +0 -29
  272. package/dist-cli/chunks/reset-CGO52KBW.js +0 -4
  273. package/dist-cli/chunks/resolve-target-NNQCALDM.js +0 -4
  274. package/dist-cli/chunks/runtime-4EP6YJVL.js +0 -4
  275. package/dist-cli/chunks/screenshot-command-NZCMSJ4P.js +0 -159
  276. package/dist-cli/chunks/screenshot-layers-VMTQ6XIU.js +0 -20
  277. package/dist-cli/chunks/screenshots-capture-K3MWIDBK.js +0 -42
  278. package/dist-cli/chunks/serve-QJRIB2BV.js +0 -56
  279. package/dist-cli/chunks/setup-6XXEJQVF.js +0 -4
  280. package/dist-cli/chunks/sim-client-5YUVL45C.js +0 -4
  281. package/dist-cli/chunks/skills-T3CS7CXK.js +0 -50
  282. package/dist-cli/chunks/state-AJC3VK3G.js +0 -14
  283. package/dist-cli/chunks/storage-KVGZKC3Y.js +0 -37
  284. package/dist-cli/chunks/store-AWUMOQUH.js +0 -4
  285. package/dist-cli/chunks/telemetry-W5ZDGWK6.js +0 -4
  286. package/dist-cli/chunks/timeline-DXDCAZUA.js +0 -24
  287. package/dist-cli/chunks/upgrade-SRPTJACU.js +0 -7
  288. package/dist-cli/chunks/upload-ZDV4BFED.js +0 -4
  289. package/dist-cli/chunks/version-SOLPSBMG.js +0 -6
  290. package/dist-cli/chunks/web-RT75LD7A.js +0 -4
  291. package/dist-cli/chunks/welcome-IJ55EC7U.js +0 -5
  292. package/dist-cli/chunks/what-happened-CEIWJIWK.js +0 -25
  293. package/dist-cli/chunks/ws-bridge-YK5R3HOI.js +0 -4
  294. package/scripts/postinstall.cjs +0 -3
  295. package/scripts/preuninstall.cjs +0 -118
@@ -1,14 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as kt,c as Er}from"./chunk-4ZXR2M3D.js";import{a as vr}from"./chunk-MP2GPO4T.js";import{a as Du,b as M,d as yu}from"./chunk-DQUPSAHE.js";var xr=M(ut=>{"use strict";ut.byteLength=Au;ut.toByteArray=vu;ut.fromByteArray=Nu;var Y=[],W=[],bu=typeof Uint8Array<"u"?Uint8Array:Array,Ut="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(he=0,Fr=Ut.length;he<Fr;++he)Y[he]=Ut[he],W[Ut.charCodeAt(he)]=he;var he,Fr;W[45]=62;W[95]=63;function Mr(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function Au(e){var t=Mr(e),r=t[0],i=t[1];return(r+i)*3/4-i}function Eu(e,t,r){return(t+r)*3/4-r}function vu(e){var t,r=Mr(e),i=r[0],n=r[1],s=new bu(Eu(e,i,n)),u=0,c=n>0?i-4:i,a;for(a=0;a<c;a+=4)t=W[e.charCodeAt(a)]<<18|W[e.charCodeAt(a+1)]<<12|W[e.charCodeAt(a+2)]<<6|W[e.charCodeAt(a+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=t&255;return n===2&&(t=W[e.charCodeAt(a)]<<2|W[e.charCodeAt(a+1)]>>4,s[u++]=t&255),n===1&&(t=W[e.charCodeAt(a)]<<10|W[e.charCodeAt(a+1)]<<4|W[e.charCodeAt(a+2)]>>2,s[u++]=t>>8&255,s[u++]=t&255),s}function Cu(e){return Y[e>>18&63]+Y[e>>12&63]+Y[e>>6&63]+Y[e&63]}function Tu(e,t,r){for(var i,n=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),n.push(Cu(i));return n.join("")}function Nu(e){for(var t,r=e.length,i=r%3,n=[],s=16383,u=0,c=r-i;u<c;u+=s)n.push(Tu(e,u,u+s>c?c:u+s));return i===1?(t=e[r-1],n.push(Y[t>>2]+Y[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(Y[t>>10]+Y[t>>4&63]+Y[t<<2&63]+"=")),n.join("")}});var Z=M((Br,se)=>{(function(){var e,t,r,i,n,s,u,c={}.hasOwnProperty;e=function(a,...d){var m,p,g,w;if(n(Object.assign))Object.assign.apply(null,arguments);else for(m=0,g=d.length;m<g;m++)if(w=d[m],w!=null)for(p in w)c.call(w,p)&&(a[p]=w[p]);return a},n=function(a){return!!a&&Object.prototype.toString.call(a)==="[object Function]"},s=function(a){var d;return!!a&&((d=typeof a)=="function"||d==="object")},r=function(a){return n(Array.isArray)?Array.isArray(a):Object.prototype.toString.call(a)==="[object Array]"},i=function(a){var d;if(r(a))return!a.length;for(d in a)if(c.call(a,d))return!1;return!0},u=function(a){var d,m;return s(a)&&(m=Object.getPrototypeOf(a))&&(d=m.constructor)&&typeof d=="function"&&d instanceof d&&Function.prototype.toString.call(d)===Function.prototype.toString.call(Object)},t=function(a){return n(a.valueOf)?a.valueOf():a},se.exports.assign=e,se.exports.isFunction=n,se.exports.isObject=s,se.exports.isArray=r,se.exports.isEmpty=i,se.exports.isPlainObject=u,se.exports.getValue=t}).call(Br)});var jt=M((Pr,Rr)=>{(function(){var e;Rr.exports=e=class{hasFeature(r,i){return!0}createDocumentType(r,i,n){throw new Error("This DOM method is not implemented.")}createDocument(r,i,n){throw new Error("This DOM method is not implemented.")}createHTMLDocument(r){throw new Error("This DOM method is not implemented.")}getFeature(r,i){throw new Error("This DOM method is not implemented.")}}}).call(Pr)});var _r=M((qr,kr)=>{(function(){var e;kr.exports=e=class{constructor(){}handleError(r){throw new Error(r)}}}).call(qr)});var Xr=M((Ur,jr)=>{(function(){var e;jr.exports=e=(function(){class t{constructor(i){this.arr=i||[]}item(i){return this.arr[i]||null}contains(i){return this.arr.indexOf(i)!==-1}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.arr.length}}),t}).call(this)}).call(Ur)});var Hr=M((Vr,$r)=>{(function(){var e,t,r;t=_r(),r=Xr(),$r.exports=e=(function(){class i{constructor(){var s;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new t,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=s=Object.create(this.defaultParams)}getParameter(s){return this.params.hasOwnProperty(s)?this.params[s]:null}canSetParameter(s,u){return!0}setParameter(s,u){return u!=null?this.params[s]=u:delete this.params[s]}}return Object.defineProperty(i.prototype,"parameterNames",{get:function(){return new r(Object.keys(this.defaultParams))}}),i}).call(this)}).call(Vr)});var q=M((Gr,zr)=>{(function(){zr.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(Gr)});var Xt=M((Wr,Kr)=>{(function(){var e,t,r;e=q(),r=z(),Kr.exports=t=(function(){class i{constructor(s,u,c){if(this.parent=s,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),u==null)throw new Error("Missing attribute name. "+this.debugInfo(u));this.name=this.stringify.name(u),this.value=this.stringify.attValue(c),this.type=e.Attribute,this.isId=!1,this.schemaTypeInfo=null}clone(){return Object.create(this)}toString(s){return this.options.writer.attribute(this,this.options.writer.filterOptions(s))}debugInfo(s){return s=s||this.name,s==null?"parent: <"+this.parent.name+">":"attribute: {"+s+"}, parent: <"+this.parent.name+">"}isEqualNode(s){return!(s.namespaceURI!==this.namespaceURI||s.prefix!==this.prefix||s.localName!==this.localName||s.value!==this.value)}}return Object.defineProperty(i.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(i.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(i.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(i.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(i.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(i.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"specified",{get:function(){return!0}}),i}).call(this)}).call(Wr)});var st=M((Yr,Zr)=>{(function(){var e;Zr.exports=e=(function(){class t{constructor(i){this.nodes=i}clone(){return this.nodes=null}getNamedItem(i){return this.nodes[i]}setNamedItem(i){var n;return n=this.nodes[i.nodeName],this.nodes[i.nodeName]=i,n||null}removeNamedItem(i){var n;return n=this.nodes[i],delete this.nodes[i],n||null}item(i){return this.nodes[Object.keys(this.nodes)[i]]||null}getNamedItemNS(i,n){throw new Error("This DOM method is not implemented.")}setNamedItemNS(i){throw new Error("This DOM method is not implemented.")}removeNamedItemNS(i,n){throw new Error("This DOM method is not implemented.")}}return Object.defineProperty(t.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),t}).call(this)}).call(Yr)});var ot=M((Jr,Qr)=>{(function(){var e,t,r,i,n,s,u,c,a={}.hasOwnProperty;({isObject:c,isFunction:u,getValue:s}=Z()),n=z(),e=q(),t=Xt(),i=st(),Qr.exports=r=(function(){class d extends n{constructor(p,g,w){var v,T,C,S;if(super(p),g==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(g),this.type=e.Element,this.attribs={},this.schemaTypeInfo=null,w!=null&&this.attribute(w),p.type===e.Document&&(this.isRoot=!0,this.documentObject=p,p.rootObject=this,p.children)){for(S=p.children,T=0,C=S.length;T<C;T++)if(v=S[T],v.type===e.DocType){v.name=this.name;break}}}clone(){var p,g,w,v;w=Object.create(this),w.isRoot&&(w.documentObject=null),w.attribs={},v=this.attribs;for(g in v)a.call(v,g)&&(p=v[g],w.attribs[g]=p.clone());return w.children=[],this.children.forEach(function(T){var C;return C=T.clone(),C.parent=w,w.children.push(C)}),w}attribute(p,g){var w,v;if(p!=null&&(p=s(p)),c(p))for(w in p)a.call(p,w)&&(v=p[w],this.attribute(w,v));else u(g)&&(g=g.apply()),this.options.keepNullAttributes&&g==null?this.attribs[p]=new t(this,p,""):g!=null&&(this.attribs[p]=new t(this,p,g));return this}removeAttribute(p){var g,w,v;if(p==null)throw new Error("Missing attribute name. "+this.debugInfo());if(p=s(p),Array.isArray(p))for(w=0,v=p.length;w<v;w++)g=p[w],delete this.attribs[g];else delete this.attribs[p];return this}toString(p){return this.options.writer.element(this,this.options.writer.filterOptions(p))}att(p,g){return this.attribute(p,g)}a(p,g){return this.attribute(p,g)}getAttribute(p){return this.attribs.hasOwnProperty(p)?this.attribs[p].value:null}setAttribute(p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNode(p){return this.attribs.hasOwnProperty(p)?this.attribs[p]:null}setAttributeNode(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeAttributeNode(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNS(p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}setAttributeNS(p,g,w){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeAttributeNS(p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNodeNS(p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}setAttributeNodeNS(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasAttribute(p){return this.attribs.hasOwnProperty(p)}hasAttributeNS(p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}setIdAttribute(p,g){return this.attribs.hasOwnProperty(p)?this.attribs[p].isId:g}setIdAttributeNS(p,g,w){throw new Error("This DOM method is not implemented."+this.debugInfo())}setIdAttributeNode(p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByClassName(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(p){var g,w,v;if(!super.isEqualNode(p)||p.namespaceURI!==this.namespaceURI||p.prefix!==this.prefix||p.localName!==this.localName||p.attribs.length!==this.attribs.length)return!1;for(g=w=0,v=this.attribs.length-1;0<=v?w<=v:w>=v;g=0<=v?++w:--w)if(!this.attribs[g].isEqualNode(p.attribs[g]))return!1;return!0}}return Object.defineProperty(d.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(d.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(d.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(d.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(d.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new i(this.attribs)),this.attributeMap}}),d}).call(this)}).call(Jr)});var Le=M((en,tn)=>{(function(){var e,t;t=z(),tn.exports=e=(function(){class r extends t{constructor(n){super(n),this.value=""}clone(){return Object.create(this)}substringData(n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendData(n){throw new Error("This DOM method is not implemented."+this.debugInfo())}insertData(n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())}deleteData(n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceData(n,s,u){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(n){return!(!super.isEqualNode(n)||n.data!==this.data)}}return Object.defineProperty(r.prototype,"data",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(r.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(r.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),r}).call(this)}).call(en)});var at=M((rn,nn)=>{(function(){var e,t,r;e=q(),r=Le(),nn.exports=t=class extends r{constructor(n,s){if(super(n),s==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=e.CData,this.value=this.stringify.cdata(s)}clone(){return Object.create(this)}toString(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))}}}).call(rn)});var lt=M((un,sn)=>{(function(){var e,t,r;e=q(),t=Le(),sn.exports=r=class extends t{constructor(n,s){if(super(n),s==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=e.Comment,this.value=this.stringify.comment(s)}clone(){return Object.create(this)}toString(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))}}}).call(un)});var ct=M((on,an)=>{(function(){var e,t,r,i;({isObject:i}=Z()),r=z(),e=q(),an.exports=t=class extends r{constructor(s,u,c,a){super(s),i(u)&&({version:u,encoding:c,standalone:a}=u),u||(u="1.0"),this.type=e.Declaration,this.version=this.stringify.xmlVersion(u),c!=null&&(this.encoding=this.stringify.xmlEncoding(c)),a!=null&&(this.standalone=this.stringify.xmlStandalone(a))}toString(s){return this.options.writer.declaration(this,this.options.writer.filterOptions(s))}}}).call(on)});var ht=M((ln,cn)=>{(function(){var e,t,r;r=z(),e=q(),cn.exports=t=class extends r{constructor(n,s,u,c,a,d){if(super(n),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(u==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(s));if(!c)throw new Error("Missing DTD attribute type. "+this.debugInfo(s));if(!a)throw new Error("Missing DTD attribute default. "+this.debugInfo(s));if(a.indexOf("#")!==0&&(a="#"+a),!a.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(s));if(d&&!a.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(s));this.elementName=this.stringify.name(s),this.type=e.AttributeDeclaration,this.attributeName=this.stringify.name(u),this.attributeType=this.stringify.dtdAttType(c),d&&(this.defaultValue=this.stringify.dtdAttDefault(d)),this.defaultValueType=a}toString(n){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(n))}}}).call(ln)});var ft=M((hn,fn)=>{(function(){var e,t,r,i;({isObject:i}=Z()),r=z(),e=q(),fn.exports=t=(function(){class n extends r{constructor(u,c,a,d){if(super(u),a==null)throw new Error("Missing DTD entity name. "+this.debugInfo(a));if(d==null)throw new Error("Missing DTD entity value. "+this.debugInfo(a));if(this.pe=!!c,this.name=this.stringify.name(a),this.type=e.EntityDeclaration,!i(d))this.value=this.stringify.dtdEntityValue(d),this.internal=!0;else{if(!d.pubID&&!d.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(a));if(d.pubID&&!d.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(a));if(this.internal=!1,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID)),d.nData!=null&&(this.nData=this.stringify.dtdNData(d.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(a))}}toString(u){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(u))}}return Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(n.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(n.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlVersion",{get:function(){return null}}),n}).call(this)}).call(hn)});var pt=M((pn,dn)=>{(function(){var e,t,r;r=z(),e=q(),dn.exports=t=class extends r{constructor(n,s,u){if(super(n),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());u||(u="(#PCDATA)"),Array.isArray(u)&&(u="("+u.join(",")+")"),this.name=this.stringify.name(s),this.type=e.ElementDeclaration,this.value=this.stringify.dtdElementValue(u)}toString(n){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(n))}}}).call(pn)});var dt=M((mn,gn)=>{(function(){var e,t,r;r=z(),e=q(),gn.exports=t=(function(){class i extends r{constructor(s,u,c){if(super(s),u==null)throw new Error("Missing DTD notation name. "+this.debugInfo(u));if(!c.pubID&&!c.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(u));this.name=this.stringify.name(u),this.type=e.NotationDeclaration,c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID))}toString(s){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(s))}}return Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),i}).call(this)}).call(mn)});var mt=M((Dn,yn)=>{(function(){var e,t,r,i,n,s,u,c,a;({isObject:a}=Z()),c=z(),e=q(),t=ht(),i=ft(),r=pt(),n=dt(),u=st(),yn.exports=s=(function(){class d extends c{constructor(p,g,w){var v,T,C,S;if(super(p),this.type=e.DocType,p.children){for(S=p.children,T=0,C=S.length;T<C;T++)if(v=S[T],v.type===e.Element){this.name=v.name;break}}this.documentObject=p,a(g)&&({pubID:g,sysID:w}=g),w==null&&([w,g]=[g,w]),g!=null&&(this.pubID=this.stringify.dtdPubID(g)),w!=null&&(this.sysID=this.stringify.dtdSysID(w))}element(p,g){var w;return w=new r(this,p,g),this.children.push(w),this}attList(p,g,w,v,T){var C;return C=new t(this,p,g,w,v,T),this.children.push(C),this}entity(p,g){var w;return w=new i(this,!1,p,g),this.children.push(w),this}pEntity(p,g){var w;return w=new i(this,!0,p,g),this.children.push(w),this}notation(p,g){var w;return w=new n(this,p,g),this.children.push(w),this}toString(p){return this.options.writer.docType(this,this.options.writer.filterOptions(p))}ele(p,g){return this.element(p,g)}att(p,g,w,v,T){return this.attList(p,g,w,v,T)}ent(p,g){return this.entity(p,g)}pent(p,g){return this.pEntity(p,g)}not(p,g){return this.notation(p,g)}up(){return this.root()||this.documentObject}isEqualNode(p){return!(!super.isEqualNode(p)||p.name!==this.name||p.publicId!==this.publicId||p.systemId!==this.systemId)}}return Object.defineProperty(d.prototype,"entities",{get:function(){var m,p,g,w,v;for(w={},v=this.children,p=0,g=v.length;p<g;p++)m=v[p],m.type===e.EntityDeclaration&&!m.pe&&(w[m.name]=m);return new u(w)}}),Object.defineProperty(d.prototype,"notations",{get:function(){var m,p,g,w,v;for(w={},v=this.children,p=0,g=v.length;p<g;p++)m=v[p],m.type===e.NotationDeclaration&&(w[m.name]=m);return new u(w)}}),Object.defineProperty(d.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(d.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(d.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),d}).call(this)}).call(Dn)});var gt=M((wn,bn)=>{(function(){var e,t,r;e=q(),t=z(),bn.exports=r=class extends t{constructor(n,s){if(super(n),s==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=e.Raw,this.value=this.stringify.raw(s)}clone(){return Object.create(this)}toString(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))}}}).call(wn)});var Dt=M((An,En)=>{(function(){var e,t,r;e=q(),t=Le(),En.exports=r=(function(){class i extends t{constructor(s,u){if(super(s),u==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=e.Text,this.value=this.stringify.text(u)}clone(){return Object.create(this)}toString(s){return this.options.writer.text(this,this.options.writer.filterOptions(s))}splitText(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceWholeText(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}}return Object.defineProperty(i.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"wholeText",{get:function(){var n,s,u;for(u="",s=this.previousSibling;s;)u=s.data+u,s=s.previousSibling;for(u+=this.data,n=this.nextSibling;n;)u=u+n.data,n=n.nextSibling;return u}}),i}).call(this)}).call(An)});var yt=M((vn,Cn)=>{(function(){var e,t,r;e=q(),t=Le(),Cn.exports=r=class extends t{constructor(n,s,u){if(super(n),s==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=e.ProcessingInstruction,this.target=this.stringify.insTarget(s),this.name=this.target,u&&(this.value=this.stringify.insValue(u))}clone(){return Object.create(this)}toString(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))}isEqualNode(n){return!(!super.isEqualNode(n)||n.target!==this.target)}}}).call(vn)});var Vt=M((Tn,Nn)=>{(function(){var e,t,r;r=z(),e=q(),Nn.exports=t=class extends r{constructor(n){super(n),this.type=e.Dummy}clone(){return Object.create(this)}toString(n){return""}}}).call(Tn)});var In=M((Sn,On)=>{(function(){var e;On.exports=e=(function(){class t{constructor(i){this.nodes=i}clone(){return this.nodes=null}item(i){return this.nodes[i]||null}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length||0}}),t}).call(this)}).call(Sn)});var Mn=M((Ln,Fn)=>{(function(){Fn.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(Ln)});var z=M((xn,Bn)=>{(function(){var e,t,r,i,n,s,u,c,a,d,m,p,g,w,v,T,C,S,x={}.hasOwnProperty,f=[].splice;({isObject:S,isFunction:C,isEmpty:T,getValue:v}=Z()),c=null,r=null,i=null,n=null,s=null,g=null,w=null,p=null,u=null,t=null,m=null,a=null,e=null,Bn.exports=d=(function(){class h{constructor(o){this.parent=o,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=ot(),r=at(),i=lt(),n=ct(),s=mt(),g=gt(),w=Dt(),p=yt(),u=Vt(),t=q(),m=In(),a=st(),e=Mn())}setParent(o){var D,E,l,y,A;for(this.parent=o,o&&(this.options=o.options,this.stringify=o.stringify),y=this.children,A=[],E=0,l=y.length;E<l;E++)D=y[E],A.push(D.setParent(this));return A}element(o,D,E){var l,y,A,N,I,L,k,F,O;if(L=null,D===null&&E==null&&([D,E]=[{},null]),D==null&&(D={}),D=v(D),S(D)||([E,D]=[D,E]),o!=null&&(o=v(o)),Array.isArray(o))for(A=0,k=o.length;A<k;A++)y=o[A],L=this.element(y);else if(C(o))L=this.element(o.apply());else if(S(o)){for(I in o)if(x.call(o,I))if(O=o[I],C(O)&&(O=O.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&I.indexOf(this.stringify.convertAttKey)===0)L=this.attribute(I.substr(this.stringify.convertAttKey.length),O);else if(!this.options.separateArrayItems&&Array.isArray(O)&&T(O))L=this.dummy();else if(S(O)&&T(O))L=this.element(I);else if(!this.options.keepNullNodes&&O==null)L=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(O))for(N=0,F=O.length;N<F;N++)y=O[N],l={},l[I]=y,L=this.element(l);else S(O)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&I.indexOf(this.stringify.convertTextKey)===0?L=this.element(O):(L=this.element(I),L.element(O)):L=this.element(I,O)}else!this.options.keepNullNodes&&E===null?L=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&o.indexOf(this.stringify.convertTextKey)===0?L=this.text(E):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&o.indexOf(this.stringify.convertCDataKey)===0?L=this.cdata(E):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&o.indexOf(this.stringify.convertCommentKey)===0?L=this.comment(E):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&o.indexOf(this.stringify.convertRawKey)===0?L=this.raw(E):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&o.indexOf(this.stringify.convertPIKey)===0?L=this.instruction(o.substr(this.stringify.convertPIKey.length),E):L=this.node(o,D,E);if(L==null)throw new Error("Could not create any elements with: "+o+". "+this.debugInfo());return L}insertBefore(o,D,E){var l,y,A,N,I;if(o?.type)return A=o,N=D,A.setParent(this),N?(y=children.indexOf(N),I=children.splice(y),children.push(A),Array.prototype.push.apply(children,I)):children.push(A),A;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(o));return y=this.parent.children.indexOf(this),I=this.parent.children.splice(y),l=this.parent.element(o,D,E),Array.prototype.push.apply(this.parent.children,I),l}insertAfter(o,D,E){var l,y,A;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(o));return y=this.parent.children.indexOf(this),A=this.parent.children.splice(y+1),l=this.parent.element(o,D,E),Array.prototype.push.apply(this.parent.children,A),l}remove(){var o,D;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return o=this.parent.children.indexOf(this),f.apply(this.parent.children,[o,o-o+1].concat(D=[])),this.parent}node(o,D,E){var l;return o!=null&&(o=v(o)),D||(D={}),D=v(D),S(D)||([E,D]=[D,E]),l=new c(this,o,D),E!=null&&l.text(E),this.children.push(l),l}text(o){var D;return S(o)&&this.element(o),D=new w(this,o),this.children.push(D),this}cdata(o){var D;return D=new r(this,o),this.children.push(D),this}comment(o){var D;return D=new i(this,o),this.children.push(D),this}commentBefore(o){var D,E,l;return E=this.parent.children.indexOf(this),l=this.parent.children.splice(E),D=this.parent.comment(o),Array.prototype.push.apply(this.parent.children,l),this}commentAfter(o){var D,E,l;return E=this.parent.children.indexOf(this),l=this.parent.children.splice(E+1),D=this.parent.comment(o),Array.prototype.push.apply(this.parent.children,l),this}raw(o){var D;return D=new g(this,o),this.children.push(D),this}dummy(){var o;return o=new u(this),o}instruction(o,D){var E,l,y,A,N;if(o!=null&&(o=v(o)),D!=null&&(D=v(D)),Array.isArray(o))for(A=0,N=o.length;A<N;A++)E=o[A],this.instruction(E);else if(S(o))for(E in o)x.call(o,E)&&(l=o[E],this.instruction(E,l));else C(D)&&(D=D.apply()),y=new p(this,o,D),this.children.push(y);return this}instructionBefore(o,D){var E,l,y;return l=this.parent.children.indexOf(this),y=this.parent.children.splice(l),E=this.parent.instruction(o,D),Array.prototype.push.apply(this.parent.children,y),this}instructionAfter(o,D){var E,l,y;return l=this.parent.children.indexOf(this),y=this.parent.children.splice(l+1),E=this.parent.instruction(o,D),Array.prototype.push.apply(this.parent.children,y),this}declaration(o,D,E){var l,y;return l=this.document(),y=new n(l,o,D,E),l.children.length===0?l.children.unshift(y):l.children[0].type===t.Declaration?l.children[0]=y:l.children.unshift(y),l.root()||l}dtd(o,D){var E,l,y,A,N,I,L,k,F,O;for(l=this.document(),y=new s(l,o,D),F=l.children,A=N=0,L=F.length;N<L;A=++N)if(E=F[A],E.type===t.DocType)return l.children[A]=y,y;for(O=l.children,A=I=0,k=O.length;I<k;A=++I)if(E=O[A],E.isRoot)return l.children.splice(A,0,y),y;return l.children.push(y),y}up(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent}root(){var o;for(o=this;o;){if(o.type===t.Document)return o.rootObject;if(o.isRoot)return o;o=o.parent}}document(){var o;for(o=this;o;){if(o.type===t.Document)return o;o=o.parent}}end(o){return this.document().end(o)}prev(){var o;if(o=this.parent.children.indexOf(this),o<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[o-1]}next(){var o;if(o=this.parent.children.indexOf(this),o===-1||o===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[o+1]}importDocument(o){var D,E,l,y,A;if(E=o.root().clone(),E.parent=this,E.isRoot=!1,this.children.push(E),this.type===t.Document&&(E.isRoot=!0,E.documentObject=this,this.rootObject=E,this.children)){for(A=this.children,l=0,y=A.length;l<y;l++)if(D=A[l],D.type===t.DocType){D.name=E.name;break}}return this}debugInfo(o){var D,E;return o=o||this.name,o==null&&!((D=this.parent)!=null&&D.name)?"":o==null?"parent: <"+this.parent.name+">":(E=this.parent)!=null&&E.name?"node: <"+o+">, parent: <"+this.parent.name+">":"node: <"+o+">"}ele(o,D,E){return this.element(o,D,E)}nod(o,D,E){return this.node(o,D,E)}txt(o){return this.text(o)}dat(o){return this.cdata(o)}com(o){return this.comment(o)}ins(o,D){return this.instruction(o,D)}doc(){return this.document()}dec(o,D,E){return this.declaration(o,D,E)}e(o,D,E){return this.element(o,D,E)}n(o,D,E){return this.node(o,D,E)}t(o){return this.text(o)}d(o){return this.cdata(o)}c(o){return this.comment(o)}r(o){return this.raw(o)}i(o,D){return this.instruction(o,D)}u(){return this.up()}importXMLBuilder(o){return this.importDocument(o)}attribute(o,D){throw new Error("attribute() applies to element nodes only.")}att(o,D){return this.attribute(o,D)}a(o,D){return this.attribute(o,D)}removeAttribute(o){throw new Error("attribute() applies to element nodes only.")}replaceChild(o,D){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeChild(o){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendChild(o){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasChildNodes(){return this.children.length!==0}cloneNode(o){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalize(){throw new Error("This DOM method is not implemented."+this.debugInfo())}isSupported(o,D){return!0}hasAttributes(){return this.attribs.length!==0}compareDocumentPosition(o){var D,E;return D=this,D===o?0:this.document()!==o.document()?(E=e.Disconnected|e.ImplementationSpecific,Math.random()<.5?E|=e.Preceding:E|=e.Following,E):D.isAncestor(o)?e.Contains|e.Preceding:D.isDescendant(o)?e.Contains|e.Following:D.isPreceding(o)?e.Preceding:e.Following}isSameNode(o){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupPrefix(o){throw new Error("This DOM method is not implemented."+this.debugInfo())}isDefaultNamespace(o){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupNamespaceURI(o){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(o){var D,E,l;if(o.nodeType!==this.nodeType||o.children.length!==this.children.length)return!1;for(D=E=0,l=this.children.length-1;0<=l?E<=l:E>=l;D=0<=l?++E:--E)if(!this.children[D].isEqualNode(o.children[D]))return!1;return!0}getFeature(o,D){throw new Error("This DOM method is not implemented."+this.debugInfo())}setUserData(o,D,E){throw new Error("This DOM method is not implemented."+this.debugInfo())}getUserData(o){throw new Error("This DOM method is not implemented."+this.debugInfo())}contains(o){return o?o===this||this.isDescendant(o):!1}isDescendant(o){var D,E,l,y,A;for(A=this.children,l=0,y=A.length;l<y;l++)if(D=A[l],o===D||(E=D.isDescendant(o),E))return!0;return!1}isAncestor(o){return o.isDescendant(this)}isPreceding(o){var D,E;return D=this.treePosition(o),E=this.treePosition(this),D===-1||E===-1?!1:D<E}isFollowing(o){var D,E;return D=this.treePosition(o),E=this.treePosition(this),D===-1||E===-1?!1:D>E}treePosition(o){var D,E;return E=0,D=!1,this.foreachTreeNode(this.document(),function(l){if(E++,!D&&l===o)return D=!0}),D?E:-1}foreachTreeNode(o,D){var E,l,y,A,N;for(o||(o=this.document()),A=o.children,l=0,y=A.length;l<y;l++){if(E=A[l],N=D(E))return N;if(N=this.foreachTreeNode(E,D),N)return N}}}return Object.defineProperty(h.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(h.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(h.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(h.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(h.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new m(this.children)),this.childNodeList}}),Object.defineProperty(h.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(h.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(h.prototype,"previousSibling",{get:function(){var b;return b=this.parent.children.indexOf(this),this.parent.children[b-1]||null}}),Object.defineProperty(h.prototype,"nextSibling",{get:function(){var b;return b=this.parent.children.indexOf(this),this.parent.children[b+1]||null}}),Object.defineProperty(h.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(h.prototype,"textContent",{get:function(){var b,o,D,E,l;if(this.nodeType===t.Element||this.nodeType===t.DocumentFragment){for(l="",E=this.children,o=0,D=E.length;o<D;o++)b=E[o],b.textContent&&(l+=b.textContent);return l}else return null},set:function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),h}).call(this)}).call(xn)});var $t=M((Pn,Rn)=>{(function(){var e,t={}.hasOwnProperty;Rn.exports=e=(function(){class r{constructor(n){var s,u,c;this.assertLegalChar=this.assertLegalChar.bind(this),this.assertLegalName=this.assertLegalName.bind(this),n||(n={}),this.options=n,this.options.version||(this.options.version="1.0"),u=n.stringify||{};for(s in u)t.call(u,s)&&(c=u[s],this[s]=c)}name(n){return this.options.noValidation?n:this.assertLegalName(""+n||"")}text(n){return this.options.noValidation?n:this.assertLegalChar(this.textEscape(""+n||""))}cdata(n){return this.options.noValidation?n:(n=""+n||"",n=n.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(n))}comment(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+n);return this.assertLegalChar(n)}raw(n){return this.options.noValidation?n:""+n||""}attValue(n){return this.options.noValidation?n:this.assertLegalChar(this.attEscape(n=""+n||""))}insTarget(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}insValue(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/\?>/))throw new Error("Invalid processing instruction value: "+n);return this.assertLegalChar(n)}xmlVersion(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+n);return n}xmlEncoding(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+n);return this.assertLegalChar(n)}xmlStandalone(n){return this.options.noValidation?n:n?"yes":"no"}dtdPubID(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdSysID(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdElementValue(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdAttType(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdAttDefault(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdEntityValue(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdNData(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}assertLegalChar(n){var s,u;if(this.options.noValidation)return n;if(this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,this.options.invalidCharReplacement!==void 0)n=n.replace(s,this.options.invalidCharReplacement);else if(u=n.match(s))throw new Error(`Invalid character in string: ${n} at index ${u.index}`)}else if(this.options.version==="1.1"){if(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,this.options.invalidCharReplacement!==void 0)n=n.replace(s,this.options.invalidCharReplacement);else if(u=n.match(s))throw new Error(`Invalid character in string: ${n} at index ${u.index}`)}return n}assertLegalName(n){var s;if(this.options.noValidation)return n;if(n=this.assertLegalChar(n),s=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!n.match(s))throw new Error(`Invalid character in name: ${n}`);return n}textEscape(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&(lt|gt|amp|apos|quot);)&/g:/&/g,n.replace(s,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))}attEscape(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&(lt|gt|amp|apos|quot);)&/g:/&/g,n.replace(s,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))}}return r.prototype.convertAttKey="@",r.prototype.convertPIKey="?",r.prototype.convertTextKey="#text",r.prototype.convertCDataKey="#cdata",r.prototype.convertCommentKey="#comment",r.prototype.convertRawKey="#raw",r}).call(this)}).call(Pn)});var Fe=M((qn,kn)=>{(function(){kn.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(qn)});var Ht=M((_n,Un)=>{(function(){var e,t,r,i,n,s,u,c,a,d,m,p,g,w,v,T,C,S={}.hasOwnProperty;({assign:C}=Z()),e=q(),a=ct(),d=mt(),r=at(),i=lt(),p=ot(),w=gt(),v=Dt(),g=yt(),m=Vt(),n=ht(),s=pt(),u=ft(),c=dt(),t=Fe(),Un.exports=T=class{constructor(f){var h,b,o;f||(f={}),this.options=f,b=f.writer||{};for(h in b)S.call(b,h)&&(o=b[h],this["_"+h]=this[h],this[h]=o)}filterOptions(f){var h,b,o,D,E,l,y,A,N;return f||(f={}),f=C({},this.options,f),h={writer:this},h.pretty=f.pretty||!1,h.allowEmpty=f.allowEmpty||!1,h.indent=(b=f.indent)!=null?b:" ",h.newline=(o=f.newline)!=null?o:`
5
- `,h.offset=(D=f.offset)!=null?D:0,h.width=(E=f.width)!=null?E:0,h.dontPrettyTextNodes=(l=(y=f.dontPrettyTextNodes)!=null?y:f.dontprettytextnodes)!=null?l:0,h.spaceBeforeSlash=(A=(N=f.spaceBeforeSlash)!=null?N:f.spacebeforeslash)!=null?A:"",h.spaceBeforeSlash===!0&&(h.spaceBeforeSlash=" "),h.suppressPrettyCount=0,h.user={},h.state=t.None,h}indent(f,h,b){var o;return!h.pretty||h.suppressPrettyCount?"":h.pretty&&(o=(b||0)+h.offset+1,o>0)?new Array(o).join(h.indent):""}endline(f,h,b){return!h.pretty||h.suppressPrettyCount?"":h.newline}attribute(f,h,b){var o;return this.openAttribute(f,h,b),h.pretty&&h.width>0?o=f.name+'="'+f.value+'"':o=" "+f.name+'="'+f.value+'"',this.closeAttribute(f,h,b),o}cdata(f,h,b){var o;return this.openNode(f,h,b),h.state=t.OpenTag,o=this.indent(f,h,b)+"<![CDATA[",h.state=t.InsideTag,o+=f.value,h.state=t.CloseTag,o+="]]>"+this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),o}comment(f,h,b){var o;return this.openNode(f,h,b),h.state=t.OpenTag,o=this.indent(f,h,b)+"<!-- ",h.state=t.InsideTag,o+=f.value,h.state=t.CloseTag,o+=" -->"+this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),o}declaration(f,h,b){var o;return this.openNode(f,h,b),h.state=t.OpenTag,o=this.indent(f,h,b)+"<?xml",h.state=t.InsideTag,o+=' version="'+f.version+'"',f.encoding!=null&&(o+=' encoding="'+f.encoding+'"'),f.standalone!=null&&(o+=' standalone="'+f.standalone+'"'),h.state=t.CloseTag,o+=h.spaceBeforeSlash+"?>",o+=this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),o}docType(f,h,b){var o,D,E,l,y;if(b||(b=0),this.openNode(f,h,b),h.state=t.OpenTag,l=this.indent(f,h,b),l+="<!DOCTYPE "+f.root().name,f.pubID&&f.sysID?l+=' PUBLIC "'+f.pubID+'" "'+f.sysID+'"':f.sysID&&(l+=' SYSTEM "'+f.sysID+'"'),f.children.length>0){for(l+=" [",l+=this.endline(f,h,b),h.state=t.InsideTag,y=f.children,D=0,E=y.length;D<E;D++)o=y[D],l+=this.writeChildNode(o,h,b+1);h.state=t.CloseTag,l+="]"}return h.state=t.CloseTag,l+=h.spaceBeforeSlash+">",l+=this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),l}element(f,h,b){var o,D,E,l,y,A,N,I,L,k,F,O,_,et,tt,rt,Rt,qt,me;if(b||(b=0),O=!1,this.openNode(f,h,b),h.state=t.OpenTag,_=this.indent(f,h,b)+"<"+f.name,h.pretty&&h.width>0){I=_.length,tt=f.attribs;for(F in tt)S.call(tt,F)&&(o=tt[F],et=this.attribute(o,h,b),D=et.length,I+D>h.width?(me=this.indent(f,h,b+1)+et,_+=this.endline(f,h,b)+me,I=me.length):(me=" "+et,_+=me,I+=me.length))}else{rt=f.attribs;for(F in rt)S.call(rt,F)&&(o=rt[F],_+=this.attribute(o,h,b))}if(l=f.children.length,y=l===0?null:f.children[0],l===0||f.children.every(function(nt){return(nt.type===e.Text||nt.type===e.Raw||nt.type===e.CData)&&nt.value===""}))h.allowEmpty?(_+=">",h.state=t.CloseTag,_+="</"+f.name+">"+this.endline(f,h,b)):(h.state=t.CloseTag,_+=h.spaceBeforeSlash+"/>"+this.endline(f,h,b));else if(h.pretty&&l===1&&(y.type===e.Text||y.type===e.Raw||y.type===e.CData)&&y.value!=null)_+=">",h.state=t.InsideTag,h.suppressPrettyCount++,O=!0,_+=this.writeChildNode(y,h,b+1),h.suppressPrettyCount--,O=!1,h.state=t.CloseTag,_+="</"+f.name+">"+this.endline(f,h,b);else{if(h.dontPrettyTextNodes){for(Rt=f.children,A=0,L=Rt.length;A<L;A++)if(E=Rt[A],(E.type===e.Text||E.type===e.Raw||E.type===e.CData)&&E.value!=null){h.suppressPrettyCount++,O=!0;break}}for(_+=">"+this.endline(f,h,b),h.state=t.InsideTag,qt=f.children,N=0,k=qt.length;N<k;N++)E=qt[N],_+=this.writeChildNode(E,h,b+1);h.state=t.CloseTag,_+=this.indent(f,h,b)+"</"+f.name+">",O&&h.suppressPrettyCount--,_+=this.endline(f,h,b),h.state=t.None}return this.closeNode(f,h,b),_}writeChildNode(f,h,b){switch(f.type){case e.CData:return this.cdata(f,h,b);case e.Comment:return this.comment(f,h,b);case e.Element:return this.element(f,h,b);case e.Raw:return this.raw(f,h,b);case e.Text:return this.text(f,h,b);case e.ProcessingInstruction:return this.processingInstruction(f,h,b);case e.Dummy:return"";case e.Declaration:return this.declaration(f,h,b);case e.DocType:return this.docType(f,h,b);case e.AttributeDeclaration:return this.dtdAttList(f,h,b);case e.ElementDeclaration:return this.dtdElement(f,h,b);case e.EntityDeclaration:return this.dtdEntity(f,h,b);case e.NotationDeclaration:return this.dtdNotation(f,h,b);default:throw new Error("Unknown XML node type: "+f.constructor.name)}}processingInstruction(f,h,b){var o;return this.openNode(f,h,b),h.state=t.OpenTag,o=this.indent(f,h,b)+"<?",h.state=t.InsideTag,o+=f.target,f.value&&(o+=" "+f.value),h.state=t.CloseTag,o+=h.spaceBeforeSlash+"?>",o+=this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),o}raw(f,h,b){var o;return this.openNode(f,h,b),h.state=t.OpenTag,o=this.indent(f,h,b),h.state=t.InsideTag,o+=f.value,h.state=t.CloseTag,o+=this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),o}text(f,h,b){var o;return this.openNode(f,h,b),h.state=t.OpenTag,o=this.indent(f,h,b),h.state=t.InsideTag,o+=f.value,h.state=t.CloseTag,o+=this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),o}dtdAttList(f,h,b){var o;return this.openNode(f,h,b),h.state=t.OpenTag,o=this.indent(f,h,b)+"<!ATTLIST",h.state=t.InsideTag,o+=" "+f.elementName+" "+f.attributeName+" "+f.attributeType,f.defaultValueType!=="#DEFAULT"&&(o+=" "+f.defaultValueType),f.defaultValue&&(o+=' "'+f.defaultValue+'"'),h.state=t.CloseTag,o+=h.spaceBeforeSlash+">"+this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),o}dtdElement(f,h,b){var o;return this.openNode(f,h,b),h.state=t.OpenTag,o=this.indent(f,h,b)+"<!ELEMENT",h.state=t.InsideTag,o+=" "+f.name+" "+f.value,h.state=t.CloseTag,o+=h.spaceBeforeSlash+">"+this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),o}dtdEntity(f,h,b){var o;return this.openNode(f,h,b),h.state=t.OpenTag,o=this.indent(f,h,b)+"<!ENTITY",h.state=t.InsideTag,f.pe&&(o+=" %"),o+=" "+f.name,f.value?o+=' "'+f.value+'"':(f.pubID&&f.sysID?o+=' PUBLIC "'+f.pubID+'" "'+f.sysID+'"':f.sysID&&(o+=' SYSTEM "'+f.sysID+'"'),f.nData&&(o+=" NDATA "+f.nData)),h.state=t.CloseTag,o+=h.spaceBeforeSlash+">"+this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),o}dtdNotation(f,h,b){var o;return this.openNode(f,h,b),h.state=t.OpenTag,o=this.indent(f,h,b)+"<!NOTATION",h.state=t.InsideTag,o+=" "+f.name,f.pubID&&f.sysID?o+=' PUBLIC "'+f.pubID+'" "'+f.sysID+'"':f.pubID?o+=' PUBLIC "'+f.pubID+'"':f.sysID&&(o+=' SYSTEM "'+f.sysID+'"'),h.state=t.CloseTag,o+=h.spaceBeforeSlash+">"+this.endline(f,h,b),h.state=t.None,this.closeNode(f,h,b),o}openNode(f,h,b){}closeNode(f,h,b){}openAttribute(f,h,b){}closeAttribute(f,h,b){}}}).call(_n)});var wt=M((jn,Xn)=>{(function(){var e,t;t=Ht(),Xn.exports=e=class extends t{constructor(i){super(i)}document(i,n){var s,u,c,a,d;for(n=this.filterOptions(n),a="",d=i.children,u=0,c=d.length;u<c;u++)s=d[u],a+=this.writeChildNode(s,n,0);return n.pretty&&a.slice(-n.newline.length)===n.newline&&(a=a.slice(0,-n.newline.length)),a}}}).call(jn)});var Gt=M((Vn,$n)=>{(function(){var e,t,r,i,n,s,u,c;({isPlainObject:c}=Z()),r=jt(),t=Hr(),n=z(),e=q(),u=$t(),s=wt(),$n.exports=i=(function(){class a extends n{constructor(m){super(null),this.name="#document",this.type=e.Document,this.documentURI=null,this.domConfig=new t,m||(m={}),m.writer||(m.writer=new s),this.options=m,this.stringify=new u(m)}end(m){var p;return p={},m?c(m)&&(p=m,m=this.options.writer):m=this.options.writer,m.document(this,m.filterOptions(p))}toString(m){return this.options.writer.document(this,this.options.writer.filterOptions(m))}createElement(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}createDocumentFragment(){throw new Error("This DOM method is not implemented."+this.debugInfo())}createTextNode(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}createComment(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}createCDATASection(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}createProcessingInstruction(m,p){throw new Error("This DOM method is not implemented."+this.debugInfo())}createAttribute(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}createEntityReference(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}importNode(m,p){throw new Error("This DOM method is not implemented."+this.debugInfo())}createElementNS(m,p){throw new Error("This DOM method is not implemented."+this.debugInfo())}createAttributeNS(m,p){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(m,p){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementById(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}adoptNode(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalizeDocument(){throw new Error("This DOM method is not implemented."+this.debugInfo())}renameNode(m,p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByClassName(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}createEvent(m){throw new Error("This DOM method is not implemented."+this.debugInfo())}createRange(){throw new Error("This DOM method is not implemented."+this.debugInfo())}createNodeIterator(m,p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}createTreeWalker(m,p,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}}return Object.defineProperty(a.prototype,"implementation",{value:new r}),Object.defineProperty(a.prototype,"doctype",{get:function(){var d,m,p,g;for(g=this.children,m=0,p=g.length;m<p;m++)if(d=g[m],d.type===e.DocType)return d;return null}}),Object.defineProperty(a.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(a.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(a.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(a.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].encoding:null}}),Object.defineProperty(a.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(a.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(a.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(a.prototype,"origin",{get:function(){return null}}),Object.defineProperty(a.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(a.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(a.prototype,"contentType",{get:function(){return null}}),a}).call(this)}).call(Vn)});var zn=M((Hn,Gn)=>{(function(){var e,t,r,i,n,s,u,c,a,d,m,p,g,w,v,T,C,S,x,f,h,b,o,D={}.hasOwnProperty;({isObject:b,isFunction:h,isPlainObject:o,getValue:f}=Z()),e=q(),p=Gt(),w=ot(),i=at(),n=lt(),T=gt(),x=Dt(),v=yt(),d=ct(),m=mt(),s=ht(),c=ft(),u=pt(),a=dt(),r=Xt(),S=$t(),C=wt(),t=Fe(),Gn.exports=g=class{constructor(l,y,A){var N;this.name="?xml",this.type=e.Document,l||(l={}),N={},l.writer?o(l.writer)&&(N=l.writer,l.writer=new C):l.writer=new C,this.options=l,this.writer=l.writer,this.writerOptions=this.writer.filterOptions(N),this.stringify=new S(l),this.onDataCallback=y||function(){},this.onEndCallback=A||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}createChildNode(l){var y,A,N,I,L,k,F,O;switch(l.type){case e.CData:this.cdata(l.value);break;case e.Comment:this.comment(l.value);break;case e.Element:N={},F=l.attribs;for(A in F)D.call(F,A)&&(y=F[A],N[A]=y.value);this.node(l.name,N);break;case e.Dummy:this.dummy();break;case e.Raw:this.raw(l.value);break;case e.Text:this.text(l.value);break;case e.ProcessingInstruction:this.instruction(l.target,l.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+l.constructor.name)}for(O=l.children,L=0,k=O.length;L<k;L++)I=O[L],this.createChildNode(I),I.type===e.Element&&this.up();return this}dummy(){return this}node(l,y,A){if(l==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(l));return this.openCurrent(),l=f(l),y==null&&(y={}),y=f(y),b(y)||([A,y]=[y,A]),this.currentNode=new w(this,l,y),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,A!=null&&this.text(A),this}element(l,y,A){var N,I,L,k,F,O;if(this.currentNode&&this.currentNode.type===e.DocType)this.dtdElement(...arguments);else if(Array.isArray(l)||b(l)||h(l))for(k=this.options.noValidation,this.options.noValidation=!0,O=new p(this.options).element("TEMP_ROOT"),O.element(l),this.options.noValidation=k,F=O.children,I=0,L=F.length;I<L;I++)N=F[I],this.createChildNode(N),N.type===e.Element&&this.up();else this.node(l,y,A);return this}attribute(l,y){var A,N;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(l));if(l!=null&&(l=f(l)),b(l))for(A in l)D.call(l,A)&&(N=l[A],this.attribute(A,N));else h(y)&&(y=y.apply()),this.options.keepNullAttributes&&y==null?this.currentNode.attribs[l]=new r(this,l,""):y!=null&&(this.currentNode.attribs[l]=new r(this,l,y));return this}text(l){var y;return this.openCurrent(),y=new x(this,l),this.onData(this.writer.text(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}cdata(l){var y;return this.openCurrent(),y=new i(this,l),this.onData(this.writer.cdata(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}comment(l){var y;return this.openCurrent(),y=new n(this,l),this.onData(this.writer.comment(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}raw(l){var y;return this.openCurrent(),y=new T(this,l),this.onData(this.writer.raw(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}instruction(l,y){var A,N,I,L,k;if(this.openCurrent(),l!=null&&(l=f(l)),y!=null&&(y=f(y)),Array.isArray(l))for(A=0,L=l.length;A<L;A++)N=l[A],this.instruction(N);else if(b(l))for(N in l)D.call(l,N)&&(I=l[N],this.instruction(N,I));else h(y)&&(y=y.apply()),k=new v(this,l,y),this.onData(this.writer.processingInstruction(k,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}declaration(l,y,A){var N;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return N=new d(this,l,y,A),this.onData(this.writer.declaration(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}doctype(l,y,A){if(this.openCurrent(),l==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new m(this,y,A),this.currentNode.rootNodeName=l,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this}dtdElement(l,y){var A;return this.openCurrent(),A=new u(this,l,y),this.onData(this.writer.dtdElement(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}attList(l,y,A,N,I){var L;return this.openCurrent(),L=new s(this,l,y,A,N,I),this.onData(this.writer.dtdAttList(L,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}entity(l,y){var A;return this.openCurrent(),A=new c(this,!1,l,y),this.onData(this.writer.dtdEntity(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}pEntity(l,y){var A;return this.openCurrent(),A=new c(this,!0,l,y),this.onData(this.writer.dtdEntity(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}notation(l,y){var A;return this.openCurrent(),A=new a(this,l,y),this.onData(this.writer.dtdNotation(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}up(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this}end(){for(;this.currentLevel>=0;)this.up();return this.onEnd()}openCurrent(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)}openNode(l){var y,A,N,I;if(!l.isOpen){if(!this.root&&this.currentLevel===0&&l.type===e.Element&&(this.root=l),A="",l.type===e.Element){this.writerOptions.state=t.OpenTag,A=this.writer.indent(l,this.writerOptions,this.currentLevel)+"<"+l.name,I=l.attribs;for(N in I)D.call(I,N)&&(y=I[N],A+=this.writer.attribute(y,this.writerOptions,this.currentLevel));A+=(l.children?">":"/>")+this.writer.endline(l,this.writerOptions,this.currentLevel),this.writerOptions.state=t.InsideTag}else this.writerOptions.state=t.OpenTag,A=this.writer.indent(l,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+l.rootNodeName,l.pubID&&l.sysID?A+=' PUBLIC "'+l.pubID+'" "'+l.sysID+'"':l.sysID&&(A+=' SYSTEM "'+l.sysID+'"'),l.children?(A+=" [",this.writerOptions.state=t.InsideTag):(this.writerOptions.state=t.CloseTag,A+=">"),A+=this.writer.endline(l,this.writerOptions,this.currentLevel);return this.onData(A,this.currentLevel),l.isOpen=!0}}closeNode(l){var y;if(!l.isClosed)return y="",this.writerOptions.state=t.CloseTag,l.type===e.Element?y=this.writer.indent(l,this.writerOptions,this.currentLevel)+"</"+l.name+">"+this.writer.endline(l,this.writerOptions,this.currentLevel):y=this.writer.indent(l,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(l,this.writerOptions,this.currentLevel),this.writerOptions.state=t.None,this.onData(y,this.currentLevel),l.isClosed=!0}onData(l,y){return this.documentStarted=!0,this.onDataCallback(l,y+1)}onEnd(){return this.documentCompleted=!0,this.onEndCallback()}debugInfo(l){return l==null?"":"node: <"+l+">"}ele(){return this.element(...arguments)}nod(l,y,A){return this.node(l,y,A)}txt(l){return this.text(l)}dat(l){return this.cdata(l)}com(l){return this.comment(l)}ins(l,y){return this.instruction(l,y)}dec(l,y,A){return this.declaration(l,y,A)}dtd(l,y,A){return this.doctype(l,y,A)}e(l,y,A){return this.element(l,y,A)}n(l,y,A){return this.node(l,y,A)}t(l){return this.text(l)}d(l){return this.cdata(l)}c(l){return this.comment(l)}r(l){return this.raw(l)}i(l,y){return this.instruction(l,y)}att(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}a(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}ent(l,y){return this.entity(l,y)}pent(l,y){return this.pEntity(l,y)}not(l,y){return this.notation(l,y)}}}).call(Hn)});var Yn=M((Wn,Kn)=>{(function(){var e,t,r,i,n={}.hasOwnProperty;e=q(),i=Ht(),t=Fe(),Kn.exports=r=class extends i{constructor(u,c){super(c),this.stream=u}endline(u,c,a){return u.isLastRootNode&&c.state===t.CloseTag?"":super.endline(u,c,a)}document(u,c){var a,d,m,p,g,w,v,T,C;for(v=u.children,d=m=0,g=v.length;m<g;d=++m)a=v[d],a.isLastRootNode=d===u.children.length-1;for(c=this.filterOptions(c),T=u.children,C=[],p=0,w=T.length;p<w;p++)a=T[p],C.push(this.writeChildNode(a,c,0));return C}cdata(u,c,a){return this.stream.write(super.cdata(u,c,a))}comment(u,c,a){return this.stream.write(super.comment(u,c,a))}declaration(u,c,a){return this.stream.write(super.declaration(u,c,a))}docType(u,c,a){var d,m,p,g;if(a||(a=0),this.openNode(u,c,a),c.state=t.OpenTag,this.stream.write(this.indent(u,c,a)),this.stream.write("<!DOCTYPE "+u.root().name),u.pubID&&u.sysID?this.stream.write(' PUBLIC "'+u.pubID+'" "'+u.sysID+'"'):u.sysID&&this.stream.write(' SYSTEM "'+u.sysID+'"'),u.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(u,c,a)),c.state=t.InsideTag,g=u.children,m=0,p=g.length;m<p;m++)d=g[m],this.writeChildNode(d,c,a+1);c.state=t.CloseTag,this.stream.write("]")}return c.state=t.CloseTag,this.stream.write(c.spaceBeforeSlash+">"),this.stream.write(this.endline(u,c,a)),c.state=t.None,this.closeNode(u,c,a)}element(u,c,a){var d,m,p,g,w,v,T,C,S,x,f,h,b,o,D,E;if(a||(a=0),this.openNode(u,c,a),c.state=t.OpenTag,f=this.indent(u,c,a)+"<"+u.name,c.pretty&&c.width>0){T=f.length,b=u.attribs;for(S in b)n.call(b,S)&&(d=b[S],h=this.attribute(d,c,a),m=h.length,T+m>c.width?(E=this.indent(u,c,a+1)+h,f+=this.endline(u,c,a)+E,T=E.length):(E=" "+h,f+=E,T+=E.length))}else{o=u.attribs;for(S in o)n.call(o,S)&&(d=o[S],f+=this.attribute(d,c,a))}if(this.stream.write(f),g=u.children.length,w=g===0?null:u.children[0],g===0||u.children.every(function(l){return(l.type===e.Text||l.type===e.Raw||l.type===e.CData)&&l.value===""}))c.allowEmpty?(this.stream.write(">"),c.state=t.CloseTag,this.stream.write("</"+u.name+">")):(c.state=t.CloseTag,this.stream.write(c.spaceBeforeSlash+"/>"));else if(c.pretty&&g===1&&(w.type===e.Text||w.type===e.Raw||w.type===e.CData)&&w.value!=null)this.stream.write(">"),c.state=t.InsideTag,c.suppressPrettyCount++,x=!0,this.writeChildNode(w,c,a+1),c.suppressPrettyCount--,x=!1,c.state=t.CloseTag,this.stream.write("</"+u.name+">");else{for(this.stream.write(">"+this.endline(u,c,a)),c.state=t.InsideTag,D=u.children,v=0,C=D.length;v<C;v++)p=D[v],this.writeChildNode(p,c,a+1);c.state=t.CloseTag,this.stream.write(this.indent(u,c,a)+"</"+u.name+">")}return this.stream.write(this.endline(u,c,a)),c.state=t.None,this.closeNode(u,c,a)}processingInstruction(u,c,a){return this.stream.write(super.processingInstruction(u,c,a))}raw(u,c,a){return this.stream.write(super.raw(u,c,a))}text(u,c,a){return this.stream.write(super.text(u,c,a))}dtdAttList(u,c,a){return this.stream.write(super.dtdAttList(u,c,a))}dtdElement(u,c,a){return this.stream.write(super.dtdElement(u,c,a))}dtdEntity(u,c,a){return this.stream.write(super.dtdEntity(u,c,a))}dtdNotation(u,c,a){return this.stream.write(super.dtdNotation(u,c,a))}}}).call(Wn)});var Jn=M((Zn,oe)=>{(function(){var e,t,r,i,n,s,u,c,a;({assign:c,isFunction:a}=Z()),r=jt(),i=Gt(),n=zn(),u=wt(),s=Yn(),e=q(),t=Fe(),oe.exports.create=function(d,m,p,g){var w,v;if(d==null)throw new Error("Root element needs a name.");return g=c({},m,p,g),w=new i(g),v=w.element(d),g.headless||(w.declaration(g),(g.pubID!=null||g.sysID!=null)&&w.dtd(g)),v},oe.exports.begin=function(d,m,p){return a(d)&&([m,p]=[d,m],d={}),m?new n(d,m,p):new i(d)},oe.exports.stringWriter=function(d){return new u(d)},oe.exports.streamWriter=function(d,m){return new s(d,m)},oe.exports.implementation=new r,oe.exports.nodeType=e,oe.exports.writerState=t}).call(Zn)});var ri=M(Me=>{"use strict";var ti=Me&&Me.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Me,"__esModule",{value:!0});Me.build=Lu;var Qn=ti(xr()),Su=ti(Jn());function Ou(e){function t(r){return r<10?"0"+r:r}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"Z"}var Iu=Object.prototype.toString;function ei(e){let t=Iu.call(e).match(/\[object (.*)\]/);return t&&t[1]}function Lu(e,t){let r={version:"1.0",encoding:"UTF-8"},i={pubid:"-//Apple//DTD PLIST 1.0//EN",sysid:"http://www.apple.com/DTDs/PropertyList-1.0.dtd"},n=Su.default.create("plist");return n.dec(r.version,r.encoding,r.standalone),n.dtd(i.pubid,i.sysid),n.att("version","1.0"),zt(e,n),t||(t={}),t.pretty=t.pretty!==!1,n.end(t)}function zt(e,t){let r,i,n,s=ei(e);if(s!=="Undefined")if(Array.isArray(e))for(t=t.ele("array"),i=0;i<e.length;i++)zt(e[i],t);else if(Buffer.isBuffer(e))t.ele("data").raw(e.toString("base64"));else if(s==="Object"){t=t.ele("dict");for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==void 0&&(t.ele("key").txt(n),zt(e[n],t))}else s==="Number"?(r=e%1===0?"integer":"real",t.ele(r).txt(e.toString())):s==="Date"?t.ele("date").txt(Ou(new Date(e))):s==="Boolean"?t.ele(e?"true":"false"):s==="String"?t.ele("string").txt(e):s==="ArrayBuffer"?t.ele("data").raw(Qn.default.fromByteArray(e)):e&&e.buffer&&ei(e.buffer)==="ArrayBuffer"&&t.ele("data").raw(Qn.default.fromByteArray(new Uint8Array(e.buffer)))}});var xe=M(ge=>{"use strict";function Fu(e,t,r){if(r===void 0&&(r=Array.prototype),e&&typeof r.find=="function")return r.find.call(e,t);for(var i=0;i<e.length;i++)if(Object.prototype.hasOwnProperty.call(e,i)){var n=e[i];if(t.call(void 0,n,i,e))return n}}function Wt(e,t){return t===void 0&&(t=Object),t&&typeof t.freeze=="function"?t.freeze(e):e}function Mu(e,t){if(e===null||typeof e!="object")throw new TypeError("target is not an object");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}var ni=Wt({HTML:"text/html",isHTML:function(e){return e===ni.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),ii=Wt({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===ii.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});ge.assign=Mu;ge.find=Fu;ge.freeze=Wt;ge.MIME_TYPE=ni;ge.NAMESPACE=ii});var sr=M(ne=>{var fi=xe(),J=fi.find,Be=fi.NAMESPACE;function xu(e){return e!==""}function Bu(e){return e?e.split(/[\t\n\f\r ]+/).filter(xu):[]}function Pu(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function ui(e){if(!e)return[];var t=Bu(e);return Object.keys(t.reduce(Pu,{}))}function Ru(e){return function(t){return e&&e.indexOf(t)!==-1}}function Re(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function $(e,t){var r=e.prototype;if(!(r instanceof t)){let n=function(){};var i=n;n.prototype=t.prototype,n=new n,Re(r,n),e.prototype=r=n}r.constructor!=e&&(typeof e!="function"&&console.error("unknown Class:"+e),r.constructor=e)}var H={},K=H.ELEMENT_NODE=1,ye=H.ATTRIBUTE_NODE=2,At=H.TEXT_NODE=3,pi=H.CDATA_SECTION_NODE=4,di=H.ENTITY_REFERENCE_NODE=5,qu=H.ENTITY_NODE=6,Kt=H.PROCESSING_INSTRUCTION_NODE=7,Yt=H.COMMENT_NODE=8,mi=H.DOCUMENT_NODE=9,gi=H.DOCUMENT_TYPE_NODE=10,ee=H.DOCUMENT_FRAGMENT_NODE=11,ku=H.NOTATION_NODE=12,X={},j={},Oo=X.INDEX_SIZE_ERR=(j[1]="Index size error",1),Io=X.DOMSTRING_SIZE_ERR=(j[2]="DOMString size error",2),V=X.HIERARCHY_REQUEST_ERR=(j[3]="Hierarchy request error",3),Lo=X.WRONG_DOCUMENT_ERR=(j[4]="Wrong document",4),_u=X.INVALID_CHARACTER_ERR=(j[5]="Invalid character",5),Fo=X.NO_DATA_ALLOWED_ERR=(j[6]="No data allowed",6),Mo=X.NO_MODIFICATION_ALLOWED_ERR=(j[7]="No modification allowed",7),Di=X.NOT_FOUND_ERR=(j[8]="Not found",8),xo=X.NOT_SUPPORTED_ERR=(j[9]="Not supported",9),si=X.INUSE_ATTRIBUTE_ERR=(j[10]="Attribute in use",10),De=X.INVALID_STATE_ERR=(j[11]="Invalid state",11),Bo=X.SYNTAX_ERR=(j[12]="Syntax error",12),Po=X.INVALID_MODIFICATION_ERR=(j[13]="Invalid modification",13),Ro=X.NAMESPACE_ERR=(j[14]="Invalid namespace",14),qo=X.INVALID_ACCESS_ERR=(j[15]="Invalid access",15);function R(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,j[e]),this.message=j[e],Error.captureStackTrace&&Error.captureStackTrace(this,R);return r.code=e,t&&(this.message=this.message+": "+t),r}R.prototype=Error.prototype;Re(X,R);function te(){}te.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t,r){for(var i=!!r&&!!r.requireWellFormed,n=[],s=0;s<this.length;s++)ur(this[s],n,e,t,null,i);return n.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}};function we(e,t){this._node=e,this._refresh=t,Zt(this)}function Zt(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var r=e._refresh(e._node);if(Ii(e,"length",r.length),!e.$$length||r.length<e.$$length)for(var i=r.length;i in e;i++)Object.prototype.hasOwnProperty.call(e,i)&&delete e[i];Re(r,e),e._inc=t}}we.prototype.item=function(e){return Zt(this),this[e]||null};$(we,te);function Et(){}function yi(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function oi(e,t,r,i){if(i?t[yi(t,i)]=r:t[t.length++]=r,e){r.ownerElement=e;var n=e.ownerDocument;n&&(i&&Ai(n,e,i),Uu(n,e,r))}}function ai(e,t,r){var i=yi(t,r);if(i>=0){for(var n=t.length-1;i<n;)t[i]=t[++i];if(t.length=n,e){var s=e.ownerDocument;s&&(Ai(s,e,r),r.ownerElement=null)}}else throw new R(Di,new Error(e.tagName+"@"+r))}Et.prototype={length:0,item:te.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new R(si);var r=this.getNamedItem(e.nodeName);return oi(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t=e.ownerElement,r;if(t&&t!=this._ownerElement)throw new R(si);return r=this.getNamedItemNS(e.namespaceURI,e.localName),oi(this._ownerElement,this,e,r),r},removeNamedItem:function(e){var t=this.getNamedItem(e);return ai(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return ai(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var i=this[r];if(i.localName==t&&i.namespaceURI==e)return i}return null}};function wi(){}wi.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var i=new qe;if(i.implementation=this,i.childNodes=new te,i.doctype=r||null,r&&i.appendChild(r),t){var n=i.createElementNS(e,t);i.appendChild(n)}return i},createDocumentType:function(e,t,r){var i=new Nt;return i.name=e,i.nodeName=e,i.publicId=t||"",i.systemId=r||"",i}};function P(){}P.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Ct(this,e,t)},replaceChild:function(e,t){Ct(this,e,t,vi),t&&this.removeChild(t)},removeChild:function(e){return Ei(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(e){return Oi(this.ownerDocument||this,this,e)},normalize:function(){U(this,null,{enter:function(e){for(var t=e.firstChild;t;){var r=t.nextSibling;r!==null&&r.nodeType===At&&t.nodeType===At?(e.removeChild(r),t.appendData(r.data)):t=r}return!0}})},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r){for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&r[i]===e)return i}t=t.nodeType==ye?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];t=t.nodeType==ye?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return t==null}};function bi(e){return e=="<"&&"&lt;"||e==">"&&"&gt;"||e=="&"&&"&amp;"||e=='"'&&"&quot;"||"&#"+e.charCodeAt()+";"}Re(H,P);Re(H,P.prototype);function vt(e,t){return U(e,null,{enter:function(r){return t(r)?U.STOP:!0}})===U.STOP}function U(e,t,r){for(var i=[{node:e,context:t,phase:U.ENTER}];i.length>0;){var n=i.pop();if(n.phase===U.ENTER){var s=r.enter(n.node,n.context);if(s===U.STOP)return U.STOP;if(i.push({node:n.node,context:s,phase:U.EXIT}),s==null)continue;for(var u=n.node.lastChild;u;)i.push({node:u,context:s,phase:U.ENTER}),u=u.previousSibling}else r.exit&&r.exit(n.node,n.context)}}U.STOP=Symbol("walkDOM.STOP");U.ENTER=0;U.EXIT=1;function qe(){this.ownerDocument=this}function Uu(e,t,r){e&&e._inc++;var i=r.namespaceURI;i===Be.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}function Ai(e,t,r,i){e&&e._inc++;var n=r.namespaceURI;n===Be.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function Jt(e,t,r){if(e&&e._inc){e._inc++;var i=t.childNodes;if(r)i[i.length++]=r;else{for(var n=t.firstChild,s=0;n;)i[s++]=n,n=n.nextSibling;i.length=s,delete i[i.length]}}}function Ei(e,t){var r=t.previousSibling,i=t.nextSibling;return r?r.nextSibling=i:e.firstChild=i,i?i.previousSibling=r:e.lastChild=r,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,Jt(e.ownerDocument,e),t}function ju(e){return e&&(e.nodeType===P.DOCUMENT_NODE||e.nodeType===P.DOCUMENT_FRAGMENT_NODE||e.nodeType===P.ELEMENT_NODE)}function Xu(e){return e&&(Q(e)||Qt(e)||re(e)||e.nodeType===P.DOCUMENT_FRAGMENT_NODE||e.nodeType===P.COMMENT_NODE||e.nodeType===P.PROCESSING_INSTRUCTION_NODE)}function re(e){return e&&e.nodeType===P.DOCUMENT_TYPE_NODE}function Q(e){return e&&e.nodeType===P.ELEMENT_NODE}function Qt(e){return e&&e.nodeType===P.TEXT_NODE}function li(e,t){var r=e.childNodes||[];if(J(r,Q)||re(t))return!1;var i=J(r,re);return!(t&&i&&r.indexOf(i)>r.indexOf(t))}function ci(e,t){var r=e.childNodes||[];function i(s){return Q(s)&&s!==t}if(J(r,i))return!1;var n=J(r,re);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function Vu(e,t,r){if(!ju(e))throw new R(V,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new R(Di,"child not in parent");if(!Xu(t)||re(t)&&e.nodeType!==P.DOCUMENT_NODE)throw new R(V,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function $u(e,t,r){var i=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===P.DOCUMENT_FRAGMENT_NODE){var s=n.filter(Q);if(s.length>1||J(n,Qt))throw new R(V,"More than one element or text in fragment");if(s.length===1&&!li(e,r))throw new R(V,"Element in fragment can not be inserted before doctype")}if(Q(t)&&!li(e,r))throw new R(V,"Only one element can be added and only after doctype");if(re(t)){if(J(i,re))throw new R(V,"Only one doctype is allowed");var u=J(i,Q);if(r&&i.indexOf(u)<i.indexOf(r))throw new R(V,"Doctype can only be inserted before an element");if(!r&&u)throw new R(V,"Doctype can not be appended since element is present")}}function vi(e,t,r){var i=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===P.DOCUMENT_FRAGMENT_NODE){var s=n.filter(Q);if(s.length>1||J(n,Qt))throw new R(V,"More than one element or text in fragment");if(s.length===1&&!ci(e,r))throw new R(V,"Element in fragment can not be inserted before doctype")}if(Q(t)&&!ci(e,r))throw new R(V,"Only one element can be added and only after doctype");if(re(t)){let a=function(d){return re(d)&&d!==r};var c=a;if(J(i,a))throw new R(V,"Only one doctype is allowed");var u=J(i,Q);if(r&&i.indexOf(u)<i.indexOf(r))throw new R(V,"Doctype can only be inserted before an element")}}function Ct(e,t,r,i){Vu(e,t,r),e.nodeType===P.DOCUMENT_NODE&&(i||$u)(e,t,r);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===ee){var s=t.firstChild;if(s==null)return t;var u=t.lastChild}else s=u=t;var c=r?r.previousSibling:e.lastChild;s.previousSibling=c,u.nextSibling=r,c?c.nextSibling=s:e.firstChild=s,r==null?e.lastChild=u:r.previousSibling=u;do{s.parentNode=e;var a=e.ownerDocument||e;Pe(s,a)}while(s!==u&&(s=s.nextSibling));return Jt(e.ownerDocument||e,e),t.nodeType==ee&&(t.firstChild=t.lastChild=null),t}function Pe(e,t){if(e.ownerDocument!==t){if(e.ownerDocument=t,e.nodeType===K&&e.attributes)for(var r=0;r<e.attributes.length;r++){var i=e.attributes.item(r);i&&(i.ownerDocument=t)}for(var n=e.firstChild;n;)Pe(n,t),n=n.nextSibling}}function Hu(e,t){t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,Jt(e.ownerDocument,e,t);var r=e.ownerDocument||e;return Pe(t,r),t}qe.prototype={nodeName:"#document",nodeType:mi,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==ee){for(var r=e.firstChild;r;){var i=r.nextSibling;this.insertBefore(r,t),r=i}return e}return Ct(this,e,t),Pe(e,this),this.documentElement===null&&e.nodeType===K&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Ei(this,e)},replaceChild:function(e,t){Ct(this,e,t,vi),Pe(e,this),t&&this.removeChild(t),Q(e)&&(this.documentElement=e)},importNode:function(e,t){return Gu(this,e,t)},getElementById:function(e){var t=null;return vt(this.documentElement,function(r){if(r.nodeType==K&&r.getAttribute("id")==e)return t=r,!0}),t},getElementsByClassName:function(e){var t=ui(e);return new we(this,function(r){var i=[];return t.length>0&&vt(r.documentElement,function(n){if(n!==r&&n.nodeType===K){var s=n.getAttribute("class");if(s){var u=e===s;if(!u){var c=ui(s);u=t.every(Ru(c))}u&&i.push(n)}}}),i})},createElement:function(e){var t=new fe;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new te;var r=t.attributes=new Et;return r._ownerElement=t,t},createDocumentFragment:function(){var e=new St;return e.ownerDocument=this,e.childNodes=new te,e},createTextNode:function(e){var t=new er;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new tr;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){if(e.indexOf("]]>")!==-1)throw new R(_u,'data contains "]]>"');var t=new rr;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new ir;return r.ownerDocument=this,r.tagName=r.nodeName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new Tt;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new nr;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new fe,i=t.split(":"),n=r.attributes=new Et;return r.childNodes=new te,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,i.length==2?(r.prefix=i[0],r.localName=i[1]):r.localName=t,n._ownerElement=r,r},createAttributeNS:function(e,t){var r=new Tt,i=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,i.length==2?(r.prefix=i[0],r.localName=i[1]):r.localName=t,r}};$(qe,P);function fe(){this._nsMap={}}fe.prototype={nodeType:K,hasAttribute:function(e){return this.getAttributeNode(e)!=null},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===ee?this.insertBefore(e,null):Hu(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return this.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+r,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new we(this,function(t){var r=[];return vt(t,function(i){i!==t&&i.nodeType==K&&(e==="*"||i.tagName==e)&&r.push(i)}),r})},getElementsByTagNameNS:function(e,t){return new we(this,function(r){var i=[];return vt(r,function(n){n!==r&&n.nodeType===K&&(e==="*"||n.namespaceURI===e)&&(t==="*"||n.localName==t)&&i.push(n)}),i})}};qe.prototype.getElementsByTagName=fe.prototype.getElementsByTagName;qe.prototype.getElementsByTagNameNS=fe.prototype.getElementsByTagNameNS;$(fe,P);function Tt(){}Tt.prototype.nodeType=ye;$(Tt,P);function ke(){}ke.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(j[V])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){var i=this.data.substring(0,e),n=this.data.substring(e+t);r=i+r+n,this.nodeValue=this.data=r,this.length=r.length}};$(ke,P);function er(){}er.prototype={nodeName:"#text",nodeType:At,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}};$(er,ke);function tr(){}tr.prototype={nodeName:"#comment",nodeType:Yt};$(tr,ke);function rr(){}rr.prototype={nodeName:"#cdata-section",nodeType:pi};$(rr,ke);function Nt(){}Nt.prototype.nodeType=gi;$(Nt,P);function Ci(){}Ci.prototype.nodeType=ku;$(Ci,P);function Ti(){}Ti.prototype.nodeType=qu;$(Ti,P);function nr(){}nr.prototype.nodeType=di;$(nr,P);function St(){}St.prototype.nodeName="#document-fragment";St.prototype.nodeType=ee;$(St,P);function ir(){}ir.prototype.nodeType=Kt;$(ir,P);function Ni(){}Ni.prototype.serializeToString=function(e,t,r,i){return Si.call(e,t,r,i)};P.prototype.toString=Si;function Si(e,t,r){var i=!!r&&!!r.requireWellFormed,n=[],s=this.nodeType==9&&this.documentElement||this,u=s.prefix,c=s.namespaceURI;if(c&&u==null){var u=s.lookupPrefix(c);if(u==null)var a=[{namespace:c,prefix:null}]}return ur(this,n,e,t,a,i),n.join("")}function hi(e,t,r){var i=e.prefix||"",n=e.namespaceURI;if(!n||i==="xml"&&n===Be.XML||n===Be.XMLNS)return!1;for(var s=r.length;s--;){var u=r[s];if(u.prefix===i)return u.namespace!==n}return!0}function bt(e,t,r){e.push(" ",t,'="',r.replace(/[<>&"\t\n\r]/g,bi),'"')}function ur(e,t,r,i,n,s){n||(n=[]),U(e,{ns:n,isHTML:r},{enter:function(u,c){var a=c.ns,d=c.isHTML;if(i)if(u=i(u),u){if(typeof u=="string")return t.push(u),null}else return null;switch(u.nodeType){case K:var m=u.attributes,p=m.length,g=u.tagName;d=Be.isHTML(u.namespaceURI)||d;var w=g;if(!d&&!u.prefix&&u.namespaceURI){for(var v,T=0;T<m.length;T++)if(m.item(T).name==="xmlns"){v=m.item(T).value;break}if(!v)for(var C=a.length-1;C>=0;C--){var S=a[C];if(S.prefix===""&&S.namespace===u.namespaceURI){v=S.namespace;break}}if(v!==u.namespaceURI)for(var C=a.length-1;C>=0;C--){var S=a[C];if(S.namespace===u.namespaceURI){S.prefix&&(w=S.prefix+":"+g);break}}}t.push("<",w);for(var x=a.slice(),f=0;f<p;f++){var h=m.item(f);h.prefix=="xmlns"?x.push({prefix:h.localName,namespace:h.value}):h.nodeName=="xmlns"&&x.push({prefix:"",namespace:h.value})}for(var f=0;f<p;f++){var h=m.item(f);if(hi(h,d,x)){var b=h.prefix||"",o=h.namespaceURI;bt(t,b?"xmlns:"+b:"xmlns",o),x.push({prefix:b,namespace:o})}var D=i?i(h):h;D&&(typeof D=="string"?t.push(D):bt(t,D.name,D.value))}if(g===w&&hi(u,d,x)){var E=u.prefix||"",o=u.namespaceURI;bt(t,E?"xmlns:"+E:"xmlns",o),x.push({prefix:E,namespace:o})}var l=u.firstChild;if(l||d&&!/^(?:meta|link|img|br|hr|input)$/i.test(g)){if(t.push(">"),d&&/^script$/i.test(g)){for(;l;)l.data?t.push(l.data):ur(l,t,d,i,x.slice(),s),l=l.nextSibling;return t.push("</",g,">"),null}return{ns:x,isHTML:d,tag:w}}else return t.push("/>"),null;case mi:case ee:return{ns:a.slice(),isHTML:d,tag:null};case ye:return bt(t,u.name,u.value),null;case At:return t.push(u.data.replace(/[<&>]/g,bi)),null;case pi:if(s&&u.data.indexOf("]]>")!==-1)throw new R(De,'The CDATASection data contains "]]>"');return t.push("<![CDATA[",u.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>"),null;case Yt:if(s&&u.data.indexOf("-->")!==-1)throw new R(De,'The comment node data contains "-->"');return t.push("<!--",u.data,"-->"),null;case gi:if(s){if(u.publicId&&!/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(u.publicId))throw new R(De,"DocumentType publicId is not a valid PubidLiteral");if(u.systemId&&!/^("[^"]*"|'[^']*')$/.test(u.systemId))throw new R(De,"DocumentType systemId is not a valid SystemLiteral");if(u.internalSubset&&u.internalSubset.indexOf("]>")!==-1)throw new R(De,'DocumentType internalSubset contains "]>"')}var y=u.publicId,A=u.systemId;if(t.push("<!DOCTYPE ",u.name),y)t.push(" PUBLIC ",y),A&&A!="."&&t.push(" ",A),t.push(">");else if(A&&A!=".")t.push(" SYSTEM ",A,">");else{var N=u.internalSubset;N&&t.push(" [",N,"]"),t.push(">")}return null;case Kt:if(s&&u.data.indexOf("?>")!==-1)throw new R(De,'The ProcessingInstruction data contains "?>"');return t.push("<?",u.target," ",u.data,"?>"),null;case di:return t.push("&",u.nodeName,";"),null;default:return t.push("??",u.nodeName),null}},exit:function(u,c){c&&c.tag&&t.push("</",c.tag,">")}})}function Gu(e,t,r){var i;return U(t,null,{enter:function(n,s){var u=n.cloneNode(!1);u.ownerDocument=e,u.parentNode=null,s===null?i=u:s.appendChild(u);var c=n.nodeType===ye||r;return c?u:null}}),i}function Oi(e,t,r){var i;return U(t,null,{enter:function(n,s){var u=new n.constructor;for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)){var a=n[c];typeof a!="object"&&a!=u[c]&&(u[c]=a)}n.childNodes&&(u.childNodes=new te),u.ownerDocument=e;var d=r;switch(u.nodeType){case K:var m=n.attributes,p=u.attributes=new Et,g=m.length;p._ownerElement=u;for(var w=0;w<g;w++)u.setAttributeNode(Oi(e,m.item(w),!0));break;case ye:d=!0}return s!==null?s.appendChild(u):i=u,d?u:null}}),i}function Ii(e,t,r){e[t]=r}try{Object.defineProperty&&(Object.defineProperty(we.prototype,"length",{get:function(){return Zt(this),this.$$length}}),Object.defineProperty(P.prototype,"textContent",{get:function(){if(this.nodeType===K||this.nodeType===ee){var e=[];return U(this,null,{enter:function(t){if(t.nodeType===K||t.nodeType===ee)return!0;if(t.nodeType===Kt||t.nodeType===Yt)return null;e.push(t.nodeValue)}}),e.join("")}return this.nodeValue},set:function(e){switch(this.nodeType){case K:case ee:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ii=function(e,t,r){e["$$"+t]=r})}catch{}ne.DocumentType=Nt;ne.DOMException=R;ne.DOMImplementation=wi;ne.Element=fe;ne.Node=P;ne.NodeList=te;ne.walkDOM=U;ne.XMLSerializer=Ni});var Fi=M(_e=>{"use strict";var Li=xe().freeze;_e.XML_ENTITIES=Li({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});_e.HTML_ENTITIES=Li({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
6
- `,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});_e.entityMap=_e.HTML_ENTITIES});var _i=M(ar=>{var Ve=xe().NAMESPACE,or=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Mi=new RegExp("[\\-\\.0-9"+or.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),xi=new RegExp("^"+or.source+Mi.source+"*(?::"+or.source+Mi.source+"*)?$"),Ue=0,ae=1,be=2,je=3,Ae=4,Ee=5,Xe=6,Ot=7;function ve(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,ve)}ve.prototype=new Error;ve.prototype.name=ve.name;function Ri(){}Ri.prototype={parse:function(e,t,r){var i=this.domBuilder;i.startDocument(),qi(t,t={}),zu(e,t,r,i,this.errorHandler),i.endDocument()}};function zu(e,t,r,i,n){function s(F){if(F>65535){F-=65536;var O=55296+(F>>10),_=56320+(F&1023);return String.fromCharCode(O,_)}else return String.fromCharCode(F)}function u(F){var O=F.slice(1,-1);return Object.hasOwnProperty.call(r,O)?r[O]:O.charAt(0)==="#"?s(parseInt(O.substr(1).replace("x","0x"))):(n.error("entity not found:"+F),F)}function c(F){if(F>T){var O=e.substring(T,F).replace(/&#?\w+;/g,u);g&&a(T),i.characters(O,0,F-T),T=F}}function a(F,O){for(;F>=m&&(O=p.exec(e));)d=O.index,m=d+O[0].length,g.lineNumber++;g.columnNumber=F-d+1}for(var d=0,m=0,p=/.*(?:\r\n?|\n)|.*$/g,g=i.locator,w=[{currentNSMap:t}],v={},T=0;;){try{var C=e.indexOf("<",T);if(C<0){if(!e.substr(T).match(/^\s*$/)){var S=i.doc,x=S.createTextNode(e.substr(T));S.appendChild(x),i.currentElement=x}return}switch(C>T&&c(C),e.charAt(C+1)){case"/":var A=e.indexOf(">",C+3),f=e.substring(C+2,A).replace(/[ \t\n\r]+$/g,""),h=w.pop();A<0?(f=e.substring(C+2).replace(/[\s<].*/,""),n.error("end tag name: "+f+" is not complete:"+h.tagName),A=C+1+f.length):f.match(/\s</)&&(f=f.replace(/[\s<].*/,""),n.error("end tag name: "+f+" maybe not complete"),A=C+1+f.length);var b=h.localNSMap,o=h.tagName==f,D=o||h.tagName&&h.tagName.toLowerCase()==f.toLowerCase();if(D){if(i.endElement(h.uri,h.localName,f),b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&i.endPrefixMapping(E);o||n.fatalError("end tag name: "+f+" is not match the current start tagName:"+h.tagName)}else w.push(h);A++;break;case"?":g&&a(C),A=Ju(e,C,i);break;case"!":g&&a(C),A=Zu(e,C,i,n);break;default:g&&a(C);var l=new ki,y=w[w.length-1].currentNSMap,A=Wu(e,C,l,y,u,n),N=l.length;if(!l.closed&&Yu(e,A,l.tagName,v)&&(l.closed=!0,r.nbsp||n.warning("unclosed xml attribute")),g&&N){for(var I=Bi(g,{}),L=0;L<N;L++){var k=l[L];a(k.offset),k.locator=Bi(g,{})}i.locator=I,Pi(l,i,y)&&w.push(l),i.locator=g}else Pi(l,i,y)&&w.push(l);Ve.isHTML(l.uri)&&!l.closed?A=Ku(e,A,l.tagName,u,i):A++}}catch(F){if(F instanceof ve)throw F;n.error("element parse error: "+F),A=-1}A>T?T=A:c(Math.max(C,T)+1)}}function Bi(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function Wu(e,t,r,i,n,s){function u(w,v,T){r.attributeNames.hasOwnProperty(w)&&s.fatalError("Attribute "+w+" redefined"),r.addValue(w,v.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,n),T)}for(var c,a,d=++t,m=Ue;;){var p=e.charAt(d);switch(p){case"=":if(m===ae)c=e.slice(t,d),m=je;else if(m===be)m=je;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(m===je||m===ae)if(m===ae&&(s.warning('attribute value must after "="'),c=e.slice(t,d)),t=d+1,d=e.indexOf(p,t),d>0)a=e.slice(t,d),u(c,a,t-1),m=Ee;else throw new Error("attribute value no end '"+p+"' match");else if(m==Ae)a=e.slice(t,d),u(c,a,t),s.warning('attribute "'+c+'" missed start quot('+p+")!!"),t=d+1,m=Ee;else throw new Error('attribute value must after "="');break;case"/":switch(m){case Ue:r.setTagName(e.slice(t,d));case Ee:case Xe:case Ot:m=Ot,r.closed=!0;case Ae:case ae:break;case be:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),m==Ue&&r.setTagName(e.slice(t,d)),d;case">":switch(m){case Ue:r.setTagName(e.slice(t,d));case Ee:case Xe:case Ot:break;case Ae:case ae:a=e.slice(t,d),a.slice(-1)==="/"&&(r.closed=!0,a=a.slice(0,-1));case be:m===be&&(a=c),m==Ae?(s.warning('attribute "'+a+'" missed quot(")!'),u(c,a,t)):((!Ve.isHTML(i[""])||!a.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+a+'" missed value!! "'+a+'" instead!!'),u(a,a,t));break;case je:throw new Error("attribute value missed!!")}return d;case"\x80":p=" ";default:if(p<=" ")switch(m){case Ue:r.setTagName(e.slice(t,d)),m=Xe;break;case ae:c=e.slice(t,d),m=be;break;case Ae:var a=e.slice(t,d);s.warning('attribute "'+a+'" missed quot(")!!'),u(c,a,t);case Ee:m=Xe;break}else switch(m){case be:var g=r.tagName;(!Ve.isHTML(i[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),u(c,c,t),t=d,m=ae;break;case Ee:s.warning('attribute space is required"'+c+'"!!');case Xe:m=ae,t=d;break;case je:m=Ae,t=d;break;case Ot:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function Pi(e,t,r){for(var i=e.tagName,n=null,p=e.length;p--;){var s=e[p],u=s.qName,c=s.value,g=u.indexOf(":");if(g>0)var a=s.prefix=u.slice(0,g),d=u.slice(g+1),m=a==="xmlns"&&d;else d=u,a=null,m=u==="xmlns"&&"";s.localName=d,m!==!1&&(n==null&&(n={},qi(r,r={})),r[m]=n[m]=c,s.uri=Ve.XMLNS,t.startPrefixMapping(m,c))}for(var p=e.length;p--;){s=e[p];var a=s.prefix;a&&(a==="xml"&&(s.uri=Ve.XML),a!=="xmlns"&&(s.uri=r[a||""]))}var g=i.indexOf(":");g>0?(a=e.prefix=i.slice(0,g),d=e.localName=i.slice(g+1)):(a=null,d=e.localName=i);var w=e.uri=r[a||""];if(t.startElement(w,d,i,e),e.closed){if(t.endElement(w,d,i),n)for(a in n)Object.prototype.hasOwnProperty.call(n,a)&&t.endPrefixMapping(a)}else return e.currentNSMap=r,e.localNSMap=n,!0}function Ku(e,t,r,i,n){if(/^(?:script|textarea)$/i.test(r)){var s=e.indexOf("</"+r+">",t),u=e.substring(t+1,s);if(/[&<]/.test(u))return/^script$/i.test(r)?(n.characters(u,0,u.length),s):(u=u.replace(/&#?\w+;/g,i),n.characters(u,0,u.length),s)}return t+1}function Yu(e,t,r,i){var n=i[r];return n==null&&(n=e.lastIndexOf("</"+r+">"),n<t&&(n=e.lastIndexOf("</"+r)),i[r]=n),n<t}function qi(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function Zu(e,t,r,i){var n=e.charAt(t+2);switch(n){case"-":if(e.charAt(t+3)==="-"){var s=e.indexOf("-->",t+4);return s>t?(r.comment(e,t+4,s-t-4),s+3):(i.error("Unclosed comment"),-1)}else return-1;default:if(e.substr(t+3,6)=="CDATA["){var s=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,s-t-9),r.endCDATA(),s+3}var u=Qu(e,t),c=u.length;if(c>1&&/!doctype/i.test(u[0][0])){var a=u[1][0],d=!1,m=!1;c>3&&(/^public$/i.test(u[2][0])?(d=u[3][0],m=c>4&&u[4][0]):/^system$/i.test(u[2][0])&&(m=u[3][0]));var p=u[c-1];return r.startDTD(a,d,m),r.endDTD(),p.index+p[0].length}}return-1}function Ju(e,t,r){var i=e.indexOf("?>",t);if(i){var n=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)$/);if(n){var s=n[0].length;return r.processingInstruction(n[1],n[2]),i+2}else return-1}return-1}function ki(){this.attributeNames={}}ki.prototype={setTagName:function(e){if(!xi.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!xi.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};function Qu(e,t){var r,i=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=t,n.exec(e);r=n.exec(e);)if(i.push(r),r[1])return i}ar.XMLReader=Ri;ar.ParseError=ve});var Gi=M(Lt=>{var es=xe(),ts=sr(),Ui=Fi(),Vi=_i(),rs=ts.DOMImplementation,ji=es.NAMESPACE,ns=Vi.ParseError,is=Vi.XMLReader;function $i(e){return e.replace(/\r[\n\u0085]/g,`
7
- `).replace(/[\r\u0085\u2028]/g,`
8
- `)}function Hi(e){this.options=e||{locator:{}}}Hi.prototype.parseFromString=function(e,t){var r=this.options,i=new is,n=r.domBuilder||new $e,s=r.errorHandler,u=r.locator,c=r.xmlns||{},a=/\/x?html?$/.test(t),d=a?Ui.HTML_ENTITIES:Ui.XML_ENTITIES;u&&n.setDocumentLocator(u),i.errorHandler=us(s,n,u),i.domBuilder=r.domBuilder||n,a&&(c[""]=ji.HTML),c.xml=c.xml||ji.XML;var m=r.normalizeLineEndings||$i;return e&&typeof e=="string"?i.parse(m(e),c,d):i.errorHandler.error("invalid doc source"),n.doc};function us(e,t,r){if(!e){if(t instanceof $e)return t;e=t}var i={},n=e instanceof Function;r=r||{};function s(u){var c=e[u];!c&&n&&(c=e.length==2?function(a){e(u,a)}:e),i[u]=c&&function(a){c("[xmldom "+u+"] "+a+lr(r))}||function(){}}return s("warning"),s("error"),s("fatalError"),i}function $e(){this.cdata=!1}function Ce(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}$e.prototype={startDocument:function(){this.doc=new rs().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,i){var n=this.doc,s=n.createElementNS(e,r||t),u=i.length;It(this,s),this.currentElement=s,this.locator&&Ce(this.locator,s);for(var c=0;c<u;c++){var e=i.getURI(c),a=i.getValue(c),r=i.getQName(c),d=n.createAttributeNS(e,r);this.locator&&Ce(i.getLocator(c),d),d.value=d.nodeValue=a,s.setAttributeNode(d)}},endElement:function(e,t,r){var i=this.currentElement,n=i.tagName;this.currentElement=i.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&Ce(this.locator,r),It(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=Xi.apply(this,arguments),e){if(this.cdata)var i=this.doc.createCDATASection(e);else var i=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(e)&&this.doc.appendChild(i),this.locator&&Ce(this.locator,i)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=Xi.apply(this,arguments);var i=this.doc.createComment(e);this.locator&&Ce(this.locator,i),It(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var i=this.doc.implementation;if(i&&i.createDocumentType){var n=i.createDocumentType(e,t,r);this.locator&&Ce(this.locator,n),It(this,n),this.doc.doctype=n}},warning:function(e){console.warn("[xmldom warning] "+e,lr(this.locator))},error:function(e){console.error("[xmldom error] "+e,lr(this.locator))},fatalError:function(e){throw new ns(e,this.locator)}};function lr(e){if(e)return`
9
- @`+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function Xi(e,t,r){return typeof e=="string"?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){$e.prototype[e]=function(){return null}});function It(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}Lt.__DOMHandler=$e;Lt.normalizeLineEndings=$i;Lt.DOMParser=Hi});var Wi=M(Ft=>{var zi=sr();Ft.DOMImplementation=zi.DOMImplementation;Ft.XMLSerializer=zi.XMLSerializer;Ft.DOMParser=Gi().DOMParser});var Yi=M(Ge=>{"use strict";var ss=Ge&&Ge.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.parse=ls;var os=Wi(),He=ss(Du("assert")),Mt=3,Ki=4,as=8;function cr(e){return e.nodeType===Mt||e.nodeType===as||e.nodeType===Ki}function ie(e){return!e.childNodes||e.childNodes.length===0}function ls(e){let t=new os.DOMParser({errorHandler(){}}).parseFromString(e);(0,He.default)(t.documentElement.nodeName==="plist","malformed document. First element should be <plist>");let r=Te(t.documentElement);return r.length===1&&(r=r[0]),r}function Te(e){let t,r,i,n,s,u;if(!e)return null;if(e.nodeName==="plist"){if(n=[],ie(e))return n;for(t=0;t<e.childNodes.length;t++)cr(e.childNodes[t])||n.push(Te(e.childNodes[t]));return n}else if(e.nodeName==="dict"){if(r=Object.create(null),i=null,u=0,ie(e))return r;for(t=0;t<e.childNodes.length;t++)if(!cr(e.childNodes[t])){if(u%2===0)(0,He.default)(e.childNodes[t].nodeName==="key","Missing key while parsing <dict/>."),i=Te(e.childNodes[t]);else{if(e.childNodes[t].nodeName==="key")throw new Error('Unexpected key "'+Te(e.childNodes[t])+'" while parsing <dict/>.');r[i]=Te(e.childNodes[t])}u+=1}if(u%2===1)throw new Error('Missing value for "'+i+'" while parsing <dict/>');return r}else if(e.nodeName==="array"){if(n=[],ie(e))return n;for(t=0;t<e.childNodes.length;t++)cr(e.childNodes[t])||(s=Te(e.childNodes[t]),s!=null&&n.push(s));return n}else if(e.nodeName!=="#text"){if(e.nodeName==="key")return ie(e)?"":e.childNodes[0].nodeValue;if(e.nodeName==="string"){if(s="",ie(e))return s;for(t=0;t<e.childNodes.length;t++){let c=e.childNodes[t].nodeType;(c===Mt||c===Ki)&&(s+=e.childNodes[t].nodeValue)}return s}else{if(e.nodeName==="integer")return(0,He.default)(!ie(e),'Cannot parse "" as integer.'),parseInt(e.childNodes[0].nodeValue,10);if(e.nodeName==="real"){for((0,He.default)(!ie(e),'Cannot parse "" as real.'),s="",t=0;t<e.childNodes.length;t++)e.childNodes[t].nodeType===Mt&&(s+=e.childNodes[t].nodeValue);return parseFloat(s)}else if(e.nodeName==="data"){if(s="",ie(e))return Buffer.from(s,"base64");for(t=0;t<e.childNodes.length;t++)e.childNodes[t].nodeType===Mt&&(s+=e.childNodes[t].nodeValue.replace(/\s+/g,""));return Buffer.from(s,"base64")}else{if(e.nodeName==="date")return(0,He.default)(!ie(e),'Cannot parse "" as Date.'),new Date(e.childNodes[0].nodeValue);if(e.nodeName==="true")return!0;if(e.nodeName==="false")return!1}}}}});var Zi=M(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});var cs=ri(),hs=Yi();hr.default={parse:hs.parse,build:cs.build}});var Cr=["::1","127.0.0.1"];function it(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function G(e,t,r){let i=it(t),n=i.includes(":")?`[${i}]`:i;return`${e}//${n}:${r}`}function _t(e){let t=it(e);return t==="localhost"||t.endsWith(".localhost")||t==="0.0.0.0"||t==="::1"||/^127(?:\.\d{1,3}){3}$/.test(t)}var Tr="sootsimConfig";function ce(e){return!!e&&Object.keys(e).length>0}function Ie(e){return e?typeof e.runtimeVersion=="string"&&e.runtimeVersion.length>0||ce(e.modules)||ce(e.turboModules)||ce(e.nativeModules)||ce(e.env)||ce(e.network?.remap)||ce(e.settings)||ce(e.initialState):!1}function io(e,t){if(!(!Ie(e)&&!Ie(t)))return Ie(e)?Ie(t)?{runtimeVersion:t.runtimeVersion??e.runtimeVersion,modules:{...e.modules||{},...t.modules||{}},turboModules:{...e.turboModules||{},...t.turboModules||{}},nativeModules:{...e.nativeModules||{},...t.nativeModules||{}},env:{...e.env||{},...t.env||{}},network:{remap:{...e.network?.remap||{},...t.network?.remap||{}}},settings:{...e.settings||{},...t.settings||{}},initialState:{...e.initialState||{},...t.initialState||{}}}:e?{...e}:void 0:t?{...t}:void 0}function Nr(e,t){let r=new URL(e);return Ie(t)?r.searchParams.set(Tr,JSON.stringify(t)):r.searchParams.delete(Tr),r.toString()}var oo="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function Sr(e){return/^https?:\/\//i.test(e)}function Or(e){return e.endsWith(".bundle")}function Ir(e,t){try{let r=new URL(e),i=new URL(t);return!_t(r.hostname)||!_t(i.hostname)?e:(r.hostname=i.hostname,r.toString())}catch{return e}}function wu(e){process.env.SOOTSIM_PREVIEW_PROD_BUNDLE&&(e.searchParams.set("dev","false"),e.searchParams.set("minify","true"),e.searchParams.has("hot")&&e.searchParams.set("hot","false"))}function Lr(e){try{let t=Sr(e),r=new URL(e,"http://sootsim.local");return r.pathname=r.pathname.replace(/\.\.bundle$/,".bundle"),Or(r.pathname)?(r.searchParams.delete("transform.bytecode"),r.searchParams.get("lazy")==="true"&&r.searchParams.set("lazy","false"),wu(r),t?r.toString():`${r.pathname}${r.search}${r.hash}`):e}catch{return e}}function ao(e,t){try{let r=Sr(e),i=new URL(e,"http://sootsim.local");return Or(i.pathname)?(i.searchParams.set("hot",t?"true":"false"),r?i.toString():`${i.pathname}${i.search}${i.hash}`):e}catch{return e}}import{exec as Ts}from"child_process";import{readlink as Ns}from"fs/promises";import Ss from"http";import Os from"net";import{resolve as ou}from"node:path";import{readFile as ds,readdir as ru,stat as dr}from"node:fs/promises";import{join as pe}from"node:path";var Qi=yu(Zi(),1);function Ji(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function fs(e){if(!Ji(e))return null;let t=e.parse;if(typeof t=="function")return n=>Reflect.apply(t,e,[n]);let r=e.default;if(!Ji(r))return null;let i=r.parse;return typeof i=="function"?n=>Reflect.apply(i,r,[n]):null}var ps=fs(Qi.default);function xt(e){return ps?.(e)??null}var mr=1048576,ms=8,fr=32,nu=512,eu=new Map;function iu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function le(e){return typeof e=="string"?e:void 0}function ze(e){if(typeof e!="string")return null;let t=e.trim();return t||null}function Bt(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function pr(e){return typeof e=="string"||typeof e=="boolean"?e:Bt(e)}function gs(e){if(typeof e=="string")switch(e.replaceAll(/[-_\s]/g,"").toLowerCase()){case"alphabet":return"alphabet";case"numbersandpunctuation":return"numbers-and-punctuation";case"numberpad":return"number-pad";case"url":return"url";case"emailaddress":return"email-address";case"namephonepad":return"name-phone-pad";case"asciicapable":return"ascii-capable";default:return}}function Ds(e){if(typeof e=="string")switch(e.replaceAll(/[-_\s]/g,"").toLowerCase()){case"none":return"none";case"sentences":return"sentences";case"words":return"words";case"allcharacters":return"all-characters";default:return}}function ys(e){if(typeof e=="boolean")return e;if(typeof e=="string")switch(e.trim().toLowerCase()){case"yes":return!0;case"no":return!1;default:return}}function ws(e){let t=ze(e);return!t||t.includes("/")||t.includes("\\")||t.includes("..")?null:{file:t,name:t.toLowerCase().endsWith(".plist")?t:`${t}.plist`}}async function tu(e){try{let t=await dr(pe(e,"Root.plist"));return t.isFile()&&t.size<=mr}catch{return!1}}async function bs(e){let t=[pe(e,"Settings.bundle"),pe(e,"ios","Settings.bundle")];for(let r of t)if(await tu(r))return r;try{let r=pe(e,"ios"),n=(await ru(r,{withFileTypes:!0})).filter(s=>s.isDirectory()&&s.name!=="Pods"&&s.name!=="build"&&!s.name.startsWith(".")).map(s=>pe(r,s.name,"Settings.bundle")).sort();for(let s of n)if(await tu(s))return s}catch{}return null}async function As(e){try{let r=(await ru(e,{withFileTypes:!0})).filter(n=>n.isFile()&&n.name.toLowerCase().endsWith(".plist")).map(n=>n.name).sort().slice(0,fr+1);if(r.length===0||r.length>fr)return null;let i=await Promise.all(r.map(async n=>{let s=await dr(pe(e,n));return!s.isFile()||s.size>mr?null:`${n}:${s.size}:${s.mtimeMs}:${s.ctimeMs}`}));return i.some(n=>n===null)?null:i.join("|")}catch{return null}}async function Es(e){try{let t=await dr(e);if(!t.isFile()||t.size>mr)return null;let r=await ds(e,"utf8"),i=xt(r);return iu(i)?i:null}catch{return null}}function vs(e,t,r){if(!Array.isArray(e.Values)||!Array.isArray(e.Titles))return null;let i=[],n=[],s,u=Math.min(e.Values.length,e.Titles.length);for(let m=0;m<u;m++){let p=pr(e.Values[m]),g=le(e.Titles[m]);if(p===null||g===void 0)continue;let w=typeof p=="string"?"string":typeof p=="number"?"number":"boolean";s!==void 0&&w!==s||(s=w,i.push(p),n.push(g))}let c=i[0];if(c===void 0)return null;let a=pr(e.DefaultValue),d=a!==null&&i.includes(a)?a:c;return{type:"multi-value",key:t,title:r,defaultValue:d,currentValue:d,values:i,titles:n}}async function Cs(e,t){if(!iu(e)||t.budget.specifiers>=nu)return null;let r=ze(e.Type);if(!r)return null;if(t.budget.specifiers+=1,r==="PSGroupSpecifier"){let s=le(e.Title),u=le(e.FooterText);return{type:"group",...s!==void 0?{title:s}:null,...u!==void 0?{footer:u}:null}}let i=ze(e.Key);if(r==="PSSliderSpecifier"){if(!i)return null;let s=Bt(e.MinimumValue),u=Bt(e.MaximumValue);if(s===null||u===null||u<=s)return null;let c=Bt(e.DefaultValue),a=Math.min(u,Math.max(s,c??s)),d=le(e.Title),m=le(e.MinimumValueImage),p=le(e.MaximumValueImage);return{type:"slider",key:i,defaultValue:a,currentValue:a,minimumValue:s,maximumValue:u,...d!==void 0?{title:d}:null,...m!==void 0?{minimumValueImage:m}:null,...p!==void 0?{maximumValueImage:p}:null}}if(r==="PSChildPaneSpecifier"){let s=ze(e.Title),u=ws(e.File);if(!s||!u||t.depth>=ms)return null;let c=await uu(u.name,{...t,depth:t.depth+1});return!c||c.length===0?null:{type:"child-pane",title:s,file:u.file,specifiers:c}}if(!i)return null;let n=ze(e.Title)??i;if(r==="PSToggleSwitchSpecifier"){let s=typeof e.DefaultValue=="boolean"?e.DefaultValue:!1;return{type:"toggle",key:i,title:n,defaultValue:s,currentValue:s}}if(r==="PSTextFieldSpecifier"){let s=le(e.DefaultValue)??"",u=le(e.Placeholder),c=gs(e.KeyboardType),a=Ds(e.AutocapitalizationType),d=ys(e.AutocorrectionType);return{type:"text",key:i,title:n,defaultValue:s,currentValue:s,...u!==void 0?{placeholder:u}:null,...typeof e.IsSecure=="boolean"?{secure:e.IsSecure}:null,...c?{keyboardType:c}:null,...a?{autocapitalization:a}:null,...d!==void 0?{autocorrection:d}:null}}if(r==="PSMultiValueSpecifier"||r==="PSRadioGroupSpecifier")return vs(e,i,n);if(r==="PSTitleValueSpecifier"){let s=pr(e.DefaultValue)??"";return{type:"title-value",key:i,title:n,defaultValue:s,currentValue:s}}return null}async function uu(e,t){let r=t.fileCache.get(e);if(r!==void 0)return r;if(t.stack.has(e)||t.budget.files>=fr)return null;t.budget.files+=1;let i=await Es(pe(t.bundlePath,e));if(!i||!Array.isArray(i.PreferenceSpecifiers))return t.fileCache.set(e,null),null;let n=new Set(t.stack);n.add(e);let s=[];for(let u of i.PreferenceSpecifiers){if(t.budget.specifiers>=nu)break;let c=await Cs(u,{...t,stack:n});c&&s.push(c)}return t.fileCache.set(e,s),s}async function su(e){let t=await bs(e);if(!t)return null;let r=await As(t);if(!r)return null;let i=eu.get(t);if(i?.fingerprint===r)return i.specifiers;let n=await uu("Root.plist",{bundlePath:t,depth:0,budget:{files:0,specifiers:0},stack:new Set,fileCache:new Map}),s=n&&n.length>0?n:null;return eu.set(t,{fingerprint:r,specifiers:s}),s}var Is=2e3;function Qe(e,t,r={}){let i,n=new Promise((u,c)=>{i=Ts(e,{encoding:"utf8",timeout:t,...r},(a,d)=>{a?c(a):u({stdout:d})})}),s=new Promise((u,c)=>{setTimeout(()=>{i?.kill("SIGKILL");let d=new Error(`\`${e}\` did not exit within ${t}ms`);Object.assign(d,{killed:!0}),c(d)},t+Is).unref?.()});return Promise.race([n,s])}var Ls=250,Fs=1500,Ms=120,xs=3e4;async function Bs(e,t=Ms){try{return await Promise.any(Cr.map(r=>new Promise((i,n)=>{let s=new Os.Socket,u=!1,c=a=>{u||(u=!0,s.destroy(),a?i(r):n(new Error(`unreachable loopback host ${r}`)))};s.setTimeout(t),s.once("connect",()=>c(!0)),s.once("timeout",()=>c(!1)),s.once("error",()=>c(!1)),s.connect(e,r)})))}catch{return null}}function Ne(e,t,r,i="GET",n=Ls,s={}){return new Promise(u=>{let c=!1,a=g=>{c||(c=!0,u(g))},d=Ss.request({hostname:e,port:t,path:r,method:i,headers:s},g=>{let w="";g.on("data",T=>w+=T.toString());let v=(()=>{let T=g.headers["content-type"];if(typeof T=="string")return T;if(Array.isArray(T))return T[0]})();g.on("end",()=>a({statusCode:g.statusCode||0,body:w,contentType:v,hostname:e}))});d.on("error",()=>a(null)),d.end();let m=setTimeout(()=>{a(null),d.socket?.unref()},n),p=setTimeout(()=>d.destroy(),xs);p.unref?.(),d.on("close",()=>{clearTimeout(m),clearTimeout(p),setImmediate(()=>a(null))})})}var Ps=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0})),au=5170,lu=5200;function Rs(e){let t=Number(process.env.PORT_OFFSET)||0;return e>=au&&e<=lu?!0:t>0&&e>=au+t&&e<=lu+t}function gr(e,t){return!(e<=0||e>=2e4||t.has(e)||Rs(e))}var wr=class extends Error{constructor(){super("could not enumerate listening processes (lsof/ss unavailable or timed out)"),this.name="DevServerScanUnavailableError"}},cu=1e4;function hu(e){return!!(e&&typeof e=="object"&&e.killed)}async function qs(e=[]){let t=new Set(e),r=!1;try{let{stdout:i}=await Qe("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",cu),n=new Map;for(let s of i.trim()?i.trim().split(`
10
- `):[]){let u=s.trim().split(/\s+/);if(u.length<9)continue;let c=Number(u[1]),d=u[8].match(/:(\d+)$/);if(!d)continue;let m=Number(d[1]);gr(m,t)&&(n.has(m)||n.set(m,c))}return{state:"looked",processes:[...n.entries()].map(([s,u])=>({port:s,pid:u}))}}catch(i){hu(i)&&(r=!0)}try{let{stdout:i}=await Qe(`ss -tlnp 2>/dev/null | grep -E '"(node|bun)"'`,cu),n=new Map;for(let s of i.trim()?i.trim().split(`
11
- `):[]){let u=s.match(/:(\d+)\s/),c=s.match(/pid=(\d+)/);if(!u)continue;let a=Number(u[1]),d=c?Number(c[1]):0;gr(a,t)&&(n.has(a)||n.set(a,d))}return{state:"looked",processes:[...n.entries()].map(([s,u])=>({port:s,pid:u}))}}catch(i){hu(i)&&(r=!0)}return r?{state:"could-not-look"}:{state:"looked",processes:Ps.filter(i=>gr(i.port,t))}}function ks(e,t){for(let r of e.split(`
12
- `)){if(!r.includes("LISTEN"))continue;let i=r.trim().split(/\s+/);if(i[3]?.endsWith(`.${t}`))for(let n of i){let s=n.match(/^\S+:(\d+)$/);if(s){let u=Number(s[1]);if(u>0)return u}}}return null}async function br(e){if(!Number.isInteger(e)||e<=0)return null;try{let{stdout:t}=await Qe("netstat -anv -p tcp 2>/dev/null",8e3,{maxBuffer:16777216}),r=ks(t,e);if(r!==null)return r}catch{}try{let{stdout:t}=await Qe("ss -tlnp 2>/dev/null",8e3,{maxBuffer:16777216});for(let r of t.split(`
13
- `)){if(!new RegExp(`:${e}\\s`).test(r))continue;let i=Number(r.match(/pid=(\d+)/)?.[1]);if(i>0)return i}}catch{}return null}var Ye=new Map;async function Pt(e){if(e<=0)return null;let t=Ye.get(e);if(t)return t;try{let r=await Ns(`/proc/${e}/cwd`);if(r)return Ye.set(e,r),r}catch{}try{let{stdout:r}=await Qe(`lsof -b -w -p ${e} -a -d cwd -Fn 2>/dev/null`,8e3);for(let i of r.split(`
14
- `))if(i.startsWith("n")&&i.length>1){let n=i.slice(1).trim();if(n)return Ye.set(e,n),n}}catch{}return null}function _s(e,t,r,i){return{port:t,framework:r,bundleUrl:Se(t,`${G("http:",e,t)}/index.bundle?platform=ios&dev=true&hot=true&minify=false`,i.cwd),hmrUrl:`${G("ws:",e,t)}/hot`,lastSeen:Date.now(),...i}}function Se(e,t,r){let i=r?Er().find(s=>s.preferredPort===e&&ou(s.dir)===ou(r)):void 0,n=i?.runtimeConfig?Nr(t,i.runtimeConfig):t;return Lr(n)}function Us(e){return e.includes("/node_modules/one/metro-entry.bundle")}function js(e){try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}function We(e,t,r){if(!t)return e;try{let i=JSON.parse(t.body),n=i?.extra?.expoClient||i?.extra||{};n.name&&(e.projectName=n.name),n.ios?.bundleIdentifier&&(e.bundleId=n.ios.bundleIdentifier),e.framework==="metro"&&n.sdkVersion&&(e.framework="expo");let s=i?.launchAsset?.url,u=typeof s=="string"?Ir(s,G("http:",t.hostname,e.port)):s;u&&!e.patched&&!Us(e.bundleUrl)&&(e.bundleUrl=Se(e.port,u,e.cwd));let c=n.iconUrl||n.ios?.iconUrl||n.icon||n.ios?.icon;if(c)if(e.iconPath=c,r)if(c.startsWith("http"))e.iconUrl=r(c);else{let a=c.replace(/^\.\//,"");e.iconUrl=r(`${G("http:",t.hostname,e.port)}/assets/${a}`)}else e.iconUrl=c.startsWith("http")?c:`${G("http:",t.hostname,e.port)}/assets/${c.replace(/^\.\//,"")}`}catch{}return e}var Xs=2e4,Ze=new Map,Dr=new Set;function yr(e,t){if(e.projectName)return e;let r=Ze.get(e.port);return r?(r.projectName&&(e.projectName=r.projectName),r.iconUrl&&!e.iconUrl&&(e.iconUrl=r.iconUrl,e.iconPath=r.iconPath),r.bundleId&&!e.bundleId&&(e.bundleId=r.bundleId),e):(Dr.has(e.port)||(Dr.add(e.port),Vs(e,t).finally(()=>Dr.delete(e.port))),e)}async function Vs(e,t){let r=it(new URL(e.bundleUrl).hostname),i=await Ne(r,e.port,"/","GET",Xs,{"expo-platform":"ios"});if(!i||i.statusCode!==200)return;let n=We({port:e.port,framework:"one",bundleUrl:`${G("http:",r,e.port)}/index.bundle`,lastSeen:0},i,t);!n.projectName&&!n.iconUrl||(Ze.set(e.port,{projectName:n.projectName,iconUrl:n.iconUrl,iconPath:n.iconPath,bundleId:n.bundleId}),Ke.delete(e.port))}var ue=new Set,de=new Set,Je=new Set;async function $s(e,t,r){await kt();let i=await Bs(e);if(!i)return null;let n=r?.pid,s=n&&n>0?n:await br(e),u=s?await Pt(s):null,c={...s?{pid:s}:{},...u?{cwd:u}:{}},a="/node_modules/one/metro-entry.bundle?platform=ios&dev=true",[d,m,p,g]=await Promise.all([ue.has(e)?Promise.resolve(null):Ne(i,e,"/__soot/"),Ne(i,e,"/status"),Je.has(e)?Promise.resolve(null):Ne(i,e,"/","GET",Fs,{"expo-platform":"ios"}),de.has(e)?Promise.resolve(null):Ne(i,e,"/_expo/status")]);g&&g.statusCode===200?de.delete(e):de.has(e)||de.add(e);let w=p?js(p.body):null,v=typeof w?.launchAsset?.url=="string"?w.launchAsset.url:null,T=w?.extra?.expoClient||w?.extra||{},C=p?w&&(v||typeof T.name=="string")?"resolved":"no-manifest":"no-answer";if(C==="resolved"){ue.add(e);let f=v||`${G("http:",i,e)}/index.bundle?platform=ios&dev=true&hot=true&minify=false`,h=f.includes("/one/metro-entry.bundle")?"one":"expo";return We({port:e,framework:h,bundleUrl:Se(e,f,c.cwd),hmrUrl:`${G("ws:",i,e)}/hot`,lastSeen:Date.now(),...c},p,t)}if(m&&m.body.includes("packager-status:running")){ue.add(e);let f=_s(i,e,g&&g.statusCode===200?"expo":"metro",c);return C==="no-answer"&&(f.bundleUrlProvisional=!0),yr(We(f,p,t),t)}if(d&&d.statusCode===200&&d.body.includes("sootsim-patched"))return ue.delete(e),yr(We({port:e,framework:"one",bundleUrl:Se(e,`${G("http:",i,e)}/__soot/bundle.js`,c.cwd),hmrUrl:`${G("ws:",i,e)}/hot`,lastSeen:Date.now(),patched:!0,...c},p,t),t);if(m&&m.statusCode===200||g&&g.statusCode===200||p&&p.statusCode===200&&w!=null)return null;let x=await Ne(i,e,a,"HEAD");return x&&x.statusCode>0&&x.statusCode<400&&/application\/javascript/i.test(x.contentType||"")?(ue.add(e),Je.add(e),yr(We({port:e,framework:"one",bundleUrl:Se(e,`${G("http:",i,e)}${a}&minify=false`,c.cwd),hmrUrl:`${G("ws:",i,e)}/hot`,lastSeen:Date.now(),...c},p,t),t)):(ue.add(e),null)}function Hs(e){return!!e.bundleId?.trim().toLowerCase()?.startsWith("dev.sootsim.")}var Ke=new Map,Gs=3e4,zs=1500;function Ws(e){return!e||e.framework==="metro"||e.framework==="unknown"}function Ks(e){return e?Se(e.port,e.bundleUrl,e.cwd)===e.bundleUrl:!0}function Ys(e,t,r=Date.now()){if(t===0||e.pid!==t||!Ks(e.result))return!1;let i=r-e.cachedAt;return!(e.result===null&&i>=Gs||Ws(e.result)&&i>=zs)}async function Zs(e,t){let r=await su(t);r?(e.settingsBundle=r,e.settingsStorageScopeUrl=e.bundleUrl):(delete e.settingsBundle,delete e.settingsStorageScopeUrl)}async function oa(e={}){await kt();let t=await qs(e.excludePorts);if(t.state==="could-not-look")throw new wr;let r=t.processes,i=new Set(r.map(a=>a.port));for(let a of[...Ke.keys()])i.has(a)||Ke.delete(a);for(let a of[...ue])i.has(a)||ue.delete(a);for(let a of[...de])i.has(a)||de.delete(a);for(let a of[...Je])i.has(a)||Je.delete(a);for(let a of[...Ze.keys()])i.has(a)||Ze.delete(a);let n=[],s=[];for(let{port:a,pid:d}of r){let m=Ke.get(a);if(m&&Ys(m,d)){m.result&&n.push(m.result);continue}m&&m.pid!==d&&(ue.delete(a),de.delete(a),Je.delete(a),Ze.delete(a)),s.push({port:a,pid:d})}s.length>0&&(await Promise.all(s.map(d=>$s(d.port,e.buildIconProxyUrl,d)))).forEach((d,m)=>{let{port:p,pid:g}=s[m];g!==0&&Ke.set(p,{pid:g,result:d,cachedAt:Date.now()}),d&&n.push(d)});let u=new Map;for(let{port:a,pid:d}of r)d>0&&u.set(a,d);await Promise.all(n.map(async a=>{let d=u.get(a.port);if(!d)return;a.pid=d;let m=await Pt(d);m&&(a.cwd=m,await Zs(a,m))}));let c=new Set(u.values());for(let a of[...Ye.keys()])c.has(a)||Ye.delete(a);return n.filter(a=>!Hs(a))}import{createHash as eo}from"node:crypto";import Oe from"node:fs";import{createRequire as Ar}from"node:module";import B from"node:path";var fu=/\.(ttf|otf|woff|woff2)$/i;function Js(e,t,r){if(!e||typeof e!="object")return;let i=e.fonts;if(Array.isArray(i))for(let u of i)typeof u=="string"&&r.push(u);let n=e[t];if(!n||typeof n!="object")return;let s=n.fonts;if(Array.isArray(s))for(let u of s){if(typeof u=="string"){r.push(u);continue}if(!u||typeof u!="object")continue;let c=u.fontDefinitions;if(Array.isArray(c))for(let a of c){if(!a||typeof a!="object")continue;let d=a.path;typeof d=="string"&&r.push(d)}}}function pu(e,t){if(!Array.isArray(e))return[];let r=[];for(let i of e){let n=Array.isArray(i)?i[0]:i;if(typeof n!="string"||!/(^|\/)expo-font$/.test(n))continue;let s=Array.isArray(i)?i[1]??{}:{};Js(s,t,r)}return r}function Qs(e){return e.slice(e.lastIndexOf("/")+1).replace(fu,"")}function du(e,t){let r=t.replace(/\/+$/,""),i=new Set,n=[];for(let s of e){let u=s.replace(/^\.\//,"").replace(/^\/+/,"");!u||i.has(u)||(i.add(u),fu.test(u)&&n.push({family:Qs(u),url:`${r}/assets/${u}`}))}return n}var mu=Ar(import.meta.url);function gu(e){try{let t=new URL(e),r=t.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return t.origin}catch{}return null}function ya(e){let t=gu(e.bundleUrl);if(!t)return[];let r=vr(e.projectDir),i=r?.appDir??null;if(!i)return[];let n=(e.platform||process.env.CONTRAST_PLATFORM||"ios").toLowerCase(),s=null;if(r)try{let m=mu.resolve("@expo/config",{paths:[i]}),p=mu(m);typeof p.getConfig=="function"&&(s=p.getConfig)}catch{}let u=[];if(s)try{let m=s(i,{skipSDKVersionRequirement:!0});if(m?.exp&&typeof m.exp=="object"){let p=m.exp.plugins;Array.isArray(p)&&(u=p)}}catch{}let c=pu(u,n==="android"?"android":"ios").slice(0,256),a=0,d=(m,p)=>{let g=[{dir:m,depth:0}],w=0;for(;w<g.length&&a<64&&c.length<256;){let v=g[w++];if(!v)continue;a++;let T;try{T=Oe.readdirSync(v.dir,{withFileTypes:!0})}catch{continue}for(let C of T){if(C.isSymbolicLink())continue;let S=B.join(v.dir,C.name);if(C.isDirectory()){v.depth<4&&g.length<64&&!C.name.startsWith(".")&&g.push({dir:S,depth:v.depth+1});continue}if(!C.isFile()||!/\.(ttf|otf|woff|woff2)$/i.test(C.name))continue;let x=B.relative(m,S).split(B.sep).join("/");if(c.push(B.posix.join(p,x)),c.length>=256)break}}};try{let m=JSON.parse(Oe.readFileSync(B.join(i,"package.json"),"utf8")),p=new Set;for(let w of["dependencies","devDependencies","optionalDependencies"]){let v=Reflect.get(m,w);if(!(!v||typeof v!="object"))for(let T of Object.keys(v))p.add(T)}let g=[...p].filter(w=>w==="react-native-vector-icons"||w.startsWith("@react-native-vector-icons/"));if(g.length>0){let w=Reflect.get(m,"reactNativeVectorIcons"),v=w&&typeof w=="object"?Reflect.get(w,"fontDir"):null,T=typeof v=="string"?v:"rnvi-fonts",C=B.resolve(i,T),S=B.relative(i,C);!S.startsWith("..")&&!B.isAbsolute(S)&&d(C,S.split(B.sep).join("/"));let x=Ar(B.join(i,"package.json"));for(let f of g)try{let h=x.resolve(f),b=f.split("/").join(B.sep),o=`${B.sep}node_modules${B.sep}${b}${B.sep}`,D=h.lastIndexOf(o);if(D===-1)continue;let E=h.slice(0,D+o.length-1),l=f==="react-native-vector-icons"?"Fonts":"fonts";d(B.join(E,l),B.posix.join("node_modules",f,l))}catch{}}}catch{}try{let m=B.join(i,"react-native.config.js");if(Oe.statSync(m).isFile()){let g=Ar(B.join(i,"package.json"))(m),w=g&&typeof g=="object"?Reflect.get(g,"assets"):null;if(Array.isArray(w))for(let v of w){if(typeof v!="string")continue;let T=B.resolve(i,v),C=B.relative(i,T);C.startsWith("..")||B.isAbsolute(C)||d(T,C.split(B.sep).join("/"))}}}catch{}if(n==="ios"){let m=B.join(i,"ios");try{let p=Oe.readdirSync(m,{withFileTypes:!0}).filter(w=>w.isDirectory()&&!w.isSymbolicLink()&&w.name!=="Pods"&&w.name!=="build"&&!w.name.startsWith(".")).slice(0,64),g=[B.join(m,"Info.plist")];for(let w of p)g.push(B.join(m,w.name,"Info.plist"));for(let w of g){let v;try{v=xt(Oe.readFileSync(w,"utf8"))}catch{continue}if(!v||typeof v!="object"||Array.isArray(v))continue;let T=Reflect.get(v,"UIAppFonts");if(Array.isArray(T))for(let C of T){if(typeof C!="string")continue;let x=[B.resolve(B.dirname(w),C),B.resolve(m,C)].find(f=>{let h=B.relative(i,f);if(h.startsWith("..")||B.isAbsolute(h))return!1;try{return Oe.statSync(f).isFile()}catch{return!1}});x&&c.push(B.relative(i,x).split(B.sep).join("/"))}}}catch{}}return du(c,t)}async function wa(e,t){let r=gu(e);if(!r)return null;let i=new AbortController,n=setTimeout(()=>i.abort(),t?.timeoutMs??1500),s=!1;try{let a=await fetch(`${r}/`,{headers:{"expo-platform":"ios",Accept:"application/json"},signal:i.signal});if(a.ok){let d=await a.json();s=!0;let m=d?.extra?.expoClient?._internal?.projectRoot;if(typeof m=="string"&&m.length>0)return m}}catch{}finally{clearTimeout(n)}if(s)return null;let u=Number(new URL(r).port);if(!Number.isFinite(u)||u<=0)return null;let c=await br(u);return c===null?null:Pt(c)}function ba(e){return e.map(t=>`${encodeURIComponent(t.url)}::${encodeURIComponent(t.family)}`).join(",")}function to(e){let t=[];for(let r of e.split(",")){let i=r.trim();if(!i)continue;let n=i.indexOf("::"),s=n===-1?i:i.slice(0,n);try{t.push(decodeURIComponent(s))}catch{t.push(s)}}return t.filter(Boolean)}function ro(e){let t=(e.split("?")[0].split(".").pop()||"").toLowerCase();return t==="ttf"?"font/ttf":t==="otf"?"font/otf":t==="woff"?"font/woff":t==="woff2"?"font/woff2":"application/octet-stream"}async function Aa(e,t){let r=[],i=new Set;for(let n of to(e)){let s=eo("sha256").update(n).digest("hex");if(!i.has(s)){i.add(s);try{let u=await fetch(n);if(!u.ok){t?.onError?.(n,new Error(`${u.status} ${u.statusText}`));continue}let c=new Uint8Array(await u.arrayBuffer());r.push({url:n,urlhash:s,contentType:ro(n),bytes:c}),t?.onStaged?.({url:n,byteLength:c.byteLength})}catch(u){t?.onError?.(n,u)}}}return r}export{Cr as a,it as b,G as c,_t as d,io as e,Nr as f,oo as g,Ir as h,Lr as i,ao as j,$s as k,oa as l,ya as m,wa as n,ba as o,Aa as p};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as r}from"./chunk-5HHWECGT.js";function o(){if(!r())return null;let t=process.env.VITE_POSTHOG_API_KEY||"";if(!t)return null;let e=process.env.CONTRAST_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:t,host:e.replace(/\/+$/,"")}}function i(t,e){return t.trim().slice(0,e)}function s(t){let e=t.kind==="package_incompatibility"?{package_name:i(t.packageName,160),package_version:i(t.packageVersion,80),...t.unsupportedApi?{unsupported_api:i(t.unsupportedApi,160)}:{}}:{error_class:i(t.errorClass,160)};return{event:t.kind,distinct_id:"rnx-cli-diagnostic",properties:e}}var n=[];function a(t){r()&&n.push(t)}function c(t){let e=t instanceof Error?t.constructor.name:typeof t;a({kind:"error_shape",errorClass:e})}async function l(){if(n.length===0)return;let t=o();if(!t){n.length=0;return}let e=n.splice(0,n.length).map(s);try{await fetch(`${t.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:t.apiKey,batch:e}),signal:AbortSignal.timeout(2e3)})}catch{}}export{s as a,a as b,c,l as d};
@@ -1,7 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as fe,b as Ge}from"./chunk-XYSDYGKC.js";import{e as rt}from"./chunk-HNDWYCND.js";import{c as Ve}from"./chunk-YNHRSDVG.js";import{a as Ze,b as et,d as ot}from"./chunk-USM3P74H.js";import{a as Ne,c as Fe,d as k,e as de,f as A,g as me,h as He,i as pe,j as je,k as We,m as Qe,n as Ye,o as Xe}from"./chunk-CX7VCKAT.js";import{m as L}from"./chunk-2BRBFLWA.js";import{a as Ke,b as qe}from"./chunk-C6B5FOP3.js";import{h as tt,p as nt}from"./chunk-5PZVYF42.js";import{a as Je}from"./chunk-PBOWUNXO.js";import{a as ze}from"./chunk-MP2GPO4T.js";import{b as le,e as Me}from"./chunk-H4MYYOYJ.js";import{b as Oe,f as Be,g as B,h as P,i as D,n as De,o as ce,p as ue,r as Ae,s as Le,t as T,u as I,v as E}from"./chunk-7NCPUZ52.js";import{b as G,c as d}from"./chunk-T4ISWS5H.js";import{f as _e}from"./chunk-F5F7FIPM.js";import{a as Ee}from"./chunk-LMHBU5LZ.js";import{D as Re,M as se,P as ae,R as O,T as Te,l as ie}from"./chunk-HWDVC6YA.js";import{a as oe}from"./chunk-25KRGDZT.js";import{spawn as mt,spawnSync as pt}from"node:child_process";import _ from"node:fs";import Kt from"node:os";import U from"node:path";import{WebSocket as ge}from"ws";function it(e){return new Error(`could not resolve a native bundle for ${e}. pass an explicit bundle URL or open Connect and choose the app there.`)}function Ot(e,n){return e?.includes("/one/metro-entry.bundle")?"one":typeof n=="string"&&n?"expo":"unknown"}function Bt(e,n,t){return`${e}//${n}:${t}`}function Dt(e){if(typeof window>"u")return!1;try{let n=new URL(e);return k(n.hostname)&&k(window.location.hostname)&&n.origin!==window.location.origin}catch{return!1}}async function lt(e,n){let t={...n,cache:n?.cache??"no-store"};return Dt(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,t):fetch(e,t)}function At(e){return e==="https:"?443:80}function Lt(e){let n=e.pathname||"/";return(n==="/"||n==="")&&!e.search&&!e.hash}async function ct(e){try{let n=await fetch("/__server-scan",{cache:"no-store"});if(!n.ok||!(n.headers.get("content-type")||"").toLowerCase().includes("json"))return null;let t=await n.json();if(!Array.isArray(t))return null;let r=t.find(o=>!!o&&typeof o=="object"&&o.port===e&&typeof o.bundleUrl=="string");return!r||r.bundleUrlProvisional?null:{bundleUrl:pe(r.bundleUrl),port:e,framework:typeof r.framework=="string"?r.framework:"unknown",projectName:typeof r.projectName=="string"?r.projectName:void 0}}catch{return null}}var Nt=5e3,Ft=3e4,Ht=1e3;async function st(e,n){let t,r=lt(`${e}/`,{headers:{"expo-platform":"ios"}}).then(async c=>c.ok?{ok:!0,body:await c.text()}:null,()=>{}),o=await Promise.race([r,new Promise(c=>setTimeout(()=>c("timeout"),Nt).unref?.())]);if(o==="timeout"||o===void 0)return{state:"no-answer"};if(o===null)return{state:"no-manifest"};if(t=o.body,!t.trim())return{state:"no-answer"};let i;try{i=JSON.parse(t)}catch{return{state:"no-manifest"}}let a=i?.extra?.expoClient||i?.extra||{},s=typeof i?.launchAsset?.url=="string"?i.launchAsset.url:void 0,l=s?He(s,e):void 0;return!l&&!a.name?{state:"no-manifest"}:{state:"resolved",bundle:{bundleUrl:pe(l||`${e}${me}`),port:n,framework:Ot(l,a.sdkVersion),projectName:a.name}}}async function at(e){try{let n=await lt(`${e}/status`);return n.ok?(await n.text()).includes("packager-status:running"):!1}catch{return!1}}async function ut(e,n){let t=e.replace(/\/+$/,""),r=await st(t,n),o=!1;if(r.state==="no-answer"){if(o=await at(t),!o)return null;let i=Date.now()+Ft;for(;r.state==="no-answer"&&Date.now()<i;)await new Promise(a=>setTimeout(a,Ht)),r=await st(t,n)}return r.state==="resolved"?r.bundle:r.state==="no-answer"||!o&&!await at(t)?null:{bundleUrl:`${t}${me}`,port:n,framework:"metro"}}async function jt(e,n){try{if(k(new URL(e).hostname)){let t=await ct(n);if(t)return t}}catch{}return ut(e,n)}async function Wt(e){let n=await ct(e);return n||((await Promise.all(Ne.map(r=>ut(Fe("http:",r,e),e)))).find(r=>r!==null)??null)}async function dt(e){let n=e.trim();if(/^\d+$/.test(n)){let s=parseInt(n,10),l=await Wt(s);if(l)return l;throw it(`localhost:${s}`)}let t=n.startsWith("http")?n:`http://${n}`,r;try{r=new URL(t)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let o=r.protocol||"http:",i=r.port?parseInt(r.port,10):At(o),a=Bt(o,r.hostname,i);if(Lt(r)){let s=await jt(a,i);if(s)return s;throw it(a)}return{bundleUrl:r.toString(),port:i,framework:"unknown"}}var qt=12e4,ft=100,Vt=5e3,gt=1e4,Gt={rn:"/rn",connectrn:"/rn","connect-rn":"/rn",clock:"/app/clock","native-ui":"/app/native-ui",tamagui:"/app/tamagui",settings:"/app/settings",photos:"/app/photos",camera:"/app/camera"};function $(e){return new Promise(n=>setTimeout(n,e))}function ht(e){let n=process.env[e]?.trim();if(!n)return null;let t=Number(n);return Number.isInteger(t)&&t>0?t:null}function zt(){let e=ht("SOOTSIM_DRIVER_CONNECT_TIMEOUT_MS")??ht("SOOTSIM_PW_CONNECT_TIMEOUT_MS")??qt;return{timeoutMs:e,hostTimeoutMs:e+Vt,intervalMs:ft,attempts:Math.max(1,Math.ceil(e/ft))}}function wt(e){return e==="electron"||e==="playwright"}function he(e,n){return n==="playwright"?e.meta?.sootsimHostDriver==="playwright":e.userAgent?.includes("Electron/")===!0}function Jt(e,n){return e.includes("--headless")?!0:e.includes("--headed")?!1:n==="playwright"&&process.platform==="linux"&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY?(console.error(" no display detected \u2192 running playwright headless (override with --headed)"),!0):!1}function J(e){return e.trim()}async function Qt(e,n=!1){let t=ae();bt(e,n,t);let r=ce(e);if((n||r!==null)&&await we(e,250))return e;if(t&&O(t)&&await we(t.bridgePort,500))return t.bridgePort;if(t&&O(t))throw new Error(`rnx bridge lockfile is fresh (port ${t.bridgePort}) but the bridge is not reachable. run \`rnx daemon restart\` or \`rnx daemon uninstall\`.`);await Yt();let o=Xt(["serve","--quiet","--port",String(e)]),i=null;o.once("exit",(s,l)=>{i=String(s??l??"unknown")}),o.unref();let a=Date.now()+gt;for(;Date.now()<a;){let s=ae();if(bt(e,n,s),s&&O(s)&&await we(s.bridgePort,250))return console.error(` Started a local bridge on port ${s.bridgePort}. Run \`rnx daemon install\` to keep it ready between commands.`),s.bridgePort;if(i)throw new Error(`rnx bridge exited before becoming ready (exit ${i})`);await $(150)}throw new Error(`rnx bridge did not start within ${Math.round(gt/1e3)}s`)}function bt(e,n,t){if(!(!n||!t||!O(t)||t.bridgePort===e))throw new Error(`${oe.commandName} open: requested bridge port ${e}, but the active daemon owns port ${t.bridgePort}. explicit --port never selects another bridge; stop that daemon or use an isolated SOOTSIM_HOME.`)}async function Yt(){let e=se();if(e&&_.existsSync(ie(e)))return;console.error(" installing rnx engine runtime...");let{runRuntime:n}=await import("./runtime-4EP6YJVL.js");await n(["install"],{})}function Xt(e){let n=process.argv[1];return n&&_.existsSync(n)?mt(process.execPath,[n,...e],{detached:!0,stdio:"ignore",env:process.env}):mt(oe.commandName,e,{detached:!0,stdio:"ignore",env:process.env})}function we(e,n){return new Promise(t=>{let r=new ge(`ws://127.0.0.1:${e}`,{handshakeTimeout:n}),o=!1,i=a=>{o||(o=!0,r.readyState===ge.OPEN?r.close():r.readyState===ge.CONNECTING&&r.terminate(),t(a))};r.once("open",()=>i(!0)),r.on("error",()=>i(!1)),setTimeout(()=>i(!1),n)})}function ve(e){try{let n=new URL(e),t=n.pathname.replace(/\/+$/,"")||"/";return n.searchParams.has("open")||n.searchParams.has("port")||n.searchParams.has("bundle")||n.searchParams.has("demo")||n.pathname.includes("/sootsim/index.html")||t==="/sootsim"||n.pathname==="/__soot"||n.pathname==="/__soot/"||t==="/rn"||/^\/rn\/[^/]+$/i.test(t)||/^\/app\/[^/]+$/i.test(t)||t==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(t)||/^\/__soot\/app\/[^/]+$/i.test(t)}catch{return!1}}function Zt(e){try{let n=new URL(e,"http://sootsim.local");if(n.origin!=="http://sootsim.local")return!1;let t=n.pathname.replace(/\/+$/,"")||"/";return t==="/rn"||/^\/rn\/[^/]+$/i.test(t)||/^\/app\/[^/]+$/i.test(t)||t==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(t)||/^\/__soot\/app\/[^/]+$/i.test(t)}catch{return!1}}function en(e,n){let t=new URL(e,"http://sootsim.local"),r=new URL(n),o=Q(r.pathname),i=t.pathname.startsWith("/__soot/")?t.pathname.slice(7):t.pathname;return r.pathname=`${o}${i}`,r.search=t.search,r.hash=t.hash,r.toString()}function tn(e){try{let n=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(n)||/^\/build\/.+/.test(n)}catch{return!1}}async function mr(e){let n=J(e);return(await Se(n)).bundleUrl}function nn(e){try{let n=new URL(e.startsWith("http")?e:`http://${e}`),t=n.pathname||"/";if(t!=="/"&&t!==""||n.search||n.hash||!k(n.hostname))return null;let r=n.port?Number(n.port):n.protocol==="https:"?443:80;return Number.isFinite(r)&&r>0?r:null}catch{return null}}async function Se(e){let n=J(e),t=/^\d+$/.test(n)?Number(n):nn(n);if(t&&t>0){let r=await We(t);if(r&&!r.bundleUrlProvisional)return{bundleUrl:r.bundleUrl,port:r.port,framework:r.framework,projectName:r.projectName}}return dt(n)}function Q(e){let n=e.replace(/\/+$/,"")||"/";return n==="/__soot"||n.startsWith("/__soot/")?"/__soot":""}function rn(e,n){let t=J(e),r=new URL(n),o=Q(r.pathname);return r.pathname=`${o}/rn`,r.searchParams.delete("bundle"),r.searchParams.delete("demo"),r.searchParams.delete("app"),r.searchParams.delete("open"),r.searchParams.delete("port"),/^\d+$/.test(t)?r.pathname=`${o}/rn/${t}`:(r.pathname=`${o}/rn`,r.searchParams.set("open",t)),r.toString()}function Pt(e){let n=J(e);return/^\d+$/.test(n)||/^https?:\/\//i.test(n)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(n)}async function on(e,n,t={}){let r=t.resolvedBundle??await Se(e),o=new URL(n),i=Q(o.pathname);o.pathname=`${i}/rn`,o.searchParams.delete("open"),o.searchParams.delete("port"),o.searchParams.delete("demo"),o.searchParams.delete("app");let a=t.hot===void 0?r.bundleUrl:je(r.bundleUrl,t.hot);return o.searchParams.set("bundle",a),o.toString()}function sn(e){return e.startsWith("~/")?U.join(Kt.homedir(),e.slice(2)):U.isAbsolute(e)?e:U.resolve(process.cwd(),e)}function an(e){let n={},t={};for(let o=0;o<e.length;o++){if(e[o]==="--replace"){let i=e[o+1];i||(console.error(" rnx open: --replace expects <module>=<file>"),d(1));let a=i.indexOf("=");(a<=0||a===i.length-1)&&(console.error(" rnx open: --replace expects <module>=<file>"),d(1));let s=i.slice(0,a).trim(),l=sn(i.slice(a+1).trim());_.existsSync(l)||(console.error(` rnx open: replacement file not found: ${l}`),d(1)),n[s]={file:l},o++;continue}if(e[o]==="--remap"){let i=e[o+1],a=i?i.indexOf("="):-1;(!i||a<=0||a===i.length-1)&&(console.error(" rnx open: --remap expects <host:port>=<host:port>"),d(1)),t[i.slice(0,a).trim()]=i.slice(a+1).trim(),o++;continue}}let r={};return Object.keys(n).length>0&&(r.modules=n),Object.keys(t).length>0&&(r.network={remap:t}),r.modules||r.network?r:void 0}async function ln(e){if(!e)return null;let n=await Ye(e.bundleUrl);return n?ze(n):null}async function cn(e){if(_.existsSync(U.join(ie(e),"index.html")))return;console.error(` installing configured engine runtime ${e}...`);let n=await _e.install({version:e,setActive:!1,protectVersions:Te()});console.error(` installed engine runtime ${n.version}`)}function un(e,n){let t=n??(fe()?void 0:se()??void 0);if(!t)return e;let r=new URL(e);if(!k(r.hostname)){if(!n)return e;throw new Error(`runtimeVersion ${t} requires a local rnx host; got ${r.origin}`)}return r.hostname=Ge(t),r.toString()}function It(){return De().shellBaseUrl}function dn(e){return ce(e)?.shellBaseUrl??Oe(e)??It()}async function mn(e,n){try{let t=new URL(e),r=t.searchParams.get("bundle")||"";if(!r||!n)return e;let o=Qe({bundleUrl:r,projectDir:n.appDir});if(o.length===0)return e;let i=await pn(o);return i.length===0?e:(t.searchParams.set("appFonts",Xe(i)),t.toString())}catch{return e}}async function pn(e){let n=await Promise.all(e.map(async r=>{let o=new AbortController,i=setTimeout(()=>o.abort(),1500);try{let a=await fetch(r.url,{method:"HEAD",signal:o.signal});return a.status>=200&&a.status<400?r:null}catch{return null}finally{clearTimeout(i)}})),t=[];for(let r of n)r!==null&&t.push(r);return t}async function fn(e,n,t={}){if(!e)return new URL(n).toString();if(ve(e))return new URL(e).toString();if(Zt(e))return en(e,n);let r=Gt[e.toLowerCase()];if(r){let o=new URL(n),i=Q(o.pathname);return o.pathname=`${i}${r}`,o.toString()}return Pt(e)?on(e,n,t):rn(e,n)}async function gn(e,n){try{let t=new URL(e),r=t.searchParams.get("bundle")||"";if(!r||!n)return e;let o=Ze({bundleUrl:r,projectDir:n.appDir});return!o||o.imageUrl&&!await hn(o.imageUrl)?e:(t.searchParams.set("appSplash",et(o)),t.toString())}catch{return e}}async function hn(e){let n=new AbortController,t=setTimeout(()=>n.abort(),1500);try{let r=await fetch(e,{method:"HEAD",signal:n.signal});return r.status>=200&&r.status<400}catch{return!1}finally{clearTimeout(t)}}async function z(e,n=It(),t={}){let r=await fn(e,n,t),o=await gn(await mn(r,t.project),t.project);if(!t.device)return o;let i=new URL(o);return i.searchParams.set("device",t.device),i.toString()}function vt(e,n){let t=e?.url||e?.origin||n;try{let r=new URL(t);return r.searchParams.delete("bundle"),r.searchParams.delete("demo"),r.searchParams.delete("app"),r.searchParams.delete("open"),r.searchParams.delete("port"),r.searchParams.delete("inspectOpen"),r.searchParams.delete("appFonts"),r.searchParams.delete("appSplash"),r.toString()}catch{return n}}async function wn(e,n,t,r={}){let o=new URL(await z(e,n,r));return o.searchParams.set("inspectOpen",t),o.toString()}async function bn(e,n,t,r={}){let o=r.attempts??30,i=r.intervalMs??500,a=r.minNodeCount??10;for(let s=0;s<o;s++){let l=I(e,{commandTimeoutMs:n,simId:t,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>a)return{bridge:l,count:c}}catch{}l.close(),await $(i)}return null}function vn(e){if(!e)return null;try{let n=new URL(e);if(n.searchParams.has("bundle")){let t=n.searchParams.get("bundle")||"";try{let r=new URL(t),o=r.pathname.length>36?`...${r.pathname.slice(-36)}`:r.pathname;return`bundle ${r.host}${o}`}catch{return"bundle"}}return n.searchParams.has("port")?`connect :${n.searchParams.get("port")||""}`:n.searchParams.has("open")?`connect ${n.searchParams.get("open")||""}`:n.searchParams.has("demo")?`demo ${n.searchParams.get("demo")||"default"}`:n.pathname.includes("/sootsim/index.html")||n.pathname==="/sootsim/"||n.pathname==="/sootsim"?"embedded rnx":null}catch{return null}}function yn(e){let n=e.indexOf(":");if(n<=0)return e.length>24?`${e.slice(0,21)}\u2026`:e;let t=e.slice(0,n),r=e.slice(n+1),o=r.length>12?`${r.slice(0,8)}\u2026`:r;return t==="TM_SESSION"||t==="CLAUDE_CODE_SESSION_ID"||t==="CODEX_THREAD_ID"?`agent ${o}`:`${t} ${o}`}function pr(e,n){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
5
- `);for(let t of e){let r=t.lockedBy&&t.lockExpiresAt?`locked by ${yn(t.lockedBy)} (${Math.max(0,Math.round((t.lockExpiresAt-Date.now())/1e3))}s)`:"",o=[t.isPrimary?"primary":"",t.id===n?"selected":"",t.readyState,t.userVisible===!1?"hidden":t.userVisible===!0?"visible":"",t.attachedCliCount&&t.attachedCliCount>0?"in use":"",t.userFocused?"focused":"",r].filter(Boolean);console.log(` ${t.id}${o.length?` [${o.join(", ")}]`:""}`);let i=vn(t.url);if(i)console.log(` loaded: ${i}`);else if(t.url){let s=t.url.length>96?`${t.url.slice(0,93)}\u2026`:t.url;console.log(` url: ${s}`)}else t.origin&&console.log(` origin: ${t.origin}`);let a=Sn(t);a&&console.log(` engine: ${a}`),t.title&&console.log(` title: ${t.title}`),t.visibilityState&&t.visibilityState!=="visible"&&console.log(` visibility: ${t.visibilityState}`),console.log(` connected: ${yt(Date.now()-t.connectedAt)}`),t.lastActiveAt&&t.lastActiveAt>0&&console.log(` last active: ${yt(Date.now()-t.lastActiveAt)}`)}}function Sn(e){let n=e.url||e.origin||"";if(!n)return null;try{let t=new URL(n).port;return t==="5173"?"dev \u2014 local source (:5173)":t==="3000"?"Contrast app embedded (:3000)":fe()?`dev \u2014 local build (:${t||"?"})`:`runtime \u2014 published engine (:${t||"?"})`}catch{return null}}function yt(e){let n=Math.max(0,Math.round(e/1e3));return n<60?`${n}s ago`:n<3600?`${Math.round(n/60)}m ago`:n<86400?`${Math.round(n/3600)}h ago`:`${Math.round(n/86400)}d ago`}async function fr(e,n,t,r={}){let o=r.attempts??30,i=r.intervalMs??500;for(let a=0;a<o;a++){let s=I(e,{commandTimeoutMs:n});try{let c=(await s.listSims()).find(t);if(c)return c}catch{}finally{s.close()}await $(i)}return null}async function $n(e,n,t,r,o={}){let i=o.attempts??30,a=o.intervalMs??500,s=!!r&&Number.isInteger(r)&&r>1,l=()=>s&&r!==void 0&&!ye(r);for(let c=0;c<i;c++){if(l())return{kind:"host-exit"};let m=I(e,{commandTimeoutMs:n});try{let h=(await m.listSims()).find(t);if(h)return l()?{kind:"host-exit"}:{kind:"match",sim:h}}catch{}finally{m.close()}if(l())return{kind:"host-exit"};await $(a)}return{kind:"timeout"}}async function xn(e,n,t,r={}){let o=r.attempts??20,i=r.intervalMs??250;for(let a=0;a<o;a++){let s=I(e,{commandTimeoutMs:n});try{let c=(await s.listSims()).find(m=>m.id===t);if(!c||c.readyState!=="open")return!0}catch{return!0}finally{s.close()}await $(i)}return!1}function Pn(e){let n=e.meta;if(!n||n.sootsimHostDriver!=="playwright")return null;let t=Number(n.sootsimHostPid);return!Number.isInteger(t)||t<=1||t===process.pid?null:t}function In(e){if(!e.connectAckFile)return!1;try{return _.writeFileSync(e.connectAckFile,`${JSON.stringify({connectedAt:Date.now(),pid:e.pid??null})}
6
- `,{flag:"w"}),!0}catch{return!1}}function St(e){if(e.diagnosticLogPath)try{let n=_.readFileSync(e.diagnosticLogPath,"utf8").trim();if(!n){console.error(` ${U.basename(e.diagnosticLogPath)} was empty`);return}let t=n.length>4e3?`\u2026
7
- ${n.slice(-4e3)}`:n;console.error(` ${U.basename(e.diagnosticLogPath)}:`),console.error(t)}catch(n){let t=n instanceof Error?n.message:String(n);console.error(` failed to read ${U.basename(e.diagnosticLogPath)}: ${t}`)}}function ye(e){try{return process.kill(e,0),!0}catch(n){return n?.code==="EPERM"}}async function kn(e,n=2500){let t=Date.now()+n;for(;Date.now()<t;){if(!ye(e))return!0;await $(100)}return!ye(e)}function Cn(e){let n=pt("ps",["-o","command=","-p",String(e)],{encoding:"utf8",stdio:["ignore","pipe","pipe"]}),t=pt("ps",["eww","-o","command=","-p",String(e)],{encoding:"utf8",stdio:["ignore","pipe","pipe"]});if(n.status!==0||t.status!==0)return!1;let r=(n.stdout||"").trimEnd(),o=(t.stdout||"").trimEnd();return(o.startsWith(r)?o.slice(r.length):o).includes("SOOTSIM_PW_URL=")}async function be(e,n){let t=new Set(n),r=new Set;for(let o of e){if(!t.has(o.id))continue;let i=Pn(o);i&&r.add(i)}for(let o of r){if(!Cn(o)){console.log(` skipped pid ${o}: not a rnx playwright host (stale sim record)`);continue}try{process.kill(o,"SIGTERM")}catch{}if(await kn(o)){console.log(` closed playwright host process ${o}`);continue}try{process.kill(o,"SIGKILL"),console.log(` force-closed playwright host process ${o}`)}catch{}}}function Y(e,n){if(n){let o=n.trim(),i=e.find(a=>a.id===o);if(!i)throw new Error(`no sim connected with id ${o}`);return i}let t=e.find(o=>o.isPrimary&&o.readyState==="open");if(t)return t;let r=e.find(o=>o.readyState==="open");if(r)return r;throw new Error("no sim connected")}function $t(e,n,t,r=!1){let[o,i]=[e,n.url].map(a=>{if(!a)return a;try{let s=new URL(a);if(s.searchParams.has("sootsimConfig"))return s.searchParams.set("sootsimConfig","[redacted]"),s.toString()}catch{}return a});if(r){console.log(` Opened ConnectRN [${t}]`);return}console.log(` ${t==="current sim"?"loaded":"opened"}: ${o} [${t}]`),console.log(` current sim: ${n.id}`),console.log(JSON.stringify({simId:n.id,url:i},null,2))}async function xt(e,n,t){if(t.includes("--no-describe"))return;let r=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await Un(e,n,{stableMs:150,maxMs:400});let o=I(e,{commandTimeoutMs:3e3,simId:n,cliLabel:"open --describe",simIdSource:"flag"});try{let i=null;try{i=await nt(o,1)}catch{}if(i&&!i.ready){let s=i.loadingText?`still showing "${i.loadingText}"`:i.flag!==!0?"guest ready event has not fired":i.targets<=0?"no visible app content is inspectable yet":"app tree is still stabilizing";console.log(` app still loading: ${s} (nodes: ${i.nodes}, targets: ${i.targets})`),console.log(" before interacting, run: rnx wait ready --max-ms 120000")}let a=await tt(o,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!1,maxDepth:12});if(!a?.tree)return;console.log(""),console.log(a.tree)}finally{o.close()}}catch{}finally{r===void 0?delete process.env.SOOTSIM_QUIET_TARGET_NOTICE:process.env.SOOTSIM_QUIET_TARGET_NOTICE=r}}async function Un(e,n,t){let r=Date.now()+t.maxMs,o="(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()",i=I(e,{commandTimeoutMs:2e3,simId:n,simIdSource:"flag"});try{let a=-1,s=0;for(;Date.now()<r;){let l=-1;try{let c=await i.send({type:"evaluate",code:o});typeof c=="number"&&(l=c)}catch{}if(l>=0&&l===a){if(Date.now()-s>=t.stableMs)return}else a=l,s=Date.now();await $(50)}}finally{i.close()}}async function Rn(e,n={}){let t=T(e,{port:n.port,commandTimeoutMs:n.timeoutMs});t.positional.length!==1&&(console.error(" rnx open: expected exactly one <url-or-route>"),console.error(" examples: rnx open /settings | rnx open myapp://settings"),d(1));let r=E(t),o=t.simId?` --sim ${t.simId}`:"";try{let i=await qe(r,t.positional[0]??"");console.log(` opened deep link: ${i}`)}catch(i){console.error(` link failed: ${i instanceof Error?i.message:String(i)}`),await L(r,{errorsCommand:`rnx get errors 5${o}`,warningsCommand:`rnx get warnings 5${o}`,requestsCommand:`rnx get requests 5${o}`}),d(1)}finally{r.close()}}async function gr(e,n={}){let t=T(e,{port:n.port,commandTimeoutMs:n.timeoutMs,stripBooleanFlags:["--new","--headless","--headed","--ephemeral","--hot","--no-hmr","--no-describe","--quiet"],stripValueFlags:["--base-url","--replace","--driver","--profile","--cdp-port","--device","--viewport"]}),r=e.find((f,p)=>e[p-1]==="--profile"),o=e.includes("--quiet"),i=e.includes("--ephemeral"),a=e.find((f,p)=>e[p-1]==="--cdp-port"),s=a?Number(a):void 0;a&&(!Number.isFinite(s)||s<=0)&&(console.error(` rnx open: --cdp-port must be a positive port number, got "${a}"`),d(1)),r&&i&&(console.error(" rnx open: --profile cannot be combined with --ephemeral"),d(1));let l=r?Ve(r).id:void 0,c=e.includes("--new")||!!l||i,m=an(e);c&&t.simIdSource==="flag"&&(console.error(" rnx open: --new, --profile, and --ephemeral cannot be combined with --sim"),d(1));let u=t.positional[0]||"";if(Ke(u)){c&&(console.error(" rnx open: deep links target the current app; remove --new, --profile, or --ephemeral"),d(1)),await Rn(e,n);return}if(tn(u)){let f=(()=>{try{return k(new URL(u).hostname)}catch{return!1}})();console.log(" that\u2019s an rnx preview/build link \u2014 a full player page, not a driveable sim."),console.log(" opening it in your browser for viewing\u2026");try{await ot(u,{background:!1})}catch(p){console.error(` could not launch a browser: ${p instanceof Error?p.message:String(p)}`),console.error(` open it yourself: ${u}`),d(1)}console.log(f?" to drive it under the CLI, point `rnx open` at the app\u2019s dev port instead (e.g. `rnx open 8081`).":" the CLI can\u2019t drive a remote preview (the engine only attaches to the local bridge from localhost). to drive the app, run it locally and `rnx open <port>`.");return}let h=Pt(u)?await Se(u):void 0,N=await ln(h),X=await Je(N),F=X?.runtimeVersion,H=de(de(X?{...X,runtimeVersion:void 0}:void 0,n.runtimeConfig),m);F&&await cn(F);let Z=e.find((f,p)=>e[p-1]==="--base-url");if(Z&&!t.explicitPort){let f=ue(Z);f&&(t.wsPort=f)}t.wsPort=await Qt(t.wsPort,t.explicitPort);let M=e.find((f,p)=>e[p-1]==="--driver")||"";M&&!wt(M)&&(console.error(` unknown driver "${M}" \u2014 run \`rnx list --drivers\``),d(1));let v=wt(M)?M:process.env.CI==="1"||process.env.CI==="true"||process.env.GITHUB_ACTIONS==="true"||Ee()||!process.stdin.isTTY?"playwright":Re()||"playwright",Ct=Jt(e,v);s&&v!=="playwright"&&(console.error(" rnx open: --cdp-port is only honored by the playwright driver"),d(1));let $e=e.includes("--hot"),xe=e.includes("--no-hmr");$e&&xe&&(console.error(" rnx open: --hot and --no-hmr cannot be combined"),d(1));let Ut=$e?!0:xe?!1:v!=="playwright",C=e.find((f,p)=>e[p-1]==="--device");C&&!(C in le)&&(console.error(` rnx open: unknown device "${C}"`),console.error(` known devices: ${Me().join(", ")}`),d(1));let ee=C?le[C]:void 0,j=e.find((f,p)=>e[p-1]==="--viewport"),W=j?/^(\d+)x(\d+)$/.exec(j):null;j&&!W&&(console.error(` rnx open: --viewport must be <width>x<height>, got "${j}"`),d(1));let Rt=W?{width:Number(W[1]),height:Number(W[2])}:void 0,K={hot:Ut,device:C,resolvedBundle:h,project:N},Tt=F?`http://localhost:${t.wsPort}/`:Z||dn(t.wsPort),x=un(Tt,F),Pe=e.includes("--base-url");Ae(t.wsPort,x);let Et=B();if(!c){let f=E(t),p=t.simId?` --sim ${t.simId}`:"",re=!1;try{let g=null,V=null;try{let w=await f.listSims();if(t.simIdSource==="saved")g=w.find(b=>b.id===Et&&b.readyState==="open"&&he(b,v))??null,g||D();else if(t.simIdSource==="flag"&&(g=Y(w,t.simId),!he(g,v)))throw new Error(`sim ${g.id} is not managed by the ${v} driver`);if(!g&&t.simIdSource!=="flag"){V=await z(u,A(x,H),K);let b=new URL(V);b.searchParams.delete("inspectOpen"),g=w.find(S=>{if(S.readyState!=="open"||!S.url||!he(S,v))return!1;try{let Ue=new URL(S.url);return Ue.searchParams.delete("inspectOpen"),Ue.toString()===b.toString()}catch{return!1}})??null}if(!g)if(t.simIdSource!=="flag")re=!0;else throw new Error("no sim connected");if(!re&&g){let b=Pe||ve(u)?x:vt(g,x),S=V??await z(u,A(b,H),K);f.send({type:"evaluate",simId:g.id,code:`window.location.href = ${JSON.stringify(S)}`}).catch(()=>{})}}catch(w){console.error(` open failed: ${w instanceof Error?w.message:String(w)}`),await L(f,{errorsCommand:`rnx get errors 5${p}`,warningsCommand:`rnx get warnings 5${p}`,requestsCommand:`rnx get requests 5${p}`}),d(1)}if(!re&&g){await $(1500);let w=await bn(t.wsPort,t.commandTimeoutMs,g.id);w||(console.error(" timed out waiting for current sim to load target"),d(1)),w.bridge.close(),P(g.id);let b=Pe||ve(u)?x:vt(g,x),S=V??await z(u,A(b,H),K);return $t(S,{...g,url:S},"current sim",o),await xt(t.wsPort,g.id,e),t.wsPort}}finally{f.close()}}let _t=A(x,H),Ie=`cli-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,ke=await wn(u,_t,Ie,K),Ce=Be();Ce||(console.error(" could not resolve a stable owning process; refusing unsupervised sim host"),d(1));let Mt=f=>f.url?.includes(`inspectOpen=${Ie}`)??!1,R=rt(v);R||(console.error(` unknown driver "${v}" \u2014 run \`rnx list --drivers\``),d(1));let q=zt(),y=await R.launch({url:ke,bridgePort:ue(x)??t.wsPort,headless:Ct,profileId:l,ephemeralProfile:i,cdpPort:s,device:C,ownerPid:Ce,viewport:Rt??(ee?{width:ee.width+120,height:ee.height+60}:void 0),connectTimeoutMs:q.hostTimeoutMs});y.launched||(console.error(` ${R.name} driver: ${y.message}`),d(1));let te=await $n(t.wsPort,t.commandTimeoutMs,Mt,y.pid,{attempts:q.attempts,intervalMs:q.intervalMs});if(te.kind==="host-exit"&&(St(y),console.error(` ${R.name} host crashed \u2014 sim is no longer attached`),d(1)),te.kind==="timeout"){if(y.pid)try{process.kill(y.pid,"SIGTERM"),console.error(` closed ${R.name} host process ${y.pid}`)}catch{}St(y),console.error(` timed out after ${q.timeoutMs}ms waiting for opened sim to connect`),d(1)}let ne=te.sim;return P(ne.id),In(y),$t(ke,ne,`${R.name} driver`,o),await xt(t.wsPort,ne.id,e),t.wsPort}async function kt(e,n={}){let t=T(e,{port:n.port,commandTimeoutMs:n.timeoutMs,stripBooleanFlags:["--force"]}),r=e.includes("--force"),o=E(t),i=t.simId?` --sim ${t.simId}`:"";try{try{let a=await o.listSims(),s=Y(a,t.positional[0]||t.simId);if(s.lockedBy&&s.lockExpiresAt&&s.lockExpiresAt>Date.now()){let l=Math.max(0,Math.round((s.lockExpiresAt-Date.now())/1e3));s.lockedByKind==="user-active"&&(console.error(` refused: ${s.id} is locked by the active user (${l}s) \u2014 that's a live human tab`),console.error(" run `rnx open --new` for a fresh investigation sim"),d(1)),r||(console.error(` refused: ${s.id} is leased by ${s.lockedBy} (${l}s)`),console.error(` \`sootsim use ${s.id} --force\` to take it, or \`rnx open --new\` for a fresh sim`),d(1))}await o.focusSim(s.id),P(s.id),console.log(` using: ${s.id}`)}catch(a){G(a),console.error(` use failed: ${a instanceof Error?a.message:String(a)}`),await L(o,{errorsCommand:`rnx get errors 5${i}`,warningsCommand:`rnx get warnings 5${i}`,requestsCommand:`rnx get requests 5${i}`}),d(1)}}finally{o.close()}}async function hr(e,n={}){await kt(e,n)}async function wr(e,n={}){await kt(e,n)}async function br(e,n={}){let t=T(e,{port:n.port,commandTimeoutMs:n.timeoutMs,stripBooleanFlags:["--force"]}),r=e.includes("--force"),o=E(t);try{try{let i=await o.listSims(),a=Y(i,t.positional[0]||t.simId),s=r&&a.lockedBy&&a.lockedByKind!=="user-active"?a.lockedBy:null,l=await o.claim(a.id,{force:r});P(a.id);let c=Math.max(0,Math.round((l.lockExpiresAt-Date.now())/1e3)),m=l.bootedCount>0?` (booted ${l.bootedCount})`:"";console.log(` claimed: ${l.simId} [${c}s]${m}`),s&&console.log(` took over from: ${s}`)}catch(i){if(i instanceof Le){let a=Math.max(0,Math.round(i.lock.expiresInMs/1e3));console.error(` claim failed: locked by ${i.lock.by} for ${a}s more`),console.error(" use --force to take it, or `rnx open --new` for a fresh sim"),d(1)}console.error(` claim failed: ${i instanceof Error?i.message:String(i)}`),d(1)}}finally{o.close()}}async function Tn(e,n,t,r){if(r.length===0)return{closed:[],remaining:[]};await Promise.all(r.map(i=>e.closeSim(i).catch(()=>{})));let o=new Set(r);for(let i=0;i<40;i++){let a=[];try{let s=I(n,{commandTimeoutMs:t});try{a=(await s.listSims()).filter(c=>o.has(c.id)&&c.readyState==="open").map(c=>c.id)}finally{s.close()}}catch{a=[]}if(a.length===0)return{closed:[...o],remaining:[]};if(i===39)return{closed:[...o].filter(s=>!a.includes(s)),remaining:a};await $(250)}return{closed:[...o],remaining:[]}}function En(e,n){let t=e.filter(u=>u.readyState==="open"),r=t.map(u=>u.id),o=n.explicitKeepId?.trim()||"",i=n.savedKeepId?.trim()||"",a=i?t.some(u=>u.id===i):!1,s=i&&!a?i:null,l=null,c=null,m=null;if(n.closeOthers)if(o){let u=t.find(h=>h.id===o);u?l=u.id:c=o}else if(i&&a)l=i;else{let u=t.find(h=>h.isPrimary)??t[0]??null;u&&(l=u.id,i&&!a&&(m=u.id))}return{openIds:r,keepId:l,targets:c?[]:r.filter(u=>u!==l),staleSavedId:s,missingExplicitKeepId:c,fallbackKeepId:m}}async function vr(e,n={}){let t=T(e,{port:n.port,commandTimeoutMs:n.timeoutMs,stripBooleanFlags:["--all","--others"]}),r=E(t),o=t.simId?` --sim ${t.simId}`:"",i=e.includes("--all"),a=e.includes("--others");if(i||a){try{let s=await r.listSims(),l=B(),c=t.positional[0]||(t.simIdSource==="flag"?t.simId:void 0),m=En(s,{closeOthers:a,explicitKeepId:c,savedKeepId:l});if(m.staleSavedId&&D(),m.fallbackKeepId&&(P(m.fallbackKeepId),console.log(` saved sim ${m.staleSavedId} is gone \u2014 keeping primary ${m.fallbackKeepId}`)),m.missingExplicitKeepId&&(console.error(` close failed: keep sim ${m.missingExplicitKeepId} is not connected; not closing other sims`),d(1)),m.targets.length===0){console.log(m.keepId?` nothing to close \u2014 only the kept sim ${m.keepId} is connected`:m.staleSavedId?` nothing to close \u2014 no sims connected (cleared stale current sim ${m.staleSavedId})`:" nothing to close \u2014 no sims connected");return}let u=await Tn(r,t.wsPort,t.commandTimeoutMs,m.targets);await be(s,m.targets);let h=B();h&&u.closed.includes(h)&&(m.keepId?P(m.keepId):D());let N=` closed ${u.closed.length} sim(s)${m.keepId?` (kept ${m.keepId})`:""}`;console.log(N),u.remaining.length>0&&(console.error(` close failed: still connected: ${u.remaining.join(", ")}`),d(1))}catch(s){G(s),console.error(` close failed: ${s instanceof Error?s.message:String(s)}`),d(1)}finally{r.close()}return}try{try{let s=await r.listSims(),l=Y(s,t.positional[0]||t.simId),c=s.find(u=>u.id!==l.id&&u.readyState==="open");await r.closeSim(l.id),await xn(t.wsPort,t.commandTimeoutMs,l.id)||(await be(s,[l.id]),console.error(` close failed: ${l.id} is still connected`),d(1)),await be(s,[l.id]),B()===l.id&&(c?P(c.id):D()),console.log(` closed: ${l.id}`)}catch(s){G(s),console.error(` close failed: ${s instanceof Error?s.message:String(s)}`),await L(r,{errorsCommand:`rnx get errors 5${o}`,warningsCommand:`rnx get warnings 5${o}`,requestsCommand:`rnx get requests 5${o}`}),d(1)}}finally{r.close()}}export{zt as a,Qt as b,mr as c,un as d,It as e,dn as f,z as g,wn as h,vn as i,pr as j,fr as k,$n as l,Pn as m,In as n,be as o,Rn as p,gr as q,hr as r,wr as s,br as t,Tn as u,En as v,vr as w};