sourcery-nightly 1.14.1b26__py2.py3-none-macosx_10_9_universal2.whl → 1.14.1b27__py2.py3-none-macosx_10_9_universal2.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 (256) hide show
  1. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/coding-assistant-app/dist/assets/index.js +1 -1
  2. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/grpc/_cython/cygrpc.so +0 -0
  3. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/sourcery +0 -0
  4. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/sqlalchemy/cprocessors.so +0 -0
  5. {sourcery_nightly-1.14.1b26.dist-info → sourcery_nightly-1.14.1b27.dist-info}/METADATA +2 -2
  6. {sourcery_nightly-1.14.1b26.dist-info → sourcery_nightly-1.14.1b27.dist-info}/RECORD +256 -256
  7. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_asyncio.so +0 -0
  8. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_blake2.so +0 -0
  9. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_bz2.so +0 -0
  10. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_cffi_backend.so +0 -0
  11. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_codecs_cn.so +0 -0
  12. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_codecs_hk.so +0 -0
  13. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_codecs_iso2022.so +0 -0
  14. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_codecs_jp.so +0 -0
  15. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_codecs_kr.so +0 -0
  16. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_codecs_tw.so +0 -0
  17. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_contextvars.so +0 -0
  18. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_csv.so +0 -0
  19. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_ctypes.so +0 -0
  20. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_datetime.so +0 -0
  21. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_decimal.so +0 -0
  22. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_hashlib.so +0 -0
  23. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_heapq.so +0 -0
  24. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_lzma.so +0 -0
  25. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_md5.so +0 -0
  26. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_multibytecodec.so +0 -0
  27. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_multiprocessing.so +0 -0
  28. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_opcode.so +0 -0
  29. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_pickle.so +0 -0
  30. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_posixshmem.so +0 -0
  31. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_posixsubprocess.so +0 -0
  32. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_queue.so +0 -0
  33. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_random.so +0 -0
  34. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_ruamel_yaml.so +0 -0
  35. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_scproxy.so +0 -0
  36. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_sha1.so +0 -0
  37. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_sha256.so +0 -0
  38. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_sha3.so +0 -0
  39. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_sha512.so +0 -0
  40. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_socket.so +0 -0
  41. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_sqlite3.so +0 -0
  42. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_ssl.so +0 -0
  43. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_statistics.so +0 -0
  44. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_struct.so +0 -0
  45. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/_uuid.so +0 -0
  46. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/annoy/annoylib.so +0 -0
  47. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/array.so +0 -0
  48. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/binascii.so +0 -0
  49. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/_width_table.so +0 -0
  50. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/brackets.so +0 -0
  51. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/cache.so +0 -0
  52. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/comments.so +0 -0
  53. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/const.so +0 -0
  54. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/handle_ipynb_magics.so +0 -0
  55. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/linegen.so +0 -0
  56. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/lines.so +0 -0
  57. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/mode.so +0 -0
  58. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/nodes.so +0 -0
  59. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/numerics.so +0 -0
  60. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/parsing.so +0 -0
  61. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/ranges.so +0 -0
  62. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/rusty.so +0 -0
  63. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/strings.so +0 -0
  64. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/black/trans.so +0 -0
  65. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/Grammar.txt +0 -0
  66. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/LICENSE +0 -0
  67. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/PatternGrammar.txt +0 -0
  68. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/README +0 -0
  69. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/pgen2/driver.so +0 -0
  70. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/pgen2/grammar.so +0 -0
  71. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/pgen2/parse.so +0 -0
  72. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/pgen2/pgen.so +0 -0
  73. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/pgen2/token.so +0 -0
  74. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/pgen2/tokenize.so +0 -0
  75. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/pygram.so +0 -0
  76. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/blib2to3/pytree.so +0 -0
  77. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/certifi/cacert.pem +0 -0
  78. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/charset_normalizer/md.so +0 -0
  79. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/charset_normalizer/md__mypyc.so +0 -0
  80. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/coding-assistant-app/dist/assets/index.css +0 -0
  81. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/coding-assistant-app/dist/assets/sourcery-logo.svg +0 -0
  82. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/cryptography/hazmat/bindings/_openssl.so +0 -0
  83. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/cryptography/hazmat/bindings/_rust.so +0 -0
  84. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/fcntl.so +0 -0
  85. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/google/_upb/_message.so +0 -0
  86. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/greenlet/_greenlet.so +0 -0
  87. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/grp.so +0 -0
  88. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/grpc/_cython/_credentials/roots.pem +0 -0
  89. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/MessinaSansMonoWeb-Bold.woff +0 -0
  90. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/MessinaSansMonoWeb-Regular.woff +0 -0
  91. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/MessinaSansWeb-Bold.woff +0 -0
  92. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/MessinaSansWeb-Regular.woff +0 -0
  93. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/asset-manifest.json +0 -0
  94. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/favicon.png +0 -0
  95. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/index.html +0 -0
  96. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/input.css +0 -0
  97. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/manifest.json +0 -0
  98. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/output.css +0 -0
  99. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/robots.txt +0 -0
  100. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/css/main.9e584365.css +0 -0
  101. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/css/main.9e584365.css.map +0 -0
  102. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/js/main.555ddc19.js +0 -0
  103. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/js/main.555ddc19.js.LICENSE.txt +0 -0
  104. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/js/main.555ddc19.js.map +0 -0
  105. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/icons.07ed0b60c13965581675.woff +0 -0
  106. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/icons.33055a2699783178df55.svg +0 -0
  107. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/icons.e3d35e8153c5ffaa069f.eot +0 -0
  108. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/icons.f39232cd335dc12e7d4f.woff2 +0 -0
  109. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/icons.fdecd2d880938cae502a.ttf +0 -0
  110. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/javascript-original.c02fa242f9adac6e8c19870162a2ad9a.svg +0 -0
  111. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/lower-bg.312ebfbac07089329e13.svg +0 -0
  112. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/python-original.849d0b2b5f1ec20f077dd267498bd536.svg +0 -0
  113. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/simple-bg.3f2e16f66d799c5d8fec.svg +0 -0
  114. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/sourcery-logo.4e35db02109ca9de8958eb231adec7ad.svg +0 -0
  115. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/hub/static/static/media/typescript-original.6f6ff3a7becc7dc75db25af287f0e596.svg +0 -0
  116. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/languages.so +0 -0
  117. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/lib2to3/Grammar.txt +0 -0
  118. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/lib2to3/Grammar3.10.8.final.0.pickle +0 -0
  119. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/lib2to3/PatternGrammar.txt +0 -0
  120. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/lib2to3/PatternGrammar3.10.8.final.0.pickle +0 -0
  121. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/lib2to3/tests/data/README +0 -0
  122. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libbz2.dylib +0 -0
  123. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libc++.1.dylib +0 -0
  124. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libcrypto.1.1.dylib +0 -0
  125. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libffi.8.dylib +0 -0
  126. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/liblzma.5.dylib +0 -0
  127. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libncursesw.6.dylib +0 -0
  128. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libpython3.10.dylib +0 -0
  129. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libreadline.8.dylib +0 -0
  130. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libsqlite3.0.dylib +0 -0
  131. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libssl.1.1.dylib +0 -0
  132. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libtinfow.6.dylib +0 -0
  133. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/libz.1.dylib +0 -0
  134. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/markupsafe/_speedups.so +0 -0
  135. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/math.so +0 -0
  136. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/mmap.so +0 -0
  137. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/private_rules/refactorings/identity-comprehension.yaml +0 -0
  138. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/private_rules/refactorings/list-literal.yaml +0 -0
  139. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/public_rules/LICENSE +0 -0
  140. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/public_rules/README.md +0 -0
  141. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/public_rules/google-python-style-guide.yaml +0 -0
  142. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/public_rules/remove-debugging-statements.yaml +0 -0
  143. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/public_rules/use-fstring.yaml +0 -0
  144. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/annotated_types.so +0 -0
  145. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/class_validators.so +0 -0
  146. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/color.so +0 -0
  147. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/config.so +0 -0
  148. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/dataclasses.so +0 -0
  149. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/datetime_parse.so +0 -0
  150. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/decorator.so +0 -0
  151. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/env_settings.so +0 -0
  152. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/error_wrappers.so +0 -0
  153. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/errors.so +0 -0
  154. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/fields.so +0 -0
  155. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/json.so +0 -0
  156. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/main.so +0 -0
  157. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/mypy.so +0 -0
  158. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/networks.so +0 -0
  159. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/parse.so +0 -0
  160. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/schema.so +0 -0
  161. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/tools.so +0 -0
  162. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/types.so +0 -0
  163. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/typing.so +0 -0
  164. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/utils.so +0 -0
  165. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/validators.so +0 -0
  166. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pydantic/version.so +0 -0
  167. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pyexpat.so +0 -0
  168. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/pysolvers.so +0 -0
  169. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/readline.so +0 -0
  170. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/regex/_regex.so +0 -0
  171. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/java/java-rules.yaml +0 -0
  172. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/assignment-operator.yaml +0 -0
  173. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/avoid-function-declarations-in-blocks.yaml +0 -0
  174. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/avoid-infinite-loops.yaml +0 -0
  175. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/avoid-jumping-in-finally.yaml +0 -0
  176. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/avoid-using-var.yaml +0 -0
  177. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/binary-operator-identity.yaml +0 -0
  178. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/combine-object-destructuring.yaml +0 -0
  179. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/de-morgan.yaml +0 -0
  180. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/dont-concatenate-string-literals.yaml +0 -0
  181. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/dont-negate-is-instanceof-operands.yaml +0 -0
  182. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/dont-reassign-caught-exceptions.yaml +0 -0
  183. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/dont-reassign-foreach-variables.yaml +0 -0
  184. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/dont-reassign-parameters.yaml +0 -0
  185. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/dont-self-assign-variables.yaml +0 -0
  186. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/dont-shadow-arguments.yaml +0 -0
  187. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/dont-use-with.yaml +0 -0
  188. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/dont-use-wrappers-for-builtins.yaml +0 -0
  189. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/flatten-nested-try.yaml +0 -0
  190. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/flip-comparison.yaml +0 -0
  191. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/generators-should-yield.yaml +0 -0
  192. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/inline-immediately-returned-variable.yaml +0 -0
  193. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/invert-ternary.yaml +0 -0
  194. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/max-min.yaml +0 -0
  195. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/merge-assign-operators.yaml +0 -0
  196. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/merge-else-if.yaml +0 -0
  197. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/merge_nested_ifs.yaml +0 -0
  198. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/misplaced-break-or-continue.yaml +0 -0
  199. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/no-eval.yaml +0 -0
  200. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/no-new-function.yaml +0 -0
  201. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/no-new-symbol.yaml +0 -0
  202. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/only-delete-object-properties.yaml +0 -0
  203. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/possible-incorrect-bitwise-operator.yaml +0 -0
  204. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/prefer-arrow-callback.yaml +0 -0
  205. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/remove-redundant-boolean.yaml +0 -0
  206. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/remove-redundant-if-statement.yaml +0 -0
  207. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/remove-redundant-slice-index.yaml +0 -0
  208. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/remove-unreachable-code.yaml +0 -0
  209. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/return-outside-function.yaml +0 -0
  210. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/simplify-ternary.yaml +0 -0
  211. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/throw-new-errors.yaml +0 -0
  212. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/use-array-literal.yaml +0 -0
  213. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/use-braces.yaml +0 -0
  214. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/use-object-destructuring.yaml +0 -0
  215. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/use-ternary-operator.yaml +0 -0
  216. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/while-guard-to-condition.yaml +0 -0
  217. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/wrap-immediately-invoked-function-expressions.yaml +0 -0
  218. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/javascript/yield-outside-generator.yaml +0 -0
  219. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/break-or-continue-outside-loop.yaml +0 -0
  220. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/dict-literal.yaml +0 -0
  221. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/merge-nested-ifs.yaml +0 -0
  222. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/no-complex-code-in-tests.yaml +0 -0
  223. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/or-if-exp-identity.yaml +0 -0
  224. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/pandas-chain-methods.yaml +0 -0
  225. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/raise-specific-error.yaml +0 -0
  226. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/remove-none-from-default-get.yaml +0 -0
  227. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/remove-redundant-path-exists.yaml +0 -0
  228. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/remove-unit-step-from-range.yaml +0 -0
  229. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/remove-zero-from-range.yaml +0 -0
  230. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/simplify-constant-sum.yaml +0 -0
  231. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/swap-if-expression.yaml +0 -0
  232. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/tuple-literal.yaml +0 -0
  233. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/use-iloc-for-indexing.yaml +0 -0
  234. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/use-isna.yaml +0 -0
  235. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/use-or-for-fallback.yaml +0 -0
  236. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/useless-else-on-loop.yaml +0 -0
  237. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/rules/python/while-guard-to-condition.yaml +0 -0
  238. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/select.so +0 -0
  239. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/sqlalchemy/cimmutabledict.so +0 -0
  240. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/sqlalchemy/cresultproxy.so +0 -0
  241. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/termios.so +0 -0
  242. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/tiktoken/_tiktoken.so +0 -0
  243. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/tree_sitter/binding.so +0 -0
  244. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/ujson.so +0 -0
  245. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/unicodedata.so +0 -0
  246. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/uvloop/loop.so +0 -0
  247. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/wrapper.py +0 -0
  248. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/wrapt/_wrappers.so +0 -0
  249. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/xxhash/_xxhash.so +0 -0
  250. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/yaml/_yaml.so +0 -0
  251. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/zlib.so +0 -0
  252. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/zstandard/_cffi.so +0 -0
  253. {sourcery_nightly-1.14.1b26.data → sourcery_nightly-1.14.1b27.data}/purelib/sourcery/zstandard/backend_c.so +0 -0
  254. {sourcery_nightly-1.14.1b26.dist-info → sourcery_nightly-1.14.1b27.dist-info}/WHEEL +0 -0
  255. {sourcery_nightly-1.14.1b26.dist-info → sourcery_nightly-1.14.1b27.dist-info}/entry_points.txt +0 -0
  256. {sourcery_nightly-1.14.1b26.dist-info → sourcery_nightly-1.14.1b27.dist-info}/top_level.txt +0 -0
@@ -849,4 +849,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
849
849
  ]`,h={scope:"string",variants:[u,l,c,f]},p={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},E=["false","null","true"],v=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],g=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],y={keyword:v,literal:(ee=>{const X=[];return ee.forEach(q=>{X.push(q),q.toLowerCase()===q?X.push(q.toUpperCase()):X.push(q.toLowerCase())}),X})(E),built_in:g},A=ee=>ee.map(X=>X.replace(/\|\d+$/,"")),k={variants:[{match:[/new/,t.concat(d,"+"),t.concat("(?!",A(g).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},S=t.concat(r,"\\b(?!\\()"),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},R={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},F={relevance:0,begin:/\(/,end:/\)/,keywords:y,contains:[R,s,C,e.C_BLOCK_COMMENT_MODE,h,p,k]},I={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",A(v).join("\\b|"),"|",A(g).join("\\b|"),"\\b)"),r,t.concat(d,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[F]};F.contains.push(I);const H=[R,C,e.C_BLOCK_COMMENT_MODE,h,p,k],W={begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:E,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:E,keyword:["new","array"]},contains:["self",...H]},...H,{scope:"meta",match:i}]};return{case_insensitive:!1,keywords:y,contains:[W,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},s,I,C,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},k,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:y,contains:["self",s,C,e.C_BLOCK_COMMENT_MODE,h,p]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},h,p]}}function lP(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function uP(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function cP(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},c={begin:/\{\{/,relevance:0},f={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",h=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,p=`\\b|${r.join("|")}`,E={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${h}))[eE][+-]?(${d})[jJ]?(?=${p})`},{begin:`(${h})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${d})[jJ](?=${p})`}]},v={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},g={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,E,f,e.HASH_COMMENT_MODE]}]};return u.contains=[f,E,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[l,E,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},f,v,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[E,g,f]}]}}function fP(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function dP(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function hP(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:a},f={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},d="[1-9](_?[0-9])*|0",h="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${d})(\\.(${h}))?([eE][+-]?(${h})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},E={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},S=[f,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[E]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[f,{begin:n}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);c.contains=S,E.contains=S;const C="[>?]>",R="[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]",F="(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>",I=[{begin:/^\s*=>/,starts:{end:"$",contains:S}},{className:"meta.prompt",begin:"^("+C+"|"+R+"|"+F+")(?=[ ])",starts:{end:"$",keywords:a,contains:S}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(I).concat(u).concat(S)}}function mP(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],s=["true","false","Some","None","Ok","Err"],a=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],o=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:o,keyword:i,literal:s,built_in:a},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+r},{begin:"\\b0o([0-7_]+)"+r},{begin:"\\b0x([A-Fa-f0-9_]+)"+r},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+r}],relevance:0},{begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:a,type:o}},{className:"punctuation",begin:"->"},n]}}const pP=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),gP=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],EP=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],TP=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],yP=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],_P=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function bP(e){const t=pP(e),n=yP,r=TP,i="@[a-z-]+",s="and or not only",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+gP.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+_P.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:EP.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function vP(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function SP(e){const t=e.regex,n=e.COMMENT("--","$"),r={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},i={begin:/"/,end:/"/,contains:[{begin:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],d=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],h=c,p=[...u,...l].filter(y=>!c.includes(y)),E={className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},v={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={begin:t.concat(/\b/,t.either(...h),/\s*\(/),relevance:0,keywords:{built_in:h}};function T(y,{exceptions:A,when:k}={}){const S=k;return A=A||[],y.map(C=>C.match(/\|\d+$/)||A.includes(C)?C:S(C)?`${C}|0`:C)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:T(p,{when:y=>y.length<3}),literal:s,type:o,built_in:f},contains:[{begin:t.either(...d),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:p.concat(d),literal:s,type:o}},{className:"type",begin:t.either(...a)},g,E,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,v]}}function W8(e){return e?typeof e=="string"?e:e.source:null}function _1(e){return ke("(?=",e,")")}function ke(...e){return e.map(n=>W8(n)).join("")}function AP(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Dt(...e){return"("+(AP(e).capture?"":"?:")+e.map(r=>W8(r)).join("|")+")"}const Bp=e=>ke(/\b/,e,/\w$/.test(e)?/\b/:/\B/),NP=["Protocol","Type"].map(Bp),hE=["init","self"].map(Bp),CP=["Any","Self"],od=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],mE=["false","nil","true"],xP=["assignment","associativity","higherThan","left","lowerThan","none","right"],wP=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],pE=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Y8=Dt(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),q8=Dt(Y8,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),ld=ke(Y8,q8,"*"),Q8=Dt(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Lu=Dt(Q8,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),lr=ke(Q8,Lu,"*"),ud=ke(/[A-Z]/,Lu,"*"),kP=["autoclosure",ke(/convention\(/,Dt("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",ke(/objc\(/,lr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],OP=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function IP(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,Dt(...NP,...hE)],className:{2:"keyword"}},s={match:ke(/\./,Dt(...od)),relevance:0},a=od.filter(he=>typeof he=="string").concat(["_|0"]),o=od.filter(he=>typeof he!="string").concat(CP).map(Bp),l={variants:[{className:"keyword",match:Dt(...o,...hE)}]},u={$pattern:Dt(/\b\w+/,/#\w+/),keyword:a.concat(wP),literal:mE},c=[i,s,l],f={match:ke(/\./,Dt(...pE)),relevance:0},d={className:"built_in",match:ke(/\b/,Dt(...pE),/(?=\()/)},h=[f,d],p={match:/->/,relevance:0},E={className:"operator",relevance:0,variants:[{match:ld},{match:`\\.(\\.|${q8})+`}]},v=[p,E],g="([0-9]_*)+",T="([0-9a-fA-F]_*)+",y={className:"number",relevance:0,variants:[{match:`\\b(${g})(\\.(${g}))?([eE][+-]?(${g}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${g}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},A=(he="")=>({className:"subst",variants:[{match:ke(/\\/,he,/[0\\tnr"']/)},{match:ke(/\\/,he,/u\{[0-9a-fA-F]{1,8}\}/)}]}),k=(he="")=>({className:"subst",match:ke(/\\/,he,/[\t ]*(?:[\r\n]|\r\n)/)}),S=(he="")=>({className:"subst",label:"interpol",begin:ke(/\\/,he,/\(/),end:/\)/}),C=(he="")=>({begin:ke(he,/"""/),end:ke(/"""/,he),contains:[A(he),k(he),S(he)]}),R=(he="")=>({begin:ke(he,/"/),end:ke(/"/,he),contains:[A(he),S(he)]}),F={className:"string",variants:[C(),C("#"),C("##"),C("###"),R(),R("#"),R("##"),R("###")]},I={match:ke(/`/,lr,/`/)},H={className:"variable",match:/\$\d+/},W={className:"variable",match:`\\$${Lu}+`},ee=[I,H,W],X={match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:OP,contains:[...v,y,F]}]}},q={className:"keyword",match:ke(/@/,Dt(...kP))},de={className:"meta",match:ke(/@/,lr)},D=[X,q,de],M={match:_1(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:ke(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Lu,"+")},{className:"type",match:ud,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:ke(/\s+&\s+/,_1(ud)),relevance:0}]},U={begin:/</,end:/>/,keywords:u,contains:[...r,...c,...D,p,M]};M.contains.push(U);const b={match:ke(lr,/\s*:/),keywords:"_|0",relevance:0},$={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",b,...r,...c,...h,...v,y,F,...ee,...D,M]},re={begin:/</,end:/>/,contains:[...r,M]},x={begin:Dt(_1(ke(lr,/\s*:/)),_1(ke(lr,/\s+/,lr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:lr}]},be={begin:/\(/,end:/\)/,keywords:u,contains:[x,...r,...c,...v,y,F,...D,M,$],endsParent:!0,illegal:/["']/},ve={match:[/func/,/\s+/,Dt(I.match,lr,ld)],className:{1:"keyword",3:"title.function"},contains:[re,be,t],illegal:[/\[/,/%/]},le={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[re,be,t],illegal:/\[|%/},rt={match:[/operator/,/\s+/,ld],className:{1:"keyword",3:"title"}},Nt={begin:[/precedencegroup/,/\s+/,ud],className:{1:"keyword",3:"title"},contains:[M],keywords:[...xP,...mE],end:/}/};for(const he of F.variants){const gt=he.contains.find(Jn=>Jn.label==="interpol");gt.keywords=u;const Et=[...c,...h,...v,y,F,...ee];gt.contains=[...Et,{begin:/\(/,end:/\)/,contains:["self",...Et]}]}return{name:"Swift",keywords:u,contains:[...r,ve,le,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:u,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},rt,Nt,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},...c,...h,...v,y,F,...ee,...D,M,$]}}const Pu="[A-Za-z$_][0-9A-Za-z$_]*",X8=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Z8=["true","false","null","undefined","NaN","Infinity"],J8=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],eb=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],tb=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],nb=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],rb=[].concat(tb,J8,eb);function RP(e){const t=e.regex,n=(M,{after:U})=>{const b="</"+M[0].slice(1);return M.input.indexOf(b,U)!==-1},r=Pu,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(M,U)=>{const b=M[0].length+M.index,$=M.input[b];if($==="<"||$===","){U.ignoreMatch();return}$===">"&&(n(M,{after:b})||U.ignoreMatch());let re;const x=M.input.substring(b);if(re=x.match(/^\s*=/)){U.ignoreMatch();return}if((re=x.match(/^\s+extends\s+/))&&re.index===0){U.ignoreMatch();return}}},o={$pattern:Pu,keyword:X8,literal:Z8,built_in:rb,"variable.language":nb},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},p={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"css"}},E={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,d],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,d]},T={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,p,E,v,{match:/\$\d+/},f];d.contains=y.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(y)});const A=[].concat(T,d.contains),k=A.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat(A)}]),S={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:k},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},R={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...J8,...eb]}},F={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function W(M){return t.concat("(?!",M.join("|"),")")}const ee={match:t.concat(/\b/,W([...tb,"super","import"]),r,t.lookahead(/\(/)),className:"title.function",relevance:0},X={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},de="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",D={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(de)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),F,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,p,E,v,T,{match:/\$\d+/},f,R,{className:"attr",begin:r+t.lookahead(":"),relevance:0},D,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:de,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[S,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},X,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},ee,H,C,q,{match:/\$[(.]/}]}}function MP(e){const t=RP(e),n=Pu,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[t.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},o=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],l={$pattern:Pu,keyword:X8.concat(o),literal:Z8,built_in:rb.concat(r),"variable.language":nb},u={className:"meta",begin:"@"+n},c=(d,h,p)=>{const E=d.contains.findIndex(v=>v.label===h);if(E===-1)throw new Error("can not find mode to replace");d.contains.splice(E,1,p)};Object.assign(t.keywords,l),t.exports.PARAMS_CONTAINS.push(u),t.contains=t.contains.concat([u,i,s]),c(t,"shebang",e.SHEBANG()),c(t,"use_strict",a);const f=t.contains.find(d=>d.label==="func.def");return f.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),t}function LP(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,i),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,t.either(s,i),/ +/,t.either(a,o),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},f=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),d=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,u,c,f,d,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[d]}]}}function PP(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},o={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,e.QUOTE_STRING_MODE,l,u,o]}}function DP(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(s,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,l,o,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,a,l,o]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function FP(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},a=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o="[0-9]{4}(-[0-9][0-9]){0,2}",l="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",u="(\\.[0-9]*)?",c="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",f={className:"number",begin:"\\b"+o+l+u+c+"\\b"},d={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[d],illegal:"\\n",relevance:0},p={begin:"\\[",end:"\\]",contains:[d],illegal:"\\n",relevance:0},E=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,p,s],v=[...E];return v.pop(),v.push(a),d.contains=v,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:E}}function ib(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&ib(n)}),e}class gE{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function sb(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function qr(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const BP="</span>",EE=e=>!!e.scope,UP=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class HP{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=sb(t)}openNode(t){if(!EE(t))return;const n=UP(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){EE(t)&&(this.buffer+=BP)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const TE=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Up{constructor(){this.rootNode=TE(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=TE({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Up._collapse(n)}))}}class zP extends Up{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new HP(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Xo(e){return e?typeof e=="string"?e:e.source:null}function ab(e){return rs("(?=",e,")")}function jP(e){return rs("(?:",e,")*")}function $P(e){return rs("(?:",e,")?")}function rs(...e){return e.map(n=>Xo(n)).join("")}function GP(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Hp(...e){return"("+(GP(e).capture?"":"?:")+e.map(r=>Xo(r)).join("|")+")"}function ob(e){return new RegExp(e.toString()+"|").exec("").length-1}function VP(e,t){const n=e&&e.exec(t);return n&&n.index===0}const KP=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function zp(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let s=Xo(r),a="";for(;s.length>0;){const o=KP.exec(s);if(!o){a+=s;break}a+=s.substring(0,o.index),s=s.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?a+="\\"+String(Number(o[1])+i):(a+=o[0],o[0]==="("&&n++)}return a}).map(r=>`(${r})`).join(t)}const WP=/\b\B/,lb="[a-zA-Z]\\w*",jp="[a-zA-Z_]\\w*",ub="\\b\\d+(\\.\\d+)?",cb="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",fb="\\b(0b[01]+)",YP="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",qP=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=rs(t,/.*\b/,e.binary,/\b.*/)),qr({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Zo={begin:"\\\\[\\s\\S]",relevance:0},QP={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Zo]},XP={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Zo]},ZP={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Hc=function(e,t,n={}){const r=qr({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=Hp("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:rs(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},JP=Hc("//","$"),eD=Hc("/\\*","\\*/"),tD=Hc("#","$"),nD={scope:"number",begin:ub,relevance:0},rD={scope:"number",begin:cb,relevance:0},iD={scope:"number",begin:fb,relevance:0},sD={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Zo,{begin:/\[/,end:/\]/,relevance:0,contains:[Zo]}]}]},aD={scope:"title",begin:lb,relevance:0},oD={scope:"title",begin:jp,relevance:0},lD={begin:"\\.\\s*"+jp,relevance:0},uD=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var b1=Object.freeze({__proto__:null,MATCH_NOTHING_RE:WP,IDENT_RE:lb,UNDERSCORE_IDENT_RE:jp,NUMBER_RE:ub,C_NUMBER_RE:cb,BINARY_NUMBER_RE:fb,RE_STARTERS_RE:YP,SHEBANG:qP,BACKSLASH_ESCAPE:Zo,APOS_STRING_MODE:QP,QUOTE_STRING_MODE:XP,PHRASAL_WORDS_MODE:ZP,COMMENT:Hc,C_LINE_COMMENT_MODE:JP,C_BLOCK_COMMENT_MODE:eD,HASH_COMMENT_MODE:tD,NUMBER_MODE:nD,C_NUMBER_MODE:rD,BINARY_NUMBER_MODE:iD,REGEXP_MODE:sD,TITLE_MODE:aD,UNDERSCORE_TITLE_MODE:oD,METHOD_GUARD:lD,END_SAME_AS_BEGIN:uD});function cD(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function fD(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function dD(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=cD,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function hD(e,t){Array.isArray(e.illegal)&&(e.illegal=Hp(...e.illegal))}function mD(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function pD(e,t){e.relevance===void 0&&(e.relevance=1)}const gD=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=rs(n.beforeMatch,ab(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},ED=["of","and","for","in","not","or","if","then","parent","list","value"],TD="keyword";function db(e,t,n=TD){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(s){Object.assign(r,db(e[s],t,s))}),r;function i(s,a){t&&(a=a.map(o=>o.toLowerCase())),a.forEach(function(o){const l=o.split("|");r[l[0]]=[s,yD(l[0],l[1])]})}}function yD(e,t){return t?Number(t):_D(e)?0:1}function _D(e){return ED.includes(e.toLowerCase())}const yE={},zi=e=>{console.error(e)},_E=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ps=(e,t)=>{yE[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),yE[`${e}/${t}`]=!0)},Du=new Error;function hb(e,t,{key:n}){let r=0;const i=e[n],s={},a={};for(let o=1;o<=t.length;o++)a[o+r]=i[o],s[o+r]=!0,r+=ob(t[o-1]);e[n]=a,e[n]._emit=s,e[n]._multi=!0}function bD(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw zi("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Du;if(typeof e.beginScope!="object"||e.beginScope===null)throw zi("beginScope must be object"),Du;hb(e,e.begin,{key:"beginScope"}),e.begin=zp(e.begin,{joinWith:""})}}function vD(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw zi("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Du;if(typeof e.endScope!="object"||e.endScope===null)throw zi("endScope must be object"),Du;hb(e,e.end,{key:"endScope"}),e.end=zp(e.end,{joinWith:""})}}function SD(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function AD(e){SD(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),bD(e),vD(e)}function ND(e){function t(a,o){return new RegExp(Xo(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=ob(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=t(zp(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const u=l.findIndex((f,d)=>d>0&&f!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new n;return this.rules.slice(o).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(o);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(o)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function i(a){const o=new r;return a.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),a.terminatorEnd&&o.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&o.addRule(a.illegal,{type:"illegal"}),o}function s(a,o){const l=a;if(a.isCompiled)return l;[fD,mD,AD,gD].forEach(c=>c(a,o)),e.compilerExtensions.forEach(c=>c(a,o)),a.__beforeBegin=null,[dD,hD,pD].forEach(c=>c(a,o)),a.isCompiled=!0;let u=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),u=a.keywords.$pattern,delete a.keywords.$pattern),u=u||/\w+/,a.keywords&&(a.keywords=db(a.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),o&&(a.begin||(a.begin=/\B|\b/),l.beginRe=t(l.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(l.endRe=t(l.end)),l.terminatorEnd=Xo(l.end)||"",a.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(l.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(c){return CD(c==="self"?a:c)})),a.contains.forEach(function(c){s(c,l)}),a.starts&&s(a.starts,o),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=qr(e.classNameAliases||{}),s(e)}function mb(e){return e?e.endsWithParent||mb(e.starts):!1}function CD(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return qr(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:mb(e)?qr(e,{starts:e.starts?qr(e.starts):null}):Object.isFrozen(e)?qr(e):e}var xD="11.8.0";class wD extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const cd=sb,bE=qr,vE=Symbol("nomatch"),kD=7,pb=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:zP};function l(D){return o.noHighlightRe.test(D)}function u(D){let M=D.className+" ";M+=D.parentNode?D.parentNode.className:"";const U=o.languageDetectRe.exec(M);if(U){const b=F(U[1]);return b||(_E(s.replace("{}",U[1])),_E("Falling back to no-highlight mode for this block.",D)),b?U[1]:"no-highlight"}return M.split(/\s+/).find(b=>l(b)||F(b))}function c(D,M,U){let b="",$="";typeof M=="object"?(b=D,U=M.ignoreIllegals,$=M.language):(ps("10.7.0","highlight(lang, code, ...args) has been deprecated."),ps("10.7.0",`Please use highlight(code, options) instead.
850
850
  https://github.com/highlightjs/highlight.js/issues/2277`),$=D,b=M),U===void 0&&(U=!0);const re={code:b,language:$};q("before:highlight",re);const x=re.result?re.result:f(re.language,re.code,U);return x.code=re.code,q("after:highlight",x),x}function f(D,M,U,b){const $=Object.create(null);function re(O,L){return O.keywords[L]}function x(){if(!oe.keywords){Je.addText(xe);return}let O=0;oe.keywordPatternRe.lastIndex=0;let L=oe.keywordPatternRe.exec(xe),V="";for(;L;){V+=xe.substring(O,L.index);const ne=Gt.case_insensitive?L[0].toLowerCase():L[0],ue=re(oe,ne);if(ue){const[qe,Fn]=ue;if(Je.addText(V),V="",$[ne]=($[ne]||0)+1,$[ne]<=kD&&(cs+=Fn),qe.startsWith("_"))V+=L[0];else{const yn=Gt.classNameAliases[qe]||qe;le(L[0],yn)}}else V+=L[0];O=oe.keywordPatternRe.lastIndex,L=oe.keywordPatternRe.exec(xe)}V+=xe.substring(O),Je.addText(V)}function be(){if(xe==="")return;let O=null;if(typeof oe.subLanguage=="string"){if(!t[oe.subLanguage]){Je.addText(xe);return}O=f(oe.subLanguage,xe,!0,Aa[oe.subLanguage]),Aa[oe.subLanguage]=O._top}else O=h(xe,oe.subLanguage.length?oe.subLanguage:null);oe.relevance>0&&(cs+=O.relevance),Je.__addSublanguage(O._emitter,O.language)}function ve(){oe.subLanguage!=null?be():x(),xe=""}function le(O,L){O!==""&&(Je.startScope(L),Je.addText(O),Je.endScope())}function rt(O,L){let V=1;const ne=L.length-1;for(;V<=ne;){if(!O._emit[V]){V++;continue}const ue=Gt.classNameAliases[O[V]]||O[V],qe=L[V];ue?le(qe,ue):(xe=qe,x(),xe=""),V++}}function Nt(O,L){return O.scope&&typeof O.scope=="string"&&Je.openNode(Gt.classNameAliases[O.scope]||O.scope),O.beginScope&&(O.beginScope._wrap?(le(xe,Gt.classNameAliases[O.beginScope._wrap]||O.beginScope._wrap),xe=""):O.beginScope._multi&&(rt(O.beginScope,L),xe="")),oe=Object.create(O,{parent:{value:oe}}),oe}function he(O,L,V){let ne=VP(O.endRe,V);if(ne){if(O["on:end"]){const ue=new gE(O);O["on:end"](L,ue),ue.isMatchIgnored&&(ne=!1)}if(ne){for(;O.endsParent&&O.parent;)O=O.parent;return O}}if(O.endsWithParent)return he(O.parent,L,V)}function gt(O){return oe.matcher.regexIndex===0?(xe+=O[0],1):(Ca=!0,0)}function Et(O){const L=O[0],V=O.rule,ne=new gE(V),ue=[V.__beforeBegin,V["on:begin"]];for(const qe of ue)if(qe&&(qe(O,ne),ne.isMatchIgnored))return gt(L);return V.skip?xe+=L:(V.excludeBegin&&(xe+=L),ve(),!V.returnBegin&&!V.excludeBegin&&(xe=L)),Nt(V,O),V.returnBegin?0:L.length}function Jn(O){const L=O[0],V=M.substring(O.index),ne=he(oe,O,V);if(!ne)return vE;const ue=oe;oe.endScope&&oe.endScope._wrap?(ve(),le(L,oe.endScope._wrap)):oe.endScope&&oe.endScope._multi?(ve(),rt(oe.endScope,O)):ue.skip?xe+=L:(ue.returnEnd||ue.excludeEnd||(xe+=L),ve(),ue.excludeEnd&&(xe=L));do oe.scope&&Je.closeNode(),!oe.skip&&!oe.subLanguage&&(cs+=oe.relevance),oe=oe.parent;while(oe!==ne.parent);return ne.starts&&Nt(ne.starts,O),ue.returnEnd?0:L.length}function os(){const O=[];for(let L=oe;L!==Gt;L=L.parent)L.scope&&O.unshift(L.scope);O.forEach(L=>Je.openNode(L))}let ls={};function Al(O,L){const V=L&&L[0];if(xe+=O,V==null)return ve(),0;if(ls.type==="begin"&&L.type==="end"&&ls.index===L.index&&V===""){if(xe+=M.slice(L.index,L.index+1),!i){const ne=new Error(`0 width match regex (${D})`);throw ne.languageName=D,ne.badRule=ls.rule,ne}return 1}if(ls=L,L.type==="begin")return Et(L);if(L.type==="illegal"&&!U){const ne=new Error('Illegal lexeme "'+V+'" for mode "'+(oe.scope||"<unnamed>")+'"');throw ne.mode=oe,ne}else if(L.type==="end"){const ne=Jn(L);if(ne!==vE)return ne}if(L.type==="illegal"&&V==="")return 1;if(Na>1e5&&Na>L.index*3)throw new Error("potential infinite loop, way more iterations than matches");return xe+=V,V.length}const Gt=F(D);if(!Gt)throw zi(s.replace("{}",D)),new Error('Unknown language: "'+D+'"');const Nl=ND(Gt);let us="",oe=b||Nl;const Aa={},Je=new o.__emitter(o);os();let xe="",cs=0,er=0,Na=0,Ca=!1;try{if(Gt.__emitTokens)Gt.__emitTokens(M,Je);else{for(oe.matcher.considerAll();;){Na++,Ca?Ca=!1:oe.matcher.considerAll(),oe.matcher.lastIndex=er;const O=oe.matcher.exec(M);if(!O)break;const L=M.substring(er,O.index),V=Al(L,O);er=O.index+V}Al(M.substring(er))}return Je.finalize(),us=Je.toHTML(),{language:D,value:us,relevance:cs,illegal:!1,_emitter:Je,_top:oe}}catch(O){if(O.message&&O.message.includes("Illegal"))return{language:D,value:cd(M),illegal:!0,relevance:0,_illegalBy:{message:O.message,index:er,context:M.slice(er-100,er+100),mode:O.mode,resultSoFar:us},_emitter:Je};if(i)return{language:D,value:cd(M),illegal:!1,relevance:0,errorRaised:O,_emitter:Je,_top:oe};throw O}}function d(D){const M={value:cd(D),illegal:!1,relevance:0,_top:a,_emitter:new o.__emitter(o)};return M._emitter.addText(D),M}function h(D,M){M=M||o.languages||Object.keys(t);const U=d(D),b=M.filter(F).filter(H).map(ve=>f(ve,D,!1));b.unshift(U);const $=b.sort((ve,le)=>{if(ve.relevance!==le.relevance)return le.relevance-ve.relevance;if(ve.language&&le.language){if(F(ve.language).supersetOf===le.language)return 1;if(F(le.language).supersetOf===ve.language)return-1}return 0}),[re,x]=$,be=re;return be.secondBest=x,be}function p(D,M,U){const b=M&&n[M]||U;D.classList.add("hljs"),D.classList.add(`language-${b}`)}function E(D){let M=null;const U=u(D);if(l(U))return;if(q("before:highlightElement",{el:D,language:U}),D.children.length>0&&(o.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)),o.throwUnescapedHTML))throw new wD("One of your code blocks includes unescaped HTML.",D.innerHTML);M=D;const b=M.textContent,$=U?c(b,{language:U,ignoreIllegals:!0}):h(b);D.innerHTML=$.value,p(D,U,$.language),D.result={language:$.language,re:$.relevance,relevance:$.relevance},$.secondBest&&(D.secondBest={language:$.secondBest.language,relevance:$.secondBest.relevance}),q("after:highlightElement",{el:D,result:$,text:b})}function v(D){o=bE(o,D)}const g=()=>{A(),ps("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function T(){A(),ps("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let y=!1;function A(){if(document.readyState==="loading"){y=!0;return}document.querySelectorAll(o.cssSelector).forEach(E)}function k(){y&&A()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",k,!1);function S(D,M){let U=null;try{U=M(e)}catch(b){if(zi("Language definition for '{}' could not be registered.".replace("{}",D)),i)zi(b);else throw b;U=a}U.name||(U.name=D),t[D]=U,U.rawDefinition=M.bind(null,e),U.aliases&&I(U.aliases,{languageName:D})}function C(D){delete t[D];for(const M of Object.keys(n))n[M]===D&&delete n[M]}function R(){return Object.keys(t)}function F(D){return D=(D||"").toLowerCase(),t[D]||t[n[D]]}function I(D,{languageName:M}){typeof D=="string"&&(D=[D]),D.forEach(U=>{n[U.toLowerCase()]=M})}function H(D){const M=F(D);return M&&!M.disableAutodetect}function W(D){D["before:highlightBlock"]&&!D["before:highlightElement"]&&(D["before:highlightElement"]=M=>{D["before:highlightBlock"](Object.assign({block:M.el},M))}),D["after:highlightBlock"]&&!D["after:highlightElement"]&&(D["after:highlightElement"]=M=>{D["after:highlightBlock"](Object.assign({block:M.el},M))})}function ee(D){W(D),r.push(D)}function X(D){const M=r.indexOf(D);M!==-1&&r.splice(M,1)}function q(D,M){const U=D;r.forEach(function(b){b[U]&&b[U](M)})}function de(D){return ps("10.7.0","highlightBlock will be removed entirely in v12.0"),ps("10.7.0","Please use highlightElement now."),E(D)}Object.assign(e,{highlight:c,highlightAuto:h,highlightAll:A,highlightElement:E,highlightBlock:de,configure:v,initHighlighting:g,initHighlightingOnLoad:T,registerLanguage:S,unregisterLanguage:C,listLanguages:R,getLanguage:F,registerAliases:I,autoDetection:H,inherit:bE,addPlugin:ee,removePlugin:X}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=xD,e.regex={concat:rs,lookahead:ab,either:Hp,optional:$P,anyNumberOfTimes:jP};for(const D in b1)typeof b1[D]=="object"&&ib(b1[D]);return Object.assign(e,b1),e},fa=pb({});fa.newInstance=()=>pb({});var OD=fa;fa.HighlightJS=fa;fa.default=fa;const kn=Xn(OD);var gb={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(s,a){return i.apply(null,[s].concat(a))}function i(s){for(var a=1,o=[].slice.call(arguments),l=0,u=s.length,c="",f,d=!1,h,p,E=!1,v,g=function(){return o[a++]},T=function(){for(var y="";/\d/.test(s[l]);)y+=s[l++],f=s[l];return y.length>0?parseInt(y):null};l<u;++l)if(f=s[l],d)switch(d=!1,f=="."?(E=!1,f=s[++l]):f=="0"&&s[l+1]=="."?(E=!0,l+=2,f=s[l]):E=!0,v=T(),f){case"b":c+=parseInt(g(),10).toString(2);break;case"c":h=g(),typeof h=="string"||h instanceof String?c+=h:c+=String.fromCharCode(parseInt(h,10));break;case"d":c+=parseInt(g(),10);break;case"f":p=String(parseFloat(g()).toFixed(v||6)),c+=E?p:p.replace(/^0/,"");break;case"j":c+=JSON.stringify(g());break;case"o":c+="0"+parseInt(g(),10).toString(8);break;case"s":c+=g();break;case"x":c+="0x"+parseInt(g(),10).toString(16);break;case"X":c+="0x"+parseInt(g(),10).toString(16).toUpperCase();break;default:c+=f;break}else f==="%"?d=!0:c+=f;return c}})()})(gb);var ID=gb.exports;const RD=Xn(ID),Y1=Object.assign(Si(Error),{eval:Si(EvalError),range:Si(RangeError),reference:Si(ReferenceError),syntax:Si(SyntaxError),type:Si(TypeError),uri:Si(URIError)});function Si(e){return t.displayName=e.displayName||e.name,t;function t(n,...r){const i=n&&RD(n,...r);return new e(i)}}const MD={}.hasOwnProperty,LD="hljs-";function Eb(e,t,n={}){let r=n.prefix;if(typeof e!="string")throw Y1("Expected `string` for name, got `%s`",e);if(!kn.getLanguage(e))throw Y1("Unknown language: `%s` is not registered",e);if(typeof t!="string")throw Y1("Expected `string` for value, got `%s`",t);r==null&&(r=LD),kn.configure({__emitter:HD,classPrefix:r});const i=kn.highlight(t,{language:e,ignoreIllegals:!0});if(kn.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 PD(e,t={}){const n=t.subset||kn.listLanguages();t.prefix;let r=-1,i={type:"root",data:{language:null,relevance:0},children:[]};if(typeof e!="string")throw Y1("Expected `string` for value, got `%s`",e);for(;++r<n.length;){const s=n[r];if(!kn.getLanguage(s))continue;const a=Eb(s,e,t);a.data.relevance>i.data.relevance&&(i=a)}return i}function DD(e,t){kn.registerLanguage(e,t)}const FD=function(e,t){if(typeof e=="string")kn.registerAliases(t,{languageName:e});else{let n;for(n in e)MD.call(e,n)&&kn.registerAliases(e[n],{languageName:n})}};function BD(e){return!!kn.getLanguage(e)}function UD(){return kn.listLanguages()}class HD{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((s,a)=>a?s+"_".repeat(a):this.options.classPrefix+s),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 ce={highlight:Eb,highlightAuto:PD,registerLanguage:DD,registered:BD,listLanguages:UD,registerAlias:FD};ce.registerLanguage("arduino",NL);ce.registerLanguage("bash",CL);ce.registerLanguage("c",xL);ce.registerLanguage("cpp",wL);ce.registerLanguage("csharp",kL);ce.registerLanguage("css",DL);ce.registerLanguage("diff",FL);ce.registerLanguage("go",BL);ce.registerLanguage("graphql",UL);ce.registerLanguage("ini",HL);ce.registerLanguage("java",zL);ce.registerLanguage("javascript",KL);ce.registerLanguage("json",WL);ce.registerLanguage("kotlin",qL);ce.registerLanguage("less",tP);ce.registerLanguage("lua",nP);ce.registerLanguage("makefile",rP);ce.registerLanguage("markdown",iP);ce.registerLanguage("objectivec",sP);ce.registerLanguage("perl",aP);ce.registerLanguage("php",oP);ce.registerLanguage("php-template",lP);ce.registerLanguage("plaintext",uP);ce.registerLanguage("python",cP);ce.registerLanguage("python-repl",fP);ce.registerLanguage("r",dP);ce.registerLanguage("ruby",hP);ce.registerLanguage("rust",mP);ce.registerLanguage("scss",bP);ce.registerLanguage("shell",vP);ce.registerLanguage("sql",SP);ce.registerLanguage("swift",IP);ce.registerLanguage("typescript",MP);ce.registerLanguage("vbnet",LP);ce.registerLanguage("wasm",PP);ce.registerLanguage("xml",DP);ce.registerLanguage("yaml",FP);const is=function(e){if(e==null)return $p;if(typeof e=="string")return jD(e);if(typeof e=="object")return zD(e);if(typeof e=="function")return Tb(e);throw new Error("Expected function, string, or array as test")};function zD(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=is(e[n]);return Tb(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].call(this,...i))return!0;return!1}}function jD(e){return t;function t(n){return $p(n)&&n.tagName===e}}function Tb(e){return t;function t(n,...r){return $p(n)&&!!e.call(this,n,...r)}}function $p(e){return!!(e&&typeof e=="object"&&e.type==="element"&&typeof e.tagName=="string")}const SE=function(e,t,n){const r=yc(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},AE=/\n/g,NE=/[\t ]+/g,Wh=is("br"),$D=is("p"),CE=is(["th","td"]),xE=is("tr"),GD=is(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",YD,qD]),yb=is(["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 wE(e,t={}){const n="children"in e?e.children:[],r=yb(e),i=vb(e,{whitespace:t.whitespace||"normal",breakBefore:!1,breakAfter:!1}),s=[];(e.type==="text"||e.type==="comment")&&s.push(...bb(e,{whitespace:i,breakBefore:!0,breakAfter:!0}));let a=-1;for(;++a<n.length;)s.push(..._b(n[a],e,{whitespace:i,breakBefore:a?void 0:r,breakAfter:a<n.length-1?Wh(n[a+1]):r}));const o=[];let l;for(a=-1;++a<s.length;){const u=s[a];typeof u=="number"?l!==void 0&&u>l&&(l=u):u&&(l!==void 0&&l>-1&&o.push(`
851
851
  `.repeat(l)||" "),l=-1,o.push(u))}return o.join("")}function _b(e,t,n){return e.type==="element"?VD(e,t,n):e.type==="text"?n.whitespace==="normal"?bb(e,n):KD(e):[]}function VD(e,t,n){const r=vb(e,n),i=e.children||[];let s=-1,a=[];if(GD(e))return a;let o,l;for(Wh(e)||xE(e)&&SE(t,e,xE)?l=`
852
- `:$D(e)?(o=2,l=2):yb(e)&&(o=1,l=1);++s<i.length;)a=a.concat(_b(i[s],e,{whitespace:r,breakBefore:s?void 0:o,breakAfter:s<i.length-1?Wh(i[s+1]):l}));return CE(e)&&SE(t,e,CE)&&a.push(" "),o&&a.unshift(o),l&&a.push(l),a}function bb(e,t){const n=String(e.value),r=[],i=[];let s=0;for(;s<=n.length;){AE.lastIndex=s;const l=AE.exec(n),u=l&&"index"in l?l.index:n.length;r.push(WD(n.slice(s,u).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,u===n.length?t.breakAfter:!0)),s=u+1}let a=-1,o;for(;++a<r.length;)r[a].charCodeAt(r[a].length-1)===8203||a<r.length-1&&r[a+1].charCodeAt(0)===8203?(i.push(r[a]),o=void 0):r[a]?(typeof o=="number"&&i.push(o),i.push(r[a]),o=0):(a===0||a===r.length-1)&&i.push(0);return i}function KD(e){return[String(e.value)]}function WD(e,t,n){const r=[];let i=0,s;for(;i<e.length;){NE.lastIndex=i;const a=NE.exec(e);s=a?a.index:e.length,!i&&!s&&a&&!t&&r.push(""),i!==s&&r.push(e.slice(i,s)),i=a?s+a[0].length:s}return i!==s&&!n&&r.push(""),r.join(" ")}function vb(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 YD(e){return!!(e.properties||{}).hidden}function qD(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const QD={}.hasOwnProperty;function XD(e={}){const{aliases:t,languages:n,prefix:r,plainText:i,ignoreMissing:s,subset:a,detect:o}=e;let l="hljs";if(t&&ce.registerAlias(t),n){let u;for(u in n)QD.call(n,u)&&ce.registerLanguage(u,n[u])}if(r){const u=r.indexOf("-");l=u>-1?r.slice(0,u):r}return(u,c)=>{pl(u,"element",(f,d,h)=>{const p=h;if(!p||!("tagName"in p)||p.tagName!=="pre"||f.tagName!=="code"||!f.properties)return;const E=ZD(f);if(E===!1||!E&&!o||E&&i&&i.includes(E))return;Array.isArray(f.properties.className)||(f.properties.className=[]),f.properties.className.includes(l)||f.properties.className.unshift(l);let v;try{v=E?ce.highlight(E,wE(p),{prefix:r}):ce.highlightAuto(wE(p),{prefix:r,subset:a})}catch(g){const T=g;(!s||!/Unknown language/.test(T.message))&&c.fail(T,f,"rehype-highlight:missing-language");return}!E&&v.data.language&&f.properties.className.push("language-"+v.data.language),Array.isArray(v.children)&&v.children.length>0&&(f.children=v.children)})}}function ZD(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 JD=e=>P.isValidElement(e)&&!!e.props.children,Fu=JD,eF=e=>P.isValidElement(e)&&Fu(e)&&P.Children.toArray(e.props.children).reduce((t,n)=>t||P.isValidElement(n),!1),yl=eF,Sb=(e,t)=>P.Children.toArray(e).filter(t).map(n=>P.isValidElement(n)&&yl(n)?P.cloneElement(n,{...n.props,children:Sb(n.props.children,t)}):n),Ab=Sb,Nb=(e,t)=>{let n;return P.Children.toArray(e).find((r,i,s)=>t(r,i,s)?(n=r,!0):P.isValidElement(r)&&yl(r)?(n=Nb(r.props.children,t),typeof n<"u"):!1),n},tF=Nb,Cb=(e,t)=>{P.Children.forEach(e,(n,r)=>{P.isValidElement(n)&&yl(n)&&Cb(n.props.children,t),t(n,r)})},nF=Cb,xb=(e,t)=>P.Children.toArray(e).map((n,r,i)=>P.isValidElement(n)&&yl(n)?t(P.cloneElement(n,{...n.props,children:xb(n.props.children,t)})):t(n,r,i)),rF=xb,iF=(e,t)=>P.Children.toArray(e).filter(t),sF=iF,aF=e=>P.isValidElement(e)?typeof e.type=="string"?e.type:e.type.name:null,wb=aF,oF=(e,t=[],n="rest")=>{const r=t.map(i=>typeof i=="string"?i:i.name);return P.Children.toArray(e).reduce((i,s)=>{const a=wb(s),o=a!==null&&r.includes(a)?a:n;return typeof i[o]>"u"&&(i[o]=[]),i[o]=[...i[o],s],i},{})},lF=oF,kE=e=>typeof e>"u"||e===null||typeof e=="boolean"||JSON.stringify(e)==="{}"?"":e.toString(),kb=e=>!(e instanceof Array)&&!P.isValidElement(e)?kE(e):P.Children.toArray(e).reduce((t,n)=>{let r="";return P.isValidElement(n)&&Fu(n)?r=kb(n.props.children):P.isValidElement(n)&&!Fu(n)?r="":r=kE(n),t.concat(r)},""),Ob=kb,uF=e=>Ab(e,t=>P.isValidElement(t)),cF=uF;({...P.Children});const fF=["className","hljs-addition","hljs-attr","hljs-attribute","hljs-built_in","hljs-bullet","hljs-char","hljs-code","hljs-comment","hljs-deletion","hljs-doctag","hljs-emphasis","hljs-formula","hljs-keyword","hljs-link","hljs-literal","hljs-meta","hljs-name","hljs-number","hljs-operator","hljs-params","hljs-property","hljs-punctuation","hljs-quote","hljs-regexp","hljs-section","hljs-selector-attr","hljs-selector-class","hljs-selector-id","hljs-selector-pseudo","hljs-selector-tag","hljs-string","hljs-strong","hljs-subst","hljs-symbol","hljs-tag","hljs-template-tag","hljs-template-variable","hljs-title","hljs-type","hljs-variable"],Hs=({message:e})=>{window.sourceryLS.postMessage({message:e})},dF=({copyValue:e})=>{const[t,n]=P.useState(!1);return _.jsx("button",{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:()=>{Hs({message:{target:"extension",request:"copyToClipboard",content:e}}),n(!0)},onBlur:()=>n(!1),children:t?_.jsx(He.Check,{}):_.jsx(He.Copy,{})})},hF=({copyValue:e})=>_.jsx("button",{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:()=>Hs({message:{target:"extension",request:"insertAtCursor",content:e}}),children:_.jsx(He.FileExport,{})}),Js=({markdown:e})=>{var t,n;return _.jsx($_,{remarkPlugins:[RO],rehypePlugins:[dL,[XD,{ignoreMissing:!0}],[SL,{protocols:{...Us.protocols,href:[...((t=Us.protocols)==null?void 0:t.src)||[],"file"]},attributes:{...Us.attributes,span:[...((n=Us.attributes)==null?void 0:n.span)||[],fF]}}]],transformLinkUri:r=>r.startsWith("https")||r.startsWith("file")||r==="VALID_FILE"||r==="VALID_FILE_WITH_LINE_NUMBER"||r==="VALID_DIRECTORY"?r:"",components:{h1({children:r}){return _.jsx("h1",{className:"mb-2 mt-6 text-lg font-bold first:mt-0 last:mb-0",children:r})},h2({children:r}){return _.jsx("h2",{className:"mt-2 font-bold first:mt-0",children:r})},h3({children:r}){return _.jsx("h3",{className:"mt-2 font-bold first:mt-0",children:r})},h4({children:r}){return _.jsx("h4",{className:"mt-2 font-bold first:mt-0",children:r})},h5({children:r}){return _.jsx("h5",{className:"mt-2 font-bold first:mt-0",children:r})},h6({children:r}){return _.jsx("h6",{className:"mt-2 font-bold first:mt-0",children:r})},ul({children:r}){return _.jsx("ul",{className:"list-disc pl-5",children:r})},ol({children:r}){return _.jsx("ol",{className:"list-disc pl-5",children:r})},p({children:r}){return _.jsx("p",{className:"mt-2 first:mt-0",children:r})},code({inline:r,className:i,children:s,...a}){const o=Ob(s);return r?_.jsx("code",{...a,className:i,children:o}):_.jsxs("div",{className:"group relative",children:[_.jsx("pre",{className:Ie(i,"border-ide-border bg-ide-editor-bg my-4 overflow-x-auto rounded border px-4 py-3"),children:_.jsx("code",{children:s})}),_.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:[_.jsx(dF,{copyValue:o}),_.jsx(hF,{copyValue:o})]})]})},a({href:r,children:i}){if(!r)return _.jsx("span",{className:"bg-ide-error-bg text-ide-error-text",children:"[Missing link]"});if(r.startsWith("https"))return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:()=>Hs({message:{target:"extension",request:"openLink",link:r,linkType:"url",documentRange:null}}),children:i});if(r.startsWith("file"))return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:()=>Hs({message:{target:"extension",request:"openLink",linkType:"file",link:r.slice(7),documentRange:null}}),children:i});if(r==="VALID_FILE"||r==="VALID_FILE_WITH_LINE_NUMBER"){const s=String(i).replace(/\n$/,""),[a,o]=s.split(":"),l=parseInt(o,10)-1,u=isNaN(l)?null:{start:{line:l,character:0},end:{line:l,character:0}};return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:c=>{c.preventDefault(),Hs({message:{target:"extension",request:"openLink",link:a,linkType:"file",documentRange:u}})},children:i})}if(r==="VALID_DIRECTORY"){const s=String(i).replace(/\n$/,"");return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:a=>{a.preventDefault(),Hs({message:{target:"extension",request:"openLink",link:s,linkType:"directory",documentRange:null}})},children:i})}return _.jsx("span",{className:"bg-ide-error-bg text-ide-error-text",children:"[Invalid link]"})}},children:e})},Ib=()=>_.jsxs("div",{className:"flex h-[1.5rem] flex-row items-center gap-1",children:[_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0s"}}),_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0.2s"}}),_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0.4s"}})]}),Rb=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),zc=P.createContext({}),Gp=P.createContext(null),jc=typeof document<"u",mF=jc?P.useLayoutEffect:P.useEffect,Mb=P.createContext({strict:!1});function pF(e,t,n,r){const{visualElement:i}=P.useContext(zc),s=P.useContext(Mb),a=P.useContext(Gp),o=P.useContext(Rb).reducedMotion,l=P.useRef();r=r||s.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:o}));const u=l.current;P.useInsertionEffect(()=>{u&&u.update(n,a)});const c=P.useRef(!!window.HandoffAppearAnimations);return mF(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),P.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,c.current=!1)}),u}function zs(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gF(e,t,n){return P.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):zs(n)&&(n.current=r))},[t])}function Jo(e){return typeof e=="string"||Array.isArray(e)}function $c(e){return typeof e=="object"&&typeof e.start=="function"}const Vp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kp=["initial",...Vp];function Gc(e){return $c(e.animate)||Kp.some(t=>Jo(e[t]))}function Lb(e){return!!(Gc(e)||e.variants)}function EF(e,t){if(Gc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Jo(n)?n:void 0,animate:Jo(r)?r:void 0}}return e.inherit!==!1?t:{}}function TF(e){const{initial:t,animate:n}=EF(e,P.useContext(zc));return P.useMemo(()=>({initial:t,animate:n}),[OE(t),OE(n)])}function OE(e){return Array.isArray(e)?e.join(" "):e}const IE={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"]},el={};for(const e in IE)el[e]={isEnabled:t=>IE[e].some(n=>!!t[n])};function yF(e){for(const t in e)el[t]={...el[t],...e[t]}}const Pb=P.createContext({}),Db=P.createContext({}),_F=Symbol.for("motionComponentSymbol");function bF({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&yF(e);function s(o,l){let u;const c={...P.useContext(Rb),...o,layoutId:vF(o)},{isStatic:f}=c,d=TF(o),h=r(o,f);if(!f&&jc){d.visualElement=pF(i,h,c,t);const p=P.useContext(Db),E=P.useContext(Mb).strict;d.visualElement&&(u=d.visualElement.loadFeatures(c,E,e,p))}return P.createElement(zc.Provider,{value:d},u&&d.visualElement?P.createElement(u,{visualElement:d.visualElement,...c}):null,n(i,o,gF(h,d.visualElement,l),h,f,d.visualElement))}const a=P.forwardRef(s);return a[_F]=i,a}function vF({layoutId:e}){const t=P.useContext(Pb).id;return t&&e!==void 0?t+"-"+e:e}function SF(e){function t(r,i={}){return bF(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 AF=["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 Wp(e){return typeof e!="string"||e.includes("-")?!1:!!(AF.indexOf(e)>-1||/[A-Z]/.test(e))}const Bu={};function NF(e){Object.assign(Bu,e)}const _l=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ss=new Set(_l);function Fb(e,{layout:t,layoutId:n}){return ss.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Bu[e]||e==="opacity")}const jt=e=>!!(e&&e.getVelocity),CF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xF=_l.length;function wF(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let s="";for(let a=0;a<xF;a++){const o=_l[a];if(e[o]!==void 0){const l=CF[o]||o;s+=`${l}(${e[o]}) `}}return t&&!e.z&&(s+="translateZ(0)"),s=s.trim(),i?s=i(e,r?"":s):n&&r&&(s="none"),s}const Bb=e=>t=>typeof t=="string"&&t.startsWith(e),Ub=Bb("--"),Yh=Bb("var(--"),kF=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,OF=(e,t)=>t&&typeof e=="number"?t.transform(e):e,fi=(e,t,n)=>Math.min(Math.max(n,e),t),as={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},_o={...as,transform:e=>fi(0,1,e)},v1={...as,default:1},bo=e=>Math.round(e*1e5)/1e5,Vc=/(-)?([\d]*\.?[\d])+/g,Hb=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,IF=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function bl(e){return typeof e=="string"}const vl=e=>({test:t=>bl(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ur=vl("deg"),Qn=vl("%"),ae=vl("px"),RF=vl("vh"),MF=vl("vw"),RE={...Qn,parse:e=>Qn.parse(e)/100,transform:e=>Qn.transform(e*100)},ME={...as,transform:Math.round},zb={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,size:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,rotate:Ur,rotateX:Ur,rotateY:Ur,rotateZ:Ur,scale:v1,scaleX:v1,scaleY:v1,scaleZ:v1,skew:Ur,skewX:Ur,skewY:Ur,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:_o,originX:RE,originY:RE,originZ:ae,zIndex:ME,fillOpacity:_o,strokeOpacity:_o,numOctaves:ME};function Yp(e,t,n,r){const{style:i,vars:s,transform:a,transformOrigin:o}=e;let l=!1,u=!1,c=!0;for(const f in t){const d=t[f];if(Ub(f)){s[f]=d;continue}const h=zb[f],p=OF(d,h);if(ss.has(f)){if(l=!0,a[f]=p,!c)continue;d!==(h.default||0)&&(c=!1)}else f.startsWith("origin")?(u=!0,o[f]=p):i[f]=p}if(t.transform||(l||r?i.transform=wF(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:d="50%",originZ:h=0}=o;i.transformOrigin=`${f} ${d} ${h}`}}const qp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jb(e,t,n){for(const r in t)!jt(t[r])&&!Fb(r,n)&&(e[r]=t[r])}function LF({transformTemplate:e},t,n){return P.useMemo(()=>{const r=qp();return Yp(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function PF(e,t,n){const r=e.style||{},i={};return jb(i,r,e),Object.assign(i,LF(e,t,n)),e.transformValues?e.transformValues(i):i}function DF(e,t,n){const r={},i=PF(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 FF=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 Uu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||FF.has(e)}let $b=e=>!Uu(e);function BF(e){e&&($b=t=>t.startsWith("on")?!Uu(t):e(t))}try{BF(require("@emotion/is-prop-valid").default)}catch{}function UF(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||($b(i)||n===!0&&Uu(i)||!t&&!Uu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function LE(e,t,n){return typeof e=="string"?e:ae.transform(t+n*e)}function HF(e,t,n){const r=LE(t,e.x,e.width),i=LE(n,e.y,e.height);return`${r} ${i}`}const zF={offset:"stroke-dashoffset",array:"stroke-dasharray"},jF={offset:"strokeDashoffset",array:"strokeDasharray"};function $F(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?zF:jF;e[s.offset]=ae.transform(-r);const a=ae.transform(t),o=ae.transform(n);e[s.array]=`${a} ${o}`}function Qp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:a,pathSpacing:o=1,pathOffset:l=0,...u},c,f,d){if(Yp(e,u,c,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:E}=e;h.transform&&(E&&(p.transform=h.transform),delete h.transform),E&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=HF(E,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),a!==void 0&&$F(h,a,o,l,!1)}const Gb=()=>({...qp(),attrs:{}}),Xp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function GF(e,t,n,r){const i=P.useMemo(()=>{const s=Gb();return Qp(s,t,{enableHardwareAcceleration:!1},Xp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};jb(s,e.style,e),i.style={...s,...i.style}}return i}function VF(e=!1){return(n,r,i,{latestValues:s},a)=>{const l=(Wp(n)?GF:DF)(r,s,a,n),c={...UF(r,typeof n=="string",e),...l,ref:i},{children:f}=r,d=P.useMemo(()=>jt(f)?f.get():f,[f]);return P.createElement(n,{...c,children:d})}}const Zp=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Vb(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Kb=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 Wb(e,t,n,r){Vb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Kb.has(i)?i:Zp(i),t.attrs[i])}function Jp(e,t){const{style:n}=e,r={};for(const i in n)(jt(n[i])||t.style&&jt(t.style[i])||Fb(i,e))&&(r[i]=n[i]);return r}function Yb(e,t){const n=Jp(e,t);for(const r in e)if(jt(e[r])||jt(t[r])){const i=_l.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function e0(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 KF(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const Hu=e=>Array.isArray(e),WF=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),YF=e=>Hu(e)?e[e.length-1]||0:e;function q1(e){const t=jt(e)?e.get():e;return WF(t)?t.toValue():t}function qF({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,s){const a={latestValues:QF(r,i,s,e),renderState:t()};return n&&(a.mount=o=>n(r,o,a)),a}const qb=e=>(t,n)=>{const r=P.useContext(zc),i=P.useContext(Gp),s=()=>qF(e,t,r,i);return n?s():KF(s)};function QF(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=q1(s[d]);let{initial:a,animate:o}=e;const l=Gc(e),u=Lb(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),o===void 0&&(o=t.animate));let c=n?n.initial===!1:!1;c=c||a===!1;const f=c?o:a;return f&&typeof f!="boolean"&&!$c(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=e0(e,h);if(!p)return;const{transitionEnd:E,transition:v,...g}=p;for(const T in g){let y=g[T];if(Array.isArray(y)){const A=c?y.length-1:0;y=y[A]}y!==null&&(i[T]=y)}for(const T in E)i[T]=E[T]}),i}const Ye=e=>e;function XF(e){let t=[],n=[],r=0,i=!1,s=!1;const a=new WeakSet,o={schedule:(l,u=!1,c=!1)=>{const f=c&&i,d=f?t:n;return u&&a.add(l),d.indexOf(l)===-1&&(d.push(l),f&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const c=t[u];c(l),a.has(c)&&(o.schedule(c),e())}i=!1,s&&(s=!1,o.process(l))}};return o}const S1=["prepare","read","update","preRender","render","postRender"],ZF=40;function JF(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=S1.reduce((f,d)=>(f[d]=XF(()=>n=!0),f),{}),a=f=>s[f].process(i),o=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,ZF),1),i.timestamp=f,i.isProcessing=!0,S1.forEach(a),i.isProcessing=!1,n&&t&&(r=!1,e(o))},l=()=>{n=!0,r=!0,i.isProcessing||e(o)};return{schedule:S1.reduce((f,d)=>{const h=s[d];return f[d]=(p,E=!1,v=!1)=>(n||l(),h.schedule(p,E,v)),f},{}),cancel:f=>S1.forEach(d=>s[d].cancel(f)),state:i,steps:s}}const{schedule:Be,cancel:Nr,state:_t,steps:fd}=JF(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ye,!0),eB={useVisualState:qb({scrapeMotionValuesFromProps:Yb,createRenderState:Gb,onMount:(e,t,{renderState:n,latestValues:r})=>{Be.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Be.render(()=>{Qp(n,r,{enableHardwareAcceleration:!1},Xp(t.tagName),e.transformTemplate),Wb(t,n)})}})},tB={useVisualState:qb({scrapeMotionValuesFromProps:Jp,createRenderState:qp})};function nB(e,{forwardMotionProps:t=!1},n,r){return{...Wp(e)?eB:tB,preloadedFeatures:n,useRender:VF(t),createVisualElement:r,Component:e}}function hr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Qb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Kc(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const rB=e=>t=>Qb(t)&&e(t,Kc(t));function pr(e,t,n,r){return hr(e,t,rB(n),r)}const iB=(e,t)=>n=>t(e(n)),ii=(...e)=>e.reduce(iB);function Xb(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const PE=Xb("dragHorizontal"),DE=Xb("dragVertical");function Zb(e){let t=!1;if(e==="y")t=DE();else if(e==="x")t=PE();else{const n=PE(),r=DE();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Jb(){const e=Zb(!0);return e?(e(),!1):!0}class Ti{constructor(t){this.isMounted=!1,this.node=t}update(){}}function FE(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(s,a)=>{if(s.type==="touch"||Jb())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t),o[r]&&Be.update(()=>o[r](s,a))};return pr(e.current,n,i,{passive:!e.getProps()[r]})}class sB extends Ti{mount(){this.unmount=ii(FE(this.node,!0),FE(this.node,!1))}unmount(){}}class aB extends Ti{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=ii(hr(this.node.current,"focus",()=>this.onFocus()),hr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const ev=(e,t)=>t?e===t?!0:ev(e,t.parentElement):!1;function dd(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Kc(n))}class oB extends Ti{constructor(){super(...arguments),this.removeStartListeners=Ye,this.removeEndListeners=Ye,this.removeAccessibleListeners=Ye,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),s=pr(window,"pointerup",(o,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();Be.update(()=>{ev(this.node.current,o.target)?u&&u(o,l):c&&c(o,l)})},{passive:!(r.onTap||r.onPointerUp)}),a=pr(window,"pointercancel",(o,l)=>this.cancelPress(o,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=ii(s,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const a=o=>{o.key!=="Enter"||!this.checkPressEnd()||dd("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&Be.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=hr(this.node.current,"keyup",a),dd("down",(o,l)=>{this.startPress(o,l)})},n=hr(this.node.current,"keydown",t),r=()=>{this.isPressing&&dd("cancel",(s,a)=>this.cancelPress(s,a))},i=hr(this.node.current,"blur",r);this.removeAccessibleListeners=ii(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&&Be.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Jb()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Be.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=pr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=hr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ii(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const qh=new WeakMap,hd=new WeakMap,lB=e=>{const t=qh.get(e.target);t&&t(e)},uB=e=>{e.forEach(lB)};function cB({root:e,...t}){const n=e||document;hd.has(n)||hd.set(n,{});const r=hd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(uB,{root:e,...t})),r[i]}function fB(e,t,n){const r=cB(t);return qh.set(e,n),r.observe(e),()=>{qh.delete(e),r.unobserve(e)}}const dB={some:0,all:1};class hB extends Ti{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:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:dB[i]},o=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return fB(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(mB(t,n))&&this.startObserver()}unmount(){}}function mB({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const pB={inView:{Feature:hB},tap:{Feature:oB},focus:{Feature:aB},hover:{Feature:sB}};function tv(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 gB(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function EB(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Wc(e,t,n){const r=e.getProps();return e0(r,t,n!==void 0?n:r.custom,gB(e),EB(e))}const TB="framerAppearId",yB="data-"+Zp(TB);let _B=Ye,t0=Ye;const si=e=>e*1e3,gr=e=>e/1e3,bB={current:!1},nv=e=>Array.isArray(e)&&typeof e[0]=="number";function rv(e){return!!(!e||typeof e=="string"&&iv[e]||nv(e)||Array.isArray(e)&&e.every(rv))}const Ja=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,iv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ja([0,.65,.55,1]),circOut:Ja([.55,0,1,.45]),backIn:Ja([.31,.01,.66,-.59]),backOut:Ja([.33,1.53,.69,.99])};function sv(e){if(e)return nv(e)?Ja(e):Array.isArray(e)?e.map(sv):iv[e]}function vB(e,t,n,{delay:r=0,duration:i,repeat:s=0,repeatType:a="loop",ease:o,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=sv(o);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}function SB(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const av=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,AB=1e-7,NB=12;function CB(e,t,n,r,i){let s,a,o=0;do a=t+(n-t)/2,s=av(a,r,i)-e,s>0?n=a:t=a;while(Math.abs(s)>AB&&++o<NB);return a}function Sl(e,t,n,r){if(e===t&&n===r)return Ye;const i=s=>CB(s,0,1,e,n);return s=>s===0||s===1?s:av(i(s),t,r)}const xB=Sl(.42,0,1,1),wB=Sl(0,0,.58,1),ov=Sl(.42,0,.58,1),kB=e=>Array.isArray(e)&&typeof e[0]!="number",lv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uv=e=>t=>1-e(1-t),cv=e=>1-Math.sin(Math.acos(e)),n0=uv(cv),OB=lv(n0),fv=Sl(.33,1.53,.69,.99),r0=uv(fv),IB=lv(r0),RB=e=>(e*=2)<1?.5*r0(e):.5*(2-Math.pow(2,-10*(e-1))),MB={linear:Ye,easeIn:xB,easeInOut:ov,easeOut:wB,circIn:cv,circInOut:OB,circOut:n0,backIn:r0,backInOut:IB,backOut:fv,anticipate:RB},BE=e=>{if(Array.isArray(e)){t0(e.length===4);const[t,n,r,i]=e;return Sl(t,n,r,i)}else if(typeof e=="string")return MB[e];return e},i0=(e,t)=>n=>!!(bl(n)&&IF.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),dv=(e,t,n)=>r=>{if(!bl(r))return r;const[i,s,a,o]=r.match(Vc);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},LB=e=>fi(0,255,e),md={...as,transform:e=>Math.round(LB(e))},Bi={test:i0("rgb","red"),parse:dv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+md.transform(e)+", "+md.transform(t)+", "+md.transform(n)+", "+bo(_o.transform(r))+")"};function PB(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 Qh={test:i0("#"),parse:PB,transform:Bi.transform},js={test:i0("hsl","hue"),parse:dv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qn.transform(bo(t))+", "+Qn.transform(bo(n))+", "+bo(_o.transform(r))+")"},Ct={test:e=>Bi.test(e)||Qh.test(e)||js.test(e),parse:e=>Bi.test(e)?Bi.parse(e):js.test(e)?js.parse(e):Qh.parse(e),transform:e=>bl(e)?e:e.hasOwnProperty("red")?Bi.transform(e):js.transform(e)},je=(e,t,n)=>-n*e+n*t+e;function pd(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 DB({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,a=0;if(!t)i=s=a=n;else{const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;i=pd(l,o,e+1/3),s=pd(l,o,e),a=pd(l,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}const gd=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},FB=[Qh,Bi,js],BB=e=>FB.find(t=>t.test(e));function UE(e){const t=BB(e);let n=t.parse(e);return t===js&&(n=DB(n)),n}const hv=(e,t)=>{const n=UE(e),r=UE(t),i={...n};return s=>(i.red=gd(n.red,r.red,s),i.green=gd(n.green,r.green,s),i.blue=gd(n.blue,r.blue,s),i.alpha=je(n.alpha,r.alpha,s),Bi.transform(i))};function UB(e){var t,n;return isNaN(e)&&bl(e)&&(((t=e.match(Vc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Hb))===null||n===void 0?void 0:n.length)||0)>0}const mv={regex:kF,countKey:"Vars",token:"${v}",parse:Ye},pv={regex:Hb,countKey:"Colors",token:"${c}",parse:Ct.parse},gv={regex:Vc,countKey:"Numbers",token:"${n}",parse:as.parse};function Ed(e,{regex:t,countKey:n,token:r,parse:i}){const s=e.tokenised.match(t);s&&(e["num"+n]=s.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...s.map(i)))}function zu(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Ed(n,mv),Ed(n,pv),Ed(n,gv),n}function Ev(e){return zu(e).values}function Tv(e){const{values:t,numColors:n,numVars:r,tokenised:i}=zu(e),s=t.length;return a=>{let o=i;for(let l=0;l<s;l++)l<r?o=o.replace(mv.token,a[l]):l<r+n?o=o.replace(pv.token,Ct.transform(a[l])):o=o.replace(gv.token,bo(a[l]));return o}}const HB=e=>typeof e=="number"?0:e;function zB(e){const t=Ev(e);return Tv(e)(t.map(HB))}const di={test:UB,parse:Ev,createTransformer:Tv,getAnimatableNone:zB},yv=(e,t)=>n=>`${n>0?t:e}`;function _v(e,t){return typeof e=="number"?n=>je(e,t,n):Ct.test(e)?hv(e,t):e.startsWith("var(")?yv(e,t):vv(e,t)}const bv=(e,t)=>{const n=[...e],r=n.length,i=e.map((s,a)=>_v(s,t[a]));return s=>{for(let a=0;a<r;a++)n[a]=i[a](s);return n}},jB=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=_v(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}},vv=(e,t)=>{const n=di.createTransformer(t),r=zu(e),i=zu(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?ii(bv(r.values,i.values),n):yv(e,t)},tl=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},HE=(e,t)=>n=>je(e,t,n);function $B(e){return typeof e=="number"?HE:typeof e=="string"?Ct.test(e)?hv:vv:Array.isArray(e)?bv:typeof e=="object"?jB:HE}function GB(e,t,n){const r=[],i=n||$B(e[0]),s=e.length-1;for(let a=0;a<s;a++){let o=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Ye:t;o=ii(l,o)}r.push(o)}return r}function Sv(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(t0(s===t.length),s===1)return()=>t[0];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=GB(t,r,i),o=a.length,l=u=>{let c=0;if(o>1)for(;c<e.length-2&&!(u<e[c+1]);c++);const f=tl(e[c],e[c+1],u);return a[c](f)};return n?u=>l(fi(e[0],e[s-1],u)):l}function VB(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=tl(0,t,r);e.push(je(n,1,i))}}function KB(e){const t=[0];return VB(t,e.length-1),t}function WB(e,t){return e.map(n=>n*t)}function YB(e,t){return e.map(()=>t||ov).splice(0,e.length-1)}function ju({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=kB(r)?r.map(BE):BE(r),s={done:!1,value:t[0]},a=WB(n&&n.length===t.length?n:KB(t),e),o=Sv(a,t,{ease:Array.isArray(i)?i:YB(t,i)});return{calculatedDuration:e,next:l=>(s.value=o(l),s.done=l>=e,s)}}function Av(e,t){return t?e*(1e3/t):0}const qB=5;function Nv(e,t,n){const r=Math.max(t-qB,0);return Av(n-e(r),t-r)}const Td=.001,QB=.01,zE=10,XB=.05,ZB=1;function JB({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,s;_B(e<=si(zE));let a=1-t;a=fi(XB,ZB,a),e=fi(QB,zE,gr(e)),a<1?(i=u=>{const c=u*a,f=c*e,d=c-n,h=Xh(u,a),p=Math.exp(-f);return Td-d/h*p},s=u=>{const f=u*a*e,d=f*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,p=Math.exp(-f),E=Xh(Math.pow(u,2),a);return(-i(u)+Td>0?-1:1)*((d-h)*p)/E}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Td+c*f},s=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const o=5/e,l=tU(i,s,o);if(e=si(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const eU=12;function tU(e,t,n){let r=n;for(let i=1;i<eU;i++)r=r-e(r)/t(r);return r}function Xh(e,t){return e*Math.sqrt(1-t*t)}const nU=["duration","bounce"],rU=["stiffness","damping","mass"];function jE(e,t){return t.some(n=>e[n]!==void 0)}function iU(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!jE(e,rU)&&jE(e,nU)){const n=JB(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Cv({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],s=e[e.length-1],a={done:!1,value:i},{stiffness:o,damping:l,mass:u,velocity:c,duration:f,isResolvedFromDuration:d}=iU(r),h=c?-gr(c):0,p=l/(2*Math.sqrt(o*u)),E=s-i,v=gr(Math.sqrt(o/u)),g=Math.abs(E)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let T;if(p<1){const y=Xh(v,p);T=A=>{const k=Math.exp(-p*v*A);return s-k*((h+p*v*E)/y*Math.sin(y*A)+E*Math.cos(y*A))}}else if(p===1)T=y=>s-Math.exp(-v*y)*(E+(h+v*E)*y);else{const y=v*Math.sqrt(p*p-1);T=A=>{const k=Math.exp(-p*v*A),S=Math.min(y*A,300);return s-k*((h+p*v*E)*Math.sinh(S)+y*E*Math.cosh(S))/y}}return{calculatedDuration:d&&f||null,next:y=>{const A=T(y);if(d)a.done=y>=f;else{let k=h;y!==0&&(p<1?k=Nv(T,y,A):k=0);const S=Math.abs(k)<=n,C=Math.abs(s-A)<=t;a.done=S&&C}return a.value=a.done?s:A,a}}}function $E({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=R=>o!==void 0&&R<o||l!==void 0&&R>l,p=R=>o===void 0?l:l===void 0||Math.abs(o-R)<Math.abs(l-R)?o:l;let E=n*t;const v=f+E,g=a===void 0?v:a(v);g!==v&&(E=g-f);const T=R=>-E*Math.exp(-R/r),y=R=>g+T(R),A=R=>{const F=T(R),I=y(R);d.done=Math.abs(F)<=u,d.value=d.done?g:I};let k,S;const C=R=>{h(d.value)&&(k=R,S=Cv({keyframes:[d.value,p(d.value)],velocity:Nv(y,R,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:R=>{let F=!1;return!S&&k===void 0&&(F=!0,A(R),C(R)),k!==void 0&&R>k?S.next(R-k):(!F&&A(R),d)}}}const sU=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Be.update(t,!0),stop:()=>Nr(t),now:()=>_t.isProcessing?_t.timestamp:performance.now()}},GE=2e4;function VE(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<GE;)t+=n,r=e.next(t);return t>=GE?1/0:t}const aU={decay:$E,inertia:$E,tween:ju,keyframes:ju,spring:Cv};function $u({autoplay:e=!0,delay:t=0,driver:n=sU,keyframes:r,type:i="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:o="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:f,...d}){let h=1,p=!1,E,v;const g=()=>{v=new Promise($=>{E=$})};g();let T;const y=aU[i]||ju;let A;y!==ju&&typeof r[0]!="number"&&(A=Sv([0,100],r,{clamp:!1}),r=[0,100]);const k=y({...d,keyframes:r});let S;o==="mirror"&&(S=y({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let C="idle",R=null,F=null,I=null;k.calculatedDuration===null&&s&&(k.calculatedDuration=VE(k));const{calculatedDuration:H}=k;let W=1/0,ee=1/0;H!==null&&(W=H+a,ee=W*(s+1)-a);let X=0;const q=$=>{if(F===null)return;h>0&&(F=Math.min(F,$)),h<0&&(F=Math.min($-ee/h,F)),R!==null?X=R:X=Math.round($-F)*h;const re=X-t*(h>=0?1:-1),x=h>=0?re<0:re>ee;X=Math.max(re,0),C==="finished"&&R===null&&(X=ee);let be=X,ve=k;if(s){const he=X/W;let gt=Math.floor(he),Et=he%1;!Et&&he>=1&&(Et=1),Et===1&&gt--,gt=Math.min(gt,s+1);const Jn=!!(gt%2);Jn&&(o==="reverse"?(Et=1-Et,a&&(Et-=a/W)):o==="mirror"&&(ve=S));let os=fi(0,1,Et);X>ee&&(os=o==="reverse"&&Jn?1:0),be=os*W}const le=x?{done:!1,value:r[0]}:ve.next(be);A&&(le.value=A(le.value));let{done:rt}=le;!x&&H!==null&&(rt=h>=0?X>=ee:X<=0);const Nt=R===null&&(C==="finished"||C==="running"&&rt);return f&&f(le.value),Nt&&M(),le},de=()=>{T&&T.stop(),T=void 0},D=()=>{C="idle",de(),E(),g(),F=I=null},M=()=>{C="finished",c&&c(),de(),E()},U=()=>{if(p)return;T||(T=n(q));const $=T.now();l&&l(),R!==null?F=$-R:(!F||C==="finished")&&(F=$),C==="finished"&&g(),I=F,R=null,C="running",T.start()};e&&U();const b={then($,re){return v.then($,re)},get time(){return gr(X)},set time($){$=si($),X=$,R!==null||!T||h===0?R=$:F=T.now()-$/h},get duration(){const $=k.calculatedDuration===null?VE(k):k.calculatedDuration;return gr($)},get speed(){return h},set speed($){$===h||!T||(h=$,b.time=gr(X))},get state(){return C},play:U,pause:()=>{C="paused",R=X},stop:()=>{p=!0,C!=="idle"&&(C="idle",u&&u(),D())},cancel:()=>{I!==null&&q(I),D()},complete:()=>{C="finished"},sample:$=>(F=0,q($))};return b}function oU(e){let t;return()=>(t===void 0&&(t=e()),t)}const lU=oU(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),uU=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),A1=10,cU=2e4,fU=(e,t)=>t.type==="spring"||e==="backgroundColor"||!rv(t.ease);function dU(e,t,{onUpdate:n,onComplete:r,...i}){if(!(lU()&&uU.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let a=!1,o,l;const u=()=>{l=new Promise(T=>{o=T})};u();let{keyframes:c,duration:f=300,ease:d,times:h}=i;if(fU(t,i)){const T=$u({...i,repeat:0,delay:0});let y={done:!1,value:c[0]};const A=[];let k=0;for(;!y.done&&k<cU;)y=T.sample(k),A.push(y.value),k+=A1;h=void 0,c=A,f=k-A1,d="linear"}const p=vB(e.owner.current,t,c,{...i,duration:f,ease:d,times:h}),E=()=>p.cancel(),v=()=>{Be.update(E),o(),u()};return p.onfinish=()=>{e.set(SB(c,i)),r&&r(),v()},{then(T,y){return l.then(T,y)},attachTimeline(T){return p.timeline=T,p.onfinish=null,Ye},get time(){return gr(p.currentTime||0)},set time(T){p.currentTime=si(T)},get speed(){return p.playbackRate},set speed(T){p.playbackRate=T},get duration(){return gr(f)},play:()=>{a||(p.play(),Nr(E))},pause:()=>p.pause(),stop:()=>{if(a=!0,p.playState==="idle")return;const{currentTime:T}=p;if(T){const y=$u({...i,autoplay:!1});e.setWithVelocity(y.sample(T-A1).value,y.sample(T).value,A1)}v()},complete:()=>p.finish(),cancel:v}}function hU({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:Ye,pause:Ye,stop:Ye,then:s=>(s(),Promise.resolve()),cancel:Ye,complete:Ye});return t?$u({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const mU={type:"spring",stiffness:500,damping:25,restSpeed:10},pU=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),gU={type:"keyframes",duration:.8},EU={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TU=(e,{keyframes:t})=>t.length>2?gU:ss.has(e)?e.startsWith("scale")?pU(t[1]):mU:EU,Zh=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(di.test(t)||t==="0")&&!t.startsWith("url(")),yU=new Set(["brightness","contrast","saturate","opacity"]);function _U(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vc)||[];if(!r)return e;const i=n.replace(r,"");let s=yU.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const bU=/([a-z-]*)\(.*?\)/g,Jh={...di,getAnimatableNone:e=>{const t=e.match(bU);return t?t.map(_U).join(" "):e}},vU={...zb,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:Jh,WebkitFilter:Jh},s0=e=>vU[e];function xv(e,t){let n=s0(e);return n!==Jh&&(n=di),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const wv=e=>/^0[^.\s]+$/.test(e);function SU(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||wv(e)}function AU(e,t,n,r){const i=Zh(t,n);let s;Array.isArray(n)?s=[...n]:s=[null,n];const a=r.from!==void 0?r.from:e.get();let o;const l=[];for(let u=0;u<s.length;u++)s[u]===null&&(s[u]=u===0?a:s[u-1]),SU(s[u])&&l.push(u),typeof s[u]=="string"&&s[u]!=="none"&&s[u]!=="0"&&(o=s[u]);if(i&&l.length&&o)for(let u=0;u<l.length;u++){const c=l[u];s[c]=xv(t,o)}return s}function NU({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:a,repeatDelay:o,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function kv(e,t){return e[t]||e.default||e}const a0=(e,t,n,r={})=>i=>{const s=kv(r,e)||{},a=s.delay||r.delay||0;let{elapsed:o=0}=r;o=o-si(a);const l=AU(t,e,n,s),u=l[0],c=l[l.length-1],f=Zh(e,u),d=Zh(e,c);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...s,delay:-o,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(NU(s)||(h={...h,...TU(e,h)}),h.duration&&(h.duration=si(h.duration)),h.repeatDelay&&(h.repeatDelay=si(h.repeatDelay)),!f||!d||bB.current||s.type===!1)return hU(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=dU(t,e,h);if(p)return p}return $u(h)};function Gu(e){return!!(jt(e)&&e.add)}const Ov=e=>/^\-?\d*\.?\d+$/.test(e);function o0(e,t){e.indexOf(t)===-1&&e.push(t)}function l0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class u0{constructor(){this.subscriptions=[]}add(t){return o0(this.subscriptions,t),()=>l0(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 s=0;s<i;s++){const a=this.subscriptions[s];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const CU=e=>!isNaN(parseFloat(e));class xU{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:s,timestamp:a}=_t;this.lastUpdated!==a&&(this.timeDelta=s,this.lastUpdated=a,Be.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=()=>Be.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=CU(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new u0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Be.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?Av(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 da(e,t){return new xU(e,t)}const Iv=e=>t=>t.test(e),wU={test:e=>e==="auto",parse:e=>e},Rv=[as,ae,Qn,Ur,MF,RF,wU],Va=e=>Rv.find(Iv(e)),kU=[...Rv,Ct,di],OU=e=>kU.find(Iv(e));function IU(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,da(n))}function RU(e,t){const n=Wc(e,t);let{transitionEnd:r={},transition:i={},...s}=n?e.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const a in s){const o=YF(s[a]);IU(e,a,o)}}function MU(e,t,n){var r,i;const s=Object.keys(t).filter(o=>!e.hasValue(o)),a=s.length;if(a)for(let o=0;o<a;o++){const l=s[o],u=t[l];let c=null;Array.isArray(u)&&(c=u[0]),c===null&&(c=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),c!=null&&(typeof c=="string"&&(Ov(c)||wv(c))?c=parseFloat(c):!OU(c)&&di.test(u)&&(c=xv(l,u)),e.addValue(l,da(c,{owner:e})),n[l]===void 0&&(n[l]=c),c!==null&&e.setBaseTarget(l,c))}}function LU(e,t){return t?(t[e]||t.default||t).from:void 0}function PU(e,t,n){const r={};for(const i in e){const s=LU(i,t);if(s!==void 0)r[i]=s;else{const a=n.getValue(i);a&&(r[i]=a.get())}}return r}function DU({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Mv(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...o}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(s=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in o){const d=e.getValue(f),h=o[f];if(!d||h===void 0||c&&DU(c,f))continue;const p={delay:n,elapsed:0,...s};if(window.HandoffAppearAnimations&&!d.hasAnimated){const v=e.getProps()[yB];v&&(p.elapsed=window.HandoffAppearAnimations(v,f,d,Be))}d.start(a0(f,d,h,e.shouldReduceMotion&&ss.has(f)?{type:!1}:p));const E=d.animation;Gu(l)&&(l.add(f),E.then(()=>l.remove(f))),u.push(E)}return a&&Promise.all(u).then(()=>{a&&RU(e,a)}),u}function em(e,t,n={}){const r=Wc(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Mv(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return FU(e,t,u+l,c,f,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[l,u]=o==="beforeChildren"?[s,a]:[a,s];return l().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function FU(e,t,n=0,r=0,i=1,s){const a=[],o=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>o-u*r;return Array.from(e.variantChildren).sort(BU).forEach((u,c)=>{u.notify("AnimationStart",t),a.push(em(u,t,{...s,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function BU(e,t){return e.sortNodePosition(t)}function UU(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>em(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=em(e,t,n);else{const i=typeof t=="function"?Wc(e,t,n.custom):t;r=Promise.all(Mv(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const HU=[...Vp].reverse(),zU=Vp.length;function jU(e){return t=>Promise.all(t.map(({animation:n,options:r})=>UU(e,n,r)))}function $U(e){let t=jU(e);const n=VU();let r=!0;const i=(l,u)=>{const c=Wc(e,u);if(c){const{transition:f,transitionEnd:d,...h}=c;l={...l,...h,...d}}return l};function s(l){t=l(e)}function a(l,u){const c=e.getProps(),f=e.getVariantContext(!0)||{},d=[],h=new Set;let p={},E=1/0;for(let g=0;g<zU;g++){const T=HU[g],y=n[T],A=c[T]!==void 0?c[T]:f[T],k=Jo(A),S=T===u?y.isActive:null;S===!1&&(E=g);let C=A===f[T]&&A!==c[T]&&k;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),y.protectedKeys={...p},!y.isActive&&S===null||!A&&!y.prevProp||$c(A)||typeof A=="boolean")continue;const R=GU(y.prevProp,A);let F=R||T===u&&y.isActive&&!C&&k||g>E&&k;const I=Array.isArray(A)?A:[A];let H=I.reduce(i,{});S===!1&&(H={});const{prevResolvedValues:W={}}=y,ee={...W,...H},X=q=>{F=!0,h.delete(q),y.needsAnimating[q]=!0};for(const q in ee){const de=H[q],D=W[q];p.hasOwnProperty(q)||(de!==D?Hu(de)&&Hu(D)?!tv(de,D)||R?X(q):y.protectedKeys[q]=!0:de!==void 0?X(q):h.add(q):de!==void 0&&h.has(q)?X(q):y.protectedKeys[q]=!0)}y.prevProp=A,y.prevResolvedValues=H,y.isActive&&(p={...p,...H}),r&&e.blockInitialAnimation&&(F=!1),F&&!C&&d.push(...I.map(q=>({animation:q,options:{type:T,...l}})))}if(h.size){const g={};h.forEach(T=>{const y=e.getBaseTarget(T);y!==void 0&&(g[T]=y)}),d.push({animation:g})}let v=!!d.length;return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function o(l,u,c){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=a(c,l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:a,setActive:o,setAnimateFunction:s,getState:()=>n}}function GU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!tv(t,e):!1}function Ai(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function VU(){return{animate:Ai(!0),whileInView:Ai(),whileHover:Ai(),whileTap:Ai(),whileDrag:Ai(),whileFocus:Ai(),exit:Ai()}}class KU extends Ti{constructor(t){super(t),t.animationState||(t.animationState=$U(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),$c(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 WU=0;class YU extends Ti{constructor(){super(...arguments),this.id=WU++}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 s=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const qU={animation:{Feature:KU},exit:{Feature:YU}},KE=(e,t)=>Math.abs(e-t);function QU(e,t){const n=KE(e.x,t.x),r=KE(e.y,t.y);return Math.sqrt(n**2+r**2)}class Lv{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 u=_d(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,f=QU(u.offset,{x:0,y:0})>=3;if(!c&&!f)return;const{point:d}=u,{timestamp:h}=_t;this.history.push({...d,timestamp:h});const{onStart:p,onMove:E}=this.handlers;c||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=yd(c,this.transformPagePoint),Be.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:d}=this.handlers,h=_d(u.type==="pointercancel"?this.lastMoveEventInfo:yd(c,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,h),d&&d(u,h)},!Qb(t))return;this.handlers=n,this.transformPagePoint=r;const i=Kc(t),s=yd(i,this.transformPagePoint),{point:a}=s,{timestamp:o}=_t;this.history=[{...a,timestamp:o}];const{onSessionStart:l}=n;l&&l(t,_d(s,this.history)),this.removeListeners=ii(pr(window,"pointermove",this.handlePointerMove),pr(window,"pointerup",this.handlePointerUp),pr(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Nr(this.updatePoint)}}function yd(e,t){return t?{point:t(e.point)}:e}function WE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _d({point:e},t){return{point:e,delta:WE(e,Pv(t)),offset:WE(e,XU(t)),velocity:ZU(t,.1)}}function XU(e){return e[0]}function Pv(e){return e[e.length-1]}function ZU(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Pv(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>si(t)));)n--;if(!r)return{x:0,y:0};const s=gr(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Jt(e){return e.max-e.min}function tm(e,t=0,n=.01){return Math.abs(e-t)<=n}function YE(e,t,n,r=.5){e.origin=r,e.originPoint=je(t.min,t.max,e.origin),e.scale=Jt(n)/Jt(t),(tm(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=je(n.min,n.max,e.origin)-e.originPoint,(tm(e.translate)||isNaN(e.translate))&&(e.translate=0)}function vo(e,t,n,r){YE(e.x,t.x,n.x,r?r.originX:void 0),YE(e.y,t.y,n.y,r?r.originY:void 0)}function qE(e,t,n){e.min=n.min+t.min,e.max=e.min+Jt(t)}function JU(e,t,n){qE(e.x,t.x,n.x),qE(e.y,t.y,n.y)}function QE(e,t,n){e.min=t.min-n.min,e.max=e.min+Jt(t)}function So(e,t,n){QE(e.x,t.x,n.x),QE(e.y,t.y,n.y)}function eH(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?je(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?je(n,e,r.max):Math.min(e,n)),e}function XE(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 tH(e,{top:t,left:n,bottom:r,right:i}){return{x:XE(e.x,n,i),y:XE(e.y,t,r)}}function ZE(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 nH(e,t){return{x:ZE(e.x,t.x),y:ZE(e.y,t.y)}}function rH(e,t){let n=.5;const r=Jt(e),i=Jt(t);return i>r?n=tl(t.min,t.max-r,e.min):r>i&&(n=tl(e.min,e.max-i,t.min)),fi(0,1,n)}function iH(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 nm=.35;function sH(e=nm){return e===!1?e=0:e===!0&&(e=nm),{x:JE(e,"left","right"),y:JE(e,"top","bottom")}}function JE(e,t,n){return{min:eT(e,t),max:eT(e,n)}}function eT(e,t){return typeof e=="number"?e:e[t]||0}const tT=()=>({translate:0,scale:1,origin:0,originPoint:0}),$s=()=>({x:tT(),y:tT()}),nT=()=>({min:0,max:0}),et=()=>({x:nT(),y:nT()});function jn(e){return[e("x"),e("y")]}function Dv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function aH({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function oH(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 bd(e){return e===void 0||e===1}function rm({scale:e,scaleX:t,scaleY:n}){return!bd(e)||!bd(t)||!bd(n)}function ki(e){return rm(e)||Fv(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Fv(e){return rT(e.x)||rT(e.y)}function rT(e){return e&&e!=="0%"}function Vu(e,t,n){const r=e-n,i=t*r;return n+i}function iT(e,t,n,r,i){return i!==void 0&&(e=Vu(e,i,r)),Vu(e,n,r)+t}function im(e,t=0,n=1,r,i){e.min=iT(e.min,t,n,r,i),e.max=iT(e.max,t,n,r,i)}function Bv(e,{x:t,y:n}){im(e.x,t.translate,t.scale,t.originPoint),im(e.y,n.translate,n.scale,n.originPoint)}function lH(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,a;for(let o=0;o<i;o++){s=n[o],a=s.projectionDelta;const l=s.instance;l&&l.style&&l.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Gs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Bv(e,a)),r&&ki(s.latestValues)&&Gs(e,s.latestValues))}t.x=sT(t.x),t.y=sT(t.y)}function sT(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function $r(e,t){e.min=e.min+t,e.max=e.max+t}function aT(e,t,[n,r,i]){const s=t[i]!==void 0?t[i]:.5,a=je(e.min,e.max,s);im(e,t[n],t[r],a,t.scale)}const uH=["x","scaleX","originX"],cH=["y","scaleY","originY"];function Gs(e,t){aT(e.x,t,uH),aT(e.y,t,cH)}function Uv(e,t){return Dv(oH(e.getBoundingClientRect(),t))}function fH(e,t,n){const r=Uv(e,n),{scroll:i}=t;return i&&($r(r.x,i.offset.x),$r(r.y,i.offset.y)),r}const dH=new WeakMap;class hH{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=et(),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(Kc(l,"page").point)},s=(l,u)=>{const{drag:c,dragPropagation:f,onDragStart:d}=this.getProps();if(c&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Zb(c),!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),jn(p=>{let E=this.getAxisMotionValue(p).get()||0;if(Qn.test(E)){const{projection:v}=this.visualElement;if(v&&v.layout){const g=v.layout.layoutBox[p];g&&(E=Jt(g)*(parseFloat(E)/100))}}this.originPoint[p]=E}),d&&Be.update(()=>d(l,u),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(l,u)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:d,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:p}=u;if(f&&this.currentDirection===null){this.currentDirection=mH(p),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),h&&h(l,u)},o=(l,u)=>this.stop(l,u);this.panSession=new Lv(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:o},{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:s}=this.getProps();s&&Be.update(()=>s(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||!N1(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=eH(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&zs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=tH(r.layoutBox,t):this.constraints=!1,this.elastic=sH(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&jn(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=iH(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!zs(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=fH(r,i.root,this.visualElement.getTransformPagePoint());let a=nH(i.layout.layoutBox,s);if(n){const o=n(aH(a));this.hasMutatedConstraints=!!o,o&&(a=Dv(o))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},u=jn(c=>{if(!N1(c,n,this.currentDirection))return;let f=l&&l[c]||{};a&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(a0(t,r,0,n))}stopAnimation(){jn(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){jn(n=>{const{drag:r}=this.getProps();if(!N1(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:o}=i.layout.layoutBox[n];s.set(t[n]-je(a,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zs(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};jn(a=>{const o=this.getAxisMotionValue(a);if(o){const l=o.get();i[a]=rH({min:l,max:l},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),jn(a=>{if(!N1(a,t,null))return;const o=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];o.set(je(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;dH.set(this.visualElement,this);const t=this.visualElement.current,n=pr(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();zs(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const a=hr(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(jn(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:a=nm,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:a,dragMomentum:o}}}function N1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function mH(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class pH extends Ti{constructor(t){super(t),this.removeGroupControls=Ye,this.removeListeners=Ye,this.controls=new hH(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ye}unmount(){this.removeGroupControls(),this.removeListeners()}}const oT=e=>(t,n)=>{e&&Be.update(()=>e(t,n))};class gH extends Ti{constructor(){super(...arguments),this.removePointerDownListener=Ye}onPointerDown(t){this.session=new Lv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:oT(t),onStart:oT(n),onMove:r,onEnd:(s,a)=>{delete this.session,i&&Be.update(()=>i(s,a))}}}mount(){this.removePointerDownListener=pr(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 EH(){const e=P.useContext(Gp);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=P.useId();return P.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Q1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ka={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const n=lT(e,t.target.x),r=lT(e,t.target.y);return`${n}% ${r}%`}},TH={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=di.parse(e);if(i.length>5)return r;const s=di.createTransformer(e),a=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;i[0+a]/=o,i[1+a]/=l;const u=je(o,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),s(i)}};class yH extends On.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;NF(_H),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Q1.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,a=r.projection;return a&&(a.isPresent=s,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Be.postRender(()=>{const o=a.getStack();(!o||!o.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 Hv(e){const[t,n]=EH(),r=P.useContext(Pb);return On.createElement(yH,{...e,layoutGroup:r,switchLayoutGroup:P.useContext(Db),isPresent:t,safeToRemove:n})}const _H={borderRadius:{...Ka,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ka,borderTopRightRadius:Ka,borderBottomLeftRadius:Ka,borderBottomRightRadius:Ka,boxShadow:TH},zv=["TopLeft","TopRight","BottomLeft","BottomRight"],bH=zv.length,uT=e=>typeof e=="string"?parseFloat(e):e,cT=e=>typeof e=="number"||ae.test(e);function vH(e,t,n,r,i,s){i?(e.opacity=je(0,n.opacity!==void 0?n.opacity:1,SH(r)),e.opacityExit=je(t.opacity!==void 0?t.opacity:1,0,AH(r))):s&&(e.opacity=je(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<bH;a++){const o=`border${zv[a]}Radius`;let l=fT(t,o),u=fT(n,o);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||cT(l)===cT(u)?(e[o]=Math.max(je(uT(l),uT(u),r),0),(Qn.test(u)||Qn.test(l))&&(e[o]+="%")):e[o]=u}(t.rotate||n.rotate)&&(e.rotate=je(t.rotate||0,n.rotate||0,r))}function fT(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const SH=jv(0,.5,n0),AH=jv(.5,.95,Ye);function jv(e,t,n){return r=>r<e?0:r>t?1:n(tl(e,t,r))}function dT(e,t){e.min=t.min,e.max=t.max}function sn(e,t){dT(e.x,t.x),dT(e.y,t.y)}function hT(e,t,n,r,i){return e-=t,e=Vu(e,1/n,r),i!==void 0&&(e=Vu(e,1/i,r)),e}function NH(e,t=0,n=1,r=.5,i,s=e,a=e){if(Qn.test(t)&&(t=parseFloat(t),t=je(a.min,a.max,t/100)-a.min),typeof t!="number")return;let o=je(s.min,s.max,r);e===s&&(o-=t),e.min=hT(e.min,t,n,o,i),e.max=hT(e.max,t,n,o,i)}function mT(e,t,[n,r,i],s,a){NH(e,t[n],t[r],t[i],t.scale,s,a)}const CH=["x","scaleX","originX"],xH=["y","scaleY","originY"];function pT(e,t,n,r){mT(e.x,t,CH,n?n.x:void 0,r?r.x:void 0),mT(e.y,t,xH,n?n.y:void 0,r?r.y:void 0)}function gT(e){return e.translate===0&&e.scale===1}function $v(e){return gT(e.x)&&gT(e.y)}function wH(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 Gv(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 ET(e){return Jt(e.x)/Jt(e.y)}class kH{constructor(){this.members=[]}add(t){o0(this.members,t),t.scheduleRender()}remove(t){if(l0(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 s=this.members[i];if(s.isPresent!==!1){r=s;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 TT(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y;if((i||s)&&(r=`translate3d(${i}px, ${s}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const a=e.x.scale*t.x,o=e.y.scale*t.y;return(a!==1||o!==1)&&(r+=`scale(${a}, ${o})`),r||"none"}const OH=(e,t)=>e.depth-t.depth;class IH{constructor(){this.children=[],this.isDirty=!1}add(t){o0(this.children,t),this.isDirty=!0}remove(t){l0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(OH),this.isDirty=!1,this.children.forEach(t)}}function RH(e,t){const n=performance.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Nr(r),e(s-t))};return Be.read(r,!0),()=>Nr(r)}function MH(e){window.MotionDebug&&window.MotionDebug.record(e)}function LH(e){return e instanceof SVGElement&&e.tagName!=="svg"}function PH(e,t,n){const r=jt(e)?e:da(e);return r.start(a0("",r,t,n)),r.animation}const yT=["","X","Y","Z"],_T=1e3;let DH=0;const Oi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Vv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},o=t==null?void 0:t()){this.id=DH++,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=()=>{Oi.totalNodes=Oi.resolvedTargetDeltas=Oi.recalculatedProjection=0,this.nodes.forEach(UH),this.nodes.forEach(GH),this.nodes.forEach(VH),this.nodes.forEach(HH),MH(Oi)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new IH)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new u0),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const l=this.eventHandlers.get(a);l&&l.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=LH(a),this.instance=a;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(u||l)&&(this.isLayoutDirty=!0),e){let f;const d=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=RH(d,250),Q1.hasAnimatedSinceResize&&(Q1.hasAnimatedSinceResize=!1,this.nodes.forEach(vT))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||c.getDefaultTransition()||QH,{onLayoutAnimationStart:v,onLayoutAnimationComplete:g}=c.getProps(),T=!this.targetLayout||!Gv(this.targetLayout,p)||h,y=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||d&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const A={...kv(E,"layout"),onPlay:v,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else d||vT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Nr(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(KH),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!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 c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bT);return}this.isUpdating||this.nodes.forEach(jH),this.isUpdating=!1,this.nodes.forEach($H),this.nodes.forEach(FH),this.nodes.forEach(BH),this.clearAllSnapshots();const o=performance.now();_t.delta=fi(0,1e3/60,o-_t.timestamp),_t.timestamp=o,_t.isProcessing=!0,fd.update.process(_t),fd.preRender.process(_t),fd.render.process(_t),_t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(zH),this.sharedNodes.forEach(WH)}scheduleUpdateProjection(){Be.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Be.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 a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=et(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform,o=this.projectionDelta&&!$v(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;a&&(o||ki(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return a&&(l=this.removeTransform(l)),XH(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return et();const o=a.measureViewportBox(),{scroll:l}=this.root;return l&&($r(o.x,l.offset.x),$r(o.y,l.offset.y)),o}removeElementScroll(a){const o=et();sn(o,a);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:f}=u;if(u!==this.root&&c&&f.layoutScroll){if(c.isRoot){sn(o,a);const{scroll:d}=this.root;d&&($r(o.x,-d.offset.x),$r(o.y,-d.offset.y))}$r(o.x,c.offset.x),$r(o.y,c.offset.y)}}return o}applyTransform(a,o=!1){const l=et();sn(l,a);for(let u=0;u<this.path.length;u++){const c=this.path[u];!o&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Gs(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),ki(c.latestValues)&&Gs(l,c.latestValues)}return ki(this.latestValues)&&Gs(l,this.latestValues),l}removeTransform(a){const o=et();sn(o,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ki(u.latestValues))continue;rm(u.latestValues)&&u.updateSnapshot();const c=et(),f=u.measurePageBox();sn(c,f),pT(o,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return ki(this.latestValues)&&pT(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==_t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var o;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=_t.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=et(),this.relativeTargetOrigin=et(),So(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),sn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=et(),this.targetWithTransforms=et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),JU(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sn(this.target,this.layout.layoutBox),Bv(this.target,this.targetDelta)):sn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=et(),this.relativeTargetOrigin=et(),So(this.relativeTargetOrigin,this.target,h.target),sn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Oi.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||rm(this.parent.latestValues)||Fv(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 a;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===_t.timestamp&&(u=!1),u)return;const{layout:c,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||!(c||f))return;sn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;lH(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox);const{target:p}=o;if(!p){this.projectionTransform&&(this.projectionDelta=$s(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=$s(),this.projectionDeltaWithTransform=$s());const E=this.projectionTransform;vo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=TT(this.projectionDelta,this.treeScale),(this.projectionTransform!==E||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Oi.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),a){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,o=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=$s();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const d=et(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,E=h!==p,v=this.getStack(),g=!v||v.members.length<=1,T=!!(E&&!g&&this.options.crossfade===!0&&!this.path.some(qH));this.animationProgress=0;let y;this.mixTargetDelta=A=>{const k=A/1e3;ST(f.x,a.x,k),ST(f.y,a.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(So(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),YH(this.relativeTarget,this.relativeTargetOrigin,d,k),y&&wH(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=et()),sn(y,this.relativeTarget)),E&&(this.animationValues=c,vH(c,u,this.latestValues,k,T,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Nr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Be.update(()=>{Q1.hasAnimatedSinceResize=!0,this.currentAnimation=PH(0,_T,{...a,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(_T),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:l,layout:u,latestValues:c}=a;if(!(!o||!l||!u)){if(this!==a&&this.layout&&u&&Kv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||et();const f=Jt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+f;const d=Jt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+d}sn(o,l),Gs(o,c),vo(this.projectionDeltaWithTransform,this.layoutCorrected,o,c)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new kH),this.sharedNodes.get(a).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(o=!0),!o)return;const u={};for(let c=0;c<yT.length;c++){const f="rotate"+yT[c];l[f]&&(u[f]=l[f],a.setStaticValue(f,0))}a.render();for(const c in u)a.setStaticValue(c,u[c]);a.scheduleRender()}getProjectionStyles(a={}){var o,l;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=q1(a.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const E={};return this.options.layoutId&&(E.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,E.pointerEvents=q1(a.pointerEvents)||""),this.hasProjected&&!ki(this.latestValues)&&(E.transform=c?c({},""):"none",this.hasProjected=!1),E}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=TT(this.projectionDeltaWithTransform,this.treeScale,d),c&&(u.transform=c(d,u.transform));const{x:h,y:p}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?u.opacity=f===this?(l=(o=d.opacity)!==null&&o!==void 0?o:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:u.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const E in Bu){if(d[E]===void 0)continue;const{correct:v,applyTo:g}=Bu[E],T=u.transform==="none"?d[E]:v(d[E],f);if(g){const y=g.length;for(let A=0;A<y;A++)u[g[A]]=T}else u[E]=T}return this.options.layoutId&&(u.pointerEvents=f===this?q1(a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(bT),this.root.sharedNodes.clear()}}}function FH(e){e.updateLayout()}function BH(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:s}=e.options,a=n.source!==e.layout.source;s==="size"?jn(f=>{const d=a?n.measuredBox[f]:n.layoutBox[f],h=Jt(d);d.min=r[f].min,d.max=d.min+h}):Kv(s,n.layoutBox,r)&&jn(f=>{const d=a?n.measuredBox[f]:n.layoutBox[f],h=Jt(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const o=$s();vo(o,r,n.layoutBox);const l=$s();a?vo(l,e.applyTransform(i,!0),n.measuredBox):vo(l,r,n.layoutBox);const u=!$v(o);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=et();So(p,n.layoutBox,d.layoutBox);const E=et();So(E,r,h.layoutBox),Gv(p,E)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:o,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function UH(e){Oi.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 HH(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zH(e){e.clearSnapshot()}function bT(e){e.clearMeasurements()}function jH(e){e.isLayoutDirty=!1}function $H(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function vT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function GH(e){e.resolveTargetDelta()}function VH(e){e.calcProjection()}function KH(e){e.resetRotation()}function WH(e){e.removeLeadSnapshot()}function ST(e,t,n){e.translate=je(t.translate,0,n),e.scale=je(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function AT(e,t,n,r){e.min=je(t.min,n.min,r),e.max=je(t.max,n.max,r)}function YH(e,t,n,r){AT(e.x,t.x,n.x,r),AT(e.y,t.y,n.y,r)}function qH(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const QH={duration:.45,ease:[.4,0,.1,1]},NT=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),CT=NT("applewebkit/")&&!NT("chrome/")?Math.round:Ye;function xT(e){e.min=CT(e.min),e.max=CT(e.max)}function XH(e){xT(e.x),xT(e.y)}function Kv(e,t,n){return e==="position"||e==="preserve-aspect"&&!tm(ET(t),ET(n),.2)}const ZH=Vv({attachResizeListener:(e,t)=>hr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),vd={current:void 0},Wv=Vv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!vd.current){const e=new ZH({});e.mount(window),e.setOptions({layoutScroll:!0}),vd.current=e}return vd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),JH={pan:{Feature:gH},drag:{Feature:pH,ProjectionNode:Wv,MeasureLayout:Hv}},ez=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function tz(e){const t=ez.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function sm(e,t,n=1){const[r,i]=tz(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return Ov(a)?parseFloat(a):a}else return Yh(i)?sm(i,t,n+1):i}function nz(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const s=i.get();if(!Yh(s))return;const a=sm(s,r);a&&i.set(a)});for(const i in t){const s=t[i];if(!Yh(s))continue;const a=sm(s,r);a&&(t[i]=a,n||(n={}),n[i]===void 0&&(n[i]=s))}return{target:t,transitionEnd:n}}const rz=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Yv=e=>rz.has(e),iz=e=>Object.keys(e).some(Yv),wT=e=>e===as||e===ae,kT=(e,t)=>parseFloat(e.split(", ")[t]),OT=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return kT(i[1],t);{const s=r.match(/^matrix\((.+)\)$/);return s?kT(s[1],e):0}},sz=new Set(["x","y","z"]),az=_l.filter(e=>!sz.has(e));function oz(e){const t=[];return az.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 ha={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:OT(4,13),y:OT(5,14)};ha.translateX=ha.x;ha.translateY=ha.y;const lz=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,s=getComputedStyle(i),{display:a}=s,o={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{o[u]=ha[u](r,s)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(o[u]),e[u]=ha[u](l,s)}),e},uz=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Yv);let s=[],a=!1;const o=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=n[l],f=Va(c);const d=t[l];let h;if(Hu(d)){const p=d.length,E=d[0]===null?1:0;c=d[E],f=Va(c);for(let v=E;v<p&&d[v]!==null;v++)h?t0(Va(d[v])===h):h=Va(d[v])}else h=Va(d);if(f!==h)if(wT(f)&&wT(h)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof d=="string"?t[l]=parseFloat(d):Array.isArray(d)&&h===ae&&(t[l]=d.map(parseFloat))}else f!=null&&f.transform&&(h!=null&&h.transform)&&(c===0||d===0)?c===0?u.set(h.transform(c)):t[l]=f.transform(d):(a||(s=oz(e),a=!0),o.push(l),r[l]=r[l]!==void 0?r[l]:t[l],u.jump(d))}),o.length){const l=o.indexOf("height")>=0?window.pageYOffset:null,u=lz(t,e,o);return s.length&&s.forEach(([c,f])=>{e.getValue(c).set(f)}),e.render(),jc&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function cz(e,t,n,r){return iz(t)?uz(e,t,n,r):{target:t,transitionEnd:r}}const fz=(e,t,n,r)=>{const i=nz(e,t,r);return t=i.target,r=i.transitionEnd,cz(e,t,n,r)},am={current:null},qv={current:!1};function dz(){if(qv.current=!0,!!jc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>am.current=e.matches;e.addListener(t),t()}else am.current=!1}function hz(e,t,n){const{willChange:r}=t;for(const i in t){const s=t[i],a=n[i];if(jt(s))e.addValue(i,s),Gu(r)&&r.add(i);else if(jt(a))e.addValue(i,da(s,{owner:e})),Gu(r)&&r.remove(i);else if(a!==s)if(e.hasValue(i)){const o=e.getValue(i);!o.hasAnimated&&o.set(s)}else{const o=e.getStaticValue(i);e.addValue(i,da(o!==void 0?o:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const IT=new WeakMap,Qv=Object.keys(el),mz=Qv.length,RT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],pz=Kp.length;class gz{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:s},a={}){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=()=>Be.render(this.render,!1,!0);const{latestValues:o,renderState:l}=s;this.latestValues=o,this.baseTarget={...o},this.initialValues=n.initial?{...o}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.isControllingVariants=Gc(n),this.isVariantNode=Lb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const f in c){const d=c[f];o[f]!==void 0&&jt(d)&&(d.set(o[f],!1),Gu(u)&&u.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,IT.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)),qv.current||dz(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:am.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){IT.delete(this.current),this.projection&&this.projection.unmount(),Nr(this.notifyUpdate),Nr(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=ss.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Be.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,s){let a,o;for(let l=0;l<mz;l++){const u=Qv[l],{isEnabled:c,Feature:f,ProjectionNode:d,MeasureLayout:h}=el[u];d&&(a=d),c(n)&&(!this.features[u]&&f&&(this.features[u]=new f(this)),h&&(o=h))}if(!this.projection&&a){this.projection=new a(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:c,dragConstraints:f,layoutScroll:d,layoutRoot:h}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||f&&zs(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:s,layoutScroll:d,layoutRoot:h})}return o}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):et()}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<RT.length;r++){const i=RT[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s=t["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=hz(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<pz;r++){const i=Kp[r],s=this.props[i];(Jo(s)||s===!1)&&(n[i]=s)}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=da(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=e0(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!jt(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new u0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Xv extends gz{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},s){let a=PU(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),s){MU(this,r,a);const o=fz(this,r,a,n);n=o.transitionEnd,r=o.target}return{transition:t,transitionEnd:n,...r}}}function Ez(e){return window.getComputedStyle(e)}class Tz extends Xv{readValueFromInstance(t,n){if(ss.has(n)){const r=s0(n);return r&&r.default||0}else{const r=Ez(t),i=(Ub(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Uv(t,n)}build(t,n,r,i){Yp(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Jp(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Vb(t,n,r,i)}}class yz extends Xv{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ss.has(n)){const r=s0(n);return r&&r.default||0}return n=Kb.has(n)?n:Zp(n),t.getAttribute(n)}measureInstanceViewportBox(){return et()}scrapeMotionValuesFromProps(t,n){return Yb(t,n)}build(t,n,r,i){Qp(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Wb(t,n,r,i)}mount(t){this.isSVGTag=Xp(t.tagName),super.mount(t)}}const _z=(e,t)=>Wp(e)?new yz(t,{enableHardwareAcceleration:!1}):new Tz(t,{enableHardwareAcceleration:!0}),bz={layout:{ProjectionNode:Wv,MeasureLayout:Hv}},vz={...qU,...pB,...JH,...bz},Sz=SF((e,t)=>nB(e,t,vz,_z)),Az=[{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}],Yc=({color:e})=>_.jsx("div",{className:"relative h-[34px] w-[34px]",role:"progressbar",children:Az.map(({position:t,delay:n},r)=>_.jsx(Sz.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))}),Nz=({initiallyCollapsed:e,title:t,grow:n,children:r,headerChildren:i,focusCommand:s})=>{const[a,o]=P.useState(e),l=P.useCallback(({data:u})=>{u.command===s&&o(()=>!1)},[s]);return P.useEffect(()=>{if(s)return window.addEventListener("message",l),()=>window.removeEventListener("message",l)},[s,l]),_.jsxs("section",{className:Ie("flex flex-col",n&&!a?"grow overflow-hidden":"grow-0"),children:[_.jsxs("header",{className:"flex flex-row items-center justify-between border-b border-b-ide-border px-2 py-1",children:[_.jsxs("div",{className:"flex cursor-pointer flex-row items-center gap-2 hover:opacity-80",onClick:()=>o(u=>!u),children:[a?_.jsx(He.ChevronRight,{}):_.jsx(He.ChevronDown,{}),_.jsx("h1",{className:"font-bold",children:t})]}),_.jsx("div",{className:Ie(a?"invisible":"visible"),children:i})]}),_.jsx("main",{className:Ie("flex flex-col",n&&!a&&"grow",a?"hidden":"block overflow-hidden"),children:r})]})},Cz={target:"languageServer",view:"app",request:"context"},xz={target:"languageServer",view:"app",request:"optIn"},wz={target:"extension",request:"openLink",linkType:"url",link:"https://sourcery.ai/dashboard"},kz={target:"languageServer",view:"app",request:"logIn"},Oz={target:"languageServer",view:"app",request:"accessDetailsOpened"},Iz={target:"languageServer",view:"chat",request:"initialise"},Rz={target:"languageServer",view:"chat",request:"clear"},Mz={target:"languageServer",view:"chat",request:"cancel"},Lz={target:"languageServer",view:"recipes",request:"initialise"},Zv={target:"languageServer",view:"review",request:"clear"},Pz={target:"languageServer",view:"review",request:"cancel"},MT={target:"languageServer",view:"troubleshooting",request:"initialise"},Dz={target:"languageServer",view:"troubleshooting",request:"reset"},LT=({message:e})=>{window.sourceryLS.postMessage({message:e})},Fz=()=>{const[{recipes:e,status:t},n]=P.useState({recipes:[],status:"pending"}),r=P.useCallback(({data:{command:i,recipes:s}})=>{switch(i){case"recipes/addRecipes":n(wt(a=>{a.status="ok",a.recipes=s}))}},[]);return P.useEffect(()=>(window.addEventListener("message",r),()=>window.removeEventListener("message",r)),[r]),P.useEffect(()=>{LT({message:Lz})},[]),_.jsx("section",{className:"h-fit grow overflow-y-auto p-2",children:t==="pending"?_.jsx("div",{className:"flex h-20 flex-col items-center justify-center",children:_.jsx(Yc,{})}):_.jsx("ul",{className:"flex flex-col gap-2",children:e.map(({id:i,name:s},a)=>_.jsx("li",{children:_.jsx("button",{className:"btn-primary w-full rounded border border-ide-primary-btn-border p-1 text-center",onClick:()=>{LT({message:{target:"languageServer",view:"chat",request:"executeRecipe",recipeId:i,name:s,trigger:"recipeViewButton"}})},children:s})},a))})})},Bz=({value:e=null,onChange:t=()=>{}})=>{const[n,r]=P.useState(e),i=P.useCallback(s=>()=>{r(()=>s),t(s)},[t]);return _.jsxs("div",{className:"flex flex-row items-center gap-1",children:[n==="liked"?_.jsx("button",{onClick:void 0,disabled:!0,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Remove Like":void 0,children:_.jsx(He.ThumbsUp.Solid,{})}):_.jsx("button",{onClick:i("liked"),disabled:n!==null,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Like":void 0,children:_.jsx(He.ThumbsUp.Regular,{})}),n==="disliked"?_.jsx("button",{onClick:void 0,disabled:!0,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Remove Dislike":void 0,children:_.jsx(He.ThumbsDown.Solid,{})}):_.jsx("button",{onClick:i("disliked"),disabled:n!==null,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Dislike":void 0,children:_.jsx(He.ThumbsDown.Regular,{})})]})},Uz=e=>e.contextType==="uri",Jv=e=>e.contextType==="location",Hz=e=>Uz(e)?e.uri:Jv(e)?e.location.uri:null,zz=e=>Jv(e)?e.location.range:null,jz=({message:e})=>{window.sourceryLS.postMessage({message:e})},e3=({contextIndicators:e,className:t})=>!e||!e.length?null:_.jsx("div",{className:Ie("flex flex-row gap-2 flex-wrap",t),children:e.map((n,r)=>{const i=Hz(n),s=i?()=>{jz({message:{target:"extension",request:"openLink",linkType:"file",link:i.slice(7),documentRange:zz(n)}})}:void 0;return _.jsxs("span",{className:Ie("text-sm text-ide-disabled-text",s&&"cursor-pointer hover:text-ide-primary-btn-bg"),onClick:s,children:[n.tag&&_.jsxs("span",{className:"font-bold",children:[n.tag,": "]}),n.label]},r)})}),nl=({message:e})=>{window.sourceryLS.postMessage({message:e})},PT=({message:{outcome:e,textContent:t,requestId:n,contextIndicators:r}})=>{const[i,s]=P.useState(!1),a=P.useCallback(o=>{n&&(nl({message:{target:"languageServer",view:"chat",request:"sendFeedback",feedback:o,requestId:n}}),s(!0))},[n]);return _.jsx("div",{className:"flex flex-row justify-start",children:_.jsxs("div",{className:Ie("assistant-message border border-ide-border relative flex flex-col",e==="error"?"bg-ide-error-bg":"bg-ide-chat-input-bg"),children:[_.jsx("div",{className:Ie(n?"mb-5":"mb-2"),children:t?_.jsx(Js,{markdown:t}):_.jsx(Ib,{})}),n&&_.jsxs("div",{className:"ml-auto mt-2 flex flex-col",title:i?void 0:"Send feedback on this result",children:[_.jsx("div",{className:"ml-auto",children:_.jsx(Bz,{onChange:a})}),i&&_.jsx("div",{children:_.jsx("a",{className:"break-words underline hover:cursor-pointer",href:`https://research.typeform.com/to/JmPsEwTM#chat_request=${n}`,children:"Give more feedback"})})]}),_.jsx(e3,{contextIndicators:r,className:"justify-start"})]})})},$z=({message:{textContent:e,contextIndicators:t}})=>_.jsx("div",{className:"flex flex-row justify-end",children:_.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:[_.jsx("p",{children:e}),_.jsx(e3,{contextIndicators:t,className:"justify-end"})]})}),Gz=()=>_.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:[_.jsx("span",{children:_.jsx(He.Cancel,{})}),_.jsx("span",{children:"Canceled"})]}),Vz=P.forwardRef((e,t)=>{const[n,r]=P.useState(),i=P.useRef(null),s=P.useRef(null),a=P.useCallback(()=>{var c;(c=s.current)==null||c.focus()},[]);P.useImperativeHandle(t,()=>({focus:a}),[a]);const o=P.useCallback(({data:c})=>{switch(c.command){case"chat/focus":a()}},[a]);P.useEffect(()=>(window.addEventListener("message",o),()=>window.removeEventListener("message",o)),[o]),P.useEffect(()=>(window.addEventListener("focus",a),()=>window.removeEventListener("focus",a)),[a]);const l=c=>{c.preventDefault(),n&&(nl({message:{target:"languageServer",view:"chat",request:"sendMessage",textContent:n}}),r(""))},u=P.useCallback(c=>{var f;c.key=="Enter"&&!c.shiftKey&&(c.preventDefault(),(f=i.current)==null||f.requestSubmit())},[]);return _.jsx("div",{className:"relative w-full",children:_.jsxs("form",{onSubmit:l,ref:i,autoFocus:!0,children:[_.jsx("textarea",{name:"chatPrompt",id:"chatPrompt",placeholder:"Type your message here!",className:"w-full rounded bg-ide-chat-input-bg p-2 pr-10 text-ide-chat-input-text",value:n,onChange:({target:{value:c}})=>r(c),onKeyDown:u,ref:s,autoFocus:!0}),_.jsx("button",{className:"absolute right-3 top-3",type:"submit",children:_.jsx(He.PaperPlane,{className:"h-4 w-4"})})]})})}),Kz=()=>_.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(),nl({message:Rz})},children:[_.jsx("span",{children:_.jsx(He.Plus,{})}),_.jsx("span",{children:"New Chat"})]}),Wz=P.forwardRef(({className:e},t)=>{const[{messages:n,currentMessage:r},i]=P.useState({messages:[],currentMessage:null}),s=P.useRef(null),a=gp(s),o=P.useRef(null),l=P.useCallback(c=>{switch(c.role){case"user":{i(wt(f=>{f.messages.push(c),f.currentMessage={role:"assistant",outcome:"success",textContent:""}})),s.current&&t_(s.current);break}case"assistant":i(wt(f=>{f.currentMessage&&c.outcome==="success"?f.currentMessage.textContent+=c.textContent:f.currentMessage&&f.currentMessage.textContent&&c.outcome==="error"?(f.messages.push(f.currentMessage,c),f.currentMessage=null):c.outcome==="error"?(f.messages.push(c),f.currentMessage=null):c.outcome==="finished"?(f.currentMessage&&f.currentMessage.textContent&&(f.currentMessage.requestId=c.requestId,f.currentMessage.contextIndicators=c.contextIndicators,f.messages.push(f.currentMessage)),f.currentMessage=null):f.currentMessage=c}))}},[]),u=P.useCallback(({data:c})=>{switch(c.command){case"chat/addMessage":l(c.message);break;case"chat/clear":i(wt(f=>{f.messages=[],f.currentMessage=null}));break;case"chat/notifyCancel":i(wt(f=>{f.currentMessage&&f.currentMessage.textContent.length&&(f.currentMessage.requestId=c.requestId||void 0,f.messages.push(f.currentMessage)),f.messages.push("cancellationNotification"),f.currentMessage=null}))}},[l]);return P.useImperativeHandle(t,()=>({focus:()=>{var c;(c=o.current)==null||c.focus()}})),P.useLayoutEffect(()=>{a()},[r==null?void 0:r.textContent,n.length,a]),P.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[u]),P.useEffect(()=>{nl({message:Iz})},[]),_.jsxs("div",{className:e,"data-testid":"chat-view",children:[n.length===0&&r===null?_.jsx("div",{className:"flex grow flex-col items-center justify-center gap-8",children:_.jsx(Yc,{})}):_.jsxs("section",{className:"flex grow flex-col gap-4 overflow-auto p-2",ref:s,children:[n.map((c,f)=>{if(c==="cancellationNotification")return _.jsx(Gz,{});switch(c.role){case"assistant":return _.jsx(PT,{message:c},f);case"user":return _.jsx($z,{message:c},f)}}),r&&_.jsx(PT,{message:r})]}),_.jsxs("footer",{className:Ie("flex grow-0 flex-col gap-2 border-t border-t-ide-border p-2"),children:[_.jsx("div",{className:"flex flex-row justify-center",children:_.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:c=>{var f;c.stopPropagation(),(f=o.current)==null||f.focus(),nl({message:Mz})},children:[_.jsx(He.CirclePause,{}),_.jsx("span",{children:"Cancel"})]})}),_.jsx(Vz,{ref:o})]}),_.jsx("div",{className:"flex h-1 w-full bg-ide-border"}),_.jsx(Nz,{title:"Recipes",children:_.jsx(Fz,{})})]})}),ma=({message:e})=>{window.sourceryLS.postMessage({message:e})},ea=({outcome:e,textContent:t})=>_.jsx("div",{className:"flex flex-row justify-start",children:_.jsx("div",{className:Ie("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:t?_.jsx(Js,{markdown:t}):_.jsx(Ib,{})})}),Yz=({comment:e,location:t,diff:n,importance:r,comment_type:i})=>{const[s,a]=P.useState(!1),[o,l]=P.useState(!1),u=P.useCallback(()=>{ma({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:"resolved"}}),a(f=>!f)},[]),c=P.useCallback(()=>{ma({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:"ignored"}}),l(f=>!f)},[]);return _.jsx("div",{className:Ie(o?"hidden":"flex flex-row justify-start"),children:_.jsxs("div",{className:Ie("rounded-lg-bl-none mr-4 w-fit max-w-full rounded-tl-lg rounded-tr-lg px-4 py-2",s&&"opacity-50","bg-ide-chat-input-bg"),children:[_.jsx(Js,{markdown:t}),_.jsx(Js,{markdown:n}),_.jsx("div",{className:"mt-2 flex flex-row gap-2",children:_.jsxs("span",{className:"text-sm",children:[_.jsx("span",{className:"font-bold",children:i}),_.jsx("span",{children:"("}),_.jsxs("span",{className:"italic",children:[r,"-importance"]}),_.jsx("span",{children:")"})]})}),_.jsx(Js,{markdown:e}),_.jsxs("div",{className:Ie(s?"hidden":"flex flex-row justify-end mt-2"),children:[_.jsxs("button",{onClick:c,title:"Ignore and hide this comment.",className:"flex flex-row items-center gap-1 rounded-l-full border-y border-r border-ide-border px-2 py-0.5 text-xs hover:opacity-80",children:[_.jsx(He.Cancel,{})," Skip"]}),_.jsxs("button",{onClick:u,title:"Mark this comment as resolved.",className:"flex flex-row items-center gap-1 rounded-r-full border-y border-ide-border px-2 py-0.5 text-xs hover:opacity-80",children:[_.jsx(He.Check,{})," Done"]})]})]})})},qz=({summary:e,running:t})=>e&&e.textContent?_.jsx(ea,{outcome:e.outcome,textContent:e.textContent,type:"text"}):t?_.jsx(ea,{outcome:"success",textContent:"Reviewing your code<br/><br/>Summary will appear here when complete...",type:"text"}):_.jsx(ea,{outcome:"success",textContent:"Review cancelled, no summary available.",type:"text"}),Qz=()=>_.jsxs("button",{className:"flex flex-row gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),ma({message:Zv})},children:[_.jsx("span",{children:_.jsx(He.Plus,{})}),_.jsx("span",{children:"New Review"})]}),Xz=()=>{const e=P.useCallback(t=>{t.preventDefault();const{comparison:n}=Object.fromEntries(new FormData(t.currentTarget).entries());ma({message:Zv}),ma({message:{target:"languageServer",view:"review",request:"review",comparisonType:n}})},[]);return _.jsxs("form",{className:"flex flex-col gap-2 p-2",onSubmit:e,children:[_.jsx("div",{className:"grid grid-cols-5 gap-2",children:_.jsxs("select",{name:"comparison",className:"col-span-5 rounded border border-ide-border bg-ide-editor-bg px-2 py-1",children:[_.jsx("option",{value:"default",children:"Compare current HEAD with default branch"}),_.jsx("option",{value:"head",children:"Compare uncommitted changes with HEAD"})]})}),_.jsx("button",{type:"submit",className:"btn-primary w-full border border-ide-border p-1",children:"Review My Code"})]})},Zz=()=>_.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:[_.jsx("span",{children:_.jsx(He.Cancel,{})}),_.jsx("span",{children:"Canceled"})]}),Jz=({className:e})=>{const[{overview:t,summary:n,comments:r,error:i,cancelled:s,running:a},o]=P.useState({overview:null,summary:null,comments:[],error:null,cancelled:!1,running:!1}),l=P.useRef(null),u=gp(l),c=P.useCallback(({data:f})=>{switch(console.log("review inbound message",f),f.command){case"review/addOverviewMessage":o(wt(d=>{d.running=!0,d.overview=f.message}));break;case"review/addSummaryMessage":o(wt(d=>{d.summary=f.message}));break;case"review/addCommentMessage":o(wt(d=>{d.comments.push(f.comment)}));break;case"review/addErrorMessage":o(wt(d=>{d.error=f.message}));break;case"review/clear":o(wt(()=>({overview:null,summary:null,comments:[],error:null,cancelled:!1,running:!1})));break;case"review/notifyCancel":o(wt(d=>{d.cancelled=!0}));break;case"review/notifyComplete":o(wt(d=>{d.running=!1}));break}},[]);return P.useLayoutEffect(()=>{u()},[r.length,u]),P.useEffect(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[c]),_.jsxs("div",{className:e,"data-testid":"review-view",children:[_.jsx("section",{className:"flex flex-col divide-y divide-ide-border",children:_.jsx(Xz,{})}),_.jsxs("section",{className:"flex grow flex-col gap-2 overflow-y-auto p-2",ref:l,children:[t&&_.jsxs(_.Fragment,{children:[_.jsx(ea,{outcome:t.outcome,textContent:t.textContent,type:"text"}),_.jsx(qz,{summary:n,running:a})]}),r.map((f,d)=>_.jsx(Yz,{...f.comment},d)),a&&_.jsx(ea,{outcome:"success",textContent:"",type:"text"}),s&&_.jsx(Zz,{}),i&&_.jsx(ea,{outcome:i.outcome,textContent:i.textContent,type:"text"})]}),_.jsx("footer",{className:Ie(a?"flex flex-row justify-center border-t border-ide-border":"hidden"),children:_.jsxs("button",{className:"flex w-fit flex-row items-center gap-2 p-1 hover:enabled:opacity-80 disabled:text-ide-disabled-text",onClick:()=>ma({message:Pz}),children:[_.jsx(He.Cancel,{}),_.jsx("span",{children:"Cancel"})]})})]})},ej=""+new URL("sourcery-logo.svg",import.meta.url).href,C1=({message:e})=>{window.sourceryLS.postMessage({message:e})},Sd=({label:e,labelProps:t})=>_.jsxs("div",{className:"flex flex-row items-center justify-between gap-3",children:[_.jsx("span",{...t,children:e}),_.jsx("div",{className:"flex h-6 w-6 flex-row items-center justify-center rounded-full bg-ide-highlight text-ide-window-bg",children:_.jsx(He.Check,{})})]}),x1=({label:e,labelProps:t})=>_.jsxs("div",{className:"flex flex-row items-center justify-between gap-3",children:[_.jsx("span",{...t,children:e}),_.jsx("div",{className:"flex h-6 w-6 flex-row items-center justify-center rounded-full bg-ide-disabled-text text-ide-window-bg",children:_.jsx(He.Minus,{})})]}),tj=({logo:e,appContext:{isFeatureFlagEnabled:t,isConfigEnabled:n,isAuthenticated:r,isAuthorized:i,productName:s}})=>{const a=P.useCallback(u=>{u.preventDefault(),C1({message:kz})},[]),o=P.useCallback(u=>{u.preventDefault(),C1({message:wz})},[]),l=P.useCallback(u=>{u.preventDefault(),C1({message:xz})},[]);return P.useEffect(()=>{C1({message:Oz})},[]),_.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:[e&&_.jsxs("div",{className:"my-4 -ml-1 flex flex-row items-center gap-[10px]",children:[_.jsx("div",{className:"h-8 w-8",children:_.jsx("img",{src:ej,alt:"Sourcery's Logo"})}),_.jsx("h1",{className:"font-bold",children:"Sourcery Coding Assistant"})]}),_.jsx("div",{className:"py-4",children:_.jsx("div",{className:"flex flex-col gap-4",children:r?_.jsx(Sd,{label:`Logged In: ${s||"Sourcery"} Account`}):_.jsxs(_.Fragment,{children:[_.jsx(x1,{label:"Not logged in"}),_.jsx("p",{className:"mt-2 text-sm",children:"You must log in to use Sourcery."}),_.jsx("p",{className:"text-sm",children:"Please log in or sign up for an account using the button below."}),_.jsx("form",{onSubmit:a,children:_.jsx("button",{className:"btn-primary px-3 py-1 font-bold",type:"submit",children:"Log In"})})]})})}),r&&_.jsx("div",{className:"py-4",children:_.jsx("div",{className:"flex flex-col gap-4",children:i?_.jsx(Sd,{label:"Project verified for account"}):_.jsxs(_.Fragment,{children:[_.jsx(x1,{label:"Project disabled for account"}),_.jsx("p",{className:"mt-2 text-sm",children:"Your Open Source Sourcery account can't be used for private projects."}),_.jsx("form",{onSubmit:o,children:_.jsx("button",{type:"submit",className:"btn-primary px-3 py-1 font-bold",children:"Upgrade"})})]})})}),!t&&_.jsx("div",{className:"py-4",children:_.jsxs("div",{className:Ie("flex flex-col gap-4",!r&&"opacity-40"),children:[_.jsx(x1,{label:"Feature Disabled"}),_.jsx("p",{className:"mt-2 text-sm",children:"Please get in touch with support@sourcery.ai to resolve this."})]})}),_.jsx("div",{className:"py-4",children:_.jsx("div",{className:Ie("flex flex-col gap-4",(!r||!t)&&"opacity-40"),children:n?_.jsx(Sd,{label:"Opt-in completed"}):_.jsxs(_.Fragment,{children:[_.jsx(x1,{label:"Opt-in not completed"}),_.jsx("p",{className:"mt-2 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."}),_.jsx("p",{className:"text-sm",children:"We only send code when you interact with Sourcery and we don't send off any code beyond what's necessary for your message."}),_.jsx("p",{className:"text-sm",children:"Sourcery does not store any of your code on its servers."}),_.jsxs("p",{className:"text-sm",children:["You can opt out at any time by editing your personal Sourcery configuration (",_.jsx("a",{href:"https://docs.sourcery.ai/Reference/Configuration/Sources/#user-configuration-file-system-locations",target:"_blank",className:"underline hover:text-ide-primary-btn-text",children:"documentation"}),")."]}),_.jsx("form",{onSubmit:l,children:_.jsx("button",{type:"submit",className:"btn-primary px-3 py-1 font-bold",disabled:!t||!r,children:"Opt In"})})]})})})]})},rl=({message:e})=>{window.sourceryLS.postMessage({message:e})},nj=()=>_.jsxs("button",{className:"flex flex-row gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),rl({message:Dz})},children:[_.jsx("span",{children:_.jsx(He.Plus,{})}),_.jsx("span",{children:"New Troubleshoot"})]}),rj=()=>{const[e,t]=P.useState(!1),n=P.useCallback(r=>{if(r.preventDefault(),e)return;t(()=>!0);const{yesno:i}=Object.fromEntries(new FormData(r.currentTarget).entries());rl({message:{target:"languageServer",view:"troubleshooting",request:"resume",promptValue:i==="yes"}})},[e]);return _.jsx("div",{className:Ie("ml-4 flex flex-row justify-end",e&&"hidden"),children:_.jsxs("div",{className:"rounded-lg-br-none flex flex-row gap-px bg-ide-chat-input-bg p-2",children:[_.jsxs("form",{onSubmit:n,children:[_.jsx("input",{type:"hidden",name:"yesno",value:"yes"}),_.jsx("button",{type:"submit",className:"btn-primary w-24 rounded-none rounded-l p-2",children:"Yes"})]}),_.jsxs("form",{onSubmit:n,children:[_.jsx("input",{type:"hidden",name:"yesno",value:"no"}),_.jsx("button",{type:"submit",className:"btn-primary w-24 rounded-none rounded-r p-2",children:"No"})]})]})})},ij=({message:{placeholder:e}})=>{const[t,n]=P.useState(!1),r=P.useCallback(s=>{if(s.preventDefault(),t)return;n(()=>!0);const{promptValue:a}=Object.fromEntries(new FormData(s.currentTarget).entries());a&&rl({message:{target:"languageServer",view:"troubleshooting",request:"resume",promptValue:a}})},[t]),i=s=>{var a;s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),(a=s.currentTarget.form)==null||a.requestSubmit())};return _.jsx("div",{className:Ie("ml-4 flex flex-row justify-end",t&&"hidden"),children:_.jsxs("form",{onSubmit:r,className:"rounded-lg-br-none relative flex w-full flex-col bg-ide-chat-input-bg p-2",children:[_.jsx("textarea",{name:"promptValue",className:"h-fit w-full resize-none rounded bg-ide-editor-bg p-2 pr-8",placeholder:e||"Ask anything.",autoFocus:!0,onKeyDown:i,disabled:t}),_.jsx("button",{type:"submit",className:"absolute bottom-6 right-6 text-ide-primary-btn-text hover:enabled:opacity-80",disabled:t,children:_.jsx(He.PaperPlane,{})})]})})},sj=({message:e})=>{switch(e.kind){case"yesno":return _.jsx(rj,{});case"text":return _.jsx(ij,{message:e})}},aj=({message:{textContent:e}})=>_.jsx("div",{className:"ml-4 flex flex-row justify-end",children:_.jsx("p",{className:"rounded-lg-br-none bg-ide-chat-input-bg px-4 py-2",children:e})}),oj=({message:{textContent:e,level:t}})=>{switch(t){case"feedback":return _.jsxs("div",{className:"hidden flex-row items-center gap-2 last:flex",children:[_.jsx("span",{children:_.jsx(He.CircleNotch,{className:"h-3 w-3 animate-[spin_0.5s_linear_infinite]"})}),_.jsx("span",{className:"italic",children:e})]});default:return _.jsx("div",{className:Ie("assistant-message",t==="error"?"bg-ide-error-bg":t==="warning"?"bg-ide-warning-bg":"bg-ide-chat-input-bg"),children:_.jsx(Js,{markdown:e})})}},lj=({className:e})=>{const[{messages:t},n]=P.useState({messages:[]}),r=P.useRef(null),i=gp(r),s=P.useCallback(({data:a})=>{switch(a.command){case"troubleshooting/reset":n(wt(o=>{o.messages=[]})),rl({message:MT});break;case"troubleshooting/addMessage":n(wt(o=>{o.messages.push(a.message)}))}},[]);return P.useLayoutEffect(()=>{i()},[t.length,i]),P.useEffect(()=>(window.addEventListener("message",s),()=>window.removeEventListener("message",s)),[s]),P.useEffect(()=>{rl({message:MT})},[]),t.length===0?_.jsx("section",{className:"flex grow flex-col items-center justify-center gap-8",children:_.jsx(Yc,{})}):_.jsx("div",{className:e,children:_.jsx("section",{className:"flex grow flex-col gap-2 overflow-auto p-2 pb-8",ref:r,children:t.map((a,o)=>{switch(a.type){case"assistant":return _.jsx(oj,{message:a},o);case"userInput":return _.jsx(sj,{message:a},o);case"user":return _.jsx(aj,{message:a},o)}})})})},uj=({intent:e="info",children:t})=>_.jsx("div",{className:Ie("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});window.sourceryLS=window.sourceryLS||{};const cj=({message:e})=>{window.sourceryLS.postMessage({message:e})},fj=({activeView:e,onSelect:t,isCodeReviewEnabled:n,isTroubleshootingEnabled:r})=>_.jsxs("div",{className:"flex flex-row flex-wrap items-center justify-between",children:[_.jsxs("div",{className:"flex grow flex-row flex-wrap gap-2 border-b border-ide-border px-2",children:[_.jsx("button",{className:Ie("px-2 py-2 font-bold",e==="chat"?"opacity-100":"opacity-80 hover:opacity-100"),onClick:t("chat"),children:"Chat"}),n&&_.jsx("button",{className:Ie("px-2 py-2 font-bold",e==="review"?"opacity-100":"opacity-80 hover:opacity-100"),onClick:t("review"),children:"Review"}),r&&_.jsx("button",{className:Ie("px-2 py-2 font-bold",e==="troubleshooting"?"opacity-100":"opacity-80 hover:opacity-100"),onClick:t("troubleshooting"),children:"Troubleshooting"})]}),_.jsx("div",{className:"flex grow flex-row justify-end border-b border-ide-border p-2",children:e==="chat"?_.jsx(Kz,{}):e==="review"?_.jsx(Qz,{}):e==="troubleshooting"?_.jsx(nj,{}):null})]}),dj=()=>{const[{status:e,appContext:t},n]=P.useState({status:"pending",appContext:{isFeatureFlagEnabled:!1,isAuthenticated:!1,isAuthorized:!1,isRepositoryOpenSource:!1,isConfigEnabled:!1,isCodeReviewEnabled:!1,isTroubleshootingEnabled:!1}}),[r,i]=P.useState("chat"),s=P.useRef(null),a=P.useMemo(()=>t.isFeatureFlagEnabled&&t.isAuthenticated&&t.isAuthorized&&t.isConfigEnabled,[t]),o=P.useMemo(()=>t.productStatus==="trialing"||t.product==="prod_free"||t.product==="prod_opensource",[t]),l=P.useMemo(()=>t.product==="prod_opensource"?"Sourcery for Open Source":"Sourcery Free Trial",[t]),u=P.useCallback(({data:c})=>{switch(c.command){case"chat/focus":i(()=>"chat");break;case"context/update":n(wt(f=>{f.status="ok",f.appContext={...f.appContext,...c.updates}}))}},[]);return P.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[u]),P.useEffect(()=>{cj({message:Cz})},[]),_.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:[o&&_.jsxs(uj,{children:[_.jsx("span",{children:_.jsx(He.InfoCircle,{})}),_.jsx("span",{children:l}),_.jsx("span",{children:"-"}),_.jsx("a",{href:"https://sourcery.ai/dashboard",className:"cursor-pointer underline",children:"Upgrade Now"})]}),e==="pending"?_.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-8",children:[_.jsx(Yc,{}),_.jsx("p",{className:"italic",children:"Loading..."})]}):a?_.jsxs(_.Fragment,{children:[_.jsx(fj,{activeView:r,onSelect:c=>()=>{i(c),c==="chat"&&setTimeout(()=>{var f;return(f=s.current)==null?void 0:f.focus()},25)},isCodeReviewEnabled:t.isCodeReviewEnabled,isTroubleshootingEnabled:t.isTroubleshootingEnabled}),_.jsx(Wz,{className:Ie(r==="chat"?"flex grow flex-col overflow-hidden":"hidden"),ref:s}),t.isCodeReviewEnabled&&_.jsx(Jz,{className:Ie(r==="review"?"flex grow flex-col overflow-hidden":"hidden")}),t.isTroubleshootingEnabled&&_.jsx(lj,{className:Ie(r==="troubleshooting"?"flex grow flex-col overflow-hidden":"hidden")})]}):_.jsx(tj,{logo:!0,appContext:t})]})};Ad.createRoot(document.getElementById("root")).render(_.jsx(On.StrictMode,{children:_.jsx(dj,{})}));
852
+ `:$D(e)?(o=2,l=2):yb(e)&&(o=1,l=1);++s<i.length;)a=a.concat(_b(i[s],e,{whitespace:r,breakBefore:s?void 0:o,breakAfter:s<i.length-1?Wh(i[s+1]):l}));return CE(e)&&SE(t,e,CE)&&a.push(" "),o&&a.unshift(o),l&&a.push(l),a}function bb(e,t){const n=String(e.value),r=[],i=[];let s=0;for(;s<=n.length;){AE.lastIndex=s;const l=AE.exec(n),u=l&&"index"in l?l.index:n.length;r.push(WD(n.slice(s,u).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,u===n.length?t.breakAfter:!0)),s=u+1}let a=-1,o;for(;++a<r.length;)r[a].charCodeAt(r[a].length-1)===8203||a<r.length-1&&r[a+1].charCodeAt(0)===8203?(i.push(r[a]),o=void 0):r[a]?(typeof o=="number"&&i.push(o),i.push(r[a]),o=0):(a===0||a===r.length-1)&&i.push(0);return i}function KD(e){return[String(e.value)]}function WD(e,t,n){const r=[];let i=0,s;for(;i<e.length;){NE.lastIndex=i;const a=NE.exec(e);s=a?a.index:e.length,!i&&!s&&a&&!t&&r.push(""),i!==s&&r.push(e.slice(i,s)),i=a?s+a[0].length:s}return i!==s&&!n&&r.push(""),r.join(" ")}function vb(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 YD(e){return!!(e.properties||{}).hidden}function qD(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const QD={}.hasOwnProperty;function XD(e={}){const{aliases:t,languages:n,prefix:r,plainText:i,ignoreMissing:s,subset:a,detect:o}=e;let l="hljs";if(t&&ce.registerAlias(t),n){let u;for(u in n)QD.call(n,u)&&ce.registerLanguage(u,n[u])}if(r){const u=r.indexOf("-");l=u>-1?r.slice(0,u):r}return(u,c)=>{pl(u,"element",(f,d,h)=>{const p=h;if(!p||!("tagName"in p)||p.tagName!=="pre"||f.tagName!=="code"||!f.properties)return;const E=ZD(f);if(E===!1||!E&&!o||E&&i&&i.includes(E))return;Array.isArray(f.properties.className)||(f.properties.className=[]),f.properties.className.includes(l)||f.properties.className.unshift(l);let v;try{v=E?ce.highlight(E,wE(p),{prefix:r}):ce.highlightAuto(wE(p),{prefix:r,subset:a})}catch(g){const T=g;(!s||!/Unknown language/.test(T.message))&&c.fail(T,f,"rehype-highlight:missing-language");return}!E&&v.data.language&&f.properties.className.push("language-"+v.data.language),Array.isArray(v.children)&&v.children.length>0&&(f.children=v.children)})}}function ZD(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 JD=e=>P.isValidElement(e)&&!!e.props.children,Fu=JD,eF=e=>P.isValidElement(e)&&Fu(e)&&P.Children.toArray(e.props.children).reduce((t,n)=>t||P.isValidElement(n),!1),yl=eF,Sb=(e,t)=>P.Children.toArray(e).filter(t).map(n=>P.isValidElement(n)&&yl(n)?P.cloneElement(n,{...n.props,children:Sb(n.props.children,t)}):n),Ab=Sb,Nb=(e,t)=>{let n;return P.Children.toArray(e).find((r,i,s)=>t(r,i,s)?(n=r,!0):P.isValidElement(r)&&yl(r)?(n=Nb(r.props.children,t),typeof n<"u"):!1),n},tF=Nb,Cb=(e,t)=>{P.Children.forEach(e,(n,r)=>{P.isValidElement(n)&&yl(n)&&Cb(n.props.children,t),t(n,r)})},nF=Cb,xb=(e,t)=>P.Children.toArray(e).map((n,r,i)=>P.isValidElement(n)&&yl(n)?t(P.cloneElement(n,{...n.props,children:xb(n.props.children,t)})):t(n,r,i)),rF=xb,iF=(e,t)=>P.Children.toArray(e).filter(t),sF=iF,aF=e=>P.isValidElement(e)?typeof e.type=="string"?e.type:e.type.name:null,wb=aF,oF=(e,t=[],n="rest")=>{const r=t.map(i=>typeof i=="string"?i:i.name);return P.Children.toArray(e).reduce((i,s)=>{const a=wb(s),o=a!==null&&r.includes(a)?a:n;return typeof i[o]>"u"&&(i[o]=[]),i[o]=[...i[o],s],i},{})},lF=oF,kE=e=>typeof e>"u"||e===null||typeof e=="boolean"||JSON.stringify(e)==="{}"?"":e.toString(),kb=e=>!(e instanceof Array)&&!P.isValidElement(e)?kE(e):P.Children.toArray(e).reduce((t,n)=>{let r="";return P.isValidElement(n)&&Fu(n)?r=kb(n.props.children):P.isValidElement(n)&&!Fu(n)?r="":r=kE(n),t.concat(r)},""),Ob=kb,uF=e=>Ab(e,t=>P.isValidElement(t)),cF=uF;({...P.Children});const fF=["className","hljs-addition","hljs-attr","hljs-attribute","hljs-built_in","hljs-bullet","hljs-char","hljs-code","hljs-comment","hljs-deletion","hljs-doctag","hljs-emphasis","hljs-formula","hljs-keyword","hljs-link","hljs-literal","hljs-meta","hljs-name","hljs-number","hljs-operator","hljs-params","hljs-property","hljs-punctuation","hljs-quote","hljs-regexp","hljs-section","hljs-selector-attr","hljs-selector-class","hljs-selector-id","hljs-selector-pseudo","hljs-selector-tag","hljs-string","hljs-strong","hljs-subst","hljs-symbol","hljs-tag","hljs-template-tag","hljs-template-variable","hljs-title","hljs-type","hljs-variable"],Hs=({message:e})=>{window.sourceryLS.postMessage({message:e})},dF=({copyValue:e})=>{const[t,n]=P.useState(!1);return _.jsx("button",{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:()=>{Hs({message:{target:"extension",request:"copyToClipboard",content:e}}),n(!0)},onBlur:()=>n(!1),children:t?_.jsx(He.Check,{}):_.jsx(He.Copy,{})})},hF=({copyValue:e})=>_.jsx("button",{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:()=>Hs({message:{target:"extension",request:"insertAtCursor",content:e}}),children:_.jsx(He.FileExport,{})}),Js=({markdown:e})=>{var t,n;return _.jsx($_,{remarkPlugins:[RO],rehypePlugins:[dL,[XD,{ignoreMissing:!0}],[SL,{protocols:{...Us.protocols,href:[...((t=Us.protocols)==null?void 0:t.src)||[],"file"]},attributes:{...Us.attributes,span:[...((n=Us.attributes)==null?void 0:n.span)||[],fF]}}]],transformLinkUri:r=>r.startsWith("https")||r.startsWith("file")||r==="VALID_FILE"||r==="VALID_FILE_WITH_LINE_NUMBER"||r==="VALID_DIRECTORY"?r:"",components:{h1({children:r}){return _.jsx("h1",{className:"mb-2 mt-6 text-lg font-bold first:mt-0 last:mb-0",children:r})},h2({children:r}){return _.jsx("h2",{className:"mt-2 font-bold first:mt-0",children:r})},h3({children:r}){return _.jsx("h3",{className:"mt-2 font-bold first:mt-0",children:r})},h4({children:r}){return _.jsx("h4",{className:"mt-2 font-bold first:mt-0",children:r})},h5({children:r}){return _.jsx("h5",{className:"mt-2 font-bold first:mt-0",children:r})},h6({children:r}){return _.jsx("h6",{className:"mt-2 font-bold first:mt-0",children:r})},ul({children:r}){return _.jsx("ul",{className:"list-disc pl-5",children:r})},ol({children:r}){return _.jsx("ol",{className:"list-disc pl-5",children:r})},p({children:r}){return _.jsx("p",{className:"mt-2 first:mt-0",children:r})},code({inline:r,className:i,children:s,...a}){const o=Ob(s);return r?_.jsx("code",{...a,className:i,children:o}):_.jsxs("div",{className:"group relative",children:[_.jsx("pre",{className:Ie(i,"border-ide-border bg-ide-editor-bg my-4 overflow-x-auto rounded border px-4 py-3"),children:_.jsx("code",{children:s})}),_.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:[_.jsx(dF,{copyValue:o}),_.jsx(hF,{copyValue:o})]})]})},a({href:r,children:i}){if(!r)return _.jsx("span",{className:"bg-ide-error-bg text-ide-error-text",children:"[Missing link]"});if(r.startsWith("https"))return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:()=>Hs({message:{target:"extension",request:"openLink",link:r,linkType:"url",documentRange:null}}),children:i});if(r.startsWith("file"))return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:()=>Hs({message:{target:"extension",request:"openLink",linkType:"file",link:r.slice(7),documentRange:null}}),children:i});if(r==="VALID_FILE"||r==="VALID_FILE_WITH_LINE_NUMBER"){const s=String(i).replace(/\n$/,""),[a,o]=s.split(":"),l=parseInt(o,10)-1,u=isNaN(l)?null:{start:{line:l,character:0},end:{line:l,character:0}};return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:c=>{c.preventDefault(),Hs({message:{target:"extension",request:"openLink",link:a,linkType:"file",documentRange:u}})},children:i})}if(r==="VALID_DIRECTORY"){const s=String(i).replace(/\n$/,"");return _.jsx("a",{className:"break-words underline hover:cursor-pointer",onClick:a=>{a.preventDefault(),Hs({message:{target:"extension",request:"openLink",link:s,linkType:"directory",documentRange:null}})},children:i})}return _.jsx("span",{className:"bg-ide-error-bg text-ide-error-text",children:"[Invalid link]"})}},children:e})},Ib=()=>_.jsxs("div",{className:"flex h-[1.5rem] flex-row items-center gap-1",children:[_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0s"}}),_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0.2s"}}),_.jsx("span",{className:"inline-block h-2 w-2 animate-oscillate-y rounded-full bg-ide-chat-input-text",style:{animationDelay:"0.4s"}})]}),Rb=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),zc=P.createContext({}),Gp=P.createContext(null),jc=typeof document<"u",mF=jc?P.useLayoutEffect:P.useEffect,Mb=P.createContext({strict:!1});function pF(e,t,n,r){const{visualElement:i}=P.useContext(zc),s=P.useContext(Mb),a=P.useContext(Gp),o=P.useContext(Rb).reducedMotion,l=P.useRef();r=r||s.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:o}));const u=l.current;P.useInsertionEffect(()=>{u&&u.update(n,a)});const c=P.useRef(!!window.HandoffAppearAnimations);return mF(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),P.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,c.current=!1)}),u}function zs(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gF(e,t,n){return P.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):zs(n)&&(n.current=r))},[t])}function Jo(e){return typeof e=="string"||Array.isArray(e)}function $c(e){return typeof e=="object"&&typeof e.start=="function"}const Vp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kp=["initial",...Vp];function Gc(e){return $c(e.animate)||Kp.some(t=>Jo(e[t]))}function Lb(e){return!!(Gc(e)||e.variants)}function EF(e,t){if(Gc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Jo(n)?n:void 0,animate:Jo(r)?r:void 0}}return e.inherit!==!1?t:{}}function TF(e){const{initial:t,animate:n}=EF(e,P.useContext(zc));return P.useMemo(()=>({initial:t,animate:n}),[OE(t),OE(n)])}function OE(e){return Array.isArray(e)?e.join(" "):e}const IE={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"]},el={};for(const e in IE)el[e]={isEnabled:t=>IE[e].some(n=>!!t[n])};function yF(e){for(const t in e)el[t]={...el[t],...e[t]}}const Pb=P.createContext({}),Db=P.createContext({}),_F=Symbol.for("motionComponentSymbol");function bF({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&yF(e);function s(o,l){let u;const c={...P.useContext(Rb),...o,layoutId:vF(o)},{isStatic:f}=c,d=TF(o),h=r(o,f);if(!f&&jc){d.visualElement=pF(i,h,c,t);const p=P.useContext(Db),E=P.useContext(Mb).strict;d.visualElement&&(u=d.visualElement.loadFeatures(c,E,e,p))}return P.createElement(zc.Provider,{value:d},u&&d.visualElement?P.createElement(u,{visualElement:d.visualElement,...c}):null,n(i,o,gF(h,d.visualElement,l),h,f,d.visualElement))}const a=P.forwardRef(s);return a[_F]=i,a}function vF({layoutId:e}){const t=P.useContext(Pb).id;return t&&e!==void 0?t+"-"+e:e}function SF(e){function t(r,i={}){return bF(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 AF=["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 Wp(e){return typeof e!="string"||e.includes("-")?!1:!!(AF.indexOf(e)>-1||/[A-Z]/.test(e))}const Bu={};function NF(e){Object.assign(Bu,e)}const _l=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ss=new Set(_l);function Fb(e,{layout:t,layoutId:n}){return ss.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Bu[e]||e==="opacity")}const jt=e=>!!(e&&e.getVelocity),CF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xF=_l.length;function wF(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let s="";for(let a=0;a<xF;a++){const o=_l[a];if(e[o]!==void 0){const l=CF[o]||o;s+=`${l}(${e[o]}) `}}return t&&!e.z&&(s+="translateZ(0)"),s=s.trim(),i?s=i(e,r?"":s):n&&r&&(s="none"),s}const Bb=e=>t=>typeof t=="string"&&t.startsWith(e),Ub=Bb("--"),Yh=Bb("var(--"),kF=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,OF=(e,t)=>t&&typeof e=="number"?t.transform(e):e,fi=(e,t,n)=>Math.min(Math.max(n,e),t),as={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},_o={...as,transform:e=>fi(0,1,e)},v1={...as,default:1},bo=e=>Math.round(e*1e5)/1e5,Vc=/(-)?([\d]*\.?[\d])+/g,Hb=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,IF=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function bl(e){return typeof e=="string"}const vl=e=>({test:t=>bl(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ur=vl("deg"),Qn=vl("%"),ae=vl("px"),RF=vl("vh"),MF=vl("vw"),RE={...Qn,parse:e=>Qn.parse(e)/100,transform:e=>Qn.transform(e*100)},ME={...as,transform:Math.round},zb={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,size:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,rotate:Ur,rotateX:Ur,rotateY:Ur,rotateZ:Ur,scale:v1,scaleX:v1,scaleY:v1,scaleZ:v1,skew:Ur,skewX:Ur,skewY:Ur,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:_o,originX:RE,originY:RE,originZ:ae,zIndex:ME,fillOpacity:_o,strokeOpacity:_o,numOctaves:ME};function Yp(e,t,n,r){const{style:i,vars:s,transform:a,transformOrigin:o}=e;let l=!1,u=!1,c=!0;for(const f in t){const d=t[f];if(Ub(f)){s[f]=d;continue}const h=zb[f],p=OF(d,h);if(ss.has(f)){if(l=!0,a[f]=p,!c)continue;d!==(h.default||0)&&(c=!1)}else f.startsWith("origin")?(u=!0,o[f]=p):i[f]=p}if(t.transform||(l||r?i.transform=wF(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:d="50%",originZ:h=0}=o;i.transformOrigin=`${f} ${d} ${h}`}}const qp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jb(e,t,n){for(const r in t)!jt(t[r])&&!Fb(r,n)&&(e[r]=t[r])}function LF({transformTemplate:e},t,n){return P.useMemo(()=>{const r=qp();return Yp(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function PF(e,t,n){const r=e.style||{},i={};return jb(i,r,e),Object.assign(i,LF(e,t,n)),e.transformValues?e.transformValues(i):i}function DF(e,t,n){const r={},i=PF(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 FF=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 Uu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||FF.has(e)}let $b=e=>!Uu(e);function BF(e){e&&($b=t=>t.startsWith("on")?!Uu(t):e(t))}try{BF(require("@emotion/is-prop-valid").default)}catch{}function UF(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||($b(i)||n===!0&&Uu(i)||!t&&!Uu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function LE(e,t,n){return typeof e=="string"?e:ae.transform(t+n*e)}function HF(e,t,n){const r=LE(t,e.x,e.width),i=LE(n,e.y,e.height);return`${r} ${i}`}const zF={offset:"stroke-dashoffset",array:"stroke-dasharray"},jF={offset:"strokeDashoffset",array:"strokeDasharray"};function $F(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?zF:jF;e[s.offset]=ae.transform(-r);const a=ae.transform(t),o=ae.transform(n);e[s.array]=`${a} ${o}`}function Qp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:a,pathSpacing:o=1,pathOffset:l=0,...u},c,f,d){if(Yp(e,u,c,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:E}=e;h.transform&&(E&&(p.transform=h.transform),delete h.transform),E&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=HF(E,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),a!==void 0&&$F(h,a,o,l,!1)}const Gb=()=>({...qp(),attrs:{}}),Xp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function GF(e,t,n,r){const i=P.useMemo(()=>{const s=Gb();return Qp(s,t,{enableHardwareAcceleration:!1},Xp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};jb(s,e.style,e),i.style={...s,...i.style}}return i}function VF(e=!1){return(n,r,i,{latestValues:s},a)=>{const l=(Wp(n)?GF:DF)(r,s,a,n),c={...UF(r,typeof n=="string",e),...l,ref:i},{children:f}=r,d=P.useMemo(()=>jt(f)?f.get():f,[f]);return P.createElement(n,{...c,children:d})}}const Zp=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Vb(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Kb=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 Wb(e,t,n,r){Vb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Kb.has(i)?i:Zp(i),t.attrs[i])}function Jp(e,t){const{style:n}=e,r={};for(const i in n)(jt(n[i])||t.style&&jt(t.style[i])||Fb(i,e))&&(r[i]=n[i]);return r}function Yb(e,t){const n=Jp(e,t);for(const r in e)if(jt(e[r])||jt(t[r])){const i=_l.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function e0(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 KF(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const Hu=e=>Array.isArray(e),WF=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),YF=e=>Hu(e)?e[e.length-1]||0:e;function q1(e){const t=jt(e)?e.get():e;return WF(t)?t.toValue():t}function qF({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,s){const a={latestValues:QF(r,i,s,e),renderState:t()};return n&&(a.mount=o=>n(r,o,a)),a}const qb=e=>(t,n)=>{const r=P.useContext(zc),i=P.useContext(Gp),s=()=>qF(e,t,r,i);return n?s():KF(s)};function QF(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=q1(s[d]);let{initial:a,animate:o}=e;const l=Gc(e),u=Lb(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),o===void 0&&(o=t.animate));let c=n?n.initial===!1:!1;c=c||a===!1;const f=c?o:a;return f&&typeof f!="boolean"&&!$c(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=e0(e,h);if(!p)return;const{transitionEnd:E,transition:v,...g}=p;for(const T in g){let y=g[T];if(Array.isArray(y)){const A=c?y.length-1:0;y=y[A]}y!==null&&(i[T]=y)}for(const T in E)i[T]=E[T]}),i}const Ye=e=>e;function XF(e){let t=[],n=[],r=0,i=!1,s=!1;const a=new WeakSet,o={schedule:(l,u=!1,c=!1)=>{const f=c&&i,d=f?t:n;return u&&a.add(l),d.indexOf(l)===-1&&(d.push(l),f&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const c=t[u];c(l),a.has(c)&&(o.schedule(c),e())}i=!1,s&&(s=!1,o.process(l))}};return o}const S1=["prepare","read","update","preRender","render","postRender"],ZF=40;function JF(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=S1.reduce((f,d)=>(f[d]=XF(()=>n=!0),f),{}),a=f=>s[f].process(i),o=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,ZF),1),i.timestamp=f,i.isProcessing=!0,S1.forEach(a),i.isProcessing=!1,n&&t&&(r=!1,e(o))},l=()=>{n=!0,r=!0,i.isProcessing||e(o)};return{schedule:S1.reduce((f,d)=>{const h=s[d];return f[d]=(p,E=!1,v=!1)=>(n||l(),h.schedule(p,E,v)),f},{}),cancel:f=>S1.forEach(d=>s[d].cancel(f)),state:i,steps:s}}const{schedule:Be,cancel:Nr,state:_t,steps:fd}=JF(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ye,!0),eB={useVisualState:qb({scrapeMotionValuesFromProps:Yb,createRenderState:Gb,onMount:(e,t,{renderState:n,latestValues:r})=>{Be.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Be.render(()=>{Qp(n,r,{enableHardwareAcceleration:!1},Xp(t.tagName),e.transformTemplate),Wb(t,n)})}})},tB={useVisualState:qb({scrapeMotionValuesFromProps:Jp,createRenderState:qp})};function nB(e,{forwardMotionProps:t=!1},n,r){return{...Wp(e)?eB:tB,preloadedFeatures:n,useRender:VF(t),createVisualElement:r,Component:e}}function hr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Qb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Kc(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const rB=e=>t=>Qb(t)&&e(t,Kc(t));function pr(e,t,n,r){return hr(e,t,rB(n),r)}const iB=(e,t)=>n=>t(e(n)),ii=(...e)=>e.reduce(iB);function Xb(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const PE=Xb("dragHorizontal"),DE=Xb("dragVertical");function Zb(e){let t=!1;if(e==="y")t=DE();else if(e==="x")t=PE();else{const n=PE(),r=DE();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Jb(){const e=Zb(!0);return e?(e(),!1):!0}class Ti{constructor(t){this.isMounted=!1,this.node=t}update(){}}function FE(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(s,a)=>{if(s.type==="touch"||Jb())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t),o[r]&&Be.update(()=>o[r](s,a))};return pr(e.current,n,i,{passive:!e.getProps()[r]})}class sB extends Ti{mount(){this.unmount=ii(FE(this.node,!0),FE(this.node,!1))}unmount(){}}class aB extends Ti{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=ii(hr(this.node.current,"focus",()=>this.onFocus()),hr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const ev=(e,t)=>t?e===t?!0:ev(e,t.parentElement):!1;function dd(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Kc(n))}class oB extends Ti{constructor(){super(...arguments),this.removeStartListeners=Ye,this.removeEndListeners=Ye,this.removeAccessibleListeners=Ye,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),s=pr(window,"pointerup",(o,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();Be.update(()=>{ev(this.node.current,o.target)?u&&u(o,l):c&&c(o,l)})},{passive:!(r.onTap||r.onPointerUp)}),a=pr(window,"pointercancel",(o,l)=>this.cancelPress(o,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=ii(s,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const a=o=>{o.key!=="Enter"||!this.checkPressEnd()||dd("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&Be.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=hr(this.node.current,"keyup",a),dd("down",(o,l)=>{this.startPress(o,l)})},n=hr(this.node.current,"keydown",t),r=()=>{this.isPressing&&dd("cancel",(s,a)=>this.cancelPress(s,a))},i=hr(this.node.current,"blur",r);this.removeAccessibleListeners=ii(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&&Be.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Jb()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Be.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=pr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=hr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ii(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const qh=new WeakMap,hd=new WeakMap,lB=e=>{const t=qh.get(e.target);t&&t(e)},uB=e=>{e.forEach(lB)};function cB({root:e,...t}){const n=e||document;hd.has(n)||hd.set(n,{});const r=hd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(uB,{root:e,...t})),r[i]}function fB(e,t,n){const r=cB(t);return qh.set(e,n),r.observe(e),()=>{qh.delete(e),r.unobserve(e)}}const dB={some:0,all:1};class hB extends Ti{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:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:dB[i]},o=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return fB(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(mB(t,n))&&this.startObserver()}unmount(){}}function mB({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const pB={inView:{Feature:hB},tap:{Feature:oB},focus:{Feature:aB},hover:{Feature:sB}};function tv(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 gB(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function EB(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Wc(e,t,n){const r=e.getProps();return e0(r,t,n!==void 0?n:r.custom,gB(e),EB(e))}const TB="framerAppearId",yB="data-"+Zp(TB);let _B=Ye,t0=Ye;const si=e=>e*1e3,gr=e=>e/1e3,bB={current:!1},nv=e=>Array.isArray(e)&&typeof e[0]=="number";function rv(e){return!!(!e||typeof e=="string"&&iv[e]||nv(e)||Array.isArray(e)&&e.every(rv))}const Ja=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,iv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ja([0,.65,.55,1]),circOut:Ja([.55,0,1,.45]),backIn:Ja([.31,.01,.66,-.59]),backOut:Ja([.33,1.53,.69,.99])};function sv(e){if(e)return nv(e)?Ja(e):Array.isArray(e)?e.map(sv):iv[e]}function vB(e,t,n,{delay:r=0,duration:i,repeat:s=0,repeatType:a="loop",ease:o,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=sv(o);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}function SB(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const av=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,AB=1e-7,NB=12;function CB(e,t,n,r,i){let s,a,o=0;do a=t+(n-t)/2,s=av(a,r,i)-e,s>0?n=a:t=a;while(Math.abs(s)>AB&&++o<NB);return a}function Sl(e,t,n,r){if(e===t&&n===r)return Ye;const i=s=>CB(s,0,1,e,n);return s=>s===0||s===1?s:av(i(s),t,r)}const xB=Sl(.42,0,1,1),wB=Sl(0,0,.58,1),ov=Sl(.42,0,.58,1),kB=e=>Array.isArray(e)&&typeof e[0]!="number",lv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uv=e=>t=>1-e(1-t),cv=e=>1-Math.sin(Math.acos(e)),n0=uv(cv),OB=lv(n0),fv=Sl(.33,1.53,.69,.99),r0=uv(fv),IB=lv(r0),RB=e=>(e*=2)<1?.5*r0(e):.5*(2-Math.pow(2,-10*(e-1))),MB={linear:Ye,easeIn:xB,easeInOut:ov,easeOut:wB,circIn:cv,circInOut:OB,circOut:n0,backIn:r0,backInOut:IB,backOut:fv,anticipate:RB},BE=e=>{if(Array.isArray(e)){t0(e.length===4);const[t,n,r,i]=e;return Sl(t,n,r,i)}else if(typeof e=="string")return MB[e];return e},i0=(e,t)=>n=>!!(bl(n)&&IF.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),dv=(e,t,n)=>r=>{if(!bl(r))return r;const[i,s,a,o]=r.match(Vc);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},LB=e=>fi(0,255,e),md={...as,transform:e=>Math.round(LB(e))},Bi={test:i0("rgb","red"),parse:dv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+md.transform(e)+", "+md.transform(t)+", "+md.transform(n)+", "+bo(_o.transform(r))+")"};function PB(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 Qh={test:i0("#"),parse:PB,transform:Bi.transform},js={test:i0("hsl","hue"),parse:dv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qn.transform(bo(t))+", "+Qn.transform(bo(n))+", "+bo(_o.transform(r))+")"},Ct={test:e=>Bi.test(e)||Qh.test(e)||js.test(e),parse:e=>Bi.test(e)?Bi.parse(e):js.test(e)?js.parse(e):Qh.parse(e),transform:e=>bl(e)?e:e.hasOwnProperty("red")?Bi.transform(e):js.transform(e)},je=(e,t,n)=>-n*e+n*t+e;function pd(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 DB({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,a=0;if(!t)i=s=a=n;else{const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;i=pd(l,o,e+1/3),s=pd(l,o,e),a=pd(l,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}const gd=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},FB=[Qh,Bi,js],BB=e=>FB.find(t=>t.test(e));function UE(e){const t=BB(e);let n=t.parse(e);return t===js&&(n=DB(n)),n}const hv=(e,t)=>{const n=UE(e),r=UE(t),i={...n};return s=>(i.red=gd(n.red,r.red,s),i.green=gd(n.green,r.green,s),i.blue=gd(n.blue,r.blue,s),i.alpha=je(n.alpha,r.alpha,s),Bi.transform(i))};function UB(e){var t,n;return isNaN(e)&&bl(e)&&(((t=e.match(Vc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Hb))===null||n===void 0?void 0:n.length)||0)>0}const mv={regex:kF,countKey:"Vars",token:"${v}",parse:Ye},pv={regex:Hb,countKey:"Colors",token:"${c}",parse:Ct.parse},gv={regex:Vc,countKey:"Numbers",token:"${n}",parse:as.parse};function Ed(e,{regex:t,countKey:n,token:r,parse:i}){const s=e.tokenised.match(t);s&&(e["num"+n]=s.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...s.map(i)))}function zu(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Ed(n,mv),Ed(n,pv),Ed(n,gv),n}function Ev(e){return zu(e).values}function Tv(e){const{values:t,numColors:n,numVars:r,tokenised:i}=zu(e),s=t.length;return a=>{let o=i;for(let l=0;l<s;l++)l<r?o=o.replace(mv.token,a[l]):l<r+n?o=o.replace(pv.token,Ct.transform(a[l])):o=o.replace(gv.token,bo(a[l]));return o}}const HB=e=>typeof e=="number"?0:e;function zB(e){const t=Ev(e);return Tv(e)(t.map(HB))}const di={test:UB,parse:Ev,createTransformer:Tv,getAnimatableNone:zB},yv=(e,t)=>n=>`${n>0?t:e}`;function _v(e,t){return typeof e=="number"?n=>je(e,t,n):Ct.test(e)?hv(e,t):e.startsWith("var(")?yv(e,t):vv(e,t)}const bv=(e,t)=>{const n=[...e],r=n.length,i=e.map((s,a)=>_v(s,t[a]));return s=>{for(let a=0;a<r;a++)n[a]=i[a](s);return n}},jB=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=_v(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}},vv=(e,t)=>{const n=di.createTransformer(t),r=zu(e),i=zu(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?ii(bv(r.values,i.values),n):yv(e,t)},tl=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},HE=(e,t)=>n=>je(e,t,n);function $B(e){return typeof e=="number"?HE:typeof e=="string"?Ct.test(e)?hv:vv:Array.isArray(e)?bv:typeof e=="object"?jB:HE}function GB(e,t,n){const r=[],i=n||$B(e[0]),s=e.length-1;for(let a=0;a<s;a++){let o=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Ye:t;o=ii(l,o)}r.push(o)}return r}function Sv(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(t0(s===t.length),s===1)return()=>t[0];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=GB(t,r,i),o=a.length,l=u=>{let c=0;if(o>1)for(;c<e.length-2&&!(u<e[c+1]);c++);const f=tl(e[c],e[c+1],u);return a[c](f)};return n?u=>l(fi(e[0],e[s-1],u)):l}function VB(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=tl(0,t,r);e.push(je(n,1,i))}}function KB(e){const t=[0];return VB(t,e.length-1),t}function WB(e,t){return e.map(n=>n*t)}function YB(e,t){return e.map(()=>t||ov).splice(0,e.length-1)}function ju({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=kB(r)?r.map(BE):BE(r),s={done:!1,value:t[0]},a=WB(n&&n.length===t.length?n:KB(t),e),o=Sv(a,t,{ease:Array.isArray(i)?i:YB(t,i)});return{calculatedDuration:e,next:l=>(s.value=o(l),s.done=l>=e,s)}}function Av(e,t){return t?e*(1e3/t):0}const qB=5;function Nv(e,t,n){const r=Math.max(t-qB,0);return Av(n-e(r),t-r)}const Td=.001,QB=.01,zE=10,XB=.05,ZB=1;function JB({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,s;_B(e<=si(zE));let a=1-t;a=fi(XB,ZB,a),e=fi(QB,zE,gr(e)),a<1?(i=u=>{const c=u*a,f=c*e,d=c-n,h=Xh(u,a),p=Math.exp(-f);return Td-d/h*p},s=u=>{const f=u*a*e,d=f*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,p=Math.exp(-f),E=Xh(Math.pow(u,2),a);return(-i(u)+Td>0?-1:1)*((d-h)*p)/E}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Td+c*f},s=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const o=5/e,l=tU(i,s,o);if(e=si(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const eU=12;function tU(e,t,n){let r=n;for(let i=1;i<eU;i++)r=r-e(r)/t(r);return r}function Xh(e,t){return e*Math.sqrt(1-t*t)}const nU=["duration","bounce"],rU=["stiffness","damping","mass"];function jE(e,t){return t.some(n=>e[n]!==void 0)}function iU(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!jE(e,rU)&&jE(e,nU)){const n=JB(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Cv({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],s=e[e.length-1],a={done:!1,value:i},{stiffness:o,damping:l,mass:u,velocity:c,duration:f,isResolvedFromDuration:d}=iU(r),h=c?-gr(c):0,p=l/(2*Math.sqrt(o*u)),E=s-i,v=gr(Math.sqrt(o/u)),g=Math.abs(E)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let T;if(p<1){const y=Xh(v,p);T=A=>{const k=Math.exp(-p*v*A);return s-k*((h+p*v*E)/y*Math.sin(y*A)+E*Math.cos(y*A))}}else if(p===1)T=y=>s-Math.exp(-v*y)*(E+(h+v*E)*y);else{const y=v*Math.sqrt(p*p-1);T=A=>{const k=Math.exp(-p*v*A),S=Math.min(y*A,300);return s-k*((h+p*v*E)*Math.sinh(S)+y*E*Math.cosh(S))/y}}return{calculatedDuration:d&&f||null,next:y=>{const A=T(y);if(d)a.done=y>=f;else{let k=h;y!==0&&(p<1?k=Nv(T,y,A):k=0);const S=Math.abs(k)<=n,C=Math.abs(s-A)<=t;a.done=S&&C}return a.value=a.done?s:A,a}}}function $E({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=R=>o!==void 0&&R<o||l!==void 0&&R>l,p=R=>o===void 0?l:l===void 0||Math.abs(o-R)<Math.abs(l-R)?o:l;let E=n*t;const v=f+E,g=a===void 0?v:a(v);g!==v&&(E=g-f);const T=R=>-E*Math.exp(-R/r),y=R=>g+T(R),A=R=>{const F=T(R),I=y(R);d.done=Math.abs(F)<=u,d.value=d.done?g:I};let k,S;const C=R=>{h(d.value)&&(k=R,S=Cv({keyframes:[d.value,p(d.value)],velocity:Nv(y,R,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:R=>{let F=!1;return!S&&k===void 0&&(F=!0,A(R),C(R)),k!==void 0&&R>k?S.next(R-k):(!F&&A(R),d)}}}const sU=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Be.update(t,!0),stop:()=>Nr(t),now:()=>_t.isProcessing?_t.timestamp:performance.now()}},GE=2e4;function VE(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<GE;)t+=n,r=e.next(t);return t>=GE?1/0:t}const aU={decay:$E,inertia:$E,tween:ju,keyframes:ju,spring:Cv};function $u({autoplay:e=!0,delay:t=0,driver:n=sU,keyframes:r,type:i="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:o="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:f,...d}){let h=1,p=!1,E,v;const g=()=>{v=new Promise($=>{E=$})};g();let T;const y=aU[i]||ju;let A;y!==ju&&typeof r[0]!="number"&&(A=Sv([0,100],r,{clamp:!1}),r=[0,100]);const k=y({...d,keyframes:r});let S;o==="mirror"&&(S=y({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let C="idle",R=null,F=null,I=null;k.calculatedDuration===null&&s&&(k.calculatedDuration=VE(k));const{calculatedDuration:H}=k;let W=1/0,ee=1/0;H!==null&&(W=H+a,ee=W*(s+1)-a);let X=0;const q=$=>{if(F===null)return;h>0&&(F=Math.min(F,$)),h<0&&(F=Math.min($-ee/h,F)),R!==null?X=R:X=Math.round($-F)*h;const re=X-t*(h>=0?1:-1),x=h>=0?re<0:re>ee;X=Math.max(re,0),C==="finished"&&R===null&&(X=ee);let be=X,ve=k;if(s){const he=X/W;let gt=Math.floor(he),Et=he%1;!Et&&he>=1&&(Et=1),Et===1&&gt--,gt=Math.min(gt,s+1);const Jn=!!(gt%2);Jn&&(o==="reverse"?(Et=1-Et,a&&(Et-=a/W)):o==="mirror"&&(ve=S));let os=fi(0,1,Et);X>ee&&(os=o==="reverse"&&Jn?1:0),be=os*W}const le=x?{done:!1,value:r[0]}:ve.next(be);A&&(le.value=A(le.value));let{done:rt}=le;!x&&H!==null&&(rt=h>=0?X>=ee:X<=0);const Nt=R===null&&(C==="finished"||C==="running"&&rt);return f&&f(le.value),Nt&&M(),le},de=()=>{T&&T.stop(),T=void 0},D=()=>{C="idle",de(),E(),g(),F=I=null},M=()=>{C="finished",c&&c(),de(),E()},U=()=>{if(p)return;T||(T=n(q));const $=T.now();l&&l(),R!==null?F=$-R:(!F||C==="finished")&&(F=$),C==="finished"&&g(),I=F,R=null,C="running",T.start()};e&&U();const b={then($,re){return v.then($,re)},get time(){return gr(X)},set time($){$=si($),X=$,R!==null||!T||h===0?R=$:F=T.now()-$/h},get duration(){const $=k.calculatedDuration===null?VE(k):k.calculatedDuration;return gr($)},get speed(){return h},set speed($){$===h||!T||(h=$,b.time=gr(X))},get state(){return C},play:U,pause:()=>{C="paused",R=X},stop:()=>{p=!0,C!=="idle"&&(C="idle",u&&u(),D())},cancel:()=>{I!==null&&q(I),D()},complete:()=>{C="finished"},sample:$=>(F=0,q($))};return b}function oU(e){let t;return()=>(t===void 0&&(t=e()),t)}const lU=oU(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),uU=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),A1=10,cU=2e4,fU=(e,t)=>t.type==="spring"||e==="backgroundColor"||!rv(t.ease);function dU(e,t,{onUpdate:n,onComplete:r,...i}){if(!(lU()&&uU.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let a=!1,o,l;const u=()=>{l=new Promise(T=>{o=T})};u();let{keyframes:c,duration:f=300,ease:d,times:h}=i;if(fU(t,i)){const T=$u({...i,repeat:0,delay:0});let y={done:!1,value:c[0]};const A=[];let k=0;for(;!y.done&&k<cU;)y=T.sample(k),A.push(y.value),k+=A1;h=void 0,c=A,f=k-A1,d="linear"}const p=vB(e.owner.current,t,c,{...i,duration:f,ease:d,times:h}),E=()=>p.cancel(),v=()=>{Be.update(E),o(),u()};return p.onfinish=()=>{e.set(SB(c,i)),r&&r(),v()},{then(T,y){return l.then(T,y)},attachTimeline(T){return p.timeline=T,p.onfinish=null,Ye},get time(){return gr(p.currentTime||0)},set time(T){p.currentTime=si(T)},get speed(){return p.playbackRate},set speed(T){p.playbackRate=T},get duration(){return gr(f)},play:()=>{a||(p.play(),Nr(E))},pause:()=>p.pause(),stop:()=>{if(a=!0,p.playState==="idle")return;const{currentTime:T}=p;if(T){const y=$u({...i,autoplay:!1});e.setWithVelocity(y.sample(T-A1).value,y.sample(T).value,A1)}v()},complete:()=>p.finish(),cancel:v}}function hU({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:Ye,pause:Ye,stop:Ye,then:s=>(s(),Promise.resolve()),cancel:Ye,complete:Ye});return t?$u({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const mU={type:"spring",stiffness:500,damping:25,restSpeed:10},pU=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),gU={type:"keyframes",duration:.8},EU={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TU=(e,{keyframes:t})=>t.length>2?gU:ss.has(e)?e.startsWith("scale")?pU(t[1]):mU:EU,Zh=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(di.test(t)||t==="0")&&!t.startsWith("url(")),yU=new Set(["brightness","contrast","saturate","opacity"]);function _U(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vc)||[];if(!r)return e;const i=n.replace(r,"");let s=yU.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const bU=/([a-z-]*)\(.*?\)/g,Jh={...di,getAnimatableNone:e=>{const t=e.match(bU);return t?t.map(_U).join(" "):e}},vU={...zb,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:Jh,WebkitFilter:Jh},s0=e=>vU[e];function xv(e,t){let n=s0(e);return n!==Jh&&(n=di),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const wv=e=>/^0[^.\s]+$/.test(e);function SU(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||wv(e)}function AU(e,t,n,r){const i=Zh(t,n);let s;Array.isArray(n)?s=[...n]:s=[null,n];const a=r.from!==void 0?r.from:e.get();let o;const l=[];for(let u=0;u<s.length;u++)s[u]===null&&(s[u]=u===0?a:s[u-1]),SU(s[u])&&l.push(u),typeof s[u]=="string"&&s[u]!=="none"&&s[u]!=="0"&&(o=s[u]);if(i&&l.length&&o)for(let u=0;u<l.length;u++){const c=l[u];s[c]=xv(t,o)}return s}function NU({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:a,repeatDelay:o,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function kv(e,t){return e[t]||e.default||e}const a0=(e,t,n,r={})=>i=>{const s=kv(r,e)||{},a=s.delay||r.delay||0;let{elapsed:o=0}=r;o=o-si(a);const l=AU(t,e,n,s),u=l[0],c=l[l.length-1],f=Zh(e,u),d=Zh(e,c);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...s,delay:-o,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(NU(s)||(h={...h,...TU(e,h)}),h.duration&&(h.duration=si(h.duration)),h.repeatDelay&&(h.repeatDelay=si(h.repeatDelay)),!f||!d||bB.current||s.type===!1)return hU(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=dU(t,e,h);if(p)return p}return $u(h)};function Gu(e){return!!(jt(e)&&e.add)}const Ov=e=>/^\-?\d*\.?\d+$/.test(e);function o0(e,t){e.indexOf(t)===-1&&e.push(t)}function l0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class u0{constructor(){this.subscriptions=[]}add(t){return o0(this.subscriptions,t),()=>l0(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 s=0;s<i;s++){const a=this.subscriptions[s];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const CU=e=>!isNaN(parseFloat(e));class xU{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:s,timestamp:a}=_t;this.lastUpdated!==a&&(this.timeDelta=s,this.lastUpdated=a,Be.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=()=>Be.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=CU(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new u0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Be.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?Av(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 da(e,t){return new xU(e,t)}const Iv=e=>t=>t.test(e),wU={test:e=>e==="auto",parse:e=>e},Rv=[as,ae,Qn,Ur,MF,RF,wU],Va=e=>Rv.find(Iv(e)),kU=[...Rv,Ct,di],OU=e=>kU.find(Iv(e));function IU(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,da(n))}function RU(e,t){const n=Wc(e,t);let{transitionEnd:r={},transition:i={},...s}=n?e.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const a in s){const o=YF(s[a]);IU(e,a,o)}}function MU(e,t,n){var r,i;const s=Object.keys(t).filter(o=>!e.hasValue(o)),a=s.length;if(a)for(let o=0;o<a;o++){const l=s[o],u=t[l];let c=null;Array.isArray(u)&&(c=u[0]),c===null&&(c=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),c!=null&&(typeof c=="string"&&(Ov(c)||wv(c))?c=parseFloat(c):!OU(c)&&di.test(u)&&(c=xv(l,u)),e.addValue(l,da(c,{owner:e})),n[l]===void 0&&(n[l]=c),c!==null&&e.setBaseTarget(l,c))}}function LU(e,t){return t?(t[e]||t.default||t).from:void 0}function PU(e,t,n){const r={};for(const i in e){const s=LU(i,t);if(s!==void 0)r[i]=s;else{const a=n.getValue(i);a&&(r[i]=a.get())}}return r}function DU({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Mv(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...o}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(s=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in o){const d=e.getValue(f),h=o[f];if(!d||h===void 0||c&&DU(c,f))continue;const p={delay:n,elapsed:0,...s};if(window.HandoffAppearAnimations&&!d.hasAnimated){const v=e.getProps()[yB];v&&(p.elapsed=window.HandoffAppearAnimations(v,f,d,Be))}d.start(a0(f,d,h,e.shouldReduceMotion&&ss.has(f)?{type:!1}:p));const E=d.animation;Gu(l)&&(l.add(f),E.then(()=>l.remove(f))),u.push(E)}return a&&Promise.all(u).then(()=>{a&&RU(e,a)}),u}function em(e,t,n={}){const r=Wc(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Mv(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return FU(e,t,u+l,c,f,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[l,u]=o==="beforeChildren"?[s,a]:[a,s];return l().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function FU(e,t,n=0,r=0,i=1,s){const a=[],o=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>o-u*r;return Array.from(e.variantChildren).sort(BU).forEach((u,c)=>{u.notify("AnimationStart",t),a.push(em(u,t,{...s,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function BU(e,t){return e.sortNodePosition(t)}function UU(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>em(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=em(e,t,n);else{const i=typeof t=="function"?Wc(e,t,n.custom):t;r=Promise.all(Mv(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const HU=[...Vp].reverse(),zU=Vp.length;function jU(e){return t=>Promise.all(t.map(({animation:n,options:r})=>UU(e,n,r)))}function $U(e){let t=jU(e);const n=VU();let r=!0;const i=(l,u)=>{const c=Wc(e,u);if(c){const{transition:f,transitionEnd:d,...h}=c;l={...l,...h,...d}}return l};function s(l){t=l(e)}function a(l,u){const c=e.getProps(),f=e.getVariantContext(!0)||{},d=[],h=new Set;let p={},E=1/0;for(let g=0;g<zU;g++){const T=HU[g],y=n[T],A=c[T]!==void 0?c[T]:f[T],k=Jo(A),S=T===u?y.isActive:null;S===!1&&(E=g);let C=A===f[T]&&A!==c[T]&&k;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),y.protectedKeys={...p},!y.isActive&&S===null||!A&&!y.prevProp||$c(A)||typeof A=="boolean")continue;const R=GU(y.prevProp,A);let F=R||T===u&&y.isActive&&!C&&k||g>E&&k;const I=Array.isArray(A)?A:[A];let H=I.reduce(i,{});S===!1&&(H={});const{prevResolvedValues:W={}}=y,ee={...W,...H},X=q=>{F=!0,h.delete(q),y.needsAnimating[q]=!0};for(const q in ee){const de=H[q],D=W[q];p.hasOwnProperty(q)||(de!==D?Hu(de)&&Hu(D)?!tv(de,D)||R?X(q):y.protectedKeys[q]=!0:de!==void 0?X(q):h.add(q):de!==void 0&&h.has(q)?X(q):y.protectedKeys[q]=!0)}y.prevProp=A,y.prevResolvedValues=H,y.isActive&&(p={...p,...H}),r&&e.blockInitialAnimation&&(F=!1),F&&!C&&d.push(...I.map(q=>({animation:q,options:{type:T,...l}})))}if(h.size){const g={};h.forEach(T=>{const y=e.getBaseTarget(T);y!==void 0&&(g[T]=y)}),d.push({animation:g})}let v=!!d.length;return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function o(l,u,c){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=a(c,l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:a,setActive:o,setAnimateFunction:s,getState:()=>n}}function GU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!tv(t,e):!1}function Ai(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function VU(){return{animate:Ai(!0),whileInView:Ai(),whileHover:Ai(),whileTap:Ai(),whileDrag:Ai(),whileFocus:Ai(),exit:Ai()}}class KU extends Ti{constructor(t){super(t),t.animationState||(t.animationState=$U(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),$c(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 WU=0;class YU extends Ti{constructor(){super(...arguments),this.id=WU++}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 s=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const qU={animation:{Feature:KU},exit:{Feature:YU}},KE=(e,t)=>Math.abs(e-t);function QU(e,t){const n=KE(e.x,t.x),r=KE(e.y,t.y);return Math.sqrt(n**2+r**2)}class Lv{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 u=_d(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,f=QU(u.offset,{x:0,y:0})>=3;if(!c&&!f)return;const{point:d}=u,{timestamp:h}=_t;this.history.push({...d,timestamp:h});const{onStart:p,onMove:E}=this.handlers;c||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=yd(c,this.transformPagePoint),Be.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:d}=this.handlers,h=_d(u.type==="pointercancel"?this.lastMoveEventInfo:yd(c,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,h),d&&d(u,h)},!Qb(t))return;this.handlers=n,this.transformPagePoint=r;const i=Kc(t),s=yd(i,this.transformPagePoint),{point:a}=s,{timestamp:o}=_t;this.history=[{...a,timestamp:o}];const{onSessionStart:l}=n;l&&l(t,_d(s,this.history)),this.removeListeners=ii(pr(window,"pointermove",this.handlePointerMove),pr(window,"pointerup",this.handlePointerUp),pr(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Nr(this.updatePoint)}}function yd(e,t){return t?{point:t(e.point)}:e}function WE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _d({point:e},t){return{point:e,delta:WE(e,Pv(t)),offset:WE(e,XU(t)),velocity:ZU(t,.1)}}function XU(e){return e[0]}function Pv(e){return e[e.length-1]}function ZU(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Pv(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>si(t)));)n--;if(!r)return{x:0,y:0};const s=gr(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Jt(e){return e.max-e.min}function tm(e,t=0,n=.01){return Math.abs(e-t)<=n}function YE(e,t,n,r=.5){e.origin=r,e.originPoint=je(t.min,t.max,e.origin),e.scale=Jt(n)/Jt(t),(tm(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=je(n.min,n.max,e.origin)-e.originPoint,(tm(e.translate)||isNaN(e.translate))&&(e.translate=0)}function vo(e,t,n,r){YE(e.x,t.x,n.x,r?r.originX:void 0),YE(e.y,t.y,n.y,r?r.originY:void 0)}function qE(e,t,n){e.min=n.min+t.min,e.max=e.min+Jt(t)}function JU(e,t,n){qE(e.x,t.x,n.x),qE(e.y,t.y,n.y)}function QE(e,t,n){e.min=t.min-n.min,e.max=e.min+Jt(t)}function So(e,t,n){QE(e.x,t.x,n.x),QE(e.y,t.y,n.y)}function eH(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?je(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?je(n,e,r.max):Math.min(e,n)),e}function XE(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 tH(e,{top:t,left:n,bottom:r,right:i}){return{x:XE(e.x,n,i),y:XE(e.y,t,r)}}function ZE(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 nH(e,t){return{x:ZE(e.x,t.x),y:ZE(e.y,t.y)}}function rH(e,t){let n=.5;const r=Jt(e),i=Jt(t);return i>r?n=tl(t.min,t.max-r,e.min):r>i&&(n=tl(e.min,e.max-i,t.min)),fi(0,1,n)}function iH(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 nm=.35;function sH(e=nm){return e===!1?e=0:e===!0&&(e=nm),{x:JE(e,"left","right"),y:JE(e,"top","bottom")}}function JE(e,t,n){return{min:eT(e,t),max:eT(e,n)}}function eT(e,t){return typeof e=="number"?e:e[t]||0}const tT=()=>({translate:0,scale:1,origin:0,originPoint:0}),$s=()=>({x:tT(),y:tT()}),nT=()=>({min:0,max:0}),et=()=>({x:nT(),y:nT()});function jn(e){return[e("x"),e("y")]}function Dv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function aH({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function oH(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 bd(e){return e===void 0||e===1}function rm({scale:e,scaleX:t,scaleY:n}){return!bd(e)||!bd(t)||!bd(n)}function ki(e){return rm(e)||Fv(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Fv(e){return rT(e.x)||rT(e.y)}function rT(e){return e&&e!=="0%"}function Vu(e,t,n){const r=e-n,i=t*r;return n+i}function iT(e,t,n,r,i){return i!==void 0&&(e=Vu(e,i,r)),Vu(e,n,r)+t}function im(e,t=0,n=1,r,i){e.min=iT(e.min,t,n,r,i),e.max=iT(e.max,t,n,r,i)}function Bv(e,{x:t,y:n}){im(e.x,t.translate,t.scale,t.originPoint),im(e.y,n.translate,n.scale,n.originPoint)}function lH(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,a;for(let o=0;o<i;o++){s=n[o],a=s.projectionDelta;const l=s.instance;l&&l.style&&l.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Gs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Bv(e,a)),r&&ki(s.latestValues)&&Gs(e,s.latestValues))}t.x=sT(t.x),t.y=sT(t.y)}function sT(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function $r(e,t){e.min=e.min+t,e.max=e.max+t}function aT(e,t,[n,r,i]){const s=t[i]!==void 0?t[i]:.5,a=je(e.min,e.max,s);im(e,t[n],t[r],a,t.scale)}const uH=["x","scaleX","originX"],cH=["y","scaleY","originY"];function Gs(e,t){aT(e.x,t,uH),aT(e.y,t,cH)}function Uv(e,t){return Dv(oH(e.getBoundingClientRect(),t))}function fH(e,t,n){const r=Uv(e,n),{scroll:i}=t;return i&&($r(r.x,i.offset.x),$r(r.y,i.offset.y)),r}const dH=new WeakMap;class hH{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=et(),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(Kc(l,"page").point)},s=(l,u)=>{const{drag:c,dragPropagation:f,onDragStart:d}=this.getProps();if(c&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Zb(c),!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),jn(p=>{let E=this.getAxisMotionValue(p).get()||0;if(Qn.test(E)){const{projection:v}=this.visualElement;if(v&&v.layout){const g=v.layout.layoutBox[p];g&&(E=Jt(g)*(parseFloat(E)/100))}}this.originPoint[p]=E}),d&&Be.update(()=>d(l,u),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(l,u)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:d,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:p}=u;if(f&&this.currentDirection===null){this.currentDirection=mH(p),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),h&&h(l,u)},o=(l,u)=>this.stop(l,u);this.panSession=new Lv(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:o},{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:s}=this.getProps();s&&Be.update(()=>s(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||!N1(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=eH(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&zs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=tH(r.layoutBox,t):this.constraints=!1,this.elastic=sH(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&jn(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=iH(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!zs(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=fH(r,i.root,this.visualElement.getTransformPagePoint());let a=nH(i.layout.layoutBox,s);if(n){const o=n(aH(a));this.hasMutatedConstraints=!!o,o&&(a=Dv(o))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},u=jn(c=>{if(!N1(c,n,this.currentDirection))return;let f=l&&l[c]||{};a&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(a0(t,r,0,n))}stopAnimation(){jn(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){jn(n=>{const{drag:r}=this.getProps();if(!N1(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:o}=i.layout.layoutBox[n];s.set(t[n]-je(a,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zs(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};jn(a=>{const o=this.getAxisMotionValue(a);if(o){const l=o.get();i[a]=rH({min:l,max:l},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),jn(a=>{if(!N1(a,t,null))return;const o=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];o.set(je(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;dH.set(this.visualElement,this);const t=this.visualElement.current,n=pr(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();zs(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const a=hr(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(jn(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:a=nm,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:a,dragMomentum:o}}}function N1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function mH(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class pH extends Ti{constructor(t){super(t),this.removeGroupControls=Ye,this.removeListeners=Ye,this.controls=new hH(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ye}unmount(){this.removeGroupControls(),this.removeListeners()}}const oT=e=>(t,n)=>{e&&Be.update(()=>e(t,n))};class gH extends Ti{constructor(){super(...arguments),this.removePointerDownListener=Ye}onPointerDown(t){this.session=new Lv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:oT(t),onStart:oT(n),onMove:r,onEnd:(s,a)=>{delete this.session,i&&Be.update(()=>i(s,a))}}}mount(){this.removePointerDownListener=pr(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 EH(){const e=P.useContext(Gp);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=P.useId();return P.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Q1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ka={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const n=lT(e,t.target.x),r=lT(e,t.target.y);return`${n}% ${r}%`}},TH={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=di.parse(e);if(i.length>5)return r;const s=di.createTransformer(e),a=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;i[0+a]/=o,i[1+a]/=l;const u=je(o,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),s(i)}};class yH extends On.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;NF(_H),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Q1.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,a=r.projection;return a&&(a.isPresent=s,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Be.postRender(()=>{const o=a.getStack();(!o||!o.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 Hv(e){const[t,n]=EH(),r=P.useContext(Pb);return On.createElement(yH,{...e,layoutGroup:r,switchLayoutGroup:P.useContext(Db),isPresent:t,safeToRemove:n})}const _H={borderRadius:{...Ka,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ka,borderTopRightRadius:Ka,borderBottomLeftRadius:Ka,borderBottomRightRadius:Ka,boxShadow:TH},zv=["TopLeft","TopRight","BottomLeft","BottomRight"],bH=zv.length,uT=e=>typeof e=="string"?parseFloat(e):e,cT=e=>typeof e=="number"||ae.test(e);function vH(e,t,n,r,i,s){i?(e.opacity=je(0,n.opacity!==void 0?n.opacity:1,SH(r)),e.opacityExit=je(t.opacity!==void 0?t.opacity:1,0,AH(r))):s&&(e.opacity=je(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<bH;a++){const o=`border${zv[a]}Radius`;let l=fT(t,o),u=fT(n,o);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||cT(l)===cT(u)?(e[o]=Math.max(je(uT(l),uT(u),r),0),(Qn.test(u)||Qn.test(l))&&(e[o]+="%")):e[o]=u}(t.rotate||n.rotate)&&(e.rotate=je(t.rotate||0,n.rotate||0,r))}function fT(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const SH=jv(0,.5,n0),AH=jv(.5,.95,Ye);function jv(e,t,n){return r=>r<e?0:r>t?1:n(tl(e,t,r))}function dT(e,t){e.min=t.min,e.max=t.max}function sn(e,t){dT(e.x,t.x),dT(e.y,t.y)}function hT(e,t,n,r,i){return e-=t,e=Vu(e,1/n,r),i!==void 0&&(e=Vu(e,1/i,r)),e}function NH(e,t=0,n=1,r=.5,i,s=e,a=e){if(Qn.test(t)&&(t=parseFloat(t),t=je(a.min,a.max,t/100)-a.min),typeof t!="number")return;let o=je(s.min,s.max,r);e===s&&(o-=t),e.min=hT(e.min,t,n,o,i),e.max=hT(e.max,t,n,o,i)}function mT(e,t,[n,r,i],s,a){NH(e,t[n],t[r],t[i],t.scale,s,a)}const CH=["x","scaleX","originX"],xH=["y","scaleY","originY"];function pT(e,t,n,r){mT(e.x,t,CH,n?n.x:void 0,r?r.x:void 0),mT(e.y,t,xH,n?n.y:void 0,r?r.y:void 0)}function gT(e){return e.translate===0&&e.scale===1}function $v(e){return gT(e.x)&&gT(e.y)}function wH(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 Gv(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 ET(e){return Jt(e.x)/Jt(e.y)}class kH{constructor(){this.members=[]}add(t){o0(this.members,t),t.scheduleRender()}remove(t){if(l0(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 s=this.members[i];if(s.isPresent!==!1){r=s;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 TT(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y;if((i||s)&&(r=`translate3d(${i}px, ${s}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const a=e.x.scale*t.x,o=e.y.scale*t.y;return(a!==1||o!==1)&&(r+=`scale(${a}, ${o})`),r||"none"}const OH=(e,t)=>e.depth-t.depth;class IH{constructor(){this.children=[],this.isDirty=!1}add(t){o0(this.children,t),this.isDirty=!0}remove(t){l0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(OH),this.isDirty=!1,this.children.forEach(t)}}function RH(e,t){const n=performance.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Nr(r),e(s-t))};return Be.read(r,!0),()=>Nr(r)}function MH(e){window.MotionDebug&&window.MotionDebug.record(e)}function LH(e){return e instanceof SVGElement&&e.tagName!=="svg"}function PH(e,t,n){const r=jt(e)?e:da(e);return r.start(a0("",r,t,n)),r.animation}const yT=["","X","Y","Z"],_T=1e3;let DH=0;const Oi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Vv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},o=t==null?void 0:t()){this.id=DH++,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=()=>{Oi.totalNodes=Oi.resolvedTargetDeltas=Oi.recalculatedProjection=0,this.nodes.forEach(UH),this.nodes.forEach(GH),this.nodes.forEach(VH),this.nodes.forEach(HH),MH(Oi)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new IH)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new u0),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const l=this.eventHandlers.get(a);l&&l.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=LH(a),this.instance=a;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(u||l)&&(this.isLayoutDirty=!0),e){let f;const d=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=RH(d,250),Q1.hasAnimatedSinceResize&&(Q1.hasAnimatedSinceResize=!1,this.nodes.forEach(vT))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||c.getDefaultTransition()||QH,{onLayoutAnimationStart:v,onLayoutAnimationComplete:g}=c.getProps(),T=!this.targetLayout||!Gv(this.targetLayout,p)||h,y=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||d&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const A={...kv(E,"layout"),onPlay:v,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else d||vT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Nr(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(KH),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!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 c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bT);return}this.isUpdating||this.nodes.forEach(jH),this.isUpdating=!1,this.nodes.forEach($H),this.nodes.forEach(FH),this.nodes.forEach(BH),this.clearAllSnapshots();const o=performance.now();_t.delta=fi(0,1e3/60,o-_t.timestamp),_t.timestamp=o,_t.isProcessing=!0,fd.update.process(_t),fd.preRender.process(_t),fd.render.process(_t),_t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(zH),this.sharedNodes.forEach(WH)}scheduleUpdateProjection(){Be.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Be.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 a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=et(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform,o=this.projectionDelta&&!$v(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;a&&(o||ki(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return a&&(l=this.removeTransform(l)),XH(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return et();const o=a.measureViewportBox(),{scroll:l}=this.root;return l&&($r(o.x,l.offset.x),$r(o.y,l.offset.y)),o}removeElementScroll(a){const o=et();sn(o,a);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:f}=u;if(u!==this.root&&c&&f.layoutScroll){if(c.isRoot){sn(o,a);const{scroll:d}=this.root;d&&($r(o.x,-d.offset.x),$r(o.y,-d.offset.y))}$r(o.x,c.offset.x),$r(o.y,c.offset.y)}}return o}applyTransform(a,o=!1){const l=et();sn(l,a);for(let u=0;u<this.path.length;u++){const c=this.path[u];!o&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Gs(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),ki(c.latestValues)&&Gs(l,c.latestValues)}return ki(this.latestValues)&&Gs(l,this.latestValues),l}removeTransform(a){const o=et();sn(o,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ki(u.latestValues))continue;rm(u.latestValues)&&u.updateSnapshot();const c=et(),f=u.measurePageBox();sn(c,f),pT(o,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return ki(this.latestValues)&&pT(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==_t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var o;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=_t.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=et(),this.relativeTargetOrigin=et(),So(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),sn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=et(),this.targetWithTransforms=et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),JU(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sn(this.target,this.layout.layoutBox),Bv(this.target,this.targetDelta)):sn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=et(),this.relativeTargetOrigin=et(),So(this.relativeTargetOrigin,this.target,h.target),sn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Oi.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||rm(this.parent.latestValues)||Fv(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 a;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===_t.timestamp&&(u=!1),u)return;const{layout:c,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||!(c||f))return;sn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;lH(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox);const{target:p}=o;if(!p){this.projectionTransform&&(this.projectionDelta=$s(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=$s(),this.projectionDeltaWithTransform=$s());const E=this.projectionTransform;vo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=TT(this.projectionDelta,this.treeScale),(this.projectionTransform!==E||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Oi.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),a){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,o=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=$s();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const d=et(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,E=h!==p,v=this.getStack(),g=!v||v.members.length<=1,T=!!(E&&!g&&this.options.crossfade===!0&&!this.path.some(qH));this.animationProgress=0;let y;this.mixTargetDelta=A=>{const k=A/1e3;ST(f.x,a.x,k),ST(f.y,a.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(So(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),YH(this.relativeTarget,this.relativeTargetOrigin,d,k),y&&wH(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=et()),sn(y,this.relativeTarget)),E&&(this.animationValues=c,vH(c,u,this.latestValues,k,T,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Nr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Be.update(()=>{Q1.hasAnimatedSinceResize=!0,this.currentAnimation=PH(0,_T,{...a,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(_T),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:l,layout:u,latestValues:c}=a;if(!(!o||!l||!u)){if(this!==a&&this.layout&&u&&Kv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||et();const f=Jt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+f;const d=Jt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+d}sn(o,l),Gs(o,c),vo(this.projectionDeltaWithTransform,this.layoutCorrected,o,c)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new kH),this.sharedNodes.get(a).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(o=!0),!o)return;const u={};for(let c=0;c<yT.length;c++){const f="rotate"+yT[c];l[f]&&(u[f]=l[f],a.setStaticValue(f,0))}a.render();for(const c in u)a.setStaticValue(c,u[c]);a.scheduleRender()}getProjectionStyles(a={}){var o,l;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=q1(a.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const E={};return this.options.layoutId&&(E.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,E.pointerEvents=q1(a.pointerEvents)||""),this.hasProjected&&!ki(this.latestValues)&&(E.transform=c?c({},""):"none",this.hasProjected=!1),E}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=TT(this.projectionDeltaWithTransform,this.treeScale,d),c&&(u.transform=c(d,u.transform));const{x:h,y:p}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?u.opacity=f===this?(l=(o=d.opacity)!==null&&o!==void 0?o:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:u.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const E in Bu){if(d[E]===void 0)continue;const{correct:v,applyTo:g}=Bu[E],T=u.transform==="none"?d[E]:v(d[E],f);if(g){const y=g.length;for(let A=0;A<y;A++)u[g[A]]=T}else u[E]=T}return this.options.layoutId&&(u.pointerEvents=f===this?q1(a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(bT),this.root.sharedNodes.clear()}}}function FH(e){e.updateLayout()}function BH(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:s}=e.options,a=n.source!==e.layout.source;s==="size"?jn(f=>{const d=a?n.measuredBox[f]:n.layoutBox[f],h=Jt(d);d.min=r[f].min,d.max=d.min+h}):Kv(s,n.layoutBox,r)&&jn(f=>{const d=a?n.measuredBox[f]:n.layoutBox[f],h=Jt(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const o=$s();vo(o,r,n.layoutBox);const l=$s();a?vo(l,e.applyTransform(i,!0),n.measuredBox):vo(l,r,n.layoutBox);const u=!$v(o);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=et();So(p,n.layoutBox,d.layoutBox);const E=et();So(E,r,h.layoutBox),Gv(p,E)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:o,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function UH(e){Oi.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 HH(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zH(e){e.clearSnapshot()}function bT(e){e.clearMeasurements()}function jH(e){e.isLayoutDirty=!1}function $H(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function vT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function GH(e){e.resolveTargetDelta()}function VH(e){e.calcProjection()}function KH(e){e.resetRotation()}function WH(e){e.removeLeadSnapshot()}function ST(e,t,n){e.translate=je(t.translate,0,n),e.scale=je(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function AT(e,t,n,r){e.min=je(t.min,n.min,r),e.max=je(t.max,n.max,r)}function YH(e,t,n,r){AT(e.x,t.x,n.x,r),AT(e.y,t.y,n.y,r)}function qH(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const QH={duration:.45,ease:[.4,0,.1,1]},NT=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),CT=NT("applewebkit/")&&!NT("chrome/")?Math.round:Ye;function xT(e){e.min=CT(e.min),e.max=CT(e.max)}function XH(e){xT(e.x),xT(e.y)}function Kv(e,t,n){return e==="position"||e==="preserve-aspect"&&!tm(ET(t),ET(n),.2)}const ZH=Vv({attachResizeListener:(e,t)=>hr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),vd={current:void 0},Wv=Vv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!vd.current){const e=new ZH({});e.mount(window),e.setOptions({layoutScroll:!0}),vd.current=e}return vd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),JH={pan:{Feature:gH},drag:{Feature:pH,ProjectionNode:Wv,MeasureLayout:Hv}},ez=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function tz(e){const t=ez.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function sm(e,t,n=1){const[r,i]=tz(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return Ov(a)?parseFloat(a):a}else return Yh(i)?sm(i,t,n+1):i}function nz(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const s=i.get();if(!Yh(s))return;const a=sm(s,r);a&&i.set(a)});for(const i in t){const s=t[i];if(!Yh(s))continue;const a=sm(s,r);a&&(t[i]=a,n||(n={}),n[i]===void 0&&(n[i]=s))}return{target:t,transitionEnd:n}}const rz=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Yv=e=>rz.has(e),iz=e=>Object.keys(e).some(Yv),wT=e=>e===as||e===ae,kT=(e,t)=>parseFloat(e.split(", ")[t]),OT=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return kT(i[1],t);{const s=r.match(/^matrix\((.+)\)$/);return s?kT(s[1],e):0}},sz=new Set(["x","y","z"]),az=_l.filter(e=>!sz.has(e));function oz(e){const t=[];return az.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 ha={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:OT(4,13),y:OT(5,14)};ha.translateX=ha.x;ha.translateY=ha.y;const lz=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,s=getComputedStyle(i),{display:a}=s,o={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{o[u]=ha[u](r,s)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(o[u]),e[u]=ha[u](l,s)}),e},uz=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Yv);let s=[],a=!1;const o=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=n[l],f=Va(c);const d=t[l];let h;if(Hu(d)){const p=d.length,E=d[0]===null?1:0;c=d[E],f=Va(c);for(let v=E;v<p&&d[v]!==null;v++)h?t0(Va(d[v])===h):h=Va(d[v])}else h=Va(d);if(f!==h)if(wT(f)&&wT(h)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof d=="string"?t[l]=parseFloat(d):Array.isArray(d)&&h===ae&&(t[l]=d.map(parseFloat))}else f!=null&&f.transform&&(h!=null&&h.transform)&&(c===0||d===0)?c===0?u.set(h.transform(c)):t[l]=f.transform(d):(a||(s=oz(e),a=!0),o.push(l),r[l]=r[l]!==void 0?r[l]:t[l],u.jump(d))}),o.length){const l=o.indexOf("height")>=0?window.pageYOffset:null,u=lz(t,e,o);return s.length&&s.forEach(([c,f])=>{e.getValue(c).set(f)}),e.render(),jc&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function cz(e,t,n,r){return iz(t)?uz(e,t,n,r):{target:t,transitionEnd:r}}const fz=(e,t,n,r)=>{const i=nz(e,t,r);return t=i.target,r=i.transitionEnd,cz(e,t,n,r)},am={current:null},qv={current:!1};function dz(){if(qv.current=!0,!!jc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>am.current=e.matches;e.addListener(t),t()}else am.current=!1}function hz(e,t,n){const{willChange:r}=t;for(const i in t){const s=t[i],a=n[i];if(jt(s))e.addValue(i,s),Gu(r)&&r.add(i);else if(jt(a))e.addValue(i,da(s,{owner:e})),Gu(r)&&r.remove(i);else if(a!==s)if(e.hasValue(i)){const o=e.getValue(i);!o.hasAnimated&&o.set(s)}else{const o=e.getStaticValue(i);e.addValue(i,da(o!==void 0?o:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const IT=new WeakMap,Qv=Object.keys(el),mz=Qv.length,RT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],pz=Kp.length;class gz{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:s},a={}){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=()=>Be.render(this.render,!1,!0);const{latestValues:o,renderState:l}=s;this.latestValues=o,this.baseTarget={...o},this.initialValues=n.initial?{...o}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.isControllingVariants=Gc(n),this.isVariantNode=Lb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const f in c){const d=c[f];o[f]!==void 0&&jt(d)&&(d.set(o[f],!1),Gu(u)&&u.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,IT.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)),qv.current||dz(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:am.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){IT.delete(this.current),this.projection&&this.projection.unmount(),Nr(this.notifyUpdate),Nr(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=ss.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Be.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,s){let a,o;for(let l=0;l<mz;l++){const u=Qv[l],{isEnabled:c,Feature:f,ProjectionNode:d,MeasureLayout:h}=el[u];d&&(a=d),c(n)&&(!this.features[u]&&f&&(this.features[u]=new f(this)),h&&(o=h))}if(!this.projection&&a){this.projection=new a(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:c,dragConstraints:f,layoutScroll:d,layoutRoot:h}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||f&&zs(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:s,layoutScroll:d,layoutRoot:h})}return o}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):et()}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<RT.length;r++){const i=RT[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s=t["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=hz(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<pz;r++){const i=Kp[r],s=this.props[i];(Jo(s)||s===!1)&&(n[i]=s)}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=da(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=e0(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!jt(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new u0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Xv extends gz{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},s){let a=PU(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),s){MU(this,r,a);const o=fz(this,r,a,n);n=o.transitionEnd,r=o.target}return{transition:t,transitionEnd:n,...r}}}function Ez(e){return window.getComputedStyle(e)}class Tz extends Xv{readValueFromInstance(t,n){if(ss.has(n)){const r=s0(n);return r&&r.default||0}else{const r=Ez(t),i=(Ub(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Uv(t,n)}build(t,n,r,i){Yp(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Jp(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Vb(t,n,r,i)}}class yz extends Xv{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ss.has(n)){const r=s0(n);return r&&r.default||0}return n=Kb.has(n)?n:Zp(n),t.getAttribute(n)}measureInstanceViewportBox(){return et()}scrapeMotionValuesFromProps(t,n){return Yb(t,n)}build(t,n,r,i){Qp(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Wb(t,n,r,i)}mount(t){this.isSVGTag=Xp(t.tagName),super.mount(t)}}const _z=(e,t)=>Wp(e)?new yz(t,{enableHardwareAcceleration:!1}):new Tz(t,{enableHardwareAcceleration:!0}),bz={layout:{ProjectionNode:Wv,MeasureLayout:Hv}},vz={...qU,...pB,...JH,...bz},Sz=SF((e,t)=>nB(e,t,vz,_z)),Az=[{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}],Yc=({color:e})=>_.jsx("div",{className:"relative h-[34px] w-[34px]",role:"progressbar",children:Az.map(({position:t,delay:n},r)=>_.jsx(Sz.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))}),Nz=({initiallyCollapsed:e,title:t,grow:n,children:r,headerChildren:i,focusCommand:s})=>{const[a,o]=P.useState(e),l=P.useCallback(({data:u})=>{u.command===s&&o(()=>!1)},[s]);return P.useEffect(()=>{if(s)return window.addEventListener("message",l),()=>window.removeEventListener("message",l)},[s,l]),_.jsxs("section",{className:Ie("flex flex-col",n&&!a?"grow overflow-hidden":"grow-0"),children:[_.jsxs("header",{className:"flex flex-row items-center justify-between border-b border-b-ide-border px-2 py-1",children:[_.jsxs("div",{className:"flex cursor-pointer flex-row items-center gap-2 hover:opacity-80",onClick:()=>o(u=>!u),children:[a?_.jsx(He.ChevronRight,{}):_.jsx(He.ChevronDown,{}),_.jsx("h1",{className:"font-bold",children:t})]}),_.jsx("div",{className:Ie(a?"invisible":"visible"),children:i})]}),_.jsx("main",{className:Ie("flex flex-col",n&&!a&&"grow",a?"hidden":"block overflow-hidden"),children:r})]})},Cz={target:"languageServer",view:"app",request:"context"},xz={target:"languageServer",view:"app",request:"optIn"},wz={target:"extension",request:"openLink",linkType:"url",link:"https://sourcery.ai/dashboard"},kz={target:"languageServer",view:"app",request:"logIn"},Oz={target:"languageServer",view:"app",request:"accessDetailsOpened"},Iz={target:"languageServer",view:"chat",request:"initialise"},Rz={target:"languageServer",view:"chat",request:"clear"},Mz={target:"languageServer",view:"chat",request:"cancel"},Lz={target:"languageServer",view:"recipes",request:"initialise"},Zv={target:"languageServer",view:"review",request:"clear"},Pz={target:"languageServer",view:"review",request:"cancel"},MT={target:"languageServer",view:"troubleshooting",request:"initialise"},Dz={target:"languageServer",view:"troubleshooting",request:"reset"},LT=({message:e})=>{window.sourceryLS.postMessage({message:e})},Fz=()=>{const[{recipes:e,status:t},n]=P.useState({recipes:[],status:"pending"}),r=P.useCallback(({data:{command:i,recipes:s}})=>{switch(i){case"recipes/addRecipes":n(wt(a=>{a.status="ok",a.recipes=s}))}},[]);return P.useEffect(()=>(window.addEventListener("message",r),()=>window.removeEventListener("message",r)),[r]),P.useEffect(()=>{LT({message:Lz})},[]),_.jsx("section",{className:"h-fit grow overflow-y-auto p-2",children:t==="pending"?_.jsx("div",{className:"flex h-20 flex-col items-center justify-center",children:_.jsx(Yc,{})}):_.jsx("ul",{className:"flex flex-col gap-2",children:e.map(({id:i,name:s},a)=>_.jsx("li",{children:_.jsx("button",{className:"btn-primary w-full rounded border border-ide-primary-btn-border p-1 text-center",onClick:()=>{LT({message:{target:"languageServer",view:"chat",request:"executeRecipe",recipeId:i,name:s,trigger:"recipeViewButton"}})},children:s})},a))})})},Bz=({value:e=null,onChange:t=()=>{}})=>{const[n,r]=P.useState(e),i=P.useCallback(s=>()=>{r(()=>s),t(s)},[t]);return _.jsxs("div",{className:"flex flex-row items-center gap-1",children:[n==="liked"?_.jsx("button",{onClick:void 0,disabled:!0,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Remove Like":void 0,children:_.jsx(He.ThumbsUp.Solid,{})}):_.jsx("button",{onClick:i("liked"),disabled:n!==null,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Like":void 0,children:_.jsx(He.ThumbsUp.Regular,{})}),n==="disliked"?_.jsx("button",{onClick:void 0,disabled:!0,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Remove Dislike":void 0,children:_.jsx(He.ThumbsDown.Solid,{})}):_.jsx("button",{onClick:i("disliked"),disabled:n!==null,className:"text-ide-disabled-text enabled:cursor-pointer hover:enabled:text-ide-text",title:n===null?"Dislike":void 0,children:_.jsx(He.ThumbsDown.Regular,{})})]})},Uz=e=>e.contextType==="uri",Jv=e=>e.contextType==="location",Hz=e=>Uz(e)?e.uri:Jv(e)?e.location.uri:null,zz=e=>Jv(e)?e.location.range:null,jz=({message:e})=>{window.sourceryLS.postMessage({message:e})},e3=({contextIndicators:e,className:t})=>!e||!e.length?null:_.jsx("div",{className:Ie("flex flex-row gap-2 flex-wrap",t),children:e.map((n,r)=>{const i=Hz(n),s=i?()=>{jz({message:{target:"extension",request:"openLink",linkType:"file",link:i.slice(7),documentRange:zz(n)}})}:void 0;return _.jsxs("span",{className:Ie("text-sm text-ide-disabled-text",s&&"cursor-pointer hover:text-ide-primary-btn-bg"),onClick:s,children:[n.tag&&_.jsxs("span",{className:"font-bold",children:[n.tag,": "]}),n.label]},r)})}),nl=({message:e})=>{window.sourceryLS.postMessage({message:e})},PT=({message:{outcome:e,textContent:t,requestId:n,contextIndicators:r}})=>{const[i,s]=P.useState(!1),a=P.useCallback(o=>{n&&(nl({message:{target:"languageServer",view:"chat",request:"sendFeedback",feedback:o,requestId:n}}),s(!0))},[n]);return _.jsx("div",{className:"flex flex-row justify-start",children:_.jsxs("div",{className:Ie("assistant-message border border-ide-border relative flex flex-col",e==="error"?"bg-ide-error-bg":"bg-ide-chat-input-bg"),children:[_.jsx("div",{className:Ie(n?"mb-5":"mb-2"),children:t?_.jsx(Js,{markdown:t}):_.jsx(Ib,{})}),n&&_.jsxs("div",{className:"ml-auto mt-2 flex flex-col",title:i?void 0:"Send feedback on this result",children:[_.jsx("div",{className:"ml-auto",children:_.jsx(Bz,{onChange:a})}),i&&_.jsx("div",{children:_.jsx("a",{className:"break-words underline hover:cursor-pointer",href:`https://research.typeform.com/to/JmPsEwTM#chat_request=${n}`,children:"Give more feedback"})})]}),_.jsx(e3,{contextIndicators:r,className:"justify-start"})]})})},$z=({message:{textContent:e,contextIndicators:t}})=>_.jsx("div",{className:"flex flex-row justify-end",children:_.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:[_.jsx("p",{children:e}),_.jsx(e3,{contextIndicators:t,className:"justify-end"})]})}),Gz=()=>_.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:[_.jsx("span",{children:_.jsx(He.Cancel,{})}),_.jsx("span",{children:"Canceled"})]}),Vz=P.forwardRef((e,t)=>{const[n,r]=P.useState(),i=P.useRef(null),s=P.useRef(null),a=P.useCallback(()=>{var c;(c=s.current)==null||c.focus()},[]);P.useImperativeHandle(t,()=>({focus:a}),[a]);const o=P.useCallback(({data:c})=>{switch(c.command){case"chat/focus":a()}},[a]);P.useEffect(()=>(window.addEventListener("message",o),()=>window.removeEventListener("message",o)),[o]),P.useEffect(()=>(window.addEventListener("focus",a),()=>window.removeEventListener("focus",a)),[a]);const l=c=>{c.preventDefault(),n&&(nl({message:{target:"languageServer",view:"chat",request:"sendMessage",textContent:n}}),r(""))},u=P.useCallback(c=>{var f;c.key=="Enter"&&!c.shiftKey&&(c.preventDefault(),(f=i.current)==null||f.requestSubmit())},[]);return _.jsx("div",{className:"relative w-full",children:_.jsxs("form",{onSubmit:l,ref:i,autoFocus:!0,children:[_.jsx("textarea",{name:"chatPrompt",id:"chatPrompt",placeholder:"Type your message here!",className:"w-full rounded bg-ide-chat-input-bg p-2 pr-10 text-ide-chat-input-text",value:n,onChange:({target:{value:c}})=>r(c),onKeyDown:u,ref:s,autoFocus:!0}),_.jsx("button",{className:"absolute right-3 top-3",type:"submit",children:_.jsx(He.PaperPlane,{className:"h-4 w-4"})})]})})}),Kz=()=>_.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(),nl({message:Rz})},children:[_.jsx("span",{children:_.jsx(He.Plus,{})}),_.jsx("span",{children:"New Chat"})]}),Wz=P.forwardRef(({className:e},t)=>{const[{messages:n,currentMessage:r},i]=P.useState({messages:[],currentMessage:null}),s=P.useRef(null),a=gp(s),o=P.useRef(null),l=P.useCallback(c=>{switch(c.role){case"user":{i(wt(f=>{f.messages.push(c),f.currentMessage={role:"assistant",outcome:"success",textContent:""}})),s.current&&t_(s.current);break}case"assistant":i(wt(f=>{f.currentMessage&&c.outcome==="success"?f.currentMessage.textContent+=c.textContent:f.currentMessage&&f.currentMessage.textContent&&c.outcome==="error"?(f.messages.push(f.currentMessage,c),f.currentMessage=null):c.outcome==="error"?(f.messages.push(c),f.currentMessage=null):c.outcome==="finished"?(f.currentMessage&&f.currentMessage.textContent&&(f.currentMessage.requestId=c.requestId,f.currentMessage.contextIndicators=c.contextIndicators,f.messages.push(f.currentMessage)),f.currentMessage=null):f.currentMessage=c}))}},[]),u=P.useCallback(({data:c})=>{switch(c.command){case"chat/addMessage":l(c.message);break;case"chat/clear":i(wt(f=>{f.messages=[],f.currentMessage=null}));break;case"chat/notifyCancel":i(wt(f=>{f.currentMessage&&f.currentMessage.textContent.length&&(f.currentMessage.requestId=c.requestId||void 0,f.messages.push(f.currentMessage)),f.messages.push("cancellationNotification"),f.currentMessage=null}))}},[l]);return P.useImperativeHandle(t,()=>({focus:()=>{var c;(c=o.current)==null||c.focus()}})),P.useLayoutEffect(()=>{a()},[r==null?void 0:r.textContent,n.length,a]),P.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[u]),P.useEffect(()=>{nl({message:Iz})},[]),_.jsxs("div",{className:e,"data-testid":"chat-view",children:[n.length===0&&r===null?_.jsx("div",{className:"flex grow flex-col items-center justify-center gap-8",children:_.jsx(Yc,{})}):_.jsxs("section",{className:"flex grow flex-col gap-4 overflow-auto p-2",ref:s,children:[n.map((c,f)=>{if(c==="cancellationNotification")return _.jsx(Gz,{});switch(c.role){case"assistant":return _.jsx(PT,{message:c},f);case"user":return _.jsx($z,{message:c},f)}}),r&&_.jsx(PT,{message:r})]}),_.jsxs("footer",{className:Ie("flex grow-0 flex-col gap-2 border-t border-t-ide-border p-2"),children:[_.jsx("div",{className:"flex flex-row justify-center",children:_.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:c=>{var f;c.stopPropagation(),(f=o.current)==null||f.focus(),nl({message:Mz})},children:[_.jsx(He.CirclePause,{}),_.jsx("span",{children:"Cancel"})]})}),_.jsx(Vz,{ref:o})]}),_.jsx("div",{className:"flex h-1 w-full bg-ide-border"}),_.jsx(Nz,{title:"Recipes",children:_.jsx(Fz,{})})]})}),ma=({message:e})=>{window.sourceryLS.postMessage({message:e})},ea=({outcome:e,textContent:t})=>_.jsx("div",{className:"flex flex-row justify-start",children:_.jsx("div",{className:Ie("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:t?_.jsx(Js,{markdown:t}):_.jsx(Ib,{})})}),Yz=({comment:e,location:t,diff:n,importance:r,comment_type:i})=>{const[s,a]=P.useState(!1),[o,l]=P.useState(!1),u=P.useCallback(()=>{ma({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:"resolved"}}),a(f=>!f)},[]),c=P.useCallback(()=>{ma({message:{target:"languageServer",view:"review",request:"notifyCommentInteraction",commentInteraction:"ignored"}}),l(f=>!f)},[]);return _.jsx("div",{className:Ie(o?"hidden":"flex flex-row justify-start"),children:_.jsxs("div",{className:Ie("rounded-lg-bl-none mr-4 w-fit max-w-full rounded-tl-lg rounded-tr-lg px-4 py-2",s&&"opacity-50","bg-ide-chat-input-bg"),children:[_.jsx(Js,{markdown:t}),_.jsx(Js,{markdown:n}),_.jsx("div",{className:"mt-2 flex flex-row gap-2",children:_.jsxs("span",{className:"text-sm",children:[_.jsx("span",{className:"font-bold",children:i}),_.jsx("span",{children:"("}),_.jsxs("span",{className:"italic",children:[r,"-importance"]}),_.jsx("span",{children:")"})]})}),_.jsx(Js,{markdown:e}),_.jsxs("div",{className:Ie(s?"hidden":"flex flex-row justify-end mt-2"),children:[_.jsxs("button",{onClick:c,title:"Ignore and hide this comment.",className:"flex flex-row items-center gap-1 rounded-l-full border-y border-r border-ide-border px-2 py-0.5 text-xs hover:opacity-80",children:[_.jsx(He.Cancel,{})," Skip"]}),_.jsxs("button",{onClick:u,title:"Mark this comment as resolved.",className:"flex flex-row items-center gap-1 rounded-r-full border-y border-ide-border px-2 py-0.5 text-xs hover:opacity-80",children:[_.jsx(He.Check,{})," Done"]})]})]})})},qz=({summary:e,running:t})=>e&&e.textContent?_.jsx(ea,{outcome:e.outcome,textContent:e.textContent,type:"text"}):t?_.jsx(ea,{outcome:"success",textContent:"Reviewing your code<br/><br/>Summary will appear here when complete...",type:"text"}):_.jsx(ea,{outcome:"success",textContent:"Review cancelled, no summary available.",type:"text"}),Qz=()=>_.jsxs("button",{className:"flex flex-row gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),ma({message:Zv})},children:[_.jsx("span",{children:_.jsx(He.Plus,{})}),_.jsx("span",{children:"New Review"})]}),Xz=()=>{const e=P.useCallback(t=>{t.preventDefault();const{comparison:n}=Object.fromEntries(new FormData(t.currentTarget).entries());ma({message:Zv}),ma({message:{target:"languageServer",view:"review",request:"review",comparisonType:n}})},[]);return _.jsxs("form",{className:"flex flex-col gap-2 p-2",onSubmit:e,children:[_.jsx("div",{className:"grid grid-cols-5 gap-2",children:_.jsxs("select",{name:"comparison",className:"col-span-5 rounded border border-ide-border bg-ide-editor-bg px-2 py-1",children:[_.jsx("option",{value:"default",children:"Compare current HEAD with default branch"}),_.jsx("option",{value:"head",children:"Compare uncommitted changes with HEAD"})]})}),_.jsx("button",{type:"submit",className:"btn-primary w-full border border-ide-border p-1",children:"Review My Code"})]})},Zz=()=>_.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:[_.jsx("span",{children:_.jsx(He.Cancel,{})}),_.jsx("span",{children:"Canceled"})]}),Jz=({className:e})=>{const[{overview:t,summary:n,comments:r,error:i,cancelled:s,running:a},o]=P.useState({overview:null,summary:null,comments:[],error:null,cancelled:!1,running:!1}),l=P.useRef(null),u=gp(l),c=P.useCallback(({data:f})=>{switch(console.log("review inbound message",f),f.command){case"review/addOverviewMessage":o(wt(d=>{d.running=!0,d.overview=f.message}));break;case"review/addSummaryMessage":o(wt(d=>{d.summary=f.message}));break;case"review/addCommentMessage":o(wt(d=>{d.comments.push(f.comment)}));break;case"review/addErrorMessage":o(wt(d=>{d.error=f.message}));break;case"review/clear":o(wt(()=>({overview:null,summary:null,comments:[],error:null,cancelled:!1,running:!1})));break;case"review/notifyCancel":o(wt(d=>{d.cancelled=!0}));break;case"review/notifyComplete":o(wt(d=>{d.running=!1}));break}},[]);return P.useLayoutEffect(()=>{u()},[r.length,u]),P.useEffect(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[c]),_.jsxs("div",{className:e,"data-testid":"review-view",children:[_.jsx("section",{className:"flex flex-col divide-y divide-ide-border",children:_.jsx(Xz,{})}),_.jsxs("section",{className:"flex grow flex-col gap-2 overflow-y-auto p-2",ref:l,children:[t&&_.jsxs(_.Fragment,{children:[_.jsx(ea,{outcome:t.outcome,textContent:t.textContent,type:"text"}),_.jsx(qz,{summary:n,running:a})]}),r.map((f,d)=>_.jsx(Yz,{...f.comment},d)),a&&_.jsx(ea,{outcome:"success",textContent:"",type:"text"}),s&&_.jsx(Zz,{}),i&&_.jsx(ea,{outcome:i.outcome,textContent:i.textContent,type:"text"})]}),_.jsx("footer",{className:Ie(a?"flex flex-row justify-center border-t border-ide-border":"hidden"),children:_.jsxs("button",{className:"flex w-fit flex-row items-center gap-2 p-1 hover:enabled:opacity-80 disabled:text-ide-disabled-text",onClick:()=>ma({message:Pz}),children:[_.jsx(He.Cancel,{}),_.jsx("span",{children:"Cancel"})]})})]})},ej=""+new URL("sourcery-logo.svg",import.meta.url).href,C1=({message:e})=>{window.sourceryLS.postMessage({message:e})},Sd=({label:e,labelProps:t})=>_.jsxs("div",{className:"flex flex-row items-center justify-between gap-3",children:[_.jsx("span",{...t,children:e}),_.jsx("div",{className:"flex h-6 w-6 flex-row items-center justify-center rounded-full bg-ide-highlight text-ide-window-bg",children:_.jsx(He.Check,{})})]}),x1=({label:e,labelProps:t})=>_.jsxs("div",{className:"flex flex-row items-center justify-between gap-3",children:[_.jsx("span",{...t,children:e}),_.jsx("div",{className:"flex h-6 w-6 flex-row items-center justify-center rounded-full bg-ide-disabled-text text-ide-window-bg",children:_.jsx(He.Minus,{})})]}),tj=({logo:e,appContext:{isFeatureFlagEnabled:t,isConfigEnabled:n,isAuthenticated:r,isAuthorized:i,productName:s}})=>{const a=P.useCallback(u=>{u.preventDefault(),C1({message:kz})},[]),o=P.useCallback(u=>{u.preventDefault(),C1({message:wz})},[]),l=P.useCallback(u=>{u.preventDefault(),C1({message:xz})},[]);return P.useEffect(()=>{C1({message:Oz})},[]),_.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:[e&&_.jsxs("div",{className:"my-4 -ml-1 flex flex-row items-center gap-[10px]",children:[_.jsx("div",{className:"h-8 w-8",children:_.jsx("img",{src:ej,alt:"Sourcery's Logo"})}),_.jsx("h1",{className:"font-bold",children:"Sourcery Coding Assistant"})]}),_.jsx("div",{className:"py-4",children:_.jsx("div",{className:"flex flex-col gap-4",children:r?_.jsx(Sd,{label:`Logged In: ${s||"Sourcery"} Account`}):_.jsxs(_.Fragment,{children:[_.jsx(x1,{label:"Not logged in"}),_.jsx("p",{className:"mt-2 text-sm",children:"You must log in to use Sourcery."}),_.jsx("p",{className:"text-sm",children:"Please log in or sign up for an account using the button below."}),_.jsx("form",{onSubmit:a,children:_.jsx("button",{className:"btn-primary px-3 py-1 font-bold",type:"submit",children:"Log In"})})]})})}),r&&_.jsx("div",{className:"py-4",children:_.jsx("div",{className:"flex flex-col gap-4",children:i?_.jsx(Sd,{label:"Project verified for account"}):_.jsxs(_.Fragment,{children:[_.jsx(x1,{label:"Project disabled for account"}),_.jsx("p",{className:"mt-2 text-sm",children:"Your Open Source Sourcery account can't be used for private projects."}),_.jsx("form",{onSubmit:o,children:_.jsx("button",{type:"submit",className:"btn-primary px-3 py-1 font-bold",children:"Upgrade"})})]})})}),!t&&_.jsx("div",{className:"py-4",children:_.jsxs("div",{className:Ie("flex flex-col gap-4",!r&&"opacity-40"),children:[_.jsx(x1,{label:"Cannot Authenticate Account"}),_.jsxs("p",{className:"mt-2 text-sm",children:["We were not able to connect to our servers to authenticate your account. This may be because you are working behind a proxy or firewall. Please see our",_.jsx("a",{href:"https://docs.sourcery.ai/Product/FAQ/#how-do-i-connect-to-sourcery-behind-firewallcorporate-proxy",children:"docs"}),"for details to configure Sourcery to work behind a proxy. You can continue to use Sourcery for local in-line suggestions on your files, but won't be able to use the Coding Assistant. If this issue persists, please get in touch with us at support@sourcery.ai."]})]})}),_.jsx("div",{className:"py-4",children:_.jsx("div",{className:Ie("flex flex-col gap-4",(!r||!t)&&"opacity-40"),children:n?_.jsx(Sd,{label:"Opt-in completed"}):_.jsxs(_.Fragment,{children:[_.jsx(x1,{label:"Opt-in not completed"}),_.jsx("p",{className:"mt-2 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."}),_.jsx("p",{className:"text-sm",children:"We only send code when you interact with Sourcery and we don't send off any code beyond what's necessary for your message."}),_.jsx("p",{className:"text-sm",children:"Sourcery does not store any of your code on its servers."}),_.jsxs("p",{className:"text-sm",children:["You can opt out at any time by editing your personal Sourcery configuration (",_.jsx("a",{href:"https://docs.sourcery.ai/Reference/Configuration/Sources/#user-configuration-file-system-locations",target:"_blank",className:"underline hover:text-ide-primary-btn-text",children:"documentation"}),")."]}),_.jsx("form",{onSubmit:l,children:_.jsx("button",{type:"submit",className:"btn-primary px-3 py-1 font-bold",disabled:!t||!r,children:"Opt In"})})]})})})]})},rl=({message:e})=>{window.sourceryLS.postMessage({message:e})},nj=()=>_.jsxs("button",{className:"flex flex-row gap-2 rounded px-1 font-bold hover:bg-ide-chat-input-bg",onClick:e=>{e.stopPropagation(),rl({message:Dz})},children:[_.jsx("span",{children:_.jsx(He.Plus,{})}),_.jsx("span",{children:"New Troubleshoot"})]}),rj=()=>{const[e,t]=P.useState(!1),n=P.useCallback(r=>{if(r.preventDefault(),e)return;t(()=>!0);const{yesno:i}=Object.fromEntries(new FormData(r.currentTarget).entries());rl({message:{target:"languageServer",view:"troubleshooting",request:"resume",promptValue:i==="yes"}})},[e]);return _.jsx("div",{className:Ie("ml-4 flex flex-row justify-end",e&&"hidden"),children:_.jsxs("div",{className:"rounded-lg-br-none flex flex-row gap-px bg-ide-chat-input-bg p-2",children:[_.jsxs("form",{onSubmit:n,children:[_.jsx("input",{type:"hidden",name:"yesno",value:"yes"}),_.jsx("button",{type:"submit",className:"btn-primary w-24 rounded-none rounded-l p-2",children:"Yes"})]}),_.jsxs("form",{onSubmit:n,children:[_.jsx("input",{type:"hidden",name:"yesno",value:"no"}),_.jsx("button",{type:"submit",className:"btn-primary w-24 rounded-none rounded-r p-2",children:"No"})]})]})})},ij=({message:{placeholder:e}})=>{const[t,n]=P.useState(!1),r=P.useCallback(s=>{if(s.preventDefault(),t)return;n(()=>!0);const{promptValue:a}=Object.fromEntries(new FormData(s.currentTarget).entries());a&&rl({message:{target:"languageServer",view:"troubleshooting",request:"resume",promptValue:a}})},[t]),i=s=>{var a;s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),(a=s.currentTarget.form)==null||a.requestSubmit())};return _.jsx("div",{className:Ie("ml-4 flex flex-row justify-end",t&&"hidden"),children:_.jsxs("form",{onSubmit:r,className:"rounded-lg-br-none relative flex w-full flex-col bg-ide-chat-input-bg p-2",children:[_.jsx("textarea",{name:"promptValue",className:"h-fit w-full resize-none rounded bg-ide-editor-bg p-2 pr-8",placeholder:e||"Ask anything.",autoFocus:!0,onKeyDown:i,disabled:t}),_.jsx("button",{type:"submit",className:"absolute bottom-6 right-6 text-ide-primary-btn-text hover:enabled:opacity-80",disabled:t,children:_.jsx(He.PaperPlane,{})})]})})},sj=({message:e})=>{switch(e.kind){case"yesno":return _.jsx(rj,{});case"text":return _.jsx(ij,{message:e})}},aj=({message:{textContent:e}})=>_.jsx("div",{className:"ml-4 flex flex-row justify-end",children:_.jsx("p",{className:"rounded-lg-br-none bg-ide-chat-input-bg px-4 py-2",children:e})}),oj=({message:{textContent:e,level:t}})=>{switch(t){case"feedback":return _.jsxs("div",{className:"hidden flex-row items-center gap-2 last:flex",children:[_.jsx("span",{children:_.jsx(He.CircleNotch,{className:"h-3 w-3 animate-[spin_0.5s_linear_infinite]"})}),_.jsx("span",{className:"italic",children:e})]});default:return _.jsx("div",{className:Ie("assistant-message",t==="error"?"bg-ide-error-bg":t==="warning"?"bg-ide-warning-bg":"bg-ide-chat-input-bg"),children:_.jsx(Js,{markdown:e})})}},lj=({className:e})=>{const[{messages:t},n]=P.useState({messages:[]}),r=P.useRef(null),i=gp(r),s=P.useCallback(({data:a})=>{switch(a.command){case"troubleshooting/reset":n(wt(o=>{o.messages=[]})),rl({message:MT});break;case"troubleshooting/addMessage":n(wt(o=>{o.messages.push(a.message)}))}},[]);return P.useLayoutEffect(()=>{i()},[t.length,i]),P.useEffect(()=>(window.addEventListener("message",s),()=>window.removeEventListener("message",s)),[s]),P.useEffect(()=>{rl({message:MT})},[]),t.length===0?_.jsx("section",{className:"flex grow flex-col items-center justify-center gap-8",children:_.jsx(Yc,{})}):_.jsx("div",{className:e,children:_.jsx("section",{className:"flex grow flex-col gap-2 overflow-auto p-2 pb-8",ref:r,children:t.map((a,o)=>{switch(a.type){case"assistant":return _.jsx(oj,{message:a},o);case"userInput":return _.jsx(sj,{message:a},o);case"user":return _.jsx(aj,{message:a},o)}})})})},uj=({intent:e="info",children:t})=>_.jsx("div",{className:Ie("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});window.sourceryLS=window.sourceryLS||{};const cj=({message:e})=>{window.sourceryLS.postMessage({message:e})},fj=({activeView:e,onSelect:t,isCodeReviewEnabled:n,isTroubleshootingEnabled:r})=>_.jsxs("div",{className:"flex flex-row flex-wrap items-center justify-between",children:[_.jsxs("div",{className:"flex grow flex-row flex-wrap gap-2 border-b border-ide-border px-2",children:[_.jsx("button",{className:Ie("px-2 py-2 font-bold",e==="chat"?"opacity-100":"opacity-80 hover:opacity-100"),onClick:t("chat"),children:"Chat"}),n&&_.jsx("button",{className:Ie("px-2 py-2 font-bold",e==="review"?"opacity-100":"opacity-80 hover:opacity-100"),onClick:t("review"),children:"Review"}),r&&_.jsx("button",{className:Ie("px-2 py-2 font-bold",e==="troubleshooting"?"opacity-100":"opacity-80 hover:opacity-100"),onClick:t("troubleshooting"),children:"Troubleshooting"})]}),_.jsx("div",{className:"flex grow flex-row justify-end border-b border-ide-border p-2",children:e==="chat"?_.jsx(Kz,{}):e==="review"?_.jsx(Qz,{}):e==="troubleshooting"?_.jsx(nj,{}):null})]}),dj=()=>{const[{status:e,appContext:t},n]=P.useState({status:"pending",appContext:{isFeatureFlagEnabled:!1,isAuthenticated:!1,isAuthorized:!1,isRepositoryOpenSource:!1,isConfigEnabled:!1,isCodeReviewEnabled:!1,isTroubleshootingEnabled:!1}}),[r,i]=P.useState("chat"),s=P.useRef(null),a=P.useMemo(()=>t.isFeatureFlagEnabled&&t.isAuthenticated&&t.isAuthorized&&t.isConfigEnabled,[t]),o=P.useMemo(()=>t.productStatus==="trialing"||t.product==="prod_free"||t.product==="prod_opensource",[t]),l=P.useMemo(()=>t.product==="prod_opensource"?"Sourcery for Open Source":"Sourcery Free Trial",[t]),u=P.useCallback(({data:c})=>{switch(c.command){case"chat/focus":i(()=>"chat");break;case"context/update":n(wt(f=>{f.status="ok",f.appContext={...f.appContext,...c.updates}}))}},[]);return P.useEffect(()=>(window.addEventListener("message",u),()=>window.removeEventListener("message",u)),[u]),P.useEffect(()=>{cj({message:Cz})},[]),_.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:[o&&_.jsxs(uj,{children:[_.jsx("span",{children:_.jsx(He.InfoCircle,{})}),_.jsx("span",{children:l}),_.jsx("span",{children:"-"}),_.jsx("a",{href:"https://sourcery.ai/dashboard",className:"cursor-pointer underline",children:"Upgrade Now"})]}),e==="pending"?_.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-8",children:[_.jsx(Yc,{}),_.jsx("p",{className:"italic",children:"Loading..."})]}):a?_.jsxs(_.Fragment,{children:[_.jsx(fj,{activeView:r,onSelect:c=>()=>{i(c),c==="chat"&&setTimeout(()=>{var f;return(f=s.current)==null?void 0:f.focus()},25)},isCodeReviewEnabled:t.isCodeReviewEnabled,isTroubleshootingEnabled:t.isTroubleshootingEnabled}),_.jsx(Wz,{className:Ie(r==="chat"?"flex grow flex-col overflow-hidden":"hidden"),ref:s}),t.isCodeReviewEnabled&&_.jsx(Jz,{className:Ie(r==="review"?"flex grow flex-col overflow-hidden":"hidden")}),t.isTroubleshootingEnabled&&_.jsx(lj,{className:Ie(r==="troubleshooting"?"flex grow flex-col overflow-hidden":"hidden")})]}):_.jsx(tj,{logo:!0,appContext:t})]})};Ad.createRoot(document.getElementById("root")).render(_.jsx(On.StrictMode,{children:_.jsx(dj,{})}));