sourcery-nightly 1.33.1b7__py2.py3-none-manylinux1_x86_64.whl → 1.34.0__py2.py3-none-manylinux1_x86_64.whl

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 (265) hide show
  1. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/plugins/dataclasses.so → sourcery_nightly-1.34.0.data/purelib/sourcery/black/_width_table.so +0 -0
  2. sourcery_nightly-1.34.0.data/purelib/sourcery/black/brackets.so +0 -0
  3. sourcery_nightly-1.34.0.data/purelib/sourcery/black/cache.so +0 -0
  4. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/typevars.so → sourcery_nightly-1.34.0.data/purelib/sourcery/black/comments.so +0 -0
  5. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/state.so → sourcery_nightly-1.34.0.data/purelib/sourcery/black/const.so +0 -0
  6. sourcery_nightly-1.34.0.data/purelib/sourcery/black/handle_ipynb_magics.so +0 -0
  7. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/semanal.so → sourcery_nightly-1.34.0.data/purelib/sourcery/black/linegen.so +0 -0
  8. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/types.so → sourcery_nightly-1.34.0.data/purelib/sourcery/black/lines.so +0 -0
  9. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/util.so → sourcery_nightly-1.34.0.data/purelib/sourcery/black/mode.so +0 -0
  10. {sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy → sourcery_nightly-1.34.0.data/purelib/sourcery/black}/nodes.so +0 -0
  11. sourcery_nightly-1.34.0.data/purelib/sourcery/black/numerics.so +0 -0
  12. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/typeops.so → sourcery_nightly-1.34.0.data/purelib/sourcery/black/parsing.so +0 -0
  13. sourcery_nightly-1.34.0.data/purelib/sourcery/black/ranges.so +0 -0
  14. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/black/resources/black.schema.json +2 -9
  15. sourcery_nightly-1.34.0.data/purelib/sourcery/black/rusty.so +0 -0
  16. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/options.so → sourcery_nightly-1.34.0.data/purelib/sourcery/black/strings.so +0 -0
  17. sourcery_nightly-1.34.0.data/purelib/sourcery/black/trans.so +0 -0
  18. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/plugins/common.so → sourcery_nightly-1.34.0.data/purelib/sourcery/blib2to3/pgen2/driver.so +0 -0
  19. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/server/trigger.so → sourcery_nightly-1.34.0.data/purelib/sourcery/blib2to3/pgen2/grammar.so +0 -0
  20. sourcery_nightly-1.34.0.data/purelib/sourcery/blib2to3/pgen2/parse.so +0 -0
  21. sourcery_nightly-1.34.0.data/purelib/sourcery/blib2to3/pgen2/pgen.so +0 -0
  22. sourcery_nightly-1.34.0.data/purelib/sourcery/blib2to3/pgen2/token.so +0 -0
  23. sourcery_nightly-1.34.0.data/purelib/sourcery/blib2to3/pgen2/tokenize.so +0 -0
  24. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/plugin.so → sourcery_nightly-1.34.0.data/purelib/sourcery/blib2to3/pygram.so +0 -0
  25. sourcery_nightly-1.34.0.data/purelib/sourcery/blib2to3/pytree.so +0 -0
  26. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/coding-assistant-app/dist/assets/index.css +1 -1
  27. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/coding-assistant-app/dist/assets/index.js +1 -1
  28. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/errorcodes.so +0 -0
  29. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/expandtype.so +0 -0
  30. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/nodes.so +0 -0
  31. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/options.so +0 -0
  32. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/plugin.so +0 -0
  33. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/plugins/common.so +0 -0
  34. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/plugins/dataclasses.so +0 -0
  35. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/semanal.so +0 -0
  36. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/server/trigger.so +0 -0
  37. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/state.so +0 -0
  38. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/typeops.so +0 -0
  39. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/types.so +0 -0
  40. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/typevars.so +0 -0
  41. sourcery_nightly-1.34.0.data/purelib/sourcery/mypy/util.so +0 -0
  42. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/sourcery +0 -0
  43. {sourcery_nightly-1.33.1b7.dist-info → sourcery_nightly-1.34.0.dist-info}/METADATA +2 -2
  44. sourcery_nightly-1.34.0.dist-info/RECORD +238 -0
  45. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/_width_table.so +0 -0
  46. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/brackets.so +0 -0
  47. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/cache.so +0 -0
  48. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/comments.so +0 -0
  49. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/const.so +0 -0
  50. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/handle_ipynb_magics.so +0 -0
  51. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/linegen.so +0 -0
  52. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/lines.so +0 -0
  53. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/mode.so +0 -0
  54. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/nodes.so +0 -0
  55. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/numerics.so +0 -0
  56. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/parsing.so +0 -0
  57. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/ranges.so +0 -0
  58. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/rusty.so +0 -0
  59. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/strings.so +0 -0
  60. sourcery_nightly-1.33.1b7.data/purelib/sourcery/black/trans.so +0 -0
  61. sourcery_nightly-1.33.1b7.data/purelib/sourcery/blib2to3/pgen2/driver.so +0 -0
  62. sourcery_nightly-1.33.1b7.data/purelib/sourcery/blib2to3/pgen2/grammar.so +0 -0
  63. sourcery_nightly-1.33.1b7.data/purelib/sourcery/blib2to3/pgen2/parse.so +0 -0
  64. sourcery_nightly-1.33.1b7.data/purelib/sourcery/blib2to3/pgen2/pgen.so +0 -0
  65. sourcery_nightly-1.33.1b7.data/purelib/sourcery/blib2to3/pgen2/token.so +0 -0
  66. sourcery_nightly-1.33.1b7.data/purelib/sourcery/blib2to3/pgen2/tokenize.so +0 -0
  67. sourcery_nightly-1.33.1b7.data/purelib/sourcery/blib2to3/pygram.so +0 -0
  68. sourcery_nightly-1.33.1b7.data/purelib/sourcery/blib2to3/pytree.so +0 -0
  69. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/errorcodes.so +0 -0
  70. sourcery_nightly-1.33.1b7.data/purelib/sourcery/mypy/expandtype.so +0 -0
  71. sourcery_nightly-1.33.1b7.dist-info/RECORD +0 -238
  72. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_asyncio.so +0 -0
  73. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_blake2.so +0 -0
  74. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_bz2.so +0 -0
  75. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_cffi_backend.so +0 -0
  76. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_codecs_cn.so +0 -0
  77. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_codecs_hk.so +0 -0
  78. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_codecs_iso2022.so +0 -0
  79. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_codecs_jp.so +0 -0
  80. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_codecs_kr.so +0 -0
  81. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_codecs_tw.so +0 -0
  82. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_contextvars.so +0 -0
  83. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_csv.so +0 -0
  84. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_ctypes.so +0 -0
  85. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_curses.so +0 -0
  86. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_datetime.so +0 -0
  87. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_decimal.so +0 -0
  88. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_elementtree.so +0 -0
  89. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_hashlib.so +0 -0
  90. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_heapq.so +0 -0
  91. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_lzma.so +0 -0
  92. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_md5.so +0 -0
  93. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_multibytecodec.so +0 -0
  94. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_multiprocessing.so +0 -0
  95. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_opcode.so +0 -0
  96. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_pickle.so +0 -0
  97. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_posixshmem.so +0 -0
  98. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_posixsubprocess.so +0 -0
  99. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_queue.so +0 -0
  100. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_random.so +0 -0
  101. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_ruamel_yaml.so +0 -0
  102. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_sha1.so +0 -0
  103. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_sha256.so +0 -0
  104. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_sha3.so +0 -0
  105. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_sha512.so +0 -0
  106. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_socket.so +0 -0
  107. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_sqlite3.so +0 -0
  108. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_ssl.so +0 -0
  109. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_statistics.so +0 -0
  110. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_struct.so +0 -0
  111. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_typing.so +0 -0
  112. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_uuid.so +0 -0
  113. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/_zoneinfo.so +0 -0
  114. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/aiohttp/_helpers.so +0 -0
  115. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/aiohttp/_http_parser.so +0 -0
  116. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/aiohttp/_http_writer.so +0 -0
  117. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/aiohttp/_websocket.so +0 -0
  118. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/array.so +0 -0
  119. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/binascii.so +0 -0
  120. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/blib2to3/Grammar.txt +0 -0
  121. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/blib2to3/LICENSE +0 -0
  122. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/blib2to3/PatternGrammar.txt +0 -0
  123. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/blib2to3/README +0 -0
  124. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/certifi/cacert.pem +0 -0
  125. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/charset_normalizer/md.so +0 -0
  126. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/charset_normalizer/md__mypyc.so +0 -0
  127. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/coding-assistant-app/dist/assets/sourcery-logo.svg +0 -0
  128. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/cryptography/hazmat/bindings/_openssl.so +0 -0
  129. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/cryptography/hazmat/bindings/_rust.so +0 -0
  130. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/fcntl.so +0 -0
  131. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/frozenlist/_frozenlist.so +0 -0
  132. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/grp.so +0 -0
  133. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/jiter/jiter.so +0 -0
  134. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/languages.so +0 -0
  135. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/lib2to3/Grammar3.11.4.final.0.pickle +0 -0
  136. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/lib2to3/PatternGrammar3.11.4.final.0.pickle +0 -0
  137. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libbz2.so.1.0 +0 -0
  138. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libcrypto.so.1.1 +0 -0
  139. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libexpat.so.1 +0 -0
  140. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libffi.so.6 +0 -0
  141. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/liblzma.so.5 +0 -0
  142. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libncursesw.so.6 +0 -0
  143. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libpython3.11.so.1.0 +0 -0
  144. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libreadline.so.7 +0 -0
  145. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libsqlite3.so.0 +0 -0
  146. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libssl.so.1.1 +0 -0
  147. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libtinfo.so.6 +0 -0
  148. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/libuuid.so.1 +0 -0
  149. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/linguist-languages.yml +0 -0
  150. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/markupsafe/_speedups.so +0 -0
  151. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/math.so +0 -0
  152. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/mmap.so +0 -0
  153. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/multidict/_multidict.so +0 -0
  154. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/orjson/orjson.so +0 -0
  155. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/private_rules/refactorings/identity-comprehension.yaml +0 -0
  156. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/private_rules/refactorings/list-literal.yaml +0 -0
  157. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/psutil/_psutil_linux.so +0 -0
  158. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/psutil/_psutil_posix.so +0 -0
  159. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/public_rules/LICENSE +0 -0
  160. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/public_rules/README.md +0 -0
  161. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/public_rules/google-python-style-guide.yaml +0 -0
  162. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/public_rules/remove-debugging-statements.yaml +0 -0
  163. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/public_rules/use-fstring.yaml +0 -0
  164. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/pycountry/databases/iso15924.json +0 -0
  165. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/pycountry/databases/iso3166-1.json +0 -0
  166. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/pycountry/databases/iso3166-2.json +0 -0
  167. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/pycountry/databases/iso3166-3.json +0 -0
  168. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/pycountry/databases/iso4217.json +0 -0
  169. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/pycountry/databases/iso639-3.json +0 -0
  170. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/pycountry/databases/iso639-5.json +0 -0
  171. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/pydantic_core/_pydantic_core.so +0 -0
  172. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/pyexpat.so +0 -0
  173. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/pysolvers.so +0 -0
  174. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/readline.so +0 -0
  175. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/regex/_regex.so +0 -0
  176. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/resource.so +0 -0
  177. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/java/java-rules.yaml +0 -0
  178. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/assignment-operator.yaml +0 -0
  179. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/avoid-function-declarations-in-blocks.yaml +0 -0
  180. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/avoid-infinite-loops.yaml +0 -0
  181. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/avoid-jumping-in-finally.yaml +0 -0
  182. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/avoid-using-var.yaml +0 -0
  183. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/binary-operator-identity.yaml +0 -0
  184. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/combine-object-destructuring.yaml +0 -0
  185. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/de-morgan.yaml +0 -0
  186. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/dont-concatenate-string-literals.yaml +0 -0
  187. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/dont-negate-is-instanceof-operands.yaml +0 -0
  188. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/dont-reassign-caught-exceptions.yaml +0 -0
  189. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/dont-reassign-foreach-variables.yaml +0 -0
  190. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/dont-reassign-parameters.yaml +0 -0
  191. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/dont-self-assign-variables.yaml +0 -0
  192. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/dont-shadow-arguments.yaml +0 -0
  193. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/dont-use-with.yaml +0 -0
  194. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/dont-use-wrappers-for-builtins.yaml +0 -0
  195. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/flatten-nested-try.yaml +0 -0
  196. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/flip-comparison.yaml +0 -0
  197. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/generators-should-yield.yaml +0 -0
  198. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/inline-immediately-returned-variable.yaml +0 -0
  199. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/invert-ternary.yaml +0 -0
  200. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/max-min.yaml +0 -0
  201. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/merge-assign-operators.yaml +0 -0
  202. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/merge-else-if.yaml +0 -0
  203. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/merge_nested_ifs.yaml +0 -0
  204. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/misplaced-break-or-continue.yaml +0 -0
  205. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/no-eval.yaml +0 -0
  206. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/no-new-function.yaml +0 -0
  207. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/no-new-symbol.yaml +0 -0
  208. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/only-delete-object-properties.yaml +0 -0
  209. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/possible-incorrect-bitwise-operator.yaml +0 -0
  210. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/prefer-arrow-callback.yaml +0 -0
  211. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/remove-redundant-boolean.yaml +0 -0
  212. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/remove-redundant-if-statement.yaml +0 -0
  213. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/remove-redundant-slice-index.yaml +0 -0
  214. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/remove-unreachable-code.yaml +0 -0
  215. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/return-outside-function.yaml +0 -0
  216. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/simplify-ternary.yaml +0 -0
  217. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/throw-new-errors.yaml +0 -0
  218. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/use-array-literal.yaml +0 -0
  219. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/use-braces.yaml +0 -0
  220. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/use-object-destructuring.yaml +0 -0
  221. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/use-ternary-operator.yaml +0 -0
  222. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/while-guard-to-condition.yaml +0 -0
  223. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/wrap-immediately-invoked-function-expressions.yaml +0 -0
  224. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/javascript/yield-outside-generator.yaml +0 -0
  225. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/break-or-continue-outside-loop.yaml +0 -0
  226. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/dict-literal.yaml +0 -0
  227. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/merge-nested-ifs.yaml +0 -0
  228. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/no-complex-code-in-tests.yaml +0 -0
  229. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/or-if-exp-identity.yaml +0 -0
  230. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/pandas-chain-methods.yaml +0 -0
  231. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/raise-specific-error.yaml +0 -0
  232. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/remove-none-from-default-get.yaml +0 -0
  233. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/remove-redundant-path-exists.yaml +0 -0
  234. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/remove-unit-step-from-range.yaml +0 -0
  235. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/remove-zero-from-range.yaml +0 -0
  236. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/simplify-constant-sum.yaml +0 -0
  237. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/swap-if-expression.yaml +0 -0
  238. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/tuple-literal.yaml +0 -0
  239. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/use-iloc-for-indexing.yaml +0 -0
  240. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/use-isna.yaml +0 -0
  241. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/use-or-for-fallback.yaml +0 -0
  242. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/useless-else-on-loop.yaml +0 -0
  243. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/rules/python/while-guard-to-condition.yaml +0 -0
  244. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/select.so +0 -0
  245. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/sqlalchemy/cyextension/collections.so +0 -0
  246. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/sqlalchemy/cyextension/immutabledict.so +0 -0
  247. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/sqlalchemy/cyextension/processors.so +0 -0
  248. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/sqlalchemy/cyextension/resultproxy.so +0 -0
  249. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/sqlalchemy/cyextension/util.so +0 -0
  250. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/termios.so +0 -0
  251. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/tiktoken/_tiktoken.so +0 -0
  252. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/tomli/_parser.so +0 -0
  253. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/tree_sitter/_binding.so +0 -0
  254. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/ujson.so +0 -0
  255. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/unicodedata.so +0 -0
  256. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/wrapper.py +0 -0
  257. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/yaml/_yaml.so +0 -0
  258. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/yapf_third_party/_ylib2to3/Grammar.txt +0 -0
  259. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/yapf_third_party/_ylib2to3/PatternGrammar.txt +0 -0
  260. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/yarl/_helpers_c.so +0 -0
  261. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/yarl/_quoting_c.so +0 -0
  262. {sourcery_nightly-1.33.1b7.data → sourcery_nightly-1.34.0.data}/purelib/sourcery/zlib.so +0 -0
  263. {sourcery_nightly-1.33.1b7.dist-info → sourcery_nightly-1.34.0.dist-info}/WHEEL +0 -0
  264. {sourcery_nightly-1.33.1b7.dist-info → sourcery_nightly-1.34.0.dist-info}/entry_points.txt +0 -0
  265. {sourcery_nightly-1.33.1b7.dist-info → sourcery_nightly-1.34.0.dist-info}/top_level.txt +0 -0
@@ -834,4 +834,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
834
834
  https://github.com/highlightjs/highlight.js/issues/2277`),z=D,E=R),L===void 0&&(L=!0);const q={code:E,language:z};$("before:highlight",q);const N=q.result?q.result:f(q.language,q.code,L);return N.code=q.code,$("after:highlight",N),N}function f(D,R,L,E){const z=Object.create(null);function q(T,P){return T.keywords[P]}function N(){if(!ee.keywords){we.addText(me);return}let T=0;ee.keywordPatternRe.lastIndex=0;let P=ee.keywordPatternRe.exec(me),j="";for(;P;){j+=me.substring(T,P.index);const Z=at.case_insensitive?P[0].toLowerCase():P[0],ne=q(ee,Z);if(ne){const[Ue,xn]=ne;if(we.addText(j),j="",z[Z]=(z[Z]||0)+1,z[Z]<=vD&&($n+=xn),Ue.startsWith("_"))j+=P[0];else{const un=at.classNameAliases[Ue]||Ue;Q(P[0],un)}}else j+=P[0];T=ee.keywordPatternRe.lastIndex,P=ee.keywordPatternRe.exec(me)}j+=me.substring(T),we.addText(j)}function le(){if(me==="")return;let T=null;if(typeof ee.subLanguage=="string"){if(!t[ee.subLanguage]){we.addText(me);return}T=f(ee.subLanguage,me,!0,At[ee.subLanguage]),At[ee.subLanguage]=T._top}else T=p(me,ee.subLanguage.length?ee.subLanguage:null);ee.relevance>0&&($n+=T.relevance),we.__addSublanguage(T._emitter,T.language)}function se(){ee.subLanguage!=null?le():N(),me=""}function Q(T,P){T!==""&&(we.startScope(P),we.addText(T),we.endScope())}function Te(T,P){let j=1;const Z=P.length-1;for(;j<=Z;){if(!T._emit[j]){j++;continue}const ne=at.classNameAliases[T[j]]||T[j],Ue=P[j];ne?Q(Ue,ne):(me=Ue,N(),me=""),j++}}function Me(T,P){return T.scope&&typeof T.scope=="string"&&we.openNode(at.classNameAliases[T.scope]||T.scope),T.beginScope&&(T.beginScope._wrap?(Q(me,at.classNameAliases[T.beginScope._wrap]||T.beginScope._wrap),me=""):T.beginScope._multi&&(Te(T.beginScope,P),me="")),ee=Object.create(T,{parent:{value:ee}}),ee}function ie(T,P,j){let Z=P4(T.endRe,j);if(Z){if(T["on:end"]){const ne=new m0(T);T["on:end"](P,ne),ne.isMatchIgnored&&(Z=!1)}if(Z){for(;T.endsParent&&T.parent;)T=T.parent;return T}}if(T.endsWithParent)return ie(T.parent,P,j)}function Ze(T){return ee.matcher.regexIndex===0?(me+=T[0],1):(yr=!0,0)}function Ve(T){const P=T[0],j=T.rule,Z=new m0(j),ne=[j.__beforeBegin,j["on:begin"]];for(const Ue of ne)if(Ue&&(Ue(T,Z),Z.isMatchIgnored))return Ze(P);return j.skip?me+=P:(j.excludeBegin&&(me+=P),se(),!j.returnBegin&&!j.excludeBegin&&(me=P)),Me(j,T),j.returnBegin?0:P.length}function cn(T){const P=T[0],j=R.substring(T.index),Z=ie(ee,T,j);if(!Z)return w0;const ne=ee;ee.endScope&&ee.endScope._wrap?(se(),Q(P,ee.endScope._wrap)):ee.endScope&&ee.endScope._multi?(se(),Te(ee.endScope,T)):ne.skip?me+=P:(ne.returnEnd||ne.excludeEnd||(me+=P),se(),ne.excludeEnd&&(me=P));do ee.scope&&we.closeNode(),!ee.skip&&!ee.subLanguage&&($n+=ee.relevance),ee=ee.parent;while(ee!==Z.parent);return Z.starts&&Me(Z.starts,T),ne.returnEnd?0:P.length}function jn(){const T=[];for(let P=ee;P!==at;P=P.parent)P.scope&&T.unshift(P.scope);T.forEach(P=>we.openNode(P))}let hr={};function Xi(T,P){const j=P&&P[0];if(me+=T,j==null)return se(),0;if(hr.type==="begin"&&P.type==="end"&&hr.index===P.index&&j===""){if(me+=R.slice(P.index,P.index+1),!i){const Z=new Error(`0 width match regex (${D})`);throw Z.languageName=D,Z.badRule=hr.rule,Z}return 1}if(hr=P,P.type==="begin")return Ve(P);if(P.type==="illegal"&&!L){const Z=new Error('Illegal lexeme "'+j+'" for mode "'+(ee.scope||"<unnamed>")+'"');throw Z.mode=ee,Z}else if(P.type==="end"){const Z=cn(P);if(Z!==w0)return Z}if(P.type==="illegal"&&j==="")return 1;if(gr>1e5&&gr>P.index*3)throw new Error("potential infinite loop, way more iterations than matches");return me+=j,j.length}const at=A(D);if(!at)throw Ci(a.replace("{}",D)),new Error('Unknown language: "'+D+'"');const ai=hD(at);let mr="",ee=E||ai;const At={},we=new s.__emitter(s);jn();let me="",$n=0,Ot=0,gr=0,yr=!1;try{if(at.__emitTokens)at.__emitTokens(R,we);else{for(ee.matcher.considerAll();;){gr++,yr?yr=!1:ee.matcher.considerAll(),ee.matcher.lastIndex=Ot;const T=ee.matcher.exec(R);if(!T)break;const P=R.substring(Ot,T.index),j=Xi(P,T);Ot=T.index+j}Xi(R.substring(Ot))}return we.finalize(),mr=we.toHTML(),{language:D,value:mr,relevance:$n,illegal:!1,_emitter:we,_top:ee}}catch(T){if(T.message&&T.message.includes("Illegal"))return{language:D,value:sd(R),illegal:!0,relevance:0,_illegalBy:{message:T.message,index:Ot,context:R.slice(Ot-100,Ot+100),mode:T.mode,resultSoFar:mr},_emitter:we};if(i)return{language:D,value:sd(R),illegal:!1,relevance:0,errorRaised:T,_emitter:we,_top:ee};throw T}}function d(D){const R={value:sd(D),illegal:!1,relevance:0,_top:o,_emitter:new s.__emitter(s)};return R._emitter.addText(D),R}function p(D,R){R=R||s.languages||Object.keys(t);const L=d(D),E=R.filter(A).filter(I).map(se=>f(se,D,!1));E.unshift(L);const z=E.sort((se,Q)=>{if(se.relevance!==Q.relevance)return Q.relevance-se.relevance;if(se.language&&Q.language){if(A(se.language).supersetOf===Q.language)return 1;if(A(Q.language).supersetOf===se.language)return-1}return 0}),[q,N]=z,le=q;return le.secondBest=N,le}function m(D,R,L){const E=R&&n[R]||L;D.classList.add("hljs"),D.classList.add(`language-${E}`)}function g(D){let R=null;const L=c(D);if(l(L))return;if($("before:highlightElement",{el:D,language:L}),D.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(D)),s.throwUnescapedHTML))throw new yD("One of your code blocks includes unescaped HTML.",D.innerHTML);R=D;const E=R.textContent,z=L?u(E,{language:L,ignoreIllegals:!0}):p(E);D.innerHTML=z.value,m(D,L,z.language),D.result={language:z.language,re:z.relevance,relevance:z.relevance},z.secondBest&&(D.secondBest={language:z.secondBest.language,relevance:z.secondBest.relevance}),$("after:highlightElement",{el:D,result:z,text:E})}function w(D){s=_0(s,D)}const h=()=>{_(),Ji("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function b(){_(),Ji("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let v=!1;function _(){if(document.readyState==="loading"){v=!0;return}document.querySelectorAll(s.cssSelector).forEach(g)}function S(){v&&_()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",S,!1);function x(D,R){let L=null;try{L=R(e)}catch(E){if(Ci("Language definition for '{}' could not be registered.".replace("{}",D)),i)Ci(E);else throw E;L=o}L.name||(L.name=D),t[D]=L,L.rawDefinition=R.bind(null,e),L.aliases&&M(L.aliases,{languageName:D})}function k(D){delete t[D];for(const R of Object.keys(n))n[R]===D&&delete n[R]}function C(){return Object.keys(t)}function A(D){return D=(D||"").toLowerCase(),t[D]||t[n[D]]}function M(D,{languageName:R}){typeof D=="string"&&(D=[D]),D.forEach(L=>{n[L.toLowerCase()]=R})}function I(D){const R=A(D);return R&&!R.disableAutodetect}function F(D){D["before:highlightBlock"]&&!D["before:highlightElement"]&&(D["before:highlightElement"]=R=>{D["before:highlightBlock"](Object.assign({block:R.el},R))}),D["after:highlightBlock"]&&!D["after:highlightElement"]&&(D["after:highlightElement"]=R=>{D["after:highlightBlock"](Object.assign({block:R.el},R))})}function H(D){F(D),r.push(D)}function W(D){const R=r.indexOf(D);R!==-1&&r.splice(R,1)}function $(D,R){const L=D;r.forEach(function(E){E[L]&&E[L](R)})}function X(D){return Ji("10.7.0","highlightBlock will be removed entirely in v12.0"),Ji("10.7.0","Please use highlightElement now."),g(D)}Object.assign(e,{highlight:u,highlightAuto:p,highlightAll:_,highlightElement:g,highlightBlock:X,configure:w,initHighlighting:h,initHighlightingOnLoad:b,registerLanguage:x,unregisterLanguage:k,listLanguages:C,getLanguage:A,registerAliases:M,autoDetection:I,inherit:_0,addPlugin:H,removePlugin:W}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=gD,e.regex={concat:Wi,lookahead:dS,either:Zm,optional:M4,anyNumberOfTimes:R4};for(const D in $l)typeof $l[D]=="object"&&uS($l[D]);return Object.assign(e,$l),e},Ha=wS({});Ha.newInstance=()=>wS({});var bD=Ha;Ha.HighlightJS=Ha;Ha.default=Ha;const yn=Un(bD);var xS={exports:{}};(function(e){(function(){var t;t=e.exports=i,t.format=i,t.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(t.printf=n);function n(){console.log(i.apply(null,arguments))}function r(a,o){return i.apply(null,[a].concat(o))}function i(a){for(var o=1,s=[].slice.call(arguments),l=0,c=a.length,u="",f,d=!1,p,m,g=!1,w,h=function(){return s[o++]},b=function(){for(var v="";/\d/.test(a[l]);)v+=a[l++],f=a[l];return v.length>0?parseInt(v):null};l<c;++l)if(f=a[l],d)switch(d=!1,f=="."?(g=!1,f=a[++l]):f=="0"&&a[l+1]=="."?(g=!0,l+=2,f=a[l]):g=!0,w=b(),f){case"b":u+=parseInt(h(),10).toString(2);break;case"c":p=h(),typeof p=="string"||p instanceof String?u+=p:u+=String.fromCharCode(parseInt(p,10));break;case"d":u+=parseInt(h(),10);break;case"f":m=String(parseFloat(h()).toFixed(w||6)),u+=g?m:m.replace(/^0/,"");break;case"j":u+=JSON.stringify(h());break;case"o":u+="0"+parseInt(h(),10).toString(8);break;case"s":u+=h();break;case"x":u+="0x"+parseInt(h(),10).toString(16);break;case"X":u+="0x"+parseInt(h(),10).toString(16).toUpperCase();break;default:u+=f;break}else f==="%"?d=!0:u+=f;return u}})()})(xS);var _D=xS.exports;const wD=Un(_D),mc=Object.assign(oi(Error),{eval:oi(EvalError),range:oi(RangeError),reference:oi(ReferenceError),syntax:oi(SyntaxError),type:oi(TypeError),uri:oi(URIError)});function oi(e){return t.displayName=e.displayName||e.name,t;function t(n,...r){const i=n&&wD(n,...r);return new e(i)}}const xD={}.hasOwnProperty,ED="hljs-";function ES(e,t,n={}){let r=n.prefix;if(typeof e!="string")throw mc("Expected `string` for name, got `%s`",e);if(!yn.getLanguage(e))throw mc("Unknown language: `%s` is not registered",e);if(typeof t!="string")throw mc("Expected `string` for value, got `%s`",t);r==null&&(r=ED),yn.configure({__emitter:AD,classPrefix:r});const i=yn.highlight(t,{language:e,ignoreIllegals:!0});if(yn.configure({}),i.errorRaised)throw i.errorRaised;return i._emitter.root.data.language=i.language,i._emitter.root.data.relevance=i.relevance,i._emitter.root}function SD(e,t={}){const n=t.subset||yn.listLanguages();t.prefix;let r=-1,i={type:"root",data:{language:null,relevance:0},children:[]};if(typeof e!="string")throw mc("Expected `string` for value, got `%s`",e);for(;++r<n.length;){const a=n[r];if(!yn.getLanguage(a))continue;const o=ES(a,e,t);o.data.relevance>i.data.relevance&&(i=o)}return i}function kD(e,t){yn.registerLanguage(e,t)}const ND=function(e,t){if(typeof e=="string")yn.registerAliases(t,{languageName:e});else{let n;for(n in e)xD.call(e,n)&&yn.registerAliases(e[n],{languageName:n})}};function CD(e){return!!yn.getLanguage(e)}function TD(){return yn.listLanguages()}class AD{constructor(t){this.options=t,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=t.split(".").map((a,o)=>o?a+"_".repeat(o):this.options.classPrefix+a),r=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const ae={highlight:ES,highlightAuto:SD,registerLanguage:kD,registered:CD,listLanguages:TD,registerAlias:ND};ae.registerLanguage("arduino",h3);ae.registerLanguage("bash",m3);ae.registerLanguage("c",g3);ae.registerLanguage("cpp",y3);ae.registerLanguage("csharp",v3);ae.registerLanguage("css",k3);ae.registerLanguage("diff",N3);ae.registerLanguage("go",C3);ae.registerLanguage("graphql",T3);ae.registerLanguage("ini",A3);ae.registerLanguage("java",O3);ae.registerLanguage("javascript",D3);ae.registerLanguage("json",L3);ae.registerLanguage("kotlin",z3);ae.registerLanguage("less",H3);ae.registerLanguage("lua",W3);ae.registerLanguage("makefile",G3);ae.registerLanguage("markdown",K3);ae.registerLanguage("objectivec",q3);ae.registerLanguage("perl",Y3);ae.registerLanguage("php",Z3);ae.registerLanguage("php-template",X3);ae.registerLanguage("plaintext",Q3);ae.registerLanguage("python",J3);ae.registerLanguage("python-repl",e4);ae.registerLanguage("r",t4);ae.registerLanguage("ruby",n4);ae.registerLanguage("rust",r4);ae.registerLanguage("scss",u4);ae.registerLanguage("shell",f4);ae.registerLanguage("sql",d4);ae.registerLanguage("swift",_4);ae.registerLanguage("typescript",x4);ae.registerLanguage("vbnet",E4);ae.registerLanguage("wasm",S4);ae.registerLanguage("xml",k4);ae.registerLanguage("yaml",N4);const Gi=function(e){if(e==null)return Jm;if(typeof e=="string")return RD(e);if(typeof e=="object")return OD(e);if(typeof e=="function")return SS(e);throw new Error("Expected function, string, or array as test")};function OD(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Gi(e[n]);return SS(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].call(this,...i))return!0;return!1}}function RD(e){return t;function t(n){return Jm(n)&&n.tagName===e}}function SS(e){return t;function t(n,...r){return Jm(n)&&!!e.call(this,n,...r)}}function Jm(e){return!!(e&&typeof e=="object"&&e.type==="element"&&typeof e.tagName=="string")}const x0=function(e,t,n){const r=$m(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t];return null},E0=/\n/g,S0=/[\t ]+/g,rh=Gi("br"),MD=Gi("p"),k0=Gi(["th","td"]),N0=Gi("tr"),ID=Gi(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",FD,zD]),kS=Gi(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function C0(e,t={}){const n="children"in e?e.children:[],r=kS(e),i=TS(e,{whitespace:t.whitespace||"normal",breakBefore:!1,breakAfter:!1}),a=[];(e.type==="text"||e.type==="comment")&&a.push(...CS(e,{whitespace:i,breakBefore:!0,breakAfter:!0}));let o=-1;for(;++o<n.length;)a.push(...NS(n[o],e,{whitespace:i,breakBefore:o?void 0:r,breakAfter:o<n.length-1?rh(n[o+1]):r}));const s=[];let l;for(o=-1;++o<a.length;){const c=a[o];typeof c=="number"?l!==void 0&&c>l&&(l=c):c&&(l!==void 0&&l>-1&&s.push(`
835
835
  `.repeat(l)||" "),l=-1,s.push(c))}return s.join("")}function NS(e,t,n){return e.type==="element"?PD(e,t,n):e.type==="text"?n.whitespace==="normal"?CS(e,n):DD(e):[]}function PD(e,t,n){const r=TS(e,n),i=e.children||[];let a=-1,o=[];if(ID(e))return o;let s,l;for(rh(e)||N0(e)&&x0(t,e,N0)?l=`
836
836
  `:MD(e)?(s=2,l=2):kS(e)&&(s=1,l=1);++a<i.length;)o=o.concat(NS(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?rh(i[a+1]):l}));return k0(e)&&x0(t,e,k0)&&o.push(" "),s&&o.unshift(s),l&&o.push(l),o}function CS(e,t){const n=String(e.value),r=[],i=[];let a=0;for(;a<=n.length;){E0.lastIndex=a;const l=E0.exec(n),c=l&&"index"in l?l.index:n.length;r.push(LD(n.slice(a,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,c===n.length?t.breakAfter:!0)),a=c+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s=="number"&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function DD(e){return[String(e.value)]}function LD(e,t,n){const r=[];let i=0,a;for(;i<e.length;){S0.lastIndex=i;const o=S0.exec(e);a=o?o.index:e.length,!i&&!a&&o&&!t&&r.push(""),i!==a&&r.push(e.slice(i,a)),i=o?a+o[0].length:a}return i!==a&&!n&&r.push(""),r.join(" ")}function TS(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function FD(e){return!!(e.properties||{}).hidden}function zD(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const BD={}.hasOwnProperty;function UD(e={}){const{aliases:t,languages:n,prefix:r,plainText:i,ignoreMissing:a,subset:o,detect:s}=e;let l="hljs";if(t&&ae.registerAlias(t),n){let c;for(c in n)BD.call(n,c)&&ae.registerLanguage(c,n[c])}if(r){const c=r.indexOf("-");l=c>-1?r.slice(0,c):r}return(c,u)=>{$u(c,"element",(f,d,p)=>{const m=p;if(!m||!("tagName"in m)||m.tagName!=="pre"||f.tagName!=="code"||!f.properties)return;const g=jD(f);if(g===!1||!g&&!s||g&&i&&i.includes(g))return;Array.isArray(f.properties.className)||(f.properties.className=[]),f.properties.className.includes(l)||f.properties.className.unshift(l);let w;try{w=g?ae.highlight(g,C0(m),{prefix:r}):ae.highlightAuto(C0(m),{prefix:r,subset:o})}catch(h){const b=h;(!a||!/Unknown language/.test(b.message))&&u.fail(b,f,"rehype-highlight:missing-language");return}!g&&w.data.language&&f.properties.className.push("language-"+w.data.language),Array.isArray(w.children)&&w.children.length>0&&(f.children=w.children)})}}function jD(e){const t=e.properties&&e.properties.className;let n=-1;if(Array.isArray(t))for(;++n<t.length;){const r=String(t[n]);if(r==="no-highlight"||r==="nohighlight")return!1;if(r.slice(0,5)==="lang-")return r.slice(5);if(r.slice(0,9)==="language-")return r.slice(9)}}const $D=e=>O.isValidElement(e)&&!!e.props.children,nu=$D,VD=e=>O.isValidElement(e)&&nu(e)&&O.Children.toArray(e.props.children).reduce((t,n)=>t||O.isValidElement(n),!1),Qs=VD,AS=(e,t)=>O.Children.toArray(e).filter(t).map(n=>O.isValidElement(n)&&Qs(n)?O.cloneElement(n,{...n.props,children:AS(n.props.children,t)}):n),OS=AS,RS=(e,t)=>{let n;return O.Children.toArray(e).find((r,i,a)=>t(r,i,a)?(n=r,!0):O.isValidElement(r)&&Qs(r)?(n=RS(r.props.children,t),typeof n<"u"):!1),n},HD=RS,MS=(e,t)=>{O.Children.forEach(e,(n,r)=>{O.isValidElement(n)&&Qs(n)&&MS(n.props.children,t),t(n,r)})},WD=MS,IS=(e,t)=>O.Children.toArray(e).map((n,r,i)=>O.isValidElement(n)&&Qs(n)?t(O.cloneElement(n,{...n.props,children:IS(n.props.children,t)})):t(n,r,i)),GD=IS,KD=(e,t)=>O.Children.toArray(e).filter(t),qD=KD,YD=e=>O.isValidElement(e)?typeof e.type=="string"?e.type:e.type.name:null,PS=YD,ZD=(e,t=[],n="rest")=>{const r=t.map(i=>typeof i=="string"?i:i.name);return O.Children.toArray(e).reduce((i,a)=>{const o=PS(a),s=o!==null&&r.includes(o)?o:n;return typeof i[s]>"u"&&(i[s]=[]),i[s]=[...i[s],a],i},{})},XD=ZD,T0=e=>typeof e>"u"||e===null||typeof e=="boolean"||JSON.stringify(e)==="{}"?"":e.toString(),DS=e=>!(e instanceof Array)&&!O.isValidElement(e)?T0(e):O.Children.toArray(e).reduce((t,n)=>{let r="";return O.isValidElement(n)&&nu(n)?r=DS(n.props.children):O.isValidElement(n)&&!nu(n)?r="":r=T0(n),t.concat(r)},""),LS=DS,QD=e=>OS(e,t=>O.isValidElement(t)),JD=QD;({...O.Children});const FS={target:"languageServer",view:"app",request:"context"},eL={target:"languageServer",view:"app",request:"optIn"},tL={target:"extension",request:"openLink",linkType:"url",link:"https://app.sourcery.ai/dashboard/subscription?utm_source=ide_chat&utm_medium=upgrade_button&utm_campaign=private_repo_access"},nL={target:"languageServer",view:"app",request:"authenticate"},rL={target:"languageServer",view:"app",request:"logIn"},iL={target:"languageServer",view:"app",request:"accessDetailsOpened"},aL={target:"languageServer",view:"app",request:"uiState/save",updates:{}},oL={target:"languageServer",view:"chat",request:"initialise"},sL={target:"languageServer",view:"chat",request:"clear"},lL={target:"languageServer",view:"chat",request:"cancel"},cL={target:"languageServer",view:"recipes",request:"initialise"},zS={target:"languageServer",view:"review",request:"clear"},uL={target:"languageServer",view:"review",request:"cancel"},fL={target:"extension",request:"updateConfiguration",section:"sourcery.codeLens",value:!0,configurationTarget:1},dL={target:"extension",request:"updateConfiguration",section:"sourcery.codeLens",value:!1,configurationTarget:1},pL={target:"extension",request:"updateConfiguration",section:"sourcery.suggestFixes",value:!0,configurationTarget:1},hL={target:"extension",request:"updateConfiguration",section:"sourcery.suggestFixes",value:!1,configurationTarget:1},mL={target:"extension",request:"openLink",linkType:"url",link:"https://app.sourcery.ai/dashboard/subscription?utm_source=ide_chat&utm_medium=manage_account&utm_campaign=account_management",documentRange:null},gL={target:"extension",request:"openLink",linkType:"url",link:"https://docs.sourcery.ai",documentRange:null},yL={target:"extension",request:"openLink",linkType:"url",link:"https://app.sourcery.ai/feedback",documentRange:null},Qn=({message:e})=>{window.sourceryLS.postMessage({message:e})};/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const vL=4,A0=0,O0=1,bL=2;function oo(e){let t=e.length;for(;--t>=0;)e[t]=0}const _L=0,BS=1,wL=2,xL=3,EL=258,eg=29,Js=256,Ts=Js+1+eg,Ia=30,tg=19,US=2*Ts+1,_i=15,ld=16,SL=7,ng=256,jS=16,$S=17,VS=18,ih=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),gc=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),kL=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),HS=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),NL=512,qn=new Array((Ts+2)*2);oo(qn);const Ko=new Array(Ia*2);oo(Ko);const As=new Array(NL);oo(As);const Os=new Array(EL-xL+1);oo(Os);const rg=new Array(eg);oo(rg);const ru=new Array(Ia);oo(ru);function cd(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let WS,GS,KS;function ud(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const qS=e=>e<256?As[e]:As[256+(e>>>7)],Rs=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},wt=(e,t,n)=>{e.bi_valid>ld-n?(e.bi_buf|=t<<e.bi_valid&65535,Rs(e,e.bi_buf),e.bi_buf=t>>ld-e.bi_valid,e.bi_valid+=n-ld):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},On=(e,t,n)=>{wt(e,n[t*2],n[t*2+1])},YS=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},CL=e=>{e.bi_valid===16?(Rs(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},TL=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length;let c,u,f,d,p,m,g=0;for(d=0;d<=_i;d++)e.bl_count[d]=0;for(n[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<US;c++)u=e.heap[c],d=n[n[u*2+1]*2+1]+1,d>l&&(d=l,g++),n[u*2+1]=d,!(u>r)&&(e.bl_count[d]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(d+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(g!==0){do{for(d=l-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,g-=2}while(g>0);for(d=l;d!==0;d--)for(u=e.bl_count[d];u!==0;)f=e.heap[--c],!(f>r)&&(n[f*2+1]!==d&&(e.opt_len+=(d-n[f*2+1])*n[f*2],n[f*2+1]=d),u--)}},ZS=(e,t,n)=>{const r=new Array(_i+1);let i=0,a,o;for(a=1;a<=_i;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let s=e[o*2+1];s!==0&&(e[o*2]=YS(r[s]++,s))}},AL=()=>{let e,t,n,r,i;const a=new Array(_i+1);for(n=0,r=0;r<eg-1;r++)for(rg[r]=n,e=0;e<1<<ih[r];e++)Os[n++]=r;for(Os[n-1]=r,i=0,r=0;r<16;r++)for(ru[r]=i,e=0;e<1<<gc[r];e++)As[i++]=r;for(i>>=7;r<Ia;r++)for(ru[r]=i<<7,e=0;e<1<<gc[r]-7;e++)As[256+i++]=r;for(t=0;t<=_i;t++)a[t]=0;for(e=0;e<=143;)qn[e*2+1]=8,e++,a[8]++;for(;e<=255;)qn[e*2+1]=9,e++,a[9]++;for(;e<=279;)qn[e*2+1]=7,e++,a[7]++;for(;e<=287;)qn[e*2+1]=8,e++,a[8]++;for(ZS(qn,Ts+1,a),e=0;e<Ia;e++)Ko[e*2+1]=5,Ko[e*2]=YS(e,5);WS=new cd(qn,ih,Js+1,Ts,_i),GS=new cd(Ko,gc,0,Ia,_i),KS=new cd(new Array(0),kL,0,tg,SL)},XS=e=>{let t;for(t=0;t<Ts;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ia;t++)e.dyn_dtree[t*2]=0;for(t=0;t<tg;t++)e.bl_tree[t*2]=0;e.dyn_ltree[ng*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},QS=e=>{e.bi_valid>8?Rs(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},R0=(e,t,n,r)=>{const i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},fd=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&R0(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!R0(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},M0=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?On(e,i,t):(o=Os[i],On(e,o+Js+1,t),s=ih[o],s!==0&&(i-=rg[o],wt(e,i,s)),r--,o=qS(r),On(e,o,n),s=gc[o],s!==0&&(r-=ru[o],wt(e,r,s)));while(a<e.sym_next);On(e,ng,t)},ah=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems;let o,s,l=-1,c;for(e.heap_len=0,e.heap_max=US,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=l=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,n[c*2]=1,e.depth[c]=0,e.opt_len--,i&&(e.static_len-=r[c*2+1]);for(t.max_code=l,o=e.heap_len>>1;o>=1;o--)fd(e,n,o);c=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],fd(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[c*2]=n[o*2]+n[s*2],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=c,e.heap[1]=c++,fd(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],TL(e,t),ZS(n,l,e.bl_count)},I0=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<l&&a===o)&&(s<c?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[jS*2]++):s<=10?e.bl_tree[$S*2]++:e.bl_tree[VS*2]++,s=0,i=a,o===0?(l=138,c=3):a===o?(l=6,c=3):(l=7,c=4))},P0=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<l&&a===o)){if(s<c)do On(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(On(e,a,e.bl_tree),s--),On(e,jS,e.bl_tree),wt(e,s-3,2)):s<=10?(On(e,$S,e.bl_tree),wt(e,s-3,3)):(On(e,VS,e.bl_tree),wt(e,s-11,7));s=0,i=a,o===0?(l=138,c=3):a===o?(l=6,c=3):(l=7,c=4)}},OL=e=>{let t;for(I0(e,e.dyn_ltree,e.l_desc.max_code),I0(e,e.dyn_dtree,e.d_desc.max_code),ah(e,e.bl_desc),t=tg-1;t>=3&&e.bl_tree[HS[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},RL=(e,t,n,r)=>{let i;for(wt(e,t-257,5),wt(e,n-1,5),wt(e,r-4,4),i=0;i<r;i++)wt(e,e.bl_tree[HS[i]*2+1],3);P0(e,e.dyn_ltree,t-1),P0(e,e.dyn_dtree,n-1)},ML=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return A0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return O0;for(n=32;n<Js;n++)if(e.dyn_ltree[n*2]!==0)return O0;return A0};let D0=!1;const IL=e=>{D0||(AL(),D0=!0),e.l_desc=new ud(e.dyn_ltree,WS),e.d_desc=new ud(e.dyn_dtree,GS),e.bl_desc=new ud(e.bl_tree,KS),e.bi_buf=0,e.bi_valid=0,XS(e)},JS=(e,t,n,r)=>{wt(e,(_L<<1)+(r?1:0),3),QS(e),Rs(e,n),Rs(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},PL=e=>{wt(e,BS<<1,3),On(e,ng,qn),CL(e)},DL=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===bL&&(e.strm.data_type=ML(e)),ah(e,e.l_desc),ah(e,e.d_desc),o=OL(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?JS(e,t,n,r):e.strategy===vL||a===i?(wt(e,(BS<<1)+(r?1:0),3),M0(e,qn,Ko)):(wt(e,(wL<<1)+(r?1:0),3),RL(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),M0(e,e.dyn_ltree,e.dyn_dtree)),XS(e),r&&QS(e)},LL=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Os[n]+Js+1)*2]++,e.dyn_dtree[qS(t)*2]++),e.sym_next===e.sym_end);var FL=IL,zL=JS,BL=DL,UL=LL,jL=PL,$L={_tr_init:FL,_tr_stored_block:zL,_tr_flush_block:BL,_tr_tally:UL,_tr_align:jL};const VL=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};var Ms=VL;const HL=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},WL=new Uint32Array(HL()),GL=(e,t,n,r)=>{const i=WL,a=r+n;e^=-1;for(let o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1};var Xe=GL,zi={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ki={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:KL,_tr_stored_block:oh,_tr_flush_block:qL,_tr_tally:jr,_tr_align:YL}=$L,{Z_NO_FLUSH:$r,Z_PARTIAL_FLUSH:ZL,Z_FULL_FLUSH:XL,Z_FINISH:Zt,Z_BLOCK:L0,Z_OK:tt,Z_STREAM_END:F0,Z_STREAM_ERROR:Pn,Z_DATA_ERROR:QL,Z_BUF_ERROR:dd,Z_DEFAULT_COMPRESSION:JL,Z_FILTERED:e5,Z_HUFFMAN_ONLY:Vl,Z_RLE:t5,Z_FIXED:n5,Z_DEFAULT_STRATEGY:r5,Z_UNKNOWN:i5,Z_DEFLATED:ef}=Ki,a5=9,o5=15,s5=8,l5=29,c5=256,sh=c5+1+l5,u5=30,f5=19,d5=2*sh+1,p5=15,ue=3,Mr=258,Dn=Mr+ue+1,h5=32,Wa=42,ig=57,lh=69,ch=73,uh=91,fh=103,wi=113,Ro=666,pt=1,so=2,Bi=3,lo=4,m5=3,xi=(e,t)=>(e.msg=zi[t],t),z0=e=>e*2-(e>4?9:0),Cr=e=>{let t=e.length;for(;--t>=0;)e[t]=0},g5=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)};let y5=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,Vr=y5;const Mt=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Lt=(e,t)=>{qL(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Mt(e.strm)},de=(e,t)=>{e.pending_buf[e.pending++]=t},wo=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},dh=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Ms(e.adler,t,i,n):e.state.wrap===2&&(e.adler=Xe(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},ek=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-Dn?e.strstart-(e.w_size-Dn):0,c=e.window,u=e.w_mask,f=e.prev,d=e.strstart+Mr;let p=c[r+o-1],m=c[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(c[i+o]!==m||c[i+o-1]!==p||c[i]!==c[r]||c[++i]!==c[r+1])){r+=2,i++;do;while(c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&r<d);if(a=Mr-(d-r),r=d-Mr,a>o){if(e.match_start=t,o=a,a>=s)break;p=c[r+o-1],m=c[r+o]}}while((t=f[t&u])>l&&--n!==0);return o<=e.lookahead?o:e.lookahead},Ga=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Dn)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),g5(e),r+=t),e.strm.avail_in===0)break;if(n=dh(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=ue)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Vr(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Vr(e,e.ins_h,e.window[i+ue-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<ue)););}while(e.lookahead<Dn&&e.strm.avail_in!==0)},tk=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==Zt||t===$r||r!==i+e.strm.avail_in)))break;o=t===Zt&&r===i+e.strm.avail_in?1:0,oh(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Mt(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(dh(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?lo:t!==$r&&t!==Zt&&e.strm.avail_in===0&&e.strstart===e.block_start?so:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(dh(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===Zt)&&t!==$r&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=t===Zt&&e.strm.avail_in===0&&r===i?1:0,oh(e,e.block_start,r,o),e.block_start+=r,Mt(e.strm)),o?Bi:pt)},pd=(e,t)=>{let n,r;for(;;){if(e.lookahead<Dn){if(Ga(e),e.lookahead<Dn&&t===$r)return pt;if(e.lookahead===0)break}if(n=0,e.lookahead>=ue&&(e.ins_h=Vr(e,e.ins_h,e.window[e.strstart+ue-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Dn&&(e.match_length=ek(e,n)),e.match_length>=ue)if(r=jr(e,e.strstart-e.match_start,e.match_length-ue),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ue){e.match_length--;do e.strstart++,e.ins_h=Vr(e,e.ins_h,e.window[e.strstart+ue-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Vr(e,e.ins_h,e.window[e.strstart+1]);else r=jr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Lt(e,!1),e.strm.avail_out===0))return pt}return e.insert=e.strstart<ue-1?e.strstart:ue-1,t===Zt?(Lt(e,!0),e.strm.avail_out===0?Bi:lo):e.sym_next&&(Lt(e,!1),e.strm.avail_out===0)?pt:so},ea=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<Dn){if(Ga(e),e.lookahead<Dn&&t===$r)return pt;if(e.lookahead===0)break}if(n=0,e.lookahead>=ue&&(e.ins_h=Vr(e,e.ins_h,e.window[e.strstart+ue-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=ue-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Dn&&(e.match_length=ek(e,n),e.match_length<=5&&(e.strategy===e5||e.match_length===ue&&e.strstart-e.match_start>4096)&&(e.match_length=ue-1)),e.prev_length>=ue&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ue,r=jr(e,e.strstart-1-e.prev_match,e.prev_length-ue),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Vr(e,e.ins_h,e.window[e.strstart+ue-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=ue-1,e.strstart++,r&&(Lt(e,!1),e.strm.avail_out===0))return pt}else if(e.match_available){if(r=jr(e,0,e.window[e.strstart-1]),r&&Lt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return pt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=jr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<ue-1?e.strstart:ue-1,t===Zt?(Lt(e,!0),e.strm.avail_out===0?Bi:lo):e.sym_next&&(Lt(e,!1),e.strm.avail_out===0)?pt:so},v5=(e,t)=>{let n,r,i,a;const o=e.window;for(;;){if(e.lookahead<=Mr){if(Ga(e),e.lookahead<=Mr&&t===$r)return pt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=ue&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+Mr;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=Mr-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ue?(n=jr(e,1,e.match_length-ue),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=jr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Lt(e,!1),e.strm.avail_out===0))return pt}return e.insert=0,t===Zt?(Lt(e,!0),e.strm.avail_out===0?Bi:lo):e.sym_next&&(Lt(e,!1),e.strm.avail_out===0)?pt:so},b5=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Ga(e),e.lookahead===0)){if(t===$r)return pt;break}if(e.match_length=0,n=jr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Lt(e,!1),e.strm.avail_out===0))return pt}return e.insert=0,t===Zt?(Lt(e,!0),e.strm.avail_out===0?Bi:lo):e.sym_next&&(Lt(e,!1),e.strm.avail_out===0)?pt:so};function Sn(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const Mo=[new Sn(0,0,0,0,tk),new Sn(4,4,8,4,pd),new Sn(4,5,16,8,pd),new Sn(4,6,32,32,pd),new Sn(4,4,16,16,ea),new Sn(8,16,32,32,ea),new Sn(8,16,128,128,ea),new Sn(8,32,128,256,ea),new Sn(32,128,258,1024,ea),new Sn(32,258,258,4096,ea)],_5=e=>{e.window_size=2*e.w_size,Cr(e.head),e.max_lazy_match=Mo[e.level].max_lazy,e.good_match=Mo[e.level].good_length,e.nice_match=Mo[e.level].nice_length,e.max_chain_length=Mo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ue-1,e.match_available=0,e.ins_h=0};function w5(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ef,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(d5*2),this.dyn_dtree=new Uint16Array((2*u5+1)*2),this.bl_tree=new Uint16Array((2*f5+1)*2),Cr(this.dyn_ltree),Cr(this.dyn_dtree),Cr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(p5+1),this.heap=new Uint16Array(2*sh+1),Cr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*sh+1),Cr(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const el=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Wa&&t.status!==ig&&t.status!==lh&&t.status!==ch&&t.status!==uh&&t.status!==fh&&t.status!==wi&&t.status!==Ro?1:0},nk=e=>{if(el(e))return xi(e,Pn);e.total_in=e.total_out=0,e.data_type=i5;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?ig:t.wrap?Wa:wi,e.adler=t.wrap===2?0:1,t.last_flush=-2,KL(t),tt},rk=e=>{const t=nk(e);return t===tt&&_5(e.state),t},x5=(e,t)=>el(e)||e.state.wrap!==2?Pn:(e.state.gzhead=t,tt),ik=(e,t,n,r,i,a)=>{if(!e)return Pn;let o=1;if(t===JL&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>a5||n!==ef||r<8||r>15||t<0||t>9||a<0||a>n5||r===8&&o!==1)return xi(e,Pn);r===8&&(r=9);const s=new w5;return e.state=s,s.strm=e,s.status=Wa,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+ue-1)/ue),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,rk(e)},E5=(e,t)=>ik(e,t,ef,o5,s5,r5),S5=(e,t)=>{if(el(e)||t>L0||t<0)return e?xi(e,Pn):Pn;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Ro&&t!==Zt)return xi(e,e.avail_out===0?dd:Pn);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Mt(e),e.avail_out===0)return n.last_flush=-1,tt}else if(e.avail_in===0&&z0(t)<=z0(r)&&t!==Zt)return xi(e,dd);if(n.status===Ro&&e.avail_in!==0)return xi(e,dd);if(n.status===Wa&&n.wrap===0&&(n.status=wi),n.status===Wa){let i=ef+(n.w_bits-8<<4)<<8,a=-1;if(n.strategy>=Vl||n.level<2?a=0:n.level<6?a=1:n.level===6?a=2:a=3,i|=a<<6,n.strstart!==0&&(i|=h5),i+=31-i%31,wo(n,i),n.strstart!==0&&(wo(n,e.adler>>>16),wo(n,e.adler&65535)),e.adler=1,n.status=wi,Mt(e),n.pending!==0)return n.last_flush=-1,tt}if(n.status===ig){if(e.adler=0,de(n,31),de(n,139),de(n,8),n.gzhead)de(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),de(n,n.gzhead.time&255),de(n,n.gzhead.time>>8&255),de(n,n.gzhead.time>>16&255),de(n,n.gzhead.time>>24&255),de(n,n.level===9?2:n.strategy>=Vl||n.level<2?4:0),de(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(de(n,n.gzhead.extra.length&255),de(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Xe(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=lh;else if(de(n,0),de(n,0),de(n,0),de(n,0),de(n,0),de(n,n.level===9?2:n.strategy>=Vl||n.level<2?4:0),de(n,m5),n.status=wi,Mt(e),n.pending!==0)return n.last_flush=-1,tt}if(n.status===lh){if(n.gzhead.extra){let i=n.pending,a=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+a>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=Xe(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,Mt(e),n.pending!==0)return n.last_flush=-1,tt;i=0,a-=s}let o=new Uint8Array(n.gzhead.extra);n.pending_buf.set(o.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>i&&(e.adler=Xe(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=ch}if(n.status===ch){if(n.gzhead.name){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=Xe(e.adler,n.pending_buf,n.pending-i,i)),Mt(e),n.pending!==0)return n.last_flush=-1,tt;i=0}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,de(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Xe(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=uh}if(n.status===uh){if(n.gzhead.comment){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=Xe(e.adler,n.pending_buf,n.pending-i,i)),Mt(e),n.pending!==0)return n.last_flush=-1,tt;i=0}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,de(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Xe(e.adler,n.pending_buf,n.pending-i,i))}n.status=fh}if(n.status===fh){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Mt(e),n.pending!==0))return n.last_flush=-1,tt;de(n,e.adler&255),de(n,e.adler>>8&255),e.adler=0}if(n.status=wi,Mt(e),n.pending!==0)return n.last_flush=-1,tt}if(e.avail_in!==0||n.lookahead!==0||t!==$r&&n.status!==Ro){let i=n.level===0?tk(n,t):n.strategy===Vl?b5(n,t):n.strategy===t5?v5(n,t):Mo[n.level].func(n,t);if((i===Bi||i===lo)&&(n.status=Ro),i===pt||i===Bi)return e.avail_out===0&&(n.last_flush=-1),tt;if(i===so&&(t===ZL?YL(n):t!==L0&&(oh(n,0,0,!1),t===XL&&(Cr(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Mt(e),e.avail_out===0))return n.last_flush=-1,tt}return t!==Zt?tt:n.wrap<=0?F0:(n.wrap===2?(de(n,e.adler&255),de(n,e.adler>>8&255),de(n,e.adler>>16&255),de(n,e.adler>>24&255),de(n,e.total_in&255),de(n,e.total_in>>8&255),de(n,e.total_in>>16&255),de(n,e.total_in>>24&255)):(wo(n,e.adler>>>16),wo(n,e.adler&65535)),Mt(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?tt:F0)},k5=e=>{if(el(e))return Pn;const t=e.state.status;return e.state=null,t===wi?xi(e,QL):tt},N5=(e,t)=>{let n=t.length;if(el(e))return Pn;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==Wa||r.lookahead)return Pn;if(i===1&&(e.adler=Ms(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Cr(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(t.subarray(n-r.w_size,n),0),t=l,n=r.w_size}const a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ga(r);r.lookahead>=ue;){let l=r.strstart,c=r.lookahead-(ue-1);do r.ins_h=Vr(r,r.ins_h,r.window[l+ue-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++;while(--c);r.strstart=l,r.lookahead=ue-1,Ga(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ue-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,tt};var C5=E5,T5=ik,A5=rk,O5=nk,R5=x5,M5=S5,I5=k5,P5=N5,D5="pako deflate (from Nodeca project)",qo={deflateInit:C5,deflateInit2:T5,deflateReset:A5,deflateResetKeep:O5,deflateSetHeader:R5,deflate:M5,deflateEnd:I5,deflateSetDictionary:P5,deflateInfo:D5};const L5=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var F5=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)L5(n,r)&&(e[r]=n[r])}}return e},z5=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,a=e.length;r<a;r++){let o=e[r];n.set(o,i),i+=o.length}return n},tf={assign:F5,flattenChunks:z5};let ak=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{ak=!1}const Is=new Uint8Array(256);for(let e=0;e<256;e++)Is[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Is[254]=Is[254]=1;var B5=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const U5=(e,t)=>{if(t<65534&&e.subarray&&ak)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var j5=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const a=new Array(n*2);for(i=0,r=0;r<n;){let o=e[r++];if(o<128){a[i++]=o;continue}let s=Is[o];if(s>4){a[i++]=65533,r+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&r<n;)o=o<<6|e[r++]&63,s--;if(s>1){a[i++]=65533;continue}o<65536?a[i++]=o:(o-=65536,a[i++]=55296|o>>10&1023,a[i++]=56320|o&1023)}return U5(a,i)},$5=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Is[e[n]]>t?n:t},Ps={string2buf:B5,buf2string:j5,utf8border:$5};function V5(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var ok=V5;const sk=Object.prototype.toString,{Z_NO_FLUSH:H5,Z_SYNC_FLUSH:W5,Z_FULL_FLUSH:G5,Z_FINISH:K5,Z_OK:iu,Z_STREAM_END:q5,Z_DEFAULT_COMPRESSION:Y5,Z_DEFAULT_STRATEGY:Z5,Z_DEFLATED:X5}=Ki;function tl(e){this.options=tf.assign({level:Y5,method:X5,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z5},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ok,this.strm.avail_out=0;let n=qo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==iu)throw new Error(zi[n]);if(t.header&&qo.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=Ps.string2buf(t.dictionary):sk.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=qo.deflateSetDictionary(this.strm,r),n!==iu)throw new Error(zi[n]);this._dict_set=!0}}tl.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,a;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?K5:H5,typeof e=="string"?n.input=Ps.string2buf(e):sk.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===W5||a===G5)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=qo.deflate(n,a),i===q5)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=qo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===iu;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};tl.prototype.onData=function(e){this.chunks.push(e)};tl.prototype.onEnd=function(e){e===iu&&(this.result=tf.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ag(e,t){const n=new tl(t);if(n.push(e,!0),n.err)throw n.msg||zi[n.err];return n.result}function Q5(e,t){return t=t||{},t.raw=!0,ag(e,t)}function J5(e,t){return t=t||{},t.gzip=!0,ag(e,t)}var e6=tl,t6=ag,n6=Q5,r6=J5,i6=Ki,a6={Deflate:e6,deflate:t6,deflateRaw:n6,gzip:r6,constants:i6};const Hl=16209,o6=16191;var s6=function(t,n){let r,i,a,o,s,l,c,u,f,d,p,m,g,w,h,b,v,_,S,x,k,C,A,M;const I=t.state;r=t.next_in,A=t.input,i=r+(t.avail_in-5),a=t.next_out,M=t.output,o=a-(n-t.avail_out),s=a+(t.avail_out-257),l=I.dmax,c=I.wsize,u=I.whave,f=I.wnext,d=I.window,p=I.hold,m=I.bits,g=I.lencode,w=I.distcode,h=(1<<I.lenbits)-1,b=(1<<I.distbits)-1;e:do{m<15&&(p+=A[r++]<<m,m+=8,p+=A[r++]<<m,m+=8),v=g[p&h];t:for(;;){if(_=v>>>24,p>>>=_,m-=_,_=v>>>16&255,_===0)M[a++]=v&65535;else if(_&16){S=v&65535,_&=15,_&&(m<_&&(p+=A[r++]<<m,m+=8),S+=p&(1<<_)-1,p>>>=_,m-=_),m<15&&(p+=A[r++]<<m,m+=8,p+=A[r++]<<m,m+=8),v=w[p&b];n:for(;;){if(_=v>>>24,p>>>=_,m-=_,_=v>>>16&255,_&16){if(x=v&65535,_&=15,m<_&&(p+=A[r++]<<m,m+=8,m<_&&(p+=A[r++]<<m,m+=8)),x+=p&(1<<_)-1,x>l){t.msg="invalid distance too far back",I.mode=Hl;break e}if(p>>>=_,m-=_,_=a-o,x>_){if(_=x-_,_>u&&I.sane){t.msg="invalid distance too far back",I.mode=Hl;break e}if(k=0,C=d,f===0){if(k+=c-_,_<S){S-=_;do M[a++]=d[k++];while(--_);k=a-x,C=M}}else if(f<_){if(k+=c+f-_,_-=f,_<S){S-=_;do M[a++]=d[k++];while(--_);if(k=0,f<S){_=f,S-=_;do M[a++]=d[k++];while(--_);k=a-x,C=M}}}else if(k+=f-_,_<S){S-=_;do M[a++]=d[k++];while(--_);k=a-x,C=M}for(;S>2;)M[a++]=C[k++],M[a++]=C[k++],M[a++]=C[k++],S-=3;S&&(M[a++]=C[k++],S>1&&(M[a++]=C[k++]))}else{k=a-x;do M[a++]=M[k++],M[a++]=M[k++],M[a++]=M[k++],S-=3;while(S>2);S&&(M[a++]=M[k++],S>1&&(M[a++]=M[k++]))}}else if(_&64){t.msg="invalid distance code",I.mode=Hl;break e}else{v=w[(v&65535)+(p&(1<<_)-1)];continue n}break}}else if(_&64)if(_&32){I.mode=o6;break e}else{t.msg="invalid literal/length code",I.mode=Hl;break e}else{v=g[(v&65535)+(p&(1<<_)-1)];continue t}break}}while(r<i&&a<s);S=m>>3,r-=S,m-=S<<3,p&=(1<<m)-1,t.next_in=r,t.next_out=a,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=a<s?257+(s-a):257-(a-s),I.hold=p,I.bits=m};const ta=15,B0=852,U0=592,j0=0,hd=1,$0=2,l6=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),c6=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),u6=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),f6=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),d6=(e,t,n,r,i,a,o,s)=>{const l=s.bits;let c=0,u=0,f=0,d=0,p=0,m=0,g=0,w=0,h=0,b=0,v,_,S,x,k,C=null,A;const M=new Uint16Array(ta+1),I=new Uint16Array(ta+1);let F=null,H,W,$;for(c=0;c<=ta;c++)M[c]=0;for(u=0;u<r;u++)M[t[n+u]]++;for(p=l,d=ta;d>=1&&M[d]===0;d--);if(p>d&&(p=d),d===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f<d&&M[f]===0;f++);for(p<f&&(p=f),w=1,c=1;c<=ta;c++)if(w<<=1,w-=M[c],w<0)return-1;if(w>0&&(e===j0||d!==1))return-1;for(I[1]=0,c=1;c<ta;c++)I[c+1]=I[c]+M[c];for(u=0;u<r;u++)t[n+u]!==0&&(o[I[t[n+u]]++]=u);if(e===j0?(C=F=o,A=20):e===hd?(C=l6,F=c6,A=257):(C=u6,F=f6,A=0),b=0,u=0,c=f,k=a,m=p,g=0,S=-1,h=1<<p,x=h-1,e===hd&&h>B0||e===$0&&h>U0)return 1;for(;;){H=c-g,o[u]+1<A?(W=0,$=o[u]):o[u]>=A?(W=F[o[u]-A],$=C[o[u]-A]):(W=32+64,$=0),v=1<<c-g,_=1<<m,f=_;do _-=v,i[k+(b>>g)+_]=H<<24|W<<16|$|0;while(_!==0);for(v=1<<c-1;b&v;)v>>=1;if(v!==0?(b&=v-1,b+=v):b=0,u++,--M[c]===0){if(c===d)break;c=t[n+o[u]]}if(c>p&&(b&x)!==S){for(g===0&&(g=p),k+=f,m=c-g,w=1<<m;m+g<d&&(w-=M[m+g],!(w<=0));)m++,w<<=1;if(h+=1<<m,e===hd&&h>B0||e===$0&&h>U0)return 1;S=b&x,i[S]=p<<24|m<<16|k-a|0}}return b!==0&&(i[k+b]=c-g<<24|64<<16|0),s.bits=p,0};var Yo=d6;const p6=0,lk=1,ck=2,{Z_FINISH:V0,Z_BLOCK:h6,Z_TREES:Wl,Z_OK:Ui,Z_STREAM_END:m6,Z_NEED_DICT:g6,Z_STREAM_ERROR:nn,Z_DATA_ERROR:uk,Z_MEM_ERROR:fk,Z_BUF_ERROR:y6,Z_DEFLATED:H0}=Ki,nf=16180,W0=16181,G0=16182,K0=16183,q0=16184,Y0=16185,Z0=16186,X0=16187,Q0=16188,J0=16189,au=16190,Hn=16191,md=16192,e1=16193,gd=16194,t1=16195,n1=16196,r1=16197,i1=16198,Gl=16199,Kl=16200,a1=16201,o1=16202,s1=16203,l1=16204,c1=16205,yd=16206,u1=16207,f1=16208,Ae=16209,dk=16210,pk=16211,v6=852,b6=592,_6=15,w6=_6,d1=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function x6(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const qi=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<nf||t.mode>pk?1:0},hk=e=>{if(qi(e))return nn;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=nf,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(v6),t.distcode=t.distdyn=new Int32Array(b6),t.sane=1,t.back=-1,Ui},mk=e=>{if(qi(e))return nn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,hk(e)},gk=(e,t)=>{let n;if(qi(e))return nn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?nn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,mk(e))},yk=(e,t)=>{if(!e)return nn;const n=new x6;e.state=n,n.strm=e,n.window=null,n.mode=nf;const r=gk(e,t);return r!==Ui&&(e.state=null),r},E6=e=>yk(e,w6);let p1=!0,vd,bd;const S6=e=>{if(p1){vd=new Int32Array(512),bd=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Yo(lk,e.lens,0,288,vd,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Yo(ck,e.lens,0,32,bd,0,e.work,{bits:5}),p1=!1}e.lencode=vd,e.lenbits=9,e.distcode=bd,e.distbits=5},vk=(e,t,n,r)=>{let i;const a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},k6=(e,t)=>{let n,r,i,a,o,s,l,c,u,f,d,p,m,g,w=0,h,b,v,_,S,x,k,C;const A=new Uint8Array(4);let M,I;const F=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(qi(e)||!e.output||!e.input&&e.avail_in!==0)return nn;n=e.state,n.mode===Hn&&(n.mode=md),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,f=s,d=l,C=Ui;e:for(;;)switch(n.mode){case nf:if(n.wrap===0){n.mode=md;break}for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&2&&c===35615){n.wbits===0&&(n.wbits=15),n.check=0,A[0]=c&255,A[1]=c>>>8&255,n.check=Xe(n.check,A,2,0),c=0,u=0,n.mode=W0;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=Ae;break}if((c&15)!==H0){e.msg="unknown compression method",n.mode=Ae;break}if(c>>>=4,u-=4,k=(c&15)+8,n.wbits===0&&(n.wbits=k),k>15||k>n.wbits){e.msg="invalid window size",n.mode=Ae;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=c&512?J0:Hn,c=0,u=0;break;case W0:for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.flags=c,(n.flags&255)!==H0){e.msg="unknown compression method",n.mode=Ae;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Ae;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&n.wrap&4&&(A[0]=c&255,A[1]=c>>>8&255,n.check=Xe(n.check,A,2,0)),c=0,u=0,n.mode=G0;case G0:for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.head&&(n.head.time=c),n.flags&512&&n.wrap&4&&(A[0]=c&255,A[1]=c>>>8&255,A[2]=c>>>16&255,A[3]=c>>>24&255,n.check=Xe(n.check,A,4,0)),c=0,u=0,n.mode=K0;case K0:for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&n.wrap&4&&(A[0]=c&255,A[1]=c>>>8&255,n.check=Xe(n.check,A,2,0)),c=0,u=0,n.mode=q0;case q0:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&n.wrap&4&&(A[0]=c&255,A[1]=c>>>8&255,n.check=Xe(n.check,A,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=Y0;case Y0:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),k)),n.flags&512&&n.wrap&4&&(n.check=Xe(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break e;n.length=0,n.mode=Z0;case Z0:if(n.flags&2048){if(s===0)break e;p=0;do k=r[a+p++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k));while(k&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=Xe(n.check,r,p,a)),s-=p,a+=p,k)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=X0;case X0:if(n.flags&4096){if(s===0)break e;p=0;do k=r[a+p++],n.head&&k&&n.length<65536&&(n.head.comment+=String.fromCharCode(k));while(k&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=Xe(n.check,r,p,a)),s-=p,a+=p,k)break e}else n.head&&(n.head.comment=null);n.mode=Q0;case Q0:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&4&&c!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Ae;break}c=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Hn;break;case J0:for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}e.adler=n.check=d1(c),c=0,u=0,n.mode=au;case au:if(n.havedict===0)return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,g6;e.adler=n.check=1,n.mode=Hn;case Hn:if(t===h6||t===Wl)break e;case md:if(n.last){c>>>=u&7,u-=u&7,n.mode=yd;break}for(;u<3;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}switch(n.last=c&1,c>>>=1,u-=1,c&3){case 0:n.mode=e1;break;case 1:if(S6(n),n.mode=Gl,t===Wl){c>>>=2,u-=2;break e}break;case 2:n.mode=n1;break;case 3:e.msg="invalid block type",n.mode=Ae}c>>>=2,u-=2;break;case e1:for(c>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Ae;break}if(n.length=c&65535,c=0,u=0,n.mode=gd,t===Wl)break e;case gd:n.mode=t1;case t1:if(p=n.length,p){if(p>s&&(p=s),p>l&&(p=l),p===0)break e;i.set(r.subarray(a,a+p),o),s-=p,a+=p,l-=p,o+=p,n.length-=p;break}n.mode=Hn;break;case n1:for(;u<14;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.nlen=(c&31)+257,c>>>=5,u-=5,n.ndist=(c&31)+1,c>>>=5,u-=5,n.ncode=(c&15)+4,c>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Ae;break}n.have=0,n.mode=r1;case r1:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.lens[F[n.have++]]=c&7,c>>>=3,u-=3}for(;n.have<19;)n.lens[F[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},C=Yo(p6,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,C){e.msg="invalid code lengths set",n.mode=Ae;break}n.have=0,n.mode=i1;case i1:for(;n.have<n.nlen+n.ndist;){for(;w=n.lencode[c&(1<<n.lenbits)-1],h=w>>>24,b=w>>>16&255,v=w&65535,!(h<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(v<16)c>>>=h,u-=h,n.lens[n.have++]=v;else{if(v===16){for(I=h+2;u<I;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(c>>>=h,u-=h,n.have===0){e.msg="invalid bit length repeat",n.mode=Ae;break}k=n.lens[n.have-1],p=3+(c&3),c>>>=2,u-=2}else if(v===17){for(I=h+3;u<I;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=h,u-=h,k=0,p=3+(c&7),c>>>=3,u-=3}else{for(I=h+7;u<I;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=h,u-=h,k=0,p=11+(c&127),c>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Ae;break}for(;p--;)n.lens[n.have++]=k}}if(n.mode===Ae)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Ae;break}if(n.lenbits=9,M={bits:n.lenbits},C=Yo(lk,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,C){e.msg="invalid literal/lengths set",n.mode=Ae;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},C=Yo(ck,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,C){e.msg="invalid distances set",n.mode=Ae;break}if(n.mode=Gl,t===Wl)break e;case Gl:n.mode=Kl;case Kl:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,s6(e,d),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,n.mode===Hn&&(n.back=-1);break}for(n.back=0;w=n.lencode[c&(1<<n.lenbits)-1],h=w>>>24,b=w>>>16&255,v=w&65535,!(h<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(b&&!(b&240)){for(_=h,S=b,x=v;w=n.lencode[x+((c&(1<<_+S)-1)>>_)],h=w>>>24,b=w>>>16&255,v=w&65535,!(_+h<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=_,u-=_,n.back+=_}if(c>>>=h,u-=h,n.back+=h,n.length=v,b===0){n.mode=c1;break}if(b&32){n.back=-1,n.mode=Hn;break}if(b&64){e.msg="invalid literal/length code",n.mode=Ae;break}n.extra=b&15,n.mode=a1;case a1:if(n.extra){for(I=n.extra;u<I;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=o1;case o1:for(;w=n.distcode[c&(1<<n.distbits)-1],h=w>>>24,b=w>>>16&255,v=w&65535,!(h<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(!(b&240)){for(_=h,S=b,x=v;w=n.distcode[x+((c&(1<<_+S)-1)>>_)],h=w>>>24,b=w>>>16&255,v=w&65535,!(_+h<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=_,u-=_,n.back+=_}if(c>>>=h,u-=h,n.back+=h,b&64){e.msg="invalid distance code",n.mode=Ae;break}n.offset=v,n.extra=b&15,n.mode=s1;case s1:if(n.extra){for(I=n.extra;u<I;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Ae;break}n.mode=l1;case l1:if(l===0)break e;if(p=d-l,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Ae;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),g=n.window}else g=i,m=o-n.offset,p=n.length;p>l&&(p=l),l-=p,n.length-=p;do i[o++]=g[m++];while(--p);n.length===0&&(n.mode=Kl);break;case c1:if(l===0)break e;i[o++]=n.length,l--,n.mode=Kl;break;case yd:if(n.wrap){for(;u<32;){if(s===0)break e;s--,c|=r[a++]<<u,u+=8}if(d-=l,e.total_out+=d,n.total+=d,n.wrap&4&&d&&(e.adler=n.check=n.flags?Xe(n.check,i,d,o-d):Ms(n.check,i,d,o-d)),d=l,n.wrap&4&&(n.flags?c:d1(c))!==n.check){e.msg="incorrect data check",n.mode=Ae;break}c=0,u=0}n.mode=u1;case u1:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&4&&c!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Ae;break}c=0,u=0}n.mode=f1;case f1:C=m6;break e;case Ae:C=uk;break e;case dk:return fk;case pk:default:return nn}return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,(n.wsize||d!==e.avail_out&&n.mode<Ae&&(n.mode<yd||t!==V0))&&vk(e,e.output,e.next_out,d-e.avail_out),f-=e.avail_in,d-=e.avail_out,e.total_in+=f,e.total_out+=d,n.total+=d,n.wrap&4&&d&&(e.adler=n.check=n.flags?Xe(n.check,i,d,e.next_out-d):Ms(n.check,i,d,e.next_out-d)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Hn?128:0)+(n.mode===Gl||n.mode===gd?256:0),(f===0&&d===0||t===V0)&&C===Ui&&(C=y6),C},N6=e=>{if(qi(e))return nn;let t=e.state;return t.window&&(t.window=null),e.state=null,Ui},C6=(e,t)=>{if(qi(e))return nn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Ui):nn},T6=(e,t)=>{const n=t.length;let r,i,a;return qi(e)||(r=e.state,r.wrap!==0&&r.mode!==au)?nn:r.mode===au&&(i=1,i=Ms(i,t,n,0),i!==r.check)?uk:(a=vk(e,t,n,n),a?(r.mode=dk,fk):(r.havedict=1,Ui))};var A6=mk,O6=gk,R6=hk,M6=E6,I6=yk,P6=k6,D6=N6,L6=C6,F6=T6,z6="pako inflate (from Nodeca project)",Yn={inflateReset:A6,inflateReset2:O6,inflateResetKeep:R6,inflateInit:M6,inflateInit2:I6,inflate:P6,inflateEnd:D6,inflateGetHeader:L6,inflateSetDictionary:F6,inflateInfo:z6};function B6(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var U6=B6;const bk=Object.prototype.toString,{Z_NO_FLUSH:j6,Z_FINISH:$6,Z_OK:Ds,Z_STREAM_END:_d,Z_NEED_DICT:wd,Z_STREAM_ERROR:V6,Z_DATA_ERROR:h1,Z_MEM_ERROR:H6}=Ki;function nl(e){this.options=tf.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ok,this.strm.avail_out=0;let n=Yn.inflateInit2(this.strm,t.windowBits);if(n!==Ds)throw new Error(zi[n]);if(this.header=new U6,Yn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Ps.string2buf(t.dictionary):bk.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Yn.inflateSetDictionary(this.strm,t.dictionary),n!==Ds)))throw new Error(zi[n])}nl.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,o,s;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?$6:j6,bk.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=Yn.inflate(n,o),a===wd&&i&&(a=Yn.inflateSetDictionary(n,i),a===Ds?a=Yn.inflate(n,o):a===h1&&(a=wd));n.avail_in>0&&a===_d&&n.state.wrap>0&&e[n.next_in]!==0;)Yn.inflateReset(n),a=Yn.inflate(n,o);switch(a){case V6:case h1:case wd:case H6:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===_d))if(this.options.to==="string"){let l=Ps.utf8border(n.output,n.next_out),c=n.next_out-l,u=Ps.buf2string(n.output,l);n.next_out=c,n.avail_out=r-c,c&&n.output.set(n.output.subarray(l,l+c),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===Ds&&s===0)){if(a===_d)return a=Yn.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};nl.prototype.onData=function(e){this.chunks.push(e)};nl.prototype.onEnd=function(e){e===Ds&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=tf.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function og(e,t){const n=new nl(t);if(n.push(e),n.err)throw n.msg||zi[n.err];return n.result}function W6(e,t){return t=t||{},t.raw=!0,og(e,t)}var G6=nl,K6=og,q6=W6,Y6=og,Z6=Ki,X6={Inflate:G6,inflate:K6,inflateRaw:q6,ungzip:Y6,constants:Z6};const{Deflate:Q6,deflate:J6,deflateRaw:eF,gzip:tF}=a6,{Inflate:nF,inflate:rF,inflateRaw:iF,ungzip:aF}=X6;var oF=Q6,sF=J6,lF=eF,cF=tF,uF=nF,fF=rF,dF=iF,pF=aF,hF=Ki,mF={Deflate:oF,deflate:sF,deflateRaw:lF,gzip:cF,Inflate:uF,inflate:fF,inflateRaw:dF,ungzip:pF,constants:hF};const _k=({chart:e,title:t,fallback:n,onLoad:r})=>{const[i,a]=O.useState(""),[o,s]=O.useState(null);return O.useEffect(()=>{const l=u=>{const f=document.documentElement.classList.contains("dark")?"dark":"default",p=JSON.stringify({code:u,mermaid:{theme:f}}),m=mF.deflate(p);return btoa(String.fromCharCode(...Array.from(m))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")};(async()=>{try{const f=`https://mermaid.ink/svg/pako:${l(e)}`;a(f),s(null)}catch(u){console.error("Failed to render mermaid diagram:",u),s(u instanceof Error?u:new Error(String(u)))}})()},[e]),o&&n?n(o):y.jsxs("div",{className:"group relative my-4",children:[y.jsxs("div",{className:"relative mb-2 flex flex-row flex-nowrap items-center gap-4",children:[y.jsx("div",{className:"font-medium",children:t}),y.jsxs("div",{className:"invisible absolute right-0 top-0 flex flex-row items-center divide-x-2 divide-ide-border rounded border-2 border-ide-border group-hover:visible",children:[y.jsx(gF,{imageUrl:i}),y.jsx(yF,{code:e})]})]}),y.jsx("div",{className:"w-full",children:i&&y.jsx("img",{src:i,alt:"Mermaid diagram",className:"h-auto w-full",onError:()=>s(new Error("Failed to load diagram")),onLoad:()=>{r==null||r()}})})]})},gF=({imageUrl:e})=>y.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",title:"Open diagram in new tab",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",children:y.jsx(re.FileExport,{})}),yF=({code:e})=>{const[t,n]=O.useState(!1);return y.jsx("button",{title:"Copy diagram code",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",onClick:()=>{Qn({message:{target:"extension",request:"copyToClipboard",content:e}}),n(!0)},onBlur:()=>n(!1),children:t?y.jsx(re.Check,{}):y.jsx(re.Copy,{})})},vF=e=>e.contextType==="uri",wk=e=>e.contextType==="location",bF=e=>vF(e)?e.uri:wk(e)?e.location.uri:null,_F=e=>wk(e)?e.location.range:null,wF=({message:e})=>{window.sourceryLS.postMessage({message:e})},sg=({contextIndicators:e,className:t})=>!e||!e.length?null:y.jsx("div",{className:Re("flex flex-row gap-2 flex-wrap",t),children:e.map((n,r)=>{const i=bF(n),a=i?()=>{wF({message:{target:"extension",request:"openLink",linkType:"file",link:i.slice(7),documentRange:_F(n)}})}:void 0;return y.jsxs("span",{className:Re("text-sm text-ide-disabled-text",a&&"cursor-pointer hover:text-ide-primary-btn-bg"),onClick:a,children:[n.tag&&y.jsxs("span",{className:"font-bold",children:[n.tag,": "]}),n.label]},r)})}),m1=({copyValue:e})=>{const[t,n]=O.useState(!1);return y.jsx("button",{title:"Copy to clipboard",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",onClick:()=>{Qn({message:{target:"extension",request:"copyToClipboard",content:e}}),n(!0)},onBlur:()=>n(!1),children:t?y.jsx(re.Check,{}):y.jsx(re.Copy,{})})},g1=({copyValue:e})=>y.jsx("button",{title:"Insert at cursor",className:"flex h-7 w-7 flex-row items-center justify-center bg-ide-editor-bg p-1 hover:bg-ide-chat-input-bg",onClick:()=>Qn({message:{target:"extension",request:"insertAtCursor",content:e}}),children:y.jsx(re.FileExport,{})}),xF=({onApplyFix:e,filePath:t})=>y.jsx("button",{title:"Apply fix",className:"flex h-7 flex-row items-center justify-center gap-1 bg-ide-editor-bg px-2 py-1 hover:bg-ide-chat-input-bg",onClick:()=>{e(),t&&Qn({message:{target:"extension",request:"openLink",link:t.startsWith("file://")?t.slice(7):t,linkType:"file",documentRange:null}})},children:y.jsx(re.FileExport,{})}),EF=({inline:e=!1,className:t,children:n,filePathLink:r,hideCodeButtons:i,onApplyFix:a,onApplyFixes:o,isComplete:s=!0,onImageLoad:l})=>{const c=LS(n),u=kF(c),f=u.length>0,{showLink:d,linkText:p,filename:m,filePath:g}=SF(r);return!e&&(t!=null&&t.includes("language-mermaid"))&&s?y.jsx(_k,{chart:c,title:"",onLoad:l,fallback:w=>y.jsxs("div",{className:"group relative",title:`Failed to render Mermaid diagram: ${w.message}`,children:[y.jsx("pre",{className:Re(t,"my-4 overflow-x-auto rounded bg-ide-editor-bg px-4 py-3"),children:y.jsx("code",{className:t,children:n})}),!i&&y.jsxs("div",{className:"invisible absolute right-3 top-3 flex flex-row items-center divide-x-2 divide-ide-border rounded border-2 border-ide-border group-hover:visible",children:[y.jsx(m1,{copyValue:c}),y.jsx(g1,{copyValue:c})]})]})}):e?y.jsx("code",{className:t,children:n}):y.jsxs("div",{className:"group relative",children:[y.jsx("pre",{className:Re(t,"border-ide-border bg-ide-editor-bg overflow-x-auto rounded border px-4 py-3",d?"mt-8":"mt-6"),children:y.jsx("code",{className:t,children:n})}),d&&m&&y.jsx("div",{className:"absolute left-0 top-0 -translate-y-full",children:y.jsx(sg,{contextIndicators:[{contextType:"uri",uri:`file://${p}`,label:m}],className:"rounded-t-md border border-b-0 border-ide-border bg-ide-editor-bg px-2 py-0.5 text-sm shadow-sm"})}),!i&&y.jsx("div",{className:"invisible absolute right-3 top-3 flex flex-row items-center divide-x-2 divide-ide-border rounded border-2 border-ide-border group-hover:visible",children:f&&g&&o?y.jsx("button",{title:"Apply changes",className:"flex h-7 flex-row items-center justify-center gap-1 bg-ide-editor-bg px-2 py-1 hover:bg-ide-chat-input-bg",onClick:()=>{o(g,u),Qn({message:{target:"extension",request:"openLink",link:g.startsWith("file://")?g.slice(7):g,linkType:"file",documentRange:null}})},children:y.jsx(re.FileExport,{})}):a?y.jsx(xF,{onApplyFix:a,filePath:g}):y.jsxs(y.Fragment,{children:[y.jsx(m1,{copyValue:c}),y.jsx(g1,{copyValue:c})]})})]})};function SF(e){const t=e==null?void 0:e.match(/\[(.*?)\]\((.*?)\)/),n=t==null?void 0:t[1],r=t==null?void 0:t[1],i=t==null?void 0:t[2],a=r==null?void 0:r.split(/[/\\]/).pop();return{showLink:a&&r&&i&&(i.startsWith("https")||i.startsWith("file")||i==="VALID_FILE"||i==="VALID_FILE_WITH_LINE_NUMBER"||i==="VALID_DIRECTORY"),linkText:r,filename:a,filePath:n}}function kF(e){const t=[],n=/<<<<<<< SEARCH\n([\s\S]*?)=======\n([\s\S]*?)>>>>>>> REPLACE/g;let r;for(;(r=n.exec(e))!==null;){const i=r[1].trimEnd(),a=r[2].trimEnd();t.push({search:i,replace:a})}return t}const Ei=({markdown:e,hideCodeButtons:t,onApplyFix:n,onApplyFixes:r,isComplete:i=!0,onImageLoad:a})=>y.jsx(GE,{rehypePlugins:[[UD,{ignoreMissing:!0}]],transformLinkUri:o=>o.startsWith("https")||o.startsWith("file")||o==="VALID_FILE"||o==="VALID_FILE_WITH_LINE_NUMBER"||o==="VALID_DIRECTORY"?o:"",components:{h1({children:o}){return y.jsx("h1",{className:"mb-2 mt-6 text-lg font-bold first:mt-0 last:mb-0",children:o})},h2({children:o}){return y.jsx("h2",{className:"mt-2 font-bold first:mt-0",children:o})},h3({children:o}){return y.jsx("h3",{className:"mt-2 font-bold first:mt-0",children:o})},h4({children:o}){return y.jsx("h4",{className:"mt-2 font-bold first:mt-0",children:o})},h5({children:o}){return y.jsx("h5",{className:"mt-2 font-bold first:mt-0",children:o})},h6({children:o}){return y.jsx("h6",{className:"mt-2 font-bold first:mt-0",children:o})},ul({children:o}){return y.jsx("ul",{className:"list-disc pl-5",children:o})},ol({children:o}){return y.jsx("ol",{className:"list-disc pl-5",children:o})},p({children:o}){return y.jsx("p",{className:"mt-2 first:mt-0",children:o})},code({node:o,inline:s,className:l,children:c}){var m;const f=(m=o.data)==null?void 0:m.meta,d=f==null?void 0:f.match(/file_path=(.+)/),p=d==null?void 0:d[1];return y.jsx(EF,{inline:s,className:l,filePathLink:p,hideCodeButtons:t,onApplyFix:n,onApplyFixes:r,isComplete:i,onImageLoad:a,children:c})},a({href:o,children:s}){if(!o)return y.jsx("span",{className:"bg-ide-error-bg text-ide-error-text",children:"[Missing link]"});if(o.startsWith("https"))return y.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:()=>Qn({message:{target:"extension",request:"openLink",link:o,linkType:"url",documentRange:null}}),children:s});if(o.startsWith("file"))return y.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:()=>Qn({message:{target:"extension",request:"openLink",linkType:"file",link:o.slice(7),documentRange:null}}),children:s});if(o==="VALID_FILE"||o==="VALID_FILE_WITH_LINE_NUMBER"){const l=String(s).replace(/\n$/,""),[c,u]=l.split(":"),f=parseInt(u,10)-1,d=isNaN(f)?null:{start:{line:f,character:0},end:{line:f,character:0}};return y.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:p=>{p.preventDefault(),Qn({message:{target:"extension",request:"openLink",link:c,linkType:"file",documentRange:d}})},children:s})}if(o==="VALID_DIRECTORY"){const l=String(s).replace(/\n$/,"");return y.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:c=>{c.preventDefault(),Qn({message:{target:"extension",request:"openLink",link:l,linkType:"directory",documentRange:null}})},children:s})}return y.jsx("span",{className:"bg-ide-error-bg text-ide-error-text",children:"[Invalid link]"})}},children:e}),xk=()=>y.jsxs("div",{className:"flex h-[1.5rem] flex-row items-center gap-1",children:[y.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0s"}}),y.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0.2s"}}),y.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0.4s"}})]}),Ek=O.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rf=O.createContext({}),lg=O.createContext(null),af=typeof document<"u",NF=af?O.useLayoutEffect:O.useEffect,Sk=O.createContext({strict:!1});function CF(e,t,n,r){const{visualElement:i}=O.useContext(rf),a=O.useContext(Sk),o=O.useContext(lg),s=O.useContext(Ek).reducedMotion,l=O.useRef();r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:s}));const c=l.current;O.useInsertionEffect(()=>{c&&c.update(n,o)});const u=O.useRef(!!window.HandoffAppearAnimations);return NF(()=>{c&&(c.render(),u.current&&c.animationState&&c.animationState.animateChanges())}),O.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,u.current=!1)}),c}function ba(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function TF(e,t,n){return O.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ba(n)&&(n.current=r))},[t])}function Ls(e){return typeof e=="string"||Array.isArray(e)}function of(e){return typeof e=="object"&&typeof e.start=="function"}const cg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ug=["initial",...cg];function sf(e){return of(e.animate)||ug.some(t=>Ls(e[t]))}function kk(e){return!!(sf(e)||e.variants)}function AF(e,t){if(sf(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ls(n)?n:void 0,animate:Ls(r)?r:void 0}}return e.inherit!==!1?t:{}}function OF(e){const{initial:t,animate:n}=AF(e,O.useContext(rf));return O.useMemo(()=>({initial:t,animate:n}),[y1(t),y1(n)])}function y1(e){return Array.isArray(e)?e.join(" "):e}const v1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Fs={};for(const e in v1)Fs[e]={isEnabled:t=>v1[e].some(n=>!!t[n])};function RF(e){for(const t in e)Fs[t]={...Fs[t],...e[t]}}const Nk=O.createContext({}),Ck=O.createContext({}),MF=Symbol.for("motionComponentSymbol");function IF({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&RF(e);function a(s,l){let c;const u={...O.useContext(Ek),...s,layoutId:PF(s)},{isStatic:f}=u,d=OF(s),p=r(s,f);if(!f&&af){d.visualElement=CF(i,p,u,t);const m=O.useContext(Ck),g=O.useContext(Sk).strict;d.visualElement&&(c=d.visualElement.loadFeatures(u,g,e,m))}return O.createElement(rf.Provider,{value:d},c&&d.visualElement?O.createElement(c,{visualElement:d.visualElement,...u}):null,n(i,s,TF(p,d.visualElement,l),p,f,d.visualElement))}const o=O.forwardRef(a);return o[MF]=i,o}function PF({layoutId:e}){const t=O.useContext(Nk).id;return t&&e!==void 0?t+"-"+e:e}function DF(e){function t(r,i={}){return IF(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const LF=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function fg(e){return typeof e!="string"||e.includes("-")?!1:!!(LF.indexOf(e)>-1||/[A-Z]/.test(e))}const ou={};function FF(e){Object.assign(ou,e)}const rl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yi=new Set(rl);function Tk(e,{layout:t,layoutId:n}){return Yi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ou[e]||e==="opacity")}const Tt=e=>!!(e&&e.getVelocity),zF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},BF=rl.length;function UF(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let o=0;o<BF;o++){const s=rl[o];if(e[s]!==void 0){const l=zF[s]||s;a+=`${l}(${e[s]}) `}}return t&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,r?"":a):n&&r&&(a="none"),a}const Ak=e=>t=>typeof t=="string"&&t.startsWith(e),Ok=Ak("--"),ph=Ak("var(--"),jF=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,$F=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Xr=(e,t,n)=>Math.min(Math.max(n,e),t),Zi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Zo={...Zi,transform:e=>Xr(0,1,e)},ql={...Zi,default:1},Xo=e=>Math.round(e*1e5)/1e5,lf=/(-)?([\d]*\.?[\d])+/g,Rk=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,VF=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function il(e){return typeof e=="string"}const al=e=>({test:t=>il(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wr=al("deg"),Ln=al("%"),J=al("px"),HF=al("vh"),WF=al("vw"),b1={...Ln,parse:e=>Ln.parse(e)/100,transform:e=>Ln.transform(e*100)},_1={...Zi,transform:Math.round},Mk={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,radius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,size:J,top:J,right:J,bottom:J,left:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,rotate:wr,rotateX:wr,rotateY:wr,rotateZ:wr,scale:ql,scaleX:ql,scaleY:ql,scaleZ:ql,skew:wr,skewX:wr,skewY:wr,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:Zo,originX:b1,originY:b1,originZ:J,zIndex:_1,fillOpacity:Zo,strokeOpacity:Zo,numOctaves:_1};function dg(e,t,n,r){const{style:i,vars:a,transform:o,transformOrigin:s}=e;let l=!1,c=!1,u=!0;for(const f in t){const d=t[f];if(Ok(f)){a[f]=d;continue}const p=Mk[f],m=$F(d,p);if(Yi.has(f)){if(l=!0,o[f]=m,!u)continue;d!==(p.default||0)&&(u=!1)}else f.startsWith("origin")?(c=!0,s[f]=m):i[f]=m}if(t.transform||(l||r?i.transform=UF(e.transform,n,u,r):i.transform&&(i.transform="none")),c){const{originX:f="50%",originY:d="50%",originZ:p=0}=s;i.transformOrigin=`${f} ${d} ${p}`}}const pg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ik(e,t,n){for(const r in t)!Tt(t[r])&&!Tk(r,n)&&(e[r]=t[r])}function GF({transformTemplate:e},t,n){return O.useMemo(()=>{const r=pg();return dg(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function KF(e,t,n){const r=e.style||{},i={};return Ik(i,r,e),Object.assign(i,GF(e,t,n)),e.transformValues?e.transformValues(i):i}function qF(e,t,n){const r={},i=KF(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const YF=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function su(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||YF.has(e)}let Pk=e=>!su(e);function ZF(e){e&&(Pk=t=>t.startsWith("on")?!su(t):e(t))}try{ZF(require("@emotion/is-prop-valid").default)}catch{}function XF(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Pk(i)||n===!0&&su(i)||!t&&!su(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function w1(e,t,n){return typeof e=="string"?e:J.transform(t+n*e)}function QF(e,t,n){const r=w1(t,e.x,e.width),i=w1(n,e.y,e.height);return`${r} ${i}`}const JF={offset:"stroke-dashoffset",array:"stroke-dasharray"},e8={offset:"strokeDashoffset",array:"strokeDasharray"};function t8(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?JF:e8;e[a.offset]=J.transform(-r);const o=J.transform(t),s=J.transform(n);e[a.array]=`${o} ${s}`}function hg(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...c},u,f,d){if(dg(e,c,u,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:g}=e;p.transform&&(g&&(m.transform=p.transform),delete p.transform),g&&(i!==void 0||a!==void 0||m.transform)&&(m.transformOrigin=QF(g,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&t8(p,o,s,l,!1)}const Dk=()=>({...pg(),attrs:{}}),mg=e=>typeof e=="string"&&e.toLowerCase()==="svg";function n8(e,t,n,r){const i=O.useMemo(()=>{const a=Dk();return hg(a,t,{enableHardwareAcceleration:!1},mg(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Ik(a,e.style,e),i.style={...a,...i.style}}return i}function r8(e=!1){return(n,r,i,{latestValues:a},o)=>{const l=(fg(n)?n8:qF)(r,a,o,n),u={...XF(r,typeof n=="string",e),...l,ref:i},{children:f}=r,d=O.useMemo(()=>Tt(f)?f.get():f,[f]);return O.createElement(n,{...u,children:d})}}const gg=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Lk(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const Fk=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function zk(e,t,n,r){Lk(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Fk.has(i)?i:gg(i),t.attrs[i])}function yg(e,t){const{style:n}=e,r={};for(const i in n)(Tt(n[i])||t.style&&Tt(t.style[i])||Tk(i,e))&&(r[i]=n[i]);return r}function Bk(e,t){const n=yg(e,t);for(const r in e)if(Tt(e[r])||Tt(t[r])){const i=rl.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function vg(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function i8(e){const t=O.useRef(null);return t.current===null&&(t.current=e()),t.current}const lu=e=>Array.isArray(e),a8=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),o8=e=>lu(e)?e[e.length-1]||0:e;function yc(e){const t=Tt(e)?e.get():e;return a8(t)?t.toValue():t}function s8({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const o={latestValues:l8(r,i,a,e),renderState:t()};return n&&(o.mount=s=>n(r,s,o)),o}const Uk=e=>(t,n)=>{const r=O.useContext(rf),i=O.useContext(lg),a=()=>s8(e,t,r,i);return n?a():i8(a)};function l8(e,t,n,r){const i={},a=r(e,{});for(const d in a)i[d]=yc(a[d]);let{initial:o,animate:s}=e;const l=sf(e),c=kk(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?s:o;return f&&typeof f!="boolean"&&!of(f)&&(Array.isArray(f)?f:[f]).forEach(p=>{const m=vg(e,p);if(!m)return;const{transitionEnd:g,transition:w,...h}=m;for(const b in h){let v=h[b];if(Array.isArray(v)){const _=u?v.length-1:0;v=v[_]}v!==null&&(i[b]=v)}for(const b in g)i[b]=g[b]}),i}const Be=e=>e;function c8(e){let t=[],n=[],r=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(l,c=!1,u=!1)=>{const f=u&&i,d=f?t:n;return c&&o.add(l),d.indexOf(l)===-1&&(d.push(l),f&&i&&(r=t.length)),l},cancel:l=>{const c=n.indexOf(l);c!==-1&&n.splice(c,1),o.delete(l)},process:l=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c<r;c++){const u=t[c];u(l),o.has(u)&&(s.schedule(u),e())}i=!1,a&&(a=!1,s.process(l))}};return s}const Yl=["prepare","read","update","preRender","render","postRender"],u8=40;function f8(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=Yl.reduce((f,d)=>(f[d]=c8(()=>n=!0),f),{}),o=f=>a[f].process(i),s=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,u8),1),i.timestamp=f,i.isProcessing=!0,Yl.forEach(o),i.isProcessing=!1,n&&t&&(r=!1,e(s))},l=()=>{n=!0,r=!0,i.isProcessing||e(s)};return{schedule:Yl.reduce((f,d)=>{const p=a[d];return f[d]=(m,g=!1,w=!1)=>(n||l(),p.schedule(m,g,w)),f},{}),cancel:f=>Yl.forEach(d=>a[d].cancel(f)),state:i,steps:a}}const{schedule:Ce,cancel:ur,state:lt,steps:xd}=f8(typeof requestAnimationFrame<"u"?requestAnimationFrame:Be,!0),d8={useVisualState:Uk({scrapeMotionValuesFromProps:Bk,createRenderState:Dk,onMount:(e,t,{renderState:n,latestValues:r})=>{Ce.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ce.render(()=>{hg(n,r,{enableHardwareAcceleration:!1},mg(t.tagName),e.transformTemplate),zk(t,n)})}})},p8={useVisualState:Uk({scrapeMotionValuesFromProps:yg,createRenderState:pg})};function h8(e,{forwardMotionProps:t=!1},n,r){return{...fg(e)?d8:p8,preloadedFeatures:n,useRender:r8(t),createVisualElement:r,Component:e}}function Jn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const jk=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function cf(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const m8=e=>t=>jk(t)&&e(t,cf(t));function tr(e,t,n,r){return Jn(e,t,m8(n),r)}const g8=(e,t)=>n=>t(e(n)),Hr=(...e)=>e.reduce(g8);function $k(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const x1=$k("dragHorizontal"),E1=$k("dragVertical");function Vk(e){let t=!1;if(e==="y")t=E1();else if(e==="x")t=x1();else{const n=x1(),r=E1();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Hk(){const e=Vk(!0);return e?(e(),!1):!0}class ri{constructor(t){this.isMounted=!1,this.node=t}update(){}}function S1(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(a,o)=>{if(a.type==="touch"||Hk())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[r]&&Ce.update(()=>s[r](a,o))};return tr(e.current,n,i,{passive:!e.getProps()[r]})}class y8 extends ri{mount(){this.unmount=Hr(S1(this.node,!0),S1(this.node,!1))}unmount(){}}class v8 extends ri{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Hr(Jn(this.node.current,"focus",()=>this.onFocus()),Jn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Wk=(e,t)=>t?e===t?!0:Wk(e,t.parentElement):!1;function Ed(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,cf(n))}class b8 extends ri{constructor(){super(...arguments),this.removeStartListeners=Be,this.removeEndListeners=Be,this.removeAccessibleListeners=Be,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),a=tr(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u}=this.node.getProps();Ce.update(()=>{Wk(this.node.current,s.target)?c&&c(s,l):u&&u(s,l)})},{passive:!(r.onTap||r.onPointerUp)}),o=tr(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Hr(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||Ed("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Ce.update(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=Jn(this.node.current,"keyup",o),Ed("down",(s,l)=>{this.startPress(s,l)})},n=Jn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ed("cancel",(a,o)=>this.cancelPress(a,o))},i=Jn(this.node.current,"blur",r);this.removeAccessibleListeners=Hr(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Ce.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Hk()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ce.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=tr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Jn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Hr(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const hh=new WeakMap,Sd=new WeakMap,_8=e=>{const t=hh.get(e.target);t&&t(e)},w8=e=>{e.forEach(_8)};function x8({root:e,...t}){const n=e||document;Sd.has(n)||Sd.set(n,{});const r=Sd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(w8,{root:e,...t})),r[i]}function E8(e,t,n){const r=x8(t);return hh.set(e,n),r.observe(e),()=>{hh.delete(e),r.unobserve(e)}}const S8={some:0,all:1};class k8 extends ri{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:S8[i]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return E8(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(N8(t,n))&&this.startObserver()}unmount(){}}function N8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const C8={inView:{Feature:k8},tap:{Feature:b8},focus:{Feature:v8},hover:{Feature:y8}};function Gk(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function T8(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function A8(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function uf(e,t,n){const r=e.getProps();return vg(r,t,n!==void 0?n:r.custom,T8(e),A8(e))}const O8="framerAppearId",R8="data-"+gg(O8);let M8=Be,bg=Be;const Wr=e=>e*1e3,nr=e=>e/1e3,I8={current:!1},Kk=e=>Array.isArray(e)&&typeof e[0]=="number";function qk(e){return!!(!e||typeof e=="string"&&Yk[e]||Kk(e)||Array.isArray(e)&&e.every(qk))}const Io=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Yk={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Io([0,.65,.55,1]),circOut:Io([.55,0,1,.45]),backIn:Io([.31,.01,.66,-.59]),backOut:Io([.33,1.53,.69,.99])};function Zk(e){if(e)return Kk(e)?Io(e):Array.isArray(e)?e.map(Zk):Yk[e]}function P8(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:o="loop",ease:s,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Zk(s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function D8(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Xk=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,L8=1e-7,F8=12;function z8(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Xk(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>L8&&++s<F8);return o}function ol(e,t,n,r){if(e===t&&n===r)return Be;const i=a=>z8(a,0,1,e,n);return a=>a===0||a===1?a:Xk(i(a),t,r)}const B8=ol(.42,0,1,1),U8=ol(0,0,.58,1),Qk=ol(.42,0,.58,1),j8=e=>Array.isArray(e)&&typeof e[0]!="number",Jk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,e2=e=>t=>1-e(1-t),t2=e=>1-Math.sin(Math.acos(e)),_g=e2(t2),$8=Jk(_g),n2=ol(.33,1.53,.69,.99),wg=e2(n2),V8=Jk(wg),H8=e=>(e*=2)<1?.5*wg(e):.5*(2-Math.pow(2,-10*(e-1))),W8={linear:Be,easeIn:B8,easeInOut:Qk,easeOut:U8,circIn:t2,circInOut:$8,circOut:_g,backIn:wg,backInOut:V8,backOut:n2,anticipate:H8},k1=e=>{if(Array.isArray(e)){bg(e.length===4);const[t,n,r,i]=e;return ol(t,n,r,i)}else if(typeof e=="string")return W8[e];return e},xg=(e,t)=>n=>!!(il(n)&&VF.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),r2=(e,t,n)=>r=>{if(!il(r))return r;const[i,a,o,s]=r.match(lf);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},G8=e=>Xr(0,255,e),kd={...Zi,transform:e=>Math.round(G8(e))},Si={test:xg("rgb","red"),parse:r2("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+kd.transform(e)+", "+kd.transform(t)+", "+kd.transform(n)+", "+Xo(Zo.transform(r))+")"};function K8(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const mh={test:xg("#"),parse:K8,transform:Si.transform},_a={test:xg("hsl","hue"),parse:r2("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ln.transform(Xo(t))+", "+Ln.transform(Xo(n))+", "+Xo(Zo.transform(r))+")"},ft={test:e=>Si.test(e)||mh.test(e)||_a.test(e),parse:e=>Si.test(e)?Si.parse(e):_a.test(e)?_a.parse(e):mh.parse(e),transform:e=>il(e)?e:e.hasOwnProperty("red")?Si.transform(e):_a.transform(e)},Pe=(e,t,n)=>-n*e+n*t+e;function Nd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function q8({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Nd(l,s,e+1/3),a=Nd(l,s,e),o=Nd(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}const Cd=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Y8=[mh,Si,_a],Z8=e=>Y8.find(t=>t.test(e));function N1(e){const t=Z8(e);let n=t.parse(e);return t===_a&&(n=q8(n)),n}const i2=(e,t)=>{const n=N1(e),r=N1(t),i={...n};return a=>(i.red=Cd(n.red,r.red,a),i.green=Cd(n.green,r.green,a),i.blue=Cd(n.blue,r.blue,a),i.alpha=Pe(n.alpha,r.alpha,a),Si.transform(i))};function X8(e){var t,n;return isNaN(e)&&il(e)&&(((t=e.match(lf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Rk))===null||n===void 0?void 0:n.length)||0)>0}const a2={regex:jF,countKey:"Vars",token:"${v}",parse:Be},o2={regex:Rk,countKey:"Colors",token:"${c}",parse:ft.parse},s2={regex:lf,countKey:"Numbers",token:"${n}",parse:Zi.parse};function Td(e,{regex:t,countKey:n,token:r,parse:i}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(i)))}function cu(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Td(n,a2),Td(n,o2),Td(n,s2),n}function l2(e){return cu(e).values}function c2(e){const{values:t,numColors:n,numVars:r,tokenised:i}=cu(e),a=t.length;return o=>{let s=i;for(let l=0;l<a;l++)l<r?s=s.replace(a2.token,o[l]):l<r+n?s=s.replace(o2.token,ft.transform(o[l])):s=s.replace(s2.token,Xo(o[l]));return s}}const Q8=e=>typeof e=="number"?0:e;function J8(e){const t=l2(e);return c2(e)(t.map(Q8))}const Qr={test:X8,parse:l2,createTransformer:c2,getAnimatableNone:J8},u2=(e,t)=>n=>`${n>0?t:e}`;function f2(e,t){return typeof e=="number"?n=>Pe(e,t,n):ft.test(e)?i2(e,t):e.startsWith("var(")?u2(e,t):p2(e,t)}const d2=(e,t)=>{const n=[...e],r=n.length,i=e.map((a,o)=>f2(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}},ez=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=f2(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}},p2=(e,t)=>{const n=Qr.createTransformer(t),r=cu(e),i=cu(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Hr(d2(r.values,i.values),n):u2(e,t)},zs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},C1=(e,t)=>n=>Pe(e,t,n);function tz(e){return typeof e=="number"?C1:typeof e=="string"?ft.test(e)?i2:p2:Array.isArray(e)?d2:typeof e=="object"?ez:C1}function nz(e,t,n){const r=[],i=n||tz(e[0]),a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Be:t;s=Hr(l,s)}r.push(s)}return r}function h2(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(bg(a===t.length),a===1)return()=>t[0];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=nz(t,r,i),s=o.length,l=c=>{let u=0;if(s>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=zs(e[u],e[u+1],c);return o[u](f)};return n?c=>l(Xr(e[0],e[a-1],c)):l}function rz(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=zs(0,t,r);e.push(Pe(n,1,i))}}function iz(e){const t=[0];return rz(t,e.length-1),t}function az(e,t){return e.map(n=>n*t)}function oz(e,t){return e.map(()=>t||Qk).splice(0,e.length-1)}function uu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=j8(r)?r.map(k1):k1(r),a={done:!1,value:t[0]},o=az(n&&n.length===t.length?n:iz(t),e),s=h2(o,t,{ease:Array.isArray(i)?i:oz(t,i)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}function m2(e,t){return t?e*(1e3/t):0}const sz=5;function g2(e,t,n){const r=Math.max(t-sz,0);return m2(n-e(r),t-r)}const Ad=.001,lz=.01,T1=10,cz=.05,uz=1;function fz({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;M8(e<=Wr(T1));let o=1-t;o=Xr(cz,uz,o),e=Xr(lz,T1,nr(e)),o<1?(i=c=>{const u=c*o,f=u*e,d=u-n,p=gh(c,o),m=Math.exp(-f);return Ad-d/p*m},a=c=>{const f=c*o*e,d=f*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-f),g=gh(Math.pow(c,2),o);return(-i(c)+Ad>0?-1:1)*((d-p)*m)/g}):(i=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Ad+u*f},a=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const s=5/e,l=pz(i,a,s);if(e=Wr(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const dz=12;function pz(e,t,n){let r=n;for(let i=1;i<dz;i++)r=r-e(r)/t(r);return r}function gh(e,t){return e*Math.sqrt(1-t*t)}const hz=["duration","bounce"],mz=["stiffness","damping","mass"];function A1(e,t){return t.some(n=>e[n]!==void 0)}function gz(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!A1(e,mz)&&A1(e,hz)){const n=fz(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function y2({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:d}=gz(r),p=u?-nr(u):0,m=l/(2*Math.sqrt(s*c)),g=a-i,w=nr(Math.sqrt(s/c)),h=Math.abs(g)<5;n||(n=h?.01:2),t||(t=h?.005:.5);let b;if(m<1){const v=gh(w,m);b=_=>{const S=Math.exp(-m*w*_);return a-S*((p+m*w*g)/v*Math.sin(v*_)+g*Math.cos(v*_))}}else if(m===1)b=v=>a-Math.exp(-w*v)*(g+(p+w*g)*v);else{const v=w*Math.sqrt(m*m-1);b=_=>{const S=Math.exp(-m*w*_),x=Math.min(v*_,300);return a-S*((p+m*w*g)*Math.sinh(x)+v*g*Math.cosh(x))/v}}return{calculatedDuration:d&&f||null,next:v=>{const _=b(v);if(d)o.done=v>=f;else{let S=p;v!==0&&(m<1?S=g2(b,v,_):S=0);const x=Math.abs(S)<=n,k=Math.abs(a-_)<=t;o.done=x&&k}return o.value=o.done?a:_,o}}}function O1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},p=C=>s!==void 0&&C<s||l!==void 0&&C>l,m=C=>s===void 0?l:l===void 0||Math.abs(s-C)<Math.abs(l-C)?s:l;let g=n*t;const w=f+g,h=o===void 0?w:o(w);h!==w&&(g=h-f);const b=C=>-g*Math.exp(-C/r),v=C=>h+b(C),_=C=>{const A=b(C),M=v(C);d.done=Math.abs(A)<=c,d.value=d.done?h:M};let S,x;const k=C=>{p(d.value)&&(S=C,x=y2({keyframes:[d.value,m(d.value)],velocity:g2(v,C,d.value),damping:i,stiffness:a,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:C=>{let A=!1;return!x&&S===void 0&&(A=!0,_(C),k(C)),S!==void 0&&C>S?x.next(C-S):(!A&&_(C),d)}}}const yz=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ce.update(t,!0),stop:()=>ur(t),now:()=>lt.isProcessing?lt.timestamp:performance.now()}},R1=2e4;function M1(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<R1;)t+=n,r=e.next(t);return t>=R1?1/0:t}const vz={decay:O1,inertia:O1,tween:uu,keyframes:uu,spring:y2};function fu({autoplay:e=!0,delay:t=0,driver:n=yz,keyframes:r,type:i="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:s="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:f,...d}){let p=1,m=!1,g,w;const h=()=>{w=new Promise(z=>{g=z})};h();let b;const v=vz[i]||uu;let _;v!==uu&&typeof r[0]!="number"&&(_=h2([0,100],r,{clamp:!1}),r=[0,100]);const S=v({...d,keyframes:r});let x;s==="mirror"&&(x=v({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let k="idle",C=null,A=null,M=null;S.calculatedDuration===null&&a&&(S.calculatedDuration=M1(S));const{calculatedDuration:I}=S;let F=1/0,H=1/0;I!==null&&(F=I+o,H=F*(a+1)-o);let W=0;const $=z=>{if(A===null)return;p>0&&(A=Math.min(A,z)),p<0&&(A=Math.min(z-H/p,A)),C!==null?W=C:W=Math.round(z-A)*p;const q=W-t*(p>=0?1:-1),N=p>=0?q<0:q>H;W=Math.max(q,0),k==="finished"&&C===null&&(W=H);let le=W,se=S;if(a){const ie=W/F;let Ze=Math.floor(ie),Ve=ie%1;!Ve&&ie>=1&&(Ve=1),Ve===1&&Ze--,Ze=Math.min(Ze,a+1);const cn=!!(Ze%2);cn&&(s==="reverse"?(Ve=1-Ve,o&&(Ve-=o/F)):s==="mirror"&&(se=x));let jn=Xr(0,1,Ve);W>H&&(jn=s==="reverse"&&cn?1:0),le=jn*F}const Q=N?{done:!1,value:r[0]}:se.next(le);_&&(Q.value=_(Q.value));let{done:Te}=Q;!N&&I!==null&&(Te=p>=0?W>=H:W<=0);const Me=C===null&&(k==="finished"||k==="running"&&Te);return f&&f(Q.value),Me&&R(),Q},X=()=>{b&&b.stop(),b=void 0},D=()=>{k="idle",X(),g(),h(),A=M=null},R=()=>{k="finished",u&&u(),X(),g()},L=()=>{if(m)return;b||(b=n($));const z=b.now();l&&l(),C!==null?A=z-C:(!A||k==="finished")&&(A=z),k==="finished"&&h(),M=A,C=null,k="running",b.start()};e&&L();const E={then(z,q){return w.then(z,q)},get time(){return nr(W)},set time(z){z=Wr(z),W=z,C!==null||!b||p===0?C=z:A=b.now()-z/p},get duration(){const z=S.calculatedDuration===null?M1(S):S.calculatedDuration;return nr(z)},get speed(){return p},set speed(z){z===p||!b||(p=z,E.time=nr(W))},get state(){return k},play:L,pause:()=>{k="paused",C=W},stop:()=>{m=!0,k!=="idle"&&(k="idle",c&&c(),D())},cancel:()=>{M!==null&&$(M),D()},complete:()=>{k="finished"},sample:z=>(A=0,$(z))};return E}function bz(e){let t;return()=>(t===void 0&&(t=e()),t)}const _z=bz(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wz=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Zl=10,xz=2e4,Ez=(e,t)=>t.type==="spring"||e==="backgroundColor"||!qk(t.ease);function Sz(e,t,{onUpdate:n,onComplete:r,...i}){if(!(_z()&&wz.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let o=!1,s,l;const c=()=>{l=new Promise(b=>{s=b})};c();let{keyframes:u,duration:f=300,ease:d,times:p}=i;if(Ez(t,i)){const b=fu({...i,repeat:0,delay:0});let v={done:!1,value:u[0]};const _=[];let S=0;for(;!v.done&&S<xz;)v=b.sample(S),_.push(v.value),S+=Zl;p=void 0,u=_,f=S-Zl,d="linear"}const m=P8(e.owner.current,t,u,{...i,duration:f,ease:d,times:p}),g=()=>m.cancel(),w=()=>{Ce.update(g),s(),c()};return m.onfinish=()=>{e.set(D8(u,i)),r&&r(),w()},{then(b,v){return l.then(b,v)},attachTimeline(b){return m.timeline=b,m.onfinish=null,Be},get time(){return nr(m.currentTime||0)},set time(b){m.currentTime=Wr(b)},get speed(){return m.playbackRate},set speed(b){m.playbackRate=b},get duration(){return nr(f)},play:()=>{o||(m.play(),ur(g))},pause:()=>m.pause(),stop:()=>{if(o=!0,m.playState==="idle")return;const{currentTime:b}=m;if(b){const v=fu({...i,autoplay:!1});e.setWithVelocity(v.sample(b-Zl).value,v.sample(b).value,Zl)}w()},complete:()=>m.finish(),cancel:w}}function kz({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Be,pause:Be,stop:Be,then:a=>(a(),Promise.resolve()),cancel:Be,complete:Be});return t?fu({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const Nz={type:"spring",stiffness:500,damping:25,restSpeed:10},Cz=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Tz={type:"keyframes",duration:.8},Az={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Oz=(e,{keyframes:t})=>t.length>2?Tz:Yi.has(e)?e.startsWith("scale")?Cz(t[1]):Nz:Az,yh=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Qr.test(t)||t==="0")&&!t.startsWith("url(")),Rz=new Set(["brightness","contrast","saturate","opacity"]);function Mz(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(lf)||[];if(!r)return e;const i=n.replace(r,"");let a=Rz.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const Iz=/([a-z-]*)\(.*?\)/g,vh={...Qr,getAnimatableNone:e=>{const t=e.match(Iz);return t?t.map(Mz).join(" "):e}},Pz={...Mk,color:ft,backgroundColor:ft,outlineColor:ft,fill:ft,stroke:ft,borderColor:ft,borderTopColor:ft,borderRightColor:ft,borderBottomColor:ft,borderLeftColor:ft,filter:vh,WebkitFilter:vh},Eg=e=>Pz[e];function v2(e,t){let n=Eg(e);return n!==vh&&(n=Qr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const b2=e=>/^0[^.\s]+$/.test(e);function Dz(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||b2(e)}function Lz(e,t,n,r){const i=yh(t,n);let a;Array.isArray(n)?a=[...n]:a=[null,n];const o=r.from!==void 0?r.from:e.get();let s;const l=[];for(let c=0;c<a.length;c++)a[c]===null&&(a[c]=c===0?o:a[c-1]),Dz(a[c])&&l.push(c),typeof a[c]=="string"&&a[c]!=="none"&&a[c]!=="0"&&(s=a[c]);if(i&&l.length&&s)for(let c=0;c<l.length;c++){const u=l[c];a[u]=v2(t,s)}return a}function Fz({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function _2(e,t){return e[t]||e.default||e}const Sg=(e,t,n,r={})=>i=>{const a=_2(r,e)||{},o=a.delay||r.delay||0;let{elapsed:s=0}=r;s=s-Wr(o);const l=Lz(t,e,n,a),c=l[0],u=l[l.length-1],f=yh(e,c),d=yh(e,u);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-s,onUpdate:m=>{t.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(Fz(a)||(p={...p,...Oz(e,p)}),p.duration&&(p.duration=Wr(p.duration)),p.repeatDelay&&(p.repeatDelay=Wr(p.repeatDelay)),!f||!d||I8.current||a.type===!1)return kz(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const m=Sz(t,e,p);if(m)return m}return fu(p)};function du(e){return!!(Tt(e)&&e.add)}const w2=e=>/^\-?\d*\.?\d+$/.test(e);function kg(e,t){e.indexOf(t)===-1&&e.push(t)}function Ng(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Cg{constructor(){this.subscriptions=[]}add(t){return kg(this.subscriptions,t),()=>Ng(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const zz=e=>!isNaN(parseFloat(e));class Bz{constructor(t,n={}){this.version="10.16.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:a,timestamp:o}=lt;this.lastUpdated!==o&&(this.timeDelta=a,this.lastUpdated=o,Ce.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Ce.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=zz(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Cg);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ce.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?m2(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ka(e,t){return new Bz(e,t)}const x2=e=>t=>t.test(e),Uz={test:e=>e==="auto",parse:e=>e},E2=[Zi,J,Ln,wr,WF,HF,Uz],xo=e=>E2.find(x2(e)),jz=[...E2,ft,Qr],$z=e=>jz.find(x2(e));function Vz(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ka(n))}function Hz(e,t){const n=uf(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const o in a){const s=o8(a[o]);Vz(e,o,s)}}function Wz(e,t,n){var r,i;const a=Object.keys(t).filter(s=>!e.hasValue(s)),o=a.length;if(o)for(let s=0;s<o;s++){const l=a[s],c=t[l];let u=null;Array.isArray(c)&&(u=c[0]),u===null&&(u=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),u!=null&&(typeof u=="string"&&(w2(u)||b2(u))?u=parseFloat(u):!$z(u)&&Qr.test(c)&&(u=v2(l,c)),e.addValue(l,Ka(u,{owner:e})),n[l]===void 0&&(n[l]=u),u!==null&&e.setBaseTarget(l,u))}}function Gz(e,t){return t?(t[e]||t.default||t).from:void 0}function Kz(e,t,n){const r={};for(const i in e){const a=Gz(i,t);if(a!==void 0)r[i]=a;else{const o=n.getValue(i);o&&(r[i]=o.get())}}return r}function qz({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function S2(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(a=r);const c=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const f in s){const d=e.getValue(f),p=s[f];if(!d||p===void 0||u&&qz(u,f))continue;const m={delay:n,elapsed:0,...a};if(window.HandoffAppearAnimations&&!d.hasAnimated){const w=e.getProps()[R8];w&&(m.elapsed=window.HandoffAppearAnimations(w,f,d,Ce))}d.start(Sg(f,d,p,e.shouldReduceMotion&&Yi.has(f)?{type:!1}:m));const g=d.animation;du(l)&&(l.add(f),g.then(()=>l.remove(f))),c.push(g)}return o&&Promise.all(c).then(()=>{o&&Hz(e,o)}),c}function bh(e,t,n={}){const r=uf(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(S2(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=i;return Yz(e,t,c+l,u,f,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[l,c]=s==="beforeChildren"?[a,o]:[o,a];return l().then(()=>c())}else return Promise.all([a(),o(n.delay)])}function Yz(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(Zz).forEach((c,u)=>{c.notify("AnimationStart",t),o.push(bh(c,t,{...a,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function Zz(e,t){return e.sortNodePosition(t)}function Xz(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>bh(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=bh(e,t,n);else{const i=typeof t=="function"?uf(e,t,n.custom):t;r=Promise.all(S2(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Qz=[...cg].reverse(),Jz=cg.length;function eB(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Xz(e,n,r)))}function tB(e){let t=eB(e);const n=rB();let r=!0;const i=(l,c)=>{const u=uf(e,c);if(u){const{transition:f,transitionEnd:d,...p}=u;l={...l,...p,...d}}return l};function a(l){t=l(e)}function o(l,c){const u=e.getProps(),f=e.getVariantContext(!0)||{},d=[],p=new Set;let m={},g=1/0;for(let h=0;h<Jz;h++){const b=Qz[h],v=n[b],_=u[b]!==void 0?u[b]:f[b],S=Ls(_),x=b===c?v.isActive:null;x===!1&&(g=h);let k=_===f[b]&&_!==u[b]&&S;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),v.protectedKeys={...m},!v.isActive&&x===null||!_&&!v.prevProp||of(_)||typeof _=="boolean")continue;const C=nB(v.prevProp,_);let A=C||b===c&&v.isActive&&!k&&S||h>g&&S;const M=Array.isArray(_)?_:[_];let I=M.reduce(i,{});x===!1&&(I={});const{prevResolvedValues:F={}}=v,H={...F,...I},W=$=>{A=!0,p.delete($),v.needsAnimating[$]=!0};for(const $ in H){const X=I[$],D=F[$];m.hasOwnProperty($)||(X!==D?lu(X)&&lu(D)?!Gk(X,D)||C?W($):v.protectedKeys[$]=!0:X!==void 0?W($):p.add($):X!==void 0&&p.has($)?W($):v.protectedKeys[$]=!0)}v.prevProp=_,v.prevResolvedValues=I,v.isActive&&(m={...m,...I}),r&&e.blockInitialAnimation&&(A=!1),A&&!k&&d.push(...M.map($=>({animation:$,options:{type:b,...l}})))}if(p.size){const h={};p.forEach(b=>{const v=e.getBaseTarget(b);v!==void 0&&(h[b]=v)}),d.push({animation:h})}let w=!!d.length;return r&&u.initial===!1&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(d):Promise.resolve()}function s(l,c,u){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),n[l].isActive=c;const d=o(u,l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n}}function nB(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Gk(t,e):!1}function si(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rB(){return{animate:si(!0),whileInView:si(),whileHover:si(),whileTap:si(),whileDrag:si(),whileFocus:si(),exit:si()}}class iB extends ri{constructor(t){super(t),t.animationState||(t.animationState=tB(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),of(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let aB=0;class oB extends ri{constructor(){super(...arguments),this.id=aB++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const a=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const sB={animation:{Feature:iB},exit:{Feature:oB}},I1=(e,t)=>Math.abs(e-t);function lB(e,t){const n=I1(e.x,t.x),r=I1(e.y,t.y);return Math.sqrt(n**2+r**2)}class k2{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=Rd(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,f=lB(c.offset,{x:0,y:0})>=3;if(!u&&!f)return;const{point:d}=c,{timestamp:p}=lt;this.history.push({...d,timestamp:p});const{onStart:m,onMove:g}=this.handlers;u||(m&&m(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c)},this.handlePointerMove=(c,u)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Od(u,this.transformPagePoint),Ce.update(this.updatePoint,!0)},this.handlePointerUp=(c,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:d}=this.handlers,p=Rd(c.type==="pointercancel"?this.lastMoveEventInfo:Od(u,this.transformPagePoint),this.history);this.startEvent&&f&&f(c,p),d&&d(c,p)},!jk(t))return;this.handlers=n,this.transformPagePoint=r;const i=cf(t),a=Od(i,this.transformPagePoint),{point:o}=a,{timestamp:s}=lt;this.history=[{...o,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Rd(a,this.history)),this.removeListeners=Hr(tr(window,"pointermove",this.handlePointerMove),tr(window,"pointerup",this.handlePointerUp),tr(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ur(this.updatePoint)}}function Od(e,t){return t?{point:t(e.point)}:e}function P1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rd({point:e},t){return{point:e,delta:P1(e,N2(t)),offset:P1(e,cB(t)),velocity:uB(t,.1)}}function cB(e){return e[0]}function N2(e){return e[e.length-1]}function uB(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=N2(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Wr(t)));)n--;if(!r)return{x:0,y:0};const a=nr(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function jt(e){return e.max-e.min}function _h(e,t=0,n=.01){return Math.abs(e-t)<=n}function D1(e,t,n,r=.5){e.origin=r,e.originPoint=Pe(t.min,t.max,e.origin),e.scale=jt(n)/jt(t),(_h(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Pe(n.min,n.max,e.origin)-e.originPoint,(_h(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Qo(e,t,n,r){D1(e.x,t.x,n.x,r?r.originX:void 0),D1(e.y,t.y,n.y,r?r.originY:void 0)}function L1(e,t,n){e.min=n.min+t.min,e.max=e.min+jt(t)}function fB(e,t,n){L1(e.x,t.x,n.x),L1(e.y,t.y,n.y)}function F1(e,t,n){e.min=t.min-n.min,e.max=e.min+jt(t)}function Jo(e,t,n){F1(e.x,t.x,n.x),F1(e.y,t.y,n.y)}function dB(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Pe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Pe(n,e,r.max):Math.min(e,n)),e}function z1(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function pB(e,{top:t,left:n,bottom:r,right:i}){return{x:z1(e.x,n,i),y:z1(e.y,t,r)}}function B1(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function hB(e,t){return{x:B1(e.x,t.x),y:B1(e.y,t.y)}}function mB(e,t){let n=.5;const r=jt(e),i=jt(t);return i>r?n=zs(t.min,t.max-r,e.min):r>i&&(n=zs(e.min,e.max-i,t.min)),Xr(0,1,n)}function gB(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const wh=.35;function yB(e=wh){return e===!1?e=0:e===!0&&(e=wh),{x:U1(e,"left","right"),y:U1(e,"top","bottom")}}function U1(e,t,n){return{min:j1(e,t),max:j1(e,n)}}function j1(e,t){return typeof e=="number"?e:e[t]||0}const $1=()=>({translate:0,scale:1,origin:0,originPoint:0}),wa=()=>({x:$1(),y:$1()}),V1=()=>({min:0,max:0}),He=()=>({x:V1(),y:V1()});function Cn(e){return[e("x"),e("y")]}function C2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function vB({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bB(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Md(e){return e===void 0||e===1}function xh({scale:e,scaleX:t,scaleY:n}){return!Md(e)||!Md(t)||!Md(n)}function di(e){return xh(e)||T2(e)||e.z||e.rotate||e.rotateX||e.rotateY}function T2(e){return H1(e.x)||H1(e.y)}function H1(e){return e&&e!=="0%"}function pu(e,t,n){const r=e-n,i=t*r;return n+i}function W1(e,t,n,r,i){return i!==void 0&&(e=pu(e,i,r)),pu(e,n,r)+t}function Eh(e,t=0,n=1,r,i){e.min=W1(e.min,t,n,r,i),e.max=W1(e.max,t,n,r,i)}function A2(e,{x:t,y:n}){Eh(e.x,t.translate,t.scale,t.originPoint),Eh(e.y,n.translate,n.scale,n.originPoint)}function _B(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const l=a.instance;l&&l.style&&l.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&xa(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,A2(e,o)),r&&di(a.latestValues)&&xa(e,a.latestValues))}t.x=G1(t.x),t.y=G1(t.y)}function G1(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Sr(e,t){e.min=e.min+t,e.max=e.max+t}function K1(e,t,[n,r,i]){const a=t[i]!==void 0?t[i]:.5,o=Pe(e.min,e.max,a);Eh(e,t[n],t[r],o,t.scale)}const wB=["x","scaleX","originX"],xB=["y","scaleY","originY"];function xa(e,t){K1(e.x,t,wB),K1(e.y,t,xB)}function O2(e,t){return C2(bB(e.getBoundingClientRect(),t))}function EB(e,t,n){const r=O2(e,n),{scroll:i}=t;return i&&(Sr(r.x,i.offset.x),Sr(r.y,i.offset.y)),r}const SB=new WeakMap;class kB{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=He(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(cf(l,"page").point)},a=(l,c)=>{const{drag:u,dragPropagation:f,onDragStart:d}=this.getProps();if(u&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Vk(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Cn(m=>{let g=this.getAxisMotionValue(m).get()||0;if(Ln.test(g)){const{projection:w}=this.visualElement;if(w&&w.layout){const h=w.layout.layoutBox[m];h&&(g=jt(h)*(parseFloat(g)/100))}}this.originPoint[m]=g}),d&&Ce.update(()=>d(l,c),!1,!0);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},o=(l,c)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:d,onDrag:p}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:m}=c;if(f&&this.currentDirection===null){this.currentDirection=NB(m),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",c.point,m),this.updateAxis("y",c.point,m),this.visualElement.render(),p&&p(l,c)},s=(l,c)=>this.stop(l,c);this.panSession=new k2(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Ce.update(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Xl(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=dB(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&ba(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=pB(r.layoutBox,t):this.constraints=!1,this.elastic=yB(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Cn(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=gB(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ba(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=EB(r,i.root,this.visualElement.getTransformPagePoint());let o=hB(i.layout.layoutBox,a);if(n){const s=n(vB(o));this.hasMutatedConstraints=!!s,s&&(o=C2(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=Cn(u=>{if(!Xl(u,n,this.currentDirection))return;let f=l&&l[u]||{};o&&(f={min:0,max:0});const d=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:d,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Sg(t,r,0,n))}stopAnimation(){Cn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Cn(n=>{const{drag:r}=this.getProps();if(!Xl(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-Pe(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ba(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Cn(o=>{const s=this.getAxisMotionValue(o);if(s){const l=s.get();i[o]=mB({min:l,max:l},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Cn(o=>{if(!Xl(o,t,null))return;const s=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];s.set(Pe(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;SB.set(this.visualElement,this);const t=this.visualElement.current,n=tr(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ba(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const o=Jn(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Cn(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=wh,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Xl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function NB(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class CB extends ri{constructor(t){super(t),this.removeGroupControls=Be,this.removeListeners=Be,this.controls=new kB(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Be}unmount(){this.removeGroupControls(),this.removeListeners()}}const q1=e=>(t,n)=>{e&&Ce.update(()=>e(t,n))};class TB extends ri{constructor(){super(...arguments),this.removePointerDownListener=Be}onPointerDown(t){this.session=new k2(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:q1(t),onStart:q1(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&Ce.update(()=>i(a,o))}}}mount(){this.removePointerDownListener=tr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function AB(){const e=O.useContext(lg);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=O.useId();return O.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const vc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Y1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Eo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(J.test(e))e=parseFloat(e);else return e;const n=Y1(e,t.target.x),r=Y1(e,t.target.y);return`${n}% ${r}%`}},OB={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Qr.parse(e);if(i.length>5)return r;const a=Qr.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const c=Pe(s,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),a(i)}};class RB extends vn.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;FF(MB),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),vc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Ce.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function R2(e){const[t,n]=AB(),r=O.useContext(Nk);return vn.createElement(RB,{...e,layoutGroup:r,switchLayoutGroup:O.useContext(Ck),isPresent:t,safeToRemove:n})}const MB={borderRadius:{...Eo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Eo,borderTopRightRadius:Eo,borderBottomLeftRadius:Eo,borderBottomRightRadius:Eo,boxShadow:OB},M2=["TopLeft","TopRight","BottomLeft","BottomRight"],IB=M2.length,Z1=e=>typeof e=="string"?parseFloat(e):e,X1=e=>typeof e=="number"||J.test(e);function PB(e,t,n,r,i,a){i?(e.opacity=Pe(0,n.opacity!==void 0?n.opacity:1,DB(r)),e.opacityExit=Pe(t.opacity!==void 0?t.opacity:1,0,LB(r))):a&&(e.opacity=Pe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<IB;o++){const s=`border${M2[o]}Radius`;let l=Q1(t,s),c=Q1(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||X1(l)===X1(c)?(e[s]=Math.max(Pe(Z1(l),Z1(c),r),0),(Ln.test(c)||Ln.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=Pe(t.rotate||0,n.rotate||0,r))}function Q1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DB=I2(0,.5,_g),LB=I2(.5,.95,Be);function I2(e,t,n){return r=>r<e?0:r>t?1:n(zs(e,t,r))}function J1(e,t){e.min=t.min,e.max=t.max}function Gt(e,t){J1(e.x,t.x),J1(e.y,t.y)}function eb(e,t,n,r,i){return e-=t,e=pu(e,1/n,r),i!==void 0&&(e=pu(e,1/i,r)),e}function FB(e,t=0,n=1,r=.5,i,a=e,o=e){if(Ln.test(t)&&(t=parseFloat(t),t=Pe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=Pe(a.min,a.max,r);e===a&&(s-=t),e.min=eb(e.min,t,n,s,i),e.max=eb(e.max,t,n,s,i)}function tb(e,t,[n,r,i],a,o){FB(e,t[n],t[r],t[i],t.scale,a,o)}const zB=["x","scaleX","originX"],BB=["y","scaleY","originY"];function nb(e,t,n,r){tb(e.x,t,zB,n?n.x:void 0,r?r.x:void 0),tb(e.y,t,BB,n?n.y:void 0,r?r.y:void 0)}function rb(e){return e.translate===0&&e.scale===1}function P2(e){return rb(e.x)&&rb(e.y)}function UB(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function D2(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function ib(e){return jt(e.x)/jt(e.y)}class jB{constructor(){this.members=[]}add(t){kg(this.members,t),t.scheduleRender()}remove(t){if(Ng(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ab(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:c,rotateY:u}=n;l&&(r+=`rotate(${l}deg) `),c&&(r+=`rotateX(${c}deg) `),u&&(r+=`rotateY(${u}deg) `)}const o=e.x.scale*t.x,s=e.y.scale*t.y;return(o!==1||s!==1)&&(r+=`scale(${o}, ${s})`),r||"none"}const $B=(e,t)=>e.depth-t.depth;class VB{constructor(){this.children=[],this.isDirty=!1}add(t){kg(this.children,t),this.isDirty=!0}remove(t){Ng(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($B),this.isDirty=!1,this.children.forEach(t)}}function HB(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(ur(r),e(a-t))};return Ce.read(r,!0),()=>ur(r)}function WB(e){window.MotionDebug&&window.MotionDebug.record(e)}function GB(e){return e instanceof SVGElement&&e.tagName!=="svg"}function KB(e,t,n){const r=Tt(e)?e:Ka(e);return r.start(Sg("",r,t,n)),r.animation}const ob=["","X","Y","Z"],sb=1e3;let qB=0;const pi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function L2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=qB++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{pi.totalNodes=pi.resolvedTargetDeltas=pi.recalculatedProjection=0,this.nodes.forEach(XB),this.nodes.forEach(n9),this.nodes.forEach(r9),this.nodes.forEach(QB),WB(pi)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new VB)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Cg),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const l=this.eventHandlers.get(o);l&&l.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=GB(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=HB(d,250),vc.hasAnimatedSinceResize&&(vc.hasAnimatedSinceResize=!1,this.nodes.forEach(cb))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||l9,{onLayoutAnimationStart:w,onLayoutAnimationComplete:h}=u.getProps(),b=!this.targetLayout||!D2(this.targetLayout,m)||p,v=!d&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const _={..._2(g,"layout"),onPlay:w,onComplete:h};(u.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else d||cb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ur(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(i9),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lb);return}this.isUpdating||this.nodes.forEach(e9),this.isUpdating=!1,this.nodes.forEach(t9),this.nodes.forEach(YB),this.nodes.forEach(ZB),this.clearAllSnapshots();const s=performance.now();lt.delta=Xr(0,1e3/60,s-lt.timestamp),lt.timestamp=s,lt.isProcessing=!0,xd.update.process(lt),xd.preRender.process(lt),xd.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(JB),this.sharedNodes.forEach(a9)}scheduleUpdateProjection(){Ce.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=He(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s&&(this.scroll={animationId:this.root.animationId,phase:o,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform,s=this.projectionDelta&&!P2(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(s||di(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return o&&(l=this.removeTransform(l)),c9(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return He();const s=o.measureViewportBox(),{scroll:l}=this.root;return l&&(Sr(s.x,l.offset.x),Sr(s.y,l.offset.y)),s}removeElementScroll(o){const s=He();Gt(s,o);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){Gt(s,o);const{scroll:d}=this.root;d&&(Sr(s.x,-d.offset.x),Sr(s.y,-d.offset.y))}Sr(s.x,u.offset.x),Sr(s.y,u.offset.y)}}return s}applyTransform(o,s=!1){const l=He();Gt(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&xa(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),di(u.latestValues)&&xa(l,u.latestValues)}return di(this.latestValues)&&xa(l,this.latestValues),l}removeTransform(o){const s=He();Gt(s,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!di(c.latestValues))continue;xh(c.latestValues)&&c.updateSnapshot();const u=He(),f=c.measurePageBox();Gt(u,f),nb(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return di(this.latestValues)&&nb(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==lt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=lt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=He(),this.relativeTargetOrigin=He(),Jo(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Gt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=He(),this.targetWithTransforms=He()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),fB(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Gt(this.target,this.layout.layoutBox),A2(this.target,this.targetDelta)):Gt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=He(),this.relativeTargetOrigin=He(),Jo(this.relativeTargetOrigin,this.target,p.target),Gt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}pi.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||xh(this.parent.latestValues)||T2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===lt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;Gt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,p=this.treeScale.y;_B(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox);const{target:m}=s;if(!m){this.projectionTransform&&(this.projectionDelta=wa(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=wa(),this.projectionDeltaWithTransform=wa());const g=this.projectionTransform;Qo(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=ab(this.projectionDelta,this.treeScale),(this.projectionTransform!==g||this.treeScale.x!==d||this.treeScale.y!==p)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),pi.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),o){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(o,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=wa();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const d=He(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,w=this.getStack(),h=!w||w.members.length<=1,b=!!(g&&!h&&this.options.crossfade===!0&&!this.path.some(s9));this.animationProgress=0;let v;this.mixTargetDelta=_=>{const S=_/1e3;ub(f.x,o.x,S),ub(f.y,o.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),o9(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&UB(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=He()),Gt(v,this.relativeTarget)),g&&(this.animationValues=u,PB(u,c,this.latestValues,S,b,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ur(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ce.update(()=>{vc.hasAnimatedSinceResize=!0,this.currentAnimation=KB(0,sb,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sb),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=o;if(!(!s||!l||!c)){if(this!==o&&this.layout&&c&&F2(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||He();const f=jt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const d=jt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Gt(s,l),xa(s,u),Qo(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new jB),this.sharedNodes.get(o).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const c={};for(let u=0;u<ob.length;u++){const f="rotate"+ob[u];l[f]&&(c[f]=l[f],o.setStaticValue(f,0))}o.render();for(const u in c)o.setStaticValue(u,c[u]);o.scheduleRender()}getProjectionStyles(o={}){var s,l;const c={};if(!this.instance||this.isSVG)return c;if(this.isVisible)c.visibility="";else return{visibility:"hidden"};const u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=yc(o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=yc(o.pointerEvents)||""),this.hasProjected&&!di(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=ab(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:p,y:m}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(s=d.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in ou){if(d[g]===void 0)continue;const{correct:w,applyTo:h}=ou[g],b=c.transform==="none"?d[g]:w(d[g],f);if(h){const v=h.length;for(let _=0;_<v;_++)c[h[_]]=b}else c[g]=b}return this.options.layoutId&&(c.pointerEvents=f===this?yc(o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(lb),this.root.sharedNodes.clear()}}}function YB(e){e.updateLayout()}function ZB(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?Cn(f=>{const d=o?n.measuredBox[f]:n.layoutBox[f],p=jt(d);d.min=r[f].min,d.max=d.min+p}):F2(a,n.layoutBox,r)&&Cn(f=>{const d=o?n.measuredBox[f]:n.layoutBox[f],p=jt(r[f]);d.max=d.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const s=wa();Qo(s,r,n.layoutBox);const l=wa();o?Qo(l,e.applyTransform(i,!0),n.measuredBox):Qo(l,r,n.layoutBox);const c=!P2(s);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:p}=f;if(d&&p){const m=He();Jo(m,n.layoutBox,d.layoutBox);const g=He();Jo(g,r,p.layoutBox),D2(m,g)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function XB(e){pi.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function QB(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JB(e){e.clearSnapshot()}function lb(e){e.clearMeasurements()}function e9(e){e.isLayoutDirty=!1}function t9(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function cb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function n9(e){e.resolveTargetDelta()}function r9(e){e.calcProjection()}function i9(e){e.resetRotation()}function a9(e){e.removeLeadSnapshot()}function ub(e,t,n){e.translate=Pe(t.translate,0,n),e.scale=Pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function fb(e,t,n,r){e.min=Pe(t.min,n.min,r),e.max=Pe(t.max,n.max,r)}function o9(e,t,n,r){fb(e.x,t.x,n.x,r),fb(e.y,t.y,n.y,r)}function s9(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const l9={duration:.45,ease:[.4,0,.1,1]},db=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),pb=db("applewebkit/")&&!db("chrome/")?Math.round:Be;function hb(e){e.min=pb(e.min),e.max=pb(e.max)}function c9(e){hb(e.x),hb(e.y)}function F2(e,t,n){return e==="position"||e==="preserve-aspect"&&!_h(ib(t),ib(n),.2)}const u9=L2({attachResizeListener:(e,t)=>Jn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Id={current:void 0},z2=L2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Id.current){const e=new u9({});e.mount(window),e.setOptions({layoutScroll:!0}),Id.current=e}return Id.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),f9={pan:{Feature:TB},drag:{Feature:CB,ProjectionNode:z2,MeasureLayout:R2}},d9=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function p9(e){const t=d9.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Sh(e,t,n=1){const[r,i]=p9(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return w2(o)?parseFloat(o):o}else return ph(i)?Sh(i,t,n+1):i}function h9(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const a=i.get();if(!ph(a))return;const o=Sh(a,r);o&&i.set(o)});for(const i in t){const a=t[i];if(!ph(a))continue;const o=Sh(a,r);o&&(t[i]=o,n||(n={}),n[i]===void 0&&(n[i]=a))}return{target:t,transitionEnd:n}}const m9=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),B2=e=>m9.has(e),g9=e=>Object.keys(e).some(B2),mb=e=>e===Zi||e===J,gb=(e,t)=>parseFloat(e.split(", ")[t]),yb=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return gb(i[1],t);{const a=r.match(/^matrix\((.+)\)$/);return a?gb(a[1],e):0}},y9=new Set(["x","y","z"]),v9=rl.filter(e=>!y9.has(e));function b9(e){const t=[];return v9.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const qa={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:yb(4,13),y:yb(5,14)};qa.translateX=qa.x;qa.translateY=qa.y;const _9=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:o}=a,s={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{s[c]=qa[c](r,a)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const u=t.getValue(c);u&&u.jump(s[c]),e[c]=qa[c](l,a)}),e},w9=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(B2);let a=[],o=!1;const s=[];if(i.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let u=n[l],f=xo(u);const d=t[l];let p;if(lu(d)){const m=d.length,g=d[0]===null?1:0;u=d[g],f=xo(u);for(let w=g;w<m&&d[w]!==null;w++)p?bg(xo(d[w])===p):p=xo(d[w])}else p=xo(d);if(f!==p)if(mb(f)&&mb(p)){const m=c.get();typeof m=="string"&&c.set(parseFloat(m)),typeof d=="string"?t[l]=parseFloat(d):Array.isArray(d)&&p===J&&(t[l]=d.map(parseFloat))}else f!=null&&f.transform&&(p!=null&&p.transform)&&(u===0||d===0)?u===0?c.set(p.transform(u)):t[l]=f.transform(d):(o||(a=b9(e),o=!0),s.push(l),r[l]=r[l]!==void 0?r[l]:t[l],c.jump(d))}),s.length){const l=s.indexOf("height")>=0?window.pageYOffset:null,c=_9(t,e,s);return a.length&&a.forEach(([u,f])=>{e.getValue(u).set(f)}),e.render(),af&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function x9(e,t,n,r){return g9(t)?w9(e,t,n,r):{target:t,transitionEnd:r}}const E9=(e,t,n,r)=>{const i=h9(e,t,r);return t=i.target,r=i.transitionEnd,x9(e,t,n,r)},kh={current:null},U2={current:!1};function S9(){if(U2.current=!0,!!af)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kh.current=e.matches;e.addListener(t),t()}else kh.current=!1}function k9(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],o=n[i];if(Tt(a))e.addValue(i,a),du(r)&&r.add(i);else if(Tt(o))e.addValue(i,Ka(a,{owner:e})),du(r)&&r.remove(i);else if(o!==a)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(a)}else{const s=e.getStaticValue(i);e.addValue(i,Ka(s!==void 0?s:a,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const vb=new WeakMap,j2=Object.keys(Fs),N9=j2.length,bb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],C9=ug.length;class T9{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ce.render(this.render,!1,!0);const{latestValues:s,renderState:l}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=sf(n),this.isVariantNode=kk(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const f in u){const d=u[f];s[f]!==void 0&&Tt(d)&&(d.set(s[f],!1),du(c)&&c.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,vb.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),U2.current||S9(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:kh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){vb.delete(this.current),this.projection&&this.projection.unmount(),ur(this.notifyUpdate),ur(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Yi.has(t),i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Ce.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,a){let o,s;for(let l=0;l<N9;l++){const c=j2[l],{isEnabled:u,Feature:f,ProjectionNode:d,MeasureLayout:p}=Fs[c];d&&(o=d),u(n)&&(!this.features[c]&&f&&(this.features[c]=new f(this)),p&&(s=p))}if(!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:u,dragConstraints:f,layoutScroll:d,layoutRoot:p}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!u||f&&ba(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:a,layoutScroll:d,layoutRoot:p})}return s}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):He()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<bb.length;r++){const i=bb[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a=t["on"+i];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=k9(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<C9;r++){const i=ug[r],a=this.props[i];(Ls(a)||a===!1)&&(n[i]=a)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ka(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=vg(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Tt(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Cg),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class $2 extends T9{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},a){let o=Kz(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),o&&(o=i(o))),a){Wz(this,r,o);const s=E9(this,r,o,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function A9(e){return window.getComputedStyle(e)}class O9 extends $2{readValueFromInstance(t,n){if(Yi.has(n)){const r=Eg(n);return r&&r.default||0}else{const r=A9(t),i=(Ok(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return O2(t,n)}build(t,n,r,i){dg(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return yg(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Tt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Lk(t,n,r,i)}}class R9 extends $2{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Yi.has(n)){const r=Eg(n);return r&&r.default||0}return n=Fk.has(n)?n:gg(n),t.getAttribute(n)}measureInstanceViewportBox(){return He()}scrapeMotionValuesFromProps(t,n){return Bk(t,n)}build(t,n,r,i){hg(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){zk(t,n,r,i)}mount(t){this.isSVGTag=mg(t.tagName),super.mount(t)}}const M9=(e,t)=>fg(e)?new R9(t,{enableHardwareAcceleration:!1}):new O9(t,{enableHardwareAcceleration:!0}),I9={layout:{ProjectionNode:z2,MeasureLayout:R2}},P9={...sB,...C8,...f9,...I9},D9=DF((e,t)=>h8(e,t,P9,M9)),L9=[{position:{left:0,top:0},delay:.1},{position:{left:16,top:0},delay:.05},{position:{left:32,top:0},delay:0},{position:{left:0,top:16},delay:.15},{position:{left:16,top:16},delay:.2},{position:{left:32,top:16},delay:.25},{position:{left:0,top:32},delay:.4},{position:{left:16,top:32},delay:.35},{position:{left:32,top:32},delay:.3}],Tg=({color:e})=>y.jsx("div",{className:"relative h-[34px] w-[34px]",role:"progressbar",children:L9.map(({position:t,delay:n},r)=>y.jsx(D9.div,{className:`absolute ${e?"bg-"+e:"bg-ide-highlight"} left-[${t.left}px] top-[${t.top}px] h-[2px] w-[2px]`,animate:{opacity:[0,1,1,0,0]},transition:{delay:n,duration:1,repeat:1/0,times:[0,.1,.6,.7,1],repeatDelay:1}},r))}),Bs=({message:e})=>{window.sourceryLS.postMessage({message:e})},hu=({message:e})=>{window.sourceryLS.postMessage({message:e})},_b=({message:e,isComplete:t,onImageLoad:n})=>{const r=O.useCallback((i,a)=>{Bs({message:{target:"languageServer",view:"chat",request:"applyFixes",file:i,fixes:a}})},[]);return y.jsx("div",{className:"flex flex-row justify-start",children:y.jsxs("div",{className:Re("assistant-message border border-ide-border relative flex flex-col",e.outcome==="error"?"bg-ide-error-bg":"bg-ide-chat-input-bg"),children:[y.jsx("div",{className:Re(e.requestId?"mb-5":"mb-2"),children:e.textContent?y.jsx(Ei,{markdown:e.textContent,isComplete:t,onApplyFixes:r,onImageLoad:n}):y.jsx(xk,{})}),y.jsx(sg,{contextIndicators:e.contextIndicators,className:"justify-start"})]})})},F9=({message:{textContent:e,contextIndicators:t}})=>y.jsx("div",{className:"flex flex-row justify-end",children:y.jsxs("div",{className:"rounded-lg-br-none ml-4 flex w-fit flex-col gap-1 border border-ide-border bg-ide-chat-input-bg px-4 py-2 text-ide-chat-input-text",children:[y.jsx("div",{className:"whitespace-pre-wrap",children:e}),y.jsx(sg,{contextIndicators:t,className:"justify-end"})]})}),z9=()=>y.jsxs("div",{className:"mb-4 mt-1 flex flex-row items-center justify-start gap-2 text-sm font-bold text-ide-disabled-text",children:[y.jsx("span",{children:y.jsx(re.Cancel,{})}),y.jsx("span",{children:"Canceled"})]}),V2=[{id:"sequence",name:"Sequence Diagram",description:"Visualize interactions between components over time"},{id:"class",name:"Class Diagram",description:"Show relationships between classes and interfaces"},{id:"flow",name:"Flow Chart",description:"Visualize logic flows and processes"}],B9=({setSelectedDiagramType:e,diagramScope:t,setDiagramScope:n})=>{const[r,i]=O.useState(null),a=()=>{hu({message:{target:"languageServer",view:"chat",request:"executeRecipe",recipeId:"generate_diagram",name:"Generate Diagram",diagramType:(r==null?void 0:r.name)??null,diagramDescription:t||null,trigger:"recipeViewButton"}}),e(null),n("")},o=s=>{s.key==="Enter"&&(s.preventDefault(),a())};return y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:()=>{e(null),n("")},children:y.jsxs("div",{className:"w-[400px] rounded-md border border-ide-border bg-ide-editor-bg",onClick:s=>s.stopPropagation(),children:[y.jsxs("div",{className:"flex items-center justify-between border-b border-ide-border p-3",children:[y.jsx("span",{className:"font-medium",children:"Generate Diagram"}),y.jsx("button",{onClick:()=>{e(null),n("")},className:"text-ide-disabled-text hover:text-ide-chat-input-text",children:y.jsx(re.Cross,{className:"h-4 w-4"})})]}),y.jsxs("div",{className:"flex flex-col gap-4 p-3",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("label",{className:"text-sm text-ide-disabled-text",children:"Select diagram type (optional):"}),y.jsx("div",{className:"flex flex-col gap-2",children:V2.map(s=>y.jsxs("button",{className:`flex flex-col items-start rounded border p-2 text-left hover:bg-ide-chat-input-bg ${(r==null?void 0:r.id)===s.id?"border-ide-primary-btn-text bg-ide-chat-input-bg":"border-ide-border"}`,onClick:()=>i(s),children:[y.jsx("div",{className:"font-medium",children:s.name}),y.jsx("div",{className:"text-sm text-ide-disabled-text",children:s.description})]},s.id))})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("label",{className:"text-sm text-ide-disabled-text",children:"What would you like to visualize? (optional)"}),y.jsx("input",{type:"text",className:"rounded border border-ide-border bg-ide-editor-bg px-3 py-2",placeholder:"Describe what to diagram...",value:t,onChange:s=>n(s.target.value),onKeyDown:o,autoFocus:!0})]}),y.jsx("button",{className:"btn-primary mt-2 rounded px-3 py-2 text-center hover:opacity-90",onClick:a,children:"Generate Diagram"})]})]})})},U9=({recipe:e,onClose:t,onSave:n})=>{const[r,i]=O.useState(e.prompt),a=()=>{n(e.id,{customPrompt:r}),t()};return y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:y.jsxs("div",{className:"w-[400px] rounded-md border border-ide-border bg-ide-editor-bg",onClick:o=>o.stopPropagation(),children:[y.jsxs("div",{className:"flex items-center justify-between border-b border-ide-border p-3",children:[y.jsxs("span",{className:"font-medium",children:["Recipe Settings: ",e.name]}),y.jsx("button",{onClick:t,className:"text-ide-disabled-text hover:text-ide-chat-input-text",children:y.jsx(re.Cross,{className:"h-4 w-4"})})]}),y.jsxs("div",{className:"flex flex-col gap-4 p-3",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("label",{className:"text-sm text-ide-disabled-text",children:"Custom Prompt:"}),y.jsx("textarea",{className:"min-h-[100px] rounded border border-ide-border bg-ide-editor-bg px-3 py-2",placeholder:"Enter custom prompt...",value:r,onChange:o=>i(o.target.value),autoFocus:!0}),y.jsx("p",{className:"text-xs text-ide-disabled-text",children:"This prompt will be appended to the usual recipe prompt as a user instruction. The prompts are saved in your user-level Sourcery config file."})]}),y.jsxs("div",{className:"flex justify-end gap-2",children:[y.jsx("button",{className:"rounded px-3 py-2 text-center hover:bg-ide-chat-input-bg",onClick:t,children:"Cancel"}),y.jsx("button",{className:"btn-primary rounded px-3 py-2 text-center hover:opacity-90",onClick:a,children:"Save Settings"})]})]})]})})},j9=(e,t)=>{hu({message:{target:"languageServer",view:"chat",request:"updateRecipeSettings",recipeId:e,customPrompt:t.customPrompt}})},$9=O.forwardRef((e,t)=>{const{isProcessing:n}=e,[r,i]=O.useState(),[a,o]=O.useState(!1),[{recipes:s,status:l},c]=O.useState({recipes:[],status:"pending"}),[u,f]=O.useState(null),[d,p]=O.useState(""),[m,g]=O.useState(null),w=O.useRef(null),h=O.useRef(null),b=O.useCallback(()=>{var C;(C=h.current)==null||C.focus()},[]);O.useImperativeHandle(t,()=>({focus:b}),[b]);const v=O.useCallback(({data:C})=>{switch(C.command){case"chat/focus":b()}},[b]);O.useEffect(()=>(window.addEventListener("message",v),()=>window.removeEventListener("message",v)),[v]),O.useEffect(()=>(window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)),[b]);const _=C=>{C.preventDefault(),!(!r||n)&&(Bs({message:{target:"languageServer",view:"chat",request:"sendMessage",textContent:r}}),i(""))},S=O.useCallback(C=>{var A;C.key=="Enter"&&!C.shiftKey&&!n&&(C.preventDefault(),(A=w.current)==null||A.requestSubmit())},[n]),x=O.useCallback(({data:{command:C,recipes:A}})=>{switch(C){case"recipes/addRecipes":c(nt(M=>{M.status="ok",M.recipes=A}))}},[]);O.useEffect(()=>(window.addEventListener("message",x),()=>window.removeEventListener("message",x)),[x]),O.useEffect(()=>{hu({message:cL})},[]);const k=(C,A)=>{C==="generate_diagram"?f(V2[0]):hu({message:{target:"languageServer",view:"chat",request:"executeRecipe",recipeId:C,name:A,trigger:"recipeViewButton"}}),o(!1)};return y.jsx("div",{className:"relative w-full",children:y.jsx("form",{onSubmit:_,ref:w,autoFocus:!0,children:y.jsxs("div",{className:"relative flex flex-col rounded bg-ide-editor-bg p-2",children:[y.jsx("textarea",{name:"chatPrompt",id:"chatPrompt",placeholder:"Ask anything...",className:"min-h-[80px] w-full resize-none rounded border border-ide-border bg-transparent px-3 py-2 text-ide-chat-input-text focus:outline-none",value:r,onChange:({target:{value:C}})=>i(C),onKeyDown:S,ref:h,autoFocus:!0,rows:3}),y.jsxs("div",{className:"flex items-center gap-4 px-2 pt-2",children:[y.jsxs("div",{className:"relative",children:[y.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-sm text-ide-chat-input-text hover:text-ide-primary-btn-text disabled:opacity-50",onClick:()=>o(!a),disabled:n,children:[y.jsx("span",{children:"recipes"}),y.jsx(re.ChevronDown,{className:"h-3 w-3"})]}),a&&y.jsxs("div",{className:"absolute bottom-full left-[-2px] mb-1 w-[250px] rounded-md border border-ide-border bg-ide-editor-bg shadow-lg",children:[y.jsx("div",{className:"flex items-center justify-between px-2 py-1",children:y.jsx("span",{className:"text-sm opacity-70",children:"Available Recipes"})}),y.jsx("div",{className:"max-h-[256px] overflow-y-auto",children:l==="pending"?y.jsx("div",{className:"flex h-20 items-center justify-center",children:y.jsx(Tg,{})}):s.map(C=>y.jsxs("div",{className:"flex w-full items-center justify-between px-4 py-2 hover:bg-ide-chat-input-bg",children:[y.jsx("button",{className:"flex-1 text-left",onClick:()=>k(C.id,C.name),disabled:n,children:C.name}),y.jsx("button",{className:"ml-2 text-ide-disabled-text hover:text-ide-chat-input-text",onClick:()=>g(C),title:"Add your own instructions to this recipe",children:y.jsx(re.Cog,{className:"h-4 w-4"})})]},C.id))})]}),m&&y.jsx(U9,{recipe:m,onClose:()=>g(null),onSave:j9}),u&&y.jsx(B9,{setSelectedDiagramType:f,diagramScope:d,setDiagramScope:p})]}),y.jsx("button",{className:"ml-auto text-ide-chat-input-text hover:text-ide-primary-btn-text disabled:opacity-50",type:"submit",disabled:!r||n,children:y.jsx(re.PaperPlane,{className:"h-4 w-4"})})]})]})})})}),V9=()=>y.jsxs("button",{className:"flex flex-row items-center gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),Bs({message:sL})},children:[y.jsx("span",{children:y.jsx(re.Plus,{})}),y.jsx("span",{children:"New Chat"})]}),H9=O.forwardRef(({className:e},t)=>{const[{messages:n,currentMessage:r},i]=O.useState({messages:[],currentMessage:null}),a=O.useRef(null),o=cE(a),s=O.useRef(null),l=O.useCallback(f=>{switch(f.role){case"user":{i(nt(d=>{d.messages.push(f),d.currentMessage={role:"assistant",outcome:"success",textContent:""}})),setTimeout(()=>{a.current&&Kp(a.current)},0);break}case"assistant":i(nt(d=>{d.currentMessage&&f.outcome==="success"?d.currentMessage.textContent+=f.textContent:d.currentMessage&&d.currentMessage.textContent&&f.outcome==="error"?(d.messages.push(d.currentMessage,f),d.currentMessage=null):f.outcome==="error"?(d.messages.push(f),d.currentMessage=null):f.outcome==="finished"?(d.currentMessage&&d.currentMessage.textContent&&(d.currentMessage.requestId=f.requestId,d.currentMessage.contextIndicators=f.contextIndicators,d.messages.push(d.currentMessage)),d.currentMessage=null):d.currentMessage=f}))}},[]),c=O.useCallback(({data:f})=>{switch(f.command){case"chat/addMessage":l(f.message);break;case"chat/clear":i(nt(d=>{d.messages=[],d.currentMessage=null}));break;case"chat/notifyCancel":i(nt(d=>{d.currentMessage&&d.currentMessage.textContent.length&&(d.currentMessage.requestId=f.requestId||void 0,d.messages.push(d.currentMessage)),d.messages.push("cancellationNotification"),d.currentMessage=null}));break}},[l]);O.useImperativeHandle(t,()=>({focus:()=>{var f;(f=s.current)==null||f.focus()}})),O.useLayoutEffect(()=>{o()},[r==null?void 0:r.textContent,n.length,o]),O.useEffect(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[c]),O.useEffect(()=>{Bs({message:oL})},[]);const u=O.useCallback(()=>{a.current&&requestAnimationFrame(()=>{Kp(a.current)})},[]);return y.jsxs("div",{className:e,"data-testid":"chat-view",children:[n.length===0&&r===null?y.jsx("div",{className:"flex grow flex-col items-center justify-center gap-8",children:y.jsx(Tg,{})}):y.jsxs("section",{className:"flex grow flex-col gap-4 overflow-auto p-2",ref:a,children:[n.map((f,d)=>{if(f==="cancellationNotification")return y.jsx(z9,{});switch(f.role){case"assistant":return y.jsx(_b,{message:f,isComplete:!0,onImageLoad:u},d);case"user":return y.jsx(F9,{message:f},d)}}),r&&y.jsx(_b,{message:r,isComplete:!1,onImageLoad:u})]}),y.jsxs("footer",{className:Re("flex grow-0 flex-col gap-2 border-t border-t-ide-border p-2"),children:[y.jsx("div",{className:"flex flex-row justify-center",children:y.jsxs("button",{disabled:r===null,className:"flex w-fit flex-row items-center gap-2 p-2 hover:enabled:opacity-80 disabled:text-ide-disabled-text",onClick:f=>{var d;f.stopPropagation(),(d=s.current)==null||d.focus(),Bs({message:lL})},children:[y.jsx(re.CirclePause,{}),y.jsx("span",{children:"Cancel"})]})}),y.jsx($9,{ref:s,isProcessing:r!==null})]}),y.jsx("div",{className:"flex h-1 w-full bg-ide-border"})]})}),H2={selectedTab:"review",selectedReviewOption:"current"},ff=O.createContext({uiState:H2,updateUIState:e=>{console.warn("Default updateUIState called - this means you are using the context outside of UIStateProvider!",e)}}),W2={isFeatureFlagEnabled:!1,isAuthenticated:!1,isAuthorized:!1,isRepositoryOpenSource:!1,isConfigEnabled:!1,showCodeLens:!0,suggestFixes:!0,isGitRepository:!1,isJetBrains:!1,branches:[]},df=O.createContext(W2),W9=df.Provider,G9=({disabled:e,isOpen:t,setIsOpen:n,selectedReviewOption:r,selectedBranch:i,updateUIState:a,isGitRepository:o,branches:s,onRefresh:l})=>{const c=()=>{switch(r){case"current":return"Review current file";case"head":return"Compare with HEAD";case"branch":return`Compare with ${i}`;default:return"Select comparison"}};return y.jsxs("div",{className:"relative",children:[y.jsxs("button",{type:"button",className:"flex w-full items-center justify-between gap-2 rounded border border-ide-border bg-ide-editor-bg px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>n(!t),disabled:e,children:[y.jsxs("div",{className:"flex items-center gap-2",children:[r==="current"?y.jsx(re.File,{className:"h-4 w-4 opacity-70"}):y.jsx(re.Git,{className:"h-4 w-4 opacity-70"}),y.jsx("span",{children:c()})]}),y.jsx(re.ChevronDown,{className:"h-4 w-4 opacity-50"})]}),t&&y.jsxs("div",{className:"absolute left-0 top-full z-10 mt-1 w-full rounded border border-ide-border bg-ide-editor-bg shadow-lg",children:[y.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>{a({selectedReviewOption:"current"}),n(!1)},children:[y.jsx(re.File,{className:"h-4 w-4"}),"Review current file"]}),o&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"border-t border-ide-border"}),y.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>{a({selectedReviewOption:"head"}),n(!1)},children:[y.jsx(re.Git,{className:"h-4 w-4"}),"Compare with HEAD"]}),y.jsx("div",{className:"border-t border-ide-border"}),y.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[y.jsx("span",{className:"text-sm opacity-70",children:"Compare with branch:"}),y.jsx("button",{type:"button",onClick:u=>{u.stopPropagation(),l()},className:"flex items-center justify-center rounded p-1 hover:bg-ide-chat-input-bg",title:"Refresh branches",children:y.jsx(re.Refresh,{})})]}),y.jsx("div",{className:"max-h-[256px] overflow-y-auto",children:s.map(u=>y.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-4 py-2 hover:bg-ide-chat-input-bg",onClick:()=>{a({selectedReviewOption:"branch",selectedBranch:u.name}),n(!1)},children:[y.jsx(re.Git,{className:"h-4 w-4"}),y.jsxs("span",{className:"flex items-center gap-2",children:[u.name,u.isDefault&&y.jsx("span",{className:"rounded bg-ide-border px-1.5 py-0.5 text-xs opacity-70",children:"default"})]})]},u.name))})]})]})]})},Ya=({message:e})=>{window.sourceryLS.postMessage({message:e})},Ea=({outcome:e,textContent:t,collapsible:n=!1})=>{const[r,i]=O.useState(!0),a=(t==null?void 0:t.split(`
837
- `)[0])||"",o=()=>{i(!r)};return y.jsx("div",{className:"flex flex-row justify-start",children:y.jsx("div",{className:Re("rounded-lg-bl-none mr-4 w-fit max-w-full rounded-tl-lg rounded-tr-lg px-4 py-2",e==="error"?"bg-ide-error-bg":"bg-ide-chat-input-bg"),children:n?y.jsxs("div",{children:[y.jsxs("div",{className:"flex cursor-pointer items-center gap-2 hover:opacity-80",onClick:o,children:[y.jsx(re.ChevronRight,{className:Re("transition-transform flex-shrink-0 mt-[2px]",{"rotate-90":!r})}),y.jsx("div",{children:a})]}),!r&&t&&y.jsx("div",{className:"mt-2",children:y.jsx(Ei,{markdown:t})})]}):t?y.jsx(Ei,{markdown:t}):y.jsx(xk,{})})})},K9=({diagrams:e})=>y.jsx("div",{className:"flex flex-row justify-start",children:y.jsx("div",{className:Re("rounded-lg-bl-none mr-4 rounded-tl-lg rounded-tr-lg px-4 py-2","bg-ide-chat-input-bg"),children:e.map((t,n)=>y.jsx("div",{children:y.jsx(_k,{chart:t.diagram,title:t.title})},n))})}),q9=({summary:e,follow_up_comment:t,file:n,location:r,diff_line_for_comment:i,area:a,comment_type:o,formatted_fix:s,formatted_diff_context:l,fix:c,resolved:u,outdated:f})=>{const[d,p]=O.useState(u);O.useEffect(()=>{p(u)},[u]);const m=O.useCallback(()=>{Ya({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:"apply",file:n,diff_line_for_comment:i,fix:c}})},[n,i,c]),g=()=>{p(!d)};return y.jsx("div",{className:"flex w-full flex-row justify-start",children:y.jsxs("div",{className:Re("rounded-lg-bl-none mr-4 w-full rounded-tl-lg rounded-tr-lg px-4 py-2","bg-ide-chat-input-bg","relative"),children:[f&&y.jsx("div",{className:Re("absolute right-2 top-2 rounded-full border border-ide-warning-bg bg-transparent px-2 py-0.5 text-xs text-ide-text",{"opacity-50":u}),children:"outdated"}),y.jsxs("div",{className:Re({"opacity-50":u}),children:[y.jsxs("div",{className:"flex items-center gap-2 pr-16",children:[y.jsx(re.ChevronRight,{className:Re("transition-transform flex-shrink-0 mt-[2px] cursor-pointer hover:opacity-80",{"rotate-90":!d}),onClick:g}),y.jsxs("div",{className:"relative grow overflow-hidden",children:[y.jsx("div",{className:"truncate",children:y.jsx(Ei,{markdown:r})}),y.jsx("div",{className:"pointer-events-none absolute right-0 top-0 h-full w-4 bg-gradient-to-r from-transparent via-transparent to-ide-chat-input-bg"})]})]}),y.jsx("div",{className:"mt-2 flex flex-row gap-2",children:y.jsxs("span",{className:"text-sm",children:[y.jsx("span",{className:"font-bold",children:o}),y.jsx("span",{children:"("}),y.jsx("span",{className:"italic",children:a}),y.jsx("span",{children:"): "}),y.jsx("span",{children:e})]})})]}),!d&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Re({"opacity-50":u}),children:[y.jsx(Ei,{markdown:l,hideCodeButtons:!0}),y.jsx(Ei,{markdown:t}),s&&y.jsxs("div",{className:"mt-2 border-t border-ide-border pt-2",children:[y.jsx("div",{className:"text-sm font-bold",children:"Suggested Fix:"}),y.jsx(Ei,{markdown:s,hideCodeButtons:u||f,onApplyFix:!u&&!f?m:void 0})]})]}),y.jsx("div",{className:"mt-2 flex flex-row justify-end",children:y.jsxs("button",{onClick:()=>Ya({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:u?"unresolved":"resolved",file:n,diff_line_for_comment:i}}),title:u?"Mark this comment as unresolved.":"Mark this comment as resolved.",className:"flex flex-row items-center gap-1 rounded-full border border-ide-border px-2 py-0.5 text-xs hover:opacity-80",children:[y.jsx(re.Check,{})," ",u?"Unresolve":"Resolve"]})})]})]})})},Y9=({summary:e,running:t})=>e&&e.textContent?y.jsx(Ea,{outcome:e.outcome,textContent:e.textContent,type:"text"}):t?y.jsx(Ea,{outcome:"success",textContent:"Generating detailed review - this might take a little while...",type:"text"}):null,Z9=()=>y.jsxs("button",{className:"flex flex-row gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),Ya({message:zS})},children:[y.jsx("span",{children:y.jsx(re.Plus,{})}),y.jsx("span",{children:"New Review"})]}),X9=({disabled:e})=>{const{uiState:t,updateUIState:n}=O.useContext(ff),r=O.useContext(df),[i,a]=O.useState(!1),[o,s]=O.useState(!1),l=O.useCallback(()=>{window.sourceryLS.postMessage({message:FS})},[]),c=O.useCallback(f=>{f.preventDefault(),s(!0),Ya({message:zS}),Ya({message:{target:"languageServer",view:"review",request:"review",comparisonType:t.selectedReviewOption,branch:t.selectedBranch}})},[t.selectedReviewOption,t.selectedBranch]);O.useEffect(()=>{e||s(!1)},[e]);const u=e||o;return y.jsxs("form",{className:"flex flex-col gap-2 p-2",onSubmit:c,children:[y.jsx("div",{className:"grow",children:y.jsx(G9,{disabled:u,isOpen:i,setIsOpen:a,selectedReviewOption:t.selectedReviewOption,selectedBranch:t.selectedBranch,updateUIState:n,isGitRepository:r.isGitRepository,branches:r.branches,onRefresh:l})}),y.jsx("button",{type:"submit",className:"btn-primary w-full border border-ide-border p-1",disabled:u,children:u?"Review in progress...":"Review My Code"})]})},Q9=()=>y.jsxs("div",{className:"mb-4 mt-1 flex flex-row items-center justify-start gap-2 text-sm font-bold text-ide-disabled-text",children:[y.jsx("span",{children:y.jsx(re.Cancel,{})}),y.jsx("span",{children:"Canceled"})]}),J9=({className:e})=>{const[{overview:t,change_summary:n,summary:r,diagram:i,comments:a,error:o,cancelled:s,running:l,running_detailed:c},u]=O.useState({overview:null,change_summary:null,summary:null,diagram:null,comments:[],error:null,cancelled:!1,running:!1,running_detailed:!1}),f=O.useRef(null),d=cE(f),p=O.useCallback(({data:m})=>{switch(m.command){case"review/addOverviewMessage":u(nt(g=>{g.running=!0,g.overview=m.message}));break;case"review/addChangeSummaryMessage":u(nt(g=>{g.change_summary?g.change_summary.textContent+=m.message.textContent:g.change_summary=m.message}));break;case"review/addSummaryMessage":u(nt(g=>{g.summary=m.message}));break;case"review/addCommentMessage":u(nt(g=>{g.comments.push(m.comment)}));break;case"review/addErrorMessage":u(nt(g=>{g.error=m.message}));break;case"review/clear":u(nt(()=>({overview:null,change_summary:null,summary:null,diagram:null,comments:[],error:null,cancelled:!1,running:!1,running_detailed:!1})));break;case"review/notifyCancel":u(nt(g=>{g.cancelled=!0}));break;case"review/notifyStreamingComplete":u(nt(g=>{g.running_detailed=!0}));break;case"review/notifyComplete":u(nt(g=>{g.running=!1,g.running_detailed=!1}));break;case"review/addDiagramMessage":u(nt(g=>{g.diagram=m.message}));break;case"review/updateComment":u(nt(g=>{const w=g.comments.findIndex(h=>h.comment.file.trim()===m.comment.comment.file.trim()&&h.comment.diff_line_for_comment===m.comment.comment.diff_line_for_comment);w!==-1&&(g.comments[w].comment=m.comment.comment)}));break}},[]);return O.useLayoutEffect(()=>{d()},[a.length,d]),O.useEffect(()=>(window.addEventListener("message",p),()=>window.removeEventListener("message",p)),[p]),y.jsxs("div",{className:e,"data-testid":"review-view",children:[y.jsx(X9,{disabled:l}),y.jsxs("section",{className:"flex grow flex-col gap-2 overflow-y-auto p-2",ref:f,children:[t&&y.jsx(y.Fragment,{children:y.jsx(Ea,{outcome:t.outcome,textContent:t.textContent,type:"text",collapsible:t.collapsible})}),n&&y.jsx(y.Fragment,{children:y.jsx(Ea,{outcome:n.outcome,textContent:n.textContent,type:"text"})}),t&&y.jsx(y.Fragment,{children:y.jsx(Y9,{summary:r,running:c})}),i&&y.jsx(K9,{diagrams:i.diagrams,type:"diagrams"}),a.map((m,g)=>y.jsx(q9,{...m.comment},g)),c&&y.jsx(Ea,{outcome:"success",textContent:"",type:"text"}),s&&y.jsx(Q9,{}),o&&y.jsx(Ea,{outcome:o.outcome,textContent:o.textContent,type:"text"})]}),y.jsx("footer",{className:Re(l?"flex flex-row justify-center border-t border-ide-border":"hidden"),children:y.jsxs("button",{className:"flex w-fit flex-row items-center gap-2 p-1 hover:enabled:opacity-80 disabled:text-ide-disabled-text",onClick:()=>Ya({message:uL}),children:[y.jsx(re.Cancel,{}),y.jsx("span",{children:"Cancel"})]})})]})},e7=""+new URL("sourcery-logo.svg",import.meta.url).href;var wb=function(t){return t.reduce(function(n,r){var i=r[0],a=r[1];return n[i]=a,n},{})},xb=typeof window<"u"&&window.document&&window.document.createElement?O.useLayoutEffect:O.useEffect,Nt="top",rn="bottom",an="right",Ct="left",Ag="auto",sl=[Nt,rn,an,Ct],Za="start",Us="end",t7="clippingParents",G2="viewport",So="popper",n7="reference",Eb=sl.reduce(function(e,t){return e.concat([t+"-"+Za,t+"-"+Us])},[]),K2=[].concat(sl,[Ag]).reduce(function(e,t){return e.concat([t,t+"-"+Za,t+"-"+Us])},[]),r7="beforeRead",i7="read",a7="afterRead",o7="beforeMain",s7="main",l7="afterMain",c7="beforeWrite",u7="write",f7="afterWrite",d7=[r7,i7,a7,o7,s7,l7,c7,u7,f7];function Bn(e){return e?(e.nodeName||"").toLowerCase():null}function $t(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ji(e){var t=$t(e).Element;return e instanceof t||e instanceof Element}function Jt(e){var t=$t(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Og(e){if(typeof ShadowRoot>"u")return!1;var t=$t(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function p7(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!Jt(a)||!Bn(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function h7(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=o.reduce(function(l,c){return l[c]="",l},{});!Jt(i)||!Bn(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const m7={name:"applyStyles",enabled:!0,phase:"write",fn:p7,effect:h7,requires:["computeStyles"]};function Fn(e){return e.split("-")[0]}var Ti=Math.max,mu=Math.min,Xa=Math.round;function Nh(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function q2(){return!/^((?!chrome|android).)*safari/i.test(Nh())}function Qa(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Jt(e)&&(i=e.offsetWidth>0&&Xa(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Xa(r.height)/e.offsetHeight||1);var o=ji(e)?$t(e):window,s=o.visualViewport,l=!q2()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,u=(r.top+(l&&s?s.offsetTop:0))/a,f=r.width/i,d=r.height/a;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c,x:c,y:u}}function Rg(e){var t=Qa(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Y2(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Og(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fr(e){return $t(e).getComputedStyle(e)}function g7(e){return["table","td","th"].indexOf(Bn(e))>=0}function ii(e){return((ji(e)?e.ownerDocument:e.document)||window.document).documentElement}function pf(e){return Bn(e)==="html"?e:e.assignedSlot||e.parentNode||(Og(e)?e.host:null)||ii(e)}function Sb(e){return!Jt(e)||fr(e).position==="fixed"?null:e.offsetParent}function y7(e){var t=/firefox/i.test(Nh()),n=/Trident/i.test(Nh());if(n&&Jt(e)){var r=fr(e);if(r.position==="fixed")return null}var i=pf(e);for(Og(i)&&(i=i.host);Jt(i)&&["html","body"].indexOf(Bn(i))<0;){var a=fr(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function ll(e){for(var t=$t(e),n=Sb(e);n&&g7(n)&&fr(n).position==="static";)n=Sb(n);return n&&(Bn(n)==="html"||Bn(n)==="body"&&fr(n).position==="static")?t:n||y7(e)||t}function Mg(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function es(e,t,n){return Ti(e,mu(t,n))}function v7(e,t,n){var r=es(e,t,n);return r>n?n:r}function Z2(){return{top:0,right:0,bottom:0,left:0}}function X2(e){return Object.assign({},Z2(),e)}function Q2(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var b7=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,X2(typeof t!="number"?t:Q2(t,sl))};function _7(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Fn(n.placement),l=Mg(s),c=[Ct,an].indexOf(s)>=0,u=c?"height":"width";if(!(!a||!o)){var f=b7(i.padding,n),d=Rg(a),p=l==="y"?Nt:Ct,m=l==="y"?rn:an,g=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],w=o[l]-n.rects.reference[l],h=ll(a),b=h?l==="y"?h.clientHeight||0:h.clientWidth||0:0,v=g/2-w/2,_=f[p],S=b-d[u]-f[m],x=b/2-d[u]/2+v,k=es(_,x,S),C=l;n.modifiersData[r]=(t={},t[C]=k,t.centerOffset=k-x,t)}}function w7(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Y2(t.elements.popper,i)&&(t.elements.arrow=i))}const x7={name:"arrow",enabled:!0,phase:"main",fn:_7,effect:w7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ja(e){return e.split("-")[1]}var E7={top:"auto",right:"auto",bottom:"auto",left:"auto"};function S7(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Xa(n*i)/i||0,y:Xa(r*i)/i||0}}function kb(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=o.x,p=d===void 0?0:d,m=o.y,g=m===void 0?0:m,w=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=w.x,g=w.y;var h=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),v=Ct,_=Nt,S=window;if(c){var x=ll(n),k="clientHeight",C="clientWidth";if(x===$t(n)&&(x=ii(n),fr(x).position!=="static"&&s==="absolute"&&(k="scrollHeight",C="scrollWidth")),x=x,i===Nt||(i===Ct||i===an)&&a===Us){_=rn;var A=f&&x===S&&S.visualViewport?S.visualViewport.height:x[k];g-=A-r.height,g*=l?1:-1}if(i===Ct||(i===Nt||i===rn)&&a===Us){v=an;var M=f&&x===S&&S.visualViewport?S.visualViewport.width:x[C];p-=M-r.width,p*=l?1:-1}}var I=Object.assign({position:s},c&&E7),F=u===!0?S7({x:p,y:g},$t(n)):{x:p,y:g};if(p=F.x,g=F.y,l){var H;return Object.assign({},I,(H={},H[_]=b?"0":"",H[v]=h?"0":"",H.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",H))}return Object.assign({},I,(t={},t[_]=b?g+"px":"",t[v]=h?p+"px":"",t.transform="",t))}function k7(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Fn(t.placement),variation:Ja(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,kb(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,kb(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const N7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:k7,data:{}};var Ql={passive:!0};function C7(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,l=$t(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(u){u.addEventListener("scroll",n.update,Ql)}),s&&l.addEventListener("resize",n.update,Ql),function(){a&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Ql)}),s&&l.removeEventListener("resize",n.update,Ql)}}const T7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:C7,data:{}};var A7={left:"right",right:"left",bottom:"top",top:"bottom"};function bc(e){return e.replace(/left|right|bottom|top/g,function(t){return A7[t]})}var O7={start:"end",end:"start"};function Nb(e){return e.replace(/start|end/g,function(t){return O7[t]})}function Ig(e){var t=$t(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Pg(e){return Qa(ii(e)).left+Ig(e).scrollLeft}function R7(e,t){var n=$t(e),r=ii(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var c=q2();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+Pg(e),y:l}}function M7(e){var t,n=ii(e),r=Ig(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Ti(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Ti(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Pg(e),l=-r.scrollTop;return fr(i||n).direction==="rtl"&&(s+=Ti(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function Dg(e){var t=fr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function J2(e){return["html","body","#document"].indexOf(Bn(e))>=0?e.ownerDocument.body:Jt(e)&&Dg(e)?e:J2(pf(e))}function ts(e,t){var n;t===void 0&&(t=[]);var r=J2(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=$t(r),o=i?[a].concat(a.visualViewport||[],Dg(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(ts(pf(o)))}function Ch(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function I7(e,t){var n=Qa(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Cb(e,t,n){return t===G2?Ch(R7(e,n)):ji(t)?I7(t,n):Ch(M7(ii(e)))}function P7(e){var t=ts(pf(e)),n=["absolute","fixed"].indexOf(fr(e).position)>=0,r=n&&Jt(e)?ll(e):e;return ji(r)?t.filter(function(i){return ji(i)&&Y2(i,r)&&Bn(i)!=="body"}):[]}function D7(e,t,n,r){var i=t==="clippingParents"?P7(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(l,c){var u=Cb(e,c,r);return l.top=Ti(u.top,l.top),l.right=mu(u.right,l.right),l.bottom=mu(u.bottom,l.bottom),l.left=Ti(u.left,l.left),l},Cb(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function eN(e){var t=e.reference,n=e.element,r=e.placement,i=r?Fn(r):null,a=r?Ja(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Nt:l={x:o,y:t.y-n.height};break;case rn:l={x:o,y:t.y+t.height};break;case an:l={x:t.x+t.width,y:s};break;case Ct:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?Mg(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(a){case Za:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Us:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function js(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,l=s===void 0?t7:s,c=n.rootBoundary,u=c===void 0?G2:c,f=n.elementContext,d=f===void 0?So:f,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,w=g===void 0?0:g,h=X2(typeof w!="number"?w:Q2(w,sl)),b=d===So?n7:So,v=e.rects.popper,_=e.elements[m?b:d],S=D7(ji(_)?_:_.contextElement||ii(e.elements.popper),l,u,o),x=Qa(e.elements.reference),k=eN({reference:x,element:v,strategy:"absolute",placement:i}),C=Ch(Object.assign({},v,k)),A=d===So?C:x,M={top:S.top-A.top+h.top,bottom:A.bottom-S.bottom+h.bottom,left:S.left-A.left+h.left,right:A.right-S.right+h.right},I=e.modifiersData.offset;if(d===So&&I){var F=I[i];Object.keys(M).forEach(function(H){var W=[an,rn].indexOf(H)>=0?1:-1,$=[Nt,rn].indexOf(H)>=0?"y":"x";M[H]+=F[$]*W})}return M}function L7(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?K2:l,u=Ja(r),f=u?s?Eb:Eb.filter(function(m){return Ja(m)===u}):sl,d=f.filter(function(m){return c.indexOf(m)>=0});d.length===0&&(d=f);var p=d.reduce(function(m,g){return m[g]=js(e,{placement:g,boundary:i,rootBoundary:a,padding:o})[Fn(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function F7(e){if(Fn(e)===Ag)return[];var t=bc(e);return[Nb(e),t,Nb(t)]}function z7(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,w=t.options.placement,h=Fn(w),b=h===w,v=l||(b||!m?[bc(w)]:F7(w)),_=[w].concat(v).reduce(function(le,se){return le.concat(Fn(se)===Ag?L7(t,{placement:se,boundary:u,rootBoundary:f,padding:c,flipVariations:m,allowedAutoPlacements:g}):se)},[]),S=t.rects.reference,x=t.rects.popper,k=new Map,C=!0,A=_[0],M=0;M<_.length;M++){var I=_[M],F=Fn(I),H=Ja(I)===Za,W=[Nt,rn].indexOf(F)>=0,$=W?"width":"height",X=js(t,{placement:I,boundary:u,rootBoundary:f,altBoundary:d,padding:c}),D=W?H?an:Ct:H?rn:Nt;S[$]>x[$]&&(D=bc(D));var R=bc(D),L=[];if(a&&L.push(X[F]<=0),s&&L.push(X[D]<=0,X[R]<=0),L.every(function(le){return le})){A=I,C=!1;break}k.set(I,L)}if(C)for(var E=m?3:1,z=function(se){var Q=_.find(function(Te){var Me=k.get(Te);if(Me)return Me.slice(0,se).every(function(ie){return ie})});if(Q)return A=Q,"break"},q=E;q>0;q--){var N=z(q);if(N==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const B7={name:"flip",enabled:!0,phase:"main",fn:z7,requiresIfExists:["offset"],data:{_skip:!1}};function Tb(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ab(e){return[Nt,an,rn,Ct].some(function(t){return e[t]>=0})}function U7(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=js(t,{elementContext:"reference"}),s=js(t,{altBoundary:!0}),l=Tb(o,r),c=Tb(s,i,a),u=Ab(l),f=Ab(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const j7={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:U7};function $7(e,t,n){var r=Fn(e),i=[Ct,Nt].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Ct,an].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function V7(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=K2.reduce(function(u,f){return u[f]=$7(f,t.rects,a),u},{}),s=o[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}const H7={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:V7};function W7(e){var t=e.state,n=e.name;t.modifiersData[n]=eN({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const G7={name:"popperOffsets",enabled:!0,phase:"read",fn:W7,data:{}};function K7(e){return e==="x"?"y":"x"}function q7(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,d=n.tether,p=d===void 0?!0:d,m=n.tetherOffset,g=m===void 0?0:m,w=js(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),h=Fn(t.placement),b=Ja(t.placement),v=!b,_=Mg(h),S=K7(_),x=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,M=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(x){if(a){var H,W=_==="y"?Nt:Ct,$=_==="y"?rn:an,X=_==="y"?"height":"width",D=x[_],R=D+w[W],L=D-w[$],E=p?-C[X]/2:0,z=b===Za?k[X]:C[X],q=b===Za?-C[X]:-k[X],N=t.elements.arrow,le=p&&N?Rg(N):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Z2(),Q=se[W],Te=se[$],Me=es(0,k[X],le[X]),ie=v?k[X]/2-E-Me-Q-M.mainAxis:z-Me-Q-M.mainAxis,Ze=v?-k[X]/2+E+Me+Te+M.mainAxis:q+Me+Te+M.mainAxis,Ve=t.elements.arrow&&ll(t.elements.arrow),cn=Ve?_==="y"?Ve.clientTop||0:Ve.clientLeft||0:0,jn=(H=I==null?void 0:I[_])!=null?H:0,hr=D+ie-jn-cn,Xi=D+Ze-jn,at=es(p?mu(R,hr):R,D,p?Ti(L,Xi):L);x[_]=at,F[_]=at-D}if(s){var ai,mr=_==="x"?Nt:Ct,ee=_==="x"?rn:an,At=x[S],we=S==="y"?"height":"width",me=At+w[mr],$n=At-w[ee],Ot=[Nt,Ct].indexOf(h)!==-1,gr=(ai=I==null?void 0:I[S])!=null?ai:0,yr=Ot?me:At-k[we]-C[we]-gr+M.altAxis,T=Ot?At+k[we]+C[we]-gr-M.altAxis:$n,P=p&&Ot?v7(yr,At,T):es(p?yr:me,At,p?T:$n);x[S]=P,F[S]=P-At}t.modifiersData[r]=F}}const Y7={name:"preventOverflow",enabled:!0,phase:"main",fn:q7,requiresIfExists:["offset"]};function Z7(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function X7(e){return e===$t(e)||!Jt(e)?Ig(e):Z7(e)}function Q7(e){var t=e.getBoundingClientRect(),n=Xa(t.width)/e.offsetWidth||1,r=Xa(t.height)/e.offsetHeight||1;return n!==1||r!==1}function J7(e,t,n){n===void 0&&(n=!1);var r=Jt(t),i=Jt(t)&&Q7(t),a=ii(t),o=Qa(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Bn(t)!=="body"||Dg(a))&&(s=X7(t)),Jt(t)?(l=Qa(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Pg(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function eU(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function tU(e){var t=eU(e);return d7.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function nU(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function rU(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ob={placement:"bottom",modifiers:[],strategy:"absolute"};function Rb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function iU(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Ob:i;return function(s,l,c){c===void 0&&(c=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ob,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],d=!1,p={state:u,setOptions:function(h){var b=typeof h=="function"?h(u.options):h;g(),u.options=Object.assign({},a,u.options,b),u.scrollParents={reference:ji(s)?ts(s):s.contextElement?ts(s.contextElement):[],popper:ts(l)};var v=tU(rU([].concat(r,u.options.modifiers)));return u.orderedModifiers=v.filter(function(_){return _.enabled}),m(),p.update()},forceUpdate:function(){if(!d){var h=u.elements,b=h.reference,v=h.popper;if(Rb(b,v)){u.rects={reference:J7(b,ll(v),u.options.strategy==="fixed"),popper:Rg(v)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(M){return u.modifiersData[M.name]=Object.assign({},M.data)});for(var _=0;_<u.orderedModifiers.length;_++){if(u.reset===!0){u.reset=!1,_=-1;continue}var S=u.orderedModifiers[_],x=S.fn,k=S.options,C=k===void 0?{}:k,A=S.name;typeof x=="function"&&(u=x({state:u,options:C,name:A,instance:p})||u)}}}},update:nU(function(){return new Promise(function(w){p.forceUpdate(),w(u)})}),destroy:function(){g(),d=!0}};if(!Rb(s,l))return p;p.setOptions(c).then(function(w){!d&&c.onFirstUpdate&&c.onFirstUpdate(w)});function m(){u.orderedModifiers.forEach(function(w){var h=w.name,b=w.options,v=b===void 0?{}:b,_=w.effect;if(typeof _=="function"){var S=_({state:u,name:h,instance:p,options:v}),x=function(){};f.push(S||x)}})}function g(){f.forEach(function(w){return w()}),f=[]}return p}}var aU=[T7,G7,N7,m7,H7,B7,Y7,x7,j7],oU=iU({defaultModifiers:aU}),sU=typeof Element<"u",lU=typeof Map=="function",cU=typeof Set=="function",uU=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function _c(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!_c(e[r],t[r]))return!1;return!0}var a;if(lU&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;for(a=e.entries();!(r=a.next()).done;)if(!_c(r.value[1],t.get(r.value[0])))return!1;return!0}if(cU&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(uU&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(sU&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!_c(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var fU=function(t,n){try{return _c(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const dU=Un(fU);var pU=[],hU=function(t,n,r){r===void 0&&(r={});var i=O.useRef(null),a={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||pU},o=O.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=o[0],l=o[1],c=O.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(p){var m=p.state,g=Object.keys(m.elements);Ww.flushSync(function(){l({styles:wb(g.map(function(w){return[w,m.styles[w]||{}]})),attributes:wb(g.map(function(w){return[w,m.attributes[w]]}))})})},requires:["computeStyles"]}},[]),u=O.useMemo(function(){var d={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[c,{name:"applyStyles",enabled:!1}])};return dU(i.current,d)?i.current||d:(i.current=d,d)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,c]),f=O.useRef();return xb(function(){f.current&&f.current.setOptions(u)},[u]),xb(function(){if(!(t==null||n==null)){var d=r.createPopper||oU,p=d(t,n,u);return f.current=p,function(){p.destroy(),f.current=null}}},[t,n,r.createPopper]),{state:f.current?f.current.state:null,styles:s.styles,attributes:s.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}};function mU(e,t){O.useEffect(()=>{const n=r=>{e&&r&&r.target instanceof Element&&!e.contains(r.target)&&t()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,t])}const gU=({inputProps:e,icon:t,iconProps:n})=>y.jsx("div",{className:"relative w-full",children:y.jsxs("div",{className:"flex flex-row items-center",children:[y.jsx("input",{type:"text",placeholder:"Search for a rule...",className:"w-full rounded bg-ide-chat-input-bg p-2 pr-10 text-ide-chat-input-text",...e}),t&&y.jsx("i",{className:`${t} absolute right-3 top-3`,...n})]})}),yU=[{ruleGroup:{title:"Default",name:"default",description:"Rules bundled with Sourcery which are enabled by default.",filterFunction:({rule:e})=>e.tags.includes("default")}}],vU=["refactoring","default"],bU=({ruleGroup:{title:e,filterFunction:t,description:n},rules:r,searchTerm:i,projectConfig:a})=>{const[o,s]=O.useState(!0),l=o||i,{enabledRules:c,filteredRules:u}=O.useMemo(()=>{const f=r.filter(w=>!a.refactor.skip.includes(w.rule.id)),g=r.filter(t).filter(({rule:w})=>w.id.toLowerCase().includes(i.toLowerCase())).reduce((w,h)=>(w.find(v=>v.rule.id===h.rule.id)||w.push(h),w),[]).sort((w,h)=>w.rule.id.localeCompare(h.rule.id));return{enabledRules:f,filteredRules:g}},[r,a.refactor.skip,t,i]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex cursor-pointer flex-row items-center justify-between border border-transparent border-b-ide-border bg-ide-chat-input-bg p-5 hover:border-ide-border",onClick:()=>s(!o),children:[y.jsxs("div",{className:"flex flex-col gap-3",children:[y.jsxs("div",{className:"flex flex-row gap-4",children:[y.jsx("span",{className:"font-bold text-ide-text",children:e}),!i&&y.jsxs("span",{className:"text-ide-disabled-text",children:["(click to ",l?"collapse":"expand",")"]})]}),y.jsxs("p",{className:"text-ide-text",children:[c.length," of ",r.length," enabled"]}),y.jsx("p",{className:"text-ide-disabled-text",children:n})]}),!i&&y.jsx(re.ChevronDown,{className:Re("mr-4 transition-transform",l&&"rotate-180")})]}),l&&y.jsx("ol",{className:"ml-6 flex flex-col divide-y divide-ide-border",children:u.map(({rule:f})=>y.jsx("li",{children:y.jsx(_U,{rule:f,projectConfig:a})},f.id))})]})},_U=({rule:e,projectConfig:t})=>{const n=!t.refactor.skip.includes(e.id),r=async()=>{window.sourceryLS.postMessage({message:{target:"languageServer",view:"rules",request:"toggleRule",ruleId:e.id,enabled:!n}})};return y.jsxs("div",{className:"flex flex-row justify-between px-5 pb-4 pt-5 hover:bg-ide-chat-input-bg",children:[y.jsxs("div",{className:"flex flex-col",children:[y.jsx("label",{htmlFor:e.id,className:"cursor-pointer font-mono text-ide-text",children:y.jsx("div",{className:"flex flex-row items-center gap-5",children:y.jsx("span",{children:e.id})})}),y.jsx("p",{className:"text-xs text-ide-disabled-text",children:y.jsx("a",{href:`https://docs.sourcery.ai/Reference/Python/Default-Rules/${e.id}/`,className:"hover:text-ide-highlight",target:"_blank",rel:"noopener noreferrer",children:"View docs"})}),y.jsx("div",{className:"-ml-3 mt-3",children:e.tags.filter(i=>!vU.includes(i)).map(i=>y.jsx("span",{className:"mr-3 rounded-full bg-ide-chat-input-bg px-4 py-2 text-xs text-ide-text",children:i},i))})]}),y.jsx("button",{onClick:r,className:"flex items-center justify-center",children:n?y.jsx(re.SquareCheck,{className:"text-ide-highlight"}):y.jsx(re.Square,{})})]})},wU=({onClose:e})=>{const[t,n]=O.useState(""),[r,i]=O.useState([]),[a,o]=O.useState({refactor:{skip:[]}}),s=O.useCallback(({data:l})=>{if(l.command)switch(l.command){case"rules/update":i(l.rules);break;case"rules/configUpdate":o(l.config);break}},[]);return O.useEffect(()=>(window.addEventListener("message",s),window.sourceryLS.postMessage({message:{target:"languageServer",view:"rules",request:"getRules"}}),()=>window.removeEventListener("message",s)),[s]),y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:y.jsxs("div",{className:"relative max-h-[90vh] w-[90vw] max-w-4xl overflow-y-auto rounded-lg bg-ide-window-bg p-6 shadow-xl",children:[y.jsx("button",{onClick:e,className:"absolute right-4 top-4 text-ide-text hover:opacity-80",children:y.jsx(re.Cross,{})}),y.jsx("h1",{className:"text-3xl text-ide-text",children:"Rules"}),y.jsxs("p",{className:"mt-5 border-b-[2px] border-ide-border pb-5 text-ide-text opacity-80",children:["Use this section to toggle rules on or off for your project. Note that these controls edit your project's"," ",y.jsx("span",{className:"font-mono",children:".sourcery.yaml"})," file."]}),y.jsx("div",{className:"mt-4",children:y.jsx(gU,{inputProps:{value:t,onChange:({target:{value:l}})=>n(l),placeholder:"Search rules..."},icon:t?"mi-close cursor-pointer":"mi-filter-alt",iconProps:{onClick:t?()=>n(""):void 0}})}),y.jsx("ol",{className:"mt-6",children:yU.map(({ruleGroup:l})=>y.jsx("li",{children:y.jsx(bU,{ruleGroup:l,rules:r,searchTerm:t,projectConfig:a})},l.name))})]})})},li=({message:e})=>{window.sourceryLS.postMessage({message:e})},tN=({text:e=!0,popperOptions:t={placement:"bottom-start"}})=>{const[n,r]=O.useState(!1),i=O.useCallback(()=>r(()=>!0),[]),a=O.useCallback(()=>r(()=>!1),[]),[o,s]=O.useState(null),[l,c]=O.useState(null),{styles:u,attributes:f}=hU(o,l,t);mU(l,a);const{showCodeLens:d,suggestFixes:p,isJetBrains:m}=O.useContext(df),g=O.useCallback(()=>{li(d?{message:dL}:{message:fL})},[d]),w=O.useCallback(()=>{li(p?{message:hL}:{message:pL})},[p]),h=O.useCallback(()=>{li({message:gL})},[]),b=O.useCallback(()=>{li({message:yL})},[]),[v,_]=O.useState(!1),S=O.useCallback(()=>{a(),_(!0)},[a]),x=O.useCallback(()=>{li({message:mL})},[]);return y.jsxs(y.Fragment,{children:[y.jsxs("button",{type:"button",ref:s,onClick:i,className:Re("px-2 py-1 -my-[2px] hover:opacity-80 border flex flex-row items-center gap-1",n?"border-ide-primary-btn-bg rounded-t-sm":"border-transparent"),children:[y.jsx(re.Cog,{}),e&&y.jsx("span",{children:"Settings"})]}),y.jsxs("div",{ref:c,style:u.popper,...f.popper,className:Re(n?"block":"hidden","bg-ide-chat-input-bg mt-1 px-2 py-1 z-10 rounded-sm min-w-[240px] border border-ide-border shadow-lg flex flex-col"),children:[y.jsx("button",{onClick:g,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[d?y.jsx(re.SquareCheck,{className:"text-ide-highlight"}):y.jsx(re.Square,{}),y.jsx("span",{children:"Show Code Lenses"})]})}),!m&&y.jsx("button",{onClick:w,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[p?y.jsx(re.SquareCheck,{className:"text-ide-highlight"}):y.jsx(re.Square,{}),y.jsx("span",{children:"Suggest AI Fixes"})]})}),y.jsx("hr",{className:"my-1.5 text-ide-border"}),y.jsx("button",{onClick:x,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[y.jsx(re.User,{}),y.jsx("span",{children:"Manage Account"})]})}),y.jsx("button",{onClick:S,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[y.jsx(re.Cog,{}),y.jsx("span",{children:"Rule Settings"})]})}),y.jsx("button",{onClick:h,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[y.jsx(re.Book,{}),y.jsx("span",{children:"Documentation"})]})}),y.jsx("button",{onClick:b,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[y.jsx(re.Comment,{}),y.jsx("span",{children:"Feedback"})]})})]}),v&&y.jsx(wU,{onClose:()=>_(!1)})]})},ko=({message:e})=>{window.sourceryLS.postMessage({message:e})},xU=()=>{const{productName:e,isConfigEnabled:t,isAuthenticated:n,isAuthorized:r}=O.useContext(df),i=O.useCallback(()=>{ko({message:rL})},[]),a=O.useCallback(()=>{ko({message:eL})},[]),o=O.useCallback(()=>{ko({message:tL})},[]),s=O.useCallback(()=>{ko({message:nL})},[]);return O.useEffect(()=>{ko({message:iL})},[]),y.jsxs("section",{id:"access-details",className:"flex flex-col divide-y divide-ide-border overflow-y-auto px-4","data-testid":"access-details-view",children:[y.jsxs("div",{className:"my-4 -ml-1 flex flex-row items-center justify-between",children:[y.jsxs("div",{className:"flex flex-row items-center gap-[10px]",children:[y.jsx("div",{className:"h-8 w-8",children:y.jsx("img",{src:e7,alt:"Sourcery's Logo"})}),y.jsxs("h1",{className:"font-bold",children:["Sourcery ",e]})]}),y.jsx(tN,{popperOptions:{placement:"bottom-end"}})]}),t?n?!r&&y.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[y.jsx("h6",{className:"mt-2 text-2xl font-bold text-ide-text",children:"Upgrade to Pro"}),y.jsx("p",{className:"text-sm text-ide-disabled-text",children:"Use all of Sourcery's features on private repositories"}),y.jsxs("ul",{className:"list-disc space-y-2 py-2 pl-5 text-sm text-ide-text",children:[y.jsx("li",{children:"Instant code reviews"}),y.jsx("li",{children:"Unlimited AI chat interactions"}),y.jsx("li",{children:"Real-time code analysis and refactoring"}),y.jsx("li",{children:"Customisable recipes - generate docstrings, diagrams and tests exactly how you need them"})]}),y.jsxs("div",{className:"mt-2 flex flex-col gap-3",children:[y.jsx("button",{onClick:o,className:"btn-primary px-6 py-2.5 text-base font-bold transition-opacity hover:opacity-90",children:"Upgrade to Pro"}),y.jsx("button",{className:"text-sm text-ide-disabled-text transition-colors hover:text-ide-text",onClick:s,children:"Already upgraded? Refresh status"})]}),y.jsxs("span",{className:"mt-2 text-sm",children:["Have questions? ",y.jsx("a",{href:"https://docs.sourcery.ai/Coding-Assistant/Product/Troubleshooting/#what-do-i-do-if-i-see-the-project-disabled-for-account-screen",className:"cursor-pointer underline transition-colors hover:text-ide-text",children:"Resolve issues"})," or ",y.jsx("a",{href:"https://sourcery.ai/pricing/",className:"cursor-pointer underline transition-colors hover:text-ide-text",children:"learn more"}),"."]})]}):y.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[y.jsx("h6",{className:"mt-2 text-2xl font-bold text-ide-text",children:"Log in to start using Sourcery"}),y.jsx("p",{className:"text-sm text-ide-disabled-text",children:"Discover what Sourcery can do for you:"}),y.jsxs("ul",{className:"list-disc space-y-2 py-2 pl-5 text-sm text-ide-text",children:[y.jsx("li",{children:"Instant code reviews"}),y.jsx("li",{children:"Unlimited AI chat interactions"}),y.jsx("li",{children:"Real-time code analysis and refactoring"}),y.jsx("li",{children:"Customisable recipes - generate docstrings, diagrams and tests exactly how you need them"})]}),y.jsxs("div",{className:"mt-2 flex flex-col gap-3",children:[y.jsx("button",{className:"btn-primary px-6 py-2.5 text-base font-bold transition-opacity hover:opacity-90",onClick:i,children:"Log In"}),y.jsx("button",{className:"text-sm text-ide-disabled-text transition-colors hover:text-ide-text",onClick:s,children:"Already logged in? Refresh status"})]}),y.jsxs("span",{className:"mt-2 text-sm",children:["Have questions? ",y.jsx("a",{href:"mailto:support@sourcery.ai",className:"cursor-pointer underline transition-colors hover:text-ide-text",children:"Contact us"})," or ",y.jsx("a",{href:"https://sourcery.ai/pricing/",className:"cursor-pointer underline transition-colors hover:text-ide-text",children:"learn more"}),"."]})]}):y.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[y.jsx("h6",{className:"mt-2 text-xl",children:"Opt in to enable Sourcery coding assistant"}),y.jsx("p",{className:"text-sm",children:"Sourcery works with large language model providers (including OpenAI and Anthropic) to help us review and improve your code. By enabling the Sourcery coding assistant you agree to let us send code snippets to them as necessary."}),y.jsx("div",{className:"flex flex-row gap-4",children:y.jsx("button",{className:"btn-primary px-3 py-1 font-bold",onClick:a,children:"Opt In"})})]})]})},EU=({intent:e="info",children:t})=>y.jsx("div",{className:Re("flex flex-row gap-2 px-4 py-1 border-b border-ide-border",e==="error"&&"text-ide-error-text bg-ide-error-bg"),children:t});function SU({children:e}){const[t,n]=O.useState(H2),r=i=>{n(a=>({...a,...i}))};return O.useEffect(()=>{window.sourceryLS.postMessage({message:{...aL,updates:t}})},[t]),y.jsx(ff.Provider,{value:{uiState:t,updateUIState:r},children:e})}window.sourceryLS=window.sourceryLS||{};const kU=({message:e})=>{window.sourceryLS.postMessage({message:e})},NU=({activeView:e,onSelect:t})=>{const{updateUIState:n}=O.useContext(ff),r=i=>a=>{n==null||n({selectedTab:i}),t(i)(a)};return y.jsxs("div",{className:"flex flex-row flex-wrap items-center justify-between",children:[y.jsxs("div",{className:"flex grow flex-row flex-wrap gap-2 border-b border-ide-border px-2",children:[y.jsx("button",{className:Re("px-2 py-2 font-bold",e==="review"?"border-b-2 border-ide-border opacity-100":"opacity-50 hover:opacity-100"),onClick:r("review"),children:"Review"}),y.jsx("button",{className:Re("px-2 py-2 font-bold",e==="chat"?"border-b-2 border-ide-border opacity-100":"opacity-50 hover:opacity-100"),onClick:r("chat"),children:"Chat"})]}),y.jsxs("div",{className:"flex grow flex-row items-baseline justify-end gap-4 border-b border-ide-border p-2",children:[e==="chat"?y.jsx(V9,{}):e==="review"?y.jsx(Z9,{}):null,y.jsx(tN,{text:!1,popperOptions:{placement:"bottom-end"}})]})]})},CU=()=>{const[{status:e,appContext:t},n]=O.useState({status:"pending",appContext:W2}),[r,i]=O.useState("chat"),a=O.useRef(null);return O.useEffect(()=>{kU({message:FS})},[]),y.jsx(SU,{children:y.jsx(W9,{value:t,children:y.jsx(TU,{status:e,appContext:t,activeView:r,setActiveView:i,chatRef:a,setAppContext:n})})})},TU=({status:e,appContext:t,activeView:n,setActiveView:r,chatRef:i,setAppContext:a})=>{const{updateUIState:o}=O.useContext(ff),s=O.useMemo(()=>t.isAuthenticated&&t.isAuthorized,[t]),l=O.useMemo(()=>t.productStatus==="trialing"||t.product==="prod_free"||t.product==="prod_opensource",[t]),c=O.useMemo(()=>t.product==="prod_opensource"?"Sourcery for Open Source":"Sourcery Pro trial",[t]),u=O.useCallback(({data:f})=>{switch(f.command){case"chat/focus":r("chat");break;case"context/update":a(nt(d=>{d.status="ok",d.appContext={...d.appContext,...f.updates}}));break;case"uiState/load":o(f.updates),r(f.updates.selectedTab);break}},[o,r,a]);return O.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[u]),y.jsxs("main",{className:"flex h-full max-h-full flex-col overflow-y-hidden bg-ide-window-bg text-ide-text","data-testid":"app",children:[l&&y.jsxs(EU,{children:[y.jsx("span",{children:y.jsx(re.InfoCircle,{})}),y.jsx("span",{children:c}),y.jsx("span",{children:"-"}),y.jsx("a",{href:"https://app.sourcery.ai/dashboard/subscription?utm_source=ide_chat&utm_medium=banner&utm_campaign=open_source_upgrade",className:"cursor-pointer underline",children:"Upgrade Now"})]}),e==="pending"?y.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-8",children:[y.jsx(Tg,{}),y.jsx("p",{className:"italic",children:"Loading..."})]}):s?y.jsxs(y.Fragment,{children:[y.jsx(NU,{activeView:n,onSelect:f=>()=>{r(f),f==="chat"&&setTimeout(()=>{var d;return(d=i.current)==null?void 0:d.focus()},25)}}),y.jsx(H9,{className:Re(n==="chat"?"flex grow flex-col overflow-hidden":"hidden"),ref:i}),y.jsx(J9,{className:Re(n==="review"?"flex grow flex-col overflow-hidden":"hidden")})]}):y.jsx(xU,{})]})};Pd.createRoot(document.getElementById("root")).render(y.jsx(vn.StrictMode,{children:y.jsx(CU,{})}));
837
+ `)[0])||"",o=()=>{i(!r)};return y.jsx("div",{className:"flex flex-row justify-start",children:y.jsx("div",{className:Re("rounded-lg-bl-none mr-4 w-fit max-w-full rounded-tl-lg rounded-tr-lg px-4 py-2",e==="error"?"bg-ide-error-bg":"bg-ide-chat-input-bg"),children:n?y.jsxs("div",{children:[y.jsxs("div",{className:"flex cursor-pointer items-center gap-2 hover:opacity-80",onClick:o,children:[y.jsx(re.ChevronRight,{className:Re("transition-transform flex-shrink-0 mt-[2px]",{"rotate-90":!r})}),y.jsx("div",{children:a})]}),!r&&t&&y.jsx("div",{className:"mt-2",children:y.jsx(Ei,{markdown:t})})]}):t?y.jsx(Ei,{markdown:t}):y.jsx(xk,{})})})},K9=({diagrams:e})=>y.jsx("div",{className:"flex flex-row justify-start",children:y.jsx("div",{className:Re("rounded-lg-bl-none mr-4 rounded-tl-lg rounded-tr-lg px-4 py-2","bg-ide-chat-input-bg"),children:e.map((t,n)=>y.jsx("div",{children:y.jsx(_k,{chart:t.diagram,title:t.title})},n))})}),q9=({summary:e,follow_up_comment:t,file:n,location:r,diff_line_for_comment:i,area:a,comment_type:o,formatted_fix:s,formatted_diff_context:l,fix:c,resolved:u,outdated:f})=>{const[d,p]=O.useState(u);O.useEffect(()=>{p(u)},[u]);const m=O.useCallback(()=>{Ya({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:"apply",file:n,diff_line_for_comment:i,fix:c}})},[n,i,c]),g=()=>{p(!d)};return y.jsx("div",{className:"flex w-full flex-row justify-start",children:y.jsxs("div",{className:Re("rounded-lg-bl-none mr-4 w-full rounded-tl-lg rounded-tr-lg px-4 py-2","bg-ide-chat-input-bg","relative"),children:[f&&y.jsx("div",{className:Re("absolute right-2 top-2 rounded-full border border-ide-warning-bg bg-transparent px-2 py-0.5 text-xs text-ide-text",{"opacity-50":u}),children:"outdated"}),y.jsxs("div",{className:Re({"opacity-50":u}),children:[y.jsxs("div",{className:"flex items-center gap-2 pr-16",children:[y.jsx(re.ChevronRight,{className:Re("transition-transform flex-shrink-0 mt-[2px] cursor-pointer hover:opacity-80",{"rotate-90":!d}),onClick:g}),y.jsxs("div",{className:"relative grow overflow-hidden",children:[y.jsx("div",{className:"truncate",children:y.jsx(Ei,{markdown:r})}),y.jsx("div",{className:"pointer-events-none absolute right-0 top-0 h-full w-4 bg-gradient-to-r from-transparent via-transparent to-ide-chat-input-bg"})]})]}),y.jsx("div",{className:"mt-2 flex flex-row gap-2",children:y.jsxs("span",{className:"text-sm",children:[y.jsx("span",{className:"font-bold",children:o}),y.jsx("span",{children:"("}),y.jsx("span",{className:"italic",children:a}),y.jsx("span",{children:"): "}),y.jsx("span",{children:e})]})})]}),!d&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Re({"opacity-50":u}),children:[y.jsx(Ei,{markdown:l,hideCodeButtons:!0}),y.jsx(Ei,{markdown:t}),s&&y.jsxs("div",{className:"mt-2 border-t border-ide-border pt-2",children:[y.jsx("div",{className:"text-sm font-bold",children:"Suggested Fix:"}),y.jsx(Ei,{markdown:s,hideCodeButtons:u||f,onApplyFix:!u&&!f?m:void 0})]})]}),y.jsx("div",{className:"mt-2 flex flex-row justify-end",children:y.jsxs("button",{onClick:()=>Ya({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:u?"unresolved":"resolved",file:n,diff_line_for_comment:i}}),title:u?"Mark this comment as unresolved.":"Mark this comment as resolved.",className:"flex flex-row items-center gap-1 rounded-full border border-ide-border px-2 py-0.5 text-xs hover:opacity-80",children:[y.jsx(re.Check,{})," ",u?"Unresolve":"Resolve"]})})]})]})})},Y9=({summary:e,running:t})=>e&&e.textContent?y.jsx(Ea,{outcome:e.outcome,textContent:e.textContent,type:"text"}):t?y.jsx(Ea,{outcome:"success",textContent:"Generating detailed review - this might take a little while...",type:"text"}):null,Z9=()=>y.jsxs("button",{className:"flex flex-row gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),Ya({message:zS})},children:[y.jsx("span",{children:y.jsx(re.Plus,{})}),y.jsx("span",{children:"New Review"})]}),X9=({disabled:e})=>{const{uiState:t,updateUIState:n}=O.useContext(ff),r=O.useContext(df),[i,a]=O.useState(!1),[o,s]=O.useState(!1),l=O.useCallback(()=>{window.sourceryLS.postMessage({message:FS})},[]),c=O.useCallback(f=>{f.preventDefault(),s(!0),Ya({message:zS}),Ya({message:{target:"languageServer",view:"review",request:"review",comparisonType:t.selectedReviewOption,branch:t.selectedBranch}})},[t.selectedReviewOption,t.selectedBranch]);O.useEffect(()=>{e||s(!1)},[e]);const u=e||o;return y.jsxs("form",{className:"flex flex-col gap-2 p-2",onSubmit:c,children:[y.jsx("div",{className:"grow",children:y.jsx(G9,{disabled:u,isOpen:i,setIsOpen:a,selectedReviewOption:t.selectedReviewOption,selectedBranch:t.selectedBranch,updateUIState:n,isGitRepository:r.isGitRepository,branches:r.branches,onRefresh:l})}),y.jsx("button",{type:"submit",className:"btn-primary w-full border border-ide-border p-1",disabled:u,children:u?"Review in progress...":"Review My Code"})]})},Q9=()=>y.jsxs("div",{className:"mb-4 mt-1 flex flex-row items-center justify-start gap-2 text-sm font-bold text-ide-disabled-text",children:[y.jsx("span",{children:y.jsx(re.Cancel,{})}),y.jsx("span",{children:"Canceled"})]}),J9=({className:e})=>{const[{overview:t,change_summary:n,summary:r,diagram:i,comments:a,error:o,cancelled:s,running:l,running_detailed:c},u]=O.useState({overview:null,change_summary:null,summary:null,diagram:null,comments:[],error:null,cancelled:!1,running:!1,running_detailed:!1}),f=O.useRef(null),d=cE(f),p=O.useCallback(({data:m})=>{switch(m.command){case"review/addOverviewMessage":u(nt(g=>{g.running=!0,g.overview=m.message}));break;case"review/addChangeSummaryMessage":u(nt(g=>{g.change_summary?g.change_summary.textContent+=m.message.textContent:g.change_summary=m.message}));break;case"review/addSummaryMessage":u(nt(g=>{g.summary=m.message}));break;case"review/addCommentMessage":u(nt(g=>{g.comments.push(m.comment)}));break;case"review/addErrorMessage":u(nt(g=>{g.error=m.message}));break;case"review/clear":u(nt(()=>({overview:null,change_summary:null,summary:null,diagram:null,comments:[],error:null,cancelled:!1,running:!1,running_detailed:!1})));break;case"review/notifyCancel":u(nt(g=>{g.cancelled=!0}));break;case"review/notifyStreamingComplete":u(nt(g=>{g.running_detailed=!0}));break;case"review/notifyComplete":u(nt(g=>{g.running=!1,g.running_detailed=!1}));break;case"review/addDiagramMessage":u(nt(g=>{g.diagram=m.message}));break;case"review/updateComment":u(nt(g=>{const w=g.comments.findIndex(h=>h.comment.file.trim()===m.comment.comment.file.trim()&&h.comment.diff_line_for_comment===m.comment.comment.diff_line_for_comment);w!==-1&&(g.comments[w].comment=m.comment.comment)}));break}},[]);return O.useLayoutEffect(()=>{d()},[a.length,d]),O.useEffect(()=>(window.addEventListener("message",p),()=>window.removeEventListener("message",p)),[p]),y.jsxs("div",{className:e,"data-testid":"review-view",children:[y.jsx(X9,{disabled:l}),y.jsxs("section",{className:"flex grow flex-col gap-2 overflow-y-auto p-2",ref:f,children:[t&&y.jsx(y.Fragment,{children:y.jsx(Ea,{outcome:t.outcome,textContent:t.textContent,type:"text",collapsible:t.collapsible})}),n&&y.jsx(y.Fragment,{children:y.jsx(Ea,{outcome:n.outcome,textContent:n.textContent,type:"text"})}),t&&y.jsx(y.Fragment,{children:y.jsx(Y9,{summary:r,running:c})}),i&&y.jsx(K9,{diagrams:i.diagrams,type:"diagrams"}),a.map((m,g)=>y.jsx(q9,{...m.comment},g)),c&&y.jsx(Ea,{outcome:"success",textContent:"",type:"text"}),s&&y.jsx(Q9,{}),o&&y.jsx(Ea,{outcome:o.outcome,textContent:o.textContent,type:"text"})]}),y.jsx("footer",{className:Re(l?"flex flex-row justify-center border-t border-ide-border":"hidden"),children:y.jsxs("button",{className:"flex w-fit flex-row items-center gap-2 p-1 hover:enabled:opacity-80 disabled:text-ide-disabled-text",onClick:()=>Ya({message:uL}),children:[y.jsx(re.Cancel,{}),y.jsx("span",{children:"Cancel"})]})})]})},e7=""+new URL("sourcery-logo.svg",import.meta.url).href;var wb=function(t){return t.reduce(function(n,r){var i=r[0],a=r[1];return n[i]=a,n},{})},xb=typeof window<"u"&&window.document&&window.document.createElement?O.useLayoutEffect:O.useEffect,Nt="top",rn="bottom",an="right",Ct="left",Ag="auto",sl=[Nt,rn,an,Ct],Za="start",Us="end",t7="clippingParents",G2="viewport",So="popper",n7="reference",Eb=sl.reduce(function(e,t){return e.concat([t+"-"+Za,t+"-"+Us])},[]),K2=[].concat(sl,[Ag]).reduce(function(e,t){return e.concat([t,t+"-"+Za,t+"-"+Us])},[]),r7="beforeRead",i7="read",a7="afterRead",o7="beforeMain",s7="main",l7="afterMain",c7="beforeWrite",u7="write",f7="afterWrite",d7=[r7,i7,a7,o7,s7,l7,c7,u7,f7];function Bn(e){return e?(e.nodeName||"").toLowerCase():null}function $t(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ji(e){var t=$t(e).Element;return e instanceof t||e instanceof Element}function Jt(e){var t=$t(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Og(e){if(typeof ShadowRoot>"u")return!1;var t=$t(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function p7(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!Jt(a)||!Bn(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function h7(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=o.reduce(function(l,c){return l[c]="",l},{});!Jt(i)||!Bn(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const m7={name:"applyStyles",enabled:!0,phase:"write",fn:p7,effect:h7,requires:["computeStyles"]};function Fn(e){return e.split("-")[0]}var Ti=Math.max,mu=Math.min,Xa=Math.round;function Nh(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function q2(){return!/^((?!chrome|android).)*safari/i.test(Nh())}function Qa(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Jt(e)&&(i=e.offsetWidth>0&&Xa(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Xa(r.height)/e.offsetHeight||1);var o=ji(e)?$t(e):window,s=o.visualViewport,l=!q2()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,u=(r.top+(l&&s?s.offsetTop:0))/a,f=r.width/i,d=r.height/a;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c,x:c,y:u}}function Rg(e){var t=Qa(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Y2(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Og(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fr(e){return $t(e).getComputedStyle(e)}function g7(e){return["table","td","th"].indexOf(Bn(e))>=0}function ii(e){return((ji(e)?e.ownerDocument:e.document)||window.document).documentElement}function pf(e){return Bn(e)==="html"?e:e.assignedSlot||e.parentNode||(Og(e)?e.host:null)||ii(e)}function Sb(e){return!Jt(e)||fr(e).position==="fixed"?null:e.offsetParent}function y7(e){var t=/firefox/i.test(Nh()),n=/Trident/i.test(Nh());if(n&&Jt(e)){var r=fr(e);if(r.position==="fixed")return null}var i=pf(e);for(Og(i)&&(i=i.host);Jt(i)&&["html","body"].indexOf(Bn(i))<0;){var a=fr(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function ll(e){for(var t=$t(e),n=Sb(e);n&&g7(n)&&fr(n).position==="static";)n=Sb(n);return n&&(Bn(n)==="html"||Bn(n)==="body"&&fr(n).position==="static")?t:n||y7(e)||t}function Mg(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function es(e,t,n){return Ti(e,mu(t,n))}function v7(e,t,n){var r=es(e,t,n);return r>n?n:r}function Z2(){return{top:0,right:0,bottom:0,left:0}}function X2(e){return Object.assign({},Z2(),e)}function Q2(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var b7=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,X2(typeof t!="number"?t:Q2(t,sl))};function _7(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Fn(n.placement),l=Mg(s),c=[Ct,an].indexOf(s)>=0,u=c?"height":"width";if(!(!a||!o)){var f=b7(i.padding,n),d=Rg(a),p=l==="y"?Nt:Ct,m=l==="y"?rn:an,g=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],w=o[l]-n.rects.reference[l],h=ll(a),b=h?l==="y"?h.clientHeight||0:h.clientWidth||0:0,v=g/2-w/2,_=f[p],S=b-d[u]-f[m],x=b/2-d[u]/2+v,k=es(_,x,S),C=l;n.modifiersData[r]=(t={},t[C]=k,t.centerOffset=k-x,t)}}function w7(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Y2(t.elements.popper,i)&&(t.elements.arrow=i))}const x7={name:"arrow",enabled:!0,phase:"main",fn:_7,effect:w7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ja(e){return e.split("-")[1]}var E7={top:"auto",right:"auto",bottom:"auto",left:"auto"};function S7(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Xa(n*i)/i||0,y:Xa(r*i)/i||0}}function kb(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=o.x,p=d===void 0?0:d,m=o.y,g=m===void 0?0:m,w=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=w.x,g=w.y;var h=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),v=Ct,_=Nt,S=window;if(c){var x=ll(n),k="clientHeight",C="clientWidth";if(x===$t(n)&&(x=ii(n),fr(x).position!=="static"&&s==="absolute"&&(k="scrollHeight",C="scrollWidth")),x=x,i===Nt||(i===Ct||i===an)&&a===Us){_=rn;var A=f&&x===S&&S.visualViewport?S.visualViewport.height:x[k];g-=A-r.height,g*=l?1:-1}if(i===Ct||(i===Nt||i===rn)&&a===Us){v=an;var M=f&&x===S&&S.visualViewport?S.visualViewport.width:x[C];p-=M-r.width,p*=l?1:-1}}var I=Object.assign({position:s},c&&E7),F=u===!0?S7({x:p,y:g},$t(n)):{x:p,y:g};if(p=F.x,g=F.y,l){var H;return Object.assign({},I,(H={},H[_]=b?"0":"",H[v]=h?"0":"",H.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",H))}return Object.assign({},I,(t={},t[_]=b?g+"px":"",t[v]=h?p+"px":"",t.transform="",t))}function k7(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Fn(t.placement),variation:Ja(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,kb(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,kb(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const N7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:k7,data:{}};var Ql={passive:!0};function C7(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,l=$t(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(u){u.addEventListener("scroll",n.update,Ql)}),s&&l.addEventListener("resize",n.update,Ql),function(){a&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Ql)}),s&&l.removeEventListener("resize",n.update,Ql)}}const T7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:C7,data:{}};var A7={left:"right",right:"left",bottom:"top",top:"bottom"};function bc(e){return e.replace(/left|right|bottom|top/g,function(t){return A7[t]})}var O7={start:"end",end:"start"};function Nb(e){return e.replace(/start|end/g,function(t){return O7[t]})}function Ig(e){var t=$t(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Pg(e){return Qa(ii(e)).left+Ig(e).scrollLeft}function R7(e,t){var n=$t(e),r=ii(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var c=q2();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+Pg(e),y:l}}function M7(e){var t,n=ii(e),r=Ig(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Ti(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Ti(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Pg(e),l=-r.scrollTop;return fr(i||n).direction==="rtl"&&(s+=Ti(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function Dg(e){var t=fr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function J2(e){return["html","body","#document"].indexOf(Bn(e))>=0?e.ownerDocument.body:Jt(e)&&Dg(e)?e:J2(pf(e))}function ts(e,t){var n;t===void 0&&(t=[]);var r=J2(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=$t(r),o=i?[a].concat(a.visualViewport||[],Dg(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(ts(pf(o)))}function Ch(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function I7(e,t){var n=Qa(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Cb(e,t,n){return t===G2?Ch(R7(e,n)):ji(t)?I7(t,n):Ch(M7(ii(e)))}function P7(e){var t=ts(pf(e)),n=["absolute","fixed"].indexOf(fr(e).position)>=0,r=n&&Jt(e)?ll(e):e;return ji(r)?t.filter(function(i){return ji(i)&&Y2(i,r)&&Bn(i)!=="body"}):[]}function D7(e,t,n,r){var i=t==="clippingParents"?P7(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(l,c){var u=Cb(e,c,r);return l.top=Ti(u.top,l.top),l.right=mu(u.right,l.right),l.bottom=mu(u.bottom,l.bottom),l.left=Ti(u.left,l.left),l},Cb(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function eN(e){var t=e.reference,n=e.element,r=e.placement,i=r?Fn(r):null,a=r?Ja(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Nt:l={x:o,y:t.y-n.height};break;case rn:l={x:o,y:t.y+t.height};break;case an:l={x:t.x+t.width,y:s};break;case Ct:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?Mg(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(a){case Za:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Us:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function js(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,l=s===void 0?t7:s,c=n.rootBoundary,u=c===void 0?G2:c,f=n.elementContext,d=f===void 0?So:f,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,w=g===void 0?0:g,h=X2(typeof w!="number"?w:Q2(w,sl)),b=d===So?n7:So,v=e.rects.popper,_=e.elements[m?b:d],S=D7(ji(_)?_:_.contextElement||ii(e.elements.popper),l,u,o),x=Qa(e.elements.reference),k=eN({reference:x,element:v,strategy:"absolute",placement:i}),C=Ch(Object.assign({},v,k)),A=d===So?C:x,M={top:S.top-A.top+h.top,bottom:A.bottom-S.bottom+h.bottom,left:S.left-A.left+h.left,right:A.right-S.right+h.right},I=e.modifiersData.offset;if(d===So&&I){var F=I[i];Object.keys(M).forEach(function(H){var W=[an,rn].indexOf(H)>=0?1:-1,$=[Nt,rn].indexOf(H)>=0?"y":"x";M[H]+=F[$]*W})}return M}function L7(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?K2:l,u=Ja(r),f=u?s?Eb:Eb.filter(function(m){return Ja(m)===u}):sl,d=f.filter(function(m){return c.indexOf(m)>=0});d.length===0&&(d=f);var p=d.reduce(function(m,g){return m[g]=js(e,{placement:g,boundary:i,rootBoundary:a,padding:o})[Fn(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function F7(e){if(Fn(e)===Ag)return[];var t=bc(e);return[Nb(e),t,Nb(t)]}function z7(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,w=t.options.placement,h=Fn(w),b=h===w,v=l||(b||!m?[bc(w)]:F7(w)),_=[w].concat(v).reduce(function(le,se){return le.concat(Fn(se)===Ag?L7(t,{placement:se,boundary:u,rootBoundary:f,padding:c,flipVariations:m,allowedAutoPlacements:g}):se)},[]),S=t.rects.reference,x=t.rects.popper,k=new Map,C=!0,A=_[0],M=0;M<_.length;M++){var I=_[M],F=Fn(I),H=Ja(I)===Za,W=[Nt,rn].indexOf(F)>=0,$=W?"width":"height",X=js(t,{placement:I,boundary:u,rootBoundary:f,altBoundary:d,padding:c}),D=W?H?an:Ct:H?rn:Nt;S[$]>x[$]&&(D=bc(D));var R=bc(D),L=[];if(a&&L.push(X[F]<=0),s&&L.push(X[D]<=0,X[R]<=0),L.every(function(le){return le})){A=I,C=!1;break}k.set(I,L)}if(C)for(var E=m?3:1,z=function(se){var Q=_.find(function(Te){var Me=k.get(Te);if(Me)return Me.slice(0,se).every(function(ie){return ie})});if(Q)return A=Q,"break"},q=E;q>0;q--){var N=z(q);if(N==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const B7={name:"flip",enabled:!0,phase:"main",fn:z7,requiresIfExists:["offset"],data:{_skip:!1}};function Tb(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ab(e){return[Nt,an,rn,Ct].some(function(t){return e[t]>=0})}function U7(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=js(t,{elementContext:"reference"}),s=js(t,{altBoundary:!0}),l=Tb(o,r),c=Tb(s,i,a),u=Ab(l),f=Ab(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const j7={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:U7};function $7(e,t,n){var r=Fn(e),i=[Ct,Nt].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Ct,an].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function V7(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=K2.reduce(function(u,f){return u[f]=$7(f,t.rects,a),u},{}),s=o[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}const H7={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:V7};function W7(e){var t=e.state,n=e.name;t.modifiersData[n]=eN({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const G7={name:"popperOffsets",enabled:!0,phase:"read",fn:W7,data:{}};function K7(e){return e==="x"?"y":"x"}function q7(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,d=n.tether,p=d===void 0?!0:d,m=n.tetherOffset,g=m===void 0?0:m,w=js(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),h=Fn(t.placement),b=Ja(t.placement),v=!b,_=Mg(h),S=K7(_),x=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,M=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(x){if(a){var H,W=_==="y"?Nt:Ct,$=_==="y"?rn:an,X=_==="y"?"height":"width",D=x[_],R=D+w[W],L=D-w[$],E=p?-C[X]/2:0,z=b===Za?k[X]:C[X],q=b===Za?-C[X]:-k[X],N=t.elements.arrow,le=p&&N?Rg(N):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Z2(),Q=se[W],Te=se[$],Me=es(0,k[X],le[X]),ie=v?k[X]/2-E-Me-Q-M.mainAxis:z-Me-Q-M.mainAxis,Ze=v?-k[X]/2+E+Me+Te+M.mainAxis:q+Me+Te+M.mainAxis,Ve=t.elements.arrow&&ll(t.elements.arrow),cn=Ve?_==="y"?Ve.clientTop||0:Ve.clientLeft||0:0,jn=(H=I==null?void 0:I[_])!=null?H:0,hr=D+ie-jn-cn,Xi=D+Ze-jn,at=es(p?mu(R,hr):R,D,p?Ti(L,Xi):L);x[_]=at,F[_]=at-D}if(s){var ai,mr=_==="x"?Nt:Ct,ee=_==="x"?rn:an,At=x[S],we=S==="y"?"height":"width",me=At+w[mr],$n=At-w[ee],Ot=[Nt,Ct].indexOf(h)!==-1,gr=(ai=I==null?void 0:I[S])!=null?ai:0,yr=Ot?me:At-k[we]-C[we]-gr+M.altAxis,T=Ot?At+k[we]+C[we]-gr-M.altAxis:$n,P=p&&Ot?v7(yr,At,T):es(p?yr:me,At,p?T:$n);x[S]=P,F[S]=P-At}t.modifiersData[r]=F}}const Y7={name:"preventOverflow",enabled:!0,phase:"main",fn:q7,requiresIfExists:["offset"]};function Z7(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function X7(e){return e===$t(e)||!Jt(e)?Ig(e):Z7(e)}function Q7(e){var t=e.getBoundingClientRect(),n=Xa(t.width)/e.offsetWidth||1,r=Xa(t.height)/e.offsetHeight||1;return n!==1||r!==1}function J7(e,t,n){n===void 0&&(n=!1);var r=Jt(t),i=Jt(t)&&Q7(t),a=ii(t),o=Qa(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Bn(t)!=="body"||Dg(a))&&(s=X7(t)),Jt(t)?(l=Qa(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Pg(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function eU(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function tU(e){var t=eU(e);return d7.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function nU(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function rU(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ob={placement:"bottom",modifiers:[],strategy:"absolute"};function Rb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function iU(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Ob:i;return function(s,l,c){c===void 0&&(c=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ob,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],d=!1,p={state:u,setOptions:function(h){var b=typeof h=="function"?h(u.options):h;g(),u.options=Object.assign({},a,u.options,b),u.scrollParents={reference:ji(s)?ts(s):s.contextElement?ts(s.contextElement):[],popper:ts(l)};var v=tU(rU([].concat(r,u.options.modifiers)));return u.orderedModifiers=v.filter(function(_){return _.enabled}),m(),p.update()},forceUpdate:function(){if(!d){var h=u.elements,b=h.reference,v=h.popper;if(Rb(b,v)){u.rects={reference:J7(b,ll(v),u.options.strategy==="fixed"),popper:Rg(v)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(M){return u.modifiersData[M.name]=Object.assign({},M.data)});for(var _=0;_<u.orderedModifiers.length;_++){if(u.reset===!0){u.reset=!1,_=-1;continue}var S=u.orderedModifiers[_],x=S.fn,k=S.options,C=k===void 0?{}:k,A=S.name;typeof x=="function"&&(u=x({state:u,options:C,name:A,instance:p})||u)}}}},update:nU(function(){return new Promise(function(w){p.forceUpdate(),w(u)})}),destroy:function(){g(),d=!0}};if(!Rb(s,l))return p;p.setOptions(c).then(function(w){!d&&c.onFirstUpdate&&c.onFirstUpdate(w)});function m(){u.orderedModifiers.forEach(function(w){var h=w.name,b=w.options,v=b===void 0?{}:b,_=w.effect;if(typeof _=="function"){var S=_({state:u,name:h,instance:p,options:v}),x=function(){};f.push(S||x)}})}function g(){f.forEach(function(w){return w()}),f=[]}return p}}var aU=[T7,G7,N7,m7,H7,B7,Y7,x7,j7],oU=iU({defaultModifiers:aU}),sU=typeof Element<"u",lU=typeof Map=="function",cU=typeof Set=="function",uU=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function _c(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!_c(e[r],t[r]))return!1;return!0}var a;if(lU&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;for(a=e.entries();!(r=a.next()).done;)if(!_c(r.value[1],t.get(r.value[0])))return!1;return!0}if(cU&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(uU&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(sU&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!_c(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var fU=function(t,n){try{return _c(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const dU=Un(fU);var pU=[],hU=function(t,n,r){r===void 0&&(r={});var i=O.useRef(null),a={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||pU},o=O.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=o[0],l=o[1],c=O.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(p){var m=p.state,g=Object.keys(m.elements);Ww.flushSync(function(){l({styles:wb(g.map(function(w){return[w,m.styles[w]||{}]})),attributes:wb(g.map(function(w){return[w,m.attributes[w]]}))})})},requires:["computeStyles"]}},[]),u=O.useMemo(function(){var d={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[c,{name:"applyStyles",enabled:!1}])};return dU(i.current,d)?i.current||d:(i.current=d,d)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,c]),f=O.useRef();return xb(function(){f.current&&f.current.setOptions(u)},[u]),xb(function(){if(!(t==null||n==null)){var d=r.createPopper||oU,p=d(t,n,u);return f.current=p,function(){p.destroy(),f.current=null}}},[t,n,r.createPopper]),{state:f.current?f.current.state:null,styles:s.styles,attributes:s.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}};function mU(e,t){O.useEffect(()=>{const n=r=>{e&&r&&r.target instanceof Element&&!e.contains(r.target)&&t()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,t])}const gU=({inputProps:e,icon:t,iconProps:n})=>y.jsx("div",{className:"relative w-full",children:y.jsxs("div",{className:"flex flex-row items-center",children:[y.jsx("input",{type:"text",placeholder:"Search for a rule...",className:"w-full rounded bg-ide-chat-input-bg p-2 pr-10 text-ide-chat-input-text",...e}),t&&y.jsx("i",{className:`${t} absolute right-3 top-3`,...n})]})}),yU=[{ruleGroup:{title:"Default",name:"default",description:"Rules bundled with Sourcery which are enabled by default.",filterFunction:({rule:e})=>e.tags.includes("default")}}],vU=["refactoring","default"],bU=({ruleGroup:{title:e,filterFunction:t,description:n},rules:r,searchTerm:i,projectConfig:a})=>{const[o,s]=O.useState(!0),l=o||i,{enabledRules:c,filteredRules:u}=O.useMemo(()=>{const f=r.filter(w=>!a.refactor.skip.includes(w.rule.id)),g=r.filter(t).filter(({rule:w})=>w.id.toLowerCase().includes(i.toLowerCase())).reduce((w,h)=>(w.find(v=>v.rule.id===h.rule.id)||w.push(h),w),[]).sort((w,h)=>w.rule.id.localeCompare(h.rule.id));return{enabledRules:f,filteredRules:g}},[r,a.refactor.skip,t,i]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex cursor-pointer flex-row items-center justify-between border border-transparent border-b-ide-border bg-ide-chat-input-bg p-5 hover:border-ide-border",onClick:()=>s(!o),children:[y.jsxs("div",{className:"flex flex-col gap-3",children:[y.jsxs("div",{className:"flex flex-row gap-4",children:[y.jsx("span",{className:"font-bold text-ide-text",children:e}),!i&&y.jsxs("span",{className:"text-ide-disabled-text",children:["(click to ",l?"collapse":"expand",")"]})]}),y.jsxs("p",{className:"text-ide-text",children:[c.length," of ",r.length," enabled"]}),y.jsx("p",{className:"text-ide-disabled-text",children:n})]}),!i&&y.jsx(re.ChevronDown,{className:Re("mr-4 transition-transform",l&&"rotate-180")})]}),l&&y.jsx("ol",{className:"ml-6 flex flex-col divide-y divide-ide-border",children:u.map(({rule:f})=>y.jsx("li",{children:y.jsx(_U,{rule:f,projectConfig:a})},f.id))})]})},_U=({rule:e,projectConfig:t})=>{const n=!t.refactor.skip.includes(e.id),r=async()=>{window.sourceryLS.postMessage({message:{target:"languageServer",view:"rules",request:"toggleRule",ruleId:e.id,enabled:!n}})};return y.jsxs("div",{className:"flex flex-row justify-between px-5 pb-4 pt-5 hover:bg-ide-chat-input-bg",children:[y.jsxs("div",{className:"flex flex-col",children:[y.jsx("label",{htmlFor:e.id,className:"cursor-pointer font-mono text-ide-text",children:y.jsx("div",{className:"flex flex-row items-center gap-5",children:y.jsx("span",{children:e.id})})}),y.jsx("p",{className:"text-xs text-ide-disabled-text",children:y.jsx("a",{href:`https://docs.sourcery.ai/Reference/Python/Default-Rules/${e.id}/`,className:"hover:text-ide-highlight",target:"_blank",rel:"noopener noreferrer",children:"View docs"})}),y.jsx("div",{className:"-ml-3 mt-3",children:e.tags.filter(i=>!vU.includes(i)).map(i=>y.jsx("span",{className:"mr-3 rounded-full bg-ide-chat-input-bg px-4 py-2 text-xs text-ide-text",children:i},i))})]}),y.jsx("button",{onClick:r,className:"flex items-center justify-center",children:n?y.jsx(re.SquareCheck,{className:"text-ide-highlight"}):y.jsx(re.Square,{})})]})},wU=({onClose:e})=>{const[t,n]=O.useState(""),[r,i]=O.useState([]),[a,o]=O.useState({refactor:{skip:[]}}),s=O.useCallback(({data:l})=>{if(l.command)switch(l.command){case"rules/update":i(l.rules);break;case"rules/configUpdate":o(l.config);break}},[]);return O.useEffect(()=>(window.addEventListener("message",s),window.sourceryLS.postMessage({message:{target:"languageServer",view:"rules",request:"getRules"}}),()=>window.removeEventListener("message",s)),[s]),y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:y.jsxs("div",{className:"relative max-h-[90vh] w-[90vw] max-w-4xl overflow-y-auto rounded-lg bg-ide-window-bg p-6 shadow-xl",children:[y.jsx("button",{onClick:e,className:"absolute right-4 top-4 text-ide-text hover:opacity-80",children:y.jsx(re.Cross,{})}),y.jsx("h1",{className:"text-3xl text-ide-text",children:"Rules"}),y.jsxs("p",{className:"mt-5 border-b-[2px] border-ide-border pb-5 text-ide-text opacity-80",children:["Use this section to toggle rules on or off for your project. Note that these controls edit your project's"," ",y.jsx("span",{className:"font-mono",children:".sourcery.yaml"})," file."]}),y.jsx("div",{className:"mt-4",children:y.jsx(gU,{inputProps:{value:t,onChange:({target:{value:l}})=>n(l),placeholder:"Search rules..."},icon:t?"mi-close cursor-pointer":"mi-filter-alt",iconProps:{onClick:t?()=>n(""):void 0}})}),y.jsx("ol",{className:"mt-6",children:yU.map(({ruleGroup:l})=>y.jsx("li",{children:y.jsx(bU,{ruleGroup:l,rules:r,searchTerm:t,projectConfig:a})},l.name))})]})})},li=({message:e})=>{window.sourceryLS.postMessage({message:e})},tN=({text:e=!0,popperOptions:t={placement:"bottom-start"}})=>{const[n,r]=O.useState(!1),i=O.useCallback(()=>r(()=>!0),[]),a=O.useCallback(()=>r(()=>!1),[]),[o,s]=O.useState(null),[l,c]=O.useState(null),{styles:u,attributes:f}=hU(o,l,t);mU(l,a);const{showCodeLens:d,suggestFixes:p,isJetBrains:m}=O.useContext(df),g=O.useCallback(()=>{li(d?{message:dL}:{message:fL})},[d]),w=O.useCallback(()=>{li(p?{message:hL}:{message:pL})},[p]),h=O.useCallback(()=>{li({message:gL})},[]),b=O.useCallback(()=>{li({message:yL})},[]),[v,_]=O.useState(!1),S=O.useCallback(()=>{a(),_(!0)},[a]),x=O.useCallback(()=>{li({message:mL})},[]);return y.jsxs(y.Fragment,{children:[y.jsxs("button",{type:"button",ref:s,onClick:i,className:Re("px-2 py-1 -my-[2px] hover:opacity-80 border flex flex-row items-center gap-1",n?"border-ide-primary-btn-bg rounded-t-sm":"border-transparent"),children:[y.jsx(re.Cog,{}),e&&y.jsx("span",{children:"Settings"})]}),y.jsxs("div",{ref:c,style:u.popper,...f.popper,className:Re(n?"block":"hidden","bg-ide-chat-input-bg mt-1 px-1.5 py-1 z-10 rounded-sm min-w-[200px] border border-ide-border shadow-lg flex flex-col"),children:[y.jsx("button",{onClick:g,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[d?y.jsx(re.SquareCheck,{className:"text-ide-highlight"}):y.jsx(re.Square,{}),y.jsx("span",{children:"Show Code Lenses"})]})}),!m&&y.jsx("button",{onClick:w,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[p?y.jsx(re.SquareCheck,{className:"text-ide-highlight"}):y.jsx(re.Square,{}),y.jsx("span",{children:"Suggest AI Fixes"})]})}),y.jsx("hr",{className:"my-1.5 text-ide-border"}),y.jsx("button",{onClick:x,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[y.jsx(re.User,{}),y.jsx("span",{children:"Manage Account"})]})}),y.jsx("button",{onClick:S,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[y.jsx(re.Cog,{}),y.jsx("span",{children:"Rule Settings"})]})}),y.jsx("button",{onClick:h,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[y.jsx(re.Book,{}),y.jsx("span",{children:"Documentation"})]})}),y.jsx("button",{onClick:b,className:"hover:opacity-80",children:y.jsxs("div",{className:"flex flex-row items-center gap-2",children:[y.jsx(re.Comment,{}),y.jsx("span",{children:"Feedback & Suggestions"})]})})]}),v&&y.jsx(wU,{onClose:()=>_(!1)})]})},ko=({message:e})=>{window.sourceryLS.postMessage({message:e})},xU=()=>{const{productName:e,isConfigEnabled:t,isAuthenticated:n,isAuthorized:r}=O.useContext(df),i=O.useCallback(()=>{ko({message:rL})},[]),a=O.useCallback(()=>{ko({message:eL})},[]),o=O.useCallback(()=>{ko({message:tL})},[]),s=O.useCallback(()=>{ko({message:nL})},[]);return O.useEffect(()=>{ko({message:iL})},[]),y.jsxs("section",{id:"access-details",className:"flex flex-col divide-y divide-ide-border overflow-y-auto px-4","data-testid":"access-details-view",children:[y.jsxs("div",{className:"my-4 -ml-1 flex flex-row items-center justify-between",children:[y.jsxs("div",{className:"flex flex-row items-center gap-[10px]",children:[y.jsx("div",{className:"h-8 w-8",children:y.jsx("img",{src:e7,alt:"Sourcery's Logo"})}),y.jsxs("h1",{className:"font-bold",children:["Sourcery ",e]})]}),y.jsx(tN,{popperOptions:{placement:"bottom-end"}})]}),t?n?!r&&y.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[y.jsx("h6",{className:"mt-2 text-2xl font-bold text-ide-text",children:"Upgrade to Pro"}),y.jsx("p",{className:"text-sm text-ide-disabled-text",children:"Use all of Sourcery's features on private repositories"}),y.jsxs("ul",{className:"list-disc space-y-2 py-2 pl-5 text-sm text-ide-text",children:[y.jsx("li",{children:"Instant code reviews"}),y.jsx("li",{children:"Unlimited AI chat interactions"}),y.jsx("li",{children:"Real-time code analysis and refactoring"}),y.jsx("li",{children:"Customisable recipes - generate docstrings, diagrams and tests exactly how you need them"})]}),y.jsxs("div",{className:"mt-2 flex flex-col gap-3",children:[y.jsx("button",{onClick:o,className:"btn-primary px-6 py-2.5 text-base font-bold transition-opacity hover:opacity-90",children:"Upgrade to Pro"}),y.jsx("button",{className:"text-sm text-ide-disabled-text transition-colors hover:text-ide-text",onClick:s,children:"Already upgraded? Refresh status"})]}),y.jsxs("span",{className:"mt-2 text-sm",children:["Have questions? ",y.jsx("a",{href:"https://docs.sourcery.ai/Coding-Assistant/Product/Troubleshooting/#what-do-i-do-if-i-see-the-project-disabled-for-account-screen",className:"cursor-pointer underline transition-colors hover:text-ide-text",children:"Resolve issues"})," or ",y.jsx("a",{href:"https://sourcery.ai/pricing/",className:"cursor-pointer underline transition-colors hover:text-ide-text",children:"learn more"}),"."]})]}):y.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[y.jsx("h6",{className:"mt-2 text-2xl font-bold text-ide-text",children:"Log in to start using Sourcery"}),y.jsx("p",{className:"text-sm text-ide-disabled-text",children:"Discover what Sourcery can do for you:"}),y.jsxs("ul",{className:"list-disc space-y-2 py-2 pl-5 text-sm text-ide-text",children:[y.jsx("li",{children:"Instant code reviews"}),y.jsx("li",{children:"Unlimited AI chat interactions"}),y.jsx("li",{children:"Real-time code analysis and refactoring"}),y.jsx("li",{children:"Customisable recipes - generate docstrings, diagrams and tests exactly how you need them"})]}),y.jsxs("div",{className:"mt-2 flex flex-col gap-3",children:[y.jsx("button",{className:"btn-primary px-6 py-2.5 text-base font-bold transition-opacity hover:opacity-90",onClick:i,children:"Log In"}),y.jsx("button",{className:"text-sm text-ide-disabled-text transition-colors hover:text-ide-text",onClick:s,children:"Already logged in? Refresh status"})]}),y.jsxs("span",{className:"mt-2 text-sm",children:["Have questions? ",y.jsx("a",{href:"mailto:support@sourcery.ai",className:"cursor-pointer underline transition-colors hover:text-ide-text",children:"Contact us"})," or ",y.jsx("a",{href:"https://sourcery.ai/pricing/",className:"cursor-pointer underline transition-colors hover:text-ide-text",children:"learn more"}),"."]})]}):y.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[y.jsx("h6",{className:"mt-2 text-xl",children:"Opt in to enable Sourcery coding assistant"}),y.jsx("p",{className:"text-sm",children:"Sourcery works with large language model providers (including OpenAI and Anthropic) to help us review and improve your code. By enabling the Sourcery coding assistant you agree to let us send code snippets to them as necessary."}),y.jsx("div",{className:"flex flex-row gap-4",children:y.jsx("button",{className:"btn-primary px-3 py-1 font-bold",onClick:a,children:"Opt In"})})]})]})},EU=({intent:e="info",children:t})=>y.jsx("div",{className:Re("flex flex-row gap-2 px-4 py-1 border-b border-ide-border",e==="error"&&"text-ide-error-text bg-ide-error-bg"),children:t});function SU({children:e}){const[t,n]=O.useState(H2),r=i=>{n(a=>({...a,...i}))};return O.useEffect(()=>{window.sourceryLS.postMessage({message:{...aL,updates:t}})},[t]),y.jsx(ff.Provider,{value:{uiState:t,updateUIState:r},children:e})}window.sourceryLS=window.sourceryLS||{};const kU=({message:e})=>{window.sourceryLS.postMessage({message:e})},NU=({activeView:e,onSelect:t})=>{const{updateUIState:n}=O.useContext(ff),r=i=>a=>{n==null||n({selectedTab:i}),t(i)(a)};return y.jsxs("div",{className:"flex flex-row flex-wrap items-center justify-between",children:[y.jsxs("div",{className:"flex grow flex-row flex-wrap gap-2 border-b border-ide-border px-2",children:[y.jsx("button",{className:Re("px-2 py-2 font-bold",e==="review"?"border-b-2 border-ide-border opacity-100":"opacity-50 hover:opacity-100"),onClick:r("review"),children:"Review"}),y.jsx("button",{className:Re("px-2 py-2 font-bold",e==="chat"?"border-b-2 border-ide-border opacity-100":"opacity-50 hover:opacity-100"),onClick:r("chat"),children:"Chat"})]}),y.jsxs("div",{className:"flex grow flex-row items-baseline justify-end gap-4 border-b border-ide-border p-2",children:[e==="chat"?y.jsx(V9,{}):e==="review"?y.jsx(Z9,{}):null,y.jsx(tN,{text:!1,popperOptions:{placement:"bottom-end"}})]})]})},CU=()=>{const[{status:e,appContext:t},n]=O.useState({status:"pending",appContext:W2}),[r,i]=O.useState("chat"),a=O.useRef(null);return O.useEffect(()=>{kU({message:FS})},[]),y.jsx(SU,{children:y.jsx(W9,{value:t,children:y.jsx(TU,{status:e,appContext:t,activeView:r,setActiveView:i,chatRef:a,setAppContext:n})})})},TU=({status:e,appContext:t,activeView:n,setActiveView:r,chatRef:i,setAppContext:a})=>{const{updateUIState:o}=O.useContext(ff),s=O.useMemo(()=>t.isAuthenticated&&t.isAuthorized,[t]),l=O.useMemo(()=>t.productStatus==="trialing"||t.product==="prod_free"||t.product==="prod_opensource",[t]),c=O.useMemo(()=>t.product==="prod_opensource"?"Sourcery for Open Source":"Sourcery Pro trial",[t]),u=O.useCallback(({data:f})=>{switch(f.command){case"chat/focus":r("chat");break;case"context/update":a(nt(d=>{d.status="ok",d.appContext={...d.appContext,...f.updates}}));break;case"uiState/load":o(f.updates),r(f.updates.selectedTab);break}},[o,r,a]);return O.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[u]),y.jsxs("main",{className:"flex h-full max-h-full flex-col overflow-y-hidden bg-ide-window-bg text-ide-text","data-testid":"app",children:[l&&y.jsxs(EU,{children:[y.jsx("span",{children:y.jsx(re.InfoCircle,{})}),y.jsx("span",{children:c}),y.jsx("span",{children:"-"}),y.jsx("a",{href:"https://app.sourcery.ai/dashboard/subscription?utm_source=ide_chat&utm_medium=banner&utm_campaign=open_source_upgrade",className:"cursor-pointer underline",children:"Upgrade Now"})]}),e==="pending"?y.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-8",children:[y.jsx(Tg,{}),y.jsx("p",{className:"italic",children:"Loading..."})]}):s?y.jsxs(y.Fragment,{children:[y.jsx(NU,{activeView:n,onSelect:f=>()=>{r(f),f==="chat"&&setTimeout(()=>{var d;return(d=i.current)==null?void 0:d.focus()},25)}}),y.jsx(H9,{className:Re(n==="chat"?"flex grow flex-col overflow-hidden":"hidden"),ref:i}),y.jsx(J9,{className:Re(n==="review"?"flex grow flex-col overflow-hidden":"hidden")})]}):y.jsx(xU,{})]})};Pd.createRoot(document.getElementById("root")).render(y.jsx(vn.StrictMode,{children:y.jsx(CU,{})}));