Repository: r0gue-io/pop-cli
Pull request #427: feat: use a proxy for the registration
Author: login: AlexD10S
Created: 2025-02-26T20:41:51Z | Merged: 2025-03-07T13:26:59Z

This is the last step in a larger PR: https://github.com/r0gue-io/pop-cli/pull/404. It is a recommended practice to use a proxy when registering a parachain. Using a proxy allows for ownership changes, as the registering account itself cannot be modified later.

This PR introduces the following changes:

- Prompts the user to confirm whether they want to register using a proxy. If they choose to proceed, they can input the proxy account.
- Wraps the registration call within a proxy extrinsic, following the existing approach used for sudo calls (https://github.com/r0gue-io/pop-cli/blob/main/crates/pop-parachains/src/call/mod.rs#L44)

**How to test**
I start the Paseo parachain locally by running:
```
pop up parachain -f ./tests/networks/paseo.toml
```

I add a proxy into my account manually using PolkadotJS:
![Captura de pantalla 2025-02-28 a las 13 33 33](https://github.com/user-attachments/assets/276dbed8-7d0f-4b17-b475-0eb5bc068dfb)

 And then  run `pop up` in your parachain folder (or specify the folder with the `path` flag)
```
pop up --path ../test-chain --relay-chain-url ws://127.0.0.1:49155
```
This will prompt you to add the proxied address (your account) and open the signing portal, allowing you to sign with the proxy account.

[sc-2542]


Diff:
diff --git a/crates/pop-cli/src/assets/index.html b/crates/pop-cli/src/assets/index.html
index 628cb6127..aa4ec5319 100644
--- a/crates/pop-cli/src/assets/index.html
+++ b/crates/pop-cli/src/assets/index.html
@@ -7,7 +7,7 @@
         href="data:image/svg+xml,%3Csvg width='512' height='512' viewBox='0 0 512 512' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_873_174)'%3E%3Crect width='512' height='512' rx='256' fill='%231C0533'/%3E%3Crect width='512' height='512' rx='256' fill='url(%23paint0_radial_873_174)' fill-opacity='0.8'/%3E%3Crect width='512' height='512' rx='256' fill='url(%23paint1_radial_873_174)' fill-opacity='0.6'/%3E%3Cmask id='mask0_873_174' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='-429' y='-502' width='1428' height='1351'%3E%3Cpath d='M127.637 -501.289L998.911 322.903L984.661 336.383L113.388 -487.809L127.637 -501.289Z' fill='%23D9D9D9'/%3E%3Cpath d='M88.9594 -464.701L960.232 359.491L945.983 372.971L74.7096 -451.221L88.9594 -464.701Z' fill='%23D9D9D9'/%3E%3Cpath d='M50.2814 -428.113L921.554 396.079L907.305 409.559L36.0316 -414.633L50.2814 -428.113Z' fill='%23D9D9D9'/%3E%3Cpath d='M11.6034 -391.525L882.876 432.667L868.627 446.147L-2.64642 -378.045L11.6034 -391.525Z' fill='%23D9D9D9'/%3E%3Cpath d='M-27.0746 -354.937L844.198 469.255L829.949 482.735L-41.3244 -341.457L-27.0746 -354.937Z' fill='%23D9D9D9'/%3E%3Cpath d='M-65.7526 -318.349L805.52 505.843L791.271 519.323L-80.0024 -304.869L-65.7526 -318.349Z' fill='%23D9D9D9'/%3E%3Cpath d='M-104.431 -281.761L766.842 542.431L752.593 555.911L-118.68 -268.281L-104.431 -281.761Z' fill='%23D9D9D9'/%3E%3Cpath d='M-143.109 -245.173L728.164 579.019L713.915 592.499L-157.358 -231.693L-143.109 -245.173Z' fill='%23D9D9D9'/%3E%3Cpath d='M-181.787 -208.585L689.486 615.607L675.237 629.087L-196.036 -195.105L-181.787 -208.585Z' fill='%23D9D9D9'/%3E%3Cpath d='M-220.465 -171.997L650.808 652.195L636.559 665.675L-234.714 -158.517L-220.465 -171.997Z' fill='%23D9D9D9'/%3E%3Cpath d='M-259.143 -135.409L612.13 688.783L597.881 702.263L-273.392 -121.929L-259.143 -135.409Z' fill='%23D9D9D9'/%3E%3Cpath d='M-297.821 -98.8211L573.452 725.371L559.203 738.851L-312.07 -85.3413L-297.821 -98.8211Z' fill='%23D9D9D9'/%3E%3Cpath d='M-336.499 -62.2331L534.774 761.959L520.525 775.439L-350.748 -48.7533L-336.499 -62.2331Z' fill='%23D9D9D9'/%3E%3Cpath d='M-375.177 -25.6452L496.096 798.547L481.847 812.026L-389.426 -12.1654L-375.177 -25.6452Z' fill='%23D9D9D9'/%3E%3Cpath d='M-413.855 10.9428L457.418 835.135L443.169 848.615L-428.104 24.4225L-413.855 10.9428Z' fill='%23D9D9D9'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_873_174)'%3E%3Cpath d='M511.169 254.929C511.169 396.905 396.739 512 255.584 512C114.428 512 -0.000976562 396.905 -0.000976562 254.929C-0.000976562 112.953 114.428 -2.14209 255.584 -2.14209C396.739 -2.14209 511.169 112.953 511.169 254.929Z' fill='%23E6007A'/%3E%3C/g%3E%3Cpath d='M183.804 160.44C171.052 151.144 156.458 147.168 141.864 147.168H52.2334L5.63086 367.567H122.684L132.083 322.765C141.879 321.622 151.384 318.84 160.403 314.394C161.8 313.705 163.178 312.986 164.536 312.239C168.249 321.014 173.177 329.173 179.315 336.581C187.573 346.548 197.657 354.366 209.117 360.016L209.12 360.018L209.517 360.213L209.917 360.399C222.605 366.289 236.098 368.784 249.63 368.784C263.218 368.784 276.507 366.489 289.292 361.868C295.36 359.675 301.212 357.046 306.832 353.988L303.961 367.567H421.013L430.413 322.765C440.209 321.622 449.714 318.84 458.733 314.394C469.61 309.03 479.317 301.877 487.672 293.046L487.682 293.035L487.841 292.867L487.995 292.7L487.998 292.697C496.09 283.931 502.611 273.995 507.338 262.975C512.203 251.631 514.88 239.536 514.88 226.953C514.88 214.447 512.231 202.327 507.001 190.977C501.508 178.753 493.141 168.335 482.134 160.44C469.382 151.144 454.788 147.168 440.194 147.168H350.563L345.323 171.949C338.297 165.041 330.227 159.445 321.314 155.191C308.55 148.958 294.91 146.357 281.28 146.357C267.691 146.357 254.402 148.652 241.618 153.273C229.473 157.663 218.174 163.78 207.814 171.541C205.377 173.358 203.011 175.252 200.715 177.221C196.062 170.823 190.408 165.177 183.804 160.44Z' fill='%232B0532'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M229.569 331.163L229.632 331.194L229.696 331.224C237.592 334.889 246.407 336.65 256.019 336.65C265.979 336.65 275.609 334.978 284.877 331.628C294.055 328.31 302.528 323.689 310.277 317.771C317.967 311.898 324.68 305.15 330.397 297.531L330.413 297.509L330.429 297.487C336.137 289.737 340.585 281.451 343.748 272.638C347.074 263.611 348.753 254.388 348.753 244.999C348.753 236.541 347.45 228.398 344.825 220.6C342.311 212.598 338.452 205.423 333.24 199.132C327.963 192.763 321.484 187.769 313.875 184.16C306.078 180.325 297.295 178.491 287.67 178.491C277.709 178.491 268.079 180.164 258.812 183.513C249.647 186.826 241.125 191.437 233.261 197.332C225.542 203.084 218.751 209.844 212.899 217.597L212.889 217.611C207.16 225.246 202.642 233.54 199.345 242.478L199.33 242.518L199.316 242.559C196.135 251.575 194.532 260.778 194.532 270.142C194.532 278.624 195.843 286.844 198.472 294.776L198.477 294.792L198.482 294.808C201.135 302.663 205.057 309.744 210.248 316.009C215.517 322.37 221.981 327.422 229.569 331.163ZM287.732 276.015L287.742 276C290.74 271.657 292.939 267.045 294.364 262.148C295.831 257.108 296.54 252.276 296.54 247.635C296.54 243.3 295.843 239.458 294.528 236.043L294.487 235.934L294.449 235.824C293.328 232.545 291.583 230.131 289.252 228.349C287.226 226.801 284.199 225.736 279.606 225.736C274.271 225.736 269.81 226.979 266.027 229.305L265.974 229.337L265.921 229.368C261.869 231.746 258.495 234.905 255.765 238.909C252.893 243.123 250.673 247.698 249.104 252.654C247.65 257.67 246.947 262.48 246.947 267.101C246.947 271.459 247.585 275.422 248.809 279.033C250.055 282.339 251.89 284.885 254.293 286.836C256.34 288.379 259.301 289.405 263.68 289.405C269.175 289.405 273.697 288.15 277.46 285.837C281.567 283.313 284.975 280.058 287.722 276.029L287.732 276.015Z' fill='%23E6007A'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M171.542 186.53C164.879 181.64 157.017 179.302 148.254 179.302H84.4909L51.4775 335.434H103.163L112.436 291.23H128.094C136.792 291.23 145.029 289.337 152.73 285.54C160.225 281.844 166.856 276.954 172.594 270.888L172.619 270.861L172.644 270.834C178.339 264.665 182.824 257.798 186.062 250.247C189.323 242.645 190.992 234.866 190.992 226.953C190.992 219.052 189.327 211.496 186.009 204.348C182.762 197.062 177.927 191.083 171.542 186.53ZM135.575 242.131L135.598 242.101C136.363 241.1 137.06 239.71 137.567 237.773L137.604 237.631L137.648 237.49C138.222 235.663 138.577 233.269 138.577 230.197C138.577 227.864 138.266 226.771 138.111 226.428C138.024 226.235 137.948 226.093 137.889 225.994L137.862 225.949L137.849 225.939H126.349L122.444 244.594H132.693C132.756 244.581 132.999 244.516 133.45 244.244C133.961 243.935 134.685 243.325 135.553 242.16L135.575 242.131Z' fill='%23E6007A'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M469.872 186.53C463.209 181.64 455.347 179.302 446.583 179.302H382.821L349.807 335.434H401.493L410.766 291.23H426.424C435.122 291.23 443.359 289.337 451.06 285.54C458.555 281.844 465.186 276.954 470.923 270.888L470.949 270.861L470.973 270.834C476.669 264.665 481.153 257.798 484.392 250.247C487.652 242.645 489.322 234.866 489.322 226.953C489.322 219.052 487.657 211.496 484.339 204.348C481.092 197.062 476.257 191.083 469.872 186.53ZM433.905 242.131L433.928 242.101C434.693 241.1 435.39 239.71 435.896 237.773L435.934 237.631L435.978 237.49C436.552 235.663 436.907 233.269 436.907 230.197C436.907 227.864 436.596 226.771 436.441 226.428C436.354 226.235 436.278 226.093 436.219 225.994L436.192 225.949L436.178 225.939H424.678L420.774 244.594H431.023C431.086 244.581 431.329 244.516 431.779 244.244C432.29 243.935 433.014 243.325 433.883 242.16L433.905 242.131Z' fill='%23E6007A'/%3E%3Cmask id='path-6-outside-1_873_174' maskUnits='userSpaceOnUse' x='35.8232' y='166.788' width='435' height='156' fill='black'%3E%3Crect fill='white' x='35.8232' y='166.788' width='435' height='156'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M68.9791 168.599H131.11C139.505 168.599 146.942 170.833 153.22 175.445C159.314 179.787 163.927 185.486 167.032 192.461C170.229 199.344 171.832 206.612 171.832 214.222C171.832 221.841 170.226 229.347 167.067 236.713C163.922 244.045 159.566 250.719 154.022 256.724L154.006 256.742L153.989 256.759C148.417 262.651 141.98 267.398 134.699 270.989C127.28 274.646 119.347 276.472 110.95 276.472H93.6573L84.3839 320.675H36.8232L68.9791 168.599ZM90.3873 272.416H110.95C118.745 272.416 126.07 270.727 132.924 267.347C139.778 263.968 145.826 259.507 151.068 253.964C156.309 248.287 160.408 242.001 163.365 235.107C166.322 228.213 167.8 221.251 167.8 214.222C167.8 207.193 166.322 200.501 163.365 194.148C160.543 187.795 156.376 182.658 150.866 178.738C145.356 174.682 138.77 172.655 131.11 172.655H72.2437L41.8028 316.62H81.1139L90.3873 272.416ZM120.037 230.626L120.052 230.607C121.01 229.354 121.81 227.706 122.372 225.559L122.397 225.463L122.427 225.37C123.078 223.296 123.449 220.685 123.449 217.466C123.449 215.01 123.13 213.583 122.802 212.859C122.362 211.884 122.041 211.655 122.042 211.653L121.876 211.558L121.71 211.439C121.399 211.215 121.2 211.18 121.03 211.18H107.569L102.815 233.89H115.587C115.879 233.89 116.444 233.794 117.343 233.252C118.131 232.776 119.04 231.963 120.022 230.646L120.037 230.626ZM97.8464 237.946L104.297 207.125H121.03C122.105 207.125 123.113 207.463 124.054 208.139C124.995 208.68 125.801 209.693 126.473 211.18C127.145 212.667 127.481 214.763 127.481 217.466C127.481 220.981 127.078 224.022 126.271 226.591C125.599 229.159 124.591 231.322 123.247 233.079C122.038 234.701 120.761 235.918 119.417 236.729C118.073 237.54 116.796 237.946 115.587 237.946H97.8464ZM213.354 316.632L213.312 316.611C205.969 312.991 199.733 308.113 194.652 301.981C189.624 295.911 185.822 289.05 183.247 281.426L183.24 281.404C180.681 273.683 179.404 265.679 179.404 257.411C179.404 248.285 180.966 239.311 184.072 230.507L184.081 230.479L184.091 230.452C187.319 221.7 191.743 213.579 197.354 206.101L197.361 206.092C203.099 198.491 209.753 191.867 217.318 186.229C225.025 180.452 233.372 175.936 242.35 172.691C251.395 169.421 260.794 167.788 270.526 167.788C279.899 167.788 288.376 169.574 295.858 173.257C303.215 176.744 309.461 181.561 314.547 187.699C319.59 193.786 323.327 200.732 325.764 208.5C328.321 216.086 329.593 224.016 329.593 232.268C329.593 241.412 327.958 250.4 324.71 259.212C321.616 267.835 317.262 275.95 311.665 283.549L311.655 283.564L311.644 283.578C306.04 291.046 299.46 297.663 291.914 303.425C284.329 309.218 276.037 313.741 267.051 316.989C258.006 320.259 248.606 321.892 238.875 321.892C229.51 321.892 220.99 320.177 213.397 316.652L213.354 316.632ZM320.924 257.817C324.016 249.436 325.561 240.92 325.561 232.268C325.561 224.428 324.352 216.926 321.932 209.761C319.648 202.461 316.153 195.973 311.449 190.295C306.746 184.618 300.966 180.157 294.112 176.913C287.258 173.533 279.396 171.843 270.526 171.843C261.252 171.843 252.315 173.398 243.713 176.507C235.112 179.616 227.115 183.942 219.723 189.484C212.466 194.891 206.082 201.245 200.572 208.544C195.196 215.709 190.962 223.482 187.871 231.863C184.915 240.244 183.436 248.76 183.436 257.411C183.436 265.252 184.646 272.822 187.065 280.121C189.484 287.286 193.046 293.707 197.75 299.384C202.453 305.062 208.233 309.59 215.087 312.97C222.075 316.214 230.005 317.836 238.875 317.836C248.148 317.836 257.086 316.282 265.687 313.173C274.289 310.064 282.218 305.738 289.475 300.196C296.733 294.653 303.05 288.3 308.425 281.135C313.801 273.836 317.968 266.063 320.924 257.817ZM272.24 264.445L272.254 264.426C275.373 259.908 277.667 255.099 279.155 249.987C280.67 244.779 281.412 239.756 281.412 234.904C281.412 230.347 280.678 226.254 279.264 222.58L279.237 222.508L279.212 222.434C277.972 218.806 276.002 216.048 273.327 214.004C270.857 212.115 267.361 210.978 262.462 210.978C256.8 210.978 251.967 212.302 247.832 214.844L247.796 214.865L247.761 214.886C243.447 217.417 239.854 220.785 236.959 225.032C233.968 229.418 231.66 234.18 230.031 239.332C228.525 244.523 227.787 249.532 227.787 254.37C227.787 258.944 228.459 263.14 229.768 266.989C231.136 270.636 233.189 273.504 235.911 275.706C238.394 277.588 241.822 278.702 246.536 278.702C252.349 278.702 257.246 277.37 261.367 274.836C265.718 272.162 269.334 268.708 272.24 264.445ZM233.432 278.905C230.072 276.201 227.586 272.687 225.973 268.361C224.495 264.035 223.755 259.372 223.755 254.37C223.755 249.098 224.562 243.691 226.175 238.149C227.922 232.606 230.408 227.469 233.634 222.738C236.859 218.007 240.891 214.222 245.729 211.383C250.568 208.409 256.145 206.922 262.462 206.922C267.972 206.922 272.407 208.206 275.767 210.775C279.127 213.343 281.546 216.79 283.024 221.116C284.637 225.307 285.444 229.903 285.444 234.904C285.444 240.176 284.637 245.583 283.024 251.126C281.412 256.668 278.925 261.872 275.565 266.739C272.34 271.47 268.308 275.323 263.47 278.297C258.631 281.271 252.987 282.757 246.536 282.757C241.16 282.757 236.792 281.473 233.432 278.905ZM367.309 168.599H429.439C437.835 168.599 445.272 170.833 451.55 175.445C457.644 179.787 462.256 185.485 465.361 192.46C468.559 199.344 470.162 206.611 470.162 214.222C470.162 221.841 468.556 229.347 465.397 236.713C462.252 244.045 457.896 250.719 452.352 256.724L452.335 256.742L452.319 256.759C446.747 262.651 440.31 267.398 433.028 270.989C425.61 274.646 417.677 276.472 409.28 276.472H391.987L382.714 320.675H335.153L367.309 168.599ZM388.717 272.416H409.28C417.075 272.416 424.4 270.727 431.254 267.347C438.108 263.968 444.156 259.507 449.397 253.964C454.639 248.287 458.738 242.001 461.695 235.107C464.651 228.213 466.13 221.251 466.13 214.222C466.13 207.193 464.651 200.501 461.695 194.148C458.872 187.795 454.706 182.658 449.196 178.738C443.686 174.682 437.1 172.655 429.439 172.655H370.574L340.133 316.62H379.444L388.717 272.416ZM418.366 230.626L418.381 230.607C419.34 229.354 420.14 227.706 420.702 225.559L420.727 225.463L420.756 225.37C421.408 223.296 421.779 220.685 421.779 217.466C421.779 215.01 421.46 213.583 421.132 212.859C420.692 211.884 420.371 211.655 420.372 211.653L420.206 211.558L420.04 211.439C419.729 211.215 419.53 211.18 419.36 211.18H405.899L401.145 233.89H413.917C414.209 233.89 414.774 233.794 415.673 233.252C416.461 232.776 417.369 231.963 418.352 230.646L418.366 230.626ZM396.176 237.946L402.627 207.125H419.36C420.435 207.125 421.443 207.463 422.384 208.139C423.324 208.68 424.131 209.693 424.803 211.18C425.475 212.667 425.811 214.763 425.811 217.466C425.811 220.981 425.408 224.022 424.601 226.591C423.929 229.159 422.921 231.322 421.577 233.079C420.368 234.701 419.091 235.918 417.747 236.729C416.403 237.54 415.126 237.946 413.917 237.946H396.176Z'/%3E%3C/mask%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M68.9791 168.599H131.11C139.505 168.599 146.942 170.833 153.22 175.445C159.314 179.787 163.927 185.486 167.032 192.461C170.229 199.344 171.832 206.612 171.832 214.222C171.832 221.841 170.226 229.347 167.067 236.713C163.922 244.045 159.566 250.719 154.022 256.724L154.006 256.742L153.989 256.759C148.417 262.651 141.98 267.398 134.699 270.989C127.28 274.646 119.347 276.472 110.95 276.472H93.6573L84.3839 320.675H36.8232L68.9791 168.599ZM90.3873 272.416H110.95C118.745 272.416 126.07 270.727 132.924 267.347C139.778 263.968 145.826 259.507 151.068 253.964C156.309 248.287 160.408 242.001 163.365 235.107C166.322 228.213 167.8 221.251 167.8 214.222C167.8 207.193 166.322 200.501 163.365 194.148C160.543 187.795 156.376 182.658 150.866 178.738C145.356 174.682 138.77 172.655 131.11 172.655H72.2437L41.8028 316.62H81.1139L90.3873 272.416ZM120.037 230.626L120.052 230.607C121.01 229.354 121.81 227.706 122.372 225.559L122.397 225.463L122.427 225.37C123.078 223.296 123.449 220.685 123.449 217.466C123.449 215.01 123.13 213.583 122.802 212.859C122.362 211.884 122.041 211.655 122.042 211.653L121.876 211.558L121.71 211.439C121.399 211.215 121.2 211.18 121.03 211.18H107.569L102.815 233.89H115.587C115.879 233.89 116.444 233.794 117.343 233.252C118.131 232.776 119.04 231.963 120.022 230.646L120.037 230.626ZM97.8464 237.946L104.297 207.125H121.03C122.105 207.125 123.113 207.463 124.054 208.139C124.995 208.68 125.801 209.693 126.473 211.18C127.145 212.667 127.481 214.763 127.481 217.466C127.481 220.981 127.078 224.022 126.271 226.591C125.599 229.159 124.591 231.322 123.247 233.079C122.038 234.701 120.761 235.918 119.417 236.729C118.073 237.54 116.796 237.946 115.587 237.946H97.8464ZM213.354 316.632L213.312 316.611C205.969 312.991 199.733 308.113 194.652 301.981C189.624 295.911 185.822 289.05 183.247 281.426L183.24 281.404C180.681 273.683 179.404 265.679 179.404 257.411C179.404 248.285 180.966 239.311 184.072 230.507L184.081 230.479L184.091 230.452C187.319 221.7 191.743 213.579 197.354 206.101L197.361 206.092C203.099 198.491 209.753 191.867 217.318 186.229C225.025 180.452 233.372 175.936 242.35 172.691C251.395 169.421 260.794 167.788 270.526 167.788C279.899 167.788 288.376 169.574 295.858 173.257C303.215 176.744 309.461 181.561 314.547 187.699C319.59 193.786 323.327 200.732 325.764 208.5C328.321 216.086 329.593 224.016 329.593 232.268C329.593 241.412 327.958 250.4 324.71 259.212C321.616 267.835 317.262 275.95 311.665 283.549L311.655 283.564L311.644 283.578C306.04 291.046 299.46 297.663 291.914 303.425C284.329 309.218 276.037 313.741 267.051 316.989C258.006 320.259 248.606 321.892 238.875 321.892C229.51 321.892 220.99 320.177 213.397 316.652L213.354 316.632ZM320.924 257.817C324.016 249.436 325.561 240.92 325.561 232.268C325.561 224.428 324.352 216.926 321.932 209.761C319.648 202.461 316.153 195.973 311.449 190.295C306.746 184.618 300.966 180.157 294.112 176.913C287.258 173.533 279.396 171.843 270.526 171.843C261.252 171.843 252.315 173.398 243.713 176.507C235.112 179.616 227.115 183.942 219.723 189.484C212.466 194.891 206.082 201.245 200.572 208.544C195.196 215.709 190.962 223.482 187.871 231.863C184.915 240.244 183.436 248.76 183.436 257.411C183.436 265.252 184.646 272.822 187.065 280.121C189.484 287.286 193.046 293.707 197.75 299.384C202.453 305.062 208.233 309.59 215.087 312.97C222.075 316.214 230.005 317.836 238.875 317.836C248.148 317.836 257.086 316.282 265.687 313.173C274.289 310.064 282.218 305.738 289.475 300.196C296.733 294.653 303.05 288.3 308.425 281.135C313.801 273.836 317.968 266.063 320.924 257.817ZM272.24 264.445L272.254 264.426C275.373 259.908 277.667 255.099 279.155 249.987C280.67 244.779 281.412 239.756 281.412 234.904C281.412 230.347 280.678 226.254 279.264 222.58L279.237 222.508L279.212 222.434C277.972 218.806 276.002 216.048 273.327 214.004C270.857 212.115 267.361 210.978 262.462 210.978C256.8 210.978 251.967 212.302 247.832 214.844L247.796 214.865L247.761 214.886C243.447 217.417 239.854 220.785 236.959 225.032C233.968 229.418 231.66 234.18 230.031 239.332C228.525 244.523 227.787 249.532 227.787 254.37C227.787 258.944 228.459 263.14 229.768 266.989C231.136 270.636 233.189 273.504 235.911 275.706C238.394 277.588 241.822 278.702 246.536 278.702C252.349 278.702 257.246 277.37 261.367 274.836C265.718 272.162 269.334 268.708 272.24 264.445ZM233.432 278.905C230.072 276.201 227.586 272.687 225.973 268.361C224.495 264.035 223.755 259.372 223.755 254.37C223.755 249.098 224.562 243.691 226.175 238.149C227.922 232.606 230.408 227.469 233.634 222.738C236.859 218.007 240.891 214.222 245.729 211.383C250.568 208.409 256.145 206.922 262.462 206.922C267.972 206.922 272.407 208.206 275.767 210.775C279.127 213.343 281.546 216.79 283.024 221.116C284.637 225.307 285.444 229.903 285.444 234.904C285.444 240.176 284.637 245.583 283.024 251.126C281.412 256.668 278.925 261.872 275.565 266.739C272.34 271.47 268.308 275.323 263.47 278.297C258.631 281.271 252.987 282.757 246.536 282.757C241.16 282.757 236.792 281.473 233.432 278.905ZM367.309 168.599H429.439C437.835 168.599 445.272 170.833 451.55 175.445C457.644 179.787 462.256 185.485 465.361 192.46C468.559 199.344 470.162 206.611 470.162 214.222C470.162 221.841 468.556 229.347 465.397 236.713C462.252 244.045 457.896 250.719 452.352 256.724L452.335 256.742L452.319 256.759C446.747 262.651 440.31 267.398 433.028 270.989C425.61 274.646 417.677 276.472 409.28 276.472H391.987L382.714 320.675H335.153L367.309 168.599ZM388.717 272.416H409.28C417.075 272.416 424.4 270.727 431.254 267.347C438.108 263.968 444.156 259.507 449.397 253.964C454.639 248.287 458.738 242.001 461.695 235.107C464.651 228.213 466.13 221.251 466.13 214.222C466.13 207.193 464.651 200.501 461.695 194.148C458.872 187.795 454.706 182.658 449.196 178.738C443.686 174.682 437.1 172.655 429.439 172.655H370.574L340.133 316.62H379.444L388.717 272.416ZM418.366 230.626L418.381 230.607C419.34 229.354 420.14 227.706 420.702 225.559L420.727 225.463L420.756 225.37C421.408 223.296 421.779 220.685 421.779 217.466C421.779 215.01 421.46 213.583 421.132 212.859C420.692 211.884 420.371 211.655 420.372 211.653L420.206 211.558L420.04 211.439C419.729 211.215 419.53 211.18 419.36 211.18H405.899L401.145 233.89H413.917C414.209 233.89 414.774 233.794 415.673 233.252C416.461 232.776 417.369 231.963 418.352 230.646L418.366 230.626ZM396.176 237.946L402.627 207.125H419.36C420.435 207.125 421.443 207.463 422.384 208.139C423.324 208.68 424.131 209.693 424.803 211.18C425.475 212.667 425.811 214.763 425.811 217.466C425.811 220.981 425.408 224.022 424.601 226.591C423.929 229.159 422.921 231.322 421.577 233.079C420.368 234.701 419.091 235.918 417.747 236.729C416.403 237.54 415.126 237.946 413.917 237.946H396.176Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M68.9791 168.599H131.11C139.505 168.599 146.942 170.833 153.22 175.445C159.314 179.787 163.927 185.486 167.032 192.461C170.229 199.344 171.832 206.612 171.832 214.222C171.832 221.841 170.226 229.347 167.067 236.713C163.922 244.045 159.566 250.719 154.022 256.724L154.006 256.742L153.989 256.759C148.417 262.651 141.98 267.398 134.699 270.989C127.28 274.646 119.347 276.472 110.95 276.472H93.6573L84.3839 320.675H36.8232L68.9791 168.599ZM90.3873 272.416H110.95C118.745 272.416 126.07 270.727 132.924 267.347C139.778 263.968 145.826 259.507 151.068 253.964C156.309 248.287 160.408 242.001 163.365 235.107C166.322 228.213 167.8 221.251 167.8 214.222C167.8 207.193 166.322 200.501 163.365 194.148C160.543 187.795 156.376 182.658 150.866 178.738C145.356 174.682 138.77 172.655 131.11 172.655H72.2437L41.8028 316.62H81.1139L90.3873 272.416ZM120.037 230.626L120.052 230.607C121.01 229.354 121.81 227.706 122.372 225.559L122.397 225.463L122.427 225.37C123.078 223.296 123.449 220.685 123.449 217.466C123.449 215.01 123.13 213.583 122.802 212.859C122.362 211.884 122.041 211.655 122.042 211.653L121.876 211.558L121.71 211.439C121.399 211.215 121.2 211.18 121.03 211.18H107.569L102.815 233.89H115.587C115.879 233.89 116.444 233.794 117.343 233.252C118.131 232.776 119.04 231.963 120.022 230.646L120.037 230.626ZM97.8464 237.946L104.297 207.125H121.03C122.105 207.125 123.113 207.463 124.054 208.139C124.995 208.68 125.801 209.693 126.473 211.18C127.145 212.667 127.481 214.763 127.481 217.466C127.481 220.981 127.078 224.022 126.271 226.591C125.599 229.159 124.591 231.322 123.247 233.079C122.038 234.701 120.761 235.918 119.417 236.729C118.073 237.54 116.796 237.946 115.587 237.946H97.8464ZM213.354 316.632L213.312 316.611C205.969 312.991 199.733 308.113 194.652 301.981C189.624 295.911 185.822 289.05 183.247 281.426L183.24 281.404C180.681 273.683 179.404 265.679 179.404 257.411C179.404 248.285 180.966 239.311 184.072 230.507L184.081 230.479L184.091 230.452C187.319 221.7 191.743 213.579 197.354 206.101L197.361 206.092C203.099 198.491 209.753 191.867 217.318 186.229C225.025 180.452 233.372 175.936 242.35 172.691C251.395 169.421 260.794 167.788 270.526 167.788C279.899 167.788 288.376 169.574 295.858 173.257C303.215 176.744 309.461 181.561 314.547 187.699C319.59 193.786 323.327 200.732 325.764 208.5C328.321 216.086 329.593 224.016 329.593 232.268C329.593 241.412 327.958 250.4 324.71 259.212C321.616 267.835 317.262 275.95 311.665 283.549L311.655 283.564L311.644 283.578C306.04 291.046 299.46 297.663 291.914 303.425C284.329 309.218 276.037 313.741 267.051 316.989C258.006 320.259 248.606 321.892 238.875 321.892C229.51 321.892 220.99 320.177 213.397 316.652L213.354 316.632ZM320.924 257.817C324.016 249.436 325.561 240.92 325.561 232.268C325.561 224.428 324.352 216.926 321.932 209.761C319.648 202.461 316.153 195.973 311.449 190.295C306.746 184.618 300.966 180.157 294.112 176.913C287.258 173.533 279.396 171.843 270.526 171.843C261.252 171.843 252.315 173.398 243.713 176.507C235.112 179.616 227.115 183.942 219.723 189.484C212.466 194.891 206.082 201.245 200.572 208.544C195.196 215.709 190.962 223.482 187.871 231.863C184.915 240.244 183.436 248.76 183.436 257.411C183.436 265.252 184.646 272.822 187.065 280.121C189.484 287.286 193.046 293.707 197.75 299.384C202.453 305.062 208.233 309.59 215.087 312.97C222.075 316.214 230.005 317.836 238.875 317.836C248.148 317.836 257.086 316.282 265.687 313.173C274.289 310.064 282.218 305.738 289.475 300.196C296.733 294.653 303.05 288.3 308.425 281.135C313.801 273.836 317.968 266.063 320.924 257.817ZM272.24 264.445L272.254 264.426C275.373 259.908 277.667 255.099 279.155 249.987C280.67 244.779 281.412 239.756 281.412 234.904C281.412 230.347 280.678 226.254 279.264 222.58L279.237 222.508L279.212 222.434C277.972 218.806 276.002 216.048 273.327 214.004C270.857 212.115 267.361 210.978 262.462 210.978C256.8 210.978 251.967 212.302 247.832 214.844L247.796 214.865L247.761 214.886C243.447 217.417 239.854 220.785 236.959 225.032C233.968 229.418 231.66 234.18 230.031 239.332C228.525 244.523 227.787 249.532 227.787 254.37C227.787 258.944 228.459 263.14 229.768 266.989C231.136 270.636 233.189 273.504 235.911 275.706C238.394 277.588 241.822 278.702 246.536 278.702C252.349 278.702 257.246 277.37 261.367 274.836C265.718 272.162 269.334 268.708 272.24 264.445ZM233.432 278.905C230.072 276.201 227.586 272.687 225.973 268.361C224.495 264.035 223.755 259.372 223.755 254.37C223.755 249.098 224.562 243.691 226.175 238.149C227.922 232.606 230.408 227.469 233.634 222.738C236.859 218.007 240.891 214.222 245.729 211.383C250.568 208.409 256.145 206.922 262.462 206.922C267.972 206.922 272.407 208.206 275.767 210.775C279.127 213.343 281.546 216.79 283.024 221.116C284.637 225.307 285.444 229.903 285.444 234.904C285.444 240.176 284.637 245.583 283.024 251.126C281.412 256.668 278.925 261.872 275.565 266.739C272.34 271.47 268.308 275.323 263.47 278.297C258.631 281.271 252.987 282.757 246.536 282.757C241.16 282.757 236.792 281.473 233.432 278.905ZM367.309 168.599H429.439C437.835 168.599 445.272 170.833 451.55 175.445C457.644 179.787 462.256 185.485 465.361 192.46C468.559 199.344 470.162 206.611 470.162 214.222C470.162 221.841 468.556 229.347 465.397 236.713C462.252 244.045 457.896 250.719 452.352 256.724L452.335 256.742L452.319 256.759C446.747 262.651 440.31 267.398 433.028 270.989C425.61 274.646 417.677 276.472 409.28 276.472H391.987L382.714 320.675H335.153L367.309 168.599ZM388.717 272.416H409.28C417.075 272.416 424.4 270.727 431.254 267.347C438.108 263.968 444.156 259.507 449.397 253.964C454.639 248.287 458.738 242.001 461.695 235.107C464.651 228.213 466.13 221.251 466.13 214.222C466.13 207.193 464.651 200.501 461.695 194.148C458.872 187.795 454.706 182.658 449.196 178.738C443.686 174.682 437.1 172.655 429.439 172.655H370.574L340.133 316.62H379.444L388.717 272.416ZM418.366 230.626L418.381 230.607C419.34 229.354 420.14 227.706 420.702 225.559L420.727 225.463L420.756 225.37C421.408 223.296 421.779 220.685 421.779 217.466C421.779 215.01 421.46 213.583 421.132 212.859C420.692 211.884 420.371 211.655 420.372 211.653L420.206 211.558L420.04 211.439C419.729 211.215 419.53 211.18 419.36 211.18H405.899L401.145 233.89H413.917C414.209 233.89 414.774 233.794 415.673 233.252C416.461 232.776 417.369 231.963 418.352 230.646L418.366 230.626ZM396.176 237.946L402.627 207.125H419.36C420.435 207.125 421.443 207.463 422.384 208.139C423.324 208.68 424.131 209.693 424.803 211.18C425.475 212.667 425.811 214.763 425.811 217.466C425.811 220.981 425.408 224.022 424.601 226.591C423.929 229.159 422.921 231.322 421.577 233.079C420.368 234.701 419.091 235.918 417.747 236.729C416.403 237.54 415.126 237.946 413.917 237.946H396.176Z' stroke='white' stroke-width='0.3' mask='url(%23path-6-outside-1_873_174)'/%3E%3C/g%3E%3Cdefs%3E%3CradialGradient id='paint0_radial_873_174' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(-62.8 -86.4) rotate(70.436) scale(686.854 394.059)'%3E%3Cstop stop-color='%236335EC'/%3E%3Cstop offset='1' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='paint1_radial_873_174' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(640.4 677.6) rotate(-116.448) scale(1055.25 662.094)'%3E%3Cstop stop-color='%23E6007A'/%3E%3Cstop offset='1' stop-opacity='0'/%3E%3C/radialGradient%3E%3CclipPath id='clip0_873_174'%3E%3Crect width='512' height='512' rx='256' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <title>Pop CLI Signing Portal</title>
-  <script type="module" crossorigin>var e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,v,m,g,y,b,w,x,k,E,S,C,_,A,N,P,j,$,O,R,M,T,L,I,z,D,B,U,F,H,V,W,q,K,Y=Object.defineProperty,Q=Object.getPrototypeOf,G=Reflect.get,J=e=>{throw TypeError(e)},X=(e,t,n)=>((e,t,n)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Z=(e,t,n)=>t.has(e)||J("Cannot "+n),ee=(e,t,n)=>(Z(e,t,"read from private field"),n?n.call(e):t.get(e)),te=(e,t,n)=>t.has(e)?J("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ne=(e,t,n,r)=>(Z(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),re=(e,t,n)=>(Z(e,t,"access private method"),n),oe=(e,t,n)=>G(Q(e),n,t);function ie(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var le={exports:{}},ce={},ue={exports:{}},de={},fe=Symbol.for("react.element"),pe=Symbol.for("react.portal"),he=Symbol.for("react.fragment"),ve=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),ge=Symbol.for("react.provider"),ye=Symbol.for("react.context"),be=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),xe=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),Ee=Symbol.iterator;var Se={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ce=Object.assign,_e={};function Ae(e,t,n){this.props=e,this.context=t,this.refs=_e,this.updater=n||Se}function Ne(){}function Pe(e,t,n){this.props=e,this.context=t,this.refs=_e,this.updater=n||Se}Ae.prototype.isReactComponent={},Ae.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},Ae.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},Ne.prototype=Ae.prototype;var je=Pe.prototype=new Ne;je.constructor=Pe,Ce(je,Ae.prototype),je.isPureReactComponent=!0;var $e=Array.isArray,Oe=Object.prototype.hasOwnProperty,Re={current:null},Me={key:!0,ref:!0,__self:!0,__source:!0};function Te(e,t,n){var r,o={},i=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)Oe.call(t,r)&&!Me.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(1===a)o.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===o[r]&&(o[r]=a[r]);return{$$typeof:fe,type:e,key:i,ref:s,props:o,_owner:Re.current}}function Le(e){return"object"==typeof e&&null!==e&&e.$$typeof===fe}var Ie=/\/+/g;function ze(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function De(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case fe:case pe:s=!0}}if(s)return o=o(s=e),e=""===r?"."+ze(s,0):r,$e(o)?(n="",null!=e&&(n=e.replace(Ie,"$&/")+"/"),De(o,t,n,"",(function(e){return e}))):null!=o&&(Le(o)&&(o=function(e,t){return{$$typeof:fe,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ie,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=""===r?".":r+":",$e(e))for(var a=0;a<e.length;a++){var l=r+ze(i=e[a],a);s+=De(i,t,n,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Ee&&e[Ee]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),a=0;!(i=e.next()).done;)s+=De(i=i.value,t,n,l=r+ze(i,a++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Be(e,t,n){if(null==e)return e;var r=[],o=0;return De(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function Ue(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var Fe={current:null},He={transition:null},Ve={ReactCurrentDispatcher:Fe,ReactCurrentBatchConfig:He,ReactCurrentOwner:Re};function We(){throw Error("act(...) is not supported in production builds of React.")}de.Children={map:Be,forEach:function(e,t,n){Be(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return Be(e,(function(){t++})),t},toArray:function(e){return Be(e,(function(e){return e}))||[]},only:function(e){if(!Le(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},de.Component=Ae,de.Fragment=he,de.Profiler=me,de.PureComponent=Pe,de.StrictMode=ve,de.Suspense=we,de.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ve,de.act=We,de.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ce({},e.props),o=e.key,i=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,s=Re.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Oe.call(t,l)&&!Me.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==a?a[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:fe,type:e.type,key:o,ref:i,props:r,_owner:s}},de.createContext=function(e){return(e={$$typeof:ye,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:ge,_context:e},e.Consumer=e},de.createElement=Te,de.createFactory=function(e){var t=Te.bind(null,e);return t.type=e,t},de.createRef=function(){return{current:null}},de.forwardRef=function(e){return{$$typeof:be,render:e}},de.isValidElement=Le,de.lazy=function(e){return{$$typeof:ke,_payload:{_status:-1,_result:e},_init:Ue}},de.memo=function(e,t){return{$$typeof:xe,type:e,compare:void 0===t?null:t}},de.startTransition=function(e){var t=He.transition;He.transition={};try{e()}finally{He.transition=t}},de.unstable_act=We,de.useCallback=function(e,t){return Fe.current.useCallback(e,t)},de.useContext=function(e){return Fe.current.useContext(e)},de.useDebugValue=function(){},de.useDeferredValue=function(e){return Fe.current.useDeferredValue(e)},de.useEffect=function(e,t){return Fe.current.useEffect(e,t)},de.useId=function(){return Fe.current.useId()},de.useImperativeHandle=function(e,t,n){return Fe.current.useImperativeHandle(e,t,n)},de.useInsertionEffect=function(e,t){return Fe.current.useInsertionEffect(e,t)},de.useLayoutEffect=function(e,t){return Fe.current.useLayoutEffect(e,t)},de.useMemo=function(e,t){return Fe.current.useMemo(e,t)},de.useReducer=function(e,t,n){return Fe.current.useReducer(e,t,n)},de.useRef=function(e){return Fe.current.useRef(e)},de.useState=function(e){return Fe.current.useState(e)},de.useSyncExternalStore=function(e,t,n){return Fe.current.useSyncExternalStore(e,t,n)},de.useTransition=function(){return Fe.current.useTransition()},de.version="18.3.1",ue.exports=de;var qe=ue.exports;const Ke=ae(qe),Ye=ie({__proto__:null,default:Ke},[qe]);var Qe=qe,Ge=Symbol.for("react.element"),Je=Symbol.for("react.fragment"),Xe=Object.prototype.hasOwnProperty,Ze=Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,et={key:!0,ref:!0,__self:!0,__source:!0};function tt(e,t,n){var r,o={},i=null,s=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(s=t.ref),t)Xe.call(t,r)&&!et.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:Ge,type:e,key:i,ref:s,props:o,_owner:Ze.current}}ce.Fragment=Je,ce.jsx=tt,ce.jsxs=tt,le.exports=ce;var nt=le.exports,rt={},ot={exports:{}},it={},st={exports:{}},at={};!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var a=2*(r+1)-1,l=e[a],c=a+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,p=!1,h=!1,v=!1,m="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(c);null!==o;){if(null===o.callback)r(c);else{if(!(o.startTime<=e))break;r(c),o.sortIndex=o.expirationTime,t(l,o)}o=n(c)}}function w(e){if(v=!1,b(e),!h)if(null!==n(l))h=!0,O(x);else{var t=n(c);null!==t&&R(w,t.startTime-e)}}function x(t,o){h=!1,v&&(v=!1,g(C),C=-1),p=!0;var i=f;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!N());){var s=d.callback;if("function"==typeof s){d.callback=null,f=d.priorityLevel;var a=s(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof a?d.callback=a:d===n(l)&&r(l),b(o)}else r(l);d=n(l)}if(null!==d)var u=!0;else{var m=n(c);null!==m&&R(w,m.startTime-o),u=!1}return u}finally{d=null,f=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,E=!1,S=null,C=-1,_=5,A=-1;function N(){return!(e.unstable_now()-A<_)}function P(){if(null!==S){var t=e.unstable_now();A=t;var n=!0;try{n=S(!0,t)}finally{n?k():(E=!1,S=null)}}else E=!1}if("function"==typeof y)k=function(){y(P)};else if("undefined"!=typeof MessageChannel){var j=new MessageChannel,$=j.port2;j.port1.onmessage=P,k=function(){$.postMessage(null)}}else k=function(){m(P,0)};function O(e){S=e,E||(E=!0,k())}function R(t,n){C=m((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,O(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,o,i){var s=e.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?s+i:s:i=s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:u++,callback:o,priorityLevel:r,startTime:i,expirationTime:a=i+a,sortIndex:-1},i>s?(r.sortIndex=i,t(c,r),null===n(l)&&r===n(c)&&(v?(g(C),C=-1):v=!0,R(w,i-s))):(r.sortIndex=a,t(l,r),h||p||(h=!0,O(x))),r},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(at),st.exports=at;var lt=st.exports,ct=qe,ut=lt;function dt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ft=new Set,pt={};function ht(e,t){vt(e,t),vt(e+"Capture",t)}function vt(e,t){for(pt[e]=t,e=0;e<t.length;e++)ft.add(t[e])}var mt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),gt=Object.prototype.hasOwnProperty,yt=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,bt={},wt={};function xt(e,t,n,r,o,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){kt[e]=new xt(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];kt[t]=new xt(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){kt[e]=new xt(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){kt[e]=new xt(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){kt[e]=new xt(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){kt[e]=new xt(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){kt[e]=new xt(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){kt[e]=new xt(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){kt[e]=new xt(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Et=/[\-:]([a-z])/g;function St(e){return e[1].toUpperCase()}function Ct(e,t,n,r){var o=kt.hasOwnProperty(t)?kt[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!gt.call(wt,e)||!gt.call(bt,e)&&(yt.test(e)?wt[e]=!0:(bt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Et,St);kt[t]=new xt(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Et,St);kt[t]=new xt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Et,St);kt[t]=new xt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){kt[e]=new xt(e,1,!1,e.toLowerCase(),null,!1,!1)})),kt.xlinkHref=new xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){kt[e]=new xt(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _t=ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,At=Symbol.for("react.element"),Nt=Symbol.for("react.portal"),Pt=Symbol.for("react.fragment"),jt=Symbol.for("react.strict_mode"),$t=Symbol.for("react.profiler"),Ot=Symbol.for("react.provider"),Rt=Symbol.for("react.context"),Mt=Symbol.for("react.forward_ref"),Tt=Symbol.for("react.suspense"),Lt=Symbol.for("react.suspense_list"),It=Symbol.for("react.memo"),zt=Symbol.for("react.lazy"),Dt=Symbol.for("react.offscreen"),Bt=Symbol.iterator;function Ut(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Bt&&e[Bt]||e["@@iterator"])?e:null}var Ft,Ht=Object.assign;function Vt(e){if(void 0===Ft)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ft=t&&t[1]||""}return"\n"+Ft+e}var Wt=!1;function qt(e,t){if(!e||Wt)return"";Wt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var o=c.stack.split("\n"),i=r.stack.split("\n"),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(1!==s||1!==a)do{if(s--,0>--a||o[s]!==i[a]){var l="\n"+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{Wt=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vt(e):""}function Kt(e){switch(e.tag){case 5:return Vt(e.type);case 16:return Vt("Lazy");case 13:return Vt("Suspense");case 19:return Vt("SuspenseList");case 0:case 2:case 15:return e=qt(e.type,!1);case 11:return e=qt(e.type.render,!1);case 1:return e=qt(e.type,!0);default:return""}}function Yt(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Pt:return"Fragment";case Nt:return"Portal";case $t:return"Profiler";case jt:return"StrictMode";case Tt:return"Suspense";case Lt:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Rt:return(e.displayName||"Context")+".Consumer";case Ot:return(e._context.displayName||"Context")+".Provider";case Mt:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case It:return null!==(t=e.displayName||null)?t:Yt(e.type)||"Memo";case zt:t=e._payload,e=e._init;try{return Yt(e(t))}catch(n){}}return null}function Qt(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Yt(t);case 8:return t===jt?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Gt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Jt(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Xt(e){e._valueTracker||(e._valueTracker=function(e){var t=Jt(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Zt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jt(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function en(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function tn(e,t){var n=t.checked;return Ht({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function nn(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Gt(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function rn(e,t){null!=(t=t.checked)&&Ct(e,"checked",t,!1)}function on(e,t){rn(e,t);var n=Gt(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?an(e,t.type,n):t.hasOwnProperty("defaultValue")&&an(e,t.type,Gt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function sn(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function an(e,t,n){"number"===t&&en(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ln=Array.isArray;function cn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Gt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function un(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(dt(91));return Ht({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function dn(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(dt(92));if(ln(n)){if(1<n.length)throw Error(dt(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Gt(n)}}function fn(e,t){var n=Gt(t.value),r=Gt(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function pn(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function hn(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function vn(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?hn(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var mn,gn,yn=(gn=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((mn=mn||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=mn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return gn(e,t)}))}:gn);function bn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var wn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xn=["Webkit","ms","Moz","O"];function kn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||wn.hasOwnProperty(e)&&wn[e]?(""+t).trim():t+"px"}function En(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=kn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(wn).forEach((function(e){xn.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wn[t]=wn[e]}))}));var Sn=Ht({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Cn(e,t){if(t){if(Sn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(dt(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(dt(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(dt(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(dt(62))}}function _n(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var An=null;function Nn(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Pn=null,jn=null,$n=null;function On(e){if(e=_s(e)){if("function"!=typeof Pn)throw Error(dt(280));var t=e.stateNode;t&&(t=Ns(t),Pn(e.stateNode,e.type,t))}}function Rn(e){jn?$n?$n.push(e):$n=[e]:jn=e}function Mn(){if(jn){var e=jn,t=$n;if($n=jn=null,On(e),t)for(e=0;e<t.length;e++)On(t[e])}}function Tn(e,t){return e(t)}function Ln(){}var In=!1;function zn(e,t,n){if(In)return e(t,n);In=!0;try{return Tn(e,t,n)}finally{In=!1,(null!==jn||null!==$n)&&(Ln(),Mn())}}function Dn(e,t){var n=e.stateNode;if(null===n)return null;var r=Ns(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(dt(231,t,typeof n));return n}var Bn=!1;if(mt)try{var Un={};Object.defineProperty(Un,"passive",{get:function(){Bn=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch(gn){Bn=!1}function Fn(e,t,n,r,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Hn=!1,Vn=null,Wn=!1,qn=null,Kn={onError:function(e){Hn=!0,Vn=e}};function Yn(e,t,n,r,o,i,s,a,l){Hn=!1,Vn=null,Fn.apply(Kn,arguments)}function Qn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Gn(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Jn(e){if(Qn(e)!==e)throw Error(dt(188))}function Xn(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Qn(e)))throw Error(dt(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Jn(o),e;if(i===r)return Jn(o),t;i=i.sibling}throw Error(dt(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(dt(189))}}if(n.alternate!==r)throw Error(dt(190))}if(3!==n.tag)throw Error(dt(188));return n.stateNode.current===n?e:t}(e))?Zn(e):null}function Zn(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Zn(e);if(null!==t)return t;e=e.sibling}return null}var er=ut.unstable_scheduleCallback,tr=ut.unstable_cancelCallback,nr=ut.unstable_shouldYield,rr=ut.unstable_requestPaint,or=ut.unstable_now,ir=ut.unstable_getCurrentPriorityLevel,sr=ut.unstable_ImmediatePriority,ar=ut.unstable_UserBlockingPriority,lr=ut.unstable_NormalPriority,cr=ut.unstable_LowPriority,ur=ut.unstable_IdlePriority,dr=null,fr=null;var pr=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(hr(e)/vr|0)|0},hr=Math.log,vr=Math.LN2;var mr=64,gr=4194304;function yr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function br(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~o;0!==a?r=yr(a):0!==(i&=s)&&(r=yr(i))}else 0!==(s=n&~o)?r=yr(s):0!==i&&(r=yr(i));if(0===r)return 0;if(0!==t&&t!==r&&!(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&4194240&i))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-pr(t)),r|=e[n],t&=~o;return r}function wr(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function xr(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function kr(){var e=mr;return!(4194240&(mr<<=1))&&(mr=64),e}function Er(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Sr(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-pr(t)]=n}function Cr(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pr(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var _r=0;function Ar(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Nr,Pr,jr,$r,Or,Rr=!1,Mr=[],Tr=null,Lr=null,Ir=null,zr=new Map,Dr=new Map,Br=[],Ur="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Fr(e,t){switch(e){case"focusin":case"focusout":Tr=null;break;case"dragenter":case"dragleave":Lr=null;break;case"mouseover":case"mouseout":Ir=null;break;case"pointerover":case"pointerout":zr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dr.delete(t.pointerId)}}function Hr(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=_s(t))&&Pr(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Vr(e){var t=Cs(e.target);if(null!==t){var n=Qn(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Gn(n)))return e.blockedOn=t,void Or(e.priority,(function(){jr(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Wr(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=no(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=_s(n))&&Pr(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);An=r,n.target.dispatchEvent(r),An=null,t.shift()}return!0}function qr(e,t,n){Wr(e)&&n.delete(t)}function Kr(){Rr=!1,null!==Tr&&Wr(Tr)&&(Tr=null),null!==Lr&&Wr(Lr)&&(Lr=null),null!==Ir&&Wr(Ir)&&(Ir=null),zr.forEach(qr),Dr.forEach(qr)}function Yr(e,t){e.blockedOn===t&&(e.blockedOn=null,Rr||(Rr=!0,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,Kr)))}function Qr(e){function t(t){return Yr(t,e)}if(0<Mr.length){Yr(Mr[0],e);for(var n=1;n<Mr.length;n++){var r=Mr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tr&&Yr(Tr,e),null!==Lr&&Yr(Lr,e),null!==Ir&&Yr(Ir,e),zr.forEach(t),Dr.forEach(t),n=0;n<Br.length;n++)(r=Br[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Br.length&&null===(n=Br[0]).blockedOn;)Vr(n),null===n.blockedOn&&Br.shift()}var Gr=_t.ReactCurrentBatchConfig,Jr=!0;function Xr(e,t,n,r){var o=_r,i=Gr.transition;Gr.transition=null;try{_r=1,eo(e,t,n,r)}finally{_r=o,Gr.transition=i}}function Zr(e,t,n,r){var o=_r,i=Gr.transition;Gr.transition=null;try{_r=4,eo(e,t,n,r)}finally{_r=o,Gr.transition=i}}function eo(e,t,n,r){if(Jr){var o=no(e,t,n,r);if(null===o)Ji(e,t,r,to,n),Fr(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Tr=Hr(Tr,e,t,n,r,o),!0;case"dragenter":return Lr=Hr(Lr,e,t,n,r,o),!0;case"mouseover":return Ir=Hr(Ir,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return zr.set(i,Hr(zr.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Dr.set(i,Hr(Dr.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Fr(e,r),4&t&&-1<Ur.indexOf(e)){for(;null!==o;){var i=_s(o);if(null!==i&&Nr(i),null===(i=no(e,t,n,r))&&Ji(e,t,r,to,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Ji(e,t,r,null,n)}}var to=null;function no(e,t,n,r){if(to=null,null!==(e=Cs(e=Nn(r))))if(null===(t=Qn(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Gn(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return to=e,null}function ro(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ir()){case sr:return 1;case ar:return 4;case lr:case cr:return 16;case ur:return 536870912;default:return 16}default:return 16}}var oo=null,io=null,so=null;function ao(){if(so)return so;var e,t,n=io,r=n.length,o="value"in oo?oo.value:oo.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===o[i-t];t++);return so=o.slice(e,1<t?1-t:void 0)}function lo(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function co(){return!0}function uo(){return!1}function fo(e){function t(t,n,r,o,i){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(o):o[s]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?co:uo,this.isPropagationStopped=uo,this}return Ht(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=co)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=co)},persist:function(){},isPersistent:co}),t}var po,ho,vo,mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},go=fo(mo),yo=Ht({},mo,{view:0,detail:0}),bo=fo(yo),wo=Ht({},yo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oo,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==vo&&(vo&&"mousemove"===e.type?(po=e.screenX-vo.screenX,ho=e.screenY-vo.screenY):ho=po=0,vo=e),po)},movementY:function(e){return"movementY"in e?e.movementY:ho}}),xo=fo(wo),ko=fo(Ht({},wo,{dataTransfer:0})),Eo=fo(Ht({},yo,{relatedTarget:0})),So=fo(Ht({},mo,{animationName:0,elapsedTime:0,pseudoElement:0})),Co=Ht({},mo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_o=fo(Co),Ao=fo(Ht({},mo,{data:0})),No={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Po={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},jo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $o(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=jo[e])&&!!t[e]}function Oo(){return $o}var Ro=Ht({},yo,{key:function(e){if(e.key){var t=No[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=lo(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Po[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oo,charCode:function(e){return"keypress"===e.type?lo(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?lo(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Mo=fo(Ro),To=fo(Ht({},wo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Lo=fo(Ht({},yo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oo})),Io=fo(Ht({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0})),zo=Ht({},wo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Do=fo(zo),Bo=[9,13,27,32],Uo=mt&&"CompositionEvent"in window,Fo=null;mt&&"documentMode"in document&&(Fo=document.documentMode);var Ho=mt&&"TextEvent"in window&&!Fo,Vo=mt&&(!Uo||Fo&&8<Fo&&11>=Fo),Wo=String.fromCharCode(32),qo=!1;function Ko(e,t){switch(e){case"keyup":return-1!==Bo.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yo(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Qo=!1;var Go={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Jo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Go[e.type]:"textarea"===t}function Xo(e,t,n,r){Rn(r),0<(t=Zi(t,"onChange")).length&&(n=new go("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zo=null,ei=null;function ti(e){Wi(e,0)}function ni(e){if(Zt(As(e)))return e}function ri(e,t){if("change"===e)return t}var oi=!1;if(mt){var ii;if(mt){var si="oninput"in document;if(!si){var ai=document.createElement("div");ai.setAttribute("oninput","return;"),si="function"==typeof ai.oninput}ii=si}else ii=!1;oi=ii&&(!document.documentMode||9<document.documentMode)}function li(){Zo&&(Zo.detachEvent("onpropertychange",ci),ei=Zo=null)}function ci(e){if("value"===e.propertyName&&ni(ei)){var t=[];Xo(t,ei,e,Nn(e)),zn(ti,t)}}function ui(e,t,n){"focusin"===e?(li(),ei=n,(Zo=t).attachEvent("onpropertychange",ci)):"focusout"===e&&li()}function di(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ni(ei)}function fi(e,t){if("click"===e)return ni(t)}function pi(e,t){if("input"===e||"change"===e)return ni(t)}var hi="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function vi(e,t){if(hi(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!gt.call(t,o)||!hi(e[o],t[o]))return!1}return!0}function mi(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gi(e,t){var n,r=mi(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=mi(r)}}function yi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?yi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function bi(){for(var e=window,t=en();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=en((e=t.contentWindow).document)}return t}function wi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function xi(e){var t=bi(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&yi(n.ownerDocument.documentElement,n)){if(null!==r&&wi(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=gi(n,i);var s=gi(n,r);o&&s&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ki=mt&&"documentMode"in document&&11>=document.documentMode,Ei=null,Si=null,Ci=null,_i=!1;function Ai(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;_i||null==Ei||Ei!==en(r)||("selectionStart"in(r=Ei)&&wi(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Ci&&vi(Ci,r)||(Ci=r,0<(r=Zi(Si,"onSelect")).length&&(t=new go("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ei)))}function Ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pi={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionend:Ni("Transition","TransitionEnd")},ji={},$i={};function Oi(e){if(ji[e])return ji[e];if(!Pi[e])return e;var t,n=Pi[e];for(t in n)if(n.hasOwnProperty(t)&&t in $i)return ji[e]=n[t];return e}mt&&($i=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);var Ri=Oi("animationend"),Mi=Oi("animationiteration"),Ti=Oi("animationstart"),Li=Oi("transitionend"),Ii=new Map,zi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Di(e,t){Ii.set(e,t),ht(t,[e])}for(var Bi=0;Bi<zi.length;Bi++){var Ui=zi[Bi];Di(Ui.toLowerCase(),"on"+(Ui[0].toUpperCase()+Ui.slice(1)))}Di(Ri,"onAnimationEnd"),Di(Mi,"onAnimationIteration"),Di(Ti,"onAnimationStart"),Di("dblclick","onDoubleClick"),Di("focusin","onFocus"),Di("focusout","onBlur"),Di(Li,"onTransitionEnd"),vt("onMouseEnter",["mouseout","mouseover"]),vt("onMouseLeave",["mouseout","mouseover"]),vt("onPointerEnter",["pointerout","pointerover"]),vt("onPointerLeave",["pointerout","pointerover"]),ht("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ht("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ht("onBeforeInput",["compositionend","keypress","textInput","paste"]),ht("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ht("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ht("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Hi=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fi));function Vi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,a,l){if(Yn.apply(this,arguments),Hn){if(!Hn)throw Error(dt(198));var c=Vn;Hn=!1,Vn=null,Wn||(Wn=!0,qn=c)}}(r,t,void 0,e),e.currentTarget=null}function Wi(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;Vi(o,a,c),i=l}else for(s=0;s<r.length;s++){if(l=(a=r[s]).instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Vi(o,a,c),i=l}}}if(Wn)throw e=qn,Wn=!1,qn=null,e}function qi(e,t){var n=t[ks];void 0===n&&(n=t[ks]=new Set);var r=e+"__bubble";n.has(r)||(Gi(t,e,2,!1),n.add(r))}function Ki(e,t,n){var r=0;t&&(r|=4),Gi(n,e,r,t)}var Yi="_reactListening"+Math.random().toString(36).slice(2);function Qi(e){if(!e[Yi]){e[Yi]=!0,ft.forEach((function(t){"selectionchange"!==t&&(Hi.has(t)||Ki(t,!1,e),Ki(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Yi]||(t[Yi]=!0,Ki("selectionchange",!1,t))}}function Gi(e,t,n,r){switch(ro(t)){case 1:var o=Xr;break;case 4:o=Zr;break;default:o=eo}n=o.bind(null,t,n,e),o=void 0,!Bn||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ji(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===o||8===a.nodeType&&a.parentNode===o)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;s=s.return}for(;null!==a;){if(null===(s=Cs(a)))return;if(5===(l=s.tag)||6===l){r=i=s;continue e}a=a.parentNode}}r=r.return}zn((function(){var r=i,o=Nn(n),s=[];e:{var a=Ii.get(e);if(void 0!==a){var l=go,c=e;switch(e){case"keypress":if(0===lo(n))break e;case"keydown":case"keyup":l=Mo;break;case"focusin":c="focus",l=Eo;break;case"focusout":c="blur",l=Eo;break;case"beforeblur":case"afterblur":l=Eo;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=xo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=ko;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Lo;break;case Ri:case Mi:case Ti:l=So;break;case Li:l=Io;break;case"scroll":l=bo;break;case"wheel":l=Do;break;case"copy":case"cut":case"paste":l=_o;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=To}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==a?a+"Capture":null:a;u=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==f&&(null!=(v=Dn(h,f))&&u.push(Xi(h,v,p)))),d)break;h=h.return}0<u.length&&(a=new l(a,c,null,n,o),s.push({event:a,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===An||!(c=n.relatedTarget||n.fromElement)||!Cs(c)&&!c[xs])&&(l||a)&&(a=o.window===o?o:(a=o.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Cs(c):null)&&(c!==(d=Qn(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=xo,v="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=To,v="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?a:As(l),p=null==c?a:As(c),(a=new u(v,h+"leave",l,n,o)).target=d,a.relatedTarget=p,v=null,Cs(o)===r&&((u=new u(f,h+"enter",c,n,o)).target=p,u.relatedTarget=d,v=u),d=v,l&&c)e:{for(f=c,h=0,p=u=l;p;p=es(p))h++;for(p=0,v=f;v;v=es(v))p++;for(;0<h-p;)u=es(u),h--;for(;0<p-h;)f=es(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=es(u),f=es(f)}u=null}else u=null;null!==l&&ts(s,a,l,u,!1),null!==c&&null!==d&&ts(s,d,c,u,!0)}if("select"===(l=(a=r?As(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var m=ri;else if(Jo(a))if(oi)m=pi;else{m=di;var g=ui}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(m=fi);switch(m&&(m=m(e,r))?Xo(s,m,n,o):(g&&g(e,a,r),"focusout"===e&&(g=a._wrapperState)&&g.controlled&&"number"===a.type&&an(a,"number",a.value)),g=r?As(r):window,e){case"focusin":(Jo(g)||"true"===g.contentEditable)&&(Ei=g,Si=r,Ci=null);break;case"focusout":Ci=Si=Ei=null;break;case"mousedown":_i=!0;break;case"contextmenu":case"mouseup":case"dragend":_i=!1,Ai(s,n,o);break;case"selectionchange":if(ki)break;case"keydown":case"keyup":Ai(s,n,o)}var y;if(Uo)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Qo?Ko(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Vo&&"ko"!==n.locale&&(Qo||"onCompositionStart"!==b?"onCompositionEnd"===b&&Qo&&(y=ao()):(io="value"in(oo=o)?oo.value:oo.textContent,Qo=!0)),0<(g=Zi(r,b)).length&&(b=new Ao(b,e,null,n,o),s.push({event:b,listeners:g}),y?b.data=y:null!==(y=Yo(n))&&(b.data=y))),(y=Ho?function(e,t){switch(e){case"compositionend":return Yo(t);case"keypress":return 32!==t.which?null:(qo=!0,Wo);case"textInput":return(e=t.data)===Wo&&qo?null:e;default:return null}}(e,n):function(e,t){if(Qo)return"compositionend"===e||!Uo&&Ko(e,t)?(e=ao(),so=io=oo=null,Qo=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Vo&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Zi(r,"onBeforeInput")).length&&(o=new Ao("onBeforeInput","beforeinput",null,n,o),s.push({event:o,listeners:r}),o.data=y))}Wi(s,t)}))}function Xi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zi(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Dn(e,n))&&r.unshift(Xi(e,i,o)),null!=(i=Dn(e,t))&&r.push(Xi(e,i,o))),e=e.return}return r}function es(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function ts(e,t,n,r,o){for(var i=t._reactName,s=[];null!==n&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===r)break;5===a.tag&&null!==c&&(a=c,o?null!=(l=Dn(n,i))&&s.unshift(Xi(n,l,a)):o||null!=(l=Dn(n,i))&&s.push(Xi(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var ns=/\r\n?/g,rs=/\u0000|\uFFFD/g;function os(e){return("string"==typeof e?e:""+e).replace(ns,"\n").replace(rs,"")}function is(e,t,n){if(t=os(t),os(e)!==t&&n)throw Error(dt(425))}function ss(){}var as=null,ls=null;function cs(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var us="function"==typeof setTimeout?setTimeout:void 0,ds="function"==typeof clearTimeout?clearTimeout:void 0,fs="function"==typeof Promise?Promise:void 0,ps="function"==typeof queueMicrotask?queueMicrotask:void 0!==fs?function(e){return fs.resolve(null).then(e).catch(hs)}:us;function hs(e){setTimeout((function(){throw e}))}function vs(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Qr(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Qr(t)}function ms(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function gs(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ys=Math.random().toString(36).slice(2),bs="__reactFiber$"+ys,ws="__reactProps$"+ys,xs="__reactContainer$"+ys,ks="__reactEvents$"+ys,Es="__reactListeners$"+ys,Ss="__reactHandles$"+ys;function Cs(e){var t=e[bs];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xs]||n[bs]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=gs(e);null!==e;){if(n=e[bs])return n;e=gs(e)}return t}n=(e=n).parentNode}return null}function _s(e){return!(e=e[bs]||e[xs])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function As(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(dt(33))}function Ns(e){return e[ws]||null}var Ps=[],js=-1;function $s(e){return{current:e}}function Os(e){0>js||(e.current=Ps[js],Ps[js]=null,js--)}function Rs(e,t){js++,Ps[js]=e.current,e.current=t}var Ms={},Ts=$s(Ms),Ls=$s(!1),Is=Ms;function zs(e,t){var n=e.type.contextTypes;if(!n)return Ms;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ds(e){return null!=(e=e.childContextTypes)}function Bs(){Os(Ls),Os(Ts)}function Us(e,t,n){if(Ts.current!==Ms)throw Error(dt(168));Rs(Ts,t),Rs(Ls,n)}function Fs(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(dt(108,Qt(e)||"Unknown",o));return Ht({},n,r)}function Hs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ms,Is=Ts.current,Rs(Ts,e),Rs(Ls,Ls.current),!0}function Vs(e,t,n){var r=e.stateNode;if(!r)throw Error(dt(169));n?(e=Fs(e,t,Is),r.__reactInternalMemoizedMergedChildContext=e,Os(Ls),Os(Ts),Rs(Ts,e)):Os(Ls),Rs(Ls,n)}var Ws=null,qs=!1,Ks=!1;function Ys(e){null===Ws?Ws=[e]:Ws.push(e)}function Qs(){if(!Ks&&null!==Ws){Ks=!0;var e=0,t=_r;try{var n=Ws;for(_r=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ws=null,qs=!1}catch(o){throw null!==Ws&&(Ws=Ws.slice(e+1)),er(sr,Qs),o}finally{_r=t,Ks=!1}}return null}var Gs=[],Js=0,Xs=null,Zs=0,ea=[],ta=0,na=null,ra=1,oa="";function ia(e,t){Gs[Js++]=Zs,Gs[Js++]=Xs,Xs=e,Zs=t}function sa(e,t,n){ea[ta++]=ra,ea[ta++]=oa,ea[ta++]=na,na=e;var r=ra;e=oa;var o=32-pr(r)-1;r&=~(1<<o),n+=1;var i=32-pr(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,ra=1<<32-pr(t)+o|n<<o|r,oa=i+e}else ra=1<<i|n<<o|r,oa=e}function aa(e){null!==e.return&&(ia(e,1),sa(e,1,0))}function la(e){for(;e===Xs;)Xs=Gs[--Js],Gs[Js]=null,Zs=Gs[--Js],Gs[Js]=null;for(;e===na;)na=ea[--ta],ea[ta]=null,oa=ea[--ta],ea[ta]=null,ra=ea[--ta],ea[ta]=null}var ca=null,ua=null,da=!1,fa=null;function pa(e,t){var n=Id(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ha(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ca=e,ua=ms(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ca=e,ua=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==na?{id:ra,overflow:oa}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Id(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ca=e,ua=null,!0);default:return!1}}function va(e){return!(!(1&e.mode)||128&e.flags)}function ma(e){if(da){var t=ua;if(t){var n=t;if(!ha(e,t)){if(va(e))throw Error(dt(418));t=ms(n.nextSibling);var r=ca;t&&ha(e,t)?pa(r,n):(e.flags=-4097&e.flags|2,da=!1,ca=e)}}else{if(va(e))throw Error(dt(418));e.flags=-4097&e.flags|2,da=!1,ca=e}}}function ga(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ca=e}function ya(e){if(e!==ca)return!1;if(!da)return ga(e),da=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!cs(e.type,e.memoizedProps)),t&&(t=ua)){if(va(e))throw ba(),Error(dt(418));for(;t;)pa(e,t),t=ms(t.nextSibling)}if(ga(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(dt(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ua=ms(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ua=null}}else ua=ca?ms(e.stateNode.nextSibling):null;return!0}function ba(){for(var e=ua;e;)e=ms(e.nextSibling)}function wa(){ua=ca=null,da=!1}function xa(e){null===fa?fa=[e]:fa.push(e)}var ka=_t.ReactCurrentBatchConfig;function Ea(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(dt(309));var r=n.stateNode}if(!r)throw Error(dt(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs;null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(dt(284));if(!n._owner)throw Error(dt(290,e))}return e}function Sa(e,t){throw e=Object.prototype.toString.call(t),Error(dt(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ca(e){return(0,e._init)(e._payload)}function _a(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Dd(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function a(e,t,n,r){return null===t||6!==t.tag?((t=Hd(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var i=n.type;return i===Pt?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===zt&&Ca(i)===t.type)?((r=o(t,n.props)).ref=Ea(e,t,n),r.return=e,r):((r=Bd(n.type,n.key,n.props,null,e.mode,r)).ref=Ea(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Vd(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function u(e,t,n,r,i){return null===t||7!==t.tag?((t=Ud(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Hd(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case At:return(n=Bd(t.type,t.key,t.props,null,e.mode,n)).ref=Ea(e,null,t),n.return=e,n;case Nt:return(t=Vd(t,e.mode,n)).return=e,t;case zt:return d(e,(0,t._init)(t._payload),n)}if(ln(t)||Ut(t))return(t=Ud(t,e.mode,n,null)).return=e,t;Sa(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:a(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case At:return n.key===o?l(e,t,n,r):null;case Nt:return n.key===o?c(e,t,n,r):null;case zt:return f(e,t,(o=n._init)(n._payload),r)}if(ln(n)||Ut(n))return null!==o?null:u(e,t,n,r,null);Sa(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return a(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case At:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Nt:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case zt:return p(e,t,n,(0,r._init)(r._payload),o)}if(ln(r)||Ut(r))return u(t,e=e.get(n)||null,r,o,null);Sa(t,r)}return null}return function a(l,c,u,h){if("object"==typeof u&&null!==u&&u.type===Pt&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case At:e:{for(var v=u.key,m=c;null!==m;){if(m.key===v){if((v=u.type)===Pt){if(7===m.tag){n(l,m.sibling),(c=o(m,u.props.children)).return=l,l=c;break e}}else if(m.elementType===v||"object"==typeof v&&null!==v&&v.$$typeof===zt&&Ca(v)===m.type){n(l,m.sibling),(c=o(m,u.props)).ref=Ea(l,m,u),c.return=l,l=c;break e}n(l,m);break}t(l,m),m=m.sibling}u.type===Pt?((c=Ud(u.props.children,l.mode,h,u.key)).return=l,l=c):((h=Bd(u.type,u.key,u.props,null,l.mode,h)).ref=Ea(l,c,u),h.return=l,l=h)}return s(l);case Nt:e:{for(m=u.key;null!==c;){if(c.key===m){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(c=o(c,u.children||[])).return=l,l=c;break e}n(l,c);break}t(l,c),c=c.sibling}(c=Vd(u,l.mode,h)).return=l,l=c}return s(l);case zt:return a(l,c,(m=u._init)(u._payload),h)}if(ln(u))return function(o,s,a,l){for(var c=null,u=null,h=s,v=s=0,m=null;null!==h&&v<a.length;v++){h.index>v?(m=h,h=null):m=h.sibling;var g=f(o,h,a[v],l);if(null===g){null===h&&(h=m);break}e&&h&&null===g.alternate&&t(o,h),s=i(g,s,v),null===u?c=g:u.sibling=g,u=g,h=m}if(v===a.length)return n(o,h),da&&ia(o,v),c;if(null===h){for(;v<a.length;v++)null!==(h=d(o,a[v],l))&&(s=i(h,s,v),null===u?c=h:u.sibling=h,u=h);return da&&ia(o,v),c}for(h=r(o,h);v<a.length;v++)null!==(m=p(h,o,v,a[v],l))&&(e&&null!==m.alternate&&h.delete(null===m.key?v:m.key),s=i(m,s,v),null===u?c=m:u.sibling=m,u=m);return e&&h.forEach((function(e){return t(o,e)})),da&&ia(o,v),c}(l,c,u,h);if(Ut(u))return function(o,s,a,l){var c=Ut(a);if("function"!=typeof c)throw Error(dt(150));if(null==(a=c.call(a)))throw Error(dt(151));for(var u=c=null,h=s,v=s=0,m=null,g=a.next();null!==h&&!g.done;v++,g=a.next()){h.index>v?(m=h,h=null):m=h.sibling;var y=f(o,h,g.value,l);if(null===y){null===h&&(h=m);break}e&&h&&null===y.alternate&&t(o,h),s=i(y,s,v),null===u?c=y:u.sibling=y,u=y,h=m}if(g.done)return n(o,h),da&&ia(o,v),c;if(null===h){for(;!g.done;v++,g=a.next())null!==(g=d(o,g.value,l))&&(s=i(g,s,v),null===u?c=g:u.sibling=g,u=g);return da&&ia(o,v),c}for(h=r(o,h);!g.done;v++,g=a.next())null!==(g=p(h,o,v,g.value,l))&&(e&&null!==g.alternate&&h.delete(null===g.key?v:g.key),s=i(g,s,v),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach((function(e){return t(o,e)})),da&&ia(o,v),c}(l,c,u,h);Sa(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(c=o(c,u)).return=l,l=c):(n(l,c),(c=Hd(u,l.mode,h)).return=l,l=c),s(l)):n(l,c)}}var Aa=_a(!0),Na=_a(!1),Pa=$s(null),ja=null,$a=null,Oa=null;function Ra(){Oa=$a=ja=null}function Ma(e){var t=Pa.current;Os(Pa),e._currentValue=t}function Ta(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function La(e,t){ja=e,Oa=$a=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(Cc=!0),e.firstContext=null)}function Ia(e){var t=e._currentValue;if(Oa!==e)if(e={context:e,memoizedValue:t,next:null},null===$a){if(null===ja)throw Error(dt(308));$a=e,ja.dependencies={lanes:0,firstContext:e}}else $a=$a.next=e;return t}var za=null;function Da(e){null===za?za=[e]:za.push(e)}function Ba(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Da(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ua(e,r)}function Ua(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Fa=!1;function Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Wa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Mu){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ua(e,n)}return null===(o=r.interleaved)?(t.next=t,Da(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ua(e,n)}function Ka(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Cr(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=s:i=i.next=s,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qa(e,t,n,r){var o=e.updateQueue;Fa=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(null!==a){o.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?i=c:s.next=c,s=l;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(s=0,u=c=l=null,a=i;;){var f=a.lane,p=a.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(f=t,p=n,v.tag){case 1:if("function"==typeof(h=v.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=v.payload)?h.call(p,d,f):h))break e;d=Ht({},d,f);break e;case 2:Fa=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,s|=f;if(null===(a=a.next)){if(null===(a=o.shared.pending))break;a=(f=a).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{s|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Fu|=s,e.lanes=s,e.memoizedState=d}}function Ga(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(dt(191,o));o.call(r)}}}var Ja={},Xa=$s(Ja),Za=$s(Ja),el=$s(Ja);function tl(e){if(e===Ja)throw Error(dt(174));return e}function nl(e,t){switch(Rs(el,t),Rs(Za,e),Rs(Xa,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vn(null,"");break;default:t=vn(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Os(Xa),Rs(Xa,t)}function rl(){Os(Xa),Os(Za),Os(el)}function ol(e){tl(el.current);var t=tl(Xa.current),n=vn(t,e.type);t!==n&&(Rs(Za,e),Rs(Xa,n))}function il(e){Za.current===e&&(Os(Xa),Os(Za))}var sl=$s(0);function al(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ll=[];function cl(){for(var e=0;e<ll.length;e++)ll[e]._workInProgressVersionPrimary=null;ll.length=0}var ul=_t.ReactCurrentDispatcher,dl=_t.ReactCurrentBatchConfig,fl=0,pl=null,hl=null,vl=null,ml=!1,gl=!1,yl=0,bl=0;function wl(){throw Error(dt(321))}function xl(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hi(e[n],t[n]))return!1;return!0}function kl(e,t,n,r,o,i){if(fl=i,pl=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ul.current=null===e||null===e.memoizedState?ic:sc,e=n(r,o),gl){i=0;do{if(gl=!1,yl=0,25<=i)throw Error(dt(301));i+=1,vl=hl=null,t.updateQueue=null,ul.current=ac,e=n(r,o)}while(gl)}if(ul.current=oc,t=null!==hl&&null!==hl.next,fl=0,vl=hl=pl=null,ml=!1,t)throw Error(dt(300));return e}function El(){var e=0!==yl;return yl=0,e}function Sl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vl?pl.memoizedState=vl=e:vl=vl.next=e,vl}function Cl(){if(null===hl){var e=pl.alternate;e=null!==e?e.memoizedState:null}else e=hl.next;var t=null===vl?pl.memoizedState:vl.next;if(null!==t)vl=t,hl=e;else{if(null===e)throw Error(dt(310));e={memoizedState:(hl=e).memoizedState,baseState:hl.baseState,baseQueue:hl.baseQueue,queue:hl.queue,next:null},null===vl?pl.memoizedState=vl=e:vl=vl.next=e}return vl}function _l(e,t){return"function"==typeof t?t(e):t}function Al(e){var t=Cl(),n=t.queue;if(null===n)throw Error(dt(311));n.lastRenderedReducer=e;var r=hl,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((fl&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(a=l=d,s=r):l=l.next=d,pl.lanes|=u,Fu|=u}c=c.next}while(null!==c&&c!==i);null===l?s=r:l.next=a,hi(r,t.memoizedState)||(Cc=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,pl.lanes|=i,Fu|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Nl(e){var t=Cl(),n=t.queue;if(null===n)throw Error(dt(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);hi(i,t.memoizedState)||(Cc=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Pl(){}function jl(e,t){var n=pl,r=Cl(),o=t(),i=!hi(r.memoizedState,o);if(i&&(r.memoizedState=o,Cc=!0),r=r.queue,Fl(Rl.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==vl&&1&vl.memoizedState.tag){if(n.flags|=2048,Il(9,Ol.bind(null,n,r,o,t),void 0,null),null===Tu)throw Error(dt(349));30&fl||$l(n,t,o)}return o}function $l(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=pl.updateQueue)?(t={lastEffect:null,stores:null},pl.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ol(e,t,n,r){t.value=n,t.getSnapshot=r,Ml(t)&&Tl(e)}function Rl(e,t,n){return n((function(){Ml(t)&&Tl(e)}))}function Ml(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hi(e,n)}catch(r){return!0}}function Tl(e){var t=Ua(e,1);null!==t&&ld(t,e,1,-1)}function Ll(e){var t=Sl();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_l,lastRenderedState:e},t.queue=e,e=e.dispatch=ec.bind(null,pl,e),[t.memoizedState,e]}function Il(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=pl.updateQueue)?(t={lastEffect:null,stores:null},pl.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function zl(){return Cl().memoizedState}function Dl(e,t,n,r){var o=Sl();pl.flags|=e,o.memoizedState=Il(1|t,n,void 0,void 0===r?null:r)}function Bl(e,t,n,r){var o=Cl();r=void 0===r?null:r;var i=void 0;if(null!==hl){var s=hl.memoizedState;if(i=s.destroy,null!==r&&xl(r,s.deps))return void(o.memoizedState=Il(t,n,i,r))}pl.flags|=e,o.memoizedState=Il(1|t,n,i,r)}function Ul(e,t){return Dl(8390656,8,e,t)}function Fl(e,t){return Bl(2048,8,e,t)}function Hl(e,t){return Bl(4,2,e,t)}function Vl(e,t){return Bl(4,4,e,t)}function Wl(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ql(e,t,n){return n=null!=n?n.concat([e]):null,Bl(4,4,Wl.bind(null,t,e),n)}function Kl(){}function Yl(e,t){var n=Cl();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ql(e,t){var n=Cl();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Gl(e,t,n){return 21&fl?(hi(n,t)||(n=kr(),pl.lanes|=n,Fu|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Cc=!0),e.memoizedState=n)}function Jl(e,t){var n=_r;_r=0!==n&&4>n?n:4,e(!0);var r=dl.transition;dl.transition={};try{e(!1),t()}finally{_r=n,dl.transition=r}}function Xl(){return Cl().memoizedState}function Zl(e,t,n){var r=ad(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},tc(e))nc(t,n);else if(null!==(n=Ba(e,t,n,r))){ld(n,e,r,sd()),rc(n,t,r)}}function ec(e,t,n){var r=ad(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(tc(e))nc(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,hi(a,s)){var l=t.interleaved;return null===l?(o.next=o,Da(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(c){}null!==(n=Ba(e,t,o,r))&&(ld(n,e,r,o=sd()),rc(n,t,r))}}function tc(e){var t=e.alternate;return e===pl||null!==t&&t===pl}function nc(e,t){gl=ml=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rc(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Cr(e,n)}}var oc={readContext:Ia,useCallback:wl,useContext:wl,useEffect:wl,useImperativeHandle:wl,useInsertionEffect:wl,useLayoutEffect:wl,useMemo:wl,useReducer:wl,useRef:wl,useState:wl,useDebugValue:wl,useDeferredValue:wl,useTransition:wl,useMutableSource:wl,useSyncExternalStore:wl,useId:wl,unstable_isNewReconciler:!1},ic={readContext:Ia,useCallback:function(e,t){return Sl().memoizedState=[e,void 0===t?null:t],e},useContext:Ia,useEffect:Ul,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Dl(4194308,4,Wl.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dl(4,2,e,t)},useMemo:function(e,t){var n=Sl();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Sl();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Zl.bind(null,pl,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Sl().memoizedState=e},useState:Ll,useDebugValue:Kl,useDeferredValue:function(e){return Sl().memoizedState=e},useTransition:function(){var e=Ll(!1),t=e[0];return e=Jl.bind(null,e[1]),Sl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pl,o=Sl();if(da){if(void 0===n)throw Error(dt(407));n=n()}else{if(n=t(),null===Tu)throw Error(dt(349));30&fl||$l(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ul(Rl.bind(null,r,i,e),[e]),r.flags|=2048,Il(9,Ol.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Sl(),t=Tu.identifierPrefix;if(da){var n=oa;t=":"+t+"R"+(n=(ra&~(1<<32-pr(ra)-1)).toString(32)+n),0<(n=yl++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=bl++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sc={readContext:Ia,useCallback:Yl,useContext:Ia,useEffect:Fl,useImperativeHandle:ql,useInsertionEffect:Hl,useLayoutEffect:Vl,useMemo:Ql,useReducer:Al,useRef:zl,useState:function(){return Al(_l)},useDebugValue:Kl,useDeferredValue:function(e){return Gl(Cl(),hl.memoizedState,e)},useTransition:function(){return[Al(_l)[0],Cl().memoizedState]},useMutableSource:Pl,useSyncExternalStore:jl,useId:Xl,unstable_isNewReconciler:!1},ac={readContext:Ia,useCallback:Yl,useContext:Ia,useEffect:Fl,useImperativeHandle:ql,useInsertionEffect:Hl,useLayoutEffect:Vl,useMemo:Ql,useReducer:Nl,useRef:zl,useState:function(){return Nl(_l)},useDebugValue:Kl,useDeferredValue:function(e){var t=Cl();return null===hl?t.memoizedState=e:Gl(t,hl.memoizedState,e)},useTransition:function(){return[Nl(_l)[0],Cl().memoizedState]},useMutableSource:Pl,useSyncExternalStore:jl,useId:Xl,unstable_isNewReconciler:!1};function lc(e,t){if(e&&e.defaultProps){for(var n in t=Ht({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function cc(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Ht({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var uc={isMounted:function(e){return!!(e=e._reactInternals)&&Qn(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=sd(),o=ad(e),i=Wa(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=qa(e,i,o))&&(ld(t,e,o,r),Ka(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=sd(),o=ad(e),i=Wa(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=qa(e,i,o))&&(ld(t,e,o,r),Ka(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=sd(),r=ad(e),o=Wa(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=qa(e,o,r))&&(ld(t,e,r,n),Ka(t,e,r))}};function dc(e,t,n,r,o,i,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,s):!t.prototype||!t.prototype.isPureReactComponent||(!vi(n,r)||!vi(o,i))}function fc(e,t,n){var r=!1,o=Ms,i=t.contextType;return"object"==typeof i&&null!==i?i=Ia(i):(o=Ds(t)?Is:Ts.current,i=(r=null!=(r=t.contextTypes))?zs(e,o):Ms),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=uc,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function pc(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&uc.enqueueReplaceState(t,t.state,null)}function hc(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ha(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=Ia(i):(i=Ds(t)?Is:Ts.current,o.context=zs(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(cc(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&uc.enqueueReplaceState(o,o.state,null),Qa(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function vc(e,t){try{var n="",r=t;do{n+=Kt(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function mc(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function gc(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var yc="function"==typeof WeakMap?WeakMap:Map;function bc(e,t,n){(n=Wa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gu||(Gu=!0,Ju=r),gc(0,t)},n}function wc(e,t,n){(n=Wa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){gc(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){gc(0,t),"function"!=typeof r&&(null===Xu?Xu=new Set([this]):Xu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function xc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new yc;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=$d.bind(null,e,t,n),t.then(e,e))}function kc(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ec(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Wa(-1,1)).tag=2,qa(n,t,1))),n.lanes|=1),e)}var Sc=_t.ReactCurrentOwner,Cc=!1;function _c(e,t,n,r){t.child=null===e?Na(t,null,n,r):Aa(t,e.child,n,r)}function Ac(e,t,n,r,o){n=n.render;var i=t.ref;return La(t,o),r=kl(e,t,n,r,i,o),n=El(),null===e||Cc?(da&&n&&aa(t),t.flags|=1,_c(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gc(e,t,o))}function Nc(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||zd(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Bd(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Pc(e,t,i,r,o))}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if((n=null!==(n=n.compare)?n:vi)(s,r)&&e.ref===t.ref)return Gc(e,t,o)}return t.flags|=1,(e=Dd(i,r)).ref=t.ref,e.return=t,t.child=e}function Pc(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(vi(i,r)&&e.ref===t.ref){if(Cc=!1,t.pendingProps=r=i,!(e.lanes&o))return t.lanes=e.lanes,Gc(e,t,o);131072&e.flags&&(Cc=!0)}}return Oc(e,t,n,r,o)}function jc(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Rs(Du,zu),zu|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Rs(Du,zu),zu|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rs(Du,zu),zu|=n;else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Rs(Du,zu),zu|=r;return _c(e,t,o,n),t.child}function $c(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Oc(e,t,n,r,o){var i=Ds(n)?Is:Ts.current;return i=zs(t,i),La(t,o),n=kl(e,t,n,r,i,o),r=El(),null===e||Cc?(da&&r&&aa(t),t.flags|=1,_c(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gc(e,t,o))}function Rc(e,t,n,r,o){if(Ds(n)){var i=!0;Hs(t)}else i=!1;if(La(t,o),null===t.stateNode)Qc(e,t),fc(t,n,r),hc(t,n,r,o),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"==typeof c&&null!==c?c=Ia(c):c=zs(t,c=Ds(n)?Is:Ts.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==c)&&pc(t,s,r,c),Fa=!1;var f=t.memoizedState;s.state=f,Qa(t,r,s,o),l=t.memoizedState,a!==r||f!==l||Ls.current||Fa?("function"==typeof u&&(cc(t,n,u,r),l=t.memoizedState),(a=Fa||dc(t,n,a,r,f,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Va(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:lc(t.type,a),s.props=c,d=t.pendingProps,f=s.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ia(l):l=zs(t,l=Ds(n)?Is:Ts.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||f!==l)&&pc(t,s,r,l),Fa=!1,f=t.memoizedState,s.state=f,Qa(t,r,s,o);var h=t.memoizedState;a!==d||f!==h||Ls.current||Fa?("function"==typeof p&&(cc(t,n,p,r),h=t.memoizedState),(c=Fa||dc(t,n,c,r,f,h,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,h,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),s.props=r,s.state=h,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Mc(e,t,n,r,i,o)}function Mc(e,t,n,r,o,i){$c(e,t);var s=!!(128&t.flags);if(!r&&!s)return o&&Vs(t,n,!1),Gc(e,t,i);r=t.stateNode,Sc.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,a,i)):_c(e,t,a,i),t.memoizedState=r.state,o&&Vs(t,n,!0),t.child}function Tc(e){var t=e.stateNode;t.pendingContext?Us(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Us(0,t.context,!1),nl(e,t.containerInfo)}function Lc(e,t,n,r,o){return wa(),xa(o),t.flags|=256,_c(e,t,n,r),t.child}var Ic,zc,Dc,Bc,Uc={dehydrated:null,treeContext:null,retryLane:0};function Fc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hc(e,t,n){var r,o=t.pendingProps,i=sl.current,s=!1,a=!!(128&t.flags);if((r=a)||(r=(null===e||null!==e.memoizedState)&&!!(2&i)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Rs(sl,1&i),null===e)return ma(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=o.children,e=o.fallback,s?(o=t.mode,s=t.child,a={mode:"hidden",children:a},1&o||null===s?s=Fd(a,o,0,null):(s.childLanes=0,s.pendingProps=a),e=Ud(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Fc(n),t.memoizedState=Uc,e):Vc(t,a));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,s){if(n)return 256&t.flags?(t.flags&=-257,Wc(e,t,s,r=mc(Error(dt(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Fd({mode:"visible",children:r.children},o,0,null),(i=Ud(i,o,s,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,1&t.mode&&Aa(t,e.child,null,s),t.child.memoizedState=Fc(s),t.memoizedState=Uc,i);if(!(1&t.mode))return Wc(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var a=r.dgst;return r=a,Wc(e,t,s,r=mc(i=Error(dt(419)),r,void 0))}if(a=!!(s&e.childLanes),Cc||a){if(null!==(r=Tu)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=o&(r.suspendedLanes|s)?0:o)&&o!==i.retryLane&&(i.retryLane=o,Ua(e,o),ld(r,e,o,-1))}return xd(),Wc(e,t,s,r=mc(Error(dt(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Rd.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,ua=ms(o.nextSibling),ca=t,da=!0,fa=null,null!==e&&(ea[ta++]=ra,ea[ta++]=oa,ea[ta++]=na,ra=e.id,oa=e.overflow,na=t),t=Vc(t,r.children),t.flags|=4096,t)}(e,t,a,o,r,i,n);if(s){s=o.fallback,a=t.mode,r=(i=e.child).sibling;var l={mode:"hidden",children:o.children};return 1&a||t.child===i?(o=Dd(i,l)).subtreeFlags=14680064&i.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null),null!==r?s=Dd(r,s):(s=Ud(s,a,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,a=null===(a=e.child.memoizedState)?Fc(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=Uc,o}return e=(s=e.child).sibling,o=Dd(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Vc(e,t){return(t=Fd({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Wc(e,t,n,r){return null!==r&&xa(r),Aa(t,e.child,null,n),(e=Vc(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function qc(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ta(e.return,t,n)}function Kc(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Yc(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(_c(e,t,r.children,n),2&(r=sl.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&qc(e,n,t);else if(19===e.tag)qc(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Rs(sl,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===al(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Kc(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===al(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Kc(t,!0,n,null,i);break;case"together":Kc(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Qc(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gc(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fu|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(dt(153));if(null!==t.child){for(n=Dd(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Dd(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Jc(e,t){if(!da)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xc(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zc(e,t,n){var r=t.pendingProps;switch(la(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xc(t),null;case 1:case 17:return Ds(t.type)&&Bs(),Xc(t),null;case 3:return r=t.stateNode,rl(),Os(Ls),Os(Ts),cl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ya(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==fa&&(fd(fa),fa=null))),zc(e,t),Xc(t),null;case 5:il(t);var o=tl(el.current);if(n=t.type,null!==e&&null!=t.stateNode)Dc(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(dt(166));return Xc(t),null}if(e=tl(Xa.current),ya(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[bs]=t,r[ws]=i,e=!!(1&t.mode),n){case"dialog":qi("cancel",r),qi("close",r);break;case"iframe":case"object":case"embed":qi("load",r);break;case"video":case"audio":for(o=0;o<Fi.length;o++)qi(Fi[o],r);break;case"source":qi("error",r);break;case"img":case"image":case"link":qi("error",r),qi("load",r);break;case"details":qi("toggle",r);break;case"input":nn(r,i),qi("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},qi("invalid",r);break;case"textarea":dn(r,i),qi("invalid",r)}for(var s in Cn(n,i),o=null,i)if(i.hasOwnProperty(s)){var a=i[s];"children"===s?"string"==typeof a?r.textContent!==a&&(!0!==i.suppressHydrationWarning&&is(r.textContent,a,e),o=["children",a]):"number"==typeof a&&r.textContent!==""+a&&(!0!==i.suppressHydrationWarning&&is(r.textContent,a,e),o=["children",""+a]):pt.hasOwnProperty(s)&&null!=a&&"onScroll"===s&&qi("scroll",r)}switch(n){case"input":Xt(r),sn(r,i,!0);break;case"textarea":Xt(r),pn(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=ss)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{s=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=hn(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[bs]=t,e[ws]=r,Ic(e,t,!1,!1),t.stateNode=e;e:{switch(s=_n(n,r),n){case"dialog":qi("cancel",e),qi("close",e),o=r;break;case"iframe":case"object":case"embed":qi("load",e),o=r;break;case"video":case"audio":for(o=0;o<Fi.length;o++)qi(Fi[o],e);o=r;break;case"source":qi("error",e),o=r;break;case"img":case"image":case"link":qi("error",e),qi("load",e),o=r;break;case"details":qi("toggle",e),o=r;break;case"input":nn(e,r),o=tn(e,r),qi("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ht({},r,{value:void 0}),qi("invalid",e);break;case"textarea":dn(e,r),o=un(e,r),qi("invalid",e)}for(i in Cn(n,o),a=o)if(a.hasOwnProperty(i)){var l=a[i];"style"===i?En(e,l):"dangerouslySetInnerHTML"===i?null!=(l=l?l.__html:void 0)&&yn(e,l):"children"===i?"string"==typeof l?("textarea"!==n||""!==l)&&bn(e,l):"number"==typeof l&&bn(e,""+l):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(pt.hasOwnProperty(i)?null!=l&&"onScroll"===i&&qi("scroll",e):null!=l&&Ct(e,i,l,s))}switch(n){case"input":Xt(e),sn(e,r,!1);break;case"textarea":Xt(e),pn(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Gt(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?cn(e,!!r.multiple,i,!1):null!=r.defaultValue&&cn(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=ss)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Xc(t),null;case 6:if(e&&null!=t.stateNode)Bc(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(dt(166));if(n=tl(el.current),tl(Xa.current),ya(t)){if(r=t.stateNode,n=t.memoizedProps,r[bs]=t,(i=r.nodeValue!==n)&&null!==(e=ca))switch(e.tag){case 3:is(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&is(r.nodeValue,n,!!(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[bs]=t,t.stateNode=r}return Xc(t),null;case 13:if(Os(sl),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(da&&null!==ua&&1&t.mode&&!(128&t.flags))ba(),wa(),t.flags|=98560,i=!1;else if(i=ya(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(dt(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(dt(317));i[bs]=t}else wa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Xc(t),i=!1}else null!==fa&&(fd(fa),fa=null),i=!0;if(!i)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&sl.current?0===Bu&&(Bu=3):xd())),null!==t.updateQueue&&(t.flags|=4),Xc(t),null);case 4:return rl(),zc(e,t),null===e&&Qi(t.stateNode.containerInfo),Xc(t),null;case 10:return Ma(t.type._context),Xc(t),null;case 19:if(Os(sl),null===(i=t.memoizedState))return Xc(t),null;if(r=!!(128&t.flags),null===(s=i.rendering))if(r)Jc(i,!1);else{if(0!==Bu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(s=al(e))){for(t.flags|=128,Jc(i,!1),null!==(r=s.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(s=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Rs(sl,1&sl.current|2),t.child}e=e.sibling}null!==i.tail&&or()>Yu&&(t.flags|=128,r=!0,Jc(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=al(s))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Jc(i,!0),null===i.tail&&"hidden"===i.tailMode&&!s.alternate&&!da)return Xc(t),null}else 2*or()-i.renderingStartTime>Yu&&1073741824!==n&&(t.flags|=128,r=!0,Jc(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=i.last)?n.sibling=s:t.child=s,i.last=s)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=or(),t.sibling=null,n=sl.current,Rs(sl,r?1&n|2:1&n),t):(Xc(t),null);case 22:case 23:return gd(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&zu)&&(Xc(t),6&t.subtreeFlags&&(t.flags|=8192)):Xc(t),null;case 24:case 25:return null}throw Error(dt(156,t.tag))}function eu(e,t){switch(la(t),t.tag){case 1:return Ds(t.type)&&Bs(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return rl(),Os(Ls),Os(Ts),cl(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return il(t),null;case 13:if(Os(sl),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(dt(340));wa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Os(sl),null;case 4:return rl(),null;case 10:return Ma(t.type._context),null;case 22:case 23:return gd(),null;default:return null}}Ic=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},zc=function(){},Dc=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,tl(Xa.current);var i,s=null;switch(n){case"input":o=tn(e,o),r=tn(e,r),s=[];break;case"select":o=Ht({},o,{value:void 0}),r=Ht({},r,{value:void 0}),s=[];break;case"textarea":o=un(e,o),r=un(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=ss)}for(c in Cn(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(pt.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(null!=l||null!=a))if("style"===c)if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,a=a?a.__html:void 0,null!=l&&a!==l&&(s=s||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(s=s||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(pt.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&qi("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Bc=function(e,t,n,r){n!==r&&(t.flags|=4)};var tu=!1,nu=!1,ru="function"==typeof WeakSet?WeakSet:Set,ou=null;function iu(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){jd(e,t,r)}else n.current=null}function su(e,t,n){try{n()}catch(r){jd(e,t,r)}}var au=!1;function lu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&su(t,n,i)}o=o.next}while(o!==r)}}function cu(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function uu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function du(e){var t=e.alternate;null!==t&&(e.alternate=null,du(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[bs],delete t[ws],delete t[ks],delete t[Es],delete t[Ss])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function fu(e){return 5===e.tag||3===e.tag||4===e.tag}function pu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||fu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function hu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=ss));else if(4!==r&&null!==(e=e.child))for(hu(e,t,n),e=e.sibling;null!==e;)hu(e,t,n),e=e.sibling}function vu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(vu(e,t,n),e=e.sibling;null!==e;)vu(e,t,n),e=e.sibling}var mu=null,gu=!1;function yu(e,t,n){for(n=n.child;null!==n;)bu(e,t,n),n=n.sibling}function bu(e,t,n){if(fr&&"function"==typeof fr.onCommitFiberUnmount)try{fr.onCommitFiberUnmount(dr,n)}catch(a){}switch(n.tag){case 5:nu||iu(n,t);case 6:var r=mu,o=gu;mu=null,yu(e,t,n),gu=o,null!==(mu=r)&&(gu?(e=mu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):mu.removeChild(n.stateNode));break;case 18:null!==mu&&(gu?(e=mu,n=n.stateNode,8===e.nodeType?vs(e.parentNode,n):1===e.nodeType&&vs(e,n),Qr(e)):vs(mu,n.stateNode));break;case 4:r=mu,o=gu,mu=n.stateNode.containerInfo,gu=!0,yu(e,t,n),mu=r,gu=o;break;case 0:case 11:case 14:case 15:if(!nu&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,void 0!==s&&(2&i||4&i)&&su(n,t,s),o=o.next}while(o!==r)}yu(e,t,n);break;case 1:if(!nu&&(iu(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){jd(n,t,a)}yu(e,t,n);break;case 21:yu(e,t,n);break;case 22:1&n.mode?(nu=(r=nu)||null!==n.memoizedState,yu(e,t,n),nu=r):yu(e,t,n);break;default:yu(e,t,n)}}function wu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ru),t.forEach((function(t){var r=Md.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function xu(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,a=s;e:for(;null!==a;){switch(a.tag){case 5:mu=a.stateNode,gu=!1;break e;case 3:case 4:mu=a.stateNode.containerInfo,gu=!0;break e}a=a.return}if(null===mu)throw Error(dt(160));bu(i,s,o),mu=null,gu=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(c){jd(o,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ku(t,e),t=t.sibling}function ku(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xu(t,e),Eu(e),4&r){try{lu(3,e,e.return),cu(3,e)}catch(v){jd(e,e.return,v)}try{lu(5,e,e.return)}catch(v){jd(e,e.return,v)}}break;case 1:xu(t,e),Eu(e),512&r&&null!==n&&iu(n,n.return);break;case 5:if(xu(t,e),Eu(e),512&r&&null!==n&&iu(n,n.return),32&e.flags){var o=e.stateNode;try{bn(o,"")}catch(v){jd(e,e.return,v)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,s=null!==n?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===a&&"radio"===i.type&&null!=i.name&&rn(o,i),_n(a,s);var c=_n(a,i);for(s=0;s<l.length;s+=2){var u=l[s],d=l[s+1];"style"===u?En(o,d):"dangerouslySetInnerHTML"===u?yn(o,d):"children"===u?bn(o,d):Ct(o,u,d,c)}switch(a){case"input":on(o,i);break;case"textarea":fn(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;null!=p?cn(o,!!i.multiple,p,!1):f!==!!i.multiple&&(null!=i.defaultValue?cn(o,!!i.multiple,i.defaultValue,!0):cn(o,!!i.multiple,i.multiple?[]:"",!1))}o[ws]=i}catch(v){jd(e,e.return,v)}}break;case 6:if(xu(t,e),Eu(e),4&r){if(null===e.stateNode)throw Error(dt(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(v){jd(e,e.return,v)}}break;case 3:if(xu(t,e),Eu(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Qr(t.containerInfo)}catch(v){jd(e,e.return,v)}break;case 4:default:xu(t,e),Eu(e);break;case 13:xu(t,e),Eu(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Ku=or())),4&r&&wu(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(nu=(c=nu)||u,xu(t,e),nu=c):xu(t,e),Eu(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(ou=e,u=e.child;null!==u;){for(d=ou=u;null!==ou;){switch(p=(f=ou).child,f.tag){case 0:case 11:case 14:case 15:lu(4,f,f.return);break;case 1:iu(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(v){jd(r,n,v)}}break;case 5:iu(f,f.return);break;case 22:if(null!==f.memoizedState){Au(d);continue}}null!==p?(p.return=f,ou=p):Au(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{o=d.stateNode,c?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(a=d.stateNode,s=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,a.style.display=kn("display",s))}catch(v){jd(e,e.return,v)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){jd(e,e.return,v)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:xu(t,e),Eu(e),4&r&&wu(e);case 21:}}function Eu(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(fu(n)){var r=n;break e}n=n.return}throw Error(dt(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(bn(o,""),r.flags&=-33),vu(e,pu(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;hu(e,pu(e),i);break;default:throw Error(dt(161))}}catch(s){jd(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Su(e,t,n){ou=e,Cu(e)}function Cu(e,t,n){for(var r=!!(1&e.mode);null!==ou;){var o=ou,i=o.child;if(22===o.tag&&r){var s=null!==o.memoizedState||tu;if(!s){var a=o.alternate,l=null!==a&&null!==a.memoizedState||nu;a=tu;var c=nu;if(tu=s,(nu=l)&&!c)for(ou=o;null!==ou;)l=(s=ou).child,22===s.tag&&null!==s.memoizedState?Nu(o):null!==l?(l.return=s,ou=l):Nu(o);for(;null!==i;)ou=i,Cu(i),i=i.sibling;ou=o,tu=a,nu=c}_u(e)}else 8772&o.subtreeFlags&&null!==i?(i.return=o,ou=i):_u(e)}}function _u(e){for(;null!==ou;){var t=ou;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:nu||cu(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!nu)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:lc(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&Ga(t,i,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ga(t,s,n)}break;case 5:var a=t.stateNode;if(null===n&&4&t.flags){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Qr(d)}}}break;default:throw Error(dt(163))}nu||512&t.flags&&uu(t)}catch(f){jd(t,t.return,f)}}if(t===e){ou=null;break}if(null!==(n=t.sibling)){n.return=t.return,ou=n;break}ou=t.return}}function Au(e){for(;null!==ou;){var t=ou;if(t===e){ou=null;break}var n=t.sibling;if(null!==n){n.return=t.return,ou=n;break}ou=t.return}}function Nu(e){for(;null!==ou;){var t=ou;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{cu(4,t)}catch(l){jd(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){jd(t,o,l)}}var i=t.return;try{uu(t)}catch(l){jd(t,i,l)}break;case 5:var s=t.return;try{uu(t)}catch(l){jd(t,s,l)}}}catch(l){jd(t,t.return,l)}if(t===e){ou=null;break}var a=t.sibling;if(null!==a){a.return=t.return,ou=a;break}ou=t.return}}var Pu,ju=Math.ceil,$u=_t.ReactCurrentDispatcher,Ou=_t.ReactCurrentOwner,Ru=_t.ReactCurrentBatchConfig,Mu=0,Tu=null,Lu=null,Iu=0,zu=0,Du=$s(0),Bu=0,Uu=null,Fu=0,Hu=0,Vu=0,Wu=null,qu=null,Ku=0,Yu=1/0,Qu=null,Gu=!1,Ju=null,Xu=null,Zu=!1,ed=null,td=0,nd=0,rd=null,od=-1,id=0;function sd(){return 6&Mu?or():-1!==od?od:od=or()}function ad(e){return 1&e.mode?2&Mu&&0!==Iu?Iu&-Iu:null!==ka.transition?(0===id&&(id=kr()),id):0!==(e=_r)?e:e=void 0===(e=window.event)?16:ro(e.type):1}function ld(e,t,n,r){if(50<nd)throw nd=0,rd=null,Error(dt(185));Sr(e,n,r),2&Mu&&e===Tu||(e===Tu&&(!(2&Mu)&&(Hu|=n),4===Bu&&pd(e,Iu)),cd(e,r),1===n&&0===Mu&&!(1&t.mode)&&(Yu=or()+500,qs&&Qs()))}function cd(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-pr(i),a=1<<s,l=o[s];-1===l?a&n&&!(a&r)||(o[s]=wr(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}(e,t);var r=br(e,e===Tu?Iu:0);if(0===r)null!==n&&tr(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&tr(n),1===t)0===e.tag?function(e){qs=!0,Ys(e)}(hd.bind(null,e)):Ys(hd.bind(null,e)),ps((function(){!(6&Mu)&&Qs()})),n=null;else{switch(Ar(r)){case 1:n=sr;break;case 4:n=ar;break;case 16:default:n=lr;break;case 536870912:n=ur}n=Td(n,ud.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ud(e,t){if(od=-1,id=0,6&Mu)throw Error(dt(327));var n=e.callbackNode;if(Nd()&&e.callbackNode!==n)return null;var r=br(e,e===Tu?Iu:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=kd(e,r);else{t=r;var o=Mu;Mu|=2;var i=wd();for(Tu===e&&Iu===t||(Qu=null,Yu=or()+500,yd(e,t));;)try{Sd();break}catch(a){bd(e,a)}Ra(),$u.current=i,Mu=o,null!==Lu?t=0:(Tu=null,Iu=0,t=Bu)}if(0!==t){if(2===t&&(0!==(o=xr(e))&&(r=o,t=dd(e,o))),1===t)throw n=Uu,yd(e,0),pd(e,r),cd(e,or()),n;if(6===t)pd(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!hi(i(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=kd(e,r),2===t&&(i=xr(e),0!==i&&(r=i,t=dd(e,i))),1!==t)))throw n=Uu,yd(e,0),pd(e,r),cd(e,or()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(dt(345));case 2:case 5:Ad(e,qu,Qu);break;case 3:if(pd(e,r),(130023424&r)===r&&10<(t=Ku+500-or())){if(0!==br(e,0))break;if(((o=e.suspendedLanes)&r)!==r){sd(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=us(Ad.bind(null,e,qu,Qu),t);break}Ad(e,qu,Qu);break;case 4:if(pd(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-pr(r);i=1<<s,(s=t[s])>o&&(o=s),r&=~i}if(r=o,10<(r=(120>(r=or()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ju(r/1960))-r)){e.timeoutHandle=us(Ad.bind(null,e,qu,Qu),r);break}Ad(e,qu,Qu);break;default:throw Error(dt(329))}}}return cd(e,or()),e.callbackNode===n?ud.bind(null,e):null}function dd(e,t){var n=Wu;return e.current.memoizedState.isDehydrated&&(yd(e,t).flags|=256),2!==(e=kd(e,t))&&(t=qu,qu=n,null!==t&&fd(t)),e}function fd(e){null===qu?qu=e:qu.push.apply(qu,e)}function pd(e,t){for(t&=~Vu,t&=~Hu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pr(t),r=1<<n;e[n]=-1,t&=~r}}function hd(e){if(6&Mu)throw Error(dt(327));Nd();var t=br(e,0);if(!(1&t))return cd(e,or()),null;var n=kd(e,t);if(0!==e.tag&&2===n){var r=xr(e);0!==r&&(t=r,n=dd(e,r))}if(1===n)throw n=Uu,yd(e,0),pd(e,t),cd(e,or()),n;if(6===n)throw Error(dt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ad(e,qu,Qu),cd(e,or()),null}function vd(e,t){var n=Mu;Mu|=1;try{return e(t)}finally{0===(Mu=n)&&(Yu=or()+500,qs&&Qs())}}function md(e){null!==ed&&0===ed.tag&&!(6&Mu)&&Nd();var t=Mu;Mu|=1;var n=Ru.transition,r=_r;try{if(Ru.transition=null,_r=1,e)return e()}finally{_r=r,Ru.transition=n,!(6&(Mu=t))&&Qs()}}function gd(){zu=Du.current,Os(Du)}function yd(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ds(n)),null!==Lu)for(n=Lu.return;null!==n;){var r=n;switch(la(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Bs();break;case 3:rl(),Os(Ls),Os(Ts),cl();break;case 5:il(r);break;case 4:rl();break;case 13:case 19:Os(sl);break;case 10:Ma(r.type._context);break;case 22:case 23:gd()}n=n.return}if(Tu=e,Lu=e=Dd(e.current,null),Iu=zu=t,Bu=0,Uu=null,Vu=Hu=Fu=0,qu=Wu=null,null!==za){for(t=0;t<za.length;t++)if(null!==(r=(n=za[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var s=i.next;i.next=o,r.next=s}n.pending=r}za=null}return e}function bd(e,t){for(;;){var n=Lu;try{if(Ra(),ul.current=oc,ml){for(var r=pl.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ml=!1}if(fl=0,vl=hl=pl=null,gl=!1,yl=0,Ou.current=null,null===n||null===n.return){Bu=1,Uu=t,Lu=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Iu,a.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=a,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=kc(s);if(null!==p){p.flags&=-257,Ec(p,s,a,0,t),1&p.mode&&xc(i,c,t),l=c;var h=(t=p).updateQueue;if(null===h){var v=new Set;v.add(l),t.updateQueue=v}else h.add(l);break e}if(!(1&t)){xc(i,c,t),xd();break e}l=Error(dt(426))}else if(da&&1&a.mode){var m=kc(s);if(null!==m){!(65536&m.flags)&&(m.flags|=256),Ec(m,s,a,0,t),xa(vc(l,a));break e}}i=l=vc(l,a),4!==Bu&&(Bu=2),null===Wu?Wu=[i]:Wu.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Ya(i,bc(0,l,t));break e;case 1:a=l;var g=i.type,y=i.stateNode;if(!(128&i.flags||"function"!=typeof g.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==Xu&&Xu.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t,Ya(i,wc(i,a,t));break e}}i=i.return}while(null!==i)}_d(n)}catch(b){t=b,Lu===n&&null!==n&&(Lu=n=n.return);continue}break}}function wd(){var e=$u.current;return $u.current=oc,null===e?oc:e}function xd(){0!==Bu&&3!==Bu&&2!==Bu||(Bu=4),null===Tu||!(268435455&Fu)&&!(268435455&Hu)||pd(Tu,Iu)}function kd(e,t){var n=Mu;Mu|=2;var r=wd();for(Tu===e&&Iu===t||(Qu=null,yd(e,t));;)try{Ed();break}catch(o){bd(e,o)}if(Ra(),Mu=n,$u.current=r,null!==Lu)throw Error(dt(261));return Tu=null,Iu=0,Bu}function Ed(){for(;null!==Lu;)Cd(Lu)}function Sd(){for(;null!==Lu&&!nr();)Cd(Lu)}function Cd(e){var t=Pu(e.alternate,e,zu);e.memoizedProps=e.pendingProps,null===t?_d(e):Lu=t,Ou.current=null}function _d(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=eu(n,t)))return n.flags&=32767,void(Lu=n);if(null===e)return Bu=6,void(Lu=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Zc(n,t,zu)))return void(Lu=n);if(null!==(t=t.sibling))return void(Lu=t);Lu=t=e}while(null!==t);0===Bu&&(Bu=5)}function Ad(e,t,n){var r=_r,o=Ru.transition;try{Ru.transition=null,_r=1,function(e,t,n,r){do{Nd()}while(null!==ed);if(6&Mu)throw Error(dt(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(dt(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-pr(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,i),e===Tu&&(Lu=Tu=null,Iu=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Zu||(Zu=!0,Td(lr,(function(){return Nd(),null}))),i=!!(15990&n.flags),!!(15990&n.subtreeFlags)||i){i=Ru.transition,Ru.transition=null;var s=_r;_r=1;var a=Mu;Mu|=4,Ou.current=null,function(e,t){if(as=Jr,wi(e=bi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(w){n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(a=s+o),d!==i||0!==r&&3!==d.nodeType||(l=s+r),3===d.nodeType&&(s+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(a=s),f===i&&++u===r&&(l=s),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===a||-1===l?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ls={focusedElem:e,selectionRange:n},Jr=!1,ou=t;null!==ou;)if(e=(t=ou).child,1028&t.subtreeFlags&&null!==e)e.return=t,ou=e;else for(;null!==ou;){t=ou;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var v=h.memoizedProps,m=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:lc(t.type,v),m);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(dt(163))}}catch(w){jd(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,ou=e;break}ou=t.return}h=au,au=!1}(e,n),ku(n,e),xi(ls),Jr=!!as,ls=as=null,e.current=n,Su(n),rr(),Mu=a,_r=s,Ru.transition=i}else e.current=n;if(Zu&&(Zu=!1,ed=e,td=o),i=e.pendingLanes,0===i&&(Xu=null),function(e){if(fr&&"function"==typeof fr.onCommitFiberRoot)try{fr.onCommitFiberRoot(dr,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),cd(e,or()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Gu)throw Gu=!1,e=Ju,Ju=null,e;!!(1&td)&&0!==e.tag&&Nd(),i=e.pendingLanes,1&i?e===rd?nd++:(nd=0,rd=e):nd=0,Qs()}(e,t,n,r)}finally{Ru.transition=o,_r=r}return null}function Nd(){if(null!==ed){var e=Ar(td),t=Ru.transition,n=_r;try{if(Ru.transition=null,_r=16>e?16:e,null===ed)var r=!1;else{if(e=ed,ed=null,td=0,6&Mu)throw Error(dt(331));var o=Mu;for(Mu|=4,ou=e.current;null!==ou;){var i=ou,s=i.child;if(16&ou.flags){var a=i.deletions;if(null!==a){for(var l=0;l<a.length;l++){var c=a[l];for(ou=c;null!==ou;){var u=ou;switch(u.tag){case 0:case 11:case 15:lu(8,u,i)}var d=u.child;if(null!==d)d.return=u,ou=d;else for(;null!==ou;){var f=(u=ou).sibling,p=u.return;if(du(u),u===c){ou=null;break}if(null!==f){f.return=p,ou=f;break}ou=p}}}var h=i.alternate;if(null!==h){var v=h.child;if(null!==v){h.child=null;do{var m=v.sibling;v.sibling=null,v=m}while(null!==v)}}ou=i}}if(2064&i.subtreeFlags&&null!==s)s.return=i,ou=s;else e:for(;null!==ou;){if(2048&(i=ou).flags)switch(i.tag){case 0:case 11:case 15:lu(9,i,i.return)}var g=i.sibling;if(null!==g){g.return=i.return,ou=g;break e}ou=i.return}}var y=e.current;for(ou=y;null!==ou;){var b=(s=ou).child;if(2064&s.subtreeFlags&&null!==b)b.return=s,ou=b;else e:for(s=y;null!==ou;){if(2048&(a=ou).flags)try{switch(a.tag){case 0:case 11:case 15:cu(9,a)}}catch(x){jd(a,a.return,x)}if(a===s){ou=null;break e}var w=a.sibling;if(null!==w){w.return=a.return,ou=w;break e}ou=a.return}}if(Mu=o,Qs(),fr&&"function"==typeof fr.onPostCommitFiberRoot)try{fr.onPostCommitFiberRoot(dr,e)}catch(x){}r=!0}return r}finally{_r=n,Ru.transition=t}}return!1}function Pd(e,t,n){e=qa(e,t=bc(0,t=vc(n,t),1),1),t=sd(),null!==e&&(Sr(e,1,t),cd(e,t))}function jd(e,t,n){if(3===e.tag)Pd(e,e,n);else for(;null!==t;){if(3===t.tag){Pd(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Xu||!Xu.has(r))){t=qa(t,e=wc(t,e=vc(n,e),1),1),e=sd(),null!==t&&(Sr(t,1,e),cd(t,e));break}}t=t.return}}function $d(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=sd(),e.pingedLanes|=e.suspendedLanes&n,Tu===e&&(Iu&n)===n&&(4===Bu||3===Bu&&(130023424&Iu)===Iu&&500>or()-Ku?yd(e,0):Vu|=n),cd(e,t)}function Od(e,t){0===t&&(1&e.mode?(t=gr,!(130023424&(gr<<=1))&&(gr=4194304)):t=1);var n=sd();null!==(e=Ua(e,t))&&(Sr(e,t,n),cd(e,n))}function Rd(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Od(e,n)}function Md(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(dt(314))}null!==r&&r.delete(t),Od(e,n)}function Td(e,t){return er(e,t)}function Ld(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Id(e,t,n,r){return new Ld(e,t,n,r)}function zd(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Dd(e,t){var n=e.alternate;return null===n?((n=Id(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Bd(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)zd(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case Pt:return Ud(n.children,o,i,t);case jt:s=8,o|=8;break;case $t:return(e=Id(12,n,t,2|o)).elementType=$t,e.lanes=i,e;case Tt:return(e=Id(13,n,t,o)).elementType=Tt,e.lanes=i,e;case Lt:return(e=Id(19,n,t,o)).elementType=Lt,e.lanes=i,e;case Dt:return Fd(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Ot:s=10;break e;case Rt:s=9;break e;case Mt:s=11;break e;case It:s=14;break e;case zt:s=16,r=null;break e}throw Error(dt(130,null==e?e:typeof e,""))}return(t=Id(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Ud(e,t,n,r){return(e=Id(7,e,r,t)).lanes=n,e}function Fd(e,t,n,r){return(e=Id(22,e,r,t)).elementType=Dt,e.lanes=n,e.stateNode={isHidden:!1},e}function Hd(e,t,n){return(e=Id(6,e,null,t)).lanes=n,e}function Vd(e,t,n){return(t=Id(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Wd(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Er(0),this.expirationTimes=Er(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Er(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function qd(e,t,n,r,o,i,s,a,l){return e=new Wd(e,t,n,a,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Id(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ha(i),e}function Kd(e){if(!e)return Ms;e:{if(Qn(e=e._reactInternals)!==e||1!==e.tag)throw Error(dt(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ds(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(dt(171))}if(1===e.tag){var n=e.type;if(Ds(n))return Fs(e,n,t)}return t}function Yd(e,t,n,r,o,i,s,a,l){return(e=qd(n,r,!0,e,0,i,0,a,l)).context=Kd(null),n=e.current,(i=Wa(r=sd(),o=ad(n))).callback=null!=t?t:null,qa(n,i,o),e.current.lanes=o,Sr(e,o,r),cd(e,r),e}function Qd(e,t,n,r){var o=t.current,i=sd(),s=ad(o);return n=Kd(n),null===t.context?t.context=n:t.pendingContext=n,(t=Wa(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=qa(o,t,s))&&(ld(e,o,s,i),Ka(e,o,s)),s}function Gd(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Jd(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xd(e,t){Jd(e,t),(e=e.alternate)&&Jd(e,t)}Pu=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ls.current)Cc=!0;else{if(!(e.lanes&n||128&t.flags))return Cc=!1,function(e,t,n){switch(t.tag){case 3:Tc(t),wa();break;case 5:ol(t);break;case 1:Ds(t.type)&&Hs(t);break;case 4:nl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Rs(Pa,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Rs(sl,1&sl.current),t.flags|=128,null):n&t.child.childLanes?Hc(e,t,n):(Rs(sl,1&sl.current),null!==(e=Gc(e,t,n))?e.sibling:null);Rs(sl,1&sl.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return Yc(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Rs(sl,sl.current),r)break;return null;case 22:case 23:return t.lanes=0,jc(e,t,n)}return Gc(e,t,n)}(e,t,n);Cc=!!(131072&e.flags)}else Cc=!1,da&&1048576&t.flags&&sa(t,Zs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qc(e,t),e=t.pendingProps;var o=zs(t,Ts.current);La(t,n),o=kl(null,t,r,e,o,n);var i=El();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ds(r)?(i=!0,Hs(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ha(t),o.updater=uc,t.stateNode=o,o._reactInternals=t,hc(t,r,e,n),t=Mc(null,t,r,!0,i,n)):(t.tag=0,da&&i&&aa(t),_c(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qc(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return zd(e)?1:0;if(null!=e){if((e=e.$$typeof)===Mt)return 11;if(e===It)return 14}return 2}(r),e=lc(r,e),o){case 0:t=Oc(null,t,r,e,n);break e;case 1:t=Rc(null,t,r,e,n);break e;case 11:t=Ac(null,t,r,e,n);break e;case 14:t=Nc(null,t,r,lc(r.type,e),n);break e}throw Error(dt(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Oc(e,t,r,o=t.elementType===r?o:lc(r,o),n);case 1:return r=t.type,o=t.pendingProps,Rc(e,t,r,o=t.elementType===r?o:lc(r,o),n);case 3:e:{if(Tc(t),null===e)throw Error(dt(387));r=t.pendingProps,o=(i=t.memoizedState).element,Va(e,t),Qa(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Lc(e,t,r,n,o=vc(Error(dt(423)),t));break e}if(r!==o){t=Lc(e,t,r,n,o=vc(Error(dt(424)),t));break e}for(ua=ms(t.stateNode.containerInfo.firstChild),ca=t,da=!0,fa=null,n=Na(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(wa(),r===o){t=Gc(e,t,n);break e}_c(e,t,r,n)}t=t.child}return t;case 5:return ol(t),null===e&&ma(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,cs(r,o)?s=null:null!==i&&cs(r,i)&&(t.flags|=32),$c(e,t),_c(e,t,s,n),t.child;case 6:return null===e&&ma(t),null;case 13:return Hc(e,t,n);case 4:return nl(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Aa(t,null,r,n):_c(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ac(e,t,r,o=t.elementType===r?o:lc(r,o),n);case 7:return _c(e,t,t.pendingProps,n),t.child;case 8:case 12:return _c(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Rs(Pa,r._currentValue),r._currentValue=s,null!==i)if(hi(i.value,s)){if(i.children===o.children&&!Ls.current){t=Gc(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var a=i.dependencies;if(null!==a){s=i.child;for(var l=a.firstContext;null!==l;){if(l.context===r){if(1===i.tag){(l=Wa(-1,n&-n)).tag=2;var c=i.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),Ta(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(10===i.tag)s=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(s=i.return))throw Error(dt(341));s.lanes|=n,null!==(a=s.alternate)&&(a.lanes|=n),Ta(s,n,t),s=i.sibling}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===t){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}_c(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,La(t,n),r=r(o=Ia(o)),t.flags|=1,_c(e,t,r,n),t.child;case 14:return o=lc(r=t.type,t.pendingProps),Nc(e,t,r,o=lc(r.type,o),n);case 15:return Pc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lc(r,o),Qc(e,t),t.tag=1,Ds(r)?(e=!0,Hs(t)):e=!1,La(t,n),fc(t,r,o),hc(t,r,o,n),Mc(null,t,r,!0,e,n);case 19:return Yc(e,t,n);case 22:return jc(e,t,n)}throw Error(dt(156,t.tag))};var Zd="function"==typeof reportError?reportError:function(e){console.error(e)};function ef(e){this._internalRoot=e}function tf(e){this._internalRoot=e}function nf(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function rf(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function of(){}function sf(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if("function"==typeof o){var a=o;o=function(){var e=Gd(s);a.call(e)}}Qd(t,s,e,o)}else s=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=Gd(s);i.call(e)}}var s=Yd(t,r,e,0,null,!1,0,"",of);return e._reactRootContainer=s,e[xs]=s.current,Qi(8===e.nodeType?e.parentNode:e),md(),s}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var a=r;r=function(){var e=Gd(l);a.call(e)}}var l=qd(e,0,!1,null,0,!1,0,"",of);return e._reactRootContainer=l,e[xs]=l.current,Qi(8===e.nodeType?e.parentNode:e),md((function(){Qd(t,l,n,r)})),l}(n,t,e,o,r);return Gd(s)}tf.prototype.render=ef.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(dt(409));Qd(e,t,null,null)},tf.prototype.unmount=ef.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;md((function(){Qd(null,e,null,null)})),t[xs]=null}},tf.prototype.unstable_scheduleHydration=function(e){if(e){var t=$r();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Br.length&&0!==t&&t<Br[n].priority;n++);Br.splice(n,0,e),0===n&&Vr(e)}},Nr=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=yr(t.pendingLanes);0!==n&&(Cr(t,1|n),cd(t,or()),!(6&Mu)&&(Yu=or()+500,Qs()))}break;case 13:md((function(){var t=Ua(e,1);if(null!==t){var n=sd();ld(t,e,1,n)}})),Xd(e,1)}},Pr=function(e){if(13===e.tag){var t=Ua(e,134217728);if(null!==t)ld(t,e,134217728,sd());Xd(e,134217728)}},jr=function(e){if(13===e.tag){var t=ad(e),n=Ua(e,t);if(null!==n)ld(n,e,t,sd());Xd(e,t)}},$r=function(){return _r},Or=function(e,t){var n=_r;try{return _r=e,t()}finally{_r=n}},Pn=function(e,t,n){switch(t){case"input":if(on(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Ns(r);if(!o)throw Error(dt(90));Zt(r),on(r,o)}}}break;case"textarea":fn(e,n);break;case"select":null!=(t=n.value)&&cn(e,!!n.multiple,t,!1)}},Tn=vd,Ln=md;var af={usingClientEntryPoint:!1,Events:[_s,As,Ns,Rn,Mn,vd]},lf={findFiberByHostInstance:Cs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},cf={bundleType:lf.bundleType,version:lf.version,rendererPackageName:lf.rendererPackageName,rendererConfig:lf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_t.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Xn(e))?null:e.stateNode},findFiberByHostInstance:lf.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uf.isDisabled&&uf.supportsFiber)try{dr=uf.inject(cf),fr=uf}catch(gn){}}it.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=af,it.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nf(t))throw Error(dt(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Nt,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},it.createRoot=function(e,t){if(!nf(e))throw Error(dt(299));var n=!1,r="",o=Zd;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=qd(e,1,!1,null,0,n,0,r,o),e[xs]=t.current,Qi(8===e.nodeType?e.parentNode:e),new ef(t)},it.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(dt(188));throw e=Object.keys(e).join(","),Error(dt(268,e))}return e=null===(e=Xn(t))?null:e.stateNode},it.flushSync=function(e){return md(e)},it.hydrate=function(e,t,n){if(!rf(t))throw Error(dt(200));return sf(null,e,t,!0,n)},it.hydrateRoot=function(e,t,n){if(!nf(e))throw Error(dt(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",s=Zd;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Yd(t,null,e,1,null!=n?n:null,o,0,i,s),e[xs]=t.current,Qi(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new tf(t)},it.render=function(e,t,n){if(!rf(t))throw Error(dt(200));return sf(null,e,t,!1,n)},it.unmountComponentAtNode=function(e){if(!rf(e))throw Error(dt(40));return!!e._reactRootContainer&&(md((function(){sf(null,null,e,!1,(function(){e._reactRootContainer=null,e[xs]=null}))})),!0)},it.unstable_batchedUpdates=vd,it.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!rf(n))throw Error(dt(200));if(null==e||void 0===e._reactInternals)throw Error(dt(38));return sf(e,t,n,!1,r)},it.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),ot.exports=it;var df=ot.exports;const ff=ae(df);var pf=df;function hf(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=hf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}rt.createRoot=pf.createRoot,rt.hydrateRoot=pf.hydrateRoot;const vf=e=>{const t=bf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),mf(n,t)||yf(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},mf=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),i=o?mf(e.slice(1),o):void 0;if(i)return i;if(0===t.validators.length)return;const s=e.join("-");return null==(n=t.validators.find((({validator:e})=>e(s))))?void 0:n.classGroupId},gf=/^\[(.+)\]$/,yf=e=>{if(gf.test(e)){const t=gf.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bf=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ef(Object.entries(e.classGroups),n).forEach((([e,n])=>{wf(n,r,e,t)})),r},wf=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return kf(e)?void wf(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{wf(o,xf(t,e),n,r)}))}else{(""===e?t:xf(t,e)).classGroupId=n}}))},xf=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},kf=e=>e.isThemeGetter,Ef=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,Sf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},Cf=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,s=e=>{const n=[];let s,a=0,l=0;for(let d=0;d<e.length;d++){let c=e[d];if(0===a){if(c===o&&(r||e.slice(d,d+i)===t)){n.push(e.slice(l,d)),l=d+i;continue}if("/"===c){s=d;continue}}"["===c?a++:"]"===c&&a--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:s&&s>l?s-l:void 0}};return n?e=>n({className:e,parseClassName:s}):s},_f=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},Af=/\s+/;function Nf(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Pf(e))&&(r&&(r+=" "),r+=t);return r}const Pf=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Pf(e[r]))&&(n&&(n+=" "),n+=t);return n};function jf(e,...t){let n,r,o,i=function(a){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:Sf(e.cacheSize),parseClassName:Cf(e),...vf(e)}))(l),r=n.cache.get,o=n.cache.set,i=s,s(a)};function s(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(Af);let a="";for(let l=s.length-1;l>=0;l-=1){const e=s[l],{modifiers:t,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(e);let f=Boolean(d),p=r(f?u.substring(0,d):u);if(!p){if(!f){a=e+(a.length>0?" "+a:a);continue}if(p=r(u),!p){a=e+(a.length>0?" "+a:a);continue}f=!1}const h=_f(t).join(":"),v=c?h+"!":h,m=v+p;if(i.includes(m))continue;i.push(m);const g=o(p,f);for(let n=0;n<g.length;++n){const e=g[n];i.push(v+e)}a=e+(a.length>0?" "+a:a)}return a})(e,n);return o(e,i),i}return function(){return i(Nf.apply(null,arguments))}}const $f=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Of=/^\[(?:([a-z-]+):)?(.+)\]$/i,Rf=/^\d+\/\d+$/,Mf=new Set(["px","full","screen"]),Tf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,If=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Df=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bf=e=>Ff(e)||Mf.has(e)||Rf.test(e),Uf=e=>tp(e,"length",np),Ff=e=>Boolean(e)&&!Number.isNaN(Number(e)),Hf=e=>tp(e,"number",Ff),Vf=e=>Boolean(e)&&Number.isInteger(Number(e)),Wf=e=>e.endsWith("%")&&Ff(e.slice(0,-1)),qf=e=>Of.test(e),Kf=e=>Tf.test(e),Yf=new Set(["length","size","percentage"]),Qf=e=>tp(e,Yf,rp),Gf=e=>tp(e,"position",rp),Jf=new Set(["image","url"]),Xf=e=>tp(e,Jf,ip),Zf=e=>tp(e,"",op),ep=()=>!0,tp=(e,t,n)=>{const r=Of.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},np=e=>Lf.test(e)&&!If.test(e),rp=()=>!1,op=e=>zf.test(e),ip=e=>Df.test(e),sp=jf((()=>{const e=$f("colors"),t=$f("spacing"),n=$f("blur"),r=$f("brightness"),o=$f("borderColor"),i=$f("borderRadius"),s=$f("borderSpacing"),a=$f("borderWidth"),l=$f("contrast"),c=$f("grayscale"),u=$f("hueRotate"),d=$f("invert"),f=$f("gap"),p=$f("gradientColorStops"),h=$f("gradientColorStopPositions"),v=$f("inset"),m=$f("margin"),g=$f("opacity"),y=$f("padding"),b=$f("saturate"),w=$f("scale"),x=$f("sepia"),k=$f("skew"),E=$f("space"),S=$f("translate"),C=()=>["auto",qf,t],_=()=>[qf,t],A=()=>["",Bf,Uf],N=()=>["auto",Ff,qf],P=()=>["","0",qf],j=()=>[Ff,qf];return{cacheSize:500,separator:":",theme:{colors:[ep],spacing:[Bf,Uf],blur:["none","",Kf,qf],brightness:j(),borderColor:[e],borderRadius:["none","","full",Kf,qf],borderSpacing:_(),borderWidth:A(),contrast:j(),grayscale:P(),hueRotate:j(),invert:P(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[Wf,Uf],inset:C(),margin:C(),opacity:j(),padding:_(),saturate:j(),scale:j(),sepia:P(),skew:j(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",qf]}],container:["container"],columns:[{columns:[Kf]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",qf]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Vf,qf]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qf]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Vf,qf]}],"grid-cols":[{"grid-cols":[ep]}],"col-start-end":[{col:["auto",{span:["full",Vf,qf]},qf]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[ep]}],"row-start-end":[{row:["auto",{span:[Vf,qf]},qf]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qf]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qf]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qf,t]}],"min-w":[{"min-w":[qf,t,"min","max","fit"]}],"max-w":[{"max-w":[qf,t,"none","full","min","max","fit","prose",{screen:[Kf]},Kf]}],h:[{h:[qf,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qf,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qf,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qf,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Kf,Uf]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hf]}],"font-family":[{font:[ep]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qf]}],"line-clamp":[{"line-clamp":["none",Ff,Hf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Bf,qf]}],"list-image":[{"list-image":["none",qf]}],"list-style-type":[{list:["none","disc","decimal",qf]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Bf,Uf]}],"underline-offset":[{"underline-offset":["auto",Bf,qf]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qf]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qf]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Gf]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Xf]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Bf,qf]}],"outline-w":[{outline:[Bf,Uf]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Bf,Uf]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kf,Zf]}],"shadow-color":[{shadow:[ep]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kf,qf]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qf]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",qf]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",qf]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Vf,qf]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qf]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qf]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qf]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Bf,Uf,Hf]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function ap(...e){return sp(function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=hf(e))&&(r&&(r+=" "),r+=t);return r}(e))}const lp={nDecimals:1/0,padToDecimals:!0,decimalSeparator:1.1.toLocaleString().includes(",")?",":"."},cp=(e,t,n={})=>{const{nDecimals:r,padToDecimals:o,decimalSeparator:i}={...lp,...n};if(null===e)return"";const s=10n**BigInt(t);if(r<t){e=(e/=10n**BigInt(t-(r+1)))/10n+(Math.abs(Number(e%10n))>4?e<0?-1n:1n:0n),e*=10n**BigInt(t-r)}const a=e<0n,l=a?-1n*e:e;let c=(l/s).toLocaleString();a&&(c="-"+c);const u=l%s;if(0===r||r===1/0&&0n===u||!1===o&&0n===u)return c;let d=u.toString().padStart(t,"0").replace(/00*$/,"");return r!==1/0&&!0===o&&(d=d.padEnd(r,"0")),c+i+d},up=qe.forwardRef((({className:e,...t},n)=>nt.jsx("div",{ref:n,className:ap("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t})));up.displayName="Card";const dp=qe.forwardRef((({className:e,...t},n)=>nt.jsx("div",{ref:n,className:ap("flex flex-col space-y-1.5 p-6",e),...t})));dp.displayName="CardHeader";const fp=qe.forwardRef((({className:e,...t},n)=>nt.jsx("h3",{ref:n,className:ap("text-2xl font-semibold leading-none tracking-tight",e),...t})));fp.displayName="CardTitle";qe.forwardRef((({className:e,...t},n)=>nt.jsx("p",{ref:n,className:ap("text-sm text-muted-foreground",e),...t}))).displayName="CardDescription";const pp=qe.forwardRef((({className:e,...t},n)=>nt.jsx("div",{ref:n,className:ap("p-6 pt-0",e),...t})));pp.displayName="CardContent";qe.forwardRef((({className:e,...t},n)=>nt.jsx("div",{ref:n,className:ap("flex items-center p-6 pt-0",e),...t}))).displayName="CardFooter";var hp=Object.defineProperty,vp=(e,t,n)=>(((e,t,n)=>{t in e?hp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),mp={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,A:10,B:11,C:12,D:13,E:14,F:15};var gp=class extends Uint8Array{constructor(e){super(e),vp(this,"i",0),vp(this,"v"),this.v=new DataView(e)}},yp=e=>t=>e(t instanceof gp?t:new gp(t instanceof Uint8Array?t.buffer:"string"==typeof t?function(e){const t=e.length%2,n=("x"===e[1]?2:0)+t,r=(e.length-n)/2+t,o=new Uint8Array(r);t&&(o[0]=0|mp[e[2]]);for(let i=0;i<r;){const r=n+2*i,s=mp[e[r]],a=mp[e[r+1]];o[t+i++]=s<<4|a}return o}(t).buffer:t)),bp=e=>{const t=e.length;let n=0;for(let o=0;o<t;o++)n+=e[o].length;const r=new Uint8Array(n);for(let o=0,i=0;o<t;o++){const t=e[o];r.set(t,i),i+=t.byteLength}return r};function wp(e,t){const n=Object.keys(e),r=n.length,o={};for(let i=0;i<r;i++){const r=n[i];o[r]=t(e[r],r)}return o}var xp=yp,kp=(e,t)=>{const n=[e,t];return n.enc=e,n.dec=t,n},Ep=(e,t)=>n=>e(t(n)),Sp=(e,t)=>n=>t(e(n)),Cp=([e,t],n,r)=>kp(Ep(e,n),Sp(t,r));function _p(e,t,n){return kp(function(e,t){return n=>{const r=new Uint8Array(e);return new DataView(r.buffer)[t](0,n,!0),r}}(e,n),function(e,t){return yp((n=>{const r=n.v[t](n.i,!0);return n.i+=e,r}))}(e,t))}var Ap=_p(1,"getUint8","setUint8"),Np=_p(2,"getUint16","setUint16"),Pp=_p(4,"getUint32","setUint32"),jp=_p(8,"getBigUint64","setBigUint64"),$p=_p(1,"getInt8","setInt8"),Op=_p(2,"getInt16","setInt16"),Rp=_p(4,"getInt32","setInt32"),Mp=_p(8,"getBigInt64","setBigInt64"),Tp=e=>{const t=new Uint8Array(16),n=new DataView(t.buffer);return n.setBigInt64(0,e,!0),n.setBigInt64(8,e>>64n,!0),t},Lp=e=>yp((t=>{const{v:n,i:r}=t,o=n.getBigUint64(r,!0),i=n[e](r+8,!0);return t.i+=16,i<<64n|o})),Ip=kp(Tp,Lp("getBigUint64")),zp=kp(Tp,Lp("getBigInt64")),Dp=e=>{const t=new Uint8Array(32),n=new DataView(t.buffer);return n.setBigInt64(0,e,!0),n.setBigInt64(8,e>>64n,!0),n.setBigInt64(16,e>>128n,!0),n.setBigInt64(24,e>>192n,!0),t},Bp=e=>yp((t=>{let n=t.v.getBigUint64(t.i,!0);return t.i+=8,n|=t.v.getBigUint64(t.i,!0)<<64n,t.i+=8,n|=t.v.getBigUint64(t.i,!0)<<128n,t.i+=8,n|=t.v[e](t.i,!0)<<192n,t.i+=8,n})),Up=kp(Dp,Bp("getBigUint64")),Fp=kp(Dp,Bp("getBigInt64")),Hp=Cp(Ap,(e=>e?1:0),Boolean),Vp=[Ap[1],Np[1],Pp[1]],Wp=yp((e=>{const t=e[e.i],n=3&t;if(n<3)return Vp[n](e)>>>2;const r=4+(t>>>2);e.i++;let o=0n;const i=r/8|0;let s=0n;for(let l=0;l<i;l++)o=jp[1](e)<<s|o,s+=64n;let a=r%8;return a>3&&(o=BigInt(Pp[1](e))<<s|o,s+=32n,a-=4),a>1&&(o=BigInt(Np[1](e))<<s|o,s+=16n,a-=2),a&&(o=BigInt(Ap[1](e))<<s|o),o})),qp=1n<<56n,Kp=1<<30,Yp=kp((e=>{if(e<0)throw new Error(`Wrong compact input (${e})`);const t=Number(e)<<2;if(e<64)return Ap[0](t);if(e<16384)return Np[0](1|t);if(e<Kp)return Pp[0](2|t);let n=[new Uint8Array(1)],r=BigInt(e);for(;r>=qp;)n.push(jp[0](r)),r>>=64n;r>=16777216&&(n.push(Pp[0](Number(4294967295n&r))),r>>=32n);let o=Number(r);o>=256&&(n.push(Np[0](o)),o>>=16),o&&n.push(Ap[0](o));const i=bp(n);return i[0]=i.length-5<<2|3,i}),Wp),Qp=new TextEncoder,Gp=new TextDecoder,Jp=yp((e=>{let t=Yp.dec(e);const n=new DataView(e.buffer,e.i,t);return e.i+=t,Gp.decode(n)})),Xp=kp((e=>{const t=Qp.encode(e);return bp([Yp.enc(t.length),t])}),Jp),Zp=new Uint8Array(0),eh=kp((()=>Zp),(()=>{})),th=e=>void 0===e?e=>bp([Yp.enc(e.length),e]):t=>t.length===e?t:t.slice(0,e),nh=e=>yp((t=>{const n=void 0===e?Yp.dec(t):e!==1/0?e:t.byteLength-t.i,r=new Uint8Array(t.buffer.slice(t.i,t.i+n));return t.i+=n,r})),rh=e=>kp(th(e),nh(e));rh.enc=th,rh.dec=nh;var oh=(e,t)=>{const n=Object.keys(e),r=new Map((null==t?void 0:t.map(((e,t)=>[n[t],e])))??n.map(((e,t)=>[e,t])));return({tag:t,value:n})=>{return bp([Ap.enc((o=t,r.get(o))),e[t](n)]);var o}},ih=(e,t)=>{const n=Object.keys(e),r=new Map((null==t?void 0:t.map(((e,t)=>[e,n[t]])))??n.map(((e,t)=>[t,e])));return yp((t=>{const n=Ap.dec(t),o=r.get(n);return{tag:o,value:(0,e[o])(t)}}))},sh=(e,...t)=>kp(oh(wp(e,(([e])=>e)),...t),ih(wp(e,(([,e])=>e)),...t));sh.enc=oh,sh.dec=ih;var ah=e=>yp((t=>Ap[1](t)>0?e(t):void 0)),lh=e=>t=>{const n=new Uint8Array(1);return void 0===t?n:(n[0]=1,bp([n,e(t)]))},ch=e=>kp(lh(e[0]),ah(e[1]));ch.enc=lh,ch.dec=ah;var uh=(e,t)=>yp((n=>{const r=0===Ap[1](n);return{success:r,value:(r?e:t)(n)}})),dh=(e,t)=>({success:n,value:r})=>bp([Ap[0](n?0:1),(n?e:t)(r)]),fh=(e,t)=>kp(dh(e[0],t[0]),uh(e[1],t[1]));fh.dec=uh,fh.enc=dh;var ph=(...e)=>yp((t=>e.map((e=>e(t))))),hh=(...e)=>t=>bp(e.map(((e,n)=>e(t[n])))),vh=(...e)=>kp(hh(...e.map((([e])=>e))),ph(...e.map((([,e])=>e))));vh.enc=hh,vh.dec=ph;var mh=e=>{const t=Object.keys(e);return Ep(vh.enc(...Object.values(e)),(e=>t.map((t=>e[t]))))},gh=e=>{const t=Object.keys(e);return Sp(vh.dec(...Object.values(e)),(e=>Object.fromEntries(e.map(((e,n)=>[t[n],e])))))},yh=e=>kp(mh(wp(e,(e=>e[0]))),gh(wp(e,(e=>e[1]))));yh.enc=mh,yh.dec=gh;var bh=(e,t)=>t>=0?t=>bp(t.map(e)):t=>bp([Yp.enc(t.length),bp(t.map(e))]),wh=(e,t)=>yp((n=>{const r=t>=0?t:Yp.dec(n),o=new Array(r);for(let t=0;t<r;t++)o[t]=e(n);return o})),xh=(e,t)=>kp(bh(e[0],t),wh(e[1],t));function kh(...e){const t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map((e=>e.encode)).reduceRight(n,t),decode:e.map((e=>e.decode)).reduce(n,t)}}function Eh(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const n=e.indexOf(t);if(-1===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}}function Sh(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function Ch(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const o=[],i=Array.from(e);for(i.forEach((e=>{if(e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,s=!0;for(let o=r;o<i.length;o++){const a=i[o],l=t*e+a;if(!Number.isSafeInteger(l)||t*e/t!==e||l-a!=t*e)throw new Error("convertRadix: carry overflow");e=l%n;const c=Math.floor(l/n);if(i[o]=c,!Number.isSafeInteger(c)||c*n+e!==l)throw new Error("convertRadix: carry overflow");s&&(c?s=!1:r=o)}if(o.push(e),s)break}for(let s=0;s<e.length-1&&0===e[s];s++)o.push(0);return o.reverse()}function _h(e){return{encode:t=>{if(!function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}(t))throw new Error("radix.encode input should be Uint8Array");return Ch(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(Ch(t,e,256))}}}xh.enc=bh,xh.dec=wh;const Ah=(e=>kh(_h(58),Eh(e),Sh("")))("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function Nh(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function Ph(e,...t){if(!function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function jh(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function $h(e,t){Ph(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const Oh=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Rh=(e,t)=>e<<32-t|e>>>t,Mh=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],Th=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,Lh=Mh?e=>e:e=>Th(e);function Ih(e){for(let t=0;t<e.length;t++)e[t]=Th(e[t])}function zh(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),Ph(e),e}class Dh{clone(){return this._cloneInto()}}function Bh(e){const t=(t,n)=>e(n).update(zh(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}function Uh(e){const t=(t,n)=>e(n).update(zh(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}const Fh=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3]);class Hh extends Dh{constructor(e,t,n={},r,o,i){if(super(),this.blockLen=e,this.outputLen=t,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,Nh(e),Nh(t),Nh(r),t<0||t>r)throw new Error("outputLen bigger than keyLen");if(void 0!==n.key&&(n.key.length<1||n.key.length>r))throw new Error(`key must be up 1..${r} byte long or undefined`);if(void 0!==n.salt&&n.salt.length!==o)throw new Error(`salt must be ${o} byte long or undefined`);if(void 0!==n.personalization&&n.personalization.length!==i)throw new Error(`personalization must be ${i} byte long or undefined`);this.buffer32=Oh(this.buffer=new Uint8Array(e))}update(e){jh(this);const{blockLen:t,buffer:n,buffer32:r}=this,o=(e=zh(e)).length,i=e.byteOffset,s=e.buffer;for(let a=0;a<o;){this.pos===t&&(Mh||Ih(r),this.compress(r,0,!1),Mh||Ih(r),this.pos=0);const l=Math.min(t-this.pos,o-a),c=i+a;if(l!==t||c%4||!(a+l<o))n.set(e.subarray(a,a+l),this.pos),this.pos+=l,this.length+=l,a+=l;else{const e=new Uint32Array(s,c,Math.floor((o-a)/4));Mh||Ih(e);for(let n=0;a+t<o;n+=r.length,a+=t)this.length+=t,this.compress(e,n,!1);Mh||Ih(e)}}return this}digestInto(e){jh(this),$h(e,this);const{pos:t,buffer32:n}=this;this.finished=!0,this.buffer.subarray(t).fill(0),Mh||Ih(n),this.compress(n,0,!0),Mh||Ih(n);const r=Oh(e);this.get().forEach(((e,t)=>r[t]=Lh(e)))}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){const{buffer:t,length:n,finished:r,destroyed:o,outputLen:i,pos:s}=this;return e||(e=new this.constructor({dkLen:i})),e.set(...this.get()),e.length=n,e.finished=r,e.destroyed=o,e.outputLen=i,e.buffer.set(t),e.pos=s,e}}const Vh=BigInt(2**32-1),Wh=BigInt(32);function qh(e,t=!1){return t?{h:Number(e&Vh),l:Number(e>>Wh&Vh)}:{h:0|Number(e>>Wh&Vh),l:0|Number(e&Vh)}}function Kh(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:i,l:s}=qh(e[o],t);[n[o],r[o]]=[i,s]}return[n,r]}const Yh=(e,t,n)=>e<<n|t>>>32-n,Qh=(e,t,n)=>t<<n|e>>>32-n,Gh=(e,t,n)=>t<<n-32|e>>>64-n,Jh=(e,t,n)=>e<<n-32|t>>>64-n;const Xh={fromBig:qh,split:Kh,toBig:(e,t)=>BigInt(e>>>0)<<Wh|BigInt(t>>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:Yh,rotlSL:Qh,rotlBH:Gh,rotlBL:Jh,add:function(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,add5H:(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,add5L:(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0)},Zh=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),ev=new Uint32Array(32);function tv(e,t,n,r,o,i){const s=o[i],a=o[i+1];let l=ev[2*e],c=ev[2*e+1],u=ev[2*t],d=ev[2*t+1],f=ev[2*n],p=ev[2*n+1],h=ev[2*r],v=ev[2*r+1],m=Xh.add3L(l,u,s);c=Xh.add3H(m,c,d,a),l=0|m,({Dh:v,Dl:h}={Dh:v^c,Dl:h^l}),({Dh:v,Dl:h}={Dh:Xh.rotr32H(v,h),Dl:Xh.rotr32L(v,h)}),({h:p,l:f}=Xh.add(p,f,v,h)),({Bh:d,Bl:u}={Bh:d^p,Bl:u^f}),({Bh:d,Bl:u}={Bh:Xh.rotrSH(d,u,24),Bl:Xh.rotrSL(d,u,24)}),ev[2*e]=l,ev[2*e+1]=c,ev[2*t]=u,ev[2*t+1]=d,ev[2*n]=f,ev[2*n+1]=p,ev[2*r]=h,ev[2*r+1]=v}function nv(e,t,n,r,o,i){const s=o[i],a=o[i+1];let l=ev[2*e],c=ev[2*e+1],u=ev[2*t],d=ev[2*t+1],f=ev[2*n],p=ev[2*n+1],h=ev[2*r],v=ev[2*r+1],m=Xh.add3L(l,u,s);c=Xh.add3H(m,c,d,a),l=0|m,({Dh:v,Dl:h}={Dh:v^c,Dl:h^l}),({Dh:v,Dl:h}={Dh:Xh.rotrSH(v,h,16),Dl:Xh.rotrSL(v,h,16)}),({h:p,l:f}=Xh.add(p,f,v,h)),({Bh:d,Bl:u}={Bh:d^p,Bl:u^f}),({Bh:d,Bl:u}={Bh:Xh.rotrBH(d,u,63),Bl:Xh.rotrBL(d,u,63)}),ev[2*e]=l,ev[2*e+1]=c,ev[2*t]=u,ev[2*t+1]=d,ev[2*n]=f,ev[2*n+1]=p,ev[2*r]=h,ev[2*r+1]=v}class rv extends Hh{constructor(e={}){super(128,void 0===e.dkLen?64:e.dkLen,e,64,16,16),this.v0l=0|Zh[0],this.v0h=0|Zh[1],this.v1l=0|Zh[2],this.v1h=0|Zh[3],this.v2l=0|Zh[4],this.v2h=0|Zh[5],this.v3l=0|Zh[6],this.v3h=0|Zh[7],this.v4l=0|Zh[8],this.v4h=0|Zh[9],this.v5l=0|Zh[10],this.v5h=0|Zh[11],this.v6l=0|Zh[12],this.v6h=0|Zh[13],this.v7l=0|Zh[14],this.v7h=0|Zh[15];const t=e.key?e.key.length:0;if(this.v0l^=this.outputLen|t<<8|65536|1<<24,e.salt){const t=Oh(zh(e.salt));this.v4l^=Lh(t[0]),this.v4h^=Lh(t[1]),this.v5l^=Lh(t[2]),this.v5h^=Lh(t[3])}if(e.personalization){const t=Oh(zh(e.personalization));this.v6l^=Lh(t[0]),this.v6h^=Lh(t[1]),this.v7l^=Lh(t[2]),this.v7h^=Lh(t[3])}if(e.key){const t=new Uint8Array(this.blockLen);t.set(zh(e.key)),this.update(t)}}get(){let{v0l:e,v0h:t,v1l:n,v1h:r,v2l:o,v2h:i,v3l:s,v3h:a,v4l:l,v4h:c,v5l:u,v5h:d,v6l:f,v6h:p,v7l:h,v7h:v}=this;return[e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,v]}set(e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,v){this.v0l=0|e,this.v0h=0|t,this.v1l=0|n,this.v1h=0|r,this.v2l=0|o,this.v2h=0|i,this.v3l=0|s,this.v3h=0|a,this.v4l=0|l,this.v4h=0|c,this.v5l=0|u,this.v5h=0|d,this.v6l=0|f,this.v6h=0|p,this.v7l=0|h,this.v7h=0|v}compress(e,t,n){this.get().forEach(((e,t)=>ev[t]=e)),ev.set(Zh,16);let{h:r,l:o}=Xh.fromBig(BigInt(this.length));ev[24]=Zh[8]^o,ev[25]=Zh[9]^r,n&&(ev[28]=~ev[28],ev[29]=~ev[29]);let i=0;const s=Fh;for(let a=0;a<12;a++)tv(0,4,8,12,e,t+2*s[i++]),nv(0,4,8,12,e,t+2*s[i++]),tv(1,5,9,13,e,t+2*s[i++]),nv(1,5,9,13,e,t+2*s[i++]),tv(2,6,10,14,e,t+2*s[i++]),nv(2,6,10,14,e,t+2*s[i++]),tv(3,7,11,15,e,t+2*s[i++]),nv(3,7,11,15,e,t+2*s[i++]),tv(0,5,10,15,e,t+2*s[i++]),nv(0,5,10,15,e,t+2*s[i++]),tv(1,6,11,12,e,t+2*s[i++]),nv(1,6,11,12,e,t+2*s[i++]),tv(2,7,8,13,e,t+2*s[i++]),nv(2,7,8,13,e,t+2*s[i++]),tv(3,4,9,14,e,t+2*s[i++]),nv(3,4,9,14,e,t+2*s[i++]);this.v0l^=ev[0]^ev[16],this.v0h^=ev[1]^ev[17],this.v1l^=ev[2]^ev[18],this.v1h^=ev[3]^ev[19],this.v2l^=ev[4]^ev[20],this.v2h^=ev[5]^ev[21],this.v3l^=ev[6]^ev[22],this.v3h^=ev[7]^ev[23],this.v4l^=ev[8]^ev[24],this.v4h^=ev[9]^ev[25],this.v5l^=ev[10]^ev[26],this.v5h^=ev[11]^ev[27],this.v6l^=ev[12]^ev[28],this.v6h^=ev[13]^ev[29],this.v7l^=ev[14]^ev[30],this.v7h^=ev[15]^ev[31],ev.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const ov=Bh((e=>new rv(e))),iv=(new TextEncoder).encode("SS58PRE"),sv=e=>{try{const t=Ah.decode(e),n=t.subarray(0,64&t[0]?2:1),r=t.subarray(n.length,t.length-2),o=t.subarray(n.length+r.length),i=ov(Uint8Array.of(...iv,...n,...r),{dkLen:64}).subarray(0,2);return o[0]===i[0]&&o[1]===i[1]?{isValid:!0,ss58Format:av(n),publicKey:r.slice()}:{isValid:!1}}catch(t){return{isValid:!1}}},av=e=>{const t=new DataView(e.buffer,e.byteOffset,e.byteLength);return 1===t.byteLength?t.getUint8(0):t.getUint16(0)},lv=e=>{const t=e<64?Uint8Array.of(e):Uint8Array.of((252&e)>>2|64,e>>8|(3&e)<<6);return e=>{const n=ov(Uint8Array.of(...iv,...t,...e),{dkLen:64}).subarray(0,2);return Ah.encode(Uint8Array.of(...t,...e,...n))}};const cv=(e=42,t=32)=>Cp(rh(t),function(e){return t=>{const n=sv(t);if(!n.isValid)throw new Error("Invalid checksum");const{publicKey:r}=n;if(r.length!==e)throw new Error("Invalid public key length");return r}}(t),lv(e)),uv="0123456789abcdef";function dv(e){const t=new Array(e.length+1);t[0]="0x";for(let n=0;n<e.length;){const r=e[n++];t[n]=uv[r>>4]+uv[15&r]}return t.join("")}const fv={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,A:10,B:11,C:12,D:13,E:14,F:15};function pv(e){const t=e.length%2,n=("x"===e[1]?2:0)+t,r=(e.length-n)/2+t,o=new Uint8Array(r);t&&(o[0]=0|fv[e[2]]);for(let i=0;i<r;){const r=n+2*i,s=fv[e[r]],a=fv[e[r+1]];o[t+i++]=s<<4|a}return o}function hv(e,t){return Object.fromEntries(Object.entries(e).map((([e,n])=>[e,t(n,e)])))}const vv=(...e)=>{const t=e.reduce(((e,t)=>e+t.byteLength),0),n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const t=e[r];n.set(t,o),o+=t.byteLength}return n},mv=Function.prototype;class gv extends Error{constructor(){super("Abort Error"),this.name="AbortError"}}var yv,bv,wv,xv,kv,Ev=Object.defineProperty,Sv=e=>{throw TypeError(e)},Cv=(e,t,n)=>((e,t,n)=>t in e?Ev(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),_v=(e,t,n)=>t.has(e)||Sv("Cannot "+n),Av=(e,t,n)=>(_v(e,t,"read from private field"),n?n.call(e):t.get(e)),Nv=(e,t,n)=>t.has(e)?Sv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Pv=(e,t,n,r)=>(_v(e,t,"write to private field"),t.set(e,n),n);const jv=new TextEncoder,$v=new TextDecoder,Ov=vh(Yp,rh(1/0))[1];class Rv{constructor(e,t=!1){if(Nv(this,yv),Nv(this,bv,null),Nv(this,wv,null),Nv(this,xv,null),Nv(this,kv,null),Cv(this,"asText",(()=>Av(this,kv)??Pv(this,kv,$v.decode(Av(this,yv))))),Cv(this,"asHex",(()=>Av(this,wv)||Pv(this,wv,dv(Av(this,yv))))),Cv(this,"asOpaqueHex",(()=>Av(this,xv)||Pv(this,xv,dv(this.asBytes())))),Cv(this,"asBytes",(()=>Av(this,yv))),Cv(this,"asOpaqueBytes",(()=>Av(this,bv)||Pv(this,bv,vv(Yp[0](Av(this,yv).length),Av(this,yv))))),t){try{const[t,n]=Ov(e);if(t===n.length)return Pv(this,yv,n),void Pv(this,bv,e)}catch(n){}throw new Error("Invalid opaque bytes")}Pv(this,yv,e)}static fromText(e){return new this(jv.encode(e))}static fromHex(e){return new this(pv(e))}static fromOpaqueHex(e){return new this(pv(e),!0)}static fromBytes(e){return new this(e)}static fromOpaqueBytes(e){return new this(e,!0)}}yv=new WeakMap,bv=new WeakMap,wv=new WeakMap,xv=new WeakMap,kv=new WeakMap;const[Mv]=cv();class Tv extends Rv{constructor(e){super(e)}static fromArray(e){return new this(new Uint8Array(e))}static fromAccountId32(e){return new this(Mv(e))}}const Lv=e=>{const t=rh.enc(e);return e=>t(e.asBytes())},Iv=e=>{const t=rh.dec(e),n=null==e?Rv:Tv;return e=>n.fromBytes(t(e))},zv=e=>kp(Lv(e),Iv(e));zv.enc=Lv,zv.dec=Iv;const Dv=Yp,Bv=Yp,Uv=xp((e=>{const t=Dv.dec(e),n=Math.ceil(t/8);return{bytes:rh(n).dec(e),bitsLen:t}})),Fv=kp((e=>{if(e.bitsLen>8*e.bytes.length)throw new Error(`Not enough bytes. (bitsLen:${e.bitsLen}, bytesLen:${e.bytes.length})`);const t=Dv.enc(e.bitsLen),n=new Uint8Array(e.bytes.length+t.length);return n.set(t,0),n.set(e.bytes,t.length),n}),Uv),Hv=Cp(Ap,(e=>e.charCodeAt(0)),String.fromCharCode),Vv=e=>{const t=rh.enc(e);return e=>t(pv(e))},Wv=e=>{const t=rh.dec(e);return e=>dv(t(e))},qv=e=>kp(Vv(e),Wv(e));qv.enc=Vv,qv.dec=Wv;const Kv=new TextEncoder,Yv=new TextDecoder,Qv=e=>{let t=n=>{const r=e();return t=r,r(n)};return e=>t(e)},Gv=e=>{let t=n=>{const r=e();return t=r,r(n)};return e=>t(e)},Jv=e=>kp(Qv((()=>e().enc)),Gv((()=>e().dec))),Xv={is:(e,t)=>e.type===t,as(e,t){if(t!==e.type)throw new Error(`Enum.as(enum, ${t}) used with actual type ${e.type}`);return e}},Zv=Object.assign(((e,t)=>({type:e,value:t})),Xv),em=new Proxy({},{get:(e,t)=>e=>Zv(t,e)}),tm=(...e)=>{const t=sh.enc(...e);return e=>t({tag:e.type,value:e.value})},nm=(...e)=>{const t=sh.dec(...e);return e=>{const{tag:n,value:r}=t(e);return Zv(n,r)}},rm=(e,...t)=>kp(tm(hv(e,(([e])=>e)),...t),nm(hv(e,(([,e])=>e)),...t));rm.enc=tm,rm.dec=nm;const om=[],im=[],sm=[],am=BigInt(0),lm=BigInt(1),cm=BigInt(2),um=BigInt(7),dm=BigInt(256),fm=BigInt(113);for(let uI=0,dI=lm,fI=1,pI=0;uI<24;uI++){[fI,pI]=[pI,(2*fI+3*pI)%5],om.push(2*(5*pI+fI)),im.push((uI+1)*(uI+2)/2%64);let e=am;for(let t=0;t<7;t++)dI=(dI<<lm^(dI>>um)*fm)%dm,dI&cm&&(e^=lm<<(lm<<BigInt(t))-lm);sm.push(e)}const[pm,hm]=Kh(sm,!0),vm=(e,t,n)=>n>32?Gh(e,t,n):Yh(e,t,n),mm=(e,t,n)=>n>32?Jh(e,t,n):Qh(e,t,n);class gm extends Dh{constructor(e,t,n,r=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Nh(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Oh(this.state)}keccak(){Mh||Ih(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,o=(r+2)%10,i=n[o],s=n[o+1],a=vm(i,s,1)^n[t],l=mm(i,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=l}let t=e[2],o=e[3];for(let n=0;n<24;n++){const r=im[n],i=vm(t,o,r),s=mm(t,o,r),a=om[n];t=e[a],o=e[a+1],e[a]=i,e[a+1]=s}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=pm[r],e[1]^=hm[r]}n.fill(0)}(this.state32,this.rounds),Mh||Ih(this.state32),this.posOut=0,this.pos=0}update(e){jh(this);const{blockLen:t,state:n}=this,r=(e=zh(e)).length;for(let o=0;o<r;){const i=Math.min(t-this.pos,r-o);for(let t=0;t<i;t++)n[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,128&t&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){jh(this,!1),Ph(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,o=e.length;r<o;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Nh(e),this.xofInto(new Uint8Array(e))}digestInto(e){if($h(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:o,enableXOF:i}=this;return e||(e=new gm(t,n,r,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=r,e.enableXOF=i,e.destroyed=this.destroyed,e}}const ym=((e,t,n)=>function(e){const t=t=>e().update(zh(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}((()=>new gm(t,e,n))))(1,136,32),bm=e=>{const t=e.slice(2),n=dv(ym(t)).slice(2),r=new Array(40);for(let o=0;o<40;o++){const e=parseInt(n[o],16),i=t[o];r[o]=e>7?i.toUpperCase():i}return`0x${r.join("")}`},wm=rh(20)[1],xm=kp((e=>{const t=pv(e);if(20!==t.length)throw new Error(`Invalid length found on EthAddress(${e})`);const n=dv(t);if(e===n||e===n.toUpperCase())return t;if(bm(n)!==e)throw new Error(`Invalid checksum found on EthAddress(${e})`);return t}),xp((e=>bm(dv(wm(e)))))),km=new TextEncoder,Em=new TextDecoder,Sm=Cp(rh(4),km.encode.bind(km),Em.decode.bind(Em)),Cm=yh({engine:Sm,payload:qv()}),_m=rm({consensus:Cm,seal:Cm,preRuntime:Cm,runtimeUpdated:eh},[4,5,6,8]),Am=qv(32),Nm=yh({parentHash:Am,number:Dv,stateRoot:Am,extrinsicRoot:Am,digests:xh(_m)}),Pm=xh(Xp),jm=ch(Xp),$m=sh({bool:eh,char:eh,str:eh,u8:eh,u16:eh,u32:eh,u64:eh,u128:eh,u256:eh,i8:eh,i16:eh,i32:eh,i64:eh,i128:eh,i256:eh}),Om=xh(yh({name:jm,type:Dv,typeName:jm,docs:Pm})),Rm=yh({len:Pp,type:Dv}),Mm=yh({bitStoreType:Dv,bitOrderType:Dv}),Tm=xh(yh({name:Xp,fields:Om,index:Ap,docs:Pm})),Lm=sh({composite:Om,variant:Tm,sequence:Dv,array:Rm,tuple:xh(Dv),primitive:$m,compact:Dv,bitSequence:Mm}),Im=yh({name:Xp,type:ch(Dv)}),zm=xh(Im),Dm=yh({id:Dv,path:Pm,params:zm,def:Lm,docs:Pm}),Bm=xh(Dm),Um=sh({Blake2128:eh,Blake2256:eh,Blake2128Concat:eh,Twox128:eh,Twox256:eh,Twox64Concat:eh,Identity:eh}),Fm=xh(Um),Hm=yh({hashers:Fm,key:Dv,value:Dv}),Vm=yh({name:Xp,modifier:Ap,type:sh({plain:Dv,map:Hm}),fallback:qv(),docs:Pm}),Wm={name:Xp,storage:ch(yh({prefix:Xp,items:xh(Vm)})),calls:ch(Dv),events:ch(Dv),constants:xh(yh({name:Xp,type:Dv,value:qv(),docs:Pm})),errors:ch(Dv),index:Ap},qm={...Wm,docs:Pm},Km=new Uint8Array,Ym=e=>kp((()=>Km),(()=>e)),Qm=yh({type:Dv,version:Ap,signedExtensions:xh(yh({identifier:Xp,type:Dv,additionalSigned:Dv}))}),Gm=yh({lookup:Bm,pallets:xh(yh({...Wm,docs:Ym([])})),extrinsic:Qm,type:Dv,apis:Ym([])}),Jm=yh({name:Xp,methods:xh(yh({name:Xp,inputs:xh(yh({name:Xp,type:Dv})),output:Dv,docs:Pm})),docs:Pm}),Xm=yh({version:Ap,address:Dv,call:Dv,signature:Dv,extra:Dv,signedExtensions:xh(yh({identifier:Xp,type:Dv,additionalSigned:Dv}))}),Zm=yh({lookup:Bm,pallets:xh(yh(qm)),extrinsic:Xm,type:Dv,apis:xh(Jm),outerEnums:yh({call:Dv,event:Dv,error:Dv}),custom:xh(vh(Xp,yh({type:Dv,value:qv()})))}),eg=()=>{throw new Error("Unsupported metadata version!")},tg=kp(eg,eg),ng=yh({magicNumber:Pp,metadata:sh({v0:tg,v1:tg,v2:tg,v3:tg,v4:tg,v5:tg,v6:tg,v7:tg,v8:tg,v9:tg,v10:tg,v11:tg,v12:tg,v13:tg,v14:Gm,v15:Zm})}),rg=rh(),og=ch(rg),ig=vh(Yp,rg),sg=e=>{try{return ng.dec(e)}catch(t){}try{return ng.dec(og.dec(e))}catch(t){}try{return ng.dec(rg.dec(e))}catch(t){}try{return ng.dec(ig.dec(e)[1])}catch(t){}throw null},ag={dkLen:32},lg=e=>ov(e,ag),cg={dkLen:16},ug=e=>ov(e,cg),dg=e=>vv(ug(e),e),fg=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);function pg(e,t,n,r,o){return r=Rh(r^(e=e+t+o|0),16),{a:e,b:t=Rh(t^(n=n+r|0),12),c:n,d:r}}function hg(e,t,n,r,o){return r=Rh(r^(e=e+t+o|0),8),{a:e,b:t=Rh(t^(n=n+r|0),7),c:n,d:r}}function vg(e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,v,m,g,y,b){let w=0;for(let x=0;x<r;x++)({a:o,b:l,c:f,d:m}=pg(o,l,f,m,n[t+e[w++]])),({a:o,b:l,c:f,d:m}=hg(o,l,f,m,n[t+e[w++]])),({a:i,b:c,c:p,d:g}=pg(i,c,p,g,n[t+e[w++]])),({a:i,b:c,c:p,d:g}=hg(i,c,p,g,n[t+e[w++]])),({a:s,b:u,c:h,d:y}=pg(s,u,h,y,n[t+e[w++]])),({a:s,b:u,c:h,d:y}=hg(s,u,h,y,n[t+e[w++]])),({a:a,b:d,c:v,d:b}=pg(a,d,v,b,n[t+e[w++]])),({a:a,b:d,c:v,d:b}=hg(a,d,v,b,n[t+e[w++]])),({a:o,b:c,c:h,d:b}=pg(o,c,h,b,n[t+e[w++]])),({a:o,b:c,c:h,d:b}=hg(o,c,h,b,n[t+e[w++]])),({a:i,b:u,c:v,d:m}=pg(i,u,v,m,n[t+e[w++]])),({a:i,b:u,c:v,d:m}=hg(i,u,v,m,n[t+e[w++]])),({a:s,b:d,c:f,d:g}=pg(s,d,f,g,n[t+e[w++]])),({a:s,b:d,c:f,d:g}=hg(s,d,f,g,n[t+e[w++]])),({a:a,b:l,c:p,d:y}=pg(a,l,p,y,n[t+e[w++]])),({a:a,b:l,c:p,d:y}=hg(a,l,p,y,n[t+e[w++]]));return{v0:o,v1:i,v2:s,v3:a,v4:l,v5:c,v6:u,v7:d,v8:f,v9:p,v10:h,v11:v,v12:m,v13:g,v14:y,v15:b}}const mg=(()=>{const e=Array.from({length:16},((e,t)=>t)),t=e=>[2,6,3,10,7,0,4,13,1,11,12,5,9,14,15,8].map((t=>e[t])),n=[];for(let r=0,o=e;r<7;r++,o=t(o))n.push(...o);return Uint8Array.from(n)})();class gg extends Hh{constructor(e={},t=0){if(super(64,void 0===e.dkLen?32:e.dkLen,{},Number.MAX_SAFE_INTEGER,0,0),this.flags=0,this.chunkPos=0,this.chunksDone=0,this.stack=[],this.posOut=0,this.bufferOut32=new Uint32Array(16),this.chunkOut=0,this.enableXOF=!0,this.outputLen=void 0===e.dkLen?32:e.dkLen,Nh(this.outputLen),void 0!==e.key&&void 0!==e.context)throw new Error("Blake3: only key or context can be specified at same time");if(void 0!==e.key){const n=zh(e.key).slice();if(32!==n.length)throw new Error("Blake3: key should be 32 byte");this.IV=Oh(n),Mh||Ih(this.IV),this.flags=16|t}else if(void 0!==e.context){const n=new gg({dkLen:32},32).update(e.context).digest();this.IV=Oh(n),Mh||Ih(this.IV),this.flags=64|t}else this.IV=fg.slice(),this.flags=t;var n;this.state=this.IV.slice(),this.bufferOut=(n=this.bufferOut32,new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}get(){return[]}set(){}b2Compress(e,t,n,r=0){const{state:o,pos:i}=this,{h:s,l:a}=qh(BigInt(e),!0),{v0:l,v1:c,v2:u,v3:d,v4:f,v5:p,v6:h,v7:v,v8:m,v9:g,v10:y,v11:b,v12:w,v13:x,v14:k,v15:E}=vg(mg,r,n,7,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],fg[0],fg[1],fg[2],fg[3],s,a,i,t);o[0]=l^m,o[1]=c^g,o[2]=u^y,o[3]=d^b,o[4]=f^w,o[5]=p^x,o[6]=h^k,o[7]=v^E}compress(e,t=0,n=!1){let r=this.flags;if(this.chunkPos||(r|=1),(15===this.chunkPos||n)&&(r|=2),n||(this.pos=this.blockLen),this.b2Compress(this.chunksDone,r,e,t),this.chunkPos+=1,16===this.chunkPos||n){let e=this.state;this.state=this.IV.slice();for(let t,r=this.chunksDone+1;(n||!(1&r))&&(t=this.stack.pop());r>>=1)this.buffer32.set(t,0),this.buffer32.set(e,8),this.pos=this.blockLen,this.b2Compress(0,4|this.flags,this.buffer32,0),e=this.state,this.state=this.IV.slice();this.chunksDone++,this.chunkPos=0,this.stack.push(e)}this.pos=0}_cloneInto(e){e=super._cloneInto(e);const{IV:t,flags:n,state:r,chunkPos:o,posOut:i,chunkOut:s,stack:a,chunksDone:l}=this;return e.state.set(r.slice()),e.stack=a.map((e=>Uint32Array.from(e))),e.IV.set(t),e.flags=n,e.chunkPos=o,e.chunksDone=l,e.posOut=i,e.chunkOut=s,e.enableXOF=this.enableXOF,e.bufferOut32.set(this.bufferOut32),e}destroy(){this.destroyed=!0,this.state.fill(0),this.buffer32.fill(0),this.IV.fill(0),this.bufferOut32.fill(0);for(let e of this.stack)e.fill(0)}b2CompressOut(){const{state:e,pos:t,flags:n,buffer32:r,bufferOut32:o}=this,{h:i,l:s}=qh(BigInt(this.chunkOut++));Mh||Ih(r);const{v0:a,v1:l,v2:c,v3:u,v4:d,v5:f,v6:p,v7:h,v8:v,v9:m,v10:g,v11:y,v12:b,v13:w,v14:x,v15:k}=vg(mg,0,r,7,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],fg[0],fg[1],fg[2],fg[3],s,i,t,n);o[0]=a^v,o[1]=l^m,o[2]=c^g,o[3]=u^y,o[4]=d^b,o[5]=f^w,o[6]=p^x,o[7]=h^k,o[8]=e[0]^v,o[9]=e[1]^m,o[10]=e[2]^g,o[11]=e[3]^y,o[12]=e[4]^b,o[13]=e[5]^w,o[14]=e[6]^x,o[15]=e[7]^k,Mh||(Ih(r),Ih(o)),this.posOut=0}finish(){if(this.finished)return;this.finished=!0,this.buffer.fill(0,this.pos);let e=8|this.flags;this.stack.length?(e|=4,Mh||Ih(this.buffer32),this.compress(this.buffer32,0,!0),Mh||Ih(this.buffer32),this.chunksDone=0,this.pos=this.blockLen):e|=2|(this.chunkPos?0:1),this.flags=e,this.b2CompressOut()}writeInto(e){jh(this,!1),Ph(e),this.finish();const{blockLen:t,bufferOut:n}=this;for(let r=0,o=e.length;r<o;){this.posOut>=t&&this.b2CompressOut();const i=Math.min(t-this.posOut,o-r);e.set(n.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible after digest call");return this.writeInto(e)}xof(e){return Nh(e),this.xofInto(new Uint8Array(e))}digestInto(e){if($h(e,this),this.finished)throw new Error("digest() was already called");return this.enableXOF=!1,this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}}const yg=Uh((e=>new gg(e))),bg={dkLen:32},wg=e=>yg(e,bg),xg=e=>e,kg=(e,t,n,r)=>new DataView(new Uint16Array([e,t,n,r]).buffer).getBigUint64(0,!0),Eg=2n**64n-1n,Sg=(e,t)=>e<<t&Eg|e>>64n-t,Cg=(e,t)=>e*t&Eg,_g=(e,t)=>e+t&Eg,Ag=11400714785074694791n,Ng=14029467366897019727n,Pg=1609587929392839161n,jg=9650029242287828579n,$g=2870177450012600261n;function Og(e,t=0n){let n,r=_g(_g(t,Ag),Ng),o=_g(t,Ng),i=t,s=t-Ag,a=e.length,l=0,c=null;!function(){let t=0,n=t+a;if(a){if(c=new Uint8Array(32),a<32)return c.set(e.subarray(0,a),l),void(l+=a);if(t<=n-32){const a=n-32;do{let n;n=kg(e[t+1]<<8|e[t],e[t+3]<<8|e[t+2],e[t+5]<<8|e[t+4],e[t+7]<<8|e[t+6]),r=Cg(Sg(_g(r,Cg(n,Ng)),31n),Ag),t+=8,n=kg(e[t+1]<<8|e[t],e[t+3]<<8|e[t+2],e[t+5]<<8|e[t+4],e[t+7]<<8|e[t+6]),o=Cg(Sg(_g(o,Cg(n,Ng)),31n),Ag),t+=8,n=kg(e[t+1]<<8|e[t],e[t+3]<<8|e[t+2],e[t+5]<<8|e[t+4],e[t+7]<<8|e[t+6]),i=Cg(Sg(_g(i,Cg(n,Ng)),31n),Ag),t+=8,n=kg(e[t+1]<<8|e[t],e[t+3]<<8|e[t+2],e[t+5]<<8|e[t+4],e[t+7]<<8|e[t+6]),s=Cg(Sg(_g(s,Cg(n,Ng)),31n),Ag),t+=8}while(t<=a)}t<n&&(c.set(e.subarray(t,n),l),l=n-t)}}(),e=c||e;let u=0;for(a>=32?(n=Sg(r,1n),n=_g(n,Sg(o,7n)),n=_g(n,Sg(i,12n)),n=_g(n,Sg(s,18n)),r=Cg(Sg(Cg(r,Ng),31n),Ag),n^=r,n=_g(Cg(n,Ag),jg),o=Cg(Sg(Cg(o,Ng),31n),Ag),n^=o,n=_g(Cg(n,Ag),jg),i=Cg(Sg(Cg(i,Ng),31n),Ag),n^=i,n=_g(Cg(n,Ag),jg),s=Cg(Sg(Cg(s,Ng),31n),Ag),n^=s,n=_g(Cg(n,Ag),jg)):n=_g(t,$g),n=_g(n,BigInt(a));u<=l-8;){let t=kg(e[u+1]<<8|e[u],e[u+3]<<8|e[u+2],e[u+5]<<8|e[u+4],e[u+7]<<8|e[u+6]);t=Cg(Sg(Cg(t,Ng),31n),Ag),n=_g(Cg(Sg(n^t,27n),Ag),jg),u+=8}if(u+4<=l){let t=Cg(kg(e[u+1]<<8|e[u],e[u+3]<<8|e[u+2],0,0),Ag);n=_g(Cg(Sg(n^t,23n),Ng),Pg),u+=4}for(;u<l;){const t=Cg(kg(e[u++],0,0,0),$g);n=Cg(Sg(n^t,11n),Ag)}let d=n>>33n;return n=Cg(n^d,Ng),d=n>>29n,n=Cg(n^d,Pg),d=n>>32n,n^=d,n}const Rg=e=>{const t=new Uint8Array(16),n=new DataView(t.buffer);return n.setBigUint64(0,Og(e),!0),n.setBigUint64(8,Og(e,1n),!0),t},Mg=e=>vv(jp.enc(Og(e)),e),Tg=new TextEncoder,Lg=e=>{const t=Rg(Tg.encode(e));return(n,r,...o)=>{const i=vv(t,Rg(Tg.encode(n))),s=dv(i),a=o.map((e=>e[1])).map((e=>{switch(e){case xg:return 0;case Mg:return 8;case dg:return 16;default:return null}})).filter((e=>null!==e)),l=o.map((([{enc:e},t])=>n=>t(e(n))));return{enc:(...e)=>dv(vv(i,...e.map(((e,t)=>l[t](e))))),dec:r,keyDecoder:t=>{if(!t.startsWith(s))throw new Error(`key does not match this storage (${e}.${n})`);if(a.length!==o.length)throw new Error("Impossible to decode this key");if(0===o.length)return[];const r=t.slice(s.length),i=new Array(o.length);for(let e=0,n=0;e<a.length;e++){const t=o[e][0];n+=a[e],i[e]=t.dec(r.slice(2*n)),n+=t.enc(i[e]).length}return i}}}},Ig=Object.freeze(Object.defineProperty({__proto__:null,AccountId:cv,Bin:zv,Binary:Rv,Blake2128:ug,Blake2128Concat:dg,Blake2256:lg,Blake3256:wg,Blake3256Concat:e=>vv(wg(e),e),Bytes:rh,Enum:Zv,FixedSizeBinary:Tv,Hex:qv,Identity:xg,Option:ch,Result:fh,ScaleEnum:sh,Self:Jv,Storage:Lg,Struct:yh,Tuple:vh,Twox128:Rg,Twox256:e=>{const t=new Uint8Array(32),n=new DataView(t.buffer);return n.setBigUint64(0,Og(e),!0),n.setBigUint64(8,Og(e,1n),!0),n.setBigUint64(16,Og(e,2n),!0),n.setBigUint64(24,Og(e,3n),!0),t},Twox64Concat:Mg,Variant:rm,Vector:xh,_Enum:em,_void:eh,bitSequence:Fv,blockHeader:Nm,bool:Hp,char:Hv,compact:Yp,compactBn:Bv,compactNumber:Dv,createCodec:kp,createDecoder:xp,decAnyMetadata:sg,enhanceCodec:Cp,enhanceDecoder:Sp,enhanceEncoder:Ep,ethAccount:xm,fixedStr:e=>Cp(rh(e),(e=>Kv.encode(e)),(e=>Yv.decode(e))),fromBufferToBase58:lv,getSs58AddressInfo:sv,h64:Og,i128:zp,i16:Op,i256:Fp,i32:Rp,i64:Mp,i8:$p,metadata:ng,selfDecoder:Gv,selfEncoder:Qv,str:Xp,u128:Ip,u16:Np,u256:Up,u32:Pp,u64:jp,u8:Ap,v14:Gm,v14Lookup:Bm,v15:Zm},Symbol.toStringTag,{value:"Module"})),zg=Yp,Dg=xh(vh(Xp,zg)),Bg={bool:"boolean",str:"string",num:"number",big:"bigint",bits:"bitseq",void:"void"},Ug=rm(Object.fromEntries(Object.values(Bg).map((e=>[e,eh])))),Fg=xh(vh(Xp,ch(Jv((()=>Yg))))),Hg=xh(zg),Vg=yh({typeRef:zg,length:ch(zg)}),Wg=ch(Yp),qg=zg,Kg=yh({ok:zg,ko:zg}),Yg=rm({struct:Dg,terminal:Ug,enum:Fg,tuple:Hg,array:Vg,binary:Wg,option:qg,result:Kg}),Qg={i256:Bg.big,i128:Bg.big,i64:Bg.big,i32:Bg.num,i16:Bg.num,i8:Bg.num,u256:Bg.big,u128:Bg.big,u64:Bg.big,u32:Bg.num,u16:Bg.num,u8:Bg.num,bool:Bg.bool,char:Bg.str,str:Bg.str},Gg=e=>({type:"terminal",value:{type:e}});function Jg(e,t=()=>{}){switch(e.type){case"AccountId20":case"AccountId32":return Gg(Bg.str);case"array":return"primitive"===e.value.type&&"u8"===e.value.value?{type:"binary",value:e.len}:(t(e.value.id),{type:"array",value:{typeRef:e.value.id,length:e.len}});case"bitSequence":return Gg(Bg.bits);case"compact":return Gg(e.isBig?Bg.big:Bg.num);case"enum":return{type:"enum",value:Object.entries(e.value).map((([e,n])=>("lookupEntry"===n.type&&t(n.value.id),[e,"lookupEntry"===n.type?Jg(n.value,t):Jg(n,t)])))};case"struct":{const n=Object.entries(e.value).map((([e,t])=>[e,t.id]));return n.forEach((([,e])=>t(e))),{type:"struct",value:n}}case"tuple":{const n=e.value.map((e=>e.id));return n.forEach(t),{type:"tuple",value:n}}case"option":return t(e.value.id),{type:"option",value:e.value.id};case"primitive":return Gg(Qg[e.value]);case"result":return t(e.value.ok.id),t(e.value.ko.id),{type:"result",value:{ok:e.value.ok.id,ko:e.value.ko.id}};case"sequence":return"primitive"===e.value.type&&"u8"===e.value.value?{type:"binary",value:void 0}:(t(e.value.id),{type:"array",value:{typeRef:e.value.id}});case"void":return Gg(Bg.void)}}function Xg(e,t,n){if("option"===t.type&&null==e)return!0;const r=(e,t)=>Xg(e,t,n);switch(t.type){case"terminal":return(t=>{switch(t.value.type){case Bg.str:case Bg.big:case Bg.bool:case Bg.num:return typeof e===t.value.type;case Bg.bits:return"object"==typeof e&&null!=e&&"number"==typeof e.bitsLen&&e.bytes instanceof Uint8Array;case Bg.void:return!0}})(t);case"binary":return e instanceof Rv&&(null==t.value||e.asBytes().length>=t.value);case"array":if(!Array.isArray(e))return!1;const o=e;return!(null!=t.value.length&&o.length<t.value.length)&&o.slice(0,t.value.length).every((e=>r(e,n(t.value.typeRef))));case"enum":if(!e)return!1;const i=e,s=Object.fromEntries(t.value);if(!(i.type in s))return!1;const a=s[i.type];return null==a||r(i.value,a);case"option":return null==e||r(e,n(t.value));case"struct":return!!e&&t.value.every((([t,o])=>r(e[t],n(o))));case"tuple":return!!e&&t.value.every(((t,o)=>r(e[o],n(t))));case"result":return"success"in e&&"value"in e&&r(e.value,n(e.success?t.value.ok:t.value.ko))}}var Zg=Object.defineProperty,ey=(e,t,n)=>((e,t,n)=>t in e?Zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,t+"",n);class ty{constructor(e=[]){ey(this,"value",new Map),e.forEach((([e,t])=>this.add(e,t)))}has(e,t){var n;return(null==(n=this.value.get(e))?void 0:n.has(t))??!1}add(e,t){this.value.has(e)||this.value.set(e,new Set),this.value.get(e).add(t)}addAll(e){e.forEach((([e,t])=>this.add(e,t)))}delete(e,t){if(!this.value.has(e))return;const n=this.value.get(e);n.delete(t),n.size||this.value.delete(e)}isEmpty(){return!this.value.size}get values(){return Array.from(this.value).flatMap((([e,t])=>Array.from(t).map((t=>[e,t]))))}}var ny=(e=>(e[e.Incompatible=0]="Incompatible",e[e.Partial=1]="Partial",e[e.BackwardsCompatible=2]="BackwardsCompatible",e[e.Identical=3]="Identical",e))(ny||{});function ry(e,t,n,r,o){if(!n&&!e)return sy(3);if(!n)return sy(2);if(!e)return sy("option"===n.type?2:0);o.has(n)||o.set(n,new Map);const i=o.get(n);if(i.has(e)){const t=i.get(e);return null===t?{level:3,assumptions:new ty([[e,n]])}:sy(t)}i.set(e,null);const s=function(e,t,n){if(e.type!==t.type)return"option"===t.type?oy(n(e,t.value),2):"option"===e.type?oy(n(e.value,t),1):sy(0);switch(t.type){case"terminal":return sy(t.value.type===e.value.type?3:0);case"binary":return sy(uy(e.value,t.value));case"array":const r=e,o=sy(uy(r.value.length,t.value.length));return ay([o,()=>n(r.value.typeRef,t.value.typeRef)]);case"enum":{const r=e,o=Object.fromEntries(t.value),i=r.value.length===t.value.length?3:2;return oy(ly(r.value.map((([e,t])=>()=>e in o?n(t,o[e]):sy(0)))),i)}case"option":return n(e.value,t.value);case"struct":const i=e,s=Object.fromEntries(i.value),a=i.value.length===t.value.length?3:2;return oy(ay(t.value.map((([e,t])=>()=>n(s[e],t)))),a);case"tuple":{const r=e,o=sy(cy(r.value,t.value));return ay([o,...t.value.map(((e,t)=>()=>n(r.value[t],e)))])}case"result":const l=e;return ly([n(l.value.ok,t.value.ok),n(l.value.ko,t.value.ko)])}}(e,n,((e,n)=>ry("number"==typeof e?t(e):e,t,"number"==typeof n?r(n):n,r,o)));return s.assumptions.delete(e,n),s.assumptions.isEmpty()||0===s.level?i.set(e,s.level):i.delete(e),s}const oy=(e,t)=>({...e,level:Math.min(e.level,t)}),iy=new ty,sy=e=>({level:e,assumptions:iy}),ay=e=>{let t=sy(3);for(const n of e){const e="function"==typeof n?n():n;if(0===e.level)return e;t.assumptions.addAll(e.assumptions.values),t.level=Math.min(t.level,e.level)}return t},ly=e=>{if(!e.length)return sy(3);let t=!1,n=sy(3);for(const r of e){const e="function"==typeof r?r():r;0!==e.level?(t=!0,n.assumptions.addAll(e.assumptions.values),n.level=Math.min(n.level,e.level)):n.level=Math.min(n.level,1)}return t?n:sy(0)},cy=(e,t)=>t.length===e.length?3:e.length>=t.length?2:0,uy=(e,t)=>t===e?3:null==t||e>=t?2:null==e?1:0,dy=rm({lookup:Yp,typedef:Yg}),fy=e=>({type:"lookup",value:e}),py=e=>({type:"typedef",value:e}),hy=py({type:"terminal",value:{type:Bg.void}}),vy=yh({args:dy,values:dy});function my(e,t,n){return Xg(n,"lookup"===e.type?t(e.value):e.value,t)}const gy=()=>{},yy={body:"",call:"",continue:"",follow:"",header:"",stopOperation:"",storage:"",unfollow:"",unpin:"",followEvent:""},by={chainName:"",genesisHash:"",properties:""},wy={broadcast:"",stop:""};Object.entries({chainHead:yy,chainSpec:by,transaction:wy}).forEach((([e,t])=>{Object.keys(t).forEach((n=>{t[n]=`${e}_v1_${n}`}))}));const xy=e=>(t,n)=>{let r=e(wy.broadcast,[t],{onSuccess:t=>{r=null===t?gy:()=>{e(wy.stop,[t])},null===t&&n(new Error("Max # of broadcasted transactions has been reached"))},onError:n});return()=>{r()}};class ky extends Error{constructor(){super("ChainHead stopped"),this.name="StopError"}}class Ey extends Error{constructor(){super("ChainHead disjointed"),this.name="DisjointError"}}class Sy extends Error{constructor(){super("ChainHead operations limit reached"),this.name="OperationLimitError"}}class Cy extends Error{constructor(e){super(e),this.name="OperationError"}}class _y extends Error{constructor(){super("ChainHead operation inaccessible"),this.name="OperationInaccessibleError"}}const Ay=()=>{const e=new Map;return{has:e.has.bind(e),subscribe(t,n){e.set(t,n)},unsubscribe(t){e.delete(t)},next(t,n){var r;null==(r=e.get(t))||r.next(n)},error(t,n){const r=e.get(t);r&&(e.delete(t),r.error(n))},errorAll(t){const n=[...e.values()];e.clear(),n.forEach((e=>{e.error(t)}))}}},Ny=e=>(...t)=>new Promise(((n,r)=>{let o=mv;const[i,s]=t[t.length-1]instanceof AbortSignal?[t.slice(0,t.length-1),t[t.length-1]]:[t],a=()=>{o(),r(new gv)};null==s||s.addEventListener("abort",a,{once:!0});const l=e=>t=>{o=mv,null==s||s.removeEventListener("abort",a),e(t)};o=e(l(n),l(r),...i)})),Py=(e,t)=>n=>Ny(((r,o,...i)=>{let s=!0,a=()=>{s=!1};const[l,c]=t(...i);return n(e,l,{onSuccess:(e,t)=>{if("limitReached"===e.result)return o(new Sy);const{operationId:i}=e,l=()=>{n(yy.stopOperation,[i])};if(!s)return l();let u=gy;const d=e=>{s=!1,u(),r(e)},f=e=>{s=!1,u(),o(e)};u=t(i,{next:e=>{const t=e;"operationError"===t.event?o(new Cy(t.error)):"operationInaccessible"===t.event?o(new _y):c(e,d,f)},error:f}),a=()=>{s&&(u(),l())}},onError:o}),()=>{a()}})),jy=Py(yy.body,(e=>[[e],(e,t)=>{t(e.value)}])),$y=Py(yy.call,((e,t,n)=>[[e,t,n],(e,t)=>{t(e.output)}])),Oy=e=>t=>new Promise(((n,r)=>{e(yy.header,[t],{onSuccess:n,onError:r})})),Ry=e=>(t,n,r,o,i,s,a)=>{if(0===n.length)return s(),mv;let l=!0,c=()=>{l=!1};return e(yy.storage,[t,n,r],{onSuccess:(t,r)=>{if("limitReached"===t.result||t.discardedItems===n.length)return i(new Sy);const{operationId:u}=t;if(!l)return void e(yy.stopOperation,[u]);const d=r(t.operationId,{next:t=>{switch(t.event){case"operationStorageItems":o(t.items);break;case"operationStorageDone":p();break;case"operationError":f(new Cy(t.error));break;case"operationInaccessible":f(new _y);break;default:e(yy.continue,[t.operationId])}},error:i});c=()=>{d(),e(yy.stopOperation,[t.operationId])};const f=e=>{c=mv,d(),i(e)},p=()=>{c=mv,d(),s()};a(t.discardedItems)},onError:i}),()=>{c()}},My=e=>{const t=Ry(e);return Ny(((e,n,r,o,i,s)=>{const a=o.startsWith("descendants");let l=a?[]:null;const c=t(r,[{key:i,type:o}],s??null,a?e=>{l.push(e)}:e=>{var t;l=null==(t=e[0])?void 0:t[o]},n,(()=>{try{e(a?l.flat():l)}catch(t){n(t)}}),(e=>{e>0&&(c(),n(new Sy))}));return c}))},Ty=e=>t=>t.length>0?new Promise(((n,r)=>{e(yy.unpin,[t],{onSuccess(){n()},onError:r})})):Promise.resolve();class Ly extends Error{constructor(){super("Client destroyed"),this.name="DestroyedError"}}function Iy(e){return(t,n,r)=>{const o=Ay(),i=new Set,s=function(){let e=()=>{},t=()=>{};return{promise:new Promise(((n,r)=>{e=n,t=r})),res:e,rej:t}}();let a=s.promise;const l=e=>{if(function(e){return void 0!==e.operationId}(e))return o.has(e.operationId)||console.warn("Uknown operationId on",e),o.next(e.operationId,e);if("stop"!==e.event){if("initialized"===e.event)return n({type:e.event,finalizedBlockHashes:e.finalizedBlockHashes,finalizedBlockRuntime:e.finalizedBlockRuntime});const{event:t,...r}=e;return n({type:t,...r})}r(new ky),u(!1)},c=e=>{r(e),u(!(e instanceof Ly))};let u=e(yy.follow,[t],{onSuccess:(t,n)=>{const r=n(t,{next:l,error:c});u=(n=!0)=>{a=null,u=gy,r(),n&&e(yy.unfollow,[t]),o.errorAll(new Ey),i.forEach((e=>{e()})),i.clear()},a=t,s.res(t)},onError:e=>{e instanceof Ly?u(!1):r(e),a=null,s.res(e)}});const d=(t,n,r)=>{const s=()=>{null==r||r.onError(new Ey)};if(null===a)return s(),gy;const l=l=>{if(!r)return e(t,[l,...n]);i.add(s);const c=(e,t)=>null===a?(t.error(new Ey),gy):(o.subscribe(e,t),()=>{o.unsubscribe(e)}),u=e(t,[l,...n],{onSuccess:e=>{i.delete(s),r.onSuccess(e,c)},onError:e=>{i.delete(s),r.onError(e)}});return()=>{i.delete(s),u()}};if("string"==typeof a)return l(a);let c=gy;return a.then((e=>{if(e instanceof Error)return s();a&&(c=l(e))})),()=>{c()}};return{unfollow(){u(),a=null},body:jy(d),call:$y(d),header:Oy(d),storage:My(d),storageSubscription:Ry(d),unpin:Ty(d),_request:d}}}var zy=Object.defineProperty,Dy=(e,t,n)=>((e,t,n)=>t in e?zy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class By extends Error{constructor(e){super(e.message),Dy(this,"code"),Dy(this,"data"),this.code=e.code,this.data=e.data,this.name="RpcError"}}let Uy=1;const Fy=e=>{let t=Uy++;const n=new Map,r=Ay();let o=null;o=e((function(e){try{let t,o,i,s,a;const l=JSON.parse(e);if(({id:t,result:o,error:i,params:s}=l),t){const e=n.get(t);if(!e)return;return n.delete(t),i?e.onError(new By(i)):e.onSuccess(o,((e,t)=>{const n=e;return r.subscribe(n,t),()=>{r.unsubscribe(n)}}))}if(({subscription:a,result:o,error:i}=s),!a||!i&&!Object.hasOwn(s,"result"))throw 0;const c=a;i?r.error(c,new By(i)):r.next(c,o)}catch(t){console.warn("Error parsing incomming message: "+e),console.error(t)}}));let i=1;return{request:(e,r,s)=>{if(!o)throw new Error("Not connected");const a=`${t}-${i++}`;return s&&n.set(a,s),((e,t,n)=>{o.send(JSON.stringify({jsonrpc:"2.0",id:e,method:t,params:n}))})(a,e,r),()=>{n.delete(a)}},disconnect:()=>{null==o||o.disconnect(),o=null,r.errorAll(new Ly),n.forEach((e=>e.onError(new Ly))),n.clear()}}},Hy=e=>{const t=Ny(((t,n,r,o)=>e(r,o,{onSuccess:t,onError:n})));let n=null;return async()=>n||(n=Promise.all([t(by.chainName,[]),t(by.genesisHash,[]),t(by.properties,[])]).then((([e,t,n])=>({name:e,genesisHash:t,properties:n}))))},Vy=new Map;var Wy=function(e,t){return(Wy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function qy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Wy(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ky=function(){return Ky=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ky.apply(this,arguments)};function Yy(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Qy(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function Gy(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(l){a=[6,l],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function Jy(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xy(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function Zy(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function eb(e){return this instanceof eb?(this.v=e,this):new eb(e)}function tb(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||a(e,t)}))},t&&(r[e]=t(r[e])))}function a(e,t){try{(n=o[e](t)).value instanceof eb?Promise.resolve(n.value.v).then(l,c):u(i[0][2],n)}catch(r){u(i[0][3],r)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function u(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function nb(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Jy(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function rb(e){return"function"==typeof e}function ob(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}"function"==typeof SuppressedError&&SuppressedError;var ib=ob((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}}));function sb(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ab=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=Jy(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(p){e={error:p}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else i.remove(this);var l=this.initialTeardown;if(rb(l))try{l()}catch(h){o=h instanceof ib?h.errors:[h]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=Jy(c),d=u.next();!d.done;d=u.next()){var f=d.value;try{ub(f)}catch(v){o=null!=o?o:[],v instanceof ib?o=Zy(Zy([],Xy(o)),Xy(v.errors)):o.push(v)}}}catch(m){n={error:m}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(o)throw new ib(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)ub(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&sb(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&sb(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),lb=ab.EMPTY;function cb(e){return e instanceof ab||e&&"closed"in e&&rb(e.remove)&&rb(e.add)&&rb(e.unsubscribe)}function ub(e){rb(e)?e():e.unsubscribe()}var db=void 0,fb=!1,pb={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Zy([e,t],Xy(n)))},clearTimeout:function(e){var t=pb.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function hb(e){pb.setTimeout((function(){throw e}))}function vb(){}function mb(e){e()}var gb=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,cb(t)&&t.add(n)):n.destination=Eb,n}return qy(t,e),t.create=function(e,t,n){return new xb(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(ab),yb=Function.prototype.bind;function bb(e,t){return yb.call(e,t)}var wb=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){kb(n)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){kb(n)}else kb(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){kb(t)}},e}(),xb=function(e){function t(t,n,r){var o,i,s=e.call(this)||this;rb(t)||!t?o={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&fb?((i=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},o={next:t.next&&bb(t.next,i),error:t.error&&bb(t.error,i),complete:t.complete&&bb(t.complete,i)}):o=t;return s.destination=new wb(o),s}return qy(t,e),t}(gb);function kb(e){hb(e)}var Eb={closed:!0,next:vb,error:function(e){throw e},complete:vb},Sb="function"==typeof Symbol&&Symbol.observable||"@@observable";function Cb(e){return e}function _b(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ab(e)}function Ab(e){return 0===e.length?Cb:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Nb=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,o=this,i=(r=e)&&r instanceof gb||function(e){return e&&rb(e.next)&&rb(e.error)&&rb(e.complete)}(r)&&cb(r)?e:new xb(e,t,n);return mb((function(){var e=o,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Pb(t))((function(t,r){var o=new xb({next:function(t){try{e(t)}catch(n){r(n),o.unsubscribe()}},error:r,complete:t});n.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Sb]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ab(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Pb(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Pb(e){var t;return null!==(t=null!=e?e:db)&&void 0!==t?t:Promise}function jb(e){return function(t){if(function(e){return rb(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(n){this.error(n)}}));throw new TypeError("Unable to lift unknown Observable type")}}function $b(e,t,n,r,o){return new Ob(e,t,n,r,o)}var Ob=function(e){function t(t,n,r,o,i,s){var a=e.call(this,t)||this;return a.onFinalize=i,a.shouldUnsubscribe=s,a._next=n?function(e){try{n(e)}catch(r){t.error(r)}}:e.prototype._next,a._error=o?function(e){try{o(e)}catch(n){t.error(n)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return qy(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(gb),Rb=ob((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Mb=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return qy(t,e),t.prototype.lift=function(e){var t=new Tb(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Rb},t.prototype.next=function(e){var t=this;mb((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=Jy(t.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(e)}}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;mb((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;mb((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,o=n.isStopped,i=n.observers;return r||o?lb:(this.currentObservers=null,i.push(e),new ab((function(){t.currentObservers=null,sb(i,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,o=t.isStopped;n?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new Nb;return e.source=this,e},t.create=function(e,t){return new Tb(e,t)},t}(Nb),Tb=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return qy(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:lb},t}(Mb),Lb=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return qy(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Mb),Ib={now:function(){return(Ib.delegate||Date).now()},delegate:void 0},zb=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Ib);var o=e.call(this)||this;return o._bufferSize=t,o._windowTime=n,o._timestampProvider=r,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,n),o}return qy(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,o=n._buffer,i=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(o.push(t),!i&&o.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),o=0;o<r.length&&!e.closed;o+=n?1:2)e.next(r[o]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,o=e._infiniteTimeWindow,i=(o?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!o){for(var s=n.now(),a=0,l=1;l<r.length&&r[l]<=s;l+=2)a=l;a&&r.splice(0,a+1)}},t}(Mb),Db=function(e){function t(t,n){return e.call(this)||this}return qy(t,e),t.prototype.schedule=function(e,t){return this},t}(ab),Bb=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Zy([e,t],Xy(n)))},Ub=function(e){return clearInterval(e)},Fb=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return qy(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(o,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),Bb(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&Ub(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(o){r=!0,n=o||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,sb(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Db),Hb=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Ib.now,e}(),Vb=new(function(e){function t(t,n){void 0===n&&(n=Hb.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return qy(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(Hb))(Fb),Wb=Vb,qb=new Nb((function(e){return e.complete()}));function Kb(e){return e[e.length-1]}function Yb(e){return rb(Kb(e))?e.pop():void 0}function Qb(e){return(t=Kb(e))&&rb(t.schedule)?e.pop():void 0;var t}var Gb=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Jb(e){return rb(null==e?void 0:e.then)}function Xb(e){return rb(e[Sb])}function Zb(e){return Symbol.asyncIterator&&rb(null==e?void 0:e[Symbol.asyncIterator])}function ew(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var tw="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function nw(e){return rb(null==e?void 0:e[tw])}function rw(e){return tb(this,arguments,(function(){var t,n,r;return Gy(this,(function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,eb(t.read())];case 3:return n=o.sent(),r=n.value,n.done?[4,eb(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,eb(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function ow(e){return rb(null==e?void 0:e.getReader)}function iw(e){if(e instanceof Nb)return e;if(null!=e){if(Xb(e))return o=e,new Nb((function(e){var t=o[Sb]();if(rb(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Gb(e))return r=e,new Nb((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(Jb(e))return n=e,new Nb((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,hb)}));if(Zb(e))return sw(e);if(nw(e))return t=e,new Nb((function(e){var n,r;try{for(var o=Jy(t),i=o.next();!i.done;i=o.next()){var s=i.value;if(e.next(s),e.closed)return}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}e.complete()}));if(ow(e))return sw(rw(e))}var t,n,r,o;throw ew(e)}function sw(e){return new Nb((function(t){(function(e,t){var n,r,o,i;return Qy(this,void 0,void 0,(function(){var s,a;return Gy(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=nb(e),l.label=1;case 1:return[4,n.next()];case 2:if((r=l.sent()).done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),o={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(i=n.return)?[4,i.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function aw(e,t,n,r,o){void 0===r&&(r=0),void 0===o&&(o=!1);var i=t.schedule((function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(i),!o)return i}function lw(e,t){return void 0===t&&(t=0),jb((function(n,r){n.subscribe($b(r,(function(n){return aw(r,e,(function(){return r.next(n)}),t)}),(function(){return aw(r,e,(function(){return r.complete()}),t)}),(function(n){return aw(r,e,(function(){return r.error(n)}),t)})))}))}function cw(e,t){return void 0===t&&(t=0),jb((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function uw(e,t){if(!e)throw new Error("Iterable cannot be null");return new Nb((function(n){aw(n,t,(function(){var r=e[Symbol.asyncIterator]();aw(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function dw(e,t){if(null!=e){if(Xb(e))return function(e,t){return iw(e).pipe(cw(t),lw(t))}(e,t);if(Gb(e))return function(e,t){return new Nb((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(Jb(e))return function(e,t){return iw(e).pipe(cw(t),lw(t))}(e,t);if(Zb(e))return uw(e,t);if(nw(e))return function(e,t){return new Nb((function(n){var r;return aw(n,t,(function(){r=e[tw](),aw(n,t,(function(){var e,t,o;try{t=(e=r.next()).value,o=e.done}catch(i){return void n.error(i)}o?n.complete():n.next(t)}),0,!0)})),function(){return rb(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(ow(e))return function(e,t){return uw(rw(e),t)}(e,t)}throw ew(e)}function fw(e,t){return t?dw(e,t):iw(e)}function pw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fw(e,Qb(e))}function hw(e,t){var n=rb(e)?e:function(){return e};return new Nb((function(e){return e.error(n())}))}var vw=ob((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));function mw(e,t){var n="object"==typeof t;return new Promise((function(r,o){var i=new xb({next:function(e){r(e),i.unsubscribe()},error:o,complete:function(){n?r(t.defaultValue):o(new vw)}});e.subscribe(i)}))}function gw(e,t){return jb((function(n,r){var o=0;n.subscribe($b(r,(function(n){r.next(e.call(t,n,o++))})))}))}var yw=Array.isArray;function bw(e){return gw((function(t){return function(e,t){return yw(t)?e.apply(void 0,Zy([],Xy(t))):e(t)}(e,t)}))}var ww=Array.isArray,xw=Object.getPrototypeOf,kw=Object.prototype,Ew=Object.keys;function Sw(e){if(1===e.length){var t=e[0];if(ww(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&xw(r)===kw){var n=Ew(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}function Cw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Qb(e),r=Yb(e),o=Sw(e),i=o.args,s=o.keys;if(0===i.length)return fw([],n);var a=new Nb(function(e,t,n){void 0===n&&(n=Cb);return function(r){_w(t,(function(){for(var o=e.length,i=new Array(o),s=o,a=o,l=function(o){_w(t,(function(){var l=fw(e[o],t),c=!1;l.subscribe($b(r,(function(e){i[o]=e,c||(c=!0,a--),a||r.next(n(i.slice()))}),(function(){--s||r.complete()})))}),r)},c=0;c<o;c++)l(c)}),r)}}(i,n,s?function(e){return function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(s,e)}:Cb));return r?a.pipe(bw(r)):a}function _w(e,t,n){e?aw(n,e,t):t()}function Aw(e,t,n){return void 0===n&&(n=1/0),rb(t)?Aw((function(n,r){return gw((function(e,o){return t(n,e,r,o)}))(iw(e(n,r)))}),n):("number"==typeof t&&(n=t),jb((function(t,r){return function(e,t,n,r,o,i,s){var a=[],l=0,c=0,u=!1,d=function(){!u||a.length||l||t.complete()},f=function(e){l++;var o=!1;iw(n(e,c++)).subscribe($b(t,(function(e){t.next(e)}),(function(){o=!0}),void 0,(function(){if(o)try{for(l--;a.length&&l<r;)e=void 0,e=a.shift(),s||f(e);d()}catch(n){t.error(n)}var e})))};return e.subscribe($b(t,(function(e){return l<r?f(e):a.push(e)}),(function(){u=!0,d()}))),function(){}}(t,r,e,n)})))}function Nw(e){return void 0===e&&(e=1/0),Aw(Cb,e)}function Pw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Nw(1)(fw(e,Qb(e)))}function jw(e){return new Nb((function(t){iw(e()).subscribe(t)}))}var $w={connector:function(){return new Mb},resetOnDisconnect:!0};function Ow(e,t,n){return void 0===n&&(n=Wb),new Nb((function(t){var r,o=(r=e)instanceof Date&&!isNaN(r)?+e-n.now():e;o<0&&(o=0);var i=0;return n.schedule((function(){t.closed||(t.next(i++),t.complete())}),o)}))}function Rw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Qb(e),r=function(e,t){return"number"==typeof Kb(e)?e.pop():t}(e,1/0),o=e;return o.length?1===o.length?iw(o[0]):Nw(r)(fw(o,n)):qb}function Mw(e,t){return jb((function(n,r){var o=0;n.subscribe($b(r,(function(n){return e.call(t,n,o++)&&r.next(n)})))}))}function Tw(e){return jb((function(t,n){var r,o=null,i=!1;o=t.subscribe($b(n,void 0,void 0,(function(s){r=iw(e(s,Tw(e)(t))),o?(o.unsubscribe(),o=null,r.subscribe(n)):i=!0}))),i&&(o.unsubscribe(),o=null,r.subscribe(n))}))}function Lw(e,t){return rb(t)?Aw(e,t,1):Aw(e,1)}function Iw(e){return e<=0?function(){return qb}:jb((function(t,n){var r=0;t.subscribe($b(n,(function(t){++r<=e&&(n.next(t),e<=r&&n.complete())})))}))}function zw(e,t){return void 0===t&&(t=Cb),e=null!=e?e:Dw,jb((function(n,r){var o,i=!0;n.subscribe($b(r,(function(n){var s=t(n);!i&&e(o,s)||(i=!1,o=s,r.next(n))})))}))}function Dw(e,t){return e===t}function Bw(e,t){return jb(function(e,t,n,r,o){return function(r,i){var s=n,a=t,l=0;r.subscribe($b(i,(function(t){var n=l++;a=s?e(a,t,n):(s=!0,t),i.next(a)}),o))}}(e,t,arguments.length>=2))}function Uw(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new Mb}:t,r=e.resetOnError,o=void 0===r||r,i=e.resetOnComplete,s=void 0===i||i,a=e.resetOnRefCountZero,l=void 0===a||a;return function(e){var t,r,i,a=0,c=!1,u=!1,d=function(){null==r||r.unsubscribe(),r=void 0},f=function(){d(),t=i=void 0,c=u=!1},p=function(){var e=t;f(),null==e||e.unsubscribe()};return jb((function(e,h){a++,u||c||d();var v=i=null!=i?i:n();h.add((function(){0!==--a||u||c||(r=Fw(p,l))})),v.subscribe(h),!t&&a>0&&(t=new xb({next:function(e){return v.next(e)},error:function(e){u=!0,d(),r=Fw(f,o,e),v.error(e)},complete:function(){c=!0,d(),r=Fw(f,s),v.complete()}}),iw(e).subscribe(t))}))(e)}}function Fw(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!0!==t){if(!1!==t){var o=new xb({next:function(){o.unsubscribe(),e()}});return iw(t.apply(void 0,Zy([],Xy(n)))).subscribe(o)}}else e()}function Hw(e,t,n){var r,o,i,s,a=!1;return e&&"object"==typeof e?(r=e.bufferSize,s=void 0===r?1/0:r,o=e.windowTime,t=void 0===o?1/0:o,a=void 0!==(i=e.refCount)&&i,n=e.scheduler):s=null!=e?e:1/0,Uw({connector:function(){return new zb(s,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function Vw(e,t){return jb((function(n,r){var o=null,i=0,s=!1,a=function(){return s&&!o&&r.complete()};n.subscribe($b(r,(function(n){null==o||o.unsubscribe();var s=0,l=i++;iw(e(n,l)).subscribe(o=$b(r,(function(e){return r.next(t?t(n,e,l,s++):e)}),(function(){o=null,a()})))}),(function(){s=!0,a()})))}))}function Ww(e,t){return void 0===t&&(t=!1),jb((function(n,r){var o=0;n.subscribe($b(r,(function(n){var i=e(n,o++);(i||t)&&r.next(n),!i&&r.complete()})))}))}function qw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Yb(e);return jb((function(t,r){for(var o=e.length,i=new Array(o),s=e.map((function(){return!1})),a=!1,l=function(t){iw(e[t]).subscribe($b(r,(function(e){i[t]=e,a||s[t]||(s[t]=!0,(a=s.every(Cb))&&(s=null))}),vb))},c=0;c<o;c++)l(c);t.subscribe($b(r,(function(e){if(a){var t=Zy([e],Xy(i));r.next(n?n.apply(void 0,Zy([],Xy(t))):t)}})))}))}var Kw=Object.defineProperty,Yw=(e,t,n)=>((e,t,n)=>t in e?Kw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class Qw{constructor(){Yw(this,"first"),Yw(this,"last")}getRemoveFn(e){return()=>{e.prev?e.prev.next=e.next:this.first=e.next,e.next?e.next.prev=e.prev:this.last=e.prev,delete e.prev,delete e.next}}push(e){const t={value:e};return void 0===this.last?this.last=this.first=t:(this.last.next=t,t.prev=this.last,this.last=t),this.getRemoveFn(t)}unshift(e){return this.first={value:e,next:this.first},this.first.next&&(this.first.next.prev=this.first),this.last||(this.last=this.first),this.getRemoveFn(this.first)}pop(){var e,t;const n=null==(e=this.first)?void 0:e.value;return this.first&&(this.first=this.first.next,this.first?(null==(t=this.first.prev)||delete t.next,delete this.first.prev):this.last=void 0),n}isEmpty(){return!this.first}}const Gw=()=>{const e=new Map,t=(t,n)=>{e.set(t,(()=>{e.delete(t),n()}))},n=new Qw,r=n.unshift.bind(n),o=n.push.bind(n),i=(e,n)=>{const i=n?r:o;t(e.source$,i(e))},s=()=>{const t=n.pop();t&&(e.delete(t.source$),a(t))},a=e=>{const{source$:n,observer:r}=e;let o=!1;const a=n.subscribe({next(e){r.next(e)},error(t){(o=t instanceof Sy)?i(e,!0):r.error(t)},complete(){r.complete()}});a.closed?o||s():t(n,(()=>{a.unsubscribe(),s()}))},l=(t=!1)=>r=>new Nb((o=>{const s={observer:o,source$:r};return n.isEmpty()?a(s):i(s,t),()=>{var t,n;t=r,null==(n=e.get(t))||n()}})),c=l();return{withRecovery:l,withRecoveryFn:e=>(...t)=>c(e(...t))}};class Jw extends Error{constructor(){super("Block is not pinned"),this.name="BlockNotPinnedError"}}class Xw extends Error{constructor(){super("Block pruned"),this.name="BlockPrunedError"}}class Zw extends Error{constructor(){super("Block is not best block or finalized"),this.name="NotBestBlockError"}}const ex=new Set(["best","finalized",null]),tx=e=>{const t=e.pipe(Tw((e=>e instanceof _y?Ow(750).pipe(Lw((()=>t))):hw((()=>e)))));return t},nx=e=>(...t)=>new Nb((n=>{let r=new AbortController;return e(...t,r.signal).then((e=>{n.next(e),n.complete()}),(e=>{n.error(e)})),()=>{n.unsubscribe(),r.abort(),r=void 0}}));const rx=(e,t)=>n=>((e,t)=>e.pipe(Ww((e=>e.blocks.has(t))),zw(((e,t)=>e.finalized===t.finalized&&e.best===t.best)),Mw((e=>e.blocks.get(e.best).number>=e.blocks.get(t).number)),gw((e=>{const{number:n}=e.blocks.get(t);let r=e.blocks.get(e.best),o=e.finalized===r.hash;for(;r.number>n;)r=e.blocks.get(r.parent),o=o||e.finalized===r.hash;return o?"finalized":r.hash===t?"best":null})),zw(),Ww((e=>"finalized"!==e),!0)))(t,e).pipe(Iw(1),Vw((e=>e?n:hw((()=>new Zw))))),ox=(e,t)=>n=>new Nb((r=>{const o=t.pipe(Mw((t=>t===e))).subscribe((()=>{r.error(new Xw)})),i=n.subscribe(r);return()=>{o.unsubscribe(),i.unsubscribe()}}));function ix(e,t){return(n,...r)=>{const o=t(n,...r);return new Nb((t=>{let r=null,i=!1;let s=!1;const a=e.subscribe({next:e=>{const a=e.blocks.get(n);a?a.recovering?null==r||r.unsubscribe():i||(i=!0,r=o.subscribe({next:e=>t.next(e),error:e=>t.error(e),complete:()=>t.complete()}),r.add((()=>{i=!1,r=null}))):s&&t.error(new Jw),s=e.recovering},error:e=>t.error(e)});return()=>{a.unsubscribe(),null==r||r.unsubscribe()}}))}}const sx=e=>{let t=null,n=vb;const r=()=>{if(!t)throw new Error("Missing chainHead subscription");return t},o=e=>r().header(e).then(Nm.dec),i=function(e,t){void 0===t&&(t=$w);var n=null,r=t.connector,o=t.resetOnDisconnect,i=void 0===o||o,s=r(),a=new Nb((function(e){return s.subscribe(e)}));return a.connect=function(){return n&&!n.closed||(n=jw((function(){return e})).subscribe(s),i&&n.add((function(){return s=r()}))),n},a}(new Nb((r=>{t=e(!0,(e=>{r.next(e)}),(e=>{t=null,r.error(e)})),n=()=>{r.complete(),null==t||t.unfollow()}})).pipe((e=>t=>t.pipe(Lw((t=>"initialized"!==t.type?pw(t):e(t.finalizedBlockHashes[0]).then((e=>({...t,number:e.number,parentHash:e.parentHash})))))))(o),ax()));return{getHeader:o,getFollower:r,startFollow:()=>(i.connect(),()=>{n()}),follow$:i}},ax=()=>e=>new Nb((t=>{const n=new ab,r=()=>e.subscribe({next:e=>t.next(e),error:e=>{e instanceof ky?(t.next({type:"stop-error"}),n.add(r())):t.error(e)},complete:()=>t.complete()});return n.add(r()),n})),lx=(e,t)=>"array"===e.type&&e.len===t&&"primitive"===e.value.type&&"u8"===e.value.value,cx={type:"void"},ux=e=>{const t=((e,t=()=>null)=>{const n=new Map,r=new Set;let o=!0,i=!0;const s=(a=n=>{const r=t(e[n]);if(r)return r;const{def:a,path:u,params:d}=e[n];if("composite"===a.tag){if(0===a.value.length)return cx;if(1===a.value.length){const e=s(a.value[0].type);return o&&"AccountId32"===u.at(-1)&&lx(e,32)?(o=!1,{type:"AccountId32"}):i&&"AccountId20"===u.at(-1)&&lx(e,20)?(i=!1,{type:"AccountId20"}):e}return l(a.value)}if("variant"===a.tag){if(1===u.length&&"Option"===u[0]&&1===d.length&&"T"===d[0].name){const e=s(d[0].type);return"void"===e.type?{type:"primitive",value:"bool"}:{type:"option",value:e}}if(1===u.length&&"Result"===u[0]&&2===d.length&&"T"===d[0].name&&"E"===d[1].name)return{type:"result",value:{ok:s(d[0].type),ko:s(d[1].type)}};if(0===a.value.length)return cx;const e={},t={};return a.value.forEach((n=>{const r=n.name;t[r]=n.docs,0!==n.fields.length?1!==n.fields.length||n.fields[0].name?e[r]={...l(n.fields),idx:n.index}:e[r]={type:"lookupEntry",value:s(n.fields[0].type),idx:n.index}:e[r]={...cx,idx:n.index}})),{type:"enum",value:e,innerDocs:t}}if("sequence"===a.tag)return{type:"sequence",value:s(a.value)};if("array"===a.tag){const{len:e}=a.value,t=s(a.value.type);return e&&"void"!==t.type?e>1?{type:"array",value:t,len:a.value.len}:t:cx}if("tuple"===a.tag)return 0===a.value.length?cx:a.value.length>1?c(a.value.map((e=>s(e))),a.value.map((t=>e[t].docs))):s(a.value[0]);if("primitive"===a.tag)return{type:"primitive",value:a.value.tag};if("compact"===a.tag){const e=s(a.value);return"void"===e.type?cx:{type:"compact",isBig:Number(e.value.slice(1))>32,size:e.value}}return{type:a.tag}},e=>{let t=n.get(e);if(t)return t;if(r.has(e)){const t={id:e};return n.set(e,t),t}r.add(e);const o=a(e);return t=n.get(e),t?Object.assign(t,o):(t={id:e,...o},n.set(e,t)),r.delete(e),t});var a;const l=e=>{let t=!0;const n={},r={};return e.forEach(((e,o)=>{t=t&&!!e.name;const i=e.name||o,a=s(e.type);"void"!==a.type&&(n[i]=a,r[i]=e.docs)})),t?{type:"struct",value:n,innerDocs:r}:c(Object.values(n),Object.values(r))},c=(e,t)=>{if(e.every((t=>t.id===e[0].id))&&t.every((e=>!e.length))){const[t]=e;return"void"===t.type?cx:{type:"array",value:e[0],len:e.length}}return{type:"tuple",value:e,innerDocs:t}};return s})(e.lookup,(({def:n})=>{if("composite"===n.tag){const r=function(e){const n=2===e.value.length&&"index"===e.value[0].name&&"error"===e.value[1].name;if(!n)return null;const r=t(e.value[0].type),o=t(e.value[1].type);return"primitive"===r.type&&"u8"===r.value&&"array"===o.type&&"primitive"===o.value.type&&"u8"===o.value.value?1+o.len:null}(n);if(r)return{type:"enum",innerDocs:{},value:Object.fromEntries(e.pallets.map((e=>[e.name,null==e.errors?{...cx,idx:e.index}:{type:"lookupEntry",value:t(e.errors),idx:e.index}]))),byteLength:r}}return null}));return Object.assign(t,{metadata:e,call:(()=>{var t;if("outerEnums"in e)return e.outerEnums.call;const n=e.lookup[null==(t=e.extrinsic)?void 0:t.type],r=null==n?void 0:n.params.find((e=>"Call"===e.name));return(null==r?void 0:r.type)??null})()})},dx=zv(),fx=kp(Yp[0],Sp(Yp[1],BigInt)),px=(hx=(e,t,n,r)=>{if("primitive"===e.type)return Ig[e.value];if("void"===e.type)return eh;if("AccountId32"===e.type)return r;if("AccountId20"===e.type)return xm;if("compact"===e.type)return e.isBig?fx:Yp;if("bitSequence"===e.type)return Fv;const o=e=>px(e,t,n,r),i=(e,t)=>{const n=o(e);return t?xh(n,t):xh(n)},s=e=>vh(...e.map(o)),a=e=>{const t=Object.fromEntries(Object.entries(e).map((([e,t])=>[e,o(t)])));return yh(t)};if("sequence"===e.type&&"primitive"===e.value.type&&"u8"===e.value.value)return dx;if("array"===e.type)return"primitive"===e.value.type&&"u8"===e.value.value?zv(e.len):i(e.value,e.len);if("sequence"===e.type)return i(e.value);if("tuple"===e.type)return s(e.value);if("struct"===e.type)return a(e.value);if("option"===e.type)return ch(o(e.value));if("result"===e.type)return fh(o(e.value.ok),o(e.value.ko));const l=Object.values(e.value).map((e=>{switch(e.type){case"void":return eh;case"lookupEntry":return o(e.value);case"tuple":return s(e.value);case"struct":return a(e.value);case"array":return i(e.value,e.len)}})),c=Object.fromEntries(Object.keys(e.value).map(((e,t)=>[e,l[t]]))),u=Object.values(e.value).map((e=>e.idx)),d=u.every(((e,t)=>e===t))?rm(c):rm(c,u);return e.byteLength?yx(d,e.byteLength):d},vx=Jv,mx=e=>e,(e,t,n,...r)=>{const{id:o}=e;if(t.has(o))return t.get(o);if(n.has(o)){const n=vx((()=>t.get(o)),e,...r);return t.set(o,n),n}n.add(o);let i=hx(e,t,n,...r);return n.delete(o),t.has(o)&&(i=mx(i,t.get(o),e,...r)),t.set(o,i),i});var hx,vx,mx;const gx=(e,t=cv())=>{const n=new Map;return r=>(r=>px(e(r),n,new Set,t))(r)},yx=(e,t)=>{const n=rh(t);return kp((t=>n.enc(e.enc(t))),(t=>e.dec(n.dec(t))))},bx=e=>{var t;const{metadata:n}=e;let r=gx(e);const o=null==(t=n.pallets.find((e=>"System"===e.name)))?void 0:t.constants.find((e=>"SS58Prefix"===e.name));let i;if(o)try{const t=r(o.type).dec(o.value);"number"==typeof t&&(i=t,r=gx(e,cv(t)))}catch(c){}const s=new Map,a=e=>{switch(e.type){case"void":return eh;case"lookupEntry":return r(e.value.id);case"tuple":return vh(...Object.values(e.value).map((e=>r(e.id))));case"struct":return yh(hv(e.value,(e=>r(e.id))));case"array":return xh(r(e.value.id),e.len)}},l=t=>(r,o)=>{const i=n.pallets.find((e=>e.name===r)),s=e(i[t]);if("enum"!==s.type)throw null;const l=s.value[o];return{location:[i.index,l.idx],codec:a(s.value[o])}};return{buildDefinition:r,buildStorage:(t,o)=>{let i=s.get(t);i||s.set(t,i=Lg(t));const a=n.pallets.find((e=>e.name===t)).storage.items.find((e=>e.name===o)),l=(e,...t)=>{const n=i(...t);return{...n,len:e,fallback:1===a.modifier?n.dec(a.fallback):void 0}};if("plain"===a.type.tag)return l(0,o,r(a.type.value).dec);const{key:c,value:u,hashers:d}=a.type.value,f=r(u),p=d.map((e=>Ig[e.tag])),h=(()=>{if(1===p.length)return[[r(c),p[0]]];const t=e(c);switch(t.type){case"array":return p.map((e=>[r(t.value.id),e]));case"tuple":return t.value.map(((e,t)=>[r(e.id),p[t]]));default:throw new Error("Invalid key type")}})();return l(p.length,o,f.dec,...h)},buildEvent:l("events"),buildError:l("errors"),buildRuntimeCall:(e,t)=>{var o;const i=null==(o=n.apis.find((t=>t.name===e)))?void 0:o.methods.find((e=>e.name===t));if(!i)throw null;return{args:vh(...i.inputs.map((e=>r(e.type)))),value:r(i.output)}},buildCall:l("calls"),buildConstant:(e,t)=>{const o=n.pallets.find((t=>t.name===e)).constants.find((e=>e.name===t));return r(o.type)},ss58Prefix:i}},wx=dv(Pp.enc(15)),xx=rh(),kx=ch(xx),Ex=xh(Pp).dec,Sx=e=>t=>{const n=t(),r=new Set([n]),o=(t=>{const n=(r,o)=>{const i=t();return i?e(i,r,o).pipe(Tw((e=>{if(e instanceof Jw)return n(r,o);if(e instanceof _y)return Ow(750).pipe(Aw((()=>n(r,o))));throw e}))):qb},r=n("Metadata_metadata_versions","").pipe(gw(Ex)),o=n("Metadata_metadata","").pipe(gw((e=>{const t=xx.dec(e);return{metadata:ng.dec(t).metadata.value,metadataRaw:t}}))),i=n("Metadata_metadata_at_version",wx).pipe(gw((e=>{const t=kx.dec(e);return{metadata:ng.dec(t).metadata.value,metadataRaw:t}})));return r.pipe(Tw((()=>pw([14]))),Aw((e=>e.includes(15)?i:o)))})(t).pipe(gw((({metadata:e,metadataRaw:t})=>{const n=ux(e),r=bx(n),o=r.buildStorage("System","Events"),i=e.extrinsic.signedExtensions.find((e=>"ChargeAssetTxPayment"===e.identifier));let s=null;if(i){const e=n(i.type);if("struct"===e.type){const t=e.value.asset_id;"option"===t.type&&(s=t.value.id)}}return{assetId:s,metadataRaw:t,lookup:n,dynamicBuilder:r,events:{key:o.enc(),dec:o.dec},accountId:cv(r.ss58Prefix)}})),Hw(1)),i={at:n,runtime:o,addBlock:e=>(r.add(e),i),deleteBlocks:e=>(e.forEach((e=>{r.delete(e)})),r.size),usages:r};return o.subscribe({error(){}}),i},Cx=Uw({connector:()=>new zb(1),resetOnError:!0,resetOnComplete:!0,resetOnRefCountZero:!0}),_x=(e,t)=>()=>{const n=e.runtimes[t];if(!n)return e.blocks.has(t)?t:null;return[...n.usages].reverse().find((t=>!e.blocks.get(t).unpinned))??null},Ax=(e,t)=>{var n;null==(n=e.get(e.get(t).parent))||n.children.delete(t),e.delete(t)},Nx=(e,t,n,r)=>{const o=Rw(n,e).pipe(Bw(((e,t)=>{switch(t.type){case"initialized":if(e.recovering){t.finalizedBlockHashes.some((t=>e.blocks.has(t)))||(e=Px())}const[n]=t.finalizedBlockHashes.slice(-1);e.finalized=e.best=n;const o=t.finalizedBlockHashes.length-1;t.finalizedBlockHashes.forEach(((n,r)=>{e.blocks.has(n)?e.blocks.get(n).recovering=!1:e.blocks.set(n,{hash:n,parent:0===r?t.parentHash:t.finalizedBlockHashes[r-1],children:new Set(r===o?[]:[t.finalizedBlockHashes[r+1]]),runtime:n,refCount:0,number:t.number+r,recovering:!1})}));const s=Object.values(e.runtimes).find((e=>e.usages.has(n)));return e.finalizedRuntime=s??(e.runtimes[n]=i(_x(e,n))),e;case"stop-error":for(const t of e.blocks.values())t.recovering=!0;return e.recovering=!0,e;case"newBlock":{const{parentBlockHash:n,blockHash:r}=t;if(e.blocks.has(r))e.blocks.get(r).recovering=!1;else{const o=e.blocks.get(n);o.children.add(r),t.newRuntime&&(e.runtimes[r]=i(_x(e,r)));const s={hash:r,number:o.number+1,parent:n,children:new Set,runtime:t.newRuntime?r:o.runtime,refCount:0,recovering:!1};e.blocks.set(r,s),e.runtimes[s.runtime].addBlock(r)}return e}case"bestBlockChanged":if(e.recovering){for(const[t,n]of e.blocks)n.recovering&&Ax(e.blocks,t);e.recovering=!1}return e.best=t.bestBlockHash,e;case"finalized":{e.finalized=t.finalizedBlockHashes.slice(-1)[0];const{blocks:n}=e;return n.get(e.best).number<n.get(e.finalized).number&&(e.best=e.finalized),e.finalizedRuntime=e.runtimes[n.get(e.finalized).runtime],r(((e,t)=>{const n=[...t];let r=e.blocks.get(e.blocks.get(e.finalized).parent);const o=[];for(;r;)o.push(r.hash),0!==r.refCount||r.unpinned||(n.push(r.hash),r.unpinned=!0),r=e.blocks.get(r.parent);const i=[...t];for(let s=o.length-1;s>=0&&(r=e.blocks.get(o[s]),r.unpinned);s--)i.push(r.hash);return i.forEach((t=>{Ax(e.blocks,t)})),Object.entries(e.runtimes).map((([e,t])=>({key:e,usages:t.deleteBlocks(i)}))).filter((e=>0===e.usages)).map((e=>e.key)).forEach((t=>{delete e.runtimes[t]})),n})(e,t.prunedBlockHashes)),e}case"blockUsage":{if(!e.blocks.has(t.value.hash))return e;const n=e.blocks.get(t.value.hash);return n.refCount+="hold"===t.value.type?1:-1,0===n.refCount&&n.number<e.blocks.get(e.finalized).number&&!n.recovering&&(n.unpinned=!0,r([n.hash])),e}}}),Px()),Mw((e=>!!e.finalizedRuntime.runtime)),gw((e=>({...e}))),Cx),i=Sx(ix(o,t));return o},Px=()=>({best:"",finalized:"",runtimes:{},blocks:new Map,finalizedRuntime:{},recovering:!1}),jx=(e,t,n,r)=>{const o=t=>{return n=e.pipe(Mw((({blocks:e})=>!e.has(t)))),jb((function(e,t){iw(n).subscribe($b(t,(function(){return t.complete()}),vb)),!t.closed&&e.subscribe(t)}));var n},i=(s,a,l)=>((e,i,s)=>{if(s)return pw({hash:e,found:{type:!1,validity:null}});const a=o(e);return t(e).pipe(Aw((t=>{const o=t.indexOf(i);return o>-1?a(r(e)).pipe(gw((t=>({hash:e,found:{type:!0,index:o,events:t}})))):n(e,i).pipe(gw((t=>({hash:e,found:{type:!1,validity:t}}))))})),a)})(s,a,l.has(s)).pipe(Aw((t=>{var n;const{found:r}=t;return r.type||!1===(null==(n=r.validity)?void 0:n.success)?pw(t):e.pipe(o(s),Aw((e=>e.blocks.get(s).children)),jb((function(e,t){var n=new Set;e.subscribe($b(t,(function(e){var r=c?c(e):e;n.has(r)||(n.add(r),t.next(e))}))),u&&iw(u).subscribe($b(t,(function(){return n.clear()}),vb))})),Aw((e=>i(e,a,l))));var c,u})));return t=>e.pipe(Iw(1),Aw((e=>i(e.finalized,t,new Set(e.blocks.keys())))))},$x=new Uint8Array([2]),Ox="TaggedTransactionQueue",Rx="validate_transaction",[,Mx]=rm({InvalidTransaction:rm({Call:eh,Payment:eh,Future:eh,Stale:eh,BadProof:eh,AncientBirthBlock:eh,ExhaustsResources:eh,Custom:Ap,BadMandatory:eh,MandatoryValidation:eh,BadSigner:eh}),UnknownTransaction:rm({CannotLookup:eh,NoUnsignedValidator:eh,Custom:Ap})}),Tx=xp((e=>{const t=Ap.dec(e);if(t>1)throw new Error("Unable to decode validateTransaction result");if(!t)return{success:!0,value:void 0};let n;try{n=Mx(e)}catch(r){n={type:"UnknownInvalidTx"}}return{success:!1,value:n}})),Lx=(e,t)=>(n,r)=>{const o=t(n).pipe(gw((e=>{try{return e.dynamicBuilder.buildRuntimeCall(Ox,Rx).value[1]}catch(t){return Tx}})));return e(n,`${Ox}_${Rx}`,((e,t)=>dv(vv($x,pv(e),pv(t))))(r,n)).pipe(qw(o),gw((([e,t])=>t(e))))},Ix=({hash:e,number:t,parent:n})=>({hash:e,number:t,parent:n}),zx=e=>{const{getFollower:t,startFollow:n,follow$:r,getHeader:o}=sx(e),i=(e=>t=>(...n)=>e()[t](...n))(t),{withRecovery:s,withRecoveryFn:a}=Gw(),l=new Mb,c=e=>(t,...n)=>new Nb((r=>{l.next({type:"blockUsage",value:{type:"hold",hash:t}});const o=e(t,...n).subscribe(r);return()=>{setTimeout((()=>{l.next({type:"blockUsage",value:{type:"release",hash:t}})}),0),o.unsubscribe()}})),u=e=>{return(e=>(t,...n)=>new Nb((r=>{let o=!1;return p.pipe(Iw(1)).subscribe((e=>{const n=e.blocks.get(t);o=!!n&&!n.unpinned})),o?e(t,...n).subscribe(r):r.error(new Jw)})))(c((t=ix(p,a(nx(e))),function(e,t,n){return(r,o,...i)=>(o?_b(ox(r,t.pipe(Mw((e=>"finalized"===e.type)),Aw((e=>e.prunedBlockHashes)))),rx(r,e)):e=>e)(n(r,...i))}(p,r,t))));var t},d=(e,t=!0)=>(n,...r)=>e(n,t,...r),f=new Map,p=Nx(r,c(a(nx(i("call")))),l,(e=>{var n;n=e,t().unpin(n).catch((e=>{if(!(e instanceof Ey))throw e})),e.forEach((e=>{f.delete(e)}))})),h=c((e=>p.pipe(Iw(1),Aw((t=>t.runtimes[t.blocks.get(e).runtime].runtime))))),v=(e,t,n)=>{const r=f.get(e)??new Map,o=r.get(t);if(o)return o;f.set(e,r);const i=new zb,s=n.pipe(Uw({connector:()=>i}),(u=rb(a={complete(){r.set(t,i)}})||l||c?{next:a,error:l,complete:c}:a)?jb((function(e,t){var n;null===(n=u.subscribe)||void 0===n||n.call(u);var r=!0;e.subscribe($b(t,(function(e){var n;null===(n=u.next)||void 0===n||n.call(u,e),t.next(e)}),(function(){var e;r=!1,null===(e=u.complete)||void 0===e||e.call(u),t.complete()}),(function(e){var n;r=!1,null===(n=u.error)||void 0===n||n.call(u,e),t.error(e)}),(function(){var e,t;r&&(null===(e=u.unsubscribe)||void 0===e||e.call(u)),null===(t=u.finalize)||void 0===t||t.call(u)})))})):Cb,(e=>new Nb((t=>{const n=e.subscribe({next(e){t.next(e)},error(e){t.error(e)},complete(){t.complete()}}),r=()=>n.unsubscribe();return()=>{Promise.resolve().then(r)}}))));var a,l,c,u;return r.set(t,s),s},m=p.pipe(zw(((e,t)=>e.finalized===t.finalized)),gw((e=>Ix(e.blocks.get(e.finalized)))),Cx),g=p.pipe(zw(((e,t)=>e.best===t.best)),gw((e=>Ix(e.blocks.get(e.best)))),Cx),y=p.pipe(zw(((e,t)=>e.finalized===t.finalized&&e.best===t.best)),Bw(((e,t)=>{const n=n=>e.get(n)||Ix(t.blocks.get(n)),r=n(t.best),o=n(t.finalized),i=r.number-o.number+1,s=new Array(i);for(let a=0,l=r.hash;a<i;a++)s[a]=n(l),l=s[a].parent;return new Map(s.map((e=>[e.hash,e])))}),new Map),gw((e=>[...e.values()])),Cx),b=p.pipe(zw(((e,t)=>e.finalizedRuntime===t.finalizedRuntime)),Vw((({finalizedRuntime:{runtime:e}})=>{return e.pipe((t=null,e=>new Nb((n=>{let r=!1;const o=e.subscribe({next(e){r=!0,n.next(e)},error(e){n.error(e)},complete(){n.complete()}});return r||n.next(t),o}))));var t})),Cx),w=b.pipe(gw((e=>(null==e?void 0:e.lookup.metadata)??null))),x=((e,t)=>n=>(r,...o)=>{if(!ex.has(r))return tx(n(r,...o));const i=("best"===r?t:e).pipe(Iw(1),Aw((e=>n(e,...o))),Tw((e=>e instanceof Jw?i:hw((()=>e)))));return tx(i)})(m.pipe(gw((e=>e.hash))),g.pipe(gw((e=>e.hash)))),k=x(u(i("body"))),E=u(i("storage")),S=x(((e,t,n,r,o=null,i)=>p.pipe(Iw(1),Aw((t=>t.runtimes[t.blocks.get(e).runtime].runtime)),Aw((s=>{const a=r(s),l=v(e,`storage-${n}-${a}-${o??""}`,E(e,t,n,a,o));return i?v(e,`storage-${n}-${a}-${o??""}-dec`,l.pipe(gw((e=>i(e,s))))):l}))))),C=((e,t)=>{const n=(r,o,i,s)=>new Nb((t=>e().storageSubscription(r,o,i??null,(e=>{t.next(e)}),(e=>{t.error(e)}),(()=>{t.complete()}),(e=>{0!==e&&t.next(n(r,o.slice(-e),i,!0))})))).pipe(Nw(),t(s));return n})(t,s),_=x(c(ix(p,((e,t,n)=>C(e,t,n??null,!1))))),A=x(c(ix(p,(e=>jw((()=>o(e))))))),N=(e,t=!1)=>S(e,t,"value",(e=>e.events.key),null,((e,t)=>t.events.dec(e))),P=u(i("call")),j=x(((e,t,n,r)=>v(e,`call-${n}-${r}`,P(e,t,n,r)))),$=Lx(d(j,!1),h),O=e=>v(e,"body",k(e,!1)),R=jx(p,O,$,N),M=jx(p,O,$,(()=>pw()));Rw(b,y).subscribe({error(){}});let T=vb,L=!1,I=0;return[{follow$:r,finalized$:m,best$:g,bestBlocks$:y,runtime$:b,metadata$:w,header$:A,body$:e=>v(e,"body",k(e,!0)),call$:d(j),storage$:d(S),storageQueries$:_,eventsAt$:d(N),trackTx$:R,trackTxWithoutEvents$:M,validateTx$:$,pinnedBlocks$:p,withRuntime:e=>t=>t.pipe(((e,t=1/0)=>n=>new Nb((r=>{let o;const i=new Map,s=new Map,a=new Map;let l=0,c=0,u=0;const d=()=>{const e=i.get(c);if(!e)return void(0!==s.size||void 0!==o&&!o.closed||r.complete());const t=c++;i.delete(t),u!==t&&a.set(t,[]),s.set(t,e.subscribe({next(e){u===t?r.next(e):a.get(t).push(e)},complete(){if(s.delete(t),t===u)for(u++;a.has(u)&&(a.get(u).forEach((e=>r.next(e))),a.delete(u),!s.has(u));)u++;d()},error(e){r.error(e)}}))};return o=n.subscribe({next(n){const r=l++;i.set(r,jw((()=>e(n,r)))),s.size<t&&d()},error(e){r.error(e)},complete(){0===s.size&&r.complete()}}),()=>{s.forEach((e=>e.unsubscribe())),o.unsubscribe(),i.clear(),a.clear()}})))((t=>h(e(t)).pipe(gw((e=>[t,e])))))),getRuntimeContext$:x(h),unfollow:()=>{null!=L&&(I--,L&&!I&&(L=null,T(),T=vb))}},e=>{I+=e,L=!0,T=n()}]};const Dx=new Map;class Bx{constructor(){}_runtime(e){}}class Ux{constructor(){}_compatibility(e){}}const Fx=new WeakMap,Hx=new WeakMap,Vx=e=>e instanceof Bx?Hx.get(e):Fx.get(e);var Wx=(e=>(e.Storage="storage",e.Tx="tx",e.Event="events",e.Const="constants",e))(Wx||{});const qx=xh(vy),Kx=xh(Yg),Yx=vh(qx,Kx),Qx=new WeakMap,Gx=e=>(Qx.has(e.metadataRaw)||Qx.set(e.metadataRaw,{compat:new Map,lookup:e.lookup,typeNodes:[]}),Qx.get(e.metadataRaw)),Jx=(e,t,n)=>{const r=(e,t)=>{var n;const r=Gx(e);return(n=r.typeNodes)[t]||(n[t]=Jg(r.lookup(t)))};function o(e,o){if(e instanceof Bx)return{args:ny.Identical,values:ny.Identical};const i=Fx.get(e);o||(o=i.runtime());const s=t(i),a=n(o),l=i.typedefNodes;return function(e,t,n,r,o){const i=(e,t)=>"lookup"===e.type?t(e.value):e.value;return{args:ry(i(e.args,t),t,i(n.args,r),r,o).level,values:ry(i(n.values,r),r,i(e.values,t),t,o).level}}(s,(e=>l[e]),a,(e=>r(o,e)),Gx(o).compat)}const i=Zx(e,(e=>Xx(o(e)))),s=Zx(e,((e,t)=>i(t)>=e)),a=()=>e;return{isCompatible:s,getCompatibilityLevel:i,getCompatibilityLevels:o,waitDescriptors:a,withCompatibleRuntime:(e,t)=>n=>Cw([n.pipe(e.withRuntime(t)),a()]).pipe(gw((([[e,t],n])=>[e,n,t]))),compatibleRuntime$:(e,t)=>Cw([a(),e.getRuntimeContext$(t)]),argsAreCompatible:(e,t,i)=>{if(e instanceof Bx)return!0;const s=o(e,t);if(s.args===ny.Incompatible)return!1;if(s.args>ny.Partial)return!0;if(s.values===ny.Incompatible)return!1;return my(n(t).args,(e=>r(t,e)),i)},valuesAreCompatible:(e,n,r)=>{if(e instanceof Bx)return!0;const i=o(e,n).values;if(i===ny.Incompatible)return!1;if(i>ny.Partial)return!0;const s=Fx.get(e);return my(t(s).values,(e=>s.typedefNodes[e]),r)},getRuntimeTypedef:r}},Xx=e=>Math.min(e.args,e.values),Zx=(e,t)=>(...n)=>{const r=n.at(-1);return r instanceof Ux||r instanceof Bx?t(...n):e.then((e=>t(...n,e)))},ek=(e,t,{valuesAreCompatible:n,waitDescriptors:r,isCompatible:o,getCompatibilityLevel:i})=>{const s=new WeakMap,a=o=>{if(o){const r=Vx(o).runtime(),i=(n=>{if(s.has(n))return s.get(n);const r=n.lookup.metadata.pallets.find((t=>t.name===e)),o=null==r?void 0:r.constants.find((e=>e.name===t));if(null==o)throw new Error(`Runtime entry Constant(${e}.${t}) not found`);const i=n.dynamicBuilder.buildConstant(e,t).dec(o.value);return s.set(n,i),i})(r);if(!n(o,r,i))throw new Error(`Incompatible runtime entry Constant(${e}.${t})`);return i}return r().then(a)};return Object.assign(a,{isCompatible:o,getCompatibilityLevel:i})},tk=Uw({connector:()=>new zb(1),resetOnError:!0,resetOnComplete:!0,resetOnRefCountZero:!0}),nk=(e,t,n,{isCompatible:r,getCompatibilityLevel:o,withCompatibleRuntime:i,argsAreCompatible:s,valuesAreCompatible:a})=>{const l=()=>new Error(`Incompatible runtime entry Event(${e}.${t})`),c=n.finalized$.pipe(i(n,(e=>e.hash)),gw((([n,r,o])=>{var i;const a=null==(i=o.lookup.metadata.pallets.find((t=>t.name===e)))?void 0:i.events;if(null==a||"variant"!==o.lookup.metadata.lookup[a].def.tag||null==o.lookup.metadata.lookup[a].def.value.find((e=>e.name===t)))throw new Error(`Runtime entry Event(${e}.${t}) not found`);if(!s(r,o,null))throw l();return[n,r,o]})),((e,t=1/0)=>n=>new Nb((r=>{let o;const i=new Map,s=new Map,a=new Map;let l=0,c=0,u=0;const d=()=>{const e=i.get(c);if(!e)return void(0!==s.size||void 0!==o&&!o.closed||r.complete());const t=c++;i.delete(t),u!==t&&a.set(t,[]),s.set(t,e.subscribe({next(e){u===t?r.next(e):a.get(t).push(e)},complete(){if(s.delete(t),t===u)for(u++;a.has(u)&&(a.get(u).forEach((e=>r.next(e))),a.delete(u),!s.has(u));)u++;d()},error(e){r.error(e)}}))};return o=n.subscribe({next(n){const r=l++;i.set(r,jw((()=>e(n,r)))),s.size<t&&d()},error(e){r.error(e)},complete(){0===s.size&&r.complete()}}),()=>{s.forEach((e=>e.unsubscribe())),o.unsubscribe(),i.clear(),a.clear()}})))((([r,o,i])=>n.eventsAt$(r.hash).pipe(gw((n=>n.filter((n=>n.event.type===e&&n.event.value.type===t)).map((e=>{if(!a(o,i,e.event.value.value))throw l();return{meta:{phase:e.phase,block:r},payload:e.event.value.value}}))))))),tk);return{watch:e=>c.pipe(Aw((t=>e?t.filter((t=>e(t.payload))):t))),pull:()=>mw(c),filter:n=>n.filter((n=>n.type===e&&n.value.type===t)).map((e=>e.value.value)),getCompatibilityLevel:o,isCompatible:r}};function rk(e,t){return new Promise(((n,r)=>{let o=null,i=!1;const s=t?()=>{null==o||o.unsubscribe(),r(new gv)}:vb;o=e.subscribe({next:e=>{n(e),null==o||o.unsubscribe(),i=!0},error:e=>{null==t||t.removeEventListener("abort",s),r(e)},complete:()=>{null==t||t.removeEventListener("abort",s),r(new Error("Observable completed without emitting"))}}),i||null==t||t.addEventListener("abort",s)}))}const ok=e=>"object"==typeof e&&null!==e&&Object.entries(e).every((([e,t])=>"at"===e&&(void 0===t||"string"==typeof t)||"signal"===e&&(void 0===t||t instanceof AbortSignal))),ik=(e,t)=>n=>new Nb((r=>{let o=new Array,i=!1;const s=n.subscribe({next(n){(n=>{const s=new ab;o.push(s),o.length>t&&(o[0].unsubscribe(),o=o.slice(1));const a=e(n).subscribe({next(e){const t=o.indexOf(s);o.slice(0,t).forEach((e=>e.unsubscribe())),o=o.slice(t),r.next(e)},error(e){r.error(e)},complete(){const e=o.indexOf(s);o.splice(e,1),0===o.length&&i&&r.complete()}});s.add(a)})(n)},error(e){r.error(e)},complete(){0===o.length&&r.complete(),i=!0}});return()=>{s.unsubscribe(),o.forEach((e=>e.unsubscribe()))}})),sk=(e,t,n,{isCompatible:r,getCompatibilityLevel:o,getCompatibilityLevels:i,waitDescriptors:s,withCompatibleRuntime:a,argsAreCompatible:l,valuesAreCompatible:c})=>{const u="System"===e&&"Number"===t,d=_b(qw(n.runtime$.pipe(Mw(Boolean),Iw(1),gw((({dynamicBuilder:e})=>"bigint"==typeof e.buildStorage("System","Number").dec(new Uint8Array(32))?BigInt:Cb)),Hw())),gw((([e,t])=>t(e)))),f=()=>new Error(`Incompatible runtime entry Storage(${e}.${t})`),p=n=>new Error(`Invalid Arguments calling ${e}.${t}(${n})`),h=n=>{try{return n.dynamicBuilder.buildStorage(e,t)}catch{throw new Error(`Runtime entry Storage(${e}.${t}) not found`)}},v=async(...e)=>{const t=e[e.length-1],r=ok(t),{signal:o,at:i}=r?t:{},a=i??null;let v;if(u)v=n.bestBlocks$.pipe(gw((e=>"finalized"!==a&&a?"best"===a?e.at(0):e.find((e=>e.hash===a)):e.at(-1))),gw((e=>{if(!e)throw new Zw;return e.number})),zw(),d);else{const t=await s();v=n.storage$(a,"value",(n=>{const o=h(n),i=e.length===o.len?e:e.slice(0,-1);if(e!==i&&!r)throw p(e);if(!l(t,n,i))throw f();return o.enc(...i)}),null,((e,n)=>{const r=h(n),o=null===e?r.fallback:r.dec(e);if(!c(t,n,o))throw f();return o}))}return rk(v,o)};return{isCompatible:r,getCompatibilityLevel:o,getValue:v,getValues:(e,t)=>Promise.all(e.map((e=>v(...t?[...e,t]:e)))),getEntries:async(...e)=>{const t=e[e.length-1],r=ok(t),{signal:o,at:a}=r?t:{},l=a??null,u=await s();return rk(n.storage$(l,"descendantsValues",(t=>{const n=h(t);if(Xx(i(u,t))===ny.Incompatible)throw f();if(e.length>n.len)throw p(e);const o=e.length>0&&r?e.slice(0,-1):e;if(e.length===n.len&&o===e)throw p(e);return n.enc(...o)}),null,((e,t)=>{const n=h(t);if(e.some((({value:e})=>!c(u,t,e))))throw f();return e.map((({key:e,value:t})=>({keyArgs:n.keyDecoder(e),value:n.dec(t)})))})),o)},watchValue:(...e)=>{const t=e[e.length-1],r="best"===t||"finalized"===t?e.slice(0,-1):e;return u?n.bestBlocks$.pipe(gw((e=>e.at("best"===t?0:-1).number)),zw(),d):n["best"===t?"best$":"finalized$"].pipe((o=0,void 0===i&&(i=Vb),jb((function(e,t){var n=null,r=null,s=null,a=function(){if(n){n.unsubscribe(),n=null;var e=r;r=null,t.next(e)}};function l(){var e=s+o,r=i.now();if(r<e)return n=this.schedule(void 0,e-r),void t.add(n);a()}e.subscribe($b(t,(function(e){r=e,s=i.now(),n||(n=i.schedule(l,o),t.add(n))}),(function(){a(),t.complete()}),void 0,(function(){r=n=null})))}))),a(n,(e=>e.hash)),ik((([e,t,o])=>{const i=h(o);if(!l(t,o,r))throw f();return n.storage$(e.hash,"value",(()=>i.enc(...r))).pipe(gw((e=>{if(!c(t,o,e))throw f();return{val:e,codecs:i}})))}),4),zw(((e,t)=>e.val===t.val)),gw((({val:e,codecs:t})=>null===e?t.fallback:t.dec(e))));var o,i}}},ak=Ep(Ap.enc,(e=>+!!e.signed<<7|e.version)),lk=()=>new Error("Unkown signer"),ck={Ed25519:0,Sr25519:1,Ecdsa:2},uk=(e,t,n,r,o,i)=>{const[s,a]=(e=>{const{extrinsic:t}=e,n=ux(e);let r,o;if("address"in t)r=n(t.address),o=n(t.signature);else{const i=Object.fromEntries(e.lookup[t.type].params.filter((e=>null!=e.type)).map((e=>[e.name,n(e.type)])));if(r=i.Address,o=i.Signature,!r||!o)throw lk()}if("AccountId20"===r.type&&"array"===o.type&&65===o.len&&"primitive"===o.value.type&&"u8"===o.value.value)return[1,[]];if("enum"!==o.type||["Ecdsa","Ed25519","Sr25519"].some((e=>!(e in o.value))))throw lk();if("enum"===r.type){const e=r.value.Id;if("lookupEntry"===e.type&&"AccountId32"===e.value.type)return[0,[e.idx]]}else if("AccountId32"===r.type)return[0,[]];throw lk()})(e),l=vv(ak({signed:!0,version:4}),1===s?t:new Uint8Array([...a,...t]),1!==s&&i?new Uint8Array([ck[i],...n]):n,...r,o);return vv(Yp.enc(l.length),l)},[dk,fk]=["<Bytes>","</Bytes>"].map((e=>Rv.fromText(e).asBytes())),pk=e=>async t=>{let n,r=!0;for(n=0;r&&n<dk.length;n++)r=dk[n]===t[n];r=r&&n===dk.length;const o=t.length-fk.length;for(n=0;r&&n<fk.length;n++)r=fk[n]===t[o+n];return r=r&&n===fk.length,e(r?t:vv(dk,t,fk))};const hk=new Uint8Array,vk=e=>{const{enc:t}=e.dynamicBuilder.buildStorage("System","BlockHash");let n;try{n=t(0)}catch{n=t(0n)}return e.chainHead.storage$(e.at,"value",(()=>n),null).pipe(gw((e=>pv(e))))},mk=(e,t)=>{const n=bx(t),r=t.metadata.pallets.find((e=>"System"===e.name)).constants.find((e=>"Version"===e.name)),o=t(r.type),i=n.buildDefinition(r.type).dec;if("struct"!==o.type)throw new Error("not a struct");return pw((0,n.buildDefinition(o.value[e].id).enc)(i(r.value)[e]))};const gk=Ep(rh(2).enc,(e=>{const t=Math.max(e.period>>12,1),n=Math.min(Math.max(function(e){let t=0;for(;!(1&e);)t++,e>>=1;return t}(e.period)-1,1),15),r=e.phase/t<<4;return Np.enc(n|r)})),yk=new Uint8Array([0]),bk=yh({tip:Yp,asset:ch(rh(1/0))}).enc,wk="AccountNonceApi_account_nonce",xk={1:Ap.dec,2:Np.dec,4:Pp.dec,8:jp.dec},kk=e=>pw({value:Yp.enc(e),additionalSigned:hk}),Ek=Object.freeze(Object.defineProperty({__proto__:null,CheckGenesis:e=>vk(e).pipe(gw((e=>({value:hk,additionalSigned:e})))),CheckMetadataHash:()=>pw({value:Uint8Array.from([0]),additionalSigned:Uint8Array.from([0])}),CheckNonce:e=>e.chainHead.call$(e.at,wk,dv(e.from)).pipe(Aw((e=>{const t=pv(e),n=xk[t.length];if(!n)throw new Error(`${wk} retrieved wrong data`);return kk(n(t))}))),CheckSpecVersion:({lookupFn:e})=>mk("spec_version",e).pipe(gw((e=>({additionalSigned:e,value:hk})))),CheckTxVersion:({lookupFn:e})=>mk("transaction_version",e).pipe(gw((e=>({additionalSigned:e,value:hk})))),getNonce:kk},Symbol.toStringTag,{value:"Module"})),Sk=pw({value:hk,additionalSigned:hk}),Ck=(e,t,n)=>{if(!(t in e))return hk;const r=e[t];return r instanceof Uint8Array?r:n(r)},_k=(e,t,n,r,o,i={})=>e.getRuntimeContext$(r.hash).pipe(Iw(1),Aw((s=>{const a={lookupFn:s.lookup,dynamicBuilder:s.dynamicBuilder,chainHead:e,callData:n,at:r.hash,from:t.publicKey},l=i.mortality?i.mortality.mortal?{period:i.mortality.period,blockNumber:r.number}:void 0:{period:64,blockNumber:r.number};return Cw(Object.fromEntries(s.lookup.metadata.extrinsic.signedExtensions.map((({identifier:e,type:t,additionalSigned:n})=>[e,(()=>{if("CheckMortality"===e)return((e,t)=>{if(!e)return vk(t).pipe(gw((e=>({additionalSigned:e,value:yk}))));const{period:n,blockNumber:r}=e;return pw({additionalSigned:pv(t.at),value:gk({period:n,phase:r%n})})})(l,a);if("ChargeTransactionPayment"===e)return r=i.tip??0n,pw({value:Bv.enc(r),additionalSigned:hk});var r;if("ChargeAssetTxPayment"===e)return((e,t)=>pw({value:bk({tip:e,asset:t}),additionalSigned:hk}))(i.tip??0n,i.asset);if("CheckNonce"===e&&"nonce"in i)return kk(i.nonce);const c=Ek[e],[u]=s.dynamicBuilder.buildDefinition(t),[d]=s.dynamicBuilder.buildDefinition(n);return c?c(a):u===eh[0]&&d===eh[0]?Sk:e in o?((e,t,n)=>pw({value:Ck(e,"value",t),additionalSigned:Ck(e,"additionalSigned",n)}))(o[e],u,d):null})()])).filter((e=>e[1])))).pipe(Aw((e=>t.signTx(n,hv(e,((e,t)=>({identifier:t,...e}))),s.metadataRaw,r.number))))})));let Ak={};var Nk=Object.defineProperty,Pk=(e,t,n)=>((e,t,n)=>t in e?Nk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,t+"",n);const jk=(e,t)=>{const n=e.filter((e=>"ApplyExtrinsic"===e.phase.type&&e.phase.value===t)).map((e=>({...e.event,topics:e.topics}))),r=n[n.length-1];return"System"===r.type&&"ExtrinsicFailed"===r.value.type?{ok:!1,events:n,dispatchError:r.value.value.dispatch_error}:{ok:!0,events:n}};class $k extends Error{constructor(e){super(JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString():t instanceof Rv?t.asHex():t),2)),Pk(this,"error"),this.name="InvalidTxError",this.error=e}}const Ok=(e,t,n,r,o=!1)=>{const i=(e=>dv(lg(pv(e))))(n),s=(e,t)=>({type:e,txHash:i,...t}),a=e.pinnedBlocks$.pipe(Iw(1),gw((e=>{const t=e.blocks.get(r);return t&&!t.unpinned?t.hash:e.finalized}))).pipe(Aw((t=>e.validateTx$(t,n).pipe(Mw((e=>!e.success)),gw((e=>{throw new $k(e.value)})))))),l=new Nb((r=>{const o=e.trackTx$(n).subscribe(r);return o.add(t(n).subscribe({error(e){r.error(e)}})),o})),c=(u=l,d=e.pinnedBlocks$,new Nb((e=>{const t=new Map;let n,r;const o=()=>{var o;let i=n.best,s=t.get(i),a=n.blocks.get(i).number;for(;!s;){const e=n.blocks.get(i);if(!e)break;s=t.get(i=e.parent),a--}if(!s)return;const l=a<=n.blocks.get(n.finalized).number,c=s.found.type;c&&(null==r?void 0:r.found)&&r.hash===s.hash?l&&e.complete():(e.next(r=s.found.type?{found:c,hash:s.hash,number:a,index:s.found.index,events:s.found.events}:{found:c,validity:s.found.validity}),l&&(c?e.complete():!1===(null==(o=s.found.validity)?void 0:o.success)&&e.error(new $k(s.found.validity.value))))},i=d.pipe(zw(((e,t)=>e.finalized===t.finalized&&e.best===t.best))).subscribe({next:e=>{n=e,0!==t.size&&o()},error(t){e.error(t)}});return i.add(u.subscribe({next:e=>{t.set(e.hash,e),o()},error(t){e.error(t)}})),i})).pipe(zw(((e,t)=>e===t)))).pipe(gw((e=>{var t;return e.found?s("txBestBlocksState",{found:!0,block:{index:e.index,number:e.number,hash:e.hash},...jk(e.events,e.index)}):s("txBestBlocksState",{found:!1,isValid:!1!==(null==(t=e.validity)?void 0:t.success)})})));var u,d,f;return Pw(o?pw(s("signed",{})):qb,a,pw(s("broadcasted",{})),c.pipe((f=({found:e,type:t,...n})=>e?pw(s("finalized",n)):qb,e=>new Nb((t=>{let n=Ak,r=e.subscribe({next(e){t.next(n=e)},error(e){t.error(e)},complete(){n===Ak?t.complete():r=f(n).subscribe(t)}});return()=>{r.unsubscribe()}})))))},Rk=async(e,t,n,r)=>{return(o=Ok(e,t,n,r),new Promise((function(e,t){var n,r=!1;o.subscribe({next:function(e){n=e,r=!0},error:t,complete:function(){r?e(n):t(new vw)}})}))).then((e=>{if("finalized"!==e.type)throw null;const t={...e};return delete t.type,t}));var o},Mk=cv().enc,Tk=new Uint8Array(64),Lk=new Uint8Array(65),Ik=(e,t,n,r,{isCompatible:o,getCompatibilityLevel:i,compatibleRuntime$:s,argsAreCompatible:a,getRuntimeTypedef:l},c)=>Object.assign((o=>{const i=(n,r,o={})=>{const i=Vx(n).runtime(),{dynamicBuilder:s,assetId:u,lookup:d}=i;let f;try{f=s.buildCall(e,t)}catch{throw new Error(`Runtime entry Tx(${e}.${t}) not found`)}if(c&&!a(n,i,r))throw new Error(`Incompatible runtime entry Tx(${e}.${t})`);let p=o;if(o.asset){if(null==u||!Xg(o.asset,Jg(d(u)),(e=>l(i,e))))throw new Error("Incompatible runtime asset");p={...o,asset:s.buildDefinition(u).enc(o.asset)}}const{location:h,codec:v}=f;return{callData:Rv.fromBytes(vv(new Uint8Array(h),v.enc(r))),options:p}},u=(e,t={})=>s(n,null).pipe(gw((([n])=>i(n,e,t)))),d=(e,{at:t,...r}={})=>(t&&"finalized"!==t?"best"===t?n.best$:n.bestBlocks$.pipe(gw((e=>e.find((e=>e.hash===t))))):n.finalized$).pipe(Iw(1),Aw((i=>i?((e,{...t},r)=>u(o,t).pipe(Aw((({callData:o,options:i})=>_k(n,e,o.asBytes(),r,t.customSignedExtensions||{},i)))))(e,r,i).pipe(gw((e=>({tx:dv(e),block:i})))):hw((()=>new Error(`Uknown block ${t}`)))))),f=(e,t)=>mw(d(e,t)).then((e=>e.tx)),p=async(e,t)=>{"string"==typeof e&&(e=e.startsWith("0x")?pv(e):Mk(e));const r=20===e.length,o=function(e,t,n){return{publicKey:e,signTx:async(r,o,i,s,a=lg)=>{let l;try{const e=sg(i);if("v14"!==e.metadata.tag&&"v15"!==e.metadata.tag)throw null;l=e.metadata.value}catch(p){throw new Error("Unsupported metadata version")}const c=[],u=[];l.extrinsic.signedExtensions.map((({identifier:e})=>{const t=o[e];if(!t)throw new Error(`Missing ${e} signed extension`);c.push(t.value),u.push(t.additionalSigned)}));const d=vv(r,...c,...u),f=await n(d.length>256?a(d):d);return uk(l,e,f,c,r,t)},signBytes:pk(n)}}(e,r?"Ecdsa":"Sr25519",(e=>()=>e?Lk:Tk)(r)),i=pv(await f(o,t)),s=dv(vv(i,Pp.enc(i.length))),a=n.getRuntimeContext$(null).pipe(gw((e=>e.dynamicBuilder.buildRuntimeCall("TransactionPaymentApi","query_info").value[1])));return mw(Cw([n.call$(null,"TransactionPaymentApi_query_info",s),a]).pipe(gw((([e,t])=>t(e)))))};return{getPaymentInfo:p,getEstimatedFees:async(e,t)=>(await p(e,t)).partial_fee,decodedCall:{type:e,value:Zv(t,o)},getEncodedData:e=>e?i(e,o).callData:mw(u(o).pipe(gw((e=>e.callData)))),sign:f,signSubmitAndWatch:(e,t)=>d(e,t).pipe(Aw((({tx:e,block:t})=>Ok(n,r,e,t.hash,!0)))),signAndSubmit:(e,t)=>mw(d(e,t)).then((({tx:e,block:t})=>Rk(n,r,e,t.hash)))}}),{getCompatibilityLevel:i,isCompatible:o}),zk=(e,t,n)=>{const r={},o=e=>new Proxy(r,{get:(t,n)=>e(n)}),i=e=>{const t={};return o((n=>(t[n]||(t[n]={}),o((r=>(t[n][r]||(t[n][r]=e(n,r)),t[n][r]))))))},s=(e,t)=>e.lookup.metadata.pallets.find((e=>e.name===t)),a=i(((n,r)=>sk(n,r,t,Jx(e,(e=>e.getPalletEntryPoint(Wx.Storage,n,r)),(e=>function(e){if("plain"===e.type.tag)return{args:hy,values:fy(e.type.value)};const{key:t,value:n}=e.type.value;return{args:fy(t),values:fy(n)}}(s(e,n).storage.items.find((e=>e.name===r)))))))),l=(e,t,n,r)=>{const o=e.lookup(n);if("enum"!==o.type)throw new Error("Expected enum");const i=function(e){return"lookupEntry"===e.type?fy(e.value.id):py(Jg(e))}(o.value[r]);return{args:"args"===t?i:hy,values:"args"===t?hy:i}},c=i(((r,o)=>Ik(r,o,t,n,Jx(e,(e=>e.getPalletEntryPoint(Wx.Tx,r,o)),(e=>l(e,"args",s(e,r).calls,o))),!0))),u=i(((n,r)=>nk(n,r,t,Jx(e,(e=>e.getPalletEntryPoint(Wx.Event,n,r)),(e=>l(e,"values",s(e,n).events,r)))))),d=i(((t,n)=>ek(t,n,Jx(e,(e=>e.getPalletEntryPoint(Wx.Const,t,n)),(e=>{return r=s(e,t).constants.find((e=>e.name===n)).type,{args:hy,values:fy(r)};var r}))))),f=i(((n,r)=>((e,t,n,{isCompatible:r,getCompatibilityLevel:o,compatibleRuntime$:i,argsAreCompatible:s,valuesAreCompatible:a})=>{const l=`${e}_${t}`,c=()=>new Error(`Incompatible runtime entry RuntimeCall(${l})`);return Object.assign(((...r)=>{const o=r[r.length-1],u=ok(o),{signal:d,at:f}=u?o:{},p=f??null;return rk(i(n,p).pipe(Aw((([o,i])=>{let u;try{u=i.dynamicBuilder.buildRuntimeCall(e,t)}catch{throw new Error(`Runtime entry RuntimeCall(${l}) not found`)}if(!s(o,i,r))throw c();return n.call$(p,l,dv(u.args.enc(r))).pipe(gw(u.value.dec),gw((e=>{if(!a(o,i,e))throw c();return e})))}))),d)}),{getCompatibilityLevel:o,isCompatible:r})})(n,r,t,Jx(e,(e=>e.getApiEntryPoint(n,r)),(e=>{return t=e.lookup.metadata.apis.find((e=>e.name===n)).methods.find((e=>e.name===r)),{args:py({type:"tuple",value:t.inputs.map((e=>e.type))}),values:fy(t.output)};var t}))))),p=(r,o)=>{const{lookup:i,dynamicBuilder:a}=Vx(o).runtime();try{const o=a.buildDefinition(i.call).dec(r.asBytes()),c=o.type,u=o.value.type,d=o.value.value;return Ik(c,u,t,n,Jx(e,(e=>e.getPalletEntryPoint(Wx.Tx,c,u)),(e=>l(e,"args",s(e,c).calls,u))),!1)(d)}catch{throw new Error("createTx: invalid call data")}};return{query:a,txFromCallData:(t,n)=>n?p(t,n):e.then((e=>p(t,e))),tx:c,event:u,apis:f,constants:d}};function Dk(e){const t=(e=>{const t=Vy.get(e);if(t)return t.refCount++,t.client;const{request:n,disconnect:r}=Fy(e),o={chainHead:Iy(n),transaction:xy(n),getChainSpecData:Hy(n),destroy:()=>{const t=Vy.get(e);!t||t.refCount<=1?(Vy.delete(e),r()):t.refCount--},request:Ny(((e,t,r,o)=>n(r,o,{onSuccess:e,onError:t}))),_request:n};return Vy.set(e,{client:o,refCount:1}),o})(e),n=(e=>{const t=Dx.get(e);if(t)return t.refCount++,t.client;let n=null,r=0,o=null;const i={chainHead$:t=>{r++,o||(o=t||1),n||(n=zx(e.chainHead));const[i,s]=n;if(o===r){const e=r;r=0,o=null,n=null,s(e)}return i},broadcastTx$:(s=e.transaction,e=>new Nb((t=>s(e,(e=>{t.error(e)}))))),destroy:()=>{const t=Dx.get(e);!t||t.refCount<=1?(Dx.delete(e),e.destroy()):t.refCount--}};var s;return Dx.set(e,{client:i,refCount:1}),i})(t),r=n.chainHead$(),{getChainSpecData:o}=t,i=t.request;let s;const a=new WeakMap,l=e=>{const t=a.get(e)||((e,t)=>{const n=new Promise((async e=>{const n=t.runtime$.pipe(Mw((e=>null!=e)));let r=await mw(n);n.subscribe((e=>r=e)),e((()=>r))}));return Promise.all([e.metadataTypes.then(Yx.dec),e.descriptors,n]).then((([[e,t],n,r])=>{const o=new Ux;return Fx.set(o,{runtime:r,getPalletEntryPoint:(t,r,o)=>e[n[t][r][o]],getApiEntryPoint:(t,r)=>e[n.apis[t][r]],typedefNodes:t}),o}))})(e,r);return a.set(e,t),t},c=()=>s??(s=(e=>new Promise((async t=>{const n=e.runtime$.pipe(Mw((e=>null!=e)));let r=await mw(n);n.subscribe((e=>r=e)),t((()=>r))})).then((e=>{const t=new Bx;return Hx.set(t,{runtime:e}),t})))(r)),{broadcastTx$:u}=n;return{getChainSpecData:o,finalizedBlock$:r.finalized$,getFinalizedBlock:()=>mw(r.finalized$),bestBlocks$:r.bestBlocks$,getBestBlocks:()=>mw(r.bestBlocks$),watchBlockBody:r.body$,getBlockBody:e=>mw(r.body$(e)),getBlockHeader:e=>mw(r.header$(e??null)),submit:(...e)=>Rk(r,u,...e),submitAndWatch:(...e)=>Ok(r,u,...e),getTypedApi:e=>{const t=l(e);return Object.assign(zk(t,r,u),{compatibilityToken:t})},getUnsafeApi:()=>{const e=c();return Object.assign(zk(e,r,u),{runtimeToken:e})},destroy:()=>{r.unfollow(),n.destroy()},_request:i}}const Bk={body:"",call:"",continue:"",follow:"",header:"",stopOperation:"",storage:"",unfollow:"",unpin:""},Uk={broadcast:"",stop:""},Fk={chainName:"",genesisHash:"",properties:""};Object.entries({chainHead:Bk,chainSpec:Fk,transaction:Uk}).forEach((([e,t])=>{Object.keys(t).forEach((n=>{t[n]=`${e}_v1_${n}`}))}));const Hk=e=>({jsonrpc:"2.0",...e}),Vk=(e,t,n,r={})=>Hk({method:"chainHead_v1_followEvent",params:{subscription:e,result:{event:t,operationId:n,...r}}}),Wk=e=>{let t=0;const n=new Map;let r=()=>{};return[t=>{const{send:o,disconnect:i}=e((e=>{(({id:e,error:t,result:r})=>{const o=n.get(e);return o&&(n.delete(e),t?o(!1,t):o(!0,r)),!o})(e)&&t(e)}));return r=o,{send:r,disconnect:()=>{n.clear(),i()}}},(e,o,i,s)=>{const a="__INNER_RQ_DesV"+t++;n.set(a,((e,t)=>{(e?i:s)(t)})),r(Hk({id:a,method:e,params:o}))}]};let qk=0;const Kk=e=>(t,n,r,o,i)=>{let s=!0,a=!1,l=0;const c=e=>{s&&(s=!1,o(e))},u=o=>{e("state_getKeysPaged",[t,1e3,o||void 0,n],(t=>{s&&(t.length>0&&(l++,e("state_queryStorageAt",[t,n],(([{changes:e}])=>{s&&(l--,r(e),a&&!l&&i())}),c)),t.length<1e3?(a=!0,l||i()):u(t.at(-1)))}),c)};return u(),()=>{s=!1}},Yk=new Set(["BodyDone","CallDone","StorageDone","Inaccessible","Error"].map((e=>"operation"+e))),Qk=e=>{var t,n;return Yk.has(null==(n=null==(t=e.params)?void 0:t.result)?void 0:n.event)},Gk=e=>({jsonrpc:"2.0",...e}),[Jk]=Uk.stop.split("_"),Xk="unstable",Zk="rpc_methods",eE="__INTERNAL_ID",tE=((...e)=>t=>(e=>{let t=null;const{send:n,disconnect:r}=e((e=>{null==t||t(JSON.stringify(e))}));return e=>(t=e,{send(e){n(JSON.parse(e))},disconnect(){t=null,r()}})})(e.reduce(((e,t)=>t(e)),(e=>{let t=null;const{send:n,disconnect:r}=e((e=>{null==t||t(JSON.parse(e))}));return e=>(t=e,{send(e){n(JSON.stringify(e))},disconnect(){t=null,r()}})})(t))))((e=>t=>{let n=0;const r=new Map,{send:o,disconnect:i}=e((e=>{r.has(e.id)&&(e.id=r.get(e.id)),t(e)}));return{send:e=>{if("id"in e){const t=n++;r.set(t,e.id),e.id=t}o(e)},disconnect:i}}),(e=>t=>{let n=!0,r=[],o=e=>{r.push(e)},i=({id:e,result:a,error:u})=>{if(e!==eE||!n)return;if(!a){if(console.error(u),l<4)return void setTimeout(c,200);a={methods:[]}}const d=new Set(a.methods),f={};[Bk,Fk,Uk].forEach((e=>{Object.values(e).forEach((e=>{if(d.has(e))f[e]=e;else{const[t,,n]=e.split("_"),r=`${t}_${Xk}_${n}`;if(d.has(r))f[e]=r,d.delete(r),d.add(e);else if(f[e]=null,t===Jk){let t;const n="stop"===e?"unwatch":"submitAndWatch";[Jk+"Watch",Jk].find((e=>["v1",Xk].find((r=>d.has(t=`${e}_${r}_${n}`)))))&&(f[e]=t,d.add(e))}}}))})),i=t;const p=({method:e,...n})=>{if(e===Zk)return void Promise.resolve().then((()=>{t(Gk({id:n.id,result:{methods:[...d]}}))}));const r=f[e];null===r?Promise.resolve().then((()=>{t({error:{code:-32603,message:`Method not found: ${e}`},id:n.id})})):s({method:r||e,...n})};for(let t=0;n&&t<r.length;t++)p(r[t]);r=[],n&&(o=p)};const{send:s,disconnect:a}=e((e=>{i(e)}));let l=0;const c=()=>{l++,s(Gk({id:eE,method:Zk,params:[]}))};return c(),{send:e=>{o(e)},disconnect(){n=!1,o=i=()=>{},r=[],a()}}}),(e=>t=>{const n=new Set,r=new Map,o=new Map,i=new Map,{send:s,disconnect:a}=e((e=>{var s,a;if("id"in e){t(e);const{id:l,result:c}=e;if(n.has(l))return n.delete(l),o.set(c,new Set),void i.set(c,new Map);const u=r.get(l);if(void 0!==u){r.delete(l);const n=null==(s=e.result)?void 0:s.operationId;if(void 0!==n&&o.has(u)){const e=o.get(u);e.add(n);const r=null==(a=i.get(u))?void 0:a.get(n);r&&(r.forEach(t),i.get(u).delete(n),Qk(r.at(-1))&&e.delete(n))}}}else{const{subscription:n,result:r}=e.params,s=o.get(n);if(s){const{operationId:t}=e.params.result;if(void 0!==t){if(!s.has(t)){const r=i.get(n),o=r.get(t)??[];return o.push(e),void r.set(t,o)}Qk(e)&&s.delete(t)}else"stop"===(null==r?void 0:r.event)&&(o.delete(n),i.delete(n))}t(e)}}));return{send:e=>{var t;const a=e.params[0];switch(e.method){case Bk.follow:n.add(e.id);break;case Bk.body:case Bk.call:case Bk.storage:r.set(e.id,a);break;case Bk.unfollow:o.delete(a),i.delete(a);break;case Bk.stopOperation:null==(t=o.get(a))||t.delete(e.params[1])}s(e)},disconnect:a}}),(e=>t=>{const{send:n,disconnect:r}=e(t);return{send:e=>{const{method:t,params:r,id:o,...i}=e;t==Bk.unpin&&r&&Array.isArray(r[1])?r[1].forEach(((e,s)=>{n({...i,id:0===s?o:`${o}-patched-${s}`,method:t,params:[r[0],e]})})):n(e)},disconnect:r}}),(e=>t=>e((e=>{var n;const r=null==(n=e.params)?void 0:n.result;if(!("id"in e)&&r){const{prunedBlockHashes:e,finalizedBlockHash:t,event:n}=r;"finalized"===n&&Array.isArray(e)?r.prunedBlockHashes=[...new Set(r.prunedBlockHashes)]:"initialized"===n&&t&&(r.finalizedBlockHashes=[r.finalizedBlockHash],delete r.finalizedBlockHash)}t(e)}))),(e=>t=>{const n=new Set,r=new Map,o=new Map,{send:i,disconnect:s}=e((e=>{if("id"in e){t(e);const{id:i,result:s}=e;if(n.has(i))return n.delete(i),r.set(s,new Set),void o.set(s,new Map)}else{const{subscription:n}=e.params,i=r.get(n),s=o.get(n);if(i){const r=e.params.result,{event:a}=r;if("initialized"===a&&r.finalizedBlockHashes.forEach((e=>{i.add(e)})),"newBlock"===a){const{parentBlockHash:n}=r;if(!i.has(n)){const t=s.get(n)??[];return t.push(e),void s.set(n,t)}const o=r.blockHash;i.add(r.blockHash),t(e);const a=s.get(o);return void(a&&(s.delete(o),a.forEach((e=>{i.add(e.params.result.blockHash),t(e)}))))}"stop"===a&&(i.delete(n),o.delete(n))}t(e)}}));return{send:e=>{const t=e.params[0];switch(e.method){case Bk.follow:n.add(e.id);break;case Bk.unpin:const[i,s]=e.params;s.forEach((e=>{var t,n;null==(t=r.get(i))||t.delete(e),null==(n=o.get(i))||n.delete(e)}));break;case Bk.unfollow:r.delete(t),o.delete(t)}i(e)},disconnect:s}}),(e=>t=>{const n=new Set,r=new Map,o=new Map,{send:i,disconnect:s}=e((e=>{if("id"in e){t(e);const{id:i,result:s}=e;if(n.has(i))return n.delete(i),r.set(s,new Set),void o.set(s,new Map)}else{const{subscription:n}=e.params,i=r.get(n),s=o.get(n);if(i){const r=e.params.result,{event:a}=r;if("initialized"===a&&r.finalizedBlockHashes.forEach((e=>{i.add(e)})),"finalized"===a&&(r.prunedBlockHashes=r.prunedBlockHashes.filter((e=>{i.has(e)}))),"newBlock"===a){i.add(r.blockHash);const n=r.blockHash,o=s.get(n);if(o)return s.delete(n),t(e),void Promise.resolve().then((()=>{t(o)}))}if("bestBlockChanged"===a){const t=r.bestBlockHash;if(!i.has(t))return void o.get(n).set(t,e)}"stop"===a&&(i.delete(n),o.delete(n))}t(e)}}));return{send:e=>{const t=e.params[0];switch(e.method){case Bk.follow:n.add(e.id);break;case Bk.unpin:const[i,s]=e.params;s.forEach((e=>{var t,n;null==(t=r.get(i))||t.delete(e),null==(n=o.get(i))||n.delete(e)}));break;case Bk.unfollow:r.delete(t),o.delete(t)}i(e)},disconnect:s}}),(e=>t=>{const{send:n,disconnect:r}=e(t);return{send:e=>{switch(e.method){case Fk.chainName:return n({...e,method:"system_chain"});case Fk.genesisHash:return n({...e,method:"chain_getBlockHash",params:[0]});case Fk.properties:return n({...e,method:"system_properties"})}n(e)},disconnect:r}}),(e=>t=>{const[n,r]=Wk(e),o=Kk(r),i=new Map,s=new Map,{send:a,disconnect:l}=n((e=>{if("id"in e){const t=i.get(e.id);t&&(i.delete(e.id),"started"===e.result.result&&t(e.result.operationId))}else if(e.params){const{subscription:t,result:n}=e.params,{operationId:r}=n||{},o=s.get(t);o&&"stop"===n.event&&(o.forEach((e=>{e.cancel()})),s.delete(t));const i=null==o?void 0:o.get(r);if(i)switch(n.event){case"operationInaccessible":case"operationError":i.cancel();break;case"operationStorageDone":if(!i.isInnerDone)return void(i.isOutterDone=!0);o.delete(r)}}t(e)}));return{send:e=>{var n,r;switch(e.method){case Bk.storage:{const[n,r,l]=e.params,c=[],u=l.filter((e=>{const t="descendantsValues"===e.type;return t&&c.push(e.key),!t})),d=((e,n,r)=>i=>{let l=()=>{};s.has(e)||s.set(e,new Map);const c=s.get(e),u={isOutterDone:!1,isInnerDone:!1,cancel:()=>{l()}};c.set(i,u);let d=0;const f=r.map((s=>o(s,n,(n=>{t(Vk(e,"operationStorageItems",i,{items:n.map((([e,t])=>({key:e,value:t})))}))}),(n=>{l(),u.isOutterDone||a(Hk({method:"chainHead_v1_stopOperation",params:[i]})),t(Vk(e,"operationError",i,{error:"string"==typeof n?n:JSON.stringify(n)}))}),(()=>{++d===r.length&&(u.isOutterDone?(l(),t(Vk(e,"operationStorageDone",i))):u.isInnerDone=!0)}))));l=()=>{c.delete(i),f.forEach((e=>e()))}})(n,r,c);if(!u.length){const r="__INNER_OP_DesV"+qk++;return t(Hk({id:e.id,result:{result:"started",operationId:r}})),d(r),void(s.get(n).get(r).isOutterDone=!0)}c.length&&i.set(e.id,d),e.params[2]=u;break}case Bk.stopOperation:{const[t,r]=e.params,o=null==(n=s.get(t))?void 0:n.get(r);if(o&&(o.cancel(),o.isOutterDone))return;break}case Bk.unfollow:{const[t]=e.params;null==(r=s.get(t))||r.forEach((e=>e.cancel())),s.delete(t);break}}a(e)},disconnect:l}})),nE=e=>JSON.stringify({jsonrpc:"2.0",...e}),rE=new Set(["v1","unstable"].map((e=>`chainHead_${e}_unfollow`))),oE=e=>t=>{let n=(e=>{let t={type:1,pending:[]};const n=n=>{var r;if(0===t.type){const e=JSON.parse(n);if("id"in e)0===(null==(r=t.onGoingRequests.get(e.id))?void 0:r.type)&&t.activeChainHeads.add(e.result),t.onGoingRequests.delete(e.id);else{const{subscription:n,result:r}=e.params;"stop"===(null==r?void 0:r.event)&&t.activeChainHeads.delete(n)}}2!==t.type&&e(n)},r=e=>{if(2===t.type)return;if(1===t.type)return void t.pending.push(e);const n=JSON.parse(e);if(rE.has(n.method)&&t.activeChainHeads.delete(n.params[0]),"id"in n){const{method:r,id:o}=n,i=r.startsWith("chainHead")?r.endsWith("follow")?{type:0,msg:e}:{type:1,id:o}:{type:2,msg:e};t.onGoingRequests.set(o,i)}t.connection.send(e)};return{send:r,disconnect:()=>{2!==t.type&&(0===t.type&&t.connection.disconnect(),t={type:2})},connect:e=>{if(1!==t.type)throw new Error("Nonesense");const{pending:o}=t,i=new Map,s=new Set;t={type:0,connection:e(n,(()=>{t={type:1,pending:[]},s.forEach((e=>{n(nE({params:{subscription:e,result:{event:"stop",internal:!0}}}))})),s.clear();for(const e of i.values())1===e.type?n(nE({id:e.id,error:{code:-32603,message:"Internal error"},internal:!0})):r(e.msg);i.clear()})),onGoingRequests:i,activeChainHeads:s},o.forEach(r)}}})(t);const r=()=>{e().then((e=>{if(n)n.connect(((t,n)=>e(t,(()=>{n(),r()}))));else try{e((()=>{}),(()=>{})).disconnect()}catch(t){}}),(()=>{n&&setTimeout(r,0)}))};return r(),{send:e=>{null==n||n.send(e)},disconnect:()=>{null==n||n.disconnect(),n=null}}};var iE=(e=>(e[e.CONNECTING=0]="CONNECTING",e[e.CONNECTED=1]="CONNECTED",e[e.ERROR=2]="ERROR",e[e.CLOSE=3]="CLOSE",e))(iE||{});const sE={type:iE.ERROR,event:{type:"timeout"}},aE=()=>{},lE=e=>e.map((e=>"string"==typeof e?[e]:[e.uri,e.protocol])),cE=(uE=WebSocket,(...e)=>{let t=[],n=aE,r=3500;const[o]=e;1!==e.length||"object"!=typeof o||Array.isArray(o)?("function"==typeof e[1]&&(n=e[1]),Array.isArray(o)?t=lE(o):(t=[[o]],e[1]&&e[1]!==n&&(t[0][1]=e[1]),e[2]&&(n=e[2]))):(t=lE(o.endpoints),n=o.onStatusChanged??aE,r=o.timeout??r);let i,s=0,a=null,l=aE;const c=oE((async()=>{const[e,o]=a||t[s++%t.length];a=null;const c=new uE(e,o),u=()=>{try{c.addEventListener("error",aE,{once:!0}),c.close()}catch{}};return n(i={type:iE.CONNECTING,uri:e,protocols:o}),await new Promise(((t,s)=>{const a=()=>{p(),t()},d=t=>{p(),null==t&&u(),console.error(`Unable to connect to ${e}${o?", protocols: "+o:""}`),n(i={type:t?iE.ERROR:iE.CLOSE,event:t}),setTimeout(s,t?300:0,t)},f=r!==1/0?setTimeout((()=>{p(),u(),n(i=sE),s(sE.event)}),r):void 0,p=()=>{clearTimeout(f),c.removeEventListener("error",d),c.removeEventListener("open",a)};c.addEventListener("open",a),c.addEventListener("error",d),l=()=>{d(null)}})),n(i={type:iE.CONNECTED,uri:e,protocols:o}),(e,t)=>{const r=t=>{"string"==typeof t.data&&e(t.data)},o=e=>r=>{console.warn(`WS halt (${e})`),n(i={type:e,event:r}),t()},s=o(iE.ERROR),a=o(iE.CLOSE);return c.addEventListener("message",r),c.addEventListener("error",s),c.addEventListener("close",a),l=e=>{l=aE,c.removeEventListener("message",r),c.removeEventListener("error",s),c.removeEventListener("close",a),u(),e&&a({})},{send:e=>{c.send(e)},disconnect:l}}}));return c.getStatus=()=>i,c.switch=(...e)=>{i.type!==iE.CLOSE&&(e.length&&(a=e),i.type!==iE.ERROR&&l(!0))},c});var uE;const dE={BASE_URL:"./",DEV:!1,MODE:"production",PROD:!0,SSR:!1};let fE=0;function pE(e,t){const n="atom"+ ++fE,r={toString(){return"production"!==(dE?"production":void 0)&&this.debugLabel?n+":"+this.debugLabel:n}};return"function"==typeof e?r.read=e:(r.init=e,r.read=hE,r.write=vE),t&&(r.write=t),r}function hE(e){return e(this)}function vE(e,t,n){return t(this,"function"==typeof n?n(e(this)):n)}const mE=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,gE=e=>"init"in e,yE=e=>!!e.write,bE=new WeakMap,wE=e=>{var t;return xE(e)&&!(null==(t=bE.get(e))?void 0:t[1])},xE=e=>"function"==typeof(null==e?void 0:e.then),kE=e=>"v"in e||"e"in e,EE=e=>{if("e"in e)throw e.e;if("production"!==(dE?"production":void 0)&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v},SE=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then((()=>{n.p.delete(e)}),(()=>{n.p.delete(e)})))},CE=(e,t,n,r,o)=>{var i;if("production"!==(dE?"production":void 0)&&r===t)throw new Error("[Bug] atom cannot depend on itself");n.d.set(r,o.n),wE(n.v)&&SE(t,n.v,o),null==(i=o.m)||i.t.add(t),e&&NE(e,r,t)},_E=()=>[new Map,new Map,new Set],AE=(e,t,n)=>{e[0].has(t)||e[0].set(t,new Set),e[1].set(t,n)},NE=(e,t,n)=>{const r=e[0].get(t);r&&r.add(n)},PE=(e,t)=>{e[2].add(t)},jE=e=>{let t,n=!1;const r=e=>{try{e()}catch(r){n||(t=r,n=!0)}};for(;e[1].size||e[2].size;){e[0].clear();const t=new Set(e[1].values());e[1].clear();const n=new Set(e[2]);e[2].clear(),t.forEach((e=>{var t;return null==(t=e.m)?void 0:t.l.forEach(r)})),n.forEach(r)}if(n)throw t},$E=(...[e,t,n,r])=>{let o;"production"!==(dE?"production":void 0)&&(o=new Set);const i=(t,n,r)=>{const o="v"in n,i=n.v,s=wE(n.v)?n.v:null;if(xE(r)){(e=>{if(bE.has(e))return;const t=[new Set,!1];bE.set(e,t);const n=()=>{t[1]=!0};e.then(n,n),e.onCancel=e=>{t[0].add(e)}})(r);for(const o of n.d.keys())SE(t,r,e(o));n.v=r,delete n.e}else n.v=r,delete n.e;o&&Object.is(i,n.v)||(++n.n,s&&((e,t)=>{const n=bE.get(e);if(n)n[1]=!0,n[0].forEach((e=>e(t)));else if("production"!==(dE?"production":void 0))throw new Error("[Bug] cancelable promise not found")})(s,r))},s=(n,r,o)=>{var a;const l=e(r);if(kE(l)){if(l.m&&!(null==o?void 0:o.has(r)))return l;if(Array.from(l.d).every((([e,t])=>s(n,e,o).n===t)))return l}l.d.clear();let c=!0;const f=t=>{if(mE(r,t)){const n=e(t);if(!kE(n)){if(!gE(t))throw new Error("no atom init");i(t,n,t.init)}return EE(n)}const a=s(n,t,o);try{return EE(a)}finally{if(c)CE(n,r,l,t,a);else{const e=_E();CE(e,r,l,t,a),d(e,r,l),jE(e)}}};let p,h;const v={get signal(){return p||(p=new AbortController),p.signal},get setSelf(){return"production"===(dE?"production":void 0)||yE(r)||console.warn("setSelf function cannot be used with read-only atom"),!h&&yE(r)&&(h=(...e)=>{if("production"!==(dE?"production":void 0)&&c&&console.warn("setSelf function cannot be called in sync"),!c)return u(r,...e)}),h}};try{const e=t(r,f,v);if(i(r,l,e),xE(e)){null==(a=e.onCancel)||a.call(e,(()=>null==p?void 0:p.abort()));const t=()=>{if(l.m){const e=_E();d(e,r,l),jE(e)}};e.then(t,t)}return l}catch(m){return delete l.v,l.e=m,++l.n,l}finally{c=!1}},a=(t,n,r)=>{var o,i;const s=new Map;for(const a of(null==(o=r.m)?void 0:o.t)||[]){const t=e(a);t.m&&s.set(a,t)}for(const a of r.p)s.set(a,e(a));return null==(i=((e,t)=>e[0].get(t))(t,n))||i.forEach((t=>{s.set(t,e(t))})),s};const l=(e,t,n)=>{const[r,o]=function(e,t,n){const r=[],o=new Set,i=new Set,s=[[t,n]];for(;s.length>0;){const[t,n]=s[s.length-1];if(i.has(t))s.pop();else if(o.has(t))r.push([t,n,n.n]),i.add(t),s.pop();else{o.add(t);for(const[r,i]of a(e,t,n))t===r||o.has(r)||s.push([r,i])}}return[r,i]}(e,t,n),i=new Set([t]);for(let a=r.length-1;a>=0;--a){const[t,n,l]=r[a];let c=!1;for(const e of n.d.keys())if(e!==t&&i.has(e)){c=!0;break}c&&(s(e,t,o),d(e,t,n),l!==n.n&&(AE(e,t,n),i.add(t))),o.delete(t)}},c=(t,r,...o)=>{let a=!0;const u=e=>EE(s(t,e)),f=(n,...o)=>{const s=e(n);try{if(mE(r,n)){if(!gE(n))throw new Error("atom not writable");const e=s.n,r=o[0];return i(n,s,r),d(t,n,s),void(e!==s.n&&(AE(t,n,s),l(t,n,s)))}return c(t,n,...o)}finally{a||jE(t)}};try{return n(r,u,f,...o)}finally{a=!1}},u=(e,...t)=>{const n=_E();try{return c(n,e,...t)}finally{jE(n)}},d=(t,n,r)=>{if(r.m&&!wE(r.v)){for(const o of r.d.keys())if(!r.m.d.has(o)){f(t,o,e(o)).t.add(n),r.m.d.add(o)}for(const o of r.m.d||[])if(!r.d.has(o)){r.m.d.delete(o);const i=p(t,o,e(o));null==i||i.t.delete(n)}}},f=(t,n,i)=>{if(!i.m){s(t,n);for(const r of i.d.keys()){f(t,r,e(r)).t.add(n)}if(i.m={l:new Set,d:new Set(i.d.keys()),t:new Set},"production"!==(dE?"production":void 0)&&o.add(n),yE(n)){const e=i.m;let o;const s=(e,t)=>{let r=!0;o=(...t)=>{try{return c(e,n,...t)}finally{r||jE(e)}};try{return t()}finally{r=!1}};PE(t,(()=>{const i=s(t,(()=>r(n,((...e)=>o(...e)))));i&&(e.u=e=>s(e,i))}))}}return i.m},p=(t,n,r)=>{if(!r.m||r.m.l.size||Array.from(r.m.t).some((t=>{var r;return null==(r=e(t).m)?void 0:r.d.has(n)})))return r.m;{const i=r.m.u;i&&PE(t,(()=>i(t))),delete r.m,"production"!==(dE?"production":void 0)&&o.delete(n);for(const o of r.d.keys()){const r=p(t,o,e(o));null==r||r.t.delete(n)}}},h={get:e=>EE(s(void 0,e)),set:u,sub:(t,n)=>{const r=_E(),o=e(t),i=f(r,t,o).l;return i.add(n),jE(r),()=>{i.delete(n);const e=_E();p(e,t,o),jE(e)}},unstable_derive:o=>$E(...o(e,t,n,r))};if("production"!==(dE?"production":void 0)){const t={dev4_get_internal_weak_map:()=>({get:t=>{const n=e(t);if(0!==n.n)return n}}),dev4_get_mounted_atoms:()=>o,dev4_restore_atoms:t=>{const n=_E();for(const[r,o]of t)if(gE(r)){const t=e(r),s=t.n;i(r,t,o),d(n,r,t),s!==t.n&&(AE(n,r,t),l(n,r,t))}jE(n)}};Object.assign(h,t)}return h};let OE;const RE=()=>(OE||(OE=(()=>{const e=new WeakMap;return $E((t=>{if("production"!==(dE?"production":void 0)&&!t)throw new Error("Atom is undefined or null");let n=e.get(t);return n||(n={d:new Map,p:new Set,n:0},e.set(t,n)),n}),((e,...t)=>e.read(...t)),((e,...t)=>e.write(...t)),((e,...t)=>{var n;return null==(n=e.onMount)?void 0:n.call(e,...t)}))})(),"production"!==(dE?"production":void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=OE),globalThis.__JOTAI_DEFAULT_STORE__!==OE&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),OE),ME={BASE_URL:"./",DEV:!1,MODE:"production",PROD:!0,SSR:!1},TE=qe.createContext(void 0),LE=e=>qe.useContext(TE)||RE(),IE=e=>"function"==typeof(null==e?void 0:e.then),zE=Ke.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:((e=>{e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t}))})(e),e)}),DE=new WeakMap;function BE(e,t){const n=LE(),[[r,o,i],s]=qe.useReducer((t=>{const r=n.get(e);return Object.is(t[0],r)&&t[1]===n&&t[2]===e?t:[r,n,e]}),void 0,(()=>[n.get(e),n,e]));let a=r;o===n&&i===e||(s(),a=n.get(e));if(qe.useEffect((()=>{const t=n.sub(e,(()=>{s()}));return s(),t}),[n,e,void 0]),qe.useDebugValue(a),IE(a)){const e=(e=>{let t=DE.get(e);return t||(t=new Promise(((n,r)=>{let o=e;const i=e=>t=>{o===e&&n(t)},s=e=>t=>{o===e&&r(t)},a=e=>{"onCancel"in e&&"function"==typeof e.onCancel&&e.onCancel((r=>{if("production"!==(ME?"production":void 0)&&r===e)throw new Error("[Bug] p is not updated even after cancelation");IE(r)?(DE.set(r,t),o=r,r.then(i(r),s(r)),a(r)):n(r)}))};e.then(i(e),s(e)),a(e)})),DE.set(e,t)),t})(a);return zE(e)}return a}const UE={BASE_URL:"./",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function FE(e,t){const n=e=>{if("e"in e)throw e.e;return e.d},r=pE((n=>{var r;let o=e(n);const i=null==(r=o[Symbol.observable])?void 0:r.call(o);let s;i&&(o=i);const a=()=>new Promise((e=>{s=e})),l=t&&"initialValue"in t?{d:"function"==typeof t.initialValue?t.initialValue():t.initialValue}:a();let c,u;const d=e=>{u=e,null==s||s(e),null==c||c(e)};let f,p;const h=()=>!c,v=()=>{f&&(clearTimeout(p),f.unsubscribe()),f=o.subscribe({next:e=>d({d:e}),error:e=>d({e:e}),complete:()=>{}}),h()&&(null==t?void 0:t.unstable_timeout)&&(p=setTimeout((()=>{f&&(f.unsubscribe(),f=void 0)}),t.unstable_timeout))};v();const m=pE(u||l);return"production"!==(UE?"production":void 0)&&(m.debugPrivate=!0),m.onMount=e=>(c=e,u&&e(u),f?clearTimeout(p):v(),()=>{c=void 0,f&&(f.unsubscribe(),f=void 0)}),[m,o,a,v,h]}));"production"!==(UE?"production":void 0)&&(r.debugPrivate=!0);return pE((e=>{const[t]=e(r),o=e(t);return o instanceof Promise?o.then(n):n(o)}),((e,t,n)=>{const[o,i,s,a,l]=e(r);if(!("next"in i))throw new Error("observable is not subject");l()&&(t(o,s()),a()),i.next(n)}))}function HE(e,t){const n=pE(0);return"production"!==(UE?"production":void 0)&&(n.debugPrivate=!0),pE(((t,r)=>(t(n),e(t,r))),((e,r,...o)=>{if(0===o.length)r(n,(e=>e+1));else if(t)return t(e,r,...o)}))}function VE(e,t){return function(e){const t=LE();return qe.useCallback(((...n)=>{if("production"!==(ME?"production":void 0)&&!("write"in e))throw new Error("not writable atom");return t.set(e,...n)}),[t,e])}(qe.useMemo((()=>pE(null,((t,n,...r)=>e(t,n,...r)))),[e]))}!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(UE?"production":void 0)&&"undefined"!=typeof window&&console.warn(e))}},t){var n;let r,o;const i={getItem:(n,i)=>{var s,a;const l=e=>{if(r!==(e=e||"")){try{o=JSON.parse(e,null==t?void 0:t.reviver)}catch(n){return i}r=e}return o},c=null!=(a=null==(s=e())?void 0:s.getItem(n))?a:null;return"function"==typeof(null==(u=c)?void 0:u.then)?c.then(l):l(c);var u},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(n=e())?void 0:n.subscribe}catch(l){}var a;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(i.subscribe=(a=s,(e,t,n)=>a(e,(e=>{let r;try{r=JSON.parse(e||"")}catch(l){r=n}t(r)}))))}();const WE=pE((()=>new Set));function qE(e,t){const n=function(e,t){let n=null;const r=new Map,o=new Set,i=o=>{let a;if(void 0===t)a=r.get(o);else for(const[e,n]of r)if(t(e,o)){a=n;break}if(void 0!==a){if(!(null==n?void 0:n(a[1],o)))return a[0];i.remove(o)}const l=e(o);return r.set(o,[l,Date.now()]),s("CREATE",o,l),l};function s(e,t,n){for(const r of o)r({type:e,param:t,atom:n})}return i.unstable_listen=e=>(o.add(e),()=>{o.delete(e)}),i.getParams=()=>r.keys(),i.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),s("REMOVE",e,t)}else for(const[n,[o]]of r)if(t(n,e)){r.delete(n),s("REMOVE",n,o);break}},i.setShouldRemove=e=>{if(n=e,n)for(const[t,[o,i]]of r)n(i,t)&&(r.delete(t),s("REMOVE",t,o))},i}((t=>e(t,(e=>(r,...o)=>e(((...e)=>{const o=r=>((0,e[0])(WE).add({atomFamily:n,param:t}),r);try{const t=r(...e);return t instanceof Promise?t.catch((e=>{throw o(e)})):t instanceof Nb?t.pipe(Tw((e=>{throw o(e)}))):t}catch(i){throw o(i)}}),...o)))),t);return n}const KE=qe.createContext(void 0);class YE{}e=new WeakMap,t=new WeakSet,n=function(e){return`${this.prefix}/${e}`};let QE=class r{constructor(n){te(this,t),X(this,"prefix"),te(this,e),this.prefix=n.prefix,ne(this,e,n.storage)}getItem(r){return ee(this,e).getItem(re(this,t,n).call(this,r))}removeItem(r){return ee(this,e).removeItem(re(this,t,n).call(this,r))}setItem(r,o){return ee(this,e).setItem(re(this,t,n).call(this,r),o)}join(t){return new r({prefix:`${this.prefix}/${t}`,storage:ee(this,e)})}};const GE=new QE({prefix:"@reactive-dot",storage:globalThis.localStorage});class JE{constructor(e){X(this,"options"),te(this,r),this.options=e,ne(this,r,((null==e?void 0:e.storage)??GE).join("wallet"))}get storage(){return ee(this,r).join(this.id)}getAccounts(){return mw(this.accounts$,{defaultValue:[]})}}r=new WeakMap;class XE extends JE{}class ZE extends Error{static from(e,t){return new this(t,{cause:e})}}class eS extends ZE{}const tS=(e,t)=>{let n=e.toString(16);n=(n.length%2?"0":"")+n;const r=Math.max(0,(t||0)-n.length/2);return"0x"+"00".repeat(r)+n},nS=yh({tip:Yp,asset:ch(rh(1/0))}).dec,rS=Object.freeze(Object.defineProperty({__proto__:null,ChargeAssetTxPayment:({value:e})=>{const{tip:t,asset:n}=nS(e);return{...n?{assetId:dv(n)}:{},tip:tS(t,16)}},ChargeTransactionPayment:({value:e})=>({tip:tS(Bv.dec(e),16)}),CheckGenesis:({additionalSigned:e})=>({genesisHash:dv(e)}),CheckMetadataHash:({value:e,additionalSigned:t})=>e.length&&e[0]?{mode:1,metadataHash:dv(t.length?t.slice(1):t)}:{},CheckMortality:({value:e,additionalSigned:t},n)=>({era:dv(e),blockHash:dv(t),blockNumber:tS(n,4)}),CheckNonce:({value:e})=>({nonce:tS(Yp.dec(e),4)}),CheckSpecVersion:({additionalSigned:e})=>({specVersion:tS(Pp.dec(e),4)}),CheckTxVersion:({additionalSigned:e})=>({transactionVersion:tS(Pp.dec(e),4)})},Symbol.toStringTag,{value:"Module"})),oS=cv().enc;function iS(e,t,n){const r=(e=>e.startsWith("0x")?pv(e):oS(e))(e);return{publicKey:r,signTx:async(n,o,i,s,a=lg)=>{let l;try{const e=sg(i);if("v14"!==e.metadata.tag&&"v15"!==e.metadata.tag)throw null;l=e.metadata.value}catch(h){throw new Error("Unsupported metadata version")}const c={signedExtensions:[]},{version:u}=l.extrinsic,d=[];l.extrinsic.signedExtensions.map((({identifier:e})=>{const t=o[e];if(!t)throw new Error(`Missing ${e} signed-extension`);if(d.push(t.value),c.signedExtensions.push(e),!rS[e]){if(0===t.value.length&&0===t.additionalSigned.length)return;throw new Error(`PJS does not support this signed-extension: ${e}`)}Object.assign(c,rS[e](t,s))})),c.address=e,c.method=dv(n),c.version=u,c.withSignedTransaction=!0;const f=await t(c),p=f.signedTransaction;return p?"string"==typeof p?pv(p):p:uk(l,r,pv(f.signature),d,n)},signBytes:t=>n({address:e,data:dv(t),type:"bytes"}).then((({signature:e})=>pv(e)))}}const sS=new Set(["ed25519","sr25519","ecdsa","ethereum"]);class aS extends JE{constructor(e,t){super(t),te(this,i),X(this,"name"),te(this,o,new Lb(void 0)),X(this,"connected$",ee(this,o).pipe(gw((e=>void 0!==e)))),X(this,"accounts$",ee(this,o).pipe(Vw((e=>new Nb((t=>{void 0===e?t.next([]):(t.next(re(this,i,s).call(this,e.getAccounts())),t.add(e.subscribe((e=>t.next(re(this,i,s).call(this,e))))))})))))),this.name=e}get id(){return`injected/${this.name}`}async initialize(){null!==this.storage.getItem("connected")&&await this.connect()}async connect(){var e;void 0===ee(this,o).getValue()&&(ee(this,o).next(await(async(e,t)=>{var n;let r=null==(n=window.injectedWeb3)?void 0:n[e];if(!r)throw new Error(`Unavailable extension: "${e}"`);const o=await r.enable(t),i=o.signer.signPayload.bind(o.signer),s=o.signer.signRaw.bind(o.signer),a=e=>e.filter((({type:e})=>sS.has(e))).map((e=>{const t=iS(e.address,i,s);return{...e,polkadotSigner:t}}));let l=a(await o.accounts.get());const c=new Set,u=o.accounts.subscribe((e=>{l=a(e),c.forEach((e=>{e(l)}))}));return{name:e,getAccounts:()=>l,subscribe:e=>(c.add(e),()=>{c.delete(e)}),disconnect:()=>{u()}}})(this.name,null==(e=this.options)?void 0:e.originName)),this.storage.setItem("connected",JSON.stringify(!0)))}disconnect(){var e;null==(e=ee(this,o).getValue())||e.disconnect(),ee(this,o).next(void 0),this.storage.removeItem("connected")}getAccounts(){const e=ee(this,o).getValue();if(void 0===e)throw new ZE("Extension is not connected");return re(this,i,s).call(this,e.getAccounts())}}o=new WeakMap,i=new WeakSet,s=function(e){return e.map(((e,t)=>({id:t.toString(),...e})))};const lS=new Promise((e=>setTimeout(e,500)));const cS=new WeakMap;function uS(e){return Promise.all(e.map((e=>e instanceof JE?[e]:cS.get(e)??cS.set(e,Promise.resolve(e.getWallets())).get(e)))).then((e=>e.flat()))}async function dS(e){const t=Array.isArray(e)?e:[e];await Promise.all(t.map((e=>e.disconnect())))}function fS(e){return(t=e)&&(t instanceof Nb||rb(t.lift)&&rb(t.subscribe))?e:e instanceof Promise?fw(e):pw(e);var t}function pS(e,t){return Cw([fS(e),fS(t)]).pipe(Vw((([e,t])=>{if(0===e.length)return pw([]);const n=null==t?void 0:t.properties.ss58Format,r=cv("number"==typeof n?n:void 0);return Cw(e.map((e=>e.accounts$.pipe(gw((n=>n.map((n=>{const o="function"!=typeof n.polkadotSigner?n.polkadotSigner:void 0!==t?n.polkadotSigner({tokenSymbol:t.properties.tokenSymbol,tokenDecimals:t.properties.tokenDecimals}):void 0;if(void 0!==o)return{...n,polkadotSigner:o,address:r.dec(o.publicKey),wallet:e}})).filter((e=>void 0!==e)))))))).pipe(gw((e=>e.flat())),gw(void 0===t?e=>e:e=>e.filter((e=>!e.genesisHash||t.genesisHash.includes(e.genesisHash)))))})))}function hS(e,t){return"best"===(null==t?void 0:t.tag)?e.bestBlocks$.pipe(gw((e=>e.at(0)))):e.finalizedBlock$}const vS=Symbol(),mS=new WeakSet;function gS(e){return mS.has(e)}async function yS(e){return Dk(await e[vS]())}function bS(e){return fS(e).pipe(Vw((e=>0===e.length?pw([]):Cw(e.map((e=>e.connected$.pipe(gw((t=>[e,t])))))))),gw((e=>e.filter((([e,t])=>t)).map((([e])=>e)))))}function wS(e,t,n){var r;switch(t.instruction){case"get-constant":return e.constants[t.pallet][t.constant]();case"call-api":return e.apis[t.pallet][t.api](...t.args,{signal:null==n?void 0:n.signal,at:t.at});case"read-storage":{const n=e.query[t.pallet][t.storage];return(null==(r=t.at)?void 0:r.startsWith("0x"))?n.getValue(...t.args,{at:t.at}):n.watchValue(...t.args,...[t.at].filter((e=>void 0!==e)))}case"read-storage-entries":return e.query[t.pallet][t.storage].getEntries(...t.args,{signal:null==n?void 0:n.signal,at:t.at})}}const xS=Symbol(),kS=Symbol();function ES(){const e=qe.useContext(KE);if(void 0===e)throw new ZE("No config provided");return e}const SS=qE(((e,t)=>t(pE)((()=>uS(e.wallets??[]))))),CS=qE(((e,t)=>t(FE)((t=>bS(t(SS(e)))))));function _S(){const e=BE(SS(ES())),[t,n]=qe.useState(xS),r=qe.useCallback((async()=>{n(kS),function(e){Promise.all(e.map((e=>e.initialize())))}(e)}),[e]);return[t,r]}const AS=qe.createContext(new Mb),NS=qe.createContext(void 0);function PS({config:e,children:t}){return nt.jsx(KE.Provider,{value:e,children:nt.jsxs(AS.Provider,{value:qe.useMemo((()=>new Mb),[]),children:[nt.jsx(qe.Suspense,{children:nt.jsx(jS,{})}),t]})})}function jS(){const[e,t]=_S();return qe.useEffect((()=>{t()}),[t]),null}function $S({optionalChainId:e=!1,...t}={}){const n=qe.useContext(NS),r=(null==t?void 0:t.chainId)??n;if(!e&&void 0===r)throw new ZE("No chain ID provided");return r}qe.createContext(void 0);const OS=qE(((e,t)=>t(pE)((async()=>{const t=e.config.chains[e.chainId];if(void 0===t)throw new ZE(`No config provided for ${e.chainId}`);return async function(e){const t=await e.provider;if(gS(t))return yS(t);const n=await(t.length>0?t:t());return gS(n)?yS(n):Dk(n)}(t)}))),((e,t)=>e.config===t.config&&e.chainId===t.chainId)),RS=qE(((e,t)=>t(pE)((async t=>(await t(OS(e))).getChainSpecData()))),((e,t)=>e.config===t.config&&e.chainId===t.chainId));const MS=qE(((e,t)=>t(FE)((t=>pS(t(CS(e.config)),void 0===e.chainId?void 0:t(RS(e)))))),((e,t)=>e.config===t.config&&e.chainId===t.chainId)),TS=qE(((e,t)=>t(pE)((async t=>{const n=e.config.chains[e.chainId];if(void 0===n)throw new ZE(`No config provided for chain ${e.chainId}`);return(await t(OS(e))).getTypedApi(n.descriptor)}))),((e,t)=>e.config===t.config&&e.chainId===t.chainId));function LS(e){return JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString():t instanceof Rv?t.asHex():function(e){if(!IS(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!IS(n)&&!!n.hasOwnProperty("isPrototypeOf")}(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function IS(e){return"[object Object]"===Object.prototype.toString.call(e)}const zS=qE(((e,t)=>{switch(function(e){var t;if("at"in e&&(null==(t=e.at)?void 0:t.startsWith("0x")))return"promise";switch(e.instruction){case"get-constant":case"call-api":case"read-storage-entries":return"promise";case"read-storage":return"observable"}}(e.instruction)){case"promise":return t(HE)((async(t,{signal:n})=>wS(await t(TS(e)),e.instruction,{signal:n})));case"observable":return t(FE)((t=>fw(t(TS(e))).pipe(Vw((t=>wS(t,e.instruction))))))}}),((e,t)=>e.config===t.config&&e.chainId===t.chainId&&LS(e.instruction)===LS(t.instruction)));function DS(e){const t=e,n=ES();return function(e){const[t,n]=qe.useState(xS);return[t,qe.useCallback(((...t)=>{const r=e=>n(e),o=e=>n(eS.from(e));try{n(kS);const i=e(...t);return i instanceof Promise?i.then(r).catch(o):i.subscribe({next:r,error:o})}catch(i){const e=eS.from(i);throw n(e),e}}),[e,n])]}(VE(qe.useCallback((async(e,r,o)=>{const i=o??t??await e(SS(n));return await dS(i),!0}),[n,t])))}qE(((e,t)=>t(pE)((t=>{const n=(r=e.config,o=e.chainId,e.query.instructions.map((e=>"multi"in e?e.args.map((t=>{const{multi:n,...i}=e;return zS({config:r,chainId:o,instruction:{...i,args:t}})})):zS({config:r,chainId:o,instruction:e}))));var r,o;return Promise.all(n.map((e=>Array.isArray(e)?Promise.all(e.map(t)):t(e))))}))),((e,t)=>e.config===t.config&&e.chainId===t.chainId&&LS(e.query.instructions)===LS(t.query.instructions))),qE(((e,t)=>t(FE)((t=>fw(t(OS(e))).pipe(Vw((e=>hS(e,{tag:"finalized"}))))))),((e,t)=>e.config===t.config&&e.chainId===t.chainId)),qE(((e,t)=>t(FE)((t=>fw(t(OS(e))).pipe(Vw((e=>hS(e,{tag:"best"}))))))),((e,t)=>e.config===t.config&&e.chainId===t.chainId));var BS="object"==typeof se&&se&&se.Object===Object&&se,US="object"==typeof self&&self&&self.Object===Object&&self;BS||US||Function("return this")();var FS="undefined"!=typeof window?qe.useLayoutEffect:qe.useEffect;function HS(e,t,n,r){const o=qe.useRef(t);FS((()=>{o.current=t}),[t]),qe.useEffect((()=>{const t=window;if(!t||!t.addEventListener)return;const n=e=>{o.current(e)};return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}),[e,n,r])}function VS(e){const t=qe.useRef((()=>{throw new Error("Cannot call an event handler while rendering.")}));return FS((()=>{t.current=e}),[e]),qe.useCallback(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[t])}var WS="undefined"==typeof window;const qS=qe.createContext(void 0),KS=({children:e})=>{const t=function(e){return BE(MS({config:ES(),chainId:$S({...e,optionalChainId:!0})}))}(),[n,r]=qe.useState(),[o,i,s]=function(e,t,n={}){const{initializeWithValue:r=!0}=n,o=qe.useCallback((e=>n.serializer?n.serializer(e):JSON.stringify(e)),[n]),i=qe.useCallback((e=>{if(n.deserializer)return n.deserializer(e);if("undefined"===e)return;const r=t instanceof Function?t():t;let o;try{o=JSON.parse(e)}catch(i){return console.error("Error parsing JSON:",i),r}return o}),[n,t]),s=qe.useCallback((()=>{const n=t instanceof Function?t():t;if(WS)return n;try{const t=window.localStorage.getItem(e);return t?i(t):n}catch(r){return console.warn(`Error reading localStorage key “${e}”:`,r),n}}),[t,e,i]),[a,l]=qe.useState((()=>r?s():t instanceof Function?t():t)),c=VS((t=>{WS&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const n=t instanceof Function?t(s()):t;window.localStorage.setItem(e,o(n)),l(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(n){console.warn(`Error setting localStorage key “${e}”:`,n)}})),u=VS((()=>{WS&&console.warn(`Tried removing localStorage key “${e}” even though environment is not a client`);const n=t instanceof Function?t():t;window.localStorage.removeItem(e),l(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}));qe.useEffect((()=>{l(s())}),[e]);const d=qe.useCallback((t=>{t.key&&t.key!==e||l(s())}),[e,s]);return HS("storage",d),HS("local-storage",d),[a,c,u]}("delegit.selectedAccount",""),a=qe.useCallback((e=>{e||s(),(null==e?void 0:e.address)&&i(e.address),r(e)}),[s,i]);return qe.useEffect((()=>{if(o){const e=t.find((({address:e})=>e===o));e&&a(e)}else a(t[0])}),[t,o,a]),nt.jsx(qS.Provider,{value:{accounts:t,selectedAccount:n,selectAccount:a},children:e})},YS=()=>{const e=qe.useContext(qS);if(void 0===e)throw new Error("useAccounts must be used within a AccountContextProvider");return e};function QS(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}var GS=qe.forwardRef(((e,t)=>{const{children:n,...r}=e,o=qe.Children.toArray(n),i=o.find(ZS);if(i){const e=i.props.children,n=o.map((t=>t===i?qe.Children.count(e)>1?qe.Children.only(null):qe.isValidElement(e)?e.props.children:null:t));return nt.jsx(JS,{...r,ref:t,children:qe.isValidElement(e)?qe.cloneElement(e,void 0,n):null})}return nt.jsx(JS,{...r,ref:t,children:n})}));GS.displayName="Slot";var JS=qe.forwardRef(((e,t)=>{const{children:n,...r}=e;if(qe.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n);return qe.cloneElement(n,{...eC(r,n.props),ref:t?QS(t,e):e})}return qe.Children.count(n)>1?qe.Children.only(null):null}));JS.displayName="SlotClone";var XS=({children:e})=>nt.jsx(nt.Fragment,{children:e});function ZS(e){return qe.isValidElement(e)&&e.type===XS}function eC(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function tC(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=tC(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}const nC=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,rC=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=tC(e))&&(r&&(r+=" "),r+=t);return r},oC=(iC="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",sC={variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}},e=>{var t;if(null==(null==sC?void 0:sC.variants))return rC(iC,null==e?void 0:e.class,null==e?void 0:e.className);const{variants:n,defaultVariants:r}=sC,o=Object.keys(n).map((t=>{const o=null==e?void 0:e[t],i=null==r?void 0:r[t];if(null===o)return null;const s=nC(o)||nC(i);return n[t][s]})),i=e&&Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),s=null==sC||null===(t=sC.compoundVariants)||void 0===t?void 0:t.reduce(((e,t)=>{let{class:n,className:o,...s}=t;return Object.entries(s).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...r,...i}[t]):{...r,...i}[t]===n}))?[...e,n,o]:e}),[]);return rC(iC,o,s,null==e?void 0:e.class,null==e?void 0:e.className)});var iC,sC;const aC=qe.forwardRef((({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?GS:"button";return nt.jsx(s,{className:ap(oC({variant:t,size:n,className:e})),ref:i,...o})}));aC.displayName="Button";const lC=({isOpen:e,title:t,message:n,onConfirm:r,onCancel:o,confirmText:i="Confirm",cancelText:s="Cancel",confirmClass:a="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",showCancelButton:l=!0})=>e?nt.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:o,children:nt.jsxs("div",{className:"bg-white rounded-lg shadow-lg w-96 p-6",onClick:e=>e.stopPropagation(),children:[nt.jsx("h2",{className:"text-lg font-medium text-center mb-4",children:t}),nt.jsx("p",{className:"text-sm text-gray-600 text-center mb-6",children:n}),nt.jsxs("div",{className:"flex justify-center gap-4",children:[l&&nt.jsx(aC,{onClick:o,className:"px-4 py-2 bg-violet-950 rounded hover:bg-violet-800",children:s}),nt.jsx(aC,{onClick:r,className:a,children:i})]})]})}):null,cC=({isOpen:e,className:t})=>nt.jsx("svg",{className:`w-4 h-4 transform transition-transform ${e?"rotate-180":""} ${t}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:nt.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),uC=({result:e,setSuccess:t,chainProperties:n})=>{var r,o,i;const s=e=>e.success;return Ke.useEffect((()=>{const n=s(e);t(n)}),[e,t]),nt.jsxs("div",{className:"mb-4",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Code Upload Result"}),s(e)?nt.jsxs("div",{children:[nt.jsx("div",{className:"text-sm bg-gray-200 p-2 pb-4 rounded",children:nt.jsxs("p",{children:["Code Hash: ",null==(r=e.value)?void 0:r.code_hash.asHex()]})}),nt.jsxs("div",{className:"mb-4",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Storage Deposit"}),nt.jsxs("div",{className:"bg-gray-200 p-2 rounded text-sm",children:[cp(null==(o=e.value)?void 0:o.deposit,n.tokenDecimals)," ",n.tokenSymbol]})]}),nt.jsx("div",{className:"text-green-600 font-bold flex items-center",children:"The call will be successful."})]}):nt.jsxs("div",{children:[nt.jsx("div",{className:"text-sm bg-gray-200 p-2 rounded",children:nt.jsxs("p",{children:["Result: ",null==(i=e.value)?void 0:i.value.value.type]})}),nt.jsx("div",{className:"text-red-600 font-bold flex items-center",children:"The call will not be successful."})]})]})},dC=({result:e,originalGas:t,useGasEstimates:n,setSuccess:r,chainProperties:o})=>{var i,s,a,l;const c=e=>{var r;return(null==(r=e.result)?void 0:r.success)&&(n||function(e,t){return(null==e?void 0:e.ref_time)>=t.ref_time&&(null==e?void 0:e.proof_size)>=t.proof_size}(t,e.gas_required))};return Ke.useEffect((()=>{const t=c(e);r(t)}),[e,n,t,r]),nt.jsxs("div",{children:[(e.gas_consumed||e.gas_required)&&nt.jsxs("div",{className:"flex space-x-4 mb-4",children:[e.gas_consumed&&nt.jsxs("div",{className:"flex-1",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Gas Consumed"}),nt.jsxs("div",{className:"flex space-x-4 text-sm",children:[nt.jsxs("div",{className:"bg-gray-200 p-2 rounded",children:[nt.jsx("p",{children:"Ref Time"}),nt.jsx("p",{children:mC(e.gas_consumed.ref_time)})]}),nt.jsxs("div",{className:"bg-gray-200 p-2 rounded",children:[nt.jsx("p",{children:"Proof Size"}),nt.jsxs("p",{children:[gC(e.gas_consumed.proof_size)," KB"]})]})]})]}),e.gas_required&&nt.jsxs("div",{className:"flex-1",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Gas Required"}),nt.jsxs("div",{className:"flex space-x-4 text-sm",children:[nt.jsxs("div",{className:"bg-gray-200 p-2 rounded",children:[nt.jsx("p",{children:"Ref Time"}),nt.jsx("p",{children:mC(e.gas_required.ref_time)})]}),nt.jsxs("div",{className:"bg-gray-200 p-2 rounded",children:[nt.jsx("p",{children:"Proof Size"}),nt.jsxs("p",{children:[gC(e.gas_required.proof_size)," KB"]})]})]})]})]}),e.storage_deposit&&nt.jsxs("div",{className:"mb-4",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Storage Deposit"}),nt.jsxs("div",{className:"bg-gray-200 p-2 rounded text-sm",children:[e.storage_deposit.type,": ",cp(e.storage_deposit.value,o.tokenDecimals)," ",o.tokenSymbol]})]}),e.result&&(null==(s=null==(i=e.result.value)?void 0:i.value)?void 0:s.type)&&nt.jsxs("div",{className:"mt-4",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Result Details"}),nt.jsxs("div",{className:"text-sm bg-gray-200 p-2 rounded",children:[nt.jsxs("p",{children:["Type: ",null==(a=e.result.value)?void 0:a.type]}),e.result.value.value&&nt.jsxs("p",{children:["Sub-Type: ",e.result.value.value.type]}),void 0!==e.result.value.value&&nt.jsxs("p",{children:["Value: ",JSON.stringify(e.result.value.value.value)]})]})]}),e.debug_message&&""!=e.debug_message.asText()&&nt.jsxs("div",{className:"mt-4",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Debug Message"}),nt.jsx("p",{className:"text-sm bg-gray-200 p-2 rounded",children:e.debug_message.asText()})]}),c(e)?nt.jsx("div",{className:"text-green-600 font-bold flex items-center",children:"The call will be successful."}):nt.jsxs("div",{className:"text-red-600 font-bold flex items-center",children:["The call will not be successful. ",(null==(l=e.result)?void 0:l.success)&&!n&&"Not enough gas provided (use estimates)"]})]})};function fC({dryRunResult:e,useGasEstimates:t,setUseGasEstimates:n,callType:r,originalGas:o,chainProperties:i}){const[s,a]=Ke.useState(!1),[l,c]=Ke.useState(!1);return nt.jsx("div",{className:"space-y-5 pb-6",children:nt.jsxs("div",{className:" bg-gray-100 border border-gray-200 rounded-lg p-4 dark:bg-neutral-800 dark:border-neutral-700",role:"alert",tabIndex:-1,"aria-labelledby":"hs-dry-run-success",children:[nt.jsxs("div",{className:"flex items-center justify-between",children:[nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("button",{type:"button",className:"w-6 h-6 flex justify-center items-center p-1 bg-gray-200 rounded-full dark:bg-gray-700",onClick:()=>c(!l),children:nt.jsx(cC,{isOpen:l,className:""})}),nt.jsx("h3",{id:"hs-dry-run-success",className:"cursor-pointer text-gray-800 font-semibold dark:text-white",onClick:()=>c(!l),children:"Dry-run Outcome"})]}),nt.jsx("div",{className:"flex items-center space-x-2",children:s?nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("span",{className:"text-green-600 dark:text-green-400 font-medium",children:"succeeds"}),nt.jsx(pC,{})]}):nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("span",{className:"text-red-600 dark:text-red-400 font-medium",children:"fails"}),nt.jsx(hC,{size:8})]})})]}),nt.jsx("div",{className:"\n          flex \n          overflow-hidden \n          transition-all \n          duration-300 \n          ease-in-out \n          "+(l?"max-h-screen opacity-100":"max-h-0 opacity-0"),children:nt.jsx("div",{className:"ms-3",children:nt.jsx("div",{className:`\n              mt-4 \n              transition-all \n              duration-300 \n              ease-in-out \n              transform \n              ${l?"translate-y-0 opacity-100":"-translate-y-5 opacity-0"}\n            `,children:"upload_code"===r?nt.jsx(uC,{result:e,setSuccess:a,chainProperties:i}):nt.jsx(dC,{result:e,originalGas:o,useGasEstimates:t,setSuccess:a,chainProperties:i})})})}),nt.jsxs("div",{className:"flex items-center mt-4 space-x-2",children:[nt.jsx("div",{className:"w-12 h-6 flex items-center cursor-pointer rounded-full p-1 duration-300 ease-in-out "+(t?"bg-blue-500":"bg-gray-300"),onClick:()=>n(!t),children:nt.jsx("div",{className:"w-4 h-4 bg-white rounded-full transform duration-300 ease-in-out "+(t?"translate-x-6":"translate-x-0")})}),nt.jsx("span",{className:"text-sm font-medium",children:"Use Gas Estimates in Call"})]})]})})}const pC=()=>nt.jsx("span",{className:"inline-flex justify-center items-center size-10 rounded-full border-4 border-teal-100 bg-teal-200 text-teal-800 dark:border-teal-900 dark:bg-teal-800 dark:text-teal-400",children:nt.jsxs("svg",{className:"shrink-0 size-6",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[nt.jsx("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"}),nt.jsx("path",{d:"m9 12 2 2 4-4"})]})}),hC=({size:e})=>nt.jsx("span",{className:`inline-flex justify-center items-center size-${e} rounded-full border-4 border-red-100 bg-red-200 text-red-800 dark:border-red-900 dark:bg-red-800 dark:text-red-400`,children:nt.jsxs("svg",{className:"shrink-0 size-"+(e-2),xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[nt.jsx("path",{d:"M18 6 6 18"}),nt.jsx("path",{d:"m6 6 12 12"})]})}),vC=()=>nt.jsxs("svg",{className:"shrink-0 size-6 text-blue-600 mt-1 mb-2",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[nt.jsx("circle",{cx:12,cy:12,r:10}),nt.jsx("path",{d:"M12 16v-4"}),nt.jsx("path",{d:"M12 8h.01"})]});function mC(e){const t=1000000000n,n=e%t;return`${(e/t).toString()}.${(n/10000000n).toString().padStart(2,"0")} ms`}function gC(e){return Math.trunc(Number(e)/1024*100)/100}const yC=({title:e,amount:t,chainProperties:n,isBold:r=!1})=>nt.jsxs("div",{className:"flex justify-between items-center",children:[nt.jsxs("span",{className:"text-gray-600 "+(r?"font-bold":"font-semibold"),children:[e,":"]}),nt.jsxs("span",{className:"text-gray-900 "+(r?"font-bold":"font-light"),children:[cp(t,n.tokenDecimals)," ",n.tokenSymbol]})]}),bC=({fees:e,deposit:t,accountBalance:n,chainProperties:r})=>{const[o,i]=qe.useState(!0),s=e+t,a=n<s;return nt.jsxs("div",{className:"mt-6 bg-gray-100 border border-gray-300 rounded-lg p-4",children:[nt.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>i(!o),children:[nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("button",{className:"w-6 h-6 flex justify-center items-center p-1 bg-gray-200 rounded-full",onClick:()=>i(!o),children:nt.jsx(cC,{isOpen:o,className:""})}),nt.jsx("h3",{className:"text-lg font-semibold",children:"Cost Summary"})]}),nt.jsx("div",{className:"flex items-center space-x-2",children:a?nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("span",{className:"text-red-600 font-medium",children:"fails"}),nt.jsx(hC,{size:8})]}):nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("span",{className:"text-green-600 font-medium",children:"succeeds"}),nt.jsx(pC,{})]})})]}),nt.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out "+(o?"max-h-screen opacity-100":"max-h-0 opacity-0"),children:nt.jsxs("div",{className:"mt-3 space-y-2",children:[nt.jsx(yC,{title:"Fees",amount:e,chainProperties:r}),nt.jsx(yC,{title:"Storage Deposit",amount:t,chainProperties:r}),nt.jsx(yC,{title:"Total Cost",amount:s,chainProperties:r,isBold:!0}),nt.jsx(yC,{title:"Your Balance",amount:n,chainProperties:r}),a?nt.jsxs("div",{className:"p-3 bg-red-100 border-l-4 border-red-500 text-red-700 rounded mt-3",children:[nt.jsx("p",{className:"font-semibold",children:"Insufficient Funds"}),nt.jsxs("p",{children:["You need at least ",nt.jsxs("span",{className:"font-bold",children:[cp(s,r.tokenDecimals)," ",r.tokenSymbol]})," to complete this transaction."]}),nt.jsx("div",{className:"text-red-600 font-bold flex items-center mt-2",children:"The call will not be successful."})]}):nt.jsx("div",{className:"text-green-600 font-bold flex items-center mt-3",children:"The call will be successful."})]})})]})},wC=()=>{const{fetchPayload:e,submitData:t,terminate:n}={fetchPayload:qe.useCallback((async()=>{const e=await fetch("/payload");if(!e.ok)throw new Error("Failed to fetch payload");return e.json()}),[]),submitData:qe.useCallback((async e=>{const t=await fetch("/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to submit data");return t.json()}),[]),reportError:qe.useCallback((async e=>{if(!(await fetch("/error",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to report error")}),[]),terminate:qe.useCallback((async()=>{if(!(await fetch("/terminate",{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw new Error("Failed to terminate")}),[])},[r,o]=qe.useState(null),[i,s]=qe.useState(null),[a,l]=qe.useState(null),[c,u]=qe.useState(null),[d,f]=qe.useState(null),[p,h]=qe.useState(null),[v,m]=qe.useState(!1),[g,y]=qe.useState(null),[b,w]=qe.useState(!1),[x,k]=qe.useState(!1),[E,S]=qe.useState(0n),[C,_]=qe.useState(0n),[A,N]=qe.useState(null),[P,j]=qe.useState(!0),[$,O]=qe.useState({ss58Format:42,tokenDecimals:12,tokenSymbol:"UNIT"}),[R,M]=qe.useState(!1),[T,L]=qe.useState(!1),[I,z]=qe.useState(null),[D,B]=qe.useState({title:"",message:""}),{selectedAccount:U}=YS(),F=e=>"Registrar"===(null==e?void 0:e.decodedCall.type)&&("reserve"===(null==e?void 0:e.decodedCall.value.type)||"register"===(null==e?void 0:e.decodedCall.value.type));qe.useEffect((()=>{(async()=>{m(!0),y(null);try{const t=await e();t.chain_rpc.endsWith("/")?h(t.chain_rpc.substring(0,t.chain_rpc.length-1)):h(t.chain_rpc),l(t.call_data);let n=Dk(tE(cE(t.chain_rpc)));o(n);let r=n.getUnsafeApi();s(r);let i=Rv.fromBytes(t.call_data).asHex(),a=Rv.fromHex(i);u(a);const c=await r.txFromCallData(a);f(c);let d=c.decodedCall.type;w("Contracts"===d),k(F(c)),"Contracts"===d&&H(c,r),F(c)&&V(c,r)}catch(t){console.log(t),y("Failed to connect to server or fetch data")}finally{m(!1)}})()}),[e]),qe.useEffect((()=>{(async()=>{if(r){let e=await r.getChainSpecData(),t={ss58Format:e.properties.ss58Format??42,tokenDecimals:e.properties.tokenDecimals??12,tokenSymbol:e.properties.tokenSymbol??"UNIT"};O(t)}})()}),[r]),qe.useEffect((()=>{i&&(async()=>{i.query.System.Account.watchValue(null==U?void 0:U.address).subscribe((e=>{z(e.data.free)}))})()}),[i,U]),qe.useEffect((()=>{b&&d&&i&&H(d,i)}),[U,b,d,i]),qe.useEffect((()=>{x&&d&&i&&V(d,i)}),[U,x,d,i]);const H=async(e,t)=>{let n=null==e?void 0:e.decodedCall;if(!U||"Contracts"!==(null==n?void 0:n.type))return;let r=n.value.value,o=r.code,i=r.data,s=r.salt,a=null;switch(n.value.type){case"call":a=await(null==t?void 0:t.apis.ContractsApi.call(U.address,r.dest.value,r.value,void 0,void 0,i));break;case"instantiate_with_code":a=await(null==t?void 0:t.apis.ContractsApi.instantiate(U.address,r.value,void 0,void 0,Zv("Upload",o),i,s));break;case"upload_code":a=await(null==t?void 0:t.apis.ContractsApi.upload_code(U.address,o,void 0,Zv("Enforced")))}N(a)},V=async(e,t)=>{let n=null==e?void 0:e.decodedCall;if(!U||!F(e))return;let r=await e.getEstimatedFees(U.address);S(r);let o=await t.constants.Registrar.ParaDeposit(),i=await t.constants.Registrar.DataDepositPerByte(),s=0n;switch(n.value.type){case"reserve":s=o;break;case"register":let e=n.value.value.genesis_head,r=(await t.query.Configuration.ActiveConfig.getValue()).max_code_size;s=o+i*BigInt(e.asBytes().length)+i*BigInt(r)}_(s),k(!0)};return nt.jsxs(nt.Fragment,{children:[" ",U&&nt.jsxs("div",{children:[v&&nt.jsx("p",{children:"Loading..."}),g&&nt.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:nt.jsxs("p",{children:["Error: ",g]})}),nt.jsxs("div",{className:"pb-3",children:[nt.jsx("div",{className:"font-semibold",children:"Account:"}),nt.jsxs("span",{children:[null==U?void 0:U.address," "]})]}),nt.jsxs("div",{children:[nt.jsxs("div",{className:"pb-3",children:[nt.jsxs("div",{className:"font-semibold",children:["RPC: ",nt.jsx("span",{className:"font-light text-black",children:p})]}),p?nt.jsxs("p",{children:[nt.jsx("a",{href:`https://polkadot.js.org/apps/?rpc=${encodeURIComponent(p)}`,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 underline hover:text-pink-700",children:"polkadot.js.org"}),nt.jsx("span",{className:"pr-2 pl-2",children:"|"}),nt.jsx("a",{href:`https://dev.papi.how/explorer#networkId=custom&endpoint=${encodeURIComponent(p)}`,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 underline hover:text-pink-700",children:"dev.papi.how"})]}):nt.jsx("p",{children:"No RPC loaded."})]}),nt.jsxs("div",{className:"pb-3",children:[nt.jsx("div",{className:"font-semibold pb-2",children:"Extrinsic Info:"}),d?nt.jsxs(Ke.Fragment,{children:[nt.jsxs("div",{className:"flex flex-wrap gap-x-4",children:[nt.jsxs("div",{className:"bg-gray-100 rounded p-1 border border-gray-200 font-bold",children:[nt.jsx("span",{className:"text-gray-600 font-light",children:"Pallet:"})," ",d.decodedCall.type]}),nt.jsxs("div",{className:"bg-gray-100 rounded p-1 border border-gray-200 font-bold",children:[nt.jsx("span",{className:"text-gray-600 font-light",children:"Dispatchable:"})," ",d.decodedCall.value.type]})]}),x&&nt.jsx(bC,{fees:E,deposit:C,accountBalance:I,chainProperties:$})]}):nt.jsx("p",{})]})]}),b&&A&&nt.jsx("div",{children:nt.jsx(fC,{dryRunResult:A,useGasEstimates:P,setUseGasEstimates:j,originalGas:null==d?void 0:d.decodedCall.value.value.gas_limit,callType:null==d?void 0:d.decodedCall.value.type,chainProperties:$})}),nt.jsxs("div",{className:"bg-blue-100 border-l-4 border-blue-500 text-blue-700 p-4 mb-6 flex flex-col",children:[nt.jsx("div",{className:"flex items-center justify-between",children:nt.jsxs("div",{className:"flex items-center",children:[nt.jsx(vC,{}),nt.jsx("span",{className:"ml-2 font-extrabold",children:"Note"})]})}),nt.jsx("div",{className:"mt-2",children:nt.jsxs("p",{children:["Please review the transaction details ",nt.jsx("b",{children:"in your wallet before signing"}),"."]})})]}),nt.jsxs("div",{className:"flex justify-center items-center space-x-4",children:[nt.jsx(aC,{onClick:async()=>await(async()=>{if(!d)return void y("No transaction loaded.");if(!U)return void y("No account selected.");L(!0);let e=null;if(b&&P&&A){const{type:t,value:{type:n,value:r}}=d.decodedCall;"instantiate_with_code"===(null==d?void 0:d.decodedCall.value.type)||"call"===(null==d?void 0:d.decodedCall.value.type)?(r.gas_limit.ref_time=A.gas_required.ref_time,r.gas_limit.proof_size=A.gas_required.proof_size,r.storage_deposit_limit=A.storage_deposit.value,e=await i.tx[t][n](r)):"upload_code"===d.decodedCall.value.type&&(r.deposit=A.value.deposit,e=await i.tx[t][n](r))}let n=null;try{n=e?await(null==e?void 0:e.sign(null==U?void 0:U.polkadotSigner)):await(null==d?void 0:d.sign(null==U?void 0:U.polkadotSigner))}catch(r){return L(!1),console.log(r),void y("Cancelled")}try{"success"===(await t(null==n?void 0:n.toString())).status?(B({title:"Signing Successful",message:"Pop CLI will submit the signed transaction. You can close the tab now.",confirmText:"Close Tab",confirmClass:"px-4 py-2 bg-pink-700 text-white rounded hover:bg-blue-300 hover:text-gray-800",showCancelButton:!1,onConfirm:()=>{window.close(),M(!1),y("Browser prevented tab close. Please close manually.")},onCancel:()=>M(!1)}),M(!0)):y("An error occurred submitting the payload")}catch(r){y("Unable to submit. Is the server closed?")}finally{m(!1)}L(!1)})(),className:"text-lg font-bold bg-pink-700 hover:bg-blue-300 hover:text-gray-800",disabled:T,children:"Submit"}),nt.jsx(aC,{onClick:async()=>{y(null),B({title:"Cancel Signing",message:"Are you sure you want to cancel the signing? This will close the server and tab.",confirmText:"Yes, Cancel",cancelText:"Go Back",confirmClass:"px-4 py-2 bg-pink-700 text-white rounded hover:bg-blue-300 hover:text-gray-800",onConfirm:async()=>{try{await n(),window.close()}catch(e){console.log(e),y("Failed to terminate the server. Is it already closed?")}console.log("Server closed."),M(!1),y("Browser prevented tab close. Please close manually.")},onCancel:()=>M(!1)}),M(!0)},className:"text-lg font-bold bg-violet-950 hover:bg-violet-800",children:"Cancel"})]}),nt.jsx(lC,{isOpen:R,title:D.title,message:D.message,confirmText:D.confirmText,confirmClass:D.confirmClass,cancelText:D.cancelText,showCancelButton:D.showCancelButton,onConfirm:D.onConfirm,onCancel:D.onCancel})]})]})},xC=globalThis,kC=xC.ShadowRoot&&(void 0===xC.ShadyCSS||xC.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,EC=Symbol(),SC=new WeakMap;let CC=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==EC)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(kC&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=SC.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&SC.set(t,e))}return e}toString(){return this.cssText}};const _C=(e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[r+1]),e[0]);return new CC(n,e,EC)},AC=kC?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new CC("string"==typeof e?e:e+"",void 0,EC))(t)})(e):e,{is:NC,defineProperty:PC,getOwnPropertyDescriptor:jC,getOwnPropertyNames:$C,getOwnPropertySymbols:OC,getPrototypeOf:RC}=Object,MC=globalThis,TC=MC.trustedTypes,LC=TC?TC.emptyScript:"",IC=MC.reactiveElementPolyfillSupport,zC=(e,t)=>e,DC={toAttribute(e,t){switch(t){case Boolean:e=e?LC:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(r){n=null}}return n}},BC=(e,t)=>!NC(e,t),UC={attribute:!0,type:String,converter:DC,reflect:!1,hasChanged:BC};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),MC.litPropertyMetadata??(MC.litPropertyMetadata=new WeakMap);let FC=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=UC){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(e,n,t);void 0!==r&&PC(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){const{get:r,set:o}=jC(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return null==r?void 0:r.call(this)},set(t){const i=null==r?void 0:r.call(this);o.call(this,t),this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??UC}static _$Ei(){if(this.hasOwnProperty(zC("elementProperties")))return;const e=RC(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(zC("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zC("properties"))){const e=this.properties,t=[...$C(e),...OC(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const e=this._$Eu(t,n);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(AC(e))}else void 0!==e&&t.push(AC(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(e=this.constructor.l)||e.forEach((e=>e(this)))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),void 0!==this.renderRoot&&this.isConnected&&(null==(t=e.hostConnected)||t.call(e))}removeController(e){var t;null==(t=this._$EO)||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(kC)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),r=xC.litNonce;void 0!==r&&t.setAttribute("nonce",r),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(e=this._$EO)||e.forEach((e=>{var t;return null==(t=e.hostConnected)?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null==(e=this._$EO)||e.forEach((e=>{var t;return null==(t=e.hostDisconnected)?void 0:t.call(e)}))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EC(e,t){var n;const r=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,r);if(void 0!==o&&!0===r.reflect){const i=(void 0!==(null==(n=r.converter)?void 0:n.toAttribute)?r.converter:DC).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(e,t){var n;const r=this.constructor,o=r._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=r.getPropertyOptions(o),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null==(n=e.converter)?void 0:n.fromAttribute)?e.converter:DC;this._$Em=o,this[o]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){if(n??(n=this.constructor.getPropertyOptions(e)),!(n.hasChanged??BC)(this[e],t))return;this.P(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,n){this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e)!0!==n.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],n)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null==(e=this._$EO)||e.forEach((e=>{var t;return null==(t=e.hostUpdate)?void 0:t.call(e)})),this.update(n)):this._$EU()}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null==(t=this._$EO)||t.forEach((e=>{var t;return null==(t=e.hostUpdated)?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach((e=>this._$EC(e,this[e])))),this._$EU()}updated(e){}firstUpdated(e){}};FC.elementStyles=[],FC.shadowRootOptions={mode:"open"},FC[zC("elementProperties")]=new Map,FC[zC("finalized")]=new Map,null==IC||IC({ReactiveElement:FC}),(MC.reactiveElementVersions??(MC.reactiveElementVersions=[])).push("2.0.4");const HC=globalThis,VC=HC.trustedTypes,WC=VC?VC.createPolicy("lit-html",{createHTML:e=>e}):void 0,qC="$lit$",KC=`lit$${Math.random().toFixed(9).slice(2)}$`,YC="?"+KC,QC=`<${YC}>`,GC=document,JC=()=>GC.createComment(""),XC=e=>null===e||"object"!=typeof e&&"function"!=typeof e,ZC=Array.isArray,e_=e=>ZC(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]),t_="[ \t\n\f\r]",n_=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,r_=/-->/g,o_=/>/g,i_=RegExp(`>|${t_}(?:([^\\s"'>=/]+)(${t_}*=${t_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),s_=/'/g,a_=/"/g,l_=/^(?:script|style|textarea|title)$/i,c_=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),u_=c_(1),d_=c_(2),f_=Symbol.for("lit-noChange"),p_=Symbol.for("lit-nothing"),h_=new WeakMap,v_=GC.createTreeWalker(GC,129);function m_(e,t){if(!ZC(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==WC?WC.createHTML(t):t}const g_=(e,t)=>{const n=e.length-1,r=[];let o,i=2===t?"<svg>":3===t?"<math>":"",s=n_;for(let a=0;a<n;a++){const t=e[a];let n,l,c=-1,u=0;for(;u<t.length&&(s.lastIndex=u,l=s.exec(t),null!==l);)u=s.lastIndex,s===n_?"!--"===l[1]?s=r_:void 0!==l[1]?s=o_:void 0!==l[2]?(l_.test(l[2])&&(o=RegExp("</"+l[2],"g")),s=i_):void 0!==l[3]&&(s=i_):s===i_?">"===l[0]?(s=o??n_,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,n=l[1],s=void 0===l[3]?i_:'"'===l[3]?a_:s_):s===a_||s===s_?s=i_:s===r_||s===o_?s=n_:(s=i_,o=void 0);const d=s===i_&&e[a+1].startsWith("/>")?" ":"";i+=s===n_?t+QC:c>=0?(r.push(n),t.slice(0,c)+qC+t.slice(c)+KC+d):t+KC+(-2===c?a:d)}return[m_(e,i+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),r]};let y_=class e{constructor({strings:t,_$litType$:n},r){let o;this.parts=[];let i=0,s=0;const a=t.length-1,l=this.parts,[c,u]=g_(t,n);if(this.el=e.createElement(c,r),v_.currentNode=this.el.content,2===n||3===n){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=v_.nextNode())&&l.length<a;){if(1===o.nodeType){if(o.hasAttributes())for(const e of o.getAttributeNames())if(e.endsWith(qC)){const t=u[s++],n=o.getAttribute(e).split(KC),r=/([.?@])?(.*)/.exec(t);l.push({type:1,index:i,name:r[2],strings:n,ctor:"."===r[1]?E_:"?"===r[1]?S_:"@"===r[1]?C_:k_}),o.removeAttribute(e)}else e.startsWith(KC)&&(l.push({type:6,index:i}),o.removeAttribute(e));if(l_.test(o.tagName)){const e=o.textContent.split(KC),t=e.length-1;if(t>0){o.textContent=VC?VC.emptyScript:"";for(let n=0;n<t;n++)o.append(e[n],JC()),v_.nextNode(),l.push({type:2,index:++i});o.append(e[t],JC())}}}else if(8===o.nodeType)if(o.data===YC)l.push({type:2,index:i});else{let e=-1;for(;-1!==(e=o.data.indexOf(KC,e+1));)l.push({type:7,index:i}),e+=KC.length-1}i++}}static createElement(e,t){const n=GC.createElement("template");return n.innerHTML=e,n}};function b_(e,t,n=e,r){var o,i;if(t===f_)return t;let s=void 0!==r?null==(o=n._$Co)?void 0:o[r]:n._$Cl;const a=XC(t)?void 0:t._$litDirective$;return(null==s?void 0:s.constructor)!==a&&(null==(i=null==s?void 0:s._$AO)||i.call(s,!1),void 0===a?s=void 0:(s=new a(e),s._$AT(e,n,r)),void 0!==r?(n._$Co??(n._$Co=[]))[r]=s:n._$Cl=s),void 0!==s&&(t=b_(e,s._$AS(e,t.values),s,r)),t}let w_=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,r=((null==e?void 0:e.creationScope)??GC).importNode(t,!0);v_.currentNode=r;let o=v_.nextNode(),i=0,s=0,a=n[0];for(;void 0!==a;){if(i===a.index){let t;2===a.type?t=new x_(o,o.nextSibling,this,e):1===a.type?t=new a.ctor(o,a.name,a.strings,this,e):6===a.type&&(t=new __(o,this,e)),this._$AV.push(t),a=n[++s]}i!==(null==a?void 0:a.index)&&(o=v_.nextNode(),i++)}return v_.currentNode=GC,r}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},x_=class e{get _$AU(){var e;return(null==(e=this._$AM)?void 0:e._$AU)??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=p_,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=(null==r?void 0:r.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===(null==e?void 0:e.nodeType)&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=b_(this,e,t),XC(e)?e===p_||null==e||""===e?(this._$AH!==p_&&this._$AR(),this._$AH=p_):e!==this._$AH&&e!==f_&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):e_(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==p_&&XC(this._$AH)?this._$AA.nextSibling.data=e:this.T(GC.createTextNode(e)),this._$AH=e}$(e){var t;const{values:n,_$litType$:r}=e,o="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=y_.createElement(m_(r.h,r.h[0]),this.options)),r);if((null==(t=this._$AH)?void 0:t._$AD)===o)this._$AH.p(n);else{const e=new w_(o,this),t=e.u(this.options);e.p(n),this.T(t),this._$AH=e}}_$AC(e){let t=h_.get(e.strings);return void 0===t&&h_.set(e.strings,t=new y_(e)),t}k(t){ZC(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,o=0;for(const i of t)o===n.length?n.push(r=new e(this.O(JC()),this.O(JC()),this,this.options)):r=n[o],r._$AI(i),o++;o<n.length&&(this._$AR(r&&r._$AB.nextSibling,o),n.length=o)}_$AR(e=this._$AA.nextSibling,t){var n;for(null==(n=this._$AP)||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cv=e,null==(t=this._$AP)||t.call(this,e))}},k_=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,o){this.type=1,this._$AH=p_,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=p_}_$AI(e,t=this,n,r){const o=this.strings;let i=!1;if(void 0===o)e=b_(this,e,t,0),i=!XC(e)||e!==this._$AH&&e!==f_,i&&(this._$AH=e);else{const r=e;let s,a;for(e=o[0],s=0;s<o.length-1;s++)a=b_(this,r[n+s],t,s),a===f_&&(a=this._$AH[s]),i||(i=!XC(a)||a!==this._$AH[s]),a===p_?e=p_:e!==p_&&(e+=(a??"")+o[s+1]),this._$AH[s]=a}i&&!r&&this.j(e)}j(e){e===p_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},E_=class extends k_{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===p_?void 0:e}},S_=class extends k_{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==p_)}},C_=class extends k_{constructor(e,t,n,r,o){super(e,t,n,r,o),this.type=5}_$AI(e,t=this){if((e=b_(this,e,t,0)??p_)===f_)return;const n=this._$AH,r=e===p_&&n!==p_||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==p_&&(n===p_||r);r&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;"function"==typeof this._$AH?this._$AH.call((null==(t=this.options)?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}},__=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){b_(this,e)}};const A_={M:qC,P:KC,A:YC,C:1,L:g_,R:w_,D:e_,V:b_,I:x_,H:k_,N:S_,U:C_,B:E_,F:__},N_=HC.litHtmlPolyfillSupport;null==N_||N_(y_,x_),(HC.litHtmlVersions??(HC.litHtmlVersions=[])).push("3.2.1");let P_=class extends FC{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const r=(null==n?void 0:n.renderBefore)??t;let o=r._$litPart$;if(void 0===o){const e=(null==n?void 0:n.renderBefore)??null;r._$litPart$=o=new x_(t.insertBefore(JC(),e),e,void 0,n??{})}return o._$AI(e),o})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null==(e=this._$Do)||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this._$Do)||e.setConnected(!1)}render(){return f_}};P_._$litElement$=!0,P_.finalized=!0,null==(a=globalThis.litElementHydrateSupport)||a.call(globalThis,{LitElement:P_});const j_=globalThis.litElementPolyfillSupport;function $_({size:e=24}){return u_`<svg
+  <script type="module" crossorigin>var e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,v,m,g,y,b,w,x,k,E,S,C,_,A,N,P,j,$,O,R,M,T,L,I,z,D,B,U,F,H,V,W,q,K,Y=Object.defineProperty,Q=Object.getPrototypeOf,G=Reflect.get,J=e=>{throw TypeError(e)},X=(e,t,n)=>((e,t,n)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Z=(e,t,n)=>t.has(e)||J("Cannot "+n),ee=(e,t,n)=>(Z(e,t,"read from private field"),n?n.call(e):t.get(e)),te=(e,t,n)=>t.has(e)?J("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ne=(e,t,n,r)=>(Z(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),re=(e,t,n)=>(Z(e,t,"access private method"),n),oe=(e,t,n)=>G(Q(e),n,t);function ie(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var le={exports:{}},ce={},ue={exports:{}},de={},fe=Symbol.for("react.element"),pe=Symbol.for("react.portal"),he=Symbol.for("react.fragment"),ve=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),ge=Symbol.for("react.provider"),ye=Symbol.for("react.context"),be=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),xe=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),Ee=Symbol.iterator;var Se={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ce=Object.assign,_e={};function Ae(e,t,n){this.props=e,this.context=t,this.refs=_e,this.updater=n||Se}function Ne(){}function Pe(e,t,n){this.props=e,this.context=t,this.refs=_e,this.updater=n||Se}Ae.prototype.isReactComponent={},Ae.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},Ae.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},Ne.prototype=Ae.prototype;var je=Pe.prototype=new Ne;je.constructor=Pe,Ce(je,Ae.prototype),je.isPureReactComponent=!0;var $e=Array.isArray,Oe=Object.prototype.hasOwnProperty,Re={current:null},Me={key:!0,ref:!0,__self:!0,__source:!0};function Te(e,t,n){var r,o={},i=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)Oe.call(t,r)&&!Me.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(1===a)o.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===o[r]&&(o[r]=a[r]);return{$$typeof:fe,type:e,key:i,ref:s,props:o,_owner:Re.current}}function Le(e){return"object"==typeof e&&null!==e&&e.$$typeof===fe}var Ie=/\/+/g;function ze(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function De(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case fe:case pe:s=!0}}if(s)return o=o(s=e),e=""===r?"."+ze(s,0):r,$e(o)?(n="",null!=e&&(n=e.replace(Ie,"$&/")+"/"),De(o,t,n,"",(function(e){return e}))):null!=o&&(Le(o)&&(o=function(e,t){return{$$typeof:fe,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ie,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=""===r?".":r+":",$e(e))for(var a=0;a<e.length;a++){var l=r+ze(i=e[a],a);s+=De(i,t,n,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Ee&&e[Ee]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),a=0;!(i=e.next()).done;)s+=De(i=i.value,t,n,l=r+ze(i,a++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Be(e,t,n){if(null==e)return e;var r=[],o=0;return De(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function Ue(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var Fe={current:null},He={transition:null},Ve={ReactCurrentDispatcher:Fe,ReactCurrentBatchConfig:He,ReactCurrentOwner:Re};function We(){throw Error("act(...) is not supported in production builds of React.")}de.Children={map:Be,forEach:function(e,t,n){Be(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return Be(e,(function(){t++})),t},toArray:function(e){return Be(e,(function(e){return e}))||[]},only:function(e){if(!Le(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},de.Component=Ae,de.Fragment=he,de.Profiler=me,de.PureComponent=Pe,de.StrictMode=ve,de.Suspense=we,de.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ve,de.act=We,de.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ce({},e.props),o=e.key,i=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,s=Re.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Oe.call(t,l)&&!Me.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==a?a[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:fe,type:e.type,key:o,ref:i,props:r,_owner:s}},de.createContext=function(e){return(e={$$typeof:ye,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:ge,_context:e},e.Consumer=e},de.createElement=Te,de.createFactory=function(e){var t=Te.bind(null,e);return t.type=e,t},de.createRef=function(){return{current:null}},de.forwardRef=function(e){return{$$typeof:be,render:e}},de.isValidElement=Le,de.lazy=function(e){return{$$typeof:ke,_payload:{_status:-1,_result:e},_init:Ue}},de.memo=function(e,t){return{$$typeof:xe,type:e,compare:void 0===t?null:t}},de.startTransition=function(e){var t=He.transition;He.transition={};try{e()}finally{He.transition=t}},de.unstable_act=We,de.useCallback=function(e,t){return Fe.current.useCallback(e,t)},de.useContext=function(e){return Fe.current.useContext(e)},de.useDebugValue=function(){},de.useDeferredValue=function(e){return Fe.current.useDeferredValue(e)},de.useEffect=function(e,t){return Fe.current.useEffect(e,t)},de.useId=function(){return Fe.current.useId()},de.useImperativeHandle=function(e,t,n){return Fe.current.useImperativeHandle(e,t,n)},de.useInsertionEffect=function(e,t){return Fe.current.useInsertionEffect(e,t)},de.useLayoutEffect=function(e,t){return Fe.current.useLayoutEffect(e,t)},de.useMemo=function(e,t){return Fe.current.useMemo(e,t)},de.useReducer=function(e,t,n){return Fe.current.useReducer(e,t,n)},de.useRef=function(e){return Fe.current.useRef(e)},de.useState=function(e){return Fe.current.useState(e)},de.useSyncExternalStore=function(e,t,n){return Fe.current.useSyncExternalStore(e,t,n)},de.useTransition=function(){return Fe.current.useTransition()},de.version="18.3.1",ue.exports=de;var qe=ue.exports;const Ke=ae(qe),Ye=ie({__proto__:null,default:Ke},[qe]);var Qe=qe,Ge=Symbol.for("react.element"),Je=Symbol.for("react.fragment"),Xe=Object.prototype.hasOwnProperty,Ze=Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,et={key:!0,ref:!0,__self:!0,__source:!0};function tt(e,t,n){var r,o={},i=null,s=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(s=t.ref),t)Xe.call(t,r)&&!et.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:Ge,type:e,key:i,ref:s,props:o,_owner:Ze.current}}ce.Fragment=Je,ce.jsx=tt,ce.jsxs=tt,le.exports=ce;var nt=le.exports,rt={},ot={exports:{}},it={},st={exports:{}},at={};!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var a=2*(r+1)-1,l=e[a],c=a+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,p=!1,h=!1,v=!1,m="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(c);null!==o;){if(null===o.callback)r(c);else{if(!(o.startTime<=e))break;r(c),o.sortIndex=o.expirationTime,t(l,o)}o=n(c)}}function w(e){if(v=!1,b(e),!h)if(null!==n(l))h=!0,O(x);else{var t=n(c);null!==t&&R(w,t.startTime-e)}}function x(t,o){h=!1,v&&(v=!1,g(C),C=-1),p=!0;var i=f;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!N());){var s=d.callback;if("function"==typeof s){d.callback=null,f=d.priorityLevel;var a=s(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof a?d.callback=a:d===n(l)&&r(l),b(o)}else r(l);d=n(l)}if(null!==d)var u=!0;else{var m=n(c);null!==m&&R(w,m.startTime-o),u=!1}return u}finally{d=null,f=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,E=!1,S=null,C=-1,_=5,A=-1;function N(){return!(e.unstable_now()-A<_)}function P(){if(null!==S){var t=e.unstable_now();A=t;var n=!0;try{n=S(!0,t)}finally{n?k():(E=!1,S=null)}}else E=!1}if("function"==typeof y)k=function(){y(P)};else if("undefined"!=typeof MessageChannel){var j=new MessageChannel,$=j.port2;j.port1.onmessage=P,k=function(){$.postMessage(null)}}else k=function(){m(P,0)};function O(e){S=e,E||(E=!0,k())}function R(t,n){C=m((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,O(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,o,i){var s=e.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?s+i:s:i=s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:u++,callback:o,priorityLevel:r,startTime:i,expirationTime:a=i+a,sortIndex:-1},i>s?(r.sortIndex=i,t(c,r),null===n(l)&&r===n(c)&&(v?(g(C),C=-1):v=!0,R(w,i-s))):(r.sortIndex=a,t(l,r),h||p||(h=!0,O(x))),r},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(at),st.exports=at;var lt=st.exports,ct=qe,ut=lt;function dt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ft=new Set,pt={};function ht(e,t){vt(e,t),vt(e+"Capture",t)}function vt(e,t){for(pt[e]=t,e=0;e<t.length;e++)ft.add(t[e])}var mt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),gt=Object.prototype.hasOwnProperty,yt=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,bt={},wt={};function xt(e,t,n,r,o,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){kt[e]=new xt(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];kt[t]=new xt(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){kt[e]=new xt(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){kt[e]=new xt(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){kt[e]=new xt(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){kt[e]=new xt(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){kt[e]=new xt(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){kt[e]=new xt(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){kt[e]=new xt(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Et=/[\-:]([a-z])/g;function St(e){return e[1].toUpperCase()}function Ct(e,t,n,r){var o=kt.hasOwnProperty(t)?kt[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!gt.call(wt,e)||!gt.call(bt,e)&&(yt.test(e)?wt[e]=!0:(bt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Et,St);kt[t]=new xt(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Et,St);kt[t]=new xt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Et,St);kt[t]=new xt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){kt[e]=new xt(e,1,!1,e.toLowerCase(),null,!1,!1)})),kt.xlinkHref=new xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){kt[e]=new xt(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _t=ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,At=Symbol.for("react.element"),Nt=Symbol.for("react.portal"),Pt=Symbol.for("react.fragment"),jt=Symbol.for("react.strict_mode"),$t=Symbol.for("react.profiler"),Ot=Symbol.for("react.provider"),Rt=Symbol.for("react.context"),Mt=Symbol.for("react.forward_ref"),Tt=Symbol.for("react.suspense"),Lt=Symbol.for("react.suspense_list"),It=Symbol.for("react.memo"),zt=Symbol.for("react.lazy"),Dt=Symbol.for("react.offscreen"),Bt=Symbol.iterator;function Ut(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Bt&&e[Bt]||e["@@iterator"])?e:null}var Ft,Ht=Object.assign;function Vt(e){if(void 0===Ft)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ft=t&&t[1]||""}return"\n"+Ft+e}var Wt=!1;function qt(e,t){if(!e||Wt)return"";Wt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var o=c.stack.split("\n"),i=r.stack.split("\n"),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(1!==s||1!==a)do{if(s--,0>--a||o[s]!==i[a]){var l="\n"+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{Wt=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vt(e):""}function Kt(e){switch(e.tag){case 5:return Vt(e.type);case 16:return Vt("Lazy");case 13:return Vt("Suspense");case 19:return Vt("SuspenseList");case 0:case 2:case 15:return e=qt(e.type,!1);case 11:return e=qt(e.type.render,!1);case 1:return e=qt(e.type,!0);default:return""}}function Yt(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Pt:return"Fragment";case Nt:return"Portal";case $t:return"Profiler";case jt:return"StrictMode";case Tt:return"Suspense";case Lt:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Rt:return(e.displayName||"Context")+".Consumer";case Ot:return(e._context.displayName||"Context")+".Provider";case Mt:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case It:return null!==(t=e.displayName||null)?t:Yt(e.type)||"Memo";case zt:t=e._payload,e=e._init;try{return Yt(e(t))}catch(n){}}return null}function Qt(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Yt(t);case 8:return t===jt?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Gt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Jt(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Xt(e){e._valueTracker||(e._valueTracker=function(e){var t=Jt(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Zt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jt(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function en(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function tn(e,t){var n=t.checked;return Ht({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function nn(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Gt(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function rn(e,t){null!=(t=t.checked)&&Ct(e,"checked",t,!1)}function on(e,t){rn(e,t);var n=Gt(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?an(e,t.type,n):t.hasOwnProperty("defaultValue")&&an(e,t.type,Gt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function sn(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function an(e,t,n){"number"===t&&en(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ln=Array.isArray;function cn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Gt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function un(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(dt(91));return Ht({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function dn(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(dt(92));if(ln(n)){if(1<n.length)throw Error(dt(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Gt(n)}}function fn(e,t){var n=Gt(t.value),r=Gt(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function pn(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function hn(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function vn(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?hn(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var mn,gn,yn=(gn=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((mn=mn||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=mn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return gn(e,t)}))}:gn);function bn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var wn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xn=["Webkit","ms","Moz","O"];function kn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||wn.hasOwnProperty(e)&&wn[e]?(""+t).trim():t+"px"}function En(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=kn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(wn).forEach((function(e){xn.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wn[t]=wn[e]}))}));var Sn=Ht({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Cn(e,t){if(t){if(Sn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(dt(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(dt(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(dt(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(dt(62))}}function _n(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var An=null;function Nn(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Pn=null,jn=null,$n=null;function On(e){if(e=_s(e)){if("function"!=typeof Pn)throw Error(dt(280));var t=e.stateNode;t&&(t=Ns(t),Pn(e.stateNode,e.type,t))}}function Rn(e){jn?$n?$n.push(e):$n=[e]:jn=e}function Mn(){if(jn){var e=jn,t=$n;if($n=jn=null,On(e),t)for(e=0;e<t.length;e++)On(t[e])}}function Tn(e,t){return e(t)}function Ln(){}var In=!1;function zn(e,t,n){if(In)return e(t,n);In=!0;try{return Tn(e,t,n)}finally{In=!1,(null!==jn||null!==$n)&&(Ln(),Mn())}}function Dn(e,t){var n=e.stateNode;if(null===n)return null;var r=Ns(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(dt(231,t,typeof n));return n}var Bn=!1;if(mt)try{var Un={};Object.defineProperty(Un,"passive",{get:function(){Bn=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch(gn){Bn=!1}function Fn(e,t,n,r,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Hn=!1,Vn=null,Wn=!1,qn=null,Kn={onError:function(e){Hn=!0,Vn=e}};function Yn(e,t,n,r,o,i,s,a,l){Hn=!1,Vn=null,Fn.apply(Kn,arguments)}function Qn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Gn(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Jn(e){if(Qn(e)!==e)throw Error(dt(188))}function Xn(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Qn(e)))throw Error(dt(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Jn(o),e;if(i===r)return Jn(o),t;i=i.sibling}throw Error(dt(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(dt(189))}}if(n.alternate!==r)throw Error(dt(190))}if(3!==n.tag)throw Error(dt(188));return n.stateNode.current===n?e:t}(e))?Zn(e):null}function Zn(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Zn(e);if(null!==t)return t;e=e.sibling}return null}var er=ut.unstable_scheduleCallback,tr=ut.unstable_cancelCallback,nr=ut.unstable_shouldYield,rr=ut.unstable_requestPaint,or=ut.unstable_now,ir=ut.unstable_getCurrentPriorityLevel,sr=ut.unstable_ImmediatePriority,ar=ut.unstable_UserBlockingPriority,lr=ut.unstable_NormalPriority,cr=ut.unstable_LowPriority,ur=ut.unstable_IdlePriority,dr=null,fr=null;var pr=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(hr(e)/vr|0)|0},hr=Math.log,vr=Math.LN2;var mr=64,gr=4194304;function yr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function br(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~o;0!==a?r=yr(a):0!==(i&=s)&&(r=yr(i))}else 0!==(s=n&~o)?r=yr(s):0!==i&&(r=yr(i));if(0===r)return 0;if(0!==t&&t!==r&&!(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&4194240&i))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-pr(t)),r|=e[n],t&=~o;return r}function wr(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function xr(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function kr(){var e=mr;return!(4194240&(mr<<=1))&&(mr=64),e}function Er(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Sr(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-pr(t)]=n}function Cr(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pr(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var _r=0;function Ar(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Nr,Pr,jr,$r,Or,Rr=!1,Mr=[],Tr=null,Lr=null,Ir=null,zr=new Map,Dr=new Map,Br=[],Ur="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Fr(e,t){switch(e){case"focusin":case"focusout":Tr=null;break;case"dragenter":case"dragleave":Lr=null;break;case"mouseover":case"mouseout":Ir=null;break;case"pointerover":case"pointerout":zr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dr.delete(t.pointerId)}}function Hr(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=_s(t))&&Pr(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Vr(e){var t=Cs(e.target);if(null!==t){var n=Qn(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Gn(n)))return e.blockedOn=t,void Or(e.priority,(function(){jr(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Wr(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=no(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=_s(n))&&Pr(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);An=r,n.target.dispatchEvent(r),An=null,t.shift()}return!0}function qr(e,t,n){Wr(e)&&n.delete(t)}function Kr(){Rr=!1,null!==Tr&&Wr(Tr)&&(Tr=null),null!==Lr&&Wr(Lr)&&(Lr=null),null!==Ir&&Wr(Ir)&&(Ir=null),zr.forEach(qr),Dr.forEach(qr)}function Yr(e,t){e.blockedOn===t&&(e.blockedOn=null,Rr||(Rr=!0,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,Kr)))}function Qr(e){function t(t){return Yr(t,e)}if(0<Mr.length){Yr(Mr[0],e);for(var n=1;n<Mr.length;n++){var r=Mr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tr&&Yr(Tr,e),null!==Lr&&Yr(Lr,e),null!==Ir&&Yr(Ir,e),zr.forEach(t),Dr.forEach(t),n=0;n<Br.length;n++)(r=Br[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Br.length&&null===(n=Br[0]).blockedOn;)Vr(n),null===n.blockedOn&&Br.shift()}var Gr=_t.ReactCurrentBatchConfig,Jr=!0;function Xr(e,t,n,r){var o=_r,i=Gr.transition;Gr.transition=null;try{_r=1,eo(e,t,n,r)}finally{_r=o,Gr.transition=i}}function Zr(e,t,n,r){var o=_r,i=Gr.transition;Gr.transition=null;try{_r=4,eo(e,t,n,r)}finally{_r=o,Gr.transition=i}}function eo(e,t,n,r){if(Jr){var o=no(e,t,n,r);if(null===o)Ji(e,t,r,to,n),Fr(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Tr=Hr(Tr,e,t,n,r,o),!0;case"dragenter":return Lr=Hr(Lr,e,t,n,r,o),!0;case"mouseover":return Ir=Hr(Ir,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return zr.set(i,Hr(zr.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Dr.set(i,Hr(Dr.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Fr(e,r),4&t&&-1<Ur.indexOf(e)){for(;null!==o;){var i=_s(o);if(null!==i&&Nr(i),null===(i=no(e,t,n,r))&&Ji(e,t,r,to,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Ji(e,t,r,null,n)}}var to=null;function no(e,t,n,r){if(to=null,null!==(e=Cs(e=Nn(r))))if(null===(t=Qn(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Gn(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return to=e,null}function ro(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ir()){case sr:return 1;case ar:return 4;case lr:case cr:return 16;case ur:return 536870912;default:return 16}default:return 16}}var oo=null,io=null,so=null;function ao(){if(so)return so;var e,t,n=io,r=n.length,o="value"in oo?oo.value:oo.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===o[i-t];t++);return so=o.slice(e,1<t?1-t:void 0)}function lo(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function co(){return!0}function uo(){return!1}function fo(e){function t(t,n,r,o,i){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(o):o[s]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?co:uo,this.isPropagationStopped=uo,this}return Ht(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=co)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=co)},persist:function(){},isPersistent:co}),t}var po,ho,vo,mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},go=fo(mo),yo=Ht({},mo,{view:0,detail:0}),bo=fo(yo),wo=Ht({},yo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oo,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==vo&&(vo&&"mousemove"===e.type?(po=e.screenX-vo.screenX,ho=e.screenY-vo.screenY):ho=po=0,vo=e),po)},movementY:function(e){return"movementY"in e?e.movementY:ho}}),xo=fo(wo),ko=fo(Ht({},wo,{dataTransfer:0})),Eo=fo(Ht({},yo,{relatedTarget:0})),So=fo(Ht({},mo,{animationName:0,elapsedTime:0,pseudoElement:0})),Co=Ht({},mo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_o=fo(Co),Ao=fo(Ht({},mo,{data:0})),No={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Po={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},jo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $o(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=jo[e])&&!!t[e]}function Oo(){return $o}var Ro=Ht({},yo,{key:function(e){if(e.key){var t=No[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=lo(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Po[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oo,charCode:function(e){return"keypress"===e.type?lo(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?lo(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Mo=fo(Ro),To=fo(Ht({},wo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Lo=fo(Ht({},yo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oo})),Io=fo(Ht({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0})),zo=Ht({},wo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Do=fo(zo),Bo=[9,13,27,32],Uo=mt&&"CompositionEvent"in window,Fo=null;mt&&"documentMode"in document&&(Fo=document.documentMode);var Ho=mt&&"TextEvent"in window&&!Fo,Vo=mt&&(!Uo||Fo&&8<Fo&&11>=Fo),Wo=String.fromCharCode(32),qo=!1;function Ko(e,t){switch(e){case"keyup":return-1!==Bo.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yo(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Qo=!1;var Go={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Jo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Go[e.type]:"textarea"===t}function Xo(e,t,n,r){Rn(r),0<(t=Zi(t,"onChange")).length&&(n=new go("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zo=null,ei=null;function ti(e){Wi(e,0)}function ni(e){if(Zt(As(e)))return e}function ri(e,t){if("change"===e)return t}var oi=!1;if(mt){var ii;if(mt){var si="oninput"in document;if(!si){var ai=document.createElement("div");ai.setAttribute("oninput","return;"),si="function"==typeof ai.oninput}ii=si}else ii=!1;oi=ii&&(!document.documentMode||9<document.documentMode)}function li(){Zo&&(Zo.detachEvent("onpropertychange",ci),ei=Zo=null)}function ci(e){if("value"===e.propertyName&&ni(ei)){var t=[];Xo(t,ei,e,Nn(e)),zn(ti,t)}}function ui(e,t,n){"focusin"===e?(li(),ei=n,(Zo=t).attachEvent("onpropertychange",ci)):"focusout"===e&&li()}function di(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ni(ei)}function fi(e,t){if("click"===e)return ni(t)}function pi(e,t){if("input"===e||"change"===e)return ni(t)}var hi="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function vi(e,t){if(hi(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!gt.call(t,o)||!hi(e[o],t[o]))return!1}return!0}function mi(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gi(e,t){var n,r=mi(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=mi(r)}}function yi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?yi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function bi(){for(var e=window,t=en();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=en((e=t.contentWindow).document)}return t}function wi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function xi(e){var t=bi(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&yi(n.ownerDocument.documentElement,n)){if(null!==r&&wi(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=gi(n,i);var s=gi(n,r);o&&s&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ki=mt&&"documentMode"in document&&11>=document.documentMode,Ei=null,Si=null,Ci=null,_i=!1;function Ai(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;_i||null==Ei||Ei!==en(r)||("selectionStart"in(r=Ei)&&wi(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Ci&&vi(Ci,r)||(Ci=r,0<(r=Zi(Si,"onSelect")).length&&(t=new go("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ei)))}function Ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pi={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionend:Ni("Transition","TransitionEnd")},ji={},$i={};function Oi(e){if(ji[e])return ji[e];if(!Pi[e])return e;var t,n=Pi[e];for(t in n)if(n.hasOwnProperty(t)&&t in $i)return ji[e]=n[t];return e}mt&&($i=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);var Ri=Oi("animationend"),Mi=Oi("animationiteration"),Ti=Oi("animationstart"),Li=Oi("transitionend"),Ii=new Map,zi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Di(e,t){Ii.set(e,t),ht(t,[e])}for(var Bi=0;Bi<zi.length;Bi++){var Ui=zi[Bi];Di(Ui.toLowerCase(),"on"+(Ui[0].toUpperCase()+Ui.slice(1)))}Di(Ri,"onAnimationEnd"),Di(Mi,"onAnimationIteration"),Di(Ti,"onAnimationStart"),Di("dblclick","onDoubleClick"),Di("focusin","onFocus"),Di("focusout","onBlur"),Di(Li,"onTransitionEnd"),vt("onMouseEnter",["mouseout","mouseover"]),vt("onMouseLeave",["mouseout","mouseover"]),vt("onPointerEnter",["pointerout","pointerover"]),vt("onPointerLeave",["pointerout","pointerover"]),ht("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ht("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ht("onBeforeInput",["compositionend","keypress","textInput","paste"]),ht("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ht("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ht("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Hi=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fi));function Vi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,a,l){if(Yn.apply(this,arguments),Hn){if(!Hn)throw Error(dt(198));var c=Vn;Hn=!1,Vn=null,Wn||(Wn=!0,qn=c)}}(r,t,void 0,e),e.currentTarget=null}function Wi(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;Vi(o,a,c),i=l}else for(s=0;s<r.length;s++){if(l=(a=r[s]).instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Vi(o,a,c),i=l}}}if(Wn)throw e=qn,Wn=!1,qn=null,e}function qi(e,t){var n=t[ks];void 0===n&&(n=t[ks]=new Set);var r=e+"__bubble";n.has(r)||(Gi(t,e,2,!1),n.add(r))}function Ki(e,t,n){var r=0;t&&(r|=4),Gi(n,e,r,t)}var Yi="_reactListening"+Math.random().toString(36).slice(2);function Qi(e){if(!e[Yi]){e[Yi]=!0,ft.forEach((function(t){"selectionchange"!==t&&(Hi.has(t)||Ki(t,!1,e),Ki(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Yi]||(t[Yi]=!0,Ki("selectionchange",!1,t))}}function Gi(e,t,n,r){switch(ro(t)){case 1:var o=Xr;break;case 4:o=Zr;break;default:o=eo}n=o.bind(null,t,n,e),o=void 0,!Bn||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ji(e,t,n,r,o){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===o||8===a.nodeType&&a.parentNode===o)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;s=s.return}for(;null!==a;){if(null===(s=Cs(a)))return;if(5===(l=s.tag)||6===l){r=i=s;continue e}a=a.parentNode}}r=r.return}zn((function(){var r=i,o=Nn(n),s=[];e:{var a=Ii.get(e);if(void 0!==a){var l=go,c=e;switch(e){case"keypress":if(0===lo(n))break e;case"keydown":case"keyup":l=Mo;break;case"focusin":c="focus",l=Eo;break;case"focusout":c="blur",l=Eo;break;case"beforeblur":case"afterblur":l=Eo;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=xo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=ko;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Lo;break;case Ri:case Mi:case Ti:l=So;break;case Li:l=Io;break;case"scroll":l=bo;break;case"wheel":l=Do;break;case"copy":case"cut":case"paste":l=_o;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=To}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==a?a+"Capture":null:a;u=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==f&&(null!=(v=Dn(h,f))&&u.push(Xi(h,v,p)))),d)break;h=h.return}0<u.length&&(a=new l(a,c,null,n,o),s.push({event:a,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===An||!(c=n.relatedTarget||n.fromElement)||!Cs(c)&&!c[xs])&&(l||a)&&(a=o.window===o?o:(a=o.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Cs(c):null)&&(c!==(d=Qn(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=xo,v="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=To,v="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?a:As(l),p=null==c?a:As(c),(a=new u(v,h+"leave",l,n,o)).target=d,a.relatedTarget=p,v=null,Cs(o)===r&&((u=new u(f,h+"enter",c,n,o)).target=p,u.relatedTarget=d,v=u),d=v,l&&c)e:{for(f=c,h=0,p=u=l;p;p=es(p))h++;for(p=0,v=f;v;v=es(v))p++;for(;0<h-p;)u=es(u),h--;for(;0<p-h;)f=es(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=es(u),f=es(f)}u=null}else u=null;null!==l&&ts(s,a,l,u,!1),null!==c&&null!==d&&ts(s,d,c,u,!0)}if("select"===(l=(a=r?As(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var m=ri;else if(Jo(a))if(oi)m=pi;else{m=di;var g=ui}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(m=fi);switch(m&&(m=m(e,r))?Xo(s,m,n,o):(g&&g(e,a,r),"focusout"===e&&(g=a._wrapperState)&&g.controlled&&"number"===a.type&&an(a,"number",a.value)),g=r?As(r):window,e){case"focusin":(Jo(g)||"true"===g.contentEditable)&&(Ei=g,Si=r,Ci=null);break;case"focusout":Ci=Si=Ei=null;break;case"mousedown":_i=!0;break;case"contextmenu":case"mouseup":case"dragend":_i=!1,Ai(s,n,o);break;case"selectionchange":if(ki)break;case"keydown":case"keyup":Ai(s,n,o)}var y;if(Uo)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Qo?Ko(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Vo&&"ko"!==n.locale&&(Qo||"onCompositionStart"!==b?"onCompositionEnd"===b&&Qo&&(y=ao()):(io="value"in(oo=o)?oo.value:oo.textContent,Qo=!0)),0<(g=Zi(r,b)).length&&(b=new Ao(b,e,null,n,o),s.push({event:b,listeners:g}),y?b.data=y:null!==(y=Yo(n))&&(b.data=y))),(y=Ho?function(e,t){switch(e){case"compositionend":return Yo(t);case"keypress":return 32!==t.which?null:(qo=!0,Wo);case"textInput":return(e=t.data)===Wo&&qo?null:e;default:return null}}(e,n):function(e,t){if(Qo)return"compositionend"===e||!Uo&&Ko(e,t)?(e=ao(),so=io=oo=null,Qo=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Vo&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Zi(r,"onBeforeInput")).length&&(o=new Ao("onBeforeInput","beforeinput",null,n,o),s.push({event:o,listeners:r}),o.data=y))}Wi(s,t)}))}function Xi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zi(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Dn(e,n))&&r.unshift(Xi(e,i,o)),null!=(i=Dn(e,t))&&r.push(Xi(e,i,o))),e=e.return}return r}function es(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function ts(e,t,n,r,o){for(var i=t._reactName,s=[];null!==n&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===r)break;5===a.tag&&null!==c&&(a=c,o?null!=(l=Dn(n,i))&&s.unshift(Xi(n,l,a)):o||null!=(l=Dn(n,i))&&s.push(Xi(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var ns=/\r\n?/g,rs=/\u0000|\uFFFD/g;function os(e){return("string"==typeof e?e:""+e).replace(ns,"\n").replace(rs,"")}function is(e,t,n){if(t=os(t),os(e)!==t&&n)throw Error(dt(425))}function ss(){}var as=null,ls=null;function cs(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var us="function"==typeof setTimeout?setTimeout:void 0,ds="function"==typeof clearTimeout?clearTimeout:void 0,fs="function"==typeof Promise?Promise:void 0,ps="function"==typeof queueMicrotask?queueMicrotask:void 0!==fs?function(e){return fs.resolve(null).then(e).catch(hs)}:us;function hs(e){setTimeout((function(){throw e}))}function vs(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Qr(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Qr(t)}function ms(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function gs(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ys=Math.random().toString(36).slice(2),bs="__reactFiber$"+ys,ws="__reactProps$"+ys,xs="__reactContainer$"+ys,ks="__reactEvents$"+ys,Es="__reactListeners$"+ys,Ss="__reactHandles$"+ys;function Cs(e){var t=e[bs];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xs]||n[bs]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=gs(e);null!==e;){if(n=e[bs])return n;e=gs(e)}return t}n=(e=n).parentNode}return null}function _s(e){return!(e=e[bs]||e[xs])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function As(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(dt(33))}function Ns(e){return e[ws]||null}var Ps=[],js=-1;function $s(e){return{current:e}}function Os(e){0>js||(e.current=Ps[js],Ps[js]=null,js--)}function Rs(e,t){js++,Ps[js]=e.current,e.current=t}var Ms={},Ts=$s(Ms),Ls=$s(!1),Is=Ms;function zs(e,t){var n=e.type.contextTypes;if(!n)return Ms;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ds(e){return null!=(e=e.childContextTypes)}function Bs(){Os(Ls),Os(Ts)}function Us(e,t,n){if(Ts.current!==Ms)throw Error(dt(168));Rs(Ts,t),Rs(Ls,n)}function Fs(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(dt(108,Qt(e)||"Unknown",o));return Ht({},n,r)}function Hs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ms,Is=Ts.current,Rs(Ts,e),Rs(Ls,Ls.current),!0}function Vs(e,t,n){var r=e.stateNode;if(!r)throw Error(dt(169));n?(e=Fs(e,t,Is),r.__reactInternalMemoizedMergedChildContext=e,Os(Ls),Os(Ts),Rs(Ts,e)):Os(Ls),Rs(Ls,n)}var Ws=null,qs=!1,Ks=!1;function Ys(e){null===Ws?Ws=[e]:Ws.push(e)}function Qs(){if(!Ks&&null!==Ws){Ks=!0;var e=0,t=_r;try{var n=Ws;for(_r=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ws=null,qs=!1}catch(o){throw null!==Ws&&(Ws=Ws.slice(e+1)),er(sr,Qs),o}finally{_r=t,Ks=!1}}return null}var Gs=[],Js=0,Xs=null,Zs=0,ea=[],ta=0,na=null,ra=1,oa="";function ia(e,t){Gs[Js++]=Zs,Gs[Js++]=Xs,Xs=e,Zs=t}function sa(e,t,n){ea[ta++]=ra,ea[ta++]=oa,ea[ta++]=na,na=e;var r=ra;e=oa;var o=32-pr(r)-1;r&=~(1<<o),n+=1;var i=32-pr(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,ra=1<<32-pr(t)+o|n<<o|r,oa=i+e}else ra=1<<i|n<<o|r,oa=e}function aa(e){null!==e.return&&(ia(e,1),sa(e,1,0))}function la(e){for(;e===Xs;)Xs=Gs[--Js],Gs[Js]=null,Zs=Gs[--Js],Gs[Js]=null;for(;e===na;)na=ea[--ta],ea[ta]=null,oa=ea[--ta],ea[ta]=null,ra=ea[--ta],ea[ta]=null}var ca=null,ua=null,da=!1,fa=null;function pa(e,t){var n=Id(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ha(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ca=e,ua=ms(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ca=e,ua=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==na?{id:ra,overflow:oa}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Id(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ca=e,ua=null,!0);default:return!1}}function va(e){return!(!(1&e.mode)||128&e.flags)}function ma(e){if(da){var t=ua;if(t){var n=t;if(!ha(e,t)){if(va(e))throw Error(dt(418));t=ms(n.nextSibling);var r=ca;t&&ha(e,t)?pa(r,n):(e.flags=-4097&e.flags|2,da=!1,ca=e)}}else{if(va(e))throw Error(dt(418));e.flags=-4097&e.flags|2,da=!1,ca=e}}}function ga(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ca=e}function ya(e){if(e!==ca)return!1;if(!da)return ga(e),da=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!cs(e.type,e.memoizedProps)),t&&(t=ua)){if(va(e))throw ba(),Error(dt(418));for(;t;)pa(e,t),t=ms(t.nextSibling)}if(ga(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(dt(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ua=ms(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ua=null}}else ua=ca?ms(e.stateNode.nextSibling):null;return!0}function ba(){for(var e=ua;e;)e=ms(e.nextSibling)}function wa(){ua=ca=null,da=!1}function xa(e){null===fa?fa=[e]:fa.push(e)}var ka=_t.ReactCurrentBatchConfig;function Ea(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(dt(309));var r=n.stateNode}if(!r)throw Error(dt(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs;null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(dt(284));if(!n._owner)throw Error(dt(290,e))}return e}function Sa(e,t){throw e=Object.prototype.toString.call(t),Error(dt(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ca(e){return(0,e._init)(e._payload)}function _a(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Dd(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function a(e,t,n,r){return null===t||6!==t.tag?((t=Hd(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var i=n.type;return i===Pt?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===zt&&Ca(i)===t.type)?((r=o(t,n.props)).ref=Ea(e,t,n),r.return=e,r):((r=Bd(n.type,n.key,n.props,null,e.mode,r)).ref=Ea(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Vd(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function u(e,t,n,r,i){return null===t||7!==t.tag?((t=Ud(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Hd(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case At:return(n=Bd(t.type,t.key,t.props,null,e.mode,n)).ref=Ea(e,null,t),n.return=e,n;case Nt:return(t=Vd(t,e.mode,n)).return=e,t;case zt:return d(e,(0,t._init)(t._payload),n)}if(ln(t)||Ut(t))return(t=Ud(t,e.mode,n,null)).return=e,t;Sa(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:a(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case At:return n.key===o?l(e,t,n,r):null;case Nt:return n.key===o?c(e,t,n,r):null;case zt:return f(e,t,(o=n._init)(n._payload),r)}if(ln(n)||Ut(n))return null!==o?null:u(e,t,n,r,null);Sa(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return a(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case At:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Nt:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case zt:return p(e,t,n,(0,r._init)(r._payload),o)}if(ln(r)||Ut(r))return u(t,e=e.get(n)||null,r,o,null);Sa(t,r)}return null}return function a(l,c,u,h){if("object"==typeof u&&null!==u&&u.type===Pt&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case At:e:{for(var v=u.key,m=c;null!==m;){if(m.key===v){if((v=u.type)===Pt){if(7===m.tag){n(l,m.sibling),(c=o(m,u.props.children)).return=l,l=c;break e}}else if(m.elementType===v||"object"==typeof v&&null!==v&&v.$$typeof===zt&&Ca(v)===m.type){n(l,m.sibling),(c=o(m,u.props)).ref=Ea(l,m,u),c.return=l,l=c;break e}n(l,m);break}t(l,m),m=m.sibling}u.type===Pt?((c=Ud(u.props.children,l.mode,h,u.key)).return=l,l=c):((h=Bd(u.type,u.key,u.props,null,l.mode,h)).ref=Ea(l,c,u),h.return=l,l=h)}return s(l);case Nt:e:{for(m=u.key;null!==c;){if(c.key===m){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(c=o(c,u.children||[])).return=l,l=c;break e}n(l,c);break}t(l,c),c=c.sibling}(c=Vd(u,l.mode,h)).return=l,l=c}return s(l);case zt:return a(l,c,(m=u._init)(u._payload),h)}if(ln(u))return function(o,s,a,l){for(var c=null,u=null,h=s,v=s=0,m=null;null!==h&&v<a.length;v++){h.index>v?(m=h,h=null):m=h.sibling;var g=f(o,h,a[v],l);if(null===g){null===h&&(h=m);break}e&&h&&null===g.alternate&&t(o,h),s=i(g,s,v),null===u?c=g:u.sibling=g,u=g,h=m}if(v===a.length)return n(o,h),da&&ia(o,v),c;if(null===h){for(;v<a.length;v++)null!==(h=d(o,a[v],l))&&(s=i(h,s,v),null===u?c=h:u.sibling=h,u=h);return da&&ia(o,v),c}for(h=r(o,h);v<a.length;v++)null!==(m=p(h,o,v,a[v],l))&&(e&&null!==m.alternate&&h.delete(null===m.key?v:m.key),s=i(m,s,v),null===u?c=m:u.sibling=m,u=m);return e&&h.forEach((function(e){return t(o,e)})),da&&ia(o,v),c}(l,c,u,h);if(Ut(u))return function(o,s,a,l){var c=Ut(a);if("function"!=typeof c)throw Error(dt(150));if(null==(a=c.call(a)))throw Error(dt(151));for(var u=c=null,h=s,v=s=0,m=null,g=a.next();null!==h&&!g.done;v++,g=a.next()){h.index>v?(m=h,h=null):m=h.sibling;var y=f(o,h,g.value,l);if(null===y){null===h&&(h=m);break}e&&h&&null===y.alternate&&t(o,h),s=i(y,s,v),null===u?c=y:u.sibling=y,u=y,h=m}if(g.done)return n(o,h),da&&ia(o,v),c;if(null===h){for(;!g.done;v++,g=a.next())null!==(g=d(o,g.value,l))&&(s=i(g,s,v),null===u?c=g:u.sibling=g,u=g);return da&&ia(o,v),c}for(h=r(o,h);!g.done;v++,g=a.next())null!==(g=p(h,o,v,g.value,l))&&(e&&null!==g.alternate&&h.delete(null===g.key?v:g.key),s=i(g,s,v),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach((function(e){return t(o,e)})),da&&ia(o,v),c}(l,c,u,h);Sa(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(c=o(c,u)).return=l,l=c):(n(l,c),(c=Hd(u,l.mode,h)).return=l,l=c),s(l)):n(l,c)}}var Aa=_a(!0),Na=_a(!1),Pa=$s(null),ja=null,$a=null,Oa=null;function Ra(){Oa=$a=ja=null}function Ma(e){var t=Pa.current;Os(Pa),e._currentValue=t}function Ta(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function La(e,t){ja=e,Oa=$a=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(Cc=!0),e.firstContext=null)}function Ia(e){var t=e._currentValue;if(Oa!==e)if(e={context:e,memoizedValue:t,next:null},null===$a){if(null===ja)throw Error(dt(308));$a=e,ja.dependencies={lanes:0,firstContext:e}}else $a=$a.next=e;return t}var za=null;function Da(e){null===za?za=[e]:za.push(e)}function Ba(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Da(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ua(e,r)}function Ua(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Fa=!1;function Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Wa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Mu){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ua(e,n)}return null===(o=r.interleaved)?(t.next=t,Da(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ua(e,n)}function Ka(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Cr(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=s:i=i.next=s,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qa(e,t,n,r){var o=e.updateQueue;Fa=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(null!==a){o.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?i=c:s.next=c,s=l;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(s=0,u=c=l=null,a=i;;){var f=a.lane,p=a.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(f=t,p=n,v.tag){case 1:if("function"==typeof(h=v.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=v.payload)?h.call(p,d,f):h))break e;d=Ht({},d,f);break e;case 2:Fa=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,s|=f;if(null===(a=a.next)){if(null===(a=o.shared.pending))break;a=(f=a).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{s|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Fu|=s,e.lanes=s,e.memoizedState=d}}function Ga(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(dt(191,o));o.call(r)}}}var Ja={},Xa=$s(Ja),Za=$s(Ja),el=$s(Ja);function tl(e){if(e===Ja)throw Error(dt(174));return e}function nl(e,t){switch(Rs(el,t),Rs(Za,e),Rs(Xa,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vn(null,"");break;default:t=vn(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Os(Xa),Rs(Xa,t)}function rl(){Os(Xa),Os(Za),Os(el)}function ol(e){tl(el.current);var t=tl(Xa.current),n=vn(t,e.type);t!==n&&(Rs(Za,e),Rs(Xa,n))}function il(e){Za.current===e&&(Os(Xa),Os(Za))}var sl=$s(0);function al(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ll=[];function cl(){for(var e=0;e<ll.length;e++)ll[e]._workInProgressVersionPrimary=null;ll.length=0}var ul=_t.ReactCurrentDispatcher,dl=_t.ReactCurrentBatchConfig,fl=0,pl=null,hl=null,vl=null,ml=!1,gl=!1,yl=0,bl=0;function wl(){throw Error(dt(321))}function xl(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hi(e[n],t[n]))return!1;return!0}function kl(e,t,n,r,o,i){if(fl=i,pl=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ul.current=null===e||null===e.memoizedState?ic:sc,e=n(r,o),gl){i=0;do{if(gl=!1,yl=0,25<=i)throw Error(dt(301));i+=1,vl=hl=null,t.updateQueue=null,ul.current=ac,e=n(r,o)}while(gl)}if(ul.current=oc,t=null!==hl&&null!==hl.next,fl=0,vl=hl=pl=null,ml=!1,t)throw Error(dt(300));return e}function El(){var e=0!==yl;return yl=0,e}function Sl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vl?pl.memoizedState=vl=e:vl=vl.next=e,vl}function Cl(){if(null===hl){var e=pl.alternate;e=null!==e?e.memoizedState:null}else e=hl.next;var t=null===vl?pl.memoizedState:vl.next;if(null!==t)vl=t,hl=e;else{if(null===e)throw Error(dt(310));e={memoizedState:(hl=e).memoizedState,baseState:hl.baseState,baseQueue:hl.baseQueue,queue:hl.queue,next:null},null===vl?pl.memoizedState=vl=e:vl=vl.next=e}return vl}function _l(e,t){return"function"==typeof t?t(e):t}function Al(e){var t=Cl(),n=t.queue;if(null===n)throw Error(dt(311));n.lastRenderedReducer=e;var r=hl,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((fl&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(a=l=d,s=r):l=l.next=d,pl.lanes|=u,Fu|=u}c=c.next}while(null!==c&&c!==i);null===l?s=r:l.next=a,hi(r,t.memoizedState)||(Cc=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,pl.lanes|=i,Fu|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Nl(e){var t=Cl(),n=t.queue;if(null===n)throw Error(dt(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);hi(i,t.memoizedState)||(Cc=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Pl(){}function jl(e,t){var n=pl,r=Cl(),o=t(),i=!hi(r.memoizedState,o);if(i&&(r.memoizedState=o,Cc=!0),r=r.queue,Fl(Rl.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==vl&&1&vl.memoizedState.tag){if(n.flags|=2048,Il(9,Ol.bind(null,n,r,o,t),void 0,null),null===Tu)throw Error(dt(349));30&fl||$l(n,t,o)}return o}function $l(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=pl.updateQueue)?(t={lastEffect:null,stores:null},pl.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ol(e,t,n,r){t.value=n,t.getSnapshot=r,Ml(t)&&Tl(e)}function Rl(e,t,n){return n((function(){Ml(t)&&Tl(e)}))}function Ml(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hi(e,n)}catch(r){return!0}}function Tl(e){var t=Ua(e,1);null!==t&&ld(t,e,1,-1)}function Ll(e){var t=Sl();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_l,lastRenderedState:e},t.queue=e,e=e.dispatch=ec.bind(null,pl,e),[t.memoizedState,e]}function Il(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=pl.updateQueue)?(t={lastEffect:null,stores:null},pl.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function zl(){return Cl().memoizedState}function Dl(e,t,n,r){var o=Sl();pl.flags|=e,o.memoizedState=Il(1|t,n,void 0,void 0===r?null:r)}function Bl(e,t,n,r){var o=Cl();r=void 0===r?null:r;var i=void 0;if(null!==hl){var s=hl.memoizedState;if(i=s.destroy,null!==r&&xl(r,s.deps))return void(o.memoizedState=Il(t,n,i,r))}pl.flags|=e,o.memoizedState=Il(1|t,n,i,r)}function Ul(e,t){return Dl(8390656,8,e,t)}function Fl(e,t){return Bl(2048,8,e,t)}function Hl(e,t){return Bl(4,2,e,t)}function Vl(e,t){return Bl(4,4,e,t)}function Wl(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ql(e,t,n){return n=null!=n?n.concat([e]):null,Bl(4,4,Wl.bind(null,t,e),n)}function Kl(){}function Yl(e,t){var n=Cl();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ql(e,t){var n=Cl();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Gl(e,t,n){return 21&fl?(hi(n,t)||(n=kr(),pl.lanes|=n,Fu|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Cc=!0),e.memoizedState=n)}function Jl(e,t){var n=_r;_r=0!==n&&4>n?n:4,e(!0);var r=dl.transition;dl.transition={};try{e(!1),t()}finally{_r=n,dl.transition=r}}function Xl(){return Cl().memoizedState}function Zl(e,t,n){var r=ad(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},tc(e))nc(t,n);else if(null!==(n=Ba(e,t,n,r))){ld(n,e,r,sd()),rc(n,t,r)}}function ec(e,t,n){var r=ad(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(tc(e))nc(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,hi(a,s)){var l=t.interleaved;return null===l?(o.next=o,Da(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(c){}null!==(n=Ba(e,t,o,r))&&(ld(n,e,r,o=sd()),rc(n,t,r))}}function tc(e){var t=e.alternate;return e===pl||null!==t&&t===pl}function nc(e,t){gl=ml=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rc(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Cr(e,n)}}var oc={readContext:Ia,useCallback:wl,useContext:wl,useEffect:wl,useImperativeHandle:wl,useInsertionEffect:wl,useLayoutEffect:wl,useMemo:wl,useReducer:wl,useRef:wl,useState:wl,useDebugValue:wl,useDeferredValue:wl,useTransition:wl,useMutableSource:wl,useSyncExternalStore:wl,useId:wl,unstable_isNewReconciler:!1},ic={readContext:Ia,useCallback:function(e,t){return Sl().memoizedState=[e,void 0===t?null:t],e},useContext:Ia,useEffect:Ul,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Dl(4194308,4,Wl.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dl(4,2,e,t)},useMemo:function(e,t){var n=Sl();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Sl();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Zl.bind(null,pl,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Sl().memoizedState=e},useState:Ll,useDebugValue:Kl,useDeferredValue:function(e){return Sl().memoizedState=e},useTransition:function(){var e=Ll(!1),t=e[0];return e=Jl.bind(null,e[1]),Sl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pl,o=Sl();if(da){if(void 0===n)throw Error(dt(407));n=n()}else{if(n=t(),null===Tu)throw Error(dt(349));30&fl||$l(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ul(Rl.bind(null,r,i,e),[e]),r.flags|=2048,Il(9,Ol.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Sl(),t=Tu.identifierPrefix;if(da){var n=oa;t=":"+t+"R"+(n=(ra&~(1<<32-pr(ra)-1)).toString(32)+n),0<(n=yl++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=bl++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sc={readContext:Ia,useCallback:Yl,useContext:Ia,useEffect:Fl,useImperativeHandle:ql,useInsertionEffect:Hl,useLayoutEffect:Vl,useMemo:Ql,useReducer:Al,useRef:zl,useState:function(){return Al(_l)},useDebugValue:Kl,useDeferredValue:function(e){return Gl(Cl(),hl.memoizedState,e)},useTransition:function(){return[Al(_l)[0],Cl().memoizedState]},useMutableSource:Pl,useSyncExternalStore:jl,useId:Xl,unstable_isNewReconciler:!1},ac={readContext:Ia,useCallback:Yl,useContext:Ia,useEffect:Fl,useImperativeHandle:ql,useInsertionEffect:Hl,useLayoutEffect:Vl,useMemo:Ql,useReducer:Nl,useRef:zl,useState:function(){return Nl(_l)},useDebugValue:Kl,useDeferredValue:function(e){var t=Cl();return null===hl?t.memoizedState=e:Gl(t,hl.memoizedState,e)},useTransition:function(){return[Nl(_l)[0],Cl().memoizedState]},useMutableSource:Pl,useSyncExternalStore:jl,useId:Xl,unstable_isNewReconciler:!1};function lc(e,t){if(e&&e.defaultProps){for(var n in t=Ht({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function cc(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Ht({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var uc={isMounted:function(e){return!!(e=e._reactInternals)&&Qn(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=sd(),o=ad(e),i=Wa(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=qa(e,i,o))&&(ld(t,e,o,r),Ka(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=sd(),o=ad(e),i=Wa(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=qa(e,i,o))&&(ld(t,e,o,r),Ka(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=sd(),r=ad(e),o=Wa(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=qa(e,o,r))&&(ld(t,e,r,n),Ka(t,e,r))}};function dc(e,t,n,r,o,i,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,s):!t.prototype||!t.prototype.isPureReactComponent||(!vi(n,r)||!vi(o,i))}function fc(e,t,n){var r=!1,o=Ms,i=t.contextType;return"object"==typeof i&&null!==i?i=Ia(i):(o=Ds(t)?Is:Ts.current,i=(r=null!=(r=t.contextTypes))?zs(e,o):Ms),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=uc,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function pc(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&uc.enqueueReplaceState(t,t.state,null)}function hc(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ha(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=Ia(i):(i=Ds(t)?Is:Ts.current,o.context=zs(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(cc(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&uc.enqueueReplaceState(o,o.state,null),Qa(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function vc(e,t){try{var n="",r=t;do{n+=Kt(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function mc(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function gc(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var yc="function"==typeof WeakMap?WeakMap:Map;function bc(e,t,n){(n=Wa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gu||(Gu=!0,Ju=r),gc(0,t)},n}function wc(e,t,n){(n=Wa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){gc(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){gc(0,t),"function"!=typeof r&&(null===Xu?Xu=new Set([this]):Xu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function xc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new yc;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=$d.bind(null,e,t,n),t.then(e,e))}function kc(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ec(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Wa(-1,1)).tag=2,qa(n,t,1))),n.lanes|=1),e)}var Sc=_t.ReactCurrentOwner,Cc=!1;function _c(e,t,n,r){t.child=null===e?Na(t,null,n,r):Aa(t,e.child,n,r)}function Ac(e,t,n,r,o){n=n.render;var i=t.ref;return La(t,o),r=kl(e,t,n,r,i,o),n=El(),null===e||Cc?(da&&n&&aa(t),t.flags|=1,_c(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gc(e,t,o))}function Nc(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||zd(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Bd(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Pc(e,t,i,r,o))}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if((n=null!==(n=n.compare)?n:vi)(s,r)&&e.ref===t.ref)return Gc(e,t,o)}return t.flags|=1,(e=Dd(i,r)).ref=t.ref,e.return=t,t.child=e}function Pc(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(vi(i,r)&&e.ref===t.ref){if(Cc=!1,t.pendingProps=r=i,!(e.lanes&o))return t.lanes=e.lanes,Gc(e,t,o);131072&e.flags&&(Cc=!0)}}return Oc(e,t,n,r,o)}function jc(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Rs(Du,zu),zu|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Rs(Du,zu),zu|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rs(Du,zu),zu|=n;else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Rs(Du,zu),zu|=r;return _c(e,t,o,n),t.child}function $c(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Oc(e,t,n,r,o){var i=Ds(n)?Is:Ts.current;return i=zs(t,i),La(t,o),n=kl(e,t,n,r,i,o),r=El(),null===e||Cc?(da&&r&&aa(t),t.flags|=1,_c(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gc(e,t,o))}function Rc(e,t,n,r,o){if(Ds(n)){var i=!0;Hs(t)}else i=!1;if(La(t,o),null===t.stateNode)Qc(e,t),fc(t,n,r),hc(t,n,r,o),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"==typeof c&&null!==c?c=Ia(c):c=zs(t,c=Ds(n)?Is:Ts.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==c)&&pc(t,s,r,c),Fa=!1;var f=t.memoizedState;s.state=f,Qa(t,r,s,o),l=t.memoizedState,a!==r||f!==l||Ls.current||Fa?("function"==typeof u&&(cc(t,n,u,r),l=t.memoizedState),(a=Fa||dc(t,n,a,r,f,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Va(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:lc(t.type,a),s.props=c,d=t.pendingProps,f=s.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ia(l):l=zs(t,l=Ds(n)?Is:Ts.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||f!==l)&&pc(t,s,r,l),Fa=!1,f=t.memoizedState,s.state=f,Qa(t,r,s,o);var h=t.memoizedState;a!==d||f!==h||Ls.current||Fa?("function"==typeof p&&(cc(t,n,p,r),h=t.memoizedState),(c=Fa||dc(t,n,c,r,f,h,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,h,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),s.props=r,s.state=h,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Mc(e,t,n,r,i,o)}function Mc(e,t,n,r,o,i){$c(e,t);var s=!!(128&t.flags);if(!r&&!s)return o&&Vs(t,n,!1),Gc(e,t,i);r=t.stateNode,Sc.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,a,i)):_c(e,t,a,i),t.memoizedState=r.state,o&&Vs(t,n,!0),t.child}function Tc(e){var t=e.stateNode;t.pendingContext?Us(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Us(0,t.context,!1),nl(e,t.containerInfo)}function Lc(e,t,n,r,o){return wa(),xa(o),t.flags|=256,_c(e,t,n,r),t.child}var Ic,zc,Dc,Bc,Uc={dehydrated:null,treeContext:null,retryLane:0};function Fc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hc(e,t,n){var r,o=t.pendingProps,i=sl.current,s=!1,a=!!(128&t.flags);if((r=a)||(r=(null===e||null!==e.memoizedState)&&!!(2&i)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Rs(sl,1&i),null===e)return ma(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=o.children,e=o.fallback,s?(o=t.mode,s=t.child,a={mode:"hidden",children:a},1&o||null===s?s=Fd(a,o,0,null):(s.childLanes=0,s.pendingProps=a),e=Ud(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Fc(n),t.memoizedState=Uc,e):Vc(t,a));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,s){if(n)return 256&t.flags?(t.flags&=-257,Wc(e,t,s,r=mc(Error(dt(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Fd({mode:"visible",children:r.children},o,0,null),(i=Ud(i,o,s,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,1&t.mode&&Aa(t,e.child,null,s),t.child.memoizedState=Fc(s),t.memoizedState=Uc,i);if(!(1&t.mode))return Wc(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var a=r.dgst;return r=a,Wc(e,t,s,r=mc(i=Error(dt(419)),r,void 0))}if(a=!!(s&e.childLanes),Cc||a){if(null!==(r=Tu)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=o&(r.suspendedLanes|s)?0:o)&&o!==i.retryLane&&(i.retryLane=o,Ua(e,o),ld(r,e,o,-1))}return xd(),Wc(e,t,s,r=mc(Error(dt(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Rd.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,ua=ms(o.nextSibling),ca=t,da=!0,fa=null,null!==e&&(ea[ta++]=ra,ea[ta++]=oa,ea[ta++]=na,ra=e.id,oa=e.overflow,na=t),t=Vc(t,r.children),t.flags|=4096,t)}(e,t,a,o,r,i,n);if(s){s=o.fallback,a=t.mode,r=(i=e.child).sibling;var l={mode:"hidden",children:o.children};return 1&a||t.child===i?(o=Dd(i,l)).subtreeFlags=14680064&i.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null),null!==r?s=Dd(r,s):(s=Ud(s,a,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,a=null===(a=e.child.memoizedState)?Fc(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=Uc,o}return e=(s=e.child).sibling,o=Dd(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Vc(e,t){return(t=Fd({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Wc(e,t,n,r){return null!==r&&xa(r),Aa(t,e.child,null,n),(e=Vc(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function qc(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ta(e.return,t,n)}function Kc(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Yc(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(_c(e,t,r.children,n),2&(r=sl.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&qc(e,n,t);else if(19===e.tag)qc(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Rs(sl,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===al(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Kc(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===al(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Kc(t,!0,n,null,i);break;case"together":Kc(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Qc(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gc(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fu|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(dt(153));if(null!==t.child){for(n=Dd(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Dd(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Jc(e,t){if(!da)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xc(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zc(e,t,n){var r=t.pendingProps;switch(la(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xc(t),null;case 1:case 17:return Ds(t.type)&&Bs(),Xc(t),null;case 3:return r=t.stateNode,rl(),Os(Ls),Os(Ts),cl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ya(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==fa&&(fd(fa),fa=null))),zc(e,t),Xc(t),null;case 5:il(t);var o=tl(el.current);if(n=t.type,null!==e&&null!=t.stateNode)Dc(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(dt(166));return Xc(t),null}if(e=tl(Xa.current),ya(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[bs]=t,r[ws]=i,e=!!(1&t.mode),n){case"dialog":qi("cancel",r),qi("close",r);break;case"iframe":case"object":case"embed":qi("load",r);break;case"video":case"audio":for(o=0;o<Fi.length;o++)qi(Fi[o],r);break;case"source":qi("error",r);break;case"img":case"image":case"link":qi("error",r),qi("load",r);break;case"details":qi("toggle",r);break;case"input":nn(r,i),qi("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},qi("invalid",r);break;case"textarea":dn(r,i),qi("invalid",r)}for(var s in Cn(n,i),o=null,i)if(i.hasOwnProperty(s)){var a=i[s];"children"===s?"string"==typeof a?r.textContent!==a&&(!0!==i.suppressHydrationWarning&&is(r.textContent,a,e),o=["children",a]):"number"==typeof a&&r.textContent!==""+a&&(!0!==i.suppressHydrationWarning&&is(r.textContent,a,e),o=["children",""+a]):pt.hasOwnProperty(s)&&null!=a&&"onScroll"===s&&qi("scroll",r)}switch(n){case"input":Xt(r),sn(r,i,!0);break;case"textarea":Xt(r),pn(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=ss)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{s=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=hn(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[bs]=t,e[ws]=r,Ic(e,t,!1,!1),t.stateNode=e;e:{switch(s=_n(n,r),n){case"dialog":qi("cancel",e),qi("close",e),o=r;break;case"iframe":case"object":case"embed":qi("load",e),o=r;break;case"video":case"audio":for(o=0;o<Fi.length;o++)qi(Fi[o],e);o=r;break;case"source":qi("error",e),o=r;break;case"img":case"image":case"link":qi("error",e),qi("load",e),o=r;break;case"details":qi("toggle",e),o=r;break;case"input":nn(e,r),o=tn(e,r),qi("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ht({},r,{value:void 0}),qi("invalid",e);break;case"textarea":dn(e,r),o=un(e,r),qi("invalid",e)}for(i in Cn(n,o),a=o)if(a.hasOwnProperty(i)){var l=a[i];"style"===i?En(e,l):"dangerouslySetInnerHTML"===i?null!=(l=l?l.__html:void 0)&&yn(e,l):"children"===i?"string"==typeof l?("textarea"!==n||""!==l)&&bn(e,l):"number"==typeof l&&bn(e,""+l):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(pt.hasOwnProperty(i)?null!=l&&"onScroll"===i&&qi("scroll",e):null!=l&&Ct(e,i,l,s))}switch(n){case"input":Xt(e),sn(e,r,!1);break;case"textarea":Xt(e),pn(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Gt(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?cn(e,!!r.multiple,i,!1):null!=r.defaultValue&&cn(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=ss)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Xc(t),null;case 6:if(e&&null!=t.stateNode)Bc(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(dt(166));if(n=tl(el.current),tl(Xa.current),ya(t)){if(r=t.stateNode,n=t.memoizedProps,r[bs]=t,(i=r.nodeValue!==n)&&null!==(e=ca))switch(e.tag){case 3:is(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&is(r.nodeValue,n,!!(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[bs]=t,t.stateNode=r}return Xc(t),null;case 13:if(Os(sl),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(da&&null!==ua&&1&t.mode&&!(128&t.flags))ba(),wa(),t.flags|=98560,i=!1;else if(i=ya(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(dt(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(dt(317));i[bs]=t}else wa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Xc(t),i=!1}else null!==fa&&(fd(fa),fa=null),i=!0;if(!i)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&sl.current?0===Bu&&(Bu=3):xd())),null!==t.updateQueue&&(t.flags|=4),Xc(t),null);case 4:return rl(),zc(e,t),null===e&&Qi(t.stateNode.containerInfo),Xc(t),null;case 10:return Ma(t.type._context),Xc(t),null;case 19:if(Os(sl),null===(i=t.memoizedState))return Xc(t),null;if(r=!!(128&t.flags),null===(s=i.rendering))if(r)Jc(i,!1);else{if(0!==Bu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(s=al(e))){for(t.flags|=128,Jc(i,!1),null!==(r=s.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(s=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Rs(sl,1&sl.current|2),t.child}e=e.sibling}null!==i.tail&&or()>Yu&&(t.flags|=128,r=!0,Jc(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=al(s))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Jc(i,!0),null===i.tail&&"hidden"===i.tailMode&&!s.alternate&&!da)return Xc(t),null}else 2*or()-i.renderingStartTime>Yu&&1073741824!==n&&(t.flags|=128,r=!0,Jc(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=i.last)?n.sibling=s:t.child=s,i.last=s)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=or(),t.sibling=null,n=sl.current,Rs(sl,r?1&n|2:1&n),t):(Xc(t),null);case 22:case 23:return gd(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&zu)&&(Xc(t),6&t.subtreeFlags&&(t.flags|=8192)):Xc(t),null;case 24:case 25:return null}throw Error(dt(156,t.tag))}function eu(e,t){switch(la(t),t.tag){case 1:return Ds(t.type)&&Bs(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return rl(),Os(Ls),Os(Ts),cl(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return il(t),null;case 13:if(Os(sl),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(dt(340));wa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Os(sl),null;case 4:return rl(),null;case 10:return Ma(t.type._context),null;case 22:case 23:return gd(),null;default:return null}}Ic=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},zc=function(){},Dc=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,tl(Xa.current);var i,s=null;switch(n){case"input":o=tn(e,o),r=tn(e,r),s=[];break;case"select":o=Ht({},o,{value:void 0}),r=Ht({},r,{value:void 0}),s=[];break;case"textarea":o=un(e,o),r=un(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=ss)}for(c in Cn(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(pt.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(null!=l||null!=a))if("style"===c)if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,a=a?a.__html:void 0,null!=l&&a!==l&&(s=s||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(s=s||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(pt.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&qi("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Bc=function(e,t,n,r){n!==r&&(t.flags|=4)};var tu=!1,nu=!1,ru="function"==typeof WeakSet?WeakSet:Set,ou=null;function iu(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){jd(e,t,r)}else n.current=null}function su(e,t,n){try{n()}catch(r){jd(e,t,r)}}var au=!1;function lu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&su(t,n,i)}o=o.next}while(o!==r)}}function cu(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function uu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function du(e){var t=e.alternate;null!==t&&(e.alternate=null,du(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[bs],delete t[ws],delete t[ks],delete t[Es],delete t[Ss])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function fu(e){return 5===e.tag||3===e.tag||4===e.tag}function pu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||fu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function hu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=ss));else if(4!==r&&null!==(e=e.child))for(hu(e,t,n),e=e.sibling;null!==e;)hu(e,t,n),e=e.sibling}function vu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(vu(e,t,n),e=e.sibling;null!==e;)vu(e,t,n),e=e.sibling}var mu=null,gu=!1;function yu(e,t,n){for(n=n.child;null!==n;)bu(e,t,n),n=n.sibling}function bu(e,t,n){if(fr&&"function"==typeof fr.onCommitFiberUnmount)try{fr.onCommitFiberUnmount(dr,n)}catch(a){}switch(n.tag){case 5:nu||iu(n,t);case 6:var r=mu,o=gu;mu=null,yu(e,t,n),gu=o,null!==(mu=r)&&(gu?(e=mu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):mu.removeChild(n.stateNode));break;case 18:null!==mu&&(gu?(e=mu,n=n.stateNode,8===e.nodeType?vs(e.parentNode,n):1===e.nodeType&&vs(e,n),Qr(e)):vs(mu,n.stateNode));break;case 4:r=mu,o=gu,mu=n.stateNode.containerInfo,gu=!0,yu(e,t,n),mu=r,gu=o;break;case 0:case 11:case 14:case 15:if(!nu&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,void 0!==s&&(2&i||4&i)&&su(n,t,s),o=o.next}while(o!==r)}yu(e,t,n);break;case 1:if(!nu&&(iu(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){jd(n,t,a)}yu(e,t,n);break;case 21:yu(e,t,n);break;case 22:1&n.mode?(nu=(r=nu)||null!==n.memoizedState,yu(e,t,n),nu=r):yu(e,t,n);break;default:yu(e,t,n)}}function wu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ru),t.forEach((function(t){var r=Md.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function xu(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,a=s;e:for(;null!==a;){switch(a.tag){case 5:mu=a.stateNode,gu=!1;break e;case 3:case 4:mu=a.stateNode.containerInfo,gu=!0;break e}a=a.return}if(null===mu)throw Error(dt(160));bu(i,s,o),mu=null,gu=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(c){jd(o,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ku(t,e),t=t.sibling}function ku(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xu(t,e),Eu(e),4&r){try{lu(3,e,e.return),cu(3,e)}catch(v){jd(e,e.return,v)}try{lu(5,e,e.return)}catch(v){jd(e,e.return,v)}}break;case 1:xu(t,e),Eu(e),512&r&&null!==n&&iu(n,n.return);break;case 5:if(xu(t,e),Eu(e),512&r&&null!==n&&iu(n,n.return),32&e.flags){var o=e.stateNode;try{bn(o,"")}catch(v){jd(e,e.return,v)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,s=null!==n?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===a&&"radio"===i.type&&null!=i.name&&rn(o,i),_n(a,s);var c=_n(a,i);for(s=0;s<l.length;s+=2){var u=l[s],d=l[s+1];"style"===u?En(o,d):"dangerouslySetInnerHTML"===u?yn(o,d):"children"===u?bn(o,d):Ct(o,u,d,c)}switch(a){case"input":on(o,i);break;case"textarea":fn(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;null!=p?cn(o,!!i.multiple,p,!1):f!==!!i.multiple&&(null!=i.defaultValue?cn(o,!!i.multiple,i.defaultValue,!0):cn(o,!!i.multiple,i.multiple?[]:"",!1))}o[ws]=i}catch(v){jd(e,e.return,v)}}break;case 6:if(xu(t,e),Eu(e),4&r){if(null===e.stateNode)throw Error(dt(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(v){jd(e,e.return,v)}}break;case 3:if(xu(t,e),Eu(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Qr(t.containerInfo)}catch(v){jd(e,e.return,v)}break;case 4:default:xu(t,e),Eu(e);break;case 13:xu(t,e),Eu(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Ku=or())),4&r&&wu(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(nu=(c=nu)||u,xu(t,e),nu=c):xu(t,e),Eu(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(ou=e,u=e.child;null!==u;){for(d=ou=u;null!==ou;){switch(p=(f=ou).child,f.tag){case 0:case 11:case 14:case 15:lu(4,f,f.return);break;case 1:iu(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(v){jd(r,n,v)}}break;case 5:iu(f,f.return);break;case 22:if(null!==f.memoizedState){Au(d);continue}}null!==p?(p.return=f,ou=p):Au(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{o=d.stateNode,c?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(a=d.stateNode,s=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,a.style.display=kn("display",s))}catch(v){jd(e,e.return,v)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){jd(e,e.return,v)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:xu(t,e),Eu(e),4&r&&wu(e);case 21:}}function Eu(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(fu(n)){var r=n;break e}n=n.return}throw Error(dt(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(bn(o,""),r.flags&=-33),vu(e,pu(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;hu(e,pu(e),i);break;default:throw Error(dt(161))}}catch(s){jd(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Su(e,t,n){ou=e,Cu(e)}function Cu(e,t,n){for(var r=!!(1&e.mode);null!==ou;){var o=ou,i=o.child;if(22===o.tag&&r){var s=null!==o.memoizedState||tu;if(!s){var a=o.alternate,l=null!==a&&null!==a.memoizedState||nu;a=tu;var c=nu;if(tu=s,(nu=l)&&!c)for(ou=o;null!==ou;)l=(s=ou).child,22===s.tag&&null!==s.memoizedState?Nu(o):null!==l?(l.return=s,ou=l):Nu(o);for(;null!==i;)ou=i,Cu(i),i=i.sibling;ou=o,tu=a,nu=c}_u(e)}else 8772&o.subtreeFlags&&null!==i?(i.return=o,ou=i):_u(e)}}function _u(e){for(;null!==ou;){var t=ou;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:nu||cu(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!nu)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:lc(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&Ga(t,i,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ga(t,s,n)}break;case 5:var a=t.stateNode;if(null===n&&4&t.flags){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Qr(d)}}}break;default:throw Error(dt(163))}nu||512&t.flags&&uu(t)}catch(f){jd(t,t.return,f)}}if(t===e){ou=null;break}if(null!==(n=t.sibling)){n.return=t.return,ou=n;break}ou=t.return}}function Au(e){for(;null!==ou;){var t=ou;if(t===e){ou=null;break}var n=t.sibling;if(null!==n){n.return=t.return,ou=n;break}ou=t.return}}function Nu(e){for(;null!==ou;){var t=ou;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{cu(4,t)}catch(l){jd(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){jd(t,o,l)}}var i=t.return;try{uu(t)}catch(l){jd(t,i,l)}break;case 5:var s=t.return;try{uu(t)}catch(l){jd(t,s,l)}}}catch(l){jd(t,t.return,l)}if(t===e){ou=null;break}var a=t.sibling;if(null!==a){a.return=t.return,ou=a;break}ou=t.return}}var Pu,ju=Math.ceil,$u=_t.ReactCurrentDispatcher,Ou=_t.ReactCurrentOwner,Ru=_t.ReactCurrentBatchConfig,Mu=0,Tu=null,Lu=null,Iu=0,zu=0,Du=$s(0),Bu=0,Uu=null,Fu=0,Hu=0,Vu=0,Wu=null,qu=null,Ku=0,Yu=1/0,Qu=null,Gu=!1,Ju=null,Xu=null,Zu=!1,ed=null,td=0,nd=0,rd=null,od=-1,id=0;function sd(){return 6&Mu?or():-1!==od?od:od=or()}function ad(e){return 1&e.mode?2&Mu&&0!==Iu?Iu&-Iu:null!==ka.transition?(0===id&&(id=kr()),id):0!==(e=_r)?e:e=void 0===(e=window.event)?16:ro(e.type):1}function ld(e,t,n,r){if(50<nd)throw nd=0,rd=null,Error(dt(185));Sr(e,n,r),2&Mu&&e===Tu||(e===Tu&&(!(2&Mu)&&(Hu|=n),4===Bu&&pd(e,Iu)),cd(e,r),1===n&&0===Mu&&!(1&t.mode)&&(Yu=or()+500,qs&&Qs()))}function cd(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-pr(i),a=1<<s,l=o[s];-1===l?a&n&&!(a&r)||(o[s]=wr(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}(e,t);var r=br(e,e===Tu?Iu:0);if(0===r)null!==n&&tr(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&tr(n),1===t)0===e.tag?function(e){qs=!0,Ys(e)}(hd.bind(null,e)):Ys(hd.bind(null,e)),ps((function(){!(6&Mu)&&Qs()})),n=null;else{switch(Ar(r)){case 1:n=sr;break;case 4:n=ar;break;case 16:default:n=lr;break;case 536870912:n=ur}n=Td(n,ud.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ud(e,t){if(od=-1,id=0,6&Mu)throw Error(dt(327));var n=e.callbackNode;if(Nd()&&e.callbackNode!==n)return null;var r=br(e,e===Tu?Iu:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=kd(e,r);else{t=r;var o=Mu;Mu|=2;var i=wd();for(Tu===e&&Iu===t||(Qu=null,Yu=or()+500,yd(e,t));;)try{Sd();break}catch(a){bd(e,a)}Ra(),$u.current=i,Mu=o,null!==Lu?t=0:(Tu=null,Iu=0,t=Bu)}if(0!==t){if(2===t&&(0!==(o=xr(e))&&(r=o,t=dd(e,o))),1===t)throw n=Uu,yd(e,0),pd(e,r),cd(e,or()),n;if(6===t)pd(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!hi(i(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=kd(e,r),2===t&&(i=xr(e),0!==i&&(r=i,t=dd(e,i))),1!==t)))throw n=Uu,yd(e,0),pd(e,r),cd(e,or()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(dt(345));case 2:case 5:Ad(e,qu,Qu);break;case 3:if(pd(e,r),(130023424&r)===r&&10<(t=Ku+500-or())){if(0!==br(e,0))break;if(((o=e.suspendedLanes)&r)!==r){sd(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=us(Ad.bind(null,e,qu,Qu),t);break}Ad(e,qu,Qu);break;case 4:if(pd(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-pr(r);i=1<<s,(s=t[s])>o&&(o=s),r&=~i}if(r=o,10<(r=(120>(r=or()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ju(r/1960))-r)){e.timeoutHandle=us(Ad.bind(null,e,qu,Qu),r);break}Ad(e,qu,Qu);break;default:throw Error(dt(329))}}}return cd(e,or()),e.callbackNode===n?ud.bind(null,e):null}function dd(e,t){var n=Wu;return e.current.memoizedState.isDehydrated&&(yd(e,t).flags|=256),2!==(e=kd(e,t))&&(t=qu,qu=n,null!==t&&fd(t)),e}function fd(e){null===qu?qu=e:qu.push.apply(qu,e)}function pd(e,t){for(t&=~Vu,t&=~Hu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pr(t),r=1<<n;e[n]=-1,t&=~r}}function hd(e){if(6&Mu)throw Error(dt(327));Nd();var t=br(e,0);if(!(1&t))return cd(e,or()),null;var n=kd(e,t);if(0!==e.tag&&2===n){var r=xr(e);0!==r&&(t=r,n=dd(e,r))}if(1===n)throw n=Uu,yd(e,0),pd(e,t),cd(e,or()),n;if(6===n)throw Error(dt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ad(e,qu,Qu),cd(e,or()),null}function vd(e,t){var n=Mu;Mu|=1;try{return e(t)}finally{0===(Mu=n)&&(Yu=or()+500,qs&&Qs())}}function md(e){null!==ed&&0===ed.tag&&!(6&Mu)&&Nd();var t=Mu;Mu|=1;var n=Ru.transition,r=_r;try{if(Ru.transition=null,_r=1,e)return e()}finally{_r=r,Ru.transition=n,!(6&(Mu=t))&&Qs()}}function gd(){zu=Du.current,Os(Du)}function yd(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ds(n)),null!==Lu)for(n=Lu.return;null!==n;){var r=n;switch(la(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Bs();break;case 3:rl(),Os(Ls),Os(Ts),cl();break;case 5:il(r);break;case 4:rl();break;case 13:case 19:Os(sl);break;case 10:Ma(r.type._context);break;case 22:case 23:gd()}n=n.return}if(Tu=e,Lu=e=Dd(e.current,null),Iu=zu=t,Bu=0,Uu=null,Vu=Hu=Fu=0,qu=Wu=null,null!==za){for(t=0;t<za.length;t++)if(null!==(r=(n=za[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var s=i.next;i.next=o,r.next=s}n.pending=r}za=null}return e}function bd(e,t){for(;;){var n=Lu;try{if(Ra(),ul.current=oc,ml){for(var r=pl.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ml=!1}if(fl=0,vl=hl=pl=null,gl=!1,yl=0,Ou.current=null,null===n||null===n.return){Bu=1,Uu=t,Lu=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Iu,a.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=a,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=kc(s);if(null!==p){p.flags&=-257,Ec(p,s,a,0,t),1&p.mode&&xc(i,c,t),l=c;var h=(t=p).updateQueue;if(null===h){var v=new Set;v.add(l),t.updateQueue=v}else h.add(l);break e}if(!(1&t)){xc(i,c,t),xd();break e}l=Error(dt(426))}else if(da&&1&a.mode){var m=kc(s);if(null!==m){!(65536&m.flags)&&(m.flags|=256),Ec(m,s,a,0,t),xa(vc(l,a));break e}}i=l=vc(l,a),4!==Bu&&(Bu=2),null===Wu?Wu=[i]:Wu.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Ya(i,bc(0,l,t));break e;case 1:a=l;var g=i.type,y=i.stateNode;if(!(128&i.flags||"function"!=typeof g.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==Xu&&Xu.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t,Ya(i,wc(i,a,t));break e}}i=i.return}while(null!==i)}_d(n)}catch(b){t=b,Lu===n&&null!==n&&(Lu=n=n.return);continue}break}}function wd(){var e=$u.current;return $u.current=oc,null===e?oc:e}function xd(){0!==Bu&&3!==Bu&&2!==Bu||(Bu=4),null===Tu||!(268435455&Fu)&&!(268435455&Hu)||pd(Tu,Iu)}function kd(e,t){var n=Mu;Mu|=2;var r=wd();for(Tu===e&&Iu===t||(Qu=null,yd(e,t));;)try{Ed();break}catch(o){bd(e,o)}if(Ra(),Mu=n,$u.current=r,null!==Lu)throw Error(dt(261));return Tu=null,Iu=0,Bu}function Ed(){for(;null!==Lu;)Cd(Lu)}function Sd(){for(;null!==Lu&&!nr();)Cd(Lu)}function Cd(e){var t=Pu(e.alternate,e,zu);e.memoizedProps=e.pendingProps,null===t?_d(e):Lu=t,Ou.current=null}function _d(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=eu(n,t)))return n.flags&=32767,void(Lu=n);if(null===e)return Bu=6,void(Lu=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Zc(n,t,zu)))return void(Lu=n);if(null!==(t=t.sibling))return void(Lu=t);Lu=t=e}while(null!==t);0===Bu&&(Bu=5)}function Ad(e,t,n){var r=_r,o=Ru.transition;try{Ru.transition=null,_r=1,function(e,t,n,r){do{Nd()}while(null!==ed);if(6&Mu)throw Error(dt(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(dt(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-pr(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,i),e===Tu&&(Lu=Tu=null,Iu=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Zu||(Zu=!0,Td(lr,(function(){return Nd(),null}))),i=!!(15990&n.flags),!!(15990&n.subtreeFlags)||i){i=Ru.transition,Ru.transition=null;var s=_r;_r=1;var a=Mu;Mu|=4,Ou.current=null,function(e,t){if(as=Jr,wi(e=bi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(w){n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(a=s+o),d!==i||0!==r&&3!==d.nodeType||(l=s+r),3===d.nodeType&&(s+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(a=s),f===i&&++u===r&&(l=s),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===a||-1===l?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ls={focusedElem:e,selectionRange:n},Jr=!1,ou=t;null!==ou;)if(e=(t=ou).child,1028&t.subtreeFlags&&null!==e)e.return=t,ou=e;else for(;null!==ou;){t=ou;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var v=h.memoizedProps,m=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:lc(t.type,v),m);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(dt(163))}}catch(w){jd(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,ou=e;break}ou=t.return}h=au,au=!1}(e,n),ku(n,e),xi(ls),Jr=!!as,ls=as=null,e.current=n,Su(n),rr(),Mu=a,_r=s,Ru.transition=i}else e.current=n;if(Zu&&(Zu=!1,ed=e,td=o),i=e.pendingLanes,0===i&&(Xu=null),function(e){if(fr&&"function"==typeof fr.onCommitFiberRoot)try{fr.onCommitFiberRoot(dr,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),cd(e,or()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Gu)throw Gu=!1,e=Ju,Ju=null,e;!!(1&td)&&0!==e.tag&&Nd(),i=e.pendingLanes,1&i?e===rd?nd++:(nd=0,rd=e):nd=0,Qs()}(e,t,n,r)}finally{Ru.transition=o,_r=r}return null}function Nd(){if(null!==ed){var e=Ar(td),t=Ru.transition,n=_r;try{if(Ru.transition=null,_r=16>e?16:e,null===ed)var r=!1;else{if(e=ed,ed=null,td=0,6&Mu)throw Error(dt(331));var o=Mu;for(Mu|=4,ou=e.current;null!==ou;){var i=ou,s=i.child;if(16&ou.flags){var a=i.deletions;if(null!==a){for(var l=0;l<a.length;l++){var c=a[l];for(ou=c;null!==ou;){var u=ou;switch(u.tag){case 0:case 11:case 15:lu(8,u,i)}var d=u.child;if(null!==d)d.return=u,ou=d;else for(;null!==ou;){var f=(u=ou).sibling,p=u.return;if(du(u),u===c){ou=null;break}if(null!==f){f.return=p,ou=f;break}ou=p}}}var h=i.alternate;if(null!==h){var v=h.child;if(null!==v){h.child=null;do{var m=v.sibling;v.sibling=null,v=m}while(null!==v)}}ou=i}}if(2064&i.subtreeFlags&&null!==s)s.return=i,ou=s;else e:for(;null!==ou;){if(2048&(i=ou).flags)switch(i.tag){case 0:case 11:case 15:lu(9,i,i.return)}var g=i.sibling;if(null!==g){g.return=i.return,ou=g;break e}ou=i.return}}var y=e.current;for(ou=y;null!==ou;){var b=(s=ou).child;if(2064&s.subtreeFlags&&null!==b)b.return=s,ou=b;else e:for(s=y;null!==ou;){if(2048&(a=ou).flags)try{switch(a.tag){case 0:case 11:case 15:cu(9,a)}}catch(x){jd(a,a.return,x)}if(a===s){ou=null;break e}var w=a.sibling;if(null!==w){w.return=a.return,ou=w;break e}ou=a.return}}if(Mu=o,Qs(),fr&&"function"==typeof fr.onPostCommitFiberRoot)try{fr.onPostCommitFiberRoot(dr,e)}catch(x){}r=!0}return r}finally{_r=n,Ru.transition=t}}return!1}function Pd(e,t,n){e=qa(e,t=bc(0,t=vc(n,t),1),1),t=sd(),null!==e&&(Sr(e,1,t),cd(e,t))}function jd(e,t,n){if(3===e.tag)Pd(e,e,n);else for(;null!==t;){if(3===t.tag){Pd(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Xu||!Xu.has(r))){t=qa(t,e=wc(t,e=vc(n,e),1),1),e=sd(),null!==t&&(Sr(t,1,e),cd(t,e));break}}t=t.return}}function $d(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=sd(),e.pingedLanes|=e.suspendedLanes&n,Tu===e&&(Iu&n)===n&&(4===Bu||3===Bu&&(130023424&Iu)===Iu&&500>or()-Ku?yd(e,0):Vu|=n),cd(e,t)}function Od(e,t){0===t&&(1&e.mode?(t=gr,!(130023424&(gr<<=1))&&(gr=4194304)):t=1);var n=sd();null!==(e=Ua(e,t))&&(Sr(e,t,n),cd(e,n))}function Rd(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Od(e,n)}function Md(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(dt(314))}null!==r&&r.delete(t),Od(e,n)}function Td(e,t){return er(e,t)}function Ld(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Id(e,t,n,r){return new Ld(e,t,n,r)}function zd(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Dd(e,t){var n=e.alternate;return null===n?((n=Id(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Bd(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)zd(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case Pt:return Ud(n.children,o,i,t);case jt:s=8,o|=8;break;case $t:return(e=Id(12,n,t,2|o)).elementType=$t,e.lanes=i,e;case Tt:return(e=Id(13,n,t,o)).elementType=Tt,e.lanes=i,e;case Lt:return(e=Id(19,n,t,o)).elementType=Lt,e.lanes=i,e;case Dt:return Fd(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Ot:s=10;break e;case Rt:s=9;break e;case Mt:s=11;break e;case It:s=14;break e;case zt:s=16,r=null;break e}throw Error(dt(130,null==e?e:typeof e,""))}return(t=Id(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Ud(e,t,n,r){return(e=Id(7,e,r,t)).lanes=n,e}function Fd(e,t,n,r){return(e=Id(22,e,r,t)).elementType=Dt,e.lanes=n,e.stateNode={isHidden:!1},e}function Hd(e,t,n){return(e=Id(6,e,null,t)).lanes=n,e}function Vd(e,t,n){return(t=Id(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Wd(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Er(0),this.expirationTimes=Er(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Er(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function qd(e,t,n,r,o,i,s,a,l){return e=new Wd(e,t,n,a,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Id(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ha(i),e}function Kd(e){if(!e)return Ms;e:{if(Qn(e=e._reactInternals)!==e||1!==e.tag)throw Error(dt(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ds(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(dt(171))}if(1===e.tag){var n=e.type;if(Ds(n))return Fs(e,n,t)}return t}function Yd(e,t,n,r,o,i,s,a,l){return(e=qd(n,r,!0,e,0,i,0,a,l)).context=Kd(null),n=e.current,(i=Wa(r=sd(),o=ad(n))).callback=null!=t?t:null,qa(n,i,o),e.current.lanes=o,Sr(e,o,r),cd(e,r),e}function Qd(e,t,n,r){var o=t.current,i=sd(),s=ad(o);return n=Kd(n),null===t.context?t.context=n:t.pendingContext=n,(t=Wa(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=qa(o,t,s))&&(ld(e,o,s,i),Ka(e,o,s)),s}function Gd(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Jd(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xd(e,t){Jd(e,t),(e=e.alternate)&&Jd(e,t)}Pu=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ls.current)Cc=!0;else{if(!(e.lanes&n||128&t.flags))return Cc=!1,function(e,t,n){switch(t.tag){case 3:Tc(t),wa();break;case 5:ol(t);break;case 1:Ds(t.type)&&Hs(t);break;case 4:nl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Rs(Pa,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Rs(sl,1&sl.current),t.flags|=128,null):n&t.child.childLanes?Hc(e,t,n):(Rs(sl,1&sl.current),null!==(e=Gc(e,t,n))?e.sibling:null);Rs(sl,1&sl.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return Yc(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Rs(sl,sl.current),r)break;return null;case 22:case 23:return t.lanes=0,jc(e,t,n)}return Gc(e,t,n)}(e,t,n);Cc=!!(131072&e.flags)}else Cc=!1,da&&1048576&t.flags&&sa(t,Zs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qc(e,t),e=t.pendingProps;var o=zs(t,Ts.current);La(t,n),o=kl(null,t,r,e,o,n);var i=El();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ds(r)?(i=!0,Hs(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ha(t),o.updater=uc,t.stateNode=o,o._reactInternals=t,hc(t,r,e,n),t=Mc(null,t,r,!0,i,n)):(t.tag=0,da&&i&&aa(t),_c(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qc(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return zd(e)?1:0;if(null!=e){if((e=e.$$typeof)===Mt)return 11;if(e===It)return 14}return 2}(r),e=lc(r,e),o){case 0:t=Oc(null,t,r,e,n);break e;case 1:t=Rc(null,t,r,e,n);break e;case 11:t=Ac(null,t,r,e,n);break e;case 14:t=Nc(null,t,r,lc(r.type,e),n);break e}throw Error(dt(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Oc(e,t,r,o=t.elementType===r?o:lc(r,o),n);case 1:return r=t.type,o=t.pendingProps,Rc(e,t,r,o=t.elementType===r?o:lc(r,o),n);case 3:e:{if(Tc(t),null===e)throw Error(dt(387));r=t.pendingProps,o=(i=t.memoizedState).element,Va(e,t),Qa(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Lc(e,t,r,n,o=vc(Error(dt(423)),t));break e}if(r!==o){t=Lc(e,t,r,n,o=vc(Error(dt(424)),t));break e}for(ua=ms(t.stateNode.containerInfo.firstChild),ca=t,da=!0,fa=null,n=Na(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(wa(),r===o){t=Gc(e,t,n);break e}_c(e,t,r,n)}t=t.child}return t;case 5:return ol(t),null===e&&ma(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,cs(r,o)?s=null:null!==i&&cs(r,i)&&(t.flags|=32),$c(e,t),_c(e,t,s,n),t.child;case 6:return null===e&&ma(t),null;case 13:return Hc(e,t,n);case 4:return nl(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Aa(t,null,r,n):_c(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ac(e,t,r,o=t.elementType===r?o:lc(r,o),n);case 7:return _c(e,t,t.pendingProps,n),t.child;case 8:case 12:return _c(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Rs(Pa,r._currentValue),r._currentValue=s,null!==i)if(hi(i.value,s)){if(i.children===o.children&&!Ls.current){t=Gc(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var a=i.dependencies;if(null!==a){s=i.child;for(var l=a.firstContext;null!==l;){if(l.context===r){if(1===i.tag){(l=Wa(-1,n&-n)).tag=2;var c=i.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),Ta(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(10===i.tag)s=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(s=i.return))throw Error(dt(341));s.lanes|=n,null!==(a=s.alternate)&&(a.lanes|=n),Ta(s,n,t),s=i.sibling}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===t){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}_c(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,La(t,n),r=r(o=Ia(o)),t.flags|=1,_c(e,t,r,n),t.child;case 14:return o=lc(r=t.type,t.pendingProps),Nc(e,t,r,o=lc(r.type,o),n);case 15:return Pc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lc(r,o),Qc(e,t),t.tag=1,Ds(r)?(e=!0,Hs(t)):e=!1,La(t,n),fc(t,r,o),hc(t,r,o,n),Mc(null,t,r,!0,e,n);case 19:return Yc(e,t,n);case 22:return jc(e,t,n)}throw Error(dt(156,t.tag))};var Zd="function"==typeof reportError?reportError:function(e){console.error(e)};function ef(e){this._internalRoot=e}function tf(e){this._internalRoot=e}function nf(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function rf(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function of(){}function sf(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if("function"==typeof o){var a=o;o=function(){var e=Gd(s);a.call(e)}}Qd(t,s,e,o)}else s=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=Gd(s);i.call(e)}}var s=Yd(t,r,e,0,null,!1,0,"",of);return e._reactRootContainer=s,e[xs]=s.current,Qi(8===e.nodeType?e.parentNode:e),md(),s}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var a=r;r=function(){var e=Gd(l);a.call(e)}}var l=qd(e,0,!1,null,0,!1,0,"",of);return e._reactRootContainer=l,e[xs]=l.current,Qi(8===e.nodeType?e.parentNode:e),md((function(){Qd(t,l,n,r)})),l}(n,t,e,o,r);return Gd(s)}tf.prototype.render=ef.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(dt(409));Qd(e,t,null,null)},tf.prototype.unmount=ef.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;md((function(){Qd(null,e,null,null)})),t[xs]=null}},tf.prototype.unstable_scheduleHydration=function(e){if(e){var t=$r();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Br.length&&0!==t&&t<Br[n].priority;n++);Br.splice(n,0,e),0===n&&Vr(e)}},Nr=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=yr(t.pendingLanes);0!==n&&(Cr(t,1|n),cd(t,or()),!(6&Mu)&&(Yu=or()+500,Qs()))}break;case 13:md((function(){var t=Ua(e,1);if(null!==t){var n=sd();ld(t,e,1,n)}})),Xd(e,1)}},Pr=function(e){if(13===e.tag){var t=Ua(e,134217728);if(null!==t)ld(t,e,134217728,sd());Xd(e,134217728)}},jr=function(e){if(13===e.tag){var t=ad(e),n=Ua(e,t);if(null!==n)ld(n,e,t,sd());Xd(e,t)}},$r=function(){return _r},Or=function(e,t){var n=_r;try{return _r=e,t()}finally{_r=n}},Pn=function(e,t,n){switch(t){case"input":if(on(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Ns(r);if(!o)throw Error(dt(90));Zt(r),on(r,o)}}}break;case"textarea":fn(e,n);break;case"select":null!=(t=n.value)&&cn(e,!!n.multiple,t,!1)}},Tn=vd,Ln=md;var af={usingClientEntryPoint:!1,Events:[_s,As,Ns,Rn,Mn,vd]},lf={findFiberByHostInstance:Cs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},cf={bundleType:lf.bundleType,version:lf.version,rendererPackageName:lf.rendererPackageName,rendererConfig:lf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_t.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Xn(e))?null:e.stateNode},findFiberByHostInstance:lf.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uf.isDisabled&&uf.supportsFiber)try{dr=uf.inject(cf),fr=uf}catch(gn){}}it.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=af,it.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nf(t))throw Error(dt(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Nt,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},it.createRoot=function(e,t){if(!nf(e))throw Error(dt(299));var n=!1,r="",o=Zd;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=qd(e,1,!1,null,0,n,0,r,o),e[xs]=t.current,Qi(8===e.nodeType?e.parentNode:e),new ef(t)},it.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(dt(188));throw e=Object.keys(e).join(","),Error(dt(268,e))}return e=null===(e=Xn(t))?null:e.stateNode},it.flushSync=function(e){return md(e)},it.hydrate=function(e,t,n){if(!rf(t))throw Error(dt(200));return sf(null,e,t,!0,n)},it.hydrateRoot=function(e,t,n){if(!nf(e))throw Error(dt(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",s=Zd;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Yd(t,null,e,1,null!=n?n:null,o,0,i,s),e[xs]=t.current,Qi(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new tf(t)},it.render=function(e,t,n){if(!rf(t))throw Error(dt(200));return sf(null,e,t,!1,n)},it.unmountComponentAtNode=function(e){if(!rf(e))throw Error(dt(40));return!!e._reactRootContainer&&(md((function(){sf(null,null,e,!1,(function(){e._reactRootContainer=null,e[xs]=null}))})),!0)},it.unstable_batchedUpdates=vd,it.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!rf(n))throw Error(dt(200));if(null==e||void 0===e._reactInternals)throw Error(dt(38));return sf(e,t,n,!1,r)},it.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),ot.exports=it;var df=ot.exports;const ff=ae(df);var pf=df;function hf(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=hf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}rt.createRoot=pf.createRoot,rt.hydrateRoot=pf.hydrateRoot;const vf=e=>{const t=bf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),mf(n,t)||yf(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},mf=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),i=o?mf(e.slice(1),o):void 0;if(i)return i;if(0===t.validators.length)return;const s=e.join("-");return null==(n=t.validators.find((({validator:e})=>e(s))))?void 0:n.classGroupId},gf=/^\[(.+)\]$/,yf=e=>{if(gf.test(e)){const t=gf.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bf=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ef(Object.entries(e.classGroups),n).forEach((([e,n])=>{wf(n,r,e,t)})),r},wf=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return kf(e)?void wf(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{wf(o,xf(t,e),n,r)}))}else{(""===e?t:xf(t,e)).classGroupId=n}}))},xf=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},kf=e=>e.isThemeGetter,Ef=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,Sf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},Cf=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,s=e=>{const n=[];let s,a=0,l=0;for(let d=0;d<e.length;d++){let c=e[d];if(0===a){if(c===o&&(r||e.slice(d,d+i)===t)){n.push(e.slice(l,d)),l=d+i;continue}if("/"===c){s=d;continue}}"["===c?a++:"]"===c&&a--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:s&&s>l?s-l:void 0}};return n?e=>n({className:e,parseClassName:s}):s},_f=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},Af=/\s+/;function Nf(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Pf(e))&&(r&&(r+=" "),r+=t);return r}const Pf=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Pf(e[r]))&&(n&&(n+=" "),n+=t);return n};function jf(e,...t){let n,r,o,i=function(a){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:Sf(e.cacheSize),parseClassName:Cf(e),...vf(e)}))(l),r=n.cache.get,o=n.cache.set,i=s,s(a)};function s(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(Af);let a="";for(let l=s.length-1;l>=0;l-=1){const e=s[l],{modifiers:t,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(e);let f=Boolean(d),p=r(f?u.substring(0,d):u);if(!p){if(!f){a=e+(a.length>0?" "+a:a);continue}if(p=r(u),!p){a=e+(a.length>0?" "+a:a);continue}f=!1}const h=_f(t).join(":"),v=c?h+"!":h,m=v+p;if(i.includes(m))continue;i.push(m);const g=o(p,f);for(let n=0;n<g.length;++n){const e=g[n];i.push(v+e)}a=e+(a.length>0?" "+a:a)}return a})(e,n);return o(e,i),i}return function(){return i(Nf.apply(null,arguments))}}const $f=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Of=/^\[(?:([a-z-]+):)?(.+)\]$/i,Rf=/^\d+\/\d+$/,Mf=new Set(["px","full","screen"]),Tf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,If=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Df=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bf=e=>Ff(e)||Mf.has(e)||Rf.test(e),Uf=e=>tp(e,"length",np),Ff=e=>Boolean(e)&&!Number.isNaN(Number(e)),Hf=e=>tp(e,"number",Ff),Vf=e=>Boolean(e)&&Number.isInteger(Number(e)),Wf=e=>e.endsWith("%")&&Ff(e.slice(0,-1)),qf=e=>Of.test(e),Kf=e=>Tf.test(e),Yf=new Set(["length","size","percentage"]),Qf=e=>tp(e,Yf,rp),Gf=e=>tp(e,"position",rp),Jf=new Set(["image","url"]),Xf=e=>tp(e,Jf,ip),Zf=e=>tp(e,"",op),ep=()=>!0,tp=(e,t,n)=>{const r=Of.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},np=e=>Lf.test(e)&&!If.test(e),rp=()=>!1,op=e=>zf.test(e),ip=e=>Df.test(e),sp=jf((()=>{const e=$f("colors"),t=$f("spacing"),n=$f("blur"),r=$f("brightness"),o=$f("borderColor"),i=$f("borderRadius"),s=$f("borderSpacing"),a=$f("borderWidth"),l=$f("contrast"),c=$f("grayscale"),u=$f("hueRotate"),d=$f("invert"),f=$f("gap"),p=$f("gradientColorStops"),h=$f("gradientColorStopPositions"),v=$f("inset"),m=$f("margin"),g=$f("opacity"),y=$f("padding"),b=$f("saturate"),w=$f("scale"),x=$f("sepia"),k=$f("skew"),E=$f("space"),S=$f("translate"),C=()=>["auto",qf,t],_=()=>[qf,t],A=()=>["",Bf,Uf],N=()=>["auto",Ff,qf],P=()=>["","0",qf],j=()=>[Ff,qf];return{cacheSize:500,separator:":",theme:{colors:[ep],spacing:[Bf,Uf],blur:["none","",Kf,qf],brightness:j(),borderColor:[e],borderRadius:["none","","full",Kf,qf],borderSpacing:_(),borderWidth:A(),contrast:j(),grayscale:P(),hueRotate:j(),invert:P(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[Wf,Uf],inset:C(),margin:C(),opacity:j(),padding:_(),saturate:j(),scale:j(),sepia:P(),skew:j(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",qf]}],container:["container"],columns:[{columns:[Kf]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",qf]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Vf,qf]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qf]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Vf,qf]}],"grid-cols":[{"grid-cols":[ep]}],"col-start-end":[{col:["auto",{span:["full",Vf,qf]},qf]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[ep]}],"row-start-end":[{row:["auto",{span:[Vf,qf]},qf]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qf]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qf]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qf,t]}],"min-w":[{"min-w":[qf,t,"min","max","fit"]}],"max-w":[{"max-w":[qf,t,"none","full","min","max","fit","prose",{screen:[Kf]},Kf]}],h:[{h:[qf,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qf,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qf,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qf,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Kf,Uf]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hf]}],"font-family":[{font:[ep]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qf]}],"line-clamp":[{"line-clamp":["none",Ff,Hf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Bf,qf]}],"list-image":[{"list-image":["none",qf]}],"list-style-type":[{list:["none","disc","decimal",qf]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Bf,Uf]}],"underline-offset":[{"underline-offset":["auto",Bf,qf]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qf]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qf]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Gf]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Xf]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Bf,qf]}],"outline-w":[{outline:[Bf,Uf]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Bf,Uf]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kf,Zf]}],"shadow-color":[{shadow:[ep]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kf,qf]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qf]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",qf]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",qf]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Vf,qf]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qf]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qf]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qf]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Bf,Uf,Hf]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function ap(...e){return sp(function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=hf(e))&&(r&&(r+=" "),r+=t);return r}(e))}const lp={nDecimals:2,padToDecimals:!0,decimalSeparator:1.1.toLocaleString().includes(",")?",":"."},cp=(e,t,n={})=>{const{nDecimals:r,padToDecimals:o,decimalSeparator:i}={...lp,...n};if(null===e)return"";const s=10n**BigInt(t);if(r<t){e=(e/=10n**BigInt(t-(r+1)))/10n+(Math.abs(Number(e%10n))>4?e<0?-1n:1n:0n),e*=10n**BigInt(t-r)}const a=e<0n,l=a?-1n*e:e;let c=(l/s).toLocaleString();a&&(c="-"+c);const u=l%s;if(0===r||r===1/0&&0n===u||!1===o&&0n===u)return c;let d=u.toString().padStart(t,"0").replace(/00*$/,"");return r!==1/0&&!0===o&&(d=d.padEnd(r,"0")),c+i+d},up=qe.forwardRef((({className:e,...t},n)=>nt.jsx("div",{ref:n,className:ap("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t})));up.displayName="Card";const dp=qe.forwardRef((({className:e,...t},n)=>nt.jsx("div",{ref:n,className:ap("flex flex-col space-y-1.5 p-6",e),...t})));dp.displayName="CardHeader";const fp=qe.forwardRef((({className:e,...t},n)=>nt.jsx("h3",{ref:n,className:ap("text-2xl font-semibold leading-none tracking-tight",e),...t})));fp.displayName="CardTitle";qe.forwardRef((({className:e,...t},n)=>nt.jsx("p",{ref:n,className:ap("text-sm text-muted-foreground",e),...t}))).displayName="CardDescription";const pp=qe.forwardRef((({className:e,...t},n)=>nt.jsx("div",{ref:n,className:ap("p-6 pt-0",e),...t})));pp.displayName="CardContent";qe.forwardRef((({className:e,...t},n)=>nt.jsx("div",{ref:n,className:ap("flex items-center p-6 pt-0",e),...t}))).displayName="CardFooter";var hp=Object.defineProperty,vp=(e,t,n)=>(((e,t,n)=>{t in e?hp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),mp={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,A:10,B:11,C:12,D:13,E:14,F:15};var gp=class extends Uint8Array{constructor(e){super(e),vp(this,"i",0),vp(this,"v"),this.v=new DataView(e)}},yp=e=>t=>e(t instanceof gp?t:new gp(t instanceof Uint8Array?t.buffer:"string"==typeof t?function(e){const t=e.length%2,n=("x"===e[1]?2:0)+t,r=(e.length-n)/2+t,o=new Uint8Array(r);t&&(o[0]=0|mp[e[2]]);for(let i=0;i<r;){const r=n+2*i,s=mp[e[r]],a=mp[e[r+1]];o[t+i++]=s<<4|a}return o}(t).buffer:t)),bp=e=>{const t=e.length;let n=0;for(let o=0;o<t;o++)n+=e[o].length;const r=new Uint8Array(n);for(let o=0,i=0;o<t;o++){const t=e[o];r.set(t,i),i+=t.byteLength}return r};function wp(e,t){const n=Object.keys(e),r=n.length,o={};for(let i=0;i<r;i++){const r=n[i];o[r]=t(e[r],r)}return o}var xp=yp,kp=(e,t)=>{const n=[e,t];return n.enc=e,n.dec=t,n},Ep=(e,t)=>n=>e(t(n)),Sp=(e,t)=>n=>t(e(n)),Cp=([e,t],n,r)=>kp(Ep(e,n),Sp(t,r));function _p(e,t,n){return kp(function(e,t){return n=>{const r=new Uint8Array(e);return new DataView(r.buffer)[t](0,n,!0),r}}(e,n),function(e,t){return yp((n=>{const r=n.v[t](n.i,!0);return n.i+=e,r}))}(e,t))}var Ap=_p(1,"getUint8","setUint8"),Np=_p(2,"getUint16","setUint16"),Pp=_p(4,"getUint32","setUint32"),jp=_p(8,"getBigUint64","setBigUint64"),$p=_p(1,"getInt8","setInt8"),Op=_p(2,"getInt16","setInt16"),Rp=_p(4,"getInt32","setInt32"),Mp=_p(8,"getBigInt64","setBigInt64"),Tp=e=>{const t=new Uint8Array(16),n=new DataView(t.buffer);return n.setBigInt64(0,e,!0),n.setBigInt64(8,e>>64n,!0),t},Lp=e=>yp((t=>{const{v:n,i:r}=t,o=n.getBigUint64(r,!0),i=n[e](r+8,!0);return t.i+=16,i<<64n|o})),Ip=kp(Tp,Lp("getBigUint64")),zp=kp(Tp,Lp("getBigInt64")),Dp=e=>{const t=new Uint8Array(32),n=new DataView(t.buffer);return n.setBigInt64(0,e,!0),n.setBigInt64(8,e>>64n,!0),n.setBigInt64(16,e>>128n,!0),n.setBigInt64(24,e>>192n,!0),t},Bp=e=>yp((t=>{let n=t.v.getBigUint64(t.i,!0);return t.i+=8,n|=t.v.getBigUint64(t.i,!0)<<64n,t.i+=8,n|=t.v.getBigUint64(t.i,!0)<<128n,t.i+=8,n|=t.v[e](t.i,!0)<<192n,t.i+=8,n})),Up=kp(Dp,Bp("getBigUint64")),Fp=kp(Dp,Bp("getBigInt64")),Hp=Cp(Ap,(e=>e?1:0),Boolean),Vp=[Ap[1],Np[1],Pp[1]],Wp=yp((e=>{const t=e[e.i],n=3&t;if(n<3)return Vp[n](e)>>>2;const r=4+(t>>>2);e.i++;let o=0n;const i=r/8|0;let s=0n;for(let l=0;l<i;l++)o=jp[1](e)<<s|o,s+=64n;let a=r%8;return a>3&&(o=BigInt(Pp[1](e))<<s|o,s+=32n,a-=4),a>1&&(o=BigInt(Np[1](e))<<s|o,s+=16n,a-=2),a&&(o=BigInt(Ap[1](e))<<s|o),o})),qp=1n<<56n,Kp=1<<30,Yp=kp((e=>{if(e<0)throw new Error(`Wrong compact input (${e})`);const t=Number(e)<<2;if(e<64)return Ap[0](t);if(e<16384)return Np[0](1|t);if(e<Kp)return Pp[0](2|t);let n=[new Uint8Array(1)],r=BigInt(e);for(;r>=qp;)n.push(jp[0](r)),r>>=64n;r>=16777216&&(n.push(Pp[0](Number(4294967295n&r))),r>>=32n);let o=Number(r);o>=256&&(n.push(Np[0](o)),o>>=16),o&&n.push(Ap[0](o));const i=bp(n);return i[0]=i.length-5<<2|3,i}),Wp),Qp=new TextEncoder,Gp=new TextDecoder,Jp=yp((e=>{let t=Yp.dec(e);const n=new DataView(e.buffer,e.i,t);return e.i+=t,Gp.decode(n)})),Xp=kp((e=>{const t=Qp.encode(e);return bp([Yp.enc(t.length),t])}),Jp),Zp=new Uint8Array(0),eh=kp((()=>Zp),(()=>{})),th=e=>void 0===e?e=>bp([Yp.enc(e.length),e]):t=>t.length===e?t:t.slice(0,e),nh=e=>yp((t=>{const n=void 0===e?Yp.dec(t):e!==1/0?e:t.byteLength-t.i,r=new Uint8Array(t.buffer.slice(t.i,t.i+n));return t.i+=n,r})),rh=e=>kp(th(e),nh(e));rh.enc=th,rh.dec=nh;var oh=(e,t)=>{const n=Object.keys(e),r=new Map((null==t?void 0:t.map(((e,t)=>[n[t],e])))??n.map(((e,t)=>[e,t])));return({tag:t,value:n})=>{return bp([Ap.enc((o=t,r.get(o))),e[t](n)]);var o}},ih=(e,t)=>{const n=Object.keys(e),r=new Map((null==t?void 0:t.map(((e,t)=>[e,n[t]])))??n.map(((e,t)=>[t,e])));return yp((t=>{const n=Ap.dec(t),o=r.get(n);return{tag:o,value:(0,e[o])(t)}}))},sh=(e,...t)=>kp(oh(wp(e,(([e])=>e)),...t),ih(wp(e,(([,e])=>e)),...t));sh.enc=oh,sh.dec=ih;var ah=e=>yp((t=>Ap[1](t)>0?e(t):void 0)),lh=e=>t=>{const n=new Uint8Array(1);return void 0===t?n:(n[0]=1,bp([n,e(t)]))},ch=e=>kp(lh(e[0]),ah(e[1]));ch.enc=lh,ch.dec=ah;var uh=(e,t)=>yp((n=>{const r=0===Ap[1](n);return{success:r,value:(r?e:t)(n)}})),dh=(e,t)=>({success:n,value:r})=>bp([Ap[0](n?0:1),(n?e:t)(r)]),fh=(e,t)=>kp(dh(e[0],t[0]),uh(e[1],t[1]));fh.dec=uh,fh.enc=dh;var ph=(...e)=>yp((t=>e.map((e=>e(t))))),hh=(...e)=>t=>bp(e.map(((e,n)=>e(t[n])))),vh=(...e)=>kp(hh(...e.map((([e])=>e))),ph(...e.map((([,e])=>e))));vh.enc=hh,vh.dec=ph;var mh=e=>{const t=Object.keys(e);return Ep(vh.enc(...Object.values(e)),(e=>t.map((t=>e[t]))))},gh=e=>{const t=Object.keys(e);return Sp(vh.dec(...Object.values(e)),(e=>Object.fromEntries(e.map(((e,n)=>[t[n],e])))))},yh=e=>kp(mh(wp(e,(e=>e[0]))),gh(wp(e,(e=>e[1]))));yh.enc=mh,yh.dec=gh;var bh=(e,t)=>t>=0?t=>bp(t.map(e)):t=>bp([Yp.enc(t.length),bp(t.map(e))]),wh=(e,t)=>yp((n=>{const r=t>=0?t:Yp.dec(n),o=new Array(r);for(let t=0;t<r;t++)o[t]=e(n);return o})),xh=(e,t)=>kp(bh(e[0],t),wh(e[1],t));function kh(...e){const t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map((e=>e.encode)).reduceRight(n,t),decode:e.map((e=>e.decode)).reduce(n,t)}}function Eh(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const n=e.indexOf(t);if(-1===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}}function Sh(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function Ch(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const o=[],i=Array.from(e);for(i.forEach((e=>{if(e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,s=!0;for(let o=r;o<i.length;o++){const a=i[o],l=t*e+a;if(!Number.isSafeInteger(l)||t*e/t!==e||l-a!=t*e)throw new Error("convertRadix: carry overflow");e=l%n;const c=Math.floor(l/n);if(i[o]=c,!Number.isSafeInteger(c)||c*n+e!==l)throw new Error("convertRadix: carry overflow");s&&(c?s=!1:r=o)}if(o.push(e),s)break}for(let s=0;s<e.length-1&&0===e[s];s++)o.push(0);return o.reverse()}function _h(e){return{encode:t=>{if(!function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}(t))throw new Error("radix.encode input should be Uint8Array");return Ch(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(Ch(t,e,256))}}}xh.enc=bh,xh.dec=wh;const Ah=(e=>kh(_h(58),Eh(e),Sh("")))("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function Nh(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function Ph(e,...t){if(!function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function jh(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function $h(e,t){Ph(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const Oh=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Rh=(e,t)=>e<<32-t|e>>>t,Mh=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],Th=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,Lh=Mh?e=>e:e=>Th(e);function Ih(e){for(let t=0;t<e.length;t++)e[t]=Th(e[t])}function zh(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),Ph(e),e}class Dh{clone(){return this._cloneInto()}}function Bh(e){const t=(t,n)=>e(n).update(zh(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}function Uh(e){const t=(t,n)=>e(n).update(zh(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}const Fh=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3]);class Hh extends Dh{constructor(e,t,n={},r,o,i){if(super(),this.blockLen=e,this.outputLen=t,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,Nh(e),Nh(t),Nh(r),t<0||t>r)throw new Error("outputLen bigger than keyLen");if(void 0!==n.key&&(n.key.length<1||n.key.length>r))throw new Error(`key must be up 1..${r} byte long or undefined`);if(void 0!==n.salt&&n.salt.length!==o)throw new Error(`salt must be ${o} byte long or undefined`);if(void 0!==n.personalization&&n.personalization.length!==i)throw new Error(`personalization must be ${i} byte long or undefined`);this.buffer32=Oh(this.buffer=new Uint8Array(e))}update(e){jh(this);const{blockLen:t,buffer:n,buffer32:r}=this,o=(e=zh(e)).length,i=e.byteOffset,s=e.buffer;for(let a=0;a<o;){this.pos===t&&(Mh||Ih(r),this.compress(r,0,!1),Mh||Ih(r),this.pos=0);const l=Math.min(t-this.pos,o-a),c=i+a;if(l!==t||c%4||!(a+l<o))n.set(e.subarray(a,a+l),this.pos),this.pos+=l,this.length+=l,a+=l;else{const e=new Uint32Array(s,c,Math.floor((o-a)/4));Mh||Ih(e);for(let n=0;a+t<o;n+=r.length,a+=t)this.length+=t,this.compress(e,n,!1);Mh||Ih(e)}}return this}digestInto(e){jh(this),$h(e,this);const{pos:t,buffer32:n}=this;this.finished=!0,this.buffer.subarray(t).fill(0),Mh||Ih(n),this.compress(n,0,!0),Mh||Ih(n);const r=Oh(e);this.get().forEach(((e,t)=>r[t]=Lh(e)))}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){const{buffer:t,length:n,finished:r,destroyed:o,outputLen:i,pos:s}=this;return e||(e=new this.constructor({dkLen:i})),e.set(...this.get()),e.length=n,e.finished=r,e.destroyed=o,e.outputLen=i,e.buffer.set(t),e.pos=s,e}}const Vh=BigInt(2**32-1),Wh=BigInt(32);function qh(e,t=!1){return t?{h:Number(e&Vh),l:Number(e>>Wh&Vh)}:{h:0|Number(e>>Wh&Vh),l:0|Number(e&Vh)}}function Kh(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:i,l:s}=qh(e[o],t);[n[o],r[o]]=[i,s]}return[n,r]}const Yh=(e,t,n)=>e<<n|t>>>32-n,Qh=(e,t,n)=>t<<n|e>>>32-n,Gh=(e,t,n)=>t<<n-32|e>>>64-n,Jh=(e,t,n)=>e<<n-32|t>>>64-n;const Xh={fromBig:qh,split:Kh,toBig:(e,t)=>BigInt(e>>>0)<<Wh|BigInt(t>>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:Yh,rotlSL:Qh,rotlBH:Gh,rotlBL:Jh,add:function(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,add5H:(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,add5L:(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0)},Zh=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),ev=new Uint32Array(32);function tv(e,t,n,r,o,i){const s=o[i],a=o[i+1];let l=ev[2*e],c=ev[2*e+1],u=ev[2*t],d=ev[2*t+1],f=ev[2*n],p=ev[2*n+1],h=ev[2*r],v=ev[2*r+1],m=Xh.add3L(l,u,s);c=Xh.add3H(m,c,d,a),l=0|m,({Dh:v,Dl:h}={Dh:v^c,Dl:h^l}),({Dh:v,Dl:h}={Dh:Xh.rotr32H(v,h),Dl:Xh.rotr32L(v,h)}),({h:p,l:f}=Xh.add(p,f,v,h)),({Bh:d,Bl:u}={Bh:d^p,Bl:u^f}),({Bh:d,Bl:u}={Bh:Xh.rotrSH(d,u,24),Bl:Xh.rotrSL(d,u,24)}),ev[2*e]=l,ev[2*e+1]=c,ev[2*t]=u,ev[2*t+1]=d,ev[2*n]=f,ev[2*n+1]=p,ev[2*r]=h,ev[2*r+1]=v}function nv(e,t,n,r,o,i){const s=o[i],a=o[i+1];let l=ev[2*e],c=ev[2*e+1],u=ev[2*t],d=ev[2*t+1],f=ev[2*n],p=ev[2*n+1],h=ev[2*r],v=ev[2*r+1],m=Xh.add3L(l,u,s);c=Xh.add3H(m,c,d,a),l=0|m,({Dh:v,Dl:h}={Dh:v^c,Dl:h^l}),({Dh:v,Dl:h}={Dh:Xh.rotrSH(v,h,16),Dl:Xh.rotrSL(v,h,16)}),({h:p,l:f}=Xh.add(p,f,v,h)),({Bh:d,Bl:u}={Bh:d^p,Bl:u^f}),({Bh:d,Bl:u}={Bh:Xh.rotrBH(d,u,63),Bl:Xh.rotrBL(d,u,63)}),ev[2*e]=l,ev[2*e+1]=c,ev[2*t]=u,ev[2*t+1]=d,ev[2*n]=f,ev[2*n+1]=p,ev[2*r]=h,ev[2*r+1]=v}class rv extends Hh{constructor(e={}){super(128,void 0===e.dkLen?64:e.dkLen,e,64,16,16),this.v0l=0|Zh[0],this.v0h=0|Zh[1],this.v1l=0|Zh[2],this.v1h=0|Zh[3],this.v2l=0|Zh[4],this.v2h=0|Zh[5],this.v3l=0|Zh[6],this.v3h=0|Zh[7],this.v4l=0|Zh[8],this.v4h=0|Zh[9],this.v5l=0|Zh[10],this.v5h=0|Zh[11],this.v6l=0|Zh[12],this.v6h=0|Zh[13],this.v7l=0|Zh[14],this.v7h=0|Zh[15];const t=e.key?e.key.length:0;if(this.v0l^=this.outputLen|t<<8|65536|1<<24,e.salt){const t=Oh(zh(e.salt));this.v4l^=Lh(t[0]),this.v4h^=Lh(t[1]),this.v5l^=Lh(t[2]),this.v5h^=Lh(t[3])}if(e.personalization){const t=Oh(zh(e.personalization));this.v6l^=Lh(t[0]),this.v6h^=Lh(t[1]),this.v7l^=Lh(t[2]),this.v7h^=Lh(t[3])}if(e.key){const t=new Uint8Array(this.blockLen);t.set(zh(e.key)),this.update(t)}}get(){let{v0l:e,v0h:t,v1l:n,v1h:r,v2l:o,v2h:i,v3l:s,v3h:a,v4l:l,v4h:c,v5l:u,v5h:d,v6l:f,v6h:p,v7l:h,v7h:v}=this;return[e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,v]}set(e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,v){this.v0l=0|e,this.v0h=0|t,this.v1l=0|n,this.v1h=0|r,this.v2l=0|o,this.v2h=0|i,this.v3l=0|s,this.v3h=0|a,this.v4l=0|l,this.v4h=0|c,this.v5l=0|u,this.v5h=0|d,this.v6l=0|f,this.v6h=0|p,this.v7l=0|h,this.v7h=0|v}compress(e,t,n){this.get().forEach(((e,t)=>ev[t]=e)),ev.set(Zh,16);let{h:r,l:o}=Xh.fromBig(BigInt(this.length));ev[24]=Zh[8]^o,ev[25]=Zh[9]^r,n&&(ev[28]=~ev[28],ev[29]=~ev[29]);let i=0;const s=Fh;for(let a=0;a<12;a++)tv(0,4,8,12,e,t+2*s[i++]),nv(0,4,8,12,e,t+2*s[i++]),tv(1,5,9,13,e,t+2*s[i++]),nv(1,5,9,13,e,t+2*s[i++]),tv(2,6,10,14,e,t+2*s[i++]),nv(2,6,10,14,e,t+2*s[i++]),tv(3,7,11,15,e,t+2*s[i++]),nv(3,7,11,15,e,t+2*s[i++]),tv(0,5,10,15,e,t+2*s[i++]),nv(0,5,10,15,e,t+2*s[i++]),tv(1,6,11,12,e,t+2*s[i++]),nv(1,6,11,12,e,t+2*s[i++]),tv(2,7,8,13,e,t+2*s[i++]),nv(2,7,8,13,e,t+2*s[i++]),tv(3,4,9,14,e,t+2*s[i++]),nv(3,4,9,14,e,t+2*s[i++]);this.v0l^=ev[0]^ev[16],this.v0h^=ev[1]^ev[17],this.v1l^=ev[2]^ev[18],this.v1h^=ev[3]^ev[19],this.v2l^=ev[4]^ev[20],this.v2h^=ev[5]^ev[21],this.v3l^=ev[6]^ev[22],this.v3h^=ev[7]^ev[23],this.v4l^=ev[8]^ev[24],this.v4h^=ev[9]^ev[25],this.v5l^=ev[10]^ev[26],this.v5h^=ev[11]^ev[27],this.v6l^=ev[12]^ev[28],this.v6h^=ev[13]^ev[29],this.v7l^=ev[14]^ev[30],this.v7h^=ev[15]^ev[31],ev.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const ov=Bh((e=>new rv(e))),iv=(new TextEncoder).encode("SS58PRE"),sv=e=>{try{const t=Ah.decode(e),n=t.subarray(0,64&t[0]?2:1),r=t.subarray(n.length,t.length-2),o=t.subarray(n.length+r.length),i=ov(Uint8Array.of(...iv,...n,...r),{dkLen:64}).subarray(0,2);return o[0]===i[0]&&o[1]===i[1]?{isValid:!0,ss58Format:av(n),publicKey:r.slice()}:{isValid:!1}}catch(t){return{isValid:!1}}},av=e=>{const t=new DataView(e.buffer,e.byteOffset,e.byteLength);return 1===t.byteLength?t.getUint8(0):t.getUint16(0)},lv=e=>{const t=e<64?Uint8Array.of(e):Uint8Array.of((252&e)>>2|64,e>>8|(3&e)<<6);return e=>{const n=ov(Uint8Array.of(...iv,...t,...e),{dkLen:64}).subarray(0,2);return Ah.encode(Uint8Array.of(...t,...e,...n))}};const cv=(e=42,t=32)=>Cp(rh(t),function(e){return t=>{const n=sv(t);if(!n.isValid)throw new Error("Invalid checksum");const{publicKey:r}=n;if(r.length!==e)throw new Error("Invalid public key length");return r}}(t),lv(e)),uv="0123456789abcdef";function dv(e){const t=new Array(e.length+1);t[0]="0x";for(let n=0;n<e.length;){const r=e[n++];t[n]=uv[r>>4]+uv[15&r]}return t.join("")}const fv={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,A:10,B:11,C:12,D:13,E:14,F:15};function pv(e){const t=e.length%2,n=("x"===e[1]?2:0)+t,r=(e.length-n)/2+t,o=new Uint8Array(r);t&&(o[0]=0|fv[e[2]]);for(let i=0;i<r;){const r=n+2*i,s=fv[e[r]],a=fv[e[r+1]];o[t+i++]=s<<4|a}return o}function hv(e,t){return Object.fromEntries(Object.entries(e).map((([e,n])=>[e,t(n,e)])))}const vv=(...e)=>{const t=e.reduce(((e,t)=>e+t.byteLength),0),n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const t=e[r];n.set(t,o),o+=t.byteLength}return n},mv=Function.prototype;class gv extends Error{constructor(){super("Abort Error"),this.name="AbortError"}}var yv,bv,wv,xv,kv,Ev=Object.defineProperty,Sv=e=>{throw TypeError(e)},Cv=(e,t,n)=>((e,t,n)=>t in e?Ev(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),_v=(e,t,n)=>t.has(e)||Sv("Cannot "+n),Av=(e,t,n)=>(_v(e,t,"read from private field"),n?n.call(e):t.get(e)),Nv=(e,t,n)=>t.has(e)?Sv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Pv=(e,t,n,r)=>(_v(e,t,"write to private field"),t.set(e,n),n);const jv=new TextEncoder,$v=new TextDecoder,Ov=vh(Yp,rh(1/0))[1];class Rv{constructor(e,t=!1){if(Nv(this,yv),Nv(this,bv,null),Nv(this,wv,null),Nv(this,xv,null),Nv(this,kv,null),Cv(this,"asText",(()=>Av(this,kv)??Pv(this,kv,$v.decode(Av(this,yv))))),Cv(this,"asHex",(()=>Av(this,wv)||Pv(this,wv,dv(Av(this,yv))))),Cv(this,"asOpaqueHex",(()=>Av(this,xv)||Pv(this,xv,dv(this.asBytes())))),Cv(this,"asBytes",(()=>Av(this,yv))),Cv(this,"asOpaqueBytes",(()=>Av(this,bv)||Pv(this,bv,vv(Yp[0](Av(this,yv).length),Av(this,yv))))),t){try{const[t,n]=Ov(e);if(t===n.length)return Pv(this,yv,n),void Pv(this,bv,e)}catch(n){}throw new Error("Invalid opaque bytes")}Pv(this,yv,e)}static fromText(e){return new this(jv.encode(e))}static fromHex(e){return new this(pv(e))}static fromOpaqueHex(e){return new this(pv(e),!0)}static fromBytes(e){return new this(e)}static fromOpaqueBytes(e){return new this(e,!0)}}yv=new WeakMap,bv=new WeakMap,wv=new WeakMap,xv=new WeakMap,kv=new WeakMap;const[Mv]=cv();class Tv extends Rv{constructor(e){super(e)}static fromArray(e){return new this(new Uint8Array(e))}static fromAccountId32(e){return new this(Mv(e))}}const Lv=e=>{const t=rh.enc(e);return e=>t(e.asBytes())},Iv=e=>{const t=rh.dec(e),n=null==e?Rv:Tv;return e=>n.fromBytes(t(e))},zv=e=>kp(Lv(e),Iv(e));zv.enc=Lv,zv.dec=Iv;const Dv=Yp,Bv=Yp,Uv=xp((e=>{const t=Dv.dec(e),n=Math.ceil(t/8);return{bytes:rh(n).dec(e),bitsLen:t}})),Fv=kp((e=>{if(e.bitsLen>8*e.bytes.length)throw new Error(`Not enough bytes. (bitsLen:${e.bitsLen}, bytesLen:${e.bytes.length})`);const t=Dv.enc(e.bitsLen),n=new Uint8Array(e.bytes.length+t.length);return n.set(t,0),n.set(e.bytes,t.length),n}),Uv),Hv=Cp(Ap,(e=>e.charCodeAt(0)),String.fromCharCode),Vv=e=>{const t=rh.enc(e);return e=>t(pv(e))},Wv=e=>{const t=rh.dec(e);return e=>dv(t(e))},qv=e=>kp(Vv(e),Wv(e));qv.enc=Vv,qv.dec=Wv;const Kv=new TextEncoder,Yv=new TextDecoder,Qv=e=>{let t=n=>{const r=e();return t=r,r(n)};return e=>t(e)},Gv=e=>{let t=n=>{const r=e();return t=r,r(n)};return e=>t(e)},Jv=e=>kp(Qv((()=>e().enc)),Gv((()=>e().dec))),Xv={is:(e,t)=>e.type===t,as(e,t){if(t!==e.type)throw new Error(`Enum.as(enum, ${t}) used with actual type ${e.type}`);return e}},Zv=Object.assign(((e,t)=>({type:e,value:t})),Xv),em=new Proxy({},{get:(e,t)=>e=>Zv(t,e)}),tm=(...e)=>{const t=sh.enc(...e);return e=>t({tag:e.type,value:e.value})},nm=(...e)=>{const t=sh.dec(...e);return e=>{const{tag:n,value:r}=t(e);return Zv(n,r)}},rm=(e,...t)=>kp(tm(hv(e,(([e])=>e)),...t),nm(hv(e,(([,e])=>e)),...t));rm.enc=tm,rm.dec=nm;const om=[],im=[],sm=[],am=BigInt(0),lm=BigInt(1),cm=BigInt(2),um=BigInt(7),dm=BigInt(256),fm=BigInt(113);for(let uI=0,dI=lm,fI=1,pI=0;uI<24;uI++){[fI,pI]=[pI,(2*fI+3*pI)%5],om.push(2*(5*pI+fI)),im.push((uI+1)*(uI+2)/2%64);let e=am;for(let t=0;t<7;t++)dI=(dI<<lm^(dI>>um)*fm)%dm,dI&cm&&(e^=lm<<(lm<<BigInt(t))-lm);sm.push(e)}const[pm,hm]=Kh(sm,!0),vm=(e,t,n)=>n>32?Gh(e,t,n):Yh(e,t,n),mm=(e,t,n)=>n>32?Jh(e,t,n):Qh(e,t,n);class gm extends Dh{constructor(e,t,n,r=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Nh(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Oh(this.state)}keccak(){Mh||Ih(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,o=(r+2)%10,i=n[o],s=n[o+1],a=vm(i,s,1)^n[t],l=mm(i,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=l}let t=e[2],o=e[3];for(let n=0;n<24;n++){const r=im[n],i=vm(t,o,r),s=mm(t,o,r),a=om[n];t=e[a],o=e[a+1],e[a]=i,e[a+1]=s}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=pm[r],e[1]^=hm[r]}n.fill(0)}(this.state32,this.rounds),Mh||Ih(this.state32),this.posOut=0,this.pos=0}update(e){jh(this);const{blockLen:t,state:n}=this,r=(e=zh(e)).length;for(let o=0;o<r;){const i=Math.min(t-this.pos,r-o);for(let t=0;t<i;t++)n[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,128&t&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){jh(this,!1),Ph(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,o=e.length;r<o;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Nh(e),this.xofInto(new Uint8Array(e))}digestInto(e){if($h(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:o,enableXOF:i}=this;return e||(e=new gm(t,n,r,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=r,e.enableXOF=i,e.destroyed=this.destroyed,e}}const ym=((e,t,n)=>function(e){const t=t=>e().update(zh(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}((()=>new gm(t,e,n))))(1,136,32),bm=e=>{const t=e.slice(2),n=dv(ym(t)).slice(2),r=new Array(40);for(let o=0;o<40;o++){const e=parseInt(n[o],16),i=t[o];r[o]=e>7?i.toUpperCase():i}return`0x${r.join("")}`},wm=rh(20)[1],xm=kp((e=>{const t=pv(e);if(20!==t.length)throw new Error(`Invalid length found on EthAddress(${e})`);const n=dv(t);if(e===n||e===n.toUpperCase())return t;if(bm(n)!==e)throw new Error(`Invalid checksum found on EthAddress(${e})`);return t}),xp((e=>bm(dv(wm(e)))))),km=new TextEncoder,Em=new TextDecoder,Sm=Cp(rh(4),km.encode.bind(km),Em.decode.bind(Em)),Cm=yh({engine:Sm,payload:qv()}),_m=rm({consensus:Cm,seal:Cm,preRuntime:Cm,runtimeUpdated:eh},[4,5,6,8]),Am=qv(32),Nm=yh({parentHash:Am,number:Dv,stateRoot:Am,extrinsicRoot:Am,digests:xh(_m)}),Pm=xh(Xp),jm=ch(Xp),$m=sh({bool:eh,char:eh,str:eh,u8:eh,u16:eh,u32:eh,u64:eh,u128:eh,u256:eh,i8:eh,i16:eh,i32:eh,i64:eh,i128:eh,i256:eh}),Om=xh(yh({name:jm,type:Dv,typeName:jm,docs:Pm})),Rm=yh({len:Pp,type:Dv}),Mm=yh({bitStoreType:Dv,bitOrderType:Dv}),Tm=xh(yh({name:Xp,fields:Om,index:Ap,docs:Pm})),Lm=sh({composite:Om,variant:Tm,sequence:Dv,array:Rm,tuple:xh(Dv),primitive:$m,compact:Dv,bitSequence:Mm}),Im=yh({name:Xp,type:ch(Dv)}),zm=xh(Im),Dm=yh({id:Dv,path:Pm,params:zm,def:Lm,docs:Pm}),Bm=xh(Dm),Um=sh({Blake2128:eh,Blake2256:eh,Blake2128Concat:eh,Twox128:eh,Twox256:eh,Twox64Concat:eh,Identity:eh}),Fm=xh(Um),Hm=yh({hashers:Fm,key:Dv,value:Dv}),Vm=yh({name:Xp,modifier:Ap,type:sh({plain:Dv,map:Hm}),fallback:qv(),docs:Pm}),Wm={name:Xp,storage:ch(yh({prefix:Xp,items:xh(Vm)})),calls:ch(Dv),events:ch(Dv),constants:xh(yh({name:Xp,type:Dv,value:qv(),docs:Pm})),errors:ch(Dv),index:Ap},qm={...Wm,docs:Pm},Km=new Uint8Array,Ym=e=>kp((()=>Km),(()=>e)),Qm=yh({type:Dv,version:Ap,signedExtensions:xh(yh({identifier:Xp,type:Dv,additionalSigned:Dv}))}),Gm=yh({lookup:Bm,pallets:xh(yh({...Wm,docs:Ym([])})),extrinsic:Qm,type:Dv,apis:Ym([])}),Jm=yh({name:Xp,methods:xh(yh({name:Xp,inputs:xh(yh({name:Xp,type:Dv})),output:Dv,docs:Pm})),docs:Pm}),Xm=yh({version:Ap,address:Dv,call:Dv,signature:Dv,extra:Dv,signedExtensions:xh(yh({identifier:Xp,type:Dv,additionalSigned:Dv}))}),Zm=yh({lookup:Bm,pallets:xh(yh(qm)),extrinsic:Xm,type:Dv,apis:xh(Jm),outerEnums:yh({call:Dv,event:Dv,error:Dv}),custom:xh(vh(Xp,yh({type:Dv,value:qv()})))}),eg=()=>{throw new Error("Unsupported metadata version!")},tg=kp(eg,eg),ng=yh({magicNumber:Pp,metadata:sh({v0:tg,v1:tg,v2:tg,v3:tg,v4:tg,v5:tg,v6:tg,v7:tg,v8:tg,v9:tg,v10:tg,v11:tg,v12:tg,v13:tg,v14:Gm,v15:Zm})}),rg=rh(),og=ch(rg),ig=vh(Yp,rg),sg=e=>{try{return ng.dec(e)}catch(t){}try{return ng.dec(og.dec(e))}catch(t){}try{return ng.dec(rg.dec(e))}catch(t){}try{return ng.dec(ig.dec(e)[1])}catch(t){}throw null},ag={dkLen:32},lg=e=>ov(e,ag),cg={dkLen:16},ug=e=>ov(e,cg),dg=e=>vv(ug(e),e),fg=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);function pg(e,t,n,r,o){return r=Rh(r^(e=e+t+o|0),16),{a:e,b:t=Rh(t^(n=n+r|0),12),c:n,d:r}}function hg(e,t,n,r,o){return r=Rh(r^(e=e+t+o|0),8),{a:e,b:t=Rh(t^(n=n+r|0),7),c:n,d:r}}function vg(e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,v,m,g,y,b){let w=0;for(let x=0;x<r;x++)({a:o,b:l,c:f,d:m}=pg(o,l,f,m,n[t+e[w++]])),({a:o,b:l,c:f,d:m}=hg(o,l,f,m,n[t+e[w++]])),({a:i,b:c,c:p,d:g}=pg(i,c,p,g,n[t+e[w++]])),({a:i,b:c,c:p,d:g}=hg(i,c,p,g,n[t+e[w++]])),({a:s,b:u,c:h,d:y}=pg(s,u,h,y,n[t+e[w++]])),({a:s,b:u,c:h,d:y}=hg(s,u,h,y,n[t+e[w++]])),({a:a,b:d,c:v,d:b}=pg(a,d,v,b,n[t+e[w++]])),({a:a,b:d,c:v,d:b}=hg(a,d,v,b,n[t+e[w++]])),({a:o,b:c,c:h,d:b}=pg(o,c,h,b,n[t+e[w++]])),({a:o,b:c,c:h,d:b}=hg(o,c,h,b,n[t+e[w++]])),({a:i,b:u,c:v,d:m}=pg(i,u,v,m,n[t+e[w++]])),({a:i,b:u,c:v,d:m}=hg(i,u,v,m,n[t+e[w++]])),({a:s,b:d,c:f,d:g}=pg(s,d,f,g,n[t+e[w++]])),({a:s,b:d,c:f,d:g}=hg(s,d,f,g,n[t+e[w++]])),({a:a,b:l,c:p,d:y}=pg(a,l,p,y,n[t+e[w++]])),({a:a,b:l,c:p,d:y}=hg(a,l,p,y,n[t+e[w++]]));return{v0:o,v1:i,v2:s,v3:a,v4:l,v5:c,v6:u,v7:d,v8:f,v9:p,v10:h,v11:v,v12:m,v13:g,v14:y,v15:b}}const mg=(()=>{const e=Array.from({length:16},((e,t)=>t)),t=e=>[2,6,3,10,7,0,4,13,1,11,12,5,9,14,15,8].map((t=>e[t])),n=[];for(let r=0,o=e;r<7;r++,o=t(o))n.push(...o);return Uint8Array.from(n)})();class gg extends Hh{constructor(e={},t=0){if(super(64,void 0===e.dkLen?32:e.dkLen,{},Number.MAX_SAFE_INTEGER,0,0),this.flags=0,this.chunkPos=0,this.chunksDone=0,this.stack=[],this.posOut=0,this.bufferOut32=new Uint32Array(16),this.chunkOut=0,this.enableXOF=!0,this.outputLen=void 0===e.dkLen?32:e.dkLen,Nh(this.outputLen),void 0!==e.key&&void 0!==e.context)throw new Error("Blake3: only key or context can be specified at same time");if(void 0!==e.key){const n=zh(e.key).slice();if(32!==n.length)throw new Error("Blake3: key should be 32 byte");this.IV=Oh(n),Mh||Ih(this.IV),this.flags=16|t}else if(void 0!==e.context){const n=new gg({dkLen:32},32).update(e.context).digest();this.IV=Oh(n),Mh||Ih(this.IV),this.flags=64|t}else this.IV=fg.slice(),this.flags=t;var n;this.state=this.IV.slice(),this.bufferOut=(n=this.bufferOut32,new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}get(){return[]}set(){}b2Compress(e,t,n,r=0){const{state:o,pos:i}=this,{h:s,l:a}=qh(BigInt(e),!0),{v0:l,v1:c,v2:u,v3:d,v4:f,v5:p,v6:h,v7:v,v8:m,v9:g,v10:y,v11:b,v12:w,v13:x,v14:k,v15:E}=vg(mg,r,n,7,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],fg[0],fg[1],fg[2],fg[3],s,a,i,t);o[0]=l^m,o[1]=c^g,o[2]=u^y,o[3]=d^b,o[4]=f^w,o[5]=p^x,o[6]=h^k,o[7]=v^E}compress(e,t=0,n=!1){let r=this.flags;if(this.chunkPos||(r|=1),(15===this.chunkPos||n)&&(r|=2),n||(this.pos=this.blockLen),this.b2Compress(this.chunksDone,r,e,t),this.chunkPos+=1,16===this.chunkPos||n){let e=this.state;this.state=this.IV.slice();for(let t,r=this.chunksDone+1;(n||!(1&r))&&(t=this.stack.pop());r>>=1)this.buffer32.set(t,0),this.buffer32.set(e,8),this.pos=this.blockLen,this.b2Compress(0,4|this.flags,this.buffer32,0),e=this.state,this.state=this.IV.slice();this.chunksDone++,this.chunkPos=0,this.stack.push(e)}this.pos=0}_cloneInto(e){e=super._cloneInto(e);const{IV:t,flags:n,state:r,chunkPos:o,posOut:i,chunkOut:s,stack:a,chunksDone:l}=this;return e.state.set(r.slice()),e.stack=a.map((e=>Uint32Array.from(e))),e.IV.set(t),e.flags=n,e.chunkPos=o,e.chunksDone=l,e.posOut=i,e.chunkOut=s,e.enableXOF=this.enableXOF,e.bufferOut32.set(this.bufferOut32),e}destroy(){this.destroyed=!0,this.state.fill(0),this.buffer32.fill(0),this.IV.fill(0),this.bufferOut32.fill(0);for(let e of this.stack)e.fill(0)}b2CompressOut(){const{state:e,pos:t,flags:n,buffer32:r,bufferOut32:o}=this,{h:i,l:s}=qh(BigInt(this.chunkOut++));Mh||Ih(r);const{v0:a,v1:l,v2:c,v3:u,v4:d,v5:f,v6:p,v7:h,v8:v,v9:m,v10:g,v11:y,v12:b,v13:w,v14:x,v15:k}=vg(mg,0,r,7,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],fg[0],fg[1],fg[2],fg[3],s,i,t,n);o[0]=a^v,o[1]=l^m,o[2]=c^g,o[3]=u^y,o[4]=d^b,o[5]=f^w,o[6]=p^x,o[7]=h^k,o[8]=e[0]^v,o[9]=e[1]^m,o[10]=e[2]^g,o[11]=e[3]^y,o[12]=e[4]^b,o[13]=e[5]^w,o[14]=e[6]^x,o[15]=e[7]^k,Mh||(Ih(r),Ih(o)),this.posOut=0}finish(){if(this.finished)return;this.finished=!0,this.buffer.fill(0,this.pos);let e=8|this.flags;this.stack.length?(e|=4,Mh||Ih(this.buffer32),this.compress(this.buffer32,0,!0),Mh||Ih(this.buffer32),this.chunksDone=0,this.pos=this.blockLen):e|=2|(this.chunkPos?0:1),this.flags=e,this.b2CompressOut()}writeInto(e){jh(this,!1),Ph(e),this.finish();const{blockLen:t,bufferOut:n}=this;for(let r=0,o=e.length;r<o;){this.posOut>=t&&this.b2CompressOut();const i=Math.min(t-this.posOut,o-r);e.set(n.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible after digest call");return this.writeInto(e)}xof(e){return Nh(e),this.xofInto(new Uint8Array(e))}digestInto(e){if($h(e,this),this.finished)throw new Error("digest() was already called");return this.enableXOF=!1,this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}}const yg=Uh((e=>new gg(e))),bg={dkLen:32},wg=e=>yg(e,bg),xg=e=>e,kg=(e,t,n,r)=>new DataView(new Uint16Array([e,t,n,r]).buffer).getBigUint64(0,!0),Eg=2n**64n-1n,Sg=(e,t)=>e<<t&Eg|e>>64n-t,Cg=(e,t)=>e*t&Eg,_g=(e,t)=>e+t&Eg,Ag=11400714785074694791n,Ng=14029467366897019727n,Pg=1609587929392839161n,jg=9650029242287828579n,$g=2870177450012600261n;function Og(e,t=0n){let n,r=_g(_g(t,Ag),Ng),o=_g(t,Ng),i=t,s=t-Ag,a=e.length,l=0,c=null;!function(){let t=0,n=t+a;if(a){if(c=new Uint8Array(32),a<32)return c.set(e.subarray(0,a),l),void(l+=a);if(t<=n-32){const a=n-32;do{let n;n=kg(e[t+1]<<8|e[t],e[t+3]<<8|e[t+2],e[t+5]<<8|e[t+4],e[t+7]<<8|e[t+6]),r=Cg(Sg(_g(r,Cg(n,Ng)),31n),Ag),t+=8,n=kg(e[t+1]<<8|e[t],e[t+3]<<8|e[t+2],e[t+5]<<8|e[t+4],e[t+7]<<8|e[t+6]),o=Cg(Sg(_g(o,Cg(n,Ng)),31n),Ag),t+=8,n=kg(e[t+1]<<8|e[t],e[t+3]<<8|e[t+2],e[t+5]<<8|e[t+4],e[t+7]<<8|e[t+6]),i=Cg(Sg(_g(i,Cg(n,Ng)),31n),Ag),t+=8,n=kg(e[t+1]<<8|e[t],e[t+3]<<8|e[t+2],e[t+5]<<8|e[t+4],e[t+7]<<8|e[t+6]),s=Cg(Sg(_g(s,Cg(n,Ng)),31n),Ag),t+=8}while(t<=a)}t<n&&(c.set(e.subarray(t,n),l),l=n-t)}}(),e=c||e;let u=0;for(a>=32?(n=Sg(r,1n),n=_g(n,Sg(o,7n)),n=_g(n,Sg(i,12n)),n=_g(n,Sg(s,18n)),r=Cg(Sg(Cg(r,Ng),31n),Ag),n^=r,n=_g(Cg(n,Ag),jg),o=Cg(Sg(Cg(o,Ng),31n),Ag),n^=o,n=_g(Cg(n,Ag),jg),i=Cg(Sg(Cg(i,Ng),31n),Ag),n^=i,n=_g(Cg(n,Ag),jg),s=Cg(Sg(Cg(s,Ng),31n),Ag),n^=s,n=_g(Cg(n,Ag),jg)):n=_g(t,$g),n=_g(n,BigInt(a));u<=l-8;){let t=kg(e[u+1]<<8|e[u],e[u+3]<<8|e[u+2],e[u+5]<<8|e[u+4],e[u+7]<<8|e[u+6]);t=Cg(Sg(Cg(t,Ng),31n),Ag),n=_g(Cg(Sg(n^t,27n),Ag),jg),u+=8}if(u+4<=l){let t=Cg(kg(e[u+1]<<8|e[u],e[u+3]<<8|e[u+2],0,0),Ag);n=_g(Cg(Sg(n^t,23n),Ng),Pg),u+=4}for(;u<l;){const t=Cg(kg(e[u++],0,0,0),$g);n=Cg(Sg(n^t,11n),Ag)}let d=n>>33n;return n=Cg(n^d,Ng),d=n>>29n,n=Cg(n^d,Pg),d=n>>32n,n^=d,n}const Rg=e=>{const t=new Uint8Array(16),n=new DataView(t.buffer);return n.setBigUint64(0,Og(e),!0),n.setBigUint64(8,Og(e,1n),!0),t},Mg=e=>vv(jp.enc(Og(e)),e),Tg=new TextEncoder,Lg=e=>{const t=Rg(Tg.encode(e));return(n,r,...o)=>{const i=vv(t,Rg(Tg.encode(n))),s=dv(i),a=o.map((e=>e[1])).map((e=>{switch(e){case xg:return 0;case Mg:return 8;case dg:return 16;default:return null}})).filter((e=>null!==e)),l=o.map((([{enc:e},t])=>n=>t(e(n))));return{enc:(...e)=>dv(vv(i,...e.map(((e,t)=>l[t](e))))),dec:r,keyDecoder:t=>{if(!t.startsWith(s))throw new Error(`key does not match this storage (${e}.${n})`);if(a.length!==o.length)throw new Error("Impossible to decode this key");if(0===o.length)return[];const r=t.slice(s.length),i=new Array(o.length);for(let e=0,n=0;e<a.length;e++){const t=o[e][0];n+=a[e],i[e]=t.dec(r.slice(2*n)),n+=t.enc(i[e]).length}return i}}}},Ig=Object.freeze(Object.defineProperty({__proto__:null,AccountId:cv,Bin:zv,Binary:Rv,Blake2128:ug,Blake2128Concat:dg,Blake2256:lg,Blake3256:wg,Blake3256Concat:e=>vv(wg(e),e),Bytes:rh,Enum:Zv,FixedSizeBinary:Tv,Hex:qv,Identity:xg,Option:ch,Result:fh,ScaleEnum:sh,Self:Jv,Storage:Lg,Struct:yh,Tuple:vh,Twox128:Rg,Twox256:e=>{const t=new Uint8Array(32),n=new DataView(t.buffer);return n.setBigUint64(0,Og(e),!0),n.setBigUint64(8,Og(e,1n),!0),n.setBigUint64(16,Og(e,2n),!0),n.setBigUint64(24,Og(e,3n),!0),t},Twox64Concat:Mg,Variant:rm,Vector:xh,_Enum:em,_void:eh,bitSequence:Fv,blockHeader:Nm,bool:Hp,char:Hv,compact:Yp,compactBn:Bv,compactNumber:Dv,createCodec:kp,createDecoder:xp,decAnyMetadata:sg,enhanceCodec:Cp,enhanceDecoder:Sp,enhanceEncoder:Ep,ethAccount:xm,fixedStr:e=>Cp(rh(e),(e=>Kv.encode(e)),(e=>Yv.decode(e))),fromBufferToBase58:lv,getSs58AddressInfo:sv,h64:Og,i128:zp,i16:Op,i256:Fp,i32:Rp,i64:Mp,i8:$p,metadata:ng,selfDecoder:Gv,selfEncoder:Qv,str:Xp,u128:Ip,u16:Np,u256:Up,u32:Pp,u64:jp,u8:Ap,v14:Gm,v14Lookup:Bm,v15:Zm},Symbol.toStringTag,{value:"Module"})),zg=Yp,Dg=xh(vh(Xp,zg)),Bg={bool:"boolean",str:"string",num:"number",big:"bigint",bits:"bitseq",void:"void"},Ug=rm(Object.fromEntries(Object.values(Bg).map((e=>[e,eh])))),Fg=xh(vh(Xp,ch(Jv((()=>Yg))))),Hg=xh(zg),Vg=yh({typeRef:zg,length:ch(zg)}),Wg=ch(Yp),qg=zg,Kg=yh({ok:zg,ko:zg}),Yg=rm({struct:Dg,terminal:Ug,enum:Fg,tuple:Hg,array:Vg,binary:Wg,option:qg,result:Kg}),Qg={i256:Bg.big,i128:Bg.big,i64:Bg.big,i32:Bg.num,i16:Bg.num,i8:Bg.num,u256:Bg.big,u128:Bg.big,u64:Bg.big,u32:Bg.num,u16:Bg.num,u8:Bg.num,bool:Bg.bool,char:Bg.str,str:Bg.str},Gg=e=>({type:"terminal",value:{type:e}});function Jg(e,t=()=>{}){switch(e.type){case"AccountId20":case"AccountId32":return Gg(Bg.str);case"array":return"primitive"===e.value.type&&"u8"===e.value.value?{type:"binary",value:e.len}:(t(e.value.id),{type:"array",value:{typeRef:e.value.id,length:e.len}});case"bitSequence":return Gg(Bg.bits);case"compact":return Gg(e.isBig?Bg.big:Bg.num);case"enum":return{type:"enum",value:Object.entries(e.value).map((([e,n])=>("lookupEntry"===n.type&&t(n.value.id),[e,"lookupEntry"===n.type?Jg(n.value,t):Jg(n,t)])))};case"struct":{const n=Object.entries(e.value).map((([e,t])=>[e,t.id]));return n.forEach((([,e])=>t(e))),{type:"struct",value:n}}case"tuple":{const n=e.value.map((e=>e.id));return n.forEach(t),{type:"tuple",value:n}}case"option":return t(e.value.id),{type:"option",value:e.value.id};case"primitive":return Gg(Qg[e.value]);case"result":return t(e.value.ok.id),t(e.value.ko.id),{type:"result",value:{ok:e.value.ok.id,ko:e.value.ko.id}};case"sequence":return"primitive"===e.value.type&&"u8"===e.value.value?{type:"binary",value:void 0}:(t(e.value.id),{type:"array",value:{typeRef:e.value.id}});case"void":return Gg(Bg.void)}}function Xg(e,t,n){if("option"===t.type&&null==e)return!0;const r=(e,t)=>Xg(e,t,n);switch(t.type){case"terminal":return(t=>{switch(t.value.type){case Bg.str:case Bg.big:case Bg.bool:case Bg.num:return typeof e===t.value.type;case Bg.bits:return"object"==typeof e&&null!=e&&"number"==typeof e.bitsLen&&e.bytes instanceof Uint8Array;case Bg.void:return!0}})(t);case"binary":return e instanceof Rv&&(null==t.value||e.asBytes().length>=t.value);case"array":if(!Array.isArray(e))return!1;const o=e;return!(null!=t.value.length&&o.length<t.value.length)&&o.slice(0,t.value.length).every((e=>r(e,n(t.value.typeRef))));case"enum":if(!e)return!1;const i=e,s=Object.fromEntries(t.value);if(!(i.type in s))return!1;const a=s[i.type];return null==a||r(i.value,a);case"option":return null==e||r(e,n(t.value));case"struct":return!!e&&t.value.every((([t,o])=>r(e[t],n(o))));case"tuple":return!!e&&t.value.every(((t,o)=>r(e[o],n(t))));case"result":return"success"in e&&"value"in e&&r(e.value,n(e.success?t.value.ok:t.value.ko))}}var Zg=Object.defineProperty,ey=(e,t,n)=>((e,t,n)=>t in e?Zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,t+"",n);class ty{constructor(e=[]){ey(this,"value",new Map),e.forEach((([e,t])=>this.add(e,t)))}has(e,t){var n;return(null==(n=this.value.get(e))?void 0:n.has(t))??!1}add(e,t){this.value.has(e)||this.value.set(e,new Set),this.value.get(e).add(t)}addAll(e){e.forEach((([e,t])=>this.add(e,t)))}delete(e,t){if(!this.value.has(e))return;const n=this.value.get(e);n.delete(t),n.size||this.value.delete(e)}isEmpty(){return!this.value.size}get values(){return Array.from(this.value).flatMap((([e,t])=>Array.from(t).map((t=>[e,t]))))}}var ny=(e=>(e[e.Incompatible=0]="Incompatible",e[e.Partial=1]="Partial",e[e.BackwardsCompatible=2]="BackwardsCompatible",e[e.Identical=3]="Identical",e))(ny||{});function ry(e,t,n,r,o){if(!n&&!e)return sy(3);if(!n)return sy(2);if(!e)return sy("option"===n.type?2:0);o.has(n)||o.set(n,new Map);const i=o.get(n);if(i.has(e)){const t=i.get(e);return null===t?{level:3,assumptions:new ty([[e,n]])}:sy(t)}i.set(e,null);const s=function(e,t,n){if(e.type!==t.type)return"option"===t.type?oy(n(e,t.value),2):"option"===e.type?oy(n(e.value,t),1):sy(0);switch(t.type){case"terminal":return sy(t.value.type===e.value.type?3:0);case"binary":return sy(uy(e.value,t.value));case"array":const r=e,o=sy(uy(r.value.length,t.value.length));return ay([o,()=>n(r.value.typeRef,t.value.typeRef)]);case"enum":{const r=e,o=Object.fromEntries(t.value),i=r.value.length===t.value.length?3:2;return oy(ly(r.value.map((([e,t])=>()=>e in o?n(t,o[e]):sy(0)))),i)}case"option":return n(e.value,t.value);case"struct":const i=e,s=Object.fromEntries(i.value),a=i.value.length===t.value.length?3:2;return oy(ay(t.value.map((([e,t])=>()=>n(s[e],t)))),a);case"tuple":{const r=e,o=sy(cy(r.value,t.value));return ay([o,...t.value.map(((e,t)=>()=>n(r.value[t],e)))])}case"result":const l=e;return ly([n(l.value.ok,t.value.ok),n(l.value.ko,t.value.ko)])}}(e,n,((e,n)=>ry("number"==typeof e?t(e):e,t,"number"==typeof n?r(n):n,r,o)));return s.assumptions.delete(e,n),s.assumptions.isEmpty()||0===s.level?i.set(e,s.level):i.delete(e),s}const oy=(e,t)=>({...e,level:Math.min(e.level,t)}),iy=new ty,sy=e=>({level:e,assumptions:iy}),ay=e=>{let t=sy(3);for(const n of e){const e="function"==typeof n?n():n;if(0===e.level)return e;t.assumptions.addAll(e.assumptions.values),t.level=Math.min(t.level,e.level)}return t},ly=e=>{if(!e.length)return sy(3);let t=!1,n=sy(3);for(const r of e){const e="function"==typeof r?r():r;0!==e.level?(t=!0,n.assumptions.addAll(e.assumptions.values),n.level=Math.min(n.level,e.level)):n.level=Math.min(n.level,1)}return t?n:sy(0)},cy=(e,t)=>t.length===e.length?3:e.length>=t.length?2:0,uy=(e,t)=>t===e?3:null==t||e>=t?2:null==e?1:0,dy=rm({lookup:Yp,typedef:Yg}),fy=e=>({type:"lookup",value:e}),py=e=>({type:"typedef",value:e}),hy=py({type:"terminal",value:{type:Bg.void}}),vy=yh({args:dy,values:dy});function my(e,t,n){return Xg(n,"lookup"===e.type?t(e.value):e.value,t)}const gy=()=>{},yy={body:"",call:"",continue:"",follow:"",header:"",stopOperation:"",storage:"",unfollow:"",unpin:"",followEvent:""},by={chainName:"",genesisHash:"",properties:""},wy={broadcast:"",stop:""};Object.entries({chainHead:yy,chainSpec:by,transaction:wy}).forEach((([e,t])=>{Object.keys(t).forEach((n=>{t[n]=`${e}_v1_${n}`}))}));const xy=e=>(t,n)=>{let r=e(wy.broadcast,[t],{onSuccess:t=>{r=null===t?gy:()=>{e(wy.stop,[t])},null===t&&n(new Error("Max # of broadcasted transactions has been reached"))},onError:n});return()=>{r()}};class ky extends Error{constructor(){super("ChainHead stopped"),this.name="StopError"}}class Ey extends Error{constructor(){super("ChainHead disjointed"),this.name="DisjointError"}}class Sy extends Error{constructor(){super("ChainHead operations limit reached"),this.name="OperationLimitError"}}class Cy extends Error{constructor(e){super(e),this.name="OperationError"}}class _y extends Error{constructor(){super("ChainHead operation inaccessible"),this.name="OperationInaccessibleError"}}const Ay=()=>{const e=new Map;return{has:e.has.bind(e),subscribe(t,n){e.set(t,n)},unsubscribe(t){e.delete(t)},next(t,n){var r;null==(r=e.get(t))||r.next(n)},error(t,n){const r=e.get(t);r&&(e.delete(t),r.error(n))},errorAll(t){const n=[...e.values()];e.clear(),n.forEach((e=>{e.error(t)}))}}},Ny=e=>(...t)=>new Promise(((n,r)=>{let o=mv;const[i,s]=t[t.length-1]instanceof AbortSignal?[t.slice(0,t.length-1),t[t.length-1]]:[t],a=()=>{o(),r(new gv)};null==s||s.addEventListener("abort",a,{once:!0});const l=e=>t=>{o=mv,null==s||s.removeEventListener("abort",a),e(t)};o=e(l(n),l(r),...i)})),Py=(e,t)=>n=>Ny(((r,o,...i)=>{let s=!0,a=()=>{s=!1};const[l,c]=t(...i);return n(e,l,{onSuccess:(e,t)=>{if("limitReached"===e.result)return o(new Sy);const{operationId:i}=e,l=()=>{n(yy.stopOperation,[i])};if(!s)return l();let u=gy;const d=e=>{s=!1,u(),r(e)},f=e=>{s=!1,u(),o(e)};u=t(i,{next:e=>{const t=e;"operationError"===t.event?o(new Cy(t.error)):"operationInaccessible"===t.event?o(new _y):c(e,d,f)},error:f}),a=()=>{s&&(u(),l())}},onError:o}),()=>{a()}})),jy=Py(yy.body,(e=>[[e],(e,t)=>{t(e.value)}])),$y=Py(yy.call,((e,t,n)=>[[e,t,n],(e,t)=>{t(e.output)}])),Oy=e=>t=>new Promise(((n,r)=>{e(yy.header,[t],{onSuccess:n,onError:r})})),Ry=e=>(t,n,r,o,i,s,a)=>{if(0===n.length)return s(),mv;let l=!0,c=()=>{l=!1};return e(yy.storage,[t,n,r],{onSuccess:(t,r)=>{if("limitReached"===t.result||t.discardedItems===n.length)return i(new Sy);const{operationId:u}=t;if(!l)return void e(yy.stopOperation,[u]);const d=r(t.operationId,{next:t=>{switch(t.event){case"operationStorageItems":o(t.items);break;case"operationStorageDone":p();break;case"operationError":f(new Cy(t.error));break;case"operationInaccessible":f(new _y);break;default:e(yy.continue,[t.operationId])}},error:i});c=()=>{d(),e(yy.stopOperation,[t.operationId])};const f=e=>{c=mv,d(),i(e)},p=()=>{c=mv,d(),s()};a(t.discardedItems)},onError:i}),()=>{c()}},My=e=>{const t=Ry(e);return Ny(((e,n,r,o,i,s)=>{const a=o.startsWith("descendants");let l=a?[]:null;const c=t(r,[{key:i,type:o}],s??null,a?e=>{l.push(e)}:e=>{var t;l=null==(t=e[0])?void 0:t[o]},n,(()=>{try{e(a?l.flat():l)}catch(t){n(t)}}),(e=>{e>0&&(c(),n(new Sy))}));return c}))},Ty=e=>t=>t.length>0?new Promise(((n,r)=>{e(yy.unpin,[t],{onSuccess(){n()},onError:r})})):Promise.resolve();class Ly extends Error{constructor(){super("Client destroyed"),this.name="DestroyedError"}}function Iy(e){return(t,n,r)=>{const o=Ay(),i=new Set,s=function(){let e=()=>{},t=()=>{};return{promise:new Promise(((n,r)=>{e=n,t=r})),res:e,rej:t}}();let a=s.promise;const l=e=>{if(function(e){return void 0!==e.operationId}(e))return o.has(e.operationId)||console.warn("Uknown operationId on",e),o.next(e.operationId,e);if("stop"!==e.event){if("initialized"===e.event)return n({type:e.event,finalizedBlockHashes:e.finalizedBlockHashes,finalizedBlockRuntime:e.finalizedBlockRuntime});const{event:t,...r}=e;return n({type:t,...r})}r(new ky),u(!1)},c=e=>{r(e),u(!(e instanceof Ly))};let u=e(yy.follow,[t],{onSuccess:(t,n)=>{const r=n(t,{next:l,error:c});u=(n=!0)=>{a=null,u=gy,r(),n&&e(yy.unfollow,[t]),o.errorAll(new Ey),i.forEach((e=>{e()})),i.clear()},a=t,s.res(t)},onError:e=>{e instanceof Ly?u(!1):r(e),a=null,s.res(e)}});const d=(t,n,r)=>{const s=()=>{null==r||r.onError(new Ey)};if(null===a)return s(),gy;const l=l=>{if(!r)return e(t,[l,...n]);i.add(s);const c=(e,t)=>null===a?(t.error(new Ey),gy):(o.subscribe(e,t),()=>{o.unsubscribe(e)}),u=e(t,[l,...n],{onSuccess:e=>{i.delete(s),r.onSuccess(e,c)},onError:e=>{i.delete(s),r.onError(e)}});return()=>{i.delete(s),u()}};if("string"==typeof a)return l(a);let c=gy;return a.then((e=>{if(e instanceof Error)return s();a&&(c=l(e))})),()=>{c()}};return{unfollow(){u(),a=null},body:jy(d),call:$y(d),header:Oy(d),storage:My(d),storageSubscription:Ry(d),unpin:Ty(d),_request:d}}}var zy=Object.defineProperty,Dy=(e,t,n)=>((e,t,n)=>t in e?zy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class By extends Error{constructor(e){super(e.message),Dy(this,"code"),Dy(this,"data"),this.code=e.code,this.data=e.data,this.name="RpcError"}}let Uy=1;const Fy=e=>{let t=Uy++;const n=new Map,r=Ay();let o=null;o=e((function(e){try{let t,o,i,s,a;const l=JSON.parse(e);if(({id:t,result:o,error:i,params:s}=l),t){const e=n.get(t);if(!e)return;return n.delete(t),i?e.onError(new By(i)):e.onSuccess(o,((e,t)=>{const n=e;return r.subscribe(n,t),()=>{r.unsubscribe(n)}}))}if(({subscription:a,result:o,error:i}=s),!a||!i&&!Object.hasOwn(s,"result"))throw 0;const c=a;i?r.error(c,new By(i)):r.next(c,o)}catch(t){console.warn("Error parsing incomming message: "+e),console.error(t)}}));let i=1;return{request:(e,r,s)=>{if(!o)throw new Error("Not connected");const a=`${t}-${i++}`;return s&&n.set(a,s),((e,t,n)=>{o.send(JSON.stringify({jsonrpc:"2.0",id:e,method:t,params:n}))})(a,e,r),()=>{n.delete(a)}},disconnect:()=>{null==o||o.disconnect(),o=null,r.errorAll(new Ly),n.forEach((e=>e.onError(new Ly))),n.clear()}}},Hy=e=>{const t=Ny(((t,n,r,o)=>e(r,o,{onSuccess:t,onError:n})));let n=null;return async()=>n||(n=Promise.all([t(by.chainName,[]),t(by.genesisHash,[]),t(by.properties,[])]).then((([e,t,n])=>({name:e,genesisHash:t,properties:n}))))},Vy=new Map;var Wy=function(e,t){return(Wy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function qy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Wy(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ky=function(){return Ky=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ky.apply(this,arguments)};function Yy(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Qy(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function Gy(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(l){a=[6,l],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function Jy(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xy(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function Zy(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function eb(e){return this instanceof eb?(this.v=e,this):new eb(e)}function tb(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||a(e,t)}))},t&&(r[e]=t(r[e])))}function a(e,t){try{(n=o[e](t)).value instanceof eb?Promise.resolve(n.value.v).then(l,c):u(i[0][2],n)}catch(r){u(i[0][3],r)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function u(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function nb(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Jy(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function rb(e){return"function"==typeof e}function ob(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}"function"==typeof SuppressedError&&SuppressedError;var ib=ob((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}}));function sb(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ab=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=Jy(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(p){e={error:p}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else i.remove(this);var l=this.initialTeardown;if(rb(l))try{l()}catch(h){o=h instanceof ib?h.errors:[h]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=Jy(c),d=u.next();!d.done;d=u.next()){var f=d.value;try{ub(f)}catch(v){o=null!=o?o:[],v instanceof ib?o=Zy(Zy([],Xy(o)),Xy(v.errors)):o.push(v)}}}catch(m){n={error:m}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(o)throw new ib(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)ub(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&sb(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&sb(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),lb=ab.EMPTY;function cb(e){return e instanceof ab||e&&"closed"in e&&rb(e.remove)&&rb(e.add)&&rb(e.unsubscribe)}function ub(e){rb(e)?e():e.unsubscribe()}var db=void 0,fb=!1,pb={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Zy([e,t],Xy(n)))},clearTimeout:function(e){var t=pb.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function hb(e){pb.setTimeout((function(){throw e}))}function vb(){}function mb(e){e()}var gb=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,cb(t)&&t.add(n)):n.destination=Eb,n}return qy(t,e),t.create=function(e,t,n){return new xb(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(ab),yb=Function.prototype.bind;function bb(e,t){return yb.call(e,t)}var wb=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){kb(n)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){kb(n)}else kb(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){kb(t)}},e}(),xb=function(e){function t(t,n,r){var o,i,s=e.call(this)||this;rb(t)||!t?o={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&fb?((i=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},o={next:t.next&&bb(t.next,i),error:t.error&&bb(t.error,i),complete:t.complete&&bb(t.complete,i)}):o=t;return s.destination=new wb(o),s}return qy(t,e),t}(gb);function kb(e){hb(e)}var Eb={closed:!0,next:vb,error:function(e){throw e},complete:vb},Sb="function"==typeof Symbol&&Symbol.observable||"@@observable";function Cb(e){return e}function _b(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ab(e)}function Ab(e){return 0===e.length?Cb:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Nb=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,o=this,i=(r=e)&&r instanceof gb||function(e){return e&&rb(e.next)&&rb(e.error)&&rb(e.complete)}(r)&&cb(r)?e:new xb(e,t,n);return mb((function(){var e=o,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Pb(t))((function(t,r){var o=new xb({next:function(t){try{e(t)}catch(n){r(n),o.unsubscribe()}},error:r,complete:t});n.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Sb]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ab(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Pb(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Pb(e){var t;return null!==(t=null!=e?e:db)&&void 0!==t?t:Promise}function jb(e){return function(t){if(function(e){return rb(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(n){this.error(n)}}));throw new TypeError("Unable to lift unknown Observable type")}}function $b(e,t,n,r,o){return new Ob(e,t,n,r,o)}var Ob=function(e){function t(t,n,r,o,i,s){var a=e.call(this,t)||this;return a.onFinalize=i,a.shouldUnsubscribe=s,a._next=n?function(e){try{n(e)}catch(r){t.error(r)}}:e.prototype._next,a._error=o?function(e){try{o(e)}catch(n){t.error(n)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return qy(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(gb),Rb=ob((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Mb=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return qy(t,e),t.prototype.lift=function(e){var t=new Tb(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Rb},t.prototype.next=function(e){var t=this;mb((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=Jy(t.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(e)}}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;mb((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;mb((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,o=n.isStopped,i=n.observers;return r||o?lb:(this.currentObservers=null,i.push(e),new ab((function(){t.currentObservers=null,sb(i,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,o=t.isStopped;n?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new Nb;return e.source=this,e},t.create=function(e,t){return new Tb(e,t)},t}(Nb),Tb=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return qy(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:lb},t}(Mb),Lb=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return qy(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Mb),Ib={now:function(){return(Ib.delegate||Date).now()},delegate:void 0},zb=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Ib);var o=e.call(this)||this;return o._bufferSize=t,o._windowTime=n,o._timestampProvider=r,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,n),o}return qy(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,o=n._buffer,i=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(o.push(t),!i&&o.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),o=0;o<r.length&&!e.closed;o+=n?1:2)e.next(r[o]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,o=e._infiniteTimeWindow,i=(o?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!o){for(var s=n.now(),a=0,l=1;l<r.length&&r[l]<=s;l+=2)a=l;a&&r.splice(0,a+1)}},t}(Mb),Db=function(e){function t(t,n){return e.call(this)||this}return qy(t,e),t.prototype.schedule=function(e,t){return this},t}(ab),Bb=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Zy([e,t],Xy(n)))},Ub=function(e){return clearInterval(e)},Fb=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return qy(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(o,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),Bb(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&Ub(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(o){r=!0,n=o||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,sb(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Db),Hb=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Ib.now,e}(),Vb=new(function(e){function t(t,n){void 0===n&&(n=Hb.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return qy(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(Hb))(Fb),Wb=Vb,qb=new Nb((function(e){return e.complete()}));function Kb(e){return e[e.length-1]}function Yb(e){return rb(Kb(e))?e.pop():void 0}function Qb(e){return(t=Kb(e))&&rb(t.schedule)?e.pop():void 0;var t}var Gb=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Jb(e){return rb(null==e?void 0:e.then)}function Xb(e){return rb(e[Sb])}function Zb(e){return Symbol.asyncIterator&&rb(null==e?void 0:e[Symbol.asyncIterator])}function ew(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var tw="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function nw(e){return rb(null==e?void 0:e[tw])}function rw(e){return tb(this,arguments,(function(){var t,n,r;return Gy(this,(function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,eb(t.read())];case 3:return n=o.sent(),r=n.value,n.done?[4,eb(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,eb(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function ow(e){return rb(null==e?void 0:e.getReader)}function iw(e){if(e instanceof Nb)return e;if(null!=e){if(Xb(e))return o=e,new Nb((function(e){var t=o[Sb]();if(rb(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Gb(e))return r=e,new Nb((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(Jb(e))return n=e,new Nb((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,hb)}));if(Zb(e))return sw(e);if(nw(e))return t=e,new Nb((function(e){var n,r;try{for(var o=Jy(t),i=o.next();!i.done;i=o.next()){var s=i.value;if(e.next(s),e.closed)return}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}e.complete()}));if(ow(e))return sw(rw(e))}var t,n,r,o;throw ew(e)}function sw(e){return new Nb((function(t){(function(e,t){var n,r,o,i;return Qy(this,void 0,void 0,(function(){var s,a;return Gy(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=nb(e),l.label=1;case 1:return[4,n.next()];case 2:if((r=l.sent()).done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),o={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(i=n.return)?[4,i.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function aw(e,t,n,r,o){void 0===r&&(r=0),void 0===o&&(o=!1);var i=t.schedule((function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(i),!o)return i}function lw(e,t){return void 0===t&&(t=0),jb((function(n,r){n.subscribe($b(r,(function(n){return aw(r,e,(function(){return r.next(n)}),t)}),(function(){return aw(r,e,(function(){return r.complete()}),t)}),(function(n){return aw(r,e,(function(){return r.error(n)}),t)})))}))}function cw(e,t){return void 0===t&&(t=0),jb((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function uw(e,t){if(!e)throw new Error("Iterable cannot be null");return new Nb((function(n){aw(n,t,(function(){var r=e[Symbol.asyncIterator]();aw(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function dw(e,t){if(null!=e){if(Xb(e))return function(e,t){return iw(e).pipe(cw(t),lw(t))}(e,t);if(Gb(e))return function(e,t){return new Nb((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(Jb(e))return function(e,t){return iw(e).pipe(cw(t),lw(t))}(e,t);if(Zb(e))return uw(e,t);if(nw(e))return function(e,t){return new Nb((function(n){var r;return aw(n,t,(function(){r=e[tw](),aw(n,t,(function(){var e,t,o;try{t=(e=r.next()).value,o=e.done}catch(i){return void n.error(i)}o?n.complete():n.next(t)}),0,!0)})),function(){return rb(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(ow(e))return function(e,t){return uw(rw(e),t)}(e,t)}throw ew(e)}function fw(e,t){return t?dw(e,t):iw(e)}function pw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fw(e,Qb(e))}function hw(e,t){var n=rb(e)?e:function(){return e};return new Nb((function(e){return e.error(n())}))}var vw=ob((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));function mw(e,t){var n="object"==typeof t;return new Promise((function(r,o){var i=new xb({next:function(e){r(e),i.unsubscribe()},error:o,complete:function(){n?r(t.defaultValue):o(new vw)}});e.subscribe(i)}))}function gw(e,t){return jb((function(n,r){var o=0;n.subscribe($b(r,(function(n){r.next(e.call(t,n,o++))})))}))}var yw=Array.isArray;function bw(e){return gw((function(t){return function(e,t){return yw(t)?e.apply(void 0,Zy([],Xy(t))):e(t)}(e,t)}))}var ww=Array.isArray,xw=Object.getPrototypeOf,kw=Object.prototype,Ew=Object.keys;function Sw(e){if(1===e.length){var t=e[0];if(ww(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&xw(r)===kw){var n=Ew(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}function Cw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Qb(e),r=Yb(e),o=Sw(e),i=o.args,s=o.keys;if(0===i.length)return fw([],n);var a=new Nb(function(e,t,n){void 0===n&&(n=Cb);return function(r){_w(t,(function(){for(var o=e.length,i=new Array(o),s=o,a=o,l=function(o){_w(t,(function(){var l=fw(e[o],t),c=!1;l.subscribe($b(r,(function(e){i[o]=e,c||(c=!0,a--),a||r.next(n(i.slice()))}),(function(){--s||r.complete()})))}),r)},c=0;c<o;c++)l(c)}),r)}}(i,n,s?function(e){return function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(s,e)}:Cb));return r?a.pipe(bw(r)):a}function _w(e,t,n){e?aw(n,e,t):t()}function Aw(e,t,n){return void 0===n&&(n=1/0),rb(t)?Aw((function(n,r){return gw((function(e,o){return t(n,e,r,o)}))(iw(e(n,r)))}),n):("number"==typeof t&&(n=t),jb((function(t,r){return function(e,t,n,r,o,i,s){var a=[],l=0,c=0,u=!1,d=function(){!u||a.length||l||t.complete()},f=function(e){l++;var o=!1;iw(n(e,c++)).subscribe($b(t,(function(e){t.next(e)}),(function(){o=!0}),void 0,(function(){if(o)try{for(l--;a.length&&l<r;)e=void 0,e=a.shift(),s||f(e);d()}catch(n){t.error(n)}var e})))};return e.subscribe($b(t,(function(e){return l<r?f(e):a.push(e)}),(function(){u=!0,d()}))),function(){}}(t,r,e,n)})))}function Nw(e){return void 0===e&&(e=1/0),Aw(Cb,e)}function Pw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Nw(1)(fw(e,Qb(e)))}function jw(e){return new Nb((function(t){iw(e()).subscribe(t)}))}var $w={connector:function(){return new Mb},resetOnDisconnect:!0};function Ow(e,t,n){return void 0===n&&(n=Wb),new Nb((function(t){var r,o=(r=e)instanceof Date&&!isNaN(r)?+e-n.now():e;o<0&&(o=0);var i=0;return n.schedule((function(){t.closed||(t.next(i++),t.complete())}),o)}))}function Rw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Qb(e),r=function(e,t){return"number"==typeof Kb(e)?e.pop():t}(e,1/0),o=e;return o.length?1===o.length?iw(o[0]):Nw(r)(fw(o,n)):qb}function Mw(e,t){return jb((function(n,r){var o=0;n.subscribe($b(r,(function(n){return e.call(t,n,o++)&&r.next(n)})))}))}function Tw(e){return jb((function(t,n){var r,o=null,i=!1;o=t.subscribe($b(n,void 0,void 0,(function(s){r=iw(e(s,Tw(e)(t))),o?(o.unsubscribe(),o=null,r.subscribe(n)):i=!0}))),i&&(o.unsubscribe(),o=null,r.subscribe(n))}))}function Lw(e,t){return rb(t)?Aw(e,t,1):Aw(e,1)}function Iw(e){return e<=0?function(){return qb}:jb((function(t,n){var r=0;t.subscribe($b(n,(function(t){++r<=e&&(n.next(t),e<=r&&n.complete())})))}))}function zw(e,t){return void 0===t&&(t=Cb),e=null!=e?e:Dw,jb((function(n,r){var o,i=!0;n.subscribe($b(r,(function(n){var s=t(n);!i&&e(o,s)||(i=!1,o=s,r.next(n))})))}))}function Dw(e,t){return e===t}function Bw(e,t){return jb(function(e,t,n,r,o){return function(r,i){var s=n,a=t,l=0;r.subscribe($b(i,(function(t){var n=l++;a=s?e(a,t,n):(s=!0,t),i.next(a)}),o))}}(e,t,arguments.length>=2))}function Uw(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new Mb}:t,r=e.resetOnError,o=void 0===r||r,i=e.resetOnComplete,s=void 0===i||i,a=e.resetOnRefCountZero,l=void 0===a||a;return function(e){var t,r,i,a=0,c=!1,u=!1,d=function(){null==r||r.unsubscribe(),r=void 0},f=function(){d(),t=i=void 0,c=u=!1},p=function(){var e=t;f(),null==e||e.unsubscribe()};return jb((function(e,h){a++,u||c||d();var v=i=null!=i?i:n();h.add((function(){0!==--a||u||c||(r=Fw(p,l))})),v.subscribe(h),!t&&a>0&&(t=new xb({next:function(e){return v.next(e)},error:function(e){u=!0,d(),r=Fw(f,o,e),v.error(e)},complete:function(){c=!0,d(),r=Fw(f,s),v.complete()}}),iw(e).subscribe(t))}))(e)}}function Fw(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!0!==t){if(!1!==t){var o=new xb({next:function(){o.unsubscribe(),e()}});return iw(t.apply(void 0,Zy([],Xy(n)))).subscribe(o)}}else e()}function Hw(e,t,n){var r,o,i,s,a=!1;return e&&"object"==typeof e?(r=e.bufferSize,s=void 0===r?1/0:r,o=e.windowTime,t=void 0===o?1/0:o,a=void 0!==(i=e.refCount)&&i,n=e.scheduler):s=null!=e?e:1/0,Uw({connector:function(){return new zb(s,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function Vw(e,t){return jb((function(n,r){var o=null,i=0,s=!1,a=function(){return s&&!o&&r.complete()};n.subscribe($b(r,(function(n){null==o||o.unsubscribe();var s=0,l=i++;iw(e(n,l)).subscribe(o=$b(r,(function(e){return r.next(t?t(n,e,l,s++):e)}),(function(){o=null,a()})))}),(function(){s=!0,a()})))}))}function Ww(e,t){return void 0===t&&(t=!1),jb((function(n,r){var o=0;n.subscribe($b(r,(function(n){var i=e(n,o++);(i||t)&&r.next(n),!i&&r.complete()})))}))}function qw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Yb(e);return jb((function(t,r){for(var o=e.length,i=new Array(o),s=e.map((function(){return!1})),a=!1,l=function(t){iw(e[t]).subscribe($b(r,(function(e){i[t]=e,a||s[t]||(s[t]=!0,(a=s.every(Cb))&&(s=null))}),vb))},c=0;c<o;c++)l(c);t.subscribe($b(r,(function(e){if(a){var t=Zy([e],Xy(i));r.next(n?n.apply(void 0,Zy([],Xy(t))):t)}})))}))}var Kw=Object.defineProperty,Yw=(e,t,n)=>((e,t,n)=>t in e?Kw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class Qw{constructor(){Yw(this,"first"),Yw(this,"last")}getRemoveFn(e){return()=>{e.prev?e.prev.next=e.next:this.first=e.next,e.next?e.next.prev=e.prev:this.last=e.prev,delete e.prev,delete e.next}}push(e){const t={value:e};return void 0===this.last?this.last=this.first=t:(this.last.next=t,t.prev=this.last,this.last=t),this.getRemoveFn(t)}unshift(e){return this.first={value:e,next:this.first},this.first.next&&(this.first.next.prev=this.first),this.last||(this.last=this.first),this.getRemoveFn(this.first)}pop(){var e,t;const n=null==(e=this.first)?void 0:e.value;return this.first&&(this.first=this.first.next,this.first?(null==(t=this.first.prev)||delete t.next,delete this.first.prev):this.last=void 0),n}isEmpty(){return!this.first}}const Gw=()=>{const e=new Map,t=(t,n)=>{e.set(t,(()=>{e.delete(t),n()}))},n=new Qw,r=n.unshift.bind(n),o=n.push.bind(n),i=(e,n)=>{const i=n?r:o;t(e.source$,i(e))},s=()=>{const t=n.pop();t&&(e.delete(t.source$),a(t))},a=e=>{const{source$:n,observer:r}=e;let o=!1;const a=n.subscribe({next(e){r.next(e)},error(t){(o=t instanceof Sy)?i(e,!0):r.error(t)},complete(){r.complete()}});a.closed?o||s():t(n,(()=>{a.unsubscribe(),s()}))},l=(t=!1)=>r=>new Nb((o=>{const s={observer:o,source$:r};return n.isEmpty()?a(s):i(s,t),()=>{var t,n;t=r,null==(n=e.get(t))||n()}})),c=l();return{withRecovery:l,withRecoveryFn:e=>(...t)=>c(e(...t))}};class Jw extends Error{constructor(){super("Block is not pinned"),this.name="BlockNotPinnedError"}}class Xw extends Error{constructor(){super("Block pruned"),this.name="BlockPrunedError"}}class Zw extends Error{constructor(){super("Block is not best block or finalized"),this.name="NotBestBlockError"}}const ex=new Set(["best","finalized",null]),tx=e=>{const t=e.pipe(Tw((e=>e instanceof _y?Ow(750).pipe(Lw((()=>t))):hw((()=>e)))));return t},nx=e=>(...t)=>new Nb((n=>{let r=new AbortController;return e(...t,r.signal).then((e=>{n.next(e),n.complete()}),(e=>{n.error(e)})),()=>{n.unsubscribe(),r.abort(),r=void 0}}));const rx=(e,t)=>n=>((e,t)=>e.pipe(Ww((e=>e.blocks.has(t))),zw(((e,t)=>e.finalized===t.finalized&&e.best===t.best)),Mw((e=>e.blocks.get(e.best).number>=e.blocks.get(t).number)),gw((e=>{const{number:n}=e.blocks.get(t);let r=e.blocks.get(e.best),o=e.finalized===r.hash;for(;r.number>n;)r=e.blocks.get(r.parent),o=o||e.finalized===r.hash;return o?"finalized":r.hash===t?"best":null})),zw(),Ww((e=>"finalized"!==e),!0)))(t,e).pipe(Iw(1),Vw((e=>e?n:hw((()=>new Zw))))),ox=(e,t)=>n=>new Nb((r=>{const o=t.pipe(Mw((t=>t===e))).subscribe((()=>{r.error(new Xw)})),i=n.subscribe(r);return()=>{o.unsubscribe(),i.unsubscribe()}}));function ix(e,t){return(n,...r)=>{const o=t(n,...r);return new Nb((t=>{let r=null,i=!1;let s=!1;const a=e.subscribe({next:e=>{const a=e.blocks.get(n);a?a.recovering?null==r||r.unsubscribe():i||(i=!0,r=o.subscribe({next:e=>t.next(e),error:e=>t.error(e),complete:()=>t.complete()}),r.add((()=>{i=!1,r=null}))):s&&t.error(new Jw),s=e.recovering},error:e=>t.error(e)});return()=>{a.unsubscribe(),null==r||r.unsubscribe()}}))}}const sx=e=>{let t=null,n=vb;const r=()=>{if(!t)throw new Error("Missing chainHead subscription");return t},o=e=>r().header(e).then(Nm.dec),i=function(e,t){void 0===t&&(t=$w);var n=null,r=t.connector,o=t.resetOnDisconnect,i=void 0===o||o,s=r(),a=new Nb((function(e){return s.subscribe(e)}));return a.connect=function(){return n&&!n.closed||(n=jw((function(){return e})).subscribe(s),i&&n.add((function(){return s=r()}))),n},a}(new Nb((r=>{t=e(!0,(e=>{r.next(e)}),(e=>{t=null,r.error(e)})),n=()=>{r.complete(),null==t||t.unfollow()}})).pipe((e=>t=>t.pipe(Lw((t=>"initialized"!==t.type?pw(t):e(t.finalizedBlockHashes[0]).then((e=>({...t,number:e.number,parentHash:e.parentHash})))))))(o),ax()));return{getHeader:o,getFollower:r,startFollow:()=>(i.connect(),()=>{n()}),follow$:i}},ax=()=>e=>new Nb((t=>{const n=new ab,r=()=>e.subscribe({next:e=>t.next(e),error:e=>{e instanceof ky?(t.next({type:"stop-error"}),n.add(r())):t.error(e)},complete:()=>t.complete()});return n.add(r()),n})),lx=(e,t)=>"array"===e.type&&e.len===t&&"primitive"===e.value.type&&"u8"===e.value.value,cx={type:"void"},ux=e=>{const t=((e,t=()=>null)=>{const n=new Map,r=new Set;let o=!0,i=!0;const s=(a=n=>{const r=t(e[n]);if(r)return r;const{def:a,path:u,params:d}=e[n];if("composite"===a.tag){if(0===a.value.length)return cx;if(1===a.value.length){const e=s(a.value[0].type);return o&&"AccountId32"===u.at(-1)&&lx(e,32)?(o=!1,{type:"AccountId32"}):i&&"AccountId20"===u.at(-1)&&lx(e,20)?(i=!1,{type:"AccountId20"}):e}return l(a.value)}if("variant"===a.tag){if(1===u.length&&"Option"===u[0]&&1===d.length&&"T"===d[0].name){const e=s(d[0].type);return"void"===e.type?{type:"primitive",value:"bool"}:{type:"option",value:e}}if(1===u.length&&"Result"===u[0]&&2===d.length&&"T"===d[0].name&&"E"===d[1].name)return{type:"result",value:{ok:s(d[0].type),ko:s(d[1].type)}};if(0===a.value.length)return cx;const e={},t={};return a.value.forEach((n=>{const r=n.name;t[r]=n.docs,0!==n.fields.length?1!==n.fields.length||n.fields[0].name?e[r]={...l(n.fields),idx:n.index}:e[r]={type:"lookupEntry",value:s(n.fields[0].type),idx:n.index}:e[r]={...cx,idx:n.index}})),{type:"enum",value:e,innerDocs:t}}if("sequence"===a.tag)return{type:"sequence",value:s(a.value)};if("array"===a.tag){const{len:e}=a.value,t=s(a.value.type);return e&&"void"!==t.type?e>1?{type:"array",value:t,len:a.value.len}:t:cx}if("tuple"===a.tag)return 0===a.value.length?cx:a.value.length>1?c(a.value.map((e=>s(e))),a.value.map((t=>e[t].docs))):s(a.value[0]);if("primitive"===a.tag)return{type:"primitive",value:a.value.tag};if("compact"===a.tag){const e=s(a.value);return"void"===e.type?cx:{type:"compact",isBig:Number(e.value.slice(1))>32,size:e.value}}return{type:a.tag}},e=>{let t=n.get(e);if(t)return t;if(r.has(e)){const t={id:e};return n.set(e,t),t}r.add(e);const o=a(e);return t=n.get(e),t?Object.assign(t,o):(t={id:e,...o},n.set(e,t)),r.delete(e),t});var a;const l=e=>{let t=!0;const n={},r={};return e.forEach(((e,o)=>{t=t&&!!e.name;const i=e.name||o,a=s(e.type);"void"!==a.type&&(n[i]=a,r[i]=e.docs)})),t?{type:"struct",value:n,innerDocs:r}:c(Object.values(n),Object.values(r))},c=(e,t)=>{if(e.every((t=>t.id===e[0].id))&&t.every((e=>!e.length))){const[t]=e;return"void"===t.type?cx:{type:"array",value:e[0],len:e.length}}return{type:"tuple",value:e,innerDocs:t}};return s})(e.lookup,(({def:n})=>{if("composite"===n.tag){const r=function(e){const n=2===e.value.length&&"index"===e.value[0].name&&"error"===e.value[1].name;if(!n)return null;const r=t(e.value[0].type),o=t(e.value[1].type);return"primitive"===r.type&&"u8"===r.value&&"array"===o.type&&"primitive"===o.value.type&&"u8"===o.value.value?1+o.len:null}(n);if(r)return{type:"enum",innerDocs:{},value:Object.fromEntries(e.pallets.map((e=>[e.name,null==e.errors?{...cx,idx:e.index}:{type:"lookupEntry",value:t(e.errors),idx:e.index}]))),byteLength:r}}return null}));return Object.assign(t,{metadata:e,call:(()=>{var t;if("outerEnums"in e)return e.outerEnums.call;const n=e.lookup[null==(t=e.extrinsic)?void 0:t.type],r=null==n?void 0:n.params.find((e=>"Call"===e.name));return(null==r?void 0:r.type)??null})()})},dx=zv(),fx=kp(Yp[0],Sp(Yp[1],BigInt)),px=(hx=(e,t,n,r)=>{if("primitive"===e.type)return Ig[e.value];if("void"===e.type)return eh;if("AccountId32"===e.type)return r;if("AccountId20"===e.type)return xm;if("compact"===e.type)return e.isBig?fx:Yp;if("bitSequence"===e.type)return Fv;const o=e=>px(e,t,n,r),i=(e,t)=>{const n=o(e);return t?xh(n,t):xh(n)},s=e=>vh(...e.map(o)),a=e=>{const t=Object.fromEntries(Object.entries(e).map((([e,t])=>[e,o(t)])));return yh(t)};if("sequence"===e.type&&"primitive"===e.value.type&&"u8"===e.value.value)return dx;if("array"===e.type)return"primitive"===e.value.type&&"u8"===e.value.value?zv(e.len):i(e.value,e.len);if("sequence"===e.type)return i(e.value);if("tuple"===e.type)return s(e.value);if("struct"===e.type)return a(e.value);if("option"===e.type)return ch(o(e.value));if("result"===e.type)return fh(o(e.value.ok),o(e.value.ko));const l=Object.values(e.value).map((e=>{switch(e.type){case"void":return eh;case"lookupEntry":return o(e.value);case"tuple":return s(e.value);case"struct":return a(e.value);case"array":return i(e.value,e.len)}})),c=Object.fromEntries(Object.keys(e.value).map(((e,t)=>[e,l[t]]))),u=Object.values(e.value).map((e=>e.idx)),d=u.every(((e,t)=>e===t))?rm(c):rm(c,u);return e.byteLength?yx(d,e.byteLength):d},vx=Jv,mx=e=>e,(e,t,n,...r)=>{const{id:o}=e;if(t.has(o))return t.get(o);if(n.has(o)){const n=vx((()=>t.get(o)),e,...r);return t.set(o,n),n}n.add(o);let i=hx(e,t,n,...r);return n.delete(o),t.has(o)&&(i=mx(i,t.get(o),e,...r)),t.set(o,i),i});var hx,vx,mx;const gx=(e,t=cv())=>{const n=new Map;return r=>(r=>px(e(r),n,new Set,t))(r)},yx=(e,t)=>{const n=rh(t);return kp((t=>n.enc(e.enc(t))),(t=>e.dec(n.dec(t))))},bx=e=>{var t;const{metadata:n}=e;let r=gx(e);const o=null==(t=n.pallets.find((e=>"System"===e.name)))?void 0:t.constants.find((e=>"SS58Prefix"===e.name));let i;if(o)try{const t=r(o.type).dec(o.value);"number"==typeof t&&(i=t,r=gx(e,cv(t)))}catch(c){}const s=new Map,a=e=>{switch(e.type){case"void":return eh;case"lookupEntry":return r(e.value.id);case"tuple":return vh(...Object.values(e.value).map((e=>r(e.id))));case"struct":return yh(hv(e.value,(e=>r(e.id))));case"array":return xh(r(e.value.id),e.len)}},l=t=>(r,o)=>{const i=n.pallets.find((e=>e.name===r)),s=e(i[t]);if("enum"!==s.type)throw null;const l=s.value[o];return{location:[i.index,l.idx],codec:a(s.value[o])}};return{buildDefinition:r,buildStorage:(t,o)=>{let i=s.get(t);i||s.set(t,i=Lg(t));const a=n.pallets.find((e=>e.name===t)).storage.items.find((e=>e.name===o)),l=(e,...t)=>{const n=i(...t);return{...n,len:e,fallback:1===a.modifier?n.dec(a.fallback):void 0}};if("plain"===a.type.tag)return l(0,o,r(a.type.value).dec);const{key:c,value:u,hashers:d}=a.type.value,f=r(u),p=d.map((e=>Ig[e.tag])),h=(()=>{if(1===p.length)return[[r(c),p[0]]];const t=e(c);switch(t.type){case"array":return p.map((e=>[r(t.value.id),e]));case"tuple":return t.value.map(((e,t)=>[r(e.id),p[t]]));default:throw new Error("Invalid key type")}})();return l(p.length,o,f.dec,...h)},buildEvent:l("events"),buildError:l("errors"),buildRuntimeCall:(e,t)=>{var o;const i=null==(o=n.apis.find((t=>t.name===e)))?void 0:o.methods.find((e=>e.name===t));if(!i)throw null;return{args:vh(...i.inputs.map((e=>r(e.type)))),value:r(i.output)}},buildCall:l("calls"),buildConstant:(e,t)=>{const o=n.pallets.find((t=>t.name===e)).constants.find((e=>e.name===t));return r(o.type)},ss58Prefix:i}},wx=dv(Pp.enc(15)),xx=rh(),kx=ch(xx),Ex=xh(Pp).dec,Sx=e=>t=>{const n=t(),r=new Set([n]),o=(t=>{const n=(r,o)=>{const i=t();return i?e(i,r,o).pipe(Tw((e=>{if(e instanceof Jw)return n(r,o);if(e instanceof _y)return Ow(750).pipe(Aw((()=>n(r,o))));throw e}))):qb},r=n("Metadata_metadata_versions","").pipe(gw(Ex)),o=n("Metadata_metadata","").pipe(gw((e=>{const t=xx.dec(e);return{metadata:ng.dec(t).metadata.value,metadataRaw:t}}))),i=n("Metadata_metadata_at_version",wx).pipe(gw((e=>{const t=kx.dec(e);return{metadata:ng.dec(t).metadata.value,metadataRaw:t}})));return r.pipe(Tw((()=>pw([14]))),Aw((e=>e.includes(15)?i:o)))})(t).pipe(gw((({metadata:e,metadataRaw:t})=>{const n=ux(e),r=bx(n),o=r.buildStorage("System","Events"),i=e.extrinsic.signedExtensions.find((e=>"ChargeAssetTxPayment"===e.identifier));let s=null;if(i){const e=n(i.type);if("struct"===e.type){const t=e.value.asset_id;"option"===t.type&&(s=t.value.id)}}return{assetId:s,metadataRaw:t,lookup:n,dynamicBuilder:r,events:{key:o.enc(),dec:o.dec},accountId:cv(r.ss58Prefix)}})),Hw(1)),i={at:n,runtime:o,addBlock:e=>(r.add(e),i),deleteBlocks:e=>(e.forEach((e=>{r.delete(e)})),r.size),usages:r};return o.subscribe({error(){}}),i},Cx=Uw({connector:()=>new zb(1),resetOnError:!0,resetOnComplete:!0,resetOnRefCountZero:!0}),_x=(e,t)=>()=>{const n=e.runtimes[t];if(!n)return e.blocks.has(t)?t:null;return[...n.usages].reverse().find((t=>!e.blocks.get(t).unpinned))??null},Ax=(e,t)=>{var n;null==(n=e.get(e.get(t).parent))||n.children.delete(t),e.delete(t)},Nx=(e,t,n,r)=>{const o=Rw(n,e).pipe(Bw(((e,t)=>{switch(t.type){case"initialized":if(e.recovering){t.finalizedBlockHashes.some((t=>e.blocks.has(t)))||(e=Px())}const[n]=t.finalizedBlockHashes.slice(-1);e.finalized=e.best=n;const o=t.finalizedBlockHashes.length-1;t.finalizedBlockHashes.forEach(((n,r)=>{e.blocks.has(n)?e.blocks.get(n).recovering=!1:e.blocks.set(n,{hash:n,parent:0===r?t.parentHash:t.finalizedBlockHashes[r-1],children:new Set(r===o?[]:[t.finalizedBlockHashes[r+1]]),runtime:n,refCount:0,number:t.number+r,recovering:!1})}));const s=Object.values(e.runtimes).find((e=>e.usages.has(n)));return e.finalizedRuntime=s??(e.runtimes[n]=i(_x(e,n))),e;case"stop-error":for(const t of e.blocks.values())t.recovering=!0;return e.recovering=!0,e;case"newBlock":{const{parentBlockHash:n,blockHash:r}=t;if(e.blocks.has(r))e.blocks.get(r).recovering=!1;else{const o=e.blocks.get(n);o.children.add(r),t.newRuntime&&(e.runtimes[r]=i(_x(e,r)));const s={hash:r,number:o.number+1,parent:n,children:new Set,runtime:t.newRuntime?r:o.runtime,refCount:0,recovering:!1};e.blocks.set(r,s),e.runtimes[s.runtime].addBlock(r)}return e}case"bestBlockChanged":if(e.recovering){for(const[t,n]of e.blocks)n.recovering&&Ax(e.blocks,t);e.recovering=!1}return e.best=t.bestBlockHash,e;case"finalized":{e.finalized=t.finalizedBlockHashes.slice(-1)[0];const{blocks:n}=e;return n.get(e.best).number<n.get(e.finalized).number&&(e.best=e.finalized),e.finalizedRuntime=e.runtimes[n.get(e.finalized).runtime],r(((e,t)=>{const n=[...t];let r=e.blocks.get(e.blocks.get(e.finalized).parent);const o=[];for(;r;)o.push(r.hash),0!==r.refCount||r.unpinned||(n.push(r.hash),r.unpinned=!0),r=e.blocks.get(r.parent);const i=[...t];for(let s=o.length-1;s>=0&&(r=e.blocks.get(o[s]),r.unpinned);s--)i.push(r.hash);return i.forEach((t=>{Ax(e.blocks,t)})),Object.entries(e.runtimes).map((([e,t])=>({key:e,usages:t.deleteBlocks(i)}))).filter((e=>0===e.usages)).map((e=>e.key)).forEach((t=>{delete e.runtimes[t]})),n})(e,t.prunedBlockHashes)),e}case"blockUsage":{if(!e.blocks.has(t.value.hash))return e;const n=e.blocks.get(t.value.hash);return n.refCount+="hold"===t.value.type?1:-1,0===n.refCount&&n.number<e.blocks.get(e.finalized).number&&!n.recovering&&(n.unpinned=!0,r([n.hash])),e}}}),Px()),Mw((e=>!!e.finalizedRuntime.runtime)),gw((e=>({...e}))),Cx),i=Sx(ix(o,t));return o},Px=()=>({best:"",finalized:"",runtimes:{},blocks:new Map,finalizedRuntime:{},recovering:!1}),jx=(e,t,n,r)=>{const o=t=>{return n=e.pipe(Mw((({blocks:e})=>!e.has(t)))),jb((function(e,t){iw(n).subscribe($b(t,(function(){return t.complete()}),vb)),!t.closed&&e.subscribe(t)}));var n},i=(s,a,l)=>((e,i,s)=>{if(s)return pw({hash:e,found:{type:!1,validity:null}});const a=o(e);return t(e).pipe(Aw((t=>{const o=t.indexOf(i);return o>-1?a(r(e)).pipe(gw((t=>({hash:e,found:{type:!0,index:o,events:t}})))):n(e,i).pipe(gw((t=>({hash:e,found:{type:!1,validity:t}}))))})),a)})(s,a,l.has(s)).pipe(Aw((t=>{var n;const{found:r}=t;return r.type||!1===(null==(n=r.validity)?void 0:n.success)?pw(t):e.pipe(o(s),Aw((e=>e.blocks.get(s).children)),jb((function(e,t){var n=new Set;e.subscribe($b(t,(function(e){var r=c?c(e):e;n.has(r)||(n.add(r),t.next(e))}))),u&&iw(u).subscribe($b(t,(function(){return n.clear()}),vb))})),Aw((e=>i(e,a,l))));var c,u})));return t=>e.pipe(Iw(1),Aw((e=>i(e.finalized,t,new Set(e.blocks.keys())))))},$x=new Uint8Array([2]),Ox="TaggedTransactionQueue",Rx="validate_transaction",[,Mx]=rm({InvalidTransaction:rm({Call:eh,Payment:eh,Future:eh,Stale:eh,BadProof:eh,AncientBirthBlock:eh,ExhaustsResources:eh,Custom:Ap,BadMandatory:eh,MandatoryValidation:eh,BadSigner:eh}),UnknownTransaction:rm({CannotLookup:eh,NoUnsignedValidator:eh,Custom:Ap})}),Tx=xp((e=>{const t=Ap.dec(e);if(t>1)throw new Error("Unable to decode validateTransaction result");if(!t)return{success:!0,value:void 0};let n;try{n=Mx(e)}catch(r){n={type:"UnknownInvalidTx"}}return{success:!1,value:n}})),Lx=(e,t)=>(n,r)=>{const o=t(n).pipe(gw((e=>{try{return e.dynamicBuilder.buildRuntimeCall(Ox,Rx).value[1]}catch(t){return Tx}})));return e(n,`${Ox}_${Rx}`,((e,t)=>dv(vv($x,pv(e),pv(t))))(r,n)).pipe(qw(o),gw((([e,t])=>t(e))))},Ix=({hash:e,number:t,parent:n})=>({hash:e,number:t,parent:n}),zx=e=>{const{getFollower:t,startFollow:n,follow$:r,getHeader:o}=sx(e),i=(e=>t=>(...n)=>e()[t](...n))(t),{withRecovery:s,withRecoveryFn:a}=Gw(),l=new Mb,c=e=>(t,...n)=>new Nb((r=>{l.next({type:"blockUsage",value:{type:"hold",hash:t}});const o=e(t,...n).subscribe(r);return()=>{setTimeout((()=>{l.next({type:"blockUsage",value:{type:"release",hash:t}})}),0),o.unsubscribe()}})),u=e=>{return(e=>(t,...n)=>new Nb((r=>{let o=!1;return p.pipe(Iw(1)).subscribe((e=>{const n=e.blocks.get(t);o=!!n&&!n.unpinned})),o?e(t,...n).subscribe(r):r.error(new Jw)})))(c((t=ix(p,a(nx(e))),function(e,t,n){return(r,o,...i)=>(o?_b(ox(r,t.pipe(Mw((e=>"finalized"===e.type)),Aw((e=>e.prunedBlockHashes)))),rx(r,e)):e=>e)(n(r,...i))}(p,r,t))));var t},d=(e,t=!0)=>(n,...r)=>e(n,t,...r),f=new Map,p=Nx(r,c(a(nx(i("call")))),l,(e=>{var n;n=e,t().unpin(n).catch((e=>{if(!(e instanceof Ey))throw e})),e.forEach((e=>{f.delete(e)}))})),h=c((e=>p.pipe(Iw(1),Aw((t=>t.runtimes[t.blocks.get(e).runtime].runtime))))),v=(e,t,n)=>{const r=f.get(e)??new Map,o=r.get(t);if(o)return o;f.set(e,r);const i=new zb,s=n.pipe(Uw({connector:()=>i}),(u=rb(a={complete(){r.set(t,i)}})||l||c?{next:a,error:l,complete:c}:a)?jb((function(e,t){var n;null===(n=u.subscribe)||void 0===n||n.call(u);var r=!0;e.subscribe($b(t,(function(e){var n;null===(n=u.next)||void 0===n||n.call(u,e),t.next(e)}),(function(){var e;r=!1,null===(e=u.complete)||void 0===e||e.call(u),t.complete()}),(function(e){var n;r=!1,null===(n=u.error)||void 0===n||n.call(u,e),t.error(e)}),(function(){var e,t;r&&(null===(e=u.unsubscribe)||void 0===e||e.call(u)),null===(t=u.finalize)||void 0===t||t.call(u)})))})):Cb,(e=>new Nb((t=>{const n=e.subscribe({next(e){t.next(e)},error(e){t.error(e)},complete(){t.complete()}}),r=()=>n.unsubscribe();return()=>{Promise.resolve().then(r)}}))));var a,l,c,u;return r.set(t,s),s},m=p.pipe(zw(((e,t)=>e.finalized===t.finalized)),gw((e=>Ix(e.blocks.get(e.finalized)))),Cx),g=p.pipe(zw(((e,t)=>e.best===t.best)),gw((e=>Ix(e.blocks.get(e.best)))),Cx),y=p.pipe(zw(((e,t)=>e.finalized===t.finalized&&e.best===t.best)),Bw(((e,t)=>{const n=n=>e.get(n)||Ix(t.blocks.get(n)),r=n(t.best),o=n(t.finalized),i=r.number-o.number+1,s=new Array(i);for(let a=0,l=r.hash;a<i;a++)s[a]=n(l),l=s[a].parent;return new Map(s.map((e=>[e.hash,e])))}),new Map),gw((e=>[...e.values()])),Cx),b=p.pipe(zw(((e,t)=>e.finalizedRuntime===t.finalizedRuntime)),Vw((({finalizedRuntime:{runtime:e}})=>{return e.pipe((t=null,e=>new Nb((n=>{let r=!1;const o=e.subscribe({next(e){r=!0,n.next(e)},error(e){n.error(e)},complete(){n.complete()}});return r||n.next(t),o}))));var t})),Cx),w=b.pipe(gw((e=>(null==e?void 0:e.lookup.metadata)??null))),x=((e,t)=>n=>(r,...o)=>{if(!ex.has(r))return tx(n(r,...o));const i=("best"===r?t:e).pipe(Iw(1),Aw((e=>n(e,...o))),Tw((e=>e instanceof Jw?i:hw((()=>e)))));return tx(i)})(m.pipe(gw((e=>e.hash))),g.pipe(gw((e=>e.hash)))),k=x(u(i("body"))),E=u(i("storage")),S=x(((e,t,n,r,o=null,i)=>p.pipe(Iw(1),Aw((t=>t.runtimes[t.blocks.get(e).runtime].runtime)),Aw((s=>{const a=r(s),l=v(e,`storage-${n}-${a}-${o??""}`,E(e,t,n,a,o));return i?v(e,`storage-${n}-${a}-${o??""}-dec`,l.pipe(gw((e=>i(e,s))))):l}))))),C=((e,t)=>{const n=(r,o,i,s)=>new Nb((t=>e().storageSubscription(r,o,i??null,(e=>{t.next(e)}),(e=>{t.error(e)}),(()=>{t.complete()}),(e=>{0!==e&&t.next(n(r,o.slice(-e),i,!0))})))).pipe(Nw(),t(s));return n})(t,s),_=x(c(ix(p,((e,t,n)=>C(e,t,n??null,!1))))),A=x(c(ix(p,(e=>jw((()=>o(e))))))),N=(e,t=!1)=>S(e,t,"value",(e=>e.events.key),null,((e,t)=>t.events.dec(e))),P=u(i("call")),j=x(((e,t,n,r)=>v(e,`call-${n}-${r}`,P(e,t,n,r)))),$=Lx(d(j,!1),h),O=e=>v(e,"body",k(e,!1)),R=jx(p,O,$,N),M=jx(p,O,$,(()=>pw()));Rw(b,y).subscribe({error(){}});let T=vb,L=!1,I=0;return[{follow$:r,finalized$:m,best$:g,bestBlocks$:y,runtime$:b,metadata$:w,header$:A,body$:e=>v(e,"body",k(e,!0)),call$:d(j),storage$:d(S),storageQueries$:_,eventsAt$:d(N),trackTx$:R,trackTxWithoutEvents$:M,validateTx$:$,pinnedBlocks$:p,withRuntime:e=>t=>t.pipe(((e,t=1/0)=>n=>new Nb((r=>{let o;const i=new Map,s=new Map,a=new Map;let l=0,c=0,u=0;const d=()=>{const e=i.get(c);if(!e)return void(0!==s.size||void 0!==o&&!o.closed||r.complete());const t=c++;i.delete(t),u!==t&&a.set(t,[]),s.set(t,e.subscribe({next(e){u===t?r.next(e):a.get(t).push(e)},complete(){if(s.delete(t),t===u)for(u++;a.has(u)&&(a.get(u).forEach((e=>r.next(e))),a.delete(u),!s.has(u));)u++;d()},error(e){r.error(e)}}))};return o=n.subscribe({next(n){const r=l++;i.set(r,jw((()=>e(n,r)))),s.size<t&&d()},error(e){r.error(e)},complete(){0===s.size&&r.complete()}}),()=>{s.forEach((e=>e.unsubscribe())),o.unsubscribe(),i.clear(),a.clear()}})))((t=>h(e(t)).pipe(gw((e=>[t,e])))))),getRuntimeContext$:x(h),unfollow:()=>{null!=L&&(I--,L&&!I&&(L=null,T(),T=vb))}},e=>{I+=e,L=!0,T=n()}]};const Dx=new Map;class Bx{constructor(){}_runtime(e){}}class Ux{constructor(){}_compatibility(e){}}const Fx=new WeakMap,Hx=new WeakMap,Vx=e=>e instanceof Bx?Hx.get(e):Fx.get(e);var Wx=(e=>(e.Storage="storage",e.Tx="tx",e.Event="events",e.Const="constants",e))(Wx||{});const qx=xh(vy),Kx=xh(Yg),Yx=vh(qx,Kx),Qx=new WeakMap,Gx=e=>(Qx.has(e.metadataRaw)||Qx.set(e.metadataRaw,{compat:new Map,lookup:e.lookup,typeNodes:[]}),Qx.get(e.metadataRaw)),Jx=(e,t,n)=>{const r=(e,t)=>{var n;const r=Gx(e);return(n=r.typeNodes)[t]||(n[t]=Jg(r.lookup(t)))};function o(e,o){if(e instanceof Bx)return{args:ny.Identical,values:ny.Identical};const i=Fx.get(e);o||(o=i.runtime());const s=t(i),a=n(o),l=i.typedefNodes;return function(e,t,n,r,o){const i=(e,t)=>"lookup"===e.type?t(e.value):e.value;return{args:ry(i(e.args,t),t,i(n.args,r),r,o).level,values:ry(i(n.values,r),r,i(e.values,t),t,o).level}}(s,(e=>l[e]),a,(e=>r(o,e)),Gx(o).compat)}const i=Zx(e,(e=>Xx(o(e)))),s=Zx(e,((e,t)=>i(t)>=e)),a=()=>e;return{isCompatible:s,getCompatibilityLevel:i,getCompatibilityLevels:o,waitDescriptors:a,withCompatibleRuntime:(e,t)=>n=>Cw([n.pipe(e.withRuntime(t)),a()]).pipe(gw((([[e,t],n])=>[e,n,t]))),compatibleRuntime$:(e,t)=>Cw([a(),e.getRuntimeContext$(t)]),argsAreCompatible:(e,t,i)=>{if(e instanceof Bx)return!0;const s=o(e,t);if(s.args===ny.Incompatible)return!1;if(s.args>ny.Partial)return!0;if(s.values===ny.Incompatible)return!1;return my(n(t).args,(e=>r(t,e)),i)},valuesAreCompatible:(e,n,r)=>{if(e instanceof Bx)return!0;const i=o(e,n).values;if(i===ny.Incompatible)return!1;if(i>ny.Partial)return!0;const s=Fx.get(e);return my(t(s).values,(e=>s.typedefNodes[e]),r)},getRuntimeTypedef:r}},Xx=e=>Math.min(e.args,e.values),Zx=(e,t)=>(...n)=>{const r=n.at(-1);return r instanceof Ux||r instanceof Bx?t(...n):e.then((e=>t(...n,e)))},ek=(e,t,{valuesAreCompatible:n,waitDescriptors:r,isCompatible:o,getCompatibilityLevel:i})=>{const s=new WeakMap,a=o=>{if(o){const r=Vx(o).runtime(),i=(n=>{if(s.has(n))return s.get(n);const r=n.lookup.metadata.pallets.find((t=>t.name===e)),o=null==r?void 0:r.constants.find((e=>e.name===t));if(null==o)throw new Error(`Runtime entry Constant(${e}.${t}) not found`);const i=n.dynamicBuilder.buildConstant(e,t).dec(o.value);return s.set(n,i),i})(r);if(!n(o,r,i))throw new Error(`Incompatible runtime entry Constant(${e}.${t})`);return i}return r().then(a)};return Object.assign(a,{isCompatible:o,getCompatibilityLevel:i})},tk=Uw({connector:()=>new zb(1),resetOnError:!0,resetOnComplete:!0,resetOnRefCountZero:!0}),nk=(e,t,n,{isCompatible:r,getCompatibilityLevel:o,withCompatibleRuntime:i,argsAreCompatible:s,valuesAreCompatible:a})=>{const l=()=>new Error(`Incompatible runtime entry Event(${e}.${t})`),c=n.finalized$.pipe(i(n,(e=>e.hash)),gw((([n,r,o])=>{var i;const a=null==(i=o.lookup.metadata.pallets.find((t=>t.name===e)))?void 0:i.events;if(null==a||"variant"!==o.lookup.metadata.lookup[a].def.tag||null==o.lookup.metadata.lookup[a].def.value.find((e=>e.name===t)))throw new Error(`Runtime entry Event(${e}.${t}) not found`);if(!s(r,o,null))throw l();return[n,r,o]})),((e,t=1/0)=>n=>new Nb((r=>{let o;const i=new Map,s=new Map,a=new Map;let l=0,c=0,u=0;const d=()=>{const e=i.get(c);if(!e)return void(0!==s.size||void 0!==o&&!o.closed||r.complete());const t=c++;i.delete(t),u!==t&&a.set(t,[]),s.set(t,e.subscribe({next(e){u===t?r.next(e):a.get(t).push(e)},complete(){if(s.delete(t),t===u)for(u++;a.has(u)&&(a.get(u).forEach((e=>r.next(e))),a.delete(u),!s.has(u));)u++;d()},error(e){r.error(e)}}))};return o=n.subscribe({next(n){const r=l++;i.set(r,jw((()=>e(n,r)))),s.size<t&&d()},error(e){r.error(e)},complete(){0===s.size&&r.complete()}}),()=>{s.forEach((e=>e.unsubscribe())),o.unsubscribe(),i.clear(),a.clear()}})))((([r,o,i])=>n.eventsAt$(r.hash).pipe(gw((n=>n.filter((n=>n.event.type===e&&n.event.value.type===t)).map((e=>{if(!a(o,i,e.event.value.value))throw l();return{meta:{phase:e.phase,block:r},payload:e.event.value.value}}))))))),tk);return{watch:e=>c.pipe(Aw((t=>e?t.filter((t=>e(t.payload))):t))),pull:()=>mw(c),filter:n=>n.filter((n=>n.type===e&&n.value.type===t)).map((e=>e.value.value)),getCompatibilityLevel:o,isCompatible:r}};function rk(e,t){return new Promise(((n,r)=>{let o=null,i=!1;const s=t?()=>{null==o||o.unsubscribe(),r(new gv)}:vb;o=e.subscribe({next:e=>{n(e),null==o||o.unsubscribe(),i=!0},error:e=>{null==t||t.removeEventListener("abort",s),r(e)},complete:()=>{null==t||t.removeEventListener("abort",s),r(new Error("Observable completed without emitting"))}}),i||null==t||t.addEventListener("abort",s)}))}const ok=e=>"object"==typeof e&&null!==e&&Object.entries(e).every((([e,t])=>"at"===e&&(void 0===t||"string"==typeof t)||"signal"===e&&(void 0===t||t instanceof AbortSignal))),ik=(e,t)=>n=>new Nb((r=>{let o=new Array,i=!1;const s=n.subscribe({next(n){(n=>{const s=new ab;o.push(s),o.length>t&&(o[0].unsubscribe(),o=o.slice(1));const a=e(n).subscribe({next(e){const t=o.indexOf(s);o.slice(0,t).forEach((e=>e.unsubscribe())),o=o.slice(t),r.next(e)},error(e){r.error(e)},complete(){const e=o.indexOf(s);o.splice(e,1),0===o.length&&i&&r.complete()}});s.add(a)})(n)},error(e){r.error(e)},complete(){0===o.length&&r.complete(),i=!0}});return()=>{s.unsubscribe(),o.forEach((e=>e.unsubscribe()))}})),sk=(e,t,n,{isCompatible:r,getCompatibilityLevel:o,getCompatibilityLevels:i,waitDescriptors:s,withCompatibleRuntime:a,argsAreCompatible:l,valuesAreCompatible:c})=>{const u="System"===e&&"Number"===t,d=_b(qw(n.runtime$.pipe(Mw(Boolean),Iw(1),gw((({dynamicBuilder:e})=>"bigint"==typeof e.buildStorage("System","Number").dec(new Uint8Array(32))?BigInt:Cb)),Hw())),gw((([e,t])=>t(e)))),f=()=>new Error(`Incompatible runtime entry Storage(${e}.${t})`),p=n=>new Error(`Invalid Arguments calling ${e}.${t}(${n})`),h=n=>{try{return n.dynamicBuilder.buildStorage(e,t)}catch{throw new Error(`Runtime entry Storage(${e}.${t}) not found`)}},v=async(...e)=>{const t=e[e.length-1],r=ok(t),{signal:o,at:i}=r?t:{},a=i??null;let v;if(u)v=n.bestBlocks$.pipe(gw((e=>"finalized"!==a&&a?"best"===a?e.at(0):e.find((e=>e.hash===a)):e.at(-1))),gw((e=>{if(!e)throw new Zw;return e.number})),zw(),d);else{const t=await s();v=n.storage$(a,"value",(n=>{const o=h(n),i=e.length===o.len?e:e.slice(0,-1);if(e!==i&&!r)throw p(e);if(!l(t,n,i))throw f();return o.enc(...i)}),null,((e,n)=>{const r=h(n),o=null===e?r.fallback:r.dec(e);if(!c(t,n,o))throw f();return o}))}return rk(v,o)};return{isCompatible:r,getCompatibilityLevel:o,getValue:v,getValues:(e,t)=>Promise.all(e.map((e=>v(...t?[...e,t]:e)))),getEntries:async(...e)=>{const t=e[e.length-1],r=ok(t),{signal:o,at:a}=r?t:{},l=a??null,u=await s();return rk(n.storage$(l,"descendantsValues",(t=>{const n=h(t);if(Xx(i(u,t))===ny.Incompatible)throw f();if(e.length>n.len)throw p(e);const o=e.length>0&&r?e.slice(0,-1):e;if(e.length===n.len&&o===e)throw p(e);return n.enc(...o)}),null,((e,t)=>{const n=h(t);if(e.some((({value:e})=>!c(u,t,e))))throw f();return e.map((({key:e,value:t})=>({keyArgs:n.keyDecoder(e),value:n.dec(t)})))})),o)},watchValue:(...e)=>{const t=e[e.length-1],r="best"===t||"finalized"===t?e.slice(0,-1):e;return u?n.bestBlocks$.pipe(gw((e=>e.at("best"===t?0:-1).number)),zw(),d):n["best"===t?"best$":"finalized$"].pipe((o=0,void 0===i&&(i=Vb),jb((function(e,t){var n=null,r=null,s=null,a=function(){if(n){n.unsubscribe(),n=null;var e=r;r=null,t.next(e)}};function l(){var e=s+o,r=i.now();if(r<e)return n=this.schedule(void 0,e-r),void t.add(n);a()}e.subscribe($b(t,(function(e){r=e,s=i.now(),n||(n=i.schedule(l,o),t.add(n))}),(function(){a(),t.complete()}),void 0,(function(){r=n=null})))}))),a(n,(e=>e.hash)),ik((([e,t,o])=>{const i=h(o);if(!l(t,o,r))throw f();return n.storage$(e.hash,"value",(()=>i.enc(...r))).pipe(gw((e=>{if(!c(t,o,e))throw f();return{val:e,codecs:i}})))}),4),zw(((e,t)=>e.val===t.val)),gw((({val:e,codecs:t})=>null===e?t.fallback:t.dec(e))));var o,i}}},ak=Ep(Ap.enc,(e=>+!!e.signed<<7|e.version)),lk=()=>new Error("Unkown signer"),ck={Ed25519:0,Sr25519:1,Ecdsa:2},uk=(e,t,n,r,o,i)=>{const[s,a]=(e=>{const{extrinsic:t}=e,n=ux(e);let r,o;if("address"in t)r=n(t.address),o=n(t.signature);else{const i=Object.fromEntries(e.lookup[t.type].params.filter((e=>null!=e.type)).map((e=>[e.name,n(e.type)])));if(r=i.Address,o=i.Signature,!r||!o)throw lk()}if("AccountId20"===r.type&&"array"===o.type&&65===o.len&&"primitive"===o.value.type&&"u8"===o.value.value)return[1,[]];if("enum"!==o.type||["Ecdsa","Ed25519","Sr25519"].some((e=>!(e in o.value))))throw lk();if("enum"===r.type){const e=r.value.Id;if("lookupEntry"===e.type&&"AccountId32"===e.value.type)return[0,[e.idx]]}else if("AccountId32"===r.type)return[0,[]];throw lk()})(e),l=vv(ak({signed:!0,version:4}),1===s?t:new Uint8Array([...a,...t]),1!==s&&i?new Uint8Array([ck[i],...n]):n,...r,o);return vv(Yp.enc(l.length),l)},[dk,fk]=["<Bytes>","</Bytes>"].map((e=>Rv.fromText(e).asBytes())),pk=e=>async t=>{let n,r=!0;for(n=0;r&&n<dk.length;n++)r=dk[n]===t[n];r=r&&n===dk.length;const o=t.length-fk.length;for(n=0;r&&n<fk.length;n++)r=fk[n]===t[o+n];return r=r&&n===fk.length,e(r?t:vv(dk,t,fk))};const hk=new Uint8Array,vk=e=>{const{enc:t}=e.dynamicBuilder.buildStorage("System","BlockHash");let n;try{n=t(0)}catch{n=t(0n)}return e.chainHead.storage$(e.at,"value",(()=>n),null).pipe(gw((e=>pv(e))))},mk=(e,t)=>{const n=bx(t),r=t.metadata.pallets.find((e=>"System"===e.name)).constants.find((e=>"Version"===e.name)),o=t(r.type),i=n.buildDefinition(r.type).dec;if("struct"!==o.type)throw new Error("not a struct");return pw((0,n.buildDefinition(o.value[e].id).enc)(i(r.value)[e]))};const gk=Ep(rh(2).enc,(e=>{const t=Math.max(e.period>>12,1),n=Math.min(Math.max(function(e){let t=0;for(;!(1&e);)t++,e>>=1;return t}(e.period)-1,1),15),r=e.phase/t<<4;return Np.enc(n|r)})),yk=new Uint8Array([0]),bk=yh({tip:Yp,asset:ch(rh(1/0))}).enc,wk="AccountNonceApi_account_nonce",xk={1:Ap.dec,2:Np.dec,4:Pp.dec,8:jp.dec},kk=e=>pw({value:Yp.enc(e),additionalSigned:hk}),Ek=Object.freeze(Object.defineProperty({__proto__:null,CheckGenesis:e=>vk(e).pipe(gw((e=>({value:hk,additionalSigned:e})))),CheckMetadataHash:()=>pw({value:Uint8Array.from([0]),additionalSigned:Uint8Array.from([0])}),CheckNonce:e=>e.chainHead.call$(e.at,wk,dv(e.from)).pipe(Aw((e=>{const t=pv(e),n=xk[t.length];if(!n)throw new Error(`${wk} retrieved wrong data`);return kk(n(t))}))),CheckSpecVersion:({lookupFn:e})=>mk("spec_version",e).pipe(gw((e=>({additionalSigned:e,value:hk})))),CheckTxVersion:({lookupFn:e})=>mk("transaction_version",e).pipe(gw((e=>({additionalSigned:e,value:hk})))),getNonce:kk},Symbol.toStringTag,{value:"Module"})),Sk=pw({value:hk,additionalSigned:hk}),Ck=(e,t,n)=>{if(!(t in e))return hk;const r=e[t];return r instanceof Uint8Array?r:n(r)},_k=(e,t,n,r,o,i={})=>e.getRuntimeContext$(r.hash).pipe(Iw(1),Aw((s=>{const a={lookupFn:s.lookup,dynamicBuilder:s.dynamicBuilder,chainHead:e,callData:n,at:r.hash,from:t.publicKey},l=i.mortality?i.mortality.mortal?{period:i.mortality.period,blockNumber:r.number}:void 0:{period:64,blockNumber:r.number};return Cw(Object.fromEntries(s.lookup.metadata.extrinsic.signedExtensions.map((({identifier:e,type:t,additionalSigned:n})=>[e,(()=>{if("CheckMortality"===e)return((e,t)=>{if(!e)return vk(t).pipe(gw((e=>({additionalSigned:e,value:yk}))));const{period:n,blockNumber:r}=e;return pw({additionalSigned:pv(t.at),value:gk({period:n,phase:r%n})})})(l,a);if("ChargeTransactionPayment"===e)return r=i.tip??0n,pw({value:Bv.enc(r),additionalSigned:hk});var r;if("ChargeAssetTxPayment"===e)return((e,t)=>pw({value:bk({tip:e,asset:t}),additionalSigned:hk}))(i.tip??0n,i.asset);if("CheckNonce"===e&&"nonce"in i)return kk(i.nonce);const c=Ek[e],[u]=s.dynamicBuilder.buildDefinition(t),[d]=s.dynamicBuilder.buildDefinition(n);return c?c(a):u===eh[0]&&d===eh[0]?Sk:e in o?((e,t,n)=>pw({value:Ck(e,"value",t),additionalSigned:Ck(e,"additionalSigned",n)}))(o[e],u,d):null})()])).filter((e=>e[1])))).pipe(Aw((e=>t.signTx(n,hv(e,((e,t)=>({identifier:t,...e}))),s.metadataRaw,r.number))))})));let Ak={};var Nk=Object.defineProperty,Pk=(e,t,n)=>((e,t,n)=>t in e?Nk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,t+"",n);const jk=(e,t)=>{const n=e.filter((e=>"ApplyExtrinsic"===e.phase.type&&e.phase.value===t)).map((e=>({...e.event,topics:e.topics}))),r=n[n.length-1];return"System"===r.type&&"ExtrinsicFailed"===r.value.type?{ok:!1,events:n,dispatchError:r.value.value.dispatch_error}:{ok:!0,events:n}};class $k extends Error{constructor(e){super(JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString():t instanceof Rv?t.asHex():t),2)),Pk(this,"error"),this.name="InvalidTxError",this.error=e}}const Ok=(e,t,n,r,o=!1)=>{const i=(e=>dv(lg(pv(e))))(n),s=(e,t)=>({type:e,txHash:i,...t}),a=e.pinnedBlocks$.pipe(Iw(1),gw((e=>{const t=e.blocks.get(r);return t&&!t.unpinned?t.hash:e.finalized}))).pipe(Aw((t=>e.validateTx$(t,n).pipe(Mw((e=>!e.success)),gw((e=>{throw new $k(e.value)})))))),l=new Nb((r=>{const o=e.trackTx$(n).subscribe(r);return o.add(t(n).subscribe({error(e){r.error(e)}})),o})),c=(u=l,d=e.pinnedBlocks$,new Nb((e=>{const t=new Map;let n,r;const o=()=>{var o;let i=n.best,s=t.get(i),a=n.blocks.get(i).number;for(;!s;){const e=n.blocks.get(i);if(!e)break;s=t.get(i=e.parent),a--}if(!s)return;const l=a<=n.blocks.get(n.finalized).number,c=s.found.type;c&&(null==r?void 0:r.found)&&r.hash===s.hash?l&&e.complete():(e.next(r=s.found.type?{found:c,hash:s.hash,number:a,index:s.found.index,events:s.found.events}:{found:c,validity:s.found.validity}),l&&(c?e.complete():!1===(null==(o=s.found.validity)?void 0:o.success)&&e.error(new $k(s.found.validity.value))))},i=d.pipe(zw(((e,t)=>e.finalized===t.finalized&&e.best===t.best))).subscribe({next:e=>{n=e,0!==t.size&&o()},error(t){e.error(t)}});return i.add(u.subscribe({next:e=>{t.set(e.hash,e),o()},error(t){e.error(t)}})),i})).pipe(zw(((e,t)=>e===t)))).pipe(gw((e=>{var t;return e.found?s("txBestBlocksState",{found:!0,block:{index:e.index,number:e.number,hash:e.hash},...jk(e.events,e.index)}):s("txBestBlocksState",{found:!1,isValid:!1!==(null==(t=e.validity)?void 0:t.success)})})));var u,d,f;return Pw(o?pw(s("signed",{})):qb,a,pw(s("broadcasted",{})),c.pipe((f=({found:e,type:t,...n})=>e?pw(s("finalized",n)):qb,e=>new Nb((t=>{let n=Ak,r=e.subscribe({next(e){t.next(n=e)},error(e){t.error(e)},complete(){n===Ak?t.complete():r=f(n).subscribe(t)}});return()=>{r.unsubscribe()}})))))},Rk=async(e,t,n,r)=>{return(o=Ok(e,t,n,r),new Promise((function(e,t){var n,r=!1;o.subscribe({next:function(e){n=e,r=!0},error:t,complete:function(){r?e(n):t(new vw)}})}))).then((e=>{if("finalized"!==e.type)throw null;const t={...e};return delete t.type,t}));var o},Mk=cv().enc,Tk=new Uint8Array(64),Lk=new Uint8Array(65),Ik=(e,t,n,r,{isCompatible:o,getCompatibilityLevel:i,compatibleRuntime$:s,argsAreCompatible:a,getRuntimeTypedef:l},c)=>Object.assign((o=>{const i=(n,r,o={})=>{const i=Vx(n).runtime(),{dynamicBuilder:s,assetId:u,lookup:d}=i;let f;try{f=s.buildCall(e,t)}catch{throw new Error(`Runtime entry Tx(${e}.${t}) not found`)}if(c&&!a(n,i,r))throw new Error(`Incompatible runtime entry Tx(${e}.${t})`);let p=o;if(o.asset){if(null==u||!Xg(o.asset,Jg(d(u)),(e=>l(i,e))))throw new Error("Incompatible runtime asset");p={...o,asset:s.buildDefinition(u).enc(o.asset)}}const{location:h,codec:v}=f;return{callData:Rv.fromBytes(vv(new Uint8Array(h),v.enc(r))),options:p}},u=(e,t={})=>s(n,null).pipe(gw((([n])=>i(n,e,t)))),d=(e,{at:t,...r}={})=>(t&&"finalized"!==t?"best"===t?n.best$:n.bestBlocks$.pipe(gw((e=>e.find((e=>e.hash===t))))):n.finalized$).pipe(Iw(1),Aw((i=>i?((e,{...t},r)=>u(o,t).pipe(Aw((({callData:o,options:i})=>_k(n,e,o.asBytes(),r,t.customSignedExtensions||{},i)))))(e,r,i).pipe(gw((e=>({tx:dv(e),block:i})))):hw((()=>new Error(`Uknown block ${t}`)))))),f=(e,t)=>mw(d(e,t)).then((e=>e.tx)),p=async(e,t)=>{"string"==typeof e&&(e=e.startsWith("0x")?pv(e):Mk(e));const r=20===e.length,o=function(e,t,n){return{publicKey:e,signTx:async(r,o,i,s,a=lg)=>{let l;try{const e=sg(i);if("v14"!==e.metadata.tag&&"v15"!==e.metadata.tag)throw null;l=e.metadata.value}catch(p){throw new Error("Unsupported metadata version")}const c=[],u=[];l.extrinsic.signedExtensions.map((({identifier:e})=>{const t=o[e];if(!t)throw new Error(`Missing ${e} signed extension`);c.push(t.value),u.push(t.additionalSigned)}));const d=vv(r,...c,...u),f=await n(d.length>256?a(d):d);return uk(l,e,f,c,r,t)},signBytes:pk(n)}}(e,r?"Ecdsa":"Sr25519",(e=>()=>e?Lk:Tk)(r)),i=pv(await f(o,t)),s=dv(vv(i,Pp.enc(i.length))),a=n.getRuntimeContext$(null).pipe(gw((e=>e.dynamicBuilder.buildRuntimeCall("TransactionPaymentApi","query_info").value[1])));return mw(Cw([n.call$(null,"TransactionPaymentApi_query_info",s),a]).pipe(gw((([e,t])=>t(e)))))};return{getPaymentInfo:p,getEstimatedFees:async(e,t)=>(await p(e,t)).partial_fee,decodedCall:{type:e,value:Zv(t,o)},getEncodedData:e=>e?i(e,o).callData:mw(u(o).pipe(gw((e=>e.callData)))),sign:f,signSubmitAndWatch:(e,t)=>d(e,t).pipe(Aw((({tx:e,block:t})=>Ok(n,r,e,t.hash,!0)))),signAndSubmit:(e,t)=>mw(d(e,t)).then((({tx:e,block:t})=>Rk(n,r,e,t.hash)))}}),{getCompatibilityLevel:i,isCompatible:o}),zk=(e,t,n)=>{const r={},o=e=>new Proxy(r,{get:(t,n)=>e(n)}),i=e=>{const t={};return o((n=>(t[n]||(t[n]={}),o((r=>(t[n][r]||(t[n][r]=e(n,r)),t[n][r]))))))},s=(e,t)=>e.lookup.metadata.pallets.find((e=>e.name===t)),a=i(((n,r)=>sk(n,r,t,Jx(e,(e=>e.getPalletEntryPoint(Wx.Storage,n,r)),(e=>function(e){if("plain"===e.type.tag)return{args:hy,values:fy(e.type.value)};const{key:t,value:n}=e.type.value;return{args:fy(t),values:fy(n)}}(s(e,n).storage.items.find((e=>e.name===r)))))))),l=(e,t,n,r)=>{const o=e.lookup(n);if("enum"!==o.type)throw new Error("Expected enum");const i=function(e){return"lookupEntry"===e.type?fy(e.value.id):py(Jg(e))}(o.value[r]);return{args:"args"===t?i:hy,values:"args"===t?hy:i}},c=i(((r,o)=>Ik(r,o,t,n,Jx(e,(e=>e.getPalletEntryPoint(Wx.Tx,r,o)),(e=>l(e,"args",s(e,r).calls,o))),!0))),u=i(((n,r)=>nk(n,r,t,Jx(e,(e=>e.getPalletEntryPoint(Wx.Event,n,r)),(e=>l(e,"values",s(e,n).events,r)))))),d=i(((t,n)=>ek(t,n,Jx(e,(e=>e.getPalletEntryPoint(Wx.Const,t,n)),(e=>{return r=s(e,t).constants.find((e=>e.name===n)).type,{args:hy,values:fy(r)};var r}))))),f=i(((n,r)=>((e,t,n,{isCompatible:r,getCompatibilityLevel:o,compatibleRuntime$:i,argsAreCompatible:s,valuesAreCompatible:a})=>{const l=`${e}_${t}`,c=()=>new Error(`Incompatible runtime entry RuntimeCall(${l})`);return Object.assign(((...r)=>{const o=r[r.length-1],u=ok(o),{signal:d,at:f}=u?o:{},p=f??null;return rk(i(n,p).pipe(Aw((([o,i])=>{let u;try{u=i.dynamicBuilder.buildRuntimeCall(e,t)}catch{throw new Error(`Runtime entry RuntimeCall(${l}) not found`)}if(!s(o,i,r))throw c();return n.call$(p,l,dv(u.args.enc(r))).pipe(gw(u.value.dec),gw((e=>{if(!a(o,i,e))throw c();return e})))}))),d)}),{getCompatibilityLevel:o,isCompatible:r})})(n,r,t,Jx(e,(e=>e.getApiEntryPoint(n,r)),(e=>{return t=e.lookup.metadata.apis.find((e=>e.name===n)).methods.find((e=>e.name===r)),{args:py({type:"tuple",value:t.inputs.map((e=>e.type))}),values:fy(t.output)};var t}))))),p=(r,o)=>{const{lookup:i,dynamicBuilder:a}=Vx(o).runtime();try{const o=a.buildDefinition(i.call).dec(r.asBytes()),c=o.type,u=o.value.type,d=o.value.value;return Ik(c,u,t,n,Jx(e,(e=>e.getPalletEntryPoint(Wx.Tx,c,u)),(e=>l(e,"args",s(e,c).calls,u))),!1)(d)}catch{throw new Error("createTx: invalid call data")}};return{query:a,txFromCallData:(t,n)=>n?p(t,n):e.then((e=>p(t,e))),tx:c,event:u,apis:f,constants:d}};function Dk(e){const t=(e=>{const t=Vy.get(e);if(t)return t.refCount++,t.client;const{request:n,disconnect:r}=Fy(e),o={chainHead:Iy(n),transaction:xy(n),getChainSpecData:Hy(n),destroy:()=>{const t=Vy.get(e);!t||t.refCount<=1?(Vy.delete(e),r()):t.refCount--},request:Ny(((e,t,r,o)=>n(r,o,{onSuccess:e,onError:t}))),_request:n};return Vy.set(e,{client:o,refCount:1}),o})(e),n=(e=>{const t=Dx.get(e);if(t)return t.refCount++,t.client;let n=null,r=0,o=null;const i={chainHead$:t=>{r++,o||(o=t||1),n||(n=zx(e.chainHead));const[i,s]=n;if(o===r){const e=r;r=0,o=null,n=null,s(e)}return i},broadcastTx$:(s=e.transaction,e=>new Nb((t=>s(e,(e=>{t.error(e)}))))),destroy:()=>{const t=Dx.get(e);!t||t.refCount<=1?(Dx.delete(e),e.destroy()):t.refCount--}};var s;return Dx.set(e,{client:i,refCount:1}),i})(t),r=n.chainHead$(),{getChainSpecData:o}=t,i=t.request;let s;const a=new WeakMap,l=e=>{const t=a.get(e)||((e,t)=>{const n=new Promise((async e=>{const n=t.runtime$.pipe(Mw((e=>null!=e)));let r=await mw(n);n.subscribe((e=>r=e)),e((()=>r))}));return Promise.all([e.metadataTypes.then(Yx.dec),e.descriptors,n]).then((([[e,t],n,r])=>{const o=new Ux;return Fx.set(o,{runtime:r,getPalletEntryPoint:(t,r,o)=>e[n[t][r][o]],getApiEntryPoint:(t,r)=>e[n.apis[t][r]],typedefNodes:t}),o}))})(e,r);return a.set(e,t),t},c=()=>s??(s=(e=>new Promise((async t=>{const n=e.runtime$.pipe(Mw((e=>null!=e)));let r=await mw(n);n.subscribe((e=>r=e)),t((()=>r))})).then((e=>{const t=new Bx;return Hx.set(t,{runtime:e}),t})))(r)),{broadcastTx$:u}=n;return{getChainSpecData:o,finalizedBlock$:r.finalized$,getFinalizedBlock:()=>mw(r.finalized$),bestBlocks$:r.bestBlocks$,getBestBlocks:()=>mw(r.bestBlocks$),watchBlockBody:r.body$,getBlockBody:e=>mw(r.body$(e)),getBlockHeader:e=>mw(r.header$(e??null)),submit:(...e)=>Rk(r,u,...e),submitAndWatch:(...e)=>Ok(r,u,...e),getTypedApi:e=>{const t=l(e);return Object.assign(zk(t,r,u),{compatibilityToken:t})},getUnsafeApi:()=>{const e=c();return Object.assign(zk(e,r,u),{runtimeToken:e})},destroy:()=>{r.unfollow(),n.destroy()},_request:i}}const Bk={body:"",call:"",continue:"",follow:"",header:"",stopOperation:"",storage:"",unfollow:"",unpin:""},Uk={broadcast:"",stop:""},Fk={chainName:"",genesisHash:"",properties:""};Object.entries({chainHead:Bk,chainSpec:Fk,transaction:Uk}).forEach((([e,t])=>{Object.keys(t).forEach((n=>{t[n]=`${e}_v1_${n}`}))}));const Hk=e=>({jsonrpc:"2.0",...e}),Vk=(e,t,n,r={})=>Hk({method:"chainHead_v1_followEvent",params:{subscription:e,result:{event:t,operationId:n,...r}}}),Wk=e=>{let t=0;const n=new Map;let r=()=>{};return[t=>{const{send:o,disconnect:i}=e((e=>{(({id:e,error:t,result:r})=>{const o=n.get(e);return o&&(n.delete(e),t?o(!1,t):o(!0,r)),!o})(e)&&t(e)}));return r=o,{send:r,disconnect:()=>{n.clear(),i()}}},(e,o,i,s)=>{const a="__INNER_RQ_DesV"+t++;n.set(a,((e,t)=>{(e?i:s)(t)})),r(Hk({id:a,method:e,params:o}))}]};let qk=0;const Kk=e=>(t,n,r,o,i)=>{let s=!0,a=!1,l=0;const c=e=>{s&&(s=!1,o(e))},u=o=>{e("state_getKeysPaged",[t,1e3,o||void 0,n],(t=>{s&&(t.length>0&&(l++,e("state_queryStorageAt",[t,n],(([{changes:e}])=>{s&&(l--,r(e),a&&!l&&i())}),c)),t.length<1e3?(a=!0,l||i()):u(t.at(-1)))}),c)};return u(),()=>{s=!1}},Yk=new Set(["BodyDone","CallDone","StorageDone","Inaccessible","Error"].map((e=>"operation"+e))),Qk=e=>{var t,n;return Yk.has(null==(n=null==(t=e.params)?void 0:t.result)?void 0:n.event)},Gk=e=>({jsonrpc:"2.0",...e}),[Jk]=Uk.stop.split("_"),Xk="unstable",Zk="rpc_methods",eE="__INTERNAL_ID",tE=((...e)=>t=>(e=>{let t=null;const{send:n,disconnect:r}=e((e=>{null==t||t(JSON.stringify(e))}));return e=>(t=e,{send(e){n(JSON.parse(e))},disconnect(){t=null,r()}})})(e.reduce(((e,t)=>t(e)),(e=>{let t=null;const{send:n,disconnect:r}=e((e=>{null==t||t(JSON.parse(e))}));return e=>(t=e,{send(e){n(JSON.stringify(e))},disconnect(){t=null,r()}})})(t))))((e=>t=>{let n=0;const r=new Map,{send:o,disconnect:i}=e((e=>{r.has(e.id)&&(e.id=r.get(e.id)),t(e)}));return{send:e=>{if("id"in e){const t=n++;r.set(t,e.id),e.id=t}o(e)},disconnect:i}}),(e=>t=>{let n=!0,r=[],o=e=>{r.push(e)},i=({id:e,result:a,error:u})=>{if(e!==eE||!n)return;if(!a){if(console.error(u),l<4)return void setTimeout(c,200);a={methods:[]}}const d=new Set(a.methods),f={};[Bk,Fk,Uk].forEach((e=>{Object.values(e).forEach((e=>{if(d.has(e))f[e]=e;else{const[t,,n]=e.split("_"),r=`${t}_${Xk}_${n}`;if(d.has(r))f[e]=r,d.delete(r),d.add(e);else if(f[e]=null,t===Jk){let t;const n="stop"===e?"unwatch":"submitAndWatch";[Jk+"Watch",Jk].find((e=>["v1",Xk].find((r=>d.has(t=`${e}_${r}_${n}`)))))&&(f[e]=t,d.add(e))}}}))})),i=t;const p=({method:e,...n})=>{if(e===Zk)return void Promise.resolve().then((()=>{t(Gk({id:n.id,result:{methods:[...d]}}))}));const r=f[e];null===r?Promise.resolve().then((()=>{t({error:{code:-32603,message:`Method not found: ${e}`},id:n.id})})):s({method:r||e,...n})};for(let t=0;n&&t<r.length;t++)p(r[t]);r=[],n&&(o=p)};const{send:s,disconnect:a}=e((e=>{i(e)}));let l=0;const c=()=>{l++,s(Gk({id:eE,method:Zk,params:[]}))};return c(),{send:e=>{o(e)},disconnect(){n=!1,o=i=()=>{},r=[],a()}}}),(e=>t=>{const n=new Set,r=new Map,o=new Map,i=new Map,{send:s,disconnect:a}=e((e=>{var s,a;if("id"in e){t(e);const{id:l,result:c}=e;if(n.has(l))return n.delete(l),o.set(c,new Set),void i.set(c,new Map);const u=r.get(l);if(void 0!==u){r.delete(l);const n=null==(s=e.result)?void 0:s.operationId;if(void 0!==n&&o.has(u)){const e=o.get(u);e.add(n);const r=null==(a=i.get(u))?void 0:a.get(n);r&&(r.forEach(t),i.get(u).delete(n),Qk(r.at(-1))&&e.delete(n))}}}else{const{subscription:n,result:r}=e.params,s=o.get(n);if(s){const{operationId:t}=e.params.result;if(void 0!==t){if(!s.has(t)){const r=i.get(n),o=r.get(t)??[];return o.push(e),void r.set(t,o)}Qk(e)&&s.delete(t)}else"stop"===(null==r?void 0:r.event)&&(o.delete(n),i.delete(n))}t(e)}}));return{send:e=>{var t;const a=e.params[0];switch(e.method){case Bk.follow:n.add(e.id);break;case Bk.body:case Bk.call:case Bk.storage:r.set(e.id,a);break;case Bk.unfollow:o.delete(a),i.delete(a);break;case Bk.stopOperation:null==(t=o.get(a))||t.delete(e.params[1])}s(e)},disconnect:a}}),(e=>t=>{const{send:n,disconnect:r}=e(t);return{send:e=>{const{method:t,params:r,id:o,...i}=e;t==Bk.unpin&&r&&Array.isArray(r[1])?r[1].forEach(((e,s)=>{n({...i,id:0===s?o:`${o}-patched-${s}`,method:t,params:[r[0],e]})})):n(e)},disconnect:r}}),(e=>t=>e((e=>{var n;const r=null==(n=e.params)?void 0:n.result;if(!("id"in e)&&r){const{prunedBlockHashes:e,finalizedBlockHash:t,event:n}=r;"finalized"===n&&Array.isArray(e)?r.prunedBlockHashes=[...new Set(r.prunedBlockHashes)]:"initialized"===n&&t&&(r.finalizedBlockHashes=[r.finalizedBlockHash],delete r.finalizedBlockHash)}t(e)}))),(e=>t=>{const n=new Set,r=new Map,o=new Map,{send:i,disconnect:s}=e((e=>{if("id"in e){t(e);const{id:i,result:s}=e;if(n.has(i))return n.delete(i),r.set(s,new Set),void o.set(s,new Map)}else{const{subscription:n}=e.params,i=r.get(n),s=o.get(n);if(i){const r=e.params.result,{event:a}=r;if("initialized"===a&&r.finalizedBlockHashes.forEach((e=>{i.add(e)})),"newBlock"===a){const{parentBlockHash:n}=r;if(!i.has(n)){const t=s.get(n)??[];return t.push(e),void s.set(n,t)}const o=r.blockHash;i.add(r.blockHash),t(e);const a=s.get(o);return void(a&&(s.delete(o),a.forEach((e=>{i.add(e.params.result.blockHash),t(e)}))))}"stop"===a&&(i.delete(n),o.delete(n))}t(e)}}));return{send:e=>{const t=e.params[0];switch(e.method){case Bk.follow:n.add(e.id);break;case Bk.unpin:const[i,s]=e.params;s.forEach((e=>{var t,n;null==(t=r.get(i))||t.delete(e),null==(n=o.get(i))||n.delete(e)}));break;case Bk.unfollow:r.delete(t),o.delete(t)}i(e)},disconnect:s}}),(e=>t=>{const n=new Set,r=new Map,o=new Map,{send:i,disconnect:s}=e((e=>{if("id"in e){t(e);const{id:i,result:s}=e;if(n.has(i))return n.delete(i),r.set(s,new Set),void o.set(s,new Map)}else{const{subscription:n}=e.params,i=r.get(n),s=o.get(n);if(i){const r=e.params.result,{event:a}=r;if("initialized"===a&&r.finalizedBlockHashes.forEach((e=>{i.add(e)})),"finalized"===a&&(r.prunedBlockHashes=r.prunedBlockHashes.filter((e=>{i.has(e)}))),"newBlock"===a){i.add(r.blockHash);const n=r.blockHash,o=s.get(n);if(o)return s.delete(n),t(e),void Promise.resolve().then((()=>{t(o)}))}if("bestBlockChanged"===a){const t=r.bestBlockHash;if(!i.has(t))return void o.get(n).set(t,e)}"stop"===a&&(i.delete(n),o.delete(n))}t(e)}}));return{send:e=>{const t=e.params[0];switch(e.method){case Bk.follow:n.add(e.id);break;case Bk.unpin:const[i,s]=e.params;s.forEach((e=>{var t,n;null==(t=r.get(i))||t.delete(e),null==(n=o.get(i))||n.delete(e)}));break;case Bk.unfollow:r.delete(t),o.delete(t)}i(e)},disconnect:s}}),(e=>t=>{const{send:n,disconnect:r}=e(t);return{send:e=>{switch(e.method){case Fk.chainName:return n({...e,method:"system_chain"});case Fk.genesisHash:return n({...e,method:"chain_getBlockHash",params:[0]});case Fk.properties:return n({...e,method:"system_properties"})}n(e)},disconnect:r}}),(e=>t=>{const[n,r]=Wk(e),o=Kk(r),i=new Map,s=new Map,{send:a,disconnect:l}=n((e=>{if("id"in e){const t=i.get(e.id);t&&(i.delete(e.id),"started"===e.result.result&&t(e.result.operationId))}else if(e.params){const{subscription:t,result:n}=e.params,{operationId:r}=n||{},o=s.get(t);o&&"stop"===n.event&&(o.forEach((e=>{e.cancel()})),s.delete(t));const i=null==o?void 0:o.get(r);if(i)switch(n.event){case"operationInaccessible":case"operationError":i.cancel();break;case"operationStorageDone":if(!i.isInnerDone)return void(i.isOutterDone=!0);o.delete(r)}}t(e)}));return{send:e=>{var n,r;switch(e.method){case Bk.storage:{const[n,r,l]=e.params,c=[],u=l.filter((e=>{const t="descendantsValues"===e.type;return t&&c.push(e.key),!t})),d=((e,n,r)=>i=>{let l=()=>{};s.has(e)||s.set(e,new Map);const c=s.get(e),u={isOutterDone:!1,isInnerDone:!1,cancel:()=>{l()}};c.set(i,u);let d=0;const f=r.map((s=>o(s,n,(n=>{t(Vk(e,"operationStorageItems",i,{items:n.map((([e,t])=>({key:e,value:t})))}))}),(n=>{l(),u.isOutterDone||a(Hk({method:"chainHead_v1_stopOperation",params:[i]})),t(Vk(e,"operationError",i,{error:"string"==typeof n?n:JSON.stringify(n)}))}),(()=>{++d===r.length&&(u.isOutterDone?(l(),t(Vk(e,"operationStorageDone",i))):u.isInnerDone=!0)}))));l=()=>{c.delete(i),f.forEach((e=>e()))}})(n,r,c);if(!u.length){const r="__INNER_OP_DesV"+qk++;return t(Hk({id:e.id,result:{result:"started",operationId:r}})),d(r),void(s.get(n).get(r).isOutterDone=!0)}c.length&&i.set(e.id,d),e.params[2]=u;break}case Bk.stopOperation:{const[t,r]=e.params,o=null==(n=s.get(t))?void 0:n.get(r);if(o&&(o.cancel(),o.isOutterDone))return;break}case Bk.unfollow:{const[t]=e.params;null==(r=s.get(t))||r.forEach((e=>e.cancel())),s.delete(t);break}}a(e)},disconnect:l}})),nE=e=>JSON.stringify({jsonrpc:"2.0",...e}),rE=new Set(["v1","unstable"].map((e=>`chainHead_${e}_unfollow`))),oE=e=>t=>{let n=(e=>{let t={type:1,pending:[]};const n=n=>{var r;if(0===t.type){const e=JSON.parse(n);if("id"in e)0===(null==(r=t.onGoingRequests.get(e.id))?void 0:r.type)&&t.activeChainHeads.add(e.result),t.onGoingRequests.delete(e.id);else{const{subscription:n,result:r}=e.params;"stop"===(null==r?void 0:r.event)&&t.activeChainHeads.delete(n)}}2!==t.type&&e(n)},r=e=>{if(2===t.type)return;if(1===t.type)return void t.pending.push(e);const n=JSON.parse(e);if(rE.has(n.method)&&t.activeChainHeads.delete(n.params[0]),"id"in n){const{method:r,id:o}=n,i=r.startsWith("chainHead")?r.endsWith("follow")?{type:0,msg:e}:{type:1,id:o}:{type:2,msg:e};t.onGoingRequests.set(o,i)}t.connection.send(e)};return{send:r,disconnect:()=>{2!==t.type&&(0===t.type&&t.connection.disconnect(),t={type:2})},connect:e=>{if(1!==t.type)throw new Error("Nonesense");const{pending:o}=t,i=new Map,s=new Set;t={type:0,connection:e(n,(()=>{t={type:1,pending:[]},s.forEach((e=>{n(nE({params:{subscription:e,result:{event:"stop",internal:!0}}}))})),s.clear();for(const e of i.values())1===e.type?n(nE({id:e.id,error:{code:-32603,message:"Internal error"},internal:!0})):r(e.msg);i.clear()})),onGoingRequests:i,activeChainHeads:s},o.forEach(r)}}})(t);const r=()=>{e().then((e=>{if(n)n.connect(((t,n)=>e(t,(()=>{n(),r()}))));else try{e((()=>{}),(()=>{})).disconnect()}catch(t){}}),(()=>{n&&setTimeout(r,0)}))};return r(),{send:e=>{null==n||n.send(e)},disconnect:()=>{null==n||n.disconnect(),n=null}}};var iE=(e=>(e[e.CONNECTING=0]="CONNECTING",e[e.CONNECTED=1]="CONNECTED",e[e.ERROR=2]="ERROR",e[e.CLOSE=3]="CLOSE",e))(iE||{});const sE={type:iE.ERROR,event:{type:"timeout"}},aE=()=>{},lE=e=>e.map((e=>"string"==typeof e?[e]:[e.uri,e.protocol])),cE=(uE=WebSocket,(...e)=>{let t=[],n=aE,r=3500;const[o]=e;1!==e.length||"object"!=typeof o||Array.isArray(o)?("function"==typeof e[1]&&(n=e[1]),Array.isArray(o)?t=lE(o):(t=[[o]],e[1]&&e[1]!==n&&(t[0][1]=e[1]),e[2]&&(n=e[2]))):(t=lE(o.endpoints),n=o.onStatusChanged??aE,r=o.timeout??r);let i,s=0,a=null,l=aE;const c=oE((async()=>{const[e,o]=a||t[s++%t.length];a=null;const c=new uE(e,o),u=()=>{try{c.addEventListener("error",aE,{once:!0}),c.close()}catch{}};return n(i={type:iE.CONNECTING,uri:e,protocols:o}),await new Promise(((t,s)=>{const a=()=>{p(),t()},d=t=>{p(),null==t&&u(),console.error(`Unable to connect to ${e}${o?", protocols: "+o:""}`),n(i={type:t?iE.ERROR:iE.CLOSE,event:t}),setTimeout(s,t?300:0,t)},f=r!==1/0?setTimeout((()=>{p(),u(),n(i=sE),s(sE.event)}),r):void 0,p=()=>{clearTimeout(f),c.removeEventListener("error",d),c.removeEventListener("open",a)};c.addEventListener("open",a),c.addEventListener("error",d),l=()=>{d(null)}})),n(i={type:iE.CONNECTED,uri:e,protocols:o}),(e,t)=>{const r=t=>{"string"==typeof t.data&&e(t.data)},o=e=>r=>{console.warn(`WS halt (${e})`),n(i={type:e,event:r}),t()},s=o(iE.ERROR),a=o(iE.CLOSE);return c.addEventListener("message",r),c.addEventListener("error",s),c.addEventListener("close",a),l=e=>{l=aE,c.removeEventListener("message",r),c.removeEventListener("error",s),c.removeEventListener("close",a),u(),e&&a({})},{send:e=>{c.send(e)},disconnect:l}}}));return c.getStatus=()=>i,c.switch=(...e)=>{i.type!==iE.CLOSE&&(e.length&&(a=e),i.type!==iE.ERROR&&l(!0))},c});var uE;const dE={BASE_URL:"./",DEV:!1,MODE:"production",PROD:!0,SSR:!1};let fE=0;function pE(e,t){const n="atom"+ ++fE,r={toString(){return"production"!==(dE?"production":void 0)&&this.debugLabel?n+":"+this.debugLabel:n}};return"function"==typeof e?r.read=e:(r.init=e,r.read=hE,r.write=vE),t&&(r.write=t),r}function hE(e){return e(this)}function vE(e,t,n){return t(this,"function"==typeof n?n(e(this)):n)}const mE=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,gE=e=>"init"in e,yE=e=>!!e.write,bE=new WeakMap,wE=e=>{var t;return xE(e)&&!(null==(t=bE.get(e))?void 0:t[1])},xE=e=>"function"==typeof(null==e?void 0:e.then),kE=e=>"v"in e||"e"in e,EE=e=>{if("e"in e)throw e.e;if("production"!==(dE?"production":void 0)&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v},SE=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then((()=>{n.p.delete(e)}),(()=>{n.p.delete(e)})))},CE=(e,t,n,r,o)=>{var i;if("production"!==(dE?"production":void 0)&&r===t)throw new Error("[Bug] atom cannot depend on itself");n.d.set(r,o.n),wE(n.v)&&SE(t,n.v,o),null==(i=o.m)||i.t.add(t),e&&NE(e,r,t)},_E=()=>[new Map,new Map,new Set],AE=(e,t,n)=>{e[0].has(t)||e[0].set(t,new Set),e[1].set(t,n)},NE=(e,t,n)=>{const r=e[0].get(t);r&&r.add(n)},PE=(e,t)=>{e[2].add(t)},jE=e=>{let t,n=!1;const r=e=>{try{e()}catch(r){n||(t=r,n=!0)}};for(;e[1].size||e[2].size;){e[0].clear();const t=new Set(e[1].values());e[1].clear();const n=new Set(e[2]);e[2].clear(),t.forEach((e=>{var t;return null==(t=e.m)?void 0:t.l.forEach(r)})),n.forEach(r)}if(n)throw t},$E=(...[e,t,n,r])=>{let o;"production"!==(dE?"production":void 0)&&(o=new Set);const i=(t,n,r)=>{const o="v"in n,i=n.v,s=wE(n.v)?n.v:null;if(xE(r)){(e=>{if(bE.has(e))return;const t=[new Set,!1];bE.set(e,t);const n=()=>{t[1]=!0};e.then(n,n),e.onCancel=e=>{t[0].add(e)}})(r);for(const o of n.d.keys())SE(t,r,e(o));n.v=r,delete n.e}else n.v=r,delete n.e;o&&Object.is(i,n.v)||(++n.n,s&&((e,t)=>{const n=bE.get(e);if(n)n[1]=!0,n[0].forEach((e=>e(t)));else if("production"!==(dE?"production":void 0))throw new Error("[Bug] cancelable promise not found")})(s,r))},s=(n,r,o)=>{var a;const l=e(r);if(kE(l)){if(l.m&&!(null==o?void 0:o.has(r)))return l;if(Array.from(l.d).every((([e,t])=>s(n,e,o).n===t)))return l}l.d.clear();let c=!0;const f=t=>{if(mE(r,t)){const n=e(t);if(!kE(n)){if(!gE(t))throw new Error("no atom init");i(t,n,t.init)}return EE(n)}const a=s(n,t,o);try{return EE(a)}finally{if(c)CE(n,r,l,t,a);else{const e=_E();CE(e,r,l,t,a),d(e,r,l),jE(e)}}};let p,h;const v={get signal(){return p||(p=new AbortController),p.signal},get setSelf(){return"production"===(dE?"production":void 0)||yE(r)||console.warn("setSelf function cannot be used with read-only atom"),!h&&yE(r)&&(h=(...e)=>{if("production"!==(dE?"production":void 0)&&c&&console.warn("setSelf function cannot be called in sync"),!c)return u(r,...e)}),h}};try{const e=t(r,f,v);if(i(r,l,e),xE(e)){null==(a=e.onCancel)||a.call(e,(()=>null==p?void 0:p.abort()));const t=()=>{if(l.m){const e=_E();d(e,r,l),jE(e)}};e.then(t,t)}return l}catch(m){return delete l.v,l.e=m,++l.n,l}finally{c=!1}},a=(t,n,r)=>{var o,i;const s=new Map;for(const a of(null==(o=r.m)?void 0:o.t)||[]){const t=e(a);t.m&&s.set(a,t)}for(const a of r.p)s.set(a,e(a));return null==(i=((e,t)=>e[0].get(t))(t,n))||i.forEach((t=>{s.set(t,e(t))})),s};const l=(e,t,n)=>{const[r,o]=function(e,t,n){const r=[],o=new Set,i=new Set,s=[[t,n]];for(;s.length>0;){const[t,n]=s[s.length-1];if(i.has(t))s.pop();else if(o.has(t))r.push([t,n,n.n]),i.add(t),s.pop();else{o.add(t);for(const[r,i]of a(e,t,n))t===r||o.has(r)||s.push([r,i])}}return[r,i]}(e,t,n),i=new Set([t]);for(let a=r.length-1;a>=0;--a){const[t,n,l]=r[a];let c=!1;for(const e of n.d.keys())if(e!==t&&i.has(e)){c=!0;break}c&&(s(e,t,o),d(e,t,n),l!==n.n&&(AE(e,t,n),i.add(t))),o.delete(t)}},c=(t,r,...o)=>{let a=!0;const u=e=>EE(s(t,e)),f=(n,...o)=>{const s=e(n);try{if(mE(r,n)){if(!gE(n))throw new Error("atom not writable");const e=s.n,r=o[0];return i(n,s,r),d(t,n,s),void(e!==s.n&&(AE(t,n,s),l(t,n,s)))}return c(t,n,...o)}finally{a||jE(t)}};try{return n(r,u,f,...o)}finally{a=!1}},u=(e,...t)=>{const n=_E();try{return c(n,e,...t)}finally{jE(n)}},d=(t,n,r)=>{if(r.m&&!wE(r.v)){for(const o of r.d.keys())if(!r.m.d.has(o)){f(t,o,e(o)).t.add(n),r.m.d.add(o)}for(const o of r.m.d||[])if(!r.d.has(o)){r.m.d.delete(o);const i=p(t,o,e(o));null==i||i.t.delete(n)}}},f=(t,n,i)=>{if(!i.m){s(t,n);for(const r of i.d.keys()){f(t,r,e(r)).t.add(n)}if(i.m={l:new Set,d:new Set(i.d.keys()),t:new Set},"production"!==(dE?"production":void 0)&&o.add(n),yE(n)){const e=i.m;let o;const s=(e,t)=>{let r=!0;o=(...t)=>{try{return c(e,n,...t)}finally{r||jE(e)}};try{return t()}finally{r=!1}};PE(t,(()=>{const i=s(t,(()=>r(n,((...e)=>o(...e)))));i&&(e.u=e=>s(e,i))}))}}return i.m},p=(t,n,r)=>{if(!r.m||r.m.l.size||Array.from(r.m.t).some((t=>{var r;return null==(r=e(t).m)?void 0:r.d.has(n)})))return r.m;{const i=r.m.u;i&&PE(t,(()=>i(t))),delete r.m,"production"!==(dE?"production":void 0)&&o.delete(n);for(const o of r.d.keys()){const r=p(t,o,e(o));null==r||r.t.delete(n)}}},h={get:e=>EE(s(void 0,e)),set:u,sub:(t,n)=>{const r=_E(),o=e(t),i=f(r,t,o).l;return i.add(n),jE(r),()=>{i.delete(n);const e=_E();p(e,t,o),jE(e)}},unstable_derive:o=>$E(...o(e,t,n,r))};if("production"!==(dE?"production":void 0)){const t={dev4_get_internal_weak_map:()=>({get:t=>{const n=e(t);if(0!==n.n)return n}}),dev4_get_mounted_atoms:()=>o,dev4_restore_atoms:t=>{const n=_E();for(const[r,o]of t)if(gE(r)){const t=e(r),s=t.n;i(r,t,o),d(n,r,t),s!==t.n&&(AE(n,r,t),l(n,r,t))}jE(n)}};Object.assign(h,t)}return h};let OE;const RE=()=>(OE||(OE=(()=>{const e=new WeakMap;return $E((t=>{if("production"!==(dE?"production":void 0)&&!t)throw new Error("Atom is undefined or null");let n=e.get(t);return n||(n={d:new Map,p:new Set,n:0},e.set(t,n)),n}),((e,...t)=>e.read(...t)),((e,...t)=>e.write(...t)),((e,...t)=>{var n;return null==(n=e.onMount)?void 0:n.call(e,...t)}))})(),"production"!==(dE?"production":void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=OE),globalThis.__JOTAI_DEFAULT_STORE__!==OE&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),OE),ME={BASE_URL:"./",DEV:!1,MODE:"production",PROD:!0,SSR:!1},TE=qe.createContext(void 0),LE=e=>qe.useContext(TE)||RE(),IE=e=>"function"==typeof(null==e?void 0:e.then),zE=Ke.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:((e=>{e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t}))})(e),e)}),DE=new WeakMap;function BE(e,t){const n=LE(),[[r,o,i],s]=qe.useReducer((t=>{const r=n.get(e);return Object.is(t[0],r)&&t[1]===n&&t[2]===e?t:[r,n,e]}),void 0,(()=>[n.get(e),n,e]));let a=r;o===n&&i===e||(s(),a=n.get(e));if(qe.useEffect((()=>{const t=n.sub(e,(()=>{s()}));return s(),t}),[n,e,void 0]),qe.useDebugValue(a),IE(a)){const e=(e=>{let t=DE.get(e);return t||(t=new Promise(((n,r)=>{let o=e;const i=e=>t=>{o===e&&n(t)},s=e=>t=>{o===e&&r(t)},a=e=>{"onCancel"in e&&"function"==typeof e.onCancel&&e.onCancel((r=>{if("production"!==(ME?"production":void 0)&&r===e)throw new Error("[Bug] p is not updated even after cancelation");IE(r)?(DE.set(r,t),o=r,r.then(i(r),s(r)),a(r)):n(r)}))};e.then(i(e),s(e)),a(e)})),DE.set(e,t)),t})(a);return zE(e)}return a}const UE={BASE_URL:"./",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function FE(e,t){const n=e=>{if("e"in e)throw e.e;return e.d},r=pE((n=>{var r;let o=e(n);const i=null==(r=o[Symbol.observable])?void 0:r.call(o);let s;i&&(o=i);const a=()=>new Promise((e=>{s=e})),l=t&&"initialValue"in t?{d:"function"==typeof t.initialValue?t.initialValue():t.initialValue}:a();let c,u;const d=e=>{u=e,null==s||s(e),null==c||c(e)};let f,p;const h=()=>!c,v=()=>{f&&(clearTimeout(p),f.unsubscribe()),f=o.subscribe({next:e=>d({d:e}),error:e=>d({e:e}),complete:()=>{}}),h()&&(null==t?void 0:t.unstable_timeout)&&(p=setTimeout((()=>{f&&(f.unsubscribe(),f=void 0)}),t.unstable_timeout))};v();const m=pE(u||l);return"production"!==(UE?"production":void 0)&&(m.debugPrivate=!0),m.onMount=e=>(c=e,u&&e(u),f?clearTimeout(p):v(),()=>{c=void 0,f&&(f.unsubscribe(),f=void 0)}),[m,o,a,v,h]}));"production"!==(UE?"production":void 0)&&(r.debugPrivate=!0);return pE((e=>{const[t]=e(r),o=e(t);return o instanceof Promise?o.then(n):n(o)}),((e,t,n)=>{const[o,i,s,a,l]=e(r);if(!("next"in i))throw new Error("observable is not subject");l()&&(t(o,s()),a()),i.next(n)}))}function HE(e,t){const n=pE(0);return"production"!==(UE?"production":void 0)&&(n.debugPrivate=!0),pE(((t,r)=>(t(n),e(t,r))),((e,r,...o)=>{if(0===o.length)r(n,(e=>e+1));else if(t)return t(e,r,...o)}))}function VE(e,t){return function(e){const t=LE();return qe.useCallback(((...n)=>{if("production"!==(ME?"production":void 0)&&!("write"in e))throw new Error("not writable atom");return t.set(e,...n)}),[t,e])}(qe.useMemo((()=>pE(null,((t,n,...r)=>e(t,n,...r)))),[e]))}!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(UE?"production":void 0)&&"undefined"!=typeof window&&console.warn(e))}},t){var n;let r,o;const i={getItem:(n,i)=>{var s,a;const l=e=>{if(r!==(e=e||"")){try{o=JSON.parse(e,null==t?void 0:t.reviver)}catch(n){return i}r=e}return o},c=null!=(a=null==(s=e())?void 0:s.getItem(n))?a:null;return"function"==typeof(null==(u=c)?void 0:u.then)?c.then(l):l(c);var u},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(n=e())?void 0:n.subscribe}catch(l){}var a;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(i.subscribe=(a=s,(e,t,n)=>a(e,(e=>{let r;try{r=JSON.parse(e||"")}catch(l){r=n}t(r)}))))}();const WE=pE((()=>new Set));function qE(e,t){const n=function(e,t){let n=null;const r=new Map,o=new Set,i=o=>{let a;if(void 0===t)a=r.get(o);else for(const[e,n]of r)if(t(e,o)){a=n;break}if(void 0!==a){if(!(null==n?void 0:n(a[1],o)))return a[0];i.remove(o)}const l=e(o);return r.set(o,[l,Date.now()]),s("CREATE",o,l),l};function s(e,t,n){for(const r of o)r({type:e,param:t,atom:n})}return i.unstable_listen=e=>(o.add(e),()=>{o.delete(e)}),i.getParams=()=>r.keys(),i.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),s("REMOVE",e,t)}else for(const[n,[o]]of r)if(t(n,e)){r.delete(n),s("REMOVE",n,o);break}},i.setShouldRemove=e=>{if(n=e,n)for(const[t,[o,i]]of r)n(i,t)&&(r.delete(t),s("REMOVE",t,o))},i}((t=>e(t,(e=>(r,...o)=>e(((...e)=>{const o=r=>((0,e[0])(WE).add({atomFamily:n,param:t}),r);try{const t=r(...e);return t instanceof Promise?t.catch((e=>{throw o(e)})):t instanceof Nb?t.pipe(Tw((e=>{throw o(e)}))):t}catch(i){throw o(i)}}),...o)))),t);return n}const KE=qe.createContext(void 0);class YE{}e=new WeakMap,t=new WeakSet,n=function(e){return`${this.prefix}/${e}`};let QE=class r{constructor(n){te(this,t),X(this,"prefix"),te(this,e),this.prefix=n.prefix,ne(this,e,n.storage)}getItem(r){return ee(this,e).getItem(re(this,t,n).call(this,r))}removeItem(r){return ee(this,e).removeItem(re(this,t,n).call(this,r))}setItem(r,o){return ee(this,e).setItem(re(this,t,n).call(this,r),o)}join(t){return new r({prefix:`${this.prefix}/${t}`,storage:ee(this,e)})}};const GE=new QE({prefix:"@reactive-dot",storage:globalThis.localStorage});class JE{constructor(e){X(this,"options"),te(this,r),this.options=e,ne(this,r,((null==e?void 0:e.storage)??GE).join("wallet"))}get storage(){return ee(this,r).join(this.id)}getAccounts(){return mw(this.accounts$,{defaultValue:[]})}}r=new WeakMap;class XE extends JE{}class ZE extends Error{static from(e,t){return new this(t,{cause:e})}}class eS extends ZE{}const tS=(e,t)=>{let n=e.toString(16);n=(n.length%2?"0":"")+n;const r=Math.max(0,(t||0)-n.length/2);return"0x"+"00".repeat(r)+n},nS=yh({tip:Yp,asset:ch(rh(1/0))}).dec,rS=Object.freeze(Object.defineProperty({__proto__:null,ChargeAssetTxPayment:({value:e})=>{const{tip:t,asset:n}=nS(e);return{...n?{assetId:dv(n)}:{},tip:tS(t,16)}},ChargeTransactionPayment:({value:e})=>({tip:tS(Bv.dec(e),16)}),CheckGenesis:({additionalSigned:e})=>({genesisHash:dv(e)}),CheckMetadataHash:({value:e,additionalSigned:t})=>e.length&&e[0]?{mode:1,metadataHash:dv(t.length?t.slice(1):t)}:{},CheckMortality:({value:e,additionalSigned:t},n)=>({era:dv(e),blockHash:dv(t),blockNumber:tS(n,4)}),CheckNonce:({value:e})=>({nonce:tS(Yp.dec(e),4)}),CheckSpecVersion:({additionalSigned:e})=>({specVersion:tS(Pp.dec(e),4)}),CheckTxVersion:({additionalSigned:e})=>({transactionVersion:tS(Pp.dec(e),4)})},Symbol.toStringTag,{value:"Module"})),oS=cv().enc;function iS(e,t,n){const r=(e=>e.startsWith("0x")?pv(e):oS(e))(e);return{publicKey:r,signTx:async(n,o,i,s,a=lg)=>{let l;try{const e=sg(i);if("v14"!==e.metadata.tag&&"v15"!==e.metadata.tag)throw null;l=e.metadata.value}catch(h){throw new Error("Unsupported metadata version")}const c={signedExtensions:[]},{version:u}=l.extrinsic,d=[];l.extrinsic.signedExtensions.map((({identifier:e})=>{const t=o[e];if(!t)throw new Error(`Missing ${e} signed-extension`);if(d.push(t.value),c.signedExtensions.push(e),!rS[e]){if(0===t.value.length&&0===t.additionalSigned.length)return;throw new Error(`PJS does not support this signed-extension: ${e}`)}Object.assign(c,rS[e](t,s))})),c.address=e,c.method=dv(n),c.version=u,c.withSignedTransaction=!0;const f=await t(c),p=f.signedTransaction;return p?"string"==typeof p?pv(p):p:uk(l,r,pv(f.signature),d,n)},signBytes:t=>n({address:e,data:dv(t),type:"bytes"}).then((({signature:e})=>pv(e)))}}const sS=new Set(["ed25519","sr25519","ecdsa","ethereum"]);class aS extends JE{constructor(e,t){super(t),te(this,i),X(this,"name"),te(this,o,new Lb(void 0)),X(this,"connected$",ee(this,o).pipe(gw((e=>void 0!==e)))),X(this,"accounts$",ee(this,o).pipe(Vw((e=>new Nb((t=>{void 0===e?t.next([]):(t.next(re(this,i,s).call(this,e.getAccounts())),t.add(e.subscribe((e=>t.next(re(this,i,s).call(this,e))))))})))))),this.name=e}get id(){return`injected/${this.name}`}async initialize(){null!==this.storage.getItem("connected")&&await this.connect()}async connect(){var e;void 0===ee(this,o).getValue()&&(ee(this,o).next(await(async(e,t)=>{var n;let r=null==(n=window.injectedWeb3)?void 0:n[e];if(!r)throw new Error(`Unavailable extension: "${e}"`);const o=await r.enable(t),i=o.signer.signPayload.bind(o.signer),s=o.signer.signRaw.bind(o.signer),a=e=>e.filter((({type:e})=>sS.has(e))).map((e=>{const t=iS(e.address,i,s);return{...e,polkadotSigner:t}}));let l=a(await o.accounts.get());const c=new Set,u=o.accounts.subscribe((e=>{l=a(e),c.forEach((e=>{e(l)}))}));return{name:e,getAccounts:()=>l,subscribe:e=>(c.add(e),()=>{c.delete(e)}),disconnect:()=>{u()}}})(this.name,null==(e=this.options)?void 0:e.originName)),this.storage.setItem("connected",JSON.stringify(!0)))}disconnect(){var e;null==(e=ee(this,o).getValue())||e.disconnect(),ee(this,o).next(void 0),this.storage.removeItem("connected")}getAccounts(){const e=ee(this,o).getValue();if(void 0===e)throw new ZE("Extension is not connected");return re(this,i,s).call(this,e.getAccounts())}}o=new WeakMap,i=new WeakSet,s=function(e){return e.map(((e,t)=>({id:t.toString(),...e})))};const lS=new Promise((e=>setTimeout(e,500)));const cS=new WeakMap;function uS(e){return Promise.all(e.map((e=>e instanceof JE?[e]:cS.get(e)??cS.set(e,Promise.resolve(e.getWallets())).get(e)))).then((e=>e.flat()))}async function dS(e){const t=Array.isArray(e)?e:[e];await Promise.all(t.map((e=>e.disconnect())))}function fS(e){return(t=e)&&(t instanceof Nb||rb(t.lift)&&rb(t.subscribe))?e:e instanceof Promise?fw(e):pw(e);var t}function pS(e,t){return Cw([fS(e),fS(t)]).pipe(Vw((([e,t])=>{if(0===e.length)return pw([]);const n=null==t?void 0:t.properties.ss58Format,r=cv("number"==typeof n?n:void 0);return Cw(e.map((e=>e.accounts$.pipe(gw((n=>n.map((n=>{const o="function"!=typeof n.polkadotSigner?n.polkadotSigner:void 0!==t?n.polkadotSigner({tokenSymbol:t.properties.tokenSymbol,tokenDecimals:t.properties.tokenDecimals}):void 0;if(void 0!==o)return{...n,polkadotSigner:o,address:r.dec(o.publicKey),wallet:e}})).filter((e=>void 0!==e)))))))).pipe(gw((e=>e.flat())),gw(void 0===t?e=>e:e=>e.filter((e=>!e.genesisHash||t.genesisHash.includes(e.genesisHash)))))})))}function hS(e,t){return"best"===(null==t?void 0:t.tag)?e.bestBlocks$.pipe(gw((e=>e.at(0)))):e.finalizedBlock$}const vS=Symbol(),mS=new WeakSet;function gS(e){return mS.has(e)}async function yS(e){return Dk(await e[vS]())}function bS(e){return fS(e).pipe(Vw((e=>0===e.length?pw([]):Cw(e.map((e=>e.connected$.pipe(gw((t=>[e,t])))))))),gw((e=>e.filter((([e,t])=>t)).map((([e])=>e)))))}function wS(e,t,n){var r;switch(t.instruction){case"get-constant":return e.constants[t.pallet][t.constant]();case"call-api":return e.apis[t.pallet][t.api](...t.args,{signal:null==n?void 0:n.signal,at:t.at});case"read-storage":{const n=e.query[t.pallet][t.storage];return(null==(r=t.at)?void 0:r.startsWith("0x"))?n.getValue(...t.args,{at:t.at}):n.watchValue(...t.args,...[t.at].filter((e=>void 0!==e)))}case"read-storage-entries":return e.query[t.pallet][t.storage].getEntries(...t.args,{signal:null==n?void 0:n.signal,at:t.at})}}const xS=Symbol(),kS=Symbol();function ES(){const e=qe.useContext(KE);if(void 0===e)throw new ZE("No config provided");return e}const SS=qE(((e,t)=>t(pE)((()=>uS(e.wallets??[]))))),CS=qE(((e,t)=>t(FE)((t=>bS(t(SS(e)))))));function _S(){const e=BE(SS(ES())),[t,n]=qe.useState(xS),r=qe.useCallback((async()=>{n(kS),function(e){Promise.all(e.map((e=>e.initialize())))}(e)}),[e]);return[t,r]}const AS=qe.createContext(new Mb),NS=qe.createContext(void 0);function PS({config:e,children:t}){return nt.jsx(KE.Provider,{value:e,children:nt.jsxs(AS.Provider,{value:qe.useMemo((()=>new Mb),[]),children:[nt.jsx(qe.Suspense,{children:nt.jsx(jS,{})}),t]})})}function jS(){const[e,t]=_S();return qe.useEffect((()=>{t()}),[t]),null}function $S({optionalChainId:e=!1,...t}={}){const n=qe.useContext(NS),r=(null==t?void 0:t.chainId)??n;if(!e&&void 0===r)throw new ZE("No chain ID provided");return r}qe.createContext(void 0);const OS=qE(((e,t)=>t(pE)((async()=>{const t=e.config.chains[e.chainId];if(void 0===t)throw new ZE(`No config provided for ${e.chainId}`);return async function(e){const t=await e.provider;if(gS(t))return yS(t);const n=await(t.length>0?t:t());return gS(n)?yS(n):Dk(n)}(t)}))),((e,t)=>e.config===t.config&&e.chainId===t.chainId)),RS=qE(((e,t)=>t(pE)((async t=>(await t(OS(e))).getChainSpecData()))),((e,t)=>e.config===t.config&&e.chainId===t.chainId));const MS=qE(((e,t)=>t(FE)((t=>pS(t(CS(e.config)),void 0===e.chainId?void 0:t(RS(e)))))),((e,t)=>e.config===t.config&&e.chainId===t.chainId)),TS=qE(((e,t)=>t(pE)((async t=>{const n=e.config.chains[e.chainId];if(void 0===n)throw new ZE(`No config provided for chain ${e.chainId}`);return(await t(OS(e))).getTypedApi(n.descriptor)}))),((e,t)=>e.config===t.config&&e.chainId===t.chainId));function LS(e){return JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString():t instanceof Rv?t.asHex():function(e){if(!IS(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!IS(n)&&!!n.hasOwnProperty("isPrototypeOf")}(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function IS(e){return"[object Object]"===Object.prototype.toString.call(e)}const zS=qE(((e,t)=>{switch(function(e){var t;if("at"in e&&(null==(t=e.at)?void 0:t.startsWith("0x")))return"promise";switch(e.instruction){case"get-constant":case"call-api":case"read-storage-entries":return"promise";case"read-storage":return"observable"}}(e.instruction)){case"promise":return t(HE)((async(t,{signal:n})=>wS(await t(TS(e)),e.instruction,{signal:n})));case"observable":return t(FE)((t=>fw(t(TS(e))).pipe(Vw((t=>wS(t,e.instruction))))))}}),((e,t)=>e.config===t.config&&e.chainId===t.chainId&&LS(e.instruction)===LS(t.instruction)));function DS(e){const t=e,n=ES();return function(e){const[t,n]=qe.useState(xS);return[t,qe.useCallback(((...t)=>{const r=e=>n(e),o=e=>n(eS.from(e));try{n(kS);const i=e(...t);return i instanceof Promise?i.then(r).catch(o):i.subscribe({next:r,error:o})}catch(i){const e=eS.from(i);throw n(e),e}}),[e,n])]}(VE(qe.useCallback((async(e,r,o)=>{const i=o??t??await e(SS(n));return await dS(i),!0}),[n,t])))}qE(((e,t)=>t(pE)((t=>{const n=(r=e.config,o=e.chainId,e.query.instructions.map((e=>"multi"in e?e.args.map((t=>{const{multi:n,...i}=e;return zS({config:r,chainId:o,instruction:{...i,args:t}})})):zS({config:r,chainId:o,instruction:e}))));var r,o;return Promise.all(n.map((e=>Array.isArray(e)?Promise.all(e.map(t)):t(e))))}))),((e,t)=>e.config===t.config&&e.chainId===t.chainId&&LS(e.query.instructions)===LS(t.query.instructions))),qE(((e,t)=>t(FE)((t=>fw(t(OS(e))).pipe(Vw((e=>hS(e,{tag:"finalized"}))))))),((e,t)=>e.config===t.config&&e.chainId===t.chainId)),qE(((e,t)=>t(FE)((t=>fw(t(OS(e))).pipe(Vw((e=>hS(e,{tag:"best"}))))))),((e,t)=>e.config===t.config&&e.chainId===t.chainId));var BS="object"==typeof se&&se&&se.Object===Object&&se,US="object"==typeof self&&self&&self.Object===Object&&self;BS||US||Function("return this")();var FS="undefined"!=typeof window?qe.useLayoutEffect:qe.useEffect;function HS(e,t,n,r){const o=qe.useRef(t);FS((()=>{o.current=t}),[t]),qe.useEffect((()=>{const t=window;if(!t||!t.addEventListener)return;const n=e=>{o.current(e)};return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}),[e,n,r])}function VS(e){const t=qe.useRef((()=>{throw new Error("Cannot call an event handler while rendering.")}));return FS((()=>{t.current=e}),[e]),qe.useCallback(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[t])}var WS="undefined"==typeof window;const qS=qe.createContext(void 0),KS=({children:e})=>{const t=function(e){return BE(MS({config:ES(),chainId:$S({...e,optionalChainId:!0})}))}(),[n,r]=qe.useState(),[o,i,s]=function(e,t,n={}){const{initializeWithValue:r=!0}=n,o=qe.useCallback((e=>n.serializer?n.serializer(e):JSON.stringify(e)),[n]),i=qe.useCallback((e=>{if(n.deserializer)return n.deserializer(e);if("undefined"===e)return;const r=t instanceof Function?t():t;let o;try{o=JSON.parse(e)}catch(i){return console.error("Error parsing JSON:",i),r}return o}),[n,t]),s=qe.useCallback((()=>{const n=t instanceof Function?t():t;if(WS)return n;try{const t=window.localStorage.getItem(e);return t?i(t):n}catch(r){return console.warn(`Error reading localStorage key “${e}”:`,r),n}}),[t,e,i]),[a,l]=qe.useState((()=>r?s():t instanceof Function?t():t)),c=VS((t=>{WS&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const n=t instanceof Function?t(s()):t;window.localStorage.setItem(e,o(n)),l(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(n){console.warn(`Error setting localStorage key “${e}”:`,n)}})),u=VS((()=>{WS&&console.warn(`Tried removing localStorage key “${e}” even though environment is not a client`);const n=t instanceof Function?t():t;window.localStorage.removeItem(e),l(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}));qe.useEffect((()=>{l(s())}),[e]);const d=qe.useCallback((t=>{t.key&&t.key!==e||l(s())}),[e,s]);return HS("storage",d),HS("local-storage",d),[a,c,u]}("delegit.selectedAccount",""),a=qe.useCallback((e=>{e||s(),(null==e?void 0:e.address)&&i(e.address),r(e)}),[s,i]);return qe.useEffect((()=>{if(o){const e=t.find((({address:e})=>e===o));e&&a(e)}else a(t[0])}),[t,o,a]),nt.jsx(qS.Provider,{value:{accounts:t,selectedAccount:n,selectAccount:a},children:e})},YS=()=>{const e=qe.useContext(qS);if(void 0===e)throw new Error("useAccounts must be used within a AccountContextProvider");return e};function QS(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}var GS=qe.forwardRef(((e,t)=>{const{children:n,...r}=e,o=qe.Children.toArray(n),i=o.find(ZS);if(i){const e=i.props.children,n=o.map((t=>t===i?qe.Children.count(e)>1?qe.Children.only(null):qe.isValidElement(e)?e.props.children:null:t));return nt.jsx(JS,{...r,ref:t,children:qe.isValidElement(e)?qe.cloneElement(e,void 0,n):null})}return nt.jsx(JS,{...r,ref:t,children:n})}));GS.displayName="Slot";var JS=qe.forwardRef(((e,t)=>{const{children:n,...r}=e;if(qe.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n);return qe.cloneElement(n,{...eC(r,n.props),ref:t?QS(t,e):e})}return qe.Children.count(n)>1?qe.Children.only(null):null}));JS.displayName="SlotClone";var XS=({children:e})=>nt.jsx(nt.Fragment,{children:e});function ZS(e){return qe.isValidElement(e)&&e.type===XS}function eC(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function tC(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=tC(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}const nC=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,rC=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=tC(e))&&(r&&(r+=" "),r+=t);return r},oC=(iC="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",sC={variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}},e=>{var t;if(null==(null==sC?void 0:sC.variants))return rC(iC,null==e?void 0:e.class,null==e?void 0:e.className);const{variants:n,defaultVariants:r}=sC,o=Object.keys(n).map((t=>{const o=null==e?void 0:e[t],i=null==r?void 0:r[t];if(null===o)return null;const s=nC(o)||nC(i);return n[t][s]})),i=e&&Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),s=null==sC||null===(t=sC.compoundVariants)||void 0===t?void 0:t.reduce(((e,t)=>{let{class:n,className:o,...s}=t;return Object.entries(s).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...r,...i}[t]):{...r,...i}[t]===n}))?[...e,n,o]:e}),[]);return rC(iC,o,s,null==e?void 0:e.class,null==e?void 0:e.className)});var iC,sC;const aC=qe.forwardRef((({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?GS:"button";return nt.jsx(s,{className:ap(oC({variant:t,size:n,className:e})),ref:i,...o})}));aC.displayName="Button";const lC=({isOpen:e,title:t,message:n,onConfirm:r,onCancel:o,confirmText:i="Confirm",cancelText:s="Cancel",confirmClass:a="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",showCancelButton:l=!0})=>e?nt.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:o,children:nt.jsxs("div",{className:"bg-white rounded-lg shadow-lg w-96 p-6",onClick:e=>e.stopPropagation(),children:[nt.jsx("h2",{className:"text-lg font-medium text-center mb-4",children:t}),nt.jsx("p",{className:"text-sm text-gray-600 text-center mb-6",children:n}),nt.jsxs("div",{className:"flex justify-center gap-4",children:[l&&nt.jsx(aC,{onClick:o,className:"px-4 py-2 bg-violet-950 rounded hover:bg-violet-800",children:s}),nt.jsx(aC,{onClick:r,className:a,children:i})]})]})}):null,cC=({isOpen:e,className:t})=>nt.jsx("svg",{className:`w-4 h-4 transform transition-transform ${e?"rotate-180":""} ${t}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:nt.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),uC=({result:e,setSuccess:t,chainProperties:n})=>{var r,o,i;const s=e=>e.success;return Ke.useEffect((()=>{const n=s(e);t(n)}),[e,t]),nt.jsxs("div",{className:"mb-4",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Code Upload Result"}),s(e)?nt.jsxs("div",{children:[nt.jsx("div",{className:"text-sm bg-gray-200 p-2 pb-4 rounded",children:nt.jsxs("p",{children:["Code Hash: ",null==(r=e.value)?void 0:r.code_hash.asHex()]})}),nt.jsxs("div",{className:"mb-4",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Storage Deposit"}),nt.jsxs("div",{className:"bg-gray-200 p-2 rounded text-sm",children:[cp(null==(o=e.value)?void 0:o.deposit,n.tokenDecimals)," ",n.tokenSymbol]})]}),nt.jsx("div",{className:"text-green-600 font-bold flex items-center",children:"The call will be successful."})]}):nt.jsxs("div",{children:[nt.jsx("div",{className:"text-sm bg-gray-200 p-2 rounded",children:nt.jsxs("p",{children:["Result: ",null==(i=e.value)?void 0:i.value.value.type]})}),nt.jsx("div",{className:"text-red-600 font-bold flex items-center",children:"The call will not be successful."})]})]})},dC=({result:e,originalGas:t,useGasEstimates:n,setSuccess:r,chainProperties:o})=>{var i,s,a,l;const c=e=>{var r;return(null==(r=e.result)?void 0:r.success)&&(n||function(e,t){return(null==e?void 0:e.ref_time)>=t.ref_time&&(null==e?void 0:e.proof_size)>=t.proof_size}(t,e.gas_required))};return Ke.useEffect((()=>{const t=c(e);r(t)}),[e,n,t,r]),nt.jsxs("div",{children:[(e.gas_consumed||e.gas_required)&&nt.jsxs("div",{className:"flex space-x-4 mb-4",children:[e.gas_consumed&&nt.jsxs("div",{className:"flex-1",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Gas Consumed"}),nt.jsxs("div",{className:"flex space-x-4 text-sm",children:[nt.jsxs("div",{className:"bg-gray-200 p-2 rounded",children:[nt.jsx("p",{children:"Ref Time"}),nt.jsx("p",{children:mC(e.gas_consumed.ref_time)})]}),nt.jsxs("div",{className:"bg-gray-200 p-2 rounded",children:[nt.jsx("p",{children:"Proof Size"}),nt.jsxs("p",{children:[gC(e.gas_consumed.proof_size)," KB"]})]})]})]}),e.gas_required&&nt.jsxs("div",{className:"flex-1",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Gas Required"}),nt.jsxs("div",{className:"flex space-x-4 text-sm",children:[nt.jsxs("div",{className:"bg-gray-200 p-2 rounded",children:[nt.jsx("p",{children:"Ref Time"}),nt.jsx("p",{children:mC(e.gas_required.ref_time)})]}),nt.jsxs("div",{className:"bg-gray-200 p-2 rounded",children:[nt.jsx("p",{children:"Proof Size"}),nt.jsxs("p",{children:[gC(e.gas_required.proof_size)," KB"]})]})]})]})]}),e.storage_deposit&&nt.jsxs("div",{className:"mb-4",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Storage Deposit"}),nt.jsxs("div",{className:"bg-gray-200 p-2 rounded text-sm",children:[e.storage_deposit.type,": ",cp(e.storage_deposit.value,o.tokenDecimals)," ",o.tokenSymbol]})]}),e.result&&(null==(s=null==(i=e.result.value)?void 0:i.value)?void 0:s.type)&&nt.jsxs("div",{className:"mt-4",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Result Details"}),nt.jsxs("div",{className:"text-sm bg-gray-200 p-2 rounded",children:[nt.jsxs("p",{children:["Type: ",null==(a=e.result.value)?void 0:a.type]}),e.result.value.value&&nt.jsxs("p",{children:["Sub-Type: ",e.result.value.value.type]}),void 0!==e.result.value.value&&nt.jsxs("p",{children:["Value: ",JSON.stringify(e.result.value.value.value)]})]})]}),e.debug_message&&""!=e.debug_message.asText()&&nt.jsxs("div",{className:"mt-4",children:[nt.jsx("h3",{className:"text-md font-semibold",children:"Debug Message"}),nt.jsx("p",{className:"text-sm bg-gray-200 p-2 rounded",children:e.debug_message.asText()})]}),c(e)?nt.jsx("div",{className:"text-green-600 font-bold flex items-center",children:"The call will be successful."}):nt.jsxs("div",{className:"text-red-600 font-bold flex items-center",children:["The call will not be successful. ",(null==(l=e.result)?void 0:l.success)&&!n&&"Not enough gas provided (use estimates)"]})]})};function fC({dryRunResult:e,useGasEstimates:t,setUseGasEstimates:n,callType:r,originalGas:o,chainProperties:i}){const[s,a]=Ke.useState(!1),[l,c]=Ke.useState(!1);return nt.jsx("div",{className:"space-y-5 pb-6",children:nt.jsxs("div",{className:" bg-gray-100 border border-gray-200 rounded-lg p-4 dark:bg-neutral-800 dark:border-neutral-700",role:"alert",tabIndex:-1,"aria-labelledby":"hs-dry-run-success",children:[nt.jsxs("div",{className:"flex items-center justify-between",children:[nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("button",{type:"button",className:"w-6 h-6 flex justify-center items-center p-1 bg-gray-200 rounded-full dark:bg-gray-700",onClick:()=>c(!l),children:nt.jsx(cC,{isOpen:l,className:""})}),nt.jsx("h3",{id:"hs-dry-run-success",className:"cursor-pointer text-gray-800 font-semibold dark:text-white",onClick:()=>c(!l),children:"Dry-run Outcome"})]}),nt.jsx("div",{className:"flex items-center space-x-2",children:s?nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("span",{className:"text-green-600 dark:text-green-400 font-medium",children:"succeeds"}),nt.jsx(pC,{})]}):nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("span",{className:"text-red-600 dark:text-red-400 font-medium",children:"fails"}),nt.jsx(hC,{size:8})]})})]}),nt.jsx("div",{className:"\n          flex \n          overflow-hidden \n          transition-all \n          duration-300 \n          ease-in-out \n          "+(l?"max-h-screen opacity-100":"max-h-0 opacity-0"),children:nt.jsx("div",{className:"ms-3",children:nt.jsx("div",{className:`\n              mt-4 \n              transition-all \n              duration-300 \n              ease-in-out \n              transform \n              ${l?"translate-y-0 opacity-100":"-translate-y-5 opacity-0"}\n            `,children:"upload_code"===r?nt.jsx(uC,{result:e,setSuccess:a,chainProperties:i}):nt.jsx(dC,{result:e,originalGas:o,useGasEstimates:t,setSuccess:a,chainProperties:i})})})}),nt.jsxs("div",{className:"flex items-center mt-4 space-x-2",children:[nt.jsx("div",{className:"w-12 h-6 flex items-center cursor-pointer rounded-full p-1 duration-300 ease-in-out "+(t?"bg-blue-500":"bg-gray-300"),onClick:()=>n(!t),children:nt.jsx("div",{className:"w-4 h-4 bg-white rounded-full transform duration-300 ease-in-out "+(t?"translate-x-6":"translate-x-0")})}),nt.jsx("span",{className:"text-sm font-medium",children:"Use Gas Estimates in Call"})]})]})})}const pC=()=>nt.jsx("span",{className:"inline-flex justify-center items-center size-10 rounded-full border-4 border-teal-100 bg-teal-200 text-teal-800 dark:border-teal-900 dark:bg-teal-800 dark:text-teal-400",children:nt.jsxs("svg",{className:"shrink-0 size-6",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[nt.jsx("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"}),nt.jsx("path",{d:"m9 12 2 2 4-4"})]})}),hC=({size:e})=>nt.jsx("span",{className:`inline-flex justify-center items-center size-${e} rounded-full border-4 border-red-100 bg-red-200 text-red-800 dark:border-red-900 dark:bg-red-800 dark:text-red-400`,children:nt.jsxs("svg",{className:"shrink-0 size-"+(e-2),xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[nt.jsx("path",{d:"M18 6 6 18"}),nt.jsx("path",{d:"m6 6 12 12"})]})}),vC=()=>nt.jsxs("svg",{className:"shrink-0 size-6 text-blue-600 mt-1 mb-2",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[nt.jsx("circle",{cx:12,cy:12,r:10}),nt.jsx("path",{d:"M12 16v-4"}),nt.jsx("path",{d:"M12 8h.01"})]});function mC(e){const t=1000000000n,n=e%t;return`${(e/t).toString()}.${(n/10000000n).toString().padStart(2,"0")} ms`}function gC(e){return Math.trunc(Number(e)/1024*100)/100}const yC=({title:e,amount:t,chainProperties:n,isBold:r=!1})=>nt.jsxs("div",{className:"flex justify-between items-center",children:[nt.jsxs("span",{className:"text-gray-600 "+(r?"font-bold":"font-semibold"),children:[e,":"]}),nt.jsxs("span",{className:"text-gray-900 "+(r?"font-bold":"font-light"),children:[cp(t,n.tokenDecimals)," ",n.tokenSymbol]})]}),bC=({fees:e,deposit:t,accountBalance:n,proxiedAccountBalance:r,chainProperties:o})=>{const[i,s]=qe.useState(!0),a=e+t,l=void 0!==r,c=!l&&n<a,u=l&&r<a;return nt.jsxs("div",{className:"mt-6 bg-gray-100 border border-gray-300 rounded-lg p-4",children:[nt.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>s(!i),children:[nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("button",{className:"w-6 h-6 flex justify-center items-center p-1 bg-gray-200 rounded-full",onClick:()=>s(!i),children:nt.jsx(cC,{isOpen:i,className:""})}),nt.jsx("h3",{className:"text-lg font-semibold",children:"Cost Summary"})]}),nt.jsx("div",{className:"flex items-center space-x-2",children:c||u?nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("span",{className:"text-red-600 font-medium",children:"fails"}),nt.jsx(hC,{size:8})]}):nt.jsxs("div",{className:"flex items-center space-x-2",children:[nt.jsx("span",{className:"text-green-600 font-medium",children:"succeeds"}),nt.jsx(pC,{})]})})]}),nt.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out "+(i?"max-h-screen opacity-100":"max-h-0 opacity-0"),children:nt.jsxs("div",{className:"mt-3 space-y-2",children:[nt.jsx(yC,{title:"Fees",amount:e,chainProperties:o}),nt.jsx(yC,{title:"Storage Deposit",amount:t,chainProperties:o}),nt.jsx(yC,{title:"Total Cost",amount:a,chainProperties:o,isBold:!0}),nt.jsx(yC,{title:"Your Balance",amount:n,chainProperties:o}),l&&nt.jsxs(Ke.Fragment,{children:[nt.jsx(yC,{title:"Proxy Balance",amount:r,chainProperties:o}),u?nt.jsxs("div",{className:"p-3 bg-red-100 border-l-4 border-red-500 text-red-700 rounded mt-3",children:[nt.jsx("p",{className:"font-semibold",children:"Insufficient Funds"}),nt.jsx("p",{children:"The proxied account doesn't have enough balance."}),nt.jsxs("p",{children:["You need at least ",nt.jsxs("span",{className:"font-bold",children:[cp(a,o.tokenDecimals)," ",o.tokenSymbol]})," in the proxied account."]})]}):null]}),!l&&c?nt.jsxs("div",{className:"p-3 bg-red-100 border-l-4 border-red-500 text-red-700 rounded mt-3",children:[nt.jsx("p",{className:"font-semibold",children:"Insufficient Funds"}),nt.jsxs("p",{children:["You need at least ",nt.jsxs("span",{className:"font-bold",children:[cp(a,o.tokenDecimals)," ",o.tokenSymbol]})," to complete this transaction."]}),nt.jsx("div",{className:"text-red-600 font-bold flex items-center mt-2",children:"The call will not be successful."})]}):null,c||u?null:nt.jsx("div",{className:"text-green-600 font-bold flex items-center mt-3",children:"The call will be successful."})]})})]})},wC=()=>{var e,t,n,r;const{fetchPayload:o,submitData:i,terminate:s}={fetchPayload:qe.useCallback((async()=>{const e=await fetch("/payload");if(!e.ok)throw new Error("Failed to fetch payload");return e.json()}),[]),submitData:qe.useCallback((async e=>{const t=await fetch("/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to submit data");return t.json()}),[]),reportError:qe.useCallback((async e=>{if(!(await fetch("/error",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to report error")}),[]),terminate:qe.useCallback((async()=>{if(!(await fetch("/terminate",{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw new Error("Failed to terminate")}),[])},[a,l]=qe.useState(null),[c,u]=qe.useState(null),[d,f]=qe.useState(null),[p,h]=qe.useState(null),[v,m]=qe.useState(null),[g,y]=qe.useState(null),[b,w]=qe.useState(!1),[x,k]=qe.useState(null),[E,S]=qe.useState(!1),[C,_]=qe.useState(!1),[A,N]=qe.useState(0n),[P,j]=qe.useState(0n),[$,O]=qe.useState(null),[R,M]=qe.useState(!0),[T,L]=qe.useState({ss58Format:42,tokenDecimals:12,tokenSymbol:"UNIT"}),[I,z]=qe.useState(!1),[D,B]=qe.useState(!1),[U,F]=qe.useState(null),[H,V]=qe.useState(null),[W,q]=qe.useState(null),[K,Y]=qe.useState({title:"",message:""}),{selectedAccount:Q}=YS(),G=e=>{var t;return"Registrar"===(null==e?void 0:e.type)&&["reserve","register"].includes(null==(t=null==e?void 0:e.value)?void 0:t.type)},J=(e,t)=>{var n,r;return"Proxy"===e&&"proxy"===(null==t?void 0:t.type)&&G(null==(n=null==t?void 0:t.value)?void 0:n.call)||"Sudo"===e&&"sudo"===(null==t?void 0:t.type)&&G(null==(r=null==t?void 0:t.value)?void 0:r.call)},X=e=>!!(null==e?void 0:e.decodedCall)&&(G(e.decodedCall)||J(e.decodedCall.type,e.decodedCall.value));qe.useEffect((()=>{(async()=>{w(!0),k(null);try{const e=await o();e.chain_rpc.endsWith("/")?y(e.chain_rpc.substring(0,e.chain_rpc.length-1)):y(e.chain_rpc),f(e.call_data);let t=Dk(tE(cE(e.chain_rpc)));l(t);let n=t.getUnsafeApi();u(n);let r=Rv.fromBytes(e.call_data).asHex(),i=Rv.fromHex(r);h(i);const s=await n.txFromCallData(i);m(s);let a=s.decodedCall.type;S("Contracts"===a),_(X(s)),"Contracts"===a&&Z(s,n),X(s)&&ee(s,n)}catch(e){console.log(e),k("Failed to connect to server or fetch data")}finally{w(!1)}})()}),[o]),qe.useEffect((()=>{(async()=>{if(a){let e=await a.getChainSpecData(),t={ss58Format:e.properties.ss58Format??42,tokenDecimals:e.properties.tokenDecimals??12,tokenSymbol:e.properties.tokenSymbol??"UNIT"};L(t)}})()}),[a]),qe.useEffect((()=>{c&&(async()=>{c.query.System.Account.watchValue(null==Q?void 0:Q.address).subscribe((e=>{F(e.data.free)}))})()}),[c,Q]),qe.useEffect((()=>{E&&v&&c&&Z(v,c)}),[Q,E,v,c]),qe.useEffect((()=>{C&&v&&c&&ee(v,c)}),[Q,C,v,c]);const Z=async(e,t)=>{let n=null==e?void 0:e.decodedCall;if(!Q||"Contracts"!==(null==n?void 0:n.type))return;let r=n.value.value,o=r.code,i=r.data,s=r.salt,a=null;switch(n.value.type){case"call":a=await(null==t?void 0:t.apis.ContractsApi.call(Q.address,r.dest.value,r.value,void 0,void 0,i));break;case"instantiate_with_code":a=await(null==t?void 0:t.apis.ContractsApi.instantiate(Q.address,r.value,void 0,void 0,Zv("Upload",o),i,s));break;case"upload_code":a=await(null==t?void 0:t.apis.ContractsApi.upload_code(Q.address,o,void 0,Zv("Enforced")))}O(a)},ee=async(e,t)=>{if(!Q||!X(e))return;const n=(e=>{var t,n,r,o,i,s,a,l;let u=null==e?void 0:e.decodedCall;if(G(e.decodedCall))return e.decodedCall;if("Proxy"===u.type&&"proxy"===(null==(t=u.value)?void 0:t.type)){let e=null==(r=null==(n=u.value)?void 0:n.value)?void 0:r.real.value;return V(e),c.query.System.Account.watchValue(e).subscribe((e=>{q(e.data.free)})),null==(i=null==(o=u.value)?void 0:o.value)?void 0:i.call}return"Sudo"===u.type&&"sudo"===(null==(s=u.value)?void 0:s.type)?null==(l=null==(a=u.value)?void 0:a.value)?void 0:l.call:null})(e);if(!n)return;let r=await e.getEstimatedFees(Q.address);N(r);let o=await t.constants.Registrar.ParaDeposit(),i=await t.constants.Registrar.DataDepositPerByte(),s=0n;switch(n.value.type){case"reserve":s=o;break;case"register":let e=n.value.value.genesis_head,r=(await t.query.Configuration.ActiveConfig.getValue()).max_code_size;s=o+i*BigInt(e.asBytes().length)+i*BigInt(r)}j(s),_(!0)};return nt.jsxs(nt.Fragment,{children:[" ",Q&&nt.jsxs("div",{children:[b&&nt.jsx("p",{children:"Loading..."}),x&&nt.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:nt.jsxs("p",{children:["Error: ",x]})}),nt.jsxs("div",{className:"pb-3",children:[nt.jsx("div",{className:"font-semibold",children:"Account:"}),nt.jsxs("span",{children:[null==Q?void 0:Q.address," "]})]}),nt.jsxs("div",{children:[nt.jsxs("div",{className:"pb-3",children:[nt.jsxs("div",{className:"font-semibold",children:["RPC: ",nt.jsx("span",{className:"font-light text-black",children:g})]}),g?nt.jsxs("p",{children:[nt.jsx("a",{href:`https://polkadot.js.org/apps/?rpc=${encodeURIComponent(g)}`,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 underline hover:text-pink-700",children:"polkadot.js.org"}),nt.jsx("span",{className:"pr-2 pl-2",children:"|"}),nt.jsx("a",{href:`https://dev.papi.how/explorer#networkId=custom&endpoint=${encodeURIComponent(g)}`,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 underline hover:text-pink-700",children:"dev.papi.how"})]}):nt.jsx("p",{children:"No RPC loaded."})]}),nt.jsxs("div",{className:"pb-3",children:[nt.jsx("div",{className:"font-semibold pb-2",children:"Extrinsic Info:"}),v?nt.jsxs(Ke.Fragment,{children:[nt.jsxs("div",{className:"flex flex-wrap gap-x-4",children:[nt.jsxs("div",{className:"bg-gray-100 rounded p-1 border border-gray-200 font-bold",children:[nt.jsx("span",{className:"text-gray-600 font-light",children:"Pallet:"})," ",v.decodedCall.type]}),nt.jsxs("div",{className:"bg-gray-100 rounded p-1 border border-gray-200 font-bold",children:[nt.jsx("span",{className:"text-gray-600 font-light",children:"Dispatchable:"})," ",v.decodedCall.value.type]})]}),H&&nt.jsxs("div",{className:"mt-2",children:[nt.jsx("div",{className:"text-gray-700 font-medium pb-1",children:"Executing on behalf of:"}),nt.jsxs("div",{className:"bg-gray-50 rounded p-2 border border-gray-200 font-medium",children:[nt.jsx("span",{className:"text-gray-600 font-normal",children:"Proxied Account:"})," ",H]})]}),J(v.decodedCall.type,v.decodedCall.value)&&nt.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-300",children:[nt.jsx("div",{className:"text-gray-700 font-medium pb-1",children:"Underlying Call:"}),nt.jsxs("div",{className:"flex flex-wrap gap-x-4",children:[nt.jsxs("div",{className:"bg-gray-100 rounded p-1 border border-gray-200 font-bold",children:[nt.jsx("span",{className:"text-gray-600 font-light",children:"Pallet:"})," ",null==(t=null==(e=v.decodedCall.value)?void 0:e.value)?void 0:t.call.type]}),nt.jsxs("div",{className:"bg-gray-100 rounded p-1 border border-gray-200 font-bold",children:[nt.jsx("span",{className:"text-gray-600 font-light",children:"Dispatchable:"})," ",null==(r=null==(n=v.decodedCall.value)?void 0:n.value)?void 0:r.call.value.type]})]})]}),C&&nt.jsx(bC,{fees:A,deposit:P,accountBalance:U,chainProperties:T,proxiedAccountBalance:W??void 0})]}):nt.jsx("p",{})]})]}),E&&$&&nt.jsx("div",{children:nt.jsx(fC,{dryRunResult:$,useGasEstimates:R,setUseGasEstimates:M,originalGas:null==v?void 0:v.decodedCall.value.value.gas_limit,callType:null==v?void 0:v.decodedCall.value.type,chainProperties:T})}),nt.jsxs("div",{className:"bg-blue-100 border-l-4 border-blue-500 text-blue-700 p-4 mb-6 flex flex-col",children:[nt.jsx("div",{className:"flex items-center justify-between",children:nt.jsxs("div",{className:"flex items-center",children:[nt.jsx(vC,{}),nt.jsx("span",{className:"ml-2 font-extrabold",children:"Note"})]})}),nt.jsx("div",{className:"mt-2",children:nt.jsxs("p",{children:["Please review the transaction details ",nt.jsx("b",{children:"in your wallet before signing"}),"."]})})]}),nt.jsxs("div",{className:"flex justify-center items-center space-x-4",children:[nt.jsx(aC,{onClick:async()=>await(async()=>{if(!v)return void k("No transaction loaded.");if(!Q)return void k("No account selected.");B(!0);let e=null;if(E&&R&&$){const{type:t,value:{type:n,value:r}}=v.decodedCall;"instantiate_with_code"===(null==v?void 0:v.decodedCall.value.type)||"call"===(null==v?void 0:v.decodedCall.value.type)?(r.gas_limit.ref_time=$.gas_required.ref_time,r.gas_limit.proof_size=$.gas_required.proof_size,r.storage_deposit_limit=$.storage_deposit.value,e=await c.tx[t][n](r)):"upload_code"===v.decodedCall.value.type&&(r.deposit=$.value.deposit,e=await c.tx[t][n](r))}let t=null;try{t=e?await(null==e?void 0:e.sign(null==Q?void 0:Q.polkadotSigner)):await(null==v?void 0:v.sign(null==Q?void 0:Q.polkadotSigner))}catch(n){return B(!1),console.log(n),void k("Cancelled")}try{"success"===(await i(null==t?void 0:t.toString())).status?(Y({title:"Signing Successful",message:"Pop CLI will submit the signed transaction. You can close the tab now.",confirmText:"Close Tab",confirmClass:"px-4 py-2 bg-pink-700 text-white rounded hover:bg-blue-300 hover:text-gray-800",showCancelButton:!1,onConfirm:()=>{window.close(),z(!1),k("Browser prevented tab close. Please close manually.")},onCancel:()=>z(!1)}),z(!0)):k("An error occurred submitting the payload")}catch(n){k("Unable to submit. Is the server closed?")}finally{w(!1)}B(!1)})(),className:"text-lg font-bold bg-pink-700 hover:bg-blue-300 hover:text-gray-800",disabled:D,children:"Submit"}),nt.jsx(aC,{onClick:async()=>{k(null),Y({title:"Cancel Signing",message:"Are you sure you want to cancel the signing? This will close the server and tab.",confirmText:"Yes, Cancel",cancelText:"Go Back",confirmClass:"px-4 py-2 bg-pink-700 text-white rounded hover:bg-blue-300 hover:text-gray-800",onConfirm:async()=>{try{await s(),window.close()}catch(e){console.log(e),k("Failed to terminate the server. Is it already closed?")}console.log("Server closed."),z(!1),k("Browser prevented tab close. Please close manually.")},onCancel:()=>z(!1)}),z(!0)},className:"text-lg font-bold bg-violet-950 hover:bg-violet-800",children:"Cancel"})]}),nt.jsx(lC,{isOpen:I,title:K.title,message:K.message,confirmText:K.confirmText,confirmClass:K.confirmClass,cancelText:K.cancelText,showCancelButton:K.showCancelButton,onConfirm:K.onConfirm,onCancel:K.onCancel})]})]})},xC=globalThis,kC=xC.ShadowRoot&&(void 0===xC.ShadyCSS||xC.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,EC=Symbol(),SC=new WeakMap;let CC=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==EC)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(kC&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=SC.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&SC.set(t,e))}return e}toString(){return this.cssText}};const _C=(e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[r+1]),e[0]);return new CC(n,e,EC)},AC=kC?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new CC("string"==typeof e?e:e+"",void 0,EC))(t)})(e):e,{is:NC,defineProperty:PC,getOwnPropertyDescriptor:jC,getOwnPropertyNames:$C,getOwnPropertySymbols:OC,getPrototypeOf:RC}=Object,MC=globalThis,TC=MC.trustedTypes,LC=TC?TC.emptyScript:"",IC=MC.reactiveElementPolyfillSupport,zC=(e,t)=>e,DC={toAttribute(e,t){switch(t){case Boolean:e=e?LC:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(r){n=null}}return n}},BC=(e,t)=>!NC(e,t),UC={attribute:!0,type:String,converter:DC,reflect:!1,hasChanged:BC};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),MC.litPropertyMetadata??(MC.litPropertyMetadata=new WeakMap);let FC=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=UC){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(e,n,t);void 0!==r&&PC(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){const{get:r,set:o}=jC(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return null==r?void 0:r.call(this)},set(t){const i=null==r?void 0:r.call(this);o.call(this,t),this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??UC}static _$Ei(){if(this.hasOwnProperty(zC("elementProperties")))return;const e=RC(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(zC("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zC("properties"))){const e=this.properties,t=[...$C(e),...OC(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const e=this._$Eu(t,n);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(AC(e))}else void 0!==e&&t.push(AC(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(e=this.constructor.l)||e.forEach((e=>e(this)))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),void 0!==this.renderRoot&&this.isConnected&&(null==(t=e.hostConnected)||t.call(e))}removeController(e){var t;null==(t=this._$EO)||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(kC)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),r=xC.litNonce;void 0!==r&&t.setAttribute("nonce",r),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(e=this._$EO)||e.forEach((e=>{var t;return null==(t=e.hostConnected)?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null==(e=this._$EO)||e.forEach((e=>{var t;return null==(t=e.hostDisconnected)?void 0:t.call(e)}))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EC(e,t){var n;const r=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,r);if(void 0!==o&&!0===r.reflect){const i=(void 0!==(null==(n=r.converter)?void 0:n.toAttribute)?r.converter:DC).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(e,t){var n;const r=this.constructor,o=r._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=r.getPropertyOptions(o),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null==(n=e.converter)?void 0:n.fromAttribute)?e.converter:DC;this._$Em=o,this[o]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){if(n??(n=this.constructor.getPropertyOptions(e)),!(n.hasChanged??BC)(this[e],t))return;this.P(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,n){this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e)!0!==n.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],n)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null==(e=this._$EO)||e.forEach((e=>{var t;return null==(t=e.hostUpdate)?void 0:t.call(e)})),this.update(n)):this._$EU()}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null==(t=this._$EO)||t.forEach((e=>{var t;return null==(t=e.hostUpdated)?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach((e=>this._$EC(e,this[e])))),this._$EU()}updated(e){}firstUpdated(e){}};FC.elementStyles=[],FC.shadowRootOptions={mode:"open"},FC[zC("elementProperties")]=new Map,FC[zC("finalized")]=new Map,null==IC||IC({ReactiveElement:FC}),(MC.reactiveElementVersions??(MC.reactiveElementVersions=[])).push("2.0.4");const HC=globalThis,VC=HC.trustedTypes,WC=VC?VC.createPolicy("lit-html",{createHTML:e=>e}):void 0,qC="$lit$",KC=`lit$${Math.random().toFixed(9).slice(2)}$`,YC="?"+KC,QC=`<${YC}>`,GC=document,JC=()=>GC.createComment(""),XC=e=>null===e||"object"!=typeof e&&"function"!=typeof e,ZC=Array.isArray,e_=e=>ZC(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]),t_="[ \t\n\f\r]",n_=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,r_=/-->/g,o_=/>/g,i_=RegExp(`>|${t_}(?:([^\\s"'>=/]+)(${t_}*=${t_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),s_=/'/g,a_=/"/g,l_=/^(?:script|style|textarea|title)$/i,c_=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),u_=c_(1),d_=c_(2),f_=Symbol.for("lit-noChange"),p_=Symbol.for("lit-nothing"),h_=new WeakMap,v_=GC.createTreeWalker(GC,129);function m_(e,t){if(!ZC(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==WC?WC.createHTML(t):t}const g_=(e,t)=>{const n=e.length-1,r=[];let o,i=2===t?"<svg>":3===t?"<math>":"",s=n_;for(let a=0;a<n;a++){const t=e[a];let n,l,c=-1,u=0;for(;u<t.length&&(s.lastIndex=u,l=s.exec(t),null!==l);)u=s.lastIndex,s===n_?"!--"===l[1]?s=r_:void 0!==l[1]?s=o_:void 0!==l[2]?(l_.test(l[2])&&(o=RegExp("</"+l[2],"g")),s=i_):void 0!==l[3]&&(s=i_):s===i_?">"===l[0]?(s=o??n_,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,n=l[1],s=void 0===l[3]?i_:'"'===l[3]?a_:s_):s===a_||s===s_?s=i_:s===r_||s===o_?s=n_:(s=i_,o=void 0);const d=s===i_&&e[a+1].startsWith("/>")?" ":"";i+=s===n_?t+QC:c>=0?(r.push(n),t.slice(0,c)+qC+t.slice(c)+KC+d):t+KC+(-2===c?a:d)}return[m_(e,i+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),r]};let y_=class e{constructor({strings:t,_$litType$:n},r){let o;this.parts=[];let i=0,s=0;const a=t.length-1,l=this.parts,[c,u]=g_(t,n);if(this.el=e.createElement(c,r),v_.currentNode=this.el.content,2===n||3===n){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=v_.nextNode())&&l.length<a;){if(1===o.nodeType){if(o.hasAttributes())for(const e of o.getAttributeNames())if(e.endsWith(qC)){const t=u[s++],n=o.getAttribute(e).split(KC),r=/([.?@])?(.*)/.exec(t);l.push({type:1,index:i,name:r[2],strings:n,ctor:"."===r[1]?E_:"?"===r[1]?S_:"@"===r[1]?C_:k_}),o.removeAttribute(e)}else e.startsWith(KC)&&(l.push({type:6,index:i}),o.removeAttribute(e));if(l_.test(o.tagName)){const e=o.textContent.split(KC),t=e.length-1;if(t>0){o.textContent=VC?VC.emptyScript:"";for(let n=0;n<t;n++)o.append(e[n],JC()),v_.nextNode(),l.push({type:2,index:++i});o.append(e[t],JC())}}}else if(8===o.nodeType)if(o.data===YC)l.push({type:2,index:i});else{let e=-1;for(;-1!==(e=o.data.indexOf(KC,e+1));)l.push({type:7,index:i}),e+=KC.length-1}i++}}static createElement(e,t){const n=GC.createElement("template");return n.innerHTML=e,n}};function b_(e,t,n=e,r){var o,i;if(t===f_)return t;let s=void 0!==r?null==(o=n._$Co)?void 0:o[r]:n._$Cl;const a=XC(t)?void 0:t._$litDirective$;return(null==s?void 0:s.constructor)!==a&&(null==(i=null==s?void 0:s._$AO)||i.call(s,!1),void 0===a?s=void 0:(s=new a(e),s._$AT(e,n,r)),void 0!==r?(n._$Co??(n._$Co=[]))[r]=s:n._$Cl=s),void 0!==s&&(t=b_(e,s._$AS(e,t.values),s,r)),t}let w_=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,r=((null==e?void 0:e.creationScope)??GC).importNode(t,!0);v_.currentNode=r;let o=v_.nextNode(),i=0,s=0,a=n[0];for(;void 0!==a;){if(i===a.index){let t;2===a.type?t=new x_(o,o.nextSibling,this,e):1===a.type?t=new a.ctor(o,a.name,a.strings,this,e):6===a.type&&(t=new __(o,this,e)),this._$AV.push(t),a=n[++s]}i!==(null==a?void 0:a.index)&&(o=v_.nextNode(),i++)}return v_.currentNode=GC,r}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},x_=class e{get _$AU(){var e;return(null==(e=this._$AM)?void 0:e._$AU)??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=p_,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=(null==r?void 0:r.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===(null==e?void 0:e.nodeType)&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=b_(this,e,t),XC(e)?e===p_||null==e||""===e?(this._$AH!==p_&&this._$AR(),this._$AH=p_):e!==this._$AH&&e!==f_&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):e_(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==p_&&XC(this._$AH)?this._$AA.nextSibling.data=e:this.T(GC.createTextNode(e)),this._$AH=e}$(e){var t;const{values:n,_$litType$:r}=e,o="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=y_.createElement(m_(r.h,r.h[0]),this.options)),r);if((null==(t=this._$AH)?void 0:t._$AD)===o)this._$AH.p(n);else{const e=new w_(o,this),t=e.u(this.options);e.p(n),this.T(t),this._$AH=e}}_$AC(e){let t=h_.get(e.strings);return void 0===t&&h_.set(e.strings,t=new y_(e)),t}k(t){ZC(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,o=0;for(const i of t)o===n.length?n.push(r=new e(this.O(JC()),this.O(JC()),this,this.options)):r=n[o],r._$AI(i),o++;o<n.length&&(this._$AR(r&&r._$AB.nextSibling,o),n.length=o)}_$AR(e=this._$AA.nextSibling,t){var n;for(null==(n=this._$AP)||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cv=e,null==(t=this._$AP)||t.call(this,e))}},k_=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,o){this.type=1,this._$AH=p_,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=p_}_$AI(e,t=this,n,r){const o=this.strings;let i=!1;if(void 0===o)e=b_(this,e,t,0),i=!XC(e)||e!==this._$AH&&e!==f_,i&&(this._$AH=e);else{const r=e;let s,a;for(e=o[0],s=0;s<o.length-1;s++)a=b_(this,r[n+s],t,s),a===f_&&(a=this._$AH[s]),i||(i=!XC(a)||a!==this._$AH[s]),a===p_?e=p_:e!==p_&&(e+=(a??"")+o[s+1]),this._$AH[s]=a}i&&!r&&this.j(e)}j(e){e===p_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},E_=class extends k_{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===p_?void 0:e}},S_=class extends k_{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==p_)}},C_=class extends k_{constructor(e,t,n,r,o){super(e,t,n,r,o),this.type=5}_$AI(e,t=this){if((e=b_(this,e,t,0)??p_)===f_)return;const n=this._$AH,r=e===p_&&n!==p_||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==p_&&(n===p_||r);r&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;"function"==typeof this._$AH?this._$AH.call((null==(t=this.options)?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}},__=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){b_(this,e)}};const A_={M:qC,P:KC,A:YC,C:1,L:g_,R:w_,D:e_,V:b_,I:x_,H:k_,N:S_,U:C_,B:E_,F:__},N_=HC.litHtmlPolyfillSupport;null==N_||N_(y_,x_),(HC.litHtmlVersions??(HC.litHtmlVersions=[])).push("3.2.1");let P_=class extends FC{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const r=(null==n?void 0:n.renderBefore)??t;let o=r._$litPart$;if(void 0===o){const e=(null==n?void 0:n.renderBefore)??null;r._$litPart$=o=new x_(t.insertBefore(JC(),e),e,void 0,n??{})}return o._$AI(e),o})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null==(e=this._$Do)||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this._$Do)||e.setConnected(!1)}render(){return f_}};P_._$litElement$=!0,P_.finalized=!0,null==(a=globalThis.litElementHydrateSupport)||a.call(globalThis,{LitElement:P_});const j_=globalThis.litElementPolyfillSupport;function $_({size:e=24}){return u_`<svg
     width=${e}
     height=${e}
     viewBox="0 0 28 28"
@@ -1014,7 +1014,7 @@ <h3>Connected accounts</h3>
         }
       }
     `],K);pj=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([TA("dc-connection-button")],pj);const hj={chains:{},wallets:[new class extends YE{constructor(e){super(),X(this,"options"),this.options=e}async getWallets(){return await lS,(()=>{const{injectedWeb3:e}=window;return e?Object.keys(e):[]})().map((e=>new aS(e,this.options)))}}]};function vj(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function mj(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function gj(...e){return t=>{let n=!1;const r=e.map((e=>{const r=mj(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():mj(e[t],null)}}}}function yj(...e){return qe.useCallback(gj(...e),e)}function bj(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>qe.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return qe.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=qe.createContext(r),i=n.length;n=[...n,r];const s=t=>{var n;const{scope:r,children:s,...a}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[i])||o,c=qe.useMemo((()=>a),Object.values(a));return nt.jsx(l.Provider,{value:c,children:s})};return s.displayName=t+"Provider",[s,function(n,s){var a;const l=(null==(a=null==s?void 0:s[e])?void 0:a[i])||o,c=qe.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},wj(r,...t)]}function wj(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return qe.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function xj(e){const t=qe.useRef(e);return qe.useEffect((()=>{t.current=e})),qe.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function kj({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=function({defaultProp:e,onChange:t}){const n=qe.useState(e),[r]=n,o=qe.useRef(r),i=xj(t);return qe.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,s=i?e:r,a=xj(n);return[s,qe.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&a(n)}else o(t)}),[i,e,o,a])]}!function(e){NA.next(e.wallets)}({wallets:hj.wallets});var Ej=qe.forwardRef(((e,t)=>{const{children:n,...r}=e,o=qe.Children.toArray(n),i=o.find(_j);if(i){const e=i.props.children,n=o.map((t=>t===i?qe.Children.count(e)>1?qe.Children.only(null):qe.isValidElement(e)?e.props.children:null:t));return nt.jsx(Sj,{...r,ref:t,children:qe.isValidElement(e)?qe.cloneElement(e,void 0,n):null})}return nt.jsx(Sj,{...r,ref:t,children:n})}));Ej.displayName="Slot";var Sj=qe.forwardRef(((e,t)=>{const{children:n,...r}=e;if(qe.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n);return qe.cloneElement(n,{...Aj(r,n.props),ref:t?gj(t,e):e})}return qe.Children.count(n)>1?qe.Children.only(null):null}));Sj.displayName="SlotClone";var Cj=({children:e})=>nt.jsx(nt.Fragment,{children:e});function _j(e){return qe.isValidElement(e)&&e.type===Cj}function Aj(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}var Nj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=qe.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Ej:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),nt.jsx(i,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function Pj(e,t){e&&df.flushSync((()=>e.dispatchEvent(t)))}function jj(e){const t=e+"CollectionProvider",[n,r]=bj(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:t,children:n}=e,r=Ke.useRef(null),i=Ke.useRef(new Map).current;return nt.jsx(o,{scope:t,itemMap:i,collectionRef:r,children:n})};s.displayName=t;const a=e+"CollectionSlot",l=Ke.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=yj(t,i(a,n).collectionRef);return nt.jsx(Ej,{ref:o,children:r})}));l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=Ke.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,s=Ke.useRef(null),a=yj(t,s),l=i(c,n);return Ke.useEffect((()=>(l.itemMap.set(s,{ref:s,...o}),()=>{l.itemMap.delete(s)}))),nt.jsx(Ej,{[u]:"",ref:a,children:r})}));return d.displayName=c,[{Provider:s,Slot:l,ItemSlot:d},function(t){const n=i(e+"CollectionConsumer",t),r=Ke.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return r}),[n.collectionRef,n.itemMap]);return r},r]}var $j=qe.createContext(void 0);function Oj(e){const t=qe.useContext($j);return e||t||"ltr"}var Rj,Mj="dismissableLayer.update",Tj="dismissableLayer.pointerDownOutside",Lj="dismissableLayer.focusOutside",Ij=qe.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zj=qe.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=qe.useContext(Ij),[u,d]=qe.useState(null),f=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=qe.useState({}),h=yj(t,(e=>d(e))),v=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(m),y=u?v.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=g,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xj(e),r=qe.useRef(!1),o=qe.useRef((()=>{}));return qe.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Bj(Tj,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));w&&!n&&(null==o||o(e),null==s||s(e),e.defaultPrevented||null==a||a())}),f),k=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xj(e),r=qe.useRef(!1);return qe.useEffect((()=>{const e=e=>{if(e.target&&!r.current){Bj(Lj,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==s||s(e),e.defaultPrevented||null==a||a())}),f);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xj(e);qe.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{y===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&a&&(e.preventDefault(),a()))}),f),qe.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(Rj=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Dj(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=Rj)}}),[u,f,n,c]),qe.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Dj())}),[u,c]),qe.useEffect((()=>{const e=()=>p({});return document.addEventListener(Mj,e),()=>document.removeEventListener(Mj,e)}),[]),nt.jsx(Nj.div,{...l,ref:h,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:vj(e.onFocusCapture,k.onFocusCapture),onBlurCapture:vj(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:vj(e.onPointerDownCapture,x.onPointerDownCapture)})}));zj.displayName="DismissableLayer";function Dj(){const e=new CustomEvent(Mj);document.dispatchEvent(e)}function Bj(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Pj(o,i):o.dispatchEvent(i)}qe.forwardRef(((e,t)=>{const n=qe.useContext(Ij),r=qe.useRef(null),o=yj(t,r);return qe.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),nt.jsx(Nj.div,{...e,ref:o})})).displayName="DismissableLayerBranch";var Uj=0;function Fj(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Hj="focusScope.autoFocusOnMount",Vj="focusScope.autoFocusOnUnmount",Wj={bubbles:!1,cancelable:!0},qj=qe.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=qe.useState(null),c=xj(o),u=xj(i),d=qe.useRef(null),f=yj(t,(e=>l(e))),p=qe.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;qe.useEffect((()=>{if(r){let e=function(e){if(p.paused||!a)return;const t=e.target;a.contains(t)?d.current=t:Gj(d.current,{select:!0})},t=function(e){if(p.paused||!a)return;const t=e.relatedTarget;null!==t&&(a.contains(t)||Gj(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Gj(a)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return a&&r.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,a,p.paused]),qe.useEffect((()=>{if(a){Jj.add(p);const t=document.activeElement;if(!a.contains(t)){const n=new CustomEvent(Hj,Wj);a.addEventListener(Hj,c),a.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gj(r,{select:t}),document.activeElement!==n)return}((e=Kj(a),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Gj(a))}return()=>{a.removeEventListener(Hj,c),setTimeout((()=>{const e=new CustomEvent(Vj,Wj);a.addEventListener(Vj,u),a.dispatchEvent(e),e.defaultPrevented||Gj(t??document.body,{select:!0}),a.removeEventListener(Vj,u),Jj.remove(p)}),0)}}var e}),[a,c,u,p]);const h=qe.useCallback((e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=Kj(e),n=Yj(t,e),r=Yj(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&Gj(i,{select:!0})):(e.preventDefault(),n&&Gj(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return nt.jsx(Nj.div,{tabIndex:-1,...s,ref:f,onKeyDown:h})}));function Kj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yj(e,t){for(const n of e)if(!Qj(n,{upTo:t}))return n}function Qj(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Gj(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}qj.displayName="FocusScope";var Jj=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=Xj(e,t),e.unshift(t)},remove(t){var n;e=Xj(e,t),null==(n=e[0])||n.resume()}}}();function Xj(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Zj=Boolean(null==globalThis?void 0:globalThis.document)?qe.useLayoutEffect:()=>{},e$=Ye["useId".toString()]||(()=>{}),t$=0;function n$(e){const[t,n]=qe.useState(e$());return Zj((()=>{n((e=>e??String(t$++)))}),[e]),t?`radix-${t}`:""}const r$=["top","right","bottom","left"],o$=Math.min,i$=Math.max,s$=Math.round,a$=Math.floor,l$=e=>({x:e,y:e}),c$={left:"right",right:"left",bottom:"top",top:"bottom"},u$={start:"end",end:"start"};function d$(e,t,n){return i$(e,o$(t,n))}function f$(e,t){return"function"==typeof e?e(t):e}function p$(e){return e.split("-")[0]}function h$(e){return e.split("-")[1]}function v$(e){return"x"===e?"y":"x"}function m$(e){return"y"===e?"height":"width"}function g$(e){return["top","bottom"].includes(p$(e))?"y":"x"}function y$(e){return v$(g$(e))}function b$(e){return e.replace(/start|end/g,(e=>u$[e]))}function w$(e){return e.replace(/left|right|bottom|top/g,(e=>c$[e]))}function x$(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function k$(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function E$(e,t,n){let{reference:r,floating:o}=e;const i=g$(t),s=y$(t),a=m$(s),l=p$(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(h$(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1)}return p}async function S$(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=f$(t,e),h=x$(p),v=a[f?"floating"===d?"reference":"floating":d],m=k$(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=k$(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(m.top-w.top+h.top)/b.y,bottom:(w.bottom-m.bottom+h.bottom)/b.y,left:(m.left-w.left+h.left)/b.x,right:(w.right-m.right+h.right)/b.x}}function C$(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _$(e){return r$.some((t=>e[t]>=0))}function A$(){return"undefined"!=typeof window}function N$(e){return $$(e)?(e.nodeName||"").toLowerCase():"#document"}function P$(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j$(e){var t;return null==(t=($$(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function $$(e){return!!A$()&&(e instanceof Node||e instanceof P$(e).Node)}function O$(e){return!!A$()&&(e instanceof Element||e instanceof P$(e).Element)}function R$(e){return!!A$()&&(e instanceof HTMLElement||e instanceof P$(e).HTMLElement)}function M$(e){return!(!A$()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof P$(e).ShadowRoot)}function T$(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=U$(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function L$(e){return["table","td","th"].includes(N$(e))}function I$(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(n){return!1}}))}function z$(e){const t=D$(),n=O$(e)?U$(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function D$(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function B$(e){return["html","body","#document"].includes(N$(e))}function U$(e){return P$(e).getComputedStyle(e)}function F$(e){return O$(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function H$(e){if("html"===N$(e))return e;const t=e.assignedSlot||e.parentNode||M$(e)&&e.host||j$(e);return M$(t)?t.host:t}function V$(e){const t=H$(e);return B$(t)?e.ownerDocument?e.ownerDocument.body:e.body:R$(t)&&T$(t)?t:V$(t)}function W$(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=V$(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=P$(o);if(i){const e=q$(s);return t.concat(s,s.visualViewport||[],T$(o)?o:[],e&&n?W$(e):[])}return t.concat(o,W$(o,[],n))}function q$(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function K$(e){const t=U$(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=R$(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=s$(n)!==i||s$(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Y$(e){return O$(e)?e:e.contextElement}function Q$(e){const t=Y$(e);if(!R$(t))return l$(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=K$(t);let s=(i?s$(n.width):n.width)/r,a=(i?s$(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const G$=l$(0);function J$(e){const t=P$(e);return D$()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:G$}function X$(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Y$(e);let s=l$(1);t&&(r?O$(r)&&(s=Q$(r)):s=Q$(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==P$(e))&&t}(i,n,r)?J$(i):l$(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=P$(i),t=r&&O$(r)?P$(r):r;let n=e,o=q$(n);for(;o&&r&&t!==n;){const e=Q$(o),t=o.getBoundingClientRect(),r=U$(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=P$(o),o=q$(n)}}return k$({width:u,height:d,x:l,y:c})}function Z$(e,t){const n=F$(e).scrollLeft;return t?t.left+n:X$(j$(e)).left+n}function eO(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Z$(e,r)),y:r.top+t.scrollTop}}function tO(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=P$(e),r=j$(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=D$();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=j$(e),n=F$(e),r=e.ownerDocument.body,o=i$(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=i$(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Z$(e);const a=-n.scrollTop;return"rtl"===U$(r).direction&&(s+=i$(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(j$(e));else if(O$(t))r=function(e,t){const n=X$(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=R$(e)?Q$(e):l$(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=J$(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return k$(r)}function nO(e,t){const n=H$(e);return!(n===t||!O$(n)||B$(n))&&("fixed"===U$(n).position||nO(n,t))}function rO(e,t,n){const r=R$(t),o=j$(t),i="fixed"===n,s=X$(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=l$(0);if(r||!r&&!i)if(("body"!==N$(t)||T$(o))&&(a=F$(t)),r){const e=X$(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Z$(o));const c=!o||r||i?l$(0):eO(o,a);return{x:s.left+a.scrollLeft-l.x-c.x,y:s.top+a.scrollTop-l.y-c.y,width:s.width,height:s.height}}function oO(e){return"static"===U$(e).position}function iO(e,t){if(!R$(e)||"fixed"===U$(e).position)return null;if(t)return t(e);let n=e.offsetParent;return j$(e)===n&&(n=n.ownerDocument.body),n}function sO(e,t){const n=P$(e);if(I$(e))return n;if(!R$(e)){let t=H$(e);for(;t&&!B$(t);){if(O$(t)&&!oO(t))return t;t=H$(t)}return n}let r=iO(e,t);for(;r&&L$(r)&&oO(r);)r=iO(r,t);return r&&B$(r)&&oO(r)&&!z$(r)?n:r||function(e){let t=H$(e);for(;R$(t)&&!B$(t);){if(z$(t))return t;if(I$(t))return null;t=H$(t)}return null}(e)||n}const aO={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=j$(r),a=!!t&&I$(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=l$(1);const u=l$(0),d=R$(r);if((d||!d&&!i)&&(("body"!==N$(r)||T$(s))&&(l=F$(r)),R$(r))){const e=X$(r);c=Q$(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!s||d||i?l$(0):eO(s,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:j$,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?I$(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=W$(e,[],!1).filter((e=>O$(e)&&"body"!==N$(e))),o=null;const i="fixed"===U$(e).position;let s=i?H$(e):e;for(;O$(s)&&!B$(s);){const t=U$(s),n=z$(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||T$(s)&&!n&&nO(e,s))?r=r.filter((e=>e!==s)):o=t,s=H$(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=tO(t,n,o);return e.top=i$(r.top,e.top),e.right=o$(r.right,e.right),e.bottom=o$(r.bottom,e.bottom),e.left=i$(r.left,e.left),e}),tO(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:sO,getElementRects:async function(e){const t=this.getOffsetParent||sO,n=this.getDimensions,r=await n(e.floating);return{reference:rO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=K$(e);return{width:t,height:n}},getScale:Q$,isElement:O$,isRTL:function(e){return"rtl"===U$(e).direction}};function lO(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Y$(e),u=o||i?[...c?W$(c):[],...W$(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=j$(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const p={rootMargin:-a$(u)+"px "+-a$(o.clientWidth-(c+d))+"px "+-a$(o.clientHeight-(u+f))+"px "+-a$(c)+"px",threshold:i$(0,o$(1,l))||1};let h=!0;function v(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(v,{...p,root:o.ownerDocument})}catch(m){r=new IntersectionObserver(v,p)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,h=null;s&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let v=l?X$(e):null;return l&&function t(){const r=X$(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n();v=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const cO=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=p$(n),a=h$(n),l="y"===g$(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=f$(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},uO=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=f$(e,t),c={x:n,y:r},u=await S$(t,l),d=g$(p$(o)),f=v$(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=d$(p+u["y"===f?"top":"left"],p,p-u[e])}if(s){const e="y"===d?"bottom":"right";h=d$(h+u["y"===d?"top":"left"],h,h-u[e])}const v=a.fn({...t,[f]:p,[d]:h});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[f]:i,[d]:s}}}}}},dO=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...m}=f$(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=p$(o),y=g$(a),b=p$(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!v?[w$(a)]:function(e){const t=w$(e);return[b$(e),t,b$(t)]}(a)),k="none"!==h;!f&&k&&x.push(...function(e,t,n,r){const o=h$(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(p$(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(b$)))),i}(a,v,h,w));const E=[a,...x],S=await S$(t,m),C=[];let _=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&C.push(S[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=h$(e),o=y$(e),i=m$(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=w$(s)),[s,w$(s)]}(o,s,w);C.push(S[e[0]],S[e[1]])}if(_=[..._,{placement:o,overflows:C}],!C.every((e=>e<=0))){var A,N;const e=((null==(A=i.flip)?void 0:A.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:_},reset:{placement:t}};let n=null==(N=_.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=_.filter((e=>{if(k){const t=g$(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},fO=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=f$(e,t),u=await S$(t,c),d=p$(o),f=h$(o),p="y"===g$(o),{width:h,height:v}=i.floating;let m,g;"top"===d||"bottom"===d?(m=d,g=f===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,m="end"===f?"top":"bottom");const y=v-u.top-u.bottom,b=h-u.left-u.right,w=o$(v-u[m],y),x=o$(h-u[g],b),k=!t.middlewareData.shift;let E=w,S=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),k&&!f){const e=i$(u.left,0),t=i$(u.right,0),n=i$(u.top,0),r=i$(u.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:i$(u.left,u.right)):E=v-2*(0!==n||0!==r?n+r:i$(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:E});const C=await s.getDimensions(a.floating);return h!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}},pO=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=f$(e,t);switch(r){case"referenceHidden":{const e=C$(await S$(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_$(e)}}}case"escaped":{const e=C$(await S$(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_$(e)}}}default:return{}}}}},hO=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=f$(e,t)||{};if(null==c)return{};const d=x$(u),f={x:n,y:r},p=y$(o),h=m$(p),v=await s.getDimensions(c),m="y"===p,g=m?"top":"left",y=m?"bottom":"right",b=m?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-f[p]-i.floating[h],x=f[p]-i.reference[p],k=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let E=k?k[b]:0;E&&await(null==s.isElement?void 0:s.isElement(k))||(E=a.floating[b]||i.floating[h]);const S=w/2-x/2,C=E/2-v[h]/2-1,_=o$(d[g],C),A=o$(d[y],C),N=_,P=E-v[h]-A,j=E/2-v[h]/2+S,$=d$(N,j,P),O=!l.arrow&&null!=h$(o)&&j!==$&&i.reference[h]/2-(j<N?_:A)-v[h]/2<0,R=O?j<N?j-N:j-P:0;return{[p]:f[p]+R,data:{[p]:$,centerOffset:j-$-R,...O&&{alignmentOffset:R}},reset:O}}}),vO=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=f$(e,t),u={x:n,y:r},d=g$(o),f=v$(d);let p=u[f],h=u[d];const v=f$(a,t),m="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+m.mainAxis,n=i.reference[f]+i.reference[e]-m.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(p$(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=s.offset)?void 0:g[d])||0)+(t?0:m.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=s.offset)?void 0:y[d])||0)-(t?m.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},mO=(e,t,n)=>{const r=new Map,o={platform:aO,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=E$(c,r,l),f=r,p={},h=0;for(let v=0;v<a.length;v++){const{name:n,fn:i}=a[v],{x:m,y:g,data:y,reset:b}=await i({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=m?m:u,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=E$(c,f,l))),v=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var gO="undefined"!=typeof document?qe.useLayoutEffect:qe.useEffect;function yO(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!yO(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!yO(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function bO(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wO(e,t){const n=bO(e);return Math.round(t*n)/n}function xO(e){const t=qe.useRef(e);return gO((()=>{t.current=e})),t}const kO=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?hO({element:n.current,padding:r}).fn(t):{}:n?hO({element:n,padding:r}).fn(t):{};var o}}),EO=(e,t)=>({...cO(e),options:[e,t]}),SO=(e,t)=>({...uO(e),options:[e,t]}),CO=(e,t)=>({...vO(e),options:[e,t]}),_O=(e,t)=>({...dO(e),options:[e,t]}),AO=(e,t)=>({...fO(e),options:[e,t]}),NO=(e,t)=>({...pO(e),options:[e,t]}),PO=(e,t)=>({...kO(e),options:[e,t]});var jO=qe.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return nt.jsx(Nj.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:nt.jsx("polygon",{points:"0,0 30,0 15,10"})})}));jO.displayName="Arrow";var $O=jO;var OO="Popper",[RO,MO]=bj(OO),[TO,LO]=RO(OO),IO=e=>{const{__scopePopper:t,children:n}=e,[r,o]=qe.useState(null);return nt.jsx(TO,{scope:t,anchor:r,onAnchorChange:o,children:n})};IO.displayName=OO;var zO="PopperAnchor",DO=qe.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=LO(zO,n),s=qe.useRef(null),a=yj(t,s);return qe.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||s.current)})),r?null:nt.jsx(Nj.div,{...o,ref:a})}));DO.displayName=zO;var BO="PopperContent",[UO,FO]=RO(BO),HO=qe.forwardRef(((e,t)=>{var n,r,o,i,s,a;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:f=0,arrowPadding:p=0,avoidCollisions:h=!0,collisionBoundary:v=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:y=!1,updatePositionStrategy:b="optimized",onPlaced:w,...x}=e,k=LO(BO,l),[E,S]=qe.useState(null),C=yj(t,(e=>S(e))),[_,A]=qe.useState(null),N=function(e){const[t,n]=qe.useState(void 0);return Zj((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(_),P=(null==N?void 0:N.width)??0,j=(null==N?void 0:N.height)??0,$=c+("center"!==d?"-"+d:""),O="number"==typeof m?m:{top:0,right:0,bottom:0,left:0,...m},R=Array.isArray(v)?v:[v],M=R.length>0,T={padding:O,boundary:R.filter(KO),altBoundary:M},{refs:L,floatingStyles:I,placement:z,isPositioned:D,middlewareData:B}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=qe.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=qe.useState(r);yO(f,r)||p(r);const[h,v]=qe.useState(null),[m,g]=qe.useState(null),y=qe.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),b=qe.useCallback((e=>{e!==E.current&&(E.current=e,g(e))}),[]),w=i||h,x=s||m,k=qe.useRef(null),E=qe.useRef(null),S=qe.useRef(u),C=null!=l,_=xO(l),A=xO(o),N=xO(c),P=qe.useCallback((()=>{if(!k.current||!E.current)return;const e={placement:t,strategy:n,middleware:f};A.current&&(e.platform=A.current),mO(k.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==N.current};j.current&&!yO(S.current,t)&&(S.current=t,df.flushSync((()=>{d(t)})))}))}),[f,t,n,A,N]);gO((()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const j=qe.useRef(!1);gO((()=>(j.current=!0,()=>{j.current=!1})),[]),gO((()=>{if(w&&(k.current=w),x&&(E.current=x),w&&x){if(_.current)return _.current(w,x,P);P()}}),[w,x,P,_,C]);const $=qe.useMemo((()=>({reference:k,floating:E,setReference:y,setFloating:b})),[y,b]),O=qe.useMemo((()=>({reference:w,floating:x})),[w,x]),R=qe.useMemo((()=>{const e={position:n,left:0,top:0};if(!O.floating)return e;const t=wO(O.floating,u.x),r=wO(O.floating,u.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...bO(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,O.floating,u.x,u.y]);return qe.useMemo((()=>({...u,update:P,refs:$,elements:O,floatingStyles:R})),[u,P,$,O,R])}({strategy:"fixed",placement:$,whileElementsMounted:(...e)=>lO(...e,{animationFrame:"always"===b}),elements:{reference:k.anchor},middleware:[EO({mainAxis:u+j,alignmentAxis:f}),h&&SO({mainAxis:!0,crossAxis:!1,limiter:"partial"===g?CO():void 0,...T}),h&&_O({...T}),AO({...T,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${n}px`),s.setProperty("--radix-popper-available-height",`${r}px`),s.setProperty("--radix-popper-anchor-width",`${o}px`),s.setProperty("--radix-popper-anchor-height",`${i}px`)}}),_&&PO({element:_,padding:p}),YO({arrowWidth:P,arrowHeight:j}),y&&NO({strategy:"referenceHidden",...T})]}),[U,F]=QO(z),H=xj(w);Zj((()=>{D&&(null==H||H())}),[D,H]);const V=null==(n=B.arrow)?void 0:n.x,W=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(o=B.arrow)?void 0:o.centerOffset),[K,Y]=qe.useState();return Zj((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),nt.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:D?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[null==(i=B.transformOrigin)?void 0:i.x,null==(s=B.transformOrigin)?void 0:s.y].join(" "),...(null==(a=B.hide)?void 0:a.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:nt.jsx(UO,{scope:l,placedSide:U,onArrowChange:A,arrowX:V,arrowY:W,shouldHideArrow:q,children:nt.jsx(Nj.div,{"data-side":U,"data-align":F,...x,ref:C,style:{...x.style,animation:D?void 0:"none"}})})})}));HO.displayName=BO;var VO="PopperArrow",WO={top:"bottom",right:"left",bottom:"top",left:"right"},qO=qe.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=FO(VO,n),i=WO[o.placedSide];return nt.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:nt.jsx($O,{...r,ref:t,style:{...r.style,display:"block"}})})}));function KO(e){return null!==e}qO.displayName=VO;var YO=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o;const{placement:i,rects:s,middlewareData:a}=t,l=0!==(null==(n=a.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,f]=QO(i),p={start:"0%",center:"50%",end:"100%"}[f],h=((null==(r=a.arrow)?void 0:r.x)??0)+c/2,v=((null==(o=a.arrow)?void 0:o.y)??0)+u/2;let m="",g="";return"bottom"===d?(m=l?p:`${h}px`,g=-u+"px"):"top"===d?(m=l?p:`${h}px`,g=`${s.floating.height+u}px`):"right"===d?(m=-u+"px",g=l?p:`${v}px`):"left"===d&&(m=`${s.floating.width+u}px`,g=l?p:`${v}px`),{data:{x:m,y:g}}}});function QO(e){const[t,n="center"]=e.split("-");return[t,n]}var GO=IO,JO=DO,XO=HO,ZO=qO,eR=qe.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[i,s]=qe.useState(!1);Zj((()=>s(!0)),[]);const a=r||i&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return a?ff.createPortal(nt.jsx(Nj.div,{...o,ref:t}),a):null}));eR.displayName="Portal";var tR=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=qe.useState(),r=qe.useRef({}),o=qe.useRef(e),i=qe.useRef("none"),s=e?"mounted":"unmounted",[a,l]=function(e,t){return qe.useReducer(((e,n)=>t[e][n]??e),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return qe.useEffect((()=>{const e=nR(r.current);i.current="mounted"===a?e:"none"}),[a]),Zj((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,s=nR(t);if(e)l("MOUNT");else if("none"===s||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==s?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,l]),Zj((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,s=i=>{const s=nR(r.current).includes(i.animationName);if(i.target===t&&s&&(l("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},a=e=>{e.target===t&&(i.current=nR(r.current))};return t.addEventListener("animationstart",a),t.addEventListener("animationcancel",s),t.addEventListener("animationend",s),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",a),t.removeEventListener("animationcancel",s),t.removeEventListener("animationend",s)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:qe.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):qe.Children.only(n),i=yj(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?qe.cloneElement(o,{ref:i}):null};function nR(e){return(null==e?void 0:e.animationName)||"none"}tR.displayName="Presence";var rR="rovingFocusGroup.onEntryFocus",oR={bubbles:!1,cancelable:!0},iR="RovingFocusGroup",[sR,aR,lR]=jj(iR),[cR,uR]=bj(iR,[lR]),[dR,fR]=cR(iR),pR=qe.forwardRef(((e,t)=>nt.jsx(sR.Provider,{scope:e.__scopeRovingFocusGroup,children:nt.jsx(sR.Slot,{scope:e.__scopeRovingFocusGroup,children:nt.jsx(hR,{...e,ref:t})})})));pR.displayName=iR;var hR=qe.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=qe.useRef(null),p=yj(t,f),h=Oj(i),[v=null,m]=kj({prop:s,defaultProp:a,onChange:l}),[g,y]=qe.useState(!1),b=xj(c),w=aR(n),x=qe.useRef(!1),[k,E]=qe.useState(0);return qe.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(rR,b),()=>e.removeEventListener(rR,b)}),[b]),nt.jsx(dR,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:v,onItemFocus:qe.useCallback((e=>m(e)),[m]),onItemShiftTab:qe.useCallback((()=>y(!0)),[]),onFocusableItemAdd:qe.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:qe.useCallback((()=>E((e=>e-1))),[]),children:nt.jsx(Nj.div,{tabIndex:g||0===k?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:vj(e.onMouseDown,(()=>{x.current=!0})),onFocus:vj(e.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(rR,oR);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));yR([e.find((e=>e.active)),e.find((e=>e.id===v)),...e].filter(Boolean).map((e=>e.ref.current)),u)}}x.current=!1})),onBlur:vj(e.onBlur,(()=>y(!1)))})})})),vR="RovingFocusGroupItem",mR=qe.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,a=n$(),l=i||a,c=fR(vR,n),u=c.currentTabStopId===l,d=aR(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=c;return qe.useEffect((()=>{if(r)return f(),()=>p()}),[r,f,p]),nt.jsx(sR.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:nt.jsx(Nj.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:vj(e.onMouseDown,(e=>{r?c.onItemFocus(l):e.preventDefault()})),onFocus:vj(e.onFocus,(()=>c.onItemFocus(l))),onKeyDown:vj(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void c.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:gR[r]}(e,c.orientation,c.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=c.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>yR(o)))}var n,r}))})})}));mR.displayName=vR;var gR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yR(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var bR=pR,wR=mR,xR=new WeakMap,kR=new WeakMap,ER={},SR=0,CR=function(e){return e&&(e.host||CR(e.parentNode))},_R=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=CR(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);ER[n]||(ER[n]=new WeakMap);var i=ER[n],s=[],a=new Set,l=new Set(o),c=function(e){e&&!a.has(e)&&(a.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(a.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(xR.get(e)||0)+1,c=(i.get(e)||0)+1;xR.set(e,l),i.set(e,c),s.push(e),1===l&&o&&kR.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(d){console.error("aria-hidden: cannot operate on ",e,d)}}))};return u(t),a.clear(),SR++,function(){s.forEach((function(e){var t=xR.get(e)-1,o=i.get(e)-1;xR.set(e,t),i.set(e,o),t||(kR.has(e)||e.removeAttribute(r),kR.delete(e)),o||e.removeAttribute(n)})),--SR||(xR=new WeakMap,xR=new WeakMap,kR=new WeakMap,ER={})}},AR=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),_R(r,o,n,"aria-hidden")):function(){return null}},NR="right-scroll-bar-position",PR="width-before-scroll-bar";function jR(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var $R="undefined"!=typeof window?qe.useLayoutEffect:qe.useEffect,OR=new WeakMap;function RR(e,t){var n,r,o,i=(n=null,r=function(t){return e.forEach((function(e){return jR(e,t)}))},(o=qe.useState((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade);return $R((function(){var t=OR.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach((function(e){r.has(e)||jR(e,null)})),r.forEach((function(e){n.has(e)||jR(e,o)}))}OR.set(i,e)}),[e]),i}function MR(e){return e}var TR=function(e){var t=e.sideCar,n=Yy(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return qe.createElement(r,Ky({},n))};TR.isSideCarExport=!0;var LR=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=MR);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},s=function(){return Promise.resolve().then(i)};s(),n={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=Ky({async:!0,ssr:!1},e),t}(),IR=function(){},zR=qe.forwardRef((function(e,t){var n=qe.useRef(null),r=qe.useState({onScrollCapture:IR,onWheelCapture:IR,onTouchMoveCapture:IR}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,v=e.allowPinchZoom,m=e.as,g=void 0===m?"div":m,y=e.gapMode,b=Yy(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,x=RR([n,t]),k=Ky(Ky({},b),o);return qe.createElement(qe.Fragment,null,u&&qe.createElement(w,{sideCar:LR,removeScrollBar:c,shards:d,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:y}),s?qe.cloneElement(qe.Children.only(a),Ky(Ky({},k),{ref:x})):qe.createElement(g,Ky({},k,{className:l,ref:x}),a))}));zR.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},zR.classNames={fullWidth:PR,zeroRight:NR};function DR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var BR=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=DR())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},UR=function(){var e,t=(e=BR(),function(t,n){qe.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},FR={left:0,top:0,right:0,gap:0},HR=function(e){return parseInt(e||"",10)||0},VR=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return FR;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[HR(n),HR(r),HR(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},WR=UR(),qR="data-scroll-locked",KR=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(a,"px ").concat(r,";\n  }\n  body[").concat(qR,"] {\n    overflow: hidden ").concat(r,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n    padding-left: ".concat(o,"px;\n    padding-top: ").concat(i,"px;\n    padding-right: ").concat(s,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(a,"px ").concat(r,";\n    "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(NR," {\n    right: ").concat(a,"px ").concat(r,";\n  }\n  \n  .").concat(PR," {\n    margin-right: ").concat(a,"px ").concat(r,";\n  }\n  \n  .").concat(NR," .").concat(NR," {\n    right: 0 ").concat(r,";\n  }\n  \n  .").concat(PR," .").concat(PR," {\n    margin-right: 0 ").concat(r,";\n  }\n  \n  body[").concat(qR,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n  }\n")},YR=function(){var e=parseInt(document.body.getAttribute(qR)||"0",10);return isFinite(e)?e:0},QR=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;qe.useEffect((function(){return document.body.setAttribute(qR,(YR()+1).toString()),function(){var e=YR()-1;e<=0?document.body.removeAttribute(qR):document.body.setAttribute(qR,e.toString())}}),[]);var i=qe.useMemo((function(){return VR(o)}),[o]);return qe.createElement(WR,{styles:KR(i,!t,o,n?"":"!important")})},GR=!1;if("undefined"!=typeof window)try{var JR=Object.defineProperty({},"passive",{get:function(){return GR=!0,!0}});window.addEventListener("test",JR,JR),window.removeEventListener("test",JR,JR)}catch(cI){GR=!1}var XR=!!GR&&{passive:!1},ZR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},eM=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),tM(e,r)){var o=nM(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tM=function(e,t){return"v"===e?function(e){return ZR(e,"overflowY")}(t):function(e){return ZR(e,"overflowX")}(t)},nM=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},rM=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oM=function(e){return[e.deltaX,e.deltaY]},iM=function(e){return e&&"current"in e?e.current:e},sM=function(e){return"\n  .block-interactivity-".concat(e," {pointer-events: none;}\n  .allow-interactivity-").concat(e," {pointer-events: all;}\n")},aM=0,lM=[];function cM(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const uM=(dM=function(e){var t=qe.useRef([]),n=qe.useRef([0,0]),r=qe.useRef(),o=qe.useState(aM++)[0],i=qe.useState(UR)[0],s=qe.useRef(e);qe.useEffect((function(){s.current=e}),[e]),qe.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=Zy([e.lockRef.current],(e.shards||[]).map(iM),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var a=qe.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var o,i=rM(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=eM(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=eM(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),c=!1,u=s>0,d=0,f=0;do{var p=nM(e,a),h=p[0],v=p[1]-p[2]-i*h;(h||v)&&tM(e,a)&&(d+=v,f+=h),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return u&&(Math.abs(d)<1||!o)?c=!0:u||!(Math.abs(f)<1)&&o||(c=!0),c}(p,t,e,"h"===p?l:c,!0)}),[]),l=qe.useCallback((function(e){var n=e;if(lM.length&&lM[lM.length-1]===i){var r="deltaY"in n?oM(n):rM(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(s.current.shards||[]).map(iM).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?a(n,l[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),c=qe.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:cM(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),u=qe.useCallback((function(e){n.current=rM(e),r.current=void 0}),[]),d=qe.useCallback((function(t){c(t.type,oM(t),t.target,a(t,e.lockRef.current))}),[]),f=qe.useCallback((function(t){c(t.type,rM(t),t.target,a(t,e.lockRef.current))}),[]);qe.useEffect((function(){return lM.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,XR),document.addEventListener("touchmove",l,XR),document.addEventListener("touchstart",u,XR),function(){lM=lM.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,XR),document.removeEventListener("touchmove",l,XR),document.removeEventListener("touchstart",u,XR)}}),[]);var p=e.removeScrollBar,h=e.inert;return qe.createElement(qe.Fragment,null,h?qe.createElement(i,{styles:sM(o)}):null,p?qe.createElement(QR,{gapMode:e.gapMode}):null)},LR.useMedium(dM),TR);var dM,fM=qe.forwardRef((function(e,t){return qe.createElement(zR,Ky({},e,{ref:t,sideCar:uM}))}));fM.classNames=zR.classNames;var pM=["Enter"," "],hM=["ArrowUp","PageDown","End"],vM=["ArrowDown","PageUp","Home",...hM],mM={ltr:[...pM,"ArrowRight"],rtl:[...pM,"ArrowLeft"]},gM={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yM="Menu",[bM,wM,xM]=jj(yM),[kM,EM]=bj(yM,[xM,MO,uR]),SM=MO(),CM=uR(),[_M,AM]=kM(yM),[NM,PM]=kM(yM),jM=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,a=SM(t),[l,c]=qe.useState(null),u=qe.useRef(!1),d=xj(i),f=Oj(o);return qe.useEffect((()=>{const e=()=>{u.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),nt.jsx(GO,{...a,children:nt.jsx(_M,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:c,children:nt.jsx(NM,{scope:t,onClose:qe.useCallback((()=>d(!1)),[d]),isUsingKeyboardRef:u,dir:f,modal:s,children:r})})})};jM.displayName=yM;var $M=qe.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=SM(n);return nt.jsx(JO,{...o,...r,ref:t})}));$M.displayName="MenuAnchor";var OM="MenuPortal",[RM,MM]=kM(OM,{forceMount:void 0}),TM=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=AM(OM,t);return nt.jsx(RM,{scope:t,forceMount:n,children:nt.jsx(tR,{present:n||i.open,children:nt.jsx(eR,{asChild:!0,container:o,children:r})})})};TM.displayName=OM;var LM="MenuContent",[IM,zM]=kM(LM),DM=qe.forwardRef(((e,t)=>{const n=MM(LM,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=AM(LM,e.__scopeMenu),s=PM(LM,e.__scopeMenu);return nt.jsx(bM.Provider,{scope:e.__scopeMenu,children:nt.jsx(tR,{present:r||i.open,children:nt.jsx(bM.Slot,{scope:e.__scopeMenu,children:s.modal?nt.jsx(BM,{...o,ref:t}):nt.jsx(UM,{...o,ref:t})})})})})),BM=qe.forwardRef(((e,t)=>{const n=AM(LM,e.__scopeMenu),r=qe.useRef(null),o=yj(t,r);return qe.useEffect((()=>{const e=r.current;if(e)return AR(e)}),[]),nt.jsx(FM,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:vj(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})})),UM=qe.forwardRef(((e,t)=>{const n=AM(LM,e.__scopeMenu);return nt.jsx(FM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),FM=qe.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:h,...v}=e,m=AM(LM,n),g=PM(LM,n),y=SM(n),b=CM(n),w=wM(n),[x,k]=qe.useState(null),E=qe.useRef(null),S=yj(t,E,m.onContentChange),C=qe.useRef(0),_=qe.useRef(""),A=qe.useRef(0),N=qe.useRef(null),P=qe.useRef("right"),j=qe.useRef(0),$=h?fM:qe.Fragment,O=h?{as:Ej,allowPinchZoom:!0}:void 0,R=e=>{var t,n;const r=_.current+e,o=w().filter((e=>!e.disabled)),i=document.activeElement,s=null==(t=o.find((e=>e.ref.current===i)))?void 0:t.textValue,a=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,i=n?e.indexOf(n):-1;let s=(a=e,l=Math.max(i,0),a.map(((e,t)=>a[(l+t)%a.length])));var a,l;1===o.length&&(s=s.filter((e=>e!==n)));const c=s.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return c!==n?c:void 0}(o.map((e=>e.textValue)),r,s),l=null==(n=o.find((e=>e.textValue===a)))?void 0:n.ref.current;!function e(t){_.current=t,window.clearTimeout(C.current),""!==t&&(C.current=window.setTimeout((()=>e("")),1e3))}(r),l&&setTimeout((()=>l.focus()))};qe.useEffect((()=>()=>window.clearTimeout(C.current)),[]),qe.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Fj()),document.body.insertAdjacentElement("beforeend",e[1]??Fj()),Uj++,()=>{1===Uj&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Uj--}}),[]);const M=qe.useCallback((e=>{var t,n;return P.current===(null==(t=N.current)?void 0:t.side)&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const e=t[i].x,a=t[i].y,l=t[s].x,c=t[s].y;a>r!=c>r&&n<(l-e)*(r-a)/(c-a)+e&&(o=!o)}return o}(n,t)}(e,null==(n=N.current)?void 0:n.area)}),[]);return nt.jsx(IM,{scope:n,searchRef:_,onItemEnter:qe.useCallback((e=>{M(e)&&e.preventDefault()}),[M]),onItemLeave:qe.useCallback((e=>{var t;M(e)||(null==(t=E.current)||t.focus(),k(null))}),[M]),onTriggerLeave:qe.useCallback((e=>{M(e)&&e.preventDefault()}),[M]),pointerGraceTimerRef:A,onPointerGraceIntentChange:qe.useCallback((e=>{N.current=e}),[]),children:nt.jsx($,{...O,children:nt.jsx(qj,{asChild:!0,trapped:o,onMountAutoFocus:vj(i,(e=>{var t;e.preventDefault(),null==(t=E.current)||t.focus({preventScroll:!0})})),onUnmountAutoFocus:s,children:nt.jsx(zj,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:nt.jsx(bR,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:k,onEntryFocus:vj(l,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:nt.jsx(XO,{role:"menu","aria-orientation":"vertical","data-state":hT(m.open),"data-radix-menu-content":"",dir:g.dir,...y,...v,ref:S,style:{outline:"none",...v.style},onKeyDown:vj(v.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&R(e.key));const o=E.current;if(e.target!==o)return;if(!vM.includes(e.key))return;e.preventDefault();const i=w().filter((e=>!e.disabled)).map((e=>e.ref.current));hM.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)})),onBlur:vj(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(C.current),_.current="")})),onPointerMove:vj(e.onPointerMove,gT((e=>{const t=e.target,n=j.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>j.current?"right":"left";P.current=t,j.current=e.clientX}})))})})})})})})}));DM.displayName=LM;var HM=qe.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return nt.jsx(Nj.div,{role:"group",...r,ref:t})}));HM.displayName="MenuGroup";var VM=qe.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return nt.jsx(Nj.div,{...r,ref:t})}));VM.displayName="MenuLabel";var WM="MenuItem",qM="menu.itemSelect",KM=qe.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=qe.useRef(null),s=PM(WM,e.__scopeMenu),a=zM(WM,e.__scopeMenu),l=yj(t,i),c=qe.useRef(!1);return nt.jsx(YM,{...o,ref:l,disabled:n,onClick:vj(e.onClick,(()=>{const e=i.current;if(!n&&e){const t=new CustomEvent(qM,{bubbles:!0,cancelable:!0});e.addEventListener(qM,(e=>null==r?void 0:r(e)),{once:!0}),Pj(e,t),t.defaultPrevented?c.current=!1:s.onClose()}})),onPointerDown:t=>{var n;null==(n=e.onPointerDown)||n.call(e,t),c.current=!0},onPointerUp:vj(e.onPointerUp,(e=>{var t;c.current||null==(t=e.currentTarget)||t.click()})),onKeyDown:vj(e.onKeyDown,(e=>{const t=""!==a.searchRef.current;n||t&&" "===e.key||pM.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));KM.displayName=WM;var YM=qe.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=zM(WM,n),a=CM(n),l=qe.useRef(null),c=yj(t,l),[u,d]=qe.useState(!1),[f,p]=qe.useState("");return qe.useEffect((()=>{const e=l.current;e&&p((e.textContent??"").trim())}),[i.children]),nt.jsx(bM.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:nt.jsx(wR,{asChild:!0,...a,focusable:!r,children:nt.jsx(Nj.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:c,onPointerMove:vj(e.onPointerMove,gT((e=>{if(r)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:vj(e.onPointerLeave,gT((e=>s.onItemLeave(e)))),onFocus:vj(e.onFocus,(()=>d(!0))),onBlur:vj(e.onBlur,(()=>d(!1)))})})})})),QM=qe.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return nt.jsx(rT,{scope:e.__scopeMenu,checked:n,children:nt.jsx(KM,{role:"menuitemcheckbox","aria-checked":vT(n)?"mixed":n,...o,ref:t,"data-state":mT(n),onSelect:vj(o.onSelect,(()=>null==r?void 0:r(!!vT(n)||!n)),{checkForDefaultPrevented:!1})})})}));QM.displayName="MenuCheckboxItem";var GM="MenuRadioGroup",[JM,XM]=kM(GM,{value:void 0,onValueChange:()=>{}}),ZM=qe.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=xj(r);return nt.jsx(JM,{scope:e.__scopeMenu,value:n,onValueChange:i,children:nt.jsx(HM,{...o,ref:t})})}));ZM.displayName=GM;var eT="MenuRadioItem",tT=qe.forwardRef(((e,t)=>{const{value:n,...r}=e,o=XM(eT,e.__scopeMenu),i=n===o.value;return nt.jsx(rT,{scope:e.__scopeMenu,checked:i,children:nt.jsx(KM,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":mT(i),onSelect:vj(r.onSelect,(()=>{var e;return null==(e=o.onValueChange)?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})})}));tT.displayName=eT;var nT="MenuItemIndicator",[rT,oT]=kM(nT,{checked:!1}),iT=qe.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=oT(nT,n);return nt.jsx(tR,{present:r||vT(i.checked)||!0===i.checked,children:nt.jsx(Nj.span,{...o,ref:t,"data-state":mT(i.checked)})})}));iT.displayName=nT;var sT=qe.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return nt.jsx(Nj.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));sT.displayName="MenuSeparator";var aT=qe.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=SM(n);return nt.jsx(ZO,{...o,...r,ref:t})}));aT.displayName="MenuArrow";var[lT,cT]=kM("MenuSub"),uT="MenuSubTrigger",dT=qe.forwardRef(((e,t)=>{const n=AM(uT,e.__scopeMenu),r=PM(uT,e.__scopeMenu),o=cT(uT,e.__scopeMenu),i=zM(uT,e.__scopeMenu),s=qe.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=qe.useCallback((()=>{s.current&&window.clearTimeout(s.current),s.current=null}),[]);return qe.useEffect((()=>u),[u]),qe.useEffect((()=>{const e=a.current;return()=>{window.clearTimeout(e),l(null)}}),[a,l]),nt.jsx($M,{asChild:!0,...c,children:nt.jsx(YM,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":hT(n.open),...e,ref:gj(t,o.onTriggerChange),onClick:t=>{var r;null==(r=e.onClick)||r.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:vj(e.onPointerMove,gT((t=>{i.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||s.current||(i.onPointerGraceIntentChange(null),s.current=window.setTimeout((()=>{n.onOpenChange(!0),u()}),100))}))),onPointerLeave:vj(e.onPointerLeave,gT((e=>{var t,r;u();const o=null==(t=n.content)?void 0:t.getBoundingClientRect();if(o){const t=null==(r=n.content)?void 0:r.dataset.side,s="right"===t,l=s?-5:5,c=o[s?"left":"right"],u=o[s?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+l,y:e.clientY},{x:c,y:o.top},{x:u,y:o.top},{x:u,y:o.bottom},{x:c,y:o.bottom}],side:t}),window.clearTimeout(a.current),a.current=window.setTimeout((()=>i.onPointerGraceIntentChange(null)),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}}))),onKeyDown:vj(e.onKeyDown,(t=>{var o;const s=""!==i.searchRef.current;e.disabled||s&&" "===t.key||mM[r.dir].includes(t.key)&&(n.onOpenChange(!0),null==(o=n.content)||o.focus(),t.preventDefault())}))})})}));dT.displayName=uT;var fT="MenuSubContent",pT=qe.forwardRef(((e,t)=>{const n=MM(LM,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=AM(LM,e.__scopeMenu),s=PM(LM,e.__scopeMenu),a=cT(fT,e.__scopeMenu),l=qe.useRef(null),c=yj(t,l);return nt.jsx(bM.Provider,{scope:e.__scopeMenu,children:nt.jsx(tR,{present:r||i.open,children:nt.jsx(bM.Slot,{scope:e.__scopeMenu,children:nt.jsx(FM,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:c,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;s.isUsingKeyboardRef.current&&(null==(t=l.current)||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:vj(e.onFocusOutside,(e=>{e.target!==a.trigger&&i.onOpenChange(!1)})),onEscapeKeyDown:vj(e.onEscapeKeyDown,(e=>{s.onClose(),e.preventDefault()})),onKeyDown:vj(e.onKeyDown,(e=>{var t;const n=e.currentTarget.contains(e.target),r=gM[s.dir].includes(e.key);n&&r&&(i.onOpenChange(!1),null==(t=a.trigger)||t.focus(),e.preventDefault())}))})})})})}));function hT(e){return e?"open":"closed"}function vT(e){return"indeterminate"===e}function mT(e){return vT(e)?"indeterminate":e?"checked":"unchecked"}function gT(e){return t=>"mouse"===t.pointerType?e(t):void 0}pT.displayName=fT;var yT=jM,bT=$M,wT=TM,xT=DM,kT=HM,ET=VM,ST=KM,CT=QM,_T=ZM,AT=tT,NT=iT,PT=sT,jT=aT,$T=dT,OT=pT,RT="DropdownMenu",[MT,TT]=bj(RT,[EM]),LT=EM(),[IT,zT]=MT(RT),DT=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=LT(t),c=qe.useRef(null),[u=!1,d]=kj({prop:o,defaultProp:i,onChange:s});return nt.jsx(IT,{scope:t,triggerId:n$(),triggerRef:c,contentId:n$(),open:u,onOpenChange:d,onOpenToggle:qe.useCallback((()=>d((e=>!e))),[d]),modal:a,children:nt.jsx(yT,{...l,open:u,onOpenChange:d,dir:r,modal:a,children:n})})};DT.displayName=RT;var BT="DropdownMenuTrigger",UT=qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=zT(BT,n),s=LT(n);return nt.jsx(bT,{asChild:!0,...s,children:nt.jsx(Nj.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:gj(t,i.triggerRef),onPointerDown:vj(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:vj(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));UT.displayName=BT;var FT=e=>{const{__scopeDropdownMenu:t,...n}=e,r=LT(t);return nt.jsx(wT,{...r,...n})};FT.displayName="DropdownMenuPortal";var HT="DropdownMenuContent",VT=qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=zT(HT,n),i=LT(n),s=qe.useRef(!1);return nt.jsx(xT,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:vj(e.onCloseAutoFocus,(e=>{var t;s.current||null==(t=o.triggerRef.current)||t.focus(),s.current=!1,e.preventDefault()})),onInteractOutside:vj(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.modal&&!r||(s.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));VT.displayName=HT;qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx(kT,{...o,...r,ref:t})})).displayName="DropdownMenuGroup";var WT=qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx(ET,{...o,...r,ref:t})}));WT.displayName="DropdownMenuLabel";var qT=qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx(ST,{...o,...r,ref:t})}));qT.displayName="DropdownMenuItem";var KT=qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx(CT,{...o,...r,ref:t})}));KT.displayName="DropdownMenuCheckboxItem";qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx(_T,{...o,...r,ref:t})})).displayName="DropdownMenuRadioGroup";qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx(AT,{...o,...r,ref:t})})).displayName="DropdownMenuRadioItem";var YT=qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx(NT,{...o,...r,ref:t})}));YT.displayName="DropdownMenuItemIndicator";var QT=qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx(PT,{...o,...r,ref:t})}));QT.displayName="DropdownMenuSeparator";qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx(jT,{...o,...r,ref:t})})).displayName="DropdownMenuArrow";var GT=qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx($T,{...o,...r,ref:t})}));GT.displayName="DropdownMenuSubTrigger";var JT=qe.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=LT(n);return nt.jsx(OT,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));JT.displayName="DropdownMenuSubContent";var XT=DT,ZT=UT,eL=FT,tL=VT,nL=WT,rL=qT,oL=KT,iL=YT,sL=QT,aL=GT,lL=JT;const cL=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim();var uL={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const dL=qe.forwardRef((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>qe.createElement("svg",{ref:l,...uL,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:cL("lucide",o),...a},[...s.map((([e,t])=>qe.createElement(e,t))),...Array.isArray(i)?i:[i]]))),fL=(e,t)=>{const n=qe.forwardRef((({className:n,...r},o)=>{return qe.createElement(dL,{ref:o,iconNode:t,className:cL(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i}));return n.displayName=`${e}`,n},pL=fL("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),hL=fL("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),vL=XT,mL=ZT;qe.forwardRef((({className:e,inset:t,children:n,...r},o)=>nt.jsxs(aL,{ref:o,className:ap("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,nt.jsx(hL,{className:"ml-auto h-4 w-4"})]}))).displayName=aL.displayName;qe.forwardRef((({className:e,...t},n)=>nt.jsx(lL,{ref:n,className:ap("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}))).displayName=lL.displayName;const gL=qe.forwardRef((({className:e,sideOffset:t=4,...n},r)=>nt.jsx(eL,{children:nt.jsx(tL,{ref:r,sideOffset:t,className:ap("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})})));gL.displayName=tL.displayName;const yL=qe.forwardRef((({className:e,inset:t,...n},r)=>nt.jsx(rL,{ref:r,className:ap("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n})));yL.displayName=rL.displayName;qe.forwardRef((({className:e,children:t,checked:n,...r},o)=>nt.jsxs(oL,{ref:o,className:ap("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[nt.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:nt.jsx(iL,{children:nt.jsx(pL,{className:"h-4 w-4"})})}),t]}))).displayName=oL.displayName;qe.forwardRef((({className:e,inset:t,...n},r)=>nt.jsx(nL,{ref:r,className:ap("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}))).displayName=nL.displayName;const bL=qe.forwardRef((({className:e,...t},n)=>nt.jsx(sL,{ref:n,className:ap("-mx-1 my-1 h-px bg-muted",e),...t})));bL.displayName=sL.displayName;const wL=new Set(["children","localName","ref","style","className"]),xL=new WeakMap,kL=(e,t,n,r,o)=>{const i=null==o?void 0:o[t];void 0===i?(e[t]=n,null==n&&t in HTMLElement.prototype&&e.removeAttribute(t)):n!==r&&((e,t,n)=>{let r=xL.get(e);void 0===r&&xL.set(e,r=new Map);let o=r.get(t);void 0!==n?void 0===o?(r.set(t,o={handleEvent:n}),e.addEventListener(t,o)):o.handleEvent=n:void 0!==o&&(r.delete(t),e.removeEventListener(t,o))})(e,i,n)},EL=({react:e,tagName:t,elementClass:n,events:r,displayName:o})=>{const i=new Set(Object.keys(r??{})),s=e.forwardRef(((o,s)=>{const a=e.useRef(new Map),l=e.useRef(null),c={},u={};for(const[e,t]of Object.entries(o))wL.has(e)?c["className"===e?"class":e]=t:i.has(e)||e in n.prototype?u[e]=t:c[e]=t;return e.useLayoutEffect((()=>{if(null===l.current)return;const e=new Map;for(const t in u)kL(l.current,t,o[t],a.current.get(t),r),a.current.delete(t),e.set(t,o[t]);for(const[t,n]of a.current)kL(l.current,t,void 0,n,r);a.current=e})),e.useLayoutEffect((()=>{var e;null==(e=l.current)||e.removeAttribute("defer-hydration")}),[]),c.suppressHydrationWarning=!0,e.createElement(t,{...c,ref:e.useCallback((e=>{l.current=e,"function"==typeof s?s(e):null!==s&&(s.current=e)}),[s])})}));return s.displayName=o??n.name,s};EL({tagName:"dc-connection-button",elementClass:pj,react:Ke});const SL=EL({tagName:"dc-connection-dialog",elementClass:sj,react:Ke,events:{onClose:"close"}});function CL(...e){const t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map((e=>e.encode)).reduceRight(n,t),decode:e.map((e=>e.decode)).reduce(n,t)}}function _L(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const n=e.indexOf(t);if(-1===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}}function AL(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function NL(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const o=[],i=Array.from(e);for(i.forEach((e=>{if(e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,s=!0;for(let o=r;o<i.length;o++){const a=i[o],l=t*e+a;if(!Number.isSafeInteger(l)||t*e/t!==e||l-a!=t*e)throw new Error("convertRadix: carry overflow");e=l%n;const c=Math.floor(l/n);if(i[o]=c,!Number.isSafeInteger(c)||c*n+e!==l)throw new Error("convertRadix: carry overflow");s&&(c?s=!1:r=o)}if(o.push(e),s)break}for(let s=0;s<e.length-1&&0===e[s];s++)o.push(0);return o.reverse()}function PL(e){return{encode:t=>{if(!function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}(t))throw new Error("radix.encode input should be Uint8Array");return NL(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(NL(t,e,256))}}}const jL=(e=>CL(PL(58),_L(e),AL("")))("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function $L(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function OL(e,...t){if(!function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function RL(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}const ML=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),TL=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],LL=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,IL=TL?e=>e:e=>LL(e);function zL(e){for(let t=0;t<e.length;t++)e[t]=LL(e[t])}function DL(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),OL(e),e}class BL{clone(){return this._cloneInto()}}function UL(e){const t=(t,n)=>e(n).update(DL(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}const FL=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3]);class HL extends BL{constructor(e,t,n={},r,o,i){if(super(),this.blockLen=e,this.outputLen=t,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,$L(e),$L(t),$L(r),t<0||t>r)throw new Error("outputLen bigger than keyLen");if(void 0!==n.key&&(n.key.length<1||n.key.length>r))throw new Error(`key must be up 1..${r} byte long or undefined`);if(void 0!==n.salt&&n.salt.length!==o)throw new Error(`salt must be ${o} byte long or undefined`);if(void 0!==n.personalization&&n.personalization.length!==i)throw new Error(`personalization must be ${i} byte long or undefined`);this.buffer32=ML(this.buffer=new Uint8Array(e))}update(e){RL(this);const{blockLen:t,buffer:n,buffer32:r}=this,o=(e=DL(e)).length,i=e.byteOffset,s=e.buffer;for(let a=0;a<o;){this.pos===t&&(TL||zL(r),this.compress(r,0,!1),TL||zL(r),this.pos=0);const l=Math.min(t-this.pos,o-a),c=i+a;if(l!==t||c%4||!(a+l<o))n.set(e.subarray(a,a+l),this.pos),this.pos+=l,this.length+=l,a+=l;else{const e=new Uint32Array(s,c,Math.floor((o-a)/4));TL||zL(e);for(let n=0;a+t<o;n+=r.length,a+=t)this.length+=t,this.compress(e,n,!1);TL||zL(e)}}return this}digestInto(e){RL(this),function(e,t){OL(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}(e,this);const{pos:t,buffer32:n}=this;this.finished=!0,this.buffer.subarray(t).fill(0),TL||zL(n),this.compress(n,0,!0),TL||zL(n);const r=ML(e);this.get().forEach(((e,t)=>r[t]=IL(e)))}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){const{buffer:t,length:n,finished:r,destroyed:o,outputLen:i,pos:s}=this;return e||(e=new this.constructor({dkLen:i})),e.set(...this.get()),e.length=n,e.finished=r,e.destroyed=o,e.outputLen=i,e.buffer.set(t),e.pos=s,e}}const VL=BigInt(2**32-1),WL=BigInt(32);function qL(e,t=!1){return t?{h:Number(e&VL),l:Number(e>>WL&VL)}:{h:0|Number(e>>WL&VL),l:0|Number(e&VL)}}const KL={fromBig:qL,split:function(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:i,l:s}=qL(e[o],t);[n[o],r[o]]=[i,s]}return[n,r]},toBig:(e,t)=>BigInt(e>>>0)<<WL|BigInt(t>>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,n)=>e<<n|t>>>32-n,rotlSL:(e,t,n)=>t<<n|e>>>32-n,rotlBH:(e,t,n)=>t<<n-32|e>>>64-n,rotlBL:(e,t,n)=>e<<n-32|t>>>64-n,add:function(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,add5H:(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,add5L:(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0)},YL=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),QL=new Uint32Array(32);function GL(e,t,n,r,o,i){const s=o[i],a=o[i+1];let l=QL[2*e],c=QL[2*e+1],u=QL[2*t],d=QL[2*t+1],f=QL[2*n],p=QL[2*n+1],h=QL[2*r],v=QL[2*r+1],m=KL.add3L(l,u,s);c=KL.add3H(m,c,d,a),l=0|m,({Dh:v,Dl:h}={Dh:v^c,Dl:h^l}),({Dh:v,Dl:h}={Dh:KL.rotr32H(v,h),Dl:KL.rotr32L(v,h)}),({h:p,l:f}=KL.add(p,f,v,h)),({Bh:d,Bl:u}={Bh:d^p,Bl:u^f}),({Bh:d,Bl:u}={Bh:KL.rotrSH(d,u,24),Bl:KL.rotrSL(d,u,24)}),QL[2*e]=l,QL[2*e+1]=c,QL[2*t]=u,QL[2*t+1]=d,QL[2*n]=f,QL[2*n+1]=p,QL[2*r]=h,QL[2*r+1]=v}function JL(e,t,n,r,o,i){const s=o[i],a=o[i+1];let l=QL[2*e],c=QL[2*e+1],u=QL[2*t],d=QL[2*t+1],f=QL[2*n],p=QL[2*n+1],h=QL[2*r],v=QL[2*r+1],m=KL.add3L(l,u,s);c=KL.add3H(m,c,d,a),l=0|m,({Dh:v,Dl:h}={Dh:v^c,Dl:h^l}),({Dh:v,Dl:h}={Dh:KL.rotrSH(v,h,16),Dl:KL.rotrSL(v,h,16)}),({h:p,l:f}=KL.add(p,f,v,h)),({Bh:d,Bl:u}={Bh:d^p,Bl:u^f}),({Bh:d,Bl:u}={Bh:KL.rotrBH(d,u,63),Bl:KL.rotrBL(d,u,63)}),QL[2*e]=l,QL[2*e+1]=c,QL[2*t]=u,QL[2*t+1]=d,QL[2*n]=f,QL[2*n+1]=p,QL[2*r]=h,QL[2*r+1]=v}class XL extends HL{constructor(e={}){super(128,void 0===e.dkLen?64:e.dkLen,e,64,16,16),this.v0l=0|YL[0],this.v0h=0|YL[1],this.v1l=0|YL[2],this.v1h=0|YL[3],this.v2l=0|YL[4],this.v2h=0|YL[5],this.v3l=0|YL[6],this.v3h=0|YL[7],this.v4l=0|YL[8],this.v4h=0|YL[9],this.v5l=0|YL[10],this.v5h=0|YL[11],this.v6l=0|YL[12],this.v6h=0|YL[13],this.v7l=0|YL[14],this.v7h=0|YL[15];const t=e.key?e.key.length:0;if(this.v0l^=this.outputLen|t<<8|65536|1<<24,e.salt){const t=ML(DL(e.salt));this.v4l^=IL(t[0]),this.v4h^=IL(t[1]),this.v5l^=IL(t[2]),this.v5h^=IL(t[3])}if(e.personalization){const t=ML(DL(e.personalization));this.v6l^=IL(t[0]),this.v6h^=IL(t[1]),this.v7l^=IL(t[2]),this.v7h^=IL(t[3])}if(e.key){const t=new Uint8Array(this.blockLen);t.set(DL(e.key)),this.update(t)}}get(){let{v0l:e,v0h:t,v1l:n,v1h:r,v2l:o,v2h:i,v3l:s,v3h:a,v4l:l,v4h:c,v5l:u,v5h:d,v6l:f,v6h:p,v7l:h,v7h:v}=this;return[e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,v]}set(e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,v){this.v0l=0|e,this.v0h=0|t,this.v1l=0|n,this.v1h=0|r,this.v2l=0|o,this.v2h=0|i,this.v3l=0|s,this.v3h=0|a,this.v4l=0|l,this.v4h=0|c,this.v5l=0|u,this.v5h=0|d,this.v6l=0|f,this.v6h=0|p,this.v7l=0|h,this.v7h=0|v}compress(e,t,n){this.get().forEach(((e,t)=>QL[t]=e)),QL.set(YL,16);let{h:r,l:o}=KL.fromBig(BigInt(this.length));QL[24]=YL[8]^o,QL[25]=YL[9]^r,n&&(QL[28]=~QL[28],QL[29]=~QL[29]);let i=0;const s=FL;for(let a=0;a<12;a++)GL(0,4,8,12,e,t+2*s[i++]),JL(0,4,8,12,e,t+2*s[i++]),GL(1,5,9,13,e,t+2*s[i++]),JL(1,5,9,13,e,t+2*s[i++]),GL(2,6,10,14,e,t+2*s[i++]),JL(2,6,10,14,e,t+2*s[i++]),GL(3,7,11,15,e,t+2*s[i++]),JL(3,7,11,15,e,t+2*s[i++]),GL(0,5,10,15,e,t+2*s[i++]),JL(0,5,10,15,e,t+2*s[i++]),GL(1,6,11,12,e,t+2*s[i++]),JL(1,6,11,12,e,t+2*s[i++]),GL(2,7,8,13,e,t+2*s[i++]),JL(2,7,8,13,e,t+2*s[i++]),GL(3,4,9,14,e,t+2*s[i++]),JL(3,4,9,14,e,t+2*s[i++]);this.v0l^=QL[0]^QL[16],this.v0h^=QL[1]^QL[17],this.v1l^=QL[2]^QL[18],this.v1h^=QL[3]^QL[19],this.v2l^=QL[4]^QL[20],this.v2h^=QL[5]^QL[21],this.v3l^=QL[6]^QL[22],this.v3h^=QL[7]^QL[23],this.v4l^=QL[8]^QL[24],this.v4h^=QL[9]^QL[25],this.v5l^=QL[10]^QL[26],this.v5h^=QL[11]^QL[27],this.v6l^=QL[12]^QL[28],this.v6h^=QL[13]^QL[29],this.v7l^=QL[14]^QL[30],this.v7h^=QL[15]^QL[31],QL.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const ZL=UL((e=>new XL(e))),eI=(new TextEncoder).encode("SS58PRE"),tI=e=>{try{const t=jL.decode(e),n=t.subarray(0,64&t[0]?2:1),r=t.subarray(n.length,t.length-2),o=t.subarray(n.length+r.length),i=ZL(Uint8Array.of(...eI,...n,...r),{dkLen:64}).subarray(0,2);return o[0]===i[0]&&o[1]===i[1]?{isValid:!0,ss58Format:nI(n),publicKey:r.slice()}:{isValid:!1}}catch{return{isValid:!1}}},nI=e=>{const t=new DataView(e.buffer,e.byteOffset,e.byteLength);return 1===t.byteLength?t.getUint8(0):t.getUint16(0)},rI={target:{colors:[0,28,0,0,28,0,0,28,0,0,28,0,0,28,0,0,28,0,1],freq:1},cube:{colors:[0,1,3,2,4,3,0,1,3,2,4,3,0,1,3,2,4,3,5],freq:20},quazar:{colors:[1,2,3,1,2,4,5,5,4,1,2,3,1,2,4,5,5,4,0],freq:16},flower:{colors:[0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,3],freq:32},cyclic:{colors:[0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,6],freq:32},vmirror:{colors:[0,1,2,3,4,5,3,4,2,0,1,6,7,8,9,7,8,6,10],freq:128},hmirror:{colors:[0,1,2,3,4,5,6,7,8,9,10,8,6,7,5,3,4,2,11],freq:128}},oI=e=>{let t=0;const n=Object.values(rI).find((n=>(t+=n.freq,e<t)));if(!n)throw new Error("Unable to find a valid schema.");return n},iI=({size:e="2rem",address:t,copy:n=!1,outerColor:r="white",copyTimeout:o=750,copyMsg:i="✔",style:s={},className:a=""})=>{var l;const[c,u]=qe.useState(!1),[d,f]=qe.useState(i),[p,h]=qe.useState(),[v,m]=qe.useState(),[g,y]=qe.useState();qe.useEffect((()=>{if("string"==typeof e&&!e.includes("px")&&!e.includes("rem"))throw new Error("Providing a string for 'size' in Polkicon should be expressed either in 'px', 'rem' or 'em'");let t,n;if("string"==typeof e)switch(n=e.replace(/[0-9.]/g,""),n){case"px":t=parseFloat(e);break;case"rem":t=10*parseFloat(e)}else"number"==typeof e&&(t=e);var r,o;h(n?""+("px"===n?t+"px":t/10+"rem"):t),t<12&&(r=n||"number",o="px"===n?"12px":"rem"===n?"1.2rem":12,console.warn(`Polkicon: 'Size' expressed in '${r}' cannot be less than ${o}. Will be resized to minimum size.`)),t<32?(y("0rem 0.5rem"),m("0.5rem")):t>=32&&t<64?(y("1rem 0.5rem"),m("1rem")):t>=64&&t<100?(y("2rem 1rem"),m("1.5rem")):t>=100&&(y("3rem 1rem"),m("2rem"))}),[e]);const b=qe.useCallback((()=>{n&&(async e=>{try{await navigator.clipboard.writeText(e),u(!0),f(i)}catch{u(!0),f("Failed!")}})(t)}),[n,t,i]);qe.useEffect((()=>{n&&c&&setTimeout((()=>{u(!1)}),o)}),[n,c,o]);const{c:w,r:x,rroot3o2:k,ro2:E,rroot3o4:S,ro4:C,r3o4:_,z:A,rot:N,scheme:P,palette:j}=(e=>{const t=ZL(new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),n=tI(e);let r=n.isValid?n.publicKey:e;if(!("object"==typeof r&&r&&r instanceof Uint8Array&&32==r.length))return{};r=Uint8Array.from(ZL(r)).map(((e,n)=>(e+256-t[n])%256));const o=22.4,i=o*Math.sqrt(3)/2,s=o*Math.sqrt(3)/4,a=3*o/4,l=Object.keys(rI).map((e=>rI[e].freq)).reduce(((e,t)=>e+t)),c=Math.floor(70*r[29]/256+26)%80+30,u=Math.floor((r[30]+256*r[31])%l),d=oI(u),f=Array.from(r).map(((e,t)=>{const n=(e+t%28*58)%256;if(0==n)return"#444";if(255==n)return"transparent";const r=Math.floor(n%64*360/64),o=[53,15,35,75][Math.floor(n/64)];return`hsl(${r}, ${c}%, ${o}%)`}));return{c:32,r:o,rroot3o2:i,ro2:11.2,rroot3o4:s,ro4:5.6,r3o4:a,z:5,rot:r[28]%6*3,scheme:d,palette:f}})(t),$=tI(t).isValid?null==(l=null==P?void 0:P.colors)?void 0:l.map(((e,t)=>j[null==P?void 0:P.colors[t<18?(t+N)%18:18]])):[];let O=0;return $?nt.jsxs("div",{onClick:n?b:void 0,style:n?{cursor:c?"none":"copy",position:"relative",display:"flex",justifyContent:"center",alignItems:"center"}:{display:"flex",justifyContent:"center",alignItems:"center"},children:[nt.jsxs("svg",{id:Math.random().toString(36).substring(2,9),className:a,style:s,width:p,height:p,viewBox:"0 0 64 64",children:[nt.jsx("circle",{cx:32,cy:32,r:32,fill:r}),nt.jsx("circle",{cx:w,cy:w-x,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w,cy:w-E,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w-S,cy:w-_,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w-k,cy:w-E,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w-S,cy:w-C,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w-k,cy:w,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w-k,cy:w+E,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w-S,cy:w+C,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w-S,cy:w+_,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w,cy:w+x,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w,cy:w+E,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w+S,cy:w+_,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w+k,cy:w+E,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w+S,cy:w+C,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w+k,cy:w,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w+k,cy:w-E,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w+S,cy:w-C,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w+S,cy:w-_,r:A,fill:$[O++]}),nt.jsx("circle",{cx:w,cy:w,r:A,fill:$[O++]})]}),n&&c&&nt.jsx("p",{style:{fontSize:v,fontWeight:"bold",padding:g,width:p,height:p,position:"absolute",borderRadius:"55rem",color:"white",background:"green",opacity:"80%",alignItems:"center",justifyContent:"center",display:"flex"},children:d})]}):null},sI=()=>{const{accounts:e,selectAccount:t,selectedAccount:n}=YS(),[,r]=DS(),[o,i]=qe.useState(!1);return qe.useEffect((()=>{!(null==n?void 0:n.address)&&e.length>0&&(t(e[0]),i(!1))}),[e,t,null==n?void 0:n.address]),nt.jsxs(nt.Fragment,{children:[nt.jsx("div",{className:"flex w-full justify-center",children:nt.jsxs("div",{className:"flex w-full",children:[!e.length&&nt.jsx(aC,{onClick:()=>i(!0),className:"w-full text-lg font-bold bg-pink-700 hover:bg-blue-600",children:"Connect Wallet"}),!!e.length&&nt.jsxs(vL,{children:[nt.jsx(mL,{asChild:!0,children:nt.jsxs(aC,{variant:"outline",size:"default",className:"cursor-pointer overflow-hidden w-full flex items-center justify-center gap-2",children:[nt.jsx(iI,{size:36,address:(null==n?void 0:n.address)||"",className:"mr-2",outerColor:"transparent"}),null==n?void 0:n.name,nt.jsx(cC,{className:"ml-2 h-4 w-4",isOpen:!1})]})}),nt.jsxs(gL,{className:"max-h-[calc(100vh-5rem)] overflow-auto",children:[e.map(((n,r)=>nt.jsxs(qe.Fragment,{children:[nt.jsxs(yL,{className:"cursor-pointer",onClick:()=>t(n),children:[nt.jsx(iI,{size:28,address:n.address||"",className:"mr-2",outerColor:"transparent"}),n.name]},n.address),r!==e.length-1&&nt.jsx(bL,{})]},n.address))),nt.jsx(yL,{className:"cursor-pointer",onClick:()=>{i(!0)},children:"Show wallets"},"show"),nt.jsx(yL,{className:"cursor-pointer",onClick:()=>{r(),t(void 0)},children:"Disconnect"},"logout")]})]})]})}),nt.jsx(SL,{open:o,onClose:()=>i(!1)})]})};function aI(){return nt.jsx("div",{className:"flex items-center justify-center mt-6",children:nt.jsxs(up,{className:"w-full max-w-xl",children:[nt.jsx(dp,{children:nt.jsxs(fp,{className:"text-4xl text-center flex items-center justify-center gap-2",children:[nt.jsx(lI,{}),nt.jsxs("span",{children:["CLI: ",nt.jsx("span",{className:"font-light",children:"Signing Portal"})]})]})}),nt.jsx(pp,{className:"grid gap-4",children:nt.jsx(PS,{config:hj,children:nt.jsx(KS,{children:nt.jsxs("div",{className:"overflow-auto break-words whitespace-pre-wrap",children:[nt.jsx(sI,{}),nt.jsx(wC,{})]})})})})]})})}const lI=()=>nt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"100",fill:"none",viewBox:"0 0 512 512",children:[nt.jsxs("g",{clipPath:"url(#clip0_873_174)",children:[nt.jsx("rect",{width:"512",height:"512",fill:"#1C0533",rx:"256"}),nt.jsx("rect",{width:"512",height:"512",fill:"url(#paint0_radial_873_174)",fillOpacity:"0.8",rx:"256"}),nt.jsx("rect",{width:"512",height:"512",fill:"url(#paint1_radial_873_174)",fillOpacity:"0.6",rx:"256"}),nt.jsx("mask",{id:"mask0_873_174",width:"1428",height:"1351",x:"-429",y:"-502",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:nt.jsx("path",{fill:"#D9D9D9",d:"m127.637-501.289 871.274 824.192-14.25 13.48-871.273-824.192zM88.96-464.701l871.272 824.192-14.249 13.48L74.71-451.221zM50.281-428.113l871.273 824.192-14.249 13.48L36.032-414.633zM11.603-391.525l871.273 824.192-14.249 13.48L-2.646-378.045zM-27.075-354.937l871.273 824.192-14.249 13.48-871.273-824.192zM-65.753-318.349 805.52 505.843l-14.249 13.48-871.273-824.192zM-104.431-281.761l871.273 824.192-14.249 13.48-871.273-824.192zM-143.109-245.173l871.273 824.192-14.249 13.48-871.273-824.192zM-181.787-208.585l871.273 824.192-14.249 13.48-871.273-824.192zM-220.465-171.997l871.273 824.192-14.249 13.48-871.273-824.192zM-259.143-135.409 612.13 688.783l-14.249 13.48-871.273-824.192zM-297.821-98.821 573.452 725.37l-14.249 13.48L-312.07-85.341zM-336.499-62.233l871.273 824.192-14.249 13.48-871.273-824.192zM-375.177-25.645l871.273 824.192-14.249 13.479-871.273-824.191zM-413.855 10.943l871.273 824.192-14.249 13.48-871.273-824.192z"})}),nt.jsx("g",{mask:"url(#mask0_873_174)",children:nt.jsx("path",{fill:"#E6007A",d:"M511.169 254.929C511.169 396.905 396.739 512 255.584 512 114.428 512-.001 396.905-.001 254.929S114.428-2.142 255.584-2.142c141.155 0 255.585 115.095 255.585 257.071"})}),nt.jsx("path",{fill:"#2B0532",d:"M183.804 160.44c-12.752-9.296-27.346-13.272-41.94-13.272h-89.63L5.63 367.567h117.053l9.399-44.802a86.4 86.4 0 0 0 28.32-8.371 104 104 0 0 0 4.133-2.155 97.7 97.7 0 0 0 14.779 24.342c8.258 9.967 18.342 17.785 29.802 23.435l.003.002.397.195.4.186c12.688 5.89 26.181 8.385 39.713 8.385 13.588 0 26.877-2.295 39.662-6.916a127 127 0 0 0 17.54-7.88l-2.871 13.579h117.052l9.4-44.802a86.4 86.4 0 0 0 28.32-8.371 101.4 101.4 0 0 0 28.939-21.348l.01-.011.159-.168.154-.167.003-.003c8.092-8.766 14.613-18.702 19.34-29.722 4.865-11.344 7.542-23.439 7.542-36.022 0-12.506-2.649-24.626-7.879-35.976-5.493-12.224-13.86-22.642-24.867-30.537-12.752-9.296-27.346-13.272-41.94-13.272h-89.631l-5.24 24.781c-7.026-6.908-15.096-12.504-24.009-16.758-12.764-6.233-26.404-8.834-40.034-8.834-13.589 0-26.878 2.295-39.662 6.916-12.145 4.39-23.444 10.507-33.804 18.268a133 133 0 0 0-7.099 5.68 74.6 74.6 0 0 0-16.911-16.781"}),nt.jsx("path",{fill:"#E6007A",fillRule:"evenodd",d:"m229.569 331.163.063.031.064.03c7.896 3.665 16.711 5.426 26.323 5.426 9.96 0 19.59-1.672 28.858-5.022a94.6 94.6 0 0 0 25.4-13.857c7.69-5.873 14.403-12.621 20.12-20.24l.016-.022.016-.022c5.708-7.75 10.156-16.036 13.319-24.849 3.326-9.027 5.005-18.25 5.005-27.639 0-8.458-1.303-16.601-3.928-24.399-2.514-8.002-6.373-15.177-11.585-21.468-5.277-6.369-11.756-11.363-19.365-14.972-7.797-3.835-16.58-5.669-26.205-5.669-9.961 0-19.591 1.673-28.858 5.022-9.165 3.313-17.687 7.924-25.551 13.819-7.719 5.752-14.51 12.512-20.362 20.265l-.01.014a97.4 97.4 0 0 0-13.544 24.867l-.015.04-.014.041c-3.181 9.016-4.784 18.219-4.784 27.583 0 8.482 1.311 16.702 3.94 24.634l.005.016.005.016c2.653 7.855 6.575 14.936 11.766 21.201 5.269 6.361 11.733 11.413 19.321 15.154m58.163-55.148.01-.015c2.998-4.343 5.197-8.955 6.622-13.852 1.467-5.04 2.176-9.872 2.176-14.513 0-4.335-.697-8.177-2.012-11.592l-.041-.109-.038-.11c-1.121-3.279-2.866-5.693-5.197-7.475-2.026-1.548-5.053-2.613-9.646-2.613-5.335 0-9.796 1.243-13.579 3.569l-.053.032-.053.031c-4.052 2.378-7.426 5.537-10.156 9.541a52.3 52.3 0 0 0-6.661 13.745c-1.454 5.016-2.157 9.826-2.157 14.447 0 4.358.638 8.321 1.862 11.932 1.246 3.306 3.081 5.852 5.484 7.803 2.047 1.543 5.008 2.569 9.387 2.569 5.495 0 10.017-1.255 13.78-3.568 4.107-2.524 7.515-5.779 10.262-9.808zM171.542 186.53c-6.663-4.89-14.525-7.228-23.288-7.228H84.491L51.478 335.434h51.685l9.273-44.204h15.658c8.698 0 16.935-1.893 24.636-5.69a69.4 69.4 0 0 0 19.864-14.652l.025-.027.025-.027c5.695-6.169 10.18-13.036 13.418-20.587 3.261-7.602 4.93-15.381 4.93-23.294 0-7.901-1.665-15.457-4.983-22.605-3.247-7.286-8.082-13.265-14.467-17.818m-35.967 55.601.023-.03c.765-1.001 1.462-2.391 1.969-4.328l.037-.142.044-.141c.574-1.827.929-4.221.929-7.293 0-2.333-.311-3.426-.466-3.769a4 4 0 0 0-.222-.434l-.027-.045-.013-.01h-11.5l-3.905 18.655h10.249c.063-.013.306-.078.757-.35.511-.309 1.235-.919 2.103-2.084zM469.872 186.53c-6.663-4.89-14.525-7.228-23.289-7.228h-63.762l-33.014 156.132h51.686l9.273-44.204h15.658c8.698 0 16.935-1.893 24.636-5.69a69.4 69.4 0 0 0 19.863-14.652l.026-.027.024-.027c5.696-6.169 10.18-13.036 13.419-20.587 3.26-7.602 4.93-15.381 4.93-23.294 0-7.901-1.665-15.457-4.983-22.605-3.247-7.286-8.082-13.265-14.467-17.818m-35.967 55.601.023-.03c.765-1.001 1.462-2.391 1.968-4.328l.038-.142.044-.141c.574-1.827.929-4.221.929-7.293 0-2.333-.311-3.426-.466-3.769a4 4 0 0 0-.222-.434l-.027-.045-.014-.01h-11.5l-3.904 18.655h10.249c.063-.013.306-.078.756-.35.511-.309 1.235-.919 2.104-2.084z",clipRule:"evenodd"}),nt.jsxs("mask",{id:"path-6-outside-1_873_174",width:"435",height:"156",x:"35.823",y:"166.788",fill:"#000",maskUnits:"userSpaceOnUse",children:[nt.jsx("path",{fill:"#fff",d:"M35.823 166.788h435v156h-435z"}),nt.jsx("path",{fillRule:"evenodd",d:"M68.98 168.599h62.13c8.395 0 15.832 2.234 22.11 6.846 6.094 4.342 10.707 10.041 13.812 17.016 3.197 6.883 4.8 14.151 4.8 21.761 0 7.619-1.606 15.125-4.765 22.491-3.145 7.332-7.501 14.006-13.045 20.011l-.016.018-.017.017a67.4 67.4 0 0 1-19.29 14.23c-7.419 3.657-15.352 5.483-23.749 5.483H93.657l-9.273 44.203h-47.56zm21.407 103.817h20.563q11.693 0 21.974-5.069a63.3 63.3 0 0 0 18.144-13.383q7.862-8.516 12.297-18.857t4.435-20.885-4.435-20.074q-4.233-9.53-12.499-15.41-8.265-6.084-19.756-6.083H72.244L41.803 316.62h39.31zm29.65-41.79.015-.019c.958-1.253 1.758-2.901 2.32-5.048l.025-.096.03-.093c.651-2.074 1.022-4.685 1.022-7.904 0-2.456-.319-3.883-.647-4.607-.44-.975-.761-1.204-.76-1.206l-.166-.095-.166-.119c-.311-.224-.51-.259-.68-.259h-13.461l-4.754 22.71h12.772c.292 0 .857-.096 1.756-.638.788-.476 1.697-1.289 2.679-2.606zm-22.19 7.32 6.45-30.821h16.733q1.612 0 3.024 1.014 1.411.811 2.419 3.041t1.008 6.286q0 5.272-1.21 9.125-1.008 3.852-3.024 6.488-1.814 2.433-3.83 3.65t-3.83 1.217zm115.507 78.686-.042-.021c-7.343-3.62-13.579-8.498-18.66-14.63-5.028-6.07-8.83-12.931-11.405-20.555l-.007-.022c-2.559-7.721-3.836-15.725-3.836-23.993 0-9.126 1.562-18.1 4.668-26.904l.009-.028.01-.027a95.4 95.4 0 0 1 13.263-24.351l.007-.009c5.738-7.601 12.392-14.225 19.957-19.863 7.707-5.777 16.054-10.293 25.032-13.538 9.045-3.27 18.444-4.903 28.176-4.903 9.373 0 17.85 1.786 25.332 5.469 7.357 3.487 13.603 8.304 18.689 14.442 5.043 6.087 8.78 13.033 11.217 20.801 2.557 7.586 3.829 15.516 3.829 23.768 0 9.144-1.635 18.132-4.883 26.944-3.094 8.623-7.448 16.738-13.045 24.337l-.01.015-.011.014c-5.604 7.468-12.184 14.085-19.73 19.847a92.6 92.6 0 0 1-24.863 13.564c-9.045 3.27-18.445 4.903-28.176 4.903-9.365 0-17.885-1.715-25.478-5.24zm107.57-58.815q4.638-12.571 4.637-25.549 0-11.76-3.629-22.507-3.427-10.95-10.483-19.466-7.055-8.516-17.337-13.382-10.281-5.07-23.586-5.07-13.91 0-26.813 4.664t-23.99 12.977q-10.886 8.111-19.151 19.06a91.3 91.3 0 0 0-12.701 23.319q-4.434 12.571-4.435 25.548 0 11.762 3.629 22.71 3.629 10.748 10.685 19.263 7.055 8.517 17.337 13.586 10.482 4.866 23.788 4.866 13.91 0 26.812-4.663a88.6 88.6 0 0 0 23.788-12.977q10.887-8.314 18.95-19.061 8.065-10.949 12.499-23.318m-48.684 6.628.014-.019c3.119-4.518 5.413-9.327 6.901-14.439 1.515-5.208 2.257-10.231 2.257-15.083 0-4.557-.734-8.65-2.148-12.324l-.027-.072-.025-.074c-1.24-3.628-3.21-6.386-5.885-8.43-2.47-1.889-5.966-3.026-10.865-3.026-5.662 0-10.495 1.324-14.63 3.866l-.036.021-.035.021c-4.314 2.531-7.907 5.899-10.802 10.146a54.3 54.3 0 0 0-6.928 14.3c-1.506 5.191-2.244 10.2-2.244 15.038 0 4.574.672 8.77 1.981 12.619 1.368 3.647 3.421 6.515 6.143 8.717 2.483 1.882 5.911 2.996 10.625 2.996 5.813 0 10.71-1.332 14.831-3.866 4.351-2.674 7.967-6.128 10.873-10.391m-38.808 14.46q-5.04-4.056-7.459-10.544-2.217-6.489-2.218-13.991 0-7.908 2.42-16.221a58.3 58.3 0 0 1 7.459-15.411q4.838-7.096 12.095-11.355 7.258-4.461 16.733-4.461 8.265 0 13.305 3.853 5.04 3.852 7.257 10.341 2.42 6.287 2.42 13.788 0 7.908-2.42 16.222-2.418 8.313-7.459 15.613-4.838 7.097-12.095 11.558t-16.934 4.46q-8.064 0-13.104-3.852m133.877-110.306h62.13c8.396 0 15.833 2.234 22.111 6.846 6.094 4.342 10.706 10.04 13.811 17.015 3.198 6.884 4.801 14.151 4.801 21.762 0 7.619-1.606 15.125-4.765 22.491-3.145 7.332-7.501 14.006-13.045 20.011l-.017.018-.016.017a67.4 67.4 0 0 1-19.291 14.23c-7.418 3.657-15.351 5.483-23.748 5.483h-17.293l-9.273 44.203h-47.561zm21.408 103.817h20.563q11.693 0 21.974-5.069a63.3 63.3 0 0 0 18.143-13.383q7.863-8.516 12.298-18.857t4.435-20.885-4.435-20.074q-4.234-9.53-12.499-15.41-8.265-6.084-19.757-6.083h-58.865L340.133 316.62h39.311zm29.649-41.79.015-.019c.959-1.253 1.759-2.901 2.321-5.048l.025-.096.029-.093c.652-2.074 1.023-4.685 1.023-7.904 0-2.456-.319-3.883-.647-4.607-.44-.975-.761-1.204-.76-1.206l-.166-.095-.166-.119c-.311-.224-.51-.259-.68-.259h-13.461l-4.754 22.71h12.772c.292 0 .857-.096 1.756-.638.788-.476 1.696-1.289 2.679-2.606zm-22.19 7.32 6.451-30.821h16.733q1.613 0 3.024 1.014 1.41.811 2.419 3.041 1.008 2.231 1.008 6.286 0 5.272-1.21 9.125-1.008 3.852-3.024 6.488-1.814 2.433-3.83 3.65t-3.83 1.217z",clipRule:"evenodd"})]}),nt.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M68.98 168.599h62.13c8.395 0 15.832 2.234 22.11 6.846 6.094 4.342 10.707 10.041 13.812 17.016 3.197 6.883 4.8 14.151 4.8 21.761 0 7.619-1.606 15.125-4.765 22.491-3.145 7.332-7.501 14.006-13.045 20.011l-.016.018-.017.017a67.4 67.4 0 0 1-19.29 14.23c-7.419 3.657-15.352 5.483-23.749 5.483H93.657l-9.273 44.203h-47.56zm21.407 103.817h20.563q11.693 0 21.974-5.069a63.3 63.3 0 0 0 18.144-13.383q7.862-8.516 12.297-18.857t4.435-20.885-4.435-20.074q-4.233-9.53-12.499-15.41-8.265-6.084-19.756-6.083H72.244L41.803 316.62h39.31zm29.65-41.79.015-.019c.958-1.253 1.758-2.901 2.32-5.048l.025-.096.03-.093c.651-2.074 1.022-4.685 1.022-7.904 0-2.456-.319-3.883-.647-4.607-.44-.975-.761-1.204-.76-1.206l-.166-.095-.166-.119c-.311-.224-.51-.259-.68-.259h-13.461l-4.754 22.71h12.772c.292 0 .857-.096 1.756-.638.788-.476 1.697-1.289 2.679-2.606zm-22.19 7.32 6.45-30.821h16.733q1.612 0 3.024 1.014 1.411.811 2.419 3.041t1.008 6.286q0 5.272-1.21 9.125-1.008 3.852-3.024 6.488-1.814 2.433-3.83 3.65t-3.83 1.217zm115.507 78.686-.042-.021c-7.343-3.62-13.579-8.498-18.66-14.63-5.028-6.07-8.83-12.931-11.405-20.555l-.007-.022c-2.559-7.721-3.836-15.725-3.836-23.993 0-9.126 1.562-18.1 4.668-26.904l.009-.028.01-.027a95.4 95.4 0 0 1 13.263-24.351l.007-.009c5.738-7.601 12.392-14.225 19.957-19.863 7.707-5.777 16.054-10.293 25.032-13.538 9.045-3.27 18.444-4.903 28.176-4.903 9.373 0 17.85 1.786 25.332 5.469 7.357 3.487 13.603 8.304 18.689 14.442 5.043 6.087 8.78 13.033 11.217 20.801 2.557 7.586 3.829 15.516 3.829 23.768 0 9.144-1.635 18.132-4.883 26.944-3.094 8.623-7.448 16.738-13.045 24.337l-.01.015-.011.014c-5.604 7.468-12.184 14.085-19.73 19.847a92.6 92.6 0 0 1-24.863 13.564c-9.045 3.27-18.445 4.903-28.176 4.903-9.365 0-17.885-1.715-25.478-5.24zm107.57-58.815q4.638-12.571 4.637-25.549 0-11.76-3.629-22.507-3.427-10.95-10.483-19.466-7.055-8.516-17.337-13.382-10.281-5.07-23.586-5.07-13.91 0-26.813 4.664t-23.99 12.977q-10.886 8.111-19.151 19.06a91.3 91.3 0 0 0-12.701 23.319q-4.434 12.571-4.435 25.548 0 11.762 3.629 22.71 3.629 10.748 10.685 19.263 7.055 8.517 17.337 13.586 10.482 4.866 23.788 4.866 13.91 0 26.812-4.663a88.6 88.6 0 0 0 23.788-12.977q10.887-8.314 18.95-19.061 8.065-10.949 12.499-23.318m-48.684 6.628.014-.019c3.119-4.518 5.413-9.327 6.901-14.439 1.515-5.208 2.257-10.231 2.257-15.083 0-4.557-.734-8.65-2.148-12.324l-.027-.072-.025-.074c-1.24-3.628-3.21-6.386-5.885-8.43-2.47-1.889-5.966-3.026-10.865-3.026-5.662 0-10.495 1.324-14.63 3.866l-.036.021-.035.021c-4.314 2.531-7.907 5.899-10.802 10.146a54.3 54.3 0 0 0-6.928 14.3c-1.506 5.191-2.244 10.2-2.244 15.038 0 4.574.672 8.77 1.981 12.619 1.368 3.647 3.421 6.515 6.143 8.717 2.483 1.882 5.911 2.996 10.625 2.996 5.813 0 10.71-1.332 14.831-3.866 4.351-2.674 7.967-6.128 10.873-10.391m-38.808 14.46q-5.04-4.056-7.459-10.544-2.217-6.489-2.218-13.991 0-7.908 2.42-16.221a58.3 58.3 0 0 1 7.459-15.411q4.838-7.096 12.095-11.355 7.258-4.461 16.733-4.461 8.265 0 13.305 3.853 5.04 3.852 7.257 10.341 2.42 6.287 2.42 13.788 0 7.908-2.42 16.222-2.418 8.313-7.459 15.613-4.838 7.097-12.095 11.558t-16.934 4.46q-8.064 0-13.104-3.852m133.877-110.306h62.13c8.396 0 15.833 2.234 22.111 6.846 6.094 4.342 10.706 10.04 13.811 17.015 3.198 6.884 4.801 14.151 4.801 21.762 0 7.619-1.606 15.125-4.765 22.491-3.145 7.332-7.501 14.006-13.045 20.011l-.017.018-.016.017a67.4 67.4 0 0 1-19.291 14.23c-7.418 3.657-15.351 5.483-23.748 5.483h-17.293l-9.273 44.203h-47.561zm21.408 103.817h20.563q11.693 0 21.974-5.069a63.3 63.3 0 0 0 18.143-13.383q7.863-8.516 12.298-18.857t4.435-20.885-4.435-20.074q-4.234-9.53-12.499-15.41-8.265-6.084-19.757-6.083h-58.865L340.133 316.62h39.311zm29.649-41.79.015-.019c.959-1.253 1.759-2.901 2.321-5.048l.025-.096.029-.093c.652-2.074 1.023-4.685 1.023-7.904 0-2.456-.319-3.883-.647-4.607-.44-.975-.761-1.204-.76-1.206l-.166-.095-.166-.119c-.311-.224-.51-.259-.68-.259h-13.461l-4.754 22.71h12.772c.292 0 .857-.096 1.756-.638.788-.476 1.696-1.289 2.679-2.606zm-22.19 7.32 6.451-30.821h16.733q1.613 0 3.024 1.014 1.41.811 2.419 3.041 1.008 2.231 1.008 6.286 0 5.272-1.21 9.125-1.008 3.852-3.024 6.488-1.814 2.433-3.83 3.65t-3.83 1.217z",clipRule:"evenodd"}),nt.jsx("path",{stroke:"#fff",strokeWidth:"0.3",d:"M68.98 168.599h62.13c8.395 0 15.832 2.234 22.11 6.846 6.094 4.342 10.707 10.041 13.812 17.016 3.197 6.883 4.8 14.151 4.8 21.761 0 7.619-1.606 15.125-4.765 22.491-3.145 7.332-7.501 14.006-13.045 20.011l-.016.018-.017.017a67.4 67.4 0 0 1-19.29 14.23c-7.419 3.657-15.352 5.483-23.749 5.483H93.657l-9.273 44.203h-47.56zm21.407 103.817h20.563q11.693 0 21.974-5.069a63.3 63.3 0 0 0 18.144-13.383q7.862-8.516 12.297-18.857t4.435-20.885-4.435-20.074q-4.233-9.53-12.499-15.41-8.265-6.084-19.756-6.083H72.244L41.803 316.62h39.31zm29.65-41.79.015-.019c.958-1.253 1.758-2.901 2.32-5.048l.025-.096.03-.093c.651-2.074 1.022-4.685 1.022-7.904 0-2.456-.319-3.883-.647-4.607-.44-.975-.761-1.204-.76-1.206l-.166-.095-.166-.119c-.311-.224-.51-.259-.68-.259h-13.461l-4.754 22.71h12.772c.292 0 .857-.096 1.756-.638.788-.476 1.697-1.289 2.679-2.606zm-22.19 7.32 6.45-30.821h16.733q1.612 0 3.024 1.014 1.411.811 2.419 3.041t1.008 6.286q0 5.272-1.21 9.125-1.008 3.852-3.024 6.488-1.814 2.433-3.83 3.65t-3.83 1.217zm115.507 78.686-.042-.021c-7.343-3.62-13.579-8.498-18.66-14.63-5.028-6.07-8.83-12.931-11.405-20.555l-.007-.022c-2.559-7.721-3.836-15.725-3.836-23.993 0-9.126 1.562-18.1 4.668-26.904l.009-.028.01-.027a95.4 95.4 0 0 1 13.263-24.351l.007-.009c5.738-7.601 12.392-14.225 19.957-19.863 7.707-5.777 16.054-10.293 25.032-13.538 9.045-3.27 18.444-4.903 28.176-4.903 9.373 0 17.85 1.786 25.332 5.469 7.357 3.487 13.603 8.304 18.689 14.442 5.043 6.087 8.78 13.033 11.217 20.801 2.557 7.586 3.829 15.516 3.829 23.768 0 9.144-1.635 18.132-4.883 26.944-3.094 8.623-7.448 16.738-13.045 24.337l-.01.015-.011.014c-5.604 7.468-12.184 14.085-19.73 19.847a92.6 92.6 0 0 1-24.863 13.564c-9.045 3.27-18.445 4.903-28.176 4.903-9.365 0-17.885-1.715-25.478-5.24zm107.57-58.815q4.638-12.571 4.637-25.549 0-11.76-3.629-22.507-3.427-10.95-10.483-19.466-7.055-8.516-17.337-13.382-10.281-5.07-23.586-5.07-13.91 0-26.813 4.664t-23.99 12.977q-10.886 8.111-19.151 19.06a91.3 91.3 0 0 0-12.701 23.319q-4.434 12.571-4.435 25.548 0 11.762 3.629 22.71 3.629 10.748 10.685 19.263 7.055 8.517 17.337 13.586 10.482 4.866 23.788 4.866 13.91 0 26.812-4.663a88.6 88.6 0 0 0 23.788-12.977q10.887-8.314 18.95-19.061 8.065-10.949 12.499-23.318Zm-48.684 6.628.014-.019c3.119-4.518 5.413-9.327 6.901-14.439 1.515-5.208 2.257-10.231 2.257-15.083 0-4.557-.734-8.65-2.148-12.324l-.027-.072-.025-.074c-1.24-3.628-3.21-6.386-5.885-8.43-2.47-1.889-5.966-3.026-10.865-3.026-5.662 0-10.495 1.324-14.63 3.866l-.036.021-.035.021c-4.314 2.531-7.907 5.899-10.802 10.146a54.3 54.3 0 0 0-6.928 14.3c-1.506 5.191-2.244 10.2-2.244 15.038 0 4.574.672 8.77 1.981 12.619 1.368 3.647 3.421 6.515 6.143 8.717 2.483 1.882 5.911 2.996 10.625 2.996 5.813 0 10.71-1.332 14.831-3.866 4.351-2.674 7.967-6.128 10.873-10.391Zm-38.808 14.46q-5.04-4.056-7.459-10.544-2.217-6.489-2.218-13.991 0-7.908 2.42-16.221a58.3 58.3 0 0 1 7.459-15.411q4.838-7.096 12.095-11.355 7.258-4.461 16.733-4.461 8.265 0 13.305 3.853 5.04 3.852 7.257 10.341 2.42 6.287 2.42 13.788 0 7.908-2.42 16.222-2.418 8.313-7.459 15.613-4.838 7.097-12.095 11.558t-16.934 4.46q-8.064 0-13.104-3.852Zm133.877-110.306h62.13c8.396 0 15.833 2.234 22.111 6.846 6.094 4.342 10.706 10.04 13.811 17.015 3.198 6.884 4.801 14.151 4.801 21.762 0 7.619-1.606 15.125-4.765 22.491-3.145 7.332-7.501 14.006-13.045 20.011l-.017.018-.016.017a67.4 67.4 0 0 1-19.291 14.23c-7.418 3.657-15.351 5.483-23.748 5.483h-17.293l-9.273 44.203h-47.561zm21.408 103.817h20.563q11.693 0 21.974-5.069a63.3 63.3 0 0 0 18.143-13.383q7.863-8.516 12.298-18.857t4.435-20.885-4.435-20.074q-4.234-9.53-12.499-15.41-8.265-6.084-19.757-6.083h-58.865L340.133 316.62h39.311zm29.649-41.79.015-.019c.959-1.253 1.759-2.901 2.321-5.048l.025-.096.029-.093c.652-2.074 1.023-4.685 1.023-7.904 0-2.456-.319-3.883-.647-4.607-.44-.975-.761-1.204-.76-1.206l-.166-.095-.166-.119c-.311-.224-.51-.259-.68-.259h-13.461l-4.754 22.71h12.772c.292 0 .857-.096 1.756-.638.788-.476 1.696-1.289 2.679-2.606zm-22.19 7.32 6.451-30.821h16.733q1.613 0 3.024 1.014 1.41.811 2.419 3.041 1.008 2.231 1.008 6.286 0 5.272-1.21 9.125-1.008 3.852-3.024 6.488-1.814 2.433-3.83 3.65t-3.83 1.217z",clipRule:"evenodd",mask:"url(#path-6-outside-1_873_174)"})]}),nt.jsxs("defs",{children:[nt.jsxs("radialGradient",{id:"paint0_radial_873_174",cx:"0",cy:"0",r:"1",gradientTransform:"matrix(229.99965 647.20057 -371.3092 131.95444 -62.8 -86.4)",gradientUnits:"userSpaceOnUse",children:[nt.jsx("stop",{stopColor:"#6335EC"}),nt.jsx("stop",{offset:"1",stopOpacity:"0"})]}),nt.jsxs("radialGradient",{id:"paint1_radial_873_174",cx:"0",cy:"0",r:"1",gradientTransform:"rotate(-116.448 530.068 140.453)scale(1055.25 662.094)",gradientUnits:"userSpaceOnUse",children:[nt.jsx("stop",{stopColor:"#E6007A"}),nt.jsx("stop",{offset:"1",stopOpacity:"0"})]}),nt.jsx("clipPath",{id:"clip0_873_174",children:nt.jsx("rect",{width:"512",height:"512",fill:"#fff",rx:"256"})})]})]});rt.createRoot(document.getElementById("root")).render(nt.jsx(Ke.StrictMode,{children:nt.jsx(aI,{})}));</script>
-  <style rel="stylesheet" crossorigin>*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(0 194 255 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(0 194 255 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--radius: .5rem}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.top-\[50\%\]{top:50%}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.ms-3{margin-inline-start:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.size-10{width:2.5rem;height:2.5rem}.size-2{width:.5rem;height:.5rem}.size-6{width:1.5rem;height:1.5rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-px{height:1px}.max-h-0{max-height:0px}.max-h-96{max-height:24rem}.max-h-\[calc\(100vh-5rem\)\]{max-height:calc(100vh - 5rem)}.max-h-screen{max-height:100vh}.w-10{width:2.5rem}.w-12{width:3rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-96{width:24rem}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-y-5{--tw-translate-y: -1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-4{border-width:4px}.border-l-4{border-left-width:4px}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(0 194 255 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-input{border-color:hsl(var(--input))}.border-red-100{--tw-border-opacity: 1;border-color:rgb(254 226 226 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-teal-100{--tw-border-opacity: 1;border-color:rgb(204 251 241 / var(--tw-border-opacity))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(222 244 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(0 194 255 / var(--tw-bg-opacity))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(230 0 122 / var(--tw-bg-opacity))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-teal-200{--tw-bg-opacity: 1;background-color:rgb(153 246 228 / var(--tw-bg-opacity))}.bg-violet-950{--tw-bg-opacity: 1;background-color:rgb(28 5 51 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pt-0{padding-top:0}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-light{font-weight:300}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(0 194 255 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(0 151 212 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(0 120 171 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-teal-800{--tw-text-opacity: 1;color:rgb(17 94 89 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(117 224 255 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(0 151 212 / var(--tw-bg-opacity))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-violet-800:hover{--tw-bg-opacity: 1;background-color:rgb(105 5 206 / var(--tw-bg-opacity))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-pink-700:hover{--tw-text-opacity: 1;color:rgb(230 0 122 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.dark\:border-neutral-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:border-red-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity))}.dark\:border-teal-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(19 78 74 / var(--tw-border-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:bg-red-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity))}.dark\:bg-teal-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 94 89 / var(--tw-bg-opacity))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.dark\:text-teal-400:is(.dark *){--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}</style>
+  <style rel="stylesheet" crossorigin>*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(0 194 255 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(0 194 255 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--radius: .5rem}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.top-\[50\%\]{top:50%}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.ms-3{margin-inline-start:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.size-10{width:2.5rem;height:2.5rem}.size-2{width:.5rem;height:.5rem}.size-6{width:1.5rem;height:1.5rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-px{height:1px}.max-h-0{max-height:0px}.max-h-96{max-height:24rem}.max-h-\[calc\(100vh-5rem\)\]{max-height:calc(100vh - 5rem)}.max-h-screen{max-height:100vh}.w-10{width:2.5rem}.w-12{width:3rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-96{width:24rem}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-y-5{--tw-translate-y: -1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-4{border-width:4px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(0 194 255 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-input{border-color:hsl(var(--input))}.border-red-100{--tw-border-opacity: 1;border-color:rgb(254 226 226 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-teal-100{--tw-border-opacity: 1;border-color:rgb(204 251 241 / var(--tw-border-opacity))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(222 244 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(0 194 255 / var(--tw-bg-opacity))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(230 0 122 / var(--tw-bg-opacity))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-teal-200{--tw-bg-opacity: 1;background-color:rgb(153 246 228 / var(--tw-bg-opacity))}.bg-violet-950{--tw-bg-opacity: 1;background-color:rgb(28 5 51 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pt-0{padding-top:0}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(0 194 255 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(0 151 212 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(0 120 171 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-teal-800{--tw-text-opacity: 1;color:rgb(17 94 89 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(117 224 255 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(0 151 212 / var(--tw-bg-opacity))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-violet-800:hover{--tw-bg-opacity: 1;background-color:rgb(105 5 206 / var(--tw-bg-opacity))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-pink-700:hover{--tw-text-opacity: 1;color:rgb(230 0 122 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.dark\:border-neutral-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:border-red-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity))}.dark\:border-teal-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(19 78 74 / var(--tw-border-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:bg-red-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity))}.dark\:bg-teal-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 94 89 / var(--tw-bg-opacity))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.dark\:text-teal-400:is(.dark *){--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}</style>
 </head>
 
 <body>
diff --git a/crates/pop-cli/src/commands/call/contract.rs b/crates/pop-cli/src/commands/call/contract.rs
index 629ca204b..6c5b92f0e 100644
--- a/crates/pop-cli/src/commands/call/contract.rs
+++ b/crates/pop-cli/src/commands/call/contract.rs
@@ -11,11 +11,11 @@ use crate::{
 use anyhow::{anyhow, Result};
 use clap::Args;
 use cliclack::spinner;
-use pop_common::{DefaultConfig, Keypair};
+use pop_common::{parse_account, DefaultConfig, Keypair};
 use pop_contracts::{
 	build_smart_contract, call_smart_contract, call_smart_contract_from_signed_payload,
 	dry_run_call, dry_run_gas_estimate_call, get_call_payload, get_message, get_messages,
-	parse_account, set_up_call, CallExec, CallOpts, DefaultEnvironment, Verbosity,
+	set_up_call, CallExec, CallOpts, DefaultEnvironment, Verbosity,
 };
 use sp_weights::Weight;
 use std::path::PathBuf;
diff --git a/crates/pop-cli/src/commands/up/rollup.rs b/crates/pop-cli/src/commands/up/rollup.rs
index b93a15b84..d19b246d7 100644
--- a/crates/pop-cli/src/commands/up/rollup.rs
+++ b/crates/pop-cli/src/commands/up/rollup.rs
@@ -12,12 +12,18 @@ use crate::{
 };
 use anyhow::{anyhow, Result};
 use clap::Args;
-use pop_parachains::{find_dispatchable_by_name, Action, Payload, Reserved};
+use pop_common::parse_account;
+use pop_parachains::{
+	construct_proxy_extrinsic, find_dispatchable_by_name, Action, Payload, Reserved,
+};
 use std::path::{Path, PathBuf};
 use url::Url;
 
+type Proxy = Option<String>;
+
 const DEFAULT_URL: &str = "wss://paseo.rpc.amforc.com/";
 const HELP_HEADER: &str = "Chain deployment options";
+const PLACEHOLDER_ADDRESS: &str = "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty";
 
 #[derive(Args, Clone, Default)]
 #[clap(next_help_heading = HELP_HEADER)]
@@ -37,6 +43,10 @@ pub struct UpCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_chain_url: Option<Url>,
+	/// Proxied address. Your account must be registered as a proxy which can act on behalf of this
+	/// account.
+	#[arg(long = "proxy")]
+	pub(crate) proxied_address: Option<String>,
 }
 
 impl UpCommand {
@@ -69,18 +79,30 @@ impl UpCommand {
 		let chain =
 			configure("Enter the relay chain node URL", DEFAULT_URL, &self.relay_chain_url, cli)
 				.await?;
-		let id = self.resolve_id(&chain, cli).await?;
+		let proxy = self.resolve_proxied_address(cli)?;
+		let id = self.resolve_id(&chain, &proxy, cli).await?;
 		let (genesis_code, genesis_state) = self.resolve_genesis_files(id, cli).await?;
-		Ok(Registration { id, genesis_state, genesis_code, chain })
+		Ok(Registration { id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, cli: &mut impl Cli) -> Result<Proxy> {
+		if let Some(addr) = &self.proxied_address {
+			return Ok(parse_account(addr).map(|valid_addr| Some(format!("Id({valid_addr})")))?);
+		}
+		if cli.confirm("Would you like to use a proxy for registration? This is considered a best practice.").interact()? {
+			return Ok(Some(prompt_for_proxy_address(cli)?));
+		}
+		Ok(None)
 	}
 
 	// Resolves the ID, reserving a new one if necessary.
-	async fn resolve_id(&self, chain: &Chain, cli: &mut impl Cli) -> Result<u32> {
+	async fn resolve_id(&self, chain: &Chain, proxy: &Proxy, cli: &mut impl Cli) -> Result<u32> {
 		match self.id {
 			Some(id) => Ok(id),
 			None => {
 				cli.info(format!("You will need to sign a transaction to reserve an ID on {} using the `Registrar::reserve` function.", chain.url))?;
-				reserve(chain, cli).await
+				reserve(chain, proxy, cli).await
 			},
 		}
 	}
@@ -106,6 +128,7 @@ pub(crate) struct Registration {
 	genesis_state: StatePathBuf,
 	genesis_code: CodePathBuf,
 	chain: Chain,
+	proxy: Proxy,
 }
 impl Registration {
 	// Registers by submitting an extrinsic.
@@ -120,7 +143,7 @@ impl Registration {
 
 	// Prepares and returns the encoded call data for registering a chain.
 	fn prepare_register_call_data(&self, cli: &mut impl Cli) -> Result<Vec<u8>> {
-		let Registration { id, genesis_code, genesis_state, chain } = self;
+		let Registration { id, genesis_code, genesis_state, chain, proxy } = self;
 		let dispatchable = find_dispatchable_by_name(
 			&chain.pallets,
 			Action::Register.pallet_name(),
@@ -130,20 +153,23 @@ impl Registration {
 			.map_err(|err| anyhow!("Failed to read genesis state file: {}", err.to_string()))?;
 		let code = std::fs::read_to_string(genesis_code)
 			.map_err(|err| anyhow!("Failed to read genesis code file: {}", err.to_string()))?;
-		let xt = Call {
+		let mut xt = Call {
 			function: dispatchable.clone(),
 			args: vec![id.to_string(), state, code],
 			use_wallet: true,
 			..Default::default()
 		}
 		.prepare_extrinsic(&chain.client, cli)?;
+		if let Some(addr) = proxy {
+			xt = construct_proxy_extrinsic(&chain.pallets, addr.to_string(), xt)?;
+		}
 		Ok(xt.encode_call_data(&chain.client.metadata())?)
 	}
 }
 
 // Reserves an ID by submitting an extrinsic.
-async fn reserve(chain: &Chain, cli: &mut impl Cli) -> Result<u32> {
-	let call_data = prepare_reserve_call_data(chain, cli)?;
+async fn reserve(chain: &Chain, proxy: &Proxy, cli: &mut impl Cli) -> Result<u32> {
+	let call_data = prepare_reserve_call_data(chain, proxy, cli)?;
 	let events = submit_extrinsic(&chain.client, &chain.url, call_data, cli)
 		.await
 		.map_err(|e| anyhow::anyhow!("ID reservation failed: {}", e))?;
@@ -156,14 +182,17 @@ async fn reserve(chain: &Chain, cli: &mut impl Cli) -> Result<u32> {
 }
 
 // Prepares and returns the encoded call data for reserving an ID.
-fn prepare_reserve_call_data(chain: &Chain, cli: &mut impl Cli) -> Result<Vec<u8>> {
+fn prepare_reserve_call_data(chain: &Chain, proxy: &Proxy, cli: &mut impl Cli) -> Result<Vec<u8>> {
 	let dispatchable = find_dispatchable_by_name(
 		&chain.pallets,
 		Action::Reserve.pallet_name(),
 		Action::Reserve.function_name(),
 	)?;
-	let xt = Call { function: dispatchable.clone(), use_wallet: true, ..Default::default() }
+	let mut xt = Call { function: dispatchable.clone(), use_wallet: true, ..Default::default() }
 		.prepare_extrinsic(&chain.client, cli)?;
+	if let Some(addr) = proxy {
+		xt = construct_proxy_extrinsic(&chain.pallets, addr.to_string(), xt)?;
+	}
 	Ok(xt.encode_call_data(&chain.client.metadata())?)
 }
 
@@ -195,6 +224,19 @@ async fn generate_spec_files(
 	))
 }
 
+// Prompt the user to input an address and return it formatted as `Id(address)`
+fn prompt_for_proxy_address(cli: &mut impl Cli) -> Result<String> {
+	let address = cli
+		.input("Enter the account that the proxy will make a call on behalf of")
+		.placeholder(&format!("e.g {}", PLACEHOLDER_ADDRESS))
+		.validate(|input: &String| match parse_account(input) {
+			Ok(_) => Ok(()),
+			Err(_) => Err("Invalid address."),
+		})
+		.interact()?;
+	Ok(format!("Id({address})"))
+}
+
 #[cfg(test)]
 mod tests {
 	use super::*;
@@ -204,6 +246,8 @@ mod tests {
 	use tempfile::tempdir;
 	use url::Url;
 
+	const MOCK_PROXIED_ADDRESS: &str = "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty";
+	const MOCK_PROXY_ADDRESS_ID: &str = "Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)";
 	const POLKADOT_NETWORK_URL: &str = "wss://polkadot-rpc.publicnode.com";
 	const POP_NETWORK_TESTNET_URL: &str = "wss://rpc1.paseo.popnetwork.xyz";
 
@@ -216,6 +260,7 @@ mod tests {
 			id: Some(2000),
 			genesis_state: Some(genesis_state.clone()),
 			genesis_code: Some(genesis_code.clone()),
+			proxied_address: Some(MOCK_PROXIED_ADDRESS.to_string()),
 			..Default::default()
 		}
 		.prepare_for_registration(&mut cli)
@@ -225,6 +270,37 @@ mod tests {
 		assert_eq!(chain_config.genesis_code, genesis_code);
 		assert_eq!(chain_config.genesis_state, genesis_state);
 		assert_eq!(chain_config.chain.url, Url::parse(POLKADOT_NETWORK_URL)?);
+		assert_eq!(chain_config.proxy, Some(format!("Id({})", MOCK_PROXIED_ADDRESS.to_string())));
+		cli.verify()
+	}
+
+	#[test]
+	fn resolve_proxied_address_works() -> Result<()> {
+		let mut cli = MockCli::new()
+			.expect_confirm("Would you like to use a proxy for registration? This is considered a best practice.", true)
+			.expect_input(
+				"Enter the account that the proxy will make a call on behalf of",
+				MOCK_PROXIED_ADDRESS.into(),
+			);
+		let proxied_address = UpCommand::default().resolve_proxied_address(&mut cli)?;
+		assert_eq!(proxied_address, Some(format!("Id({})", MOCK_PROXIED_ADDRESS)));
+		cli.verify()?;
+
+		cli = MockCli::new().expect_confirm(
+			"Would you like to use a proxy for registration? This is considered a best practice.",
+			false,
+		);
+		let proxied_address = UpCommand::default().resolve_proxied_address(&mut cli)?;
+		assert_eq!(proxied_address, None);
+		cli.verify()?;
+
+		cli = MockCli::new();
+		let proxied_address = UpCommand {
+			proxied_address: Some(MOCK_PROXIED_ADDRESS.to_string()),
+			..Default::default()
+		}
+		.resolve_proxied_address(&mut cli)?;
+		assert_eq!(proxied_address, Some(format!("Id({})", MOCK_PROXIED_ADDRESS)));
 		cli.verify()
 	}
 
@@ -238,11 +314,20 @@ mod tests {
 			&mut cli,
 		)
 		.await?;
-		let call_data = prepare_reserve_call_data(&chain, &mut cli)?;
+		let call_data = prepare_reserve_call_data(&chain, &None, &mut cli)?;
 		// Encoded call data for a reserve extrinsic.
 		// Reference: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.public.curie.radiumblock.co%2Fws#/extrinsics/decode/0x4605
 		let encoded_reserve_extrinsic: &str = "0x4605";
 		assert_eq!(call_data, decode_call_data(encoded_reserve_extrinsic)?);
+
+		// Ensure `prepare_reserve_call_data` works with a proxy.
+		let call_data =
+			prepare_reserve_call_data(&chain, &Some(MOCK_PROXY_ADDRESS_ID.to_string()), &mut cli)?;
+		// Encoded call data for a proxy extrinsic with reserve as the call.
+		// Reference: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.public.curie.radiumblock.co%2Fws#/extrinsics/decode/0x1d000073ebf9c947490b9170ea4fd3031ae039452e428531317f76bf0a02124f8166de004605
+		let encoded_reserve_extrinsic: &str =
+			"0x1d000073ebf9c947490b9170ea4fd3031ae039452e428531317f76bf0a02124f8166de004605";
+		assert_eq!(call_data, decode_call_data(encoded_reserve_extrinsic)?);
 		Ok(())
 	}
 
@@ -259,6 +344,7 @@ mod tests {
 			genesis_code: Some(genesis_code.clone()),
 			relay_chain_url: Some(Url::parse(POP_NETWORK_TESTNET_URL)?),
 			path: None,
+			proxied_address: None,
 		}
 		.execute(&mut cli)
 		.await?;
@@ -279,6 +365,7 @@ mod tests {
 			genesis_code: Some(genesis_code.clone()),
 			relay_chain_url: Some(Url::parse(POP_NETWORK_TESTNET_URL)?),
 			path: None,
+			proxied_address: None,
 		}
 		.execute(&mut cli)
 		.await?;
@@ -300,11 +387,12 @@ mod tests {
 		let temp_dir = tempdir()?;
 		let genesis_state_path = temp_dir.path().join("genesis_state");
 		let genesis_code_path = temp_dir.path().join("genesis_code.wasm");
-		let up_chain = Registration {
+		let mut up_chain = Registration {
 			id: 2000,
 			genesis_state: genesis_state_path.clone(),
 			genesis_code: genesis_code_path.clone(),
 			chain,
+			proxy: None,
 		};
 
 		// Expect failure when the genesis state file cannot be read.
@@ -328,6 +416,14 @@ mod tests {
 			up_chain.prepare_register_call_data(&mut cli)?,
 			decode_call_data(encoded_register_extrinsic)?
 		);
+
+		// Ensure `prepare_register_call_data` works with a proxy.
+		up_chain.proxy = Some(MOCK_PROXY_ADDRESS_ID.to_string());
+		let call_data = up_chain.prepare_register_call_data(&mut cli)?;
+		// Encoded call data for a proxy extrinsic with register as the call.
+		// Reference: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.public.curie.radiumblock.co%2Fws#/extrinsics/decode/0x1d000073ebf9c947490b9170ea4fd3031ae039452e428531317f76bf0a02124f8166de004600d0070000081234081234
+		let encoded_reserve_extrinsic: &str = "0x1d000073ebf9c947490b9170ea4fd3031ae039452e428531317f76bf0a02124f8166de004600d0070000081234081234";
+		assert_eq!(call_data, decode_call_data(encoded_reserve_extrinsic)?);
 		Ok(())
 	}
 
diff --git a/crates/pop-common/src/account_id.rs b/crates/pop-common/src/account_id.rs
new file mode 100644
index 000000000..37c169ad3
--- /dev/null
+++ b/crates/pop-common/src/account_id.rs
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-3.0
+
+use crate::{Config, DefaultConfig, Error};
+use std::str::FromStr;
+
+/// Parses an account ID from its string representation.
+///
+/// # Arguments
+/// * `account` - A string representing the account ID to parse.
+pub fn parse_account(account: &str) -> Result<<DefaultConfig as Config>::AccountId, Error> {
+	<DefaultConfig as Config>::AccountId::from_str(account)
+		.map_err(|e| Error::AccountAddressParsing(format!("{}", e)))
+}
+
+#[cfg(test)]
+mod tests {
+	use super::*;
+	use anyhow::Result;
+
+	#[test]
+	fn parse_account_works() -> Result<(), Error> {
+		let account = parse_account("5CLPm1CeUvJhZ8GCDZCR7nWZ2m3XXe4X5MtAQK69zEjut36A")?;
+		assert_eq!(account.to_string(), "5CLPm1CeUvJhZ8GCDZCR7nWZ2m3XXe4X5MtAQK69zEjut36A");
+		Ok(())
+	}
+
+	#[test]
+	fn parse_account_fails_wrong_value() -> Result<(), Error> {
+		assert!(matches!(
+			parse_account("5CLPm1CeUvJhZ8GCDZCR7"),
+			Err(super::Error::AccountAddressParsing(..))
+		));
+		assert!(matches!(
+			parse_account("wrongaccount"),
+			Err(super::Error::AccountAddressParsing(..))
+		));
+		Ok(())
+	}
+}
diff --git a/crates/pop-common/src/errors.rs b/crates/pop-common/src/errors.rs
index ceef11500..e8692932c 100644
--- a/crates/pop-common/src/errors.rs
+++ b/crates/pop-common/src/errors.rs
@@ -6,6 +6,8 @@ use thiserror::Error;
 /// Represents the various errors that can occur in the crate.
 #[derive(Error, Debug)]
 pub enum Error {
+	#[error("Failed to parse account address: {0}")]
+	AccountAddressParsing(String),
 	#[error("Anyhow error: {0}")]
 	AnyhowError(#[from] anyhow::Error),
 	#[error("Configuration error: {0}")]
diff --git a/crates/pop-common/src/lib.rs b/crates/pop-common/src/lib.rs
index b4c0c1973..fe556543e 100644
--- a/crates/pop-common/src/lib.rs
+++ b/crates/pop-common/src/lib.rs
@@ -2,6 +2,7 @@
 
 use std::net::TcpListener;
 
+pub use account_id::parse_account;
 pub use build::Profile;
 pub use errors::Error;
 pub use git::{Git, GitHub, Release};
@@ -14,6 +15,8 @@ pub use subxt::{Config, PolkadotConfig as DefaultConfig};
 pub use subxt_signer::sr25519::Keypair;
 pub use templates::extractor::extract_template_files;
 
+/// Module for parsing and handling account IDs.
+pub mod account_id;
 pub mod build;
 pub mod errors;
 pub mod git;
diff --git a/crates/pop-contracts/src/call.rs b/crates/pop-contracts/src/call.rs
index 2ffbd3258..15e6d8901 100644
--- a/crates/pop-contracts/src/call.rs
+++ b/crates/pop-contracts/src/call.rs
@@ -6,7 +6,7 @@ use crate::{
 	utils::{
 		get_manifest_path,
 		metadata::{process_function_args, FunctionType},
-		parse_account, parse_balance,
+		parse_balance,
 	},
 };
 use anyhow::Context;
@@ -16,7 +16,7 @@ use contract_extrinsics::{
 	DisplayEvents, ErrorVariant, ExtrinsicOptsBuilder, TokenMetadata,
 };
 use ink_env::{DefaultEnvironment, Environment};
-use pop_common::{create_signer, Config, DefaultConfig, Keypair};
+use pop_common::{create_signer, parse_account, Config, DefaultConfig, Keypair};
 use sp_weights::Weight;
 use std::path::PathBuf;
 use subxt::{tx::Payload, SubstrateConfig};
diff --git a/crates/pop-contracts/src/errors.rs b/crates/pop-contracts/src/errors.rs
index e7ddec21b..84f298958 100644
--- a/crates/pop-contracts/src/errors.rs
+++ b/crates/pop-contracts/src/errors.rs
@@ -7,8 +7,6 @@ use thiserror::Error;
 #[derive(Error, Debug)]
 #[allow(clippy::enum_variant_names)]
 pub enum Error {
-	#[error("Failed to parse account address: {0}")]
-	AccountAddressParsing(String),
 	#[error("Anyhow error: {0}")]
 	AnyhowError(#[from] anyhow::Error),
 	#[error("Failed to parse balance: {0}")]
diff --git a/crates/pop-contracts/src/lib.rs b/crates/pop-contracts/src/lib.rs
index 6dded2fe0..3e7b6fc50 100644
--- a/crates/pop-contracts/src/lib.rs
+++ b/crates/pop-contracts/src/lib.rs
@@ -30,7 +30,7 @@ pub use up::{
 };
 pub use utils::{
 	metadata::{get_message, get_messages, ContractFunction},
-	parse_account, parse_hex_bytes,
+	parse_hex_bytes,
 };
 // External exports
 pub use contract_extrinsics::CallExec;
diff --git a/crates/pop-contracts/src/utils/mod.rs b/crates/pop-contracts/src/utils/mod.rs
index a3a99323b..073aa157c 100644
--- a/crates/pop-contracts/src/utils/mod.rs
+++ b/crates/pop-contracts/src/utils/mod.rs
@@ -4,7 +4,6 @@ use crate::errors::Error;
 use contract_build::{util::decode_hex, ManifestPath};
 use contract_extrinsics::BalanceVariant;
 use ink_env::{DefaultEnvironment, Environment};
-use pop_common::{Config, DefaultConfig};
 use sp_core::Bytes;
 use std::{
 	path::{Path, PathBuf},
@@ -38,15 +37,6 @@ pub fn parse_balance(
 	BalanceVariant::from_str(balance).map_err(|e| Error::BalanceParsing(format!("{}", e)))
 }
 
-/// Parses an account ID from its string representation.
-///
-/// # Arguments
-/// * `account` - A string representing the account ID to parse.
-pub fn parse_account(account: &str) -> Result<<DefaultConfig as Config>::AccountId, Error> {
-	<DefaultConfig as Config>::AccountId::from_str(account)
-		.map_err(|e| Error::AccountAddressParsing(format!("{}", e)))
-}
-
 /// Parse hex encoded bytes.
 ///
 /// # Arguments
@@ -117,22 +107,6 @@ mod tests {
 		Ok(())
 	}
 
-	#[test]
-	fn parse_account_works() -> Result<(), Error> {
-		let account = parse_account("5CLPm1CeUvJhZ8GCDZCR7nWZ2m3XXe4X5MtAQK69zEjut36A")?;
-		assert_eq!(account.to_string(), "5CLPm1CeUvJhZ8GCDZCR7nWZ2m3XXe4X5MtAQK69zEjut36A");
-		Ok(())
-	}
-
-	#[test]
-	fn parse_account_fails_wrong_value() -> Result<(), Error> {
-		assert!(matches!(
-			parse_account("wrongaccount"),
-			Err(super::Error::AccountAddressParsing(..))
-		));
-		Ok(())
-	}
-
 	#[test]
 	fn parse_hex_bytes_works() -> Result<(), Error> {
 		let input_in_hex = "48656c6c6f";
diff --git a/crates/pop-parachains/src/call/metadata/mod.rs b/crates/pop-parachains/src/call/metadata/mod.rs
index 5a9a9a2cb..1ce4e3c0d 100644
--- a/crates/pop-parachains/src/call/metadata/mod.rs
+++ b/crates/pop-parachains/src/call/metadata/mod.rs
@@ -82,7 +82,6 @@ pub fn parse_chain_metadata(client: &OnlineClient<SubstrateConfig>) -> Result<Ve
 											// dispatchable function as unsupported rather than
 											// error.
 											is_supported = false;
-											parsed_params.clear();
 											break;
 										},
 									}
diff --git a/crates/pop-parachains/src/call/mod.rs b/crates/pop-parachains/src/call/mod.rs
index 7ad7bcc07..d3e368711 100644
--- a/crates/pop-parachains/src/call/mod.rs
+++ b/crates/pop-parachains/src/call/mod.rs
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-3.0
 
-use crate::{errors::Error, Function};
+use crate::{errors::Error, find_dispatchable_by_name, Function, Pallet, Param};
 use pop_common::{
 	call::{DefaultEnvironment, DisplayEvents, TokenMetadata, Verbosity},
 	create_signer,
@@ -46,6 +46,33 @@ pub fn construct_sudo_extrinsic(xt: DynamicPayload) -> DynamicPayload {
 	subxt::dynamic::tx("Sudo", "sudo", [xt.into_value()].to_vec())
 }
 
+/// Constructs a Proxy call extrinsic.
+///
+/// # Arguments
+/// * `pallets`: List of pallets available within the chain's runtime.
+/// * `proxied_account` - The account on whose behalf the proxy will act.
+/// * `xt`: The extrinsic representing the dispatchable function call to be dispatched using the
+///   proxy.
+pub fn construct_proxy_extrinsic(
+	pallets: &[Pallet],
+	proxied_account: String,
+	xt: DynamicPayload,
+) -> Result<DynamicPayload, Error> {
+	let proxy_function = find_dispatchable_by_name(pallets, "Proxy", "proxy")?;
+	// `find_dispatchable_by_name` doesn't support parsing parameters that are calls.
+	// Therefore, we only parse the first two parameters for the proxy call
+	// using `parse_dispatchable_arguments`, while the last parameter (which is the call)
+	// must be manually added.
+	let required_params: Vec<Param> = proxy_function.params.iter().take(2).cloned().collect();
+	let mut parsed_args: Vec<Value> = metadata::parse_dispatchable_arguments(
+		&required_params,
+		vec![proxied_account, "None()".to_string()],
+	)?;
+	let real = parsed_args.remove(0);
+	let proxy_type = parsed_args.remove(0);
+	Ok(subxt::dynamic::tx("Proxy", "proxy", [real, proxy_type, xt.into_value()].to_vec()))
+}
+
 /// Signs and submits a given extrinsic.
 ///
 /// # Arguments
@@ -169,6 +196,26 @@ mod tests {
 		Ok(())
 	}
 
+	#[tokio::test]
+	async fn construct_proxy_extrinsic_work() -> Result<()> {
+		let client = set_up_client(POP_NETWORK_TESTNET_URL).await?;
+		let pallets = parse_chain_metadata(&client)?;
+		let remark_dispatchable = find_dispatchable_by_name(&pallets, "System", "remark")?;
+		let remark = construct_extrinsic(remark_dispatchable, ["0x11".to_string()].to_vec())?;
+		let xt = construct_proxy_extrinsic(
+			&pallets,
+			"Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)".to_string(),
+			remark,
+		)?;
+		// Encoded call data for a proxy extrinsic with remark as the call.
+		// Reference: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc1.paseo.popnetwork.xyz#/extrinsics/decode/0x29000073ebf9c947490b9170ea4fd3031ae039452e428531317f76bf0a02124f8166de0000000411
+		assert_eq!(
+			encode_call_data(&client, &xt)?,
+			"0x29000073ebf9c947490b9170ea4fd3031ae039452e428531317f76bf0a02124f8166de0000000411"
+		);
+		Ok(())
+	}
+
 	#[tokio::test]
 	async fn construct_extrinsic_works() -> Result<()> {
 		let client = set_up_client(POP_NETWORK_TESTNET_URL).await?;
diff --git a/crates/pop-parachains/src/lib.rs b/crates/pop-parachains/src/lib.rs
index 26bbe6227..5346c0397 100644
--- a/crates/pop-parachains/src/lib.rs
+++ b/crates/pop-parachains/src/lib.rs
@@ -18,7 +18,8 @@ pub use build::{
 	generate_plain_chain_spec, generate_raw_chain_spec, is_supported, ChainSpec,
 };
 pub use call::{
-	construct_extrinsic, construct_sudo_extrinsic, decode_call_data, encode_call_data,
+	construct_extrinsic, construct_proxy_extrinsic, construct_sudo_extrinsic, decode_call_data,
+	encode_call_data,
 	metadata::{
 		action::{supported_actions, Action},
 		find_dispatchable_by_name, find_pallet_by_name,


Reviews:
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-27T17:22:54Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-27T17:41:19Z
user: login: evilrobot-01
body: Really enjoyed this PR, seems powerful!

Quick high level review only, didnt look at tests.
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-28T15:56:22Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-03T14:46:37Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-03T14:52:26Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-03T15:29:33Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-03T15:29:57Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-03T15:30:13Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-03T15:30:47Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-03T15:31:02Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-03T15:31:06Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-03T15:31:43Z
user: login: Daanvdplas
body: Looking good! Left a few comments.

Maybe a little bit out of scope but is there a way to improve these prompts?
<img width="553" alt="Screenshot 2025-03-05 at 09 58 56" src="https://github.com/user-attachments/assets/a8125767-9b66-4d86-9198-417d39e76775" />
<img width="517" alt="Screenshot 2025-03-05 at 10 05 20" src="https://github.com/user-attachments/assets/6d338db9-84f4-44b2-abe8-50b3c638e77c" />

`What type of address do you want to use?`
`Enter your address`

`Id` is also too vague for me, if we can, can we rename this to Polkadot address or something.

state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-05T09:46:03Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T10:22:29Z
user: login: chungquantin
body: Looks great. Suggested some improvements! 
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T10:27:47Z
user: login: chungquantin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T10:29:46Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T10:35:21Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T10:36:55Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T10:38:32Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T10:46:56Z
user: login: chungquantin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T10:51:52Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T13:06:01Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T13:06:22Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T13:07:04Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T13:38:37Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T13:43:41Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T13:43:45Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T13:44:31Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T13:45:51Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-06T10:12:59Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-06T10:19:51Z
user: login: chungquantin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-07T07:25:58Z
user: login: chungquantin
body: Approved! PR looks very clean to me! It provides a smooth dev ex and I really love the flow and how smooth it is! 
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-07T08:25:22Z
user: login: Daanvdplas
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-07T11:59:18Z
user: login: Daanvdplas
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-07T12:00:04Z
user: login: Daanvdplas
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-07T12:06:04Z
user: login: Daanvdplas
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-07T12:33:57Z
user: login: Daanvdplas
body: Well done on the PR! Super nice and clean!

Left some conversations unresolved and would be nice to take a look before merging but not enough to block this any further.
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-07T12:44:19Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-07T13:24:40Z
user: login: AlexD10S
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-07T13:26:12Z

Review comments:
path: crates/pop-cli/src/assets/index.html
user: login: AlexD10S
body: Changes in this file from https://github.com/r0gue-io/pop-wallet-signing-portal/pull/8
created_at: 2025-02-27T17:22:54Z
author_association: MEMBER
diff_hunk: @@ -82,7 +82,6 @@ pub fn parse_chain_metadata(client: &OnlineClient<SubstrateConfig>) -> Result<Ve
 											// dispatchable function as unsupported rather than
 											// error.
 											is_supported = false;
-											parsed_params.clear();
path: crates/pop-parachains/src/call/metadata/mod.rs
user: login: AlexD10S
body: When parsing the chain metadata, we can't process arguments that are nested calls (e.g., `sudo` or `proxy`), they are not supported via `pop call`. I removed this line to ensure we can still parse the remaining arguments, allowing us to manually construct the `proxy` call (see `construct_proxy_extrinsic`).
created_at: 2025-02-27T17:41:19Z
author_association: MEMBER
diff_hunk: @@ -37,6 +39,10 @@ pub struct UpChainCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_url: Option<Url>,
+	///  Proxied account address. The proxy can act on behalf of this account.
+	/// Specify the address type, e.g. `Id(5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)`.
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: evilrobot-01
body: Assume it has to be `Id(..)` as its a `MultiAddress`? Can we also support a raw 'id' and wrap it in `Id()`, whilst still preserving the ability to use the other variants of MultiAddress?

Can a better type be used than string perhaps, as with Url?
created_at: 2025-02-28T15:13:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -66,18 +72,40 @@ impl UpChainCommand {
 			cli,
 		)
 		.await?;
-		let para_id = self.resolve_parachain_id(&chain, cli).await?;
+
+		let proxy = self.resolve_proxied_address(&chain, cli)?;
+		let para_id = self.resolve_parachain_id(&chain, &proxy, cli).await?;
 		let (genesis_state, genesis_code) = self.resolve_genesis_files(para_id, cli).await?;
-		Ok(UpChain { id: para_id, genesis_state, genesis_code, chain })
+		Ok(UpChain { id: para_id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<ProxyConfig> {
+		if let Some(addr) = &self.proxied_address {
+			return Ok(ProxyConfig::Address(addr.clone()));
+		}
+		if cli.confirm("Would you like to use a proxy for registration? This is considered a best practice.").interact()? {
+			cli.info("Enter the account the proxy will represent.")?;
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: evilrobot-01
body: Is this a little ambigous to someone that doesnt know what is required here? The description should also align with that of the command.

The proxy dispatchable uses ` - real: The account that the proxy will make a call on behalf of.`
created_at: 2025-02-28T15:15:14Z
author_association: CONTRIBUTOR
diff_hunk: @@ -37,6 +39,10 @@ pub struct UpChainCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_url: Option<Url>,
+	///  Proxied account address. The proxy can act on behalf of this account.
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: evilrobot-01
body: ```suggestion
	///  Proxied address. Your account must be registered as a proxy which can act on behalf of this account.
```
created_at: 2025-02-28T15:28:17Z
author_association: CONTRIBUTOR
diff_hunk: @@ -97,12 +125,19 @@ impl UpChainCommand {
 	}
 }
 
+#[derive(Clone, Debug, PartialEq)]
+enum ProxyConfig {
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: evilrobot-01
body: ```suggestion
enum Proxy {
```

I dont see that the `Config` suffix adds any value based on how simple the enum definition is.
created_at: 2025-02-28T15:32:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -124,15 +159,18 @@ impl UpChain {
 		let state = std::fs::read_to_string(genesis_state)
 			.map_err(|err| anyhow!("Failed to read genesis state file: {}", err.to_string()))?;
 		let code = std::fs::read_to_string(genesis_code)
-			.map_err(|err| anyhow!("Failed to read genesis code file: {}", err.to_string()))?;
-		let xt = construct_extrinsic(ex, vec![id.to_string(), state, code])?;
+			.map_err(|err| anyhow!("Failed to read genesis state file: {}", err.to_string()))?;
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: evilrobot-01
body: ```suggestion
			.map_err(|err| anyhow!("Failed to read genesis code file: {}", err.to_string()))?;
```
created_at: 2025-02-28T15:33:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -115,7 +150,7 @@ impl UpChain {
 
 	// Prepares and returns the encoded call data for registering a parachain.
 	fn prepare_register_parachain_call_data(&self) -> Result<Vec<u8>> {
-		let UpChain { id, genesis_code, genesis_state, chain } = self;
+		let UpChain { id, genesis_code, genesis_state, chain, proxy } = self;
 		let ex = find_dispatchable_by_name(
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: evilrobot-01
body: `let register` might be more informative
created_at: 2025-02-28T15:36:49Z
author_association: CONTRIBUTOR
diff_hunk: @@ -97,12 +125,19 @@ impl UpChainCommand {
 	}
 }
 
+#[derive(Clone, Debug, PartialEq)]
+enum ProxyConfig {
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: evilrobot-01
body: Can you not achieve the same with `type Proxy = Option<String>;`?
created_at: 2025-02-28T15:38:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -124,15 +159,18 @@ impl UpChain {
 		let state = std::fs::read_to_string(genesis_state)
 			.map_err(|err| anyhow!("Failed to read genesis state file: {}", err.to_string()))?;
 		let code = std::fs::read_to_string(genesis_code)
-			.map_err(|err| anyhow!("Failed to read genesis code file: {}", err.to_string()))?;
-		let xt = construct_extrinsic(ex, vec![id.to_string(), state, code])?;
+			.map_err(|err| anyhow!("Failed to read genesis state file: {}", err.to_string()))?;
+		let mut xt = construct_extrinsic(ex, vec![id.to_string(), state, code])?;
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: evilrobot-01
body: Why is the para id encoded as a string? subxt thing?
created_at: 2025-02-28T15:40:19Z
author_association: CONTRIBUTOR
diff_hunk: @@ -46,6 +46,36 @@ pub fn construct_sudo_extrinsic(xt: DynamicPayload) -> DynamicPayload {
 	subxt::dynamic::tx("Sudo", "sudo", [xt.into_value()].to_vec())
 }
 
+/// Constructs a Proxy call extrinsic.
+///
+/// # Arguments
+/// * `pallets`: List of pallets available within the chain's runtime.
+/// * `proxied_account` - The account on whose behalf the proxy will act.
+/// * `xt`: The extrinsic representing the dispatchable function call to be dispatched using the
+///   proxy.
+pub fn construct_proxy_extrinsic(
+	pallets: &[Pallet],
+	proxied_account: String,
+	xt: DynamicPayload,
+) -> Result<DynamicPayload, Error> {
+	let proxy_function = find_dispatchable_by_name(pallets, "Proxy", "proxy")?;
+	// `find_dispatchable_by_name` doesn't support parsing parameters that are calls.
+	// Therefore, we only parse the first two parameters for the proxy call
+	// using `parse_dispatchable_arguments`, while the last parameter (which is the call)
+	// must be manually added.
+	let required_params: Vec<Param> = proxy_function.params.iter().take(2).cloned().collect();
path: crates/pop-parachains/src/call/mod.rs
user: login: evilrobot-01
body: Can you not consume the params collection with into_iter() to avoid cloning?
created_at: 2025-02-28T15:54:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -46,6 +46,36 @@ pub fn construct_sudo_extrinsic(xt: DynamicPayload) -> DynamicPayload {
 	subxt::dynamic::tx("Sudo", "sudo", [xt.into_value()].to_vec())
 }
 
+/// Constructs a Proxy call extrinsic.
+///
+/// # Arguments
+/// * `pallets`: List of pallets available within the chain's runtime.
+/// * `proxied_account` - The account on whose behalf the proxy will act.
+/// * `xt`: The extrinsic representing the dispatchable function call to be dispatched using the
+///   proxy.
+pub fn construct_proxy_extrinsic(
+	pallets: &[Pallet],
+	proxied_account: String,
+	xt: DynamicPayload,
+) -> Result<DynamicPayload, Error> {
+	let proxy_function = find_dispatchable_by_name(pallets, "Proxy", "proxy")?;
+	// `find_dispatchable_by_name` doesn't support parsing parameters that are calls.
+	// Therefore, we only parse the first two parameters for the proxy call
+	// using `parse_dispatchable_arguments`, while the last parameter (which is the call)
+	// must be manually added.
+	let required_params: Vec<Param> = proxy_function.params.iter().take(2).cloned().collect();
+	let parsed_args: Vec<Value> = metadata::parse_dispatchable_arguments(
+		&required_params,
+		vec![proxied_account, "None()".to_string()],
+	)?;
+
+	Ok(subxt::dynamic::tx(
+		"Proxy",
+		"proxy",
+		[parsed_args[0].clone(), parsed_args[1].clone(), xt.into_value()].to_vec(),
path: crates/pop-parachains/src/call/mod.rs
user: login: evilrobot-01
body: Can avoid clone with: `let real = parsed_args.remove(0)`
created_at: 2025-02-28T15:55:37Z
author_association: CONTRIBUTOR
diff_hunk: @@ -124,15 +159,18 @@ impl UpChain {
 		let state = std::fs::read_to_string(genesis_state)
 			.map_err(|err| anyhow!("Failed to read genesis state file: {}", err.to_string()))?;
 		let code = std::fs::read_to_string(genesis_code)
-			.map_err(|err| anyhow!("Failed to read genesis code file: {}", err.to_string()))?;
-		let xt = construct_extrinsic(ex, vec![id.to_string(), state, code])?;
+			.map_err(|err| anyhow!("Failed to read genesis state file: {}", err.to_string()))?;
+		let mut xt = construct_extrinsic(ex, vec![id.to_string(), state, code])?;
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: AlexD10S
body: Yes, I found that using an array of strings was the easiest way to process parameter values: https://github.com/r0gue-io/pop-cli/blob/main/crates/pop-parachains/src/call/metadata/mod.rs#L172. It’s also convenient in the Call feature since users can specify arguments via the CLI.
created_at: 2025-03-03T14:46:37Z
author_association: MEMBER
diff_hunk: @@ -46,6 +46,36 @@ pub fn construct_sudo_extrinsic(xt: DynamicPayload) -> DynamicPayload {
 	subxt::dynamic::tx("Sudo", "sudo", [xt.into_value()].to_vec())
 }
 
+/// Constructs a Proxy call extrinsic.
+///
+/// # Arguments
+/// * `pallets`: List of pallets available within the chain's runtime.
+/// * `proxied_account` - The account on whose behalf the proxy will act.
+/// * `xt`: The extrinsic representing the dispatchable function call to be dispatched using the
+///   proxy.
+pub fn construct_proxy_extrinsic(
+	pallets: &[Pallet],
+	proxied_account: String,
+	xt: DynamicPayload,
+) -> Result<DynamicPayload, Error> {
+	let proxy_function = find_dispatchable_by_name(pallets, "Proxy", "proxy")?;
+	// `find_dispatchable_by_name` doesn't support parsing parameters that are calls.
+	// Therefore, we only parse the first two parameters for the proxy call
+	// using `parse_dispatchable_arguments`, while the last parameter (which is the call)
+	// must be manually added.
+	let required_params: Vec<Param> = proxy_function.params.iter().take(2).cloned().collect();
path: crates/pop-parachains/src/call/mod.rs
user: login: AlexD10S
body: I can't do it because `find_dispatachable_by_name` returns a `&Function`
created_at: 2025-03-03T14:52:26Z
author_association: MEMBER
diff_hunk: @@ -46,6 +46,36 @@ pub fn construct_sudo_extrinsic(xt: DynamicPayload) -> DynamicPayload {
 	subxt::dynamic::tx("Sudo", "sudo", [xt.into_value()].to_vec())
 }
 
+/// Constructs a Proxy call extrinsic.
+///
+/// # Arguments
+/// * `pallets`: List of pallets available within the chain's runtime.
+/// * `proxied_account` - The account on whose behalf the proxy will act.
+/// * `xt`: The extrinsic representing the dispatchable function call to be dispatched using the
+///   proxy.
+pub fn construct_proxy_extrinsic(
+	pallets: &[Pallet],
+	proxied_account: String,
+	xt: DynamicPayload,
+) -> Result<DynamicPayload, Error> {
+	let proxy_function = find_dispatchable_by_name(pallets, "Proxy", "proxy")?;
+	// `find_dispatchable_by_name` doesn't support parsing parameters that are calls.
+	// Therefore, we only parse the first two parameters for the proxy call
+	// using `parse_dispatchable_arguments`, while the last parameter (which is the call)
+	// must be manually added.
+	let required_params: Vec<Param> = proxy_function.params.iter().take(2).cloned().collect();
+	let parsed_args: Vec<Value> = metadata::parse_dispatchable_arguments(
+		&required_params,
+		vec![proxied_account, "None()".to_string()],
+	)?;
+
+	Ok(subxt::dynamic::tx(
+		"Proxy",
+		"proxy",
+		[parsed_args[0].clone(), parsed_args[1].clone(), xt.into_value()].to_vec(),
path: crates/pop-parachains/src/call/mod.rs
user: login: AlexD10S
body: https://github.com/r0gue-io/pop-cli/pull/427/commits/bfbb8e44ba4218d20ce9f9b834793f8cf47068e2
created_at: 2025-03-03T15:29:32Z
author_association: MEMBER
diff_hunk: @@ -115,7 +150,7 @@ impl UpChain {
 
 	// Prepares and returns the encoded call data for registering a parachain.
 	fn prepare_register_parachain_call_data(&self) -> Result<Vec<u8>> {
-		let UpChain { id, genesis_code, genesis_state, chain } = self;
+		let UpChain { id, genesis_code, genesis_state, chain, proxy } = self;
 		let ex = find_dispatchable_by_name(
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: AlexD10S
body: In the main feat branch name was changed to `dispatachable`
created_at: 2025-03-03T15:29:57Z
author_association: MEMBER
diff_hunk: @@ -124,15 +159,18 @@ impl UpChain {
 		let state = std::fs::read_to_string(genesis_state)
 			.map_err(|err| anyhow!("Failed to read genesis state file: {}", err.to_string()))?;
 		let code = std::fs::read_to_string(genesis_code)
-			.map_err(|err| anyhow!("Failed to read genesis code file: {}", err.to_string()))?;
-		let xt = construct_extrinsic(ex, vec![id.to_string(), state, code])?;
+			.map_err(|err| anyhow!("Failed to read genesis state file: {}", err.to_string()))?;
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: AlexD10S
body: https://github.com/r0gue-io/pop-cli/pull/427/commits/6fdf6338d83bfd89ab0c91543e0ab0ac30ea8db7
created_at: 2025-03-03T15:30:13Z
author_association: MEMBER
diff_hunk: @@ -97,12 +125,19 @@ impl UpChainCommand {
 	}
 }
 
+#[derive(Clone, Debug, PartialEq)]
+enum ProxyConfig {
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: AlexD10S
body: Yes, the type `Proxy = Option<String>;` seems enough. Refactored in this commit https://github.com/r0gue-io/pop-cli/pull/427/commits/f18de68e93111b9f14bde797ec587825157f3696
created_at: 2025-03-03T15:30:47Z
author_association: MEMBER
diff_hunk: @@ -37,6 +39,10 @@ pub struct UpChainCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_url: Option<Url>,
+	///  Proxied account address. The proxy can act on behalf of this account.
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: AlexD10S
body: https://github.com/r0gue-io/pop-cli/pull/427/commits/34b95399b9308df0c38f1fcaea77b71019b3cd91
created_at: 2025-03-03T15:31:02Z
author_association: MEMBER
diff_hunk: @@ -66,18 +72,40 @@ impl UpChainCommand {
 			cli,
 		)
 		.await?;
-		let para_id = self.resolve_parachain_id(&chain, cli).await?;
+
+		let proxy = self.resolve_proxied_address(&chain, cli)?;
+		let para_id = self.resolve_parachain_id(&chain, &proxy, cli).await?;
 		let (genesis_state, genesis_code) = self.resolve_genesis_files(para_id, cli).await?;
-		Ok(UpChain { id: para_id, genesis_state, genesis_code, chain })
+		Ok(UpChain { id: para_id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<ProxyConfig> {
+		if let Some(addr) = &self.proxied_address {
+			return Ok(ProxyConfig::Address(addr.clone()));
+		}
+		if cli.confirm("Would you like to use a proxy for registration? This is considered a best practice.").interact()? {
+			cli.info("Enter the account the proxy will represent.")?;
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: AlexD10S
body: https://github.com/r0gue-io/pop-cli/pull/427/commits/34b95399b9308df0c38f1fcaea77b71019b3cd91
created_at: 2025-03-03T15:31:06Z
author_association: MEMBER
diff_hunk: @@ -37,6 +39,10 @@ pub struct UpChainCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_url: Option<Url>,
+	///  Proxied account address. The proxy can act on behalf of this account.
+	/// Specify the address type, e.g. `Id(5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)`.
path: crates/pop-cli/src/commands/up/parachain.rs
user: login: AlexD10S
body: Yes, interesting improvement. Include the manually wrap and improve comment https://github.com/r0gue-io/pop-cli/pull/427/commits/34b95399b9308df0c38f1fcaea77b71019b3cd91
created_at: 2025-03-03T15:31:43Z
author_association: MEMBER
diff_hunk: @@ -37,6 +41,12 @@ pub struct UpCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_chain_url: Option<Url>,
+	/// Proxied address. Your account must be registered as a proxy which can act on behalf of this
+	/// account.  You can specify the MultiAddress type explicitly, e.g.,
+	/// `Id(5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)`. If no type is provided, it
+	/// defaults to `Id()`.
+	#[arg(long = "proxy")]
+	pub(crate) proxied_address: Option<String>,
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: ```suggestion
	pub(crate) proxied_address: Proxy,
```

I saw there's a type alias defined above this struct. Guess it need to be used here? 
created_at: 2025-03-05T08:04:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -69,18 +79,41 @@ impl UpCommand {
 		let chain =
 			configure("Enter the relay chain node URL", DEFAULT_URL, &self.relay_chain_url, cli)
 				.await?;
-		let id = self.resolve_id(&chain, cli).await?;
+		let proxy = self.resolve_proxied_address(&chain, cli)?;
+		let id = self.resolve_id(&chain, &proxy, cli).await?;
 		let (genesis_code, genesis_state) = self.resolve_genesis_files(id, cli).await?;
-		Ok(Registration { id, genesis_state, genesis_code, chain })
+		Ok(Registration { id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<Proxy> {
+		let proxy = find_dispatchable_by_name(&chain.pallets, "Proxy", "proxy")?;
+		if let Some(addr) = &self.proxied_address {
+			let valid_multi_address: Vec<String> =
+				proxy.params[0].sub_params.iter().map(|p| p.name.to_string()).collect();
+			return Ok(
+				if valid_multi_address.iter().any(|t| addr.starts_with(&format!("{}(", t))) {
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: A brief comment above this line is nice for future maintainers. Here I don't understand it much because I haven't taken a look at the format of `addr`yet. 
created_at: 2025-03-05T08:14:31Z
author_association: CONTRIBUTOR
diff_hunk: @@ -473,7 +473,7 @@ fn prompt_predefined_actions(pallets: &[Pallet], cli: &mut impl Cli) -> Result<O
 }
 
 // Prompts the user for the value of a parameter.
path: crates/pop-cli/src/commands/call/chain.rs
user: login: Daanvdplas
body: Public docs
created_at: 2025-03-05T09:06:39Z
author_association: COLLABORATOR
diff_hunk: @@ -37,6 +41,12 @@ pub struct UpCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_chain_url: Option<Url>,
+	/// Proxied address. Your account must be registered as a proxy which can act on behalf of this
+	/// account.  You can specify the MultiAddress type explicitly, e.g.,
+	/// `Id(5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)`. If no type is provided, it
+	/// defaults to `Id()`.
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: Daanvdplas
body: ```suggestion
	/// Proxied address. The account used for signing must be registered as a proxy for this address. You can specify the MultiAddress type explicitly, e.g.,
	/// `Id(5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)`. If no type is provided, it
	/// defaults to `Id()`.
```

created_at: 2025-03-05T09:14:12Z
author_association: COLLABORATOR
diff_hunk: @@ -37,6 +41,12 @@ pub struct UpCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_chain_url: Option<Url>,
+	/// Proxied address. Your account must be registered as a proxy which can act on behalf of this
+	/// account.  You can specify the MultiAddress type explicitly, e.g.,
+	/// `Id(5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)`. If no type is provided, it
+	/// defaults to `Id()`.
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: Daanvdplas
body: 
Further improvements but out of scope:
````
	/// Proxied address. The account used for signing must be registered as a proxy for this address. You can specify the address type explicitly, e.g.,
	/// `Polkadot(5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)`. If no type is provided, it
	/// defaults to `Polkadot()`.
```
created_at: 2025-03-05T09:15:27Z
author_association: COLLABORATOR
diff_hunk: @@ -69,18 +79,41 @@ impl UpCommand {
 		let chain =
 			configure("Enter the relay chain node URL", DEFAULT_URL, &self.relay_chain_url, cli)
 				.await?;
-		let id = self.resolve_id(&chain, cli).await?;
+		let proxy = self.resolve_proxied_address(&chain, cli)?;
+		let id = self.resolve_id(&chain, &proxy, cli).await?;
 		let (genesis_code, genesis_state) = self.resolve_genesis_files(id, cli).await?;
-		Ok(Registration { id, genesis_state, genesis_code, chain })
+		Ok(Registration { id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<Proxy> {
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: Daanvdplas
body: ```suggestion
	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<Proxy> {
		let proxy = find_dispatchable_by_name(&chain.pallets, "Proxy", "proxy")?;
		let proxy_address = if let Some(a) = &self.proxied_address {
			Some(if proxy.params[0].sub_params.iter().any(|p| a.starts_with(&format!("{}(", p.name))) {
				a.to_string()
			} else {
				format!("Id({})", a)
			})
		} else if cli.confirm("Would you like to use a proxy for registration? This is considered a best practice.").interact()? {
			cli.info("Enter the account that the proxy will make a call on behalf of.")?;
			Some(prompt_for_param(cli, &proxy.params[0])?)
		} else { None };
		Ok(proxy_address)
	}
```
created_at: 2025-03-05T09:37:35Z
author_association: COLLABORATOR
diff_hunk: @@ -236,11 +343,23 @@ mod tests {
 			&mut cli,
 		)
 		.await?;
-		let call_data = prepare_reserve_call_data(&chain, &mut cli)?;
+		let call_data = prepare_reserve_call_data(&chain, &None, &mut cli)?;
 		// Encoded call data for a reserve extrinsic.
 		// Reference: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.public.curie.radiumblock.co%2Fws#/extrinsics/decode/0x4605
 		let encoded_reserve_extrinsic: &str = "0x4605";
 		assert_eq!(call_data, decode_call_data(encoded_reserve_extrinsic)?);
+
+		// Ensure `prepare_reserve_call_data` works with a proxy.
+		let call_data = prepare_reserve_call_data(
+			&chain,
+			&Some("Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)".to_string()),
+			&mut cli,
+		)?;
+		// Encoded call data for a proxy extrinsic with reserve as the call.
+		// Reference: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.public.curie.radiumblock.co%2Fws#/extrinsics/decode/0x1d000073ebf9c947490b9170ea4fd3031ae039452e428531317f76bf0a02124f8166de004605
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: Daanvdplas
body: I have seen this a few cases in this codebase, but why are we not encoding it ourselves? 
created_at: 2025-03-05T09:41:06Z
author_association: COLLABORATOR
diff_hunk: @@ -46,6 +46,33 @@ pub fn construct_sudo_extrinsic(xt: DynamicPayload) -> DynamicPayload {
 	subxt::dynamic::tx("Sudo", "sudo", [xt.into_value()].to_vec())
 }
 
+/// Constructs a Proxy call extrinsic.
+///
+/// # Arguments
+/// * `pallets`: List of pallets available within the chain's runtime.
+/// * `proxied_account` - The account on whose behalf the proxy will act.
+/// * `xt`: The extrinsic representing the dispatchable function call to be dispatched using the
+///   proxy.
+pub fn construct_proxy_extrinsic(
+	pallets: &[Pallet],
+	proxied_account: String,
+	xt: DynamicPayload,
+) -> Result<DynamicPayload, Error> {
+	let proxy_function = find_dispatchable_by_name(pallets, "Proxy", "proxy")?;
path: crates/pop-parachains/src/call/mod.rs
user: login: Daanvdplas
body: Mostly curious so don't take it as a request, by why you are searching for the function, is it not known (e.g. constant)?
created_at: 2025-03-05T09:44:55Z
author_association: COLLABORATOR
diff_hunk: @@ -473,7 +473,7 @@ fn prompt_predefined_actions(pallets: &[Pallet], cli: &mut impl Cli) -> Result<O
 }
 
 // Prompts the user for the value of a parameter.
path: crates/pop-cli/src/commands/call/chain.rs
user: login: chungquantin
body: Shouldn't this method be located in `common`? it is shared with `up` command. 
created_at: 2025-03-05T10:02:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -69,18 +79,41 @@ impl UpCommand {
 		let chain =
 			configure("Enter the relay chain node URL", DEFAULT_URL, &self.relay_chain_url, cli)
 				.await?;
-		let id = self.resolve_id(&chain, cli).await?;
+		let proxy = self.resolve_proxied_address(&chain, cli)?;
+		let id = self.resolve_id(&chain, &proxy, cli).await?;
 		let (genesis_code, genesis_state) = self.resolve_genesis_files(id, cli).await?;
-		Ok(Registration { id, genesis_state, genesis_code, chain })
+		Ok(Registration { id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<Proxy> {
+		let proxy = find_dispatchable_by_name(&chain.pallets, "Proxy", "proxy")?;
+		if let Some(addr) = &self.proxied_address {
+			let valid_multi_address: Vec<String> =
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: ```suggestion
			let valid_multi_addresses: Vec<String> =
```

Is it multiple `MultiAddress` or multiple addresses 😄? I am not sure about this
created_at: 2025-03-05T10:03:34Z
author_association: CONTRIBUTOR
diff_hunk: @@ -69,18 +79,41 @@ impl UpCommand {
 		let chain =
 			configure("Enter the relay chain node URL", DEFAULT_URL, &self.relay_chain_url, cli)
 				.await?;
-		let id = self.resolve_id(&chain, cli).await?;
+		let proxy = self.resolve_proxied_address(&chain, cli)?;
+		let id = self.resolve_id(&chain, &proxy, cli).await?;
 		let (genesis_code, genesis_state) = self.resolve_genesis_files(id, cli).await?;
-		Ok(Registration { id, genesis_state, genesis_code, chain })
+		Ok(Registration { id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<Proxy> {
+		let proxy = find_dispatchable_by_name(&chain.pallets, "Proxy", "proxy")?;
+		if let Some(addr) = &self.proxied_address {
+			let valid_multi_address: Vec<String> =
+				proxy.params[0].sub_params.iter().map(|p| p.name.to_string()).collect();
+			return Ok(
+				if valid_multi_address.iter().any(|t| addr.starts_with(&format!("{}(", t))) {
+					Some(addr.to_string())
+				} else {
+					Some(format!("Id({})", addr))
+				},
+			);
+		}
+		if cli.confirm("Would you like to use a proxy for registration? This is considered a best practice.").interact()? {
+			cli.info("Enter the account that the proxy will make a call on behalf of.")?;
+			let address = prompt_for_param(cli, &proxy.params[0])?;
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: Is it cleaner to assign the `proxy.params[0]` to a variable? So we don't have to guess what is the first element of the param when reading the code. 
created_at: 2025-03-05T10:05:07Z
author_association: CONTRIBUTOR
diff_hunk: @@ -154,14 +191,17 @@ async fn reserve(chain: &Chain, cli: &mut impl Cli) -> Result<u32> {
 }
 
 // Prepares and returns the encoded call data for reserving an ID.
-fn prepare_reserve_call_data(chain: &Chain, cli: &mut impl Cli) -> Result<Vec<u8>> {
+fn prepare_reserve_call_data(chain: &Chain, proxy: &Proxy, cli: &mut impl Cli) -> Result<Vec<u8>> {
 	let dispatchable = find_dispatchable_by_name(
 		&chain.pallets,
 		Action::Reserve.pallet_name(),
 		Action::Reserve.function_name(),
 	)?;
-	let xt = Call { function: dispatchable.clone(), use_wallet: true, ..Default::default() }
+	let mut xt = Call { function: dispatchable.clone(), use_wallet: true, ..Default::default() }
 		.prepare_extrinsic(&chain.client, cli)?;
+	if let Some(addr) = proxy {
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: Could we bring these logic to the implementation of `Call`? Maybe inside `prepare_extrinsic` or a separate method that wraps around `prepare_extrinsic`. So we don't have to repeat the code whenever proxy is used. 
created_at: 2025-03-05T10:10:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -214,6 +254,9 @@ mod tests {
 			id: Some(2000),
 			genesis_state: Some(genesis_state.clone()),
 			genesis_code: Some(genesis_code.clone()),
+			proxied_address: Some(
+				"Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)".to_string(),
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: ```suggestion
				MOCK_PROXY_ADDRESS_ID.to_string(),
```

This address string is used for most of the tests. Worth a constant. 
created_at: 2025-03-05T10:10:52Z
author_association: CONTRIBUTOR
diff_hunk: @@ -223,6 +266,70 @@ mod tests {
 		assert_eq!(chain_config.genesis_code, genesis_code);
 		assert_eq!(chain_config.genesis_state, genesis_state);
 		assert_eq!(chain_config.chain.url, Url::parse(POLKADOT_NETWORK_URL)?);
+		assert_eq!(
+			chain_config.proxy,
+			Some("Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)".to_string())
+		);
+		cli.verify()
+	}
+
+	#[tokio::test]
+	async fn resolve_proxied_address_works() -> Result<()> {
+		let mut cli = MockCli::new()
+			.expect_confirm("Would you like to use a proxy for registration? This is considered a best practice.", true)
+			.expect_info("Enter the account that the proxy will make a call on behalf of.")
+			.expect_select(
+				"Select the value for the parameter: real",
+				Some(true),
+				true,
+				Some(
+					[
+						("Id".to_string(), "".to_string()),
+						("Index".to_string(), "".to_string()),
+						("Raw".to_string(), "".to_string()),
+						("Address32".to_string(), "".to_string()),
+						("Address20".to_string(), "".to_string()),
+					]
+					.to_vec(),
+				),
+				0, // "Id" action
+			)
+			.expect_input(
+				"Enter the value for the parameter: Id",
+				"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty".into(),
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: ```suggestion
				MOCK_PROXIED_ADDRESS.into(),
```
created_at: 2025-03-05T10:12:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -46,6 +46,33 @@ pub fn construct_sudo_extrinsic(xt: DynamicPayload) -> DynamicPayload {
 	subxt::dynamic::tx("Sudo", "sudo", [xt.into_value()].to_vec())
 }
 
+/// Constructs a Proxy call extrinsic.
+///
+/// # Arguments
+/// * `pallets`: List of pallets available within the chain's runtime.
+/// * `proxied_account` - The account on whose behalf the proxy will act.
+/// * `xt`: The extrinsic representing the dispatchable function call to be dispatched using the
+///   proxy.
+pub fn construct_proxy_extrinsic(
+	pallets: &[Pallet],
+	proxied_account: String,
+	xt: DynamicPayload,
+) -> Result<DynamicPayload, Error> {
+	let proxy_function = find_dispatchable_by_name(pallets, "Proxy", "proxy")?;
path: crates/pop-parachains/src/call/mod.rs
user: login: AlexD10S
body: Because we retrieve the proxy metadata from the specific chain the user selects, so we have the exact type that chain uses for the proxy call.
created_at: 2025-03-05T10:22:28Z
author_association: MEMBER
diff_hunk: @@ -37,6 +41,12 @@ pub struct UpCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_chain_url: Option<Url>,
+	/// Proxied address. Your account must be registered as a proxy which can act on behalf of this
+	/// account.  You can specify the MultiAddress type explicitly, e.g.,
+	/// `Id(5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)`. If no type is provided, it
+	/// defaults to `Id()`.
+	#[arg(long = "proxy")]
+	pub(crate) proxied_address: Option<String>,
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: Just look at the code again. Seems like this field is for the account that proxied. If so, no need to change. 
created_at: 2025-03-05T10:29:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -473,7 +473,7 @@ fn prompt_predefined_actions(pallets: &[Pallet], cli: &mut impl Cli) -> Result<O
 }
 
 // Prompts the user for the value of a parameter.
path: crates/pop-cli/src/commands/call/chain.rs
user: login: AlexD10S
body: <del>It should be only `pub(crate)`, changed it in https://github.com/r0gue-io/pop-cli/pull/427/commits/ceec043d267218288db1109a5d140cab8f0b6b69</del> Reverted to private since we use a custom method for proxy input.
created_at: 2025-03-05T10:35:21Z
author_association: MEMBER
diff_hunk: @@ -69,18 +79,41 @@ impl UpCommand {
 		let chain =
 			configure("Enter the relay chain node URL", DEFAULT_URL, &self.relay_chain_url, cli)
 				.await?;
-		let id = self.resolve_id(&chain, cli).await?;
+		let proxy = self.resolve_proxied_address(&chain, cli)?;
+		let id = self.resolve_id(&chain, &proxy, cli).await?;
 		let (genesis_code, genesis_state) = self.resolve_genesis_files(id, cli).await?;
-		Ok(Registration { id, genesis_state, genesis_code, chain })
+		Ok(Registration { id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<Proxy> {
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: Refactored to https://github.com/r0gue-io/pop-cli/pull/427/commits/be1b4d6e94ada51a2ff8d1a613e748cd860a8f7d It’s not exactly the same, but I see the improvement in how you return `proxy_address`, reducing the number of `Some(` calls.
created_at: 2025-03-05T10:36:55Z
author_association: MEMBER
diff_hunk: @@ -236,11 +343,23 @@ mod tests {
 			&mut cli,
 		)
 		.await?;
-		let call_data = prepare_reserve_call_data(&chain, &mut cli)?;
+		let call_data = prepare_reserve_call_data(&chain, &None, &mut cli)?;
 		// Encoded call data for a reserve extrinsic.
 		// Reference: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.public.curie.radiumblock.co%2Fws#/extrinsics/decode/0x4605
 		let encoded_reserve_extrinsic: &str = "0x4605";
 		assert_eq!(call_data, decode_call_data(encoded_reserve_extrinsic)?);
+
+		// Ensure `prepare_reserve_call_data` works with a proxy.
+		let call_data = prepare_reserve_call_data(
+			&chain,
+			&Some("Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)".to_string()),
+			&mut cli,
+		)?;
+		// Encoded call data for a proxy extrinsic with reserve as the call.
+		// Reference: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.public.curie.radiumblock.co%2Fws#/extrinsics/decode/0x1d000073ebf9c947490b9170ea4fd3031ae039452e428531317f76bf0a02124f8166de004605
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: We are testing exactly that, the call is prepared and the resulting `call_data` is correct. We need to compare it against a correct value.
created_at: 2025-03-05T10:38:31Z
author_association: MEMBER
diff_hunk: @@ -69,18 +79,41 @@ impl UpCommand {
 		let chain =
 			configure("Enter the relay chain node URL", DEFAULT_URL, &self.relay_chain_url, cli)
 				.await?;
-		let id = self.resolve_id(&chain, cli).await?;
+		let proxy = self.resolve_proxied_address(&chain, cli)?;
+		let id = self.resolve_id(&chain, &proxy, cli).await?;
 		let (genesis_code, genesis_state) = self.resolve_genesis_files(id, cli).await?;
-		Ok(Registration { id, genesis_state, genesis_code, chain })
+		Ok(Registration { id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<Proxy> {
+		let proxy = find_dispatchable_by_name(&chain.pallets, "Proxy", "proxy")?;
+		if let Some(addr) = &self.proxied_address {
+			let valid_multi_address: Vec<String> =
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: `MultiAddress` https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/runtime/src/multiaddress.rs#L35
created_at: 2025-03-05T10:46:56Z
author_association: MEMBER
diff_hunk: @@ -223,6 +266,70 @@ mod tests {
 		assert_eq!(chain_config.genesis_code, genesis_code);
 		assert_eq!(chain_config.genesis_state, genesis_state);
 		assert_eq!(chain_config.chain.url, Url::parse(POLKADOT_NETWORK_URL)?);
+		assert_eq!(
+			chain_config.proxy,
+			Some("Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)".to_string())
+		);
+		cli.verify()
+	}
+
+	#[tokio::test]
+	async fn resolve_proxied_address_works() -> Result<()> {
+		let mut cli = MockCli::new()
+			.expect_confirm("Would you like to use a proxy for registration? This is considered a best practice.", true)
+			.expect_info("Enter the account that the proxy will make a call on behalf of.")
+			.expect_select(
+				"Select the value for the parameter: real",
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: Even though I understand we retrieve this programatically, are there any way that we can improve this parameter name? Or describes what the parameter is. If I am not familiar with the structure of pallet proxy, I find this quite hard to understand,
created_at: 2025-03-05T10:51:51Z
author_association: CONTRIBUTOR
diff_hunk: @@ -37,6 +41,12 @@ pub struct UpCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_chain_url: Option<Url>,
+	/// Proxied address. Your account must be registered as a proxy which can act on behalf of this
+	/// account.  You can specify the MultiAddress type explicitly, e.g.,
+	/// `Id(5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)`. If no type is provided, it
+	/// defaults to `Id()`.
+	#[arg(long = "proxy")]
+	pub(crate) proxied_address: Option<String>,
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: Unfortunately if is Proxy even being an alias it forces to specify `proxied_address`, so we need the `Option` here
created_at: 2025-03-05T13:06:01Z
author_association: MEMBER
diff_hunk: @@ -69,18 +79,41 @@ impl UpCommand {
 		let chain =
 			configure("Enter the relay chain node URL", DEFAULT_URL, &self.relay_chain_url, cli)
 				.await?;
-		let id = self.resolve_id(&chain, cli).await?;
+		let proxy = self.resolve_proxied_address(&chain, cli)?;
+		let id = self.resolve_id(&chain, &proxy, cli).await?;
 		let (genesis_code, genesis_state) = self.resolve_genesis_files(id, cli).await?;
-		Ok(Registration { id, genesis_state, genesis_code, chain })
+		Ok(Registration { id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<Proxy> {
+		let proxy = find_dispatchable_by_name(&chain.pallets, "Proxy", "proxy")?;
+		if let Some(addr) = &self.proxied_address {
+			let valid_multi_address: Vec<String> =
+				proxy.params[0].sub_params.iter().map(|p| p.name.to_string()).collect();
+			return Ok(
+				if valid_multi_address.iter().any(|t| addr.starts_with(&format!("{}(", t))) {
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: Good point, done in https://github.com/r0gue-io/pop-cli/pull/427/commits/8897f2ab54b9a60ea6b182e3d118e727aee377a5
created_at: 2025-03-05T13:06:22Z
author_association: MEMBER
diff_hunk: @@ -69,18 +79,41 @@ impl UpCommand {
 		let chain =
 			configure("Enter the relay chain node URL", DEFAULT_URL, &self.relay_chain_url, cli)
 				.await?;
-		let id = self.resolve_id(&chain, cli).await?;
+		let proxy = self.resolve_proxied_address(&chain, cli)?;
+		let id = self.resolve_id(&chain, &proxy, cli).await?;
 		let (genesis_code, genesis_state) = self.resolve_genesis_files(id, cli).await?;
-		Ok(Registration { id, genesis_state, genesis_code, chain })
+		Ok(Registration { id, genesis_state, genesis_code, chain, proxy })
+	}
+
+	// Retrieves the proxied address, prompting the user if none is specified.
+	fn resolve_proxied_address(&self, chain: &Chain, cli: &mut impl Cli) -> Result<Proxy> {
+		let proxy = find_dispatchable_by_name(&chain.pallets, "Proxy", "proxy")?;
+		if let Some(addr) = &self.proxied_address {
+			let valid_multi_address: Vec<String> =
+				proxy.params[0].sub_params.iter().map(|p| p.name.to_string()).collect();
+			return Ok(
+				if valid_multi_address.iter().any(|t| addr.starts_with(&format!("{}(", t))) {
+					Some(addr.to_string())
+				} else {
+					Some(format!("Id({})", addr))
+				},
+			);
+		}
+		if cli.confirm("Would you like to use a proxy for registration? This is considered a best practice.").interact()? {
+			cli.info("Enter the account that the proxy will make a call on behalf of.")?;
+			let address = prompt_for_param(cli, &proxy.params[0])?;
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: https://github.com/r0gue-io/pop-cli/pull/427/commits/8897f2ab54b9a60ea6b182e3d118e727aee377a5
created_at: 2025-03-05T13:07:04Z
author_association: MEMBER
diff_hunk: @@ -154,14 +191,17 @@ async fn reserve(chain: &Chain, cli: &mut impl Cli) -> Result<u32> {
 }
 
 // Prepares and returns the encoded call data for reserving an ID.
-fn prepare_reserve_call_data(chain: &Chain, cli: &mut impl Cli) -> Result<Vec<u8>> {
+fn prepare_reserve_call_data(chain: &Chain, proxy: &Proxy, cli: &mut impl Cli) -> Result<Vec<u8>> {
 	let dispatchable = find_dispatchable_by_name(
 		&chain.pallets,
 		Action::Reserve.pallet_name(),
 		Action::Reserve.function_name(),
 	)?;
-	let xt = Call { function: dispatchable.clone(), use_wallet: true, ..Default::default() }
+	let mut xt = Call { function: dispatchable.clone(), use_wallet: true, ..Default::default() }
 		.prepare_extrinsic(&chain.client, cli)?;
+	if let Some(addr) = proxy {
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: Agreed! The logic for using a proxy can be added in the `pop call`, just like we do with `sudo`, but it would require more changes in `pop call`. I feel it's out of scope for this PR, I can create an Issue.
created_at: 2025-03-05T13:38:37Z
author_association: MEMBER
diff_hunk: @@ -223,6 +266,70 @@ mod tests {
 		assert_eq!(chain_config.genesis_code, genesis_code);
 		assert_eq!(chain_config.genesis_state, genesis_state);
 		assert_eq!(chain_config.chain.url, Url::parse(POLKADOT_NETWORK_URL)?);
+		assert_eq!(
+			chain_config.proxy,
+			Some("Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)".to_string())
+		);
+		cli.verify()
+	}
+
+	#[tokio::test]
+	async fn resolve_proxied_address_works() -> Result<()> {
+		let mut cli = MockCli::new()
+			.expect_confirm("Would you like to use a proxy for registration? This is considered a best practice.", true)
+			.expect_info("Enter the account that the proxy will make a call on behalf of.")
+			.expect_select(
+				"Select the value for the parameter: real",
+				Some(true),
+				true,
+				Some(
+					[
+						("Id".to_string(), "".to_string()),
+						("Index".to_string(), "".to_string()),
+						("Raw".to_string(), "".to_string()),
+						("Address32".to_string(), "".to_string()),
+						("Address20".to_string(), "".to_string()),
+					]
+					.to_vec(),
+				),
+				0, // "Id" action
+			)
+			.expect_input(
+				"Enter the value for the parameter: Id",
+				"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty".into(),
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: https://github.com/r0gue-io/pop-cli/pull/427/commits/8897f2ab54b9a60ea6b182e3d118e727aee377a5

created_at: 2025-03-05T13:43:41Z
author_association: MEMBER
diff_hunk: @@ -214,6 +254,9 @@ mod tests {
 			id: Some(2000),
 			genesis_state: Some(genesis_state.clone()),
 			genesis_code: Some(genesis_code.clone()),
+			proxied_address: Some(
+				"Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)".to_string(),
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: https://github.com/r0gue-io/pop-cli/pull/427/commits/8897f2ab54b9a60ea6b182e3d118e727aee377a5
created_at: 2025-03-05T13:43:44Z
author_association: MEMBER
diff_hunk: @@ -223,6 +266,70 @@ mod tests {
 		assert_eq!(chain_config.genesis_code, genesis_code);
 		assert_eq!(chain_config.genesis_state, genesis_state);
 		assert_eq!(chain_config.chain.url, Url::parse(POLKADOT_NETWORK_URL)?);
+		assert_eq!(
+			chain_config.proxy,
+			Some("Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)".to_string())
+		);
+		cli.verify()
+	}
+
+	#[tokio::test]
+	async fn resolve_proxied_address_works() -> Result<()> {
+		let mut cli = MockCli::new()
+			.expect_confirm("Would you like to use a proxy for registration? This is considered a best practice.", true)
+			.expect_info("Enter the account that the proxy will make a call on behalf of.")
+			.expect_select(
+				"Select the value for the parameter: real",
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: Based on the conversation we had, modified it to use a custom prompt for the proxy instead of a generic one, prompting only for the string and validating is an address: https://github.com/r0gue-io/pop-cli/pull/427/commits/51a4de943ecdbbb99eaaa13ecc9ac3717eb424a8
created_at: 2025-03-05T13:44:31Z
author_association: MEMBER
diff_hunk: @@ -37,6 +41,12 @@ pub struct UpCommand {
 	/// Websocket endpoint of the relay chain.
 	#[arg(long)]
 	pub(crate) relay_chain_url: Option<Url>,
+	/// Proxied address. Your account must be registered as a proxy which can act on behalf of this
+	/// account.  You can specify the MultiAddress type explicitly, e.g.,
+	/// `Id(5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)`. If no type is provided, it
+	/// defaults to `Id()`.
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: As explained in the message below, I don't see the reason of using `Polkadot`. The reason for using `Id` is that it corresponds to the [MultiAddress enum](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/runtime/src/multiaddress.rs#L35).
created_at: 2025-03-05T13:45:51Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-3.0
path: crates/pop-common/src/account_id.rs
user: login: AlexD10S
body: This function + tests where in the `pop-contracts` crate now is used in chain functionality had to be moved into `pop-common`
created_at: 2025-03-06T10:12:59Z
author_association: MEMBER
diff_hunk: @@ -30,7 +30,7 @@ pub use up::{
 };
path: crates/pop-contracts/src/lib.rs
user: login: AlexD10S
body: The changes in the `pop-contracts` files are only for the moving of `parse_account` into the common crate.
created_at: 2025-03-06T10:19:51Z
author_association: MEMBER
diff_hunk: @@ -154,14 +191,17 @@ async fn reserve(chain: &Chain, cli: &mut impl Cli) -> Result<u32> {
 }
 
 // Prepares and returns the encoded call data for reserving an ID.
-fn prepare_reserve_call_data(chain: &Chain, cli: &mut impl Cli) -> Result<Vec<u8>> {
+fn prepare_reserve_call_data(chain: &Chain, proxy: &Proxy, cli: &mut impl Cli) -> Result<Vec<u8>> {
 	let dispatchable = find_dispatchable_by_name(
 		&chain.pallets,
 		Action::Reserve.pallet_name(),
 		Action::Reserve.function_name(),
 	)?;
-	let xt = Call { function: dispatchable.clone(), use_wallet: true, ..Default::default() }
+	let mut xt = Call { function: dispatchable.clone(), use_wallet: true, ..Default::default() }
 		.prepare_extrinsic(&chain.client, cli)?;
+	if let Some(addr) = proxy {
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: Thank you! 
created_at: 2025-03-07T07:25:58Z
author_association: CONTRIBUTOR
diff_hunk: @@ -195,6 +224,19 @@ async fn generate_spec_files(
 	))
 }
 
+// Prompt the user to input an address and return it formatted as `Id(address)`
+fn prompt_for_proxy_address(cli: &mut impl Cli) -> Result<String> {
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: chungquantin
body: Love how this function is improved to provide a better UX 💪
created_at: 2025-03-07T07:36:14Z
author_association: CONTRIBUTOR
diff_hunk: @@ -14,6 +15,8 @@ pub use subxt::{Config, PolkadotConfig as DefaultConfig};
 pub use subxt_signer::sr25519::Keypair;
 pub use templates::extractor::extract_template_files;
 
+/// Module for parsing and handling account IDs.
path: crates/pop-common/src/lib.rs
user: login: chungquantin
body: Just a note that we should create a PR to resolve all the clippy warnings. Other public modules in the same file missing comments. 
created_at: 2025-03-07T07:40:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -236,11 +343,23 @@ mod tests {
 			&mut cli,
 		)
 		.await?;
-		let call_data = prepare_reserve_call_data(&chain, &mut cli)?;
+		let call_data = prepare_reserve_call_data(&chain, &None, &mut cli)?;
 		// Encoded call data for a reserve extrinsic.
 		// Reference: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.public.curie.radiumblock.co%2Fws#/extrinsics/decode/0x4605
 		let encoded_reserve_extrinsic: &str = "0x4605";
 		assert_eq!(call_data, decode_call_data(encoded_reserve_extrinsic)?);
+
+		// Ensure `prepare_reserve_call_data` works with a proxy.
+		let call_data = prepare_reserve_call_data(
+			&chain,
+			&Some("Id(13czcAAt6xgLwZ8k6ZpkrRL5V2pjKEui3v9gHAN9PoxYZDbf)".to_string()),
+			&mut cli,
+		)?;
+		// Encoded call data for a proxy extrinsic with reserve as the call.
+		// Reference: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.public.curie.radiumblock.co%2Fws#/extrinsics/decode/0x1d000073ebf9c947490b9170ea4fd3031ae039452e428531317f76bf0a02124f8166de004605
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: Daanvdplas
body: Yes but why don't we encode the value ourselves in the code in stead of copy pasting a value from a website :) ?
created_at: 2025-03-07T11:59:18Z
author_association: COLLABORATOR
diff_hunk: @@ -46,6 +46,33 @@ pub fn construct_sudo_extrinsic(xt: DynamicPayload) -> DynamicPayload {
 	subxt::dynamic::tx("Sudo", "sudo", [xt.into_value()].to_vec())
 }
 
+/// Constructs a Proxy call extrinsic.
+///
+/// # Arguments
+/// * `pallets`: List of pallets available within the chain's runtime.
+/// * `proxied_account` - The account on whose behalf the proxy will act.
+/// * `xt`: The extrinsic representing the dispatchable function call to be dispatched using the
+///   proxy.
+pub fn construct_proxy_extrinsic(
+	pallets: &[Pallet],
+	proxied_account: String,
+	xt: DynamicPayload,
+) -> Result<DynamicPayload, Error> {
+	let proxy_function = find_dispatchable_by_name(pallets, "Proxy", "proxy")?;
path: crates/pop-parachains/src/call/mod.rs
user: login: Daanvdplas
body: Got ya, it can differ based on the config of the chain. Thank you!
created_at: 2025-03-07T12:00:04Z
author_association: COLLABORATOR
diff_hunk: @@ -236,6 +236,32 @@ async fn generate_spec_files(
 	))
 }
 
+// Prompt the user to select the value of the variant parameter and the address.
+// Output example: `Id(5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY)` for the `Id` variant.
+fn prompt_for_proxy_address(cli: &mut impl Cli, param: &Param) -> Result<String> {
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: Daanvdplas
body: Unit test?
created_at: 2025-03-07T12:06:04Z
author_association: COLLABORATOR
diff_hunk: @@ -225,6 +270,37 @@ mod tests {
 		assert_eq!(chain_config.genesis_code, genesis_code);
 		assert_eq!(chain_config.genesis_state, genesis_state);
 		assert_eq!(chain_config.chain.url, Url::parse(POLKADOT_NETWORK_URL)?);
+		assert_eq!(chain_config.proxy, Some(format!("Id({})", MOCK_PROXIED_ADDRESS.to_string())));
+		cli.verify()
+	}
+
+	#[tokio::test]
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: Daanvdplas
body: Does this need to be a tokio / async test?
created_at: 2025-03-07T12:33:56Z
author_association: COLLABORATOR
diff_hunk: @@ -225,6 +270,37 @@ mod tests {
 		assert_eq!(chain_config.genesis_code, genesis_code);
 		assert_eq!(chain_config.genesis_state, genesis_state);
 		assert_eq!(chain_config.chain.url, Url::parse(POLKADOT_NETWORK_URL)?);
+		assert_eq!(chain_config.proxy, Some(format!("Id({})", MOCK_PROXIED_ADDRESS.to_string())));
+		cli.verify()
+	}
+
+	#[tokio::test]
path: crates/pop-cli/src/commands/up/rollup.rs
user: login: AlexD10S
body: True. https://github.com/r0gue-io/pop-cli/pull/427/commits/911ee99dd1b9727eefc727206d31c126abc4c808
created_at: 2025-03-07T13:24:39Z
author_association: MEMBER
diff_hunk: @@ -14,6 +15,8 @@ pub use subxt::{Config, PolkadotConfig as DefaultConfig};
 pub use subxt_signer::sr25519::Keypair;
 pub use templates::extractor::extract_template_files;
 
+/// Module for parsing and handling account IDs.
path: crates/pop-common/src/lib.rs
user: login: AlexD10S
body: 100% agree
created_at: 2025-03-07T13:26:12Z
author_association: MEMBER

PR comments:
user: login: codecov[bot]
created_at: 2025-02-26T20:58:20Z
body: ## [Codecov](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io) Report
Attention: Patch coverage is `82.27848%` with `28 lines` in your changes missing coverage. Please review.
> Project coverage is 75.38%. Comparing base [(`3ed1d83`)](https://app.codecov.io/gh/r0gue-io/pop-cli/commit/3ed1d833bb070387a2e6f56a5e10817b21064675?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io) to head [(`f18de68`)](https://app.codecov.io/gh/r0gue-io/pop-cli/commit/f18de68e93111b9f14bde797ec587825157f3696?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io).

| [Files with missing lines](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io) | Patch % | Lines |
|---|---|---|
| [crates/pop-cli/src/commands/up/rollup.rs](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?src=pr&el=tree&filepath=crates%2Fpop-cli%2Fsrc%2Fcommands%2Fup%2Frollup.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io#diff-Y3JhdGVzL3BvcC1jbGkvc3JjL2NvbW1hbmRzL3VwL3JvbGx1cC5ycw==) | 83.87% | [0 Missing and 20 partials :warning: ](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io) |
| [crates/pop-parachains/src/call/mod.rs](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?src=pr&el=tree&filepath=crates%2Fpop-parachains%2Fsrc%2Fcall%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io#diff-Y3JhdGVzL3BvcC1wYXJhY2hhaW5zL3NyYy9jYWxsL21vZC5ycw==) | 75.75% | [0 Missing and 8 partials :warning: ](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io) |

```diff
@@                      Coverage Diff                      @@
##           feat/pop-up-for-parachain     #427      +/-   ##
=============================================================
+ Coverage                      75.32%   75.38%   +0.06%     
=============================================================
  Files                             66       66              
  Lines                          14398    14542     +144     
  Branches                       14398    14542     +144     
=============================================================
+ Hits                           10845    10963     +118     
  Misses                          2148     2148              
- Partials                        1405     1431      +26     
```

| [Files with missing lines](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io) | Coverage Δ | |
|---|---|---|
| [crates/pop-cli/src/commands/call/chain.rs](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?src=pr&el=tree&filepath=crates%2Fpop-cli%2Fsrc%2Fcommands%2Fcall%2Fchain.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io#diff-Y3JhdGVzL3BvcC1jbGkvc3JjL2NvbW1hbmRzL2NhbGwvY2hhaW4ucnM=) | `76.47% <100.00%> (ø)` | |
| [crates/pop-parachains/src/call/metadata/mod.rs](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?src=pr&el=tree&filepath=crates%2Fpop-parachains%2Fsrc%2Fcall%2Fmetadata%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io#diff-Y3JhdGVzL3BvcC1wYXJhY2hhaW5zL3NyYy9jYWxsL21ldGFkYXRhL21vZC5ycw==) | `93.11% <ø> (-0.04%)` | :arrow_down: |
| [crates/pop-parachains/src/call/mod.rs](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?src=pr&el=tree&filepath=crates%2Fpop-parachains%2Fsrc%2Fcall%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io#diff-Y3JhdGVzL3BvcC1wYXJhY2hhaW5zL3NyYy9jYWxsL21vZC5ycw==) | `61.50% <75.75%> (+2.81%)` | :arrow_up: |
| [crates/pop-cli/src/commands/up/rollup.rs](https://app.codecov.io/gh/r0gue-io/pop-cli/pull/427?src=pr&el=tree&filepath=crates%2Fpop-cli%2Fsrc%2Fcommands%2Fup%2Frollup.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=r0gue-io#diff-Y3JhdGVzL3BvcC1jbGkvc3JjL2NvbW1hbmRzL3VwL3JvbGx1cC5ycw==) | `71.96% <83.87%> (+5.72%)` | :arrow_up: |

author_association: NONE
user: login: AlexD10S
created_at: 2025-03-05T10:21:43Z
body: > `What type of address do you want to use?` `Enter your address`
> 
> `Id` is also too vague for me, if we can, can we rename this to Polkadot address or something.

The reason it looks is because  we retrieve the proxy metadata from the specific chain the user selects. This approach is more generic compared to hardcoding exactly what we need.

The reason for using `Id` is that it corresponds to the [MultiAddress enum](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/runtime/src/multiaddress.rs#L35).

PolkadotJS follows the same approach.
![Captura de pantalla 2025-03-05 a las 11 12 46](https://github.com/user-attachments/assets/625e1511-1728-4941-b08a-5baceea9a642)

Frank suggested [adding a more informative message before this](https://github.com/r0gue-io/pop-cli/pull/427#discussion_r1975579879 ), so I updated it to: 'Enter the account that the proxy will act on behalf of when making a call.'  Maybe we can add more info in the message?

**Edit:** After Tin pointed out the same issue with the confusion, modified it to use a custom prompt for the proxy instead of a generic one, prompting only for the string and validating is an address: https://github.com/r0gue-io/pop-cli/pull/427/commits/51a4de943ecdbbb99eaaa13ecc9ac3717eb424a8
author_association: MEMBER
user: login: chungquantin
created_at: 2025-03-05T10:34:18Z
body: <img width="752" alt="Screenshot 2025-03-05 at 17 33 16" src="https://github.com/user-attachments/assets/02df5365-2472-4ba9-abf3-88b0321c0dfe" />

PR description needs to be updated
author_association: CONTRIBUTOR
user: login: Daanvdplas
created_at: 2025-03-07T12:49:28Z
body: DQ: what is the `crates/pop-cli/src/assets/index.html` for?
author_association: COLLABORATOR
user: login: AlexD10S
created_at: 2025-03-07T12:58:07Z
body: > DQ: what is the `crates/pop-cli/src/assets/index.html` for?

This was introduced in the wallet signing feature to open a UI for signing via the wallet. In this PR, the only modification is in the UI to display a proxy call clearly.
This was approved in the `wallet_signing` portal repo: https://github.com/r0gue-io/pop-wallet-signing-portal/pull/7. The explanation was originally in a comment inside the code but seems to have been lost after all the changes. Next time, I'll make sure to include it in the PR description instead.

author_association: MEMBER