diff --git a/docs/_app/immutable/assets/2.F3iUeXc8.css b/docs/_app/immutable/assets/2.F3iUeXc8.css deleted file mode 100644 index 980dcb1..0000000 --- a/docs/_app/immutable/assets/2.F3iUeXc8.css +++ /dev/null @@ -1 +0,0 @@ -.overlay.svelte-mlybgp{position:fixed;z-index:1000;height:100%;width:100%;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;text-align:center;background:none}button.svelte-mlybgp{background:#e4cee1;border-radius:20px;padding:10px 24px;font-weight:600;-webkit-box-shadow:4px 4px 4px 0px rgba(0,0,0,.25);box-shadow:4px 4px 4px #00000040}section.svelte-1ceqw5z.svelte-1ceqw5z{position:relative;width:100%;height:100%;margin:0;padding:0;z-index:1;overflow:hidden}.slides.svelte-1ceqw5z.svelte-1ceqw5z{display:-webkit-box;display:flex;flex-wrap:wrap;position:relative;width:100%;height:100%;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;z-index:1}.horizontal.svelte-1ceqw5z>.slides.svelte-1ceqw5z{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.vertical.svelte-1ceqw5z>.slides.svelte-1ceqw5z{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.slide.svelte-1h814z3{position:relative;width:100%;height:100%}button.svelte-1v4ps8e{padding:.5rem 1rem;font-size:var(--font-size);border:none;background-color:var(--color-pink);color:#000;border-radius:5px;cursor:pointer;-webkit-transition:background-color .3s;transition:background-color .3s;-webkit-transition:-webkit-transform .5s;transition:-webkit-transform .5s;transition:transform .5s;transition:transform .5s,-webkit-transform .5s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}button.fixed.svelte-1v4ps8e{position:fixed;right:2rem;bottom:100px}button.svelte-1v4ps8e:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.arrows.svelte-1sf6xr9.svelte-1sf6xr9{margin:0;align-self:flex-end;padding-bottom:100px;display:-webkit-box;display:flex}.next.svelte-1sf6xr9.svelte-1sf6xr9{font-size:24px;letter-spacing:-.5px;color:#787878;line-height:.9;margin-right:5px}section.svelte-1sf6xr9.svelte-1sf6xr9{position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--z-overlay);pointer-events:none}button.svelte-1sf6xr9.svelte-1sf6xr9{position:absolute;cursor:pointer;background:none;border-radius:0;outline:none;border:none;-webkit-box-shadow:none;box-shadow:none;pointer-events:auto;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-align:end;align-items:flex-end}button.svelte-1sf6xr9.svelte-1sf6xr9:disabled{opacity:.2;cursor:not-allowed}.left.svelte-1sf6xr9.svelte-1sf6xr9{left:0;top:0}.left.svelte-1sf6xr9 .arrows.svelte-1sf6xr9{align-self:flex-start}.right.svelte-1sf6xr9.svelte-1sf6xr9{right:0;top:0}.left.start.svelte-1sf6xr9.svelte-1sf6xr9,.right.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:start;align-items:flex-start}.left.center.svelte-1sf6xr9.svelte-1sf6xr9,.right.center.svelte-1sf6xr9.svelte-1sf6xr9{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.left.end.svelte-1sf6xr9.svelte-1sf6xr9,.right.end.svelte-1sf6xr9.svelte-1sf6xr9{bottom:0;top:auto}.up.svelte-1sf6xr9.svelte-1sf6xr9{top:0;left:0}.down.svelte-1sf6xr9.svelte-1sf6xr9{bottom:0;left:0}.up.center.svelte-1sf6xr9.svelte-1sf6xr9,.down.center.svelte-1sf6xr9.svelte-1sf6xr9{left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%)}.up.end.svelte-1sf6xr9.svelte-1sf6xr9,.down.end.svelte-1sf6xr9.svelte-1sf6xr9{right:0;left:auto}.full.left.start.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:start;align-items:flex-start}.full.left.center.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.center.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:center;align-items:center}.full.left.end.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.end.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:end;align-items:flex-end}.full.up.start.svelte-1sf6xr9.svelte-1sf6xr9,.full.down.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:start;justify-content:flex-start}.full.up.center.svelte-1sf6xr9.svelte-1sf6xr9,.full.down.center.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:center;justify-content:center}.full.up.end.svelte-1sf6xr9.svelte-1sf6xr9,.full.down-end.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:end;justify-content:flex-end}span.svelte-1sf6xr9.svelte-1sf6xr9{display:inline-block;line-height:1;opacity:1}.debug.svelte-1sf6xr9 .left.svelte-1sf6xr9,.debug.svelte-1sf6xr9 .right.svelte-1sf6xr9{background:red;opacity:.5}.debug.svelte-1sf6xr9 .up.svelte-1sf6xr9,.debug.svelte-1sf6xr9 .down.svelte-1sf6xr9{background:orange;opacity:.5}.count.svelte-rrphdy{color:#787878;font-size:14px;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px;flex-shrink:0}@media only screen and (max-width: 600px){.count.svelte-rrphdy{margin-bottom:5px}}.artist__player.svelte-1idfvi7.svelte-1idfvi7{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;gap:.25rem;font-weight:500;cursor:pointer;margin-top:.25rem}.artist__player.svelte-1idfvi7 svg.svelte-1idfvi7{height:35px;width:35px;fill:#787878;-webkit-transition:fill .25s;transition:fill .25s}.artist__player.svelte-1idfvi7:hover svg.svelte-1idfvi7{fill:#555}.artist.svelte-1s1k6wy.svelte-1s1k6wy{font-size:24px;width:100%;color:#000;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-flex:1;flex-grow:1}@media only screen and (max-width: 600px){.artist__title.svelte-1s1k6wy.svelte-1s1k6wy{margin:0}}.artist__description.svelte-1s1k6wy.svelte-1s1k6wy{color:#787878;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}@media only screen and (max-width: 600px){.artist__description.svelte-1s1k6wy.svelte-1s1k6wy{font-size:16px}}.artist__art.svelte-1s1k6wy.svelte-1s1k6wy{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-flex:1;flex-grow:1;max-height:100%;overflow:hidden;position:relative}.artist__art.svelte-1s1k6wy .toploader.svelte-1s1k6wy{width:100%;height:100%;background-image:var(--toploader-url);background-repeat:no-repeat;background-position:center;background-size:contain;position:absolute;top:0;left:0}.artist__art.svelte-1s1k6wy .image.svelte-1s1k6wy{height:100%;width:100%;background:var(--image);background-repeat:no-repeat;background-position:center;background-size:contain}.voter.svelte-v34u9f.svelte-v34u9f{flex-shrink:0}.voter.inactive.svelte-v34u9f.svelte-v34u9f{pointer-events:none}.voter.svelte-v34u9f .which.svelte-v34u9f{font-size:24px;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;color:#787878;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin-bottom:1rem;margin-top:1rem}@media only screen and (max-width: 600px){.voter.svelte-v34u9f .which.svelte-v34u9f{font-size:16px}}.voter__controls.svelte-v34u9f.svelte-v34u9f{font-size:24px;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}.voter__controls.svelte-v34u9f .idk.svelte-v34u9f{text-align:center;margin-top:1rem;margin-bottom:1rem}.voter__controls__gens.svelte-v34u9f.svelte-v34u9f{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;gap:1rem;margin:0 auto}@media only screen and (max-width: 600px){.voter__controls__gens.svelte-v34u9f.svelte-v34u9f{gap:.25rem}}.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f{background:#5f5f5f;width:90px;aspect-ratio:1/1;border-radius:8%;color:#fff;position:relative;border:2px solid white;-webkit-transition:all .25s;transition:all .25s}@media only screen and (max-width: 600px){.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f{width:70px;font-size:16px}}.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f:after{content:"";width:100%;height:100%;position:absolute;background-image:var(--toploader-url);background-size:cover;top:0;left:0}@media (hover: hover) and (pointer: fine){.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f:hover{background:#fff;color:#5f5f5f;border:2px solid var(--color-accent)}}.voter__controls__gens.svelte-v34u9f button.active.svelte-v34u9f{background:#fff;color:#5f5f5f;border:2px solid var(--color-accent)}#survey.svelte-1dbz5sc.svelte-1dbz5sc.svelte-1dbz5sc{text-align:left;--accent-color:rgb(195, 115, 183)}#survey.svelte-1dbz5sc p.svelte-1dbz5sc.svelte-1dbz5sc{color:#787878;font-size:14px;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px}#survey.svelte-1dbz5sc form.svelte-1dbz5sc.svelte-1dbz5sc{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;gap:1rem}#survey.svelte-1dbz5sc form .round.svelte-1dbz5sc.svelte-1dbz5sc{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative}#survey.svelte-1dbz5sc form .round .checkbox-label.svelte-1dbz5sc.svelte-1dbz5sc{background-color:#fff;border:2px solid #9c9c9c;border-radius:8%;cursor:pointer;display:inline-block;height:28px;width:28px;position:relative}#survey.svelte-1dbz5sc form .round .checkbox-label.svelte-1dbz5sc.svelte-1dbz5sc:after{content:"";position:absolute;top:8px;left:7px;width:12px;height:6px;border:2px solid #fff;border-top:none;border-right:none;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc.svelte-1dbz5sc{position:absolute;opacity:0;width:0;height:0}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc:checked+.checkbox-label.svelte-1dbz5sc{background-color:var(--accent-color);border-color:var(--accent-color)}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc:checked+.checkbox-label.svelte-1dbz5sc:after{opacity:1}#survey.svelte-1dbz5sc form .round .factor-label.svelte-1dbz5sc.svelte-1dbz5sc{position:absolute;width:-webkit-max-content;width:-moz-max-content;width:max-content;white-space:nowrap;margin-top:1px;left:35px}#results.svelte-nc345f.svelte-nc345f{margin-top:25vh;text-align:left;--accent-color:rgb(195, 115, 183)}#results.svelte-nc345f p.svelte-nc345f{font-weight:400;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px}#results.svelte-nc345f .email-signup.svelte-nc345f{display:-webkit-box;display:flex;border:1px solid #000;border-radius:10px;overflow:hidden}#results.svelte-nc345f .email-signup .email-input.svelte-nc345f{-webkit-box-flex:1;flex:1;padding:1rem;border:none;outline:none}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f{background-color:#ddd;border:none;padding:1rem;cursor:pointer;font-weight:700;border-left:1px solid #000;width:100%;max-width:200px}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f:not(:disabled):hover{background-color:#ccc}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f:disabled{cursor:auto}.reveal.svelte-nc345f.svelte-nc345f{font-size:24px;letter-spacing:-.5px;line-height:.9;background:none;margin:100px auto 50px;text-decoration:underline;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.viz.svelte-nc345f.svelte-nc345f{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;gap:1rem}.viz.svelte-nc345f .row.svelte-nc345f{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}@media only screen and (max-width: 700px){.viz.svelte-nc345f .row.svelte-nc345f{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}.viz.svelte-nc345f .row .plot.svelte-nc345f{width:100%;max-width:500px;display:-webkit-box;display:flex;border-radius:5px;overflow:hidden}.viz.svelte-nc345f .row .plot .cell.svelte-nc345f{height:40px;width:var(--width);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;background-color:var(--bg);color:var(--color)}.viz.svelte-nc345f .row .plot .cell span.isLargest.svelte-nc345f{font-weight:500}.methodology.svelte-nc345f.svelte-nc345f{border-top:1px solid #000;margin-top:10rem;padding-top:1rem}.board.svelte-d12z7e{width:100%;max-width:800px;display:-webkit-box;display:flex;margin:0 auto;align-content:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:var(--justify-content);justify-content:var(--justify-content)}#intro-gallery.svelte-rf0zu8.svelte-rf0zu8{position:absolute;width:100%;max-width:1200px;height:100%;z-index:-1;margin:0 auto;left:0;right:0}#intro-gallery.svelte-rf0zu8 img.svelte-rf0zu8{width:250px;position:absolute;border-radius:30px;-webkit-filter:drop-shadow(0 .15rem .75rem #555);filter:drop-shadow(0 .15rem .75rem #555);-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;top:var(--top);right:var(--right);bottom:var(--bottom);left:var(--left)}#intro-gallery.svelte-rf0zu8 img[data-index="1"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTop;animation-name:svelte-rf0zu8-flyInFromTop}#intro-gallery.svelte-rf0zu8 img[data-index="2"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTopRight;animation-name:svelte-rf0zu8-flyInFromTopRight}#intro-gallery.svelte-rf0zu8 img[data-index="3"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottomRight;animation-name:svelte-rf0zu8-flyInFromBottomRight}#intro-gallery.svelte-rf0zu8 img[data-index="4"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottom;animation-name:svelte-rf0zu8-flyInFromBottom}#intro-gallery.svelte-rf0zu8 img[data-index="5"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottomLeft;animation-name:svelte-rf0zu8-flyInFromBottomLeft}#intro-gallery.svelte-rf0zu8 img[data-index="6"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTopLeft;animation-name:svelte-rf0zu8-flyInFromTopLeft}@-webkit-keyframes svelte-rf0zu8-flyInFromTop{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(-100vh);transform:translate(var(--translateX, 0)) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTop{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(-100vh);transform:translate(var(--translateX, 0)) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromTopRight{0%{-webkit-transform:translateX(100vh) translateY(-100vh);transform:translate(100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTopRight{0%{-webkit-transform:translateX(100vh) translateY(-100vh);transform:translate(100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottomRight{0%{-webkit-transform:translateX(100vh) translateY(100vh);transform:translate(100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottomRight{0%{-webkit-transform:translateX(100vh) translateY(100vh);transform:translate(100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottom{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(100vh);transform:translate(var(--translateX, 0)) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottom{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(100vh);transform:translate(var(--translateX, 0)) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromTopLeft{0%{-webkit-transform:translateX(-100vh) translateY(-100vh);transform:translate(-100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTopLeft{0%{-webkit-transform:translateX(-100vh) translateY(-100vh);transform:translate(-100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottomLeft{0%{-webkit-transform:translateX(-100vh) translateY(100vh);transform:translate(-100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottomLeft{0%{-webkit-transform:translateX(-100vh) translateY(100vh);transform:translate(-100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}.text.svelte-u468tu{font-size:4rem;font-weight:400;width:calc(100% - 50px);max-width:900px;letter-spacing:-.5px;line-height:1.2}article.svelte-u468tu{width:100lvw;overflow-x:hidden;height:calc(var(--height) - var(--header-height));z-index:3}.slide a{pointer-events:auto;white-space:nowrap}.slide{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;padding:1rem;text-align:center}.slide.vertical-center{-webkit-box-align:center;align-items:center} diff --git a/docs/_app/immutable/assets/2.lKxKqI_2.css b/docs/_app/immutable/assets/2.lKxKqI_2.css new file mode 100644 index 0000000..39ca946 --- /dev/null +++ b/docs/_app/immutable/assets/2.lKxKqI_2.css @@ -0,0 +1 @@ +.overlay.svelte-mlybgp{position:fixed;z-index:1000;height:100%;width:100%;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;text-align:center;background:none}button.svelte-mlybgp{background:#e4cee1;border-radius:20px;padding:10px 24px;font-weight:600;-webkit-box-shadow:4px 4px 4px 0px rgba(0,0,0,.25);box-shadow:4px 4px 4px #00000040}section.svelte-1ceqw5z.svelte-1ceqw5z{position:relative;width:100%;height:100%;margin:0;padding:0;z-index:1;overflow:hidden}.slides.svelte-1ceqw5z.svelte-1ceqw5z{display:-webkit-box;display:flex;flex-wrap:wrap;position:relative;width:100%;height:100%;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;z-index:1}.horizontal.svelte-1ceqw5z>.slides.svelte-1ceqw5z{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.vertical.svelte-1ceqw5z>.slides.svelte-1ceqw5z{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.slide.svelte-1h814z3{position:relative;width:100%;height:100%}button.svelte-rrf764{padding:.5rem 1rem;font-size:var(--font-size);border:none;background-color:var(--color-pink);color:#000;border-radius:5px;cursor:pointer;-webkit-transition:background-color .3s;transition:background-color .3s;-webkit-transition:-webkit-transform .5s;transition:-webkit-transform .5s;transition:transform .5s;transition:transform .5s,-webkit-transform .5s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;touch-action:manipulation}button.fixed.svelte-rrf764{position:fixed;right:2rem;bottom:100px}@media only screen and (max-width: 600px){button.fixed.svelte-rrf764{bottom:30px}}@media (hover: hover) and (pointer: fine){button.svelte-rrf764:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}}.arrows.svelte-1sf6xr9.svelte-1sf6xr9{margin:0;align-self:flex-end;padding-bottom:100px;display:-webkit-box;display:flex}.next.svelte-1sf6xr9.svelte-1sf6xr9{font-size:24px;letter-spacing:-.5px;color:#787878;line-height:.9;margin-right:5px}section.svelte-1sf6xr9.svelte-1sf6xr9{position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--z-overlay);pointer-events:none}button.svelte-1sf6xr9.svelte-1sf6xr9{position:absolute;cursor:pointer;background:none;border-radius:0;outline:none;border:none;-webkit-box-shadow:none;box-shadow:none;pointer-events:auto;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-align:end;align-items:flex-end}button.svelte-1sf6xr9.svelte-1sf6xr9:disabled{opacity:.2;cursor:not-allowed}.left.svelte-1sf6xr9.svelte-1sf6xr9{left:0;top:0}.left.svelte-1sf6xr9 .arrows.svelte-1sf6xr9{align-self:flex-start}.right.svelte-1sf6xr9.svelte-1sf6xr9{right:0;top:0}.left.start.svelte-1sf6xr9.svelte-1sf6xr9,.right.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:start;align-items:flex-start}.left.center.svelte-1sf6xr9.svelte-1sf6xr9,.right.center.svelte-1sf6xr9.svelte-1sf6xr9{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.left.end.svelte-1sf6xr9.svelte-1sf6xr9,.right.end.svelte-1sf6xr9.svelte-1sf6xr9{bottom:0;top:auto}.up.svelte-1sf6xr9.svelte-1sf6xr9{top:0;left:0}.down.svelte-1sf6xr9.svelte-1sf6xr9{bottom:0;left:0}.up.center.svelte-1sf6xr9.svelte-1sf6xr9,.down.center.svelte-1sf6xr9.svelte-1sf6xr9{left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%)}.up.end.svelte-1sf6xr9.svelte-1sf6xr9,.down.end.svelte-1sf6xr9.svelte-1sf6xr9{right:0;left:auto}.full.left.start.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:start;align-items:flex-start}.full.left.center.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.center.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:center;align-items:center}.full.left.end.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.end.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:end;align-items:flex-end}.full.up.start.svelte-1sf6xr9.svelte-1sf6xr9,.full.down.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:start;justify-content:flex-start}.full.up.center.svelte-1sf6xr9.svelte-1sf6xr9,.full.down.center.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:center;justify-content:center}.full.up.end.svelte-1sf6xr9.svelte-1sf6xr9,.full.down-end.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:end;justify-content:flex-end}span.svelte-1sf6xr9.svelte-1sf6xr9{display:inline-block;line-height:1;opacity:1}.debug.svelte-1sf6xr9 .left.svelte-1sf6xr9,.debug.svelte-1sf6xr9 .right.svelte-1sf6xr9{background:red;opacity:.5}.debug.svelte-1sf6xr9 .up.svelte-1sf6xr9,.debug.svelte-1sf6xr9 .down.svelte-1sf6xr9{background:orange;opacity:.5}.count.svelte-rrphdy{color:#787878;font-size:14px;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px;flex-shrink:0}@media only screen and (max-width: 600px){.count.svelte-rrphdy{margin-bottom:5px}}.artist__player.svelte-1idfvi7.svelte-1idfvi7{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;gap:.25rem;font-weight:500;cursor:pointer;margin-top:.25rem}.artist__player.svelte-1idfvi7 svg.svelte-1idfvi7{height:35px;width:35px;fill:#787878;-webkit-transition:fill .25s;transition:fill .25s}.artist__player.svelte-1idfvi7:hover svg.svelte-1idfvi7{fill:#555}.artist.svelte-1s1k6wy.svelte-1s1k6wy{font-size:24px;width:100%;color:#000;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-flex:1;flex-grow:1}@media only screen and (max-width: 600px){.artist__title.svelte-1s1k6wy.svelte-1s1k6wy{margin:0}}.artist__description.svelte-1s1k6wy.svelte-1s1k6wy{color:#787878;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}@media only screen and (max-width: 600px){.artist__description.svelte-1s1k6wy.svelte-1s1k6wy{font-size:16px}}.artist__art.svelte-1s1k6wy.svelte-1s1k6wy{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-flex:1;flex-grow:1;max-height:100%;overflow:hidden;position:relative}.artist__art.svelte-1s1k6wy .toploader.svelte-1s1k6wy{width:100%;height:100%;background-image:var(--toploader-url);background-repeat:no-repeat;background-position:center;background-size:contain;position:absolute;top:0;left:0}.artist__art.svelte-1s1k6wy .image.svelte-1s1k6wy{height:100%;width:100%;background:var(--image);background-repeat:no-repeat;background-position:center;background-size:contain}.voter.svelte-v34u9f.svelte-v34u9f{flex-shrink:0}.voter.inactive.svelte-v34u9f.svelte-v34u9f{pointer-events:none}.voter.svelte-v34u9f .which.svelte-v34u9f{font-size:24px;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;color:#787878;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin-bottom:1rem;margin-top:1rem}@media only screen and (max-width: 600px){.voter.svelte-v34u9f .which.svelte-v34u9f{font-size:16px}}.voter__controls.svelte-v34u9f.svelte-v34u9f{font-size:24px;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}.voter__controls.svelte-v34u9f .idk.svelte-v34u9f{text-align:center;margin-top:1rem;margin-bottom:1rem}.voter__controls__gens.svelte-v34u9f.svelte-v34u9f{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;gap:1rem;margin:0 auto}@media only screen and (max-width: 600px){.voter__controls__gens.svelte-v34u9f.svelte-v34u9f{gap:.25rem}}.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f{background:#5f5f5f;width:90px;aspect-ratio:1/1;border-radius:8%;color:#fff;position:relative;border:2px solid white;-webkit-transition:all .25s;transition:all .25s}@media only screen and (max-width: 600px){.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f{width:70px;font-size:16px}}.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f:after{content:"";width:100%;height:100%;position:absolute;background-image:var(--toploader-url);background-size:cover;top:0;left:0}@media (hover: hover) and (pointer: fine){.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f:hover{background:#fff;color:#5f5f5f;border:2px solid var(--color-accent)}}.voter__controls__gens.svelte-v34u9f button.active.svelte-v34u9f{background:#fff;color:#5f5f5f;border:2px solid var(--color-accent)}#survey.svelte-1dbz5sc.svelte-1dbz5sc.svelte-1dbz5sc{text-align:left;--accent-color:rgb(195, 115, 183)}#survey.svelte-1dbz5sc p.svelte-1dbz5sc.svelte-1dbz5sc{color:#787878;font-size:14px;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px}#survey.svelte-1dbz5sc form.svelte-1dbz5sc.svelte-1dbz5sc{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;gap:1rem}#survey.svelte-1dbz5sc form .round.svelte-1dbz5sc.svelte-1dbz5sc{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative}#survey.svelte-1dbz5sc form .round .checkbox-label.svelte-1dbz5sc.svelte-1dbz5sc{background-color:#fff;border:2px solid #9c9c9c;border-radius:8%;cursor:pointer;display:inline-block;height:28px;width:28px;position:relative}#survey.svelte-1dbz5sc form .round .checkbox-label.svelte-1dbz5sc.svelte-1dbz5sc:after{content:"";position:absolute;top:8px;left:7px;width:12px;height:6px;border:2px solid #fff;border-top:none;border-right:none;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc.svelte-1dbz5sc{position:absolute;opacity:0;width:0;height:0}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc:checked+.checkbox-label.svelte-1dbz5sc{background-color:var(--accent-color);border-color:var(--accent-color)}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc:checked+.checkbox-label.svelte-1dbz5sc:after{opacity:1}#survey.svelte-1dbz5sc form .round .factor-label.svelte-1dbz5sc.svelte-1dbz5sc{position:absolute;width:-webkit-max-content;width:-moz-max-content;width:max-content;white-space:nowrap;margin-top:1px;left:35px}#results.svelte-nc345f.svelte-nc345f{margin-top:25vh;text-align:left;--accent-color:rgb(195, 115, 183)}#results.svelte-nc345f p.svelte-nc345f{font-weight:400;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px}#results.svelte-nc345f .email-signup.svelte-nc345f{display:-webkit-box;display:flex;border:1px solid #000;border-radius:10px;overflow:hidden}#results.svelte-nc345f .email-signup .email-input.svelte-nc345f{-webkit-box-flex:1;flex:1;padding:1rem;border:none;outline:none}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f{background-color:#ddd;border:none;padding:1rem;cursor:pointer;font-weight:700;border-left:1px solid #000;width:100%;max-width:200px}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f:not(:disabled):hover{background-color:#ccc}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f:disabled{cursor:auto}.reveal.svelte-nc345f.svelte-nc345f{font-size:24px;letter-spacing:-.5px;line-height:.9;background:none;margin:100px auto 50px;text-decoration:underline;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.viz.svelte-nc345f.svelte-nc345f{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;gap:1rem}.viz.svelte-nc345f .row.svelte-nc345f{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}@media only screen and (max-width: 700px){.viz.svelte-nc345f .row.svelte-nc345f{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}.viz.svelte-nc345f .row .plot.svelte-nc345f{width:100%;max-width:500px;display:-webkit-box;display:flex;border-radius:5px;overflow:hidden}.viz.svelte-nc345f .row .plot .cell.svelte-nc345f{height:40px;width:var(--width);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;background-color:var(--bg);color:var(--color)}.viz.svelte-nc345f .row .plot .cell span.isLargest.svelte-nc345f{font-weight:500}.methodology.svelte-nc345f.svelte-nc345f{border-top:1px solid #000;margin-top:10rem;padding-top:1rem}.board.svelte-d12z7e{width:100%;max-width:800px;display:-webkit-box;display:flex;margin:0 auto;align-content:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:var(--justify-content);justify-content:var(--justify-content)}#intro-gallery.svelte-rf0zu8.svelte-rf0zu8{position:absolute;width:100%;max-width:1200px;height:100%;z-index:-1;margin:0 auto;left:0;right:0}#intro-gallery.svelte-rf0zu8 img.svelte-rf0zu8{width:250px;position:absolute;border-radius:30px;-webkit-filter:drop-shadow(0 .15rem .75rem #555);filter:drop-shadow(0 .15rem .75rem #555);-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;top:var(--top);right:var(--right);bottom:var(--bottom);left:var(--left)}#intro-gallery.svelte-rf0zu8 img[data-index="1"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTop;animation-name:svelte-rf0zu8-flyInFromTop}#intro-gallery.svelte-rf0zu8 img[data-index="2"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTopRight;animation-name:svelte-rf0zu8-flyInFromTopRight}#intro-gallery.svelte-rf0zu8 img[data-index="3"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottomRight;animation-name:svelte-rf0zu8-flyInFromBottomRight}#intro-gallery.svelte-rf0zu8 img[data-index="4"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottom;animation-name:svelte-rf0zu8-flyInFromBottom}#intro-gallery.svelte-rf0zu8 img[data-index="5"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottomLeft;animation-name:svelte-rf0zu8-flyInFromBottomLeft}#intro-gallery.svelte-rf0zu8 img[data-index="6"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTopLeft;animation-name:svelte-rf0zu8-flyInFromTopLeft}@-webkit-keyframes svelte-rf0zu8-flyInFromTop{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(-100vh);transform:translate(var(--translateX, 0)) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTop{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(-100vh);transform:translate(var(--translateX, 0)) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromTopRight{0%{-webkit-transform:translateX(100vh) translateY(-100vh);transform:translate(100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTopRight{0%{-webkit-transform:translateX(100vh) translateY(-100vh);transform:translate(100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottomRight{0%{-webkit-transform:translateX(100vh) translateY(100vh);transform:translate(100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottomRight{0%{-webkit-transform:translateX(100vh) translateY(100vh);transform:translate(100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottom{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(100vh);transform:translate(var(--translateX, 0)) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottom{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(100vh);transform:translate(var(--translateX, 0)) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromTopLeft{0%{-webkit-transform:translateX(-100vh) translateY(-100vh);transform:translate(-100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTopLeft{0%{-webkit-transform:translateX(-100vh) translateY(-100vh);transform:translate(-100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottomLeft{0%{-webkit-transform:translateX(-100vh) translateY(100vh);transform:translate(-100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottomLeft{0%{-webkit-transform:translateX(-100vh) translateY(100vh);transform:translate(-100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}.text.svelte-rqsfvk{font-size:4rem;font-weight:400;width:calc(100% - 50px);max-width:900px;letter-spacing:-.5px;line-height:1.2}@media only screen and (max-width: 600px){.text.svelte-rqsfvk{max-width:100%;width:calc(100% - 5px);font-size:2.5rem}}article.svelte-rqsfvk{width:100lvw;overflow-x:hidden;height:calc(var(--height) - var(--header-height));z-index:3}.slide a{pointer-events:auto;white-space:nowrap}.slide{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;padding:1rem;text-align:center}.slide.vertical-center{-webkit-box-align:center;align-items:center} diff --git a/docs/_app/immutable/assets/_page.F3iUeXc8.css b/docs/_app/immutable/assets/_page.F3iUeXc8.css deleted file mode 100644 index 980dcb1..0000000 --- a/docs/_app/immutable/assets/_page.F3iUeXc8.css +++ /dev/null @@ -1 +0,0 @@ -.overlay.svelte-mlybgp{position:fixed;z-index:1000;height:100%;width:100%;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;text-align:center;background:none}button.svelte-mlybgp{background:#e4cee1;border-radius:20px;padding:10px 24px;font-weight:600;-webkit-box-shadow:4px 4px 4px 0px rgba(0,0,0,.25);box-shadow:4px 4px 4px #00000040}section.svelte-1ceqw5z.svelte-1ceqw5z{position:relative;width:100%;height:100%;margin:0;padding:0;z-index:1;overflow:hidden}.slides.svelte-1ceqw5z.svelte-1ceqw5z{display:-webkit-box;display:flex;flex-wrap:wrap;position:relative;width:100%;height:100%;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;z-index:1}.horizontal.svelte-1ceqw5z>.slides.svelte-1ceqw5z{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.vertical.svelte-1ceqw5z>.slides.svelte-1ceqw5z{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.slide.svelte-1h814z3{position:relative;width:100%;height:100%}button.svelte-1v4ps8e{padding:.5rem 1rem;font-size:var(--font-size);border:none;background-color:var(--color-pink);color:#000;border-radius:5px;cursor:pointer;-webkit-transition:background-color .3s;transition:background-color .3s;-webkit-transition:-webkit-transform .5s;transition:-webkit-transform .5s;transition:transform .5s;transition:transform .5s,-webkit-transform .5s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}button.fixed.svelte-1v4ps8e{position:fixed;right:2rem;bottom:100px}button.svelte-1v4ps8e:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.arrows.svelte-1sf6xr9.svelte-1sf6xr9{margin:0;align-self:flex-end;padding-bottom:100px;display:-webkit-box;display:flex}.next.svelte-1sf6xr9.svelte-1sf6xr9{font-size:24px;letter-spacing:-.5px;color:#787878;line-height:.9;margin-right:5px}section.svelte-1sf6xr9.svelte-1sf6xr9{position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--z-overlay);pointer-events:none}button.svelte-1sf6xr9.svelte-1sf6xr9{position:absolute;cursor:pointer;background:none;border-radius:0;outline:none;border:none;-webkit-box-shadow:none;box-shadow:none;pointer-events:auto;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-align:end;align-items:flex-end}button.svelte-1sf6xr9.svelte-1sf6xr9:disabled{opacity:.2;cursor:not-allowed}.left.svelte-1sf6xr9.svelte-1sf6xr9{left:0;top:0}.left.svelte-1sf6xr9 .arrows.svelte-1sf6xr9{align-self:flex-start}.right.svelte-1sf6xr9.svelte-1sf6xr9{right:0;top:0}.left.start.svelte-1sf6xr9.svelte-1sf6xr9,.right.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:start;align-items:flex-start}.left.center.svelte-1sf6xr9.svelte-1sf6xr9,.right.center.svelte-1sf6xr9.svelte-1sf6xr9{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.left.end.svelte-1sf6xr9.svelte-1sf6xr9,.right.end.svelte-1sf6xr9.svelte-1sf6xr9{bottom:0;top:auto}.up.svelte-1sf6xr9.svelte-1sf6xr9{top:0;left:0}.down.svelte-1sf6xr9.svelte-1sf6xr9{bottom:0;left:0}.up.center.svelte-1sf6xr9.svelte-1sf6xr9,.down.center.svelte-1sf6xr9.svelte-1sf6xr9{left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%)}.up.end.svelte-1sf6xr9.svelte-1sf6xr9,.down.end.svelte-1sf6xr9.svelte-1sf6xr9{right:0;left:auto}.full.left.start.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:start;align-items:flex-start}.full.left.center.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.center.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:center;align-items:center}.full.left.end.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.end.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:end;align-items:flex-end}.full.up.start.svelte-1sf6xr9.svelte-1sf6xr9,.full.down.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:start;justify-content:flex-start}.full.up.center.svelte-1sf6xr9.svelte-1sf6xr9,.full.down.center.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:center;justify-content:center}.full.up.end.svelte-1sf6xr9.svelte-1sf6xr9,.full.down-end.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:end;justify-content:flex-end}span.svelte-1sf6xr9.svelte-1sf6xr9{display:inline-block;line-height:1;opacity:1}.debug.svelte-1sf6xr9 .left.svelte-1sf6xr9,.debug.svelte-1sf6xr9 .right.svelte-1sf6xr9{background:red;opacity:.5}.debug.svelte-1sf6xr9 .up.svelte-1sf6xr9,.debug.svelte-1sf6xr9 .down.svelte-1sf6xr9{background:orange;opacity:.5}.count.svelte-rrphdy{color:#787878;font-size:14px;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px;flex-shrink:0}@media only screen and (max-width: 600px){.count.svelte-rrphdy{margin-bottom:5px}}.artist__player.svelte-1idfvi7.svelte-1idfvi7{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;gap:.25rem;font-weight:500;cursor:pointer;margin-top:.25rem}.artist__player.svelte-1idfvi7 svg.svelte-1idfvi7{height:35px;width:35px;fill:#787878;-webkit-transition:fill .25s;transition:fill .25s}.artist__player.svelte-1idfvi7:hover svg.svelte-1idfvi7{fill:#555}.artist.svelte-1s1k6wy.svelte-1s1k6wy{font-size:24px;width:100%;color:#000;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-flex:1;flex-grow:1}@media only screen and (max-width: 600px){.artist__title.svelte-1s1k6wy.svelte-1s1k6wy{margin:0}}.artist__description.svelte-1s1k6wy.svelte-1s1k6wy{color:#787878;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}@media only screen and (max-width: 600px){.artist__description.svelte-1s1k6wy.svelte-1s1k6wy{font-size:16px}}.artist__art.svelte-1s1k6wy.svelte-1s1k6wy{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-flex:1;flex-grow:1;max-height:100%;overflow:hidden;position:relative}.artist__art.svelte-1s1k6wy .toploader.svelte-1s1k6wy{width:100%;height:100%;background-image:var(--toploader-url);background-repeat:no-repeat;background-position:center;background-size:contain;position:absolute;top:0;left:0}.artist__art.svelte-1s1k6wy .image.svelte-1s1k6wy{height:100%;width:100%;background:var(--image);background-repeat:no-repeat;background-position:center;background-size:contain}.voter.svelte-v34u9f.svelte-v34u9f{flex-shrink:0}.voter.inactive.svelte-v34u9f.svelte-v34u9f{pointer-events:none}.voter.svelte-v34u9f .which.svelte-v34u9f{font-size:24px;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;color:#787878;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin-bottom:1rem;margin-top:1rem}@media only screen and (max-width: 600px){.voter.svelte-v34u9f .which.svelte-v34u9f{font-size:16px}}.voter__controls.svelte-v34u9f.svelte-v34u9f{font-size:24px;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}.voter__controls.svelte-v34u9f .idk.svelte-v34u9f{text-align:center;margin-top:1rem;margin-bottom:1rem}.voter__controls__gens.svelte-v34u9f.svelte-v34u9f{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;gap:1rem;margin:0 auto}@media only screen and (max-width: 600px){.voter__controls__gens.svelte-v34u9f.svelte-v34u9f{gap:.25rem}}.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f{background:#5f5f5f;width:90px;aspect-ratio:1/1;border-radius:8%;color:#fff;position:relative;border:2px solid white;-webkit-transition:all .25s;transition:all .25s}@media only screen and (max-width: 600px){.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f{width:70px;font-size:16px}}.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f:after{content:"";width:100%;height:100%;position:absolute;background-image:var(--toploader-url);background-size:cover;top:0;left:0}@media (hover: hover) and (pointer: fine){.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f:hover{background:#fff;color:#5f5f5f;border:2px solid var(--color-accent)}}.voter__controls__gens.svelte-v34u9f button.active.svelte-v34u9f{background:#fff;color:#5f5f5f;border:2px solid var(--color-accent)}#survey.svelte-1dbz5sc.svelte-1dbz5sc.svelte-1dbz5sc{text-align:left;--accent-color:rgb(195, 115, 183)}#survey.svelte-1dbz5sc p.svelte-1dbz5sc.svelte-1dbz5sc{color:#787878;font-size:14px;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px}#survey.svelte-1dbz5sc form.svelte-1dbz5sc.svelte-1dbz5sc{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;gap:1rem}#survey.svelte-1dbz5sc form .round.svelte-1dbz5sc.svelte-1dbz5sc{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative}#survey.svelte-1dbz5sc form .round .checkbox-label.svelte-1dbz5sc.svelte-1dbz5sc{background-color:#fff;border:2px solid #9c9c9c;border-radius:8%;cursor:pointer;display:inline-block;height:28px;width:28px;position:relative}#survey.svelte-1dbz5sc form .round .checkbox-label.svelte-1dbz5sc.svelte-1dbz5sc:after{content:"";position:absolute;top:8px;left:7px;width:12px;height:6px;border:2px solid #fff;border-top:none;border-right:none;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc.svelte-1dbz5sc{position:absolute;opacity:0;width:0;height:0}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc:checked+.checkbox-label.svelte-1dbz5sc{background-color:var(--accent-color);border-color:var(--accent-color)}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc:checked+.checkbox-label.svelte-1dbz5sc:after{opacity:1}#survey.svelte-1dbz5sc form .round .factor-label.svelte-1dbz5sc.svelte-1dbz5sc{position:absolute;width:-webkit-max-content;width:-moz-max-content;width:max-content;white-space:nowrap;margin-top:1px;left:35px}#results.svelte-nc345f.svelte-nc345f{margin-top:25vh;text-align:left;--accent-color:rgb(195, 115, 183)}#results.svelte-nc345f p.svelte-nc345f{font-weight:400;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px}#results.svelte-nc345f .email-signup.svelte-nc345f{display:-webkit-box;display:flex;border:1px solid #000;border-radius:10px;overflow:hidden}#results.svelte-nc345f .email-signup .email-input.svelte-nc345f{-webkit-box-flex:1;flex:1;padding:1rem;border:none;outline:none}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f{background-color:#ddd;border:none;padding:1rem;cursor:pointer;font-weight:700;border-left:1px solid #000;width:100%;max-width:200px}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f:not(:disabled):hover{background-color:#ccc}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f:disabled{cursor:auto}.reveal.svelte-nc345f.svelte-nc345f{font-size:24px;letter-spacing:-.5px;line-height:.9;background:none;margin:100px auto 50px;text-decoration:underline;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.viz.svelte-nc345f.svelte-nc345f{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;gap:1rem}.viz.svelte-nc345f .row.svelte-nc345f{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}@media only screen and (max-width: 700px){.viz.svelte-nc345f .row.svelte-nc345f{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}.viz.svelte-nc345f .row .plot.svelte-nc345f{width:100%;max-width:500px;display:-webkit-box;display:flex;border-radius:5px;overflow:hidden}.viz.svelte-nc345f .row .plot .cell.svelte-nc345f{height:40px;width:var(--width);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;background-color:var(--bg);color:var(--color)}.viz.svelte-nc345f .row .plot .cell span.isLargest.svelte-nc345f{font-weight:500}.methodology.svelte-nc345f.svelte-nc345f{border-top:1px solid #000;margin-top:10rem;padding-top:1rem}.board.svelte-d12z7e{width:100%;max-width:800px;display:-webkit-box;display:flex;margin:0 auto;align-content:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:var(--justify-content);justify-content:var(--justify-content)}#intro-gallery.svelte-rf0zu8.svelte-rf0zu8{position:absolute;width:100%;max-width:1200px;height:100%;z-index:-1;margin:0 auto;left:0;right:0}#intro-gallery.svelte-rf0zu8 img.svelte-rf0zu8{width:250px;position:absolute;border-radius:30px;-webkit-filter:drop-shadow(0 .15rem .75rem #555);filter:drop-shadow(0 .15rem .75rem #555);-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;top:var(--top);right:var(--right);bottom:var(--bottom);left:var(--left)}#intro-gallery.svelte-rf0zu8 img[data-index="1"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTop;animation-name:svelte-rf0zu8-flyInFromTop}#intro-gallery.svelte-rf0zu8 img[data-index="2"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTopRight;animation-name:svelte-rf0zu8-flyInFromTopRight}#intro-gallery.svelte-rf0zu8 img[data-index="3"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottomRight;animation-name:svelte-rf0zu8-flyInFromBottomRight}#intro-gallery.svelte-rf0zu8 img[data-index="4"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottom;animation-name:svelte-rf0zu8-flyInFromBottom}#intro-gallery.svelte-rf0zu8 img[data-index="5"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottomLeft;animation-name:svelte-rf0zu8-flyInFromBottomLeft}#intro-gallery.svelte-rf0zu8 img[data-index="6"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTopLeft;animation-name:svelte-rf0zu8-flyInFromTopLeft}@-webkit-keyframes svelte-rf0zu8-flyInFromTop{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(-100vh);transform:translate(var(--translateX, 0)) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTop{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(-100vh);transform:translate(var(--translateX, 0)) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromTopRight{0%{-webkit-transform:translateX(100vh) translateY(-100vh);transform:translate(100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTopRight{0%{-webkit-transform:translateX(100vh) translateY(-100vh);transform:translate(100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottomRight{0%{-webkit-transform:translateX(100vh) translateY(100vh);transform:translate(100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottomRight{0%{-webkit-transform:translateX(100vh) translateY(100vh);transform:translate(100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottom{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(100vh);transform:translate(var(--translateX, 0)) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottom{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(100vh);transform:translate(var(--translateX, 0)) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromTopLeft{0%{-webkit-transform:translateX(-100vh) translateY(-100vh);transform:translate(-100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTopLeft{0%{-webkit-transform:translateX(-100vh) translateY(-100vh);transform:translate(-100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottomLeft{0%{-webkit-transform:translateX(-100vh) translateY(100vh);transform:translate(-100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottomLeft{0%{-webkit-transform:translateX(-100vh) translateY(100vh);transform:translate(-100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}.text.svelte-u468tu{font-size:4rem;font-weight:400;width:calc(100% - 50px);max-width:900px;letter-spacing:-.5px;line-height:1.2}article.svelte-u468tu{width:100lvw;overflow-x:hidden;height:calc(var(--height) - var(--header-height));z-index:3}.slide a{pointer-events:auto;white-space:nowrap}.slide{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;padding:1rem;text-align:center}.slide.vertical-center{-webkit-box-align:center;align-items:center} diff --git a/docs/_app/immutable/assets/_page.lKxKqI_2.css b/docs/_app/immutable/assets/_page.lKxKqI_2.css new file mode 100644 index 0000000..39ca946 --- /dev/null +++ b/docs/_app/immutable/assets/_page.lKxKqI_2.css @@ -0,0 +1 @@ +.overlay.svelte-mlybgp{position:fixed;z-index:1000;height:100%;width:100%;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;text-align:center;background:none}button.svelte-mlybgp{background:#e4cee1;border-radius:20px;padding:10px 24px;font-weight:600;-webkit-box-shadow:4px 4px 4px 0px rgba(0,0,0,.25);box-shadow:4px 4px 4px #00000040}section.svelte-1ceqw5z.svelte-1ceqw5z{position:relative;width:100%;height:100%;margin:0;padding:0;z-index:1;overflow:hidden}.slides.svelte-1ceqw5z.svelte-1ceqw5z{display:-webkit-box;display:flex;flex-wrap:wrap;position:relative;width:100%;height:100%;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;z-index:1}.horizontal.svelte-1ceqw5z>.slides.svelte-1ceqw5z{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.vertical.svelte-1ceqw5z>.slides.svelte-1ceqw5z{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.slide.svelte-1h814z3{position:relative;width:100%;height:100%}button.svelte-rrf764{padding:.5rem 1rem;font-size:var(--font-size);border:none;background-color:var(--color-pink);color:#000;border-radius:5px;cursor:pointer;-webkit-transition:background-color .3s;transition:background-color .3s;-webkit-transition:-webkit-transform .5s;transition:-webkit-transform .5s;transition:transform .5s;transition:transform .5s,-webkit-transform .5s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;touch-action:manipulation}button.fixed.svelte-rrf764{position:fixed;right:2rem;bottom:100px}@media only screen and (max-width: 600px){button.fixed.svelte-rrf764{bottom:30px}}@media (hover: hover) and (pointer: fine){button.svelte-rrf764:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}}.arrows.svelte-1sf6xr9.svelte-1sf6xr9{margin:0;align-self:flex-end;padding-bottom:100px;display:-webkit-box;display:flex}.next.svelte-1sf6xr9.svelte-1sf6xr9{font-size:24px;letter-spacing:-.5px;color:#787878;line-height:.9;margin-right:5px}section.svelte-1sf6xr9.svelte-1sf6xr9{position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--z-overlay);pointer-events:none}button.svelte-1sf6xr9.svelte-1sf6xr9{position:absolute;cursor:pointer;background:none;border-radius:0;outline:none;border:none;-webkit-box-shadow:none;box-shadow:none;pointer-events:auto;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-align:end;align-items:flex-end}button.svelte-1sf6xr9.svelte-1sf6xr9:disabled{opacity:.2;cursor:not-allowed}.left.svelte-1sf6xr9.svelte-1sf6xr9{left:0;top:0}.left.svelte-1sf6xr9 .arrows.svelte-1sf6xr9{align-self:flex-start}.right.svelte-1sf6xr9.svelte-1sf6xr9{right:0;top:0}.left.start.svelte-1sf6xr9.svelte-1sf6xr9,.right.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:start;align-items:flex-start}.left.center.svelte-1sf6xr9.svelte-1sf6xr9,.right.center.svelte-1sf6xr9.svelte-1sf6xr9{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.left.end.svelte-1sf6xr9.svelte-1sf6xr9,.right.end.svelte-1sf6xr9.svelte-1sf6xr9{bottom:0;top:auto}.up.svelte-1sf6xr9.svelte-1sf6xr9{top:0;left:0}.down.svelte-1sf6xr9.svelte-1sf6xr9{bottom:0;left:0}.up.center.svelte-1sf6xr9.svelte-1sf6xr9,.down.center.svelte-1sf6xr9.svelte-1sf6xr9{left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%)}.up.end.svelte-1sf6xr9.svelte-1sf6xr9,.down.end.svelte-1sf6xr9.svelte-1sf6xr9{right:0;left:auto}.full.left.start.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:start;align-items:flex-start}.full.left.center.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.center.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:center;align-items:center}.full.left.end.svelte-1sf6xr9.svelte-1sf6xr9,.full.right.end.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-align:end;align-items:flex-end}.full.up.start.svelte-1sf6xr9.svelte-1sf6xr9,.full.down.start.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:start;justify-content:flex-start}.full.up.center.svelte-1sf6xr9.svelte-1sf6xr9,.full.down.center.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:center;justify-content:center}.full.up.end.svelte-1sf6xr9.svelte-1sf6xr9,.full.down-end.svelte-1sf6xr9.svelte-1sf6xr9{-webkit-box-pack:end;justify-content:flex-end}span.svelte-1sf6xr9.svelte-1sf6xr9{display:inline-block;line-height:1;opacity:1}.debug.svelte-1sf6xr9 .left.svelte-1sf6xr9,.debug.svelte-1sf6xr9 .right.svelte-1sf6xr9{background:red;opacity:.5}.debug.svelte-1sf6xr9 .up.svelte-1sf6xr9,.debug.svelte-1sf6xr9 .down.svelte-1sf6xr9{background:orange;opacity:.5}.count.svelte-rrphdy{color:#787878;font-size:14px;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px;flex-shrink:0}@media only screen and (max-width: 600px){.count.svelte-rrphdy{margin-bottom:5px}}.artist__player.svelte-1idfvi7.svelte-1idfvi7{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;gap:.25rem;font-weight:500;cursor:pointer;margin-top:.25rem}.artist__player.svelte-1idfvi7 svg.svelte-1idfvi7{height:35px;width:35px;fill:#787878;-webkit-transition:fill .25s;transition:fill .25s}.artist__player.svelte-1idfvi7:hover svg.svelte-1idfvi7{fill:#555}.artist.svelte-1s1k6wy.svelte-1s1k6wy{font-size:24px;width:100%;color:#000;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-flex:1;flex-grow:1}@media only screen and (max-width: 600px){.artist__title.svelte-1s1k6wy.svelte-1s1k6wy{margin:0}}.artist__description.svelte-1s1k6wy.svelte-1s1k6wy{color:#787878;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}@media only screen and (max-width: 600px){.artist__description.svelte-1s1k6wy.svelte-1s1k6wy{font-size:16px}}.artist__art.svelte-1s1k6wy.svelte-1s1k6wy{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-flex:1;flex-grow:1;max-height:100%;overflow:hidden;position:relative}.artist__art.svelte-1s1k6wy .toploader.svelte-1s1k6wy{width:100%;height:100%;background-image:var(--toploader-url);background-repeat:no-repeat;background-position:center;background-size:contain;position:absolute;top:0;left:0}.artist__art.svelte-1s1k6wy .image.svelte-1s1k6wy{height:100%;width:100%;background:var(--image);background-repeat:no-repeat;background-position:center;background-size:contain}.voter.svelte-v34u9f.svelte-v34u9f{flex-shrink:0}.voter.inactive.svelte-v34u9f.svelte-v34u9f{pointer-events:none}.voter.svelte-v34u9f .which.svelte-v34u9f{font-size:24px;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;color:#787878;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin-bottom:1rem;margin-top:1rem}@media only screen and (max-width: 600px){.voter.svelte-v34u9f .which.svelte-v34u9f{font-size:16px}}.voter__controls.svelte-v34u9f.svelte-v34u9f{font-size:24px;font-weight:400;letter-spacing:-.8px;margin:0;line-height:1.3;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}.voter__controls.svelte-v34u9f .idk.svelte-v34u9f{text-align:center;margin-top:1rem;margin-bottom:1rem}.voter__controls__gens.svelte-v34u9f.svelte-v34u9f{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;gap:1rem;margin:0 auto}@media only screen and (max-width: 600px){.voter__controls__gens.svelte-v34u9f.svelte-v34u9f{gap:.25rem}}.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f{background:#5f5f5f;width:90px;aspect-ratio:1/1;border-radius:8%;color:#fff;position:relative;border:2px solid white;-webkit-transition:all .25s;transition:all .25s}@media only screen and (max-width: 600px){.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f{width:70px;font-size:16px}}.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f:after{content:"";width:100%;height:100%;position:absolute;background-image:var(--toploader-url);background-size:cover;top:0;left:0}@media (hover: hover) and (pointer: fine){.voter__controls__gens.svelte-v34u9f button.svelte-v34u9f:hover{background:#fff;color:#5f5f5f;border:2px solid var(--color-accent)}}.voter__controls__gens.svelte-v34u9f button.active.svelte-v34u9f{background:#fff;color:#5f5f5f;border:2px solid var(--color-accent)}#survey.svelte-1dbz5sc.svelte-1dbz5sc.svelte-1dbz5sc{text-align:left;--accent-color:rgb(195, 115, 183)}#survey.svelte-1dbz5sc p.svelte-1dbz5sc.svelte-1dbz5sc{color:#787878;font-size:14px;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px}#survey.svelte-1dbz5sc form.svelte-1dbz5sc.svelte-1dbz5sc{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;gap:1rem}#survey.svelte-1dbz5sc form .round.svelte-1dbz5sc.svelte-1dbz5sc{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative}#survey.svelte-1dbz5sc form .round .checkbox-label.svelte-1dbz5sc.svelte-1dbz5sc{background-color:#fff;border:2px solid #9c9c9c;border-radius:8%;cursor:pointer;display:inline-block;height:28px;width:28px;position:relative}#survey.svelte-1dbz5sc form .round .checkbox-label.svelte-1dbz5sc.svelte-1dbz5sc:after{content:"";position:absolute;top:8px;left:7px;width:12px;height:6px;border:2px solid #fff;border-top:none;border-right:none;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc.svelte-1dbz5sc{position:absolute;opacity:0;width:0;height:0}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc:checked+.checkbox-label.svelte-1dbz5sc{background-color:var(--accent-color);border-color:var(--accent-color)}#survey.svelte-1dbz5sc form .round input[type=checkbox].svelte-1dbz5sc:checked+.checkbox-label.svelte-1dbz5sc:after{opacity:1}#survey.svelte-1dbz5sc form .round .factor-label.svelte-1dbz5sc.svelte-1dbz5sc{position:absolute;width:-webkit-max-content;width:-moz-max-content;width:max-content;white-space:nowrap;margin-top:1px;left:35px}#results.svelte-nc345f.svelte-nc345f{margin-top:25vh;text-align:left;--accent-color:rgb(195, 115, 183)}#results.svelte-nc345f p.svelte-nc345f{font-weight:400;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;margin:0 0 20px 2px}#results.svelte-nc345f .email-signup.svelte-nc345f{display:-webkit-box;display:flex;border:1px solid #000;border-radius:10px;overflow:hidden}#results.svelte-nc345f .email-signup .email-input.svelte-nc345f{-webkit-box-flex:1;flex:1;padding:1rem;border:none;outline:none}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f{background-color:#ddd;border:none;padding:1rem;cursor:pointer;font-weight:700;border-left:1px solid #000;width:100%;max-width:200px}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f:not(:disabled):hover{background-color:#ccc}#results.svelte-nc345f .email-signup .submit-button.svelte-nc345f:disabled{cursor:auto}.reveal.svelte-nc345f.svelte-nc345f{font-size:24px;letter-spacing:-.5px;line-height:.9;background:none;margin:100px auto 50px;text-decoration:underline;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.viz.svelte-nc345f.svelte-nc345f{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;gap:1rem}.viz.svelte-nc345f .row.svelte-nc345f{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}@media only screen and (max-width: 700px){.viz.svelte-nc345f .row.svelte-nc345f{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}.viz.svelte-nc345f .row .plot.svelte-nc345f{width:100%;max-width:500px;display:-webkit-box;display:flex;border-radius:5px;overflow:hidden}.viz.svelte-nc345f .row .plot .cell.svelte-nc345f{height:40px;width:var(--width);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;background-color:var(--bg);color:var(--color)}.viz.svelte-nc345f .row .plot .cell span.isLargest.svelte-nc345f{font-weight:500}.methodology.svelte-nc345f.svelte-nc345f{border-top:1px solid #000;margin-top:10rem;padding-top:1rem}.board.svelte-d12z7e{width:100%;max-width:800px;display:-webkit-box;display:flex;margin:0 auto;align-content:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:var(--justify-content);justify-content:var(--justify-content)}#intro-gallery.svelte-rf0zu8.svelte-rf0zu8{position:absolute;width:100%;max-width:1200px;height:100%;z-index:-1;margin:0 auto;left:0;right:0}#intro-gallery.svelte-rf0zu8 img.svelte-rf0zu8{width:250px;position:absolute;border-radius:30px;-webkit-filter:drop-shadow(0 .15rem .75rem #555);filter:drop-shadow(0 .15rem .75rem #555);-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;top:var(--top);right:var(--right);bottom:var(--bottom);left:var(--left)}#intro-gallery.svelte-rf0zu8 img[data-index="1"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTop;animation-name:svelte-rf0zu8-flyInFromTop}#intro-gallery.svelte-rf0zu8 img[data-index="2"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTopRight;animation-name:svelte-rf0zu8-flyInFromTopRight}#intro-gallery.svelte-rf0zu8 img[data-index="3"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottomRight;animation-name:svelte-rf0zu8-flyInFromBottomRight}#intro-gallery.svelte-rf0zu8 img[data-index="4"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottom;animation-name:svelte-rf0zu8-flyInFromBottom}#intro-gallery.svelte-rf0zu8 img[data-index="5"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromBottomLeft;animation-name:svelte-rf0zu8-flyInFromBottomLeft}#intro-gallery.svelte-rf0zu8 img[data-index="6"].svelte-rf0zu8{-webkit-animation-name:svelte-rf0zu8-flyInFromTopLeft;animation-name:svelte-rf0zu8-flyInFromTopLeft}@-webkit-keyframes svelte-rf0zu8-flyInFromTop{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(-100vh);transform:translate(var(--translateX, 0)) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTop{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(-100vh);transform:translate(var(--translateX, 0)) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromTopRight{0%{-webkit-transform:translateX(100vh) translateY(-100vh);transform:translate(100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTopRight{0%{-webkit-transform:translateX(100vh) translateY(-100vh);transform:translate(100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottomRight{0%{-webkit-transform:translateX(100vh) translateY(100vh);transform:translate(100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottomRight{0%{-webkit-transform:translateX(100vh) translateY(100vh);transform:translate(100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottom{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(100vh);transform:translate(var(--translateX, 0)) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottom{0%{-webkit-transform:translateX(var(--translateX, 0)) translateY(100vh);transform:translate(var(--translateX, 0)) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromTopLeft{0%{-webkit-transform:translateX(-100vh) translateY(-100vh);transform:translate(-100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromTopLeft{0%{-webkit-transform:translateX(-100vh) translateY(-100vh);transform:translate(-100vh) translateY(-100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@-webkit-keyframes svelte-rf0zu8-flyInFromBottomLeft{0%{-webkit-transform:translateX(-100vh) translateY(100vh);transform:translate(-100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}@keyframes svelte-rf0zu8-flyInFromBottomLeft{0%{-webkit-transform:translateX(-100vh) translateY(100vh);transform:translate(-100vh) translateY(100vh)}to{-webkit-transform:translateX(var(--translateX, 0)) translateY(0);transform:translate(var(--translateX, 0)) translateY(0)}}.text.svelte-rqsfvk{font-size:4rem;font-weight:400;width:calc(100% - 50px);max-width:900px;letter-spacing:-.5px;line-height:1.2}@media only screen and (max-width: 600px){.text.svelte-rqsfvk{max-width:100%;width:calc(100% - 5px);font-size:2.5rem}}article.svelte-rqsfvk{width:100lvw;overflow-x:hidden;height:calc(var(--height) - var(--header-height));z-index:3}.slide a{pointer-events:auto;white-space:nowrap}.slide{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;padding:1rem;text-align:center}.slide.vertical-center{-webkit-box-align:center;align-items:center} diff --git a/docs/_app/immutable/chunks/entry.BPff3pyu.js b/docs/_app/immutable/chunks/entry.BmMTfnWU.js similarity index 99% rename from docs/_app/immutable/chunks/entry.BPff3pyu.js rename to docs/_app/immutable/chunks/entry.BmMTfnWU.js index 6c4fa03..d10b17f 100644 --- a/docs/_app/immutable/chunks/entry.BPff3pyu.js +++ b/docs/_app/immutable/chunks/entry.BmMTfnWU.js @@ -1,3 +1,3 @@ -import{v as oe}from"./scheduler.D0S_xIN3.js";import{w as pt}from"./index.BP0khYr0.js";import{a as se,b as P}from"./paths.xXzRRGsB.js";new URL("sveltekit-internal://");function ie(t,n){return t==="/"||n==="ignore"?t:n==="never"?t.endsWith("/")?t.slice(0,-1):t:n==="always"&&!t.endsWith("/")?t+"/":t}function ce(t){return t.split("%25").map(decodeURI).join("%25")}function le(t){for(const n in t)t[n]=decodeURIComponent(t[n]);return t}function ct({href:t}){return t.split("#")[0]}const fe=["href","pathname","search","toString","toJSON"];function ue(t,n,e){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(r,o){if(o==="get"||o==="getAll"||o==="has")return s=>(e(s),r[o](s));n();const i=Reflect.get(r,o);return typeof i=="function"?i.bind(r):i}}),enumerable:!0,configurable:!0});for(const r of fe)Object.defineProperty(a,r,{get(){return n(),t[r]},enumerable:!0,configurable:!0});return a}const de="/__data.json",he=".html__data.json";function pe(t){return t.endsWith(".html")?t.replace(/\.html$/,he):t.replace(/\/$/,"")+de}function ge(...t){let n=5381;for(const e of t)if(typeof e=="string"){let a=e.length;for(;a;)n=n*33^e.charCodeAt(--a)}else if(ArrayBuffer.isView(e)){const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);let r=a.length;for(;r;)n=n*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(n>>>0).toString(36)}function me(t){const n=atob(t),e=new Uint8Array(n.length);for(let a=0;a((t instanceof Request?t.method:(n==null?void 0:n.method)||"GET")!=="GET"&&G.delete(gt(t)),jt(t,n));const G=new Map;function _e(t,n){const e=gt(t,n),a=document.querySelector(e);if(a!=null&&a.textContent){let{body:r,...o}=JSON.parse(a.textContent);const i=a.getAttribute("data-ttl");return i&&G.set(e,{body:r,init:o,ttl:1e3*Number(i)}),a.getAttribute("data-b64")!==null&&(r=me(r)),Promise.resolve(new Response(r,o))}return window.fetch(t,n)}function ye(t,n,e){if(G.size>0){const a=gt(t,e),r=G.get(a);if(r){if(performance.now(){const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return n.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const o=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(o)return n.push({name:o[1],matcher:o[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const i=a.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return lt(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return lt(String.fromCharCode(...c.slice(2).split("-").map(l=>parseInt(l,16))));const u=we.exec(c),[,h,g,d,_]=u;return n.push({name:d,matcher:_,optional:!!h,rest:!!g,chained:g?f===1&&i[0]==="":!1}),g?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return lt(c)}).join("")}).join("")}/?$`),params:n}}function be(t){return!/^\([^)]+\)$/.test(t)}function Ee(t){return t.slice(1).split("/").filter(be)}function ke(t,n,e){const a={},r=t.slice(1),o=r.filter(s=>s!==void 0);let i=0;for(let s=0;su).join("/"),i=0),f===void 0){c.rest&&(a[c.name]="");continue}if(!c.matcher||e[c.matcher](f)){a[c.name]=f;const u=n[s+1],h=r[s+1];u&&!u.rest&&u.optional&&h&&c.chained&&(i=0),!u&&!h&&Object.keys(a).length===o.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return a}function lt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Se({nodes:t,server_loads:n,dictionary:e,matchers:a}){const r=new Set(n);return Object.entries(e).map(([s,[c,f,u]])=>{const{pattern:h,params:g}=ve(s),d={id:s,exec:_=>{const l=h.exec(_);if(l)return ke(l,g,a)},errors:[1,...u||[]].map(_=>t[_]),layouts:[0,...f||[]].map(i),leaf:o(c)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function o(s){const c=s<0;return c&&(s=~s),[c,t[s]]}function i(s){return s===void 0?s:[r.has(s),t[s]]}}function Dt(t,n=JSON.parse){try{return n(sessionStorage[t])}catch{}}function It(t,n,e=JSON.stringify){const a=e(n);try{sessionStorage[t]=a}catch{}}const Ae="1727454153366",$t="sveltekit:snapshot",Ct="sveltekit:scroll",Vt="sveltekit:states",Re="sveltekit:pageurl",D="sveltekit:history",q="sveltekit:navigation",J={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},K=location.origin;function Ft(t){if(t instanceof URL)return t;let n=document.baseURI;if(!n){const e=document.getElementsByTagName("base");n=e.length?e[0].href:document.URL}return new URL(t,n)}function mt(){return{x:pageXOffset,y:pageYOffset}}function O(t,n){return t.getAttribute(`data-sveltekit-${n}`)}const Lt={...J,"":J.hover};function Gt(t){let n=t.assignedSlot??t.parentNode;return(n==null?void 0:n.nodeType)===11&&(n=n.host),n}function Mt(t,n){for(;t&&t!==n;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=Gt(t)}}function ut(t,n){let e;try{e=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI)}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,r=!e||!!a||nt(e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(e==null?void 0:e.origin)===K&&t.hasAttribute("download");return{url:e,external:r,target:a,download:o}}function W(t){let n=null,e=null,a=null,r=null,o=null,i=null,s=t;for(;s&&s!==document.documentElement;)a===null&&(a=O(s,"preload-code")),r===null&&(r=O(s,"preload-data")),n===null&&(n=O(s,"keepfocus")),e===null&&(e=O(s,"noscroll")),o===null&&(o=O(s,"reload")),i===null&&(i=O(s,"replacestate")),s=Gt(s);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Lt[a??"off"],preload_data:Lt[r??"off"],keepfocus:c(n),noscroll:c(e),reload:c(o),replace_state:c(i)}}function Pt(t){const n=pt(t);let e=!0;function a(){e=!0,n.update(i=>i)}function r(i){e=!1,n.set(i)}function o(i){let s;return n.subscribe(c=>{(s===void 0||e&&c!==s)&&i(s=c)})}return{notify:a,set:r,subscribe:o}}function Ie(){const{set:t,subscribe:n}=pt(!1);let e;async function a(){clearTimeout(e);try{const r=await fetch(`${se}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const i=(await r.json()).version!==Ae;return i&&(t(!0),clearTimeout(e)),i}catch{return!1}}return{subscribe:n,check:a}}function nt(t,n){return t.origin!==K||!t.pathname.startsWith(n)}const Le=-1,Pe=-2,Ue=-3,xe=-4,Te=-5,Ne=-6;function Oe(t,n){if(typeof t=="number")return r(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const e=t,a=Array(e.length);function r(o,i=!1){if(o===Le)return;if(o===Ue)return NaN;if(o===xe)return 1/0;if(o===Te)return-1/0;if(o===Ne)return-0;if(i)throw new Error("Invalid input");if(o in a)return a[o];const s=e[o];if(!s||typeof s!="object")a[o]=s;else if(Array.isArray(s))if(typeof s[0]=="string"){const c=s[0],f=n==null?void 0:n[c];if(f)return a[o]=f(r(s[1]));switch(c){case"Date":a[o]=new Date(s[1]);break;case"Set":const u=new Set;a[o]=u;for(let d=1;dn!=null)}class at{constructor(n,e){this.status=n,typeof e=="string"?this.body={message:e}:e?this.body=e:this.body={message:`Error: ${n}`}}toString(){return JSON.stringify(this.body)}}class Ht{constructor(n,e){this.status=n,this.location=e}}class _t extends Error{constructor(n,e,a){super(a),this.status=n,this.text=e}}const $e="x-sveltekit-invalidated",Ce="x-sveltekit-trailing-slash";function z(t){return t instanceof at||t instanceof _t?t.status:500}function Ve(t){return t instanceof _t?t.text:"Internal Error"}const N=Dt(Ct)??{},H=Dt($t)??{},x={url:Pt({}),page:Pt({}),navigating:pt(null),updated:Ie()};function yt(t){N[t]=mt()}function Fe(t,n){let e=t+1;for(;N[e];)delete N[e],e+=1;for(e=n+1;H[e];)delete H[e],e+=1}function C(t){return location.href=t.href,new Promise(()=>{})}function Ut(){}let rt,dt,X,U,ht,V;const Bt=[],Z=[];let R=null;const Kt=[],Ge=[];let j=[],y={branch:[],error:null,url:null},wt=!1,Q=!1,xt=!0,B=!1,F=!1,Yt=!1,vt=!1,bt,S,L,I,tt;const M=new Set;async function tn(t,n,e){var r,o;document.URL!==location.href&&(location.href=location.href),V=t,rt=Se(t),U=document.documentElement,ht=n,dt=t.nodes[0],X=t.nodes[1],dt(),X(),S=(r=history.state)==null?void 0:r[D],L=(o=history.state)==null?void 0:o[q],S||(S=L=Date.now(),history.replaceState({...history.state,[D]:S,[q]:L},""));const a=N[S];a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y)),e?await We(ht,e):Ye(location.href,{replaceState:!0}),Je()}function Me(){Bt.length=0,vt=!1}function Jt(t){Z.some(n=>n==null?void 0:n.snapshot)&&(H[t]=Z.map(n=>{var e;return(e=n==null?void 0:n.snapshot)==null?void 0:e.capture()}))}function Wt(t){var n;(n=H[t])==null||n.forEach((e,a)=>{var r,o;(o=(r=Z[a])==null?void 0:r.snapshot)==null||o.restore(e)})}function Tt(){yt(S),It(Ct,N),Jt(L),It($t,H)}async function zt(t,n,e,a){return Y({type:"goto",url:Ft(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:e,nav_token:a,accept:()=>{n.invalidateAll&&(vt=!0)}})}async function qe(t){if(t.id!==(R==null?void 0:R.id)){const n={};M.add(n),R={id:t.id,token:n,promise:Zt({...t,preload:n}).then(e=>(M.delete(n),e.type==="loaded"&&e.state.error&&(R=null),e))}}return R.promise}async function ft(t){const n=rt.find(e=>e.exec(Qt(t)));n&&await Promise.all([...n.layouts,n.leaf].map(e=>e==null?void 0:e[1]()))}function Xt(t,n){var r;y=t.state;const e=document.querySelector("style[data-sveltekit]");e&&e.remove(),I=t.props.page,bt=new V.root({target:n,props:{...t.props,stores:x,components:Z},hydrate:!0}),Wt(L);const a={from:null,to:{params:y.params,route:{id:((r=y.route)==null?void 0:r.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};j.forEach(o=>o(a)),Q=!0}async function et({url:t,params:n,branch:e,status:a,error:r,route:o,form:i}){let s="never";if(P&&(t.pathname===P||t.pathname===P+"/"))s="always";else for(const d of e)(d==null?void 0:d.slash)!==void 0&&(s=d.slash);t.pathname=ie(t.pathname,s),t.search=t.search;const c={type:"loaded",state:{url:t,params:n,branch:e,error:r,route:o},props:{constructors:De(e).map(d=>d.node.component),page:I}};i!==void 0&&(c.props.form=i);let f={},u=!I,h=0;for(let d=0;d(s&&(c.route=!0),l[m])}),params:new Proxy(a,{get:(l,m)=>(s&&c.params.add(m),l[m])}),data:(o==null?void 0:o.data)??null,url:ue(e,()=>{s&&(c.url=!0)},l=>{s&&c.search_params.add(l)}),async fetch(l,m){let b;l instanceof Request?(b=l.url,m={body:l.method==="GET"||l.method==="HEAD"?void 0:await l.blob(),cache:l.cache,credentials:l.credentials,headers:l.headers,integrity:l.integrity,keepalive:l.keepalive,method:l.method,mode:l.mode,redirect:l.redirect,referrer:l.referrer,referrerPolicy:l.referrerPolicy,signal:l.signal,...m}):b=l;const A=new URL(b,e);return s&&d(A.href),A.origin===e.origin&&(b=A.href.slice(e.origin.length)),Q?ye(b,A.href,m):_e(b,m)},setHeaders:()=>{},depends:d,parent(){return s&&(c.parent=!0),n()},untrack(l){s=!1;try{return l()}finally{s=!0}}};i=await f.universal.load.call(null,_)??null}return{node:f,loader:t,server:o,universal:(h=f.universal)!=null&&h.load?{type:"data",data:i,uses:c}:null,data:i??(o==null?void 0:o.data)??null,slash:((g=f.universal)==null?void 0:g.trailingSlash)??(o==null?void 0:o.slash)}}function Nt(t,n,e,a,r,o){if(vt)return!0;if(!r)return!1;if(r.parent&&t||r.route&&n||r.url&&e)return!0;for(const i of r.search_params)if(a.has(i))return!0;for(const i of r.params)if(o[i]!==y.params[i])return!0;for(const i of r.dependencies)if(Bt.some(s=>s(new URL(i))))return!0;return!1}function kt(t,n){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?n??null:null}function He(t,n){if(!t)return new Set(n.searchParams.keys());const e=new Set([...t.searchParams.keys(),...n.searchParams.keys()]);for(const a of e){const r=t.searchParams.getAll(a),o=n.searchParams.getAll(a);r.every(i=>o.includes(i))&&o.every(i=>r.includes(i))&&e.delete(a)}return e}function Ot({error:t,url:n,route:e,params:a}){return{type:"loaded",state:{error:t,url:n,route:e,params:a,branch:[]},props:{page:I,constructors:[]}}}async function Zt({id:t,invalidating:n,url:e,params:a,route:r,preload:o}){if((R==null?void 0:R.id)===t)return M.delete(R.token),R.promise;const{errors:i,layouts:s,leaf:c}=r,f=[...s,c];i.forEach(p=>p==null?void 0:p().catch(()=>{})),f.forEach(p=>p==null?void 0:p[1]().catch(()=>{}));let u=null;const h=y.url?t!==y.url.pathname+y.url.search:!1,g=y.route?r.id!==y.route.id:!1,d=He(y.url,e);let _=!1;const l=f.map((p,v)=>{var T;const E=y.branch[v],k=!!(p!=null&&p[0])&&((E==null?void 0:E.loader)!==p[1]||Nt(_,g,h,d,(T=E.server)==null?void 0:T.uses,a));return k&&(_=!0),k});if(l.some(Boolean)){try{u=await ne(e,l)}catch(p){const v=await $(p,{url:e,params:a,route:{id:t}});return M.has(o)?Ot({error:v,url:e,params:a,route:r}):ot({status:z(p),error:v,url:e,route:r})}if(u.type==="redirect")return u}const m=u==null?void 0:u.nodes;let b=!1;const A=f.map(async(p,v)=>{var st;if(!p)return;const E=y.branch[v],k=m==null?void 0:m[v];if((!k||k.type==="skip")&&p[1]===(E==null?void 0:E.loader)&&!Nt(b,g,h,d,(st=E.universal)==null?void 0:st.uses,a))return E;if(b=!0,(k==null?void 0:k.type)==="error")throw k;return Et({loader:p[1],url:e,params:a,route:r,parent:async()=>{var Rt;const At={};for(let it=0;it{});const w=[];for(let p=0;pPromise.resolve({}),server_data_node:kt(o)}),c={node:await X(),loader:X,universal:null,server:null,data:null};return await et({url:e,params:r,branch:[s,c],status:t,error:n,route:null})}function St(t,n){if(!t||nt(t,P))return;let e;try{e=V.hooks.reroute({url:new URL(t)})??t.pathname}catch{return}const a=Qt(e);for(const r of rt){const o=r.exec(a);if(o)return{id:t.pathname+t.search,invalidating:n,route:r,params:le(o),url:t}}}function Qt(t){return ce(t.slice(P.length)||"/")}function te({url:t,type:n,intent:e,delta:a}){let r=!1;const o=re(y,e,t,n);a!==void 0&&(o.navigation.delta=a);const i={...o.navigation,cancel:()=>{r=!0,o.reject(new Error("navigation cancelled"))}};return B||Kt.forEach(s=>s(i)),r?null:o}async function Y({type:t,url:n,popped:e,keepfocus:a,noscroll:r,replace_state:o,state:i={},redirect_count:s=0,nav_token:c={},accept:f=Ut,block:u=Ut}){const h=St(n,!1),g=te({url:n,type:t,delta:e==null?void 0:e.delta,intent:h});if(!g){u();return}const d=S,_=L;f(),B=!0,Q&&x.navigating.set(g.navigation),tt=c;let l=h&&await Zt(h);if(!l){if(nt(n,P))return await C(n);l=await ee(n,{id:null},await $(new _t(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404)}if(n=(h==null?void 0:h.url)||n,tt!==c)return g.reject(new Error("navigation aborted")),!1;if(l.type==="redirect")if(s>=20)l=await ot({status:500,error:await $(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}});else return zt(new URL(l.location,n).href,{},s+1,c),!1;else l.props.page.status>=400&&await x.updated.check()&&await C(n);if(Me(),yt(d),Jt(_),l.props.page.url.pathname!==n.pathname&&(n.pathname=l.props.page.url.pathname),i=e?e.state:i,!e){const w=o?0:1,p={[D]:S+=w,[q]:L+=w,[Vt]:i};(o?history.replaceState:history.pushState).call(history,p,"",n),o||Fe(S,L)}if(R=null,l.props.page.state=i,Q){y=l.state,l.props.page&&(l.props.page.url=n);const w=(await Promise.all(Ge.map(p=>p(g.navigation)))).filter(p=>typeof p=="function");if(w.length>0){let p=function(){j=j.filter(v=>!w.includes(v))};w.push(p),j.push(...w)}bt.$set(l.props),Yt=!0}else Xt(l,ht);const{activeElement:m}=document;await oe();const b=e?e.scroll:r?mt():null;if(xt){const w=n.hash&&document.getElementById(decodeURIComponent(n.hash.slice(1)));b?scrollTo(b.x,b.y):w?w.scrollIntoView():scrollTo(0,0)}const A=document.activeElement!==m&&document.activeElement!==document.body;!a&&!A&&ze(),xt=!0,l.props.page&&(I=l.props.page),B=!1,t==="popstate"&&Wt(L),g.fulfil(void 0),j.forEach(w=>w(g.navigation)),x.navigating.set(null)}async function ee(t,n,e,a){return t.origin===K&&t.pathname===location.pathname&&!wt?await ot({status:a,error:e,url:t,route:n}):await C(t)}function Ke(){let t;U.addEventListener("mousemove",o=>{const i=o.target;clearTimeout(t),t=setTimeout(()=>{a(i,2)},20)});function n(o){a(o.composedPath()[0],1)}U.addEventListener("mousedown",n),U.addEventListener("touchstart",n,{passive:!0});const e=new IntersectionObserver(o=>{for(const i of o)i.isIntersecting&&(ft(i.target.href),e.unobserve(i.target))},{threshold:0});function a(o,i){const s=Mt(o,U);if(!s)return;const{url:c,external:f,download:u}=ut(s,P);if(f||u)return;const h=W(s);if(!h.reload)if(i<=h.preload_data){const g=St(c,!1);g&&qe(g)}else i<=h.preload_code&&ft(c.pathname)}function r(){e.disconnect();for(const o of U.querySelectorAll("a")){const{url:i,external:s,download:c}=ut(o,P);if(s||c)continue;const f=W(o);f.reload||(f.preload_code===J.viewport&&e.observe(o),f.preload_code===J.eager&&ft(i.pathname))}}j.push(r),r()}function $(t,n){if(t instanceof at)return t.body;const e=z(t),a=Ve(t);return V.hooks.handleError({error:t,event:n,status:e,message:a})??{message:a}}function Ye(t,n={}){return t=Ft(t),t.origin!==K?Promise.reject(new Error("goto: invalid URL")):zt(t,n,0)}function Je(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let a=!1;if(Tt(),!B){const r=re(y,void 0,null,"leave"),o={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Kt.forEach(i=>i(o))}a?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Tt()}),(n=navigator.connection)!=null&&n.saveData||Ke(),U.addEventListener("click",e=>{var g;if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const a=Mt(e.composedPath()[0],U);if(!a)return;const{url:r,external:o,target:i,download:s}=ut(a,P);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=W(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;if(o||c.reload){te({url:r,type:"link"})?B=!0:e.preventDefault();return}const[u,h]=r.href.split("#");if(h!==void 0&&u===ct(location)){const[,d]=y.url.href.split("#");if(d===h){e.preventDefault(),h===""||h==="top"&&a.ownerDocument.getElementById("top")===null?window.scrollTo({top:0}):(g=a.ownerDocument.getElementById(h))==null||g.scrollIntoView();return}if(F=!0,yt(S),t(r),!c.replace_state)return;F=!1}e.preventDefault(),Y({type:"link",url:r,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??r.href===location.href})}),U.addEventListener("submit",e=>{if(e.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(e.target),r=e.submitter;if(((r==null?void 0:r.formMethod)||a.method)!=="get")return;const i=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(nt(i,P))return;const s=e.target,c=W(s);if(c.reload)return;e.preventDefault(),e.stopPropagation();const f=new FormData(s),u=r==null?void 0:r.getAttribute("name");u&&f.append(u,(r==null?void 0:r.getAttribute("value"))??""),i.search=new URLSearchParams(f).toString(),Y({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async e=>{var a;if((a=e.state)!=null&&a[D]){const r=e.state[D];if(tt={},r===S)return;const o=N[r],i=e.state[Vt]??{},s=new URL(e.state[Re]??location.href),c=e.state[q],f=ct(location)===ct(y.url);if(c===L&&(Yt||f)){t(s),N[S]=mt(),o&&scrollTo(o.x,o.y),i!==I.state&&(I={...I,state:i},bt.$set({page:I})),S=r;return}const h=r-S;await Y({type:"popstate",url:s,popped:{state:i,scroll:o,delta:h},accept:()=>{S=r,L=c},block:()=>{history.go(-h)},nav_token:tt})}else if(!F){const r=new URL(location.href);t(r)}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[D]:++S,[q]:L},"",location.href))});for(const e of document.querySelectorAll("link"))e.rel==="icon"&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&x.navigating.set(null)});function t(e){y.url=e,x.page.set({...I,url:e}),x.page.notify()}}async function We(t,{status:n=200,error:e,node_ids:a,params:r,route:o,data:i,form:s}){wt=!0;const c=new URL(location.href);({params:r={},route:o={id:null}}=St(c,!1)||{});let f;try{const u=a.map(async(d,_)=>{const l=i[_];return l!=null&&l.uses&&(l.uses=ae(l.uses)),Et({loader:V.nodes[d],url:c,params:r,route:o,parent:async()=>{const m={};for(let b=0;b<_;b+=1)Object.assign(m,(await u[b]).data);return m},server_data_node:kt(l)})}),h=await Promise.all(u),g=rt.find(({id:d})=>d===o.id);if(g){const d=g.layouts;for(let _=0;_o?"1":"0").join(""));const a=await jt(e.href);if(!a.ok){let o;throw(r=a.headers.get("content-type"))!=null&&r.includes("application/json")?o=await a.json():a.status===404?o="Not Found":a.status===500&&(o="Internal Error"),new at(a.status,o)}return new Promise(async o=>{var h;const i=new Map,s=a.body.getReader(),c=new TextDecoder;function f(g){return Oe(g,{Promise:d=>new Promise((_,l)=>{i.set(d,{fulfil:_,reject:l})})})}let u="";for(;;){const{done:g,value:d}=await s.read();if(g&&!u)break;for(u+=!d&&u?` +import{v as oe}from"./scheduler.D0S_xIN3.js";import{w as pt}from"./index.BP0khYr0.js";import{a as se,b as P}from"./paths.CjQJy53E.js";new URL("sveltekit-internal://");function ie(t,n){return t==="/"||n==="ignore"?t:n==="never"?t.endsWith("/")?t.slice(0,-1):t:n==="always"&&!t.endsWith("/")?t+"/":t}function ce(t){return t.split("%25").map(decodeURI).join("%25")}function le(t){for(const n in t)t[n]=decodeURIComponent(t[n]);return t}function ct({href:t}){return t.split("#")[0]}const fe=["href","pathname","search","toString","toJSON"];function ue(t,n,e){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(r,o){if(o==="get"||o==="getAll"||o==="has")return s=>(e(s),r[o](s));n();const i=Reflect.get(r,o);return typeof i=="function"?i.bind(r):i}}),enumerable:!0,configurable:!0});for(const r of fe)Object.defineProperty(a,r,{get(){return n(),t[r]},enumerable:!0,configurable:!0});return a}const de="/__data.json",he=".html__data.json";function pe(t){return t.endsWith(".html")?t.replace(/\.html$/,he):t.replace(/\/$/,"")+de}function ge(...t){let n=5381;for(const e of t)if(typeof e=="string"){let a=e.length;for(;a;)n=n*33^e.charCodeAt(--a)}else if(ArrayBuffer.isView(e)){const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);let r=a.length;for(;r;)n=n*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(n>>>0).toString(36)}function me(t){const n=atob(t),e=new Uint8Array(n.length);for(let a=0;a((t instanceof Request?t.method:(n==null?void 0:n.method)||"GET")!=="GET"&&G.delete(gt(t)),jt(t,n));const G=new Map;function _e(t,n){const e=gt(t,n),a=document.querySelector(e);if(a!=null&&a.textContent){let{body:r,...o}=JSON.parse(a.textContent);const i=a.getAttribute("data-ttl");return i&&G.set(e,{body:r,init:o,ttl:1e3*Number(i)}),a.getAttribute("data-b64")!==null&&(r=me(r)),Promise.resolve(new Response(r,o))}return window.fetch(t,n)}function ye(t,n,e){if(G.size>0){const a=gt(t,e),r=G.get(a);if(r){if(performance.now(){const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return n.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const o=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(o)return n.push({name:o[1],matcher:o[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const i=a.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return lt(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return lt(String.fromCharCode(...c.slice(2).split("-").map(l=>parseInt(l,16))));const u=we.exec(c),[,h,g,d,_]=u;return n.push({name:d,matcher:_,optional:!!h,rest:!!g,chained:g?f===1&&i[0]==="":!1}),g?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return lt(c)}).join("")}).join("")}/?$`),params:n}}function be(t){return!/^\([^)]+\)$/.test(t)}function Ee(t){return t.slice(1).split("/").filter(be)}function ke(t,n,e){const a={},r=t.slice(1),o=r.filter(s=>s!==void 0);let i=0;for(let s=0;su).join("/"),i=0),f===void 0){c.rest&&(a[c.name]="");continue}if(!c.matcher||e[c.matcher](f)){a[c.name]=f;const u=n[s+1],h=r[s+1];u&&!u.rest&&u.optional&&h&&c.chained&&(i=0),!u&&!h&&Object.keys(a).length===o.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return a}function lt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Se({nodes:t,server_loads:n,dictionary:e,matchers:a}){const r=new Set(n);return Object.entries(e).map(([s,[c,f,u]])=>{const{pattern:h,params:g}=ve(s),d={id:s,exec:_=>{const l=h.exec(_);if(l)return ke(l,g,a)},errors:[1,...u||[]].map(_=>t[_]),layouts:[0,...f||[]].map(i),leaf:o(c)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function o(s){const c=s<0;return c&&(s=~s),[c,t[s]]}function i(s){return s===void 0?s:[r.has(s),t[s]]}}function Dt(t,n=JSON.parse){try{return n(sessionStorage[t])}catch{}}function It(t,n,e=JSON.stringify){const a=e(n);try{sessionStorage[t]=a}catch{}}const Ae="1727454748082",$t="sveltekit:snapshot",Ct="sveltekit:scroll",Vt="sveltekit:states",Re="sveltekit:pageurl",D="sveltekit:history",q="sveltekit:navigation",J={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},K=location.origin;function Ft(t){if(t instanceof URL)return t;let n=document.baseURI;if(!n){const e=document.getElementsByTagName("base");n=e.length?e[0].href:document.URL}return new URL(t,n)}function mt(){return{x:pageXOffset,y:pageYOffset}}function O(t,n){return t.getAttribute(`data-sveltekit-${n}`)}const Lt={...J,"":J.hover};function Gt(t){let n=t.assignedSlot??t.parentNode;return(n==null?void 0:n.nodeType)===11&&(n=n.host),n}function Mt(t,n){for(;t&&t!==n;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=Gt(t)}}function ut(t,n){let e;try{e=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI)}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,r=!e||!!a||nt(e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(e==null?void 0:e.origin)===K&&t.hasAttribute("download");return{url:e,external:r,target:a,download:o}}function W(t){let n=null,e=null,a=null,r=null,o=null,i=null,s=t;for(;s&&s!==document.documentElement;)a===null&&(a=O(s,"preload-code")),r===null&&(r=O(s,"preload-data")),n===null&&(n=O(s,"keepfocus")),e===null&&(e=O(s,"noscroll")),o===null&&(o=O(s,"reload")),i===null&&(i=O(s,"replacestate")),s=Gt(s);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Lt[a??"off"],preload_data:Lt[r??"off"],keepfocus:c(n),noscroll:c(e),reload:c(o),replace_state:c(i)}}function Pt(t){const n=pt(t);let e=!0;function a(){e=!0,n.update(i=>i)}function r(i){e=!1,n.set(i)}function o(i){let s;return n.subscribe(c=>{(s===void 0||e&&c!==s)&&i(s=c)})}return{notify:a,set:r,subscribe:o}}function Ie(){const{set:t,subscribe:n}=pt(!1);let e;async function a(){clearTimeout(e);try{const r=await fetch(`${se}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const i=(await r.json()).version!==Ae;return i&&(t(!0),clearTimeout(e)),i}catch{return!1}}return{subscribe:n,check:a}}function nt(t,n){return t.origin!==K||!t.pathname.startsWith(n)}const Le=-1,Pe=-2,Ue=-3,xe=-4,Te=-5,Ne=-6;function Oe(t,n){if(typeof t=="number")return r(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const e=t,a=Array(e.length);function r(o,i=!1){if(o===Le)return;if(o===Ue)return NaN;if(o===xe)return 1/0;if(o===Te)return-1/0;if(o===Ne)return-0;if(i)throw new Error("Invalid input");if(o in a)return a[o];const s=e[o];if(!s||typeof s!="object")a[o]=s;else if(Array.isArray(s))if(typeof s[0]=="string"){const c=s[0],f=n==null?void 0:n[c];if(f)return a[o]=f(r(s[1]));switch(c){case"Date":a[o]=new Date(s[1]);break;case"Set":const u=new Set;a[o]=u;for(let d=1;dn!=null)}class at{constructor(n,e){this.status=n,typeof e=="string"?this.body={message:e}:e?this.body=e:this.body={message:`Error: ${n}`}}toString(){return JSON.stringify(this.body)}}class Ht{constructor(n,e){this.status=n,this.location=e}}class _t extends Error{constructor(n,e,a){super(a),this.status=n,this.text=e}}const $e="x-sveltekit-invalidated",Ce="x-sveltekit-trailing-slash";function z(t){return t instanceof at||t instanceof _t?t.status:500}function Ve(t){return t instanceof _t?t.text:"Internal Error"}const N=Dt(Ct)??{},H=Dt($t)??{},x={url:Pt({}),page:Pt({}),navigating:pt(null),updated:Ie()};function yt(t){N[t]=mt()}function Fe(t,n){let e=t+1;for(;N[e];)delete N[e],e+=1;for(e=n+1;H[e];)delete H[e],e+=1}function C(t){return location.href=t.href,new Promise(()=>{})}function Ut(){}let rt,dt,X,U,ht,V;const Bt=[],Z=[];let R=null;const Kt=[],Ge=[];let j=[],y={branch:[],error:null,url:null},wt=!1,Q=!1,xt=!0,B=!1,F=!1,Yt=!1,vt=!1,bt,S,L,I,tt;const M=new Set;async function tn(t,n,e){var r,o;document.URL!==location.href&&(location.href=location.href),V=t,rt=Se(t),U=document.documentElement,ht=n,dt=t.nodes[0],X=t.nodes[1],dt(),X(),S=(r=history.state)==null?void 0:r[D],L=(o=history.state)==null?void 0:o[q],S||(S=L=Date.now(),history.replaceState({...history.state,[D]:S,[q]:L},""));const a=N[S];a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y)),e?await We(ht,e):Ye(location.href,{replaceState:!0}),Je()}function Me(){Bt.length=0,vt=!1}function Jt(t){Z.some(n=>n==null?void 0:n.snapshot)&&(H[t]=Z.map(n=>{var e;return(e=n==null?void 0:n.snapshot)==null?void 0:e.capture()}))}function Wt(t){var n;(n=H[t])==null||n.forEach((e,a)=>{var r,o;(o=(r=Z[a])==null?void 0:r.snapshot)==null||o.restore(e)})}function Tt(){yt(S),It(Ct,N),Jt(L),It($t,H)}async function zt(t,n,e,a){return Y({type:"goto",url:Ft(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:e,nav_token:a,accept:()=>{n.invalidateAll&&(vt=!0)}})}async function qe(t){if(t.id!==(R==null?void 0:R.id)){const n={};M.add(n),R={id:t.id,token:n,promise:Zt({...t,preload:n}).then(e=>(M.delete(n),e.type==="loaded"&&e.state.error&&(R=null),e))}}return R.promise}async function ft(t){const n=rt.find(e=>e.exec(Qt(t)));n&&await Promise.all([...n.layouts,n.leaf].map(e=>e==null?void 0:e[1]()))}function Xt(t,n){var r;y=t.state;const e=document.querySelector("style[data-sveltekit]");e&&e.remove(),I=t.props.page,bt=new V.root({target:n,props:{...t.props,stores:x,components:Z},hydrate:!0}),Wt(L);const a={from:null,to:{params:y.params,route:{id:((r=y.route)==null?void 0:r.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};j.forEach(o=>o(a)),Q=!0}async function et({url:t,params:n,branch:e,status:a,error:r,route:o,form:i}){let s="never";if(P&&(t.pathname===P||t.pathname===P+"/"))s="always";else for(const d of e)(d==null?void 0:d.slash)!==void 0&&(s=d.slash);t.pathname=ie(t.pathname,s),t.search=t.search;const c={type:"loaded",state:{url:t,params:n,branch:e,error:r,route:o},props:{constructors:De(e).map(d=>d.node.component),page:I}};i!==void 0&&(c.props.form=i);let f={},u=!I,h=0;for(let d=0;d(s&&(c.route=!0),l[m])}),params:new Proxy(a,{get:(l,m)=>(s&&c.params.add(m),l[m])}),data:(o==null?void 0:o.data)??null,url:ue(e,()=>{s&&(c.url=!0)},l=>{s&&c.search_params.add(l)}),async fetch(l,m){let b;l instanceof Request?(b=l.url,m={body:l.method==="GET"||l.method==="HEAD"?void 0:await l.blob(),cache:l.cache,credentials:l.credentials,headers:l.headers,integrity:l.integrity,keepalive:l.keepalive,method:l.method,mode:l.mode,redirect:l.redirect,referrer:l.referrer,referrerPolicy:l.referrerPolicy,signal:l.signal,...m}):b=l;const A=new URL(b,e);return s&&d(A.href),A.origin===e.origin&&(b=A.href.slice(e.origin.length)),Q?ye(b,A.href,m):_e(b,m)},setHeaders:()=>{},depends:d,parent(){return s&&(c.parent=!0),n()},untrack(l){s=!1;try{return l()}finally{s=!0}}};i=await f.universal.load.call(null,_)??null}return{node:f,loader:t,server:o,universal:(h=f.universal)!=null&&h.load?{type:"data",data:i,uses:c}:null,data:i??(o==null?void 0:o.data)??null,slash:((g=f.universal)==null?void 0:g.trailingSlash)??(o==null?void 0:o.slash)}}function Nt(t,n,e,a,r,o){if(vt)return!0;if(!r)return!1;if(r.parent&&t||r.route&&n||r.url&&e)return!0;for(const i of r.search_params)if(a.has(i))return!0;for(const i of r.params)if(o[i]!==y.params[i])return!0;for(const i of r.dependencies)if(Bt.some(s=>s(new URL(i))))return!0;return!1}function kt(t,n){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?n??null:null}function He(t,n){if(!t)return new Set(n.searchParams.keys());const e=new Set([...t.searchParams.keys(),...n.searchParams.keys()]);for(const a of e){const r=t.searchParams.getAll(a),o=n.searchParams.getAll(a);r.every(i=>o.includes(i))&&o.every(i=>r.includes(i))&&e.delete(a)}return e}function Ot({error:t,url:n,route:e,params:a}){return{type:"loaded",state:{error:t,url:n,route:e,params:a,branch:[]},props:{page:I,constructors:[]}}}async function Zt({id:t,invalidating:n,url:e,params:a,route:r,preload:o}){if((R==null?void 0:R.id)===t)return M.delete(R.token),R.promise;const{errors:i,layouts:s,leaf:c}=r,f=[...s,c];i.forEach(p=>p==null?void 0:p().catch(()=>{})),f.forEach(p=>p==null?void 0:p[1]().catch(()=>{}));let u=null;const h=y.url?t!==y.url.pathname+y.url.search:!1,g=y.route?r.id!==y.route.id:!1,d=He(y.url,e);let _=!1;const l=f.map((p,v)=>{var T;const E=y.branch[v],k=!!(p!=null&&p[0])&&((E==null?void 0:E.loader)!==p[1]||Nt(_,g,h,d,(T=E.server)==null?void 0:T.uses,a));return k&&(_=!0),k});if(l.some(Boolean)){try{u=await ne(e,l)}catch(p){const v=await $(p,{url:e,params:a,route:{id:t}});return M.has(o)?Ot({error:v,url:e,params:a,route:r}):ot({status:z(p),error:v,url:e,route:r})}if(u.type==="redirect")return u}const m=u==null?void 0:u.nodes;let b=!1;const A=f.map(async(p,v)=>{var st;if(!p)return;const E=y.branch[v],k=m==null?void 0:m[v];if((!k||k.type==="skip")&&p[1]===(E==null?void 0:E.loader)&&!Nt(b,g,h,d,(st=E.universal)==null?void 0:st.uses,a))return E;if(b=!0,(k==null?void 0:k.type)==="error")throw k;return Et({loader:p[1],url:e,params:a,route:r,parent:async()=>{var Rt;const At={};for(let it=0;it{});const w=[];for(let p=0;pPromise.resolve({}),server_data_node:kt(o)}),c={node:await X(),loader:X,universal:null,server:null,data:null};return await et({url:e,params:r,branch:[s,c],status:t,error:n,route:null})}function St(t,n){if(!t||nt(t,P))return;let e;try{e=V.hooks.reroute({url:new URL(t)})??t.pathname}catch{return}const a=Qt(e);for(const r of rt){const o=r.exec(a);if(o)return{id:t.pathname+t.search,invalidating:n,route:r,params:le(o),url:t}}}function Qt(t){return ce(t.slice(P.length)||"/")}function te({url:t,type:n,intent:e,delta:a}){let r=!1;const o=re(y,e,t,n);a!==void 0&&(o.navigation.delta=a);const i={...o.navigation,cancel:()=>{r=!0,o.reject(new Error("navigation cancelled"))}};return B||Kt.forEach(s=>s(i)),r?null:o}async function Y({type:t,url:n,popped:e,keepfocus:a,noscroll:r,replace_state:o,state:i={},redirect_count:s=0,nav_token:c={},accept:f=Ut,block:u=Ut}){const h=St(n,!1),g=te({url:n,type:t,delta:e==null?void 0:e.delta,intent:h});if(!g){u();return}const d=S,_=L;f(),B=!0,Q&&x.navigating.set(g.navigation),tt=c;let l=h&&await Zt(h);if(!l){if(nt(n,P))return await C(n);l=await ee(n,{id:null},await $(new _t(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404)}if(n=(h==null?void 0:h.url)||n,tt!==c)return g.reject(new Error("navigation aborted")),!1;if(l.type==="redirect")if(s>=20)l=await ot({status:500,error:await $(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}});else return zt(new URL(l.location,n).href,{},s+1,c),!1;else l.props.page.status>=400&&await x.updated.check()&&await C(n);if(Me(),yt(d),Jt(_),l.props.page.url.pathname!==n.pathname&&(n.pathname=l.props.page.url.pathname),i=e?e.state:i,!e){const w=o?0:1,p={[D]:S+=w,[q]:L+=w,[Vt]:i};(o?history.replaceState:history.pushState).call(history,p,"",n),o||Fe(S,L)}if(R=null,l.props.page.state=i,Q){y=l.state,l.props.page&&(l.props.page.url=n);const w=(await Promise.all(Ge.map(p=>p(g.navigation)))).filter(p=>typeof p=="function");if(w.length>0){let p=function(){j=j.filter(v=>!w.includes(v))};w.push(p),j.push(...w)}bt.$set(l.props),Yt=!0}else Xt(l,ht);const{activeElement:m}=document;await oe();const b=e?e.scroll:r?mt():null;if(xt){const w=n.hash&&document.getElementById(decodeURIComponent(n.hash.slice(1)));b?scrollTo(b.x,b.y):w?w.scrollIntoView():scrollTo(0,0)}const A=document.activeElement!==m&&document.activeElement!==document.body;!a&&!A&&ze(),xt=!0,l.props.page&&(I=l.props.page),B=!1,t==="popstate"&&Wt(L),g.fulfil(void 0),j.forEach(w=>w(g.navigation)),x.navigating.set(null)}async function ee(t,n,e,a){return t.origin===K&&t.pathname===location.pathname&&!wt?await ot({status:a,error:e,url:t,route:n}):await C(t)}function Ke(){let t;U.addEventListener("mousemove",o=>{const i=o.target;clearTimeout(t),t=setTimeout(()=>{a(i,2)},20)});function n(o){a(o.composedPath()[0],1)}U.addEventListener("mousedown",n),U.addEventListener("touchstart",n,{passive:!0});const e=new IntersectionObserver(o=>{for(const i of o)i.isIntersecting&&(ft(i.target.href),e.unobserve(i.target))},{threshold:0});function a(o,i){const s=Mt(o,U);if(!s)return;const{url:c,external:f,download:u}=ut(s,P);if(f||u)return;const h=W(s);if(!h.reload)if(i<=h.preload_data){const g=St(c,!1);g&&qe(g)}else i<=h.preload_code&&ft(c.pathname)}function r(){e.disconnect();for(const o of U.querySelectorAll("a")){const{url:i,external:s,download:c}=ut(o,P);if(s||c)continue;const f=W(o);f.reload||(f.preload_code===J.viewport&&e.observe(o),f.preload_code===J.eager&&ft(i.pathname))}}j.push(r),r()}function $(t,n){if(t instanceof at)return t.body;const e=z(t),a=Ve(t);return V.hooks.handleError({error:t,event:n,status:e,message:a})??{message:a}}function Ye(t,n={}){return t=Ft(t),t.origin!==K?Promise.reject(new Error("goto: invalid URL")):zt(t,n,0)}function Je(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let a=!1;if(Tt(),!B){const r=re(y,void 0,null,"leave"),o={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Kt.forEach(i=>i(o))}a?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Tt()}),(n=navigator.connection)!=null&&n.saveData||Ke(),U.addEventListener("click",e=>{var g;if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const a=Mt(e.composedPath()[0],U);if(!a)return;const{url:r,external:o,target:i,download:s}=ut(a,P);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=W(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;if(o||c.reload){te({url:r,type:"link"})?B=!0:e.preventDefault();return}const[u,h]=r.href.split("#");if(h!==void 0&&u===ct(location)){const[,d]=y.url.href.split("#");if(d===h){e.preventDefault(),h===""||h==="top"&&a.ownerDocument.getElementById("top")===null?window.scrollTo({top:0}):(g=a.ownerDocument.getElementById(h))==null||g.scrollIntoView();return}if(F=!0,yt(S),t(r),!c.replace_state)return;F=!1}e.preventDefault(),Y({type:"link",url:r,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??r.href===location.href})}),U.addEventListener("submit",e=>{if(e.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(e.target),r=e.submitter;if(((r==null?void 0:r.formMethod)||a.method)!=="get")return;const i=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(nt(i,P))return;const s=e.target,c=W(s);if(c.reload)return;e.preventDefault(),e.stopPropagation();const f=new FormData(s),u=r==null?void 0:r.getAttribute("name");u&&f.append(u,(r==null?void 0:r.getAttribute("value"))??""),i.search=new URLSearchParams(f).toString(),Y({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async e=>{var a;if((a=e.state)!=null&&a[D]){const r=e.state[D];if(tt={},r===S)return;const o=N[r],i=e.state[Vt]??{},s=new URL(e.state[Re]??location.href),c=e.state[q],f=ct(location)===ct(y.url);if(c===L&&(Yt||f)){t(s),N[S]=mt(),o&&scrollTo(o.x,o.y),i!==I.state&&(I={...I,state:i},bt.$set({page:I})),S=r;return}const h=r-S;await Y({type:"popstate",url:s,popped:{state:i,scroll:o,delta:h},accept:()=>{S=r,L=c},block:()=>{history.go(-h)},nav_token:tt})}else if(!F){const r=new URL(location.href);t(r)}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[D]:++S,[q]:L},"",location.href))});for(const e of document.querySelectorAll("link"))e.rel==="icon"&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&x.navigating.set(null)});function t(e){y.url=e,x.page.set({...I,url:e}),x.page.notify()}}async function We(t,{status:n=200,error:e,node_ids:a,params:r,route:o,data:i,form:s}){wt=!0;const c=new URL(location.href);({params:r={},route:o={id:null}}=St(c,!1)||{});let f;try{const u=a.map(async(d,_)=>{const l=i[_];return l!=null&&l.uses&&(l.uses=ae(l.uses)),Et({loader:V.nodes[d],url:c,params:r,route:o,parent:async()=>{const m={};for(let b=0;b<_;b+=1)Object.assign(m,(await u[b]).data);return m},server_data_node:kt(l)})}),h=await Promise.all(u),g=rt.find(({id:d})=>d===o.id);if(g){const d=g.layouts;for(let _=0;_o?"1":"0").join(""));const a=await jt(e.href);if(!a.ok){let o;throw(r=a.headers.get("content-type"))!=null&&r.includes("application/json")?o=await a.json():a.status===404?o="Not Found":a.status===500&&(o="Internal Error"),new at(a.status,o)}return new Promise(async o=>{var h;const i=new Map,s=a.body.getReader(),c=new TextDecoder;function f(g){return Oe(g,{Promise:d=>new Promise((_,l)=>{i.set(d,{fulfil:_,reject:l})})})}let u="";for(;;){const{done:g,value:d}=await s.read();if(g&&!u)break;for(u+=!d&&u?` `:c.decode(d,{stream:!0});;){const _=u.indexOf(` `);if(_===-1)break;const l=JSON.parse(u.slice(0,_));if(u=u.slice(_+1),l.type==="redirect")return o(l);if(l.type==="data")(h=l.nodes)==null||h.forEach(m=>{(m==null?void 0:m.type)==="data"&&(m.uses=ae(m.uses),m.data=f(m.data))}),o(l);else if(l.type==="chunk"){const{id:m,data:b,error:A}=l,w=i.get(m);i.delete(m),A?w.reject(f(A)):w.fulfil(f(b))}}}})}function ae(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}function ze(){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=document.body,e=n.getAttribute("tabindex");n.tabIndex=-1,n.focus({preventScroll:!0,focusVisible:!1}),e!==null?n.setAttribute("tabindex",e):n.removeAttribute("tabindex");const a=getSelection();if(a&&a.type!=="None"){const r=[];for(let o=0;o{if(a.rangeCount===r.length){for(let o=0;o{r=u,o=h});return i.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:e&&{params:(n==null?void 0:n.params)??null,route:{id:((f=n==null?void 0:n.route)==null?void 0:f.id)??null},url:e},willUnload:!n,type:a,complete:i},fulfil:r,reject:o}}export{tn as a,x as s}; diff --git a/docs/_app/immutable/chunks/paths.CjQJy53E.js b/docs/_app/immutable/chunks/paths.CjQJy53E.js new file mode 100644 index 0000000..de2b5da --- /dev/null +++ b/docs/_app/immutable/chunks/paths.CjQJy53E.js @@ -0,0 +1 @@ +var s;const a=((s=globalThis.__sveltekit_14stb2q)==null?void 0:s.base)??"";var t;const e=((t=globalThis.__sveltekit_14stb2q)==null?void 0:t.assets)??a;export{e as a,a as b}; diff --git a/docs/_app/immutable/chunks/paths.xXzRRGsB.js b/docs/_app/immutable/chunks/paths.xXzRRGsB.js deleted file mode 100644 index 85da667..0000000 --- a/docs/_app/immutable/chunks/paths.xXzRRGsB.js +++ /dev/null @@ -1 +0,0 @@ -var s;const e=((s=globalThis.__sveltekit_15k4ph3)==null?void 0:s.base)??"";var a;const t=((a=globalThis.__sveltekit_15k4ph3)==null?void 0:a.assets)??e;export{t as a,e as b}; diff --git a/docs/_app/immutable/entry/app.DQWRwC3Q.js b/docs/_app/immutable/entry/app.BLx7NgAJ.js similarity index 93% rename from docs/_app/immutable/entry/app.DQWRwC3Q.js rename to docs/_app/immutable/entry/app.BLx7NgAJ.js index 99dc739..067c418 100644 --- a/docs/_app/immutable/entry/app.DQWRwC3Q.js +++ b/docs/_app/immutable/entry/app.BLx7NgAJ.js @@ -1,7 +1,7 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["../nodes/0.CUNONAMn.js","../chunks/scheduler.D0S_xIN3.js","../chunks/index.DPQoaniF.js","../chunks/misc.xcXs522S.js","../chunks/index.BP0khYr0.js","../assets/0.B5Vgf4IC.css","../nodes/1.CmVSOvGI.js","../chunks/entry.BPff3pyu.js","../chunks/paths.xXzRRGsB.js","../nodes/2.gPgV5pLt.js","../chunks/preload-helper.BQ24v_F8.js","../assets/2.F3iUeXc8.css"] + __vite__mapDeps.viteFileDeps = ["../nodes/0.CUNONAMn.js","../chunks/scheduler.D0S_xIN3.js","../chunks/index.DPQoaniF.js","../chunks/misc.xcXs522S.js","../chunks/index.BP0khYr0.js","../assets/0.B5Vgf4IC.css","../nodes/1.CTtl6EgG.js","../chunks/entry.BmMTfnWU.js","../chunks/paths.CjQJy53E.js","../nodes/2.Cv2fZ2pS.js","../chunks/preload-helper.BQ24v_F8.js","../assets/2.lKxKqI_2.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -import{_ as I}from"../chunks/preload-helper.BQ24v_F8.js";import{s as S,j,k as p,l as C,i as w,d,m as M,o as U,e as z,c as B,a as F,p as P,q as m,t as G,b as H,g as J,r as R,u as k,v as K}from"../chunks/scheduler.D0S_xIN3.js";import{S as Q,i as W,t as h,c as N,a as g,g as D,b as v,d as V,m as E,e as y}from"../chunks/index.DPQoaniF.js";const ie={};function X(o){let e,n,i;var s=o[1][0];function _(t,r){return{props:{data:t[3],form:t[2]}}}return s&&(e=k(s,_(o)),o[12](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&V(e.$$.fragment,t),n=p()},m(t,r){e&&E(e,t,r),w(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][0])){if(e){D();const a=e;h(a.$$.fragment,1,0,()=>{y(a,1)}),N()}s?(e=k(s,_(t)),t[12](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const a={};r&8&&(a.data=t[3]),r&4&&(a.form=t[2]),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[12](null),e&&y(e,t)}}}function Y(o){let e,n,i;var s=o[1][0];function _(t,r){return{props:{data:t[3],$$slots:{default:[Z]},$$scope:{ctx:t}}}}return s&&(e=k(s,_(o)),o[11](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&V(e.$$.fragment,t),n=p()},m(t,r){e&&E(e,t,r),w(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][0])){if(e){D();const a=e;h(a.$$.fragment,1,0,()=>{y(a,1)}),N()}s?(e=k(s,_(t)),t[11](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const a={};r&8&&(a.data=t[3]),r&8215&&(a.$$scope={dirty:r,ctx:t}),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[11](null),e&&y(e,t)}}}function Z(o){let e,n,i;var s=o[1][1];function _(t,r){return{props:{data:t[4],form:t[2]}}}return s&&(e=k(s,_(o)),o[10](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&V(e.$$.fragment,t),n=p()},m(t,r){e&&E(e,t,r),w(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][1])){if(e){D();const a=e;h(a.$$.fragment,1,0,()=>{y(a,1)}),N()}s?(e=k(s,_(t)),t[10](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const a={};r&16&&(a.data=t[4]),r&4&&(a.form=t[2]),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[10](null),e&&y(e,t)}}}function A(o){let e,n=o[6]&&L(o);return{c(){e=z("div"),n&&n.c(),this.h()},l(i){e=B(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var s=F(e);n&&n.l(s),s.forEach(d),this.h()},h(){P(e,"id","svelte-announcer"),P(e,"aria-live","assertive"),P(e,"aria-atomic","true"),m(e,"position","absolute"),m(e,"left","0"),m(e,"top","0"),m(e,"clip","rect(0 0 0 0)"),m(e,"clip-path","inset(50%)"),m(e,"overflow","hidden"),m(e,"white-space","nowrap"),m(e,"width","1px"),m(e,"height","1px")},m(i,s){w(i,e,s),n&&n.m(e,null)},p(i,s){i[6]?n?n.p(i,s):(n=L(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&d(e),n&&n.d()}}}function L(o){let e;return{c(){e=G(o[7])},l(n){e=H(n,o[7])},m(n,i){w(n,e,i)},p(n,i){i&128&&J(e,n[7])},d(n){n&&d(e)}}}function $(o){let e,n,i,s,_;const t=[Y,X],r=[];function a(f,u){return f[1][1]?0:1}e=a(o),n=r[e]=t[e](o);let c=o[5]&&A(o);return{c(){n.c(),i=j(),c&&c.c(),s=p()},l(f){n.l(f),i=C(f),c&&c.l(f),s=p()},m(f,u){r[e].m(f,u),w(f,i,u),c&&c.m(f,u),w(f,s,u),_=!0},p(f,[u]){let b=e;e=a(f),e===b?r[e].p(f,u):(D(),h(r[b],1,1,()=>{r[b]=null}),N(),n=r[e],n?n.p(f,u):(n=r[e]=t[e](f),n.c()),g(n,1),n.m(i.parentNode,i)),f[5]?c?c.p(f,u):(c=A(f),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i(f){_||(g(n),_=!0)},o(f){h(n),_=!1},d(f){f&&(d(i),d(s)),r[e].d(f),c&&c.d(f)}}}function x(o,e,n){let{stores:i}=e,{page:s}=e,{constructors:_}=e,{components:t=[]}=e,{form:r}=e,{data_0:a=null}=e,{data_1:c=null}=e;M(i.page.notify);let f=!1,u=!1,b=null;U(()=>{const l=i.page.subscribe(()=>{f&&(n(6,u=!0),K().then(()=>{n(7,b=document.title||"untitled page")}))});return n(5,f=!0),l});function O(l){R[l?"unshift":"push"](()=>{t[1]=l,n(0,t)})}function T(l){R[l?"unshift":"push"](()=>{t[0]=l,n(0,t)})}function q(l){R[l?"unshift":"push"](()=>{t[0]=l,n(0,t)})}return o.$$set=l=>{"stores"in l&&n(8,i=l.stores),"page"in l&&n(9,s=l.page),"constructors"in l&&n(1,_=l.constructors),"components"in l&&n(0,t=l.components),"form"in l&&n(2,r=l.form),"data_0"in l&&n(3,a=l.data_0),"data_1"in l&&n(4,c=l.data_1)},o.$$.update=()=>{o.$$.dirty&768&&i.page.set(s)},[t,_,r,a,c,f,u,b,i,s,O,T,q]}class se extends Q{constructor(e){super(),W(this,e,x,$,S,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const re=[()=>I(()=>import("../nodes/0.CUNONAMn.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>I(()=>import("../nodes/1.CmVSOvGI.js"),__vite__mapDeps([6,1,2,7,4,8]),import.meta.url),()=>I(()=>import("../nodes/2.gPgV5pLt.js"),__vite__mapDeps([9,1,2,3,4,8,10,11]),import.meta.url)],oe=[],ae={"/":[-3]},fe={handleError:({error:o})=>{console.error(o)},reroute:()=>{}};export{ae as dictionary,fe as hooks,ie as matchers,re as nodes,se as root,oe as server_loads}; +import{_ as I}from"../chunks/preload-helper.BQ24v_F8.js";import{s as S,j,k as p,l as C,i as w,d,m as M,o as U,e as z,c as B,a as F,p as P,q as m,t as G,b as H,g as J,r as R,u as k,v as K}from"../chunks/scheduler.D0S_xIN3.js";import{S as Q,i as W,t as h,c as N,a as g,g as D,b as v,d as V,m as E,e as y}from"../chunks/index.DPQoaniF.js";const ie={};function X(o){let e,n,i;var s=o[1][0];function _(t,r){return{props:{data:t[3],form:t[2]}}}return s&&(e=k(s,_(o)),o[12](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&V(e.$$.fragment,t),n=p()},m(t,r){e&&E(e,t,r),w(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][0])){if(e){D();const a=e;h(a.$$.fragment,1,0,()=>{y(a,1)}),N()}s?(e=k(s,_(t)),t[12](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const a={};r&8&&(a.data=t[3]),r&4&&(a.form=t[2]),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[12](null),e&&y(e,t)}}}function Y(o){let e,n,i;var s=o[1][0];function _(t,r){return{props:{data:t[3],$$slots:{default:[Z]},$$scope:{ctx:t}}}}return s&&(e=k(s,_(o)),o[11](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&V(e.$$.fragment,t),n=p()},m(t,r){e&&E(e,t,r),w(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][0])){if(e){D();const a=e;h(a.$$.fragment,1,0,()=>{y(a,1)}),N()}s?(e=k(s,_(t)),t[11](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const a={};r&8&&(a.data=t[3]),r&8215&&(a.$$scope={dirty:r,ctx:t}),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[11](null),e&&y(e,t)}}}function Z(o){let e,n,i;var s=o[1][1];function _(t,r){return{props:{data:t[4],form:t[2]}}}return s&&(e=k(s,_(o)),o[10](e)),{c(){e&&v(e.$$.fragment),n=p()},l(t){e&&V(e.$$.fragment,t),n=p()},m(t,r){e&&E(e,t,r),w(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][1])){if(e){D();const a=e;h(a.$$.fragment,1,0,()=>{y(a,1)}),N()}s?(e=k(s,_(t)),t[10](e),v(e.$$.fragment),g(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const a={};r&16&&(a.data=t[4]),r&4&&(a.form=t[2]),e.$set(a)}},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){t&&d(n),o[10](null),e&&y(e,t)}}}function A(o){let e,n=o[6]&&L(o);return{c(){e=z("div"),n&&n.c(),this.h()},l(i){e=B(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var s=F(e);n&&n.l(s),s.forEach(d),this.h()},h(){P(e,"id","svelte-announcer"),P(e,"aria-live","assertive"),P(e,"aria-atomic","true"),m(e,"position","absolute"),m(e,"left","0"),m(e,"top","0"),m(e,"clip","rect(0 0 0 0)"),m(e,"clip-path","inset(50%)"),m(e,"overflow","hidden"),m(e,"white-space","nowrap"),m(e,"width","1px"),m(e,"height","1px")},m(i,s){w(i,e,s),n&&n.m(e,null)},p(i,s){i[6]?n?n.p(i,s):(n=L(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&d(e),n&&n.d()}}}function L(o){let e;return{c(){e=G(o[7])},l(n){e=H(n,o[7])},m(n,i){w(n,e,i)},p(n,i){i&128&&J(e,n[7])},d(n){n&&d(e)}}}function $(o){let e,n,i,s,_;const t=[Y,X],r=[];function a(f,u){return f[1][1]?0:1}e=a(o),n=r[e]=t[e](o);let c=o[5]&&A(o);return{c(){n.c(),i=j(),c&&c.c(),s=p()},l(f){n.l(f),i=C(f),c&&c.l(f),s=p()},m(f,u){r[e].m(f,u),w(f,i,u),c&&c.m(f,u),w(f,s,u),_=!0},p(f,[u]){let b=e;e=a(f),e===b?r[e].p(f,u):(D(),h(r[b],1,1,()=>{r[b]=null}),N(),n=r[e],n?n.p(f,u):(n=r[e]=t[e](f),n.c()),g(n,1),n.m(i.parentNode,i)),f[5]?c?c.p(f,u):(c=A(f),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i(f){_||(g(n),_=!0)},o(f){h(n),_=!1},d(f){f&&(d(i),d(s)),r[e].d(f),c&&c.d(f)}}}function x(o,e,n){let{stores:i}=e,{page:s}=e,{constructors:_}=e,{components:t=[]}=e,{form:r}=e,{data_0:a=null}=e,{data_1:c=null}=e;M(i.page.notify);let f=!1,u=!1,b=null;U(()=>{const l=i.page.subscribe(()=>{f&&(n(6,u=!0),K().then(()=>{n(7,b=document.title||"untitled page")}))});return n(5,f=!0),l});function O(l){R[l?"unshift":"push"](()=>{t[1]=l,n(0,t)})}function T(l){R[l?"unshift":"push"](()=>{t[0]=l,n(0,t)})}function q(l){R[l?"unshift":"push"](()=>{t[0]=l,n(0,t)})}return o.$$set=l=>{"stores"in l&&n(8,i=l.stores),"page"in l&&n(9,s=l.page),"constructors"in l&&n(1,_=l.constructors),"components"in l&&n(0,t=l.components),"form"in l&&n(2,r=l.form),"data_0"in l&&n(3,a=l.data_0),"data_1"in l&&n(4,c=l.data_1)},o.$$.update=()=>{o.$$.dirty&768&&i.page.set(s)},[t,_,r,a,c,f,u,b,i,s,O,T,q]}class se extends Q{constructor(e){super(),W(this,e,x,$,S,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const re=[()=>I(()=>import("../nodes/0.CUNONAMn.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>I(()=>import("../nodes/1.CTtl6EgG.js"),__vite__mapDeps([6,1,2,7,4,8]),import.meta.url),()=>I(()=>import("../nodes/2.Cv2fZ2pS.js"),__vite__mapDeps([9,1,2,3,4,8,10,11]),import.meta.url)],oe=[],ae={"/":[-3]},fe={handleError:({error:o})=>{console.error(o)},reroute:()=>{}};export{ae as dictionary,fe as hooks,ie as matchers,re as nodes,se as root,oe as server_loads}; diff --git a/docs/_app/immutable/entry/start.CtlA_Esb.js b/docs/_app/immutable/entry/start.CtlA_Esb.js new file mode 100644 index 0000000..7c3ff88 --- /dev/null +++ b/docs/_app/immutable/entry/start.CtlA_Esb.js @@ -0,0 +1 @@ +import{a as t}from"../chunks/entry.BmMTfnWU.js";export{t as start}; diff --git a/docs/_app/immutable/entry/start.DaSf3f0e.js b/docs/_app/immutable/entry/start.DaSf3f0e.js deleted file mode 100644 index ef471b6..0000000 --- a/docs/_app/immutable/entry/start.DaSf3f0e.js +++ /dev/null @@ -1 +0,0 @@ -import{a as t}from"../chunks/entry.BPff3pyu.js";export{t as start}; diff --git a/docs/_app/immutable/nodes/1.CmVSOvGI.js b/docs/_app/immutable/nodes/1.CTtl6EgG.js similarity index 92% rename from docs/_app/immutable/nodes/1.CmVSOvGI.js rename to docs/_app/immutable/nodes/1.CTtl6EgG.js index d46642e..a1ceae6 100644 --- a/docs/_app/immutable/nodes/1.CmVSOvGI.js +++ b/docs/_app/immutable/nodes/1.CTtl6EgG.js @@ -1 +1 @@ -import{s as d,e as f,t as u,c as _,a as h,b as p,d as m,i as v,f as l,g as b,n as g,h as $}from"../chunks/scheduler.D0S_xIN3.js";import{S as E,i as S}from"../chunks/index.DPQoaniF.js";import{s as x}from"../chunks/entry.BPff3pyu.js";const q=()=>{const t=x;return{page:{subscribe:t.page.subscribe},navigating:{subscribe:t.navigating.subscribe},updated:t.updated}},y={subscribe(t){return q().page.subscribe(t)}};function C(t){let e,r=t[0].status+"",n,o,i=t[0].error.message+"",c;return{c(){e=f("h1"),n=u(r),o=u(": "),c=u(i)},l(a){e=_(a,"H1",{});var s=h(e);n=p(s,r),o=p(s,": "),c=p(s,i),s.forEach(m)},m(a,s){v(a,e,s),l(e,n),l(e,o),l(e,c)},p(a,[s]){s&1&&r!==(r=a[0].status+"")&&b(n,r),s&1&&i!==(i=a[0].error.message+"")&&b(c,i)},i:g,o:g,d(a){a&&m(e)}}}function H(t,e,r){let n;return $(t,y,o=>r(0,n=o)),[n]}let z=class extends E{constructor(e){super(),S(this,e,H,C,d,{})}};export{z as component}; +import{s as d,e as f,t as u,c as _,a as h,b as p,d as m,i as v,f as l,g as b,n as g,h as $}from"../chunks/scheduler.D0S_xIN3.js";import{S as E,i as S}from"../chunks/index.DPQoaniF.js";import{s as x}from"../chunks/entry.BmMTfnWU.js";const q=()=>{const t=x;return{page:{subscribe:t.page.subscribe},navigating:{subscribe:t.navigating.subscribe},updated:t.updated}},y={subscribe(t){return q().page.subscribe(t)}};function C(t){let e,r=t[0].status+"",n,o,i=t[0].error.message+"",c;return{c(){e=f("h1"),n=u(r),o=u(": "),c=u(i)},l(a){e=_(a,"H1",{});var s=h(e);n=p(s,r),o=p(s,": "),c=p(s,i),s.forEach(m)},m(a,s){v(a,e,s),l(e,n),l(e,o),l(e,c)},p(a,[s]){s&1&&r!==(r=a[0].status+"")&&b(n,r),s&1&&i!==(i=a[0].error.message+"")&&b(c,i)},i:g,o:g,d(a){a&&m(e)}}}function H(t,e,r){let n;return $(t,y,o=>r(0,n=o)),[n]}let z=class extends E{constructor(e){super(),S(this,e,H,C,d,{})}};export{z as component}; diff --git a/docs/_app/immutable/nodes/2.Cv2fZ2pS.js b/docs/_app/immutable/nodes/2.Cv2fZ2pS.js new file mode 100644 index 0000000..fbf781c --- /dev/null +++ b/docs/_app/immutable/nodes/2.Cv2fZ2pS.js @@ -0,0 +1,22 @@ +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = ["../chunks/browser.DL7QZ5YJ.js","../chunks/misc.xcXs522S.js","../chunks/index.DPQoaniF.js","../chunks/scheduler.D0S_xIN3.js","../chunks/index.BP0khYr0.js"] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} +import{s as ae,e as S,k as Q,Z as xr,c as E,d as p,p as _,f as w,n as le,S as Ie,i as P,_ as Yt,D as ps,U as lt,a as j,B as ct,$ as vs,V as ut,W as ht,X as dt,o as kt,a0 as Dt,r as it,a1 as oe,q as W,a2 as ys,A as St,a3 as bs,h as ie,a4 as Se,a5 as We,a6 as Je,a7 as wt,a8 as Xt,a9 as Ke,t as V,b as x,aa as ke,g as fe,w as Yr,ab as ws,j as G,l as H,R as Xr,Y as we,ac as Qt,ad as Qr,P as ks,Q as Ss}from"../chunks/scheduler.D0S_xIN3.js";import{S as ce,i as ue,a as A,t as R,g as me,c as pe,b as te,d as re,m as se,e as ne,f as Zr,h as Es,j as es,k as Zt}from"../chunks/index.DPQoaniF.js";import{e as ee,c as rt,i as yt,t as bt,a as ts,d as Ts,u as Mt,l as Bt,s as Le,o as As}from"../chunks/misc.xcXs522S.js";import{b as Oe}from"../chunks/paths.CjQJy53E.js";import{w as Ze}from"../chunks/index.BP0khYr0.js";import{_ as Ve}from"../chunks/preload-helper.BQ24v_F8.js";function Et(n,e){const t={},r={},s={$$scope:1};let i=n.length;for(;i--;){const o=n[i],a=e[i];if(a){for(const l in o)l in a||(r[l]=1);for(const l in a)s[l]||(t[l]=a[l],s[l]=1);n[i]=a}else for(const l in o)s[l]=1}for(const o in r)o in t||(t[o]=void 0);return t}function rs(n){return typeof n=="object"&&n!==null?n:{}}function er(n,e,t){const r=n.slice();return r[5]=e[t],r}function tr(n){let e,t;return{c(){e=S("link"),this.h()},l(r){e=E(r,"LINK",{rel:!0,href:!0,as:!0,type:!0,crossorigin:!0}),this.h()},h(){_(e,"rel","preload"),_(e,"href",t=n[5]),_(e,"as","font"),_(e,"type","font/woff2"),_(e,"crossorigin","")},m(r,s){P(r,e,s)},p(r,s){s&16&&t!==(t=r[5])&&_(e,"href",t)},d(r){r&&p(e)}}}function Os(n){let e,t,r,s,i,o,a,l,c,u,h,d,f,v,g,m,b,k,O,T,y,D,N,F,z,J;document.title=e=n[0];let K=ee(n[4]),Y=[];for(let L=0;L{"title"in l&&t(0,r=l.title),"description"in l&&t(1,s=l.description),"url"in l&&t(2,i=l.url),"keywords"in l&&t(3,o=l.keywords),"preloadFont"in l&&t(4,a=l.preloadFont)},[r,s,i,o,a]}class js extends ce{constructor(e){super(),ue(this,e,Is,Os,ae,{title:0,description:1,url:2,keywords:3,preloadFont:4})}}function ss(n){const e=n-1;return e*e*e+1}function Ps(n,{delay:e=0,duration:t=400,easing:r=ps}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:r,css:i=>`opacity: ${i*s}`}}function rr(n,{delay:e=0,duration:t=400,easing:r=ss,x:s=0,y:i=0,opacity:o=0}={}){const a=getComputedStyle(n),l=+a.opacity,c=a.transform==="none"?"":a.transform,u=l*(1-o),[h,d]=Yt(s),[f,v]=Yt(i);return{delay:e,duration:t,easing:r,css:(g,m)=>` + transform: ${c} translate(${(1-g)*h}${d}, ${(1-g)*f}${v}); + opacity: ${l-u*m}`}}function sr(n,{delay:e=0,duration:t=400,easing:r=ss,axis:s="y"}={}){const i=getComputedStyle(n),o=+i.opacity,a=s==="y"?"height":"width",l=parseFloat(i[a]),c=s==="y"?["top","bottom"]:["left","right"],u=c.map(b=>`${b[0].toUpperCase()}${b.slice(1)}`),h=parseFloat(i[`padding${u[0]}`]),d=parseFloat(i[`padding${u[1]}`]),f=parseFloat(i[`margin${u[0]}`]),v=parseFloat(i[`margin${u[1]}`]),g=parseFloat(i[`border${u[0]}Width`]),m=parseFloat(i[`border${u[1]}Width`]);return{delay:e,duration:t,easing:r,css:b=>`overflow: hidden;opacity: ${Math.min(b*20,1)*o};${a}: ${b*l}px;padding-${c[0]}: ${b*h}px;padding-${c[1]}: ${b*d}px;margin-${c[0]}: ${b*f}px;margin-${c[1]}: ${b*v}px;border-${c[0]}-width: ${b*g}px;border-${c[1]}-width: ${b*m}px;`}}const Rs={title:"Defining Generations in K-pop",description:"We want fans to have the opportunity to vote and determine the answers.",url:"https://pudding.cool/2024/09/kpop-survey/"},Cs={index:[{type:"section",value:[{type:"text",value:"This is an experiment to define K-pop generations."}]},{type:"section",value:[{type:"text",value:"We want fans to have the opportunity to vote and determine the answers."}]},{type:"voting",value:{}}]},Ls={title:"In your opinion, which of the following factors are most relevant in defining a generation?",text:"Select up to 3.",factors:["Debut year","Peak active periods","Association with other groups","Length of contracts","Member age ranges","Member racial diversity","Member positions (or lack thereof)","Fashion trends","Music genre trends","Promotion models","Fan interaction models","Influence on industry","Target audience","Makeup of fanbase","Other"]},Ds={title:"Thank you for submitting the survey",text:"We're looking for K-pop fans to interview for part 2. Drop your email if text: you're interested in keeping in touch.",methodology:"The Kpop groups present in this survey are big 4 company debuts and smaller company groups that were nominated for MAMA Artist of the Year since 2018. To make the survey more digestible, we further narrowed the list by removing groups who debuted at similar times to another group in the same company (e.g. WINNER and iKON)."},ot={meta:Rs,body:Cs,survey:Ls,results:Ds};function Ns(n){let e,t,r,s,i;const o=n[26].default,a=lt(o,n,n[25],null);return{c(){e=S("section"),t=S("div"),a&&a.c(),this.h()},l(l){e=E(l,"SECTION",{"aria-label":!0,class:!0});var c=j(e);t=E(c,"DIV",{class:!0,style:!0});var u=j(t);a&&a.l(u),u.forEach(p),c.forEach(p),this.h()},h(){_(t,"class","slides svelte-1ceqw5z"),_(t,"style",n[5]),_(e,"aria-label","carousel"),_(e,"class",r="slider "+n[0]+" svelte-1ceqw5z"),ct(()=>n[29].call(e))},m(l,c){P(l,e,c),w(e,t),a&&a.m(t,null),n[27](t),n[28](e),s=vs(e,n[29].bind(e)),i=!0},p(l,c){a&&a.p&&(!i||c[0]&33554432)&&ut(a,o,l,l[25],i?dt(o,l[25],c,null):ht(l[25]),null),(!i||c[0]&32)&&_(t,"style",l[5]),(!i||c[0]&1&&r!==(r="slider "+l[0]+" svelte-1ceqw5z"))&&_(e,"class",r)},i(l){i||(A(a,l),i=!0)},o(l){R(a,l),i=!1},d(l){l&&p(e),a&&a.d(l),n[27](null),n[28](null),s()}}}function Us(n,e,t){let r,s,i,o,a,l,c,u,h,d,f,{$$slots:v={},$$scope:g}=e,{direction:m="horizontal"}=e,{duration:b="500ms"}=e,{timing:k="ease"}=e,{count:O=0}=e,{current:T=0}=e;const y=()=>$(1),D=()=>$(-1),N=q=>$(q,!0);let F=0,z=0,J,K,Y=!1,L,I,M,de=Ze(),Xe=Ze(),ve=Ze(),Qe=Ze(),Z=Ze();const $=(q,gt)=>{if(!Y)return!1;const Ue=gt?q:z+q;t(14,z=Math.max(0,Math.min(F-1,Ue))),t(6,T=z)},B=q=>{Y=q[0].isIntersecting};kt(()=>{t(13,F=I.children.length),t(7,O=F),Z.set(O),M=new IntersectionObserver(B,{root:null,rootMargin:"-1px"}),M.observe(L),t(2,K),t(1,J)});function Ee(q){it[q?"unshift":"push"](()=>{I=q,t(4,I)})}function _t(q){it[q?"unshift":"push"](()=>{L=q,t(3,L)})}function Ne(){J=this.clientWidth,K=this.clientHeight,t(1,J),t(2,K)}return n.$$set=q=>{"direction"in q&&t(0,m=q.direction),"duration"in q&&t(8,b=q.duration),"timing"in q&&t(9,k=q.timing),"count"in q&&t(7,O=q.count),"current"in q&&t(6,T=q.current),"$$scope"in q&&t(25,g=q.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&8195&&t(24,r=m==="horizontal"?`${F*J}px`:"100%"),n.$$.dirty[0]&8197&&t(23,s=m==="vertical"?`${F*K}px`:"100%"),n.$$.dirty[0]&16387&&t(22,i=m==="horizontal"?`${z*J*-1}px`:0),n.$$.dirty[0]&16389&&t(21,o=m==="vertical"?`${z*K*-1}px`:0),n.$$.dirty[0]&16777216&&t(20,a=`width: ${r};`),n.$$.dirty[0]&8388608&&t(19,l=`height: ${s};`),n.$$.dirty[0]&6291456&&t(18,c=`transform: translate3d(${i}, ${o}, 0);`),n.$$.dirty[0]&256&&t(17,u=`transition-duration: ${b};`),n.$$.dirty[0]&512&&t(16,h=`transition-timing-function: ${k};`),n.$$.dirty[0]&2031616&&t(5,d=`${a} ${l} ${c} ${u} ${h}`),n.$$.dirty[0]&1&&de.set(m),n.$$.dirty[0]&2&&Xe.set(J),n.$$.dirty[0]&4&&ve.set(K),n.$$.dirty[0]&64&&Qe.set(T),n.$$.dirty[0]&32768&&Dt("Slider",f)},t(15,f={dir:de,cur:Qe,w:Xe,h:ve,count:Z}),[m,J,K,L,I,d,T,O,b,k,y,D,N,F,z,f,h,u,c,l,a,o,i,s,r,g,v,Ee,_t,Ne]}class $s extends ce{constructor(e){super(),ue(this,e,Us,Ns,ae,{direction:0,duration:8,timing:9,count:7,current:6,next:10,prev:11,jump:12},null,[-1,-1])}get next(){return this.$$.ctx[10]}get prev(){return this.$$.ctx[11]}get jump(){return this.$$.ctx[12]}}function Fs(n,e){const t=["a","button","input","textarea","select","details","[tabindex]:not([tabindex='-1'])"],r=o=>{i.forEach(a=>{o&&o.disable?a.setAttribute("tabindex",-1):a.removeAttribute("tabindex")})},s=t.join(", "),i=[...n.querySelectorAll(s)];return r(e),{update(o){r(o)},destroy(){i.forEach(o=>o.removeAttribute("tabindex"))}}}function Ms(n){let e,t,r,s,i,o,a,l;const c=n[17].default,u=lt(c,n,n[16],null);return{c(){e=S("div"),u&&u.c(),this.h()},l(h){e=E(h,"DIV",{id:!0,class:!0,role:!0,"aria-label":!0,"aria-current":!0});var d=j(e);u&&u.l(d),d.forEach(p),this.h()},h(){_(e,"id",t="slide-"+n[0]),_(e,"class",r="slide "+n[1]+" svelte-1h814z3"),_(e,"role","group"),_(e,"aria-label",s="slide "+(n[0]+1)+" of "+n[6]),_(e,"aria-current",n[2]),oe(e,"visible",n[2]),W(e,"width",n[5]),W(e,"height",n[4])},m(h,d){P(h,e,d),u&&u.m(e,null),o=!0,a||(l=ys(i=Fs.call(null,e,{disable:n[3]})),a=!0)},p(h,[d]){u&&u.p&&(!o||d&65536)&&ut(u,c,h,h[16],o?dt(c,h[16],d,null):ht(h[16]),null),(!o||d&1&&t!==(t="slide-"+h[0]))&&_(e,"id",t),(!o||d&2&&r!==(r="slide "+h[1]+" svelte-1h814z3"))&&_(e,"class",r),(!o||d&65&&s!==(s="slide "+(h[0]+1)+" of "+h[6]))&&_(e,"aria-label",s),(!o||d&4)&&_(e,"aria-current",h[2]),i&&St(i.update)&&d&8&&i.update.call(null,{disable:h[3]}),(!o||d&6)&&oe(e,"visible",h[2]),d&32&&W(e,"width",h[5]),d&16&&W(e,"height",h[4])},i(h){o||(A(u,h),o=!0)},o(h){R(u,h),o=!1},d(h){h&&p(e),u&&u.d(h),a=!1,l()}}}function Bs(n,e,t){let r,s,i,o,a,l,c,u,h,{$$slots:d={},$$scope:f}=e;const{dir:v,cur:g,w:m,h:b,count:k}=bs("Slider");ie(n,v,y=>t(14,c=y)),ie(n,g,y=>t(12,a=y)),ie(n,m,y=>t(15,u=y)),ie(n,b,y=>t(13,l=y)),ie(n,k,y=>t(6,h=y));let{index:O}=e,{cls:T=""}=e;return n.$$set=y=>{"index"in y&&t(0,O=y.index),"cls"in y&&t(1,T=y.cls),"$$scope"in y&&t(16,f=y.$$scope)},n.$$.update=()=>{n.$$.dirty&49152&&t(5,r=c==="horizontal"?`${u}px`:"100%"),n.$$.dirty&24576&&t(4,s=c==="vertical"?`${l}px`:"100%"),n.$$.dirty&4097&&t(2,i=O===a),n.$$.dirty&4&&t(3,o=!i)},[O,T,i,o,s,r,h,v,g,m,b,k,a,l,c,u,f,d]}class zs extends ce{constructor(e){super(),ue(this,e,Bs,Ms,ae,{index:0,cls:1})}}/** + * @license lucide-svelte v0.358.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qs={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},nr=qs;function ir(n,e,t){const r=n.slice();return r[10]=e[t][0],r[11]=e[t][1],r}function Ot(n){let e,t=[n[11]],r={};for(let s=0;s{t(7,e=Se(Se({},e),Ke(f))),t(6,s=Xt(e,r)),"name"in f&&t(0,a=f.name),"color"in f&&t(1,l=f.color),"size"in f&&t(2,c=f.size),"strokeWidth"in f&&t(3,u=f.strokeWidth),"absoluteStrokeWidth"in f&&t(4,h=f.absoluteStrokeWidth),"iconNode"in f&&t(5,d=f.iconNode),"$$scope"in f&&t(8,o=f.$$scope)},e=Ke(e),[a,l,c,u,h,d,s,e,o,i]}class ns extends ce{constructor(e){super(),ue(this,e,Hs,Gs,ae,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Ws(n){let e,t,r,s;return{c(){e=S("button"),t=V(n[0]),this.h()},l(i){e=E(i,"BUTTON",{class:!0});var o=j(e);t=x(o,n[0]),o.forEach(p),this.h()},h(){_(e,"class","title-font svelte-rrf764"),oe(e,"fixed",n[2]),W(e,"--font-size",n[3])},m(i,o){P(i,e,o),w(e,t),r||(s=ke(e,"click",function(){St(n[1])&&n[1].apply(this,arguments)}),r=!0)},p(i,[o]){n=i,o&1&&fe(t,n[0]),o&4&&oe(e,"fixed",n[2]),o&8&&W(e,"--font-size",n[3])},i:le,o:le,d(i){i&&p(e),r=!1,s()}}}function Js(n,e,t){let{text:r="NEXT"}=e,{onClick:s=()=>{}}=e,{fixed:i=!0}=e,{fontSize:o="2rem"}=e;return n.$$set=a=>{"text"in a&&t(0,r=a.text),"onClick"in a&&t(1,s=a.onClick),"fixed"in a&&t(2,i=a.fixed),"fontSize"in a&&t(3,o=a.fontSize)},[r,s,i,o]}class zt extends ce{constructor(e){super(),ue(this,e,Js,Ws,ae,{text:0,onClick:1,fixed:2,fontSize:3})}}function ar(n,e,t){const r=n.slice();return r[18]=e[t],r}function lr(n){let e,t,r,s;const i=[Vs,Ks],o=[];function a(l,c){return l[18]==="left"?0:l[18]==="right"?1:-1}return~(t=a(n))&&(r=o[t]=i[t](n)),{c(){e=S("span"),r&&r.c(),this.h()},l(l){e=E(l,"SPAN",{class:!0,style:!0});var c=j(e);r&&r.l(c),c.forEach(p),this.h()},h(){_(e,"class","arrows svelte-1sf6xr9"),W(e,"font-size",n[4])},m(l,c){P(l,e,c),~t&&o[t].m(e,null),s=!0},p(l,c){let u=t;t=a(l),t!==u&&(r&&(me(),R(o[u],1,1,()=>{o[u]=null}),pe()),~t?(r=o[t],r||(r=o[t]=i[t](l),r.c()),A(r,1),r.m(e,null)):r=null),(!s||c&16)&&W(e,"font-size",l[4])},i(l){s||(A(r),s=!0)},o(l){R(r),s=!1},d(l){l&&p(e),~t&&o[t].d()}}}function Ks(n){let e,t;return e=new zt({}),{c(){te(e.$$.fragment)},l(r){re(e.$$.fragment,r)},m(r,s){se(e,r,s),t=!0},i(r){t||(A(e.$$.fragment,r),t=!0)},o(r){R(e.$$.fragment,r),t=!1},d(r){ne(e,r)}}}function Vs(n){return{c:le,l:le,m:le,i:le,o:le,d:le}}function cr(n){let e,t=n[7].includes(n[18]),r,s,i,o,a,l,c,u=t&&lr(n);return{c(){e=S("button"),u&&u.c(),r=G(),this.h()},l(h){e=E(h,"BUTTON",{style:!0,"aria-label":!0,class:!0});var d=j(e);u&&u.l(d),r=H(d),d.forEach(p),this.h()},h(){W(e,"width",n[10](n[18])),W(e,"height",n[9](n[18])),_(e,"aria-label",s=n[18]),_(e,"class",i=n[18]+" "+n[5]+" svelte-1sf6xr9"),e.disabled=o=n[2].includes(n[18]),oe(e,"full",n[1])},m(h,d){P(h,e,d),u&&u.m(e,null),w(e,r),a=!0,l||(c=ke(e,"click",function(){St(n[11]("tap",n[18]))&&n[11]("tap",n[18]).apply(this,arguments)}),l=!0)},p(h,d){n=h,d&136&&(t=n[7].includes(n[18])),t?u?(u.p(n,d),d&136&&A(u,1)):(u=lr(n),u.c(),A(u,1),u.m(e,r)):u&&(me(),R(u,1,1,()=>{u=null}),pe()),(!a||d&1032)&&W(e,"width",n[10](n[18])),(!a||d&520)&&W(e,"height",n[9](n[18])),(!a||d&8&&s!==(s=n[18]))&&_(e,"aria-label",s),(!a||d&40&&i!==(i=n[18]+" "+n[5]+" svelte-1sf6xr9"))&&_(e,"class",i),(!a||d&12&&o!==(o=n[2].includes(n[18])))&&(e.disabled=o),(!a||d&42)&&oe(e,"full",n[1])},i(h){a||(A(u),a=!0)},o(h){R(u),a=!1},d(h){h&&p(e),u&&u.d(),l=!1,c()}}}function xs(n){let e,t,r,s;ct(n[17]);let i=ee(n[3]),o=[];for(let l=0;lR(o[l],1,1,()=>{o[l]=null});return{c(){e=S("section");for(let l=0;l{"debug"in y&&t(0,a=y.debug),"enableKeyboard"in y&&t(12,l=y.enableKeyboard),"full"in y&&t(1,c=y.full),"showArrows"in y&&t(13,u=y.showArrows),"disable"in y&&t(2,h=y.disable),"directions"in y&&t(3,d=y.directions),"size"in y&&t(14,f=y.size),"arrowSize"in y&&t(4,v=y.arrowSize),"arrowStroke"in y&&t(15,g=y.arrowStroke),"arrowStrokeWidth"in y&&t(16,m=y.arrowStrokeWidth),"arrowPosition"in y&&t(5,b=y.arrowPosition)},n.$$.update=()=>{n.$$.dirty&16394&&t(10,r=y=>Array.isArray(f)?f[d.indexOf(y)]:c?"100%":f),n.$$.dirty&16386&&t(9,s=y=>["up","down"].includes(y)?f:c?"100%":f),n.$$.dirty&4104&&t(8,i=y=>{const D=y.key.replace("Arrow","").toLowerCase(),N=d.includes(D);l&&N&&(y.preventDefault(),k("tap",D))}),n.$$.dirty&8200&&t(7,o=d.filter(y=>typeof u=="boolean"?u:u.includes(y)))},[a,c,h,d,v,b,O,o,i,s,r,k,l,u,f,g,m,T]}class Xs extends ce{constructor(e){super(),ue(this,e,Ys,xs,ae,{debug:0,enableKeyboard:12,full:1,showArrows:13,disable:2,directions:3,size:14,arrowSize:4,arrowStroke:15,arrowStrokeWidth:16,arrowPosition:5})}}function Qs(n){let e,t=n[1]+1+"",r,s,i;return{c(){e=S("p"),r=V(t),s=V(" of "),i=V(n[0]),this.h()},l(o){e=E(o,"P",{class:!0});var a=j(e);r=x(a,t),s=x(a," of "),i=x(a,n[0]),a.forEach(p),this.h()},h(){_(e,"class","count svelte-rrphdy")},m(o,a){P(o,e,a),w(e,r),w(e,s),w(e,i)},p(o,[a]){a&2&&t!==(t=o[1]+1+"")&&fe(r,t),a&1&&fe(i,o[0])},i:le,o:le,d(o){o&&p(e)}}}function Zs(n,e,t){let r;ie(n,rt,i=>t(1,r=i));let{maxArtistIndex:s}=e;return n.$$set=i=>{"maxArtistIndex"in i&&t(0,s=i.maxArtistIndex)},[s,r]}class en extends ce{constructor(e){super(),ue(this,e,Zs,Qs,ae,{maxArtistIndex:0})}}function tn(n){let e;const t=n[2].default,r=lt(t,n,n[3],null);return{c(){r&&r.c()},l(s){r&&r.l(s)},m(s,i){r&&r.m(s,i),e=!0},p(s,i){r&&r.p&&(!e||i&8)&&ut(r,t,s,s[3],e?dt(t,s[3],i,null):ht(s[3]),null)},i(s){e||(A(r,s),e=!0)},o(s){R(r,s),e=!1},d(s){r&&r.d(s)}}}function rn(n){let e,t;const r=[{name:"chevron-down"},n[1],{iconNode:n[0]}];let s={$$slots:{default:[tn]},$$scope:{ctx:n}};for(let i=0;i{t(1,e=Se(Se({},e),Ke(o))),"$$scope"in o&&t(3,s=o.$$scope)},e=Ke(e),[i,e,r,s]}class nn extends ce{constructor(e){super(),ue(this,e,sn,rn,ae,{})}}const on=nn;function an(n){let e;const t=n[2].default,r=lt(t,n,n[3],null);return{c(){r&&r.c()},l(s){r&&r.l(s)},m(s,i){r&&r.m(s,i),e=!0},p(s,i){r&&r.p&&(!e||i&8)&&ut(r,t,s,s[3],e?dt(t,s[3],i,null):ht(s[3]),null)},i(s){e||(A(r,s),e=!0)},o(s){R(r,s),e=!1},d(s){r&&r.d(s)}}}function ln(n){let e,t;const r=[{name:"chevron-up"},n[1],{iconNode:n[0]}];let s={$$slots:{default:[an]},$$scope:{ctx:n}};for(let i=0;i{t(1,e=Se(Se({},e),Ke(o))),"$$scope"in o&&t(3,s=o.$$scope)},e=Ke(e),[i,e,r,s]}class un extends ce{constructor(e){super(),ue(this,e,cn,ln,ae,{})}}const hn=un;function dn(n){let e,t;return{c(){e=We("svg"),t=We("path"),this.h()},l(r){e=Je(r,"svg",{xmlns:!0,version:!0,viewBox:!0,class:!0});var s=j(e);t=Je(s,"path",{d:!0}),j(t).forEach(p),s.forEach(p),this.h()},h(){_(t,"d","m600 223.2c-207.6 0-376.8 169.2-376.8 376.8s169.2 376.8 376.8 376.8 376.8-169.2 376.8-376.8-169.2-376.8-376.8-376.8zm159.6 408-219.6 130.8c-16.801 9.6016-39.602 4.8008-49.199-13.199-3.6016-6-4.8008-12-4.8008-18v-261.6c0-20.398 15.602-36 36-36 6 0 13.199 1.1992 18 4.8008l219.6 130.8c16.801 9.6016 22.801 32.398 12 49.199-2.4023 6-7.2031 9.6016-12 13.199z"),_(e,"xmlns","http://www.w3.org/2000/svg"),_(e,"version","1.1"),_(e,"viewBox","223.2 223.2 753.6 753.6"),_(e,"class","svelte-1idfvi7")},m(r,s){P(r,e,s),w(e,t)},d(r){r&&p(e)}}}function fn(n){let e,t;return{c(){e=We("svg"),t=We("path"),this.h()},l(r){e=Je(r,"svg",{xmlns:!0,version:!0,viewBox:!0,class:!0});var s=j(e);t=Je(s,"path",{d:!0}),j(t).forEach(p),s.forEach(p),this.h()},h(){_(t,"d","m600 30c-314.39 0-570 255.61-570 570s255.61 570 570 570 570-255.61 570-570-255.61-570-570-570zm-96 788.39c0 30-25.219 55.219-55.219 55.219s-55.219-25.219-55.219-55.219l0.046875-436.78c0-30 25.219-55.219 55.219-55.219s55.219 25.219 55.219 55.219zm302.39 0c0 30-25.219 55.219-55.219 55.219s-55.219-25.219-55.219-55.219l0.046875-436.78c0-30 25.219-55.219 55.219-55.219s55.219 25.219 55.219 55.219z"),_(e,"xmlns","http://www.w3.org/2000/svg"),_(e,"version","1.1"),_(e,"viewBox","30 30 1140 1140"),_(e,"class","svelte-1idfvi7")},m(r,s){P(r,e,s),w(e,t)},d(r){r&&p(e)}}}function _n(n){let e,t,r=n[0].song+"",s,i,o;function a(u,h){return u[1]?fn:dn}let l=a(n),c=l(n);return{c(){e=S("span"),c.c(),t=G(),s=V(r),this.h()},l(u){e=E(u,"SPAN",{class:!0});var h=j(e);c.l(h),t=H(h),s=x(h,r),h.forEach(p),this.h()},h(){_(e,"class","artist__player svelte-1idfvi7")},m(u,h){P(u,e,h),c.m(e,null),w(e,t),w(e,s),i||(o=ke(e,"click",n[2]),i=!0)},p(u,[h]){l!==(l=a(u))&&(c.d(1),c=l(u),c&&(c.c(),c.m(e,t))),h&1&&r!==(r=u[0].song+"")&&fe(s,r)},i:le,o:le,d(u){u&&p(e),c.d(),i=!1,o()}}}function gn(n,e,t){let{artist:r}=e,s,i=!1,o;function a(){i?l():(t(1,i=!0),s||(s=new Audio(`${Oe}/assets/audio/${r.id}.mp3`),s.play()))}function l(){t(1,i=!1),s&&(s.pause(),s=null)}return n.$$set=c=>{"artist"in c&&t(0,r=c.artist)},n.$$.update=()=>{n.$$.dirty&11&&(o&&o.id!==r.id&&i&&l(),t(3,o=r))},[r,i,a,o]}class mn extends ce{constructor(e){super(),ue(this,e,gn,_n,ae,{artist:0})}}function ur(n){let e,t,r=`url(${Oe}/assets/toploaders/${n[3]}.png)`;return{c(){e=S("div"),this.h()},l(s){e=E(s,"DIV",{class:!0}),j(e).forEach(p),this.h()},h(){_(e,"class","toploader svelte-1s1k6wy"),W(e,"--toploader-url",r)},m(s,i){P(s,e,i)},p(s,i){i&8&&r!==(r=`url(${Oe}/assets/toploaders/${s[3]}.png)`)&&W(e,"--toploader-url",r)},i(s){s&&(t||ct(()=>{t=Zr(e,Ps,{duration:500}),t.start()}))},o:le,d(s){s&&p(e)}}}function pn(n){let e,t,r=n[0].name+"",s,i,o,a,l=n[0]["debut year"]+"",c,u,h=n[0].company+"",d,f,v,g,m,b,k,O=`url(${Oe}/assets/images/${n[0].id}.jpg)`,T;v=new mn({props:{artist:n[0],currentArtistIndex:n[1]}});let y=n[2]&&ur(n);return{c(){e=S("div"),t=S("h2"),s=V(r),i=G(),o=S("p"),a=V("Debuted in "),c=V(l),u=V(" under "),d=V(h),f=V(` and their highest streaming + song is + `),te(v.$$.fragment),g=G(),m=S("div"),y&&y.c(),b=G(),k=S("div"),this.h()},l(D){e=E(D,"DIV",{class:!0});var N=j(e);t=E(N,"H2",{class:!0});var F=j(t);s=x(F,r),F.forEach(p),i=H(N),o=E(N,"P",{class:!0});var z=j(o);a=x(z,"Debuted in "),c=x(z,l),u=x(z," under "),d=x(z,h),f=x(z,` and their highest streaming + song is + `),re(v.$$.fragment,z),z.forEach(p),g=H(N),m=E(N,"DIV",{class:!0});var J=j(m);y&&y.l(J),b=H(J),k=E(J,"DIV",{class:!0}),j(k).forEach(p),J.forEach(p),N.forEach(p),this.h()},h(){_(t,"class","artist__title svelte-1s1k6wy"),_(o,"class","artist__description svelte-1s1k6wy"),_(k,"class","image svelte-1s1k6wy"),W(k,"--image",O),_(m,"class","artist__art svelte-1s1k6wy"),_(e,"class","artist svelte-1s1k6wy")},m(D,N){P(D,e,N),w(e,t),w(t,s),w(e,i),w(e,o),w(o,a),w(o,c),w(o,u),w(o,d),w(o,f),se(v,o,null),w(e,g),w(e,m),y&&y.m(m,null),w(m,b),w(m,k),T=!0},p(D,[N]){(!T||N&1)&&r!==(r=D[0].name+"")&&fe(s,r),(!T||N&1)&&l!==(l=D[0]["debut year"]+"")&&fe(c,l),(!T||N&1)&&h!==(h=D[0].company+"")&&fe(d,h);const F={};N&1&&(F.artist=D[0]),N&2&&(F.currentArtistIndex=D[1]),v.$set(F),D[2]?y?(y.p(D,N),N&4&&A(y,1)):(y=ur(D),y.c(),A(y,1),y.m(m,b)):y&&(y.d(1),y=null),N&1&&O!==(O=`url(${Oe}/assets/images/${D[0].id}.jpg)`)&&W(k,"--image",O)},i(D){T||(A(v.$$.fragment,D),A(y),T=!0)},o(D){R(v.$$.fragment,D),T=!1},d(D){D&&p(e),ne(v),y&&y.d()}}}function vn(n,e,t){let r,s;ie(n,yt,a=>t(2,r=a)),ie(n,bt,a=>t(3,s=a));let{artist:i}=e,{currentArtistIndex:o}=e;return n.$$set=a=>{"artist"in a&&t(0,i=a.artist),"currentArtistIndex"in a&&t(1,o=a.currentArtistIndex)},[i,o,r,s]}class yn extends ce{constructor(e){super(),ue(this,e,vn,pn,ae,{artist:0,currentArtistIndex:1})}}const bn=n=>{let e;return n?e=n:typeof fetch>"u"?e=(...t)=>Ve(()=>Promise.resolve().then(()=>ft),void 0,import.meta.url).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)};class qt extends Error{constructor(e,t="FunctionsError",r){super(e),this.name=t,this.context=r}}class wn extends qt{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class kn extends qt{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Sn extends qt{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var En=function(n,e,t,r){function s(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(n,e||[])).next())})};class Tn{constructor(e,{headers:t={},customFetch:r}={}){this.url=e,this.headers=t,this.fetch=bn(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var r;return En(this,void 0,void 0,function*(){try{const{headers:s,method:i,body:o}=t;let a={},l;o&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",l=o):typeof o=="string"?(a["Content-Type"]="text/plain",l=o):typeof FormData<"u"&&o instanceof FormData?l=o:(a["Content-Type"]="application/json",l=JSON.stringify(o)));const c=yield this.fetch(`${this.url}/${e}`,{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),s),body:l}).catch(f=>{throw new wn(f)}),u=c.headers.get("x-relay-error");if(u&&u==="true")throw new kn(c);if(!c.ok)throw new Sn(c);let h=((r=c.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),d;return h==="application/json"?d=yield c.json():h==="application/octet-stream"?d=yield c.blob():h==="multipart/form-data"?d=yield c.formData():d=yield c.text(),{data:d,error:null}}catch(s){return{data:null,error:s}}})}}var An=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},xe=An();const On=xe.fetch,Gt=xe.fetch.bind(xe),is=xe.Headers,In=xe.Request,jn=xe.Response,ft=Object.freeze(Object.defineProperty({__proto__:null,Headers:is,Request:In,Response:jn,default:Gt,fetch:On},Symbol.toStringTag,{value:"Module"}));class Pn extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}class Rn{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch>"u"?this.fetch=Gt:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(e,t){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{var o,a,l;let c=null,u=null,h=null,d=i.status,f=i.statusText;if(i.ok){if(this.method!=="HEAD"){const b=await i.text();b===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?u=b:u=JSON.parse(b))}const g=(o=this.headers.Prefer)===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),m=(a=i.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");g&&m&&m.length>1&&(h=parseInt(m[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(u)&&(u.length>1?(c={code:"PGRST116",details:`Results contain ${u.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},u=null,h=null,d=406,f="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{const g=await i.text();try{c=JSON.parse(g),Array.isArray(c)&&i.status===404&&(u=[],c=null,d=200,f="OK")}catch{i.status===404&&g===""?(d=204,f="No Content"):c={message:g}}if(c&&this.isMaybeSingle&&(!((l=c==null?void 0:c.details)===null||l===void 0)&&l.includes("0 rows"))&&(c=null,d=200,f="OK"),c&&this.shouldThrowOnError)throw new Pn(c)}return{error:c,data:u,count:h,status:d,statusText:f}});return this.shouldThrowOnError||(s=s.catch(i=>{var o,a,l;return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:`${(a=i==null?void 0:i.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=i==null?void 0:i.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}}class Cn extends Rn{select(e){let t=!1;const r=(e??"*").split("").map(s=>/\s/.test(s)&&!t?"":(s==='"'&&(t=!t),s)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:s,referencedTable:i=s}={}){const o=i?`${i}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:s=r}={}){const i=typeof s>"u"?"offset":`${s}.offset`,o=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:s=!1,wal:i=!1,format:o="text"}={}){var a;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,s?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${c}"; options=${l};`,o==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}class qe extends Cn{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){const r=t.map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:s}={}){let i="";s==="plain"?i="pl":s==="phrase"?i="ph":s==="websearch"&&(i="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${i}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}}class Ln{constructor(e,{headers:t={},schema:r,fetch:s}){this.url=e,this.headers=t,this.schema=r,this.fetch=s}select(e,{head:t=!1,count:r}={}){const s=t?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(a=>/\s/.test(a)&&!i?"":(a==='"'&&(i=!i),a)).join("");return this.url.searchParams.set("select",o),r&&(this.headers.Prefer=`count=${r}`),new qe({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:r=!0}={}){const s="POST",i=[];if(this.headers.Prefer&&i.push(this.headers.Prefer),t&&i.push(`count=${t}`),r||i.push("missing=default"),this.headers.Prefer=i.join(","),Array.isArray(e)){const o=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>0){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new qe({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:s,defaultToNull:i=!0}={}){const o="POST",a=[`resolution=${r?"ignore":"merge"}-duplicates`];if(t!==void 0&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&a.push(this.headers.Prefer),s&&a.push(`count=${s}`),i||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);this.url.searchParams.set("columns",c.join(","))}}return new qe({method:o,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){const r="PATCH",s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),t&&s.push(`count=${t}`),this.headers.Prefer=s.join(","),new qe({method:r,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const t="DELETE",r=[];return e&&r.push(`count=${e}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new qe({method:t,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}const Dn="1.9.2",Nn={"X-Client-Info":`postgrest-js/${Dn}`};class Ht{constructor(e,{headers:t={},schema:r,fetch:s}={}){this.url=e,this.headers=Object.assign(Object.assign({},Nn),t),this.schemaName=r,this.fetch=s}from(e){const t=new URL(`${this.url}/${e}`);return new Ln(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new Ht(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:r=!1,count:s}={}){let i;const o=new URL(`${this.url}/rpc/${e}`);let a;r?(i="HEAD",Object.entries(t).forEach(([c,u])=>{o.searchParams.append(c,`${u}`)})):(i="POST",a=t);const l=Object.assign({},this.headers);return s&&(l.Prefer=`count=${s}`),new qe({method:i,url:o,headers:l,schema:this.schemaName,body:a,fetch:this.fetch,allowEmpty:!1})}}const Un="2.9.3",$n={"X-Client-Info":`realtime-js/${Un}`},Fn="1.0.0",os=1e4,Mn=1e3;var He;(function(n){n[n.connecting=0]="connecting",n[n.open=1]="open",n[n.closing=2]="closing",n[n.closed=3]="closed"})(He||(He={}));var _e;(function(n){n.closed="closed",n.errored="errored",n.joined="joined",n.joining="joining",n.leaving="leaving"})(_e||(_e={}));var be;(function(n){n.close="phx_close",n.error="phx_error",n.join="phx_join",n.reply="phx_reply",n.leave="phx_leave",n.access_token="access_token"})(be||(be={}));var Nt;(function(n){n.websocket="websocket"})(Nt||(Nt={}));var Ce;(function(n){n.Connecting="connecting",n.Open="open",n.Closing="closing",n.Closed="closed"})(Ce||(Ce={}));class as{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}class Bn{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),r=new TextDecoder;return this._decodeBroadcast(e,t,r)}_decodeBroadcast(e,t,r){const s=t.getUint8(1),i=t.getUint8(2);let o=this.HEADER_LENGTH+2;const a=r.decode(e.slice(o,o+s));o=o+s;const l=r.decode(e.slice(o,o+i));o=o+i;const c=JSON.parse(r.decode(e.slice(o,e.byteLength)));return{ref:null,topic:a,event:l,payload:c}}}class It{constructor(e,t,r={},s=os){this.channel=e,this.event=t,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var r;return this._hasReceived(e)&&t((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=t=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=t,this._matchReceive(t)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var hr;(function(n){n.SYNC="sync",n.JOIN="join",n.LEAVE="leave"})(hr||(hr={}));class st{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(t==null?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=st.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=st.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=st.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,r,s){const i=this.cloneDeep(e),o=this.transformState(t),a={},l={};return this.map(i,(c,u)=>{o[c]||(l[c]=u)}),this.map(o,(c,u)=>{const h=i[c];if(h){const d=u.map(m=>m.presence_ref),f=h.map(m=>m.presence_ref),v=u.filter(m=>f.indexOf(m.presence_ref)<0),g=h.filter(m=>d.indexOf(m.presence_ref)<0);v.length>0&&(a[c]=v),g.length>0&&(l[c]=g)}else a[c]=u}),this.syncDiff(i,{joins:a,leaves:l},r,s)}static syncDiff(e,t,r,s){const{joins:i,leaves:o}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var c;const u=(c=e[a])!==null&&c!==void 0?c:[];if(e[a]=this.cloneDeep(l),u.length>0){const h=e[a].map(f=>f.presence_ref),d=u.filter(f=>h.indexOf(f.presence_ref)<0);e[a].unshift(...d)}r(a,u,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;const u=l.map(h=>h.presence_ref);c=c.filter(h=>u.indexOf(h.presence_ref)<0),e[a]=c,s(a,c,l),c.length===0&&delete e[a]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(r=>t(r,e[r]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((t,r)=>{const s=e[r];return"metas"in s?t[r]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):t[r]=s,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var X;(function(n){n.abstime="abstime",n.bool="bool",n.date="date",n.daterange="daterange",n.float4="float4",n.float8="float8",n.int2="int2",n.int4="int4",n.int4range="int4range",n.int8="int8",n.int8range="int8range",n.json="json",n.jsonb="jsonb",n.money="money",n.numeric="numeric",n.oid="oid",n.reltime="reltime",n.text="text",n.time="time",n.timestamp="timestamp",n.timestamptz="timestamptz",n.timetz="timetz",n.tsrange="tsrange",n.tstzrange="tstzrange"})(X||(X={}));const dr=(n,e,t={})=>{var r;const s=(r=t.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(e).reduce((i,o)=>(i[o]=zn(o,n,e,s),i),{})},zn=(n,e,t,r)=>{const s=e.find(a=>a.name===n),i=s==null?void 0:s.type,o=t[n];return i&&!r.includes(i)?ls(i,o):Ut(o)},ls=(n,e)=>{if(n.charAt(0)==="_"){const t=n.slice(1,n.length);return Wn(e,t)}switch(n){case X.bool:return qn(e);case X.float4:case X.float8:case X.int2:case X.int4:case X.int8:case X.numeric:case X.oid:return Gn(e);case X.json:case X.jsonb:return Hn(e);case X.timestamp:return Jn(e);case X.abstime:case X.date:case X.daterange:case X.int4range:case X.int8range:case X.money:case X.reltime:case X.text:case X.time:case X.timestamptz:case X.timetz:case X.tsrange:case X.tstzrange:return Ut(e);default:return Ut(e)}},Ut=n=>n,qn=n=>{switch(n){case"t":return!0;case"f":return!1;default:return n}},Gn=n=>{if(typeof n=="string"){const e=parseFloat(n);if(!Number.isNaN(e))return e}return n},Hn=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch(e){return console.log(`JSON parse error: ${e}`),n}return n},Wn=(n,e)=>{if(typeof n!="string")return n;const t=n.length-1,r=n[t];if(n[0]==="{"&&r==="}"){let i;const o=n.slice(1,t);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>ls(e,a))}return n},Jn=n=>typeof n=="string"?n.replace(" ","T"):n;var fr;(function(n){n.ALL="*",n.INSERT="INSERT",n.UPDATE="UPDATE",n.DELETE="DELETE"})(fr||(fr={}));var _r;(function(n){n.BROADCAST="broadcast",n.PRESENCE="presence",n.POSTGRES_CHANGES="postgres_changes"})(_r||(_r={}));var gr;(function(n){n.SUBSCRIBED="SUBSCRIBED",n.TIMED_OUT="TIMED_OUT",n.CLOSED="CLOSED",n.CHANNEL_ERROR="CHANNEL_ERROR"})(gr||(gr={}));class Wt{constructor(e,t={config:{}},r){this.topic=e,this.params=t,this.socket=r,this.bindings={},this.state=_e.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""}},t.config),this.timeout=this.socket.timeout,this.joinPush=new It(this,be.join,this.params,this.timeout),this.rejoinTimer=new as(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=_e.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=_e.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=_e.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=_e.errored,this.rejoinTimer.scheduleTimeout())}),this._on(be.reply,{},(s,i)=>{this._trigger(this._replyEventName(i),s)}),this.presence=new st(this),this.broadcastEndpointURL=this._broadcastEndpointURL()}subscribe(e,t=this.timeout){var r,s;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:i,presence:o}}=this.params;this._onError(c=>e&&e("CHANNEL_ERROR",c)),this._onClose(()=>e&&e("CLOSED"));const a={},l={broadcast:i,presence:o,postgres_changes:(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(c=>c.filter))!==null&&s!==void 0?s:[]};this.socket.accessToken&&(a.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:l},a)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",({postgres_changes:c})=>{var u;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),c===void 0){e&&e("SUBSCRIBED");return}else{const h=this.bindings.postgres_changes,d=(u=h==null?void 0:h.length)!==null&&u!==void 0?u:0,f=[];for(let v=0;v{e&&e("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(c).join(", ")||"error")))}).receive("timeout",()=>{e&&e("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,r){return this._on(e,t,r)}async send(e,t={}){var r,s;if(!this._canPush()&&e.type==="broadcast"){const{event:i,payload:o}=e,a={method:"POST",headers:{apikey:(r=this.socket.apiKey)!==null&&r!==void 0?r:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o}]})};try{return(await this._fetchWithTimeout(this.broadcastEndpointURL,a,(s=t.timeout)!==null&&s!==void 0?s:this.timeout)).ok?"ok":"error"}catch(l){return l.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this._push(e.type,e,t.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=_e.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(be.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const s=new It(this,be.leave,{},e);s.receive("ok",()=>{t(),r("ok")}).receive("timeout",()=>{t(),r("timed out")}).receive("error",()=>{r("error")}),s.send(),this._canPush()||s.trigger("ok",{})})}_broadcastEndpointURL(){let e=this.socket.endPoint;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"}async _fetchWithTimeout(e,t,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:s.signal}));return clearTimeout(i),o}_push(e,t,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new It(this,e,t,r);return this._canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}_onMessage(e,t,r){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,r){var s,i;const o=e.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=be;if(r&&[a,l,c,u].indexOf(o)>=0&&r!==this._joinRef())return;let d=this._onMessage(o,t,r);if(t&&!d)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(f=>{var v,g,m;return((v=f.filter)===null||v===void 0?void 0:v.event)==="*"||((m=(g=f.filter)===null||g===void 0?void 0:g.event)===null||m===void 0?void 0:m.toLocaleLowerCase())===o}).map(f=>f.callback(d,r)):(i=this.bindings[o])===null||i===void 0||i.filter(f=>{var v,g,m,b,k,O;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in f){const T=f.id,y=(v=f.filter)===null||v===void 0?void 0:v.event;return T&&((g=t.ids)===null||g===void 0?void 0:g.includes(T))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((m=t.data)===null||m===void 0?void 0:m.type.toLocaleLowerCase()))}else{const T=(k=(b=f==null?void 0:f.filter)===null||b===void 0?void 0:b.event)===null||k===void 0?void 0:k.toLocaleLowerCase();return T==="*"||T===((O=t==null?void 0:t.event)===null||O===void 0?void 0:O.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===o}).map(f=>{if(typeof d=="object"&&"ids"in d){const v=d.data,{schema:g,table:m,commit_timestamp:b,type:k,errors:O}=v;d=Object.assign(Object.assign({},{schema:g,table:m,commit_timestamp:b,eventType:k,new:{},old:{},errors:O}),this._getPayloadRecords(v))}f.callback(d,r)})}_isClosed(){return this.state===_e.closed}_isJoined(){return this.state===_e.joined}_isJoining(){return this.state===_e.joining}_isLeaving(){return this.state===_e.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,r){const s=e.toLocaleLowerCase(),i={type:s,filter:t,callback:r};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(e,t){const r=e.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===r&&Wt.isEqual(s.filter,t))}),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(be.close,{},e)}_onError(e){this._on(be.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=_e.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(t.new=dr(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(t.old=dr(e.columns,e.old_record)),t}}const Kn=()=>{},Vn=typeof WebSocket<"u";class xn{constructor(e,t){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.headers=$n,this.params={},this.timeout=os,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=Kn,this.conn=null,this.sendBuffer=[],this.serializer=new Bn,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=i=>{let o;return i?o=i:typeof fetch>"u"?o=(...a)=>Ve(()=>Promise.resolve().then(()=>ft),void 0,import.meta.url).then(({default:l})=>l(...a)):o=fetch,(...a)=>o(...a)},this.endPoint=`${e}/${Nt.websocket}`,t!=null&&t.transport?this.transport=t.transport:this.transport=null,t!=null&&t.params&&(this.params=t.params),t!=null&&t.headers&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),t!=null&&t.timeout&&(this.timeout=t.timeout),t!=null&&t.logger&&(this.logger=t.logger),t!=null&&t.heartbeatIntervalMs&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);const s=(r=t==null?void 0:t.params)===null||r===void 0?void 0:r.apikey;s&&(this.accessToken=s,this.apiKey=s),this.reconnectAfterMs=t!=null&&t.reconnectAfterMs?t.reconnectAfterMs:i=>[1e3,2e3,5e3,1e4][i-1]||1e4,this.encode=t!=null&&t.encode?t.encode:(i,o)=>o(JSON.stringify(i)),this.decode=t!=null&&t.decode?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new as(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(t==null?void 0:t.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(Vn){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new Yn(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),Ve(()=>import("../chunks/browser.DL7QZ5YJ.js").then(e=>e.b),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,t??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(e){const t=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),t}async removeAllChannels(){const e=await Promise.all(this.channels.map(t=>t.unsubscribe()));return this.disconnect(),e}log(e,t,r){this.logger(e,t,r)}connectionState(){switch(this.conn&&this.conn.readyState){case He.connecting:return Ce.Connecting;case He.open:return Ce.Open;case He.closing:return Ce.Closing;default:return Ce.Closed}}isConnected(){return this.connectionState()===Ce.Open}channel(e,t={config:{}}){const r=new Wt(`realtime:${e}`,t,this);return this.channels.push(r),r}push(e){const{topic:t,event:r,payload:s,ref:i}=e,o=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${t} ${r} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}setAuth(e){this.accessToken=e,this.channels.forEach(t=>{e&&t.updateJoinPayload({access_token:e}),t.joinedOnce&&t._isJoined()&&t._push(be.access_token,{access_token:e})})}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r._isJoined()||r._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t._joinRef()!==e._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:Fn}))}_onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:s,payload:i,ref:o}=t;(o&&o===this.pendingHeartbeatRef||s===(i==null?void 0:i.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${i.status||""} ${r} ${s} ${o&&"("+o+")"||""}`,i),this.channels.filter(a=>a._isMember(r)).forEach(a=>a._trigger(s,i,o)),this.stateChangeCallbacks.message.forEach(a=>a(t))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(t=>t(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(t=>t(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(be.error))}_appendParams(e,t){if(Object.keys(t).length===0)return e;const r=e.match(/\?/)?"&":"?",s=new URLSearchParams(t);return`${e}${r}${s}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(e=this.conn)===null||e===void 0||e.close(Mn,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class Yn{constructor(e,t,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=He.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=r.close}}class Jt extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function he(n){return typeof n=="object"&&n!==null&&"__isStorageError"in n}class Xn extends Jt{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class mr extends Jt{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}var Qn=function(n,e,t,r){function s(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(n,e||[])).next())})};const cs=n=>{let e;return n?e=n:typeof fetch>"u"?e=(...t)=>Ve(()=>Promise.resolve().then(()=>ft),void 0,import.meta.url).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)},Zn=()=>Qn(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Ve(()=>Promise.resolve().then(()=>ft),void 0,import.meta.url)).Response:Response});var Ye=function(n,e,t,r){function s(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(n,e||[])).next())})};const jt=n=>n.msg||n.message||n.error_description||n.error||JSON.stringify(n),ei=(n,e)=>Ye(void 0,void 0,void 0,function*(){const t=yield Zn();n instanceof t?n.json().then(r=>{e(new Xn(jt(r),n.status||500))}).catch(r=>{e(new mr(jt(r),r))}):e(new mr(jt(n),n))}),ti=(n,e,t,r)=>{const s={method:n,headers:(e==null?void 0:e.headers)||{}};return n==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),t))};function Tt(n,e,t,r,s,i){return Ye(this,void 0,void 0,function*(){return new Promise((o,a)=>{n(t,ti(e,r,s,i)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>ei(l,a))})})}function $t(n,e,t,r){return Ye(this,void 0,void 0,function*(){return Tt(n,"GET",e,t,r)})}function Te(n,e,t,r,s){return Ye(this,void 0,void 0,function*(){return Tt(n,"POST",e,r,s,t)})}function ri(n,e,t,r,s){return Ye(this,void 0,void 0,function*(){return Tt(n,"PUT",e,r,s,t)})}function us(n,e,t,r,s){return Ye(this,void 0,void 0,function*(){return Tt(n,"DELETE",e,r,s,t)})}var ge=function(n,e,t,r){function s(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(n,e||[])).next())})};const si={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},pr={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class ni{constructor(e,t={},r,s){this.url=e,this.headers=t,this.bucketId=r,this.fetch=cs(s)}uploadOrUpdate(e,t,r,s){return ge(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},pr),s),a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(o.upsert)});typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.append("cacheControl",o.cacheControl)):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType);const l=this._removeEmptyFolders(t),c=this._getFinalPath(l),u=yield this.fetch(`${this.url}/object/${c}`,Object.assign({method:e,body:i,headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{})),h=yield u.json();return u.ok?{data:{path:l,id:h.Id,fullPath:h.Key},error:null}:{data:null,error:h}}catch(i){if(he(i))return{data:null,error:i};throw i}})}upload(e,t,r){return ge(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,r)})}uploadToSignedUrl(e,t,r,s){return ge(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(e),o=this._getFinalPath(i),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",t);try{let l;const c=Object.assign({upsert:pr.upsert},s),u=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType);const h=yield this.fetch(a.toString(),{method:"PUT",body:l,headers:u}),d=yield h.json();return h.ok?{data:{path:i,fullPath:d.Key},error:null}:{data:null,error:d}}catch(l){if(he(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e){return ge(this,void 0,void 0,function*(){try{let t=this._getFinalPath(e);const r=yield Te(this.fetch,`${this.url}/object/upload/sign/${t}`,{},{headers:this.headers}),s=new URL(this.url+r.url),i=s.searchParams.get("token");if(!i)throw new Jt("No token returned by API");return{data:{signedUrl:s.toString(),path:e,token:i},error:null}}catch(t){if(he(t))return{data:null,error:t};throw t}})}update(e,t,r){return ge(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,r)})}move(e,t){return ge(this,void 0,void 0,function*(){try{return{data:yield Te(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t},{headers:this.headers}),error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}})}copy(e,t){return ge(this,void 0,void 0,function*(){try{return{data:{path:(yield Te(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t},{headers:this.headers})).Key},error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}})}createSignedUrl(e,t,r){return ge(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e),i=yield Te(this.fetch,`${this.url}/object/sign/${s}`,Object.assign({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(s){if(he(s))return{data:null,error:s};throw s}})}createSignedUrls(e,t,r){return ge(this,void 0,void 0,function*(){try{const s=yield Te(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(s){if(he(s))return{data:null,error:s};throw s}})}download(e,t){return ge(this,void 0,void 0,function*(){const s=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),o=i?`?${i}`:"";try{const a=this._getFinalPath(e);return{data:yield(yield $t(this.fetch,`${this.url}/${s}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(he(a))return{data:null,error:a};throw a}})}getPublicUrl(e,t){const r=this._getFinalPath(e),s=[],i=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";i!==""&&s.push(i);const a=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});l!==""&&s.push(l);let c=s.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${c}`)}}}remove(e){return ge(this,void 0,void 0,function*(){try{return{data:yield us(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(t){if(he(t))return{data:null,error:t};throw t}})}list(e,t,r){return ge(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},si),t),{prefix:e||""});return{data:yield Te(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(he(s))return{data:null,error:s};throw s}})}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const ii="2.5.5",oi={"X-Client-Info":`storage-js/${ii}`};var $e=function(n,e,t,r){function s(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(n,e||[])).next())})};class ai{constructor(e,t={},r){this.url=e,this.headers=Object.assign(Object.assign({},oi),t),this.fetch=cs(r)}listBuckets(){return $e(this,void 0,void 0,function*(){try{return{data:yield $t(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(he(e))return{data:null,error:e};throw e}})}getBucket(e){return $e(this,void 0,void 0,function*(){try{return{data:yield $t(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(t){if(he(t))return{data:null,error:t};throw t}})}createBucket(e,t={public:!1}){return $e(this,void 0,void 0,function*(){try{return{data:yield Te(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}})}updateBucket(e,t){return $e(this,void 0,void 0,function*(){try{return{data:yield ri(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}})}emptyBucket(e){return $e(this,void 0,void 0,function*(){try{return{data:yield Te(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(t){if(he(t))return{data:null,error:t};throw t}})}deleteBucket(e){return $e(this,void 0,void 0,function*(){try{return{data:yield us(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(t){if(he(t))return{data:null,error:t};throw t}})}}class li extends ai{constructor(e,t={},r){super(e,t,r)}from(e){return new ni(this.url,this.headers,e,this.fetch)}}const ci="2.39.8";let tt="";typeof Deno<"u"?tt="deno":typeof document<"u"?tt="web":typeof navigator<"u"&&navigator.product==="ReactNative"?tt="react-native":tt="node";const ui={"X-Client-Info":`supabase-js-${tt}/${ci}`},hi={headers:ui},di={schema:"public"},fi={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},_i={};var gi=function(n,e,t,r){function s(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(n,e||[])).next())})};const mi=n=>{let e;return n?e=n:typeof fetch>"u"?e=Gt:e=fetch,(...t)=>e(...t)},pi=()=>typeof Headers>"u"?is:Headers,vi=(n,e,t)=>{const r=mi(t),s=pi();return(i,o)=>gi(void 0,void 0,void 0,function*(){var a;const l=(a=yield e())!==null&&a!==void 0?a:n;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",n),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,Object.assign(Object.assign({},o),{headers:c}))})};function yi(n){return n.replace(/\/$/,"")}function bi(n,e){const{db:t,auth:r,realtime:s,global:i}=n,{db:o,auth:a,realtime:l,global:c}=e;return{db:Object.assign(Object.assign({},o),t),auth:Object.assign(Object.assign({},a),r),realtime:Object.assign(Object.assign({},l),s),global:Object.assign(Object.assign({},c),i)}}function wi(n){return Math.round(Date.now()/1e3)+n}function ki(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const e=Math.random()*16|0;return(n=="x"?e:e&3|8).toString(16)})}const ye=()=>typeof document<"u",je={tested:!1,writable:!1},nt=()=>{if(!ye())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(je.tested)return je.writable;const n=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(n,n),globalThis.localStorage.removeItem(n),je.tested=!0,je.writable=!0}catch{je.tested=!0,je.writable=!1}return je.writable};function Pt(n){const e={},t=new URL(n);if(t.hash&&t.hash[0]==="#")try{new URLSearchParams(t.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return t.searchParams.forEach((r,s)=>{e[s]=r}),e}const hs=n=>{let e;return n?e=n:typeof fetch>"u"?e=(...t)=>Ve(()=>Promise.resolve().then(()=>ft),void 0,import.meta.url).then(({default:r})=>r(...t)):e=fetch,(...t)=>e(...t)},Si=n=>typeof n=="object"&&n!==null&&"status"in n&&"ok"in n&&"json"in n&&typeof n.json=="function",Pe=async(n,e,t)=>{await n.setItem(e,JSON.stringify(t))},mt=async(n,e)=>{const t=await n.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch{return t}},Rt=async(n,e)=>{await n.removeItem(e)};function Ei(n){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let t="",r,s,i,o,a,l,c,u=0;for(n=n.replace("-","+").replace("_","/");u>4,s=(a&15)<<4|l>>2,i=(l&3)<<6|c,t=t+String.fromCharCode(r),l!=64&&s!=0&&(t=t+String.fromCharCode(s)),c!=64&&i!=0&&(t=t+String.fromCharCode(i));return t}class At{constructor(){this.promise=new At.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}At.promiseConstructor=Promise;function vr(n){const e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,t=n.split(".");if(t.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(t[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=t[1];return JSON.parse(Ei(r))}async function Ti(n){return await new Promise(e=>{setTimeout(()=>e(null),n)})}function Ai(n,e){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await n(i);if(!e(i,null,o)){r(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function Oi(n){return("0"+n.toString(16)).substr(-2)}function Fe(){const e=new Uint32Array(56);if(typeof crypto>"u"){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=t.length;let s="";for(let i=0;i<56;i++)s+=t.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(e),Array.from(e,Oi).join("")}async function Ii(n){const t=new TextEncoder().encode(n),r=await crypto.subtle.digest("SHA-256",t),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}function ji(n){return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Me(n){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),n;const t=await Ii(n);return ji(t)}class Kt extends Error{constructor(e,t){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t}}function C(n){return typeof n=="object"&&n!==null&&"__isAuthError"in n}class Pi extends Kt{constructor(e,t){super(e,t),this.name="AuthApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}function Ri(n){return C(n)&&n.name==="AuthApiError"}class ds extends Kt{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class De extends Kt{constructor(e,t,r){super(e),this.name=t,this.status=r}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Be extends De{constructor(){super("Auth session missing!","AuthSessionMissingError",400)}}class Ct extends De{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500)}}class pt extends De{constructor(e){super(e,"AuthInvalidCredentialsError",400)}}class vt extends De{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class yr extends De{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Ft extends De{constructor(e,t){super(e,"AuthRetryableFetchError",t)}}function Lt(n){return C(n)&&n.name==="AuthRetryableFetchError"}class Ci extends De{constructor(e,t,r){super(e,"AuthWeakPasswordError",t),this.reasons=r}}var Li=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(n);sn.msg||n.message||n.error_description||n.error||JSON.stringify(n),Di=[502,503,504];async function br(n){if(!Si(n))throw new Ft(Ge(n),0);if(Di.includes(n.status))throw new Ft(Ge(n),n.status);let e;try{e=await n.json()}catch(t){throw new ds(Ge(t),t)}throw typeof e=="object"&&e&&typeof e.weak_password=="object"&&e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.reasons.reduce((t,r)=>t&&typeof r=="string",!0)?new Ci(Ge(e),n.status,e.weak_password.reasons):new Pi(Ge(e),n.status||500)}const Ni=(n,e,t,r)=>{const s={method:n,headers:(e==null?void 0:e.headers)||{}};return n==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),t))};async function U(n,e,t,r){var s;const i=Object.assign({},r==null?void 0:r.headers);r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await Ui(n,e,t+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function Ui(n,e,t,r,s,i){const o=Ni(e,r,s,i);let a;try{a=await n(t,o)}catch(l){throw console.error(l),new Ft(Ge(l),0)}if(a.ok||await br(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await br(l)}}function Re(n){var e;let t=null;Bi(n)&&(t=Object.assign({},n),n.expires_at||(t.expires_at=wi(n.expires_in)));const r=(e=n.user)!==null&&e!==void 0?e:n;return{data:{session:t,user:r},error:null}}function wr(n){const e=Re(n);return!e.error&&n.weak_password&&typeof n.weak_password=="object"&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.message&&typeof n.weak_password.message=="string"&&n.weak_password.reasons.reduce((t,r)=>t&&typeof r=="string",!0)&&(e.data.weak_password=n.weak_password),e}function Ae(n){var e;return{data:{user:(e=n.user)!==null&&e!==void 0?e:n},error:null}}function $i(n){return{data:n,error:null}}function Fi(n){const{action_link:e,email_otp:t,hashed_token:r,redirect_to:s,verification_type:i}=n,o=Li(n,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:t,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function Mi(n){return n}function Bi(n){return n.access_token&&n.refresh_token&&n.expires_in}var zi=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(n);s0&&(f.forEach(v=>{const g=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),m=JSON.parse(v.split(";")[1].split("=")[1]);c[`${m}Page`]=g}),c.total=parseInt(d)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(C(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){try{return await U(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Ae})}catch(t){if(C(t))return{data:{user:null},error:t};throw t}}async updateUserById(e,t){try{return await U(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:Ae})}catch(r){if(C(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,t=!1){try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:Ae})}catch(r){if(C(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){try{const{data:t,error:r}=await U(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:t,error:r}}catch(t){if(C(t))return{data:null,error:t};throw t}}async _deleteFactor(e){try{return{data:await U(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(t){if(C(t))return{data:null,error:t};throw t}}}const fs="0.0.0",Gi="http://localhost:9999",Hi="supabase.auth.token",Wi={"X-Client-Info":`gotrue-js/${fs}`},kr=10,Ji={getItem:n=>nt()?globalThis.localStorage.getItem(n):null,setItem:(n,e)=>{nt()&&globalThis.localStorage.setItem(n,e)},removeItem:n=>{nt()&&globalThis.localStorage.removeItem(n)}};function Sr(n={}){return{getItem:e=>n[e]||null,setItem:(e,t)=>{n[e]=t},removeItem:e=>{delete n[e]}}}function Ki(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const ze={debug:!!(globalThis&&nt()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class _s extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class Vi extends _s{}async function xi(n,e,t){ze.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",n,e);const r=new globalThis.AbortController;return e>0&&setTimeout(()=>{r.abort(),ze.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",n)},e),await globalThis.navigator.locks.request(n,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){ze.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",n,s.name);try{return await t()}finally{ze.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",n,s.name)}}else{if(e===0)throw ze.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",n),new Vi(`Acquiring an exclusive Navigator LockManager lock "${n}" immediately failed`);if(ze.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await t()}})}Ki();const Yi={url:Gi,storageKey:Hi,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Wi,flowType:"implicit",debug:!1},et=30*1e3,Er=3;async function Tr(n,e,t){return await t()}class at{constructor(e){var t,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=at.nextInstanceID,at.nextInstanceID+=1,this.instanceID>0&&ye()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const s=Object.assign(Object.assign({},Yi),e);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new qi({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=hs(s.fetch),this.lock=s.lock||Tr,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,s.lock?this.lock=s.lock:ye()&&(!((t=globalThis==null?void 0:globalThis.navigator)===null||t===void 0)&&t.locks)?this.lock=xi:this.lock=Tr,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?s.storage?this.storage=s.storage:nt()?this.storage=Ji:(this.memoryStorage={},this.storage=Sr(this.memoryStorage)):(this.memoryStorage={},this.storage=Sr(this.memoryStorage)),ye()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${fs}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){try{const e=ye()?await this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:t,error:r}=await this._getSessionFromURL(e);if(r)return this._debug("#_initialize()","error detecting session from URL",r),(r==null?void 0:r.message)==="Identity is already linked"||(r==null?void 0:r.message)==="Identity is already linked to another user"?{error:r}:(await this._removeSession(),{error:r});const{session:s,redirectType:i}=t;return this._debug("#_initialize()","detected session in URL",s,"redirect type",i),await this._saveSession(s),setTimeout(async()=>{i==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return C(e)?{error:e}:{error:new ds("Unexpected error during initialization",e)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signUp(e){var t,r,s;try{await this._removeSession();let i;if("email"in e){const{email:u,password:h,options:d}=e;let f=null,v=null;if(this.flowType==="pkce"){const g=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,g),f=await Me(g),v=g===f?"plain":"s256"}i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:d==null?void 0:d.emailRedirectTo,body:{email:u,password:h,data:(t=d==null?void 0:d.data)!==null&&t!==void 0?t:{},gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:f,code_challenge_method:v},xform:Re})}else if("phone"in e){const{phone:u,password:h,options:d}=e;i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:h,data:(r=d==null?void 0:d.data)!==null&&r!==void 0?r:{},channel:(s=d==null?void 0:d.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:Re})}else throw new pt("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(i){if(C(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithPassword(e){try{await this._removeSession();let t;if("email"in e){const{email:i,password:o,options:a}=e;t=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:wr})}else if("phone"in e){const{phone:i,password:o,options:a}=e;t=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:wr})}else throw new pt("You must provide either an email or phone number and a password");const{data:r,error:s}=t;return s?{data:{user:null,session:null},error:s}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Ct}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(t){if(C(t))return{data:{user:null,session:null},error:t};throw t}}async signInWithOAuth(e){var t,r,s,i;return await this._removeSession(),await this._handleProviderSignIn(e.provider,{redirectTo:(t=e.options)===null||t===void 0?void 0:t.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async _exchangeCodeForSession(e){const t=await mt(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(t??"").split("/"),{data:i,error:o}=await U(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:Re});return await Rt(this.storage,`${this.storageKey}-code-verifier`),o?{data:{user:null,session:null,redirectType:null},error:o}:!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:new Ct}:(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}async signInWithIdToken(e){await this._removeSession();try{const{options:t,provider:r,token:s,access_token:i,nonce:o}=e,a=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:t==null?void 0:t.captchaToken}},xform:Re}),{data:l,error:c}=a;return c?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Ct}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(t){if(C(t))return{data:{user:null,session:null},error:t};throw t}}async signInWithOtp(e){var t,r,s,i,o;try{if(await this._removeSession(),"email"in e){const{email:a,options:l}=e;let c=null,u=null;if(this.flowType==="pkce"){const d=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,d),c=await Me(d),u=d===c?"plain":"s256"}const{error:h}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(t=l==null?void 0:l.data)!==null&&t!==void 0?t:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:h}}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u}}throw new pt("You must provide either an email or phone number.")}catch(a){if(C(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(e){var t,r;try{e.type!=="email_change"&&e.type!=="phone_change"&&await this._removeSession();let s,i;"options"in e&&(s=(t=e.options)===null||t===void 0?void 0:t.redirectTo,i=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await U(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Re});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(C(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(e){var t,r,s;try{await this._removeSession();let i=null,o=null;if(this.flowType==="pkce"){const a=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,a),i=await Me(a),o=a===i?"plain":"s256"}return await U(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(t=e.options)===null||t===void 0?void 0:t.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:$i})}catch(i){if(C(i))return{data:null,error:i};throw i}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:t},error:r}=e;if(r)throw r;if(!t)throw new Be;const{error:s}=await U(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:s}})}catch(e){if(C(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{e.type!="email_change"&&e.type!="phone_change"&&await this._removeSession();const t=`${this.url}/resend`;if("email"in e){const{email:r,type:s,options:i}=e,{error:o}=await U(this.fetch,"POST",t,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in e){const{phone:r,type:s,options:i}=e,{data:o,error:a}=await U(this.fetch,"POST",t,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new pt("You must provide either an email or phone number and a type")}catch(t){if(C(t))return{data:{user:null,session:null},error:t};throw t}}async getSession(){return await this.initializePromise,this._acquireLock(-1,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await t()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=t();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const t=await mt(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),t!==null&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r)return{data:{session:e},error:null};const{session:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{session:null},error:i}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Ae}):await this._useSession(async t=>{var r,s;const{data:i,error:o}=t;if(o)throw o;return await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0,xform:Ae})})}catch(t){if(C(t))return{data:{user:null},error:t};throw t}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new Be;const o=s.session;let a=null,l=null;if(this.flowType==="pkce"&&e.email!=null){const h=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,h),a=await Me(h),l=h===a?"plain":"s256"}const{data:c,error:u}=await U(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:t==null?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Ae});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(r){if(C(r))return{data:{user:null},error:r};throw r}}_decodeJWT(e){return vr(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Be;const t=Date.now()/1e3;let r=t,s=!0,i=null;const o=vr(e.access_token);if(o.exp&&(r=o.exp,s=r<=t),s){const{session:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)throw l;i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:r-t,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(t){if(C(t))return{data:{session:null,user:null},error:t};throw t}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{var r;if(!e){const{data:o,error:a}=t;if(a)throw a;e=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new Be;const{session:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(t){if(C(t))return{data:{user:null,session:null},error:t};throw t}}async _getSessionFromURL(e){try{if(!ye())throw new vt("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new vt("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!e)throw new yr("Not a valid PKCE flow url.");const t=Pt(window.location.href);if(e){if(!t.code)throw new yr("No code detected.");const{data:k,error:O}=await this._exchangeCodeForSession(t.code);if(O)throw O;const T=new URL(window.location.href);return T.searchParams.delete("code"),window.history.replaceState(window.history.state,"",T.toString()),{data:{session:k.session,redirectType:null},error:null}}if(t.error||t.error_description||t.error_code)throw new vt(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!i||!a||!o||!c)throw new vt("No session defined in URL");const u=Math.round(Date.now()/1e3),h=parseInt(a);let d=u+h;l&&(d=parseInt(l));const f=d-u;f*1e3<=et&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${h}s`);const v=d-h;u-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,d,u):u-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",v,d,u);const{data:g,error:m}=await this._getUser(i);if(m)throw m;const b={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:d,refresh_token:o,token_type:c,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:b,redirectType:t.type},error:null}}catch(t){if(C(t))return{data:{session:null,redirectType:null},error:t};throw t}}_isImplicitGrantFlow(){const e=Pt(window.location.href);return!!(ye()&&(e.access_token||e.error_description))}async _isPKCEFlow(){const e=Pt(window.location.href),t=await mt(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async t=>{var r;const{data:s,error:i}=t;if(i)return{error:i};const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(Ri(a)&&(a.status===404||a.status===401)))return{error:a}}return e!=="others"&&(await this._removeSession(),await Rt(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(e){const t=ki(),r={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(t)})))(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async t=>{var r,s;try{const{data:{session:i},error:o}=t;if(o)throw o;await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),console.error(i)}})}async resetPasswordForEmail(e,t={}){let r=null,s=null;if(this.flowType==="pkce"){const i=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,`${i}/PASSWORD_RECOVERY`),r=await Me(i),s=i===r?"plain":"s256"}try{return await U(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(i){if(C(i))return{data:null,error:i};throw i}}async getUserIdentities(){var e;try{const{data:t,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(e=t.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(t){if(C(t))return{data:null,error:t};throw t}}async linkIdentity(e){var t;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:h,error:d}=i;if(d)throw d;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await U(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(c=h.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return ye()&&!(!((t=e.options)===null||t===void 0)&&t.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:e.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(C(r))return{data:{provider:e.provider,url:null},error:r};throw r}}async unlinkIdentity(e){try{return await this._useSession(async t=>{var r,s;const{data:i,error:o}=t;if(o)throw o;return await U(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(t){if(C(t))return{data:null,error:t};throw t}}async _refreshAccessToken(e){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const r=Date.now();return await Ai(async s=>(await Ti(s*200),this._debug(t,"refreshing attempt",s),await U(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Re})),(s,i,o)=>o&&o.error&&Lt(o.error)&&Date.now()+(s+1)*200-r{try{await a.callback(e,t)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;athis._autoRefreshTokenTick(),et);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async t=>{const{data:{session:r}}=t;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-e)/et);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${et}ms, refresh threshold is ${Er} ticks`),s<=Er&&await this._callRefreshToken(r.refresh_token)})}catch(t){console.error("Auto refresh tick failed with error. This is likely a transient error.",t)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof _s)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!ye()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,r){const s=[`provider=${encodeURIComponent(t)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const i=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,i);const o=await Me(i),a=i===o?"plain":"s256";this._debug("PKCE","code verifier",`${i.substring(0,5)}...`,"code challenge",o,"method",a);const l=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(l.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async t=>{var r;const{data:s,error:i}=t;return i?{data:null,error:i}:await U(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(t){if(C(t))return{data:null,error:t};throw t}}async _enroll(e){try{return await this._useSession(async t=>{var r,s;const{data:i,error:o}=t;if(o)return{data:null,error:o};const{data:a,error:l}=await U(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:e.friendlyName,factor_type:e.factorType,issuer:e.issuer},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return l?{data:null,error:l}:(!((s=a==null?void 0:a.totp)===null||s===void 0)&&s.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),{data:a,error:null})})}catch(t){if(C(t))return{data:null,error:t};throw t}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var r;const{data:s,error:i}=t;if(i)return{data:null,error:i};const{data:o,error:a}=await U(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})})}catch(t){if(C(t))return{data:null,error:t};throw t}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var r;const{data:s,error:i}=t;return i?{data:null,error:i}:await U(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(t){if(C(t))return{data:null,error:t};throw t}})}async _challengeAndVerify(e){const{data:t,error:r}=await this._challenge({factorId:e.factorId});return r?{data:null,error:r}:await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){const{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};const r=(e==null?void 0:e.factors)||[],s=r.filter(i=>i.factor_type==="totp"&&i.status==="verified");return{data:{all:r,totp:s},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var t,r;const{data:{session:s},error:i}=e;if(i)return{data:null,error:i};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const o=this._decodeJWT(s.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((r=(t=s.user.factors)===null||t===void 0?void 0:t.filter(h=>h.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const u=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:u},error:null}}))}}at.nextInstanceID=0;class Xi extends at{constructor(e){super(e)}}var Qi=function(n,e,t,r){function s(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(n,e||[])).next())})};class Zi{constructor(e,t,r){var s,i,o,a,l,c,u,h;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw new Error("supabaseUrl is required.");if(!t)throw new Error("supabaseKey is required.");const d=yi(e);this.realtimeUrl=`${d}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${d}/auth/v1`,this.storageUrl=`${d}/storage/v1`,this.functionsUrl=`${d}/functions/v1`;const f=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,v={db:di,realtime:_i,auth:Object.assign(Object.assign({},fi),{storageKey:f}),global:hi},g=bi(r??{},v);this.storageKey=(i=(s=g.auth)===null||s===void 0?void 0:s.storageKey)!==null&&i!==void 0?i:"",this.headers=(a=(o=g.global)===null||o===void 0?void 0:o.headers)!==null&&a!==void 0?a:{},this.auth=this._initSupabaseAuthClient((l=g.auth)!==null&&l!==void 0?l:{},this.headers,(c=g.global)===null||c===void 0?void 0:c.fetch),this.fetch=vi(t,this._getAccessToken.bind(this),(u=g.global)===null||u===void 0?void 0:u.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},g.realtime)),this.rest=new Ht(`${d}/rest/v1`,{headers:this.headers,schema:(h=g.db)===null||h===void 0?void 0:h.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new Tn(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new li(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t;return Qi(this,void 0,void 0,function*(){const{data:r}=yield this.auth.getSession();return(t=(e=r.session)===null||e===void 0?void 0:e.access_token)!==null&&t!==void 0?t:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:s,storageKey:i,flowType:o,debug:a},l,c){const u={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Xi({url:this.authUrl,headers:Object.assign(Object.assign({},u),l),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:s,flowType:o,debug:a,fetch:c})}_initRealtimeClient(e){return new xn(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,r)=>{this._handleTokenChanged(t,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.realtime.setAuth(r??null),this.changedAccessToken=r):e==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const eo=(n,e,t)=>new Zi(n,e,t),to="https://lwpcpixtrbcdhvktfvas.supabase.co",ro="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imx3cGNwaXh0cmJjZGh2a3RmdmFzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTY2NTk5NTYsImV4cCI6MjAzMjIzNTk1Nn0.MY2A7T7t9DjfJhRNADoLukGlOfOsXvX3TryKOxI8XDI",gs=eo(to,ro);async function so(){try{const{data:n,error:e}=await gs.from("entries").select("*");return e?(console.error("Error fetching data:",e),null):n}catch(n){return console.error("Unexpected error:",n),null}}async function Vt(n,e){try{const{data:t,error:r}=await gs.from(e).insert(n);return r?(console.error("Error inserting data:",r),null):t}catch(t){return console.error("Unexpected error:",t),null}}function Ar(n,e,t){const r=n.slice();return r[12]=e[t],r[14]=t,r}function Or(n,e){let t,r=e[12].name+"",s,i=`url(${Oe}/assets/toploaders/${e[12].name}.png)`,o,a;function l(){return e[7](e[12])}return{key:n,first:null,c(){t=S("button"),s=V(r),this.h()},l(c){t=E(c,"BUTTON",{key:!0,class:!0});var u=j(t);s=x(u,r),u.forEach(p),this.h()},h(){_(t,"key",e[12]),_(t,"class","svelte-v34u9f"),oe(t,"active",e[0]==e[12].name),W(t,"--toploader-url",i),W(t,"--color-accent",e[5][e[14]]),this.first=t},m(c,u){P(c,t,u),w(t,s),o||(a=ke(t,"click",l),o=!0)},p(c,u){e=c,u&9&&oe(t,"active",e[0]==e[12].name)},d(c){c&&p(t),o=!1,a()}}}function no(n){let e,t,r="Which generation?",s,i,o,a=[],l=new Map,c,u,h,d,f=ee(n[3]);const v=g=>g[12];for(let g=0;gt(9,r=g)),ie(n,bt,g=>t(0,s=g)),ie(n,yt,g=>t(1,i=g)),ie(n,Mt,g=>t(10,o=g));let{artist:a}=e,l=[{id:0,name:"I don't know"},{id:1,name:"1st"},{id:2,name:"2nd"},{id:3,name:"3rd"},{id:4,name:"4th"},{id:5,name:"5th"}],[c,...u]=l;const h=g=>{Bt.set("currentArtistIndex",r+1);let m={artist_id:a.id,gen:g.id,user_id:o};Vt(m,"entries");let b;clearInterval(b),g.id?(we(yt,i=!0,i),we(bt,s=g.name,s),b=setTimeout(()=>{we(yt,i=!1,i),we(bt,s=void 0,s),we(rt,++r,r)},1e3)):we(rt,++r,r)},d=["#92BAFF","#84F881","#E05F89","#565656","#ECCA48"],f=g=>h(g),v=()=>h(c);return n.$$set=g=>{"artist"in g&&t(6,a=g.artist)},[s,i,c,u,h,d,a,f,v]}class oo extends ce{constructor(e){super(),ue(this,e,io,no,ae,{artist:6})}}function Ir(n,e,t){const r=n.slice();return r[8]=e[t],r}function jr(n){let e,t,r,s,i,o,a,l,c=n[8]+"",u,h,d,f,v;return{c(){e=S("div"),t=S("input"),o=G(),a=S("label"),l=S("div"),u=V(c),this.h()},l(g){e=E(g,"DIV",{class:!0});var m=j(e);t=E(m,"INPUT",{type:!0,id:!0,name:!0,"aria-labelledby":!0,class:!0}),o=H(m),a=E(m,"LABEL",{for:!0,id:!0,class:!0});var b=j(a);l=E(b,"DIV",{class:!0});var k=j(l);u=x(k,c),k.forEach(p),b.forEach(p),m.forEach(p),this.h()},h(){_(t,"type","checkbox"),_(t,"id",r=n[8]),_(t,"name","factor"),t.value=s=n[8],_(t,"aria-labelledby",i=`label-${n[8]}`),_(t,"class","svelte-1dbz5sc"),_(l,"class","factor-label svelte-1dbz5sc"),_(a,"for",h=n[8]),_(a,"id",d=`label-${n[8]}`),_(a,"class","checkbox-label svelte-1dbz5sc"),_(e,"class","round svelte-1dbz5sc")},m(g,m){P(g,e,m),w(e,t),w(e,o),w(e,a),w(a,l),w(l,u),f||(v=ke(t,"change",n[1]),f=!0)},p(g,m){m&1&&r!==(r=g[8])&&_(t,"id",r),m&1&&s!==(s=g[8])&&(t.value=s),m&1&&i!==(i=`label-${g[8]}`)&&_(t,"aria-labelledby",i),m&1&&c!==(c=g[8]+"")&&fe(u,c),m&1&&h!==(h=g[8])&&_(a,"for",h),m&1&&d!==(d=`label-${g[8]}`)&&_(a,"id",d)},d(g){g&&p(e),f=!1,v()}}}function ao(n){let e,t,r=n[0].title+"",s,i,o,a=n[0].text+"",l,c,u,h,d,f,v=ee(n[0].factors),g=[];for(let m=0;mt(6,r=h)),ie(n,Mt,h=>t(7,s=h));let{arrowStroke:i="rgba(120, 120, 120, 1)"}=e,{arrowStrokeWidth:o="3"}=e,{selectedFactors:a=[]}=e,{copy:l}=e;function c(h){const d=h.target.value;h.target.checked?a.length<3?t(3,a=[...a,d]):h.target.checked=!1:t(3,a=a.filter(f=>f!==d))}function u(){let h={user_id:s,response:a.join(";")};Vt(h,"survey"),Bt.set("surveyComplete",!0),we(Le,r="results",r)}return n.$$set=h=>{"arrowStroke"in h&&t(4,i=h.arrowStroke),"arrowStrokeWidth"in h&&t(5,o=h.arrowStrokeWidth),"selectedFactors"in h&&t(3,a=h.selectedFactors),"copy"in h&&t(0,l=h.copy)},[l,c,u,a,i,o]}class co extends ce{constructor(e){super(),ue(this,e,lo,ao,ae,{arrowStroke:4,arrowStrokeWidth:5,selectedFactors:3,copy:0})}}function uo(n,e){var t=parseInt(n.substring(1,3),16),r=parseInt(n.substring(3,5),16),s=parseInt(n.substring(5,7),16);t=parseInt(t*(100+e)/100),r=parseInt(r*(100+e)/100),s=parseInt(s*(100+e)/100),t=t<255?t:255,r=r<255?r:255,s=s<255?s:255,t=Math.round(t),r=Math.round(r),s=Math.round(s);var i=t.toString(16).length==1?"0"+t.toString(16):t.toString(16),o=r.toString(16).length==1?"0"+r.toString(16):r.toString(16),a=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+i+o+a}function Pr(n,e,t){const r=n.slice();return r[15]=e[t],r}function Rr(n,e,t){var l,c;const r=n.slice();r[18]=e[t],r[24]=t;const s=r[6][r[15].id];r[19]=s;const i=Number((l=r[19])==null?void 0:l[r[18]])||0;r[20]=i;const o=r[10][r[24]];r[21]=o;const a=((c=r[19])==null?void 0:c.highestGen)==r[18];return r[22]=a,r}function ho(n){let e;return{c(){e=V("Submit")},l(t){e=x(t,"Submit")},m(t,r){P(t,e,r)},d(t){t&&p(e)}}}function fo(n){let e;return{c(){e=V("Thank you!")},l(t){e=x(t,"Thank you!")},m(t,r){P(t,e,r)},d(t){t&&p(e)}}}function _o(n){let e,t,r;return t=new on({props:{color:"#000",strokeWidth:n[1]}}),{c(){e=V(`Show survey results + `),te(t.$$.fragment)},l(s){e=x(s,`Show survey results + `),re(t.$$.fragment,s)},m(s,i){P(s,e,i),se(t,s,i),r=!0},p(s,i){const o={};i&2&&(o.strokeWidth=s[1]),t.$set(o)},i(s){r||(A(t.$$.fragment,s),r=!0)},o(s){R(t.$$.fragment,s),r=!1},d(s){s&&p(e),ne(t,s)}}}function go(n){let e,t,r;return t=new hn({props:{color:"#000",strokeWidth:n[1]}}),{c(){e=V(`Hide survey results + `),te(t.$$.fragment)},l(s){e=x(s,`Hide survey results + `),re(t.$$.fragment,s)},m(s,i){P(s,e,i),se(t,s,i),r=!0},p(s,i){const o={};i&2&&(o.strokeWidth=s[1]),t.$set(o)},i(s){r||(A(t.$$.fragment,s),r=!0)},o(s){R(t.$$.fragment,s),r=!1},d(s){s&&p(e),ne(t,s)}}}function Cr(n){let e,t,r,s,i=ee(n[0]),o=[];for(let a=0;a{s&&(r&&r.end(1),t=Zr(e,sr,{}),t.start())}),s=!0)},o(a){t&&t.invalidate(),a&&(r=Es(e,sr,{})),s=!1},d(a){a&&p(e),Ie(o,a),a&&r&&r.end()}}}function Lr(n){let e,t=n[18]&&mo(n);return{c(){e=S("span"),t&&t.c(),this.h()},l(r){e=E(r,"SPAN",{class:!0});var s=j(e);t&&t.l(s),s.forEach(p),this.h()},h(){_(e,"class","svelte-nc345f"),oe(e,"isLargest",n[22])},m(r,s){P(r,e,s),t&&t.m(e,null)},p(r,s){r[18]&&t.p(r,s),s&321&&oe(e,"isLargest",r[22])},d(r){r&&p(e),t&&t.d()}}}function mo(n){let e=n[9][n[24]]+"",t,r,s=n[22]&&Dr(n);return{c(){t=V(e),s&&s.c(),r=Q()},l(i){t=x(i,e),s&&s.l(i),r=Q()},m(i,o){P(i,t,o),s&&s.m(i,o),P(i,r,o)},p(i,o){i[22]?s?s.p(i,o):(s=Dr(i),s.c(),s.m(r.parentNode,r)):s&&(s.d(1),s=null)},d(i){i&&(p(t),p(r)),s&&s.d(i)}}}function Dr(n){let e,t=n[20].toFixed(0)+"",r,s;return{c(){e=V(" gen ("),r=V(t),s=V("%)")},l(i){e=x(i," gen ("),r=x(i,t),s=x(i,"%)")},m(i,o){P(i,e,o),P(i,r,o),P(i,s,o)},p(i,o){o&65&&t!==(t=i[20].toFixed(0)+"")&&fe(r,t)},d(i){i&&(p(e),p(r),p(s))}}}function Nr(n){let e,t,r,s=`${n[20]}%`,i=n[20]>10&&Lr(n);return{c(){e=S("div"),i&&i.c(),t=G(),this.h()},l(o){e=E(o,"DIV",{class:!0,"data-percentage":!0});var a=j(e);i&&i.l(a),t=H(a),a.forEach(p),this.h()},h(){_(e,"class","cell gen-"+n[18]+" svelte-nc345f"),_(e,"data-percentage",r=n[20]+"%"),W(e,"--width",s),W(e,"--color",uo(n[21],-40)),W(e,"--bg",n[21])},m(o,a){P(o,e,a),i&&i.m(e,null),w(e,t)},p(o,a){o[20]>10?i?i.p(o,a):(i=Lr(o),i.c(),i.m(e,t)):i&&(i.d(1),i=null),a&65&&r!==(r=o[20]+"%")&&_(e,"data-percentage",r),a&65&&s!==(s=`${o[20]}%`)&&W(e,"--width",s)},d(o){o&&p(e),i&&i.d()}}}function Ur(n){let e,t,r=n[15].name+"",s,i,o,a,l=ee(n[8]),c=[];for(let u=0;u{ve[Ee]=null}),pe(),b=ve[m],b?b.p($,B):(b=ve[m]=Xe[m]($),b.c()),A(b,1),b.m(g,null)),$[5]?Z?(Z.p($,B),B&32&&A(Z,1)):(Z=Cr($),Z.c(),A(Z,1),Z.m(e,O)):Z&&(me(),R(Z,1,1,()=>{Z=null}),pe()),(!K||B&4)&&z!==(z=$[2].methodology+"")&&fe(J,z)},i($){K||(A(b),A(Z),K=!0)},o($){R(b),R(Z),K=!1},d($){$&&p(e),de.d(),ve[m].d(),Z&&Z.d(),Y=!1,Yr(L)}}}function $r(n,e){return n.reduce(function(t,r){return(t[r[e]]=t[r[e]]||[]).push(r),t},{})}function vo(n,e,t){let r;ie(n,Mt,k=>t(14,r=k));let{artists:s}=e,{arrowStroke:i="rgba(120, 120, 120, 1)"}=e,{arrowStrokeWidth:o="3"}=e,{copy:a}=e,l="",c=!1;const u=k=>{k.preventDefault(),Vt({user_id:r,email:l},"emails"),t(4,c=!0)};let h=!1,d={};kt(async()=>{let k=await so(),O=$r(k,"artist_id");Object.entries(O).map(([T,y])=>{let D=$r(y,"gen"),N=y.length,F={},z,J=0;Object.entries(D).forEach(([K,Y])=>{let I=(Y.length/N*100).toFixed(2);F[K]=I,I>J&&(z=K,J=I)}),t(6,d[T]={...F,highestGen:z},d)})});let f=[1,2,3,4,5,0],v=["1st","2nd","3rd","4th","5th","IDK"],g=["#e0afff","#f0d9ff","#e2dd9c","#688f8a","#a1c588","#dddddd"];function m(){l=this.value,t(3,l)}const b=()=>t(5,h=!h);return n.$$set=k=>{"artists"in k&&t(0,s=k.artists),"arrowStroke"in k&&t(11,i=k.arrowStroke),"arrowStrokeWidth"in k&&t(1,o=k.arrowStrokeWidth),"copy"in k&&t(2,a=k.copy)},[s,o,a,l,c,h,d,u,f,v,g,i,m,b]}class yo extends ce{constructor(e){super(),ue(this,e,vo,po,ae,{artists:0,arrowStroke:11,arrowStrokeWidth:1,copy:2})}}function bo(n){let e,t;return e=new yo({props:{artists:n[1],copy:n[2].results}}),{c(){te(e.$$.fragment)},l(r){re(e.$$.fragment,r)},m(r,s){se(e,r,s),t=!0},p(r,s){const i={};s&2&&(i.artists=r[1]),s&4&&(i.copy=r[2].results),e.$set(i)},i(r){t||(A(e.$$.fragment,r),t=!0)},o(r){R(e.$$.fragment,r),t=!1},d(r){ne(e,r)}}}function wo(n){let e,t,r;function s(o){n[7](o)}let i={copy:n[2].survey};return n[4]!==void 0&&(i.selectedFactors=n[4]),e=new co({props:i}),it.push(()=>es(e,"selectedFactors",s)),{c(){te(e.$$.fragment)},l(o){re(e.$$.fragment,o)},m(o,a){se(e,o,a),r=!0},p(o,a){const l={};a&4&&(l.copy=o[2].survey),!t&&a&16&&(t=!0,l.selectedFactors=o[4],Qr(()=>t=!1)),e.$set(l)},i(o){r||(A(e.$$.fragment,o),r=!0)},o(o){R(e.$$.fragment,o),r=!1},d(o){ne(e,o)}}}function ko(n){let e,t,r,s,i,o;return e=new en({props:{maxArtistIndex:n[1].length}}),r=new yn({props:{artist:n[5]}}),i=new oo({props:{artist:n[5]}}),{c(){te(e.$$.fragment),t=G(),te(r.$$.fragment),s=G(),te(i.$$.fragment)},l(a){re(e.$$.fragment,a),t=H(a),re(r.$$.fragment,a),s=H(a),re(i.$$.fragment,a)},m(a,l){se(e,a,l),P(a,t,l),se(r,a,l),P(a,s,l),se(i,a,l),o=!0},p(a,l){const c={};l&2&&(c.maxArtistIndex=a[1].length),e.$set(c);const u={};l&32&&(u.artist=a[5]),r.$set(u);const h={};l&32&&(h.artist=a[5]),i.$set(h)},i(a){o||(A(e.$$.fragment,a),A(r.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){R(e.$$.fragment,a),R(r.$$.fragment,a),R(i.$$.fragment,a),o=!1},d(a){a&&(p(t),p(s)),ne(e,a),ne(r,a),ne(i,a)}}}function So(n){let e,t,r,s;const i=[ko,wo,bo],o=[];function a(l,c){return l[3]=="voting"?0:l[3]=="survey"?1:l[3]=="results"?2:-1}return~(t=a(n))&&(r=o[t]=i[t](n)),{c(){e=S("section"),r&&r.c(),this.h()},l(l){e=E(l,"SECTION",{class:!0});var c=j(e);r&&r.l(c),c.forEach(p),this.h()},h(){_(e,"class","board svelte-d12z7e"),oe(e,"experienceStarted",n[0]),W(e,"--justify-content",n[3]=="voting"?"space-between":"center")},m(l,c){P(l,e,c),~t&&o[t].m(e,null),s=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&o[t].p(l,c):(r&&(me(),R(o[u],1,1,()=>{o[u]=null}),pe()),~t?(r=o[t],r?r.p(l,c):(r=o[t]=i[t](l),r.c()),A(r,1),r.m(e,null)):r=null),(!s||c&1)&&oe(e,"experienceStarted",l[0]),c&8&&W(e,"--justify-content",l[3]=="voting"?"space-between":"center")},i(l){s||(A(r),s=!0)},o(l){R(r),s=!1},d(l){l&&p(e),~t&&o[t].d()}}}function Eo(n,e,t){let r,s,i;ie(n,Le,h=>t(3,s=h)),ie(n,rt,h=>t(6,i=h));let{experienceStarted:o}=e,{artists:a}=e,{copy:l}=e,c=[];we(Le,s="voting",s);function u(h){c=h,t(4,c)}return n.$$set=h=>{"experienceStarted"in h&&t(0,o=h.experienceStarted),"artists"in h&&t(1,a=h.artists),"copy"in h&&t(2,l=h.copy)},n.$$.update=()=>{n.$$.dirty&66&&t(5,r=a==null?void 0:a[i]),n.$$.dirty&74&&i>a.length-1&&s=="voting"&&we(Le,s="survey",s),n.$$.dirty&66&&i>a.length-1&&Bt.get("surveyComplete")&&we(Le,s="results",s)},[o,a,l,s,c,r,i,u]}class To extends ce{constructor(e){super(),ue(this,e,Eo,So,ae,{experienceStarted:0,artists:1,copy:2})}}function Fr(n,e,t){const r=n.slice();r[11]=e[t].type,r[12]=e[t].value,r[13]=e[t].component,r[16]=t;const s=r[16]==r[2];return r[14]=s,r}function Mr(n,e,t){const r=n.slice();return r[17]=e[t],r}function Br(n,e,t){const r=n.slice();return r[20]=e[t],r}function zr(n){let e,t;return{c(){e=S("link"),this.h()},l(r){e=E(r,"LINK",{rel:!0,as:!0,href:!0}),this.h()},h(){_(e,"rel","preload"),_(e,"as","image"),_(e,"href",t=n[20])},m(r,s){P(r,e,s)},p(r,s){s&16&&t!==(t=r[20])&&_(e,"href",t)},d(r){r&&p(e)}}}function qr(n){let e,t,r,s,i=n[6].indexOf(n[2])==-1,o;function a(u){n[9](u)}let l={duration:"0",$$slots:{default:[jo]},$$scope:{ctx:n}};n[2]!==void 0&&(l.current=n[2]),t=new $s({props:l}),n[8](t),it.push(()=>es(t,"current",a));let c=i&&Kr(n);return{c(){e=S("article"),te(t.$$.fragment),s=G(),c&&c.c(),this.h()},l(u){e=E(u,"ARTICLE",{class:!0});var h=j(e);re(t.$$.fragment,h),s=H(h),c&&c.l(h),h.forEach(p),this.h()},h(){_(e,"class","svelte-rqsfvk"),W(e,"--height",n[5]=="results"?"100%":"100svh")},m(u,h){P(u,e,h),se(t,e,null),w(e,s),c&&c.m(e,null),o=!0},p(u,h){const d={};h&8388613&&(d.$$scope={dirty:h,ctx:u}),!r&&h&4&&(r=!0,d.current=u[2],Qr(()=>r=!1)),t.$set(d),h&4&&(i=u[6].indexOf(u[2])==-1),i?c?(c.p(u,h),h&4&&A(c,1)):(c=Kr(u),c.c(),A(c,1),c.m(e,null)):c&&(me(),R(c,1,1,()=>{c=null}),pe()),h&32&&W(e,"--height",u[5]=="results"?"100%":"100svh")},i(u){o||(A(t.$$.fragment,u),A(c),o=!0)},o(u){R(t.$$.fragment,u),R(c),o=!1},d(u){u&&p(e),n[8](null),ne(t),c&&c.d()}}}function Ao(n){let e,t,r=n[14]&&Gr(n);return{c(){r&&r.c(),e=Q()},l(s){r&&r.l(s),e=Q()},m(s,i){r&&r.m(s,i),P(s,e,i),t=!0},p(s,i){s[14]?r?(r.p(s,i),i&4&&A(r,1)):(r=Gr(s),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(me(),R(r,1,1,()=>{r=null}),pe())},i(s){t||(A(r),t=!0)},o(s){R(r),t=!1},d(s){s&&p(e),r&&r.d(s)}}}function Oo(n){let e,t=ee(n[12]),r=[];for(let s=0;s{o&&(i||(i=Zt(e,rr,{y:20,duration:500},!0)),i.run(1))}),o=!0)},o(a){a&&(i||(i=Zt(e,rr,{y:20,duration:500},!1)),i.run(0)),o=!1},d(a){a&&p(e),a&&i&&i.end()}}}function Wr(n){let e,t=n[14]&&Hr(n);return{c(){t&&t.c(),e=Q()},l(r){t&&t.l(r),e=Q()},m(r,s){t&&t.m(r,s),P(r,e,s)},p(r,s){r[14]?t?(t.p(r,s),s&4&&A(t,1)):(t=Hr(r),t.c(),A(t,1),t.m(e.parentNode,e)):t&&(me(),R(t,1,1,()=>{t=null}),pe())},d(r){r&&p(e),t&&t.d(r)}}}function Io(n){let e,t,r,s;const i=[Oo,Ao],o=[];function a(l,c){return l[11]==="section"?0:l[11]=="voting"?1:-1}return~(e=a(n))&&(t=o[e]=i[e](n)),{c(){t&&t.c(),r=G()},l(l){t&&t.l(l),r=H(l)},m(l,c){~e&&o[e].m(l,c),P(l,r,c),s=!0},p(l,c){t&&t.p(l,c)},i(l){s||(A(t),s=!0)},o(l){R(t),s=!1},d(l){l&&p(r),~e&&o[e].d(l)}}}function Jr(n,e){let t,r,s;return r=new zs({props:{index:e[16],cls:e[11]=="voting"?"":"vertical-center",$$slots:{default:[Io]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Q(),te(r.$$.fragment),this.h()},l(i){t=Q(),re(r.$$.fragment,i),this.h()},h(){this.first=t},m(i,o){P(i,t,o),se(r,i,o),s=!0},p(i,o){e=i;const a={};o&8388613&&(a.$$scope={dirty:o,ctx:e}),r.$set(a)},i(i){s||(A(r.$$.fragment,i),s=!0)},o(i){R(r.$$.fragment,i),s=!1},d(i){i&&p(t),ne(r,i)}}}function jo(n){let e=[],t=new Map,r,s,i=ee(ot.body.index||[]);const o=a=>a[16];for(let a=0;a{a=null}),pe())},i(l){s||(A(a),s=!0)},o(l){R(a),s=!1},d(l){l&&(p(t),p(r)),Ie(o,l),p(e),a&&a.d(l)}}}let Ro=!1;function Co(n,e,t){let r;ie(n,Le,f=>t(5,r=f));let{artists:s}=e,i,o=0,a=[2],l=!1;const c=({detail:f})=>{f==="right"?i.next():i.prev(),window.scrollTo(0,0)};kt(async()=>{t(3,l=!0)});let u=[1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36].map(f=>`${Oe}/assets/images/${f}.jpg`);u=[...u,...["1st","2nd","3rd","4th","5th"].map(f=>`${Oe}/assets/toploaders/${f}.png`)];function h(f){it[f?"unshift":"push"](()=>{i=f,t(1,i)})}function d(f){o=f,t(2,o)}return n.$$set=f=>{"artists"in f&&t(0,s=f.artists)},[s,i,o,l,u,r,a,c,h,d]}class Lo extends ce{constructor(e){super(),ue(this,e,Co,Po,ae,{artists:0})}}function Do(){console.log("--- --- --- --- --- ---"),console.log("svelte-starter: 5.17.0"),console.log("build: 2024-09-27-12:32"),console.log("--- --- --- --- --- ---")}const ms=[{name:"Seo Taiji & Kids (서태지와 아이들)",id:"1","debut year":"1992",company:"",song:"Come Back Home",media_url:""},{name:"TVXQ! (동방신기)",id:"2","debut year":"2003",company:"SM",song:"Mirotic (주문)",media_url:""},{name:"BIGBANG",id:"3","debut year":"2006",company:"YG",song:"BANG BANG BANG",media_url:""},{name:"Girls' Generation (소녀시대)",id:"4","debut year":"2007",company:"SM",song:"Gee",media_url:""},{name:"Wonder Girls",id:"5","debut year":"2007",company:"JYP",song:"Tell Me",media_url:""},{name:"2PM",id:"6","debut year":"2008",company:"JYP",song:"My House (우리집)",media_url:""},{name:"SHINee",id:"7","debut year":"2008",company:"SM",song:"Replay (누난 너무 예뻐)",media_url:""},{name:"2NE1",id:"8","debut year":"2009",company:"YG",song:"I AM THE BEST (내가 제일 잘 나가)",media_url:""},{name:"f(x)",id:"9","debut year":"2009",company:"SM",song:"4 Walls",media_url:""},{name:"EXO",id:"11","debut year":"2012",company:"SM",song:"Love Shot",media_url:""},{name:"BTS (방탄소년단)",id:"12","debut year":"2013",company:"Big Hit (now HYBE)",song:"Dynamite",media_url:""},{name:"GOT7",id:"13","debut year":"2014",company:"JYP",song:"You Calling My Name (니가 부르는 나의 이름)",media_url:""},{name:"Red Velvet",id:"14","debut year":"2014",company:"SM",song:"Psycho",media_url:""},{name:"WINNER",id:"15","debut year":"2014",company:"YG",song:"REALLY REALLY",media_url:""},{name:"SEVENTEEN",id:"16","debut year":"2015",company:"Pledis (now HYBE)",song:"Super (손오공)",media_url:""},{name:"TWICE",id:"17","debut year":"2015",company:"JYP",song:"FANCY",media_url:""},{name:"NCT",id:"18","debut year":"2016",company:"SM",song:"Love Talk (English ver by WayV)",media_url:""},{name:"BLACKPINK",id:"19","debut year":"2016",company:"YG",song:"How You Like That",media_url:""},{name:"Stray Kids",id:"20","debut year":"2018",company:"JYP",song:"God's Menu (神메뉴)",media_url:""},{name:"(G)I-DLE ((여자)아이들)",id:"21","debut year":"2018",company:"Cube",song:"Queencard (퀸카)",media_url:""},{name:"ITZY",id:"22","debut year":"2019",company:"JYP",song:"WANNABE",media_url:""},{name:"TXT (TOMORROW X TOGETHER)",id:"23","debut year":"2019",company:"Big Hit (now HYBE)",song:"0X1=LOVESONG (I Know I Love You) feat. Seori",media_url:""},{name:"TREASURE",id:"24","debut year":"2020",company:"YG",song:"DARARI",media_url:""},{name:"aespa",id:"25","debut year":"2020",company:"SM",song:"Next Level",media_url:""},{name:"ENHYPEN",id:"26","debut year":"2020",company:"Belift Lab (HYBE)",song:"FEVER",media_url:""},{name:"IVE",id:"27","debut year":"2021",company:"Starship",song:"LOVE DIVE",media_url:""},{name:"NMIXX",id:"28","debut year":"2022",company:"JYP",song:"O.O",media_url:""},{name:"LE SSERAFIM",id:"29","debut year":"2022",company:"Source Music (now HYBE)",song:"ANTIFRAGILE",media_url:""},{name:"NewJeans",id:"30","debut year":"2022",company:"ADOR (HYBE)",song:"OMG",media_url:""},{name:"ZEROBASEONE",id:"31","debut year":"2023",company:"WakeOne (Boys Planet)",song:"In Bloom",media_url:""},{name:"RIIZE",id:"32","debut year":"2023",company:"SM",song:"Get A Guitar",media_url:""},{name:"BABYMONSTER",id:"33","debut year":"2023",company:"YG",song:"SHEESH",media_url:""},{name:"TWS (투어스)",id:"34","debut year":"2024",company:"Pledis (now HYBE)",song:"plot twist (첫 만남은 계획대로 되지 않아)",media_url:""},{name:"ILLIT",id:"35","debut year":"2024",company:"Belift Lab (HYBE)",song:"Magnetic",media_url:""},{name:"KATSEYE",id:"36","debut year":"2024",company:"HYBE x Geffen",song:"Touch",media_url:""}];function Vr(n){let e,t;return e=new Lo({props:{artists:ms}}),{c(){te(e.$$.fragment)},l(r){re(e.$$.fragment,r)},m(r,s){se(e,r,s),t=!0},i(r){t||(A(e.$$.fragment,r),t=!0)},o(r){R(e.$$.fragment,r),t=!1},d(r){ne(e,r)}}}function No(n){let e,t,r,s;e=new js({props:{title:n[2],description:n[3],url:n[4],preloadFont:n[1]}});let i=n[0]&&Vr();return{c(){te(e.$$.fragment),t=G(),i&&i.c(),r=Q()},l(o){re(e.$$.fragment,o),t=H(o),i&&i.l(o),r=Q()},m(o,a){se(e,o,a),P(o,t,a),i&&i.m(o,a),P(o,r,a),s=!0},p(o,[a]){o[0]?i?a&1&&A(i,1):(i=Vr(),i.c(),A(i,1),i.m(r.parentNode,r)):i&&(me(),R(i,1,1,()=>{i=null}),pe())},i(o){s||(A(e.$$.fragment,o),A(i),s=!0)},o(o){R(e.$$.fragment,o),R(i),s=!1},d(o){o&&(p(t),p(r)),ne(e,o),i&&i.d(o)}}}function Uo(n,e,t){let{data:r}=e,s=!1;Do();const i=["https://pudding.cool/assets/fonts/tiempos/TiemposTextWeb-Regular.woff2","https://pudding.cool/assets/fonts/tiempos/TiemposTextWeb-Bold.woff2","https://pudding.cool/assets/fonts/national/National2Web-Regular.woff2","https://pudding.cool/assets/fonts/national/National2Web-Bold.woff2"],{title:o,description:a,url:l}=ot.meta;return Dt("copy",ot),Dt("data",r.data),kt(()=>{ms.forEach(c=>{c.artistId=c.id}),t(0,s=!0)}),n.$$set=c=>{"data"in c&&t(5,r=c.data)},[s,i,o,a,l,r]}class Go extends ce{constructor(e){super(),ue(this,e,Uo,No,ae,{data:5})}}export{Go as component}; diff --git a/docs/_app/immutable/nodes/2.gPgV5pLt.js b/docs/_app/immutable/nodes/2.gPgV5pLt.js deleted file mode 100644 index aa47df1..0000000 --- a/docs/_app/immutable/nodes/2.gPgV5pLt.js +++ /dev/null @@ -1,22 +0,0 @@ -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["../chunks/browser.DL7QZ5YJ.js","../chunks/misc.xcXs522S.js","../chunks/index.DPQoaniF.js","../chunks/scheduler.D0S_xIN3.js","../chunks/index.BP0khYr0.js"] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -} -import{s as ae,e as S,k as Q,Z as xs,c as E,d as p,p as _,f as w,n as le,S as Ie,i as P,_ as Yt,D as pr,U as lt,a as j,B as ct,$ as vr,V as ut,W as ht,X as dt,o as kt,a0 as Dt,r as it,a1 as oe,q as W,a2 as yr,A as St,a3 as br,h as ie,a4 as Se,a5 as We,a6 as Je,a7 as wt,a8 as Xt,a9 as Ke,t as V,b as x,aa as ke,g as fe,w as Ys,ab as wr,j as G,l as H,R as Xs,Y as we,ac as Qt,ad as Qs,P as kr,Q as Sr}from"../chunks/scheduler.D0S_xIN3.js";import{S as ce,i as ue,a as A,t as R,g as me,c as pe,b as te,d as se,m as re,e as ne,f as Zs,h as Er,j as er,k as Zt}from"../chunks/index.DPQoaniF.js";import{e as ee,c as st,i as yt,t as bt,a as tr,d as Tr,u as Mt,l as Bt,s as Le,o as Ar}from"../chunks/misc.xcXs522S.js";import{b as Oe}from"../chunks/paths.xXzRRGsB.js";import{w as Ze}from"../chunks/index.BP0khYr0.js";import{_ as Ve}from"../chunks/preload-helper.BQ24v_F8.js";function Et(n,e){const t={},s={},r={$$scope:1};let i=n.length;for(;i--;){const o=n[i],a=e[i];if(a){for(const l in o)l in a||(s[l]=1);for(const l in a)r[l]||(t[l]=a[l],r[l]=1);n[i]=a}else for(const l in o)r[l]=1}for(const o in s)o in t||(t[o]=void 0);return t}function sr(n){return typeof n=="object"&&n!==null?n:{}}function es(n,e,t){const s=n.slice();return s[5]=e[t],s}function ts(n){let e,t;return{c(){e=S("link"),this.h()},l(s){e=E(s,"LINK",{rel:!0,href:!0,as:!0,type:!0,crossorigin:!0}),this.h()},h(){_(e,"rel","preload"),_(e,"href",t=n[5]),_(e,"as","font"),_(e,"type","font/woff2"),_(e,"crossorigin","")},m(s,r){P(s,e,r)},p(s,r){r&16&&t!==(t=s[5])&&_(e,"href",t)},d(s){s&&p(e)}}}function Or(n){let e,t,s,r,i,o,a,l,c,u,h,d,f,v,g,m,b,k,O,T,y,D,N,F,z,J;document.title=e=n[0];let K=ee(n[4]),Y=[];for(let L=0;L{"title"in l&&t(0,s=l.title),"description"in l&&t(1,r=l.description),"url"in l&&t(2,i=l.url),"keywords"in l&&t(3,o=l.keywords),"preloadFont"in l&&t(4,a=l.preloadFont)},[s,r,i,o,a]}class jr extends ce{constructor(e){super(),ue(this,e,Ir,Or,ae,{title:0,description:1,url:2,keywords:3,preloadFont:4})}}function rr(n){const e=n-1;return e*e*e+1}function Pr(n,{delay:e=0,duration:t=400,easing:s=pr}={}){const r=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:s,css:i=>`opacity: ${i*r}`}}function ss(n,{delay:e=0,duration:t=400,easing:s=rr,x:r=0,y:i=0,opacity:o=0}={}){const a=getComputedStyle(n),l=+a.opacity,c=a.transform==="none"?"":a.transform,u=l*(1-o),[h,d]=Yt(r),[f,v]=Yt(i);return{delay:e,duration:t,easing:s,css:(g,m)=>` - transform: ${c} translate(${(1-g)*h}${d}, ${(1-g)*f}${v}); - opacity: ${l-u*m}`}}function rs(n,{delay:e=0,duration:t=400,easing:s=rr,axis:r="y"}={}){const i=getComputedStyle(n),o=+i.opacity,a=r==="y"?"height":"width",l=parseFloat(i[a]),c=r==="y"?["top","bottom"]:["left","right"],u=c.map(b=>`${b[0].toUpperCase()}${b.slice(1)}`),h=parseFloat(i[`padding${u[0]}`]),d=parseFloat(i[`padding${u[1]}`]),f=parseFloat(i[`margin${u[0]}`]),v=parseFloat(i[`margin${u[1]}`]),g=parseFloat(i[`border${u[0]}Width`]),m=parseFloat(i[`border${u[1]}Width`]);return{delay:e,duration:t,easing:s,css:b=>`overflow: hidden;opacity: ${Math.min(b*20,1)*o};${a}: ${b*l}px;padding-${c[0]}: ${b*h}px;padding-${c[1]}: ${b*d}px;margin-${c[0]}: ${b*f}px;margin-${c[1]}: ${b*v}px;border-${c[0]}-width: ${b*g}px;border-${c[1]}-width: ${b*m}px;`}}const Rr={title:"Defining Generations in K-pop",description:"We want fans to have the opportunity to vote and determine the answers.",url:"https://pudding.cool/2024/09/kpop-survey/"},Cr={index:[{type:"section",value:[{type:"text",value:"This is an experiment to define K-pop generations."}]},{type:"section",value:[{type:"text",value:"We want fans to have the opportunity to vote and determine the answers."}]},{type:"voting",value:{}}]},Lr={title:"In your opinion, which of the following factors are most relevant in defining a generation?",text:"Select up to 3.",factors:["Debut year","Peak active periods","Association with other groups","Length of contracts","Member age ranges","Member racial diversity","Member positions (or lack thereof)","Fashion trends","Music genre trends","Promotion models","Fan interaction models","Influence on industry","Target audience","Makeup of fanbase","Other"]},Dr={title:"Thank you for submitting the survey",text:"We're looking for K-pop fans to interview for part 2. Drop your email if text: you're interested in keeping in touch.",methodology:"The Kpop groups present in this survey are big 4 company debuts and smaller company groups that were nominated for MAMA Artist of the Year since 2018. To make the survey more digestible, we further narrowed the list by removing groups who debuted at similar times to another group in the same company (e.g. WINNER and iKON)."},ot={meta:Rr,body:Cr,survey:Lr,results:Dr};function Nr(n){let e,t,s,r,i;const o=n[26].default,a=lt(o,n,n[25],null);return{c(){e=S("section"),t=S("div"),a&&a.c(),this.h()},l(l){e=E(l,"SECTION",{"aria-label":!0,class:!0});var c=j(e);t=E(c,"DIV",{class:!0,style:!0});var u=j(t);a&&a.l(u),u.forEach(p),c.forEach(p),this.h()},h(){_(t,"class","slides svelte-1ceqw5z"),_(t,"style",n[5]),_(e,"aria-label","carousel"),_(e,"class",s="slider "+n[0]+" svelte-1ceqw5z"),ct(()=>n[29].call(e))},m(l,c){P(l,e,c),w(e,t),a&&a.m(t,null),n[27](t),n[28](e),r=vr(e,n[29].bind(e)),i=!0},p(l,c){a&&a.p&&(!i||c[0]&33554432)&&ut(a,o,l,l[25],i?dt(o,l[25],c,null):ht(l[25]),null),(!i||c[0]&32)&&_(t,"style",l[5]),(!i||c[0]&1&&s!==(s="slider "+l[0]+" svelte-1ceqw5z"))&&_(e,"class",s)},i(l){i||(A(a,l),i=!0)},o(l){R(a,l),i=!1},d(l){l&&p(e),a&&a.d(l),n[27](null),n[28](null),r()}}}function Ur(n,e,t){let s,r,i,o,a,l,c,u,h,d,f,{$$slots:v={},$$scope:g}=e,{direction:m="horizontal"}=e,{duration:b="500ms"}=e,{timing:k="ease"}=e,{count:O=0}=e,{current:T=0}=e;const y=()=>$(1),D=()=>$(-1),N=q=>$(q,!0);let F=0,z=0,J,K,Y=!1,L,I,M,de=Ze(),Xe=Ze(),ve=Ze(),Qe=Ze(),Z=Ze();const $=(q,gt)=>{if(!Y)return!1;const Ue=gt?q:z+q;t(14,z=Math.max(0,Math.min(F-1,Ue))),t(6,T=z)},B=q=>{Y=q[0].isIntersecting};kt(()=>{t(13,F=I.children.length),t(7,O=F),Z.set(O),M=new IntersectionObserver(B,{root:null,rootMargin:"-1px"}),M.observe(L),t(2,K),t(1,J)});function Ee(q){it[q?"unshift":"push"](()=>{I=q,t(4,I)})}function _t(q){it[q?"unshift":"push"](()=>{L=q,t(3,L)})}function Ne(){J=this.clientWidth,K=this.clientHeight,t(1,J),t(2,K)}return n.$$set=q=>{"direction"in q&&t(0,m=q.direction),"duration"in q&&t(8,b=q.duration),"timing"in q&&t(9,k=q.timing),"count"in q&&t(7,O=q.count),"current"in q&&t(6,T=q.current),"$$scope"in q&&t(25,g=q.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&8195&&t(24,s=m==="horizontal"?`${F*J}px`:"100%"),n.$$.dirty[0]&8197&&t(23,r=m==="vertical"?`${F*K}px`:"100%"),n.$$.dirty[0]&16387&&t(22,i=m==="horizontal"?`${z*J*-1}px`:0),n.$$.dirty[0]&16389&&t(21,o=m==="vertical"?`${z*K*-1}px`:0),n.$$.dirty[0]&16777216&&t(20,a=`width: ${s};`),n.$$.dirty[0]&8388608&&t(19,l=`height: ${r};`),n.$$.dirty[0]&6291456&&t(18,c=`transform: translate3d(${i}, ${o}, 0);`),n.$$.dirty[0]&256&&t(17,u=`transition-duration: ${b};`),n.$$.dirty[0]&512&&t(16,h=`transition-timing-function: ${k};`),n.$$.dirty[0]&2031616&&t(5,d=`${a} ${l} ${c} ${u} ${h}`),n.$$.dirty[0]&1&&de.set(m),n.$$.dirty[0]&2&&Xe.set(J),n.$$.dirty[0]&4&&ve.set(K),n.$$.dirty[0]&64&&Qe.set(T),n.$$.dirty[0]&32768&&Dt("Slider",f)},t(15,f={dir:de,cur:Qe,w:Xe,h:ve,count:Z}),[m,J,K,L,I,d,T,O,b,k,y,D,N,F,z,f,h,u,c,l,a,o,i,r,s,g,v,Ee,_t,Ne]}class $r extends ce{constructor(e){super(),ue(this,e,Ur,Nr,ae,{direction:0,duration:8,timing:9,count:7,current:6,next:10,prev:11,jump:12},null,[-1,-1])}get next(){return this.$$.ctx[10]}get prev(){return this.$$.ctx[11]}get jump(){return this.$$.ctx[12]}}function Fr(n,e){const t=["a","button","input","textarea","select","details","[tabindex]:not([tabindex='-1'])"],s=o=>{i.forEach(a=>{o&&o.disable?a.setAttribute("tabindex",-1):a.removeAttribute("tabindex")})},r=t.join(", "),i=[...n.querySelectorAll(r)];return s(e),{update(o){s(o)},destroy(){i.forEach(o=>o.removeAttribute("tabindex"))}}}function Mr(n){let e,t,s,r,i,o,a,l;const c=n[17].default,u=lt(c,n,n[16],null);return{c(){e=S("div"),u&&u.c(),this.h()},l(h){e=E(h,"DIV",{id:!0,class:!0,role:!0,"aria-label":!0,"aria-current":!0});var d=j(e);u&&u.l(d),d.forEach(p),this.h()},h(){_(e,"id",t="slide-"+n[0]),_(e,"class",s="slide "+n[1]+" svelte-1h814z3"),_(e,"role","group"),_(e,"aria-label",r="slide "+(n[0]+1)+" of "+n[6]),_(e,"aria-current",n[2]),oe(e,"visible",n[2]),W(e,"width",n[5]),W(e,"height",n[4])},m(h,d){P(h,e,d),u&&u.m(e,null),o=!0,a||(l=yr(i=Fr.call(null,e,{disable:n[3]})),a=!0)},p(h,[d]){u&&u.p&&(!o||d&65536)&&ut(u,c,h,h[16],o?dt(c,h[16],d,null):ht(h[16]),null),(!o||d&1&&t!==(t="slide-"+h[0]))&&_(e,"id",t),(!o||d&2&&s!==(s="slide "+h[1]+" svelte-1h814z3"))&&_(e,"class",s),(!o||d&65&&r!==(r="slide "+(h[0]+1)+" of "+h[6]))&&_(e,"aria-label",r),(!o||d&4)&&_(e,"aria-current",h[2]),i&&St(i.update)&&d&8&&i.update.call(null,{disable:h[3]}),(!o||d&6)&&oe(e,"visible",h[2]),d&32&&W(e,"width",h[5]),d&16&&W(e,"height",h[4])},i(h){o||(A(u,h),o=!0)},o(h){R(u,h),o=!1},d(h){h&&p(e),u&&u.d(h),a=!1,l()}}}function Br(n,e,t){let s,r,i,o,a,l,c,u,h,{$$slots:d={},$$scope:f}=e;const{dir:v,cur:g,w:m,h:b,count:k}=br("Slider");ie(n,v,y=>t(14,c=y)),ie(n,g,y=>t(12,a=y)),ie(n,m,y=>t(15,u=y)),ie(n,b,y=>t(13,l=y)),ie(n,k,y=>t(6,h=y));let{index:O}=e,{cls:T=""}=e;return n.$$set=y=>{"index"in y&&t(0,O=y.index),"cls"in y&&t(1,T=y.cls),"$$scope"in y&&t(16,f=y.$$scope)},n.$$.update=()=>{n.$$.dirty&49152&&t(5,s=c==="horizontal"?`${u}px`:"100%"),n.$$.dirty&24576&&t(4,r=c==="vertical"?`${l}px`:"100%"),n.$$.dirty&4097&&t(2,i=O===a),n.$$.dirty&4&&t(3,o=!i)},[O,T,i,o,r,s,h,v,g,m,b,k,a,l,c,u,f,d]}class zr extends ce{constructor(e){super(),ue(this,e,Br,Mr,ae,{index:0,cls:1})}}/** - * @license lucide-svelte v0.358.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},ns=qr;function is(n,e,t){const s=n.slice();return s[10]=e[t][0],s[11]=e[t][1],s}function Ot(n){let e,t=[n[11]],s={};for(let r=0;r{t(7,e=Se(Se({},e),Ke(f))),t(6,r=Xt(e,s)),"name"in f&&t(0,a=f.name),"color"in f&&t(1,l=f.color),"size"in f&&t(2,c=f.size),"strokeWidth"in f&&t(3,u=f.strokeWidth),"absoluteStrokeWidth"in f&&t(4,h=f.absoluteStrokeWidth),"iconNode"in f&&t(5,d=f.iconNode),"$$scope"in f&&t(8,o=f.$$scope)},e=Ke(e),[a,l,c,u,h,d,r,e,o,i]}class nr extends ce{constructor(e){super(),ue(this,e,Hr,Gr,ae,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Wr(n){let e,t,s,r;return{c(){e=S("button"),t=V(n[0]),this.h()},l(i){e=E(i,"BUTTON",{class:!0});var o=j(e);t=x(o,n[0]),o.forEach(p),this.h()},h(){_(e,"class","title-font svelte-1v4ps8e"),oe(e,"fixed",n[2]),W(e,"--font-size",n[3])},m(i,o){P(i,e,o),w(e,t),s||(r=ke(e,"click",function(){St(n[1])&&n[1].apply(this,arguments)}),s=!0)},p(i,[o]){n=i,o&1&&fe(t,n[0]),o&4&&oe(e,"fixed",n[2]),o&8&&W(e,"--font-size",n[3])},i:le,o:le,d(i){i&&p(e),s=!1,r()}}}function Jr(n,e,t){let{text:s="NEXT"}=e,{onClick:r=()=>{}}=e,{fixed:i=!0}=e,{fontSize:o="2rem"}=e;return n.$$set=a=>{"text"in a&&t(0,s=a.text),"onClick"in a&&t(1,r=a.onClick),"fixed"in a&&t(2,i=a.fixed),"fontSize"in a&&t(3,o=a.fontSize)},[s,r,i,o]}class zt extends ce{constructor(e){super(),ue(this,e,Jr,Wr,ae,{text:0,onClick:1,fixed:2,fontSize:3})}}function as(n,e,t){const s=n.slice();return s[18]=e[t],s}function ls(n){let e,t,s,r;const i=[Vr,Kr],o=[];function a(l,c){return l[18]==="left"?0:l[18]==="right"?1:-1}return~(t=a(n))&&(s=o[t]=i[t](n)),{c(){e=S("span"),s&&s.c(),this.h()},l(l){e=E(l,"SPAN",{class:!0,style:!0});var c=j(e);s&&s.l(c),c.forEach(p),this.h()},h(){_(e,"class","arrows svelte-1sf6xr9"),W(e,"font-size",n[4])},m(l,c){P(l,e,c),~t&&o[t].m(e,null),r=!0},p(l,c){let u=t;t=a(l),t!==u&&(s&&(me(),R(o[u],1,1,()=>{o[u]=null}),pe()),~t?(s=o[t],s||(s=o[t]=i[t](l),s.c()),A(s,1),s.m(e,null)):s=null),(!r||c&16)&&W(e,"font-size",l[4])},i(l){r||(A(s),r=!0)},o(l){R(s),r=!1},d(l){l&&p(e),~t&&o[t].d()}}}function Kr(n){let e,t;return e=new zt({}),{c(){te(e.$$.fragment)},l(s){se(e.$$.fragment,s)},m(s,r){re(e,s,r),t=!0},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){R(e.$$.fragment,s),t=!1},d(s){ne(e,s)}}}function Vr(n){return{c:le,l:le,m:le,i:le,o:le,d:le}}function cs(n){let e,t=n[7].includes(n[18]),s,r,i,o,a,l,c,u=t&&ls(n);return{c(){e=S("button"),u&&u.c(),s=G(),this.h()},l(h){e=E(h,"BUTTON",{style:!0,"aria-label":!0,class:!0});var d=j(e);u&&u.l(d),s=H(d),d.forEach(p),this.h()},h(){W(e,"width",n[10](n[18])),W(e,"height",n[9](n[18])),_(e,"aria-label",r=n[18]),_(e,"class",i=n[18]+" "+n[5]+" svelte-1sf6xr9"),e.disabled=o=n[2].includes(n[18]),oe(e,"full",n[1])},m(h,d){P(h,e,d),u&&u.m(e,null),w(e,s),a=!0,l||(c=ke(e,"click",function(){St(n[11]("tap",n[18]))&&n[11]("tap",n[18]).apply(this,arguments)}),l=!0)},p(h,d){n=h,d&136&&(t=n[7].includes(n[18])),t?u?(u.p(n,d),d&136&&A(u,1)):(u=ls(n),u.c(),A(u,1),u.m(e,s)):u&&(me(),R(u,1,1,()=>{u=null}),pe()),(!a||d&1032)&&W(e,"width",n[10](n[18])),(!a||d&520)&&W(e,"height",n[9](n[18])),(!a||d&8&&r!==(r=n[18]))&&_(e,"aria-label",r),(!a||d&40&&i!==(i=n[18]+" "+n[5]+" svelte-1sf6xr9"))&&_(e,"class",i),(!a||d&12&&o!==(o=n[2].includes(n[18])))&&(e.disabled=o),(!a||d&42)&&oe(e,"full",n[1])},i(h){a||(A(u),a=!0)},o(h){R(u),a=!1},d(h){h&&p(e),u&&u.d(),l=!1,c()}}}function xr(n){let e,t,s,r;ct(n[17]);let i=ee(n[3]),o=[];for(let l=0;lR(o[l],1,1,()=>{o[l]=null});return{c(){e=S("section");for(let l=0;l{"debug"in y&&t(0,a=y.debug),"enableKeyboard"in y&&t(12,l=y.enableKeyboard),"full"in y&&t(1,c=y.full),"showArrows"in y&&t(13,u=y.showArrows),"disable"in y&&t(2,h=y.disable),"directions"in y&&t(3,d=y.directions),"size"in y&&t(14,f=y.size),"arrowSize"in y&&t(4,v=y.arrowSize),"arrowStroke"in y&&t(15,g=y.arrowStroke),"arrowStrokeWidth"in y&&t(16,m=y.arrowStrokeWidth),"arrowPosition"in y&&t(5,b=y.arrowPosition)},n.$$.update=()=>{n.$$.dirty&16394&&t(10,s=y=>Array.isArray(f)?f[d.indexOf(y)]:c?"100%":f),n.$$.dirty&16386&&t(9,r=y=>["up","down"].includes(y)?f:c?"100%":f),n.$$.dirty&4104&&t(8,i=y=>{const D=y.key.replace("Arrow","").toLowerCase(),N=d.includes(D);l&&N&&(y.preventDefault(),k("tap",D))}),n.$$.dirty&8200&&t(7,o=d.filter(y=>typeof u=="boolean"?u:u.includes(y)))},[a,c,h,d,v,b,O,o,i,r,s,k,l,u,f,g,m,T]}class Xr extends ce{constructor(e){super(),ue(this,e,Yr,xr,ae,{debug:0,enableKeyboard:12,full:1,showArrows:13,disable:2,directions:3,size:14,arrowSize:4,arrowStroke:15,arrowStrokeWidth:16,arrowPosition:5})}}function Qr(n){let e,t=n[1]+1+"",s,r,i;return{c(){e=S("p"),s=V(t),r=V(" of "),i=V(n[0]),this.h()},l(o){e=E(o,"P",{class:!0});var a=j(e);s=x(a,t),r=x(a," of "),i=x(a,n[0]),a.forEach(p),this.h()},h(){_(e,"class","count svelte-rrphdy")},m(o,a){P(o,e,a),w(e,s),w(e,r),w(e,i)},p(o,[a]){a&2&&t!==(t=o[1]+1+"")&&fe(s,t),a&1&&fe(i,o[0])},i:le,o:le,d(o){o&&p(e)}}}function Zr(n,e,t){let s;ie(n,st,i=>t(1,s=i));let{maxArtistIndex:r}=e;return n.$$set=i=>{"maxArtistIndex"in i&&t(0,r=i.maxArtistIndex)},[r,s]}class en extends ce{constructor(e){super(),ue(this,e,Zr,Qr,ae,{maxArtistIndex:0})}}function tn(n){let e;const t=n[2].default,s=lt(t,n,n[3],null);return{c(){s&&s.c()},l(r){s&&s.l(r)},m(r,i){s&&s.m(r,i),e=!0},p(r,i){s&&s.p&&(!e||i&8)&&ut(s,t,r,r[3],e?dt(t,r[3],i,null):ht(r[3]),null)},i(r){e||(A(s,r),e=!0)},o(r){R(s,r),e=!1},d(r){s&&s.d(r)}}}function sn(n){let e,t;const s=[{name:"chevron-down"},n[1],{iconNode:n[0]}];let r={$$slots:{default:[tn]},$$scope:{ctx:n}};for(let i=0;i{t(1,e=Se(Se({},e),Ke(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Ke(e),[i,e,s,r]}class nn extends ce{constructor(e){super(),ue(this,e,rn,sn,ae,{})}}const on=nn;function an(n){let e;const t=n[2].default,s=lt(t,n,n[3],null);return{c(){s&&s.c()},l(r){s&&s.l(r)},m(r,i){s&&s.m(r,i),e=!0},p(r,i){s&&s.p&&(!e||i&8)&&ut(s,t,r,r[3],e?dt(t,r[3],i,null):ht(r[3]),null)},i(r){e||(A(s,r),e=!0)},o(r){R(s,r),e=!1},d(r){s&&s.d(r)}}}function ln(n){let e,t;const s=[{name:"chevron-up"},n[1],{iconNode:n[0]}];let r={$$slots:{default:[an]},$$scope:{ctx:n}};for(let i=0;i{t(1,e=Se(Se({},e),Ke(o))),"$$scope"in o&&t(3,r=o.$$scope)},e=Ke(e),[i,e,s,r]}class un extends ce{constructor(e){super(),ue(this,e,cn,ln,ae,{})}}const hn=un;function dn(n){let e,t;return{c(){e=We("svg"),t=We("path"),this.h()},l(s){e=Je(s,"svg",{xmlns:!0,version:!0,viewBox:!0,class:!0});var r=j(e);t=Je(r,"path",{d:!0}),j(t).forEach(p),r.forEach(p),this.h()},h(){_(t,"d","m600 223.2c-207.6 0-376.8 169.2-376.8 376.8s169.2 376.8 376.8 376.8 376.8-169.2 376.8-376.8-169.2-376.8-376.8-376.8zm159.6 408-219.6 130.8c-16.801 9.6016-39.602 4.8008-49.199-13.199-3.6016-6-4.8008-12-4.8008-18v-261.6c0-20.398 15.602-36 36-36 6 0 13.199 1.1992 18 4.8008l219.6 130.8c16.801 9.6016 22.801 32.398 12 49.199-2.4023 6-7.2031 9.6016-12 13.199z"),_(e,"xmlns","http://www.w3.org/2000/svg"),_(e,"version","1.1"),_(e,"viewBox","223.2 223.2 753.6 753.6"),_(e,"class","svelte-1idfvi7")},m(s,r){P(s,e,r),w(e,t)},d(s){s&&p(e)}}}function fn(n){let e,t;return{c(){e=We("svg"),t=We("path"),this.h()},l(s){e=Je(s,"svg",{xmlns:!0,version:!0,viewBox:!0,class:!0});var r=j(e);t=Je(r,"path",{d:!0}),j(t).forEach(p),r.forEach(p),this.h()},h(){_(t,"d","m600 30c-314.39 0-570 255.61-570 570s255.61 570 570 570 570-255.61 570-570-255.61-570-570-570zm-96 788.39c0 30-25.219 55.219-55.219 55.219s-55.219-25.219-55.219-55.219l0.046875-436.78c0-30 25.219-55.219 55.219-55.219s55.219 25.219 55.219 55.219zm302.39 0c0 30-25.219 55.219-55.219 55.219s-55.219-25.219-55.219-55.219l0.046875-436.78c0-30 25.219-55.219 55.219-55.219s55.219 25.219 55.219 55.219z"),_(e,"xmlns","http://www.w3.org/2000/svg"),_(e,"version","1.1"),_(e,"viewBox","30 30 1140 1140"),_(e,"class","svelte-1idfvi7")},m(s,r){P(s,e,r),w(e,t)},d(s){s&&p(e)}}}function _n(n){let e,t,s=n[0].song+"",r,i,o;function a(u,h){return u[1]?fn:dn}let l=a(n),c=l(n);return{c(){e=S("span"),c.c(),t=G(),r=V(s),this.h()},l(u){e=E(u,"SPAN",{class:!0});var h=j(e);c.l(h),t=H(h),r=x(h,s),h.forEach(p),this.h()},h(){_(e,"class","artist__player svelte-1idfvi7")},m(u,h){P(u,e,h),c.m(e,null),w(e,t),w(e,r),i||(o=ke(e,"click",n[2]),i=!0)},p(u,[h]){l!==(l=a(u))&&(c.d(1),c=l(u),c&&(c.c(),c.m(e,t))),h&1&&s!==(s=u[0].song+"")&&fe(r,s)},i:le,o:le,d(u){u&&p(e),c.d(),i=!1,o()}}}function gn(n,e,t){let{artist:s}=e,r,i=!1,o;function a(){i?l():(t(1,i=!0),r||(r=new Audio(`${Oe}/assets/audio/${s.id}.mp3`),r.play()))}function l(){t(1,i=!1),r&&(r.pause(),r=null)}return n.$$set=c=>{"artist"in c&&t(0,s=c.artist)},n.$$.update=()=>{n.$$.dirty&11&&(o&&o.id!==s.id&&i&&l(),t(3,o=s))},[s,i,a,o]}class mn extends ce{constructor(e){super(),ue(this,e,gn,_n,ae,{artist:0})}}function us(n){let e,t,s=`url(${Oe}/assets/toploaders/${n[3]}.png)`;return{c(){e=S("div"),this.h()},l(r){e=E(r,"DIV",{class:!0}),j(e).forEach(p),this.h()},h(){_(e,"class","toploader svelte-1s1k6wy"),W(e,"--toploader-url",s)},m(r,i){P(r,e,i)},p(r,i){i&8&&s!==(s=`url(${Oe}/assets/toploaders/${r[3]}.png)`)&&W(e,"--toploader-url",s)},i(r){r&&(t||ct(()=>{t=Zs(e,Pr,{duration:500}),t.start()}))},o:le,d(r){r&&p(e)}}}function pn(n){let e,t,s=n[0].name+"",r,i,o,a,l=n[0]["debut year"]+"",c,u,h=n[0].company+"",d,f,v,g,m,b,k,O=`url(${Oe}/assets/images/${n[0].id}.jpg)`,T;v=new mn({props:{artist:n[0],currentArtistIndex:n[1]}});let y=n[2]&&us(n);return{c(){e=S("div"),t=S("h2"),r=V(s),i=G(),o=S("p"),a=V("Debuted in "),c=V(l),u=V(" under "),d=V(h),f=V(` and their highest streaming - song is - `),te(v.$$.fragment),g=G(),m=S("div"),y&&y.c(),b=G(),k=S("div"),this.h()},l(D){e=E(D,"DIV",{class:!0});var N=j(e);t=E(N,"H2",{class:!0});var F=j(t);r=x(F,s),F.forEach(p),i=H(N),o=E(N,"P",{class:!0});var z=j(o);a=x(z,"Debuted in "),c=x(z,l),u=x(z," under "),d=x(z,h),f=x(z,` and their highest streaming - song is - `),se(v.$$.fragment,z),z.forEach(p),g=H(N),m=E(N,"DIV",{class:!0});var J=j(m);y&&y.l(J),b=H(J),k=E(J,"DIV",{class:!0}),j(k).forEach(p),J.forEach(p),N.forEach(p),this.h()},h(){_(t,"class","artist__title svelte-1s1k6wy"),_(o,"class","artist__description svelte-1s1k6wy"),_(k,"class","image svelte-1s1k6wy"),W(k,"--image",O),_(m,"class","artist__art svelte-1s1k6wy"),_(e,"class","artist svelte-1s1k6wy")},m(D,N){P(D,e,N),w(e,t),w(t,r),w(e,i),w(e,o),w(o,a),w(o,c),w(o,u),w(o,d),w(o,f),re(v,o,null),w(e,g),w(e,m),y&&y.m(m,null),w(m,b),w(m,k),T=!0},p(D,[N]){(!T||N&1)&&s!==(s=D[0].name+"")&&fe(r,s),(!T||N&1)&&l!==(l=D[0]["debut year"]+"")&&fe(c,l),(!T||N&1)&&h!==(h=D[0].company+"")&&fe(d,h);const F={};N&1&&(F.artist=D[0]),N&2&&(F.currentArtistIndex=D[1]),v.$set(F),D[2]?y?(y.p(D,N),N&4&&A(y,1)):(y=us(D),y.c(),A(y,1),y.m(m,b)):y&&(y.d(1),y=null),N&1&&O!==(O=`url(${Oe}/assets/images/${D[0].id}.jpg)`)&&W(k,"--image",O)},i(D){T||(A(v.$$.fragment,D),A(y),T=!0)},o(D){R(v.$$.fragment,D),T=!1},d(D){D&&p(e),ne(v),y&&y.d()}}}function vn(n,e,t){let s,r;ie(n,yt,a=>t(2,s=a)),ie(n,bt,a=>t(3,r=a));let{artist:i}=e,{currentArtistIndex:o}=e;return n.$$set=a=>{"artist"in a&&t(0,i=a.artist),"currentArtistIndex"in a&&t(1,o=a.currentArtistIndex)},[i,o,s,r]}class yn extends ce{constructor(e){super(),ue(this,e,vn,pn,ae,{artist:0,currentArtistIndex:1})}}const bn=n=>{let e;return n?e=n:typeof fetch>"u"?e=(...t)=>Ve(()=>Promise.resolve().then(()=>ft),void 0,import.meta.url).then(({default:s})=>s(...t)):e=fetch,(...t)=>e(...t)};class qt extends Error{constructor(e,t="FunctionsError",s){super(e),this.name=t,this.context=s}}class wn extends qt{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class kn extends qt{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Sn extends qt{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var En=function(n,e,t,s){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(s.next(u))}catch(h){o(h)}}function l(u){try{c(s.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):r(u.value).then(a,l)}c((s=s.apply(n,e||[])).next())})};class Tn{constructor(e,{headers:t={},customFetch:s}={}){this.url=e,this.headers=t,this.fetch=bn(s)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var s;return En(this,void 0,void 0,function*(){try{const{headers:r,method:i,body:o}=t;let a={},l;o&&(r&&!Object.prototype.hasOwnProperty.call(r,"Content-Type")||!r)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",l=o):typeof o=="string"?(a["Content-Type"]="text/plain",l=o):typeof FormData<"u"&&o instanceof FormData?l=o:(a["Content-Type"]="application/json",l=JSON.stringify(o)));const c=yield this.fetch(`${this.url}/${e}`,{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),r),body:l}).catch(f=>{throw new wn(f)}),u=c.headers.get("x-relay-error");if(u&&u==="true")throw new kn(c);if(!c.ok)throw new Sn(c);let h=((s=c.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),d;return h==="application/json"?d=yield c.json():h==="application/octet-stream"?d=yield c.blob():h==="multipart/form-data"?d=yield c.formData():d=yield c.text(),{data:d,error:null}}catch(r){return{data:null,error:r}}})}}var An=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},xe=An();const On=xe.fetch,Gt=xe.fetch.bind(xe),ir=xe.Headers,In=xe.Request,jn=xe.Response,ft=Object.freeze(Object.defineProperty({__proto__:null,Headers:ir,Request:In,Response:jn,default:Gt,fetch:On},Symbol.toStringTag,{value:"Module"}));class Pn extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}class Rn{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch>"u"?this.fetch=Gt:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(e,t){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const s=this.fetch;let r=s(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{var o,a,l;let c=null,u=null,h=null,d=i.status,f=i.statusText;if(i.ok){if(this.method!=="HEAD"){const b=await i.text();b===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?u=b:u=JSON.parse(b))}const g=(o=this.headers.Prefer)===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),m=(a=i.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");g&&m&&m.length>1&&(h=parseInt(m[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(u)&&(u.length>1?(c={code:"PGRST116",details:`Results contain ${u.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},u=null,h=null,d=406,f="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{const g=await i.text();try{c=JSON.parse(g),Array.isArray(c)&&i.status===404&&(u=[],c=null,d=200,f="OK")}catch{i.status===404&&g===""?(d=204,f="No Content"):c={message:g}}if(c&&this.isMaybeSingle&&(!((l=c==null?void 0:c.details)===null||l===void 0)&&l.includes("0 rows"))&&(c=null,d=200,f="OK"),c&&this.shouldThrowOnError)throw new Pn(c)}return{error:c,data:u,count:h,status:d,statusText:f}});return this.shouldThrowOnError||(r=r.catch(i=>{var o,a,l;return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:`${(a=i==null?void 0:i.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=i==null?void 0:i.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),r.then(e,t)}}class Cn extends Rn{select(e){let t=!1;const s=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",s),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:s,foreignTable:r,referencedTable:i=r}={}){const o=i?`${i}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:s=t}={}){const r=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:s,referencedTable:r=s}={}){const i=typeof r>"u"?"offset":`${r}.offset`,o=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:s=!1,buffers:r=!1,wal:i=!1,format:o="text"}={}){var a;const l=[e?"analyze":null,t?"verbose":null,s?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${c}"; options=${l};`,o==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}class qe extends Cn{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){const s=t.map(r=>typeof r=="string"&&new RegExp("[,()]").test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${s})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:s,type:r}={}){let i="";r==="plain"?i="pl":r==="phrase"?i="ph":r==="websearch"&&(i="w");const o=s===void 0?"":`(${s})`;return this.url.searchParams.append(e,`${i}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,s])=>{this.url.searchParams.append(t,`eq.${s}`)}),this}not(e,t,s){return this.url.searchParams.append(e,`not.${t}.${s}`),this}or(e,{foreignTable:t,referencedTable:s=t}={}){const r=s?`${s}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,s){return this.url.searchParams.append(e,`${t}.${s}`),this}}class Ln{constructor(e,{headers:t={},schema:s,fetch:r}){this.url=e,this.headers=t,this.schema=s,this.fetch=r}select(e,{head:t=!1,count:s}={}){const r=t?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(a=>/\s/.test(a)&&!i?"":(a==='"'&&(i=!i),a)).join("");return this.url.searchParams.set("select",o),s&&(this.headers.Prefer=`count=${s}`),new qe({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:s=!0}={}){const r="POST",i=[];if(this.headers.Prefer&&i.push(this.headers.Prefer),t&&i.push(`count=${t}`),s||i.push("missing=default"),this.headers.Prefer=i.join(","),Array.isArray(e)){const o=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>0){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new qe({method:r,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:s=!1,count:r,defaultToNull:i=!0}={}){const o="POST",a=[`resolution=${s?"ignore":"merge"}-duplicates`];if(t!==void 0&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&a.push(this.headers.Prefer),r&&a.push(`count=${r}`),i||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);this.url.searchParams.set("columns",c.join(","))}}return new qe({method:o,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){const s="PATCH",r=[];return this.headers.Prefer&&r.push(this.headers.Prefer),t&&r.push(`count=${t}`),this.headers.Prefer=r.join(","),new qe({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const t="DELETE",s=[];return e&&s.push(`count=${e}`),this.headers.Prefer&&s.unshift(this.headers.Prefer),this.headers.Prefer=s.join(","),new qe({method:t,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}const Dn="1.9.2",Nn={"X-Client-Info":`postgrest-js/${Dn}`};class Ht{constructor(e,{headers:t={},schema:s,fetch:r}={}){this.url=e,this.headers=Object.assign(Object.assign({},Nn),t),this.schemaName=s,this.fetch=r}from(e){const t=new URL(`${this.url}/${e}`);return new Ln(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new Ht(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:s=!1,count:r}={}){let i;const o=new URL(`${this.url}/rpc/${e}`);let a;s?(i="HEAD",Object.entries(t).forEach(([c,u])=>{o.searchParams.append(c,`${u}`)})):(i="POST",a=t);const l=Object.assign({},this.headers);return r&&(l.Prefer=`count=${r}`),new qe({method:i,url:o,headers:l,schema:this.schemaName,body:a,fetch:this.fetch,allowEmpty:!1})}}const Un="2.9.3",$n={"X-Client-Info":`realtime-js/${Un}`},Fn="1.0.0",or=1e4,Mn=1e3;var He;(function(n){n[n.connecting=0]="connecting",n[n.open=1]="open",n[n.closing=2]="closing",n[n.closed=3]="closed"})(He||(He={}));var _e;(function(n){n.closed="closed",n.errored="errored",n.joined="joined",n.joining="joining",n.leaving="leaving"})(_e||(_e={}));var be;(function(n){n.close="phx_close",n.error="phx_error",n.join="phx_join",n.reply="phx_reply",n.leave="phx_leave",n.access_token="access_token"})(be||(be={}));var Nt;(function(n){n.websocket="websocket"})(Nt||(Nt={}));var Ce;(function(n){n.Connecting="connecting",n.Open="open",n.Closing="closing",n.Closed="closed"})(Ce||(Ce={}));class ar{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}class Bn{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),s=new TextDecoder;return this._decodeBroadcast(e,t,s)}_decodeBroadcast(e,t,s){const r=t.getUint8(1),i=t.getUint8(2);let o=this.HEADER_LENGTH+2;const a=s.decode(e.slice(o,o+r));o=o+r;const l=s.decode(e.slice(o,o+i));o=o+i;const c=JSON.parse(s.decode(e.slice(o,e.byteLength)));return{ref:null,topic:a,event:l,payload:c}}}class It{constructor(e,t,s={},r=or){this.channel=e,this.event=t,this.payload=s,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var s;return this._hasReceived(e)&&t((s=this.receivedResp)===null||s===void 0?void 0:s.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=t=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=t,this._matchReceive(t)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(s=>s.status===e).forEach(s=>s.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var hs;(function(n){n.SYNC="sync",n.JOIN="join",n.LEAVE="leave"})(hs||(hs={}));class rt{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const s=(t==null?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(s.state,{},r=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=rt.syncState(this.state,r,i,o),this.pendingDiffs.forEach(l=>{this.state=rt.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(s.diff,{},r=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(r):(this.state=rt.syncDiff(this.state,r,i,o),a())}),this.onJoin((r,i,o)=>{this.channel._trigger("presence",{event:"join",key:r,currentPresences:i,newPresences:o})}),this.onLeave((r,i,o)=>{this.channel._trigger("presence",{event:"leave",key:r,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,s,r){const i=this.cloneDeep(e),o=this.transformState(t),a={},l={};return this.map(i,(c,u)=>{o[c]||(l[c]=u)}),this.map(o,(c,u)=>{const h=i[c];if(h){const d=u.map(m=>m.presence_ref),f=h.map(m=>m.presence_ref),v=u.filter(m=>f.indexOf(m.presence_ref)<0),g=h.filter(m=>d.indexOf(m.presence_ref)<0);v.length>0&&(a[c]=v),g.length>0&&(l[c]=g)}else a[c]=u}),this.syncDiff(i,{joins:a,leaves:l},s,r)}static syncDiff(e,t,s,r){const{joins:i,leaves:o}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return s||(s=()=>{}),r||(r=()=>{}),this.map(i,(a,l)=>{var c;const u=(c=e[a])!==null&&c!==void 0?c:[];if(e[a]=this.cloneDeep(l),u.length>0){const h=e[a].map(f=>f.presence_ref),d=u.filter(f=>h.indexOf(f.presence_ref)<0);e[a].unshift(...d)}s(a,u,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;const u=l.map(h=>h.presence_ref);c=c.filter(h=>u.indexOf(h.presence_ref)<0),e[a]=c,r(a,c,l),c.length===0&&delete e[a]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(s=>t(s,e[s]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((t,s)=>{const r=e[s];return"metas"in r?t[s]=r.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):t[s]=r,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var X;(function(n){n.abstime="abstime",n.bool="bool",n.date="date",n.daterange="daterange",n.float4="float4",n.float8="float8",n.int2="int2",n.int4="int4",n.int4range="int4range",n.int8="int8",n.int8range="int8range",n.json="json",n.jsonb="jsonb",n.money="money",n.numeric="numeric",n.oid="oid",n.reltime="reltime",n.text="text",n.time="time",n.timestamp="timestamp",n.timestamptz="timestamptz",n.timetz="timetz",n.tsrange="tsrange",n.tstzrange="tstzrange"})(X||(X={}));const ds=(n,e,t={})=>{var s;const r=(s=t.skipTypes)!==null&&s!==void 0?s:[];return Object.keys(e).reduce((i,o)=>(i[o]=zn(o,n,e,r),i),{})},zn=(n,e,t,s)=>{const r=e.find(a=>a.name===n),i=r==null?void 0:r.type,o=t[n];return i&&!s.includes(i)?lr(i,o):Ut(o)},lr=(n,e)=>{if(n.charAt(0)==="_"){const t=n.slice(1,n.length);return Wn(e,t)}switch(n){case X.bool:return qn(e);case X.float4:case X.float8:case X.int2:case X.int4:case X.int8:case X.numeric:case X.oid:return Gn(e);case X.json:case X.jsonb:return Hn(e);case X.timestamp:return Jn(e);case X.abstime:case X.date:case X.daterange:case X.int4range:case X.int8range:case X.money:case X.reltime:case X.text:case X.time:case X.timestamptz:case X.timetz:case X.tsrange:case X.tstzrange:return Ut(e);default:return Ut(e)}},Ut=n=>n,qn=n=>{switch(n){case"t":return!0;case"f":return!1;default:return n}},Gn=n=>{if(typeof n=="string"){const e=parseFloat(n);if(!Number.isNaN(e))return e}return n},Hn=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch(e){return console.log(`JSON parse error: ${e}`),n}return n},Wn=(n,e)=>{if(typeof n!="string")return n;const t=n.length-1,s=n[t];if(n[0]==="{"&&s==="}"){let i;const o=n.slice(1,t);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>lr(e,a))}return n},Jn=n=>typeof n=="string"?n.replace(" ","T"):n;var fs;(function(n){n.ALL="*",n.INSERT="INSERT",n.UPDATE="UPDATE",n.DELETE="DELETE"})(fs||(fs={}));var _s;(function(n){n.BROADCAST="broadcast",n.PRESENCE="presence",n.POSTGRES_CHANGES="postgres_changes"})(_s||(_s={}));var gs;(function(n){n.SUBSCRIBED="SUBSCRIBED",n.TIMED_OUT="TIMED_OUT",n.CLOSED="CLOSED",n.CHANNEL_ERROR="CHANNEL_ERROR"})(gs||(gs={}));class Wt{constructor(e,t={config:{}},s){this.topic=e,this.params=t,this.socket=s,this.bindings={},this.state=_e.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""}},t.config),this.timeout=this.socket.timeout,this.joinPush=new It(this,be.join,this.params,this.timeout),this.rejoinTimer=new ar(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=_e.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=_e.closed,this.socket._remove(this)}),this._onError(r=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,r),this.state=_e.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=_e.errored,this.rejoinTimer.scheduleTimeout())}),this._on(be.reply,{},(r,i)=>{this._trigger(this._replyEventName(i),r)}),this.presence=new rt(this),this.broadcastEndpointURL=this._broadcastEndpointURL()}subscribe(e,t=this.timeout){var s,r;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:i,presence:o}}=this.params;this._onError(c=>e&&e("CHANNEL_ERROR",c)),this._onClose(()=>e&&e("CLOSED"));const a={},l={broadcast:i,presence:o,postgres_changes:(r=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(c=>c.filter))!==null&&r!==void 0?r:[]};this.socket.accessToken&&(a.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:l},a)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",({postgres_changes:c})=>{var u;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),c===void 0){e&&e("SUBSCRIBED");return}else{const h=this.bindings.postgres_changes,d=(u=h==null?void 0:h.length)!==null&&u!==void 0?u:0,f=[];for(let v=0;v{e&&e("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(c).join(", ")||"error")))}).receive("timeout",()=>{e&&e("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,s){return this._on(e,t,s)}async send(e,t={}){var s,r;if(!this._canPush()&&e.type==="broadcast"){const{event:i,payload:o}=e,a={method:"POST",headers:{apikey:(s=this.socket.apiKey)!==null&&s!==void 0?s:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o}]})};try{return(await this._fetchWithTimeout(this.broadcastEndpointURL,a,(r=t.timeout)!==null&&r!==void 0?r:this.timeout)).ok?"ok":"error"}catch(l){return l.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this._push(e.type,e,t.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=_e.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(be.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(s=>{const r=new It(this,be.leave,{},e);r.receive("ok",()=>{t(),s("ok")}).receive("timeout",()=>{t(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})})}_broadcastEndpointURL(){let e=this.socket.endPoint;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"}async _fetchWithTimeout(e,t,s){const r=new AbortController,i=setTimeout(()=>r.abort(),s),o=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),o}_push(e,t,s=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new It(this,e,t,s);return this._canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}_onMessage(e,t,s){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,s){var r,i;const o=e.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=be;if(s&&[a,l,c,u].indexOf(o)>=0&&s!==this._joinRef())return;let d=this._onMessage(o,t,s);if(t&&!d)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(r=this.bindings.postgres_changes)===null||r===void 0||r.filter(f=>{var v,g,m;return((v=f.filter)===null||v===void 0?void 0:v.event)==="*"||((m=(g=f.filter)===null||g===void 0?void 0:g.event)===null||m===void 0?void 0:m.toLocaleLowerCase())===o}).map(f=>f.callback(d,s)):(i=this.bindings[o])===null||i===void 0||i.filter(f=>{var v,g,m,b,k,O;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in f){const T=f.id,y=(v=f.filter)===null||v===void 0?void 0:v.event;return T&&((g=t.ids)===null||g===void 0?void 0:g.includes(T))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((m=t.data)===null||m===void 0?void 0:m.type.toLocaleLowerCase()))}else{const T=(k=(b=f==null?void 0:f.filter)===null||b===void 0?void 0:b.event)===null||k===void 0?void 0:k.toLocaleLowerCase();return T==="*"||T===((O=t==null?void 0:t.event)===null||O===void 0?void 0:O.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===o}).map(f=>{if(typeof d=="object"&&"ids"in d){const v=d.data,{schema:g,table:m,commit_timestamp:b,type:k,errors:O}=v;d=Object.assign(Object.assign({},{schema:g,table:m,commit_timestamp:b,eventType:k,new:{},old:{},errors:O}),this._getPayloadRecords(v))}f.callback(d,s)})}_isClosed(){return this.state===_e.closed}_isJoined(){return this.state===_e.joined}_isJoining(){return this.state===_e.joining}_isLeaving(){return this.state===_e.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,s){const r=e.toLocaleLowerCase(),i={type:r,filter:t,callback:s};return this.bindings[r]?this.bindings[r].push(i):this.bindings[r]=[i],this}_off(e,t){const s=e.toLocaleLowerCase();return this.bindings[s]=this.bindings[s].filter(r=>{var i;return!(((i=r.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===s&&Wt.isEqual(r.filter,t))}),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(be.close,{},e)}_onError(e){this._on(be.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=_e.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(t.new=ds(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(t.old=ds(e.columns,e.old_record)),t}}const Kn=()=>{},Vn=typeof WebSocket<"u";class xn{constructor(e,t){var s;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.headers=$n,this.params={},this.timeout=or,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=Kn,this.conn=null,this.sendBuffer=[],this.serializer=new Bn,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=i=>{let o;return i?o=i:typeof fetch>"u"?o=(...a)=>Ve(()=>Promise.resolve().then(()=>ft),void 0,import.meta.url).then(({default:l})=>l(...a)):o=fetch,(...a)=>o(...a)},this.endPoint=`${e}/${Nt.websocket}`,t!=null&&t.transport?this.transport=t.transport:this.transport=null,t!=null&&t.params&&(this.params=t.params),t!=null&&t.headers&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),t!=null&&t.timeout&&(this.timeout=t.timeout),t!=null&&t.logger&&(this.logger=t.logger),t!=null&&t.heartbeatIntervalMs&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);const r=(s=t==null?void 0:t.params)===null||s===void 0?void 0:s.apikey;r&&(this.accessToken=r,this.apiKey=r),this.reconnectAfterMs=t!=null&&t.reconnectAfterMs?t.reconnectAfterMs:i=>[1e3,2e3,5e3,1e4][i-1]||1e4,this.encode=t!=null&&t.encode?t.encode:(i,o)=>o(JSON.stringify(i)),this.decode=t!=null&&t.decode?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new ar(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(t==null?void 0:t.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(Vn){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new Yn(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),Ve(()=>import("../chunks/browser.DL7QZ5YJ.js").then(e=>e.b),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,t??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(e){const t=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),t}async removeAllChannels(){const e=await Promise.all(this.channels.map(t=>t.unsubscribe()));return this.disconnect(),e}log(e,t,s){this.logger(e,t,s)}connectionState(){switch(this.conn&&this.conn.readyState){case He.connecting:return Ce.Connecting;case He.open:return Ce.Open;case He.closing:return Ce.Closing;default:return Ce.Closed}}isConnected(){return this.connectionState()===Ce.Open}channel(e,t={config:{}}){const s=new Wt(`realtime:${e}`,t,this);return this.channels.push(s),s}push(e){const{topic:t,event:s,payload:r,ref:i}=e,o=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${t} ${s} (${i})`,r),this.isConnected()?o():this.sendBuffer.push(o)}setAuth(e){this.accessToken=e,this.channels.forEach(t=>{e&&t.updateJoinPayload({access_token:e}),t.joinedOnce&&t._isJoined()&&t._push(be.access_token,{access_token:e})})}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(s=>s.topic===e&&(s._isJoined()||s._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t._joinRef()!==e._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:Fn}))}_onConnMessage(e){this.decode(e.data,t=>{let{topic:s,event:r,payload:i,ref:o}=t;(o&&o===this.pendingHeartbeatRef||r===(i==null?void 0:i.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${i.status||""} ${s} ${r} ${o&&"("+o+")"||""}`,i),this.channels.filter(a=>a._isMember(s)).forEach(a=>a._trigger(r,i,o)),this.stateChangeCallbacks.message.forEach(a=>a(t))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(t=>t(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(t=>t(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(be.error))}_appendParams(e,t){if(Object.keys(t).length===0)return e;const s=e.match(/\?/)?"&":"?",r=new URLSearchParams(t);return`${e}${s}${r}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(e=this.conn)===null||e===void 0||e.close(Mn,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class Yn{constructor(e,t,s){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=He.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=s.close}}class Jt extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function he(n){return typeof n=="object"&&n!==null&&"__isStorageError"in n}class Xn extends Jt{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class ms extends Jt{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}var Qn=function(n,e,t,s){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(s.next(u))}catch(h){o(h)}}function l(u){try{c(s.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):r(u.value).then(a,l)}c((s=s.apply(n,e||[])).next())})};const cr=n=>{let e;return n?e=n:typeof fetch>"u"?e=(...t)=>Ve(()=>Promise.resolve().then(()=>ft),void 0,import.meta.url).then(({default:s})=>s(...t)):e=fetch,(...t)=>e(...t)},Zn=()=>Qn(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Ve(()=>Promise.resolve().then(()=>ft),void 0,import.meta.url)).Response:Response});var Ye=function(n,e,t,s){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(s.next(u))}catch(h){o(h)}}function l(u){try{c(s.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):r(u.value).then(a,l)}c((s=s.apply(n,e||[])).next())})};const jt=n=>n.msg||n.message||n.error_description||n.error||JSON.stringify(n),ei=(n,e)=>Ye(void 0,void 0,void 0,function*(){const t=yield Zn();n instanceof t?n.json().then(s=>{e(new Xn(jt(s),n.status||500))}).catch(s=>{e(new ms(jt(s),s))}):e(new ms(jt(n),n))}),ti=(n,e,t,s)=>{const r={method:n,headers:(e==null?void 0:e.headers)||{}};return n==="GET"?r:(r.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),r.body=JSON.stringify(s),Object.assign(Object.assign({},r),t))};function Tt(n,e,t,s,r,i){return Ye(this,void 0,void 0,function*(){return new Promise((o,a)=>{n(t,ti(e,s,r,i)).then(l=>{if(!l.ok)throw l;return s!=null&&s.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>ei(l,a))})})}function $t(n,e,t,s){return Ye(this,void 0,void 0,function*(){return Tt(n,"GET",e,t,s)})}function Te(n,e,t,s,r){return Ye(this,void 0,void 0,function*(){return Tt(n,"POST",e,s,r,t)})}function si(n,e,t,s,r){return Ye(this,void 0,void 0,function*(){return Tt(n,"PUT",e,s,r,t)})}function ur(n,e,t,s,r){return Ye(this,void 0,void 0,function*(){return Tt(n,"DELETE",e,s,r,t)})}var ge=function(n,e,t,s){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(s.next(u))}catch(h){o(h)}}function l(u){try{c(s.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):r(u.value).then(a,l)}c((s=s.apply(n,e||[])).next())})};const ri={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},ps={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class ni{constructor(e,t={},s,r){this.url=e,this.headers=t,this.bucketId=s,this.fetch=cr(r)}uploadOrUpdate(e,t,s,r){return ge(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},ps),r),a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(o.upsert)});typeof Blob<"u"&&s instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),i.append("",s)):typeof FormData<"u"&&s instanceof FormData?(i=s,i.append("cacheControl",o.cacheControl)):(i=s,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType);const l=this._removeEmptyFolders(t),c=this._getFinalPath(l),u=yield this.fetch(`${this.url}/object/${c}`,Object.assign({method:e,body:i,headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{})),h=yield u.json();return u.ok?{data:{path:l,id:h.Id,fullPath:h.Key},error:null}:{data:null,error:h}}catch(i){if(he(i))return{data:null,error:i};throw i}})}upload(e,t,s){return ge(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,s)})}uploadToSignedUrl(e,t,s,r){return ge(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(e),o=this._getFinalPath(i),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",t);try{let l;const c=Object.assign({upsert:ps.upsert},r),u=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&s instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",s)):typeof FormData<"u"&&s instanceof FormData?(l=s,l.append("cacheControl",c.cacheControl)):(l=s,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType);const h=yield this.fetch(a.toString(),{method:"PUT",body:l,headers:u}),d=yield h.json();return h.ok?{data:{path:i,fullPath:d.Key},error:null}:{data:null,error:d}}catch(l){if(he(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e){return ge(this,void 0,void 0,function*(){try{let t=this._getFinalPath(e);const s=yield Te(this.fetch,`${this.url}/object/upload/sign/${t}`,{},{headers:this.headers}),r=new URL(this.url+s.url),i=r.searchParams.get("token");if(!i)throw new Jt("No token returned by API");return{data:{signedUrl:r.toString(),path:e,token:i},error:null}}catch(t){if(he(t))return{data:null,error:t};throw t}})}update(e,t,s){return ge(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,s)})}move(e,t){return ge(this,void 0,void 0,function*(){try{return{data:yield Te(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t},{headers:this.headers}),error:null}}catch(s){if(he(s))return{data:null,error:s};throw s}})}copy(e,t){return ge(this,void 0,void 0,function*(){try{return{data:{path:(yield Te(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t},{headers:this.headers})).Key},error:null}}catch(s){if(he(s))return{data:null,error:s};throw s}})}createSignedUrl(e,t,s){return ge(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e),i=yield Te(this.fetch,`${this.url}/object/sign/${r}`,Object.assign({expiresIn:t},s!=null&&s.transform?{transform:s.transform}:{}),{headers:this.headers});const o=s!=null&&s.download?`&download=${s.download===!0?"":s.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}})}createSignedUrls(e,t,s){return ge(this,void 0,void 0,function*(){try{const r=yield Te(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),i=s!=null&&s.download?`&download=${s.download===!0?"":s.download}`:"";return{data:r.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}})}download(e,t){return ge(this,void 0,void 0,function*(){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),o=i?`?${i}`:"";try{const a=this._getFinalPath(e);return{data:yield(yield $t(this.fetch,`${this.url}/${r}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(he(a))return{data:null,error:a};throw a}})}getPublicUrl(e,t){const s=this._getFinalPath(e),r=[],i=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";i!==""&&r.push(i);const a=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});l!==""&&r.push(l);let c=r.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${s}${c}`)}}}remove(e){return ge(this,void 0,void 0,function*(){try{return{data:yield ur(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(t){if(he(t))return{data:null,error:t};throw t}})}list(e,t,s){return ge(this,void 0,void 0,function*(){try{const r=Object.assign(Object.assign(Object.assign({},ri),t),{prefix:e||""});return{data:yield Te(this.fetch,`${this.url}/object/list/${this.bucketId}`,r,{headers:this.headers},s),error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}})}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const ii="2.5.5",oi={"X-Client-Info":`storage-js/${ii}`};var $e=function(n,e,t,s){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(s.next(u))}catch(h){o(h)}}function l(u){try{c(s.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):r(u.value).then(a,l)}c((s=s.apply(n,e||[])).next())})};class ai{constructor(e,t={},s){this.url=e,this.headers=Object.assign(Object.assign({},oi),t),this.fetch=cr(s)}listBuckets(){return $e(this,void 0,void 0,function*(){try{return{data:yield $t(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(he(e))return{data:null,error:e};throw e}})}getBucket(e){return $e(this,void 0,void 0,function*(){try{return{data:yield $t(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(t){if(he(t))return{data:null,error:t};throw t}})}createBucket(e,t={public:!1}){return $e(this,void 0,void 0,function*(){try{return{data:yield Te(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(s){if(he(s))return{data:null,error:s};throw s}})}updateBucket(e,t){return $e(this,void 0,void 0,function*(){try{return{data:yield si(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(s){if(he(s))return{data:null,error:s};throw s}})}emptyBucket(e){return $e(this,void 0,void 0,function*(){try{return{data:yield Te(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(t){if(he(t))return{data:null,error:t};throw t}})}deleteBucket(e){return $e(this,void 0,void 0,function*(){try{return{data:yield ur(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(t){if(he(t))return{data:null,error:t};throw t}})}}class li extends ai{constructor(e,t={},s){super(e,t,s)}from(e){return new ni(this.url,this.headers,e,this.fetch)}}const ci="2.39.8";let tt="";typeof Deno<"u"?tt="deno":typeof document<"u"?tt="web":typeof navigator<"u"&&navigator.product==="ReactNative"?tt="react-native":tt="node";const ui={"X-Client-Info":`supabase-js-${tt}/${ci}`},hi={headers:ui},di={schema:"public"},fi={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},_i={};var gi=function(n,e,t,s){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(s.next(u))}catch(h){o(h)}}function l(u){try{c(s.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):r(u.value).then(a,l)}c((s=s.apply(n,e||[])).next())})};const mi=n=>{let e;return n?e=n:typeof fetch>"u"?e=Gt:e=fetch,(...t)=>e(...t)},pi=()=>typeof Headers>"u"?ir:Headers,vi=(n,e,t)=>{const s=mi(t),r=pi();return(i,o)=>gi(void 0,void 0,void 0,function*(){var a;const l=(a=yield e())!==null&&a!==void 0?a:n;let c=new r(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",n),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),s(i,Object.assign(Object.assign({},o),{headers:c}))})};function yi(n){return n.replace(/\/$/,"")}function bi(n,e){const{db:t,auth:s,realtime:r,global:i}=n,{db:o,auth:a,realtime:l,global:c}=e;return{db:Object.assign(Object.assign({},o),t),auth:Object.assign(Object.assign({},a),s),realtime:Object.assign(Object.assign({},l),r),global:Object.assign(Object.assign({},c),i)}}function wi(n){return Math.round(Date.now()/1e3)+n}function ki(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const e=Math.random()*16|0;return(n=="x"?e:e&3|8).toString(16)})}const ye=()=>typeof document<"u",je={tested:!1,writable:!1},nt=()=>{if(!ye())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(je.tested)return je.writable;const n=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(n,n),globalThis.localStorage.removeItem(n),je.tested=!0,je.writable=!0}catch{je.tested=!0,je.writable=!1}return je.writable};function Pt(n){const e={},t=new URL(n);if(t.hash&&t.hash[0]==="#")try{new URLSearchParams(t.hash.substring(1)).forEach((r,i)=>{e[i]=r})}catch{}return t.searchParams.forEach((s,r)=>{e[r]=s}),e}const hr=n=>{let e;return n?e=n:typeof fetch>"u"?e=(...t)=>Ve(()=>Promise.resolve().then(()=>ft),void 0,import.meta.url).then(({default:s})=>s(...t)):e=fetch,(...t)=>e(...t)},Si=n=>typeof n=="object"&&n!==null&&"status"in n&&"ok"in n&&"json"in n&&typeof n.json=="function",Pe=async(n,e,t)=>{await n.setItem(e,JSON.stringify(t))},mt=async(n,e)=>{const t=await n.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch{return t}},Rt=async(n,e)=>{await n.removeItem(e)};function Ei(n){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let t="",s,r,i,o,a,l,c,u=0;for(n=n.replace("-","+").replace("_","/");u>4,r=(a&15)<<4|l>>2,i=(l&3)<<6|c,t=t+String.fromCharCode(s),l!=64&&r!=0&&(t=t+String.fromCharCode(r)),c!=64&&i!=0&&(t=t+String.fromCharCode(i));return t}class At{constructor(){this.promise=new At.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}At.promiseConstructor=Promise;function vs(n){const e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,t=n.split(".");if(t.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(t[1]))throw new Error("JWT is not valid: payload is not in base64url format");const s=t[1];return JSON.parse(Ei(s))}async function Ti(n){return await new Promise(e=>{setTimeout(()=>e(null),n)})}function Ai(n,e){return new Promise((s,r)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await n(i);if(!e(i,null,o)){s(o);return}}catch(o){if(!e(i,o)){r(o);return}}})()})}function Oi(n){return("0"+n.toString(16)).substr(-2)}function Fe(){const e=new Uint32Array(56);if(typeof crypto>"u"){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=t.length;let r="";for(let i=0;i<56;i++)r+=t.charAt(Math.floor(Math.random()*s));return r}return crypto.getRandomValues(e),Array.from(e,Oi).join("")}async function Ii(n){const t=new TextEncoder().encode(n),s=await crypto.subtle.digest("SHA-256",t),r=new Uint8Array(s);return Array.from(r).map(i=>String.fromCharCode(i)).join("")}function ji(n){return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Me(n){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),n;const t=await Ii(n);return ji(t)}class Kt extends Error{constructor(e,t){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t}}function C(n){return typeof n=="object"&&n!==null&&"__isAuthError"in n}class Pi extends Kt{constructor(e,t){super(e,t),this.name="AuthApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}function Ri(n){return C(n)&&n.name==="AuthApiError"}class dr extends Kt{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class De extends Kt{constructor(e,t,s){super(e),this.name=t,this.status=s}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Be extends De{constructor(){super("Auth session missing!","AuthSessionMissingError",400)}}class Ct extends De{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500)}}class pt extends De{constructor(e){super(e,"AuthInvalidCredentialsError",400)}}class vt extends De{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class ys extends De{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Ft extends De{constructor(e,t){super(e,"AuthRetryableFetchError",t)}}function Lt(n){return C(n)&&n.name==="AuthRetryableFetchError"}class Ci extends De{constructor(e,t,s){super(e,"AuthWeakPasswordError",t),this.reasons=s}}var Li=function(n,e){var t={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(t[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);rn.msg||n.message||n.error_description||n.error||JSON.stringify(n),Di=[502,503,504];async function bs(n){if(!Si(n))throw new Ft(Ge(n),0);if(Di.includes(n.status))throw new Ft(Ge(n),n.status);let e;try{e=await n.json()}catch(t){throw new dr(Ge(t),t)}throw typeof e=="object"&&e&&typeof e.weak_password=="object"&&e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.reasons.reduce((t,s)=>t&&typeof s=="string",!0)?new Ci(Ge(e),n.status,e.weak_password.reasons):new Pi(Ge(e),n.status||500)}const Ni=(n,e,t,s)=>{const r={method:n,headers:(e==null?void 0:e.headers)||{}};return n==="GET"?r:(r.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),r.body=JSON.stringify(s),Object.assign(Object.assign({},r),t))};async function U(n,e,t,s){var r;const i=Object.assign({},s==null?void 0:s.headers);s!=null&&s.jwt&&(i.Authorization=`Bearer ${s.jwt}`);const o=(r=s==null?void 0:s.query)!==null&&r!==void 0?r:{};s!=null&&s.redirectTo&&(o.redirect_to=s.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await Ui(n,e,t+a,{headers:i,noResolveJson:s==null?void 0:s.noResolveJson},{},s==null?void 0:s.body);return s!=null&&s.xform?s==null?void 0:s.xform(l):{data:Object.assign({},l),error:null}}async function Ui(n,e,t,s,r,i){const o=Ni(e,s,r,i);let a;try{a=await n(t,o)}catch(l){throw console.error(l),new Ft(Ge(l),0)}if(a.ok||await bs(a),s!=null&&s.noResolveJson)return a;try{return await a.json()}catch(l){await bs(l)}}function Re(n){var e;let t=null;Bi(n)&&(t=Object.assign({},n),n.expires_at||(t.expires_at=wi(n.expires_in)));const s=(e=n.user)!==null&&e!==void 0?e:n;return{data:{session:t,user:s},error:null}}function ws(n){const e=Re(n);return!e.error&&n.weak_password&&typeof n.weak_password=="object"&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.message&&typeof n.weak_password.message=="string"&&n.weak_password.reasons.reduce((t,s)=>t&&typeof s=="string",!0)&&(e.data.weak_password=n.weak_password),e}function Ae(n){var e;return{data:{user:(e=n.user)!==null&&e!==void 0?e:n},error:null}}function $i(n){return{data:n,error:null}}function Fi(n){const{action_link:e,email_otp:t,hashed_token:s,redirect_to:r,verification_type:i}=n,o=Li(n,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:t,hashed_token:s,redirect_to:r,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function Mi(n){return n}function Bi(n){return n.access_token&&n.refresh_token&&n.expires_in}var zi=function(n,e){var t={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(t[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r0&&(f.forEach(v=>{const g=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),m=JSON.parse(v.split(";")[1].split("=")[1]);c[`${m}Page`]=g}),c.total=parseInt(d)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(C(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){try{return await U(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Ae})}catch(t){if(C(t))return{data:{user:null},error:t};throw t}}async updateUserById(e,t){try{return await U(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:Ae})}catch(s){if(C(s))return{data:{user:null},error:s};throw s}}async deleteUser(e,t=!1){try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:Ae})}catch(s){if(C(s))return{data:{user:null},error:s};throw s}}async _listFactors(e){try{const{data:t,error:s}=await U(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:r=>({data:{factors:r},error:null})});return{data:t,error:s}}catch(t){if(C(t))return{data:null,error:t};throw t}}async _deleteFactor(e){try{return{data:await U(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(t){if(C(t))return{data:null,error:t};throw t}}}const fr="0.0.0",Gi="http://localhost:9999",Hi="supabase.auth.token",Wi={"X-Client-Info":`gotrue-js/${fr}`},ks=10,Ji={getItem:n=>nt()?globalThis.localStorage.getItem(n):null,setItem:(n,e)=>{nt()&&globalThis.localStorage.setItem(n,e)},removeItem:n=>{nt()&&globalThis.localStorage.removeItem(n)}};function Ss(n={}){return{getItem:e=>n[e]||null,setItem:(e,t)=>{n[e]=t},removeItem:e=>{delete n[e]}}}function Ki(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const ze={debug:!!(globalThis&&nt()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class _r extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class Vi extends _r{}async function xi(n,e,t){ze.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",n,e);const s=new globalThis.AbortController;return e>0&&setTimeout(()=>{s.abort(),ze.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",n)},e),await globalThis.navigator.locks.request(n,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:s.signal},async r=>{if(r){ze.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",n,r.name);try{return await t()}finally{ze.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",n,r.name)}}else{if(e===0)throw ze.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",n),new Vi(`Acquiring an exclusive Navigator LockManager lock "${n}" immediately failed`);if(ze.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await t()}})}Ki();const Yi={url:Gi,storageKey:Hi,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Wi,flowType:"implicit",debug:!1},et=30*1e3,Es=3;async function Ts(n,e,t){return await t()}class at{constructor(e){var t,s;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=at.nextInstanceID,at.nextInstanceID+=1,this.instanceID>0&&ye()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const r=Object.assign(Object.assign({},Yi),e);if(this.logDebugMessages=!!r.debug,typeof r.debug=="function"&&(this.logger=r.debug),this.persistSession=r.persistSession,this.storageKey=r.storageKey,this.autoRefreshToken=r.autoRefreshToken,this.admin=new qi({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=hr(r.fetch),this.lock=r.lock||Ts,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,r.lock?this.lock=r.lock:ye()&&(!((t=globalThis==null?void 0:globalThis.navigator)===null||t===void 0)&&t.locks)?this.lock=xi:this.lock=Ts,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?r.storage?this.storage=r.storage:nt()?this.storage=Ji:(this.memoryStorage={},this.storage=Ss(this.memoryStorage)):(this.memoryStorage={},this.storage=Ss(this.memoryStorage)),ye()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${fr}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){try{const e=ye()?await this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:t,error:s}=await this._getSessionFromURL(e);if(s)return this._debug("#_initialize()","error detecting session from URL",s),(s==null?void 0:s.message)==="Identity is already linked"||(s==null?void 0:s.message)==="Identity is already linked to another user"?{error:s}:(await this._removeSession(),{error:s});const{session:r,redirectType:i}=t;return this._debug("#_initialize()","detected session in URL",r,"redirect type",i),await this._saveSession(r),setTimeout(async()=>{i==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",r):await this._notifyAllSubscribers("SIGNED_IN",r)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return C(e)?{error:e}:{error:new dr("Unexpected error during initialization",e)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signUp(e){var t,s,r;try{await this._removeSession();let i;if("email"in e){const{email:u,password:h,options:d}=e;let f=null,v=null;if(this.flowType==="pkce"){const g=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,g),f=await Me(g),v=g===f?"plain":"s256"}i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:d==null?void 0:d.emailRedirectTo,body:{email:u,password:h,data:(t=d==null?void 0:d.data)!==null&&t!==void 0?t:{},gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:f,code_challenge_method:v},xform:Re})}else if("phone"in e){const{phone:u,password:h,options:d}=e;i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:h,data:(s=d==null?void 0:d.data)!==null&&s!==void 0?s:{},channel:(r=d==null?void 0:d.channel)!==null&&r!==void 0?r:"sms",gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:Re})}else throw new pt("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(i){if(C(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithPassword(e){try{await this._removeSession();let t;if("email"in e){const{email:i,password:o,options:a}=e;t=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ws})}else if("phone"in e){const{phone:i,password:o,options:a}=e;t=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ws})}else throw new pt("You must provide either an email or phone number and a password");const{data:s,error:r}=t;return r?{data:{user:null,session:null},error:r}:!s||!s.session||!s.user?{data:{user:null,session:null},error:new Ct}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:r})}catch(t){if(C(t))return{data:{user:null,session:null},error:t};throw t}}async signInWithOAuth(e){var t,s,r,i;return await this._removeSession(),await this._handleProviderSignIn(e.provider,{redirectTo:(t=e.options)===null||t===void 0?void 0:t.redirectTo,scopes:(s=e.options)===null||s===void 0?void 0:s.scopes,queryParams:(r=e.options)===null||r===void 0?void 0:r.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async _exchangeCodeForSession(e){const t=await mt(this.storage,`${this.storageKey}-code-verifier`),[s,r]=(t??"").split("/"),{data:i,error:o}=await U(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:s},xform:Re});return await Rt(this.storage,`${this.storageKey}-code-verifier`),o?{data:{user:null,session:null,redirectType:null},error:o}:!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:new Ct}:(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:r??null}),error:o})}async signInWithIdToken(e){await this._removeSession();try{const{options:t,provider:s,token:r,access_token:i,nonce:o}=e,a=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:r,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:t==null?void 0:t.captchaToken}},xform:Re}),{data:l,error:c}=a;return c?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Ct}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(t){if(C(t))return{data:{user:null,session:null},error:t};throw t}}async signInWithOtp(e){var t,s,r,i,o;try{if(await this._removeSession(),"email"in e){const{email:a,options:l}=e;let c=null,u=null;if(this.flowType==="pkce"){const d=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,d),c=await Me(d),u=d===c?"plain":"s256"}const{error:h}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(t=l==null?void 0:l.data)!==null&&t!==void 0?t:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:h}}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u}}throw new pt("You must provide either an email or phone number.")}catch(a){if(C(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(e){var t,s;try{e.type!=="email_change"&&e.type!=="phone_change"&&await this._removeSession();let r,i;"options"in e&&(r=(t=e.options)===null||t===void 0?void 0:t.redirectTo,i=(s=e.options)===null||s===void 0?void 0:s.captchaToken);const{data:o,error:a}=await U(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:r,xform:Re});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(r){if(C(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithSSO(e){var t,s,r;try{await this._removeSession();let i=null,o=null;if(this.flowType==="pkce"){const a=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,a),i=await Me(a),o=a===i?"plain":"s256"}return await U(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(s=(t=e.options)===null||t===void 0?void 0:t.redirectTo)!==null&&s!==void 0?s:void 0}),!((r=e==null?void 0:e.options)===null||r===void 0)&&r.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:$i})}catch(i){if(C(i))return{data:null,error:i};throw i}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:t},error:s}=e;if(s)throw s;if(!t)throw new Be;const{error:r}=await U(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:r}})}catch(e){if(C(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{e.type!="email_change"&&e.type!="phone_change"&&await this._removeSession();const t=`${this.url}/resend`;if("email"in e){const{email:s,type:r,options:i}=e,{error:o}=await U(this.fetch,"POST",t,{headers:this.headers,body:{email:s,type:r,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in e){const{phone:s,type:r,options:i}=e,{data:o,error:a}=await U(this.fetch,"POST",t,{headers:this.headers,body:{phone:s,type:r,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new pt("You must provide either an email or phone number and a type")}catch(t){if(C(t))return{data:{user:null,session:null},error:t};throw t}}async getSession(){return await this.initializePromise,this._acquireLock(-1,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),r=(async()=>(await s,await t()))();return this.pendingInLock.push((async()=>{try{await r}catch{}})()),r}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const s=t();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const r=[...this.pendingInLock];await Promise.all(r),this.pendingInLock.splice(0,r.length)}return await s}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const t=await mt(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),t!==null&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const s=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",e.expires_at),!s)return{data:{session:e},error:null};const{session:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{session:null},error:i}:{data:{session:r},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Ae}):await this._useSession(async t=>{var s,r;const{data:i,error:o}=t;if(o)throw o;return await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(r=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&r!==void 0?r:void 0,xform:Ae})})}catch(t){if(C(t))return{data:{user:null},error:t};throw t}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async s=>{const{data:r,error:i}=s;if(i)throw i;if(!r.session)throw new Be;const o=r.session;let a=null,l=null;if(this.flowType==="pkce"&&e.email!=null){const h=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,h),a=await Me(h),l=h===a?"plain":"s256"}const{data:c,error:u}=await U(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:t==null?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Ae});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(s){if(C(s))return{data:{user:null},error:s};throw s}}_decodeJWT(e){return vs(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Be;const t=Date.now()/1e3;let s=t,r=!0,i=null;const o=vs(e.access_token);if(o.exp&&(s=o.exp,r=s<=t),r){const{session:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)throw l;i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:s-t,expires_at:s},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(t){if(C(t))return{data:{session:null,user:null},error:t};throw t}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{var s;if(!e){const{data:o,error:a}=t;if(a)throw a;e=(s=o.session)!==null&&s!==void 0?s:void 0}if(!(e!=null&&e.refresh_token))throw new Be;const{session:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:r?{data:{user:r.user,session:r},error:null}:{data:{user:null,session:null},error:null}})}catch(t){if(C(t))return{data:{user:null,session:null},error:t};throw t}}async _getSessionFromURL(e){try{if(!ye())throw new vt("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new vt("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!e)throw new ys("Not a valid PKCE flow url.");const t=Pt(window.location.href);if(e){if(!t.code)throw new ys("No code detected.");const{data:k,error:O}=await this._exchangeCodeForSession(t.code);if(O)throw O;const T=new URL(window.location.href);return T.searchParams.delete("code"),window.history.replaceState(window.history.state,"",T.toString()),{data:{session:k.session,redirectType:null},error:null}}if(t.error||t.error_description||t.error_code)throw new vt(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});const{provider_token:s,provider_refresh_token:r,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!i||!a||!o||!c)throw new vt("No session defined in URL");const u=Math.round(Date.now()/1e3),h=parseInt(a);let d=u+h;l&&(d=parseInt(l));const f=d-u;f*1e3<=et&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${h}s`);const v=d-h;u-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,d,u):u-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",v,d,u);const{data:g,error:m}=await this._getUser(i);if(m)throw m;const b={provider_token:s,provider_refresh_token:r,access_token:i,expires_in:h,expires_at:d,refresh_token:o,token_type:c,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:b,redirectType:t.type},error:null}}catch(t){if(C(t))return{data:{session:null,redirectType:null},error:t};throw t}}_isImplicitGrantFlow(){const e=Pt(window.location.href);return!!(ye()&&(e.access_token||e.error_description))}async _isPKCEFlow(){const e=Pt(window.location.href),t=await mt(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async t=>{var s;const{data:r,error:i}=t;if(i)return{error:i};const o=(s=r.session)===null||s===void 0?void 0:s.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(Ri(a)&&(a.status===404||a.status===401)))return{error:a}}return e!=="others"&&(await this._removeSession(),await Rt(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(e){const t=ki(),s={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,s),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(t)})))(),{data:{subscription:s}}}async _emitInitialSession(e){return await this._useSession(async t=>{var s,r;try{const{data:{session:i},error:o}=t;if(o)throw o;await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),console.error(i)}})}async resetPasswordForEmail(e,t={}){let s=null,r=null;if(this.flowType==="pkce"){const i=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,`${i}/PASSWORD_RECOVERY`),s=await Me(i),r=i===s?"plain":"s256"}try{return await U(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:s,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(i){if(C(i))return{data:null,error:i};throw i}}async getUserIdentities(){var e;try{const{data:t,error:s}=await this.getUser();if(s)throw s;return{data:{identities:(e=t.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(t){if(C(t))return{data:null,error:t};throw t}}async linkIdentity(e){var t;try{const{data:s,error:r}=await this._useSession(async i=>{var o,a,l,c,u;const{data:h,error:d}=i;if(d)throw d;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await U(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(c=h.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(r)throw r;return ye()&&!(!((t=e.options)===null||t===void 0)&&t.skipBrowserRedirect)&&window.location.assign(s==null?void 0:s.url),{data:{provider:e.provider,url:s==null?void 0:s.url},error:null}}catch(s){if(C(s))return{data:{provider:e.provider,url:null},error:s};throw s}}async unlinkIdentity(e){try{return await this._useSession(async t=>{var s,r;const{data:i,error:o}=t;if(o)throw o;return await U(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(r=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&r!==void 0?r:void 0})})}catch(t){if(C(t))return{data:null,error:t};throw t}}async _refreshAccessToken(e){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const s=Date.now();return await Ai(async r=>(await Ti(r*200),this._debug(t,"refreshing attempt",r),await U(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Re})),(r,i,o)=>o&&o.error&&Lt(o.error)&&Date.now()+(r+1)*200-s{try{await a.callback(e,t)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;athis._autoRefreshTokenTick(),et);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async t=>{const{data:{session:s}}=t;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const r=Math.floor((s.expires_at*1e3-e)/et);this._debug("#_autoRefreshTokenTick()",`access token expires in ${r} ticks, a tick lasts ${et}ms, refresh threshold is ${Es} ticks`),r<=Es&&await this._callRefreshToken(s.refresh_token)})}catch(t){console.error("Auto refresh tick failed with error. This is likely a transient error.",t)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof _r)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!ye()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,s){const r=[`provider=${encodeURIComponent(t)}`];if(s!=null&&s.redirectTo&&r.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),s!=null&&s.scopes&&r.push(`scopes=${encodeURIComponent(s.scopes)}`),this.flowType==="pkce"){const i=Fe();await Pe(this.storage,`${this.storageKey}-code-verifier`,i);const o=await Me(i),a=i===o?"plain":"s256";this._debug("PKCE","code verifier",`${i.substring(0,5)}...`,"code challenge",o,"method",a);const l=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(a)}`});r.push(l.toString())}if(s!=null&&s.queryParams){const i=new URLSearchParams(s.queryParams);r.push(i.toString())}return s!=null&&s.skipBrowserRedirect&&r.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${e}?${r.join("&")}`}async _unenroll(e){try{return await this._useSession(async t=>{var s;const{data:r,error:i}=t;return i?{data:null,error:i}:await U(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(s=r==null?void 0:r.session)===null||s===void 0?void 0:s.access_token})})}catch(t){if(C(t))return{data:null,error:t};throw t}}async _enroll(e){try{return await this._useSession(async t=>{var s,r;const{data:i,error:o}=t;if(o)return{data:null,error:o};const{data:a,error:l}=await U(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:e.friendlyName,factor_type:e.factorType,issuer:e.issuer},headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});return l?{data:null,error:l}:(!((r=a==null?void 0:a.totp)===null||r===void 0)&&r.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),{data:a,error:null})})}catch(t){if(C(t))return{data:null,error:t};throw t}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var s;const{data:r,error:i}=t;if(i)return{data:null,error:i};const{data:o,error:a}=await U(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(s=r==null?void 0:r.session)===null||s===void 0?void 0:s.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})})}catch(t){if(C(t))return{data:null,error:t};throw t}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var s;const{data:r,error:i}=t;return i?{data:null,error:i}:await U(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{headers:this.headers,jwt:(s=r==null?void 0:r.session)===null||s===void 0?void 0:s.access_token})})}catch(t){if(C(t))return{data:null,error:t};throw t}})}async _challengeAndVerify(e){const{data:t,error:s}=await this._challenge({factorId:e.factorId});return s?{data:null,error:s}:await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){const{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};const s=(e==null?void 0:e.factors)||[],r=s.filter(i=>i.factor_type==="totp"&&i.status==="verified");return{data:{all:s,totp:r},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var t,s;const{data:{session:r},error:i}=e;if(i)return{data:null,error:i};if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const o=this._decodeJWT(r.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((s=(t=r.user.factors)===null||t===void 0?void 0:t.filter(h=>h.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(l="aal2");const u=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:u},error:null}}))}}at.nextInstanceID=0;class Xi extends at{constructor(e){super(e)}}var Qi=function(n,e,t,s){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(s.next(u))}catch(h){o(h)}}function l(u){try{c(s.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):r(u.value).then(a,l)}c((s=s.apply(n,e||[])).next())})};class Zi{constructor(e,t,s){var r,i,o,a,l,c,u,h;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw new Error("supabaseUrl is required.");if(!t)throw new Error("supabaseKey is required.");const d=yi(e);this.realtimeUrl=`${d}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${d}/auth/v1`,this.storageUrl=`${d}/storage/v1`,this.functionsUrl=`${d}/functions/v1`;const f=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,v={db:di,realtime:_i,auth:Object.assign(Object.assign({},fi),{storageKey:f}),global:hi},g=bi(s??{},v);this.storageKey=(i=(r=g.auth)===null||r===void 0?void 0:r.storageKey)!==null&&i!==void 0?i:"",this.headers=(a=(o=g.global)===null||o===void 0?void 0:o.headers)!==null&&a!==void 0?a:{},this.auth=this._initSupabaseAuthClient((l=g.auth)!==null&&l!==void 0?l:{},this.headers,(c=g.global)===null||c===void 0?void 0:c.fetch),this.fetch=vi(t,this._getAccessToken.bind(this),(u=g.global)===null||u===void 0?void 0:u.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},g.realtime)),this.rest=new Ht(`${d}/rest/v1`,{headers:this.headers,schema:(h=g.db)===null||h===void 0?void 0:h.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new Tn(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new li(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},s={}){return this.rest.rpc(e,t,s)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t;return Qi(this,void 0,void 0,function*(){const{data:s}=yield this.auth.getSession();return(t=(e=s.session)===null||e===void 0?void 0:e.access_token)!==null&&t!==void 0?t:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:r,storageKey:i,flowType:o,debug:a},l,c){const u={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Xi({url:this.authUrl,headers:Object.assign(Object.assign({},u),l),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:r,flowType:o,debug:a,fetch:c})}_initRealtimeClient(e){return new xn(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,s)=>{this._handleTokenChanged(t,"CLIENT",s==null?void 0:s.access_token)})}_handleTokenChanged(e,t,s){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==s?(this.realtime.setAuth(s??null),this.changedAccessToken=s):e==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const eo=(n,e,t)=>new Zi(n,e,t),to="https://lwpcpixtrbcdhvktfvas.supabase.co",so="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imx3cGNwaXh0cmJjZGh2a3RmdmFzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTY2NTk5NTYsImV4cCI6MjAzMjIzNTk1Nn0.MY2A7T7t9DjfJhRNADoLukGlOfOsXvX3TryKOxI8XDI",gr=eo(to,so);async function ro(){try{const{data:n,error:e}=await gr.from("entries").select("*");return e?(console.error("Error fetching data:",e),null):n}catch(n){return console.error("Unexpected error:",n),null}}async function Vt(n,e){try{const{data:t,error:s}=await gr.from(e).insert(n);return s?(console.error("Error inserting data:",s),null):t}catch(t){return console.error("Unexpected error:",t),null}}function As(n,e,t){const s=n.slice();return s[12]=e[t],s[14]=t,s}function Os(n,e){let t,s=e[12].name+"",r,i=`url(${Oe}/assets/toploaders/${e[12].name}.png)`,o,a;function l(){return e[7](e[12])}return{key:n,first:null,c(){t=S("button"),r=V(s),this.h()},l(c){t=E(c,"BUTTON",{key:!0,class:!0});var u=j(t);r=x(u,s),u.forEach(p),this.h()},h(){_(t,"key",e[12]),_(t,"class","svelte-v34u9f"),oe(t,"active",e[0]==e[12].name),W(t,"--toploader-url",i),W(t,"--color-accent",e[5][e[14]]),this.first=t},m(c,u){P(c,t,u),w(t,r),o||(a=ke(t,"click",l),o=!0)},p(c,u){e=c,u&9&&oe(t,"active",e[0]==e[12].name)},d(c){c&&p(t),o=!1,a()}}}function no(n){let e,t,s="Which generation?",r,i,o,a=[],l=new Map,c,u,h,d,f=ee(n[3]);const v=g=>g[12];for(let g=0;gt(9,s=g)),ie(n,bt,g=>t(0,r=g)),ie(n,yt,g=>t(1,i=g)),ie(n,Mt,g=>t(10,o=g));let{artist:a}=e,l=[{id:0,name:"I don't know"},{id:1,name:"1st"},{id:2,name:"2nd"},{id:3,name:"3rd"},{id:4,name:"4th"},{id:5,name:"5th"}],[c,...u]=l;const h=g=>{Bt.set("currentArtistIndex",s+1);let m={artist_id:a.id,gen:g.id,user_id:o};Vt(m,"entries");let b;clearInterval(b),g.id?(we(yt,i=!0,i),we(bt,r=g.name,r),b=setTimeout(()=>{we(yt,i=!1,i),we(bt,r=void 0,r),we(st,++s,s)},1e3)):we(st,++s,s)},d=["#92BAFF","#84F881","#E05F89","#565656","#ECCA48"],f=g=>h(g),v=()=>h(c);return n.$$set=g=>{"artist"in g&&t(6,a=g.artist)},[r,i,c,u,h,d,a,f,v]}class oo extends ce{constructor(e){super(),ue(this,e,io,no,ae,{artist:6})}}function Is(n,e,t){const s=n.slice();return s[8]=e[t],s}function js(n){let e,t,s,r,i,o,a,l,c=n[8]+"",u,h,d,f,v;return{c(){e=S("div"),t=S("input"),o=G(),a=S("label"),l=S("div"),u=V(c),this.h()},l(g){e=E(g,"DIV",{class:!0});var m=j(e);t=E(m,"INPUT",{type:!0,id:!0,name:!0,"aria-labelledby":!0,class:!0}),o=H(m),a=E(m,"LABEL",{for:!0,id:!0,class:!0});var b=j(a);l=E(b,"DIV",{class:!0});var k=j(l);u=x(k,c),k.forEach(p),b.forEach(p),m.forEach(p),this.h()},h(){_(t,"type","checkbox"),_(t,"id",s=n[8]),_(t,"name","factor"),t.value=r=n[8],_(t,"aria-labelledby",i=`label-${n[8]}`),_(t,"class","svelte-1dbz5sc"),_(l,"class","factor-label svelte-1dbz5sc"),_(a,"for",h=n[8]),_(a,"id",d=`label-${n[8]}`),_(a,"class","checkbox-label svelte-1dbz5sc"),_(e,"class","round svelte-1dbz5sc")},m(g,m){P(g,e,m),w(e,t),w(e,o),w(e,a),w(a,l),w(l,u),f||(v=ke(t,"change",n[1]),f=!0)},p(g,m){m&1&&s!==(s=g[8])&&_(t,"id",s),m&1&&r!==(r=g[8])&&(t.value=r),m&1&&i!==(i=`label-${g[8]}`)&&_(t,"aria-labelledby",i),m&1&&c!==(c=g[8]+"")&&fe(u,c),m&1&&h!==(h=g[8])&&_(a,"for",h),m&1&&d!==(d=`label-${g[8]}`)&&_(a,"id",d)},d(g){g&&p(e),f=!1,v()}}}function ao(n){let e,t,s=n[0].title+"",r,i,o,a=n[0].text+"",l,c,u,h,d,f,v=ee(n[0].factors),g=[];for(let m=0;mt(6,s=h)),ie(n,Mt,h=>t(7,r=h));let{arrowStroke:i="rgba(120, 120, 120, 1)"}=e,{arrowStrokeWidth:o="3"}=e,{selectedFactors:a=[]}=e,{copy:l}=e;function c(h){const d=h.target.value;h.target.checked?a.length<3?t(3,a=[...a,d]):h.target.checked=!1:t(3,a=a.filter(f=>f!==d))}function u(){let h={user_id:r,response:a.join(";")};Vt(h,"survey"),Bt.set("surveyComplete",!0),we(Le,s="results",s)}return n.$$set=h=>{"arrowStroke"in h&&t(4,i=h.arrowStroke),"arrowStrokeWidth"in h&&t(5,o=h.arrowStrokeWidth),"selectedFactors"in h&&t(3,a=h.selectedFactors),"copy"in h&&t(0,l=h.copy)},[l,c,u,a,i,o]}class co extends ce{constructor(e){super(),ue(this,e,lo,ao,ae,{arrowStroke:4,arrowStrokeWidth:5,selectedFactors:3,copy:0})}}function uo(n,e){var t=parseInt(n.substring(1,3),16),s=parseInt(n.substring(3,5),16),r=parseInt(n.substring(5,7),16);t=parseInt(t*(100+e)/100),s=parseInt(s*(100+e)/100),r=parseInt(r*(100+e)/100),t=t<255?t:255,s=s<255?s:255,r=r<255?r:255,t=Math.round(t),s=Math.round(s),r=Math.round(r);var i=t.toString(16).length==1?"0"+t.toString(16):t.toString(16),o=s.toString(16).length==1?"0"+s.toString(16):s.toString(16),a=r.toString(16).length==1?"0"+r.toString(16):r.toString(16);return"#"+i+o+a}function Ps(n,e,t){const s=n.slice();return s[15]=e[t],s}function Rs(n,e,t){var l,c;const s=n.slice();s[18]=e[t],s[24]=t;const r=s[6][s[15].id];s[19]=r;const i=Number((l=s[19])==null?void 0:l[s[18]])||0;s[20]=i;const o=s[10][s[24]];s[21]=o;const a=((c=s[19])==null?void 0:c.highestGen)==s[18];return s[22]=a,s}function ho(n){let e;return{c(){e=V("Submit")},l(t){e=x(t,"Submit")},m(t,s){P(t,e,s)},d(t){t&&p(e)}}}function fo(n){let e;return{c(){e=V("Thank you!")},l(t){e=x(t,"Thank you!")},m(t,s){P(t,e,s)},d(t){t&&p(e)}}}function _o(n){let e,t,s;return t=new on({props:{color:"#000",strokeWidth:n[1]}}),{c(){e=V(`Show survey results - `),te(t.$$.fragment)},l(r){e=x(r,`Show survey results - `),se(t.$$.fragment,r)},m(r,i){P(r,e,i),re(t,r,i),s=!0},p(r,i){const o={};i&2&&(o.strokeWidth=r[1]),t.$set(o)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){R(t.$$.fragment,r),s=!1},d(r){r&&p(e),ne(t,r)}}}function go(n){let e,t,s;return t=new hn({props:{color:"#000",strokeWidth:n[1]}}),{c(){e=V(`Hide survey results - `),te(t.$$.fragment)},l(r){e=x(r,`Hide survey results - `),se(t.$$.fragment,r)},m(r,i){P(r,e,i),re(t,r,i),s=!0},p(r,i){const o={};i&2&&(o.strokeWidth=r[1]),t.$set(o)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){R(t.$$.fragment,r),s=!1},d(r){r&&p(e),ne(t,r)}}}function Cs(n){let e,t,s,r,i=ee(n[0]),o=[];for(let a=0;a{r&&(s&&s.end(1),t=Zs(e,rs,{}),t.start())}),r=!0)},o(a){t&&t.invalidate(),a&&(s=Er(e,rs,{})),r=!1},d(a){a&&p(e),Ie(o,a),a&&s&&s.end()}}}function Ls(n){let e,t=n[18]&&mo(n);return{c(){e=S("span"),t&&t.c(),this.h()},l(s){e=E(s,"SPAN",{class:!0});var r=j(e);t&&t.l(r),r.forEach(p),this.h()},h(){_(e,"class","svelte-nc345f"),oe(e,"isLargest",n[22])},m(s,r){P(s,e,r),t&&t.m(e,null)},p(s,r){s[18]&&t.p(s,r),r&321&&oe(e,"isLargest",s[22])},d(s){s&&p(e),t&&t.d()}}}function mo(n){let e=n[9][n[24]]+"",t,s,r=n[22]&&Ds(n);return{c(){t=V(e),r&&r.c(),s=Q()},l(i){t=x(i,e),r&&r.l(i),s=Q()},m(i,o){P(i,t,o),r&&r.m(i,o),P(i,s,o)},p(i,o){i[22]?r?r.p(i,o):(r=Ds(i),r.c(),r.m(s.parentNode,s)):r&&(r.d(1),r=null)},d(i){i&&(p(t),p(s)),r&&r.d(i)}}}function Ds(n){let e,t=n[20].toFixed(0)+"",s,r;return{c(){e=V(" gen ("),s=V(t),r=V("%)")},l(i){e=x(i," gen ("),s=x(i,t),r=x(i,"%)")},m(i,o){P(i,e,o),P(i,s,o),P(i,r,o)},p(i,o){o&65&&t!==(t=i[20].toFixed(0)+"")&&fe(s,t)},d(i){i&&(p(e),p(s),p(r))}}}function Ns(n){let e,t,s,r=`${n[20]}%`,i=n[20]>10&&Ls(n);return{c(){e=S("div"),i&&i.c(),t=G(),this.h()},l(o){e=E(o,"DIV",{class:!0,"data-percentage":!0});var a=j(e);i&&i.l(a),t=H(a),a.forEach(p),this.h()},h(){_(e,"class","cell gen-"+n[18]+" svelte-nc345f"),_(e,"data-percentage",s=n[20]+"%"),W(e,"--width",r),W(e,"--color",uo(n[21],-40)),W(e,"--bg",n[21])},m(o,a){P(o,e,a),i&&i.m(e,null),w(e,t)},p(o,a){o[20]>10?i?i.p(o,a):(i=Ls(o),i.c(),i.m(e,t)):i&&(i.d(1),i=null),a&65&&s!==(s=o[20]+"%")&&_(e,"data-percentage",s),a&65&&r!==(r=`${o[20]}%`)&&W(e,"--width",r)},d(o){o&&p(e),i&&i.d()}}}function Us(n){let e,t,s=n[15].name+"",r,i,o,a,l=ee(n[8]),c=[];for(let u=0;u{ve[Ee]=null}),pe(),b=ve[m],b?b.p($,B):(b=ve[m]=Xe[m]($),b.c()),A(b,1),b.m(g,null)),$[5]?Z?(Z.p($,B),B&32&&A(Z,1)):(Z=Cs($),Z.c(),A(Z,1),Z.m(e,O)):Z&&(me(),R(Z,1,1,()=>{Z=null}),pe()),(!K||B&4)&&z!==(z=$[2].methodology+"")&&fe(J,z)},i($){K||(A(b),A(Z),K=!0)},o($){R(b),R(Z),K=!1},d($){$&&p(e),de.d(),ve[m].d(),Z&&Z.d(),Y=!1,Ys(L)}}}function $s(n,e){return n.reduce(function(t,s){return(t[s[e]]=t[s[e]]||[]).push(s),t},{})}function vo(n,e,t){let s;ie(n,Mt,k=>t(14,s=k));let{artists:r}=e,{arrowStroke:i="rgba(120, 120, 120, 1)"}=e,{arrowStrokeWidth:o="3"}=e,{copy:a}=e,l="",c=!1;const u=k=>{k.preventDefault(),Vt({user_id:s,email:l},"emails"),t(4,c=!0)};let h=!1,d={};kt(async()=>{let k=await ro(),O=$s(k,"artist_id");Object.entries(O).map(([T,y])=>{let D=$s(y,"gen"),N=y.length,F={},z,J=0;Object.entries(D).forEach(([K,Y])=>{let I=(Y.length/N*100).toFixed(2);F[K]=I,I>J&&(z=K,J=I)}),t(6,d[T]={...F,highestGen:z},d)})});let f=[1,2,3,4,5,0],v=["1st","2nd","3rd","4th","5th","IDK"],g=["#e0afff","#f0d9ff","#e2dd9c","#688f8a","#a1c588","#dddddd"];function m(){l=this.value,t(3,l)}const b=()=>t(5,h=!h);return n.$$set=k=>{"artists"in k&&t(0,r=k.artists),"arrowStroke"in k&&t(11,i=k.arrowStroke),"arrowStrokeWidth"in k&&t(1,o=k.arrowStrokeWidth),"copy"in k&&t(2,a=k.copy)},[r,o,a,l,c,h,d,u,f,v,g,i,m,b]}class yo extends ce{constructor(e){super(),ue(this,e,vo,po,ae,{artists:0,arrowStroke:11,arrowStrokeWidth:1,copy:2})}}function bo(n){let e,t;return e=new yo({props:{artists:n[1],copy:n[2].results}}),{c(){te(e.$$.fragment)},l(s){se(e.$$.fragment,s)},m(s,r){re(e,s,r),t=!0},p(s,r){const i={};r&2&&(i.artists=s[1]),r&4&&(i.copy=s[2].results),e.$set(i)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){R(e.$$.fragment,s),t=!1},d(s){ne(e,s)}}}function wo(n){let e,t,s;function r(o){n[7](o)}let i={copy:n[2].survey};return n[4]!==void 0&&(i.selectedFactors=n[4]),e=new co({props:i}),it.push(()=>er(e,"selectedFactors",r)),{c(){te(e.$$.fragment)},l(o){se(e.$$.fragment,o)},m(o,a){re(e,o,a),s=!0},p(o,a){const l={};a&4&&(l.copy=o[2].survey),!t&&a&16&&(t=!0,l.selectedFactors=o[4],Qs(()=>t=!1)),e.$set(l)},i(o){s||(A(e.$$.fragment,o),s=!0)},o(o){R(e.$$.fragment,o),s=!1},d(o){ne(e,o)}}}function ko(n){let e,t,s,r,i,o;return e=new en({props:{maxArtistIndex:n[1].length}}),s=new yn({props:{artist:n[5]}}),i=new oo({props:{artist:n[5]}}),{c(){te(e.$$.fragment),t=G(),te(s.$$.fragment),r=G(),te(i.$$.fragment)},l(a){se(e.$$.fragment,a),t=H(a),se(s.$$.fragment,a),r=H(a),se(i.$$.fragment,a)},m(a,l){re(e,a,l),P(a,t,l),re(s,a,l),P(a,r,l),re(i,a,l),o=!0},p(a,l){const c={};l&2&&(c.maxArtistIndex=a[1].length),e.$set(c);const u={};l&32&&(u.artist=a[5]),s.$set(u);const h={};l&32&&(h.artist=a[5]),i.$set(h)},i(a){o||(A(e.$$.fragment,a),A(s.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){R(e.$$.fragment,a),R(s.$$.fragment,a),R(i.$$.fragment,a),o=!1},d(a){a&&(p(t),p(r)),ne(e,a),ne(s,a),ne(i,a)}}}function So(n){let e,t,s,r;const i=[ko,wo,bo],o=[];function a(l,c){return l[3]=="voting"?0:l[3]=="survey"?1:l[3]=="results"?2:-1}return~(t=a(n))&&(s=o[t]=i[t](n)),{c(){e=S("section"),s&&s.c(),this.h()},l(l){e=E(l,"SECTION",{class:!0});var c=j(e);s&&s.l(c),c.forEach(p),this.h()},h(){_(e,"class","board svelte-d12z7e"),oe(e,"experienceStarted",n[0]),W(e,"--justify-content",n[3]=="voting"?"space-between":"center")},m(l,c){P(l,e,c),~t&&o[t].m(e,null),r=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&o[t].p(l,c):(s&&(me(),R(o[u],1,1,()=>{o[u]=null}),pe()),~t?(s=o[t],s?s.p(l,c):(s=o[t]=i[t](l),s.c()),A(s,1),s.m(e,null)):s=null),(!r||c&1)&&oe(e,"experienceStarted",l[0]),c&8&&W(e,"--justify-content",l[3]=="voting"?"space-between":"center")},i(l){r||(A(s),r=!0)},o(l){R(s),r=!1},d(l){l&&p(e),~t&&o[t].d()}}}function Eo(n,e,t){let s,r,i;ie(n,Le,h=>t(3,r=h)),ie(n,st,h=>t(6,i=h));let{experienceStarted:o}=e,{artists:a}=e,{copy:l}=e,c=[];we(Le,r="voting",r);function u(h){c=h,t(4,c)}return n.$$set=h=>{"experienceStarted"in h&&t(0,o=h.experienceStarted),"artists"in h&&t(1,a=h.artists),"copy"in h&&t(2,l=h.copy)},n.$$.update=()=>{n.$$.dirty&66&&t(5,s=a==null?void 0:a[i]),n.$$.dirty&74&&i>a.length-1&&r=="voting"&&we(Le,r="survey",r),n.$$.dirty&66&&i>a.length-1&&Bt.get("surveyComplete")&&we(Le,r="results",r)},[o,a,l,r,c,s,i,u]}class To extends ce{constructor(e){super(),ue(this,e,Eo,So,ae,{experienceStarted:0,artists:1,copy:2})}}function Fs(n,e,t){const s=n.slice();s[11]=e[t].type,s[12]=e[t].value,s[13]=e[t].component,s[16]=t;const r=s[16]==s[2];return s[14]=r,s}function Ms(n,e,t){const s=n.slice();return s[17]=e[t],s}function Bs(n,e,t){const s=n.slice();return s[20]=e[t],s}function zs(n){let e,t;return{c(){e=S("link"),this.h()},l(s){e=E(s,"LINK",{rel:!0,as:!0,href:!0}),this.h()},h(){_(e,"rel","preload"),_(e,"as","image"),_(e,"href",t=n[20])},m(s,r){P(s,e,r)},p(s,r){r&16&&t!==(t=s[20])&&_(e,"href",t)},d(s){s&&p(e)}}}function qs(n){let e,t,s,r,i=n[6].indexOf(n[2])==-1,o;function a(u){n[9](u)}let l={duration:"0",$$slots:{default:[jo]},$$scope:{ctx:n}};n[2]!==void 0&&(l.current=n[2]),t=new $r({props:l}),n[8](t),it.push(()=>er(t,"current",a));let c=i&&Ks(n);return{c(){e=S("article"),te(t.$$.fragment),r=G(),c&&c.c(),this.h()},l(u){e=E(u,"ARTICLE",{class:!0});var h=j(e);se(t.$$.fragment,h),r=H(h),c&&c.l(h),h.forEach(p),this.h()},h(){_(e,"class","svelte-u468tu"),W(e,"--height",n[5]=="results"?"100%":"100svh")},m(u,h){P(u,e,h),re(t,e,null),w(e,r),c&&c.m(e,null),o=!0},p(u,h){const d={};h&8388613&&(d.$$scope={dirty:h,ctx:u}),!s&&h&4&&(s=!0,d.current=u[2],Qs(()=>s=!1)),t.$set(d),h&4&&(i=u[6].indexOf(u[2])==-1),i?c?(c.p(u,h),h&4&&A(c,1)):(c=Ks(u),c.c(),A(c,1),c.m(e,null)):c&&(me(),R(c,1,1,()=>{c=null}),pe()),h&32&&W(e,"--height",u[5]=="results"?"100%":"100svh")},i(u){o||(A(t.$$.fragment,u),A(c),o=!0)},o(u){R(t.$$.fragment,u),R(c),o=!1},d(u){u&&p(e),n[8](null),ne(t),c&&c.d()}}}function Ao(n){let e,t,s=n[14]&&Gs(n);return{c(){s&&s.c(),e=Q()},l(r){s&&s.l(r),e=Q()},m(r,i){s&&s.m(r,i),P(r,e,i),t=!0},p(r,i){r[14]?s?(s.p(r,i),i&4&&A(s,1)):(s=Gs(r),s.c(),A(s,1),s.m(e.parentNode,e)):s&&(me(),R(s,1,1,()=>{s=null}),pe())},i(r){t||(A(s),t=!0)},o(r){R(s),t=!1},d(r){r&&p(e),s&&s.d(r)}}}function Oo(n){let e,t=ee(n[12]),s=[];for(let r=0;r{o&&(i||(i=Zt(e,ss,{y:20,duration:500},!0)),i.run(1))}),o=!0)},o(a){a&&(i||(i=Zt(e,ss,{y:20,duration:500},!1)),i.run(0)),o=!1},d(a){a&&p(e),a&&i&&i.end()}}}function Ws(n){let e,t=n[14]&&Hs(n);return{c(){t&&t.c(),e=Q()},l(s){t&&t.l(s),e=Q()},m(s,r){t&&t.m(s,r),P(s,e,r)},p(s,r){s[14]?t?(t.p(s,r),r&4&&A(t,1)):(t=Hs(s),t.c(),A(t,1),t.m(e.parentNode,e)):t&&(me(),R(t,1,1,()=>{t=null}),pe())},d(s){s&&p(e),t&&t.d(s)}}}function Io(n){let e,t,s,r;const i=[Oo,Ao],o=[];function a(l,c){return l[11]==="section"?0:l[11]=="voting"?1:-1}return~(e=a(n))&&(t=o[e]=i[e](n)),{c(){t&&t.c(),s=G()},l(l){t&&t.l(l),s=H(l)},m(l,c){~e&&o[e].m(l,c),P(l,s,c),r=!0},p(l,c){t&&t.p(l,c)},i(l){r||(A(t),r=!0)},o(l){R(t),r=!1},d(l){l&&p(s),~e&&o[e].d(l)}}}function Js(n,e){let t,s,r;return s=new zr({props:{index:e[16],cls:e[11]=="voting"?"":"vertical-center",$$slots:{default:[Io]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Q(),te(s.$$.fragment),this.h()},l(i){t=Q(),se(s.$$.fragment,i),this.h()},h(){this.first=t},m(i,o){P(i,t,o),re(s,i,o),r=!0},p(i,o){e=i;const a={};o&8388613&&(a.$$scope={dirty:o,ctx:e}),s.$set(a)},i(i){r||(A(s.$$.fragment,i),r=!0)},o(i){R(s.$$.fragment,i),r=!1},d(i){i&&p(t),ne(s,i)}}}function jo(n){let e=[],t=new Map,s,r,i=ee(ot.body.index||[]);const o=a=>a[16];for(let a=0;a{a=null}),pe())},i(l){r||(A(a),r=!0)},o(l){R(a),r=!1},d(l){l&&(p(t),p(s)),Ie(o,l),p(e),a&&a.d(l)}}}let Ro=!1;function Co(n,e,t){let s;ie(n,Le,f=>t(5,s=f));let{artists:r}=e,i,o=0,a=[2],l=!1;const c=({detail:f})=>{f==="right"?i.next():i.prev(),window.scrollTo(0,0)};kt(async()=>{t(3,l=!0)});let u=[1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36].map(f=>`${Oe}/assets/images/${f}.jpg`);u=[...u,...["1st","2nd","3rd","4th","5th"].map(f=>`${Oe}/assets/toploaders/${f}.png`)];function h(f){it[f?"unshift":"push"](()=>{i=f,t(1,i)})}function d(f){o=f,t(2,o)}return n.$$set=f=>{"artists"in f&&t(0,r=f.artists)},[r,i,o,l,u,s,a,c,h,d]}class Lo extends ce{constructor(e){super(),ue(this,e,Co,Po,ae,{artists:0})}}function Do(){console.log("--- --- --- --- --- ---"),console.log("svelte-starter: 5.17.0"),console.log("build: 2024-09-27-12:22"),console.log("--- --- --- --- --- ---")}const mr=[{name:"Seo Taiji & Kids (서태지와 아이들)",id:"1","debut year":"1992",company:"",song:"Come Back Home",media_url:""},{name:"TVXQ! (동방신기)",id:"2","debut year":"2003",company:"SM",song:"Mirotic (주문)",media_url:""},{name:"BIGBANG",id:"3","debut year":"2006",company:"YG",song:"BANG BANG BANG",media_url:""},{name:"Girls' Generation (소녀시대)",id:"4","debut year":"2007",company:"SM",song:"Gee",media_url:""},{name:"Wonder Girls",id:"5","debut year":"2007",company:"JYP",song:"Tell Me",media_url:""},{name:"2PM",id:"6","debut year":"2008",company:"JYP",song:"My House (우리집)",media_url:""},{name:"SHINee",id:"7","debut year":"2008",company:"SM",song:"Replay (누난 너무 예뻐)",media_url:""},{name:"2NE1",id:"8","debut year":"2009",company:"YG",song:"I AM THE BEST (내가 제일 잘 나가)",media_url:""},{name:"f(x)",id:"9","debut year":"2009",company:"SM",song:"4 Walls",media_url:""},{name:"EXO",id:"11","debut year":"2012",company:"SM",song:"Love Shot",media_url:""},{name:"BTS (방탄소년단)",id:"12","debut year":"2013",company:"Big Hit (now HYBE)",song:"Dynamite",media_url:""},{name:"GOT7",id:"13","debut year":"2014",company:"JYP",song:"You Calling My Name (니가 부르는 나의 이름)",media_url:""},{name:"Red Velvet",id:"14","debut year":"2014",company:"SM",song:"Psycho",media_url:""},{name:"WINNER",id:"15","debut year":"2014",company:"YG",song:"REALLY REALLY",media_url:""},{name:"SEVENTEEN",id:"16","debut year":"2015",company:"Pledis (now HYBE)",song:"Super (손오공)",media_url:""},{name:"TWICE",id:"17","debut year":"2015",company:"JYP",song:"FANCY",media_url:""},{name:"NCT",id:"18","debut year":"2016",company:"SM",song:"Love Talk (English ver by WayV)",media_url:""},{name:"BLACKPINK",id:"19","debut year":"2016",company:"YG",song:"How You Like That",media_url:""},{name:"Stray Kids",id:"20","debut year":"2018",company:"JYP",song:"God's Menu (神메뉴)",media_url:""},{name:"(G)I-DLE ((여자)아이들)",id:"21","debut year":"2018",company:"Cube",song:"Queencard (퀸카)",media_url:""},{name:"ITZY",id:"22","debut year":"2019",company:"JYP",song:"WANNABE",media_url:""},{name:"TXT (TOMORROW X TOGETHER)",id:"23","debut year":"2019",company:"Big Hit (now HYBE)",song:"0X1=LOVESONG (I Know I Love You) feat. Seori",media_url:""},{name:"TREASURE",id:"24","debut year":"2020",company:"YG",song:"DARARI",media_url:""},{name:"aespa",id:"25","debut year":"2020",company:"SM",song:"Next Level",media_url:""},{name:"ENHYPEN",id:"26","debut year":"2020",company:"Belift Lab (HYBE)",song:"FEVER",media_url:""},{name:"IVE",id:"27","debut year":"2021",company:"Starship",song:"LOVE DIVE",media_url:""},{name:"NMIXX",id:"28","debut year":"2022",company:"JYP",song:"O.O",media_url:""},{name:"LE SSERAFIM",id:"29","debut year":"2022",company:"Source Music (now HYBE)",song:"ANTIFRAGILE",media_url:""},{name:"NewJeans",id:"30","debut year":"2022",company:"ADOR (HYBE)",song:"OMG",media_url:""},{name:"ZEROBASEONE",id:"31","debut year":"2023",company:"WakeOne (Boys Planet)",song:"In Bloom",media_url:""},{name:"RIIZE",id:"32","debut year":"2023",company:"SM",song:"Get A Guitar",media_url:""},{name:"BABYMONSTER",id:"33","debut year":"2023",company:"YG",song:"SHEESH",media_url:""},{name:"TWS (투어스)",id:"34","debut year":"2024",company:"Pledis (now HYBE)",song:"plot twist (첫 만남은 계획대로 되지 않아)",media_url:""},{name:"ILLIT",id:"35","debut year":"2024",company:"Belift Lab (HYBE)",song:"Magnetic",media_url:""},{name:"KATSEYE",id:"36","debut year":"2024",company:"HYBE x Geffen",song:"Touch",media_url:""}];function Vs(n){let e,t;return e=new Lo({props:{artists:mr}}),{c(){te(e.$$.fragment)},l(s){se(e.$$.fragment,s)},m(s,r){re(e,s,r),t=!0},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){R(e.$$.fragment,s),t=!1},d(s){ne(e,s)}}}function No(n){let e,t,s,r;e=new jr({props:{title:n[2],description:n[3],url:n[4],preloadFont:n[1]}});let i=n[0]&&Vs();return{c(){te(e.$$.fragment),t=G(),i&&i.c(),s=Q()},l(o){se(e.$$.fragment,o),t=H(o),i&&i.l(o),s=Q()},m(o,a){re(e,o,a),P(o,t,a),i&&i.m(o,a),P(o,s,a),r=!0},p(o,[a]){o[0]?i?a&1&&A(i,1):(i=Vs(),i.c(),A(i,1),i.m(s.parentNode,s)):i&&(me(),R(i,1,1,()=>{i=null}),pe())},i(o){r||(A(e.$$.fragment,o),A(i),r=!0)},o(o){R(e.$$.fragment,o),R(i),r=!1},d(o){o&&(p(t),p(s)),ne(e,o),i&&i.d(o)}}}function Uo(n,e,t){let{data:s}=e,r=!1;Do();const i=["https://pudding.cool/assets/fonts/tiempos/TiemposTextWeb-Regular.woff2","https://pudding.cool/assets/fonts/tiempos/TiemposTextWeb-Bold.woff2","https://pudding.cool/assets/fonts/national/National2Web-Regular.woff2","https://pudding.cool/assets/fonts/national/National2Web-Bold.woff2"],{title:o,description:a,url:l}=ot.meta;return Dt("copy",ot),Dt("data",s.data),kt(()=>{mr.forEach(c=>{c.artistId=c.id}),t(0,r=!0)}),n.$$set=c=>{"data"in c&&t(5,s=c.data)},[r,i,o,a,l,s]}class Go extends ce{constructor(e){super(),ue(this,e,Uo,No,ae,{data:5})}}export{Go as component}; diff --git a/docs/_app/version.json b/docs/_app/version.json index 99c6a17..c426327 100644 --- a/docs/_app/version.json +++ b/docs/_app/version.json @@ -1 +1 @@ -{"version":"1727454153366"} \ No newline at end of file +{"version":"1727454748082"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index aa43681..134c9f0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,22 +3,22 @@ - + - - - + + + - - + + - Defining Generations in K-pop + Defining Generations in K-pop @@ -28,7 +28,7 @@ + {#each preloadImageUrls as image} {/each} @@ -96,7 +96,8 @@ {/if} --> {:else if type == "voting"} {#if isActive} - + {/if} {/if} @@ -138,8 +139,6 @@ --> {/if} - -