From 0bb6d54372e8eff9d22bc8937fb8edc77600ab88 Mon Sep 17 00:00:00 2001 From: Chris Leech Date: Tue, 11 Jun 2024 19:53:11 -0700 Subject: [PATCH] Updates --- ...{index-DeT4Dv66.css => index-D-v3YpWY.css} | 2 +- assets/index-D2Y2hPdq.js | 199 ------------------ assets/index-DAy2HQFx.js | 199 ++++++++++++++++++ index.html | 4 +- sw.js | 2 +- 5 files changed, 203 insertions(+), 203 deletions(-) rename assets/{index-DeT4Dv66.css => index-D-v3YpWY.css} (61%) delete mode 100644 assets/index-D2Y2hPdq.js create mode 100644 assets/index-DAy2HQFx.js diff --git a/assets/index-DeT4Dv66.css b/assets/index-D-v3YpWY.css similarity index 61% rename from assets/index-DeT4Dv66.css rename to assets/index-D-v3YpWY.css index d284bf4..2721de8 100644 --- a/assets/index-DeT4Dv66.css +++ b/assets/index-D-v3YpWY.css @@ -1 +1 @@ -html,body{height:100%}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}#root,.App{display:flex;flex-direction:column;height:100%}.dice-bin-10,.dice-bin-9{background-color:#39653b66}.dice-bin-8{background-color:#4e933966}.dice-bin-7{background-color:#8ea32d66}.dice-bin-6{background-color:#cdb32066}.dice-bin-5{background-color:#dc9b2566}.dice-bin-4{background-color:#ea832966}.dice-bin-3{background-color:#ce1f2755}.dice-bin-2{background-color:#76151e66}.dice-bin-1{background-color:#4a1b2066}.dice-bin-0{background-color:#1d202266}.gbicon{display:inline-block;width:1em;height:1em;stroke-width:0;stroke:currentcolor;fill:currentcolor}.gbicon-ballotX{width:1.0771em}.gbicon-checkmark{width:1.0527em}.gbicon-skull{width:.8838em}.gbicon-bandage{width:.5166em}.gbicon-Alchemists{color:#4e9339}.gbicon-Blacksmiths{color:#82969f}.gbicon-Brewers{color:#cdb320}.gbicon-Butchers{color:#ce1f27}.gbicon-Cooks{color:#eb2629}.gbicon-Engineers{color:#76151e}.gbicon-Falconers{width:1.3125em;color:#39653b}.gbicon-Farmers{color:#ea8329}.gbicon-Fishermen{color:#50b8c8}.gbicon-Hunters{color:#39653b}.gbicon-Masons{color:#416abb}.gbicon-Miners{color:#76151e}.gbicon-Morticians{color:#1d2022}.gbicon-Morticians.dark{color:#e2dfdd}.gbicon-Navigators{color:#50b8c8}.gbicon-Order{color:#ebed1a;filter:drop-shadow(0 0 .04em rgba(91,37,127,80%)) drop-shadow(0 0 .02em rgba(91,37,127,50%))}.gbicon-Order.dark{filter:unset}.gbicon-Order-GBCP{color:#5b257f}.gbicon-Ratcatchers{color:#1d2022}.gbicon-Ratcatchers.dark{color:#e2dfdd}.gbicon-Shepherds{color:#de7523}.gbicon-Union{color:#5b257f}.gbicon-Lamplighters{color:#00994a}.gbicon-GBT{width:.96em}.pbicon{display:inline-block;height:.4em;width:1em;min-height:.2em;stroke-width:0;stroke:none;fill:currentcolor}.pbicon-CP,.pbicon-CP-gbcp{height:.7em;min-height:.3em;min-width:.3em;flex-shrink:2}.pbicon-CP2,.pbicon-CP2-gbcp{height:.6em;min-height:.3em;min-width:.3em;flex-shrink:2}.fabAnimate{--offset: 5px;position:relative;overflow:hidden}.fabAnimate:before{content:"";background:conic-gradient(transparent,darkred 280deg,transparent);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);aspect-ratio:1;width:100%;animation:rotate 2s linear infinite}.fabAnimate:after{content:"";background:inherit;border-radius:inherit;position:absolute;inset:var(--offset);height:calc(100% - 2 * var(--offset));width:calc(100% - 2 * var(--offset))}@keyframes rotate{0%{transform:translate(-50%,-50%) scale(1.4) rotate(0)}to{transform:translate(-50%,-50%) scale(1.4) rotate(1turn)}}.btn{z-index:unset;border:2px solid #000000aa}.btn:before{content:"";background:linear-gradient(124deg,#f000,red 40% 60%,#f000);position:absolute;background-size:400%;z-index:-1;filter:blur(.5em);width:calc(100% + .4em);height:calc(100% + .4em);animation:glowing 20s linear infinite;border-radius:50%}@keyframes glowing{0%{background-position:0 0}50%{background-position:400% 0}to{background-position:0 0}}.DraftScreen{display:grid;overflow:visible;margin:auto}@media (orientation: portrait){.DraftScreen{grid-template-columns:1fr auto 1fr;justify-items:center}.DraftScreen>*{grid-column:2}}@media (orientation: landscape){.DraftScreen{grid-template-rows:1fr auto 1fr;align-items:center}.DraftScreen>*{grid-row:2}}.card-front,.card-back{all:initial;position:relative;overflow:hidden;--line-width: 1px;image-rendering:crisp-edges;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}@-moz-document url-prefix(){.card-front,.card-back{--line-width: calc(1px / var(--scale))}@media print{.card-front,.card-back{--line-width: 1px}}}div.card-front{width:100%;aspect-ratio:5 / 7;max-width:500px;max-height:700px;border-radius:calc(25px * var(--scale));background-size:110% auto;background-repeat:no-repeat;background-position:center center;display:inline-flex;align-items:center;justify-content:center}div.card-front>.overlay{position:absolute;top:0;left:0;width:500px;height:700px;transform-origin:top left;transform:scale(var(--scale))}div.card-front.bleed{background-size:auto 100%}div.card-front.bleed.double{background-position:left}div.card-front.bleed>.overlay{top:calc(25px * var(--scale));left:calc(25px * var(--scale))}div.card-front.gbcp{background-position:right;background-size:100% 100%}div.card-front.gbcp.bleed{background-position:center center;background-size:calc(100% - 25px) calc(100% - 25px);background-color:var(--mom-color, var(--team-color))}div.card-front.gbcp.bleed.double{background-position:right;background-size:calc(100% - 12.5px) calc(100% - 25px);background-color:var(--mom-color, var(--team-color))}.card-front .name-plate{position:absolute;top:15px;left:0;width:310px;height:67px;display:flex;flex-direction:row;padding-left:20px;padding-top:7px}.card-front.gbcp .font-top-box{border:2px solid black;border-radius:5px;position:absolute;top:17px;left:12px;width:376px;height:132px;background-color:var(--gbcp-color);z-index:-2}.card-front.gbcp .name-plate{top:2px;left:0;padding:0;width:100%}.card-front .name-plate .guild-icon{position:relative;width:65px;height:65px;font-size:65px;display:flex;overflow:visible;align-items:center;justify-content:center}.card-front .name-plate .guild-icon svg{flex-shrink:0}.card-front .name-plate>.name-plate-right{position:relative;overflow:visible;display:flex;width:100%;flex-direction:column}.card-front .name-plate-right>.name{display:flex;font-family:IM Fell Great Primer SC,serif;font-weight:400;font-size:40px;letter-spacing:-.05em;margin-top:-8px;line-height:50px}.card-front.gbcp .name-plate-right>.name{font-family:IM Fell Great Primer,serif}.dropcap{white-space:pre-wrap}.dropcap span{display:inline-block}.dropcap span:first-letter{float:left;padding-top:.075em}@-moz-document url-prefix(){.dropcap span:first-letter{float:unset;padding:inherit}}.card-front .name-plate-right>.reach{position:absolute;bottom:0;width:230px;font-family:Crimson Text,serif;font-size:21px;border-top:var(--line-width) solid black;border-image-source:linear-gradient(to left,transparent,black 150px);border-image-slice:1 0 0 0;text-align:left}.card-front.gbcp .name-plate-right>.reach{width:310px}.card-front .statbox{position:absolute;top:105px;left:24px;width:293px;display:grid;grid-template-columns:repeat(6,1fr);font-family:Crimson Text,serif;font-weight:400;font-size:20px;letter-spacing:-1px;text-align:center}.card-front.gbcp .statbox{top:unset;bottom:0;left:0;margin:0;padding:0 5px 2px;width:calc(100% - 10px);font-size:24px}.card-front .statbox>:nth-child(-n+6){border-bottom:var(--line-width) solid black}.card-front .statbox>:not(:nth-child(6n+1)){border-left:var(--line-width) solid black}.card-front .playbook{position:absolute;top:167px;left:24px;display:grid;grid-template-columns:repeat(7,1fr);gap:7px;font-size:44px}.card-front.gbcp .playbook{top:158px;left:13px;gap:3px}.card-front .playbook-result{width:45px;height:45px;border-radius:45px;box-sizing:border-box;border:2px solid black;background-color:#fff;display:flex;align-items:center;justify-content:center}.card-front .playbook-result svg{fill:#000}.card-front .playbook-result.momentus{border-color:var(--mom-border-color, black);background-color:var(--mom-color, var(--team-color))}.card-front .playbook-result.momentus svg{fill:#fff}.card-front .playbook-result.spacer{border:none;background-color:transparent}.card-front .character-plays{position:absolute;top:272px;width:390px;padding:5px 0 0 24px;display:grid;grid-template-columns:232px repeat(4,1fr);align-items:flex-end;text-align:center;font-family:Crimson Text,serif;font-weight:400;font-size:20px}.card-front.card-front.gbcp .character-plays-wrapper{position:absolute;top:256px;left:13px;width:373px;height:318px;border:2px solid black;border-radius:5px;background-color:var(--gbcp-color);z-index:-2}.card-front.gbcp .character-plays{position:static;width:calc(100% - 10px);margin:0;padding:1px 3px 0 7px;grid-template-columns:216px repeat(4,1fr);font-family:unset;font-size:18px}.card-front .character-plays>:nth-child(-n+5){padding:2px;border-bottom:var(--line-width) solid black;border-left:var(--line-width) solid black;letter-spacing:-1px}.card-front .character-plays>:first-child{font-family:IM Fell Great Primer SC,serif;font-weight:400;font-size:28px;line-height:1em;text-align:left;padding:0;border-left:none}.card-front .character-plays .name{font-family:Crimson Text,serif;font-size:20px;white-space:nowrap;text-align:left}.card-front .character-plays .name>span:first-child{font-weight:800;font-style:italic}.card-front .character-plays .name>span:nth-child(2){font-weight:600;font-size:19px;letter-spacing:-1px}.card-front .character-plays .text{grid-column-end:span 5;font-family:Crimson Text,serif;font-size:21px;line-height:22px;text-align:left;white-space:pre-wrap;padding-bottom:5px;letter-spacing:-1px}.card-front .health{position:absolute;bottom:22px;left:24px;display:grid;grid-template-columns:repeat(10,1fr);gap:2px 5.3px}.card-front.gbcp .health{bottom:unset;top:calc(100% - 109px);left:10px;grid-template-columns:repeat(4,1fr) 1.5fr repeat(5,1fr);gap:5.5px 4.8px;filter:drop-shadow(0 0 5px black)}.card-front .health-box{width:25px;height:25px;border-radius:25px;box-sizing:border-box;border:var(--line-width) solid black;background-color:#fff;display:flex;align-items:center;justify-content:center;text-align:center;line-height:23px;font-family:Crimson Text,serif;font-weight:600;color:var(--mom-color, var(--team-color))}.card-front.gbcp .health-box{width:32px;height:32px;border-radius:32px;font-size:23px;filter:drop-shadow(0 0 5px black)}.card-front .health-box.damaged{color:#000;background-color:#8b0000}.Smoke .character-plays .text,.Skatha.lang-fr .character-plays .text{font-size:20px;line-height:21px}.Harry.card-front .name-plate-right>.name{font-size:36px}.vHarriet.card-front .name-plate-right>.name{font-size:32px}.Compound .playbook-result.momentus{background-image:linear-gradient(to right,var(--guild1-color) calc((1 - var(--col)) * 100%),var(--guild2-color) calc((5 - var(--col)) * 100%))}.Lucky .playbook-result.momentus{background-image:linear-gradient(to right,var(--guild2-color) calc((0 - var(--col)) * 100%),var(--guild1-color) calc((4 - var(--col)) * 100%))}.Lucky .gbcp .health-box{color:var(--guild2-color)}.Compound .guild-icon{content:url(/assets/compound-DlF-jmUs.svg)}.Lucky .guild-icon{content:url(/assets/lucky-n3AjGPzo.svg)}.Flea.gbcp .character-plays div.name:nth-of-type(3)>span:nth-child(2):before{color:"red";content:"\a";white-space:pre}.card-front:not(.nofun) .playbook-result.momentus{--rainbow: repeating-linear-gradient(60deg, #adfbda calc((0 - var(--col)) * 100%), #35c3ff calc((7/5 - var(--col)) * 100%), #fda399 calc((14/5 - var(--col)) * 100%), #76d880 calc((21/5 - var(--col)) * 100%), #ebf38b calc((28/5 - var(--col)) * 100%), #adfbda calc((7 - var(--col)) * 100%) );background-image:var(--rainbow)!important;border-color:#000!important}.card-front:not(.nofun) .playbook-result.momentus svg{fill:#000!important}div.card-back{width:100%;aspect-ratio:5 / 7;max-width:500px;max-height:700px;border-radius:calc(25px * var(--scale));background-size:110%;background-repeat:no-repeat;background-position:center center;display:inline-flex;align-items:center;justify-content:center}div.card-back .overlay{position:absolute;top:0;right:0;width:500px;height:700px;transform-origin:top right;transform:scale(var(--scale))}div.card-back.bleed{background-size:auto 100%}div.card-back.bleed.double{background-position:right}div.card-back.bleed>.overlay{top:calc(25px * var(--scale));right:calc(25px * var(--scale))}div.card-back.gbcp{background-position:left;background-size:100% 100%}div.card-back.gbcp.bleed{background-position:center center;background-size:calc(100% - 25px) calc(100% - 25px);background-color:var(--mom-color, var(--team-color))}div.card-back.gbcp.bleed.double{background-position:left;background-size:calc(100% - 12.5px) calc(100% - 25px);background-color:var(--mom-color, var(--team-color))}.card-back .container{position:absolute;top:20px;width:100%;height:565px;box-sizing:border-box;padding-left:24px;padding-top:3px;padding-right:24px;display:flex;flex-direction:column}.card-back.gbcp .container{position:absolute;top:16px;margin-left:91px;margin-right:9px;width:unset;height:unset;min-height:565px;padding:5px 4px 0;border:2px solid black;border-radius:5px;background-color:var(--gbcp-color);z-index:-2}.card-back .name-plate{display:flex;flex-direction:row;width:100%}.card-back.gbcp .name-plate{display:none}.card-back .name-plate .guild-icon{width:45px;height:45px;font-size:45px;display:flex;overflow:visible;align-items:center;justify-content:center}.card-back .name-plate .guild-icon svg{flex-shrink:0}.card-back .name-plate .name{display:flex;font-family:IM Fell Great Primer SC,serif;font-weight:400;font-size:40px;letter-spacing:-.05em;border-bottom:var(--line-width) solid black;border-image-source:linear-gradient(to left,transparent,black 150px);border-image-slice:0 0 1 0;width:100%;line-height:1em}.card-back .header{text-align:left;font-family:IM Fell Great Primer SC,serif;font-size:34px;letter-spacing:-.02em;border-bottom:var(--line-width) solid black;border-image-source:linear-gradient(to left,transparent,black 150px);border-image-slice:0 0 1 0;line-height:1em}.card-back .character-trait{text-align:left}.card-back .character-trait .trait{font-family:Crimson Text,serif;font-weight:800;font-style:italic;font-size:21px}.card-back .character-trait .trait.active>:before{content:"◉ ";font-style:normal;font-weight:400;font-family:"Noto Sans Symbols 2",sans-serif}.card-back .character-trait .trait>:first-child>:nth-child(2){font-family:Crimson Text,serif;font-weight:600;font-style:normal;font-size:21px;letter-spacing:-1px}.card-back .character-trait .text{font-family:Crimson Text,serif;font-size:21px;line-height:22px;text-align:left;white-space:pre-wrap;margin-bottom:.25em}.card-back :is(.legendary,.heroic){font-family:Crimson Text,serif;font-size:21px;line-height:22px;text-align:left;white-space:pre-wrap}.card-back :is(.heroic,.legendary)>:first-child>:first-child{font-family:Crimson Text,serif;font-weight:800;font-style:italic;font-size:21px}.card-back :is(.legendary,.heroic)>:first-child>:nth-child(2){font-family:Crimson Text,serif;font-weight:600;font-style:normal;font-size:21px;letter-spacing:-1px}.card-back .footer{position:absolute;top:595px;width:100%;height:60px;box-sizing:border-box;padding-left:24px;padding-right:24px;display:flex;flex-direction:row;justify-content:space-between}.card-back.gbcp .footer{position:absolute;inset:612px 9px 16px 91px;height:unset;width:unset;padding:0 4px;border:2px solid black;border-radius:5px;background-color:var(--gbcp-color);z-index:-2}.card-back .footer .tags{font-family:Crimson Text,serif;font-weight:400;font-size:21px;line-height:20px;text-align:left;white-space:pre-wrap}.card-back .footer .right{display:flex;flex-direction:column}.card-back .footer .icons{display:flex;flex-direction:row-reverse;align-items:right;justify-content:right}.card-back .footer .icons .wrapper{font-size:44px;width:1em;height:1em;padding:.0625em;box-sizing:border-box;background-clip:content-box;background-color:#fff;border-radius:50%;overflow:visible;display:flex;place-content:center;place-items:center}.card-back.gbcp .footer .icons .wrapper{background-color:transparent}.card-back .footer .icons svg{flex-shrink:0}.card-back .footer .base-size{font-family:Crimson Text,serif;font-weight:400;font-size:21px;line-height:20px;text-align:right}.Nightlight .character-trait .text{font-size:20px;line-height:20px}.flip-card{display:block;background-color:transparent;width:100%;max-width:500px;aspect-ratio:5/7;perspective:1500px}.flip-card-inner{position:relative;width:100%;height:100%;-webkit-transition:transform .8s;transition:transform .8s;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.flip-card.flipped .flip-card-inner{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.flip-card-front,.flip-card-back{position:absolute;top:0;left:0;width:100%;height:100%;backface-visibility:hidden;-webkit-backface-visibility:hidden}.flip-card-back{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}@font-face{font-family:swiper-icons;src:url(data:application/font-woff;charset=utf-8;base64,\ d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA);font-weight:400;font-style:normal}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.controls{display:flex;flex-direction:column}.guild{box-sizing:initial;display:inline-flex;justify-content:space-between;background-image:linear-gradient(to right,transparent 1em,black 1em,var(--color) 3em,var(--color) 9em,black calc(100% - 1em),transparent calc(100% - 1em));text-shadow:.1em .1em .1em black}.guild:after{width:.25em;border-left:.75em solid black;border-top:1em solid transparent;border-bottom:1em solid transparent;display:inline-block;content:"";margin:0;padding:0}.guild svg{filter:drop-shadow(0px 0px 2px black)}.Cards{display:block}.Cards .card{display:inline-block;box-sizing:content-box;break-inside:avoid;border:thin solid black;margin:.0625in}.hide{display:none!important}.model-list-container{display:flex;flex-wrap:wrap;justify-content:center;align-content:flex-start}.model-checkbox{margin:.25em;padding-right:.5em;text-shadow:.1em .1em .1em black;background-image:linear-gradient(to right,var(--color1) 10%,var(--color2) 90%)}.model-checkbox .MuiCheckbox-root{padding:.25em}.model-checkbox{order:var(--major-order)}.model-checkbox.minor{order:var(--minor-order)}.model-checkbox:is(.Compound,.Lucky){order:calc(var(--major-order) + 1)}@media screen{main{overflow:hidden}.Cards{overflow-y:auto}}@media print{@page{size:auto;margin:.25in}.no-print{display:none!important}header{display:none!important}.Cards{padding:0!important}.Cards>.card{display:inline-block;break-inside:avoid;page-break-inside:avoid;margin:.0625in;border:none}.MuiTooltip-popper{display:none!important}} +html,body{height:100%}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}#root,.App{display:flex;flex-direction:column;height:100%}.dice-bin-10,.dice-bin-9{background-color:#39653b66}.dice-bin-8{background-color:#4e933966}.dice-bin-7{background-color:#8ea32d66}.dice-bin-6{background-color:#cdb32066}.dice-bin-5{background-color:#dc9b2566}.dice-bin-4{background-color:#ea832966}.dice-bin-3{background-color:#ce1f2755}.dice-bin-2{background-color:#76151e66}.dice-bin-1{background-color:#4a1b2066}.dice-bin-0{background-color:#1d202266}.gbicon{display:inline-block;width:1em;height:1em;stroke-width:0;stroke:currentcolor;fill:currentcolor}.gbicon-ballotX{width:1.0771em}.gbicon-checkmark{width:1.0527em}.gbicon-skull{width:.8838em}.gbicon-bandage{width:.5166em}.gbicon-Alchemists{color:#4e9339}.gbicon-Blacksmiths{color:#82969f}.gbicon-Brewers{color:#cdb320}.gbicon-Butchers{color:#ce1f27}.gbicon-Cooks{color:#eb2629}.gbicon-Engineers{color:#76151e}.gbicon-Falconers{width:1.3125em;color:#39653b}.gbicon-Farmers{color:#ea8329}.gbicon-Fishermen{color:#50b8c8}.gbicon-Hunters{color:#39653b}.gbicon-Masons{color:#416abb}.gbicon-Miners{color:#76151e}.gbicon-Morticians{color:#1d2022}.gbicon-Morticians.dark{color:#e2dfdd}.gbicon-Navigators{color:#50b8c8}.gbicon-Order{color:#ebed1a;filter:drop-shadow(0 0 .04em rgba(91,37,127,80%)) drop-shadow(0 0 .02em rgba(91,37,127,50%))}.gbicon-Order.dark{filter:unset}.gbicon-Order-GBCP{color:#5b257f}.gbicon-Ratcatchers{color:#1d2022}.gbicon-Ratcatchers.dark{color:#e2dfdd}.gbicon-Shepherds{color:#de7523}.gbicon-Union{color:#5b257f}.gbicon-Lamplighters{color:#00994a}.gbicon-GBT{width:.96em}.pbicon{display:inline-block;height:.4em;width:1em;min-height:.2em;stroke-width:0;stroke:none;fill:currentcolor}.pbicon-CP,.pbicon-CP-gbcp{height:.7em;min-height:.3em;min-width:.3em;flex-shrink:2}.pbicon-CP2,.pbicon-CP2-gbcp{height:.6em;min-height:.3em;min-width:.3em;flex-shrink:2}.fabAnimate{--offset: 5px;position:relative;overflow:hidden}.fabAnimate:before{content:"";background:conic-gradient(transparent,darkred 280deg,transparent);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);aspect-ratio:1;width:100%;animation:rotate 2s linear infinite}.fabAnimate:after{content:"";background:inherit;border-radius:inherit;position:absolute;inset:var(--offset);height:calc(100% - 2 * var(--offset));width:calc(100% - 2 * var(--offset))}@keyframes rotate{0%{transform:translate(-50%,-50%) scale(1.4) rotate(0)}to{transform:translate(-50%,-50%) scale(1.4) rotate(1turn)}}.btn{z-index:unset;border:2px solid #000000aa}.btn:before{content:"";background:linear-gradient(124deg,#f000,red 40% 60%,#f000);position:absolute;background-size:400%;z-index:-1;filter:blur(.5em);width:calc(100% + .4em);height:calc(100% + .4em);animation:glowing 20s linear infinite;border-radius:50%}@keyframes glowing{0%{background-position:0 0}50%{background-position:400% 0}to{background-position:0 0}}.DraftScreen{display:grid;overflow:visible;margin:auto}@media (orientation: portrait){.DraftScreen{grid-template-columns:1fr auto 1fr;justify-items:center}.DraftScreen>*{grid-column:2}}@media (orientation: landscape){.DraftScreen{grid-template-rows:1fr auto 1fr;align-items:center}.DraftScreen>*{grid-row:2}}.card-front,.card-back{all:initial;position:relative;overflow:hidden;--line-width: 1px;image-rendering:crisp-edges;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}@-moz-document url-prefix(){.card-front,.card-back{--line-width: calc(1px / var(--scale))}@media print{.card-front,.card-back{--line-width: 1px}}}div.card-front{width:100%;aspect-ratio:5 / 7;max-width:500px;max-height:700px;border-radius:calc(25px * var(--scale));background-size:110% auto;background-repeat:no-repeat;background-position:center center;display:inline-flex;align-items:center;justify-content:center}div.card-front>.overlay{position:absolute;top:0;left:0;width:500px;height:700px;transform-origin:top left;transform:scale(var(--scale))}div.card-front.bleed{background-size:auto 100%}div.card-front.bleed.double{background-position:left}div.card-front.bleed>.overlay{top:calc(25px * var(--scale));left:calc(25px * var(--scale))}div.card-front.gbcp{background-position:right;background-size:100% 100%}div.card-front.gbcp.bleed{background-position:center center;background-size:calc(100% - 25px) calc(100% - 25px);background-color:var(--mom-color, var(--team-color))}div.card-front.gbcp.bleed.double{background-position:right;background-size:calc(100% - 12.5px) calc(100% - 25px);background-color:var(--mom-color, var(--team-color))}.card-front .name-plate{position:absolute;top:15px;left:0;width:310px;height:67px;display:flex;flex-direction:row;padding-left:20px;padding-top:7px}.card-front.gbcp .font-top-box{border:2px solid black;border-radius:5px;position:absolute;top:17px;left:12px;width:376px;height:132px;background-color:var(--gbcp-color);z-index:-2}.card-front.gbcp .name-plate{top:2px;left:0;padding:0;width:100%}.card-front .name-plate .guild-icon{position:relative;width:65px;height:65px;font-size:65px;display:flex;overflow:visible;align-items:center;justify-content:center}.card-front .name-plate .guild-icon svg{flex-shrink:0}.card-front .name-plate>.name-plate-right{position:relative;overflow:visible;display:flex;width:100%;flex-direction:column}.card-front .name-plate-right>.name{display:flex;font-family:IM Fell Great Primer SC,serif;font-weight:400;font-size:40px;letter-spacing:-.05em;margin-top:-8px;line-height:50px}.card-front.gbcp .name-plate-right>.name{font-family:IM Fell Great Primer,serif}.dropcap{white-space:pre-wrap}.dropcap span{display:inline-block}.dropcap span:first-letter{float:left;padding-top:.075em}@-moz-document url-prefix(){.dropcap span:first-letter{float:unset;padding:inherit}}.card-front .name-plate-right>.reach{position:absolute;bottom:0;width:230px;font-family:Crimson Text,serif;font-size:21px;border-top:var(--line-width) solid black;border-image-source:linear-gradient(to left,transparent,black 150px);border-image-slice:1 0 0 0;text-align:left}.card-front.gbcp .name-plate-right>.reach{width:310px}.card-front .statbox{position:absolute;top:105px;left:24px;width:293px;display:grid;grid-template-columns:repeat(6,1fr);font-family:Crimson Text,serif;font-weight:400;font-size:20px;letter-spacing:-1px;text-align:center}.card-front.gbcp .statbox{top:unset;bottom:0;left:0;margin:0;padding:0 5px 2px;width:calc(100% - 10px);font-size:24px}.card-front .statbox>:nth-child(-n+6){border-bottom:var(--line-width) solid black}.card-front .statbox>:not(:nth-child(6n+1)){border-left:var(--line-width) solid black}.card-front .playbook{position:absolute;top:167px;left:24px;display:grid;grid-template-columns:repeat(7,1fr);gap:7px;font-size:44px}.card-front.gbcp .playbook{top:158px;left:13px;gap:3px}.card-front .playbook-result{width:45px;height:45px;border-radius:45px;box-sizing:border-box;border:2px solid black;background-color:#fff;display:flex;align-items:center;justify-content:center}.card-front .playbook-result svg{fill:#000}.card-front .playbook-result.momentus{border-color:var(--mom-border-color, black);background-color:var(--mom-color, var(--team-color))}.card-front .playbook-result.momentus svg{fill:#fff}.card-front .playbook-result.spacer{border:none;background-color:transparent}.card-front .character-plays{position:absolute;top:272px;width:390px;padding:5px 0 0 24px;display:grid;grid-template-columns:232px repeat(4,1fr);align-items:flex-end;text-align:center;font-family:Crimson Text,serif;font-weight:400;font-size:20px}.card-front.card-front.gbcp .character-plays-wrapper{position:absolute;top:256px;left:13px;width:373px;height:318px;border:2px solid black;border-radius:5px;background-color:var(--gbcp-color);z-index:-2}.card-front.gbcp .character-plays{position:static;width:calc(100% - 10px);margin:0;padding:1px 3px 0 7px;grid-template-columns:216px repeat(4,1fr);font-family:unset;font-size:18px}.card-front .character-plays>:nth-child(-n+5){padding:2px;border-bottom:var(--line-width) solid black;border-left:var(--line-width) solid black;letter-spacing:-1px}.card-front .character-plays>:first-child{font-family:IM Fell Great Primer SC,serif;font-weight:400;font-size:28px;line-height:1em;text-align:left;padding:0;border-left:none}.card-front .character-plays .name{font-family:Crimson Text,serif;font-size:20px;white-space:nowrap;text-align:left}.card-front .character-plays .name>span:first-child{font-weight:800;font-style:italic}.card-front .character-plays .name>span:nth-child(2){font-weight:600;font-size:19px;letter-spacing:-1px}.card-front .character-plays .text{grid-column-end:span 5;font-family:Crimson Text,serif;font-size:21px;line-height:22px;text-align:left;white-space:pre-wrap;padding-bottom:5px;letter-spacing:-1px}.card-front .health{position:absolute;bottom:22px;left:24px;display:grid;grid-template-columns:repeat(10,1fr);gap:2px 5.3px}.card-front.gbcp .health{bottom:unset;top:calc(100% - 109px);left:10px;grid-template-columns:repeat(4,1fr) 1.5fr repeat(5,1fr);gap:5.5px 4.8px;filter:drop-shadow(0 0 5px black)}.card-front .health-box{width:25px;height:25px;border-radius:25px;box-sizing:border-box;border:var(--line-width) solid black;background-color:#fff;display:flex;align-items:center;justify-content:center;text-align:center;line-height:23px;font-family:Crimson Text,serif;font-weight:600;color:var(--mom-color, var(--team-color))}.card-front.gbcp .health-box{width:32px;height:32px;border-radius:32px;font-size:23px;filter:drop-shadow(0 0 5px black)}.card-front .health-box.damaged{color:#000;background-color:#8b0000}.Smoke .character-plays .text,.Skatha.lang-fr .character-plays .text{font-size:20px;line-height:21px}.Harry.card-front .name-plate-right>.name{font-size:36px}.vHarriet.card-front .name-plate-right>.name{font-size:32px}.Compound .playbook-result.momentus{background-image:linear-gradient(to right,var(--guild1-color) calc((1 - var(--col)) * 100%),var(--guild2-color) calc((5 - var(--col)) * 100%))}.Lucky .playbook-result.momentus{background-image:linear-gradient(to right,var(--guild2-color) calc((0 - var(--col)) * 100%),var(--guild1-color) calc((4 - var(--col)) * 100%))}.Lucky .gbcp .health-box{color:var(--guild2-color)}.Compound .guild-icon{content:url(/assets/compound-DlF-jmUs.svg)}.Lucky .guild-icon{content:url(/assets/lucky-n3AjGPzo.svg)}.Flea.gbcp .character-plays div.name:nth-of-type(3)>span:nth-child(2):before{color:"red";content:"\a";white-space:pre}.card-front:not(.nofun) .playbook-result.momentus{--rainbow: repeating-linear-gradient(60deg, #adfbda calc((0 - var(--col)) * 100%), #35c3ff calc((7/5 - var(--col)) * 100%), #fda399 calc((14/5 - var(--col)) * 100%), #76d880 calc((21/5 - var(--col)) * 100%), #ebf38b calc((28/5 - var(--col)) * 100%), #adfbda calc((7 - var(--col)) * 100%) );background-image:var(--rainbow)!important;border-color:#000!important}.card-front:not(.nofun) .playbook-result.momentus svg{fill:#000!important}div.card-back{width:100%;aspect-ratio:5 / 7;max-width:500px;max-height:700px;border-radius:calc(25px * var(--scale));background-size:110%;background-repeat:no-repeat;background-position:center center;display:inline-flex;align-items:center;justify-content:center}div.card-back .overlay{position:absolute;top:0;right:0;width:500px;height:700px;transform-origin:top right;transform:scale(var(--scale))}div.card-back.bleed{background-size:auto 100%}div.card-back.bleed.double{background-position:right}div.card-back.bleed>.overlay{top:calc(25px * var(--scale));right:calc(25px * var(--scale))}div.card-back.gbcp{background-position:left;background-size:100% 100%}div.card-back.gbcp.bleed{background-position:center center;background-size:calc(100% - 25px) calc(100% - 25px);background-color:var(--mom-color, var(--team-color))}div.card-back.gbcp.bleed.double{background-position:left;background-size:calc(100% - 12.5px) calc(100% - 25px);background-color:var(--mom-color, var(--team-color))}.card-back .container{position:absolute;top:20px;width:100%;height:565px;box-sizing:border-box;padding-left:24px;padding-top:3px;padding-right:24px;display:flex;flex-direction:column}.card-back.gbcp .container{position:absolute;top:16px;margin-left:91px;margin-right:9px;width:unset;height:unset;min-height:565px;padding:5px 4px 0;border:2px solid black;border-radius:5px;background-color:var(--gbcp-color);z-index:-2}.card-back .name-plate{display:flex;flex-direction:row;width:100%}.card-back.gbcp .name-plate{display:none}.card-back .name-plate .guild-icon{width:45px;height:45px;font-size:45px;display:flex;overflow:visible;align-items:center;justify-content:center}.card-back .name-plate .guild-icon svg{flex-shrink:0}.card-back .name-plate .name{display:flex;font-family:IM Fell Great Primer SC,serif;font-weight:400;font-size:40px;letter-spacing:-.05em;border-bottom:var(--line-width) solid black;border-image-source:linear-gradient(to left,transparent,black 150px);border-image-slice:0 0 1 0;width:100%;line-height:1em}.card-back .header{text-align:left;font-family:IM Fell Great Primer SC,serif;font-size:34px;letter-spacing:-.02em;border-bottom:var(--line-width) solid black;border-image-source:linear-gradient(to left,transparent,black 150px);border-image-slice:0 0 1 0;line-height:1em}.card-back .character-trait{text-align:left}.card-back .character-trait .trait{font-family:Crimson Text,serif;font-weight:800;font-style:italic;font-size:21px}.card-back .character-trait .trait.active>:before{content:"◉ ";font-style:normal;font-weight:400;font-family:"Noto Sans Symbols 2",sans-serif}.card-back .character-trait .trait>:first-child>:nth-child(2){font-family:Crimson Text,serif;font-weight:600;font-style:normal;font-size:21px;letter-spacing:-1px}.card-back .character-trait .text{font-family:Crimson Text,serif;font-size:21px;line-height:22px;text-align:left;white-space:pre-wrap;margin-bottom:.25em}.card-back :is(.legendary,.heroic){font-family:Crimson Text,serif;font-size:21px;line-height:22px;text-align:left;white-space:pre-wrap}.card-back :is(.heroic,.legendary)>:first-child>:first-child{font-family:Crimson Text,serif;font-weight:800;font-style:italic;font-size:21px}.card-back :is(.legendary,.heroic)>:first-child>:nth-child(2){font-family:Crimson Text,serif;font-weight:600;font-style:normal;font-size:21px;letter-spacing:-1px}.card-back .footer{position:absolute;top:595px;width:100%;height:60px;box-sizing:border-box;padding-left:24px;padding-right:24px;display:flex;flex-direction:row;justify-content:space-between}.card-back.gbcp .footer{position:absolute;inset:612px 9px 16px 91px;height:unset;width:unset;padding:0 4px;border:2px solid black;border-radius:5px;background-color:var(--gbcp-color);z-index:-2}.card-back .footer .tags{font-family:Crimson Text,serif;font-weight:400;font-size:20px;line-height:20px;text-align:left;white-space:pre-wrap}.card-back.gbcp .footer .tags{font-size:18px}.card-back .footer .right{display:flex;flex-direction:column}.card-back .footer .icons{display:flex;flex-direction:row-reverse;align-items:right;justify-content:right}.card-back .footer .icons .wrapper{font-size:44px;width:1em;height:1em;padding:.0625em;box-sizing:border-box;background-clip:content-box;background-color:#fff;border-radius:50%;overflow:visible;display:flex;place-content:center;place-items:center}.card-back.gbcp .footer .icons .wrapper{background-color:transparent}.card-back .footer .icons svg{flex-shrink:0}.card-back .footer .base-size{font-family:Crimson Text,serif;font-weight:400;font-size:21px;line-height:20px;text-align:right}.Nightlight .character-trait .text{font-size:20px;line-height:20px}.flip-card{display:block;background-color:transparent;width:100%;max-width:500px;aspect-ratio:5/7;perspective:1500px}.flip-card-inner{position:relative;width:100%;height:100%;-webkit-transition:transform .8s;transition:transform .8s;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.flip-card.flipped .flip-card-inner{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.flip-card-front,.flip-card-back{position:absolute;top:0;left:0;width:100%;height:100%;backface-visibility:hidden;-webkit-backface-visibility:hidden}.flip-card-back{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}@font-face{font-family:swiper-icons;src:url(data:application/font-woff;charset=utf-8;base64,\ d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA);font-weight:400;font-style:normal}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.controls{display:flex;flex-direction:column}.guild{box-sizing:initial;display:inline-flex;justify-content:space-between;background-image:linear-gradient(to right,transparent 1em,black 1em,var(--color) 3em,var(--color) 9em,black calc(100% - 1em),transparent calc(100% - 1em));text-shadow:.1em .1em .1em black}.guild:after{width:.25em;border-left:.75em solid black;border-top:1em solid transparent;border-bottom:1em solid transparent;display:inline-block;content:"";margin:0;padding:0}.guild svg{filter:drop-shadow(0px 0px 2px black)}.Cards{display:block}.Cards .card{display:inline-block;box-sizing:content-box;break-inside:avoid;border:thin solid black;margin:.0625in}.hide{display:none!important}.model-list-container{display:flex;flex-wrap:wrap;justify-content:center;align-content:flex-start}.model-checkbox{margin:.25em;padding-right:.5em;text-shadow:.1em .1em .1em black;background-image:linear-gradient(to right,var(--color1) 10%,var(--color2) 90%)}.model-checkbox .MuiCheckbox-root{padding:.25em}.model-checkbox{order:var(--major-order)}.model-checkbox.minor{order:var(--minor-order)}.model-checkbox:is(.Compound,.Lucky){order:calc(var(--major-order) + 1)}@media screen{main{overflow:hidden}.Cards{overflow-y:auto}}@media print{@page{size:auto;margin:.25in}.no-print{display:none!important}header{display:none!important}.Cards{padding:0!important}.Cards>.card{display:inline-block;break-inside:avoid;page-break-inside:avoid;margin:.0625in;border:none}.MuiTooltip-popper{display:none!important}} diff --git a/assets/index-D2Y2hPdq.js b/assets/index-D2Y2hPdq.js deleted file mode 100644 index 6d99579..0000000 --- a/assets/index-D2Y2hPdq.js +++ /dev/null @@ -1,199 +0,0 @@ -function GR(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Cr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function za(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zs(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var HR={exports:{}},wg={},VR={exports:{}},$t={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Yf=Symbol.for("react.element"),DM=Symbol.for("react.portal"),BM=Symbol.for("react.fragment"),FM=Symbol.for("react.strict_mode"),zM=Symbol.for("react.profiler"),UM=Symbol.for("react.provider"),WM=Symbol.for("react.context"),GM=Symbol.for("react.forward_ref"),HM=Symbol.for("react.suspense"),VM=Symbol.for("react.memo"),KM=Symbol.for("react.lazy"),n_=Symbol.iterator;function qM(e){return e===null||typeof e!="object"?null:(e=n_&&e[n_]||e["@@iterator"],typeof e=="function"?e:null)}var KR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qR=Object.assign,YR={};function Mu(e,t,n){this.props=e,this.context=t,this.refs=YR,this.updater=n||KR}Mu.prototype.isReactComponent={};Mu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)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")};Mu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function QR(){}QR.prototype=Mu.prototype;function tw(e,t,n){this.props=e,this.context=t,this.refs=YR,this.updater=n||KR}var nw=tw.prototype=new QR;nw.constructor=tw;qR(nw,Mu.prototype);nw.isPureReactComponent=!0;var r_=Array.isArray,XR=Object.prototype.hasOwnProperty,rw={current:null},JR={key:!0,ref:!0,__self:!0,__source:!0};function ZR(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)XR.call(t,r)&&!JR.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,He=G[Le];if(0>>1;Lei(Ve,le))Rei(et,Ve)?(G[Le]=et,G[Re]=le,Le=Re):(G[Le]=Ve,G[ke]=le,Le=ke);else if(Rei(et,le))G[Le]=et,G[Re]=le,Le=Re;else break e}}return V}function i(G,V){var le=G.sortIndex-V.sortIndex;return le!==0?le:G.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.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,m=!1,p=!1,g=!1,E=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(G){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=G)r(c),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(c)}}function _(G){if(g=!1,y(G),!p)if(n(l)!==null)p=!0,Z(R);else{var V=n(c);V!==null&&pe(_,V.startTime-G)}}function R(G,V){p=!1,g&&(g=!1,b(I),I=-1),m=!0;var le=f;try{for(y(V),d=n(l);d!==null&&(!(d.expirationTime>V)||G&&!$());){var Le=d.callback;if(typeof Le=="function"){d.callback=null,f=d.priorityLevel;var He=Le(d.expirationTime<=V);V=e.unstable_now(),typeof He=="function"?d.callback=He:d===n(l)&&r(l),y(V)}else r(l);d=n(l)}if(d!==null)var Te=!0;else{var ke=n(c);ke!==null&&pe(_,ke.startTime-V),Te=!1}return Te}finally{d=null,f=le,m=!1}}var T=!1,C=null,I=-1,A=5,L=-1;function $(){return!(e.unstable_now()-LG||125Le?(G.sortIndex=le,t(c,G),n(l)===null&&G===n(c)&&(g?(b(I),I=-1):g=!0,pe(_,le-Le))):(G.sortIndex=He,t(l,G),p||m||(p=!0,Z(R))),G},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(G){var V=f;return function(){var le=f;f=V;try{return G.apply(this,arguments)}finally{f=le}}}})(i2);r2.exports=i2;var o$=r2.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var s$=k,Si=o$;function Me(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nb=Object.prototype.hasOwnProperty,a$=/^[: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]*$/,o_={},s_={};function l$(e){return nb.call(s_,e)?!0:nb.call(o_,e)?!1:a$.test(e)?s_[e]=!0:(o_[e]=!0,!1)}function c$(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function u$(e,t,n,r){if(t===null||typeof t>"u"||c$(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Gr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var dr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){dr[e]=new Gr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];dr[t]=new Gr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){dr[e]=new Gr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dr[e]=new Gr(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){dr[e]=new Gr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){dr[e]=new Gr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){dr[e]=new Gr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){dr[e]=new Gr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){dr[e]=new Gr(e,5,!1,e.toLowerCase(),null,!1,!1)});var ow=/[\-:]([a-z])/g;function sw(e){return e[1].toUpperCase()}"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(ow,sw);dr[t]=new Gr(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(ow,sw);dr[t]=new Gr(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(ow,sw);dr[t]=new Gr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){dr[e]=new Gr(e,1,!1,e.toLowerCase(),null,!1,!1)});dr.xlinkHref=new Gr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){dr[e]=new Gr(e,1,!1,e.toLowerCase(),null,!0,!0)});function aw(e,t,n,r){var i=dr.hasOwnProperty(t)?dr[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Ry=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Td(e):""}function d$(e){switch(e.tag){case 5:return Td(e.type);case 16:return Td("Lazy");case 13:return Td("Suspense");case 19:return Td("SuspenseList");case 0:case 2:case 15:return e=Py(e.type,!1),e;case 11:return e=Py(e.type.render,!1),e;case 1:return e=Py(e.type,!0),e;default:return""}}function sb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Nc:return"Fragment";case $c:return"Portal";case rb:return"Profiler";case lw:return"StrictMode";case ib:return"Suspense";case ob:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case a2:return(e.displayName||"Context")+".Consumer";case s2:return(e._context.displayName||"Context")+".Provider";case cw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uw:return t=e.displayName||null,t!==null?t:sb(e.type)||"Memo";case da:t=e._payload,e=e._init;try{return sb(e(t))}catch{}}return null}function f$(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=t.render,e=e.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 sb(t);case 8:return t===lw?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function $a(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function c2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function p$(e){var t=c2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vp(e){e._valueTracker||(e._valueTracker=p$(e))}function u2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=c2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function am(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ab(e,t){var n=t.checked;return kn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function l_(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$a(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function d2(e,t){t=t.checked,t!=null&&aw(e,"checked",t,!1)}function lb(e,t){d2(e,t);var n=$a(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?cb(e,t.type,n):t.hasOwnProperty("defaultValue")&&cb(e,t.type,$a(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function c_(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function cb(e,t,n){(t!=="number"||am(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Od=Array.isArray;function Xc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Kp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ff(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Dd={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},h$=["Webkit","ms","Moz","O"];Object.keys(Dd).forEach(function(e){h$.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Dd[t]=Dd[e]})});function m2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Dd.hasOwnProperty(e)&&Dd[e]?(""+t).trim():t+"px"}function g2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=m2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var m$=kn({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 fb(e,t){if(t){if(m$[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Me(62))}}function pb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 hb=null;function dw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mb=null,Jc=null,Zc=null;function f_(e){if(e=Jf(e)){if(typeof mb!="function")throw Error(Me(280));var t=e.stateNode;t&&(t=kg(t),mb(e.stateNode,e.type,t))}}function v2(e){Jc?Zc?Zc.push(e):Zc=[e]:Jc=e}function y2(){if(Jc){var e=Jc,t=Zc;if(Zc=Jc=null,f_(e),t)for(e=0;e>>=0,e===0?32:31-(E$(e)/R$|0)|0}var qp=64,Yp=4194304;function Ld(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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dm(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Ld(a):(o&=s,o!==0&&(r=Ld(o)))}else s=n&~i,s!==0?r=Ld(s):o!==0&&(r=Ld(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Qf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xo(t),e[t]=n}function L$(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=Fd),x_=" ",S_=!1;function D2(e,t){switch(e){case"keyup":return oN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function B2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ac=!1;function aN(e,t){switch(e){case"compositionend":return B2(t);case"keypress":return t.which!==32?null:(S_=!0,x_);case"textInput":return e=t.data,e===x_&&S_?null:e;default:return null}}function lN(e,t){if(Ac)return e==="compositionend"||!bw&&D2(e,t)?(e=N2(),Mh=gw=va=null,Ac=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=E_(n)}}function W2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?W2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function G2(){for(var e=window,t=am();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=am(e.document)}return t}function ww(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function vN(e){var t=G2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&W2(n.ownerDocument.documentElement,n)){if(r!==null&&ww(n)){if(t=r.start,e=r.end,e===void 0&&(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,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=R_(n,o);var s=R_(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>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;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Dc=null,xb=null,Ud=null,Sb=!1;function P_(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Sb||Dc==null||Dc!==am(r)||(r=Dc,"selectionStart"in r&&ww(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ud&&yf(Ud,r)||(Ud=r,r=hm(xb,"onSelect"),0zc||(e.current=Pb[zc],Pb[zc]=null,zc--)}function dn(e,t){zc++,Pb[zc]=e.current,e.current=t}var Na={},Er=Wa(Na),Zr=Wa(!1),Ol=Na;function du(e,t){var n=e.type.contextTypes;if(!n)return Na;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ei(e){return e=e.childContextTypes,e!=null}function gm(){pn(Zr),pn(Er)}function $_(e,t,n){if(Er.current!==Na)throw Error(Me(168));dn(Er,t),dn(Zr,n)}function Z2(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Me(108,f$(e)||"Unknown",i));return kn({},n,r)}function vm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Na,Ol=Er.current,dn(Er,e),dn(Zr,Zr.current),!0}function N_(e,t,n){var r=e.stateNode;if(!r)throw Error(Me(169));n?(e=Z2(e,t,Ol),r.__reactInternalMemoizedMergedChildContext=e,pn(Zr),pn(Er),dn(Er,e)):pn(Zr),dn(Zr,n)}var vs=null,Eg=!1,Uy=!1;function eP(e){vs===null?vs=[e]:vs.push(e)}function TN(e){Eg=!0,eP(e)}function Ga(){if(!Uy&&vs!==null){Uy=!0;var e=0,t=Yt;try{var n=vs;for(Yt=1;e>=s,i-=s,ws=1<<32-xo(t)+i|n<I?(A=C,C=null):A=C.sibling;var L=f(b,C,y[I],_);if(L===null){C===null&&(C=A);break}e&&C&&L.alternate===null&&t(b,C),w=o(L,w,I),T===null?R=L:T.sibling=L,T=L,C=A}if(I===y.length)return n(b,C),vn&&ll(b,I),R;if(C===null){for(;II?(A=C,C=null):A=C.sibling;var $=f(b,C,L.value,_);if($===null){C===null&&(C=A);break}e&&C&&$.alternate===null&&t(b,C),w=o($,w,I),T===null?R=$:T.sibling=$,T=$,C=A}if(L.done)return n(b,C),vn&&ll(b,I),R;if(C===null){for(;!L.done;I++,L=y.next())L=d(b,L.value,_),L!==null&&(w=o(L,w,I),T===null?R=L:T.sibling=L,T=L);return vn&&ll(b,I),R}for(C=r(b,C);!L.done;I++,L=y.next())L=m(C,b,I,L.value,_),L!==null&&(e&&L.alternate!==null&&C.delete(L.key===null?I:L.key),w=o(L,w,I),T===null?R=L:T.sibling=L,T=L);return e&&C.forEach(function(F){return t(b,F)}),vn&&ll(b,I),R}function E(b,w,y,_){if(typeof y=="object"&&y!==null&&y.type===Nc&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Hp:e:{for(var R=y.key,T=w;T!==null;){if(T.key===R){if(R=y.type,R===Nc){if(T.tag===7){n(b,T.sibling),w=i(T,y.props.children),w.return=b,b=w;break e}}else if(T.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===da&&B_(R)===T.type){n(b,T.sibling),w=i(T,y.props),w.ref=dd(b,T,y),w.return=b,b=w;break e}n(b,T);break}else t(b,T);T=T.sibling}y.type===Nc?(w=Cl(y.props.children,b.mode,_,y.key),w.return=b,b=w):(_=Uh(y.type,y.key,y.props,null,b.mode,_),_.ref=dd(b,w,y),_.return=b,b=_)}return s(b);case $c:e:{for(T=y.key;w!==null;){if(w.key===T)if(w.tag===4&&w.stateNode.containerInfo===y.containerInfo&&w.stateNode.implementation===y.implementation){n(b,w.sibling),w=i(w,y.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=Qy(y,b.mode,_),w.return=b,b=w}return s(b);case da:return T=y._init,E(b,w,T(y._payload),_)}if(Od(y))return p(b,w,y,_);if(sd(y))return g(b,w,y,_);nh(b,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,w!==null&&w.tag===6?(n(b,w.sibling),w=i(w,y),w.return=b,b=w):(n(b,w),w=Yy(y,b.mode,_),w.return=b,b=w),s(b)):n(b,w)}return E}var pu=iP(!0),oP=iP(!1),wm=Wa(null),xm=null,Gc=null,Cw=null;function kw(){Cw=Gc=xm=null}function Ew(e){var t=wm.current;pn(wm),e._currentValue=t}function Lb(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function tu(e,t){xm=e,Cw=Gc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Jr=!0),e.firstContext=null)}function Ki(e){var t=e._currentValue;if(Cw!==e)if(e={context:e,memoizedValue:t,next:null},Gc===null){if(xm===null)throw Error(Me(308));Gc=e,xm.dependencies={lanes:0,firstContext:e}}else Gc=Gc.next=e;return t}var ml=null;function Rw(e){ml===null?ml=[e]:ml.push(e)}function sP(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Rw(t)):(n.next=i.next,i.next=n),t.interleaved=n,js(e,r)}function js(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fa=!1;function Pw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function aP(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 ks(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Pa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Bt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,js(e,n)}return i=r.interleaved,i===null?(t.next=t,Rw(r)):(t.next=i.next,i.next=t),r.interleaved=t,js(e,n)}function Nh(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pw(e,n)}}function F_(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Sm(e,t,n,r){var i=e.updateQueue;fa=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;s=0,u=c=l=null,a=o;do{var f=a.lane,m=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,g=a;switch(f=t,m=n,g.tag){case 1:if(p=g.payload,typeof p=="function"){d=p.call(m,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(m,d,f):p,f==null)break e;d=kn({},d,f);break e;case 2:fa=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=d):u=u.next=m,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Il|=s,e.lanes=s,e.memoizedState=d}}function z_(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Gy.transition;Gy.transition={};try{e(!1),t()}finally{Yt=n,Gy.transition=r}}function CP(){return qi().memoizedState}function IN(e,t,n){var r=Oa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kP(e))EP(t,n);else if(n=sP(e,t,n,r),n!==null){var i=zr();So(n,e,r,i),RP(n,t,r)}}function MN(e,t,n){var r=Oa(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kP(e))EP(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Co(a,s)){var l=t.interleaved;l===null?(i.next=i,Rw(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=sP(e,t,i,r),n!==null&&(i=zr(),So(n,e,r,i),RP(n,t,r))}}function kP(e){var t=e.alternate;return e===Cn||t!==null&&t===Cn}function EP(e,t){Wd=Cm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RP(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pw(e,n)}}var km={readContext:Ki,useCallback:wr,useContext:wr,useEffect:wr,useImperativeHandle:wr,useInsertionEffect:wr,useLayoutEffect:wr,useMemo:wr,useReducer:wr,useRef:wr,useState:wr,useDebugValue:wr,useDeferredValue:wr,useTransition:wr,useMutableSource:wr,useSyncExternalStore:wr,useId:wr,unstable_isNewReconciler:!1},$N={readContext:Ki,useCallback:function(e,t){return Bo().memoizedState=[e,t===void 0?null:t],e},useContext:Ki,useEffect:W_,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dh(4194308,4,bP.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dh(4,2,e,t)},useMemo:function(e,t){var n=Bo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bo();return t=n!==void 0?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=IN.bind(null,Cn,e),[r.memoizedState,e]},useRef:function(e){var t=Bo();return e={current:e},t.memoizedState=e},useState:U_,useDebugValue:Nw,useDeferredValue:function(e){return Bo().memoizedState=e},useTransition:function(){var e=U_(!1),t=e[0];return e=jN.bind(null,e[1]),Bo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Cn,i=Bo();if(vn){if(n===void 0)throw Error(Me(407));n=n()}else{if(n=t(),tr===null)throw Error(Me(349));jl&30||dP(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,W_(pP.bind(null,r,o,e),[e]),r.flags|=2048,Ef(9,fP.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Bo(),t=tr.identifierPrefix;if(vn){var n=xs,r=ws;n=(r&~(1<<32-xo(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Cf++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Go]=t,e[xf]=r,AP(e,t,!1,!1),t.stateNode=e;e:{switch(s=pb(n,r),n){case"dialog":fn("cancel",e),fn("close",e),i=r;break;case"iframe":case"object":case"embed":fn("load",e),i=r;break;case"video":case"audio":for(i=0;igu&&(t.flags|=128,r=!0,fd(o,!1),t.lanes=4194304)}else{if(!r)if(e=_m(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fd(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!vn)return xr(t),null}else 2*Mn()-o.renderingStartTime>gu&&n!==1073741824&&(t.flags|=128,r=!0,fd(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Mn(),t.sibling=null,n=Sn.current,dn(Sn,r?n&1|2:n&1),t):(xr(t),null);case 22:case 23:return Uw(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?di&1073741824&&(xr(t),t.subtreeFlags&6&&(t.flags|=8192)):xr(t),null;case 24:return null;case 25:return null}throw Error(Me(156,t.tag))}function WN(e,t){switch(Sw(t),t.tag){case 1:return ei(t.type)&&gm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return hu(),pn(Zr),pn(Er),Lw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ow(t),null;case 13:if(pn(Sn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Me(340));fu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pn(Sn),null;case 4:return hu(),null;case 10:return Ew(t.type._context),null;case 22:case 23:return Uw(),null;case 24:return null;default:return null}}var ih=!1,kr=!1,GN=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Hc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){On(e,t,r)}else n.current=null}function Fb(e,t,n){try{n()}catch(r){On(e,t,r)}}var eC=!1;function HN(e,t){if(_b=fm,e=G2(),ww(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(m=d.firstChild)!==null;)f=d,d=m;for(;;){if(d===e)break t;if(f===n&&++c===i&&(a=s),f===o&&++u===r&&(l=s),(m=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Cb={focusedElem:e,selectionRange:n},fm=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,E=p.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:ho(t.type,g),E);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Me(163))}}catch(_){On(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return p=eC,eC=!1,p}function Gd(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Fb(t,n,o)}i=i.next}while(i!==r)}}function Tg(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==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 zb(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function FP(e){var t=e.alternate;t!==null&&(e.alternate=null,FP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Go],delete t[xf],delete t[Rb],delete t[RN],delete t[PN])),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 zP(e){return e.tag===5||e.tag===3||e.tag===4}function tC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zP(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ub(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mm));else if(r!==4&&(e=e.child,e!==null))for(Ub(e,t,n),e=e.sibling;e!==null;)Ub(e,t,n),e=e.sibling}function Wb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wb(e,t,n),e=e.sibling;e!==null;)Wb(e,t,n),e=e.sibling}var sr=null,mo=!1;function oa(e,t,n){for(n=n.child;n!==null;)UP(e,t,n),n=n.sibling}function UP(e,t,n){if(Qo&&typeof Qo.onCommitFiberUnmount=="function")try{Qo.onCommitFiberUnmount(xg,n)}catch{}switch(n.tag){case 5:kr||Hc(n,t);case 6:var r=sr,i=mo;sr=null,oa(e,t,n),sr=r,mo=i,sr!==null&&(mo?(e=sr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):sr.removeChild(n.stateNode));break;case 18:sr!==null&&(mo?(e=sr,n=n.stateNode,e.nodeType===8?zy(e.parentNode,n):e.nodeType===1&&zy(e,n),gf(e)):zy(sr,n.stateNode));break;case 4:r=sr,i=mo,sr=n.stateNode.containerInfo,mo=!0,oa(e,t,n),sr=r,mo=i;break;case 0:case 11:case 14:case 15:if(!kr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Fb(n,t,s),i=i.next}while(i!==r)}oa(e,t,n);break;case 1:if(!kr&&(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){On(n,t,a)}oa(e,t,n);break;case 21:oa(e,t,n);break;case 22:n.mode&1?(kr=(r=kr)||n.memoizedState!==null,oa(e,t,n),kr=r):oa(e,t,n);break;default:oa(e,t,n)}}function nC(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new GN),t.forEach(function(r){var i=eA.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function uo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Mn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*KN(r/1960))-r,10e?16:e,ya===null)var r=!1;else{if(e=ya,ya=null,Pm=0,Bt&6)throw Error(Me(331));var i=Bt;for(Bt|=4,nt=e.current;nt!==null;){var o=nt,s=o.child;if(nt.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lMn()-Fw?_l(e,0):Bw|=n),ti(e,t)}function QP(e,t){t===0&&(e.mode&1?(t=Yp,Yp<<=1,!(Yp&130023424)&&(Yp=4194304)):t=1);var n=zr();e=js(e,t),e!==null&&(Qf(e,t,n),ti(e,n))}function ZN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),QP(e,n)}function eA(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Me(314))}r!==null&&r.delete(t),QP(e,n)}var XP;XP=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Zr.current)Jr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Jr=!1,zN(e,t,n);Jr=!!(e.flags&131072)}else Jr=!1,vn&&t.flags&1048576&&tP(t,bm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bh(e,t),e=t.pendingProps;var i=du(t,Er.current);tu(t,n),i=Iw(null,t,r,e,i,n);var o=Mw();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ei(r)?(o=!0,vm(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Pw(t),i.updater=Pg,t.stateNode=i,i._reactInternals=t,Ib(t,r,e,n),t=Nb(null,t,r,!0,o,n)):(t.tag=0,vn&&o&&xw(t),Fr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bh(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=nA(r),e=ho(r,e),i){case 0:t=$b(null,t,r,e,n);break e;case 1:t=X_(null,t,r,e,n);break e;case 11:t=Y_(null,t,r,e,n);break e;case 14:t=Q_(null,t,r,ho(r.type,e),n);break e}throw Error(Me(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ho(r,i),$b(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ho(r,i),X_(e,t,r,i,n);case 3:e:{if(MP(t),e===null)throw Error(Me(387));r=t.pendingProps,o=t.memoizedState,i=o.element,aP(e,t),Sm(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=mu(Error(Me(423)),t),t=J_(e,t,r,n,i);break e}else if(r!==i){i=mu(Error(Me(424)),t),t=J_(e,t,r,n,i);break e}else for(vi=Ra(t.stateNode.containerInfo.firstChild),wi=t,vn=!0,bo=null,n=oP(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fu(),r===i){t=Is(e,t,n);break e}Fr(e,t,r,n)}t=t.child}return t;case 5:return lP(t),e===null&&Ob(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,kb(r,i)?s=null:o!==null&&kb(r,o)&&(t.flags|=32),IP(e,t),Fr(e,t,s,n),t.child;case 6:return e===null&&Ob(t),null;case 13:return $P(e,t,n);case 4:return Tw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=pu(t,null,r,n):Fr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ho(r,i),Y_(e,t,r,i,n);case 7:return Fr(e,t,t.pendingProps,n),t.child;case 8:return Fr(e,t,t.pendingProps.children,n),t.child;case 12:return Fr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,dn(wm,r._currentValue),r._currentValue=s,o!==null)if(Co(o.value,s)){if(o.children===i.children&&!Zr.current){t=Is(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ks(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Lb(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Me(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Lb(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Fr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,tu(t,n),i=Ki(i),r=r(i),t.flags|=1,Fr(e,t,r,n),t.child;case 14:return r=t.type,i=ho(r,t.pendingProps),i=ho(r.type,i),Q_(e,t,r,i,n);case 15:return LP(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ho(r,i),Bh(e,t),t.tag=1,ei(r)?(e=!0,vm(t)):e=!1,tu(t,n),PP(t,r,i),Ib(t,r,i,n),Nb(null,t,r,!0,e,n);case 19:return NP(e,t,n);case 22:return jP(e,t,n)}throw Error(Me(156,t.tag))};function JP(e,t){return k2(e,t)}function tA(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 Ui(e,t,n,r){return new tA(e,t,n,r)}function Gw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nA(e){if(typeof e=="function")return Gw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cw)return 11;if(e===uw)return 14}return 2}function La(e,t){var n=e.alternate;return n===null?(n=Ui(e.tag,t,e.key,e.mode),n.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=e.flags&14680064,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Uh(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Gw(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Nc:return Cl(n.children,i,o,t);case lw:s=8,i|=8;break;case rb:return e=Ui(12,n,t,i|2),e.elementType=rb,e.lanes=o,e;case ib:return e=Ui(13,n,t,i),e.elementType=ib,e.lanes=o,e;case ob:return e=Ui(19,n,t,i),e.elementType=ob,e.lanes=o,e;case l2:return Lg(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case s2:s=10;break e;case a2:s=9;break e;case cw:s=11;break e;case uw:s=14;break e;case da:s=16,r=null;break e}throw Error(Me(130,e==null?e:typeof e,""))}return t=Ui(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Cl(e,t,n,r){return e=Ui(7,e,r,t),e.lanes=n,e}function Lg(e,t,n,r){return e=Ui(22,e,r,t),e.elementType=l2,e.lanes=n,e.stateNode={isHidden:!1},e}function Yy(e,t,n){return e=Ui(6,e,null,t),e.lanes=n,e}function Qy(e,t,n){return t=Ui(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rA(e,t,n,r,i){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=Oy(0),this.expirationTimes=Oy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oy(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Hw(e,t,n,r,i,o,s,a,l){return e=new rA(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ui(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pw(o),e}function iA(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nT)}catch(e){console.error(e)}}nT(),n2.exports=ki;var Ng=n2.exports;const Id=za(Ng),cA=GR({__proto__:null,default:Id},[Ng]);var uC=Ng;tb.createRoot=uC.createRoot,tb.hydrateRoot=uC.hydrateRoot;/** - * @remix-run/router v1.16.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function xn(){return xn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function $l(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function dA(){return Math.random().toString(36).substr(2,8)}function fC(e,t){return{usr:e.state,key:e.key,idx:t}}function Pf(e,t,n,r){return n===void 0&&(n=null),xn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?is(t):t,{state:n,key:t&&t.key||r||dA()})}function Nl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function is(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function fA(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=In.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(xn({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){a=In.Pop;let E=u(),b=E==null?null:E-c;c=E,l&&l({action:a,location:g.location,delta:b})}function f(E,b){a=In.Push;let w=Pf(g.location,E,b);n&&n(w,E),c=u()+1;let y=fC(w,c),_=g.createHref(w);try{s.pushState(y,"",_)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;i.location.assign(_)}o&&l&&l({action:a,location:g.location,delta:1})}function m(E,b){a=In.Replace;let w=Pf(g.location,E,b);n&&n(w,E),c=u();let y=fC(w,c),_=g.createHref(w);s.replaceState(y,"",_),o&&l&&l({action:a,location:g.location,delta:0})}function p(E){let b=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof E=="string"?E:Nl(E);return w=w.replace(/ $/,"%20"),kt(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let g={get action(){return a},get location(){return e(i,s)},listen(E){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(dC,d),l=E,()=>{i.removeEventListener(dC,d),l=null}},createHref(E){return t(i,E)},createURL:p,encodeLocation(E){let b=p(E);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:m,go(E){return s.go(E)}};return g}var gn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gn||(gn={}));const pA=new Set(["lazy","caseSensitive","path","id","index","children"]);function hA(e){return e.index===!0}function qb(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let s=[...n,o],a=typeof i.id=="string"?i.id:s.join("-");if(kt(i.index!==!0||!i.children,"Cannot specify children on an index route"),kt(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),hA(i)){let l=xn({},i,t(i),{id:a});return r[a]=l,l}else{let l=xn({},i,t(i),{id:a,children:void 0});return r[a]=l,i.children&&(l.children=qb(i.children,t,s,r)),l}})}function Kc(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?is(t):t,i=ko(r.pathname||"/",n);if(i==null)return null;let o=rT(e);gA(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(kt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Es([r,l.relativePath]),u=n.concat(l);o.children&&o.children.length>0&&(kt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),rT(o.children,t,u,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:_A(c,o.index),routesMeta:u})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of iT(o.path))i(o,s,l)}),t}function iT(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=iT(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function gA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:CA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const vA=/^:[\w-]+$/,yA=3,bA=2,wA=1,xA=10,SA=-2,pC=e=>e==="*";function _A(e,t){let n=e.split("/"),r=n.length;return n.some(pC)&&(r+=SA),t&&(r+=bA),n.filter(i=>!pC(i)).reduce((i,o)=>i+(vA.test(o)?yA:o===""?wA:xA),r)}function CA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function kA(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{let{paramName:f,isOptional:m}=u;if(f==="*"){let g=a[d]||"";s=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const p=a[d];return m&&!p?c[f]=void 0:c[f]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:e}}function EA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),$l(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function RA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return $l(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ko(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function PA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?is(e):e;return{pathname:n?n.startsWith("/")?n:TA(n,t):t,search:LA(r),hash:jA(i)}}function TA(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Xy(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function oT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ag(e,t){let n=oT(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Dg(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=is(e):(i=xn({},e),kt(!i.pathname||!i.pathname.includes("?"),Xy("?","pathname","search",i)),kt(!i.pathname||!i.pathname.includes("#"),Xy("#","pathname","hash",i)),kt(!i.search||!i.search.includes("#"),Xy("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=PA(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Es=e=>e.join("/").replace(/\/\/+/g,"/"),OA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),LA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,jA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Yw{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Qw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const sT=["post","put","patch","delete"],IA=new Set(sT),MA=["get",...sT],$A=new Set(MA),NA=new Set([301,302,303,307,308]),AA=new Set([307,308]),Jy={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},DA={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Xw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,BA=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),aT="remix-router-transitions";function FA(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;kt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let se=e.detectErrorBoundary;i=ge=>({hasErrorBoundary:se(ge)})}else i=BA;let o={},s=qb(e.routes,i,void 0,o),a,l=e.basename||"/",c=e.unstable_dataStrategy||GA,u=xn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),d=null,f=new Set,m=null,p=null,g=null,E=e.hydrationData!=null,b=Kc(s,e.history.location,l),w=null;if(b==null){let se=$i(404,{pathname:e.history.location.pathname}),{matches:ge,route:we}=_C(s);b=ge,w={[we.id]:se}}let y,_=b.some(se=>se.route.lazy),R=b.some(se=>se.route.loader);if(_)y=!1;else if(!R)y=!0;else if(u.v7_partialHydration){let se=e.hydrationData?e.hydrationData.loaderData:null,ge=e.hydrationData?e.hydrationData.errors:null,we=je=>je.route.loader?typeof je.route.loader=="function"&&je.route.loader.hydrate===!0?!1:se&&se[je.route.id]!==void 0||ge&&ge[je.route.id]!==void 0:!0;if(ge){let je=b.findIndex(Ke=>ge[Ke.route.id]!==void 0);y=b.slice(0,je+1).every(we)}else y=b.every(we)}else y=e.hydrationData!=null;let T,C={historyAction:e.history.action,location:e.history.location,matches:b,initialized:y,navigation:Jy,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},I=In.Pop,A=!1,L,$=!1,F=new Map,z=null,Y=!1,J=!1,Z=[],pe=[],G=new Map,V=0,le=-1,Le=new Map,He=new Set,Te=new Map,ke=new Map,Ve=new Set,Re=new Map,et=new Map,lt=!1;function Pe(){if(d=e.history.listen(se=>{let{action:ge,location:we,delta:je}=se;if(lt){lt=!1;return}$l(et.size===0||je!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ke=hr({currentLocation:C.location,nextLocation:we,historyAction:ge});if(Ke&&je!=null){lt=!0,e.history.go(je*-1),bn(Ke,{state:"blocked",location:we,proceed(){bn(Ke,{state:"proceeding",proceed:void 0,reset:void 0,location:we}),e.history.go(je)},reset(){let ct=new Map(C.blockers);ct.set(Ke,Pc),Ge({blockers:ct})}});return}return fe(ge,we)}),n){nD(t,F);let se=()=>rD(t,F);t.addEventListener("pagehide",se),z=()=>t.removeEventListener("pagehide",se)}return C.initialized||fe(In.Pop,C.location,{initialHydration:!0}),T}function Et(){d&&d(),z&&z(),f.clear(),L&&L.abort(),C.fetchers.forEach((se,ge)=>Oe(ge)),C.blockers.forEach((se,ge)=>Vt(ge))}function at(se){return f.add(se),()=>f.delete(se)}function Ge(se,ge){ge===void 0&&(ge={}),C=xn({},C,se);let we=[],je=[];u.v7_fetcherPersist&&C.fetchers.forEach((Ke,ct)=>{Ke.state==="idle"&&(Ve.has(ct)?je.push(ct):we.push(ct))}),[...f].forEach(Ke=>Ke(C,{deletedFetchers:je,unstable_viewTransitionOpts:ge.viewTransitionOpts,unstable_flushSync:ge.flushSync===!0})),u.v7_fetcherPersist&&(we.forEach(Ke=>C.fetchers.delete(Ke)),je.forEach(Ke=>Oe(Ke)))}function Ze(se,ge,we){var je,Ke;let{flushSync:ct}=we===void 0?{}:we,Fe=C.actionData!=null&&C.navigation.formMethod!=null&&go(C.navigation.formMethod)&&C.navigation.state==="loading"&&((je=se.state)==null?void 0:je._isRedirect)!==!0,De;ge.actionData?Object.keys(ge.actionData).length>0?De=ge.actionData:De=null:Fe?De=C.actionData:De=null;let ut=ge.loaderData?xC(C.loaderData,ge.loaderData,ge.matches||[],ge.errors):C.loaderData,dt=C.blockers;dt.size>0&&(dt=new Map(dt),dt.forEach((mt,jt)=>dt.set(jt,Pc)));let an=A===!0||C.navigation.formMethod!=null&&go(C.navigation.formMethod)&&((Ke=se.state)==null?void 0:Ke._isRedirect)!==!0;a&&(s=a,a=void 0),Y||I===In.Pop||(I===In.Push?e.history.push(se,se.state):I===In.Replace&&e.history.replace(se,se.state));let Lt;if(I===In.Pop){let mt=F.get(C.location.pathname);mt&&mt.has(se.pathname)?Lt={currentLocation:C.location,nextLocation:se}:F.has(se.pathname)&&(Lt={currentLocation:se,nextLocation:C.location})}else if($){let mt=F.get(C.location.pathname);mt?mt.add(se.pathname):(mt=new Set([se.pathname]),F.set(C.location.pathname,mt)),Lt={currentLocation:C.location,nextLocation:se}}Ge(xn({},ge,{actionData:De,loaderData:ut,historyAction:I,location:se,initialized:!0,navigation:Jy,revalidation:"idle",restoreScrollPosition:Io(se,ge.matches||C.matches),preventScrollReset:an,blockers:dt}),{viewTransitionOpts:Lt,flushSync:ct===!0}),I=In.Pop,A=!1,$=!1,Y=!1,J=!1,Z=[],pe=[]}async function gt(se,ge){if(typeof se=="number"){e.history.go(se);return}let we=Qb(C.location,C.matches,l,u.v7_prependBasename,se,u.v7_relativeSplatPath,ge==null?void 0:ge.fromRouteId,ge==null?void 0:ge.relative),{path:je,submission:Ke,error:ct}=hC(u.v7_normalizeFormMethod,!1,we,ge),Fe=C.location,De=Pf(C.location,je,ge&&ge.state);De=xn({},De,e.history.encodeLocation(De));let ut=ge&&ge.replace!=null?ge.replace:void 0,dt=In.Push;ut===!0?dt=In.Replace:ut===!1||Ke!=null&&go(Ke.formMethod)&&Ke.formAction===C.location.pathname+C.location.search&&(dt=In.Replace);let an=ge&&"preventScrollReset"in ge?ge.preventScrollReset===!0:void 0,Lt=(ge&&ge.unstable_flushSync)===!0,mt=hr({currentLocation:Fe,nextLocation:De,historyAction:dt});if(mt){bn(mt,{state:"blocked",location:De,proceed(){bn(mt,{state:"proceeding",proceed:void 0,reset:void 0,location:De}),gt(se,ge)},reset(){let jt=new Map(C.blockers);jt.set(mt,Pc),Ge({blockers:jt})}});return}return await fe(dt,De,{submission:Ke,pendingError:ct,preventScrollReset:an,replace:ge&&ge.replace,enableViewTransition:ge&&ge.unstable_viewTransition,flushSync:Lt})}function ee(){if(de(),Ge({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){fe(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}fe(I||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation})}}async function fe(se,ge,we){L&&L.abort(),L=null,I=se,Y=(we&&we.startUninterruptedRevalidation)===!0,Kr(C.location,C.matches),A=(we&&we.preventScrollReset)===!0,$=(we&&we.enableViewTransition)===!0;let je=a||s,Ke=we&&we.overrideNavigation,ct=Kc(je,ge,l),Fe=(we&&we.flushSync)===!0;if(!ct){let mt=$i(404,{pathname:ge.pathname}),{matches:jt,route:Gt}=_C(je);Ue(),Ze(ge,{matches:jt,loaderData:{},errors:{[Gt.id]:mt}},{flushSync:Fe});return}if(C.initialized&&!J&&QA(C.location,ge)&&!(we&&we.submission&&go(we.submission.formMethod))){Ze(ge,{matches:ct},{flushSync:Fe});return}L=new AbortController;let De=pc(e.history,ge,L.signal,we&&we.submission),ut;if(we&&we.pendingError)ut=[Kd(ct).route.id,{type:gn.error,error:we.pendingError}];else if(we&&we.submission&&go(we.submission.formMethod)){let mt=await _e(De,ge,we.submission,ct,{replace:we.replace,flushSync:Fe});if(mt.shortCircuited)return;ut=mt.pendingActionResult,Ke=Zy(ge,we.submission),Fe=!1,De=pc(e.history,De.url,De.signal)}let{shortCircuited:dt,loaderData:an,errors:Lt}=await ze(De,ge,ct,Ke,we&&we.submission,we&&we.fetcherSubmission,we&&we.replace,we&&we.initialHydration===!0,Fe,ut);dt||(L=null,Ze(ge,xn({matches:ct},SC(ut),{loaderData:an,errors:Lt})))}async function _e(se,ge,we,je,Ke){Ke===void 0&&(Ke={}),de();let ct=eD(ge,we);Ge({navigation:ct},{flushSync:Ke.flushSync===!0});let Fe,De=Jb(je,ge);if(!De.route.action&&!De.route.lazy)Fe={type:gn.error,error:$i(405,{method:se.method,pathname:ge.pathname,routeId:De.route.id})};else if(Fe=(await K("action",se,[De],je))[0],se.signal.aborted)return{shortCircuited:!0};if(yl(Fe)){let ut;return Ke&&Ke.replace!=null?ut=Ke.replace:ut=yC(Fe.response.headers.get("Location"),new URL(se.url),l)===C.location.pathname+C.location.search,await D(se,Fe,{submission:we,replace:ut}),{shortCircuited:!0}}if(vl(Fe))throw $i(400,{type:"defer-action"});if(Fi(Fe)){let ut=Kd(je,De.route.id);return(Ke&&Ke.replace)!==!0&&(I=In.Push),{pendingActionResult:[ut.route.id,Fe]}}return{pendingActionResult:[De.route.id,Fe]}}async function ze(se,ge,we,je,Ke,ct,Fe,De,ut,dt){let an=je||Zy(ge,Ke),Lt=Ke||ct||EC(an),mt=a||s,[jt,Gt]=mC(e.history,C,we,Lt,ge,u.v7_partialHydration&&De===!0,u.unstable_skipActionErrorRevalidation,J,Z,pe,Ve,Te,He,mt,l,dt);if(Ue(Ct=>!(we&&we.some(nn=>nn.route.id===Ct))||jt&&jt.some(nn=>nn.route.id===Ct)),le=++V,jt.length===0&&Gt.length===0){let Ct=Xe();return Ze(ge,xn({matches:we,loaderData:{},errors:dt&&Fi(dt[1])?{[dt[0]]:dt[1].error}:null},SC(dt),Ct?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ut}),{shortCircuited:!0}}if(!Y&&(!u.v7_partialHydration||!De)){Gt.forEach(nn=>{let ir=C.fetchers.get(nn.key),ln=hd(void 0,ir?ir.data:void 0);C.fetchers.set(nn.key,ln)});let Ct;dt&&!Fi(dt[1])?Ct={[dt[0]]:dt[1].data}:C.actionData&&(Object.keys(C.actionData).length===0?Ct=null:Ct=C.actionData),Ge(xn({navigation:an},Ct!==void 0?{actionData:Ct}:{},Gt.length>0?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ut})}Gt.forEach(Ct=>{G.has(Ct.key)&&St(Ct.key),Ct.controller&&G.set(Ct.key,Ct.controller)});let Hn=()=>Gt.forEach(Ct=>St(Ct.key));L&&L.signal.addEventListener("abort",Hn);let{loaderResults:Jn,fetcherResults:rr}=await Q(C.matches,we,jt,Gt,se);if(se.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",Hn),Gt.forEach(Ct=>G.delete(Ct.key));let Vn=CC([...Jn,...rr]);if(Vn){if(Vn.idx>=jt.length){let Ct=Gt[Vn.idx-jt.length].key;He.add(Ct)}return await D(se,Vn.result,{replace:Fe}),{shortCircuited:!0}}let{loaderData:li,errors:En}=wC(C,we,jt,Jn,dt,Gt,rr,Re);Re.forEach((Ct,nn)=>{Ct.subscribe(ir=>{(ir||Ct.done)&&Re.delete(nn)})}),u.v7_partialHydration&&De&&C.errors&&Object.entries(C.errors).filter(Ct=>{let[nn]=Ct;return!jt.some(ir=>ir.route.id===nn)}).forEach(Ct=>{let[nn,ir]=Ct;En=Object.assign(En||{},{[nn]:ir})});let _t=Xe(),hn=yt(le),At=_t||hn||Gt.length>0;return xn({loaderData:li,errors:En},At?{fetchers:new Map(C.fetchers)}:{})}function W(se,ge,we,je){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");G.has(se)&&St(se);let Ke=(je&&je.unstable_flushSync)===!0,ct=a||s,Fe=Qb(C.location,C.matches,l,u.v7_prependBasename,we,u.v7_relativeSplatPath,ge,je==null?void 0:je.relative),De=Kc(ct,Fe,l);if(!De){rt(se,ge,$i(404,{pathname:Fe}),{flushSync:Ke});return}let{path:ut,submission:dt,error:an}=hC(u.v7_normalizeFormMethod,!0,Fe,je);if(an){rt(se,ge,an,{flushSync:Ke});return}let Lt=Jb(De,ut);if(A=(je&&je.preventScrollReset)===!0,dt&&go(dt.formMethod)){S(se,ge,ut,Lt,De,Ke,dt);return}Te.set(se,{routeId:ge,path:ut}),O(se,ge,ut,Lt,De,Ke,dt)}async function S(se,ge,we,je,Ke,ct,Fe){if(de(),Te.delete(se),!je.route.action&&!je.route.lazy){let ln=$i(405,{method:Fe.formMethod,pathname:we,routeId:ge});rt(se,ge,ln,{flushSync:ct});return}let De=C.fetchers.get(se);$e(se,tD(Fe,De),{flushSync:ct});let ut=new AbortController,dt=pc(e.history,we,ut.signal,Fe);G.set(se,ut);let an=V,mt=(await K("action",dt,[je],Ke))[0];if(dt.signal.aborted){G.get(se)===ut&&G.delete(se);return}if(u.v7_fetcherPersist&&Ve.has(se)){if(yl(mt)||Fi(mt)){$e(se,ua(void 0));return}}else{if(yl(mt))if(G.delete(se),le>an){$e(se,ua(void 0));return}else return He.add(se),$e(se,hd(Fe)),D(dt,mt,{fetcherSubmission:Fe});if(Fi(mt)){rt(se,ge,mt.error);return}}if(vl(mt))throw $i(400,{type:"defer-action"});let jt=C.navigation.location||C.location,Gt=pc(e.history,jt,ut.signal),Hn=a||s,Jn=C.navigation.state!=="idle"?Kc(Hn,C.navigation.location,l):C.matches;kt(Jn,"Didn't find any matches after fetcher action");let rr=++V;Le.set(se,rr);let Vn=hd(Fe,mt.data);C.fetchers.set(se,Vn);let[li,En]=mC(e.history,C,Jn,Fe,jt,!1,u.unstable_skipActionErrorRevalidation,J,Z,pe,Ve,Te,He,Hn,l,[je.route.id,mt]);En.filter(ln=>ln.key!==se).forEach(ln=>{let Li=ln.key,Qs=C.fetchers.get(Li),Xs=hd(void 0,Qs?Qs.data:void 0);C.fetchers.set(Li,Xs),G.has(Li)&&St(Li),ln.controller&&G.set(Li,ln.controller)}),Ge({fetchers:new Map(C.fetchers)});let _t=()=>En.forEach(ln=>St(ln.key));ut.signal.addEventListener("abort",_t);let{loaderResults:hn,fetcherResults:At}=await Q(C.matches,Jn,li,En,Gt);if(ut.signal.aborted)return;ut.signal.removeEventListener("abort",_t),Le.delete(se),G.delete(se),En.forEach(ln=>G.delete(ln.key));let Ct=CC([...hn,...At]);if(Ct){if(Ct.idx>=li.length){let ln=En[Ct.idx-li.length].key;He.add(ln)}return D(Gt,Ct.result)}let{loaderData:nn,errors:ir}=wC(C,C.matches,li,hn,void 0,En,At,Re);if(C.fetchers.has(se)){let ln=ua(mt.data);C.fetchers.set(se,ln)}yt(rr),C.navigation.state==="loading"&&rr>le?(kt(I,"Expected pending action"),L&&L.abort(),Ze(C.navigation.location,{matches:Jn,loaderData:nn,errors:ir,fetchers:new Map(C.fetchers)})):(Ge({errors:ir,loaderData:xC(C.loaderData,nn,Jn,ir),fetchers:new Map(C.fetchers)}),J=!1)}async function O(se,ge,we,je,Ke,ct,Fe){let De=C.fetchers.get(se);$e(se,hd(Fe,De?De.data:void 0),{flushSync:ct});let ut=new AbortController,dt=pc(e.history,we,ut.signal);G.set(se,ut);let an=V,mt=(await K("loader",dt,[je],Ke))[0];if(vl(mt)&&(mt=await dT(mt,dt.signal,!0)||mt),G.get(se)===ut&&G.delete(se),!dt.signal.aborted){if(Ve.has(se)){$e(se,ua(void 0));return}if(yl(mt))if(le>an){$e(se,ua(void 0));return}else{He.add(se),await D(dt,mt);return}if(Fi(mt)){rt(se,ge,mt.error);return}kt(!vl(mt),"Unhandled fetcher deferred data"),$e(se,ua(mt.data))}}async function D(se,ge,we){let{submission:je,fetcherSubmission:Ke,replace:ct}=we===void 0?{}:we;ge.response.headers.has("X-Remix-Revalidate")&&(J=!0);let Fe=ge.response.headers.get("Location");kt(Fe,"Expected a Location header on the redirect Response"),Fe=yC(Fe,new URL(se.url),l);let De=Pf(C.location,Fe,{_isRedirect:!0});if(n){let jt=!1;if(ge.response.headers.has("X-Remix-Reload-Document"))jt=!0;else if(Xw.test(Fe)){const Gt=e.history.createURL(Fe);jt=Gt.origin!==t.location.origin||ko(Gt.pathname,l)==null}if(jt){ct?t.location.replace(Fe):t.location.assign(Fe);return}}L=null;let ut=ct===!0?In.Replace:In.Push,{formMethod:dt,formAction:an,formEncType:Lt}=C.navigation;!je&&!Ke&&dt&&an&&Lt&&(je=EC(C.navigation));let mt=je||Ke;if(AA.has(ge.response.status)&&mt&&go(mt.formMethod))await fe(ut,De,{submission:xn({},mt,{formAction:Fe}),preventScrollReset:A});else{let jt=Zy(De,je);await fe(ut,De,{overrideNavigation:jt,fetcherSubmission:Ke,preventScrollReset:A})}}async function K(se,ge,we,je){try{let Ke=await HA(c,se,ge,we,je,o,i);return await Promise.all(Ke.map((ct,Fe)=>{if(XA(ct)){let De=ct.result;return{type:gn.redirect,response:qA(De,ge,we[Fe].route.id,je,l,u.v7_relativeSplatPath)}}return KA(ct)}))}catch(Ke){return we.map(()=>({type:gn.error,error:Ke}))}}async function Q(se,ge,we,je,Ke){let[ct,...Fe]=await Promise.all([we.length?K("loader",Ke,we,ge):[],...je.map(De=>{if(De.matches&&De.match&&De.controller){let ut=pc(e.history,De.path,De.controller.signal);return K("loader",ut,[De.match],De.matches).then(dt=>dt[0])}else return Promise.resolve({type:gn.error,error:$i(404,{pathname:De.path})})})]);return await Promise.all([kC(se,we,ct,ct.map(()=>Ke.signal),!1,C.loaderData),kC(se,je.map(De=>De.match),Fe,je.map(De=>De.controller?De.controller.signal:null),!0)]),{loaderResults:ct,fetcherResults:Fe}}function de(){J=!0,Z.push(...Ue()),Te.forEach((se,ge)=>{G.has(ge)&&(pe.push(ge),St(ge))})}function $e(se,ge,we){we===void 0&&(we={}),C.fetchers.set(se,ge),Ge({fetchers:new Map(C.fetchers)},{flushSync:(we&&we.flushSync)===!0})}function rt(se,ge,we,je){je===void 0&&(je={});let Ke=Kd(C.matches,ge);Oe(se),Ge({errors:{[Ke.route.id]:we},fetchers:new Map(C.fetchers)},{flushSync:(je&&je.flushSync)===!0})}function Je(se){return u.v7_fetcherPersist&&(ke.set(se,(ke.get(se)||0)+1),Ve.has(se)&&Ve.delete(se)),C.fetchers.get(se)||DA}function Oe(se){let ge=C.fetchers.get(se);G.has(se)&&!(ge&&ge.state==="loading"&&Le.has(se))&&St(se),Te.delete(se),Le.delete(se),He.delete(se),Ve.delete(se),C.fetchers.delete(se)}function tt(se){if(u.v7_fetcherPersist){let ge=(ke.get(se)||0)-1;ge<=0?(ke.delete(se),Ve.add(se)):ke.set(se,ge)}else Oe(se);Ge({fetchers:new Map(C.fetchers)})}function St(se){let ge=G.get(se);kt(ge,"Expected fetch controller: "+se),ge.abort(),G.delete(se)}function Ht(se){for(let ge of se){let we=Je(ge),je=ua(we.data);C.fetchers.set(ge,je)}}function Xe(){let se=[],ge=!1;for(let we of He){let je=C.fetchers.get(we);kt(je,"Expected fetcher: "+we),je.state==="loading"&&(He.delete(we),se.push(we),ge=!0)}return Ht(se),ge}function yt(se){let ge=[];for(let[we,je]of Le)if(je0}function Ne(se,ge){let we=C.blockers.get(se)||Pc;return et.get(se)!==ge&&et.set(se,ge),we}function Vt(se){C.blockers.delete(se),et.delete(se)}function bn(se,ge){let we=C.blockers.get(se)||Pc;kt(we.state==="unblocked"&&ge.state==="blocked"||we.state==="blocked"&&ge.state==="blocked"||we.state==="blocked"&&ge.state==="proceeding"||we.state==="blocked"&&ge.state==="unblocked"||we.state==="proceeding"&&ge.state==="unblocked","Invalid blocker state transition: "+we.state+" -> "+ge.state);let je=new Map(C.blockers);je.set(se,ge),Ge({blockers:je})}function hr(se){let{currentLocation:ge,nextLocation:we,historyAction:je}=se;if(et.size===0)return;et.size>1&&$l(!1,"A router only supports one blocker at a time");let Ke=Array.from(et.entries()),[ct,Fe]=Ke[Ke.length-1],De=C.blockers.get(ct);if(!(De&&De.state==="proceeding")&&Fe({currentLocation:ge,nextLocation:we,historyAction:je}))return ct}function Ue(se){let ge=[];return Re.forEach((we,je)=>{(!se||se(je))&&(we.cancel(),ge.push(je),Re.delete(je))}),ge}function oo(se,ge,we){if(m=se,g=ge,p=we||null,!E&&C.navigation===Jy){E=!0;let je=Io(C.location,C.matches);je!=null&&Ge({restoreScrollPosition:je})}return()=>{m=null,g=null,p=null}}function so(se,ge){return p&&p(se,ge.map(je=>mA(je,C.loaderData)))||se.key}function Kr(se,ge){if(m&&g){let we=so(se,ge);m[we]=g()}}function Io(se,ge){if(m){let we=so(se,ge),je=m[we];if(typeof je=="number")return je}return null}function Mo(se){o={},a=qb(se,i,void 0,o)}return T={get basename(){return l},get future(){return u},get state(){return C},get routes(){return s},get window(){return t},initialize:Pe,subscribe:at,enableScrollRestoration:oo,navigate:gt,fetch:W,revalidate:ee,createHref:se=>e.history.createHref(se),encodeLocation:se=>e.history.encodeLocation(se),getFetcher:Je,deleteFetcher:tt,dispose:Et,getBlocker:Ne,deleteBlocker:Vt,_internalFetchControllers:G,_internalActiveDeferreds:Re,_internalSetRoutes:Mo},T}function zA(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Qb(e,t,n,r,i,o,s,a){let l,c;if(s){l=[];for(let d of t)if(l.push(d),d.route.id===s){c=d;break}}else l=t,c=t[t.length-1];let u=Dg(i||".",Ag(l,o),ko(e.pathname,n)||e.pathname,a==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!Jw(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Es([n,u.pathname])),Nl(u)}function hC(e,t,n,r){if(!r||!zA(r))return{path:n};if(r.formMethod&&!ZA(r.formMethod))return{path:n,error:$i(405,{method:r.formMethod})};let i=()=>({path:n,error:$i(400,{type:"invalid-body"})}),o=r.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),a=cT(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!go(s))return i();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,p)=>{let[g,E]=p;return""+m+g+"="+E+` -`},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!go(s))return i();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return i()}}}kt(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=Xb(r.formData),c=r.formData;else if(r.body instanceof FormData)l=Xb(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=bC(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=bC(l)}catch{return i()}let u={formMethod:s,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(go(u.formMethod))return{path:n,submission:u};let d=is(n);return t&&d.search&&Jw(d.search)&&l.append("index",""),d.search="?"+l,{path:Nl(d),submission:u}}function UA(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function mC(e,t,n,r,i,o,s,a,l,c,u,d,f,m,p,g){let E=g?Fi(g[1])?g[1].error:g[1].data:void 0,b=e.createURL(t.location),w=e.createURL(i),y=g&&Fi(g[1])?g[0]:void 0,_=y?UA(n,y):n,R=g?g[1].statusCode:void 0,T=s&&R&&R>=400,C=_.filter((A,L)=>{let{route:$}=A;if($.lazy)return!0;if($.loader==null)return!1;if(o)return typeof $.loader!="function"||$.loader.hydrate?!0:t.loaderData[$.id]===void 0&&(!t.errors||t.errors[$.id]===void 0);if(WA(t.loaderData,t.matches[L],A)||l.some(Y=>Y===A.route.id))return!0;let F=t.matches[L],z=A;return gC(A,xn({currentUrl:b,currentParams:F.params,nextUrl:w,nextParams:z.params},r,{actionResult:E,unstable_actionStatus:R,defaultShouldRevalidate:T?!1:a||b.pathname+b.search===w.pathname+w.search||b.search!==w.search||lT(F,z)}))}),I=[];return d.forEach((A,L)=>{if(o||!n.some(J=>J.route.id===A.routeId)||u.has(L))return;let $=Kc(m,A.path,p);if(!$){I.push({key:L,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let F=t.fetchers.get(L),z=Jb($,A.path),Y=!1;f.has(L)?Y=!1:c.includes(L)?Y=!0:F&&F.state!=="idle"&&F.data===void 0?Y=a:Y=gC(z,xn({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:n[n.length-1].params},r,{actionResult:E,unstable_actionStatus:R,defaultShouldRevalidate:T?!1:a})),Y&&I.push({key:L,routeId:A.routeId,path:A.path,matches:$,match:z,controller:new AbortController})}),[C,I]}function WA(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function lT(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function gC(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function vC(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];kt(i,"No route found in manifest");let o={};for(let s in r){let l=i[s]!==void 0&&s!=="hasErrorBoundary";$l(!l,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!pA.has(s)&&(o[s]=r[s])}Object.assign(i,o),Object.assign(i,xn({},t(i),{lazy:void 0}))}function GA(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function HA(e,t,n,r,i,o,s,a){let l=r.reduce((d,f)=>d.add(f.route.id),new Set),c=new Set,u=await e({matches:i.map(d=>{let f=l.has(d.route.id);return xn({},d,{shouldLoad:f,resolve:p=>(c.add(d.route.id),f?VA(t,n,d,o,s,p,a):Promise.resolve({type:gn.data,result:void 0}))})}),request:n,params:i[0].params,context:a});return i.forEach(d=>kt(c.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),u.filter((d,f)=>l.has(i[f].route.id))}async function VA(e,t,n,r,i,o,s){let a,l,c=u=>{let d,f=new Promise((g,E)=>d=E);l=()=>d(),t.signal.addEventListener("abort",l);let m=g=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):u({request:t,params:n.params,context:s},...g!==void 0?[g]:[]),p;return o?p=o(g=>m(g)):p=(async()=>{try{return{type:"data",result:await m()}}catch(g){return{type:"error",result:g}}})(),Promise.race([p,f])};try{let u=n.route[e];if(n.route.lazy)if(u){let d,[f]=await Promise.all([c(u).catch(m=>{d=m}),vC(n.route,i,r)]);if(d!==void 0)throw d;a=f}else if(await vC(n.route,i,r),u=n.route[e],u)a=await c(u);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw $i(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:gn.data,result:void 0};else if(u)a=await c(u);else{let d=new URL(t.url),f=d.pathname+d.search;throw $i(404,{pathname:f})}kt(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:gn.error,result:u}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function KA(e){let{result:t,type:n,status:r}=e;if(uT(t)){let s;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(a){return{type:gn.error,error:a}}return n===gn.error?{type:gn.error,error:new Yw(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:gn.data,data:s,statusCode:t.status,headers:t.headers}}if(n===gn.error)return{type:gn.error,error:t,statusCode:Qw(t)?t.status:r};if(JA(t)){var i,o;return{type:gn.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:gn.data,data:t,statusCode:r}}function qA(e,t,n,r,i,o){let s=e.headers.get("Location");if(kt(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xw.test(s)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=Qb(new URL(t.url),a,i,!0,s,o),e.headers.set("Location",s)}return e}function yC(e,t,n){if(Xw.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=ko(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function pc(e,t,n,r){let i=e.createURL(cT(t)).toString(),o={signal:n};if(r&&go(r.formMethod)){let{formMethod:s,formEncType:a}=r;o.method=s.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=Xb(r.formData):o.body=r.formData}return new Request(i,o)}function Xb(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function bC(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function YA(e,t,n,r,i,o){let s={},a=null,l,c=!1,u={},d=r&&Fi(r[1])?r[1].error:void 0;return n.forEach((f,m)=>{let p=t[m].route.id;if(kt(!yl(f),"Cannot handle redirect results in processLoaderData"),Fi(f)){let g=f.error;if(d!==void 0&&(g=d,d=void 0),a=a||{},o)a[p]=g;else{let E=Kd(e,p);a[E.route.id]==null&&(a[E.route.id]=g)}s[p]=void 0,c||(c=!0,l=Qw(f.error)?f.error.status:500),f.headers&&(u[p]=f.headers)}else vl(f)?(i.set(p,f.deferredData),s[p]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!c&&(l=f.statusCode),f.headers&&(u[p]=f.headers)):(s[p]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(l=f.statusCode),f.headers&&(u[p]=f.headers))}),d!==void 0&&r&&(a={[r[0]]:d},s[r[0]]=void 0),{loaderData:s,errors:a,statusCode:l||200,loaderHeaders:u}}function wC(e,t,n,r,i,o,s,a){let{loaderData:l,errors:c}=YA(t,n,r,i,a,!1);for(let u=0;ur.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function _C(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function $i(e,t){let{pathname:n,routeId:r,method:i,type:o}=t===void 0?{}:t,s="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?a="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):e===403?(s="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",a='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?a="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(a='Invalid request method "'+i.toUpperCase()+'"')),new Yw(e||500,s,new Error(a),!0)}function CC(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(yl(n))return{result:n,idx:t}}}function cT(e){let t=typeof e=="string"?is(e):e;return Nl(xn({},t,{hash:""}))}function QA(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function XA(e){return uT(e.result)&&NA.has(e.result.status)}function vl(e){return e.type===gn.deferred}function Fi(e){return e.type===gn.error}function yl(e){return(e&&e.type)===gn.redirect}function JA(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function uT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ZA(e){return $A.has(e.toLowerCase())}function go(e){return IA.has(e.toLowerCase())}async function kC(e,t,n,r,i,o){for(let s=0;sd.route.id===l.route.id),u=c!=null&&!lT(c,l)&&(o&&o[l.route.id])!==void 0;if(vl(a)&&(i||u)){let d=r[s];kt(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await dT(a,d,i).then(f=>{f&&(n[s]=f||n[s])})}}}async function dT(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:gn.data,data:e.deferredData.unwrappedData}}catch(i){return{type:gn.error,error:i}}return{type:gn.data,data:e.deferredData.data}}}function Jw(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Jb(e,t){let n=typeof t=="string"?is(t).search:t.search;if(e[e.length-1].route.index&&Jw(n||""))return e[e.length-1];let r=oT(e);return r[r.length-1]}function EC(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:s}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Zy(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function eD(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function hd(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function tD(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ua(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function nD(e,t){try{let n=e.sessionStorage.getItem(aT);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function rD(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(aT,JSON.stringify(n))}catch(r){$l(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** - * React Router v6.23.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Al(){return Al=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),k.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=Dg(c,JSON.parse(s),o,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Es([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,s,o,e])}const hT=k.createContext(null);function tp(){return k.useContext(hT)}function sD(e){let t=k.useContext(os).outlet;return t&&k.createElement(hT.Provider,{value:e},t)}function aD(){let{matches:e}=k.useContext(os),t=e[e.length-1];return t?t.params:{}}function Fg(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=k.useContext(Ws),{matches:i}=k.useContext(os),{pathname:o}=Gs(),s=JSON.stringify(Ag(i,r.v7_relativeSplatPath));return k.useMemo(()=>Dg(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function lD(e,t,n,r){Au()||kt(!1);let{navigator:i}=k.useContext(Ws),{matches:o}=k.useContext(os),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=Gs(),u;if(t){var d;let E=typeof t=="string"?is(t):t;l==="/"||(d=E.pathname)!=null&&d.startsWith(l)||kt(!1),u=E}else u=c;let f=u.pathname||"/",m=f;if(l!=="/"){let E=l.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(E.length).join("/")}let p=Kc(e,{pathname:m}),g=pD(p&&p.map(E=>Object.assign({},E,{params:Object.assign({},a,E.params),pathname:Es([l,i.encodeLocation?i.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?l:Es([l,i.encodeLocation?i.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),o,n,r);return t&&g?k.createElement(Bg.Provider,{value:{location:Al({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:In.Pop}},g):g}function cD(){let e=mD(),t=Qw(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:i},n):null,null)}const uD=k.createElement(cD,null);class dD extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?k.createElement(os.Provider,{value:this.props.routeContext},k.createElement(fT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fD(e){let{routeContext:t,match:n,children:r}=e,i=k.useContext(ep);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(os.Provider,{value:t},r)}function pD(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||kt(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,f)=>{let m,p=!1,g=null,E=null;n&&(m=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||uD,l&&(c<0&&f===0?(bD("route-fallback",!1),p=!0,E=null):c===f&&(p=!0,E=d.route.hydrateFallbackElement||null)));let b=t.concat(s.slice(0,f+1)),w=()=>{let y;return m?y=g:p?y=E:d.route.Component?y=k.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=u,k.createElement(fD,{match:d,routeContext:{outlet:u,matches:b,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?k.createElement(dD,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var ex=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ex||{}),Tf=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Tf||{});function mT(e){let t=k.useContext(ep);return t||kt(!1),t}function gT(e){let t=k.useContext(Zw);return t||kt(!1),t}function hD(e){let t=k.useContext(os);return t||kt(!1),t}function vT(e){let t=hD(),n=t.matches[t.matches.length-1];return n.route.id||kt(!1),n.route.id}function mD(){var e;let t=k.useContext(fT),n=gT(Tf.UseRouteError),r=vT(Tf.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}let gD=0;function vD(e){let{router:t,basename:n}=mT(ex.UseBlocker),r=gT(Tf.UseBlocker),[i,o]=k.useState(""),s=k.useCallback(a=>{if(typeof e!="function")return!!e;if(n==="/")return e(a);let{currentLocation:l,nextLocation:c,historyAction:u}=a;return e({currentLocation:Al({},l,{pathname:ko(l.pathname,n)||l.pathname}),nextLocation:Al({},c,{pathname:ko(c.pathname,n)||c.pathname}),historyAction:u})},[n,e]);return k.useEffect(()=>{let a=String(++gD);return o(a),()=>t.deleteBlocker(a)},[t]),k.useEffect(()=>{i!==""&&t.getBlocker(i,s)},[t,i,s]),i&&r.blockers.has(i)?r.blockers.get(i):Pc}function yD(){let{router:e}=mT(ex.UseNavigateStable),t=vT(Tf.UseNavigateStable),n=k.useRef(!1);return pT(()=>{n.current=!0}),k.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Al({fromRouteId:t},o)))},[e,t])}const RC={};function bD(e,t,n){!t&&!RC[e]&&(RC[e]=!0)}function wD(e){let{to:t,replace:n,state:r,relative:i}=e;Au()||kt(!1);let{future:o,static:s}=k.useContext(Ws),{matches:a}=k.useContext(os),{pathname:l}=Gs(),c=Ha(),u=Dg(t,Ag(a,o.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(u);return k.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:i}),[c,d,i,n,r]),null}function tx(e){return sD(e.context)}function Qr(e){kt(!1)}function xD(e){let{basename:t="/",children:n=null,location:r,navigationType:i=In.Pop,navigator:o,static:s=!1,future:a}=e;Au()&&kt(!1);let l=t.replace(/^\/*/,"/"),c=k.useMemo(()=>({basename:l,navigator:o,static:s,future:Al({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=is(r));let{pathname:u="/",search:d="",hash:f="",state:m=null,key:p="default"}=r,g=k.useMemo(()=>{let E=ko(u,l);return E==null?null:{location:{pathname:E,search:d,hash:f,state:m,key:p},navigationType:i}},[l,u,d,f,m,p,i]);return g==null?null:k.createElement(Ws.Provider,{value:c},k.createElement(Bg.Provider,{children:n,value:g}))}new Promise(()=>{});function Zb(e,t){t===void 0&&(t=[]);let n=[];return k.Children.forEach(e,(r,i)=>{if(!k.isValidElement(r))return;let o=[...t,i];if(r.type===k.Fragment){n.push.apply(n,Zb(r.props.children,o));return}r.type!==Qr&&kt(!1),!r.props.index||!r.props.children||kt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Zb(r.props.children,o)),n.push(s)}),n}function SD(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:k.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:k.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:k.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** - * React Router DOM v6.23.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function vu(){return vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function _D(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function CD(e,t){return e.button===0&&(!t||t==="_self")&&!_D(e)}function e1(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function kD(e,t){let n=e1(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const ED=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],RD=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],PD="6";try{window.__reactRouterVersion=PD}catch{}function TD(e,t){return FA({basename:t==null?void 0:t.basename,future:vu({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:uA({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||OD(),routes:e,mapRouteProperties:SD,unstable_dataStrategy:t==null?void 0:t.unstable_dataStrategy,window:t==null?void 0:t.window}).initialize()}function OD(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=vu({},t,{errors:LD(t.errors)})),t}function LD(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Yw(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let s=new o(i.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const bT=k.createContext({isTransitioning:!1}),jD=k.createContext(new Map),ID="startTransition",PC=sm[ID],MD="flushSync",TC=cA[MD];function $D(e){PC?PC(e):e()}function md(e){TC?TC(e):e()}class ND{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function AD(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=k.useState(n.state),[s,a]=k.useState(),[l,c]=k.useState({isTransitioning:!1}),[u,d]=k.useState(),[f,m]=k.useState(),[p,g]=k.useState(),E=k.useRef(new Map),{v7_startTransition:b}=r||{},w=k.useCallback(C=>{b?$D(C):C()},[b]),y=k.useCallback((C,I)=>{let{deletedFetchers:A,unstable_flushSync:L,unstable_viewTransitionOpts:$}=I;A.forEach(z=>E.current.delete(z)),C.fetchers.forEach((z,Y)=>{z.data!==void 0&&E.current.set(Y,z.data)});let F=n.window==null||typeof n.window.document.startViewTransition!="function";if(!$||F){L?md(()=>o(C)):w(()=>o(C));return}if(L){md(()=>{f&&(u&&u.resolve(),f.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:$.currentLocation,nextLocation:$.nextLocation})});let z=n.window.document.startViewTransition(()=>{md(()=>o(C))});z.finished.finally(()=>{md(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})})}),md(()=>m(z));return}f?(u&&u.resolve(),f.skipTransition(),g({state:C,currentLocation:$.currentLocation,nextLocation:$.nextLocation})):(a(C),c({isTransitioning:!0,flushSync:!1,currentLocation:$.currentLocation,nextLocation:$.nextLocation}))},[n.window,f,u,E,w]);k.useLayoutEffect(()=>n.subscribe(y),[n,y]),k.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new ND)},[l]),k.useEffect(()=>{if(u&&s&&n.window){let C=s,I=u.promise,A=n.window.document.startViewTransition(async()=>{w(()=>o(C)),await I});A.finished.finally(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})}),m(A)}},[w,s,u,n.window]),k.useEffect(()=>{u&&s&&i.location.key===s.location.key&&u.resolve()},[u,f,i.location,s]),k.useEffect(()=>{!l.isTransitioning&&p&&(a(p.state),c({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),g(void 0))},[l.isTransitioning,p]),k.useEffect(()=>{},[]);let _=k.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:C=>n.navigate(C),push:(C,I,A)=>n.navigate(C,{state:I,preventScrollReset:A==null?void 0:A.preventScrollReset}),replace:(C,I,A)=>n.navigate(C,{replace:!0,state:I,preventScrollReset:A==null?void 0:A.preventScrollReset})}),[n]),R=n.basename||"/",T=k.useMemo(()=>({router:n,navigator:_,static:!1,basename:R}),[n,_,R]);return k.createElement(k.Fragment,null,k.createElement(ep.Provider,{value:T},k.createElement(Zw.Provider,{value:i},k.createElement(jD.Provider,{value:E.current},k.createElement(bT.Provider,{value:l},k.createElement(xD,{basename:R,location:i.location,navigationType:i.historyAction,navigator:_,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?k.createElement(DD,{routes:n.routes,future:n.future,state:i}):t))))),null)}function DD(e){let{routes:t,future:n,state:r}=e;return lD(t,void 0,r,n)}const BD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",FD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wT=k.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,unstable_viewTransition:d}=t,f=yT(t,ED),{basename:m}=k.useContext(Ws),p,g=!1;if(typeof c=="string"&&FD.test(c)&&(p=c,BD))try{let y=new URL(window.location.href),_=c.startsWith("//")?new URL(y.protocol+c):new URL(c),R=ko(_.pathname,m);_.origin===y.origin&&R!=null?c=R+_.search+_.hash:g=!0}catch{}let E=iD(c,{relative:i}),b=WD(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,unstable_viewTransition:d});function w(y){r&&r(y),y.defaultPrevented||b(y)}return k.createElement("a",vu({},f,{href:p||E,onClick:g||o?r:w,ref:n,target:l}))}),zD=k.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,unstable_viewTransition:c,children:u}=t,d=yT(t,RD),f=Fg(l,{relative:d.relative}),m=Gs(),p=k.useContext(Zw),{navigator:g,basename:E}=k.useContext(Ws),b=p!=null&&HD(f)&&c===!0,w=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,y=m.pathname,_=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(y=y.toLowerCase(),_=_?_.toLowerCase():null,w=w.toLowerCase()),_&&E&&(_=ko(_,E)||_);const R=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let T=y===w||!s&&y.startsWith(w)&&y.charAt(R)==="/",C=_!=null&&(_===w||!s&&_.startsWith(w)&&_.charAt(w.length)==="/"),I={isActive:T,isPending:C,isTransitioning:b},A=T?r:void 0,L;typeof o=="function"?L=o(I):L=[o,T?"active":null,C?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let $=typeof a=="function"?a(I):a;return k.createElement(wT,vu({},d,{"aria-current":A,className:L,ref:n,style:$,to:l,unstable_viewTransition:c}),typeof u=="function"?u(I):u)});var t1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(t1||(t1={}));var OC;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(OC||(OC={}));function UD(e){let t=k.useContext(ep);return t||kt(!1),t}function WD(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=t===void 0?{}:t,l=Ha(),c=Gs(),u=Fg(e,{relative:s});return k.useCallback(d=>{if(CD(d,n)){d.preventDefault();let f=r!==void 0?r:Nl(c)===Nl(u);l(e,{replace:f,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[c,l,u,r,i,n,e,o,s,a])}function GD(e){let t=k.useRef(e1(e)),n=k.useRef(!1),r=Gs(),i=k.useMemo(()=>kD(r.search,n.current?null:t.current),[r.search]),o=Ha(),s=k.useCallback((a,l)=>{const c=e1(typeof a=="function"?a(i):a);n.current=!0,o("?"+c,l)},[o,i]);return[i,s]}function HD(e,t){t===void 0&&(t={});let n=k.useContext(bT);n==null&&kt(!1);let{basename:r}=UD(t1.useViewTransitionState),i=Fg(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=ko(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=ko(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Yb(i.pathname,s)!=null||Yb(i.pathname,o)!=null}function Ie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r[i]=e[i].reduce((o,s)=>{if(s){const a=t(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}function Dl(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n=0)continue;i[o]=n[o]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(t0)),t0.exports}function CT(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var YD=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,QD=CT(function(e){return YD.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});const kT=globalThis||void 0||self;function XD(e){if(e.sheet)return e.sheet;for(var t=0;t0?lr(Du,--ii):0,yu--,Un===10&&(yu=1,Ug--),Un}function xi(){return Un=ii2||Lf(Un)>3?"":" "}function uB(e,t){for(;--t&&xi()&&!(Un<48||Un>102||Un>57&&Un<65||Un>70&&Un<97););return rp(e,Wh()+(t<6&&Jo()==32&&xi()==32))}function r1(e){for(;xi();)switch(Un){case e:return ii;case 34:case 39:e!==34&&e!==39&&r1(Un);break;case 40:e===41&&r1(e);break;case 92:xi();break}return ii}function dB(e,t){for(;xi()&&e+Un!==57;)if(e+Un===84&&Jo()===47)break;return"/*"+rp(t,ii-1)+"*"+zg(e===47?e:xi())}function fB(e){for(;!Lf(Jo());)xi();return rp(e,ii)}function pB(e){return LT(Hh("",null,null,null,[""],e=OT(e),0,[0],e))}function Hh(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,d=s,f=0,m=0,p=0,g=1,E=1,b=1,w=0,y="",_=i,R=o,T=r,C=y;E;)switch(p=w,w=xi()){case 40:if(p!=108&&lr(C,d-1)==58){n1(C+=Ut(Gh(w),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:C+=Gh(w);break;case 9:case 10:case 13:case 32:C+=cB(p);break;case 92:C+=uB(Wh()-1,7);continue;case 47:switch(Jo()){case 42:case 47:ah(hB(dB(xi(),Wh()),t,n),l);break;default:C+="/"}break;case 123*g:a[c++]=Uo(C)*b;case 125*g:case 59:case 0:switch(w){case 0:case 125:E=0;case 59+u:b==-1&&(C=Ut(C,/\f/g,"")),m>0&&Uo(C)-d&&ah(m>32?MC(C+";",r,n,d-1):MC(Ut(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(ah(T=IC(C,t,n,c,u,i,a,y,_=[],R=[],d),o),w===123)if(u===0)Hh(C,t,T,T,_,o,d,a,R);else switch(f===99&&lr(C,3)===110?100:f){case 100:case 108:case 109:case 115:Hh(e,T,T,r&&ah(IC(e,T,T,0,0,i,a,y,i,_=[],d),R),i,R,d,a,r?_:R);break;default:Hh(C,T,T,T,[""],R,0,a,R)}}c=u=m=0,g=b=1,y=C="",d=s;break;case 58:d=1+Uo(C),m=p;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&lB()==125)continue}switch(C+=zg(w),w*g){case 38:b=u>0?1:(C+="\f",-1);break;case 44:a[c++]=(Uo(C)-1)*b,b=1;break;case 64:Jo()===45&&(C+=Gh(xi())),f=Jo(),u=d=Uo(y=C+=fB(Wh())),w++;break;case 45:p===45&&Uo(C)==2&&(g=0)}}return o}function IC(e,t,n,r,i,o,s,a,l,c,u){for(var d=i-1,f=i===0?o:[""],m=ix(f),p=0,g=0,E=0;p0?f[b]+" "+w:Ut(w,/&\f/g,f[b])))&&(l[E++]=y);return Wg(e,t,n,i===0?nx:a,l,c,u)}function hB(e,t,n){return Wg(e,t,n,ET,zg(aB()),Of(e,2,-2),0)}function MC(e,t,n,r){return Wg(e,t,n,rx,Of(e,0,r),Of(e,r+1,-1),r)}function ru(e,t){for(var n="",r=ix(e),i=0;i6)switch(lr(e,t+1)){case 109:if(lr(e,t+4)!==45)break;case 102:return Ut(e,/(.+:)(.+)-([^]+)/,"$1"+zt+"$2-$3$1"+Lm+(lr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~n1(e,"stretch")?jT(Ut(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(lr(e,t+1)!==115)break;case 6444:switch(lr(e,Uo(e)-3-(~n1(e,"!important")&&10))){case 107:return Ut(e,":",":"+zt)+e;case 101:return Ut(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+zt+(lr(e,14)===45?"inline-":"")+"box$3$1"+zt+"$2$3$1"+_r+"$2box$3")+e}break;case 5936:switch(lr(e,t+11)){case 114:return zt+e+_r+Ut(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return zt+e+_r+Ut(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return zt+e+_r+Ut(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return zt+e+_r+e+e}return e}var _B=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case rx:t.return=jT(t.value,t.length);break;case RT:return ru([gd(t,{value:Ut(t.value,"@","@"+zt)})],i);case nx:if(t.length)return sB(t.props,function(o){switch(oB(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ru([gd(t,{props:[Ut(o,/:(read-\w+)/,":"+Lm+"$1")]})],i);case"::placeholder":return ru([gd(t,{props:[Ut(o,/:(plac\w+)/,":"+zt+"input-$1")]}),gd(t,{props:[Ut(o,/:(plac\w+)/,":"+Lm+"$1")]}),gd(t,{props:[Ut(o,/:(plac\w+)/,_r+"input-$1")]})],i)}return""})}},CB=[_B],IT=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var E=g.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||CB,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var E=g.getAttribute("data-emotion").split(" "),b=1;b=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var NB={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},AB=/[A-Z]|^ms/g,DB=/_EMO_([^_]+?)_([^]*?)_EMO_/g,FT=function(t){return t.charCodeAt(1)===45},NC=function(t){return t!=null&&typeof t!="boolean"},n0=CT(function(e){return FT(e)?e:e.replace(AB,"-$&").toLowerCase()}),AC=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(DB,function(r,i,o){return Wo={name:i,styles:o,next:Wo},i})}return NB[t]!==1&&!FT(t)&&typeof n=="number"&&n!==0?n+"px":n};function jf(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Wo={name:n.name,styles:n.styles,next:Wo},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Wo={name:r.name,styles:r.styles,next:Wo},r=r.next;var i=n.styles+";";return i}return BB(e,t,n)}case"function":{if(e!==void 0){var o=Wo,s=n(e);return Wo=o,jf(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function BB(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?GB:HB},zC=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},VB=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return DT(n,r,i),zB(function(){return BT(n,r,i)}),null},KB=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var a=zC(t,n,r),l=a||FC(i),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,m=1;mt(QB(i)?n:i):t;return v.jsx(WB,{styles:r})}function cx(e,t){return i1(e,t)}const VT=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},XB=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:HT,StyledEngineProvider:YB,ThemeContext:ip,css:GT,default:cx,internal_processStyles:VT,keyframes:ev},Symbol.toStringTag,{value:"Module"})),KT=zs(XB);function ys(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function qT(e){if(!ys(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=qT(e[n])}),t}function Ur(e,t,n={clone:!0}){const r=n.clone?N({},e):e;return ys(e)&&ys(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(ys(t[i])&&i in e&&ys(e[i])?r[i]=Ur(e[i],t[i],n):n.clone?r[i]=ys(t[i])?qT(t[i]):t[i]:r[i]=t[i])}),r}const JB=Object.freeze(Object.defineProperty({__proto__:null,default:Ur,isPlainObject:ys},Symbol.toStringTag,{value:"Module"})),ZB=zs(JB),e5=zs(KD);var YT={exports:{}},Xt={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var ux=Symbol.for("react.element"),dx=Symbol.for("react.portal"),tv=Symbol.for("react.fragment"),nv=Symbol.for("react.strict_mode"),rv=Symbol.for("react.profiler"),iv=Symbol.for("react.provider"),ov=Symbol.for("react.context"),t5=Symbol.for("react.server_context"),sv=Symbol.for("react.forward_ref"),av=Symbol.for("react.suspense"),lv=Symbol.for("react.suspense_list"),cv=Symbol.for("react.memo"),uv=Symbol.for("react.lazy"),n5=Symbol.for("react.offscreen"),QT;QT=Symbol.for("react.module.reference");function to(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ux:switch(e=e.type,e){case tv:case rv:case nv:case av:case lv:return e;default:switch(e=e&&e.$$typeof,e){case t5:case ov:case sv:case uv:case cv:case iv:return e;default:return t}}case dx:return t}}}Xt.ContextConsumer=ov;Xt.ContextProvider=iv;Xt.Element=ux;Xt.ForwardRef=sv;Xt.Fragment=tv;Xt.Lazy=uv;Xt.Memo=cv;Xt.Portal=dx;Xt.Profiler=rv;Xt.StrictMode=nv;Xt.Suspense=av;Xt.SuspenseList=lv;Xt.isAsyncMode=function(){return!1};Xt.isConcurrentMode=function(){return!1};Xt.isContextConsumer=function(e){return to(e)===ov};Xt.isContextProvider=function(e){return to(e)===iv};Xt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ux};Xt.isForwardRef=function(e){return to(e)===sv};Xt.isFragment=function(e){return to(e)===tv};Xt.isLazy=function(e){return to(e)===uv};Xt.isMemo=function(e){return to(e)===cv};Xt.isPortal=function(e){return to(e)===dx};Xt.isProfiler=function(e){return to(e)===rv};Xt.isStrictMode=function(e){return to(e)===nv};Xt.isSuspense=function(e){return to(e)===av};Xt.isSuspenseList=function(e){return to(e)===lv};Xt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===tv||e===rv||e===nv||e===av||e===lv||e===n5||typeof e=="object"&&e!==null&&(e.$$typeof===uv||e.$$typeof===cv||e.$$typeof===iv||e.$$typeof===ov||e.$$typeof===sv||e.$$typeof===QT||e.getModuleId!==void 0)};Xt.typeOf=to;YT.exports=Xt;var UC=YT.exports;const r5=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function XT(e){const t=`${e}`.match(r5);return t&&t[1]||""}function JT(e,t=""){return e.displayName||e.name||XT(e)||t}function WC(e,t,n){const r=JT(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function i5(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return JT(e,"Component");if(typeof e=="object")switch(e.$$typeof){case UC.ForwardRef:return WC(e,e.render,"ForwardRef");case UC.Memo:return WC(e,e.type,"memo");default:return}}}const o5=Object.freeze(Object.defineProperty({__proto__:null,default:i5,getFunctionName:XT},Symbol.toStringTag,{value:"Module"})),s5=zs(o5),a5=["values","unit","step"],l5=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>N({},n,{[r.key]:r.val}),{})};function ZT(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ie(e,a5),o=l5(t),s=Object.keys(o);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,m){const p=s.indexOf(m);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(p!==-1&&typeof t[s[p]]=="number"?t[s[p]]:m)-r/100}${n})`}function u(f){return s.indexOf(f)+1`@media (min-width:${fx[e]}px)`};function Eo(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||GC;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||GC;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||fx).indexOf(a)!==-1){const l=o.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function eO(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function tO(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function d5(e,...t){const n=eO(e),r=[n,...t].reduce((i,o)=>Ur(i,o),{});return tO(Object.keys(n),r)}function f5(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((i,o)=>{o{e[i]!=null&&(n[i]=!0)}),n}function r0({values:e,breakpoints:t,base:n}){const r=n||f5(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,a,l)=>(Array.isArray(e)?(s[a]=e[l]!=null?e[l]:e[o],o=l):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[o],o=a):s[a]=e,s),{})}function bu(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function jm(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=bu(e,n)||r,t&&(i=t(i,r,e)),i}function An(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,c=bu(l,r)||{};return Eo(s,a,d=>{let f=jm(c,i,d);return d===f&&typeof d=="string"&&(f=jm(c,i,`${t}${d==="default"?"":ye(d)}`,d)),n===!1?f:{[n]:f}})};return o.propTypes={},o.filterProps=[t],o}function p5(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const h5={m:"margin",p:"padding"},m5={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},HC={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},g5=p5(e=>{if(e.length>2)if(HC[e])e=HC[e];else return[e];const[t,n]=e.split(""),r=h5[t],i=m5[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),px=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],hx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...px,...hx];function op(e,t,n,r){var i;const o=(i=bu(e,t,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function mx(e){return op(e,"spacing",8)}function Bl(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function v5(e,t){return n=>e.reduce((r,i)=>(r[i]=Bl(t,n),r),{})}function y5(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=g5(n),o=v5(i,r),s=e[n];return Eo(e,s,o)}function nO(e,t){const n=mx(e.theme);return Object.keys(e).map(r=>y5(e,t,r,n)).reduce(qd,{})}function Pn(e){return nO(e,px)}Pn.propTypes={};Pn.filterProps=px;function Tn(e){return nO(e,hx)}Tn.propTypes={};Tn.filterProps=hx;function b5(e=8){if(e.mui)return e;const t=mx({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function dv(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?qd(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function zi(e){return typeof e!="number"?e:`${e}px solid`}function no(e,t){return An({prop:e,themeKey:"borders",transform:t})}const w5=no("border",zi),x5=no("borderTop",zi),S5=no("borderRight",zi),_5=no("borderBottom",zi),C5=no("borderLeft",zi),k5=no("borderColor"),E5=no("borderTopColor"),R5=no("borderRightColor"),P5=no("borderBottomColor"),T5=no("borderLeftColor"),O5=no("outline",zi),L5=no("outlineColor"),fv=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=op(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Bl(t,r)});return Eo(e,e.borderRadius,n)}return null};fv.propTypes={};fv.filterProps=["borderRadius"];dv(w5,x5,S5,_5,C5,k5,E5,R5,P5,T5,fv,O5,L5);const pv=e=>{if(e.gap!==void 0&&e.gap!==null){const t=op(e.theme,"spacing",8),n=r=>({gap:Bl(t,r)});return Eo(e,e.gap,n)}return null};pv.propTypes={};pv.filterProps=["gap"];const hv=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=op(e.theme,"spacing",8),n=r=>({columnGap:Bl(t,r)});return Eo(e,e.columnGap,n)}return null};hv.propTypes={};hv.filterProps=["columnGap"];const mv=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=op(e.theme,"spacing",8),n=r=>({rowGap:Bl(t,r)});return Eo(e,e.rowGap,n)}return null};mv.propTypes={};mv.filterProps=["rowGap"];const j5=An({prop:"gridColumn"}),I5=An({prop:"gridRow"}),M5=An({prop:"gridAutoFlow"}),$5=An({prop:"gridAutoColumns"}),N5=An({prop:"gridAutoRows"}),A5=An({prop:"gridTemplateColumns"}),D5=An({prop:"gridTemplateRows"}),B5=An({prop:"gridTemplateAreas"}),F5=An({prop:"gridArea"});dv(pv,hv,mv,j5,I5,M5,$5,N5,A5,D5,B5,F5);function iu(e,t){return t==="grey"?t:e}const z5=An({prop:"color",themeKey:"palette",transform:iu}),U5=An({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:iu}),W5=An({prop:"backgroundColor",themeKey:"palette",transform:iu});dv(z5,U5,W5);function hi(e){return e<=1&&e!==0?`${e*100}%`:e}const G5=An({prop:"width",transform:hi}),gx=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||fx[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:hi(n)}};return Eo(e,e.maxWidth,t)}return null};gx.filterProps=["maxWidth"];const H5=An({prop:"minWidth",transform:hi}),V5=An({prop:"height",transform:hi}),K5=An({prop:"maxHeight",transform:hi}),q5=An({prop:"minHeight",transform:hi});An({prop:"size",cssProperty:"width",transform:hi});An({prop:"size",cssProperty:"height",transform:hi});const Y5=An({prop:"boxSizing"});dv(G5,gx,H5,V5,K5,q5,Y5);const Q5={border:{themeKey:"borders",transform:zi},borderTop:{themeKey:"borders",transform:zi},borderRight:{themeKey:"borders",transform:zi},borderBottom:{themeKey:"borders",transform:zi},borderLeft:{themeKey:"borders",transform:zi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:zi},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:fv},color:{themeKey:"palette",transform:iu},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:iu},backgroundColor:{themeKey:"palette",transform:iu},p:{style:Tn},pt:{style:Tn},pr:{style:Tn},pb:{style:Tn},pl:{style:Tn},px:{style:Tn},py:{style:Tn},padding:{style:Tn},paddingTop:{style:Tn},paddingRight:{style:Tn},paddingBottom:{style:Tn},paddingLeft:{style:Tn},paddingX:{style:Tn},paddingY:{style:Tn},paddingInline:{style:Tn},paddingInlineStart:{style:Tn},paddingInlineEnd:{style:Tn},paddingBlock:{style:Tn},paddingBlockStart:{style:Tn},paddingBlockEnd:{style:Tn},m:{style:Pn},mt:{style:Pn},mr:{style:Pn},mb:{style:Pn},ml:{style:Pn},mx:{style:Pn},my:{style:Pn},margin:{style:Pn},marginTop:{style:Pn},marginRight:{style:Pn},marginBottom:{style:Pn},marginLeft:{style:Pn},marginX:{style:Pn},marginY:{style:Pn},marginInline:{style:Pn},marginInlineStart:{style:Pn},marginInlineEnd:{style:Pn},marginBlock:{style:Pn},marginBlockStart:{style:Pn},marginBlockEnd:{style:Pn},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:pv},rowGap:{style:mv},columnGap:{style:hv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:hi},maxWidth:{style:gx},minWidth:{transform:hi},height:{transform:hi},maxHeight:{transform:hi},minHeight:{transform:hi},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},sp=Q5;function X5(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function J5(e,t){return typeof e=="function"?e(t):e}function rO(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=bu(i,c)||{};return d?d(s):Eo(s,r,p=>{let g=jm(f,u,p);return p===g&&typeof p=="string"&&(g=jm(f,u,`${n}${p==="default"?"":ye(p)}`,p)),l===!1?g:{[l]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:sp;function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const u=eO(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(m=>{const p=J5(c[m],o);if(p!=null)if(typeof p=="object")if(s[m])f=qd(f,e(m,p,o,s));else{const g=Eo({theme:o},p,E=>({[m]:E}));X5(g,p)?f[m]=t({sx:p,theme:o}):f=qd(f,g)}else f=qd(f,e(m,p,o,s))}),tO(d,f)}return Array.isArray(i)?i.map(a):a(i)}return t}const Bu=rO();Bu.filterProps=["sx"];function iO(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const Z5=["breakpoints","palette","spacing","shape"];function ap(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Ie(e,Z5),a=ZT(n),l=b5(i);let c=Ur({breakpoints:a,direction:"ltr",components:{},palette:N({mode:"light"},r),spacing:l,shape:N({},u5,o)},s);return c.applyStyles=iO,c=t.reduce((u,d)=>Ur(u,d),c),c.unstable_sxConfig=N({},sp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Bu({sx:d,theme:this})},c}const e4=Object.freeze(Object.defineProperty({__proto__:null,default:ap,private_createBreakpoints:ZT,unstable_applyStyles:iO},Symbol.toStringTag,{value:"Module"})),t4=zs(e4),n4=["sx"],r4=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:sp;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function gv(e){const{sx:t}=e,n=Ie(e,n4),{systemProps:r,otherProps:i}=r4(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return ys(a)?N({},r,a):r}:o=N({},r,t),N({},i,{sx:o})}const i4=Object.freeze(Object.defineProperty({__proto__:null,default:Bu,extendSxProp:gv,unstable_createStyleFunctionSx:rO,unstable_defaultSxConfig:sp},Symbol.toStringTag,{value:"Module"})),o4=zs(i4);var Fu=eo;Object.defineProperty(np,"__esModule",{value:!0});var s4=np.default=b4;np.shouldForwardProp=Vh;np.systemDefaultTheme=void 0;var Ni=Fu(_T()),s1=Fu(qD()),VC=p4(KT),a4=ZB;Fu(e5);Fu(s5);var l4=Fu(t4),c4=Fu(o4);const u4=["ownerState"],d4=["variants"],f4=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function oO(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(oO=function(r){return r?n:t})(e)}function p4(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=oO(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function h4(e){return Object.keys(e).length===0}function m4(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Vh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const g4=np.systemDefaultTheme=(0,l4.default)(),v4=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function lh({defaultTheme:e,theme:t,themeId:n}){return h4(t)?e:t[n]||t}function y4(e){return e?(t,n)=>n[e]:null}function Kh(e,t){let{ownerState:n}=t,r=(0,s1.default)(t,u4);const i=typeof e=="function"?e((0,Ni.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Kh(o,(0,Ni.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,s1.default)(i,d4);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Ni.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,Ni.default)({ownerState:n},r,n)):l.style))}),a}return i}function b4(e={}){const{themeId:t,defaultTheme:n=g4,rootShouldForwardProp:r=Vh,slotShouldForwardProp:i=Vh}=e,o=s=>(0,c4.default)((0,Ni.default)({},s,{theme:lh((0,Ni.default)({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,VC.internal_processStyles)(s,R=>R.filter(T=>!(T!=null&&T.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=y4(v4(c))}=a,m=(0,s1.default)(a,f4),p=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let E,b=Vh;c==="Root"||c==="root"?b=r:c?b=i:m4(s)&&(b=void 0);const w=(0,VC.default)(s,(0,Ni.default)({shouldForwardProp:b,label:E},m)),y=R=>typeof R=="function"&&R.__emotion_real!==R||(0,a4.isPlainObject)(R)?T=>Kh(R,(0,Ni.default)({},T,{theme:lh({theme:T.theme,defaultTheme:n,themeId:t})})):R,_=(R,...T)=>{let C=y(R);const I=T?T.map(y):[];l&&f&&I.push($=>{const F=lh((0,Ni.default)({},$,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[l]||!F.components[l].styleOverrides)return null;const z=F.components[l].styleOverrides,Y={};return Object.entries(z).forEach(([J,Z])=>{Y[J]=Kh(Z,(0,Ni.default)({},$,{theme:F}))}),f($,Y)}),l&&!p&&I.push($=>{var F;const z=lh((0,Ni.default)({},$,{defaultTheme:n,themeId:t})),Y=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return Kh({variants:Y},(0,Ni.default)({},$,{theme:z}))}),g||I.push(o);const A=I.length-T.length;if(Array.isArray(R)&&A>0){const $=new Array(A).fill("");C=[...R,...$],C.raw=[...R.raw,...$]}const L=w(C,...I);return s.muiName&&(L.muiName=s.muiName),L};return w.withConfig&&(_.withConfig=w.withConfig),_}}const KC=e=>e,w4=()=>{let e=KC;return{configure(t){e=t},generate(t){return e(t)},reset(){e=KC}}},x4=w4(),vx=x4,sO={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function pt(e,t,n="Mui"){const r=sO[t];return r?`${n}-${r}`:`${vx.generate(e)}-${t}`}function S4(e,t){return N({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Dn={};const _4=zs(VD);function C4(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const k4=Object.freeze(Object.defineProperty({__proto__:null,default:C4},Symbol.toStringTag,{value:"Module"})),E4=zs(k4);var aO=eo;Object.defineProperty(Dn,"__esModule",{value:!0});var Mt=Dn.alpha=dO;Dn.blend=A4;Dn.colorChannel=void 0;var Im=Dn.darken=bx;Dn.decomposeColor=Yi;var a1=Dn.emphasize=fO,R4=Dn.getContrastRatio=j4;Dn.getLuminance=$m;Dn.hexToRgb=lO;Dn.hslToRgb=uO;var Mm=Dn.lighten=wx;Dn.private_safeAlpha=I4;Dn.private_safeColorChannel=void 0;Dn.private_safeDarken=M4;Dn.private_safeEmphasize=N4;Dn.private_safeLighten=$4;Dn.recomposeColor=zu;Dn.rgbToHex=L4;var qC=aO(_4),P4=aO(E4);function yx(e,t=0,n=1){return(0,P4.default)(e,t,n)}function lO(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function T4(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Yi(e){if(e.type)return e;if(e.charAt(0)==="#")return Yi(lO(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,qC.default)(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,qC.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const cO=e=>{const t=Yi(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Dn.colorChannel=cO;const O4=(e,t)=>{try{return cO(e)}catch{return e}};Dn.private_safeColorChannel=O4;function zu(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function L4(e){if(e.indexOf("#")===0)return e;const{values:t}=Yi(e);return`#${t.map((n,r)=>T4(r===3?Math.round(255*n):n)).join("")}`}function uO(e){e=Yi(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),zu({type:a,values:l})}function $m(e){e=Yi(e);let t=e.type==="hsl"||e.type==="hsla"?Yi(uO(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function j4(e,t){const n=$m(e),r=$m(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function dO(e,t){return e=Yi(e),t=yx(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,zu(e)}function I4(e,t,n){try{return dO(e,t)}catch{return e}}function bx(e,t){if(e=Yi(e),t=yx(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return zu(e)}function M4(e,t,n){try{return bx(e,t)}catch{return e}}function wx(e,t){if(e=Yi(e),t=yx(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return zu(e)}function $4(e,t,n){try{return wx(e,t)}catch{return e}}function fO(e,t=.15){return $m(e)>.5?bx(e,t):wx(e,t)}function N4(e,t,n){try{return fO(e,t)}catch{return e}}function A4(e,t,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),o=Yi(e),s=Yi(t),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return zu({type:"rgb",values:a})}const D4={black:"#000",white:"#fff"},If=D4,B4={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},F4=B4,z4={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},hc=z4,U4={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},mc=U4,W4={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},vd=W4,G4={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},gc=G4,H4={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},vc=H4,V4={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},yc=V4,K4=["mode","contrastThreshold","tonalOffset"],YC={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:If.white,default:If.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},i0={text:{primary:If.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:If.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function QC(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Mm(e.main,i):t==="dark"&&(e.dark=Im(e.main,o)))}function q4(e="light"){return e==="dark"?{main:gc[200],light:gc[50],dark:gc[400]}:{main:gc[700],light:gc[400],dark:gc[800]}}function Y4(e="light"){return e==="dark"?{main:hc[200],light:hc[50],dark:hc[400]}:{main:hc[500],light:hc[300],dark:hc[700]}}function Q4(e="light"){return e==="dark"?{main:mc[500],light:mc[300],dark:mc[700]}:{main:mc[700],light:mc[400],dark:mc[800]}}function X4(e="light"){return e==="dark"?{main:vc[400],light:vc[300],dark:vc[700]}:{main:vc[700],light:vc[500],dark:vc[900]}}function J4(e="light"){return e==="dark"?{main:yc[400],light:yc[300],dark:yc[700]}:{main:yc[800],light:yc[500],dark:yc[900]}}function Z4(e="light"){return e==="dark"?{main:vd[400],light:vd[300],dark:vd[700]}:{main:"#ed6c02",light:vd[500],dark:vd[900]}}function e3(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Ie(e,K4),o=e.primary||q4(t),s=e.secondary||Y4(t),a=e.error||Q4(t),l=e.info||X4(t),c=e.success||J4(t),u=e.warning||Z4(t);function d(g){return R4(g,i0.text.primary)>=n?i0.text.primary:YC.text.primary}const f=({color:g,name:E,mainShade:b=500,lightShade:w=300,darkShade:y=700})=>{if(g=N({},g),!g.main&&g[b]&&(g.main=g[b]),!g.hasOwnProperty("main"))throw new Error(Dl(11,E?` (${E})`:"",b));if(typeof g.main!="string")throw new Error(Dl(12,E?` (${E})`:"",JSON.stringify(g.main)));return QC(g,"light",w,r),QC(g,"dark",y,r),g.contrastText||(g.contrastText=d(g.main)),g},m={dark:i0,light:YC};return Ur(N({common:N({},If),mode:t,primary:f({color:o,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:F4,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},m[t]),i)}const t3=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function n3(e){return Math.round(e*1e5)/1e5}const XC={textTransform:"uppercase"},JC='"Roboto", "Helvetica", "Arial", sans-serif';function r3(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=JC,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,f=Ie(n,t3),m=i/14,p=d||(b=>`${b/c*m}rem`),g=(b,w,y,_,R)=>N({fontFamily:r,fontWeight:b,fontSize:p(w),lineHeight:y},r===JC?{letterSpacing:`${n3(_/w)}em`}:{},R,u),E={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,XC),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,XC),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ur(N({htmlFontSize:c,pxToRem:p,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},E),f,{clone:!1})}const i3=.2,o3=.14,s3=.12;function mn(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${i3})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${o3})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${s3})`].join(",")}const a3=["none",mn(0,2,1,-1,0,1,1,0,0,1,3,0),mn(0,3,1,-2,0,2,2,0,0,1,5,0),mn(0,3,3,-2,0,3,4,0,0,1,8,0),mn(0,2,4,-1,0,4,5,0,0,1,10,0),mn(0,3,5,-1,0,5,8,0,0,1,14,0),mn(0,3,5,-1,0,6,10,0,0,1,18,0),mn(0,4,5,-2,0,7,10,1,0,2,16,1),mn(0,5,5,-3,0,8,10,1,0,3,14,2),mn(0,5,6,-3,0,9,12,1,0,3,16,2),mn(0,6,6,-3,0,10,14,1,0,4,18,3),mn(0,6,7,-4,0,11,15,1,0,4,20,3),mn(0,7,8,-4,0,12,17,2,0,5,22,4),mn(0,7,8,-4,0,13,19,2,0,5,24,4),mn(0,7,9,-4,0,14,21,2,0,5,26,4),mn(0,8,9,-5,0,15,22,2,0,6,28,5),mn(0,8,10,-5,0,16,24,2,0,6,30,5),mn(0,8,11,-5,0,17,26,2,0,6,32,5),mn(0,9,11,-5,0,18,28,2,0,7,34,6),mn(0,9,12,-6,0,19,29,2,0,7,36,6),mn(0,10,13,-6,0,20,31,3,0,8,38,7),mn(0,10,13,-6,0,21,33,3,0,8,40,7),mn(0,10,14,-6,0,22,35,3,0,8,42,7),mn(0,11,14,-7,0,23,36,3,0,9,44,8),mn(0,11,15,-7,0,24,38,3,0,9,46,8)],l3=["duration","easing","delay"],c3={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},pO={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ZC(e){return`${Math.round(e)}ms`}function u3(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function d3(e){const t=N({},c3,e.easing),n=N({},pO,e.duration);return N({getAutoHeightDuration:u3,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0}=o;return Ie(o,l3),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:ZC(s)} ${a} ${typeof l=="string"?l:ZC(l)}`).join(",")}},e,{easing:t,duration:n})}const f3={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},p3=f3,h3=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function xx(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Ie(e,h3);if(e.vars)throw new Error(Dl(18));const a=e3(r),l=ap(e);let c=Ur(l,{mixins:S4(l.breakpoints,n),palette:a,shadows:a3.slice(),typography:r3(a,o),transitions:d3(i),zIndex:N({},p3)});return c=Ur(c,s),c=t.reduce((u,d)=>Ur(u,d),c),c.unstable_sxConfig=N({},sp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Bu({sx:d,theme:this})},c}const m3=xx(),vv=m3,Fl="$$material";function hO(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const g3=e=>hO(e)&&e!=="classes",fr=g3,Ee=s4({themeId:Fl,defaultTheme:vv,rootShouldForwardProp:fr});function Sx(e,t){const n=N({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=N({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=N({},o),Object.keys(i).forEach(s=>{n[r][s]=Sx(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function mO(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Sx(t.components[n].defaultProps,r)}function v3(e){return Object.keys(e).length===0}function _x(e=null){const t=k.useContext(ip);return!t||v3(t)?e:t}const y3=ap();function yv(e=y3){return _x(e)}function gO({props:e,name:t,defaultTheme:n,themeId:r}){let i=yv(n);return r&&(i=i[r]||i),mO({theme:i,name:t,props:e})}function vt({props:e,name:t}){return gO({props:e,name:t,defaultTheme:vv,themeId:Fl})}const ek={};function b3(e,t){const n=k.useRef(ek);return n.current===ek&&(n.current=e(t)),n}const w3=[];function x3(e){k.useEffect(e,w3)}class lp{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new lp}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function ba(){const e=b3(lp.create).current;return x3(e.disposeEffect),e}let bv=!0,l1=!1;const S3=new lp,_3={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function C3(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&_3[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function k3(e){e.metaKey||e.altKey||e.ctrlKey||(bv=!0)}function o0(){bv=!1}function E3(){this.visibilityState==="hidden"&&l1&&(bv=!0)}function R3(e){e.addEventListener("keydown",k3,!0),e.addEventListener("mousedown",o0,!0),e.addEventListener("pointerdown",o0,!0),e.addEventListener("touchstart",o0,!0),e.addEventListener("visibilitychange",E3,!0)}function P3(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return bv||C3(t)}function wv(){const e=k.useCallback(i=>{i!=null&&R3(i.ownerDocument)},[]),t=k.useRef(!1);function n(){return t.current?(l1=!0,S3.start(100,()=>{l1=!1}),t.current=!1,!0):!1}function r(i){return P3(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Nm(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Nm(n,t)})},e)}function ht(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=pt(e,i,n)}),r}function T3(e){return pt("MuiTypography",e)}ht("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const O3=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],L3=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${ye(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return ft(a,T3,s)},j3=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ye(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>N({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),tk={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},I3={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},M3=e=>I3[e]||e,$3=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiTypography"}),i=M3(r.color),o=gv(N({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:d=!1,variant:f="body1",variantMapping:m=tk}=o,p=Ie(o,O3),g=N({},o,{align:s,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:d,variant:f,variantMapping:m}),E=l||(d?"p":m[f]||tk[f])||"span",b=L3(g);return v.jsx(j3,N({as:E,ref:n,ownerState:g,className:Ae(b.root,a)},p))}),xt=$3;function N3(e){return pt("MuiLink",e)}const A3=ht("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),D3=A3;function B3({styles:e,themeId:t,defaultTheme:n={}}){const r=yv(n),i=typeof e=="function"?e(t&&r[t]||r):e;return v.jsx(HT,{styles:i})}const F3=["className","component"];function z3(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=cx("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(Bu);return k.forwardRef(function(l,c){const u=yv(n),d=gv(l),{className:f,component:m="div"}=d,p=Ie(d,F3);return v.jsx(o,N({as:m,ref:c,className:Ae(f,i?i(r):r),theme:t&&u[t]||u},p))})}const U3=["ownerState"],W3=["variants"],G3=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function H3(e){return Object.keys(e).length===0}function V3(e){return typeof e=="string"&&e.charCodeAt(0)>96}function s0(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const K3=ap(),q3=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function ch({defaultTheme:e,theme:t,themeId:n}){return H3(t)?e:t[n]||t}function Y3(e){return e?(t,n)=>n[e]:null}function qh(e,t){let{ownerState:n}=t,r=Ie(t,U3);const i=typeof e=="function"?e(N({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>qh(o,N({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=Ie(i,W3);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(N({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style(N({ownerState:n},r,n)):l.style))}),a}return i}function Q3(e={}){const{themeId:t,defaultTheme:n=K3,rootShouldForwardProp:r=s0,slotShouldForwardProp:i=s0}=e,o=s=>Bu(N({},s,{theme:ch(N({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{VT(s,R=>R.filter(T=>!(T!=null&&T.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=Y3(q3(c))}=a,m=Ie(a,G3),p=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let E,b=s0;c==="Root"||c==="root"?b=r:c?b=i:V3(s)&&(b=void 0);const w=cx(s,N({shouldForwardProp:b,label:E},m)),y=R=>typeof R=="function"&&R.__emotion_real!==R||ys(R)?T=>qh(R,N({},T,{theme:ch({theme:T.theme,defaultTheme:n,themeId:t})})):R,_=(R,...T)=>{let C=y(R);const I=T?T.map(y):[];l&&f&&I.push($=>{const F=ch(N({},$,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[l]||!F.components[l].styleOverrides)return null;const z=F.components[l].styleOverrides,Y={};return Object.entries(z).forEach(([J,Z])=>{Y[J]=qh(Z,N({},$,{theme:F}))}),f($,Y)}),l&&!p&&I.push($=>{var F;const z=ch(N({},$,{defaultTheme:n,themeId:t})),Y=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return qh({variants:Y},N({},$,{theme:z}))}),g||I.push(o);const A=I.length-T.length;if(Array.isArray(R)&&A>0){const $=new Array(A).fill("");C=[...R,...$],C.raw=[...R.raw,...$]}const L=w(C,...I);return s.muiName&&(L.muiName=s.muiName),L};return w.withConfig&&(_.withConfig=w.withConfig),_}}const X3=Q3(),oi=typeof window<"u"?k.useLayoutEffect:k.useEffect;function J3(e,t,n,r,i){const[o,s]=k.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return oi(()=>{let a=!0;if(!n)return;const l=n(e),c=()=>{a&&s(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[e,n]),o}const vO=k.useSyncExternalStore;function Z3(e,t,n,r,i){const o=k.useCallback(()=>t,[t]),s=k.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return o},[o,e,r,i,n]),[a,l]=k.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addListener(d),()=>{u.removeListener(d)})]},[o,n,e]);return vO(l,a,s)}function Cx(e,t={}){const n=_x(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=mO({name:"MuiUseMediaQuery",props:t,theme:n});let l=typeof e=="function"?e(n):e;return l=l.replace(/^@media( ?)/m,""),(vO!==void 0?Z3:J3)(l,i,o,s,a)}function c1(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function xv(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function eF(e,t){return()=>null}function Yd(e,t){var n,r;return k.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Qn(e){return e&&e.ownerDocument||document}function ts(e){return Qn(e).defaultView||window}function tF(e,t){return()=>null}let nk=0;function nF(e){const[t,n]=k.useState(e),r=e||t;return k.useEffect(()=>{t==null&&(nk+=1,n(`mui-${nk}`))},[t]),r}const rk=sm.useId;function cp(e){if(rk!==void 0){const t=rk();return e??t}return nF(e)}function rF(e,t,n,r,i){return null}function wu({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=k.useRef(e!==void 0),[o,s]=k.useState(t),a=i?e:o,l=k.useCallback(c=>{i||s(c)},[]);return[a,l]}function Wi(e){const t=k.useRef(e);return oi(()=>{t.current=e}),k.useRef((...n)=>(0,t.current)(...n)).current}function yO(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const bO=e=>{const t=k.useRef({});return k.useEffect(()=>{t.current=e}),t.current};function iF(e){return k.Children.toArray(e).filter(t=>k.isValidElement(t))}const oF=k.createContext(null),wO=oF;function xO(){return k.useContext(wO)}const sF=typeof Symbol=="function"&&Symbol.for,aF=sF?Symbol.for("mui.nested"):"__THEME_NESTED__";function lF(e,t){return typeof t=="function"?t(e):N({},e,t)}function cF(e){const{children:t,theme:n}=e,r=xO(),i=k.useMemo(()=>{const o=r===null?n:lF(r,n);return o!=null&&(o[aF]=r!==null),o},[n,r]);return v.jsx(wO.Provider,{value:i,children:t})}const uF=["value"],SO=k.createContext();function dF(e){let{value:t}=e,n=Ie(e,uF);return v.jsx(SO.Provider,N({value:t??!0},n))}const kx=()=>{const e=k.useContext(SO);return e??!1},ik={};function ok(e,t,n,r=!1){return k.useMemo(()=>{const i=e&&t[e]||t;if(typeof n=="function"){const o=n(i),s=e?N({},t,{[e]:o}):o;return r?()=>s:s}return e?N({},t,{[e]:n}):N({},t,n)},[e,t,n,r])}function fF(e){const{children:t,theme:n,themeId:r}=e,i=_x(ik),o=xO()||ik,s=ok(r,i,n),a=ok(r,o,n,!0),l=s.direction==="rtl";return v.jsx(cF,{theme:a,children:v.jsx(ip.Provider,{value:s,children:v.jsx(dF,{value:l,children:t})})})}function Mf(e){"@babel/helpers - typeof";return Mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mf(e)}function pF(e,t){if(Mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hF(e){var t=pF(e,"string");return Mf(t)=="symbol"?t:t+""}const mF=["component","direction","spacing","divider","children","className","useFlexGap"],gF=ap(),vF=X3("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function yF(e){return gO({props:e,name:"MuiStack",defaultTheme:gF})}function bF(e,t){const n=k.Children.toArray(e).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],xF=({ownerState:e,theme:t})=>{let n=N({display:"flex",flexDirection:"column"},Eo({theme:t},r0({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=mx(t),i=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),o=r0({values:e.direction,base:i}),s=r0({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const f=c>0?o[u[c-1]]:"column";o[l]=f}}),n=Ur(n,Eo({theme:t},s,(l,c)=>e.useFlexGap?{gap:Bl(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${wF(c?o[c]:e.direction)}`]:Bl(r,l)}}))}return n=d5(t.breakpoints,n),n};function SF(e={}){const{createStyledComponent:t=vF,useThemeProps:n=yF,componentName:r="MuiStack"}=e,i=()=>ft({root:["root"]},l=>pt(r,l),{}),o=t(xF);return k.forwardRef(function(l,c){const u=n(l),d=gv(u),{component:f="div",direction:m="column",spacing:p=0,divider:g,children:E,className:b,useFlexGap:w=!1}=d,y=Ie(d,mF),_={direction:m,spacing:p,useFlexGap:w},R=i();return v.jsx(o,N({as:f,ownerState:_,ref:c,className:Ae(R.root,b)},y,{children:g?bF(E,g):E}))})}const _O={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},_F=e=>_O[e]||e,CF=({theme:e,ownerState:t})=>{const n=_F(t.color),r=bu(e,`palette.${n}`,!1)||t.color,i=bu(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:Mt(r,.4)},kF=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],EF=e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root",`underline${ye(i)}`,n==="button"&&"button",r&&"focusVisible"]};return ft(o,N3,t)},RF=Ee(xt,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${ye(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>N({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&N({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:CF({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${D3.focusVisible}`]:{outline:"auto"}})),PF=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiLink"}),{className:i,color:o="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:f}=r,m=Ie(r,kF),{isFocusVisibleRef:p,onBlur:g,onFocus:E,ref:b}=wv(),[w,y]=k.useState(!1),_=sn(n,b),R=A=>{g(A),p.current===!1&&y(!1),a&&a(A)},T=A=>{E(A),p.current===!0&&y(!0),l&&l(A)},C=N({},r,{color:o,component:s,focusVisible:w,underline:u,variant:d}),I=EF(C);return v.jsx(RF,N({color:o,className:Ae(I.root,i),classes:c,component:s,onBlur:R,onFocus:T,ref:_,ownerState:C,variant:d,sx:[...Object.keys(_O).includes(o)?[]:[{color:o}],...Array.isArray(f)?f:[f]]},m))}),vo=PF,sk=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function Pi(){const e=yv(vv);return e[Fl]||e}function TF(e){return pt("MuiPaper",e)}ht("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const OF=["className","component","elevation","square","variant"],LF=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return ft(o,TF,i)},jF=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return N({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&N({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Mt("#fff",sk(t.elevation))}, ${Mt("#fff",sk(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),IF=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=Ie(r,OF),u=N({},r,{component:o,elevation:s,square:a,variant:l}),d=LF(u);return v.jsx(jF,N({as:o,ownerState:u,className:Ae(d.root,i),ref:n},c))}),ss=IF;function MF(e){return pt("MuiAppBar",e)}ht("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const $F=["className","color","enableColorOnDark","position"],NF=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ye(t)}`,`position${ye(n)}`]};return ft(i,MF,r)},uh=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,AF=Ee(ss,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ye(n.position)}`],t[`color${ye(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return N({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&N({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&N({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&N({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:uh(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:uh(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:uh(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:uh(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),DF=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,l=Ie(r,$F),c=N({},r,{color:o,position:a,enableColorOnDark:s}),u=NF(c);return v.jsx(AF,N({square:!0,component:"header",ownerState:c,elevation:4,className:Ae(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))}),BF=DF;function FF(e){return pt("MuiToolbar",e)}ht("MuiToolbar",["root","gutters","regular","dense"]);const zF=["className","component","disableGutters","variant"],UF=e=>{const{classes:t,disableGutters:n,variant:r}=e;return ft({root:["root",!n&&"gutters",r]},FF,t)},WF=Ee("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>N({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),GF=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,l=Ie(r,zF),c=N({},r,{component:o,disableGutters:s,variant:a}),u=UF(c);return v.jsx(WF,N({as:o,className:Ae(u.root,i),ref:n,ownerState:c},l))}),HF=GF;function $f(e,t){return $f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$f(e,t)}function up(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$f(e,t)}const ak={disabled:!1},Am=Rt.createContext(null);var VF=function(t){return t.scrollTop},Md="unmounted",ul="exited",dl="entering",Tc="entered",u1="exiting",Hs=function(e){up(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=ul,o.appearStatus=dl):l=Tc:r.unmountOnExit||r.mountOnEnter?l=Md:l=ul,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Md?{status:ul}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==dl&&s!==Tc&&(o=dl):(s===dl||s===Tc)&&(o=u1)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===dl){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Id.findDOMNode(this);s&&VF(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ul&&this.setState({status:Md})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[Id.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),f=a?d.appear:d.enter;if(!i&&!s||ak.disabled){this.safeSetState({status:Tc},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:dl},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Tc},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Id.findDOMNode(this);if(!o||ak.disabled){this.safeSetState({status:ul},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:u1},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:ul},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Id.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Md)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Ie(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Rt.createElement(Am.Provider,{value:null},typeof s=="function"?s(i,a):Rt.cloneElement(Rt.Children.only(s),a))},t}(Rt.Component);Hs.contextType=Am;Hs.propTypes={};function bc(){}Hs.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:bc,onEntering:bc,onEntered:bc,onExit:bc,onExiting:bc,onExited:bc};Hs.UNMOUNTED=Md;Hs.EXITED=ul;Hs.ENTERING=dl;Hs.ENTERED=Tc;Hs.EXITING=u1;const Sv=Hs;function KF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ex(e,t){var n=function(o){return t&&k.isValidElement(o)?t(o):o},r=Object.create(null);return e&&k.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function qF(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in t){if(r[l])for(s=0;s{if(!a&&l!=null){const g=setTimeout(l,c);return()=>{clearTimeout(g)}}},[l,a,c]),v.jsx("span",{className:f,style:m,children:v.jsx("span",{className:p})})}const Ai=ht("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),t6=["center","classes","className"];let _v=e=>e,lk,ck,uk,dk;const d1=550,n6=80,r6=ev(lk||(lk=_v` - 0% { - transform: scale(0); - opacity: 0.1; - } - - 100% { - transform: scale(1); - opacity: 0.3; - } -`)),i6=ev(ck||(ck=_v` - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -`)),o6=ev(uk||(uk=_v` - 0% { - transform: scale(1); - } - - 50% { - transform: scale(0.92); - } - - 100% { - transform: scale(1); - } -`)),s6=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),a6=Ee(e6,{name:"MuiTouchRipple",slot:"Ripple"})(dk||(dk=_v` - opacity: 0; - position: absolute; - - &.${0} { - opacity: 0.3; - transform: scale(1); - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - &.${0} { - animation-duration: ${0}ms; - } - - & .${0} { - opacity: 1; - display: block; - width: 100%; - height: 100%; - border-radius: 50%; - background-color: currentColor; - } - - & .${0} { - opacity: 0; - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - & .${0} { - position: absolute; - /* @noflip */ - left: 0px; - top: 0; - animation-name: ${0}; - animation-duration: 2500ms; - animation-timing-function: ${0}; - animation-iteration-count: infinite; - animation-delay: 200ms; - } -`),Ai.rippleVisible,r6,d1,({theme:e})=>e.transitions.easing.easeInOut,Ai.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Ai.child,Ai.childLeaving,i6,d1,({theme:e})=>e.transitions.easing.easeInOut,Ai.childPulsate,o6,({theme:e})=>e.transitions.easing.easeInOut),l6=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Ie(r,t6),[l,c]=k.useState([]),u=k.useRef(0),d=k.useRef(null);k.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=k.useRef(!1),m=ba(),p=k.useRef(null),g=k.useRef(null),E=k.useCallback(_=>{const{pulsate:R,rippleX:T,rippleY:C,rippleSize:I,cb:A}=_;c(L=>[...L,v.jsx(a6,{classes:{ripple:Ae(o.ripple,Ai.ripple),rippleVisible:Ae(o.rippleVisible,Ai.rippleVisible),ripplePulsate:Ae(o.ripplePulsate,Ai.ripplePulsate),child:Ae(o.child,Ai.child),childLeaving:Ae(o.childLeaving,Ai.childLeaving),childPulsate:Ae(o.childPulsate,Ai.childPulsate)},timeout:d1,pulsate:R,rippleX:T,rippleY:C,rippleSize:I},u.current)]),u.current+=1,d.current=A},[o]),b=k.useCallback((_={},R={},T=()=>{})=>{const{pulsate:C=!1,center:I=i||R.pulsate,fakeElement:A=!1}=R;if((_==null?void 0:_.type)==="mousedown"&&f.current){f.current=!1;return}(_==null?void 0:_.type)==="touchstart"&&(f.current=!0);const L=A?null:g.current,$=L?L.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,z,Y;if(I||_===void 0||_.clientX===0&&_.clientY===0||!_.clientX&&!_.touches)F=Math.round($.width/2),z=Math.round($.height/2);else{const{clientX:J,clientY:Z}=_.touches&&_.touches.length>0?_.touches[0]:_;F=Math.round(J-$.left),z=Math.round(Z-$.top)}if(I)Y=Math.sqrt((2*$.width**2+$.height**2)/3),Y%2===0&&(Y+=1);else{const J=Math.max(Math.abs((L?L.clientWidth:0)-F),F)*2+2,Z=Math.max(Math.abs((L?L.clientHeight:0)-z),z)*2+2;Y=Math.sqrt(J**2+Z**2)}_!=null&&_.touches?p.current===null&&(p.current=()=>{E({pulsate:C,rippleX:F,rippleY:z,rippleSize:Y,cb:T})},m.start(n6,()=>{p.current&&(p.current(),p.current=null)})):E({pulsate:C,rippleX:F,rippleY:z,rippleSize:Y,cb:T})},[i,E,m]),w=k.useCallback(()=>{b({},{pulsate:!0})},[b]),y=k.useCallback((_,R)=>{if(m.clear(),(_==null?void 0:_.type)==="touchend"&&p.current){p.current(),p.current=null,m.start(0,()=>{y(_,R)});return}p.current=null,c(T=>T.length>0?T.slice(1):T),d.current=R},[m]);return k.useImperativeHandle(n,()=>({pulsate:w,start:b,stop:y}),[w,b,y]),v.jsx(s6,N({className:Ae(Ai.root,o.root,s),ref:g},a,{children:v.jsx(ZF,{component:null,exit:!0,children:l})}))}),c6=l6;function u6(e){return pt("MuiButtonBase",e)}const d6=ht("MuiButtonBase",["root","disabled","focusVisible"]),f6=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],p6=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=ft({root:["root",t&&"disabled",n&&"focusVisible"]},u6,i);return n&&r&&(s.root+=` ${r}`),s},h6=Ee("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${d6.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),m6=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:m="a",onBlur:p,onClick:g,onContextMenu:E,onDragLeave:b,onFocus:w,onFocusVisible:y,onKeyDown:_,onKeyUp:R,onMouseDown:T,onMouseLeave:C,onMouseUp:I,onTouchEnd:A,onTouchMove:L,onTouchStart:$,tabIndex:F=0,TouchRippleProps:z,touchRippleRef:Y,type:J}=r,Z=Ie(r,f6),pe=k.useRef(null),G=k.useRef(null),V=sn(G,Y),{isFocusVisibleRef:le,onFocus:Le,onBlur:He,ref:Te}=wv(),[ke,Ve]=k.useState(!1);c&&ke&&Ve(!1),k.useImperativeHandle(i,()=>({focusVisible:()=>{Ve(!0),pe.current.focus()}}),[]);const[Re,et]=k.useState(!1);k.useEffect(()=>{et(!0)},[]);const lt=Re&&!u&&!c;k.useEffect(()=>{ke&&f&&!u&&Re&&G.current.pulsate()},[u,f,ke,Re]);function Pe(Oe,tt,St=d){return Wi(Ht=>(tt&&tt(Ht),!St&&G.current&&G.current[Oe](Ht),!0))}const Et=Pe("start",T),at=Pe("stop",E),Ge=Pe("stop",b),Ze=Pe("stop",I),gt=Pe("stop",Oe=>{ke&&Oe.preventDefault(),C&&C(Oe)}),ee=Pe("start",$),fe=Pe("stop",A),_e=Pe("stop",L),ze=Pe("stop",Oe=>{He(Oe),le.current===!1&&Ve(!1),p&&p(Oe)},!1),W=Wi(Oe=>{pe.current||(pe.current=Oe.currentTarget),Le(Oe),le.current===!0&&(Ve(!0),y&&y(Oe)),w&&w(Oe)}),S=()=>{const Oe=pe.current;return l&&l!=="button"&&!(Oe.tagName==="A"&&Oe.href)},O=k.useRef(!1),D=Wi(Oe=>{f&&!O.current&&ke&&G.current&&Oe.key===" "&&(O.current=!0,G.current.stop(Oe,()=>{G.current.start(Oe)})),Oe.target===Oe.currentTarget&&S()&&Oe.key===" "&&Oe.preventDefault(),_&&_(Oe),Oe.target===Oe.currentTarget&&S()&&Oe.key==="Enter"&&!c&&(Oe.preventDefault(),g&&g(Oe))}),K=Wi(Oe=>{f&&Oe.key===" "&&G.current&&ke&&!Oe.defaultPrevented&&(O.current=!1,G.current.stop(Oe,()=>{G.current.pulsate(Oe)})),R&&R(Oe),g&&Oe.target===Oe.currentTarget&&S()&&Oe.key===" "&&!Oe.defaultPrevented&&g(Oe)});let Q=l;Q==="button"&&(Z.href||Z.to)&&(Q=m);const de={};Q==="button"?(de.type=J===void 0?"button":J,de.disabled=c):(!Z.href&&!Z.to&&(de.role="button"),c&&(de["aria-disabled"]=c));const $e=sn(n,Te,pe),rt=N({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:F,focusVisible:ke}),Je=p6(rt);return v.jsxs(h6,N({as:Q,className:Ae(Je.root,a),ownerState:rt,onBlur:ze,onClick:g,onContextMenu:at,onFocus:W,onKeyDown:D,onKeyUp:K,onMouseDown:Et,onMouseLeave:gt,onMouseUp:Ze,onDragLeave:Ge,onTouchEnd:fe,onTouchMove:_e,onTouchStart:ee,ref:$e,tabIndex:c?-1:F,type:J},de,Z,{children:[s,lt?v.jsx(c6,N({ref:V,center:o},z)):null]}))}),Ro=m6;function g6(e){return pt("MuiIconButton",e)}const v6=ht("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),y6=["edge","children","className","color","disabled","disableFocusRipple","size"],b6=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${ye(r)}`,i&&`edge${ye(i)}`,`size${ye(o)}`]};return ft(s,g6,t)},w6=Ee(Ro,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ye(n.color)}`],n.edge&&t[`edge${ye(n.edge)}`],t[`size${ye(n.size)}`]]}})(({theme:e,ownerState:t})=>N({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return N({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&N({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":N({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${v6.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),x6=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium"}=r,d=Ie(r,y6),f=N({},r,{edge:i,color:a,disabled:l,disableFocusRipple:c,size:u}),m=b6(f);return v.jsx(w6,N({className:Ae(m.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},d,{ownerState:f,children:o}))}),Lo=x6;var Px={},a0={};function S6(e){return pt("MuiSvgIcon",e)}ht("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const _6=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],C6=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${ye(t)}`,`fontSize${ye(n)}`]};return ft(i,S6,r)},k6=Ee("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ye(n.color)}`],t[`fontSize${ye(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,a,l,c,u,d,f,m,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((a=e.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=e.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:(d=(f=(e.vars||e).palette)==null||(f=f[t.color])==null?void 0:f.main)!=null?d:{action:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(p=(e.vars||e).palette)==null||(p=p.action)==null?void 0:p.disabled,inherit:void 0}[t.color]}}),f1=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24"}=r,m=Ie(r,_6),p=k.isValidElement(i)&&i.type==="svg",g=N({},r,{color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:p}),E={};u||(E.viewBox=f);const b=C6(g);return v.jsxs(k6,N({as:a,className:Ae(b.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},E,m,p&&i.props,{ownerState:g,children:[p?i.props.children:i,d?v.jsx("title",{children:d}):null]}))});f1.muiName="SvgIcon";function Gn(e,t){function n(r,i){return v.jsx(f1,N({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=f1.muiName,k.memo(k.forwardRef(n))}const E6={configure:e=>{vx.configure(e)}},R6=Object.freeze(Object.defineProperty({__proto__:null,capitalize:ye,createChainedFunction:c1,createSvgIcon:Gn,debounce:xv,deprecatedPropType:eF,isMuiElement:Yd,ownerDocument:Qn,ownerWindow:ts,requirePropFactory:tF,setRef:Nm,unstable_ClassNameGenerator:E6,unstable_useEnhancedEffect:oi,unstable_useId:cp,unsupportedProp:rF,useControlled:wu,useEventCallback:Wi,useForkRef:sn,useIsFocusVisible:wv},Symbol.toStringTag,{value:"Module"})),P6=zs(R6);var fk;function as(){return fk||(fk=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=P6}(a0)),a0}var T6=eo;Object.defineProperty(Px,"__esModule",{value:!0});var CO=Px.default=void 0,O6=T6(as()),L6=v;CO=Px.default=(0,O6.default)((0,L6.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function xu(e){return typeof e=="string"}function qc(e,t,n){return e===void 0||xu(e)?t:N({},t,{ownerState:N({},t.ownerState,n)})}const j6={disableDefaultClasses:!1},I6=k.createContext(j6);function M6(e){const{disableDefaultClasses:t}=k.useContext(I6);return n=>t?"":e(n)}function Dm(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function kO(e,t,n){return typeof e=="function"?e(t,n):e}function pk(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function EO(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const m=Ae(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),p=N({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=N({},n,i,r);return m.length>0&&(g.className=m),Object.keys(p).length>0&&(g.style=p),{props:g,internalRef:void 0}}const s=Dm(N({},i,r)),a=pk(r),l=pk(i),c=t(s),u=Ae(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),d=N({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),f=N({},c,n,l,a);return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}const $6=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Po(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Ie(e,$6),a=o?{}:kO(r,i),{props:l,internalRef:c}=EO(N({},s,{externalSlotProps:a})),u=sn(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return qc(n,N({},l,{ref:u}),i)}function N6(e){const t=Qn(e);return t.body===e?ts(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Qd(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function hk(e){return parseInt(ts(e).getComputedStyle(e).paddingRight,10)||0}function A6(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function mk(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=o.indexOf(s)===-1,l=!A6(s);a&&l&&Qd(s,i)})}function l0(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function D6(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(N6(r)){const s=yO(Qn(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${hk(r)+s}px`;const a=Qn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${hk(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Qn(r).body;else{const s=r.parentElement,a=ts(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function B6(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class F6{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Qd(t.modalRef,!1);const i=B6(n);mk(n,t.mount,t.modalRef,i,!0);const o=l0(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=l0(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=D6(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=l0(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Qd(t.modalRef,n),mk(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Qd(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function z6(e){return typeof e=="function"?e():e}function U6(e){return e?e.props.hasOwnProperty("in"):!1}const W6=new F6;function G6(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=W6,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,f=k.useRef({}),m=k.useRef(null),p=k.useRef(null),g=sn(p,d),[E,b]=k.useState(!u),w=U6(l);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const _=()=>Qn(m.current),R=()=>(f.current.modalRef=p.current,f.current.mount=m.current,f.current),T=()=>{i.mount(R(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},C=Wi(()=>{const Z=z6(t)||_().body;i.add(R(),Z),p.current&&T()}),I=k.useCallback(()=>i.isTopModal(R()),[i]),A=Wi(Z=>{m.current=Z,Z&&(u&&I()?T():p.current&&Qd(p.current,y))}),L=k.useCallback(()=>{i.remove(R(),y)},[y,i]);k.useEffect(()=>()=>{L()},[L]),k.useEffect(()=>{u?C():(!w||!o)&&L()},[u,L,w,o,C]);const $=Z=>pe=>{var G;(G=Z.onKeyDown)==null||G.call(Z,pe),!(pe.key!=="Escape"||pe.which===229||!I())&&(n||(pe.stopPropagation(),c&&c(pe,"escapeKeyDown")))},F=Z=>pe=>{var G;(G=Z.onClick)==null||G.call(Z,pe),pe.target===pe.currentTarget&&c&&c(pe,"backdropClick")};return{getRootProps:(Z={})=>{const pe=Dm(e);delete pe.onTransitionEnter,delete pe.onTransitionExited;const G=N({},pe,Z);return N({role:"presentation"},G,{onKeyDown:$(G),ref:g})},getBackdropProps:(Z={})=>{const pe=Z;return N({"aria-hidden":!0},pe,{onClick:F(pe),open:u})},getTransitionProps:()=>{const Z=()=>{b(!1),s&&s()},pe=()=>{b(!0),a&&a(),o&&L()};return{onEnter:c1(Z,l==null?void 0:l.props.onEnter),onExited:c1(pe,l==null?void 0:l.props.onExited)}},rootRef:g,portalRef:A,isTopModal:I,exited:E,hasTransition:w}}const H6=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function V6(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function K6(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function q6(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||K6(e))}function Y6(e){const t=[],n=[];return Array.from(e.querySelectorAll(H6)).forEach((r,i)=>{const o=V6(r);o===-1||!q6(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function Q6(){return!0}function X6(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=Y6,isEnabled:s=Q6,open:a}=e,l=k.useRef(!1),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),f=k.useRef(null),m=k.useRef(!1),p=k.useRef(null),g=sn(t.ref,p),E=k.useRef(null);k.useEffect(()=>{!a||!p.current||(m.current=!n)},[n,a]),k.useEffect(()=>{if(!a||!p.current)return;const y=Qn(p.current);return p.current.contains(y.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),m.current&&p.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),k.useEffect(()=>{if(!a||!p.current)return;const y=Qn(p.current),_=C=>{E.current=C,!(r||!s()||C.key!=="Tab")&&y.activeElement===p.current&&C.shiftKey&&(l.current=!0,u.current&&u.current.focus())},R=()=>{const C=p.current;if(C===null)return;if(!y.hasFocus()||!s()||l.current){l.current=!1;return}if(C.contains(y.activeElement)||r&&y.activeElement!==c.current&&y.activeElement!==u.current)return;if(y.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!m.current)return;let I=[];if((y.activeElement===c.current||y.activeElement===u.current)&&(I=o(p.current)),I.length>0){var A,L;const $=!!((A=E.current)!=null&&A.shiftKey&&((L=E.current)==null?void 0:L.key)==="Tab"),F=I[0],z=I[I.length-1];typeof F!="string"&&typeof z!="string"&&($?z.focus():F.focus())}else C.focus()};y.addEventListener("focusin",R),y.addEventListener("keydown",_,!0);const T=setInterval(()=>{y.activeElement&&y.activeElement.tagName==="BODY"&&R()},50);return()=>{clearInterval(T),y.removeEventListener("focusin",R),y.removeEventListener("keydown",_,!0)}},[n,r,i,s,a,o]);const b=y=>{d.current===null&&(d.current=y.relatedTarget),m.current=!0,f.current=y.target;const _=t.props.onFocus;_&&_(y)},w=y=>{d.current===null&&(d.current=y.relatedTarget),m.current=!0};return v.jsxs(k.Fragment,{children:[v.jsx("div",{tabIndex:a?0:-1,onFocus:w,ref:c,"data-testid":"sentinelStart"}),k.cloneElement(t,{ref:g,onFocus:b}),v.jsx("div",{tabIndex:a?0:-1,onFocus:w,ref:u,"data-testid":"sentinelEnd"})]})}function J6(e){return typeof e=="function"?e():e}const Tx=k.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[s,a]=k.useState(null),l=sn(k.isValidElement(r)?r.ref:null,n);if(oi(()=>{o||a(J6(i)||document.body)},[i,o]),oi(()=>{if(s&&!o)return Nm(n,s),()=>{Nm(n,null)}},[n,s,o]),o){if(k.isValidElement(r)){const c={ref:l};return k.cloneElement(r,c)}return v.jsx(k.Fragment,{children:r})}return v.jsx(k.Fragment,{children:s&&Ng.createPortal(r,s)})}),Ox=e=>e.scrollTop;function Aa(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}const Z6=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ez={entering:{opacity:1},entered:{opacity:1}},tz=k.forwardRef(function(t,n){const r=Pi(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:m,onExited:p,onExiting:g,style:E,timeout:b=i,TransitionComponent:w=Sv}=t,y=Ie(t,Z6),_=k.useRef(null),R=sn(_,a.ref,n),T=Y=>J=>{if(Y){const Z=_.current;J===void 0?Y(Z):Y(Z,J)}},C=T(f),I=T((Y,J)=>{Ox(Y);const Z=Aa({style:E,timeout:b,easing:l},{mode:"enter"});Y.style.webkitTransition=r.transitions.create("opacity",Z),Y.style.transition=r.transitions.create("opacity",Z),u&&u(Y,J)}),A=T(d),L=T(g),$=T(Y=>{const J=Aa({style:E,timeout:b,easing:l},{mode:"exit"});Y.style.webkitTransition=r.transitions.create("opacity",J),Y.style.transition=r.transitions.create("opacity",J),m&&m(Y)}),F=T(p),z=Y=>{o&&o(_.current,Y)};return v.jsx(w,N({appear:s,in:c,nodeRef:_,onEnter:I,onEntered:A,onEntering:C,onExit:$,onExited:F,onExiting:L,addEndListener:z,timeout:b},y,{children:(Y,J)=>k.cloneElement(a,N({style:N({opacity:0,visibility:Y==="exited"&&!c?"hidden":void 0},ez[Y],E,a.props.style),ref:R},J))}))}),RO=tz;function nz(e){return pt("MuiBackdrop",e)}ht("MuiBackdrop",["root","invisible"]);const rz=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],iz=e=>{const{classes:t,invisible:n}=e;return ft({root:["root",n&&"invisible"]},nz,t)},oz=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>N({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),sz=k.forwardRef(function(t,n){var r,i,o;const s=vt({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:d={},invisible:f=!1,open:m,slotProps:p={},slots:g={},TransitionComponent:E=RO,transitionDuration:b}=s,w=Ie(s,rz),y=N({},s,{component:c,invisible:f}),_=iz(y),R=(r=p.root)!=null?r:d.root;return v.jsx(E,N({in:m,timeout:b},w,{children:v.jsx(oz,N({"aria-hidden":!0},R,{as:(i=(o=g.root)!=null?o:u.Root)!=null?i:c,className:Ae(_.root,l,R==null?void 0:R.className),ownerState:N({},y,R==null?void 0:R.ownerState),classes:_,ref:n,children:a}))}))}),PO=sz;function az(e){return pt("MuiModal",e)}ht("MuiModal",["root","hidden","backdrop"]);const lz=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],cz=e=>{const{open:t,exited:n,classes:r}=e;return ft({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},az,r)},uz=Ee("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>N({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),dz=Ee(PO,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),fz=k.forwardRef(function(t,n){var r,i,o,s,a,l;const c=vt({name:"MuiModal",props:t}),{BackdropComponent:u=dz,BackdropProps:d,className:f,closeAfterTransition:m=!1,children:p,container:g,component:E,components:b={},componentsProps:w={},disableAutoFocus:y=!1,disableEnforceFocus:_=!1,disableEscapeKeyDown:R=!1,disablePortal:T=!1,disableRestoreFocus:C=!1,disableScrollLock:I=!1,hideBackdrop:A=!1,keepMounted:L=!1,onBackdropClick:$,open:F,slotProps:z,slots:Y}=c,J=Ie(c,lz),Z=N({},c,{closeAfterTransition:m,disableAutoFocus:y,disableEnforceFocus:_,disableEscapeKeyDown:R,disablePortal:T,disableRestoreFocus:C,disableScrollLock:I,hideBackdrop:A,keepMounted:L}),{getRootProps:pe,getBackdropProps:G,getTransitionProps:V,portalRef:le,isTopModal:Le,exited:He,hasTransition:Te}=G6(N({},Z,{rootRef:n})),ke=N({},Z,{exited:He}),Ve=cz(ke),Re={};if(p.props.tabIndex===void 0&&(Re.tabIndex="-1"),Te){const{onEnter:Ze,onExited:gt}=V();Re.onEnter=Ze,Re.onExited=gt}const et=(r=(i=Y==null?void 0:Y.root)!=null?i:b.Root)!=null?r:uz,lt=(o=(s=Y==null?void 0:Y.backdrop)!=null?s:b.Backdrop)!=null?o:u,Pe=(a=z==null?void 0:z.root)!=null?a:w.root,Et=(l=z==null?void 0:z.backdrop)!=null?l:w.backdrop,at=Po({elementType:et,externalSlotProps:Pe,externalForwardedProps:J,getSlotProps:pe,additionalProps:{ref:n,as:E},ownerState:ke,className:Ae(f,Pe==null?void 0:Pe.className,Ve==null?void 0:Ve.root,!ke.open&&ke.exited&&(Ve==null?void 0:Ve.hidden))}),Ge=Po({elementType:lt,externalSlotProps:Et,additionalProps:d,getSlotProps:Ze=>G(N({},Ze,{onClick:gt=>{$&&$(gt),Ze!=null&&Ze.onClick&&Ze.onClick(gt)}})),className:Ae(Et==null?void 0:Et.className,d==null?void 0:d.className,Ve==null?void 0:Ve.backdrop),ownerState:ke});return!L&&!F&&(!Te||He)?null:v.jsx(Tx,{ref:le,container:g,disablePortal:T,children:v.jsxs(et,N({},at,{children:[!A&&u?v.jsx(lt,N({},Ge)):null,v.jsx(X6,{disableEnforceFocus:_,disableAutoFocus:y,disableRestoreFocus:C,isEnabled:Le,open:F,children:k.cloneElement(p,Re)})]}))})}),Cv=fz,pz=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function hz(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=ts(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function mz(e){return typeof e=="function"?e():e}function dh(e,t,n){const r=mz(n),i=hz(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const gz=k.forwardRef(function(t,n){const r=Pi(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:d=i,in:f,onEnter:m,onEntered:p,onEntering:g,onExit:E,onExited:b,onExiting:w,style:y,timeout:_=o,TransitionComponent:R=Sv}=t,T=Ie(t,pz),C=k.useRef(null),I=sn(l.ref,C,n),A=G=>V=>{G&&(V===void 0?G(C.current):G(C.current,V))},L=A((G,V)=>{dh(u,G,c),Ox(G),m&&m(G,V)}),$=A((G,V)=>{const le=Aa({timeout:_,style:y,easing:d},{mode:"enter"});G.style.webkitTransition=r.transitions.create("-webkit-transform",N({},le)),G.style.transition=r.transitions.create("transform",N({},le)),G.style.webkitTransform="none",G.style.transform="none",g&&g(G,V)}),F=A(p),z=A(w),Y=A(G=>{const V=Aa({timeout:_,style:y,easing:d},{mode:"exit"});G.style.webkitTransition=r.transitions.create("-webkit-transform",V),G.style.transition=r.transitions.create("transform",V),dh(u,G,c),E&&E(G)}),J=A(G=>{G.style.webkitTransition="",G.style.transition="",b&&b(G)}),Z=G=>{s&&s(C.current,G)},pe=k.useCallback(()=>{C.current&&dh(u,C.current,c)},[u,c]);return k.useEffect(()=>{if(f||u==="down"||u==="right")return;const G=xv(()=>{C.current&&dh(u,C.current,c)}),V=ts(C.current);return V.addEventListener("resize",G),()=>{G.clear(),V.removeEventListener("resize",G)}},[u,f,c]),k.useEffect(()=>{f||pe()},[f,pe]),v.jsx(R,N({nodeRef:C,onEnter:L,onEntered:F,onEntering:$,onExit:Y,onExited:J,onExiting:z,addEndListener:Z,appear:a,in:f,timeout:_},T,{children:(G,V)=>k.cloneElement(l,N({ref:I,style:N({visibility:G==="exited"&&!f?"hidden":void 0},y,l.props.style)},V))}))}),vz=gz;function yz(e){return pt("MuiDrawer",e)}ht("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const bz=["BackdropProps"],wz=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],TO=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},xz=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ye(n)}`,r!=="temporary"&&`paperAnchorDocked${ye(n)}`]};return ft(i,yz,t)},Sz=Ee(Cv,{name:"MuiDrawer",slot:"Root",overridesResolver:TO})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),gk=Ee("div",{shouldForwardProp:fr,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:TO})({flex:"0 0 auto"}),_z=Ee(ss,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ye(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ye(n.anchor)}`]]}})(({theme:e,ownerState:t})=>N({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),OO={left:"right",right:"left",top:"down",bottom:"up"};function Cz(e){return["left","right"].indexOf(e)!==-1}function kz({direction:e},t){return e==="rtl"&&Cz(t)?OO[t]:t}const Ez=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiDrawer"}),i=Pi(),o=kx(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:m}={},onClose:p,open:g=!1,PaperProps:E={},SlideProps:b,TransitionComponent:w=vz,transitionDuration:y=s,variant:_="temporary"}=r,R=Ie(r.ModalProps,bz),T=Ie(r,wz),C=k.useRef(!1);k.useEffect(()=>{C.current=!0},[]);const I=kz({direction:o?"rtl":"ltr"},a),L=N({},r,{anchor:a,elevation:d,open:g,variant:_},T),$=xz(L),F=v.jsx(_z,N({elevation:_==="temporary"?d:0,square:!0},E,{className:Ae($.paper,E.className),ownerState:L,children:c}));if(_==="permanent")return v.jsx(gk,N({className:Ae($.root,$.docked,u),ownerState:L,ref:n},T,{children:F}));const z=v.jsx(w,N({in:g,direction:OO[I],timeout:y,appear:C.current},b,{children:F}));return _==="persistent"?v.jsx(gk,N({className:Ae($.root,$.docked,u),ownerState:L,ref:n},T,{children:z})):v.jsx(Sz,N({BackdropProps:N({},l,m,{transitionDuration:y}),className:Ae($.root,$.modal,u),open:g,ownerState:L,onClose:p,hideBackdrop:f,ref:n},T,R,{children:z}))}),Rz=Ez,Pz=k.createContext({}),_o=Pz;function Tz(e){return pt("MuiList",e)}ht("MuiList",["root","padding","dense","subheader"]);const Oz=["children","className","component","dense","disablePadding","subheader"],Lz=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return ft({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Tz,t)},jz=Ee("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>N({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Iz=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=Ie(r,Oz),d=k.useMemo(()=>({dense:a}),[a]),f=N({},r,{component:s,dense:a,disablePadding:l}),m=Lz(f);return v.jsx(_o.Provider,{value:d,children:v.jsxs(jz,N({as:s,className:Ae(m.root,o),ref:n,ownerState:f},u,{children:[c,i]}))})}),Xd=Iz;function Mz(e){return pt("MuiListItem",e)}const $z=ht("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Oc=$z;function Nz(e){return pt("MuiListItemButton",e)}const Az=ht("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Lc=Az,Dz=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Bz=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Fz=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=e,c=ft({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Nz,n);return N({},n,c)},zz=Ee(Ro,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Bz})(({theme:e,ownerState:t})=>N({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Lc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Lc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Lc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Lc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Lc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Uz=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:f=!1,className:m}=r,p=Ie(r,Dz),g=k.useContext(_o),E=k.useMemo(()=>({dense:l||g.dense||!1,alignItems:i,disableGutters:c}),[i,g.dense,l,c]),b=k.useRef(null);oi(()=>{o&&b.current&&b.current.focus()},[o]);const w=N({},r,{alignItems:i,dense:E.dense,disableGutters:c,divider:u,selected:f}),y=Fz(w),_=sn(b,n);return v.jsx(_o.Provider,{value:E,children:v.jsx(zz,N({ref:_,href:p.href||p.to,component:(p.href||p.to)&&s==="div"?"button":s,focusVisibleClassName:Ae(y.focusVisible,d),ownerState:w,className:Ae(y.root,m)},p,{classes:y,children:a}))})}),Wz=Uz;function Gz(e){return pt("MuiListItemSecondaryAction",e)}ht("MuiListItemSecondaryAction",["root","disableGutters"]);const Hz=["className"],Vz=e=>{const{disableGutters:t,classes:n}=e;return ft({root:["root",t&&"disableGutters"]},Gz,n)},Kz=Ee("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>N({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),LO=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Ie(r,Hz),s=k.useContext(_o),a=N({},r,{disableGutters:s.disableGutters}),l=Vz(a);return v.jsx(Kz,N({className:Ae(l.root,i),ownerState:a,ref:n},o))});LO.muiName="ListItemSecondaryAction";const qz=LO,Yz=["className"],Qz=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Xz=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},Jz=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=e;return ft({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},Mz,r)},Zz=Ee("div",{name:"MuiListItem",slot:"Root",overridesResolver:Xz})(({theme:e,ownerState:t})=>N({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&N({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Lc.root}`]:{paddingRight:48}},{[`&.${Oc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Oc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Oc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Oc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Oc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),e8=Ee("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),t8=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:f="li",ContainerProps:{className:m}={},dense:p=!1,disabled:g=!1,disableGutters:E=!1,disablePadding:b=!1,divider:w=!1,focusVisibleClassName:y,secondaryAction:_,selected:R=!1,slotProps:T={},slots:C={}}=r,I=Ie(r.ContainerProps,Yz),A=Ie(r,Qz),L=k.useContext(_o),$=k.useMemo(()=>({dense:p||L.dense||!1,alignItems:i,disableGutters:E}),[i,L.dense,p,E]),F=k.useRef(null);oi(()=>{o&&F.current&&F.current.focus()},[o]);const z=k.Children.toArray(a),Y=z.length&&Yd(z[z.length-1],["ListItemSecondaryAction"]),J=N({},r,{alignItems:i,autoFocus:o,button:s,dense:$.dense,disabled:g,disableGutters:E,disablePadding:b,divider:w,hasSecondaryAction:Y,selected:R}),Z=Jz(J),pe=sn(F,n),G=C.root||u.Root||Zz,V=T.root||d.root||{},le=N({className:Ae(Z.root,V.className,l),disabled:g},A);let Le=c||"li";return s&&(le.component=c||"div",le.focusVisibleClassName=Ae(Oc.focusVisible,y),Le=Ro),Y?(Le=!le.component&&!c?"div":Le,f==="li"&&(Le==="li"?Le="div":le.component==="li"&&(le.component="div")),v.jsx(_o.Provider,{value:$,children:v.jsxs(e8,N({as:f,className:Ae(Z.container,m),ref:pe,ownerState:J},I,{children:[v.jsx(G,N({},V,!xu(G)&&{as:Le,ownerState:N({},J,V.ownerState)},le,{children:z})),z.pop()]}))})):v.jsx(_o.Provider,{value:$,children:v.jsxs(G,N({},V,{as:Le,ref:pe},!xu(G)&&{ownerState:N({},J,V.ownerState)},le,{children:[z,_&&v.jsx(qz,{children:_})]}))})}),fo=t8;function n8(e){return pt("MuiListItemText",e)}const r8=ht("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Bm=r8,i8=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],o8=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return ft({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},n8,t)},s8=Ee("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Bm.primary}`]:t.primary},{[`& .${Bm.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>N({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),a8=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=r,f=Ie(r,i8),{dense:m}=k.useContext(_o);let p=l??i,g=u;const E=N({},r,{disableTypography:s,inset:a,primary:!!p,secondary:!!g,dense:m}),b=o8(E);return p!=null&&p.type!==xt&&!s&&(p=v.jsx(xt,N({variant:m?"body2":"body1",className:b.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:p}))),g!=null&&g.type!==xt&&!s&&(g=v.jsx(xt,N({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:g}))),v.jsxs(s8,N({className:Ae(b.root,o),ownerState:E,ref:n},f,{children:[p,g]}))}),gs=a8;function l8(e){return pt("MuiDivider",e)}const c8=ht("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),vk=c8,u8=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],d8=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:l}=e;return ft({root:["root",t&&"absolute",l,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},l8,r)},f8=Ee("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>N({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Mt(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>N({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>N({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>N({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>N({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),p8=Ee("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>N({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),jO=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:a=o?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:d=a!=="hr"?"separator":void 0,textAlign:f="center",variant:m="fullWidth"}=r,p=Ie(r,u8),g=N({},r,{absolute:i,component:a,flexItem:l,light:c,orientation:u,role:d,textAlign:f,variant:m}),E=d8(g);return v.jsx(f8,N({as:a,className:Ae(E.root,s),role:d,ref:n,ownerState:g},p,{children:o?v.jsx(p8,{className:E.wrapper,ownerState:g,children:o}):null}))});jO.muiSkipListHighlight=!0;const Zo=jO,h8=["theme"];function m8(e){let{theme:t}=e,n=Ie(e,h8);const r=t[Fl];return v.jsx(fF,N({},n,{themeId:r?Fl:void 0,theme:r||t}))}var tn={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Lx=Symbol.for("react.element"),jx=Symbol.for("react.portal"),kv=Symbol.for("react.fragment"),Ev=Symbol.for("react.strict_mode"),Rv=Symbol.for("react.profiler"),Pv=Symbol.for("react.provider"),Tv=Symbol.for("react.context"),g8=Symbol.for("react.server_context"),Ov=Symbol.for("react.forward_ref"),Lv=Symbol.for("react.suspense"),jv=Symbol.for("react.suspense_list"),Iv=Symbol.for("react.memo"),Mv=Symbol.for("react.lazy"),v8=Symbol.for("react.offscreen"),IO;IO=Symbol.for("react.module.reference");function ro(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lx:switch(e=e.type,e){case kv:case Rv:case Ev:case Lv:case jv:return e;default:switch(e=e&&e.$$typeof,e){case g8:case Tv:case Ov:case Mv:case Iv:case Pv:return e;default:return t}}case jx:return t}}}tn.ContextConsumer=Tv;tn.ContextProvider=Pv;tn.Element=Lx;tn.ForwardRef=Ov;tn.Fragment=kv;tn.Lazy=Mv;tn.Memo=Iv;tn.Portal=jx;tn.Profiler=Rv;tn.StrictMode=Ev;tn.Suspense=Lv;tn.SuspenseList=jv;tn.isAsyncMode=function(){return!1};tn.isConcurrentMode=function(){return!1};tn.isContextConsumer=function(e){return ro(e)===Tv};tn.isContextProvider=function(e){return ro(e)===Pv};tn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lx};tn.isForwardRef=function(e){return ro(e)===Ov};tn.isFragment=function(e){return ro(e)===kv};tn.isLazy=function(e){return ro(e)===Mv};tn.isMemo=function(e){return ro(e)===Iv};tn.isPortal=function(e){return ro(e)===jx};tn.isProfiler=function(e){return ro(e)===Rv};tn.isStrictMode=function(e){return ro(e)===Ev};tn.isSuspense=function(e){return ro(e)===Lv};tn.isSuspenseList=function(e){return ro(e)===jv};tn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kv||e===Rv||e===Ev||e===Lv||e===jv||e===v8||typeof e=="object"&&e!==null&&(e.$$typeof===Mv||e.$$typeof===Iv||e.$$typeof===Pv||e.$$typeof===Tv||e.$$typeof===Ov||e.$$typeof===IO||e.getModuleId!==void 0)};tn.typeOf=ro;function Uu(e){return vt}function y8(e){return pt("MuiCollapse",e)}ht("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const b8=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],w8=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return ft(r,y8,n)},x8=Ee("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>N({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&N({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),S8=Ee("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>N({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),_8=Ee("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>N({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),MO=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:m,onExit:p,onExited:g,onExiting:E,orientation:b="vertical",style:w,timeout:y=pO.standard,TransitionComponent:_=Sv}=r,R=Ie(r,b8),T=N({},r,{orientation:b,collapsedSize:a}),C=w8(T),I=Pi(),A=ba(),L=k.useRef(null),$=k.useRef(),F=typeof a=="number"?`${a}px`:a,z=b==="horizontal",Y=z?"width":"height",J=k.useRef(null),Z=sn(n,J),pe=Re=>et=>{if(Re){const lt=J.current;et===void 0?Re(lt):Re(lt,et)}},G=()=>L.current?L.current[z?"clientWidth":"clientHeight"]:0,V=pe((Re,et)=>{L.current&&z&&(L.current.style.position="absolute"),Re.style[Y]=F,d&&d(Re,et)}),le=pe((Re,et)=>{const lt=G();L.current&&z&&(L.current.style.position="");const{duration:Pe,easing:Et}=Aa({style:w,timeout:y,easing:c},{mode:"enter"});if(y==="auto"){const at=I.transitions.getAutoHeightDuration(lt);Re.style.transitionDuration=`${at}ms`,$.current=at}else Re.style.transitionDuration=typeof Pe=="string"?Pe:`${Pe}ms`;Re.style[Y]=`${lt}px`,Re.style.transitionTimingFunction=Et,m&&m(Re,et)}),Le=pe((Re,et)=>{Re.style[Y]="auto",f&&f(Re,et)}),He=pe(Re=>{Re.style[Y]=`${G()}px`,p&&p(Re)}),Te=pe(g),ke=pe(Re=>{const et=G(),{duration:lt,easing:Pe}=Aa({style:w,timeout:y,easing:c},{mode:"exit"});if(y==="auto"){const Et=I.transitions.getAutoHeightDuration(et);Re.style.transitionDuration=`${Et}ms`,$.current=Et}else Re.style.transitionDuration=typeof lt=="string"?lt:`${lt}ms`;Re.style[Y]=F,Re.style.transitionTimingFunction=Pe,E&&E(Re)}),Ve=Re=>{y==="auto"&&A.start($.current||0,Re),i&&i(J.current,Re)};return v.jsx(_,N({in:u,onEnter:V,onEntered:Le,onEntering:le,onExit:He,onExited:Te,onExiting:ke,addEndListener:Ve,nodeRef:J,timeout:y==="auto"?null:y},R,{children:(Re,et)=>v.jsx(x8,N({as:l,className:Ae(C.root,s,{entered:C.entered,exited:!u&&F==="0px"&&C.hidden}[Re]),style:N({[z?"minWidth":"minHeight"]:F},w),ref:Z},et,{ownerState:N({},T,{state:Re}),children:v.jsx(S8,{ownerState:N({},T,{state:Re}),className:C.wrapper,ref:L,children:v.jsx(_8,{ownerState:N({},T,{state:Re}),className:C.wrapperInner,children:o})})}))}))});MO.muiSupportAuto=!0;const C8=MO,$O=k.createContext({}),k8=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],E8=["component","slots","slotProps"],R8=["component"];function p1(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:s,internalForwardedProps:a}=t,l=Ie(t,k8),{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0}}=o,f=Ie(o,E8),m=u[e]||r,p=kO(d[e],i),g=EO(N({className:n},l,{externalForwardedProps:e==="root"?f:void 0,externalSlotProps:p})),{props:{component:E},internalRef:b}=g,w=Ie(g.props,R8),y=sn(b,p==null?void 0:p.ref,t.ref),_=s?s(w):{},R=N({},i,_),T=e==="root"?E||c:E,C=qc(m,N({},e==="root"&&!c&&!u[e]&&a,e!=="root"&&!u[e]&&a,w,T&&{as:T},{ref:y}),R);return Object.keys(_).forEach(I=>{delete C[I]}),[m,C]}function P8(e){return pt("MuiAccordion",e)}const T8=ht("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),fh=T8,O8=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],L8=Uu(),j8=e=>{const{classes:t,square:n,expanded:r,disabled:i,disableGutters:o}=e;return ft({root:["root",!n&&"rounded",r&&"expanded",i&&"disabled",!o&&"gutters"],region:["region"]},P8,t)},I8=Ee(ss,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${fh.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${fh.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${fh.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}},({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${fh.expanded}`]:{margin:"16px 0"}}}]})),M8=k.forwardRef(function(t,n){const r=L8({props:t,name:"MuiAccordion"}),{children:i,className:o,defaultExpanded:s=!1,disabled:a=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:f={},slotProps:m={},TransitionComponent:p,TransitionProps:g}=r,E=Ie(r,O8),[b,w]=wu({controlled:c,default:s,name:"Accordion",state:"expanded"}),y=k.useCallback(z=>{w(!b),u&&u(z,!b)},[b,u,w]),[_,...R]=k.Children.toArray(i),T=k.useMemo(()=>({expanded:b,disabled:a,disableGutters:l,toggle:y}),[b,a,l,y]),C=N({},r,{square:d,disabled:a,disableGutters:l,expanded:b}),I=j8(C),A=N({transition:p},f),L=N({transition:g},m),[$,F]=p1("transition",{elementType:C8,externalForwardedProps:{slots:A,slotProps:L},ownerState:C});return v.jsxs(I8,N({className:Ae(I.root,o),ref:n,ownerState:C,square:d},E,{children:[v.jsx($O.Provider,{value:T,children:_}),v.jsx($,N({in:b,timeout:"auto"},F,{children:v.jsx("div",{"aria-labelledby":_.props.id,id:_.props["aria-controls"],role:"region",className:I.region,children:R})}))]}))}),$8=M8;function N8(e){return pt("MuiAccordionDetails",e)}ht("MuiAccordionDetails",["root"]);const A8=["className"],D8=Uu(),B8=e=>{const{classes:t}=e;return ft({root:["root"]},N8,t)},F8=Ee("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(1,2,2)})),z8=k.forwardRef(function(t,n){const r=D8({props:t,name:"MuiAccordionDetails"}),{className:i}=r,o=Ie(r,A8),s=r,a=B8(s);return v.jsx(F8,N({className:Ae(a.root,i),ref:n,ownerState:s},o))}),U8=z8;function W8(e){return pt("MuiAccordionSummary",e)}const G8=ht("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Yc=G8,H8=["children","className","expandIcon","focusVisibleClassName","onClick"],V8=Uu(),K8=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return ft({root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},W8,t)},q8=Ee(Ro,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${Yc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Yc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${Yc.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${Yc.expanded}`]:{minHeight:64}}}]}}),Y8=Ee("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${Yc.expanded}`]:{margin:"20px 0"}}}]})),Q8=Ee("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${Yc.expanded}`]:{transform:"rotate(180deg)"}})),X8=k.forwardRef(function(t,n){const r=V8({props:t,name:"MuiAccordionSummary"}),{children:i,className:o,expandIcon:s,focusVisibleClassName:a,onClick:l}=r,c=Ie(r,H8),{disabled:u=!1,disableGutters:d,expanded:f,toggle:m}=k.useContext($O),p=b=>{m&&m(b),l&&l(b)},g=N({},r,{expanded:f,disabled:u,disableGutters:d}),E=K8(g);return v.jsxs(q8,N({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:Ae(E.root,o),focusVisibleClassName:Ae(E.focusVisible,a),onClick:p,ref:n,ownerState:g},c,{children:[v.jsx(Y8,{className:E.content,ownerState:g,children:i}),s&&v.jsx(Q8,{className:E.expandIconWrapper,ownerState:g,children:s})]}))}),J8=X8;function Z8(e){return pt("MuiAlert",e)}const eU=ht("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),yk=eU,tU=Gn(v.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),nU=Gn(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),rU=Gn(v.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),iU=Gn(v.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),oU=Gn(v.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),sU=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],aU=Uu(),lU=e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`color${ye(n||r)}`,`${t}${ye(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return ft(o,Z8,i)},cU=Ee(ss,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color||n.severity)}`]]}})(({theme:e})=>{const t=e.palette.mode==="light"?Im:Mm,n=e.palette.mode==="light"?Mm:Im;return N({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${yk.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${yk.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.dark).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:N({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)})}))]})}),uU=Ee("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),dU=Ee("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),bk=Ee("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),wk={success:v.jsx(tU,{fontSize:"inherit"}),warning:v.jsx(nU,{fontSize:"inherit"}),error:v.jsx(rU,{fontSize:"inherit"}),info:v.jsx(iU,{fontSize:"inherit"})},fU=k.forwardRef(function(t,n){const r=aU({props:t,name:"MuiAlert"}),{action:i,children:o,className:s,closeText:a="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=wk,onClose:m,role:p="alert",severity:g="success",slotProps:E={},slots:b={},variant:w="standard"}=r,y=Ie(r,sU),_=N({},r,{color:l,severity:g,variant:w,colorSeverity:l||g}),R=lU(_),T={slots:N({closeButton:c.CloseButton,closeIcon:c.CloseIcon},b),slotProps:N({},u,E)},[C,I]=p1("closeButton",{elementType:Lo,externalForwardedProps:T,ownerState:_}),[A,L]=p1("closeIcon",{elementType:oU,externalForwardedProps:T,ownerState:_});return v.jsxs(cU,N({role:p,elevation:0,ownerState:_,className:Ae(R.root,s),ref:n},y,{children:[d!==!1?v.jsx(uU,{ownerState:_,className:R.icon,children:d||f[g]||wk[g]}):null,v.jsx(dU,{ownerState:_,className:R.message,children:o}),i!=null?v.jsx(bk,{ownerState:_,className:R.action,children:i}):null,i==null&&m?v.jsx(bk,{ownerState:_,className:R.action,children:v.jsx(C,N({size:"small","aria-label":a,title:a,color:"inherit",onClick:m},I,{children:v.jsx(A,N({fontSize:"small"},L))}))}):null]}))}),pU=fU;function hU(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,o=bO({badgeContent:t,max:r});let s=n;n===!1&&t===0&&!i&&(s=!0);const{badgeContent:a,max:l=r}=s?o:e,c=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:c}}const NO="base";function mU(e){return`${NO}--${e}`}function gU(e,t){return`${NO}-${e}-${t}`}function AO(e,t){const n=sO[t];return n?mU(n):gU(e,t)}function vU(e,t){const n={};return t.forEach(r=>{n[r]=AO(e,r)}),n}function xk(e){return e.substring(2).toLowerCase()}function yU(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=sn(t.ref,a),d=Wi(p=>{const g=c.current;c.current=!1;const E=Qn(a.current);if(!l.current||!a.current||"clientX"in p&&yU(p,E))return;if(s.current){s.current=!1;return}let b;p.composedPath?b=p.composedPath().indexOf(a.current)>-1:b=!E.documentElement.contains(p.target)||a.current.contains(p.target),!b&&(n||!g)&&i(p)}),f=p=>g=>{c.current=!0;const E=t.props[p];E&&E(g)},m={ref:u};return o!==!1&&(m[o]=f(o)),k.useEffect(()=>{if(o!==!1){const p=xk(o),g=Qn(a.current),E=()=>{s.current=!0};return g.addEventListener(p,d),g.addEventListener("touchmove",E),()=>{g.removeEventListener(p,d),g.removeEventListener("touchmove",E)}}},[d,o]),r!==!1&&(m[r]=f(r)),k.useEffect(()=>{if(r!==!1){const p=xk(r),g=Qn(a.current);return g.addEventListener(p,d),()=>{g.removeEventListener(p,d)}}},[d,r]),v.jsx(k.Fragment,{children:k.cloneElement(t,m)})}var ni="top",Qi="bottom",Xi="right",ri="left",Ix="auto",dp=[ni,Qi,Xi,ri],Su="start",Nf="end",wU="clippingParents",DO="viewport",yd="popper",xU="reference",Sk=dp.reduce(function(e,t){return e.concat([t+"-"+Su,t+"-"+Nf])},[]),BO=[].concat(dp,[Ix]).reduce(function(e,t){return e.concat([t,t+"-"+Su,t+"-"+Nf])},[]),SU="beforeRead",_U="read",CU="afterRead",kU="beforeMain",EU="main",RU="afterMain",PU="beforeWrite",TU="write",OU="afterWrite",LU=[SU,_U,CU,kU,EU,RU,PU,TU,OU];function ns(e){return e?(e.nodeName||"").toLowerCase():null}function _i(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function zl(e){var t=_i(e).Element;return e instanceof t||e instanceof Element}function Hi(e){var t=_i(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Mx(e){if(typeof ShadowRoot>"u")return!1;var t=_i(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jU(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Hi(o)||!ns(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function IU(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Hi(i)||!ns(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const MU={name:"applyStyles",enabled:!0,phase:"write",fn:jU,effect:IU,requires:["computeStyles"]};function es(e){return e.split("-")[0]}var kl=Math.max,Fm=Math.min,_u=Math.round;function h1(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function FO(){return!/^((?!chrome|android).)*safari/i.test(h1())}function Cu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Hi(e)&&(i=e.offsetWidth>0&&_u(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&_u(r.height)/e.offsetHeight||1);var s=zl(e)?_i(e):window,a=s.visualViewport,l=!FO()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function $x(e){var t=Cu(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function zO(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Mx(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ms(e){return _i(e).getComputedStyle(e)}function $U(e){return["table","td","th"].indexOf(ns(e))>=0}function Va(e){return((zl(e)?e.ownerDocument:e.document)||window.document).documentElement}function $v(e){return ns(e)==="html"?e:e.assignedSlot||e.parentNode||(Mx(e)?e.host:null)||Va(e)}function _k(e){return!Hi(e)||Ms(e).position==="fixed"?null:e.offsetParent}function NU(e){var t=/firefox/i.test(h1()),n=/Trident/i.test(h1());if(n&&Hi(e)){var r=Ms(e);if(r.position==="fixed")return null}var i=$v(e);for(Mx(i)&&(i=i.host);Hi(i)&&["html","body"].indexOf(ns(i))<0;){var o=Ms(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function fp(e){for(var t=_i(e),n=_k(e);n&&$U(n)&&Ms(n).position==="static";)n=_k(n);return n&&(ns(n)==="html"||ns(n)==="body"&&Ms(n).position==="static")?t:n||NU(e)||t}function Nx(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Jd(e,t,n){return kl(e,Fm(t,n))}function AU(e,t,n){var r=Jd(e,t,n);return r>n?n:r}function UO(){return{top:0,right:0,bottom:0,left:0}}function WO(e){return Object.assign({},UO(),e)}function GO(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var DU=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,WO(typeof t!="number"?t:GO(t,dp))};function BU(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=es(n.placement),l=Nx(a),c=[ri,Xi].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var d=DU(i.padding,n),f=$x(o),m=l==="y"?ni:ri,p=l==="y"?Qi:Xi,g=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],E=s[l]-n.rects.reference[l],b=fp(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,y=g/2-E/2,_=d[m],R=w-f[u]-d[p],T=w/2-f[u]/2+y,C=Jd(_,T,R),I=l;n.modifiersData[r]=(t={},t[I]=C,t.centerOffset=C-T,t)}}function FU(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||zO(t.elements.popper,i)&&(t.elements.arrow=i))}const zU={name:"arrow",enabled:!0,phase:"main",fn:BU,effect:FU,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ku(e){return e.split("-")[1]}var UU={top:"auto",right:"auto",bottom:"auto",left:"auto"};function WU(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:_u(n*i)/i||0,y:_u(r*i)/i||0}}function Ck(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=s.x,m=f===void 0?0:f,p=s.y,g=p===void 0?0:p,E=typeof u=="function"?u({x:m,y:g}):{x:m,y:g};m=E.x,g=E.y;var b=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),y=ri,_=ni,R=window;if(c){var T=fp(n),C="clientHeight",I="clientWidth";if(T===_i(n)&&(T=Va(n),Ms(T).position!=="static"&&a==="absolute"&&(C="scrollHeight",I="scrollWidth")),T=T,i===ni||(i===ri||i===Xi)&&o===Nf){_=Qi;var A=d&&T===R&&R.visualViewport?R.visualViewport.height:T[C];g-=A-r.height,g*=l?1:-1}if(i===ri||(i===ni||i===Qi)&&o===Nf){y=Xi;var L=d&&T===R&&R.visualViewport?R.visualViewport.width:T[I];m-=L-r.width,m*=l?1:-1}}var $=Object.assign({position:a},c&&UU),F=u===!0?WU({x:m,y:g},_i(n)):{x:m,y:g};if(m=F.x,g=F.y,l){var z;return Object.assign({},$,(z={},z[_]=w?"0":"",z[y]=b?"0":"",z.transform=(R.devicePixelRatio||1)<=1?"translate("+m+"px, "+g+"px)":"translate3d("+m+"px, "+g+"px, 0)",z))}return Object.assign({},$,(t={},t[_]=w?g+"px":"",t[y]=b?m+"px":"",t.transform="",t))}function GU(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:es(t.placement),variation:ku(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ck(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ck(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const HU={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:GU,data:{}};var ph={passive:!0};function VU(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=_i(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,ph)}),a&&l.addEventListener("resize",n.update,ph),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ph)}),a&&l.removeEventListener("resize",n.update,ph)}}const KU={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:VU,data:{}};var qU={left:"right",right:"left",bottom:"top",top:"bottom"};function Yh(e){return e.replace(/left|right|bottom|top/g,function(t){return qU[t]})}var YU={start:"end",end:"start"};function kk(e){return e.replace(/start|end/g,function(t){return YU[t]})}function Ax(e){var t=_i(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Dx(e){return Cu(Va(e)).left+Ax(e).scrollLeft}function QU(e,t){var n=_i(e),r=Va(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=FO();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Dx(e),y:l}}function XU(e){var t,n=Va(e),r=Ax(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=kl(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=kl(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Dx(e),l=-r.scrollTop;return Ms(i||n).direction==="rtl"&&(a+=kl(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Bx(e){var t=Ms(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function HO(e){return["html","body","#document"].indexOf(ns(e))>=0?e.ownerDocument.body:Hi(e)&&Bx(e)?e:HO($v(e))}function Zd(e,t){var n;t===void 0&&(t=[]);var r=HO(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=_i(r),s=i?[o].concat(o.visualViewport||[],Bx(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Zd($v(s)))}function m1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function JU(e,t){var n=Cu(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Ek(e,t,n){return t===DO?m1(QU(e,n)):zl(t)?JU(t,n):m1(XU(Va(e)))}function ZU(e){var t=Zd($v(e)),n=["absolute","fixed"].indexOf(Ms(e).position)>=0,r=n&&Hi(e)?fp(e):e;return zl(r)?t.filter(function(i){return zl(i)&&zO(i,r)&&ns(i)!=="body"}):[]}function e9(e,t,n,r){var i=t==="clippingParents"?ZU(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var u=Ek(e,c,r);return l.top=kl(u.top,l.top),l.right=Fm(u.right,l.right),l.bottom=Fm(u.bottom,l.bottom),l.left=kl(u.left,l.left),l},Ek(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function VO(e){var t=e.reference,n=e.element,r=e.placement,i=r?es(r):null,o=r?ku(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case ni:l={x:s,y:t.y-n.height};break;case Qi:l={x:s,y:t.y+t.height};break;case Xi:l={x:t.x+t.width,y:a};break;case ri:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?Nx(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Su:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Nf:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Af(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?wU:a,c=n.rootBoundary,u=c===void 0?DO:c,d=n.elementContext,f=d===void 0?yd:d,m=n.altBoundary,p=m===void 0?!1:m,g=n.padding,E=g===void 0?0:g,b=WO(typeof E!="number"?E:GO(E,dp)),w=f===yd?xU:yd,y=e.rects.popper,_=e.elements[p?w:f],R=e9(zl(_)?_:_.contextElement||Va(e.elements.popper),l,u,s),T=Cu(e.elements.reference),C=VO({reference:T,element:y,strategy:"absolute",placement:i}),I=m1(Object.assign({},y,C)),A=f===yd?I:T,L={top:R.top-A.top+b.top,bottom:A.bottom-R.bottom+b.bottom,left:R.left-A.left+b.left,right:A.right-R.right+b.right},$=e.modifiersData.offset;if(f===yd&&$){var F=$[i];Object.keys(L).forEach(function(z){var Y=[Xi,Qi].indexOf(z)>=0?1:-1,J=[ni,Qi].indexOf(z)>=0?"y":"x";L[z]+=F[J]*Y})}return L}function t9(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?BO:l,u=ku(r),d=u?a?Sk:Sk.filter(function(p){return ku(p)===u}):dp,f=d.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=d);var m=f.reduce(function(p,g){return p[g]=Af(e,{placement:g,boundary:i,rootBoundary:o,padding:s})[es(g)],p},{});return Object.keys(m).sort(function(p,g){return m[p]-m[g]})}function n9(e){if(es(e)===Ix)return[];var t=Yh(e);return[kk(e),t,kk(t)]}function r9(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,m=n.flipVariations,p=m===void 0?!0:m,g=n.allowedAutoPlacements,E=t.options.placement,b=es(E),w=b===E,y=l||(w||!p?[Yh(E)]:n9(E)),_=[E].concat(y).reduce(function(ke,Ve){return ke.concat(es(Ve)===Ix?t9(t,{placement:Ve,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):Ve)},[]),R=t.rects.reference,T=t.rects.popper,C=new Map,I=!0,A=_[0],L=0;L<_.length;L++){var $=_[L],F=es($),z=ku($)===Su,Y=[ni,Qi].indexOf(F)>=0,J=Y?"width":"height",Z=Af(t,{placement:$,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),pe=Y?z?Xi:ri:z?Qi:ni;R[J]>T[J]&&(pe=Yh(pe));var G=Yh(pe),V=[];if(o&&V.push(Z[F]<=0),a&&V.push(Z[pe]<=0,Z[G]<=0),V.every(function(ke){return ke})){A=$,I=!1;break}C.set($,V)}if(I)for(var le=p?3:1,Le=function(Ve){var Re=_.find(function(et){var lt=C.get(et);if(lt)return lt.slice(0,Ve).every(function(Pe){return Pe})});if(Re)return A=Re,"break"},He=le;He>0;He--){var Te=Le(He);if(Te==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const i9={name:"flip",enabled:!0,phase:"main",fn:r9,requiresIfExists:["offset"],data:{_skip:!1}};function Rk(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Pk(e){return[ni,Xi,Qi,ri].some(function(t){return e[t]>=0})}function o9(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Af(t,{elementContext:"reference"}),a=Af(t,{altBoundary:!0}),l=Rk(s,r),c=Rk(a,i,o),u=Pk(l),d=Pk(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const s9={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:o9};function a9(e,t,n){var r=es(e),i=[ri,ni].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[ri,Xi].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function l9(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=BO.reduce(function(u,d){return u[d]=a9(d,t.rects,o),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const c9={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:l9};function u9(e){var t=e.state,n=e.name;t.modifiersData[n]=VO({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const d9={name:"popperOffsets",enabled:!0,phase:"read",fn:u9,data:{}};function f9(e){return e==="x"?"y":"x"}function p9(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,m=f===void 0?!0:f,p=n.tetherOffset,g=p===void 0?0:p,E=Af(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=es(t.placement),w=ku(t.placement),y=!w,_=Nx(b),R=f9(_),T=t.modifiersData.popperOffsets,C=t.rects.reference,I=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,L=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(T){if(o){var z,Y=_==="y"?ni:ri,J=_==="y"?Qi:Xi,Z=_==="y"?"height":"width",pe=T[_],G=pe+E[Y],V=pe-E[J],le=m?-I[Z]/2:0,Le=w===Su?C[Z]:I[Z],He=w===Su?-I[Z]:-C[Z],Te=t.elements.arrow,ke=m&&Te?$x(Te):{width:0,height:0},Ve=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:UO(),Re=Ve[Y],et=Ve[J],lt=Jd(0,C[Z],ke[Z]),Pe=y?C[Z]/2-le-lt-Re-L.mainAxis:Le-lt-Re-L.mainAxis,Et=y?-C[Z]/2+le+lt+et+L.mainAxis:He+lt+et+L.mainAxis,at=t.elements.arrow&&fp(t.elements.arrow),Ge=at?_==="y"?at.clientTop||0:at.clientLeft||0:0,Ze=(z=$==null?void 0:$[_])!=null?z:0,gt=pe+Pe-Ze-Ge,ee=pe+Et-Ze,fe=Jd(m?Fm(G,gt):G,pe,m?kl(V,ee):V);T[_]=fe,F[_]=fe-pe}if(a){var _e,ze=_==="x"?ni:ri,W=_==="x"?Qi:Xi,S=T[R],O=R==="y"?"height":"width",D=S+E[ze],K=S-E[W],Q=[ni,ri].indexOf(b)!==-1,de=(_e=$==null?void 0:$[R])!=null?_e:0,$e=Q?D:S-C[O]-I[O]-de+L.altAxis,rt=Q?S+C[O]+I[O]-de-L.altAxis:K,Je=m&&Q?AU($e,S,rt):Jd(m?$e:D,S,m?rt:K);T[R]=Je,F[R]=Je-S}t.modifiersData[r]=F}}const h9={name:"preventOverflow",enabled:!0,phase:"main",fn:p9,requiresIfExists:["offset"]};function m9(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function g9(e){return e===_i(e)||!Hi(e)?Ax(e):m9(e)}function v9(e){var t=e.getBoundingClientRect(),n=_u(t.width)/e.offsetWidth||1,r=_u(t.height)/e.offsetHeight||1;return n!==1||r!==1}function y9(e,t,n){n===void 0&&(n=!1);var r=Hi(t),i=Hi(t)&&v9(t),o=Va(t),s=Cu(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((ns(t)!=="body"||Bx(o))&&(a=g9(t)),Hi(t)?(l=Cu(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Dx(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function b9(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function w9(e){var t=b9(e);return LU.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function x9(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function S9(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Tk={placement:"bottom",modifiers:[],strategy:"absolute"};function Ok(){for(var e=arguments.length,t=new Array(e),n=0;nft({root:["root"]},M6(E9)),j9={},I9=k.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:f,slotProps:m={},slots:p={},TransitionProps:g}=t,E=Ie(t,R9),b=k.useRef(null),w=sn(b,n),y=k.useRef(null),_=sn(y,f),R=k.useRef(_);oi(()=>{R.current=_},[_]),k.useImperativeHandle(f,()=>y.current,[]);const T=T9(u,s),[C,I]=k.useState(T),[A,L]=k.useState(g1(i));k.useEffect(()=>{y.current&&y.current.forceUpdate()}),k.useEffect(()=>{i&&L(g1(i))},[i]),oi(()=>{if(!A||!c)return;const J=G=>{I(G.placement)};let Z=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:G})=>{J(G)}}];l!=null&&(Z=Z.concat(l)),d&&d.modifiers!=null&&(Z=Z.concat(d.modifiers));const pe=k9(A,b.current,N({placement:T},d,{modifiers:Z}));return R.current(pe),()=>{pe.destroy(),R.current(null)}},[A,a,l,c,d,T]);const $={placement:C};g!==null&&($.TransitionProps=g);const F=L9(),z=(r=p.root)!=null?r:"div",Y=Po({elementType:z,externalSlotProps:m.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:w},ownerState:t,className:F.root});return v.jsx(z,N({},Y,{children:typeof o=="function"?o($):o}))}),M9=k.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=j9,popperRef:m,style:p,transition:g=!1,slotProps:E={},slots:b={}}=t,w=Ie(t,P9),[y,_]=k.useState(!0),R=()=>{_(!1)},T=()=>{_(!0)};if(!l&&!u&&(!g||y))return null;let C;if(o)C=o;else if(r){const L=g1(r);C=L&&O9(L)?Qn(L).body:Qn(null).body}const I=!u&&l&&(!g||y)?"none":void 0,A=g?{in:u,onEnter:R,onExited:T}:void 0;return v.jsx(Tx,{disablePortal:a,container:C,children:v.jsx(I9,N({anchorEl:r,direction:s,disablePortal:a,modifiers:c,ref:n,open:g?!y:u,placement:d,popperOptions:f,popperRef:m,slotProps:E,slots:b},w,{style:N({position:"fixed",top:0,left:0,display:I},p),TransitionProps:A,children:i}))})});function $9(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=ba();k.useEffect(()=>{if(!i)return;function b(w){w.defaultPrevented||(w.key==="Escape"||w.key==="Esc")&&(r==null||r(w,"escapeKeyDown"))}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i,r]);const a=Wi((b,w)=>{r==null||r(b,w)}),l=Wi(b=>{!r||b==null||s.start(b,()=>{a(null,"timeout")})});k.useEffect(()=>(i&&l(t),s.clear),[i,t,l,s]);const c=b=>{r==null||r(b,"clickaway")},u=s.clear,d=k.useCallback(()=>{t!=null&&l(o??t*.5)},[t,o,l]),f=b=>w=>{const y=b.onBlur;y==null||y(w),d()},m=b=>w=>{const y=b.onFocus;y==null||y(w),u()},p=b=>w=>{const y=b.onMouseEnter;y==null||y(w),u()},g=b=>w=>{const y=b.onMouseLeave;y==null||y(w),d()};return k.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,i,d,u]),{getRootProps:(b={})=>{const w=N({},Dm(e),Dm(b));return N({role:"presentation"},b,w,{onBlur:f(w),onFocus:m(w),onMouseEnter:p(w),onMouseLeave:g(w)})},onClickAway:c}}const N9=["onChange","maxRows","minRows","style","value"];function hh(e){return parseInt(e,10)||0}const A9={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function D9(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const B9=k.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=t,l=Ie(t,N9),{current:c}=k.useRef(a!=null),u=k.useRef(null),d=sn(n,u),f=k.useRef(null),m=k.useCallback(()=>{const E=u.current,w=ts(E).getComputedStyle(E);if(w.width==="0px")return{outerHeightStyle:0,overflowing:!1};const y=f.current;y.style.width=w.width,y.value=E.value||t.placeholder||"x",y.value.slice(-1)===` -`&&(y.value+=" ");const _=w.boxSizing,R=hh(w.paddingBottom)+hh(w.paddingTop),T=hh(w.borderBottomWidth)+hh(w.borderTopWidth),C=y.scrollHeight;y.value="x";const I=y.scrollHeight;let A=C;o&&(A=Math.max(Number(o)*I,A)),i&&(A=Math.min(Number(i)*I,A)),A=Math.max(A,I);const L=A+(_==="border-box"?R+T:0),$=Math.abs(A-C)<=1;return{outerHeightStyle:L,overflowing:$}},[i,o,t.placeholder]),p=k.useCallback(()=>{const E=m();if(D9(E))return;const b=u.current;b.style.height=`${E.outerHeightStyle}px`,b.style.overflow=E.overflowing?"hidden":""},[m]);oi(()=>{const E=()=>{p()};let b;const w=xv(E),y=u.current,_=ts(y);_.addEventListener("resize",w);let R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver(E),R.observe(y)),()=>{w.clear(),cancelAnimationFrame(b),_.removeEventListener("resize",w),R&&R.disconnect()}},[m,p]),oi(()=>{p()});const g=E=>{c||p(),r&&r(E)};return v.jsxs(k.Fragment,{children:[v.jsx("textarea",N({value:a,onChange:g,ref:d,rows:o,style:s},l)),v.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:N({},A9.shadow,s,{paddingTop:0,paddingBottom:0})})]})});var Fx={};Object.defineProperty(Fx,"__esModule",{value:!0});var qO=Fx.default=void 0,F9=U9(k),z9=KT;function YO(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(YO=function(r){return r?n:t})(e)}function U9(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=YO(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function W9(e){return Object.keys(e).length===0}function G9(e=null){const t=F9.useContext(z9.ThemeContext);return!t||W9(t)?e:t}qO=Fx.default=G9;const H9=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],V9=Ee(M9,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),K9=k.forwardRef(function(t,n){var r;const i=qO(),o=vt({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:l,componentsProps:c,container:u,disablePortal:d,keepMounted:f,modifiers:m,open:p,placement:g,popperOptions:E,popperRef:b,transition:w,slots:y,slotProps:_}=o,R=Ie(o,H9),T=(r=y==null?void 0:y.root)!=null?r:l==null?void 0:l.Root,C=N({anchorEl:s,container:u,disablePortal:d,keepMounted:f,modifiers:m,open:p,placement:g,popperOptions:E,popperRef:b,transition:w},R);return v.jsx(V9,N({as:a,direction:i==null?void 0:i.direction,slots:{root:T},slotProps:_??c},C,{ref:n}))}),QO=K9;function q9(e){return pt("MuiListSubheader",e)}ht("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Y9=["className","color","component","disableGutters","disableSticky","inset"],Q9=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${ye(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return ft(s,q9,t)},X9=Ee("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ye(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>N({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),XO=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:a=!1,disableSticky:l=!1,inset:c=!1}=r,u=Ie(r,Y9),d=N({},r,{color:o,component:s,disableGutters:a,disableSticky:l,inset:c}),f=Q9(d);return v.jsx(X9,N({as:s,className:Ae(f.root,i),ref:n,ownerState:d},u))});XO.muiSkipListHighlight=!0;const J9=XO,Z9=Gn(v.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function eW(e){return pt("MuiChip",e)}const tW=ht("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Ft=tW,nW=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],rW=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,c={root:["root",l,n&&"disabled",`size${ye(r)}`,`color${ye(i)}`,a&&"clickable",a&&`clickableColor${ye(i)}`,s&&"deletable",s&&`deletableColor${ye(i)}`,`${l}${ye(i)}`],label:["label",`label${ye(r)}`],avatar:["avatar",`avatar${ye(r)}`,`avatarColor${ye(i)}`],icon:["icon",`icon${ye(r)}`,`iconColor${ye(o)}`],deleteIcon:["deleteIcon",`deleteIcon${ye(r)}`,`deleteIconColor${ye(i)}`,`deleteIcon${ye(l)}Color${ye(i)}`]};return ft(c,eW,t)},iW=Ee("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:s,size:a,variant:l}=n;return[{[`& .${Ft.avatar}`]:t.avatar},{[`& .${Ft.avatar}`]:t[`avatar${ye(a)}`]},{[`& .${Ft.avatar}`]:t[`avatarColor${ye(r)}`]},{[`& .${Ft.icon}`]:t.icon},{[`& .${Ft.icon}`]:t[`icon${ye(a)}`]},{[`& .${Ft.icon}`]:t[`iconColor${ye(i)}`]},{[`& .${Ft.deleteIcon}`]:t.deleteIcon},{[`& .${Ft.deleteIcon}`]:t[`deleteIcon${ye(a)}`]},{[`& .${Ft.deleteIcon}`]:t[`deleteIconColor${ye(r)}`]},{[`& .${Ft.deleteIcon}`]:t[`deleteIcon${ye(l)}Color${ye(r)}`]},t.root,t[`size${ye(a)}`],t[`color${ye(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${ye(r)})`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${ye(r)}`],t[l],t[`${l}${ye(r)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return N({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Ft.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Ft.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${Ft.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Ft.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Ft.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Ft.icon}`]:N({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&N({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},t.color!=="default"&&{color:"inherit"})),[`& .${Ft.deleteIcon}`]:N({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Mt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Mt(e.palette.text.primary,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:Mt(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Ft.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Ft.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>N({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Ft.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${Ft.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>N({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Ft.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Ft.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Ft.avatar}`]:{marginLeft:4},[`& .${Ft.avatarSmall}`]:{marginLeft:2},[`& .${Ft.icon}`]:{marginLeft:4},[`& .${Ft.iconSmall}`]:{marginLeft:2},[`& .${Ft.deleteIcon}`]:{marginRight:5},[`& .${Ft.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Mt(e.palette[t.color].main,.7)}`,[`&.${Ft.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Ft.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Mt(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Ft.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Mt(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),oW=Ee("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ye(r)}`]]}})(({ownerState:e})=>N({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function Lk(e){return e.key==="Backspace"||e.key==="Delete"}const sW=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:f,onClick:m,onDelete:p,onKeyDown:g,onKeyUp:E,size:b="medium",variant:w="filled",tabIndex:y,skipFocusWhenDisabled:_=!1}=r,R=Ie(r,nW),T=k.useRef(null),C=sn(T,n),I=V=>{V.stopPropagation(),p&&p(V)},A=V=>{V.currentTarget===V.target&&Lk(V)&&V.preventDefault(),g&&g(V)},L=V=>{V.currentTarget===V.target&&(p&&Lk(V)?p(V):V.key==="Escape"&&T.current&&T.current.blur()),E&&E(V)},$=s!==!1&&m?!0:s,F=$||p?Ro:l||"div",z=N({},r,{component:F,disabled:u,size:b,color:a,iconColor:k.isValidElement(d)&&d.props.color||a,onDelete:!!p,clickable:$,variant:w}),Y=rW(z),J=F===Ro?N({component:l||"div",focusVisibleClassName:Y.focusVisible},p&&{disableRipple:!0}):{};let Z=null;p&&(Z=c&&k.isValidElement(c)?k.cloneElement(c,{className:Ae(c.props.className,Y.deleteIcon),onClick:I}):v.jsx(Z9,{className:Ae(Y.deleteIcon),onClick:I}));let pe=null;i&&k.isValidElement(i)&&(pe=k.cloneElement(i,{className:Ae(Y.avatar,i.props.className)}));let G=null;return d&&k.isValidElement(d)&&(G=k.cloneElement(d,{className:Ae(Y.icon,d.props.className)})),v.jsxs(iW,N({as:F,className:Ae(Y.root,o),disabled:$&&u?!0:void 0,onClick:m,onKeyDown:A,onKeyUp:L,ref:C,tabIndex:_&&u?-1:y,ownerState:z},J,R,{children:[pe||G,v.jsx(oW,{className:Ae(Y.label),ownerState:z,children:f}),Z]}))}),zx=sW;function ec({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const aW=k.createContext(void 0),Ux=aW;function Ka(){return k.useContext(Ux)}function JO(e){return v.jsx(B3,N({},e,{defaultTheme:vv,themeId:Fl}))}function jk(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function zm(e,t=!1){return e&&(jk(e.value)&&e.value!==""||t&&jk(e.defaultValue)&&e.defaultValue!=="")}function lW(e){return e.startAdornment}function cW(e){return pt("MuiInputBase",e)}const uW=ht("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Eu=uW,dW=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Nv=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ye(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Av=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},fW=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:m,type:p}=e,g={root:["root",`color${ye(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",f&&f!=="medium"&&`size${ye(f)}`,u&&"multiline",m&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",p==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return ft(g,cW,t)},Dv=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Nv})(({theme:e,ownerState:t})=>N({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Eu.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&N({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),Bv=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Av})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=N({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),i={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return N({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Eu.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Eu.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),pW=v.jsx(JO,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),hW=k.forwardRef(function(t,n){var r;const i=vt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:m,endAdornment:p,fullWidth:g=!1,id:E,inputComponent:b="input",inputProps:w={},inputRef:y,maxRows:_,minRows:R,multiline:T=!1,name:C,onBlur:I,onChange:A,onClick:L,onFocus:$,onKeyDown:F,onKeyUp:z,placeholder:Y,readOnly:J,renderSuffix:Z,rows:pe,slotProps:G={},slots:V={},startAdornment:le,type:Le="text",value:He}=i,Te=Ie(i,dW),ke=w.value!=null?w.value:He,{current:Ve}=k.useRef(ke!=null),Re=k.useRef(),et=k.useCallback(Je=>{},[]),lt=sn(Re,y,w.ref,et),[Pe,Et]=k.useState(!1),at=Ka(),Ge=ec({props:i,muiFormControl:at,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ge.focused=at?at.focused:Pe,k.useEffect(()=>{!at&&f&&Pe&&(Et(!1),I&&I())},[at,f,Pe,I]);const Ze=at&&at.onFilled,gt=at&&at.onEmpty,ee=k.useCallback(Je=>{zm(Je)?Ze&&Ze():gt&>()},[Ze,gt]);oi(()=>{Ve&&ee({value:ke})},[ke,ee,Ve]);const fe=Je=>{if(Ge.disabled){Je.stopPropagation();return}$&&$(Je),w.onFocus&&w.onFocus(Je),at&&at.onFocus?at.onFocus(Je):Et(!0)},_e=Je=>{I&&I(Je),w.onBlur&&w.onBlur(Je),at&&at.onBlur?at.onBlur(Je):Et(!1)},ze=(Je,...Oe)=>{if(!Ve){const tt=Je.target||Re.current;if(tt==null)throw new Error(Dl(1));ee({value:tt.value})}w.onChange&&w.onChange(Je,...Oe),A&&A(Je,...Oe)};k.useEffect(()=>{ee(Re.current)},[]);const W=Je=>{Re.current&&Je.currentTarget===Je.target&&Re.current.focus(),L&&L(Je)};let S=b,O=w;T&&S==="input"&&(pe?O=N({type:void 0,minRows:pe,maxRows:pe},O):O=N({type:void 0,maxRows:_,minRows:R},O),S=B9);const D=Je=>{ee(Je.animationName==="mui-auto-fill-cancel"?Re.current:{value:"x"})};k.useEffect(()=>{at&&at.setAdornedStart(!!le)},[at,le]);const K=N({},i,{color:Ge.color||"primary",disabled:Ge.disabled,endAdornment:p,error:Ge.error,focused:Ge.focused,formControl:at,fullWidth:g,hiddenLabel:Ge.hiddenLabel,multiline:T,size:Ge.size,startAdornment:le,type:Le}),Q=fW(K),de=V.root||c.Root||Dv,$e=G.root||u.root||{},rt=V.input||c.Input||Bv;return O=N({},O,(r=G.input)!=null?r:u.input),v.jsxs(k.Fragment,{children:[!m&&pW,v.jsxs(de,N({},$e,!xu(de)&&{ownerState:N({},K,$e.ownerState)},{ref:n,onClick:W},Te,{className:Ae(Q.root,$e.className,l,J&&"MuiInputBase-readOnly"),children:[le,v.jsx(Ux.Provider,{value:null,children:v.jsx(rt,N({ownerState:K,"aria-invalid":Ge.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:d,disabled:Ge.disabled,id:E,onAnimationStart:D,name:C,placeholder:Y,readOnly:J,required:Ge.required,rows:pe,value:ke,onKeyDown:F,onKeyUp:z,type:Le},O,!xu(rt)&&{as:S,ownerState:N({},K,O.ownerState)},{ref:lt,className:Ae(Q.input,O.className,J&&"MuiInputBase-readOnly"),onBlur:_e,onChange:ze,onFocus:fe}))}),p,Z?Z(N({},Ge,{startAdornment:le})):null]}))]})}),Wx=hW;function mW(e){return pt("MuiInput",e)}const gW=N({},Eu,ht("MuiInput",["root","underline","input"])),bd=gW;function vW(e){return pt("MuiOutlinedInput",e)}const yW=N({},Eu,ht("MuiOutlinedInput",["root","notchedOutline","input"])),sa=yW;function bW(e){return pt("MuiFilledInput",e)}const wW=N({},Eu,ht("MuiFilledInput",["root","underline","input"])),il=wW,xW=Gn(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function SW(e){return pt("MuiBadge",e)}const _W=ht("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),aa=_W,CW=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],c0=10,u0=4,kW=Uu(),EW=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:o,classes:s={}}=e,a={root:["root"],badge:["badge",o,r&&"invisible",`anchorOrigin${ye(n.vertical)}${ye(n.horizontal)}`,`anchorOrigin${ye(n.vertical)}${ye(n.horizontal)}${ye(i)}`,`overlap${ye(i)}`,t!=="default"&&`color${ye(t)}`]};return ft(a,SW,s)},RW=Ee("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),PW=Ee("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${ye(n.anchorOrigin.vertical)}${ye(n.anchorOrigin.horizontal)}${ye(n.overlap)}`],n.color!=="default"&&t[`color${ye(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:c0*2,lineHeight:1,padding:"0 6px",height:c0*2,borderRadius:c0,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,i;return((r=e.vars)!=null?r:e).palette[n].main&&((i=e.vars)!=null?i:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:u0,height:u0*2,minWidth:u0*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),TW=k.forwardRef(function(t,n){var r,i,o,s,a,l;const c=kW({props:t,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:f,components:m={},componentsProps:p={},children:g,overlap:E="rectangular",color:b="default",invisible:w=!1,max:y=99,badgeContent:_,slots:R,slotProps:T,showZero:C=!1,variant:I="standard"}=c,A=Ie(c,CW),{badgeContent:L,invisible:$,max:F,displayValue:z}=hU({max:y,invisible:w,badgeContent:_,showZero:C}),Y=bO({anchorOrigin:u,color:b,overlap:E,variant:I,badgeContent:_}),J=$||L==null&&I!=="dot",{color:Z=b,overlap:pe=E,anchorOrigin:G=u,variant:V=I}=J?Y:c,le=V!=="dot"?z:void 0,Le=N({},c,{badgeContent:L,invisible:J,max:F,displayValue:le,showZero:C,anchorOrigin:G,color:Z,overlap:pe,variant:V}),He=EW(Le),Te=(r=(i=R==null?void 0:R.root)!=null?i:m.Root)!=null?r:RW,ke=(o=(s=R==null?void 0:R.badge)!=null?s:m.Badge)!=null?o:PW,Ve=(a=T==null?void 0:T.root)!=null?a:p.root,Re=(l=T==null?void 0:T.badge)!=null?l:p.badge,et=Po({elementType:Te,externalSlotProps:Ve,externalForwardedProps:A,additionalProps:{ref:n,as:f},ownerState:Le,className:Ae(Ve==null?void 0:Ve.className,He.root,d)}),lt=Po({elementType:ke,externalSlotProps:Re,ownerState:Le,className:Ae(He.badge,Re==null?void 0:Re.className)});return v.jsxs(Te,N({},et,{children:[g,v.jsx(ke,N({},lt,{children:le}))]}))}),OW=TW,LW=ht("MuiBox",["root"]),jW=LW,IW=xx(),MW=z3({themeId:Fl,defaultTheme:IW,defaultClassName:jW.root,generateClassName:vx.generate}),Zt=MW,$W=Gn(v.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),NW=["slots","slotProps"],AW=Ee(Ro)(({theme:e})=>N({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":N({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":N({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:a1(e.palette.grey[200],.12)}:{backgroundColor:a1(e.palette.grey[600],.12)})})),DW=Ee($W)({width:24,height:16});function BW(e){const{slots:t={},slotProps:n={}}=e,r=Ie(e,NW),i=e;return v.jsx("li",{children:v.jsx(AW,N({focusRipple:!0},r,{ownerState:i,children:v.jsx(DW,N({as:t.CollapsedIcon,ownerState:i},n.collapsedIcon))}))})}function FW(e){return pt("MuiBreadcrumbs",e)}const zW=ht("MuiBreadcrumbs",["root","ol","li","separator"]),UW=zW,WW=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],GW=e=>{const{classes:t}=e;return ft({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},FW,t)},HW=Ee(xt,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${UW.li}`]:t.li},t.root]})({}),VW=Ee("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),KW=Ee("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function qW(e,t,n,r){return e.reduce((i,o,s)=>(s{const I=()=>{E(!0);const A=_.current.querySelector("a[href],button,[tabindex]");A&&A.focus()};return d+u>=C.length?C:[...C.slice(0,d),v.jsx(BW,{"aria-label":c,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:y},onClick:I},"ellipsis"),...C.slice(C.length-u,C.length)]},T=k.Children.toArray(i).filter(C=>k.isValidElement(C)).map((C,I)=>v.jsx("li",{className:w.li,children:C},`child-${I}`));return v.jsx(HW,N({ref:n,component:s,color:"text.secondary",className:Ae(w.root,o),ownerState:b},p,{children:v.jsx(VW,{className:w.ol,ref:_,ownerState:b,children:qW(g||f&&T.length<=f?T:R(T),w.separator,m,b)})}))}),qa=YW;function QW(e){return pt("MuiButton",e)}const XW=ht("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),mh=XW,JW=k.createContext({}),ZO=JW,ZW=k.createContext(void 0),eL=ZW,eG=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],tG=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,a={root:["root",o,`${o}${ye(t)}`,`size${ye(i)}`,`${o}Size${ye(i)}`,`color${ye(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${ye(i)}`],endIcon:["icon","endIcon",`iconSize${ye(i)}`]},l=ft(a,QW,s);return N({},s,l)},tL=e=>N({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),nG=Ee(Ro,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color)}`],t[`size${ye(n.size)}`],t[`${n.variant}Size${ye(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return N({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":N({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":N({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${mh.focusVisible}`]:N({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${mh.disabled}`]:N({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Mt(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${mh.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${mh.disabled}`]:{boxShadow:"none"}}),rG=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${ye(n.size)}`]]}})(({ownerState:e})=>N({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},tL(e))),iG=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${ye(n.size)}`]]}})(({ownerState:e})=>N({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},tL(e))),oG=k.forwardRef(function(t,n){const r=k.useContext(ZO),i=k.useContext(eL),o=Sx(r,t),s=vt({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:m=!1,endIcon:p,focusVisibleClassName:g,fullWidth:E=!1,size:b="medium",startIcon:w,type:y,variant:_="text"}=s,R=Ie(s,eG),T=N({},s,{color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:m,fullWidth:E,size:b,type:y,variant:_}),C=tG(T),I=w&&v.jsx(rG,{className:C.startIcon,ownerState:T,children:w}),A=p&&v.jsx(iG,{className:C.endIcon,ownerState:T,children:p}),L=i||"";return v.jsxs(nG,N({ownerState:T,className:Ae(r.className,C.root,u,L),component:c,disabled:d,focusRipple:!m,focusVisibleClassName:Ae(C.focusVisible,g),ref:n,type:y},R,{classes:C,children:[I,a,A]}))}),yn=oG;function sG(e){return pt("MuiButtonGroup",e)}const ar=ht("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),aG=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],lG=(e,t)=>{const{ownerState:n}=e;return[{[`& .${ar.grouped}`]:t.grouped},{[`& .${ar.grouped}`]:t[`grouped${ye(n.orientation)}`]},{[`& .${ar.grouped}`]:t[`grouped${ye(n.variant)}`]},{[`& .${ar.grouped}`]:t[`grouped${ye(n.variant)}${ye(n.orientation)}`]},{[`& .${ar.grouped}`]:t[`grouped${ye(n.variant)}${ye(n.color)}`]},{[`& .${ar.firstButton}`]:t.firstButton},{[`& .${ar.lastButton}`]:t.lastButton},{[`& .${ar.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},cG=e=>{const{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:o,orientation:s,variant:a}=e,l={root:["root",a,s==="vertical"&&"vertical",o&&"fullWidth",i&&"disableElevation"],grouped:["grouped",`grouped${ye(s)}`,`grouped${ye(a)}`,`grouped${ye(a)}${ye(s)}`,`grouped${ye(a)}${ye(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return ft(l,sG,t)},uG=Ee("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:lG})(({theme:e,ownerState:t})=>N({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},t.orientation==="vertical"&&{flexDirection:"column"},{[`& .${ar.grouped}`]:N({minWidth:40,"&:hover":N({},t.variant==="contained"&&{boxShadow:"none"})},t.variant==="contained"&&{boxShadow:"none"}),[`& .${ar.firstButton},& .${ar.middleButton}`]:N({},t.orientation==="horizontal"&&{borderTopRightRadius:0,borderBottomRightRadius:0},t.orientation==="vertical"&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},t.variant==="text"&&t.orientation==="horizontal"&&{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ar.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="text"&&t.orientation==="vertical"&&{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ar.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="text"&&t.color!=="inherit"&&{borderColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:Mt(e.palette[t.color].main,.5)},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"transparent"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"transparent"},t.variant==="contained"&&t.orientation==="horizontal"&&{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ar.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="contained"&&t.orientation==="vertical"&&{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ar.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="contained"&&t.color!=="inherit"&&{borderColor:(e.vars||e).palette[t.color].dark},{"&:hover":N({},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"currentColor"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"currentColor"})}),[`& .${ar.lastButton},& .${ar.middleButton}`]:N({},t.orientation==="horizontal"&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t.orientation==="vertical"&&{borderTopRightRadius:0,borderTopLeftRadius:0},t.variant==="outlined"&&t.orientation==="horizontal"&&{marginLeft:-1},t.variant==="outlined"&&t.orientation==="vertical"&&{marginTop:-1})})),dG=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiButtonGroup"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:m="horizontal",size:p="medium",variant:g="outlined"}=r,E=Ie(r,aG),b=N({},r,{color:s,component:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:m,size:p,variant:g}),w=cG(b),y=k.useMemo(()=>({className:w.grouped,color:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:p,variant:g}),[s,l,c,u,d,f,p,g,w.grouped]),_=iF(i),R=_.length,T=C=>{const I=C===0,A=C===R-1;return I&&A?"":I?w.firstButton:A?w.lastButton:w.middleButton};return v.jsx(uG,N({as:a,role:"group",className:Ae(w.root,o),ref:n,ownerState:b},E,{children:v.jsx(ZO.Provider,{value:y,children:_.map((C,I)=>v.jsx(eL.Provider,{value:T(I),children:C},I))})}))}),Df=dG;function fG(e){return pt("MuiCard",e)}ht("MuiCard",["root"]);const pG=["className","raised"],hG=e=>{const{classes:t}=e;return ft({root:["root"]},fG,t)},mG=Ee(ss,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),gG=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Ie(r,pG),a=N({},r,{raised:o}),l=hG(a);return v.jsx(mG,N({className:Ae(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))}),nL=gG;function vG(e){return pt("PrivateSwitchBase",e)}ht("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const yG=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],bG=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${ye(i)}`],input:["input"]};return ft(o,vG,t)},wG=Ee(Ro)(({ownerState:e})=>N({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),xG=Ee("input",{shouldForwardProp:fr})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),SG=k.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:m,inputRef:p,name:g,onBlur:E,onChange:b,onFocus:w,readOnly:y,required:_=!1,tabIndex:R,type:T,value:C}=t,I=Ie(t,yG),[A,L]=wu({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),$=Ka(),F=V=>{w&&w(V),$&&$.onFocus&&$.onFocus(V)},z=V=>{E&&E(V),$&&$.onBlur&&$.onBlur(V)},Y=V=>{if(V.nativeEvent.defaultPrevented)return;const le=V.target.checked;L(le),b&&b(V,le)};let J=l;$&&typeof J>"u"&&(J=$.disabled);const Z=T==="checkbox"||T==="radio",pe=N({},t,{checked:A,disabled:J,disableFocusRipple:c,edge:u}),G=bG(pe);return v.jsxs(wG,N({component:"span",className:Ae(G.root,s),centerRipple:!0,focusRipple:!c,disabled:J,tabIndex:null,role:void 0,onFocus:F,onBlur:z,ownerState:pe,ref:n},I,{children:[v.jsx(xG,N({autoFocus:r,checked:i,defaultChecked:a,className:G.input,disabled:J,id:Z?f:void 0,name:g,onChange:Y,readOnly:y,ref:p,required:_,ownerState:pe,tabIndex:R,type:T},T==="checkbox"&&C===void 0?{}:{value:C},m)),A?o:d]}))}),rL=SG,_G=Gn(v.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),CG=Gn(v.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),kG=Gn(v.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function EG(e){return pt("MuiCheckbox",e)}const RG=ht("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),d0=RG,PG=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],TG=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${ye(r)}`,`size${ye(i)}`]},s=ft(o,EG,t);return N({},t,s)},OG=Ee(rL,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${ye(n.size)}`],n.color!=="default"&&t[`color${ye(n.color)}`]]}})(({theme:e,ownerState:t})=>N({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${d0.checked}, &.${d0.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${d0.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),LG=v.jsx(CG,{}),jG=v.jsx(_G,{}),IG=v.jsx(kG,{}),MG=k.forwardRef(function(t,n){var r,i;const o=vt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=LG,color:a="primary",icon:l=jG,indeterminate:c=!1,indeterminateIcon:u=IG,inputProps:d,size:f="medium",className:m}=o,p=Ie(o,PG),g=c?u:l,E=c?u:s,b=N({},o,{color:a,indeterminate:c,size:f}),w=TG(b);return v.jsx(OG,N({type:"checkbox",inputProps:N({"data-indeterminate":c},d),icon:k.cloneElement(g,{fontSize:(r=g.props.fontSize)!=null?r:f}),checkedIcon:k.cloneElement(E,{fontSize:(i=E.props.fontSize)!=null?i:f}),ownerState:b,ref:n,className:Ae(w.root,m)},p,{classes:w}))}),Vo=MG,$G=(e,t)=>N({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),NG=e=>N({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),AG=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,a])=>{var l;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=N({html:$G(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:N({margin:0},NG(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return o&&(i=[i,o]),i};function DG(e){const t=vt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return v.jsxs(k.Fragment,{children:[v.jsx(JO,{styles:i=>AG(i,r)}),n]})}function BG(e){return pt("MuiDialog",e)}const FG=ht("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),f0=FG,zG=k.createContext({}),iL=zG,UG=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],WG=Ee(PO,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),GG=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${ye(n)}`],paper:["paper",`paperScroll${ye(n)}`,`paperWidth${ye(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return ft(s,BG,t)},HG=Ee(Cv,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),VG=Ee("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ye(n.scroll)}`]]}})(({ownerState:e})=>N({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),KG=Ee(ss,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ye(n.scroll)}`],t[`paperWidth${ye(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>N({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${f0.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${f0.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${f0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),qG=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiDialog"}),i=Pi(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:m=!1,fullWidth:p=!1,maxWidth:g="sm",onBackdropClick:E,onClick:b,onClose:w,open:y,PaperComponent:_=ss,PaperProps:R={},scroll:T="paper",TransitionComponent:C=RO,transitionDuration:I=o,TransitionProps:A}=r,L=Ie(r,UG),$=N({},r,{disableEscapeKeyDown:f,fullScreen:m,fullWidth:p,maxWidth:g,scroll:T}),F=GG($),z=k.useRef(),Y=G=>{z.current=G.target===G.currentTarget},J=G=>{b&&b(G),z.current&&(z.current=null,E&&E(G),w&&w(G,"backdropClick"))},Z=cp(a),pe=k.useMemo(()=>({titleId:Z}),[Z]);return v.jsx(HG,N({className:Ae(F.root,d),closeAfterTransition:!0,components:{Backdrop:WG},componentsProps:{backdrop:N({transitionDuration:I,as:l},c)},disableEscapeKeyDown:f,onClose:w,open:y,ref:n,onClick:J,ownerState:$},L,{children:v.jsx(C,N({appear:!0,in:y,timeout:I,role:"presentation"},A,{children:v.jsx(VG,{className:Ae(F.container),onMouseDown:Y,ownerState:$,children:v.jsx(KG,N({as:_,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":Z},R,{className:Ae(F.paper,R.className),ownerState:$,children:v.jsx(iL.Provider,{value:pe,children:u})}))})}))}))}),YG=qG;function QG(e){return pt("MuiDialogContent",e)}ht("MuiDialogContent",["root","dividers"]);function XG(e){return pt("MuiDialogTitle",e)}const JG=ht("MuiDialogTitle",["root"]),ZG=JG,e7=["className","dividers"],t7=e=>{const{classes:t,dividers:n}=e;return ft({root:["root",n&&"dividers"]},QG,t)},n7=Ee("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>N({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${ZG.root} + &`]:{paddingTop:0}})),r7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiDialogContent"}),{className:i,dividers:o=!1}=r,s=Ie(r,e7),a=N({},r,{dividers:o}),l=t7(a);return v.jsx(n7,N({className:Ae(l.root,i),ownerState:a,ref:n},s))}),i7=r7,o7=["className","id"],s7=e=>{const{classes:t}=e;return ft({root:["root"]},XG,t)},a7=Ee(xt,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),l7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiDialogTitle"}),{className:i,id:o}=r,s=Ie(r,o7),a=r,l=s7(a),{titleId:c=o}=k.useContext(iL);return v.jsx(a7,N({component:"h2",className:Ae(l.root,i),ownerState:a,ref:n,variant:"h6",id:o??c},s))}),c7=l7;function u7(e){return pt("MuiFab",e)}const d7=ht("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),Ik=d7,f7=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],p7=e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,`size${ye(i)}`,t==="inherit"?"colorInherit":t]},s=ft(o,u7,r);return N({},r,s)},h7=Ee(Ro,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>fr(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${ye(n.size)}`],n.color==="inherit"&&t.colorInherit,t[ye(n.size)],t[n.color]]}})(({theme:e,ownerState:t})=>{var n,r;return N({},e.typography.button,{minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${Ik.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]}},t.size==="small"&&{width:40,height:40},t.size==="medium"&&{width:48,height:48},t.variant==="extended"&&{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},t.variant==="extended"&&t.size==="small"&&{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34},t.variant==="extended"&&t.size==="medium"&&{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40},t.color==="inherit"&&{color:"inherit"})},({theme:e,ownerState:t})=>N({},t.color!=="inherit"&&t.color!=="default"&&(e.vars||e).palette[t.color]!=null&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}}),({theme:e})=>({[`&.${Ik.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}})),m7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiFab"}),{children:i,className:o,color:s="default",component:a="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:f="circular"}=r,m=Ie(r,f7),p=N({},r,{color:s,component:a,disabled:l,disableFocusRipple:c,size:d,variant:f}),g=p7(p);return v.jsx(h7,N({className:Ae(g.root,o),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:Ae(g.focusVisible,u),ownerState:p,ref:n},m,{classes:g,children:i}))}),g7=m7,v7=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],y7=e=>{const{classes:t,disableUnderline:n}=e,i=ft({root:["root",!n&&"underline"],input:["input"]},bW,t);return N({},t,i)},b7=Ee(Dv,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Nv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return N({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${il.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${il.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${il.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${il.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${il.disabled}, .${il.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${il.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&N({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),w7=Ee(Bv,{name:"MuiFilledInput",slot:"Input",overridesResolver:Av})(({theme:e,ownerState:t})=>N({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),oL=k.forwardRef(function(t,n){var r,i,o,s;const a=vt({props:t,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:f=!1,slotProps:m,slots:p={},type:g="text"}=a,E=Ie(a,v7),b=N({},a,{fullWidth:u,inputComponent:d,multiline:f,type:g}),w=y7(a),y={root:{ownerState:b},input:{ownerState:b}},_=m??c?Ur(y,m??c):y,R=(r=(i=p.root)!=null?i:l.Root)!=null?r:b7,T=(o=(s=p.input)!=null?s:l.Input)!=null?o:w7;return v.jsx(Wx,N({slots:{root:R,input:T},componentsProps:_,fullWidth:u,inputComponent:d,multiline:f,ref:n,type:g},E,{classes:w}))});oL.muiName="Input";const sL=oL;function x7(e){return pt("MuiFormControl",e)}ht("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const S7=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],_7=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${ye(n)}`,r&&"fullWidth"]};return ft(i,x7,t)},C7=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>N({},t.root,t[`margin${ye(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>N({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),k7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:m="none",required:p=!1,size:g="medium",variant:E="outlined"}=r,b=Ie(r,S7),w=N({},r,{color:s,component:a,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:m,required:p,size:g,variant:E}),y=_7(w),[_,R]=k.useState(()=>{let z=!1;return i&&k.Children.forEach(i,Y=>{if(!Yd(Y,["Input","Select"]))return;const J=Yd(Y,["Select"])?Y.props.input:Y;J&&lW(J.props)&&(z=!0)}),z}),[T,C]=k.useState(()=>{let z=!1;return i&&k.Children.forEach(i,Y=>{Yd(Y,["Input","Select"])&&(zm(Y.props,!0)||zm(Y.props.inputProps,!0))&&(z=!0)}),z}),[I,A]=k.useState(!1);l&&I&&A(!1);const L=u!==void 0&&!l?u:I;let $;const F=k.useMemo(()=>({adornedStart:_,setAdornedStart:R,color:s,disabled:l,error:c,filled:T,focused:L,fullWidth:d,hiddenLabel:f,size:g,onBlur:()=>{A(!1)},onEmpty:()=>{C(!1)},onFilled:()=>{C(!0)},onFocus:()=>{A(!0)},registerEffect:$,required:p,variant:E}),[_,s,l,c,T,L,d,f,$,p,g,E]);return v.jsx(Ux.Provider,{value:F,children:v.jsx(C7,N({as:a,ownerState:w,className:Ae(y.root,o),ref:n},b,{children:i}))})}),pl=k7,E7=SF({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>vt({props:e,name:"MuiStack"})}),Um=E7;function R7(e){return pt("MuiFormControlLabel",e)}const P7=ht("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),$d=P7,T7=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],O7=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${ye(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return ft(s,R7,t)},L7=Ee("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${$d.label}`]:t.label},t.root,t[`labelPlacement${ye(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>N({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${$d.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${$d.label}`]:{[`&.${$d.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),j7=Ee("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${$d.error}`]:{color:(e.vars||e).palette.error.main}})),I7=k.forwardRef(function(t,n){var r,i;const o=vt({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:a={},control:l,disabled:c,disableTypography:u,label:d,labelPlacement:f="end",required:m,slotProps:p={}}=o,g=Ie(o,T7),E=Ka(),b=(r=c??l.props.disabled)!=null?r:E==null?void 0:E.disabled,w=m??l.props.required,y={disabled:b,required:w};["checked","name","onChange","value","inputRef"].forEach(A=>{typeof l.props[A]>"u"&&typeof o[A]<"u"&&(y[A]=o[A])});const _=ec({props:o,muiFormControl:E,states:["error"]}),R=N({},o,{disabled:b,labelPlacement:f,required:w,error:_.error}),T=O7(R),C=(i=p.typography)!=null?i:a.typography;let I=d;return I!=null&&I.type!==xt&&!u&&(I=v.jsx(xt,N({component:"span"},C,{className:Ae(T.label,C==null?void 0:C.className),children:I}))),v.jsxs(L7,N({className:Ae(T.root,s),ownerState:R,ref:n},g,{children:[k.cloneElement(l,y),w?v.jsxs(Um,{display:"block",children:[I,v.jsxs(j7,{ownerState:R,"aria-hidden":!0,className:T.asterisk,children:[" ","*"]})]}):I]}))}),Ko=I7;function M7(e){return pt("MuiFormHelperText",e)}const $7=ht("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),Mk=$7;var $k;const N7=["children","className","component","disabled","error","filled","focused","margin","required","variant"],A7=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=e,c={root:["root",i&&"disabled",o&&"error",r&&`size${ye(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return ft(c,M7,t)},D7=Ee("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ye(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>N({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Mk.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Mk.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),B7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=Ie(r,N7),l=Ka(),c=ec({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=N({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=A7(u);return v.jsx(D7,N({as:s,ownerState:u,className:Ae(d.root,o),ref:n},a,{children:i===" "?$k||($k=v.jsx("span",{className:"notranslate",children:"​"})):i}))}),F7=B7;function z7(e){return pt("MuiFormLabel",e)}const U7=ht("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),ef=U7,W7=["children","className","color","component","disabled","error","filled","focused","required"],G7=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,l={root:["root",`color${ye(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return ft(l,z7,t)},H7=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>N({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>N({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${ef.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${ef.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ef.error}`]:{color:(e.vars||e).palette.error.main}})),V7=Ee("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${ef.error}`]:{color:(e.vars||e).palette.error.main}})),K7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=Ie(r,W7),l=Ka(),c=ec({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=N({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=G7(u);return v.jsxs(H7,N({as:s,ownerState:u,className:Ae(d.root,o),ref:n},a,{children:[i,c.required&&v.jsxs(V7,{ownerState:u,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),q7=K7,Y7=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function v1(e){return`scale(${e}, ${e**2})`}const Q7={entering:{opacity:1,transform:v1(1)},entered:{opacity:1,transform:"none"}},p0=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),aL=k.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:m,style:p,timeout:g="auto",TransitionComponent:E=Sv}=t,b=Ie(t,Y7),w=ba(),y=k.useRef(),_=Pi(),R=k.useRef(null),T=sn(R,o.ref,n),C=J=>Z=>{if(J){const pe=R.current;Z===void 0?J(pe):J(pe,Z)}},I=C(u),A=C((J,Z)=>{Ox(J);const{duration:pe,delay:G,easing:V}=Aa({style:p,timeout:g,easing:s},{mode:"enter"});let le;g==="auto"?(le=_.transitions.getAutoHeightDuration(J.clientHeight),y.current=le):le=pe,J.style.transition=[_.transitions.create("opacity",{duration:le,delay:G}),_.transitions.create("transform",{duration:p0?le:le*.666,delay:G,easing:V})].join(","),l&&l(J,Z)}),L=C(c),$=C(m),F=C(J=>{const{duration:Z,delay:pe,easing:G}=Aa({style:p,timeout:g,easing:s},{mode:"exit"});let V;g==="auto"?(V=_.transitions.getAutoHeightDuration(J.clientHeight),y.current=V):V=Z,J.style.transition=[_.transitions.create("opacity",{duration:V,delay:pe}),_.transitions.create("transform",{duration:p0?V:V*.666,delay:p0?pe:pe||V*.333,easing:G})].join(","),J.style.opacity=0,J.style.transform=v1(.75),d&&d(J)}),z=C(f),Y=J=>{g==="auto"&&w.start(y.current||0,J),r&&r(R.current,J)};return v.jsx(E,N({appear:i,in:a,nodeRef:R,onEnter:A,onEntered:L,onEntering:I,onExit:F,onExited:z,onExiting:$,addEndListener:Y,timeout:g==="auto"?null:g},b,{children:(J,Z)=>k.cloneElement(o,N({style:N({opacity:0,transform:v1(.75),visibility:J==="exited"&&!a?"hidden":void 0},Q7[J],p,o.props.style),ref:T},Z))}))});aL.muiSupportAuto=!0;const Wm=aL,X7=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],J7=e=>{const{classes:t,disableUnderline:n}=e,i=ft({root:["root",!n&&"underline"],input:["input"]},mW,t);return N({},t,i)},Z7=Ee(Dv,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Nv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),N({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${bd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${bd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${bd.disabled}, .${bd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${bd.disabled}:before`]:{borderBottomStyle:"dotted"}})}),eH=Ee(Bv,{name:"MuiInput",slot:"Input",overridesResolver:Av})({}),lL=k.forwardRef(function(t,n){var r,i,o,s;const a=vt({props:t,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:d=!1,inputComponent:f="input",multiline:m=!1,slotProps:p,slots:g={},type:E="text"}=a,b=Ie(a,X7),w=J7(a),_={root:{ownerState:{disableUnderline:l}}},R=p??u?Ur(p??u,_):_,T=(r=(i=g.root)!=null?i:c.Root)!=null?r:Z7,C=(o=(s=g.input)!=null?s:c.Input)!=null?o:eH;return v.jsx(Wx,N({slots:{root:T,input:C},slotProps:R,fullWidth:d,inputComponent:f,multiline:m,ref:n,type:E},b,{classes:w}))});lL.muiName="Input";const cL=lL;function tH(e){return pt("MuiInputLabel",e)}ht("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const nH=["disableAnimation","margin","shrink","variant","className"],rH=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${ye(r)}`,s],asterisk:[a&&"asterisk"]},c=ft(l,tH,t);return N({},t,c)},iH=Ee(q7,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ef.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(({theme:e,ownerState:t})=>N({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&N({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&N({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&N({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),oH=k.forwardRef(function(t,n){const r=vt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=Ie(r,nH),l=Ka();let c=o;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=ec({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=N({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),f=rH(d);return v.jsx(iH,N({"data-shrink":c,ownerState:d,ref:n,className:Ae(f.root,s)},a,{classes:f}))}),uL=oH;function sH(e){return pt("MuiListItemIcon",e)}const aH=ht("MuiListItemIcon",["root","alignItemsFlexStart"]),Nk=aH,lH=["className"],cH=e=>{const{alignItems:t,classes:n}=e;return ft({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},sH,n)},uH=Ee("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>N({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),dH=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Ie(r,lH),s=k.useContext(_o),a=N({},r,{alignItems:s.alignItems}),l=cH(a);return v.jsx(uH,N({className:Ae(l.root,i),ownerState:a,ref:n},o))}),fH=dH,pH=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function h0(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Ak(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function dL(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function wd(e,t,n,r,i,o){let s=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!dL(a,o)||l)a=i(e,a,n);else return a.focus(),!0}return!1}const hH=k.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=t,f=Ie(t,pH),m=k.useRef(null),p=k.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});oi(()=>{i&&m.current.focus()},[i]),k.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(y,{direction:_})=>{const R=!m.current.style.width;if(y.clientHeight{const _=m.current,R=y.key,T=Qn(_).activeElement;if(R==="ArrowDown")y.preventDefault(),wd(_,T,c,l,h0);else if(R==="ArrowUp")y.preventDefault(),wd(_,T,c,l,Ak);else if(R==="Home")y.preventDefault(),wd(_,null,c,l,h0);else if(R==="End")y.preventDefault(),wd(_,null,c,l,Ak);else if(R.length===1){const C=p.current,I=R.toLowerCase(),A=performance.now();C.keys.length>0&&(A-C.lastTime>500?(C.keys=[],C.repeating=!0,C.previousKeyMatched=!0):C.repeating&&I!==C.keys[0]&&(C.repeating=!1)),C.lastTime=A,C.keys.push(I);const L=T&&!C.repeating&&dL(T,C);C.previousKeyMatched&&(L||wd(_,T,!1,l,h0,C))?y.preventDefault():C.previousKeyMatched=!1}u&&u(y)},E=sn(m,n);let b=-1;k.Children.forEach(s,(y,_)=>{if(!k.isValidElement(y)){b===_&&(b+=1,b>=s.length&&(b=-1));return}y.props.disabled||(d==="selectedMenu"&&y.props.selected||b===-1)&&(b=_),b===_&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(b+=1,b>=s.length&&(b=-1))});const w=k.Children.map(s,(y,_)=>{if(_===b){const R={};return o&&(R.autoFocus=!0),y.props.tabIndex===void 0&&d==="selectedMenu"&&(R.tabIndex=0),k.cloneElement(y,R)}return y});return v.jsx(Xd,N({role:"menu",ref:E,className:a,onKeyDown:g,tabIndex:i?0:-1},f,{children:w}))}),fL=hH;function mH(e){return pt("MuiPopover",e)}ht("MuiPopover",["root","paper"]);const gH=["onEntering"],vH=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],yH=["slotProps"];function Dk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Bk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function Fk(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function m0(e){return typeof e=="function"?e():e}const bH=e=>{const{classes:t}=e;return ft({root:["root"],paper:["paper"]},mH,t)},wH=Ee(Cv,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),pL=Ee(ss,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),xH=k.forwardRef(function(t,n){var r,i,o;const s=vt({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:f,className:m,container:p,elevation:g=8,marginThreshold:E=16,open:b,PaperProps:w={},slots:y,slotProps:_,transformOrigin:R={vertical:"top",horizontal:"left"},TransitionComponent:T=Wm,transitionDuration:C="auto",TransitionProps:{onEntering:I}={},disableScrollLock:A=!1}=s,L=Ie(s.TransitionProps,gH),$=Ie(s,vH),F=(r=_==null?void 0:_.paper)!=null?r:w,z=k.useRef(),Y=sn(z,F.ref),J=N({},s,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:E,externalPaperSlotProps:F,transformOrigin:R,TransitionComponent:T,transitionDuration:C,TransitionProps:L}),Z=bH(J),pe=k.useCallback(()=>{if(d==="anchorPosition")return u;const Ze=m0(l),ee=(Ze&&Ze.nodeType===1?Ze:Qn(z.current).body).getBoundingClientRect();return{top:ee.top+Dk(ee,c.vertical),left:ee.left+Bk(ee,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),G=k.useCallback(Ze=>({vertical:Dk(Ze,R.vertical),horizontal:Bk(Ze,R.horizontal)}),[R.horizontal,R.vertical]),V=k.useCallback(Ze=>{const gt={width:Ze.offsetWidth,height:Ze.offsetHeight},ee=G(gt);if(d==="none")return{top:null,left:null,transformOrigin:Fk(ee)};const fe=pe();let _e=fe.top-ee.vertical,ze=fe.left-ee.horizontal;const W=_e+gt.height,S=ze+gt.width,O=ts(m0(l)),D=O.innerHeight-E,K=O.innerWidth-E;if(E!==null&&_eD){const Q=W-D;_e-=Q,ee.vertical+=Q}if(E!==null&&zeK){const Q=S-K;ze-=Q,ee.horizontal+=Q}return{top:`${Math.round(_e)}px`,left:`${Math.round(ze)}px`,transformOrigin:Fk(ee)}},[l,d,pe,G,E]),[le,Le]=k.useState(b),He=k.useCallback(()=>{const Ze=z.current;if(!Ze)return;const gt=V(Ze);gt.top!==null&&(Ze.style.top=gt.top),gt.left!==null&&(Ze.style.left=gt.left),Ze.style.transformOrigin=gt.transformOrigin,Le(!0)},[V]);k.useEffect(()=>(A&&window.addEventListener("scroll",He),()=>window.removeEventListener("scroll",He)),[l,A,He]);const Te=(Ze,gt)=>{I&&I(Ze,gt),He()},ke=()=>{Le(!1)};k.useEffect(()=>{b&&He()}),k.useImperativeHandle(a,()=>b?{updatePosition:()=>{He()}}:null,[b,He]),k.useEffect(()=>{if(!b)return;const Ze=xv(()=>{He()}),gt=ts(l);return gt.addEventListener("resize",Ze),()=>{Ze.clear(),gt.removeEventListener("resize",Ze)}},[l,b,He]);let Ve=C;C==="auto"&&!T.muiSupportAuto&&(Ve=void 0);const Re=p||(l?Qn(m0(l)).body:void 0),et=(i=y==null?void 0:y.root)!=null?i:wH,lt=(o=y==null?void 0:y.paper)!=null?o:pL,Pe=Po({elementType:lt,externalSlotProps:N({},F,{style:le?F.style:N({},F.style,{opacity:0})}),additionalProps:{elevation:g,ref:Y},ownerState:J,className:Ae(Z.paper,F==null?void 0:F.className)}),Et=Po({elementType:et,externalSlotProps:(_==null?void 0:_.root)||{},externalForwardedProps:$,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Re,open:b},ownerState:J,className:Ae(Z.root,m)}),{slotProps:at}=Et,Ge=Ie(Et,yH);return v.jsx(et,N({},Ge,!xu(et)&&{slotProps:at,disableScrollLock:A},{children:v.jsx(T,N({appear:!0,in:b,onEntering:Te,onExited:ke,timeout:Ve},L,{children:v.jsx(lt,N({},Pe,{children:f}))}))}))}),SH=xH;function _H(e){return pt("MuiMenu",e)}ht("MuiMenu",["root","paper","list"]);const CH=["onEntering"],kH=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],EH={vertical:"top",horizontal:"right"},RH={vertical:"top",horizontal:"left"},PH=e=>{const{classes:t}=e;return ft({root:["root"],paper:["paper"],list:["list"]},_H,t)},TH=Ee(SH,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),OH=Ee(pL,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),LH=Ee(fL,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),jH=k.forwardRef(function(t,n){var r,i;const o=vt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:f,PaperProps:m={},PopoverClasses:p,transitionDuration:g="auto",TransitionProps:{onEntering:E}={},variant:b="selectedMenu",slots:w={},slotProps:y={}}=o,_=Ie(o.TransitionProps,CH),R=Ie(o,kH),T=kx(),C=N({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:E,PaperProps:m,transitionDuration:g,TransitionProps:_,variant:b}),I=PH(C),A=s&&!c&&f,L=k.useRef(null),$=(G,V)=>{L.current&&L.current.adjustStyleForScrollbar(G,{direction:T?"rtl":"ltr"}),E&&E(G,V)},F=G=>{G.key==="Tab"&&(G.preventDefault(),d&&d(G,"tabKeyDown"))};let z=-1;k.Children.map(a,(G,V)=>{k.isValidElement(G)&&(G.props.disabled||(b==="selectedMenu"&&G.props.selected||z===-1)&&(z=V))});const Y=(r=w.paper)!=null?r:OH,J=(i=y.paper)!=null?i:m,Z=Po({elementType:w.root,externalSlotProps:y.root,ownerState:C,className:[I.root,l]}),pe=Po({elementType:Y,externalSlotProps:J,ownerState:C,className:I.paper});return v.jsx(TH,N({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:T?"right":"left"},transformOrigin:T?EH:RH,slots:{paper:Y,root:w.root},slotProps:{root:Z,paper:pe},open:f,ref:n,transitionDuration:g,TransitionProps:N({onEntering:$},_),ownerState:C},R,{classes:p,children:v.jsx(LH,N({onKeyDown:F,actions:L,autoFocus:s&&(z===-1||c),autoFocusItem:A,variant:b},u,{className:Ae(I.list,u.className),children:a}))}))}),Fv=jH;function IH(e){return pt("MuiMenuItem",e)}const MH=ht("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xd=MH,$H=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],NH=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},AH=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,l=ft({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},IH,s);return N({},s,l)},DH=Ee(Ro,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:NH})(({theme:e,ownerState:t})=>N({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${xd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${xd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${xd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${xd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${xd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${vk.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${vk.inset}`]:{marginLeft:52},[`& .${Bm.root}`]:{marginTop:0,marginBottom:0},[`& .${Bm.inset}`]:{paddingLeft:36},[`& .${Nk.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&N({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Nk.root} svg`]:{fontSize:"1.25rem"}}))),BH=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f}=r,m=Ie(r,$H),p=k.useContext(_o),g=k.useMemo(()=>({dense:s||p.dense||!1,disableGutters:l}),[p.dense,s,l]),E=k.useRef(null);oi(()=>{i&&E.current&&E.current.focus()},[i]);const b=N({},r,{dense:g.dense,divider:a,disableGutters:l}),w=AH(r),y=sn(E,n);let _;return r.disabled||(_=d!==void 0?d:-1),v.jsx(_o.Provider,{value:g,children:v.jsx(DH,N({ref:y,role:u,tabIndex:_,component:o,focusVisibleClassName:Ae(w.focusVisible,c),className:Ae(w.root,f)},m,{ownerState:b,classes:w}))})}),fi=BH;function FH(e){return pt("MuiNativeSelect",e)}const zH=ht("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Gx=zH,UH=["className","disabled","error","IconComponent","inputRef","variant"],WH=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${ye(n)}`,o&&"iconOpen",r&&"disabled"]};return ft(a,FH,t)},hL=({ownerState:e,theme:t})=>N({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":N({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Gx.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),GH=Ee("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:fr,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Gx.multiple}`]:t.multiple}]}})(hL),mL=({ownerState:e,theme:t})=>N({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Gx.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),HH=Ee("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ye(n.variant)}`],n.open&&t.iconOpen]}})(mL),VH=k.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=t,c=Ie(t,UH),u=N({},t,{disabled:i,variant:l,error:o}),d=WH(u);return v.jsxs(k.Fragment,{children:[v.jsx(GH,N({ownerState:u,className:Ae(d.select,r),disabled:i,ref:a||n},c)),t.multiple?null:v.jsx(HH,{as:s,ownerState:u,className:d.icon})]})}),KH=VH;var zk;const qH=["children","classes","className","label","notched"],YH=Ee("fieldset",{shouldForwardProp:fr})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),QH=Ee("legend",{shouldForwardProp:fr})(({ownerState:e,theme:t})=>N({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&N({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function XH(e){const{className:t,label:n,notched:r}=e,i=Ie(e,qH),o=n!=null&&n!=="",s=N({},e,{notched:r,withLabel:o});return v.jsx(YH,N({"aria-hidden":!0,className:t,ownerState:s},i,{children:v.jsx(QH,{ownerState:s,children:o?v.jsx("span",{children:n}):zk||(zk=v.jsx("span",{className:"notranslate",children:"​"}))})}))}const JH=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],ZH=e=>{const{classes:t}=e,r=ft({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},vW,t);return N({},t,r)},eV=Ee(Dv,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Nv})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return N({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${sa.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${sa.focused} .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${sa.error} .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${sa.disabled} .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&N({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),tV=Ee(XH,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),nV=Ee(Bv,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Av})(({theme:e,ownerState:t})=>N({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),gL=k.forwardRef(function(t,n){var r,i,o,s,a;const l=vt({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:f,multiline:m=!1,notched:p,slots:g={},type:E="text"}=l,b=Ie(l,JH),w=ZH(l),y=Ka(),_=ec({props:l,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),R=N({},l,{color:_.color||"primary",disabled:_.disabled,error:_.error,focused:_.focused,formControl:y,fullWidth:u,hiddenLabel:_.hiddenLabel,multiline:m,size:_.size,type:E}),T=(r=(i=g.root)!=null?i:c.Root)!=null?r:eV,C=(o=(s=g.input)!=null?s:c.Input)!=null?o:nV;return v.jsx(Wx,N({slots:{root:T,input:C},renderSuffix:I=>v.jsx(tV,{ownerState:R,className:w.notchedOutline,label:f!=null&&f!==""&&_.required?a||(a=v.jsxs(k.Fragment,{children:[f," ","*"]})):f,notched:typeof p<"u"?p:!!(I.startAdornment||I.filled||I.focused)}),fullWidth:u,inputComponent:d,multiline:m,ref:n,type:E},b,{classes:N({},w,{notchedOutline:null})}))});gL.muiName="Input";const vL=gL;function rV(e){return pt("MuiSelect",e)}const Sd=ht("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Uk;const iV=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],oV=Ee("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Sd.select}`]:t.select},{[`&.${Sd.select}`]:t[n.variant]},{[`&.${Sd.error}`]:t.error},{[`&.${Sd.multiple}`]:t.multiple}]}})(hL,{[`&.${Sd.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),sV=Ee("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ye(n.variant)}`],n.open&&t.iconOpen]}})(mL),aV=Ee("input",{shouldForwardProp:e=>hO(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Wk(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function lV(e){return e==null||typeof e=="string"&&!e.trim()}const cV=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${ye(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return ft(a,rV,t)},uV=k.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:m,error:p=!1,IconComponent:g,inputRef:E,labelId:b,MenuProps:w={},multiple:y,name:_,onBlur:R,onChange:T,onClose:C,onFocus:I,onOpen:A,open:L,readOnly:$,renderValue:F,SelectDisplayProps:z={},tabIndex:Y,value:J,variant:Z="standard"}=t,pe=Ie(t,iV),[G,V]=wu({controlled:J,default:d,name:"Select"}),[le,Le]=wu({controlled:L,default:u,name:"Select"}),He=k.useRef(null),Te=k.useRef(null),[ke,Ve]=k.useState(null),{current:Re}=k.useRef(L!=null),[et,lt]=k.useState(),Pe=sn(n,E),Et=k.useCallback(Xe=>{Te.current=Xe,Xe&&Ve(Xe)},[]),at=ke==null?void 0:ke.parentNode;k.useImperativeHandle(Pe,()=>({focus:()=>{Te.current.focus()},node:He.current,value:G}),[G]),k.useEffect(()=>{u&&le&&ke&&!Re&&(lt(a?null:at.clientWidth),Te.current.focus())},[ke,a]),k.useEffect(()=>{s&&Te.current.focus()},[s]),k.useEffect(()=>{if(!b)return;const Xe=Qn(Te.current).getElementById(b);if(Xe){const yt=()=>{getSelection().isCollapsed&&Te.current.focus()};return Xe.addEventListener("click",yt),()=>{Xe.removeEventListener("click",yt)}}},[b]);const Ge=(Xe,yt)=>{Xe?A&&A(yt):C&&C(yt),Re||(lt(a?null:at.clientWidth),Le(Xe))},Ze=Xe=>{Xe.button===0&&(Xe.preventDefault(),Te.current.focus(),Ge(!0,Xe))},gt=Xe=>{Ge(!1,Xe)},ee=k.Children.toArray(l),fe=Xe=>{const yt=ee.find(Ne=>Ne.props.value===Xe.target.value);yt!==void 0&&(V(yt.props.value),T&&T(Xe,yt))},_e=Xe=>yt=>{let Ne;if(yt.currentTarget.hasAttribute("tabindex")){if(y){Ne=Array.isArray(G)?G.slice():[];const Vt=G.indexOf(Xe.props.value);Vt===-1?Ne.push(Xe.props.value):Ne.splice(Vt,1)}else Ne=Xe.props.value;if(Xe.props.onClick&&Xe.props.onClick(yt),G!==Ne&&(V(Ne),T)){const Vt=yt.nativeEvent||yt,bn=new Vt.constructor(Vt.type,Vt);Object.defineProperty(bn,"target",{writable:!0,value:{value:Ne,name:_}}),T(bn,Xe)}y||Ge(!1,yt)}},ze=Xe=>{$||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Xe.key)!==-1&&(Xe.preventDefault(),Ge(!0,Xe))},W=ke!==null&&le,S=Xe=>{!W&&R&&(Object.defineProperty(Xe,"target",{writable:!0,value:{value:G,name:_}}),R(Xe))};delete pe["aria-invalid"];let O,D;const K=[];let Q=!1;(zm({value:G})||m)&&(F?O=F(G):Q=!0);const de=ee.map(Xe=>{if(!k.isValidElement(Xe))return null;let yt;if(y){if(!Array.isArray(G))throw new Error(Dl(2));yt=G.some(Ne=>Wk(Ne,Xe.props.value)),yt&&Q&&K.push(Xe.props.children)}else yt=Wk(G,Xe.props.value),yt&&Q&&(D=Xe.props.children);return k.cloneElement(Xe,{"aria-selected":yt?"true":"false",onClick:_e(Xe),onKeyUp:Ne=>{Ne.key===" "&&Ne.preventDefault(),Xe.props.onKeyUp&&Xe.props.onKeyUp(Ne)},role:"option",selected:yt,value:void 0,"data-value":Xe.props.value})});Q&&(y?K.length===0?O=null:O=K.reduce((Xe,yt,Ne)=>(Xe.push(yt),Ne{const{classes:t}=e;return t},Hx={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>fr(e)&&e!=="variant",slot:"Root"},mV=Ee(cL,Hx)(""),gV=Ee(vL,Hx)(""),vV=Ee(sL,Hx)(""),yL=k.forwardRef(function(t,n){const r=vt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=xW,id:d,input:f,inputProps:m,label:p,labelId:g,MenuProps:E,multiple:b=!1,native:w=!1,onClose:y,onOpen:_,open:R,renderValue:T,SelectDisplayProps:C,variant:I="outlined"}=r,A=Ie(r,fV),L=w?KH:dV,$=Ka(),F=ec({props:r,muiFormControl:$,states:["variant","error"]}),z=F.variant||I,Y=N({},r,{variant:z,classes:s}),J=hV(Y),Z=Ie(J,pV),pe=f||{standard:v.jsx(mV,{ownerState:Y}),outlined:v.jsx(gV,{label:p,ownerState:Y}),filled:v.jsx(vV,{ownerState:Y})}[z],G=sn(n,pe.ref);return v.jsx(k.Fragment,{children:k.cloneElement(pe,N({inputComponent:L,inputProps:N({children:o,error:F.error,IconComponent:u,variant:z,type:void 0,multiple:b},w?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:E,onClose:y,onOpen:_,open:R,renderValue:T,SelectDisplayProps:N({id:d},C)},m,{classes:m?Ur(Z,m.classes):Z},f?f.props.inputProps:{})},(b&&w||c)&&z==="outlined"?{notched:!0}:{},{ref:G,className:Ae(pe.props.className,a,J.root)},!f&&{variant:z},A))})});yL.muiName="Select";const Qc=yL;function yV(e){return pt("MuiSnackbarContent",e)}ht("MuiSnackbarContent",["root","message","action"]);const bV=["action","className","message","role"],wV=e=>{const{classes:t}=e;return ft({root:["root"],action:["action"],message:["message"]},yV,t)},xV=Ee(ss,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=a1(e.palette.background.default,t);return N({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),SV=Ee("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),_V=Ee("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),CV=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert"}=r,l=Ie(r,bV),c=r,u=wV(c);return v.jsxs(xV,N({role:a,square:!0,elevation:6,className:Ae(u.root,o),ownerState:c,ref:n},l,{children:[v.jsx(SV,{className:u.message,ownerState:c,children:s}),i?v.jsx(_V,{className:u.action,ownerState:c,children:i}):null]}))}),kV=CV;function EV(e){return pt("MuiSnackbar",e)}ht("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const RV=["onEnter","onExited"],PV=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],TV=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ye(n.vertical)}${ye(n.horizontal)}`]};return ft(r,EV,t)},Gk=Ee("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ye(n.anchorOrigin.vertical)}${ye(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return N({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:N({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),OV=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiSnackbar"}),i=Pi(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:m,disableWindowBlurListener:p=!1,message:g,open:E,TransitionComponent:b=Wm,transitionDuration:w=o,TransitionProps:{onEnter:y,onExited:_}={}}=r,R=Ie(r.TransitionProps,RV),T=Ie(r,PV),C=N({},r,{anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:p,TransitionComponent:b,transitionDuration:w}),I=TV(C),{getRootProps:A,onClickAway:L}=$9(N({},C)),[$,F]=k.useState(!0),z=Po({elementType:Gk,getSlotProps:A,externalForwardedProps:T,ownerState:C,additionalProps:{ref:n},className:[I.root,d]}),Y=Z=>{F(!0),_&&_(Z)},J=(Z,pe)=>{F(!1),y&&y(Z,pe)};return!E&&$?null:v.jsx(bU,N({onClickAway:L},f,{children:v.jsx(Gk,N({},z,{children:v.jsx(b,N({appear:!0,in:E,timeout:w,direction:a==="top"?"down":"up",onEnter:J,onExited:Y},R,{children:u||v.jsx(kV,N({message:g,action:s},m))}))}))}))}),LV=OV;function jV(e){return pt("MuiTooltip",e)}const IV=ht("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),wa=IV,MV=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function $V(e){return Math.round(e*1e5)/1e5}const NV=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${ye(o.split("-")[0])}`],arrow:["arrow"]};return ft(s,jV,t)},AV=Ee(QO,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>N({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${wa.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${wa.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${wa.arrow}`]:N({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${wa.arrow}`]:N({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),DV=Ee("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${ye(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>N({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Mt(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${$V(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${wa.popper}[data-popper-placement*="left"] &`]:N({transformOrigin:"right center"},t.isRtl?N({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):N({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${wa.popper}[data-popper-placement*="right"] &`]:N({transformOrigin:"left center"},t.isRtl?N({marginRight:"14px"},t.touch&&{marginRight:"24px"}):N({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${wa.popper}[data-popper-placement*="top"] &`]:N({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${wa.popper}[data-popper-placement*="bottom"] &`]:N({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),BV=Ee("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Mt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let gh=!1;const Hk=new lp;let _d={x:0,y:0};function vh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const FV=k.forwardRef(function(t,n){var r,i,o,s,a,l,c,u,d,f,m,p,g,E,b,w,y,_,R;const T=vt({props:t,name:"MuiTooltip"}),{arrow:C=!1,children:I,components:A={},componentsProps:L={},describeChild:$=!1,disableFocusListener:F=!1,disableHoverListener:z=!1,disableInteractive:Y=!1,disableTouchListener:J=!1,enterDelay:Z=100,enterNextDelay:pe=0,enterTouchDelay:G=700,followCursor:V=!1,id:le,leaveDelay:Le=0,leaveTouchDelay:He=1500,onClose:Te,onOpen:ke,open:Ve,placement:Re="bottom",PopperComponent:et,PopperProps:lt={},slotProps:Pe={},slots:Et={},title:at,TransitionComponent:Ge=Wm,TransitionProps:Ze}=T,gt=Ie(T,MV),ee=k.isValidElement(I)?I:v.jsx("span",{children:I}),fe=Pi(),_e=kx(),[ze,W]=k.useState(),[S,O]=k.useState(null),D=k.useRef(!1),K=Y||V,Q=ba(),de=ba(),$e=ba(),rt=ba(),[Je,Oe]=wu({controlled:Ve,default:!1,name:"Tooltip",state:"open"});let tt=Je;const St=cp(le),Ht=k.useRef(),Xe=Wi(()=>{Ht.current!==void 0&&(document.body.style.WebkitUserSelect=Ht.current,Ht.current=void 0),rt.clear()});k.useEffect(()=>Xe,[Xe]);const yt=_t=>{Hk.clear(),gh=!0,Oe(!0),ke&&!tt&&ke(_t)},Ne=Wi(_t=>{Hk.start(800+Le,()=>{gh=!1}),Oe(!1),Te&&tt&&Te(_t),Q.start(fe.transitions.duration.shortest,()=>{D.current=!1})}),Vt=_t=>{D.current&&_t.type!=="touchstart"||(ze&&ze.removeAttribute("title"),de.clear(),$e.clear(),Z||gh&&pe?de.start(gh?pe:Z,()=>{yt(_t)}):yt(_t))},bn=_t=>{de.clear(),$e.start(Le,()=>{Ne(_t)})},{isFocusVisibleRef:hr,onBlur:Ue,onFocus:oo,ref:so}=wv(),[,Kr]=k.useState(!1),Io=_t=>{Ue(_t),hr.current===!1&&(Kr(!1),bn(_t))},Mo=_t=>{ze||W(_t.currentTarget),oo(_t),hr.current===!0&&(Kr(!0),Vt(_t))},se=_t=>{D.current=!0;const hn=ee.props;hn.onTouchStart&&hn.onTouchStart(_t)},ge=_t=>{se(_t),$e.clear(),Q.clear(),Xe(),Ht.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",rt.start(G,()=>{document.body.style.WebkitUserSelect=Ht.current,Vt(_t)})},we=_t=>{ee.props.onTouchEnd&&ee.props.onTouchEnd(_t),Xe(),$e.start(He,()=>{Ne(_t)})};k.useEffect(()=>{if(!tt)return;function _t(hn){(hn.key==="Escape"||hn.key==="Esc")&&Ne(hn)}return document.addEventListener("keydown",_t),()=>{document.removeEventListener("keydown",_t)}},[Ne,tt]);const je=sn(ee.ref,so,W,n);!at&&at!==0&&(tt=!1);const Ke=k.useRef(),ct=_t=>{const hn=ee.props;hn.onMouseMove&&hn.onMouseMove(_t),_d={x:_t.clientX,y:_t.clientY},Ke.current&&Ke.current.update()},Fe={},De=typeof at=="string";$?(Fe.title=!tt&&De&&!z?at:null,Fe["aria-describedby"]=tt?St:null):(Fe["aria-label"]=De?at:null,Fe["aria-labelledby"]=tt&&!De?St:null);const ut=N({},Fe,gt,ee.props,{className:Ae(gt.className,ee.props.className),onTouchStart:se,ref:je},V?{onMouseMove:ct}:{}),dt={};J||(ut.onTouchStart=ge,ut.onTouchEnd=we),z||(ut.onMouseOver=vh(Vt,ut.onMouseOver),ut.onMouseLeave=vh(bn,ut.onMouseLeave),K||(dt.onMouseOver=Vt,dt.onMouseLeave=bn)),F||(ut.onFocus=vh(Mo,ut.onFocus),ut.onBlur=vh(Io,ut.onBlur),K||(dt.onFocus=Mo,dt.onBlur=Io));const an=k.useMemo(()=>{var _t;let hn=[{name:"arrow",enabled:!!S,options:{element:S,padding:4}}];return(_t=lt.popperOptions)!=null&&_t.modifiers&&(hn=hn.concat(lt.popperOptions.modifiers)),N({},lt.popperOptions,{modifiers:hn})},[S,lt]),Lt=N({},T,{isRtl:_e,arrow:C,disableInteractive:K,placement:Re,PopperComponentProp:et,touch:D.current}),mt=NV(Lt),jt=(r=(i=Et.popper)!=null?i:A.Popper)!=null?r:AV,Gt=(o=(s=(a=Et.transition)!=null?a:A.Transition)!=null?s:Ge)!=null?o:Wm,Hn=(l=(c=Et.tooltip)!=null?c:A.Tooltip)!=null?l:DV,Jn=(u=(d=Et.arrow)!=null?d:A.Arrow)!=null?u:BV,rr=qc(jt,N({},lt,(f=Pe.popper)!=null?f:L.popper,{className:Ae(mt.popper,lt==null?void 0:lt.className,(m=(p=Pe.popper)!=null?p:L.popper)==null?void 0:m.className)}),Lt),Vn=qc(Gt,N({},Ze,(g=Pe.transition)!=null?g:L.transition),Lt),li=qc(Hn,N({},(E=Pe.tooltip)!=null?E:L.tooltip,{className:Ae(mt.tooltip,(b=(w=Pe.tooltip)!=null?w:L.tooltip)==null?void 0:b.className)}),Lt),En=qc(Jn,N({},(y=Pe.arrow)!=null?y:L.arrow,{className:Ae(mt.arrow,(_=(R=Pe.arrow)!=null?R:L.arrow)==null?void 0:_.className)}),Lt);return v.jsxs(k.Fragment,{children:[k.cloneElement(ee,ut),v.jsx(jt,N({as:et??QO,placement:Re,anchorEl:V?{getBoundingClientRect:()=>({top:_d.y,left:_d.x,right:_d.x,bottom:_d.y,width:0,height:0})}:ze,popperRef:Ke,open:ze?tt:!1,id:St,transition:!0},dt,rr,{popperOptions:an,children:({TransitionProps:_t})=>v.jsx(Gt,N({timeout:fe.transitions.duration.shorter},_t,Vn,{children:v.jsxs(Hn,N({},li,{children:[at,C?v.jsx(Jn,N({},En,{ref:O})):null]}))}))}))]})}),Qh=FV;function zV(e){return pt("MuiSwitch",e)}const Br=ht("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),UV=["className","color","edge","size","sx"],WV=Uu(),GV=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,a={root:["root",n&&`edge${ye(n)}`,`size${ye(r)}`],switchBase:["switchBase",`color${ye(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=ft(a,zV,t);return N({},t,l)},HV=Ee("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${ye(n.edge)}`],t[`size${ye(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Br.thumb}`]:{width:16,height:16},[`& .${Br.switchBase}`]:{padding:4,[`&.${Br.checked}`]:{transform:"translateX(16px)"}}}}]}),VV=Ee(rL,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Br.input}`]:t.input},n.color!=="default"&&t[`color${ye(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Br.checked}`]:{transform:"translateX(20px)"},[`&.${Br.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Br.checked} + .${Br.track}`]:{opacity:.5},[`&.${Br.disabled} + .${Br.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Br.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${Br.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Br.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Mm(e.palette[t].main,.62):Im(e.palette[t].main,.55)}`}},[`&.${Br.checked} + .${Br.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),KV=Ee("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),qV=Ee("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),YV=k.forwardRef(function(t,n){const r=WV({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:a="medium",sx:l}=r,c=Ie(r,UV),u=N({},r,{color:o,edge:s,size:a}),d=GV(u),f=v.jsx(qV,{className:d.thumb,ownerState:u});return v.jsxs(HV,{className:Ae(d.root,i),sx:l,ownerState:u,children:[v.jsx(VV,N({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u},c,{classes:N({},d,{root:d.switchBase})})),v.jsx(KV,{className:d.track,ownerState:u})]})}),QV=YV;function XV(e){return pt("MuiTextField",e)}ht("MuiTextField",["root"]);const JV=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],ZV={standard:cL,filled:sL,outlined:vL},eK=e=>{const{classes:t}=e;return ft({root:["root"]},XV,t)},tK=Ee(pl,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nK=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:m=!1,helperText:p,id:g,InputLabelProps:E,inputProps:b,InputProps:w,inputRef:y,label:_,maxRows:R,minRows:T,multiline:C=!1,name:I,onBlur:A,onChange:L,onFocus:$,placeholder:F,required:z=!1,rows:Y,select:J=!1,SelectProps:Z,type:pe,value:G,variant:V="outlined"}=r,le=Ie(r,JV),Le=N({},r,{autoFocus:o,color:l,disabled:u,error:d,fullWidth:m,multiline:C,required:z,select:J,variant:V}),He=eK(Le),Te={};V==="outlined"&&(E&&typeof E.shrink<"u"&&(Te.notched=E.shrink),Te.label=_),J&&((!Z||!Z.native)&&(Te.id=void 0),Te["aria-describedby"]=void 0);const ke=cp(g),Ve=p&&ke?`${ke}-helper-text`:void 0,Re=_&&ke?`${ke}-label`:void 0,et=ZV[V],lt=v.jsx(et,N({"aria-describedby":Ve,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:C,name:I,rows:Y,maxRows:R,minRows:T,type:pe,value:G,id:ke,inputRef:y,onBlur:A,onChange:L,onFocus:$,placeholder:F,inputProps:b},Te,w));return v.jsxs(tK,N({className:Ae(He.root,a),disabled:u,error:d,fullWidth:m,ref:n,required:z,color:l,variant:V,ownerState:Le},le,{children:[_!=null&&_!==""&&v.jsx(uL,N({htmlFor:ke,id:Re},E,{children:_})),J?v.jsx(Qc,N({"aria-describedby":Ve,id:ke,labelId:Re,value:G,input:lt},Z,{children:s})):lt,p&&v.jsx(F7,N({id:Ve},f,{children:p}))]}))}),rK=nK;function Vk(e,t){for(var n=0;nr[e]:r=>{for(var i=r,o=0;o"u")return i}return i}}function en(e){return Object.assign({},e)}function lK(e){return Object.keys(e)[0]}function Gm(e,t=!1){if(!e)return e;if(!t&&Array.isArray(e))return e.sort((r,i)=>typeof r=="string"&&typeof i=="string"?r.localeCompare(i):typeof r=="object"?1:-1).map(r=>Gm(r,t));if(typeof e=="object"&&!Array.isArray(e)){var n={};return Object.keys(e).sort((r,i)=>r.localeCompare(i)).forEach(r=>{n[r]=Gm(e[r],t)}),n}return e}function y1(e){if(!e||e===null||typeof e!="object")return e;if(Array.isArray(e)){for(var t=new Array(e.length),n=t.length;n--;)t[n]=y1(e[n]);return t}var r={};for(var i in e)r[i]=y1(e[i]);return r}var Ji=y1;function Rs(e,t,n){return Object.defineProperty(e,t,{get:function(){return n}}),n}var Kx=1;function Wu(){return{lwt:Kx}}function To(){return""}function cK(e){return Object.assign({},e,{_meta:void 0,_deleted:void 0,_rev:void 0})}function uK(e,t,n){if(t.length!==n.length)return!1;for(var r=0,i=t.length;r>>2]>>>24-n%4*8&255;this.words[this.sigBytes+n>>>2]|=r<<24-(this.sigBytes+n)%4*8}else for(let n=0;n>>2]=t.words[n>>>2];return this.sigBytes+=t.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new ja([...this.words])}}const dK={stringify(e){const t=[];for(let n=0;n>>2]>>>24-n%4*8&255;t.push((r>>>4).toString(16),(r&15).toString(16))}return t.join("")}},fK={parse(e){const t=e.length,n=[];for(let r=0;r>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new ja(n,t)}},pK={parse(e){return fK.parse(unescape(encodeURIComponent(e)))}};class hK{constructor(){this._data=new ja,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new ja,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=pK.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_doProcessBlock(t,n){}_process(t){let n,r=this._data.sigBytes/(this.blockSize*4);t?r=Math.ceil(r):r=Math.max((r|0)-this._minBufferSize,0);const i=r*this.blockSize,o=Math.min(i*4,this._data.sigBytes);if(i){for(let s=0;s>>7)^(y<<14|y>>>18)^y>>>3,R=ol[f-2],T=(R<<15|R>>>17)^(R<<13|R>>>19)^R>>>10;ol[f]=_+ol[f-7]+T+ol[f-16]}const m=l&c^~l&u,p=i&o^i&s^o&s,g=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),E=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),b=d+E+m+gK[f]+ol[f],w=g+p;d=u,u=c,c=l,l=a+b|0,a=s,s=o,o=i,i=b+w|0}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+l|0,r[5]=r[5]+c|0,r[6]=r[6]+u|0,r[7]=r[7]+d|0}finalize(t){super.finalize(t);const n=this._nDataBytes*8,r=this._data.sigBytes*8;return this._data.words[r>>>5]|=128<<24-r%32,this._data.words[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),this._data.words[(r+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function yK(e){return new vK().finalize(e).toString()}function bK(e){return Promise.resolve(yK(e))}async function wK(e){var t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t),r=Array.prototype.map.call(new Uint8Array(n),i=>("00"+i.toString(16)).slice(-2)).join("");return r}var xK=typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof crypto.subtle.digest=="function",wL=xK?wK:bK;function SK(){return new Promise(e=>setTimeout(e,0))}function xL(e=0){return new Promise(t=>setTimeout(t,e))}function _K(e){return e&&typeof e.then=="function"?e:Promise.resolve(e)}var zv=Promise.resolve(!0),wo=Promise.resolve(!1),CK=Promise.resolve(null),yi=Promise.resolve();function SL(e=1e4){return typeof requestIdleCallback=="function"?new Promise(t=>{requestIdleCallback(()=>t(),{timeout:e})}):xL(0)}var v0=yi;function kK(e=void 0){return v0=v0.then(()=>SL(e)),v0}function EK(e,t){return e.reduce((n,r)=>n.then(r),Promise.resolve(t))}var RK=/\./g,qk="abcdefghijklmnopqrstuvwxyz";function tc(e=10){for(var t="",n=0;n{var t=typeof e;return e!==null&&(t==="object"||t==="function")},y0=new Set(["__proto__","prototype","constructor"]),PK=new Set("0123456789");function CL(e){var t=[],n="",r="start",i=!1;for(var o of e)switch(o){case"\\":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd")throw new Error("Invalid character after an index");i&&(n+=o),r="property",i=!i;break}case".":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd"){r="property";break}if(i){i=!1,n+=o;break}if(y0.has(n))return[];t.push(n),n="",r="property";break}case"[":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd"){r="index";break}if(i){i=!1,n+=o;break}if(r==="property"){if(y0.has(n))return[];t.push(n),n=""}r="index";break}case"]":{if(r==="index"){t.push(Number.parseInt(n,10)),n="",r="indexEnd";break}if(r==="indexEnd")throw new Error("Invalid character after an index")}default:{if(r==="index"&&!PK.has(o))throw new Error("Invalid character in an index");if(r==="indexEnd")throw new Error("Invalid character after an index");r==="start"&&(r="property"),i&&(i=!1,n+="\\"),n+=o}}switch(i&&(n+="\\"),r){case"property":{if(y0.has(n))return[];t.push(n);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function kL(e,t){if(typeof t!="number"&&Array.isArray(e)){var n=Number.parseInt(t,10);return Number.isInteger(n)&&e[n]===e[t]}return!1}function TK(e,t){if(kL(e,t))throw new Error("Cannot use string index")}function Ba(e,t,n){if(Array.isArray(t)&&(t=t.join(".")),!t.includes(".")&&!t.includes("["))return e[t];if(!b1(e)||typeof t!="string")return n===void 0?e:n;var r=CL(t);if(r.length===0)return n;for(var i=0;i"u")throw new Error("missing value from map "+t);return n}function As(e,t,n,r){var i=e.get(t);return typeof i>"u"?(i=n(),e.set(t,i)):r&&r(i),i}function un(e){var t=e.split("-"),n="RxDB";return t.forEach(r=>{n+=_L(r)}),n+="Plugin",new Error(`You are using a function which must be overwritten by a plugin. - You should either prevent the usage of this function or add the plugin via: - import { `+n+" } from 'rxdb/plugins/"+e+`'; - addRxPlugin(`+n+`); - `)}function Yk(e){var t={name:e.name,message:e.message,rxdb:e.rxdb,parameters:e.parameters,extensions:e.extensions,code:e.code,url:e.url,stack:e.stack?e.stack.replace(/\n/g,` - `):void 0};return t}var b0=0;function ur(){var e=Date.now();e=e+.01,e<=b0&&(e=b0+.01);var t=parseFloat(e.toFixed(2));return b0=t,t}function bt(e,t){if(!e)throw t||(t=""),new Error("ensureNotFalsy() is falsy: "+t);return e}var qx={bufferSize:1,refCount:!0},RL="15.22.0",w0={},OK="6da4936d1425ff3a5c44c02342c6daf791d266be3ae8479b8ec59e261df41b93";function w1(e){return w1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},w1(e)}function LK(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function PL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PL=function(){return!!e})()}function jK(e,t,n){if(PL())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&$f(i,n.prototype),i}function Vm(e){var t=typeof Map=="function"?new Map:void 0;return Vm=function(r){if(r===null||!LK(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return jK(r,arguments,w1(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),$f(i,r)},Vm(e)}var _n={isDevMode(){return!1},deepFreezeWhenDevMode(e){return e},tunnelErrorMessage(e){return"RxDB Error-Code "+e+`. - Error messages are not included in RxDB core to reduce build size. - `}};function IK(e){var t="";return Object.keys(e).length===0||(t+=`Given parameters: { -`,t+=Object.keys(e).map(n=>{var r="[object Object]";try{n==="errors"?r=e[n].map(i=>JSON.stringify(i,Object.getOwnPropertyNames(i))):r=JSON.stringify(e[n],function(i,o){return o===void 0?null:o},2)}catch{}return n+":"+r}).join(` -`),t+="}"),t}function TL(e,t,n){return"RxError ("+t+`): -`+e+` -`+IK(n)}var MK=function(e){function t(r,i,o={}){var s,a=TL(i,r,o);return s=e.call(this,a)||this,s.code=r,s.message=a,s.url=Yx(r),s.parameters=o,s.rxdb=!0,s}up(t,e);var n=t.prototype;return n.toString=function(){return this.message},Vs(t,[{key:"name",get:function(){return"RxError ("+this.code+")"}},{key:"typeError",get:function(){return!1}}])}(Vm(Error)),$K=function(e){function t(r,i,o={}){var s,a=TL(i,r,o);return s=e.call(this,a)||this,s.code=r,s.message=a,s.url=Yx(r),s.parameters=o,s.rxdb=!0,s}up(t,e);var n=t.prototype;return n.toString=function(){return this.message},Vs(t,[{key:"name",get:function(){return"RxTypeError ("+this.code+")"}},{key:"typeError",get:function(){return!0}}])}(Vm(TypeError));function Yx(e){return"https://rxdb.info/errors.html?code="+e+"&console=errors"}function OL(e){return` - You can find out more about this error here: `+Yx(e)+" "}function ot(e,t){return new MK(e,_n.tunnelErrorMessage(e)+OL(e),t)}function mi(e,t){return new $K(e,_n.tunnelErrorMessage(e)+OL(e),t)}function Uv(e){return e&&e.status===409?e:!1}var NK={409:"document write conflict",422:"schema validation error",510:"attachment data missing"};function AK(e){return ot("COL20",{name:NK[e.status],document:e.documentId,writeError:e})}var Ff={preAddRxPlugin:[],preCreateRxDatabase:[],createRxDatabase:[],preCreateRxCollection:[],createRxCollection:[],createRxState:[],postDestroyRxCollection:[],postRemoveRxCollection:[],preCreateRxSchema:[],createRxSchema:[],preCreateRxQuery:[],prePrepareQuery:[],createRxDocument:[],postCreateRxDocument:[],preCreateRxStorageInstance:[],preStorageWrite:[],preMigrateDocument:[],postMigrateDocument:[],preDestroyRxDatabase:[],postRemoveRxDatabase:[],preReplicationMasterWrite:[],preReplicationMasterWriteDocumentsHandle:[]};function Zi(e,t){Ff[e].length>0&&Ff[e].forEach(n=>n(t))}function Ul(e,t){return Promise.all(Ff[e].map(n=>n(t)))}function Pu(e,t){var n=t;n=n.replace(RK,".properties."),n="properties."+n,n=Nd(n);var r=Ba(e,n);return r}function DK(e,t,n){if(typeof t.primaryKey=="string")return n;var r=Ya(t,n),i=n[e];if(i&&i!==r)throw ot("DOC19",{args:{documentData:n,existingPrimary:i,newPrimary:r},schema:t});return n[e]=r,n}function jo(e){return typeof e=="string"?e:e.key}function BK(e){var t=jo(e.primaryKey),n=Pu(e,t);return bt(n.maxLength)}function Ya(e,t){if(typeof e.primaryKey=="string")return t[e.primaryKey];var n=e.primaryKey;return n.fields.map(r=>{var i=Ba(t,r);if(typeof i>"u")throw ot("DOC18",{args:{field:r,documentData:t}});return i}).join(n.separator)}function FK(e){var t=Gm(e,!0);return t}function zK(e){return["_deleted",e]}function Wv(e){e=en(e);var t=jo(e.primaryKey);e.properties=en(e.properties),e.additionalProperties=!1,Object.prototype.hasOwnProperty.call(e,"keyCompression")||(e.keyCompression=!1),e.indexes=e.indexes?e.indexes.slice(0):[],e.required=e.required?e.required.slice(0):[],e.encrypted=e.encrypted?e.encrypted.slice(0):[],e.properties._rev={type:"string",minLength:1},e.properties._attachments={type:"object"},e.properties._deleted={type:"boolean"},e.properties._meta=UK,e.required=e.required?e.required.slice(0):[],e.required.push("_deleted"),e.required.push("_rev"),e.required.push("_meta"),e.required.push("_attachments");var n=LL(e);Ru(e.required,n),e.required=e.required.filter(o=>!o.includes(".")).filter((o,s,a)=>a.indexOf(o)===s),e.version=e.version||0;var r=e.indexes.map(o=>{var s=Vx(o)?o.slice(0):[o];return s.includes(t)||s.push(t),s[0]!=="_deleted"&&s.unshift("_deleted"),s});r.length===0&&r.push(zK(t)),r.push(["_meta.lwt",t]),e.internalIndexes&&e.internalIndexes.map(o=>{r.push(o)});var i=new Set;return r.filter(o=>{var s=o.join(",");return i.has(s)?!1:(i.add(s),!0)}),e.indexes=r,e}var UK={type:"object",properties:{lwt:{type:"number",minimum:Kx,maximum:1e15,multipleOf:.01}},additionalProperties:!0,required:["lwt"]};function LL(e){var t=Object.keys(e.properties).filter(r=>e.properties[r].final),n=jo(e.primaryKey);return t.push(n),typeof e.primaryKey!="string"&&e.primaryKey.fields.forEach(r=>t.push(r)),t}function WK(e,t){for(var n=Object.keys(e.defaultValues),r=0;r"u")&&(t[i]=e.defaultValues[i])}return t}var jL=function(){function e(n,r){this.jsonSchema=n,this.hashFunction=r,this.indexes=GK(this.jsonSchema),this.primaryPath=jo(this.jsonSchema.primaryKey),this.finalFields=LL(this.jsonSchema)}var t=e.prototype;return t.validateChange=function(r,i){this.finalFields.forEach(o=>{if(!Hm(r[o],i[o]))throw ot("DOC9",{dataBefore:r,dataAfter:i,fieldName:o,schema:this.jsonSchema})})},t.getDocumentPrototype=function(){var r={},i=Pu(this.jsonSchema,"");return Object.keys(i).forEach(o=>{var s=o;r.__defineGetter__(o,function(){if(!(!this.get||typeof this.get!="function")){var a=this.get(s);return a}}),Object.defineProperty(r,o+"$",{get:function(){return this.get$(s)},enumerable:!1,configurable:!1}),Object.defineProperty(r,o+"$$",{get:function(){return this.get$$(s)},enumerable:!1,configurable:!1}),Object.defineProperty(r,o+"_",{get:function(){return this.populate(s)},enumerable:!1,configurable:!1})}),Rs(this,"getDocumentPrototype",()=>r),r},t.getPrimaryOfDocumentData=function(r){return Ya(this.jsonSchema,r)},Vs(e,[{key:"version",get:function(){return this.jsonSchema.version}},{key:"defaultValues",get:function(){var n={};return Object.entries(this.jsonSchema.properties).filter(([,r])=>Object.prototype.hasOwnProperty.call(r,"default")).forEach(([r,i])=>n[r]=i.default),Rs(this,"defaultValues",n)}},{key:"hash",get:function(){return Rs(this,"hash",this.hashFunction(JSON.stringify(this.jsonSchema)))}}])}();function GK(e){return(e.indexes||[]).map(t=>Vx(t)?t:[t])}function HK(e,t,n=!0){n&&Zi("preCreateRxSchema",e);var r=Wv(e);r=FK(r),_n.deepFreezeWhenDevMode(r);var i=new jL(r,t);return Zi("createRxSchema",i),i}function Nn(e){return typeof e=="function"}function VK(e){return Nn(e==null?void 0:e.lift)}function Ks(e){return function(t){if(VK(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}var x1=function(e,t){return x1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},x1(e,t)};function nc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");x1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function KK(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):i(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function IL(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=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 Wl(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Gl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r1||a(f,m)})})}function a(f,m){try{l(r[f](m))}catch(p){d(o[0][3],p)}}function l(f){f.value instanceof ou?Promise.resolve(f.value.v).then(c,u):d(o[0][2],f)}function c(f){a("next",f)}function u(f){a("throw",f)}function d(f,m){f(m),o.shift(),o.length&&a(o[0][0],o[0][1])}}function YK(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Tu=="function"?Tu(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){s=e[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var ML=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function $L(e){return Nn(e==null?void 0:e.then)}function Qx(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var x0=Qx(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription: -`+n.map(function(r,i){return i+1+") "+r.toString()}).join(` - `):"",this.name="UnsubscriptionError",this.errors=n}});function S1(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Gv=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Tu(s),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var u=this.initialTeardown;if(Nn(u))try{u()}catch(g){o=g instanceof x0?g.errors:[g]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=Tu(d),m=f.next();!m.done;m=f.next()){var p=m.value;try{Qk(p)}catch(g){o=o??[],g instanceof x0?o=Gl(Gl([],Wl(o)),Wl(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new x0(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Qk(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&S1(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&S1(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),NL=Gv.EMPTY;function AL(e){return e instanceof Gv||e&&"closed"in e&&Nn(e.remove)&&Nn(e.add)&&Nn(e.unsubscribe)}function Qk(e){Nn(e)?e():e.unsubscribe()}var DL={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},BL={setTimeout:function(e,t){for(var n=[],r=2;r0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,s=i.isStopped,a=i.observers;return o||s?NL:(this.currentObservers=null,a.push(n),new Gv(function(){r.currentObservers=null,S1(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,s=r.isStopped;i?n.error(o):s&&n.complete()},t.prototype.asObservable=function(){var n=new si;return n.source=this,n},t.create=function(n,r){return new eE(n,r)},t}(si),eE=function(e){nc(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:NL},t}(Ln);function tE(){for(var e=[],t=0;t0&&(u=new Ou({next:function(T){return R.next(T)},error:function(T){g=!0,E(),d=_0(b,i,T),R.error(T)},complete:function(){p=!0,E(),d=_0(b,s),R.complete()}}),Qa(y).subscribe(u))})(c)}}function _0(e,t){for(var n=[],r=2;r!!e.queryParams.limit,Hq=e=>e.queryParams.limit===1,Vq=e=>!!(e.queryParams.skip&&e.queryParams.skip>0),Kq=e=>e.changeEvent.operation==="DELETE",qq=e=>e.changeEvent.operation==="INSERT",Yq=e=>e.changeEvent.operation==="UPDATE",Qq=e=>rj(e)&&e.previousResults.length>=e.queryParams.limit,Xq=e=>{const t=e.queryParams.sortFields,n=e.changeEvent.previous,r=e.changeEvent.doc;if(!r)return!1;if(!n)return!0;for(let i=0;i{const t=e.changeEvent.id;if(e.keyDocumentMap)return e.keyDocumentMap.has(t);{const n=e.queryParams.primaryKey,r=e.previousResults;for(let i=0;i{const t=e.previousResults[0];return!!(t&&t[e.queryParams.primaryKey]===e.changeEvent.id)},eY=e=>{const t=rS(e.previousResults);return!!(t&&t[e.queryParams.primaryKey]===e.changeEvent.id)},tY=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=e.previousResults[0];return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)<0:!1},nY=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=rS(e.previousResults);return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)>0:!1},rY=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=e.previousResults[0];return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)<0:!1},iY=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=rS(e.previousResults);return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)>0:!1},oY=e=>{const t=e.changeEvent.previous;return t?e.queryParams.queryMatcher(t):!1},sY=e=>{const t=e.changeEvent.doc;return t?e.queryParams.queryMatcher(t):!1},aY=e=>e.previousResults.length===0,lY={0:qq,1:Yq,2:Kq,3:rj,4:Hq,5:Vq,6:aY,7:Qq,8:Zq,9:eY,10:Xq,11:Jq,12:tY,13:nY,14:rY,15:iY,16:oY,17:sY};function cY(e,t,n,r){var i=e.length,o=i-1,s=0;if(i===0)return e.push(t),0;for(var a;r<=o;)s=r+(o-r>>1),a=e[s],n(a,t)<=0?r=s+1:o=s-1;return n(a,t)<=0&&s++,e.splice(s,0,t),s}const uY=e=>{},iS=e=>{e.previousResults.unshift(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},oS=e=>{e.previousResults.push(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},sS=e=>{const t=e.previousResults.shift();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},aS=e=>{const t=e.previousResults.pop();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},dY=e=>{sS(e),oS(e)},fY=e=>{aS(e),iS(e)},pY=e=>{sS(e),iS(e)},hY=e=>{aS(e),oS(e)},ij=e=>{e.keyDocumentMap&&e.keyDocumentMap.delete(e.changeEvent.id);const t=e.queryParams.primaryKey,n=e.previousResults;for(let r=0;r{const t=e.changeEvent.doc,n=e.queryParams.primaryKey,r=e.previousResults;for(let i=0;i{const t={_id:"wrongHuman"+new Date().getTime()};e.previousResults.length=0,e.previousResults.push(t),e.keyDocumentMap&&(e.keyDocumentMap.clear(),e.keyDocumentMap.set(t._id,t))},oj=e=>{const t=e.changeEvent.id,n=e.changeEvent.doc;if(e.keyDocumentMap){if(e.keyDocumentMap.has(t))return;e.keyDocumentMap.set(t,n)}else if(e.previousResults.find(i=>i[e.queryParams.primaryKey]===t))return;cY(e.previousResults,n,e.queryParams.sortComparator,0)},vY=e=>{ij(e),oj(e)},yY=e=>{throw new Error("Action runFullQueryAgain must be implemented by yourself")},bY=e=>{throw new Error("Action unknownAction should never be called")},wY=["doNothing","insertFirst","insertLast","removeFirstItem","removeLastItem","removeFirstInsertLast","removeLastInsertFirst","removeFirstInsertFirst","removeLastInsertLast","removeExisting","replaceExisting","alwaysWrong","insertAtSortPosition","removeExistingAndInsertAtSortPosition","runFullQueryAgain","unknownAction"],xY={doNothing:uY,insertFirst:iS,insertLast:oS,removeFirstItem:sS,removeLastItem:aS,removeFirstInsertLast:dY,removeLastInsertFirst:fY,removeFirstInsertFirst:pY,removeLastInsertLast:hY,removeExisting:ij,replaceExisting:mY,alwaysWrong:gY,insertAtSortPosition:oj,removeExistingAndInsertAtSortPosition:vY,runFullQueryAgain:yY,unknownAction:bY},SY=40;function C0(e){return e.charCodeAt(0)-SY}function _Y(e){return e?"1":"0"}function rE(e,t){const n=[];for(let r=0,i=e.length;rkY(RY(),lY,e);function TY(e){const t=PY(e);return wY[t]}function OY(e,t,n,r,i){const o=xY[e];return o({queryParams:t,changeEvent:n,previousResults:r,keyDocumentMap:i}),r}var su="￿",au=Number.MIN_SAFE_INTEGER;function LY(e,t){var n=t.selector,r=e.indexes?e.indexes.slice(0):[];t.index&&(r=[t.index]);var i=!!t.sort.find(u=>Object.values(u)[0]==="desc"),o=new Set;Object.keys(n).forEach(u=>{var d=Pu(e,u);d&&d.type==="boolean"&&Object.prototype.hasOwnProperty.call(n[u],"$eq")&&o.add(u)});var s=t.sort.map(u=>Object.keys(u)[0]),a=s.filter(u=>!o.has(u)).join(","),l=-1,c;if(r.forEach(u=>{var d=!0,f=!0,m=u.map(w=>{var y=n[w],_=y?Object.keys(y):[],R={};if(!y||!_.length){var T=f?au:su;R={startKey:T,endKey:d?su:au,inclusiveStart:!0,inclusiveEnd:!0}}else _.forEach(C=>{if(lS.has(C)){var I=y[C],A=$Y(C,I);R=Object.assign(R,A)}});return typeof R.startKey>"u"&&(R.startKey=au),typeof R.endKey>"u"&&(R.endKey=su),typeof R.inclusiveStart>"u"&&(R.inclusiveStart=!0),typeof R.inclusiveEnd>"u"&&(R.inclusiveEnd=!0),f&&!R.inclusiveStart&&(f=!1),d&&!R.inclusiveEnd&&(d=!1),R}),p=m.map(w=>w.startKey),g=m.map(w=>w.endKey),E={index:u,startKeys:p,endKeys:g,inclusiveEnd:d,inclusiveStart:f,sortSatisfiedByIndex:!i&&a===u.filter(w=>!o.has(w)).join(","),selectorSatisfiedByIndex:MY(u,t.selector,p,g)},b=NY(e,t,E);(b>=l||t.index)&&(l=b,c=E)}),!c)throw ot("SNH",{query:t});return c}var lS=new Set(["$eq","$gt","$gte","$lt","$lte"]),jY=new Set(["$eq","$gt","$gte"]),IY=new Set(["$eq","$lt","$lte"]);function MY(e,t,n,r){var i=Object.entries(t),o=i.find(([C,I])=>{if(!e.includes(C))return!0;var A=Object.entries(I).find(([L,$])=>!lS.has(L));return A});if(o||t.$and||t.$or)return!1;var s=[],a=new Set;for(var[l,c]of Object.entries(t)){if(!e.includes(l))return!1;var u=Object.keys(c).filter(C=>jY.has(C));if(u.length>1)return!1;var d=u[0];if(d&&a.add(l),d!=="$eq"){if(s.length>0)return!1;s.push(d)}}var f=[],m=new Set;for(var[p,g]of Object.entries(t)){if(!e.includes(p))return!1;var E=Object.keys(g).filter(C=>IY.has(C));if(E.length>1)return!1;var b=E[0];if(b&&m.add(p),b!=="$eq"){if(f.length>0)return!1;f.push(b)}}var w=0;for(var y of e){for(var _ of[a,m]){if(!_.has(y)&&_.size>0)return!1;_.delete(y)}var R=n[w],T=r[w];if(R!==T&&a.size>0&&m.size>0)return!1;w++}return!0}function $Y(e,t){switch(e){case"$eq":return{startKey:t,endKey:t,inclusiveEnd:!0,inclusiveStart:!0};case"$lte":return{endKey:t,inclusiveEnd:!0};case"$gte":return{startKey:t,inclusiveStart:!0};case"$lt":return{endKey:t,inclusiveEnd:!1};case"$gt":return{startKey:t,inclusiveStart:!1};default:throw new Error("SNH")}}function NY(e,t,n){var r=0,i=u=>{u>0&&(r=r+u)},o=10,s=g0(n.startKeys,u=>u!==au&&u!==su);i(s*o);var a=g0(n.startKeys,u=>u!==su&&u!==au);i(a*o);var l=g0(n.startKeys,(u,d)=>u===n.endKeys[d]);i(l*o*1.5);var c=n.sortSatisfiedByIndex?5:0;return i(c),r}class Gu extends Error{}const AY=2147483647,DY=-2147483648,BY=Number.MAX_SAFE_INTEGER,FY=Number.MIN_SAFE_INTEGER,Vl=Symbol("missing"),sj=Object.freeze(new Error("mingo: cycle detected while processing object/array")),zY=Object.getPrototypeOf([]),aj=Object.getPrototypeOf({}),UY="[object Object]",WY=/^\[object ([a-zA-Z0-9]+)\]$/;class cS{}class uS{}const Kl=e=>e===null?cS:e===void 0?uS:e.constructor,Vv=e=>{const t=YY(e);let n=0,r=t.length;for(;r;)n=(n<<5)-n^t.charCodeAt(--r);return n>>>0},lj=new Set(["null","undefined","boolean","number","string","date","regexp"]),iE=new Set([uS,cS,Boolean,String,Number]),Cd=e=>e.toString(),po=e=>`${Kl(e).name}[${e.toString()}]`,ql=new Map([[Number,Cd],[Boolean,Cd],[RegExp,Cd],[Function,Cd],[Symbol,Cd],[Date,e=>e.toISOString()],[String,JSON.stringify],[cS,e=>"null"],[uS,e=>"undefined"],[Int8Array,po],[Uint8Array,po],[Uint8ClampedArray,po],[Int16Array,po],[Uint16Array,po],[Int32Array,po],[Uint32Array,po],[Float32Array,po],[Float64Array,po]]);typeof BigInt<"u"&&ql.set(BigInt,e=>"0x"+e.toString(16));typeof BigInt64Array<"u"&&ql.set(BigInt64Array,po);typeof BigUint64Array<"u"&&ql.set(BigUint64Array,po);const GY={null:0,undefined:0,number:1,string:2,object:3,array:4,boolean:5,date:6,regexp:7,function:8},Oo=(e,t)=>{e===Vl&&(e=void 0),t===Vl&&(t=void 0);const[n,r]=[e,t].map(i=>GY[Uf(i).toLowerCase()]);return n!==r?n-r:n===1||n===2||n===6?et?1:0:Yl(e,t)?0:et?1:0};function Vi(e,t){if(!e)throw new Gu(t)}const HY=e=>{const t=Object.getPrototypeOf(Kl(e));return t&&t.name==="TypedArray"},oE=e=>{if(iE.has(Kl(e)))return e;const t=new Set,n=r=>{if(t.has(r))throw sj;const i=Kl(r);if(iE.has(i))return r;try{if(Rr(r))return t.add(r),r.map(n);if(Xn(r)){t.add(r);const o={};for(const s in r)o[s]=n(r[s]);return o}}finally{t.delete(r)}return i===Date||i===RegExp||HY(r)?new i(r):r};return n(e)},Uf=e=>WY.exec(Object.prototype.toString.call(e))[1],E0=e=>typeof e=="boolean",Ds=e=>typeof e=="string",ga=e=>!isNaN(e)&&typeof e=="number",Rr=Array.isArray,Xn=e=>{if(!e)return!1;const t=Object.getPrototypeOf(e);return(t===aj||t===null)&&UY===Object.prototype.toString.call(e)},Kv=e=>e===Object(e),sE=e=>e instanceof Date,Jh=e=>e instanceof RegExp,qv=e=>typeof e=="function",Pr=e=>e==null,Lu=(e,t)=>e.includes(t),cj=(e,t)=>!Lu(e,t),VY=(e,t=!0)=>!!e||t&&e==="",Hu=e=>Pr(e)||Ds(e)&&!e||e instanceof Array&&e.length===0||Xn(e)&&Object.keys(e).length===0,aE=e=>e===Vl,gp=e=>e instanceof Array?e:[e],Ia=(e,t)=>!!e&&Object.prototype.hasOwnProperty.call(e,t),KY=(e,t)=>Xn(e)&&Xn(t)||Rr(e)&&Rr(t);function _1(e,t,n){if(n=n||{flatten:!1},aE(e)||Pr(e))return t;if(aE(t)||Pr(t))return e;if(!KY(e,t)){if(n.skipValidation)return t||e;throw Error("mismatched types. must both be array or object")}if(n.skipValidation=!0,Rr(e)){const r=e,i=t;if(n.flatten){let o=0,s=0;for(;o{const o=fj(r,t);n.has(o)?n.get(o).some(s=>Yl(e[s],r))||n.get(o).push(i):n.set(o,[i])}),n}function uj(e,t=Vv){if(e.some(a=>a.length==0))return[];if(e.length===1)return Array.from(e);const n=QY(e.map((a,l)=>[l,a.length]),a=>a[1]),r=e[n[0][0]],i=lE(r,t),o=new Map,s=new Array;return i.forEach((a,l)=>{const c=a.map(m=>r[m]),u=c.map(m=>0),d=c.map(m=>[n[0][0],0]);let f=!1;for(let m=1;mE[w]);f=c.map((w,y)=>b.some((_,R)=>{const T=u[y];return Yl(w,_)&&(u[y]++,pm===e.length-1?[c[p],d[p]]:Vl).filter(m=>m!==Vl))}),s.sort((a,l)=>{const[c,[u,d]]=a,[f,[m,p]]=l,g=Oo(u,m);return g!==0?g:Oo(d,p)}).map(a=>a[0])}function dj(e,t=0){const n=new Array;function r(i,o){for(let s=0,a=i.length;s0||o<0)?r(i[s],Math.max(-1,o-1)):n.push(i[s])}return r(e,t),n}const qY=e=>{let[t,n]=[Object.getPrototypeOf(e),Object.getOwnPropertyNames(e)],r=t;for(;!n.length&&t!==aj&&t!==zY;)r=t,n=Object.getOwnPropertyNames(t),t=Object.getPrototypeOf(t);const i={};return n.forEach(o=>i[o]=e[o]),[i,r]};function Yl(e,t){const n=[[e,t]];for(;n.length>0;){if([e,t]=n.pop(),e===t)continue;const r=Kl(e);if(r!==Kl(t)||qv(e))return!1;if(ql.has(r)){const i=ql.get(r);if(i(e)!==i(t))return!1;continue}if(r===Array||r===Object){const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length||new Set(i.concat(o)).size!=i.length)return!1;for(const s of i)n.push([e[s],t[s]]);continue}return!1}return!n.length}function YY(e){const t=new Set,n=r=>{const i=Kl(r);if(ql.has(i))return ql.get(i)(r);const o=i===Object?"":i.name;if(qv(r.toJSON))return`${o}(${JSON.stringify(r)})`;if(t.has(r))throw sj;t.add(r);try{if(i===Array)return"["+r.map(n).join(",")+"]";if(i!==Object){const[a,l]=qY(r);if(Rr(r))return`${o}${n([...r,a])}`;r=a}const s=Object.keys(r);return s.sort(),`${o}{`+s.map(a=>`${a}:${n(r[a])}`).join(",")+"}"}finally{t.delete(r)}};return n(e)}function fj(e,t){return t=t||Vv,Pr(e)?null:t(e).toString()}function QY(e,t,n=Oo){if(Hu(e))return e;const r=new Array,i=new Array;for(let o=0;on(o[0],s[0])),vp(i,r.map(o=>o[1]))}function XY(e,t,n=Vv){if(e.length<1)return new Map;const r=new Map,i=new Map;for(let o=0;oYl(u,a)):null;Pr(c)?(i.set(a,[s]),r.has(l)?r.get(l).push(a):r.set(l,[a])):i.get(c).push(s)}}return i}const R0=5e4;function vp(e,...t){return e instanceof Array?t.reduce((n,r)=>{let i=Math.ceil(r.length/R0),o=0;for(;i-- >0;)Array.prototype.push.apply(n,r.slice(o,o+R0)),o+=R0;return n},e):t.filter(Kv).reduce((n,r)=>(Object.assign(n,r),n),e)}function C1(e,t){return Kv(e)?e[t]:void 0}function JY(e,t){if(t<1)return e;for(;t--&&e.length===1;)e=e[0];return e}function dS(e,t,n){let r=0;function i(s,a){let l=s;for(let c=0;c0)break;r+=1;const f=a.slice(c);l=l.reduce((m,p)=>{const g=i(p,f);return g!==void 0&&m.push(g),m},[]);break}else l=C1(l,u);if(l===void 0)break}return l}const o=lj.has(Uf(e).toLowerCase())?e:i(e,t.split("."));return o instanceof Array&&(n!=null&&n.unwrapArray)?JY(o,r):o}function Zh(e,t,n){const r=t.split("."),i=r[0],o=r.slice(1).join("."),s=/^\d+$/.exec(i)!==null,a=r.length>1;let l,c;if(e instanceof Array)if(s)l=C1(e,Number(i)),a&&(l=Zh(l,o,n)),l=[l];else{l=[];for(const u of e)c=Zh(u,t,n),n!=null&&n.preserveMissing?(c===void 0&&(c=Vl),l.push(c)):c!==void 0&&l.push(c)}else{if(c=C1(e,i),a&&(c=Zh(c,o,n)),c===void 0)return;l=n!=null&&n.preserveKeys?Object.assign({},e):{},l[i]=c}return l}function k1(e){if(e instanceof Array)for(let t=e.length-1;t>=0;t--)e[t]===Vl?e.splice(t,1):k1(e[t]);else if(Xn(e))for(const t in e)Ia(e,t)&&k1(e[t])}const cE=/^\d+$/;function Km(e,t,n,r){const i=t.split("."),o=i[0],s=i.slice(1).join(".");if(i.length===1)(Xn(e)||Rr(e)&&cE.test(o))&&n(e,o);else{r!=null&&r.buildGraph&&Pr(e[o])&&(e[o]={});const a=e[o];if(!a)return;const l=!!(i.length>1&&cE.test(i[1]));a instanceof Array&&(r!=null&&r.descendArray)&&!l?a.forEach(c=>Km(c,s,n,r)):Km(a,s,n,r)}}function ZY(e,t,n){Km(e,t,(r,i)=>{r[i]=qv(n)?n(r[i]):n},{buildGraph:!0})}function uE(e,t,n){Km(e,t,(r,i)=>{if(r instanceof Array){if(/^\d+$/.test(i))r.splice(parseInt(i),1);else if(n&&n.descendArray)for(const o of r)Xn(o)&&delete o[i]}else Xn(r)&&delete r[i]},n)}const eQ=/^\$[a-zA-Z0-9_]+$/;function Vu(e){return eQ.test(e)}function pj(e){if(lj.has(Uf(e).toLowerCase()))return Jh(e)?{$regex:e}:{$eq:e};if(Kv(e)){if(!Object.keys(e).some(Vu))return{$eq:e};if(Ia(e,"$regex")){const n=Object.assign({},e);return n.$regex=new RegExp(e.$regex,e.$options),delete n.$options,n}}return e}var xa;(function(e){e.CLONE_ALL="CLONE_ALL",e.CLONE_INPUT="CLONE_INPUT",e.CLONE_OUTPUT="CLONE_OUTPUT",e.CLONE_OFF="CLONE_OFF"})(xa||(xa={}));class El{constructor(t,n,r,i=Date.now()){this._opts=t,this._root=n,this._local=r,this.timestamp=i,this.update(n,r)}static init(t,n,r){return t instanceof El?new El(t._opts,Pr(t.root)?n:t.root,Object.assign({},t.local,r)):new El(t,n,r)}update(t,n){var r;return this._root=t,this._local=n&&Object.assign({},n,{variables:Object.assign({},(r=this._local)===null||r===void 0?void 0:r.variables,n==null?void 0:n.variables)}),this}getOptions(){return Object.freeze(Object.assign(Object.assign({},this._opts),{context:Ql.from(this._opts.context)}))}get root(){return this._root}get local(){return this._local}get idKey(){return this._opts.idKey}get collation(){var t;return(t=this._opts)===null||t===void 0?void 0:t.collation}get processingMode(){var t;return((t=this._opts)===null||t===void 0?void 0:t.processingMode)||xa.CLONE_OFF}get useStrictMode(){var t;return(t=this._opts)===null||t===void 0?void 0:t.useStrictMode}get scriptEnabled(){var t;return(t=this._opts)===null||t===void 0?void 0:t.scriptEnabled}get useGlobalContext(){var t;return(t=this._opts)===null||t===void 0?void 0:t.useGlobalContext}get hashFunction(){var t;return(t=this._opts)===null||t===void 0?void 0:t.hashFunction}get collectionResolver(){var t;return(t=this._opts)===null||t===void 0?void 0:t.collectionResolver}get jsonSchemaValidator(){var t;return(t=this._opts)===null||t===void 0?void 0:t.jsonSchemaValidator}get variables(){var t;return(t=this._opts)===null||t===void 0?void 0:t.variables}get context(){var t;return(t=this._opts)===null||t===void 0?void 0:t.context}}function hj(e){return e instanceof El?e.getOptions():Object.freeze(Object.assign(Object.assign({idKey:"_id",scriptEnabled:!0,useStrictMode:!0,useGlobalContext:!0,processingMode:xa.CLONE_OFF},e),{context:e!=null&&e.context?Ql.from(e==null?void 0:e.context):Ql.init({})}))}var Kt;(function(e){e.ACCUMULATOR="accumulator",e.EXPRESSION="expression",e.PIPELINE="pipeline",e.PROJECTION="projection",e.QUERY="query",e.WINDOW="window"})(Kt||(Kt={}));class Ql{constructor(t){this.operators={[Kt.ACCUMULATOR]:{},[Kt.EXPRESSION]:{},[Kt.PIPELINE]:{},[Kt.PROJECTION]:{},[Kt.QUERY]:{},[Kt.WINDOW]:{}};for(const[n,r]of Object.entries(t))this.addOperators(n,r)}static init(t={}){return new Ql(t)}static from(t){return new Ql(t.operators)}addOperators(t,n){for(const[r,i]of Object.entries(n))this.getOperator(t,r)||(this.operators[t][r]=i);return this}addAccumulatorOps(t){return this.addOperators(Kt.ACCUMULATOR,t)}addExpressionOps(t){return this.addOperators(Kt.EXPRESSION,t)}addQueryOps(t){return this.addOperators(Kt.QUERY,t)}addPipelineOps(t){return this.addOperators(Kt.PIPELINE,t)}addProjectionOps(t){return this.addOperators(Kt.PROJECTION,t)}addWindowOps(t){return this.addOperators(Kt.WINDOW,t)}getOperator(t,n){return t in this.operators&&this.operators[t][n]||null}}const fl=Ql.init();function dE(e,t){for(const[n,r]of Object.entries(t)){Vi(qv(r)&&Vu(n),`'${n}' is not a valid operator`);const i=Rl(e,n,null);Vi(!i||r===i,`${n} already exists for '${e}' operators. Cannot change operator function once registered.`)}switch(e){case Kt.ACCUMULATOR:fl.addAccumulatorOps(t);break;case Kt.EXPRESSION:fl.addExpressionOps(t);break;case Kt.PIPELINE:fl.addPipelineOps(t);break;case Kt.PROJECTION:fl.addProjectionOps(t);break;case Kt.QUERY:fl.addQueryOps(t);break;case Kt.WINDOW:fl.addWindowOps(t);break}}function Rl(e,t,n){const{context:r,useGlobalContext:i}=n||{},o=r?r.getOperator(e,t):null;return!o&&i?fl.getOperator(e,t):o}const fE={$$ROOT(e,t,n){return n.root},$$CURRENT(e,t,n){return e},$$REMOVE(e,t,n){},$$NOW(e,t,n){return new Date(n.timestamp)}},E1={$$KEEP(e,t,n){return e},$$PRUNE(e,t,n){},$$DESCEND(e,t,n){if(!Ia(t,"$cond"))return e;let r;for(const[i,o]of Object.entries(e))if(Kv(o)){if(o instanceof Array){const s=[];for(let a of o)Xn(a)&&(a=pE(a,t,n.update(a))),Pr(a)||s.push(a);r=s}else r=pE(o,t,n.update(o));Pr(r)?delete e[i]:e[i]=r}return e}};function Ho(e,t,n,r){var i;const o=El.init(r,e);if(n=n||"",Vu(n)){const s=Rl(Kt.EXPRESSION,n,r);if(s)return s(e,t,o);const a=Rl(Kt.ACCUMULATOR,n,r);if(a)return e instanceof Array||(e=Ho(e,t,null,o),t=null),Vi(e instanceof Array,`'${n}' target must be an array.`),a(e,t,o.update(null,o.local));throw new Gu(`operator '${n}' is not registered`)}if(Ds(t)&&t.length>0&&t[0]==="$"){if(Ia(E1,t))return t;let s=o.root;const a=t.split(".");if(Ia(fE,a[0]))s=fE[a[0]](e,null,o),t=t.slice(a[0].length+1);else if(a[0].slice(0,2)==="$$"){s=Object.assign({},o.variables,{this:e},(i=o.local)===null||i===void 0?void 0:i.variables);const l=a[0].slice(2);Vi(Ia(s,l),`Use of undefined variable: ${l}`),t=t.slice(2)}else t=t.slice(1);return t===""?s:dS(s,t)}if(Rr(t))return t.map(s=>Ho(e,s,null,o));if(Xn(t)){const s={};for(const[a,l]of Object.entries(t))if(s[a]=Ho(e,l,a,o),[Kt.EXPRESSION,Kt.ACCUMULATOR].some(c=>!!Rl(c,a,r)))return Vi(Object.keys(t).length===1,"Invalid aggregation expression '"+JSON.stringify(t)+"'"),s[a];return s}return t}function pE(e,t,n){const r=Ho(e,t,null,n);return Ia(E1,r)?E1[r](e,t,n):r}function ju(e){return e instanceof hE?e:new hE(e)}function tQ(...e){let t=0;return ju(()=>{for(;t{const i=r.next();if(i.done)throw R1;return i.value}}else if(t instanceof Array){const r=t,i=r.length;let o=0;n=()=>{if(o0?this.push(qo.TAKE,t):this}drop(t){return t>0?this.push(qo.DROP,t):this}transform(t){const n=this;let r;return ju(()=>(r||(r=ju(t(n.value()))),r.next()))}value(){return this.isDone||(this.isDone=this.getNext(!0).done),this.yieldedValues}each(t){for(;;){const n=this.next();if(n.done)break;if(t(n.value)===!1)return!1}return!0}reduce(t,n){let r=this.next();for(n===void 0&&!r.done&&(n=r.value,r=this.next());!r.done;)n=t(n,r.value),r=this.next();return n}size(){return this.reduce((t,n)=>++t,0)}[Symbol.iterator](){return this}}class oQ{constructor(t,n){this.pipeline=t,this.options=hj(n)}stream(t){let n=ju(t);const r=this.options.processingMode;(r==xa.CLONE_ALL||r==xa.CLONE_INPUT)&&n.map(oE);const i=new Array;if(!Hu(this.pipeline))for(const o of this.pipeline){const s=Object.keys(o),a=s[0],l=Rl(Kt.PIPELINE,a,this.options);Vi(s.length===1&&!!l,`invalid pipeline operator ${a}`),i.push(a),n=l(n,o[a],this.options)}return(r==xa.CLONE_OUTPUT||r==xa.CLONE_ALL&&uj([["$group","$unwind"],i]).length)&&n.map(oE),n}run(t){return this.stream(t).value()}}class sQ{constructor(t,n,r,i){this.source=t,this.predicate=n,this.projection=r,this.options=i,this.operators=[],this.result=null,this.buffer=[]}fetch(){return this.result?this.result:(Xn(this.projection)&&this.operators.push({$project:this.projection}),this.result=ju(this.source).filter(this.predicate),this.operators.length>0&&(this.result=new oQ(this.operators,this.options).stream(this.result)),this.result)}fetchAll(){const t=ju([...this.buffer]);return this.buffer=[],tQ(t,this.fetch())}all(){return this.fetchAll().value()}count(){return this.all().length}skip(t){return this.operators.push({$skip:t}),this}limit(t){return this.operators.push({$limit:t}),this}sort(t){return this.operators.push({$sort:t}),this}collation(t){return this.options=Object.assign(Object.assign({},this.options),{collation:t}),this}next(){if(this.buffer.length>0)return this.buffer.pop();const t=this.fetch().next();if(!t.done)return t.value}hasNext(){if(this.buffer.length>0)return!0;const t=this.fetch().next();return t.done?!1:(this.buffer.push(t.value),!0)}map(t){return this.all().map(t)}forEach(t){this.all().forEach(t)}[Symbol.iterator](){return this.fetchAll()}}class yp{constructor(t,n){this.condition=t,this.options=hj(n),this.compiled=[],this.compile()}compile(){Vi(Xn(this.condition),`query criteria must be an object: ${JSON.stringify(this.condition)}`);const t={};for(const[n,r]of Object.entries(this.condition)){if(n==="$where")Object.assign(t,{field:n,expr:r});else if(Lu(["$and","$or","$nor","$expr","$jsonSchema"],n))this.processOperator(n,n,r);else{Vi(!Vu(n),`unknown top level operator: ${n}`);for(const[i,o]of Object.entries(pj(r)))this.processOperator(n,i,o)}t.field&&this.processOperator(t.field,t.field,t.expr)}}processOperator(t,n,r){const i=Rl(Kt.QUERY,n,this.options);if(!i)throw new Gu(`unknown query operator ${n}`);const o=i(t,r,this.options);this.compiled.push(o)}test(t){for(let n=0,r=this.compiled.length;nthis.test(r),n||{},this.options)}remove(t){return t.reduce((n,r)=>(this.test(r)||n.push(r),n),[])}}const aQ=(e,t,n)=>{if(Hu(t)||!Xn(t))return e;let r=Oo;const i=n.collation;return Xn(i)&&Ds(i.locale)&&(r=cQ(i)),e.transform(o=>{const s=Object.keys(t);for(const a of s.reverse()){const l=XY(o,u=>dS(u,a),n.hashFunction),c=Array.from(l.keys()).sort(r);t[a]===-1&&c.reverse(),o=[],c.reduce((u,d)=>vp(u,l.get(d)),o)}return o})},lQ={1:"base",2:"accent",3:"variant"};function cQ(e){const t={sensitivity:lQ[e.strength||3],caseFirst:e.caseFirst==="off"?"false":e.caseFirst||"false",numeric:e.numericOrdering||!1,ignorePunctuation:e.alternate==="shifted"};(e.caseLevel||!1)===!0&&(t.sensitivity==="base"&&(t.sensitivity="case"),t.sensitivity==="accent"&&(t.sensitivity="variant"));const n=new Intl.Collator(e.locale,t);return(r,i)=>{if(!Ds(r)||!Ds(i))return Oo(r,i);const o=n.compare(r,i);return o<0?-1:o>0?1:0}}function Hr(e){const t=(n,r,i)=>{const o={unwrapArray:!0},s=Math.max(1,n.split(".").length-1);return a=>{const l=dS(a,n,o);return e(l,r,Object.assign(Object.assign({},i),{depth:s}))}};return t.op="query",t}function mj(e,t,n){if(Yl(e,t)||Pr(e)&&Pr(t))return!0;if(e instanceof Array){const r=Yl.bind(null,t);return e.some(r)||dj(e,n==null?void 0:n.depth).some(r)}return!1}function uQ(e,t,n){return!mj(e,t,n)}function gj(e,t,n){return Pr(e)?t.some(r=>r===null):uj([gp(e),t],n==null?void 0:n.hashFunction).length>0}function dQ(e,t,n){return!gj(e,t,n)}function fQ(e,t,n){return Yv(e,t,(r,i)=>Oo(r,i)<0)}function pQ(e,t,n){return Yv(e,t,(r,i)=>Oo(r,i)<=0)}function hQ(e,t,n){return Yv(e,t,(r,i)=>Oo(r,i)>0)}function mQ(e,t,n){return Yv(e,t,(r,i)=>Oo(r,i)>=0)}function gQ(e,t,n){return gp(e).some(r=>t.length===2&&r%t[0]===t[1])}function vQ(e,t,n){const r=gp(e),i=o=>Ds(o)&&VY(t.exec(o),n==null?void 0:n.useStrictMode);return r.some(i)||dj(r,1).some(i)}function yQ(e,t,n){return(t===!1||t===0)&&e===void 0||(t===!0||t===1)&&e!==void 0}function bQ(e,t,n){if(!Rr(e)||!Rr(t)||!e.length||!t.length)return!1;let r=!0;for(const i of t){if(!r)break;Xn(i)&&Lu(Object.keys(i),"$elemMatch")?r=vj(e,i.$elemMatch,n):i instanceof RegExp?r=e.some(o=>typeof o=="string"&&i.test(o)):r=e.some(o=>Yl(i,o))}return r}function wQ(e,t,n){return Array.isArray(e)&&e.length===t}function xQ(e){return Vu(e)&&["$and","$or","$nor"].indexOf(e)===-1}function vj(e,t,n){if(Rr(e)&&!Hu(e)){let r=s=>s,i=t;Object.keys(t).every(xQ)&&(i={temp:t},r=s=>({temp:s}));const o=new yp(i,n);for(let s=0,a=e.length;se===null,gE=e=>ga(e)&&e>=DY&&e<=AY&&e.toString().indexOf(".")===-1,vE=e=>ga(e)&&e>=FY&&e<=BY&&e.toString().indexOf(".")===-1,SQ={array:Rr,bool:E0,boolean:E0,date:sE,decimal:ga,double:ga,int:gE,long:vE,number:ga,null:mE,object:Xn,regex:Jh,regexp:Jh,string:Ds,undefined:Pr,function:e=>{throw new Gu("unsupported type key `function`.")},1:ga,2:Ds,3:Xn,4:Rr,6:Pr,8:E0,9:sE,10:mE,11:Jh,16:gE,18:vE,19:ga};function yE(e,t,n){const r=SQ[t];return r?r(e):!1}function _Q(e,t,n){return Array.isArray(t)?t.findIndex(r=>yE(e,r))>=0:yE(e,t)}function Yv(e,t,n){return gp(e).some(r=>Uf(r)===Uf(t)&&n(r,t))}const bE=(e,t)=>{const n={};return e.split("").forEach((r,i)=>n[r]=t*(i+1)),n};Object.assign(Object.assign(Object.assign({},bE("ABCDEFGHIKLM",1)),bE("NOPQRSTUVWXY",-1)),{Z:0});const wE={undefined:null,null:null,NaN:NaN,Infinity:new Error,"-Infinity":new Error};function Ti(e,t=wE){const n=Object.assign({},wE,t),r=new Set(Object.keys(n));return(i,o,s)=>{const a=Ho(i,o,null,s);if(r.has(`${a}`)){const l=n[`${a}`];if(l instanceof Error)throw new Gu(`cannot apply $${e.name} to -inf, value must in (-inf,inf)`);return l}return e(a)}}Ti(Math.acos,{Infinity:1/0,0:new Error});Ti(Math.acosh,{Infinity:1/0,0:new Error});Ti(Math.asin);Ti(Math.asinh,{Infinity:1/0,"-Infinity":-1/0});Ti(Math.atan);Ti(Math.atanh,{1:1/0,"-1":-1/0});Ti(Math.cos);Ti(Math.cosh,{"-Infinity":1/0,Infinity:1/0});const CQ=Math.PI/180;Ti(e=>e*CQ,{Infinity:1/0,"-Infinity":1/0});const kQ=180/Math.PI;Ti(e=>e*kQ,{Infinity:1/0,"-Infinity":-1/0});Ti(Math.sin);Ti(Math.sinh,{"-Infinity":-1/0,Infinity:1/0});Ti(Math.tan);const EQ=(e,t,n)=>{if(Hu(t))return e;let r=Object.keys(t),i=!1;yj(t,n);const o=n.idKey;if(Lu(r,o)){const a=t[o];(a===0||a===!1)&&(r=r.filter(cj.bind(null,[o])),i=r.length==0)}else r.push(o);const s=El.init(n);return e.map(a=>P1(a,t,s.update(a),r,i))};function P1(e,t,n,r,i){let o={},s=!1,a=!1;const l=[];i&&l.push(n.idKey);for(const c of r){let u;const d=t[c];if(c!==n.idKey&&Lu([0,!1],d)&&(a=!0),c===n.idKey&&Hu(d))u=e[c];else if(Ds(d))u=Ho(e,d,c,n);else if(!Lu([1,!0],d))if(d instanceof Array)u=d.map(m=>{const p=Ho(e,m,null,n);return Pr(p)?null:p});else if(Xn(d)){const m=d,p=Object.keys(d),g=p.length==1?p[0]:"",E=Rl(Kt.PROJECTION,g,n);if(E)g==="$slice"?gp(m[g]).every(ga)?(u=E(e,m[g],c,n),s=!0):u=Ho(e,m,c,n):u=E(e,m[g],c,n);else if(Vu(g))u=Ho(e,m[g],g,n);else if(Ia(e,c)){yj(m,n);let b=e[c];b instanceof Array?u=b.map(w=>P1(w,m,n,p,!1)):(b=Xn(b)?b:e,u=P1(b,m,n,p,!1))}else u=Ho(e,d,null,n)}else{l.push(c);continue}const f=Zh(e,c,{preserveMissing:!0});f!==void 0&&_1(o,f,{flatten:!0}),cj([0,1,!1,!0],d)&&(u===void 0?uE(o,c,{descendArray:!0}):ZY(o,c,u))}if(k1(o),(s||a||i)&&(o=vp({},e,o),l.length>0))for(const c of l)uE(o,c,{descendArray:!0});return o}function yj(e,t){const n=[!1,!1];for(const[r,i]of Object.entries(e)){if(r===(t==null?void 0:t.idKey))return;i===0||i===!1?n[0]=!0:(i===1||i===!0)&&(n[1]=!0),Vi(!(n[0]&&n[1]),"Projection cannot have a mix of inclusion and exclusion.")}}const RQ=(e,t,n)=>{Vi(Rr(t),"Invalid expression: $and expects value to be an Array.");const r=t.map(i=>new yp(i,n));return i=>r.every(o=>o.test(i))},bj=(e,t,n)=>{Vi(Rr(t),"Invalid expression. $or expects value to be an Array");const r=t.map(i=>new yp(i,n));return i=>r.some(o=>o.test(i))},PQ=(e,t,n)=>{Vi(Rr(t),"Invalid expression. $nor expects value to be an array.");const r=bj("$or",t,n);return i=>!r(i)},TQ=(e,t,n)=>{const r={};r[e]=pj(t);const i=new yp(r,n);return o=>!i.test(o)},OQ=Hr(mj),LQ=Hr(hQ),jQ=Hr(mQ),IQ=Hr(gj),MQ=Hr(fQ),$Q=Hr(pQ),NQ=Hr(uQ),AQ=Hr(dQ),DQ=Hr(gQ),BQ=Hr(vQ);Hr(bQ);const FQ=Hr(vj),zQ=Hr(wQ),UQ=Hr(yQ),WQ=Hr(_Q);var xE=!1;function GQ(e){return xE||(dE(Kt.PIPELINE,{$sort:aQ,$project:EQ}),dE(Kt.QUERY,{$and:RQ,$eq:OQ,$elemMatch:FQ,$exists:UQ,$gt:LQ,$gte:jQ,$in:IQ,$lt:MQ,$lte:$Q,$ne:NQ,$nin:AQ,$mod:DQ,$nor:PQ,$not:TQ,$or:bj,$regex:BQ,$size:zQ,$type:WQ}),xE=!0),new yp(e)}function qm(e,t){var n=jo(e.primaryKey);t=en(t);var r=Ji(t);if(typeof r.skip!="number"&&(r.skip=0),r.selector?(r.selector=r.selector,Object.entries(r.selector).forEach(([c,u])=>{(typeof u!="object"||u===null)&&(r.selector[c]={$eq:u})})):r.selector={},r.index){var i=Bf(r.index);i.includes(n)||i.push(n),r.index=i}if(r.sort){var l=r.sort.find(c=>lK(c)===n);l||(r.sort=r.sort.slice(0),r.sort.push({[n]:"asc"}))}else if(r.index)r.sort=r.index.map(c=>({[c]:"asc"}));else{if(e.indexes){var o=new Set;Object.entries(r.selector).forEach(([c,u])=>{var d=!1;typeof u=="object"&&u!==null?d=!!Object.keys(u).find(f=>lS.has(f)):d=!0,d&&o.add(c)});var s=-1,a;e.indexes.forEach(c=>{var u=Vx(c)?c:[c],d=u.findIndex(f=>!o.has(f));d>0&&d>s&&(s=d,a=u)}),a&&(r.sort=a.map(c=>({[c]:"asc"})))}r.sort||(r.sort=[{[n]:"asc"}])}return r}function wj(e,t){if(!t.sort)throw ot("SNH",{query:t});var n=[];t.sort.forEach(i=>{var o=Object.keys(i)[0],s=Object.values(i)[0];n.push({key:o,direction:s,getValueFn:aK(o)})});var r=(i,o)=>{for(var s=0;sn.test(i);return r}async function kd(e,t){var n=await e.exec();if(!n)return null;if(Array.isArray(n))return Promise.all(n.map(i=>t(i)));var r=await t(n);return r}function HQ(e,t){return!t.sort||t.sort.length===0?[e]:t.sort.map(n=>Object.keys(n)[0])}var VQ=new WeakMap;function KQ(e){return As(VQ,e,()=>{var t=e.collection,n=qm(t.storageInstance.schema,Ji(e.mangoQuery)),r=t.schema.primaryPath,i=wj(t.schema.jsonSchema,n),o=(c,u)=>{var d={docA:c,docB:u,rxQuery:e};return i(d.docA,d.docB)},s=fS(t.schema.jsonSchema,n),a=c=>{var u={doc:c,rxQuery:e};return s(u.doc)},l={primaryKey:e.collection.schema.primaryPath,skip:n.skip,limit:n.limit,sortFields:HQ(r,n),sortComparator:o,queryMatcher:a};return l})}function qQ(e,t){if(!e.collection.database.eventReduce)return{runFullQueryAgain:!0};var n=KQ(e),r=bt(e._result).docsData.slice(0),i=bt(e._result).docsDataMap,o=!1,s=t.map(l=>zq(l)).filter(bL),a=s.find(l=>{var c={queryParams:n,changeEvent:l,previousResults:r,keyDocumentMap:i},u=TY(c);if(u==="runFullQueryAgain")return!0;if(u!=="doNothing")return o=!0,OY(u,n,l,r,i),!1});return a?{runFullQueryAgain:!0}:{runFullQueryAgain:!1,changed:o,newResults:r}}var YQ=function(){function e(){this._map=new Map}var t=e.prototype;return t.getByQuery=function(r){var i=r.toString();return As(this._map,i,()=>r)},e}();function QQ(){return new YQ}function SE(e,t){t.uncached=!0;var n=t.toString();e._map.delete(n)}function XQ(e){return e.refCount$.observers.length}var JQ=100,ZQ=30*1e3,eX=(e,t)=>(n,r)=>{if(!(r._map.size0)){if(a._lastEnsureEqual===0&&a._creationTimed._lastEnsureEqual-f._lastEnsureEqual),u=c.slice(0,l);u.forEach(d=>SE(r,d))}}},xj=eX(JQ,ZQ),P0=new WeakSet;function tX(e){P0.has(e)||(P0.add(e),SK().then(()=>kK(200)).then(()=>{e.destroyed||e.cacheReplacementPolicy(e,e._queryCache),P0.delete(e)}))}var Sj=function(){function e(n,r,i){this.cacheItemByDocId=new Map,this.registry=typeof FinalizationRegistry=="function"?new FinalizationRegistry(o=>{var s=o.docId,a=this.cacheItemByDocId.get(s);a&&(a[0].delete(o.revisionHeight),a[0].size===0&&this.cacheItemByDocId.delete(s))}):void 0,this.primaryPath=n,this.changes$=r,this.documentCreator=i,r.subscribe(o=>{var s=o.documentId,a=this.cacheItemByDocId.get(s);if(a){var l=nS(o);a[1]=l}})}var t=e.prototype;return t.getLatestDocumentData=function(r){var i=Ns(this.cacheItemByDocId,r);return i[1]},t.getLatestDocumentDataIfExists=function(r){var i=this.cacheItemByDocId.get(r);if(i)return i[1]},Vs(e,[{key:"getCachedRxDocuments",get:function(){var n=_E(this);return Rs(this,"getCachedRxDocuments",n)}},{key:"getCachedRxDocument",get:function(){var n=_E(this);return Rs(this,"getCachedRxDocument",r=>n([r])[0])}}])}();function _E(e){var t=e.primaryPath,n=e.cacheItemByDocId,r=e.registry,i=_n.deepFreezeWhenDevMode,o=e.documentCreator,s=a=>{for(var l=new Array(a.length),c=[],u=0;u0&&r&&SL().then(()=>{for(var w=0;wt._data))}},{key:"docsDataMap",get:function(){var t=new Map;return this.documents.forEach(n=>{t.set(n.primary,n._data)}),Rs(this,"docsDataMap",t)}},{key:"docsMap",get:function(){for(var t=new Map,n=this.documents,r=0;r{var d=this.collection._docCache.getLatestDocumentDataIfExists(u);if(d){if(!d._deleted){var f=this.collection._docCache.getCachedRxDocument(d);s.set(u,f)}}else a.push(u)}),a.length>0){var l=await this.collection.storageInstance.findDocumentsById(a,!1);l.forEach(u=>{var d=this.collection._docCache.getCachedRxDocument(u);s.set(d.primary,d)})}return s}var c=uX(this);return c.then(u=>(this._lastExecEnd=ur(),u))},t.exec=function(r){if(r&&this.op!=="findOne")throw ot("QU9",{collection:this.collection.name,query:this.mangoQuery,op:this.op});return kE(this).then(()=>$n(this.$)).then(i=>{if(!i&&r)throw ot("QU10",{collection:this.collection.name,query:this.mangoQuery,op:this.op});return i})},t.toString=function(){var r=Gm({op:this.op,query:this.mangoQuery,other:this.other},!0),i=JSON.stringify(r);return this.toString=()=>i,i},t.getPreparedQuery=function(){var r={rxQuery:this,mangoQuery:qm(this.collection.schema.jsonSchema,this.mangoQuery)};r.mangoQuery.selector._deleted={$eq:!1},r.mangoQuery.index&&r.mangoQuery.index.unshift("_deleted"),Zi("prePrepareQuery",r);var i=pS(this.collection.schema.jsonSchema,r.mangoQuery);return this.getPreparedQuery=()=>i,i},t.doesDocumentDataMatch=function(r){return r._deleted?!1:this.queryMatcher(r)},t.remove=function(){return this.exec().then(r=>Array.isArray(r)?Promise.all(r.map(i=>i.remove())):r.remove())},t.incrementalRemove=function(){return kd(this.asRxQuery,r=>r.incrementalRemove())},t.update=function(r){throw un("update")},t.patch=function(r){return kd(this.asRxQuery,i=>i.patch(r))},t.incrementalPatch=function(r){return kd(this.asRxQuery,i=>i.incrementalPatch(r))},t.modify=function(r){return kd(this.asRxQuery,i=>i.modify(r))},t.incrementalModify=function(r){return kd(this.asRxQuery,i=>i.incrementalModify(r))},t.where=function(r){throw un("query-builder")},t.sort=function(r){throw un("query-builder")},t.skip=function(r){throw un("query-builder")},t.limit=function(r){throw un("query-builder")},Vs(e,[{key:"$",get:function(){if(!this._$){var n=this.collection.$.pipe(Wt(r=>!r.isLocal),Hv(null),rs(()=>kE(this)),qt(()=>this._result),tS(qx),zf((r,i)=>!!(r&&r.time===bt(i).time)),Wt(r=>!!r),qt(r=>{var i=bt(r);return this.op==="count"?i.count:this.op==="findOne"?i.documents.length===0?null:i.documents[0]:this.op==="findByIds"?i.docsMap:i.documents.slice(0)}));this._$=Uq(n,this.refCount$.pipe(Wt(()=>!1)))}return this._$}},{key:"$$",get:function(){var n=this.collection.database.getReactivityFactory();return n.fromObservable(this.$,void 0,this.collection.database)}},{key:"queryMatcher",get:function(){var n=this.collection.schema.jsonSchema,r=qm(this.collection.schema.jsonSchema,this.mangoQuery);return Rs(this,"queryMatcher",fS(n,r))}},{key:"asRxQuery",get:function(){return this}}])}();function em(){return{selector:{}}}function lX(e){return e.collection._queryCache.getByQuery(e)}function jc(e,t,n,r){Zi("preCreateRxQuery",{op:e,queryObj:t,collection:n,other:r});var i=new Cj(e,t,n,r);return i=lX(i),tX(n),i}function kj(e){var t=e.asRxQuery.collection._changeEventBuffer.counter;return e._latestChangeEvent>=t}function kE(e){return e.collection.database.destroyed||kj(e)?wo:(e._ensureEqualQueue=e._ensureEqualQueue.then(()=>cX(e)),e._ensureEqualQueue)}function cX(e){if(e._lastEnsureEqual=ur(),e.collection.database.destroyed||kj(e))return wo;var t=!1,n=!1;if(e._latestChangeEvent===-1&&(n=!0),!n){var r=e.asRxQuery.collection._changeEventBuffer.getFrom(e._latestChangeEvent+1);if(r===null)n=!0;else{e._latestChangeEvent=e.asRxQuery.collection._changeEventBuffer.counter;var i=e.asRxQuery.collection._changeEventBuffer.reduceByLastOfDoc(r);if(e.op==="count"){var o=bt(e._result).count,s=o;i.forEach(l=>{var c=l.previousDocumentData&&e.doesDocumentDataMatch(l.previousDocumentData),u=e.doesDocumentDataMatch(l.documentData);!c&&u&&s++,c&&!u&&s--}),s!==o&&(t=!0,e._setResultData(s))}else{var a=qQ(e,i);a.runFullQueryAgain?n=!0:a.changed&&(t=!0,e._setResultData(a.newResults))}}}return n?e._execOverDatabase().then(l=>(e._latestChangeEvent=e.collection._changeEventBuffer.counter,typeof l=="number"?((!e._result||l!==e._result.count)&&(t=!0,e._setResultData(l)),t):((!e._result||!uK(e.collection.schema.primaryPath,l,e._result.docsData))&&(t=!0,e._setResultData(l)),t))):Promise.resolve(t)}function pS(e,t){if(!t.sort)throw ot("SNH",{query:t});var n=LY(e,t);return{query:t,queryPlan:n}}async function uX(e){var t=[],n=e.collection;if(e.isFindOneByIdQuery)if(Array.isArray(e.isFindOneByIdQuery)){var r=e.isFindOneByIdQuery;if(r=r.filter(u=>{var d=e.collection._docCache.getLatestDocumentDataIfExists(u);return d?(d._deleted||t.push(d),!1):!0}),r.length>0){var i=await n.storageInstance.findDocumentsById(r,!1);Ru(t,i)}}else{var o=e.isFindOneByIdQuery,s=e.collection._docCache.getLatestDocumentDataIfExists(o);if(!s){var a=await n.storageInstance.findDocumentsById([o],!1);a[0]&&(s=a[0])}s&&!s._deleted&&t.push(s)}else{var l=e.getPreparedQuery(),c=await n.storageInstance.query(l);t=c.documents}return t}function dX(e,t){if(!t.skip&&t.selector&&Object.keys(t.selector).length===1&&t.selector[e]){var n=t.selector[e];if(typeof n=="string")return n;if(Object.keys(n).length===1&&typeof n.$eq=="string"||Object.keys(n).length===1&&Array.isArray(n.$eq)&&!n.$eq.find(r=>typeof r!="string"))return n.$eq}return!1}var fX="_rxdb_internal";async function Qv(e,t){var n=await e.findDocumentsById([t],!1),r=n[0];if(r)return r}async function Xv(e,t,n){var r=await e.bulkWrite([t],n);if(r.error.length>0){var i=r.error[0];throw i}else{var o=r.success[0];return o}}function Wf(e){return Object.assign({},...e)}function Ym(e,t,n,r){if(r)throw r.status===409?ot("CONFLICT",{collection:e.name,id:t,writeError:r,data:n}):r.status===422?ot("VD2",{collection:e.name,id:t,writeError:r,data:n}):r}function pX(e,t,n,r,i,o,s){for(var a=!!e.schema.attachments,l=[],c=[],u=[],d=tc(10),f={id:d,events:[],checkpoint:null,context:i,startTime:ur(),endTime:0},m=f.events,p=[],g=[],E=[],b=n.size>0,w,y=r.length,_=function(){var T=r[R],C=T.document,I=T.previous,A=C[t],L=C._deleted,$=I&&I._deleted,F=void 0;b&&(F=n.get(A));var z;if(F){var Z=F._rev;if(!I||I&&Z!==I._rev){var pe={isError:!0,status:409,documentId:A,writeRow:T,documentInDb:F};return u.push(pe),1}var G=a?T0(T):T;a&&(L?I&&Object.keys(I._attachments).forEach(Te=>{g.push({documentId:A,attachmentId:Te,digest:bt(I)._attachments[Te].digest})}):(Object.entries(C._attachments).find(([Te,ke])=>{var Ve=I?I._attachments[Te]:void 0;return!Ve&&!ke.data&&(z={documentId:A,documentInDb:F,isError:!0,status:510,writeRow:T,attachmentId:Te}),!0}),z||Object.entries(C._attachments).forEach(([Te,ke])=>{var Ve=I?I._attachments[Te]:void 0;if(!Ve)p.push({documentId:A,attachmentId:Te,attachmentData:ke,digest:ke.digest});else{var Re=G.document._attachments[Te].digest;ke.data&&Ve.digest!==Re&&E.push({documentId:A,attachmentId:Te,attachmentData:ke,digest:ke.digest})}}))),z?u.push(z):(a?(c.push(T0(G)),s&&s(C)):(c.push(G),s&&s(C)),w=G);var V=null,le=null,Le=null;if($&&!L)Le="INSERT",V=a?Sa(C):C;else if(I&&!$&&!L)Le="UPDATE",V=a?Sa(C):C,le=I;else if(L)Le="DELETE",V=bt(C),le=I;else throw ot("SNH",{args:{writeRow:T}});var He={documentId:A,documentData:V,previousDocumentData:le,operation:Le};m.push(He)}else{var Y=!!L;if(a&&Object.entries(C._attachments).forEach(([Te,ke])=>{ke.data?p.push({documentId:A,attachmentId:Te,attachmentData:ke,digest:ke.digest}):(z={documentId:A,isError:!0,status:510,writeRow:T,attachmentId:Te},u.push(z))}),z||(a?(l.push(T0(T)),o&&o(C)):(l.push(T),o&&o(C)),w=T),!Y){var J={documentId:A,operation:"INSERT",documentData:a?Sa(C):C,previousDocumentData:a&&I?Sa(I):I};m.push(J)}}},R=0;R{t._attachments[n]=mX(r)}),t}function bp(e){return Object.assign({},e,{_meta:en(e._meta)})}function hS(e,t,n){_n.deepFreezeWhenDevMode(n);var r={originalStorageInstance:t,schema:t.schema,internals:t.internals,collectionName:t.collectionName,databaseName:t.databaseName,options:t.options,bulkWrite(i,o){for(var s=e.token,a=new Array(i.length),l=ur(),c=0;ct.bulkWrite(a,o)).then(m=>{var p={error:[],success:m.success.slice(0)},g=m.error.length===0?[]:m.error.filter(b=>b.status===409&&!b.writeRow.previous&&!b.writeRow.document._deleted&&bt(b.documentInDb)._deleted?!0:(p.error.push(b),!1));if(g.length>0){var E=g.map(b=>({previous:b.documentInDb,document:Object.assign({},b.writeRow.document,{_rev:$s(e.token,b.documentInDb)})}));return e.lockedRun(()=>t.bulkWrite(E,o)).then(b=>(Ru(p.error,b.error),Ru(p.success,b.success),p))}return m})},query(i){return e.lockedRun(()=>t.query(i))},count(i){return e.lockedRun(()=>t.count(i))},findDocumentsById(i,o){return e.lockedRun(()=>t.findDocumentsById(i,o))},getAttachmentData(i,o,s){return e.lockedRun(()=>t.getAttachmentData(i,o,s))},getChangedDocumentsSince:t.getChangedDocumentsSince?(i,o)=>e.lockedRun(()=>t.getChangedDocumentsSince(bt(i),o)):void 0,cleanup(i){return e.lockedRun(()=>t.cleanup(i))},remove(){return e.storageInstances.delete(r),e.lockedRun(()=>t.remove())},close(){return e.storageInstances.delete(r),e.lockedRun(()=>t.close())},changeStream(){return t.changeStream()},conflictResultionTasks(){return t.conflictResultionTasks()},resolveConflictResultionTask(i){if(i.output.isEqual)return t.resolveConflictResultionTask(i);var o=Object.assign({},i.output.documentData,{_meta:Wu(),_rev:To(),_attachments:{}}),s=en(o);return delete s._meta,delete s._rev,delete s._attachments,t.resolveConflictResultionTask({id:i.id,output:{isEqual:!1,documentData:s}})}};return e.storageInstances.add(r),r}function gX(e){if(e.schema.keyCompression)throw ot("UT5",{args:{params:e}});if(Ej(e.schema))throw ot("UT6",{args:{params:e}});if(e.schema.attachments&&e.schema.attachments.compression)throw ot("UT7",{args:{params:e}})}function Ej(e){return!!(e.encrypted&&e.encrypted.length>0||e.attachments&&e.attachments.encrypted)}function vX(e,t,n){var r=jo(e.schema.primaryKey),i=n?n.lwt:Kx,o=n?n.id:"";return qm(e.schema,{selector:{$or:[{"_meta.lwt":{$gt:i}},{"_meta.lwt":{$eq:i},[r]:{$gt:n?o:""}}],"_meta.lwt":{$gte:i}},sort:[{"_meta.lwt":"asc"},{[r]:"asc"}],skip:0,limit:t})}async function Rj(e,t,n){if(e.getChangedDocumentsSince)return e.getChangedDocumentsSince(t,n);var r=jo(e.schema.primaryKey),i=pS(e.schema,vX(e,t,n)),o=await e.query(i),s=o.documents,a=iK(s);return{documents:s,checkpoint:a?{id:a[r],lwt:a._meta.lwt}:n||{id:"",lwt:0}}}var Pj=function(){function e(n,r,i,o){this.queueByDocId=new Map,this.isRunning=!1,this.storageInstance=n,this.primaryPath=r,this.preWrite=i,this.postWrite=o}var t=e.prototype;return t.addWrite=function(r,i){var o=r[this.primaryPath],s=As(this.queueByDocId,o,()=>[]),a=new Promise((l,c)=>{var u={lastKnownDocumentState:r,modifier:i,resolve:l,reject:c};bt(s).push(u),this.triggerRun()});return a},t.triggerRun=async function(){if(!(this.isRunning===!0||this.queueByDocId.size===0)){this.isRunning=!0;var r=[],i=this.queueByDocId;this.queueByDocId=new Map,await Promise.all(Array.from(i.entries()).map(async([s,a])=>{var l=yX(a.map(d=>d.lastKnownDocumentState)),c=l;for(var u of a)try{c=await u.modifier(Ji(c))}catch(d){u.reject(d),u.reject=()=>{},u.resolve=()=>{}}try{await this.preWrite(c,l)}catch(d){a.forEach(f=>f.reject(d));return}r.push({previous:l,document:c})}));var o=r.length>0?await this.storageInstance.bulkWrite(r,"incremental-write"):{error:[],success:[]};return await Promise.all(o.success.map(s=>{var a=s[this.primaryPath];this.postWrite(s);var l=Ns(i,a);l.forEach(c=>c.resolve(s))})),o.error.forEach(s=>{var a=s.documentId,l=Ns(i,a),c=Uv(s);if(c){var u=As(this.queueByDocId,a,()=>[]);l.reverse().forEach(f=>{f.lastKnownDocumentState=bt(c.documentInDb),bt(u).unshift(f)})}else{var d=AK(s);l.forEach(f=>f.reject(d))}}),this.isRunning=!1,this.triggerRun()}},e}();function EE(e){var t=async n=>{var r=cK(n);r._deleted=n._deleted;var i=await e(r),o=Object.assign({},i,{_meta:n._meta,_attachments:n._attachments,_rev:n._rev,_deleted:typeof i._deleted<"u"?i._deleted:n._deleted});return typeof o._deleted>"u"&&(o._deleted=!1),o};return t}function yX(e){var t=e[0],n=Da(t._rev);return e.forEach(r=>{var i=Da(r._rev);i>n&&(t=r,n=i)}),t}var Jv={get primaryPath(){var e=this;if(e.isInstanceOfRxDocument)return e.collection.schema.primaryPath},get primary(){var e=this;if(e.isInstanceOfRxDocument)return e._data[e.primaryPath]},get revision(){var e=this;if(e.isInstanceOfRxDocument)return e._data._rev},get deleted$(){var e=this;if(e.isInstanceOfRxDocument)return e.$.pipe(qt(t=>t._data._deleted))},get deleted$$(){var e=this,t=e.collection.database.getReactivityFactory();return t.fromObservable(e.deleted$,e.getLatest().deleted,e.collection.database)},get deleted(){var e=this;if(e.isInstanceOfRxDocument)return e._data._deleted},getLatest(){var e=this.collection._docCache.getLatestDocumentData(this.primary);return this.collection._docCache.getCachedRxDocument(e)},get $(){var e=this;return e.collection.$.pipe(Wt(t=>!t.isLocal),Wt(t=>t.documentId===this.primary),qt(t=>nS(t)),Hv(e.collection._docCache.getLatestDocumentData(this.primary)),zf((t,n)=>t._rev===n._rev),qt(t=>this.collection._docCache.getCachedRxDocument(t)),tS(qx))},get $$(){var e=this,t=e.collection.database.getReactivityFactory();return t.fromObservable(e.$,e.getLatest()._data,e.collection.database)},get$(e){if(_n.isDevMode()){if(e.includes(".item."))throw ot("DOC1",{path:e});if(e===this.primaryPath)throw ot("DOC2");if(this.collection.schema.finalFields.includes(e))throw ot("DOC3",{path:e});var t=Pu(this.collection.schema.jsonSchema,e);if(!t)throw ot("DOC4",{path:e})}return this.$.pipe(qt(n=>Ba(n,e)),zf())},get$$(e){var t=this.get$(e),n=this.collection.database.getReactivityFactory();return n.fromObservable(t,this.getLatest().get(e),this.collection.database)},populate(e){var t=Pu(this.collection.schema.jsonSchema,e),n=this.get(e);if(!n)return CK;if(!t)throw ot("DOC5",{path:e});if(!t.ref)throw ot("DOC6",{path:e,schemaObj:t});var r=this.collection.database.collections[t.ref];if(!r)throw ot("DOC7",{ref:t.ref,path:e,schemaObj:t});return t.type==="array"?r.findByIds(n).exec().then(i=>{var o=i.values();return Array.from(o)}):r.findOne(n).exec()},get(e){return As(this._propertyCache,e,()=>{var t=Ba(this._data,e);if(typeof t!="object"||t===null||Array.isArray(t))return _n.deepFreezeWhenDevMode(t);var n=this,r=new Proxy(en(t),{get(i,o){if(typeof o!="string")return i[o];var s=o.charAt(o.length-1);if(o.endsWith("$$")){var a=o.slice(0,-2);return n.get$$(Nd(e+"."+a))}else if(s==="$"){var l=o.slice(0,-1);return n.get$(Nd(e+"."+l))}else if(s==="_"){var c=o.slice(0,-1);return n.populate(Nd(e+"."+c))}else return n.get(Nd(e+"."+o))}});return r})},toJSON(e=!1){if(e)return _n.deepFreezeWhenDevMode(this._data);var t=en(this._data);return delete t._rev,delete t._attachments,delete t._deleted,delete t._meta,_n.deepFreezeWhenDevMode(t)},toMutableJSON(e=!1){return Ji(this.toJSON(e))},update(e){throw un("update")},incrementalUpdate(e){throw un("update")},updateCRDT(e){throw un("crdt")},putAttachment(){throw un("attachments")},getAttachment(){throw un("attachments")},allAttachments(){throw un("attachments")},get allAttachments$(){throw un("attachments")},async modify(e,t){var n=this._data,r=await EE(e)(n);return this._saveData(r,n)},incrementalModify(e,t){return this.collection.incrementalWriteQueue.addWrite(this._data,EE(e)).then(n=>this.collection._docCache.getCachedRxDocument(n))},patch(e){var t=this._data,n=Ji(t);return Object.entries(e).forEach(([r,i])=>{n[r]=i}),this._saveData(n,t)},incrementalPatch(e){return this.incrementalModify(t=>(Object.entries(e).forEach(([n,r])=>{t[n]=r}),t))},async _saveData(e,t){if(e=en(e),this._data._deleted)throw ot("DOC11",{id:this.primary,document:this});await Oj(this.collection,e,t);var n=await this.collection.storageInstance.bulkWrite([{previous:t,document:e}],"rx-document-save-data"),r=n.error[0];return Ym(this.collection,this.primary,e,r),await this.collection._runHooks("post","save",e,this),this.collection._docCache.getCachedRxDocument(n.success[0])},remove(){var e=this.collection;if(this.deleted)return Promise.reject(ot("DOC13",{document:this,id:this.primary}));var t=en(this._data),n;return e._runHooks("pre","remove",t,this).then(async()=>{t._deleted=!0;var r=await e.storageInstance.bulkWrite([{previous:this._data,document:t}],"rx-document-remove"),i=r.error[0];return Ym(e,this.primary,t,i),r.success[0]}).then(r=>(n=r,this.collection._runHooks("post","remove",t,this))).then(()=>this.collection._docCache.getCachedRxDocument(n))},incrementalRemove(){return this.incrementalModify(async e=>(await this.collection._runHooks("pre","remove",e,this),e._deleted=!0,e)).then(async e=>(await this.collection._runHooks("post","remove",e._data,e),e))},destroy(){throw ot("DOC14")}};function Tj(e=Jv){var t=function(r,i){this.collection=r,this._data=i,this._propertyCache=new Map,this.isInstanceOfRxDocument=!0};return t.prototype=e,t}function bX(e,t,n){var r=new e(t,n);return Zi("createRxDocument",r),r}function Oj(e,t,n){return t._meta=Object.assign({},n._meta,t._meta),_n.isDevMode()&&e.schema.validateChange(n,t),e._runHooks("pre","save",t,n)}var Pl="collection",mS="storage-token",wX="rx-migration-status",xX="RxInternalDocument",gS=Wv({version:0,title:xX,primaryKey:{key:"id",fields:["context","key"],separator:"|"},type:"object",properties:{id:{type:"string",maxLength:200},key:{type:"string"},context:{type:"string",enum:[Pl,mS,wX,"OTHER"]},data:{type:"object",additionalProperties:!0}},indexes:[],required:["key","context","data"],additionalProperties:!1,sharding:{shards:1,mode:"collection"}});function Gf(e,t){return Ya(gS,{key:e,context:t})}async function Lj(e){var t=pS(e.schema,{selector:{context:Pl,_deleted:{$eq:!1}},sort:[{id:"asc"}],skip:0}),n=await e.query(t),r=n.documents;return r}var jj="storageToken",SX=Gf(jj,mS);async function _X(e){var t=tc(10),n=e.password?await e.hashFunction(JSON.stringify(e.password)):void 0,r={id:SX,context:mS,key:jj,data:{rxdbVersion:e.rxdbVersion,token:t,instanceToken:e.token,passwordHash:n},_deleted:!1,_meta:Wu(),_rev:To(),_attachments:{}},i=await e.internalStore.bulkWrite([{document:r}],"internal-add-storage-token");if(i.success[0])return i.success[0];var o=bt(i.error[0]);if(o.isError&&Uv(o)){var s=o;if(!CX(s.documentInDb.data.rxdbVersion,e.rxdbVersion))throw ot("DM5",{args:{database:e.name,databaseStateVersion:s.documentInDb.data.rxdbVersion,codeVersion:e.rxdbVersion}});if(n&&n!==s.documentInDb.data.passwordHash)throw ot("DB1",{passwordHash:n,existingPasswordHash:s.documentInDb.data.passwordHash});var a=s.documentInDb;return bt(a)}throw o}function CX(e,t){if(!e||t.includes("beta")&&t!==e)return!1;var n=e.split(".")[0],r=t.split(".")[0];return n===r}async function kX(e,t,n){if(e.schema.version!==n.version)throw ot("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=Qm(e.name,e.schema.jsonSchema),i=Gf(r,Pl);;){var o=await Qv(e.database.internalStore,i),s=Ji(bt(o)),a=s.data.connectedStorages.find(l=>l.collectionName===t&&l.schema.version===n.version);if(a)return;s.data.connectedStorages.push({collectionName:t,schema:n});try{await Xv(e.database.internalStore,{previous:bt(o),document:s},"add-connected-storage-to-collection")}catch(l){if(!Uv(l))throw l}}}async function EX(e,t,n){if(e.schema.version!==n.version)throw ot("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=Qm(e.name,e.schema.jsonSchema),i=Gf(r,Pl);;){var o=await Qv(e.database.internalStore,i),s=Ji(bt(o)),a=s.data.connectedStorages.find(l=>l.collectionName===t&&l.schema.version===n.version);if(!a)return;s.data.connectedStorages=s.data.connectedStorages.filter(l=>l.collectionName!==t);try{await Xv(e.database.internalStore,{previous:bt(o),document:s},"remove-connected-storage-from-collection")}catch(l){if(!Uv(l))throw l}}}function Qm(e,t){return e+"-"+t.version}function bh(e,t){return t=en(t),t=WK(e,t),t=DK(e.primaryPath,e.jsonSchema,t),t._meta=Wu(),Object.prototype.hasOwnProperty.call(t,"_deleted")||(t._deleted=!1),Object.prototype.hasOwnProperty.call(t,"_attachments")||(t._attachments={}),Object.prototype.hasOwnProperty.call(t,"_rev")||(t._rev=To()),t}async function RX(e,t){t.multiInstance=e.multiInstance;var n=await e.storage.createStorageInstance(t);return n}async function Ij(e,t,n,r,i,o,s){var a=await Lj(t),l=a.filter(f=>f.data.name===i),c=[];l.forEach(f=>{c.push({collectionName:f.data.name,schema:f.data.schema,isCollection:!0}),f.data.connectedStorages.forEach(m=>c.push({collectionName:m.collectionName,isCollection:!1,schema:m.schema}))});var u=new Set;if(c=c.filter(f=>{var m=f.collectionName+"||"+f.schema.version;return u.has(m)?!1:(u.add(m),!0)}),await Promise.all(c.map(async f=>{var m=await e.createStorageInstance({collectionName:f.collectionName,databaseInstanceToken:n,databaseName:r,multiInstance:!1,options:{},schema:f.schema,password:o,devMode:_n.isDevMode()});await m.remove(),f.isCollection&&await Ul("postRemoveRxCollection",{storage:e,databaseName:r,collectionName:i})})),s){var d=l.map(f=>{var m=bp(f);return m._deleted=!0,m._meta.lwt=ur(),m._rev=$s(n,f),{previous:f,document:m}});await t.bulkWrite(d,"rx-database-remove-collection-all")}}function Mi(e){if(e.destroyed)throw ot("COL21",{collection:e.name,version:e.schema.version})}var PX=function(){function e(n){this.subs=[],this.limit=100,this.counter=0,this.eventCounterMap=new WeakMap,this.buffer=[],this.collection=n,this.subs.push(this.collection.$.pipe(Wt(r=>!r.isLocal)).subscribe(r=>this._handleChangeEvent(r)))}var t=e.prototype;return t._handleChangeEvent=function(r){for(this.counter++,this.buffer.push(r),this.eventCounterMap.set(r,this.counter);this.buffer.length>this.limit;)this.buffer.shift()},t.getArrayIndexByPointer=function(r){var i=this.buffer[0],o=this.eventCounterMap.get(i);if(ri(s))},t.reduceByLastOfDoc=function(r){return r.slice(0)},t.destroy=function(){this.subs.forEach(r=>r.unsubscribe())},e}();function TX(e){return new PX(e)}var OX=new WeakMap;function LX(e){var t=e.schema.getDocumentPrototype(),n=MX(e),r=Jv,i={};return[t,n,r].forEach(o=>{var s=Object.getOwnPropertyNames(o);s.forEach(a=>{var l=Object.getOwnPropertyDescriptor(o,a),c=!0;(a.startsWith("_")||a.endsWith("_")||a.startsWith("$")||a.endsWith("$"))&&(c=!1),typeof l.value=="function"?Object.defineProperty(i,a,{get(){return l.value.bind(this)},enumerable:c,configurable:!1}):(l.enumerable=c,l.configurable=!1,l.writable&&(l.writable=!1),Object.defineProperty(i,a,l))})}),i}function jX(e){return As(OX,e,()=>Tj(LX(e)))}function IX(e,t,n){var r=bX(t,e,_n.deepFreezeWhenDevMode(n));return e._runHooksSync("post","create",n,r),Zi("postCreateRxDocument",r),r}function MX(e){var t={};return Object.entries(e.methods).forEach(([n,r])=>{t[n]=r}),t}async function Xm(e,t){var n=Ya(e.input.metaInstance.schema,{isCheckpoint:"1",itemId:t}),r=await e.input.metaInstance.findDocumentsById([n],!1),i=r[0];if(e.lastCheckpointDoc[t]=i,i)return i.checkpointData}async function Jm(e,t,n){e.checkpointQueue=e.checkpointQueue.then(async()=>{var r=e.lastCheckpointDoc[t];if(n&&!e.events.canceled.getValue()&&(!r||JSON.stringify(r.checkpointData)!==JSON.stringify(n))){var i={id:"",isCheckpoint:"1",itemId:t,_deleted:!1,_attachments:{},checkpointData:n,_meta:Wu(),_rev:To()};for(i.id=Ya(e.input.metaInstance.schema,i);!e.events.canceled.getValue();){if(r&&(i.checkpointData=Wf([r.checkpointData,i.checkpointData])),i._meta.lwt=ur(),i._rev=$s(await e.checkpointKey,r),e.events.canceled.getValue())return;var o=await e.input.metaInstance.bulkWrite([{previous:r,document:i}],"replication-set-checkpoint"),s=o.success[0];if(s){e.lastCheckpointDoc[t]=s;return}else{var a=o.error[0];if(a.status!==409)throw a;r=bt(a.documentInDb),i._rev=$s(await e.checkpointKey,r)}}}}),await e.checkpointQueue}async function $X(e){var t=await e.hashFunction([e.identifier,e.forkInstance.databaseName,e.forkInstance.collectionName].join("||"));return"rx_storage_replication_"+t}function RE(e,t,n,r,i){var o=Object.assign({},r,{_attachments:t&&r._attachments?r._attachments:{},_meta:n?r._meta:Object.assign({},i?i._meta:{},{lwt:ur()}),_rev:n?r._rev:To()});return o._rev||(o._rev=$s(e,i)),o}function pa(e,t,n){var r=en(e);return t||delete r._attachments,n||(delete r._meta,delete r._rev),r}function T1(e,t){return e.hasAttachments?t.map(n=>{var r=Ji(n.document);return r.docData=Sa(r.docData),{document:r,previous:n.previous}}):t}function O1(e){for(;;)if(e.underlyingPersistentStorage)e=e.underlyingPersistentStorage;else return e}var NX="RxReplicationProtocolMetaData";function AX(e,t){var n=BK(e),r={title:NX,primaryKey:{key:"id",fields:["itemId","isCheckpoint"],separator:"|"},type:"object",version:e.version,additionalProperties:!1,properties:{id:{type:"string",minLength:1,maxLength:n+2},isCheckpoint:{type:"string",enum:["0","1"],minLength:1,maxLength:1},itemId:{type:"string",maxLength:n>4?n:4},checkpointData:{type:"object",additionalProperties:!0},docData:{type:"object",properties:e.properties},isResolvedConflict:{type:"string"}},keyCompression:e.keyCompression,required:["id","isCheckpoint","itemId"]};t&&(r.encrypted=["docData"]);var i=Wv(r);return i}function Mj(e,t){return e.input.metaInstance.findDocumentsById(t.map(n=>{var r=Ya(e.input.metaInstance.schema,{itemId:n,isCheckpoint:"0"});return r}),!0).then(n=>{var r={};return Object.values(n).forEach(i=>{r[i.itemId]={docData:i.docData,metaDocument:i}}),r})}async function Zm(e,t,n,r){var i=t[e.primaryPath],o=n?bp(n):{id:"",isCheckpoint:"0",itemId:i,docData:t,_attachments:{},_deleted:!1,_rev:To(),_meta:{lwt:0}};o.docData=t,r&&(o.isResolvedConflict=r),o._meta.lwt=ur(),o.id=Ya(e.input.metaInstance.schema,o),o._rev=$s(await e.checkpointKey,n);var s={previous:n,document:o};return s}async function DX(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.downstream){var t=await Xm(e,"down");t||await Jm(e,"down",e.input.initialCheckpoint.downstream)}var n=await e.input.hashFunction(e.input.identifier),r=e.input.replicationHandler,i=0,o=[];function s(p){e.stats.down.addNewTask=e.stats.down.addNewTask+1;var g={time:i++,task:p};o.push(g),e.streamQueue.down=e.streamQueue.down.then(()=>{for(var E=[];o.length>0;){e.events.active.down.next(!0);var b=bt(o.shift());if(!(b.time{e.events.active.down.next(!1),!e.firstSyncDone.down.getValue()&&!e.events.canceled.getValue()&&e.firstSyncDone.down.next(!0)})}if(s("RESYNC"),!e.events.canceled.getValue()){var a=r.masterChangeStream$.pipe(rs(async p=>(await $n(e.events.active.up.pipe(Wt(g=>!g))),p))).subscribe(p=>{e.stats.down.masterChangeStreamEmit=e.stats.down.masterChangeStreamEmit+1,s(p)});$n(e.events.canceled.pipe(Wt(p=>!!p))).then(()=>a.unsubscribe())}var l=-1;async function c(){if(e.stats.down.downstreamResyncOnce=e.stats.down.downstreamResyncOnce+1,!e.events.canceled.getValue()){e.checkpointQueue=e.checkpointQueue.then(()=>Xm(e,"down"));for(var p=await e.checkpointQueue,g=[];!e.events.canceled.getValue();){l=i++;var E=await r.masterChangesSince(p,e.input.pullBatchSize);if(E.documents.length===0||(p=Wf([p,E.checkpoint]),g.push(m(E.documents,p)),E.documents.length{if(b==="RESYNC")throw new Error("SNH");Ru(g,b.documents),E=Wf([E,b.checkpoint])}),m(g,bt(E))}var d=yi,f={docs:{}};function m(p,g){var E=e.primaryPath;return e.stats.down.persistFromMaster=e.stats.down.persistFromMaster+1,p.forEach(b=>{var w=b[E];f.docs[w]=b}),f.checkpoint=g,d=d.then(()=>{var b=f.docs;f.docs={};var w=f.checkpoint,y=Object.keys(b);if(e.events.canceled.getValue()||y.length===0)return yi;var _=[],R={},T={},C=[];return Promise.all([e.input.forkInstance.findDocumentsById(y,!0),Mj(e,y)]).then(([I,A])=>{var L=new Map;return I.forEach($=>L.set($[E],$)),Promise.all(y.map(async $=>{var F=L.get($),z=F?pa(F,e.hasAttachments,!1):void 0,Y=b[$],J=A[$];J&&F&&J.metaDocument.isResolvedConflict===F._rev&&await e.streamQueue.up;var Z=!J||!z?!1:await e.input.conflictHandler({realMasterState:J.docData,newDocumentState:z},"downstream-check-if-equal-0").then(Le=>Le.isEqual);if(!Z&&J&&J.docData._rev&&F&&F._meta[e.input.identifier]&&Da(F._rev)===F._meta[e.input.identifier]&&(Z=!0),F&&J&&Z===!1||F&&!J)return yi;var pe=z?await e.input.conflictHandler({realMasterState:Y,newDocumentState:z},"downstream-check-if-equal-1").then(Le=>Le.isEqual):!1;if(z&&pe)return(!J||Z===!1)&&C.push(await Zm(e,z,J?J.metaDocument:void 0)),yi;var G=Object.assign({},Y,F?{_meta:en(F._meta),_attachments:e.hasAttachments&&Y._attachments?Y._attachments:{},_rev:To()}:{_meta:{lwt:ur()},_rev:To(),_attachments:e.hasAttachments&&Y._attachments?Y._attachments:{}});if(Y._rev){var V=F?Da(F._rev)+1:1;G._meta[e.input.identifier]=V,e.input.keepMeta&&(G._rev=Y._rev)}e.input.keepMeta&&Y._meta&&(G._meta=Y._meta);var le={previous:F,document:G};le.document._rev=le.document._rev?le.document._rev:$s(n,le.previous),_.push(le),R[$]=le,T[$]=await Zm(e,Y,J?J.metaDocument:void 0)}))}).then(async()=>{if(_.length>0)return e.input.forkInstance.bulkWrite(_,await e.downstreamBulkWriteFlag).then(I=>{I.success.forEach(A=>{var L=A[E];e.events.processed.down.next(R[L]),C.push(T[L])}),I.error.forEach(A=>{A.status!==409&&e.events.error.next(ot("RC_PULL",{writeError:A}))})})}).then(()=>{if(C.length>0)return e.input.metaInstance.bulkWrite(T1(e,C),"replication-down-write-meta").then(I=>{I.error.forEach(A=>{e.events.error.next(ot("RC_PULL",{id:A.documentId,writeError:A}))})})}).then(()=>{Jm(e,"down",w)})}).catch(b=>e.events.error.next(b)),d}}var $j=function(e,t){var n=Sa(e.newDocumentState),r=Sa(e.realMasterState);return Hm(n,r)?Promise.resolve({isEqual:!0}):Promise.resolve({isEqual:!1,documentData:e.realMasterState})};async function BX(e,t,n){var r=e.input.conflictHandler,i=await r(t,"replication-resolve-conflict");if(!i.isEqual){var o=Object.assign({},i.documentData,{_meta:en(n._meta),_rev:To(),_attachments:en(n._attachments)});return o._meta.lwt=ur(),o._rev=$s(await e.checkpointKey,n),{resolvedDoc:o,output:i}}}async function L1(e,t,n,r){if(!n._attachments||r&&!r._attachments)throw new Error("_attachments missing");var i=n[e],o=new Set(r&&r._attachments?Object.keys(r._attachments):[]);return await Promise.all(Object.entries(n._attachments).map(async([s,a])=>{if((!o.has(s)||r&&bt(r._attachments)[s].digest!==a.digest)&&!a.data){var l=await t.getAttachmentData(i,s,a.digest);a.data=l}})),n}async function FX(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.upstream){var t=await Xm(e,"up");t||await Jm(e,"up",e.input.initialCheckpoint.upstream)}var n=e.input.replicationHandler;e.streamQueue.up=e.streamQueue.up.then(()=>c().then(()=>{u()}));var r=0,i=-1,o=[],s=wo,a={docs:{}},l=e.input.forkInstance.changeStream().subscribe(async f=>{if(f.context!==await e.downstreamBulkWriteFlag)return e.stats.up.forkChangeStreamEmit=e.stats.up.forkChangeStreamEmit+1,o.push({task:f,time:r++}),e.events.active.up.getValue()||e.events.active.up.next(!0),e.input.waitBeforePersist?e.input.waitBeforePersist().then(()=>u()):u()});$n(e.events.canceled.pipe(Wt(f=>!!f))).then(()=>l.unsubscribe());async function c(){if(e.stats.up.upstreamInitialSync=e.stats.up.upstreamInitialSync+1,!e.events.canceled.getValue()){e.checkpointQueue=e.checkpointQueue.then(()=>Xm(e,"up"));for(var f=await e.checkpointQueue,m=new Set,p=async function(){i=r++,m.size>3&&await Promise.race(Array.from(m));var b=await Rj(e.input.forkInstance,e.input.pushBatchSize,f);if(b.documents.length===0)return 1;f=Wf([f,b.checkpoint]);var w=d(b.documents,bt(f));m.add(w),w.catch().then(()=>m.delete(w))};!e.events.canceled.getValue()&&!await p(););var g=await Promise.all(m),E=g.find(b=>!!b);E?await c():!e.firstSyncDone.up.getValue()&&!e.events.canceled.getValue()&&e.firstSyncDone.up.next(!0)}}function u(){if(e.events.canceled.getValue()||o.length===0){e.events.active.up.next(!1);return}e.stats.up.processTasks=e.stats.up.processTasks+1,e.events.active.up.next(!0),e.streamQueue.up=e.streamQueue.up.then(()=>{for(var f=[],m={};o.length>0;){var p=bt(o.shift());p.timeE.documentData)),m=Wf([m,p.task.checkpoint]))}var g=f.length===0?wo:d(f,m);return g.then(()=>{o.length===0?e.events.active.up.next(!1):u()})})}function d(f,m){return e.stats.up.persistToMaster=e.stats.up.persistToMaster+1,f.forEach(p=>{var g=p[e.primaryPath];a.docs[g]=p}),a.checkpoint=m,s=s.then(async()=>{if(e.events.canceled.getValue())return!1;var p=a.docs;a.docs={};var g=a.checkpoint,E=Object.keys(p);if(E.length===0)return!1;var b=await Mj(e,E),w={},y=[],_={},R={};if(await Promise.all(E.map(async Z=>{var pe=p[Z];R[Z]=pe;var G=pa(pe,e.hasAttachments,!!e.input.keepMeta),V=b[Z];V&&V.metaDocument.isResolvedConflict!==pe._rev&&(await e.input.conflictHandler({realMasterState:V.docData,newDocumentState:G},"upstream-check-if-equal")).isEqual||V&&V.docData._rev&&Da(pe._rev)===pe._meta[e.input.identifier]||(y.push(Z),w[Z]={assumedMasterState:V?V.docData:void 0,newDocumentState:G},_[Z]=await Zm(e,G,V?V.metaDocument:void 0))})),y.length===0)return!1;var T=Object.values(w),C=new Set,I={},A=oK(T,e.input.pushBatchSize);await Promise.all(A.map(async Z=>{e.hasAttachments&&await Promise.all(Z.map(async G=>{G.newDocumentState=await L1(e.primaryPath,e.input.forkInstance,Ji(G.newDocumentState),G.assumedMasterState)}));var pe=await n.masterWrite(Z);pe.forEach(G=>{var V=G[e.primaryPath];C.add(V),I[V]=G})}));var L=[];if(y.forEach(Z=>{C.has(Z)||(e.events.processed.up.next(w[Z]),L.push(_[Z]))}),e.events.canceled.getValue())return!1;L.length>0&&await e.input.metaInstance.bulkWrite(T1(e,L),"replication-up-write-meta");var $=!1;if(C.size>0){e.stats.up.persistToMasterHadConflicts=e.stats.up.persistToMasterHadConflicts+1;var F=[],z={};if(await Promise.all(Object.entries(I).map(([Z,pe])=>{var G=w[Z],V={newDocumentState:G.newDocumentState,assumedMasterState:G.assumedMasterState,realMasterState:pe};return BX(e,V,R[Z]).then(async le=>{if(le){e.events.resolvedConflicts.next({input:V,output:le.output}),F.push({previous:R[Z],document:le.resolvedDoc});var Le=b[Z];z[Z]=await Zm(e,bt(pe),Le?Le.metaDocument:void 0,le.resolvedDoc._rev)}})})),F.length>0){$=!0,e.stats.up.persistToMasterConflictWrites=e.stats.up.persistToMasterConflictWrites+1;var Y=await e.input.forkInstance.bulkWrite(F,"replication-up-write-conflict"),J=[];Y.success.forEach(Z=>{var pe=Z[e.primaryPath];J.push(z[pe])}),J.length>0&&await e.input.metaInstance.bulkWrite(T1(e,J),"replication-up-write-conflict-meta")}}return Jm(e,"up",g),$}).catch(p=>(e.events.error.next(p),!1)),s}}function zX(e){e=en(e),e.forkInstance=O1(e.forkInstance),e.metaInstance=O1(e.metaInstance);var t=$X(e),n={primaryPath:jo(e.forkInstance.schema.primaryKey),hasAttachments:!!e.forkInstance.schema.attachments,input:e,checkpointKey:t,downstreamBulkWriteFlag:t.then(r=>"replication-downstream-"+r),events:{canceled:new bs(!1),active:{down:new bs(!0),up:new bs(!0)},processed:{down:new Ln,up:new Ln},resolvedConflicts:new Ln,error:new Ln},stats:{down:{addNewTask:0,downstreamProcessChanges:0,downstreamResyncOnce:0,masterChangeStreamEmit:0,persistFromMaster:0},up:{forkChangeStreamEmit:0,persistToMaster:0,persistToMasterConflictWrites:0,persistToMasterHadConflicts:0,processTasks:0,upstreamInitialSync:0}},firstSyncDone:{down:new bs(!1),up:new bs(!1)},streamQueue:{down:yi,up:yi},checkpointQueue:yi,lastCheckpointDoc:{}};return DX(n),FX(n),n}function O0(e){return $n(tj([e.firstSyncDone.down.pipe(Wt(t=>!!t)),e.firstSyncDone.up.pipe(Wt(t=>!!t))])).then(()=>{})}function PE(e){return Promise.all([e.streamQueue.up,e.streamQueue.down,e.checkpointQueue])}function UX(e,t,n,r=!1){e=O1(e);var i=!!e.schema.attachments,o=jo(e.schema.primaryKey),s={masterChangeStream$:e.changeStream().pipe(rs(async a=>{var l={checkpoint:a.checkpoint,documents:await Promise.all(a.events.map(async c=>{var u=pa(c.documentData,i,r);return i&&(u=await L1(o,e,Ji(u),void 0)),u}))};return l})),masterChangesSince(a,l){return Rj(e,l,a).then(async c=>({checkpoint:c.documents.length>0?c.checkpoint:a,documents:await Promise.all(c.documents.map(async u=>{var d=pa(u,i,r);return i&&(d=await L1(o,e,Ji(d),void 0)),d}))}))},async masterWrite(a){var l={};a.forEach(g=>{var E=g.newDocumentState[o];l[E]=g});var c=Object.keys(l),u=await e.findDocumentsById(c,!0),d=new Map;u.forEach(g=>d.set(g[o],g));var f=[],m=[];if(await Promise.all(Object.entries(l).map(async([g,E])=>{var b=d.get(g);b?b&&!E.assumedMasterState?f.push(pa(b,i,r)):(await t({realMasterState:pa(b,i,r),newDocumentState:bt(E.assumedMasterState)},"rxStorageInstanceToReplicationHandler-masterWrite")).isEqual===!0?m.push({previous:b,document:RE(n,i,r,E.newDocumentState,b)}):f.push(pa(b,i,r)):m.push({document:RE(n,i,r,E.newDocumentState)})})),m.length>0){var p=await e.bulkWrite(m,"replication-master-write");p.error.forEach(g=>{if(g.status!==409)throw new Error("non conflict error");f.push(pa(bt(g.documentInDb),i,r))})}return f}};return s}async function WX(e){e.events.canceled.next(!0),e.events.active.up.complete(),e.events.active.down.complete(),e.events.processed.up.complete(),e.events.processed.down.complete(),e.events.resolvedConflicts.complete(),e.events.canceled.complete(),await e.checkpointQueue}var Nj=["pre","post"],Aj=["insert","save","remove","create"],TE=!1,Dj=function(){function e(n,r,i,o,s={},a={},l={},c={},u={},d=xj,f={},m=$j){this.storageInstance={},this.timeouts=new Set,this.incrementalWriteQueue={},this._incrementalUpsertQueues=new Map,this.synced=!1,this.hooks={},this._subs=[],this._docCache={},this._queryCache=QQ(),this.$={},this.checkpoint$={},this._changeEventBuffer={},this.onDestroy=[],this.destroyed=!1,this.onRemove=[],this.database=n,this.name=r,this.schema=i,this.internalStorageInstance=o,this.instanceCreationOptions=s,this.migrationStrategies=a,this.methods=l,this.attachments=c,this.options=u,this.cacheReplacementPolicy=d,this.statics=f,this.conflictHandler=m,GX(this.asRxCollection)}var t=e.prototype;return t.prepare=async function(){this.storageInstance=hS(this.database,this.internalStorageInstance,this.schema.jsonSchema),this.incrementalWriteQueue=new Pj(this.storageInstance,this.schema.primaryPath,(l,c)=>Oj(this,l,c),l=>this._runHooks("post","save",l));var r=this.database.eventBulks$.pipe(Wt(l=>l.collectionName===this.name));this.$=r.pipe(rs(l=>l.events)),this.checkpoint$=r.pipe(qt(l=>l.checkpoint)),this._changeEventBuffer=TX(this.asRxCollection);var i;this._docCache=new Sj(this.schema.primaryPath,this.$.pipe(Wt(l=>!l.isLocal)),l=>(i||(i=jX(this.asRxCollection)),IX(this.asRxCollection,i,l)));var o=this.database.internalStore.changeStream().pipe(Wt(l=>{var c=this.name+"-"+this.schema.version,u=l.events.find(d=>d.documentData.context==="collection"&&d.documentData.key===c&&d.operation==="DELETE");return!!u})).subscribe(async()=>{await this.destroy(),await Promise.all(this.onRemove.map(l=>l()))});this._subs.push(o);var s=await this.database.storageToken,a=this.storageInstance.changeStream().subscribe(l=>{for(var c=new Array(l.events.length),u=l.events,d=this.name,f=_n.deepFreezeWhenDevMode,m=0;m{this.conflictHandler(l.input,l.context).then(c=>{this.storageInstance.resolveConflictResultionTask({id:l.id,output:c})})})),yi},t.cleanup=function(r){throw Mi(this),un("cleanup")},t.migrationNeeded=function(){throw un("migration-schema")},t.getMigrationState=function(){throw un("migration-schema")},t.startMigration=function(r=10){return Mi(this),this.getMigrationState().startMigration(r)},t.migratePromise=function(r=10){return this.getMigrationState().migratePromise(r)},t.insert=async function(r){Mi(this);var i=await this.bulkInsert([r]),o=i.error[0];Ym(this,r[this.schema.primaryPath],r,o);var s=bt(i.success[0]);return s},t.bulkInsert=async function(r){if(Mi(this),r.length===0)return{success:[],error:[]};var i=this.schema.primaryPath,o;if(this.hasHooks("pre","insert"))o=await Promise.all(r.map(f=>{var m=bh(this.schema,f);return this._runHooks("pre","insert",m).then(()=>({document:m}))}));else{o=[];for(var s=0;s{var m=f.document;d.set(m[i],m)}),await Promise.all(u.map(f=>this._runHooks("post","insert",d.get(f.primary),f)))}return{success:u,error:c.error}},t.bulkRemove=async function(r){Mi(this);var i=this.schema.primaryPath;if(r.length===0)return{success:[],error:[]};var o=await this.findByIds(r).exec(),s=[],a=new Map;Array.from(o.values()).forEach(f=>{var m=f.toMutableJSON(!0);s.push(m),a.set(f.primary,m)}),await Promise.all(s.map(f=>{var m=f[this.schema.primaryPath];return this._runHooks("pre","remove",f,o.get(m))}));var l=s.map(f=>{var m=en(f);return m._deleted=!0,{previous:f,document:m}}),c=await this.storageInstance.bulkWrite(l,"rx-collection-bulk-remove"),u=c.success.map(f=>f[i]);await Promise.all(u.map(f=>this._runHooks("post","remove",a.get(f),o.get(f))));var d=u.map(f=>Ns(o,f));return{success:d,error:c.error}},t.bulkUpsert=async function(r){Mi(this);var i=[],o=new Map;r.forEach(c=>{var u=bh(this.schema,c),d=u[this.schema.primaryPath];if(!d)throw ot("COL3",{primaryPath:this.schema.primaryPath,data:u,schema:this.schema.jsonSchema});o.set(d,u),i.push(u)});var s=await this.bulkInsert(i),a=s.success.slice(0),l=[];return await Promise.all(s.error.map(async c=>{if(c.status!==409)l.push(c);else{var u=c.documentId,d=Ns(o,u),f=bt(c.documentInDb),m=this._docCache.getCachedRxDocuments([f])[0],p=await m.incrementalModify(()=>d);a.push(p)}})),{error:l,success:a}},t.upsert=async function(r){Mi(this);var i=await this.bulkUpsert([r]);return Ym(this.asRxCollection,r[this.schema.primaryPath],r,i.error[0]),i.success[0]},t.incrementalUpsert=function(r){Mi(this);var i=bh(this.schema,r),o=i[this.schema.primaryPath];if(!o)throw ot("COL4",{data:r});var s=this._incrementalUpsertQueues.get(o);return s||(s=yi),s=s.then(()=>VX(this,o,i)).then(a=>a.inserted?a.doc:HX(a.doc,i)),this._incrementalUpsertQueues.set(o,s),s},t.find=function(r){if(Mi(this),typeof r=="string")throw ot("COL5",{queryObj:r});r||(r=em());var i=jc("find",r,this);return i},t.findOne=function(r){if(Mi(this),typeof r=="number"||Array.isArray(r))throw mi("COL6",{queryObj:r});var i;if(typeof r=="string")i=jc("findOne",{selector:{[this.schema.primaryPath]:r},limit:1},this);else{if(r||(r=em()),r.limit)throw ot("QU6");r=en(r),r.limit=1,i=jc("findOne",r,this)}return i},t.count=function(r){Mi(this),r||(r=em());var i=jc("count",r,this);return i},t.findByIds=function(r){Mi(this);var i={selector:{[this.schema.primaryPath]:{$in:r.slice(0)}}},o=jc("findByIds",i,this);return o},t.exportJSON=function(){throw un("json-dump")},t.importJSON=function(r){throw un("json-dump")},t.insertCRDT=function(r){throw un("crdt")},t.addHook=function(r,i,o,s=!1){if(typeof o!="function")throw mi("COL7",{key:i,when:r});if(!Nj.includes(r))throw mi("COL8",{key:i,when:r});if(!Aj.includes(i))throw ot("COL9",{key:i});if(r==="post"&&i==="create"&&s===!0)throw ot("COL10",{when:r,key:i,parallel:s});var a=o.bind(this),l=s?"parallel":"series";this.hooks[i]=this.hooks[i]||{},this.hooks[i][r]=this.hooks[i][r]||{series:[],parallel:[]},this.hooks[i][r][l].push(a)},t.getHooks=function(r,i){return!this.hooks[i]||!this.hooks[i][r]?{series:[],parallel:[]}:this.hooks[i][r]},t.hasHooks=function(r,i){if(!this.hooks[i]||!this.hooks[i][r])return!1;var o=this.getHooks(r,i);return o?o.series.length>0||o.parallel.length>0:!1},t._runHooks=function(r,i,o,s){var a=this.getHooks(r,i);if(!a)return yi;var l=a.series.map(c=>()=>c(o,s));return EK(l).then(()=>Promise.all(a.parallel.map(c=>c(o,s))))},t._runHooksSync=function(r,i,o,s){if(this.hasHooks(r,i)){var a=this.getHooks(r,i);a&&a.series.forEach(l=>l(o,s))}},t.promiseWait=function(r){var i=new Promise(o=>{var s=setTimeout(()=>{this.timeouts.delete(s),o()},r);this.timeouts.add(s)});return i},t.destroy=async function(){return this.destroyed?wo:(await Promise.all(this.onDestroy.map(r=>r())),this.destroyed=!0,Array.from(this.timeouts).forEach(r=>clearTimeout(r)),this._changeEventBuffer&&this._changeEventBuffer.destroy(),this.database.requestIdlePromise().then(()=>this.storageInstance.close()).then(()=>(this._subs.forEach(r=>r.unsubscribe()),delete this.database.collections[this.name],Ul("postDestroyRxCollection",this).then(()=>!0))))},t.remove=async function(){await this.destroy(),await Promise.all(this.onRemove.map(r=>r())),await Ij(this.database.storage,this.database.internalStore,this.database.token,this.database.name,this.name,this.database.password,this.database.hashFunction)},Vs(e,[{key:"insert$",get:function(){return this.$.pipe(Wt(n=>n.operation==="INSERT"))}},{key:"update$",get:function(){return this.$.pipe(Wt(n=>n.operation==="UPDATE"))}},{key:"remove$",get:function(){return this.$.pipe(Wt(n=>n.operation==="DELETE"))}},{key:"asRxCollection",get:function(){return this}}])}();function GX(e){if(!TE){TE=!0;var t=Object.getPrototypeOf(e);Aj.forEach(n=>{Nj.map(r=>{var i=r+_L(n);t[i]=function(o,s){return this.addHook(r,n,o,s)}})})}}function HX(e,t){return e.incrementalModify(n=>t)}function VX(e,t,n){var r=e._docCache.getLatestDocumentDataIfExists(t);return r?Promise.resolve({doc:e._docCache.getCachedRxDocuments([r])[0],inserted:!1}):e.findOne(t).exec().then(i=>i?{doc:i,inserted:!1}:e.insert(n).then(o=>({doc:o,inserted:!0})))}function KX({database:e,name:t,schema:n,instanceCreationOptions:r={},migrationStrategies:i={},autoMigrate:o=!0,statics:s={},methods:a={},attachments:l={},options:c={},localDocuments:u=!1,cacheReplacementPolicy:d=xj,conflictHandler:f=$j}){var m={databaseInstanceToken:e.token,databaseName:e.name,collectionName:t,schema:n.jsonSchema,options:r,multiInstance:e.multiInstance,password:e.password,devMode:_n.isDevMode()};return Zi("preCreateRxStorageInstance",m),RX(e,m).then(p=>{var g=new Dj(e,t,n,p,r,i,a,l,c,d,s,f);return g.prepare().then(()=>{Object.entries(s).forEach(([b,w])=>{Object.defineProperty(g,b,{get:()=>w.bind(g)})});var E=yi;return o&&g.schema.version!==0&&(E=g.migratePromise()),E}).then(()=>(Zi("createRxCollection",{collection:g,creator:{name:t,schema:n,storageInstance:p,instanceCreationOptions:r,migrationStrategies:i,methods:a,attachments:l,options:c,cacheReplacementPolicy:d,localDocuments:u,statics:s}}),g)).catch(E=>p.close().then(()=>Promise.reject(E)))})}var Bj=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this._parallels=t||1,this._qC=0,this._iC=new Set,this._lHN=0,this._hPM=new Map,this._pHM=new Map};Bj.prototype={isIdle:function(){return this._qC{this._to=!1,YX(this)},0))}clear(){this.map.clear()}}function YX(e){const t=Fj()-e.ttl,n=e.map[Symbol.iterator]();for(;;){const r=n.next().value;if(!r)return;const i=r[0];if(r[1]g.events)),this.storageToken=wo,this.storageTokenDocument=wo,this.emittedEventBulkIds=new vS(60*1e3),this.name=n,this.token=r,this.storage=i,this.instanceCreationOptions=o,this.password=s,this.multiInstance=a,this.eventReduce=l,this.options=c,this.internalStore=u,this.hashFunction=d,this.cleanupPolicy=f,this.allowSlowCount=m,this.reactivity=p,this.name!=="pseudoInstance"&&(this.internalStore=hS(this.asRxDatabase,u,gS),this.storageTokenDocument=_X(this.asRxDatabase).catch(g=>this.startupErrors.push(g)),this.storageToken=this.storageTokenDocument.then(g=>g.data.token).catch(g=>this.startupErrors.push(g)))}var t=e.prototype;return t.getReactivityFactory=function(){if(!this.reactivity)throw ot("DB14",{database:this.name});return this.reactivity},t.$emit=function(r){this.emittedEventBulkIds.has(r.id)||(this.emittedEventBulkIds.add(r.id),this.eventBulks$.next(r))},t.removeCollectionDoc=async function(r,i){var o=await Qv(this.internalStore,Gf(Qm(r,i),Pl));if(!o)throw ot("SNH",{name:r,schema:i});var s=bp(o);s._deleted=!0,await this.internalStore.bulkWrite([{document:s,previous:o}],"rx-database-remove-collection")},t.addCollections=async function(r){var i={},o={},s=[],a={};await Promise.all(Object.entries(r).map(async([u,d])=>{var f=u,m=d.schema;i[f]=m;var p=HK(m,this.hashFunction);if(o[f]=p,this.collections[u])throw ot("DB3",{name:u});var g=Qm(u,m),E={id:Gf(g,Pl),key:g,context:Pl,data:{name:f,schemaHash:await p.hash,schema:p.jsonSchema,version:p.version,connectedStorages:[]},_deleted:!1,_meta:Wu(),_rev:To(),_attachments:{}};s.push({document:E});var b=Object.assign({},d,{name:f,schema:p,database:this}),w=en(d);w.database=this,w.name=u,Zi("preCreateRxCollection",w),b.conflictHandler=w.conflictHandler,a[f]=b}));var l=await this.internalStore.bulkWrite(s,"rx-database-add-collection");await eJ(this),await Promise.all(l.error.map(async u=>{if(u.status!==409)throw ot("DB12",{database:this.name,writeError:u});var d=bt(u.documentInDb),f=d.data.name,m=o[f];if(d.data.schemaHash!==await m.hash)throw ot("DB6",{database:this.name,collection:f,previousSchemaHash:d.data.schemaHash,schemaHash:await m.hash,previousSchema:d.data.schema,schema:bt(i[f])})}));var c={};return await Promise.all(Object.keys(r).map(async u=>{var d=a[u],f=await KX(d);c[u]=f,this.collections[u]=f,this[u]||Object.defineProperty(this,u,{get:()=>this.collections[u]})})),c},t.lockedRun=function(r){return this.idleQueue.wrapCall(r)},t.requestIdlePromise=function(){return this.idleQueue.requestIdlePromise()},t.exportJSON=function(r){throw un("json-dump")},t.addState=function(r){throw un("state")},t.importJSON=function(r){throw un("json-dump")},t.backup=function(r){throw un("backup")},t.leaderElector=function(){throw un("leader-election")},t.isLeader=function(){throw un("leader-election")},t.waitForLeadership=function(){throw un("leader-election")},t.migrationStates=function(){throw un("migration-schema")},t.destroy=async function(){return this.destroyed||(this.destroyed=!0,await Ul("preDestroyRxDatabase",this),this.eventBulks$.complete(),this._subs.map(r=>r.unsubscribe()),this.name==="pseudoInstance")?wo:this.requestIdlePromise().then(()=>Promise.all(this.onDestroy.map(r=>r()))).then(()=>Promise.all(Object.keys(this.collections).map(r=>this.collections[r]).map(r=>r.destroy()))).then(()=>this.internalStore.close()).then(()=>eg.delete(this.storage.name+"|"+this.name)).then(()=>!0)},t.remove=function(){return this.destroy().then(()=>JX(this.name,this.storage,this.password))},Vs(e,[{key:"$",get:function(){return this.observable$}},{key:"asRxDatabase",get:function(){return this}}])}();function QX(e,t){var n=t.name+"|"+e;if(eg.has(n))throw ot("DB8",{name:e,storage:t.name,link:"https://rxdb.info/rx-database.html#ignoreduplicate"})}async function zj(e,t,n,r,i,o){var s=await t.createStorageInstance({databaseInstanceToken:e,databaseName:n,collectionName:fX,schema:gS,options:r,multiInstance:i,password:o,devMode:_n.isDevMode()});return s}function XX({storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i=!0,eventReduce:o=!0,ignoreDuplicate:s=!1,options:a={},cleanupPolicy:l,allowSlowCount:c=!1,localDocuments:u=!1,hashFunction:d=wL,reactivity:f}){Zi("preCreateRxDatabase",{storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i,eventReduce:o,ignoreDuplicate:s,options:a,localDocuments:u}),s||QX(n,e),eg.add(e.name+"|"+n);var m=tc(10);return zj(m,e,n,t,i,r).catch(p=>{throw eg.delete(e.name+"|"+n),p}).then(p=>{var g=new yS(n,m,e,t,r,i,o,a,p,d,l,c,f);return Ul("createRxDatabase",{database:g,creator:{storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i,eventReduce:o,ignoreDuplicate:s,options:a,localDocuments:u}}).then(()=>g)})}async function JX(e,t,n){var r=tc(10),i=await zj(r,t,e,{},!1,n),o=await Lj(i),s=new Set;o.forEach(l=>s.add(l.data.name));var a=Array.from(s);return await Promise.all(a.map(l=>Ij(t,i,r,e,l,n))),await Ul("postRemoveRxDatabase",{databaseName:e,storage:t}),await i.remove(),a}function ZX(e){return e instanceof yS}async function eJ(e){if(await e.storageToken,e.startupErrors[0])throw e.startupErrors[0]}var tJ={RxSchema:jL.prototype,RxDocument:Jv,RxQuery:Cj.prototype,RxCollection:Dj.prototype,RxDatabase:yS.prototype},j0=new Set,OE=new Set;function Ku(e){if(Zi("preAddRxPlugin",{plugin:e,plugins:j0}),!j0.has(e)){{if(OE.has(e.name))throw ot("PL3",{name:e.name,plugin:e});j0.add(e),OE.add(e.name)}if(!e.rxdb)throw mi("PL1",{plugin:e});e.init&&e.init(),e.prototypes&&Object.entries(e.prototypes).forEach(([t,n])=>n(tJ[t])),e.overwritable&&Object.assign(_n,e.overwritable),e.hooks&&Object.entries(e.hooks).forEach(([t,n])=>{n.after&&Ff[t].push(n.after),n.before&&Ff[t].unshift(n.before)})}}function nJ(e){return e&&typeof e.then=="function"}Promise.resolve(!1);var rJ=Promise.resolve(!0),Ts=Promise.resolve();function wl(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function iJ(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function wp(){return Math.random().toString(36).substring(2)}var I0=0;function xp(){var e=Date.now()*1e3;return e<=I0&&(e=I0+1),I0=e,e}function oJ(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}var sJ=xp,aJ="native";function lJ(e){var t={time:xp(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function cJ(e){e.bc.close(),e.subFns=[]}function uJ(e,t){try{return e.bc.postMessage(t,!1),Ts}catch(n){return Promise.reject(n)}}function dJ(e,t){e.messagesCallback=t}function fJ(){if(typeof globalThis<"u"&&globalThis.Deno&&globalThis.Deno.args)return!0;if((typeof window<"u"||typeof self<"u")&&typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function pJ(){return 150}var hJ={create:lJ,close:cJ,onMessage:dJ,postMessage:uJ,canBeUsed:fJ,type:aJ,averageResponseTime:pJ,microSeconds:sJ};function bS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var mJ=xp,gJ="pubkey.broadcast-channel-0-",Bs="messages",Zv={durability:"relaxed"},vJ="idb";function Uj(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function wS(e){e.commit&&e.commit()}function yJ(e){var t=Uj(),n=gJ+e,r=t.open(n);return r.onupgradeneeded=function(i){var o=i.target.result;o.createObjectStore(Bs,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,o){r.onerror=function(s){return o(s)},r.onsuccess=function(){i(r.result)}})}function bJ(e,t,n){var r=Date.now(),i={uuid:t,time:r,data:n},o=e.transaction([Bs],"readwrite",Zv);return new Promise(function(s,a){o.oncomplete=function(){return s()},o.onerror=function(c){return a(c)};var l=o.objectStore(Bs);l.add(i),wS(o)})}function wJ(e,t){var n=e.transaction(Bs,"readonly",Zv),r=n.objectStore(Bs),i=[],o=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var s=r.getAll(o);return new Promise(function(l,c){s.onerror=function(u){return c(u)},s.onsuccess=function(u){l(u.target.result)}})}function a(){try{return o=IDBKeyRange.bound(t+1,1/0),r.openCursor(o)}catch{return r.openCursor()}}return new Promise(function(l,c){var u=a();u.onerror=function(d){return c(d)},u.onsuccess=function(d){var f=d.target.result;f?f.value.ide.lastCursorId&&(e.lastCursorId=r.id),r}).filter(function(r){return kJ(r,e)}).sort(function(r,i){return r.time-i.time});return n.forEach(function(r){e.messagesCallback&&(e.eMIs.add(r.id),e.messagesCallback(r.data))}),Ts})}function EJ(e){e.closed=!0,e.db.close()}function RJ(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return bJ(e.db,e.uuid,t)}).then(function(){iJ(0,10)===0&&_J(e)}),e.writeBlockPromise}function PJ(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Gj(e)}function TJ(){return!!Uj()}function OJ(e){return e.idb.fallbackInterval*2}var LJ={create:CJ,close:EJ,onMessage:PJ,postMessage:RJ,canBeUsed:TJ,type:vJ,averageResponseTime:OJ,microSeconds:mJ},jJ=xp,IJ="pubkey.broadcastChannel-",MJ="localstorage";function Hj(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function Vj(e){return IJ+e}function $J(e,t){return new Promise(function(n){wl().then(function(){var r=Vj(e.channelName),i={token:wp(),time:Date.now(),data:t,uuid:e.uuid},o=JSON.stringify(i);Hj().setItem(r,o);var s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=r,s.newValue=o,window.dispatchEvent(s),n()})})}function NJ(e,t){var n=Vj(e),r=function(o){o.key===n&&t(JSON.parse(o.newValue))};return window.addEventListener("storage",r),r}function AJ(e){window.removeEventListener("storage",e)}function DJ(e,t){if(t=bS(t),!Kj())throw new Error("BroadcastChannel: localstorage cannot be used");var n=wp(),r=new vS(t.localstorage.removeTimeout),i={channelName:e,uuid:n,eMIs:r};return i.listener=NJ(e,function(o){i.messagesCallback&&o.uuid!==n&&(!o.token||r.has(o.token)||o.data.time&&o.data.time0||e._addEL.internal.length>0}function ME(e,t,n){e._addEL[t].push(n),eZ(e)}function $E(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),tZ(e)}function eZ(e){if(!e._iL&&Xj(e)){var t=function(i){e._addEL[i.type].forEach(function(o){i.time>=o.time&&o.fn(i.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function tZ(e){if(e._iL&&!Xj(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}function nZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jj={exports:{}},Bn=Jj.exports={},Fo,zo;function I1(){throw new Error("setTimeout has not been defined")}function M1(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Fo=setTimeout:Fo=I1}catch{Fo=I1}try{typeof clearTimeout=="function"?zo=clearTimeout:zo=M1}catch{zo=M1}})();function Zj(e){if(Fo===setTimeout)return setTimeout(e,0);if((Fo===I1||!Fo)&&setTimeout)return Fo=setTimeout,setTimeout(e,0);try{return Fo(e,0)}catch{try{return Fo.call(null,e,0)}catch{return Fo.call(this,e,0)}}}function rZ(e){if(zo===clearTimeout)return clearTimeout(e);if((zo===M1||!zo)&&clearTimeout)return zo=clearTimeout,clearTimeout(e);try{return zo(e)}catch{try{return zo.call(null,e)}catch{return zo.call(this,e)}}}var Ss=[],lu=!1,xl,tm=-1;function iZ(){!lu||!xl||(lu=!1,xl.length?Ss=xl.concat(Ss):tm=-1,Ss.length&&eI())}function eI(){if(!lu){var e=Zj(iZ);lu=!0;for(var t=Ss.length;t;){for(xl=Ss,Ss=[];++tm1)for(var n=1;n0)})},awaitLeadership:function(){var t=this;if(!this._wLMP){this._wKMC.c=new AbortController;var n=new Promise(function(r,i){t._wKMC.res=r,t._wKMC.rej=i});this._wLMP=new Promise(function(r){navigator.locks.request(t.lN,{signal:t._wKMC.c.signal},function(){return t._wKMC.c=void 0,nI(t),r(),n}).catch(function(){})})}return this._wLMP},set onduplicate(e){},die:function(){var t=this;return this._lstns.forEach(function(n){return t.broadcastChannel.removeEventListener("internal",n)}),this._lstns=[],this._unl.forEach(function(n){return n.remove()}),this._unl=[],this.isLeader&&(this.isLeader=!1),this.isDead=!0,this._wKMC.res&&this._wKMC.res(),this._wKMC.c&&this._wKMC.c.abort("LeaderElectionWebLock.die() called"),Tl(this,"death")}};var iI=function(t,n){var r=this;this.broadcastChannel=t,this._options=n,this.isLeader=!1,this._hasLeader=!1,this.isDead=!1,this.token=wp(),this._aplQ=Ts,this._aplQC=0,this._unl=[],this._lstns=[],this._dpL=function(){},this._dpLC=!1;var i=function(s){s.context==="leader"&&(s.action==="death"&&(r._hasLeader=!1),s.action==="tell"&&(r._hasLeader=!0))};this.broadcastChannel.addEventListener("internal",i),this._lstns.push(i)};iI.prototype={hasLeader:function(){return Promise.resolve(this._hasLeader)},applyOnce:function(t){var n=this;if(this.isLeader)return wl(0,!0);if(this.isDead)return wl(0,!1);if(this._aplQC>1)return this._aplQ;var r=function(){if(n.isLeader)return rJ;var o=!1,s,a=new Promise(function(u){s=function(){o=!0,u()}}),l=function(d){d.context==="leader"&&d.token!=n.token&&(d.action==="apply"&&d.token>n.token&&s(),d.action==="tell"&&(s(),n._hasLeader=!0))};n.broadcastChannel.addEventListener("internal",l);var c=t?n._options.responseTime*4:n._options.responseTime;return Tl(n,"apply").then(function(){return Promise.race([wl(c),a.then(function(){return Promise.reject(new Error)})])}).then(function(){return Tl(n,"apply")}).then(function(){return Promise.race([wl(c),a.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return n.broadcastChannel.removeEventListener("internal",l),o?!1:nI(n).then(function(){return!0})})};return this._aplQC=this._aplQC+1,this._aplQ=this._aplQ.then(function(){return r()}).then(function(){n._aplQC=n._aplQC-1}),this._aplQ.then(function(){return n.isLeader})},awaitLeadership:function(){return this._aLP||(this._aLP=pZ(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(n){return t.broadcastChannel.removeEventListener("internal",n)}),this._lstns=[],this._unl.forEach(function(n){return n.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,Tl(this,"death")}};function pZ(e){return e.isLeader?Ts:new Promise(function(t){var n=!1;function r(){n||(n=!0,e.broadcastChannel.removeEventListener("internal",o),t(!0))}e.applyOnce().then(function(){e.isLeader&&r()});var i=function s(){return wl(e._options.fallbackInterval).then(function(){if(!(e.isDead||n))if(e.isLeader)r();else return e.applyOnce(!0).then(function(){e.isLeader?r():s()})})};i();var o=function(a){a.context==="leader"&&a.action==="death"&&(e._hasLeader=!1,e.applyOnce().then(function(){e.isLeader&&r()}))};e.broadcastChannel.addEventListener("internal",o),e._lstns.push(o)})}function hZ(e,t){return e||(e={}),e=JSON.parse(JSON.stringify(e)),e.fallbackInterval||(e.fallbackInterval=3e3),e.responseTime||(e.responseTime=t.method.averageResponseTime(t.options)),e}function mZ(e,t){if(e._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");t=hZ(t,e);var n=oJ()?new rI(e,t):new iI(e,t);return e._befC.push(function(){return n.die()}),e._leaderElector=n,n}var tg=new Map;function oI(e,t,n,r){var i=tg.get(t);return i||(i={bc:new SS(["RxDB:",e,n].join("|")),refs:new Set},tg.set(t,i)),i.refs.add(r),i.bc}function $1(e,t){var n=tg.get(e);if(n&&(n.refs.delete(t),n.refs.size===0))return tg.delete(e),n.bc.close()}function gZ(e,t,n,r){if(t.multiInstance){var i=r||oI(e,t.databaseInstanceToken,n.databaseName,n),o=new Ln,s=f=>{f.storageName===e&&f.databaseName===t.databaseName&&f.collectionName===t.collectionName&&f.version===t.schema.version&&o.next(f.eventBulk)};i.addEventListener("message",s);var a=n.changeStream(),l=!1,c=a.subscribe(f=>{l||i.postMessage({storageName:e,databaseName:t.databaseName,collectionName:t.collectionName,version:t.schema.version,eventBulk:f})});n.changeStream=function(){return o.asObservable().pipe(Dq(a))};var u=n.close.bind(n);n.close=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),r||await $1(t.databaseInstanceToken,n),u()};var d=n.remove.bind(n);n.remove=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),r||await $1(t.databaseInstanceToken,n),d()}}}var sI={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Cr,function(){var n=function(h,x){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,j){P.__proto__=j}||function(P,j){for(var M in j)Object.prototype.hasOwnProperty.call(j,M)&&(P[M]=j[M])})(h,x)},r=function(){return(r=Object.assign||function(h){for(var x,P=1,j=arguments.length;P"u"||o.Promise||(o.Promise=Promise);var c=Object.getPrototypeOf,u={}.hasOwnProperty;function d(h,x){return u.call(h,x)}function f(h,x){typeof x=="function"&&(x=x(c(h))),(typeof Reflect>"u"?s:Reflect.ownKeys)(x).forEach(function(P){p(h,P,x[P])})}var m=Object.defineProperty;function p(h,x,P,j){m(h,x,l(P&&d(P,"get")&&typeof P.get=="function"?{get:P.get,set:P.set,configurable:!0}:{value:P,configurable:!0,writable:!0},j))}function g(h){return{from:function(x){return h.prototype=Object.create(x.prototype),p(h.prototype,"constructor",h),{extend:f.bind(null,h.prototype)}}}}var E=Object.getOwnPropertyDescriptor,b=[].slice;function w(h,x,P){return b.call(h,x,P)}function y(h,x){return x(h)}function _(h){if(!h)throw new Error("Assertion Failed")}function R(h){o.setImmediate?setImmediate(h):setTimeout(h,0)}function T(h,x){if(typeof x=="string"&&d(h,x))return h[x];if(!x)return h;if(typeof x!="string"){for(var P=[],j=0,M=x.length;j"u"?[]:function(){var h=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[h,c(h),h];var x=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[x,c(x),h]}(),de=ao[0],Ii=ao[1],ao=ao[2],Ii=Ii&&Ii.then,$e=de&&de.constructor,rt=!!ao,Je=function(h,x){Vt.push([h,x]),tt&&(queueMicrotask(ge),tt=!1)},Oe=!0,tt=!0,St=[],Ht=[],Xe=Ze,yt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ge,pgp:!1,env:{},finalize:Ge},Ne=yt,Vt=[],bn=0,hr=[];function Ue(h){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var x=this._PSD=Ne;if(typeof h!="function"){if(h!==K)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Kr(this,this._value))}this._state=null,this._value=null,++x.ref,function P(j,M){try{M(function(B){if(j._state===null){if(B===j)throw new TypeError("A promise cannot be resolved with itself.");var H=j._lib&&we();B&&typeof B.then=="function"?P(j,function(q,re){B instanceof Ue?B._then(q,re):B.then(q,re)}):(j._state=!0,j._value=B,Io(j)),H&&je()}},Kr.bind(null,j))}catch(B){Kr(j,B)}}(this,h)}var oo={get:function(){var h=Ne,x=Lt;function P(j,M){var B=this,H=!h.global&&(h!==Ne||x!==Lt),q=H&&!Hn(),re=new Ue(function(te,ae){Mo(B,new so(_t(j,h,H,q),_t(M,h,H,q),te,ae,h))});return this._consoleTask&&(re._consoleTask=this._consoleTask),re}return P.prototype=K,P},set:function(h){p(this,"then",h&&h.prototype===K?oo:{get:function(){return h},set:oo.set})}};function so(h,x,P,j,M){this.onFulfilled=typeof h=="function"?h:null,this.onRejected=typeof x=="function"?x:null,this.resolve=P,this.reject=j,this.psd=M}function Kr(h,x){var P,j;Ht.push(x),h._state===null&&(P=h._lib&&we(),x=Xe(x),h._state=!1,h._value=x,j=h,St.some(function(M){return M._value===j._value})||St.push(j),Io(h),P&&je())}function Io(h){var x=h._listeners;h._listeners=[];for(var P=0,j=x.length;P.",ir="String expected.",ln=[],Li="__dbnames",Qs="readonly",Xs="readwrite";function ji(h,x){return h?x?function(){return h.apply(this,arguments)&&x.apply(this,arguments)}:h:x}var Rp={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Js(h){return typeof h!="string"||/\./.test(h)?function(x){return x}:function(x){return x[h]===void 0&&h in x&&delete(x=z(x))[h],x}}function Pp(){throw Pe.Type()}function Dt(h,x){try{var P=Tp(h),j=Tp(x);if(P!==j)return P==="Array"?1:j==="Array"?-1:P==="binary"?1:j==="binary"?-1:P==="string"?1:j==="string"?-1:P==="Date"?1:j!=="Date"?NaN:-1;switch(P){case"number":case"Date":case"string":return xve+be&&me(ve+ce)})})}return me(0).then(function(){if(0=ce})).length!==0?(ae.forEach(function(me){ue.push(function(){var ve=ie,be=me._cfg.dbschema;$p(X,ve,oe),$p(X,be,oe),ie=X._dbSchema=be;var xe=cc(ve,be);xe.add.forEach(function(Ye){uc(oe,Ye[0],Ye[1].primKey,Ye[1].indexes)}),xe.change.forEach(function(Ye){if(Ye.recreate)throw new Pe.Upgrade("Not yet support for changing primary key");var Qe=oe.objectStore(Ye.name);Ye.add.forEach(function(wt){return ra(Qe,wt)}),Ye.change.forEach(function(wt){Qe.deleteIndex(wt.name),ra(Qe,wt)}),Ye.del.forEach(function(wt){return Qe.deleteIndex(wt)})});var Ce=me._cfg.contentUpgrade;if(Ce&&me._cfg.version>ce){wn(X,oe),ne._memoizedTables={};var qe=I(be);xe.del.forEach(function(Ye){qe[Ye]=ve[Ye]}),mr(X,[X.Transaction.prototype]),zn(X,[X.Transaction.prototype],s(qe),qe),ne.schema=qe;var Be,We=Le(Ce);return We&&Gt(),xe=Ue.follow(function(){var Ye;(Be=Ce(ne))&&We&&(Ye=Hn.bind(null,null),Be.then(Ye,Ye))}),Be&&typeof Be.then=="function"?Ue.resolve(Be):xe.then(function(){return Be})}}),ue.push(function(ve){var be,xe,Ce=me._cfg.dbschema;be=Ce,xe=ve,[].slice.call(xe.db.objectStoreNames).forEach(function(qe){return be[qe]==null&&xe.db.deleteObjectStore(qe)}),mr(X,[X.Transaction.prototype]),zn(X,[X.Transaction.prototype],X._storeNames,X._dbSchema),ne.schema=X._dbSchema}),ue.push(function(ve){X.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(X.idbdb.version/10)===me._cfg.version?(X.idbdb.deleteObjectStore("$meta"),delete X._dbSchema.$meta,X._storeNames=X._storeNames.filter(function(be){return be!=="$meta"})):ve.objectStore("$meta").put(me._cfg.version,"version"))})}),function me(){return ue.length?Ue.resolve(ue.shift()(ne.idbtrans)).then(me):Ue.resolve()}().then(function(){rd(ie,oe)})):Ue.resolve();var X,ce,ne,oe,ue,ie}).catch(H)):(s(M).forEach(function(ae){uc(P,ae,M[ae].primKey,M[ae].indexes)}),wn(h,P),void Ue.follow(function(){return h.on.populate.fire(B)}).catch(H));var re,te})}function na(h,x){rd(h._dbSchema,x),x.db.version%10!=0||x.objectStoreNames.contains("$meta")||x.db.createObjectStore("$meta").add(Math.ceil(x.db.version/10-1),"version");var P=fs(0,h.idbdb,x);$p(h,h._dbSchema,x);for(var j=0,M=cc(P,h._dbSchema).change;jMath.pow(2,62)?0:ie.oldVersion,X=ie<1,h.idbdb=ue.result,B&&na(h,ae),Mp(h,ie/10,ae,ne))},ne),ue.onsuccess=Fe(function(){ae=null;var ie,me,ve,be,xe,Ce=h.idbdb=ue.result,qe=w(Ce.objectStoreNames);if(0"u"?Ue.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ce){function ne(){return indexedDB.databases().finally(ce)}re=setInterval(ne,100),ne()}).finally(function(){return clearInterval(re)}):Promise.resolve()).then(q)]).then(function(){return H(),x.onReadyBeingFired=[],Ue.resolve(dy(function(){return h.on.ready.fire(h.vip)})).then(function ce(){if(0x.limit?ce.length=x.limit:h.length===x.limit&&ce.length=me.limit&&(!me.values||Ce.req.values)&&MM(Ce.req.query.range,me.query.range)}),!1,ve,be];case"count":return xe=be.find(function(Ce){return ZS(Ce.req.query.range,me.query.range)}),[xe,!!xe,ve,be]}}(x,P,"query",B),ae=te[0],X=te[1],ce=te[2],ne=te[3];return ae&&X?ae.obsSet=B.obsSet:(X=j.query(B).then(function(oe){var ue=oe.result;if(ae&&(ae.res=ue),H){for(var ie=0,me=ue.length;ie{var s=(async()=>{var a=en(n);a.autoOpen=!1;var l=new A1(i,a),c={[ng]:SZ(r),[yZ]:"++sequence, id",[DE]:"id"};return l.version(1).stores(c),await l.open(),{dexieDb:l,dexieTable:l[ng],dexieAttachmentsTable:l[DE],booleanIndexes:_Z(r)}})();return BE.set(i,o),nm.set(o,0),s});return o}async function wZ(e){var t=await e,n=nm.get(e),r=n-1;r===0?(t.dexieDb.close(),nm.delete(e)):nm.set(e,r)}var D1="__";function Sp(e){var t=e.split(".");if(t.length>1)return t.map(r=>Sp(r)).join(".");if(e.startsWith("|")){var n=e.substring(1);return D1+n}else return e}function lI(e){var t=e.split(".");if(t.length>1)return t.map(r=>lI(r)).join(".");if(e.startsWith(D1)){var n=e.substring(D1.length);return"|"+n}else return e}function xZ(e,t){return t&&(t=en(t),t=B1(t),e.forEach(n=>{var r=Ba(t,n),i=r?"1":"0";EL(t,n,i)}),t)}function cI(e,t){return t&&(t=en(t),t=F1(t),e.forEach(n=>{var r=Ba(t,n),i=r==="1";EL(t,n,i)}),t)}function B1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>B1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{typeof r=="object"&&(r=B1(r)),t[Sp(n)]=r}),t}}function F1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>F1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{(typeof r=="object"||Array.isArray(e))&&(r=F1(r)),t[lI(n)]=r}),t}}function SZ(e){var t=[],n=jo(e.primaryKey);t.push([n]),t.push(["_deleted",n]),e.indexes&&e.indexes.forEach(o=>{var s=Bf(o);t.push(s)}),t.push(["_meta.lwt",n]),t.push(["_meta.lwt"]),t=t.map(o=>o.map(s=>Sp(s)));var r=t.map(o=>o.length===1?o[0]:"["+o.join("+")+"]");r=r.filter((o,s,a)=>a.indexOf(o)===s);var i=r.join(", ");return i}async function FE(e,t){var n=await e,r=await n.dexieTable.bulkGet(t);return r.map(i=>cI(n.booleanIndexes,i))}function wh(e,t){return e+"||"+t}function _Z(e){var t=new Set,n=[];return e.indexes?(e.indexes.forEach(r=>{var i=Bf(r);i.forEach(o=>{if(!t.has(o)){t.add(o);var s=Pu(e,o);s.type==="boolean"&&n.push(o)}})}),n.push("_deleted"),sK(n)):n}function zE(e){return e===au?-1/0:e}function UE(e,t,n){if(e.includes(t)){var r=n===su||n===!0?"1":"0";return r}else return n}function uI(e,t,n){if(!n){if(typeof window>"u")throw new Error("IDBKeyRange missing");n=window.IDBKeyRange}var r=t.startKeys.map((s,a)=>{var l=t.index[a];return UE(e,l,s)}).map(zE),i=t.endKeys.map((s,a)=>{var l=t.index[a];return UE(e,l,s)}).map(zE),o=n.bound(r,i,!t.inclusiveStart,!t.inclusiveEnd);return o}async function WE(e,t){var n=await e.internals,r=t.query,i=r.skip?r.skip:0,o=r.limit?r.limit:1/0,s=i+o,a=t.queryPlan,l=!1;a.selectorSatisfiedByIndex||(l=fS(e.schema,t.query));var c=uI(n.booleanIndexes,a,n.dexieDb._options.IDBKeyRange),u=a.index,d=[];if(await n.dexieDb.transaction("r",n.dexieTable,async m=>{var p=m.idbtrans,g=p.objectStore(ng),E,b;b="["+u.map(y=>Sp(y)).join("+")+"]",E=g.index(b);var w=E.openCursor(c);await new Promise(y=>{w.onsuccess=function(_){var R=_.target.result;if(R){var T=cI(n.booleanIndexes,R.value);(!l||l(T))&&d.push(T),a.sortSatisfiedByIndex&&d.length===s?y():R.continue()}else y()}})}),!a.sortSatisfiedByIndex){var f=wj(e.schema,t.query);d=d.sort(f)}return d=d.slice(i,s),{documents:d}}async function CZ(e,t){var n=await e.internals,r=t.queryPlan,i=r.index,o=uI(n.booleanIndexes,r,n.dexieDb._options.IDBKeyRange),s=-1;return await n.dexieDb.transaction("r",n.dexieTable,async a=>{var l=a.idbtrans,c=l.objectStore(ng),u,d;d="["+i.map(m=>Sp(m)).join("+")+"]",u=c.index(d);var f=u.count(o);s=await new Promise((m,p)=>{f.onsuccess=function(){m(f.result)},f.onerror=g=>p(g)})}),s}var kZ=ur(),xh="dexieTestMetaField",M0=!1,EZ=function(){function e(n,r,i,o,s,a,l,c){this.changes$=new Ln,this.instanceId=kZ++,this.storage=n,this.databaseName=r,this.collectionName=i,this.schema=o,this.internals=s,this.options=a,this.settings=l,this.devMode=c,this.primaryPath=jo(this.schema.primaryKey)}var t=e.prototype;return t.bulkWrite=async function(r,i){sl(this),!M0&&(!w0.premium||typeof w0.premium!="string"||await wL(w0.premium)!==OK)&&console.warn(["-------------- RxDB Open Core RxStorage -------------------------------","You are using the free Dexie.js based RxStorage implementation from RxDB https://rxdb.info/rx-storage-dexie.html?console=dexie ","While this is a great option, we want to let you know that there are faster storage solutions available in our premium plugins.","For professional users and production environments, we highly recommend considering these premium options to enhance performance and reliability."," https://rxdb.info/premium?console=dexie ","If you already purchased premium access you can disable this log by calling the setPremiumFlag() function from rxdb-premium/plugins/shared.","---------------------------------------------------------------------"].join(` -`)),M0=!0,r.forEach(u=>{if(!u.document._rev||u.previous&&!u.previous._rev)throw ot("SNH",{args:{row:u}});if(this.devMode&&u.previous&&(!u.previous._meta[xh]||u.previous._meta[xh]!==u.previous._rev))throw console.dir(u),new Error("missing or wrong _meta."+xh)});var o=await this.internals,s={success:[],error:[]};this.devMode&&(r=r.map(u=>{var d=bp(u.document);return d._meta[xh]=d._rev,{previous:u.previous,document:d}}));var a=r.map(u=>u.document[this.primaryPath]),l;if(await o.dexieDb.transaction("rw",o.dexieTable,o.dexieAttachmentsTable,async()=>{var u=new Map,d=await FE(this.internals,a);d.forEach(p=>{var g=p;return g&&u.set(g[this.primaryPath],g),g}),l=pX(this,this.primaryPath,u,r,i),s.error=l.errors;var f=[];l.bulkInsertDocs.forEach(p=>{s.success.push(p.document),f.push(p.document)}),l.bulkUpdateDocs.forEach(p=>{s.success.push(p.document),f.push(p.document)}),f=f.map(p=>xZ(o.booleanIndexes,p)),f.length>0&&await o.dexieTable.bulkPut(f);var m=[];l.attachmentsAdd.forEach(p=>{m.push({id:wh(p.documentId,p.attachmentId),data:p.attachmentData.data})}),l.attachmentsUpdate.forEach(p=>{m.push({id:wh(p.documentId,p.attachmentId),data:p.attachmentData.data})}),await o.dexieAttachmentsTable.bulkPut(m),await o.dexieAttachmentsTable.bulkDelete(l.attachmentsRemove.map(p=>wh(p.documentId,p.attachmentId)))}),l=bt(l),l.eventBulk.events.length>0){var c=bt(l.newestRow).document;l.eventBulk.checkpoint={id:c[this.primaryPath],lwt:c._meta.lwt},l.eventBulk.endTime=ur(),this.changes$.next(l.eventBulk)}return s},t.findDocumentsById=async function(r,i){sl(this);var o=await this.internals,s=[];return await o.dexieDb.transaction("r",o.dexieTable,async()=>{var a=await FE(this.internals,r);a.forEach(l=>{l&&(!l._deleted||i)&&s.push(l)})}),s},t.query=function(r){return sl(this),WE(this,r)},t.count=async function(r){if(r.queryPlan.selectorSatisfiedByIndex){var i=await CZ(this,r);return{count:i,mode:"fast"}}else{var o=await WE(this,r);return{count:o.documents.length,mode:"slow"}}},t.changeStream=function(){return sl(this),this.changes$.asObservable()},t.cleanup=async function(r){sl(this);var i=await this.internals;return await i.dexieDb.transaction("rw",i.dexieTable,async()=>{var o=ur()-r,s=await i.dexieTable.where("_meta.lwt").below(o).toArray(),a=[];s.forEach(l=>{l._deleted==="1"&&a.push(l[this.primaryPath])}),await i.dexieTable.bulkDelete(a)}),!0},t.getAttachmentData=async function(r,i,o){sl(this);var s=await this.internals,a=wh(r,i);return await s.dexieDb.transaction("r",s.dexieAttachmentsTable,async()=>{var l=await s.dexieAttachmentsTable.get(a);if(l)return l.data;throw new Error("attachment missing documentId: "+r+" attachmentId: "+i)})},t.remove=async function(){sl(this);var r=await this.internals;return await r.dexieTable.clear(),this.close()},t.close=function(){return this.closed?this.closed:(this.closed=(async()=>{this.changes$.complete(),await wZ(this.internals)})(),this.closed)},t.conflictResultionTasks=function(){return new Ln},t.resolveConflictResultionTask=async function(r){},e}();async function RZ(e,t,n){var r=bZ(t.databaseName,t.collectionName,n,t.schema),i=new EZ(e,t.databaseName,t.collectionName,t.schema,r,t.options,n,t.devMode);return await gZ(aI,t,i),Promise.resolve(i)}function sl(e){if(e.closed)throw new Error("RxStorageInstanceDexie is closed "+e.databaseName+"-"+e.collectionName)}var PZ=function(){function e(n){this.name=aI,this.rxdbVersion=RL,this.settings=n}var t=e.prototype;return t.createStorageInstance=function(r){return gX(r),RZ(this,r,this.settings)},e}();function TZ(e={}){var t=new PZ(e);return t}var _S={minimumDeletedTime:1e3*60*60*24*31,minimumCollectionAge:1e3*60,runEach:1e3*60*5,awaitReplicationsInSync:!0,waitForLeadership:!0},dI=new WeakMap,OZ=new WeakMap;function GE(e){return As(OZ,e,()=>mZ(e))}function LZ(){var e=oI(this.storage.name,this.token,this.name,this),t=this.destroy.bind(this);this.destroy=function(){return $1(this.token,this),t()};var n=GE(e);return n||(n=GE(e),dI.set(this,n)),this.leaderElector=()=>n,n}function jZ(){return this.multiInstance?this.leaderElector().isLeader:!0}function IZ(){return this.multiInstance?this.leaderElector().awaitLeadership().then(()=>!0):zv}function MZ(e){var t=dI.get(e);t&&t.die()}var $Z=!0,NZ={RxDatabase:e=>{e.leaderElector=LZ,e.isLeader=jZ,e.waitForLeadership=IZ}},CS={name:"leader-election",rxdb:$Z,prototypes:NZ,hooks:{preDestroyRxDatabase:{after:MZ}}},HE=e=>Promise.resolve(e);function VE(e,t){if(e==="_deleted")return t;t=en(t);var n=!!t._deleted;return t[e]=n,delete t._deleted,t}function $0(e,t,n){return n.map(r=>{var i=en(r);if(t!=="_deleted"){var o=!!i[t];i._deleted=o,delete i[t]}else i._deleted=!!i._deleted;var s=e.schema.primaryPath;return i[s]=Ya(e.schema.jsonSchema,i),i})}function KE(e,t){if(typeof window>"u"||typeof window!="object"||typeof window.addEventListener>"u"||navigator.onLine)return e.promiseWait(t);var n,r=new Promise(i=>{n=()=>{window.removeEventListener("online",n),i()},window.addEventListener("online",n)});return Promise.race([r,e.promiseWait(t)]).then(()=>{window.removeEventListener("online",n)})}var kS=new WeakMap,AZ=function(){function e(n,r,i,o,s,a,l,c){this.subs=[],this.subjects={received:new Ln,sent:new Ln,error:new Ln,canceled:new bs(!1),active:new bs(!1)},this.received$=this.subjects.received.asObservable(),this.sent$=this.subjects.sent.asObservable(),this.error$=this.subjects.error.asObservable(),this.canceled$=this.subjects.canceled.asObservable(),this.active$=this.subjects.active.asObservable(),this.onCancel=[],this.callOnStart=void 0,this.remoteEvents$=new Ln,this.replicationIdentifier=n,this.collection=r,this.deletedField=i,this.pull=o,this.push=s,this.live=a,this.retryTime=l,this.autoStart=c,this.metaInfoPromise=(async()=>{var f="rx-replication-meta-"+await r.database.hashFunction([this.collection.name,this.replicationIdentifier].join("-")),m=AX(this.collection.schema.jsonSchema,Ej(this.collection.schema.jsonSchema));return{collectionName:f,schema:m}})();var u=As(kS,r,()=>[]);u.push(this),this.collection.onDestroy.push(()=>this.cancel()),Object.keys(this.subjects).forEach(f=>{Object.defineProperty(this,f+"$",{get:function(){return this.subjects[f].asObservable()}})});var d=new Promise(f=>{this.callOnStart=f});this.startPromise=d}var t=e.prototype;return t.start=async function(){if(!this.isStopped()){var r=this.pull&&this.pull.modifier?this.pull.modifier:HE,i=this.push&&this.push.modifier?this.push.modifier:HE,o=this.collection.database,s=await this.metaInfoPromise,[a]=await Promise.all([this.collection.database.storage.createStorageInstance({databaseName:o.name,collectionName:s.collectionName,databaseInstanceToken:o.token,multiInstance:o.multiInstance,options:{},schema:s.schema,password:o.password,devMode:_n.isDevMode()}),kX(this.collection,s.collectionName,s.schema)]);this.metaInstance=a,this.internalReplicationState=zX({pushBatchSize:this.push&&this.push.batchSize?this.push.batchSize:100,pullBatchSize:this.pull&&this.pull.batchSize?this.pull.batchSize:100,initialCheckpoint:{upstream:this.push?this.push.initialCheckpoint:void 0,downstream:this.pull?this.pull.initialCheckpoint:void 0},forkInstance:this.collection.storageInstance,metaInstance:this.metaInstance,hashFunction:o.hashFunction,identifier:"rxdbreplication"+this.replicationIdentifier,conflictHandler:this.collection.conflictHandler,replicationHandler:{masterChangeStream$:this.remoteEvents$.asObservable().pipe(Wt(l=>!!this.pull),rs(async l=>{if(l==="RESYNC")return l;var c=en(l);return c.documents=$0(this.collection,this.deletedField,c.documents),c.documents=await Promise.all(c.documents.map(u=>r(u))),c})),masterChangesSince:async(l,c)=>{if(!this.pull)return{checkpoint:null,documents:[]};for(var u=!1,d={};!u&&!this.isStopped();)try{d=await this.pull.handler(l,c),u=!0}catch(p){var f=ot("RC_PULL",{checkpoint:l,errors:Bf(p).map(g=>Yk(g)),direction:"pull"});this.subjects.error.next(f),await KE(this.collection,bt(this.retryTime))}if(this.isStopped())return{checkpoint:null,documents:[]};var m=en(d);return m.documents=$0(this.collection,this.deletedField,m.documents),m.documents=await Promise.all(m.documents.map(p=>r(p))),m},masterWrite:async l=>{if(!this.push)return[];var c=!1;await Ul("preReplicationMasterWrite",{rows:l,collection:this.collection});var u=await Promise.all(l.map(async g=>(g.newDocumentState=await i(g.newDocumentState),g.newDocumentState===null?null:(g.assumedMasterState&&(g.assumedMasterState=await i(g.assumedMasterState)),this.deletedField!=="_deleted"&&(g.newDocumentState=VE(this.deletedField,g.newDocumentState),g.assumedMasterState&&(g.assumedMasterState=VE(this.deletedField,g.assumedMasterState))),g)))),d=u.filter(bL),f=null;for(d.length===0&&(c=!0,f=[]);!c&&!this.isStopped();)try{if(f=await this.push.handler(d),!Array.isArray(f))throw ot("RC_PUSH_NO_AR",{pushRows:l,direction:"push",args:{result:f}});c=!0}catch(g){var m=g.rxdb?g:ot("RC_PUSH",{pushRows:l,errors:Bf(g).map(E=>Yk(E)),direction:"push"});this.subjects.error.next(m),await KE(this.collection,bt(this.retryTime))}if(this.isStopped())return[];await Ul("preReplicationMasterWriteDocumentsHandle",{result:f,collection:this.collection});var p=$0(this.collection,this.deletedField,bt(f));return p}}}),this.subs.push(this.internalReplicationState.events.error.subscribe(l=>{this.subjects.error.next(l)}),this.internalReplicationState.events.processed.down.subscribe(l=>this.subjects.received.next(l.document)),this.internalReplicationState.events.processed.up.subscribe(l=>{this.subjects.sent.next(l.newDocumentState)}),tj([this.internalReplicationState.events.active.down,this.internalReplicationState.events.active.up]).subscribe(([l,c])=>{var u=l||c;this.subjects.active.next(u)})),this.pull&&this.pull.stream$&&this.live&&this.subs.push(this.pull.stream$.subscribe({next:l=>{this.remoteEvents$.next(l)},error:l=>{this.subjects.error.next(l)}})),this.live||(await O0(this.internalReplicationState),await PE(this.internalReplicationState),await this.cancel()),this.callOnStart()}},t.isStopped=function(){return!!this.subjects.canceled.getValue()},t.awaitInitialReplication=async function(){return await this.startPromise,O0(bt(this.internalReplicationState))},t.awaitInSync=async function(){await this.startPromise,await O0(bt(this.internalReplicationState));for(var r=2;r>0;)r--,await this.collection.database.requestIdlePromise(),await PE(bt(this.internalReplicationState));return!0},t.reSync=function(){this.remoteEvents$.next("RESYNC")},t.emitEvent=function(r){this.remoteEvents$.next(r)},t.cancel=async function(){if(this.isStopped())return wo;var r=this.onCancel.map(i=>_K(i()));return this.internalReplicationState&&await WX(this.internalReplicationState),this.metaInstance&&r.push(bt(this.internalReplicationState).checkpointQueue.then(()=>bt(this.metaInstance).close())),this.subs.forEach(i=>i.unsubscribe()),this.subjects.canceled.next(!0),this.subjects.active.complete(),this.subjects.canceled.complete(),this.subjects.error.complete(),this.subjects.received.complete(),this.subjects.sent.complete(),Promise.all(r)},t.remove=async function(){await bt(this.metaInstance).remove();var r=await this.metaInfoPromise;await this.cancel(),await EX(this.collection,r.collectionName,r.schema)},e}();function DZ({replicationIdentifier:e,collection:t,deletedField:n="_deleted",pull:r,push:i,live:o=!0,retryTime:s=1e3*5,waitForLeadership:a=!0,autoStart:l=!0}){if(Ku(CS),!r&&!i)throw ot("UT3",{collection:t.name,args:{replicationIdentifier:e}});var c=new AZ(e,t,n,r,i,o,s,l);return BZ(a,c),c}function BZ(e,t){var n=e&&t.collection.database.multiInstance,r=n?t.collection.database.waitForLeadership():zv;return r.then(()=>{t.isStopped()||t.autoStart&&t.start()})}var N0=zv;async function FZ(e){var t=e.database,n=Object.assign({},_S,t.cleanupPolicy?t.cleanupPolicy:{});await fI(e,n),!e.destroyed&&(await pI(e,n),await zZ(e,n))}async function fI(e,t){await e.promiseWait(t.minimumCollectionAge),!e.destroyed&&t.waitForLeadership&&await e.database.waitForLeadership()}async function pI(e,t){for(var n=e.database,r=e.storageInstance,i=!1;!i&&!e.destroyed;){if(t.awaitReplicationsInSync){var o=kS.get(e);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(e.destroyed)return;N0=N0.then(async()=>e.destroyed?!0:(await n.requestIdlePromise(),r.cleanup(t.minimumDeletedTime))),i=await N0}}async function zZ(e,t){for(;!e.destroyed;){if(await e.promiseWait(t.runEach),e.destroyed)return;await pI(e,t)}}var A0=zv;async function UZ(e){var t=e.collection,n=t.database,r=Object.assign({},_S,n.cleanupPolicy?n.cleanupPolicy:{});await fI(t,r),!t.destroyed&&(await hI(e,r),await WZ(e,r))}async function hI(e,t){for(var n=e.collection,r=n.database,i=!1;!i&&!n.destroyed;){if(t.awaitReplicationsInSync){var o=kS.get(n);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(n.destroyed)return;A0=A0.then(async()=>n.destroyed?!0:(await r.requestIdlePromise(),e._cleanup())),i=await A0}}async function WZ(e,t){for(var n=e.collection;!n.destroyed;){if(await n.promiseWait(t.runEach),n.destroyed)return;await hI(e,t)}}var GZ={name:"cleanup",rxdb:!0,prototypes:{RxCollection:e=>{e.cleanup=async function(t){var n=Object.assign({},_S,this.database.cleanupPolicy?this.database.cleanupPolicy:{});typeof t>"u"&&(t=n.minimumDeletedTime);for(var r=!1;!r&&!this.destroyed;)r=await this.storageInstance.cleanup(t)}}},hooks:{createRxCollection:{after:e=>{FZ(e.collection)}},createRxState:{after:e=>{UZ(e.state)}}}},HZ=["__proto__","constructor","prototype"];function Ad(e,t){Object.keys(t).forEach(n=>{HZ.includes(n)||(typeof e[n]>"u"?e[n]=t[n]:nf(t[n])?Ad(e[n],t[n]):e[n]=t[n])})}function nf(e){return e.toString()==="[object Object]"}var ey=function(){function e(n,r){if(this.options={},this._conditions={},this._fields={},this._path=r,n){var i=this;n.selector&&i.find(n.selector),n.limit&&i.limit(n.limit),n.skip&&i.skip(n.skip),n.sort&&n.sort.forEach(o=>i.sort(o))}}var t=e.prototype;return t.where=function(r,i){if(!arguments.length)return this;var o=typeof arguments[0];if(o==="string")return this._path=arguments[0],arguments.length===2&&(this._conditions[this._path]=arguments[1]),this;if(o==="object"&&!Array.isArray(arguments[0]))return this.merge(arguments[0]);throw mi("MQ1",{path:arguments[0]})},t.equals=function(r){this._ensurePath("equals");var i=this._path;return this._conditions[i]=r,this},t.eq=function(r){this._ensurePath("eq");var i=this._path;return this._conditions[i]=r,this},t.or=function(r){var i=this._conditions.$or||(this._conditions.$or=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.nor=function(r){var i=this._conditions.$nor||(this._conditions.$nor=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.and=function(r){var i=this._conditions.$and||(this._conditions.$and=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.mod=function(r,i){var o,s;arguments.length===1?(this._ensurePath("mod"),o=arguments[0],s=this._path):arguments.length===2&&!Array.isArray(arguments[1])?(this._ensurePath("mod"),o=arguments.slice(),s=this._path):arguments.length===3?(o=arguments.slice(1),s=arguments[0]):(o=arguments[1],s=arguments[0]);var a=this._conditions[s]||(this._conditions[s]={});return a.$mod=o,this},t.exists=function(r,i){var o,s;arguments.length===0?(this._ensurePath("exists"),o=this._path,s=!0):arguments.length===1?typeof arguments[0]=="boolean"?(this._ensurePath("exists"),o=this._path,s=arguments[0]):(o=arguments[0],s=!0):arguments.length===2&&(o=arguments[0],s=arguments[1]);var a=this._conditions[o]||(this._conditions[o]={});return a.$exists=s,this},t.elemMatch=function(r,i){if(arguments[0]===null)throw mi("MQ2");var o,s,a;if(typeof arguments[0]=="function")this._ensurePath("elemMatch"),s=this._path,o=arguments[0];else if(nf(arguments[0]))this._ensurePath("elemMatch"),s=this._path,a=arguments[0];else if(typeof arguments[1]=="function")s=arguments[0],o=arguments[1];else if(arguments[1]&&nf(arguments[1]))s=arguments[0],a=arguments[1];else throw mi("MQ2");o&&(a=new e,o(a),a=a._conditions);var l=this._conditions[s]||(this._conditions[s]={});return l.$elemMatch=a,this},t.sort=function(r){if(!r)return this;var i,o=typeof r;if(Array.isArray(r)){i=r.length;for(var s=0;sqE(this.options,d,r[d])),this}throw mi("MQ3",{args:arguments})},t.merge=function(r){if(!r)return this;if(!YE(r))throw mi("MQ4",{source:r});return r instanceof e?(r._conditions&&Ad(this._conditions,r._conditions),r._fields&&(this._fields||(this._fields={}),Ad(this._fields,r._fields)),r.options&&(this.options||(this.options={}),Ad(this.options,r.options)),r._distinct&&(this._distinct=r._distinct),this):(Ad(this._conditions,r),this)},t.find=function(r){return YE(r)&&this.merge(r),this},t._ensurePath=function(r){if(!this._path)throw ot("MQ5",{method:r})},t.toJSON=function(){var r={selector:this._conditions};return this.options.skip&&(r.skip=this.options.skip),this.options.limit&&(r.limit=this.options.limit),this.options.sort&&(r.sort=VZ(this.options.sort)),{query:r,path:this._path}},e}();function VZ(e){return Object.entries(e).map(([t,n])=>{var r=n===1?"asc":"desc",i={[t]:r};return i})}var mI=["limit","skip","maxScan","batchSize","comment"];mI.forEach(function(e){ey.prototype[e]=function(t){return this.options[e]=t,this}});var gI=["gt","gte","lt","lte","ne","in","nin","all","regex","size"];gI.forEach(function(e){ey.prototype[e]=function(){var t,n;arguments.length===1?(this._ensurePath(e),n=arguments[0],t=this._path):(n=arguments[1],t=arguments[0]);var r=this._conditions[t]===null||typeof this._conditions[t]=="object"?this._conditions[t]:this._conditions[t]={};if(e==="regex"){if(n instanceof RegExp)throw ot("QU16",{field:t,query:this._conditions});typeof n=="string"?r["$"+e]=n:(r["$"+e]=n.$regex,n.$options&&(r.$options=n.$options))}else r["$"+e]=n;return this}});function qE(e,t,n){if(Array.isArray(e.sort))throw mi("MQ6",{opts:e,field:t,value:n});if(n&&n.$meta){var r=e.sort||(e.sort={});r[t]={$meta:n.$meta};return}var i=String(n||1).toLowerCase();if(!/^(?:ascending|asc|descending|desc|1|-1)$/.test(i))throw Array.isArray(n)&&(n="["+n+"]"),mi("MQ7",{field:t,value:n});var o=e.sort||(e.sort={}),s=n.toString().replace("asc","1").replace("ascending","1").replace("desc","-1").replace("descending","-1");o[t]=parseInt(s,10)}function KZ(e,t,n){if(e.sort=e.sort||[],!Array.isArray(e.sort))throw mi("MQ8",{opts:e,field:t,value:n});e.sort.push([t,n])}function YE(e){return e instanceof ey||nf(e)}function qZ(e,t){return new ey(e,t)}var QE="queryBuilderPath";function YZ(e,t,n){var r=qZ(Ji(e.mangoQuery),e.other[QE]);r[t](n);var i=r.toJSON();return jc(e.op,i.query,e.collection,{...e.other,[QE]:i.path})}function D0(e,t){e[t]=function(n){return YZ(this,t,n)}}var QZ={name:"query-builder",rxdb:!0,prototypes:{RxQuery(e){["where","equals","eq","or","nor","and","mod","exists","elemMatch","sort"].forEach(t=>{D0(e,t)}),mI.forEach(t=>{D0(e,t)}),gI.forEach(t=>{D0(e,t)})}}},XZ=Tj(),JZ=function(e){function t(n,r,i){var o;return o=e.call(this,null,r)||this,o.id=n,o.parent=i,o}return up(t,e),t}(XZ),rf={get isLocal(){return!0},get allAttachments$(){throw ot("LD1",{document:this})},get primaryPath(){return"id"},get primary(){return this.id},get $(){var e=this,t=Ns(z1,this.parent);return e.parent.$.pipe(Wt(n=>n.documentId===this.primary),Wt(n=>n.isLocal),qt(n=>nS(n)),Hv(t.docCache.getLatestDocumentData(this.primary)),zf((n,r)=>n._rev===r._rev),qt(n=>t.docCache.getCachedRxDocument(n)),tS(qx))},get $$(){var e=this,t=B0(e),n=t.getReactivityFactory();return n.fromObservable(e.$,e.getLatest()._data,t)},get deleted$$(){var e=this,t=B0(e),n=t.getReactivityFactory();return n.fromObservable(e.deleted$,e.getLatest().deleted,t)},getLatest(){var e=Ns(z1,this.parent),t=e.docCache.getLatestDocumentData(this.primary);return e.docCache.getCachedRxDocument(t)},get(e){if(e="data."+e,!!this._data){if(typeof e!="string")throw mi("LD2",{objPath:e});var t=Ba(this._data,e);return t=_n.deepFreezeWhenDevMode(t),t}},get$(e){if(e="data."+e,_n.isDevMode()){if(e.includes(".item."))throw ot("LD3",{objPath:e});if(e===this.primaryPath)throw ot("LD4")}return this.$.pipe(qt(t=>t._data),qt(t=>Ba(t,e)),zf())},get$$(e){var t=B0(this),n=t.getReactivityFactory();return n.fromObservable(this.get$(e),this.getLatest().get(e),t)},async incrementalModify(e){var t=await of(this.parent);return t.incrementalWriteQueue.addWrite(this._data,async n=>(n.data=await e(n.data,this),n)).then(n=>t.docCache.getCachedRxDocument(n))},incrementalPatch(e){return this.incrementalModify(t=>(Object.entries(e).forEach(([n,r])=>{t[n]=r}),t))},async _saveData(e){var t=await of(this.parent),n=this._data;return e.id=this.id,t.storageInstance.bulkWrite([{previous:n,document:e}],"local-document-save-data").then(r=>{var i=r.success[0];if(!i)throw r.error[0];e=en(e),e._rev=i._rev})},async remove(){var e=await of(this.parent),t=en(this._data);return t._deleted=!0,Xv(e.storageInstance,{previous:this._data,document:t},"local-document-remove").then(n=>e.docCache.getCachedRxDocument(n))}},XE=!1,ZZ=()=>{if(!XE){XE=!0;var e=Jv,t=Object.getOwnPropertyNames(e);t.forEach(r=>{var i=Object.getOwnPropertyDescriptor(rf,r);if(!i){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(rf,r,o)}});var n=r=>()=>{throw ot("LD6",{functionName:r})};["populate","update","putAttachment","getAttachment","allAttachments"].forEach(r=>rf[r]=n(r))}};function eee(e,t){ZZ();var n=new JZ(e.id,e,t);return Object.setPrototypeOf(n,rf),n.prototype=rf,n}function B0(e){var t=e.parent;return ZX(t)?t:t.database}var rg=new WeakMap,z1=new WeakMap;function JE(e){var t=e.database?e.database:e,n=e.database?e.name:"",r=(async()=>{var i=await vI(t.token,t.storage,t.name,n,t.instanceCreationOptions,t.multiInstance);i=hS(t,i,yI);var o=new Sj("id",e.$.pipe(Wt(u=>u.isLocal)),u=>eee(u,e)),s=new Pj(i,"id",()=>{},()=>{}),a=await t.storageToken,l=i.changeStream().subscribe(u=>{for(var d=new Array(u.events.length),f=u.events,m=e.database?e.name:void 0,p=0;pn.storageInstance.close())}async function eR(e,t,n){var r=tc(10),i=await vI(r,e,t,n,{},!1);await i.remove()}function tee(e){return"plugin-local-documents-"+e}var yI=Wv({title:"RxLocalDocument",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:128},data:{type:"object",additionalProperties:!0}},required:["id","data"]});async function tR(e,t){var n=await of(this),r={id:e,data:t,_deleted:!1,_meta:Wu(),_rev:To(),_attachments:{}};return Xv(n.storageInstance,{document:r},"local-document-insert").then(i=>n.docCache.getCachedRxDocument(i))}function nR(e,t){return this.getLocal(e).then(n=>{if(n)return n.incrementalModify(()=>t);var r=this.insertLocal(e,t);return r})}async function rR(e){var t=await of(this),n=t.docCache,r=n.getLatestDocumentDataIfExists(e);return r?Promise.resolve(n.getCachedRxDocument(r)):Qv(t.storageInstance,e).then(i=>i?t.docCache.getCachedRxDocument(i):null)}function iR(e){return this.$.pipe(Hv(null),rs(async t=>{if(t)return{changeEvent:t};var n=await this.getLocal(e);return{doc:n}}),rs(async t=>{if(t.changeEvent){var n=t.changeEvent;if(!n.isLocal||n.documentId!==e)return{use:!1};var r=await this.getLocal(e);return{use:!0,doc:r}}else return{use:!0,doc:t.doc}}),Wt(t=>t.use),qt(t=>t.doc))}var nee={name:"local-documents",rxdb:!0,prototypes:{RxCollection:e=>{e.insertLocal=tR,e.upsertLocal=nR,e.getLocal=rR,e.getLocal$=iR},RxDatabase:e=>{e.insertLocal=tR,e.upsertLocal=nR,e.getLocal=rR,e.getLocal$=iR}},hooks:{createRxDatabase:{before:e=>{e.creator.localDocuments&&JE(e.database)}},createRxCollection:{before:e=>{e.creator.localDocuments&&JE(e.collection)}},preDestroyRxDatabase:{after:e=>ZE(e)},postDestroyRxCollection:{after:e=>ZE(e)},postRemoveRxDatabase:{after:e=>eR(e.storage,e.databaseName,"")},postRemoveRxCollection:{after:e=>eR(e.storage,e.databaseName,e.collectionName)}},overwritable:{}};async function ree(e,t,n){var r=await e([t,n].join("|"))>await e([n,t].join("|"));return r}function F0(e,t,n){var r=n.id,i=$n(e.response$.pipe(Wt(o=>o.peer===t),Wt(o=>o.response.id===r),qt(o=>o.response)));return e.send(t,n),i}const iee="modulepreload",oee=function(e){return"/"+e},oR={},see=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.all(n.map(l=>{if(l=oee(l),l in oR)return;oR[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(!!r)for(let m=o.length-1;m>=0;m--){const p=o[m];if(p.href===l&&(!c||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":iee,c||(f.as="script",f.crossOrigin=""),f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((m,p)=>{f.addEventListener("load",m),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}return i.then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};function Sh(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bI={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=Math.floor,r=Math.abs,i=Math.pow;return function(){function o(s,a,l){function c(f,m){if(!a[f]){if(!s[f]){var p=typeof Sh=="function"&&Sh;if(!m&&p)return p(f,!0);if(u)return u(f,!0);var g=new Error("Cannot find module '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}var E=a[f]={exports:{}};s[f][0].call(E.exports,function(b){var w=s[f][1][b];return c(w||b)},E,E.exports,o,s,a,l)}return a[f].exports}for(var u=typeof Sh=="function"&&Sh,d=0;d>16,L[$++]=255&R>>8,L[$++]=255&R;return A===2&&(R=g[_.charCodeAt(T)]<<2|g[_.charCodeAt(T+1)]>>4,L[$++]=255&R),A===1&&(R=g[_.charCodeAt(T)]<<10|g[_.charCodeAt(T+1)]<<4|g[_.charCodeAt(T+2)]>>2,L[$++]=255&R>>8,L[$++]=255&R),L}function d(_){return p[63&_>>18]+p[63&_>>12]+p[63&_>>6]+p[63&_]}function f(_,R,T){for(var C,I=[],A=R;A$?$:L+A));return C===1?(R=_[T-1],I.push(p[R>>2]+p[63&R<<4]+"==")):C===2&&(R=(_[T-2]<<8)+_[T-1],I.push(p[R>>10]+p[63&R>>4]+p[63&R<<2]+"=")),I.join("")}a.byteLength=function(_){var R=l(_),T=R[0],C=R[1];return 3*(T+C)/4-C},a.toByteArray=u,a.fromByteArray=m;for(var p=[],g=[],E=typeof Uint8Array>"u"?Array:Uint8Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=0,y=b.length;wS)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function p(S,O,D){return m(S),0>=S||O===void 0?u(S):typeof D=="string"?u(S).fill(O,D):u(S).fill(O)}function g(S){return m(S),u(0>S?0:0|_(S))}function E(S,O){if((typeof O!="string"||O==="")&&(O="utf8"),!d.isEncoding(O))throw new TypeError("Unknown encoding: "+O);var D=0|R(S,O),K=u(D),Q=K.write(S,O);return Q!==D&&(K=K.slice(0,Q)),K}function b(S){for(var O=0>S.length?0:0|_(S.length),D=u(O),K=0;KO||S.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|S}function R(S,O){if(d.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||ee(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);var D=S.length,K=2>>1;case"base64":return Ze(S).length;default:if(Q)return K?-1:Et(S).length;O=(""+O).toLowerCase(),Q=!0}}function T(S,O,D){var K=!1;if((O===void 0||0>O)&&(O=0),O>this.length||((D===void 0||D>this.length)&&(D=this.length),0>=D)||(D>>>=0,O>>>=0,D<=O))return"";for(S||(S="utf8");;)switch(S){case"hex":return Le(this,O,D);case"utf8":case"utf-8":return pe(this,O,D);case"ascii":return V(this,O,D);case"latin1":case"binary":return le(this,O,D);case"base64":return Z(this,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return He(this,O,D);default:if(K)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),K=!0}}function C(S,O,D){var K=S[O];S[O]=S[D],S[D]=K}function I(S,O,D,K,Q){if(S.length===0)return-1;if(typeof D=="string"?(K=D,D=0):2147483647D&&(D=-2147483648),D=+D,fe(D)&&(D=Q?0:S.length-1),0>D&&(D=S.length+D),D>=S.length){if(Q)return-1;D=S.length-1}else if(0>D)if(Q)D=0;else return-1;if(typeof O=="string"&&(O=d.from(O,K)),d.isBuffer(O))return O.length===0?-1:A(S,O,D,K,Q);if(typeof O=="number")return O&=255,typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(S,O,D):Uint8Array.prototype.lastIndexOf.call(S,O,D):A(S,[O],D,K,Q);throw new TypeError("val must be string, number or Buffer")}function A(S,O,D,K,Q){function de(Xe,yt){return $e===1?Xe[yt]:Xe.readUInt16BE(yt*$e)}var $e=1,rt=S.length,Je=O.length;if(K!==void 0&&(K=(K+"").toLowerCase(),K==="ucs2"||K==="ucs-2"||K==="utf16le"||K==="utf-16le")){if(2>S.length||2>O.length)return-1;$e=2,rt/=2,Je/=2,D/=2}var Oe;if(Q){var tt=-1;for(Oe=D;Oert&&(D=rt-Je),Oe=D;0<=Oe;Oe--){for(var St=!0,Ht=0;HtQ&&(K=Q)):K=Q;var de=O.length;K>de/2&&(K=de/2);for(var $e,rt=0;rtde&&($e=de):rt===2?(Je=S[Q+1],(192&Je)==128&&(St=(31&de)<<6|63&Je,127St||57343St&&($e=St)))}$e===null?($e=65533,rt=1):65535<$e&&($e-=65536,K.push(55296|1023&$e>>>10),$e=56320|1023&$e),K.push($e),Q+=rt}return G(K)}function G(S){var O=S.length;if(O<=4096)return l.apply(String,S);for(var D="",K=0;KO)&&(O=0),(!D||0>D||D>K)&&(D=K);for(var Q="",de=O;deS)throw new RangeError("offset is not uint");if(S+O>D)throw new RangeError("Trying to access beyond buffer length")}function ke(S,O,D,K,Q,de){if(!d.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(O>Q||OS.length)throw new RangeError("Index out of range")}function Ve(S,O,D,K){if(D+K>S.length)throw new RangeError("Index out of range");if(0>D)throw new RangeError("Index out of range")}function Re(S,O,D,K,Q){return O=+O,D>>>=0,Q||Ve(S,O,D,4),ze.write(S,O,D,K,23,4),D+4}function et(S,O,D,K,Q){return O=+O,D>>>=0,Q||Ve(S,O,D,8),ze.write(S,O,D,K,52,8),D+8}function lt(S){if(S=S.split("=")[0],S=S.trim().replace(W,""),2>S.length)return"";for(;S.length%4!=0;)S+="=";return S}function Pe(S){return 16>S?"0"+S.toString(16):S.toString(16)}function Et(S,O){O=O||1/0;for(var D,K=S.length,Q=null,de=[],$e=0;$eD){if(!Q){if(56319D){-1<(O-=3)&&de.push(239,191,189),Q=D;continue}D=(Q-55296<<10|D-56320)+65536}else Q&&-1<(O-=3)&&de.push(239,191,189);if(Q=null,128>D){if(0>(O-=1))break;de.push(D)}else if(2048>D){if(0>(O-=2))break;de.push(192|D>>6,128|63&D)}else if(65536>D){if(0>(O-=3))break;de.push(224|D>>12,128|63&D>>6,128|63&D)}else if(1114112>D){if(0>(O-=4))break;de.push(240|D>>18,128|63&D>>12,128|63&D>>6,128|63&D)}else throw new Error("Invalid code point")}return de}function at(S){for(var O=[],D=0;D(O-=2));++$e)D=S.charCodeAt($e),K=D>>8,Q=D%256,de.push(Q),de.push(K);return de}function Ze(S){return _e.toByteArray(lt(S))}function gt(S,O,D,K){for(var Q=0;Q=O.length||Q>=S.length);++Q)O[Q+D]=S[Q];return Q}function ee(S,O){return S instanceof O||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===O.name}function fe(S){return S!==S}var _e=o("base64-js"),ze=o("ieee754");a.Buffer=d,a.SlowBuffer=function(S){return+S!=S&&(S=0),d.alloc(+S)},a.INSPECT_MAX_BYTES=50,a.kMaxLength=2147483647,d.TYPED_ARRAY_SUPPORT=function(){try{var S=new Uint8Array(1);return S.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},S.foo()===42}catch{return!1}}(),d.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){return d.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){return d.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),d.poolSize=8192,d.from=function(S,O,D){return f(S,O,D)},d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,d.alloc=function(S,O,D){return p(S,O,D)},d.allocUnsafe=function(S){return g(S)},d.allocUnsafeSlow=function(S){return g(S)},d.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==d.prototype},d.compare=function(S,O){if(ee(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),ee(O,Uint8Array)&&(O=d.from(O,O.offset,O.byteLength)),!d.isBuffer(S)||!d.isBuffer(O))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===O)return 0;for(var D=S.length,K=O.length,Q=0,de=c(D,K);QO&&(S+=" ... "),""},d.prototype.compare=function(S,O,D,K,Q){if(ee(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),!d.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(O===void 0&&(O=0),D===void 0&&(D=S?S.length:0),K===void 0&&(K=0),Q===void 0&&(Q=this.length),0>O||D>S.length||0>K||Q>this.length)throw new RangeError("out of range index");if(K>=Q&&O>=D)return 0;if(K>=Q)return-1;if(O>=D)return 1;if(O>>>=0,D>>>=0,K>>>=0,Q>>>=0,this===S)return 0;for(var de=Q-K,$e=D-O,rt=c(de,$e),Je=this.slice(K,Q),Oe=S.slice(O,D),tt=0;tt>>=0,isFinite(D)?(D>>>=0,K===void 0&&(K="utf8")):(K=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Q=this.length-O;if((D===void 0||D>Q)&&(D=Q),0D||0>O)||O>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");for(var de=!1;;)switch(K){case"hex":return L(this,S,O,D);case"utf8":case"utf-8":return $(this,S,O,D);case"ascii":return F(this,S,O,D);case"latin1":case"binary":return z(this,S,O,D);case"base64":return Y(this,S,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,S,O,D);default:if(de)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),de=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.slice=function(S,O){var D=this.length;S=~~S,O=O===void 0?D:~~O,0>S?(S+=D,0>S&&(S=0)):S>D&&(S=D),0>O?(O+=D,0>O&&(O=0)):O>D&&(O=D),O>>=0,O>>>=0,D||Te(S,O,this.length);for(var K=this[S],Q=1,de=0;++de>>=0,O>>>=0,D||Te(S,O,this.length);for(var K=this[S+--O],Q=1;0>>=0,O||Te(S,1,this.length),this[S]},d.prototype.readUInt16LE=function(S,O){return S>>>=0,O||Te(S,2,this.length),this[S]|this[S+1]<<8},d.prototype.readUInt16BE=function(S,O){return S>>>=0,O||Te(S,2,this.length),this[S]<<8|this[S+1]},d.prototype.readUInt32LE=function(S,O){return S>>>=0,O||Te(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+16777216*this[S+3]},d.prototype.readUInt32BE=function(S,O){return S>>>=0,O||Te(S,4,this.length),16777216*this[S]+(this[S+1]<<16|this[S+2]<<8|this[S+3])},d.prototype.readIntLE=function(S,O,D){S>>>=0,O>>>=0,D||Te(S,O,this.length);for(var K=this[S],Q=1,de=0;++de=Q&&(K-=i(2,8*O)),K},d.prototype.readIntBE=function(S,O,D){S>>>=0,O>>>=0,D||Te(S,O,this.length);for(var K=O,Q=1,de=this[S+--K];0=Q&&(de-=i(2,8*O)),de},d.prototype.readInt8=function(S,O){return S>>>=0,O||Te(S,1,this.length),128&this[S]?-1*(255-this[S]+1):this[S]},d.prototype.readInt16LE=function(S,O){S>>>=0,O||Te(S,2,this.length);var D=this[S]|this[S+1]<<8;return 32768&D?4294901760|D:D},d.prototype.readInt16BE=function(S,O){S>>>=0,O||Te(S,2,this.length);var D=this[S+1]|this[S]<<8;return 32768&D?4294901760|D:D},d.prototype.readInt32LE=function(S,O){return S>>>=0,O||Te(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},d.prototype.readInt32BE=function(S,O){return S>>>=0,O||Te(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},d.prototype.readFloatLE=function(S,O){return S>>>=0,O||Te(S,4,this.length),ze.read(this,S,!0,23,4)},d.prototype.readFloatBE=function(S,O){return S>>>=0,O||Te(S,4,this.length),ze.read(this,S,!1,23,4)},d.prototype.readDoubleLE=function(S,O){return S>>>=0,O||Te(S,8,this.length),ze.read(this,S,!0,52,8)},d.prototype.readDoubleBE=function(S,O){return S>>>=0,O||Te(S,8,this.length),ze.read(this,S,!1,52,8)},d.prototype.writeUIntLE=function(S,O,D,K){if(S=+S,O>>>=0,D>>>=0,!K){var Q=i(2,8*D)-1;ke(this,S,O,D,Q,0)}var de=1,$e=0;for(this[O]=255&S;++$e>>=0,D>>>=0,!K){var Q=i(2,8*D)-1;ke(this,S,O,D,Q,0)}var de=D-1,$e=1;for(this[O+de]=255&S;0<=--de&&($e*=256);)this[O+de]=255&S/$e;return O+D},d.prototype.writeUInt8=function(S,O,D){return S=+S,O>>>=0,D||ke(this,S,O,1,255,0),this[O]=255&S,O+1},d.prototype.writeUInt16LE=function(S,O,D){return S=+S,O>>>=0,D||ke(this,S,O,2,65535,0),this[O]=255&S,this[O+1]=S>>>8,O+2},d.prototype.writeUInt16BE=function(S,O,D){return S=+S,O>>>=0,D||ke(this,S,O,2,65535,0),this[O]=S>>>8,this[O+1]=255&S,O+2},d.prototype.writeUInt32LE=function(S,O,D){return S=+S,O>>>=0,D||ke(this,S,O,4,4294967295,0),this[O+3]=S>>>24,this[O+2]=S>>>16,this[O+1]=S>>>8,this[O]=255&S,O+4},d.prototype.writeUInt32BE=function(S,O,D){return S=+S,O>>>=0,D||ke(this,S,O,4,4294967295,0),this[O]=S>>>24,this[O+1]=S>>>16,this[O+2]=S>>>8,this[O+3]=255&S,O+4},d.prototype.writeIntLE=function(S,O,D,K){if(S=+S,O>>>=0,!K){var Q=i(2,8*D-1);ke(this,S,O,D,Q-1,-Q)}var de=0,$e=1,rt=0;for(this[O]=255&S;++deS&&rt===0&&this[O+de-1]!==0&&(rt=1),this[O+de]=255&(S/$e>>0)-rt;return O+D},d.prototype.writeIntBE=function(S,O,D,K){if(S=+S,O>>>=0,!K){var Q=i(2,8*D-1);ke(this,S,O,D,Q-1,-Q)}var de=D-1,$e=1,rt=0;for(this[O+de]=255&S;0<=--de&&($e*=256);)0>S&&rt===0&&this[O+de+1]!==0&&(rt=1),this[O+de]=255&(S/$e>>0)-rt;return O+D},d.prototype.writeInt8=function(S,O,D){return S=+S,O>>>=0,D||ke(this,S,O,1,127,-128),0>S&&(S=255+S+1),this[O]=255&S,O+1},d.prototype.writeInt16LE=function(S,O,D){return S=+S,O>>>=0,D||ke(this,S,O,2,32767,-32768),this[O]=255&S,this[O+1]=S>>>8,O+2},d.prototype.writeInt16BE=function(S,O,D){return S=+S,O>>>=0,D||ke(this,S,O,2,32767,-32768),this[O]=S>>>8,this[O+1]=255&S,O+2},d.prototype.writeInt32LE=function(S,O,D){return S=+S,O>>>=0,D||ke(this,S,O,4,2147483647,-2147483648),this[O]=255&S,this[O+1]=S>>>8,this[O+2]=S>>>16,this[O+3]=S>>>24,O+4},d.prototype.writeInt32BE=function(S,O,D){return S=+S,O>>>=0,D||ke(this,S,O,4,2147483647,-2147483648),0>S&&(S=4294967295+S+1),this[O]=S>>>24,this[O+1]=S>>>16,this[O+2]=S>>>8,this[O+3]=255&S,O+4},d.prototype.writeFloatLE=function(S,O,D){return Re(this,S,O,!0,D)},d.prototype.writeFloatBE=function(S,O,D){return Re(this,S,O,!1,D)},d.prototype.writeDoubleLE=function(S,O,D){return et(this,S,O,!0,D)},d.prototype.writeDoubleBE=function(S,O,D){return et(this,S,O,!1,D)},d.prototype.copy=function(S,O,D,K){if(!d.isBuffer(S))throw new TypeError("argument should be a Buffer");if(D||(D=0),K||K===0||(K=this.length),O>=S.length&&(O=S.length),O||(O=0),0O)throw new RangeError("targetStart out of bounds");if(0>D||D>=this.length)throw new RangeError("Index out of range");if(0>K)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),S.length-OQ||K==="latin1")&&(S=Q)}}else typeof S=="number"&&(S&=255);if(0>O||this.length>>=0,D=D===void 0?this.length:D>>>0,S||(S=0);var de;if(typeof S=="number")for(de=O;de{g==="%%"||(m++,g==="%c"&&(p=m))}),d.splice(p,0,f)},a.save=function(d){try{d?a.storage.setItem("debug",d):a.storage.removeItem("debug")}catch{}},a.load=c,a.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},a.storage=function(){try{return localStorage}catch{}}(),a.destroy=(()=>{let d=!1;return()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.log=console.debug||console.log||(()=>{}),s.exports=o("./common")(a);const{formatters:u}=s.exports;u.j=function(d){try{return JSON.stringify(d)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,o("_process"))},{"./common":5,_process:12}],5:[function(o,s){s.exports=function(a){function l(d){function f(...g){if(!f.enabled)return;const E=f,b=+new Date,w=b-(m||b);E.diff=w,E.prev=m,E.curr=b,m=b,g[0]=l.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let y=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(R,T)=>{if(R==="%%")return"%";y++;const C=l.formatters[T];if(typeof C=="function"){const I=g[y];R=C.call(E,I),g.splice(y,1),y--}return R}),l.formatArgs.call(E,g),(E.log||l.log).apply(E,g)}let m,p=null;return f.namespace=d,f.useColors=l.useColors(),f.color=l.selectColor(d),f.extend=c,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>p===null?l.enabled(d):p,set:g=>{p=g}}),typeof l.init=="function"&&l.init(f),f}function c(d,f){const m=l(this.namespace+(typeof f>"u"?":":f)+d);return m.log=this.log,m}function u(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(d){return d instanceof Error?d.stack||d.message:d},l.disable=function(){const d=[...l.names.map(u),...l.skips.map(u).map(f=>"-"+f)].join(",");return l.enable(""),d},l.enable=function(d){l.save(d),l.names=[],l.skips=[];let f;const m=(typeof d=="string"?d:"").split(/[\s,]+/),p=m.length;for(f=0;f{l[d]=a[d]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(d){let f=0;for(let m=0;mY&&!Z.warned){Z.warned=!0;var pe=new Error("Possible EventEmitter memory leak detected. "+Z.length+" "+($+" listeners added. Use emitter.setMaxListeners() to increase limit"));pe.name="MaxListenersExceededWarning",pe.emitter=L,pe.type=$,pe.count=Z.length,a(pe)}return L}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(L,$,F){var z={fired:!1,wrapFn:void 0,target:L,type:$,listener:F},Y=f.bind(z);return Y.listener=F,z.wrapFn=Y,Y}function p(L,$,F){var z=L._events;if(z===void 0)return[];var Y=z[$];return Y===void 0?[]:typeof Y=="function"?F?[Y.listener||Y]:[Y]:F?w(Y):E(Y,Y.length)}function g(L){var $=this._events;if($!==void 0){var F=$[L];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}function E(L,$){for(var F=Array($),z=0;z<$;++z)F[z]=L[z];return F}function b(L,$){for(;$+1L||I(L))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+L+".");A=L}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(L){if(typeof L!="number"||0>L||I(L))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+L+".");return this._maxListeners=L,this},l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(L){for(var $=[],F=1;FY)return this;Y===0?F.shift():b(F,Y),F.length===1&&(z[L]=F[0]),z.removeListener!==void 0&&this.emit("removeListener",L,Z||$)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(L){var $,F,z;if(F=this._events,F===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[L]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete F[L]),this;if(arguments.length===0){var Y,J=Object.keys(F);for(z=0;z"u")return null;var a={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return a.RTCPeerConnection?a:null}},{}],9:[function(o,s,a){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */a.read=function(l,c,u,d,f){var m,p,g=8*f-d-1,E=(1<>1,w=-7,y=u?f-1:0,_=u?-1:1,R=l[c+y];for(y+=_,m=R&(1<<-w)-1,R>>=-w,w+=g;0>=-w,w+=d;0>1,T=f===23?i(2,-24)-i(2,-77):0,C=d?0:m-1,I=d?1:-1,A=0>c||c===0&&0>1/c?1:0;for(c=r(c),isNaN(c)||c===1/0?(g=isNaN(c)?1:0,p=_):(p=n(w(c)/b),1>c*(E=i(2,-p))&&(p--,E*=2),c+=1<=p+R?T/E:T*i(2,1-R),2<=c*E&&(p++,E/=2),p+R>=_?(g=0,p=_):1<=p+R?(g=(c*E-1)*i(2,f),p+=R):(g=c*i(2,R-1)*i(2,f),p=0));8<=f;l[u+C]=255&g,C+=I,g/=256,f-=8);for(p=p<=1.5*p?"s":"")}s.exports=function(f,m){m=m||{};var p=typeof f;if(p=="string"&&0 */let l;s.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?a:window):c=>(l||(l=Promise.resolve())).then(c).catch(u=>setTimeout(()=>{throw u},0))}).call(this)}).call(this,typeof Cr>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Cr)},{}],14:[function(o,s){(function(a,l){(function(){var c=o("safe-buffer").Buffer,u=l.crypto||l.msCrypto;s.exports=u&&u.getRandomValues?function(d,f){if(d>4294967295)throw new RangeError("requested too many random bytes");var m=c.allocUnsafe(d);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Cr)},{_process:12,"safe-buffer":30}],15:[function(o,s){function a(p,g){p.prototype=Object.create(g.prototype),p.prototype.constructor=p,p.__proto__=g}function l(p,g,E){function b(y,_,R){return typeof g=="string"?g:g(y,_,R)}E||(E=Error);var w=function(y){function _(R,T,C){return y.call(this,b(R,T,C))||this}return a(_,y),_}(E);w.prototype.name=E.name,w.prototype.code=p,m[p]=w}function c(p,g){if(Array.isArray(p)){var E=p.length;return p=p.map(function(b){return b+""}),2E?0:+E,g.length)===g}function d(p,g,E){return(E===void 0||E>p.length)&&(E=p.length),p.substring(E-g.length,E)===g}function f(p,g,E){return typeof E!="number"&&(E=0),!(E+g.length>p.length)&&p.indexOf(g,E)!==-1}var m={};l("ERR_INVALID_OPT_VALUE",function(p,g){return'The value "'+g+'" is invalid for option "'+p+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(p,g,E){var b;typeof g=="string"&&u(g,"not ")?(b="must not be",g=g.replace(/^not /,"")):b="must be";var w;if(d(p," argument"))w="The ".concat(p," ").concat(b," ").concat(c(g,"type"));else{var y=f(p,".")?"property":"argument";w='The "'.concat(p,'" ').concat(y," ").concat(b," ").concat(c(g,"type"))}return w+=". Received type ".concat(typeof E),w},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(p){return"The "+p+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(p){return"Cannot call "+p+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(p){return"Unknown encoding: "+p},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),s.exports.codes=m},{}],16:[function(o,s){(function(a){(function(){function l(b){return this instanceof l?(f.call(this,b),m.call(this,b),this.allowHalfOpen=!0,void(b&&(b.readable===!1&&(this.readable=!1),b.writable===!1&&(this.writable=!1),b.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c))))):new l(b)}function c(){this._writableState.ended||a.nextTick(u,this)}function u(b){b.end()}var d=Object.keys||function(b){var w=[];for(var y in b)w.push(y);return w};s.exports=l;var f=o("./_stream_readable"),m=o("./_stream_writable");o("inherits")(l,f);for(var p,g=d(m.prototype),E=0;E>>1,W|=W>>>2,W|=W>>>4,W|=W>>>8,W|=W>>>16,W++),W}function w(W,S){return 0>=W||S.length===0&&S.ended?0:S.objectMode?1:W===W?(W>S.highWaterMark&&(S.highWaterMark=b(W)),W<=S.length?W:S.ended?S.length:(S.needReadable=!0,0)):S.flowing&&S.length?S.buffer.head.data.length:S.length}function y(W,S){if(V("onEofChunk"),!S.ended){if(S.decoder){var O=S.decoder.end();O&&O.length&&(S.buffer.push(O),S.length+=S.objectMode?1:O.length)}S.ended=!0,S.sync?_(W):(S.needReadable=!1,!S.emittedReadable&&(S.emittedReadable=!0,R(W)))}}function _(W){var S=W._readableState;V("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(V("emitReadable",S.flowing),S.emittedReadable=!0,a.nextTick(R,W))}function R(W){var S=W._readableState;V("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(W.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,z(W)}function T(W,S){S.readingMore||(S.readingMore=!0,a.nextTick(C,W,S))}function C(W,S){for(;!S.reading&&!S.ended&&(S.length=S.length?(O=S.decoder?S.buffer.join(""):S.buffer.length===1?S.buffer.first():S.buffer.concat(S.length),S.buffer.clear()):O=S.buffer.consume(W,S.decoder),O}function J(W){var S=W._readableState;V("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,a.nextTick(Z,S,W))}function Z(W,S){if(V("endReadableNT",W.endEmitted,W.length),!W.endEmitted&&W.length===0&&(W.endEmitted=!0,S.readable=!1,S.emit("end"),W.autoDestroy)){var O=S._writableState;(!O||O.autoDestroy&&O.finished)&&S.destroy()}}function pe(W,S){for(var O=0,D=W.length;O=S.highWaterMark)||S.ended))return V("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?J(this):_(this),null;if(W=w(W,S),W===0&&S.ended)return S.length===0&&J(this),null;var D=S.needReadable;V("need readable",D),(S.length===0||S.length-W"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Cr)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(o,s){function a(b,w){var y=this._transformState;y.transforming=!1;var _=y.writecb;if(_===null)return this.emit("error",new m);y.writechunk=null,y.writecb=null,w!=null&&this.push(w),_(b);var R=this._readableState;R.reading=!1,(R.needReadable||R.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Cr)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(o,s){(function(a){(function(){function l(I,A,L){return A in I?Object.defineProperty(I,A,{value:L,enumerable:!0,configurable:!0,writable:!0}):I[A]=L,I}function c(I,A){return{value:I,done:A}}function u(I){var A=I[g];if(A!==null){var L=I[R].read();L!==null&&(I[y]=null,I[g]=null,I[E]=null,A(c(L,!1)))}}function d(I){a.nextTick(u,I)}function f(I,A){return function(L,$){I.then(function(){return A[w]?void L(c(void 0,!0)):void A[_](L,$)},$)}}var m,p=o("./end-of-stream"),g=Symbol("lastResolve"),E=Symbol("lastReject"),b=Symbol("error"),w=Symbol("ended"),y=Symbol("lastPromise"),_=Symbol("handlePromise"),R=Symbol("stream"),T=Object.getPrototypeOf(function(){}),C=Object.setPrototypeOf((m={get stream(){return this[R]},next:function(){var I=this,A=this[b];if(A!==null)return Promise.reject(A);if(this[w])return Promise.resolve(c(void 0,!0));if(this[R].destroyed)return new Promise(function(z,Y){a.nextTick(function(){I[b]?Y(I[b]):z(c(void 0,!0))})});var L,$=this[y];if($)L=new Promise(f($,this));else{var F=this[R].read();if(F!==null)return Promise.resolve(c(F,!1));L=new Promise(this[_])}return this[y]=L,L}},l(m,Symbol.asyncIterator,function(){return this}),l(m,"return",function(){var I=this;return new Promise(function(A,L){I[R].destroy(null,function($){return $?void L($):void A(c(void 0,!0))})})}),m),T);s.exports=function(I){var A,L=Object.create(C,(A={},l(A,R,{value:I,writable:!0}),l(A,g,{value:null,writable:!0}),l(A,E,{value:null,writable:!0}),l(A,b,{value:null,writable:!0}),l(A,w,{value:I._readableState.endEmitted,writable:!0}),l(A,_,{value:function($,F){var z=L[R].read();z?(L[y]=null,L[g]=null,L[E]=null,$(c(z,!1))):(L[g]=$,L[E]=F)},writable:!0}),A));return L[y]=null,p(I,function($){if($&&$.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=L[E];return F!==null&&(L[y]=null,L[g]=null,L[E]=null,F($)),void(L[b]=$)}var z=L[g];z!==null&&(L[y]=null,L[g]=null,L[E]=null,z(c(void 0,!0))),L[w]=!0}),I.on("readable",d.bind(null,L)),L}}).call(this)}).call(this,o("_process"))},{"./end-of-stream":24,_process:12}],22:[function(o,s){function a(y,_){var R=Object.keys(y);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(y);_&&(T=T.filter(function(C){return Object.getOwnPropertyDescriptor(y,C).enumerable})),R.push.apply(R,T)}return R}function l(y){for(var _,R=1;R>>0),T=this.head,C=0;T;)m(T.data,R,C),C+=T.data.length,T=T.next;return R}},{key:"consume",value:function(_,R){var T;return _I.length?I.length:_;if(C+=A===I.length?I:I.slice(0,_),_-=A,_===0){A===I.length?(++T,this.head=R.next?R.next:this.tail=null):(this.head=R,R.data=I.slice(A));break}++T}return this.length-=T,C}},{key:"_getBuffer",value:function(_){var R=g.allocUnsafe(_),T=this.head,C=1;for(T.data.copy(R),_-=T.data.length;T=T.next;){var I=T.data,A=_>I.length?I.length:_;if(I.copy(R,R.length-_,0,A),_-=A,_===0){A===I.length?(++C,this.head=T.next?T.next:this.tail=null):(this.head=T,T.data=I.slice(A));break}++C}return this.length-=C,R}},{key:w,value:function(_,R){return b(this,l({},R,{depth:0,customInspect:!1}))}}]),y}()},{buffer:3,util:2}],23:[function(o,s){(function(a){(function(){function l(d,f){u(d,f),c(d)}function c(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.emit("close")}function u(d,f){d.emit("error",f)}s.exports={destroy:function(d,f){var m=this,p=this._readableState&&this._readableState.destroyed,g=this._writableState&&this._writableState.destroyed;return p||g?(f?f(d):d&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,a.nextTick(u,this,d)):a.nextTick(u,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(E){!f&&E?m._writableState?m._writableState.errorEmitted?a.nextTick(c,m):(m._writableState.errorEmitted=!0,a.nextTick(l,m,E)):a.nextTick(l,m,E):f?(a.nextTick(c,m),f(E)):a.nextTick(c,m)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(d,f){var m=d._readableState,p=d._writableState;m&&m.autoDestroy||p&&p.autoDestroy?d.destroy(f):d.emit("error",f)}}}).call(this)}).call(this,o("_process"))},{_process:12}],24:[function(o,s){function a(f){var m=!1;return function(){if(!m){m=!0;for(var p=arguments.length,g=Array(p),E=0;Ey.length)throw new E("streams");var T,C=y.map(function(I,A){var L=Am){var p=f?d:"highWaterMark";throw new l(p,m)}return n(m)}return c.objectMode?16:16384}}},{"../../../errors":15}],28:[function(o,s){s.exports=o("events").EventEmitter},{events:7}],29:[function(o,s,a){a=s.exports=o("./lib/_stream_readable.js"),a.Stream=a,a.Readable=a,a.Writable=o("./lib/_stream_writable.js"),a.Duplex=o("./lib/_stream_duplex.js"),a.Transform=o("./lib/_stream_transform.js"),a.PassThrough=o("./lib/_stream_passthrough.js"),a.finished=o("./lib/internal/streams/end-of-stream.js"),a.pipeline=o("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(o,s,a){function l(f,m){for(var p in f)m[p]=f[p]}function c(f,m,p){return d(f,m,p)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var u=o("buffer"),d=u.Buffer;d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?s.exports=u:(l(u,a),a.Buffer=c),c.prototype=Object.create(d.prototype),l(d,c),c.from=function(f,m,p){if(typeof f=="number")throw new TypeError("Argument must not be a number");return d(f,m,p)},c.alloc=function(f,m,p){if(typeof f!="number")throw new TypeError("Argument must be a number");var g=d(f);return m===void 0?g.fill(0):typeof p=="string"?g.fill(m,p):g.fill(m),g},c.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d(f)},c.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(f)}},{buffer:3}],31:[function(o,s,a){function l(C){if(!C)return"utf8";for(var I;;)switch(C){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return C;default:if(I)return;C=(""+C).toLowerCase(),I=!0}}function c(C){var I=l(C);if(typeof I!="string"&&(R.isEncoding===T||!T(C)))throw new Error("Unknown encoding: "+C);return I||C}function u(C){this.encoding=c(C);var I;switch(this.encoding){case"utf16le":this.text=g,this.end=E,I=4;break;case"utf8":this.fillLast=p,I=4;break;case"base64":this.text=b,this.end=w,I=3;break;default:return this.write=y,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=R.allocUnsafe(I)}function d(C){return 127>=C?0:C>>5==6?2:C>>4==14?3:C>>3==30?4:C>>6==2?-1:-2}function f(C,I,A){var L=I.length-1;if(L=L)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1],A.slice(0,-1)}return A}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=C[C.length-1],C.toString("utf16le",I,C.length-1)}function E(C){var I=C&&C.length?this.write(C):"";if(this.lastNeed){var A=this.lastTotal-this.lastNeed;return I+this.lastChar.toString("utf16le",0,A)}return I}function b(C,I){var A=(C.length-I)%3;return A==0?C.toString("base64",I):(this.lastNeed=3-A,this.lastTotal=3,A==1?this.lastChar[0]=C[C.length-1]:(this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1]),C.toString("base64",I,C.length-A))}function w(C){var I=C&&C.length?this.write(C):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function y(C){return C.toString(this.encoding)}function _(C){return C&&C.length?this.write(C):""}var R=o("safe-buffer").Buffer,T=R.isEncoding||function(C){switch(C=""+C,C&&C.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};a.StringDecoder=u,u.prototype.write=function(C){if(C.length===0)return"";var I,A;if(this.lastNeed){if(I=this.fillLast(C),I===void 0)return"";A=this.lastNeed,this.lastNeed=0}else A=0;return A"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Cr)},{}],"/":[function(o,s){function a(w){return w.replace(/a=ice-options:trickle\s\n/g,"")}function l(w){console.warn(w)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const c=o("debug")("simple-peer"),u=o("get-browser-rtc"),d=o("randombytes"),f=o("readable-stream"),m=o("queue-microtask"),p=o("err-code"),{Buffer:g}=o("buffer"),E=65536;class b extends f.Duplex{constructor(y){if(y=Object.assign({allowHalfOpen:!1},y),super(y),this._id=d(4).toString("hex").slice(0,7),this._debug("new peer %o",y),this.channelName=y.initiator?y.channelName||d(20).toString("hex"):null,this.initiator=y.initiator||!1,this.channelConfig=y.channelConfig||b.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},b.config,y.config),this.offerOptions=y.offerOptions||{},this.answerOptions=y.answerOptions||{},this.sdpTransform=y.sdpTransform||(_=>_),this.streams=y.streams||(y.stream?[y.stream]:[]),this.trickle=y.trickle===void 0||y.trickle,this.allowHalfTrickle=y.allowHalfTrickle!==void 0&&y.allowHalfTrickle,this.iceCompleteTimeout=y.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=y.wrtc&&typeof y.wrtc=="object"?y.wrtc:u(),!this._wrtc)throw p(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(_){return void this.destroy(p(_,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=_=>{this._onIceCandidate(_)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(_=>{this.destroy(p(_,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=_=>{this._setupData(_)},this.streams&&this.streams.forEach(_=>{this.addStream(_)}),this._pc.ontrack=_=>{this._onTrack(_)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(y){if(!this.destroying){if(this.destroyed)throw p(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof y=="string")try{y=JSON.parse(y)}catch{y={}}this._debug("signal()"),y.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),y.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(y.transceiverRequest.kind,y.transceiverRequest.init)),y.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(y.candidate):this._pendingCandidates.push(y.candidate)),y.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(y)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(_=>{this._addIceCandidate(_)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(_=>{this.destroy(p(_,"ERR_SET_REMOTE_DESCRIPTION"))}),y.sdp||y.candidate||y.renegotiate||y.transceiverRequest||this.destroy(p(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(y){const _=new this._wrtc.RTCIceCandidate(y);this._pc.addIceCandidate(_).catch(R=>{!_.address||_.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(p(R,"ERR_ADD_ICE_CANDIDATE"))})}send(y){if(!this.destroying){if(this.destroyed)throw p(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(y)}}addTransceiver(y,_){if(!this.destroying){if(this.destroyed)throw p(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(y,_),this._needsNegotiation()}catch(R){this.destroy(p(R,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:y,init:_}})}}addStream(y){if(!this.destroying){if(this.destroyed)throw p(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),y.getTracks().forEach(_=>{this.addTrack(_,y)})}}addTrack(y,_){if(this.destroying)return;if(this.destroyed)throw p(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const R=this._senderMap.get(y)||new Map;let T=R.get(_);if(!T)T=this._pc.addTrack(y,_),R.set(_,T),this._senderMap.set(y,R),this._needsNegotiation();else throw T.removed?p(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):p(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(y,_,R){if(this.destroying)return;if(this.destroyed)throw p(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const T=this._senderMap.get(y),C=T?T.get(R):null;if(!C)throw p(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");_&&this._senderMap.set(_,T),C.replaceTrack==null?this.destroy(p(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):C.replaceTrack(_)}removeTrack(y,_){if(this.destroying)return;if(this.destroyed)throw p(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const R=this._senderMap.get(y),T=R?R.get(_):null;if(!T)throw p(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{T.removed=!0,this._pc.removeTrack(T)}catch(C){C.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(T):this.destroy(p(C,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(y){if(!this.destroying){if(this.destroyed)throw p(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),y.getTracks().forEach(_=>{this.removeTrack(_,y)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,m(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw p(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(y){this._destroy(y,()=>{})}_destroy(y,_){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",y&&(y.message||y)),m(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",y&&(y.message||y)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,y&&this.emit("error",y),this.emit("close"),_()}))}_setupData(y){if(!y.channel)return this.destroy(p(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=y.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=E),this.channelName=this._channel.label,this._channel.onmessage=R=>{this._onChannelMessage(R)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=R=>{const T=R.error instanceof Error?R.error:new Error(`Datachannel error: ${R.message} ${R.filename}:${R.lineno}:${R.colno}`);this.destroy(p(T,"ERR_DATA_CHANNEL"))};let _=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(_&&this._onChannelClose(),_=!0):_=!1},5e3)}_read(){}_write(y,_,R){if(this.destroyed)return R(p(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(y)}catch(T){return this.destroy(p(T,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>E?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=R):R(null)}else this._debug("write before connect"),this._chunk=y,this._cb=R}_onFinish(){if(!this.destroyed){const y=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?y():this.once("connect",y)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(y=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(y.sdp=a(y.sdp)),y.sdp=this.sdpTransform(y.sdp);const _=()=>{if(!this.destroyed){const R=this._pc.localDescription||y;this._debug("signal"),this.emit("signal",{type:R.type,sdp:R.sdp})}};this._pc.setLocalDescription(y).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?_():this.once("_iceComplete",_))}).catch(R=>{this.destroy(p(R,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(y=>{this.destroy(p(y,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(y=>{y.mid||!y.sender.track||y.requested||(y.requested=!0,this.addTransceiver(y.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(y=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(y.sdp=a(y.sdp)),y.sdp=this.sdpTransform(y.sdp);const _=()=>{if(!this.destroyed){const R=this._pc.localDescription||y;this._debug("signal"),this.emit("signal",{type:R.type,sdp:R.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(y).then(()=>{this.destroyed||(this.trickle||this._iceComplete?_():this.once("_iceComplete",_))}).catch(R=>{this.destroy(p(R,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(y=>{this.destroy(p(y,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(p(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const y=this._pc.iceConnectionState,_=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",y,_),this.emit("iceStateChange",y,_),(y==="connected"||y==="completed")&&(this._pcReady=!0,this._maybeReady()),y==="failed"&&this.destroy(p(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),y==="closed"&&this.destroy(p(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(y){const _=R=>(Object.prototype.toString.call(R.values)==="[object Array]"&&R.values.forEach(T=>{Object.assign(R,T)}),R);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(R=>{const T=[];R.forEach(C=>{T.push(_(C))}),y(null,T)},R=>y(R)):0{if(this.destroyed)return;const T=[];R.result().forEach(C=>{const I={};C.names().forEach(A=>{I[A]=C.stat(A)}),I.id=C.id,I.type=C.type,I.timestamp=C.timestamp,T.push(_(I))}),y(null,T)},R=>y(R)):y(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const y=()=>{this.destroyed||this.getStats((_,R)=>{if(this.destroyed)return;_&&(R=[]);const T={},C={},I={};let A=!1;R.forEach($=>{($.type==="remotecandidate"||$.type==="remote-candidate")&&(T[$.id]=$),($.type==="localcandidate"||$.type==="local-candidate")&&(C[$.id]=$),($.type==="candidatepair"||$.type==="candidate-pair")&&(I[$.id]=$)});const L=$=>{A=!0;let F=C[$.localCandidateId];F&&(F.ip||F.address)?(this.localAddress=F.ip||F.address,this.localPort=+F.port):F&&F.ipAddress?(this.localAddress=F.ipAddress,this.localPort=+F.portNumber):typeof $.googLocalAddress=="string"&&(F=$.googLocalAddress.split(":"),this.localAddress=F[0],this.localPort=+F[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let z=T[$.remoteCandidateId];z&&(z.ip||z.address)?(this.remoteAddress=z.ip||z.address,this.remotePort=+z.port):z&&z.ipAddress?(this.remoteAddress=z.ipAddress,this.remotePort=+z.portNumber):typeof $.googRemoteAddress=="string"&&(z=$.googRemoteAddress.split(":"),this.remoteAddress=z[0],this.remotePort=+z[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(R.forEach($=>{$.type==="transport"&&$.selectedCandidatePairId&&L(I[$.selectedCandidatePairId]),($.type==="googCandidatePair"&&$.googActiveConnection==="true"||($.type==="candidatepair"||$.type==="candidate-pair")&&$.selected)&&L($)}),!A&&(!Object.keys(I).length||Object.keys(C).length))return void setTimeout(y,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(F){return this.destroy(p(F,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const $=this._cb;this._cb=null,$(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};y()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>E)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(y=>{this._pc.removeTrack(y),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(y){this.destroyed||(y.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:y.candidate.candidate,sdpMLineIndex:y.candidate.sdpMLineIndex,sdpMid:y.candidate.sdpMid}}):!y.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),y.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(y){if(this.destroyed)return;let _=y.data;_ instanceof ArrayBuffer&&(_=g.from(_)),this.push(_)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const y=this._cb;this._cb=null,y(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(y){this.destroyed||y.streams.forEach(_=>{this._debug("on track"),this.emit("track",y.track,_),this._remoteTracks.push({track:y.track,stream:_}),this._remoteStreams.some(R=>R.id===_.id)||(this._remoteStreams.push(_),m(()=>{this._debug("on stream"),this.emit("stream",_)}))})}_debug(){const y=[].slice.call(arguments);y[0]="["+this._id+"] "+y[0],c.apply(null,y)}}b.WEBRTC_SUPPORT=!!u(),b.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},b.channelConfig={},s.exports=b},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})})(bI);var aee=bI.exports;const lee=za(aee);var cee=lee;function z0(e,t){e.send(JSON.stringify(t))}var wI="signaling.rxdb.info",sR="wss://"+wI+"/",aR=!1,uee=1e3*60*2;function dee({signalingServerUrl:e,wrtc:t,config:n,webSocketConstructor:r}){fee(),e=e||sR,r=r||WebSocket,e.includes(wI)&&!aR&&(aR=!0,console.warn(["RxDB Warning: You are using the RxDB WebRTC replication plugin","but you did not specify your own signaling server url.","By default it will use a signaling server provided by RxDB at "+sR,"This server is made for demonstration purposes and tryouts. It is not reliable and might be offline at any time.","In production you must always use your own signaling server instead.","Learn how to run your own server at https://rxdb.info/replication-webrtc.html","Also leave a ⭐ at the RxDB github repo 🙏 https://github.com/pubkey/rxdb 🙏"].join(" ")));var i=async o=>{var s=new Ln,a=new Ln,l=new Ln,c=new Ln,u=new Ln,d=new Map,f=!1,m,p=void 0;g(),(async()=>{for(;await xL(uee/2),!f;)p&&z0(p,{type:"ping"})})();function g(){f||(p=new r(e),p.onclose=()=>g(),p.onopen=()=>{bt(p).onmessage=b=>{var w=JSON.parse(b.data);switch(w.type){case"init":m=w.yourPeerId,z0(bt(p),{type:"join",room:o.topic});break;case"joined":var y=function(R){var T=!1,C=new cee({initiator:R>m,wrtc:t,config:n,trickle:!0});C.id=tc(10),d.set(R,C),C.on("signal",I=>{z0(bt(p),{type:"signal",senderPeerId:m,receiverPeerId:R,room:o.topic,data:I})}),C.on("data",I=>{I=JSON.parse(I.toString()),I.result?c.next({peer:C,response:I}):l.next({peer:C,message:I})}),C.on("error",I=>{u.next(ot("RC_WEBRTC_PEER",{error:I})),C.destroy(),T||(T=!0,a.next(C))}),C.on("connect",()=>{s.next(C)}),C.on("close",()=>{T||(T=!0,a.next(C)),y(R)})};w.otherPeerIds.forEach(R=>{R===m||d.has(R)||y(R)});break;case"signal":var _=Ns(d,w.senderPeerId);_.signal(w.data);break}}})}var E={error$:u,connect$:s,disconnect$:a,message$:l,response$:c,async send(b,w){await b.send(JSON.stringify(w))},destroy(){return f=!0,bt(p).close(),u.complete(),s.complete(),a.complete(),l.complete(),c.complete(),yi}};return E};return i}function fee(){if(typeof yo>"u"||typeof yo.nextTick!="function")throw ot("RC7")}async function pee(e){var t=e.collection;Ku(CS),e.pull&&(e.pull.batchSize||(e.pull.batchSize=20)),e.push&&(e.push.batchSize||(e.push.batchSize=20)),t.database.multiInstance&&await t.database.waitForLeadership();var n=0,r=tc(10);function i(){var l=n++;return t.database.token+"|"+r+"|"+l}var o=await t.database.storageToken,s=new hee(t,e,await e.connectionHandlerCreator(e));s.subs.push(s.connectionHandler.error$.subscribe(l=>s.error$.next(l)),s.connectionHandler.disconnect$.subscribe(l=>s.removePeer(l))),s.subs.push(s.connectionHandler.message$.pipe(Wt(l=>l.message.method==="token")).subscribe(l=>{s.connectionHandler.send(l.peer,{id:l.message.id,result:o})}));var a=s.connectionHandler.connect$.pipe(Wt(()=>!s.canceled)).subscribe(async l=>{if(e.isPeerValid){var c=await e.isPeerValid(l);if(!c)return}var u;try{var d=await F0(s.connectionHandler,l,{id:i(),method:"token",params:[]});u=d.result}catch(b){s.error$.next(ot("RC_WEBRTC_PEER",{error:b}));return}var f=await ree(t.database.hashFunction,o,u),m;if(f){var p=s.masterReplicationHandler,g=p.masterChangeStream$.subscribe(b=>{var w={id:"masterChangeStream$",result:b};s.connectionHandler.send(l,w)});s.subs.push(g,s.connectionHandler.disconnect$.pipe(Wt(b=>b===l)).subscribe(()=>g.unsubscribe()));var E=s.connectionHandler.message$.pipe(Wt(b=>b.peer===l),Wt(b=>b.message.method!=="token")).subscribe(async b=>{var{peer:w,message:y}=b,_=p[y.method].bind(p),R=await _(...y.params),T={id:y.id,result:R};s.connectionHandler.send(w,T)});s.subs.push(E)}else m=DZ({replicationIdentifier:[t.name,e.topic,u].join("||"),collection:t,autoStart:!0,deletedField:"_deleted",live:!0,retryTime:e.retryTime,waitForLeadership:!1,pull:e.pull?Object.assign({},e.pull,{async handler(b){var w=await F0(s.connectionHandler,l,{method:"masterChangesSince",params:[b,bt(e.pull).batchSize],id:i()});return w.result},stream$:s.connectionHandler.response$.pipe(Wt(b=>b.response.id==="masterChangeStream$"),qt(b=>b.response.result))}):void 0,push:e.push?Object.assign({},e.push,{async handler(b){var w=await F0(s.connectionHandler,l,{method:"masterWrite",params:[b],id:i()});return w.result}}):void 0});s.addPeer(l,m)});return s.subs.push(a),s}var hee=function(){function e(n,r,i){this.peerStates$=new bs(new Map),this.canceled=!1,this.subs=[],this.error$=new Ln,this.collection=n,this.options=r,this.connectionHandler=i,this.collection.onDestroy.push(()=>this.cancel()),this.masterReplicationHandler=UX(n.storageInstance,n.conflictHandler,n.database.token)}var t=e.prototype;return t.addPeer=function(r,i){var o={peer:r,replicationState:i,subs:[]};this.peerStates$.next(this.peerStates$.getValue().set(r,o)),i&&o.subs.push(i.error$.subscribe(s=>this.error$.next(s)))},t.removePeer=function(r){var i=Ns(this.peerStates$.getValue(),r);this.peerStates$.getValue().delete(r),this.peerStates$.next(this.peerStates$.getValue()),i.subs.forEach(o=>o.unsubscribe()),i.replicationState&&i.replicationState.cancel()},t.awaitFirstPeer=function(){return $n(this.peerStates$.pipe(Wt(r=>r.size>0)))},t.cancel=async function(){this.canceled||(this.canceled=!0,this.subs.forEach(r=>r.unsubscribe()),Array.from(this.peerStates$.getValue().keys()).forEach(r=>{this.removePeer(r)}),await this.connectionHandler.destroy())},e}();Ku(GZ);Ku(QZ);Ku(CS);Ku(nee);function mee(e){return Promise.all(e.character_traits.map(t=>t.split(/[[\]]/)).map(async([t,n])=>{const r=await cn.character_traits.findOne(t.trim()).exec();return Object.assign({},r==null?void 0:r.toMutableJSON(),{parameter:n==null?void 0:n.trim()})}))}const gee={expand:async function(){const[e,t]=await Promise.all([this.populate("character_plays").then(r=>r.map(i=>i.toMutableJSON())),mee(this)]);return Object.assign({},this.toMutableJSON(),{character_plays:e,character_traits:t,_inf:this.id==="Pneuma"?0:void 0,statLine:`${this.jog}"/${this.sprint}" | ${this.tac} | ${this.kickdice}/${this.kickdist}" | ${this.def}+ | ${this.arm} | ${this.inf}/${this.infmax} | ${this.reach?2:1}"`})}},vee={title:"Guild Ball model",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:32},name:{type:"string"},captain:{type:"boolean",default:!1},mascot:{type:"boolean",default:!1},veteran:{type:"boolean",default:!1},seasoned:{type:"boolean",default:!1},hp:{type:"integer",minimum:0},recovery:{type:"integer",minimum:0},jog:{type:"integer",minimum:0},sprint:{type:"integer",minimum:0},tac:{type:"integer",minimum:1},kickdice:{type:"integer",minimum:1},kickdist:{type:"integer",minimum:0},def:{type:"integer",minimum:1,maximum:6},arm:{type:"integer",minimum:0},inf:{type:"integer",minimum:0},infmax:{type:"integer",minimum:0},reach:{type:"boolean",default:!1},benched:{type:"string"},dehcneb:{type:"string"},playbook:{type:"array",minItems:2,maxItems:2,items:{type:"array",minItems:7,maxItems:7,items:{type:["string","null"]}}},character_plays:{type:"array",ref:"character_plays",items:{type:"string"}},character_traits:{type:"array",ref:"character_traits",items:{type:"string"}},heroic:{type:"string"},legendary:{type:"string"},types:{type:"string"},base:{type:"integer",enum:[30,40,50]},guild1:{type:"string",maxLength:32},guild2:{type:"string",maxLength:32,default:""},gbcp:{type:"boolean",default:!1}},required:["name","hp","recovery","jog","sprint","tac","kickdice","kickdist","def","arm","inf","infmax","playbook","types","base","guild1"],indexes:["guild1","guild2"]},yee={title:"Guild Ball guild",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:32},minor:{type:"boolean",default:!1},color:{type:"string"},shadow:{type:"string"},darkColor:{type:"string"},roster:{type:"array",items:{type:"string"}}},required:["color","roster"]},bee={title:"Guild Ball character play",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},text:{type:"string"},CST:{type:["string","integer"]},RNG:{type:["string","integer"]},SUS:{type:"boolean",default:!1},OPT:{type:"boolean",default:!1}},required:["text","CST","RNG","SUS","OPT"]},wee={title:"Guild Ball character trait",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},active:{type:"boolean",default:!1},text:{type:"string"}},required:["text"]},xee={title:"Guild Ball Game State",version:0,primaryKey:"_id",type:"object",properties:{_id:{type:"string",maxLength:128},guild:{type:"string",ref:"guilds"},score:{type:"integer",minimum:0,default:0},momentum:{type:"integer",minimum:0,default:0},roster:{type:"array",items:{type:"object",properties:{name:{type:"string",ref:"models"},health:{type:"integer",minimum:0}},required:["name","health"]}},currentStep:{type:"string",enum:["Guilds","Draft","Game"]},navigateTo:{type:"string",enum:["Guilds","Draft","Game"]}}},cn=await XX({name:"gb_playbook",localDocuments:!0,storage:TZ()});await cn.addCollections({guilds:{schema:yee},models:{schema:vee,methods:gee},character_plays:{schema:bee},character_traits:{schema:wee},game_state:{schema:xee,localDocuments:!0}});const See={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]},{urls:["turn:standard.relay.metered.ca:80","turn:standard.relay.metered.ca:80?transport=tcp","turn:standard.relay.metered.ca:443","turns:standard.relay.metered.ca:443?transport=tcp"],username:"25ee3bdfcc273a8e3ae9db71",credential:"XVIpxKTNnMR7XQDK"}]};function ES(e,t){return pee({collection:cn.game_state,connectionHandlerCreator:dee({signalingServerUrl:e,config:See}),topic:t,pull:{},push:{}}).then(n=>(n.error$.subscribe(r=>{console.log("replication error:"),console.dir(r)}),n.peerStates$.subscribe(r=>{console.log("new peer states:"),console.dir(r)}),n))}const xI=k.createContext({}),_ee=e=>{const t=k.useMemo(()=>cn.getLocal$("settings"),[]);return k.useEffect(()=>{if(!t)return;const n=t.subscribe(r=>{if(!r){cn==null||cn.upsertLocal("settings",SI).catch(console.error);return}});return()=>n.unsubscribe()},[t]),v.jsx(xI.Provider,{value:{setting$:t},children:e.children})},ai=()=>k.useContext(xI),SI={dataSet:"GB-Playbook-4-6.json",language:"auto",initialScreen:"/game",gameSize:6,networkPlay:!1,uiPreferences:{displayStatLine:!1},cardPreferences:{preferredStyle:"gbcp"},gamePlayRoute:"/game",libraryRoute:"/library"},RS=k.createContext(null),ls=e=>{const t=k.useContext(RS);return v.jsx(Tx,{container:t,children:e.children})},Cee=Rt.forwardRef((e,t)=>v.jsx(BF,{position:"static",className:"no-print",children:v.jsxs(HF,{variant:"dense",children:[v.jsx(Zt,{ref:t,sx:{display:"flex",flexDirection:"row",width:"100%"}}),v.jsx(Lo,{size:"small",color:"inherit",onClick:e.onClick,children:v.jsx(CO,{})})]})})),lR=Rt.forwardRef((e,t)=>{const{href:n,...r}=e;return v.jsx(wT,{ref:t,to:n,...r,role:void 0})}),kee=xx({palette:{mode:"dark",primary:{main:"#3d708f"},secondary:{main:"#ffb300"},background:{default:"#121a22"}},components:{MuiCssBaseline:{styleOverrides:{body:{background:"linear-gradient(120deg, black, #221a22, #5f405f, #221a22, black)"},"@media print":{body:{background:"white"}}}},MuiLink:{defaultProps:{component:lR}},MuiButtonBase:{defaultProps:{LinkComponent:lR}}}}),_h=e=>v.jsx(zD,{to:e.to,style:{textDecoration:"inherit",color:"inherit"},onClick:e.onClick,children:({isActive:t})=>v.jsx(Wz,{selected:t,children:e.children})}),Eee=()=>{const[e,t]=k.useState(null),[n,r]=k.useState(!1);return v.jsxs(m8,{theme:kee,children:[v.jsx(DG,{}),v.jsxs("div",{className:"App",children:[v.jsx(Cee,{ref:i=>t(i),onClick:()=>r(!0)}),v.jsx(Ree,{drawer:n,setDrawer:r}),v.jsx(RS.Provider,{value:e,children:v.jsx(tx,{})})]})]})};function Ree(e){const{drawer:t,setDrawer:n}=e,{setting$:r}=ai(),[i,o]=k.useState(),[s,a]=k.useState();return k.useEffect(()=>{const l=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.gamePlayRoute)).subscribe(u=>o(u)),c=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.libraryRoute)).subscribe(u=>a(u));return()=>{l==null||l.unsubscribe(),c==null||c.unsubscribe()}}),v.jsxs(Rz,{anchor:"right",open:t,onClose:()=>n(!1),PaperProps:{sx:{width:"275px"}},ModalProps:{keepMounted:!0},children:[v.jsxs(Xd,{children:[v.jsxs(fo,{children:[v.jsx("img",{src:new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAJaUlEQVRYR+2YeVjVVRrHP3fj3ssqYCwqoA5iYvloljbYOE8GqOk8hDpZrizqkE5mapmKWGJj82SFKYwLomTpqJTmxthoY5lLZW65IEEsAgKxidcLd4E7zzkoiVzF0uqPmXMf/uD3u+fc7/m+3+973vcoxm2IsnEvhgIaLY0Ufp2P1WxFoVDci1VR/B/gXfL4izDYYGmQIbbZ7l499xQgVsj/6nvqjHWoVWo0ag0NjQ13xeE9A6hUKjBcNVJ2ogQ3nRtGk5HK2iqc9U6/PUClQkmdpY6e3sFM6DOOLj6dMZgMpO1YT/rudHRa3c8O910zqECB1daAi4MTb0cuRWlV8P4H7xPy+xB6PtCTWe/OZt+xT3FxdKaxsfEns3nXAAV7BvNVHunUl1fCXuLFmS+S9E4SQUFBnM86z47PdzB/1QI8XD1+lh7vGKBw5fUP2BD+FC4VzwXAR/36MTv0RSZOnMimjZvo0KEDBQUF7D68h7kp81oAFLPF3DtxeZsABUONtkZMVhPWxgZstkYJVKlU4qByQKvWcsVsoH+nR3gpdCYxsTGsS1tH586dycvLY+ehXcxcNgsnnTPWBosMsUqlQuegw0HtINe+HdBbApRHlQ3Jjk6txd/NDz/3TrjqXTFbLZTVlpFfXUB1XTXmBgsDuzzGrCdmEB0Tzfp16wkICCA/P5+dX+xixdZk+vfsRzsXd8wWM4VlhWQVZFFe/YN0uVqtvqU+7QIUrFkaLHJ3A7v+gcg+Efg6+9gV+KfZB/jgm00EtPMnYej8ZoBdu3bl7JmzoEKydfMQrt/0r3+SnvkeBqMBR52jXY22AiiYszRY0Wt0THssjr5+D1FeWs6GjRs4dPgwZWVl6HQ6evYIJvKpSB4f9DhXrUYOZR8mPDi0VYhN9SY2btrI3r17KSouknMffOBBxo8bx0N9+5JXkiedXlBaiF6nb8VkK4DX9TA/9BV6+N7P8uQVvLpwIVWVVXYZfHLYk6SlpuHt4y3fT4qdxNq0tQQHB7Ny5Uri4uI4d+5cq7mCiKnTprJi+QqKyouISozmitEgw32jJlsAFKG9YrpCbP9ohvUcSuLriSTEJ8jFu/h1IjwiEqeOfpiMRrIPH+Tf+/fLd926dePAgQP4+voSHR1Neno6Hh4e1NXVyb/Q0FDCwsJwdnaWYDMyMmQkxIiOiSFt7Voyj2QyJ3kurs6uLVhsBih2ZLaa8XH25u0Rb3L0yFEGDBggF4kYEs5TS5LI0jgzwNudK/Vmgh017Exdxd8S4qk3mYiIiGD79u1MmDCBDRs2SJcLJtLS0oiKimrB4MWLFxk7diwHDx6UzzMzMxkyZAij458lpygHvVYv9S9GM0CVQsXl+ss83XsUz/YdzfA/DWfPrj0EBvgze1smju3v49KlUiorayi+WIyXWskLTw1l6avzWb78XbmYSCtLly4lOTlZ/h8fH09iYiJWq7UZoACt0WioqKigV69elJaWSh3v37ef1dvXsGzrcjxc3WloaCoymgHKE8Fk4LVhCfzOqSuduvhRVVHJ9JfnED57Pp9/+Q1FpT/gpVLygKcrLiYTaqMRn473MezpEdRU10jN5eTkSJBubm5kZ2fj6ekpk7lg9Powm804ODgwb948lixZgru7O8VFxZwpPMuk1yfj4uTSHOYWGhQhXjb6bYxFVwnsHihDFL/8HwQ+OpBTJ7+lt7cnTqZ6qvMKqLmQg8OVWob+ZSKjZ8/gxIkTzJkzR+5cAOzTpw/Hjx+3ayzBqEjW27ZtY+TIkSiUCnKzc1G5qhjx8ii0Gu21s+oGBsVKFquF5c8kUZ1XRffg7k1hWrKUkD8+gflSCUVnzmP4Pg+9wYCvV3t8vTwJCnucoTOe5/ixYxKgYOuNN96gd+/eEqC93uRmgILdnOwclC4qRs75iQCfi5vK+BHP8PWO3SgrKvHz9cLT3Q1NRQWqgkLcpk2m//ix1JSXk5KSIpmZMmUKrq6uMsTt27dvFWKLxSJ1OHfuXLkZIYOii0WcyjvN5CVTcHX60cktQnwzg6IvC+jalc1Ll6E3XOVyXj6qsjKsF7LRqtX0+2scr+zfy9+TkiTbp06dQqfX0T3oGvvXTCIAXWfSnkmGDB3Cnt17SM5IIWXbSvsmsRdiQb2o4cJCQ1m94FU8KyqpPXwUtwB/VI560msqmB4fj6W+noEDB/LZZ59JoJGRkTLlaLVaaZyb00xJSQljxoxp/r5INyEDQhg192l5TmsdtM3J+rYMih/z8fGRqaBDgD+jnxyGv5MLRoWN/V9+yacij9lsMpxHjh4hMDBQ5q/L1ZdlDs3NzZWABw8ezKBBg2SizsrK4sMPP0SAFGNBwgIWvbaIzfu2sHj967RzbtfiTL41wJ7dZTWzatUqRGJdvHixXUfe36MH69evo3+//qT8ZxXfncvmnWlvUVxczMSoKPbv22d3nkgtCQsTmPHCDE5/d5rn3pwmNyfSXVO12TTaBJiamkpsbCxfHf2KLRmbOXnyJCaTiQ4dOxIeFk70hGiUGiWbjm/moxPbyPniOwY/HE5i3CI0Kg2ffPIJH3/8MVkXshCFg7e3NyEhIYwfNx4vby8OnT5E/OoEDMaraDVN9eGNo02Aq1evJiYmBpvKhhp1KzbOl2ex5ZsMTpd+i16pp+hYIZVVlXTz70bM8GiGDxhml8GCsgLSd73Hji92NhW/ApydnqVNgGtWr2HS5EnM+mgOLjpn/D38UCs11Birya8qpKi2WFbZjlpHeScj7mZsVhv15npZnHZo70uQXxAdvTpKENW11eQWf09OcQ7GeqNMKWLcqqpuE2DqmlRiJ8Xy3JbnKaktQa1UN2tFNOei5BctQKP43HB5pFKqZGoxWUyYzKZm4YtnoqEXRaz4TluNvV2AlbkVBPcKloJNXpHMlLgpTN86k8q6SrRqB2FcKeTrzU+Tmu3fbslm61rDdT3Wgq2btWZXBzeaRLAgGqOkP79FY5WVTv5+ck7G1q2MHDWKqVumy/5D7N5uOH7p6zeVQkmtycD4h8cQ2StCuu/SpUuyjbxQns3CzEWyi7sxBbS0269wPyiYEWGd2G8cTwQNkr9/pvQsqw6lUmGokGnjNwUoxW5rpN5qwkPvLg1RVVclTXDL0DZn1F+BwSatN4latJ2CLY1SIw3Q5i3AL63Bm10kgMr8dMOxcyun3c7Ft51zBy/bvPq4gzWuHZq/UojvGFBryv83b/n/CxJONjR0KMriAAAAAElFTkSuQmCC",import.meta.url).href,style:{borderRadius:5.4},alt:""}),v.jsx(gs,{style:{textAlign:"center"},children:v.jsx(xt,{variant:"h6",fontFamily:"Comfortaa",children:"GB Playbook"})})]}),v.jsx(Zo,{}),v.jsx(_h,{to:i??"/game",onClick:()=>n(!1),children:v.jsx(gs,{children:"Game Play"})}),v.jsx(_h,{to:s??"/library",onClick:()=>n(!1),children:v.jsx(gs,{children:"Library"})}),v.jsx(_h,{to:"/print",onClick:()=>n(!1),children:v.jsx(gs,{children:"Card Printer"})}),v.jsx(_h,{to:"/settings",onClick:()=>n(!1),children:v.jsx(gs,{children:"Settings"})}),v.jsx("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"1em"},children:v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/cleech/GBPlaybook/blob/pwa/README.md",children:"About"})})})]}),v.jsx(Zo,{}),v.jsxs(Xd,{children:[v.jsx(fo,{children:v.jsx(gs,{children:"Rules Documents:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-Rulebook-4.1.pdf",children:"Season 4 Core Rulebook"})}),v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-FAQ-19-12-20.pdf",children:"Season 4 FAQ"})}),v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-RegionalCup-Rules-200128__1.pdf",children:"Organized Play Rules"})})]})]}),v.jsx(Zo,{}),v.jsxs(Xd,{children:[v.jsx(fo,{children:v.jsx(gs,{children:"Community Links:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://steamforged.com/pages/guild-ball",children:"Steamforged Games"})}),v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://discord.gg/fvpFSfm976",children:"Guild Ball Community Project"})}),v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://www.longshanks.org/systems/guildball/",children:"Longshanks"})})]})]})]})}const Pee=Gn(v.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Tee=Gn([v.jsx("path",{d:"M5 19h14V5H5zM16.5 6c.83 0 1.5.67 1.5 1.5S17.33 9 16.5 9 15 8.33 15 7.5 15.67 6 16.5 6m0 9c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M12 10.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M7.5 6C8.33 6 9 6.67 9 7.5S8.33 9 7.5 9 6 8.33 6 7.5 6.67 6 7.5 6m0 9c.83 0 1.5.67 1.5 1.5S8.33 18 7.5 18 6 17.33 6 16.5 6.67 15 7.5 15",opacity:".3"},"0"),v.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14z"},"1"),v.jsx("circle",{cx:"7.5",cy:"16.5",r:"1.5"},"2"),v.jsx("circle",{cx:"7.5",cy:"7.5",r:"1.5"},"3"),v.jsx("circle",{cx:"12",cy:"12",r:"1.5"},"4"),v.jsx("circle",{cx:"16.5",cy:"16.5",r:"1.5"},"5"),v.jsx("circle",{cx:"16.5",cy:"7.5",r:"1.5"},"6")],"CasinoTwoTone"),_I=Gn([v.jsx("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m-2 13-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z",opacity:".3"},"0"),v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"},"1")],"CheckCircleTwoTone"),PS=Gn(v.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),rc=Gn(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),Oee=Gn(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),Lee=Gn(v.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),jee=Gn(v.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Sync"),Iee=new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1});function rm(e){return e===0?1:e*rm(e-1)}function Mee(e,t,n){if(!e||!t)return[];const r=t,o=1-Math.pow((e-1)/6,n?2:1),s=[...Array(t).keys()].map(l=>l+1).map(l=>rm(r)/(rm(l)*rm(r-l))*Math.pow(o,l)*Math.pow(1-o,r-l));return[...Array(t).keys()].map(l=>s.slice(l).reduce((c,u)=>c+u,0)).map(l=>Math.min(l,.999))}function cR(e){const{value:t,setValue:n,clamp:r}=e;return v.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v.jsxs(Df,{size:"small",variant:"contained",children:[v.jsx(yn,{onClick:i=>{i.stopPropagation(),r(t-1)&&n(t-1)},children:v.jsx(Oee,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(yn,{disabled:!0,size:"small",children:v.jsx(xt,{variant:"body2",color:"text.primary",children:t})}),v.jsx(yn,{onClick:i=>{i.stopPropagation(),r(t+1)&&n(t+1)},children:v.jsx(Pee,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function $ee(){const[e,t]=k.useState(null),n=!!e,[r,i]=k.useState(4),[o,s]=k.useState(4),[a,l]=k.useState(!1);return v.jsxs(v.Fragment,{children:[v.jsx(Lo,{size:"small",onClick:c=>{t(e?null:c.currentTarget)},children:v.jsx(Tee,{})}),v.jsxs(Fv,{open:n,anchorEl:e,onClose:()=>{t(null)},children:[v.jsx(xt,{variant:"h5",textAlign:"center",children:"Dice Odds"}),v.jsx(Zo,{}),v.jsxs("div",{style:{margin:"1em",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.5em"},children:[v.jsx(xt,{children:"Target Number :"}),v.jsx(cR,{value:r,setValue:i,clamp:c=>c>1&&c<7}),v.jsx(xt,{children:"Dice Pool :"}),v.jsx(cR,{value:o,setValue:s,clamp:c=>c>0}),v.jsx(xt,{children:"Reroll :"}),v.jsx(Vo,{checked:a,onChange:(c,u)=>{l(u)},sx:{padding:0}})]}),v.jsx(Zo,{}),v.jsxs("div",{style:{margin:"1em",display:"grid",gap:"0em 1em",justifyContent:"center",justifyItems:"center",gridTemplateColumns:"auto auto"},children:[v.jsx(xt,{sx:{textDecoration:"underline"},children:"Hits"}),v.jsx(xt,{sx:{textDecoration:"underline"},children:"Chance"}),Mee(r,o,a).map((c,u)=>v.jsxs(k.Fragment,{children:[v.jsxs("div",{children:[u+1,"+"]}),v.jsx("div",{className:`dice-bin-${Math.floor(c*10)}`,style:{padding:"0 1em",margin:"1px",width:"100%"},children:Iee.format(c)})]},u))]})]})]})}const Nee={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class ig{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Nee,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[a,l]=s;for(let c=0;c{let[a,l]=s;for(let c=0;c{e=r,t=i});return n.resolve=e,n.reject=t,n}function uR(e){return e==null?"":""+e}function Aee(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const Dee=/###/g;function sf(e,t,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(Dee,"."):a}function i(){return!e||typeof e=="string"}const o=typeof t!="string"?t:t.split(".");let s=0;for(;s":">",'"':""","'":"'","/":"/"};function Uee(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>zee[t]):e}class Wee{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Gee=[" ",",","?","!",";"],Hee=new Wee(20);function Vee(e,t,n){t=t||"",n=n||"";const r=Gee.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=Hee.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}function U1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;o-1&&l0?e.replace("_","-"):e}class fR extends ty{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&o?a.push(...r.split(o)):a.push(r)));const l=og(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!s||typeof r!="string"?l:U1(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),dR(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Object.prototype.toString.apply(r[o])==="[object Array]")&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let l=og(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?CI(l,r,o):l={...l,...r},dR(this.data,a,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var kI={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const pR={};class ag extends ty{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Aee(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Yo.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Vee(t,r,i);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:o};const c=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),t=c.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const _=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${_}${s}`,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${_}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const d=this.resolve(t,n);let f=d&&d.res;const m=d&&d.usedKey||s,p=d&&d.exactUsedKey||s,g=Object.prototype.toString.apply(f),E=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&E.indexOf(g)<0&&!(typeof b=="string"&&g==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,f,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(d.res=_,d.usedParams=this.getUsedParamsDetails(n),d):_}if(o){const _=g==="[object Array]",R=_?[]:{},T=_?p:m;for(const C in f)if(Object.prototype.hasOwnProperty.call(f,C)){const I=`${T}${o}${C}`;R[C]=this.translate(I,{...n,joinArrays:!1,ns:a}),R[C]===I&&(R[C]=f[C])}f=R}}else if(w&&typeof b=="string"&&g==="[object Array]")f=f.join(b),f&&(f=this.extendTranslation(f,t,n,r));else{let _=!1,R=!1;const T=n.count!==void 0&&typeof n.count!="string",C=ag.hasDefaultValue(n),I=T?this.pluralResolver.getSuffix(c,n.count,n):"",A=n.ordinal&&T?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",L=T&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),$=L&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${I}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(f)&&C&&(_=!0,f=$),this.isValidLookup(f)||(R=!0,f=s);const z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:f,Y=C&&$!==f&&this.options.updateMissing;if(R||_||Y){if(this.logger.log(Y?"updateKey":"missingKey",c,l,s,Y?$:f),o){const G=this.resolve(s,{...n,keySeparator:!1});G&&G.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let J=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let G=0;G{const Le=C&&le!==f?le:z;this.options.missingKeyHandler?this.options.missingKeyHandler(G,l,V,Le,Y,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(G,l,V,Le,Y,n),this.emit("missingKey",G,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?J.forEach(G=>{const V=this.pluralResolver.getSuffixes(G,n);L&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(le=>{pe([G],s+le,n[`defaultValue${le}`]||$)})}):pe(J,s,$))}f=this.extendTranslation(f,t,n,d,r),R&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(R||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,_?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),c){const f=t.match(this.interpolator.nestingRegexp),m=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;i=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",m=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(E=>{this.isValidLookup(r)||(a=E,!pR[`${g[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(pR[`${g[0]}-${E}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{if(this.isValidLookup(r))return;s=b;const w=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,u,b,E,n);else{let _;f&&(_=this.pluralResolver.getSuffix(b,n.count,n));const R=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(w.push(u+_),n.ordinal&&_.indexOf(T)===0&&w.push(u+_.replace(T,this.options.pluralSeparator)),m&&w.push(u+R)),p){const C=`${u}${this.options.contextSeparator}${n.context}`;w.push(C),f&&(w.push(C+_),n.ordinal&&_.indexOf(T)===0&&w.push(C+_.replace(T,this.options.pluralSeparator)),m&&w.push(C+R))}}let y;for(;y=w.pop();)this.isValidLookup(r)||(o=y,r=this.getResource(b,E,y,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function U0(e){return e.charAt(0).toUpperCase()+e.slice(1)}class hR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yo.create("languageUtils")}getScriptPartFromCode(t){if(t=sg(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=sg(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=U0(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=U0(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=U0(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let Kee=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],qee={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const Yee=["v1","v2","v3"],Qee=["v4"],mR={zero:0,one:1,two:2,few:3,many:4,other:5};function Xee(){const e={};return Kee.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:qee[t.fc]}})}),e}class Jee{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Yo.create("pluralResolver"),(!this.options.compatibilityJSON||Qee.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Xee()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(sg(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>mR[i]-mR[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!Yee.includes(this.options.compatibilityJSON)}}function gR(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Fee(e,t,n);return!o&&i&&typeof n=="string"&&(o=U1(e,n,r),o===void 0&&(o=U1(t,n,r))),o}class Zee{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yo.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:m,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:E,maxReplaces:b,alwaysFormat:w}=t.interpolation;this.escape=n!==void 0?n:Uee,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?wc(o):s||"{{",this.suffix=a?wc(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?wc(f):m||wc("$t("),this.nestingSuffix=p?wc(p):g||wc(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=b||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(p){return p.replace(/\$/g,"$$$$")}const u=p=>{if(p.indexOf(this.formatSeparator)<0){const w=gR(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:p}):w}const g=p.split(this.formatSeparator),E=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(gR(n,l,E,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:E})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>c(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?c(this.escape(p)):c(p)}].forEach(p=>{for(a=0;o=p.regex.exec(t);){const g=o[1].trim();if(s=u(g),s===void 0)if(typeof d=="function"){const b=d(t,o,i);s=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))s="";else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=uR(s));const E=p.safeValue(s);if(t=t.replace(o[0],E),f?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;function a(l,c){const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const m=f.match(/'/g),p=f.match(/"/g);(m&&m.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=u.shift(),l=u,c=!0}if(o=n(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=uR(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),c&&(o=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}function ete(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(!s)return;const[a,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,"");n[a.trim()]||(n[a.trim()]=c),c==="false"&&(n[a.trim()]=!1),c==="true"&&(n[a.trim()]=!0),isNaN(c)||(n[a.trim()]=parseInt(c,10))})}return{formatName:t,formatOptions:n}}function xc(e){const t={};return function(r,i,o){const s=i+JSON.stringify(o);let a=t[s];return a||(a=e(sg(i),o),t[s]=a),a(r)}}class tte{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yo.create("formatter"),this.options=t,this.formats={number:xc((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:xc((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:xc((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:xc((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:xc((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=xc(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,l)=>{const{formatName:c,formatOptions:u}=ete(l);if(this.formats[c]){let d=a;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},m=f.locale||f.lng||i.locale||i.lng||r;d=this.formats[c](a,m,{...u,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}function nte(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class rte extends ty{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Yo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},a={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,u=!1,s[f]===void 0&&(s[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(a[c]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const a={};this.queue.forEach(l=>{Bee(l.loaded,[o],s),nte(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&i{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,i,l):u=c(t,n,r,i),u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}else c(t,n,r,i,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function vR(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function yR(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ch(){}function ite(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class Hf extends ty{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=yR(t),this.services={},this.logger=Yo,this.modules={external:[]},ite(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=vR();this.options={...i,...this.options,...yR(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(u){return u?typeof u=="function"?new u:u:null}if(!this.options.isClone){this.modules.logger?Yo.init(o(this.modules.logger),this.options):Yo.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=tte);const d=new hR(this.options);this.store=new fR(this.options.resources,this.options);const f=this.services;f.logger=Yo,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Jee(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Zee(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new rte(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var p=arguments.length,g=new Array(p>1?p-1:0),E=1;E1?p-1:0),E=1;E{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ch),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=Ed(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ch;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=Ed();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Ch),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&kI.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Ed();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{s(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const o=function(s,a){let l;if(typeof a!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${p}`):m=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,i.t(m,l)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=Ed();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Ed();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new hR(vR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Hf(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ch;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Hf(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new fR(this.store.data,i),o.services.resourceStore=o.store),o.translator=new ag(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function wR(e,t,n){e.loadNamespaces(t,EI(e,n))}function xR(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,EI(e,r))}function ste(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=t.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!i||s(o,e)))}function ate(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(W1("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,e))return!1}}):ste(e,t,n)}const lte=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,cte={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ute=e=>cte[e],dte=e=>e.replace(lte,ute);let G1={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:dte};function fte(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};G1={...G1,...e}}function pte(){return G1}let RI;function hte(e){RI=e}function mte(){return RI}const gte={type:"3rdParty",init(e){fte(e.options.react),hte(e)}},vte=k.createContext();class yte{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const bte=(e,t)=>{const n=k.useRef();return k.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function PI(e,t,n,r){return e.getFixedT(t,n,r)}function wte(e,t,n,r){return k.useCallback(PI(e,t,n,r),[e,t,n,r])}function xte(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=k.useContext(vte)||{},o=n||r||mte();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new yte),!o){W1("You will need to pass in an i18next instance by using initReactI18next");const _=(T,C)=>typeof C=="string"?C:C&&typeof C=="object"&&typeof C.defaultValue=="string"?C.defaultValue:Array.isArray(T)?T[T.length-1]:T,R=[_,{},!1];return R.t=_,R.i18n={},R.ready=!1,R}o.options.react&&o.options.react.wait!==void 0&&W1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...pte(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=e||i||o.options&&o.options.defaultNS;c=typeof c=="string"?[c]:c||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(_=>ate(_,o,s)),d=wte(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),f=()=>d,m=()=>PI(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),[p,g]=k.useState(f);let E=c.join();t.lng&&(E=`${t.lng}${E}`);const b=bte(E),w=k.useRef(!0);k.useEffect(()=>{const{bindI18n:_,bindI18nStore:R}=s;w.current=!0,!u&&!a&&(t.lng?xR(o,t.lng,c,()=>{w.current&&g(m)}):wR(o,c,()=>{w.current&&g(m)})),u&&b&&b!==E&&w.current&&g(m);function T(){w.current&&g(m)}return _&&o&&o.on(_,T),R&&o&&o.store.on(R,T),()=>{w.current=!1,_&&o&&_.split(" ").forEach(C=>o.off(C,T)),R&&o&&R.split(" ").forEach(C=>o.store.off(C,T))}},[o,E]),k.useEffect(()=>{w.current&&u&&g(f)},[o,l,u]);const y=[p,o,u];if(y.t=p,y.i18n=o,y.ready=u,u||!u&&!a)return y;throw new Promise(_=>{t.lng?xR(o,t.lng,c,()=>_()):wR(o,c,()=>_())})}function Ste(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var TI=[],_te=TI.forEach,Cte=TI.slice;function kte(e){return _te.call(Cte.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var SR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Ete=function(t,n,r){var i=r||{};i.path=i.path||"/";var o=encodeURIComponent(n),s="".concat(t,"=").concat(o);if(i.maxAge>0){var a=i.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(a))}if(i.domain){if(!SR.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(i.domain)}if(i.path){if(!SR.test(i.path))throw new TypeError("option path is invalid");s+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},_R={create:function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),i&&(o.domain=i),document.cookie=Ete(t,encodeURIComponent(n),o)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),o=i.split("&"),s=0;s0){var l=o[s].substring(0,a);l===t.lookupQuerystring&&(n=o[s].substring(a+1))}}}return n}},Rd=null,CR=function(){if(Rd!==null)return Rd;try{Rd=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Rd=!1}return Rd},Tte={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&CR()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&CR()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},Pd=null,kR=function(){if(Pd!==null)return Pd;try{Pd=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Pd=!1}return Pd},Ote={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&kR()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&kR()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},Lte={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},jte={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Ite={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},Mte={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function $te(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var OI=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ste(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return Vs(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=kte(r,this.options||{},$te()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(o){return o.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Rte),this.addDetector(Pte),this.addDetector(Tte),this.addDetector(Ote),this.addDetector(Lte),this.addDetector(jte),this.addDetector(Ite),this.addDetector(Mte)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(o){if(r.detectors[o]){var s=r.detectors[o].lookup(r.options);s&&typeof s=="string"&&(s=[s]),s&&(i=i.concat(s))}}),i=i.map(function(o){return r.options.convertDetectedLanguage(o)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(o){i.detectors[o]&&i.detectors[o].cacheUserLanguage(n,i.options)}))}}]),e}();OI.type="languageDetector";pr.use(OI).use(gte).init({fallbackLng:"en",resources:{en:{translation:{"Guild Ball":"Guild Ball"}},fr:{translation:{"Guild Ball":"Guild Ball"}}},debug:!1,interpolation:{escapeValue:!1}});const LI=k.createContext({manifest:void 0,version:"0",gameplans:void 0}),ER="gbdata_meta";let W0=!1;async function Nte(e,t,n){var r;if(W0){console.error("concurent reloads");return}console.log(`loading ${e}`),W0=!0;try{const i=(r=t.datafiles.find(s=>s.filename===e))==null?void 0:r.sha256,o=await cn.getLocal(ER);if(o&&o.get("filename")===e&&o.get("sha256")===i){console.log("database pre-loaded :)");return}console.log("database re-loading :("),await Promise.all([cn.guilds.find().exec().then(s=>cn.guilds.bulkRemove(s.map(a=>a.name))).then(()=>cn.guilds.bulkInsert(n.Guilds)).then(s=>{if(s.error.length!==0)throw"error loading Guilds"}).catch(console.error),cn.models.find().exec().then(s=>cn.models.bulkRemove(s.map(a=>a.id))).then(()=>cn.models.bulkInsert(n.Models)).then(s=>{if(s.error.length!==0)throw"error loading Models"}).catch(console.error),cn.character_plays.find().exec().then(s=>cn.character_plays.bulkRemove(s.map(a=>a.name))).then(()=>cn.character_plays.bulkInsert(n["Character Plays"])).then(s=>{if(s.error.length!==0)throw"error loading Character Plays"}).catch(console.error),cn.character_traits.find().exec().then(s=>cn.character_traits.bulkRemove(s.map(a=>a.name))).then(()=>cn.character_traits.bulkInsert(n["Character Traits"])).then(s=>{if(s.error.length!==0)throw"error loading Character Traits"}).catch(console.error)]).then(()=>cn.upsertLocal(ER,{filename:e,sha256:i})).then(()=>console.log("database re-load complete :|")).catch(console.error)}finally{W0=!1}}const Ate=({children:e})=>{const[t,n]=k.useState(void 0),[r,i]=k.useState(void 0),[o,s]=k.useState(""),[a,l]=k.useState(),{setting$:c}=ai(),[u,d]=k.useState(),[f,m]=k.useState(),[p,g]=k.useState(),[E,b]=k.useState();return k.useEffect(()=>{const w=c==null?void 0:c.subscribe(y=>{const{dataSet:_,language:R,mostRecentErrata:T}=(y==null?void 0:y.toJSON().data)??{};d(_??null),R=="auto"?b(pr.resolvedLanguage??null):b(R??null),m(T??null)});return()=>{w==null||w.unsubscribe()}},[c]),k.useEffect(()=>{if(u===void 0||f===void 0)return;let w=!1;return(async()=>{var A;const _=await Dte();if(w)return;n(_);const R=_.datafiles[0].filename;let T;if(u&&f===R)T=u;else{T=R;const L=await(cn==null?void 0:cn.getLocal("settings"));if(w)return;L==null||L.incrementalPatch({dataSet:T,mostRecentErrata:R})}const C=_.datafiles.find(L=>L.filename===T),I=C.version;s(I),E&&((A=C.translations)!=null&&A[E])&&(console.log(`using translated data set (${E})`),T=C.translations[E].filename),g(T)})(),()=>{w=!0}},[u,E,f]),k.useEffect(()=>{if(!p||!t)return;let w=!1;return(async()=>{const _=await RR(p);w||(l(void 0),await Nte(p,t,_).then(()=>l(cn)),i(await RR("gameplans.json")))})(),()=>{w=!0}},[p,t]),v.jsx(LI.Provider,{value:{version:o,manifest:t,gameplans:r,gbdb:a},children:e})},Dte=async()=>await fetch("data/manifest.json",{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(t){return t.json()}),RR=async e=>await fetch(`data/${e}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(n){return n.json()}),Vr=()=>k.useContext(LI);function Ys(){const{gbdb:e}=Vr(),[t,n]=k.useState(),[r,i]=k.useState(),o=k.useMemo(()=>e==null?void 0:e.game_state.getLocal$("network"),[e]);return k.useEffect(()=>{if(!o)return;const s=o.subscribe(a=>{a&&!a.deleted?(i(a),n(!0)):(i(void 0),n(!1))});return()=>s.unsubscribe()},[o]),{active:t,netDoc:r}}const jI=typeof window>"u"?k.useEffect:k.useLayoutEffect;function Bte(e,t=!1){const n=t?jI:k.useEffect,r=k.useRef(e);return n(()=>{r.current=e}),r}const Fte=()=>{};function zte(e){k.useEffect(()=>{typeof e=="function"&&e()},[])}const Ute={attributes:!0,characterData:!0,childList:!0,subtree:!0};function ny(e,t=Ute){const[n,r]=k.useState(null);return k.useEffect(()=>{if(n){const o=new MutationObserver(e);return o.observe(n,t),()=>{o.disconnect()}}return Fte},[n,e,t]),[k.useCallback(o=>{r(o)},[])]}function Wte(e){k.useEffect(()=>e,[])}function Gte(e,t){const n=k.useRef(!1),r=k.useMemo(()=>typeof t<"u"&&!Array.isArray(t)?[t]:(Array.isArray(t)&&t.length===0&&console.warn("Using [] as the second argument makes useDidUpdate a noop. The second argument should either be `undefined` or an array of length greater than 0."),t),[t]);k.useEffect(()=>{n.current&&e()},r),zte(()=>{n.current=!0}),Wte(()=>{n.current=!1})}function Hte(e){const t=Bte(e);function n(...r){typeof t.current=="function"&&t.current(...r)}return n}function II(e,t,n,r={},i=!0,o=!1){const s=Hte(n);(o?jI:k.useEffect)(()=>typeof e<"u"&&i?(e.addEventListener(t,s,r),()=>{e.removeEventListener(t,s,r)}):()=>{},[t,r])}function Vte(e,t=!0,n=!1){II(kT.window,"resize",e,{passive:!0},t,n)}function Kte(e,t=!0,n=!1){II(kT.window,"scroll",e,{passive:!0},t,n)}const qte=e=>{const t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width,x:t.left,y:t.top}},Yte=[void 0,null,null],Qte=({updateOnScroll:e=!0,updateOnResize:t=!0}={})=>{const[n,r]=k.useState(null),[i,o]=k.useState(null),s=k.useCallback(l=>{o(l)},[]),a=k.useCallback(()=>{window.requestAnimationFrame(()=>{i&&r(qte(i))})},[i]);return k.useLayoutEffect(()=>{a()},[a]),Vte(()=>{a()},t,!0),Kte(()=>{a()},e,!0),typeof window>"u"?(console.warn("useDimensionsRef: window is undefined."),Yte):[s,n,i]},Xte="/assets/playbook-symbol-defs-Dz3QsL1K.svg",Jte="/assets/gb-symbol-defs-DvUA8_44.svg";function Ci(e){const{icon:t,size:n,style:r,className:i,...o}=e,s={...r||{},...n?{width:n,height:n}:{},...r&&r.height?{fontSize:r.height}:{}};return v.jsx("svg",{className:`gbicon gbicon-${t} ${i||""}`,style:s,...o,children:v.jsx("use",{href:`${Jte}#gbicon-${t}`})})}function MI(e){const{icon:t,size:n,style:r}=e,i=t.replace(//g,"P"),o={...n?{width:n,height:n}:{},...r&&r.height?{fontSize:r.height}:{},...e.style||{}};return v.jsx("svg",{className:`pbicon pbicon-${i}`,style:o,...e,children:v.jsx("use",{href:`${Xte}#pbicon-${i}`})})}function Zte(e){const{gbdb:t}=Vr(),[n,r]=k.useState();return k.useEffect(()=>{if(!t||!e)return;const i=e(t).$.subscribe(o=>{r(o)});return()=>{i.unsubscribe()}},[t,e]),n}function io(e,t){const{gbdb:n}=Vr(),r=k.useCallback(e,t??[]),[i,o]=k.useState();return k.useEffect(()=>{let s=!1;return n?((async()=>{const l=await r(n);s||o(l)})().catch(console.error),()=>{s=!0}):void 0},[n,r,o]),i}function ene(e,t){return e.reduce((n,r)=>t(n)>=t(r)?n:r)}function tne({width:e,height:t},n,r=0){if(!e||!t)return;const i=(o,s)=>{const a=(e-o*10)/o,l=(t-s*10-5)/s,c=Math.min(a,l),u=(a-c)/2;return{w:a,h:l,size:c,margin:u,wx:o,hx:s}};return ene(Array.from({length:n},(o,s)=>s+1).map(o=>i(o,Math.ceil(n/o)+r)),o=>o.size)}function $I({Controller:e}){const[t,n]=Qte(),r=io(async a=>{var c;if(!n)return;const l=await a.guilds.count().exec();return((c=tne(n,l,1))==null?void 0:c.size)??0},[n])??0,i=k.useMemo(()=>new Set,[]),o=nj(a=>i.add(a),a=>i.delete(a)),s=k.useCallback(a=>{i.forEach(l=>l(a))},[i]);return v.jsxs("div",{ref:t,style:{display:"flex",flexDirection:"column",height:"100%",alignContent:"flex-start",justifyContent:"space-evenly"},children:[v.jsx(nne,{size:r,pickTeam:s}),v.jsx(Zo,{}),v.jsx(e,{size:r,update$:o})]})}const nne=Rt.memo(e=>{const{pickTeam:t,size:n}=e,r=Zte(k.useCallback(o=>o.guilds.find(),[]));if(!r)return null;const i=r.map(o=>({key:o.name,name:o.name,icon:o.name}));return v.jsx("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-start",justifyContent:"space-evenly",gap:"10px",padding:"5px",overflow:"clip"},children:i.map((o,s)=>v.jsx(H1,{g:o,pickTeam:t,size:n},s))})});function H1(e){const{g:t,pickTeam:n,size:r}=e;return v.jsxs(yn,{variant:"outlined",onClick:()=>n==null?void 0:n(t.key),style:{display:"flex",flexDirection:"column",minWidth:r,minHeight:r,maxWidth:r,maxHeight:r,background:"rgba(100%, 100%, 100%, 5%)"},sx:{"@media (hover: hover)":{"& > div":{transition:"transform .25s"},"&:hover > div":{transform:"scale(1.2)"}}},children:[v.jsx("div",{style:{display:"flex",placeContent:"center",placeItems:"center",fontSize:r*.7,width:"1em",height:"1em",borderRadius:"50%",padding:"0.0625em",background:"content-box linear-gradient(to bottom, #000, #333)"},children:v.jsx(Ci,{icon:t.icon,className:"dark",style:{flexShrink:0,filter:"drop-shadow(0 0 0.03em black)",...t.style||{}}})}),v.jsx(xt,{variant:"caption",style:{color:"whitesmoke",textTransform:"capitalize",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",zIndex:1},children:t.name})]},t.key)}var NI={exports:{}},AI={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},DI={exports:{}},rne=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},ine=rne,one=Array.prototype.concat,sne=Array.prototype.slice,PR=DI.exports=function(t){for(var n=[],r=0,i=t.length;r=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};bi.to.keyword=function(e){return FI[e.slice(0,3)]};function Ma(e,t,n){return Math.min(Math.max(t,e),n)}function kh(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var lne=NI.exports;const Vf=AI,zI={};for(const e of Object.keys(Vf))zI[Vf[e]]=e;const st={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var UI=st;for(const e of Object.keys(st)){if(!("channels"in st[e]))throw new Error("missing channels property: "+e);if(!("labels"in st[e]))throw new Error("missing channel labels property: "+e);if(st[e].labels.length!==st[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=st[e];delete st[e].channels,delete st[e].labels,Object.defineProperty(st[e],"channels",{value:t}),Object.defineProperty(st[e],"labels",{value:n})}st.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=o-i;let a,l;o===i?a=0:t===o?a=(n-r)/s:n===o?a=2+(r-t)/s:r===o&&(a=4+(t-n)/s),a=Math.min(a*60,360),a<0&&(a+=360);const c=(i+o)/2;return o===i?l=0:c<=.5?l=s/(o+i):l=s/(2-o-i),[a,l*100,c*100]};st.rgb.hsv=function(e){let t,n,r,i,o;const s=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(s,a,l),u=c-Math.min(s,a,l),d=function(f){return(c-f)/6/u+1/2};return u===0?(i=0,o=0):(o=u/c,t=d(s),n=d(a),r=d(l),s===c?i=r-n:a===c?i=1/3+t-r:l===c&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,c*100]};st.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=st.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,o*100,r*100]};st.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),o=(1-t-i)/(1-i)||0,s=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function cne(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}st.rgb.keyword=function(e){const t=zI[e];if(t)return t;let n=1/0,r;for(const i of Object.keys(Vf)){const o=Vf[i],s=cne(e,o);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[i*100,o*100,s*100]};st.rgb.lab=function(e){const t=st.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,s=500*(n-r),a=200*(r-i);return[o,s,a]};st.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?i=r*(1+n):i=r+n-r*n;const a=2*r-i,l=[0,0,0];for(let c=0;c<3;c++)o=t+1/3*-(c-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,l[c]=s*255;return l};st.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const s=(r+n)/2,a=r===0?2*i/(o+i):2*n/(r+n);return[t,a*100,s*100]};st.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),a=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,s];case 1:return[a,r,s];case 2:return[s,r,l];case 3:return[s,a,r];case 4:return[l,s,r];case 5:return[r,s,a]}};st.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[t,o*100,s*100]};st.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*t),a=1-r;o=6*t-s,s&1&&(o=1-o);const l=n+o*(a-n);let c,u,d;switch(s){default:case 6:case 0:c=a,u=l,d=n;break;case 1:c=l,u=a,d=n;break;case 2:c=n,u=a,d=l;break;case 3:c=n,u=l,d=a;break;case 4:c=l,u=n,d=a;break;case 5:c=a,u=n,d=l;break}return[c*255,u*255,d*255]};st.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[o*255,s*255,a*255]};st.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,o,s;return i=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};st.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(t-n),s=200*(n-r);return[i,o,s]};st.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let i,o,s;o=(t+16)/116,i=n/500+o,s=o-r/200;const a=o**3,l=i**3,c=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};st.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(n*n+r*r);return[t,s,i]};st.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI,o=n*Math.cos(i),s=n*Math.sin(i);return[t,o,s]};st.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?st.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s};st.hsv.ansi16=function(e){return st.rgb.ansi16(st.hsv.rgb(e),e[2])};st.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};st.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,i,o]};st.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};st.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};st.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(a=>a+a).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,s=r&255;return[i,o,s]};st.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),s=i-o;let a,l;return s<1?a=o/(1-s):a=0,s<=0?l=0:i===t?l=(n-r)/s%6:i===n?l=2+(r-t)/s:l=4+(t-n)/s,l/=6,l%=1,[l*360,s*100,a*100]};st.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};st.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};st.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=t%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};st.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};st.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};st.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};st.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,i=r-t;let o=0;return i<1&&(o=(r-i)/(1-i)),[e[0],i*100,o*100]};st.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};st.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};st.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};st.gray.hsl=function(e){return[0,0,e[0]]};st.gray.hsv=st.gray.hsl;st.gray.hwb=function(e){return[0,100,e[0]]};st.gray.cmyk=function(e){return[0,0,0,e[0]]};st.gray.lab=function(e){return[e[0],0,0]};st.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};st.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const lg=UI;function une(){const e={},t=Object.keys(lg);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function yne(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=e(n);if(typeof i=="object")for(let o=i.length,s=0;s{Ic[e]={},Object.defineProperty(Ic[e],"channels",{value:V1[e].channels}),Object.defineProperty(Ic[e],"labels",{value:V1[e].labels});const t=mne(e);Object.keys(t).forEach(r=>{const i=t[r];Ic[e][r]=yne(i),Ic[e][r].raw=vne(i)})});var bne=Ic;const Mc=lne,gi=bne,WI=["keyword","gray","hex"],K1={};for(const e of Object.keys(gi))K1[[...gi[e].labels].sort().join("")]=e;const cg={};function er(e,t){if(!(this instanceof er))return new er(e,t);if(t&&t in WI&&(t=null),t&&!(t in gi))throw new Error("Unknown model: "+t);let n,r;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof er)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=Mc.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=gi[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=gi[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=q1(i,r),this.valpha=typeof e[r]=="number"?e[r]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in K1))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=K1[o];const{labels:s}=gi[this.model],a=[];for(n=0;n(e%360+360)%360),saturationl:Rn("hsl",1,Kn(100)),lightness:Rn("hsl",2,Kn(100)),saturationv:Rn("hsv",1,Kn(100)),value:Rn("hsv",2,Kn(100)),chroma:Rn("hcg",1,Kn(100)),gray:Rn("hcg",2,Kn(100)),white:Rn("hwb",1,Kn(100)),wblack:Rn("hwb",2,Kn(100)),cyan:Rn("cmyk",0,Kn(100)),magenta:Rn("cmyk",1,Kn(100)),yellow:Rn("cmyk",2,Kn(100)),black:Rn("cmyk",3,Kn(100)),x:Rn("xyz",0,Kn(95.047)),y:Rn("xyz",1,Kn(100)),z:Rn("xyz",2,Kn(108.833)),l:Rn("lab",0,Kn(100)),a:Rn("lab",1),b:Rn("lab",2),keyword(e){return e!==void 0?new er(e):gi[this.model].keyword(this.color)},hex(e){return e!==void 0?new er(e):Mc.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new er(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),Mc.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const i=r/255;t[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return er.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,o=2*i-1,s=n.alpha()-r.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return er.rgb(a*n.red()+l*r.red(),a*n.green()+l*r.green(),a*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const e of Object.keys(gi)){if(WI.includes(e))continue;const{channels:t}=gi[e];er.prototype[e]=function(...n){return this.model===e?new er(this):n.length>0?new er(n,e):new er([...Sne(gi[this.model][e].raw(this.color)),this.valpha],e)},er[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=q1(n,t)),new er(r,e)}}function wne(e,t){return Number(e.toFixed(t))}function xne(e){return function(t){return wne(t,e)}}function Rn(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(cg[r]||(cg[r]=[]))[t]=n;return e=e[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[e](),i.color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function Kn(e){return function(t){return Math.max(0,Math.min(e,t))}}function Sne(e){return Array.isArray(e)?e:[e]}function q1(e,t){for(let n=0;n{const{version:e}=Vr();return v.jsxs(xt,{sx:{position:"absolute",bottom:0,right:0,color:"text.disabled"},children:["[",e,"]"]})};let Eh;const Cne=new Uint8Array(16);function kne(){if(!Eh&&(Eh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Eh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Eh(Cne)}const Ene=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function qf(e){return typeof e=="string"&&Ene.test(e)}const or=[];for(let e=0;e<256;++e)or.push((e+256).toString(16).slice(1));function Rne(e,t=0){return or[e[t+0]]+or[e[t+1]]+or[e[t+2]]+or[e[t+3]]+"-"+or[e[t+4]]+or[e[t+5]]+"-"+or[e[t+6]]+or[e[t+7]]+"-"+or[e[t+8]]+or[e[t+9]]+"-"+or[e[t+10]]+or[e[t+11]]+or[e[t+12]]+or[e[t+13]]+or[e[t+14]]+or[e[t+15]]}function ug(e){if(!qf(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}const Pne=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),TR={randomUUID:Pne};function GI(e,t,n){if(TR.randomUUID&&!t&&!e)return TR.randomUUID();e=e||{};const r=e.random||(e.rng||kne)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Rne(r)}var Tne={VITE_NAME:"gb-playbook",VITE_VERSION:"2.1.0",VITE_METERED_USERNAME:"25ee3bdfcc273a8e3ae9db71",VITE_METERED_PASSWORD:"XVIpxKTNnMR7XQDK",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Cp=Tne.VITE_SIGNALING_URL??"wss://gbplaybook-webrtc-server.onrender.com";let _s;function TS(e){return e.game_state.find().exec().then(t=>e.game_state.bulkRemove(t.map(n=>n._id))).catch(console.error)}let H0=!1;function ry(e){return async(...t)=>{if(H0)throw"concurent network change";H0=!0;try{await e(...t)}finally{H0=!1}}}const One=ry(async(e,t)=>{try{const n=await Fne();console.log(`# join code is ${n}`),t(n);const{uid:r,oid:i,gid:o}=await Une();await TS(e),console.log("# starting new network game"),_s=await ES(Cp,o),await e.game_state.insertLocal("network",{uid:r,oid:i,gid:o})}finally{kp()}}),Lne=ry(async(e,t)=>{try{const{uid:n,oid:r,gid:i}=await zne(t);await TS(e),console.log("# joining a network game"),_s=await ES(Cp,i),await e.game_state.insertLocal("network",{uid:n,oid:r,gid:i})}finally{kp()}}),jne=ry(async e=>{const t=await e.game_state.getLocal("network"),n=t==null?void 0:t.get("gid");n&&_s===void 0&&(console.log("# reconnecting to a network game"),_s=await ES(Cp,n))}),Ine=ry(async e=>{console.log("# leaving a network game"),await(_s==null?void 0:_s.cancel().catch(console.error).finally(()=>{_s=void 0})),await TS(e).catch(console.error),await e.game_state.getLocal("network").then(t=>t==null?void 0:t.remove()).catch(console.error)});function OS({allowNew:e=!1}){const{gbdb:t}=Vr(),[n,r]=k.useState(!1),{active:i}=Ys();k.useEffect(()=>{t&&i&&!_s&&jne(t)},[t,i]);const[o,s]=k.useState("default");if(k.useEffect(()=>{s(i?"success":"default")},[i]),!!t)return v.jsxs(v.Fragment,{children:[v.jsx(Lo,{size:"small",color:o,disabled:!e&&!i,onClick:()=>r(!0),children:v.jsx(jee,{})}),v.jsxs(YG,{open:n,onClose:()=>r(!1),children:[v.jsx(c7,{children:"Network Game Setup"}),v.jsx(i7,{children:v.jsx(Bne,{allowNew:e,close:()=>{r(!1)}})})]})]})}const Mne=e=>{const{setActiveStep:t}=e;return v.jsxs(Zt,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(yn,{variant:"contained",onClick:()=>t("Start"),children:"Start a Game"}),v.jsx(yn,{variant:"contained",onClick:()=>t("Join"),children:"Join a Game"})]})},$ne=e=>{const{setActiveStep:t}=e,{gbdb:n}=Vr(),[r,i]=k.useState();return k.useEffect(()=>{n&&One(n,i).then(()=>{t("Ready")}).catch(o=>{console.error(o),t("New")})},[n,t]),v.jsxs(Zt,{sx:{display:"flex",flexDirection:"column",gap:"1em",alignItems:"center"},children:[v.jsx(xt,{children:"Share this join code:"}),v.jsx(xt,{variant:"h3",children:r==null?void 0:r.toString().padStart(4,"0")}),v.jsx(xt,{children:"Waiting for opponent to connect."}),v.jsx(yn,{variant:"contained",onClick:()=>{kp(),e.setActiveStep("New")},children:"Cancel"})]})},Nne=e=>{const{setActiveStep:t}=e,{gbdb:n}=Vr(),[r,i]=k.useState(),[o,s]=k.useState(!1);if(n)return v.jsxs(Zt,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(rK,{sx:{margin:"1em"},label:"game join code",variant:"outlined",disabled:o,inputProps:{pattern:"[0-9]*",inputMode:"numeric"},onChange:a=>i(Number(a.target.value))}),v.jsx(yn,{variant:"contained",disabled:!r||o,onClick:()=>{s(!0),Lne(n,r??0).then(()=>t("Ready")).then(()=>s(!1)).catch(a=>{console.error(a),t("New")})},children:"Join a Game"}),v.jsx(yn,{variant:"contained",onClick:()=>{kp(),s(!1),t("New")},children:"Cancel"})]})},Ane=e=>{const{setActiveStep:t}=e,{gbdb:n}=Vr(),r=Ha(),{setting$:i}=ai();if(n)return v.jsxs(Um,{spacing:2,alignItems:"center",children:[v.jsx(xt,{variant:"h6",children:"Connected"}),v.jsxs(Um,{direction:"row",spacing:2,children:[v.jsx(yn,{variant:"contained",onClick:()=>Ine(n).then(()=>t("New")).then(()=>i&&$n(i)).then(o=>o==null?void 0:o.incrementalPatch({gamePlayRoute:void 0})).then(()=>{r("/",{})}).catch(console.error),children:"Leave Game"}),v.jsx(yn,{color:"success",variant:"contained",onClick:()=>{var o;(o=e.close)==null||o.call(e)},children:"Continue"})]})]})},Dne=()=>v.jsx(xt,{children:"Network Games must be started from the inital guild selection screen."});function Bne({allowNew:e=!1,close:t}){const{active:n}=Ys(),[r,i]=k.useState(e?"New":"Block");return k.useEffect(()=>{n&&i("Ready")},[n]),k.useEffect(()=>()=>{kp()},[]),v.jsxs(Zt,{children:[r==="New"&&v.jsx(Mne,{setActiveStep:i}),r==="Start"&&v.jsx($ne,{setActiveStep:i}),r==="Join"&&v.jsx(Nne,{setActiveStep:i}),r==="Ready"&&v.jsx(Ane,{setActiveStep:i,close:t}),r==="Block"&&v.jsx(Dne,{})]})}let Jt;function Fne(){return new Promise((e,t)=>{Jt=new WebSocket(Cp),Jt.onopen=()=>{Jt==null||Jt.send(JSON.stringify({type:"handshake-begin"}))},Jt.onclose=()=>{t("socket closed")},Jt.onerror=n=>{t(n)},Jt.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-response":Jt&&(Jt.onmessage=null),e(r.code);break}}})}function zne(e){return new Promise((t,n)=>{if(!e){n("Invalid Arguments (id undefined)");return}Jt=new WebSocket(Cp),Jt.onopen=()=>{Jt==null||Jt.send(JSON.stringify({type:"handshake-join",code:e}))},Jt.onclose=()=>{n("socket closed")},Jt.onerror=r=>{n(r)},Jt.onmessage=r=>{const i=JSON.parse(r.data);switch(i.type){case"handshake-complete":{const o=i.yourId;if(!qf(o)){n(`invalid uID ${o}`);return}const s=i.otherId;if(!qf(s)){n(`invalid oID ${s}`);return}const a=ug(o),l=ug(s),c=a.map((d,f)=>d^l[f]),u=GI({random:c});t({uid:o,oid:s,gid:u})}break}}})}function Une(){return new Promise((e,t)=>{if((Jt==null?void 0:Jt.readyState)!==1){t("socket closed");return}Jt.onclose=()=>{t("socket closed")},Jt.onerror=n=>{t(n)},Jt.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-complete":{const i=r.yourId;if(!qf(i)){t(`invalid uID ${i}`);return}const o=r.otherId;if(!qf(o)){t(`invalid oID ${o}`);return}const s=ug(i),a=ug(o),l=s.map((u,d)=>u^a[d]),c=GI({random:l});e({uid:i,oid:o,gid:c})}break}}})}function kp(){Jt==null||Jt.close(),Jt=void 0}function iy(){return tp()}var LS={},Wne=eo;Object.defineProperty(LS,"__esModule",{value:!0});var HI=LS.default=void 0,Gne=Wne(as()),Hne=v;HI=LS.default=(0,Gne.default)((0,Hne.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");function Vne(e){switch(e){case"Guilds":return"/game";case"Draft":return"/game/draft";case"Game":return"/game/draft/play"}}function VI(e){const t=Ha(),{gameState1$:n,gameState2$:r}=iy(),{active:i}=Ys(),[o,s]=k.useState(),[a,l]=k.useState(),[c,u]=k.useState(!1),{dest:d,onAction:f,...m}=e;return k.useEffect(()=>{const p=n==null?void 0:n.pipe(qt(E=>E==null?void 0:E.navigateTo)).subscribe(E=>s(E)),g=r==null?void 0:r.pipe(qt(E=>E==null?void 0:E.navigateTo)).subscribe(E=>l(E));return()=>{p==null||p.unsubscribe(),g==null||g.unsubscribe()}},[n,r]),k.useEffect(()=>{const p=async()=>{await $n(n).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),i||await $n(r).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),t(Vne(d))};o==d&&a===d&&p()},[n,r,d,o,a,i,t,f]),k.useEffect(()=>{u(a===d)},[d,a]),v.jsx(g7,{className:c?"fabAnimate":void 0,...m,color:"secondary",onClick:()=>{f==null||f(),$n(n).then(p=>{p==null||p.incrementalPatch({navigateTo:d}).catch(console.error)}),i||$n(r).then(p=>{p==null||p.incrementalPatch({navigateTo:d}).catch(console.error)})},children:v.jsx(HI,{fontSize:"large",sx:{zIndex:10}})})}function OR({team:e,size:t}){const n=io(r=>r.guilds.findOne().where({name:e}).exec(),[e]);return n?v.jsxs("div",{style:{position:"absolute",width:"100%",height:"100%",display:"flex",placeContent:"center",placeItems:"center",overflow:"hidden",zIndex:-1,backgroundColor:Kf(n.shadow??n.darkColor??n.color).darken(.25).desaturate(.25).string()},children:[v.jsx(Ci,{icon:e,fontSize:t,style:{color:"rgba(0, 0, 0, 60%)",flexShrink:0}}),v.jsx(xt,{variant:"caption",style:{position:"absolute",color:"whitesmoke",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",textTransform:"capitalize"},children:e})]}):null}function Kne(e){const[t,n]=k.useState("P1"),[r,i]=k.useState(),[o,s]=k.useState(),[a,l]=k.useState(!1),c=Pi(),{active:u}=Ys(),{gameState1$:d,gameState2$:f}=iy(),[m,p]=k.useState();k.useEffect(()=>{i(void 0),n("P1");const w=d==null?void 0:d.subscribe(y=>p(y));return()=>w==null?void 0:w.unsubscribe()},[d]);const[g,E]=k.useState();k.useEffect(()=>{s(void 0),n("P1");const w=f==null?void 0:f.subscribe(y=>E(y));return()=>w==null?void 0:w.unsubscribe()},[f]),k.useEffect(()=>{const w=m==null?void 0:m.get$("guild").subscribe(y=>i(y));return()=>w==null?void 0:w.unsubscribe()},[m]),k.useEffect(()=>{const w=g==null?void 0:g.get$("guild").subscribe(y=>s(y));return()=>w==null?void 0:w.unsubscribe()},[g]);const b=k.useCallback(async w=>{w&&(t==="P1"?(await(m==null?void 0:m.incrementalPatch({guild:w,roster:[]}).catch(console.error)),n(!o&&!u?"P2":"GO")):t==="P2"&&(await(g==null?void 0:g.incrementalPatch({guild:w,roster:[]}).catch(console.error)),n(r?"GO":"P1")))},[t,r,o,m,g,u]);return k.useEffect(()=>{const w=e.update$.subscribe(y=>b(y));return()=>w.unsubscribe()},[e.update$,b]),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",margin:"5px",gap:"5px"},children:[v.jsx(yn,{variant:"outlined",style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P1"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>n("P1"),children:r?v.jsx(OR,{team:r,size:e.size}):"P1"}),v.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.25em"},children:[v.jsx(xt,{variant:"caption",children:"vs"}),v.jsx(VI,{dest:"Draft",disabled:!r||!o,onAction:()=>l(!0),sx:{m:"0 15px"}}),v.jsx(xt,{variant:"caption",children:a?"(waiting)":" "})]}),v.jsx(yn,{variant:"outlined",disabled:u,style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P2"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>n("P2"),children:o?v.jsx(OR,{team:o,size:e.size}):"P2"})]})}function qne(){return v.jsxs(Zt,{sx:{width:"100%",height:"100%",position:"relative"},children:[v.jsx(ls,{children:v.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"},children:[v.jsx(qa,{separator:v.jsx(rc,{fontSize:"small"}),children:v.jsx(Lo,{size:"small",disabled:!0,children:v.jsx(PS,{sx:{color:"text.secondary"}})})}),v.jsx(OS,{allowNew:!0})]})}),v.jsx($I,{Controller:Kne}),v.jsx(ic,{})]})}var dg={exports:{}};dg.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",f="[object Map]",m="[object Number]",p="[object Object]",g="[object Promise]",E="[object RegExp]",b="[object Set]",w="[object String]",y="[object Symbol]",_="[object WeakMap]",R="[object ArrayBuffer]",T="[object DataView]",C="[object Float32Array]",I="[object Float64Array]",A="[object Int8Array]",L="[object Int16Array]",$="[object Int32Array]",F="[object Uint8Array]",z="[object Uint8ClampedArray]",Y="[object Uint16Array]",J="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,pe=/\w*$/,G=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,le={};le[o]=le[s]=le[R]=le[T]=le[a]=le[l]=le[C]=le[I]=le[A]=le[L]=le[$]=le[f]=le[m]=le[p]=le[E]=le[b]=le[w]=le[y]=le[F]=le[z]=le[Y]=le[J]=!0,le[c]=le[u]=le[_]=!1;var Le=typeof Cr=="object"&&Cr&&Cr.Object===Object&&Cr,He=typeof self=="object"&&self&&self.Object===Object&&self,Te=Le||He||Function("return this")(),ke=t&&!t.nodeType&&t,Ve=ke&&!0&&e&&!e.nodeType&&e,Re=Ve&&Ve.exports===ke;function et(U,he){return U.set(he[0],he[1]),U}function lt(U,he){return U.add(he),U}function Pe(U,he){for(var Se=-1,it=U?U.length:0;++Se-1}function Jn(U,he){var Se=this.__data__,it=ji(Se,U);return it<0?Se.push([U,he]):Se[it][1]=he,this}Lt.prototype.clear=mt,Lt.prototype.delete=jt,Lt.prototype.get=Gt,Lt.prototype.has=Hn,Lt.prototype.set=Jn;function rr(U){var he=-1,Se=U?U.length:0;for(this.clear();++he-1&&U%1==0&&U-1&&U%1==0&&U<=i}function el(U){var he=typeof U;return!!U&&(he=="object"||he=="function")}function td(U){return!!U&&typeof U=="object"}function ds(U){return lc(U)?Qs(U):Lp(U)}function nd(){return[]}function Ip(){return!1}e.exports=Fn})(dg,dg.exports);var Yne=dg.exports;const KI=za(Yne);var jS={},Qne=eo;Object.defineProperty(jS,"__esModule",{value:!0});var qI=jS.default=void 0,Xne=Qne(as()),Jne=v;qI=jS.default=(0,Xne.default)((0,Jne.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonChecked");var IS={},Zne=eo;Object.defineProperty(IS,"__esModule",{value:!0});var YI=IS.default=void 0,ere=Zne(as()),tre=v;YI=IS.default=(0,ere.default)((0,tre.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonUnchecked");const MS=(e,t)=>{const n=Rt.useRef(null);return Gte(()=>{var r;e&&((r=n.current)==null||r.animate({backgroundColor:["initial","red","initial"],boxShadow:["0 0 0px 0px transparent","0 0 0.25em 0.25em red","0 0 0.25em 0.25em transparent"]},500))},t),n};function Fs(e,t,n){return e.sort((r,i)=>{const o=n.findIndex(a=>a===r[t]),s=n.findIndex(a=>a===i[t]);return o-s})}function lf(e,t,n,r,i,o){let s=n;return i(t)&&(s+=r?1:-1,s===o?e.forEach(a=>{!a.selected&&i(a)&&(a.disabled+=1)}):s===o-1&&n===o&&e.forEach(a=>{!(a===t||a.selected)&&i(a)&&(a.disabled+=-1)})),s}function QI(e,t,n){e.forEach(r=>{r!==t&&r.name===t.name&&(r.disabled+=n?1:-1),(r.dehcneb===t.name||r.name===t.dehcneb)&&(r.disabled+=n?1:-1)})}function XI(e,t,n,r){if(t.dehcneb){const i=e.find(o=>o.benched&&o.name===t.dehcneb);i&&r(i,n)}}function Sl({model:e,disabled:t=!1,stateDoc:n,updateCounts:r}){const[i,o]=k.useState(e.selected);k.useEffect(()=>{const l=n.get$("roster").pipe(qt(c=>c.map(u=>u.name).includes(e.id))).subscribe(c=>{o(c),c!==e.selected&&!e.benched&&r(e,c)});return()=>l==null?void 0:l.unsubscribe()},[n,e,r]);const s=MS(t,[i]);return v.jsx(Ko,{ref:s,label:e.id,control:v.jsx(Vo,{size:"small",checked:i,disabled:e.disabled>0||t,onChange:a=>{const l=a.target.checked;n.incrementalModify(c=>{if(l){const u=c.roster.concat({name:e.id,health:e.hp});c.roster=u}else{const u=c.roster.filter(d=>d.name!=e.id);c.roster=u}return c}).catch(console.error)},icon:v.jsx(YI,{}),checkedIcon:v.jsx(qI,{})})})}const JI=Ee(OW)(()=>({"& .MuiBadge-badge":{right:"2em",top:"2em"}})),la={3:{captain:1,mascot:0,squaddies:2},4:{captain:1,mascot:1,squaddies:2},6:{captain:1,mascot:1,squaddies:4}},LR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ai(),[a,l]=k.useState(6);k.useEffect(()=>{const w=s==null?void 0:s.pipe(qt(y=>y==null?void 0:y.toJSON().data.gameSize)).subscribe(y=>l(y??6));return()=>w==null?void 0:w.unsubscribe()},[s]);const c=k.useRef({captain:0,mascot:0,squaddieCount:0}),[,u]=k.useState(0),[d,f]=k.useState(!1),m=io(async w=>{const _=(await w.models.find().where("id").in(t.roster).exec()).map(R=>Object.assign(R.toMutableJSON(),{selected:!1,disabled:R.benched?1:0}));if(Fs(_,"id",t.roster),!i&&t.minor){const R=new Set(e.stateDoc.get("roster").map(T=>JSON.stringify(T)));_.forEach(T=>{(T.captain||T.mascot&&la[a].mascot>0)&&(R.add(JSON.stringify({name:T.id,health:T.hp})),T.disabled=1)}),e.stateDoc.incrementalModify(T=>(T.roster=Array.from(R).map(C=>JSON.parse(C)),T)).catch(console.error)}return la[a].mascot===0&&_.forEach(R=>{R.mascot&&(R.disabled=1)}),_},[t,a]),p=k.useCallback((w,y)=>{function _(L,$,F,z){return lf(L,$,F,z,Y=>!!Y.captain,la[a].captain)}function R(L,$,F,z){return lf(L,$,F,z,Y=>!!Y.mascot,la[a].mascot)}function T(L,$,F,z){return lf(L,$,F,z,Y=>!(Y.captain||Y.mascot),la[a].squaddies)}if(!m)return;w.selected=y;const C=_(m,w,c.current.captain,y);c.current.captain=C;const I=R(m,w,c.current.mascot,y);c.current.mascot=I;const A=T(m,w,c.current.squaddieCount,y);c.current.squaddieCount=A,QI(m,w,y),XI(m,w,y,(L,$)=>{i||(L.selected=$,e.stateDoc.incrementalModify(F=>{if($){const z=F.roster.concat({name:L.id,health:L.hp});F.roster=z}else{const z=F.roster.filter(Y=>Y.name!=L.id);F.roster=z}return F}))}),C===la[a].captain&&I===la[a].mascot&&A===la[a].squaddies?f(!0):f(!1),u(L=>L+1)},[e.stateDoc,m,a,i]);if(k.useEffect(()=>{if(d&&m){const w=KI(m.filter(y=>y.selected));n==null||n(w)}else r==null||r()},[d,t,m,n,r]),!m)return null;const g=m.filter(w=>w.captain),E=m.filter(w=>w.mascot&&!w.captain),b=m.filter(w=>!w.captain&&!w.mascot);return v.jsx(JI,{badgeContent:d?v.jsx(_I,{color:"success"}):0,style:{overflow:"visible",...o},children:v.jsxs(nL,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Captains :"}),g.map(w=>v.jsx(Sl,{model:w,stateDoc:e.stateDoc,updateCounts:p,disabled:i},w.id)),v.jsx("span",{children:"Mascots :"}),E.map(w=>v.jsx(Sl,{model:w,stateDoc:e.stateDoc,updateCounts:p,disabled:i},w.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Squaddies :"}),b.slice(0,b.length/2).map(w=>v.jsx(Sl,{model:w,stateDoc:e.stateDoc,updateCounts:p,disabled:i},w.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:" "}),b.slice(b.length/2).map(w=>v.jsx(Sl,{model:w,stateDoc:e.stateDoc,updateCounts:p,disabled:i},w.id))]})]})})},Rh={3:{master:1,apprentice:2},4:{master:2,apprentice:2},6:{master:3,apprentice:3}},jR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ai(),[a,l]=k.useState(6);k.useEffect(()=>{const b=s==null?void 0:s.pipe(qt(w=>w==null?void 0:w.toJSON().data.gameSize)).subscribe(w=>l(w??6));return()=>b==null?void 0:b.unsubscribe()},[s]);const c=k.useRef({masterCount:0,apprenticeCount:0}),[,u]=k.useState(0),[d,f]=k.useState(!1),m=io(async b=>{const y=(await b.models.find().where("id").in(t.roster).exec()).map(_=>Object.assign(_.toMutableJSON(),{selected:!1,disabled:_.benched?1:0}));return Fs(y,"id",t.roster),y},[t]),p=k.useCallback((b,w)=>{function y(C,I,A,L){return lf(C,I,A,L,$=>!!$.captain,Rh[a].master)}function _(C,I,A,L){return lf(C,I,A,L,$=>!$.captain,Rh[a].apprentice)}if(!m)return;b.selected=w;const R=y(m,b,c.current.masterCount,w);c.current.masterCount=R;const T=_(m,b,c.current.apprenticeCount,w);c.current.apprenticeCount=T,QI(m,b,w),XI(m,b,w,(C,I)=>{i||(C.selected=I,e.stateDoc.incrementalModify(A=>{if(I){const L=A.roster.concat({name:C.id,health:C.hp});A.roster=L}else{const L=A.roster.filter($=>$.name!=C.id);A.roster=L}return A}))}),R===Rh[a].master&&T===Rh[a].apprentice?f(!0):f(!1),u(C=>C+1)},[e.stateDoc,m,a,i]);if(k.useEffect(()=>{if(d&&m){const b=KI(m.filter(w=>w.selected));n==null||n(b)}else r==null||r()},[d,t,m,n,r]),!m)return null;const g=m.filter(b=>b.captain),E=m.filter(b=>!b.captain);return v.jsx(JI,{badgeContent:d?v.jsx(_I,{color:"success"}):0,style:{overflow:"visible",...o},children:v.jsxs(nL,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Masters :"}),g.map(b=>v.jsx(Sl,{model:b,stateDoc:e.stateDoc,updateCounts:p,disabled:i},b.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Apprentices :"}),E.slice(0,E.length/2).map(b=>v.jsx(Sl,{model:b,stateDoc:e.stateDoc,updateCounts:p,disabled:i},b.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:" "}),E.slice(E.length/2).map(b=>v.jsx(Sl,{model:b,stateDoc:e.stateDoc,updateCounts:p,disabled:i},b.id))]})]})})};function nre(){const{active:e}=Ys();return v.jsxs(Zt,{className:"DraftScreen",children:[v.jsx(ls,{children:v.jsxs(Zt,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(qa,{separator:v.jsx(rc,{fontSize:"small"}),children:[v.jsx(Lo,{color:"inherit",href:"/game",size:"small",disabled:e,children:v.jsx(PS,{})}),v.jsx(xt,{children:"Draft"})]}),v.jsxs("div",{children:[v.jsx(ire,{}),v.jsx(OS,{})]})]})}),v.jsx(rre,{}),v.jsx(ic,{})]})}function rre(){const{setting$:e}=ai(),t=Ha(),[n,r]=k.useState(),[i,o]=k.useState(),s=k.useCallback(C=>r(C),[]),a=k.useCallback(C=>o(C),[]),l=k.useCallback(()=>r(void 0),[]),c=k.useCallback(()=>o(void 0),[]),[u,d]=k.useState();k.useEffect(()=>{const C=e==null?void 0:e.pipe(qt(I=>I==null?void 0:I.toJSON().data.gameSize)).subscribe(I=>d(I));return()=>C==null?void 0:C.unsubscribe()},[e]);const{active:f}=Ys(),{gameState1$:m,gameState2$:p}=iy(),[g,E]=k.useState();k.useEffect(()=>{if(!m)return;let C=!1;return(async()=>{const A=await $n(m);C||E(A)})(),()=>{C=!0}},[m]);const[b,w]=k.useState();k.useEffect(()=>{if(!p)return;let C=!1;return(async()=>{const A=await $n(p);C||w(A)})(),()=>{C=!0}},[p]);const[y,_]=io(async C=>{const I=g==null?void 0:g.guild,A=b==null?void 0:b.guild;if(!I||!A)return;const[L,$]=await Promise.all([C.guilds.findOne().where({name:I}).exec(),C.guilds.findOne().where({name:A}).exec()]);if(!L||!$){t("/game");return}return[L,$]},[g,b,t])??[];if(!y||!_||!g||!b)return null;const R=y.name==="Blacksmiths"?jR:LR,T=_.name==="Blacksmiths"?jR:LR;return v.jsxs(v.Fragment,{children:[v.jsx(R,{guild:y,stateDoc:g,ready:s,unready:l,style:{width:"100%"}},`1-${u}`),v.jsx(VI,{dest:"Game",disabled:!n||!i,onAction:()=>{g.incrementalPatch({score:0,momentum:0,roster:(n==null?void 0:n.map(C=>({name:C.id,health:C.hp})))||[]}).catch(console.error),f||b.incrementalPatch({score:0,momentum:0,roster:(i==null?void 0:i.map(C=>({name:C.id,health:C.hp})))||[]}).catch(console.error)},sx:{m:"10px"}}),v.jsx(T,{guild:_,stateDoc:b,ready:a,unready:c,style:{width:"100%"},disabled:f},`2-${u}`)]})}function ire(){const[e,t]=k.useState(null),n=!!e,r=c=>{t(c.currentTarget)},i=()=>{t(null)},{setting$:o}=ai(),[s,a]=k.useState();k.useEffect(()=>{const c=o==null?void 0:o.subscribe(u=>a(u));return()=>c==null?void 0:c.unsubscribe()},[o]);const l=s==null?void 0:s.toJSON().data.gameSize;return v.jsxs(v.Fragment,{children:[v.jsx(Lo,{onClick:r,color:"inherit",size:"small",sx:{backgroundColor:"primary.dark"},children:v.jsxs(xt,{children:[l,"v",l]})}),v.jsx(Fv,{anchorEl:e,open:n,onClose:i,onClick:i,children:v.jsxs(fL,{dense:!0,children:[v.jsx(fi,{selected:l===6,onClick:()=>{s==null||s.incrementalPatch({gameSize:6})},children:"6v6"}),v.jsx(fi,{selected:l===4,onClick:()=>{s==null||s.incrementalPatch({gameSize:4})},children:"4v4"}),v.jsx(fi,{selected:l===3,onClick:()=>{s==null||s.incrementalPatch({gameSize:3})},children:"3v3"})]})})]})}var $S={},ore=eo;Object.defineProperty($S,"__esModule",{value:!0});var fg=$S.default=void 0,sre=ore(as()),are=v;fg=$S.default=(0,sre.default)((0,are.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove");var NS={},lre=eo;Object.defineProperty(NS,"__esModule",{value:!0});var pg=NS.default=void 0,cre=lre(as()),ure=v;pg=NS.default=(0,cre.default)((0,ure.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function IR(e){dre(e)&&e.touches.length<2&&e.preventDefault&&e.cancelable&&e.preventDefault()}function dre(e){return e&&"touches"in e}function Y1({onLongPress:e,onClick:t},{delay:n=500,shouldPreventDefault:r=!0}={}){const[i,o]=k.useState(!1),s=k.useRef(),a=k.useRef(),l=k.useCallback(u=>{u.persist();const d={...u};r&&u.target&&(u.target.addEventListener("touchend",IR,{passive:!1}),a.current=u.target),s.current=setTimeout(()=>{e(d),o(!0)},n)},[e,n,r]),c=k.useCallback((u,d=!0)=>{s.current&&clearTimeout(s.current),d&&!i&&(t==null||t(u)),o(!1),r&&a.current&&a.current.removeEventListener("touchend",IR)},[r,t,i]);return{onMouseDown:u=>l(u),onTouchStart:u=>l(u),onMouseUp:u=>c(u),onMouseLeave:u=>c(u,!1),onTouchEnd:u=>c(u),onTouchMove:u=>c(u)}}function fre(e){const{disabled:t,object:n,label:r}=e,i=r(n),o=MS(t,[i]);return v.jsx(xt,{ref:o,sx:{width:"100%",textAlign:"center"},children:i})}function ZI({object:e,label:t,value:n,setValue:r,disabled:i=!1,longPressClear:o=!1}){const s=Y1({onLongPress:()=>{r(e,0)},onClick:a=>{a.stopPropagation();const l=n(e);l>0&&r(e,l-1)}});return v.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[v.jsx(fre,{disabled:i,object:e,label:t}),v.jsxs(Df,{size:"small",variant:"contained",disabled:i,children:[v.jsx(yn,{...o?s:{},onClick:a=>{if(a.stopPropagation(),!o){const l=n(e);l>0&&r(e,l-1)}},children:v.jsx(fg,{fontSize:"inherit"})}),v.jsx(yn,{onClick:a=>{a.stopPropagation();const l=n(e);r(e,l+1)},children:v.jsx(pg,{fontSize:"inherit"})})]})]})}const MR=e=>{const{model:t,disabled:n}=e,r=MS(n,[e.health]);return v.jsx(yn,{ref:r,disabled:!0,size:"small",children:v.jsx(xt,{variant:"body2",color:"text.primary",children:`${String(e.health).padStart(2,"0")} / ${String(t.hp).padStart(2,"0")}`})})};function eM({state:e,model:t,disabled:n=!1,stacked:r=!1}){const i=Y1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health=0,u})},onClick:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health>0&&(u.roster[d].health-=1),u})}}),o=Y1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].healthu.name===t.id),a=k.useMemo(()=>e.get$("roster").pipe(qt(u=>u[s].health)),[e,s]),[l,c]=k.useState(t.hp);return k.useEffect(()=>{const u=a.subscribe(d=>c(d));return()=>u.unsubscribe()},[a]),v.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:r?v.jsxs(v.Fragment,{children:[v.jsx(MR,{health:l,model:t,disabled:n}),v.jsxs(Df,{size:"small",variant:"contained",disabled:n,sx:{"& .MuiButtonGroup-grouped":{minWidth:"1rem"}},children:[v.jsx(yn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(fg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(yn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(pg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})]}):v.jsxs(Df,{size:"small",variant:"contained",disabled:n,children:[v.jsx(yn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(fg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(MR,{health:l,model:t,disabled:n}),v.jsx(yn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(pg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function pre(e){const t=e.state,[n,r]=k.useState(0);return k.useEffect(()=>{const i=t.get$("score").subscribe(o=>r(o));return()=>i.unsubscribe()},[t]),v.jsx(ZI,{object:t,disabled:e.disabled,label:()=>`VP: ${n}`,value:()=>n,setValue:(i,o)=>{i.incrementalModify(s=>(s.score=o,s))}})}function hre(e){const t=e.state,[n,r]=k.useState(0);return k.useEffect(()=>{const i=t.get$("momentum").subscribe(o=>r(o));return()=>i.unsubscribe()},[t]),v.jsx(ZI,{object:t,disabled:e.disabled,longPressClear:!0,label:()=>`MOM: ${n}`,value:()=>n,setValue:(i,o)=>{i.incrementalModify(s=>(s.momentum=o,s))}})}function mre({teams:e,rosters:t,expanded:n,onClick:r,disabled:i}){const o=Pi(),{setting$:s}=ai(),[a,l]=k.useState();k.useEffect(()=>{const u=s==null?void 0:s.pipe(qt(d=>d==null?void 0:d.toJSON().data.uiPreferences.displayStatLine)).subscribe(d=>l(d));return()=>u==null?void 0:u.unsubscribe()});const c=e.reduce((u,d,f)=>[...u,u[f]+d.roster.length+1],[0]);return v.jsx(Zt,{sx:{flexGrow:0,overflow:"auto"},children:e.map((u,d)=>{const f=c[d]+1;return v.jsxs($8,{expanded:n===!0,square:!0,sx:{backgroundColor:"transparent"},disableGutters:!0,elevation:0,children:[v.jsx(J8,{sx:{position:"sticky",top:0,zIndex:1,padding:0,borderBottom:`1px solid ${o.palette.divider}`,".MuiAccordionSummary-content":{margin:0}},children:v.jsxs(J9,{onClick:()=>{r(f-1,!n)},sx:{width:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(fH,{sx:{alignItems:"center"},children:v.jsx("div",{style:{fontSize:36,width:"1em",height:"1em",overflow:"visible",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(Ci,{icon:u.guild,style:{color:o.palette.text.secondary,filter:"unset",flexShrink:0}})})}),v.jsx(gs,{primary:u.guild,secondary:`${t[d].reduce((m,p)=>m+(p._inf??p.inf),0)} INF`}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"4px"},children:[v.jsx(pre,{state:u,disabled:i[d]}),v.jsx(hre,{state:u,disabled:i[d]})]})]})}),v.jsx(U8,{sx:{padding:0},children:v.jsx(Xd,{disablePadding:!0,sx:{"li:nth-of-type(odd)":{"&.MuiListItem-root":{backgroundColor:"rgba(100%, 100%, 100%, 5%)"}}},children:t[d].map((m,p)=>v.jsx(fo,{secondaryAction:v.jsx(eM,{state:u,model:m,disabled:i[d]}),onClick:()=>{r(f+p,!1)},children:v.jsx(gs,{primary:m.id,secondary:a?m.statLine:null})},m.id))},d)})]},d)})})}const Lr=new URL("/assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",import.meta.url).href,jr=new URL("/assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",import.meta.url).href,Ir=new URL("/assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",import.meta.url).href,Mr=new URL("/assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",import.meta.url).href,Sc=new URL("/assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",import.meta.url).href,qr=new URL("/assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",import.meta.url).href,_c=new URL("/assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",import.meta.url).href,$r=new URL("/assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",import.meta.url).href,Nr=new URL("/assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",import.meta.url).href,Ar=new URL("/assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",import.meta.url).href,Dr=new URL("/assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",import.meta.url).href,Cc=new URL("/assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",import.meta.url).href,Sr=new URL("/assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",import.meta.url).href,kc=new URL("/assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",import.meta.url).href,ca=new URL("/assets/Order_back-qsepM33g.jpg",import.meta.url).href,Ec=new URL("/assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",import.meta.url).href,al=new URL("/assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",import.meta.url).href,Yr=new URL("/assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",import.meta.url).href,Rc=new URL("/assets/lamps_back_blank-DaxPd_Oo.jpg",import.meta.url).href,on=new Map([["Alchemists_back",new URL("/assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",import.meta.url).href],["Alchemists_front",new URL("/assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",import.meta.url).href],["Midas_back",Lr],["Midas_front",new URL("/assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",import.meta.url).href],["Smoke_back",Lr],["Smoke_front",new URL("/assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",import.meta.url).href],["Soma_back",Lr],["Soma_front",new URL("/assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",import.meta.url).href],["Pneuma_back",Lr],["Pneuma_front",new URL("/assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",import.meta.url).href],["Flask_back",Lr],["Flask_front",new URL("/assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",import.meta.url).href],["Naja_back",Lr],["Naja_front",new URL("/assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",import.meta.url).href],["Calculus_back",Lr],["Calculus_front",new URL("/assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",import.meta.url).href],["vCalculus_back",Lr],["vCalculus_front",new URL("/assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",import.meta.url).href],["Crucible_back",Lr],["Crucible_front",new URL("/assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",import.meta.url).href],["Kami_back",Lr],["Kami_front",new URL("/assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",import.meta.url).href],["Katalyst_back",Lr],["Katalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",import.meta.url).href],["vKatalyst_back",Lr],["vKatalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",import.meta.url).href],["Mercury_back",Lr],["Mercury_front",new URL("/assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",import.meta.url).href],["Venin_back",Lr],["Venin_front",new URL("/assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",import.meta.url).href],["Vitriol_back",Lr],["Vitriol_front",new URL("/assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",import.meta.url).href],["Compound_back",new URL("/assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",import.meta.url).href],["Compound_front",new URL("/assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",import.meta.url).href],["Blacksmiths_back",new URL("/assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",import.meta.url).href],["Blacksmiths_front",new URL("/assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",import.meta.url).href],["Anvil_back",jr],["Anvil_front",new URL("/assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",import.meta.url).href],["Burnish_back",jr],["Burnish_front",new URL("/assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",import.meta.url).href],["Culverin_back",jr],["Culverin_front",new URL("/assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",import.meta.url).href],["Farris_back",jr],["Farris_front",new URL("/assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",import.meta.url).href],["Ferrite_back",jr],["Ferrite_front",new URL("/assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",import.meta.url).href],["Furnace_back",jr],["Furnace_front",new URL("/assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",import.meta.url).href],["Hearth_back",jr],["Hearth_front",new URL("/assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",import.meta.url).href],["Alloy_back",jr],["Alloy_front",new URL("/assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",import.meta.url).href],["Bolt_back",jr],["Bolt_front",new URL("/assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",import.meta.url).href],["Cast_back",jr],["Cast_front",new URL("/assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",import.meta.url).href],["Cinder_back",jr],["Cinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",import.meta.url).href],["vCinder_back",jr],["vCinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",import.meta.url).href],["Cutlass_back",jr],["Cutlass_front",new URL("/assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",import.meta.url).href],["Iron_back",jr],["Iron_front",new URL("/assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",import.meta.url).href],["Sledge_back",jr],["Sledge_front",new URL("/assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",import.meta.url).href],["Brewers_back",new URL("/assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",import.meta.url).href],["Brewers_front",new URL("/assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",import.meta.url).href],["Tapper_back",Ir],["Tapper_front",new URL("/assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",import.meta.url).href],["Esters_back",Ir],["Esters_front",new URL("/assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",import.meta.url).href],["Corker_back",Ir],["Corker_front",new URL("/assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",import.meta.url).href],["Scum_back",Ir],["Scum_front",new URL("/assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",import.meta.url).href],["Quaff_back",Ir],["Quaff_front",new URL("/assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",import.meta.url).href],["vDecimate_back",Ir],["vDecimate_front",new URL("/assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",import.meta.url).href],["Flea_back",Ir],["Flea_front",new URL("/assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",import.meta.url).href],["Friday_back",Ir],["Friday_front",new URL("/assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",import.meta.url).href],["Hooper_back",Ir],["Hooper_front",new URL("/assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",import.meta.url).href],["Mash_back",Ir],["Mash_front",new URL("/assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",import.meta.url).href],["Pintpot_back",Ir],["Pintpot_front",new URL("/assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",import.meta.url).href],["Spigot_back",Ir],["Spigot_front",new URL("/assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",import.meta.url).href],["vSpigot_back",Ir],["vSpigot_front",new URL("/assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",import.meta.url).href],["Stave_back",Ir],["Stave_front",new URL("/assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",import.meta.url).href],["Stoker_back",Ir],["Stoker_front",new URL("/assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",import.meta.url).href],["Lucky_back",new URL("/assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",import.meta.url).href],["Lucky_front",new URL("/assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",import.meta.url).href],["Butchers_back",new URL("/assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",import.meta.url).href],["Butchers_front",new URL("/assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",import.meta.url).href],["Ox_back",Mr],["Ox_front",new URL("/assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",import.meta.url).href],["Fillet_back",Mr],["Fillet_front",new URL("/assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",import.meta.url).href],["vBoar_back",Mr],["vBoar_front",new URL("/assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",import.meta.url).href],["Princess_back",Mr],["Princess_front",new URL("/assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",import.meta.url).href],["Truffles_back",Mr],["Truffles_front",new URL("/assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",import.meta.url).href],["Boar_back",Mr],["Boar_front",new URL("/assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",import.meta.url).href],["Boiler_back",Mr],["Boiler_front",new URL("/assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",import.meta.url).href],["Brisket_back",Mr],["Brisket_front",new URL("/assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",import.meta.url).href],["vBrisket_back",Mr],["vBrisket_front",new URL("/assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",import.meta.url).href],["vGutter_back",Mr],["vGutter_front",new URL("/assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",import.meta.url).href],["Layne_back",Mr],["Layne_front",new URL("/assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",import.meta.url).href],["Meathook_back",Mr],["Meathook_front",new URL("/assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",import.meta.url).href],["vOx_back",Mr],["vOx_front",new URL("/assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",import.meta.url).href],["Shank_back",Mr],["Shank_front",new URL("/assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",import.meta.url).href],["Tenderiser_back",Mr],["Tenderiser_front",new URL("/assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",import.meta.url).href],["Cooks_back",new URL("/assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",import.meta.url).href],["Cooks_front",new URL("/assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",import.meta.url).href],["Wellington_back",Sc],["Wellington_front",new URL("/assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",import.meta.url).href],["Pepper_back",Sc],["Pepper_front",new URL("/assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",import.meta.url).href],["Cinnamon_back",Sc],["Cinnamon_front",new URL("/assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",import.meta.url).href],["Roast_back",Sc],["Roast_front",new URL("/assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",import.meta.url).href],["Spice_back",Sc],["Spice_front",new URL("/assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",import.meta.url).href],["Sugar_back",Sc],["Sugar_front",new URL("/assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",import.meta.url).href],["Engineers_back",new URL("/assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",import.meta.url).href],["Engineers_front",new URL("/assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",import.meta.url).href],["Ballista_back",qr],["Ballista_front",new URL("/assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",import.meta.url).href],["PinVice_back",qr],["PinVice_front",new URL("/assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",import.meta.url).href],["Rivet_back",qr],["Rivet_front",new URL("/assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",import.meta.url).href],["Mainspring_back",qr],["Mainspring_front",new URL("/assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",import.meta.url).href],["Mother_back",qr],["Mother_front",new URL("/assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",import.meta.url).href],["Colossus_back",qr],["Colossus_front",new URL("/assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",import.meta.url).href],["vHarriet_back",qr],["vHarriet_front",new URL("/assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",import.meta.url).href],["Hoist_back",qr],["Hoist_front",new URL("/assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",import.meta.url).href],["Locus_back",qr],["Locus_front",new URL("/assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",import.meta.url).href],["Nomad_back",qr],["Nomad_front",new URL("/assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",import.meta.url).href],["Ratchet_back",qr],["Ratchet_front",new URL("/assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",import.meta.url).href],["Salvo_back",qr],["Salvo_front",new URL("/assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",import.meta.url).href],["Velocity_back",qr],["Velocity_front",new URL("/assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",import.meta.url).href],["vVelocity_back",qr],["vVelocity_front",new URL("/assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",import.meta.url).href],["Falconers_back",new URL("/assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",import.meta.url).href],["Falconers_front",new URL("/assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",import.meta.url).href],["Devana_back",_c],["Devana_front",new URL("/assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",import.meta.url).href],["Frelsi_back",_c],["Frelsi_front",new URL("/assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",import.meta.url).href],["Ikaros_back",_c],["Ikaros_front",new URL("/assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",import.meta.url).href],["Mataagi_back",_c],["Mataagi_front",new URL("/assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",import.meta.url).href],["Minerva_back",_c],["Minerva_front",new URL("/assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",import.meta.url).href],["Rundaas_back",_c],["Rundaas_front",new URL("/assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",import.meta.url).href],["Farmers_back",new URL("/assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",import.meta.url).href],["Farmers_front",new URL("/assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",import.meta.url).href],["Grange_back",$r],["Grange_front",new URL("/assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",import.meta.url).href],["Thresher_back",$r],["Thresher_front",new URL("/assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",import.meta.url).href],["Festival_back",$r],["Festival_front",new URL("/assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",import.meta.url).href],["Peck_back",$r],["Peck_front",new URL("/assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",import.meta.url).href],["Buckwheat_back",$r],["Buckwheat_front",new URL("/assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",import.meta.url).href],["Amber_back",$r],["Amber_front",new URL("/assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",import.meta.url).href],["Bushel_back",$r],["Bushel_front",new URL("/assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",import.meta.url).href],["Fallow_back",$r],["Fallow_front",new URL("/assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",import.meta.url).href],["Harrow_back",$r],["Harrow_front",new URL("/assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",import.meta.url).href],["vHonour_back",$r],["vHonour_front",new URL("/assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",import.meta.url).href],["Jackstraw_back",$r],["Jackstraw_front",new URL("/assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",import.meta.url).href],["Millstone_back",$r],["Millstone_front",new URL("/assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",import.meta.url).href],["Ploughman_back",$r],["Ploughman_front",new URL("/assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",import.meta.url).href],["Tater_back",$r],["Tater_front",new URL("/assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",import.meta.url).href],["Windle_back",$r],["Windle_front",new URL("/assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",import.meta.url).href],["Fishermen_back",new URL("/assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",import.meta.url).href],["Fishermen_front",new URL("/assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",import.meta.url).href],["Shark_back",Nr],["Shark_front",new URL("/assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",import.meta.url).href],["Corsair_back",Nr],["Corsair_front",new URL("/assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",import.meta.url).href],["Yukai_back",Nr],["Yukai_front",new URL("/assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",import.meta.url).href],["Salt_back",Nr],["Salt_front",new URL("/assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",import.meta.url).href],["Tentacles_back",Nr],["Tentacles_front",new URL("/assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",import.meta.url).href],["Angel_back",Nr],["Angel_front",new URL("/assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",import.meta.url).href],["Greyscales_back",Nr],["Greyscales_front",new URL("/assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",import.meta.url).href],["Hag_back",Nr],["Hag_front",new URL("/assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",import.meta.url).href],["Jac_back",Nr],["Jac_front",new URL("/assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",import.meta.url).href],["Knuckles_back",Nr],["Knuckles_front",new URL("/assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",import.meta.url).href],["Kraken_back",Nr],["Kraken_front",new URL("/assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",import.meta.url).href],["Sakana_back",Nr],["Sakana_front",new URL("/assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",import.meta.url).href],["vSakana_back",Nr],["vSakana_front",new URL("/assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",import.meta.url).href],["Siren_back",Nr],["Siren_front",new URL("/assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",import.meta.url).href],["vSiren_back",Nr],["vSiren_front",new URL("/assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",import.meta.url).href],["Hunters_back",new URL("/assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",import.meta.url).href],["Hunters_front",new URL("/assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",import.meta.url).href],["Theron_back",Ar],["Theron_front",new URL("/assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",import.meta.url).href],["Skatha_back",Ar],["Skatha_front",new URL("/assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",import.meta.url).href],["Steeljaw_back",Ar],["Steeljaw_front",new URL("/assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",import.meta.url).href],["Fahad_back",Ar],["Fahad_front",new URL("/assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",import.meta.url).href],["Snow_back",Ar],["Snow_front",new URL("/assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",import.meta.url).href],["Chaska_back",Ar],["Chaska_front",new URL("/assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",import.meta.url).href],["Edge_back",Ar],["Edge_front",new URL("/assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",import.meta.url).href],["Egret_back",Ar],["Egret_front",new URL("/assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",import.meta.url).href],["Hearne_back",Ar],["Hearne_front",new URL("/assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",import.meta.url).href],["vHearne_back",Ar],["vHearne_front",new URL("/assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",import.meta.url).href],["Jaecar_back",Ar],["Jaecar_front",new URL("/assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",import.meta.url).href],["vMinx_back",Ar],["vMinx_front",new URL("/assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",import.meta.url).href],["Seenah_back",Ar],["Seenah_front",new URL("/assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",import.meta.url).href],["Ulfr_back",Ar],["Ulfr_front",new URL("/assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",import.meta.url).href],["Zarola_back",Ar],["Zarola_front",new URL("/assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",import.meta.url).href],["Masons_back",new URL("/assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",import.meta.url).href],["Masons_front",new URL("/assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",import.meta.url).href],["Honour_back",Dr],["Honour_front",new URL("/assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",import.meta.url).href],["Hammer_back",Dr],["Hammer_front",new URL("/assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",import.meta.url).href],["Corbelli_back",Dr],["Corbelli_front",new URL("/assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",import.meta.url).href],["Marbles_back",Dr],["Marbles_front",new URL("/assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",import.meta.url).href],["Wrecker_back",Dr],["Wrecker_front",new URL("/assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",import.meta.url).href],["Brick_back",Dr],["Brick_front",new URL("/assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",import.meta.url).href],["Champ_back",Dr],["Champ_front",new URL("/assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",import.meta.url).href],["Chisel_back",Dr],["Chisel_front",new URL("/assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",import.meta.url).href],["vChisel_back",Dr],["vChisel_front",new URL("/assets/GB-S4-Masons-19-08-18-CCBausup.jpg",import.meta.url).href],["Flint_back",Dr],["Flint_front",new URL("/assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",import.meta.url).href],["Granite_back",Dr],["Granite_front",new URL("/assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",import.meta.url).href],["Harmony_back",Dr],["Harmony_front",new URL("/assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",import.meta.url).href],["vHarmony_back",Dr],["vHarmony_front",new URL("/assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",import.meta.url).href],["Mallet_back",Dr],["Mallet_front",new URL("/assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",import.meta.url).href],["Tower_back",Dr],["Tower_front",new URL("/assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",import.meta.url).href],["Miners_back",new URL("/assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",import.meta.url).href],["Miners_front",new URL("/assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",import.meta.url).href],["Shaft_back",Cc],["Shaft_front",new URL("/assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",import.meta.url).href],["Digger_back",Cc],["Digger_front",new URL("/assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",import.meta.url).href],["Fissure_back",Cc],["Fissure_front",new URL("/assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",import.meta.url).href],["Fuse_back",Cc],["Fuse_front",new URL("/assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",import.meta.url).href],["Mule_back",Cc],["Mule_front",new URL("/assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",import.meta.url).href],["Spade_back",Cc],["Spade_front",new URL("/assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",import.meta.url).href],["Morticians_back",new URL("/assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",import.meta.url).href],["Morticians_front",new URL("/assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",import.meta.url).href],["Obulus_back",Sr],["Obulus_front",new URL("/assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",import.meta.url).href],["Scalpel_back",Sr],["Scalpel_front",new URL("/assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",import.meta.url).href],["Mourn_back",Sr],["Mourn_front",new URL("/assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",import.meta.url).href],["Dirge_back",Sr],["Dirge_front",new URL("/assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",import.meta.url).href],["Vileswarm_back",Sr],["Vileswarm_front",new URL("/assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",import.meta.url).href],["Bonesaw_back",Sr],["Bonesaw_front",new URL("/assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",import.meta.url).href],["Brainpan_back",Sr],["Brainpan_front",new URL("/assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",import.meta.url).href],["Memory_back",Sr],["Memory_front",new URL("/assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",import.meta.url).href],["Casket_back",Sr],["Casket_front",new URL("/assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",import.meta.url).href],["Cosset_back",Sr],["Cosset_front",new URL("/assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",import.meta.url).href],["Gaffer_back",Sr],["Gaffer_front",new URL("/assets/gaffer-front-large-box-BhDGw3yv.png",import.meta.url).href],["Ghast_back",Sr],["Ghast_front",new URL("/assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",import.meta.url).href],["Graves_back",Sr],["Graves_front",new URL("/assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",import.meta.url).href],["vGraves_back",Sr],["vGraves_front",new URL("/assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",import.meta.url).href],["vHemlocke_back",Sr],["vHemlocke_front",new URL("/assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",import.meta.url).href],["Silence_back",Sr],["Silence_front",new URL("/assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",import.meta.url).href],["Navigators_back",new URL("/assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",import.meta.url).href],["Navigators_front",new URL("/assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",import.meta.url).href],["Windfinder_back",kc],["Wander_front",new URL("/assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",import.meta.url).href],["Windfinder_front",new URL("/assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",import.meta.url).href],["Wander_back",kc],["Azimuth_front",new URL("/assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",import.meta.url).href],["Azimuth_back",kc],["Ebb_back",kc],["Ebb_front",new URL("/assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",import.meta.url).href],["Fathom_front",new URL("/assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",import.meta.url).href],["Fathom_back",kc],["Horizon_back",kc],["Horizon_front",new URL("/assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",import.meta.url).href],["Order_back",new URL("/assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",import.meta.url).href],["Order_front",new URL("/assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",import.meta.url).href],["sBrisket_back",ca],["sBrisket_front",new URL("/assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",import.meta.url).href],["Pride_back",ca],["Pride_front",new URL("/assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",import.meta.url).href],["Benediction_back",ca],["Benediction_front",new URL("/assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",import.meta.url).href],["vFangtooth_back",ca],["vFangtooth_front",new URL("/assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",import.meta.url).href],["Grace_back",ca],["Grace_front",new URL("/assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",import.meta.url).href],["Harry_back",ca],["Harry_front",new URL("/assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",import.meta.url).href],["Mist_back",ca],["Mist_front",new URL("/assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",import.meta.url).href],["sSpigot_back",ca],["sSpigot_front",new URL("/assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",import.meta.url).href],["Ratcatchers_back",new URL("/assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",import.meta.url).href],["Ratcatchers_front",new URL("/assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",import.meta.url).href],["Piper_back",Ec],["Piper_front",new URL("/assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",import.meta.url).href],["Squeak_back",Ec],["Squeak_front",new URL("/assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",import.meta.url).href],["Miasma_back",Ec],["Miasma_front",new URL("/assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",import.meta.url).href],["Pelage_back",Ec],["Pelage_front",new URL("/assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",import.meta.url).href],["Scourge_back",Ec],["Scourge_front",new URL("/assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",import.meta.url).href],["Skulk_back",Ec],["Skulk_front",new URL("/assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",import.meta.url).href],["Shepherds_back",new URL("/assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",import.meta.url).href],["Shepherds_front",new URL("/assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",import.meta.url).href],["Herder_back",al],["Herder_front",new URL("/assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",import.meta.url).href],["Babe_back",al],["Babe_front",new URL("/assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",import.meta.url).href],["Crook_back",al],["Crook_front",new URL("/assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",import.meta.url).href],["Hook_back",al],["Hook_front",new URL("/assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",import.meta.url).href],["Lamb_back",al],["Lamb_front",new URL("/assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",import.meta.url).href],["Ram_back",al],["Ram_front",new URL("/assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",import.meta.url).href],["Shearer_back",al],["Shearer_front",new URL("/assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",import.meta.url).href],["Union_back",new URL("/assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",import.meta.url).href],["Union_front",new URL("/assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",import.meta.url).href],["Blackheart_back",Yr],["Blackheart_front",new URL("/assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",import.meta.url).href],["vRage_back",Yr],["vRage_front",new URL("/assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",import.meta.url).href],["vGreede_back",Yr],["vGreede_front",new URL("/assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",import.meta.url).href],["Coin_back",Yr],["Coin_front",new URL("/assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",import.meta.url).href],["Strongbox_back",Yr],["Strongbox_front",new URL("/assets/GB-S4-Union-20-03-12--TefmgjH.jpg",import.meta.url).href],["Avarisse_back",Yr],["Avarisse_front",new URL("/assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",import.meta.url).href],["Greede_back",Yr],["Greede_front",new URL("/assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",import.meta.url).href],["Decimate_back",Yr],["Decimate_front",new URL("/assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",import.meta.url).href],["Fangtooth_back",Yr],["Fangtooth_front",new URL("/assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",import.meta.url).href],["Gutter_back",Yr],["Gutter_front",new URL("/assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",import.meta.url).href],["Hemlocke_back",Yr],["Hemlocke_front",new URL("/assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",import.meta.url).href],["Minx_back",Yr],["Minx_front",new URL("/assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",import.meta.url).href],["Rage_back",Yr],["Rage_front",new URL("/assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",import.meta.url).href],["Snakeskin_back",Yr],["Snakeskin_front",new URL("/assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",import.meta.url).href],["Lamplighters_front",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Lamplighters_back",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Nightlight_gbcp_front",new URL("/assets/nightlight-00-DeG30Qno.jpg",import.meta.url).href],["Nightlight_gbcp_back",new URL("/assets/nightlight-01-B5GmfHdF.jpg",import.meta.url).href],["Soot_gbcp_front",new URL("/assets/soot-00-CjgkmHEF.jpg",import.meta.url).href],["Soot_gbcp_back",new URL("/assets/soot-01-DLvloUPB.jpg",import.meta.url).href],["Beacon_gbcp_front",new URL("/assets/beacon-00-L9zfj4Q8.jpg",import.meta.url).href],["Beacon_gbcp_back",new URL("/assets/beacon-01-vYao7kaT.jpg",import.meta.url).href],["Heat_gbcp_front",new URL("/assets/heat-00-D38QQgsn.jpg",import.meta.url).href],["Heat_gbcp_back",new URL("/assets/heat-01-TaWfEq1e.jpg",import.meta.url).href],["Phosphor_gbcp_front",new URL("/assets/phosphor-00-kYBsDzr4.jpg",import.meta.url).href],["Phosphor_gbcp_back",new URL("/assets/phosphor-01-aCMgs7Xa.jpg",import.meta.url).href],["Wick_gbcp_front",new URL("/assets/wick-00-CEZ6BY1J.jpg",import.meta.url).href],["Wick_gbcp_back",new URL("/assets/wick-01-DtuDStax.jpg",import.meta.url).href],["sBrisket_gbcp_front",new URL("/assets/brisket3-00-TRUFkM-Q.jpg",import.meta.url).href],["sBrisket_gbcp_back",new URL("/assets/brisket3-01-C19fZQ9I.jpg",import.meta.url).href],["Cast_gbcp_front",new URL("/assets/cast-00-CDhbzPRV.jpg",import.meta.url).href],["Cast_gbcp_back",new URL("/assets/cast-01-DOJiR9Ch.jpg",import.meta.url).href],["Crook_gbcp_front",new URL("/assets/crook-00-C4D_gdaM.jpg",import.meta.url).href],["Crook_gbcp_back",new URL("/assets/crook-01-D9bCOT5R.jpg",import.meta.url).href],["Egret_gbcp_front",new URL("/assets/egret-00-BKhmAAwA.jpg",import.meta.url).href],["Egret_gbcp_back",new URL("/assets/egret-01-DCSfZLX7.jpg",import.meta.url).href],["Hook_gbcp_front",new URL("/assets/hook-00-BCtxORP2.jpg",import.meta.url).href],["Hook_gbcp_back",new URL("/assets/hook-01-CFEXTspD.jpg",import.meta.url).href],["Ikaros_gbcp_front",new URL("/assets/ikaros-00-BlK23AQW.jpg",import.meta.url).href],["Ikaros_gbcp_back",new URL("/assets/ikaros-01-CaTWYr3E.jpg",import.meta.url).href],["Lucky_gbcp_front",new URL("/assets/lucky-00--3wf1Q-o.jpg",import.meta.url).href],["Lucky_gbcp_back",new URL("/assets/lucky-01-CeFOEkb7.jpg",import.meta.url).href],["Miasma_gbcp_front",new URL("/assets/miasma-00-gJuVKj0r.jpg",import.meta.url).href],["Miasma_gbcp_back",new URL("/assets/miasma-01-BFpZKg3H.jpg",import.meta.url).href],["Minx_gbcp_front",new URL("/assets/minx-00-DKid1QgM.jpg",import.meta.url).href],["Minx_gbcp_back",new URL("/assets/minx-01-h4AvAe2P.jpg",import.meta.url).href],["Steeljaw_gbcp_front",new URL("/assets/steeljaw-00-DBylP57a.jpg",import.meta.url).href],["Steeljaw_gbcp_back",new URL("/assets/steeljaw-01-DHvdkD3u.jpg",import.meta.url).href],["Tenderiser_gbcp_front",new URL("/assets/tenderiser-00-DJeWjZaC.jpg",import.meta.url).href],["Tenderiser_gbcp_back",new URL("/assets/tenderiser-01-Dn53BCqM.jpg",import.meta.url).href],["Angel_gbcp_front",new URL("/assets/Angel-00-_OcCE1xs.jpg",import.meta.url).href],["Angel_gbcp_back",new URL("/assets/Angel-01-RsyL_b7r.jpg",import.meta.url).href],["Blackheart_gbcp_front",new URL("/assets/Blackheart-00-Barboaw1.jpg",import.meta.url).href],["Blackheart_gbcp_back",new URL("/assets/Blackheart-01-DqXGaAGL.jpg",import.meta.url).href],["Brisket_gbcp_front",new URL("/assets/Brisket-00-fpn5lXhR.jpg",import.meta.url).href],["Brisket_gbcp_back",new URL("/assets/Brisket-01-Cz0yKYaC.jpg",import.meta.url).href],["Flea_gbcp_front",new URL("/assets/Flea-00-PYY29ZDm.jpg",import.meta.url).href],["Flea_gbcp_back",new URL("/assets/Flea-01-B-ceu-Fs.jpg",import.meta.url).href],["Gaffer_gbcp_front",new URL("/assets/Gaffer-00-Chm4XJB6.jpg",import.meta.url).href],["Gaffer_gbcp_back",new URL("/assets/Gaffer-01-DChRbbv3.jpg",import.meta.url).href],["Locus_gbcp_front",new URL("/assets/Locus-00-BlUYiKL3.jpg",import.meta.url).href],["Locus_gbcp_back",new URL("/assets/Locus-01-CgJeSABI.jpg",import.meta.url).href],["Salt_gbcp_front",new URL("/assets/Salt-00-DTipa4Vq.jpg",import.meta.url).href],["Salt_gbcp_back",new URL("/assets/Salt-01-DgX-3wqX.jpg",import.meta.url).href],["Truffles_gbcp_front",new URL("/assets/Truffles-00-BxTIIeQ4.jpg",import.meta.url).href],["Truffles_gbcp_back",new URL("/assets/Truffles-01-1xGyMIOv.jpg",import.meta.url).href],["Ulfr_gbcp_front",new URL("/assets/Ulfr-00-BXhlGxmA.jpg",import.meta.url).href],["Ulfr_gbcp_back",new URL("/assets/Ulfr-01-JQfocVce.jpg",import.meta.url).href],["vGutter_gbcp_front",new URL("/assets/vGutter-00-CpnNh9P4.jpg",import.meta.url).href],["vGutter_gbcp_back",new URL("/assets/vGutter-01-BWHR1234.jpg",import.meta.url).href],["Beacon_front",new URL("/assets/beacon-WzU-Fgwo.jpg",import.meta.url).href],["Beacon_back",Rc],["Heat_front",new URL("/assets/heat-kg0Ne0rh.jpg",import.meta.url).href],["Heat_back",Rc],["Nightlight_front",new URL("/assets/nightlight-BICbD_Qy.jpg",import.meta.url).href],["Nightlight_back",Rc],["Phosphor_front",new URL("/assets/phosphor-CifRCYrC.jpg",import.meta.url).href],["Phosphor_back",Rc],["Soot_front",new URL("/assets/soot-CXEcs2BT.jpg",import.meta.url).href],["Soot_back",Rc],["Wick_front",new URL("/assets/wick-D10XZuyz.jpg",import.meta.url).href],["Wick_back",Rc]]);var gre=function(e){return e instanceof RegExp},vre=function(t){var n=/[\\^$.*+?()[\]{}|]/g,r=RegExp(n.source);return t&&r.test(t)?t.replace(n,"\\$&"):t},tM=function(e){return typeof e=="string"},yre=function(e){var t=[];return e.forEach(function(n){Array.isArray(n)?t=t.concat(n):t.push(n)}),t};function bre(e,t,n){var r=0,i=0;if(e==="")return e;if(!e||!tM(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;gre(o)||(o=new RegExp("("+vre(o)+")","gi"));for(var s=e.split(o),a=1,l=s.length;a{let t=Ph(e,/\(◉(.*?)\)/g,(n,r)=>v.jsxs(Rt.Fragment,{children:["(◉",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-a-${r}`));return t=Ph(t,/\(([^◉].*?)\)/g,(n,r)=>v.jsxs(Rt.Fragment,{children:["(",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-${r}`)),t=Ph(t,/{([<>TKDGB]+)}/,(n,r)=>v.jsx(Rt.Fragment,{children:v.jsx("span",{style:{display:"inline-flex",width:"21px",height:"1ex",position:"relative",overflow:"visible"},children:v.jsx("div",{style:{display:"flex",overflow:"visible",width:"21px",height:"21px",backgroundColor:"white",border:"var(--line-width) solid black",borderRadius:"21px",position:"absolute",alignSelf:"center",justifySelf:"center",alignItems:"center",justifyContent:"center"},children:v.jsx(MI,{icon:n.replace(/GB/g,"CP")})})})},`pb-${r}`)),t=Ph(t,/\b([A-Z]+)\b/g,(n,r)=>v.jsx("span",{style:{letterSpacing:"-1px"},children:n},`tla-${r}`)),v.jsx(v.Fragment,{children:t})},xre=e=>{const t=e.model,n=t.id,{setting$:r}=ai(),[i,o]=k.useState(),[s,a]=k.useState();k.useEffect(()=>{const f=r==null?void 0:r.subscribe(m=>{o(m==null?void 0:m.toJSON().data.cardPreferences.preferredStyle),a(m==null?void 0:m.toJSON().data.language)});return()=>f==null?void 0:f.unsubscribe()});const[l,c]=io(f=>Promise.all([f.guilds.findOne().where({name:t.guild1}).exec(),f.guilds.findOne().where({name:t.guild2}).exec()]),[t.guild1,t.guild2])??[];if(!l)return null;const u=i==="gbcp"&&(on.has(`${n}_gbcp_front`)||on.has(`${n}_full`)),d=u?on.get(`${n}_full`)??on.get(`${n}_gbcp_front`)??on.get(`${n}_front`):on.get(`${n}_front`)??on.get(`${n}_full`)??on.get(`${n}_gbcp_front`);return v.jsx("div",{className:`card-front ${n} lang-${s} ${u&&"gbcp"} ${e.className}`,style:{"--team-color":l.color,"--gbcp-color":Kf(l.shadow??l.color).mix(Kf.rgb(254,246,227),.9).string(),"--guild1-color":l.color,"--guild2-color":c?c.color:void 0,"--mom-color":l.shadow,"--mom-border-color":l.darkColor,backgroundImage:e.noBackground?void 0:`url(${d})`,...e.style},children:v.jsxs("div",{className:`overlay ${u?"gbcp":""}`,children:[v.jsxs("div",{className:"font-top-box",children:[v.jsx(Sre,{model:t,guild:l}),v.jsx(kre,{model:t})]}),v.jsx(Cre,{model:t,gbcp:u}),v.jsx("div",{className:"character-plays-wrapper",children:v.jsx(Rre,{model:t,gbcp:u})}),v.jsx(_re,{model:t,health$:e.health$})]})})},Sre=({model:e,guild:t})=>v.jsxs("div",{className:"name-plate",children:[v.jsx("div",{className:"guild-icon",children:v.jsx(Ci,{id:"guild-icon",icon:t.name})}),v.jsxs("div",{className:"name-plate-right",children:[v.jsx("div",{className:"name",children:v.jsx("div",{className:"dropcap",children:e.name.split(/(?=[A-Z])/).map((n,r)=>v.jsx("span",{children:n},r))})}),v.jsxs("div",{className:"reach",children:["Melee Zone ",e.reach?2:1,'"']})]})]}),_re=({model:e,health$:t})=>{const[n,r]=k.useState(e.hp);return k.useEffect(()=>{const i=t==null?void 0:t.subscribe(o=>r(o));return()=>i==null?void 0:i.unsubscribe()},[t]),v.jsx("div",{className:"health",children:[...Array(e.hp).keys()].map(i=>v.jsx("div",{className:`health-box ${i+1>n?"damaged":""}`,children:i===0&&v.jsx(Ci,{icon:"skull",size:17})||i+1===e.recovery&&v.jsx(Ci,{icon:"bandage",size:22})||i+1===e.hp&&i+1},i))})},Cre=({model:e,gbcp:t=!1})=>{var n;return v.jsx("div",{className:"playbook",children:(n=e.playbook)==null?void 0:n.map((r,i)=>r==null?void 0:r.flatMap((o,s)=>{const[a,l]=o?o.split(";"):[null,null];return v.jsx("div",{className:`playbook-result ${a?"":"spacer"} ${l?"momentus":""}`,style:{"--col":s,display:"flex",flexDirection:t?"row":"column",padding:"0.10em",gap:t?0:"0.05em"},children:a?a.split(",").map((c,u)=>(c=t?c.replace(/^CP$/,"CP-gbcp").replace(/^CP2$/,"CP2-gbcp"):c,v.jsx(MI,{icon:c},u))):null},i*7+s)}))})},kre=({model:e})=>v.jsxs("div",{className:"statbox",children:[v.jsx("span",{children:"MOV"}),v.jsx("span",{children:"TAC"}),v.jsx("span",{children:"KICK"}),v.jsx("span",{children:"DEF"}),v.jsx("span",{children:"ARM"}),v.jsx("span",{children:"INF"}),v.jsx("span",{children:`${e.jog}"/${e.sprint}"`}),v.jsx("span",{children:e.tac}),v.jsx("span",{children:`${e.kickdice}/${e.kickdist}"`}),v.jsx("span",{children:`${e.def}+`}),v.jsx("span",{children:e.arm}),v.jsx("span",{children:`${e.inf}/${e.infmax}`})]}),$R=({test:e})=>v.jsx(Ci,{icon:e?"checkmark":"ballotX",size:14});function Ere({text:e}){const t=e.split("[",1)[0],n=e.replace(/[^[]*(\[.*\])?/," $1");return v.jsxs("div",{className:"name",children:[v.jsx("span",{children:t}),v.jsx("span",{children:n})]})}const Rre=({model:e,gbcp:t=!1})=>v.jsxs("div",{className:"character-plays",children:[v.jsxs("span",{className:"dropcap",children:[v.jsx("span",{children:"Character "}),v.jsx("span",{children:"Plays"})]}),v.jsx("span",{children:"CST"}),v.jsx("span",{children:"RNG"}),v.jsx("span",{children:"SUS"}),v.jsx("span",{children:"OPT"}),e.character_plays.map(n=>v.jsxs(Rt.Fragment,{children:[v.jsx(Ere,{text:n.name}),v.jsx("span",{children:String(n.CST).split(",").map((r,i)=>v.jsxs("span",{children:[i>0&&"/",{CP:v.jsx(Ci,{icon:t?"ball":"GB",size:18}),CP2:v.jsx(Ci,{icon:t?"trophy":"GBT",size:18})}[r]||v.jsx("span",{children:r})]},i))}),v.jsxs("span",{children:[n.RNG,typeof n.RNG=="number"&&'"']}),v.jsx("span",{children:v.jsx($R,{test:n.SUS})}),v.jsx("span",{children:v.jsx($R,{test:n.OPT})}),v.jsx("div",{className:"text",children:oy(n.text)})]},n.name))]}),hg=Rt.memo(xre),Pre=e=>{const t=e.model,n=t.id,{setting$:r}=ai(),[i,o]=k.useState();k.useEffect(()=>{const c=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.cardPreferences.preferredStyle)).subscribe(u=>o(u));return()=>c==null?void 0:c.unsubscribe()});const s=io(c=>c.guilds.findOne().where({name:t.guild1}).exec(),[t.guild1]);if(!s)return null;const a=i==="gbcp"&&(on.has(`${n}_gbcp_front`)||on.has(`${n}_full`)),l=a?on.get(`${n}_full`)??on.get(`${n}_gbcp_back`)??on.get(`${n}_back`):on.get(`${n}_back`)??on.get(`${n}_full`)??on.get(`${n}_gbcp_back`);return v.jsx("div",{className:`card-back ${n} ${a&&"gbcp"} ${e.className}`,style:{"--team-color":s.color,"--gbcp-color":Kf(s.shadow??s.color).mix(Kf.rgb(254,246,227),.9),"--mom-color":s.shadow,"--mom-border-color":s.darkColor,backgroundImage:e.noBackground?void 0:`url(${l})`,...e.style},children:v.jsxs("div",{className:`overlay ${a?"gbcp":""}`,children:[v.jsxs("div",{className:"container",children:[v.jsxs("div",{className:"name-plate",children:[v.jsx("div",{className:"guild-icon",children:v.jsx(Ci,{id:"guild-icon",icon:s.name})}),v.jsx("div",{className:"name dropcap",children:t.name.split(/(?=[A-Z])/).map((c,u)=>v.jsx("span",{children:c},u))})]}),v.jsx(Tre,{model:t}),v.jsx(Ore,{model:t}),v.jsx(Lre,{model:t})]}),v.jsxs("div",{className:"footer",children:[v.jsx("div",{className:"tags",children:t.types}),v.jsxs("div",{className:"right",children:[v.jsxs("div",{className:"icons",children:[v.jsx(V0,{icon:a?"gbcp":"GB"}),t.guild2&&v.jsx(V0,{icon:t.guild2}),v.jsx(V0,{icon:t.guild1})]}),v.jsx("div",{className:"base-size",children:`Size ${t.base} mm`})]})]})]})})},V0=({icon:e})=>v.jsx("div",{className:"icon wrapper",children:v.jsx(Ci,{icon:e})});function AS({text:e}){const t=e.split("[",1)[0],n=e.replace(/[^[]*(\[.*\])?/," $1");return v.jsxs("div",{children:[v.jsx("span",{children:t}),v.jsx("span",{children:n})]})}const Tre=({model:e})=>v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Character "}),v.jsx("span",{children:"Traits"})]}),e.character_traits.map((t,n)=>v.jsxs(Rt.Fragment,{children:[v.jsxs("div",{className:"character-trait",children:[v.jsx("div",{className:`trait ${t.active&&"active"}`,children:v.jsx(AS,{text:t.name.concat(t.parameter?` [${t.parameter}]`:"")})}),v.jsx("span",{className:"text",children:oy(t.text)})]},`${t.name}-${n}`),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]},`ct-${n}`))]}),Ore=({model:e})=>{if(!e.heroic)return null;const t=e.heroic.split(` -`,1)[0],n=e.heroic.split(` -`).slice(1).join(` -`);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Heroic "}),v.jsx("span",{children:"Play"})]}),v.jsxs("div",{className:"heroic",children:[v.jsx(AS,{text:t}),v.jsx("span",{children:oy(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},Lre=({model:e})=>{if(!e.legendary)return null;const t=e.legendary.split(` -`,1)[0],n=e.legendary.split(` -`).slice(1).join(` -`);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Legendary "}),v.jsx("span",{children:"Play"})]}),v.jsxs("div",{className:"legendary",children:[v.jsx(AS,{text:t}),v.jsx("span",{children:oy(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},mg=Rt.memo(Pre);function nM({children:e,model:t,health$:n}){const r=k.useRef(null),i=k.useRef(null),[o,s]=k.useState(1);k.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=k.useCallback(()=>{if(!r.current)return;const{width:l,height:c}=r.current.getBoundingClientRect(),u=l/500,d=c/700,f=Math.min(u,d,1);s(f??1)},[]);return v.jsx("div",{ref:r,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{ref:i,className:"flip-card",onClick:()=>{var l;(l=i.current)==null||l.classList.toggle("flipped")},children:v.jsxs("div",{className:"flip-card-inner",children:[v.jsxs("div",{className:"flip-card-front",children:[v.jsx(hg,{model:t,health$:n,style:{"--scale":o}}),e]}),v.jsx("div",{className:"flip-card-back",children:v.jsx(mg,{model:t,style:{"--scale":o}})})]})})})}function NR(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function DS(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:NR(t[n])&&NR(e[n])&&Object.keys(t[n]).length>0&&DS(e[n],t[n])})}const rM={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function qu(){const e=typeof document<"u"?document:{};return DS(e,rM),e}const jre={document:rM,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Oi(){const e=typeof window<"u"?window:{};return DS(e,jre),e}function Ire(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function Mre(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function Q1(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function gg(){return Date.now()}function $re(e){const t=Oi();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function Nre(e,t){t===void 0&&(t="x");const n=Oi();let r,i,o;const s=$re(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(a=>a.replace(",",".")).join(", ")),o=new n.WebKitCSSMatrix(i==="none"?"":i)):(o=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=o.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?i=o.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?i=o.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function Th(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function Are(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function pi(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;nt.indexOf(o)<0);for(let o=0,s=i.length;oo?"next":"prev",u=(f,m)=>c==="next"&&f>=m||c==="prev"&&f<=m,d=()=>{a=new Date().getTime(),s===null&&(s=a);const f=Math.max(Math.min((a-s)/l,1),0),m=.5-Math.cos(f*Math.PI)/2;let p=o+m*(n-o);if(u(p,n)&&(p=n),t.wrapperEl.scrollTo({[r]:p}),u(p,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:p})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(d)};d()}function Cs(e,t){return t===void 0&&(t=""),[...e.children].filter(n=>n.matches(t))}function vg(e){try{console.warn(e);return}catch{}}function X1(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:Ire(t)),n}function Dre(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Bre(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function _a(e,t){return Oi().getComputedStyle(e,null).getPropertyValue(t)}function AR(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function Fre(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function DR(e,t,n){const r=Oi();return n?e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom")):e.offsetWidth}let K0;function zre(){const e=Oi(),t=qu();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function oM(){return K0||(K0=zre()),K0}let q0;function Ure(e){let{userAgent:t}=e===void 0?{}:e;const n=oM(),r=Oi(),i=r.navigator.platform,o=t||r.navigator.userAgent,s={ios:!1,android:!1},a=r.screen.width,l=r.screen.height,c=o.match(/(Android);?[\s\/]+([\d.]+)?/);let u=o.match(/(iPad).*OS\s([\d_]+)/);const d=o.match(/(iPod)(.*OS\s([\d_]+))?/),f=!u&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m=i==="Win32";let p=i==="MacIntel";const g=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!u&&p&&n.touch&&g.indexOf(`${a}x${l}`)>=0&&(u=o.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),p=!1),c&&!m&&(s.os="android",s.android=!0),(u||f||d)&&(s.os="ios",s.ios=!0),s}function sM(e){return e===void 0&&(e={}),q0||(q0=Ure(e)),q0}let Y0;function Wre(){const e=Oi(),t=sM();let n=!1;function r(){const a=e.navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}if(r()){const a=String(e.navigator.userAgent);if(a.includes("Version/")){const[l,c]=a.split("Version/")[1].split(" ")[0].split(".").map(u=>Number(u));n=l<16||l===16&&c<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=r(),s=o||i&&t.ios;return{isSafari:n||o,needPerspectiveFix:n,need3dFix:s,isWebView:i}}function Gre(){return Y0||(Y0=Wre()),Y0}function Hre(e){let{swiper:t,on:n,emit:r}=e;const i=Oi();let o=null,s=null;const a=()=>{!t||t.destroyed||!t.initialized||(r("beforeResize"),r("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(o=new ResizeObserver(d=>{s=i.requestAnimationFrame(()=>{const{width:f,height:m}=t;let p=f,g=m;d.forEach(E=>{let{contentBoxSize:b,contentRect:w,target:y}=E;y&&y!==t.el||(p=w?w.width:(b[0]||b).inlineSize,g=w?w.height:(b[0]||b).blockSize)}),(p!==f||g!==m)&&a()})}),o.observe(t.el))},c=()=>{s&&i.cancelAnimationFrame(s),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null)},u=()=>{!t||t.destroyed||!t.initialized||r("orientationchange")};n("init",()=>{if(t.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",a),i.addEventListener("orientationchange",u)}),n("destroy",()=>{c(),i.removeEventListener("resize",a),i.removeEventListener("orientationchange",u)})}function Vre(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o=[],s=Oi(),a=function(u,d){d===void 0&&(d={});const f=s.MutationObserver||s.WebkitMutationObserver,m=new f(p=>{if(t.__preventObserver__)return;if(p.length===1){i("observerUpdate",p[0]);return}const g=function(){i("observerUpdate",p[0])};s.requestAnimationFrame?s.requestAnimationFrame(g):s.setTimeout(g,0)});m.observe(u,{attributes:typeof d.attributes>"u"?!0:d.attributes,childList:typeof d.childList>"u"?!0:d.childList,characterData:typeof d.characterData>"u"?!0:d.characterData}),o.push(m)},l=()=>{if(t.params.observer){if(t.params.observeParents){const u=Fre(t.hostEl);for(let d=0;d{o.forEach(u=>{u.disconnect()}),o.splice(0,o.length)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",l),r("destroy",c)}var Kre={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const i=n?"unshift":"push";return e.split(" ").forEach(o=>{r.eventsListeners[o]||(r.eventsListeners[o]=[]),r.eventsListeners[o][i](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function i(){r.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var o=arguments.length,s=new Array(o),a=0;a=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((i,o)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[r].splice(o,1)})}),n},emit(){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,n,r;for(var i=arguments.length,o=new Array(i),s=0;s{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(c=>{c.apply(r,[l,...n])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(c=>{c.apply(r,n)})}),e}};function qre(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(_a(r,"padding-left")||0,10)-parseInt(_a(r,"padding-right")||0,10),n=n-parseInt(_a(r,"padding-top")||0,10)-parseInt(_a(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function Yre(){const e=this;function t(L,$){return parseFloat(L.getPropertyValue(e.getDirectionLabel($))||0)}const n=e.params,{wrapperEl:r,slidesEl:i,size:o,rtlTranslate:s,wrongRTL:a}=e,l=e.virtual&&n.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,u=Cs(i,`.${e.params.slideClass}, swiper-slide`),d=l?e.virtual.slides.length:u.length;let f=[];const m=[],p=[];let g=n.slidesOffsetBefore;typeof g=="function"&&(g=n.slidesOffsetBefore.call(e));let E=n.slidesOffsetAfter;typeof E=="function"&&(E=n.slidesOffsetAfter.call(e));const b=e.snapGrid.length,w=e.slidesGrid.length;let y=n.spaceBetween,_=-g,R=0,T=0;if(typeof o>"u")return;typeof y=="string"&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*o:typeof y=="string"&&(y=parseFloat(y)),e.virtualSize=-y,u.forEach(L=>{s?L.style.marginLeft="":L.style.marginRight="",L.style.marginBottom="",L.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(Oh(r,"--swiper-centered-offset-before",""),Oh(r,"--swiper-centered-offset-after",""));const C=n.grid&&n.grid.rows>1&&e.grid;C?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();let I;const A=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(L=>typeof n.breakpoints[L].slidesPerView<"u").length>0;for(let L=0;L1&&f.push(e.virtualSize-o)}if(l&&n.loop){const L=p[0]+y;if(n.slidesPerGroup>1){const $=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),F=L*n.slidesPerGroup;for(let z=0;z<$;z+=1)f.push(f[f.length-1]+F)}for(let $=0;$!n.cssMode||n.loop?!0:F!==u.length-1).forEach($=>{$.style[L]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let L=0;p.forEach(F=>{L+=F+(y||0)}),L-=y;const $=L-o;f=f.map(F=>F<=0?-g:F>$?$+E:F)}if(n.centerInsufficientSlides){let L=0;if(p.forEach($=>{L+=$+(y||0)}),L-=y,L{f[z]=F-$}),m.forEach((F,z)=>{m[z]=F+$})}}if(Object.assign(e,{slides:u,snapGrid:f,slidesGrid:m,slidesSizesGrid:p}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Oh(r,"--swiper-centered-offset-before",`${-f[0]}px`),Oh(r,"--swiper-centered-offset-after",`${e.size/2-p[p.length-1]/2}px`);const L=-e.snapGrid[0],$=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(F=>F+L),e.slidesGrid=e.slidesGrid.map(F=>F+$)}if(d!==c&&e.emit("slidesLengthChange"),f.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),m.length!==w&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const L=`${n.containerModifierClass}backface-hidden`,$=e.el.classList.contains(L);d<=n.maxBackfaceHiddenSlides?$||e.el.classList.add(L):$&&e.el.classList.remove(L)}}function Qre(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let i=0,o;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=a=>r?t.slides[t.getSlideIndexByData(a)]:t.slides[a];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(a=>{n.push(a)});else for(o=0;ot.slides.length&&!r)break;n.push(s(a))}else n.push(s(t.activeIndex));for(o=0;oi?a:i}(i||i===0)&&(t.wrapperEl.style.height=`${i}px`)}function Xre(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r"u"&&t.updateSlidesOffset();let s=-e;i&&(s=e),r.forEach(l=>{l.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass)}),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=n.spaceBetween;typeof a=="string"&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:typeof a=="string"&&(a=parseFloat(a));for(let l=0;l=0&&m<=t.size-t.slidesSizesGrid[l];(m>=0&&m1&&p<=t.size||m<=0&&p>=t.size)&&(t.visibleSlides.push(c),t.visibleSlidesIndexes.push(l),r[l].classList.add(n.slideVisibleClass)),g&&r[l].classList.add(n.slideFullyVisibleClass),c.progress=i?-d:d,c.originalProgress=i?-f:f}}function Zre(e){const t=this;if(typeof e>"u"){const u=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*u||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:s,progressLoop:a}=t;const l=o,c=s;if(r===0)i=0,o=!0,s=!0;else{i=(e-t.minTranslate())/r;const u=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;o=u||i<=0,s=d||i>=1,u&&(i=0),d&&(i=1)}if(n.loop){const u=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),f=t.slidesGrid[u],m=t.slidesGrid[d],p=t.slidesGrid[t.slidesGrid.length-1],g=Math.abs(e);g>=f?a=(g-f)/p:a=(g+p-m)/p,a>1&&(a-=1)}Object.assign(t,{progress:i,progressLoop:a,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!c&&t.emit("reachEnd toEdge"),(l&&!o||c&&!s)&&t.emit("fromEdge"),t.emit("progress",i)}const Q0=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function eie(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:i}=e,o=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,a=d=>Cs(r,`.${n.slideClass}${d}, swiper-slide${d}`)[0];let l,c,u;if(o)if(n.loop){let d=i-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${d}"]`)}else l=a(`[data-swiper-slide-index="${i}"]`);else s?(l=t.filter(d=>d.column===i)[0],u=t.filter(d=>d.column===i+1)[0],c=t.filter(d=>d.column===i-1)[0]):l=t[i];l&&(s||(u=Bre(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u&&(u=t[0]),c=Dre(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!c===0&&(c=t[t.length-1]))),t.forEach(d=>{Q0(d,d===l,n.slideActiveClass),Q0(d,d===u,n.slideNextClass),Q0(d,d===c,n.slidePrevClass)}),e.emitSlidesClasses()}const im=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let i=r.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(r.shadowRoot?i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},X0=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},J1=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,a=[s-t];a.push(...Array.from({length:t}).map((l,c)=>s+r+c)),e.slides.forEach((l,c)=>{a.includes(l.column)&&X0(e,c)});return}const o=i+r-1;if(e.params.rewind||e.params.loop)for(let s=i-t;s<=o+t;s+=1){const a=(s%n+n)%n;(ao)&&X0(e,a)}else for(let s=Math.max(i-t,0);s<=Math.min(o+t,n-1);s+=1)s!==i&&(s>o||s=t[o]&&r=t[o]&&r=t[o]&&(i=o);return n.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function nie(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:i,activeIndex:o,realIndex:s,snapIndex:a}=t;let l=e,c;const u=m=>{let p=m-t.virtual.slidesBefore;return p<0&&(p=t.virtual.slides.length+p),p>=t.virtual.slides.length&&(p-=t.virtual.slides.length),p};if(typeof l>"u"&&(l=tie(t)),r.indexOf(n)>=0)c=r.indexOf(n);else{const m=Math.min(i.slidesPerGroupSkip,l);c=m+Math.floor((l-m)/i.slidesPerGroup)}if(c>=r.length&&(c=r.length-1),l===o&&!t.params.loop){c!==a&&(t.snapIndex=c,t.emit("snapIndexChange"));return}if(l===o&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=u(l);return}const d=t.grid&&i.grid&&i.grid.rows>1;let f;if(t.virtual&&i.virtual.enabled&&i.loop)f=u(l);else if(d){const m=t.slides.filter(g=>g.column===l)[0];let p=parseInt(m.getAttribute("data-swiper-slide-index"),10);Number.isNaN(p)&&(p=Math.max(t.slides.indexOf(m),0)),f=Math.floor(p/i.grid.rows)}else if(t.slides[l]){const m=t.slides[l].getAttribute("data-swiper-slide-index");m?f=parseInt(m,10):f=l}else f=l;Object.assign(t,{previousSnapIndex:a,snapIndex:c,previousRealIndex:s,realIndex:f,previousIndex:o,activeIndex:l}),t.initialized&&J1(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==f&&t.emit("realIndexChange"),t.emit("slideChange"))}function rie(e,t){const n=this,r=n.params;let i=e.closest(`.${r.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(a=>{!i&&a.matches&&a.matches(`.${r.slideClass}, swiper-slide`)&&(i=a)});let o=!1,s;if(i){for(let a=0;al?u=l:r&&es?a="next":o"u"&&(t=o.params.speed);const g=Math.min(o.params.slidesPerGroupSkip,s);let E=g+Math.floor((s-g)/o.params.slidesPerGroup);E>=l.length&&(E=l.length-1);const b=-l[E];if(a.normalizeSlideIndex)for(let y=0;y=R&&_=R&&_=R&&(s=y)}if(o.initialized&&s!==d&&(!o.allowSlideNext&&(f?b>o.translate&&b>o.minTranslate():bo.translate&&b>o.maxTranslate()&&(d||0)!==s))return!1;s!==(u||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(b);let w;if(s>d?w="next":s0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[y?"scrollLeft":"scrollTop"]=_})):m[y?"scrollLeft":"scrollTop"]=_,R&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1})}else{if(!o.support.smoothScroll)return iM({swiper:o,targetPosition:_,side:y?"left":"top"}),!0;m.scrollTo({[y?"left":"top"]:_,behavior:"smooth"})}return!0}return o.setTransition(t),o.setTranslate(b),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,r),o.transitionStart(n,w),t===0?o.transitionEnd(n,w):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(_){!o||o.destroyed||_.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,w))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function gie(e,t,n,r){e===void 0&&(e=0),n===void 0&&(n=!0),typeof e=="string"&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;typeof t>"u"&&(t=i.params.speed);const o=i.grid&&i.params.grid&&i.params.grid.rows>1;let s=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)s=s+i.virtual.slidesBefore;else{let a;if(o){const f=s*i.params.grid.rows;a=i.slides.filter(m=>m.getAttribute("data-swiper-slide-index")*1===f)[0].column}else a=i.getSlideIndexByData(s);const l=o?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:c}=i.params;let u=i.params.slidesPerView;u==="auto"?u=i.slidesPerViewDynamic():(u=Math.ceil(parseFloat(i.params.slidesPerView,10)),c&&u%2===0&&(u=u+1));let d=l-am.getAttribute("data-swiper-slide-index")*1===f)[0].column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame(()=>{i.slideTo(s,t,n,r)}),i}function vie(e,t,n){t===void 0&&(t=!0);const r=this,{enabled:i,params:o,animating:s}=r;if(!i||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let a=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(a=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return o.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)}function yie(e,t,n){t===void 0&&(t=!0);const r=this,{params:i,snapGrid:o,slidesGrid:s,rtlTranslate:a,enabled:l,animating:c}=r;if(!l||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const u=r.virtual&&i.virtual.enabled;if(i.loop){if(c&&!u&&i.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const d=a?r.translate:-r.translate;function f(b){return b<0?-Math.floor(Math.abs(b)):Math.floor(b)}const m=f(d),p=o.map(b=>f(b));let g=o[p.indexOf(m)-1];if(typeof g>"u"&&i.cssMode){let b;o.forEach((w,y)=>{m>=w&&(b=y)}),typeof b<"u"&&(g=o[b>0?b-1:b])}let E=0;if(typeof g<"u"&&(E=s.indexOf(g),E<0&&(E=r.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(E=E-r.slidesPerViewDynamic("previous",!0)+1,E=Math.max(E,0))),i.rewind&&r.isBeginning){const b=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(b,e,t,n)}else if(i.loop&&r.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(E,e,t,n)}),!0;return r.slideTo(E,e,t,n)}function bie(e,t,n){t===void 0&&(t=!0);const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function wie(e,t,n,r){t===void 0&&(t=!0),r===void 0&&(r=.5);const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);let o=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){const c=i.snapGrid[a],u=i.snapGrid[a+1];l-c>(u-c)*r&&(o+=i.params.slidesPerGroup)}else{const c=i.snapGrid[a-1],u=i.snapGrid[a];l-c<=(u-c)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,e,t,n)}function xie(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex,o;const s=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?ie.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(Cs(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),Q1(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(Cs(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),Q1(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var Sie={slideTo:mie,slideToLoop:gie,slideNext:vie,slidePrev:yie,slideReset:bie,slideToClosest:wie,slideToClickedSlide:xie};function _ie(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const i=()=>{Cs(r,`.${n.slideClass}, swiper-slide`).forEach((d,f)=>{d.setAttribute("data-swiper-slide-index",f)})},o=t.grid&&n.grid&&n.grid.rows>1,s=n.slidesPerGroup*(o?n.grid.rows:1),a=t.slides.length%s!==0,l=o&&t.slides.length%n.grid.rows!==0,c=u=>{for(let d=0;d1;c.length"u"?o=l.getSlideIndex(c.filter(z=>z.classList.contains(m.slideActiveClass))[0]):R=o;const T=r==="next"||!r,C=r==="prev"||!r;let I=0,A=0;const L=w?Math.ceil(c.length/m.grid.rows):c.length,F=(w?c[o].column:o)+(p&&typeof i>"u"?-g/2+.5:0);if(F=0;Z-=1)c[Z].column===J&&y.push(Z)}else y.push(L-Y-1)}}else if(F+g>L-b){A=Math.max(F-(L-b*2),E);for(let z=0;z{J.column===Y&&_.push(Z)}):_.push(Y)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),C&&y.forEach(z=>{c[z].swiperLoopMoveDOM=!0,f.prepend(c[z]),c[z].swiperLoopMoveDOM=!1}),T&&_.forEach(z=>{c[z].swiperLoopMoveDOM=!0,f.append(c[z]),c[z].swiperLoopMoveDOM=!1}),l.recalcSlides(),m.slidesPerView==="auto"?l.updateSlides():w&&(y.length>0&&C||_.length>0&&T)&&l.slides.forEach((z,Y)=>{l.grid.updateSlide(Y,z,l.slides)}),m.watchSlidesProgress&&l.updateSlidesOffset(),n){if(y.length>0&&C){if(typeof t>"u"){const z=l.slidesGrid[R],J=l.slidesGrid[R+I]-z;a?l.setTranslate(l.translate-J):(l.slideTo(R+Math.ceil(I),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-J,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-J))}else if(i){const z=w?y.length/m.grid.rows:y.length;l.slideTo(l.activeIndex+z,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(_.length>0&&T)if(typeof t>"u"){const z=l.slidesGrid[R],J=l.slidesGrid[R-A]-z;a?l.setTranslate(l.translate-J):(l.slideTo(R-A,0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-J,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-J))}else{const z=w?_.length/m.grid.rows:_.length;l.slideTo(l.activeIndex-z,0,!1,!0)}}if(l.allowSlidePrev=u,l.allowSlideNext=d,l.controller&&l.controller.control&&!s){const z={slideRealIndex:t,direction:r,setTranslate:i,activeSlideIndex:o,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(Y=>{!Y.destroyed&&Y.params.loop&&Y.loopFix({...z,slideTo:Y.params.slidesPerView===m.slidesPerView?n:!1})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...z,slideTo:l.controller.control.params.slidesPerView===m.slidesPerView?n:!1})}l.emit("loopFix")}function kie(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(i=>{const o=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;r[o]=i}),e.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),r.forEach(i=>{n.append(i)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var Eie={loopCreate:_ie,loopFix:Cie,loopDestroy:kie};function Rie(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function Pie(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var Tie={setGrabCursor:Rie,unsetGrabCursor:Pie};function Oie(e,t){t===void 0&&(t=this);function n(r){if(!r||r===qu()||r===Oi())return null;r.assignedSlot&&(r=r.assignedSlot);const i=r.closest(e);return!i&&!r.getRootNode?null:i||n(r.getRootNode().host)}return n(t)}function BR(e,t,n){const r=Oi(),{params:i}=e,o=i.edgeSwipeDetection,s=i.edgeSwipeThreshold;return o&&(n<=s||n>=r.innerWidth-s)?o==="prevent"?(t.preventDefault(),!0):!1:!0}function Lie(e){const t=this,n=qu();let r=e;r.originalEvent&&(r=r.originalEvent);const i=t.touchEventsData;if(r.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==r.pointerId)return;i.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(i.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){BR(t,r,r.targetTouches[0].pageX);return}const{params:o,touches:s,enabled:a}=t;if(!a||!o.simulateTouch&&r.pointerType==="mouse"||t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let l=r.target;if(o.touchEventsTarget==="wrapper"&&!t.wrapperEl.contains(l)||"which"in r&&r.which===3||"button"in r&&r.button>0||i.isTouched&&i.isMoved)return;const c=!!o.noSwipingClass&&o.noSwipingClass!=="",u=r.composedPath?r.composedPath():r.path;c&&r.target&&r.target.shadowRoot&&u&&(l=u[0]);const d=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,f=!!(r.target&&r.target.shadowRoot);if(o.noSwiping&&(f?Oie(d,l):l.closest(d))){t.allowClick=!0;return}if(o.swipeHandler&&!l.closest(o.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const m=s.currentX,p=s.currentY;if(!BR(t,r,m))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=m,s.startY=p,i.touchStartTime=gg(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(i.allowThresholdMove=!1);let g=!0;l.matches(i.focusableElements)&&(g=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&n.activeElement.blur();const E=g&&t.allowTouchMove&&o.touchStartPreventDefault;(o.touchStartForcePreventDefault||E)&&!l.isContentEditable&&r.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function jie(e){const t=qu(),n=this,r=n.touchEventsData,{params:i,touches:o,rtlTranslate:s,enabled:a}=n;if(!a||!i.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(r.touchId!==null||l.pointerId!==r.pointerId))return;let c;if(l.type==="touchmove"){if(c=[...l.changedTouches].filter(T=>T.identifier===r.touchId)[0],!c||c.identifier!==r.touchId)return}else c=l;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l);return}const u=c.pageX,d=c.pageY;if(l.preventedByNestedSwiper){o.startX=u,o.startY=d;return}if(!n.allowTouchMove){l.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d}),r.touchStartTime=gg());return}if(i.touchReleaseOnEdges&&!i.loop){if(n.isVertical()){if(do.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else if(uo.startX&&n.translate>=n.minTranslate())return}if(t.activeElement&&l.target===t.activeElement&&l.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",l),o.previousX=o.currentX,o.previousY=o.currentY,o.currentX=u,o.currentY=d;const f=o.currentX-o.startX,m=o.currentY-o.startY;if(n.params.threshold&&Math.sqrt(f**2+m**2)"u"){let T;n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?r.isScrolling=!1:f*f+m*m>=25&&(T=Math.atan2(Math.abs(m),Math.abs(f))*180/Math.PI,r.isScrolling=n.isHorizontal()?T>i.touchAngle:90-T>i.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),typeof r.startMoving>"u"&&(o.currentX!==o.startX||o.currentY!==o.startY)&&(r.startMoving=!0),r.isScrolling||l.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let p=n.isHorizontal()?f:m,g=n.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(p=Math.abs(p)*(s?1:-1),g=Math.abs(g)*(s?1:-1)),o.diff=p,p*=i.touchRatio,s&&(p=-p,g=-g);const E=n.touchesDirection;n.swipeDirection=p>0?"prev":"next",n.touchesDirection=g>0?"prev":"next";const b=n.params.loop&&!i.cssMode,w=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(b&&w&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const T=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});n.wrapperEl.dispatchEvent(T)}r.allowMomentumBounce=!1,i.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}let y;if(new Date().getTime(),r.isMoved&&r.allowThresholdMove&&E!==n.touchesDirection&&b&&w&&Math.abs(p)>=1){Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=p+r.startTranslate;let _=!0,R=i.resistanceRatio;if(i.touchReleaseOnEdges&&(R=0),p>0?(b&&w&&!y&&r.allowThresholdMove&&r.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(_=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+p)**R))):p<0&&(b&&w&&!y&&r.allowThresholdMove&&r.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]:n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(i.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),r.currentTranslater.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),i.threshold>0)if(Math.abs(p)>i.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,r.currentTranslate=r.startTranslate,o.diff=n.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{r.currentTranslate=r.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function Iie(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let i;if(r.type==="touchend"||r.type==="touchcancel"){if(i=[...r.changedTouches].filter(R=>R.identifier===n.touchId)[0],!i||i.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;i=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:s,touches:a,rtlTranslate:l,slidesGrid:c,enabled:u}=t;if(!u||!s.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}s.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=gg(),f=d-n.touchStartTime;if(t.allowClick){const R=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(R&&R[0]||r.target,R),t.emit("tap click",r),f<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=gg(),Q1(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||a.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let m;if(s.followFinger?m=l?t.translate:-t.translate:m=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:m});return}const p=m>=-t.maxTranslate()&&!t.params.loop;let g=0,E=t.slidesSizesGrid[0];for(let R=0;R=c[R]&&m=c[R])&&(g=R,E=c[c.length-1]-c[c.length-2])}let b=null,w=null;s.rewind&&(t.isBeginning?w=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const y=(m-c[g])/E,_=gs.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(y>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?b:g+_):t.slideTo(g)),t.swipeDirection==="prev"&&(y>1-s.longSwipesRatio?t.slideTo(g+_):w!==null&&y<0&&Math.abs(y)>s.longSwipesRatio?t.slideTo(w):t.slideTo(g))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(g+_):t.slideTo(g):(t.swipeDirection==="next"&&t.slideTo(b!==null?b:g+_),t.swipeDirection==="prev"&&t.slideTo(w!==null?w:g))}}function FR(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:o}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!a?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=r,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function Mie(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function $ie(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let i;const o=e.maxTranslate()-e.minTranslate();o===0?i=0:i=(e.translate-e.minTranslate())/o,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Nie(e){const t=this;im(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function Aie(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const lM=(e,t)=>{const n=qu(),{params:r,el:i,wrapperEl:o,device:s}=e,a=!!r.nested,l=t==="on"?"addEventListener":"removeEventListener",c=t;n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&i[l]("click",e.onClick,!0),r.cssMode&&o[l]("scroll",e.onScroll),r.updateOnWindowResize?e[c](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",FR,!0):e[c]("observerUpdate",FR,!0),i[l]("load",e.onLoad,{capture:!0})};function Die(){const e=this,{params:t}=e;e.onTouchStart=Lie.bind(e),e.onTouchMove=jie.bind(e),e.onTouchEnd=Iie.bind(e),e.onDocumentTouchStart=Aie.bind(e),t.cssMode&&(e.onScroll=$ie.bind(e)),e.onClick=Mie.bind(e),e.onLoad=Nie.bind(e),lM(e,"on")}function Bie(){lM(this,"off")}var Fie={attachEvents:Die,detachEvents:Bie};const zR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function zie(){const e=this,{realIndex:t,initialized:n,params:r,el:i}=e,o=r.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const s=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!s||e.currentBreakpoint===s)return;const l=(s in o?o[s]:void 0)||e.originalParams,c=zR(e,r),u=zR(e,l),d=e.params.grabCursor,f=l.grabCursor,m=r.enabled;c&&!u?(i.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&u&&(i.classList.add(`${r.containerModifierClass}grid`),(l.grid.fill&&l.grid.fill==="column"||!l.grid.fill&&r.grid.fill==="column")&&i.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),d&&!f?e.unsetGrabCursor():!d&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(y=>{if(typeof l[y]>"u")return;const _=r[y]&&r[y].enabled,R=l[y]&&l[y].enabled;_&&!R&&e[y].disable(),!_&&R&&e[y].enable()});const p=l.direction&&l.direction!==r.direction,g=r.loop&&(l.slidesPerView!==r.slidesPerView||p),E=r.loop;p&&n&&e.changeDirection(),pi(e.params,l);const b=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!b?e.disable():!m&&b&&e.enable(),e.currentBreakpoint=s,e.emit("_beforeBreakpoint",l),n&&(g?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!E&&w?(e.loopCreate(t),e.updateSlides()):E&&!w&&e.loopDestroy()),e.emit("breakpoint",l)}function Uie(e,t,n){if(t===void 0&&(t="window"),!e||t==="container"&&!n)return;let r=!1;const i=Oi(),o=t==="window"?i.innerHeight:n.clientHeight,s=Object.keys(e).map(a=>{if(typeof a=="string"&&a.indexOf("@")===0){const l=parseFloat(a.substr(1));return{value:o*l,point:a}}return{value:a,point:a}});s.sort((a,l)=>parseInt(a.value,10)-parseInt(l.value,10));for(let a=0;a{typeof r=="object"?Object.keys(r).forEach(i=>{r[i]&&n.push(t+i)}):typeof r=="string"&&n.push(t+r)}),n}function Hie(){const e=this,{classNames:t,params:n,rtl:r,el:i,device:o}=e,s=Gie(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),i.classList.add(...t),e.emitContainerClasses()}function Vie(){const e=this,{el:t,classNames:n}=e;t.classList.remove(...n),e.emitContainerClasses()}var Kie={addClasses:Hie,removeClasses:Vie};function qie(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const i=e.slides.length-1,o=e.slidesGrid[i]+e.slidesSizesGrid[i]+r*2;e.isLocked=e.size>o}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var Yie={checkOverflow:qie},Z1={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function Qie(e,t){return function(r){r===void 0&&(r={});const i=Object.keys(r)[0],o=r[i];if(typeof o!="object"||o===null){pi(t,r);return}if(e[i]===!0&&(e[i]={enabled:!0}),i==="navigation"&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),!(i in e&&"enabled"in o)){pi(t,r);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),pi(t,r)}}const J0={eventsEmitter:Kre,update:iie,translate:uie,transition:hie,slide:Sie,loop:Eie,grabCursor:Tie,events:Fie,breakpoints:Wie,checkOverflow:Yie,classes:Kie},Z0={};let BS=class hs{constructor(){let t,n;for(var r=arguments.length,i=new Array(r),o=0;o1){const u=[];return s.querySelectorAll(n.el).forEach(d=>{const f=pi({},n,{el:d});u.push(new hs(f))}),u}const a=this;a.__swiper__=!0,a.support=oM(),a.device=sM({userAgent:n.userAgent}),a.browser=Gre(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],n.modules&&Array.isArray(n.modules)&&a.modules.push(...n.modules);const l={};a.modules.forEach(u=>{u({params:n,swiper:a,extendParams:Qie(n,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const c=pi({},Z1,l);return a.params=pi({},c,Z0,n),a.originalParams=pi({},a.params),a.passedParams=pi({},n),a.params&&a.params.on&&Object.keys(a.params.on).forEach(u=>{a.on(u,a.params.on[u])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return a.params.direction==="horizontal"},isVertical(){return a.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:n,params:r}=this,i=Cs(n,`.${r.slideClass}, swiper-slide`),o=AR(i[0]);return AR(t)-o}getSlideIndexByData(t){return this.getSlideIndex(this.slides.filter(n=>n.getAttribute("data-swiper-slide-index")*1===t)[0])}recalcSlides(){const t=this,{slidesEl:n,params:r}=t;t.slides=Cs(n,`.${r.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const r=this;t=Math.min(Math.max(t,0),1);const i=r.minTranslate(),s=(r.maxTranslate()-i)*t+i;r.translateTo(s,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const i=t.getSlideClasses(r);n.push({slideEl:r,classNames:i}),t.emit("_slideClass",r,i)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t,n){t===void 0&&(t="current"),n===void 0&&(n=!1);const r=this,{params:i,slides:o,slidesGrid:s,slidesSizesGrid:a,size:l,activeIndex:c}=r;let u=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let d=o[c]?Math.ceil(o[c].swiperSlideSize):0,f;for(let m=c+1;ml&&(f=!0));for(let m=c-1;m>=0;m-=1)o[m]&&!f&&(d+=o[m].swiperSlideSize,u+=1,d>l&&(f=!0))}else if(t==="current")for(let d=c+1;d=0;d-=1)s[c]-s[d]{s.complete&&im(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function i(){const s=t.rtlTranslate?t.translate*-1:t.translate,a=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}let o;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)i(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const s=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;o=t.slideTo(s.length-1,0,!1,!0)}else o=t.slideTo(t.activeIndex,0,!1,!0);o||i()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n){n===void 0&&(n=!0);const r=this,i=r.params.direction;return t||(t=i==="horizontal"?"vertical":"horizontal"),t===i||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${i}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(o=>{t==="vertical"?o.style.width="":o.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const i=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(i()):Cs(r,i())[0];return!s&&n.params.createElements&&(s=X1("div",n.params.wrapperClass),r.append(s),Cs(r,`.${n.params.slideClass}`).forEach(a=>{s.append(a)})),Object.assign(n,{el:r,wrapperEl:s,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:s,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||_a(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||_a(r,"direction")==="rtl"),wrongRTL:_a(s,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(),n.attachEvents();const i=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&i.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(o=>{o.complete?im(n,o):o.addEventListener("load",s=>{im(n,s.target)})}),J1(n),n.initialized=!0,J1(n),n.emit("init"),n.emit("afterInit"),n}destroy(t,n){t===void 0&&(t=!0),n===void 0&&(n=!0);const r=this,{params:i,el:o,wrapperEl:s,slides:a}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),i.loop&&r.loopDestroy(),n&&(r.removeClasses(),o.removeAttribute("style"),s.removeAttribute("style"),a&&a.length&&a.forEach(l=>{l.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(l=>{r.off(l)}),t!==!1&&(r.el.swiper=null,Mre(r)),r.destroyed=!0),null}static extendDefaults(t){pi(Z0,t)}static get extendedDefaults(){return Z0}static get defaults(){return Z1}static installModule(t){hs.prototype.__modules__||(hs.prototype.__modules__=[]);const n=hs.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>hs.installModule(n)),hs):(hs.installModule(t),hs)}};Object.keys(J0).forEach(e=>{Object.keys(J0[e]).forEach(t=>{BS.prototype[t]=J0[e][t]})});BS.use([Hre,Vre]);const cM=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Xl(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function cu(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:Xl(t[r])&&Xl(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:cu(e[r],t[r]):e[r]=t[r]})}function uM(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function dM(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function fM(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function pM(e){e===void 0&&(e="");const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function Xie(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Jie(e){let{swiper:t,slides:n,passedParams:r,changedParams:i,nextEl:o,prevEl:s,scrollbarEl:a,paginationEl:l}=e;const c=i.filter(A=>A!=="children"&&A!=="direction"&&A!=="wrapperClass"),{params:u,pagination:d,navigation:f,scrollbar:m,virtual:p,thumbs:g}=t;let E,b,w,y,_,R,T,C;i.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&u.thumbs&&!u.thumbs.swiper&&(E=!0),i.includes("controller")&&r.controller&&r.controller.control&&u.controller&&!u.controller.control&&(b=!0),i.includes("pagination")&&r.pagination&&(r.pagination.el||l)&&(u.pagination||u.pagination===!1)&&d&&!d.el&&(w=!0),i.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||a)&&(u.scrollbar||u.scrollbar===!1)&&m&&!m.el&&(y=!0),i.includes("navigation")&&r.navigation&&(r.navigation.prevEl||s)&&(r.navigation.nextEl||o)&&(u.navigation||u.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(_=!0);const I=A=>{t[A]&&(t[A].destroy(),A==="navigation"?(t.isElement&&(t[A].prevEl.remove(),t[A].nextEl.remove()),u[A].prevEl=void 0,u[A].nextEl=void 0,t[A].prevEl=void 0,t[A].nextEl=void 0):(t.isElement&&t[A].el.remove(),u[A].el=void 0,t[A].el=void 0))};i.includes("loop")&&t.isElement&&(u.loop&&!r.loop?R=!0:!u.loop&&r.loop?T=!0:C=!0),c.forEach(A=>{if(Xl(u[A])&&Xl(r[A]))Object.assign(u[A],r[A]),(A==="navigation"||A==="pagination"||A==="scrollbar")&&"enabled"in r[A]&&!r[A].enabled&&I(A);else{const L=r[A];(L===!0||L===!1)&&(A==="navigation"||A==="pagination"||A==="scrollbar")?L===!1&&I(A):u[A]=r[A]}}),c.includes("controller")&&!b&&t.controller&&t.controller.control&&u.controller&&u.controller.control&&(t.controller.control=u.controller.control),i.includes("children")&&n&&p&&u.virtual.enabled?(p.slides=n,p.update(!0)):i.includes("virtual")&&p&&u.virtual.enabled&&(n&&(p.slides=n),p.update(!0)),i.includes("children")&&n&&u.loop&&(C=!0),E&&g.init()&&g.update(!0),b&&(t.controller.control=u.controller.control),w&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(u.pagination.el=l),d.init(),d.render(),d.update()),y&&(t.isElement&&(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-scrollbar"),a.part.add("scrollbar"),t.el.appendChild(a)),a&&(u.scrollbar.el=a),m.init(),m.updateSize(),m.setTranslate()),_&&(t.isElement&&((!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-next"),o.innerHTML=t.hostEl.constructor.nextButtonSvg,o.part.add("button-next"),t.el.appendChild(o)),(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-prev"),s.innerHTML=t.hostEl.constructor.prevButtonSvg,s.part.add("button-prev"),t.el.appendChild(s))),o&&(u.navigation.nextEl=o),s&&(u.navigation.prevEl=s),f.init(),f.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=r.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=r.allowSlidePrev),i.includes("direction")&&t.changeDirection(r.direction,!1),(R||C)&&t.loopDestroy(),(T||C)&&t.loopCreate(),t.update()}function Zie(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const n={on:{}},r={},i={};cu(n,Z1),n._emitClasses=!0,n.init=!1;const o={},s=cM.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(s.indexOf(l)>=0?Xl(e[l])?(n[l]={},i[l]={},cu(n[l],e[l]),cu(i[l],e[l])):(n[l]=e[l],i[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?r[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:n.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:o[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{n[l]===!0&&(n[l]={}),n[l]===!1&&delete n[l]}),{params:n,passedParams:i,rest:o,events:r}}function eoe(e,t){let{el:n,nextEl:r,prevEl:i,paginationEl:o,scrollbarEl:s,swiper:a}=e;uM(t)&&r&&i&&(a.params.navigation.nextEl=r,a.originalParams.navigation.nextEl=r,a.params.navigation.prevEl=i,a.originalParams.navigation.prevEl=i),dM(t)&&o&&(a.params.pagination.el=o,a.originalParams.pagination.el=o),fM(t)&&s&&(a.params.scrollbar.el=s,a.originalParams.scrollbar.el=s),a.init(n)}function toe(e,t,n,r,i){const o=[];if(!t)return o;const s=l=>{o.indexOf(l)<0&&o.push(l)};if(n&&r){const l=r.map(i),c=n.map(i);l.join("")!==c.join("")&&s("children"),r.length!==n.length&&s("children")}return cM.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(Xl(e[l])&&Xl(t[l])){const c=Object.keys(e[l]),u=Object.keys(t[l]);c.length!==u.length?s(l):(c.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}),u.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}))}else e[l]!==t[l]&&s(l)}),o}const noe=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function yg(){return yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{hM(n)?t.push(n):n.props&&n.props.children&&mM(n.props.children).forEach(r=>t.push(r))}),t}function roe(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return Rt.Children.toArray(e).forEach(r=>{if(hM(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const i=mM(r.props.children);i.length>0?i.forEach(o=>t.push(o)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function ioe(e,t,n){if(!n)return null;const r=u=>{let d=u;return u<0?d=t.length+u:d>=t.length&&(d=d-t.length),d},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:o,to:s}=n,a=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,c=[];for(let u=a;u=o&&u<=s&&c.push(t[r(u)]);return c.map((u,d)=>Rt.cloneElement(u,{swiper:e,style:i,key:u.props.virtualIndex||u.key||`slide-${d}`}))}function cf(e,t){return typeof window>"u"?k.useEffect(e,t):k.useLayoutEffect(e,t)}const UR=k.createContext(null),ooe=k.createContext(null),Ep=k.forwardRef(function(e,t){let{className:n,tag:r="div",wrapperTag:i="div",children:o,onSwiper:s,...a}=e===void 0?{}:e,l=!1;const[c,u]=k.useState("swiper"),[d,f]=k.useState(null),[m,p]=k.useState(!1),g=k.useRef(!1),E=k.useRef(null),b=k.useRef(null),w=k.useRef(null),y=k.useRef(null),_=k.useRef(null),R=k.useRef(null),T=k.useRef(null),C=k.useRef(null),{params:I,passedParams:A,rest:L,events:$}=Zie(a),{slides:F,slots:z}=roe(o),Y=()=>{p(!m)};Object.assign(I.on,{_containerClasses(V,le){u(le)}});const J=()=>{Object.assign(I.on,$),l=!0;const V={...I};if(delete V.wrapperClass,b.current=new BS(V),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=F;const le={cache:!1,slides:F,renderExternal:f,renderExternalUpdate:!1};cu(b.current.params.virtual,le),cu(b.current.originalParams.virtual,le)}};E.current||J(),b.current&&b.current.on("_beforeBreakpoint",Y);const Z=()=>{l||!$||!b.current||Object.keys($).forEach(V=>{b.current.on(V,$[V])})},pe=()=>{!$||!b.current||Object.keys($).forEach(V=>{b.current.off(V,$[V])})};k.useEffect(()=>()=>{b.current&&b.current.off("_beforeBreakpoint",Y)}),k.useEffect(()=>{!g.current&&b.current&&(b.current.emitSlidesClasses(),g.current=!0)}),cf(()=>{if(t&&(t.current=E.current),!!E.current)return b.current.destroyed&&J(),eoe({el:E.current,nextEl:_.current,prevEl:R.current,paginationEl:T.current,scrollbarEl:C.current,swiper:b.current},I),s&&!b.current.destroyed&&s(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),cf(()=>{Z();const V=toe(A,w.current,F,y.current,le=>le.key);return w.current=A,y.current=F,V.length&&b.current&&!b.current.destroyed&&Jie({swiper:b.current,slides:F,passedParams:A,changedParams:V,nextEl:_.current,prevEl:R.current,scrollbarEl:C.current,paginationEl:T.current}),()=>{pe()}}),cf(()=>{noe(b.current)},[d]);function G(){return I.virtual?ioe(b.current,F,d):F.map((V,le)=>Rt.cloneElement(V,{swiper:b.current,swiperSlideIndex:le}))}return Rt.createElement(r,yg({ref:E,className:pM(`${c}${n?` ${n}`:""}`)},L),Rt.createElement(ooe.Provider,{value:b.current},z["container-start"],Rt.createElement(i,{className:Xie(I.wrapperClass)},z["wrapper-start"],G(),z["wrapper-end"]),uM(I)&&Rt.createElement(Rt.Fragment,null,Rt.createElement("div",{ref:R,className:"swiper-button-prev"}),Rt.createElement("div",{ref:_,className:"swiper-button-next"})),fM(I)&&Rt.createElement("div",{ref:C,className:"swiper-scrollbar"}),dM(I)&&Rt.createElement("div",{ref:T,className:"swiper-pagination"}),z["container-end"]))});Ep.displayName="Swiper";const Iu=k.forwardRef(function(e,t){let{tag:n="div",children:r,className:i="",swiper:o,zoom:s,lazy:a,virtualIndex:l,swiperSlideIndex:c,...u}=e===void 0?{}:e;const d=k.useRef(null),[f,m]=k.useState("swiper-slide"),[p,g]=k.useState(!1);function E(_,R,T){R===d.current&&m(T)}cf(()=>{if(typeof c<"u"&&(d.current.swiperSlideIndex=c),t&&(t.current=d.current),!(!d.current||!o)){if(o.destroyed){f!=="swiper-slide"&&m("swiper-slide");return}return o.on("_slideClass",E),()=>{o&&o.off("_slideClass",E)}}}),cf(()=>{o&&d.current&&!o.destroyed&&m(o.getSlideClasses(d.current))},[o]);const b={isActive:f.indexOf("swiper-slide-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0},w=()=>typeof r=="function"?r(b):r,y=()=>{g(!0)};return Rt.createElement(n,yg({ref:d,className:pM(`${f}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:y},u),s&&Rt.createElement(UR.Provider,{value:b},Rt.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s=="number"?s:void 0},w(),a&&!p&&Rt.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&Rt.createElement(UR.Provider,{value:b},w(),a&&!p&&Rt.createElement("div",{className:"swiper-lazy-preloader"})))});Iu.displayName="SwiperSlide";const soe=({guild:e})=>{const t=k.useRef(null),[n,r]=k.useState(1);k.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=k.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/1e3,l=s/700,c=Math.min(a,l,1);r(c??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs("div",{style:{width:`${1e3*n}px`,height:`${700*n}px`,display:"flex",flexDirection:"row"},children:[v.jsx("div",{className:"card-front",style:{backgroundImage:`url(${on.get(`${e}_front`)})`,"--scale":n,borderTopRightRadius:0,borderBottomRightRadius:0}}),v.jsx("div",{className:"card-back",style:{backgroundImage:`url(${on.get(`${e}_back`)})`,"--scale":n,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})};function gM({guild:e}){const t=k.useRef(null),n=k.useRef(null),[r,i]=k.useState(1);k.useLayoutEffect(()=>(o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)));const o=k.useCallback(()=>{if(!t.current)return;const{width:s,height:a}=t.current.getBoundingClientRect(),l=s/500,c=a/700,u=Math.min(l,c,1);i(u??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{ref:n,className:"flip-card",onClick:()=>{var s;(s=n.current)==null||s.classList.toggle("flipped")},children:v.jsxs("div",{className:"flip-card-inner",children:[v.jsx("div",{className:"flip-card-front",children:v.jsx("div",{className:"card-front",style:{backgroundImage:`url(${on.get(`${e}_front`)})`,"--scale":r}})}),v.jsx("div",{className:"flip-card-back",children:v.jsx("div",{className:"card-back",style:{backgroundImage:`url(${on.get(`${e}_back`)})`,"--scale":r}})})]})})})}function aoe(){const[e,t]=k.useState(!1),[n,r]=k.useState(!1),i=vD(k.useCallback(s=>s.nextLocation.pathname.startsWith("/game")?(t(!0),!0):!1,[t]));k.useEffect(()=>{r(!0)},[n,r]);const{active:o}=Ys();return v.jsxs(Zt,{style:{width:"100%",height:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(ls,{children:v.jsxs(Zt,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(qa,{separator:v.jsx(rc,{fontSize:"small"}),children:[v.jsx(Lo,{color:"inherit",href:"/game",size:"small",disabled:o,children:v.jsx(PS,{})}),o?v.jsx(xt,{children:"Draft"}):v.jsx(vo,{underline:"hover",color:"inherit",href:"/game/draft",children:"Draft"}),v.jsx(xt,{children:"Play"})]}),v.jsx(OS,{})]})}),v.jsx(loe,{}),v.jsx(LV,{open:e,onClose:()=>t(!1),autoHideDuration:5e3,children:v.jsx(pU,{severity:"warning",action:v.jsx(yn,{size:"small",onClick:i.proceed,children:"Exit Game"}),children:"Making changes to the team selections will reset the game state."})})]})}function loe(){const e=Pi(),t=Cx(e.breakpoints.up("sm")),{active:n}=Ys(),{gameState1$:r,gameState2$:i}=iy(),[o,s]=k.useState();k.useEffect(()=>{if(!r)return;let d=!1;return(async()=>{const m=await $n(r);d||s(m)})(),()=>{d=!0}},[r]);const[a,l]=k.useState();k.useEffect(()=>{if(!i)return;let d=!1;return(async()=>{const m=await $n(i);d||l(m)})(),()=>{d=!0}},[i]);const[c,u]=io(async d=>{if(!o||!a)return;const f=await d.models.find().where("id").in(o.roster.map(E=>E.name)).exec(),m=await Promise.all(f.map(E=>E.expand()));Fs(m,"id",o.roster.map(E=>E.name));const p=await d.models.find().where("id").in(a.roster.map(E=>E.name)).exec(),g=await Promise.all(p.map(E=>E.expand()));return Fs(g,"id",a.roster.map(E=>E.name)),[m,g]},[o,a])??[];return!o||!a||!c||!u?null:t?v.jsxs(v.Fragment,{children:[v.jsx(eb,{teams:[o],rosters:[c],disabled:[!1]}),v.jsx(Zo,{orientation:"vertical"}),v.jsx(eb,{teams:[a],rosters:[u],disabled:[!!n]})]}):v.jsx(eb,{teams:[o,a],rosters:[c,u],disabled:[!1,!!n]})}const eb=({teams:e,rosters:t,disabled:n})=>{const r=Pi(),i=Cx(r.breakpoints.up("sm")),o=k.useRef(null),[s,a]=k.useState(!1),[l,c]=k.useState(0),[u,d]=k.useState(!0),[f,m]=k.useState(500),[p,g]=k.useState(700),[E,b]=k.useState(700);k.useLayoutEffect(()=>(w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)));const w=k.useCallback(()=>{var T,C;const y=((T=o.current)==null?void 0:T.getBoundingClientRect().width)??0,_=((C=o.current)==null?void 0:C.getBoundingClientRect().height)??0,R=i?56:112;m(Math.min(y-12,(_-R)*5/7-12)),g(Math.min(_-R-12,y*7/5-12)),b(_-R)},[i]);return v.jsxs("div",{ref:o,style:{width:"100%",display:"flex",flexDirection:"column"},children:[v.jsx(mre,{disabled:n,teams:e,rosters:t,expanded:u,onClick:(y,_)=>{c(y),d(_),a(!_)}}),v.jsx("div",{style:{position:"relative",overflow:"hidden",flexGrow:1},children:v.jsx(Cv,{disablePortal:!0,sx:{zIndex:1100},open:s,onClose:()=>{a(!1),d(!0)},componentsProps:{root:{style:{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"}},backdrop:{style:{position:"absolute"}}},children:v.jsx(Ep,{initialSlide:l,direction:"vertical",centeredSlides:!0,spaceBetween:(E-Math.min(p,500))/2,onInit:y=>{y.el.style.width=`${Math.min(f,500)}px`,y.el.style.height=`${Math.min(p,700)}px`},style:{overflow:"visible"},children:e.map((y,_)=>[()=>v.jsx(gM,{guild:y.guild}),t[_].map((R,T)=>()=>v.jsx(nM,{model:R,health$:y.get$("roster").pipe(qt(C=>C[T].health)),children:v.jsx(coe,{model:R,state:e[_],disabled:n[_]})}))]).flat(2).map((y,_)=>v.jsx(Iu,{children:v.jsx("div",{style:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:y==null?void 0:y()})},_))})})})]})};function coe({state:e,model:t,disabled:n=!1}){return v.jsx(ss,{elevation:2,sx:{position:"absolute",right:0,bottom:0},children:v.jsx(eM,{state:e,model:t,disabled:n,stacked:!0})})}function uoe(){const e=Gs(),{setting$:t}=ai(),[n,r]=k.useState(null);k.useEffect(()=>{t&&$n(t).then(m=>m==null?void 0:m.incrementalPatch({gamePlayRoute:`${e.pathname}${e.search}`})).catch(console.error)},[e,t]);const{gbdb:i}=Vr(),{active:o,netDoc:s}=Ys(),a=o?s==null?void 0:s.get("uid"):"Player1",l=o?s==null?void 0:s.get("oid"):"Player2",[c,u]=k.useState();k.useEffect(()=>{const m=i==null?void 0:i.game_state.findOne(a).$;if(u(m),!m)return;let p=!1;return(async()=>{if(p)return;await $n(m)===null&&await(i==null?void 0:i.game_state.upsert({_id:a,roster:[]}))})().catch(console.error),()=>{p=!0}},[i,a]);const[d,f]=k.useState();return k.useEffect(()=>{const m=i==null?void 0:i.game_state.findOne(l).$;if(f(m),!m)return;let p=!1;return(async()=>{if(p)return;await $n(m)===null&&!o&&await(i==null?void 0:i.game_state.upsert({_id:l,roster:[]}))})().catch(console.error),()=>{p=!0}},[i,l,o]),v.jsxs("main",{style:{width:"100%",height:"100%",overflow:"auto",display:"flex"},children:[v.jsxs(ls,{children:[v.jsx(Zt,{ref:m=>r(m),sx:{width:"100%",display:"flex",flexDirection:"row"}}),v.jsx($ee,{})]}),v.jsx(RS.Provider,{value:n,children:v.jsx(tx,{context:{gameState1$:c,gameState2$:d}})})]})}function doe({model:e}){const{setting$:t}=ai(),n=k.useRef(null),[r,i]=k.useState(1),[o,s]=k.useState();k.useEffect(()=>{const d=t==null?void 0:t.pipe(qt(f=>f==null?void 0:f.toJSON().data.cardPreferences.preferredStyle)).subscribe(f=>s(f));return()=>d==null?void 0:d.unsubscribe()},[t]),k.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=k.useCallback(()=>{if(!n.current)return;const{width:d,height:f}=n.current.getBoundingClientRect(),m=d/1e3,p=f/700,g=Math.min(m,p,1);i(g??1)},[]),l=e.id,u=o==="gbcp"&&(on.has(`${l}_gbcp_front`)||on.has(`${l}_full`))?on.get(`${l}_full`)??void 0:void 0;return v.jsx("div",{ref:n,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs("div",{style:{width:`${1e3*r}px`,height:`${700*r}px`,display:"flex",flexDirection:"row",...u?{backgroundImage:`url(${u})`,backgroundSize:"100%",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:`${25*r}px`}:{}},children:[v.jsx(hg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopRightRadius:0,borderBottomRightRadius:0}}),v.jsx(mg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})}const foe="/assets/GB-S4-Reference-1-Cx3eC7d4.png",poe="/assets/GB-S4-Reference-2-CJ4YgyH9.png",hoe="/assets/GB-S4-Reference-3-BTbZpB51.png",moe="/assets/GB-S4-Reference-4-CpP58Tap.png",goe="/assets/GB-S4-Reference-5-Be8xjsp1.png",voe=new URL("/assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",import.meta.url).href,vM=e=>{const t=e.gameplan,n=new Intl.NumberFormat("en-US",{signDisplay:"always"});return v.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${voe})`,...e.style},children:v.jsxs("div",{className:"overlay",children:[v.jsx("div",{style:{height:"255px",flexShrink:0}}),v.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"Crimson Text",letterSpacing:"-1px"},children:[v.jsx("div",{style:{fontFamily:"IM Fell Great Primer SC",fontSize:"33.33pt",display:"flex",flexDirection:"column",alignItems:"center",lineHeight:"0.8em",margin:"0.25em 0"},children:t.title.split(/\n/).map((r,i)=>v.jsx("span",{children:r.split(/(?=[A-Z])/).map((o,s)=>v.jsx("span",{className:new RegExp("^\\p{Lu}","u").test(o)?"dropcap":"",children:v.jsx("span",{children:o},`p${i}s${s}c`)},`p${i}s${s}`))},`l${i}`))}),v.jsxs("div",{style:{fontSize:"20pt",margin:"0 1em",whiteSpace:"pre-wrap",display:"flex",flexDirection:"column",alignItems:"center"},children:[t.text,v.jsx("p",{style:{fontStyle:"italic",margin:"0.5em 0"},children:t.detail})]}),v.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,left:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:n.format(t.initiative)}),v.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,right:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:n.format(t.influence)}),v.jsx("div",{style:{fontFamily:"serif",fontSize:"10pt",position:"absolute",bottom:"2em",letterSpacing:0,wordSpacing:0},children:"™ & © Steamforged Games LTD 2019"})]})]})})},yM=e=>{const t=k.useRef(null),[n,r]=k.useState(1);k.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=k.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/500,l=s/700,c=Math.min(a,l,1);r(c??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",padding:0,margin:0},children:v.jsx("div",{style:{width:`${500*n}px`,height:`${700*n}px`,display:"flex","--scale":n},children:e.children})})},yoe=e=>v.jsx(yM,{children:v.jsx(vM,{...e})}),bM=e=>{const t=new URL(Object.assign({"../assets/cards/Reference/GB-S4-Reference-1.png":foe,"../assets/cards/Reference/GB-S4-Reference-2.png":poe,"../assets/cards/Reference/GB-S4-Reference-3.png":hoe,"../assets/cards/Reference/GB-S4-Reference-4.png":moe,"../assets/cards/Reference/GB-S4-Reference-5.png":goe})[`../assets/cards/Reference/GB-S4-Reference-${e.index}.png`],import.meta.url).href;return v.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${t})`,...e.style}})},boe=e=>v.jsx(yM,{children:v.jsx(bM,{...e})});function woe(){const e=Gs(),{setting$:t}=ai(),[n]=GD(),r=k.useRef(n.get("m"));return k.useEffect(()=>{if(t)return $n(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${r.current}`})).catch(console.error),()=>{$n(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${r.current}`})).catch(console.error)}},[e,t]),v.jsx("main",{style:{display:"flex",flexDirection:"column-reverse",width:"100%",height:"100%"},children:v.jsx(k.Suspense,{fallback:v.jsx("p",{children:"Loading ..."}),children:v.jsx(tx,{context:{slideRef:r}})})})}function xoe(){const{slideRef:e}=tp();return e.current=0,v.jsxs(v.Fragment,{children:[v.jsx(ls,{children:v.jsx(qa,{separator:v.jsx(rc,{fontSize:"small"}),children:v.jsx(xt,{children:"Library"})})}),v.jsx($I,{Controller:Soe}),v.jsx(ic,{})]})}function Soe(e){const t=Ha();return k.useEffect(()=>{const n=e.update$.subscribe(r=>t(r));return()=>n.unsubscribe()},[t,e.update$]),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-evenly",margin:"5px"},children:[v.jsx(H1,{g:{key:"gameplans",name:"gameplans",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("gameplans"),size:e.size}),v.jsx(H1,{g:{key:"refcards",name:"Rules",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("refcards"),size:e.size})]})}function _oe(){const{guild:e}=aD(),t=Pi(),n=Cx(t.breakpoints.up("sm")),r=k.useRef(null),[i,o]=k.useState(n?1e3:500),[s,a]=k.useState(700),l=k.useCallback(()=>{var b,w;const g=((b=r.current)==null?void 0:b.getBoundingClientRect().width)??0,E=((w=r.current)==null?void 0:w.getBoundingClientRect().height)??0;o(Math.min(g,E*(n?10:5)/7)-12),a(Math.min(E,g*7/5)-12)},[n]);k.useLayoutEffect(()=>(l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)));const[c,u]=k.useState(null),d=Ha(),{slideRef:f}=tp(),[m,p]=io(async g=>{const[E,b]=await Promise.all([g.guilds.findOne().where({name:e}).exec(),g.models.find().or([{guild1:e},{guild2:e}]).exec()]);if(!E||!b.length){d("/library");return}Fs(b,"id",E.roster);const w=await Promise.all(b.map(y=>y.expand()));return[E,w]},[e,d])??[];return!m||!p?null:v.jsxs(v.Fragment,{children:[v.jsx(ls,{children:v.jsxs(qa,{separator:v.jsx(rc,{fontSize:"small"}),children:[v.jsx(vo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(xt,{children:m.name})]})}),v.jsx(Eoe,{guild:m,swiper:c}),v.jsxs(Zt,{ref:r,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsxs(Ep,{onSwiper:u,initialSlide:f.current,onSlideChange:g=>{f.current=g.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:s},children:[v.jsx(Iu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:n?v.jsx(soe,{guild:m.name}):v.jsx(gM,{guild:m.name})})},m.name),p.map(g=>v.jsx(Iu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:n?v.jsx(doe,{model:g}):v.jsx(nM,{model:g})})},g.id))]}),v.jsx(ic,{})]})]})}function Coe(){const t=k.useRef(null),[n,r]=k.useState(500),[i,o]=k.useState(700),s=k.useCallback(()=>{var m,p;const d=((m=t.current)==null?void 0:m.getBoundingClientRect().width)??0,f=((p=t.current)==null?void 0:p.getBoundingClientRect().height)??0;r(Math.min(d,f*5/7)-12),o(Math.min(f,d*7/5)-12)},[!1]);k.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=k.useState(null),{slideRef:c}=tp(),{gameplans:u}=Vr();return u?v.jsxs(v.Fragment,{children:[v.jsx(ls,{children:v.jsxs(qa,{separator:v.jsx(rc,{fontSize:"small"}),children:[v.jsx(vo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(xt,{children:"Gameplan Cards"})]})}),v.jsx(Roe,{swiper:a}),v.jsxs(Zt,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Ep,{onSwiper:l,initialSlide:c.current,onSlideChange:d=>{c.current=d.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:u.map((d,f)=>v.jsx(Iu,{style:{width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:i,width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(yoe,{gameplan:d})})},`gameplan-${f}`))}),v.jsx(ic,{})]})]}):null}function koe(){const t=k.useRef(null),[n,r]=k.useState(500),[i,o]=k.useState(700),s=k.useCallback(()=>{var f,m;const u=((f=t.current)==null?void 0:f.getBoundingClientRect().width)??0,d=((m=t.current)==null?void 0:m.getBoundingClientRect().height)??0;r(Math.min(u,d*5/7)-12),o(Math.min(d,u*7/5)-12)},[!1]);k.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=k.useState(null),{slideRef:c}=tp();return v.jsxs(v.Fragment,{children:[v.jsx(ls,{children:v.jsxs(qa,{separator:v.jsx(rc,{fontSize:"small"}),children:[v.jsx(vo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(xt,{children:"Rules Reference Cards"})]})}),v.jsx(Poe,{swiper:a}),v.jsxs(Zt,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Ep,{onSwiper:l,initialSlide:c.current,onSlideChange:u=>{c.current=u.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:[...Array(5).keys()].map(u=>u+1).map(u=>v.jsx(Iu,{style:{width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:i,width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(boe,{index:u})})},`ref-${u}`))}),v.jsx(ic,{})]})]})}function Eoe(e){const{guild:t,swiper:n}=e,r=t.roster;return v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsxs(Zt,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:[v.jsx(Lo,{sx:{padding:0},onClick:()=>{n==null||n.slideTo(0)},children:v.jsx("span",{children:v.jsx("div",{style:{width:"32px",height:"32px",backgroundColor:"black",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"},children:v.jsx(Ci,{icon:t.name,className:"dark",fontSize:"32px",style:{flexShrink:0}})})})}),r.map((i,o)=>v.jsx(zx,{color:"primary",label:i,onClick:()=>{n==null||n.slideTo(o+1)}},o))]}),v.jsx("div",{style:{flex:"1 1"}})]})}function Roe(e){const{gameplans:t}=Vr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(Zt,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:t.map((r,i)=>v.jsx(zx,{color:"primary",label:r.title,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}function Poe(e){const{gameplans:t}=Vr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(Zt,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((r,i)=>v.jsx(zx,{color:"primary",label:r,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}const Toe={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"اَلْعَرَبِيَّةُ"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Català"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},cs:{name:"Czech",nativeName:"čeština"},cu:{name:"Old Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"Dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"ދިވެހި"},dz:{name:"Dzongkha",nativeName:"རྫོང་ཁ"},ee:{name:"Ewe",nativeName:"Eʋegbe"},el:{name:"Greek",nativeName:"Ελληνικά"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Español"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"فارسی"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"Føroyskt"},fr:{name:"French",nativeName:"Français"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"Gàidhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaraní",nativeName:"Avañe'ẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hi:{name:"Hindi",nativeName:"हिन्दी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"Հայերեն"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"ქართული"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"қазақ тілі"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"ខេមរភាសា"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},ko:{name:"Korean",nativeName:"한국어"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी"},ku:{name:"Kurdish",nativeName:"Kurdî"},kv:{name:"Komi",nativeName:"коми кыв"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"Кыргызча"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latviešu valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mi:{name:"Māori",nativeName:"te reo Māori"},mk:{name:"Macedonian",nativeName:"македонски јазик"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mn:{name:"Mongolian",nativeName:"Монгол хэл"},mr:{name:"Marathi",nativeName:"मराठी"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"ဗမာစာ"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Diné bizaad"},ny:{name:"Chichewa",nativeName:"chiCheŵa"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Panjabi",nativeName:"ਪੰਜਾਬੀ"},pi:{name:"Pāli",nativeName:"पाऴि"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Română"},ru:{name:"Russian",nativeName:"Русский"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},si:{name:"Sinhala",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovenian",nativeName:"slovenščina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"српски језик"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},tk:{name:"Turkmen",nativeName:"Türkmençe"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татар теле"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"ئۇيغۇرچە‎"},uk:{name:"Ukrainian",nativeName:"Українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"Ўзбек"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ"},zh:{name:"Chinese",nativeName:"中文"},zu:{name:"Zulu",nativeName:"isiZulu"}};var Ooe=Toe;const uf=Ooe,wM={},bg={},xM=[],SM=[],_M=[];for(const e in uf){const{name:t,nativeName:n}=uf[e];wM[e]=bg[t.toLowerCase()]=bg[n.toLowerCase()]={code:e,name:t,nativeName:n},xM.push(e),SM.push(t),_M.push(n)}var Loe=class om{static getLanguages(t=[]){return t.map(n=>om.validate(n)?Object.assign({},wM[n]):{code:n,name:"",nativeName:""})}static getName(t){return om.validate(t)?uf[t].name:""}static getAllNames(){return SM.slice()}static getNativeName(t){return om.validate(t)?uf[t].nativeName:""}static getAllNativeNames(){return _M.slice()}static getCode(t){return t=t.toLowerCase(),bg.hasOwnProperty(t)?bg[t].code:""}static getAllCodes(){return xM.slice()}static validate(t){return uf.hasOwnProperty(t)}};const WR=za(Loe),joe=()=>{var s;const{manifest:e}=Vr(),{setting$:t}=ai(),{i18n:n}=xte(),r=n.resolvedLanguage,[i,o]=k.useState();if(k.useEffect(()=>{const a=t==null?void 0:t.subscribe(l=>o(l));return()=>a==null?void 0:a.unsubscribe()},[t]),!(!e||!i))return v.jsxs(Zt,{component:"main",sx:{p:"1rem"},children:[v.jsx(ls,{children:v.jsx(qa,{children:v.jsx(xt,{children:"Settings"})})}),v.jsxs(xt,{variant:"h6",children:["GB Playbook ","2.1.0"]}),v.jsxs(xt,{variant:"caption",children:["(","2024-06-10T01:17:51.899Z",")"]}),v.jsx(Zo,{sx:{my:2}}),v.jsx(xt,{children:"Season and Errata Version:"}),v.jsx(pl,{children:v.jsx(Qc,{value:i.toJSON().data.dataSet,onChange:a=>{i==null||i.incrementalPatch({dataSet:a.target.value})},children:e==null?void 0:e.datafiles.map((a,l)=>v.jsx(fi,{value:a.filename,children:`[${a.version}] ${a.description}`},l))})}),v.jsx("p",{}),v.jsx(xt,{children:"Language Preference"}),v.jsx(xt,{variant:"subtitle2",children:"(available languages vary by Season and Errata setting)"}),v.jsx(pl,{children:v.jsxs(Qc,{value:i.toJSON().data.language??"auto",onChange:a=>{i==null||i.incrementalPatch({language:a.target.value})},children:[v.jsx(fi,{value:"auto",children:`Automatic Detection (${WR.getNativeName(r??"en")})`},"auto"),["en"].concat(Object.keys(((s=e.datafiles.find(a=>a.filename===i.toJSON().data.dataSet))==null?void 0:s.translations)??{})).map((a,l)=>v.jsx(fi,{value:a,children:`${WR.getNativeName(a)}`},l))]})}),v.jsx(Zo,{sx:{my:2}}),v.jsx(xt,{children:"UI Options:"}),v.jsx(xt,{children:"Initial Screen:"}),v.jsx(pl,{children:v.jsxs(Qc,{value:i==null?void 0:i.toJSON().data.initialScreen,onChange:a=>{i==null||i.incrementalPatch({initialScreen:a.target.value})},children:[v.jsx(fi,{value:"/game",children:"Game Play"}),v.jsx(fi,{value:"/library",children:"Card Library"})]})}),v.jsx("p",{}),v.jsx(pl,{children:v.jsx(Ko,{control:v.jsx(QV,{size:"small",checked:i==null?void 0:i.toJSON().data.uiPreferences.displayStatLine,onChange:a=>{i==null||i.incrementalPatch({uiPreferences:{displayStatLine:a.target.checked}})}}),label:"Stat Line in Game Roster List"})}),v.jsx("p",{}),v.jsx(xt,{children:"Prefered Card Layout:"}),v.jsx(xt,{variant:"subtitle2",children:"(Only applies to updated cards, where both styles are available)"}),v.jsx(pl,{children:v.jsxs(Qc,{value:i==null?void 0:i.toJSON().data.cardPreferences.preferredStyle,onChange:a=>{i==null||i.incrementalPatch({cardPreferences:{preferredStyle:a.target.value}})},children:[v.jsx(fi,{value:"sfg",children:"Steamforged"}),v.jsx(fi,{value:"gbcp",children:"Community"})]})})]})};var FS={},Ioe=eo;Object.defineProperty(FS,"__esModule",{value:!0});var CM=FS.default=void 0,Moe=Ioe(as()),$oe=v;CM=FS.default=(0,Moe.default)((0,$oe.jsx)("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3m-3 11H8v-5h8zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-1-9H6v4h12z"}),"Print");var zS={},Noe=eo;Object.defineProperty(zS,"__esModule",{value:!0});var kM=zS.default=void 0,Aoe=Noe(as()),Doe=v;kM=zS.default=(0,Aoe.default)((0,Doe.jsx)("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"}),"DoneAll");var US={},Boe=eo;Object.defineProperty(US,"__esModule",{value:!0});var EM=US.default=void 0,Foe=Boe(as()),zoe=v;EM=US.default=(0,Foe.default)((0,zoe.jsx)("path",{d:"m1.79 12 5.58 5.59L5.96 19 .37 13.41zm.45-7.78L12.9 14.89l-1.28 1.28L7.44 12l-1.41 1.41L11.62 19l2.69-2.69 4.89 4.89 1.41-1.41L3.65 2.81zm14.9 9.27L23.62 7 22.2 5.59l-6.48 6.48zM17.96 7l-1.41-1.41-3.65 3.66 1.41 1.41z"}),"RemoveDone");var WS={},Uoe=eo;Object.defineProperty(WS,"__esModule",{value:!0});var RM=WS.default=void 0,Woe=Uoe(as()),Goe=v;RM=WS.default=(0,Woe.default)((0,Goe.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");const Hoe=e=>{const[t,n]=k.useState(null),r=!!t,i=p=>{n(p.currentTarget)},o=()=>{n(null)},[s,a]=k.useState(!0),{doubleCard:l,setDouble:c,withBleed:u,setBleed:d,noFun:f,setNoFun:m}=e;return k.useEffect(()=>{const p=l?u?"5.24in 3.74in":"5in 3.5in":u?"2.74in 3.74in":"2.5in 3.5in",g=document.createElement("style");return s||(g.innerHTML=` - @media print { - @page { - size: ${p}; - margin: 0; - } - .Cards > .card { - margin: 0; - } - } - `),document.head.appendChild(g),()=>{document.head.removeChild(g)}},[l,u,s]),v.jsxs(v.Fragment,{children:[v.jsx(Qh,{title:"Print Settings",arrow:!0,children:v.jsx(Lo,{size:"small",onClick:i,children:v.jsx(Lee,{})})}),v.jsx(Fv,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"center"},open:r,onClose:o,children:v.jsxs(Um,{margin:2,children:[v.jsx(Ko,{label:"Double Wide Cards",control:v.jsx(Vo,{checked:l,onChange:()=>c(!l)})}),v.jsx(Ko,{label:"With Print Bleed",control:v.jsx(Vo,{checked:u,onChange:()=>d(!u)})}),v.jsx(Ko,{label:"Set Page to Card Size",control:v.jsx(Vo,{checked:!s,onChange:()=>a(!s)})}),v.jsx(Ko,{label:"Ignore Special Themes",control:v.jsx(Vo,{checked:f,onChange:()=>m(!f)})})]})})]})},Voe=()=>{const{gbdb:e,gameplans:t}=Vr(),n=k.useRef(null),r=k.useRef(),[i,o]=k.useState(),[s,a]=k.useState(),[l,c]=k.useState(!0),[u,d]=k.useState(!1),[f,m]=k.useState(!1);return k.useEffect(()=>{if(!e)return;(async()=>{const[g,E]=await Promise.all([e.guilds.find().where({minor:!1}).exec(),e.guilds.find().where({minor:!0}).exec()]).then(async([b,w])=>Promise.all([b,e.models.find().where("guild1").in(b.map(y=>y.name)).exec(),w,e.models.find().where("guild1").in(w.map(y=>y.name)).exec()])).then(([b,w,y,_])=>(Fs(w,"id",b.flatMap(R=>R.roster)),Fs(_,"id",y.flatMap(R=>R.roster)),[b.concat(y),w.concat(_)]));o(g.map(b=>b.name)),a(E.map(b=>b.id))})().catch(console.error)},[e]),!i||!s?null:v.jsxs(Zt,{component:"main",sx:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},children:[v.jsx(ls,{children:v.jsxs(Zt,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[v.jsx(xt,{children:"Card Printer"}),v.jsxs(Zt,{children:[v.jsx(Hoe,{withBleed:u,setBleed:d,doubleCard:l,setDouble:c,noFun:f,setNoFun:m}),v.jsx(Qh,{title:"Print",arrow:!0,children:v.jsx(Lo,{size:"small",onClick:()=>{window.print()},children:v.jsx(CM,{})})})]})]})}),v.jsxs(Zt,{className:"controls no-print",sx:{p:"1rem"},children:[v.jsx(Koe,{ref:r}),v.jsxs(Zt,{sx:{display:"flex",flexDirection:"column",my:"0.5rem"},children:[v.jsxs(Zt,{sx:{position:"relative"},children:[v.jsxs(Df,{variant:"text",sx:{mb:"0.5rem"},children:[v.jsx(Qh,{title:"Select All",arrow:!0,children:v.jsx(yn,{onClick:()=>{var p,g,E,b,w,y;(p=r.current)!=null&&p.guild&&((E=(g=n.current)==null?void 0:g.guilds.get(r.current.guild))==null||E.setChecked(!0),(b=n.current)==null||b.models.forEach(_=>{var R;(R=r.current)!=null&&R.guild&&(_.m.guild1===r.current.guild||_.m.guild2===r.current.guild)&&_.setChecked(!0)}),r.current.guild==="gameplans"&&((w=n.current)==null||w.gameplans.forEach(_=>{_.setChecked(!0)})),r.current.guild==="refcards"&&((y=n.current)==null||y.refcards.forEach(_=>{_.setChecked(!0)})))},children:v.jsx(kM,{})})}),v.jsx(Qh,{title:"Clear All",arrow:!0,children:v.jsx(yn,{onClick:()=>{var p,g,E,b,w,y;(p=r.current)!=null&&p.guild&&((E=(g=n.current)==null?void 0:g.guilds.get(r.current.guild))==null||E.setChecked(!1),(b=n.current)==null||b.models.forEach(_=>{var R;(R=r.current)!=null&&R.guild&&(_.m.guild1===r.current.guild||_.m.guild2===r.current.guild)&&_.setChecked(!1)}),r.current.guild==="gameplans"&&((w=n.current)==null||w.gameplans.forEach(_=>{_.setChecked(!1)})),r.current.guild==="refcards"&&((y=n.current)==null||y.refcards.forEach(_=>{_.setChecked(!1)})))},children:v.jsx(EM,{})})})]}),v.jsx(ic,{})]}),v.jsx(Zoe,{ref:n})]}),v.jsx(Zo,{}),v.jsx(Zt,{children:v.jsx(yn,{variant:"text",color:"primary",startIcon:v.jsx(RM,{}),onClick:()=>{var p,g,E,b;(p=n.current)==null||p.guilds.forEach(w=>{w.setChecked(!1)}),(g=n.current)==null||g.models.forEach(w=>{w.setChecked(!1)}),(E=n.current)==null||E.gameplans.forEach(w=>{w.setChecked(!1)}),(b=n.current)==null||b.refcards.forEach(w=>{w.setChecked(!1)})},children:"Clear Cards"})})]}),v.jsxs(Zt,{className:"Cards",children:[i.map(p=>v.jsx(tse,{name:p,bleed:u,doubleCard:l},p)),s.map(p=>v.jsx(ese,{name:p,id:p,bleed:u,noFun:f,doubleCard:l},p)),t==null?void 0:t.map((p,g)=>v.jsx(nse,{gameplan:p,bleed:u},`gameplan-${g}`)),t==null?void 0:t.map((p,g)=>v.jsx(rse,{index:g,bleed:u},`refcard-${g}`))]})]})},Koe=k.forwardRef((e,t)=>{const[n,r]=k.useState(void 0);k.useImperativeHandle(t,()=>({guild:n}),[n]);const i=io(a=>a.guilds.find().exec()),o=k.useCallback(a=>{if(!i)return;document.querySelectorAll(".model-checkbox").forEach(c=>c.classList.add("hide"));const l=i.find(c=>c.name===a);if(l){const{minor:c}=l,u=document.querySelector(".model-list-container");c?(u==null||u.style.setProperty("--major-order","2"),u==null||u.style.setProperty("--minor-order","0")):(u==null||u.style.setProperty("--major-order","0"),u==null||u.style.setProperty("--minor-order","2"))}document.querySelectorAll(`.model-checkbox.${a}`).forEach(c=>c.classList.remove("hide"))},[i]),s=k.useCallback(a=>{r(a.target.value),o(a.target.value)},[o]);if(i)return v.jsxs(pl,{size:"small",children:[v.jsx(uL,{children:"Guild"}),v.jsxs(Qc,{label:"Guild",onChange:s,defaultValue:"",children:[v.jsx(fi,{value:"refcards",dense:!0,children:v.jsx(ew,{text:"Rules Reference Cards",icon:"GB",style:{"--color":"#333333"}})},"redcards"),v.jsx(fi,{value:"gameplans",dense:!0,children:v.jsx(ew,{text:"Gameplans",icon:"GB",style:{"--color":"#333333"}})},"gameplans"),i.map(a=>v.jsx(fi,{value:a.name,dense:!0,children:v.jsx(qoe,{g:a})},a.name))]})]})}),qoe=({g:e})=>v.jsx(ew,{text:e.name,icon:e.name,style:{"--color":e.shadow??e.color}}),ew=({text:e,icon:t,style:n})=>v.jsx("div",{className:"guild",style:{width:"100%",fontSize:"1rem",...n},children:v.jsxs("span",{style:{display:"inline-flex"},children:[v.jsx("div",{style:{backgroundColor:"black",fontSize:"2em",width:"1em",height:"1em",borderRadius:"1em",display:"flex",overflow:"visible",alignItems:"center",justifyContent:"center"},children:v.jsx(Ci,{icon:t,className:"dark",style:{flexShrink:0}})}),v.jsx("span",{style:{color:"white",alignSelf:"center",marginLeft:"1em",marginRight:"1em"},children:e})]})},e),Fa=e=>{document.querySelectorAll(`.card#${e}`).forEach(t=>t==null?void 0:t.classList.toggle("hide"))},Yoe=k.forwardRef((e,t)=>{const[n,r]=k.useState(!1),i=e.g;return k.useImperativeHandle(t,()=>({g:e.g,checked:n,setChecked:o=>{n!==o&&(r(o),Fa(e.g.name))}}),[e.g,n,r]),v.jsx(Ko,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Vo,{checked:n,size:"small",color:"warning"}),label:i.name,className:`model-checkbox ${i.name} hide ${i.minor?"minor":""}`,style:{"--color1":i.shadow??i.color+"80","--color2":"var(--color1)"},onChange:()=>{r(!n),Fa(i.name)}})}),Qoe=k.forwardRef((e,t)=>{const[n,r]=k.useState(!1);k.useImperativeHandle(t,()=>({m:e.m,checked:n,setChecked:a=>{n!==a&&(r(a),Fa(e.m.id))}}),[e.m,n,r]);const i=e.m,[o,s]=io(async a=>Promise.all([a.guilds.findOne().where({name:i.guild1}).exec(),i.guild2?a.guilds.findOne().where({name:i.guild2}).exec():null]),[i.guild1,i.guild2])??[];return o?v.jsx(Ko,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Vo,{checked:n,size:"small",color:"warning"}),label:i.id,className:`model-checkbox ${i.guild1} ${i.guild2} ${i.id} hide ${o.minor?"minor":""}`,style:{"--color1":o.shadow??o.color+"80","--color2":s?s.shadow??s.color+"80":"var(--color1)"},onChange:()=>{r(!n),Fa(i.id)}}):null}),Xoe=k.forwardRef((e,t)=>{const[n,r]=k.useState(!1),i=e.g;return k.useImperativeHandle(t,()=>({g:e.g,checked:n,setChecked:o=>{n!==o&&(r(o),Fa(e.g.title.replace(/[^a-zA-Z0-9]+/g,"")))}}),[e.g,n,r]),v.jsx(Ko,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Vo,{checked:n,size:"small",color:"warning"}),label:i.title,className:`model-checkbox gameplans ${i.title.replace(/[^a-zA-Z0-9]/g,"")} hide`,style:{"--color1":"#333333","--color2":"var(--color1)"},onChange:()=>{r(!n),Fa(e.g.title.replace(/[^a-zA-Z0-9]+/g,""))}})}),Joe=k.forwardRef((e,t)=>{const[n,r]=k.useState(!1),i=["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"];return k.useImperativeHandle(t,()=>({id:e.id,checked:n,setChecked:o=>{n!==o&&(r(o),Fa(`refcard-${e.id}`))}}),[e.id,n,r]),v.jsx(Ko,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Vo,{checked:n,size:"small",color:"warning"}),label:i[e.id],className:`model-checkbox refcards refcard-${e.id} hide`,style:{"--color1":"#333333","--color2":"var(--color1)"},onChange:()=>{r(!n),Fa(`refcard-${e.id}`)}})}),Zoe=k.forwardRef((e,t)=>{const{gbdb:n,gameplans:r}=Vr(),i=k.useRef(new Map),o=k.useRef(new Map),s=k.useRef(new Map),a=k.useRef(new Map);k.useImperativeHandle(t,()=>({models:i.current,guilds:o.current,gameplans:s.current,refcards:a.current}),[i,o,s]);const[l,c]=k.useState(),[u,d]=k.useState();return k.useEffect(()=>{(async()=>{if(!n)return;const[m,p]=await Promise.all([n.guilds.find().where({minor:!1}).exec(),n.guilds.find().where({minor:!0}).exec()]).then(async([g,E])=>Promise.all([g,n.models.find().where("guild1").in(g.map(b=>b.name)).exec(),E,n.models.find().where("guild1").in(E.map(b=>b.name)).exec()])).then(([g,E,b,w])=>(Fs(E,"id",g.flatMap(y=>y.roster)),Fs(w,"id",b.flatMap(y=>y.roster)),[g.concat(b),E.concat(w)]));c(m),d(p)})().catch(console.error)},[n]),!r||!l||!u?null:v.jsxs(Zt,{className:"model-list-container",style:{"--major-order":0,"--minor-order":2},children:[r.map(f=>v.jsx(Xoe,{g:f,ref:m=>{m?s.current.set(f.title,m):s.current.delete(f.title)}},f.title)),["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((f,m)=>v.jsx(Joe,{id:m,ref:p=>{p?a.current.set(f,p):a.current.delete(f)}},`refcard-${m}`)),l.map(f=>v.jsx(Yoe,{g:f,ref:m=>{m?o.current.set(f.name,m):o.current.delete(f.name)}},f.name)),u.map(f=>v.jsx(Qoe,{m:f,ref:m=>{m?i.current.set(f.id,m):i.current.delete(f.id)}},f.id))]})}),ese=e=>{const{name:t,id:n,bleed:r,doubleCard:i,noFun:o}=e,[s,a]=k.useState(!1),l=p=>{if(p&&p[0]){const{target:g}=p[0],E=getComputedStyle(g);a(E.getPropertyValue("display")!=="none")}},[c]=ny(l),u=io(async p=>{const g=await p.models.findOne().where({id:t}).exec();return g==null?void 0:g.expand()},[t]);if(!u)return null;const d=r?"5.24in":"5in",f=r?"2.74in":"2.5in",m=r?"3.74in":"3.5in";return i?v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:d,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsxs(v.Fragment,{children:[v.jsx(hg,{className:`card-front double ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:d,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"}}),v.jsx(mg,{className:`card-back print double ${r?"bleed":""} ${o?"noFun":""}`,model:u,style:{width:d,borderRadius:0,"--scale":"calc(2.5 * (96 / 500))"}})]})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:f,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsx(hg,{className:`card-front print ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:f,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"}})}),v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:f,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsx(mg,{className:`card-back print ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:f,borderRadius:0,"--scale":"calc(2.5 * (96 / 500))"}})})]})},tse=e=>{const{name:t,bleed:n,doubleCard:r}=e,[i,o]=k.useState(!1),s=d=>{if(d&&d[0]){const{target:f}=d[0],m=getComputedStyle(f);o(m.getPropertyValue("display")!=="none")}},[a]=ny(s),l=n?"5.24in":"5in",c=n?"3.74in":"3.5in",u=n?"2.74in":"2.5in";return r?v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:l,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:`card-front double ${n?"bleed":""}`,style:{backgroundImage:`url(${on.get(`${t}_front`)})`,width:l,borderRadius:0}}),v.jsx("div",{className:`card-back double ${n?"bleed":""}`,style:{backgroundImage:`url(${on.get(`${t}_back`)})`,width:l,borderRadius:0}})]})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:u,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsx(v.Fragment,{children:v.jsx("div",{className:`card-front ${n?"bleed":""}`,style:{backgroundImage:`url(${on.get(`${t}_front`)})`,width:u,borderRadius:0}})})}),v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:u,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsx(v.Fragment,{children:v.jsx("div",{className:`card-back ${n?"bleed":""}`,style:{backgroundImage:`url(${on.get(`${t}_back`)})`,width:u,borderRadius:0}})})})]})},nse=e=>{const{gameplan:t,bleed:n}=e,[r,i]=k.useState(!1),o=c=>{if(c&&c[0]){const{target:u}=c[0],d=getComputedStyle(u);i(d.getPropertyValue("display")!=="none")}},[s]=ny(o),a=n?"2.74in":"2.5in",l=n?"3.74in":"3.5in";return v.jsx("div",{ref:s,className:`card ${r?"":"hide"}`,id:t.title.replace(/[^A-Za-z0-9]+/g,""),style:{position:"relative",width:a,height:l,display:"inline-flex",flexDirection:"row",gap:0},children:r&&v.jsx("div",{className:`card-front ${n?"bleed":""}`,style:{height:l,width:a,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"},children:v.jsx(vM,{gameplan:t,style:{borderRadius:0},bleed:n})})})},rse=e=>{const{index:t,bleed:n}=e,[r,i]=k.useState(!1),o=c=>{if(c&&c[0]){const{target:u}=c[0],d=getComputedStyle(u);i(d.getPropertyValue("display")!=="none")}},[s]=ny(o),a=n?"2.74in":"2.5in",l=n?"3.74in":"3.5in";return v.jsx("div",{ref:s,className:`card ${r?"":"hide"}`,id:`refcard-${t}`,style:{position:"relative",width:a,height:l,display:"inline-flex",flexDirection:"row",gap:0},children:r&&v.jsx(bM,{index:t+1,style:{borderRadius:0},bleed:n})})};function ise(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:o,onRegisterError:s}=e;let a,l;const c=async(d=!0)=>{await l};async function u(){if("serviceWorker"in navigator){if(a=await see(()=>import("./workbox-window.prod.es5-Ck4lWPv4.js"),[]).then(({Workbox:d})=>new d("/sw.js",{scope:"/",type:"classic"})).catch(d=>{s==null||s(d)}),!a)return;a.addEventListener("activated",d=>{(d.isUpdate||d.isExternal)&&window.location.reload()}),a.addEventListener("installed",d=>{d.isUpdate||r==null||r()}),a.register({immediate:t}).then(d=>{o?o("/sw.js",d):i==null||i(d)}).catch(d=>{s==null||s(d)})}}return l=u(),c}ise({immediate:!0});const ose=TD(Zb(v.jsxs(v.Fragment,{children:[v.jsx(Qr,{path:"/",element:v.jsx(wD,{to:await cn.getLocal("settings").then(e=>{const t=(e==null?void 0:e.get("initialScreen"))??SI.initialScreen;return t==="/game"?(e==null?void 0:e.get("gamePlayRoute"))??t:t==="/library"?(e==null?void 0:e.get("libraryRoute"))??t:t}),replace:!0})}),v.jsxs(Qr,{element:v.jsx(Eee,{}),children:[v.jsxs(Qr,{element:v.jsx(uoe,{}),children:[v.jsx(Qr,{path:"game",element:v.jsx(qne,{})}),v.jsx(Qr,{path:"game/draft",element:v.jsx(nre,{})}),v.jsx(Qr,{path:"game/draft/play",element:v.jsx(aoe,{})})]}),v.jsxs(Qr,{path:"library",element:v.jsx(woe,{}),children:[v.jsx(Qr,{index:!0,element:v.jsx(xoe,{})}),v.jsx(Qr,{path:"gameplans",element:v.jsx(Coe,{})}),v.jsx(Qr,{path:"refcards",element:v.jsx(koe,{})}),v.jsx(Qr,{path:":guild",element:v.jsx(_oe,{})})]}),v.jsx(Qr,{path:"print",element:v.jsx(Voe,{})}),v.jsx(Qr,{path:"settings",element:v.jsx(joe,{})})]})]}))),sse=tb.createRoot(document.getElementById("root"));sse.render(v.jsx(_ee,{children:v.jsx(Ate,{children:v.jsx(AD,{router:ose})})})); diff --git a/assets/index-DAy2HQFx.js b/assets/index-DAy2HQFx.js new file mode 100644 index 0000000..3b33658 --- /dev/null +++ b/assets/index-DAy2HQFx.js @@ -0,0 +1,199 @@ +function HR(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Cr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function za(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zs(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var VR={exports:{}},wg={},KR={exports:{}},$t={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Yf=Symbol.for("react.element"),BM=Symbol.for("react.portal"),FM=Symbol.for("react.fragment"),zM=Symbol.for("react.strict_mode"),UM=Symbol.for("react.profiler"),WM=Symbol.for("react.provider"),GM=Symbol.for("react.context"),HM=Symbol.for("react.forward_ref"),VM=Symbol.for("react.suspense"),KM=Symbol.for("react.memo"),qM=Symbol.for("react.lazy"),r_=Symbol.iterator;function YM(e){return e===null||typeof e!="object"?null:(e=r_&&e[r_]||e["@@iterator"],typeof e=="function"?e:null)}var qR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},YR=Object.assign,QR={};function $u(e,t,n){this.props=e,this.context=t,this.refs=QR,this.updater=n||qR}$u.prototype.isReactComponent={};$u.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)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")};$u.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function XR(){}XR.prototype=$u.prototype;function nw(e,t,n){this.props=e,this.context=t,this.refs=QR,this.updater=n||qR}var rw=nw.prototype=new XR;rw.constructor=nw;YR(rw,$u.prototype);rw.isPureReactComponent=!0;var i_=Array.isArray,JR=Object.prototype.hasOwnProperty,iw={current:null},ZR={key:!0,ref:!0,__self:!0,__source:!0};function e2(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)JR.call(t,r)&&!ZR.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,Ge=G[Le];if(0>>1;Lei(He,le))Rei(et,He)?(G[Le]=et,G[Re]=le,Le=Re):(G[Le]=He,G[Ce]=le,Le=Ce);else if(Rei(et,le))G[Le]=et,G[Re]=le,Le=Re;else break e}}return V}function i(G,V){var le=G.sortIndex-V.sortIndex;return le!==0?le:G.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.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,m=!1,h=!1,g=!1,E=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(G){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=G)r(c),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(c)}}function _(G){if(g=!1,y(G),!h)if(n(l)!==null)h=!0,Z(R);else{var V=n(c);V!==null&&pe(_,V.startTime-G)}}function R(G,V){h=!1,g&&(g=!1,b(I),I=-1),m=!0;var le=f;try{for(y(V),d=n(l);d!==null&&(!(d.expirationTime>V)||G&&!$());){var Le=d.callback;if(typeof Le=="function"){d.callback=null,f=d.priorityLevel;var Ge=Le(d.expirationTime<=V);V=e.unstable_now(),typeof Ge=="function"?d.callback=Ge:d===n(l)&&r(l),y(V)}else r(l);d=n(l)}if(d!==null)var Te=!0;else{var Ce=n(c);Ce!==null&&pe(_,Ce.startTime-V),Te=!1}return Te}finally{d=null,f=le,m=!1}}var T=!1,C=null,I=-1,A=5,j=-1;function $(){return!(e.unstable_now()-jG||125Le?(G.sortIndex=le,t(c,G),n(l)===null&&G===n(c)&&(g?(b(I),I=-1):g=!0,pe(_,le-Le))):(G.sortIndex=Ge,t(l,G),h||m||(h=!0,Z(R))),G},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(G){var V=f;return function(){var le=f;f=V;try{return G.apply(this,arguments)}finally{f=le}}}})(o2);i2.exports=o2;var s$=i2.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var a$=k,Si=s$;function Me(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rb=Object.prototype.hasOwnProperty,l$=/^[: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]*$/,s_={},a_={};function c$(e){return rb.call(a_,e)?!0:rb.call(s_,e)?!1:l$.test(e)?a_[e]=!0:(s_[e]=!0,!1)}function u$(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function d$(e,t,n,r){if(t===null||typeof t>"u"||u$(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Gr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var dr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){dr[e]=new Gr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];dr[t]=new Gr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){dr[e]=new Gr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dr[e]=new Gr(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){dr[e]=new Gr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){dr[e]=new Gr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){dr[e]=new Gr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){dr[e]=new Gr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){dr[e]=new Gr(e,5,!1,e.toLowerCase(),null,!1,!1)});var sw=/[\-:]([a-z])/g;function aw(e){return e[1].toUpperCase()}"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(sw,aw);dr[t]=new Gr(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(sw,aw);dr[t]=new Gr(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(sw,aw);dr[t]=new Gr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){dr[e]=new Gr(e,1,!1,e.toLowerCase(),null,!1,!1)});dr.xlinkHref=new Gr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){dr[e]=new Gr(e,1,!1,e.toLowerCase(),null,!0,!0)});function lw(e,t,n,r){var i=dr.hasOwnProperty(t)?dr[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` +`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Ry=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Td(e):""}function f$(e){switch(e.tag){case 5:return Td(e.type);case 16:return Td("Lazy");case 13:return Td("Suspense");case 19:return Td("SuspenseList");case 0:case 2:case 15:return e=Py(e.type,!1),e;case 11:return e=Py(e.type.render,!1),e;case 1:return e=Py(e.type,!0),e;default:return""}}function ab(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ac:return"Fragment";case Nc:return"Portal";case ib:return"Profiler";case cw:return"StrictMode";case ob:return"Suspense";case sb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case l2:return(e.displayName||"Context")+".Consumer";case a2:return(e._context.displayName||"Context")+".Provider";case uw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dw:return t=e.displayName||null,t!==null?t:ab(e.type)||"Memo";case da:t=e._payload,e=e._init;try{return ab(e(t))}catch{}}return null}function p$(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=t.render,e=e.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 ab(t);case 8:return t===cw?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function $a(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function u2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function h$(e){var t=u2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vp(e){e._valueTracker||(e._valueTracker=h$(e))}function d2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=u2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function am(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function lb(e,t){var n=t.checked;return kn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function c_(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$a(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function f2(e,t){t=t.checked,t!=null&&lw(e,"checked",t,!1)}function cb(e,t){f2(e,t);var n=$a(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ub(e,t.type,n):t.hasOwnProperty("defaultValue")&&ub(e,t.type,$a(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function u_(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ub(e,t,n){(t!=="number"||am(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Od=Array.isArray;function Jc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Kp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ff(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Dd={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},m$=["Webkit","ms","Moz","O"];Object.keys(Dd).forEach(function(e){m$.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Dd[t]=Dd[e]})});function g2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Dd.hasOwnProperty(e)&&Dd[e]?(""+t).trim():t+"px"}function v2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=g2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var g$=kn({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 pb(e,t){if(t){if(g$[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Me(62))}}function hb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 mb=null;function fw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gb=null,Zc=null,eu=null;function p_(e){if(e=Jf(e)){if(typeof gb!="function")throw Error(Me(280));var t=e.stateNode;t&&(t=kg(t),gb(e.stateNode,e.type,t))}}function y2(e){Zc?eu?eu.push(e):eu=[e]:Zc=e}function b2(){if(Zc){var e=Zc,t=eu;if(eu=Zc=null,p_(e),t)for(e=0;e>>=0,e===0?32:31-(R$(e)/P$|0)|0}var qp=64,Yp=4194304;function Ld(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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dm(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Ld(a):(o&=s,o!==0&&(r=Ld(o)))}else s=n&~i,s!==0?r=Ld(s):o!==0&&(r=Ld(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Qf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xo(t),e[t]=n}function j$(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=Fd),S_=" ",__=!1;function B2(e,t){switch(e){case"keyup":return sN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dc=!1;function lN(e,t){switch(e){case"compositionend":return F2(t);case"keypress":return t.which!==32?null:(__=!0,S_);case"textInput":return e=t.data,e===S_&&__?null:e;default:return null}}function cN(e,t){if(Dc)return e==="compositionend"||!ww&&B2(e,t)?(e=A2(),Mh=vw=va=null,Dc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=R_(n)}}function G2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?G2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function H2(){for(var e=window,t=am();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=am(e.document)}return t}function xw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function yN(e){var t=H2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&G2(n.ownerDocument.documentElement,n)){if(r!==null&&xw(n)){if(t=r.start,e=r.end,e===void 0&&(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,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=P_(n,o);var s=P_(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>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;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bc=null,Sb=null,Ud=null,_b=!1;function T_(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_b||Bc==null||Bc!==am(r)||(r=Bc,"selectionStart"in r&&xw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ud&&yf(Ud,r)||(Ud=r,r=hm(Sb,"onSelect"),0Uc||(e.current=Tb[Uc],Tb[Uc]=null,Uc--)}function dn(e,t){Uc++,Tb[Uc]=e.current,e.current=t}var Na={},Er=Wa(Na),Zr=Wa(!1),Ll=Na;function fu(e,t){var n=e.type.contextTypes;if(!n)return Na;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ei(e){return e=e.childContextTypes,e!=null}function gm(){pn(Zr),pn(Er)}function N_(e,t,n){if(Er.current!==Na)throw Error(Me(168));dn(Er,t),dn(Zr,n)}function eP(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Me(108,p$(e)||"Unknown",i));return kn({},n,r)}function vm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Na,Ll=Er.current,dn(Er,e),dn(Zr,Zr.current),!0}function A_(e,t,n){var r=e.stateNode;if(!r)throw Error(Me(169));n?(e=eP(e,t,Ll),r.__reactInternalMemoizedMergedChildContext=e,pn(Zr),pn(Er),dn(Er,e)):pn(Zr),dn(Zr,n)}var vs=null,Eg=!1,Uy=!1;function tP(e){vs===null?vs=[e]:vs.push(e)}function ON(e){Eg=!0,tP(e)}function Ga(){if(!Uy&&vs!==null){Uy=!0;var e=0,t=Yt;try{var n=vs;for(Yt=1;e>=s,i-=s,ws=1<<32-xo(t)+i|n<I?(A=C,C=null):A=C.sibling;var j=f(b,C,y[I],_);if(j===null){C===null&&(C=A);break}e&&C&&j.alternate===null&&t(b,C),w=o(j,w,I),T===null?R=j:T.sibling=j,T=j,C=A}if(I===y.length)return n(b,C),vn&&cl(b,I),R;if(C===null){for(;II?(A=C,C=null):A=C.sibling;var $=f(b,C,j.value,_);if($===null){C===null&&(C=A);break}e&&C&&$.alternate===null&&t(b,C),w=o($,w,I),T===null?R=$:T.sibling=$,T=$,C=A}if(j.done)return n(b,C),vn&&cl(b,I),R;if(C===null){for(;!j.done;I++,j=y.next())j=d(b,j.value,_),j!==null&&(w=o(j,w,I),T===null?R=j:T.sibling=j,T=j);return vn&&cl(b,I),R}for(C=r(b,C);!j.done;I++,j=y.next())j=m(C,b,I,j.value,_),j!==null&&(e&&j.alternate!==null&&C.delete(j.key===null?I:j.key),w=o(j,w,I),T===null?R=j:T.sibling=j,T=j);return e&&C.forEach(function(F){return t(b,F)}),vn&&cl(b,I),R}function E(b,w,y,_){if(typeof y=="object"&&y!==null&&y.type===Ac&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Hp:e:{for(var R=y.key,T=w;T!==null;){if(T.key===R){if(R=y.type,R===Ac){if(T.tag===7){n(b,T.sibling),w=i(T,y.props.children),w.return=b,b=w;break e}}else if(T.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===da&&F_(R)===T.type){n(b,T.sibling),w=i(T,y.props),w.ref=dd(b,T,y),w.return=b,b=w;break e}n(b,T);break}else t(b,T);T=T.sibling}y.type===Ac?(w=kl(y.props.children,b.mode,_,y.key),w.return=b,b=w):(_=Uh(y.type,y.key,y.props,null,b.mode,_),_.ref=dd(b,w,y),_.return=b,b=_)}return s(b);case Nc:e:{for(T=y.key;w!==null;){if(w.key===T)if(w.tag===4&&w.stateNode.containerInfo===y.containerInfo&&w.stateNode.implementation===y.implementation){n(b,w.sibling),w=i(w,y.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=Qy(y,b.mode,_),w.return=b,b=w}return s(b);case da:return T=y._init,E(b,w,T(y._payload),_)}if(Od(y))return h(b,w,y,_);if(sd(y))return g(b,w,y,_);nh(b,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,w!==null&&w.tag===6?(n(b,w.sibling),w=i(w,y),w.return=b,b=w):(n(b,w),w=Yy(y,b.mode,_),w.return=b,b=w),s(b)):n(b,w)}return E}var hu=oP(!0),sP=oP(!1),wm=Wa(null),xm=null,Hc=null,kw=null;function Ew(){kw=Hc=xm=null}function Rw(e){var t=wm.current;pn(wm),e._currentValue=t}function jb(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function nu(e,t){xm=e,kw=Hc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Jr=!0),e.firstContext=null)}function Ki(e){var t=e._currentValue;if(kw!==e)if(e={context:e,memoizedValue:t,next:null},Hc===null){if(xm===null)throw Error(Me(308));Hc=e,xm.dependencies={lanes:0,firstContext:e}}else Hc=Hc.next=e;return t}var gl=null;function Pw(e){gl===null?gl=[e]:gl.push(e)}function aP(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Pw(t)):(n.next=i.next,i.next=n),t.interleaved=n,js(e,r)}function js(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fa=!1;function Tw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lP(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 ks(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Pa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Bt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,js(e,n)}return i=r.interleaved,i===null?(t.next=t,Pw(r)):(t.next=i.next,i.next=t),r.interleaved=t,js(e,n)}function Nh(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hw(e,n)}}function z_(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Sm(e,t,n,r){var i=e.updateQueue;fa=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;s=0,u=c=l=null,a=o;do{var f=a.lane,m=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,g=a;switch(f=t,m=n,g.tag){case 1:if(h=g.payload,typeof h=="function"){d=h.call(m,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h=="function"?h.call(m,d,f):h,f==null)break e;d=kn({},d,f);break e;case 2:fa=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=d):u=u.next=m,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ml|=s,e.lanes=s,e.memoizedState=d}}function U_(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Gy.transition;Gy.transition={};try{e(!1),t()}finally{Yt=n,Gy.transition=r}}function kP(){return qi().memoizedState}function MN(e,t,n){var r=Oa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},EP(e))RP(t,n);else if(n=aP(e,t,n,r),n!==null){var i=zr();So(n,e,r,i),PP(n,t,r)}}function $N(e,t,n){var r=Oa(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(EP(e))RP(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Co(a,s)){var l=t.interleaved;l===null?(i.next=i,Pw(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=aP(e,t,i,r),n!==null&&(i=zr(),So(n,e,r,i),PP(n,t,r))}}function EP(e){var t=e.alternate;return e===Cn||t!==null&&t===Cn}function RP(e,t){Wd=Cm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function PP(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hw(e,n)}}var km={readContext:Ki,useCallback:wr,useContext:wr,useEffect:wr,useImperativeHandle:wr,useInsertionEffect:wr,useLayoutEffect:wr,useMemo:wr,useReducer:wr,useRef:wr,useState:wr,useDebugValue:wr,useDeferredValue:wr,useTransition:wr,useMutableSource:wr,useSyncExternalStore:wr,useId:wr,unstable_isNewReconciler:!1},NN={readContext:Ki,useCallback:function(e,t){return Bo().memoizedState=[e,t===void 0?null:t],e},useContext:Ki,useEffect:G_,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dh(4194308,4,wP.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dh(4,2,e,t)},useMemo:function(e,t){var n=Bo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bo();return t=n!==void 0?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=MN.bind(null,Cn,e),[r.memoizedState,e]},useRef:function(e){var t=Bo();return e={current:e},t.memoizedState=e},useState:W_,useDebugValue:Aw,useDeferredValue:function(e){return Bo().memoizedState=e},useTransition:function(){var e=W_(!1),t=e[0];return e=IN.bind(null,e[1]),Bo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Cn,i=Bo();if(vn){if(n===void 0)throw Error(Me(407));n=n()}else{if(n=t(),tr===null)throw Error(Me(349));Il&30||fP(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,G_(hP.bind(null,r,o,e),[e]),r.flags|=2048,Ef(9,pP.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Bo(),t=tr.identifierPrefix;if(vn){var n=xs,r=ws;n=(r&~(1<<32-xo(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Cf++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Go]=t,e[xf]=r,DP(e,t,!1,!1),t.stateNode=e;e:{switch(s=hb(n,r),n){case"dialog":fn("cancel",e),fn("close",e),i=r;break;case"iframe":case"object":case"embed":fn("load",e),i=r;break;case"video":case"audio":for(i=0;ivu&&(t.flags|=128,r=!0,fd(o,!1),t.lanes=4194304)}else{if(!r)if(e=_m(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fd(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!vn)return xr(t),null}else 2*Mn()-o.renderingStartTime>vu&&n!==1073741824&&(t.flags|=128,r=!0,fd(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Mn(),t.sibling=null,n=Sn.current,dn(Sn,r?n&1|2:n&1),t):(xr(t),null);case 22:case 23:return Ww(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?di&1073741824&&(xr(t),t.subtreeFlags&6&&(t.flags|=8192)):xr(t),null;case 24:return null;case 25:return null}throw Error(Me(156,t.tag))}function GN(e,t){switch(_w(t),t.tag){case 1:return ei(t.type)&&gm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mu(),pn(Zr),pn(Er),jw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lw(t),null;case 13:if(pn(Sn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Me(340));pu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pn(Sn),null;case 4:return mu(),null;case 10:return Rw(t.type._context),null;case 22:case 23:return Ww(),null;case 24:return null;default:return null}}var ih=!1,kr=!1,HN=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Vc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){On(e,t,r)}else n.current=null}function zb(e,t,n){try{n()}catch(r){On(e,t,r)}}var tC=!1;function VN(e,t){if(Cb=fm,e=H2(),xw(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(m=d.firstChild)!==null;)f=d,d=m;for(;;){if(d===e)break t;if(f===n&&++c===i&&(a=s),f===o&&++u===r&&(l=s),(m=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(kb={focusedElem:e,selectionRange:n},fm=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,E=h.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:ho(t.type,g),E);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Me(163))}}catch(_){On(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return h=tC,tC=!1,h}function Gd(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&zb(t,n,o)}i=i.next}while(i!==r)}}function Tg(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==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 Ub(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function zP(e){var t=e.alternate;t!==null&&(e.alternate=null,zP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Go],delete t[xf],delete t[Pb],delete t[PN],delete t[TN])),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 UP(e){return e.tag===5||e.tag===3||e.tag===4}function nC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||UP(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mm));else if(r!==4&&(e=e.child,e!==null))for(Wb(e,t,n),e=e.sibling;e!==null;)Wb(e,t,n),e=e.sibling}function Gb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gb(e,t,n),e=e.sibling;e!==null;)Gb(e,t,n),e=e.sibling}var sr=null,mo=!1;function oa(e,t,n){for(n=n.child;n!==null;)WP(e,t,n),n=n.sibling}function WP(e,t,n){if(Qo&&typeof Qo.onCommitFiberUnmount=="function")try{Qo.onCommitFiberUnmount(xg,n)}catch{}switch(n.tag){case 5:kr||Vc(n,t);case 6:var r=sr,i=mo;sr=null,oa(e,t,n),sr=r,mo=i,sr!==null&&(mo?(e=sr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):sr.removeChild(n.stateNode));break;case 18:sr!==null&&(mo?(e=sr,n=n.stateNode,e.nodeType===8?zy(e.parentNode,n):e.nodeType===1&&zy(e,n),gf(e)):zy(sr,n.stateNode));break;case 4:r=sr,i=mo,sr=n.stateNode.containerInfo,mo=!0,oa(e,t,n),sr=r,mo=i;break;case 0:case 11:case 14:case 15:if(!kr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&zb(n,t,s),i=i.next}while(i!==r)}oa(e,t,n);break;case 1:if(!kr&&(Vc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){On(n,t,a)}oa(e,t,n);break;case 21:oa(e,t,n);break;case 22:n.mode&1?(kr=(r=kr)||n.memoizedState!==null,oa(e,t,n),kr=r):oa(e,t,n);break;default:oa(e,t,n)}}function rC(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new HN),t.forEach(function(r){var i=tA.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function uo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Mn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*qN(r/1960))-r,10e?16:e,ya===null)var r=!1;else{if(e=ya,ya=null,Pm=0,Bt&6)throw Error(Me(331));var i=Bt;for(Bt|=4,nt=e.current;nt!==null;){var o=nt,s=o.child;if(nt.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lMn()-zw?Cl(e,0):Fw|=n),ti(e,t)}function XP(e,t){t===0&&(e.mode&1?(t=Yp,Yp<<=1,!(Yp&130023424)&&(Yp=4194304)):t=1);var n=zr();e=js(e,t),e!==null&&(Qf(e,t,n),ti(e,n))}function eA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),XP(e,n)}function tA(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Me(314))}r!==null&&r.delete(t),XP(e,n)}var JP;JP=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Zr.current)Jr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Jr=!1,UN(e,t,n);Jr=!!(e.flags&131072)}else Jr=!1,vn&&t.flags&1048576&&nP(t,bm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bh(e,t),e=t.pendingProps;var i=fu(t,Er.current);nu(t,n),i=Mw(null,t,r,e,i,n);var o=$w();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ei(r)?(o=!0,vm(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Tw(t),i.updater=Pg,t.stateNode=i,i._reactInternals=t,Mb(t,r,e,n),t=Ab(null,t,r,!0,o,n)):(t.tag=0,vn&&o&&Sw(t),Fr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bh(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=rA(r),e=ho(r,e),i){case 0:t=Nb(null,t,r,e,n);break e;case 1:t=J_(null,t,r,e,n);break e;case 11:t=Q_(null,t,r,e,n);break e;case 14:t=X_(null,t,r,ho(r.type,e),n);break e}throw Error(Me(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ho(r,i),Nb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ho(r,i),J_(e,t,r,i,n);case 3:e:{if($P(t),e===null)throw Error(Me(387));r=t.pendingProps,o=t.memoizedState,i=o.element,lP(e,t),Sm(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=gu(Error(Me(423)),t),t=Z_(e,t,r,n,i);break e}else if(r!==i){i=gu(Error(Me(424)),t),t=Z_(e,t,r,n,i);break e}else for(vi=Ra(t.stateNode.containerInfo.firstChild),wi=t,vn=!0,bo=null,n=sP(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(pu(),r===i){t=Is(e,t,n);break e}Fr(e,t,r,n)}t=t.child}return t;case 5:return cP(t),e===null&&Lb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Eb(r,i)?s=null:o!==null&&Eb(r,o)&&(t.flags|=32),MP(e,t),Fr(e,t,s,n),t.child;case 6:return e===null&&Lb(t),null;case 13:return NP(e,t,n);case 4:return Ow(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=hu(t,null,r,n):Fr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ho(r,i),Q_(e,t,r,i,n);case 7:return Fr(e,t,t.pendingProps,n),t.child;case 8:return Fr(e,t,t.pendingProps.children,n),t.child;case 12:return Fr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,dn(wm,r._currentValue),r._currentValue=s,o!==null)if(Co(o.value,s)){if(o.children===i.children&&!Zr.current){t=Is(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ks(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),jb(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Me(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),jb(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Fr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,nu(t,n),i=Ki(i),r=r(i),t.flags|=1,Fr(e,t,r,n),t.child;case 14:return r=t.type,i=ho(r,t.pendingProps),i=ho(r.type,i),X_(e,t,r,i,n);case 15:return jP(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ho(r,i),Bh(e,t),t.tag=1,ei(r)?(e=!0,vm(t)):e=!1,nu(t,n),TP(t,r,i),Mb(t,r,i,n),Ab(null,t,r,!0,e,n);case 19:return AP(e,t,n);case 22:return IP(e,t,n)}throw Error(Me(156,t.tag))};function ZP(e,t){return E2(e,t)}function nA(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 Ui(e,t,n,r){return new nA(e,t,n,r)}function Hw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rA(e){if(typeof e=="function")return Hw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===uw)return 11;if(e===dw)return 14}return 2}function La(e,t){var n=e.alternate;return n===null?(n=Ui(e.tag,t,e.key,e.mode),n.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=e.flags&14680064,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Uh(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Hw(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Ac:return kl(n.children,i,o,t);case cw:s=8,i|=8;break;case ib:return e=Ui(12,n,t,i|2),e.elementType=ib,e.lanes=o,e;case ob:return e=Ui(13,n,t,i),e.elementType=ob,e.lanes=o,e;case sb:return e=Ui(19,n,t,i),e.elementType=sb,e.lanes=o,e;case c2:return Lg(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case a2:s=10;break e;case l2:s=9;break e;case uw:s=11;break e;case dw:s=14;break e;case da:s=16,r=null;break e}throw Error(Me(130,e==null?e:typeof e,""))}return t=Ui(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function kl(e,t,n,r){return e=Ui(7,e,r,t),e.lanes=n,e}function Lg(e,t,n,r){return e=Ui(22,e,r,t),e.elementType=c2,e.lanes=n,e.stateNode={isHidden:!1},e}function Yy(e,t,n){return e=Ui(6,e,null,t),e.lanes=n,e}function Qy(e,t,n){return t=Ui(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function iA(e,t,n,r,i){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=Oy(0),this.expirationTimes=Oy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oy(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vw(e,t,n,r,i,o,s,a,l){return e=new iA(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ui(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tw(o),e}function oA(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rT)}catch(e){console.error(e)}}rT(),r2.exports=ki;var Ng=r2.exports;const Id=za(Ng),uA=HR({__proto__:null,default:Id},[Ng]);var dC=Ng;nb.createRoot=dC.createRoot,nb.hydrateRoot=dC.hydrateRoot;/** + * @remix-run/router v1.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function xn(){return xn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Nl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fA(){return Math.random().toString(36).substr(2,8)}function pC(e,t){return{usr:e.state,key:e.key,idx:t}}function Pf(e,t,n,r){return n===void 0&&(n=null),xn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?is(t):t,{state:n,key:t&&t.key||r||fA()})}function Al(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function is(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function pA(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=In.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(xn({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){a=In.Pop;let E=u(),b=E==null?null:E-c;c=E,l&&l({action:a,location:g.location,delta:b})}function f(E,b){a=In.Push;let w=Pf(g.location,E,b);n&&n(w,E),c=u()+1;let y=pC(w,c),_=g.createHref(w);try{s.pushState(y,"",_)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;i.location.assign(_)}o&&l&&l({action:a,location:g.location,delta:1})}function m(E,b){a=In.Replace;let w=Pf(g.location,E,b);n&&n(w,E),c=u();let y=pC(w,c),_=g.createHref(w);s.replaceState(y,"",_),o&&l&&l({action:a,location:g.location,delta:0})}function h(E){let b=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof E=="string"?E:Al(E);return w=w.replace(/ $/,"%20"),Ct(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let g={get action(){return a},get location(){return e(i,s)},listen(E){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(fC,d),l=E,()=>{i.removeEventListener(fC,d),l=null}},createHref(E){return t(i,E)},createURL:h,encodeLocation(E){let b=h(E);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:m,go(E){return s.go(E)}};return g}var gn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gn||(gn={}));const hA=new Set(["lazy","caseSensitive","path","id","index","children"]);function mA(e){return e.index===!0}function Yb(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let s=[...n,o],a=typeof i.id=="string"?i.id:s.join("-");if(Ct(i.index!==!0||!i.children,"Cannot specify children on an index route"),Ct(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),mA(i)){let l=xn({},i,t(i),{id:a});return r[a]=l,l}else{let l=xn({},i,t(i),{id:a,children:void 0});return r[a]=l,i.children&&(l.children=Yb(i.children,t,s,r)),l}})}function qc(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?is(t):t,i=ko(r.pathname||"/",n);if(i==null)return null;let o=iT(e);vA(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(Ct(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Es([r,l.relativePath]),u=n.concat(l);o.children&&o.children.length>0&&(Ct(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),iT(o.children,t,u,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:CA(c,o.index),routesMeta:u})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of oT(o.path))i(o,s,l)}),t}function oT(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=oT(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function vA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:kA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const yA=/^:[\w-]+$/,bA=3,wA=2,xA=1,SA=10,_A=-2,hC=e=>e==="*";function CA(e,t){let n=e.split("/"),r=n.length;return n.some(hC)&&(r+=_A),t&&(r+=wA),n.filter(i=>!hC(i)).reduce((i,o)=>i+(yA.test(o)?bA:o===""?xA:SA),r)}function kA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function EA(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{let{paramName:f,isOptional:m}=u;if(f==="*"){let g=a[d]||"";s=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const h=a[d];return m&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:e}}function RA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Nl(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function PA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Nl(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ko(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function TA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?is(e):e;return{pathname:n?n.startsWith("/")?n:OA(n,t):t,search:jA(r),hash:IA(i)}}function OA(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Xy(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function sT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ag(e,t){let n=sT(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Dg(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=is(e):(i=xn({},e),Ct(!i.pathname||!i.pathname.includes("?"),Xy("?","pathname","search",i)),Ct(!i.pathname||!i.pathname.includes("#"),Xy("#","pathname","hash",i)),Ct(!i.search||!i.search.includes("#"),Xy("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=TA(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Es=e=>e.join("/").replace(/\/\/+/g,"/"),LA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,IA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Qw{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Xw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const aT=["post","put","patch","delete"],MA=new Set(aT),$A=["get",...aT],NA=new Set($A),AA=new Set([301,302,303,307,308]),DA=new Set([307,308]),Jy={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},BA={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Tc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Jw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,FA=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),lT="remix-router-transitions";function zA(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Ct(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let se=e.detectErrorBoundary;i=ge=>({hasErrorBoundary:se(ge)})}else i=FA;let o={},s=Yb(e.routes,i,void 0,o),a,l=e.basename||"/",c=e.unstable_dataStrategy||HA,u=xn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),d=null,f=new Set,m=null,h=null,g=null,E=e.hydrationData!=null,b=qc(s,e.history.location,l),w=null;if(b==null){let se=$i(404,{pathname:e.history.location.pathname}),{matches:ge,route:we}=CC(s);b=ge,w={[we.id]:se}}let y,_=b.some(se=>se.route.lazy),R=b.some(se=>se.route.loader);if(_)y=!1;else if(!R)y=!0;else if(u.v7_partialHydration){let se=e.hydrationData?e.hydrationData.loaderData:null,ge=e.hydrationData?e.hydrationData.errors:null,we=je=>je.route.loader?typeof je.route.loader=="function"&&je.route.loader.hydrate===!0?!1:se&&se[je.route.id]!==void 0||ge&&ge[je.route.id]!==void 0:!0;if(ge){let je=b.findIndex(qe=>ge[qe.route.id]!==void 0);y=b.slice(0,je+1).every(we)}else y=b.every(we)}else y=e.hydrationData!=null;let T,C={historyAction:e.history.action,location:e.history.location,matches:b,initialized:y,navigation:Jy,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},I=In.Pop,A=!1,j,$=!1,F=new Map,z=null,Y=!1,J=!1,Z=[],pe=[],G=new Map,V=0,le=-1,Le=new Map,Ge=new Set,Te=new Map,Ce=new Map,He=new Set,Re=new Map,et=new Map,lt=!1;function Pe(){if(d=e.history.listen(se=>{let{action:ge,location:we,delta:je}=se;if(lt){lt=!1;return}Nl(et.size===0||je!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let qe=hr({currentLocation:C.location,nextLocation:we,historyAction:ge});if(qe&&je!=null){lt=!0,e.history.go(je*-1),bn(qe,{state:"blocked",location:we,proceed(){bn(qe,{state:"proceeding",proceed:void 0,reset:void 0,location:we}),e.history.go(je)},reset(){let ct=new Map(C.blockers);ct.set(qe,Tc),We({blockers:ct})}});return}return fe(ge,we)}),n){rD(t,F);let se=()=>iD(t,F);t.addEventListener("pagehide",se),z=()=>t.removeEventListener("pagehide",se)}return C.initialized||fe(In.Pop,C.location,{initialHydration:!0}),T}function Rt(){d&&d(),z&&z(),f.clear(),j&&j.abort(),C.fetchers.forEach((se,ge)=>Oe(ge)),C.blockers.forEach((se,ge)=>Vt(ge))}function at(se){return f.add(se),()=>f.delete(se)}function We(se,ge){ge===void 0&&(ge={}),C=xn({},C,se);let we=[],je=[];u.v7_fetcherPersist&&C.fetchers.forEach((qe,ct)=>{qe.state==="idle"&&(He.has(ct)?je.push(ct):we.push(ct))}),[...f].forEach(qe=>qe(C,{deletedFetchers:je,unstable_viewTransitionOpts:ge.viewTransitionOpts,unstable_flushSync:ge.flushSync===!0})),u.v7_fetcherPersist&&(we.forEach(qe=>C.fetchers.delete(qe)),je.forEach(qe=>Oe(qe)))}function Ze(se,ge,we){var je,qe;let{flushSync:ct}=we===void 0?{}:we,Fe=C.actionData!=null&&C.navigation.formMethod!=null&&go(C.navigation.formMethod)&&C.navigation.state==="loading"&&((je=se.state)==null?void 0:je._isRedirect)!==!0,Be;ge.actionData?Object.keys(ge.actionData).length>0?Be=ge.actionData:Be=null:Fe?Be=C.actionData:Be=null;let ut=ge.loaderData?SC(C.loaderData,ge.loaderData,ge.matches||[],ge.errors):C.loaderData,dt=C.blockers;dt.size>0&&(dt=new Map(dt),dt.forEach((mt,jt)=>dt.set(jt,Tc)));let ln=A===!0||C.navigation.formMethod!=null&&go(C.navigation.formMethod)&&((qe=se.state)==null?void 0:qe._isRedirect)!==!0;a&&(s=a,a=void 0),Y||I===In.Pop||(I===In.Push?e.history.push(se,se.state):I===In.Replace&&e.history.replace(se,se.state));let Lt;if(I===In.Pop){let mt=F.get(C.location.pathname);mt&&mt.has(se.pathname)?Lt={currentLocation:C.location,nextLocation:se}:F.has(se.pathname)&&(Lt={currentLocation:se,nextLocation:C.location})}else if($){let mt=F.get(C.location.pathname);mt?mt.add(se.pathname):(mt=new Set([se.pathname]),F.set(C.location.pathname,mt)),Lt={currentLocation:C.location,nextLocation:se}}We(xn({},ge,{actionData:Be,loaderData:ut,historyAction:I,location:se,initialized:!0,navigation:Jy,revalidation:"idle",restoreScrollPosition:Io(se,ge.matches||C.matches),preventScrollReset:ln,blockers:dt}),{viewTransitionOpts:Lt,flushSync:ct===!0}),I=In.Pop,A=!1,$=!1,Y=!1,J=!1,Z=[],pe=[]}async function gt(se,ge){if(typeof se=="number"){e.history.go(se);return}let we=Xb(C.location,C.matches,l,u.v7_prependBasename,se,u.v7_relativeSplatPath,ge==null?void 0:ge.fromRouteId,ge==null?void 0:ge.relative),{path:je,submission:qe,error:ct}=mC(u.v7_normalizeFormMethod,!1,we,ge),Fe=C.location,Be=Pf(C.location,je,ge&&ge.state);Be=xn({},Be,e.history.encodeLocation(Be));let ut=ge&&ge.replace!=null?ge.replace:void 0,dt=In.Push;ut===!0?dt=In.Replace:ut===!1||qe!=null&&go(qe.formMethod)&&qe.formAction===C.location.pathname+C.location.search&&(dt=In.Replace);let ln=ge&&"preventScrollReset"in ge?ge.preventScrollReset===!0:void 0,Lt=(ge&&ge.unstable_flushSync)===!0,mt=hr({currentLocation:Fe,nextLocation:Be,historyAction:dt});if(mt){bn(mt,{state:"blocked",location:Be,proceed(){bn(mt,{state:"proceeding",proceed:void 0,reset:void 0,location:Be}),gt(se,ge)},reset(){let jt=new Map(C.blockers);jt.set(mt,Tc),We({blockers:jt})}});return}return await fe(dt,Be,{submission:qe,pendingError:ct,preventScrollReset:ln,replace:ge&&ge.replace,enableViewTransition:ge&&ge.unstable_viewTransition,flushSync:Lt})}function ee(){if(de(),We({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){fe(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}fe(I||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation})}}async function fe(se,ge,we){j&&j.abort(),j=null,I=se,Y=(we&&we.startUninterruptedRevalidation)===!0,Kr(C.location,C.matches),A=(we&&we.preventScrollReset)===!0,$=(we&&we.enableViewTransition)===!0;let je=a||s,qe=we&&we.overrideNavigation,ct=qc(je,ge,l),Fe=(we&&we.flushSync)===!0;if(!ct){let mt=$i(404,{pathname:ge.pathname}),{matches:jt,route:Gt}=CC(je);Ue(),Ze(ge,{matches:jt,loaderData:{},errors:{[Gt.id]:mt}},{flushSync:Fe});return}if(C.initialized&&!J&&XA(C.location,ge)&&!(we&&we.submission&&go(we.submission.formMethod))){Ze(ge,{matches:ct},{flushSync:Fe});return}j=new AbortController;let Be=hc(e.history,ge,j.signal,we&&we.submission),ut;if(we&&we.pendingError)ut=[Kd(ct).route.id,{type:gn.error,error:we.pendingError}];else if(we&&we.submission&&go(we.submission.formMethod)){let mt=await _e(Be,ge,we.submission,ct,{replace:we.replace,flushSync:Fe});if(mt.shortCircuited)return;ut=mt.pendingActionResult,qe=Zy(ge,we.submission),Fe=!1,Be=hc(e.history,Be.url,Be.signal)}let{shortCircuited:dt,loaderData:ln,errors:Lt}=await ze(Be,ge,ct,qe,we&&we.submission,we&&we.fetcherSubmission,we&&we.replace,we&&we.initialHydration===!0,Fe,ut);dt||(j=null,Ze(ge,xn({matches:ct},_C(ut),{loaderData:ln,errors:Lt})))}async function _e(se,ge,we,je,qe){qe===void 0&&(qe={}),de();let ct=tD(ge,we);We({navigation:ct},{flushSync:qe.flushSync===!0});let Fe,Be=Zb(je,ge);if(!Be.route.action&&!Be.route.lazy)Fe={type:gn.error,error:$i(405,{method:se.method,pathname:ge.pathname,routeId:Be.route.id})};else if(Fe=(await K("action",se,[Be],je))[0],se.signal.aborted)return{shortCircuited:!0};if(bl(Fe)){let ut;return qe&&qe.replace!=null?ut=qe.replace:ut=bC(Fe.response.headers.get("Location"),new URL(se.url),l)===C.location.pathname+C.location.search,await D(se,Fe,{submission:we,replace:ut}),{shortCircuited:!0}}if(yl(Fe))throw $i(400,{type:"defer-action"});if(Fi(Fe)){let ut=Kd(je,Be.route.id);return(qe&&qe.replace)!==!0&&(I=In.Push),{pendingActionResult:[ut.route.id,Fe]}}return{pendingActionResult:[Be.route.id,Fe]}}async function ze(se,ge,we,je,qe,ct,Fe,Be,ut,dt){let ln=je||Zy(ge,qe),Lt=qe||ct||RC(ln),mt=a||s,[jt,Gt]=gC(e.history,C,we,Lt,ge,u.v7_partialHydration&&Be===!0,u.unstable_skipActionErrorRevalidation,J,Z,pe,He,Te,Ge,mt,l,dt);if(Ue(_t=>!(we&&we.some(nn=>nn.route.id===_t))||jt&&jt.some(nn=>nn.route.id===_t)),le=++V,jt.length===0&&Gt.length===0){let _t=Xe();return Ze(ge,xn({matches:we,loaderData:{},errors:dt&&Fi(dt[1])?{[dt[0]]:dt[1].error}:null},_C(dt),_t?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ut}),{shortCircuited:!0}}if(!Y&&(!u.v7_partialHydration||!Be)){Gt.forEach(nn=>{let ir=C.fetchers.get(nn.key),cn=hd(void 0,ir?ir.data:void 0);C.fetchers.set(nn.key,cn)});let _t;dt&&!Fi(dt[1])?_t={[dt[0]]:dt[1].data}:C.actionData&&(Object.keys(C.actionData).length===0?_t=null:_t=C.actionData),We(xn({navigation:ln},_t!==void 0?{actionData:_t}:{},Gt.length>0?{fetchers:new Map(C.fetchers)}:{}),{flushSync:ut})}Gt.forEach(_t=>{G.has(_t.key)&&xt(_t.key),_t.controller&&G.set(_t.key,_t.controller)});let Hn=()=>Gt.forEach(_t=>xt(_t.key));j&&j.signal.addEventListener("abort",Hn);let{loaderResults:Jn,fetcherResults:rr}=await Q(C.matches,we,jt,Gt,se);if(se.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",Hn),Gt.forEach(_t=>G.delete(_t.key));let Vn=kC([...Jn,...rr]);if(Vn){if(Vn.idx>=jt.length){let _t=Gt[Vn.idx-jt.length].key;Ge.add(_t)}return await D(se,Vn.result,{replace:Fe}),{shortCircuited:!0}}let{loaderData:li,errors:En}=xC(C,we,jt,Jn,dt,Gt,rr,Re);Re.forEach((_t,nn)=>{_t.subscribe(ir=>{(ir||_t.done)&&Re.delete(nn)})}),u.v7_partialHydration&&Be&&C.errors&&Object.entries(C.errors).filter(_t=>{let[nn]=_t;return!jt.some(ir=>ir.route.id===nn)}).forEach(_t=>{let[nn,ir]=_t;En=Object.assign(En||{},{[nn]:ir})});let St=Xe(),hn=yt(le),At=St||hn||Gt.length>0;return xn({loaderData:li,errors:En},At?{fetchers:new Map(C.fetchers)}:{})}function W(se,ge,we,je){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");G.has(se)&&xt(se);let qe=(je&&je.unstable_flushSync)===!0,ct=a||s,Fe=Xb(C.location,C.matches,l,u.v7_prependBasename,we,u.v7_relativeSplatPath,ge,je==null?void 0:je.relative),Be=qc(ct,Fe,l);if(!Be){rt(se,ge,$i(404,{pathname:Fe}),{flushSync:qe});return}let{path:ut,submission:dt,error:ln}=mC(u.v7_normalizeFormMethod,!0,Fe,je);if(ln){rt(se,ge,ln,{flushSync:qe});return}let Lt=Zb(Be,ut);if(A=(je&&je.preventScrollReset)===!0,dt&&go(dt.formMethod)){S(se,ge,ut,Lt,Be,qe,dt);return}Te.set(se,{routeId:ge,path:ut}),O(se,ge,ut,Lt,Be,qe,dt)}async function S(se,ge,we,je,qe,ct,Fe){if(de(),Te.delete(se),!je.route.action&&!je.route.lazy){let cn=$i(405,{method:Fe.formMethod,pathname:we,routeId:ge});rt(se,ge,cn,{flushSync:ct});return}let Be=C.fetchers.get(se);$e(se,nD(Fe,Be),{flushSync:ct});let ut=new AbortController,dt=hc(e.history,we,ut.signal,Fe);G.set(se,ut);let ln=V,mt=(await K("action",dt,[je],qe))[0];if(dt.signal.aborted){G.get(se)===ut&&G.delete(se);return}if(u.v7_fetcherPersist&&He.has(se)){if(bl(mt)||Fi(mt)){$e(se,ua(void 0));return}}else{if(bl(mt))if(G.delete(se),le>ln){$e(se,ua(void 0));return}else return Ge.add(se),$e(se,hd(Fe)),D(dt,mt,{fetcherSubmission:Fe});if(Fi(mt)){rt(se,ge,mt.error);return}}if(yl(mt))throw $i(400,{type:"defer-action"});let jt=C.navigation.location||C.location,Gt=hc(e.history,jt,ut.signal),Hn=a||s,Jn=C.navigation.state!=="idle"?qc(Hn,C.navigation.location,l):C.matches;Ct(Jn,"Didn't find any matches after fetcher action");let rr=++V;Le.set(se,rr);let Vn=hd(Fe,mt.data);C.fetchers.set(se,Vn);let[li,En]=gC(e.history,C,Jn,Fe,jt,!1,u.unstable_skipActionErrorRevalidation,J,Z,pe,He,Te,Ge,Hn,l,[je.route.id,mt]);En.filter(cn=>cn.key!==se).forEach(cn=>{let Li=cn.key,Qs=C.fetchers.get(Li),Xs=hd(void 0,Qs?Qs.data:void 0);C.fetchers.set(Li,Xs),G.has(Li)&&xt(Li),cn.controller&&G.set(Li,cn.controller)}),We({fetchers:new Map(C.fetchers)});let St=()=>En.forEach(cn=>xt(cn.key));ut.signal.addEventListener("abort",St);let{loaderResults:hn,fetcherResults:At}=await Q(C.matches,Jn,li,En,Gt);if(ut.signal.aborted)return;ut.signal.removeEventListener("abort",St),Le.delete(se),G.delete(se),En.forEach(cn=>G.delete(cn.key));let _t=kC([...hn,...At]);if(_t){if(_t.idx>=li.length){let cn=En[_t.idx-li.length].key;Ge.add(cn)}return D(Gt,_t.result)}let{loaderData:nn,errors:ir}=xC(C,C.matches,li,hn,void 0,En,At,Re);if(C.fetchers.has(se)){let cn=ua(mt.data);C.fetchers.set(se,cn)}yt(rr),C.navigation.state==="loading"&&rr>le?(Ct(I,"Expected pending action"),j&&j.abort(),Ze(C.navigation.location,{matches:Jn,loaderData:nn,errors:ir,fetchers:new Map(C.fetchers)})):(We({errors:ir,loaderData:SC(C.loaderData,nn,Jn,ir),fetchers:new Map(C.fetchers)}),J=!1)}async function O(se,ge,we,je,qe,ct,Fe){let Be=C.fetchers.get(se);$e(se,hd(Fe,Be?Be.data:void 0),{flushSync:ct});let ut=new AbortController,dt=hc(e.history,we,ut.signal);G.set(se,ut);let ln=V,mt=(await K("loader",dt,[je],qe))[0];if(yl(mt)&&(mt=await fT(mt,dt.signal,!0)||mt),G.get(se)===ut&&G.delete(se),!dt.signal.aborted){if(He.has(se)){$e(se,ua(void 0));return}if(bl(mt))if(le>ln){$e(se,ua(void 0));return}else{Ge.add(se),await D(dt,mt);return}if(Fi(mt)){rt(se,ge,mt.error);return}Ct(!yl(mt),"Unhandled fetcher deferred data"),$e(se,ua(mt.data))}}async function D(se,ge,we){let{submission:je,fetcherSubmission:qe,replace:ct}=we===void 0?{}:we;ge.response.headers.has("X-Remix-Revalidate")&&(J=!0);let Fe=ge.response.headers.get("Location");Ct(Fe,"Expected a Location header on the redirect Response"),Fe=bC(Fe,new URL(se.url),l);let Be=Pf(C.location,Fe,{_isRedirect:!0});if(n){let jt=!1;if(ge.response.headers.has("X-Remix-Reload-Document"))jt=!0;else if(Jw.test(Fe)){const Gt=e.history.createURL(Fe);jt=Gt.origin!==t.location.origin||ko(Gt.pathname,l)==null}if(jt){ct?t.location.replace(Fe):t.location.assign(Fe);return}}j=null;let ut=ct===!0?In.Replace:In.Push,{formMethod:dt,formAction:ln,formEncType:Lt}=C.navigation;!je&&!qe&&dt&&ln&&Lt&&(je=RC(C.navigation));let mt=je||qe;if(DA.has(ge.response.status)&&mt&&go(mt.formMethod))await fe(ut,Be,{submission:xn({},mt,{formAction:Fe}),preventScrollReset:A});else{let jt=Zy(Be,je);await fe(ut,Be,{overrideNavigation:jt,fetcherSubmission:qe,preventScrollReset:A})}}async function K(se,ge,we,je){try{let qe=await VA(c,se,ge,we,je,o,i);return await Promise.all(qe.map((ct,Fe)=>{if(JA(ct)){let Be=ct.result;return{type:gn.redirect,response:YA(Be,ge,we[Fe].route.id,je,l,u.v7_relativeSplatPath)}}return qA(ct)}))}catch(qe){return we.map(()=>({type:gn.error,error:qe}))}}async function Q(se,ge,we,je,qe){let[ct,...Fe]=await Promise.all([we.length?K("loader",qe,we,ge):[],...je.map(Be=>{if(Be.matches&&Be.match&&Be.controller){let ut=hc(e.history,Be.path,Be.controller.signal);return K("loader",ut,[Be.match],Be.matches).then(dt=>dt[0])}else return Promise.resolve({type:gn.error,error:$i(404,{pathname:Be.path})})})]);return await Promise.all([EC(se,we,ct,ct.map(()=>qe.signal),!1,C.loaderData),EC(se,je.map(Be=>Be.match),Fe,je.map(Be=>Be.controller?Be.controller.signal:null),!0)]),{loaderResults:ct,fetcherResults:Fe}}function de(){J=!0,Z.push(...Ue()),Te.forEach((se,ge)=>{G.has(ge)&&(pe.push(ge),xt(ge))})}function $e(se,ge,we){we===void 0&&(we={}),C.fetchers.set(se,ge),We({fetchers:new Map(C.fetchers)},{flushSync:(we&&we.flushSync)===!0})}function rt(se,ge,we,je){je===void 0&&(je={});let qe=Kd(C.matches,ge);Oe(se),We({errors:{[qe.route.id]:we},fetchers:new Map(C.fetchers)},{flushSync:(je&&je.flushSync)===!0})}function Je(se){return u.v7_fetcherPersist&&(Ce.set(se,(Ce.get(se)||0)+1),He.has(se)&&He.delete(se)),C.fetchers.get(se)||BA}function Oe(se){let ge=C.fetchers.get(se);G.has(se)&&!(ge&&ge.state==="loading"&&Le.has(se))&&xt(se),Te.delete(se),Le.delete(se),Ge.delete(se),He.delete(se),C.fetchers.delete(se)}function tt(se){if(u.v7_fetcherPersist){let ge=(Ce.get(se)||0)-1;ge<=0?(Ce.delete(se),He.add(se)):Ce.set(se,ge)}else Oe(se);We({fetchers:new Map(C.fetchers)})}function xt(se){let ge=G.get(se);Ct(ge,"Expected fetch controller: "+se),ge.abort(),G.delete(se)}function Ht(se){for(let ge of se){let we=Je(ge),je=ua(we.data);C.fetchers.set(ge,je)}}function Xe(){let se=[],ge=!1;for(let we of Ge){let je=C.fetchers.get(we);Ct(je,"Expected fetcher: "+we),je.state==="loading"&&(Ge.delete(we),se.push(we),ge=!0)}return Ht(se),ge}function yt(se){let ge=[];for(let[we,je]of Le)if(je0}function Ne(se,ge){let we=C.blockers.get(se)||Tc;return et.get(se)!==ge&&et.set(se,ge),we}function Vt(se){C.blockers.delete(se),et.delete(se)}function bn(se,ge){let we=C.blockers.get(se)||Tc;Ct(we.state==="unblocked"&&ge.state==="blocked"||we.state==="blocked"&&ge.state==="blocked"||we.state==="blocked"&&ge.state==="proceeding"||we.state==="blocked"&&ge.state==="unblocked"||we.state==="proceeding"&&ge.state==="unblocked","Invalid blocker state transition: "+we.state+" -> "+ge.state);let je=new Map(C.blockers);je.set(se,ge),We({blockers:je})}function hr(se){let{currentLocation:ge,nextLocation:we,historyAction:je}=se;if(et.size===0)return;et.size>1&&Nl(!1,"A router only supports one blocker at a time");let qe=Array.from(et.entries()),[ct,Fe]=qe[qe.length-1],Be=C.blockers.get(ct);if(!(Be&&Be.state==="proceeding")&&Fe({currentLocation:ge,nextLocation:we,historyAction:je}))return ct}function Ue(se){let ge=[];return Re.forEach((we,je)=>{(!se||se(je))&&(we.cancel(),ge.push(je),Re.delete(je))}),ge}function oo(se,ge,we){if(m=se,g=ge,h=we||null,!E&&C.navigation===Jy){E=!0;let je=Io(C.location,C.matches);je!=null&&We({restoreScrollPosition:je})}return()=>{m=null,g=null,h=null}}function so(se,ge){return h&&h(se,ge.map(je=>gA(je,C.loaderData)))||se.key}function Kr(se,ge){if(m&&g){let we=so(se,ge);m[we]=g()}}function Io(se,ge){if(m){let we=so(se,ge),je=m[we];if(typeof je=="number")return je}return null}function Mo(se){o={},a=Yb(se,i,void 0,o)}return T={get basename(){return l},get future(){return u},get state(){return C},get routes(){return s},get window(){return t},initialize:Pe,subscribe:at,enableScrollRestoration:oo,navigate:gt,fetch:W,revalidate:ee,createHref:se=>e.history.createHref(se),encodeLocation:se=>e.history.encodeLocation(se),getFetcher:Je,deleteFetcher:tt,dispose:Rt,getBlocker:Ne,deleteBlocker:Vt,_internalFetchControllers:G,_internalActiveDeferreds:Re,_internalSetRoutes:Mo},T}function UA(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Xb(e,t,n,r,i,o,s,a){let l,c;if(s){l=[];for(let d of t)if(l.push(d),d.route.id===s){c=d;break}}else l=t,c=t[t.length-1];let u=Dg(i||".",Ag(l,o),ko(e.pathname,n)||e.pathname,a==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!Zw(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Es([n,u.pathname])),Al(u)}function mC(e,t,n,r){if(!r||!UA(r))return{path:n};if(r.formMethod&&!eD(r.formMethod))return{path:n,error:$i(405,{method:r.formMethod})};let i=()=>({path:n,error:$i(400,{type:"invalid-body"})}),o=r.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),a=uT(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!go(s))return i();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,h)=>{let[g,E]=h;return""+m+g+"="+E+` +`},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!go(s))return i();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return i()}}}Ct(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=Jb(r.formData),c=r.formData;else if(r.body instanceof FormData)l=Jb(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=wC(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=wC(l)}catch{return i()}let u={formMethod:s,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(go(u.formMethod))return{path:n,submission:u};let d=is(n);return t&&d.search&&Zw(d.search)&&l.append("index",""),d.search="?"+l,{path:Al(d),submission:u}}function WA(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function gC(e,t,n,r,i,o,s,a,l,c,u,d,f,m,h,g){let E=g?Fi(g[1])?g[1].error:g[1].data:void 0,b=e.createURL(t.location),w=e.createURL(i),y=g&&Fi(g[1])?g[0]:void 0,_=y?WA(n,y):n,R=g?g[1].statusCode:void 0,T=s&&R&&R>=400,C=_.filter((A,j)=>{let{route:$}=A;if($.lazy)return!0;if($.loader==null)return!1;if(o)return typeof $.loader!="function"||$.loader.hydrate?!0:t.loaderData[$.id]===void 0&&(!t.errors||t.errors[$.id]===void 0);if(GA(t.loaderData,t.matches[j],A)||l.some(Y=>Y===A.route.id))return!0;let F=t.matches[j],z=A;return vC(A,xn({currentUrl:b,currentParams:F.params,nextUrl:w,nextParams:z.params},r,{actionResult:E,unstable_actionStatus:R,defaultShouldRevalidate:T?!1:a||b.pathname+b.search===w.pathname+w.search||b.search!==w.search||cT(F,z)}))}),I=[];return d.forEach((A,j)=>{if(o||!n.some(J=>J.route.id===A.routeId)||u.has(j))return;let $=qc(m,A.path,h);if(!$){I.push({key:j,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let F=t.fetchers.get(j),z=Zb($,A.path),Y=!1;f.has(j)?Y=!1:c.includes(j)?Y=!0:F&&F.state!=="idle"&&F.data===void 0?Y=a:Y=vC(z,xn({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:n[n.length-1].params},r,{actionResult:E,unstable_actionStatus:R,defaultShouldRevalidate:T?!1:a})),Y&&I.push({key:j,routeId:A.routeId,path:A.path,matches:$,match:z,controller:new AbortController})}),[C,I]}function GA(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function cT(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function vC(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function yC(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Ct(i,"No route found in manifest");let o={};for(let s in r){let l=i[s]!==void 0&&s!=="hasErrorBoundary";Nl(!l,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!hA.has(s)&&(o[s]=r[s])}Object.assign(i,o),Object.assign(i,xn({},t(i),{lazy:void 0}))}function HA(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function VA(e,t,n,r,i,o,s,a){let l=r.reduce((d,f)=>d.add(f.route.id),new Set),c=new Set,u=await e({matches:i.map(d=>{let f=l.has(d.route.id);return xn({},d,{shouldLoad:f,resolve:h=>(c.add(d.route.id),f?KA(t,n,d,o,s,h,a):Promise.resolve({type:gn.data,result:void 0}))})}),request:n,params:i[0].params,context:a});return i.forEach(d=>Ct(c.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),u.filter((d,f)=>l.has(i[f].route.id))}async function KA(e,t,n,r,i,o,s){let a,l,c=u=>{let d,f=new Promise((g,E)=>d=E);l=()=>d(),t.signal.addEventListener("abort",l);let m=g=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):u({request:t,params:n.params,context:s},...g!==void 0?[g]:[]),h;return o?h=o(g=>m(g)):h=(async()=>{try{return{type:"data",result:await m()}}catch(g){return{type:"error",result:g}}})(),Promise.race([h,f])};try{let u=n.route[e];if(n.route.lazy)if(u){let d,[f]=await Promise.all([c(u).catch(m=>{d=m}),yC(n.route,i,r)]);if(d!==void 0)throw d;a=f}else if(await yC(n.route,i,r),u=n.route[e],u)a=await c(u);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw $i(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:gn.data,result:void 0};else if(u)a=await c(u);else{let d=new URL(t.url),f=d.pathname+d.search;throw $i(404,{pathname:f})}Ct(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:gn.error,result:u}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function qA(e){let{result:t,type:n,status:r}=e;if(dT(t)){let s;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(a){return{type:gn.error,error:a}}return n===gn.error?{type:gn.error,error:new Qw(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:gn.data,data:s,statusCode:t.status,headers:t.headers}}if(n===gn.error)return{type:gn.error,error:t,statusCode:Xw(t)?t.status:r};if(ZA(t)){var i,o;return{type:gn.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:gn.data,data:t,statusCode:r}}function YA(e,t,n,r,i,o){let s=e.headers.get("Location");if(Ct(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Jw.test(s)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=Xb(new URL(t.url),a,i,!0,s,o),e.headers.set("Location",s)}return e}function bC(e,t,n){if(Jw.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=ko(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function hc(e,t,n,r){let i=e.createURL(uT(t)).toString(),o={signal:n};if(r&&go(r.formMethod)){let{formMethod:s,formEncType:a}=r;o.method=s.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=Jb(r.formData):o.body=r.formData}return new Request(i,o)}function Jb(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function wC(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function QA(e,t,n,r,i,o){let s={},a=null,l,c=!1,u={},d=r&&Fi(r[1])?r[1].error:void 0;return n.forEach((f,m)=>{let h=t[m].route.id;if(Ct(!bl(f),"Cannot handle redirect results in processLoaderData"),Fi(f)){let g=f.error;if(d!==void 0&&(g=d,d=void 0),a=a||{},o)a[h]=g;else{let E=Kd(e,h);a[E.route.id]==null&&(a[E.route.id]=g)}s[h]=void 0,c||(c=!0,l=Xw(f.error)?f.error.status:500),f.headers&&(u[h]=f.headers)}else yl(f)?(i.set(h,f.deferredData),s[h]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!c&&(l=f.statusCode),f.headers&&(u[h]=f.headers)):(s[h]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(l=f.statusCode),f.headers&&(u[h]=f.headers))}),d!==void 0&&r&&(a={[r[0]]:d},s[r[0]]=void 0),{loaderData:s,errors:a,statusCode:l||200,loaderHeaders:u}}function xC(e,t,n,r,i,o,s,a){let{loaderData:l,errors:c}=QA(t,n,r,i,a,!1);for(let u=0;ur.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function CC(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function $i(e,t){let{pathname:n,routeId:r,method:i,type:o}=t===void 0?{}:t,s="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?a="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):e===403?(s="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",a='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?a="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(a='Invalid request method "'+i.toUpperCase()+'"')),new Qw(e||500,s,new Error(a),!0)}function kC(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(bl(n))return{result:n,idx:t}}}function uT(e){let t=typeof e=="string"?is(e):e;return Al(xn({},t,{hash:""}))}function XA(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function JA(e){return dT(e.result)&&AA.has(e.result.status)}function yl(e){return e.type===gn.deferred}function Fi(e){return e.type===gn.error}function bl(e){return(e&&e.type)===gn.redirect}function ZA(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function dT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function eD(e){return NA.has(e.toLowerCase())}function go(e){return MA.has(e.toLowerCase())}async function EC(e,t,n,r,i,o){for(let s=0;sd.route.id===l.route.id),u=c!=null&&!cT(c,l)&&(o&&o[l.route.id])!==void 0;if(yl(a)&&(i||u)){let d=r[s];Ct(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await fT(a,d,i).then(f=>{f&&(n[s]=f||n[s])})}}}async function fT(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:gn.data,data:e.deferredData.unwrappedData}}catch(i){return{type:gn.error,error:i}}return{type:gn.data,data:e.deferredData.data}}}function Zw(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Zb(e,t){let n=typeof t=="string"?is(t).search:t.search;if(e[e.length-1].route.index&&Zw(n||""))return e[e.length-1];let r=sT(e);return r[r.length-1]}function RC(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:s}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Zy(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function tD(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function hd(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function nD(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ua(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function rD(e,t){try{let n=e.sessionStorage.getItem(lT);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function iD(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(lT,JSON.stringify(n))}catch(r){Nl(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * React Router v6.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Dl(){return Dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),k.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=Dg(c,JSON.parse(s),o,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Es([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,s,o,e])}const mT=k.createContext(null);function tp(){return k.useContext(mT)}function aD(e){let t=k.useContext(os).outlet;return t&&k.createElement(mT.Provider,{value:e},t)}function lD(){let{matches:e}=k.useContext(os),t=e[e.length-1];return t?t.params:{}}function Fg(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=k.useContext(Ws),{matches:i}=k.useContext(os),{pathname:o}=Gs(),s=JSON.stringify(Ag(i,r.v7_relativeSplatPath));return k.useMemo(()=>Dg(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function cD(e,t,n,r){Du()||Ct(!1);let{navigator:i}=k.useContext(Ws),{matches:o}=k.useContext(os),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=Gs(),u;if(t){var d;let E=typeof t=="string"?is(t):t;l==="/"||(d=E.pathname)!=null&&d.startsWith(l)||Ct(!1),u=E}else u=c;let f=u.pathname||"/",m=f;if(l!=="/"){let E=l.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(E.length).join("/")}let h=qc(e,{pathname:m}),g=hD(h&&h.map(E=>Object.assign({},E,{params:Object.assign({},a,E.params),pathname:Es([l,i.encodeLocation?i.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?l:Es([l,i.encodeLocation?i.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),o,n,r);return t&&g?k.createElement(Bg.Provider,{value:{location:Dl({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:In.Pop}},g):g}function uD(){let e=gD(),t=Xw(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:i},n):null,null)}const dD=k.createElement(uD,null);class fD extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?k.createElement(os.Provider,{value:this.props.routeContext},k.createElement(pT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pD(e){let{routeContext:t,match:n,children:r}=e,i=k.useContext(ep);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(os.Provider,{value:t},r)}function hD(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||Ct(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,f)=>{let m,h=!1,g=null,E=null;n&&(m=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||dD,l&&(c<0&&f===0?(wD("route-fallback",!1),h=!0,E=null):c===f&&(h=!0,E=d.route.hydrateFallbackElement||null)));let b=t.concat(s.slice(0,f+1)),w=()=>{let y;return m?y=g:h?y=E:d.route.Component?y=k.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=u,k.createElement(pD,{match:d,routeContext:{outlet:u,matches:b,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?k.createElement(fD,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var tx=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(tx||{}),Tf=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Tf||{});function gT(e){let t=k.useContext(ep);return t||Ct(!1),t}function vT(e){let t=k.useContext(ex);return t||Ct(!1),t}function mD(e){let t=k.useContext(os);return t||Ct(!1),t}function yT(e){let t=mD(),n=t.matches[t.matches.length-1];return n.route.id||Ct(!1),n.route.id}function gD(){var e;let t=k.useContext(pT),n=vT(Tf.UseRouteError),r=yT(Tf.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}let vD=0;function yD(e){let{router:t,basename:n}=gT(tx.UseBlocker),r=vT(Tf.UseBlocker),[i,o]=k.useState(""),s=k.useCallback(a=>{if(typeof e!="function")return!!e;if(n==="/")return e(a);let{currentLocation:l,nextLocation:c,historyAction:u}=a;return e({currentLocation:Dl({},l,{pathname:ko(l.pathname,n)||l.pathname}),nextLocation:Dl({},c,{pathname:ko(c.pathname,n)||c.pathname}),historyAction:u})},[n,e]);return k.useEffect(()=>{let a=String(++vD);return o(a),()=>t.deleteBlocker(a)},[t]),k.useEffect(()=>{i!==""&&t.getBlocker(i,s)},[t,i,s]),i&&r.blockers.has(i)?r.blockers.get(i):Tc}function bD(){let{router:e}=gT(tx.UseNavigateStable),t=yT(Tf.UseNavigateStable),n=k.useRef(!1);return hT(()=>{n.current=!0}),k.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Dl({fromRouteId:t},o)))},[e,t])}const PC={};function wD(e,t,n){!t&&!PC[e]&&(PC[e]=!0)}function xD(e){let{to:t,replace:n,state:r,relative:i}=e;Du()||Ct(!1);let{future:o,static:s}=k.useContext(Ws),{matches:a}=k.useContext(os),{pathname:l}=Gs(),c=Ha(),u=Dg(t,Ag(a,o.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(u);return k.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:i}),[c,d,i,n,r]),null}function nx(e){return aD(e.context)}function Qr(e){Ct(!1)}function SD(e){let{basename:t="/",children:n=null,location:r,navigationType:i=In.Pop,navigator:o,static:s=!1,future:a}=e;Du()&&Ct(!1);let l=t.replace(/^\/*/,"/"),c=k.useMemo(()=>({basename:l,navigator:o,static:s,future:Dl({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=is(r));let{pathname:u="/",search:d="",hash:f="",state:m=null,key:h="default"}=r,g=k.useMemo(()=>{let E=ko(u,l);return E==null?null:{location:{pathname:E,search:d,hash:f,state:m,key:h},navigationType:i}},[l,u,d,f,m,h,i]);return g==null?null:k.createElement(Ws.Provider,{value:c},k.createElement(Bg.Provider,{children:n,value:g}))}new Promise(()=>{});function e1(e,t){t===void 0&&(t=[]);let n=[];return k.Children.forEach(e,(r,i)=>{if(!k.isValidElement(r))return;let o=[...t,i];if(r.type===k.Fragment){n.push.apply(n,e1(r.props.children,o));return}r.type!==Qr&&Ct(!1),!r.props.index||!r.props.children||Ct(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=e1(r.props.children,o)),n.push(s)}),n}function _D(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:k.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:k.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:k.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function yu(){return yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function CD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kD(e,t){return e.button===0&&(!t||t==="_self")&&!CD(e)}function t1(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function ED(e,t){let n=t1(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const RD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],PD=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],TD="6";try{window.__reactRouterVersion=TD}catch{}function OD(e,t){return zA({basename:t==null?void 0:t.basename,future:yu({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:dA({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||LD(),routes:e,mapRouteProperties:_D,unstable_dataStrategy:t==null?void 0:t.unstable_dataStrategy,window:t==null?void 0:t.window}).initialize()}function LD(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=yu({},t,{errors:jD(t.errors)})),t}function jD(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Qw(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let s=new o(i.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const wT=k.createContext({isTransitioning:!1}),ID=k.createContext(new Map),MD="startTransition",TC=sm[MD],$D="flushSync",OC=uA[$D];function ND(e){TC?TC(e):e()}function md(e){OC?OC(e):e()}class AD{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function DD(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=k.useState(n.state),[s,a]=k.useState(),[l,c]=k.useState({isTransitioning:!1}),[u,d]=k.useState(),[f,m]=k.useState(),[h,g]=k.useState(),E=k.useRef(new Map),{v7_startTransition:b}=r||{},w=k.useCallback(C=>{b?ND(C):C()},[b]),y=k.useCallback((C,I)=>{let{deletedFetchers:A,unstable_flushSync:j,unstable_viewTransitionOpts:$}=I;A.forEach(z=>E.current.delete(z)),C.fetchers.forEach((z,Y)=>{z.data!==void 0&&E.current.set(Y,z.data)});let F=n.window==null||typeof n.window.document.startViewTransition!="function";if(!$||F){j?md(()=>o(C)):w(()=>o(C));return}if(j){md(()=>{f&&(u&&u.resolve(),f.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:$.currentLocation,nextLocation:$.nextLocation})});let z=n.window.document.startViewTransition(()=>{md(()=>o(C))});z.finished.finally(()=>{md(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})})}),md(()=>m(z));return}f?(u&&u.resolve(),f.skipTransition(),g({state:C,currentLocation:$.currentLocation,nextLocation:$.nextLocation})):(a(C),c({isTransitioning:!0,flushSync:!1,currentLocation:$.currentLocation,nextLocation:$.nextLocation}))},[n.window,f,u,E,w]);k.useLayoutEffect(()=>n.subscribe(y),[n,y]),k.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new AD)},[l]),k.useEffect(()=>{if(u&&s&&n.window){let C=s,I=u.promise,A=n.window.document.startViewTransition(async()=>{w(()=>o(C)),await I});A.finished.finally(()=>{d(void 0),m(void 0),a(void 0),c({isTransitioning:!1})}),m(A)}},[w,s,u,n.window]),k.useEffect(()=>{u&&s&&i.location.key===s.location.key&&u.resolve()},[u,f,i.location,s]),k.useEffect(()=>{!l.isTransitioning&&h&&(a(h.state),c({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),g(void 0))},[l.isTransitioning,h]),k.useEffect(()=>{},[]);let _=k.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:C=>n.navigate(C),push:(C,I,A)=>n.navigate(C,{state:I,preventScrollReset:A==null?void 0:A.preventScrollReset}),replace:(C,I,A)=>n.navigate(C,{replace:!0,state:I,preventScrollReset:A==null?void 0:A.preventScrollReset})}),[n]),R=n.basename||"/",T=k.useMemo(()=>({router:n,navigator:_,static:!1,basename:R}),[n,_,R]);return k.createElement(k.Fragment,null,k.createElement(ep.Provider,{value:T},k.createElement(ex.Provider,{value:i},k.createElement(ID.Provider,{value:E.current},k.createElement(wT.Provider,{value:l},k.createElement(SD,{basename:R,location:i.location,navigationType:i.historyAction,navigator:_,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?k.createElement(BD,{routes:n.routes,future:n.future,state:i}):t))))),null)}function BD(e){let{routes:t,future:n,state:r}=e;return cD(t,void 0,r,n)}const FD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",zD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xT=k.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,unstable_viewTransition:d}=t,f=bT(t,RD),{basename:m}=k.useContext(Ws),h,g=!1;if(typeof c=="string"&&zD.test(c)&&(h=c,FD))try{let y=new URL(window.location.href),_=c.startsWith("//")?new URL(y.protocol+c):new URL(c),R=ko(_.pathname,m);_.origin===y.origin&&R!=null?c=R+_.search+_.hash:g=!0}catch{}let E=oD(c,{relative:i}),b=GD(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,unstable_viewTransition:d});function w(y){r&&r(y),y.defaultPrevented||b(y)}return k.createElement("a",yu({},f,{href:h||E,onClick:g||o?r:w,ref:n,target:l}))}),UD=k.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,unstable_viewTransition:c,children:u}=t,d=bT(t,PD),f=Fg(l,{relative:d.relative}),m=Gs(),h=k.useContext(ex),{navigator:g,basename:E}=k.useContext(Ws),b=h!=null&&VD(f)&&c===!0,w=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,y=m.pathname,_=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;i||(y=y.toLowerCase(),_=_?_.toLowerCase():null,w=w.toLowerCase()),_&&E&&(_=ko(_,E)||_);const R=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let T=y===w||!s&&y.startsWith(w)&&y.charAt(R)==="/",C=_!=null&&(_===w||!s&&_.startsWith(w)&&_.charAt(w.length)==="/"),I={isActive:T,isPending:C,isTransitioning:b},A=T?r:void 0,j;typeof o=="function"?j=o(I):j=[o,T?"active":null,C?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let $=typeof a=="function"?a(I):a;return k.createElement(xT,yu({},d,{"aria-current":A,className:j,ref:n,style:$,to:l,unstable_viewTransition:c}),typeof u=="function"?u(I):u)});var n1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(n1||(n1={}));var LC;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(LC||(LC={}));function WD(e){let t=k.useContext(ep);return t||Ct(!1),t}function GD(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=t===void 0?{}:t,l=Ha(),c=Gs(),u=Fg(e,{relative:s});return k.useCallback(d=>{if(kD(d,n)){d.preventDefault();let f=r!==void 0?r:Al(c)===Al(u);l(e,{replace:f,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[c,l,u,r,i,n,e,o,s,a])}function HD(e){let t=k.useRef(t1(e)),n=k.useRef(!1),r=Gs(),i=k.useMemo(()=>ED(r.search,n.current?null:t.current),[r.search]),o=Ha(),s=k.useCallback((a,l)=>{const c=t1(typeof a=="function"?a(i):a);n.current=!0,o("?"+c,l)},[o,i]);return[i,s]}function VD(e,t){t===void 0&&(t={});let n=k.useContext(wT);n==null&&Ct(!1);let{basename:r}=WD(n1.useViewTransitionState),i=Fg(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=ko(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=ko(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Qb(i.pathname,s)!=null||Qb(i.pathname,o)!=null}function Ie(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r[i]=e[i].reduce((o,s)=>{if(s){const a=t(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}function Bl(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n=0)continue;i[o]=n[o]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(t0)),t0.exports}function kT(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var QD=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,XD=kT(function(e){return QD.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});const ET=globalThis||void 0||self;function JD(e){if(e.sheet)return e.sheet;for(var t=0;t0?lr(Bu,--ii):0,bu--,Un===10&&(bu=1,Ug--),Un}function xi(){return Un=ii2||Lf(Un)>3?"":" "}function dB(e,t){for(;--t&&xi()&&!(Un<48||Un>102||Un>57&&Un<65||Un>70&&Un<97););return rp(e,Wh()+(t<6&&Jo()==32&&xi()==32))}function i1(e){for(;xi();)switch(Un){case e:return ii;case 34:case 39:e!==34&&e!==39&&i1(Un);break;case 40:e===41&&i1(e);break;case 92:xi();break}return ii}function fB(e,t){for(;xi()&&e+Un!==57;)if(e+Un===84&&Jo()===47)break;return"/*"+rp(t,ii-1)+"*"+zg(e===47?e:xi())}function pB(e){for(;!Lf(Jo());)xi();return rp(e,ii)}function hB(e){return jT(Hh("",null,null,null,[""],e=LT(e),0,[0],e))}function Hh(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,d=s,f=0,m=0,h=0,g=1,E=1,b=1,w=0,y="",_=i,R=o,T=r,C=y;E;)switch(h=w,w=xi()){case 40:if(h!=108&&lr(C,d-1)==58){r1(C+=Ut(Gh(w),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:C+=Gh(w);break;case 9:case 10:case 13:case 32:C+=uB(h);break;case 92:C+=dB(Wh()-1,7);continue;case 47:switch(Jo()){case 42:case 47:ah(mB(fB(xi(),Wh()),t,n),l);break;default:C+="/"}break;case 123*g:a[c++]=Uo(C)*b;case 125*g:case 59:case 0:switch(w){case 0:case 125:E=0;case 59+u:b==-1&&(C=Ut(C,/\f/g,"")),m>0&&Uo(C)-d&&ah(m>32?$C(C+";",r,n,d-1):$C(Ut(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(ah(T=MC(C,t,n,c,u,i,a,y,_=[],R=[],d),o),w===123)if(u===0)Hh(C,t,T,T,_,o,d,a,R);else switch(f===99&&lr(C,3)===110?100:f){case 100:case 108:case 109:case 115:Hh(e,T,T,r&&ah(MC(e,T,T,0,0,i,a,y,i,_=[],d),R),i,R,d,a,r?_:R);break;default:Hh(C,T,T,T,[""],R,0,a,R)}}c=u=m=0,g=b=1,y=C="",d=s;break;case 58:d=1+Uo(C),m=h;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&cB()==125)continue}switch(C+=zg(w),w*g){case 38:b=u>0?1:(C+="\f",-1);break;case 44:a[c++]=(Uo(C)-1)*b,b=1;break;case 64:Jo()===45&&(C+=Gh(xi())),f=Jo(),u=d=Uo(y=C+=pB(Wh())),w++;break;case 45:h===45&&Uo(C)==2&&(g=0)}}return o}function MC(e,t,n,r,i,o,s,a,l,c,u){for(var d=i-1,f=i===0?o:[""],m=ox(f),h=0,g=0,E=0;h0?f[b]+" "+w:Ut(w,/&\f/g,f[b])))&&(l[E++]=y);return Wg(e,t,n,i===0?rx:a,l,c,u)}function mB(e,t,n){return Wg(e,t,n,RT,zg(lB()),Of(e,2,-2),0)}function $C(e,t,n,r){return Wg(e,t,n,ix,Of(e,0,r),Of(e,r+1,-1),r)}function iu(e,t){for(var n="",r=ox(e),i=0;i6)switch(lr(e,t+1)){case 109:if(lr(e,t+4)!==45)break;case 102:return Ut(e,/(.+:)(.+)-([^]+)/,"$1"+zt+"$2-$3$1"+Lm+(lr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~r1(e,"stretch")?IT(Ut(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(lr(e,t+1)!==115)break;case 6444:switch(lr(e,Uo(e)-3-(~r1(e,"!important")&&10))){case 107:return Ut(e,":",":"+zt)+e;case 101:return Ut(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+zt+(lr(e,14)===45?"inline-":"")+"box$3$1"+zt+"$2$3$1"+_r+"$2box$3")+e}break;case 5936:switch(lr(e,t+11)){case 114:return zt+e+_r+Ut(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return zt+e+_r+Ut(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return zt+e+_r+Ut(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return zt+e+_r+e+e}return e}var CB=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case ix:t.return=IT(t.value,t.length);break;case PT:return iu([gd(t,{value:Ut(t.value,"@","@"+zt)})],i);case rx:if(t.length)return aB(t.props,function(o){switch(sB(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return iu([gd(t,{props:[Ut(o,/:(read-\w+)/,":"+Lm+"$1")]})],i);case"::placeholder":return iu([gd(t,{props:[Ut(o,/:(plac\w+)/,":"+zt+"input-$1")]}),gd(t,{props:[Ut(o,/:(plac\w+)/,":"+Lm+"$1")]}),gd(t,{props:[Ut(o,/:(plac\w+)/,_r+"input-$1")]})],i)}return""})}},kB=[CB],MT=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var E=g.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||kB,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var E=g.getAttribute("data-emotion").split(" "),b=1;b=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var AB={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},DB=/[A-Z]|^ms/g,BB=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zT=function(t){return t.charCodeAt(1)===45},AC=function(t){return t!=null&&typeof t!="boolean"},n0=kT(function(e){return zT(e)?e:e.replace(DB,"-$&").toLowerCase()}),DC=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(BB,function(r,i,o){return Wo={name:i,styles:o,next:Wo},i})}return AB[t]!==1&&!zT(t)&&typeof n=="number"&&n!==0?n+"px":n};function jf(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Wo={name:n.name,styles:n.styles,next:Wo},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Wo={name:r.name,styles:r.styles,next:Wo},r=r.next;var i=n.styles+";";return i}return FB(e,t,n)}case"function":{if(e!==void 0){var o=Wo,s=n(e);return Wo=o,jf(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function FB(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?HB:VB},UC=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},KB=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return BT(n,r,i),UB(function(){return FT(n,r,i)}),null},qB=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var a=UC(t,n,r),l=a||zC(i),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,m=1;mt(XB(i)?n:i):t;return v.jsx(GB,{styles:r})}function ux(e,t){return o1(e,t)}const KT=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},JB=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:VT,StyledEngineProvider:QB,ThemeContext:ip,css:HT,default:ux,internal_processStyles:KT,keyframes:ev},Symbol.toStringTag,{value:"Module"})),qT=zs(JB);function ys(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function YT(e){if(!ys(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=YT(e[n])}),t}function Ur(e,t,n={clone:!0}){const r=n.clone?N({},e):e;return ys(e)&&ys(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(ys(t[i])&&i in e&&ys(e[i])?r[i]=Ur(e[i],t[i],n):n.clone?r[i]=ys(t[i])?YT(t[i]):t[i]:r[i]=t[i])}),r}const ZB=Object.freeze(Object.defineProperty({__proto__:null,default:Ur,isPlainObject:ys},Symbol.toStringTag,{value:"Module"})),e5=zs(ZB),t5=zs(qD);var QT={exports:{}},Xt={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var dx=Symbol.for("react.element"),fx=Symbol.for("react.portal"),tv=Symbol.for("react.fragment"),nv=Symbol.for("react.strict_mode"),rv=Symbol.for("react.profiler"),iv=Symbol.for("react.provider"),ov=Symbol.for("react.context"),n5=Symbol.for("react.server_context"),sv=Symbol.for("react.forward_ref"),av=Symbol.for("react.suspense"),lv=Symbol.for("react.suspense_list"),cv=Symbol.for("react.memo"),uv=Symbol.for("react.lazy"),r5=Symbol.for("react.offscreen"),XT;XT=Symbol.for("react.module.reference");function to(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case dx:switch(e=e.type,e){case tv:case rv:case nv:case av:case lv:return e;default:switch(e=e&&e.$$typeof,e){case n5:case ov:case sv:case uv:case cv:case iv:return e;default:return t}}case fx:return t}}}Xt.ContextConsumer=ov;Xt.ContextProvider=iv;Xt.Element=dx;Xt.ForwardRef=sv;Xt.Fragment=tv;Xt.Lazy=uv;Xt.Memo=cv;Xt.Portal=fx;Xt.Profiler=rv;Xt.StrictMode=nv;Xt.Suspense=av;Xt.SuspenseList=lv;Xt.isAsyncMode=function(){return!1};Xt.isConcurrentMode=function(){return!1};Xt.isContextConsumer=function(e){return to(e)===ov};Xt.isContextProvider=function(e){return to(e)===iv};Xt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===dx};Xt.isForwardRef=function(e){return to(e)===sv};Xt.isFragment=function(e){return to(e)===tv};Xt.isLazy=function(e){return to(e)===uv};Xt.isMemo=function(e){return to(e)===cv};Xt.isPortal=function(e){return to(e)===fx};Xt.isProfiler=function(e){return to(e)===rv};Xt.isStrictMode=function(e){return to(e)===nv};Xt.isSuspense=function(e){return to(e)===av};Xt.isSuspenseList=function(e){return to(e)===lv};Xt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===tv||e===rv||e===nv||e===av||e===lv||e===r5||typeof e=="object"&&e!==null&&(e.$$typeof===uv||e.$$typeof===cv||e.$$typeof===iv||e.$$typeof===ov||e.$$typeof===sv||e.$$typeof===XT||e.getModuleId!==void 0)};Xt.typeOf=to;QT.exports=Xt;var WC=QT.exports;const i5=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function JT(e){const t=`${e}`.match(i5);return t&&t[1]||""}function ZT(e,t=""){return e.displayName||e.name||JT(e)||t}function GC(e,t,n){const r=ZT(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function o5(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return ZT(e,"Component");if(typeof e=="object")switch(e.$$typeof){case WC.ForwardRef:return GC(e,e.render,"ForwardRef");case WC.Memo:return GC(e,e.type,"memo");default:return}}}const s5=Object.freeze(Object.defineProperty({__proto__:null,default:o5,getFunctionName:JT},Symbol.toStringTag,{value:"Module"})),a5=zs(s5),l5=["values","unit","step"],c5=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>N({},n,{[r.key]:r.val}),{})};function eO(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ie(e,l5),o=c5(t),s=Object.keys(o);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,m){const h=s.indexOf(m);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:m)-r/100}${n})`}function u(f){return s.indexOf(f)+1`@media (min-width:${px[e]}px)`};function Eo(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||HC;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||HC;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||px).indexOf(a)!==-1){const l=o.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function tO(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function nO(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function f5(e,...t){const n=tO(e),r=[n,...t].reduce((i,o)=>Ur(i,o),{});return nO(Object.keys(n),r)}function p5(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((i,o)=>{o{e[i]!=null&&(n[i]=!0)}),n}function r0({values:e,breakpoints:t,base:n}){const r=n||p5(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,a,l)=>(Array.isArray(e)?(s[a]=e[l]!=null?e[l]:e[o],o=l):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[o],o=a):s[a]=e,s),{})}function wu(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function jm(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=wu(e,n)||r,t&&(i=t(i,r,e)),i}function An(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,c=wu(l,r)||{};return Eo(s,a,d=>{let f=jm(c,i,d);return d===f&&typeof d=="string"&&(f=jm(c,i,`${t}${d==="default"?"":be(d)}`,d)),n===!1?f:{[n]:f}})};return o.propTypes={},o.filterProps=[t],o}function h5(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const m5={m:"margin",p:"padding"},g5={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},VC={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},v5=h5(e=>{if(e.length>2)if(VC[e])e=VC[e];else return[e];const[t,n]=e.split(""),r=m5[t],i=g5[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),hx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...hx,...mx];function op(e,t,n,r){var i;const o=(i=wu(e,t,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function gx(e){return op(e,"spacing",8)}function Fl(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function y5(e,t){return n=>e.reduce((r,i)=>(r[i]=Fl(t,n),r),{})}function b5(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=v5(n),o=y5(i,r),s=e[n];return Eo(e,s,o)}function rO(e,t){const n=gx(e.theme);return Object.keys(e).map(r=>b5(e,t,r,n)).reduce(qd,{})}function Pn(e){return rO(e,hx)}Pn.propTypes={};Pn.filterProps=hx;function Tn(e){return rO(e,mx)}Tn.propTypes={};Tn.filterProps=mx;function w5(e=8){if(e.mui)return e;const t=gx({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function dv(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?qd(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function zi(e){return typeof e!="number"?e:`${e}px solid`}function no(e,t){return An({prop:e,themeKey:"borders",transform:t})}const x5=no("border",zi),S5=no("borderTop",zi),_5=no("borderRight",zi),C5=no("borderBottom",zi),k5=no("borderLeft",zi),E5=no("borderColor"),R5=no("borderTopColor"),P5=no("borderRightColor"),T5=no("borderBottomColor"),O5=no("borderLeftColor"),L5=no("outline",zi),j5=no("outlineColor"),fv=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=op(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Fl(t,r)});return Eo(e,e.borderRadius,n)}return null};fv.propTypes={};fv.filterProps=["borderRadius"];dv(x5,S5,_5,C5,k5,E5,R5,P5,T5,O5,fv,L5,j5);const pv=e=>{if(e.gap!==void 0&&e.gap!==null){const t=op(e.theme,"spacing",8),n=r=>({gap:Fl(t,r)});return Eo(e,e.gap,n)}return null};pv.propTypes={};pv.filterProps=["gap"];const hv=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=op(e.theme,"spacing",8),n=r=>({columnGap:Fl(t,r)});return Eo(e,e.columnGap,n)}return null};hv.propTypes={};hv.filterProps=["columnGap"];const mv=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=op(e.theme,"spacing",8),n=r=>({rowGap:Fl(t,r)});return Eo(e,e.rowGap,n)}return null};mv.propTypes={};mv.filterProps=["rowGap"];const I5=An({prop:"gridColumn"}),M5=An({prop:"gridRow"}),$5=An({prop:"gridAutoFlow"}),N5=An({prop:"gridAutoColumns"}),A5=An({prop:"gridAutoRows"}),D5=An({prop:"gridTemplateColumns"}),B5=An({prop:"gridTemplateRows"}),F5=An({prop:"gridTemplateAreas"}),z5=An({prop:"gridArea"});dv(pv,hv,mv,I5,M5,$5,N5,A5,D5,B5,F5,z5);function ou(e,t){return t==="grey"?t:e}const U5=An({prop:"color",themeKey:"palette",transform:ou}),W5=An({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ou}),G5=An({prop:"backgroundColor",themeKey:"palette",transform:ou});dv(U5,W5,G5);function hi(e){return e<=1&&e!==0?`${e*100}%`:e}const H5=An({prop:"width",transform:hi}),vx=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||px[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:hi(n)}};return Eo(e,e.maxWidth,t)}return null};vx.filterProps=["maxWidth"];const V5=An({prop:"minWidth",transform:hi}),K5=An({prop:"height",transform:hi}),q5=An({prop:"maxHeight",transform:hi}),Y5=An({prop:"minHeight",transform:hi});An({prop:"size",cssProperty:"width",transform:hi});An({prop:"size",cssProperty:"height",transform:hi});const Q5=An({prop:"boxSizing"});dv(H5,vx,V5,K5,q5,Y5,Q5);const X5={border:{themeKey:"borders",transform:zi},borderTop:{themeKey:"borders",transform:zi},borderRight:{themeKey:"borders",transform:zi},borderBottom:{themeKey:"borders",transform:zi},borderLeft:{themeKey:"borders",transform:zi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:zi},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:fv},color:{themeKey:"palette",transform:ou},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ou},backgroundColor:{themeKey:"palette",transform:ou},p:{style:Tn},pt:{style:Tn},pr:{style:Tn},pb:{style:Tn},pl:{style:Tn},px:{style:Tn},py:{style:Tn},padding:{style:Tn},paddingTop:{style:Tn},paddingRight:{style:Tn},paddingBottom:{style:Tn},paddingLeft:{style:Tn},paddingX:{style:Tn},paddingY:{style:Tn},paddingInline:{style:Tn},paddingInlineStart:{style:Tn},paddingInlineEnd:{style:Tn},paddingBlock:{style:Tn},paddingBlockStart:{style:Tn},paddingBlockEnd:{style:Tn},m:{style:Pn},mt:{style:Pn},mr:{style:Pn},mb:{style:Pn},ml:{style:Pn},mx:{style:Pn},my:{style:Pn},margin:{style:Pn},marginTop:{style:Pn},marginRight:{style:Pn},marginBottom:{style:Pn},marginLeft:{style:Pn},marginX:{style:Pn},marginY:{style:Pn},marginInline:{style:Pn},marginInlineStart:{style:Pn},marginInlineEnd:{style:Pn},marginBlock:{style:Pn},marginBlockStart:{style:Pn},marginBlockEnd:{style:Pn},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:pv},rowGap:{style:mv},columnGap:{style:hv},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:hi},maxWidth:{style:vx},minWidth:{transform:hi},height:{transform:hi},maxHeight:{transform:hi},minHeight:{transform:hi},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},sp=X5;function J5(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Z5(e,t){return typeof e=="function"?e(t):e}function iO(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=wu(i,c)||{};return d?d(s):Eo(s,r,h=>{let g=jm(f,u,h);return h===g&&typeof h=="string"&&(g=jm(f,u,`${n}${h==="default"?"":be(h)}`,h)),l===!1?g:{[l]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:sp;function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const u=tO(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(m=>{const h=Z5(c[m],o);if(h!=null)if(typeof h=="object")if(s[m])f=qd(f,e(m,h,o,s));else{const g=Eo({theme:o},h,E=>({[m]:E}));J5(g,h)?f[m]=t({sx:h,theme:o}):f=qd(f,g)}else f=qd(f,e(m,h,o,s))}),nO(d,f)}return Array.isArray(i)?i.map(a):a(i)}return t}const Fu=iO();Fu.filterProps=["sx"];function oO(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const e4=["breakpoints","palette","spacing","shape"];function ap(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Ie(e,e4),a=eO(n),l=w5(i);let c=Ur({breakpoints:a,direction:"ltr",components:{},palette:N({mode:"light"},r),spacing:l,shape:N({},d5,o)},s);return c.applyStyles=oO,c=t.reduce((u,d)=>Ur(u,d),c),c.unstable_sxConfig=N({},sp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Fu({sx:d,theme:this})},c}const t4=Object.freeze(Object.defineProperty({__proto__:null,default:ap,private_createBreakpoints:eO,unstable_applyStyles:oO},Symbol.toStringTag,{value:"Module"})),n4=zs(t4),r4=["sx"],i4=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:sp;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function gv(e){const{sx:t}=e,n=Ie(e,r4),{systemProps:r,otherProps:i}=i4(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return ys(a)?N({},r,a):r}:o=N({},r,t),N({},i,{sx:o})}const o4=Object.freeze(Object.defineProperty({__proto__:null,default:Fu,extendSxProp:gv,unstable_createStyleFunctionSx:iO,unstable_defaultSxConfig:sp},Symbol.toStringTag,{value:"Module"})),s4=zs(o4);var zu=eo;Object.defineProperty(np,"__esModule",{value:!0});var a4=np.default=w4;np.shouldForwardProp=Vh;np.systemDefaultTheme=void 0;var Ni=zu(CT()),a1=zu(YD()),KC=h4(qT),l4=e5;zu(t5);zu(a5);var c4=zu(n4),u4=zu(s4);const d4=["ownerState"],f4=["variants"],p4=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function sO(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(sO=function(r){return r?n:t})(e)}function h4(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=sO(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function m4(e){return Object.keys(e).length===0}function g4(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Vh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const v4=np.systemDefaultTheme=(0,c4.default)(),y4=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function lh({defaultTheme:e,theme:t,themeId:n}){return m4(t)?e:t[n]||t}function b4(e){return e?(t,n)=>n[e]:null}function Kh(e,t){let{ownerState:n}=t,r=(0,a1.default)(t,d4);const i=typeof e=="function"?e((0,Ni.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Kh(o,(0,Ni.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,a1.default)(i,f4);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Ni.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,Ni.default)({ownerState:n},r,n)):l.style))}),a}return i}function w4(e={}){const{themeId:t,defaultTheme:n=v4,rootShouldForwardProp:r=Vh,slotShouldForwardProp:i=Vh}=e,o=s=>(0,u4.default)((0,Ni.default)({},s,{theme:lh((0,Ni.default)({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,KC.internal_processStyles)(s,R=>R.filter(T=>!(T!=null&&T.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=b4(y4(c))}=a,m=(0,a1.default)(a,p4),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let E,b=Vh;c==="Root"||c==="root"?b=r:c?b=i:g4(s)&&(b=void 0);const w=(0,KC.default)(s,(0,Ni.default)({shouldForwardProp:b,label:E},m)),y=R=>typeof R=="function"&&R.__emotion_real!==R||(0,l4.isPlainObject)(R)?T=>Kh(R,(0,Ni.default)({},T,{theme:lh({theme:T.theme,defaultTheme:n,themeId:t})})):R,_=(R,...T)=>{let C=y(R);const I=T?T.map(y):[];l&&f&&I.push($=>{const F=lh((0,Ni.default)({},$,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[l]||!F.components[l].styleOverrides)return null;const z=F.components[l].styleOverrides,Y={};return Object.entries(z).forEach(([J,Z])=>{Y[J]=Kh(Z,(0,Ni.default)({},$,{theme:F}))}),f($,Y)}),l&&!h&&I.push($=>{var F;const z=lh((0,Ni.default)({},$,{defaultTheme:n,themeId:t})),Y=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return Kh({variants:Y},(0,Ni.default)({},$,{theme:z}))}),g||I.push(o);const A=I.length-T.length;if(Array.isArray(R)&&A>0){const $=new Array(A).fill("");C=[...R,...$],C.raw=[...R.raw,...$]}const j=w(C,...I);return s.muiName&&(j.muiName=s.muiName),j};return w.withConfig&&(_.withConfig=w.withConfig),_}}const qC=e=>e,x4=()=>{let e=qC;return{configure(t){e=t},generate(t){return e(t)},reset(){e=qC}}},S4=x4(),yx=S4,aO={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function pt(e,t,n="Mui"){const r=aO[t];return r?`${n}-${r}`:`${yx.generate(e)}-${t}`}function _4(e,t){return N({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Dn={};const C4=zs(KD);function k4(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const E4=Object.freeze(Object.defineProperty({__proto__:null,default:k4},Symbol.toStringTag,{value:"Module"})),R4=zs(E4);var lO=eo;Object.defineProperty(Dn,"__esModule",{value:!0});var Mt=Dn.alpha=fO;Dn.blend=D4;Dn.colorChannel=void 0;var Im=Dn.darken=wx;Dn.decomposeColor=Yi;var l1=Dn.emphasize=pO,P4=Dn.getContrastRatio=I4;Dn.getLuminance=$m;Dn.hexToRgb=cO;Dn.hslToRgb=dO;var Mm=Dn.lighten=xx;Dn.private_safeAlpha=M4;Dn.private_safeColorChannel=void 0;Dn.private_safeDarken=$4;Dn.private_safeEmphasize=A4;Dn.private_safeLighten=N4;Dn.recomposeColor=Uu;Dn.rgbToHex=j4;var YC=lO(C4),T4=lO(R4);function bx(e,t=0,n=1){return(0,T4.default)(e,t,n)}function cO(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function O4(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Yi(e){if(e.type)return e;if(e.charAt(0)==="#")return Yi(cO(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,YC.default)(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,YC.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const uO=e=>{const t=Yi(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Dn.colorChannel=uO;const L4=(e,t)=>{try{return uO(e)}catch{return e}};Dn.private_safeColorChannel=L4;function Uu(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function j4(e){if(e.indexOf("#")===0)return e;const{values:t}=Yi(e);return`#${t.map((n,r)=>O4(r===3?Math.round(255*n):n)).join("")}`}function dO(e){e=Yi(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),Uu({type:a,values:l})}function $m(e){e=Yi(e);let t=e.type==="hsl"||e.type==="hsla"?Yi(dO(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function I4(e,t){const n=$m(e),r=$m(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function fO(e,t){return e=Yi(e),t=bx(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Uu(e)}function M4(e,t,n){try{return fO(e,t)}catch{return e}}function wx(e,t){if(e=Yi(e),t=bx(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Uu(e)}function $4(e,t,n){try{return wx(e,t)}catch{return e}}function xx(e,t){if(e=Yi(e),t=bx(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Uu(e)}function N4(e,t,n){try{return xx(e,t)}catch{return e}}function pO(e,t=.15){return $m(e)>.5?wx(e,t):xx(e,t)}function A4(e,t,n){try{return pO(e,t)}catch{return e}}function D4(e,t,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),o=Yi(e),s=Yi(t),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return Uu({type:"rgb",values:a})}const B4={black:"#000",white:"#fff"},If=B4,F4={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},z4=F4,U4={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},mc=U4,W4={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},gc=W4,G4={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},vd=G4,H4={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},vc=H4,V4={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},yc=V4,K4={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},bc=K4,q4=["mode","contrastThreshold","tonalOffset"],QC={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:If.white,default:If.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},i0={text:{primary:If.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:If.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function XC(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Mm(e.main,i):t==="dark"&&(e.dark=Im(e.main,o)))}function Y4(e="light"){return e==="dark"?{main:vc[200],light:vc[50],dark:vc[400]}:{main:vc[700],light:vc[400],dark:vc[800]}}function Q4(e="light"){return e==="dark"?{main:mc[200],light:mc[50],dark:mc[400]}:{main:mc[500],light:mc[300],dark:mc[700]}}function X4(e="light"){return e==="dark"?{main:gc[500],light:gc[300],dark:gc[700]}:{main:gc[700],light:gc[400],dark:gc[800]}}function J4(e="light"){return e==="dark"?{main:yc[400],light:yc[300],dark:yc[700]}:{main:yc[700],light:yc[500],dark:yc[900]}}function Z4(e="light"){return e==="dark"?{main:bc[400],light:bc[300],dark:bc[700]}:{main:bc[800],light:bc[500],dark:bc[900]}}function e3(e="light"){return e==="dark"?{main:vd[400],light:vd[300],dark:vd[700]}:{main:"#ed6c02",light:vd[500],dark:vd[900]}}function t3(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Ie(e,q4),o=e.primary||Y4(t),s=e.secondary||Q4(t),a=e.error||X4(t),l=e.info||J4(t),c=e.success||Z4(t),u=e.warning||e3(t);function d(g){return P4(g,i0.text.primary)>=n?i0.text.primary:QC.text.primary}const f=({color:g,name:E,mainShade:b=500,lightShade:w=300,darkShade:y=700})=>{if(g=N({},g),!g.main&&g[b]&&(g.main=g[b]),!g.hasOwnProperty("main"))throw new Error(Bl(11,E?` (${E})`:"",b));if(typeof g.main!="string")throw new Error(Bl(12,E?` (${E})`:"",JSON.stringify(g.main)));return XC(g,"light",w,r),XC(g,"dark",y,r),g.contrastText||(g.contrastText=d(g.main)),g},m={dark:i0,light:QC};return Ur(N({common:N({},If),mode:t,primary:f({color:o,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:z4,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},m[t]),i)}const n3=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function r3(e){return Math.round(e*1e5)/1e5}const JC={textTransform:"uppercase"},ZC='"Roboto", "Helvetica", "Arial", sans-serif';function i3(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=ZC,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,f=Ie(n,n3),m=i/14,h=d||(b=>`${b/c*m}rem`),g=(b,w,y,_,R)=>N({fontFamily:r,fontWeight:b,fontSize:h(w),lineHeight:y},r===ZC?{letterSpacing:`${r3(_/w)}em`}:{},R,u),E={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,JC),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,JC),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ur(N({htmlFontSize:c,pxToRem:h,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},E),f,{clone:!1})}const o3=.2,s3=.14,a3=.12;function mn(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${o3})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${s3})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${a3})`].join(",")}const l3=["none",mn(0,2,1,-1,0,1,1,0,0,1,3,0),mn(0,3,1,-2,0,2,2,0,0,1,5,0),mn(0,3,3,-2,0,3,4,0,0,1,8,0),mn(0,2,4,-1,0,4,5,0,0,1,10,0),mn(0,3,5,-1,0,5,8,0,0,1,14,0),mn(0,3,5,-1,0,6,10,0,0,1,18,0),mn(0,4,5,-2,0,7,10,1,0,2,16,1),mn(0,5,5,-3,0,8,10,1,0,3,14,2),mn(0,5,6,-3,0,9,12,1,0,3,16,2),mn(0,6,6,-3,0,10,14,1,0,4,18,3),mn(0,6,7,-4,0,11,15,1,0,4,20,3),mn(0,7,8,-4,0,12,17,2,0,5,22,4),mn(0,7,8,-4,0,13,19,2,0,5,24,4),mn(0,7,9,-4,0,14,21,2,0,5,26,4),mn(0,8,9,-5,0,15,22,2,0,6,28,5),mn(0,8,10,-5,0,16,24,2,0,6,30,5),mn(0,8,11,-5,0,17,26,2,0,6,32,5),mn(0,9,11,-5,0,18,28,2,0,7,34,6),mn(0,9,12,-6,0,19,29,2,0,7,36,6),mn(0,10,13,-6,0,20,31,3,0,8,38,7),mn(0,10,13,-6,0,21,33,3,0,8,40,7),mn(0,10,14,-6,0,22,35,3,0,8,42,7),mn(0,11,14,-7,0,23,36,3,0,9,44,8),mn(0,11,15,-7,0,24,38,3,0,9,46,8)],c3=["duration","easing","delay"],u3={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},hO={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ek(e){return`${Math.round(e)}ms`}function d3(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function f3(e){const t=N({},u3,e.easing),n=N({},hO,e.duration);return N({getAutoHeightDuration:d3,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0}=o;return Ie(o,c3),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:ek(s)} ${a} ${typeof l=="string"?l:ek(l)}`).join(",")}},e,{easing:t,duration:n})}const p3={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},h3=p3,m3=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Sx(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Ie(e,m3);if(e.vars)throw new Error(Bl(18));const a=t3(r),l=ap(e);let c=Ur(l,{mixins:_4(l.breakpoints,n),palette:a,shadows:l3.slice(),typography:i3(a,o),transitions:f3(i),zIndex:N({},h3)});return c=Ur(c,s),c=t.reduce((u,d)=>Ur(u,d),c),c.unstable_sxConfig=N({},sp,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(d){return Fu({sx:d,theme:this})},c}const g3=Sx(),vv=g3,zl="$$material";function mO(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const v3=e=>mO(e)&&e!=="classes",fr=v3,ke=a4({themeId:zl,defaultTheme:vv,rootShouldForwardProp:fr});function _x(e,t){const n=N({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=N({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=N({},o),Object.keys(i).forEach(s=>{n[r][s]=_x(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function gO(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:_x(t.components[n].defaultProps,r)}function y3(e){return Object.keys(e).length===0}function Cx(e=null){const t=k.useContext(ip);return!t||y3(t)?e:t}const b3=ap();function yv(e=b3){return Cx(e)}function vO({props:e,name:t,defaultTheme:n,themeId:r}){let i=yv(n);return r&&(i=i[r]||i),gO({theme:i,name:t,props:e})}function vt({props:e,name:t}){return vO({props:e,name:t,defaultTheme:vv,themeId:zl})}const tk={};function w3(e,t){const n=k.useRef(tk);return n.current===tk&&(n.current=e(t)),n}const x3=[];function S3(e){k.useEffect(e,x3)}class lp{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new lp}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function ba(){const e=w3(lp.create).current;return S3(e.disposeEffect),e}let bv=!0,c1=!1;const _3=new lp,C3={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function k3(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&C3[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function E3(e){e.metaKey||e.altKey||e.ctrlKey||(bv=!0)}function o0(){bv=!1}function R3(){this.visibilityState==="hidden"&&c1&&(bv=!0)}function P3(e){e.addEventListener("keydown",E3,!0),e.addEventListener("mousedown",o0,!0),e.addEventListener("pointerdown",o0,!0),e.addEventListener("touchstart",o0,!0),e.addEventListener("visibilitychange",R3,!0)}function T3(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return bv||k3(t)}function wv(){const e=k.useCallback(i=>{i!=null&&P3(i.ownerDocument)},[]),t=k.useRef(!1);function n(){return t.current?(c1=!0,_3.start(100,()=>{c1=!1}),t.current=!1,!0):!1}function r(i){return T3(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Nm(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function an(...e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Nm(n,t)})},e)}function ht(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=pt(e,i,n)}),r}function O3(e){return pt("MuiTypography",e)}ht("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const L3=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],j3=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${be(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return ft(a,O3,s)},I3=ke("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${be(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>N({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),nk={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},M3={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},$3=e=>M3[e]||e,N3=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiTypography"}),i=$3(r.color),o=gv(N({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:d=!1,variant:f="body1",variantMapping:m=nk}=o,h=Ie(o,L3),g=N({},o,{align:s,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:d,variant:f,variantMapping:m}),E=l||(d?"p":m[f]||nk[f])||"span",b=j3(g);return v.jsx(I3,N({as:E,ref:n,ownerState:g,className:Ae(b.root,a)},h))}),wt=N3;function A3(e){return pt("MuiLink",e)}const D3=ht("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),B3=D3;function F3({styles:e,themeId:t,defaultTheme:n={}}){const r=yv(n),i=typeof e=="function"?e(t&&r[t]||r):e;return v.jsx(VT,{styles:i})}const z3=["className","component"];function U3(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=ux("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(Fu);return k.forwardRef(function(l,c){const u=yv(n),d=gv(l),{className:f,component:m="div"}=d,h=Ie(d,z3);return v.jsx(o,N({as:m,ref:c,className:Ae(f,i?i(r):r),theme:t&&u[t]||u},h))})}const W3=["ownerState"],G3=["variants"],H3=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function V3(e){return Object.keys(e).length===0}function K3(e){return typeof e=="string"&&e.charCodeAt(0)>96}function s0(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const q3=ap(),Y3=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function ch({defaultTheme:e,theme:t,themeId:n}){return V3(t)?e:t[n]||t}function Q3(e){return e?(t,n)=>n[e]:null}function qh(e,t){let{ownerState:n}=t,r=Ie(t,W3);const i=typeof e=="function"?e(N({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>qh(o,N({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=Ie(i,G3);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(N({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style(N({ownerState:n},r,n)):l.style))}),a}return i}function X3(e={}){const{themeId:t,defaultTheme:n=q3,rootShouldForwardProp:r=s0,slotShouldForwardProp:i=s0}=e,o=s=>Fu(N({},s,{theme:ch(N({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{KT(s,R=>R.filter(T=>!(T!=null&&T.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=Q3(Y3(c))}=a,m=Ie(a,H3),h=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=d||!1;let E,b=s0;c==="Root"||c==="root"?b=r:c?b=i:K3(s)&&(b=void 0);const w=ux(s,N({shouldForwardProp:b,label:E},m)),y=R=>typeof R=="function"&&R.__emotion_real!==R||ys(R)?T=>qh(R,N({},T,{theme:ch({theme:T.theme,defaultTheme:n,themeId:t})})):R,_=(R,...T)=>{let C=y(R);const I=T?T.map(y):[];l&&f&&I.push($=>{const F=ch(N({},$,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[l]||!F.components[l].styleOverrides)return null;const z=F.components[l].styleOverrides,Y={};return Object.entries(z).forEach(([J,Z])=>{Y[J]=qh(Z,N({},$,{theme:F}))}),f($,Y)}),l&&!h&&I.push($=>{var F;const z=ch(N({},$,{defaultTheme:n,themeId:t})),Y=z==null||(F=z.components)==null||(F=F[l])==null?void 0:F.variants;return qh({variants:Y},N({},$,{theme:z}))}),g||I.push(o);const A=I.length-T.length;if(Array.isArray(R)&&A>0){const $=new Array(A).fill("");C=[...R,...$],C.raw=[...R.raw,...$]}const j=w(C,...I);return s.muiName&&(j.muiName=s.muiName),j};return w.withConfig&&(_.withConfig=w.withConfig),_}}const J3=X3(),oi=typeof window<"u"?k.useLayoutEffect:k.useEffect;function Z3(e,t,n,r,i){const[o,s]=k.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return oi(()=>{let a=!0;if(!n)return;const l=n(e),c=()=>{a&&s(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[e,n]),o}const yO=k.useSyncExternalStore;function eF(e,t,n,r,i){const o=k.useCallback(()=>t,[t]),s=k.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return o},[o,e,r,i,n]),[a,l]=k.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addListener(d),()=>{u.removeListener(d)})]},[o,n,e]);return yO(l,a,s)}function kx(e,t={}){const n=Cx(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=gO({name:"MuiUseMediaQuery",props:t,theme:n});let l=typeof e=="function"?e(n):e;return l=l.replace(/^@media( ?)/m,""),(yO!==void 0?eF:Z3)(l,i,o,s,a)}function u1(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function xv(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function tF(e,t){return()=>null}function Yd(e,t){var n,r;return k.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Qn(e){return e&&e.ownerDocument||document}function ts(e){return Qn(e).defaultView||window}function nF(e,t){return()=>null}let rk=0;function rF(e){const[t,n]=k.useState(e),r=e||t;return k.useEffect(()=>{t==null&&(rk+=1,n(`mui-${rk}`))},[t]),r}const ik=sm.useId;function cp(e){if(ik!==void 0){const t=ik();return e??t}return rF(e)}function iF(e,t,n,r,i){return null}function xu({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=k.useRef(e!==void 0),[o,s]=k.useState(t),a=i?e:o,l=k.useCallback(c=>{i||s(c)},[]);return[a,l]}function Wi(e){const t=k.useRef(e);return oi(()=>{t.current=e}),k.useRef((...n)=>(0,t.current)(...n)).current}function bO(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const wO=e=>{const t=k.useRef({});return k.useEffect(()=>{t.current=e}),t.current};function oF(e){return k.Children.toArray(e).filter(t=>k.isValidElement(t))}const sF=k.createContext(null),xO=sF;function SO(){return k.useContext(xO)}const aF=typeof Symbol=="function"&&Symbol.for,lF=aF?Symbol.for("mui.nested"):"__THEME_NESTED__";function cF(e,t){return typeof t=="function"?t(e):N({},e,t)}function uF(e){const{children:t,theme:n}=e,r=SO(),i=k.useMemo(()=>{const o=r===null?n:cF(r,n);return o!=null&&(o[lF]=r!==null),o},[n,r]);return v.jsx(xO.Provider,{value:i,children:t})}const dF=["value"],_O=k.createContext();function fF(e){let{value:t}=e,n=Ie(e,dF);return v.jsx(_O.Provider,N({value:t??!0},n))}const Ex=()=>{const e=k.useContext(_O);return e??!1},ok={};function sk(e,t,n,r=!1){return k.useMemo(()=>{const i=e&&t[e]||t;if(typeof n=="function"){const o=n(i),s=e?N({},t,{[e]:o}):o;return r?()=>s:s}return e?N({},t,{[e]:n}):N({},t,n)},[e,t,n,r])}function pF(e){const{children:t,theme:n,themeId:r}=e,i=Cx(ok),o=SO()||ok,s=sk(r,i,n),a=sk(r,o,n,!0),l=s.direction==="rtl";return v.jsx(uF,{theme:a,children:v.jsx(ip.Provider,{value:s,children:v.jsx(fF,{value:l,children:t})})})}function Mf(e){"@babel/helpers - typeof";return Mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mf(e)}function hF(e,t){if(Mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mF(e){var t=hF(e,"string");return Mf(t)=="symbol"?t:t+""}const gF=["component","direction","spacing","divider","children","className","useFlexGap"],vF=ap(),yF=J3("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function bF(e){return vO({props:e,name:"MuiStack",defaultTheme:vF})}function wF(e,t){const n=k.Children.toArray(e).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],SF=({ownerState:e,theme:t})=>{let n=N({display:"flex",flexDirection:"column"},Eo({theme:t},r0({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=gx(t),i=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),o=r0({values:e.direction,base:i}),s=r0({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const f=c>0?o[u[c-1]]:"column";o[l]=f}}),n=Ur(n,Eo({theme:t},s,(l,c)=>e.useFlexGap?{gap:Fl(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${xF(c?o[c]:e.direction)}`]:Fl(r,l)}}))}return n=f5(t.breakpoints,n),n};function _F(e={}){const{createStyledComponent:t=yF,useThemeProps:n=bF,componentName:r="MuiStack"}=e,i=()=>ft({root:["root"]},l=>pt(r,l),{}),o=t(SF);return k.forwardRef(function(l,c){const u=n(l),d=gv(u),{component:f="div",direction:m="column",spacing:h=0,divider:g,children:E,className:b,useFlexGap:w=!1}=d,y=Ie(d,gF),_={direction:m,spacing:h,useFlexGap:w},R=i();return v.jsx(o,N({as:f,ownerState:_,ref:c,className:Ae(R.root,b)},y,{children:g?wF(E,g):E}))})}const CO={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},CF=e=>CO[e]||e,kF=({theme:e,ownerState:t})=>{const n=CF(t.color),r=wu(e,`palette.${n}`,!1)||t.color,i=wu(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:Mt(r,.4)},EF=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],RF=e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root",`underline${be(i)}`,n==="button"&&"button",r&&"focusVisible"]};return ft(o,A3,t)},PF=ke(wt,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${be(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>N({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&N({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:kF({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${B3.focusVisible}`]:{outline:"auto"}})),TF=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiLink"}),{className:i,color:o="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:f}=r,m=Ie(r,EF),{isFocusVisibleRef:h,onBlur:g,onFocus:E,ref:b}=wv(),[w,y]=k.useState(!1),_=an(n,b),R=A=>{g(A),h.current===!1&&y(!1),a&&a(A)},T=A=>{E(A),h.current===!0&&y(!0),l&&l(A)},C=N({},r,{color:o,component:s,focusVisible:w,underline:u,variant:d}),I=RF(C);return v.jsx(PF,N({color:o,className:Ae(I.root,i),classes:c,component:s,onBlur:R,onFocus:T,ref:_,ownerState:C,variant:d,sx:[...Object.keys(CO).includes(o)?[]:[{color:o}],...Array.isArray(f)?f:[f]]},m))}),vo=TF,ak=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function Pi(){const e=yv(vv);return e[zl]||e}function OF(e){return pt("MuiPaper",e)}ht("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const LF=["className","component","elevation","square","variant"],jF=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return ft(o,OF,i)},IF=ke("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return N({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&N({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Mt("#fff",ak(t.elevation))}, ${Mt("#fff",ak(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),MF=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=Ie(r,LF),u=N({},r,{component:o,elevation:s,square:a,variant:l}),d=jF(u);return v.jsx(IF,N({as:o,ownerState:u,className:Ae(d.root,i),ref:n},c))}),ss=MF;function $F(e){return pt("MuiAppBar",e)}ht("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const NF=["className","color","enableColorOnDark","position"],AF=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${be(t)}`,`position${be(n)}`]};return ft(i,$F,r)},uh=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,DF=ke(ss,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${be(n.position)}`],t[`color${be(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return N({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&N({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&N({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&N({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:uh(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:uh(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:uh(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:uh(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),BF=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,l=Ie(r,NF),c=N({},r,{color:o,position:a,enableColorOnDark:s}),u=AF(c);return v.jsx(DF,N({square:!0,component:"header",ownerState:c,elevation:4,className:Ae(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))}),FF=BF;function zF(e){return pt("MuiToolbar",e)}ht("MuiToolbar",["root","gutters","regular","dense"]);const UF=["className","component","disableGutters","variant"],WF=e=>{const{classes:t,disableGutters:n,variant:r}=e;return ft({root:["root",!n&&"gutters",r]},zF,t)},GF=ke("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>N({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),HF=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,l=Ie(r,UF),c=N({},r,{component:o,disableGutters:s,variant:a}),u=WF(c);return v.jsx(GF,N({as:o,className:Ae(u.root,i),ref:n,ownerState:c},l))}),VF=HF;function $f(e,t){return $f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},$f(e,t)}function up(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$f(e,t)}const lk={disabled:!1},Am=Pt.createContext(null);var KF=function(t){return t.scrollTop},Md="unmounted",dl="exited",fl="entering",Oc="entered",d1="exiting",Hs=function(e){up(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=dl,o.appearStatus=fl):l=Oc:r.unmountOnExit||r.mountOnEnter?l=Md:l=dl,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Md?{status:dl}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==fl&&s!==Oc&&(o=fl):(s===fl||s===Oc)&&(o=d1)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===fl){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Id.findDOMNode(this);s&&KF(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===dl&&this.setState({status:Md})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[Id.findDOMNode(this),a],c=l[0],u=l[1],d=this.getTimeouts(),f=a?d.appear:d.enter;if(!i&&!s||lk.disabled){this.safeSetState({status:Oc},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:fl},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Oc},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Id.findDOMNode(this);if(!o||lk.disabled){this.safeSetState({status:dl},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:d1},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:dl},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Id.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Md)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Ie(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Pt.createElement(Am.Provider,{value:null},typeof s=="function"?s(i,a):Pt.cloneElement(Pt.Children.only(s),a))},t}(Pt.Component);Hs.contextType=Am;Hs.propTypes={};function wc(){}Hs.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:wc,onEntering:wc,onEntered:wc,onExit:wc,onExiting:wc,onExited:wc};Hs.UNMOUNTED=Md;Hs.EXITED=dl;Hs.ENTERING=fl;Hs.ENTERED=Oc;Hs.EXITING=d1;const Sv=Hs;function qF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rx(e,t){var n=function(o){return t&&k.isValidElement(o)?t(o):o},r=Object.create(null);return e&&k.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function YF(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in t){if(r[l])for(s=0;s{if(!a&&l!=null){const g=setTimeout(l,c);return()=>{clearTimeout(g)}}},[l,a,c]),v.jsx("span",{className:f,style:m,children:v.jsx("span",{className:h})})}const Ai=ht("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),n6=["center","classes","className"];let _v=e=>e,ck,uk,dk,fk;const f1=550,r6=80,i6=ev(ck||(ck=_v` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),o6=ev(uk||(uk=_v` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),s6=ev(dk||(dk=_v` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),a6=ke("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),l6=ke(t6,{name:"MuiTouchRipple",slot:"Ripple"})(fk||(fk=_v` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`),Ai.rippleVisible,i6,f1,({theme:e})=>e.transitions.easing.easeInOut,Ai.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Ai.child,Ai.childLeaving,o6,f1,({theme:e})=>e.transitions.easing.easeInOut,Ai.childPulsate,s6,({theme:e})=>e.transitions.easing.easeInOut),c6=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Ie(r,n6),[l,c]=k.useState([]),u=k.useRef(0),d=k.useRef(null);k.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=k.useRef(!1),m=ba(),h=k.useRef(null),g=k.useRef(null),E=k.useCallback(_=>{const{pulsate:R,rippleX:T,rippleY:C,rippleSize:I,cb:A}=_;c(j=>[...j,v.jsx(l6,{classes:{ripple:Ae(o.ripple,Ai.ripple),rippleVisible:Ae(o.rippleVisible,Ai.rippleVisible),ripplePulsate:Ae(o.ripplePulsate,Ai.ripplePulsate),child:Ae(o.child,Ai.child),childLeaving:Ae(o.childLeaving,Ai.childLeaving),childPulsate:Ae(o.childPulsate,Ai.childPulsate)},timeout:f1,pulsate:R,rippleX:T,rippleY:C,rippleSize:I},u.current)]),u.current+=1,d.current=A},[o]),b=k.useCallback((_={},R={},T=()=>{})=>{const{pulsate:C=!1,center:I=i||R.pulsate,fakeElement:A=!1}=R;if((_==null?void 0:_.type)==="mousedown"&&f.current){f.current=!1;return}(_==null?void 0:_.type)==="touchstart"&&(f.current=!0);const j=A?null:g.current,$=j?j.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,z,Y;if(I||_===void 0||_.clientX===0&&_.clientY===0||!_.clientX&&!_.touches)F=Math.round($.width/2),z=Math.round($.height/2);else{const{clientX:J,clientY:Z}=_.touches&&_.touches.length>0?_.touches[0]:_;F=Math.round(J-$.left),z=Math.round(Z-$.top)}if(I)Y=Math.sqrt((2*$.width**2+$.height**2)/3),Y%2===0&&(Y+=1);else{const J=Math.max(Math.abs((j?j.clientWidth:0)-F),F)*2+2,Z=Math.max(Math.abs((j?j.clientHeight:0)-z),z)*2+2;Y=Math.sqrt(J**2+Z**2)}_!=null&&_.touches?h.current===null&&(h.current=()=>{E({pulsate:C,rippleX:F,rippleY:z,rippleSize:Y,cb:T})},m.start(r6,()=>{h.current&&(h.current(),h.current=null)})):E({pulsate:C,rippleX:F,rippleY:z,rippleSize:Y,cb:T})},[i,E,m]),w=k.useCallback(()=>{b({},{pulsate:!0})},[b]),y=k.useCallback((_,R)=>{if(m.clear(),(_==null?void 0:_.type)==="touchend"&&h.current){h.current(),h.current=null,m.start(0,()=>{y(_,R)});return}h.current=null,c(T=>T.length>0?T.slice(1):T),d.current=R},[m]);return k.useImperativeHandle(n,()=>({pulsate:w,start:b,stop:y}),[w,b,y]),v.jsx(a6,N({className:Ae(Ai.root,o.root,s),ref:g},a,{children:v.jsx(e6,{component:null,exit:!0,children:l})}))}),u6=c6;function d6(e){return pt("MuiButtonBase",e)}const f6=ht("MuiButtonBase",["root","disabled","focusVisible"]),p6=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],h6=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=ft({root:["root",t&&"disabled",n&&"focusVisible"]},d6,i);return n&&r&&(s.root+=` ${r}`),s},m6=ke("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${f6.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),g6=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:m="a",onBlur:h,onClick:g,onContextMenu:E,onDragLeave:b,onFocus:w,onFocusVisible:y,onKeyDown:_,onKeyUp:R,onMouseDown:T,onMouseLeave:C,onMouseUp:I,onTouchEnd:A,onTouchMove:j,onTouchStart:$,tabIndex:F=0,TouchRippleProps:z,touchRippleRef:Y,type:J}=r,Z=Ie(r,p6),pe=k.useRef(null),G=k.useRef(null),V=an(G,Y),{isFocusVisibleRef:le,onFocus:Le,onBlur:Ge,ref:Te}=wv(),[Ce,He]=k.useState(!1);c&&Ce&&He(!1),k.useImperativeHandle(i,()=>({focusVisible:()=>{He(!0),pe.current.focus()}}),[]);const[Re,et]=k.useState(!1);k.useEffect(()=>{et(!0)},[]);const lt=Re&&!u&&!c;k.useEffect(()=>{Ce&&f&&!u&&Re&&G.current.pulsate()},[u,f,Ce,Re]);function Pe(Oe,tt,xt=d){return Wi(Ht=>(tt&&tt(Ht),!xt&&G.current&&G.current[Oe](Ht),!0))}const Rt=Pe("start",T),at=Pe("stop",E),We=Pe("stop",b),Ze=Pe("stop",I),gt=Pe("stop",Oe=>{Ce&&Oe.preventDefault(),C&&C(Oe)}),ee=Pe("start",$),fe=Pe("stop",A),_e=Pe("stop",j),ze=Pe("stop",Oe=>{Ge(Oe),le.current===!1&&He(!1),h&&h(Oe)},!1),W=Wi(Oe=>{pe.current||(pe.current=Oe.currentTarget),Le(Oe),le.current===!0&&(He(!0),y&&y(Oe)),w&&w(Oe)}),S=()=>{const Oe=pe.current;return l&&l!=="button"&&!(Oe.tagName==="A"&&Oe.href)},O=k.useRef(!1),D=Wi(Oe=>{f&&!O.current&&Ce&&G.current&&Oe.key===" "&&(O.current=!0,G.current.stop(Oe,()=>{G.current.start(Oe)})),Oe.target===Oe.currentTarget&&S()&&Oe.key===" "&&Oe.preventDefault(),_&&_(Oe),Oe.target===Oe.currentTarget&&S()&&Oe.key==="Enter"&&!c&&(Oe.preventDefault(),g&&g(Oe))}),K=Wi(Oe=>{f&&Oe.key===" "&&G.current&&Ce&&!Oe.defaultPrevented&&(O.current=!1,G.current.stop(Oe,()=>{G.current.pulsate(Oe)})),R&&R(Oe),g&&Oe.target===Oe.currentTarget&&S()&&Oe.key===" "&&!Oe.defaultPrevented&&g(Oe)});let Q=l;Q==="button"&&(Z.href||Z.to)&&(Q=m);const de={};Q==="button"?(de.type=J===void 0?"button":J,de.disabled=c):(!Z.href&&!Z.to&&(de.role="button"),c&&(de["aria-disabled"]=c));const $e=an(n,Te,pe),rt=N({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:F,focusVisible:Ce}),Je=h6(rt);return v.jsxs(m6,N({as:Q,className:Ae(Je.root,a),ownerState:rt,onBlur:ze,onClick:g,onContextMenu:at,onFocus:W,onKeyDown:D,onKeyUp:K,onMouseDown:Rt,onMouseLeave:gt,onMouseUp:Ze,onDragLeave:We,onTouchEnd:fe,onTouchMove:_e,onTouchStart:ee,ref:$e,tabIndex:c?-1:F,type:J},de,Z,{children:[s,lt?v.jsx(u6,N({ref:V,center:o},z)):null]}))}),Ro=g6;function v6(e){return pt("MuiIconButton",e)}const y6=ht("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),b6=y6,w6=["edge","children","className","color","disabled","disableFocusRipple","size"],x6=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${be(r)}`,i&&`edge${be(i)}`,`size${be(o)}`]};return ft(s,v6,t)},S6=ke(Ro,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${be(n.color)}`],n.edge&&t[`edge${be(n.edge)}`],t[`size${be(n.size)}`]]}})(({theme:e,ownerState:t})=>N({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return N({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&N({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":N({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${b6.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),_6=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium"}=r,d=Ie(r,w6),f=N({},r,{edge:i,color:a,disabled:l,disableFocusRipple:c,size:u}),m=x6(f);return v.jsx(S6,N({className:Ae(m.root,s),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},d,{ownerState:f,children:o}))}),Lo=_6;var Tx={},a0={};function C6(e){return pt("MuiSvgIcon",e)}ht("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const k6=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],E6=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${be(t)}`,`fontSize${be(n)}`]};return ft(i,C6,r)},R6=ke("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${be(n.color)}`],t[`fontSize${be(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,a,l,c,u,d,f,m,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((a=e.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=e.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:(d=(f=(e.vars||e).palette)==null||(f=f[t.color])==null?void 0:f.main)!=null?d:{action:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.disabled,inherit:void 0}[t.color]}}),p1=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24"}=r,m=Ie(r,k6),h=k.isValidElement(i)&&i.type==="svg",g=N({},r,{color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h}),E={};u||(E.viewBox=f);const b=E6(g);return v.jsxs(R6,N({as:a,className:Ae(b.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},E,m,h&&i.props,{ownerState:g,children:[h?i.props.children:i,d?v.jsx("title",{children:d}):null]}))});p1.muiName="SvgIcon";function Gn(e,t){function n(r,i){return v.jsx(p1,N({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=p1.muiName,k.memo(k.forwardRef(n))}const P6={configure:e=>{yx.configure(e)}},T6=Object.freeze(Object.defineProperty({__proto__:null,capitalize:be,createChainedFunction:u1,createSvgIcon:Gn,debounce:xv,deprecatedPropType:tF,isMuiElement:Yd,ownerDocument:Qn,ownerWindow:ts,requirePropFactory:nF,setRef:Nm,unstable_ClassNameGenerator:P6,unstable_useEnhancedEffect:oi,unstable_useId:cp,unsupportedProp:iF,useControlled:xu,useEventCallback:Wi,useForkRef:an,useIsFocusVisible:wv},Symbol.toStringTag,{value:"Module"})),O6=zs(T6);var pk;function as(){return pk||(pk=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=O6}(a0)),a0}var L6=eo;Object.defineProperty(Tx,"__esModule",{value:!0});var kO=Tx.default=void 0,j6=L6(as()),I6=v;kO=Tx.default=(0,j6.default)((0,I6.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function Su(e){return typeof e=="string"}function Yc(e,t,n){return e===void 0||Su(e)?t:N({},t,{ownerState:N({},t.ownerState,n)})}const M6={disableDefaultClasses:!1},$6=k.createContext(M6);function N6(e){const{disableDefaultClasses:t}=k.useContext($6);return n=>t?"":e(n)}function Dm(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function EO(e,t,n){return typeof e=="function"?e(t,n):e}function hk(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function RO(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const m=Ae(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=N({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=N({},n,i,r);return m.length>0&&(g.className=m),Object.keys(h).length>0&&(g.style=h),{props:g,internalRef:void 0}}const s=Dm(N({},i,r)),a=hk(r),l=hk(i),c=t(s),u=Ae(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),d=N({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),f=N({},c,n,l,a);return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}const A6=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Po(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Ie(e,A6),a=o?{}:EO(r,i),{props:l,internalRef:c}=RO(N({},s,{externalSlotProps:a})),u=an(c,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return Yc(n,N({},l,{ref:u}),i)}function D6(e){const t=Qn(e);return t.body===e?ts(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Qd(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function mk(e){return parseInt(ts(e).getComputedStyle(e).paddingRight,10)||0}function B6(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function gk(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=o.indexOf(s)===-1,l=!B6(s);a&&l&&Qd(s,i)})}function l0(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function F6(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(D6(r)){const s=bO(Qn(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${mk(r)+s}px`;const a=Qn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${mk(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Qn(r).body;else{const s=r.parentElement,a=ts(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function z6(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class U6{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Qd(t.modalRef,!1);const i=z6(n);gk(n,t.mount,t.modalRef,i,!0);const o=l0(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=l0(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=F6(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=l0(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Qd(t.modalRef,n),gk(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Qd(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function W6(e){return typeof e=="function"?e():e}function G6(e){return e?e.props.hasOwnProperty("in"):!1}const H6=new U6;function V6(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=H6,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,f=k.useRef({}),m=k.useRef(null),h=k.useRef(null),g=an(h,d),[E,b]=k.useState(!u),w=G6(l);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const _=()=>Qn(m.current),R=()=>(f.current.modalRef=h.current,f.current.mount=m.current,f.current),T=()=>{i.mount(R(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},C=Wi(()=>{const Z=W6(t)||_().body;i.add(R(),Z),h.current&&T()}),I=k.useCallback(()=>i.isTopModal(R()),[i]),A=Wi(Z=>{m.current=Z,Z&&(u&&I()?T():h.current&&Qd(h.current,y))}),j=k.useCallback(()=>{i.remove(R(),y)},[y,i]);k.useEffect(()=>()=>{j()},[j]),k.useEffect(()=>{u?C():(!w||!o)&&j()},[u,j,w,o,C]);const $=Z=>pe=>{var G;(G=Z.onKeyDown)==null||G.call(Z,pe),!(pe.key!=="Escape"||pe.which===229||!I())&&(n||(pe.stopPropagation(),c&&c(pe,"escapeKeyDown")))},F=Z=>pe=>{var G;(G=Z.onClick)==null||G.call(Z,pe),pe.target===pe.currentTarget&&c&&c(pe,"backdropClick")};return{getRootProps:(Z={})=>{const pe=Dm(e);delete pe.onTransitionEnter,delete pe.onTransitionExited;const G=N({},pe,Z);return N({role:"presentation"},G,{onKeyDown:$(G),ref:g})},getBackdropProps:(Z={})=>{const pe=Z;return N({"aria-hidden":!0},pe,{onClick:F(pe),open:u})},getTransitionProps:()=>{const Z=()=>{b(!1),s&&s()},pe=()=>{b(!0),a&&a(),o&&j()};return{onEnter:u1(Z,l==null?void 0:l.props.onEnter),onExited:u1(pe,l==null?void 0:l.props.onExited)}},rootRef:g,portalRef:A,isTopModal:I,exited:E,hasTransition:w}}const K6=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function q6(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Y6(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Q6(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Y6(e))}function X6(e){const t=[],n=[];return Array.from(e.querySelectorAll(K6)).forEach((r,i)=>{const o=q6(r);o===-1||!Q6(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function J6(){return!0}function Z6(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=X6,isEnabled:s=J6,open:a}=e,l=k.useRef(!1),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),f=k.useRef(null),m=k.useRef(!1),h=k.useRef(null),g=an(t.ref,h),E=k.useRef(null);k.useEffect(()=>{!a||!h.current||(m.current=!n)},[n,a]),k.useEffect(()=>{if(!a||!h.current)return;const y=Qn(h.current);return h.current.contains(y.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),m.current&&h.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),k.useEffect(()=>{if(!a||!h.current)return;const y=Qn(h.current),_=C=>{E.current=C,!(r||!s()||C.key!=="Tab")&&y.activeElement===h.current&&C.shiftKey&&(l.current=!0,u.current&&u.current.focus())},R=()=>{const C=h.current;if(C===null)return;if(!y.hasFocus()||!s()||l.current){l.current=!1;return}if(C.contains(y.activeElement)||r&&y.activeElement!==c.current&&y.activeElement!==u.current)return;if(y.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!m.current)return;let I=[];if((y.activeElement===c.current||y.activeElement===u.current)&&(I=o(h.current)),I.length>0){var A,j;const $=!!((A=E.current)!=null&&A.shiftKey&&((j=E.current)==null?void 0:j.key)==="Tab"),F=I[0],z=I[I.length-1];typeof F!="string"&&typeof z!="string"&&($?z.focus():F.focus())}else C.focus()};y.addEventListener("focusin",R),y.addEventListener("keydown",_,!0);const T=setInterval(()=>{y.activeElement&&y.activeElement.tagName==="BODY"&&R()},50);return()=>{clearInterval(T),y.removeEventListener("focusin",R),y.removeEventListener("keydown",_,!0)}},[n,r,i,s,a,o]);const b=y=>{d.current===null&&(d.current=y.relatedTarget),m.current=!0,f.current=y.target;const _=t.props.onFocus;_&&_(y)},w=y=>{d.current===null&&(d.current=y.relatedTarget),m.current=!0};return v.jsxs(k.Fragment,{children:[v.jsx("div",{tabIndex:a?0:-1,onFocus:w,ref:c,"data-testid":"sentinelStart"}),k.cloneElement(t,{ref:g,onFocus:b}),v.jsx("div",{tabIndex:a?0:-1,onFocus:w,ref:u,"data-testid":"sentinelEnd"})]})}function ez(e){return typeof e=="function"?e():e}const Ox=k.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[s,a]=k.useState(null),l=an(k.isValidElement(r)?r.ref:null,n);if(oi(()=>{o||a(ez(i)||document.body)},[i,o]),oi(()=>{if(s&&!o)return Nm(n,s),()=>{Nm(n,null)}},[n,s,o]),o){if(k.isValidElement(r)){const c={ref:l};return k.cloneElement(r,c)}return v.jsx(k.Fragment,{children:r})}return v.jsx(k.Fragment,{children:s&&Ng.createPortal(r,s)})}),Lx=e=>e.scrollTop;function Aa(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}const tz=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],nz={entering:{opacity:1},entered:{opacity:1}},rz=k.forwardRef(function(t,n){const r=Pi(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:m,onExited:h,onExiting:g,style:E,timeout:b=i,TransitionComponent:w=Sv}=t,y=Ie(t,tz),_=k.useRef(null),R=an(_,a.ref,n),T=Y=>J=>{if(Y){const Z=_.current;J===void 0?Y(Z):Y(Z,J)}},C=T(f),I=T((Y,J)=>{Lx(Y);const Z=Aa({style:E,timeout:b,easing:l},{mode:"enter"});Y.style.webkitTransition=r.transitions.create("opacity",Z),Y.style.transition=r.transitions.create("opacity",Z),u&&u(Y,J)}),A=T(d),j=T(g),$=T(Y=>{const J=Aa({style:E,timeout:b,easing:l},{mode:"exit"});Y.style.webkitTransition=r.transitions.create("opacity",J),Y.style.transition=r.transitions.create("opacity",J),m&&m(Y)}),F=T(h),z=Y=>{o&&o(_.current,Y)};return v.jsx(w,N({appear:s,in:c,nodeRef:_,onEnter:I,onEntered:A,onEntering:C,onExit:$,onExited:F,onExiting:j,addEndListener:z,timeout:b},y,{children:(Y,J)=>k.cloneElement(a,N({style:N({opacity:0,visibility:Y==="exited"&&!c?"hidden":void 0},nz[Y],E,a.props.style),ref:R},J))}))}),PO=rz;function iz(e){return pt("MuiBackdrop",e)}ht("MuiBackdrop",["root","invisible"]);const oz=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],sz=e=>{const{classes:t,invisible:n}=e;return ft({root:["root",n&&"invisible"]},iz,t)},az=ke("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>N({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),lz=k.forwardRef(function(t,n){var r,i,o;const s=vt({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:d={},invisible:f=!1,open:m,slotProps:h={},slots:g={},TransitionComponent:E=PO,transitionDuration:b}=s,w=Ie(s,oz),y=N({},s,{component:c,invisible:f}),_=sz(y),R=(r=h.root)!=null?r:d.root;return v.jsx(E,N({in:m,timeout:b},w,{children:v.jsx(az,N({"aria-hidden":!0},R,{as:(i=(o=g.root)!=null?o:u.Root)!=null?i:c,className:Ae(_.root,l,R==null?void 0:R.className),ownerState:N({},y,R==null?void 0:R.ownerState),classes:_,ref:n,children:a}))}))}),TO=lz;function cz(e){return pt("MuiModal",e)}ht("MuiModal",["root","hidden","backdrop"]);const uz=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],dz=e=>{const{open:t,exited:n,classes:r}=e;return ft({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},cz,r)},fz=ke("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>N({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),pz=ke(TO,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),hz=k.forwardRef(function(t,n){var r,i,o,s,a,l;const c=vt({name:"MuiModal",props:t}),{BackdropComponent:u=pz,BackdropProps:d,className:f,closeAfterTransition:m=!1,children:h,container:g,component:E,components:b={},componentsProps:w={},disableAutoFocus:y=!1,disableEnforceFocus:_=!1,disableEscapeKeyDown:R=!1,disablePortal:T=!1,disableRestoreFocus:C=!1,disableScrollLock:I=!1,hideBackdrop:A=!1,keepMounted:j=!1,onBackdropClick:$,open:F,slotProps:z,slots:Y}=c,J=Ie(c,uz),Z=N({},c,{closeAfterTransition:m,disableAutoFocus:y,disableEnforceFocus:_,disableEscapeKeyDown:R,disablePortal:T,disableRestoreFocus:C,disableScrollLock:I,hideBackdrop:A,keepMounted:j}),{getRootProps:pe,getBackdropProps:G,getTransitionProps:V,portalRef:le,isTopModal:Le,exited:Ge,hasTransition:Te}=V6(N({},Z,{rootRef:n})),Ce=N({},Z,{exited:Ge}),He=dz(Ce),Re={};if(h.props.tabIndex===void 0&&(Re.tabIndex="-1"),Te){const{onEnter:Ze,onExited:gt}=V();Re.onEnter=Ze,Re.onExited=gt}const et=(r=(i=Y==null?void 0:Y.root)!=null?i:b.Root)!=null?r:fz,lt=(o=(s=Y==null?void 0:Y.backdrop)!=null?s:b.Backdrop)!=null?o:u,Pe=(a=z==null?void 0:z.root)!=null?a:w.root,Rt=(l=z==null?void 0:z.backdrop)!=null?l:w.backdrop,at=Po({elementType:et,externalSlotProps:Pe,externalForwardedProps:J,getSlotProps:pe,additionalProps:{ref:n,as:E},ownerState:Ce,className:Ae(f,Pe==null?void 0:Pe.className,He==null?void 0:He.root,!Ce.open&&Ce.exited&&(He==null?void 0:He.hidden))}),We=Po({elementType:lt,externalSlotProps:Rt,additionalProps:d,getSlotProps:Ze=>G(N({},Ze,{onClick:gt=>{$&&$(gt),Ze!=null&&Ze.onClick&&Ze.onClick(gt)}})),className:Ae(Rt==null?void 0:Rt.className,d==null?void 0:d.className,He==null?void 0:He.backdrop),ownerState:Ce});return!j&&!F&&(!Te||Ge)?null:v.jsx(Ox,{ref:le,container:g,disablePortal:T,children:v.jsxs(et,N({},at,{children:[!A&&u?v.jsx(lt,N({},We)):null,v.jsx(Z6,{disableEnforceFocus:_,disableAutoFocus:y,disableRestoreFocus:C,isEnabled:Le,open:F,children:k.cloneElement(h,Re)})]}))})}),Cv=hz,mz=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function gz(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=ts(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function vz(e){return typeof e=="function"?e():e}function dh(e,t,n){const r=vz(n),i=gz(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const yz=k.forwardRef(function(t,n){const r=Pi(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:d=i,in:f,onEnter:m,onEntered:h,onEntering:g,onExit:E,onExited:b,onExiting:w,style:y,timeout:_=o,TransitionComponent:R=Sv}=t,T=Ie(t,mz),C=k.useRef(null),I=an(l.ref,C,n),A=G=>V=>{G&&(V===void 0?G(C.current):G(C.current,V))},j=A((G,V)=>{dh(u,G,c),Lx(G),m&&m(G,V)}),$=A((G,V)=>{const le=Aa({timeout:_,style:y,easing:d},{mode:"enter"});G.style.webkitTransition=r.transitions.create("-webkit-transform",N({},le)),G.style.transition=r.transitions.create("transform",N({},le)),G.style.webkitTransform="none",G.style.transform="none",g&&g(G,V)}),F=A(h),z=A(w),Y=A(G=>{const V=Aa({timeout:_,style:y,easing:d},{mode:"exit"});G.style.webkitTransition=r.transitions.create("-webkit-transform",V),G.style.transition=r.transitions.create("transform",V),dh(u,G,c),E&&E(G)}),J=A(G=>{G.style.webkitTransition="",G.style.transition="",b&&b(G)}),Z=G=>{s&&s(C.current,G)},pe=k.useCallback(()=>{C.current&&dh(u,C.current,c)},[u,c]);return k.useEffect(()=>{if(f||u==="down"||u==="right")return;const G=xv(()=>{C.current&&dh(u,C.current,c)}),V=ts(C.current);return V.addEventListener("resize",G),()=>{G.clear(),V.removeEventListener("resize",G)}},[u,f,c]),k.useEffect(()=>{f||pe()},[f,pe]),v.jsx(R,N({nodeRef:C,onEnter:j,onEntered:F,onEntering:$,onExit:Y,onExited:J,onExiting:z,addEndListener:Z,appear:a,in:f,timeout:_},T,{children:(G,V)=>k.cloneElement(l,N({ref:I,style:N({visibility:G==="exited"&&!f?"hidden":void 0},y,l.props.style)},V))}))}),bz=yz;function wz(e){return pt("MuiDrawer",e)}ht("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const xz=["BackdropProps"],Sz=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],OO=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},_z=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${be(n)}`,r!=="temporary"&&`paperAnchorDocked${be(n)}`]};return ft(i,wz,t)},Cz=ke(Cv,{name:"MuiDrawer",slot:"Root",overridesResolver:OO})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),vk=ke("div",{shouldForwardProp:fr,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:OO})({flex:"0 0 auto"}),kz=ke(ss,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${be(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${be(n.anchor)}`]]}})(({theme:e,ownerState:t})=>N({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),LO={left:"right",right:"left",top:"down",bottom:"up"};function Ez(e){return["left","right"].indexOf(e)!==-1}function Rz({direction:e},t){return e==="rtl"&&Ez(t)?LO[t]:t}const Pz=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiDrawer"}),i=Pi(),o=Ex(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:m}={},onClose:h,open:g=!1,PaperProps:E={},SlideProps:b,TransitionComponent:w=bz,transitionDuration:y=s,variant:_="temporary"}=r,R=Ie(r.ModalProps,xz),T=Ie(r,Sz),C=k.useRef(!1);k.useEffect(()=>{C.current=!0},[]);const I=Rz({direction:o?"rtl":"ltr"},a),j=N({},r,{anchor:a,elevation:d,open:g,variant:_},T),$=_z(j),F=v.jsx(kz,N({elevation:_==="temporary"?d:0,square:!0},E,{className:Ae($.paper,E.className),ownerState:j,children:c}));if(_==="permanent")return v.jsx(vk,N({className:Ae($.root,$.docked,u),ownerState:j,ref:n},T,{children:F}));const z=v.jsx(w,N({in:g,direction:LO[I],timeout:y,appear:C.current},b,{children:F}));return _==="persistent"?v.jsx(vk,N({className:Ae($.root,$.docked,u),ownerState:j,ref:n},T,{children:z})):v.jsx(Cz,N({BackdropProps:N({},l,m,{transitionDuration:y}),className:Ae($.root,$.modal,u),open:g,ownerState:j,onClose:h,hideBackdrop:f,ref:n},T,R,{children:z}))}),Tz=Pz,Oz=k.createContext({}),_o=Oz;function Lz(e){return pt("MuiList",e)}ht("MuiList",["root","padding","dense","subheader"]);const jz=["children","className","component","dense","disablePadding","subheader"],Iz=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return ft({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Lz,t)},Mz=ke("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>N({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),$z=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=Ie(r,jz),d=k.useMemo(()=>({dense:a}),[a]),f=N({},r,{component:s,dense:a,disablePadding:l}),m=Iz(f);return v.jsx(_o.Provider,{value:d,children:v.jsxs(Mz,N({as:s,className:Ae(m.root,o),ref:n,ownerState:f},u,{children:[c,i]}))})}),Xd=$z;function Nz(e){return pt("MuiListItem",e)}const Az=ht("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Lc=Az;function Dz(e){return pt("MuiListItemButton",e)}const Bz=ht("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),jc=Bz,Fz=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],zz=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Uz=e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=e,c=ft({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Dz,n);return N({},n,c)},Wz=ke(Ro,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:zz})(({theme:e,ownerState:t})=>N({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${jc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${jc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${jc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${jc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${jc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Gz=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:f=!1,className:m}=r,h=Ie(r,Fz),g=k.useContext(_o),E=k.useMemo(()=>({dense:l||g.dense||!1,alignItems:i,disableGutters:c}),[i,g.dense,l,c]),b=k.useRef(null);oi(()=>{o&&b.current&&b.current.focus()},[o]);const w=N({},r,{alignItems:i,dense:E.dense,disableGutters:c,divider:u,selected:f}),y=Uz(w),_=an(b,n);return v.jsx(_o.Provider,{value:E,children:v.jsx(Wz,N({ref:_,href:h.href||h.to,component:(h.href||h.to)&&s==="div"?"button":s,focusVisibleClassName:Ae(y.focusVisible,d),ownerState:w,className:Ae(y.root,m)},h,{classes:y,children:a}))})}),Hz=Gz;function Vz(e){return pt("MuiListItemSecondaryAction",e)}ht("MuiListItemSecondaryAction",["root","disableGutters"]);const Kz=["className"],qz=e=>{const{disableGutters:t,classes:n}=e;return ft({root:["root",t&&"disableGutters"]},Vz,n)},Yz=ke("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>N({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),jO=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=Ie(r,Kz),s=k.useContext(_o),a=N({},r,{disableGutters:s.disableGutters}),l=qz(a);return v.jsx(Yz,N({className:Ae(l.root,i),ownerState:a,ref:n},o))});jO.muiName="ListItemSecondaryAction";const Qz=jO,Xz=["className"],Jz=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Zz=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},e8=e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=e;return ft({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",o&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},Nz,r)},t8=ke("div",{name:"MuiListItem",slot:"Root",overridesResolver:Zz})(({theme:e,ownerState:t})=>N({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&N({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${jc.root}`]:{paddingRight:48}},{[`&.${Lc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Lc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Lc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Lc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Lc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),n8=ke("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),r8=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:f="li",ContainerProps:{className:m}={},dense:h=!1,disabled:g=!1,disableGutters:E=!1,disablePadding:b=!1,divider:w=!1,focusVisibleClassName:y,secondaryAction:_,selected:R=!1,slotProps:T={},slots:C={}}=r,I=Ie(r.ContainerProps,Xz),A=Ie(r,Jz),j=k.useContext(_o),$=k.useMemo(()=>({dense:h||j.dense||!1,alignItems:i,disableGutters:E}),[i,j.dense,h,E]),F=k.useRef(null);oi(()=>{o&&F.current&&F.current.focus()},[o]);const z=k.Children.toArray(a),Y=z.length&&Yd(z[z.length-1],["ListItemSecondaryAction"]),J=N({},r,{alignItems:i,autoFocus:o,button:s,dense:$.dense,disabled:g,disableGutters:E,disablePadding:b,divider:w,hasSecondaryAction:Y,selected:R}),Z=e8(J),pe=an(F,n),G=C.root||u.Root||t8,V=T.root||d.root||{},le=N({className:Ae(Z.root,V.className,l),disabled:g},A);let Le=c||"li";return s&&(le.component=c||"div",le.focusVisibleClassName=Ae(Lc.focusVisible,y),Le=Ro),Y?(Le=!le.component&&!c?"div":Le,f==="li"&&(Le==="li"?Le="div":le.component==="li"&&(le.component="div")),v.jsx(_o.Provider,{value:$,children:v.jsxs(n8,N({as:f,className:Ae(Z.container,m),ref:pe,ownerState:J},I,{children:[v.jsx(G,N({},V,!Su(G)&&{as:Le,ownerState:N({},J,V.ownerState)},le,{children:z})),z.pop()]}))})):v.jsx(_o.Provider,{value:$,children:v.jsxs(G,N({},V,{as:Le,ref:pe},!Su(G)&&{ownerState:N({},J,V.ownerState)},le,{children:[z,_&&v.jsx(Qz,{children:_})]}))})}),fo=r8;function i8(e){return pt("MuiListItemText",e)}const o8=ht("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Bm=o8,s8=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],a8=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return ft({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},i8,t)},l8=ke("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Bm.primary}`]:t.primary},{[`& .${Bm.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>N({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),c8=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=r,f=Ie(r,s8),{dense:m}=k.useContext(_o);let h=l??i,g=u;const E=N({},r,{disableTypography:s,inset:a,primary:!!h,secondary:!!g,dense:m}),b=a8(E);return h!=null&&h.type!==wt&&!s&&(h=v.jsx(wt,N({variant:m?"body2":"body1",className:b.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:h}))),g!=null&&g.type!==wt&&!s&&(g=v.jsx(wt,N({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:g}))),v.jsxs(l8,N({className:Ae(b.root,o),ownerState:E,ref:n},f,{children:[h,g]}))}),gs=c8;function u8(e){return pt("MuiDivider",e)}const d8=ht("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),yk=d8,f8=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],p8=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:l}=e;return ft({root:["root",t&&"absolute",l,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},u8,r)},h8=ke("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>N({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Mt(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>N({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>N({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>N({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>N({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),m8=ke("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>N({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),IO=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:a=o?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:d=a!=="hr"?"separator":void 0,textAlign:f="center",variant:m="fullWidth"}=r,h=Ie(r,f8),g=N({},r,{absolute:i,component:a,flexItem:l,light:c,orientation:u,role:d,textAlign:f,variant:m}),E=p8(g);return v.jsx(h8,N({as:a,className:Ae(E.root,s),role:d,ref:n,ownerState:g},h,{children:o?v.jsx(m8,{className:E.wrapper,ownerState:g,children:o}):null}))});IO.muiSkipListHighlight=!0;const Zo=IO,g8=["theme"];function v8(e){let{theme:t}=e,n=Ie(e,g8);const r=t[zl];return v.jsx(pF,N({},n,{themeId:r?zl:void 0,theme:r||t}))}var tn={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var jx=Symbol.for("react.element"),Ix=Symbol.for("react.portal"),kv=Symbol.for("react.fragment"),Ev=Symbol.for("react.strict_mode"),Rv=Symbol.for("react.profiler"),Pv=Symbol.for("react.provider"),Tv=Symbol.for("react.context"),y8=Symbol.for("react.server_context"),Ov=Symbol.for("react.forward_ref"),Lv=Symbol.for("react.suspense"),jv=Symbol.for("react.suspense_list"),Iv=Symbol.for("react.memo"),Mv=Symbol.for("react.lazy"),b8=Symbol.for("react.offscreen"),MO;MO=Symbol.for("react.module.reference");function ro(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jx:switch(e=e.type,e){case kv:case Rv:case Ev:case Lv:case jv:return e;default:switch(e=e&&e.$$typeof,e){case y8:case Tv:case Ov:case Mv:case Iv:case Pv:return e;default:return t}}case Ix:return t}}}tn.ContextConsumer=Tv;tn.ContextProvider=Pv;tn.Element=jx;tn.ForwardRef=Ov;tn.Fragment=kv;tn.Lazy=Mv;tn.Memo=Iv;tn.Portal=Ix;tn.Profiler=Rv;tn.StrictMode=Ev;tn.Suspense=Lv;tn.SuspenseList=jv;tn.isAsyncMode=function(){return!1};tn.isConcurrentMode=function(){return!1};tn.isContextConsumer=function(e){return ro(e)===Tv};tn.isContextProvider=function(e){return ro(e)===Pv};tn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jx};tn.isForwardRef=function(e){return ro(e)===Ov};tn.isFragment=function(e){return ro(e)===kv};tn.isLazy=function(e){return ro(e)===Mv};tn.isMemo=function(e){return ro(e)===Iv};tn.isPortal=function(e){return ro(e)===Ix};tn.isProfiler=function(e){return ro(e)===Rv};tn.isStrictMode=function(e){return ro(e)===Ev};tn.isSuspense=function(e){return ro(e)===Lv};tn.isSuspenseList=function(e){return ro(e)===jv};tn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kv||e===Rv||e===Ev||e===Lv||e===jv||e===b8||typeof e=="object"&&e!==null&&(e.$$typeof===Mv||e.$$typeof===Iv||e.$$typeof===Pv||e.$$typeof===Tv||e.$$typeof===Ov||e.$$typeof===MO||e.getModuleId!==void 0)};tn.typeOf=ro;function Wu(e){return vt}function w8(e){return pt("MuiCollapse",e)}ht("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const x8=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],S8=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return ft(r,w8,n)},_8=ke("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>N({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&N({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),C8=ke("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>N({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),k8=ke("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>N({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),$O=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:m,onExit:h,onExited:g,onExiting:E,orientation:b="vertical",style:w,timeout:y=hO.standard,TransitionComponent:_=Sv}=r,R=Ie(r,x8),T=N({},r,{orientation:b,collapsedSize:a}),C=S8(T),I=Pi(),A=ba(),j=k.useRef(null),$=k.useRef(),F=typeof a=="number"?`${a}px`:a,z=b==="horizontal",Y=z?"width":"height",J=k.useRef(null),Z=an(n,J),pe=Re=>et=>{if(Re){const lt=J.current;et===void 0?Re(lt):Re(lt,et)}},G=()=>j.current?j.current[z?"clientWidth":"clientHeight"]:0,V=pe((Re,et)=>{j.current&&z&&(j.current.style.position="absolute"),Re.style[Y]=F,d&&d(Re,et)}),le=pe((Re,et)=>{const lt=G();j.current&&z&&(j.current.style.position="");const{duration:Pe,easing:Rt}=Aa({style:w,timeout:y,easing:c},{mode:"enter"});if(y==="auto"){const at=I.transitions.getAutoHeightDuration(lt);Re.style.transitionDuration=`${at}ms`,$.current=at}else Re.style.transitionDuration=typeof Pe=="string"?Pe:`${Pe}ms`;Re.style[Y]=`${lt}px`,Re.style.transitionTimingFunction=Rt,m&&m(Re,et)}),Le=pe((Re,et)=>{Re.style[Y]="auto",f&&f(Re,et)}),Ge=pe(Re=>{Re.style[Y]=`${G()}px`,h&&h(Re)}),Te=pe(g),Ce=pe(Re=>{const et=G(),{duration:lt,easing:Pe}=Aa({style:w,timeout:y,easing:c},{mode:"exit"});if(y==="auto"){const Rt=I.transitions.getAutoHeightDuration(et);Re.style.transitionDuration=`${Rt}ms`,$.current=Rt}else Re.style.transitionDuration=typeof lt=="string"?lt:`${lt}ms`;Re.style[Y]=F,Re.style.transitionTimingFunction=Pe,E&&E(Re)}),He=Re=>{y==="auto"&&A.start($.current||0,Re),i&&i(J.current,Re)};return v.jsx(_,N({in:u,onEnter:V,onEntered:Le,onEntering:le,onExit:Ge,onExited:Te,onExiting:Ce,addEndListener:He,nodeRef:J,timeout:y==="auto"?null:y},R,{children:(Re,et)=>v.jsx(_8,N({as:l,className:Ae(C.root,s,{entered:C.entered,exited:!u&&F==="0px"&&C.hidden}[Re]),style:N({[z?"minWidth":"minHeight"]:F},w),ref:Z},et,{ownerState:N({},T,{state:Re}),children:v.jsx(C8,{ownerState:N({},T,{state:Re}),className:C.wrapper,ref:j,children:v.jsx(k8,{ownerState:N({},T,{state:Re}),className:C.wrapperInner,children:o})})}))}))});$O.muiSupportAuto=!0;const E8=$O,R8=k.createContext({}),NO=R8,P8=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],T8=["component","slots","slotProps"],O8=["component"];function h1(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:s,internalForwardedProps:a}=t,l=Ie(t,P8),{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0}}=o,f=Ie(o,T8),m=u[e]||r,h=EO(d[e],i),g=RO(N({className:n},l,{externalForwardedProps:e==="root"?f:void 0,externalSlotProps:h})),{props:{component:E},internalRef:b}=g,w=Ie(g.props,O8),y=an(b,h==null?void 0:h.ref,t.ref),_=s?s(w):{},R=N({},i,_),T=e==="root"?E||c:E,C=Yc(m,N({},e==="root"&&!c&&!u[e]&&a,e!=="root"&&!u[e]&&a,w,T&&{as:T},{ref:y}),R);return Object.keys(_).forEach(I=>{delete C[I]}),[m,C]}function L8(e){return pt("MuiAccordion",e)}const j8=ht("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),fh=j8,I8=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],M8=Wu(),$8=e=>{const{classes:t,square:n,expanded:r,disabled:i,disableGutters:o}=e;return ft({root:["root",!n&&"rounded",r&&"expanded",i&&"disabled",!o&&"gutters"],region:["region"]},L8,t)},N8=ke(ss,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${fh.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${fh.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${fh.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}},({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${fh.expanded}`]:{margin:"16px 0"}}}]})),A8=k.forwardRef(function(t,n){const r=M8({props:t,name:"MuiAccordion"}),{children:i,className:o,defaultExpanded:s=!1,disabled:a=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:f={},slotProps:m={},TransitionComponent:h,TransitionProps:g}=r,E=Ie(r,I8),[b,w]=xu({controlled:c,default:s,name:"Accordion",state:"expanded"}),y=k.useCallback(z=>{w(!b),u&&u(z,!b)},[b,u,w]),[_,...R]=k.Children.toArray(i),T=k.useMemo(()=>({expanded:b,disabled:a,disableGutters:l,toggle:y}),[b,a,l,y]),C=N({},r,{square:d,disabled:a,disableGutters:l,expanded:b}),I=$8(C),A=N({transition:h},f),j=N({transition:g},m),[$,F]=h1("transition",{elementType:E8,externalForwardedProps:{slots:A,slotProps:j},ownerState:C});return v.jsxs(N8,N({className:Ae(I.root,o),ref:n,ownerState:C,square:d},E,{children:[v.jsx(NO.Provider,{value:T,children:_}),v.jsx($,N({in:b,timeout:"auto"},F,{children:v.jsx("div",{"aria-labelledby":_.props.id,id:_.props["aria-controls"],role:"region",className:I.region,children:R})}))]}))}),D8=A8;function B8(e){return pt("MuiAccordionDetails",e)}ht("MuiAccordionDetails",["root"]);const F8=["className"],z8=Wu(),U8=e=>{const{classes:t}=e;return ft({root:["root"]},B8,t)},W8=ke("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(1,2,2)})),G8=k.forwardRef(function(t,n){const r=z8({props:t,name:"MuiAccordionDetails"}),{className:i}=r,o=Ie(r,F8),s=r,a=U8(s);return v.jsx(W8,N({className:Ae(a.root,i),ref:n,ownerState:s},o))}),H8=G8;function V8(e){return pt("MuiAccordionSummary",e)}const K8=ht("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Qc=K8,q8=["children","className","expandIcon","focusVisibleClassName","onClick"],Y8=Wu(),Q8=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return ft({root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},V8,t)},X8=ke(Ro,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${Qc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${Qc.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${Qc.expanded}`]:{minHeight:64}}}]}}),J8=ke("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${Qc.expanded}`]:{margin:"20px 0"}}}]})),Z8=ke("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${Qc.expanded}`]:{transform:"rotate(180deg)"}})),eU=k.forwardRef(function(t,n){const r=Y8({props:t,name:"MuiAccordionSummary"}),{children:i,className:o,expandIcon:s,focusVisibleClassName:a,onClick:l}=r,c=Ie(r,q8),{disabled:u=!1,disableGutters:d,expanded:f,toggle:m}=k.useContext(NO),h=b=>{m&&m(b),l&&l(b)},g=N({},r,{expanded:f,disabled:u,disableGutters:d}),E=Q8(g);return v.jsxs(X8,N({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:Ae(E.root,o),focusVisibleClassName:Ae(E.focusVisible,a),onClick:h,ref:n,ownerState:g},c,{children:[v.jsx(J8,{className:E.content,ownerState:g,children:i}),s&&v.jsx(Z8,{className:E.expandIconWrapper,ownerState:g,children:s})]}))}),tU=eU;function nU(e){return pt("MuiAlert",e)}const rU=ht("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),bk=rU,iU=Gn(v.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),oU=Gn(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),sU=Gn(v.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),aU=Gn(v.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),lU=Gn(v.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),cU=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],uU=Wu(),dU=e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`color${be(n||r)}`,`${t}${be(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return ft(o,nU,i)},fU=ke(ss,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${be(n.color||n.severity)}`]]}})(({theme:e})=>{const t=e.palette.mode==="light"?Im:Mm,n=e.palette.mode==="light"?Mm:Im;return N({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${bk.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${bk.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.dark).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:N({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)})}))]})}),pU=ke("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),hU=ke("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),wk=ke("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),xk={success:v.jsx(iU,{fontSize:"inherit"}),warning:v.jsx(oU,{fontSize:"inherit"}),error:v.jsx(sU,{fontSize:"inherit"}),info:v.jsx(aU,{fontSize:"inherit"})},mU=k.forwardRef(function(t,n){const r=uU({props:t,name:"MuiAlert"}),{action:i,children:o,className:s,closeText:a="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=xk,onClose:m,role:h="alert",severity:g="success",slotProps:E={},slots:b={},variant:w="standard"}=r,y=Ie(r,cU),_=N({},r,{color:l,severity:g,variant:w,colorSeverity:l||g}),R=dU(_),T={slots:N({closeButton:c.CloseButton,closeIcon:c.CloseIcon},b),slotProps:N({},u,E)},[C,I]=h1("closeButton",{elementType:Lo,externalForwardedProps:T,ownerState:_}),[A,j]=h1("closeIcon",{elementType:lU,externalForwardedProps:T,ownerState:_});return v.jsxs(fU,N({role:h,elevation:0,ownerState:_,className:Ae(R.root,s),ref:n},y,{children:[d!==!1?v.jsx(pU,{ownerState:_,className:R.icon,children:d||f[g]||xk[g]}):null,v.jsx(hU,{ownerState:_,className:R.message,children:o}),i!=null?v.jsx(wk,{ownerState:_,className:R.action,children:i}):null,i==null&&m?v.jsx(wk,{ownerState:_,className:R.action,children:v.jsx(C,N({size:"small","aria-label":a,title:a,color:"inherit",onClick:m},I,{children:v.jsx(A,N({fontSize:"small"},j))}))}):null]}))}),gU=mU;function vU(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,o=wO({badgeContent:t,max:r});let s=n;n===!1&&t===0&&!i&&(s=!0);const{badgeContent:a,max:l=r}=s?o:e,c=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:c}}const AO="base";function yU(e){return`${AO}--${e}`}function bU(e,t){return`${AO}-${e}-${t}`}function DO(e,t){const n=aO[t];return n?yU(n):bU(e,t)}function wU(e,t){const n={};return t.forEach(r=>{n[r]=DO(e,r)}),n}function Sk(e){return e.substring(2).toLowerCase()}function xU(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=an(t.ref,a),d=Wi(h=>{const g=c.current;c.current=!1;const E=Qn(a.current);if(!l.current||!a.current||"clientX"in h&&xU(h,E))return;if(s.current){s.current=!1;return}let b;h.composedPath?b=h.composedPath().indexOf(a.current)>-1:b=!E.documentElement.contains(h.target)||a.current.contains(h.target),!b&&(n||!g)&&i(h)}),f=h=>g=>{c.current=!0;const E=t.props[h];E&&E(g)},m={ref:u};return o!==!1&&(m[o]=f(o)),k.useEffect(()=>{if(o!==!1){const h=Sk(o),g=Qn(a.current),E=()=>{s.current=!0};return g.addEventListener(h,d),g.addEventListener("touchmove",E),()=>{g.removeEventListener(h,d),g.removeEventListener("touchmove",E)}}},[d,o]),r!==!1&&(m[r]=f(r)),k.useEffect(()=>{if(r!==!1){const h=Sk(r),g=Qn(a.current);return g.addEventListener(h,d),()=>{g.removeEventListener(h,d)}}},[d,r]),v.jsx(k.Fragment,{children:k.cloneElement(t,m)})}var ni="top",Qi="bottom",Xi="right",ri="left",Mx="auto",dp=[ni,Qi,Xi,ri],_u="start",Nf="end",_U="clippingParents",BO="viewport",yd="popper",CU="reference",_k=dp.reduce(function(e,t){return e.concat([t+"-"+_u,t+"-"+Nf])},[]),FO=[].concat(dp,[Mx]).reduce(function(e,t){return e.concat([t,t+"-"+_u,t+"-"+Nf])},[]),kU="beforeRead",EU="read",RU="afterRead",PU="beforeMain",TU="main",OU="afterMain",LU="beforeWrite",jU="write",IU="afterWrite",MU=[kU,EU,RU,PU,TU,OU,LU,jU,IU];function ns(e){return e?(e.nodeName||"").toLowerCase():null}function _i(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ul(e){var t=_i(e).Element;return e instanceof t||e instanceof Element}function Hi(e){var t=_i(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function $x(e){if(typeof ShadowRoot>"u")return!1;var t=_i(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function $U(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Hi(o)||!ns(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function NU(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Hi(i)||!ns(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const AU={name:"applyStyles",enabled:!0,phase:"write",fn:$U,effect:NU,requires:["computeStyles"]};function es(e){return e.split("-")[0]}var El=Math.max,Fm=Math.min,Cu=Math.round;function m1(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function zO(){return!/^((?!chrome|android).)*safari/i.test(m1())}function ku(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Hi(e)&&(i=e.offsetWidth>0&&Cu(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Cu(r.height)/e.offsetHeight||1);var s=Ul(e)?_i(e):window,a=s.visualViewport,l=!zO()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Nx(e){var t=ku(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function UO(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&$x(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ms(e){return _i(e).getComputedStyle(e)}function DU(e){return["table","td","th"].indexOf(ns(e))>=0}function Va(e){return((Ul(e)?e.ownerDocument:e.document)||window.document).documentElement}function $v(e){return ns(e)==="html"?e:e.assignedSlot||e.parentNode||($x(e)?e.host:null)||Va(e)}function Ck(e){return!Hi(e)||Ms(e).position==="fixed"?null:e.offsetParent}function BU(e){var t=/firefox/i.test(m1()),n=/Trident/i.test(m1());if(n&&Hi(e)){var r=Ms(e);if(r.position==="fixed")return null}var i=$v(e);for($x(i)&&(i=i.host);Hi(i)&&["html","body"].indexOf(ns(i))<0;){var o=Ms(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function fp(e){for(var t=_i(e),n=Ck(e);n&&DU(n)&&Ms(n).position==="static";)n=Ck(n);return n&&(ns(n)==="html"||ns(n)==="body"&&Ms(n).position==="static")?t:n||BU(e)||t}function Ax(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Jd(e,t,n){return El(e,Fm(t,n))}function FU(e,t,n){var r=Jd(e,t,n);return r>n?n:r}function WO(){return{top:0,right:0,bottom:0,left:0}}function GO(e){return Object.assign({},WO(),e)}function HO(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var zU=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,GO(typeof t!="number"?t:HO(t,dp))};function UU(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=es(n.placement),l=Ax(a),c=[ri,Xi].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var d=zU(i.padding,n),f=Nx(o),m=l==="y"?ni:ri,h=l==="y"?Qi:Xi,g=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],E=s[l]-n.rects.reference[l],b=fp(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,y=g/2-E/2,_=d[m],R=w-f[u]-d[h],T=w/2-f[u]/2+y,C=Jd(_,T,R),I=l;n.modifiersData[r]=(t={},t[I]=C,t.centerOffset=C-T,t)}}function WU(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||UO(t.elements.popper,i)&&(t.elements.arrow=i))}const GU={name:"arrow",enabled:!0,phase:"main",fn:UU,effect:WU,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Eu(e){return e.split("-")[1]}var HU={top:"auto",right:"auto",bottom:"auto",left:"auto"};function VU(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Cu(n*i)/i||0,y:Cu(r*i)/i||0}}function kk(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=s.x,m=f===void 0?0:f,h=s.y,g=h===void 0?0:h,E=typeof u=="function"?u({x:m,y:g}):{x:m,y:g};m=E.x,g=E.y;var b=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),y=ri,_=ni,R=window;if(c){var T=fp(n),C="clientHeight",I="clientWidth";if(T===_i(n)&&(T=Va(n),Ms(T).position!=="static"&&a==="absolute"&&(C="scrollHeight",I="scrollWidth")),T=T,i===ni||(i===ri||i===Xi)&&o===Nf){_=Qi;var A=d&&T===R&&R.visualViewport?R.visualViewport.height:T[C];g-=A-r.height,g*=l?1:-1}if(i===ri||(i===ni||i===Qi)&&o===Nf){y=Xi;var j=d&&T===R&&R.visualViewport?R.visualViewport.width:T[I];m-=j-r.width,m*=l?1:-1}}var $=Object.assign({position:a},c&&HU),F=u===!0?VU({x:m,y:g},_i(n)):{x:m,y:g};if(m=F.x,g=F.y,l){var z;return Object.assign({},$,(z={},z[_]=w?"0":"",z[y]=b?"0":"",z.transform=(R.devicePixelRatio||1)<=1?"translate("+m+"px, "+g+"px)":"translate3d("+m+"px, "+g+"px, 0)",z))}return Object.assign({},$,(t={},t[_]=w?g+"px":"",t[y]=b?m+"px":"",t.transform="",t))}function KU(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:es(t.placement),variation:Eu(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,kk(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,kk(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const qU={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:KU,data:{}};var ph={passive:!0};function YU(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=_i(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,ph)}),a&&l.addEventListener("resize",n.update,ph),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ph)}),a&&l.removeEventListener("resize",n.update,ph)}}const QU={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:YU,data:{}};var XU={left:"right",right:"left",bottom:"top",top:"bottom"};function Yh(e){return e.replace(/left|right|bottom|top/g,function(t){return XU[t]})}var JU={start:"end",end:"start"};function Ek(e){return e.replace(/start|end/g,function(t){return JU[t]})}function Dx(e){var t=_i(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Bx(e){return ku(Va(e)).left+Dx(e).scrollLeft}function ZU(e,t){var n=_i(e),r=Va(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=zO();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Bx(e),y:l}}function e9(e){var t,n=Va(e),r=Dx(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=El(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=El(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Bx(e),l=-r.scrollTop;return Ms(i||n).direction==="rtl"&&(a+=El(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Fx(e){var t=Ms(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function VO(e){return["html","body","#document"].indexOf(ns(e))>=0?e.ownerDocument.body:Hi(e)&&Fx(e)?e:VO($v(e))}function Zd(e,t){var n;t===void 0&&(t=[]);var r=VO(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=_i(r),s=i?[o].concat(o.visualViewport||[],Fx(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Zd($v(s)))}function g1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function t9(e,t){var n=ku(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Rk(e,t,n){return t===BO?g1(ZU(e,n)):Ul(t)?t9(t,n):g1(e9(Va(e)))}function n9(e){var t=Zd($v(e)),n=["absolute","fixed"].indexOf(Ms(e).position)>=0,r=n&&Hi(e)?fp(e):e;return Ul(r)?t.filter(function(i){return Ul(i)&&UO(i,r)&&ns(i)!=="body"}):[]}function r9(e,t,n,r){var i=t==="clippingParents"?n9(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var u=Rk(e,c,r);return l.top=El(u.top,l.top),l.right=Fm(u.right,l.right),l.bottom=Fm(u.bottom,l.bottom),l.left=El(u.left,l.left),l},Rk(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function KO(e){var t=e.reference,n=e.element,r=e.placement,i=r?es(r):null,o=r?Eu(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case ni:l={x:s,y:t.y-n.height};break;case Qi:l={x:s,y:t.y+t.height};break;case Xi:l={x:t.x+t.width,y:a};break;case ri:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?Ax(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case _u:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Nf:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Af(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?_U:a,c=n.rootBoundary,u=c===void 0?BO:c,d=n.elementContext,f=d===void 0?yd:d,m=n.altBoundary,h=m===void 0?!1:m,g=n.padding,E=g===void 0?0:g,b=GO(typeof E!="number"?E:HO(E,dp)),w=f===yd?CU:yd,y=e.rects.popper,_=e.elements[h?w:f],R=r9(Ul(_)?_:_.contextElement||Va(e.elements.popper),l,u,s),T=ku(e.elements.reference),C=KO({reference:T,element:y,strategy:"absolute",placement:i}),I=g1(Object.assign({},y,C)),A=f===yd?I:T,j={top:R.top-A.top+b.top,bottom:A.bottom-R.bottom+b.bottom,left:R.left-A.left+b.left,right:A.right-R.right+b.right},$=e.modifiersData.offset;if(f===yd&&$){var F=$[i];Object.keys(j).forEach(function(z){var Y=[Xi,Qi].indexOf(z)>=0?1:-1,J=[ni,Qi].indexOf(z)>=0?"y":"x";j[z]+=F[J]*Y})}return j}function i9(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?FO:l,u=Eu(r),d=u?a?_k:_k.filter(function(h){return Eu(h)===u}):dp,f=d.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=d);var m=f.reduce(function(h,g){return h[g]=Af(e,{placement:g,boundary:i,rootBoundary:o,padding:s})[es(g)],h},{});return Object.keys(m).sort(function(h,g){return m[h]-m[g]})}function o9(e){if(es(e)===Mx)return[];var t=Yh(e);return[Ek(e),t,Ek(t)]}function s9(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,m=n.flipVariations,h=m===void 0?!0:m,g=n.allowedAutoPlacements,E=t.options.placement,b=es(E),w=b===E,y=l||(w||!h?[Yh(E)]:o9(E)),_=[E].concat(y).reduce(function(Ce,He){return Ce.concat(es(He)===Mx?i9(t,{placement:He,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):He)},[]),R=t.rects.reference,T=t.rects.popper,C=new Map,I=!0,A=_[0],j=0;j<_.length;j++){var $=_[j],F=es($),z=Eu($)===_u,Y=[ni,Qi].indexOf(F)>=0,J=Y?"width":"height",Z=Af(t,{placement:$,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),pe=Y?z?Xi:ri:z?Qi:ni;R[J]>T[J]&&(pe=Yh(pe));var G=Yh(pe),V=[];if(o&&V.push(Z[F]<=0),a&&V.push(Z[pe]<=0,Z[G]<=0),V.every(function(Ce){return Ce})){A=$,I=!1;break}C.set($,V)}if(I)for(var le=h?3:1,Le=function(He){var Re=_.find(function(et){var lt=C.get(et);if(lt)return lt.slice(0,He).every(function(Pe){return Pe})});if(Re)return A=Re,"break"},Ge=le;Ge>0;Ge--){var Te=Le(Ge);if(Te==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const a9={name:"flip",enabled:!0,phase:"main",fn:s9,requiresIfExists:["offset"],data:{_skip:!1}};function Pk(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Tk(e){return[ni,Xi,Qi,ri].some(function(t){return e[t]>=0})}function l9(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Af(t,{elementContext:"reference"}),a=Af(t,{altBoundary:!0}),l=Pk(s,r),c=Pk(a,i,o),u=Tk(l),d=Tk(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const c9={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:l9};function u9(e,t,n){var r=es(e),i=[ri,ni].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[ri,Xi].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function d9(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=FO.reduce(function(u,d){return u[d]=u9(d,t.rects,o),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const f9={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:d9};function p9(e){var t=e.state,n=e.name;t.modifiersData[n]=KO({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const h9={name:"popperOffsets",enabled:!0,phase:"read",fn:p9,data:{}};function m9(e){return e==="x"?"y":"x"}function g9(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,m=f===void 0?!0:f,h=n.tetherOffset,g=h===void 0?0:h,E=Af(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=es(t.placement),w=Eu(t.placement),y=!w,_=Ax(b),R=m9(_),T=t.modifiersData.popperOffsets,C=t.rects.reference,I=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,j=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(T){if(o){var z,Y=_==="y"?ni:ri,J=_==="y"?Qi:Xi,Z=_==="y"?"height":"width",pe=T[_],G=pe+E[Y],V=pe-E[J],le=m?-I[Z]/2:0,Le=w===_u?C[Z]:I[Z],Ge=w===_u?-I[Z]:-C[Z],Te=t.elements.arrow,Ce=m&&Te?Nx(Te):{width:0,height:0},He=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:WO(),Re=He[Y],et=He[J],lt=Jd(0,C[Z],Ce[Z]),Pe=y?C[Z]/2-le-lt-Re-j.mainAxis:Le-lt-Re-j.mainAxis,Rt=y?-C[Z]/2+le+lt+et+j.mainAxis:Ge+lt+et+j.mainAxis,at=t.elements.arrow&&fp(t.elements.arrow),We=at?_==="y"?at.clientTop||0:at.clientLeft||0:0,Ze=(z=$==null?void 0:$[_])!=null?z:0,gt=pe+Pe-Ze-We,ee=pe+Rt-Ze,fe=Jd(m?Fm(G,gt):G,pe,m?El(V,ee):V);T[_]=fe,F[_]=fe-pe}if(a){var _e,ze=_==="x"?ni:ri,W=_==="x"?Qi:Xi,S=T[R],O=R==="y"?"height":"width",D=S+E[ze],K=S-E[W],Q=[ni,ri].indexOf(b)!==-1,de=(_e=$==null?void 0:$[R])!=null?_e:0,$e=Q?D:S-C[O]-I[O]-de+j.altAxis,rt=Q?S+C[O]+I[O]-de-j.altAxis:K,Je=m&&Q?FU($e,S,rt):Jd(m?$e:D,S,m?rt:K);T[R]=Je,F[R]=Je-S}t.modifiersData[r]=F}}const v9={name:"preventOverflow",enabled:!0,phase:"main",fn:g9,requiresIfExists:["offset"]};function y9(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function b9(e){return e===_i(e)||!Hi(e)?Dx(e):y9(e)}function w9(e){var t=e.getBoundingClientRect(),n=Cu(t.width)/e.offsetWidth||1,r=Cu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function x9(e,t,n){n===void 0&&(n=!1);var r=Hi(t),i=Hi(t)&&w9(t),o=Va(t),s=ku(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((ns(t)!=="body"||Fx(o))&&(a=b9(t)),Hi(t)?(l=ku(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Bx(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function S9(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function _9(e){var t=S9(e);return MU.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function C9(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function k9(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ok={placement:"bottom",modifiers:[],strategy:"absolute"};function Lk(){for(var e=arguments.length,t=new Array(e),n=0;nft({root:["root"]},N6(T9)),$9={},N9=k.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,direction:s,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:f,slotProps:m={},slots:h={},TransitionProps:g}=t,E=Ie(t,O9),b=k.useRef(null),w=an(b,n),y=k.useRef(null),_=an(y,f),R=k.useRef(_);oi(()=>{R.current=_},[_]),k.useImperativeHandle(f,()=>y.current,[]);const T=j9(u,s),[C,I]=k.useState(T),[A,j]=k.useState(v1(i));k.useEffect(()=>{y.current&&y.current.forceUpdate()}),k.useEffect(()=>{i&&j(v1(i))},[i]),oi(()=>{if(!A||!c)return;const J=G=>{I(G.placement)};let Z=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:G})=>{J(G)}}];l!=null&&(Z=Z.concat(l)),d&&d.modifiers!=null&&(Z=Z.concat(d.modifiers));const pe=P9(A,b.current,N({placement:T},d,{modifiers:Z}));return R.current(pe),()=>{pe.destroy(),R.current(null)}},[A,a,l,c,d,T]);const $={placement:C};g!==null&&($.TransitionProps=g);const F=M9(),z=(r=h.root)!=null?r:"div",Y=Po({elementType:z,externalSlotProps:m.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:w},ownerState:t,className:F.root});return v.jsx(z,N({},Y,{children:typeof o=="function"?o($):o}))}),A9=k.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=$9,popperRef:m,style:h,transition:g=!1,slotProps:E={},slots:b={}}=t,w=Ie(t,L9),[y,_]=k.useState(!0),R=()=>{_(!1)},T=()=>{_(!0)};if(!l&&!u&&(!g||y))return null;let C;if(o)C=o;else if(r){const j=v1(r);C=j&&I9(j)?Qn(j).body:Qn(null).body}const I=!u&&l&&(!g||y)?"none":void 0,A=g?{in:u,onEnter:R,onExited:T}:void 0;return v.jsx(Ox,{disablePortal:a,container:C,children:v.jsx(N9,N({anchorEl:r,direction:s,disablePortal:a,modifiers:c,ref:n,open:g?!y:u,placement:d,popperOptions:f,popperRef:m,slotProps:E,slots:b},w,{style:N({position:"fixed",top:0,left:0,display:I},h),TransitionProps:A,children:i}))})});function D9(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=ba();k.useEffect(()=>{if(!i)return;function b(w){w.defaultPrevented||(w.key==="Escape"||w.key==="Esc")&&(r==null||r(w,"escapeKeyDown"))}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i,r]);const a=Wi((b,w)=>{r==null||r(b,w)}),l=Wi(b=>{!r||b==null||s.start(b,()=>{a(null,"timeout")})});k.useEffect(()=>(i&&l(t),s.clear),[i,t,l,s]);const c=b=>{r==null||r(b,"clickaway")},u=s.clear,d=k.useCallback(()=>{t!=null&&l(o??t*.5)},[t,o,l]),f=b=>w=>{const y=b.onBlur;y==null||y(w),d()},m=b=>w=>{const y=b.onFocus;y==null||y(w),u()},h=b=>w=>{const y=b.onMouseEnter;y==null||y(w),u()},g=b=>w=>{const y=b.onMouseLeave;y==null||y(w),d()};return k.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,i,d,u]),{getRootProps:(b={})=>{const w=N({},Dm(e),Dm(b));return N({role:"presentation"},b,w,{onBlur:f(w),onFocus:m(w),onMouseEnter:h(w),onMouseLeave:g(w)})},onClickAway:c}}const B9=["onChange","maxRows","minRows","style","value"];function hh(e){return parseInt(e,10)||0}const F9={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function z9(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const U9=k.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=t,l=Ie(t,B9),{current:c}=k.useRef(a!=null),u=k.useRef(null),d=an(n,u),f=k.useRef(null),m=k.useCallback(()=>{const E=u.current,w=ts(E).getComputedStyle(E);if(w.width==="0px")return{outerHeightStyle:0,overflowing:!1};const y=f.current;y.style.width=w.width,y.value=E.value||t.placeholder||"x",y.value.slice(-1)===` +`&&(y.value+=" ");const _=w.boxSizing,R=hh(w.paddingBottom)+hh(w.paddingTop),T=hh(w.borderBottomWidth)+hh(w.borderTopWidth),C=y.scrollHeight;y.value="x";const I=y.scrollHeight;let A=C;o&&(A=Math.max(Number(o)*I,A)),i&&(A=Math.min(Number(i)*I,A)),A=Math.max(A,I);const j=A+(_==="border-box"?R+T:0),$=Math.abs(A-C)<=1;return{outerHeightStyle:j,overflowing:$}},[i,o,t.placeholder]),h=k.useCallback(()=>{const E=m();if(z9(E))return;const b=u.current;b.style.height=`${E.outerHeightStyle}px`,b.style.overflow=E.overflowing?"hidden":""},[m]);oi(()=>{const E=()=>{h()};let b;const w=xv(E),y=u.current,_=ts(y);_.addEventListener("resize",w);let R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver(E),R.observe(y)),()=>{w.clear(),cancelAnimationFrame(b),_.removeEventListener("resize",w),R&&R.disconnect()}},[m,h]),oi(()=>{h()});const g=E=>{c||h(),r&&r(E)};return v.jsxs(k.Fragment,{children:[v.jsx("textarea",N({value:a,onChange:g,ref:d,rows:o,style:s},l)),v.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:N({},F9.shadow,s,{paddingTop:0,paddingBottom:0})})]})});var zx={};Object.defineProperty(zx,"__esModule",{value:!0});var YO=zx.default=void 0,W9=H9(k),G9=qT;function QO(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(QO=function(r){return r?n:t})(e)}function H9(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=QO(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function V9(e){return Object.keys(e).length===0}function K9(e=null){const t=W9.useContext(G9.ThemeContext);return!t||V9(t)?e:t}YO=zx.default=K9;const q9=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Y9=ke(A9,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Q9=k.forwardRef(function(t,n){var r;const i=YO(),o=vt({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:l,componentsProps:c,container:u,disablePortal:d,keepMounted:f,modifiers:m,open:h,placement:g,popperOptions:E,popperRef:b,transition:w,slots:y,slotProps:_}=o,R=Ie(o,q9),T=(r=y==null?void 0:y.root)!=null?r:l==null?void 0:l.Root,C=N({anchorEl:s,container:u,disablePortal:d,keepMounted:f,modifiers:m,open:h,placement:g,popperOptions:E,popperRef:b,transition:w},R);return v.jsx(Y9,N({as:a,direction:i==null?void 0:i.direction,slots:{root:T},slotProps:_??c},C,{ref:n}))}),XO=Q9;function X9(e){return pt("MuiListSubheader",e)}ht("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const J9=["className","color","component","disableGutters","disableSticky","inset"],Z9=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${be(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return ft(s,X9,t)},eW=ke("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${be(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>N({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),JO=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:a=!1,disableSticky:l=!1,inset:c=!1}=r,u=Ie(r,J9),d=N({},r,{color:o,component:s,disableGutters:a,disableSticky:l,inset:c}),f=Z9(d);return v.jsx(eW,N({as:s,className:Ae(f.root,i),ref:n,ownerState:d},u))});JO.muiSkipListHighlight=!0;const tW=JO,nW=Gn(v.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function rW(e){return pt("MuiChip",e)}const iW=ht("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Ft=iW,oW=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],sW=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,c={root:["root",l,n&&"disabled",`size${be(r)}`,`color${be(i)}`,a&&"clickable",a&&`clickableColor${be(i)}`,s&&"deletable",s&&`deletableColor${be(i)}`,`${l}${be(i)}`],label:["label",`label${be(r)}`],avatar:["avatar",`avatar${be(r)}`,`avatarColor${be(i)}`],icon:["icon",`icon${be(r)}`,`iconColor${be(o)}`],deleteIcon:["deleteIcon",`deleteIcon${be(r)}`,`deleteIconColor${be(i)}`,`deleteIcon${be(l)}Color${be(i)}`]};return ft(c,rW,t)},aW=ke("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:s,size:a,variant:l}=n;return[{[`& .${Ft.avatar}`]:t.avatar},{[`& .${Ft.avatar}`]:t[`avatar${be(a)}`]},{[`& .${Ft.avatar}`]:t[`avatarColor${be(r)}`]},{[`& .${Ft.icon}`]:t.icon},{[`& .${Ft.icon}`]:t[`icon${be(a)}`]},{[`& .${Ft.icon}`]:t[`iconColor${be(i)}`]},{[`& .${Ft.deleteIcon}`]:t.deleteIcon},{[`& .${Ft.deleteIcon}`]:t[`deleteIcon${be(a)}`]},{[`& .${Ft.deleteIcon}`]:t[`deleteIconColor${be(r)}`]},{[`& .${Ft.deleteIcon}`]:t[`deleteIcon${be(l)}Color${be(r)}`]},t.root,t[`size${be(a)}`],t[`color${be(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${be(r)})`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${be(r)}`],t[l],t[`${l}${be(r)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return N({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Ft.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Ft.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${Ft.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Ft.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Ft.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Ft.icon}`]:N({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&N({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},t.color!=="default"&&{color:"inherit"})),[`& .${Ft.deleteIcon}`]:N({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Mt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Mt(e.palette.text.primary,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:Mt(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Ft.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Ft.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>N({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Ft.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${Ft.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>N({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Ft.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Ft.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Ft.avatar}`]:{marginLeft:4},[`& .${Ft.avatarSmall}`]:{marginLeft:2},[`& .${Ft.icon}`]:{marginLeft:4},[`& .${Ft.iconSmall}`]:{marginLeft:2},[`& .${Ft.deleteIcon}`]:{marginRight:5},[`& .${Ft.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Mt(e.palette[t.color].main,.7)}`,[`&.${Ft.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Ft.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Mt(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Ft.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Mt(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),lW=ke("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${be(r)}`]]}})(({ownerState:e})=>N({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function jk(e){return e.key==="Backspace"||e.key==="Delete"}const cW=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:f,onClick:m,onDelete:h,onKeyDown:g,onKeyUp:E,size:b="medium",variant:w="filled",tabIndex:y,skipFocusWhenDisabled:_=!1}=r,R=Ie(r,oW),T=k.useRef(null),C=an(T,n),I=V=>{V.stopPropagation(),h&&h(V)},A=V=>{V.currentTarget===V.target&&jk(V)&&V.preventDefault(),g&&g(V)},j=V=>{V.currentTarget===V.target&&(h&&jk(V)?h(V):V.key==="Escape"&&T.current&&T.current.blur()),E&&E(V)},$=s!==!1&&m?!0:s,F=$||h?Ro:l||"div",z=N({},r,{component:F,disabled:u,size:b,color:a,iconColor:k.isValidElement(d)&&d.props.color||a,onDelete:!!h,clickable:$,variant:w}),Y=sW(z),J=F===Ro?N({component:l||"div",focusVisibleClassName:Y.focusVisible},h&&{disableRipple:!0}):{};let Z=null;h&&(Z=c&&k.isValidElement(c)?k.cloneElement(c,{className:Ae(c.props.className,Y.deleteIcon),onClick:I}):v.jsx(nW,{className:Ae(Y.deleteIcon),onClick:I}));let pe=null;i&&k.isValidElement(i)&&(pe=k.cloneElement(i,{className:Ae(Y.avatar,i.props.className)}));let G=null;return d&&k.isValidElement(d)&&(G=k.cloneElement(d,{className:Ae(Y.icon,d.props.className)})),v.jsxs(aW,N({as:F,className:Ae(Y.root,o),disabled:$&&u?!0:void 0,onClick:m,onKeyDown:A,onKeyUp:j,ref:C,tabIndex:_&&u?-1:y,ownerState:z},J,R,{children:[pe||G,v.jsx(lW,{className:Ae(Y.label),ownerState:z,children:f}),Z]}))}),Ux=cW;function tc({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const uW=k.createContext(void 0),Wx=uW;function Ka(){return k.useContext(Wx)}function ZO(e){return v.jsx(F3,N({},e,{defaultTheme:vv,themeId:zl}))}function Ik(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function zm(e,t=!1){return e&&(Ik(e.value)&&e.value!==""||t&&Ik(e.defaultValue)&&e.defaultValue!=="")}function dW(e){return e.startAdornment}function fW(e){return pt("MuiInputBase",e)}const pW=ht("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Ru=pW,hW=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Nv=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${be(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Av=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},mW=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:m,type:h}=e,g={root:["root",`color${be(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",f&&f!=="medium"&&`size${be(f)}`,u&&"multiline",m&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",h==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return ft(g,fW,t)},Dv=ke("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Nv})(({theme:e,ownerState:t})=>N({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Ru.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&N({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),Bv=ke("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Av})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=N({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),i={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return N({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Ru.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Ru.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),gW=v.jsx(ZO,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),vW=k.forwardRef(function(t,n){var r;const i=vt({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:m,endAdornment:h,fullWidth:g=!1,id:E,inputComponent:b="input",inputProps:w={},inputRef:y,maxRows:_,minRows:R,multiline:T=!1,name:C,onBlur:I,onChange:A,onClick:j,onFocus:$,onKeyDown:F,onKeyUp:z,placeholder:Y,readOnly:J,renderSuffix:Z,rows:pe,slotProps:G={},slots:V={},startAdornment:le,type:Le="text",value:Ge}=i,Te=Ie(i,hW),Ce=w.value!=null?w.value:Ge,{current:He}=k.useRef(Ce!=null),Re=k.useRef(),et=k.useCallback(Je=>{},[]),lt=an(Re,y,w.ref,et),[Pe,Rt]=k.useState(!1),at=Ka(),We=tc({props:i,muiFormControl:at,states:["color","disabled","error","hiddenLabel","size","required","filled"]});We.focused=at?at.focused:Pe,k.useEffect(()=>{!at&&f&&Pe&&(Rt(!1),I&&I())},[at,f,Pe,I]);const Ze=at&&at.onFilled,gt=at&&at.onEmpty,ee=k.useCallback(Je=>{zm(Je)?Ze&&Ze():gt&>()},[Ze,gt]);oi(()=>{He&&ee({value:Ce})},[Ce,ee,He]);const fe=Je=>{if(We.disabled){Je.stopPropagation();return}$&&$(Je),w.onFocus&&w.onFocus(Je),at&&at.onFocus?at.onFocus(Je):Rt(!0)},_e=Je=>{I&&I(Je),w.onBlur&&w.onBlur(Je),at&&at.onBlur?at.onBlur(Je):Rt(!1)},ze=(Je,...Oe)=>{if(!He){const tt=Je.target||Re.current;if(tt==null)throw new Error(Bl(1));ee({value:tt.value})}w.onChange&&w.onChange(Je,...Oe),A&&A(Je,...Oe)};k.useEffect(()=>{ee(Re.current)},[]);const W=Je=>{Re.current&&Je.currentTarget===Je.target&&Re.current.focus(),j&&j(Je)};let S=b,O=w;T&&S==="input"&&(pe?O=N({type:void 0,minRows:pe,maxRows:pe},O):O=N({type:void 0,maxRows:_,minRows:R},O),S=U9);const D=Je=>{ee(Je.animationName==="mui-auto-fill-cancel"?Re.current:{value:"x"})};k.useEffect(()=>{at&&at.setAdornedStart(!!le)},[at,le]);const K=N({},i,{color:We.color||"primary",disabled:We.disabled,endAdornment:h,error:We.error,focused:We.focused,formControl:at,fullWidth:g,hiddenLabel:We.hiddenLabel,multiline:T,size:We.size,startAdornment:le,type:Le}),Q=mW(K),de=V.root||c.Root||Dv,$e=G.root||u.root||{},rt=V.input||c.Input||Bv;return O=N({},O,(r=G.input)!=null?r:u.input),v.jsxs(k.Fragment,{children:[!m&&gW,v.jsxs(de,N({},$e,!Su(de)&&{ownerState:N({},K,$e.ownerState)},{ref:n,onClick:W},Te,{className:Ae(Q.root,$e.className,l,J&&"MuiInputBase-readOnly"),children:[le,v.jsx(Wx.Provider,{value:null,children:v.jsx(rt,N({ownerState:K,"aria-invalid":We.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:d,disabled:We.disabled,id:E,onAnimationStart:D,name:C,placeholder:Y,readOnly:J,required:We.required,rows:pe,value:Ce,onKeyDown:F,onKeyUp:z,type:Le},O,!Su(rt)&&{as:S,ownerState:N({},K,O.ownerState)},{ref:lt,className:Ae(Q.input,O.className,J&&"MuiInputBase-readOnly"),onBlur:_e,onChange:ze,onFocus:fe}))}),h,Z?Z(N({},We,{startAdornment:le})):null]}))]})}),Gx=vW;function yW(e){return pt("MuiInput",e)}const bW=N({},Ru,ht("MuiInput",["root","underline","input"])),bd=bW;function wW(e){return pt("MuiOutlinedInput",e)}const xW=N({},Ru,ht("MuiOutlinedInput",["root","notchedOutline","input"])),sa=xW;function SW(e){return pt("MuiFilledInput",e)}const _W=N({},Ru,ht("MuiFilledInput",["root","underline","input"])),ol=_W,CW=Gn(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function kW(e){return pt("MuiBadge",e)}const EW=ht("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),aa=EW,RW=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],c0=10,u0=4,PW=Wu(),TW=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:o,classes:s={}}=e,a={root:["root"],badge:["badge",o,r&&"invisible",`anchorOrigin${be(n.vertical)}${be(n.horizontal)}`,`anchorOrigin${be(n.vertical)}${be(n.horizontal)}${be(i)}`,`overlap${be(i)}`,t!=="default"&&`color${be(t)}`]};return ft(a,kW,s)},OW=ke("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),LW=ke("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${be(n.anchorOrigin.vertical)}${be(n.anchorOrigin.horizontal)}${be(n.overlap)}`],n.color!=="default"&&t[`color${be(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:c0*2,lineHeight:1,padding:"0 6px",height:c0*2,borderRadius:c0,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,i;return((r=e.vars)!=null?r:e).palette[n].main&&((i=e.vars)!=null?i:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:u0,height:u0*2,minWidth:u0*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${aa.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),jW=k.forwardRef(function(t,n){var r,i,o,s,a,l;const c=PW({props:t,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:f,components:m={},componentsProps:h={},children:g,overlap:E="rectangular",color:b="default",invisible:w=!1,max:y=99,badgeContent:_,slots:R,slotProps:T,showZero:C=!1,variant:I="standard"}=c,A=Ie(c,RW),{badgeContent:j,invisible:$,max:F,displayValue:z}=vU({max:y,invisible:w,badgeContent:_,showZero:C}),Y=wO({anchorOrigin:u,color:b,overlap:E,variant:I,badgeContent:_}),J=$||j==null&&I!=="dot",{color:Z=b,overlap:pe=E,anchorOrigin:G=u,variant:V=I}=J?Y:c,le=V!=="dot"?z:void 0,Le=N({},c,{badgeContent:j,invisible:J,max:F,displayValue:le,showZero:C,anchorOrigin:G,color:Z,overlap:pe,variant:V}),Ge=TW(Le),Te=(r=(i=R==null?void 0:R.root)!=null?i:m.Root)!=null?r:OW,Ce=(o=(s=R==null?void 0:R.badge)!=null?s:m.Badge)!=null?o:LW,He=(a=T==null?void 0:T.root)!=null?a:h.root,Re=(l=T==null?void 0:T.badge)!=null?l:h.badge,et=Po({elementType:Te,externalSlotProps:He,externalForwardedProps:A,additionalProps:{ref:n,as:f},ownerState:Le,className:Ae(He==null?void 0:He.className,Ge.root,d)}),lt=Po({elementType:Ce,externalSlotProps:Re,ownerState:Le,className:Ae(Ge.badge,Re==null?void 0:Re.className)});return v.jsxs(Te,N({},et,{children:[g,v.jsx(Ce,N({},lt,{children:le}))]}))}),IW=jW,MW=ht("MuiBox",["root"]),$W=MW,NW=Sx(),AW=U3({themeId:zl,defaultTheme:NW,defaultClassName:$W.root,generateClassName:yx.generate}),Zt=AW,DW=Gn(v.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),BW=["slots","slotProps"],FW=ke(Ro)(({theme:e})=>N({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":N({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":N({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:l1(e.palette.grey[200],.12)}:{backgroundColor:l1(e.palette.grey[600],.12)})})),zW=ke(DW)({width:24,height:16});function UW(e){const{slots:t={},slotProps:n={}}=e,r=Ie(e,BW),i=e;return v.jsx("li",{children:v.jsx(FW,N({focusRipple:!0},r,{ownerState:i,children:v.jsx(zW,N({as:t.CollapsedIcon,ownerState:i},n.collapsedIcon))}))})}function WW(e){return pt("MuiBreadcrumbs",e)}const GW=ht("MuiBreadcrumbs",["root","ol","li","separator"]),HW=GW,VW=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],KW=e=>{const{classes:t}=e;return ft({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},WW,t)},qW=ke(wt,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${HW.li}`]:t.li},t.root]})({}),YW=ke("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),QW=ke("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function XW(e,t,n,r){return e.reduce((i,o,s)=>(s{const I=()=>{E(!0);const A=_.current.querySelector("a[href],button,[tabindex]");A&&A.focus()};return d+u>=C.length?C:[...C.slice(0,d),v.jsx(UW,{"aria-label":c,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:y},onClick:I},"ellipsis"),...C.slice(C.length-u,C.length)]},T=k.Children.toArray(i).filter(C=>k.isValidElement(C)).map((C,I)=>v.jsx("li",{className:w.li,children:C},`child-${I}`));return v.jsx(qW,N({ref:n,component:s,color:"text.secondary",className:Ae(w.root,o),ownerState:b},h,{children:v.jsx(YW,{className:w.ol,ref:_,ownerState:b,children:XW(g||f&&T.length<=f?T:R(T),w.separator,m,b)})}))}),qa=JW;function ZW(e){return pt("MuiButton",e)}const eG=ht("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),mh=eG,tG=k.createContext({}),eL=tG,nG=k.createContext(void 0),tL=nG,rG=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],iG=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,a={root:["root",o,`${o}${be(t)}`,`size${be(i)}`,`${o}Size${be(i)}`,`color${be(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${be(i)}`],endIcon:["icon","endIcon",`iconSize${be(i)}`]},l=ft(a,ZW,s);return N({},s,l)},nL=e=>N({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),oG=ke(Ro,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${be(n.color)}`],t[`size${be(n.size)}`],t[`${n.variant}Size${be(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return N({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":N({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":N({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${mh.focusVisible}`]:N({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${mh.disabled}`]:N({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Mt(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${mh.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${mh.disabled}`]:{boxShadow:"none"}}),sG=ke("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${be(n.size)}`]]}})(({ownerState:e})=>N({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},nL(e))),aG=ke("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${be(n.size)}`]]}})(({ownerState:e})=>N({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},nL(e))),lG=k.forwardRef(function(t,n){const r=k.useContext(eL),i=k.useContext(tL),o=_x(r,t),s=vt({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:m=!1,endIcon:h,focusVisibleClassName:g,fullWidth:E=!1,size:b="medium",startIcon:w,type:y,variant:_="text"}=s,R=Ie(s,rG),T=N({},s,{color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:m,fullWidth:E,size:b,type:y,variant:_}),C=iG(T),I=w&&v.jsx(sG,{className:C.startIcon,ownerState:T,children:w}),A=h&&v.jsx(aG,{className:C.endIcon,ownerState:T,children:h}),j=i||"";return v.jsxs(oG,N({ownerState:T,className:Ae(r.className,C.root,u,j),component:c,disabled:d,focusRipple:!m,focusVisibleClassName:Ae(C.focusVisible,g),ref:n,type:y},R,{classes:C,children:[I,a,A]}))}),yn=lG;function cG(e){return pt("MuiButtonGroup",e)}const uG=ht("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),ar=uG,dG=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],fG=(e,t)=>{const{ownerState:n}=e;return[{[`& .${ar.grouped}`]:t.grouped},{[`& .${ar.grouped}`]:t[`grouped${be(n.orientation)}`]},{[`& .${ar.grouped}`]:t[`grouped${be(n.variant)}`]},{[`& .${ar.grouped}`]:t[`grouped${be(n.variant)}${be(n.orientation)}`]},{[`& .${ar.grouped}`]:t[`grouped${be(n.variant)}${be(n.color)}`]},{[`& .${ar.firstButton}`]:t.firstButton},{[`& .${ar.lastButton}`]:t.lastButton},{[`& .${ar.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},pG=e=>{const{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:o,orientation:s,variant:a}=e,l={root:["root",a,s==="vertical"&&"vertical",o&&"fullWidth",i&&"disableElevation"],grouped:["grouped",`grouped${be(s)}`,`grouped${be(a)}`,`grouped${be(a)}${be(s)}`,`grouped${be(a)}${be(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return ft(l,cG,t)},hG=ke("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:fG})(({theme:e,ownerState:t})=>N({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},t.orientation==="vertical"&&{flexDirection:"column"},{[`& .${ar.grouped}`]:N({minWidth:40,"&:hover":N({},t.variant==="contained"&&{boxShadow:"none"})},t.variant==="contained"&&{boxShadow:"none"}),[`& .${ar.firstButton},& .${ar.middleButton}`]:N({},t.orientation==="horizontal"&&{borderTopRightRadius:0,borderBottomRightRadius:0},t.orientation==="vertical"&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},t.variant==="text"&&t.orientation==="horizontal"&&{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ar.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="text"&&t.orientation==="vertical"&&{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ar.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="text"&&t.color!=="inherit"&&{borderColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:Mt(e.palette[t.color].main,.5)},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"transparent"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"transparent"},t.variant==="contained"&&t.orientation==="horizontal"&&{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ar.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="contained"&&t.orientation==="vertical"&&{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ar.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="contained"&&t.color!=="inherit"&&{borderColor:(e.vars||e).palette[t.color].dark},{"&:hover":N({},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"currentColor"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"currentColor"})}),[`& .${ar.lastButton},& .${ar.middleButton}`]:N({},t.orientation==="horizontal"&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t.orientation==="vertical"&&{borderTopRightRadius:0,borderTopLeftRadius:0},t.variant==="outlined"&&t.orientation==="horizontal"&&{marginLeft:-1},t.variant==="outlined"&&t.orientation==="vertical"&&{marginTop:-1})})),mG=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiButtonGroup"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:m="horizontal",size:h="medium",variant:g="outlined"}=r,E=Ie(r,dG),b=N({},r,{color:s,component:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:m,size:h,variant:g}),w=pG(b),y=k.useMemo(()=>({className:w.grouped,color:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:h,variant:g}),[s,l,c,u,d,f,h,g,w.grouped]),_=oF(i),R=_.length,T=C=>{const I=C===0,A=C===R-1;return I&&A?"":I?w.firstButton:A?w.lastButton:w.middleButton};return v.jsx(hG,N({as:a,role:"group",className:Ae(w.root,o),ref:n,ownerState:b},E,{children:v.jsx(eL.Provider,{value:y,children:_.map((C,I)=>v.jsx(tL.Provider,{value:T(I),children:C},I))})}))}),Df=mG;function gG(e){return pt("MuiCard",e)}ht("MuiCard",["root"]);const vG=["className","raised"],yG=e=>{const{classes:t}=e;return ft({root:["root"]},gG,t)},bG=ke(ss,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),wG=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=Ie(r,vG),a=N({},r,{raised:o}),l=yG(a);return v.jsx(bG,N({className:Ae(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))}),rL=wG;function xG(e){return pt("PrivateSwitchBase",e)}ht("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const SG=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],_G=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${be(i)}`],input:["input"]};return ft(o,xG,t)},CG=ke(Ro)(({ownerState:e})=>N({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),kG=ke("input",{shouldForwardProp:fr})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),EG=k.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:m,inputRef:h,name:g,onBlur:E,onChange:b,onFocus:w,readOnly:y,required:_=!1,tabIndex:R,type:T,value:C}=t,I=Ie(t,SG),[A,j]=xu({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),$=Ka(),F=V=>{w&&w(V),$&&$.onFocus&&$.onFocus(V)},z=V=>{E&&E(V),$&&$.onBlur&&$.onBlur(V)},Y=V=>{if(V.nativeEvent.defaultPrevented)return;const le=V.target.checked;j(le),b&&b(V,le)};let J=l;$&&typeof J>"u"&&(J=$.disabled);const Z=T==="checkbox"||T==="radio",pe=N({},t,{checked:A,disabled:J,disableFocusRipple:c,edge:u}),G=_G(pe);return v.jsxs(CG,N({component:"span",className:Ae(G.root,s),centerRipple:!0,focusRipple:!c,disabled:J,tabIndex:null,role:void 0,onFocus:F,onBlur:z,ownerState:pe,ref:n},I,{children:[v.jsx(kG,N({autoFocus:r,checked:i,defaultChecked:a,className:G.input,disabled:J,id:Z?f:void 0,name:g,onChange:Y,readOnly:y,ref:h,required:_,ownerState:pe,tabIndex:R,type:T},T==="checkbox"&&C===void 0?{}:{value:C},m)),A?o:d]}))}),iL=EG,RG=Gn(v.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),PG=Gn(v.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),TG=Gn(v.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function OG(e){return pt("MuiCheckbox",e)}const LG=ht("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),d0=LG,jG=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],IG=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${be(r)}`,`size${be(i)}`]},s=ft(o,OG,t);return N({},t,s)},MG=ke(iL,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${be(n.size)}`],n.color!=="default"&&t[`color${be(n.color)}`]]}})(({theme:e,ownerState:t})=>N({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${d0.checked}, &.${d0.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${d0.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),$G=v.jsx(PG,{}),NG=v.jsx(RG,{}),AG=v.jsx(TG,{}),DG=k.forwardRef(function(t,n){var r,i;const o=vt({props:t,name:"MuiCheckbox"}),{checkedIcon:s=$G,color:a="primary",icon:l=NG,indeterminate:c=!1,indeterminateIcon:u=AG,inputProps:d,size:f="medium",className:m}=o,h=Ie(o,jG),g=c?u:l,E=c?u:s,b=N({},o,{color:a,indeterminate:c,size:f}),w=IG(b);return v.jsx(MG,N({type:"checkbox",inputProps:N({"data-indeterminate":c},d),icon:k.cloneElement(g,{fontSize:(r=g.props.fontSize)!=null?r:f}),checkedIcon:k.cloneElement(E,{fontSize:(i=E.props.fontSize)!=null?i:f}),ownerState:b,ref:n,className:Ae(w.root,m)},h,{classes:w}))}),Vo=DG,BG=(e,t)=>N({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),FG=e=>N({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),zG=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,a])=>{var l;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=N({html:BG(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:N({margin:0},FG(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return o&&(i=[i,o]),i};function UG(e){const t=vt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return v.jsxs(k.Fragment,{children:[v.jsx(ZO,{styles:i=>zG(i,r)}),n]})}function WG(e){return pt("MuiDialog",e)}const GG=ht("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),f0=GG,HG=k.createContext({}),oL=HG,VG=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],KG=ke(TO,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),qG=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${be(n)}`],paper:["paper",`paperScroll${be(n)}`,`paperWidth${be(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return ft(s,WG,t)},YG=ke(Cv,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),QG=ke("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${be(n.scroll)}`]]}})(({ownerState:e})=>N({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),XG=ke(ss,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${be(n.scroll)}`],t[`paperWidth${be(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>N({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${f0.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${f0.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${f0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),JG=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiDialog"}),i=Pi(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:m=!1,fullWidth:h=!1,maxWidth:g="sm",onBackdropClick:E,onClick:b,onClose:w,open:y,PaperComponent:_=ss,PaperProps:R={},scroll:T="paper",TransitionComponent:C=PO,transitionDuration:I=o,TransitionProps:A}=r,j=Ie(r,VG),$=N({},r,{disableEscapeKeyDown:f,fullScreen:m,fullWidth:h,maxWidth:g,scroll:T}),F=qG($),z=k.useRef(),Y=G=>{z.current=G.target===G.currentTarget},J=G=>{b&&b(G),z.current&&(z.current=null,E&&E(G),w&&w(G,"backdropClick"))},Z=cp(a),pe=k.useMemo(()=>({titleId:Z}),[Z]);return v.jsx(YG,N({className:Ae(F.root,d),closeAfterTransition:!0,components:{Backdrop:KG},componentsProps:{backdrop:N({transitionDuration:I,as:l},c)},disableEscapeKeyDown:f,onClose:w,open:y,ref:n,onClick:J,ownerState:$},j,{children:v.jsx(C,N({appear:!0,in:y,timeout:I,role:"presentation"},A,{children:v.jsx(QG,{className:Ae(F.container),onMouseDown:Y,ownerState:$,children:v.jsx(XG,N({as:_,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":Z},R,{className:Ae(F.paper,R.className),ownerState:$,children:v.jsx(oL.Provider,{value:pe,children:u})}))})}))}))}),ZG=JG;function e7(e){return pt("MuiDialogContent",e)}ht("MuiDialogContent",["root","dividers"]);function t7(e){return pt("MuiDialogTitle",e)}const n7=ht("MuiDialogTitle",["root"]),r7=n7,i7=["className","dividers"],o7=e=>{const{classes:t,dividers:n}=e;return ft({root:["root",n&&"dividers"]},e7,t)},s7=ke("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>N({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${r7.root} + &`]:{paddingTop:0}})),a7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiDialogContent"}),{className:i,dividers:o=!1}=r,s=Ie(r,i7),a=N({},r,{dividers:o}),l=o7(a);return v.jsx(s7,N({className:Ae(l.root,i),ownerState:a,ref:n},s))}),l7=a7,c7=["className","id"],u7=e=>{const{classes:t}=e;return ft({root:["root"]},t7,t)},d7=ke(wt,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),f7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiDialogTitle"}),{className:i,id:o}=r,s=Ie(r,c7),a=r,l=u7(a),{titleId:c=o}=k.useContext(oL);return v.jsx(d7,N({component:"h2",className:Ae(l.root,i),ownerState:a,ref:n,variant:"h6",id:o??c},s))}),p7=f7;function h7(e){return pt("MuiFab",e)}const m7=ht("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),Mk=m7,g7=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],v7=e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,`size${be(i)}`,t==="inherit"?"colorInherit":t]},s=ft(o,h7,r);return N({},r,s)},y7=ke(Ro,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>fr(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${be(n.size)}`],n.color==="inherit"&&t.colorInherit,t[be(n.size)],t[n.color]]}})(({theme:e,ownerState:t})=>{var n,r;return N({},e.typography.button,{minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${Mk.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]}},t.size==="small"&&{width:40,height:40},t.size==="medium"&&{width:48,height:48},t.variant==="extended"&&{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},t.variant==="extended"&&t.size==="small"&&{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34},t.variant==="extended"&&t.size==="medium"&&{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40},t.color==="inherit"&&{color:"inherit"})},({theme:e,ownerState:t})=>N({},t.color!=="inherit"&&t.color!=="default"&&(e.vars||e).palette[t.color]!=null&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}}),({theme:e})=>({[`&.${Mk.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}})),b7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiFab"}),{children:i,className:o,color:s="default",component:a="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:f="circular"}=r,m=Ie(r,g7),h=N({},r,{color:s,component:a,disabled:l,disableFocusRipple:c,size:d,variant:f}),g=v7(h);return v.jsx(y7,N({className:Ae(g.root,o),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:Ae(g.focusVisible,u),ownerState:h,ref:n},m,{classes:g,children:i}))}),w7=b7,x7=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],S7=e=>{const{classes:t,disableUnderline:n}=e,i=ft({root:["root",!n&&"underline"],input:["input"]},SW,t);return N({},t,i)},_7=ke(Dv,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Nv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return N({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${ol.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${ol.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ol.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ol.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ol.disabled}, .${ol.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ol.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&N({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),C7=ke(Bv,{name:"MuiFilledInput",slot:"Input",overridesResolver:Av})(({theme:e,ownerState:t})=>N({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),sL=k.forwardRef(function(t,n){var r,i,o,s;const a=vt({props:t,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:f=!1,slotProps:m,slots:h={},type:g="text"}=a,E=Ie(a,x7),b=N({},a,{fullWidth:u,inputComponent:d,multiline:f,type:g}),w=S7(a),y={root:{ownerState:b},input:{ownerState:b}},_=m??c?Ur(y,m??c):y,R=(r=(i=h.root)!=null?i:l.Root)!=null?r:_7,T=(o=(s=h.input)!=null?s:l.Input)!=null?o:C7;return v.jsx(Gx,N({slots:{root:R,input:T},componentsProps:_,fullWidth:u,inputComponent:d,multiline:f,ref:n,type:g},E,{classes:w}))});sL.muiName="Input";const aL=sL;function k7(e){return pt("MuiFormControl",e)}ht("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const E7=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],R7=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${be(n)}`,r&&"fullWidth"]};return ft(i,k7,t)},P7=ke("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>N({},t.root,t[`margin${be(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>N({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),T7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:m="none",required:h=!1,size:g="medium",variant:E="outlined"}=r,b=Ie(r,E7),w=N({},r,{color:s,component:a,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:m,required:h,size:g,variant:E}),y=R7(w),[_,R]=k.useState(()=>{let z=!1;return i&&k.Children.forEach(i,Y=>{if(!Yd(Y,["Input","Select"]))return;const J=Yd(Y,["Select"])?Y.props.input:Y;J&&dW(J.props)&&(z=!0)}),z}),[T,C]=k.useState(()=>{let z=!1;return i&&k.Children.forEach(i,Y=>{Yd(Y,["Input","Select"])&&(zm(Y.props,!0)||zm(Y.props.inputProps,!0))&&(z=!0)}),z}),[I,A]=k.useState(!1);l&&I&&A(!1);const j=u!==void 0&&!l?u:I;let $;const F=k.useMemo(()=>({adornedStart:_,setAdornedStart:R,color:s,disabled:l,error:c,filled:T,focused:j,fullWidth:d,hiddenLabel:f,size:g,onBlur:()=>{A(!1)},onEmpty:()=>{C(!1)},onFilled:()=>{C(!0)},onFocus:()=>{A(!0)},registerEffect:$,required:h,variant:E}),[_,s,l,c,T,j,d,f,$,h,g,E]);return v.jsx(Wx.Provider,{value:F,children:v.jsx(P7,N({as:a,ownerState:w,className:Ae(y.root,o),ref:n},b,{children:i}))})}),hl=T7,O7=_F({createStyledComponent:ke("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>vt({props:e,name:"MuiStack"})}),Um=O7;function L7(e){return pt("MuiFormControlLabel",e)}const j7=ht("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),$d=j7,I7=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],M7=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${be(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return ft(s,L7,t)},$7=ke("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${$d.label}`]:t.label},t.root,t[`labelPlacement${be(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>N({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${$d.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${$d.label}`]:{[`&.${$d.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),N7=ke("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${$d.error}`]:{color:(e.vars||e).palette.error.main}})),A7=k.forwardRef(function(t,n){var r,i;const o=vt({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:a={},control:l,disabled:c,disableTypography:u,label:d,labelPlacement:f="end",required:m,slotProps:h={}}=o,g=Ie(o,I7),E=Ka(),b=(r=c??l.props.disabled)!=null?r:E==null?void 0:E.disabled,w=m??l.props.required,y={disabled:b,required:w};["checked","name","onChange","value","inputRef"].forEach(A=>{typeof l.props[A]>"u"&&typeof o[A]<"u"&&(y[A]=o[A])});const _=tc({props:o,muiFormControl:E,states:["error"]}),R=N({},o,{disabled:b,labelPlacement:f,required:w,error:_.error}),T=M7(R),C=(i=h.typography)!=null?i:a.typography;let I=d;return I!=null&&I.type!==wt&&!u&&(I=v.jsx(wt,N({component:"span"},C,{className:Ae(T.label,C==null?void 0:C.className),children:I}))),v.jsxs($7,N({className:Ae(T.root,s),ownerState:R,ref:n},g,{children:[k.cloneElement(l,y),w?v.jsxs(Um,{display:"block",children:[I,v.jsxs(N7,{ownerState:R,"aria-hidden":!0,className:T.asterisk,children:[" ","*"]})]}):I]}))}),Ko=A7;function D7(e){return pt("MuiFormHelperText",e)}const B7=ht("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),$k=B7;var Nk;const F7=["children","className","component","disabled","error","filled","focused","margin","required","variant"],z7=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=e,c={root:["root",i&&"disabled",o&&"error",r&&`size${be(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return ft(c,D7,t)},U7=ke("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${be(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>N({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${$k.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${$k.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),W7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=Ie(r,F7),l=Ka(),c=tc({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=N({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=z7(u);return v.jsx(U7,N({as:s,ownerState:u,className:Ae(d.root,o),ref:n},a,{children:i===" "?Nk||(Nk=v.jsx("span",{className:"notranslate",children:"​"})):i}))}),G7=W7;function H7(e){return pt("MuiFormLabel",e)}const V7=ht("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),ef=V7,K7=["children","className","color","component","disabled","error","filled","focused","required"],q7=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,l={root:["root",`color${be(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return ft(l,H7,t)},Y7=ke("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>N({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>N({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${ef.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${ef.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ef.error}`]:{color:(e.vars||e).palette.error.main}})),Q7=ke("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${ef.error}`]:{color:(e.vars||e).palette.error.main}})),X7=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=Ie(r,K7),l=Ka(),c=tc({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=N({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=q7(u);return v.jsxs(Y7,N({as:s,ownerState:u,className:Ae(d.root,o),ref:n},a,{children:[i,c.required&&v.jsxs(Q7,{ownerState:u,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),J7=X7,Z7=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function y1(e){return`scale(${e}, ${e**2})`}const eH={entering:{opacity:1,transform:y1(1)},entered:{opacity:1,transform:"none"}},p0=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),lL=k.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:m,style:h,timeout:g="auto",TransitionComponent:E=Sv}=t,b=Ie(t,Z7),w=ba(),y=k.useRef(),_=Pi(),R=k.useRef(null),T=an(R,o.ref,n),C=J=>Z=>{if(J){const pe=R.current;Z===void 0?J(pe):J(pe,Z)}},I=C(u),A=C((J,Z)=>{Lx(J);const{duration:pe,delay:G,easing:V}=Aa({style:h,timeout:g,easing:s},{mode:"enter"});let le;g==="auto"?(le=_.transitions.getAutoHeightDuration(J.clientHeight),y.current=le):le=pe,J.style.transition=[_.transitions.create("opacity",{duration:le,delay:G}),_.transitions.create("transform",{duration:p0?le:le*.666,delay:G,easing:V})].join(","),l&&l(J,Z)}),j=C(c),$=C(m),F=C(J=>{const{duration:Z,delay:pe,easing:G}=Aa({style:h,timeout:g,easing:s},{mode:"exit"});let V;g==="auto"?(V=_.transitions.getAutoHeightDuration(J.clientHeight),y.current=V):V=Z,J.style.transition=[_.transitions.create("opacity",{duration:V,delay:pe}),_.transitions.create("transform",{duration:p0?V:V*.666,delay:p0?pe:pe||V*.333,easing:G})].join(","),J.style.opacity=0,J.style.transform=y1(.75),d&&d(J)}),z=C(f),Y=J=>{g==="auto"&&w.start(y.current||0,J),r&&r(R.current,J)};return v.jsx(E,N({appear:i,in:a,nodeRef:R,onEnter:A,onEntered:j,onEntering:I,onExit:F,onExited:z,onExiting:$,addEndListener:Y,timeout:g==="auto"?null:g},b,{children:(J,Z)=>k.cloneElement(o,N({style:N({opacity:0,transform:y1(.75),visibility:J==="exited"&&!a?"hidden":void 0},eH[J],h,o.props.style),ref:T},Z))}))});lL.muiSupportAuto=!0;const Wm=lL,tH=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],nH=e=>{const{classes:t,disableUnderline:n}=e,i=ft({root:["root",!n&&"underline"],input:["input"]},yW,t);return N({},t,i)},rH=ke(Dv,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Nv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),N({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${bd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${bd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${bd.disabled}, .${bd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${bd.disabled}:before`]:{borderBottomStyle:"dotted"}})}),iH=ke(Bv,{name:"MuiInput",slot:"Input",overridesResolver:Av})({}),cL=k.forwardRef(function(t,n){var r,i,o,s;const a=vt({props:t,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:d=!1,inputComponent:f="input",multiline:m=!1,slotProps:h,slots:g={},type:E="text"}=a,b=Ie(a,tH),w=nH(a),_={root:{ownerState:{disableUnderline:l}}},R=h??u?Ur(h??u,_):_,T=(r=(i=g.root)!=null?i:c.Root)!=null?r:rH,C=(o=(s=g.input)!=null?s:c.Input)!=null?o:iH;return v.jsx(Gx,N({slots:{root:T,input:C},slotProps:R,fullWidth:d,inputComponent:f,multiline:m,ref:n,type:E},b,{classes:w}))});cL.muiName="Input";const uL=cL;function oH(e){return pt("MuiInputLabel",e)}ht("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const sH=["disableAnimation","margin","shrink","variant","className"],aH=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${be(r)}`,s],asterisk:[a&&"asterisk"]},c=ft(l,oH,t);return N({},t,c)},lH=ke(J7,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ef.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(({theme:e,ownerState:t})=>N({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&N({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&N({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&N({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),cH=k.forwardRef(function(t,n){const r=vt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=Ie(r,sH),l=Ka();let c=o;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=tc({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=N({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),f=aH(d);return v.jsx(lH,N({"data-shrink":c,ownerState:d,ref:n,className:Ae(f.root,s)},a,{classes:f}))}),dL=cH;function uH(e){return pt("MuiListItemIcon",e)}const dH=ht("MuiListItemIcon",["root","alignItemsFlexStart"]),Ak=dH,fH=["className"],pH=e=>{const{alignItems:t,classes:n}=e;return ft({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},uH,n)},hH=ke("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>N({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),mH=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiListItemIcon"}),{className:i}=r,o=Ie(r,fH),s=k.useContext(_o),a=N({},r,{alignItems:s.alignItems}),l=pH(a);return v.jsx(hH,N({className:Ae(l.root,i),ownerState:a,ref:n},o))}),gH=mH,vH=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function h0(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Dk(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function fL(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function wd(e,t,n,r,i,o){let s=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!fL(a,o)||l)a=i(e,a,n);else return a.focus(),!0}return!1}const yH=k.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=t,f=Ie(t,vH),m=k.useRef(null),h=k.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});oi(()=>{i&&m.current.focus()},[i]),k.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(y,{direction:_})=>{const R=!m.current.style.width;if(y.clientHeight{const _=m.current,R=y.key,T=Qn(_).activeElement;if(R==="ArrowDown")y.preventDefault(),wd(_,T,c,l,h0);else if(R==="ArrowUp")y.preventDefault(),wd(_,T,c,l,Dk);else if(R==="Home")y.preventDefault(),wd(_,null,c,l,h0);else if(R==="End")y.preventDefault(),wd(_,null,c,l,Dk);else if(R.length===1){const C=h.current,I=R.toLowerCase(),A=performance.now();C.keys.length>0&&(A-C.lastTime>500?(C.keys=[],C.repeating=!0,C.previousKeyMatched=!0):C.repeating&&I!==C.keys[0]&&(C.repeating=!1)),C.lastTime=A,C.keys.push(I);const j=T&&!C.repeating&&fL(T,C);C.previousKeyMatched&&(j||wd(_,T,!1,l,h0,C))?y.preventDefault():C.previousKeyMatched=!1}u&&u(y)},E=an(m,n);let b=-1;k.Children.forEach(s,(y,_)=>{if(!k.isValidElement(y)){b===_&&(b+=1,b>=s.length&&(b=-1));return}y.props.disabled||(d==="selectedMenu"&&y.props.selected||b===-1)&&(b=_),b===_&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(b+=1,b>=s.length&&(b=-1))});const w=k.Children.map(s,(y,_)=>{if(_===b){const R={};return o&&(R.autoFocus=!0),y.props.tabIndex===void 0&&d==="selectedMenu"&&(R.tabIndex=0),k.cloneElement(y,R)}return y});return v.jsx(Xd,N({role:"menu",ref:E,className:a,onKeyDown:g,tabIndex:i?0:-1},f,{children:w}))}),pL=yH;function bH(e){return pt("MuiPopover",e)}ht("MuiPopover",["root","paper"]);const wH=["onEntering"],xH=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],SH=["slotProps"];function Bk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Fk(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function zk(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function m0(e){return typeof e=="function"?e():e}const _H=e=>{const{classes:t}=e;return ft({root:["root"],paper:["paper"]},bH,t)},CH=ke(Cv,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),hL=ke(ss,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),kH=k.forwardRef(function(t,n){var r,i,o;const s=vt({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:f,className:m,container:h,elevation:g=8,marginThreshold:E=16,open:b,PaperProps:w={},slots:y,slotProps:_,transformOrigin:R={vertical:"top",horizontal:"left"},TransitionComponent:T=Wm,transitionDuration:C="auto",TransitionProps:{onEntering:I}={},disableScrollLock:A=!1}=s,j=Ie(s.TransitionProps,wH),$=Ie(s,xH),F=(r=_==null?void 0:_.paper)!=null?r:w,z=k.useRef(),Y=an(z,F.ref),J=N({},s,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:E,externalPaperSlotProps:F,transformOrigin:R,TransitionComponent:T,transitionDuration:C,TransitionProps:j}),Z=_H(J),pe=k.useCallback(()=>{if(d==="anchorPosition")return u;const Ze=m0(l),ee=(Ze&&Ze.nodeType===1?Ze:Qn(z.current).body).getBoundingClientRect();return{top:ee.top+Bk(ee,c.vertical),left:ee.left+Fk(ee,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),G=k.useCallback(Ze=>({vertical:Bk(Ze,R.vertical),horizontal:Fk(Ze,R.horizontal)}),[R.horizontal,R.vertical]),V=k.useCallback(Ze=>{const gt={width:Ze.offsetWidth,height:Ze.offsetHeight},ee=G(gt);if(d==="none")return{top:null,left:null,transformOrigin:zk(ee)};const fe=pe();let _e=fe.top-ee.vertical,ze=fe.left-ee.horizontal;const W=_e+gt.height,S=ze+gt.width,O=ts(m0(l)),D=O.innerHeight-E,K=O.innerWidth-E;if(E!==null&&_eD){const Q=W-D;_e-=Q,ee.vertical+=Q}if(E!==null&&zeK){const Q=S-K;ze-=Q,ee.horizontal+=Q}return{top:`${Math.round(_e)}px`,left:`${Math.round(ze)}px`,transformOrigin:zk(ee)}},[l,d,pe,G,E]),[le,Le]=k.useState(b),Ge=k.useCallback(()=>{const Ze=z.current;if(!Ze)return;const gt=V(Ze);gt.top!==null&&(Ze.style.top=gt.top),gt.left!==null&&(Ze.style.left=gt.left),Ze.style.transformOrigin=gt.transformOrigin,Le(!0)},[V]);k.useEffect(()=>(A&&window.addEventListener("scroll",Ge),()=>window.removeEventListener("scroll",Ge)),[l,A,Ge]);const Te=(Ze,gt)=>{I&&I(Ze,gt),Ge()},Ce=()=>{Le(!1)};k.useEffect(()=>{b&&Ge()}),k.useImperativeHandle(a,()=>b?{updatePosition:()=>{Ge()}}:null,[b,Ge]),k.useEffect(()=>{if(!b)return;const Ze=xv(()=>{Ge()}),gt=ts(l);return gt.addEventListener("resize",Ze),()=>{Ze.clear(),gt.removeEventListener("resize",Ze)}},[l,b,Ge]);let He=C;C==="auto"&&!T.muiSupportAuto&&(He=void 0);const Re=h||(l?Qn(m0(l)).body:void 0),et=(i=y==null?void 0:y.root)!=null?i:CH,lt=(o=y==null?void 0:y.paper)!=null?o:hL,Pe=Po({elementType:lt,externalSlotProps:N({},F,{style:le?F.style:N({},F.style,{opacity:0})}),additionalProps:{elevation:g,ref:Y},ownerState:J,className:Ae(Z.paper,F==null?void 0:F.className)}),Rt=Po({elementType:et,externalSlotProps:(_==null?void 0:_.root)||{},externalForwardedProps:$,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Re,open:b},ownerState:J,className:Ae(Z.root,m)}),{slotProps:at}=Rt,We=Ie(Rt,SH);return v.jsx(et,N({},We,!Su(et)&&{slotProps:at,disableScrollLock:A},{children:v.jsx(T,N({appear:!0,in:b,onEntering:Te,onExited:Ce,timeout:He},j,{children:v.jsx(lt,N({},Pe,{children:f}))}))}))}),EH=kH;function RH(e){return pt("MuiMenu",e)}ht("MuiMenu",["root","paper","list"]);const PH=["onEntering"],TH=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],OH={vertical:"top",horizontal:"right"},LH={vertical:"top",horizontal:"left"},jH=e=>{const{classes:t}=e;return ft({root:["root"],paper:["paper"],list:["list"]},RH,t)},IH=ke(EH,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),MH=ke(hL,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),$H=ke(pL,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),NH=k.forwardRef(function(t,n){var r,i;const o=vt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:f,PaperProps:m={},PopoverClasses:h,transitionDuration:g="auto",TransitionProps:{onEntering:E}={},variant:b="selectedMenu",slots:w={},slotProps:y={}}=o,_=Ie(o.TransitionProps,PH),R=Ie(o,TH),T=Ex(),C=N({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:E,PaperProps:m,transitionDuration:g,TransitionProps:_,variant:b}),I=jH(C),A=s&&!c&&f,j=k.useRef(null),$=(G,V)=>{j.current&&j.current.adjustStyleForScrollbar(G,{direction:T?"rtl":"ltr"}),E&&E(G,V)},F=G=>{G.key==="Tab"&&(G.preventDefault(),d&&d(G,"tabKeyDown"))};let z=-1;k.Children.map(a,(G,V)=>{k.isValidElement(G)&&(G.props.disabled||(b==="selectedMenu"&&G.props.selected||z===-1)&&(z=V))});const Y=(r=w.paper)!=null?r:MH,J=(i=y.paper)!=null?i:m,Z=Po({elementType:w.root,externalSlotProps:y.root,ownerState:C,className:[I.root,l]}),pe=Po({elementType:Y,externalSlotProps:J,ownerState:C,className:I.paper});return v.jsx(IH,N({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:T?"right":"left"},transformOrigin:T?OH:LH,slots:{paper:Y,root:w.root},slotProps:{root:Z,paper:pe},open:f,ref:n,transitionDuration:g,TransitionProps:N({onEntering:$},_),ownerState:C},R,{classes:h,children:v.jsx($H,N({onKeyDown:F,actions:j,autoFocus:s&&(z===-1||c),autoFocusItem:A,variant:b},u,{className:Ae(I.list,u.className),children:a}))}))}),Fv=NH;function AH(e){return pt("MuiMenuItem",e)}const DH=ht("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xd=DH,BH=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],FH=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},zH=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,l=ft({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},AH,s);return N({},s,l)},UH=ke(Ro,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:FH})(({theme:e,ownerState:t})=>N({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${xd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${xd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${xd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${xd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${xd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${yk.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${yk.inset}`]:{marginLeft:52},[`& .${Bm.root}`]:{marginTop:0,marginBottom:0},[`& .${Bm.inset}`]:{paddingLeft:36},[`& .${Ak.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&N({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Ak.root} svg`]:{fontSize:"1.25rem"}}))),WH=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f}=r,m=Ie(r,BH),h=k.useContext(_o),g=k.useMemo(()=>({dense:s||h.dense||!1,disableGutters:l}),[h.dense,s,l]),E=k.useRef(null);oi(()=>{i&&E.current&&E.current.focus()},[i]);const b=N({},r,{dense:g.dense,divider:a,disableGutters:l}),w=zH(r),y=an(E,n);let _;return r.disabled||(_=d!==void 0?d:-1),v.jsx(_o.Provider,{value:g,children:v.jsx(UH,N({ref:y,role:u,tabIndex:_,component:o,focusVisibleClassName:Ae(w.focusVisible,c),className:Ae(w.root,f)},m,{ownerState:b,classes:w}))})}),fi=WH;function GH(e){return pt("MuiNativeSelect",e)}const HH=ht("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Hx=HH,VH=["className","disabled","error","IconComponent","inputRef","variant"],KH=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${be(n)}`,o&&"iconOpen",r&&"disabled"]};return ft(a,GH,t)},mL=({ownerState:e,theme:t})=>N({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":N({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Hx.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),qH=ke("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:fr,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Hx.multiple}`]:t.multiple}]}})(mL),gL=({ownerState:e,theme:t})=>N({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Hx.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),YH=ke("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${be(n.variant)}`],n.open&&t.iconOpen]}})(gL),QH=k.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=t,c=Ie(t,VH),u=N({},t,{disabled:i,variant:l,error:o}),d=KH(u);return v.jsxs(k.Fragment,{children:[v.jsx(qH,N({ownerState:u,className:Ae(d.select,r),disabled:i,ref:a||n},c)),t.multiple?null:v.jsx(YH,{as:s,ownerState:u,className:d.icon})]})}),XH=QH;var Uk;const JH=["children","classes","className","label","notched"],ZH=ke("fieldset",{shouldForwardProp:fr})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),eV=ke("legend",{shouldForwardProp:fr})(({ownerState:e,theme:t})=>N({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&N({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function tV(e){const{className:t,label:n,notched:r}=e,i=Ie(e,JH),o=n!=null&&n!=="",s=N({},e,{notched:r,withLabel:o});return v.jsx(ZH,N({"aria-hidden":!0,className:t,ownerState:s},i,{children:v.jsx(eV,{ownerState:s,children:o?v.jsx("span",{children:n}):Uk||(Uk=v.jsx("span",{className:"notranslate",children:"​"}))})}))}const nV=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],rV=e=>{const{classes:t}=e,r=ft({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},wW,t);return N({},t,r)},iV=ke(Dv,{shouldForwardProp:e=>fr(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Nv})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return N({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${sa.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${sa.focused} .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${sa.error} .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${sa.disabled} .${sa.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&N({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),oV=ke(tV,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),sV=ke(Bv,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Av})(({theme:e,ownerState:t})=>N({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),vL=k.forwardRef(function(t,n){var r,i,o,s,a;const l=vt({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:f,multiline:m=!1,notched:h,slots:g={},type:E="text"}=l,b=Ie(l,nV),w=rV(l),y=Ka(),_=tc({props:l,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),R=N({},l,{color:_.color||"primary",disabled:_.disabled,error:_.error,focused:_.focused,formControl:y,fullWidth:u,hiddenLabel:_.hiddenLabel,multiline:m,size:_.size,type:E}),T=(r=(i=g.root)!=null?i:c.Root)!=null?r:iV,C=(o=(s=g.input)!=null?s:c.Input)!=null?o:sV;return v.jsx(Gx,N({slots:{root:T,input:C},renderSuffix:I=>v.jsx(oV,{ownerState:R,className:w.notchedOutline,label:f!=null&&f!==""&&_.required?a||(a=v.jsxs(k.Fragment,{children:[f," ","*"]})):f,notched:typeof h<"u"?h:!!(I.startAdornment||I.filled||I.focused)}),fullWidth:u,inputComponent:d,multiline:m,ref:n,type:E},b,{classes:N({},w,{notchedOutline:null})}))});vL.muiName="Input";const yL=vL;function aV(e){return pt("MuiSelect",e)}const Sd=ht("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Wk;const lV=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],cV=ke("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Sd.select}`]:t.select},{[`&.${Sd.select}`]:t[n.variant]},{[`&.${Sd.error}`]:t.error},{[`&.${Sd.multiple}`]:t.multiple}]}})(mL,{[`&.${Sd.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),uV=ke("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${be(n.variant)}`],n.open&&t.iconOpen]}})(gL),dV=ke("input",{shouldForwardProp:e=>mO(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Gk(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function fV(e){return e==null||typeof e=="string"&&!e.trim()}const pV=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${be(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return ft(a,aV,t)},hV=k.forwardRef(function(t,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:m,error:h=!1,IconComponent:g,inputRef:E,labelId:b,MenuProps:w={},multiple:y,name:_,onBlur:R,onChange:T,onClose:C,onFocus:I,onOpen:A,open:j,readOnly:$,renderValue:F,SelectDisplayProps:z={},tabIndex:Y,value:J,variant:Z="standard"}=t,pe=Ie(t,lV),[G,V]=xu({controlled:J,default:d,name:"Select"}),[le,Le]=xu({controlled:j,default:u,name:"Select"}),Ge=k.useRef(null),Te=k.useRef(null),[Ce,He]=k.useState(null),{current:Re}=k.useRef(j!=null),[et,lt]=k.useState(),Pe=an(n,E),Rt=k.useCallback(Xe=>{Te.current=Xe,Xe&&He(Xe)},[]),at=Ce==null?void 0:Ce.parentNode;k.useImperativeHandle(Pe,()=>({focus:()=>{Te.current.focus()},node:Ge.current,value:G}),[G]),k.useEffect(()=>{u&&le&&Ce&&!Re&&(lt(a?null:at.clientWidth),Te.current.focus())},[Ce,a]),k.useEffect(()=>{s&&Te.current.focus()},[s]),k.useEffect(()=>{if(!b)return;const Xe=Qn(Te.current).getElementById(b);if(Xe){const yt=()=>{getSelection().isCollapsed&&Te.current.focus()};return Xe.addEventListener("click",yt),()=>{Xe.removeEventListener("click",yt)}}},[b]);const We=(Xe,yt)=>{Xe?A&&A(yt):C&&C(yt),Re||(lt(a?null:at.clientWidth),Le(Xe))},Ze=Xe=>{Xe.button===0&&(Xe.preventDefault(),Te.current.focus(),We(!0,Xe))},gt=Xe=>{We(!1,Xe)},ee=k.Children.toArray(l),fe=Xe=>{const yt=ee.find(Ne=>Ne.props.value===Xe.target.value);yt!==void 0&&(V(yt.props.value),T&&T(Xe,yt))},_e=Xe=>yt=>{let Ne;if(yt.currentTarget.hasAttribute("tabindex")){if(y){Ne=Array.isArray(G)?G.slice():[];const Vt=G.indexOf(Xe.props.value);Vt===-1?Ne.push(Xe.props.value):Ne.splice(Vt,1)}else Ne=Xe.props.value;if(Xe.props.onClick&&Xe.props.onClick(yt),G!==Ne&&(V(Ne),T)){const Vt=yt.nativeEvent||yt,bn=new Vt.constructor(Vt.type,Vt);Object.defineProperty(bn,"target",{writable:!0,value:{value:Ne,name:_}}),T(bn,Xe)}y||We(!1,yt)}},ze=Xe=>{$||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Xe.key)!==-1&&(Xe.preventDefault(),We(!0,Xe))},W=Ce!==null&&le,S=Xe=>{!W&&R&&(Object.defineProperty(Xe,"target",{writable:!0,value:{value:G,name:_}}),R(Xe))};delete pe["aria-invalid"];let O,D;const K=[];let Q=!1;(zm({value:G})||m)&&(F?O=F(G):Q=!0);const de=ee.map(Xe=>{if(!k.isValidElement(Xe))return null;let yt;if(y){if(!Array.isArray(G))throw new Error(Bl(2));yt=G.some(Ne=>Gk(Ne,Xe.props.value)),yt&&Q&&K.push(Xe.props.children)}else yt=Gk(G,Xe.props.value),yt&&Q&&(D=Xe.props.children);return k.cloneElement(Xe,{"aria-selected":yt?"true":"false",onClick:_e(Xe),onKeyUp:Ne=>{Ne.key===" "&&Ne.preventDefault(),Xe.props.onKeyUp&&Xe.props.onKeyUp(Ne)},role:"option",selected:yt,value:void 0,"data-value":Xe.props.value})});Q&&(y?K.length===0?O=null:O=K.reduce((Xe,yt,Ne)=>(Xe.push(yt),Ne{const{classes:t}=e;return t},Vx={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>fr(e)&&e!=="variant",slot:"Root"},bV=ke(uL,Vx)(""),wV=ke(yL,Vx)(""),xV=ke(aL,Vx)(""),bL=k.forwardRef(function(t,n){const r=vt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=CW,id:d,input:f,inputProps:m,label:h,labelId:g,MenuProps:E,multiple:b=!1,native:w=!1,onClose:y,onOpen:_,open:R,renderValue:T,SelectDisplayProps:C,variant:I="outlined"}=r,A=Ie(r,gV),j=w?XH:mV,$=Ka(),F=tc({props:r,muiFormControl:$,states:["variant","error"]}),z=F.variant||I,Y=N({},r,{variant:z,classes:s}),J=yV(Y),Z=Ie(J,vV),pe=f||{standard:v.jsx(bV,{ownerState:Y}),outlined:v.jsx(wV,{label:h,ownerState:Y}),filled:v.jsx(xV,{ownerState:Y})}[z],G=an(n,pe.ref);return v.jsx(k.Fragment,{children:k.cloneElement(pe,N({inputComponent:j,inputProps:N({children:o,error:F.error,IconComponent:u,variant:z,type:void 0,multiple:b},w?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:E,onClose:y,onOpen:_,open:R,renderValue:T,SelectDisplayProps:N({id:d},C)},m,{classes:m?Ur(Z,m.classes):Z},f?f.props.inputProps:{})},(b&&w||c)&&z==="outlined"?{notched:!0}:{},{ref:G,className:Ae(pe.props.className,a,J.root)},!f&&{variant:z},A))})});bL.muiName="Select";const Xc=bL;function SV(e){return pt("MuiSnackbarContent",e)}ht("MuiSnackbarContent",["root","message","action"]);const _V=["action","className","message","role"],CV=e=>{const{classes:t}=e;return ft({root:["root"],action:["action"],message:["message"]},SV,t)},kV=ke(ss,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=l1(e.palette.background.default,t);return N({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),EV=ke("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),RV=ke("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),PV=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert"}=r,l=Ie(r,_V),c=r,u=CV(c);return v.jsxs(kV,N({role:a,square:!0,elevation:6,className:Ae(u.root,o),ownerState:c,ref:n},l,{children:[v.jsx(EV,{className:u.message,ownerState:c,children:s}),i?v.jsx(RV,{className:u.action,ownerState:c,children:i}):null]}))}),TV=PV;function OV(e){return pt("MuiSnackbar",e)}ht("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const LV=["onEnter","onExited"],jV=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],IV=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${be(n.vertical)}${be(n.horizontal)}`]};return ft(r,OV,t)},Hk=ke("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${be(n.anchorOrigin.vertical)}${be(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return N({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:N({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),MV=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiSnackbar"}),i=Pi(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:m,disableWindowBlurListener:h=!1,message:g,open:E,TransitionComponent:b=Wm,transitionDuration:w=o,TransitionProps:{onEnter:y,onExited:_}={}}=r,R=Ie(r.TransitionProps,LV),T=Ie(r,jV),C=N({},r,{anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:b,transitionDuration:w}),I=IV(C),{getRootProps:A,onClickAway:j}=D9(N({},C)),[$,F]=k.useState(!0),z=Po({elementType:Hk,getSlotProps:A,externalForwardedProps:T,ownerState:C,additionalProps:{ref:n},className:[I.root,d]}),Y=Z=>{F(!0),_&&_(Z)},J=(Z,pe)=>{F(!1),y&&y(Z,pe)};return!E&&$?null:v.jsx(SU,N({onClickAway:j},f,{children:v.jsx(Hk,N({},z,{children:v.jsx(b,N({appear:!0,in:E,timeout:w,direction:a==="top"?"down":"up",onEnter:J,onExited:Y},R,{children:u||v.jsx(TV,N({message:g,action:s},m))}))}))}))}),$V=MV;function NV(e){return pt("MuiTooltip",e)}const AV=ht("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),wa=AV,DV=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function BV(e){return Math.round(e*1e5)/1e5}const FV=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${be(o.split("-")[0])}`],arrow:["arrow"]};return ft(s,NV,t)},zV=ke(XO,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>N({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${wa.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${wa.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${wa.arrow}`]:N({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${wa.arrow}`]:N({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),UV=ke("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${be(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>N({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Mt(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${BV(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${wa.popper}[data-popper-placement*="left"] &`]:N({transformOrigin:"right center"},t.isRtl?N({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):N({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${wa.popper}[data-popper-placement*="right"] &`]:N({transformOrigin:"left center"},t.isRtl?N({marginRight:"14px"},t.touch&&{marginRight:"24px"}):N({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${wa.popper}[data-popper-placement*="top"] &`]:N({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${wa.popper}[data-popper-placement*="bottom"] &`]:N({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),WV=ke("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Mt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let gh=!1;const Vk=new lp;let _d={x:0,y:0};function vh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const GV=k.forwardRef(function(t,n){var r,i,o,s,a,l,c,u,d,f,m,h,g,E,b,w,y,_,R;const T=vt({props:t,name:"MuiTooltip"}),{arrow:C=!1,children:I,components:A={},componentsProps:j={},describeChild:$=!1,disableFocusListener:F=!1,disableHoverListener:z=!1,disableInteractive:Y=!1,disableTouchListener:J=!1,enterDelay:Z=100,enterNextDelay:pe=0,enterTouchDelay:G=700,followCursor:V=!1,id:le,leaveDelay:Le=0,leaveTouchDelay:Ge=1500,onClose:Te,onOpen:Ce,open:He,placement:Re="bottom",PopperComponent:et,PopperProps:lt={},slotProps:Pe={},slots:Rt={},title:at,TransitionComponent:We=Wm,TransitionProps:Ze}=T,gt=Ie(T,DV),ee=k.isValidElement(I)?I:v.jsx("span",{children:I}),fe=Pi(),_e=Ex(),[ze,W]=k.useState(),[S,O]=k.useState(null),D=k.useRef(!1),K=Y||V,Q=ba(),de=ba(),$e=ba(),rt=ba(),[Je,Oe]=xu({controlled:He,default:!1,name:"Tooltip",state:"open"});let tt=Je;const xt=cp(le),Ht=k.useRef(),Xe=Wi(()=>{Ht.current!==void 0&&(document.body.style.WebkitUserSelect=Ht.current,Ht.current=void 0),rt.clear()});k.useEffect(()=>Xe,[Xe]);const yt=St=>{Vk.clear(),gh=!0,Oe(!0),Ce&&!tt&&Ce(St)},Ne=Wi(St=>{Vk.start(800+Le,()=>{gh=!1}),Oe(!1),Te&&tt&&Te(St),Q.start(fe.transitions.duration.shortest,()=>{D.current=!1})}),Vt=St=>{D.current&&St.type!=="touchstart"||(ze&&ze.removeAttribute("title"),de.clear(),$e.clear(),Z||gh&&pe?de.start(gh?pe:Z,()=>{yt(St)}):yt(St))},bn=St=>{de.clear(),$e.start(Le,()=>{Ne(St)})},{isFocusVisibleRef:hr,onBlur:Ue,onFocus:oo,ref:so}=wv(),[,Kr]=k.useState(!1),Io=St=>{Ue(St),hr.current===!1&&(Kr(!1),bn(St))},Mo=St=>{ze||W(St.currentTarget),oo(St),hr.current===!0&&(Kr(!0),Vt(St))},se=St=>{D.current=!0;const hn=ee.props;hn.onTouchStart&&hn.onTouchStart(St)},ge=St=>{se(St),$e.clear(),Q.clear(),Xe(),Ht.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",rt.start(G,()=>{document.body.style.WebkitUserSelect=Ht.current,Vt(St)})},we=St=>{ee.props.onTouchEnd&&ee.props.onTouchEnd(St),Xe(),$e.start(Ge,()=>{Ne(St)})};k.useEffect(()=>{if(!tt)return;function St(hn){(hn.key==="Escape"||hn.key==="Esc")&&Ne(hn)}return document.addEventListener("keydown",St),()=>{document.removeEventListener("keydown",St)}},[Ne,tt]);const je=an(ee.ref,so,W,n);!at&&at!==0&&(tt=!1);const qe=k.useRef(),ct=St=>{const hn=ee.props;hn.onMouseMove&&hn.onMouseMove(St),_d={x:St.clientX,y:St.clientY},qe.current&&qe.current.update()},Fe={},Be=typeof at=="string";$?(Fe.title=!tt&&Be&&!z?at:null,Fe["aria-describedby"]=tt?xt:null):(Fe["aria-label"]=Be?at:null,Fe["aria-labelledby"]=tt&&!Be?xt:null);const ut=N({},Fe,gt,ee.props,{className:Ae(gt.className,ee.props.className),onTouchStart:se,ref:je},V?{onMouseMove:ct}:{}),dt={};J||(ut.onTouchStart=ge,ut.onTouchEnd=we),z||(ut.onMouseOver=vh(Vt,ut.onMouseOver),ut.onMouseLeave=vh(bn,ut.onMouseLeave),K||(dt.onMouseOver=Vt,dt.onMouseLeave=bn)),F||(ut.onFocus=vh(Mo,ut.onFocus),ut.onBlur=vh(Io,ut.onBlur),K||(dt.onFocus=Mo,dt.onBlur=Io));const ln=k.useMemo(()=>{var St;let hn=[{name:"arrow",enabled:!!S,options:{element:S,padding:4}}];return(St=lt.popperOptions)!=null&&St.modifiers&&(hn=hn.concat(lt.popperOptions.modifiers)),N({},lt.popperOptions,{modifiers:hn})},[S,lt]),Lt=N({},T,{isRtl:_e,arrow:C,disableInteractive:K,placement:Re,PopperComponentProp:et,touch:D.current}),mt=FV(Lt),jt=(r=(i=Rt.popper)!=null?i:A.Popper)!=null?r:zV,Gt=(o=(s=(a=Rt.transition)!=null?a:A.Transition)!=null?s:We)!=null?o:Wm,Hn=(l=(c=Rt.tooltip)!=null?c:A.Tooltip)!=null?l:UV,Jn=(u=(d=Rt.arrow)!=null?d:A.Arrow)!=null?u:WV,rr=Yc(jt,N({},lt,(f=Pe.popper)!=null?f:j.popper,{className:Ae(mt.popper,lt==null?void 0:lt.className,(m=(h=Pe.popper)!=null?h:j.popper)==null?void 0:m.className)}),Lt),Vn=Yc(Gt,N({},Ze,(g=Pe.transition)!=null?g:j.transition),Lt),li=Yc(Hn,N({},(E=Pe.tooltip)!=null?E:j.tooltip,{className:Ae(mt.tooltip,(b=(w=Pe.tooltip)!=null?w:j.tooltip)==null?void 0:b.className)}),Lt),En=Yc(Jn,N({},(y=Pe.arrow)!=null?y:j.arrow,{className:Ae(mt.arrow,(_=(R=Pe.arrow)!=null?R:j.arrow)==null?void 0:_.className)}),Lt);return v.jsxs(k.Fragment,{children:[k.cloneElement(ee,ut),v.jsx(jt,N({as:et??XO,placement:Re,anchorEl:V?{getBoundingClientRect:()=>({top:_d.y,left:_d.x,right:_d.x,bottom:_d.y,width:0,height:0})}:ze,popperRef:qe,open:ze?tt:!1,id:xt,transition:!0},dt,rr,{popperOptions:ln,children:({TransitionProps:St})=>v.jsx(Gt,N({timeout:fe.transitions.duration.shorter},St,Vn,{children:v.jsxs(Hn,N({},li,{children:[at,C?v.jsx(Jn,N({},En,{ref:O})):null]}))}))}))]})}),Qh=GV;function HV(e){return pt("MuiSwitch",e)}const Br=ht("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),VV=["className","color","edge","size","sx"],KV=Wu(),qV=e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:s}=e,a={root:["root",n&&`edge${be(n)}`,`size${be(r)}`],switchBase:["switchBase",`color${be(i)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=ft(a,HV,t);return N({},t,l)},YV=ke("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${be(n.edge)}`],t[`size${be(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Br.thumb}`]:{width:16,height:16},[`& .${Br.switchBase}`]:{padding:4,[`&.${Br.checked}`]:{transform:"translateX(16px)"}}}}]}),QV=ke(iL,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Br.input}`]:t.input},n.color!=="default"&&t[`color${be(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Br.checked}`]:{transform:"translateX(20px)"},[`&.${Br.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Br.checked} + .${Br.track}`]:{opacity:.5},[`&.${Br.disabled} + .${Br.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Br.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${Br.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Br.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Mm(e.palette[t].main,.62):Im(e.palette[t].main,.55)}`}},[`&.${Br.checked} + .${Br.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),XV=ke("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),JV=ke("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),ZV=k.forwardRef(function(t,n){const r=KV({props:t,name:"MuiSwitch"}),{className:i,color:o="primary",edge:s=!1,size:a="medium",sx:l}=r,c=Ie(r,VV),u=N({},r,{color:o,edge:s,size:a}),d=qV(u),f=v.jsx(JV,{className:d.thumb,ownerState:u});return v.jsxs(YV,{className:Ae(d.root,i),sx:l,ownerState:u,children:[v.jsx(QV,N({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u},c,{classes:N({},d,{root:d.switchBase})})),v.jsx(XV,{className:d.track,ownerState:u})]})}),eK=ZV;function tK(e){return pt("MuiTextField",e)}ht("MuiTextField",["root"]);const nK=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],rK={standard:uL,filled:aL,outlined:yL},iK=e=>{const{classes:t}=e;return ft({root:["root"]},tK,t)},oK=ke(hl,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),sK=k.forwardRef(function(t,n){const r=vt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:m=!1,helperText:h,id:g,InputLabelProps:E,inputProps:b,InputProps:w,inputRef:y,label:_,maxRows:R,minRows:T,multiline:C=!1,name:I,onBlur:A,onChange:j,onFocus:$,placeholder:F,required:z=!1,rows:Y,select:J=!1,SelectProps:Z,type:pe,value:G,variant:V="outlined"}=r,le=Ie(r,nK),Le=N({},r,{autoFocus:o,color:l,disabled:u,error:d,fullWidth:m,multiline:C,required:z,select:J,variant:V}),Ge=iK(Le),Te={};V==="outlined"&&(E&&typeof E.shrink<"u"&&(Te.notched=E.shrink),Te.label=_),J&&((!Z||!Z.native)&&(Te.id=void 0),Te["aria-describedby"]=void 0);const Ce=cp(g),He=h&&Ce?`${Ce}-helper-text`:void 0,Re=_&&Ce?`${Ce}-label`:void 0,et=rK[V],lt=v.jsx(et,N({"aria-describedby":He,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:C,name:I,rows:Y,maxRows:R,minRows:T,type:pe,value:G,id:Ce,inputRef:y,onBlur:A,onChange:j,onFocus:$,placeholder:F,inputProps:b},Te,w));return v.jsxs(oK,N({className:Ae(Ge.root,a),disabled:u,error:d,fullWidth:m,ref:n,required:z,color:l,variant:V,ownerState:Le},le,{children:[_!=null&&_!==""&&v.jsx(dL,N({htmlFor:Ce,id:Re},E,{children:_})),J?v.jsx(Xc,N({"aria-describedby":He,id:Ce,labelId:Re,value:G,input:lt},Z,{children:s})):lt,h&&v.jsx(G7,N({id:He},f,{children:h}))]}))}),aK=sK;function Kk(e,t){for(var n=0;nr[e]:r=>{for(var i=r,o=0;o"u")return i}return i}}function en(e){return Object.assign({},e)}function fK(e){return Object.keys(e)[0]}function Gm(e,t=!1){if(!e)return e;if(!t&&Array.isArray(e))return e.sort((r,i)=>typeof r=="string"&&typeof i=="string"?r.localeCompare(i):typeof r=="object"?1:-1).map(r=>Gm(r,t));if(typeof e=="object"&&!Array.isArray(e)){var n={};return Object.keys(e).sort((r,i)=>r.localeCompare(i)).forEach(r=>{n[r]=Gm(e[r],t)}),n}return e}function b1(e){if(!e||e===null||typeof e!="object")return e;if(Array.isArray(e)){for(var t=new Array(e.length),n=t.length;n--;)t[n]=b1(e[n]);return t}var r={};for(var i in e)r[i]=b1(e[i]);return r}var Ji=b1;function Rs(e,t,n){return Object.defineProperty(e,t,{get:function(){return n}}),n}var qx=1;function Gu(){return{lwt:qx}}function To(){return""}function pK(e){return Object.assign({},e,{_meta:void 0,_deleted:void 0,_rev:void 0})}function hK(e,t,n){if(t.length!==n.length)return!1;for(var r=0,i=t.length;r>>2]>>>24-n%4*8&255;this.words[this.sigBytes+n>>>2]|=r<<24-(this.sigBytes+n)%4*8}else for(let n=0;n>>2]=t.words[n>>>2];return this.sigBytes+=t.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new ja([...this.words])}}const mK={stringify(e){const t=[];for(let n=0;n>>2]>>>24-n%4*8&255;t.push((r>>>4).toString(16),(r&15).toString(16))}return t.join("")}},gK={parse(e){const t=e.length,n=[];for(let r=0;r>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new ja(n,t)}},vK={parse(e){return gK.parse(unescape(encodeURIComponent(e)))}};class yK{constructor(){this._data=new ja,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new ja,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=vK.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_doProcessBlock(t,n){}_process(t){let n,r=this._data.sigBytes/(this.blockSize*4);t?r=Math.ceil(r):r=Math.max((r|0)-this._minBufferSize,0);const i=r*this.blockSize,o=Math.min(i*4,this._data.sigBytes);if(i){for(let s=0;s>>7)^(y<<14|y>>>18)^y>>>3,R=sl[f-2],T=(R<<15|R>>>17)^(R<<13|R>>>19)^R>>>10;sl[f]=_+sl[f-7]+T+sl[f-16]}const m=l&c^~l&u,h=i&o^i&s^o&s,g=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),E=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),b=d+E+m+wK[f]+sl[f],w=g+h;d=u,u=c,c=l,l=a+b|0,a=s,s=o,o=i,i=b+w|0}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+l|0,r[5]=r[5]+c|0,r[6]=r[6]+u|0,r[7]=r[7]+d|0}finalize(t){super.finalize(t);const n=this._nDataBytes*8,r=this._data.sigBytes*8;return this._data.words[r>>>5]|=128<<24-r%32,this._data.words[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),this._data.words[(r+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function SK(e){return new xK().finalize(e).toString()}function _K(e){return Promise.resolve(SK(e))}async function CK(e){var t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t),r=Array.prototype.map.call(new Uint8Array(n),i=>("00"+i.toString(16)).slice(-2)).join("");return r}var kK=typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof crypto.subtle.digest=="function",xL=kK?CK:_K;function EK(){return new Promise(e=>setTimeout(e,0))}function SL(e=0){return new Promise(t=>setTimeout(t,e))}function RK(e){return e&&typeof e.then=="function"?e:Promise.resolve(e)}var zv=Promise.resolve(!0),wo=Promise.resolve(!1),PK=Promise.resolve(null),yi=Promise.resolve();function _L(e=1e4){return typeof requestIdleCallback=="function"?new Promise(t=>{requestIdleCallback(()=>t(),{timeout:e})}):SL(0)}var v0=yi;function TK(e=void 0){return v0=v0.then(()=>_L(e)),v0}function OK(e,t){return e.reduce((n,r)=>n.then(r),Promise.resolve(t))}var LK=/\./g,Yk="abcdefghijklmnopqrstuvwxyz";function nc(e=10){for(var t="",n=0;n{var t=typeof e;return e!==null&&(t==="object"||t==="function")},y0=new Set(["__proto__","prototype","constructor"]),jK=new Set("0123456789");function kL(e){var t=[],n="",r="start",i=!1;for(var o of e)switch(o){case"\\":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd")throw new Error("Invalid character after an index");i&&(n+=o),r="property",i=!i;break}case".":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd"){r="property";break}if(i){i=!1,n+=o;break}if(y0.has(n))return[];t.push(n),n="",r="property";break}case"[":{if(r==="index")throw new Error("Invalid character in an index");if(r==="indexEnd"){r="index";break}if(i){i=!1,n+=o;break}if(r==="property"){if(y0.has(n))return[];t.push(n),n=""}r="index";break}case"]":{if(r==="index"){t.push(Number.parseInt(n,10)),n="",r="indexEnd";break}if(r==="indexEnd")throw new Error("Invalid character after an index")}default:{if(r==="index"&&!jK.has(o))throw new Error("Invalid character in an index");if(r==="indexEnd")throw new Error("Invalid character after an index");r==="start"&&(r="property"),i&&(i=!1,n+="\\"),n+=o}}switch(i&&(n+="\\"),r){case"property":{if(y0.has(n))return[];t.push(n);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function EL(e,t){if(typeof t!="number"&&Array.isArray(e)){var n=Number.parseInt(t,10);return Number.isInteger(n)&&e[n]===e[t]}return!1}function IK(e,t){if(EL(e,t))throw new Error("Cannot use string index")}function Ba(e,t,n){if(Array.isArray(t)&&(t=t.join(".")),!t.includes(".")&&!t.includes("["))return e[t];if(!w1(e)||typeof t!="string")return n===void 0?e:n;var r=kL(t);if(r.length===0)return n;for(var i=0;i"u")throw new Error("missing value from map "+t);return n}function As(e,t,n,r){var i=e.get(t);return typeof i>"u"?(i=n(),e.set(t,i)):r&&r(i),i}function un(e){var t=e.split("-"),n="RxDB";return t.forEach(r=>{n+=CL(r)}),n+="Plugin",new Error(`You are using a function which must be overwritten by a plugin. + You should either prevent the usage of this function or add the plugin via: + import { `+n+" } from 'rxdb/plugins/"+e+`'; + addRxPlugin(`+n+`); + `)}function Qk(e){var t={name:e.name,message:e.message,rxdb:e.rxdb,parameters:e.parameters,extensions:e.extensions,code:e.code,url:e.url,stack:e.stack?e.stack.replace(/\n/g,` + `):void 0};return t}var b0=0;function ur(){var e=Date.now();e=e+.01,e<=b0&&(e=b0+.01);var t=parseFloat(e.toFixed(2));return b0=t,t}function bt(e,t){if(!e)throw t||(t=""),new Error("ensureNotFalsy() is falsy: "+t);return e}var Yx={bufferSize:1,refCount:!0},PL="15.24.0",w0={},MK="6da4936d1425ff3a5c44c02342c6daf791d266be3ae8479b8ec59e261df41b93";function x1(e){return x1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x1(e)}function $K(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function TL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TL=function(){return!!e})()}function NK(e,t,n){if(TL())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&$f(i,n.prototype),i}function Vm(e){var t=typeof Map=="function"?new Map:void 0;return Vm=function(r){if(r===null||!$K(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return NK(r,arguments,x1(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),$f(i,r)},Vm(e)}var _n={isDevMode(){return!1},deepFreezeWhenDevMode(e){return e},tunnelErrorMessage(e){return"RxDB Error-Code "+e+`. + Error messages are not included in RxDB core to reduce build size. + `}};function AK(e){var t="";return Object.keys(e).length===0||(t+=`Given parameters: { +`,t+=Object.keys(e).map(n=>{var r="[object Object]";try{n==="errors"?r=e[n].map(i=>JSON.stringify(i,Object.getOwnPropertyNames(i))):r=JSON.stringify(e[n],function(i,o){return o===void 0?null:o},2)}catch{}return n+":"+r}).join(` +`),t+="}"),t}function OL(e,t,n){return"RxError ("+t+`): +`+e+` +`+AK(n)}var DK=function(e){function t(r,i,o={}){var s,a=OL(i,r,o);return s=e.call(this,a)||this,s.code=r,s.message=a,s.url=Qx(r),s.parameters=o,s.rxdb=!0,s}up(t,e);var n=t.prototype;return n.toString=function(){return this.message},Vs(t,[{key:"name",get:function(){return"RxError ("+this.code+")"}},{key:"typeError",get:function(){return!1}}])}(Vm(Error)),BK=function(e){function t(r,i,o={}){var s,a=OL(i,r,o);return s=e.call(this,a)||this,s.code=r,s.message=a,s.url=Qx(r),s.parameters=o,s.rxdb=!0,s}up(t,e);var n=t.prototype;return n.toString=function(){return this.message},Vs(t,[{key:"name",get:function(){return"RxTypeError ("+this.code+")"}},{key:"typeError",get:function(){return!0}}])}(Vm(TypeError));function Qx(e){return"https://rxdb.info/errors.html?console=errors#"+e}function LL(e){return` + You can find out more about this error here: `+Qx(e)+" "}function ot(e,t){return new DK(e,_n.tunnelErrorMessage(e)+LL(e),t)}function mi(e,t){return new BK(e,_n.tunnelErrorMessage(e)+LL(e),t)}function Uv(e){return e&&e.status===409?e:!1}var FK={409:"document write conflict",422:"schema validation error",510:"attachment data missing"};function zK(e){return ot("COL20",{name:FK[e.status],document:e.documentId,writeError:e})}var Ff={preAddRxPlugin:[],preCreateRxDatabase:[],createRxDatabase:[],preCreateRxCollection:[],createRxCollection:[],createRxState:[],postDestroyRxCollection:[],postRemoveRxCollection:[],preCreateRxSchema:[],createRxSchema:[],preCreateRxQuery:[],prePrepareQuery:[],createRxDocument:[],postCreateRxDocument:[],preCreateRxStorageInstance:[],preStorageWrite:[],preMigrateDocument:[],postMigrateDocument:[],preDestroyRxDatabase:[],postRemoveRxDatabase:[],preReplicationMasterWrite:[],preReplicationMasterWriteDocumentsHandle:[]};function Zi(e,t){Ff[e].length>0&&Ff[e].forEach(n=>n(t))}function Wl(e,t){return Promise.all(Ff[e].map(n=>n(t)))}function Tu(e,t){var n=t;n=n.replace(LK,".properties."),n="properties."+n,n=Nd(n);var r=Ba(e,n);return r}function UK(e,t,n){if(typeof t.primaryKey=="string")return n;var r=Ya(t,n),i=n[e];if(i&&i!==r)throw ot("DOC19",{args:{documentData:n,existingPrimary:i,newPrimary:r},schema:t});return n[e]=r,n}function jo(e){return typeof e=="string"?e:e.key}function WK(e){var t=jo(e.primaryKey),n=Tu(e,t);return bt(n.maxLength)}function Ya(e,t){if(typeof e.primaryKey=="string")return t[e.primaryKey];var n=e.primaryKey;return n.fields.map(r=>{var i=Ba(t,r);if(typeof i>"u")throw ot("DOC18",{args:{field:r,documentData:t}});return i}).join(n.separator)}function GK(e){var t=Gm(e,!0);return t}function HK(e){return["_deleted",e]}function Wv(e){e=en(e);var t=jo(e.primaryKey);e.properties=en(e.properties),e.additionalProperties=!1,Object.prototype.hasOwnProperty.call(e,"keyCompression")||(e.keyCompression=!1),e.indexes=e.indexes?e.indexes.slice(0):[],e.required=e.required?e.required.slice(0):[],e.encrypted=e.encrypted?e.encrypted.slice(0):[],e.properties._rev={type:"string",minLength:1},e.properties._attachments={type:"object"},e.properties._deleted={type:"boolean"},e.properties._meta=VK,e.required=e.required?e.required.slice(0):[],e.required.push("_deleted"),e.required.push("_rev"),e.required.push("_meta"),e.required.push("_attachments");var n=jL(e);Pu(e.required,n),e.required=e.required.filter(o=>!o.includes(".")).filter((o,s,a)=>a.indexOf(o)===s),e.version=e.version||0;var r=e.indexes.map(o=>{var s=Kx(o)?o.slice(0):[o];return s.includes(t)||s.push(t),s[0]!=="_deleted"&&s.unshift("_deleted"),s});r.length===0&&r.push(HK(t)),r.push(["_meta.lwt",t]),e.internalIndexes&&e.internalIndexes.map(o=>{r.push(o)});var i=new Set;return r.filter(o=>{var s=o.join(",");return i.has(s)?!1:(i.add(s),!0)}),e.indexes=r,e}var VK={type:"object",properties:{lwt:{type:"number",minimum:qx,maximum:1e15,multipleOf:.01}},additionalProperties:!0,required:["lwt"]};function jL(e){var t=Object.keys(e.properties).filter(r=>e.properties[r].final),n=jo(e.primaryKey);return t.push(n),typeof e.primaryKey!="string"&&e.primaryKey.fields.forEach(r=>t.push(r)),t}function KK(e,t){for(var n=Object.keys(e.defaultValues),r=0;r"u")&&(t[i]=e.defaultValues[i])}return t}var IL=function(){function e(n,r){this.jsonSchema=n,this.hashFunction=r,this.indexes=qK(this.jsonSchema),this.primaryPath=jo(this.jsonSchema.primaryKey),this.finalFields=jL(this.jsonSchema)}var t=e.prototype;return t.validateChange=function(r,i){this.finalFields.forEach(o=>{if(!Hm(r[o],i[o]))throw ot("DOC9",{dataBefore:r,dataAfter:i,fieldName:o,schema:this.jsonSchema})})},t.getDocumentPrototype=function(){var r={},i=Tu(this.jsonSchema,"");return Object.keys(i).forEach(o=>{var s=o;r.__defineGetter__(o,function(){if(!(!this.get||typeof this.get!="function")){var a=this.get(s);return a}}),Object.defineProperty(r,o+"$",{get:function(){return this.get$(s)},enumerable:!1,configurable:!1}),Object.defineProperty(r,o+"$$",{get:function(){return this.get$$(s)},enumerable:!1,configurable:!1}),Object.defineProperty(r,o+"_",{get:function(){return this.populate(s)},enumerable:!1,configurable:!1})}),Rs(this,"getDocumentPrototype",()=>r),r},t.getPrimaryOfDocumentData=function(r){return Ya(this.jsonSchema,r)},Vs(e,[{key:"version",get:function(){return this.jsonSchema.version}},{key:"defaultValues",get:function(){var n={};return Object.entries(this.jsonSchema.properties).filter(([,r])=>Object.prototype.hasOwnProperty.call(r,"default")).forEach(([r,i])=>n[r]=i.default),Rs(this,"defaultValues",n)}},{key:"hash",get:function(){return Rs(this,"hash",this.hashFunction(JSON.stringify(this.jsonSchema)))}}])}();function qK(e){return(e.indexes||[]).map(t=>Kx(t)?t:[t])}function YK(e,t,n=!0){n&&Zi("preCreateRxSchema",e);var r=Wv(e);r=GK(r),_n.deepFreezeWhenDevMode(r);var i=new IL(r,t);return Zi("createRxSchema",i),i}function Nn(e){return typeof e=="function"}function QK(e){return Nn(e==null?void 0:e.lift)}function Ks(e){return function(t){if(QK(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}var S1=function(e,t){return S1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},S1(e,t)};function rc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");S1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function XK(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):i(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function ML(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=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 Gl(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Hl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r1||a(f,m)})})}function a(f,m){try{l(r[f](m))}catch(h){d(o[0][3],h)}}function l(f){f.value instanceof su?Promise.resolve(f.value.v).then(c,u):d(o[0][2],f)}function c(f){a("next",f)}function u(f){a("throw",f)}function d(f,m){f(m),o.shift(),o.length&&a(o[0][0],o[0][1])}}function ZK(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Ou=="function"?Ou(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){s=e[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var $L=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function NL(e){return Nn(e==null?void 0:e.then)}function Xx(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var x0=Xx(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription: +`+n.map(function(r,i){return i+1+") "+r.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=n}});function _1(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Gv=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Ou(s),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var u=this.initialTeardown;if(Nn(u))try{u()}catch(g){o=g instanceof x0?g.errors:[g]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=Ou(d),m=f.next();!m.done;m=f.next()){var h=m.value;try{Xk(h)}catch(g){o=o??[],g instanceof x0?o=Hl(Hl([],Gl(o)),Gl(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new x0(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Xk(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&_1(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&_1(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),AL=Gv.EMPTY;function DL(e){return e instanceof Gv||e&&"closed"in e&&Nn(e.remove)&&Nn(e.add)&&Nn(e.unsubscribe)}function Xk(e){Nn(e)?e():e.unsubscribe()}var BL={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},FL={setTimeout:function(e,t){for(var n=[],r=2;r0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,s=i.isStopped,a=i.observers;return o||s?AL:(this.currentObservers=null,a.push(n),new Gv(function(){r.currentObservers=null,_1(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,s=r.isStopped;i?n.error(o):s&&n.complete()},t.prototype.asObservable=function(){var n=new si;return n.source=this,n},t.create=function(n,r){return new tE(n,r)},t}(si),tE=function(e){rc(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:AL},t}(Ln);function nE(){for(var e=[],t=0;t0&&(u=new Lu({next:function(T){return R.next(T)},error:function(T){g=!0,E(),d=_0(b,i,T),R.error(T)},complete:function(){h=!0,E(),d=_0(b,s),R.complete()}}),Qa(y).subscribe(u))})(c)}}function _0(e,t){for(var n=[],r=2;r!!e.queryParams.limit,Yq=e=>e.queryParams.limit===1,Qq=e=>!!(e.queryParams.skip&&e.queryParams.skip>0),Xq=e=>e.changeEvent.operation==="DELETE",Jq=e=>e.changeEvent.operation==="INSERT",Zq=e=>e.changeEvent.operation==="UPDATE",eY=e=>ij(e)&&e.previousResults.length>=e.queryParams.limit,tY=e=>{const t=e.queryParams.sortFields,n=e.changeEvent.previous,r=e.changeEvent.doc;if(!r)return!1;if(!n)return!0;for(let i=0;i{const t=e.changeEvent.id;if(e.keyDocumentMap)return e.keyDocumentMap.has(t);{const n=e.queryParams.primaryKey,r=e.previousResults;for(let i=0;i{const t=e.previousResults[0];return!!(t&&t[e.queryParams.primaryKey]===e.changeEvent.id)},iY=e=>{const t=iS(e.previousResults);return!!(t&&t[e.queryParams.primaryKey]===e.changeEvent.id)},oY=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=e.previousResults[0];return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)<0:!1},sY=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=iS(e.previousResults);return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)>0:!1},aY=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=e.previousResults[0];return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)<0:!1},lY=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=iS(e.previousResults);return n?n[e.queryParams.primaryKey]===e.changeEvent.id?!0:e.queryParams.sortComparator(t,n)>0:!1},cY=e=>{const t=e.changeEvent.previous;return t?e.queryParams.queryMatcher(t):!1},uY=e=>{const t=e.changeEvent.doc;return t?e.queryParams.queryMatcher(t):!1},dY=e=>e.previousResults.length===0,fY={0:Jq,1:Zq,2:Xq,3:ij,4:Yq,5:Qq,6:dY,7:eY,8:rY,9:iY,10:tY,11:nY,12:oY,13:sY,14:aY,15:lY,16:cY,17:uY};function pY(e,t,n,r){var i=e.length,o=i-1,s=0;if(i===0)return e.push(t),0;for(var a;r<=o;)s=r+(o-r>>1),a=e[s],n(a,t)<=0?r=s+1:o=s-1;return n(a,t)<=0&&s++,e.splice(s,0,t),s}const hY=e=>{},oS=e=>{e.previousResults.unshift(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},sS=e=>{e.previousResults.push(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},aS=e=>{const t=e.previousResults.shift();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},lS=e=>{const t=e.previousResults.pop();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},mY=e=>{aS(e),sS(e)},gY=e=>{lS(e),oS(e)},vY=e=>{aS(e),oS(e)},yY=e=>{lS(e),sS(e)},oj=e=>{e.keyDocumentMap&&e.keyDocumentMap.delete(e.changeEvent.id);const t=e.queryParams.primaryKey,n=e.previousResults;for(let r=0;r{const t=e.changeEvent.doc,n=e.queryParams.primaryKey,r=e.previousResults;for(let i=0;i{const t={_id:"wrongHuman"+new Date().getTime()};e.previousResults.length=0,e.previousResults.push(t),e.keyDocumentMap&&(e.keyDocumentMap.clear(),e.keyDocumentMap.set(t._id,t))},sj=e=>{const t=e.changeEvent.id,n=e.changeEvent.doc;if(e.keyDocumentMap){if(e.keyDocumentMap.has(t))return;e.keyDocumentMap.set(t,n)}else if(e.previousResults.find(i=>i[e.queryParams.primaryKey]===t))return;pY(e.previousResults,n,e.queryParams.sortComparator,0)},xY=e=>{oj(e),sj(e)},SY=e=>{throw new Error("Action runFullQueryAgain must be implemented by yourself")},_Y=e=>{throw new Error("Action unknownAction should never be called")},CY=["doNothing","insertFirst","insertLast","removeFirstItem","removeLastItem","removeFirstInsertLast","removeLastInsertFirst","removeFirstInsertFirst","removeLastInsertLast","removeExisting","replaceExisting","alwaysWrong","insertAtSortPosition","removeExistingAndInsertAtSortPosition","runFullQueryAgain","unknownAction"],kY={doNothing:hY,insertFirst:oS,insertLast:sS,removeFirstItem:aS,removeLastItem:lS,removeFirstInsertLast:mY,removeLastInsertFirst:gY,removeFirstInsertFirst:vY,removeLastInsertLast:yY,removeExisting:oj,replaceExisting:bY,alwaysWrong:wY,insertAtSortPosition:sj,removeExistingAndInsertAtSortPosition:xY,runFullQueryAgain:SY,unknownAction:_Y},EY=40;function C0(e){return e.charCodeAt(0)-EY}function RY(e){return e?"1":"0"}function iE(e,t){const n=[];for(let r=0,i=e.length;rTY(LY(),fY,e);function IY(e){const t=jY(e);return CY[t]}function MY(e,t,n,r,i){const o=kY[e];return o({queryParams:t,changeEvent:n,previousResults:r,keyDocumentMap:i}),r}var au="￿",lu=Number.MIN_SAFE_INTEGER;function $Y(e,t){var n=t.selector,r=e.indexes?e.indexes.slice(0):[];t.index&&(r=[t.index]);var i=!!t.sort.find(u=>Object.values(u)[0]==="desc"),o=new Set;Object.keys(n).forEach(u=>{var d=Tu(e,u);d&&d.type==="boolean"&&Object.prototype.hasOwnProperty.call(n[u],"$eq")&&o.add(u)});var s=t.sort.map(u=>Object.keys(u)[0]),a=s.filter(u=>!o.has(u)).join(","),l=-1,c;if(r.forEach(u=>{var d=!0,f=!0,m=u.map(w=>{var y=n[w],_=y?Object.keys(y):[],R={};if(!y||!_.length){var T=f?lu:au;R={startKey:T,endKey:d?au:lu,inclusiveStart:!0,inclusiveEnd:!0}}else _.forEach(C=>{if(cS.has(C)){var I=y[C],A=BY(C,I);R=Object.assign(R,A)}});return typeof R.startKey>"u"&&(R.startKey=lu),typeof R.endKey>"u"&&(R.endKey=au),typeof R.inclusiveStart>"u"&&(R.inclusiveStart=!0),typeof R.inclusiveEnd>"u"&&(R.inclusiveEnd=!0),f&&!R.inclusiveStart&&(f=!1),d&&!R.inclusiveEnd&&(d=!1),R}),h=m.map(w=>w.startKey),g=m.map(w=>w.endKey),E={index:u,startKeys:h,endKeys:g,inclusiveEnd:d,inclusiveStart:f,sortSatisfiedByIndex:!i&&a===u.filter(w=>!o.has(w)).join(","),selectorSatisfiedByIndex:DY(u,t.selector,h,g)},b=FY(e,t,E);(b>=l||t.index)&&(l=b,c=E)}),!c)throw ot("SNH",{query:t});return c}var cS=new Set(["$eq","$gt","$gte","$lt","$lte"]),NY=new Set(["$eq","$gt","$gte"]),AY=new Set(["$eq","$lt","$lte"]);function DY(e,t,n,r){var i=Object.entries(t),o=i.find(([C,I])=>{if(!e.includes(C))return!0;var A=Object.entries(I).find(([j,$])=>!cS.has(j));return A});if(o||t.$and||t.$or)return!1;var s=[],a=new Set;for(var[l,c]of Object.entries(t)){if(!e.includes(l))return!1;var u=Object.keys(c).filter(C=>NY.has(C));if(u.length>1)return!1;var d=u[0];if(d&&a.add(l),d!=="$eq"){if(s.length>0)return!1;s.push(d)}}var f=[],m=new Set;for(var[h,g]of Object.entries(t)){if(!e.includes(h))return!1;var E=Object.keys(g).filter(C=>AY.has(C));if(E.length>1)return!1;var b=E[0];if(b&&m.add(h),b!=="$eq"){if(f.length>0)return!1;f.push(b)}}var w=0;for(var y of e){for(var _ of[a,m]){if(!_.has(y)&&_.size>0)return!1;_.delete(y)}var R=n[w],T=r[w];if(R!==T&&a.size>0&&m.size>0)return!1;w++}return!0}function BY(e,t){switch(e){case"$eq":return{startKey:t,endKey:t,inclusiveEnd:!0,inclusiveStart:!0};case"$lte":return{endKey:t,inclusiveEnd:!0};case"$gte":return{startKey:t,inclusiveStart:!0};case"$lt":return{endKey:t,inclusiveEnd:!1};case"$gt":return{startKey:t,inclusiveStart:!1};default:throw new Error("SNH")}}function FY(e,t,n){var r=0,i=u=>{u>0&&(r=r+u)},o=10,s=g0(n.startKeys,u=>u!==lu&&u!==au);i(s*o);var a=g0(n.startKeys,u=>u!==au&&u!==lu);i(a*o);var l=g0(n.startKeys,(u,d)=>u===n.endKeys[d]);i(l*o*1.5);var c=n.sortSatisfiedByIndex?5:0;return i(c),r}class Hu extends Error{}const zY=2147483647,UY=-2147483648,WY=Number.MAX_SAFE_INTEGER,GY=Number.MIN_SAFE_INTEGER,Kl=Symbol("missing"),aj=Object.freeze(new Error("mingo: cycle detected while processing object/array")),HY=Object.getPrototypeOf([]),lj=Object.getPrototypeOf({}),VY="[object Object]",KY=/^\[object ([a-zA-Z0-9]+)\]$/;class uS{}class dS{}const ql=e=>e===null?uS:e===void 0?dS:e.constructor,Vv=e=>{const t=ZY(e);let n=0,r=t.length;for(;r;)n=(n<<5)-n^t.charCodeAt(--r);return n>>>0},cj=new Set(["null","undefined","boolean","number","string","date","regexp"]),oE=new Set([dS,uS,Boolean,String,Number]),Cd=e=>e.toString(),po=e=>`${ql(e).name}[${e.toString()}]`,Yl=new Map([[Number,Cd],[Boolean,Cd],[RegExp,Cd],[Function,Cd],[Symbol,Cd],[Date,e=>e.toISOString()],[String,JSON.stringify],[uS,e=>"null"],[dS,e=>"undefined"],[Int8Array,po],[Uint8Array,po],[Uint8ClampedArray,po],[Int16Array,po],[Uint16Array,po],[Int32Array,po],[Uint32Array,po],[Float32Array,po],[Float64Array,po]]);typeof BigInt<"u"&&Yl.set(BigInt,e=>"0x"+e.toString(16));typeof BigInt64Array<"u"&&Yl.set(BigInt64Array,po);typeof BigUint64Array<"u"&&Yl.set(BigUint64Array,po);const qY={null:0,undefined:0,number:1,string:2,object:3,array:4,boolean:5,date:6,regexp:7,function:8},Oo=(e,t)=>{e===Kl&&(e=void 0),t===Kl&&(t=void 0);const[n,r]=[e,t].map(i=>qY[Uf(i).toLowerCase()]);return n!==r?n-r:n===1||n===2||n===6?et?1:0:Ql(e,t)?0:et?1:0};function Vi(e,t){if(!e)throw new Hu(t)}const YY=e=>{const t=Object.getPrototypeOf(ql(e));return t&&t.name==="TypedArray"},sE=e=>{if(oE.has(ql(e)))return e;const t=new Set,n=r=>{if(t.has(r))throw aj;const i=ql(r);if(oE.has(i))return r;try{if(Rr(r))return t.add(r),r.map(n);if(Xn(r)){t.add(r);const o={};for(const s in r)o[s]=n(r[s]);return o}}finally{t.delete(r)}return i===Date||i===RegExp||YY(r)?new i(r):r};return n(e)},Uf=e=>KY.exec(Object.prototype.toString.call(e))[1],E0=e=>typeof e=="boolean",Ds=e=>typeof e=="string",ga=e=>!isNaN(e)&&typeof e=="number",Rr=Array.isArray,Xn=e=>{if(!e)return!1;const t=Object.getPrototypeOf(e);return(t===lj||t===null)&&VY===Object.prototype.toString.call(e)},Kv=e=>e===Object(e),aE=e=>e instanceof Date,Jh=e=>e instanceof RegExp,qv=e=>typeof e=="function",Pr=e=>e==null,ju=(e,t)=>e.includes(t),uj=(e,t)=>!ju(e,t),QY=(e,t=!0)=>!!e||t&&e==="",Vu=e=>Pr(e)||Ds(e)&&!e||e instanceof Array&&e.length===0||Xn(e)&&Object.keys(e).length===0,lE=e=>e===Kl,gp=e=>e instanceof Array?e:[e],Ia=(e,t)=>!!e&&Object.prototype.hasOwnProperty.call(e,t),XY=(e,t)=>Xn(e)&&Xn(t)||Rr(e)&&Rr(t);function C1(e,t,n){if(n=n||{flatten:!1},lE(e)||Pr(e))return t;if(lE(t)||Pr(t))return e;if(!XY(e,t)){if(n.skipValidation)return t||e;throw Error("mismatched types. must both be array or object")}if(n.skipValidation=!0,Rr(e)){const r=e,i=t;if(n.flatten){let o=0,s=0;for(;o{const o=pj(r,t);n.has(o)?n.get(o).some(s=>Ql(e[s],r))||n.get(o).push(i):n.set(o,[i])}),n}function dj(e,t=Vv){if(e.some(a=>a.length==0))return[];if(e.length===1)return Array.from(e);const n=eQ(e.map((a,l)=>[l,a.length]),a=>a[1]),r=e[n[0][0]],i=cE(r,t),o=new Map,s=new Array;return i.forEach((a,l)=>{const c=a.map(m=>r[m]),u=c.map(m=>0),d=c.map(m=>[n[0][0],0]);let f=!1;for(let m=1;mE[w]);f=c.map((w,y)=>b.some((_,R)=>{const T=u[y];return Ql(w,_)&&(u[y]++,hm===e.length-1?[c[h],d[h]]:Kl).filter(m=>m!==Kl))}),s.sort((a,l)=>{const[c,[u,d]]=a,[f,[m,h]]=l,g=Oo(u,m);return g!==0?g:Oo(d,h)}).map(a=>a[0])}function fj(e,t=0){const n=new Array;function r(i,o){for(let s=0,a=i.length;s0||o<0)?r(i[s],Math.max(-1,o-1)):n.push(i[s])}return r(e,t),n}const JY=e=>{let[t,n]=[Object.getPrototypeOf(e),Object.getOwnPropertyNames(e)],r=t;for(;!n.length&&t!==lj&&t!==HY;)r=t,n=Object.getOwnPropertyNames(t),t=Object.getPrototypeOf(t);const i={};return n.forEach(o=>i[o]=e[o]),[i,r]};function Ql(e,t){const n=[[e,t]];for(;n.length>0;){if([e,t]=n.pop(),e===t)continue;const r=ql(e);if(r!==ql(t)||qv(e))return!1;if(Yl.has(r)){const i=Yl.get(r);if(i(e)!==i(t))return!1;continue}if(r===Array||r===Object){const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length||new Set(i.concat(o)).size!=i.length)return!1;for(const s of i)n.push([e[s],t[s]]);continue}return!1}return!n.length}function ZY(e){const t=new Set,n=r=>{const i=ql(r);if(Yl.has(i))return Yl.get(i)(r);const o=i===Object?"":i.name;if(qv(r.toJSON))return`${o}(${JSON.stringify(r)})`;if(t.has(r))throw aj;t.add(r);try{if(i===Array)return"["+r.map(n).join(",")+"]";if(i!==Object){const[a,l]=JY(r);if(Rr(r))return`${o}${n([...r,a])}`;r=a}const s=Object.keys(r);return s.sort(),`${o}{`+s.map(a=>`${a}:${n(r[a])}`).join(",")+"}"}finally{t.delete(r)}};return n(e)}function pj(e,t){return t=t||Vv,Pr(e)?null:t(e).toString()}function eQ(e,t,n=Oo){if(Vu(e))return e;const r=new Array,i=new Array;for(let o=0;on(o[0],s[0])),vp(i,r.map(o=>o[1]))}function tQ(e,t,n=Vv){if(e.length<1)return new Map;const r=new Map,i=new Map;for(let o=0;oQl(u,a)):null;Pr(c)?(i.set(a,[s]),r.has(l)?r.get(l).push(a):r.set(l,[a])):i.get(c).push(s)}}return i}const R0=5e4;function vp(e,...t){return e instanceof Array?t.reduce((n,r)=>{let i=Math.ceil(r.length/R0),o=0;for(;i-- >0;)Array.prototype.push.apply(n,r.slice(o,o+R0)),o+=R0;return n},e):t.filter(Kv).reduce((n,r)=>(Object.assign(n,r),n),e)}function k1(e,t){return Kv(e)?e[t]:void 0}function nQ(e,t){if(t<1)return e;for(;t--&&e.length===1;)e=e[0];return e}function fS(e,t,n){let r=0;function i(s,a){let l=s;for(let c=0;c0)break;r+=1;const f=a.slice(c);l=l.reduce((m,h)=>{const g=i(h,f);return g!==void 0&&m.push(g),m},[]);break}else l=k1(l,u);if(l===void 0)break}return l}const o=cj.has(Uf(e).toLowerCase())?e:i(e,t.split("."));return o instanceof Array&&(n!=null&&n.unwrapArray)?nQ(o,r):o}function Zh(e,t,n){const r=t.split("."),i=r[0],o=r.slice(1).join("."),s=/^\d+$/.exec(i)!==null,a=r.length>1;let l,c;if(e instanceof Array)if(s)l=k1(e,Number(i)),a&&(l=Zh(l,o,n)),l=[l];else{l=[];for(const u of e)c=Zh(u,t,n),n!=null&&n.preserveMissing?(c===void 0&&(c=Kl),l.push(c)):c!==void 0&&l.push(c)}else{if(c=k1(e,i),a&&(c=Zh(c,o,n)),c===void 0)return;l=n!=null&&n.preserveKeys?Object.assign({},e):{},l[i]=c}return l}function E1(e){if(e instanceof Array)for(let t=e.length-1;t>=0;t--)e[t]===Kl?e.splice(t,1):E1(e[t]);else if(Xn(e))for(const t in e)Ia(e,t)&&E1(e[t])}const uE=/^\d+$/;function Km(e,t,n,r){const i=t.split("."),o=i[0],s=i.slice(1).join(".");if(i.length===1)(Xn(e)||Rr(e)&&uE.test(o))&&n(e,o);else{r!=null&&r.buildGraph&&Pr(e[o])&&(e[o]={});const a=e[o];if(!a)return;const l=!!(i.length>1&&uE.test(i[1]));a instanceof Array&&(r!=null&&r.descendArray)&&!l?a.forEach(c=>Km(c,s,n,r)):Km(a,s,n,r)}}function rQ(e,t,n){Km(e,t,(r,i)=>{r[i]=qv(n)?n(r[i]):n},{buildGraph:!0})}function dE(e,t,n){Km(e,t,(r,i)=>{if(r instanceof Array){if(/^\d+$/.test(i))r.splice(parseInt(i),1);else if(n&&n.descendArray)for(const o of r)Xn(o)&&delete o[i]}else Xn(r)&&delete r[i]},n)}const iQ=/^\$[a-zA-Z0-9_]+$/;function Ku(e){return iQ.test(e)}function hj(e){if(cj.has(Uf(e).toLowerCase()))return Jh(e)?{$regex:e}:{$eq:e};if(Kv(e)){if(!Object.keys(e).some(Ku))return{$eq:e};if(Ia(e,"$regex")){const n=Object.assign({},e);return n.$regex=new RegExp(e.$regex,e.$options),delete n.$options,n}}return e}var xa;(function(e){e.CLONE_ALL="CLONE_ALL",e.CLONE_INPUT="CLONE_INPUT",e.CLONE_OUTPUT="CLONE_OUTPUT",e.CLONE_OFF="CLONE_OFF"})(xa||(xa={}));class Rl{constructor(t,n,r,i=Date.now()){this._opts=t,this._root=n,this._local=r,this.timestamp=i,this.update(n,r)}static init(t,n,r){return t instanceof Rl?new Rl(t._opts,Pr(t.root)?n:t.root,Object.assign({},t.local,r)):new Rl(t,n,r)}update(t,n){var r;return this._root=t,this._local=n&&Object.assign({},n,{variables:Object.assign({},(r=this._local)===null||r===void 0?void 0:r.variables,n==null?void 0:n.variables)}),this}getOptions(){return Object.freeze(Object.assign(Object.assign({},this._opts),{context:Xl.from(this._opts.context)}))}get root(){return this._root}get local(){return this._local}get idKey(){return this._opts.idKey}get collation(){var t;return(t=this._opts)===null||t===void 0?void 0:t.collation}get processingMode(){var t;return((t=this._opts)===null||t===void 0?void 0:t.processingMode)||xa.CLONE_OFF}get useStrictMode(){var t;return(t=this._opts)===null||t===void 0?void 0:t.useStrictMode}get scriptEnabled(){var t;return(t=this._opts)===null||t===void 0?void 0:t.scriptEnabled}get useGlobalContext(){var t;return(t=this._opts)===null||t===void 0?void 0:t.useGlobalContext}get hashFunction(){var t;return(t=this._opts)===null||t===void 0?void 0:t.hashFunction}get collectionResolver(){var t;return(t=this._opts)===null||t===void 0?void 0:t.collectionResolver}get jsonSchemaValidator(){var t;return(t=this._opts)===null||t===void 0?void 0:t.jsonSchemaValidator}get variables(){var t;return(t=this._opts)===null||t===void 0?void 0:t.variables}get context(){var t;return(t=this._opts)===null||t===void 0?void 0:t.context}}function mj(e){return e instanceof Rl?e.getOptions():Object.freeze(Object.assign(Object.assign({idKey:"_id",scriptEnabled:!0,useStrictMode:!0,useGlobalContext:!0,processingMode:xa.CLONE_OFF},e),{context:e!=null&&e.context?Xl.from(e==null?void 0:e.context):Xl.init({})}))}var Kt;(function(e){e.ACCUMULATOR="accumulator",e.EXPRESSION="expression",e.PIPELINE="pipeline",e.PROJECTION="projection",e.QUERY="query",e.WINDOW="window"})(Kt||(Kt={}));class Xl{constructor(t){this.operators={[Kt.ACCUMULATOR]:{},[Kt.EXPRESSION]:{},[Kt.PIPELINE]:{},[Kt.PROJECTION]:{},[Kt.QUERY]:{},[Kt.WINDOW]:{}};for(const[n,r]of Object.entries(t))this.addOperators(n,r)}static init(t={}){return new Xl(t)}static from(t){return new Xl(t.operators)}addOperators(t,n){for(const[r,i]of Object.entries(n))this.getOperator(t,r)||(this.operators[t][r]=i);return this}addAccumulatorOps(t){return this.addOperators(Kt.ACCUMULATOR,t)}addExpressionOps(t){return this.addOperators(Kt.EXPRESSION,t)}addQueryOps(t){return this.addOperators(Kt.QUERY,t)}addPipelineOps(t){return this.addOperators(Kt.PIPELINE,t)}addProjectionOps(t){return this.addOperators(Kt.PROJECTION,t)}addWindowOps(t){return this.addOperators(Kt.WINDOW,t)}getOperator(t,n){return t in this.operators&&this.operators[t][n]||null}}const pl=Xl.init();function fE(e,t){for(const[n,r]of Object.entries(t)){Vi(qv(r)&&Ku(n),`'${n}' is not a valid operator`);const i=Pl(e,n,null);Vi(!i||r===i,`${n} already exists for '${e}' operators. Cannot change operator function once registered.`)}switch(e){case Kt.ACCUMULATOR:pl.addAccumulatorOps(t);break;case Kt.EXPRESSION:pl.addExpressionOps(t);break;case Kt.PIPELINE:pl.addPipelineOps(t);break;case Kt.PROJECTION:pl.addProjectionOps(t);break;case Kt.QUERY:pl.addQueryOps(t);break;case Kt.WINDOW:pl.addWindowOps(t);break}}function Pl(e,t,n){const{context:r,useGlobalContext:i}=n||{},o=r?r.getOperator(e,t):null;return!o&&i?pl.getOperator(e,t):o}const pE={$$ROOT(e,t,n){return n.root},$$CURRENT(e,t,n){return e},$$REMOVE(e,t,n){},$$NOW(e,t,n){return new Date(n.timestamp)}},R1={$$KEEP(e,t,n){return e},$$PRUNE(e,t,n){},$$DESCEND(e,t,n){if(!Ia(t,"$cond"))return e;let r;for(const[i,o]of Object.entries(e))if(Kv(o)){if(o instanceof Array){const s=[];for(let a of o)Xn(a)&&(a=hE(a,t,n.update(a))),Pr(a)||s.push(a);r=s}else r=hE(o,t,n.update(o));Pr(r)?delete e[i]:e[i]=r}return e}};function Ho(e,t,n,r){var i;const o=Rl.init(r,e);if(n=n||"",Ku(n)){const s=Pl(Kt.EXPRESSION,n,r);if(s)return s(e,t,o);const a=Pl(Kt.ACCUMULATOR,n,r);if(a)return e instanceof Array||(e=Ho(e,t,null,o),t=null),Vi(e instanceof Array,`'${n}' target must be an array.`),a(e,t,o.update(null,o.local));throw new Hu(`operator '${n}' is not registered`)}if(Ds(t)&&t.length>0&&t[0]==="$"){if(Ia(R1,t))return t;let s=o.root;const a=t.split(".");if(Ia(pE,a[0]))s=pE[a[0]](e,null,o),t=t.slice(a[0].length+1);else if(a[0].slice(0,2)==="$$"){s=Object.assign({},o.variables,{this:e},(i=o.local)===null||i===void 0?void 0:i.variables);const l=a[0].slice(2);Vi(Ia(s,l),`Use of undefined variable: ${l}`),t=t.slice(2)}else t=t.slice(1);return t===""?s:fS(s,t)}if(Rr(t))return t.map(s=>Ho(e,s,null,o));if(Xn(t)){const s={};for(const[a,l]of Object.entries(t))if(s[a]=Ho(e,l,a,o),[Kt.EXPRESSION,Kt.ACCUMULATOR].some(c=>!!Pl(c,a,r)))return Vi(Object.keys(t).length===1,"Invalid aggregation expression '"+JSON.stringify(t)+"'"),s[a];return s}return t}function hE(e,t,n){const r=Ho(e,t,null,n);return Ia(R1,r)?R1[r](e,t,n):r}function Iu(e){return e instanceof mE?e:new mE(e)}function oQ(...e){let t=0;return Iu(()=>{for(;t{const i=r.next();if(i.done)throw P1;return i.value}}else if(t instanceof Array){const r=t,i=r.length;let o=0;n=()=>{if(o0?this.push(qo.TAKE,t):this}drop(t){return t>0?this.push(qo.DROP,t):this}transform(t){const n=this;let r;return Iu(()=>(r||(r=Iu(t(n.value()))),r.next()))}value(){return this.isDone||(this.isDone=this.getNext(!0).done),this.yieldedValues}each(t){for(;;){const n=this.next();if(n.done)break;if(t(n.value)===!1)return!1}return!0}reduce(t,n){let r=this.next();for(n===void 0&&!r.done&&(n=r.value,r=this.next());!r.done;)n=t(n,r.value),r=this.next();return n}size(){return this.reduce((t,n)=>++t,0)}[Symbol.iterator](){return this}}class cQ{constructor(t,n){this.pipeline=t,this.options=mj(n)}stream(t){let n=Iu(t);const r=this.options.processingMode;(r==xa.CLONE_ALL||r==xa.CLONE_INPUT)&&n.map(sE);const i=new Array;if(!Vu(this.pipeline))for(const o of this.pipeline){const s=Object.keys(o),a=s[0],l=Pl(Kt.PIPELINE,a,this.options);Vi(s.length===1&&!!l,`invalid pipeline operator ${a}`),i.push(a),n=l(n,o[a],this.options)}return(r==xa.CLONE_OUTPUT||r==xa.CLONE_ALL&&dj([["$group","$unwind"],i]).length)&&n.map(sE),n}run(t){return this.stream(t).value()}}class uQ{constructor(t,n,r,i){this.source=t,this.predicate=n,this.projection=r,this.options=i,this.operators=[],this.result=null,this.buffer=[]}fetch(){return this.result?this.result:(Xn(this.projection)&&this.operators.push({$project:this.projection}),this.result=Iu(this.source).filter(this.predicate),this.operators.length>0&&(this.result=new cQ(this.operators,this.options).stream(this.result)),this.result)}fetchAll(){const t=Iu([...this.buffer]);return this.buffer=[],oQ(t,this.fetch())}all(){return this.fetchAll().value()}count(){return this.all().length}skip(t){return this.operators.push({$skip:t}),this}limit(t){return this.operators.push({$limit:t}),this}sort(t){return this.operators.push({$sort:t}),this}collation(t){return this.options=Object.assign(Object.assign({},this.options),{collation:t}),this}next(){if(this.buffer.length>0)return this.buffer.pop();const t=this.fetch().next();if(!t.done)return t.value}hasNext(){if(this.buffer.length>0)return!0;const t=this.fetch().next();return t.done?!1:(this.buffer.push(t.value),!0)}map(t){return this.all().map(t)}forEach(t){this.all().forEach(t)}[Symbol.iterator](){return this.fetchAll()}}class yp{constructor(t,n){this.condition=t,this.options=mj(n),this.compiled=[],this.compile()}compile(){Vi(Xn(this.condition),`query criteria must be an object: ${JSON.stringify(this.condition)}`);const t={};for(const[n,r]of Object.entries(this.condition)){if(n==="$where")Object.assign(t,{field:n,expr:r});else if(ju(["$and","$or","$nor","$expr","$jsonSchema"],n))this.processOperator(n,n,r);else{Vi(!Ku(n),`unknown top level operator: ${n}`);for(const[i,o]of Object.entries(hj(r)))this.processOperator(n,i,o)}t.field&&this.processOperator(t.field,t.field,t.expr)}}processOperator(t,n,r){const i=Pl(Kt.QUERY,n,this.options);if(!i)throw new Hu(`unknown query operator ${n}`);const o=i(t,r,this.options);this.compiled.push(o)}test(t){for(let n=0,r=this.compiled.length;nthis.test(r),n||{},this.options)}remove(t){return t.reduce((n,r)=>(this.test(r)||n.push(r),n),[])}}const dQ=(e,t,n)=>{if(Vu(t)||!Xn(t))return e;let r=Oo;const i=n.collation;return Xn(i)&&Ds(i.locale)&&(r=pQ(i)),e.transform(o=>{const s=Object.keys(t);for(const a of s.reverse()){const l=tQ(o,u=>fS(u,a),n.hashFunction),c=Array.from(l.keys()).sort(r);t[a]===-1&&c.reverse(),o=[],c.reduce((u,d)=>vp(u,l.get(d)),o)}return o})},fQ={1:"base",2:"accent",3:"variant"};function pQ(e){const t={sensitivity:fQ[e.strength||3],caseFirst:e.caseFirst==="off"?"false":e.caseFirst||"false",numeric:e.numericOrdering||!1,ignorePunctuation:e.alternate==="shifted"};(e.caseLevel||!1)===!0&&(t.sensitivity==="base"&&(t.sensitivity="case"),t.sensitivity==="accent"&&(t.sensitivity="variant"));const n=new Intl.Collator(e.locale,t);return(r,i)=>{if(!Ds(r)||!Ds(i))return Oo(r,i);const o=n.compare(r,i);return o<0?-1:o>0?1:0}}function Hr(e){const t=(n,r,i)=>{const o={unwrapArray:!0},s=Math.max(1,n.split(".").length-1);return a=>{const l=fS(a,n,o);return e(l,r,Object.assign(Object.assign({},i),{depth:s}))}};return t.op="query",t}function gj(e,t,n){if(Ql(e,t)||Pr(e)&&Pr(t))return!0;if(e instanceof Array){const r=Ql.bind(null,t);return e.some(r)||fj(e,n==null?void 0:n.depth).some(r)}return!1}function hQ(e,t,n){return!gj(e,t,n)}function vj(e,t,n){return Pr(e)?t.some(r=>r===null):dj([gp(e),t],n==null?void 0:n.hashFunction).length>0}function mQ(e,t,n){return!vj(e,t,n)}function gQ(e,t,n){return Yv(e,t,(r,i)=>Oo(r,i)<0)}function vQ(e,t,n){return Yv(e,t,(r,i)=>Oo(r,i)<=0)}function yQ(e,t,n){return Yv(e,t,(r,i)=>Oo(r,i)>0)}function bQ(e,t,n){return Yv(e,t,(r,i)=>Oo(r,i)>=0)}function wQ(e,t,n){return gp(e).some(r=>t.length===2&&r%t[0]===t[1])}function xQ(e,t,n){const r=gp(e),i=o=>Ds(o)&&QY(t.exec(o),n==null?void 0:n.useStrictMode);return r.some(i)||fj(r,1).some(i)}function SQ(e,t,n){return(t===!1||t===0)&&e===void 0||(t===!0||t===1)&&e!==void 0}function _Q(e,t,n){if(!Rr(e)||!Rr(t)||!e.length||!t.length)return!1;let r=!0;for(const i of t){if(!r)break;Xn(i)&&ju(Object.keys(i),"$elemMatch")?r=yj(e,i.$elemMatch,n):i instanceof RegExp?r=e.some(o=>typeof o=="string"&&i.test(o)):r=e.some(o=>Ql(i,o))}return r}function CQ(e,t,n){return Array.isArray(e)&&e.length===t}function kQ(e){return Ku(e)&&["$and","$or","$nor"].indexOf(e)===-1}function yj(e,t,n){if(Rr(e)&&!Vu(e)){let r=s=>s,i=t;Object.keys(t).every(kQ)&&(i={temp:t},r=s=>({temp:s}));const o=new yp(i,n);for(let s=0,a=e.length;se===null,vE=e=>ga(e)&&e>=UY&&e<=zY&&e.toString().indexOf(".")===-1,yE=e=>ga(e)&&e>=GY&&e<=WY&&e.toString().indexOf(".")===-1,EQ={array:Rr,bool:E0,boolean:E0,date:aE,decimal:ga,double:ga,int:vE,long:yE,number:ga,null:gE,object:Xn,regex:Jh,regexp:Jh,string:Ds,undefined:Pr,function:e=>{throw new Hu("unsupported type key `function`.")},1:ga,2:Ds,3:Xn,4:Rr,6:Pr,8:E0,9:aE,10:gE,11:Jh,16:vE,18:yE,19:ga};function bE(e,t,n){const r=EQ[t];return r?r(e):!1}function RQ(e,t,n){return Array.isArray(t)?t.findIndex(r=>bE(e,r))>=0:bE(e,t)}function Yv(e,t,n){return gp(e).some(r=>Uf(r)===Uf(t)&&n(r,t))}const wE=(e,t)=>{const n={};return e.split("").forEach((r,i)=>n[r]=t*(i+1)),n};Object.assign(Object.assign(Object.assign({},wE("ABCDEFGHIKLM",1)),wE("NOPQRSTUVWXY",-1)),{Z:0});const xE={undefined:null,null:null,NaN:NaN,Infinity:new Error,"-Infinity":new Error};function Ti(e,t=xE){const n=Object.assign({},xE,t),r=new Set(Object.keys(n));return(i,o,s)=>{const a=Ho(i,o,null,s);if(r.has(`${a}`)){const l=n[`${a}`];if(l instanceof Error)throw new Hu(`cannot apply $${e.name} to -inf, value must in (-inf,inf)`);return l}return e(a)}}Ti(Math.acos,{Infinity:1/0,0:new Error});Ti(Math.acosh,{Infinity:1/0,0:new Error});Ti(Math.asin);Ti(Math.asinh,{Infinity:1/0,"-Infinity":-1/0});Ti(Math.atan);Ti(Math.atanh,{1:1/0,"-1":-1/0});Ti(Math.cos);Ti(Math.cosh,{"-Infinity":1/0,Infinity:1/0});const PQ=Math.PI/180;Ti(e=>e*PQ,{Infinity:1/0,"-Infinity":1/0});const TQ=180/Math.PI;Ti(e=>e*TQ,{Infinity:1/0,"-Infinity":-1/0});Ti(Math.sin);Ti(Math.sinh,{"-Infinity":-1/0,Infinity:1/0});Ti(Math.tan);const OQ=(e,t,n)=>{if(Vu(t))return e;let r=Object.keys(t),i=!1;bj(t,n);const o=n.idKey;if(ju(r,o)){const a=t[o];(a===0||a===!1)&&(r=r.filter(uj.bind(null,[o])),i=r.length==0)}else r.push(o);const s=Rl.init(n);return e.map(a=>T1(a,t,s.update(a),r,i))};function T1(e,t,n,r,i){let o={},s=!1,a=!1;const l=[];i&&l.push(n.idKey);for(const c of r){let u;const d=t[c];if(c!==n.idKey&&ju([0,!1],d)&&(a=!0),c===n.idKey&&Vu(d))u=e[c];else if(Ds(d))u=Ho(e,d,c,n);else if(!ju([1,!0],d))if(d instanceof Array)u=d.map(m=>{const h=Ho(e,m,null,n);return Pr(h)?null:h});else if(Xn(d)){const m=d,h=Object.keys(d),g=h.length==1?h[0]:"",E=Pl(Kt.PROJECTION,g,n);if(E)g==="$slice"?gp(m[g]).every(ga)?(u=E(e,m[g],c,n),s=!0):u=Ho(e,m,c,n):u=E(e,m[g],c,n);else if(Ku(g))u=Ho(e,m[g],g,n);else if(Ia(e,c)){bj(m,n);let b=e[c];b instanceof Array?u=b.map(w=>T1(w,m,n,h,!1)):(b=Xn(b)?b:e,u=T1(b,m,n,h,!1))}else u=Ho(e,d,null,n)}else{l.push(c);continue}const f=Zh(e,c,{preserveMissing:!0});f!==void 0&&C1(o,f,{flatten:!0}),uj([0,1,!1,!0],d)&&(u===void 0?dE(o,c,{descendArray:!0}):rQ(o,c,u))}if(E1(o),(s||a||i)&&(o=vp({},e,o),l.length>0))for(const c of l)dE(o,c,{descendArray:!0});return o}function bj(e,t){const n=[!1,!1];for(const[r,i]of Object.entries(e)){if(r===(t==null?void 0:t.idKey))return;i===0||i===!1?n[0]=!0:(i===1||i===!0)&&(n[1]=!0),Vi(!(n[0]&&n[1]),"Projection cannot have a mix of inclusion and exclusion.")}}const LQ=(e,t,n)=>{Vi(Rr(t),"Invalid expression: $and expects value to be an Array.");const r=t.map(i=>new yp(i,n));return i=>r.every(o=>o.test(i))},wj=(e,t,n)=>{Vi(Rr(t),"Invalid expression. $or expects value to be an Array");const r=t.map(i=>new yp(i,n));return i=>r.some(o=>o.test(i))},jQ=(e,t,n)=>{Vi(Rr(t),"Invalid expression. $nor expects value to be an array.");const r=wj("$or",t,n);return i=>!r(i)},IQ=(e,t,n)=>{const r={};r[e]=hj(t);const i=new yp(r,n);return o=>!i.test(o)},MQ=Hr(gj),$Q=Hr(yQ),NQ=Hr(bQ),AQ=Hr(vj),DQ=Hr(gQ),BQ=Hr(vQ),FQ=Hr(hQ),zQ=Hr(mQ),UQ=Hr(wQ),WQ=Hr(xQ);Hr(_Q);const GQ=Hr(yj),HQ=Hr(CQ),VQ=Hr(SQ),KQ=Hr(RQ);var SE=!1;function qQ(e){return SE||(fE(Kt.PIPELINE,{$sort:dQ,$project:OQ}),fE(Kt.QUERY,{$and:LQ,$eq:MQ,$elemMatch:GQ,$exists:VQ,$gt:$Q,$gte:NQ,$in:AQ,$lt:DQ,$lte:BQ,$ne:FQ,$nin:zQ,$mod:UQ,$nor:jQ,$not:IQ,$or:wj,$regex:WQ,$size:HQ,$type:KQ}),SE=!0),new yp(e)}function qm(e,t){var n=jo(e.primaryKey);t=en(t);var r=Ji(t);if(typeof r.skip!="number"&&(r.skip=0),r.selector?(r.selector=r.selector,Object.entries(r.selector).forEach(([c,u])=>{(typeof u!="object"||u===null)&&(r.selector[c]={$eq:u})})):r.selector={},r.index){var i=Bf(r.index);i.includes(n)||i.push(n),r.index=i}if(r.sort){var l=r.sort.find(c=>fK(c)===n);l||(r.sort=r.sort.slice(0),r.sort.push({[n]:"asc"}))}else if(r.index)r.sort=r.index.map(c=>({[c]:"asc"}));else{if(e.indexes){var o=new Set;Object.entries(r.selector).forEach(([c,u])=>{var d=!1;typeof u=="object"&&u!==null?d=!!Object.keys(u).find(f=>cS.has(f)):d=!0,d&&o.add(c)});var s=-1,a;e.indexes.forEach(c=>{var u=Kx(c)?c:[c],d=u.findIndex(f=>!o.has(f));d>0&&d>s&&(s=d,a=u)}),a&&(r.sort=a.map(c=>({[c]:"asc"})))}r.sort||(r.sort=[{[n]:"asc"}])}return r}function xj(e,t){if(!t.sort)throw ot("SNH",{query:t});var n=[];t.sort.forEach(i=>{var o=Object.keys(i)[0],s=Object.values(i)[0];n.push({key:o,direction:s,getValueFn:dK(o)})});var r=(i,o)=>{for(var s=0;sn.test(i);return r}async function kd(e,t){var n=await e.exec();if(!n)return null;if(Array.isArray(n))return Promise.all(n.map(i=>t(i)));var r=await t(n);return r}function YQ(e,t){return!t.sort||t.sort.length===0?[e]:t.sort.map(n=>Object.keys(n)[0])}var QQ=new WeakMap;function XQ(e){return As(QQ,e,()=>{var t=e.collection,n=qm(t.storageInstance.schema,Ji(e.mangoQuery)),r=t.schema.primaryPath,i=xj(t.schema.jsonSchema,n),o=(c,u)=>{var d={docA:c,docB:u,rxQuery:e};return i(d.docA,d.docB)},s=pS(t.schema.jsonSchema,n),a=c=>{var u={doc:c,rxQuery:e};return s(u.doc)},l={primaryKey:e.collection.schema.primaryPath,skip:n.skip,limit:n.limit,sortFields:YQ(r,n),sortComparator:o,queryMatcher:a};return l})}function JQ(e,t){if(!e.collection.database.eventReduce)return{runFullQueryAgain:!0};var n=XQ(e),r=bt(e._result).docsData.slice(0),i=bt(e._result).docsDataMap,o=!1,s=t.map(l=>Hq(l)).filter(wL),a=s.find(l=>{var c={queryParams:n,changeEvent:l,previousResults:r,keyDocumentMap:i},u=IY(c);if(u==="runFullQueryAgain")return!0;if(u!=="doNothing")return o=!0,MY(u,n,l,r,i),!1});return a?{runFullQueryAgain:!0}:{runFullQueryAgain:!1,changed:o,newResults:r}}var ZQ=function(){function e(){this._map=new Map}var t=e.prototype;return t.getByQuery=function(r){var i=r.toString();return As(this._map,i,()=>r)},e}();function eX(){return new ZQ}function _E(e,t){t.uncached=!0;var n=t.toString();e._map.delete(n)}function tX(e){return e.refCount$.observers.length}var nX=100,rX=30*1e3,iX=(e,t)=>(n,r)=>{if(!(r._map.size0)){if(a._lastEnsureEqual===0&&a._creationTimed._lastEnsureEqual-f._lastEnsureEqual),u=c.slice(0,l);u.forEach(d=>_E(r,d))}}},Sj=iX(nX,rX),P0=new WeakSet;function oX(e){P0.has(e)||(P0.add(e),EK().then(()=>TK(200)).then(()=>{e.destroyed||e.cacheReplacementPolicy(e,e._queryCache),P0.delete(e)}))}var _j=function(){function e(n,r,i){this.cacheItemByDocId=new Map,this.registry=typeof FinalizationRegistry=="function"?new FinalizationRegistry(o=>{var s=o.docId,a=this.cacheItemByDocId.get(s);a&&(a[0].delete(o.revisionHeight),a[0].size===0&&this.cacheItemByDocId.delete(s))}):void 0,this.primaryPath=n,this.changes$=r,this.documentCreator=i,r.subscribe(o=>{var s=o.documentId,a=this.cacheItemByDocId.get(s);if(a){var l=rS(o);a[1]=l}})}var t=e.prototype;return t.getLatestDocumentData=function(r){var i=Ns(this.cacheItemByDocId,r);return i[1]},t.getLatestDocumentDataIfExists=function(r){var i=this.cacheItemByDocId.get(r);if(i)return i[1]},Vs(e,[{key:"getCachedRxDocuments",get:function(){var n=CE(this);return Rs(this,"getCachedRxDocuments",n)}},{key:"getCachedRxDocument",get:function(){var n=CE(this);return Rs(this,"getCachedRxDocument",r=>n([r])[0])}}])}();function CE(e){var t=e.primaryPath,n=e.cacheItemByDocId,r=e.registry,i=_n.deepFreezeWhenDevMode,o=e.documentCreator,s=a=>{for(var l=new Array(a.length),c=[],u=0;u0&&r&&_L().then(()=>{for(var w=0;wt._data))}},{key:"docsDataMap",get:function(){var t=new Map;return this.documents.forEach(n=>{t.set(n.primary,n._data)}),Rs(this,"docsDataMap",t)}},{key:"docsMap",get:function(){for(var t=new Map,n=this.documents,r=0;r{var d=this.collection._docCache.getLatestDocumentDataIfExists(u);if(d){if(!d._deleted){var f=this.collection._docCache.getCachedRxDocument(d);s.set(u,f)}}else a.push(u)}),a.length>0){var l=await this.collection.storageInstance.findDocumentsById(a,!1);l.forEach(u=>{var d=this.collection._docCache.getCachedRxDocument(u);s.set(d.primary,d)})}return s}var c=hX(this);return c.then(u=>(this._lastExecEnd=ur(),u))},t.exec=function(r){if(r&&this.op!=="findOne")throw ot("QU9",{collection:this.collection.name,query:this.mangoQuery,op:this.op});return EE(this).then(()=>$n(this.$)).then(i=>{if(!i&&r)throw ot("QU10",{collection:this.collection.name,query:this.mangoQuery,op:this.op});return i})},t.toString=function(){var r=Gm({op:this.op,query:this.mangoQuery,other:this.other},!0),i=JSON.stringify(r);return this.toString=()=>i,i},t.getPreparedQuery=function(){var r={rxQuery:this,mangoQuery:qm(this.collection.schema.jsonSchema,this.mangoQuery)};r.mangoQuery.selector._deleted={$eq:!1},r.mangoQuery.index&&r.mangoQuery.index.unshift("_deleted"),Zi("prePrepareQuery",r);var i=hS(this.collection.schema.jsonSchema,r.mangoQuery);return this.getPreparedQuery=()=>i,i},t.doesDocumentDataMatch=function(r){return r._deleted?!1:this.queryMatcher(r)},t.remove=function(){return this.exec().then(r=>Array.isArray(r)?Promise.all(r.map(i=>i.remove())):r.remove())},t.incrementalRemove=function(){return kd(this.asRxQuery,r=>r.incrementalRemove())},t.update=function(r){throw un("update")},t.patch=function(r){return kd(this.asRxQuery,i=>i.patch(r))},t.incrementalPatch=function(r){return kd(this.asRxQuery,i=>i.incrementalPatch(r))},t.modify=function(r){return kd(this.asRxQuery,i=>i.modify(r))},t.incrementalModify=function(r){return kd(this.asRxQuery,i=>i.incrementalModify(r))},t.where=function(r){throw un("query-builder")},t.sort=function(r){throw un("query-builder")},t.skip=function(r){throw un("query-builder")},t.limit=function(r){throw un("query-builder")},Vs(e,[{key:"$",get:function(){if(!this._$){var n=this.collection.$.pipe(Wt(r=>!r.isLocal),Hv(null),rs(()=>EE(this)),qt(()=>this._result),nS(Yx),zf((r,i)=>!!(r&&r.time===bt(i).time)),Wt(r=>!!r),qt(r=>{var i=bt(r);return this.op==="count"?i.count:this.op==="findOne"?i.documents.length===0?null:i.documents[0]:this.op==="findByIds"?i.docsMap:i.documents.slice(0)}));this._$=Vq(n,this.refCount$.pipe(Wt(()=>!1)))}return this._$}},{key:"$$",get:function(){var n=this.collection.database.getReactivityFactory();return n.fromObservable(this.$,void 0,this.collection.database)}},{key:"queryMatcher",get:function(){var n=this.collection.schema.jsonSchema,r=qm(this.collection.schema.jsonSchema,this.mangoQuery);return Rs(this,"queryMatcher",pS(n,r))}},{key:"asRxQuery",get:function(){return this}}])}();function em(){return{selector:{}}}function fX(e){return e.collection._queryCache.getByQuery(e)}function Ic(e,t,n,r){Zi("preCreateRxQuery",{op:e,queryObj:t,collection:n,other:r});var i=new kj(e,t,n,r);return i=fX(i),oX(n),i}function Ej(e){var t=e.asRxQuery.collection._changeEventBuffer.counter;return e._latestChangeEvent>=t}function EE(e){return e.collection.database.destroyed||Ej(e)?wo:(e._ensureEqualQueue=e._ensureEqualQueue.then(()=>pX(e)),e._ensureEqualQueue)}function pX(e){if(e._lastEnsureEqual=ur(),e.collection.database.destroyed||Ej(e))return wo;var t=!1,n=!1;if(e._latestChangeEvent===-1&&(n=!0),!n){var r=e.asRxQuery.collection._changeEventBuffer.getFrom(e._latestChangeEvent+1);if(r===null)n=!0;else{e._latestChangeEvent=e.asRxQuery.collection._changeEventBuffer.counter;var i=e.asRxQuery.collection._changeEventBuffer.reduceByLastOfDoc(r);if(e.op==="count"){var o=bt(e._result).count,s=o;i.forEach(l=>{var c=l.previousDocumentData&&e.doesDocumentDataMatch(l.previousDocumentData),u=e.doesDocumentDataMatch(l.documentData);!c&&u&&s++,c&&!u&&s--}),s!==o&&(t=!0,e._setResultData(s))}else{var a=JQ(e,i);a.runFullQueryAgain?n=!0:a.changed&&(t=!0,e._setResultData(a.newResults))}}}return n?e._execOverDatabase().then(l=>(e._latestChangeEvent=e.collection._changeEventBuffer.counter,typeof l=="number"?((!e._result||l!==e._result.count)&&(t=!0,e._setResultData(l)),t):((!e._result||!hK(e.collection.schema.primaryPath,l,e._result.docsData))&&(t=!0,e._setResultData(l)),t))):Promise.resolve(t)}function hS(e,t){if(!t.sort)throw ot("SNH",{query:t});var n=$Y(e,t);return{query:t,queryPlan:n}}async function hX(e){var t=[],n=e.collection;if(e.isFindOneByIdQuery)if(Array.isArray(e.isFindOneByIdQuery)){var r=e.isFindOneByIdQuery;if(r=r.filter(u=>{var d=e.collection._docCache.getLatestDocumentDataIfExists(u);return d?(d._deleted||t.push(d),!1):!0}),r.length>0){var i=await n.storageInstance.findDocumentsById(r,!1);Pu(t,i)}}else{var o=e.isFindOneByIdQuery,s=e.collection._docCache.getLatestDocumentDataIfExists(o);if(!s){var a=await n.storageInstance.findDocumentsById([o],!1);a[0]&&(s=a[0])}s&&!s._deleted&&t.push(s)}else{var l=e.getPreparedQuery(),c=await n.storageInstance.query(l);t=c.documents}return t}function mX(e,t){if(!t.skip&&t.selector&&Object.keys(t.selector).length===1&&t.selector[e]){var n=t.selector[e];if(typeof n=="string")return n;if(Object.keys(n).length===1&&typeof n.$eq=="string"||Object.keys(n).length===1&&Array.isArray(n.$eq)&&!n.$eq.find(r=>typeof r!="string"))return n.$eq}return!1}var gX="_rxdb_internal";async function Qv(e,t){var n=await e.findDocumentsById([t],!1),r=n[0];if(r)return r}async function Xv(e,t,n){var r=await e.bulkWrite([t],n);if(r.error.length>0){var i=r.error[0];throw i}else{var o=r.success[0];return o}}function Wf(e){return Object.assign({},...e)}function Ym(e,t,n,r){if(r)throw r.status===409?ot("CONFLICT",{collection:e.name,id:t,writeError:r,data:n}):r.status===422?ot("VD2",{collection:e.name,id:t,writeError:r,data:n}):r}function vX(e,t,n,r,i,o,s){for(var a=!!e.schema.attachments,l=[],c=[],u=[],d=nc(10),f={id:d,events:[],checkpoint:null,context:i,startTime:ur(),endTime:0},m=f.events,h=[],g=[],E=[],b=n.size>0,w,y=r.length,_=function(){var T=r[R],C=T.document,I=T.previous,A=C[t],j=C._deleted,$=I&&I._deleted,F=void 0;b&&(F=n.get(A));var z;if(F){var Z=F._rev;if(!I||I&&Z!==I._rev){var pe={isError:!0,status:409,documentId:A,writeRow:T,documentInDb:F};return u.push(pe),1}var G=a?T0(T):T;a&&(j?I&&Object.keys(I._attachments).forEach(Te=>{g.push({documentId:A,attachmentId:Te,digest:bt(I)._attachments[Te].digest})}):(Object.entries(C._attachments).find(([Te,Ce])=>{var He=I?I._attachments[Te]:void 0;return!He&&!Ce.data&&(z={documentId:A,documentInDb:F,isError:!0,status:510,writeRow:T,attachmentId:Te}),!0}),z||Object.entries(C._attachments).forEach(([Te,Ce])=>{var He=I?I._attachments[Te]:void 0;if(!He)h.push({documentId:A,attachmentId:Te,attachmentData:Ce,digest:Ce.digest});else{var Re=G.document._attachments[Te].digest;Ce.data&&He.digest!==Re&&E.push({documentId:A,attachmentId:Te,attachmentData:Ce,digest:Ce.digest})}}))),z?u.push(z):(a?(c.push(T0(G)),s&&s(C)):(c.push(G),s&&s(C)),w=G);var V=null,le=null,Le=null;if($&&!j)Le="INSERT",V=a?Sa(C):C;else if(I&&!$&&!j)Le="UPDATE",V=a?Sa(C):C,le=I;else if(j)Le="DELETE",V=bt(C),le=I;else throw ot("SNH",{args:{writeRow:T}});var Ge={documentId:A,documentData:V,previousDocumentData:le,operation:Le};m.push(Ge)}else{var Y=!!j;if(a&&Object.entries(C._attachments).forEach(([Te,Ce])=>{Ce.data?h.push({documentId:A,attachmentId:Te,attachmentData:Ce,digest:Ce.digest}):(z={documentId:A,isError:!0,status:510,writeRow:T,attachmentId:Te},u.push(z))}),z||(a?(l.push(T0(T)),o&&o(C)):(l.push(T),o&&o(C)),w=T),!Y){var J={documentId:A,operation:"INSERT",documentData:a?Sa(C):C,previousDocumentData:a&&I?Sa(I):I};m.push(J)}}},R=0;R{t._attachments[n]=bX(r)}),t}function bp(e){return Object.assign({},e,{_meta:en(e._meta)})}function mS(e,t,n){_n.deepFreezeWhenDevMode(n);var r={originalStorageInstance:t,schema:t.schema,internals:t.internals,collectionName:t.collectionName,databaseName:t.databaseName,options:t.options,bulkWrite(i,o){for(var s=e.token,a=new Array(i.length),l=ur(),c=0;ct.bulkWrite(a,o)).then(m=>{var h={error:[],success:m.success.slice(0)},g=m.error.length===0?[]:m.error.filter(b=>b.status===409&&!b.writeRow.previous&&!b.writeRow.document._deleted&&bt(b.documentInDb)._deleted?!0:(h.error.push(b),!1));if(g.length>0){var E=g.map(b=>({previous:b.documentInDb,document:Object.assign({},b.writeRow.document,{_rev:$s(e.token,b.documentInDb)})}));return e.lockedRun(()=>t.bulkWrite(E,o)).then(b=>(Pu(h.error,b.error),Pu(h.success,b.success),h))}return m})},query(i){return e.lockedRun(()=>t.query(i))},count(i){return e.lockedRun(()=>t.count(i))},findDocumentsById(i,o){return e.lockedRun(()=>t.findDocumentsById(i,o))},getAttachmentData(i,o,s){return e.lockedRun(()=>t.getAttachmentData(i,o,s))},getChangedDocumentsSince:t.getChangedDocumentsSince?(i,o)=>e.lockedRun(()=>t.getChangedDocumentsSince(bt(i),o)):void 0,cleanup(i){return e.lockedRun(()=>t.cleanup(i))},remove(){return e.storageInstances.delete(r),e.lockedRun(()=>t.remove())},close(){return e.storageInstances.delete(r),e.lockedRun(()=>t.close())},changeStream(){return t.changeStream()},conflictResultionTasks(){return t.conflictResultionTasks()},resolveConflictResultionTask(i){if(i.output.isEqual)return t.resolveConflictResultionTask(i);var o=Object.assign({},i.output.documentData,{_meta:Gu(),_rev:To(),_attachments:{}}),s=en(o);return delete s._meta,delete s._rev,delete s._attachments,t.resolveConflictResultionTask({id:i.id,output:{isEqual:!1,documentData:s}})}};return e.storageInstances.add(r),r}function wX(e){if(e.schema.keyCompression)throw ot("UT5",{args:{params:e}});if(Rj(e.schema))throw ot("UT6",{args:{params:e}});if(e.schema.attachments&&e.schema.attachments.compression)throw ot("UT7",{args:{params:e}})}function Rj(e){return!!(e.encrypted&&e.encrypted.length>0||e.attachments&&e.attachments.encrypted)}function xX(e,t,n){var r=jo(e.schema.primaryKey),i=n?n.lwt:qx,o=n?n.id:"";return qm(e.schema,{selector:{$or:[{"_meta.lwt":{$gt:i}},{"_meta.lwt":{$eq:i},[r]:{$gt:n?o:""}}],"_meta.lwt":{$gte:i}},sort:[{"_meta.lwt":"asc"},{[r]:"asc"}],skip:0,limit:t})}async function Pj(e,t,n){if(e.getChangedDocumentsSince)return e.getChangedDocumentsSince(t,n);var r=jo(e.schema.primaryKey),i=hS(e.schema,xX(e,t,n)),o=await e.query(i),s=o.documents,a=lK(s);return{documents:s,checkpoint:a?{id:a[r],lwt:a._meta.lwt}:n||{id:"",lwt:0}}}var Tj=function(){function e(n,r,i,o){this.queueByDocId=new Map,this.isRunning=!1,this.storageInstance=n,this.primaryPath=r,this.preWrite=i,this.postWrite=o}var t=e.prototype;return t.addWrite=function(r,i){var o=r[this.primaryPath],s=As(this.queueByDocId,o,()=>[]),a=new Promise((l,c)=>{var u={lastKnownDocumentState:r,modifier:i,resolve:l,reject:c};bt(s).push(u),this.triggerRun()});return a},t.triggerRun=async function(){if(!(this.isRunning===!0||this.queueByDocId.size===0)){this.isRunning=!0;var r=[],i=this.queueByDocId;this.queueByDocId=new Map,await Promise.all(Array.from(i.entries()).map(async([s,a])=>{var l=SX(a.map(d=>d.lastKnownDocumentState)),c=l;for(var u of a)try{c=await u.modifier(Ji(c))}catch(d){u.reject(d),u.reject=()=>{},u.resolve=()=>{}}try{await this.preWrite(c,l)}catch(d){a.forEach(f=>f.reject(d));return}r.push({previous:l,document:c})}));var o=r.length>0?await this.storageInstance.bulkWrite(r,"incremental-write"):{error:[],success:[]};return await Promise.all(o.success.map(s=>{var a=s[this.primaryPath];this.postWrite(s);var l=Ns(i,a);l.forEach(c=>c.resolve(s))})),o.error.forEach(s=>{var a=s.documentId,l=Ns(i,a),c=Uv(s);if(c){var u=As(this.queueByDocId,a,()=>[]);l.reverse().forEach(f=>{f.lastKnownDocumentState=bt(c.documentInDb),bt(u).unshift(f)})}else{var d=zK(s);l.forEach(f=>f.reject(d))}}),this.isRunning=!1,this.triggerRun()}},e}();function RE(e){var t=async n=>{var r=pK(n);r._deleted=n._deleted;var i=await e(r),o=Object.assign({},i,{_meta:n._meta,_attachments:n._attachments,_rev:n._rev,_deleted:typeof i._deleted<"u"?i._deleted:n._deleted});return typeof o._deleted>"u"&&(o._deleted=!1),o};return t}function SX(e){var t=e[0],n=Da(t._rev);return e.forEach(r=>{var i=Da(r._rev);i>n&&(t=r,n=i)}),t}var Jv={get primaryPath(){var e=this;if(e.isInstanceOfRxDocument)return e.collection.schema.primaryPath},get primary(){var e=this;if(e.isInstanceOfRxDocument)return e._data[e.primaryPath]},get revision(){var e=this;if(e.isInstanceOfRxDocument)return e._data._rev},get deleted$(){var e=this;if(e.isInstanceOfRxDocument)return e.$.pipe(qt(t=>t._data._deleted))},get deleted$$(){var e=this,t=e.collection.database.getReactivityFactory();return t.fromObservable(e.deleted$,e.getLatest().deleted,e.collection.database)},get deleted(){var e=this;if(e.isInstanceOfRxDocument)return e._data._deleted},getLatest(){var e=this.collection._docCache.getLatestDocumentData(this.primary);return this.collection._docCache.getCachedRxDocument(e)},get $(){var e=this;return e.collection.$.pipe(Wt(t=>!t.isLocal),Wt(t=>t.documentId===this.primary),qt(t=>rS(t)),Hv(e.collection._docCache.getLatestDocumentData(this.primary)),zf((t,n)=>t._rev===n._rev),qt(t=>this.collection._docCache.getCachedRxDocument(t)),nS(Yx))},get $$(){var e=this,t=e.collection.database.getReactivityFactory();return t.fromObservable(e.$,e.getLatest()._data,e.collection.database)},get$(e){if(_n.isDevMode()){if(e.includes(".item."))throw ot("DOC1",{path:e});if(e===this.primaryPath)throw ot("DOC2");if(this.collection.schema.finalFields.includes(e))throw ot("DOC3",{path:e});var t=Tu(this.collection.schema.jsonSchema,e);if(!t)throw ot("DOC4",{path:e})}return this.$.pipe(qt(n=>Ba(n,e)),zf())},get$$(e){var t=this.get$(e),n=this.collection.database.getReactivityFactory();return n.fromObservable(t,this.getLatest().get(e),this.collection.database)},populate(e){var t=Tu(this.collection.schema.jsonSchema,e),n=this.get(e);if(!n)return PK;if(!t)throw ot("DOC5",{path:e});if(!t.ref)throw ot("DOC6",{path:e,schemaObj:t});var r=this.collection.database.collections[t.ref];if(!r)throw ot("DOC7",{ref:t.ref,path:e,schemaObj:t});return t.type==="array"?r.findByIds(n).exec().then(i=>{var o=i.values();return Array.from(o)}):r.findOne(n).exec()},get(e){return As(this._propertyCache,e,()=>{var t=Ba(this._data,e);if(typeof t!="object"||t===null||Array.isArray(t))return _n.deepFreezeWhenDevMode(t);var n=this,r=new Proxy(en(t),{get(i,o){if(typeof o!="string")return i[o];var s=o.charAt(o.length-1);if(o.endsWith("$$")){var a=o.slice(0,-2);return n.get$$(Nd(e+"."+a))}else if(s==="$"){var l=o.slice(0,-1);return n.get$(Nd(e+"."+l))}else if(s==="_"){var c=o.slice(0,-1);return n.populate(Nd(e+"."+c))}else return n.get(Nd(e+"."+o))}});return r})},toJSON(e=!1){if(e)return _n.deepFreezeWhenDevMode(this._data);var t=en(this._data);return delete t._rev,delete t._attachments,delete t._deleted,delete t._meta,_n.deepFreezeWhenDevMode(t)},toMutableJSON(e=!1){return Ji(this.toJSON(e))},update(e){throw un("update")},incrementalUpdate(e){throw un("update")},updateCRDT(e){throw un("crdt")},putAttachment(){throw un("attachments")},getAttachment(){throw un("attachments")},allAttachments(){throw un("attachments")},get allAttachments$(){throw un("attachments")},async modify(e,t){var n=this._data,r=await RE(e)(n);return this._saveData(r,n)},incrementalModify(e,t){return this.collection.incrementalWriteQueue.addWrite(this._data,RE(e)).then(n=>this.collection._docCache.getCachedRxDocument(n))},patch(e){var t=this._data,n=Ji(t);return Object.entries(e).forEach(([r,i])=>{n[r]=i}),this._saveData(n,t)},incrementalPatch(e){return this.incrementalModify(t=>(Object.entries(e).forEach(([n,r])=>{t[n]=r}),t))},async _saveData(e,t){if(e=en(e),this._data._deleted)throw ot("DOC11",{id:this.primary,document:this});await Lj(this.collection,e,t);var n=await this.collection.storageInstance.bulkWrite([{previous:t,document:e}],"rx-document-save-data"),r=n.error[0];return Ym(this.collection,this.primary,e,r),await this.collection._runHooks("post","save",e,this),this.collection._docCache.getCachedRxDocument(n.success[0])},remove(){var e=this.collection;if(this.deleted)return Promise.reject(ot("DOC13",{document:this,id:this.primary}));var t=en(this._data),n;return e._runHooks("pre","remove",t,this).then(async()=>{t._deleted=!0;var r=await e.storageInstance.bulkWrite([{previous:this._data,document:t}],"rx-document-remove"),i=r.error[0];return Ym(e,this.primary,t,i),r.success[0]}).then(r=>(n=r,this.collection._runHooks("post","remove",t,this))).then(()=>this.collection._docCache.getCachedRxDocument(n))},incrementalRemove(){return this.incrementalModify(async e=>(await this.collection._runHooks("pre","remove",e,this),e._deleted=!0,e)).then(async e=>(await this.collection._runHooks("post","remove",e._data,e),e))},destroy(){throw ot("DOC14")}};function Oj(e=Jv){var t=function(r,i){this.collection=r,this._data=i,this._propertyCache=new Map,this.isInstanceOfRxDocument=!0};return t.prototype=e,t}function _X(e,t,n){var r=new e(t,n);return Zi("createRxDocument",r),r}function Lj(e,t,n){return t._meta=Object.assign({},n._meta,t._meta),_n.isDevMode()&&e.schema.validateChange(n,t),e._runHooks("pre","save",t,n)}var Tl="collection",gS="storage-token",CX="rx-migration-status",kX="RxInternalDocument",vS=Wv({version:0,title:kX,primaryKey:{key:"id",fields:["context","key"],separator:"|"},type:"object",properties:{id:{type:"string",maxLength:200},key:{type:"string"},context:{type:"string",enum:[Tl,gS,CX,"OTHER"]},data:{type:"object",additionalProperties:!0}},indexes:[],required:["key","context","data"],additionalProperties:!1,sharding:{shards:1,mode:"collection"}});function Gf(e,t){return Ya(vS,{key:e,context:t})}async function jj(e){var t=hS(e.schema,{selector:{context:Tl,_deleted:{$eq:!1}},sort:[{id:"asc"}],skip:0}),n=await e.query(t),r=n.documents;return r}var Ij="storageToken",EX=Gf(Ij,gS);async function RX(e){var t=nc(10),n=e.password?await e.hashFunction(JSON.stringify(e.password)):void 0,r={id:EX,context:gS,key:Ij,data:{rxdbVersion:e.rxdbVersion,token:t,instanceToken:e.token,passwordHash:n},_deleted:!1,_meta:Gu(),_rev:To(),_attachments:{}},i=await e.internalStore.bulkWrite([{document:r}],"internal-add-storage-token");if(i.success[0])return i.success[0];var o=bt(i.error[0]);if(o.isError&&Uv(o)){var s=o;if(!PX(s.documentInDb.data.rxdbVersion,e.rxdbVersion))throw ot("DM5",{args:{database:e.name,databaseStateVersion:s.documentInDb.data.rxdbVersion,codeVersion:e.rxdbVersion}});if(n&&n!==s.documentInDb.data.passwordHash)throw ot("DB1",{passwordHash:n,existingPasswordHash:s.documentInDb.data.passwordHash});var a=s.documentInDb;return bt(a)}throw o}function PX(e,t){if(!e||t.includes("beta")&&t!==e)return!1;var n=e.split(".")[0],r=t.split(".")[0];return n===r}async function TX(e,t,n){if(e.schema.version!==n.version)throw ot("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=Qm(e.name,e.schema.jsonSchema),i=Gf(r,Tl);;){var o=await Qv(e.database.internalStore,i),s=Ji(bt(o)),a=s.data.connectedStorages.find(l=>l.collectionName===t&&l.schema.version===n.version);if(a)return;s.data.connectedStorages.push({collectionName:t,schema:n});try{await Xv(e.database.internalStore,{previous:bt(o),document:s},"add-connected-storage-to-collection")}catch(l){if(!Uv(l))throw l}}}async function OX(e,t,n){if(e.schema.version!==n.version)throw ot("SNH",{schema:n,version:e.schema.version,name:e.name,collection:e,args:{storageCollectionName:t}});for(var r=Qm(e.name,e.schema.jsonSchema),i=Gf(r,Tl);;){var o=await Qv(e.database.internalStore,i),s=Ji(bt(o)),a=s.data.connectedStorages.find(l=>l.collectionName===t&&l.schema.version===n.version);if(!a)return;s.data.connectedStorages=s.data.connectedStorages.filter(l=>l.collectionName!==t);try{await Xv(e.database.internalStore,{previous:bt(o),document:s},"remove-connected-storage-from-collection")}catch(l){if(!Uv(l))throw l}}}function Qm(e,t){return e+"-"+t.version}function bh(e,t){return t=en(t),t=KK(e,t),t=UK(e.primaryPath,e.jsonSchema,t),t._meta=Gu(),Object.prototype.hasOwnProperty.call(t,"_deleted")||(t._deleted=!1),Object.prototype.hasOwnProperty.call(t,"_attachments")||(t._attachments={}),Object.prototype.hasOwnProperty.call(t,"_rev")||(t._rev=To()),t}async function LX(e,t){t.multiInstance=e.multiInstance;var n=await e.storage.createStorageInstance(t);return n}async function Mj(e,t,n,r,i,o,s){var a=await jj(t),l=a.filter(f=>f.data.name===i),c=[];l.forEach(f=>{c.push({collectionName:f.data.name,schema:f.data.schema,isCollection:!0}),f.data.connectedStorages.forEach(m=>c.push({collectionName:m.collectionName,isCollection:!1,schema:m.schema}))});var u=new Set;if(c=c.filter(f=>{var m=f.collectionName+"||"+f.schema.version;return u.has(m)?!1:(u.add(m),!0)}),await Promise.all(c.map(async f=>{var m=await e.createStorageInstance({collectionName:f.collectionName,databaseInstanceToken:n,databaseName:r,multiInstance:!1,options:{},schema:f.schema,password:o,devMode:_n.isDevMode()});await m.remove(),f.isCollection&&await Wl("postRemoveRxCollection",{storage:e,databaseName:r,collectionName:i})})),s){var d=l.map(f=>{var m=bp(f);return m._deleted=!0,m._meta.lwt=ur(),m._rev=$s(n,f),{previous:f,document:m}});await t.bulkWrite(d,"rx-database-remove-collection-all")}}function Mi(e){if(e.destroyed)throw ot("COL21",{collection:e.name,version:e.schema.version})}var jX=function(){function e(n){this.subs=[],this.limit=100,this.counter=0,this.eventCounterMap=new WeakMap,this.buffer=[],this.collection=n,this.subs.push(this.collection.$.pipe(Wt(r=>!r.isLocal)).subscribe(r=>this._handleChangeEvent(r)))}var t=e.prototype;return t._handleChangeEvent=function(r){for(this.counter++,this.buffer.push(r),this.eventCounterMap.set(r,this.counter);this.buffer.length>this.limit;)this.buffer.shift()},t.getArrayIndexByPointer=function(r){var i=this.buffer[0],o=this.eventCounterMap.get(i);if(ri(s))},t.reduceByLastOfDoc=function(r){return r.slice(0)},t.destroy=function(){this.subs.forEach(r=>r.unsubscribe())},e}();function IX(e){return new jX(e)}var MX=new WeakMap;function $X(e){var t=e.schema.getDocumentPrototype(),n=DX(e),r=Jv,i={};return[t,n,r].forEach(o=>{var s=Object.getOwnPropertyNames(o);s.forEach(a=>{var l=Object.getOwnPropertyDescriptor(o,a),c=!0;(a.startsWith("_")||a.endsWith("_")||a.startsWith("$")||a.endsWith("$"))&&(c=!1),typeof l.value=="function"?Object.defineProperty(i,a,{get(){return l.value.bind(this)},enumerable:c,configurable:!1}):(l.enumerable=c,l.configurable=!1,l.writable&&(l.writable=!1),Object.defineProperty(i,a,l))})}),i}function NX(e){return As(MX,e,()=>Oj($X(e)))}function AX(e,t,n){var r=_X(t,e,_n.deepFreezeWhenDevMode(n));return e._runHooksSync("post","create",n,r),Zi("postCreateRxDocument",r),r}function DX(e){var t={};return Object.entries(e.methods).forEach(([n,r])=>{t[n]=r}),t}async function Xm(e,t){var n=Ya(e.input.metaInstance.schema,{isCheckpoint:"1",itemId:t}),r=await e.input.metaInstance.findDocumentsById([n],!1),i=r[0];if(e.lastCheckpointDoc[t]=i,i)return i.checkpointData}async function Jm(e,t,n){e.checkpointQueue=e.checkpointQueue.then(async()=>{var r=e.lastCheckpointDoc[t];if(n&&!e.events.canceled.getValue()&&(!r||JSON.stringify(r.checkpointData)!==JSON.stringify(n))){var i={id:"",isCheckpoint:"1",itemId:t,_deleted:!1,_attachments:{},checkpointData:n,_meta:Gu(),_rev:To()};for(i.id=Ya(e.input.metaInstance.schema,i);!e.events.canceled.getValue();){if(r&&(i.checkpointData=Wf([r.checkpointData,i.checkpointData])),i._meta.lwt=ur(),i._rev=$s(await e.checkpointKey,r),e.events.canceled.getValue())return;var o=await e.input.metaInstance.bulkWrite([{previous:r,document:i}],"replication-set-checkpoint"),s=o.success[0];if(s){e.lastCheckpointDoc[t]=s;return}else{var a=o.error[0];if(a.status!==409)throw a;r=bt(a.documentInDb),i._rev=$s(await e.checkpointKey,r)}}}}),await e.checkpointQueue}async function BX(e){var t=await e.hashFunction([e.identifier,e.forkInstance.databaseName,e.forkInstance.collectionName].join("||"));return"rx_storage_replication_"+t}function PE(e,t,n,r,i){var o=Object.assign({},r,{_attachments:t&&r._attachments?r._attachments:{},_meta:n?r._meta:Object.assign({},i?i._meta:{},{lwt:ur()}),_rev:n?r._rev:To()});return o._rev||(o._rev=$s(e,i)),o}function pa(e,t,n){var r=en(e);return t||delete r._attachments,n||(delete r._meta,delete r._rev),r}function O1(e,t){return e.hasAttachments?t.map(n=>{var r=Ji(n.document);return r.docData=Sa(r.docData),{document:r,previous:n.previous}}):t}function L1(e){for(;;)if(e.underlyingPersistentStorage)e=e.underlyingPersistentStorage;else return e}var FX="RxReplicationProtocolMetaData";function zX(e,t){var n=WK(e),r={title:FX,primaryKey:{key:"id",fields:["itemId","isCheckpoint"],separator:"|"},type:"object",version:e.version,additionalProperties:!1,properties:{id:{type:"string",minLength:1,maxLength:n+2},isCheckpoint:{type:"string",enum:["0","1"],minLength:1,maxLength:1},itemId:{type:"string",maxLength:n>4?n:4},checkpointData:{type:"object",additionalProperties:!0},docData:{type:"object",properties:e.properties},isResolvedConflict:{type:"string"}},keyCompression:e.keyCompression,required:["id","isCheckpoint","itemId"]};t&&(r.encrypted=["docData"]);var i=Wv(r);return i}function $j(e,t){return e.input.metaInstance.findDocumentsById(t.map(n=>{var r=Ya(e.input.metaInstance.schema,{itemId:n,isCheckpoint:"0"});return r}),!0).then(n=>{var r={};return Object.values(n).forEach(i=>{r[i.itemId]={docData:i.docData,metaDocument:i}}),r})}async function Zm(e,t,n,r){var i=t[e.primaryPath],o=n?bp(n):{id:"",isCheckpoint:"0",itemId:i,docData:t,_attachments:{},_deleted:!1,_rev:To(),_meta:{lwt:0}};o.docData=t,r&&(o.isResolvedConflict=r),o._meta.lwt=ur(),o.id=Ya(e.input.metaInstance.schema,o),o._rev=$s(await e.checkpointKey,n);var s={previous:n,document:o};return s}async function UX(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.downstream){var t=await Xm(e,"down");t||await Jm(e,"down",e.input.initialCheckpoint.downstream)}var n=await e.input.hashFunction(e.input.identifier),r=e.input.replicationHandler,i=0,o=[];function s(h){e.stats.down.addNewTask=e.stats.down.addNewTask+1;var g={time:i++,task:h};o.push(g),e.streamQueue.down=e.streamQueue.down.then(()=>{for(var E=[];o.length>0;){e.events.active.down.next(!0);var b=bt(o.shift());if(!(b.time{e.events.active.down.next(!1),!e.firstSyncDone.down.getValue()&&!e.events.canceled.getValue()&&e.firstSyncDone.down.next(!0)})}if(s("RESYNC"),!e.events.canceled.getValue()){var a=r.masterChangeStream$.pipe(rs(async h=>(await $n(e.events.active.up.pipe(Wt(g=>!g))),h))).subscribe(h=>{e.stats.down.masterChangeStreamEmit=e.stats.down.masterChangeStreamEmit+1,s(h)});$n(e.events.canceled.pipe(Wt(h=>!!h))).then(()=>a.unsubscribe())}var l=-1;async function c(){if(e.stats.down.downstreamResyncOnce=e.stats.down.downstreamResyncOnce+1,!e.events.canceled.getValue()){e.checkpointQueue=e.checkpointQueue.then(()=>Xm(e,"down"));for(var h=await e.checkpointQueue,g=[];!e.events.canceled.getValue();){l=i++;var E=await r.masterChangesSince(h,e.input.pullBatchSize);if(E.documents.length===0||(h=Wf([h,E.checkpoint]),g.push(m(E.documents,h)),E.documents.length{if(b==="RESYNC")throw new Error("SNH");Pu(g,b.documents),E=Wf([E,b.checkpoint])}),m(g,bt(E))}var d=yi,f={docs:{}};function m(h,g){var E=e.primaryPath;return e.stats.down.persistFromMaster=e.stats.down.persistFromMaster+1,h.forEach(b=>{var w=b[E];f.docs[w]=b}),f.checkpoint=g,d=d.then(()=>{var b=f.docs;f.docs={};var w=f.checkpoint,y=Object.keys(b);if(e.events.canceled.getValue()||y.length===0)return yi;var _=[],R={},T={},C=[];return Promise.all([e.input.forkInstance.findDocumentsById(y,!0),$j(e,y)]).then(([I,A])=>{var j=new Map;return I.forEach($=>j.set($[E],$)),Promise.all(y.map(async $=>{var F=j.get($),z=F?pa(F,e.hasAttachments,!1):void 0,Y=b[$],J=A[$];J&&F&&J.metaDocument.isResolvedConflict===F._rev&&await e.streamQueue.up;var Z=!J||!z?!1:await e.input.conflictHandler({realMasterState:J.docData,newDocumentState:z},"downstream-check-if-equal-0").then(Le=>Le.isEqual);if(!Z&&J&&J.docData._rev&&F&&F._meta[e.input.identifier]&&Da(F._rev)===F._meta[e.input.identifier]&&(Z=!0),F&&J&&Z===!1||F&&!J)return yi;var pe=z?await e.input.conflictHandler({realMasterState:Y,newDocumentState:z},"downstream-check-if-equal-1").then(Le=>Le.isEqual):!1;if(z&&pe)return(!J||Z===!1)&&C.push(await Zm(e,z,J?J.metaDocument:void 0)),yi;var G=Object.assign({},Y,F?{_meta:en(F._meta),_attachments:e.hasAttachments&&Y._attachments?Y._attachments:{},_rev:To()}:{_meta:{lwt:ur()},_rev:To(),_attachments:e.hasAttachments&&Y._attachments?Y._attachments:{}});if(Y._rev){var V=F?Da(F._rev)+1:1;G._meta[e.input.identifier]=V,e.input.keepMeta&&(G._rev=Y._rev)}e.input.keepMeta&&Y._meta&&(G._meta=Y._meta);var le={previous:F,document:G};le.document._rev=le.document._rev?le.document._rev:$s(n,le.previous),_.push(le),R[$]=le,T[$]=await Zm(e,Y,J?J.metaDocument:void 0)}))}).then(async()=>{if(_.length>0)return e.input.forkInstance.bulkWrite(_,await e.downstreamBulkWriteFlag).then(I=>{I.success.forEach(A=>{var j=A[E];e.events.processed.down.next(R[j]),C.push(T[j])}),I.error.forEach(A=>{A.status!==409&&e.events.error.next(ot("RC_PULL",{writeError:A}))})})}).then(()=>{if(C.length>0)return e.input.metaInstance.bulkWrite(O1(e,C),"replication-down-write-meta").then(I=>{I.error.forEach(A=>{e.events.error.next(ot("RC_PULL",{id:A.documentId,writeError:A}))})})}).then(()=>{Jm(e,"down",w)})}).catch(b=>e.events.error.next(b)),d}}var Nj=function(e,t){var n=Sa(e.newDocumentState),r=Sa(e.realMasterState);return Hm(n,r)?Promise.resolve({isEqual:!0}):Promise.resolve({isEqual:!1,documentData:e.realMasterState})};async function WX(e,t,n){var r=e.input.conflictHandler,i=await r(t,"replication-resolve-conflict");if(!i.isEqual){var o=Object.assign({},i.documentData,{_meta:en(n._meta),_rev:To(),_attachments:en(n._attachments)});return o._meta.lwt=ur(),o._rev=$s(await e.checkpointKey,n),{resolvedDoc:o,output:i}}}async function j1(e,t,n,r){if(!n._attachments||r&&!r._attachments)throw new Error("_attachments missing");var i=n[e],o=new Set(r&&r._attachments?Object.keys(r._attachments):[]);return await Promise.all(Object.entries(n._attachments).map(async([s,a])=>{if((!o.has(s)||r&&bt(r._attachments)[s].digest!==a.digest)&&!a.data){var l=await t.getAttachmentData(i,s,a.digest);a.data=l}})),n}async function GX(e){if(e.input.initialCheckpoint&&e.input.initialCheckpoint.upstream){var t=await Xm(e,"up");t||await Jm(e,"up",e.input.initialCheckpoint.upstream)}var n=e.input.replicationHandler;e.streamQueue.up=e.streamQueue.up.then(()=>c().then(()=>{u()}));var r=0,i=-1,o=[],s=wo,a={docs:{}},l=e.input.forkInstance.changeStream().subscribe(async f=>{if(f.context!==await e.downstreamBulkWriteFlag)return e.stats.up.forkChangeStreamEmit=e.stats.up.forkChangeStreamEmit+1,o.push({task:f,time:r++}),e.events.active.up.getValue()||e.events.active.up.next(!0),e.input.waitBeforePersist?e.input.waitBeforePersist().then(()=>u()):u()});$n(e.events.canceled.pipe(Wt(f=>!!f))).then(()=>l.unsubscribe());async function c(){if(e.stats.up.upstreamInitialSync=e.stats.up.upstreamInitialSync+1,!e.events.canceled.getValue()){e.checkpointQueue=e.checkpointQueue.then(()=>Xm(e,"up"));for(var f=await e.checkpointQueue,m=new Set,h=async function(){i=r++,m.size>3&&await Promise.race(Array.from(m));var b=await Pj(e.input.forkInstance,e.input.pushBatchSize,f);if(b.documents.length===0)return 1;f=Wf([f,b.checkpoint]);var w=d(b.documents,bt(f));m.add(w),w.catch().then(()=>m.delete(w))};!e.events.canceled.getValue()&&!await h(););var g=await Promise.all(m),E=g.find(b=>!!b);E?await c():!e.firstSyncDone.up.getValue()&&!e.events.canceled.getValue()&&e.firstSyncDone.up.next(!0)}}function u(){if(e.events.canceled.getValue()||o.length===0){e.events.active.up.next(!1);return}e.stats.up.processTasks=e.stats.up.processTasks+1,e.events.active.up.next(!0),e.streamQueue.up=e.streamQueue.up.then(()=>{for(var f=[],m={};o.length>0;){var h=bt(o.shift());h.timeE.documentData)),m=Wf([m,h.task.checkpoint]))}var g=f.length===0?wo:d(f,m);return g.then(()=>{o.length===0?e.events.active.up.next(!1):u()})})}function d(f,m){return e.stats.up.persistToMaster=e.stats.up.persistToMaster+1,f.forEach(h=>{var g=h[e.primaryPath];a.docs[g]=h}),a.checkpoint=m,s=s.then(async()=>{if(e.events.canceled.getValue())return!1;var h=a.docs;a.docs={};var g=a.checkpoint,E=Object.keys(h);if(E.length===0)return!1;var b=await $j(e,E),w={},y=[],_={},R={};if(await Promise.all(E.map(async Z=>{var pe=h[Z];R[Z]=pe;var G=pa(pe,e.hasAttachments,!!e.input.keepMeta),V=b[Z];V&&V.metaDocument.isResolvedConflict!==pe._rev&&(await e.input.conflictHandler({realMasterState:V.docData,newDocumentState:G},"upstream-check-if-equal")).isEqual||V&&V.docData._rev&&Da(pe._rev)===pe._meta[e.input.identifier]||(y.push(Z),w[Z]={assumedMasterState:V?V.docData:void 0,newDocumentState:G},_[Z]=await Zm(e,G,V?V.metaDocument:void 0))})),y.length===0)return!1;var T=Object.values(w),C=new Set,I={},A=cK(T,e.input.pushBatchSize);await Promise.all(A.map(async Z=>{e.hasAttachments&&await Promise.all(Z.map(async G=>{G.newDocumentState=await j1(e.primaryPath,e.input.forkInstance,Ji(G.newDocumentState),G.assumedMasterState)}));var pe=await n.masterWrite(Z);pe.forEach(G=>{var V=G[e.primaryPath];C.add(V),I[V]=G})}));var j=[];if(y.forEach(Z=>{C.has(Z)||(e.events.processed.up.next(w[Z]),j.push(_[Z]))}),e.events.canceled.getValue())return!1;j.length>0&&await e.input.metaInstance.bulkWrite(O1(e,j),"replication-up-write-meta");var $=!1;if(C.size>0){e.stats.up.persistToMasterHadConflicts=e.stats.up.persistToMasterHadConflicts+1;var F=[],z={};if(await Promise.all(Object.entries(I).map(([Z,pe])=>{var G=w[Z],V={newDocumentState:G.newDocumentState,assumedMasterState:G.assumedMasterState,realMasterState:pe};return WX(e,V,R[Z]).then(async le=>{if(le){e.events.resolvedConflicts.next({input:V,output:le.output}),F.push({previous:R[Z],document:le.resolvedDoc});var Le=b[Z];z[Z]=await Zm(e,bt(pe),Le?Le.metaDocument:void 0,le.resolvedDoc._rev)}})})),F.length>0){$=!0,e.stats.up.persistToMasterConflictWrites=e.stats.up.persistToMasterConflictWrites+1;var Y=await e.input.forkInstance.bulkWrite(F,"replication-up-write-conflict"),J=[];Y.success.forEach(Z=>{var pe=Z[e.primaryPath];J.push(z[pe])}),J.length>0&&await e.input.metaInstance.bulkWrite(O1(e,J),"replication-up-write-conflict-meta")}}return Jm(e,"up",g),$}).catch(h=>(e.events.error.next(h),!1)),s}}function HX(e){e=en(e),e.forkInstance=L1(e.forkInstance),e.metaInstance=L1(e.metaInstance);var t=BX(e),n={primaryPath:jo(e.forkInstance.schema.primaryKey),hasAttachments:!!e.forkInstance.schema.attachments,input:e,checkpointKey:t,downstreamBulkWriteFlag:t.then(r=>"replication-downstream-"+r),events:{canceled:new bs(!1),active:{down:new bs(!0),up:new bs(!0)},processed:{down:new Ln,up:new Ln},resolvedConflicts:new Ln,error:new Ln},stats:{down:{addNewTask:0,downstreamProcessChanges:0,downstreamResyncOnce:0,masterChangeStreamEmit:0,persistFromMaster:0},up:{forkChangeStreamEmit:0,persistToMaster:0,persistToMasterConflictWrites:0,persistToMasterHadConflicts:0,processTasks:0,upstreamInitialSync:0}},firstSyncDone:{down:new bs(!1),up:new bs(!1)},streamQueue:{down:yi,up:yi},checkpointQueue:yi,lastCheckpointDoc:{}};return UX(n),GX(n),n}function O0(e){return $n(nj([e.firstSyncDone.down.pipe(Wt(t=>!!t)),e.firstSyncDone.up.pipe(Wt(t=>!!t))])).then(()=>{})}function TE(e){return Promise.all([e.streamQueue.up,e.streamQueue.down,e.checkpointQueue])}function VX(e,t,n,r=!1){e=L1(e);var i=!!e.schema.attachments,o=jo(e.schema.primaryKey),s={masterChangeStream$:e.changeStream().pipe(rs(async a=>{var l={checkpoint:a.checkpoint,documents:await Promise.all(a.events.map(async c=>{var u=pa(c.documentData,i,r);return i&&(u=await j1(o,e,Ji(u),void 0)),u}))};return l})),masterChangesSince(a,l){return Pj(e,l,a).then(async c=>({checkpoint:c.documents.length>0?c.checkpoint:a,documents:await Promise.all(c.documents.map(async u=>{var d=pa(u,i,r);return i&&(d=await j1(o,e,Ji(d),void 0)),d}))}))},async masterWrite(a){var l={};a.forEach(g=>{var E=g.newDocumentState[o];l[E]=g});var c=Object.keys(l),u=await e.findDocumentsById(c,!0),d=new Map;u.forEach(g=>d.set(g[o],g));var f=[],m=[];if(await Promise.all(Object.entries(l).map(async([g,E])=>{var b=d.get(g);b?b&&!E.assumedMasterState?f.push(pa(b,i,r)):(await t({realMasterState:pa(b,i,r),newDocumentState:bt(E.assumedMasterState)},"rxStorageInstanceToReplicationHandler-masterWrite")).isEqual===!0?m.push({previous:b,document:PE(n,i,r,E.newDocumentState,b)}):f.push(pa(b,i,r)):m.push({document:PE(n,i,r,E.newDocumentState)})})),m.length>0){var h=await e.bulkWrite(m,"replication-master-write");h.error.forEach(g=>{if(g.status!==409)throw new Error("non conflict error");f.push(pa(bt(g.documentInDb),i,r))})}return f}};return s}async function KX(e){e.events.canceled.next(!0),e.events.active.up.complete(),e.events.active.down.complete(),e.events.processed.up.complete(),e.events.processed.down.complete(),e.events.resolvedConflicts.complete(),e.events.canceled.complete(),await e.checkpointQueue}var Aj=["pre","post"],Dj=["insert","save","remove","create"],OE=!1,Bj=function(){function e(n,r,i,o,s={},a={},l={},c={},u={},d=Sj,f={},m=Nj){this.storageInstance={},this.timeouts=new Set,this.incrementalWriteQueue={},this._incrementalUpsertQueues=new Map,this.synced=!1,this.hooks={},this._subs=[],this._docCache={},this._queryCache=eX(),this.$={},this.checkpoint$={},this._changeEventBuffer={},this.onDestroy=[],this.destroyed=!1,this.onRemove=[],this.database=n,this.name=r,this.schema=i,this.internalStorageInstance=o,this.instanceCreationOptions=s,this.migrationStrategies=a,this.methods=l,this.attachments=c,this.options=u,this.cacheReplacementPolicy=d,this.statics=f,this.conflictHandler=m,qX(this.asRxCollection)}var t=e.prototype;return t.prepare=async function(){this.storageInstance=mS(this.database,this.internalStorageInstance,this.schema.jsonSchema),this.incrementalWriteQueue=new Tj(this.storageInstance,this.schema.primaryPath,(l,c)=>Lj(this,l,c),l=>this._runHooks("post","save",l));var r=this.database.eventBulks$.pipe(Wt(l=>l.collectionName===this.name));this.$=r.pipe(rs(l=>l.events)),this.checkpoint$=r.pipe(qt(l=>l.checkpoint)),this._changeEventBuffer=IX(this.asRxCollection);var i;this._docCache=new _j(this.schema.primaryPath,this.$.pipe(Wt(l=>!l.isLocal)),l=>(i||(i=NX(this.asRxCollection)),AX(this.asRxCollection,i,l)));var o=this.database.internalStore.changeStream().pipe(Wt(l=>{var c=this.name+"-"+this.schema.version,u=l.events.find(d=>d.documentData.context==="collection"&&d.documentData.key===c&&d.operation==="DELETE");return!!u})).subscribe(async()=>{await this.destroy(),await Promise.all(this.onRemove.map(l=>l()))});this._subs.push(o);var s=await this.database.storageToken,a=this.storageInstance.changeStream().subscribe(l=>{for(var c=new Array(l.events.length),u=l.events,d=this.name,f=_n.deepFreezeWhenDevMode,m=0;m{this.conflictHandler(l.input,l.context).then(c=>{this.storageInstance.resolveConflictResultionTask({id:l.id,output:c})})})),yi},t.cleanup=function(r){throw Mi(this),un("cleanup")},t.migrationNeeded=function(){throw un("migration-schema")},t.getMigrationState=function(){throw un("migration-schema")},t.startMigration=function(r=10){return Mi(this),this.getMigrationState().startMigration(r)},t.migratePromise=function(r=10){return this.getMigrationState().migratePromise(r)},t.insert=async function(r){Mi(this);var i=await this.bulkInsert([r]),o=i.error[0];Ym(this,r[this.schema.primaryPath],r,o);var s=bt(i.success[0]);return s},t.bulkInsert=async function(r){if(Mi(this),r.length===0)return{success:[],error:[]};var i=this.schema.primaryPath,o;if(this.hasHooks("pre","insert"))o=await Promise.all(r.map(f=>{var m=bh(this.schema,f);return this._runHooks("pre","insert",m).then(()=>({document:m}))}));else{o=[];for(var s=0;s{var m=f.document;d.set(m[i],m)}),await Promise.all(u.map(f=>this._runHooks("post","insert",d.get(f.primary),f)))}return{success:u,error:c.error}},t.bulkRemove=async function(r){Mi(this);var i=this.schema.primaryPath;if(r.length===0)return{success:[],error:[]};var o=await this.findByIds(r).exec(),s=[],a=new Map;Array.from(o.values()).forEach(f=>{var m=f.toMutableJSON(!0);s.push(m),a.set(f.primary,m)}),await Promise.all(s.map(f=>{var m=f[this.schema.primaryPath];return this._runHooks("pre","remove",f,o.get(m))}));var l=s.map(f=>{var m=en(f);return m._deleted=!0,{previous:f,document:m}}),c=await this.storageInstance.bulkWrite(l,"rx-collection-bulk-remove"),u=c.success.map(f=>f[i]);await Promise.all(u.map(f=>this._runHooks("post","remove",a.get(f),o.get(f))));var d=u.map(f=>Ns(o,f));return{success:d,error:c.error}},t.bulkUpsert=async function(r){Mi(this);var i=[],o=new Map;r.forEach(c=>{var u=bh(this.schema,c),d=u[this.schema.primaryPath];if(!d)throw ot("COL3",{primaryPath:this.schema.primaryPath,data:u,schema:this.schema.jsonSchema});o.set(d,u),i.push(u)});var s=await this.bulkInsert(i),a=s.success.slice(0),l=[];return await Promise.all(s.error.map(async c=>{if(c.status!==409)l.push(c);else{var u=c.documentId,d=Ns(o,u),f=bt(c.documentInDb),m=this._docCache.getCachedRxDocuments([f])[0],h=await m.incrementalModify(()=>d);a.push(h)}})),{error:l,success:a}},t.upsert=async function(r){Mi(this);var i=await this.bulkUpsert([r]);return Ym(this.asRxCollection,r[this.schema.primaryPath],r,i.error[0]),i.success[0]},t.incrementalUpsert=function(r){Mi(this);var i=bh(this.schema,r),o=i[this.schema.primaryPath];if(!o)throw ot("COL4",{data:r});var s=this._incrementalUpsertQueues.get(o);return s||(s=yi),s=s.then(()=>QX(this,o,i)).then(a=>a.inserted?a.doc:YX(a.doc,i)),this._incrementalUpsertQueues.set(o,s),s},t.find=function(r){if(Mi(this),typeof r=="string")throw ot("COL5",{queryObj:r});r||(r=em());var i=Ic("find",r,this);return i},t.findOne=function(r){if(Mi(this),typeof r=="number"||Array.isArray(r))throw mi("COL6",{queryObj:r});var i;if(typeof r=="string")i=Ic("findOne",{selector:{[this.schema.primaryPath]:r},limit:1},this);else{if(r||(r=em()),r.limit)throw ot("QU6");r=en(r),r.limit=1,i=Ic("findOne",r,this)}return i},t.count=function(r){Mi(this),r||(r=em());var i=Ic("count",r,this);return i},t.findByIds=function(r){Mi(this);var i={selector:{[this.schema.primaryPath]:{$in:r.slice(0)}}},o=Ic("findByIds",i,this);return o},t.exportJSON=function(){throw un("json-dump")},t.importJSON=function(r){throw un("json-dump")},t.insertCRDT=function(r){throw un("crdt")},t.addHook=function(r,i,o,s=!1){if(typeof o!="function")throw mi("COL7",{key:i,when:r});if(!Aj.includes(r))throw mi("COL8",{key:i,when:r});if(!Dj.includes(i))throw ot("COL9",{key:i});if(r==="post"&&i==="create"&&s===!0)throw ot("COL10",{when:r,key:i,parallel:s});var a=o.bind(this),l=s?"parallel":"series";this.hooks[i]=this.hooks[i]||{},this.hooks[i][r]=this.hooks[i][r]||{series:[],parallel:[]},this.hooks[i][r][l].push(a)},t.getHooks=function(r,i){return!this.hooks[i]||!this.hooks[i][r]?{series:[],parallel:[]}:this.hooks[i][r]},t.hasHooks=function(r,i){if(!this.hooks[i]||!this.hooks[i][r])return!1;var o=this.getHooks(r,i);return o?o.series.length>0||o.parallel.length>0:!1},t._runHooks=function(r,i,o,s){var a=this.getHooks(r,i);if(!a)return yi;var l=a.series.map(c=>()=>c(o,s));return OK(l).then(()=>Promise.all(a.parallel.map(c=>c(o,s))))},t._runHooksSync=function(r,i,o,s){if(this.hasHooks(r,i)){var a=this.getHooks(r,i);a&&a.series.forEach(l=>l(o,s))}},t.promiseWait=function(r){var i=new Promise(o=>{var s=setTimeout(()=>{this.timeouts.delete(s),o()},r);this.timeouts.add(s)});return i},t.destroy=async function(){return this.destroyed?wo:(await Promise.all(this.onDestroy.map(r=>r())),this.destroyed=!0,Array.from(this.timeouts).forEach(r=>clearTimeout(r)),this._changeEventBuffer&&this._changeEventBuffer.destroy(),this.database.requestIdlePromise().then(()=>this.storageInstance.close()).then(()=>(this._subs.forEach(r=>r.unsubscribe()),delete this.database.collections[this.name],Wl("postDestroyRxCollection",this).then(()=>!0))))},t.remove=async function(){await this.destroy(),await Promise.all(this.onRemove.map(r=>r())),await Mj(this.database.storage,this.database.internalStore,this.database.token,this.database.name,this.name,this.database.password,this.database.hashFunction)},Vs(e,[{key:"insert$",get:function(){return this.$.pipe(Wt(n=>n.operation==="INSERT"))}},{key:"update$",get:function(){return this.$.pipe(Wt(n=>n.operation==="UPDATE"))}},{key:"remove$",get:function(){return this.$.pipe(Wt(n=>n.operation==="DELETE"))}},{key:"asRxCollection",get:function(){return this}}])}();function qX(e){if(!OE){OE=!0;var t=Object.getPrototypeOf(e);Dj.forEach(n=>{Aj.map(r=>{var i=r+CL(n);t[i]=function(o,s){return this.addHook(r,n,o,s)}})})}}function YX(e,t){return e.incrementalModify(n=>t)}function QX(e,t,n){var r=e._docCache.getLatestDocumentDataIfExists(t);return r?Promise.resolve({doc:e._docCache.getCachedRxDocuments([r])[0],inserted:!1}):e.findOne(t).exec().then(i=>i?{doc:i,inserted:!1}:e.insert(n).then(o=>({doc:o,inserted:!0})))}function XX({database:e,name:t,schema:n,instanceCreationOptions:r={},migrationStrategies:i={},autoMigrate:o=!0,statics:s={},methods:a={},attachments:l={},options:c={},localDocuments:u=!1,cacheReplacementPolicy:d=Sj,conflictHandler:f=Nj}){var m={databaseInstanceToken:e.token,databaseName:e.name,collectionName:t,schema:n.jsonSchema,options:r,multiInstance:e.multiInstance,password:e.password,devMode:_n.isDevMode()};return Zi("preCreateRxStorageInstance",m),LX(e,m).then(h=>{var g=new Bj(e,t,n,h,r,i,a,l,c,d,s,f);return g.prepare().then(()=>{Object.entries(s).forEach(([b,w])=>{Object.defineProperty(g,b,{get:()=>w.bind(g)})});var E=yi;return o&&g.schema.version!==0&&(E=g.migratePromise()),E}).then(()=>(Zi("createRxCollection",{collection:g,creator:{name:t,schema:n,storageInstance:h,instanceCreationOptions:r,migrationStrategies:i,methods:a,attachments:l,options:c,cacheReplacementPolicy:d,localDocuments:u,statics:s}}),g)).catch(E=>h.close().then(()=>Promise.reject(E)))})}var Fj=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this._parallels=t||1,this._qC=0,this._iC=new Set,this._lHN=0,this._hPM=new Map,this._pHM=new Map};Fj.prototype={isIdle:function(){return this._qC{this._to=!1,ZX(this)},0))}clear(){this.map.clear()}}function ZX(e){const t=zj()-e.ttl,n=e.map[Symbol.iterator]();for(;;){const r=n.next().value;if(!r)return;const i=r[0];if(r[1]g.events)),this.storageToken=wo,this.storageTokenDocument=wo,this.emittedEventBulkIds=new yS(60*1e3),this.name=n,this.token=r,this.storage=i,this.instanceCreationOptions=o,this.password=s,this.multiInstance=a,this.eventReduce=l,this.options=c,this.internalStore=u,this.hashFunction=d,this.cleanupPolicy=f,this.allowSlowCount=m,this.reactivity=h,this.name!=="pseudoInstance"&&(this.internalStore=mS(this.asRxDatabase,u,vS),this.storageTokenDocument=RX(this.asRxDatabase).catch(g=>this.startupErrors.push(g)),this.storageToken=this.storageTokenDocument.then(g=>g.data.token).catch(g=>this.startupErrors.push(g)))}var t=e.prototype;return t.getReactivityFactory=function(){if(!this.reactivity)throw ot("DB14",{database:this.name});return this.reactivity},t.$emit=function(r){this.emittedEventBulkIds.has(r.id)||(this.emittedEventBulkIds.add(r.id),this.eventBulks$.next(r))},t.removeCollectionDoc=async function(r,i){var o=await Qv(this.internalStore,Gf(Qm(r,i),Tl));if(!o)throw ot("SNH",{name:r,schema:i});var s=bp(o);s._deleted=!0,await this.internalStore.bulkWrite([{document:s,previous:o}],"rx-database-remove-collection")},t.addCollections=async function(r){var i={},o={},s=[],a={};await Promise.all(Object.entries(r).map(async([u,d])=>{var f=u,m=d.schema;i[f]=m;var h=YK(m,this.hashFunction);if(o[f]=h,this.collections[u])throw ot("DB3",{name:u});var g=Qm(u,m),E={id:Gf(g,Tl),key:g,context:Tl,data:{name:f,schemaHash:await h.hash,schema:h.jsonSchema,version:h.version,connectedStorages:[]},_deleted:!1,_meta:Gu(),_rev:To(),_attachments:{}};s.push({document:E});var b=Object.assign({},d,{name:f,schema:h,database:this}),w=en(d);w.database=this,w.name=u,Zi("preCreateRxCollection",w),b.conflictHandler=w.conflictHandler,a[f]=b}));var l=await this.internalStore.bulkWrite(s,"rx-database-add-collection");await iJ(this),await Promise.all(l.error.map(async u=>{if(u.status!==409)throw ot("DB12",{database:this.name,writeError:u});var d=bt(u.documentInDb),f=d.data.name,m=o[f];if(d.data.schemaHash!==await m.hash)throw ot("DB6",{database:this.name,collection:f,previousSchemaHash:d.data.schemaHash,schemaHash:await m.hash,previousSchema:d.data.schema,schema:bt(i[f])})}));var c={};return await Promise.all(Object.keys(r).map(async u=>{var d=a[u],f=await XX(d);c[u]=f,this.collections[u]=f,this[u]||Object.defineProperty(this,u,{get:()=>this.collections[u]})})),c},t.lockedRun=function(r){return this.idleQueue.wrapCall(r)},t.requestIdlePromise=function(){return this.idleQueue.requestIdlePromise()},t.exportJSON=function(r){throw un("json-dump")},t.addState=function(r){throw un("state")},t.importJSON=function(r){throw un("json-dump")},t.backup=function(r){throw un("backup")},t.leaderElector=function(){throw un("leader-election")},t.isLeader=function(){throw un("leader-election")},t.waitForLeadership=function(){throw un("leader-election")},t.migrationStates=function(){throw un("migration-schema")},t.destroy=async function(){return this.destroyed||(this.destroyed=!0,await Wl("preDestroyRxDatabase",this),this.eventBulks$.complete(),this._subs.map(r=>r.unsubscribe()),this.name==="pseudoInstance")?wo:this.requestIdlePromise().then(()=>Promise.all(this.onDestroy.map(r=>r()))).then(()=>Promise.all(Object.keys(this.collections).map(r=>this.collections[r]).map(r=>r.destroy()))).then(()=>this.internalStore.close()).then(()=>eg.delete(this.storage.name+"|"+this.name)).then(()=>!0)},t.remove=function(){return this.destroy().then(()=>nJ(this.name,this.storage,this.password))},Vs(e,[{key:"$",get:function(){return this.observable$}},{key:"asRxDatabase",get:function(){return this}}])}();function eJ(e,t){var n=t.name+"|"+e;if(eg.has(n))throw ot("DB8",{name:e,storage:t.name,link:"https://rxdb.info/rx-database.html#ignoreduplicate"})}async function Uj(e,t,n,r,i,o){var s=await t.createStorageInstance({databaseInstanceToken:e,databaseName:n,collectionName:gX,schema:vS,options:r,multiInstance:i,password:o,devMode:_n.isDevMode()});return s}function tJ({storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i=!0,eventReduce:o=!0,ignoreDuplicate:s=!1,options:a={},cleanupPolicy:l,allowSlowCount:c=!1,localDocuments:u=!1,hashFunction:d=xL,reactivity:f}){Zi("preCreateRxDatabase",{storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i,eventReduce:o,ignoreDuplicate:s,options:a,localDocuments:u}),s||eJ(n,e),eg.add(e.name+"|"+n);var m=nc(10);return Uj(m,e,n,t,i,r).catch(h=>{throw eg.delete(e.name+"|"+n),h}).then(h=>{var g=new bS(n,m,e,t,r,i,o,a,h,d,l,c,f);return Wl("createRxDatabase",{database:g,creator:{storage:e,instanceCreationOptions:t,name:n,password:r,multiInstance:i,eventReduce:o,ignoreDuplicate:s,options:a,localDocuments:u}}).then(()=>g)})}async function nJ(e,t,n){var r=nc(10),i=await Uj(r,t,e,{},!1,n),o=await jj(i),s=new Set;o.forEach(l=>s.add(l.data.name));var a=Array.from(s);return await Promise.all(a.map(l=>Mj(t,i,r,e,l,n))),await Wl("postRemoveRxDatabase",{databaseName:e,storage:t}),await i.remove(),a}function rJ(e){return e instanceof bS}async function iJ(e){if(await e.storageToken,e.startupErrors[0])throw e.startupErrors[0]}var oJ={RxSchema:IL.prototype,RxDocument:Jv,RxQuery:kj.prototype,RxCollection:Bj.prototype,RxDatabase:bS.prototype},j0=new Set,LE=new Set;function qu(e){if(Zi("preAddRxPlugin",{plugin:e,plugins:j0}),!j0.has(e)){{if(LE.has(e.name))throw ot("PL3",{name:e.name,plugin:e});j0.add(e),LE.add(e.name)}if(!e.rxdb)throw mi("PL1",{plugin:e});e.init&&e.init(),e.prototypes&&Object.entries(e.prototypes).forEach(([t,n])=>n(oJ[t])),e.overwritable&&Object.assign(_n,e.overwritable),e.hooks&&Object.entries(e.hooks).forEach(([t,n])=>{n.after&&Ff[t].push(n.after),n.before&&Ff[t].unshift(n.before)})}}function sJ(e){return e&&typeof e.then=="function"}Promise.resolve(!1);var aJ=Promise.resolve(!0),Ts=Promise.resolve();function xl(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function lJ(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function wp(){return Math.random().toString(36).substring(2)}var I0=0;function xp(){var e=Date.now()*1e3;return e<=I0&&(e=I0+1),I0=e,e}function cJ(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}var uJ=xp,dJ="native";function fJ(e){var t={time:xp(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function pJ(e){e.bc.close(),e.subFns=[]}function hJ(e,t){try{return e.bc.postMessage(t,!1),Ts}catch(n){return Promise.reject(n)}}function mJ(e,t){e.messagesCallback=t}function gJ(){if(typeof globalThis<"u"&&globalThis.Deno&&globalThis.Deno.args)return!0;if((typeof window<"u"||typeof self<"u")&&typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function vJ(){return 150}var yJ={create:fJ,close:pJ,onMessage:mJ,postMessage:hJ,canBeUsed:gJ,type:dJ,averageResponseTime:vJ,microSeconds:uJ};function wS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var bJ=xp,wJ="pubkey.broadcast-channel-0-",Bs="messages",Zv={durability:"relaxed"},xJ="idb";function Wj(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function xS(e){e.commit&&e.commit()}function SJ(e){var t=Wj(),n=wJ+e,r=t.open(n);return r.onupgradeneeded=function(i){var o=i.target.result;o.createObjectStore(Bs,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,o){r.onerror=function(s){return o(s)},r.onsuccess=function(){i(r.result)}})}function _J(e,t,n){var r=Date.now(),i={uuid:t,time:r,data:n},o=e.transaction([Bs],"readwrite",Zv);return new Promise(function(s,a){o.oncomplete=function(){return s()},o.onerror=function(c){return a(c)};var l=o.objectStore(Bs);l.add(i),xS(o)})}function CJ(e,t){var n=e.transaction(Bs,"readonly",Zv),r=n.objectStore(Bs),i=[],o=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var s=r.getAll(o);return new Promise(function(l,c){s.onerror=function(u){return c(u)},s.onsuccess=function(u){l(u.target.result)}})}function a(){try{return o=IDBKeyRange.bound(t+1,1/0),r.openCursor(o)}catch{return r.openCursor()}}return new Promise(function(l,c){var u=a();u.onerror=function(d){return c(d)},u.onsuccess=function(d){var f=d.target.result;f?f.value.ide.lastCursorId&&(e.lastCursorId=r.id),r}).filter(function(r){return TJ(r,e)}).sort(function(r,i){return r.time-i.time});return n.forEach(function(r){e.messagesCallback&&(e.eMIs.add(r.id),e.messagesCallback(r.data))}),Ts})}function OJ(e){e.closed=!0,e.db.close()}function LJ(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return _J(e.db,e.uuid,t)}).then(function(){lJ(0,10)===0&&RJ(e)}),e.writeBlockPromise}function jJ(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Hj(e)}function IJ(){return!!Wj()}function MJ(e){return e.idb.fallbackInterval*2}var $J={create:PJ,close:OJ,onMessage:jJ,postMessage:LJ,canBeUsed:IJ,type:xJ,averageResponseTime:MJ,microSeconds:bJ},NJ=xp,AJ="pubkey.broadcastChannel-",DJ="localstorage";function Vj(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function Kj(e){return AJ+e}function BJ(e,t){return new Promise(function(n){xl().then(function(){var r=Kj(e.channelName),i={token:wp(),time:Date.now(),data:t,uuid:e.uuid},o=JSON.stringify(i);Vj().setItem(r,o);var s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=r,s.newValue=o,window.dispatchEvent(s),n()})})}function FJ(e,t){var n=Kj(e),r=function(o){o.key===n&&t(JSON.parse(o.newValue))};return window.addEventListener("storage",r),r}function zJ(e){window.removeEventListener("storage",e)}function UJ(e,t){if(t=wS(t),!qj())throw new Error("BroadcastChannel: localstorage cannot be used");var n=wp(),r=new yS(t.localstorage.removeTimeout),i={channelName:e,uuid:n,eMIs:r};return i.listener=FJ(e,function(o){i.messagesCallback&&o.uuid!==n&&(!o.token||r.has(o.token)||o.data.time&&o.data.time0||e._addEL.internal.length>0}function $E(e,t,n){e._addEL[t].push(n),iZ(e)}function NE(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),oZ(e)}function iZ(e){if(!e._iL&&Jj(e)){var t=function(i){e._addEL[i.type].forEach(function(o){i.time>=o.time&&o.fn(i.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function oZ(e){if(e._iL&&!Jj(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}function sZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zj={exports:{}},Bn=Zj.exports={},Fo,zo;function M1(){throw new Error("setTimeout has not been defined")}function $1(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Fo=setTimeout:Fo=M1}catch{Fo=M1}try{typeof clearTimeout=="function"?zo=clearTimeout:zo=$1}catch{zo=$1}})();function eI(e){if(Fo===setTimeout)return setTimeout(e,0);if((Fo===M1||!Fo)&&setTimeout)return Fo=setTimeout,setTimeout(e,0);try{return Fo(e,0)}catch{try{return Fo.call(null,e,0)}catch{return Fo.call(this,e,0)}}}function aZ(e){if(zo===clearTimeout)return clearTimeout(e);if((zo===$1||!zo)&&clearTimeout)return zo=clearTimeout,clearTimeout(e);try{return zo(e)}catch{try{return zo.call(null,e)}catch{return zo.call(this,e)}}}var Ss=[],cu=!1,Sl,tm=-1;function lZ(){!cu||!Sl||(cu=!1,Sl.length?Ss=Sl.concat(Ss):tm=-1,Ss.length&&tI())}function tI(){if(!cu){var e=eI(lZ);cu=!0;for(var t=Ss.length;t;){for(Sl=Ss,Ss=[];++tm1)for(var n=1;n0)})},awaitLeadership:function(){var t=this;if(!this._wLMP){this._wKMC.c=new AbortController;var n=new Promise(function(r,i){t._wKMC.res=r,t._wKMC.rej=i});this._wLMP=new Promise(function(r){navigator.locks.request(t.lN,{signal:t._wKMC.c.signal},function(){return t._wKMC.c=void 0,rI(t),r(),n}).catch(function(){})})}return this._wLMP},set onduplicate(e){},die:function(){var t=this;return this._lstns.forEach(function(n){return t.broadcastChannel.removeEventListener("internal",n)}),this._lstns=[],this._unl.forEach(function(n){return n.remove()}),this._unl=[],this.isLeader&&(this.isLeader=!1),this.isDead=!0,this._wKMC.res&&this._wKMC.res(),this._wKMC.c&&this._wKMC.c.abort("LeaderElectionWebLock.die() called"),Ol(this,"death")}};var oI=function(t,n){var r=this;this.broadcastChannel=t,this._options=n,this.isLeader=!1,this._hasLeader=!1,this.isDead=!1,this.token=wp(),this._aplQ=Ts,this._aplQC=0,this._unl=[],this._lstns=[],this._dpL=function(){},this._dpLC=!1;var i=function(s){s.context==="leader"&&(s.action==="death"&&(r._hasLeader=!1),s.action==="tell"&&(r._hasLeader=!0))};this.broadcastChannel.addEventListener("internal",i),this._lstns.push(i)};oI.prototype={hasLeader:function(){return Promise.resolve(this._hasLeader)},applyOnce:function(t){var n=this;if(this.isLeader)return xl(0,!0);if(this.isDead)return xl(0,!1);if(this._aplQC>1)return this._aplQ;var r=function(){if(n.isLeader)return aJ;var o=!1,s,a=new Promise(function(u){s=function(){o=!0,u()}}),l=function(d){d.context==="leader"&&d.token!=n.token&&(d.action==="apply"&&d.token>n.token&&s(),d.action==="tell"&&(s(),n._hasLeader=!0))};n.broadcastChannel.addEventListener("internal",l);var c=t?n._options.responseTime*4:n._options.responseTime;return Ol(n,"apply").then(function(){return Promise.race([xl(c),a.then(function(){return Promise.reject(new Error)})])}).then(function(){return Ol(n,"apply")}).then(function(){return Promise.race([xl(c),a.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return n.broadcastChannel.removeEventListener("internal",l),o?!1:rI(n).then(function(){return!0})})};return this._aplQC=this._aplQC+1,this._aplQ=this._aplQ.then(function(){return r()}).then(function(){n._aplQC=n._aplQC-1}),this._aplQ.then(function(){return n.isLeader})},awaitLeadership:function(){return this._aLP||(this._aLP=vZ(this)),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var t=this;return this._lstns.forEach(function(n){return t.broadcastChannel.removeEventListener("internal",n)}),this._lstns=[],this._unl.forEach(function(n){return n.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,Ol(this,"death")}};function vZ(e){return e.isLeader?Ts:new Promise(function(t){var n=!1;function r(){n||(n=!0,e.broadcastChannel.removeEventListener("internal",o),t(!0))}e.applyOnce().then(function(){e.isLeader&&r()});var i=function s(){return xl(e._options.fallbackInterval).then(function(){if(!(e.isDead||n))if(e.isLeader)r();else return e.applyOnce(!0).then(function(){e.isLeader?r():s()})})};i();var o=function(a){a.context==="leader"&&a.action==="death"&&(e._hasLeader=!1,e.applyOnce().then(function(){e.isLeader&&r()}))};e.broadcastChannel.addEventListener("internal",o),e._lstns.push(o)})}function yZ(e,t){return e||(e={}),e=JSON.parse(JSON.stringify(e)),e.fallbackInterval||(e.fallbackInterval=3e3),e.responseTime||(e.responseTime=t.method.averageResponseTime(t.options)),e}function bZ(e,t){if(e._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");t=yZ(t,e);var n=cJ()?new iI(e,t):new oI(e,t);return e._befC.push(function(){return n.die()}),e._leaderElector=n,n}var tg=new Map;function sI(e,t,n,r){var i=tg.get(t);return i||(i={bc:new _S(["RxDB:",e,n].join("|")),refs:new Set},tg.set(t,i)),i.refs.add(r),i.bc}function N1(e,t){var n=tg.get(e);if(n&&(n.refs.delete(t),n.refs.size===0))return tg.delete(e),n.bc.close()}function wZ(e,t,n,r){if(t.multiInstance){var i=r||sI(e,t.databaseInstanceToken,n.databaseName,n),o=new Ln,s=f=>{f.storageName===e&&f.databaseName===t.databaseName&&f.collectionName===t.collectionName&&f.version===t.schema.version&&o.next(f.eventBulk)};i.addEventListener("message",s);var a=n.changeStream(),l=!1,c=a.subscribe(f=>{l||i.postMessage({storageName:e,databaseName:t.databaseName,collectionName:t.collectionName,version:t.schema.version,eventBulk:f})});n.changeStream=function(){return o.asObservable().pipe(Uq(a))};var u=n.close.bind(n);n.close=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),r||await N1(t.databaseInstanceToken,n),u()};var d=n.remove.bind(n);n.remove=async function(){return l=!0,c.unsubscribe(),i.removeEventListener("message",s),r||await N1(t.databaseInstanceToken,n),d()}}}var aI={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Cr,function(){var n=function(p,x){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,L){P.__proto__=L}||function(P,L){for(var M in L)Object.prototype.hasOwnProperty.call(L,M)&&(P[M]=L[M])})(p,x)},r=function(){return(r=Object.assign||function(p){for(var x,P=1,L=arguments.length;P"u"||o.Promise||(o.Promise=Promise);var c=Object.getPrototypeOf,u={}.hasOwnProperty;function d(p,x){return u.call(p,x)}function f(p,x){typeof x=="function"&&(x=x(c(p))),(typeof Reflect>"u"?s:Reflect.ownKeys)(x).forEach(function(P){h(p,P,x[P])})}var m=Object.defineProperty;function h(p,x,P,L){m(p,x,l(P&&d(P,"get")&&typeof P.get=="function"?{get:P.get,set:P.set,configurable:!0}:{value:P,configurable:!0,writable:!0},L))}function g(p){return{from:function(x){return p.prototype=Object.create(x.prototype),h(p.prototype,"constructor",p),{extend:f.bind(null,p.prototype)}}}}var E=Object.getOwnPropertyDescriptor,b=[].slice;function w(p,x,P){return b.call(p,x,P)}function y(p,x){return x(p)}function _(p){if(!p)throw new Error("Assertion Failed")}function R(p){o.setImmediate?setImmediate(p):setTimeout(p,0)}function T(p,x){if(typeof x=="string"&&d(p,x))return p[x];if(!x)return p;if(typeof x!="string"){for(var P=[],L=0,M=x.length;L"u"?[]:function(){var p=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[p,c(p),p];var x=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[x,c(x),p]}(),de=ao[0],Ii=ao[1],ao=ao[2],Ii=Ii&&Ii.then,$e=de&&de.constructor,rt=!!ao,Je=function(p,x){Vt.push([p,x]),tt&&(queueMicrotask(ge),tt=!1)},Oe=!0,tt=!0,xt=[],Ht=[],Xe=Ze,yt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:We,pgp:!1,env:{},finalize:We},Ne=yt,Vt=[],bn=0,hr=[];function Ue(p){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var x=this._PSD=Ne;if(typeof p!="function"){if(p!==K)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Kr(this,this._value))}this._state=null,this._value=null,++x.ref,function P(L,M){try{M(function(B){if(L._state===null){if(B===L)throw new TypeError("A promise cannot be resolved with itself.");var H=L._lib&&we();B&&typeof B.then=="function"?P(L,function(q,re){B instanceof Ue?B._then(q,re):B.then(q,re)}):(L._state=!0,L._value=B,Io(L)),H&&je()}},Kr.bind(null,L))}catch(B){Kr(L,B)}}(this,p)}var oo={get:function(){var p=Ne,x=Lt;function P(L,M){var B=this,H=!p.global&&(p!==Ne||x!==Lt),q=H&&!Hn(),re=new Ue(function(te,ae){Mo(B,new so(St(L,p,H,q),St(M,p,H,q),te,ae,p))});return this._consoleTask&&(re._consoleTask=this._consoleTask),re}return P.prototype=K,P},set:function(p){h(this,"then",p&&p.prototype===K?oo:{get:function(){return p},set:oo.set})}};function so(p,x,P,L,M){this.onFulfilled=typeof p=="function"?p:null,this.onRejected=typeof x=="function"?x:null,this.resolve=P,this.reject=L,this.psd=M}function Kr(p,x){var P,L;Ht.push(x),p._state===null&&(P=p._lib&&we(),x=Xe(x),p._state=!1,p._value=x,L=p,xt.some(function(M){return M._value===L._value})||xt.push(L),Io(p),P&&je())}function Io(p){var x=p._listeners;p._listeners=[];for(var P=0,L=x.length;P.",ir="String expected.",cn=[],Li="__dbnames",Qs="readonly",Xs="readwrite";function ji(p,x){return p?x?function(){return p.apply(this,arguments)&&x.apply(this,arguments)}:p:x}var Rp={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Js(p){return typeof p!="string"||/\./.test(p)?function(x){return x}:function(x){return x[p]===void 0&&p in x&&delete(x=z(x))[p],x}}function Pp(){throw Pe.Type()}function Dt(p,x){try{var P=Tp(p),L=Tp(x);if(P!==L)return P==="Array"?1:L==="Array"?-1:P==="binary"?1:L==="binary"?-1:P==="string"?1:L==="string"?-1:P==="Date"?1:L!=="Date"?NaN:-1;switch(P){case"number":case"Date":case"string":return xye+xe&&me(ye+ce)})})}var ve=Zs(P)&&P.limit===1/0&&(typeof p!="function"||p===lo)&&{index:P.index,range:P.range};return me(0).then(function(){if(0=ce})).length!==0?(ae.forEach(function(me){ue.push(function(){var ve=ie,ye=me._cfg.dbschema;$p(X,ve,oe),$p(X,ye,oe),ie=X._dbSchema=ye;var xe=uc(ve,ye);xe.add.forEach(function(Qe){dc(oe,Qe[0],Qe[1].primKey,Qe[1].indexes)}),xe.change.forEach(function(Qe){if(Qe.recreate)throw new Pe.Upgrade("Not yet support for changing primary key");var Ve=oe.objectStore(Qe.name);Qe.add.forEach(function(kt){return ra(Ve,kt)}),Qe.change.forEach(function(kt){Ve.deleteIndex(kt.name),ra(Ve,kt)}),Qe.del.forEach(function(kt){return Ve.deleteIndex(kt)})});var Ee=me._cfg.contentUpgrade;if(Ee&&me._cfg.version>ce){wn(X,oe),ne._memoizedTables={};var Ye=I(ye);xe.del.forEach(function(Qe){Ye[Qe]=ve[Qe]}),mr(X,[X.Transaction.prototype]),zn(X,[X.Transaction.prototype],s(Ye),Ye),ne.schema=Ye;var De,Ke=Le(Ee);return Ke&&Gt(),xe=Ue.follow(function(){var Qe;(De=Ee(ne))&&Ke&&(Qe=Hn.bind(null,null),De.then(Qe,Qe))}),De&&typeof De.then=="function"?Ue.resolve(De):xe.then(function(){return De})}}),ue.push(function(ve){var ye,xe,Ee=me._cfg.dbschema;ye=Ee,xe=ve,[].slice.call(xe.db.objectStoreNames).forEach(function(Ye){return ye[Ye]==null&&xe.db.deleteObjectStore(Ye)}),mr(X,[X.Transaction.prototype]),zn(X,[X.Transaction.prototype],X._storeNames,X._dbSchema),ne.schema=X._dbSchema}),ue.push(function(ve){X.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(X.idbdb.version/10)===me._cfg.version?(X.idbdb.deleteObjectStore("$meta"),delete X._dbSchema.$meta,X._storeNames=X._storeNames.filter(function(ye){return ye!=="$meta"})):ve.objectStore("$meta").put(me._cfg.version,"version"))})}),function me(){return ue.length?Ue.resolve(ue.shift()(ne.idbtrans)).then(me):Ue.resolve()}().then(function(){rd(ie,oe)})):Ue.resolve();var X,ce,ne,oe,ue,ie}).catch(H)):(s(M).forEach(function(ae){dc(P,ae,M[ae].primKey,M[ae].indexes)}),wn(p,P),void Ue.follow(function(){return p.on.populate.fire(B)}).catch(H));var re,te})}function na(p,x){rd(p._dbSchema,x),x.db.version%10!=0||x.objectStoreNames.contains("$meta")||x.db.createObjectStore("$meta").add(Math.ceil(x.db.version/10-1),"version");var P=fs(0,p.idbdb,x);$p(p,p._dbSchema,x);for(var L=0,M=uc(P,p._dbSchema).change;LMath.pow(2,62)?0:ie.oldVersion,X=ie<1,p.idbdb=ue.result,B&&na(p,ae),Mp(p,ie/10,ae,ne))},ne),ue.onsuccess=Fe(function(){ae=null;var ie,me,ve,ye,xe,Ee=p.idbdb=ue.result,Ye=w(Ee.objectStoreNames);if(0"u"?Ue.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ce){function ne(){return indexedDB.databases().finally(ce)}re=setInterval(ne,100),ne()}).finally(function(){return clearInterval(re)}):Promise.resolve()).then(q)]).then(function(){return H(),x.onReadyBeingFired=[],Ue.resolve(dy(function(){return p.on.ready.fire(p.vip)})).then(function ce(){if(0x.limit?ce.length=x.limit:p.length===x.limit&&ce.length=me.limit&&(!me.values||Ee.req.values)&&$M(Ee.req.query.range,me.query.range)}),!1,ve,ye];case"count":return xe=ye.find(function(Ee){return e_(Ee.req.query.range,me.query.range)}),[xe,!!xe,ve,ye]}}(x,P,"query",B),ae=te[0],X=te[1],ce=te[2],ne=te[3];return ae&&X?ae.obsSet=B.obsSet:(X=L.query(B).then(function(oe){var ue=oe.result;if(ae&&(ae.res=ue),H){for(var ie=0,me=ue.length;ie{var s=(async()=>{var a=en(n);a.autoOpen=!1;var l=new D1(i,a),c={[ng]:EZ(r),[SZ]:"++sequence, id",[BE]:"id"};return l.version(1).stores(c),await l.open(),{dexieDb:l,dexieTable:l[ng],dexieAttachmentsTable:l[BE],booleanIndexes:RZ(r)}})();return FE.set(i,o),nm.set(o,0),s});return o}async function CZ(e){var t=await e,n=nm.get(e),r=n-1;r===0?(t.dexieDb.close(),nm.delete(e)):nm.set(e,r)}var B1="__";function Sp(e){var t=e.split(".");if(t.length>1)return t.map(r=>Sp(r)).join(".");if(e.startsWith("|")){var n=e.substring(1);return B1+n}else return e}function cI(e){var t=e.split(".");if(t.length>1)return t.map(r=>cI(r)).join(".");if(e.startsWith(B1)){var n=e.substring(B1.length);return"|"+n}else return e}function kZ(e,t){return t&&(t=en(t),t=F1(t),e.forEach(n=>{var r=Ba(t,n),i=r?"1":"0";RL(t,n,i)}),t)}function uI(e,t){return t&&(t=en(t),t=z1(t),e.forEach(n=>{var r=Ba(t,n),i=r==="1";RL(t,n,i)}),t)}function F1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>F1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{typeof r=="object"&&(r=F1(r)),t[Sp(n)]=r}),t}}function z1(e){if(!e||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>z1(n));if(typeof e=="object"){var t={};return Object.entries(e).forEach(([n,r])=>{(typeof r=="object"||Array.isArray(e))&&(r=z1(r)),t[cI(n)]=r}),t}}function EZ(e){var t=[],n=jo(e.primaryKey);t.push([n]),t.push(["_deleted",n]),e.indexes&&e.indexes.forEach(o=>{var s=Bf(o);t.push(s)}),t.push(["_meta.lwt",n]),t.push(["_meta.lwt"]),t=t.map(o=>o.map(s=>Sp(s)));var r=t.map(o=>o.length===1?o[0]:"["+o.join("+")+"]");r=r.filter((o,s,a)=>a.indexOf(o)===s);var i=r.join(", ");return i}async function zE(e,t){var n=await e,r=await n.dexieTable.bulkGet(t);return r.map(i=>uI(n.booleanIndexes,i))}function wh(e,t){return e+"||"+t}function RZ(e){var t=new Set,n=[];return e.indexes?(e.indexes.forEach(r=>{var i=Bf(r);i.forEach(o=>{if(!t.has(o)){t.add(o);var s=Tu(e,o);s.type==="boolean"&&n.push(o)}})}),n.push("_deleted"),uK(n)):n}function UE(e){return e===lu?-1/0:e}function WE(e,t,n){if(e.includes(t)){var r=n===au||n===!0?"1":"0";return r}else return n}function dI(e,t,n){if(!n){if(typeof window>"u")throw new Error("IDBKeyRange missing");n=window.IDBKeyRange}var r=t.startKeys.map((s,a)=>{var l=t.index[a];return WE(e,l,s)}).map(UE),i=t.endKeys.map((s,a)=>{var l=t.index[a];return WE(e,l,s)}).map(UE),o=n.bound(r,i,!t.inclusiveStart,!t.inclusiveEnd);return o}async function GE(e,t){var n=await e.internals,r=t.query,i=r.skip?r.skip:0,o=r.limit?r.limit:1/0,s=i+o,a=t.queryPlan,l=!1;a.selectorSatisfiedByIndex||(l=pS(e.schema,t.query));var c=dI(n.booleanIndexes,a,n.dexieDb._options.IDBKeyRange),u=a.index,d=[];if(await n.dexieDb.transaction("r",n.dexieTable,async m=>{var h=m.idbtrans,g=h.objectStore(ng),E,b;b="["+u.map(y=>Sp(y)).join("+")+"]",E=g.index(b);var w=E.openCursor(c);await new Promise(y=>{w.onsuccess=function(_){var R=_.target.result;if(R){var T=uI(n.booleanIndexes,R.value);(!l||l(T))&&d.push(T),a.sortSatisfiedByIndex&&d.length===s?y():R.continue()}else y()}})}),!a.sortSatisfiedByIndex){var f=xj(e.schema,t.query);d=d.sort(f)}return d=d.slice(i,s),{documents:d}}async function PZ(e,t){var n=await e.internals,r=t.queryPlan,i=r.index,o=dI(n.booleanIndexes,r,n.dexieDb._options.IDBKeyRange),s=-1;return await n.dexieDb.transaction("r",n.dexieTable,async a=>{var l=a.idbtrans,c=l.objectStore(ng),u,d;d="["+i.map(m=>Sp(m)).join("+")+"]",u=c.index(d);var f=u.count(o);s=await new Promise((m,h)=>{f.onsuccess=function(){m(f.result)},f.onerror=g=>h(g)})}),s}var TZ=ur(),xh="dexieTestMetaField",M0=!1,OZ=function(){function e(n,r,i,o,s,a,l,c){this.changes$=new Ln,this.instanceId=TZ++,this.storage=n,this.databaseName=r,this.collectionName=i,this.schema=o,this.internals=s,this.options=a,this.settings=l,this.devMode=c,this.primaryPath=jo(this.schema.primaryKey)}var t=e.prototype;return t.bulkWrite=async function(r,i){al(this),!M0&&(!w0.premium||typeof w0.premium!="string"||await xL(w0.premium)!==MK)&&console.warn(["-------------- RxDB Open Core RxStorage -------------------------------","You are using the free Dexie.js based RxStorage implementation from RxDB https://rxdb.info/rx-storage-dexie.html?console=dexie ","While this is a great option, we want to let you know that there are faster storage solutions available in our premium plugins.","For professional users and production environments, we highly recommend considering these premium options to enhance performance and reliability."," https://rxdb.info/premium?console=dexie ","If you already purchased premium access you can disable this log by calling the setPremiumFlag() function from rxdb-premium/plugins/shared.","---------------------------------------------------------------------"].join(` +`)),M0=!0,r.forEach(u=>{if(!u.document._rev||u.previous&&!u.previous._rev)throw ot("SNH",{args:{row:u}});if(this.devMode&&u.previous&&(!u.previous._meta[xh]||u.previous._meta[xh]!==u.previous._rev))throw console.dir(u),new Error("missing or wrong _meta."+xh)});var o=await this.internals,s={success:[],error:[]};this.devMode&&(r=r.map(u=>{var d=bp(u.document);return d._meta[xh]=d._rev,{previous:u.previous,document:d}}));var a=r.map(u=>u.document[this.primaryPath]),l;if(await o.dexieDb.transaction("rw",o.dexieTable,o.dexieAttachmentsTable,async()=>{var u=new Map,d=await zE(this.internals,a);d.forEach(h=>{var g=h;return g&&u.set(g[this.primaryPath],g),g}),l=vX(this,this.primaryPath,u,r,i),s.error=l.errors;var f=[];l.bulkInsertDocs.forEach(h=>{s.success.push(h.document),f.push(h.document)}),l.bulkUpdateDocs.forEach(h=>{s.success.push(h.document),f.push(h.document)}),f=f.map(h=>kZ(o.booleanIndexes,h)),f.length>0&&await o.dexieTable.bulkPut(f);var m=[];l.attachmentsAdd.forEach(h=>{m.push({id:wh(h.documentId,h.attachmentId),data:h.attachmentData.data})}),l.attachmentsUpdate.forEach(h=>{m.push({id:wh(h.documentId,h.attachmentId),data:h.attachmentData.data})}),await o.dexieAttachmentsTable.bulkPut(m),await o.dexieAttachmentsTable.bulkDelete(l.attachmentsRemove.map(h=>wh(h.documentId,h.attachmentId)))}),l=bt(l),l.eventBulk.events.length>0){var c=bt(l.newestRow).document;l.eventBulk.checkpoint={id:c[this.primaryPath],lwt:c._meta.lwt},l.eventBulk.endTime=ur(),this.changes$.next(l.eventBulk)}return s},t.findDocumentsById=async function(r,i){al(this);var o=await this.internals,s=[];return await o.dexieDb.transaction("r",o.dexieTable,async()=>{var a=await zE(this.internals,r);a.forEach(l=>{l&&(!l._deleted||i)&&s.push(l)})}),s},t.query=function(r){return al(this),GE(this,r)},t.count=async function(r){if(r.queryPlan.selectorSatisfiedByIndex){var i=await PZ(this,r);return{count:i,mode:"fast"}}else{var o=await GE(this,r);return{count:o.documents.length,mode:"slow"}}},t.changeStream=function(){return al(this),this.changes$.asObservable()},t.cleanup=async function(r){al(this);var i=await this.internals;return await i.dexieDb.transaction("rw",i.dexieTable,async()=>{var o=ur()-r,s=await i.dexieTable.where("_meta.lwt").below(o).toArray(),a=[];s.forEach(l=>{l._deleted==="1"&&a.push(l[this.primaryPath])}),await i.dexieTable.bulkDelete(a)}),!0},t.getAttachmentData=async function(r,i,o){al(this);var s=await this.internals,a=wh(r,i);return await s.dexieDb.transaction("r",s.dexieAttachmentsTable,async()=>{var l=await s.dexieAttachmentsTable.get(a);if(l)return l.data;throw new Error("attachment missing documentId: "+r+" attachmentId: "+i)})},t.remove=async function(){al(this);var r=await this.internals;return await r.dexieTable.clear(),this.close()},t.close=function(){return this.closed?this.closed:(this.closed=(async()=>{this.changes$.complete(),await CZ(this.internals)})(),this.closed)},t.conflictResultionTasks=function(){return new Ln},t.resolveConflictResultionTask=async function(r){},e}();async function LZ(e,t,n){var r=_Z(t.databaseName,t.collectionName,n,t.schema),i=new OZ(e,t.databaseName,t.collectionName,t.schema,r,t.options,n,t.devMode);return await wZ(lI,t,i),Promise.resolve(i)}function al(e){if(e.closed)throw new Error("RxStorageInstanceDexie is closed "+e.databaseName+"-"+e.collectionName)}var jZ=function(){function e(n){this.name=lI,this.rxdbVersion=PL,this.settings=n}var t=e.prototype;return t.createStorageInstance=function(r){return wX(r),LZ(this,r,this.settings)},e}();function IZ(e={}){var t=new jZ(e);return t}var CS={minimumDeletedTime:1e3*60*60*24*31,minimumCollectionAge:1e3*60,runEach:1e3*60*5,awaitReplicationsInSync:!0,waitForLeadership:!0},fI=new WeakMap,MZ=new WeakMap;function HE(e){return As(MZ,e,()=>bZ(e))}function $Z(){var e=sI(this.storage.name,this.token,this.name,this),t=this.destroy.bind(this);this.destroy=function(){return N1(this.token,this),t()};var n=HE(e);return n||(n=HE(e),fI.set(this,n)),this.leaderElector=()=>n,n}function NZ(){return this.multiInstance?this.leaderElector().isLeader:!0}function AZ(){return this.multiInstance?this.leaderElector().awaitLeadership().then(()=>!0):zv}function DZ(e){var t=fI.get(e);t&&t.die()}var BZ=!0,FZ={RxDatabase:e=>{e.leaderElector=$Z,e.isLeader=NZ,e.waitForLeadership=AZ}},kS={name:"leader-election",rxdb:BZ,prototypes:FZ,hooks:{preDestroyRxDatabase:{after:DZ}}},VE=e=>Promise.resolve(e);function KE(e,t){if(e==="_deleted")return t;t=en(t);var n=!!t._deleted;return t[e]=n,delete t._deleted,t}function $0(e,t,n){return n.map(r=>{var i=en(r);if(t!=="_deleted"){var o=!!i[t];i._deleted=o,delete i[t]}else i._deleted=!!i._deleted;var s=e.schema.primaryPath;return i[s]=Ya(e.schema.jsonSchema,i),i})}function qE(e,t){if(typeof window>"u"||typeof window!="object"||typeof window.addEventListener>"u"||navigator.onLine)return e.promiseWait(t);var n,r=new Promise(i=>{n=()=>{window.removeEventListener("online",n),i()},window.addEventListener("online",n)});return Promise.race([r,e.promiseWait(t)]).then(()=>{window.removeEventListener("online",n)})}var ES=new WeakMap,zZ=function(){function e(n,r,i,o,s,a,l,c){this.subs=[],this.subjects={received:new Ln,sent:new Ln,error:new Ln,canceled:new bs(!1),active:new bs(!1)},this.received$=this.subjects.received.asObservable(),this.sent$=this.subjects.sent.asObservable(),this.error$=this.subjects.error.asObservable(),this.canceled$=this.subjects.canceled.asObservable(),this.active$=this.subjects.active.asObservable(),this.onCancel=[],this.callOnStart=void 0,this.remoteEvents$=new Ln,this.replicationIdentifier=n,this.collection=r,this.deletedField=i,this.pull=o,this.push=s,this.live=a,this.retryTime=l,this.autoStart=c,this.metaInfoPromise=(async()=>{var f="rx-replication-meta-"+await r.database.hashFunction([this.collection.name,this.replicationIdentifier].join("-")),m=zX(this.collection.schema.jsonSchema,Rj(this.collection.schema.jsonSchema));return{collectionName:f,schema:m}})();var u=As(ES,r,()=>[]);u.push(this),this.collection.onDestroy.push(()=>this.cancel()),Object.keys(this.subjects).forEach(f=>{Object.defineProperty(this,f+"$",{get:function(){return this.subjects[f].asObservable()}})});var d=new Promise(f=>{this.callOnStart=f});this.startPromise=d}var t=e.prototype;return t.start=async function(){if(!this.isStopped()){var r=this.pull&&this.pull.modifier?this.pull.modifier:VE,i=this.push&&this.push.modifier?this.push.modifier:VE,o=this.collection.database,s=await this.metaInfoPromise,[a]=await Promise.all([this.collection.database.storage.createStorageInstance({databaseName:o.name,collectionName:s.collectionName,databaseInstanceToken:o.token,multiInstance:o.multiInstance,options:{},schema:s.schema,password:o.password,devMode:_n.isDevMode()}),TX(this.collection,s.collectionName,s.schema)]);this.metaInstance=a,this.internalReplicationState=HX({pushBatchSize:this.push&&this.push.batchSize?this.push.batchSize:100,pullBatchSize:this.pull&&this.pull.batchSize?this.pull.batchSize:100,initialCheckpoint:{upstream:this.push?this.push.initialCheckpoint:void 0,downstream:this.pull?this.pull.initialCheckpoint:void 0},forkInstance:this.collection.storageInstance,metaInstance:this.metaInstance,hashFunction:o.hashFunction,identifier:"rxdbreplication"+this.replicationIdentifier,conflictHandler:this.collection.conflictHandler,replicationHandler:{masterChangeStream$:this.remoteEvents$.asObservable().pipe(Wt(l=>!!this.pull),rs(async l=>{if(l==="RESYNC")return l;var c=en(l);return c.documents=$0(this.collection,this.deletedField,c.documents),c.documents=await Promise.all(c.documents.map(u=>r(u))),c})),masterChangesSince:async(l,c)=>{if(!this.pull)return{checkpoint:null,documents:[]};for(var u=!1,d={};!u&&!this.isStopped();)try{d=await this.pull.handler(l,c),u=!0}catch(h){var f=ot("RC_PULL",{checkpoint:l,errors:Bf(h).map(g=>Qk(g)),direction:"pull"});this.subjects.error.next(f),await qE(this.collection,bt(this.retryTime))}if(this.isStopped())return{checkpoint:null,documents:[]};var m=en(d);return m.documents=$0(this.collection,this.deletedField,m.documents),m.documents=await Promise.all(m.documents.map(h=>r(h))),m},masterWrite:async l=>{if(!this.push)return[];var c=!1;await Wl("preReplicationMasterWrite",{rows:l,collection:this.collection});var u=await Promise.all(l.map(async g=>(g.newDocumentState=await i(g.newDocumentState),g.newDocumentState===null?null:(g.assumedMasterState&&(g.assumedMasterState=await i(g.assumedMasterState)),this.deletedField!=="_deleted"&&(g.newDocumentState=KE(this.deletedField,g.newDocumentState),g.assumedMasterState&&(g.assumedMasterState=KE(this.deletedField,g.assumedMasterState))),g)))),d=u.filter(wL),f=null;for(d.length===0&&(c=!0,f=[]);!c&&!this.isStopped();)try{if(f=await this.push.handler(d),!Array.isArray(f))throw ot("RC_PUSH_NO_AR",{pushRows:l,direction:"push",args:{result:f}});c=!0}catch(g){var m=g.rxdb?g:ot("RC_PUSH",{pushRows:l,errors:Bf(g).map(E=>Qk(E)),direction:"push"});this.subjects.error.next(m),await qE(this.collection,bt(this.retryTime))}if(this.isStopped())return[];await Wl("preReplicationMasterWriteDocumentsHandle",{result:f,collection:this.collection});var h=$0(this.collection,this.deletedField,bt(f));return h}}}),this.subs.push(this.internalReplicationState.events.error.subscribe(l=>{this.subjects.error.next(l)}),this.internalReplicationState.events.processed.down.subscribe(l=>this.subjects.received.next(l.document)),this.internalReplicationState.events.processed.up.subscribe(l=>{this.subjects.sent.next(l.newDocumentState)}),nj([this.internalReplicationState.events.active.down,this.internalReplicationState.events.active.up]).subscribe(([l,c])=>{var u=l||c;this.subjects.active.next(u)})),this.pull&&this.pull.stream$&&this.live&&this.subs.push(this.pull.stream$.subscribe({next:l=>{this.remoteEvents$.next(l)},error:l=>{this.subjects.error.next(l)}})),this.live||(await O0(this.internalReplicationState),await TE(this.internalReplicationState),await this.cancel()),this.callOnStart()}},t.isStopped=function(){return!!this.subjects.canceled.getValue()},t.awaitInitialReplication=async function(){return await this.startPromise,O0(bt(this.internalReplicationState))},t.awaitInSync=async function(){await this.startPromise,await O0(bt(this.internalReplicationState));for(var r=2;r>0;)r--,await this.collection.database.requestIdlePromise(),await TE(bt(this.internalReplicationState));return!0},t.reSync=function(){this.remoteEvents$.next("RESYNC")},t.emitEvent=function(r){this.remoteEvents$.next(r)},t.cancel=async function(){if(this.isStopped())return wo;var r=this.onCancel.map(i=>RK(i()));return this.internalReplicationState&&await KX(this.internalReplicationState),this.metaInstance&&r.push(bt(this.internalReplicationState).checkpointQueue.then(()=>bt(this.metaInstance).close())),this.subs.forEach(i=>i.unsubscribe()),this.subjects.canceled.next(!0),this.subjects.active.complete(),this.subjects.canceled.complete(),this.subjects.error.complete(),this.subjects.received.complete(),this.subjects.sent.complete(),Promise.all(r)},t.remove=async function(){await bt(this.metaInstance).remove();var r=await this.metaInfoPromise;await this.cancel(),await OX(this.collection,r.collectionName,r.schema)},e}();function UZ({replicationIdentifier:e,collection:t,deletedField:n="_deleted",pull:r,push:i,live:o=!0,retryTime:s=1e3*5,waitForLeadership:a=!0,autoStart:l=!0}){if(qu(kS),!r&&!i)throw ot("UT3",{collection:t.name,args:{replicationIdentifier:e}});var c=new zZ(e,t,n,r,i,o,s,l);return WZ(a,c),c}function WZ(e,t){var n=e&&t.collection.database.multiInstance,r=n?t.collection.database.waitForLeadership():zv;return r.then(()=>{t.isStopped()||t.autoStart&&t.start()})}var N0=zv;async function GZ(e){var t=e.database,n=Object.assign({},CS,t.cleanupPolicy?t.cleanupPolicy:{});await pI(e,n),!e.destroyed&&(await hI(e,n),await HZ(e,n))}async function pI(e,t){await e.promiseWait(t.minimumCollectionAge),!e.destroyed&&t.waitForLeadership&&await e.database.waitForLeadership()}async function hI(e,t){for(var n=e.database,r=e.storageInstance,i=!1;!i&&!e.destroyed;){if(t.awaitReplicationsInSync){var o=ES.get(e);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(e.destroyed)return;N0=N0.then(async()=>e.destroyed?!0:(await n.requestIdlePromise(),r.cleanup(t.minimumDeletedTime))),i=await N0}}async function HZ(e,t){for(;!e.destroyed;){if(await e.promiseWait(t.runEach),e.destroyed)return;await hI(e,t)}}var A0=zv;async function VZ(e){var t=e.collection,n=t.database,r=Object.assign({},CS,n.cleanupPolicy?n.cleanupPolicy:{});await pI(t,r),!t.destroyed&&(await mI(e,r),await KZ(e,r))}async function mI(e,t){for(var n=e.collection,r=n.database,i=!1;!i&&!n.destroyed;){if(t.awaitReplicationsInSync){var o=ES.get(n);o&&await Promise.all(o.map(s=>{if(!s.isStopped())return s.awaitInSync()}))}if(n.destroyed)return;A0=A0.then(async()=>n.destroyed?!0:(await r.requestIdlePromise(),e._cleanup())),i=await A0}}async function KZ(e,t){for(var n=e.collection;!n.destroyed;){if(await n.promiseWait(t.runEach),n.destroyed)return;await mI(e,t)}}var qZ={name:"cleanup",rxdb:!0,prototypes:{RxCollection:e=>{e.cleanup=async function(t){var n=Object.assign({},CS,this.database.cleanupPolicy?this.database.cleanupPolicy:{});typeof t>"u"&&(t=n.minimumDeletedTime);for(var r=!1;!r&&!this.destroyed;)r=await this.storageInstance.cleanup(t)}}},hooks:{createRxCollection:{after:e=>{GZ(e.collection)}},createRxState:{after:e=>{VZ(e.state)}}}},YZ=["__proto__","constructor","prototype"];function Ad(e,t){Object.keys(t).forEach(n=>{YZ.includes(n)||(typeof e[n]>"u"?e[n]=t[n]:nf(t[n])?Ad(e[n],t[n]):e[n]=t[n])})}function nf(e){return e.toString()==="[object Object]"}var ey=function(){function e(n,r){if(this.options={},this._conditions={},this._fields={},this._path=r,n){var i=this;n.selector&&i.find(n.selector),n.limit&&i.limit(n.limit),n.skip&&i.skip(n.skip),n.sort&&n.sort.forEach(o=>i.sort(o))}}var t=e.prototype;return t.where=function(r,i){if(!arguments.length)return this;var o=typeof arguments[0];if(o==="string")return this._path=arguments[0],arguments.length===2&&(this._conditions[this._path]=arguments[1]),this;if(o==="object"&&!Array.isArray(arguments[0]))return this.merge(arguments[0]);throw mi("MQ1",{path:arguments[0]})},t.equals=function(r){this._ensurePath("equals");var i=this._path;return this._conditions[i]=r,this},t.eq=function(r){this._ensurePath("eq");var i=this._path;return this._conditions[i]=r,this},t.or=function(r){var i=this._conditions.$or||(this._conditions.$or=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.nor=function(r){var i=this._conditions.$nor||(this._conditions.$nor=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.and=function(r){var i=this._conditions.$and||(this._conditions.$and=[]);return Array.isArray(r)||(r=[r]),i.push.apply(i,r),this},t.mod=function(r,i){var o,s;arguments.length===1?(this._ensurePath("mod"),o=arguments[0],s=this._path):arguments.length===2&&!Array.isArray(arguments[1])?(this._ensurePath("mod"),o=arguments.slice(),s=this._path):arguments.length===3?(o=arguments.slice(1),s=arguments[0]):(o=arguments[1],s=arguments[0]);var a=this._conditions[s]||(this._conditions[s]={});return a.$mod=o,this},t.exists=function(r,i){var o,s;arguments.length===0?(this._ensurePath("exists"),o=this._path,s=!0):arguments.length===1?typeof arguments[0]=="boolean"?(this._ensurePath("exists"),o=this._path,s=arguments[0]):(o=arguments[0],s=!0):arguments.length===2&&(o=arguments[0],s=arguments[1]);var a=this._conditions[o]||(this._conditions[o]={});return a.$exists=s,this},t.elemMatch=function(r,i){if(arguments[0]===null)throw mi("MQ2");var o,s,a;if(typeof arguments[0]=="function")this._ensurePath("elemMatch"),s=this._path,o=arguments[0];else if(nf(arguments[0]))this._ensurePath("elemMatch"),s=this._path,a=arguments[0];else if(typeof arguments[1]=="function")s=arguments[0],o=arguments[1];else if(arguments[1]&&nf(arguments[1]))s=arguments[0],a=arguments[1];else throw mi("MQ2");o&&(a=new e,o(a),a=a._conditions);var l=this._conditions[s]||(this._conditions[s]={});return l.$elemMatch=a,this},t.sort=function(r){if(!r)return this;var i,o=typeof r;if(Array.isArray(r)){i=r.length;for(var s=0;sYE(this.options,d,r[d])),this}throw mi("MQ3",{args:arguments})},t.merge=function(r){if(!r)return this;if(!QE(r))throw mi("MQ4",{source:r});return r instanceof e?(r._conditions&&Ad(this._conditions,r._conditions),r._fields&&(this._fields||(this._fields={}),Ad(this._fields,r._fields)),r.options&&(this.options||(this.options={}),Ad(this.options,r.options)),r._distinct&&(this._distinct=r._distinct),this):(Ad(this._conditions,r),this)},t.find=function(r){return QE(r)&&this.merge(r),this},t._ensurePath=function(r){if(!this._path)throw ot("MQ5",{method:r})},t.toJSON=function(){var r={selector:this._conditions};return this.options.skip&&(r.skip=this.options.skip),this.options.limit&&(r.limit=this.options.limit),this.options.sort&&(r.sort=QZ(this.options.sort)),{query:r,path:this._path}},e}();function QZ(e){return Object.entries(e).map(([t,n])=>{var r=n===1?"asc":"desc",i={[t]:r};return i})}var gI=["limit","skip","maxScan","batchSize","comment"];gI.forEach(function(e){ey.prototype[e]=function(t){return this.options[e]=t,this}});var vI=["gt","gte","lt","lte","ne","in","nin","all","regex","size"];vI.forEach(function(e){ey.prototype[e]=function(){var t,n;arguments.length===1?(this._ensurePath(e),n=arguments[0],t=this._path):(n=arguments[1],t=arguments[0]);var r=this._conditions[t]===null||typeof this._conditions[t]=="object"?this._conditions[t]:this._conditions[t]={};if(e==="regex"){if(n instanceof RegExp)throw ot("QU16",{field:t,query:this._conditions});typeof n=="string"?r["$"+e]=n:(r["$"+e]=n.$regex,n.$options&&(r.$options=n.$options))}else r["$"+e]=n;return this}});function YE(e,t,n){if(Array.isArray(e.sort))throw mi("MQ6",{opts:e,field:t,value:n});if(n&&n.$meta){var r=e.sort||(e.sort={});r[t]={$meta:n.$meta};return}var i=String(n||1).toLowerCase();if(!/^(?:ascending|asc|descending|desc|1|-1)$/.test(i))throw Array.isArray(n)&&(n="["+n+"]"),mi("MQ7",{field:t,value:n});var o=e.sort||(e.sort={}),s=n.toString().replace("asc","1").replace("ascending","1").replace("desc","-1").replace("descending","-1");o[t]=parseInt(s,10)}function XZ(e,t,n){if(e.sort=e.sort||[],!Array.isArray(e.sort))throw mi("MQ8",{opts:e,field:t,value:n});e.sort.push([t,n])}function QE(e){return e instanceof ey||nf(e)}function JZ(e,t){return new ey(e,t)}var XE="queryBuilderPath";function ZZ(e,t,n){var r=JZ(Ji(e.mangoQuery),e.other[XE]);r[t](n);var i=r.toJSON();return Ic(e.op,i.query,e.collection,{...e.other,[XE]:i.path})}function D0(e,t){e[t]=function(n){return ZZ(this,t,n)}}var eee={name:"query-builder",rxdb:!0,prototypes:{RxQuery(e){["where","equals","eq","or","nor","and","mod","exists","elemMatch","sort"].forEach(t=>{D0(e,t)}),gI.forEach(t=>{D0(e,t)}),vI.forEach(t=>{D0(e,t)})}}},tee=Oj(),nee=function(e){function t(n,r,i){var o;return o=e.call(this,null,r)||this,o.id=n,o.parent=i,o}return up(t,e),t}(tee),rf={get isLocal(){return!0},get allAttachments$(){throw ot("LD1",{document:this})},get primaryPath(){return"id"},get primary(){return this.id},get $(){var e=this,t=Ns(U1,this.parent);return e.parent.$.pipe(Wt(n=>n.documentId===this.primary),Wt(n=>n.isLocal),qt(n=>rS(n)),Hv(t.docCache.getLatestDocumentData(this.primary)),zf((n,r)=>n._rev===r._rev),qt(n=>t.docCache.getCachedRxDocument(n)),nS(Yx))},get $$(){var e=this,t=B0(e),n=t.getReactivityFactory();return n.fromObservable(e.$,e.getLatest()._data,t)},get deleted$$(){var e=this,t=B0(e),n=t.getReactivityFactory();return n.fromObservable(e.deleted$,e.getLatest().deleted,t)},getLatest(){var e=Ns(U1,this.parent),t=e.docCache.getLatestDocumentData(this.primary);return e.docCache.getCachedRxDocument(t)},get(e){if(e="data."+e,!!this._data){if(typeof e!="string")throw mi("LD2",{objPath:e});var t=Ba(this._data,e);return t=_n.deepFreezeWhenDevMode(t),t}},get$(e){if(e="data."+e,_n.isDevMode()){if(e.includes(".item."))throw ot("LD3",{objPath:e});if(e===this.primaryPath)throw ot("LD4")}return this.$.pipe(qt(t=>t._data),qt(t=>Ba(t,e)),zf())},get$$(e){var t=B0(this),n=t.getReactivityFactory();return n.fromObservable(this.get$(e),this.getLatest().get(e),t)},async incrementalModify(e){var t=await of(this.parent);return t.incrementalWriteQueue.addWrite(this._data,async n=>(n.data=await e(n.data,this),n)).then(n=>t.docCache.getCachedRxDocument(n))},incrementalPatch(e){return this.incrementalModify(t=>(Object.entries(e).forEach(([n,r])=>{t[n]=r}),t))},async _saveData(e){var t=await of(this.parent),n=this._data;return e.id=this.id,t.storageInstance.bulkWrite([{previous:n,document:e}],"local-document-save-data").then(r=>{var i=r.success[0];if(!i)throw r.error[0];e=en(e),e._rev=i._rev})},async remove(){var e=await of(this.parent),t=en(this._data);return t._deleted=!0,Xv(e.storageInstance,{previous:this._data,document:t},"local-document-remove").then(n=>e.docCache.getCachedRxDocument(n))}},JE=!1,ree=()=>{if(!JE){JE=!0;var e=Jv,t=Object.getOwnPropertyNames(e);t.forEach(r=>{var i=Object.getOwnPropertyDescriptor(rf,r);if(!i){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(rf,r,o)}});var n=r=>()=>{throw ot("LD6",{functionName:r})};["populate","update","putAttachment","getAttachment","allAttachments"].forEach(r=>rf[r]=n(r))}};function iee(e,t){ree();var n=new nee(e.id,e,t);return Object.setPrototypeOf(n,rf),n.prototype=rf,n}function B0(e){var t=e.parent;return rJ(t)?t:t.database}var rg=new WeakMap,U1=new WeakMap;function ZE(e){var t=e.database?e.database:e,n=e.database?e.name:"",r=(async()=>{var i=await yI(t.token,t.storage,t.name,n,t.instanceCreationOptions,t.multiInstance);i=mS(t,i,bI);var o=new _j("id",e.$.pipe(Wt(u=>u.isLocal)),u=>iee(u,e)),s=new Tj(i,"id",()=>{},()=>{}),a=await t.storageToken,l=i.changeStream().subscribe(u=>{for(var d=new Array(u.events.length),f=u.events,m=e.database?e.name:void 0,h=0;hn.storageInstance.close())}async function tR(e,t,n){var r=nc(10),i=await yI(r,e,t,n,{},!1);await i.remove()}function oee(e){return"plugin-local-documents-"+e}var bI=Wv({title:"RxLocalDocument",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:128},data:{type:"object",additionalProperties:!0}},required:["id","data"]});async function nR(e,t){var n=await of(this),r={id:e,data:t,_deleted:!1,_meta:Gu(),_rev:To(),_attachments:{}};return Xv(n.storageInstance,{document:r},"local-document-insert").then(i=>n.docCache.getCachedRxDocument(i))}function rR(e,t){return this.getLocal(e).then(n=>{if(n)return n.incrementalModify(()=>t);var r=this.insertLocal(e,t);return r})}async function iR(e){var t=await of(this),n=t.docCache,r=n.getLatestDocumentDataIfExists(e);return r?Promise.resolve(n.getCachedRxDocument(r)):Qv(t.storageInstance,e).then(i=>i?t.docCache.getCachedRxDocument(i):null)}function oR(e){return this.$.pipe(Hv(null),rs(async t=>{if(t)return{changeEvent:t};var n=await this.getLocal(e);return{doc:n}}),rs(async t=>{if(t.changeEvent){var n=t.changeEvent;if(!n.isLocal||n.documentId!==e)return{use:!1};var r=await this.getLocal(e);return{use:!0,doc:r}}else return{use:!0,doc:t.doc}}),Wt(t=>t.use),qt(t=>t.doc))}var see={name:"local-documents",rxdb:!0,prototypes:{RxCollection:e=>{e.insertLocal=nR,e.upsertLocal=rR,e.getLocal=iR,e.getLocal$=oR},RxDatabase:e=>{e.insertLocal=nR,e.upsertLocal=rR,e.getLocal=iR,e.getLocal$=oR}},hooks:{createRxDatabase:{before:e=>{e.creator.localDocuments&&ZE(e.database)}},createRxCollection:{before:e=>{e.creator.localDocuments&&ZE(e.collection)}},preDestroyRxDatabase:{after:e=>eR(e)},postDestroyRxCollection:{after:e=>eR(e)},postRemoveRxDatabase:{after:e=>tR(e.storage,e.databaseName,"")},postRemoveRxCollection:{after:e=>tR(e.storage,e.databaseName,e.collectionName)}},overwritable:{}};async function aee(e,t,n){var r=await e([t,n].join("|"))>await e([n,t].join("|"));return r}function F0(e,t,n){var r=n.id,i=$n(e.response$.pipe(Wt(o=>o.peer===t),Wt(o=>o.response.id===r),qt(o=>o.response)));return e.send(t,n),i}const lee="modulepreload",cee=function(e){return"/"+e},sR={},uee=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.all(n.map(l=>{if(l=cee(l),l in sR)return;sR[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(!!r)for(let m=o.length-1;m>=0;m--){const h=o[m];if(h.href===l&&(!c||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":lee,c||(f.as="script",f.crossOrigin=""),f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((m,h)=>{f.addEventListener("load",m),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}return i.then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};function Sh(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wI={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=Math.floor,r=Math.abs,i=Math.pow;return function(){function o(s,a,l){function c(f,m){if(!a[f]){if(!s[f]){var h=typeof Sh=="function"&&Sh;if(!m&&h)return h(f,!0);if(u)return u(f,!0);var g=new Error("Cannot find module '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}var E=a[f]={exports:{}};s[f][0].call(E.exports,function(b){var w=s[f][1][b];return c(w||b)},E,E.exports,o,s,a,l)}return a[f].exports}for(var u=typeof Sh=="function"&&Sh,d=0;d>16,j[$++]=255&R>>8,j[$++]=255&R;return A===2&&(R=g[_.charCodeAt(T)]<<2|g[_.charCodeAt(T+1)]>>4,j[$++]=255&R),A===1&&(R=g[_.charCodeAt(T)]<<10|g[_.charCodeAt(T+1)]<<4|g[_.charCodeAt(T+2)]>>2,j[$++]=255&R>>8,j[$++]=255&R),j}function d(_){return h[63&_>>18]+h[63&_>>12]+h[63&_>>6]+h[63&_]}function f(_,R,T){for(var C,I=[],A=R;A$?$:j+A));return C===1?(R=_[T-1],I.push(h[R>>2]+h[63&R<<4]+"==")):C===2&&(R=(_[T-2]<<8)+_[T-1],I.push(h[R>>10]+h[63&R>>4]+h[63&R<<2]+"=")),I.join("")}a.byteLength=function(_){var R=l(_),T=R[0],C=R[1];return 3*(T+C)/4-C},a.toByteArray=u,a.fromByteArray=m;for(var h=[],g=[],E=typeof Uint8Array>"u"?Array:Uint8Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=0,y=b.length;wS)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function h(S,O,D){return m(S),0>=S||O===void 0?u(S):typeof D=="string"?u(S).fill(O,D):u(S).fill(O)}function g(S){return m(S),u(0>S?0:0|_(S))}function E(S,O){if((typeof O!="string"||O==="")&&(O="utf8"),!d.isEncoding(O))throw new TypeError("Unknown encoding: "+O);var D=0|R(S,O),K=u(D),Q=K.write(S,O);return Q!==D&&(K=K.slice(0,Q)),K}function b(S){for(var O=0>S.length?0:0|_(S.length),D=u(O),K=0;KO||S.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|S}function R(S,O){if(d.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||ee(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);var D=S.length,K=2>>1;case"base64":return Ze(S).length;default:if(Q)return K?-1:Rt(S).length;O=(""+O).toLowerCase(),Q=!0}}function T(S,O,D){var K=!1;if((O===void 0||0>O)&&(O=0),O>this.length||((D===void 0||D>this.length)&&(D=this.length),0>=D)||(D>>>=0,O>>>=0,D<=O))return"";for(S||(S="utf8");;)switch(S){case"hex":return Le(this,O,D);case"utf8":case"utf-8":return pe(this,O,D);case"ascii":return V(this,O,D);case"latin1":case"binary":return le(this,O,D);case"base64":return Z(this,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ge(this,O,D);default:if(K)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),K=!0}}function C(S,O,D){var K=S[O];S[O]=S[D],S[D]=K}function I(S,O,D,K,Q){if(S.length===0)return-1;if(typeof D=="string"?(K=D,D=0):2147483647D&&(D=-2147483648),D=+D,fe(D)&&(D=Q?0:S.length-1),0>D&&(D=S.length+D),D>=S.length){if(Q)return-1;D=S.length-1}else if(0>D)if(Q)D=0;else return-1;if(typeof O=="string"&&(O=d.from(O,K)),d.isBuffer(O))return O.length===0?-1:A(S,O,D,K,Q);if(typeof O=="number")return O&=255,typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(S,O,D):Uint8Array.prototype.lastIndexOf.call(S,O,D):A(S,[O],D,K,Q);throw new TypeError("val must be string, number or Buffer")}function A(S,O,D,K,Q){function de(Xe,yt){return $e===1?Xe[yt]:Xe.readUInt16BE(yt*$e)}var $e=1,rt=S.length,Je=O.length;if(K!==void 0&&(K=(K+"").toLowerCase(),K==="ucs2"||K==="ucs-2"||K==="utf16le"||K==="utf-16le")){if(2>S.length||2>O.length)return-1;$e=2,rt/=2,Je/=2,D/=2}var Oe;if(Q){var tt=-1;for(Oe=D;Oert&&(D=rt-Je),Oe=D;0<=Oe;Oe--){for(var xt=!0,Ht=0;HtQ&&(K=Q)):K=Q;var de=O.length;K>de/2&&(K=de/2);for(var $e,rt=0;rtde&&($e=de):rt===2?(Je=S[Q+1],(192&Je)==128&&(xt=(31&de)<<6|63&Je,127xt||57343xt&&($e=xt)))}$e===null?($e=65533,rt=1):65535<$e&&($e-=65536,K.push(55296|1023&$e>>>10),$e=56320|1023&$e),K.push($e),Q+=rt}return G(K)}function G(S){var O=S.length;if(O<=4096)return l.apply(String,S);for(var D="",K=0;KO)&&(O=0),(!D||0>D||D>K)&&(D=K);for(var Q="",de=O;deS)throw new RangeError("offset is not uint");if(S+O>D)throw new RangeError("Trying to access beyond buffer length")}function Ce(S,O,D,K,Q,de){if(!d.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(O>Q||OS.length)throw new RangeError("Index out of range")}function He(S,O,D,K){if(D+K>S.length)throw new RangeError("Index out of range");if(0>D)throw new RangeError("Index out of range")}function Re(S,O,D,K,Q){return O=+O,D>>>=0,Q||He(S,O,D,4),ze.write(S,O,D,K,23,4),D+4}function et(S,O,D,K,Q){return O=+O,D>>>=0,Q||He(S,O,D,8),ze.write(S,O,D,K,52,8),D+8}function lt(S){if(S=S.split("=")[0],S=S.trim().replace(W,""),2>S.length)return"";for(;S.length%4!=0;)S+="=";return S}function Pe(S){return 16>S?"0"+S.toString(16):S.toString(16)}function Rt(S,O){O=O||1/0;for(var D,K=S.length,Q=null,de=[],$e=0;$eD){if(!Q){if(56319D){-1<(O-=3)&&de.push(239,191,189),Q=D;continue}D=(Q-55296<<10|D-56320)+65536}else Q&&-1<(O-=3)&&de.push(239,191,189);if(Q=null,128>D){if(0>(O-=1))break;de.push(D)}else if(2048>D){if(0>(O-=2))break;de.push(192|D>>6,128|63&D)}else if(65536>D){if(0>(O-=3))break;de.push(224|D>>12,128|63&D>>6,128|63&D)}else if(1114112>D){if(0>(O-=4))break;de.push(240|D>>18,128|63&D>>12,128|63&D>>6,128|63&D)}else throw new Error("Invalid code point")}return de}function at(S){for(var O=[],D=0;D(O-=2));++$e)D=S.charCodeAt($e),K=D>>8,Q=D%256,de.push(Q),de.push(K);return de}function Ze(S){return _e.toByteArray(lt(S))}function gt(S,O,D,K){for(var Q=0;Q=O.length||Q>=S.length);++Q)O[Q+D]=S[Q];return Q}function ee(S,O){return S instanceof O||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===O.name}function fe(S){return S!==S}var _e=o("base64-js"),ze=o("ieee754");a.Buffer=d,a.SlowBuffer=function(S){return+S!=S&&(S=0),d.alloc(+S)},a.INSPECT_MAX_BYTES=50,a.kMaxLength=2147483647,d.TYPED_ARRAY_SUPPORT=function(){try{var S=new Uint8Array(1);return S.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},S.foo()===42}catch{return!1}}(),d.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){return d.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){return d.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),d.poolSize=8192,d.from=function(S,O,D){return f(S,O,D)},d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,d.alloc=function(S,O,D){return h(S,O,D)},d.allocUnsafe=function(S){return g(S)},d.allocUnsafeSlow=function(S){return g(S)},d.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==d.prototype},d.compare=function(S,O){if(ee(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),ee(O,Uint8Array)&&(O=d.from(O,O.offset,O.byteLength)),!d.isBuffer(S)||!d.isBuffer(O))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===O)return 0;for(var D=S.length,K=O.length,Q=0,de=c(D,K);QO&&(S+=" ... "),""},d.prototype.compare=function(S,O,D,K,Q){if(ee(S,Uint8Array)&&(S=d.from(S,S.offset,S.byteLength)),!d.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(O===void 0&&(O=0),D===void 0&&(D=S?S.length:0),K===void 0&&(K=0),Q===void 0&&(Q=this.length),0>O||D>S.length||0>K||Q>this.length)throw new RangeError("out of range index");if(K>=Q&&O>=D)return 0;if(K>=Q)return-1;if(O>=D)return 1;if(O>>>=0,D>>>=0,K>>>=0,Q>>>=0,this===S)return 0;for(var de=Q-K,$e=D-O,rt=c(de,$e),Je=this.slice(K,Q),Oe=S.slice(O,D),tt=0;tt>>=0,isFinite(D)?(D>>>=0,K===void 0&&(K="utf8")):(K=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Q=this.length-O;if((D===void 0||D>Q)&&(D=Q),0D||0>O)||O>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");for(var de=!1;;)switch(K){case"hex":return j(this,S,O,D);case"utf8":case"utf-8":return $(this,S,O,D);case"ascii":return F(this,S,O,D);case"latin1":case"binary":return z(this,S,O,D);case"base64":return Y(this,S,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,S,O,D);default:if(de)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),de=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.slice=function(S,O){var D=this.length;S=~~S,O=O===void 0?D:~~O,0>S?(S+=D,0>S&&(S=0)):S>D&&(S=D),0>O?(O+=D,0>O&&(O=0)):O>D&&(O=D),O>>=0,O>>>=0,D||Te(S,O,this.length);for(var K=this[S],Q=1,de=0;++de>>=0,O>>>=0,D||Te(S,O,this.length);for(var K=this[S+--O],Q=1;0>>=0,O||Te(S,1,this.length),this[S]},d.prototype.readUInt16LE=function(S,O){return S>>>=0,O||Te(S,2,this.length),this[S]|this[S+1]<<8},d.prototype.readUInt16BE=function(S,O){return S>>>=0,O||Te(S,2,this.length),this[S]<<8|this[S+1]},d.prototype.readUInt32LE=function(S,O){return S>>>=0,O||Te(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+16777216*this[S+3]},d.prototype.readUInt32BE=function(S,O){return S>>>=0,O||Te(S,4,this.length),16777216*this[S]+(this[S+1]<<16|this[S+2]<<8|this[S+3])},d.prototype.readIntLE=function(S,O,D){S>>>=0,O>>>=0,D||Te(S,O,this.length);for(var K=this[S],Q=1,de=0;++de=Q&&(K-=i(2,8*O)),K},d.prototype.readIntBE=function(S,O,D){S>>>=0,O>>>=0,D||Te(S,O,this.length);for(var K=O,Q=1,de=this[S+--K];0=Q&&(de-=i(2,8*O)),de},d.prototype.readInt8=function(S,O){return S>>>=0,O||Te(S,1,this.length),128&this[S]?-1*(255-this[S]+1):this[S]},d.prototype.readInt16LE=function(S,O){S>>>=0,O||Te(S,2,this.length);var D=this[S]|this[S+1]<<8;return 32768&D?4294901760|D:D},d.prototype.readInt16BE=function(S,O){S>>>=0,O||Te(S,2,this.length);var D=this[S+1]|this[S]<<8;return 32768&D?4294901760|D:D},d.prototype.readInt32LE=function(S,O){return S>>>=0,O||Te(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},d.prototype.readInt32BE=function(S,O){return S>>>=0,O||Te(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},d.prototype.readFloatLE=function(S,O){return S>>>=0,O||Te(S,4,this.length),ze.read(this,S,!0,23,4)},d.prototype.readFloatBE=function(S,O){return S>>>=0,O||Te(S,4,this.length),ze.read(this,S,!1,23,4)},d.prototype.readDoubleLE=function(S,O){return S>>>=0,O||Te(S,8,this.length),ze.read(this,S,!0,52,8)},d.prototype.readDoubleBE=function(S,O){return S>>>=0,O||Te(S,8,this.length),ze.read(this,S,!1,52,8)},d.prototype.writeUIntLE=function(S,O,D,K){if(S=+S,O>>>=0,D>>>=0,!K){var Q=i(2,8*D)-1;Ce(this,S,O,D,Q,0)}var de=1,$e=0;for(this[O]=255&S;++$e>>=0,D>>>=0,!K){var Q=i(2,8*D)-1;Ce(this,S,O,D,Q,0)}var de=D-1,$e=1;for(this[O+de]=255&S;0<=--de&&($e*=256);)this[O+de]=255&S/$e;return O+D},d.prototype.writeUInt8=function(S,O,D){return S=+S,O>>>=0,D||Ce(this,S,O,1,255,0),this[O]=255&S,O+1},d.prototype.writeUInt16LE=function(S,O,D){return S=+S,O>>>=0,D||Ce(this,S,O,2,65535,0),this[O]=255&S,this[O+1]=S>>>8,O+2},d.prototype.writeUInt16BE=function(S,O,D){return S=+S,O>>>=0,D||Ce(this,S,O,2,65535,0),this[O]=S>>>8,this[O+1]=255&S,O+2},d.prototype.writeUInt32LE=function(S,O,D){return S=+S,O>>>=0,D||Ce(this,S,O,4,4294967295,0),this[O+3]=S>>>24,this[O+2]=S>>>16,this[O+1]=S>>>8,this[O]=255&S,O+4},d.prototype.writeUInt32BE=function(S,O,D){return S=+S,O>>>=0,D||Ce(this,S,O,4,4294967295,0),this[O]=S>>>24,this[O+1]=S>>>16,this[O+2]=S>>>8,this[O+3]=255&S,O+4},d.prototype.writeIntLE=function(S,O,D,K){if(S=+S,O>>>=0,!K){var Q=i(2,8*D-1);Ce(this,S,O,D,Q-1,-Q)}var de=0,$e=1,rt=0;for(this[O]=255&S;++deS&&rt===0&&this[O+de-1]!==0&&(rt=1),this[O+de]=255&(S/$e>>0)-rt;return O+D},d.prototype.writeIntBE=function(S,O,D,K){if(S=+S,O>>>=0,!K){var Q=i(2,8*D-1);Ce(this,S,O,D,Q-1,-Q)}var de=D-1,$e=1,rt=0;for(this[O+de]=255&S;0<=--de&&($e*=256);)0>S&&rt===0&&this[O+de+1]!==0&&(rt=1),this[O+de]=255&(S/$e>>0)-rt;return O+D},d.prototype.writeInt8=function(S,O,D){return S=+S,O>>>=0,D||Ce(this,S,O,1,127,-128),0>S&&(S=255+S+1),this[O]=255&S,O+1},d.prototype.writeInt16LE=function(S,O,D){return S=+S,O>>>=0,D||Ce(this,S,O,2,32767,-32768),this[O]=255&S,this[O+1]=S>>>8,O+2},d.prototype.writeInt16BE=function(S,O,D){return S=+S,O>>>=0,D||Ce(this,S,O,2,32767,-32768),this[O]=S>>>8,this[O+1]=255&S,O+2},d.prototype.writeInt32LE=function(S,O,D){return S=+S,O>>>=0,D||Ce(this,S,O,4,2147483647,-2147483648),this[O]=255&S,this[O+1]=S>>>8,this[O+2]=S>>>16,this[O+3]=S>>>24,O+4},d.prototype.writeInt32BE=function(S,O,D){return S=+S,O>>>=0,D||Ce(this,S,O,4,2147483647,-2147483648),0>S&&(S=4294967295+S+1),this[O]=S>>>24,this[O+1]=S>>>16,this[O+2]=S>>>8,this[O+3]=255&S,O+4},d.prototype.writeFloatLE=function(S,O,D){return Re(this,S,O,!0,D)},d.prototype.writeFloatBE=function(S,O,D){return Re(this,S,O,!1,D)},d.prototype.writeDoubleLE=function(S,O,D){return et(this,S,O,!0,D)},d.prototype.writeDoubleBE=function(S,O,D){return et(this,S,O,!1,D)},d.prototype.copy=function(S,O,D,K){if(!d.isBuffer(S))throw new TypeError("argument should be a Buffer");if(D||(D=0),K||K===0||(K=this.length),O>=S.length&&(O=S.length),O||(O=0),0O)throw new RangeError("targetStart out of bounds");if(0>D||D>=this.length)throw new RangeError("Index out of range");if(0>K)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),S.length-OQ||K==="latin1")&&(S=Q)}}else typeof S=="number"&&(S&=255);if(0>O||this.length>>=0,D=D===void 0?this.length:D>>>0,S||(S=0);var de;if(typeof S=="number")for(de=O;de{g==="%%"||(m++,g==="%c"&&(h=m))}),d.splice(h,0,f)},a.save=function(d){try{d?a.storage.setItem("debug",d):a.storage.removeItem("debug")}catch{}},a.load=c,a.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},a.storage=function(){try{return localStorage}catch{}}(),a.destroy=(()=>{let d=!1;return()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.log=console.debug||console.log||(()=>{}),s.exports=o("./common")(a);const{formatters:u}=s.exports;u.j=function(d){try{return JSON.stringify(d)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,o("_process"))},{"./common":5,_process:12}],5:[function(o,s){s.exports=function(a){function l(d){function f(...g){if(!f.enabled)return;const E=f,b=+new Date,w=b-(m||b);E.diff=w,E.prev=m,E.curr=b,m=b,g[0]=l.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let y=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(R,T)=>{if(R==="%%")return"%";y++;const C=l.formatters[T];if(typeof C=="function"){const I=g[y];R=C.call(E,I),g.splice(y,1),y--}return R}),l.formatArgs.call(E,g),(E.log||l.log).apply(E,g)}let m,h=null;return f.namespace=d,f.useColors=l.useColors(),f.color=l.selectColor(d),f.extend=c,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>h===null?l.enabled(d):h,set:g=>{h=g}}),typeof l.init=="function"&&l.init(f),f}function c(d,f){const m=l(this.namespace+(typeof f>"u"?":":f)+d);return m.log=this.log,m}function u(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(d){return d instanceof Error?d.stack||d.message:d},l.disable=function(){const d=[...l.names.map(u),...l.skips.map(u).map(f=>"-"+f)].join(",");return l.enable(""),d},l.enable=function(d){l.save(d),l.names=[],l.skips=[];let f;const m=(typeof d=="string"?d:"").split(/[\s,]+/),h=m.length;for(f=0;f{l[d]=a[d]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(d){let f=0;for(let m=0;mY&&!Z.warned){Z.warned=!0;var pe=new Error("Possible EventEmitter memory leak detected. "+Z.length+" "+($+" listeners added. Use emitter.setMaxListeners() to increase limit"));pe.name="MaxListenersExceededWarning",pe.emitter=j,pe.type=$,pe.count=Z.length,a(pe)}return j}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(j,$,F){var z={fired:!1,wrapFn:void 0,target:j,type:$,listener:F},Y=f.bind(z);return Y.listener=F,z.wrapFn=Y,Y}function h(j,$,F){var z=j._events;if(z===void 0)return[];var Y=z[$];return Y===void 0?[]:typeof Y=="function"?F?[Y.listener||Y]:[Y]:F?w(Y):E(Y,Y.length)}function g(j){var $=this._events;if($!==void 0){var F=$[j];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}function E(j,$){for(var F=Array($),z=0;z<$;++z)F[z]=j[z];return F}function b(j,$){for(;$+1j||I(j))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+j+".");A=j}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(j){if(typeof j!="number"||0>j||I(j))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+j+".");return this._maxListeners=j,this},l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(j){for(var $=[],F=1;FY)return this;Y===0?F.shift():b(F,Y),F.length===1&&(z[j]=F[0]),z.removeListener!==void 0&&this.emit("removeListener",j,Z||$)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(j){var $,F,z;if(F=this._events,F===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[j]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete F[j]),this;if(arguments.length===0){var Y,J=Object.keys(F);for(z=0;z"u")return null;var a={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return a.RTCPeerConnection?a:null}},{}],9:[function(o,s,a){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */a.read=function(l,c,u,d,f){var m,h,g=8*f-d-1,E=(1<>1,w=-7,y=u?f-1:0,_=u?-1:1,R=l[c+y];for(y+=_,m=R&(1<<-w)-1,R>>=-w,w+=g;0>=-w,w+=d;0>1,T=f===23?i(2,-24)-i(2,-77):0,C=d?0:m-1,I=d?1:-1,A=0>c||c===0&&0>1/c?1:0;for(c=r(c),isNaN(c)||c===1/0?(g=isNaN(c)?1:0,h=_):(h=n(w(c)/b),1>c*(E=i(2,-h))&&(h--,E*=2),c+=1<=h+R?T/E:T*i(2,1-R),2<=c*E&&(h++,E/=2),h+R>=_?(g=0,h=_):1<=h+R?(g=(c*E-1)*i(2,f),h+=R):(g=c*i(2,R-1)*i(2,f),h=0));8<=f;l[u+C]=255&g,C+=I,g/=256,f-=8);for(h=h<=1.5*h?"s":"")}s.exports=function(f,m){m=m||{};var h=typeof f;if(h=="string"&&0 */let l;s.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?a:window):c=>(l||(l=Promise.resolve())).then(c).catch(u=>setTimeout(()=>{throw u},0))}).call(this)}).call(this,typeof Cr>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Cr)},{}],14:[function(o,s){(function(a,l){(function(){var c=o("safe-buffer").Buffer,u=l.crypto||l.msCrypto;s.exports=u&&u.getRandomValues?function(d,f){if(d>4294967295)throw new RangeError("requested too many random bytes");var m=c.allocUnsafe(d);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Cr)},{_process:12,"safe-buffer":30}],15:[function(o,s){function a(h,g){h.prototype=Object.create(g.prototype),h.prototype.constructor=h,h.__proto__=g}function l(h,g,E){function b(y,_,R){return typeof g=="string"?g:g(y,_,R)}E||(E=Error);var w=function(y){function _(R,T,C){return y.call(this,b(R,T,C))||this}return a(_,y),_}(E);w.prototype.name=E.name,w.prototype.code=h,m[h]=w}function c(h,g){if(Array.isArray(h)){var E=h.length;return h=h.map(function(b){return b+""}),2E?0:+E,g.length)===g}function d(h,g,E){return(E===void 0||E>h.length)&&(E=h.length),h.substring(E-g.length,E)===g}function f(h,g,E){return typeof E!="number"&&(E=0),!(E+g.length>h.length)&&h.indexOf(g,E)!==-1}var m={};l("ERR_INVALID_OPT_VALUE",function(h,g){return'The value "'+g+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,g,E){var b;typeof g=="string"&&u(g,"not ")?(b="must not be",g=g.replace(/^not /,"")):b="must be";var w;if(d(h," argument"))w="The ".concat(h," ").concat(b," ").concat(c(g,"type"));else{var y=f(h,".")?"property":"argument";w='The "'.concat(h,'" ').concat(y," ").concat(b," ").concat(c(g,"type"))}return w+=". Received type ".concat(typeof E),w},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),s.exports.codes=m},{}],16:[function(o,s){(function(a){(function(){function l(b){return this instanceof l?(f.call(this,b),m.call(this,b),this.allowHalfOpen=!0,void(b&&(b.readable===!1&&(this.readable=!1),b.writable===!1&&(this.writable=!1),b.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c))))):new l(b)}function c(){this._writableState.ended||a.nextTick(u,this)}function u(b){b.end()}var d=Object.keys||function(b){var w=[];for(var y in b)w.push(y);return w};s.exports=l;var f=o("./_stream_readable"),m=o("./_stream_writable");o("inherits")(l,f);for(var h,g=d(m.prototype),E=0;E>>1,W|=W>>>2,W|=W>>>4,W|=W>>>8,W|=W>>>16,W++),W}function w(W,S){return 0>=W||S.length===0&&S.ended?0:S.objectMode?1:W===W?(W>S.highWaterMark&&(S.highWaterMark=b(W)),W<=S.length?W:S.ended?S.length:(S.needReadable=!0,0)):S.flowing&&S.length?S.buffer.head.data.length:S.length}function y(W,S){if(V("onEofChunk"),!S.ended){if(S.decoder){var O=S.decoder.end();O&&O.length&&(S.buffer.push(O),S.length+=S.objectMode?1:O.length)}S.ended=!0,S.sync?_(W):(S.needReadable=!1,!S.emittedReadable&&(S.emittedReadable=!0,R(W)))}}function _(W){var S=W._readableState;V("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(V("emitReadable",S.flowing),S.emittedReadable=!0,a.nextTick(R,W))}function R(W){var S=W._readableState;V("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(W.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,z(W)}function T(W,S){S.readingMore||(S.readingMore=!0,a.nextTick(C,W,S))}function C(W,S){for(;!S.reading&&!S.ended&&(S.length=S.length?(O=S.decoder?S.buffer.join(""):S.buffer.length===1?S.buffer.first():S.buffer.concat(S.length),S.buffer.clear()):O=S.buffer.consume(W,S.decoder),O}function J(W){var S=W._readableState;V("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,a.nextTick(Z,S,W))}function Z(W,S){if(V("endReadableNT",W.endEmitted,W.length),!W.endEmitted&&W.length===0&&(W.endEmitted=!0,S.readable=!1,S.emit("end"),W.autoDestroy)){var O=S._writableState;(!O||O.autoDestroy&&O.finished)&&S.destroy()}}function pe(W,S){for(var O=0,D=W.length;O=S.highWaterMark)||S.ended))return V("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?J(this):_(this),null;if(W=w(W,S),W===0&&S.ended)return S.length===0&&J(this),null;var D=S.needReadable;V("need readable",D),(S.length===0||S.length-W"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Cr)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(o,s){function a(b,w){var y=this._transformState;y.transforming=!1;var _=y.writecb;if(_===null)return this.emit("error",new m);y.writechunk=null,y.writecb=null,w!=null&&this.push(w),_(b);var R=this._readableState;R.reading=!1,(R.needReadable||R.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Cr)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(o,s){(function(a){(function(){function l(I,A,j){return A in I?Object.defineProperty(I,A,{value:j,enumerable:!0,configurable:!0,writable:!0}):I[A]=j,I}function c(I,A){return{value:I,done:A}}function u(I){var A=I[g];if(A!==null){var j=I[R].read();j!==null&&(I[y]=null,I[g]=null,I[E]=null,A(c(j,!1)))}}function d(I){a.nextTick(u,I)}function f(I,A){return function(j,$){I.then(function(){return A[w]?void j(c(void 0,!0)):void A[_](j,$)},$)}}var m,h=o("./end-of-stream"),g=Symbol("lastResolve"),E=Symbol("lastReject"),b=Symbol("error"),w=Symbol("ended"),y=Symbol("lastPromise"),_=Symbol("handlePromise"),R=Symbol("stream"),T=Object.getPrototypeOf(function(){}),C=Object.setPrototypeOf((m={get stream(){return this[R]},next:function(){var I=this,A=this[b];if(A!==null)return Promise.reject(A);if(this[w])return Promise.resolve(c(void 0,!0));if(this[R].destroyed)return new Promise(function(z,Y){a.nextTick(function(){I[b]?Y(I[b]):z(c(void 0,!0))})});var j,$=this[y];if($)j=new Promise(f($,this));else{var F=this[R].read();if(F!==null)return Promise.resolve(c(F,!1));j=new Promise(this[_])}return this[y]=j,j}},l(m,Symbol.asyncIterator,function(){return this}),l(m,"return",function(){var I=this;return new Promise(function(A,j){I[R].destroy(null,function($){return $?void j($):void A(c(void 0,!0))})})}),m),T);s.exports=function(I){var A,j=Object.create(C,(A={},l(A,R,{value:I,writable:!0}),l(A,g,{value:null,writable:!0}),l(A,E,{value:null,writable:!0}),l(A,b,{value:null,writable:!0}),l(A,w,{value:I._readableState.endEmitted,writable:!0}),l(A,_,{value:function($,F){var z=j[R].read();z?(j[y]=null,j[g]=null,j[E]=null,$(c(z,!1))):(j[g]=$,j[E]=F)},writable:!0}),A));return j[y]=null,h(I,function($){if($&&$.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=j[E];return F!==null&&(j[y]=null,j[g]=null,j[E]=null,F($)),void(j[b]=$)}var z=j[g];z!==null&&(j[y]=null,j[g]=null,j[E]=null,z(c(void 0,!0))),j[w]=!0}),I.on("readable",d.bind(null,j)),j}}).call(this)}).call(this,o("_process"))},{"./end-of-stream":24,_process:12}],22:[function(o,s){function a(y,_){var R=Object.keys(y);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(y);_&&(T=T.filter(function(C){return Object.getOwnPropertyDescriptor(y,C).enumerable})),R.push.apply(R,T)}return R}function l(y){for(var _,R=1;R>>0),T=this.head,C=0;T;)m(T.data,R,C),C+=T.data.length,T=T.next;return R}},{key:"consume",value:function(_,R){var T;return _I.length?I.length:_;if(C+=A===I.length?I:I.slice(0,_),_-=A,_===0){A===I.length?(++T,this.head=R.next?R.next:this.tail=null):(this.head=R,R.data=I.slice(A));break}++T}return this.length-=T,C}},{key:"_getBuffer",value:function(_){var R=g.allocUnsafe(_),T=this.head,C=1;for(T.data.copy(R),_-=T.data.length;T=T.next;){var I=T.data,A=_>I.length?I.length:_;if(I.copy(R,R.length-_,0,A),_-=A,_===0){A===I.length?(++C,this.head=T.next?T.next:this.tail=null):(this.head=T,T.data=I.slice(A));break}++C}return this.length-=C,R}},{key:w,value:function(_,R){return b(this,l({},R,{depth:0,customInspect:!1}))}}]),y}()},{buffer:3,util:2}],23:[function(o,s){(function(a){(function(){function l(d,f){u(d,f),c(d)}function c(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.emit("close")}function u(d,f){d.emit("error",f)}s.exports={destroy:function(d,f){var m=this,h=this._readableState&&this._readableState.destroyed,g=this._writableState&&this._writableState.destroyed;return h||g?(f?f(d):d&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,a.nextTick(u,this,d)):a.nextTick(u,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(E){!f&&E?m._writableState?m._writableState.errorEmitted?a.nextTick(c,m):(m._writableState.errorEmitted=!0,a.nextTick(l,m,E)):a.nextTick(l,m,E):f?(a.nextTick(c,m),f(E)):a.nextTick(c,m)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(d,f){var m=d._readableState,h=d._writableState;m&&m.autoDestroy||h&&h.autoDestroy?d.destroy(f):d.emit("error",f)}}}).call(this)}).call(this,o("_process"))},{_process:12}],24:[function(o,s){function a(f){var m=!1;return function(){if(!m){m=!0;for(var h=arguments.length,g=Array(h),E=0;Ey.length)throw new E("streams");var T,C=y.map(function(I,A){var j=Am){var h=f?d:"highWaterMark";throw new l(h,m)}return n(m)}return c.objectMode?16:16384}}},{"../../../errors":15}],28:[function(o,s){s.exports=o("events").EventEmitter},{events:7}],29:[function(o,s,a){a=s.exports=o("./lib/_stream_readable.js"),a.Stream=a,a.Readable=a,a.Writable=o("./lib/_stream_writable.js"),a.Duplex=o("./lib/_stream_duplex.js"),a.Transform=o("./lib/_stream_transform.js"),a.PassThrough=o("./lib/_stream_passthrough.js"),a.finished=o("./lib/internal/streams/end-of-stream.js"),a.pipeline=o("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(o,s,a){function l(f,m){for(var h in f)m[h]=f[h]}function c(f,m,h){return d(f,m,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var u=o("buffer"),d=u.Buffer;d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?s.exports=u:(l(u,a),a.Buffer=c),c.prototype=Object.create(d.prototype),l(d,c),c.from=function(f,m,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return d(f,m,h)},c.alloc=function(f,m,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var g=d(f);return m===void 0?g.fill(0):typeof h=="string"?g.fill(m,h):g.fill(m),g},c.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d(f)},c.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(f)}},{buffer:3}],31:[function(o,s,a){function l(C){if(!C)return"utf8";for(var I;;)switch(C){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return C;default:if(I)return;C=(""+C).toLowerCase(),I=!0}}function c(C){var I=l(C);if(typeof I!="string"&&(R.isEncoding===T||!T(C)))throw new Error("Unknown encoding: "+C);return I||C}function u(C){this.encoding=c(C);var I;switch(this.encoding){case"utf16le":this.text=g,this.end=E,I=4;break;case"utf8":this.fillLast=h,I=4;break;case"base64":this.text=b,this.end=w,I=3;break;default:return this.write=y,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=R.allocUnsafe(I)}function d(C){return 127>=C?0:C>>5==6?2:C>>4==14?3:C>>3==30?4:C>>6==2?-1:-2}function f(C,I,A){var j=I.length-1;if(j=j)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1],A.slice(0,-1)}return A}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=C[C.length-1],C.toString("utf16le",I,C.length-1)}function E(C){var I=C&&C.length?this.write(C):"";if(this.lastNeed){var A=this.lastTotal-this.lastNeed;return I+this.lastChar.toString("utf16le",0,A)}return I}function b(C,I){var A=(C.length-I)%3;return A==0?C.toString("base64",I):(this.lastNeed=3-A,this.lastTotal=3,A==1?this.lastChar[0]=C[C.length-1]:(this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1]),C.toString("base64",I,C.length-A))}function w(C){var I=C&&C.length?this.write(C):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function y(C){return C.toString(this.encoding)}function _(C){return C&&C.length?this.write(C):""}var R=o("safe-buffer").Buffer,T=R.isEncoding||function(C){switch(C=""+C,C&&C.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};a.StringDecoder=u,u.prototype.write=function(C){if(C.length===0)return"";var I,A;if(this.lastNeed){if(I=this.fillLast(C),I===void 0)return"";A=this.lastNeed,this.lastNeed=0}else A=0;return A"u"?typeof self>"u"?typeof window>"u"?{}:window:self:Cr)},{}],"/":[function(o,s){function a(w){return w.replace(/a=ice-options:trickle\s\n/g,"")}function l(w){console.warn(w)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const c=o("debug")("simple-peer"),u=o("get-browser-rtc"),d=o("randombytes"),f=o("readable-stream"),m=o("queue-microtask"),h=o("err-code"),{Buffer:g}=o("buffer"),E=65536;class b extends f.Duplex{constructor(y){if(y=Object.assign({allowHalfOpen:!1},y),super(y),this._id=d(4).toString("hex").slice(0,7),this._debug("new peer %o",y),this.channelName=y.initiator?y.channelName||d(20).toString("hex"):null,this.initiator=y.initiator||!1,this.channelConfig=y.channelConfig||b.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},b.config,y.config),this.offerOptions=y.offerOptions||{},this.answerOptions=y.answerOptions||{},this.sdpTransform=y.sdpTransform||(_=>_),this.streams=y.streams||(y.stream?[y.stream]:[]),this.trickle=y.trickle===void 0||y.trickle,this.allowHalfTrickle=y.allowHalfTrickle!==void 0&&y.allowHalfTrickle,this.iceCompleteTimeout=y.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=y.wrtc&&typeof y.wrtc=="object"?y.wrtc:u(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(_){return void this.destroy(h(_,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=_=>{this._onIceCandidate(_)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(_=>{this.destroy(h(_,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=_=>{this._setupData(_)},this.streams&&this.streams.forEach(_=>{this.addStream(_)}),this._pc.ontrack=_=>{this._onTrack(_)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof y=="string")try{y=JSON.parse(y)}catch{y={}}this._debug("signal()"),y.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),y.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(y.transceiverRequest.kind,y.transceiverRequest.init)),y.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(y.candidate):this._pendingCandidates.push(y.candidate)),y.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(y)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(_=>{this._addIceCandidate(_)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(_=>{this.destroy(h(_,"ERR_SET_REMOTE_DESCRIPTION"))}),y.sdp||y.candidate||y.renegotiate||y.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(y){const _=new this._wrtc.RTCIceCandidate(y);this._pc.addIceCandidate(_).catch(R=>{!_.address||_.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(R,"ERR_ADD_ICE_CANDIDATE"))})}send(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(y)}}addTransceiver(y,_){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(y,_),this._needsNegotiation()}catch(R){this.destroy(h(R,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:y,init:_}})}}addStream(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),y.getTracks().forEach(_=>{this.addTrack(_,y)})}}addTrack(y,_){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const R=this._senderMap.get(y)||new Map;let T=R.get(_);if(!T)T=this._pc.addTrack(y,_),R.set(_,T),this._senderMap.set(y,R),this._needsNegotiation();else throw T.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(y,_,R){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const T=this._senderMap.get(y),C=T?T.get(R):null;if(!C)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");_&&this._senderMap.set(_,T),C.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):C.replaceTrack(_)}removeTrack(y,_){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const R=this._senderMap.get(y),T=R?R.get(_):null;if(!T)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{T.removed=!0,this._pc.removeTrack(T)}catch(C){C.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(T):this.destroy(h(C,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(y){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),y.getTracks().forEach(_=>{this.removeTrack(_,y)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,m(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(y){this._destroy(y,()=>{})}_destroy(y,_){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",y&&(y.message||y)),m(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",y&&(y.message||y)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,y&&this.emit("error",y),this.emit("close"),_()}))}_setupData(y){if(!y.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=y.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=E),this.channelName=this._channel.label,this._channel.onmessage=R=>{this._onChannelMessage(R)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=R=>{const T=R.error instanceof Error?R.error:new Error(`Datachannel error: ${R.message} ${R.filename}:${R.lineno}:${R.colno}`);this.destroy(h(T,"ERR_DATA_CHANNEL"))};let _=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(_&&this._onChannelClose(),_=!0):_=!1},5e3)}_read(){}_write(y,_,R){if(this.destroyed)return R(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(y)}catch(T){return this.destroy(h(T,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>E?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=R):R(null)}else this._debug("write before connect"),this._chunk=y,this._cb=R}_onFinish(){if(!this.destroyed){const y=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?y():this.once("connect",y)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(y=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(y.sdp=a(y.sdp)),y.sdp=this.sdpTransform(y.sdp);const _=()=>{if(!this.destroyed){const R=this._pc.localDescription||y;this._debug("signal"),this.emit("signal",{type:R.type,sdp:R.sdp})}};this._pc.setLocalDescription(y).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?_():this.once("_iceComplete",_))}).catch(R=>{this.destroy(h(R,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(y=>{this.destroy(h(y,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(y=>{y.mid||!y.sender.track||y.requested||(y.requested=!0,this.addTransceiver(y.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(y=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(y.sdp=a(y.sdp)),y.sdp=this.sdpTransform(y.sdp);const _=()=>{if(!this.destroyed){const R=this._pc.localDescription||y;this._debug("signal"),this.emit("signal",{type:R.type,sdp:R.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(y).then(()=>{this.destroyed||(this.trickle||this._iceComplete?_():this.once("_iceComplete",_))}).catch(R=>{this.destroy(h(R,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(y=>{this.destroy(h(y,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const y=this._pc.iceConnectionState,_=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",y,_),this.emit("iceStateChange",y,_),(y==="connected"||y==="completed")&&(this._pcReady=!0,this._maybeReady()),y==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),y==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(y){const _=R=>(Object.prototype.toString.call(R.values)==="[object Array]"&&R.values.forEach(T=>{Object.assign(R,T)}),R);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(R=>{const T=[];R.forEach(C=>{T.push(_(C))}),y(null,T)},R=>y(R)):0{if(this.destroyed)return;const T=[];R.result().forEach(C=>{const I={};C.names().forEach(A=>{I[A]=C.stat(A)}),I.id=C.id,I.type=C.type,I.timestamp=C.timestamp,T.push(_(I))}),y(null,T)},R=>y(R)):y(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const y=()=>{this.destroyed||this.getStats((_,R)=>{if(this.destroyed)return;_&&(R=[]);const T={},C={},I={};let A=!1;R.forEach($=>{($.type==="remotecandidate"||$.type==="remote-candidate")&&(T[$.id]=$),($.type==="localcandidate"||$.type==="local-candidate")&&(C[$.id]=$),($.type==="candidatepair"||$.type==="candidate-pair")&&(I[$.id]=$)});const j=$=>{A=!0;let F=C[$.localCandidateId];F&&(F.ip||F.address)?(this.localAddress=F.ip||F.address,this.localPort=+F.port):F&&F.ipAddress?(this.localAddress=F.ipAddress,this.localPort=+F.portNumber):typeof $.googLocalAddress=="string"&&(F=$.googLocalAddress.split(":"),this.localAddress=F[0],this.localPort=+F[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let z=T[$.remoteCandidateId];z&&(z.ip||z.address)?(this.remoteAddress=z.ip||z.address,this.remotePort=+z.port):z&&z.ipAddress?(this.remoteAddress=z.ipAddress,this.remotePort=+z.portNumber):typeof $.googRemoteAddress=="string"&&(z=$.googRemoteAddress.split(":"),this.remoteAddress=z[0],this.remotePort=+z[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(R.forEach($=>{$.type==="transport"&&$.selectedCandidatePairId&&j(I[$.selectedCandidatePairId]),($.type==="googCandidatePair"&&$.googActiveConnection==="true"||($.type==="candidatepair"||$.type==="candidate-pair")&&$.selected)&&j($)}),!A&&(!Object.keys(I).length||Object.keys(C).length))return void setTimeout(y,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(F){return this.destroy(h(F,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const $=this._cb;this._cb=null,$(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};y()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>E)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(y=>{this._pc.removeTrack(y),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(y){this.destroyed||(y.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:y.candidate.candidate,sdpMLineIndex:y.candidate.sdpMLineIndex,sdpMid:y.candidate.sdpMid}}):!y.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),y.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(y){if(this.destroyed)return;let _=y.data;_ instanceof ArrayBuffer&&(_=g.from(_)),this.push(_)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const y=this._cb;this._cb=null,y(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(y){this.destroyed||y.streams.forEach(_=>{this._debug("on track"),this.emit("track",y.track,_),this._remoteTracks.push({track:y.track,stream:_}),this._remoteStreams.some(R=>R.id===_.id)||(this._remoteStreams.push(_),m(()=>{this._debug("on stream"),this.emit("stream",_)}))})}_debug(){const y=[].slice.call(arguments);y[0]="["+this._id+"] "+y[0],c.apply(null,y)}}b.WEBRTC_SUPPORT=!!u(),b.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},b.channelConfig={},s.exports=b},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})})(wI);var dee=wI.exports;const fee=za(dee);var pee=fee;function z0(e,t){e.send(JSON.stringify(t))}var xI="signaling.rxdb.info",aR="wss://"+xI+"/",lR=!1,hee=1e3*60*2;function mee({signalingServerUrl:e,wrtc:t,config:n,webSocketConstructor:r}){gee(),e=e||aR,r=r||WebSocket,e.includes(xI)&&!lR&&(lR=!0,console.warn(["RxDB Warning: You are using the RxDB WebRTC replication plugin","but you did not specify your own signaling server url.","By default it will use a signaling server provided by RxDB at "+aR,"This server is made for demonstration purposes and tryouts. It is not reliable and might be offline at any time.","In production you must always use your own signaling server instead.","Learn how to run your own server at https://rxdb.info/replication-webrtc.html","Also leave a ⭐ at the RxDB github repo 🙏 https://github.com/pubkey/rxdb 🙏"].join(" ")));var i=async o=>{var s=new Ln,a=new Ln,l=new Ln,c=new Ln,u=new Ln,d=new Map,f=!1,m,h=void 0;g(),(async()=>{for(;await SL(hee/2),!f;)h&&z0(h,{type:"ping"})})();function g(){f||(h=new r(e),h.onclose=()=>g(),h.onopen=()=>{bt(h).onmessage=b=>{var w=JSON.parse(b.data);switch(w.type){case"init":m=w.yourPeerId,z0(bt(h),{type:"join",room:o.topic});break;case"joined":var y=function(R){var T=!1,C=new pee({initiator:R>m,wrtc:t,config:n,trickle:!0});C.id=nc(10),d.set(R,C),C.on("signal",I=>{z0(bt(h),{type:"signal",senderPeerId:m,receiverPeerId:R,room:o.topic,data:I})}),C.on("data",I=>{I=JSON.parse(I.toString()),I.result?c.next({peer:C,response:I}):l.next({peer:C,message:I})}),C.on("error",I=>{u.next(ot("RC_WEBRTC_PEER",{error:I})),C.destroy(),T||(T=!0,a.next(C))}),C.on("connect",()=>{s.next(C)}),C.on("close",()=>{T||(T=!0,a.next(C)),y(R)})};w.otherPeerIds.forEach(R=>{R===m||d.has(R)||y(R)});break;case"signal":var _=Ns(d,w.senderPeerId);_.signal(w.data);break}}})}var E={error$:u,connect$:s,disconnect$:a,message$:l,response$:c,async send(b,w){await b.send(JSON.stringify(w))},destroy(){return f=!0,bt(h).close(),u.complete(),s.complete(),a.complete(),l.complete(),c.complete(),yi}};return E};return i}function gee(){if(typeof yo>"u"||typeof yo.nextTick!="function")throw ot("RC7")}async function vee(e){var t=e.collection;qu(kS),e.pull&&(e.pull.batchSize||(e.pull.batchSize=20)),e.push&&(e.push.batchSize||(e.push.batchSize=20)),t.database.multiInstance&&await t.database.waitForLeadership();var n=0,r=nc(10);function i(){var l=n++;return t.database.token+"|"+r+"|"+l}var o=await t.database.storageToken,s=new yee(t,e,await e.connectionHandlerCreator(e));s.subs.push(s.connectionHandler.error$.subscribe(l=>s.error$.next(l)),s.connectionHandler.disconnect$.subscribe(l=>s.removePeer(l))),s.subs.push(s.connectionHandler.message$.pipe(Wt(l=>l.message.method==="token")).subscribe(l=>{s.connectionHandler.send(l.peer,{id:l.message.id,result:o})}));var a=s.connectionHandler.connect$.pipe(Wt(()=>!s.canceled)).subscribe(async l=>{if(e.isPeerValid){var c=await e.isPeerValid(l);if(!c)return}var u;try{var d=await F0(s.connectionHandler,l,{id:i(),method:"token",params:[]});u=d.result}catch(b){s.error$.next(ot("RC_WEBRTC_PEER",{error:b}));return}var f=await aee(t.database.hashFunction,o,u),m;if(f){var h=s.masterReplicationHandler,g=h.masterChangeStream$.subscribe(b=>{var w={id:"masterChangeStream$",result:b};s.connectionHandler.send(l,w)});s.subs.push(g,s.connectionHandler.disconnect$.pipe(Wt(b=>b===l)).subscribe(()=>g.unsubscribe()));var E=s.connectionHandler.message$.pipe(Wt(b=>b.peer===l),Wt(b=>b.message.method!=="token")).subscribe(async b=>{var{peer:w,message:y}=b,_=h[y.method].bind(h),R=await _(...y.params),T={id:y.id,result:R};s.connectionHandler.send(w,T)});s.subs.push(E)}else m=UZ({replicationIdentifier:[t.name,e.topic,u].join("||"),collection:t,autoStart:!0,deletedField:"_deleted",live:!0,retryTime:e.retryTime,waitForLeadership:!1,pull:e.pull?Object.assign({},e.pull,{async handler(b){var w=await F0(s.connectionHandler,l,{method:"masterChangesSince",params:[b,bt(e.pull).batchSize],id:i()});return w.result},stream$:s.connectionHandler.response$.pipe(Wt(b=>b.response.id==="masterChangeStream$"),qt(b=>b.response.result))}):void 0,push:e.push?Object.assign({},e.push,{async handler(b){var w=await F0(s.connectionHandler,l,{method:"masterWrite",params:[b],id:i()});return w.result}}):void 0});s.addPeer(l,m)});return s.subs.push(a),s}var yee=function(){function e(n,r,i){this.peerStates$=new bs(new Map),this.canceled=!1,this.subs=[],this.error$=new Ln,this.collection=n,this.options=r,this.connectionHandler=i,this.collection.onDestroy.push(()=>this.cancel()),this.masterReplicationHandler=VX(n.storageInstance,n.conflictHandler,n.database.token)}var t=e.prototype;return t.addPeer=function(r,i){var o={peer:r,replicationState:i,subs:[]};this.peerStates$.next(this.peerStates$.getValue().set(r,o)),i&&o.subs.push(i.error$.subscribe(s=>this.error$.next(s)))},t.removePeer=function(r){var i=Ns(this.peerStates$.getValue(),r);this.peerStates$.getValue().delete(r),this.peerStates$.next(this.peerStates$.getValue()),i.subs.forEach(o=>o.unsubscribe()),i.replicationState&&i.replicationState.cancel()},t.awaitFirstPeer=function(){return $n(this.peerStates$.pipe(Wt(r=>r.size>0)))},t.cancel=async function(){this.canceled||(this.canceled=!0,this.subs.forEach(r=>r.unsubscribe()),Array.from(this.peerStates$.getValue().keys()).forEach(r=>{this.removePeer(r)}),await this.connectionHandler.destroy())},e}();qu(qZ);qu(eee);qu(kS);qu(see);function bee(e){return Promise.all(e.character_traits.map(t=>t.split(/[[\]]/)).map(async([t,n])=>{const r=await on.character_traits.findOne(t.trim()).exec();return Object.assign({},r==null?void 0:r.toMutableJSON(),{parameter:n==null?void 0:n.trim()})}))}const wee={expand:async function(){const e=await on.getLocal("gbdata_meta"),[t,n]=await Promise.all([this.populate("character_plays").then(i=>i.map(o=>o.toMutableJSON())),bee(this)]);return Object.assign({},this.toMutableJSON(),{character_plays:t,character_traits:n,_inf:this.id==="Pneuma"?0:void 0,statLine:`${this.jog}"/${this.sprint}" | ${this.tac} | ${this.kickdice}/${this.kickdist}" | ${this.def}+ | ${this.arm} | ${this.inf}/${this.infmax} | ${this.reach?2:1}"`,version:e==null?void 0:e.get("version")})}},xee={title:"Guild Ball model",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:32},name:{type:"string"},captain:{type:"boolean",default:!1},mascot:{type:"boolean",default:!1},veteran:{type:"boolean",default:!1},seasoned:{type:"boolean",default:!1},hp:{type:"integer",minimum:0},recovery:{type:"integer",minimum:0},jog:{type:"integer",minimum:0},sprint:{type:"integer",minimum:0},tac:{type:"integer",minimum:1},kickdice:{type:"integer",minimum:1},kickdist:{type:"integer",minimum:0},def:{type:"integer",minimum:1,maximum:6},arm:{type:"integer",minimum:0},inf:{type:"integer",minimum:0},infmax:{type:"integer",minimum:0},reach:{type:"boolean",default:!1},benched:{type:"string"},dehcneb:{type:"string"},playbook:{type:"array",minItems:2,maxItems:2,items:{type:"array",minItems:7,maxItems:7,items:{type:["string","null"]}}},character_plays:{type:"array",ref:"character_plays",items:{type:"string"}},character_traits:{type:"array",ref:"character_traits",items:{type:"string"}},heroic:{type:"string"},legendary:{type:"string"},types:{type:"string"},base:{type:"integer",enum:[30,40,50]},guild1:{type:"string",maxLength:32},guild2:{type:"string",maxLength:32,default:""},gbcp:{type:"boolean",default:!1}},required:["name","hp","recovery","jog","sprint","tac","kickdice","kickdist","def","arm","inf","infmax","playbook","types","base","guild1"],indexes:["guild1","guild2"]},See={title:"Guild Ball guild",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:32},minor:{type:"boolean",default:!1},color:{type:"string"},shadow:{type:"string"},darkColor:{type:"string"},roster:{type:"array",items:{type:"string"}}},required:["color","roster"]},_ee={title:"Guild Ball character play",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},text:{type:"string"},CST:{type:["string","integer"]},RNG:{type:["string","integer"]},SUS:{type:"boolean",default:!1},OPT:{type:"boolean",default:!1}},required:["text","CST","RNG","SUS","OPT"]},Cee={title:"Guild Ball character trait",version:0,primaryKey:"name",type:"object",properties:{name:{type:"string",maxLength:64},active:{type:"boolean",default:!1},text:{type:"string"}},required:["text"]},kee={title:"Guild Ball Game State",version:0,primaryKey:"_id",type:"object",properties:{_id:{type:"string",maxLength:128},guild:{type:"string",ref:"guilds"},score:{type:"integer",minimum:0,default:0},momentum:{type:"integer",minimum:0,default:0},roster:{type:"array",items:{type:"object",properties:{name:{type:"string",ref:"models"},health:{type:"integer",minimum:0}},required:["name","health"]}},currentStep:{type:"string",enum:["Guilds","Draft","Game"]},navigateTo:{type:"string",enum:["Guilds","Draft","Game"]}}},on=await tJ({name:"gb_playbook",localDocuments:!0,storage:IZ()});await on.addCollections({guilds:{schema:See},models:{schema:xee,methods:wee},character_plays:{schema:_ee},character_traits:{schema:Cee},game_state:{schema:kee,localDocuments:!0}});const Eee={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]},{urls:["turn:standard.relay.metered.ca:80","turn:standard.relay.metered.ca:80?transport=tcp","turn:standard.relay.metered.ca:443","turns:standard.relay.metered.ca:443?transport=tcp"],username:"25ee3bdfcc273a8e3ae9db71",credential:"XVIpxKTNnMR7XQDK"}]};function RS(e,t){return vee({collection:on.game_state,connectionHandlerCreator:mee({signalingServerUrl:e,config:Eee}),topic:t,pull:{},push:{}}).then(n=>(n.error$.subscribe(r=>{console.log("replication error:"),console.dir(r)}),n.peerStates$.subscribe(r=>{console.log("new peer states:"),console.dir(r)}),n))}const SI=k.createContext({}),Ree=e=>{const t=k.useMemo(()=>on.getLocal$("settings"),[]);return k.useEffect(()=>{if(!t)return;const n=t.subscribe(r=>{if(!r){on==null||on.upsertLocal("settings",_I).catch(console.error);return}});return()=>n.unsubscribe()},[t]),v.jsx(SI.Provider,{value:{setting$:t},children:e.children})},ai=()=>k.useContext(SI),_I={dataSet:"GB-Playbook-4-6.json",language:"auto",initialScreen:"/game",gameSize:6,networkPlay:!1,uiPreferences:{displayStatLine:!1},cardPreferences:{preferredStyle:"gbcp"},gamePlayRoute:"/game",libraryRoute:"/library"},PS=k.createContext(null),ls=e=>{const t=k.useContext(PS);return v.jsx(Ox,{container:t,children:e.children})},Pee=Pt.forwardRef((e,t)=>v.jsx(FF,{position:"static",className:"no-print",children:v.jsxs(VF,{variant:"dense",children:[v.jsx(Zt,{ref:t,sx:{display:"flex",flexDirection:"row",width:"100%"}}),v.jsx(Lo,{size:"small",color:"inherit",onClick:e.onClick,children:v.jsx(kO,{})})]})})),cR=Pt.forwardRef((e,t)=>{const{href:n,...r}=e;return v.jsx(xT,{ref:t,to:n,...r,role:void 0})}),Tee=Sx({palette:{mode:"dark",primary:{main:"#3d708f"},secondary:{main:"#ffb300"},background:{default:"#121a22"}},components:{MuiCssBaseline:{styleOverrides:{body:{background:"linear-gradient(120deg, black, #221a22, #5f405f, #221a22, black)"},"@media print":{body:{background:"white"}}}},MuiLink:{defaultProps:{component:cR}},MuiButtonBase:{defaultProps:{LinkComponent:cR}}}}),_h=e=>v.jsx(UD,{to:e.to,style:{textDecoration:"inherit",color:"inherit"},onClick:e.onClick,children:({isActive:t})=>v.jsx(Hz,{selected:t,children:e.children})}),Oee=()=>{const[e,t]=k.useState(null),[n,r]=k.useState(!1);return v.jsxs(v8,{theme:Tee,children:[v.jsx(UG,{}),v.jsxs("div",{className:"App",children:[v.jsx(Pee,{ref:i=>t(i),onClick:()=>r(!0)}),v.jsx(Lee,{drawer:n,setDrawer:r}),v.jsx(PS.Provider,{value:e,children:v.jsx(nx,{})})]})]})};function Lee(e){const{drawer:t,setDrawer:n}=e,{setting$:r}=ai(),[i,o]=k.useState(),[s,a]=k.useState();return k.useEffect(()=>{const l=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.gamePlayRoute)).subscribe(u=>o(u)),c=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.libraryRoute)).subscribe(u=>a(u));return()=>{l==null||l.unsubscribe(),c==null||c.unsubscribe()}}),v.jsxs(Tz,{anchor:"right",open:t,onClose:()=>n(!1),PaperProps:{sx:{width:"275px"}},ModalProps:{keepMounted:!0},children:[v.jsxs(Xd,{children:[v.jsxs(fo,{children:[v.jsx("img",{src:new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAJaUlEQVRYR+2YeVjVVRrHP3fj3ssqYCwqoA5iYvloljbYOE8GqOk8hDpZrizqkE5mapmKWGJj82SFKYwLomTpqJTmxthoY5lLZW65IEEsAgKxidcLd4E7zzkoiVzF0uqPmXMf/uD3u+fc7/m+3+973vcoxm2IsnEvhgIaLY0Ufp2P1WxFoVDci1VR/B/gXfL4izDYYGmQIbbZ7l499xQgVsj/6nvqjHWoVWo0ag0NjQ13xeE9A6hUKjBcNVJ2ogQ3nRtGk5HK2iqc9U6/PUClQkmdpY6e3sFM6DOOLj6dMZgMpO1YT/rudHRa3c8O910zqECB1daAi4MTb0cuRWlV8P4H7xPy+xB6PtCTWe/OZt+xT3FxdKaxsfEns3nXAAV7BvNVHunUl1fCXuLFmS+S9E4SQUFBnM86z47PdzB/1QI8XD1+lh7vGKBw5fUP2BD+FC4VzwXAR/36MTv0RSZOnMimjZvo0KEDBQUF7D68h7kp81oAFLPF3DtxeZsABUONtkZMVhPWxgZstkYJVKlU4qByQKvWcsVsoH+nR3gpdCYxsTGsS1tH586dycvLY+ehXcxcNgsnnTPWBosMsUqlQuegw0HtINe+HdBbApRHlQ3Jjk6txd/NDz/3TrjqXTFbLZTVlpFfXUB1XTXmBgsDuzzGrCdmEB0Tzfp16wkICCA/P5+dX+xixdZk+vfsRzsXd8wWM4VlhWQVZFFe/YN0uVqtvqU+7QIUrFkaLHJ3A7v+gcg+Efg6+9gV+KfZB/jgm00EtPMnYej8ZoBdu3bl7JmzoEKydfMQrt/0r3+SnvkeBqMBR52jXY22AiiYszRY0Wt0THssjr5+D1FeWs6GjRs4dPgwZWVl6HQ6evYIJvKpSB4f9DhXrUYOZR8mPDi0VYhN9SY2btrI3r17KSouknMffOBBxo8bx0N9+5JXkiedXlBaiF6nb8VkK4DX9TA/9BV6+N7P8uQVvLpwIVWVVXYZfHLYk6SlpuHt4y3fT4qdxNq0tQQHB7Ny5Uri4uI4d+5cq7mCiKnTprJi+QqKyouISozmitEgw32jJlsAFKG9YrpCbP9ohvUcSuLriSTEJ8jFu/h1IjwiEqeOfpiMRrIPH+Tf+/fLd926dePAgQP4+voSHR1Neno6Hh4e1NXVyb/Q0FDCwsJwdnaWYDMyMmQkxIiOiSFt7Voyj2QyJ3kurs6uLVhsBih2ZLaa8XH25u0Rb3L0yFEGDBggF4kYEs5TS5LI0jgzwNudK/Vmgh017Exdxd8S4qk3mYiIiGD79u1MmDCBDRs2SJcLJtLS0oiKimrB4MWLFxk7diwHDx6UzzMzMxkyZAij458lpygHvVYv9S9GM0CVQsXl+ss83XsUz/YdzfA/DWfPrj0EBvgze1smju3v49KlUiorayi+WIyXWskLTw1l6avzWb78XbmYSCtLly4lOTlZ/h8fH09iYiJWq7UZoACt0WioqKigV69elJaWSh3v37ef1dvXsGzrcjxc3WloaCoymgHKE8Fk4LVhCfzOqSuduvhRVVHJ9JfnED57Pp9/+Q1FpT/gpVLygKcrLiYTaqMRn473MezpEdRU10jN5eTkSJBubm5kZ2fj6ekpk7lg9Powm804ODgwb948lixZgru7O8VFxZwpPMuk1yfj4uTSHOYWGhQhXjb6bYxFVwnsHihDFL/8HwQ+OpBTJ7+lt7cnTqZ6qvMKqLmQg8OVWob+ZSKjZ8/gxIkTzJkzR+5cAOzTpw/Hjx+3ayzBqEjW27ZtY+TIkSiUCnKzc1G5qhjx8ii0Gu21s+oGBsVKFquF5c8kUZ1XRffg7k1hWrKUkD8+gflSCUVnzmP4Pg+9wYCvV3t8vTwJCnucoTOe5/ixYxKgYOuNN96gd+/eEqC93uRmgILdnOwclC4qRs75iQCfi5vK+BHP8PWO3SgrKvHz9cLT3Q1NRQWqgkLcpk2m//ix1JSXk5KSIpmZMmUKrq6uMsTt27dvFWKLxSJ1OHfuXLkZIYOii0WcyjvN5CVTcHX60cktQnwzg6IvC+jalc1Ll6E3XOVyXj6qsjKsF7LRqtX0+2scr+zfy9+TkiTbp06dQqfX0T3oGvvXTCIAXWfSnkmGDB3Cnt17SM5IIWXbSvsmsRdiQb2o4cJCQ1m94FU8KyqpPXwUtwB/VI560msqmB4fj6W+noEDB/LZZ59JoJGRkTLlaLVaaZyb00xJSQljxoxp/r5INyEDQhg192l5TmsdtM3J+rYMih/z8fGRqaBDgD+jnxyGv5MLRoWN/V9+yacij9lsMpxHjh4hMDBQ5q/L1ZdlDs3NzZWABw8ezKBBg2SizsrK4sMPP0SAFGNBwgIWvbaIzfu2sHj967RzbtfiTL41wJ7dZTWzatUqRGJdvHixXUfe36MH69evo3+//qT8ZxXfncvmnWlvUVxczMSoKPbv22d3nkgtCQsTmPHCDE5/d5rn3pwmNyfSXVO12TTaBJiamkpsbCxfHf2KLRmbOXnyJCaTiQ4dOxIeFk70hGiUGiWbjm/moxPbyPniOwY/HE5i3CI0Kg2ffPIJH3/8MVkXshCFg7e3NyEhIYwfNx4vby8OnT5E/OoEDMaraDVN9eGNo02Aq1evJiYmBpvKhhp1KzbOl2ex5ZsMTpd+i16pp+hYIZVVlXTz70bM8GiGDxhml8GCsgLSd73Hji92NhW/ApydnqVNgGtWr2HS5EnM+mgOLjpn/D38UCs11Birya8qpKi2WFbZjlpHeScj7mZsVhv15npZnHZo70uQXxAdvTpKENW11eQWf09OcQ7GeqNMKWLcqqpuE2DqmlRiJ8Xy3JbnKaktQa1UN2tFNOei5BctQKP43HB5pFKqZGoxWUyYzKZm4YtnoqEXRaz4TluNvV2AlbkVBPcKloJNXpHMlLgpTN86k8q6SrRqB2FcKeTrzU+Tmu3fbslm61rDdT3Wgq2btWZXBzeaRLAgGqOkP79FY5WVTv5+ck7G1q2MHDWKqVumy/5D7N5uOH7p6zeVQkmtycD4h8cQ2StCuu/SpUuyjbxQns3CzEWyi7sxBbS0269wPyiYEWGd2G8cTwQNkr9/pvQsqw6lUmGokGnjNwUoxW5rpN5qwkPvLg1RVVclTXDL0DZn1F+BwSatN4latJ2CLY1SIw3Q5i3AL63Bm10kgMr8dMOxcyun3c7Ft51zBy/bvPq4gzWuHZq/UojvGFBryv83b/n/CxJONjR0KMriAAAAAElFTkSuQmCC",import.meta.url).href,style:{borderRadius:5.4},alt:""}),v.jsx(gs,{style:{textAlign:"center"},children:v.jsx(wt,{variant:"h6",fontFamily:"Comfortaa",children:"GB Playbook"})})]}),v.jsx(Zo,{}),v.jsx(_h,{to:i??"/game",onClick:()=>n(!1),children:v.jsx(gs,{children:"Game Play"})}),v.jsx(_h,{to:s??"/library",onClick:()=>n(!1),children:v.jsx(gs,{children:"Library"})}),v.jsx(_h,{to:"/print",onClick:()=>n(!1),children:v.jsx(gs,{children:"Card Printer"})}),v.jsx(_h,{to:"/settings",onClick:()=>n(!1),children:v.jsx(gs,{children:"Settings"})}),v.jsx("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"1em"},children:v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/cleech/GBPlaybook/blob/pwa/README.md",children:"About"})})})]}),v.jsx(Zo,{}),v.jsxs(Xd,{children:[v.jsx(fo,{children:v.jsx(gs,{children:"Rules Documents:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-Rulebook-4.1.pdf",children:"Season 4 Core Rulebook"})}),v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-FAQ-19-12-20.pdf",children:"Season 4 FAQ"})}),v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://docs.guildball.app/GB-S4-RegionalCup-Rules-200128__1.pdf",children:"Organized Play Rules"})})]})]}),v.jsx(Zo,{}),v.jsxs(Xd,{children:[v.jsx(fo,{children:v.jsx(gs,{children:"Community Links:"})}),v.jsxs("nav",{style:{display:"flex",flexDirection:"column",marginLeft:"2em"},children:[v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://steamforged.com/pages/guild-ball",children:"Steamforged Games"})}),v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://discord.gg/fvpFSfm976",children:"Guild Ball Community Project"})}),v.jsx(fo,{disablePadding:!0,children:v.jsx(vo,{component:"a",target:"_blank",rel:"noopener noreferrer",href:"https://www.longshanks.org/systems/guildball/",children:"Longshanks"})})]})]})]})}const jee=Gn(v.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Iee=Gn([v.jsx("path",{d:"M5 19h14V5H5zM16.5 6c.83 0 1.5.67 1.5 1.5S17.33 9 16.5 9 15 8.33 15 7.5 15.67 6 16.5 6m0 9c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M12 10.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5M7.5 6C8.33 6 9 6.67 9 7.5S8.33 9 7.5 9 6 8.33 6 7.5 6.67 6 7.5 6m0 9c.83 0 1.5.67 1.5 1.5S8.33 18 7.5 18 6 17.33 6 16.5 6.67 15 7.5 15",opacity:".3"},"0"),v.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14z"},"1"),v.jsx("circle",{cx:"7.5",cy:"16.5",r:"1.5"},"2"),v.jsx("circle",{cx:"7.5",cy:"7.5",r:"1.5"},"3"),v.jsx("circle",{cx:"12",cy:"12",r:"1.5"},"4"),v.jsx("circle",{cx:"16.5",cy:"16.5",r:"1.5"},"5"),v.jsx("circle",{cx:"16.5",cy:"7.5",r:"1.5"},"6")],"CasinoTwoTone"),CI=Gn([v.jsx("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m-2 13-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z",opacity:".3"},"0"),v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"},"1")],"CheckCircleTwoTone"),TS=Gn(v.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),ic=Gn(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),Mee=Gn(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),$ee=Gn(v.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),Nee=Gn(v.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Sync"),Aee=new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1});function rm(e){return e===0?1:e*rm(e-1)}function Dee(e,t,n){if(!e||!t)return[];const r=t,o=1-Math.pow((e-1)/6,n?2:1),s=[...Array(t).keys()].map(l=>l+1).map(l=>rm(r)/(rm(l)*rm(r-l))*Math.pow(o,l)*Math.pow(1-o,r-l));return[...Array(t).keys()].map(l=>s.slice(l).reduce((c,u)=>c+u,0)).map(l=>Math.min(l,.999))}function uR(e){const{value:t,setValue:n,clamp:r}=e;return v.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v.jsxs(Df,{size:"small",variant:"contained",children:[v.jsx(yn,{onClick:i=>{i.stopPropagation(),r(t-1)&&n(t-1)},children:v.jsx(Mee,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(yn,{disabled:!0,size:"small",children:v.jsx(wt,{variant:"body2",color:"text.primary",children:t})}),v.jsx(yn,{onClick:i=>{i.stopPropagation(),r(t+1)&&n(t+1)},children:v.jsx(jee,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function Bee(){const[e,t]=k.useState(null),n=!!e,[r,i]=k.useState(4),[o,s]=k.useState(4),[a,l]=k.useState(!1);return v.jsxs(v.Fragment,{children:[v.jsx(Lo,{size:"small",onClick:c=>{t(e?null:c.currentTarget)},children:v.jsx(Iee,{})}),v.jsxs(Fv,{open:n,anchorEl:e,onClose:()=>{t(null)},children:[v.jsx(wt,{variant:"h5",textAlign:"center",children:"Dice Odds"}),v.jsx(Zo,{}),v.jsxs("div",{style:{margin:"1em",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.5em"},children:[v.jsx(wt,{children:"Target Number :"}),v.jsx(uR,{value:r,setValue:i,clamp:c=>c>1&&c<7}),v.jsx(wt,{children:"Dice Pool :"}),v.jsx(uR,{value:o,setValue:s,clamp:c=>c>0}),v.jsx(wt,{children:"Reroll :"}),v.jsx(Vo,{checked:a,onChange:(c,u)=>{l(u)},sx:{padding:0}})]}),v.jsx(Zo,{}),v.jsxs("div",{style:{margin:"1em",display:"grid",gap:"0em 1em",justifyContent:"center",justifyItems:"center",gridTemplateColumns:"auto auto"},children:[v.jsx(wt,{sx:{textDecoration:"underline"},children:"Hits"}),v.jsx(wt,{sx:{textDecoration:"underline"},children:"Chance"}),Dee(r,o,a).map((c,u)=>v.jsxs(k.Fragment,{children:[v.jsxs("div",{children:[u+1,"+"]}),v.jsx("div",{className:`dice-bin-${Math.floor(c*10)}`,style:{padding:"0 1em",margin:"1px",width:"100%"},children:Aee.format(c)})]},u))]})]})]})}const Fee={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class ig{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Fee,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[a,l]=s;for(let c=0;c{let[a,l]=s;for(let c=0;c{e=r,t=i});return n.resolve=e,n.reject=t,n}function dR(e){return e==null?"":""+e}function zee(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const Uee=/###/g;function sf(e,t,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(Uee,"."):a}function i(){return!e||typeof e=="string"}const o=typeof t!="string"?t:t.split(".");let s=0;for(;s":">",'"':""","'":"'","/":"/"};function Vee(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>Hee[t]):e}class Kee{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const qee=[" ",",","?","!",";"],Yee=new Kee(20);function Qee(e,t,n){t=t||"",n=n||"";const r=qee.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=Yee.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}function W1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;o-1&&l0?e.replace("_","-"):e}class pR extends ty{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&o?a.push(...r.split(o)):a.push(r)));const l=og(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!s||typeof r!="string"?l:W1(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),fR(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Object.prototype.toString.apply(r[o])==="[object Array]")&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let l=og(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?kI(l,r,o):l={...l,...r},fR(this.data,a,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var EI={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const hR={};class ag extends ty{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),zee(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Yo.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Qee(t,r,i);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:o};const c=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),t=c.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const _=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${_}${s}`,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${_}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const d=this.resolve(t,n);let f=d&&d.res;const m=d&&d.usedKey||s,h=d&&d.exactUsedKey||s,g=Object.prototype.toString.apply(f),E=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&E.indexOf(g)<0&&!(typeof b=="string"&&g==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,f,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(d.res=_,d.usedParams=this.getUsedParamsDetails(n),d):_}if(o){const _=g==="[object Array]",R=_?[]:{},T=_?h:m;for(const C in f)if(Object.prototype.hasOwnProperty.call(f,C)){const I=`${T}${o}${C}`;R[C]=this.translate(I,{...n,joinArrays:!1,ns:a}),R[C]===I&&(R[C]=f[C])}f=R}}else if(w&&typeof b=="string"&&g==="[object Array]")f=f.join(b),f&&(f=this.extendTranslation(f,t,n,r));else{let _=!1,R=!1;const T=n.count!==void 0&&typeof n.count!="string",C=ag.hasDefaultValue(n),I=T?this.pluralResolver.getSuffix(c,n.count,n):"",A=n.ordinal&&T?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",j=T&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),$=j&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${I}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(f)&&C&&(_=!0,f=$),this.isValidLookup(f)||(R=!0,f=s);const z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:f,Y=C&&$!==f&&this.options.updateMissing;if(R||_||Y){if(this.logger.log(Y?"updateKey":"missingKey",c,l,s,Y?$:f),o){const G=this.resolve(s,{...n,keySeparator:!1});G&&G.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let J=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let G=0;G{const Le=C&&le!==f?le:z;this.options.missingKeyHandler?this.options.missingKeyHandler(G,l,V,Le,Y,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(G,l,V,Le,Y,n),this.emit("missingKey",G,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?J.forEach(G=>{const V=this.pluralResolver.getSuffixes(G,n);j&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(le=>{pe([G],s+le,n[`defaultValue${le}`]||$)})}):pe(J,s,$))}f=this.extendTranslation(f,t,n,d,r),R&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(R||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,_?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),c){const f=t.match(this.interpolator.nestingRegexp),m=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;i=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",m=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(E=>{this.isValidLookup(r)||(a=E,!hR[`${g[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(hR[`${g[0]}-${E}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{if(this.isValidLookup(r))return;s=b;const w=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,u,b,E,n);else{let _;f&&(_=this.pluralResolver.getSuffix(b,n.count,n));const R=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(w.push(u+_),n.ordinal&&_.indexOf(T)===0&&w.push(u+_.replace(T,this.options.pluralSeparator)),m&&w.push(u+R)),h){const C=`${u}${this.options.contextSeparator}${n.context}`;w.push(C),f&&(w.push(C+_),n.ordinal&&_.indexOf(T)===0&&w.push(C+_.replace(T,this.options.pluralSeparator)),m&&w.push(C+R))}}let y;for(;y=w.pop();)this.isValidLookup(r)||(o=y,r=this.getResource(b,E,y,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function U0(e){return e.charAt(0).toUpperCase()+e.slice(1)}class mR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yo.create("languageUtils")}getScriptPartFromCode(t){if(t=sg(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=sg(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=U0(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=U0(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=U0(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let Xee=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Jee={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const Zee=["v1","v2","v3"],ete=["v4"],gR={zero:0,one:1,two:2,few:3,many:4,other:5};function tte(){const e={};return Xee.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Jee[t.fc]}})}),e}class nte{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Yo.create("pluralResolver"),(!this.options.compatibilityJSON||ete.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=tte()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(sg(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>gR[i]-gR[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!Zee.includes(this.options.compatibilityJSON)}}function vR(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Gee(e,t,n);return!o&&i&&typeof n=="string"&&(o=W1(e,n,r),o===void 0&&(o=W1(t,n,r))),o}class rte{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yo.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:m,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:E,maxReplaces:b,alwaysFormat:w}=t.interpolation;this.escape=n!==void 0?n:Vee,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?xc(o):s||"{{",this.suffix=a?xc(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?xc(f):m||xc("$t("),this.nestingSuffix=h?xc(h):g||xc(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=b||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(h){return h.replace(/\$/g,"$$$$")}const u=h=>{if(h.indexOf(this.formatSeparator)<0){const w=vR(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:h}):w}const g=h.split(this.formatSeparator),E=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(vR(n,l,E,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:E})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>c(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?c(this.escape(h)):c(h)}].forEach(h=>{for(a=0;o=h.regex.exec(t);){const g=o[1].trim();if(s=u(g),s===void 0)if(typeof d=="function"){const b=d(t,o,i);s=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))s="";else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=dR(s));const E=h.safeValue(s);if(t=t.replace(o[0],E),f?(h.regex.lastIndex+=s.length,h.regex.lastIndex-=o[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;function a(l,c){const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const m=f.match(/'/g),h=f.match(/"/g);(m&&m.length%2===0&&!h||h.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=u.shift(),l=u,c=!0}if(o=n(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=dR(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),c&&(o=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}function ite(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(!s)return;const[a,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,"");n[a.trim()]||(n[a.trim()]=c),c==="false"&&(n[a.trim()]=!1),c==="true"&&(n[a.trim()]=!0),isNaN(c)||(n[a.trim()]=parseInt(c,10))})}return{formatName:t,formatOptions:n}}function Sc(e){const t={};return function(r,i,o){const s=i+JSON.stringify(o);let a=t[s];return a||(a=e(sg(i),o),t[s]=a),a(r)}}class ote{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yo.create("formatter"),this.options=t,this.formats={number:Sc((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Sc((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Sc((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Sc((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Sc((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Sc(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,l)=>{const{formatName:c,formatOptions:u}=ite(l);if(this.formats[c]){let d=a;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},m=f.locale||f.lng||i.locale||i.lng||r;d=this.formats[c](a,m,{...u,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}function ste(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class ate extends ty{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Yo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},a={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,u=!1,s[f]===void 0&&(s[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(a[c]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const a={};this.queue.forEach(l=>{Wee(l.loaded,[o],s),ste(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&i{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,i,l):u=c(t,n,r,i),u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}else c(t,n,r,i,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function yR(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function bR(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ch(){}function lte(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class Hf extends ty{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=bR(t),this.services={},this.logger=Yo,this.modules={external:[]},lte(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=yR();this.options={...i,...this.options,...bR(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(u){return u?typeof u=="function"?new u:u:null}if(!this.options.isClone){this.modules.logger?Yo.init(o(this.modules.logger),this.options):Yo.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=ote);const d=new mR(this.options);this.store=new pR(this.options.resources,this.options);const f=this.services;f.logger=Yo,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new nte(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new rte(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new ate(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var h=arguments.length,g=new Array(h>1?h-1:0),E=1;E1?h-1:0),E=1;E{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ch),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=Ed(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ch;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=Ed();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Ch),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&EI.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Ed();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{s(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const o=function(s,a){let l;if(typeof a!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${h}`):m=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,i.t(m,l)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=Ed();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Ed();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new mR(yR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Hf(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ch;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Hf(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new pR(this.store.data,i),o.services.resourceStore=o.store),o.translator=new ag(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function xR(e,t,n){e.loadNamespaces(t,RI(e,n))}function SR(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,RI(e,r))}function ute(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=t.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!i||s(o,e)))}function dte(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(G1("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,e))return!1}}):ute(e,t,n)}const fte=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,pte={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},hte=e=>pte[e],mte=e=>e.replace(fte,hte);let H1={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:mte};function gte(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};H1={...H1,...e}}function vte(){return H1}let PI;function yte(e){PI=e}function bte(){return PI}const wte={type:"3rdParty",init(e){gte(e.options.react),yte(e)}},xte=k.createContext();class Ste{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const _te=(e,t)=>{const n=k.useRef();return k.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function TI(e,t,n,r){return e.getFixedT(t,n,r)}function Cte(e,t,n,r){return k.useCallback(TI(e,t,n,r),[e,t,n,r])}function kte(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=k.useContext(xte)||{},o=n||r||bte();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Ste),!o){G1("You will need to pass in an i18next instance by using initReactI18next");const _=(T,C)=>typeof C=="string"?C:C&&typeof C=="object"&&typeof C.defaultValue=="string"?C.defaultValue:Array.isArray(T)?T[T.length-1]:T,R=[_,{},!1];return R.t=_,R.i18n={},R.ready=!1,R}o.options.react&&o.options.react.wait!==void 0&&G1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...vte(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=e||i||o.options&&o.options.defaultNS;c=typeof c=="string"?[c]:c||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(_=>dte(_,o,s)),d=Cte(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),f=()=>d,m=()=>TI(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),[h,g]=k.useState(f);let E=c.join();t.lng&&(E=`${t.lng}${E}`);const b=_te(E),w=k.useRef(!0);k.useEffect(()=>{const{bindI18n:_,bindI18nStore:R}=s;w.current=!0,!u&&!a&&(t.lng?SR(o,t.lng,c,()=>{w.current&&g(m)}):xR(o,c,()=>{w.current&&g(m)})),u&&b&&b!==E&&w.current&&g(m);function T(){w.current&&g(m)}return _&&o&&o.on(_,T),R&&o&&o.store.on(R,T),()=>{w.current=!1,_&&o&&_.split(" ").forEach(C=>o.off(C,T)),R&&o&&R.split(" ").forEach(C=>o.store.off(C,T))}},[o,E]),k.useEffect(()=>{w.current&&u&&g(f)},[o,l,u]);const y=[h,o,u];if(y.t=h,y.i18n=o,y.ready=u,u||!u&&!a)return y;throw new Promise(_=>{t.lng?SR(o,t.lng,c,()=>_()):xR(o,c,()=>_())})}function Ete(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var OI=[],Rte=OI.forEach,Pte=OI.slice;function Tte(e){return Rte.call(Pte.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var _R=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Ote=function(t,n,r){var i=r||{};i.path=i.path||"/";var o=encodeURIComponent(n),s="".concat(t,"=").concat(o);if(i.maxAge>0){var a=i.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(a))}if(i.domain){if(!_R.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(i.domain)}if(i.path){if(!_R.test(i.path))throw new TypeError("option path is invalid");s+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},CR={create:function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),i&&(o.domain=i),document.cookie=Ote(t,encodeURIComponent(n),o)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),o=i.split("&"),s=0;s0){var l=o[s].substring(0,a);l===t.lookupQuerystring&&(n=o[s].substring(a+1))}}}return n}},Rd=null,kR=function(){if(Rd!==null)return Rd;try{Rd=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Rd=!1}return Rd},Ite={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&kR()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&kR()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},Pd=null,ER=function(){if(Pd!==null)return Pd;try{Pd=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Pd=!1}return Pd},Mte={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&ER()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&ER()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},$te={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},Nte={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Ate={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},Dte={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function Bte(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var LI=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ete(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return Vs(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=Tte(r,this.options||{},Bte()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(o){return o.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Lte),this.addDetector(jte),this.addDetector(Ite),this.addDetector(Mte),this.addDetector($te),this.addDetector(Nte),this.addDetector(Ate),this.addDetector(Dte)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(o){if(r.detectors[o]){var s=r.detectors[o].lookup(r.options);s&&typeof s=="string"&&(s=[s]),s&&(i=i.concat(s))}}),i=i.map(function(o){return r.options.convertDetectedLanguage(o)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(o){i.detectors[o]&&i.detectors[o].cacheUserLanguage(n,i.options)}))}}]),e}();LI.type="languageDetector";pr.use(LI).use(wte).init({fallbackLng:"en",resources:{en:{translation:{"Guild Ball":"Guild Ball"}},fr:{translation:{"Guild Ball":"Guild Ball"}}},debug:!1,interpolation:{escapeValue:!1}});const jI=k.createContext({manifest:void 0,version:0,gameplans:void 0}),RR="gbdata_meta";let W0=!1;async function Fte(e,t,n,r){var i;if(W0){console.error("concurent reloads");return}console.log(`loading ${t}`),W0=!0;try{const o=(i=n.datafiles.find(a=>a.filename===t))==null?void 0:i.sha256,s=await on.getLocal(RR);if(s&&s.get("filename")===t&&s.get("sha256")===o){console.log("database pre-loaded :)");return}console.log("database re-loading :("),await Promise.all([on.guilds.find().exec().then(a=>on.guilds.bulkRemove(a.map(l=>l.name))).then(()=>on.guilds.bulkInsert(r.Guilds)).then(a=>{if(a.error.length!==0)throw"error loading Guilds"}).catch(console.error),on.models.find().exec().then(a=>on.models.bulkRemove(a.map(l=>l.id))).then(()=>on.models.bulkInsert(r.Models)).then(a=>{if(a.error.length!==0)throw"error loading Models"}).catch(console.error),on.character_plays.find().exec().then(a=>on.character_plays.bulkRemove(a.map(l=>l.name))).then(()=>on.character_plays.bulkInsert(r["Character Plays"])).then(a=>{if(a.error.length!==0)throw"error loading Character Plays"}).catch(console.error),on.character_traits.find().exec().then(a=>on.character_traits.bulkRemove(a.map(l=>l.name))).then(()=>on.character_traits.bulkInsert(r["Character Traits"])).then(a=>{if(a.error.length!==0)throw"error loading Character Traits"}).catch(console.error)]).then(()=>on.upsertLocal(RR,{version:e,filename:t,sha256:o})).then(()=>console.log("database re-load complete :|")).catch(console.error)}finally{W0=!1}}const zte=({children:e})=>{const[t,n]=k.useState(void 0),[r,i]=k.useState(void 0),[o,s]=k.useState(0),[a,l]=k.useState(),{setting$:c}=ai(),[u,d]=k.useState(),[f,m]=k.useState(),[h,g]=k.useState(),[E,b]=k.useState();return k.useEffect(()=>{const w=c==null?void 0:c.subscribe(y=>{const{dataSet:_,language:R,mostRecentErrata:T}=(y==null?void 0:y.toJSON().data)??{};d(_??null),R=="auto"?b(pr.resolvedLanguage??null):b(R??null),m(T??null)});return()=>{w==null||w.unsubscribe()}},[c]),k.useEffect(()=>{if(u===void 0||f===void 0)return;let w=!1;return(async()=>{var A;const _=await Ute();if(w)return;n(_);const R=_.datafiles[0].filename;let T;if(u&&f===R)T=u;else{T=R;const j=await(on==null?void 0:on.getLocal("settings"));if(w)return;j==null||j.incrementalPatch({dataSet:T,mostRecentErrata:R})}const C=_.datafiles.find(j=>j.filename===T),I=C.version;s(I),E&&((A=C.translations)!=null&&A[E])&&(console.log(`using translated data set (${E})`),T=C.translations[E].filename),g(T)})(),()=>{w=!0}},[u,E,f]),k.useEffect(()=>{if(!h||!t)return;let w=!1;return(async()=>{const _=await PR(h);w||(l(void 0),await Fte(o,h,t,_).then(()=>l(on)),i(await PR("gameplans.json")))})(),()=>{w=!0}},[o,h,t]),v.jsx(jI.Provider,{value:{version:o,manifest:t,gameplans:r,gbdb:a},children:e})},Ute=async()=>await fetch("data/manifest.json",{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(t){return t.json()}),PR=async e=>await fetch(`data/${e}`,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(function(n){return n.json()}),Vr=()=>k.useContext(jI);function Ys(){const{gbdb:e}=Vr(),[t,n]=k.useState(),[r,i]=k.useState(),o=k.useMemo(()=>e==null?void 0:e.game_state.getLocal$("network"),[e]);return k.useEffect(()=>{if(!o)return;const s=o.subscribe(a=>{a&&!a.deleted?(i(a),n(!0)):(i(void 0),n(!1))});return()=>s.unsubscribe()},[o]),{active:t,netDoc:r}}const II=typeof window>"u"?k.useEffect:k.useLayoutEffect;function Wte(e,t=!1){const n=t?II:k.useEffect,r=k.useRef(e);return n(()=>{r.current=e}),r}const Gte=()=>{};function Hte(e){k.useEffect(()=>{typeof e=="function"&&e()},[])}const Vte={attributes:!0,characterData:!0,childList:!0,subtree:!0};function ny(e,t=Vte){const[n,r]=k.useState(null);return k.useEffect(()=>{if(n){const o=new MutationObserver(e);return o.observe(n,t),()=>{o.disconnect()}}return Gte},[n,e,t]),[k.useCallback(o=>{r(o)},[])]}function Kte(e){k.useEffect(()=>e,[])}function qte(e,t){const n=k.useRef(!1),r=k.useMemo(()=>typeof t<"u"&&!Array.isArray(t)?[t]:(Array.isArray(t)&&t.length===0&&console.warn("Using [] as the second argument makes useDidUpdate a noop. The second argument should either be `undefined` or an array of length greater than 0."),t),[t]);k.useEffect(()=>{n.current&&e()},r),Hte(()=>{n.current=!0}),Kte(()=>{n.current=!1})}function Yte(e){const t=Wte(e);function n(...r){typeof t.current=="function"&&t.current(...r)}return n}function MI(e,t,n,r={},i=!0,o=!1){const s=Yte(n);(o?II:k.useEffect)(()=>typeof e<"u"&&i?(e.addEventListener(t,s,r),()=>{e.removeEventListener(t,s,r)}):()=>{},[t,r])}function Qte(e,t=!0,n=!1){MI(ET.window,"resize",e,{passive:!0},t,n)}function Xte(e,t=!0,n=!1){MI(ET.window,"scroll",e,{passive:!0},t,n)}const Jte=e=>{const t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width,x:t.left,y:t.top}},Zte=[void 0,null,null],ene=({updateOnScroll:e=!0,updateOnResize:t=!0}={})=>{const[n,r]=k.useState(null),[i,o]=k.useState(null),s=k.useCallback(l=>{o(l)},[]),a=k.useCallback(()=>{window.requestAnimationFrame(()=>{i&&r(Jte(i))})},[i]);return k.useLayoutEffect(()=>{a()},[a]),Qte(()=>{a()},t,!0),Xte(()=>{a()},e,!0),typeof window>"u"?(console.warn("useDimensionsRef: window is undefined."),Zte):[s,n,i]},tne="/assets/playbook-symbol-defs-Dz3QsL1K.svg",nne="/assets/gb-symbol-defs-DvUA8_44.svg";function Ci(e){const{icon:t,size:n,style:r,className:i,...o}=e,s={...r||{},...n?{width:n,height:n}:{},...r&&r.height?{fontSize:r.height}:{}};return v.jsx("svg",{className:`gbicon gbicon-${t} ${i||""}`,style:s,...o,children:v.jsx("use",{href:`${nne}#gbicon-${t}`})})}function $I(e){const{icon:t,size:n,style:r}=e,i=t.replace(//g,"P"),o={...n?{width:n,height:n}:{},...r&&r.height?{fontSize:r.height}:{},...e.style||{}};return v.jsx("svg",{className:`pbicon pbicon-${i}`,style:o,...e,children:v.jsx("use",{href:`${tne}#pbicon-${i}`})})}function rne(e){const{gbdb:t}=Vr(),[n,r]=k.useState();return k.useEffect(()=>{if(!t||!e)return;const i=e(t).$.subscribe(o=>{r(o)});return()=>{i.unsubscribe()}},[t,e]),n}function io(e,t){const{gbdb:n}=Vr(),r=k.useCallback(e,t??[]),[i,o]=k.useState();return k.useEffect(()=>{let s=!1;return n?((async()=>{const l=await r(n);s||o(l)})().catch(console.error),()=>{s=!0}):void 0},[n,r,o]),i}function ine(e,t){return e.reduce((n,r)=>t(n)>=t(r)?n:r)}function one({width:e,height:t},n,r=0){if(!e||!t)return;const i=(o,s)=>{const a=(e-o*10)/o,l=(t-s*10-5)/s,c=Math.min(a,l),u=(a-c)/2;return{w:a,h:l,size:c,margin:u,wx:o,hx:s}};return ine(Array.from({length:n},(o,s)=>s+1).map(o=>i(o,Math.ceil(n/o)+r)),o=>o.size)}function NI({Controller:e}){const[t,n]=ene(),r=io(async a=>{var c;if(!n)return;const l=await a.guilds.count().exec();return((c=one(n,l,1))==null?void 0:c.size)??0},[n])??0,i=k.useMemo(()=>new Set,[]),o=rj(a=>i.add(a),a=>i.delete(a)),s=k.useCallback(a=>{i.forEach(l=>l(a))},[i]);return v.jsxs("div",{ref:t,style:{display:"flex",flexDirection:"column",height:"100%",alignContent:"flex-start",justifyContent:"space-evenly"},children:[v.jsx(sne,{size:r,pickTeam:s}),v.jsx(Zo,{}),v.jsx(e,{size:r,update$:o})]})}const sne=Pt.memo(e=>{const{pickTeam:t,size:n}=e,r=rne(k.useCallback(o=>o.guilds.find(),[]));if(!r)return null;const i=r.map(o=>({key:o.name,name:o.name,icon:o.name}));return v.jsx("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-start",justifyContent:"space-evenly",gap:"10px",padding:"5px",overflow:"clip"},children:i.map((o,s)=>v.jsx(V1,{g:o,pickTeam:t,size:n},s))})});function V1(e){const{g:t,pickTeam:n,size:r}=e;return v.jsxs(yn,{variant:"outlined",onClick:()=>n==null?void 0:n(t.key),style:{display:"flex",flexDirection:"column",minWidth:r,minHeight:r,maxWidth:r,maxHeight:r,background:"rgba(100%, 100%, 100%, 5%)"},sx:{"@media (hover: hover)":{"& > div":{transition:"transform .25s"},"&:hover > div":{transform:"scale(1.2)"}}},children:[v.jsx("div",{style:{display:"flex",placeContent:"center",placeItems:"center",fontSize:r*.7,width:"1em",height:"1em",borderRadius:"50%",padding:"0.0625em",background:"content-box linear-gradient(to bottom, #000, #333)"},children:v.jsx(Ci,{icon:t.icon,className:"dark",style:{flexShrink:0,filter:"drop-shadow(0 0 0.03em black)",...t.style||{}}})}),v.jsx(wt,{variant:"caption",style:{color:"whitesmoke",textTransform:"capitalize",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",zIndex:1},children:t.name})]},t.key)}var AI={exports:{}},DI={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},BI={exports:{}},ane=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},lne=ane,cne=Array.prototype.concat,une=Array.prototype.slice,TR=BI.exports=function(t){for(var n=[],r=0,i=t.length;r=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};bi.to.keyword=function(e){return zI[e.slice(0,3)]};function Ma(e,t,n){return Math.min(Math.max(t,e),n)}function kh(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var fne=AI.exports;const Vf=DI,UI={};for(const e of Object.keys(Vf))UI[Vf[e]]=e;const st={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var WI=st;for(const e of Object.keys(st)){if(!("channels"in st[e]))throw new Error("missing channels property: "+e);if(!("labels"in st[e]))throw new Error("missing channel labels property: "+e);if(st[e].labels.length!==st[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=st[e];delete st[e].channels,delete st[e].labels,Object.defineProperty(st[e],"channels",{value:t}),Object.defineProperty(st[e],"labels",{value:n})}st.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=o-i;let a,l;o===i?a=0:t===o?a=(n-r)/s:n===o?a=2+(r-t)/s:r===o&&(a=4+(t-n)/s),a=Math.min(a*60,360),a<0&&(a+=360);const c=(i+o)/2;return o===i?l=0:c<=.5?l=s/(o+i):l=s/(2-o-i),[a,l*100,c*100]};st.rgb.hsv=function(e){let t,n,r,i,o;const s=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(s,a,l),u=c-Math.min(s,a,l),d=function(f){return(c-f)/6/u+1/2};return u===0?(i=0,o=0):(o=u/c,t=d(s),n=d(a),r=d(l),s===c?i=r-n:a===c?i=1/3+t-r:l===c&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,c*100]};st.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=st.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,o*100,r*100]};st.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),o=(1-t-i)/(1-i)||0,s=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function pne(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}st.rgb.keyword=function(e){const t=UI[e];if(t)return t;let n=1/0,r;for(const i of Object.keys(Vf)){const o=Vf[i],s=pne(e,o);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[i*100,o*100,s*100]};st.rgb.lab=function(e){const t=st.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,s=500*(n-r),a=200*(r-i);return[o,s,a]};st.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?i=r*(1+n):i=r+n-r*n;const a=2*r-i,l=[0,0,0];for(let c=0;c<3;c++)o=t+1/3*-(c-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,l[c]=s*255;return l};st.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const s=(r+n)/2,a=r===0?2*i/(o+i):2*n/(r+n);return[t,a*100,s*100]};st.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),a=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,s];case 1:return[a,r,s];case 2:return[s,r,l];case 3:return[s,a,r];case 4:return[l,s,r];case 5:return[r,s,a]}};st.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[t,o*100,s*100]};st.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*t),a=1-r;o=6*t-s,s&1&&(o=1-o);const l=n+o*(a-n);let c,u,d;switch(s){default:case 6:case 0:c=a,u=l,d=n;break;case 1:c=l,u=a,d=n;break;case 2:c=n,u=a,d=l;break;case 3:c=n,u=l,d=a;break;case 4:c=l,u=n,d=a;break;case 5:c=a,u=n,d=l;break}return[c*255,u*255,d*255]};st.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[o*255,s*255,a*255]};st.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,o,s;return i=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};st.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(t-n),s=200*(n-r);return[i,o,s]};st.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let i,o,s;o=(t+16)/116,i=n/500+o,s=o-r/200;const a=o**3,l=i**3,c=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};st.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(n*n+r*r);return[t,s,i]};st.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI,o=n*Math.cos(i),s=n*Math.sin(i);return[t,o,s]};st.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?st.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s};st.hsv.ansi16=function(e){return st.rgb.ansi16(st.hsv.rgb(e),e[2])};st.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};st.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,i,o]};st.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};st.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};st.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(a=>a+a).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,s=r&255;return[i,o,s]};st.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),s=i-o;let a,l;return s<1?a=o/(1-s):a=0,s<=0?l=0:i===t?l=(n-r)/s%6:i===n?l=2+(r-t)/s:l=4+(t-n)/s,l/=6,l%=1,[l*360,s*100,a*100]};st.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};st.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};st.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=t%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};st.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};st.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};st.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};st.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,i=r-t;let o=0;return i<1&&(o=(r-i)/(1-i)),[e[0],i*100,o*100]};st.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};st.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};st.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};st.gray.hsl=function(e){return[0,0,e[0]]};st.gray.hsv=st.gray.hsl;st.gray.hwb=function(e){return[0,100,e[0]]};st.gray.cmyk=function(e){return[0,0,0,e[0]]};st.gray.lab=function(e){return[e[0],0,0]};st.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};st.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const lg=WI;function hne(){const e={},t=Object.keys(lg);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function Sne(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=e(n);if(typeof i=="object")for(let o=i.length,s=0;s{Mc[e]={},Object.defineProperty(Mc[e],"channels",{value:K1[e].channels}),Object.defineProperty(Mc[e],"labels",{value:K1[e].labels});const t=bne(e);Object.keys(t).forEach(r=>{const i=t[r];Mc[e][r]=Sne(i),Mc[e][r].raw=xne(i)})});var _ne=Mc;const $c=fne,gi=_ne,GI=["keyword","gray","hex"],q1={};for(const e of Object.keys(gi))q1[[...gi[e].labels].sort().join("")]=e;const cg={};function er(e,t){if(!(this instanceof er))return new er(e,t);if(t&&t in GI&&(t=null),t&&!(t in gi))throw new Error("Unknown model: "+t);let n,r;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof er)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=$c.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=gi[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=gi[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=Y1(i,r),this.valpha=typeof e[r]=="number"?e[r]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in q1))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=q1[o];const{labels:s}=gi[this.model],a=[];for(n=0;n(e%360+360)%360),saturationl:Rn("hsl",1,Kn(100)),lightness:Rn("hsl",2,Kn(100)),saturationv:Rn("hsv",1,Kn(100)),value:Rn("hsv",2,Kn(100)),chroma:Rn("hcg",1,Kn(100)),gray:Rn("hcg",2,Kn(100)),white:Rn("hwb",1,Kn(100)),wblack:Rn("hwb",2,Kn(100)),cyan:Rn("cmyk",0,Kn(100)),magenta:Rn("cmyk",1,Kn(100)),yellow:Rn("cmyk",2,Kn(100)),black:Rn("cmyk",3,Kn(100)),x:Rn("xyz",0,Kn(95.047)),y:Rn("xyz",1,Kn(100)),z:Rn("xyz",2,Kn(108.833)),l:Rn("lab",0,Kn(100)),a:Rn("lab",1),b:Rn("lab",2),keyword(e){return e!==void 0?new er(e):gi[this.model].keyword(this.color)},hex(e){return e!==void 0?new er(e):$c.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new er(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),$c.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const i=r/255;t[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return er.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,o=2*i-1,s=n.alpha()-r.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return er.rgb(a*n.red()+l*r.red(),a*n.green()+l*r.green(),a*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const e of Object.keys(gi)){if(GI.includes(e))continue;const{channels:t}=gi[e];er.prototype[e]=function(...n){return this.model===e?new er(this):n.length>0?new er(n,e):new er([...Ene(gi[this.model][e].raw(this.color)),this.valpha],e)},er[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=Y1(n,t)),new er(r,e)}}function Cne(e,t){return Number(e.toFixed(t))}function kne(e){return function(t){return Cne(t,e)}}function Rn(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(cg[r]||(cg[r]=[]))[t]=n;return e=e[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[e](),i.color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function Kn(e){return function(t){return Math.max(0,Math.min(e,t))}}function Ene(e){return Array.isArray(e)?e:[e]}function Y1(e,t){for(let n=0;n{const{version:e}=Vr();return v.jsxs(wt,{sx:{position:"absolute",bottom:0,right:0,color:"text.disabled"},children:["[",e,"]"]})},Pne=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function qf(e){return typeof e=="string"&&Pne.test(e)}function ug(e){if(!qf(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}var or=[];for(var H0=0;H0<256;++H0)or.push((H0+256).toString(16).slice(1));function Tne(e,t=0){return(or[e[t+0]]+or[e[t+1]]+or[e[t+2]]+or[e[t+3]]+"-"+or[e[t+4]]+or[e[t+5]]+"-"+or[e[t+6]]+or[e[t+7]]+"-"+or[e[t+8]]+or[e[t+9]]+"-"+or[e[t+10]]+or[e[t+11]]+or[e[t+12]]+or[e[t+13]]+or[e[t+14]]+or[e[t+15]]).toLowerCase()}var Eh,One=new Uint8Array(16);function Lne(){if(!Eh&&(Eh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Eh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Eh(One)}var jne=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const OR={randomUUID:jne};function HI(e,t,n){if(OR.randomUUID&&!t&&!e)return OR.randomUUID();e=e||{};var r=e.random||(e.rng||Lne)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Tne(r)}var Ine={VITE_NAME:"gb-playbook",VITE_VERSION:"2.1.0",VITE_METERED_USERNAME:"25ee3bdfcc273a8e3ae9db71",VITE_METERED_PASSWORD:"XVIpxKTNnMR7XQDK",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Cp=Ine.VITE_SIGNALING_URL??"wss://gbplaybook-webrtc-server.onrender.com";let _s;function OS(e){return e.game_state.find().exec().then(t=>e.game_state.bulkRemove(t.map(n=>n._id))).catch(console.error)}let V0=!1;function ry(e){return async(...t)=>{if(V0)throw"concurent network change";V0=!0;try{await e(...t)}finally{V0=!1}}}const Mne=ry(async(e,t)=>{try{const n=await Gne();console.log(`# join code is ${n}`),t(n);const{uid:r,oid:i,gid:o}=await Vne();await OS(e),console.log("# starting new network game"),_s=await RS(Cp,o),await e.game_state.insertLocal("network",{uid:r,oid:i,gid:o})}finally{kp()}}),$ne=ry(async(e,t)=>{try{const{uid:n,oid:r,gid:i}=await Hne(t);await OS(e),console.log("# joining a network game"),_s=await RS(Cp,i),await e.game_state.insertLocal("network",{uid:n,oid:r,gid:i})}finally{kp()}}),Nne=ry(async e=>{const t=await e.game_state.getLocal("network"),n=t==null?void 0:t.get("gid");n&&_s===void 0&&(console.log("# reconnecting to a network game"),_s=await RS(Cp,n))}),Ane=ry(async e=>{console.log("# leaving a network game"),await(_s==null?void 0:_s.cancel().catch(console.error).finally(()=>{_s=void 0})),await OS(e).catch(console.error),await e.game_state.getLocal("network").then(t=>t==null?void 0:t.remove()).catch(console.error)});function LS({allowNew:e=!1}){const{gbdb:t}=Vr(),[n,r]=k.useState(!1),{active:i}=Ys();k.useEffect(()=>{t&&i&&!_s&&Nne(t)},[t,i]);const[o,s]=k.useState("default");if(k.useEffect(()=>{s(i?"success":"default")},[i]),!!t)return v.jsxs(v.Fragment,{children:[v.jsx(Lo,{size:"small",color:o,disabled:!e&&!i,onClick:()=>r(!0),children:v.jsx(Nee,{})}),v.jsxs(ZG,{open:n,onClose:()=>r(!1),children:[v.jsx(p7,{children:"Network Game Setup"}),v.jsx(l7,{children:v.jsx(Wne,{allowNew:e,close:()=>{r(!1)}})})]})]})}const Dne=e=>{const{setActiveStep:t}=e;return v.jsxs(Zt,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(yn,{variant:"contained",onClick:()=>t("Start"),children:"Start a Game"}),v.jsx(yn,{variant:"contained",onClick:()=>t("Join"),children:"Join a Game"})]})},Bne=e=>{const{setActiveStep:t}=e,{gbdb:n}=Vr(),[r,i]=k.useState();return k.useEffect(()=>{n&&Mne(n,i).then(()=>{t("Ready")}).catch(o=>{console.error(o),t("New")})},[n,t]),v.jsxs(Zt,{sx:{display:"flex",flexDirection:"column",gap:"1em",alignItems:"center"},children:[v.jsx(wt,{children:"Share this join code:"}),v.jsx(wt,{variant:"h3",children:r==null?void 0:r.toString().padStart(4,"0")}),v.jsx(wt,{children:"Waiting for opponent to connect."}),v.jsx(yn,{variant:"contained",onClick:()=>{kp(),e.setActiveStep("New")},children:"Cancel"})]})},Fne=e=>{const{setActiveStep:t}=e,{gbdb:n}=Vr(),[r,i]=k.useState(),[o,s]=k.useState(!1);if(n)return v.jsxs(Zt,{sx:{display:"flex",flexDirection:"column",gap:"1em"},children:[v.jsx(aK,{sx:{margin:"1em"},label:"game join code",variant:"outlined",disabled:o,inputProps:{pattern:"[0-9]*",inputMode:"numeric"},onChange:a=>i(Number(a.target.value))}),v.jsx(yn,{variant:"contained",disabled:!r||o,onClick:()=>{s(!0),$ne(n,r??0).then(()=>t("Ready")).then(()=>s(!1)).catch(a=>{console.error(a),t("New")})},children:"Join a Game"}),v.jsx(yn,{variant:"contained",onClick:()=>{kp(),s(!1),t("New")},children:"Cancel"})]})},zne=e=>{const{setActiveStep:t}=e,{gbdb:n}=Vr(),r=Ha(),{setting$:i}=ai();if(n)return v.jsxs(Um,{spacing:2,alignItems:"center",children:[v.jsx(wt,{variant:"h6",children:"Connected"}),v.jsxs(Um,{direction:"row",spacing:2,children:[v.jsx(yn,{variant:"contained",onClick:()=>Ane(n).then(()=>t("New")).then(()=>i&&$n(i)).then(o=>o==null?void 0:o.incrementalPatch({gamePlayRoute:void 0})).then(()=>{r("/",{})}).catch(console.error),children:"Leave Game"}),v.jsx(yn,{color:"success",variant:"contained",onClick:()=>{var o;(o=e.close)==null||o.call(e)},children:"Continue"})]})]})},Une=()=>v.jsx(wt,{children:"Network Games must be started from the inital guild selection screen."});function Wne({allowNew:e=!1,close:t}){const{active:n}=Ys(),[r,i]=k.useState(e?"New":"Block");return k.useEffect(()=>{n&&i("Ready")},[n]),k.useEffect(()=>()=>{kp()},[]),v.jsxs(Zt,{children:[r==="New"&&v.jsx(Dne,{setActiveStep:i}),r==="Start"&&v.jsx(Bne,{setActiveStep:i}),r==="Join"&&v.jsx(Fne,{setActiveStep:i}),r==="Ready"&&v.jsx(zne,{setActiveStep:i,close:t}),r==="Block"&&v.jsx(Une,{})]})}let Jt;function Gne(){return new Promise((e,t)=>{Jt=new WebSocket(Cp),Jt.onopen=()=>{Jt==null||Jt.send(JSON.stringify({type:"handshake-begin"}))},Jt.onclose=()=>{t("socket closed")},Jt.onerror=n=>{t(n)},Jt.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-response":Jt&&(Jt.onmessage=null),e(r.code);break}}})}function Hne(e){return new Promise((t,n)=>{if(!e){n("Invalid Arguments (id undefined)");return}Jt=new WebSocket(Cp),Jt.onopen=()=>{Jt==null||Jt.send(JSON.stringify({type:"handshake-join",code:e}))},Jt.onclose=()=>{n("socket closed")},Jt.onerror=r=>{n(r)},Jt.onmessage=r=>{const i=JSON.parse(r.data);switch(i.type){case"handshake-complete":{const o=i.yourId;if(!qf(o)){n(`invalid uID ${o}`);return}const s=i.otherId;if(!qf(s)){n(`invalid oID ${s}`);return}const a=ug(o),l=ug(s),c=a.map((d,f)=>d^l[f]),u=HI({random:c});t({uid:o,oid:s,gid:u})}break}}})}function Vne(){return new Promise((e,t)=>{if((Jt==null?void 0:Jt.readyState)!==1){t("socket closed");return}Jt.onclose=()=>{t("socket closed")},Jt.onerror=n=>{t(n)},Jt.onmessage=n=>{const r=JSON.parse(n.data);switch(r.type){case"handshake-complete":{const i=r.yourId;if(!qf(i)){t(`invalid uID ${i}`);return}const o=r.otherId;if(!qf(o)){t(`invalid oID ${o}`);return}const s=ug(i),a=ug(o),l=s.map((u,d)=>u^a[d]),c=HI({random:l});e({uid:i,oid:o,gid:c})}break}}})}function kp(){Jt==null||Jt.close(),Jt=void 0}function iy(){return tp()}var jS={},Kne=eo;Object.defineProperty(jS,"__esModule",{value:!0});var VI=jS.default=void 0,qne=Kne(as()),Yne=v;VI=jS.default=(0,qne.default)((0,Yne.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");function Qne(e){switch(e){case"Guilds":return"/game";case"Draft":return"/game/draft";case"Game":return"/game/draft/play"}}function KI(e){const t=Ha(),{gameState1$:n,gameState2$:r}=iy(),{active:i}=Ys(),[o,s]=k.useState(),[a,l]=k.useState(),[c,u]=k.useState(!1),{dest:d,onAction:f,...m}=e;return k.useEffect(()=>{const h=n==null?void 0:n.pipe(qt(E=>E==null?void 0:E.navigateTo)).subscribe(E=>s(E)),g=r==null?void 0:r.pipe(qt(E=>E==null?void 0:E.navigateTo)).subscribe(E=>l(E));return()=>{h==null||h.unsubscribe(),g==null||g.unsubscribe()}},[n,r]),k.useEffect(()=>{const h=async()=>{await $n(n).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),i||await $n(r).then(g=>{g==null||g.incrementalPatch({navigateTo:void 0}).catch(console.error)}),t(Qne(d))};o==d&&a===d&&h()},[n,r,d,o,a,i,t,f]),k.useEffect(()=>{u(a===d)},[d,a]),v.jsx(w7,{className:c?"fabAnimate":void 0,...m,color:"secondary",onClick:()=>{f==null||f(),$n(n).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)}),i||$n(r).then(h=>{h==null||h.incrementalPatch({navigateTo:d}).catch(console.error)})},children:v.jsx(VI,{fontSize:"large",sx:{zIndex:10}})})}function LR({team:e,size:t}){const n=io(r=>r.guilds.findOne().where({name:e}).exec(),[e]);return n?v.jsxs("div",{style:{position:"absolute",width:"100%",height:"100%",display:"flex",placeContent:"center",placeItems:"center",overflow:"hidden",zIndex:-1,backgroundColor:Kf(n.shadow??n.darkColor??n.color).darken(.25).desaturate(.25).string()},children:[v.jsx(Ci,{icon:e,fontSize:t,style:{color:"rgba(0, 0, 0, 60%)",flexShrink:0}}),v.jsx(wt,{variant:"caption",style:{position:"absolute",color:"whitesmoke",textShadow:"1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black, -1px 0 1px black",textTransform:"capitalize"},children:e})]}):null}function Xne(e){const[t,n]=k.useState("P1"),[r,i]=k.useState(),[o,s]=k.useState(),[a,l]=k.useState(!1),c=Pi(),{active:u}=Ys(),{gameState1$:d,gameState2$:f}=iy(),[m,h]=k.useState();k.useEffect(()=>{i(void 0),n("P1");const w=d==null?void 0:d.subscribe(y=>h(y));return()=>w==null?void 0:w.unsubscribe()},[d]);const[g,E]=k.useState();k.useEffect(()=>{s(void 0),n("P1");const w=f==null?void 0:f.subscribe(y=>E(y));return()=>w==null?void 0:w.unsubscribe()},[f]),k.useEffect(()=>{const w=m==null?void 0:m.get$("guild").subscribe(y=>i(y));return()=>w==null?void 0:w.unsubscribe()},[m]),k.useEffect(()=>{const w=g==null?void 0:g.get$("guild").subscribe(y=>s(y));return()=>w==null?void 0:w.unsubscribe()},[g]);const b=k.useCallback(async w=>{w&&(t==="P1"?(await(m==null?void 0:m.incrementalPatch({guild:w,roster:[]}).catch(console.error)),n(!o&&!u?"P2":"GO")):t==="P2"&&(await(g==null?void 0:g.incrementalPatch({guild:w,roster:[]}).catch(console.error)),n(r?"GO":"P1")))},[t,r,o,m,g,u]);return k.useEffect(()=>{const w=e.update$.subscribe(y=>b(y));return()=>w.unsubscribe()},[e.update$,b]),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",margin:"5px",gap:"5px"},children:[v.jsx(yn,{variant:"outlined",style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P1"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>n("P1"),children:r?v.jsx(LR,{team:r,size:e.size}):"P1"}),v.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.25em"},children:[v.jsx(wt,{variant:"caption",children:"vs"}),v.jsx(KI,{dest:"Draft",disabled:!r||!o,onAction:()=>l(!0),sx:{m:"0 15px"}}),v.jsx(wt,{variant:"caption",children:a?"(waiting)":" "})]}),v.jsx(yn,{variant:"outlined",disabled:u,style:{minWidth:e.size,maxWidth:e.size,minHeight:e.size,maxHeight:e.size,fontSize:e.size*.5,...t==="P2"?{borderColor:c.palette.secondary.light,borderRadius:"12px",borderWidth:"4px"}:{borderColor:c.palette.primary.dark,borderRadius:"12px",borderWidth:"4px"}},onClick:()=>n("P2"),children:o?v.jsx(LR,{team:o,size:e.size}):"P2"})]})}function Jne(){return v.jsxs(Zt,{sx:{width:"100%",height:"100%",position:"relative"},children:[v.jsx(ls,{children:v.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"},children:[v.jsx(qa,{separator:v.jsx(ic,{fontSize:"small"}),children:v.jsx(Lo,{size:"small",disabled:!0,children:v.jsx(TS,{sx:{color:"text.secondary"}})})}),v.jsx(LS,{allowNew:!0})]})}),v.jsx(NI,{Controller:Xne}),v.jsx(oc,{})]})}var dg={exports:{}};dg.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",f="[object Map]",m="[object Number]",h="[object Object]",g="[object Promise]",E="[object RegExp]",b="[object Set]",w="[object String]",y="[object Symbol]",_="[object WeakMap]",R="[object ArrayBuffer]",T="[object DataView]",C="[object Float32Array]",I="[object Float64Array]",A="[object Int8Array]",j="[object Int16Array]",$="[object Int32Array]",F="[object Uint8Array]",z="[object Uint8ClampedArray]",Y="[object Uint16Array]",J="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,pe=/\w*$/,G=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,le={};le[o]=le[s]=le[R]=le[T]=le[a]=le[l]=le[C]=le[I]=le[A]=le[j]=le[$]=le[f]=le[m]=le[h]=le[E]=le[b]=le[w]=le[y]=le[F]=le[z]=le[Y]=le[J]=!0,le[c]=le[u]=le[_]=!1;var Le=typeof Cr=="object"&&Cr&&Cr.Object===Object&&Cr,Ge=typeof self=="object"&&self&&self.Object===Object&&self,Te=Le||Ge||Function("return this")(),Ce=t&&!t.nodeType&&t,He=Ce&&!0&&e&&!e.nodeType&&e,Re=He&&He.exports===Ce;function et(U,he){return U.set(he[0],he[1]),U}function lt(U,he){return U.add(he),U}function Pe(U,he){for(var Se=-1,it=U?U.length:0;++Se-1}function Jn(U,he){var Se=this.__data__,it=ji(Se,U);return it<0?Se.push([U,he]):Se[it][1]=he,this}Lt.prototype.clear=mt,Lt.prototype.delete=jt,Lt.prototype.get=Gt,Lt.prototype.has=Hn,Lt.prototype.set=Jn;function rr(U){var he=-1,Se=U?U.length:0;for(this.clear();++he-1&&U%1==0&&U-1&&U%1==0&&U<=i}function tl(U){var he=typeof U;return!!U&&(he=="object"||he=="function")}function td(U){return!!U&&typeof U=="object"}function ds(U){return cc(U)?Qs(U):Lp(U)}function nd(){return[]}function Ip(){return!1}e.exports=Fn})(dg,dg.exports);var Zne=dg.exports;const qI=za(Zne);var IS={},ere=eo;Object.defineProperty(IS,"__esModule",{value:!0});var YI=IS.default=void 0,tre=ere(as()),nre=v;YI=IS.default=(0,tre.default)((0,nre.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonChecked");var MS={},rre=eo;Object.defineProperty(MS,"__esModule",{value:!0});var QI=MS.default=void 0,ire=rre(as()),ore=v;QI=MS.default=(0,ire.default)((0,ore.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonUnchecked");const $S=(e,t)=>{const n=Pt.useRef(null);return qte(()=>{var r;e&&((r=n.current)==null||r.animate({backgroundColor:["initial","red","initial"],boxShadow:["0 0 0px 0px transparent","0 0 0.25em 0.25em red","0 0 0.25em 0.25em transparent"]},500))},t),n};function Fs(e,t,n){return e.sort((r,i)=>{const o=n.findIndex(a=>a===r[t]),s=n.findIndex(a=>a===i[t]);return o-s})}function lf(e,t,n,r,i,o){let s=n;return i(t)&&(s+=r?1:-1,s===o?e.forEach(a=>{!a.selected&&i(a)&&(a.disabled+=1)}):s===o-1&&n===o&&e.forEach(a=>{!(a===t||a.selected)&&i(a)&&(a.disabled+=-1)})),s}function XI(e,t,n){e.forEach(r=>{r!==t&&r.name===t.name&&(r.disabled+=n?1:-1),(r.dehcneb===t.name||r.name===t.dehcneb)&&(r.disabled+=n?1:-1)})}function JI(e,t,n,r){if(t.dehcneb){const i=e.find(o=>o.benched&&o.name===t.dehcneb);i&&r(i,n)}}function _l({model:e,disabled:t=!1,stateDoc:n,updateCounts:r}){const[i,o]=k.useState(e.selected);k.useEffect(()=>{const l=n.get$("roster").pipe(qt(c=>c.map(u=>u.name).includes(e.id))).subscribe(c=>{o(c),c!==e.selected&&!e.benched&&r(e,c)});return()=>l==null?void 0:l.unsubscribe()},[n,e,r]);const s=$S(t,[i]);return v.jsx(Ko,{ref:s,label:e.id,control:v.jsx(Vo,{size:"small",checked:i,disabled:e.disabled>0||t,onChange:a=>{const l=a.target.checked;n.incrementalModify(c=>{if(l){const u=c.roster.concat({name:e.id,health:e.hp});c.roster=u}else{const u=c.roster.filter(d=>d.name!=e.id);c.roster=u}return c}).catch(console.error)},icon:v.jsx(QI,{}),checkedIcon:v.jsx(YI,{})})})}const ZI=ke(IW)(()=>({"& .MuiBadge-badge":{right:"2em",top:"2em"}})),la={3:{captain:1,mascot:0,squaddies:2},4:{captain:1,mascot:1,squaddies:2},6:{captain:1,mascot:1,squaddies:4}},jR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ai(),[a,l]=k.useState(6);k.useEffect(()=>{const w=s==null?void 0:s.pipe(qt(y=>y==null?void 0:y.toJSON().data.gameSize)).subscribe(y=>l(y??6));return()=>w==null?void 0:w.unsubscribe()},[s]);const c=k.useRef({captain:0,mascot:0,squaddieCount:0}),[,u]=k.useState(0),[d,f]=k.useState(!1),m=io(async w=>{const _=(await w.models.find().where("id").in(t.roster).exec()).map(R=>Object.assign(R.toMutableJSON(),{selected:!1,disabled:R.benched?1:0}));if(Fs(_,"id",t.roster),!i&&t.minor){const R=new Set(e.stateDoc.get("roster").map(T=>JSON.stringify(T)));_.forEach(T=>{(T.captain||T.mascot&&la[a].mascot>0)&&(R.add(JSON.stringify({name:T.id,health:T.hp})),T.disabled=1)}),e.stateDoc.incrementalModify(T=>(T.roster=Array.from(R).map(C=>JSON.parse(C)),T)).catch(console.error)}return la[a].mascot===0&&_.forEach(R=>{R.mascot&&(R.disabled=1)}),_},[t,a]),h=k.useCallback((w,y)=>{function _(j,$,F,z){return lf(j,$,F,z,Y=>!!Y.captain,la[a].captain)}function R(j,$,F,z){return lf(j,$,F,z,Y=>!!Y.mascot,la[a].mascot)}function T(j,$,F,z){return lf(j,$,F,z,Y=>!(Y.captain||Y.mascot),la[a].squaddies)}if(!m)return;w.selected=y;const C=_(m,w,c.current.captain,y);c.current.captain=C;const I=R(m,w,c.current.mascot,y);c.current.mascot=I;const A=T(m,w,c.current.squaddieCount,y);c.current.squaddieCount=A,XI(m,w,y),JI(m,w,y,(j,$)=>{i||(j.selected=$,e.stateDoc.incrementalModify(F=>{if($){const z=F.roster.concat({name:j.id,health:j.hp});F.roster=z}else{const z=F.roster.filter(Y=>Y.name!=j.id);F.roster=z}return F}))}),C===la[a].captain&&I===la[a].mascot&&A===la[a].squaddies?f(!0):f(!1),u(j=>j+1)},[e.stateDoc,m,a,i]);if(k.useEffect(()=>{if(d&&m){const w=qI(m.filter(y=>y.selected));n==null||n(w)}else r==null||r()},[d,t,m,n,r]),!m)return null;const g=m.filter(w=>w.captain),E=m.filter(w=>w.mascot&&!w.captain),b=m.filter(w=>!w.captain&&!w.mascot);return v.jsx(ZI,{badgeContent:d?v.jsx(CI,{color:"success"}):0,style:{overflow:"visible",...o},children:v.jsxs(rL,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Captains :"}),g.map(w=>v.jsx(_l,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id)),v.jsx("span",{children:"Mascots :"}),E.map(w=>v.jsx(_l,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Squaddies :"}),b.slice(0,b.length/2).map(w=>v.jsx(_l,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:" "}),b.slice(b.length/2).map(w=>v.jsx(_l,{model:w,stateDoc:e.stateDoc,updateCounts:h,disabled:i},w.id))]})]})})},Rh={3:{master:1,apprentice:2},4:{master:2,apprentice:2},6:{master:3,apprentice:3}},IR=e=>{const{guild:t,ready:n,unready:r,disabled:i=!1,style:o}=e,{setting$:s}=ai(),[a,l]=k.useState(6);k.useEffect(()=>{const b=s==null?void 0:s.pipe(qt(w=>w==null?void 0:w.toJSON().data.gameSize)).subscribe(w=>l(w??6));return()=>b==null?void 0:b.unsubscribe()},[s]);const c=k.useRef({masterCount:0,apprenticeCount:0}),[,u]=k.useState(0),[d,f]=k.useState(!1),m=io(async b=>{const y=(await b.models.find().where("id").in(t.roster).exec()).map(_=>Object.assign(_.toMutableJSON(),{selected:!1,disabled:_.benched?1:0}));return Fs(y,"id",t.roster),y},[t]),h=k.useCallback((b,w)=>{function y(C,I,A,j){return lf(C,I,A,j,$=>!!$.captain,Rh[a].master)}function _(C,I,A,j){return lf(C,I,A,j,$=>!$.captain,Rh[a].apprentice)}if(!m)return;b.selected=w;const R=y(m,b,c.current.masterCount,w);c.current.masterCount=R;const T=_(m,b,c.current.apprenticeCount,w);c.current.apprenticeCount=T,XI(m,b,w),JI(m,b,w,(C,I)=>{i||(C.selected=I,e.stateDoc.incrementalModify(A=>{if(I){const j=A.roster.concat({name:C.id,health:C.hp});A.roster=j}else{const j=A.roster.filter($=>$.name!=C.id);A.roster=j}return A}))}),R===Rh[a].master&&T===Rh[a].apprentice?f(!0):f(!1),u(C=>C+1)},[e.stateDoc,m,a,i]);if(k.useEffect(()=>{if(d&&m){const b=qI(m.filter(w=>w.selected));n==null||n(b)}else r==null||r()},[d,t,m,n,r]),!m)return null;const g=m.filter(b=>b.captain),E=m.filter(b=>!b.captain);return v.jsx(ZI,{badgeContent:d?v.jsx(CI,{color:"success"}):0,style:{overflow:"visible",...o},children:v.jsxs(rL,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",border:"4px solid",borderColor:t.darkColor??t.color,borderRadius:"1em",padding:"1ex",width:"100%",overflow:"visible"},children:[v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Masters :"}),g.map(b=>v.jsx(_l,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:"Apprentices :"}),E.slice(0,E.length/2).map(b=>v.jsx(_l,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]}),v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("span",{children:" "}),E.slice(E.length/2).map(b=>v.jsx(_l,{model:b,stateDoc:e.stateDoc,updateCounts:h,disabled:i},b.id))]})]})})};function sre(){const{active:e}=Ys();return v.jsxs(Zt,{className:"DraftScreen",children:[v.jsx(ls,{children:v.jsxs(Zt,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(qa,{separator:v.jsx(ic,{fontSize:"small"}),children:[v.jsx(Lo,{color:"inherit",href:"/game",size:"small",disabled:e,children:v.jsx(TS,{})}),v.jsx(wt,{children:"Draft"})]}),v.jsxs("div",{children:[v.jsx(lre,{}),v.jsx(LS,{})]})]})}),v.jsx(are,{}),v.jsx(oc,{})]})}function are(){const{setting$:e}=ai(),t=Ha(),[n,r]=k.useState(),[i,o]=k.useState(),s=k.useCallback(C=>r(C),[]),a=k.useCallback(C=>o(C),[]),l=k.useCallback(()=>r(void 0),[]),c=k.useCallback(()=>o(void 0),[]),[u,d]=k.useState();k.useEffect(()=>{const C=e==null?void 0:e.pipe(qt(I=>I==null?void 0:I.toJSON().data.gameSize)).subscribe(I=>d(I));return()=>C==null?void 0:C.unsubscribe()},[e]);const{active:f}=Ys(),{gameState1$:m,gameState2$:h}=iy(),[g,E]=k.useState();k.useEffect(()=>{if(!m)return;let C=!1;return(async()=>{const A=await $n(m);C||E(A)})(),()=>{C=!0}},[m]);const[b,w]=k.useState();k.useEffect(()=>{if(!h)return;let C=!1;return(async()=>{const A=await $n(h);C||w(A)})(),()=>{C=!0}},[h]);const[y,_]=io(async C=>{const I=g==null?void 0:g.guild,A=b==null?void 0:b.guild;if(!I||!A)return;const[j,$]=await Promise.all([C.guilds.findOne().where({name:I}).exec(),C.guilds.findOne().where({name:A}).exec()]);if(!j||!$){t("/game");return}return[j,$]},[g,b,t])??[];if(!y||!_||!g||!b)return null;const R=y.name==="Blacksmiths"?IR:jR,T=_.name==="Blacksmiths"?IR:jR;return v.jsxs(v.Fragment,{children:[v.jsx(R,{guild:y,stateDoc:g,ready:s,unready:l,style:{width:"100%"}},`1-${u}`),v.jsx(KI,{dest:"Game",disabled:!n||!i,onAction:()=>{g.incrementalPatch({score:0,momentum:0,roster:(n==null?void 0:n.map(C=>({name:C.id,health:C.hp})))||[]}).catch(console.error),f||b.incrementalPatch({score:0,momentum:0,roster:(i==null?void 0:i.map(C=>({name:C.id,health:C.hp})))||[]}).catch(console.error)},sx:{m:"10px"}}),v.jsx(T,{guild:_,stateDoc:b,ready:a,unready:c,style:{width:"100%"},disabled:f},`2-${u}`)]})}function lre(){const[e,t]=k.useState(null),n=!!e,r=c=>{t(c.currentTarget)},i=()=>{t(null)},{setting$:o}=ai(),[s,a]=k.useState();k.useEffect(()=>{const c=o==null?void 0:o.subscribe(u=>a(u));return()=>c==null?void 0:c.unsubscribe()},[o]);const l=s==null?void 0:s.toJSON().data.gameSize;return v.jsxs(v.Fragment,{children:[v.jsx(Lo,{onClick:r,color:"inherit",size:"small",sx:{backgroundColor:"primary.dark"},children:v.jsxs(wt,{children:[l,"v",l]})}),v.jsx(Fv,{anchorEl:e,open:n,onClose:i,onClick:i,children:v.jsxs(pL,{dense:!0,children:[v.jsx(fi,{selected:l===6,onClick:()=>{s==null||s.incrementalPatch({gameSize:6})},children:"6v6"}),v.jsx(fi,{selected:l===4,onClick:()=>{s==null||s.incrementalPatch({gameSize:4})},children:"4v4"}),v.jsx(fi,{selected:l===3,onClick:()=>{s==null||s.incrementalPatch({gameSize:3})},children:"3v3"})]})})]})}var NS={},cre=eo;Object.defineProperty(NS,"__esModule",{value:!0});var fg=NS.default=void 0,ure=cre(as()),dre=v;fg=NS.default=(0,ure.default)((0,dre.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove");var AS={},fre=eo;Object.defineProperty(AS,"__esModule",{value:!0});var pg=AS.default=void 0,pre=fre(as()),hre=v;pg=AS.default=(0,pre.default)((0,hre.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function MR(e){mre(e)&&e.touches.length<2&&e.preventDefault&&e.cancelable&&e.preventDefault()}function mre(e){return e&&"touches"in e}function Q1({onLongPress:e,onClick:t},{delay:n=500,shouldPreventDefault:r=!0}={}){const[i,o]=k.useState(!1),s=k.useRef(),a=k.useRef(),l=k.useCallback(u=>{u.persist();const d={...u};r&&u.target&&(u.target.addEventListener("touchend",MR,{passive:!1}),a.current=u.target),s.current=setTimeout(()=>{e(d),o(!0)},n)},[e,n,r]),c=k.useCallback((u,d=!0)=>{s.current&&clearTimeout(s.current),d&&!i&&(t==null||t(u)),o(!1),r&&a.current&&a.current.removeEventListener("touchend",MR)},[r,t,i]);return{onMouseDown:u=>l(u),onTouchStart:u=>l(u),onMouseUp:u=>c(u),onMouseLeave:u=>c(u,!1),onTouchEnd:u=>c(u),onTouchMove:u=>c(u)}}function gre(e){const{disabled:t,object:n,label:r}=e,i=r(n),o=$S(t,[i]);return v.jsx(wt,{ref:o,sx:{width:"100%",textAlign:"center"},children:i})}function eM({object:e,label:t,value:n,setValue:r,disabled:i=!1,longPressClear:o=!1}){const s=Q1({onLongPress:()=>{r(e,0)},onClick:a=>{a.stopPropagation();const l=n(e);l>0&&r(e,l-1)}});return v.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[v.jsx(gre,{disabled:i,object:e,label:t}),v.jsxs(Df,{size:"small",variant:"contained",disabled:i,children:[v.jsx(yn,{...o?s:{},onClick:a=>{if(a.stopPropagation(),!o){const l=n(e);l>0&&r(e,l-1)}},children:v.jsx(fg,{fontSize:"inherit"})}),v.jsx(yn,{onClick:a=>{a.stopPropagation();const l=n(e);r(e,l+1)},children:v.jsx(pg,{fontSize:"inherit"})})]})]})}const $R=e=>{const{model:t,disabled:n}=e,r=$S(n,[e.health]);return v.jsx(yn,{ref:r,disabled:!0,size:"small",children:v.jsx(wt,{variant:"body2",color:"text.primary",children:`${String(e.health).padStart(2,"0")} / ${String(t.hp).padStart(2,"0")}`})})};function tM({state:e,model:t,disabled:n=!1,stacked:r=!1}){const i=Q1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health=0,u})},onClick:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health>0&&(u.roster[d].health-=1),u})}}),o=Q1({onLongPress:()=>{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].health{e.incrementalModify(u=>{const d=u.roster.findIndex(f=>f.name===t.id);return u.roster[d].healthu.name===t.id),a=k.useMemo(()=>e.get$("roster").pipe(qt(u=>u[s].health)),[e,s]),[l,c]=k.useState(t.hp);return k.useEffect(()=>{const u=a.subscribe(d=>c(d));return()=>u.unsubscribe()},[a]),v.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:r?v.jsxs(v.Fragment,{children:[v.jsx($R,{health:l,model:t,disabled:n}),v.jsxs(Df,{size:"small",variant:"contained",disabled:n,sx:{"& .MuiButtonGroup-grouped":{minWidth:"1rem"}},children:[v.jsx(yn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(fg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx(yn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(pg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})]}):v.jsxs(Df,{size:"small",variant:"contained",disabled:n,children:[v.jsx(yn,{...i,onClick:u=>u.stopPropagation(),children:v.jsx(fg,{fontSize:"inherit",sx:{pointerEvents:"none"}})}),v.jsx($R,{health:l,model:t,disabled:n}),v.jsx(yn,{...o,onClick:u=>u.stopPropagation(),children:v.jsx(pg,{fontSize:"inherit",sx:{pointerEvents:"none"}})})]})})}function vre(e){const t=e.state,[n,r]=k.useState(0);return k.useEffect(()=>{const i=t.get$("score").subscribe(o=>r(o));return()=>i.unsubscribe()},[t]),v.jsx(eM,{object:t,disabled:e.disabled,label:()=>`VP: ${n}`,value:()=>n,setValue:(i,o)=>{i.incrementalModify(s=>(s.score=o,s))}})}function yre(e){const t=e.state,[n,r]=k.useState(0);return k.useEffect(()=>{const i=t.get$("momentum").subscribe(o=>r(o));return()=>i.unsubscribe()},[t]),v.jsx(eM,{object:t,disabled:e.disabled,longPressClear:!0,label:()=>`MOM: ${n}`,value:()=>n,setValue:(i,o)=>{i.incrementalModify(s=>(s.momentum=o,s))}})}function bre({teams:e,rosters:t,expanded:n,onClick:r,disabled:i}){const o=Pi(),{setting$:s}=ai(),[a,l]=k.useState();k.useEffect(()=>{const u=s==null?void 0:s.pipe(qt(d=>d==null?void 0:d.toJSON().data.uiPreferences.displayStatLine)).subscribe(d=>l(d));return()=>u==null?void 0:u.unsubscribe()});const c=e.reduce((u,d,f)=>[...u,u[f]+d.roster.length+1],[0]);return v.jsx(Zt,{sx:{flexGrow:0,overflow:"auto"},children:e.map((u,d)=>{const f=c[d]+1;return v.jsxs(D8,{expanded:n===!0,square:!0,sx:{backgroundColor:"transparent"},disableGutters:!0,elevation:0,children:[v.jsx(tU,{sx:{position:"sticky",top:0,zIndex:1,padding:0,borderBottom:`1px solid ${o.palette.divider}`,".MuiAccordionSummary-content":{margin:0}},children:v.jsxs(tW,{onClick:()=>{r(f-1,!n)},sx:{width:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(gH,{sx:{alignItems:"center"},children:v.jsx("div",{style:{fontSize:36,width:"1em",height:"1em",overflow:"visible",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(Ci,{icon:u.guild,style:{color:o.palette.text.secondary,filter:"unset",flexShrink:0}})})}),v.jsx(gs,{primary:u.guild,secondary:`${t[d].reduce((m,h)=>m+(h._inf??h.inf),0)} INF`}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"4px"},children:[v.jsx(vre,{state:u,disabled:i[d]}),v.jsx(yre,{state:u,disabled:i[d]})]})]})}),v.jsx(H8,{sx:{padding:0},children:v.jsx(Xd,{disablePadding:!0,sx:{"li:nth-of-type(odd)":{"&.MuiListItem-root":{backgroundColor:"rgba(100%, 100%, 100%, 5%)"}}},children:t[d].map((m,h)=>v.jsx(fo,{secondaryAction:v.jsx(tM,{state:u,model:m,disabled:i[d]}),onClick:()=>{r(f+h,!1)},children:v.jsx(gs,{primary:m.id,secondary:a?m.statLine:null})},m.id))},d)})]},d)})})}const Lr=new URL("/assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",import.meta.url).href,jr=new URL("/assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",import.meta.url).href,Ir=new URL("/assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",import.meta.url).href,Mr=new URL("/assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",import.meta.url).href,_c=new URL("/assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",import.meta.url).href,qr=new URL("/assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",import.meta.url).href,Cc=new URL("/assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",import.meta.url).href,$r=new URL("/assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",import.meta.url).href,Nr=new URL("/assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",import.meta.url).href,Ar=new URL("/assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",import.meta.url).href,Dr=new URL("/assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",import.meta.url).href,kc=new URL("/assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",import.meta.url).href,Sr=new URL("/assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",import.meta.url).href,Ec=new URL("/assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",import.meta.url).href,ca=new URL("/assets/Order_back-qsepM33g.jpg",import.meta.url).href,Rc=new URL("/assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",import.meta.url).href,ll=new URL("/assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",import.meta.url).href,Yr=new URL("/assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",import.meta.url).href,Pc=new URL("/assets/lamps_back_blank-DaxPd_Oo.jpg",import.meta.url).href,sn=new Map([["Alchemists_back",new URL("/assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",import.meta.url).href],["Alchemists_front",new URL("/assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",import.meta.url).href],["Midas_back",Lr],["Midas_front",new URL("/assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",import.meta.url).href],["Smoke_back",Lr],["Smoke_front",new URL("/assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",import.meta.url).href],["Soma_back",Lr],["Soma_front",new URL("/assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",import.meta.url).href],["Pneuma_back",Lr],["Pneuma_front",new URL("/assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",import.meta.url).href],["Flask_back",Lr],["Flask_front",new URL("/assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",import.meta.url).href],["Naja_back",Lr],["Naja_front",new URL("/assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",import.meta.url).href],["Calculus_back",Lr],["Calculus_front",new URL("/assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",import.meta.url).href],["vCalculus_back",Lr],["vCalculus_front",new URL("/assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",import.meta.url).href],["Crucible_back",Lr],["Crucible_front",new URL("/assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",import.meta.url).href],["Kami_back",Lr],["Kami_front",new URL("/assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",import.meta.url).href],["Katalyst_back",Lr],["Katalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",import.meta.url).href],["vKatalyst_back",Lr],["vKatalyst_front",new URL("/assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",import.meta.url).href],["Mercury_back",Lr],["Mercury_front",new URL("/assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",import.meta.url).href],["Venin_back",Lr],["Venin_front",new URL("/assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",import.meta.url).href],["Vitriol_back",Lr],["Vitriol_front",new URL("/assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",import.meta.url).href],["Compound_back",new URL("/assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",import.meta.url).href],["Compound_front",new URL("/assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",import.meta.url).href],["Blacksmiths_back",new URL("/assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",import.meta.url).href],["Blacksmiths_front",new URL("/assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",import.meta.url).href],["Anvil_back",jr],["Anvil_front",new URL("/assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",import.meta.url).href],["Burnish_back",jr],["Burnish_front",new URL("/assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",import.meta.url).href],["Culverin_back",jr],["Culverin_front",new URL("/assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",import.meta.url).href],["Farris_back",jr],["Farris_front",new URL("/assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",import.meta.url).href],["Ferrite_back",jr],["Ferrite_front",new URL("/assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",import.meta.url).href],["Furnace_back",jr],["Furnace_front",new URL("/assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",import.meta.url).href],["Hearth_back",jr],["Hearth_front",new URL("/assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",import.meta.url).href],["Alloy_back",jr],["Alloy_front",new URL("/assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",import.meta.url).href],["Bolt_back",jr],["Bolt_front",new URL("/assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",import.meta.url).href],["Cast_back",jr],["Cast_front",new URL("/assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",import.meta.url).href],["Cinder_back",jr],["Cinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",import.meta.url).href],["vCinder_back",jr],["vCinder_front",new URL("/assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",import.meta.url).href],["Cutlass_back",jr],["Cutlass_front",new URL("/assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",import.meta.url).href],["Iron_back",jr],["Iron_front",new URL("/assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",import.meta.url).href],["Sledge_back",jr],["Sledge_front",new URL("/assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",import.meta.url).href],["Brewers_back",new URL("/assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",import.meta.url).href],["Brewers_front",new URL("/assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",import.meta.url).href],["Tapper_back",Ir],["Tapper_front",new URL("/assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",import.meta.url).href],["Esters_back",Ir],["Esters_front",new URL("/assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",import.meta.url).href],["Corker_back",Ir],["Corker_front",new URL("/assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",import.meta.url).href],["Scum_back",Ir],["Scum_front",new URL("/assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",import.meta.url).href],["Quaff_back",Ir],["Quaff_front",new URL("/assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",import.meta.url).href],["vDecimate_back",Ir],["vDecimate_front",new URL("/assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",import.meta.url).href],["Flea_back",Ir],["Flea_front",new URL("/assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",import.meta.url).href],["Friday_back",Ir],["Friday_front",new URL("/assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",import.meta.url).href],["Hooper_back",Ir],["Hooper_front",new URL("/assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",import.meta.url).href],["Mash_back",Ir],["Mash_front",new URL("/assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",import.meta.url).href],["Pintpot_back",Ir],["Pintpot_front",new URL("/assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",import.meta.url).href],["Spigot_back",Ir],["Spigot_front",new URL("/assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",import.meta.url).href],["vSpigot_back",Ir],["vSpigot_front",new URL("/assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",import.meta.url).href],["Stave_back",Ir],["Stave_front",new URL("/assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",import.meta.url).href],["Stoker_back",Ir],["Stoker_front",new URL("/assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",import.meta.url).href],["Lucky_back",new URL("/assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",import.meta.url).href],["Lucky_front",new URL("/assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",import.meta.url).href],["Butchers_back",new URL("/assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",import.meta.url).href],["Butchers_front",new URL("/assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",import.meta.url).href],["Ox_back",Mr],["Ox_front",new URL("/assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",import.meta.url).href],["Fillet_back",Mr],["Fillet_front",new URL("/assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",import.meta.url).href],["vBoar_back",Mr],["vBoar_front",new URL("/assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",import.meta.url).href],["Princess_back",Mr],["Princess_front",new URL("/assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",import.meta.url).href],["Truffles_back",Mr],["Truffles_front",new URL("/assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",import.meta.url).href],["Boar_back",Mr],["Boar_front",new URL("/assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",import.meta.url).href],["Boiler_back",Mr],["Boiler_front",new URL("/assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",import.meta.url).href],["Brisket_back",Mr],["Brisket_front",new URL("/assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",import.meta.url).href],["vBrisket_back",Mr],["vBrisket_front",new URL("/assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",import.meta.url).href],["vGutter_back",Mr],["vGutter_front",new URL("/assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",import.meta.url).href],["Layne_back",Mr],["Layne_front",new URL("/assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",import.meta.url).href],["Meathook_back",Mr],["Meathook_front",new URL("/assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",import.meta.url).href],["vOx_back",Mr],["vOx_front",new URL("/assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",import.meta.url).href],["Shank_back",Mr],["Shank_front",new URL("/assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",import.meta.url).href],["Tenderiser_back",Mr],["Tenderiser_front",new URL("/assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",import.meta.url).href],["Cooks_back",new URL("/assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",import.meta.url).href],["Cooks_front",new URL("/assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",import.meta.url).href],["Wellington_back",_c],["Wellington_front",new URL("/assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",import.meta.url).href],["Pepper_back",_c],["Pepper_front",new URL("/assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",import.meta.url).href],["Cinnamon_back",_c],["Cinnamon_front",new URL("/assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",import.meta.url).href],["Roast_back",_c],["Roast_front",new URL("/assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",import.meta.url).href],["Spice_back",_c],["Spice_front",new URL("/assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",import.meta.url).href],["Sugar_back",_c],["Sugar_front",new URL("/assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",import.meta.url).href],["Engineers_back",new URL("/assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",import.meta.url).href],["Engineers_front",new URL("/assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",import.meta.url).href],["Ballista_back",qr],["Ballista_front",new URL("/assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",import.meta.url).href],["PinVice_back",qr],["PinVice_front",new URL("/assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",import.meta.url).href],["Rivet_back",qr],["Rivet_front",new URL("/assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",import.meta.url).href],["Mainspring_back",qr],["Mainspring_front",new URL("/assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",import.meta.url).href],["Mother_back",qr],["Mother_front",new URL("/assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",import.meta.url).href],["Colossus_back",qr],["Colossus_front",new URL("/assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",import.meta.url).href],["vHarriet_back",qr],["vHarriet_front",new URL("/assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",import.meta.url).href],["Hoist_back",qr],["Hoist_front",new URL("/assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",import.meta.url).href],["Locus_back",qr],["Locus_front",new URL("/assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",import.meta.url).href],["Nomad_back",qr],["Nomad_front",new URL("/assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",import.meta.url).href],["Ratchet_back",qr],["Ratchet_front",new URL("/assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",import.meta.url).href],["Salvo_back",qr],["Salvo_front",new URL("/assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",import.meta.url).href],["Velocity_back",qr],["Velocity_front",new URL("/assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",import.meta.url).href],["vVelocity_back",qr],["vVelocity_front",new URL("/assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",import.meta.url).href],["Falconers_back",new URL("/assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",import.meta.url).href],["Falconers_front",new URL("/assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",import.meta.url).href],["Devana_back",Cc],["Devana_front",new URL("/assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",import.meta.url).href],["Frelsi_back",Cc],["Frelsi_front",new URL("/assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",import.meta.url).href],["Ikaros_back",Cc],["Ikaros_front",new URL("/assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",import.meta.url).href],["Mataagi_back",Cc],["Mataagi_front",new URL("/assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",import.meta.url).href],["Minerva_back",Cc],["Minerva_front",new URL("/assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",import.meta.url).href],["Rundaas_back",Cc],["Rundaas_front",new URL("/assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",import.meta.url).href],["Farmers_back",new URL("/assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",import.meta.url).href],["Farmers_front",new URL("/assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",import.meta.url).href],["Grange_back",$r],["Grange_front",new URL("/assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",import.meta.url).href],["Thresher_back",$r],["Thresher_front",new URL("/assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",import.meta.url).href],["Festival_back",$r],["Festival_front",new URL("/assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",import.meta.url).href],["Peck_back",$r],["Peck_front",new URL("/assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",import.meta.url).href],["Buckwheat_back",$r],["Buckwheat_front",new URL("/assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",import.meta.url).href],["Amber_back",$r],["Amber_front",new URL("/assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",import.meta.url).href],["Bushel_back",$r],["Bushel_front",new URL("/assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",import.meta.url).href],["Fallow_back",$r],["Fallow_front",new URL("/assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",import.meta.url).href],["Harrow_back",$r],["Harrow_front",new URL("/assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",import.meta.url).href],["vHonour_back",$r],["vHonour_front",new URL("/assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",import.meta.url).href],["Jackstraw_back",$r],["Jackstraw_front",new URL("/assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",import.meta.url).href],["Millstone_back",$r],["Millstone_front",new URL("/assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",import.meta.url).href],["Ploughman_back",$r],["Ploughman_front",new URL("/assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",import.meta.url).href],["Tater_back",$r],["Tater_front",new URL("/assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",import.meta.url).href],["Windle_back",$r],["Windle_front",new URL("/assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",import.meta.url).href],["Fishermen_back",new URL("/assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",import.meta.url).href],["Fishermen_front",new URL("/assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",import.meta.url).href],["Shark_back",Nr],["Shark_front",new URL("/assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",import.meta.url).href],["Corsair_back",Nr],["Corsair_front",new URL("/assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",import.meta.url).href],["Yukai_back",Nr],["Yukai_front",new URL("/assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",import.meta.url).href],["Salt_back",Nr],["Salt_front",new URL("/assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",import.meta.url).href],["Tentacles_back",Nr],["Tentacles_front",new URL("/assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",import.meta.url).href],["Angel_back",Nr],["Angel_front",new URL("/assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",import.meta.url).href],["Greyscales_back",Nr],["Greyscales_front",new URL("/assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",import.meta.url).href],["Hag_back",Nr],["Hag_front",new URL("/assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",import.meta.url).href],["Jac_back",Nr],["Jac_front",new URL("/assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",import.meta.url).href],["Knuckles_back",Nr],["Knuckles_front",new URL("/assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",import.meta.url).href],["Kraken_back",Nr],["Kraken_front",new URL("/assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",import.meta.url).href],["Sakana_back",Nr],["Sakana_front",new URL("/assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",import.meta.url).href],["vSakana_back",Nr],["vSakana_front",new URL("/assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",import.meta.url).href],["Siren_back",Nr],["Siren_front",new URL("/assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",import.meta.url).href],["vSiren_back",Nr],["vSiren_front",new URL("/assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",import.meta.url).href],["Hunters_back",new URL("/assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",import.meta.url).href],["Hunters_front",new URL("/assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",import.meta.url).href],["Theron_back",Ar],["Theron_front",new URL("/assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",import.meta.url).href],["Skatha_back",Ar],["Skatha_front",new URL("/assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",import.meta.url).href],["Steeljaw_back",Ar],["Steeljaw_front",new URL("/assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",import.meta.url).href],["Fahad_back",Ar],["Fahad_front",new URL("/assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",import.meta.url).href],["Snow_back",Ar],["Snow_front",new URL("/assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",import.meta.url).href],["Chaska_back",Ar],["Chaska_front",new URL("/assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",import.meta.url).href],["Edge_back",Ar],["Edge_front",new URL("/assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",import.meta.url).href],["Egret_back",Ar],["Egret_front",new URL("/assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",import.meta.url).href],["Hearne_back",Ar],["Hearne_front",new URL("/assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",import.meta.url).href],["vHearne_back",Ar],["vHearne_front",new URL("/assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",import.meta.url).href],["Jaecar_back",Ar],["Jaecar_front",new URL("/assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",import.meta.url).href],["vMinx_back",Ar],["vMinx_front",new URL("/assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",import.meta.url).href],["Seenah_back",Ar],["Seenah_front",new URL("/assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",import.meta.url).href],["Ulfr_back",Ar],["Ulfr_front",new URL("/assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",import.meta.url).href],["Zarola_back",Ar],["Zarola_front",new URL("/assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",import.meta.url).href],["Masons_back",new URL("/assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",import.meta.url).href],["Masons_front",new URL("/assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",import.meta.url).href],["Honour_back",Dr],["Honour_front",new URL("/assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",import.meta.url).href],["Hammer_back",Dr],["Hammer_front",new URL("/assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",import.meta.url).href],["Corbelli_back",Dr],["Corbelli_front",new URL("/assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",import.meta.url).href],["Marbles_back",Dr],["Marbles_front",new URL("/assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",import.meta.url).href],["Wrecker_back",Dr],["Wrecker_front",new URL("/assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",import.meta.url).href],["Brick_back",Dr],["Brick_front",new URL("/assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",import.meta.url).href],["Champ_back",Dr],["Champ_front",new URL("/assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",import.meta.url).href],["Chisel_back",Dr],["Chisel_front",new URL("/assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",import.meta.url).href],["vChisel_back",Dr],["vChisel_front",new URL("/assets/GB-S4-Masons-19-08-18-CCBausup.jpg",import.meta.url).href],["Flint_back",Dr],["Flint_front",new URL("/assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",import.meta.url).href],["Granite_back",Dr],["Granite_front",new URL("/assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",import.meta.url).href],["Harmony_back",Dr],["Harmony_front",new URL("/assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",import.meta.url).href],["vHarmony_back",Dr],["vHarmony_front",new URL("/assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",import.meta.url).href],["Mallet_back",Dr],["Mallet_front",new URL("/assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",import.meta.url).href],["Tower_back",Dr],["Tower_front",new URL("/assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",import.meta.url).href],["Miners_back",new URL("/assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",import.meta.url).href],["Miners_front",new URL("/assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",import.meta.url).href],["Shaft_back",kc],["Shaft_front",new URL("/assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",import.meta.url).href],["Digger_back",kc],["Digger_front",new URL("/assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",import.meta.url).href],["Fissure_back",kc],["Fissure_front",new URL("/assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",import.meta.url).href],["Fuse_back",kc],["Fuse_front",new URL("/assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",import.meta.url).href],["Mule_back",kc],["Mule_front",new URL("/assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",import.meta.url).href],["Spade_back",kc],["Spade_front",new URL("/assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",import.meta.url).href],["Morticians_back",new URL("/assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",import.meta.url).href],["Morticians_front",new URL("/assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",import.meta.url).href],["Obulus_back",Sr],["Obulus_front",new URL("/assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",import.meta.url).href],["Scalpel_back",Sr],["Scalpel_front",new URL("/assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",import.meta.url).href],["Mourn_back",Sr],["Mourn_front",new URL("/assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",import.meta.url).href],["Dirge_back",Sr],["Dirge_front",new URL("/assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",import.meta.url).href],["Vileswarm_back",Sr],["Vileswarm_front",new URL("/assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",import.meta.url).href],["Bonesaw_back",Sr],["Bonesaw_front",new URL("/assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",import.meta.url).href],["Brainpan_back",Sr],["Brainpan_front",new URL("/assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",import.meta.url).href],["Memory_back",Sr],["Memory_front",new URL("/assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",import.meta.url).href],["Casket_back",Sr],["Casket_front",new URL("/assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",import.meta.url).href],["Cosset_back",Sr],["Cosset_front",new URL("/assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",import.meta.url).href],["Gaffer_back",Sr],["Gaffer_front",new URL("/assets/gaffer-front-large-box-BhDGw3yv.png",import.meta.url).href],["Ghast_back",Sr],["Ghast_front",new URL("/assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",import.meta.url).href],["Graves_back",Sr],["Graves_front",new URL("/assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",import.meta.url).href],["vGraves_back",Sr],["vGraves_front",new URL("/assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",import.meta.url).href],["vHemlocke_back",Sr],["vHemlocke_front",new URL("/assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",import.meta.url).href],["Silence_back",Sr],["Silence_front",new URL("/assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",import.meta.url).href],["Navigators_back",new URL("/assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",import.meta.url).href],["Navigators_front",new URL("/assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",import.meta.url).href],["Windfinder_back",Ec],["Wander_front",new URL("/assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",import.meta.url).href],["Windfinder_front",new URL("/assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",import.meta.url).href],["Wander_back",Ec],["Azimuth_front",new URL("/assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",import.meta.url).href],["Azimuth_back",Ec],["Ebb_back",Ec],["Ebb_front",new URL("/assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",import.meta.url).href],["Fathom_front",new URL("/assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",import.meta.url).href],["Fathom_back",Ec],["Horizon_back",Ec],["Horizon_front",new URL("/assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",import.meta.url).href],["Order_back",new URL("/assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",import.meta.url).href],["Order_front",new URL("/assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",import.meta.url).href],["sBrisket_back",ca],["sBrisket_front",new URL("/assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",import.meta.url).href],["Pride_back",ca],["Pride_front",new URL("/assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",import.meta.url).href],["Benediction_back",ca],["Benediction_front",new URL("/assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",import.meta.url).href],["vFangtooth_back",ca],["vFangtooth_front",new URL("/assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",import.meta.url).href],["Grace_back",ca],["Grace_front",new URL("/assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",import.meta.url).href],["Harry_back",ca],["Harry_front",new URL("/assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",import.meta.url).href],["Mist_back",ca],["Mist_front",new URL("/assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",import.meta.url).href],["sSpigot_back",ca],["sSpigot_front",new URL("/assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",import.meta.url).href],["Ratcatchers_back",new URL("/assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",import.meta.url).href],["Ratcatchers_front",new URL("/assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",import.meta.url).href],["Piper_back",Rc],["Piper_front",new URL("/assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",import.meta.url).href],["Squeak_back",Rc],["Squeak_front",new URL("/assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",import.meta.url).href],["Miasma_back",Rc],["Miasma_front",new URL("/assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",import.meta.url).href],["Pelage_back",Rc],["Pelage_front",new URL("/assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",import.meta.url).href],["Scourge_back",Rc],["Scourge_front",new URL("/assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",import.meta.url).href],["Skulk_back",Rc],["Skulk_front",new URL("/assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",import.meta.url).href],["Shepherds_back",new URL("/assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",import.meta.url).href],["Shepherds_front",new URL("/assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",import.meta.url).href],["Herder_back",ll],["Herder_front",new URL("/assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",import.meta.url).href],["Babe_back",ll],["Babe_front",new URL("/assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",import.meta.url).href],["Crook_back",ll],["Crook_front",new URL("/assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",import.meta.url).href],["Hook_back",ll],["Hook_front",new URL("/assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",import.meta.url).href],["Lamb_back",ll],["Lamb_front",new URL("/assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",import.meta.url).href],["Ram_back",ll],["Ram_front",new URL("/assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",import.meta.url).href],["Shearer_back",ll],["Shearer_front",new URL("/assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",import.meta.url).href],["Union_back",new URL("/assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",import.meta.url).href],["Union_front",new URL("/assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",import.meta.url).href],["Blackheart_back",Yr],["Blackheart_front",new URL("/assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",import.meta.url).href],["vRage_back",Yr],["vRage_front",new URL("/assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",import.meta.url).href],["vGreede_back",Yr],["vGreede_front",new URL("/assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",import.meta.url).href],["Coin_back",Yr],["Coin_front",new URL("/assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",import.meta.url).href],["Strongbox_back",Yr],["Strongbox_front",new URL("/assets/GB-S4-Union-20-03-12--TefmgjH.jpg",import.meta.url).href],["Avarisse_back",Yr],["Avarisse_front",new URL("/assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",import.meta.url).href],["Greede_back",Yr],["Greede_front",new URL("/assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",import.meta.url).href],["Decimate_back",Yr],["Decimate_front",new URL("/assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",import.meta.url).href],["Fangtooth_back",Yr],["Fangtooth_front",new URL("/assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",import.meta.url).href],["Gutter_back",Yr],["Gutter_front",new URL("/assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",import.meta.url).href],["Hemlocke_back",Yr],["Hemlocke_front",new URL("/assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",import.meta.url).href],["Minx_back",Yr],["Minx_front",new URL("/assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",import.meta.url).href],["Rage_back",Yr],["Rage_front",new URL("/assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",import.meta.url).href],["Snakeskin_back",Yr],["Snakeskin_front",new URL("/assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",import.meta.url).href],["Lamplighters_front",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Lamplighters_back",new URL("/assets/lamp-beta-63HlWaeb.png",import.meta.url).href],["Nightlight_gbcp_front",new URL("/assets/nightlight-00-DeG30Qno.jpg",import.meta.url).href],["Nightlight_gbcp_back",new URL("/assets/nightlight-01-B5GmfHdF.jpg",import.meta.url).href],["Soot_gbcp_front",new URL("/assets/soot-00-CjgkmHEF.jpg",import.meta.url).href],["Soot_gbcp_back",new URL("/assets/soot-01-DLvloUPB.jpg",import.meta.url).href],["Beacon_gbcp_front",new URL("/assets/beacon-00-L9zfj4Q8.jpg",import.meta.url).href],["Beacon_gbcp_back",new URL("/assets/beacon-01-vYao7kaT.jpg",import.meta.url).href],["Heat_gbcp_front",new URL("/assets/heat-00-D38QQgsn.jpg",import.meta.url).href],["Heat_gbcp_back",new URL("/assets/heat-01-TaWfEq1e.jpg",import.meta.url).href],["Phosphor_gbcp_front",new URL("/assets/phosphor-00-kYBsDzr4.jpg",import.meta.url).href],["Phosphor_gbcp_back",new URL("/assets/phosphor-01-aCMgs7Xa.jpg",import.meta.url).href],["Wick_gbcp_front",new URL("/assets/wick-00-CEZ6BY1J.jpg",import.meta.url).href],["Wick_gbcp_back",new URL("/assets/wick-01-DtuDStax.jpg",import.meta.url).href],["sBrisket_gbcp_front",new URL("/assets/brisket3-00-TRUFkM-Q.jpg",import.meta.url).href],["sBrisket_gbcp_back",new URL("/assets/brisket3-01-C19fZQ9I.jpg",import.meta.url).href],["Cast_gbcp_front",new URL("/assets/cast-00-CDhbzPRV.jpg",import.meta.url).href],["Cast_gbcp_back",new URL("/assets/cast-01-DOJiR9Ch.jpg",import.meta.url).href],["Crook_gbcp_front",new URL("/assets/crook-00-C4D_gdaM.jpg",import.meta.url).href],["Crook_gbcp_back",new URL("/assets/crook-01-D9bCOT5R.jpg",import.meta.url).href],["Egret_gbcp_front",new URL("/assets/egret-00-BKhmAAwA.jpg",import.meta.url).href],["Egret_gbcp_back",new URL("/assets/egret-01-DCSfZLX7.jpg",import.meta.url).href],["Hook_gbcp_front",new URL("/assets/hook-00-BCtxORP2.jpg",import.meta.url).href],["Hook_gbcp_back",new URL("/assets/hook-01-CFEXTspD.jpg",import.meta.url).href],["Ikaros_gbcp_front",new URL("/assets/ikaros-00-BlK23AQW.jpg",import.meta.url).href],["Ikaros_gbcp_back",new URL("/assets/ikaros-01-CaTWYr3E.jpg",import.meta.url).href],["Lucky_gbcp_front",new URL("/assets/lucky-00--3wf1Q-o.jpg",import.meta.url).href],["Lucky_gbcp_back",new URL("/assets/lucky-01-CeFOEkb7.jpg",import.meta.url).href],["Miasma_gbcp_front",new URL("/assets/miasma-00-gJuVKj0r.jpg",import.meta.url).href],["Miasma_gbcp_back",new URL("/assets/miasma-01-BFpZKg3H.jpg",import.meta.url).href],["Minx_gbcp_front",new URL("/assets/minx-00-DKid1QgM.jpg",import.meta.url).href],["Minx_gbcp_back",new URL("/assets/minx-01-h4AvAe2P.jpg",import.meta.url).href],["Steeljaw_gbcp_front",new URL("/assets/steeljaw-00-DBylP57a.jpg",import.meta.url).href],["Steeljaw_gbcp_back",new URL("/assets/steeljaw-01-DHvdkD3u.jpg",import.meta.url).href],["Tenderiser_gbcp_front",new URL("/assets/tenderiser-00-DJeWjZaC.jpg",import.meta.url).href],["Tenderiser_gbcp_back",new URL("/assets/tenderiser-01-Dn53BCqM.jpg",import.meta.url).href],["Angel_gbcp_front",new URL("/assets/Angel-00-_OcCE1xs.jpg",import.meta.url).href],["Angel_gbcp_back",new URL("/assets/Angel-01-RsyL_b7r.jpg",import.meta.url).href],["Blackheart_gbcp_front",new URL("/assets/Blackheart-00-Barboaw1.jpg",import.meta.url).href],["Blackheart_gbcp_back",new URL("/assets/Blackheart-01-DqXGaAGL.jpg",import.meta.url).href],["Brisket_gbcp_front",new URL("/assets/Brisket-00-fpn5lXhR.jpg",import.meta.url).href],["Brisket_gbcp_back",new URL("/assets/Brisket-01-Cz0yKYaC.jpg",import.meta.url).href],["Flea_gbcp_front",new URL("/assets/Flea-00-PYY29ZDm.jpg",import.meta.url).href],["Flea_gbcp_back",new URL("/assets/Flea-01-B-ceu-Fs.jpg",import.meta.url).href],["Gaffer_gbcp_front",new URL("/assets/Gaffer-00-Chm4XJB6.jpg",import.meta.url).href],["Gaffer_gbcp_back",new URL("/assets/Gaffer-01-DChRbbv3.jpg",import.meta.url).href],["Locus_gbcp_front",new URL("/assets/Locus-00-BlUYiKL3.jpg",import.meta.url).href],["Locus_gbcp_back",new URL("/assets/Locus-01-CgJeSABI.jpg",import.meta.url).href],["Salt_gbcp_front",new URL("/assets/Salt-00-DTipa4Vq.jpg",import.meta.url).href],["Salt_gbcp_back",new URL("/assets/Salt-01-DgX-3wqX.jpg",import.meta.url).href],["Truffles_gbcp_front",new URL("/assets/Truffles-00-BxTIIeQ4.jpg",import.meta.url).href],["Truffles_gbcp_back",new URL("/assets/Truffles-01-1xGyMIOv.jpg",import.meta.url).href],["Ulfr_gbcp_front",new URL("/assets/Ulfr-00-BXhlGxmA.jpg",import.meta.url).href],["Ulfr_gbcp_back",new URL("/assets/Ulfr-01-JQfocVce.jpg",import.meta.url).href],["vGutter_gbcp_front",new URL("/assets/vGutter-00-CpnNh9P4.jpg",import.meta.url).href],["vGutter_gbcp_back",new URL("/assets/vGutter-01-BWHR1234.jpg",import.meta.url).href],["Beacon_front",new URL("/assets/beacon-WzU-Fgwo.jpg",import.meta.url).href],["Beacon_back",Pc],["Heat_front",new URL("/assets/heat-kg0Ne0rh.jpg",import.meta.url).href],["Heat_back",Pc],["Nightlight_front",new URL("/assets/nightlight-BICbD_Qy.jpg",import.meta.url).href],["Nightlight_back",Pc],["Phosphor_front",new URL("/assets/phosphor-CifRCYrC.jpg",import.meta.url).href],["Phosphor_back",Pc],["Soot_front",new URL("/assets/soot-CXEcs2BT.jpg",import.meta.url).href],["Soot_back",Pc],["Wick_front",new URL("/assets/wick-D10XZuyz.jpg",import.meta.url).href],["Wick_back",Pc]]);var wre=function(e){return e instanceof RegExp},xre=function(t){var n=/[\\^$.*+?()[\]{}|]/g,r=RegExp(n.source);return t&&r.test(t)?t.replace(n,"\\$&"):t},nM=function(e){return typeof e=="string"},Sre=function(e){var t=[];return e.forEach(function(n){Array.isArray(n)?t=t.concat(n):t.push(n)}),t};function _re(e,t,n){var r=0,i=0;if(e==="")return e;if(!e||!nM(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var o=t;wre(o)||(o=new RegExp("("+xre(o)+")","gi"));for(var s=e.split(o),a=1,l=s.length;a{let t=Ph(e,/\(◉(.*?)\)/g,(n,r)=>v.jsxs(Pt.Fragment,{children:["(◉",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-a-${r}`));return t=Ph(t,/\(([^◉].*?)\)/g,(n,r)=>v.jsxs(Pt.Fragment,{children:["(",v.jsx("span",{style:{fontStyle:"italic"},children:n}),")"]},`i-${r}`)),t=Ph(t,/{([<>TKDGB]+)}/,(n,r)=>v.jsx(Pt.Fragment,{children:v.jsx("span",{style:{display:"inline-flex",width:"21px",height:"1ex",position:"relative",overflow:"visible"},children:v.jsx("div",{style:{display:"flex",overflow:"visible",width:"21px",height:"21px",backgroundColor:"white",border:"var(--line-width) solid black",borderRadius:"21px",position:"absolute",alignSelf:"center",justifySelf:"center",alignItems:"center",justifyContent:"center"},children:v.jsx($I,{icon:n.replace(/GB/g,"CP")})})})},`pb-${r}`)),t=Ph(t,/\b([A-Z]+)\b/g,(n,r)=>v.jsx("span",{style:{letterSpacing:"-1px"},children:n},`tla-${r}`)),v.jsx(v.Fragment,{children:t})},kre=e=>{const t=e.model,n=t.id,{setting$:r}=ai(),[i,o]=k.useState(),[s,a]=k.useState();k.useEffect(()=>{const f=r==null?void 0:r.subscribe(m=>{o(m==null?void 0:m.toJSON().data.cardPreferences.preferredStyle),a(m==null?void 0:m.toJSON().data.language)});return()=>f==null?void 0:f.unsubscribe()});const[l,c]=io(f=>Promise.all([f.guilds.findOne().where({name:t.guild1}).exec(),f.guilds.findOne().where({name:t.guild2}).exec()]),[t.guild1,t.guild2])??[];if(!l)return null;const u=i==="gbcp"&&(sn.has(`${n}_gbcp_front`)||sn.has(`${n}_full`)),d=u?sn.get(`${n}_full`)??sn.get(`${n}_gbcp_front`)??sn.get(`${n}_front`):sn.get(`${n}_front`)??sn.get(`${n}_full`)??sn.get(`${n}_gbcp_front`);return v.jsx("div",{className:`card-front ${n} lang-${s} ${u&&"gbcp"} ${e.className}`,style:{"--team-color":l.color,"--gbcp-color":Kf(l.shadow??l.color).mix(Kf.rgb(254,246,227),.9).string(),"--guild1-color":l.color,"--guild2-color":c?c.color:void 0,"--mom-color":l.shadow,"--mom-border-color":l.darkColor,backgroundImage:e.noBackground?void 0:`url(${d})`,...e.style},children:v.jsxs("div",{className:`overlay ${u?"gbcp":""}`,children:[v.jsxs("div",{className:"font-top-box",children:[v.jsx(Ere,{model:t,guild:l}),v.jsx(Tre,{model:t})]}),v.jsx(Pre,{model:t,gbcp:u}),v.jsx("div",{className:"character-plays-wrapper",children:v.jsx(Lre,{model:t,gbcp:u})}),v.jsx(Rre,{model:t,health$:e.health$})]})})},Ere=({model:e,guild:t})=>v.jsxs("div",{className:"name-plate",children:[v.jsx("div",{className:"guild-icon",children:v.jsx(Ci,{id:"guild-icon",icon:t.name})}),v.jsxs("div",{className:"name-plate-right",children:[v.jsx("div",{className:"name",children:v.jsx("div",{className:"dropcap",children:e.name.split(/(?=[A-Z])/).map((n,r)=>v.jsx("span",{children:n},r))})}),v.jsxs("div",{className:"reach",children:["Melee Zone ",e.reach?2:1,'"']})]})]}),Rre=({model:e,health$:t})=>{const[n,r]=k.useState(e.hp);return k.useEffect(()=>{const i=t==null?void 0:t.subscribe(o=>r(o));return()=>i==null?void 0:i.unsubscribe()},[t]),v.jsx("div",{className:"health",children:[...Array(e.hp).keys()].map(i=>v.jsx("div",{className:`health-box ${i+1>n?"damaged":""}`,children:i===0&&v.jsx(Ci,{icon:"skull",size:17})||i+1===e.recovery&&v.jsx(Ci,{icon:"bandage",size:22})||i+1===e.hp&&i+1},i))})},Pre=({model:e,gbcp:t=!1})=>{var n;return v.jsx("div",{className:"playbook",children:(n=e.playbook)==null?void 0:n.map((r,i)=>r==null?void 0:r.flatMap((o,s)=>{const[a,l]=o?o.split(";"):[null,null];return v.jsx("div",{className:`playbook-result ${a?"":"spacer"} ${l?"momentus":""}`,style:{"--col":s,display:"flex",flexDirection:t?"row":"column",padding:"0.10em",gap:t?0:"0.05em"},children:a?a.split(",").map((c,u)=>(c=t?c.replace(/^CP$/,"CP-gbcp").replace(/^CP2$/,"CP2-gbcp"):c,v.jsx($I,{icon:c},u))):null},i*7+s)}))})},Tre=({model:e})=>v.jsxs("div",{className:"statbox",children:[v.jsx("span",{children:"MOV"}),v.jsx("span",{children:"TAC"}),v.jsx("span",{children:"KICK"}),v.jsx("span",{children:"DEF"}),v.jsx("span",{children:"ARM"}),v.jsx("span",{children:"INF"}),v.jsx("span",{children:`${e.jog}"/${e.sprint}"`}),v.jsx("span",{children:e.tac}),v.jsx("span",{children:`${e.kickdice}/${e.kickdist}"`}),v.jsx("span",{children:`${e.def}+`}),v.jsx("span",{children:e.arm}),v.jsx("span",{children:`${e.inf}/${e.infmax}`})]}),NR=({test:e})=>v.jsx(Ci,{icon:e?"checkmark":"ballotX",size:14});function Ore({text:e}){const t=e.split("[",1)[0],n=e.replace(/[^[]*(\[.*\])?/," $1");return v.jsxs("div",{className:"name",children:[v.jsx("span",{children:t}),v.jsx("span",{children:n})]})}const Lre=({model:e,gbcp:t=!1})=>v.jsxs("div",{className:"character-plays",children:[v.jsxs("span",{className:"dropcap",children:[v.jsx("span",{children:"Character "}),v.jsx("span",{children:"Plays"})]}),v.jsx("span",{children:"CST"}),v.jsx("span",{children:"RNG"}),v.jsx("span",{children:"SUS"}),v.jsx("span",{children:"OPT"}),e.character_plays.map(n=>v.jsxs(Pt.Fragment,{children:[v.jsx(Ore,{text:n.name}),v.jsx("span",{children:String(n.CST).split(",").map((r,i)=>v.jsxs("span",{children:[i>0&&"/",{CP:v.jsx(Ci,{icon:t?"ball":"GB",size:18}),CP2:v.jsx(Ci,{icon:t?"trophy":"GBT",size:18})}[r]||v.jsx("span",{children:r})]},i))}),v.jsxs("span",{children:[n.RNG,typeof n.RNG=="number"&&'"']}),v.jsx("span",{children:v.jsx(NR,{test:n.SUS})}),v.jsx("span",{children:v.jsx(NR,{test:n.OPT})}),v.jsx("div",{className:"text",children:oy(n.text)})]},n.name))]}),hg=Pt.memo(kre),jre=e=>{const t=e.model,n=t.id,{setting$:r}=ai(),[i,o]=k.useState();k.useEffect(()=>{const c=r==null?void 0:r.pipe(qt(u=>u==null?void 0:u.toJSON().data.cardPreferences.preferredStyle)).subscribe(u=>o(u));return()=>c==null?void 0:c.unsubscribe()});const s=io(c=>c.guilds.findOne().where({name:t.guild1}).exec(),[t.guild1]);if(!s)return null;const a=i==="gbcp"&&(sn.has(`${n}_gbcp_front`)||sn.has(`${n}_full`)),l=a?sn.get(`${n}_full`)??sn.get(`${n}_gbcp_back`)??sn.get(`${n}_back`):sn.get(`${n}_back`)??sn.get(`${n}_full`)??sn.get(`${n}_gbcp_back`);return v.jsx("div",{className:`card-back ${n} ${a&&"gbcp"} ${e.className}`,style:{"--team-color":s.color,"--gbcp-color":Kf(s.shadow??s.color).mix(Kf.rgb(254,246,227),.9),"--mom-color":s.shadow,"--mom-border-color":s.darkColor,backgroundImage:e.noBackground?void 0:`url(${l})`,...e.style},children:v.jsxs("div",{className:`overlay ${a?"gbcp":""}`,children:[v.jsxs("div",{className:"container",children:[v.jsxs("div",{className:"name-plate",children:[v.jsx("div",{className:"guild-icon",children:v.jsx(Ci,{id:"guild-icon",icon:s.name})}),v.jsx("div",{className:"name dropcap",children:t.name.split(/(?=[A-Z])/).map((c,u)=>v.jsx("span",{children:c},u))})]}),v.jsx(Ire,{model:t}),v.jsx(Mre,{model:t}),v.jsx($re,{model:t})]}),v.jsxs("div",{className:"footer",children:[v.jsx("div",{className:"tags",children:t.types}),v.jsxs("div",{className:"right",children:[v.jsxs("div",{className:"icons",children:[v.jsx(K0,{icon:a?"gbcp":"GB"}),v.jsx("div",{className:"icon wrapper",children:v.jsx("div",{style:{width:"100%",height:"100%",border:"2px solid black",borderRadius:"50%",display:"flex",placeContent:"center",alignItems:"center",fontFamily:"Crimson Text",fontSize:"26px",fontWeight:"800"},children:t.version})}),t.guild2&&v.jsx(K0,{icon:t.guild2}),v.jsx(K0,{icon:t.guild1})]}),v.jsx("div",{className:"base-size",children:`Size ${t.base} mm`})]})]})]})})},K0=({icon:e})=>v.jsx("div",{className:"icon wrapper",children:v.jsx(Ci,{icon:e})});function DS({text:e}){const t=e.split("[",1)[0],n=e.replace(/[^[]*(\[.*\])?/," $1");return v.jsxs("div",{children:[v.jsx("span",{children:t}),v.jsx("span",{children:n})]})}const Ire=({model:e})=>v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Character "}),v.jsx("span",{children:"Traits"})]}),e.character_traits.map((t,n)=>v.jsxs(Pt.Fragment,{children:[v.jsxs("div",{className:"character-trait",children:[v.jsx("div",{className:`trait ${t.active&&"active"}`,children:v.jsx(DS,{text:t.name.concat(t.parameter?` [${t.parameter}]`:"")})}),v.jsx("span",{className:"text",children:oy(t.text)})]},`${t.name}-${n}`),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]},`ct-${n}`))]}),Mre=({model:e})=>{if(!e.heroic)return null;const t=e.heroic.split(` +`,1)[0],n=e.heroic.split(` +`).slice(1).join(` +`);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Heroic "}),v.jsx("span",{children:"Play"})]}),v.jsxs("div",{className:"heroic",children:[v.jsx(DS,{text:t}),v.jsx("span",{children:oy(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},$re=({model:e})=>{if(!e.legendary)return null;const t=e.legendary.split(` +`,1)[0],n=e.legendary.split(` +`).slice(1).join(` +`);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"header dropcap",children:[v.jsx("span",{children:"Legendary "}),v.jsx("span",{children:"Play"})]}),v.jsxs("div",{className:"legendary",children:[v.jsx(DS,{text:t}),v.jsx("span",{children:oy(n)})]}),v.jsx("div",{style:{flexGrow:1,maxHeight:"1em"}})]})},mg=Pt.memo(jre);function rM({children:e,model:t,health$:n}){const r=k.useRef(null),i=k.useRef(null),[o,s]=k.useState(1);k.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=k.useCallback(()=>{if(!r.current)return;const{width:l,height:c}=r.current.getBoundingClientRect(),u=l/500,d=c/700,f=Math.min(u,d,1);s(f??1)},[]);return v.jsx("div",{ref:r,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{ref:i,className:"flip-card",onClick:()=>{var l;(l=i.current)==null||l.classList.toggle("flipped")},children:v.jsxs("div",{className:"flip-card-inner",children:[v.jsxs("div",{className:"flip-card-front",children:[v.jsx(hg,{model:t,health$:n,style:{"--scale":o}}),e]}),v.jsx("div",{className:"flip-card-back",children:v.jsx(mg,{model:t,style:{"--scale":o}})})]})})})}function AR(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function BS(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:AR(t[n])&&AR(e[n])&&Object.keys(t[n]).length>0&&BS(e[n],t[n])})}const iM={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Yu(){const e=typeof document<"u"?document:{};return BS(e,iM),e}const Nre={document:iM,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Oi(){const e=typeof window<"u"?window:{};return BS(e,Nre),e}function Are(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function Dre(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function X1(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function gg(){return Date.now()}function Bre(e){const t=Oi();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function Fre(e,t){t===void 0&&(t="x");const n=Oi();let r,i,o;const s=Bre(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(a=>a.replace(",",".")).join(", ")),o=new n.WebKitCSSMatrix(i==="none"?"":i)):(o=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=o.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?i=o.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?i=o.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function Th(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function zre(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function pi(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;nt.indexOf(o)<0);for(let o=0,s=i.length;oo?"next":"prev",u=(f,m)=>c==="next"&&f>=m||c==="prev"&&f<=m,d=()=>{a=new Date().getTime(),s===null&&(s=a);const f=Math.max(Math.min((a-s)/l,1),0),m=.5-Math.cos(f*Math.PI)/2;let h=o+m*(n-o);if(u(h,n)&&(h=n),t.wrapperEl.scrollTo({[r]:h}),u(h,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:h})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(d)};d()}function Cs(e,t){return t===void 0&&(t=""),[...e.children].filter(n=>n.matches(t))}function vg(e){try{console.warn(e);return}catch{}}function J1(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:Are(t)),n}function Ure(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Wre(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function _a(e,t){return Oi().getComputedStyle(e,null).getPropertyValue(t)}function DR(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function Gre(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function BR(e,t,n){const r=Oi();return n?e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom")):e.offsetWidth}let q0;function Hre(){const e=Oi(),t=Yu();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function sM(){return q0||(q0=Hre()),q0}let Y0;function Vre(e){let{userAgent:t}=e===void 0?{}:e;const n=sM(),r=Oi(),i=r.navigator.platform,o=t||r.navigator.userAgent,s={ios:!1,android:!1},a=r.screen.width,l=r.screen.height,c=o.match(/(Android);?[\s\/]+([\d.]+)?/);let u=o.match(/(iPad).*OS\s([\d_]+)/);const d=o.match(/(iPod)(.*OS\s([\d_]+))?/),f=!u&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m=i==="Win32";let h=i==="MacIntel";const g=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!u&&h&&n.touch&&g.indexOf(`${a}x${l}`)>=0&&(u=o.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),h=!1),c&&!m&&(s.os="android",s.android=!0),(u||f||d)&&(s.os="ios",s.ios=!0),s}function aM(e){return e===void 0&&(e={}),Y0||(Y0=Vre(e)),Y0}let Q0;function Kre(){const e=Oi(),t=aM();let n=!1;function r(){const a=e.navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}if(r()){const a=String(e.navigator.userAgent);if(a.includes("Version/")){const[l,c]=a.split("Version/")[1].split(" ")[0].split(".").map(u=>Number(u));n=l<16||l===16&&c<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=r(),s=o||i&&t.ios;return{isSafari:n||o,needPerspectiveFix:n,need3dFix:s,isWebView:i}}function qre(){return Q0||(Q0=Kre()),Q0}function Yre(e){let{swiper:t,on:n,emit:r}=e;const i=Oi();let o=null,s=null;const a=()=>{!t||t.destroyed||!t.initialized||(r("beforeResize"),r("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(o=new ResizeObserver(d=>{s=i.requestAnimationFrame(()=>{const{width:f,height:m}=t;let h=f,g=m;d.forEach(E=>{let{contentBoxSize:b,contentRect:w,target:y}=E;y&&y!==t.el||(h=w?w.width:(b[0]||b).inlineSize,g=w?w.height:(b[0]||b).blockSize)}),(h!==f||g!==m)&&a()})}),o.observe(t.el))},c=()=>{s&&i.cancelAnimationFrame(s),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null)},u=()=>{!t||t.destroyed||!t.initialized||r("orientationchange")};n("init",()=>{if(t.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",a),i.addEventListener("orientationchange",u)}),n("destroy",()=>{c(),i.removeEventListener("resize",a),i.removeEventListener("orientationchange",u)})}function Qre(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o=[],s=Oi(),a=function(u,d){d===void 0&&(d={});const f=s.MutationObserver||s.WebkitMutationObserver,m=new f(h=>{if(t.__preventObserver__)return;if(h.length===1){i("observerUpdate",h[0]);return}const g=function(){i("observerUpdate",h[0])};s.requestAnimationFrame?s.requestAnimationFrame(g):s.setTimeout(g,0)});m.observe(u,{attributes:typeof d.attributes>"u"?!0:d.attributes,childList:typeof d.childList>"u"?!0:d.childList,characterData:typeof d.characterData>"u"?!0:d.characterData}),o.push(m)},l=()=>{if(t.params.observer){if(t.params.observeParents){const u=Gre(t.hostEl);for(let d=0;d{o.forEach(u=>{u.disconnect()}),o.splice(0,o.length)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",l),r("destroy",c)}var Xre={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const i=n?"unshift":"push";return e.split(" ").forEach(o=>{r.eventsListeners[o]||(r.eventsListeners[o]=[]),r.eventsListeners[o][i](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function i(){r.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var o=arguments.length,s=new Array(o),a=0;a=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((i,o)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[r].splice(o,1)})}),n},emit(){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,n,r;for(var i=arguments.length,o=new Array(i),s=0;s{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(c=>{c.apply(r,[l,...n])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(c=>{c.apply(r,n)})}),e}};function Jre(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(_a(r,"padding-left")||0,10)-parseInt(_a(r,"padding-right")||0,10),n=n-parseInt(_a(r,"padding-top")||0,10)-parseInt(_a(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function Zre(){const e=this;function t(j,$){return parseFloat(j.getPropertyValue(e.getDirectionLabel($))||0)}const n=e.params,{wrapperEl:r,slidesEl:i,size:o,rtlTranslate:s,wrongRTL:a}=e,l=e.virtual&&n.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,u=Cs(i,`.${e.params.slideClass}, swiper-slide`),d=l?e.virtual.slides.length:u.length;let f=[];const m=[],h=[];let g=n.slidesOffsetBefore;typeof g=="function"&&(g=n.slidesOffsetBefore.call(e));let E=n.slidesOffsetAfter;typeof E=="function"&&(E=n.slidesOffsetAfter.call(e));const b=e.snapGrid.length,w=e.slidesGrid.length;let y=n.spaceBetween,_=-g,R=0,T=0;if(typeof o>"u")return;typeof y=="string"&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*o:typeof y=="string"&&(y=parseFloat(y)),e.virtualSize=-y,u.forEach(j=>{s?j.style.marginLeft="":j.style.marginRight="",j.style.marginBottom="",j.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(Oh(r,"--swiper-centered-offset-before",""),Oh(r,"--swiper-centered-offset-after",""));const C=n.grid&&n.grid.rows>1&&e.grid;C?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();let I;const A=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(j=>typeof n.breakpoints[j].slidesPerView<"u").length>0;for(let j=0;j1&&f.push(e.virtualSize-o)}if(l&&n.loop){const j=h[0]+y;if(n.slidesPerGroup>1){const $=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),F=j*n.slidesPerGroup;for(let z=0;z<$;z+=1)f.push(f[f.length-1]+F)}for(let $=0;$!n.cssMode||n.loop?!0:F!==u.length-1).forEach($=>{$.style[j]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let j=0;h.forEach(F=>{j+=F+(y||0)}),j-=y;const $=j-o;f=f.map(F=>F<=0?-g:F>$?$+E:F)}if(n.centerInsufficientSlides){let j=0;if(h.forEach($=>{j+=$+(y||0)}),j-=y,j{f[z]=F-$}),m.forEach((F,z)=>{m[z]=F+$})}}if(Object.assign(e,{slides:u,snapGrid:f,slidesGrid:m,slidesSizesGrid:h}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Oh(r,"--swiper-centered-offset-before",`${-f[0]}px`),Oh(r,"--swiper-centered-offset-after",`${e.size/2-h[h.length-1]/2}px`);const j=-e.snapGrid[0],$=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(F=>F+j),e.slidesGrid=e.slidesGrid.map(F=>F+$)}if(d!==c&&e.emit("slidesLengthChange"),f.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),m.length!==w&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const j=`${n.containerModifierClass}backface-hidden`,$=e.el.classList.contains(j);d<=n.maxBackfaceHiddenSlides?$||e.el.classList.add(j):$&&e.el.classList.remove(j)}}function eie(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let i=0,o;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=a=>r?t.slides[t.getSlideIndexByData(a)]:t.slides[a];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(a=>{n.push(a)});else for(o=0;ot.slides.length&&!r)break;n.push(s(a))}else n.push(s(t.activeIndex));for(o=0;oi?a:i}(i||i===0)&&(t.wrapperEl.style.height=`${i}px`)}function tie(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r"u"&&t.updateSlidesOffset();let s=-e;i&&(s=e),r.forEach(l=>{l.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass)}),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=n.spaceBetween;typeof a=="string"&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:typeof a=="string"&&(a=parseFloat(a));for(let l=0;l=0&&m<=t.size-t.slidesSizesGrid[l];(m>=0&&m1&&h<=t.size||m<=0&&h>=t.size)&&(t.visibleSlides.push(c),t.visibleSlidesIndexes.push(l),r[l].classList.add(n.slideVisibleClass)),g&&r[l].classList.add(n.slideFullyVisibleClass),c.progress=i?-d:d,c.originalProgress=i?-f:f}}function rie(e){const t=this;if(typeof e>"u"){const u=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*u||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:s,progressLoop:a}=t;const l=o,c=s;if(r===0)i=0,o=!0,s=!0;else{i=(e-t.minTranslate())/r;const u=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;o=u||i<=0,s=d||i>=1,u&&(i=0),d&&(i=1)}if(n.loop){const u=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),f=t.slidesGrid[u],m=t.slidesGrid[d],h=t.slidesGrid[t.slidesGrid.length-1],g=Math.abs(e);g>=f?a=(g-f)/h:a=(g+h-m)/h,a>1&&(a-=1)}Object.assign(t,{progress:i,progressLoop:a,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!c&&t.emit("reachEnd toEdge"),(l&&!o||c&&!s)&&t.emit("fromEdge"),t.emit("progress",i)}const X0=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function iie(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:i}=e,o=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,a=d=>Cs(r,`.${n.slideClass}${d}, swiper-slide${d}`)[0];let l,c,u;if(o)if(n.loop){let d=i-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${d}"]`)}else l=a(`[data-swiper-slide-index="${i}"]`);else s?(l=t.filter(d=>d.column===i)[0],u=t.filter(d=>d.column===i+1)[0],c=t.filter(d=>d.column===i-1)[0]):l=t[i];l&&(s||(u=Wre(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u&&(u=t[0]),c=Ure(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!c===0&&(c=t[t.length-1]))),t.forEach(d=>{X0(d,d===l,n.slideActiveClass),X0(d,d===u,n.slideNextClass),X0(d,d===c,n.slidePrevClass)}),e.emitSlidesClasses()}const im=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let i=r.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(r.shadowRoot?i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},J0=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Z1=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,a=[s-t];a.push(...Array.from({length:t}).map((l,c)=>s+r+c)),e.slides.forEach((l,c)=>{a.includes(l.column)&&J0(e,c)});return}const o=i+r-1;if(e.params.rewind||e.params.loop)for(let s=i-t;s<=o+t;s+=1){const a=(s%n+n)%n;(ao)&&J0(e,a)}else for(let s=Math.max(i-t,0);s<=Math.min(o+t,n-1);s+=1)s!==i&&(s>o||s=t[o]&&r=t[o]&&r=t[o]&&(i=o);return n.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function sie(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:i,activeIndex:o,realIndex:s,snapIndex:a}=t;let l=e,c;const u=m=>{let h=m-t.virtual.slidesBefore;return h<0&&(h=t.virtual.slides.length+h),h>=t.virtual.slides.length&&(h-=t.virtual.slides.length),h};if(typeof l>"u"&&(l=oie(t)),r.indexOf(n)>=0)c=r.indexOf(n);else{const m=Math.min(i.slidesPerGroupSkip,l);c=m+Math.floor((l-m)/i.slidesPerGroup)}if(c>=r.length&&(c=r.length-1),l===o&&!t.params.loop){c!==a&&(t.snapIndex=c,t.emit("snapIndexChange"));return}if(l===o&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=u(l);return}const d=t.grid&&i.grid&&i.grid.rows>1;let f;if(t.virtual&&i.virtual.enabled&&i.loop)f=u(l);else if(d){const m=t.slides.filter(g=>g.column===l)[0];let h=parseInt(m.getAttribute("data-swiper-slide-index"),10);Number.isNaN(h)&&(h=Math.max(t.slides.indexOf(m),0)),f=Math.floor(h/i.grid.rows)}else if(t.slides[l]){const m=t.slides[l].getAttribute("data-swiper-slide-index");m?f=parseInt(m,10):f=l}else f=l;Object.assign(t,{previousSnapIndex:a,snapIndex:c,previousRealIndex:s,realIndex:f,previousIndex:o,activeIndex:l}),t.initialized&&Z1(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==f&&t.emit("realIndexChange"),t.emit("slideChange"))}function aie(e,t){const n=this,r=n.params;let i=e.closest(`.${r.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(a=>{!i&&a.matches&&a.matches(`.${r.slideClass}, swiper-slide`)&&(i=a)});let o=!1,s;if(i){for(let a=0;al?u=l:r&&es?a="next":o"u"&&(t=o.params.speed);const g=Math.min(o.params.slidesPerGroupSkip,s);let E=g+Math.floor((s-g)/o.params.slidesPerGroup);E>=l.length&&(E=l.length-1);const b=-l[E];if(a.normalizeSlideIndex)for(let y=0;y=R&&_=R&&_=R&&(s=y)}if(o.initialized&&s!==d&&(!o.allowSlideNext&&(f?b>o.translate&&b>o.minTranslate():bo.translate&&b>o.maxTranslate()&&(d||0)!==s))return!1;s!==(u||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(b);let w;if(s>d?w="next":s0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[y?"scrollLeft":"scrollTop"]=_})):m[y?"scrollLeft":"scrollTop"]=_,R&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1})}else{if(!o.support.smoothScroll)return oM({swiper:o,targetPosition:_,side:y?"left":"top"}),!0;m.scrollTo({[y?"left":"top"]:_,behavior:"smooth"})}return!0}return o.setTransition(t),o.setTranslate(b),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,r),o.transitionStart(n,w),t===0?o.transitionEnd(n,w):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(_){!o||o.destroyed||_.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,w))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function wie(e,t,n,r){e===void 0&&(e=0),n===void 0&&(n=!0),typeof e=="string"&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;typeof t>"u"&&(t=i.params.speed);const o=i.grid&&i.params.grid&&i.params.grid.rows>1;let s=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)s=s+i.virtual.slidesBefore;else{let a;if(o){const f=s*i.params.grid.rows;a=i.slides.filter(m=>m.getAttribute("data-swiper-slide-index")*1===f)[0].column}else a=i.getSlideIndexByData(s);const l=o?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:c}=i.params;let u=i.params.slidesPerView;u==="auto"?u=i.slidesPerViewDynamic():(u=Math.ceil(parseFloat(i.params.slidesPerView,10)),c&&u%2===0&&(u=u+1));let d=l-am.getAttribute("data-swiper-slide-index")*1===f)[0].column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame(()=>{i.slideTo(s,t,n,r)}),i}function xie(e,t,n){t===void 0&&(t=!0);const r=this,{enabled:i,params:o,animating:s}=r;if(!i||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let a=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(a=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return o.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)}function Sie(e,t,n){t===void 0&&(t=!0);const r=this,{params:i,snapGrid:o,slidesGrid:s,rtlTranslate:a,enabled:l,animating:c}=r;if(!l||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const u=r.virtual&&i.virtual.enabled;if(i.loop){if(c&&!u&&i.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const d=a?r.translate:-r.translate;function f(b){return b<0?-Math.floor(Math.abs(b)):Math.floor(b)}const m=f(d),h=o.map(b=>f(b));let g=o[h.indexOf(m)-1];if(typeof g>"u"&&i.cssMode){let b;o.forEach((w,y)=>{m>=w&&(b=y)}),typeof b<"u"&&(g=o[b>0?b-1:b])}let E=0;if(typeof g<"u"&&(E=s.indexOf(g),E<0&&(E=r.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(E=E-r.slidesPerViewDynamic("previous",!0)+1,E=Math.max(E,0))),i.rewind&&r.isBeginning){const b=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(b,e,t,n)}else if(i.loop&&r.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(E,e,t,n)}),!0;return r.slideTo(E,e,t,n)}function _ie(e,t,n){t===void 0&&(t=!0);const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function Cie(e,t,n,r){t===void 0&&(t=!0),r===void 0&&(r=.5);const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);let o=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){const c=i.snapGrid[a],u=i.snapGrid[a+1];l-c>(u-c)*r&&(o+=i.params.slidesPerGroup)}else{const c=i.snapGrid[a-1],u=i.snapGrid[a];l-c<=(u-c)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,e,t,n)}function kie(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex,o;const s=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?ie.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(Cs(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),X1(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(Cs(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),X1(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var Eie={slideTo:bie,slideToLoop:wie,slideNext:xie,slidePrev:Sie,slideReset:_ie,slideToClosest:Cie,slideToClickedSlide:kie};function Rie(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const i=()=>{Cs(r,`.${n.slideClass}, swiper-slide`).forEach((d,f)=>{d.setAttribute("data-swiper-slide-index",f)})},o=t.grid&&n.grid&&n.grid.rows>1,s=n.slidesPerGroup*(o?n.grid.rows:1),a=t.slides.length%s!==0,l=o&&t.slides.length%n.grid.rows!==0,c=u=>{for(let d=0;d1;c.length"u"?o=l.getSlideIndex(c.filter(z=>z.classList.contains(m.slideActiveClass))[0]):R=o;const T=r==="next"||!r,C=r==="prev"||!r;let I=0,A=0;const j=w?Math.ceil(c.length/m.grid.rows):c.length,F=(w?c[o].column:o)+(h&&typeof i>"u"?-g/2+.5:0);if(F=0;Z-=1)c[Z].column===J&&y.push(Z)}else y.push(j-Y-1)}}else if(F+g>j-b){A=Math.max(F-(j-b*2),E);for(let z=0;z{J.column===Y&&_.push(Z)}):_.push(Y)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),C&&y.forEach(z=>{c[z].swiperLoopMoveDOM=!0,f.prepend(c[z]),c[z].swiperLoopMoveDOM=!1}),T&&_.forEach(z=>{c[z].swiperLoopMoveDOM=!0,f.append(c[z]),c[z].swiperLoopMoveDOM=!1}),l.recalcSlides(),m.slidesPerView==="auto"?l.updateSlides():w&&(y.length>0&&C||_.length>0&&T)&&l.slides.forEach((z,Y)=>{l.grid.updateSlide(Y,z,l.slides)}),m.watchSlidesProgress&&l.updateSlidesOffset(),n){if(y.length>0&&C){if(typeof t>"u"){const z=l.slidesGrid[R],J=l.slidesGrid[R+I]-z;a?l.setTranslate(l.translate-J):(l.slideTo(R+Math.ceil(I),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-J,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-J))}else if(i){const z=w?y.length/m.grid.rows:y.length;l.slideTo(l.activeIndex+z,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(_.length>0&&T)if(typeof t>"u"){const z=l.slidesGrid[R],J=l.slidesGrid[R-A]-z;a?l.setTranslate(l.translate-J):(l.slideTo(R-A,0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-J,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-J))}else{const z=w?_.length/m.grid.rows:_.length;l.slideTo(l.activeIndex-z,0,!1,!0)}}if(l.allowSlidePrev=u,l.allowSlideNext=d,l.controller&&l.controller.control&&!s){const z={slideRealIndex:t,direction:r,setTranslate:i,activeSlideIndex:o,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(Y=>{!Y.destroyed&&Y.params.loop&&Y.loopFix({...z,slideTo:Y.params.slidesPerView===m.slidesPerView?n:!1})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...z,slideTo:l.controller.control.params.slidesPerView===m.slidesPerView?n:!1})}l.emit("loopFix")}function Tie(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(i=>{const o=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;r[o]=i}),e.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),r.forEach(i=>{n.append(i)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var Oie={loopCreate:Rie,loopFix:Pie,loopDestroy:Tie};function Lie(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function jie(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var Iie={setGrabCursor:Lie,unsetGrabCursor:jie};function Mie(e,t){t===void 0&&(t=this);function n(r){if(!r||r===Yu()||r===Oi())return null;r.assignedSlot&&(r=r.assignedSlot);const i=r.closest(e);return!i&&!r.getRootNode?null:i||n(r.getRootNode().host)}return n(t)}function FR(e,t,n){const r=Oi(),{params:i}=e,o=i.edgeSwipeDetection,s=i.edgeSwipeThreshold;return o&&(n<=s||n>=r.innerWidth-s)?o==="prevent"?(t.preventDefault(),!0):!1:!0}function $ie(e){const t=this,n=Yu();let r=e;r.originalEvent&&(r=r.originalEvent);const i=t.touchEventsData;if(r.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==r.pointerId)return;i.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(i.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){FR(t,r,r.targetTouches[0].pageX);return}const{params:o,touches:s,enabled:a}=t;if(!a||!o.simulateTouch&&r.pointerType==="mouse"||t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let l=r.target;if(o.touchEventsTarget==="wrapper"&&!t.wrapperEl.contains(l)||"which"in r&&r.which===3||"button"in r&&r.button>0||i.isTouched&&i.isMoved)return;const c=!!o.noSwipingClass&&o.noSwipingClass!=="",u=r.composedPath?r.composedPath():r.path;c&&r.target&&r.target.shadowRoot&&u&&(l=u[0]);const d=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,f=!!(r.target&&r.target.shadowRoot);if(o.noSwiping&&(f?Mie(d,l):l.closest(d))){t.allowClick=!0;return}if(o.swipeHandler&&!l.closest(o.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const m=s.currentX,h=s.currentY;if(!FR(t,r,m))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=m,s.startY=h,i.touchStartTime=gg(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(i.allowThresholdMove=!1);let g=!0;l.matches(i.focusableElements)&&(g=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&n.activeElement.blur();const E=g&&t.allowTouchMove&&o.touchStartPreventDefault;(o.touchStartForcePreventDefault||E)&&!l.isContentEditable&&r.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function Nie(e){const t=Yu(),n=this,r=n.touchEventsData,{params:i,touches:o,rtlTranslate:s,enabled:a}=n;if(!a||!i.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(r.touchId!==null||l.pointerId!==r.pointerId))return;let c;if(l.type==="touchmove"){if(c=[...l.changedTouches].filter(T=>T.identifier===r.touchId)[0],!c||c.identifier!==r.touchId)return}else c=l;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l);return}const u=c.pageX,d=c.pageY;if(l.preventedByNestedSwiper){o.startX=u,o.startY=d;return}if(!n.allowTouchMove){l.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d}),r.touchStartTime=gg());return}if(i.touchReleaseOnEdges&&!i.loop){if(n.isVertical()){if(do.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else if(uo.startX&&n.translate>=n.minTranslate())return}if(t.activeElement&&l.target===t.activeElement&&l.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",l),o.previousX=o.currentX,o.previousY=o.currentY,o.currentX=u,o.currentY=d;const f=o.currentX-o.startX,m=o.currentY-o.startY;if(n.params.threshold&&Math.sqrt(f**2+m**2)"u"){let T;n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?r.isScrolling=!1:f*f+m*m>=25&&(T=Math.atan2(Math.abs(m),Math.abs(f))*180/Math.PI,r.isScrolling=n.isHorizontal()?T>i.touchAngle:90-T>i.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),typeof r.startMoving>"u"&&(o.currentX!==o.startX||o.currentY!==o.startY)&&(r.startMoving=!0),r.isScrolling||l.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let h=n.isHorizontal()?f:m,g=n.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(h=Math.abs(h)*(s?1:-1),g=Math.abs(g)*(s?1:-1)),o.diff=h,h*=i.touchRatio,s&&(h=-h,g=-g);const E=n.touchesDirection;n.swipeDirection=h>0?"prev":"next",n.touchesDirection=g>0?"prev":"next";const b=n.params.loop&&!i.cssMode,w=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(b&&w&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const T=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});n.wrapperEl.dispatchEvent(T)}r.allowMomentumBounce=!1,i.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}let y;if(new Date().getTime(),r.isMoved&&r.allowThresholdMove&&E!==n.touchesDirection&&b&&w&&Math.abs(h)>=1){Object.assign(o,{startX:u,startY:d,currentX:u,currentY:d,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=h+r.startTranslate;let _=!0,R=i.resistanceRatio;if(i.touchReleaseOnEdges&&(R=0),h>0?(b&&w&&!y&&r.allowThresholdMove&&r.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(_=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+h)**R))):h<0&&(b&&w&&!y&&r.allowThresholdMove&&r.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]:n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(i.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),r.currentTranslater.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),i.threshold>0)if(Math.abs(h)>i.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,r.currentTranslate=r.startTranslate,o.diff=n.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{r.currentTranslate=r.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function Aie(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let i;if(r.type==="touchend"||r.type==="touchcancel"){if(i=[...r.changedTouches].filter(R=>R.identifier===n.touchId)[0],!i||i.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;i=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:s,touches:a,rtlTranslate:l,slidesGrid:c,enabled:u}=t;if(!u||!s.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}s.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=gg(),f=d-n.touchStartTime;if(t.allowClick){const R=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(R&&R[0]||r.target,R),t.emit("tap click",r),f<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=gg(),X1(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||a.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let m;if(s.followFinger?m=l?t.translate:-t.translate:m=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:m});return}const h=m>=-t.maxTranslate()&&!t.params.loop;let g=0,E=t.slidesSizesGrid[0];for(let R=0;R=c[R]&&m=c[R])&&(g=R,E=c[c.length-1]-c[c.length-2])}let b=null,w=null;s.rewind&&(t.isBeginning?w=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const y=(m-c[g])/E,_=gs.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(y>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?b:g+_):t.slideTo(g)),t.swipeDirection==="prev"&&(y>1-s.longSwipesRatio?t.slideTo(g+_):w!==null&&y<0&&Math.abs(y)>s.longSwipesRatio?t.slideTo(w):t.slideTo(g))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(g+_):t.slideTo(g):(t.swipeDirection==="next"&&t.slideTo(b!==null?b:g+_),t.swipeDirection==="prev"&&t.slideTo(w!==null?w:g))}}function zR(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:o}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!a?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=r,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function Die(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Bie(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let i;const o=e.maxTranslate()-e.minTranslate();o===0?i=0:i=(e.translate-e.minTranslate())/o,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Fie(e){const t=this;im(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function zie(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const cM=(e,t)=>{const n=Yu(),{params:r,el:i,wrapperEl:o,device:s}=e,a=!!r.nested,l=t==="on"?"addEventListener":"removeEventListener",c=t;n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&i[l]("click",e.onClick,!0),r.cssMode&&o[l]("scroll",e.onScroll),r.updateOnWindowResize?e[c](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",zR,!0):e[c]("observerUpdate",zR,!0),i[l]("load",e.onLoad,{capture:!0})};function Uie(){const e=this,{params:t}=e;e.onTouchStart=$ie.bind(e),e.onTouchMove=Nie.bind(e),e.onTouchEnd=Aie.bind(e),e.onDocumentTouchStart=zie.bind(e),t.cssMode&&(e.onScroll=Bie.bind(e)),e.onClick=Die.bind(e),e.onLoad=Fie.bind(e),cM(e,"on")}function Wie(){cM(this,"off")}var Gie={attachEvents:Uie,detachEvents:Wie};const UR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function Hie(){const e=this,{realIndex:t,initialized:n,params:r,el:i}=e,o=r.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const s=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!s||e.currentBreakpoint===s)return;const l=(s in o?o[s]:void 0)||e.originalParams,c=UR(e,r),u=UR(e,l),d=e.params.grabCursor,f=l.grabCursor,m=r.enabled;c&&!u?(i.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&u&&(i.classList.add(`${r.containerModifierClass}grid`),(l.grid.fill&&l.grid.fill==="column"||!l.grid.fill&&r.grid.fill==="column")&&i.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),d&&!f?e.unsetGrabCursor():!d&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(y=>{if(typeof l[y]>"u")return;const _=r[y]&&r[y].enabled,R=l[y]&&l[y].enabled;_&&!R&&e[y].disable(),!_&&R&&e[y].enable()});const h=l.direction&&l.direction!==r.direction,g=r.loop&&(l.slidesPerView!==r.slidesPerView||h),E=r.loop;h&&n&&e.changeDirection(),pi(e.params,l);const b=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!b?e.disable():!m&&b&&e.enable(),e.currentBreakpoint=s,e.emit("_beforeBreakpoint",l),n&&(g?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!E&&w?(e.loopCreate(t),e.updateSlides()):E&&!w&&e.loopDestroy()),e.emit("breakpoint",l)}function Vie(e,t,n){if(t===void 0&&(t="window"),!e||t==="container"&&!n)return;let r=!1;const i=Oi(),o=t==="window"?i.innerHeight:n.clientHeight,s=Object.keys(e).map(a=>{if(typeof a=="string"&&a.indexOf("@")===0){const l=parseFloat(a.substr(1));return{value:o*l,point:a}}return{value:a,point:a}});s.sort((a,l)=>parseInt(a.value,10)-parseInt(l.value,10));for(let a=0;a{typeof r=="object"?Object.keys(r).forEach(i=>{r[i]&&n.push(t+i)}):typeof r=="string"&&n.push(t+r)}),n}function Yie(){const e=this,{classNames:t,params:n,rtl:r,el:i,device:o}=e,s=qie(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),i.classList.add(...t),e.emitContainerClasses()}function Qie(){const e=this,{el:t,classNames:n}=e;t.classList.remove(...n),e.emitContainerClasses()}var Xie={addClasses:Yie,removeClasses:Qie};function Jie(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const i=e.slides.length-1,o=e.slidesGrid[i]+e.slidesSizesGrid[i]+r*2;e.isLocked=e.size>o}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var Zie={checkOverflow:Jie},ew={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function eoe(e,t){return function(r){r===void 0&&(r={});const i=Object.keys(r)[0],o=r[i];if(typeof o!="object"||o===null){pi(t,r);return}if(e[i]===!0&&(e[i]={enabled:!0}),i==="navigation"&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),!(i in e&&"enabled"in o)){pi(t,r);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),pi(t,r)}}const Z0={eventsEmitter:Xre,update:lie,translate:hie,transition:yie,slide:Eie,loop:Oie,grabCursor:Iie,events:Gie,breakpoints:Kie,checkOverflow:Zie,classes:Xie},eb={};let FS=class hs{constructor(){let t,n;for(var r=arguments.length,i=new Array(r),o=0;o1){const u=[];return s.querySelectorAll(n.el).forEach(d=>{const f=pi({},n,{el:d});u.push(new hs(f))}),u}const a=this;a.__swiper__=!0,a.support=sM(),a.device=aM({userAgent:n.userAgent}),a.browser=qre(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],n.modules&&Array.isArray(n.modules)&&a.modules.push(...n.modules);const l={};a.modules.forEach(u=>{u({params:n,swiper:a,extendParams:eoe(n,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const c=pi({},ew,l);return a.params=pi({},c,eb,n),a.originalParams=pi({},a.params),a.passedParams=pi({},n),a.params&&a.params.on&&Object.keys(a.params.on).forEach(u=>{a.on(u,a.params.on[u])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return a.params.direction==="horizontal"},isVertical(){return a.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:n,params:r}=this,i=Cs(n,`.${r.slideClass}, swiper-slide`),o=DR(i[0]);return DR(t)-o}getSlideIndexByData(t){return this.getSlideIndex(this.slides.filter(n=>n.getAttribute("data-swiper-slide-index")*1===t)[0])}recalcSlides(){const t=this,{slidesEl:n,params:r}=t;t.slides=Cs(n,`.${r.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const r=this;t=Math.min(Math.max(t,0),1);const i=r.minTranslate(),s=(r.maxTranslate()-i)*t+i;r.translateTo(s,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const i=t.getSlideClasses(r);n.push({slideEl:r,classNames:i}),t.emit("_slideClass",r,i)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t,n){t===void 0&&(t="current"),n===void 0&&(n=!1);const r=this,{params:i,slides:o,slidesGrid:s,slidesSizesGrid:a,size:l,activeIndex:c}=r;let u=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let d=o[c]?Math.ceil(o[c].swiperSlideSize):0,f;for(let m=c+1;ml&&(f=!0));for(let m=c-1;m>=0;m-=1)o[m]&&!f&&(d+=o[m].swiperSlideSize,u+=1,d>l&&(f=!0))}else if(t==="current")for(let d=c+1;d=0;d-=1)s[c]-s[d]{s.complete&&im(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function i(){const s=t.rtlTranslate?t.translate*-1:t.translate,a=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}let o;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)i(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const s=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;o=t.slideTo(s.length-1,0,!1,!0)}else o=t.slideTo(t.activeIndex,0,!1,!0);o||i()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n){n===void 0&&(n=!0);const r=this,i=r.params.direction;return t||(t=i==="horizontal"?"vertical":"horizontal"),t===i||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${i}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(o=>{t==="vertical"?o.style.width="":o.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const i=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(i()):Cs(r,i())[0];return!s&&n.params.createElements&&(s=J1("div",n.params.wrapperClass),r.append(s),Cs(r,`.${n.params.slideClass}`).forEach(a=>{s.append(a)})),Object.assign(n,{el:r,wrapperEl:s,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:s,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||_a(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||_a(r,"direction")==="rtl"),wrongRTL:_a(s,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(),n.attachEvents();const i=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&i.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(o=>{o.complete?im(n,o):o.addEventListener("load",s=>{im(n,s.target)})}),Z1(n),n.initialized=!0,Z1(n),n.emit("init"),n.emit("afterInit"),n}destroy(t,n){t===void 0&&(t=!0),n===void 0&&(n=!0);const r=this,{params:i,el:o,wrapperEl:s,slides:a}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),i.loop&&r.loopDestroy(),n&&(r.removeClasses(),o.removeAttribute("style"),s.removeAttribute("style"),a&&a.length&&a.forEach(l=>{l.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(l=>{r.off(l)}),t!==!1&&(r.el.swiper=null,Dre(r)),r.destroyed=!0),null}static extendDefaults(t){pi(eb,t)}static get extendedDefaults(){return eb}static get defaults(){return ew}static installModule(t){hs.prototype.__modules__||(hs.prototype.__modules__=[]);const n=hs.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>hs.installModule(n)),hs):(hs.installModule(t),hs)}};Object.keys(Z0).forEach(e=>{Object.keys(Z0[e]).forEach(t=>{FS.prototype[t]=Z0[e][t]})});FS.use([Yre,Qre]);const uM=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Jl(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function uu(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:Jl(t[r])&&Jl(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:uu(e[r],t[r]):e[r]=t[r]})}function dM(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function fM(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function pM(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function hM(e){e===void 0&&(e="");const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function toe(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function noe(e){let{swiper:t,slides:n,passedParams:r,changedParams:i,nextEl:o,prevEl:s,scrollbarEl:a,paginationEl:l}=e;const c=i.filter(A=>A!=="children"&&A!=="direction"&&A!=="wrapperClass"),{params:u,pagination:d,navigation:f,scrollbar:m,virtual:h,thumbs:g}=t;let E,b,w,y,_,R,T,C;i.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&u.thumbs&&!u.thumbs.swiper&&(E=!0),i.includes("controller")&&r.controller&&r.controller.control&&u.controller&&!u.controller.control&&(b=!0),i.includes("pagination")&&r.pagination&&(r.pagination.el||l)&&(u.pagination||u.pagination===!1)&&d&&!d.el&&(w=!0),i.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||a)&&(u.scrollbar||u.scrollbar===!1)&&m&&!m.el&&(y=!0),i.includes("navigation")&&r.navigation&&(r.navigation.prevEl||s)&&(r.navigation.nextEl||o)&&(u.navigation||u.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(_=!0);const I=A=>{t[A]&&(t[A].destroy(),A==="navigation"?(t.isElement&&(t[A].prevEl.remove(),t[A].nextEl.remove()),u[A].prevEl=void 0,u[A].nextEl=void 0,t[A].prevEl=void 0,t[A].nextEl=void 0):(t.isElement&&t[A].el.remove(),u[A].el=void 0,t[A].el=void 0))};i.includes("loop")&&t.isElement&&(u.loop&&!r.loop?R=!0:!u.loop&&r.loop?T=!0:C=!0),c.forEach(A=>{if(Jl(u[A])&&Jl(r[A]))Object.assign(u[A],r[A]),(A==="navigation"||A==="pagination"||A==="scrollbar")&&"enabled"in r[A]&&!r[A].enabled&&I(A);else{const j=r[A];(j===!0||j===!1)&&(A==="navigation"||A==="pagination"||A==="scrollbar")?j===!1&&I(A):u[A]=r[A]}}),c.includes("controller")&&!b&&t.controller&&t.controller.control&&u.controller&&u.controller.control&&(t.controller.control=u.controller.control),i.includes("children")&&n&&h&&u.virtual.enabled?(h.slides=n,h.update(!0)):i.includes("virtual")&&h&&u.virtual.enabled&&(n&&(h.slides=n),h.update(!0)),i.includes("children")&&n&&u.loop&&(C=!0),E&&g.init()&&g.update(!0),b&&(t.controller.control=u.controller.control),w&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(u.pagination.el=l),d.init(),d.render(),d.update()),y&&(t.isElement&&(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-scrollbar"),a.part.add("scrollbar"),t.el.appendChild(a)),a&&(u.scrollbar.el=a),m.init(),m.updateSize(),m.setTranslate()),_&&(t.isElement&&((!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-next"),o.innerHTML=t.hostEl.constructor.nextButtonSvg,o.part.add("button-next"),t.el.appendChild(o)),(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-prev"),s.innerHTML=t.hostEl.constructor.prevButtonSvg,s.part.add("button-prev"),t.el.appendChild(s))),o&&(u.navigation.nextEl=o),s&&(u.navigation.prevEl=s),f.init(),f.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=r.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=r.allowSlidePrev),i.includes("direction")&&t.changeDirection(r.direction,!1),(R||C)&&t.loopDestroy(),(T||C)&&t.loopCreate(),t.update()}function roe(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const n={on:{}},r={},i={};uu(n,ew),n._emitClasses=!0,n.init=!1;const o={},s=uM.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(s.indexOf(l)>=0?Jl(e[l])?(n[l]={},i[l]={},uu(n[l],e[l]),uu(i[l],e[l])):(n[l]=e[l],i[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?r[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:n.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:o[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{n[l]===!0&&(n[l]={}),n[l]===!1&&delete n[l]}),{params:n,passedParams:i,rest:o,events:r}}function ioe(e,t){let{el:n,nextEl:r,prevEl:i,paginationEl:o,scrollbarEl:s,swiper:a}=e;dM(t)&&r&&i&&(a.params.navigation.nextEl=r,a.originalParams.navigation.nextEl=r,a.params.navigation.prevEl=i,a.originalParams.navigation.prevEl=i),fM(t)&&o&&(a.params.pagination.el=o,a.originalParams.pagination.el=o),pM(t)&&s&&(a.params.scrollbar.el=s,a.originalParams.scrollbar.el=s),a.init(n)}function ooe(e,t,n,r,i){const o=[];if(!t)return o;const s=l=>{o.indexOf(l)<0&&o.push(l)};if(n&&r){const l=r.map(i),c=n.map(i);l.join("")!==c.join("")&&s("children"),r.length!==n.length&&s("children")}return uM.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(Jl(e[l])&&Jl(t[l])){const c=Object.keys(e[l]),u=Object.keys(t[l]);c.length!==u.length?s(l):(c.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}),u.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}))}else e[l]!==t[l]&&s(l)}),o}const soe=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function yg(){return yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{mM(n)?t.push(n):n.props&&n.props.children&&gM(n.props.children).forEach(r=>t.push(r))}),t}function aoe(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return Pt.Children.toArray(e).forEach(r=>{if(mM(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const i=gM(r.props.children);i.length>0?i.forEach(o=>t.push(o)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function loe(e,t,n){if(!n)return null;const r=u=>{let d=u;return u<0?d=t.length+u:d>=t.length&&(d=d-t.length),d},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:o,to:s}=n,a=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,c=[];for(let u=a;u=o&&u<=s&&c.push(t[r(u)]);return c.map((u,d)=>Pt.cloneElement(u,{swiper:e,style:i,key:u.props.virtualIndex||u.key||`slide-${d}`}))}function cf(e,t){return typeof window>"u"?k.useEffect(e,t):k.useLayoutEffect(e,t)}const WR=k.createContext(null),coe=k.createContext(null),Ep=k.forwardRef(function(e,t){let{className:n,tag:r="div",wrapperTag:i="div",children:o,onSwiper:s,...a}=e===void 0?{}:e,l=!1;const[c,u]=k.useState("swiper"),[d,f]=k.useState(null),[m,h]=k.useState(!1),g=k.useRef(!1),E=k.useRef(null),b=k.useRef(null),w=k.useRef(null),y=k.useRef(null),_=k.useRef(null),R=k.useRef(null),T=k.useRef(null),C=k.useRef(null),{params:I,passedParams:A,rest:j,events:$}=roe(a),{slides:F,slots:z}=aoe(o),Y=()=>{h(!m)};Object.assign(I.on,{_containerClasses(V,le){u(le)}});const J=()=>{Object.assign(I.on,$),l=!0;const V={...I};if(delete V.wrapperClass,b.current=new FS(V),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=F;const le={cache:!1,slides:F,renderExternal:f,renderExternalUpdate:!1};uu(b.current.params.virtual,le),uu(b.current.originalParams.virtual,le)}};E.current||J(),b.current&&b.current.on("_beforeBreakpoint",Y);const Z=()=>{l||!$||!b.current||Object.keys($).forEach(V=>{b.current.on(V,$[V])})},pe=()=>{!$||!b.current||Object.keys($).forEach(V=>{b.current.off(V,$[V])})};k.useEffect(()=>()=>{b.current&&b.current.off("_beforeBreakpoint",Y)}),k.useEffect(()=>{!g.current&&b.current&&(b.current.emitSlidesClasses(),g.current=!0)}),cf(()=>{if(t&&(t.current=E.current),!!E.current)return b.current.destroyed&&J(),ioe({el:E.current,nextEl:_.current,prevEl:R.current,paginationEl:T.current,scrollbarEl:C.current,swiper:b.current},I),s&&!b.current.destroyed&&s(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),cf(()=>{Z();const V=ooe(A,w.current,F,y.current,le=>le.key);return w.current=A,y.current=F,V.length&&b.current&&!b.current.destroyed&&noe({swiper:b.current,slides:F,passedParams:A,changedParams:V,nextEl:_.current,prevEl:R.current,scrollbarEl:C.current,paginationEl:T.current}),()=>{pe()}}),cf(()=>{soe(b.current)},[d]);function G(){return I.virtual?loe(b.current,F,d):F.map((V,le)=>Pt.cloneElement(V,{swiper:b.current,swiperSlideIndex:le}))}return Pt.createElement(r,yg({ref:E,className:hM(`${c}${n?` ${n}`:""}`)},j),Pt.createElement(coe.Provider,{value:b.current},z["container-start"],Pt.createElement(i,{className:toe(I.wrapperClass)},z["wrapper-start"],G(),z["wrapper-end"]),dM(I)&&Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{ref:R,className:"swiper-button-prev"}),Pt.createElement("div",{ref:_,className:"swiper-button-next"})),pM(I)&&Pt.createElement("div",{ref:C,className:"swiper-scrollbar"}),fM(I)&&Pt.createElement("div",{ref:T,className:"swiper-pagination"}),z["container-end"]))});Ep.displayName="Swiper";const Mu=k.forwardRef(function(e,t){let{tag:n="div",children:r,className:i="",swiper:o,zoom:s,lazy:a,virtualIndex:l,swiperSlideIndex:c,...u}=e===void 0?{}:e;const d=k.useRef(null),[f,m]=k.useState("swiper-slide"),[h,g]=k.useState(!1);function E(_,R,T){R===d.current&&m(T)}cf(()=>{if(typeof c<"u"&&(d.current.swiperSlideIndex=c),t&&(t.current=d.current),!(!d.current||!o)){if(o.destroyed){f!=="swiper-slide"&&m("swiper-slide");return}return o.on("_slideClass",E),()=>{o&&o.off("_slideClass",E)}}}),cf(()=>{o&&d.current&&!o.destroyed&&m(o.getSlideClasses(d.current))},[o]);const b={isActive:f.indexOf("swiper-slide-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0},w=()=>typeof r=="function"?r(b):r,y=()=>{g(!0)};return Pt.createElement(n,yg({ref:d,className:hM(`${f}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:y},u),s&&Pt.createElement(WR.Provider,{value:b},Pt.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s=="number"?s:void 0},w(),a&&!h&&Pt.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&Pt.createElement(WR.Provider,{value:b},w(),a&&!h&&Pt.createElement("div",{className:"swiper-lazy-preloader"})))});Mu.displayName="SwiperSlide";const uoe=({guild:e})=>{const t=k.useRef(null),[n,r]=k.useState(1);k.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=k.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/1e3,l=s/700,c=Math.min(a,l,1);r(c??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs("div",{style:{width:`${1e3*n}px`,height:`${700*n}px`,display:"flex",flexDirection:"row"},children:[v.jsx("div",{className:"card-front",style:{backgroundImage:`url(${sn.get(`${e}_front`)})`,"--scale":n,borderTopRightRadius:0,borderBottomRightRadius:0}}),v.jsx("div",{className:"card-back",style:{backgroundImage:`url(${sn.get(`${e}_back`)})`,"--scale":n,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})};function vM({guild:e}){const t=k.useRef(null),n=k.useRef(null),[r,i]=k.useState(1);k.useLayoutEffect(()=>(o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)));const o=k.useCallback(()=>{if(!t.current)return;const{width:s,height:a}=t.current.getBoundingClientRect(),l=s/500,c=a/700,u=Math.min(l,c,1);i(u??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{ref:n,className:"flip-card",onClick:()=>{var s;(s=n.current)==null||s.classList.toggle("flipped")},children:v.jsxs("div",{className:"flip-card-inner",children:[v.jsx("div",{className:"flip-card-front",children:v.jsx("div",{className:"card-front",style:{backgroundImage:`url(${sn.get(`${e}_front`)})`,"--scale":r}})}),v.jsx("div",{className:"flip-card-back",children:v.jsx("div",{className:"card-back",style:{backgroundImage:`url(${sn.get(`${e}_back`)})`,"--scale":r}})})]})})})}function doe(){const[e,t]=k.useState(!1),[n,r]=k.useState(!1),i=yD(k.useCallback(s=>s.nextLocation.pathname.startsWith("/game")?(t(!0),!0):!1,[t]));k.useEffect(()=>{r(!0)},[n,r]);const{active:o}=Ys();return v.jsxs(Zt,{style:{width:"100%",height:"100%",display:"flex",flexDirection:"row"},children:[v.jsx(ls,{children:v.jsxs(Zt,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[v.jsxs(qa,{separator:v.jsx(ic,{fontSize:"small"}),children:[v.jsx(Lo,{color:"inherit",href:"/game",size:"small",disabled:o,children:v.jsx(TS,{})}),o?v.jsx(wt,{children:"Draft"}):v.jsx(vo,{underline:"hover",color:"inherit",href:"/game/draft",children:"Draft"}),v.jsx(wt,{children:"Play"})]}),v.jsx(LS,{})]})}),v.jsx(foe,{}),v.jsx($V,{open:e,onClose:()=>t(!1),autoHideDuration:5e3,children:v.jsx(gU,{severity:"warning",action:v.jsx(yn,{size:"small",onClick:i.proceed,children:"Exit Game"}),children:"Making changes to the team selections will reset the game state."})})]})}function foe(){const e=Pi(),t=kx(e.breakpoints.up("sm")),{active:n}=Ys(),{gameState1$:r,gameState2$:i}=iy(),[o,s]=k.useState();k.useEffect(()=>{if(!r)return;let d=!1;return(async()=>{const m=await $n(r);d||s(m)})(),()=>{d=!0}},[r]);const[a,l]=k.useState();k.useEffect(()=>{if(!i)return;let d=!1;return(async()=>{const m=await $n(i);d||l(m)})(),()=>{d=!0}},[i]);const[c,u]=io(async d=>{if(!o||!a)return;const f=await d.models.find().where("id").in(o.roster.map(E=>E.name)).exec(),m=await Promise.all(f.map(E=>E.expand()));Fs(m,"id",o.roster.map(E=>E.name));const h=await d.models.find().where("id").in(a.roster.map(E=>E.name)).exec(),g=await Promise.all(h.map(E=>E.expand()));return Fs(g,"id",a.roster.map(E=>E.name)),[m,g]},[o,a])??[];return!o||!a||!c||!u?null:t?v.jsxs(v.Fragment,{children:[v.jsx(tb,{teams:[o],rosters:[c],disabled:[!1]}),v.jsx(Zo,{orientation:"vertical"}),v.jsx(tb,{teams:[a],rosters:[u],disabled:[!!n]})]}):v.jsx(tb,{teams:[o,a],rosters:[c,u],disabled:[!1,!!n]})}const tb=({teams:e,rosters:t,disabled:n})=>{const r=Pi(),i=kx(r.breakpoints.up("sm")),o=k.useRef(null),[s,a]=k.useState(!1),[l,c]=k.useState(0),[u,d]=k.useState(!0),[f,m]=k.useState(500),[h,g]=k.useState(700),[E,b]=k.useState(700);k.useLayoutEffect(()=>(w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)));const w=k.useCallback(()=>{var T,C;const y=((T=o.current)==null?void 0:T.getBoundingClientRect().width)??0,_=((C=o.current)==null?void 0:C.getBoundingClientRect().height)??0,R=i?56:112;m(Math.min(y-12,(_-R)*5/7-12)),g(Math.min(_-R-12,y*7/5-12)),b(_-R)},[i]);return v.jsxs("div",{ref:o,style:{width:"100%",display:"flex",flexDirection:"column"},children:[v.jsx(bre,{disabled:n,teams:e,rosters:t,expanded:u,onClick:(y,_)=>{c(y),d(_),a(!_)}}),v.jsx("div",{style:{position:"relative",overflow:"hidden",flexGrow:1},children:v.jsx(Cv,{disablePortal:!0,sx:{zIndex:1100},open:s,onClose:()=>{a(!1),d(!0)},componentsProps:{root:{style:{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"}},backdrop:{style:{position:"absolute"}}},children:v.jsx(Ep,{initialSlide:l,direction:"vertical",centeredSlides:!0,spaceBetween:(E-Math.min(h,500))/2,onInit:y=>{y.el.style.width=`${Math.min(f,500)}px`,y.el.style.height=`${Math.min(h,700)}px`},style:{overflow:"visible"},children:e.map((y,_)=>[()=>v.jsx(vM,{guild:y.guild}),t[_].map((R,T)=>()=>v.jsx(rM,{model:R,health$:y.get$("roster").pipe(qt(C=>C[T].health)),children:v.jsx(poe,{model:R,state:e[_],disabled:n[_]})}))]).flat(2).map((y,_)=>v.jsx(Mu,{children:v.jsx("div",{style:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:y==null?void 0:y()})},_))})})})]})};function poe({state:e,model:t,disabled:n=!1}){return v.jsx(ss,{elevation:2,sx:{position:"absolute",right:0,bottom:0},children:v.jsx(tM,{state:e,model:t,disabled:n,stacked:!0})})}function hoe(){const e=Gs(),{setting$:t}=ai(),[n,r]=k.useState(null);k.useEffect(()=>{t&&$n(t).then(m=>m==null?void 0:m.incrementalPatch({gamePlayRoute:`${e.pathname}${e.search}`})).catch(console.error)},[e,t]);const{gbdb:i}=Vr(),{active:o,netDoc:s}=Ys(),a=o?s==null?void 0:s.get("uid"):"Player1",l=o?s==null?void 0:s.get("oid"):"Player2",[c,u]=k.useState();k.useEffect(()=>{const m=i==null?void 0:i.game_state.findOne(a).$;if(u(m),!m)return;let h=!1;return(async()=>{if(h)return;await $n(m)===null&&await(i==null?void 0:i.game_state.upsert({_id:a,roster:[]}))})().catch(console.error),()=>{h=!0}},[i,a]);const[d,f]=k.useState();return k.useEffect(()=>{const m=i==null?void 0:i.game_state.findOne(l).$;if(f(m),!m)return;let h=!1;return(async()=>{if(h)return;await $n(m)===null&&!o&&await(i==null?void 0:i.game_state.upsert({_id:l,roster:[]}))})().catch(console.error),()=>{h=!0}},[i,l,o]),v.jsxs("main",{style:{width:"100%",height:"100%",overflow:"auto",display:"flex"},children:[v.jsxs(ls,{children:[v.jsx(Zt,{ref:m=>r(m),sx:{width:"100%",display:"flex",flexDirection:"row"}}),v.jsx(Bee,{})]}),v.jsx(PS.Provider,{value:n,children:v.jsx(nx,{context:{gameState1$:c,gameState2$:d}})})]})}function moe({model:e}){const{setting$:t}=ai(),n=k.useRef(null),[r,i]=k.useState(1),[o,s]=k.useState();k.useEffect(()=>{const d=t==null?void 0:t.pipe(qt(f=>f==null?void 0:f.toJSON().data.cardPreferences.preferredStyle)).subscribe(f=>s(f));return()=>d==null?void 0:d.unsubscribe()},[t]),k.useLayoutEffect(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)));const a=k.useCallback(()=>{if(!n.current)return;const{width:d,height:f}=n.current.getBoundingClientRect(),m=d/1e3,h=f/700,g=Math.min(m,h,1);i(g??1)},[]),l=e.id,u=o==="gbcp"&&(sn.has(`${l}_gbcp_front`)||sn.has(`${l}_full`))?sn.get(`${l}_full`)??void 0:void 0;return v.jsx("div",{ref:n,style:{width:"100%",maxWidth:"1000px",height:"100%",maxHeight:"700px",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs("div",{style:{width:`${1e3*r}px`,height:`${700*r}px`,display:"flex",flexDirection:"row",...u?{backgroundImage:`url(${u})`,backgroundSize:"100%",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:`${25*r}px`}:{}},children:[v.jsx(hg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopRightRadius:0,borderBottomRightRadius:0}}),v.jsx(mg,{model:e,noBackground:!!u,style:{"--scale":r,borderTopLeftRadius:0,borderBottomLeftRadius:0}})]})})}const goe="/assets/GB-S4-Reference-1-Cx3eC7d4.png",voe="/assets/GB-S4-Reference-2-CJ4YgyH9.png",yoe="/assets/GB-S4-Reference-3-BTbZpB51.png",boe="/assets/GB-S4-Reference-4-CpP58Tap.png",woe="/assets/GB-S4-Reference-5-Be8xjsp1.png",xoe=new URL("/assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",import.meta.url).href,yM=e=>{const t=e.gameplan,n=new Intl.NumberFormat("en-US",{signDisplay:"always"});return v.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${xoe})`,...e.style},children:v.jsxs("div",{className:"overlay",children:[v.jsx("div",{style:{height:"255px",flexShrink:0}}),v.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",fontFamily:"Crimson Text",letterSpacing:"-1px"},children:[v.jsx("div",{style:{fontFamily:"IM Fell Great Primer SC",fontSize:"33.33pt",display:"flex",flexDirection:"column",alignItems:"center",lineHeight:"0.8em",margin:"0.25em 0"},children:t.title.split(/\n/).map((r,i)=>v.jsx("span",{children:r.split(/(?=[A-Z])/).map((o,s)=>v.jsx("span",{className:new RegExp("^\\p{Lu}","u").test(o)?"dropcap":"",children:v.jsx("span",{children:o},`p${i}s${s}c`)},`p${i}s${s}`))},`l${i}`))}),v.jsxs("div",{style:{fontSize:"20pt",margin:"0 1em",whiteSpace:"pre-wrap",display:"flex",flexDirection:"column",alignItems:"center"},children:[t.text,v.jsx("p",{style:{fontStyle:"italic",margin:"0.5em 0"},children:t.detail})]}),v.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,left:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:n.format(t.initiative)}),v.jsx("div",{style:{fontSize:"35pt",position:"absolute",bottom:40,right:40,width:"80px",height:"80px",borderRadius:"40px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},children:n.format(t.influence)}),v.jsx("div",{style:{fontFamily:"serif",fontSize:"10pt",position:"absolute",bottom:"2em",letterSpacing:0,wordSpacing:0},children:"™ & © Steamforged Games LTD 2019"})]})]})})},bM=e=>{const t=k.useRef(null),[n,r]=k.useState(1);k.useLayoutEffect(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)));const i=k.useCallback(()=>{if(!t.current)return;const{width:o,height:s}=t.current.getBoundingClientRect(),a=o/500,l=s/700,c=Math.min(a,l,1);r(c??1)},[]);return v.jsx("div",{ref:t,style:{width:"100%",maxWidth:"500px",height:"100%",maxHeight:"700px",padding:0,margin:0},children:v.jsx("div",{style:{width:`${500*n}px`,height:`${700*n}px`,display:"flex","--scale":n},children:e.children})})},Soe=e=>v.jsx(bM,{children:v.jsx(yM,{...e})}),wM=e=>{const t=new URL(Object.assign({"../assets/cards/Reference/GB-S4-Reference-1.png":goe,"../assets/cards/Reference/GB-S4-Reference-2.png":voe,"../assets/cards/Reference/GB-S4-Reference-3.png":yoe,"../assets/cards/Reference/GB-S4-Reference-4.png":boe,"../assets/cards/Reference/GB-S4-Reference-5.png":woe})[`../assets/cards/Reference/GB-S4-Reference-${e.index}.png`],import.meta.url).href;return v.jsx("div",{className:`card-front ${e.bleed?"bleed":null}`,style:{width:"100%",height:"100%",backgroundImage:`url(${t})`,...e.style}})},_oe=e=>v.jsx(bM,{children:v.jsx(wM,{...e})});function Coe(){const e=Gs(),{setting$:t}=ai(),[n]=HD(),r=k.useRef(n.get("m"));return k.useEffect(()=>{if(t)return $n(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${r.current}`})).catch(console.error),()=>{$n(t).then(i=>i==null?void 0:i.incrementalPatch({libraryRoute:`${e.pathname}?m=${r.current}`})).catch(console.error)}},[e,t]),v.jsx("main",{style:{display:"flex",flexDirection:"column-reverse",width:"100%",height:"100%"},children:v.jsx(k.Suspense,{fallback:v.jsx("p",{children:"Loading ..."}),children:v.jsx(nx,{context:{slideRef:r}})})})}function koe(){const{slideRef:e}=tp();return e.current=0,v.jsxs(v.Fragment,{children:[v.jsx(ls,{children:v.jsx(qa,{separator:v.jsx(ic,{fontSize:"small"}),children:v.jsx(wt,{children:"Library"})})}),v.jsx(NI,{Controller:Eoe}),v.jsx(oc,{})]})}function Eoe(e){const t=Ha();return k.useEffect(()=>{const n=e.update$.subscribe(r=>t(r));return()=>n.unsubscribe()},[t,e.update$]),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-evenly",margin:"5px"},children:[v.jsx(V1,{g:{key:"gameplans",name:"gameplans",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("gameplans"),size:e.size}),v.jsx(V1,{g:{key:"refcards",name:"Rules",icon:"GB",style:{color:"#f8f7f4"}},pickTeam:()=>t("refcards"),size:e.size})]})}function Roe(){const{guild:e}=lD(),t=Pi(),n=kx(t.breakpoints.up("sm")),r=k.useRef(null),[i,o]=k.useState(n?1e3:500),[s,a]=k.useState(700),l=k.useCallback(()=>{var b,w;const g=((b=r.current)==null?void 0:b.getBoundingClientRect().width)??0,E=((w=r.current)==null?void 0:w.getBoundingClientRect().height)??0;o(Math.min(g,E*(n?10:5)/7)-12),a(Math.min(E,g*7/5)-12)},[n]);k.useLayoutEffect(()=>(l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)));const[c,u]=k.useState(null),d=Ha(),{slideRef:f}=tp(),[m,h]=io(async g=>{const[E,b]=await Promise.all([g.guilds.findOne().where({name:e}).exec(),g.models.find().or([{guild1:e},{guild2:e}]).exec()]);if(!E||!b.length){d("/library");return}Fs(b,"id",E.roster);const w=await Promise.all(b.map(y=>y.expand()));return[E,w]},[e,d])??[];return!m||!h?null:v.jsxs(v.Fragment,{children:[v.jsx(ls,{children:v.jsxs(qa,{separator:v.jsx(ic,{fontSize:"small"}),children:[v.jsx(vo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(wt,{children:m.name})]})}),v.jsx(Ooe,{guild:m,swiper:c}),v.jsxs(Zt,{ref:r,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsxs(Ep,{onSwiper:u,initialSlide:f.current,onSlideChange:g=>{f.current=g.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:s},children:[v.jsx(Mu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:n?v.jsx(uoe,{guild:m.name}):v.jsx(vM,{guild:m.name})})},m.name),h.map(g=>v.jsx(Mu,{style:{width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:s,width:i,display:"flex",alignItems:"center",justifyContent:"center"},children:n?v.jsx(moe,{model:g}):v.jsx(rM,{model:g})})},g.id))]}),v.jsx(oc,{})]})]})}function Poe(){const t=k.useRef(null),[n,r]=k.useState(500),[i,o]=k.useState(700),s=k.useCallback(()=>{var m,h;const d=((m=t.current)==null?void 0:m.getBoundingClientRect().width)??0,f=((h=t.current)==null?void 0:h.getBoundingClientRect().height)??0;r(Math.min(d,f*5/7)-12),o(Math.min(f,d*7/5)-12)},[!1]);k.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=k.useState(null),{slideRef:c}=tp(),{gameplans:u}=Vr();return u?v.jsxs(v.Fragment,{children:[v.jsx(ls,{children:v.jsxs(qa,{separator:v.jsx(ic,{fontSize:"small"}),children:[v.jsx(vo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(wt,{children:"Gameplan Cards"})]})}),v.jsx(Loe,{swiper:a}),v.jsxs(Zt,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Ep,{onSwiper:l,initialSlide:c.current,onSlideChange:d=>{c.current=d.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:u.map((d,f)=>v.jsx(Mu,{style:{width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:i,width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(Soe,{gameplan:d})})},`gameplan-${f}`))}),v.jsx(oc,{})]})]}):null}function Toe(){const t=k.useRef(null),[n,r]=k.useState(500),[i,o]=k.useState(700),s=k.useCallback(()=>{var f,m;const u=((f=t.current)==null?void 0:f.getBoundingClientRect().width)??0,d=((m=t.current)==null?void 0:m.getBoundingClientRect().height)??0;r(Math.min(u,d*5/7)-12),o(Math.min(d,u*7/5)-12)},[!1]);k.useLayoutEffect(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)));const[a,l]=k.useState(null),{slideRef:c}=tp();return v.jsxs(v.Fragment,{children:[v.jsx(ls,{children:v.jsxs(qa,{separator:v.jsx(ic,{fontSize:"small"}),children:[v.jsx(vo,{underline:"hover",color:"inherit",href:"/library",children:"Library"}),v.jsx(wt,{children:"Rules Reference Cards"})]})}),v.jsx(joe,{swiper:a}),v.jsxs(Zt,{ref:t,sx:{height:"100%",position:"relative",display:"flex",alignItems:"center"},children:[v.jsx(Ep,{onSwiper:l,initialSlide:c.current,onSlideChange:u=>{c.current=u.activeIndex},slidesPerView:"auto",centeredSlides:!0,spaceBetween:.25*96,style:{height:i},children:[...Array(5).keys()].map(u=>u+1).map(u=>v.jsx(Mu,{style:{width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{height:i,width:n,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(_oe,{index:u})})},`ref-${u}`))}),v.jsx(oc,{})]})]})}function Ooe(e){const{guild:t,swiper:n}=e,r=t.roster;return v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsxs(Zt,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:[v.jsx(Lo,{sx:{padding:0},onClick:()=>{n==null||n.slideTo(0)},children:v.jsx("span",{children:v.jsx("div",{style:{width:"32px",height:"32px",backgroundColor:"black",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"},children:v.jsx(Ci,{icon:t.name,className:"dark",fontSize:"32px",style:{flexShrink:0}})})})}),r.map((i,o)=>v.jsx(Ux,{color:"primary",label:i,onClick:()=>{n==null||n.slideTo(o+1)}},o))]}),v.jsx("div",{style:{flex:"1 1"}})]})}function Loe(e){const{gameplans:t}=Vr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(Zt,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:t.map((r,i)=>v.jsx(Ux,{color:"primary",label:r.title,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}function joe(e){const{gameplans:t}=Vr(),{swiper:n}=e;return t?v.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.jsx("div",{style:{flex:"1 1"}}),v.jsx(Zt,{sx:{display:"flex",flex:"1 1 500px",flexWrap:"wrap",justifyContent:"center",gap:"5px"},children:["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((r,i)=>v.jsx(Ux,{color:"primary",label:r,onClick:()=>{n==null||n.slideTo(i)}},i))}),v.jsx("div",{style:{flex:"1 1"}})]}):null}const Ioe={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"اَلْعَرَبِيَّةُ"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Català"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},cs:{name:"Czech",nativeName:"čeština"},cu:{name:"Old Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"Dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"ދިވެހި"},dz:{name:"Dzongkha",nativeName:"རྫོང་ཁ"},ee:{name:"Ewe",nativeName:"Eʋegbe"},el:{name:"Greek",nativeName:"Ελληνικά"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Español"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"فارسی"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"Føroyskt"},fr:{name:"French",nativeName:"Français"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"Gàidhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaraní",nativeName:"Avañe'ẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hi:{name:"Hindi",nativeName:"हिन्दी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"Հայերեն"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"ქართული"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"қазақ тілі"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"ខេមរភាសា"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},ko:{name:"Korean",nativeName:"한국어"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी"},ku:{name:"Kurdish",nativeName:"Kurdî"},kv:{name:"Komi",nativeName:"коми кыв"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"Кыргызча"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latviešu valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mi:{name:"Māori",nativeName:"te reo Māori"},mk:{name:"Macedonian",nativeName:"македонски јазик"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mn:{name:"Mongolian",nativeName:"Монгол хэл"},mr:{name:"Marathi",nativeName:"मराठी"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"ဗမာစာ"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Diné bizaad"},ny:{name:"Chichewa",nativeName:"chiCheŵa"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Panjabi",nativeName:"ਪੰਜਾਬੀ"},pi:{name:"Pāli",nativeName:"पाऴि"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Română"},ru:{name:"Russian",nativeName:"Русский"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},si:{name:"Sinhala",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovenian",nativeName:"slovenščina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"српски језик"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},tk:{name:"Turkmen",nativeName:"Türkmençe"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татар теле"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"ئۇيغۇرچە‎"},uk:{name:"Ukrainian",nativeName:"Українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"Ўзбек"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ"},zh:{name:"Chinese",nativeName:"中文"},zu:{name:"Zulu",nativeName:"isiZulu"}};var Moe=Ioe;const uf=Moe,xM={},bg={},SM=[],_M=[],CM=[];for(const e in uf){const{name:t,nativeName:n}=uf[e];xM[e]=bg[t.toLowerCase()]=bg[n.toLowerCase()]={code:e,name:t,nativeName:n},SM.push(e),_M.push(t),CM.push(n)}var $oe=class om{static getLanguages(t=[]){return t.map(n=>om.validate(n)?Object.assign({},xM[n]):{code:n,name:"",nativeName:""})}static getName(t){return om.validate(t)?uf[t].name:""}static getAllNames(){return _M.slice()}static getNativeName(t){return om.validate(t)?uf[t].nativeName:""}static getAllNativeNames(){return CM.slice()}static getCode(t){return t=t.toLowerCase(),bg.hasOwnProperty(t)?bg[t].code:""}static getAllCodes(){return SM.slice()}static validate(t){return uf.hasOwnProperty(t)}};const GR=za($oe),Noe=()=>{var s;const{manifest:e}=Vr(),{setting$:t}=ai(),{i18n:n}=kte(),r=n.resolvedLanguage,[i,o]=k.useState();if(k.useEffect(()=>{const a=t==null?void 0:t.subscribe(l=>o(l));return()=>a==null?void 0:a.unsubscribe()},[t]),!(!e||!i))return v.jsxs(Zt,{component:"main",sx:{p:"1rem"},children:[v.jsx(ls,{children:v.jsx(qa,{children:v.jsx(wt,{children:"Settings"})})}),v.jsxs(wt,{variant:"h6",children:["GB Playbook ","2.1.0"]}),v.jsxs(wt,{variant:"caption",children:["(","2024-06-12T02:52:32.852Z",")"]}),v.jsx(Zo,{sx:{my:2}}),v.jsx(wt,{children:"Season and Errata Version:"}),v.jsx(hl,{children:v.jsx(Xc,{value:i.toJSON().data.dataSet,onChange:a=>{i==null||i.incrementalPatch({dataSet:a.target.value})},children:e==null?void 0:e.datafiles.map((a,l)=>v.jsx(fi,{value:a.filename,children:`[${a.version}] ${a.description}`},l))})}),v.jsx("p",{}),v.jsx(wt,{children:"Language Preference"}),v.jsx(wt,{variant:"subtitle2",children:"(available languages vary by Season and Errata setting)"}),v.jsx(hl,{children:v.jsxs(Xc,{value:i.toJSON().data.language??"auto",onChange:a=>{i==null||i.incrementalPatch({language:a.target.value})},children:[v.jsx(fi,{value:"auto",children:`Automatic Detection (${GR.getNativeName(r??"en")})`},"auto"),["en"].concat(Object.keys(((s=e.datafiles.find(a=>a.filename===i.toJSON().data.dataSet))==null?void 0:s.translations)??{})).map((a,l)=>v.jsx(fi,{value:a,children:`${GR.getNativeName(a)}`},l))]})}),v.jsx(Zo,{sx:{my:2}}),v.jsx(wt,{children:"UI Options:"}),v.jsx(wt,{children:"Initial Screen:"}),v.jsx(hl,{children:v.jsxs(Xc,{value:i==null?void 0:i.toJSON().data.initialScreen,onChange:a=>{i==null||i.incrementalPatch({initialScreen:a.target.value})},children:[v.jsx(fi,{value:"/game",children:"Game Play"}),v.jsx(fi,{value:"/library",children:"Card Library"})]})}),v.jsx("p",{}),v.jsx(hl,{children:v.jsx(Ko,{control:v.jsx(eK,{size:"small",checked:i==null?void 0:i.toJSON().data.uiPreferences.displayStatLine,onChange:a=>{i==null||i.incrementalPatch({uiPreferences:{displayStatLine:a.target.checked}})}}),label:"Stat Line in Game Roster List"})}),v.jsx("p",{}),v.jsx(wt,{children:"Prefered Card Layout:"}),v.jsx(wt,{variant:"subtitle2",children:"(Only applies to updated cards, where both styles are available)"}),v.jsx(hl,{children:v.jsxs(Xc,{value:i==null?void 0:i.toJSON().data.cardPreferences.preferredStyle,onChange:a=>{i==null||i.incrementalPatch({cardPreferences:{preferredStyle:a.target.value}})},children:[v.jsx(fi,{value:"sfg",children:"Steamforged"}),v.jsx(fi,{value:"gbcp",children:"Community"})]})})]})};var zS={},Aoe=eo;Object.defineProperty(zS,"__esModule",{value:!0});var kM=zS.default=void 0,Doe=Aoe(as()),Boe=v;kM=zS.default=(0,Doe.default)((0,Boe.jsx)("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3m-3 11H8v-5h8zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-1-9H6v4h12z"}),"Print");var US={},Foe=eo;Object.defineProperty(US,"__esModule",{value:!0});var EM=US.default=void 0,zoe=Foe(as()),Uoe=v;EM=US.default=(0,zoe.default)((0,Uoe.jsx)("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"}),"DoneAll");var WS={},Woe=eo;Object.defineProperty(WS,"__esModule",{value:!0});var RM=WS.default=void 0,Goe=Woe(as()),Hoe=v;RM=WS.default=(0,Goe.default)((0,Hoe.jsx)("path",{d:"m1.79 12 5.58 5.59L5.96 19 .37 13.41zm.45-7.78L12.9 14.89l-1.28 1.28L7.44 12l-1.41 1.41L11.62 19l2.69-2.69 4.89 4.89 1.41-1.41L3.65 2.81zm14.9 9.27L23.62 7 22.2 5.59l-6.48 6.48zM17.96 7l-1.41-1.41-3.65 3.66 1.41 1.41z"}),"RemoveDone");var GS={},Voe=eo;Object.defineProperty(GS,"__esModule",{value:!0});var PM=GS.default=void 0,Koe=Voe(as()),qoe=v;PM=GS.default=(0,Koe.default)((0,qoe.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");const Yoe=e=>{const[t,n]=k.useState(null),r=!!t,i=h=>{n(h.currentTarget)},o=()=>{n(null)},[s,a]=k.useState(!0),{doubleCard:l,setDouble:c,withBleed:u,setBleed:d,noFun:f,setNoFun:m}=e;return k.useEffect(()=>{const h=l?u?"5.24in 3.74in":"5in 3.5in":u?"2.74in 3.74in":"2.5in 3.5in",g=document.createElement("style");return s||(g.innerHTML=` + @media print { + @page { + size: ${h}; + margin: 0; + } + .Cards > .card { + margin: 0; + } + } + `),document.head.appendChild(g),()=>{document.head.removeChild(g)}},[l,u,s]),v.jsxs(v.Fragment,{children:[v.jsx(Qh,{title:"Print Settings",arrow:!0,children:v.jsx(Lo,{size:"small",onClick:i,children:v.jsx($ee,{})})}),v.jsx(Fv,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"center"},open:r,onClose:o,children:v.jsxs(Um,{margin:2,children:[v.jsx(Ko,{label:"Double Wide Cards",control:v.jsx(Vo,{checked:l,onChange:()=>c(!l)})}),v.jsx(Ko,{label:"With Print Bleed",control:v.jsx(Vo,{checked:u,onChange:()=>d(!u)})}),v.jsx(Ko,{label:"Set Page to Card Size",control:v.jsx(Vo,{checked:!s,onChange:()=>a(!s)})}),v.jsx(Ko,{label:"Ignore Special Themes",control:v.jsx(Vo,{checked:f,onChange:()=>m(!f)})})]})})]})},Qoe=()=>{const{gbdb:e,gameplans:t}=Vr(),n=k.useRef(null),r=k.useRef(),[i,o]=k.useState(),[s,a]=k.useState(),[l,c]=k.useState(!0),[u,d]=k.useState(!1),[f,m]=k.useState(!1);return k.useEffect(()=>{if(!e)return;(async()=>{const[g,E]=await Promise.all([e.guilds.find().where({minor:!1}).exec(),e.guilds.find().where({minor:!0}).exec()]).then(async([b,w])=>Promise.all([b,e.models.find().where("guild1").in(b.map(y=>y.name)).exec(),w,e.models.find().where("guild1").in(w.map(y=>y.name)).exec()])).then(([b,w,y,_])=>(Fs(w,"id",b.flatMap(R=>R.roster)),Fs(_,"id",y.flatMap(R=>R.roster)),[b.concat(y),w.concat(_)]));o(g.map(b=>b.name)),a(E.map(b=>b.id))})().catch(console.error)},[e]),!i||!s?null:v.jsxs(Zt,{component:"main",sx:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},children:[v.jsx(ls,{children:v.jsxs(Zt,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[v.jsx(wt,{children:"Card Printer"}),v.jsxs(Zt,{children:[v.jsx(Yoe,{withBleed:u,setBleed:d,doubleCard:l,setDouble:c,noFun:f,setNoFun:m}),v.jsx(Qh,{title:"Print",arrow:!0,children:v.jsx(Lo,{size:"small",onClick:()=>{window.print()},children:v.jsx(kM,{})})})]})]})}),v.jsxs(Zt,{className:"controls no-print",sx:{p:"1rem"},children:[v.jsx(Xoe,{ref:r}),v.jsxs(Zt,{sx:{display:"flex",flexDirection:"column",my:"0.5rem"},children:[v.jsxs(Zt,{sx:{position:"relative"},children:[v.jsxs(Df,{variant:"text",sx:{mb:"0.5rem"},children:[v.jsx(Qh,{title:"Select All",arrow:!0,children:v.jsx(yn,{onClick:()=>{var h,g,E,b,w,y;(h=r.current)!=null&&h.guild&&((E=(g=n.current)==null?void 0:g.guilds.get(r.current.guild))==null||E.setChecked(!0),(b=n.current)==null||b.models.forEach(_=>{var R;(R=r.current)!=null&&R.guild&&(_.m.guild1===r.current.guild||_.m.guild2===r.current.guild)&&_.setChecked(!0)}),r.current.guild==="gameplans"&&((w=n.current)==null||w.gameplans.forEach(_=>{_.setChecked(!0)})),r.current.guild==="refcards"&&((y=n.current)==null||y.refcards.forEach(_=>{_.setChecked(!0)})))},children:v.jsx(EM,{})})}),v.jsx(Qh,{title:"Clear All",arrow:!0,children:v.jsx(yn,{onClick:()=>{var h,g,E,b,w,y;(h=r.current)!=null&&h.guild&&((E=(g=n.current)==null?void 0:g.guilds.get(r.current.guild))==null||E.setChecked(!1),(b=n.current)==null||b.models.forEach(_=>{var R;(R=r.current)!=null&&R.guild&&(_.m.guild1===r.current.guild||_.m.guild2===r.current.guild)&&_.setChecked(!1)}),r.current.guild==="gameplans"&&((w=n.current)==null||w.gameplans.forEach(_=>{_.setChecked(!1)})),r.current.guild==="refcards"&&((y=n.current)==null||y.refcards.forEach(_=>{_.setChecked(!1)})))},children:v.jsx(RM,{})})})]}),v.jsx(oc,{})]}),v.jsx(rse,{ref:n})]}),v.jsx(Zo,{}),v.jsx(Zt,{children:v.jsx(yn,{variant:"text",color:"primary",startIcon:v.jsx(PM,{}),onClick:()=>{var h,g,E,b;(h=n.current)==null||h.guilds.forEach(w=>{w.setChecked(!1)}),(g=n.current)==null||g.models.forEach(w=>{w.setChecked(!1)}),(E=n.current)==null||E.gameplans.forEach(w=>{w.setChecked(!1)}),(b=n.current)==null||b.refcards.forEach(w=>{w.setChecked(!1)})},children:"Clear Cards"})})]}),v.jsxs(Zt,{className:"Cards",children:[i.map(h=>v.jsx(ose,{name:h,bleed:u,doubleCard:l},h)),s.map(h=>v.jsx(ise,{name:h,id:h,bleed:u,noFun:f,doubleCard:l},h)),t==null?void 0:t.map((h,g)=>v.jsx(sse,{gameplan:h,bleed:u},`gameplan-${g}`)),t==null?void 0:t.map((h,g)=>v.jsx(ase,{index:g,bleed:u},`refcard-${g}`))]})]})},Xoe=k.forwardRef((e,t)=>{const[n,r]=k.useState(void 0);k.useImperativeHandle(t,()=>({guild:n}),[n]);const i=io(a=>a.guilds.find().exec()),o=k.useCallback(a=>{if(!i)return;document.querySelectorAll(".model-checkbox").forEach(c=>c.classList.add("hide"));const l=i.find(c=>c.name===a);if(l){const{minor:c}=l,u=document.querySelector(".model-list-container");c?(u==null||u.style.setProperty("--major-order","2"),u==null||u.style.setProperty("--minor-order","0")):(u==null||u.style.setProperty("--major-order","0"),u==null||u.style.setProperty("--minor-order","2"))}document.querySelectorAll(`.model-checkbox.${a}`).forEach(c=>c.classList.remove("hide"))},[i]),s=k.useCallback(a=>{r(a.target.value),o(a.target.value)},[o]);if(i)return v.jsxs(hl,{size:"small",children:[v.jsx(dL,{children:"Guild"}),v.jsxs(Xc,{label:"Guild",onChange:s,defaultValue:"",children:[v.jsx(fi,{value:"refcards",dense:!0,children:v.jsx(tw,{text:"Rules Reference Cards",icon:"GB",style:{"--color":"#333333"}})},"redcards"),v.jsx(fi,{value:"gameplans",dense:!0,children:v.jsx(tw,{text:"Gameplans",icon:"GB",style:{"--color":"#333333"}})},"gameplans"),i.map(a=>v.jsx(fi,{value:a.name,dense:!0,children:v.jsx(Joe,{g:a})},a.name))]})]})}),Joe=({g:e})=>v.jsx(tw,{text:e.name,icon:e.name,style:{"--color":e.shadow??e.color}}),tw=({text:e,icon:t,style:n})=>v.jsx("div",{className:"guild",style:{width:"100%",fontSize:"1rem",...n},children:v.jsxs("span",{style:{display:"inline-flex"},children:[v.jsx("div",{style:{backgroundColor:"black",fontSize:"2em",width:"1em",height:"1em",borderRadius:"1em",display:"flex",overflow:"visible",alignItems:"center",justifyContent:"center"},children:v.jsx(Ci,{icon:t,className:"dark",style:{flexShrink:0}})}),v.jsx("span",{style:{color:"white",alignSelf:"center",marginLeft:"1em",marginRight:"1em"},children:e})]})},e),Fa=e=>{document.querySelectorAll(`.card#${e}`).forEach(t=>t==null?void 0:t.classList.toggle("hide"))},Zoe=k.forwardRef((e,t)=>{const[n,r]=k.useState(!1),i=e.g;return k.useImperativeHandle(t,()=>({g:e.g,checked:n,setChecked:o=>{n!==o&&(r(o),Fa(e.g.name))}}),[e.g,n,r]),v.jsx(Ko,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Vo,{checked:n,size:"small",color:"warning"}),label:i.name,className:`model-checkbox ${i.name} hide ${i.minor?"minor":""}`,style:{"--color1":i.shadow??i.color+"80","--color2":"var(--color1)"},onChange:()=>{r(!n),Fa(i.name)}})}),ese=k.forwardRef((e,t)=>{const[n,r]=k.useState(!1);k.useImperativeHandle(t,()=>({m:e.m,checked:n,setChecked:a=>{n!==a&&(r(a),Fa(e.m.id))}}),[e.m,n,r]);const i=e.m,[o,s]=io(async a=>Promise.all([a.guilds.findOne().where({name:i.guild1}).exec(),i.guild2?a.guilds.findOne().where({name:i.guild2}).exec():null]),[i.guild1,i.guild2])??[];return o?v.jsx(Ko,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Vo,{checked:n,size:"small",color:"warning"}),label:i.id,className:`model-checkbox ${i.guild1} ${i.guild2} ${i.id} hide ${o.minor?"minor":""}`,style:{"--color1":o.shadow??o.color+"80","--color2":s?s.shadow??s.color+"80":"var(--color1)"},onChange:()=>{r(!n),Fa(i.id)}}):null}),tse=k.forwardRef((e,t)=>{const[n,r]=k.useState(!1),i=e.g;return k.useImperativeHandle(t,()=>({g:e.g,checked:n,setChecked:o=>{n!==o&&(r(o),Fa(e.g.title.replace(/[^a-zA-Z0-9]+/g,"")))}}),[e.g,n,r]),v.jsx(Ko,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Vo,{checked:n,size:"small",color:"warning"}),label:i.title,className:`model-checkbox gameplans ${i.title.replace(/[^a-zA-Z0-9]/g,"")} hide`,style:{"--color1":"#333333","--color2":"var(--color1)"},onChange:()=>{r(!n),Fa(e.g.title.replace(/[^a-zA-Z0-9]+/g,""))}})}),nse=k.forwardRef((e,t)=>{const[n,r]=k.useState(!1),i=["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"];return k.useImperativeHandle(t,()=>({id:e.id,checked:n,setChecked:o=>{n!==o&&(r(o),Fa(`refcard-${e.id}`))}}),[e.id,n,r]),v.jsx(Ko,{sx:{border:1,borderRadius:1,borderColor:"primary.main"},control:v.jsx(Vo,{checked:n,size:"small",color:"warning"}),label:i[e.id],className:`model-checkbox refcards refcard-${e.id} hide`,style:{"--color1":"#333333","--color2":"var(--color1)"},onChange:()=>{r(!n),Fa(`refcard-${e.id}`)}})}),rse=k.forwardRef((e,t)=>{const{gbdb:n,gameplans:r}=Vr(),i=k.useRef(new Map),o=k.useRef(new Map),s=k.useRef(new Map),a=k.useRef(new Map);k.useImperativeHandle(t,()=>({models:i.current,guilds:o.current,gameplans:s.current,refcards:a.current}),[i,o,s]);const[l,c]=k.useState(),[u,d]=k.useState();return k.useEffect(()=>{(async()=>{if(!n)return;const[m,h]=await Promise.all([n.guilds.find().where({minor:!1}).exec(),n.guilds.find().where({minor:!0}).exec()]).then(async([g,E])=>Promise.all([g,n.models.find().where("guild1").in(g.map(b=>b.name)).exec(),E,n.models.find().where("guild1").in(E.map(b=>b.name)).exec()])).then(([g,E,b,w])=>(Fs(E,"id",g.flatMap(y=>y.roster)),Fs(w,"id",b.flatMap(y=>y.roster)),[g.concat(b),E.concat(w)]));c(m),d(h)})().catch(console.error)},[n]),!r||!l||!u?null:v.jsxs(Zt,{className:"model-list-container",style:{"--major-order":0,"--minor-order":2},children:[r.map(f=>v.jsx(tse,{g:f,ref:m=>{m?s.current.set(f.title,m):s.current.delete(f.title)}},f.title)),["Playbook Results","Turn Sequence","Conditions","Spending Momentum","Actions"].map((f,m)=>v.jsx(nse,{id:m,ref:h=>{h?a.current.set(f,h):a.current.delete(f)}},`refcard-${m}`)),l.map(f=>v.jsx(Zoe,{g:f,ref:m=>{m?o.current.set(f.name,m):o.current.delete(f.name)}},f.name)),u.map(f=>v.jsx(ese,{m:f,ref:m=>{m?i.current.set(f.id,m):i.current.delete(f.id)}},f.id))]})}),ise=e=>{const{name:t,id:n,bleed:r,doubleCard:i,noFun:o}=e,[s,a]=k.useState(!1),l=h=>{if(h&&h[0]){const{target:g}=h[0],E=getComputedStyle(g);a(E.getPropertyValue("display")!=="none")}},[c]=ny(l),u=io(async h=>{const g=await h.models.findOne().where({id:t}).exec();return g==null?void 0:g.expand()},[t]);if(!u)return null;const d=r?"5.24in":"5in",f=r?"2.74in":"2.5in",m=r?"3.74in":"3.5in";return i?v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:d,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsxs(v.Fragment,{children:[v.jsx(hg,{className:`card-front double ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:d,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"}}),v.jsx(mg,{className:`card-back print double ${r?"bleed":""} ${o?"noFun":""}`,model:u,style:{width:d,borderRadius:0,"--scale":"calc(2.5 * (96 / 500))"}})]})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:f,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsx(hg,{className:`card-front print ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:f,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"}})}),v.jsx("div",{ref:c,className:`card ${s?"":"hide"}`,id:n,style:{position:"relative",width:f,height:m,display:"inline-flex",flexDirection:"row",gap:0},children:s&&v.jsx(mg,{className:`card-back print ${r?"bleed":""} ${o?"nofun":""}`,model:u,style:{width:f,borderRadius:0,"--scale":"calc(2.5 * (96 / 500))"}})})]})},ose=e=>{const{name:t,bleed:n,doubleCard:r}=e,[i,o]=k.useState(!1),s=d=>{if(d&&d[0]){const{target:f}=d[0],m=getComputedStyle(f);o(m.getPropertyValue("display")!=="none")}},[a]=ny(s),l=n?"5.24in":"5in",c=n?"3.74in":"3.5in",u=n?"2.74in":"2.5in";return r?v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:l,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:`card-front double ${n?"bleed":""}`,style:{backgroundImage:`url(${sn.get(`${t}_front`)})`,width:l,borderRadius:0}}),v.jsx("div",{className:`card-back double ${n?"bleed":""}`,style:{backgroundImage:`url(${sn.get(`${t}_back`)})`,width:l,borderRadius:0}})]})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:u,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsx(v.Fragment,{children:v.jsx("div",{className:`card-front ${n?"bleed":""}`,style:{backgroundImage:`url(${sn.get(`${t}_front`)})`,width:u,borderRadius:0}})})}),v.jsx("div",{ref:a,className:`card ${i?"":"hide"}`,id:t,style:{position:"relative",width:u,height:c,display:"inline-flex",flexDirection:"row",gap:0},children:i&&v.jsx(v.Fragment,{children:v.jsx("div",{className:`card-back ${n?"bleed":""}`,style:{backgroundImage:`url(${sn.get(`${t}_back`)})`,width:u,borderRadius:0}})})})]})},sse=e=>{const{gameplan:t,bleed:n}=e,[r,i]=k.useState(!1),o=c=>{if(c&&c[0]){const{target:u}=c[0],d=getComputedStyle(u);i(d.getPropertyValue("display")!=="none")}},[s]=ny(o),a=n?"2.74in":"2.5in",l=n?"3.74in":"3.5in";return v.jsx("div",{ref:s,className:`card ${r?"":"hide"}`,id:t.title.replace(/[^A-Za-z0-9]+/g,""),style:{position:"relative",width:a,height:l,display:"inline-flex",flexDirection:"row",gap:0},children:r&&v.jsx("div",{className:`card-front ${n?"bleed":""}`,style:{height:l,width:a,borderRadius:0,"--scale":"calc(2.5 * 96 / 500)"},children:v.jsx(yM,{gameplan:t,style:{borderRadius:0},bleed:n})})})},ase=e=>{const{index:t,bleed:n}=e,[r,i]=k.useState(!1),o=c=>{if(c&&c[0]){const{target:u}=c[0],d=getComputedStyle(u);i(d.getPropertyValue("display")!=="none")}},[s]=ny(o),a=n?"2.74in":"2.5in",l=n?"3.74in":"3.5in";return v.jsx("div",{ref:s,className:`card ${r?"":"hide"}`,id:`refcard-${t}`,style:{position:"relative",width:a,height:l,display:"inline-flex",flexDirection:"row",gap:0},children:r&&v.jsx(wM,{index:t+1,style:{borderRadius:0},bleed:n})})};function lse(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:o,onRegisterError:s}=e;let a,l;const c=async(d=!0)=>{await l};async function u(){if("serviceWorker"in navigator){if(a=await uee(()=>import("./workbox-window.prod.es5-Ck4lWPv4.js"),[]).then(({Workbox:d})=>new d("/sw.js",{scope:"/",type:"classic"})).catch(d=>{s==null||s(d)}),!a)return;a.addEventListener("activated",d=>{(d.isUpdate||d.isExternal)&&window.location.reload()}),a.addEventListener("installed",d=>{d.isUpdate||r==null||r()}),a.register({immediate:t}).then(d=>{o?o("/sw.js",d):i==null||i(d)}).catch(d=>{s==null||s(d)})}}return l=u(),c}lse({immediate:!0});const cse=OD(e1(v.jsxs(v.Fragment,{children:[v.jsx(Qr,{path:"/",element:v.jsx(xD,{to:await on.getLocal("settings").then(e=>{const t=(e==null?void 0:e.get("initialScreen"))??_I.initialScreen;return t==="/game"?(e==null?void 0:e.get("gamePlayRoute"))??t:t==="/library"?(e==null?void 0:e.get("libraryRoute"))??t:t}),replace:!0})}),v.jsxs(Qr,{element:v.jsx(Oee,{}),children:[v.jsxs(Qr,{element:v.jsx(hoe,{}),children:[v.jsx(Qr,{path:"game",element:v.jsx(Jne,{})}),v.jsx(Qr,{path:"game/draft",element:v.jsx(sre,{})}),v.jsx(Qr,{path:"game/draft/play",element:v.jsx(doe,{})})]}),v.jsxs(Qr,{path:"library",element:v.jsx(Coe,{}),children:[v.jsx(Qr,{index:!0,element:v.jsx(koe,{})}),v.jsx(Qr,{path:"gameplans",element:v.jsx(Poe,{})}),v.jsx(Qr,{path:"refcards",element:v.jsx(Toe,{})}),v.jsx(Qr,{path:":guild",element:v.jsx(Roe,{})})]}),v.jsx(Qr,{path:"print",element:v.jsx(Qoe,{})}),v.jsx(Qr,{path:"settings",element:v.jsx(Noe,{})})]})]}))),use=nb.createRoot(document.getElementById("root"));use.render(v.jsx(Ree,{children:v.jsx(zte,{children:v.jsx(DD,{router:cse})})})); diff --git a/index.html b/index.html index a394d4a..a27ca7c 100644 --- a/index.html +++ b/index.html @@ -13,8 +13,8 @@ - - + +
diff --git a/sw.js b/sw.js index 0987516..5cb6bfc 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,n)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const a=s=>l(s,i),o={module:{uri:i},exports:u,require:a};e[i]=Promise.all(r.map((s=>o[s]||a(s)))).then((s=>(n(...s),u)))}}define(["./workbox-f407626e"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"assets/Angel-00-_OcCE1xs.jpg",revision:null},{url:"assets/Angel-01-RsyL_b7r.jpg",revision:null},{url:"assets/beacon-00-L9zfj4Q8.jpg",revision:null},{url:"assets/beacon-01-vYao7kaT.jpg",revision:null},{url:"assets/beacon-WzU-Fgwo.jpg",revision:null},{url:"assets/Blackheart-00-Barboaw1.jpg",revision:null},{url:"assets/Blackheart-01-DqXGaAGL.jpg",revision:null},{url:"assets/Brisket-00-fpn5lXhR.jpg",revision:null},{url:"assets/Brisket-01-Cz0yKYaC.jpg",revision:null},{url:"assets/brisket3-00-TRUFkM-Q.jpg",revision:null},{url:"assets/brisket3-01-C19fZQ9I.jpg",revision:null},{url:"assets/cast-00-CDhbzPRV.jpg",revision:null},{url:"assets/cast-01-DOJiR9Ch.jpg",revision:null},{url:"assets/compound-DlF-jmUs.svg",revision:null},{url:"assets/crook-00-C4D_gdaM.jpg",revision:null},{url:"assets/crook-01-D9bCOT5R.jpg",revision:null},{url:"assets/egret-00-BKhmAAwA.jpg",revision:null},{url:"assets/egret-01-DCSfZLX7.jpg",revision:null},{url:"assets/Flea-00-PYY29ZDm.jpg",revision:null},{url:"assets/Flea-01-B-ceu-Fs.jpg",revision:null},{url:"assets/Gaffer-00-Chm4XJB6.jpg",revision:null},{url:"assets/Gaffer-01-DChRbbv3.jpg",revision:null},{url:"assets/gaffer-front-large-box-BhDGw3yv.png",revision:null},{url:"assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",revision:null},{url:"assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",revision:null},{url:"assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-18-CCBausup.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",revision:null},{url:"assets/GB-S4-Reference-1-Cx3eC7d4.png",revision:null},{url:"assets/GB-S4-Reference-2-CJ4YgyH9.png",revision:null},{url:"assets/GB-S4-Reference-3-BTbZpB51.png",revision:null},{url:"assets/GB-S4-Reference-4-CpP58Tap.png",revision:null},{url:"assets/GB-S4-Reference-5-Be8xjsp1.png",revision:null},{url:"assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-12--TefmgjH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",revision:null},{url:"assets/gb-symbol-defs-DvUA8_44.svg",revision:null},{url:"assets/heat-00-D38QQgsn.jpg",revision:null},{url:"assets/heat-01-TaWfEq1e.jpg",revision:null},{url:"assets/heat-kg0Ne0rh.jpg",revision:null},{url:"assets/hook-00-BCtxORP2.jpg",revision:null},{url:"assets/hook-01-CFEXTspD.jpg",revision:null},{url:"assets/ikaros-00-BlK23AQW.jpg",revision:null},{url:"assets/ikaros-01-CaTWYr3E.jpg",revision:null},{url:"assets/index-D2Y2hPdq.js",revision:null},{url:"assets/index-DeT4Dv66.css",revision:null},{url:"assets/lamp-beta-63HlWaeb.png",revision:null},{url:"assets/lamps_back_blank-DaxPd_Oo.jpg",revision:null},{url:"assets/Locus-00-BlUYiKL3.jpg",revision:null},{url:"assets/Locus-01-CgJeSABI.jpg",revision:null},{url:"assets/lucky-00--3wf1Q-o.jpg",revision:null},{url:"assets/lucky-01-CeFOEkb7.jpg",revision:null},{url:"assets/lucky-n3AjGPzo.svg",revision:null},{url:"assets/miasma-00-gJuVKj0r.jpg",revision:null},{url:"assets/miasma-01-BFpZKg3H.jpg",revision:null},{url:"assets/minx-00-DKid1QgM.jpg",revision:null},{url:"assets/minx-01-h4AvAe2P.jpg",revision:null},{url:"assets/nightlight-00-DeG30Qno.jpg",revision:null},{url:"assets/nightlight-01-B5GmfHdF.jpg",revision:null},{url:"assets/nightlight-BICbD_Qy.jpg",revision:null},{url:"assets/Order_back-qsepM33g.jpg",revision:null},{url:"assets/phosphor-00-kYBsDzr4.jpg",revision:null},{url:"assets/phosphor-01-aCMgs7Xa.jpg",revision:null},{url:"assets/phosphor-CifRCYrC.jpg",revision:null},{url:"assets/playbook-symbol-defs-Dz3QsL1K.svg",revision:null},{url:"assets/Salt-00-DTipa4Vq.jpg",revision:null},{url:"assets/Salt-01-DgX-3wqX.jpg",revision:null},{url:"assets/soot-00-CjgkmHEF.jpg",revision:null},{url:"assets/soot-01-DLvloUPB.jpg",revision:null},{url:"assets/soot-CXEcs2BT.jpg",revision:null},{url:"assets/steeljaw-00-DBylP57a.jpg",revision:null},{url:"assets/steeljaw-01-DHvdkD3u.jpg",revision:null},{url:"assets/tenderiser-00-DJeWjZaC.jpg",revision:null},{url:"assets/tenderiser-01-Dn53BCqM.jpg",revision:null},{url:"assets/Truffles-00-BxTIIeQ4.jpg",revision:null},{url:"assets/Truffles-01-1xGyMIOv.jpg",revision:null},{url:"assets/Ulfr-00-BXhlGxmA.jpg",revision:null},{url:"assets/Ulfr-01-JQfocVce.jpg",revision:null},{url:"assets/vGutter-00-CpnNh9P4.jpg",revision:null},{url:"assets/vGutter-01-BWHR1234.jpg",revision:null},{url:"assets/wick-00-CEZ6BY1J.jpg",revision:null},{url:"assets/wick-01-DtuDStax.jpg",revision:null},{url:"assets/wick-D10XZuyz.jpg",revision:null},{url:"assets/workbox-window.prod.es5-Ck4lWPv4.js",revision:null},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"bbfed4136fee67e6888a8ff5e9d7f088"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/manifest.json",revision:"914d28859b95660a84eb915984c3ed47"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"index.html",revision:"c3b5bdc72faa6efffcf0cdffebdb2ff7"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"bbfed4136fee67e6888a8ff5e9d7f088"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/manifest.json",revision:"914d28859b95660a84eb915984c3ed47"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"))),s.registerRoute(/^https:\/\/docs\.guildball\.app\/.*/i,new s.CacheFirst({cacheName:"guildball-docs",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.googleapis\.com\/.*/i,new s.CacheFirst({cacheName:"google-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com\/.*/i,new s.CacheFirst({cacheName:"gstatic-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")})); +if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,n)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const a=s=>l(s,i),o={module:{uri:i},exports:u,require:a};e[i]=Promise.all(r.map((s=>o[s]||a(s)))).then((s=>(n(...s),u)))}}define(["./workbox-f407626e"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"assets/Angel-00-_OcCE1xs.jpg",revision:null},{url:"assets/Angel-01-RsyL_b7r.jpg",revision:null},{url:"assets/beacon-00-L9zfj4Q8.jpg",revision:null},{url:"assets/beacon-01-vYao7kaT.jpg",revision:null},{url:"assets/beacon-WzU-Fgwo.jpg",revision:null},{url:"assets/Blackheart-00-Barboaw1.jpg",revision:null},{url:"assets/Blackheart-01-DqXGaAGL.jpg",revision:null},{url:"assets/Brisket-00-fpn5lXhR.jpg",revision:null},{url:"assets/Brisket-01-Cz0yKYaC.jpg",revision:null},{url:"assets/brisket3-00-TRUFkM-Q.jpg",revision:null},{url:"assets/brisket3-01-C19fZQ9I.jpg",revision:null},{url:"assets/cast-00-CDhbzPRV.jpg",revision:null},{url:"assets/cast-01-DOJiR9Ch.jpg",revision:null},{url:"assets/compound-DlF-jmUs.svg",revision:null},{url:"assets/crook-00-C4D_gdaM.jpg",revision:null},{url:"assets/crook-01-D9bCOT5R.jpg",revision:null},{url:"assets/egret-00-BKhmAAwA.jpg",revision:null},{url:"assets/egret-01-DCSfZLX7.jpg",revision:null},{url:"assets/Flea-00-PYY29ZDm.jpg",revision:null},{url:"assets/Flea-01-B-ceu-Fs.jpg",revision:null},{url:"assets/Gaffer-00-Chm4XJB6.jpg",revision:null},{url:"assets/Gaffer-01-DChRbbv3.jpg",revision:null},{url:"assets/gaffer-front-large-box-BhDGw3yv.png",revision:null},{url:"assets/GB-S4-Alchemists-19-02-01-VIy3CwEn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-19-02-02-Dar2t4NY.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-01-CtoJr-2q.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-02-DlAuCMzg.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-04-RC1YiQbH.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-06-CUxY-HyS.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-08-B418Rr1J.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-10-DOhnGqkn.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-12-BZlwYyu9.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-14-DH-K3Y_5.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-16-Z1UPpUIk.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-18-DwfTDp0o.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-20-BFV6XWzl.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-22-G1PlavA6.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-24-CDYCDkSX.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-26-C9xO9eF2.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-28-4ME06k6U.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-30-DjbTACjD.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-31-BTog_cbt.jpg",revision:null},{url:"assets/GB-S4-Alchemists-20-03-32-Dui0dDSy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-01-C1aHp8XU.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-02-Buw0Sd4K.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-03-BcPp4ACy.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-04-Iz-ZAoRD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-06-CpyRLS4Z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-08-Dom1S1qD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-10-BPOmIv4i.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-12-C70-F9-G.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-14-BYsCG64l.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-16-BFmp7dwI.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-18-lzumGd1B.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-20-DH8KkvFf.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-22-CRMXvmQD.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-24-B0upn8X7.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-26-BZAHT1q6.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-28-IdVWYe8z.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-30-zou6Flgi.jpg",revision:null},{url:"assets/GB-S4-Blacksmiths-20-03-32-DJ0MEQk3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-01-_bnlGcvZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-02-Af5aErRU.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-03-BTowl5yC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-04-CiBahMdS.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-06-BAckyHQm.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-08-C1SVs0jC.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-10-dNR_AKj3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-12-Bzzw5t7M.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-14-DUDxJnnr.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-16-hLIfeAvT.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-18-193xjOU7.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-20-ht0AqR_9.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-22-DB3lWhaZ.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-24-BDXctZyF.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-26-CJ3ohfD8.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-28-D_Y6ChH0.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-30-C7ofvQL3.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-32-Cps3196a.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-33-zps3y-hi.jpg",revision:null},{url:"assets/GB-S4-Brewers-20-03-34-CdaFu_Sd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-01-CLWIlX8T.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-02-CFlOzX_b.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-03-B1bjdh3r.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-04-CR3Vo0aB.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-06-BpDXV7JC.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-08-BPo-9yTd.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-10-phxnKqrp.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-12-B2WDg1Js.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-14-DXWG8I2n.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-16-BjHesLe2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-18-6v1o2Ifu.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-20-BKaya9dR.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-22-D37jjOEk.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-24-DUuL1aM2.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-26-DOTJBjq_.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-28-M6NS1cc0.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-30-CZTx6gLx.jpg",revision:null},{url:"assets/GB-S4-Butchers-19-08-32-CDETLFF4.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-01-B_Vd1DVn.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-02-BCRzyOhW.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-03-Du8Wgf95.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-04-7QP0IEzl.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-06-D5h9IUWD.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-08-B27LuxRF.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-10-BjEFjR2p.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-12-DfumUS4Q.jpg",revision:null},{url:"assets/GB-S4-Cooks-19-08-14-2NKQVsMs.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-01-Di9u3X0x.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-02-Cy2lNFLR.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-03-CaTM1yPN.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-04-BNwvka_y.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-06-rU0szJ96.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-08-BhZW5K7b.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-10-jYeXRRJi.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-12-5N9um0rG.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-14-B6x6JfxM.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-16-Cc9F_94D.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-18-C04RNSHr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-20-r4vOyU-R.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-22-DHXCY4Wl.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-24-D6hQxrzH.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-26-C5iXMvZr.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-28-7uzZCmXc.jpg",revision:null},{url:"assets/GB-S4-Engineers-20-03-30-bp8c3Uf4.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-01-DAO812Wl.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-02-C_ro4zOy.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-03--r8Ylt5C.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-04-CT6BXXd-.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-06-agDql6N2.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-08-CyRw5rwh.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-10-1hF5DgY6.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-12-CZORpUuZ.jpg",revision:null},{url:"assets/GB-S4-Falconers-20-03-14-D7WFZjKa.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-01-LmV2xFUn.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-02-COLOFnlA.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-03-D9S_zy2g.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-04-D5V7RGAr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-06-CvC6mrxK.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-08-Bu2e9Uzp.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-10-BVRVj083.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-12-17j3-pGL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-14-D9QbUDBe.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-16-Bi5uXUCL.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-18-CYzbOhRU.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-20-CfkO1wFr.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-22-lG9W92aw.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-24-BWbiceSz.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-26-Cfuo1fZi.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-28-C3SMHxWd.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-30-C3nUj6AE.jpg",revision:null},{url:"assets/GB-S4-Farmers-19-12-32-DfwzxWCr.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-01-D54clbHu.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-02-D_xvByJF.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-03-HE2w3ci9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-04-BfW77V1Z.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-06-BDyxN849.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-08-omES11k4.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-10-BEY4i-qQ.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-12-Dv7v3MeD.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-14-DuPQrXbP.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-16-DLLLRVAB.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-18-CaaIkPD9.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-20-DZM3Jz28.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-22-Dici-53D.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-24-DJyMosKX.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-26-DgZQkJwc.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-28-Bq-GSM8T.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-30-BsuCsQld.jpg",revision:null},{url:"assets/GB-S4-Fishermen-19-08-32-Co1is7SR.jpg",revision:null},{url:"assets/GB-S4-Gameplans-2019-Dp99TQ1B.png",revision:null},{url:"assets/GB-S4-Hunters-19-08-01-CmDbpORb.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-02-DP64V92U.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-03-C59ee243.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-04-43bh7Xjn.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-06-DvcQNJi9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-08-G2iJeyB7.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-10-DXc2S5UR.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-12-Bi7nnTZE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-14-COEjmcNE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-16-D8BrrZ7W.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-18-m8dNYpqE.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-20-B0_n3uev.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-22-DnBgH8it.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-24-Btt4JIV9.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-26-ChOKS1SV.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-28-HxO921jJ.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-30-Dg6ELcLG.jpg",revision:null},{url:"assets/GB-S4-Hunters-19-08-32-CjwZbZPz.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-01-CU2vGuj1.jpg",revision:null},{url:"assets/GB-S4-Masons-19-03-02-BT75CHhK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-01-B2F-qHyR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-02-CDe3UOmk.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-04-KDNoOwoa.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-06-BPou1o3y.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-08-CxUr3wcQ.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-10-B-NC6pQE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-12-BLKQpjuR.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-14-DYH-t6AE.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-16-D4IFawmu.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-18-CCBausup.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-20-ocIpAO8E.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-22-C5KnttI8.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-24-C_8aIC6i.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-26-DfJ6EfYF.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-28-B7QBbKlK.jpg",revision:null},{url:"assets/GB-S4-Masons-19-08-30-6kjit4Y9.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-01-D4YSyCEa.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-02-osGRf8x4.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-03-Bvr7X2VN.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-04-BUt1D44u.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-06-CWDJNfx1.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-08-Dsrwpy5l.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-10-BFt8Saso.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-12-D1QsxSt_.jpg",revision:null},{url:"assets/GB-S4-Miners-20-03-14-OmIZrrCX.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-01-DIFD5DK0.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-02-BIp1_EUg.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-03-BEjT_hxM.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-04-CehnRTZZ.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-06-B-414ifs.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-08--61yL9Bw.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-10-t5GLRNs2.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-12-mWeeXBnS.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-14-DYB6-CC7.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-16-DWJHVhQR.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-18-CCUOST9Q.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-20-C22KtbCr.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-22-urTSkH8v.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-26-EHTItFK_.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-28-R_qj57Ah.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-30-D7tgwlEH.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-32-rWK20dpO.jpg",revision:null},{url:"assets/GB-S4-Morticians-19-08-34-Cml7KNHH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-01-M7N3Qnm9.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-02-C0DvULy4.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-03-DuY0bj8b.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-04-C54iXdHJ.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-05-DijPkVU0.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-07-k2ifPp8C.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-10-kxgvrwFf.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-11-DLBrn3lH.jpg",revision:null},{url:"assets/GB-S4-Navigators-20-03-14-4LJM_QAb.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-01-asZnKqhR.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-02-DxYxwIyf.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-04-B1NHIvQH.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-06-BxCTP18m.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-08-DWLWCNBP.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-10-CdmsC0k7.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-12-CUnlpuDI.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-14-N2zvQdYm.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-16-BxGIGoGz.jpg",revision:null},{url:"assets/GB-S4-Order-19-08-18-gkj8skFt.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-01-CbXHBUJx.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-02-XbBjNmUR.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-03-vf5l_pcD.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-04-BnvzzXPE.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-06-DlqN1o8i.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-08-BwciubOW.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-10-DtQCr3kF.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-12-JUs2Xlho.jpg",revision:null},{url:"assets/GB-S4-Ratcatchers-19-08-14-D1JyRK5e.jpg",revision:null},{url:"assets/GB-S4-Reference-1-Cx3eC7d4.png",revision:null},{url:"assets/GB-S4-Reference-2-CJ4YgyH9.png",revision:null},{url:"assets/GB-S4-Reference-3-BTbZpB51.png",revision:null},{url:"assets/GB-S4-Reference-4-CpP58Tap.png",revision:null},{url:"assets/GB-S4-Reference-5-Be8xjsp1.png",revision:null},{url:"assets/GB-S4-Shepherds-20-03-01-BszDyn7n.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-02-XqwLekip.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-03-CJ-GnLek.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-04-CpJUbIK5.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-06-TZPJ1JER.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-08-fPdEFqsg.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-10-D8vNNVMa.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-12-Cs6eNdgu.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-14-EROLPl1k.jpg",revision:null},{url:"assets/GB-S4-Shepherds-20-03-16-CH7z3m46.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-01-BYUf_cPI.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-02-CAfWuq1n.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-03-ByRX6Zf6.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-04-DESKIKlc.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-06-TH_Fhhnv.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-08-C9acG5Gy.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-10-BRZlJPNW.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-12--TefmgjH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-14-DoT0cBAC.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-16-DrDLPTZJ.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-18-bedyXvhB.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-20-CDcWfDBp.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-22-DFVnunFx.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-24-DTxA3SGq.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-26-Bo3pJ595.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-28-Cix4cgvH.jpg",revision:null},{url:"assets/GB-S4-Union-20-03-30-DOPQxsMF.jpg",revision:null},{url:"assets/gb-symbol-defs-DvUA8_44.svg",revision:null},{url:"assets/heat-00-D38QQgsn.jpg",revision:null},{url:"assets/heat-01-TaWfEq1e.jpg",revision:null},{url:"assets/heat-kg0Ne0rh.jpg",revision:null},{url:"assets/hook-00-BCtxORP2.jpg",revision:null},{url:"assets/hook-01-CFEXTspD.jpg",revision:null},{url:"assets/ikaros-00-BlK23AQW.jpg",revision:null},{url:"assets/ikaros-01-CaTWYr3E.jpg",revision:null},{url:"assets/index-D-v3YpWY.css",revision:null},{url:"assets/index-DAy2HQFx.js",revision:null},{url:"assets/lamp-beta-63HlWaeb.png",revision:null},{url:"assets/lamps_back_blank-DaxPd_Oo.jpg",revision:null},{url:"assets/Locus-00-BlUYiKL3.jpg",revision:null},{url:"assets/Locus-01-CgJeSABI.jpg",revision:null},{url:"assets/lucky-00--3wf1Q-o.jpg",revision:null},{url:"assets/lucky-01-CeFOEkb7.jpg",revision:null},{url:"assets/lucky-n3AjGPzo.svg",revision:null},{url:"assets/miasma-00-gJuVKj0r.jpg",revision:null},{url:"assets/miasma-01-BFpZKg3H.jpg",revision:null},{url:"assets/minx-00-DKid1QgM.jpg",revision:null},{url:"assets/minx-01-h4AvAe2P.jpg",revision:null},{url:"assets/nightlight-00-DeG30Qno.jpg",revision:null},{url:"assets/nightlight-01-B5GmfHdF.jpg",revision:null},{url:"assets/nightlight-BICbD_Qy.jpg",revision:null},{url:"assets/Order_back-qsepM33g.jpg",revision:null},{url:"assets/phosphor-00-kYBsDzr4.jpg",revision:null},{url:"assets/phosphor-01-aCMgs7Xa.jpg",revision:null},{url:"assets/phosphor-CifRCYrC.jpg",revision:null},{url:"assets/playbook-symbol-defs-Dz3QsL1K.svg",revision:null},{url:"assets/Salt-00-DTipa4Vq.jpg",revision:null},{url:"assets/Salt-01-DgX-3wqX.jpg",revision:null},{url:"assets/soot-00-CjgkmHEF.jpg",revision:null},{url:"assets/soot-01-DLvloUPB.jpg",revision:null},{url:"assets/soot-CXEcs2BT.jpg",revision:null},{url:"assets/steeljaw-00-DBylP57a.jpg",revision:null},{url:"assets/steeljaw-01-DHvdkD3u.jpg",revision:null},{url:"assets/tenderiser-00-DJeWjZaC.jpg",revision:null},{url:"assets/tenderiser-01-Dn53BCqM.jpg",revision:null},{url:"assets/Truffles-00-BxTIIeQ4.jpg",revision:null},{url:"assets/Truffles-01-1xGyMIOv.jpg",revision:null},{url:"assets/Ulfr-00-BXhlGxmA.jpg",revision:null},{url:"assets/Ulfr-01-JQfocVce.jpg",revision:null},{url:"assets/vGutter-00-CpnNh9P4.jpg",revision:null},{url:"assets/vGutter-01-BWHR1234.jpg",revision:null},{url:"assets/wick-00-CEZ6BY1J.jpg",revision:null},{url:"assets/wick-01-DtuDStax.jpg",revision:null},{url:"assets/wick-D10XZuyz.jpg",revision:null},{url:"assets/workbox-window.prod.es5-Ck4lWPv4.js",revision:null},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"bbfed4136fee67e6888a8ff5e9d7f088"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/manifest.json",revision:"914d28859b95660a84eb915984c3ed47"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"index.html",revision:"2040c791e30a5e9c679c5c41dc8287bc"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"pwa-64x64.png",revision:"ecb00646e770b9aa3e91cfb9909387c3"},{url:"CNAME",revision:"6b62f425122a80ff0107c2b9938f87b7"},{url:"apple-touch-icon-180x180.png",revision:"c6ade8d120b32268facbde0e632c86d4"},{url:"favicon.ico",revision:"4a2fe2fdcaa08f161283444598a8f468"},{url:"favicon.svg",revision:"6114c7937db75b09f50b3d31b2bd85d6"},{url:"maskable-icon-512x512.png",revision:"6ef31a886aa1b0f4561ddc92364e8bd1"},{url:"privacy.html",revision:"4eaf071255466ce08853754be78169ba"},{url:"pwa-192x192.png",revision:"6d64c647cd785e004c0be60bb1779d89"},{url:"pwa-512x512.png",revision:"d64c4db6a1dcdf625df901c1341ea41c"},{url:"robots.txt",revision:"fa1ded1ed7c11438a9b0385b1e112850"},{url:"data/GB-Playbook-4-3.json",revision:"92b689cb87b03ad4b17a13d4c8149687"},{url:"data/GB-Playbook-4-4.json",revision:"5385d14b70c849f475758648abddbe36"},{url:"data/GB-Playbook-4-5.json",revision:"ebf4b91061ca5728eb53d8f9d41f8edc"},{url:"data/GB-Playbook-4-6.fr.json",revision:"bbfed4136fee67e6888a8ff5e9d7f088"},{url:"data/GB-Playbook-4-6.json",revision:"f609abebce605d01f9308eeb83641f29"},{url:"data/gameplans.json",revision:"84197a88c0201e0335c7e8015c953c77"},{url:"data/manifest.json",revision:"914d28859b95660a84eb915984c3ed47"},{url:"manifest.webmanifest",revision:"a9121016eaef4c6c02585821c2e74f1a"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"))),s.registerRoute(/^https:\/\/docs\.guildball\.app\/.*/i,new s.CacheFirst({cacheName:"guildball-docs",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.googleapis\.com\/.*/i,new s.CacheFirst({cacheName:"google-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com\/.*/i,new s.CacheFirst({cacheName:"gstatic-fonts-cache",plugins:[new s.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3}),new s.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")}));