imio.omnia.tinymce 1.0__py3-none-any.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 (90) hide show
  1. imio/omnia/tinymce/__init__.py +6 -0
  2. imio/omnia/tinymce/browser/__init__.py +0 -0
  3. imio/omnia/tinymce/browser/action.py +6 -0
  4. imio/omnia/tinymce/browser/configure.zcml +40 -0
  5. imio/omnia/tinymce/browser/controlpanel.py +93 -0
  6. imio/omnia/tinymce/browser/npm/package-lock.json +125 -0
  7. imio/omnia/tinymce/browser/npm/package.json +8 -0
  8. imio/omnia/tinymce/browser/overrides/.gitkeep +0 -0
  9. imio/omnia/tinymce/browser/resources/.env.example +13 -0
  10. imio/omnia/tinymce/browser/resources/.git +1 -0
  11. imio/omnia/tinymce/browser/resources/.gitignore +26 -0
  12. imio/omnia/tinymce/browser/resources/.gitlab-ci.yml +77 -0
  13. imio/omnia/tinymce/browser/resources/.storybook/main.js +124 -0
  14. imio/omnia/tinymce/browser/resources/.storybook/preview.js +8 -0
  15. imio/omnia/tinymce/browser/resources/CHANGELOG.md +19 -0
  16. imio/omnia/tinymce/browser/resources/CLAUDE.md +62 -0
  17. imio/omnia/tinymce/browser/resources/Makefile +28 -0
  18. imio/omnia/tinymce/browser/resources/README.md +327 -0
  19. imio/omnia/tinymce/browser/resources/dev/index.html +41 -0
  20. imio/omnia/tinymce/browser/resources/dev/vite.config.js +78 -0
  21. imio/omnia/tinymce/browser/resources/docs/images/example1.png +0 -0
  22. imio/omnia/tinymce/browser/resources/eslint.config.js +36 -0
  23. imio/omnia/tinymce/browser/resources/package-lock.json +4913 -0
  24. imio/omnia/tinymce/browser/resources/package.json +61 -0
  25. imio/omnia/tinymce/browser/resources/src/assets/ia-icon.svg +5 -0
  26. imio/omnia/tinymce/browser/resources/src/assets/omnia-icon.svg +10 -0
  27. imio/omnia/tinymce/browser/resources/src/client.js +239 -0
  28. imio/omnia/tinymce/browser/resources/src/config.js +220 -0
  29. imio/omnia/tinymce/browser/resources/src/plugin.js +158 -0
  30. imio/omnia/tinymce/browser/resources/src/shortcuts.js +92 -0
  31. imio/omnia/tinymce/browser/resources/src/ui/App.jsx +75 -0
  32. imio/omnia/tinymce/browser/resources/src/ui/FloatingPanel.jsx +375 -0
  33. imio/omnia/tinymce/browser/resources/src/ui/PanelHeader.jsx +15 -0
  34. imio/omnia/tinymce/browser/resources/src/ui/SidePanel.jsx +284 -0
  35. imio/omnia/tinymce/browser/resources/src/ui/StreamingText.jsx +143 -0
  36. imio/omnia/tinymce/browser/resources/src/ui/components.jsx +70 -0
  37. imio/omnia/tinymce/browser/resources/src/ui/mount.jsx +35 -0
  38. imio/omnia/tinymce/browser/resources/src/ui/omnia.css +35 -0
  39. imio/omnia/tinymce/browser/resources/src/utils.js +56 -0
  40. imio/omnia/tinymce/browser/resources/stories/FloatingPanel.stories.jsx +66 -0
  41. imio/omnia/tinymce/browser/resources/stories/SidePanel.stories.jsx +31 -0
  42. imio/omnia/tinymce/browser/resources/stories/StreamingText.stories.jsx +85 -0
  43. imio/omnia/tinymce/browser/resources/stories/TinyMCEEditor.stories.js +228 -0
  44. imio/omnia/tinymce/browser/resources/stories/TypingDots.stories.jsx +31 -0
  45. imio/omnia/tinymce/browser/resources/stories/mocks/editor.js +66 -0
  46. imio/omnia/tinymce/browser/resources/stories/mocks/omnia-client.js +99 -0
  47. imio/omnia/tinymce/browser/resources/stories/presets/accessibilite-reglement.html +49 -0
  48. imio/omnia/tinymce/browser/resources/stories/presets/ameliorer-communication.html +36 -0
  49. imio/omnia/tinymce/browser/resources/stories/presets/corriger-bulletin.html +186 -0
  50. imio/omnia/tinymce/browser/resources/stories/presets/long-cdld.html +12389 -0
  51. imio/omnia/tinymce/browser/resources/stories/presets/reduire-deliberation.html +87 -0
  52. imio/omnia/tinymce/browser/resources/stories/presets/traduire-guide.html +234 -0
  53. imio/omnia/tinymce/browser/resources/vite.config.js +27 -0
  54. imio/omnia/tinymce/browser/static/omnia-tinymce.css +1 -0
  55. imio/omnia/tinymce/browser/static/omnia-tinymce.js +22 -0
  56. imio/omnia/tinymce/browser/templates/omnia_config.pt +10 -0
  57. imio/omnia/tinymce/browser/viewlets.py +57 -0
  58. imio/omnia/tinymce/configure.zcml +42 -0
  59. imio/omnia/tinymce/interfaces.py +7 -0
  60. imio/omnia/tinymce/locales/README.rst +37 -0
  61. imio/omnia/tinymce/locales/__init__.py +0 -0
  62. imio/omnia/tinymce/locales/en/LC_MESSAGES/imio.omnia.tinymce.po +83 -0
  63. imio/omnia/tinymce/locales/fr/LC_MESSAGES/imio.omnia.tinymce.po +83 -0
  64. imio/omnia/tinymce/locales/imio.omnia.tinymce.pot +86 -0
  65. imio/omnia/tinymce/locales/update.py +74 -0
  66. imio/omnia/tinymce/locales/update.sh +12 -0
  67. imio/omnia/tinymce/permissions.zcml +10 -0
  68. imio/omnia/tinymce/profiles/default/actions.xml +13 -0
  69. imio/omnia/tinymce/profiles/default/browserlayer.xml +7 -0
  70. imio/omnia/tinymce/profiles/default/catalog.xml +4 -0
  71. imio/omnia/tinymce/profiles/default/metadata.xml +7 -0
  72. imio/omnia/tinymce/profiles/default/registry/main.xml +35 -0
  73. imio/omnia/tinymce/profiles/default/rolemap.xml +7 -0
  74. imio/omnia/tinymce/profiles/uninstall/browserlayer.xml +7 -0
  75. imio/omnia/tinymce/setuphandlers.py +45 -0
  76. imio/omnia/tinymce/testing.py +48 -0
  77. imio/omnia/tinymce/tests/__init__.py +0 -0
  78. imio/omnia/tinymce/tests/robot/test_example.robot +66 -0
  79. imio/omnia/tinymce/tests/test_robot.py +28 -0
  80. imio/omnia/tinymce/tests/test_setup.py +68 -0
  81. imio/omnia/tinymce/tests/test_viewlet.py +99 -0
  82. imio.omnia.tinymce-1.0-py3.12-nspkg.pth +2 -0
  83. imio_omnia_tinymce-1.0.dist-info/METADATA +294 -0
  84. imio_omnia_tinymce-1.0.dist-info/RECORD +90 -0
  85. imio_omnia_tinymce-1.0.dist-info/WHEEL +5 -0
  86. imio_omnia_tinymce-1.0.dist-info/entry_points.txt +5 -0
  87. imio_omnia_tinymce-1.0.dist-info/licenses/LICENSE.GPL +339 -0
  88. imio_omnia_tinymce-1.0.dist-info/licenses/LICENSE.rst +15 -0
  89. imio_omnia_tinymce-1.0.dist-info/namespace_packages.txt +2 -0
  90. imio_omnia_tinymce-1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,22 @@
1
+ (function(jt,ne){typeof exports=="object"&&typeof module<"u"?ne(require("tinymce")):typeof define=="function"&&define.amd?define(["tinymce"],ne):(jt=typeof globalThis<"u"?globalThis:jt||self,ne(jt.tinymce))})(this,(function(jt){"use strict";const ne=`<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 1080 1080" fill="none">
2
+ <path d="M1030.21 421.12C993.932 410.666 954.461 397.259 926.194 371.571C890.38 339.085 875.895 289.536 863.754 244.112C861.316 241.111 859.441 237.689 854.894 238.721H854.988C848.565 240.08 846.69 254.659 845.19 260.05C834.924 295.395 821.752 334.069 796.625 361.68C766.858 394.494 724.716 408.697 683.651 421.12C678.307 422.714 668.369 423.089 664.76 428.011C660.307 433.964 665.932 438.464 671.651 440.293C700.949 449.574 729.216 455.575 756.264 470.575C812.657 501.889 830.283 552.048 846.737 610.879C847.44 613.41 848.612 617.535 849.55 619.832C851.284 624.192 855.972 627.051 860.285 624.192C860.66 623.958 863.894 619.926 864.129 619.504C865.301 616.879 865.629 612.051 866.472 608.957C878.379 566.064 894.974 518.906 929.85 489.279C957.742 465.513 996.041 452.809 1031.29 442.449C1036.07 441.09 1046.81 440.246 1049.15 435.089C1054.03 424.073 1036.54 422.948 1030.26 421.073L1030.21 421.12Z" fill="#E6007E"/>
3
+ <path d="M217.46 645.991C210.053 624.803 204.99 602.677 202.318 579.52C151.128 605.911 100.642 635.585 52.3582 668.867C56.7647 666.711 61.6868 665.352 66.8901 665.024C67.7808 664.977 126.518 660.945 217.507 645.991H217.46Z" fill="#7D1751"/>
4
+ <path d="M30.4221 706.503C29.9065 698.628 31.7816 691.221 35.3911 684.846C27.8439 697.503 27.9845 713.816 37.3131 726.566C39.1413 729.051 41.2039 731.207 43.454 733.129C36.0474 726.52 31.1253 717.144 30.469 706.503H30.4221Z" fill="#7D1751"/>
5
+ <path d="M744.783 574.872C737.986 622.874 716.985 665.204 681.124 701.3C636.638 746.067 583.713 769.084 521.132 769.084C458.551 769.084 405.627 746.114 361.14 701.3C360.25 700.362 359.406 699.378 358.515 698.44C321.342 706.644 286.606 713.394 255.01 718.925C266.261 735.098 279.105 750.614 293.825 765.381C356.359 827.071 430.941 858.526 518.788 858.526C606.636 858.526 681.218 828.29 743.752 765.381C776.754 732.192 800.942 695.581 816.552 655.501C806.427 620.014 795.317 587.904 774.832 561.465C764.847 566.059 754.862 570.512 744.877 574.872H744.783Z" fill="#282828"/>
6
+ <path d="M254.776 639.566C272.964 636.285 292.184 632.582 312.201 628.41C310.279 623.863 308.497 619.269 306.904 614.628C298.888 591.095 294.903 566.016 294.903 539.156C294.903 537.937 294.95 536.718 294.997 535.452C295.841 474.184 317.498 422.103 361.094 378.226C404.408 333.458 458.504 310.442 521.085 310.442C580.01 310.442 630.356 330.833 673.202 370.585C703.25 360.882 732.877 348.834 756.69 327.974C752.471 323.286 748.159 318.645 743.658 314.098C681.124 252.455 606.496 221 518.695 221C430.894 221 356.265 251.236 293.731 314.145C231.197 375.835 199.93 450.886 199.93 539.156C199.93 552.937 200.774 566.391 202.321 579.517C204.993 602.674 210.055 624.8 217.462 645.989C229.369 644.02 241.791 641.91 254.729 639.566H254.776Z" fill="#282828"/>
7
+ <path d="M46.2221 673.078C48.2378 671.672 50.3004 670.266 52.363 668.859C46.269 671.813 41.1125 676.266 37.3154 681.751C39.7062 678.469 42.7063 675.516 46.2221 673.031V673.078Z" fill="#E6007E"/>
8
+ <path d="M388.424 691.598C445.661 678.238 511.664 660.425 581.886 637.127C634.483 619.595 689.423 598.969 744.785 574.827C754.769 570.468 764.754 566.014 774.739 561.42C767.004 551.436 758.004 542.201 747.082 533.95C741.175 529.497 734.753 525.278 727.721 521.387C718.721 516.371 709.58 512.434 700.345 509.012C581.371 559.733 464.787 593.438 372.158 615.189C351.485 620.064 331.468 624.423 312.202 628.408C292.185 632.533 273.012 636.236 254.777 639.565C241.839 641.909 229.37 644.065 217.51 645.987C126.521 660.941 67.7841 664.972 66.8935 665.019C61.6901 665.347 56.8149 666.707 52.3615 668.863C50.3458 670.269 48.2832 671.629 46.2206 673.082C42.6579 675.566 39.7047 678.52 37.3139 681.801C36.5639 682.785 36.0014 683.864 35.392 684.895C31.7824 691.27 29.9074 698.724 30.423 706.552C31.1262 717.24 36.0014 726.616 43.408 733.178C43.783 733.507 44.2049 733.835 44.6268 734.163C45.0018 734.444 45.3299 734.772 45.705 735.054C52.9241 740.585 62.112 743.632 71.9093 743.023C75.8939 742.741 146.866 737.96 254.918 718.975C286.513 713.443 321.249 706.693 358.423 698.489C368.267 696.333 378.205 694.083 388.377 691.692L388.424 691.598Z" fill="#E6007E"/>
9
+ <path d="M35.3927 684.846C36.0021 683.815 36.5646 682.736 37.3147 681.752C36.6115 682.736 36.0021 683.768 35.3927 684.846Z" fill="#E6007E"/>
10
+ </svg>
11
+ `,Oa='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 100 96" fill="none"><path fill="currentColor" d="M33.458 51.85H4.042C1.81 51.85 0 50.033 0 47.79v-2.468c0-2.242 1.81-4.06 4.042-4.06h29.416c2.233 0 4.042 1.818 4.042 4.06v2.469c0 2.242-1.81 4.06-4.042 4.06M70.958 73.402H4.042C1.81 73.402 0 71.585 0 69.342v-2.468c0-2.242 1.81-4.06 4.042-4.06h66.916c2.233 0 4.042 1.818 4.042 4.06v2.469c0 2.242-1.81 4.059-4.042 4.059M95.958 96H4.042C1.81 96 0 94.183 0 91.94v-2.468c0-2.242 1.81-4.06 4.042-4.06h91.916c2.233 0 4.042 1.818 4.042 4.06v2.469C100 94.183 98.19 96 95.958 96"/><path fill="#e6007e" d="M77.406 46.535c-.542.126-.75-.293-1.084-.67-1.458-5.481-3.208-11.424-7.5-15.358-3.375-3.096-8.125-4.728-12.458-5.984-.75-.21-2.875-.377-2.25-1.674.292-.628 1.583-.711 2.125-.879 4.208-1.255 8.833-2.762 12.167-5.65 4.166-3.556 6.166-9.248 7.583-14.395.083-.377.125-.962.292-1.255 0-.042.416-.544.458-.586.5-.335 1.083 0 1.292.544.125.293.25.753.333 1.088 1.958 7.072 4.083 13.14 10.833 16.907 3.25 1.799 6.625 2.51 10.125 3.64.667.21 1.375.754.834 1.465-.417.586-1.625.628-2.25.837-4.917 1.507-9.959 3.222-13.542 7.156-3 3.348-4.583 7.993-5.833 12.22-.167.67-.417 2.385-1.167 2.552z"/></svg>',ja='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 100 102" fill="none"><path fill="currentColor" fill-rule="evenodd" d="M67.393 22.079a5.843 5.843 0 0 0-8.175 0L1.402 80.414a5.83 5.83 0 0 0 0 7.583l12.263 12.249c2.336 2.334 5.838 2.334 8.177 0l58.4-57.752c1.752-1.751 1.752-5.832 0-8.166l-12.476-11.87-.37-.38zm8.177 16.333L63.89 26.745 46.907 43.031l11.612 12.304 17.05-16.92z" clip-rule="evenodd"/><path fill="#e6007e" d="M87.74 53.697c.285-.065.401.15.557.34.762 2.853 1.673 5.964 3.925 8.004 1.775 1.615 4.255 2.458 6.537 3.11.397.117 1.498.188 1.19.88-.148.326-.822.374-1.124.462-2.218.647-4.621 1.448-6.377 2.938-2.194 1.859-3.236 4.82-3.984 7.515-.05.195-.074.498-.147.662-.014.028-.221.28-.24.294-.273.181-.567 0-.675-.274a6 6 0 0 1-.175-.563c-1.034-3.697-2.144-6.845-5.686-8.81-1.702-.945-3.477-1.318-5.32-1.901-.36-.116-.711-.396-.434-.772.227-.311.853-.331 1.19-.433 2.582-.778 5.232-1.672 7.101-3.73 1.577-1.737 2.407-4.164 3.052-6.384.097-.34.213-1.253.618-1.34h-.006zM87.74.011c.285-.065.401.15.557.34.762 2.854 1.673 5.965 3.925 8.004 1.775 1.615 4.255 2.458 6.537 3.111.397.116 1.498.187 1.19.88-.148.325-.822.373-1.124.461-2.218.648-4.621 1.448-6.377 2.939-2.194 1.858-3.236 4.82-3.984 7.515-.05.195-.074.498-.147.662-.014.028-.221.28-.24.294-.273.18-.567 0-.675-.275a6 6 0 0 1-.175-.562c-1.034-3.697-2.144-6.845-5.686-8.81-1.702-.946-3.477-1.319-5.32-1.902-.36-.116-.711-.396-.434-.772.227-.31.853-.33 1.19-.433 2.582-.777 5.232-1.671 7.101-3.73 1.577-1.737 2.407-4.164 3.052-6.384.097-.34.213-1.253.618-1.34h-.006zM36.628.011c.286-.065.402.15.558.34.761 2.854 1.673 5.965 3.924 8.004 1.776 1.615 4.256 2.458 6.538 3.111.396.116 1.498.187 1.19.88-.148.325-.822.373-1.125.461-2.217.648-4.62 1.448-6.376 2.939-2.195 1.858-3.237 4.82-3.984 7.515-.051.195-.074.498-.148.662-.014.028-.22.28-.24.294-.272.18-.567 0-.674-.275a6 6 0 0 1-.176-.562c-1.033-3.697-2.143-6.845-5.685-8.81-1.702-.946-3.477-1.319-5.32-1.902-.36-.116-.711-.396-.434-.772.227-.31.852-.33 1.19-.433 2.582-.777 5.232-1.671 7.1-3.73 1.578-1.737 2.407-4.164 3.053-6.384.096-.34.212-1.253.617-1.34h-.005z"/></svg>',Na='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 100 96" fill="none"><path fill="currentColor" d="M33.458 44.15H4.042C1.81 44.15 0 45.967 0 48.21v2.468c0 2.242 1.81 4.06 4.042 4.06h29.416c2.233 0 4.042-1.818 4.042-4.06V48.21c0-2.242-1.81-4.06-4.042-4.06M70.958 22.598H4.042C1.81 22.598 0 24.416 0 26.658v2.468c0 2.242 1.81 4.06 4.042 4.06h66.916c2.233 0 4.042-1.818 4.042-4.06v-2.469c0-2.241-1.81-4.059-4.042-4.059M95.958 0H4.042C1.81 0 0 1.817 0 4.06v2.468c0 2.242 1.81 4.06 4.042 4.06h91.916A4.05 4.05 0 0 0 100 6.528V4.06A4.05 4.05 0 0 0 95.958 0"/><path fill="#e6007e" d="M74.792 49.465c.541-.126.75.293 1.083.67 1.458 5.481 3.208 11.424 7.5 15.358 3.375 3.096 8.125 4.728 12.458 5.984.75.21 2.875.376 2.25 1.674-.291.627-1.583.711-2.125.879-4.208 1.255-8.833 2.762-12.166 5.65-4.167 3.556-6.167 9.248-7.584 14.395-.083.376-.125.962-.291 1.255 0 .042-.417.544-.459.586-.5.335-1.083 0-1.291-.544-.125-.293-.25-.753-.334-1.088C71.875 87.212 69.75 81.144 63 77.377c-3.25-1.799-6.625-2.51-10.125-3.64-.667-.21-1.375-.754-.833-1.465.416-.586 1.625-.628 2.25-.837 4.916-1.507 9.958-3.222 13.541-7.156 3-3.348 4.584-7.993 5.834-12.22.166-.67.416-2.385 1.166-2.552z"/></svg>',$a='<svg xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" width="24" height="24" viewBox="0 0 100 90.54"><circle cx="44.95" cy="45.59" r="44.95" style="fill:currentColor"/><path d="M55.25 81.24c-.99.18-2.7-.24-3.38-.82s-.94-1.52-1.16-2.37l-.59-2.29-1.51-5.6-.4-1.44-.99-3.74-.32-1.1-.33-1.19-.64-2.49-.71-2.6-.07-.25c-.02-.06-.2.1-.22.17l-.39 1.42-.17.65-.47 1.75-.63 2.34-.36 1.41-.13.56-.38 1.31-.48 1.7-1.44 5.42-.41 1.64-.58 2.01-.22.86c-.29 1.14-1.07 1.97-2.21 2.34-.35.11-.73.31-1.08.33-.6.03-1.2.07-1.77 0-1.27-.16-2.45-.63-3.43-1.43-.18-.14-.39-.5-.5-.71-.34-.58-.26-1.72-.09-2.37l.24-.91.2-.78.7-3.07.17-.74.61-2.77.23-.83.17-.74.19-.87.24-1.01.19-.8.18-.78.41-1.71.22-.85.44-1.87.45-1.84.16-.65c.07-.28.11-.58.18-.87l.24-1 .21-1.05c.05-.25.15-.63.22-.9V41.16l-.03-2.78-5.23-.03c-.38 0-.78-.23-1.19-.19-.45.04-2.27-.19-2.76-.28l-1.52-.28-.81-.16c-.29-.06-.55-.12-.82-.19l-.71-.18c-.84-.21-1.65-.38-2.47-.66l-2.3-.8c-1.57-.55-3.04-1.03-4.14-2.24-1.23-1.36-.5-4.54 1.82-5.48.76-.31 1.13-.4 1.84-.25l1.78.39.81.18.71.18.81.18 2.78.57.66.13 3.1.47 1.32.18 2.17.15 2.53.12 1.18.13 2.22.23c.28.03.52.13.82.15l.85.08c.51.05.94.14 1.45.2l2.02.24c.45.05.9.14 1.36.14l2.59-.02c.65 0 1.3-.17 1.96-.27l1.15-.17 1.32-.22.81-.15c.9-.17 1.77-.19 2.68-.26l.98-.08 2.31-.08c.7-.02 1.34-.23 2.05-.14.39.05.79-.12 1.16-.16l1.96-.2 1.21-.15 1-.18.89-.17.96-.2 1.25-.26.72-.16.71-.19 1.7-.43.71-.17c.68-.16 1.29-.24 1.97.02.16.06.5.14.62.23.58.42 1.11.84 1.47 1.46.2.35.46.84.52 1.22.07.5.1 1.13 0 1.59-.38 1.69-2.39 2.53-3.89 3.08l-1.95.71c-1.02.37-2.02.66-3.06.89l-2.28.52c-.83.19-1.61.36-2.48.46l-1.43.16c-.17.02-.43.11-.62.16-.86-.12-1.66.13-2.52.14l-4.15.06v10.58c0 1.9-.42 2.54.13 4.78l1.3 5.33.2.87.18.72.95 4.25 1.59 6.49 1.11 4.92.18.91c.08.41.1 1.03-.01 1.44-.29.99-1.17 1.64-2.11 1.94-.55.18-1.09.35-1.65.45l-1 .18Z" style="fill:#fff"/><circle cx="45.07" cy="20.66" r="8.46" style="fill:#fff"/><path d="M78.96.02c.49-.11.67.26.97.6 1.31 4.93 2.88 10.27 6.74 13.81 3.03 2.78 7.3 4.25 11.2 5.38.67.19 2.58.34 2.02 1.5-.26.56-1.42.64-1.91.79-3.78 1.13-7.94 2.48-10.94 5.08-3.75 3.2-5.54 8.31-6.82 12.94-.07.34-.11.86-.26 1.13 0 .04-.37.49-.41.53-.45.3-.97 0-1.16-.49-.11-.26-.22-.68-.3-.98-1.76-6.36-3.67-11.81-9.74-15.2-2.92-1.62-5.96-2.26-9.1-3.27-.6-.19-1.24-.68-.75-1.32.37-.53 1.46-.56 2.02-.75 4.42-1.35 8.95-2.9 12.17-6.43 2.7-3.01 4.12-7.19 5.24-10.99.15-.6.37-2.14 1.05-2.29l-.04-.04Z" style="fill:#e6007e"/></svg>',Ua='<svg xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" width="24" height="24" viewBox="0 0 24.04 24.04"><path d="M8.32 13.85c-.13.03-.18-.07-.26-.16-.35-1.32-.77-2.74-1.8-3.69-.81-.74-1.95-1.13-2.99-1.44-.18-.05-.69-.09-.54-.4.07-.15.38-.17.51-.21 1.01-.3 2.12-.66 2.92-1.36 1-.85 1.48-2.22 1.82-3.45.02-.09.03-.23.07-.3 0-.01.1-.13.11-.14.12-.08.26 0 .31.13.03.07.06.18.08.26.47 1.7.98 3.15 2.6 4.06.78.43 1.59.6 2.43.87.16.05.33.18.2.35-.1.14-.39.15-.54.2-1.18.36-2.39.77-3.25 1.72-.72.8-1.1 1.92-1.4 2.93-.04.16-.1.57-.28.61h.01Z" style="fill:#e6007e"/><path d="M0 3c0-1.65 1.35-3 3-3h10.52c1.66 0 3 1.35 3 3v4.51h4.51c1.66 0 3 1.35 3 3v10.52c0 1.66-1.35 3-3 3H10.51c-1.66 0-3-1.35-3-3v-4.51H3c-1.66 0-3-1.35-3-3zm3-1.5c-.83 0-1.5.67-1.5 1.5v10.52c0 .83.67 1.5 1.5 1.5h10.52c.83 0 1.5-.67 1.5-1.5V3c0-.83-.67-1.5-1.5-1.5zm10.73 15.02c.29.45.6.88.95 1.27-1.12.86-2.51 1.5-4.16 1.94.27.33.68.95.83 1.3 1.69-.54 3.12-1.27 4.34-2.24 1.17 1 2.61 1.75 4.4 2.21.2-.38.62-1.01.94-1.34-1.69-.38-3.09-1.04-4.24-1.93 1.02-1.12 1.84-2.48 2.44-4.14h1.8v-1.57h-4.51v1.57h1.15c-.48 1.27-1.11 2.32-1.91 3.2-.22-.24-.43-.48-.62-.74-.42.27-.91.43-1.41.47" style="fill:currentColor"/></svg>',Ha='<svg xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" width="24" height="24" viewBox="0 0 24 13.91"><path d="M6.41 8.34c-.09-.28-.19-.57-.29-.87s-.21-.6-.31-.89H2.63c-.1.3-.21.59-.31.89s-.2.59-.29.87H.12q.465-1.32.87-2.43c.28-.74.54-1.45.81-2.1.26-.66.52-1.28.78-1.88.26-.59.52-1.17.8-1.73h1.74c.27.56.53 1.14.79 1.73s.52 1.22.79 1.88.53 1.36.81 2.1q.42 1.125.87 2.43H6.42ZM4.2 2.03q-.06.18-.18.48c-.08.2-.17.44-.27.71s-.21.56-.34.88c-.12.32-.25.66-.38 1.01h2.33c-.12-.35-.25-.69-.36-1.01-.12-.32-.23-.62-.33-.88-.11-.27-.2-.5-.28-.71-.08-.2-.14-.36-.19-.48M12.13 8.44c-.45 0-.89-.01-1.33-.04s-.9-.09-1.38-.19V.31A13.7 13.7 0 0 1 11.9.1c.52 0 .99.04 1.43.11s.81.2 1.12.38.56.42.73.71c.18.29.27.66.27 1.09 0 .65-.31 1.16-.94 1.54.52.2.87.46 1.06.8s.28.72.28 1.14c0 .85-.31 1.5-.94 1.93-.62.43-1.55.65-2.78.65Zm-.92-5.05h.89c.56 0 .97-.07 1.21-.22s.37-.38.37-.7-.12-.56-.38-.69c-.25-.13-.62-.2-1.11-.2h-.51q-.27 0-.48.03v1.78Zm0 1.4v2.1c.13.02.28.03.44.04s.33.01.52.01c.55 0 .99-.08 1.33-.24q.51-.24.51-.87c0-.38-.14-.64-.42-.81-.28-.16-.69-.24-1.21-.24h-1.15ZM21.04 8.5q-1.98 0-3.03-1.11c-.69-.74-1.04-1.78-1.04-3.14 0-.67.11-1.28.32-1.81s.5-.98.87-1.34.81-.64 1.32-.83 1.06-.28 1.66-.28c.34 0 .66.03.94.08s.53.11.74.18.39.13.53.21c.14.07.24.13.31.16l-.53 1.48a4.25 4.25 0 0 0-2.01-.48c-.28 0-.56.05-.83.14s-.51.25-.72.45c-.21.21-.37.48-.5.81-.12.33-.19.73-.19 1.2q0 .57.12 1.05c.08.33.22.61.4.84.18.24.42.42.72.56q.45.21 1.08.21a5 5 0 0 0 1.28-.16c.17-.04.31-.09.44-.15.12-.05.24-.11.34-.15l.51 1.47c-.26.16-.62.3-1.09.42s-1.02.19-1.63.19Z" style="fill:currentColor"/><path d="M0 11.01c1.71 0 1.71 2.4 3.43 2.4s1.71-2.4 3.42-2.4 1.71 2.4 3.43 2.4 1.71-2.4 3.43-2.4 1.71 2.4 3.43 2.4 1.72-2.4 3.43-2.4 1.72 2.4 3.43 2.4" style="fill:none;stroke:#e6007e;stroke-miterlimit:10"/></svg>';async function*Wa(t,e){const n=t.body.getReader(),i=new TextDecoder;let s="";try{for(;!e?.aborted;){const{done:r,value:o}=await n.read();if(r)break;s+=i.decode(o,{stream:!0});const a=s.split(`
12
+
13
+ `);s=a.pop()||"";for(const c of a)for(const l of c.split(`
14
+ `))if(l.startsWith("data: ")){const u=l.slice(6);if(u==="[DONE]")return;try{const f=JSON.parse(u);f.chunk!=null&&(yield f.chunk)}catch{u.trim()&&(yield u)}}}}finally{n.releaseLock()}}class we extends Error{constructor(e,n,i){super(e),this.name="OmniaApiError",this.status=n,this.retryable=i}}function za(t,e){for(const n of t)if(n.type==="string_too_short"&&n.loc?.includes("input")){const i=n.ctx?.min_length;return i?e("error.text_too_short",{min:i}):e("error.text_too_short_generic")}return e("error.validation")}async function ji(t,e){const{status:n,statusText:i}=t;if(n===422)try{const s=await t.json();return Array.isArray(s.detail)?new we(za(s.detail,e),n,!1):typeof s.detail=="string"?new we(s.detail,n,!1):new we(e("error.validation"),n,!1)}catch{}return new we(`Omnia API error: ${n} ${i}`,n,!0)}class Ka{#i;#s;#o;#r;#n;#l;#a;constructor({baseUrl:e,application:n,municipality:i,authToken:s,onError:r,endpoints:o,t:a}){this.#i=e.replace(/\/+$/,""),this.#s=n||null,this.#o=i||null,this.#r=s||null,this.#n=r||null,this.#l=o||{},this.#a=a||(c=>c)}#c(e){let n;if(/^https?:\/\//.test(e)?n=e:e.startsWith("/")?n=`${this.#i}${e}`:n=`${this.#i}/${e}`,this.#r){const i=n.includes("?")?"&":"?";n+=`${i}_authenticator=${encodeURIComponent(this.#r)}`}return n}#t(e,n){return this.#l[e]||n}#u(e={}){const n={"Content-Type":"application/json",...e};return this.#s&&(n["x-imio-application"]=this.#s),this.#o&&(n["x-imio-municipality"]=this.#o),n}async#e(e,n,i){const s=this.#c(e),r=this.#u();let o;try{o=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(n),signal:i})}catch(a){throw a.name!=="AbortError"&&this.#n?.(a),a}if(!o.ok){const a=await ji(o,this.#a);throw this.#n?.(a),a}return o.json()}async*#f(e,n,i){const s=this.#c(e),r=this.#u({Accept:"text/event-stream"});let o;try{o=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(n),signal:i})}catch(a){throw a.name!=="AbortError"&&this.#n?.(a),a}if(!o.ok){const a=await ji(o,this.#a);throw this.#n?.(a),a}yield*Wa(o,i)}async*generate(e,n={}){const{signal:i,...s}=n;yield*this.#f(this.#t("generate","/v1/agents/generate-content"),{prompt:e,...s},i)}async expandText(e,n={}){const{signal:i,expansionTarget:s,...r}=n,o={input:e,...r};return s!==void 0&&(o.expansion_target=s),(await this.#e(this.#t("expand-text","/v1/agents/expand-text"),o,i)).result}async improveText(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("improve-text","/v1/agents/improve-text"),{input:e},i)).result}async reduceText(e,n={}){const{signal:i,reductionTarget:s}=n,r={input:e};return s!==void 0&&(r.reduction_target=s),(await this.#e(this.#t("reduce-text","/v1/agents/reduce-text"),r,i)).result}async correctText(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("correct-text","/v1/agents/correct-text"),{input:e},i)).result}async makeAccessible(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("make-accessible","/v1/agents/make-accessible"),{input:e},i)).result}async translateText(e,n,i={}){const{signal:s}=i;return(await this.#e(this.#t("translate-text","/v1/agents/translate-text"),{input:e,target_language:n},s)).result}}const Ni={"action.generate":"Generate content","action.expand-text":"Expand","action.improve-text":"Improve","action.reduce-text":"Reduce","action.correct-text":"Correct","action.make-accessible":"Make accessible","action.translate-text":"Translate","menu.generate":"Generate content","menu.expand-text":"Expand selection","menu.improve-text":"Improve","menu.reduce-text":"Reduce","menu.correct-text":"Correct","menu.make-accessible":"Make accessible","menu.translate-text":"Translate","tone.default":"None (default)","tone.formal":"Formal","tone.casual":"Casual","tone.bullet_points":"Key points","tone.concise":"Concise","button.retry":"Retry","button.cancel":"Cancel","button.accept":"Accept","button.generate":"Generate","button.stop":"Stop","button.insert":"Insert","button.copy":"Copy","button.back":"Back","button.translate":"Translate","button.close":"Close","panel.generate_title":"Generate text","panel.subtitle":"Omnia – iMio's AI assistant","panel.history":"History","panel.scope_document":"Scope: whole text","placeholder.prompt":"Describe the content to generate…","tooltip.omnia":"iMio's Omnia Assistant","tooltip.omnia_no_selection":"Without a selection, this applies to the whole text",loading:"Loading…",disclaimer:"Artificial intelligence can make mistakes, please verify important information.","error.generic":"An error occurred","error.text_too_short":"The selected text is too short (minimum {min} characters).","error.text_too_short_generic":"The selected text is too short.","error.validation":"Validation error."},$i={en:Ni,fr:{"action.generate":"Générer du contenu","action.expand-text":"Développer","action.improve-text":"Améliorer","action.reduce-text":"Réduire","action.correct-text":"Corriger","action.make-accessible":"Rendre accessible","action.translate-text":"Traduire","menu.generate":"Générer du contenu","menu.expand-text":"Développer la sélection","menu.improve-text":"Améliorer","menu.reduce-text":"Réduire","menu.correct-text":"Corriger","menu.make-accessible":"Rendre accessible","menu.translate-text":"Traduire","tone.default":"Aucun (par défaut)","tone.formal":"Formel","tone.casual":"Informel","tone.bullet_points":"Points clés","tone.concise":"Concis","button.retry":"Réessayer","button.cancel":"Annuler","button.accept":"Accepter","button.generate":"Générer","button.stop":"Stop","button.insert":"Insérer","button.copy":"Copier","button.back":"Retour","button.translate":"Traduire","button.close":"Fermer","panel.generate_title":"Générer du texte","panel.subtitle":"Omnia – L'assistant IA d'iMio","panel.history":"Historique","panel.scope_document":"Portée : tout le texte","placeholder.prompt":"Décrivez le contenu à générer…","tooltip.omnia":"Assistant Omnia d'iMio","tooltip.omnia_no_selection":"Sans sélection, l'action s'applique à tout le texte",loading:"Chargement…",disclaimer:"L'intelligence artificielle peut commettre des erreurs, vérifiez les informations importantes.","error.generic":"Une erreur est survenue","error.text_too_short":"Le texte sélectionné est trop court (minimum {min} caractères).","error.text_too_short_generic":"Le texte sélectionné est trop court.","error.validation":"Erreur de validation."},nl:{"action.generate":"Inhoud genereren","action.expand-text":"Uitbreiden","action.improve-text":"Verbeteren","action.reduce-text":"Inkorten","action.correct-text":"Corrigeren","action.make-accessible":"Toegankelijk maken","action.translate-text":"Vertalen","menu.generate":"Inhoud genereren","menu.expand-text":"Selectie uitbreiden","menu.improve-text":"Verbeteren","menu.reduce-text":"Inkorten","menu.correct-text":"Corrigeren","menu.make-accessible":"Toegankelijk maken","menu.translate-text":"Vertalen","tone.default":"Geen (standaard)","tone.formal":"Formeel","tone.casual":"Informeel","tone.bullet_points":"Kernpunten","tone.concise":"Beknopt","button.retry":"Opnieuw proberen","button.cancel":"Annuleren","button.accept":"Accepteren","button.generate":"Genereren","button.stop":"Stop","button.insert":"Invoegen","button.copy":"Kopiëren","button.back":"Terug","button.translate":"Vertalen","button.close":"Sluiten","panel.generate_title":"Tekst genereren","panel.subtitle":"Omnia – de AI-assistent van iMio","panel.history":"Geschiedenis","panel.scope_document":"Bereik: volledige tekst","placeholder.prompt":"Beschrijf de te genereren inhoud…","tooltip.omnia":"Omnia-assistent van iMio","tooltip.omnia_no_selection":"Zonder selectie geldt de actie voor de volledige tekst",loading:"Laden…",disclaimer:"Kunstmatige intelligentie kan fouten maken, controleer belangrijke informatie.","error.generic":"Er is een fout opgetreden","error.text_too_short":"De geselecteerde tekst is te kort (minimaal {min} tekens).","error.text_too_short_generic":"De geselecteerde tekst is te kort.","error.validation":"Validatiefout."},de:{"action.generate":"Inhalt generieren","action.expand-text":"Erweitern","action.improve-text":"Verbessern","action.reduce-text":"Kürzen","action.correct-text":"Korrigieren","action.make-accessible":"Barrierefrei machen","action.translate-text":"Übersetzen","menu.generate":"Inhalt generieren","menu.expand-text":"Auswahl erweitern","menu.improve-text":"Verbessern","menu.reduce-text":"Kürzen","menu.correct-text":"Korrigieren","menu.make-accessible":"Barrierefrei machen","menu.translate-text":"Übersetzen","tone.default":"Keiner (Standard)","tone.formal":"Formell","tone.casual":"Informell","tone.bullet_points":"Kernpunkte","tone.concise":"Prägnant","button.retry":"Wiederholen","button.cancel":"Abbrechen","button.accept":"Übernehmen","button.generate":"Generieren","button.stop":"Stopp","button.insert":"Einfügen","button.copy":"Kopieren","button.back":"Zurück","button.translate":"Übersetzen","button.close":"Schließen","panel.generate_title":"Text generieren","panel.subtitle":"Omnia – der KI-Assistent von iMio","panel.history":"Verlauf","panel.scope_document":"Umfang: gesamter Text","placeholder.prompt":"Beschreiben Sie den zu generierenden Inhalt…","tooltip.omnia":"Omnia-Assistent von iMio","tooltip.omnia_no_selection":"Ohne Auswahl gilt die Aktion für den gesamten Text",loading:"Wird geladen…",disclaimer:"Künstliche Intelligenz kann Fehler machen, bitte überprüfen Sie wichtige Informationen.","error.generic":"Ein Fehler ist aufgetreten","error.text_too_short":"Der ausgewählte Text ist zu kurz (mindestens {min} Zeichen).","error.text_too_short_generic":"Der ausgewählte Text ist zu kurz.","error.validation":"Validierungsfehler."}};function Ga(t="fr"){const e=$i[t]||$i.fr;return function(i,s){let r=e[i]||Ni[i]||i;if(s)for(const[o,a]of Object.entries(s))r=r.replace(`{${o}}`,a);return r}}const ie=[{id:"generate",menu:"panel",shortcut:"g",icon:"omnia",menuItemId:"omnia-generate"},{id:"expand-text",menu:"floating",shortcut:"d",icon:"omnia-expand-text",menuItemId:"omnia-expand-text"},{id:"improve-text",menu:"floating",shortcut:"a",icon:"omnia-improve-text",menuItemId:"omnia-improve-text"},{id:"reduce-text",menu:"floating",shortcut:"r",icon:"omnia-reduce-text",menuItemId:"omnia-reduce-text"},{id:"correct-text",menu:"floating",shortcut:"c",icon:"omnia-correct-text",menuItemId:"omnia-correct-text"},{id:"make-accessible",menu:"floating",shortcut:"x",icon:"omnia-make-accessible",menuItemId:"omnia-make-accessible"},{id:"translate-text",menu:"floating",shortcut:"t",icon:"omnia-translate-text",menuItemId:"omnia-translate-text"}],Ui=ie.map(t=>t.id),qa=Ui,Ce=[{code:"fr",label:"Français"},{code:"nl",label:"Nederlands"},{code:"de",label:"Deutsch"},{code:"en",label:"English"},{code:"es",label:"Español"},{code:"it",label:"Italiano"}],Xa={generate:"/v1/agents/generate-content","expand-text":"/v1/agents/expand-text","improve-text":"/v1/agents/improve-text","reduce-text":"/v1/agents/reduce-text","correct-text":"/v1/agents/correct-text","make-accessible":"/v1/agents/make-accessible","translate-text":"/v1/agents/translate-text"};function Hi(t){return Array.isArray(t)&&t.every(e=>typeof e=="string")?{value:t,valid:!0}:typeof t=="string"?{value:t.split(",").map(e=>e.trim()).filter(Boolean),valid:!0}:{valid:!1,message:"Expected a string or an array of strings."}}function Wi(t){return t&&typeof t=="object"&&!Array.isArray(t)?{value:t,valid:!0}:{valid:!1,message:"Expected an object."}}function Ya(t){return typeof t=="boolean"?{value:t,valid:!0}:Wi(t)}function Za(t){t.options.register("omnia_base_url",{processor:"string",default:""}),t.options.register("omnia_auth_token",{processor:"string",default:""}),t.options.register("omnia_application",{processor:"string",default:""}),t.options.register("omnia_municipality",{processor:"string",default:""}),t.options.register("omnia_default_translate_language",{processor:"string",default:"fr"}),t.options.register("omnia_enabled_features",{processor:Hi,default:qa}),t.options.register("omnia_endpoints",{processor:Wi,default:{}}),t.options.register("omnia_shortcuts",{processor:Ya,default:!0}),t.options.register("omnia_toolbar",{processor:"boolean",default:!0}),t.options.register("omnia_context_menu",{processor:"boolean",default:!0}),t.options.register("omnia_translate_languages",{processor:Hi,default:Ce.map(e=>e.code)}),t.options.register("omnia_history_limit",{processor:"number",default:5}),t.options.register("omnia_floating_panel_mode",{processor:e=>e==="inline"||e==="blur"?{value:e,valid:!0}:{valid:!1,message:'Expected "inline" or "blur".'},default:"inline"}),t.options.register("omnia_floating_panel_width",{processor:e=>e==="full"?{value:e,valid:!0}:typeof e=="number"&&e>0?{value:e,valid:!0}:{valid:!1,message:'Expected a positive number or "full".'},default:500}),t.options.register("omnia_locale",{processor:"string",default:"fr"})}function Ja(t){const e=new Set(Ui);return t.filter(n=>e.has(n))}function Qa(t,e){const n=new Map(Ce.map(o=>[o.code,o])),i=t.filter(o=>n.has(o)).map(o=>n.get(o)),s=i.length>0?i:Ce,r=new Set(s.map(o=>o.code));return{languages:s,defaultLanguage:r.has(e)?e:s[0].code}}function tl(t,e){if(t===!1)return{enabled:!1,prefix:"o",timeoutMs:1500,bindings:{}};t===!0&&(t={});const n=new Set(e),i={};for(const s of ie){const r=t.bindings?.[s.id],o=typeof r=="string"?r.toLowerCase():s.shortcut;n.has(s.id)&&o&&(i[s.id]=o)}return{enabled:t.enabled!==!1,prefix:typeof t.prefix=="string"&&t.prefix.length===1?t.prefix.toLowerCase():"o",timeoutMs:Number.isFinite(t.timeoutMs)?t.timeoutMs:1500,bindings:i}}function el(t){const e=Ja(t.options.get("omnia_enabled_features")),{languages:n,defaultLanguage:i}=Qa(t.options.get("omnia_translate_languages"),t.options.get("omnia_default_translate_language")),s=t.options.get("omnia_locale"),r=Ga(s);return{enabledFeatures:e,endpoints:{...Xa,...t.options.get("omnia_endpoints")},shortcuts:tl(t.options.get("omnia_shortcuts"),e),toolbar:t.options.get("omnia_toolbar"),contextMenu:t.options.get("omnia_context_menu"),defaultLanguage:i,languages:n,locale:s,t:r,historyLimit:Math.max(1,t.options.get("omnia_history_limit")),floatingPanelMode:t.options.get("omnia_floating_panel_mode"),floatingPanelWidth:t.options.get("omnia_floating_panel_width"),authToken:t.options.get("omnia_auth_token"),application:t.options.get("omnia_application"),municipality:t.options.get("omnia_municipality")}}var se,E,zi,bt,Ki,Gi,qi,Xi,rn,an,ln,Yi,Te={},Se=[],nl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,oe=Array.isArray;function pt(t,e){for(var n in e)t[n]=e[n];return t}function cn(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function st(t,e,n){var i,s,r,o={};for(r in e)r=="key"?i=e[r]:r=="ref"?s=e[r]:o[r]=e[r];if(arguments.length>2&&(o.children=arguments.length>3?se.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)o[r]===void 0&&(o[r]=t.defaultProps[r]);return re(t,o,i,s,null)}function re(t,e,n,i,s){var r={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++zi,__i:-1,__u:0};return s==null&&E.vnode!=null&&E.vnode(r),r}function il(){return{current:null}}function ct(t){return t.children}function ut(t,e){this.props=t,this.context=e}function Nt(t,e){if(e==null)return t.__?Nt(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Nt(t):null}function sl(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,i=[],s=[],r=pt({},e);r.__v=e.__v+1,E.vnode&&E.vnode(r),fn(t.__P,r,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,i,n??Nt(e),!!(32&e.__u),s),r.__v=e.__v,r.__.__k[r.__i]=r,ns(i,r,s),e.__e=e.__=null,r.__e!=n&&Zi(r)}}function Zi(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Zi(t)}function un(t){(!t.__d&&(t.__d=!0)&&bt.push(t)&&!Pe.__r++||Ki!=E.debounceRendering)&&((Ki=E.debounceRendering)||Gi)(Pe)}function Pe(){try{for(var t,e=1;bt.length;)bt.length>e&&bt.sort(qi),t=bt.shift(),e=bt.length,sl(t)}finally{bt.length=Pe.__r=0}}function Ji(t,e,n,i,s,r,o,a,c,l,u){var f,h,d,m,y,g,p,_=i&&i.__k||Se,b=e.length;for(c=ol(n,e,_,c,b),f=0;f<b;f++)(d=n.__k[f])!=null&&(h=d.__i!=-1&&_[d.__i]||Te,d.__i=f,g=fn(t,d,h,s,r,o,a,c,l,u),m=d.__e,d.ref&&h.ref!=d.ref&&(h.ref&&dn(h.ref,null,d),u.push(d.ref,d.__c||m,d)),y==null&&m!=null&&(y=m),(p=!!(4&d.__u))||h.__k===d.__k?c=Qi(d,c,t,p):typeof d.type=="function"&&g!==void 0?c=g:m&&(c=m.nextSibling),d.__u&=-7);return n.__e=y,c}function ol(t,e,n,i,s){var r,o,a,c,l,u=n.length,f=u,h=0;for(t.__k=new Array(s),r=0;r<s;r++)(o=e[r])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=t.__k[r]=re(null,o,null,null,null):oe(o)?o=t.__k[r]=re(ct,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=t.__k[r]=re(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):t.__k[r]=o,c=r+h,o.__=t,o.__b=t.__b+1,a=null,(l=o.__i=rl(o,n,c,f))!=-1&&(f--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(s>u?h--:s<u&&h++),typeof o.type!="function"&&(o.__u|=4)):l!=c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,o.__u|=4))):t.__k[r]=null;if(f)for(r=0;r<u;r++)(a=n[r])!=null&&(2&a.__u)==0&&(a.__e==i&&(i=Nt(a)),ss(a,a));return i}function Qi(t,e,n,i){var s,r;if(typeof t.type=="function"){for(s=t.__k,r=0;s&&r<s.length;r++)s[r]&&(s[r].__=t,e=Qi(s[r],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=Nt(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function vt(t,e){return e=e||[],t==null||typeof t=="boolean"||(oe(t)?t.some(function(n){vt(n,e)}):e.push(t)),e}function rl(t,e,n,i){var s,r,o,a=t.key,c=t.type,l=e[n],u=l!=null&&(2&l.__u)==0;if(l===null&&a==null||u&&a==l.key&&c==l.type)return n;if(i>(u?1:0)){for(s=n-1,r=n+1;s>=0||r<e.length;)if((l=e[o=s>=0?s--:r++])!=null&&(2&l.__u)==0&&a==l.key&&c==l.type)return o}return-1}function ts(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||nl.test(e)?n:n+"px"}function Ae(t,e,n,i,s){var r,o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||ts(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||ts(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")r=e!=(e=e.replace(Xi,"$1")),o=e.toLowerCase(),e=o in t||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=rn,t.addEventListener(e,r?ln:an,r)):t.removeEventListener(e,r?ln:an,r);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function es(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=rn++;else if(e.t<n.u)return;return n(E.event?E.event(e):e)}}}function fn(t,e,n,i,s,r,o,a,c,l){var u,f,h,d,m,y,g,p,_,b,v,w,M,V,S,A=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),r=[a=e.__e=n.__e]),(u=E.__b)&&u(e);t:if(typeof A=="function")try{if(p=e.props,_=A.prototype&&A.prototype.render,b=(u=A.contextType)&&i[u.__c],v=u?b?b.props.value:u.__:i,n.__c?g=(f=e.__c=n.__c).__=f.__E:(_?e.__c=f=new A(p,v):(e.__c=f=new ut(p,v),f.constructor=A,f.render=ll),b&&b.sub(f),f.state||(f.state={}),f.__n=i,h=f.__d=!0,f.__h=[],f._sb=[]),_&&f.__s==null&&(f.__s=f.state),_&&A.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=pt({},f.__s)),pt(f.__s,A.getDerivedStateFromProps(p,f.__s))),d=f.props,m=f.state,f.__v=e,h)_&&A.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),_&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(_&&A.getDerivedStateFromProps==null&&p!==d&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(p,v),e.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(p,f.__s,v)===!1){e.__v!=n.__v&&(f.props=p,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(C){C&&(C.__=e)}),Se.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(p,f.__s,v),_&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(d,m,y)})}if(f.context=v,f.props=p,f.__P=t,f.__e=!1,w=E.__r,M=0,_)f.state=f.__s,f.__d=!1,w&&w(e),u=f.render(f.props,f.state,f.context),Se.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,w&&w(e),u=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++M<25);f.state=f.__s,f.getChildContext!=null&&(i=pt(pt({},i),f.getChildContext())),_&&!h&&f.getSnapshotBeforeUpdate!=null&&(y=f.getSnapshotBeforeUpdate(d,m)),V=u!=null&&u.type===ct&&u.key==null?is(u.props.children):u,a=Ji(t,oe(V)?V:[V],e,n,i,s,r,o,a,c,l),f.base=e.__e,e.__u&=-161,f.__h.length&&o.push(f),g&&(f.__E=f.__=null)}catch(C){if(e.__v=null,c||r!=null)if(C.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;r[r.indexOf(a)]=null,e.__e=a}else{for(S=r.length;S--;)cn(r[S]);hn(e)}else e.__e=n.__e,e.__k=n.__k,C.then||hn(e);E.__e(C,e,n)}else r==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=al(n.__e,e,n,i,s,r,o,c,l);return(u=E.diffed)&&u(e),128&e.__u?void 0:a}function hn(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(hn))}function ns(t,e,n){for(var i=0;i<n.length;i++)dn(n[i],n[++i],n[++i]);E.__c&&E.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(r){r.call(s)})}catch(r){E.__e(r,s.__v)}})}function is(t){return typeof t!="object"||t==null||t.__b>0?t:oe(t)?t.map(is):pt({},t)}function al(t,e,n,i,s,r,o,a,c){var l,u,f,h,d,m,y,g=n.props||Te,p=e.props,_=e.type;if(_=="svg"?s="http://www.w3.org/2000/svg":_=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),r!=null){for(l=0;l<r.length;l++)if((d=r[l])&&"setAttribute"in d==!!_&&(_?d.localName==_:d.nodeType==3)){t=d,r[l]=null;break}}if(t==null){if(_==null)return document.createTextNode(p);t=document.createElementNS(s,_,p.is&&p),a&&(E.__m&&E.__m(e,r),a=!1),r=null}if(_==null)g===p||a&&t.data==p||(t.data=p);else{if(r=r&&se.call(t.childNodes),!a&&r!=null)for(g={},l=0;l<t.attributes.length;l++)g[(d=t.attributes[l]).name]=d.value;for(l in g)d=g[l],l=="dangerouslySetInnerHTML"?f=d:l=="children"||l in p||l=="value"&&"defaultValue"in p||l=="checked"&&"defaultChecked"in p||Ae(t,l,null,d,s);for(l in p)d=p[l],l=="children"?h=d:l=="dangerouslySetInnerHTML"?u=d:l=="value"?m=d:l=="checked"?y=d:a&&typeof d!="function"||g[l]===d||Ae(t,l,d,g[l],s);if(u)a||f&&(u.__html==f.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(f&&(t.innerHTML=""),Ji(e.type=="template"?t.content:t,oe(h)?h:[h],e,n,i,_=="foreignObject"?"http://www.w3.org/1999/xhtml":s,r,o,r?r[0]:n.__k&&Nt(n,0),a,c),r!=null)for(l=r.length;l--;)cn(r[l]);a||(l="value",_=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||_=="progress"&&!m||_=="option"&&m!=g[l])&&Ae(t,l,m,g[l],s),l="checked",y!=null&&y!=t[l]&&Ae(t,l,y,g[l],s))}return t}function dn(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(s){E.__e(s,n)}}function ss(t,e,n){var i,s;if(E.unmount&&E.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||dn(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(r){E.__e(r,e)}i.base=i.__P=null}if(i=t.__k)for(s=0;s<i.length;s++)i[s]&&ss(i[s],e,n||typeof t.type!="function");n||cn(t.__e),t.__c=t.__=t.__e=void 0}function ll(t,e,n){return this.constructor(t,n)}function os(t,e,n){var i,s,r,o;e==document&&(e=document.documentElement),E.__&&E.__(t,e),s=(i=!1)?null:e.__k,r=[],o=[],fn(e,t=e.__k=st(ct,null,[t]),s||Te,Te,e.namespaceURI,s?null:e.firstChild?se.call(e.childNodes):null,r,s?s.__e:e.firstChild,i,o),ns(r,t,o)}function cl(t,e,n){var i,s,r,o,a=pt({},t.props);for(r in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)r=="key"?i=e[r]:r=="ref"?s=e[r]:a[r]=e[r]===void 0&&o!=null?o[r]:e[r];return arguments.length>2&&(a.children=arguments.length>3?se.call(arguments,2):n),re(t.type,a,i||t.key,s||t.ref,null)}function $t(t){function e(n){var i,s;return this.getChildContext||(i=new Set,(s={})[e.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(r){this.props.value!=r.value&&i.forEach(function(o){o.__e=!0,un(o)})},this.sub=function(r){i.add(r);var o=r.componentWillUnmount;r.componentWillUnmount=function(){i&&i.delete(r),o&&o.call(r)}}),n.children}return e.__c="__cC"+Yi++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,i){return n.children(i)}).contextType=e,e}se=Se.slice,E={__e:function(t,e,n,i){for(var s,r,o;e=e.__;)if((s=e.__c)&&!s.__)try{if((r=s.constructor)&&r.getDerivedStateFromError!=null&&(s.setState(r.getDerivedStateFromError(t)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,i||{}),o=s.__d),o)return s.__E=s}catch(a){t=a}throw t}},zi=0,ut.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=pt({},this.state),typeof t=="function"&&(t=t(pt({},n),this.props)),t&&pt(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),un(this))},ut.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),un(this))},ut.prototype.render=ct,bt=[],Gi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qi=function(t,e){return t.__v.__b-e.__v.__b},Pe.__r=0,Xi=/(PointerCapture)$|Capture$/i,rn=0,an=es(!1),ln=es(!0),Yi=0;var ul=0;function x(t,e,n,i,s,r){e||(e={});var o,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?o=e[a]:c[a]=e[a];var l={type:t,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ul,__i:-1,__u:0,__source:s,__self:r};if(typeof t=="function"&&(o=t.defaultProps))for(a in o)c[a]===void 0&&(c[a]=o[a]);return E.vnode&&E.vnode(l),l}var wt,F,mn,rs,Ut=0,as=[],U=E,ls=U.__b,cs=U.__r,us=U.diffed,fs=U.__c,hs=U.unmount,ds=U.__;function Ht(t,e){U.__h&&U.__h(F,t,Ut||e),Ut=0;var n=F.__H||(F.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function j(t){return Ut=1,fl(ps,t)}function fl(t,e,n){var i=Ht(wt++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):ps(void 0,e),function(a){var c=i.__N?i.__N[0]:i.__[0],l=i.t(c,a);c!==l&&(i.__N=[l,i.__[1]],i.__c.setState({}))}],i.__c=F,!F.__f)){var s=function(a,c,l){if(!i.__c.__H)return!0;var u=i.__c.__H.__.filter(function(h){return h.__c});if(u.every(function(h){return!h.__N}))return!r||r.call(this,a,c,l);var f=i.__c.props!==a;return u.some(function(h){if(h.__N){var d=h.__[0];h.__=h.__N,h.__N=void 0,d!==h.__[0]&&(f=!0)}}),r&&r.call(this,a,c,l)||f};F.__f=!0;var r=F.shouldComponentUpdate,o=F.componentWillUpdate;F.componentWillUpdate=function(a,c,l){if(this.__e){var u=r;r=void 0,s(a,c,l),r=u}o&&o.call(this,a,c,l)},F.shouldComponentUpdate=s}return i.__N||i.__}function J(t,e){var n=Ht(wt++,3);!U.__s&&_n(n.__H,e)&&(n.__=t,n.u=e,F.__H.__h.push(n))}function pn(t,e){var n=Ht(wt++,4);!U.__s&&_n(n.__H,e)&&(n.__=t,n.u=e,F.__h.push(n))}function B(t){return Ut=5,xt(function(){return{current:t}},[])}function hl(t,e,n){Ut=6,pn(function(){if(typeof t=="function"){var i=t(e());return function(){t(null),i&&typeof i=="function"&&i()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function xt(t,e){var n=Ht(wt++,7);return _n(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Wt(t,e){return Ut=8,xt(function(){return t},e)}function G(t){var e=F.context[t.__c],n=Ht(wt++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(F)),e.props.value):t.__}function gn(){var t=Ht(wt++,11);if(!t.__){for(var e=F.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function dl(){for(var t;t=as.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(ke),e.__h.some(yn),e.__h=[]}catch(n){e.__h=[],U.__e(n,t.__v)}}}U.__b=function(t){F=null,ls&&ls(t)},U.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ds&&ds(t,e)},U.__r=function(t){cs&&cs(t),wt=0;var e=(F=t.__c).__H;e&&(mn===F?(e.__h=[],F.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(ke),e.__h.some(yn),e.__h=[],wt=0)),mn=F},U.diffed=function(t){us&&us(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(as.push(e)!==1&&rs===U.requestAnimationFrame||((rs=U.requestAnimationFrame)||ml)(dl)),e.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),mn=F=null},U.__c=function(t,e){e.some(function(n){try{n.__h.some(ke),n.__h=n.__h.filter(function(i){return!i.__||yn(i)})}catch(i){e.some(function(s){s.__h&&(s.__h=[])}),e=[],U.__e(i,n.__v)}}),fs&&fs(t,e)},U.unmount=function(t){hs&&hs(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(i){try{ke(i)}catch(s){e=s}}),n.__H=void 0,e&&U.__e(e,n.__v))};var ms=typeof requestAnimationFrame=="function";function ml(t){var e,n=function(){clearTimeout(i),ms&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,35);ms&&(e=requestAnimationFrame(n))}function ke(t){var e=F,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),F=e}function yn(t){var e=F;t.__c=t.__(),F=e}function _n(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}function ps(t,e){return typeof e=="function"?e(t):e}function gs(t,e){for(var n in e)t[n]=e[n];return t}function ys(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var i in e)if(i!=="__source"&&t[i]!==e[i])return!0;return!1}var vn=pn;function _s(t,e){this.props=t,this.context=e}(_s.prototype=new ut).isPureReactComponent=!0,_s.prototype.shouldComponentUpdate=function(t,e){return ys(this.props,t)||ys(this.state,e)};var vs=E.__b;E.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),vs&&vs(t)};var pl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function xn(t){function e(n){var i=gs({},n);return delete i.ref,t(i,n.ref||null)}return e.$$typeof=pl,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var xs=function(t,e){return t==null?null:vt(vt(t).map(e))},gl={map:xs,forEach:xs,count:function(t){return t?vt(t).length:0},only:function(t){var e=vt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:vt},yl=E.__e;E.__e=function(t,e,n,i){if(t.then){for(var s,r=e;r=r.__;)if((s=r.__c)&&s.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),s.__c(t,e)}yl(t,e,n,i)};var bs=E.unmount;function ws(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),t.__c.__H=null),(t=gs({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(i){return ws(i,e,n)})),t}function Cs(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(i){return Cs(i,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function bn(){this.__u=0,this.o=null,this.__b=null}function Ts(t){var e=t.__&&t.__.__c;return e&&e.__a&&e.__a(t)}function Ee(){this.i=null,this.l=null}E.unmount=function(t){var e=t.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),bs&&bs(t)},(bn.prototype=new ut).__c=function(t,e){var n=e.__c,i=this;i.o==null&&(i.o=[]),i.o.push(n);var s=Ts(i.__v),r=!1,o=function(){r||i.__z||(r=!0,n.__R=null,s?s(c):c())};n.__R=o;var a=n.__P;n.__P=null;var c=function(){if(!--i.__u){if(i.state.__a){var l=i.state.__a;i.__v.__k[0]=Cs(l,l.__c.__P,l.__c.__O)}var u;for(i.setState({__a:i.__b=null});u=i.o.pop();)u.__P=a,u.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(o,o)},bn.prototype.componentWillUnmount=function(){this.o=[]},bn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=ws(this.__b,n,i.__O=i.__P)}this.__b=null}var s=e.__a&&st(ct,null,t.fallback);return s&&(s.__u&=-33),[st(ct,null,e.__a?null:t.children),s]};var Ss=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};(Ee.prototype=new ut).__a=function(t){var e=this,n=Ts(e.__v),i=e.l.get(t);return i[0]++,function(s){var r=function(){e.props.revealOrder?(i.push(s),Ss(e,t,i)):s()};n?n(r):r()}},Ee.prototype.render=function(t){this.i=null,this.l=new Map;var e=vt(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Ee.prototype.componentDidUpdate=Ee.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ss(t,n,e)})};var Ps=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,_l=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,vl=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,xl=/[A-Z0-9]/g,bl=typeof document<"u",wl=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};ut.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(ut.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var As=E.event;E.event=function(t){return As&&(t=As(t)),t.persist=function(){},t.isPropagationStopped=function(){return this.cancelBubble},t.isDefaultPrevented=function(){return this.defaultPrevented},t.nativeEvent=t};var Cl={configurable:!0,get:function(){return this.class}},ks=E.vnode;E.vnode=function(t){typeof t.type=="string"&&(function(e){var n=e.props,i=e.type,s={},r=i.indexOf("-")==-1;for(var o in n){var a=n[o];if(!(o==="value"&&"defaultValue"in n&&a==null||bl&&o==="children"&&i==="noscript"||o==="class"||o==="className")){var c=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":c==="translate"&&a==="no"?a=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?o="ondblclick":c!=="onchange"||i!=="input"&&i!=="textarea"||wl(n.type)?c==="onfocus"?o="onfocusin":c==="onblur"?o="onfocusout":vl.test(o)&&(o=c):c=o="oninput":r&&_l.test(o)?o=o.replace(xl,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&s[o=c]&&(o="oninputCapture"),s[o]=a}}i=="select"&&(s.multiple&&Array.isArray(s.value)&&(s.value=vt(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),s.defaultValue!=null&&(s.value=vt(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value}))),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",Cl)):n.className&&(s.class=s.className=n.className),e.props=s})(t),t.$$typeof=Ps,ks&&ks(t)};var Es=E.__r;E.__r=function(t){Es&&Es(t),t.__c};var Ms=E.diffed;E.diffed=function(t){Ms&&Ms(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value)};function Vs(t){return!!t&&t.$$typeof===Ps}function Tl(t){return Vs(t)?cl.apply(null,arguments):t}const wn=$t({});function ae(t){const e=B(null);return e.current===null&&(e.current=t()),e.current}const Ds=typeof window<"u"?pn:J,Me=$t(null);function Cn(t,e){t.indexOf(e)===-1&&t.push(e)}function Ve(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const gt=(t,e,n)=>n>e?e:n<t?t:n;let Tn=()=>{};const Ct={},Rs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ls(t){return typeof t=="object"&&t!==null}const Is=t=>/^0[^.\s]+$/u.test(t);function Fs(t){let e;return()=>(e===void 0&&(e=t()),e)}const rt=t=>t,Sl=(t,e)=>n=>e(t(n)),le=(...t)=>t.reduce(Sl),ce=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i};class Sn{constructor(){this.subscriptions=[]}add(e){return Cn(this.subscriptions,e),()=>Ve(this.subscriptions,e)}notify(e,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ot=t=>t*1e3,at=t=>t/1e3;function Bs(t,e){return e?t*(1e3/e):0}const Os=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Pl=1e-7,Al=12;function kl(t,e,n,i,s){let r,o,a=0;do o=e+(n-e)/2,r=Os(o,i,s)-t,r>0?n=o:e=o;while(Math.abs(r)>Pl&&++a<Al);return o}function ue(t,e,n,i){if(t===e&&n===i)return rt;const s=r=>kl(r,0,1,t,n);return r=>r===0||r===1?r:Os(s(r),e,i)}const js=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ns=t=>e=>1-t(1-e),$s=ue(.33,1.53,.69,.99),Pn=Ns($s),Us=js(Pn),Hs=t=>t>=1?1:(t*=2)<1?.5*Pn(t):.5*(2-Math.pow(2,-10*(t-1))),An=t=>1-Math.sin(Math.acos(t)),Ws=Ns(An),zs=js(An),El=ue(.42,0,1,1),Ml=ue(0,0,.58,1),Ks=ue(.42,0,.58,1),Vl=t=>Array.isArray(t)&&typeof t[0]!="number",Gs=t=>Array.isArray(t)&&typeof t[0]=="number",Dl={linear:rt,easeIn:El,easeInOut:Ks,easeOut:Ml,circIn:An,circInOut:zs,circOut:Ws,backIn:Pn,backInOut:Us,backOut:$s,anticipate:Hs},Rl=t=>typeof t=="string",qs=t=>{if(Gs(t)){Tn(t.length===4);const[e,n,i,s]=t;return ue(e,n,i,s)}else if(Rl(t))return Dl[t];return t},De=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ll(t,e){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){o.has(u)&&(l.schedule(u),t()),u(a)}const l={schedule:(u,f=!1,h=!1)=>{const m=h&&s?n:i;return f&&o.add(u),m.add(u),u},cancel:u=>{i.delete(u),o.delete(u)},process:u=>{if(a=u,s){r=!0;return}s=!0;const f=n;n=i,i=f,n.forEach(c),n.clear(),s=!1,r&&(r=!1,l.process(u))}};return l}const Il=40;function Xs(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=De.reduce((b,v)=>(b[v]=Ll(r),b),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:f,preRender:h,render:d,postRender:m}=o,y=()=>{const b=Ct.useManualTiming,v=b?s.timestamp:performance.now();n=!1,b||(s.delta=i?1e3/60:Math.max(Math.min(v-s.timestamp,Il),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),c.process(s),l.process(s),u.process(s),f.process(s),h.process(s),d.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))},g=()=>{n=!0,i=!0,s.isProcessing||t(y)};return{schedule:De.reduce((b,v)=>{const w=o[v];return b[v]=(M,V=!1,S=!1)=>(n||g(),w.schedule(M,V,S)),b},{}),cancel:b=>{for(let v=0;v<De.length;v++)o[De[v]].cancel(b)},state:s,steps:o}}const{schedule:I,cancel:Tt,state:q,steps:kn}=Xs(typeof requestAnimationFrame<"u"?requestAnimationFrame:rt,!0);let Re;function Fl(){Re=void 0}const Q={now:()=>(Re===void 0&&Q.set(q.isProcessing||Ct.useManualTiming?q.timestamp:performance.now()),Re),set:t=>{Re=t,queueMicrotask(Fl)}},Ys=t=>e=>typeof e=="string"&&e.startsWith(t),Zs=Ys("--"),Bl=Ys("var(--"),En=t=>Bl(t)?Ol.test(t.split("/*")[0].trim()):!1,Ol=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Js(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const zt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},fe={...zt,transform:t=>gt(0,1,t)},Le={...zt,default:1},he=t=>Math.round(t*1e5)/1e5,Mn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function jl(t){return t==null}const Nl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vn=(t,e)=>n=>!!(typeof n=="string"&&Nl.test(n)&&n.startsWith(t)||e&&!jl(n)&&Object.prototype.hasOwnProperty.call(n,e)),Qs=(t,e,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(Mn);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},$l=t=>gt(0,255,t),Dn={...zt,transform:t=>Math.round($l(t))},Et={test:Vn("rgb","red"),parse:Qs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Dn.transform(t)+", "+Dn.transform(e)+", "+Dn.transform(n)+", "+he(fe.transform(i))+")"};function Ul(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Rn={test:Vn("#"),parse:Ul,transform:Et.transform},de=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),St=de("deg"),yt=de("%"),T=de("px"),Hl=de("vh"),Wl=de("vw"),to={...yt,parse:t=>yt.parse(t)/100,transform:t=>yt.transform(t*100)},Kt={test:Vn("hsl","hue"),parse:Qs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+yt.transform(he(e))+", "+yt.transform(he(n))+", "+he(fe.transform(i))+")"},H={test:t=>Et.test(t)||Rn.test(t)||Kt.test(t),parse:t=>Et.test(t)?Et.parse(t):Kt.test(t)?Kt.parse(t):Rn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Et.transform(t):Kt.transform(t),getAnimatableNone:t=>{const e=H.parse(t);return e.alpha=0,H.transform(e)}},zl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Kl(t){return isNaN(t)&&typeof t=="string"&&(t.match(Mn)?.length||0)+(t.match(zl)?.length||0)>0}const eo="number",no="color",Gl="var",ql="var(",io="${}",Xl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Gt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(Xl,c=>(H.test(c)?(i.color.push(r),s.push(no),n.push(H.parse(c))):c.startsWith(ql)?(i.var.push(r),s.push(Gl),n.push(c)):(i.number.push(r),s.push(eo),n.push(parseFloat(c))),++r,io)).split(io);return{values:n,split:a,indexes:i,types:s}}function Yl(t){return Gt(t).values}function so({split:t,types:e}){const n=t.length;return i=>{let s="";for(let r=0;r<n;r++)if(s+=t[r],i[r]!==void 0){const o=e[r];o===eo?s+=he(i[r]):o===no?s+=H.transform(i[r]):s+=i[r]}return s}}function Zl(t){return so(Gt(t))}const Jl=t=>typeof t=="number"?0:H.test(t)?H.getAnimatableNone(t):t,Ql=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Jl(t);function tc(t){const e=Gt(t);return so(e)(e.values.map((i,s)=>Ql(i,e.split[s])))}const ft={test:Kl,parse:Yl,createTransformer:Zl,getAnimatableNone:tc};function Ln(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ec({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,r=0,o=0;if(!e)s=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;s=Ln(c,a,t+1/3),r=Ln(c,a,t),o=Ln(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function Ie(t,e){return n=>n>0?e:t}const O=(t,e,n)=>t+(e-t)*n,In=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},nc=[Rn,Et,Kt],ic=t=>nc.find(e=>e.test(t));function oo(t){const e=ic(t);if(!e)return!1;let n=e.parse(t);return e===Kt&&(n=ec(n)),n}const ro=(t,e)=>{const n=oo(t),i=oo(e);if(!n||!i)return Ie(t,e);const s={...n};return r=>(s.red=In(n.red,i.red,r),s.green=In(n.green,i.green,r),s.blue=In(n.blue,i.blue,r),s.alpha=O(n.alpha,i.alpha,r),Et.transform(s))},Fn=new Set(["none","hidden"]);function sc(t,e){return Fn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function oc(t,e){return n=>O(t,e,n)}function Bn(t){return typeof t=="number"?oc:typeof t=="string"?En(t)?Ie:H.test(t)?ro:lc:Array.isArray(t)?ao:typeof t=="object"?H.test(t)?ro:rc:Ie}function ao(t,e){const n=[...t],i=n.length,s=t.map((r,o)=>Bn(r)(r,e[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function rc(t,e){const n={...t,...e},i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=Bn(t[s])(t[s],e[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function ac(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}const lc=(t,e)=>{const n=ft.createTransformer(e),i=Gt(t),s=Gt(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Fn.has(t)&&!s.values.length||Fn.has(e)&&!i.values.length?sc(t,e):le(ao(ac(i,s),s.values),n):Ie(t,e)};function lo(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?O(t,e,n):Bn(t)(t,e)}const cc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>I.update(e,n),stop:()=>Tt(e),now:()=>q.isProcessing?q.timestamp:Q.now()}},co=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let r=0;r<s;r++)i+=Math.round(t(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Fe=2e4;function On(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<Fe;)e+=n,i=t.next(e);return e>=Fe?1/0:e}function uc(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(On(i),Fe);return{type:"keyframes",ease:r=>i.next(s*r).value/e,duration:at(s)}}const N={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function jn(t,e){return t*Math.sqrt(1-e*e)}const fc=12;function hc(t,e,n){let i=n;for(let s=1;s<fc;s++)i=i-t(i)/e(i);return i}const Nn=.001;function dc({duration:t=N.duration,bounce:e=N.bounce,velocity:n=N.velocity,mass:i=N.mass}){let s,r,o=1-e;o=gt(N.minDamping,N.maxDamping,o),t=gt(N.minDuration,N.maxDuration,at(t)),o<1?(s=l=>{const u=l*o,f=u*t,h=u-n,d=jn(l,o),m=Math.exp(-f);return Nn-h/d*m},r=l=>{const f=l*o*t,h=f*n+n,d=Math.pow(o,2)*Math.pow(l,2)*t,m=Math.exp(-f),y=jn(Math.pow(l,2),o);return(-s(l)+Nn>0?-1:1)*((h-d)*m)/y}):(s=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-Nn+u*f},r=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=hc(s,r,a);if(t=ot(t),isNaN(c))return{stiffness:N.stiffness,damping:N.damping,duration:t};{const l=Math.pow(c,2)*i;return{stiffness:l,damping:o*2*Math.sqrt(i*l),duration:t}}}const mc=["duration","bounce"],pc=["stiffness","damping","mass"];function uo(t,e){return e.some(n=>t[n]!==void 0)}function gc(t){let e={velocity:N.velocity,stiffness:N.stiffness,damping:N.damping,mass:N.mass,isResolvedFromDuration:!1,...t};if(!uo(t,pc)&&uo(t,mc))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*gt(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:N.mass,stiffness:s,damping:r}}else{const n=dc({...t,velocity:0});e={...e,...n,mass:N.mass},e.isResolvedFromDuration=!0}return e}function Be(t=N.visualDuration,e=N.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:l,mass:u,duration:f,velocity:h,isResolvedFromDuration:d}=gc({...n,velocity:-at(n.velocity||0)}),m=h||0,y=l/(2*Math.sqrt(c*u)),g=o-r,p=at(Math.sqrt(c/u)),_=Math.abs(g)<5;i||(i=_?N.restSpeed.granular:N.restSpeed.default),s||(s=_?N.restDelta.granular:N.restDelta.default);let b,v,w,M,V,S;if(y<1)w=jn(p,y),M=(m+y*p*g)/w,b=C=>{const D=Math.exp(-y*p*C);return o-D*(M*Math.sin(w*C)+g*Math.cos(w*C))},V=y*p*M+g*w,S=y*p*g-M*w,v=C=>Math.exp(-y*p*C)*(V*Math.sin(w*C)+S*Math.cos(w*C));else if(y===1){b=D=>o-Math.exp(-p*D)*(g+(m+p*g)*D);const C=m+p*g;v=D=>Math.exp(-p*D)*(p*C*D-m)}else{const C=p*Math.sqrt(y*y-1);b=Y=>{const it=Math.exp(-y*p*Y),et=Math.min(C*Y,300);return o-it*((m+y*p*g)*Math.sinh(et)+C*g*Math.cosh(et))/C};const D=(m+y*p*g)/C,$=y*p*D-g*C,z=y*p*g-D*C;v=Y=>{const it=Math.exp(-y*p*Y),et=Math.min(C*Y,300);return it*($*Math.sinh(et)+z*Math.cosh(et))}}const A={calculatedDuration:d&&f||null,velocity:C=>ot(v(C)),next:C=>{if(!d&&y<1){const $=Math.exp(-y*p*C),z=Math.sin(w*C),Y=Math.cos(w*C),it=o-$*(M*z+g*Y),et=ot($*(V*z+S*Y));return a.done=Math.abs(et)<=i&&Math.abs(o-it)<=s,a.value=a.done?o:it,a}const D=b(C);if(d)a.done=C>=f;else{const $=ot(v(C));a.done=Math.abs($)<=i&&Math.abs(o-D)<=s}return a.value=a.done?o:D,a},toString:()=>{const C=Math.min(On(A),Fe),D=co($=>A.next(C*$).value,C,30);return C+"ms "+D},toTransition:()=>{}};return A}Be.applyToOptions=t=>{const e=uc(t,100,Be);return t.ease=e.ease,t.duration=ot(e.duration),t.type="keyframes",t};const yc=5;function fo(t,e,n){const i=Math.max(e-yc,0);return Bs(n-t(i),e-i)}function $n({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],h={done:!1,value:f},d=S=>a!==void 0&&S<a||c!==void 0&&S>c,m=S=>a===void 0?c:c===void 0||Math.abs(a-S)<Math.abs(c-S)?a:c;let y=n*e;const g=f+y,p=o===void 0?g:o(g);p!==g&&(y=p-f);const _=S=>-y*Math.exp(-S/i),b=S=>p+_(S),v=S=>{const A=_(S),C=b(S);h.done=Math.abs(A)<=l,h.value=h.done?p:C};let w,M;const V=S=>{d(h.value)&&(w=S,M=Be({keyframes:[h.value,m(h.value)],velocity:fo(b,S,h.value),damping:s,stiffness:r,restDelta:l,restSpeed:u}))};return V(0),{calculatedDuration:null,next:S=>{let A=!1;return!M&&w===void 0&&(A=!0,v(S),V(S)),w!==void 0&&S>=w?M.next(S-w):(!A&&v(S),h)}}}function _c(t,e,n){const i=[],s=n||Ct.mix||lo,r=t.length-1;for(let o=0;o<r;o++){let a=s(t[o],t[o+1]);if(e){const c=Array.isArray(e)?e[o]||rt:e;a=le(c,a)}i.push(a)}return i}function vc(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(Tn(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=_c(e,i,s),c=a.length,l=u=>{if(o&&u<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const h=ce(t[f],t[f+1],u);return a[f](h)};return n?u=>l(gt(t[0],t[r-1],u)):l}function xc(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=ce(0,e,i);t.push(O(n,1,s))}}function bc(t){const e=[0];return xc(e,t.length-1),e}function wc(t,e){return t.map(n=>n*e)}function Cc(t,e){return t.map(()=>e||Ks).splice(0,t.length-1)}function me({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Vl(i)?i.map(qs):qs(i),r={done:!1,value:e[0]},o=wc(n&&n.length===e.length?n:bc(e),t),a=vc(o,e,{ease:Array.isArray(s)?s:Cc(e,s)});return{calculatedDuration:t,next:c=>(r.value=a(c),r.done=c>=t,r)}}const Tc=t=>t!==null;function Un(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(Tc),a=s<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const Sc={decay:$n,inertia:$n,tween:me,keyframes:me,spring:Be};function ho(t){typeof t.type=="string"&&(t.type=Sc[t.type])}class Hn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Pc=t=>t/100;class Wn extends Hn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Q.now()&&this.tick(Q.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ho(e);const{type:n=me,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const c=n||me;c!==me&&typeof a[0]!="number"&&(this.mixKeyframes=le(Pc,lo(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=On(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return i.next(0);const{delay:l=0,keyframes:u,repeat:f,repeatType:h,repeatDelay:d,type:m,onUpdate:y,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-l*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let b=this.currentTime,v=i;if(f){const S=Math.min(this.currentTime,s)/a;let A=Math.floor(S),C=S%1;!C&&S>=1&&(C=1),C===1&&A--,A=Math.min(A,f+1),A%2&&(h==="reverse"?(C=1-C,d&&(C-=d/a)):h==="mirror"&&(v=o)),b=gt(0,1,C)*a}const w=_?{done:!1,value:u[0]}:v.next(b);r&&!_&&(w.value=r(w.value));let{done:M}=w;!_&&c!==null&&(M=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return V&&m!==$n&&(w.value=Un(u,this.options,g,this.speed)),y&&y(w.value),V&&this.finish(),w}then(e,n){return this.finished.then(e,n)}get duration(){return at(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+at(e)}get time(){return at(this.currentTime)}set time(e){e=ot(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return fo(i=>this.generator.next(i).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(Q.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=at(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=cc,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Q.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Ac(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Mt=t=>t*180/Math.PI,zn=t=>{const e=Mt(Math.atan2(t[1],t[0]));return Kn(e)},kc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:zn,rotateZ:zn,skewX:t=>Mt(Math.atan(t[1])),skewY:t=>Mt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Kn=t=>(t=t%360,t<0&&(t+=360),t),mo=zn,po=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),go=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ec={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:po,scaleY:go,scale:t=>(po(t)+go(t))/2,rotateX:t=>Kn(Mt(Math.atan2(t[6],t[5]))),rotateY:t=>Kn(Mt(Math.atan2(-t[2],t[0]))),rotateZ:mo,rotate:mo,skewX:t=>Mt(Math.atan(t[4])),skewY:t=>Mt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Gn(t){return t.includes("scale")?1:0}function qn(t,e){if(!t||t==="none")return Gn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Ec,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=kc,s=a}if(!s)return Gn(e);const r=i[e],o=s[1].split(",").map(Vc);return typeof r=="function"?r(o):o[r]}const Mc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return qn(n,e)};function Vc(t){return parseFloat(t.trim())}const qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xt=new Set(qt),yo=t=>t===zt||t===T,Dc=new Set(["x","y","z"]),Rc=qt.filter(t=>!Dc.has(t));function Lc(t){const e=[];return Rc.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const Pt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>qn(e,"x"),y:(t,{transform:e})=>qn(e,"y")};Pt.translateX=Pt.x,Pt.translateY=Pt.y;const Vt=new Set;let Xn=!1,Yn=!1,Zn=!1;function _o(){if(Yn){const t=Array.from(Vt).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const s=Lc(i);s.length&&(n.set(i,s),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{i.getValue(r)?.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Yn=!1,Xn=!1,Vt.forEach(t=>t.complete(Zn)),Vt.clear()}function vo(){Vt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Yn=!0)})}function Ic(){Zn=!0,vo(),_o(),Zn=!1}class Jn{constructor(e,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Vt.add(this),Xn||(Xn=!0,I.read(vo),I.resolveKeyframes(_o))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:s}=this;if(e[0]===null){const r=s?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&r===void 0&&s.set(e[0])}Ac(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Vt.delete(this)}cancel(){this.state==="scheduled"&&(Vt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Fc=t=>t.startsWith("--");function xo(t,e,n){Fc(e)?t.style.setProperty(e,n):t.style[e]=n}const Bc={};function bo(t,e){const n=Fs(t);return()=>Bc[e]??n()}const Oc=bo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),wo=bo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pe=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Co={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pe([0,.65,.55,1]),circOut:pe([.55,0,1,.45]),backIn:pe([.31,.01,.66,-.59]),backOut:pe([.33,1.53,.69,.99])};function To(t,e){if(t)return typeof t=="function"?wo()?co(t,e):"ease-out":Gs(t)?pe(t):Array.isArray(t)?t.map(n=>To(n,e)||Co.easeOut):Co[t]}function jc(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const f=To(a,s);Array.isArray(f)&&(u.easing=f);const h={delay:i,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),t.animate(u,h)}function So(t){return typeof t=="function"&&"applyToOptions"in t}function Nc({type:t,...e}){return So(t)&&wo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Po extends Hn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,Tn(typeof e.type!="string");const l=Nc(e);this.animation=jc(n,i,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=Un(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),xo(n,i,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return at(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+at(e)}get time(){return at(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ot(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Oc()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),rt):s(this)}}const Ao={anticipate:Hs,backInOut:Us,circInOut:zs};function $c(t){return t in Ao}function Uc(t){typeof t.ease=="string"&&$c(t.ease)&&(t.ease=Ao[t.ease])}const Qn=10;class Hc extends Po{constructor(e){Uc(e),ho(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Wn({...o,autoplay:!1}),c=Math.max(Qn,Q.now()-this.startTime),l=gt(0,Qn,c-Qn),u=a.sample(c).value,{name:f}=this.options;r&&f&&xo(r,f,u),n.setWithVelocity(a.sample(Math.max(0,c-l)).value,u,l),a.stop()}}const ko=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ft.test(t)||t==="0")&&!t.startsWith("url("));function Wc(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function zc(t,e,n,i){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=ko(s,e),a=ko(r,e);return!o||!a?!1:Wc(t)||(n==="spring"||So(n))&&i}function ti(t){t.duration=0,t.type="keyframes"}const Kc=new Set(["opacity","clipPath","filter","transform"]),Gc=Fs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function qc(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return Gc()&&n&&Kc.has(n)&&(n!=="transform"||!l)&&!c&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Xc=40;class Yc extends Hn{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:l,element:u,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Q.now();const h={autoplay:e,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:c,motionValue:l,element:u,...f},d=u?.KeyframeResolver||Jn;this.keyframeResolver=new d(a,(m,y,g)=>this.onKeyframesResolved(m,y,h,!g),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=i;this.resolvedAt=Q.now();let f=!0;zc(e,r,o,a)||(f=!1,(Ct.instantAnimations||!c)&&u?.(Un(e,i,n)),e[0]=e[e.length-1],ti(i),i.repeat=0);const d={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Xc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=f&&!l&&qc(d),y=d.motionValue?.owner?.current,g=m?new Hc({...d,element:y}):new Wn(d);g.finished.then(()=>{this.notifyFinished()}).catch(rt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ic()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Eo(t,e,n,i=0,s=1){const r=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const Zc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jc(t){const e=Zc.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Mo(t,e,n=1){const[i,s]=Jc(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const o=r.trim();return Rs(o)?parseFloat(o):o}return En(s)?Mo(s,e,n+1):s}const Qc={type:"spring",stiffness:500,damping:25,restSpeed:10},tu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),eu={type:"keyframes",duration:.8},nu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},iu=(t,{keyframes:e})=>e.length>2?eu:Xt.has(t)?t.startsWith("scale")?tu(e[1]):Qc:nu,su=t=>t!==null;function ou(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(su),r=e&&n!=="loop"&&e%2===1?0:s.length-1;return s[r]}function Vo(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function ei(t,e){const n=t?.[e]??t?.default??t;return n!==t?Vo(n,t):n}function ru({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const ni=(t,e,n,i={},s,r)=>o=>{const a=ei(i,t)||{},c=a.delay||i.delay||0;let{elapsed:l=0}=i;l=l-ot(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};ru(a)||Object.assign(u,iu(t,u)),u.duration&&(u.duration=ot(u.duration)),u.repeatDelay&&(u.repeatDelay=ot(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ti(u),u.delay===0&&(f=!0)),(Ct.instantAnimations||Ct.skipAnimations||s?.shouldSkipAnimations)&&(f=!0,ti(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!r&&e.get()!==void 0){const h=ou(u.keyframes,a);if(h!==void 0){I.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Wn(u):new Yc(u)};function Do(t){const e=[{},{}];return t?.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function ii(t,e,n,i){if(typeof e=="function"){const[s,r]=Do(i);e=e(n!==void 0?n:t.custom,s,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,r]=Do(i);e=e(n!==void 0?n:t.custom,s,r)}return e}function Dt(t,e,n){const i=t.getProps();return ii(i,e,n!==void 0?n:i.custom,t)}const Ro=new Set(["width","height","top","left","right","bottom",...qt]),Lo=30,au=t=>!isNaN(parseFloat(t));class lu{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=Q.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Q.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=au(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Sn);const i=this.events[e].add(n);return e==="change"?()=>{i(),I.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Lo)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Lo);return Bs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Rt(t,e){return new lu(t,e)}const si=t=>Array.isArray(t);function cu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Rt(n))}function uu(t){return si(t)?t[t.length-1]||0:t}function fu(t,e){const n=Dt(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=uu(r[o]);cu(t,o,a)}}const X=t=>!!(t&&t.getVelocity);function hu(t){return!!(X(t)&&t.add)}function oi(t,e){const n=t.getValue("willChange");if(hu(n))return n.add(e);if(!n&&Ct.WillChange){const i=new Ct.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function ri(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Io="data-"+ri("framerAppearId");function Fo(t){return t.props[Io]}function du({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function Bo(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=e;const c=t.getDefaultTransition();r=r?Vo(r,c):c;const l=r?.reduceMotion;i&&(r=i);const u=[],f=s&&t.animationState&&t.animationState.getState()[s];for(const h in a){const d=t.getValue(h,t.latestValues[h]??null),m=a[h];if(m===void 0||f&&du(f,h))continue;const y={delay:n,...ei(r||{},h)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===g&&!y.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const v=Fo(t);if(v){const w=window.MotionHandoffAnimation(v,h,I);w!==null&&(y.startTime=w,p=!0)}}oi(t,h);const _=l??t.shouldReduceMotion;d.start(ni(h,d,m,_&&Ro.has(h)?{type:!1}:y,t,p));const b=d.animation;b&&u.push(b)}if(o){const h=()=>I.update(()=>{o&&fu(t,o)});u.length?Promise.all(u).then(h):h()}return u}function ai(t,e,n={}){const i=Dt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Bo(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=s;return mu(t,e,c,l,u,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,l]=a==="beforeChildren"?[r,o]:[o,r];return c().then(()=>l())}else return Promise.all([r(),o(n.delay)])}function mu(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(ai(c,e,{...o,delay:n+(typeof i=="function"?0:i)+Eo(t.variantChildren,c,i,s,r)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function pu(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(r=>ai(t,r,n));i=Promise.all(s)}else if(typeof e=="string")i=ai(t,e,n);else{const s=typeof e=="function"?Dt(t,e,n.custom):e;i=Promise.all(Bo(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const gu={test:t=>t==="auto",parse:t=>t},Oo=t=>e=>e.test(t),jo=[zt,T,yt,St,Wl,Hl,gu],No=t=>jo.find(Oo(t));function yu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Is(t):!0}const _u=new Set(["brightness","contrast","saturate","opacity"]);function vu(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(Mn)||[];if(!i)return t;const s=n.replace(i,"");let r=_u.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const xu=/\b([a-z-]*)\(.*?\)/gu,li={...ft,getAnimatableNone:t=>{const e=t.match(xu);return e?e.map(vu).join(" "):t}},ci={...ft,getAnimatableNone:t=>{const e=ft.parse(t);return ft.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},$o={...zt,transform:Math.round},ui={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...{rotate:St,rotateX:St,rotateY:St,rotateZ:St,scale:Le,scaleX:Le,scaleY:Le,scaleZ:Le,skew:St,skewX:St,skewY:St,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:fe,originX:to,originY:to,originZ:T},zIndex:$o,fillOpacity:fe,strokeOpacity:fe,numOctaves:$o},bu={...ui,color:H,backgroundColor:H,outlineColor:H,fill:H,stroke:H,borderColor:H,borderTopColor:H,borderRightColor:H,borderBottomColor:H,borderLeftColor:H,filter:li,WebkitFilter:li,mask:ci,WebkitMask:ci},Uo=t=>bu[t],wu=new Set([li,ci]);function Ho(t,e){let n=Uo(t);return wu.has(n)||(n=ft),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Cu=new Set(["auto","none","0"]);function Tu(t,e,n){let i=0,s;for(;i<t.length&&!s;){const r=t[i];typeof r=="string"&&!Cu.has(r)&&Gt(r).values.length&&(s=t[i]),i++}if(s&&n)for(const r of e)t[r]=Ho(n,s)}class Su extends Jn{constructor(e,n,i,s,r){super(e,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let f=e[u];if(typeof f=="string"&&(f=f.trim(),En(f))){const h=Mo(f,n.current);h!==void 0&&(e[u]=h),u===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Ro.has(i)||e.length!==2)return;const[s,r]=e,o=No(s),a=No(r),c=Js(s),l=Js(r);if(c!==l&&Pt[i]){this.needsMeasurement=!0;return}if(o!==a)if(yo(o)&&yo(a))for(let u=0;u<e.length;u++){const f=e[u];typeof f=="string"&&(e[u]=parseFloat(f))}else Pt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let s=0;s<e.length;s++)(e[s]===null||yu(e[s]))&&i.push(s);i.length&&Tu(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pt[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(i,s).jump(s,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=Pt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{e.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const Pu=new Set(["opacity","clipPath","filter","transform"]);function Wo(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(i=>i!=null)}const zo=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Oe(t){return Ls(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:fi}=Xs(queueMicrotask,!1),ht={x:!1,y:!1};function Ko(){return ht.x||ht.y}function Au(t){return t==="x"||t==="y"?ht[t]?null:(ht[t]=!0,()=>{ht[t]=!1}):ht.x||ht.y?null:(ht.x=ht.y=!0,()=>{ht.x=ht.y=!1})}function Go(t,e){const n=Wo(t),i=new AbortController,s={passive:!0,...e,signal:i.signal};return[n,s,()=>i.abort()]}function ku(t){return!(t.pointerType==="touch"||Ko())}function Eu(t,e,n={}){const[i,s,r]=Go(t,n);return i.forEach(o=>{let a=!1,c=!1,l;const u=()=>{o.removeEventListener("pointerleave",m)},f=g=>{l&&(l(g),l=void 0),u()},h=g=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(g))},d=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},m=g=>{if(g.pointerType!=="touch"){if(a){c=!0;return}f(g)}},y=g=>{if(!ku(g))return;c=!1;const p=e(o,g);typeof p=="function"&&(l=p,o.addEventListener("pointerleave",m,s))};o.addEventListener("pointerenter",y,s),o.addEventListener("pointerdown",d,s)}),r}const qo=(t,e)=>e?t===e?!0:qo(t,e.parentElement):!1,hi=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Mu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Vu(t){return Mu.has(t.tagName)||t.isContentEditable===!0}const Du=new Set(["INPUT","SELECT","TEXTAREA"]);function Ru(t){return Du.has(t.tagName)||t.isContentEditable===!0}const je=new WeakSet;function Xo(t){return e=>{e.key==="Enter"&&t(e)}}function di(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Lu=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=Xo(()=>{if(je.has(n))return;di(n,"down");const s=Xo(()=>{di(n,"up")}),r=()=>di(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function Yo(t){return hi(t)&&!Ko()}const Zo=new WeakSet;function Iu(t,e,n={}){const[i,s,r]=Go(t,n),o=a=>{const c=a.currentTarget;if(!Yo(a)||Zo.has(a))return;je.add(c),n.stopPropagation&&Zo.add(a);const l=e(c,a),u=(d,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),je.has(c)&&je.delete(c),Yo(d)&&typeof l=="function"&&l(d,{success:m})},f=d=>{u(d,c===window||c===document||n.useGlobalTarget||qo(c,d.target))},h=d=>{u(d,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Oe(a)&&(a.addEventListener("focus",l=>Lu(l,s)),!Vu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function mi(t){return Ls(t)&&"ownerSVGElement"in t}const Ne=new WeakMap;let $e;const Jo=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:mi(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Fu=Jo("inline","width","offsetWidth"),Bu=Jo("block","height","offsetHeight");function Ou({target:t,borderBoxSize:e}){Ne.get(t)?.forEach(n=>{n(t,{get width(){return Fu(t,e)},get height(){return Bu(t,e)}})})}function ju(t){t.forEach(Ou)}function Nu(){typeof ResizeObserver>"u"||($e=new ResizeObserver(ju))}function $u(t,e){$e||Nu();const n=Wo(t);return n.forEach(i=>{let s=Ne.get(i);s||(s=new Set,Ne.set(i,s)),s.add(e),$e?.observe(i)}),()=>{n.forEach(i=>{const s=Ne.get(i);s?.delete(e),s?.size||$e?.unobserve(i)})}}const Ue=new Set;let Yt;function Uu(){Yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ue.forEach(e=>e(t))},window.addEventListener("resize",Yt)}function Hu(t){return Ue.add(t),Yt||Uu(),()=>{Ue.delete(t),!Ue.size&&typeof Yt=="function"&&(window.removeEventListener("resize",Yt),Yt=void 0)}}function Qo(t,e){return typeof t=="function"?Hu(t):$u(t,e)}function Wu(t){return mi(t)&&t.tagName==="svg"}const zu=[...jo,H,ft],Ku=t=>zu.find(Oo(t)),tr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Zt=()=>({x:tr(),y:tr()}),er=()=>({min:0,max:0}),W=()=>({x:er(),y:er()}),Gu=new WeakMap;function He(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ge(t){return typeof t=="string"||Array.isArray(t)}const pi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gi=["initial",...pi];function We(t){return He(t.animate)||gi.some(e=>ge(t[e]))}function nr(t){return!!(We(t)||t.variants)}function qu(t,e,n){for(const i in e){const s=e[i],r=n[i];if(X(s))t.addValue(i,s);else if(X(r))t.addValue(i,Rt(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(i);t.addValue(i,Rt(o!==void 0?o:s,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const yi={current:null},ir={current:!1},Xu=typeof window<"u";function Yu(){if(ir.current=!0,!!Xu)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>yi.current=t.matches;t.addEventListener("change",e),e()}else yi.current=!1}const sr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ze={};function or(t){ze=t}function Zu(){return ze}class Ju{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Jn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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.renderScheduledAt=0,this.scheduleRender=()=>{const d=Q.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,I.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=We(n),this.isVariantNode=nr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const m=h[d];l[d]!==void 0&&X(m)&&m.set(l[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,Gu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ir.current||Yu(),this.shouldReduceMotion=yi.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Tt(this.notifyUpdate),Tt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Pu.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:l,duration:u}=n.accelerate,f=new Po({element:this.current,name:e,keyframes:a,times:c,ease:l,duration:ot(u)}),h=o(f);this.valueSubscriptions.set(e,()=>{h(),f.cancel()});return}const i=Xt.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&I.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ze){const n=ze[e];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):W()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<sr.length;i++){const s=sr[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=e[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=qu(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=Rt(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Rs(i)||Is(i))?i=parseFloat(i):!Ku(i)&&ft.test(n)&&(i=Ho(e,n)),this.setBaseTarget(e,X(i)?i.get():i)),X(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const r=ii(this.props,n,this.presenceContext?.custom);r&&(i=r[e])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!X(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Sn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){fi.render(this.render)}}class rr extends Ju{constructor(){super(...arguments),this.KeyframeResolver=Su}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const i=e.style;return i?i[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;X(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class At{constructor(e){this.isMounted=!1,this.node=e}update(){}}function ar({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Qu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function tf(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function _i(t){return t===void 0||t===1}function vi({scale:t,scaleX:e,scaleY:n}){return!_i(t)||!_i(e)||!_i(n)}function Lt(t){return vi(t)||lr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function lr(t){return cr(t.x)||cr(t.y)}function cr(t){return t&&t!=="0%"}function Ke(t,e,n){const i=t-n,s=e*i;return n+s}function ur(t,e,n,i,s){return s!==void 0&&(t=Ke(t,s,i)),Ke(t,n,i)+e}function xi(t,e=0,n=1,i,s){t.min=ur(t.min,e,n,i,s),t.max=ur(t.max,e,n,i,s)}function fr(t,{x:e,y:n}){xi(t.x,e.translate,e.scale,e.originPoint),xi(t.y,n.translate,n.scale,n.originPoint)}const hr=.999999999999,dr=1.0000000000001;function ef(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let r,o;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Qt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,fr(t,o)),i&&Lt(r.latestValues)&&Qt(t,r.latestValues,r.layout?.layoutBox))}e.x<dr&&e.x>hr&&(e.x=1),e.y<dr&&e.y>hr&&(e.y=1)}function Jt(t,e){t.min=t.min+e,t.max=t.max+e}function mr(t,e,n,i,s=.5){const r=O(t.min,t.max,s);xi(t,e,n,r,i)}function pr(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Qt(t,e,n){const i=n??t;mr(t.x,pr(e.x,i.x),e.scaleX,e.scale,e.originX),mr(t.y,pr(e.y,i.y),e.scaleY,e.scale,e.originY)}function gr(t,e){return ar(tf(t.getBoundingClientRect(),e))}function nf(t,e,n){const i=gr(t,n),{scroll:s}=e;return s&&(Jt(i.x,s.offset.x),Jt(i.y,s.offset.y)),i}const sf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},of=qt.length;function rf(t,e,n){let i="",s=!0;for(let r=0;r<of;r++){const o=qt[r],a=t[o];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(o.startsWith("scale")?1:0);else{const l=parseFloat(a);c=o.startsWith("scale")?l===1:l===0}if(!c||n){const l=zo(a,ui[o]);if(!c){s=!1;const u=sf[o]||o;i+=`${u}(${l}) `}n&&(e[o]=l)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function bi(t,e,n){const{style:i,vars:s,transformOrigin:r}=t;let o=!1,a=!1;for(const c in e){const l=e[c];if(Xt.has(c)){o=!0;continue}else if(Zs(c)){s[c]=l;continue}else{const u=zo(l,ui[c]);c.startsWith("origin")?(a=!0,r[c]=u):i[c]=u}}if(e.transform||(o||n?i.transform=rf(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=r;i.transformOrigin=`${c} ${l} ${u}`}}function yr(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];s?.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function _r(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ye={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=_r(t,e.target.x),i=_r(t,e.target.y);return`${n}% ${i}%`}},af={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ft.parse(t);if(s.length>5)return i;const r=ft.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=c;const l=O(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=l),typeof s[3+o]=="number"&&(s[3+o]/=l),r(s)}},wi={borderRadius:{...ye,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomLeftRadius:ye,borderBottomRightRadius:ye,boxShadow:af};function vr(t,{layout:e,layoutId:n}){return Xt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!wi[t]||t==="opacity")}function Ci(t,e,n){const i=t.style,s=e?.style,r={};if(!i)return r;for(const o in i)(X(i[o])||s&&X(s[o])||vr(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=i[o]);return r}function lf(t){return window.getComputedStyle(t)}class cf extends rr{constructor(){super(...arguments),this.type="html",this.renderInstance=yr}readValueFromInstance(e,n){if(Xt.has(n))return this.projection?.isProjecting?Gn(n):Mc(e,n);{const i=lf(e),s=(Zs(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return gr(e,n)}build(e,n,i){bi(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return Ci(e,n,i)}}const uf={offset:"stroke-dashoffset",array:"stroke-dasharray"},ff={offset:"strokeDashoffset",array:"strokeDasharray"};function hf(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?uf:ff;t[r.offset]=`${-i}`,t[r.array]=`${e} ${n}`}const df=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function xr(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},c,l,u){if(bi(t,a,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h}=t;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete f.transformBox);for(const d of df)f[d]!==void 0&&(h[d]=f[d],delete f[d]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),s!==void 0&&hf(f,s,r,o,!1)}const br=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"]),wr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function mf(t,e,n,i){yr(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(br.has(s)?s:ri(s),e.attrs[s])}function Cr(t,e,n){const i=Ci(t,e,n);for(const s in t)if(X(t[s])||X(e[s])){const r=qt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=t[s]}return i}class pf extends rr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Xt.has(n)){const i=Uo(n);return i&&i.default||0}return n=br.has(n)?n:ri(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return Cr(e,n,i)}build(e,n,i){xr(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){mf(e,n,i,s)}mount(e){this.isSVGTag=wr(e.tagName),super.mount(e)}}const gf=gi.length;function Tr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Tr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<gf;n++){const i=gi[n],s=t.props[i];(ge(s)||s===!1)&&(e[i]=s)}return e}function Sr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const yf=[...pi].reverse(),_f=pi.length;function vf(t){return e=>Promise.all(e.map(({animation:n,options:i})=>pu(t,n,i)))}function xf(t){let e=vf(t),n=Pr(),i=!0,s=!1;const r=l=>(u,f)=>{const h=Dt(t,f,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:d,transitionEnd:m,...y}=h;u={...u,...y,...m}}return u};function o(l){e=l(t)}function a(l){const{props:u}=t,f=Tr(t.parent)||{},h=[],d=new Set;let m={},y=1/0;for(let p=0;p<_f;p++){const _=yf[p],b=n[_],v=u[_]!==void 0?u[_]:f[_],w=ge(v),M=_===l?b.isActive:null;M===!1&&(y=p);let V=v===f[_]&&v!==u[_]&&w;if(V&&(i||s)&&t.manuallyAnimateOnMount&&(V=!1),b.protectedKeys={...m},!b.isActive&&M===null||!v&&!b.prevProp||He(v)||typeof v=="boolean")continue;if(_==="exit"&&b.isActive&&M!==!0){b.prevResolvedValues&&(m={...m,...b.prevResolvedValues});continue}const S=bf(b.prevProp,v);let A=S||_===l&&b.isActive&&!V&&w||p>y&&w,C=!1;const D=Array.isArray(v)?v:[v];let $=D.reduce(r(_),{});M===!1&&($={});const{prevResolvedValues:z={}}=b,Y={...z,...$},it=L=>{A=!0,d.has(L)&&(C=!0,d.delete(L)),b.needsAnimating[L]=!0;const Z=t.getValue(L);Z&&(Z.liveStyle=!1)};for(const L in Y){const Z=$[L],lt=z[L];if(m.hasOwnProperty(L))continue;let k=!1;si(Z)&&si(lt)?k=!Sr(Z,lt):k=Z!==lt,k?Z!=null?it(L):d.add(L):Z!==void 0&&d.has(L)?it(L):b.protectedKeys[L]=!0}b.prevProp=v,b.prevResolvedValues=$,b.isActive&&(m={...m,...$}),(i||s)&&t.blockInitialAnimation&&(A=!1);const et=V&&S;A&&(!et||C)&&h.push(...D.map(L=>{const Z={type:_};if(typeof L=="string"&&(i||s)&&!et&&t.manuallyAnimateOnMount&&t.parent){const{parent:lt}=t,k=Dt(lt,L);if(lt.enteringChildren&&k){const{delayChildren:P}=k.transition||{};Z.delay=Eo(lt.enteringChildren,t,P)}}return{animation:L,options:Z}}))}if(d.size){const p={};if(typeof u.initial!="boolean"){const _=Dt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);_&&_.transition&&(p.transition=_.transition)}d.forEach(_=>{const b=t.getBaseTarget(_),v=t.getValue(_);v&&(v.liveStyle=!0),p[_]=b??null}),h.push({animation:p})}let g=!!h.length;return i&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),i=!1,s=!1,g?e(h):Promise.resolve()}function c(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const f=a(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Pr(),s=!0}}}function bf(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Sr(e,t):!1}function It(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pr(){return{animate:It(!0),whileInView:It(),whileHover:It(),whileTap:It(),whileDrag:It(),whileFocus:It(),exit:It()}}function Ti(t,e){t.min=e.min,t.max=e.max}function dt(t,e){Ti(t.x,e.x),Ti(t.y,e.y)}function Ar(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const kr=1e-4,wf=1-kr,Cf=1+kr,Er=.01,Tf=0-Er,Sf=0+Er;function tt(t){return t.max-t.min}function Pf(t,e,n){return Math.abs(t-e)<=n}function Mr(t,e,n,i=.5){t.origin=i,t.originPoint=O(e.min,e.max,t.origin),t.scale=tt(n)/tt(e),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(t.scale>=wf&&t.scale<=Cf||isNaN(t.scale))&&(t.scale=1),(t.translate>=Tf&&t.translate<=Sf||isNaN(t.translate))&&(t.translate=0)}function _e(t,e,n,i){Mr(t.x,e.x,n.x,i?i.originX:void 0),Mr(t.y,e.y,n.y,i?i.originY:void 0)}function Vr(t,e,n){t.min=n.min+e.min,t.max=t.min+tt(e)}function Af(t,e,n){Vr(t.x,e.x,n.x),Vr(t.y,e.y,n.y)}function Dr(t,e,n){t.min=e.min-n.min,t.max=t.min+tt(e)}function Ge(t,e,n){Dr(t.x,e.x,n.x),Dr(t.y,e.y,n.y)}function Rr(t,e,n,i,s){return t-=e,t=Ke(t,1/n,i),s!==void 0&&(t=Ke(t,1/s,i)),t}function kf(t,e=0,n=1,i=.5,s,r=t,o=t){if(yt.test(e)&&(e=parseFloat(e),e=O(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=O(r.min,r.max,i);t===r&&(a-=e),t.min=Rr(t.min,e,n,a,s),t.max=Rr(t.max,e,n,a,s)}function Lr(t,e,[n,i,s],r,o){kf(t,e[n],e[i],e[s],e.scale,r,o)}const Ef=["x","scaleX","originX"],Mf=["y","scaleY","originY"];function Ir(t,e,n,i){Lr(t.x,e,Ef,n?n.x:void 0,i?i.x:void 0),Lr(t.y,e,Mf,n?n.y:void 0,i?i.y:void 0)}function Fr(t){return t.translate===0&&t.scale===1}function Br(t){return Fr(t.x)&&Fr(t.y)}function Or(t,e){return t.min===e.min&&t.max===e.max}function Vf(t,e){return Or(t.x,e.x)&&Or(t.y,e.y)}function jr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Nr(t,e){return jr(t.x,e.x)&&jr(t.y,e.y)}function $r(t){return tt(t.x)/tt(t.y)}function Ur(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function _t(t){return[t("x"),t("y")]}function Df(t,e,n){let i="";const s=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:f,rotateY:h,skewX:d,skewY:m}=n;l&&(i=`perspective(${l}px) ${i}`),u&&(i+=`rotate(${u}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(i+=`scale(${a}, ${c})`),i||"none"}const Hr=["TopLeft","TopRight","BottomLeft","BottomRight"],Rf=Hr.length,Wr=t=>typeof t=="string"?parseFloat(t):t,zr=t=>typeof t=="number"||T.test(t);function Lf(t,e,n,i,s,r){s?(t.opacity=O(0,n.opacity??1,If(i)),t.opacityExit=O(e.opacity??1,0,Ff(i))):r&&(t.opacity=O(e.opacity??1,n.opacity??1,i));for(let o=0;o<Rf;o++){const a=`border${Hr[o]}Radius`;let c=Kr(e,a),l=Kr(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||zr(c)===zr(l)?(t[a]=Math.max(O(Wr(c),Wr(l),i),0),(yt.test(l)||yt.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,i))}function Kr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const If=Gr(0,.5,Ws),Ff=Gr(.5,.95,rt);function Gr(t,e,n){return i=>i<t?0:i>e?1:n(ce(t,e,i))}function Bf(t,e,n){const i=X(t)?t:Rt(t);return i.start(ni("",i,e,n)),i.animation}function ve(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Of=(t,e)=>t.depth-e.depth;class jf{constructor(){this.children=[],this.isDirty=!1}add(e){Cn(this.children,e),this.isDirty=!0}remove(e){Ve(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Of),this.isDirty=!1,this.children.forEach(e)}}function Nf(t,e){const n=Q.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(Tt(i),t(r-e))};return I.setup(i,!0),()=>Tt(i)}function qe(t){return X(t)?t.get():t}class $f{constructor(){this.members=[]}add(e){Cn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===e||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(Ve(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(Ve(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:r}=e.options;(s===void 0||s!==r)&&(e.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Xe={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Si=["","X","Y","Z"],Uf=1e3;let Hf=0;function Pi(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function qr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Fo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",I,!(s||r))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&qr(i)}function Xr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=e?.()){this.id=Hf++,this.animationId=0,this.animationCommitId=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.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Kf),this.nodes.forEach(Yf),this.nodes.forEach(Zf),this.nodes.forEach(Gf)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new jf)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Sn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=mi(o)&&!Wu(o),this.instance=o;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const h=()=>this.root.updateBlockedByResize=!1;I.read(()=>{f=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,u&&u(),u=Nf(h,250),Xe.hasAnimatedSinceResize&&(Xe.hasAnimatedSinceResize=!1,this.nodes.forEach(Jr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||l.getDefaultTransition()||nh,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=l.getProps(),p=!this.targetLayout||!Nr(this.targetLayout,d),_=!f&&h;if(this.options.layoutRoot||this.resumeFrom||_||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...ei(m,"layout"),onPlay:y,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,_)}else f||Jr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Tt(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(Jf),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&qr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Yr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Zr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Xf),this.nodes.forEach(Wf),this.nodes.forEach(zf)):this.nodes.forEach(Zr),this.clearAllSnapshots();const a=Q.now();q.delta=gt(0,1e3/60,a-q.timestamp),q.timestamp=a,q.isProcessing=!0,kn.update.process(q),kn.preRender.process(q),kn.render.process(q),q.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,fi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qf),this.sharedNodes.forEach(Qf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!tt(this.snapshot.measuredBox.x)&&!tt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=W(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Br(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||Lt(this.latestValues)||u)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),ih(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return W();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(sh))){const{scroll:l}=this.root;l&&(Jt(a.x,l.offset.x),Jt(a.y,l.offset.y))}return a}removeElementScroll(o){const a=W();if(dt(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:f}=l;l!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&dt(a,o),Jt(a.x,u.offset.x),Jt(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const c=W();dt(c,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Qt(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Lt(u.latestValues)&&Qt(c,u.latestValues,u.layout?.layoutBox)}return Lt(this.latestValues)&&Qt(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(o){const a=W();dt(a,o);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!Lt(l.latestValues))continue;let u;l.instance&&(vi(l.latestValues)&&l.updateSnapshot(),u=W(),dt(u,l.measurePageBox())),Ir(a,l.latestValues,l.snapshot?.layoutBox,u)}return Lt(this.latestValues)&&Ir(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==q.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=q.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Af(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):dt(this.target,this.layout.layoutBox),fr(this.target,this.targetDelta)):dt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||vi(this.parent.latestValues)||lr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),Ge(this.relativeTargetOrigin,a,c),dt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===q.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;dt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;ef(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=W());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ar(this.prevProjectionDelta.x,this.projectionDelta.x),Ar(this.prevProjectionDelta.y,this.projectionDelta.y)),_e(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Ur(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ur(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Zt(),this.projectionDelta=Zt(),this.projectionDeltaWithTransform=Zt()}setAnimationOrigin(o,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},f=Zt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=W(),d=c?c.source:void 0,m=this.layout?this.layout.source:void 0,y=d!==m,g=this.getStack(),p=!g||g.members.length<=1,_=!!(y&&!p&&this.options.crossfade===!0&&!this.path.some(eh));this.animationProgress=0;let b;this.mixTargetDelta=v=>{const w=v/1e3;Qr(f.x,o.x,w),Qr(f.y,o.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ge(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),th(this.relativeTarget,this.relativeTargetOrigin,h,w),b&&Vf(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=W()),dt(b,this.relativeTarget)),y&&(this.animationValues=u,Lf(u,l,this.latestValues,w,_,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Tt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=I.update(()=>{Xe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Rt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Bf(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Uf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&sa(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||W();const f=tt(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=tt(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}dt(a,c),Qt(a,u),_e(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $f),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Pi("z",o,l,this.animationValues);for(let u=0;u<Si.length;u++)Pi(`rotate${Si[u]}`,o,l,this.animationValues),Pi(`skew${Si[u]}`,o,l,this.animationValues);o.render();for(const u in l)o.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=qe(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=qe(a?.pointerEvents)||""),this.hasProjected&&!Lt(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=Df(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),o.transform=f;const{x:h,y:d}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${d.origin*100}% 0`,l.animationValues?o.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in wi){if(u[m]===void 0)continue;const{correct:y,applyTo:g,isCSSVariable:p}=wi[m],_=f==="none"?u[m]:y(u[m],l);if(g){const b=g.length;for(let v=0;v<b;v++)o[g[v]]=_}else p?this.options.visualElement.renderState.vars[m]=_:o[m]=_}this.options.layoutId&&(o.pointerEvents=l===this?qe(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Yr),this.root.sharedNodes.clear()}}}function Wf(t){t.updateLayout()}function zf(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;if(s==="size")_t(u=>{const f=r?e.measuredBox[u]:e.layoutBox[u],h=tt(f);f.min=n[u].min,f.max=f.min+h});else if(s==="x"||s==="y"){const u=s==="x"?"y":"x";Ti(r?e.measuredBox[u]:e.layoutBox[u],n[u])}else sa(s,e.layoutBox,n)&&_t(u=>{const f=r?e.measuredBox[u]:e.layoutBox[u],h=tt(n[u]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+h)});const o=Zt();_e(o,n,e.layoutBox);const a=Zt();r?_e(a,t.applyTransform(i,!0),e.measuredBox):_e(a,n,e.layoutBox);const c=!Br(o);let l=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:h}=u;if(f&&h){const d=W();Ge(d,e.layoutBox,f.layoutBox);const m=W();Ge(m,n,h.layoutBox),Nr(d,m)||(l=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Kf(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Gf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function qf(t){t.clearSnapshot()}function Yr(t){t.clearMeasurements()}function Zr(t){t.isLayoutDirty=!1}function Xf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Jr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Yf(t){t.resolveTargetDelta()}function Zf(t){t.calcProjection()}function Jf(t){t.resetSkewAndRotation()}function Qf(t){t.removeLeadSnapshot()}function Qr(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ta(t,e,n,i){t.min=O(e.min,n.min,i),t.max=O(e.max,n.max,i)}function th(t,e,n,i){ta(t.x,e.x,n.x,i),ta(t.y,e.y,n.y,i)}function eh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const nh={duration:.45,ease:[.4,0,.1,1]},ea=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),na=ea("applewebkit/")&&!ea("chrome/")?Math.round:rt;function ia(t){t.min=na(t.min),t.max=na(t.max)}function ih(t){ia(t.x),ia(t.y)}function sa(t,e,n){return t==="position"||t==="preserve-aspect"&&!Pf($r(e),$r(n),.2)}function sh(t){return t!==t.root&&t.scroll?.wasRoot}const oh=Xr({attachResizeListener:(t,e)=>ve(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ai={current:void 0},oa=Xr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ai.current){const t=new oh({});t.mount(window),t.setOptions({layoutScroll:!0}),Ai.current=t}return Ai.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Ye=$t({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ra(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function rh(...t){return e=>{let n=!1;const i=t.map(s=>{const r=ra(s,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<i.length;s++){const r=i[s];typeof r=="function"?r():ra(t[s],null)}}}}function ah(...t){return Wt(rh(...t),t)}class lh extends ut{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(Oe(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,s=Oe(i)&&i.offsetWidth||0,r=Oe(i)&&i.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function ch({children:t,isPresent:e,anchorX:n,anchorY:i,root:s,pop:r}){const o=gn(),a=B(null),c=B({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=G(Ye),u=t.props?.ref??t?.ref,f=ah(a,u);return vn(()=>{const{width:h,height:d,top:m,left:y,right:g,bottom:p}=c.current;if(e||r===!1||!a.current||!h||!d)return;const _=n==="left"?`left: ${y}`:`right: ${g}`,b=i==="bottom"?`bottom: ${p}`:`top: ${m}`;a.current.dataset.motionPopId=o;const v=document.createElement("style");l&&(v.nonce=l);const w=s??document.head;return w.appendChild(v),v.sheet&&v.sheet.insertRule(`
15
+ [data-motion-pop-id="${o}"] {
16
+ position: absolute !important;
17
+ width: ${h}px !important;
18
+ height: ${d}px !important;
19
+ ${_}px !important;
20
+ ${b}px !important;
21
+ }
22
+ `),()=>{a.current?.removeAttribute("data-motion-pop-id"),w.contains(v)&&w.removeChild(v)}},[e]),x(lh,{isPresent:e,childRef:a,sizeRef:c,pop:r,children:r===!1?t:Tl(t,{ref:f})})}const uh=({children:t,initial:e,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:c,root:l})=>{const u=ae(fh),f=gn();let h=!0,d=xt(()=>(h=!1,{id:f,initial:e,isPresent:n,custom:s,onExitComplete:m=>{u.set(m,!0);for(const y of u.values())if(!y)return;i&&i()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,i]);return r&&h&&(d={...d}),xt(()=>{u.forEach((m,y)=>u.set(y,!1))},[n]),J(()=>{!n&&!u.size&&i&&i()},[n]),t=x(ch,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:l,children:t}),x(Me.Provider,{value:d,children:t})};function fh(){return new Map}function aa(t=!0){const e=G(Me);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=e,r=gn();J(()=>{if(t)return s(r)},[t]);const o=Wt(()=>t&&i&&i(r),[r,i,t]);return!n&&i?[!1,o]:[!0]}const Ze=t=>t.key||"";function la(t){const e=[];return gl.forEach(t,n=>{Vs(n)&&e.push(n)}),e}const Je=({children:t,custom:e,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:c="top",root:l})=>{const[u,f]=aa(o),h=xt(()=>la(t),[t]),d=o&&!u?[]:h.map(Ze),m=B(!0),y=B(h),g=ae(()=>new Map),p=B(new Set),[_,b]=j(h),[v,w]=j(h);Ds(()=>{m.current=!1,y.current=h;for(let S=0;S<v.length;S++){const A=Ze(v[S]);d.includes(A)?(g.delete(A),p.current.delete(A)):g.get(A)!==!0&&g.set(A,!1)}},[v,d.length,d.join("-")]);const M=[];if(h!==_){let S=[...h];for(let A=0;A<v.length;A++){const C=v[A],D=Ze(C);d.includes(D)||(S.splice(A,0,C),M.push(C))}return r==="wait"&&M.length&&(S=M),w(la(S)),b(h),null}const{forceRender:V}=G(wn);return x(ct,{children:v.map(S=>{const A=Ze(S),C=o&&!u?!1:h===v||d.includes(A),D=()=>{if(p.current.has(A))return;if(g.has(A))p.current.add(A),g.set(A,!0);else return;let $=!0;g.forEach(z=>{z||($=!1)}),$&&(V?.(),w(y.current),o&&f?.(),i&&i())};return x(uh,{isPresent:C,initial:!m.current||n?void 0:!1,custom:e,presenceAffectsLayout:s,mode:r,root:l,onExitComplete:C?void 0:D,anchorX:a,anchorY:c,children:S},A)})})},ca=$t({strict:!1}),ua={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"]};let fa=!1;function hh(){if(fa)return;const t={};for(const e in ua)t[e]={isEnabled:n=>ua[e].some(i=>!!n[i])};or(t),fa=!0}function ha(){return hh(),Zu()}function dh(t){const e=ha();for(const n in t)e[n]={...e[n],...t[n]};or(e)}const mh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Qe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||mh.has(t)}let da=t=>!Qe(t);function ph(t){typeof t=="function"&&(da=e=>e.startsWith("on")?!Qe(e):t(e))}try{ph(require("@emotion/is-prop-valid").default)}catch{}function gh(t,e,n){const i={};for(const s in t)s==="values"&&typeof t.values=="object"||X(t[s])||(da(s)||n===!0&&Qe(s)||!e&&!Qe(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const tn=$t({});function yh(t,e){if(We(t)){const{initial:n,animate:i}=t;return{initial:n===!1||ge(n)?n:void 0,animate:ge(i)?i:void 0}}return t.inherit!==!1?e:{}}function _h(t){const{initial:e,animate:n}=yh(t,G(tn));return xt(()=>({initial:e,animate:n}),[ma(e),ma(n)])}function ma(t){return Array.isArray(t)?t.join(" "):t}const ki=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pa(t,e,n){for(const i in e)!X(e[i])&&!vr(i,n)&&(t[i]=e[i])}function vh({transformTemplate:t},e){return xt(()=>{const n=ki();return bi(n,e,t),Object.assign({},n.vars,n.style)},[e])}function xh(t,e){const n=t.style||{},i={};return pa(i,n,t),Object.assign(i,vh(t,e)),i}function bh(t,e){const n={},i=xh(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const ga=()=>({...ki(),attrs:{}});function wh(t,e,n,i){const s=xt(()=>{const r=ga();return xr(r,e,wr(i),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};pa(r,t.style,t),s.style={...r,...s.style}}return s}const Ch=["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 Ei(t){return typeof t!="string"||t.includes("-")?!1:!!(Ch.indexOf(t)>-1||/[A-Z]/u.test(t))}function Th(t,e,n,{latestValues:i},s,r=!1,o){const c=(o??Ei(t)?wh:bh)(e,i,s,t),l=gh(e,typeof t=="string",r),u=t!==ct?{...l,...c,ref:n}:{},{children:f}=e,h=xt(()=>X(f)?f.get():f,[f]);return st(t,{...u,children:h})}function Sh({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:Ph(n,i,s,t),renderState:e()}}function Ph(t,e,n,i){const s={},r=i(t,{});for(const h in r)s[h]=qe(r[h]);let{initial:o,animate:a}=t;const c=We(t),l=nr(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;if(f&&typeof f!="boolean"&&!He(f)){const h=Array.isArray(f)?f:[f];for(let d=0;d<h.length;d++){const m=ii(t,h[d]);if(m){const{transitionEnd:y,transition:g,...p}=m;for(const _ in p){let b=p[_];if(Array.isArray(b)){const v=u?b.length-1:0;b=b[v]}b!==null&&(s[_]=b)}for(const _ in y)s[_]=y[_]}}}return s}const ya=t=>(e,n)=>{const i=G(tn),s=G(Me),r=()=>Sh(t,e,i,s);return n?r():ae(r)},Ah=ya({scrapeMotionValuesFromProps:Ci,createRenderState:ki}),kh=ya({scrapeMotionValuesFromProps:Cr,createRenderState:ga}),Eh=Symbol.for("motionComponentSymbol");function Mh(t,e,n){const i=B(n);vn(()=>{i.current=n});const s=B(null);return Wt(r=>{r&&t.onMount?.(r);const o=i.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(s.current=a)}else s.current?(s.current(),s.current=null):o(r);else o&&(o.current=r);e&&(r?e.mount(r):e.unmount())},[e])}const _a=$t({});function te(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Vh(t,e,n,i,s,r){const{visualElement:o}=G(tn),a=G(ca),c=G(Me),l=G(Ye),u=l.reducedMotion,f=l.skipAnimations,h=B(null),d=B(!1);i=i||a.renderer,!h.current&&i&&(h.current=i(t,{visualState:e,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:r}),d.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,y=G(_a);m&&!m.projection&&s&&(m.type==="html"||m.type==="svg")&&Dh(h.current,n,s,y);const g=B(!1);vn(()=>{m&&g.current&&m.update(n,c)});const p=n[Io],_=B(!!p&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return Ds(()=>{d.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),J(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),_.current=!1),m.enteringChildren=void 0)}),m}function Dh(t,e,n,i){const{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:va(t.parent)),t.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&te(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:c,layoutRoot:l})}function va(t){if(t)return t.options.allowProjection!==!1?t.projection:va(t.parent)}function Mi(t,{forwardMotionProps:e=!1,type:n}={},i,s){i&&dh(i);const r=n?n==="svg":Ei(t),o=r?kh:Ah;function a(l,u){let f;const h={...G(Ye),...l,layoutId:Rh(l)},{isStatic:d}=h,m=_h(l),y=o(l,d);if(!d&&typeof window<"u"){Lh();const g=Ih(h);f=g.MeasureLayout,m.visualElement=Vh(t,y,h,s,g.ProjectionNode,r)}return x(tn.Provider,{value:m,children:[f&&m.visualElement?x(f,{visualElement:m.visualElement,...h}):null,Th(t,l,Mh(y,m.visualElement,u),y,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=xn(a);return c[Eh]=t,c}function Rh({layoutId:t}){const e=G(wn).id;return e&&t!==void 0?e+"-"+t:t}function Lh(t,e){G(ca).strict}function Ih(t){const e=ha(),{drag:n,layout:i}=e;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n?.isEnabled(t)||i?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Fh(t,e){if(typeof Proxy>"u")return Mi;const n=new Map,i=(r,o)=>Mi(r,o,t,e),s=(r,o)=>i(r,o);return new Proxy(s,{get:(r,o)=>o==="create"?i:(n.has(o)||n.set(o,Mi(o,void 0,t,e)),n.get(o))})}const Bh=(t,e)=>e.isSVG??Ei(t)?new pf(e):new cf(e,{allowProjection:t!==ct});class Oh extends At{constructor(e){super(e),e.animationState||(e.animationState=xf(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();He(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let jh=0;class Nh extends At{constructor(){super(...arguments),this.id=jh++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;if(e&&i===!1){if(this.isExitComplete){const{initial:r,custom:o}=this.node.getProps();if(typeof r=="string"){const a=Dt(this.node,r,o);if(a){const{transition:c,transitionEnd:l,...u}=a;for(const f in u)this.node.getValue(f)?.jump(u[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const $h={animation:{Feature:Oh},exit:{Feature:Nh}};function xe(t){return{point:{x:t.pageX,y:t.pageY}}}const Uh=t=>e=>hi(e)&&t(e,xe(e));function be(t,e,n,i){return ve(t,e,Uh(n),i)}const xa=({current:t})=>t?t.ownerDocument.defaultView:null,ba=(t,e)=>Math.abs(t-e);function Hh(t,e){const n=ba(t.x,e.x),i=ba(t.y,e.y);return Math.sqrt(n**2+i**2)}const wa=new Set(["auto","scroll"]);class Ca{constructor(e,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=en(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Vi(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=Hh(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:g}=d,{timestamp:p}=q;this.history.push({...g,timestamp:p});const{onStart:_,onMove:b}=this.handlers;m||(_&&_(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=en(m,this.transformPagePoint),I.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:y,onSessionEnd:g,resumeAnimation:p}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Vi(d.type==="pointercancel"?this.lastMoveEventInfo:en(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(d,_),g&&g(d,_)},!hi(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=s||window;const c=xe(e),l=en(c,this.transformPagePoint),{point:u}=l,{timestamp:f}=q;this.history=[{...u,timestamp:f}];const{onSessionStart:h}=n;h&&h(e,Vi(l,this.history)),this.removeListeners=le(be(this.contextWindow,"pointermove",this.handlePointerMove),be(this.contextWindow,"pointerup",this.handlePointerUp),be(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const i=getComputedStyle(n);(wa.has(i.overflowX)||wa.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const i=e===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:s.x-n.x,y:s.y-n.y};r.x===0&&r.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,s),I.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Tt(this.updatePoint)}}function en(t,e){return e?{point:e(t.point)}:t}function Ta(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Vi({point:t},e){return{point:t,delta:Ta(t,Sa(e)),offset:Ta(t,Wh(e)),velocity:zh(e,.1)}}function Wh(t){return t[0]}function Sa(t){return t[t.length-1]}function zh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Sa(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>ot(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>ot(e)*2&&(i=t[1]);const r=at(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Kh(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?O(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?O(n,t,i.max):Math.min(t,n)),t}function Pa(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Gh(t,{top:e,left:n,bottom:i,right:s}){return{x:Pa(t.x,n,s),y:Pa(t.y,e,i)}}function Aa(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function qh(t,e){return{x:Aa(t.x,e.x),y:Aa(t.y,e.y)}}function Xh(t,e){let n=.5;const i=tt(t),s=tt(e);return s>i?n=ce(e.min,e.max-i,t.min):i>s&&(n=ce(t.min,t.max-s,e.min)),gt(0,1,n)}function Yh(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Di=.35;function Zh(t=Di){return t===!1?t=0:t===!0&&(t=Di),{x:ka(t,"left","right"),y:ka(t,"top","bottom")}}function ka(t,e,n){return{min:Ea(t,e),max:Ea(t,n)}}function Ea(t,e){return typeof t=="number"?t:t[e]||0}const Jh=new WeakMap;class Qh{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=W(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const r=f=>{n&&this.snapToCursor(xe(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:d,dragPropagation:m,onDragStart:y}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Au(d),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_t(p=>{let _=this.getAxisMotionValue(p).get()||0;if(yt.test(_)){const{projection:b}=this.visualElement;if(b&&b.layout){const v=b.layout.layoutBox[p];v&&(_=tt(v)*(parseFloat(_)/100))}}this.originPoint[p]=_}),y&&I.update(()=>y(f,h),!1,!0),oi(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:y,onDrag:g}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:p}=h;if(m&&this.currentDirection===null){this.currentDirection=ed(p),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,p),this.updateAxis("y",h.point,p),this.visualElement.render(),g&&I.update(()=>g(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ca(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:xa(this.visualElement),element:this.visualElement.current})}stop(e,n){const i=e||this.latestPointerEvent,s=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!s||!i)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&I.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,i){const{drag:s}=this.getProps();if(!i||!nn(e,s,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=Kh(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;e&&te(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=Gh(i.layoutBox,e):this.constraints=!1,this.elastic=Zh(n),s!==this.constraints&&!te(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&_t(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Yh(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!te(e))return!1;const i=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const r=nf(i,s.root,this.visualElement.getTransformPagePoint());let o=qh(s.layout.layoutBox,r);if(n){const a=n(Qu(o));this.hasMutatedConstraints=!!a,a&&(o=ar(a))}return o}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=_t(u=>{if(!nn(u,n,this.currentDirection))return;let f=c&&c[u]||{};(o===!0||o===u)&&(f={min:0,max:0});const h=s?200:1e6,d=s?40:1e7,m={type:"inertia",velocity:i?e[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(u,m)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return oi(this.visualElement,e),i.start(ni(e,i,0,n,this.visualElement,!1))}stopAnimation(){_t(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){_t(n=>{const{drag:i}=this.getProps();if(!nn(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],c=r.get()||0;r.set(e[n]-O(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!te(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};_t(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();s[o]=Xh({min:c,max:c},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),_t(o=>{if(!nn(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(O(c,l,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Jh.set(this.visualElement,this);const e=this.visualElement.current,n=be(e,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps(),h=l.target,d=h!==e&&Ru(h);u&&f&&!d&&this.start(l)});let i;const s=()=>{const{dragConstraints:l}=this.getProps();te(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),i||(i=td(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),I.read(s);const a=ve(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(_t(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=l[f].translate,h.set(h.get()+l[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),c&&c(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:o=Di,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Ma(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function td(t,e,n){const i=Qo(t,Ma(n)),s=Qo(e,Ma(n));return()=>{i(),s()}}function nn(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ed(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class nd extends At{constructor(e){super(e),this.removeGroupControls=rt,this.removeListeners=rt,this.controls=new Qh(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||rt}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ri=t=>(e,n)=>{t&&I.update(()=>t(e,n),!1,!0)};class id extends At{constructor(){super(...arguments),this.removePointerDownListener=rt}onPointerDown(e){this.session=new Ca(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xa(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ri(e),onStart:Ri(n),onMove:Ri(i),onEnd:(r,o)=>{delete this.session,s&&I.postRender(()=>s(r,o))}}}mount(){this.removePointerDownListener=be(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Li=!1;class sd extends ut{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),i&&i.register&&s&&i.register(r),Li&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Xe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:s,isPresent:r}=this.props,{projection:o}=i;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Li=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||I.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),fi.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=e;Li=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Va(t){const[e,n]=aa(),i=G(wn);return x(sd,{...t,layoutGroup:i,switchLayoutGroup:G(_a),isPresent:e,safeToRemove:n})}const od={pan:{Feature:id},drag:{Feature:nd,ProjectionNode:oa,MeasureLayout:Va}};function Da(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,r=i[s];r&&I.postRender(()=>r(e,xe(e)))}class rd extends At{mount(){const{current:e}=this.node;e&&(this.unmount=Eu(e,(n,i)=>(Da(this.node,i,"Start"),s=>Da(this.node,s,"End"))))}unmount(){}}class ad extends At{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=le(ve(this.node.current,"focus",()=>this.onFocus()),ve(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ra(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),r=i[s];r&&I.postRender(()=>r(e,xe(e)))}class ld extends At{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=Iu(e,(s,r)=>(Ra(this.node,r,"Start"),(o,{success:a})=>Ra(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:i?.tap===!1})}unmount(){}}const Ii=new WeakMap,Fi=new WeakMap,cd=t=>{const e=Ii.get(t.target);e&&e(t)},ud=t=>{t.forEach(cd)};function fd({root:t,...e}){const n=t||document;Fi.has(n)||Fi.set(n,{});const i=Fi.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(ud,{root:t,...e})),i[s]}function hd(t,e,n){const i=fd(e);return Ii.set(t,n),i.observe(t),()=>{Ii.delete(t),i.unobserve(t)}}const dd={some:0,all:1};class md extends At{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:dd[s]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,r&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=l?u:f;h&&h(c)};return hd(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(pd(e,n))&&this.startObserver()}unmount(){}}function pd({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const gd={...$h,...{inView:{Feature:md},tap:{Feature:ld},focus:{Feature:ad},hover:{Feature:rd}},...od,...{layout:{ProjectionNode:oa,MeasureLayout:Va}}},kt=Fh(gd,Bh);function La(t){const e=ae(()=>Rt(t)),{isStatic:n}=G(Ye);if(n){const[,i]=j(t);J(()=>e.on("change",i),[])}return e}class yd{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(i=>{i.start(e.nativeEvent||e,n)})}cancel(){this.componentControls.forEach(e=>{e.cancel()})}stop(){this.componentControls.forEach(e=>{e.stop()})}}const _d=()=>new yd;function vd(){return ae(_d)}const xd=t=>st("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,width:24,viewBox:"0 0 1080 1080",fill:"none",...t},st("path",{d:"M1030.21 421.12C993.932 410.666 954.461 397.259 926.194 371.571C890.38 339.085 875.895 289.536 863.754 244.112C861.316 241.111 859.441 237.689 854.894 238.721H854.988C848.565 240.08 846.69 254.659 845.19 260.05C834.924 295.395 821.752 334.069 796.625 361.68C766.858 394.494 724.716 408.697 683.651 421.12C678.307 422.714 668.369 423.089 664.76 428.011C660.307 433.964 665.932 438.464 671.651 440.293C700.949 449.574 729.216 455.575 756.264 470.575C812.657 501.889 830.283 552.048 846.737 610.879C847.44 613.41 848.612 617.535 849.55 619.832C851.284 624.192 855.972 627.051 860.285 624.192C860.66 623.958 863.894 619.926 864.129 619.504C865.301 616.879 865.629 612.051 866.472 608.957C878.379 566.064 894.974 518.906 929.85 489.279C957.742 465.513 996.041 452.809 1031.29 442.449C1036.07 441.09 1046.81 440.246 1049.15 435.089C1054.03 424.073 1036.54 422.948 1030.26 421.073L1030.21 421.12Z",fill:"#E6007E"}),st("path",{d:"M217.46 645.991C210.053 624.803 204.99 602.677 202.318 579.52C151.128 605.911 100.642 635.585 52.3582 668.867C56.7647 666.711 61.6868 665.352 66.8901 665.024C67.7808 664.977 126.518 660.945 217.507 645.991H217.46Z",fill:"#7D1751"}),st("path",{d:"M30.4221 706.503C29.9065 698.628 31.7816 691.221 35.3911 684.846C27.8439 697.503 27.9845 713.816 37.3131 726.566C39.1413 729.051 41.2039 731.207 43.454 733.129C36.0474 726.52 31.1253 717.144 30.469 706.503H30.4221Z",fill:"#7D1751"}),st("path",{d:"M744.783 574.872C737.986 622.874 716.985 665.204 681.124 701.3C636.638 746.067 583.713 769.084 521.132 769.084C458.551 769.084 405.627 746.114 361.14 701.3C360.25 700.362 359.406 699.378 358.515 698.44C321.342 706.644 286.606 713.394 255.01 718.925C266.261 735.098 279.105 750.614 293.825 765.381C356.359 827.071 430.941 858.526 518.788 858.526C606.636 858.526 681.218 828.29 743.752 765.381C776.754 732.192 800.942 695.581 816.552 655.501C806.427 620.014 795.317 587.904 774.832 561.465C764.847 566.059 754.862 570.512 744.877 574.872H744.783Z",fill:"#282828"}),st("path",{d:"M254.776 639.566C272.964 636.285 292.184 632.582 312.201 628.41C310.279 623.863 308.497 619.269 306.904 614.628C298.888 591.095 294.903 566.016 294.903 539.156C294.903 537.937 294.95 536.718 294.997 535.452C295.841 474.184 317.498 422.103 361.094 378.226C404.408 333.458 458.504 310.442 521.085 310.442C580.01 310.442 630.356 330.833 673.202 370.585C703.25 360.882 732.877 348.834 756.69 327.974C752.471 323.286 748.159 318.645 743.658 314.098C681.124 252.455 606.496 221 518.695 221C430.894 221 356.265 251.236 293.731 314.145C231.197 375.835 199.93 450.886 199.93 539.156C199.93 552.937 200.774 566.391 202.321 579.517C204.993 602.674 210.055 624.8 217.462 645.989C229.369 644.02 241.791 641.91 254.729 639.566H254.776Z",fill:"#282828"}),st("path",{d:"M46.2221 673.078C48.2378 671.672 50.3004 670.266 52.363 668.859C46.269 671.813 41.1125 676.266 37.3154 681.751C39.7062 678.469 42.7063 675.516 46.2221 673.031V673.078Z",fill:"#E6007E"}),st("path",{d:"M388.424 691.598C445.661 678.238 511.664 660.425 581.886 637.127C634.483 619.595 689.423 598.969 744.785 574.827C754.769 570.468 764.754 566.014 774.739 561.42C767.004 551.436 758.004 542.201 747.082 533.95C741.175 529.497 734.753 525.278 727.721 521.387C718.721 516.371 709.58 512.434 700.345 509.012C581.371 559.733 464.787 593.438 372.158 615.189C351.485 620.064 331.468 624.423 312.202 628.408C292.185 632.533 273.012 636.236 254.777 639.565C241.839 641.909 229.37 644.065 217.51 645.987C126.521 660.941 67.7841 664.972 66.8935 665.019C61.6901 665.347 56.8149 666.707 52.3615 668.863C50.3458 670.269 48.2832 671.629 46.2206 673.082C42.6579 675.566 39.7047 678.52 37.3139 681.801C36.5639 682.785 36.0014 683.864 35.392 684.895C31.7824 691.27 29.9074 698.724 30.423 706.552C31.1262 717.24 36.0014 726.616 43.408 733.178C43.783 733.507 44.2049 733.835 44.6268 734.163C45.0018 734.444 45.3299 734.772 45.705 735.054C52.9241 740.585 62.112 743.632 71.9093 743.023C75.8939 742.741 146.866 737.96 254.918 718.975C286.513 713.443 321.249 706.693 358.423 698.489C368.267 696.333 378.205 694.083 388.377 691.692L388.424 691.598Z",fill:"#E6007E"}),st("path",{d:"M35.3927 684.846C36.0021 683.815 36.5646 682.736 37.3147 681.752C36.6115 682.736 36.0021 683.768 35.3927 684.846Z",fill:"#E6007E"}));function Ia({title:t,subtitle:e}){return x("div",{class:"om:flex om:items-center om:gap-2",children:[x("span",{class:"om:w-8 om:h-8 om:flex-shrink-0",children:x(xd,{className:"om:h-8 om:w-8 om:pt-0.5"})}),x("div",{class:"om:flex om:flex-col om:ml-2",children:[x("span",{class:"om:text-[14px] om:text-gray-700",children:e}),x("span",{class:"om:text-[14px] om:font-bold om:leading-none",children:t})]})]})}function bd(){const t="om:w-1.5 om:h-1.5 om:rounded-full om:bg-[#E6007E] om:opacity-30 om:animate-[omnia-typing_1.1s_ease-in-out_infinite]";return x("span",{class:"omnia-typing om:inline-flex om:gap-1.5","aria-label":"Loading",children:[x("span",{class:t}),x("span",{class:`${t} om:[animation-delay:0.15s]`}),x("span",{class:`${t} om:[animation-delay:0.3s]`})]})}function Fa({t}){const e=t?t("disclaimer"):"Artificial intelligence can make mistakes, please verify important information.";return x("p",{class:"omnia-ai-disclaimer om:border-t-1 om:border-gray-100 om:bg-gray-100 om:text-[10px] om:leading-snug om:text-gray-600 om:text-center om:px-3 om:py-1 om:mb-0 om:mt-3",children:e})}const Bi="om:block om:w-full om:px-2.5 om:py-1.5 om:border om:border-gray-300 om:rounded om:text-[13px] om:leading-normal om:text-gray-800 om:bg-white om:font-[inherit] om:focus:outline-none om:focus:border-[#E6007E] om:focus:ring-2 om:focus:ring-[#E6007E]/15",wd="omnia-btn om:inline-flex om:items-center om:justify-center om:cursor-pointer om:transition-colors om:focus:outline-none om:disabled:opacity-50 om:disabled:cursor-not-allowed",Oi={primary:{md:"omnia-btn--primary om:gap-1 om:px-3.5 om:py-1.5 om:border om:border-[#E6007E] om:rounded om:bg-[#E6007E] om:text-white om:text-[13px] om:leading-snug om:whitespace-nowrap om:hover:bg-[#CF0071] om:hover:border-[#CF0071] om:focus-visible:ring-2 om:focus-visible:ring-[#E6007E] om:focus-visible:ring-offset-2",sm:"omnia-btn--primary omnia-btn--small om:gap-1 om:px-2 om:py-0.5 om:border om:border-[#E6007E] om:rounded om:bg-[#E6007E] om:text-white om:text-xs om:leading-snug om:whitespace-nowrap om:hover:bg-[#CF0071] om:hover:border-[#CF0071] om:focus-visible:ring-2 om:focus-visible:ring-[#E6007E] om:focus-visible:ring-offset-2"},secondary:{md:"om:gap-1 om:px-3.5 om:py-1.5 om:border om:border-gray-300 om:rounded om:bg-white om:text-gray-700 om:text-[13px] om:leading-snug om:whitespace-nowrap om:hover:bg-gray-50 om:hover:border-gray-400 om:focus-visible:ring-2 om:focus-visible:ring-gray-400 om:focus-visible:ring-offset-2",sm:"omnia-btn--small om:gap-1 om:px-2 om:py-0.5 om:border om:border-gray-300 om:rounded om:bg-white om:text-gray-700 om:text-xs om:leading-snug om:whitespace-nowrap om:hover:bg-gray-50 om:hover:border-gray-400 om:focus-visible:ring-2 om:focus-visible:ring-gray-400 om:focus-visible:ring-offset-2"},icon:"omnia-btn--icon om:p-1 om:border-none om:bg-transparent om:text-gray-500 om:hover:text-gray-800 om:hover:bg-black/5"},nt=xn(function({variant:e="secondary",size:n="md",class:i,children:s,...r},o){const a=e==="icon"?Oi.icon:Oi[e]?.[n]??Oi.secondary.md;return x("button",{ref:o,class:`${wd} ${a}${i?` ${i}`:""}`,...r,children:s})}),Cd=new Set(["improve-text","correct-text","make-accessible","expand-text","reduce-text"]),Td=380,Sd=560;function Pd({editor:t,client:e,config:n={},mode:i="inline",action:s,onClose:r,onAccept:o}){const a=n.t||(P=>P),[c,l]=j("idle"),[u,f]=j(""),[h,d]=j(null),[m,y]=j("selection");function g(){return(t?.selection?.getContent({format:"text"})??"").trim().length>0?"selection":"document"}const[p,_]=j(n.defaultLanguage??"fr"),b=n.languages?.length?n.languages:Ce,v=B(null),w=B(null),M=B(null),V=vd(),S=La(0),A=La(0),C=n.floatingPanelWidth??Td,D=C==="full",$=i==="blur"?Sd:D?window.innerWidth-32:C,[z,Y]=j({width:$,height:null});function it(P){P.preventDefault(),P.stopPropagation();const R=P.clientX,mt=P.clientY,K=v.current.offsetWidth,Ba=v.current.offsetHeight,ee=on=>{const Bt=Math.max(280,Math.min(K+on.clientX-R,window.innerWidth-32)),Ot=Math.max(120,Math.min(Ba+on.clientY-mt,window.innerHeight-32));Y({width:Bt,height:Ot})},sn=()=>{document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",sn)};document.addEventListener("pointermove",ee),document.addEventListener("pointerup",sn)}J(()=>{if(i!=="inline"||m!=="selection"||!s||!v.current||!t)return;const P=v.current,R=P.getBoundingClientRect(),K=t.selection.getRng().getBoundingClientRect(),ee=t.iframeElement?.getBoundingClientRect()||{top:0,left:0},sn=ee.top+K.bottom,on=ee.top+K.top;let Bt=sn+8;Bt+R.height>window.innerHeight-16&&(Bt=on-R.height-8),Bt=Math.max(8,Bt);let Ot;if(D)Ot=16;else{const Ld=ee.left+K.left,Id=K.width;Ot=Ld+(Id-R.width)/2,Ot=Math.max(8,Math.min(Ot,window.innerWidth-R.width-8))}P.style.top=`${Bt}px`,P.style.left=`${Ot}px`},[s,t,c,m,i]),J(()=>{if(i!=="blur"&&m!=="document"||!s||!v.current)return;const P=v.current,R=P.getBoundingClientRect();P.style.top=`${Math.max(16,(window.innerHeight-R.height)/2)}px`,P.style.left=`${Math.max(16,(window.innerWidth-R.width)/2)}px`},[s,c,z,m,i]);const et=B(null);et.current=P=>{if(P.key==="Escape"&&Ft(),P.key==="Enter"&&c==="done"){const R=P.target?.tagName;R!=="INPUT"&&R!=="TEXTAREA"&&R!=="SELECT"&&(P.preventDefault(),Z())}},J(()=>{if(!s)return;const P=R=>et.current?.(R);return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[s]),J(()=>{s&&(l("idle"),f(""),d(null),y(g()),_(n.defaultLanguage??"fr"),Y({width:$,height:null}),S.set(0),A.set(0),Cd.has(s)?L():s&&requestAnimationFrame(()=>{v.current?.querySelector(".omnia-input, .omnia-select")?.focus()}))},[s]),J(()=>{c==="done"&&M.current?.focus()},[c]);function Ft(){w.current?.abort(),r()}async function L(){const P=g()==="document",R=P?t.getContent():t.selection.getContent({format:"html"});if(!R)return;y(P?"document":"selection"),w.current?.abort();const mt=new AbortController;w.current=mt,l("streaming"),d(null),f("");try{let K;s==="expand-text"?K=await e.expandText(R,{signal:mt.signal}):s==="improve-text"?K=await e.improveText(R,{signal:mt.signal}):s==="reduce-text"?K=await e.reduceText(R,{signal:mt.signal}):s==="correct-text"?K=await e.correctText(R,{signal:mt.signal}):s==="make-accessible"?K=await e.makeAccessible(R,{signal:mt.signal}):s==="translate-text"&&(K=await e.translateText(R,p,{signal:mt.signal})),mt.signal.aborted||(f(K),l("done"))}catch(K){K.name!=="AbortError"&&(d({message:K.message,retryable:K.retryable!==!1}),l("error"))}}function Z(){u&&o(u,m),r()}if(s&&n.enabledFeatures&&!n.enabledFeatures.includes(s))return null;const lt=i==="blur"?"omnia-backdrop om:fixed om:inset-0 om:z-[10000] om:bg-black/15 om:backdrop-blur-[2px]":"omnia-backdrop om:fixed om:inset-0 om:z-[10000] om:bg-black/5",k=i==="blur"?" om:max-h-[50vh] om:overflow-y-auto":" om:max-h-[300px] om:overflow-y-auto";return x(Je,{children:s&&x(ct,{children:[x(kt.div,{className:lt,"data-omnia":!0,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onMouseDown:Ft},"backdrop"),x(kt.div,{ref:v,className:"omnia-floating-panel omnia-panel om:fixed om:z-[10001] om:max-w-[calc(100vw-16px)] om:font-sans om:text-sm om:leading-relaxed om:text-gray-800 om:bg-white om:border om:border-gray-200 om:rounded-lg om:shadow-lg om:box-border om:flex om:flex-col om:overflow-hidden","data-omnia":!0,style:{x:S,y:A,width:z.width,...z.height?{height:z.height}:{}},drag:i!=="blur",dragListener:!1,dragControls:V,dragTransition:{power:.1,timeConstant:80},dragConstraints:{left:-window.innerWidth/2,right:window.innerWidth/2,top:-window.innerHeight/2,bottom:window.innerHeight/2},dragElastic:.1,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15,ease:"easeOut"},children:[x("div",{class:`omnia-panel__header om:flex om:shrink-0 om:items-center om:justify-between om:px-3 om:py-2.5 om:border-b om:border-gray-100 om:select-none${i!=="blur"?" om:cursor-grab om:active:cursor-grabbing":""}`,onPointerDown:i!=="blur"?P=>V.start(P):void 0,children:[x(Ia,{title:a(`action.${s}`),subtitle:a("panel.subtitle")}),x(nt,{variant:"icon",onClick:Ft,"aria-label":a("button.close"),children:"✕"})]}),m==="document"&&x("div",{class:"omnia-panel__scope om:px-3 om:py-1.5 om:text-[12px] om:font-medium om:text-blue-700 om:bg-blue-50 om:border-b om:border-blue-100 om:shrink-0",children:a("panel.scope_document")}),x("div",{class:`omnia-panel__body om:p-3${z.height?" om:flex-1 om:min-h-0 om:overflow-y-auto":""}`,children:[s==="translate-text"&&c==="idle"&&x("div",{class:"omnia-floating-panel__input-row om:flex om:gap-1.5 om:mb-2",children:[x("select",{class:`omnia-select om:flex-1 ${Bi}`,value:p,onChange:P=>_(P.target.value),onKeyDown:P=>{P.key==="Enter"&&L()},children:b.map(P=>x("option",{value:P.code,children:P.label},P.code))}),x(nt,{variant:"primary",onClick:L,children:a("button.translate")})]}),x("div",{class:`omnia-stream-preview om:font-sans om:text-sm om:leading-relaxed om:text-gray-800 om:p-2 om:break-words${z.height?"":k}`,children:[c==="streaming"&&x("div",{class:"om:flex om:justify-center om:py-4",children:x(bd,{})}),c==="done"&&u&&x(kt.div,{className:"omnia-stream-preview__text",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},dangerouslySetInnerHTML:{__html:u}}),c==="error"&&x(kt.div,{className:"omnia-stream-preview__error om:flex om:items-center om:gap-2 om:text-red-600 om:text-[13px] om:mt-2",initial:{opacity:0,x:-4},animate:{opacity:1,x:0},transition:{duration:.2},children:[x("span",{children:h?.message||a("error.generic")}),h?.retryable&&x(nt,{variant:"secondary",size:"sm",onClick:L,children:a("button.retry")})]})]})]}),x(Je,{children:c==="done"&&x(kt.div,{className:"omnia-panel__footer om:flex om:shrink-0 om:flex-col om:border-t om:border-gray-100",initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{duration:.15},children:[x("div",{class:"om:flex om:items-center om:justify-end om:gap-1.5 om:px-3 om:pt-3",children:[x(nt,{onClick:Ft,children:a("button.cancel")}),x(nt,{ref:M,variant:"primary",onClick:Z,disabled:c!=="done",children:a("button.accept")})]}),x(Fa,{t:a})]})}),x("div",{class:"omnia-resize-handle om:absolute om:bottom-0 om:right-0 om:w-6 om:h-6 om:cursor-nwse-resize om:flex om:items-end om:justify-end om:p-1 om:text-gray-400 om:opacity-60 om:transition-opacity hover:om:opacity-100",onPointerDown:it,children:x("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:[x("path",{d:"M9 1L1 9",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"}),x("path",{d:"M9 5L5 9",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"})]})})]},s)]})})}const Ad='<span data-omnia-cursor-marker style="display:inline;width:0;overflow:hidden;"></span>';function kd({stream:t,status:e,error:n,errorFallback:i,onComplete:s,onError:r,onRetry:o,retryLabel:a}){const[c,l]=j(""),[u,f]=j(""),h=B(null),d=B(null),m=B(null),[y,g]=j(null);J(()=>{if(!t)return;let v=!1;return l(""),f(""),g(null),(async()=>{let w="";try{for await(const M of t){if(v)break;l(w),f(M),w+=M,clearTimeout(m.current),m.current=setTimeout(()=>{v||(l(w),f(""))},320)}v||(l(w),f(""),s?.(w))}catch(M){v||(l(w),f(""),r?.(M))}})(),()=>{v=!0,clearTimeout(m.current)}},[t]);const p=c+u;if(J(()=>{const v=h.current,w=d.current;if(!(!v||!w)&&(e==="streaming"&&(v.scrollTop=v.scrollHeight),e==="streaming")){const M=w.querySelector("[data-omnia-cursor-marker]");if(M){const V=v.getBoundingClientRect(),S=M.getBoundingClientRect();g({x:S.left-V.left+v.scrollLeft,y:S.top-V.top+v.scrollTop,h:S.height})}}},[p,e]),e==="idle")return x("div",{class:"omnia-stream-preview omnia-stream-preview--idle"});const _=e==="streaming"?Ad:"",b=u?c+'<span class="omnia-stream-preview__new">'+u+"</span>"+_:c+_;return x("div",{class:"omnia-stream-preview om:relative om:font-sans om:text-sm om:leading-relaxed om:text-gray-800 om:max-h-[300px] om:overflow-y-auto om:p-2 om:break-words",ref:h,children:[(p||e==="streaming")&&x("div",{ref:d,class:"omnia-stream-preview__text",dangerouslySetInnerHTML:{__html:b}}),e==="streaming"&&y&&x(kt.span,{class:"omnia-stream-preview__cursor om:inline-block om:w-[3px] om:bg-[#E6007E] om:animate-[omnia-blink_0.8s_step-end_infinite]","aria-label":"Loading",style:{position:"absolute",top:0,left:0,height:y.h},animate:{x:y.x,y:y.y},transition:{type:"tween",duration:.08,ease:"easeOut"}}),e==="error"&&x("div",{class:"omnia-stream-preview__error om:flex om:items-center om:gap-2 om:text-red-600 om:text-[13px] om:mt-2",children:[x("span",{children:n||i||"An error occurred"}),o&&x(nt,{variant:"secondary",size:"sm",onClick:o,children:a||"Retry"})]})]})}const Ed=[{value:"",key:"tone.default"},{value:"formal",key:"tone.formal"},{value:"casual",key:"tone.casual"},{value:"bullet_points",key:"tone.bullet_points"},{value:"concise",key:"tone.concise"}];function Md({editor:t,client:e,config:n={},visible:i,onClose:s,initialHistory:r=[]}){const o=n.t||(k=>k),[a,c]=j(""),[l,u]=j(""),[f,h]=j("idle"),[d,m]=j(null),[y,g]=j(""),[p,_]=j(null),[b,v]=j(()=>r.slice(0,n.historyLimit??10)),[w,M]=j(null),V=B(null),S=B(null),A=B(null),C=B(null);function D(){if(!a.trim())return;V.current?.abort();const k=new AbortController;V.current=k,h("streaming"),_(null),g(""),M(null);const P={signal:k.signal};l&&(P.tone=l);const R=e.generate(a,P);m(R)}function $(k){g(k),h("done"),v(P=>[{prompt:a,result:k,tone:l},...P].slice(0,n.historyLimit??10))}function z(k){k.name!=="AbortError"&&(_({message:k.message,retryable:k.retryable!==!1}),h("error"))}function Y(){const k=w!=null?b[w].result:y;if(!k||!t)return;if(C.current&&t.selection?.moveToBookmark)try{t.selection.moveToBookmark(C.current)}catch{}const P=()=>t.insertContent(k);t.undoManager?.transact?t.undoManager.transact(P):P(),t.selection?.collapse?.(!1),t.focus?.()}function it(){const k=w!=null?b[w].result:y;k&&navigator.clipboard.writeText(k).catch(()=>{})}function et(){V.current?.abort(),h("idle")}function Ft(k){M(k),g(b[k].result),m(null),h("done")}const L=w!=null,Z=L?b[w]?.result:y,lt=B(null);return lt.current=k=>{if(k.key==="Escape"&&s(),k.key==="Enter"&&f==="done"){const P=k.target?.tagName;P!=="TEXTAREA"&&P!=="INPUT"&&P!=="SELECT"&&(k.preventDefault(),Y())}},J(()=>{if(!i)return;const k=P=>lt.current?.(P);return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[i]),J(()=>{if(i){if(C.current=null,t?.selection?.getBookmark)try{C.current=t.selection.getBookmark(2,!0)}catch{}requestAnimationFrame(()=>S.current?.focus())}},[i]),J(()=>{f==="done"&&!L&&A.current?.focus()},[f]),n.enabledFeatures&&!n.enabledFeatures.includes("generate")?null:x(Je,{children:i&&x(kt.div,{className:"omnia-side-panel omnia-panel om:fixed om:top-0 om:right-0 om:w-[340px] om:max-w-full om:h-screen om:z-[10000] om:rounded-none om:border-l om:border-gray-200 om:flex om:flex-col om:font-sans om:text-sm om:leading-relaxed om:text-gray-800 om:bg-white om:shadow-lg om:box-border","data-omnia":!0,initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:25,stiffness:300},children:[x("div",{class:"omnia-panel__header om:flex om:items-center om:justify-between om:px-3 om:py-2.5 om:border-b om:border-gray-100",children:[x(Ia,{title:o("panel.generate_title"),subtitle:o("panel.subtitle")}),x(nt,{variant:"icon",onClick:s,"aria-label":o("button.close"),children:"✕"})]}),x("div",{class:"omnia-panel__body omnia-side-panel__body om:p-3 om:flex-1 om:overflow-y-auto om:flex om:flex-col om:gap-3",children:[x("div",{class:"omnia-side-panel__prompt-area om:shrink-0 om:flex om:flex-col om:gap-2",children:[x("textarea",{ref:S,class:`omnia-textarea ${Bi} om:resize-y om:min-h-[60px]`,placeholder:o("placeholder.prompt"),value:a,onInput:k=>c(k.target.value),disabled:f==="streaming",rows:3,onKeyDown:k=>{k.key==="Enter"&&(k.ctrlKey||k.metaKey)&&D()}}),x("div",{class:"omnia-side-panel__options om:flex om:gap-1.5",children:[x("select",{class:`omnia-select om:flex-1 ${Bi}`,value:l,onChange:k=>u(k.target.value),disabled:f==="streaming",children:Ed.map(k=>x("option",{value:k.value,children:o(k.key)},k.value))}),f==="streaming"?x(nt,{onClick:et,children:o("button.stop")}):x(nt,{variant:"primary",onClick:D,disabled:!a.trim(),children:o("button.generate")})]})]}),f!=="idle"&&!L&&x("div",{class:"omnia-side-panel__result om:shrink-0 om:border om:border-gray-100 om:rounded-md om:overflow-hidden",children:[x(kd,{stream:d,status:f,error:p?.message,errorFallback:o("error.generic"),onComplete:$,onError:z,onRetry:p?.retryable?D:void 0,retryLabel:o("button.retry")}),x(Je,{children:f==="done"&&x(kt.div,{className:"omnia-side-panel__result-actions om:flex om:gap-1.5 om:p-2 om:border-t om:border-gray-100",initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{duration:.15},children:[x(nt,{ref:A,variant:"primary",size:"sm",onClick:Y,children:o("button.insert")}),x(nt,{variant:"secondary",size:"sm",onClick:it,children:o("button.copy")})]})})]}),L&&x("div",{class:"omnia-side-panel__result om:shrink-0 om:border om:border-gray-100 om:rounded-md om:overflow-hidden",children:[x("div",{class:"omnia-stream-preview om:font-sans om:text-sm om:leading-relaxed om:text-gray-800 om:max-h-[300px] om:overflow-y-auto om:p-2 om:break-words",children:x("div",{class:"omnia-stream-preview__text",dangerouslySetInnerHTML:{__html:Z}})}),x("div",{class:"omnia-side-panel__result-actions om:flex om:gap-1.5 om:p-2 om:border-t om:border-gray-100",children:[x(nt,{variant:"primary",size:"sm",onClick:Y,children:o("button.insert")}),x(nt,{variant:"secondary",size:"sm",onClick:it,children:o("button.copy")}),x(nt,{variant:"secondary",size:"sm",onClick:()=>M(null),children:o("button.back")})]})]}),b.length>0&&x("div",{class:"omnia-side-panel__history om:shrink-0 om:border-t om:border-gray-100 om:pt-2",children:[x("div",{class:"omnia-side-panel__history-title om:text-[11px] om:font-semibold om:uppercase om:tracking-wide om:text-gray-400 om:mb-1.5",children:o("panel.history")}),b.map((k,P)=>x("button",{class:`omnia-side-panel__history-item om:block om:w-full om:text-left om:px-2 om:py-1.5 om:border om:rounded om:bg-transparent om:cursor-pointer om:font-[inherit] om:text-xs om:leading-snug om:text-gray-600 om:mb-0.5 om:hover:bg-[#E6007E]/5 om:hover:border-[#E6007E]/20 ${w===P?"omnia-side-panel__history-item--active om:bg-[#E6007E]/5 om:border-[#E6007E]/30":"om:border-transparent"}`,onClick:()=>Ft(P),children:[x("div",{class:"omnia-side-panel__history-prompt om:font-medium om:text-gray-800 om:whitespace-nowrap om:overflow-hidden om:text-ellipsis",children:k.prompt}),x("div",{class:"omnia-side-panel__history-preview om:text-gray-400 om:whitespace-nowrap om:overflow-hidden om:text-ellipsis",children:(()=>{const R=k.result.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();return R.length>80?R.slice(0,80)+"…":R})()})]},P))]})]}),x("div",{class:"omnia-panel__footer om:shrink-0",children:x(Fa,{t:o})})]})})}const Vd=xn(function({editor:e,client:n,config:i},s){const[r,o]=j(null),[a,c]=j(!1);hl(s,()=>({showFloatingPanel(h){o(h)},hideFloatingPanel(){o(null)},toggleSidePanel(){c(h=>!h)},showSidePanel(){c(!0)},hideSidePanel(){c(!1)}}));const l=Wt(()=>{o(null)},[]),u=Wt((h,d)=>{e&&(e.undoManager.transact(()=>{d==="document"?e.setContent(h):e.selection.setContent(h)}),d==="document"&&e.selection.select(e.getBody(),!0),e.selection.collapse(!1),e.focus())},[e]),f=Wt(()=>{c(!1)},[]);return x(ct,{children:[x(Pd,{editor:e,client:n,config:i,mode:i.floatingPanelMode,action:r,onClose:l,onAccept:u}),x(Md,{editor:e,client:n,config:i,visible:a,onClose:f})]})});function Dd(t,e,n){const s=`omnia-root-${t.id||"default"}`;let r=document.getElementById(s);r||(r=document.createElement("div"),r.id=s,document.body.appendChild(r));const o=il();return os(x(Vd,{ref:o,editor:t,client:e,config:n}),r),{appRef:o,destroy(){os(null,r),r.remove()}}}function Rd(t,e,n){if(!n.enabled)return{destroy(){}};const i=Object.fromEntries(Object.entries(n.bindings).map(([l,u])=>[u,l]));let s=!1,r=null;function o(l){l==="generate"?e.appRef.current?.toggleSidePanel():e.appRef.current?.showFloatingPanel(l)}function a(l){if(s){if(s=!1,clearTimeout(r),l.altKey||l.ctrlKey||l.metaKey)return;const u=i[l.key.toLowerCase()];u&&(l.preventDefault(),l.stopPropagation(),o(u));return}l.altKey&&!l.ctrlKey&&!l.metaKey&&l.code===`Key${n.prefix.toUpperCase()}`&&(l.preventDefault(),l.stopPropagation(),s=!0,r=setTimeout(()=>{s=!1},n.timeoutMs))}const c=t.getDoc();return c.addEventListener("keydown",a,!0),document.addEventListener("keydown",a,!0),{destroy(){c.removeEventListener("keydown",a,!0),document.removeEventListener("keydown",a,!0),clearTimeout(r)}}}if(!jt)throw new Error("[omnia] tinymce is not available — the plugin must be loaded after TinyMCE.");jt.PluginManager.add("omnia",t=>{if(Za(t),window.omnia_tinymce_settings)for(const[d,m]of Object.entries(window.omnia_tinymce_settings))d.startsWith("omnia_")&&!t.options.isSet(d)&&t.options.set(d,m);const e=t.options.get("omnia_base_url");if(!e){console.warn("[omnia] omnia_base_url is required");return}const n=el(t),{t:i}=n,s=new Set(n.enabledFeatures),r=new Ka({baseUrl:e,application:n.application,municipality:n.municipality,authToken:n.authToken,endpoints:n.endpoints,t:i,onError:d=>console.error("[omnia]",d)});let o=null,a=null;t.on("init",()=>{o=Dd(t,r,n),a=Rd(t,o,n.shortcuts)}),t.on("remove",()=>{a?.destroy(),a=null,o?.destroy(),o=null});function c(){const d=t.selection.getContent({format:"text"});return d&&d.trim().length>0}function l(d){s.has(d)&&o?.appRef.current?.showFloatingPanel(d)}function u(){const d=[];s.has("generate")&&d.push({type:"menuitem",icon:"omnia",text:i("menu.generate"),onAction:()=>o?.appRef.current?.toggleSidePanel()});const m=[["improve-text","correct-text"],["expand-text","reduce-text"],["make-accessible","translate-text"]];for(const y of m){const g=y.filter(p=>s.has(p)).map(p=>ie.find(_=>_.id===p)).filter(Boolean);if(g.length!==0){d.length>0&&d.push({type:"separator"});for(const p of g)d.push({type:"menuitem",icon:p.icon??"omnia",text:i(`menu.${p.id}`),onAction:()=>l(p.id)})}}return d}const f=s.size>(s.has("generate")?1:0);function h(){if(!f)return;const d=t.getContainer();if(!d)return;const m=i("tooltip.omnia"),y=d.querySelector(`[data-omnia-toolbar-button], button[aria-label="${m}"]`);if(!y)return;y.setAttribute("data-omnia-toolbar-button","");const g=c()?m:i("tooltip.omnia_no_selection");y.setAttribute("aria-label",g),y.setAttribute("title",g)}n.toolbar&&n.enabledFeatures.length>0&&(t.ui.registry.addIcon("omnia",ne),t.ui.registry.addMenuButton("omnia",{icon:"omnia",tooltip:i("tooltip.omnia"),fetch:d=>d(u()),onSetup:()=>{t.on("NodeChange SelectionChange",h);const d=requestAnimationFrame(h);return()=>{cancelAnimationFrame(d),t.off("NodeChange SelectionChange",h)}}})),t.ui.registry.addIcon("omnia-expand-text",Oa),t.ui.registry.addIcon("omnia-improve-text",ja),t.ui.registry.addIcon("omnia-reduce-text",Na),t.ui.registry.addIcon("omnia-make-accessible",$a),t.ui.registry.addIcon("omnia-translate-text",Ua),t.ui.registry.addIcon("omnia-correct-text",Ha);for(const d of ie)!d.menuItemId||!s.has(d.id)||t.ui.registry.addMenuItem(d.menuItemId,{icon:d.icon??"omnia",text:i(`action.${d.id}`),onAction:()=>{d.menu==="panel"?o?.appRef.current?.toggleSidePanel():l(d.id)}});n.contextMenu&&t.ui.registry.addContextMenu("omnia",{update:()=>{const d=[];s.has("generate")&&d.push("omnia-generate");for(const m of ie)m.menu==="floating"&&m.menuItemId&&s.has(m.id)&&d.push(m.menuItemId);return d.join(" ")}})})}));
@@ -0,0 +1,10 @@
1
+ <script tal:define="config view/config_json"
2
+ tal:condition="config"
3
+ tal:attributes="data-omnia-tinymce-config config"
4
+ type="text/javascript">
5
+ (function() {
6
+ window.omnia_tinymce_settings = JSON.parse(
7
+ document.currentScript.getAttribute('data-omnia-tinymce-config')
8
+ );
9
+ })();
10
+ </script>