@playpilot/tpi 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/link-injections.js +7 -7
- package/package.json +1 -1
- package/src/lib/api.js +11 -0
- package/src/lib/enums/TrackingEvent.js +2 -0
- package/src/lib/linkInjection.js +38 -20
- package/src/lib/scss/global.scss +1 -1
- package/src/routes/components/Editorial/EditorItem.svelte +8 -1
- package/src/routes/components/Genres.svelte +1 -1
- package/src/routes/components/Modal.svelte +4 -0
- package/src/routes/components/Playlinks.svelte +1 -1
- package/src/routes/components/RoundButton.svelte +1 -1
- package/src/tests/lib/linkInjection.test.js +2 -2
- package/src/tests/routes/components/Editorial/EditorItem.test.js +8 -2
package/dist/link-injections.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css?family=Poppins:400,600,700";.popover.svelte-8w8waf{--offset: 8px;position:absolute;top:calc((var(--offset) - 1px) * -1);left:0;width:calc(100vw - 32px);max-width:320px;padding:var(--offset) 0;transform:translateY(calc(-100% + var(--offset)));z-index:2147483647}.popover.flip.svelte-8w8waf{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-8w8waf{cursor:default;position:relative;border-radius:var(--playpilot-popover-border-radius, 16px);background:var(--playpilot-popover-background, var(--playpilot-light));box-shadow:var(--playpilot-popover-shadow, var(--playpilot-shadow-large));max-height:min(var(--max-height),560px);scrollbar-width:thin;overflow-y:overlay;overflow-x:hidden}.genre.svelte-1vtdftw{display:flex;flex-wrap:wrap;background:var(--playpilot-genre-background, var(--playpilot-content));border:0;border-radius:var(--playpilot-genre-border-radius, 16px);padding:4px 8px;font-family:var(--playpilot-genre-font-family, inherit);font-weight:var(--playpilot-playlink-font-weight, inherit);text-transform:var(--playpilot-genre-text-transform, none);color:var(--playpilot-genre-text-color, var(--playpilot-text-color-alt));line-height:1;font-size:inherit}.genre.svelte-1vtdftw:is(button:where(.svelte-1vtdftw)):hover{cursor:pointer;filter:var(--playpilot-genre-hover-filter, brightness(1.1));background:var(--playpilot-genre-hover-background, var(--playpilot-genre-background))}h2.svelte-z484wk{margin:0;color:var(--playpilot-playlinks-title-color, var(--playpilot-text-color-alt));font-family:var(--playpilot-playlinks-title-font-family, inherit);font-weight:var(--playpilot-playlinks-title-font-weight, lighter);font-size:var(--playpilot-playlinks-title-font-size, 14px);line-height:normal}img.svelte-z484wk{border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-z484wk{height:40px;width:40px}}.playlinks.svelte-z484wk{box-sizing:border-box;display:flex;gap:8px;width:calc(100% + 32px);padding:8px 16px;margin:0 -16px;overflow:auto;scrollbar-width:none}.playlinks.svelte-z484wk::-webkit-scrollbar{display:none}.list.svelte-z484wk{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-z484wk img:where(.svelte-z484wk){height:32px;width:32px}}.playlink.svelte-z484wk{display:flex;align-items:center;gap:12px;padding:12px;background:var(--playpilot-playlink-background, var(--playpilot-lighter));box-shadow:var(--playpilot-playlink-shadow, var(--playpilot-shadow));border-radius:var(--playpilot-playlink-border-radius, 8px);color:var(--playpilot-playlink-text-color, var(--playpilot-text-color-alt))!important;font-weight:var(--playpilot-playlink-font-weight, inherit);font-style:var(--playpilot-playlink-font-style, normal);text-decoration:none!important;white-space:nowrap;font-size:12px;line-height:1}.playlink.svelte-z484wk:hover,.playlink.svelte-z484wk:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)));text-decoration:none!important}.playlink.svelte-z484wk img:where(.svelte-z484wk){margin:0}.list.svelte-z484wk .playlink:where(.svelte-z484wk){padding:8px;gap:8px}.name.svelte-z484wk{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-z484wk{margin-top:8px;font-size:10px;color:var(--playpilot-playlink-category-text-color, var(--playpilot-text-color));font-weight:var(--playpilot-playlink-category-font-weight, inherit);font-family:var(--playpilot-playlink-category-font-family, inherit)}.empty.svelte-z484wk{white-space:initial;line-height:1.35}.arrow.svelte-z484wk{margin-left:auto;padding:0 8px}p.svelte-fluzit,.paragraph.svelte-fluzit{display:block;margin:16px 0 0}.show-more.svelte-fluzit{display:inline;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;background:transparent;border:0;color:var(--playpilot-read-more-text-color, var(--playpilot-text-color-alt));font-weight:var(--playpilot-read-more-font-weight, inherit);font-family:inherit;font-size:inherit}.show-more.svelte-fluzit:hover{text-decoration:underline;text-decoration-thickness:2px;cursor:pointer}h2.svelte-15oguej{margin:24px 0 16px;font-size:var(--playpilot-cast-title-font-size, 18px);line-height:normal;font-weight:inherit;color:var(--playpilot-cast-title-text-color, var(--playpilot-text-color))}.participants.svelte-15oguej{display:flex;gap:16px;width:calc(100% + 32px);padding:0 16px;margin:0 -16px;overflow:auto;white-space:nowrap;scrollbar-width:none}.participants.svelte-15oguej::-webkit-scrollbar{display:none}.character.svelte-15oguej{color:var(--playpilot-cast-character-text-color, var(--playpilot-text-color-alt));font-style:italic}h1.svelte-zq2qln{margin:8px 0;color:var(--playpilot-detail-title-text-color, #fff);font-family:var(--playpilot-detail-title-font-family, inherit);font-weight:var(--playpilot-detail-title-font-weight, lighter);font-size:var(--playpilot-detail-title-font-size, 24px);line-height:normal;font-style:var(--playpilot-detail-title-font-style, normal)}.small.svelte-zq2qln h1:where(.svelte-zq2qln){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-zq2qln h1:where(.svelte-zq2qln){margin-top:0}.content.svelte-zq2qln{z-index:1;position:relative;padding:16px;color:var(--playpilot-detail-text-color, var(--playpilot-text-color));font-family:var(--playpilot-detail-font-family, var(--playpilot-font-family));font-weight:var(--playpilot-detail-font-weight, normal);font-size:var(--playpilot-detail-font-size, 14px);line-height:normal;font-style:normal}.content.small.svelte-zq2qln{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-zq2qln{padding:32px 0 16px}.small.svelte-zq2qln .header:where(.svelte-zq2qln){padding-top:16px}.compact.svelte-zq2qln .header:where(.svelte-zq2qln){padding:0 0 16px}.top.svelte-zq2qln{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-zq2qln{display:block;width:72px;margin:0;aspect-ratio:2/3;border-radius:var(--playpilot-detail-image-border-radius, 8px);background:var(--playpilot-detail-image-background, var(--playpilot-content));box-shadow:var(--playpilot-detail-image-shadow, var(--playpilot-shadow))}.info.svelte-zq2qln{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-zq2qln .info:where(.svelte-zq2qln){gap:8px 12px}.imdb.svelte-zq2qln{display:flex;align-items:center;gap:4px}.imdb.svelte-zq2qln svg{margin-top:-2px}.small.svelte-zq2qln .imdb:where(.svelte-zq2qln) svg{margin-top:0;width:12px;height:12px}.background.svelte-zq2qln{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter))}.background.svelte-zq2qln:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top,var(--playpilot-detail-background, var(--playpilot-light)),transparent 40%)}.background.svelte-zq2qln img:where(.svelte-zq2qln){width:100%;height:100%;object-fit:cover;object-position:center;margin:0}.faded.svelte-zq2qln{opacity:.15}.capitalize.svelte-zq2qln{text-transform:capitalize}span.svelte-6p0hvs{display:block}button.svelte-6p0hvs{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--playpilot-after-article-button-padding, 4px 12px);margin:var(--playpilot-after-article-button-margin, 4px 0 0);background:var(--playpilot-after-article-button-background, transparent);border:var(--playpilot-after-article-button-border, 2px solid currentColor);border-radius:var(--playpilot-after-article-button-border-radius, 16px);color:var(--playpilot-after-article-button-text-color, inherit);font-weight:var(--playpilot-after-article-button-font-weight, bold);font-size:var(--playpilot-after-article-button-font-size, 16px);cursor:pointer;transition:all 50ms}button.svelte-6p0hvs:hover{background:var(--playpilot-after-article-button-background-hover, transparent);border:var(--playpilot-after-article-button-border-hover, 2px solid currentColor);color:var(--playpilot-after-article-button-text-color-hover, inherit);transform:var(--playpilot-after-article-button-transform-hover, scale(1.02))}.button.svelte-1ik04fv{display:flex;align-items:center;justify-content:center;flex:0 0 var(--size);width:var(--size);height:var(--size);border-radius:50%;border:0;padding:0;background:var(--playpilot-button-background, var(--playpilot-content));box-shadow:var(--playpilot-button-shadow, var(--playpilot-shadow));color:var(--playpilot-button-text-color, var(--playpilot-text-color-alt));cursor:pointer;transition:transform 50ms}.button.svelte-1ik04fv:hover{filter:brightness(1.2);transform:scale(1.05)}.modal.svelte-p44kuk{z-index:2147483647;position:fixed;display:flex;justify-content:center;align-items:flex-start;top:0;left:0;width:100%;height:100%;background:var(--playpilot-detail-backdrop, rgba(0, 0, 0, .65))}@media (min-width: 600px){.modal.svelte-p44kuk{padding:32px}}.dialog.svelte-p44kuk{position:relative;width:100%;max-width:600px;max-height:80vh;overflow:auto;margin-top:auto;border-radius:var(--playpilot-detail-border-radius, 16px 16px 0 0);background:var(--playpilot-detail-background, var(--playpilot-light))}@media (min-width: 600px){.dialog.svelte-p44kuk{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-p44kuk{position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-p44kuk{z-index:5;position:absolute;top:16px;right:16px}.close.svelte-p44kuk:hover{filter:brightness(1.1)}svg.svelte-by11ix{transition:transform .1s}.expanded.svelte-by11ix{transform:rotate(180deg)}.switch.svelte-91s87b{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;border:0;padding:0;background:transparent;cursor:pointer}.fullwidth.svelte-91s87b{width:100%;justify-content:space-between}.label.svelte-91s87b{display:flex;align-items:center;gap:8px;margin-right:8px;font-family:var(--playpilot-font-family);color:var(--playpilot-text-color-alt);font-size:12px}.switch.svelte-91s87b:hover .label:where(.svelte-91s87b){color:var(--playpilot-text-color)}.track.svelte-91s87b{position:relative;width:32px;height:20px;border-radius:16px;background:var(--playpilot-content);transition:background-color .1s}.active.svelte-91s87b .track:where(.svelte-91s87b){background:var(--playpilot-green)}.knob.svelte-91s87b{position:absolute;top:2px;left:2px;height:16px;width:16px;border-radius:50%;background:#fff;transition:left .1s}.active.svelte-91s87b .knob:where(.svelte-91s87b){left:14px}input.svelte-1vrer3i{width:100%;padding:8px 16px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}input.svelte-1vrer3i:focus{background:var(--playpilot-lighter);outline:1px solid white}input.svelte-1vrer3i::placeholder{color:var(--playpilot-text-color-alt);opacity:.75}.switches.svelte-14krcvc{display:flex;flex-direction:column;gap:12px}button.svelte-14krcvc{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:32px;padding:8px;background:transparent;font-family:var(--playpilot-font-family);font-size:10.4px;color:var(--playpilot-text-color-alt);cursor:pointer}button.svelte-14krcvc:hover,button.active.svelte-14krcvc{color:var(--playpilot-text-color)}.group.svelte-14krcvc{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;padding:4px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}.active-marker.svelte-14krcvc{z-index:0;position:absolute;width:calc(50% - 8px);height:calc(100% - 8px);left:4px;top:4px;border-radius:32px;background:var(--playpilot-content);transition:left .1s}.right.svelte-14krcvc{left:calc(50% + 4px)}.label.svelte-14krcvc{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1tq7qhv{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px}button.svelte-1fmy0wh{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:4px;background:transparent;color:var(--playpilot-text-color-alt)}button.svelte-1fmy0wh:hover{cursor:pointer;color:#fff}.context-menu.svelte-1fmy0wh{position:relative}.content.svelte-1fmy0wh{z-index:1;position:absolute;top:100%;right:0;max-height:80px;max-width:160px;border-radius:8px;background:var(--playpilot-lighter)}.item.svelte-1bz02u6{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-1bz02u6:hover,.item.highlighted.svelte-1bz02u6{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-1bz02u6{outline:2px solid var(--playpilot-primary)}.header.svelte-1bz02u6{display:flex;gap:16px;width:100%}.poster.svelte-1bz02u6{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.title.svelte-1bz02u6{font-size:14px;word-break:break-word}.meta.svelte-1bz02u6{display:flex;gap:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.meta.svelte-1bz02u6 span:where(.svelte-1bz02u6){display:flex;align-items:center}.meta.svelte-1bz02u6 svg{display:block;margin:-2px 2px 0 0;height:1em}.content.svelte-1bz02u6{padding-top:16px}.context-menu.svelte-1bz02u6{margin:0 -4px 0 auto}.context-menu-action.svelte-1bz02u6{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;padding:16px;font-family:inherit;color:var(--playpilot-text-color-alt);cursor:pointer}.context-menu-action.svelte-1bz02u6:hover{color:var(--playpilot-text-color)}.actions.svelte-1bz02u6{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-1bz02u6{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:50%;background:var(--playpilot-content);color:var(--playpilot-text-color);box-shadow:var(--playpilot-shadow);cursor:pointer}.expand.svelte-1bz02u6:hover{filter:brightness(1.2)}.expanded.svelte-1bz02u6{padding-top:16px}.type-select.svelte-1bz02u6{margin-top:8px}.label.svelte-1bz02u6{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-1bz02u6{margin-top:12px}.drag-handle.svelte-bwc0q8{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-bwc0q8:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-bwc0q8:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-bwc0q8:active{cursor:grabbing}.drag-handle.svelte-bwc0q8:before{display:block;content:"";position:absolute;top:40%;right:0;bottom:40%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.search.svelte-15ml41d{position:relative}.results.svelte-15ml41d{z-index:1;position:absolute;top:calc(100% + 8px);left:0;right:0;height:30vh;max-height:160px;border-radius:8px;background:var(--playpilot-light);scrollbar-width:thin;overflow:auto}.item.svelte-15ml41d{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:flex-start;gap:16px;width:100%;background:transparent;border:0;padding:8px;border-bottom:1px solid var(--playpilot-content);color:var(--playpilot-text-color-alt);font-family:inherit;text-align:left}.item.svelte-15ml41d:hover{background:var(--playpilot-lighter)}.item.svelte-15ml41d:last-child{border-bottom:0}.poster.svelte-15ml41d{width:28px;border-radius:4px;height:auto;background:var(--playpilot-dark)}.name.svelte-15ml41d{color:var(--playpilot-text-color)}.meta.svelte-15ml41d{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-15ml41d{display:flex;align-items:center;gap:4px}.empty.svelte-15ml41d{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-15ml41d{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-15ml41d:hover{color:vaR(--playpilot-text-color)}h2.svelte-c3phlu{margin:0;font-size:16px;font-weight:400}p.svelte-c3phlu,label.svelte-c3phlu{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-c3phlu{display:block;margin-top:16px}.layout.svelte-c3phlu{height:100%;display:flex;flex-direction:column}.header.svelte-c3phlu{display:flex;align-items:center;gap:8px;margin-bottom:16px}.error.svelte-c3phlu{margin-top:8px}.save.svelte-c3phlu{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;margin-top:auto;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt)}.save.svelte-c3phlu:not([disabled]):hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-c3phlu{cursor:default;opacity:.5}h1.svelte-1xio91e{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.editor.svelte-1xio91e{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:320px;max-height:min(50vh,800px);min-height:400px;padding:16px;border-radius:24px;background:var(--playpilot-dark);box-shadow:var(--playpilot-shadow-large);color:var(--playpilot-text-color);font-family:var(--playpilot-font-family);transition:border-radius .1s;overflow-y:auto;overflow-x:hidden;line-height:normal}.panel-open.svelte-1xio91e{overflow:hidden}.loading.svelte-1xio91e{min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.drag-handle.svelte-1xio91e{opacity:0;transition:opacity .15s}.editor.svelte-1xio91e:hover .drag-handle:where(.svelte-1xio91e){opacity:1}.header.svelte-1xio91e{z-index:5;position:sticky;top:-16px;margin:-16px -16px 0;padding:16px 16px 16px 24px;background:var(--playpilot-dark);display:flex;align-items:center}.loading.svelte-1xio91e .header:where(.svelte-1xio91e){margin:-16px}.bubble.svelte-1xio91e{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:24px;height:24px;border:0;padding:0;margin-right:auto;border-radius:50%;background:var(--playpilot-green);line-height:24px;text-align:center;font-size:13.6px}.items.svelte-1xio91e{padding-top:8px;margin-bottom:auto}.empty.svelte-1xio91e{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-1xio91e{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:sticky;bottom:0;left:0;width:100%;margin-top:16px;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);box-shadow:0 0 16px 16px var(--playpilot-dark);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt);cursor:pointer}.save.svelte-1xio91e:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-1xio91e{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-1xio91e{margin-top:8px}.panel.svelte-1xio91e{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}:root{--playpilot-primary: #fa548a;--playpilot-dark: #101426;--playpilot-light: #1b2743;--playpilot-lighter: #233257;--playpilot-content: #354367;--playpilot-content-light: #4b5b82;--playpilot-green: #53bca0;--playpilot-font-family: "Poppins", sans-serif;--playpilot-text-color: #fff;--playpilot-text-color-alt: #c8d4de;--playpilot-shadow: 3.2px 2.4px 2.4px rgba(0, 0, 0, .2);--playpilot-shadow-large: 2.4px 2.4px 3.2px rgba(0, 0, 0, .05), 3.2px 5.6px 5.6px rgba(0, 0, 0, .1), 1.6px 1.6px 12px rgba(0, 0, 0, .25);--playpilot-error: #ea5a5a;--playpilot-error-dark: #442533}[data-playpilot-injection-key]{position:relative}[data-playpilot-injection-key].injection-highlight{outline:4px solid var(--playpilot-primary)!important;outline-offset:8px!important;border-radius:.8px;scroll-margin:80px}.playpilot-styled-scrollbar{scrollbar-color:var(--playpilot-content-light) var(--playpilot-lighter);scrollbar-width:thin}.playpilot-styled-scrollbed::-webkit-scrollbar{width:12px}.playpilot-styled-scrollbed::-webkit-scrollbar-track{background:var(--playpilot-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb{border:2px solid var(--playpilot-light);border-radius:16px;background:var(--playpilot-lighter)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:hover{background:var(--playpilot-content-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:active{background:var(--playpilot-text-color-alt)}[data-playpilot-injection-key][data-used-css-variables*=--playpilot-injection-font-weight]{font-weight:var(--playpilot-injection-font-weight)}[data-playpilot-injection-key][data-used-css-variables*=--playpilot-injection-text-color]{color:var(--playpilot-injection-text-color)}[data-playpilot-injection-key][data-used-css-variables*=--playpilot-injection-text-color-hover]:hover{color:var(--playpilot-injection-text-color-hover)}[data-playpilot-injection-key][data-used-css-variables*=--playpilot-injection-text-decoration]{text-decoration:var(--playpilot-injection-text-decoration)}[data-playpilot-injection-key][data-used-css-variables*=--playpilot-injection-text-decoration-hover]:hover{text-decoration:var(--playpilot-injection-text-decoration-hover)}[data-playpilot-injection-key][data-used-css-variables*=--playpilot-injection-background-color]{background-color:var(--playpilot-injection-background-color)}[data-playpilot-injection-key][data-used-css-variables*=--playpilot-injection-background-color-hover]:hover{background-color:var(--playpilot-injection-background-color-hover)}.playpilot-link-injections.svelte-1ogu7vd *{box-sizing:border-box}.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections button,.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections input{transition:outline-offset .1s}.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections button:focus-visible,.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections input:focus-visible{outline:2px solid white;outline-offset:2px}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();const Wt=!1;var nn=Array.isArray,jr=Array.prototype.indexOf,rn=Array.from,Rr=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,qr=Object.getOwnPropertyDescriptors,Hr=Object.prototype,Fr=Array.prototype,qn=Object.getPrototypeOf;function zr(e){return typeof e=="function"}const Re=()=>{};function Dr(e){for(var t=0;t<e.length;t++)e[t]()}const we=2,Hn=4,ft=8,Lt=16,ke=32,_t=64,Kt=128,$e=256,xt=512,me=1024,Ne=2048,Mt=4096,be=8192,Qe=16384,Fn=32768,et=65536,Br=1<<17,Vr=1<<19,zn=1<<20,at=Symbol("$state"),$r=Symbol("legacy props"),Ur=Symbol("");function Dn(e){return e===this.v}function Wr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function an(e){return!Wr(e,this.v)}function Kr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Yr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Gr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Zr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Jr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Xr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Qr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ei(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function ti(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let tt=!1,ni=!1;function ri(){tt=!0}const on=1,ln=2,Bn=4,ii=8,ai=16,oi=1,li=2,si=4,ci=8,ui=16,di=1,vi=2,fi=4,_i=1,hi=2,de=Symbol(),Vn="http://www.w3.org/2000/svg";function _e(e,t){var n={f:0,v:e,reactions:null,equals:Dn,rv:0,wv:0};return n}function U(e){return mi(_e(e))}function $n(e,t=!1){var r;const n=_e(e);return t||(n.equals=an),tt&&W!==null&&W.l!==null&&((r=W.l).s??(r.s=[])).push(n),n}function mi(e){return V!==null&&V.f&we&&(Se===null?Pi([e]):Se.push(e)),e}function L(e,t){return V!==null&&Rt()&&V.f&(we|Lt)&&(Se===null||!Se.includes(e))&&ti(),Yt(e,t)}function Yt(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=sr(),Un(e,Ne),Rt()&&N!==null&&N.f&me&&!(N.f&ke)&&(se!==null&&se.includes(e)?(Ce(N,Ne),Ft(N)):Me===null?Ii([e]):Me.push(e))),t}function Un(e,t){var n=e.reactions;if(n!==null)for(var r=Rt(),i=n.length,a=0;a<i;a++){var o=n[a],v=o.f;v&Ne||!r&&o===N||(Ce(o,t),v&(me|$e)&&(v&we?Un(o,Mt):Ft(o)))}}let gi=!1;function Y(e,t=null,n){if(typeof e!="object"||e===null||at in e)return e;const r=qn(e);if(r!==Hr&&r!==Fr)return e;var i=new Map,a=nn(e),o=_e(0);a&&i.set("length",_e(e.length));var v;return new Proxy(e,{defineProperty(s,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&Xr();var d=i.get(u);return d===void 0?(d=_e(l.value),i.set(u,d)):L(d,Y(l.value,v)),!0},deleteProperty(s,u){var l=i.get(u);if(l===void 0)u in s&&i.set(u,_e(de));else{if(a&&typeof u=="string"){var d=i.get("length"),c=Number(u);Number.isInteger(c)&&c<d.v&&L(d,c)}L(l,de),bn(o)}return!0},get(s,u,l){var g;if(u===at)return e;var d=i.get(u),c=u in s;if(d===void 0&&(!c||(g=Ke(s,u))!=null&&g.writable)&&(d=_e(Y(c?s[u]:de,v)),i.set(u,d)),d!==void 0){var h=_(d);return h===de?void 0:h}return Reflect.get(s,u,l)},getOwnPropertyDescriptor(s,u){var l=Reflect.getOwnPropertyDescriptor(s,u);if(l&&"value"in l){var d=i.get(u);d&&(l.value=_(d))}else if(l===void 0){var c=i.get(u),h=c==null?void 0:c.v;if(c!==void 0&&h!==de)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(s,u){var h;if(u===at)return!0;var l=i.get(u),d=l!==void 0&&l.v!==de||Reflect.has(s,u);if(l!==void 0||N!==null&&(!d||(h=Ke(s,u))!=null&&h.writable)){l===void 0&&(l=_e(d?Y(s[u],v):de),i.set(u,l));var c=_(l);if(c===de)return!1}return d},set(s,u,l,d){var p;var c=i.get(u),h=u in s;if(a&&u==="length")for(var g=l;g<c.v;g+=1){var f=i.get(g+"");f!==void 0?L(f,de):g in s&&(f=_e(de),i.set(g+"",f))}c===void 0?(!h||(p=Ke(s,u))!=null&&p.writable)&&(c=_e(void 0),L(c,Y(l,v)),i.set(u,c)):(h=c.v!==de,L(c,Y(l,v)));var y=Reflect.getOwnPropertyDescriptor(s,u);if(y!=null&&y.set&&y.set.call(d,l),!h){if(a&&typeof u=="string"){var k=i.get("length"),w=Number(u);Number.isInteger(w)&&w>=k.v&&L(k,w+1)}bn(o)}return!0},ownKeys(s){_(o);var u=Reflect.ownKeys(s).filter(c=>{var h=i.get(c);return h===void 0||h.v!==de});for(var[l,d]of i)d.v!==de&&!(l in s)&&u.push(l);return u},setPrototypeOf(){Qr()}})}function bn(e,t=1){L(e,e.v+t)}var ye,Wn,Kn;function pi(){if(ye===void 0){ye=window;var e=Element.prototype,t=Node.prototype;Wn=Ke(t,"firstChild").get,Kn=Ke(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function ht(e=""){return document.createTextNode(e)}function Ze(e){return Wn.call(e)}function Nt(e){return Kn.call(e)}function b(e,t){return Ze(e)}function re(e,t){{var n=Ze(e);return n instanceof Comment&&n.data===""?Nt(n):n}}function T(e,t=1,n=!1){let r=e;for(;t--;)r=Nt(r);return r}function yi(e){e.textContent=""}function ee(e){var t=we|Ne;N===null?t|=$e:N.f|=zn;var n=V!==null&&V.f&we?V:null;const r={children:null,ctx:W,deps:null,equals:Dn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??N};return n!==null&&(n.children??(n.children=[])).push(r),r}function wi(e){const t=ee(e);return t.equals=an,t}function Yn(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var r=t[n];r.f&we?sn(r):Ee(r)}}}function ki(e){for(var t=e.parent;t!==null;){if(!(t.f&we))return t;t=t.parent}return null}function Gn(e){var t,n=N;ge(ki(e));try{Yn(e),t=cr(e)}finally{ge(n)}return t}function Zn(e){var t=Gn(e),n=(He||e.f&$e)&&e.deps!==null?Mt:me;Ce(e,n),e.equals(t)||(e.v=t,e.wv=sr())}function sn(e){Yn(e),ut(e,0),Ce(e,Qe),e.v=e.children=e.deps=e.ctx=e.reactions=null}function bi(e){N===null&&V===null&&Gr(),V!==null&&V.f&$e&&Yr(),un&&Kr()}function Si(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function nt(e,t,n,r=!0){var i=(e&_t)!==0,a=N,o={ctx:W,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|Ne,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var v=Ye;try{Sn(!0),Ht(o),o.f|=Fn}catch(l){throw Ee(o),l}finally{Sn(v)}}else t!==null&&Ft(o);var s=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&zn)===0;if(!s&&!i&&r&&(a!==null&&Si(o,a),V!==null&&V.f&we)){var u=V;(u.children??(u.children=[])).push(o)}return o}function xi(e){const t=nt(ft,null,!1);return Ce(t,me),t.teardown=e,t}function Ot(e){bi();var t=N!==null&&(N.f&ke)!==0&&W!==null&&!W.m;if(t){var n=W;(n.e??(n.e=[])).push({fn:e,effect:N,reaction:V})}else{var r=jt(e);return r}}function Ei(e){const t=nt(_t,e,!0);return(n={})=>new Promise(r=>{n.outro?ot(t,()=>{Ee(t),r(void 0)}):(Ee(t),r(void 0))})}function jt(e){return nt(Hn,e,!1)}function Jn(e){return nt(ft,e,!0)}function M(e){return mt(e)}function mt(e,t=0){return nt(ft|Lt|t,e,!0)}function ze(e,t=!0){return nt(ft|ke,e,!0,t)}function Xn(e){var t=e.teardown;if(t!==null){const n=un,r=V;xn(!0),Te(null);try{t.call(null)}finally{xn(n),Te(r)}}}function Qn(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)sn(t[n])}}function er(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var r=n.next;Ee(n,t),n=r}}function Ti(e){for(var t=e.first;t!==null;){var n=t.next;t.f&ke||Ee(t),t=n}}function Ee(e,t=!0){var n=!1;if((t||e.f&Vr)&&e.nodes_start!==null){for(var r=e.nodes_start,i=e.nodes_end;r!==null;){var a=r===i?null:Nt(r);r.remove(),r=a}n=!0}er(e,t&&!n),Qn(e),ut(e,0),Ce(e,Qe);var o=e.transitions;if(o!==null)for(const s of o)s.stop();Xn(e);var v=e.parent;v!==null&&v.first!==null&&tr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function tr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function ot(e,t){var n=[];cn(e,n,!0),nr(n,()=>{Ee(e),t&&t()})}function nr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function cn(e,t,n){if(!(e.f&be)){if(e.f^=be,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var i=r.next,a=(r.f&et)!==0||(r.f&ke)!==0;cn(r,t,a?n:!1),r=i}}}function lt(e){rr(e,!0)}function rr(e,t){if(e.f&be){pt(e)&&Ht(e),e.f^=be;for(var n=e.first;n!==null;){var r=n.next,i=(n.f&et)!==0||(n.f&ke)!==0;rr(n,i?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Et=!1,Gt=[];function ir(){Et=!1;const e=Gt.slice();Gt=[],Dr(e)}function gt(e){Et||(Et=!0,queueMicrotask(ir)),Gt.push(e)}function Ci(){Et&&ir()}function ar(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const or=0,Ai=1;let bt=!1,St=or,st=!1,ct=null,Ye=!1,un=!1;function Sn(e){Ye=e}function xn(e){un=e}let qe=[],Ge=0;let V=null;function Te(e){V=e}let N=null;function ge(e){N=e}let Se=null;function Pi(e){Se=e}let se=null,fe=0,Me=null;function Ii(e){Me=e}let lr=1,Zt=0,He=!1,W=null;function sr(){return++lr}function Rt(){return!tt||W!==null&&W.l===null}function pt(e){var u;var t=e.f;if(t&Ne)return!0;if(t&Mt){var n=e.deps,r=(t&$e)!==0;if(n!==null){var i,a,o=(t&xt)!==0,v=r&&N!==null&&!He,s=n.length;if(o||v){for(i=0;i<s;i++)a=n[i],(o||!((u=a==null?void 0:a.reactions)!=null&&u.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=xt)}for(i=0;i<s;i++)if(a=n[i],pt(a)&&Zn(a),a.wv>e.wv)return!0}(!r||N!==null&&!He)&&Ce(e,me)}return!1}function Li(e,t){for(var n=t;n!==null;){if(n.f&Kt)try{n.fn(e);return}catch{n.f^=Kt}n=n.parent}throw bt=!1,e}function Mi(e){return(e.f&Qe)===0&&(e.parent===null||(e.parent.f&Kt)===0)}function qt(e,t,n,r){if(bt){if(n===null&&(bt=!1),Mi(t))throw e;return}n!==null&&(bt=!0);{Li(e,t);return}}function cr(e){var c;var t=se,n=fe,r=Me,i=V,a=He,o=Se,v=W,s=e.f;se=null,fe=0,Me=null,V=s&(ke|_t)?null:e,He=!Ye&&(s&$e)!==0,Se=null,W=e.ctx,Zt++;try{var u=(0,e.fn)(),l=e.deps;if(se!==null){var d;if(ut(e,fe),l!==null&&fe>0)for(l.length=fe+se.length,d=0;d<se.length;d++)l[fe+d]=se[d];else e.deps=l=se;if(!He)for(d=fe;d<l.length;d++)((c=l[d]).reactions??(c.reactions=[])).push(e)}else l!==null&&fe<l.length&&(ut(e,fe),l.length=fe);return u}finally{se=t,fe=n,Me=r,V=i,He=a,Se=o,W=v}}function Ni(e,t){let n=t.reactions;if(n!==null){var r=jr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&t.f&we&&(se===null||!se.includes(t))&&(Ce(t,Mt),t.f&($e|xt)||(t.f^=xt),ut(t,0))}function ut(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ni(e,n[r])}function Ht(e){var t=e.f;if(!(t&Qe)){Ce(e,me);var n=N,r=W;N=e;try{t&Lt?Ti(e):er(e),Qn(e),Xn(e);var i=cr(e);e.teardown=typeof i=="function"?i:null,e.wv=lr;var a=e.deps,o;Wt&&ni&&e.f&Ne}catch(v){qt(v,e,n,r||e.ctx)}finally{N=n}}}function ur(){if(Ge>1e3){Ge=0;try{Zr()}catch(e){if(ct!==null)qt(e,ct,null);else throw e}}Ge++}function dr(e){var t=e.length;if(t!==0){ur();var n=Ye;Ye=!0;try{for(var r=0;r<t;r++){var i=e[r];i.f&me||(i.f^=me);var a=[];vr(i,a),Oi(a)}}finally{Ye=n}}}function Oi(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var r=e[n];if(!(r.f&(Qe|be)))try{pt(r)&&(Ht(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null?tr(r):r.fn=null))}catch(i){qt(i,r,null,r.ctx)}}}function ji(){if(st=!1,Ge>1001)return;const e=qe;qe=[],dr(e),st||(Ge=0,ct=null)}function Ft(e){St===or&&(st||(st=!0,queueMicrotask(ji))),ct=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(_t|ke)){if(!(n&me))return;t.f^=me}}qe.push(t)}function vr(e,t){var n=e.first,r=[];e:for(;n!==null;){var i=n.f,a=(i&ke)!==0,o=a&&(i&me)!==0,v=n.next;if(!o&&!(i&be))if(i&ft){if(a)n.f^=me;else try{pt(n)&&Ht(n)}catch(d){qt(d,n,null,n.ctx)}var s=n.first;if(s!==null){n=s;continue}}else i&Hn&&r.push(n);if(v===null){let d=n.parent;for(;d!==null;){if(e===d)break e;var u=d.next;if(u!==null){n=u;continue e}d=d.parent}}n=v}for(var l=0;l<r.length;l++)s=r[l],t.push(s),vr(s,t)}function fr(e){var t=St,n=qe;try{ur();const i=[];St=Ai,qe=i,st=!1,dr(n);var r=e==null?void 0:e();return Ci(),(qe.length>0||i.length>0)&&fr(),Ge=0,ct=null,r}finally{St=t,qe=n}}async function En(){await Promise.resolve(),fr()}function _(e){var l;var t=e.f,n=(t&we)!==0;if(n&&t&Qe){var r=Gn(e);return sn(e),r}if(V!==null){Se!==null&&Se.includes(e)&&ei();var i=V.deps;e.rv<Zt&&(e.rv=Zt,se===null&&i!==null&&i[fe]===e?fe++:se===null?se=[e]:se.push(e),Me!==null&&N!==null&&N.f&me&&!(N.f&ke)&&Me.includes(e)&&(Ce(N,Ne),Ft(N)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,v=a;o!==null;)if(o.f&we){var s=o;v=s,o=s.parent}else{var u=o;(l=u.deriveds)!=null&&l.includes(v)||(u.deriveds??(u.deriveds=[])).push(v);break}return n&&(a=e,pt(a)&&Zn(a)),e.v}function De(e){const t=V;try{return V=null,e()}finally{V=t}}const Ri=-7169;function Ce(e,t){e.f=e.f&Ri|t}function qi(e){return hr().get(e)}function _r(e,t){return hr().set(e,t),t}function hr(e){return W===null&&ar(),W.c??(W.c=new Map(Hi(W)||void 0))}function Hi(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function ie(e,t=!1,n){W={p:W,c:null,e:null,m:!1,s:e,x:null,l:null},tt&&!t&&(W.l={s:null,u:null,r1:[],r2:_e(!1)})}function ae(e){const t=W;if(t!==null){const o=t.e;if(o!==null){var n=N,r=V;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];ge(a.effect),Te(a.reaction),jt(a.fn)}}finally{ge(n),Te(r)}}W=t.p,t.m=!0}return{}}function Fi(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const zi=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Di(e){return zi.includes(e)}const Bi={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Vi(e){return e=e.toLowerCase(),Bi[e]??e}const $i=["touchstart","touchmove"];function Ui(e){return $i.includes(e)}function Wi(e,t){if(t){const n=document.body;e.autofocus=!0,gt(()=>{document.activeElement===n&&e.focus()})}}let Tn=!1;function Ki(){Tn||(Tn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function mr(e){var t=V,n=N;Te(null),ge(null);try{return e()}finally{Te(t),ge(n)}}function Yi(e,t,n,r=n){e.addEventListener(t,()=>mr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Ki()}const gr=new Set,Jt=new Set;function pr(e,t,n,r){function i(a){if(r.capture||it.call(t,a),!a.cancelBubble)return mr(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?gt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function he(e,t,n,r,i){var a={capture:r,passive:i},o=pr(e,t,n,a);(t===document.body||t===window||t===document)&&xi(()=>{t.removeEventListener(e,o,a)})}function ue(e){for(var t=0;t<e.length;t++)gr.add(e[t]);for(var n of Jt)n(e)}function it(e){var w;var t=this,n=t.ownerDocument,r=e.type,i=((w=e.composedPath)==null?void 0:w.call(e))||[],a=i[0]||e.target,o=0,v=e.__root;if(v){var s=i.indexOf(v);if(s!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;s<=u&&(o=s)}if(a=i[o]||e.target,a!==t){Rr(e,"currentTarget",{configurable:!0,get(){return a||n}});var l=V,d=N;Te(null),ge(null);try{for(var c,h=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var f=a["__"+r];if(f!==void 0&&!a.disabled)if(nn(f)){var[y,...k]=f;y.apply(a,[e,...k])}else f.call(a,e)}catch(p){c?h.push(p):c=p}if(e.cancelBubble||g===t||g===null)break;a=g}if(c){for(let p of h)queueMicrotask(()=>{throw p});throw c}}finally{e.__root=t,delete e.currentTarget,Te(l),ge(d)}}}function yr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Je(e,t){var n=N;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function A(e,t){var n=(t&_i)!==0,r=(t&hi)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=yr(a?e:"<!>"+e),n||(i=Ze(i)));var o=r?document.importNode(i,!0):i.cloneNode(!0);if(n){var v=Ze(o),s=o.lastChild;Je(v,s)}else Je(o,o);return o}}function Ae(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=yr(i),v=Ze(o);a=Ze(v)}var s=a.cloneNode(!0);return Je(s,s),s}}function Oe(e=""){{var t=ht(e+"");return Je(t,t),t}}function Xe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=ht();return e.append(t,n),Je(t,n),e}function S(e,t){e!==null&&e.before(t)}let Tt=!0;function Cn(e){Tt=e}function z(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n==null?"":n+"")}function dn(e,t){return Gi(e,t)}const We=new Map;function Gi(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0}){pi();var v=new Set,s=d=>{for(var c=0;c<d.length;c++){var h=d[c];if(!v.has(h)){v.add(h);var g=Ui(h);t.addEventListener(h,it,{passive:g});var f=We.get(h);f===void 0?(document.addEventListener(h,it,{passive:g}),We.set(h,1)):We.set(h,f+1)}}};s(rn(gr)),Jt.add(s);var u=void 0,l=Ei(()=>{var d=n??t.appendChild(ht());return ze(()=>{if(a){ie({});var c=W;c.c=a}i&&(r.$$events=i),Tt=o,u=e(d,r)||{},Tt=!0,a&&ae()}),()=>{var g;for(var c of v){t.removeEventListener(c,it);var h=We.get(c);--h===0?(document.removeEventListener(c,it),We.delete(c)):We.set(c,h)}Jt.delete(s),d!==n&&((g=d.parentNode)==null||g.removeChild(d))}});return Xt.set(u,l),u}let Xt=new WeakMap;function wr(e,t){const n=Xt.get(e);return n?(Xt.delete(e),n(t)):Promise.resolve()}function H(e,t,n=!1){var r=e,i=null,a=null,o=de,v=n?et:0,s=!1;const u=(d,c=!0)=>{s=!0,l(c,d)},l=(d,c)=>{o!==(o=d)&&(o?(i?lt(i):c&&(i=ze(()=>c(r))),a&&ot(a,()=>{a=null})):(a?lt(a):c&&(a=ze(()=>c(r))),i&&ot(i,()=>{i=null})))};mt(()=>{s=!1,t(u),s||l(null,null)},v)}let Fe=null;function An(e){Fe=e}function dt(e,t){return t}function Zi(e,t,n,r){for(var i=[],a=t.length,o=0;o<a;o++)cn(t[o].e,i,!0);var v=a>0&&i.length===0&&n!==null;if(v){var s=n.parentNode;yi(s),s.append(n),r.clear(),Le(e,t[0].prev,t[a-1].next)}nr(i,()=>{for(var u=0;u<a;u++){var l=t[u];v||(r.delete(l.k),Le(e,l.prev,l.next)),Ee(l.e,!v)}})}function Be(e,t,n,r,i,a=null){var o=e,v={flags:t,items:new Map,first:null},s=(t&Bn)!==0;if(s){var u=e;o=u.appendChild(ht())}var l=null,d=!1;mt(()=>{var c=n(),h=nn(c)?c:c==null?[]:rn(c),g=h.length;if(!(d&&g===0)){d=g===0;{var f=V;Ji(h,v,o,i,t,(f.f&be)!==0,r)}a!==null&&(g===0?l?lt(l):l=ze(()=>a(o)):l!==null&&ot(l,()=>{l=null})),n()}})}function Ji(e,t,n,r,i,a,o,v){var j,$,X,te;var s=(i&ii)!==0,u=(i&(on|ln))!==0,l=e.length,d=t.items,c=t.first,h=c,g,f=null,y,k=[],w=[],p,E,x,C;if(s)for(C=0;C<l;C+=1)p=e[C],E=o(p,C),x=d.get(E),x!==void 0&&((j=x.a)==null||j.measure(),(y??(y=new Set)).add(x));for(C=0;C<l;C+=1){if(p=e[C],E=o(p,C),x=d.get(E),x===void 0){var R=h?h.e.nodes_start:n;f=Qi(R,t,f,f===null?t.first:f.next,p,E,C,r,i),d.set(E,f),k=[],w=[],h=f.next;continue}if(u&&Xi(x,p,C,i),x.e.f&be&&(lt(x.e),s&&(($=x.a)==null||$.unfix(),(y??(y=new Set)).delete(x))),x!==h){if(g!==void 0&&g.has(x)){if(k.length<w.length){var P=w[0],q;f=P.prev;var K=k[0],J=k[k.length-1];for(q=0;q<k.length;q+=1)Pn(k[q],P,n);for(q=0;q<w.length;q+=1)g.delete(w[q]);Le(t,K.prev,J.next),Le(t,f,K),Le(t,J,P),h=P,f=J,C-=1,k=[],w=[]}else g.delete(x),Pn(x,h,n),Le(t,x.prev,x.next),Le(t,x,f===null?t.first:f.next),Le(t,f,x),f=x;continue}for(k=[],w=[];h!==null&&h.k!==E;)(a||!(h.e.f&be))&&(g??(g=new Set)).add(h),w.push(h),h=h.next;if(h===null)continue;x=h}k.push(x),f=x,h=x.next}if(h!==null||g!==void 0){for(var F=g===void 0?[]:rn(g);h!==null;)(a||!(h.e.f&be))&&F.push(h),h=h.next;var G=F.length;if(G>0){var I=i&Bn&&l===0?n:null;if(s){for(C=0;C<G;C+=1)(X=F[C].a)==null||X.measure();for(C=0;C<G;C+=1)(te=F[C].a)==null||te.fix()}Zi(t,F,I,d)}}s&>(()=>{var le;if(y!==void 0)for(x of y)(le=x.a)==null||le.apply()}),N.first=t.first&&t.first.e,N.last=f&&f.e}function Xi(e,t,n,r){r&on&&Yt(e.v,t),r&ln?Yt(e.i,n):e.i=n}function Qi(e,t,n,r,i,a,o,v,s,u){var l=Fe,d=(s&on)!==0,c=(s&ai)===0,h=d?c?$n(i):_e(i):i,g=s&ln?_e(o):o,f={i:g,v:h,k:a,a:null,e:null,prev:n,next:r};Fe=f;try{return f.e=ze(()=>v(e,h,g),gi),f.e.prev=n&&n.e,f.e.next=r&&r.e,n===null?t.first=f:(n.next=f,n.e.next=f.e),r!==null&&(r.prev=f,r.e.prev=f.e),f}finally{Fe=l}}function Pn(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==r;){var o=Nt(a);i.before(a),a=o}}function Le(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function rt(e,t,...n){var r=e,i=Re,a;mt(()=>{i!==(i=t())&&(a&&(Ee(a),a=null),a=ze(()=>i(r,...n)))},et)}function ea(e,t,n,r,i,a){var o,v,s=null,u=e,l,d=Fe;mt(()=>{const c=t()||null;var h=c==="svg"?Vn:null;if(c!==o){var g=Fe;An(d),l&&(c===null?ot(l,()=>{l=null,v=null}):c===v?lt(l):(Ee(l),Cn(!1))),c&&c!==v&&(l=ze(()=>{s=h?document.createElementNS(h,c):document.createElement(c),Je(s,s);{var f=s.appendChild(ht());r(s,f)}N.nodes_end=s,u.before(s)})),o=c,o&&(v=o),Cn(!0),An(g)}},et)}function kr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=kr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ta(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=kr(e))&&(r&&(r+=" "),r+=t);return r}function na(e){return typeof e=="object"?ta(e):e??""}function ra(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Z(e,t,n,r){var i=e.__attributes??(e.__attributes={});i[t]!==(i[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Ur]=n),n==null?e.removeAttribute(t):typeof n!="string"&&br(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ia(e,t,n,r,i=!1,a=!1,o=!1){var v=t||{},s=e.tagName==="OPTION";for(var u in t)u in n||(n[u]=null);n.class&&(n.class=na(n.class)),n.class=n.class?n.class+" "+r:r;var l=br(e),d=e.__attributes??(e.__attributes={});for(const w in n){let p=n[w];if(s&&w==="value"&&p==null){e.value=e.__value="",v[w]=p;continue}var c=v[w];if(p!==c){v[w]=p;var h=w[0]+w[1];if(h!=="$$"){if(h==="on"){const E={},x="$$"+w;let C=w.slice(2);var g=Di(C);if(Fi(C)&&(C=C.slice(0,-7),E.capture=!0),!g&&c){if(p!=null)continue;e.removeEventListener(C,v[x],E),v[x]=null}if(p!=null)if(g)e[`__${C}`]=p,ue([C]);else{let R=function(P){v[w].call(this,P)};var k=R;v[x]=pr(C,e,R,E)}else g&&(e[`__${C}`]=void 0)}else if(w==="style"&&p!=null)e.style.cssText=p+"";else if(w==="autofocus")Wi(e,!!p);else if(w==="__value"||w==="value"&&p!=null)e.value=e[w]=e.__value=p;else if(w==="selected"&&s)ra(e,p);else{var f=w;i||(f=Vi(f));var y=f==="defaultValue"||f==="defaultChecked";if(p==null&&!a&&!y)if(d[w]=null,f==="value"||f==="checked"){let E=e;if(f==="value"){let x=E.defaultValue;E.removeAttribute(f),E.defaultValue=x}else{let x=E.defaultChecked;E.removeAttribute(f),E.defaultChecked=x}}else e.removeAttribute(w);else y||l.includes(f)&&(a||typeof p!="string")?e[f]=p:typeof p!="function"&&Z(e,f,p)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return v}var In=new Map;function br(e){var t=In.get(e.nodeName);if(t)return t;In.set(e.nodeName,t=[]);for(var n,r=e,i=Element.prototype;i!==r;){n=qr(r);for(var a in n)n[a].set&&t.push(a);r=qn(r)}return t}function ve(e,t,n){if(n){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function vn(e,t,n,r){var i=e.__styles??(e.__styles={});i[t]!==n&&(i[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const aa=()=>performance.now(),Pe={tick:e=>requestAnimationFrame(e),now:()=>aa(),tasks:new Set};function Sr(){const e=Pe.now();Pe.tasks.forEach(t=>{t.c(e)||(Pe.tasks.delete(t),t.f())}),Pe.tasks.size!==0&&Pe.tick(Sr)}function oa(e){let t;return Pe.tasks.size===0&&Pe.tick(Sr),{promise:new Promise(n=>{Pe.tasks.add(t={c:e,f:n})}),abort(){Pe.tasks.delete(t)}}}function wt(e,t){e.dispatchEvent(new CustomEvent(t))}function la(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function Ln(e){const t={},n=e.split(";");for(const r of n){const[i,a]=r.split(":");if(!i||a===void 0)break;const o=la(i.trim());t[o]=a.trim()}return t}const sa=e=>e;function ca(e,t,n){var r=Fe,i,a,o,v=null;r.a??(r.a={element:e,measure(){i=this.element.getBoundingClientRect()},apply(){if(o==null||o.abort(),a=this.element.getBoundingClientRect(),i.left!==a.left||i.right!==a.right||i.top!==a.top||i.bottom!==a.bottom){const s=t()(this.element,{from:i,to:a},n==null?void 0:n());o=Ct(this.element,s,void 0,1,()=>{o==null||o.abort(),o=void 0})}},fix(){if(!e.getAnimations().length){var{position:s,width:u,height:l}=getComputedStyle(e);if(s!=="absolute"&&s!=="fixed"){var d=e.style;v={position:d.position,width:d.width,height:d.height,transform:d.transform},d.position="absolute",d.width=u,d.height=l;var c=e.getBoundingClientRect();if(i.left!==c.left||i.top!==c.top){var h=`translate(${i.left-c.left}px, ${i.top-c.top}px)`;d.transform=d.transform?`${d.transform} ${h}`:h}}}},unfix(){if(v){var s=e.style;s.position=v.position,s.width=v.width,s.height=v.height,s.transform=v.transform}}}),r.a.element=e}function xe(e,t,n,r){var i=(e&di)!==0,a=(e&vi)!==0,o=i&&a,v=(e&fi)!==0,s=o?"both":i?"in":"out",u,l=t.inert,d,c;function h(){var w=V,p=N;Te(null),ge(null);try{return u??(u=n()(t,(r==null?void 0:r())??{},{direction:s}))}finally{Te(w),ge(p)}}var g={is_global:v,in(){var w;if(t.inert=l,!i){c==null||c.abort(),(w=c==null?void 0:c.reset)==null||w.call(c);return}a||d==null||d.abort(),wt(t,"introstart"),d=Ct(t,h(),c,1,()=>{wt(t,"introend"),d==null||d.abort(),d=u=void 0})},out(w){if(!a){w==null||w(),u=void 0;return}t.inert=!0,wt(t,"outrostart"),c=Ct(t,h(),d,0,()=>{wt(t,"outroend"),w==null||w()})},stop:()=>{d==null||d.abort(),c==null||c.abort()}},f=N;if((f.transitions??(f.transitions=[])).push(g),i&&Tt){var y=v;if(!y){for(var k=f.parent;k&&k.f&et;)for(;(k=k.parent)&&!(k.f&Lt););y=!k||(k.f&Fn)!==0}y&&jt(()=>{De(()=>g.in())})}}function Ct(e,t,n,r,i){var a=r===1;if(zr(t)){var o,v=!1;return gt(()=>{if(!v){var y=t({direction:a?"in":"out"});o=Ct(e,y,n,r,i)}}),{abort:()=>{v=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return i(),{abort:Re,deactivate:Re,reset:Re,t:()=>r};const{delay:s=0,css:u,tick:l,easing:d=sa}=t;var c=[];if(a&&n===void 0&&(l&&l(0,1),u)){var h=Ln(u(0,1));c.push(h,h)}var g=()=>1-r,f=e.animate(c,{duration:s});return f.onfinish=()=>{var y=(n==null?void 0:n.t())??1-r;n==null||n.abort();var k=r-y,w=t.duration*Math.abs(k),p=[];if(w>0){if(u)for(var E=Math.ceil(w/16.666666666666668),x=0;x<=E;x+=1){var C=y+k*d(x/E),R=u(C,1-C);p.push(Ln(R))}g=()=>{var P=f.currentTime;return y+k*d(P/w)},l&&oa(()=>{if(f.playState!=="running")return!1;var P=g();return l(P,1-P),!0})}f=e.animate(p,{duration:w,fill:"forwards"}),f.onfinish=()=>{g=()=>r,l==null||l(r,1-r),i()}},{abort:()=>{f&&(f.cancel(),f.effect=null,f.onfinish=Re)},deactivate:()=>{i=Re},reset:()=>{r===0&&(l==null||l(1,0))},t:()=>g()}}function ua(e,t,n=t){var r=Rt();Yi(e,"input",i=>{var a=i?e.defaultValue:e.value;if(a=Vt(e)?$t(a):a,n(a),r&&a!==(a=t())){var o=e.selectionStart,v=e.selectionEnd;e.value=a??"",v!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(v,e.value.length))}}),De(t)==null&&e.value&&n(Vt(e)?$t(e.value):e.value),Jn(()=>{var i=t();Vt(e)&&i===$t(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Vt(e){var t=e.type;return t==="number"||t==="range"}function $t(e){return e===""?null:+e}function Mn(e,t){return e===t||(e==null?void 0:e[at])===t}function zt(e={},t,n,r){return jt(()=>{var i,a;return Jn(()=>{i=a,a=[],De(()=>{e!==n(...a)&&(t(e,...a),i&&Mn(n(...i),e)&&t(null,...i))})}),()=>{gt(()=>{a&&Mn(n(...a),e)&&t(null,...a)})}}),e}let kt=!1;function da(e){var t=kt;try{return kt=!1,[e(),kt]}finally{kt=t}}const va={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function fa(e,t,n){return new Proxy({props:e,exclude:t},va)}function Nn(e){for(var t=N,n=N;t!==null&&!(t.f&(ke|_t));)t=t.parent;try{return ge(t),e()}finally{ge(n)}}function O(e,t,n,r){var R;var i=(n&oi)!==0,a=!tt||(n&li)!==0,o=(n&ci)!==0,v=(n&ui)!==0,s=!1,u;o?[u,s]=da(()=>e[t]):u=e[t];var l=at in e||$r in e,d=o&&(((R=Ke(e,t))==null?void 0:R.set)??(l&&t in e&&(P=>e[t]=P)))||void 0,c=r,h=!0,g=!1,f=()=>(g=!0,h&&(h=!1,v?c=De(r):c=r),c);u===void 0&&r!==void 0&&(d&&a&&Jr(),u=f(),d&&d(u));var y;if(a)y=()=>{var P=e[t];return P===void 0?f():(h=!0,g=!1,P)};else{var k=Nn(()=>(i?ee:wi)(()=>e[t]));k.f|=Br,y=()=>{var P=_(k);return P!==void 0&&(c=void 0),P===void 0?c:P}}if(!(n&si))return y;if(d){var w=e.$$legacy;return function(P,q){return arguments.length>0?((!a||!q||w||s)&&d(q?y():P),P):y()}}var p=!1,E=!1,x=$n(u),C=Nn(()=>ee(()=>{var P=y(),q=_(x);return p?(p=!1,E=!0,q):(E=!1,x.v=P)}));return i||(C.equals=an),function(P,q){if(arguments.length>0){const K=q?_(C):a&&o?Y(P):P;return C.equals(K)||(p=!0,L(x,K),g&&c!==void 0&&(c=K),De(()=>_(C))),P}return _(C)}}function yt(e){W===null&&ar(),tt&&W.l!==null?_a(W).m.push(e):Ot(()=>{const t=De(e);if(typeof t=="function")return t})}function _a(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const ha="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ha);const xr="https://www.playpilot.com",fn="https://partner-api.playpilot.tech/1.0.0",Er="EncryptedToken",ma="articleReplacementEditToken";async function Tr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=pn();if(!n)throw new Error("No token was provided");const r=Cr(e);if(!r)throw new Error("Could not be authenticated");const i=await fetch(fn+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:r})});if(!i.ok)throw i;return ga(r),!0}catch(n){console.error(n)}return!1}function Cr(e=""){var r,i;const t=(r=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:r.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(ma);if(a)return decodeURI(a)}return((i=("; "+document.cookie).split(`; ${Er}=`).pop())==null?void 0:i.split(";")[0])||""}function ga(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const r="expires="+t.toUTCString();document.cookie=Er+"="+e+";"+r+";path=/"}function _n(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get("playpilot-editorial-mode")==="true"||!!e}function Ar(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=t*31+r>>>0}return t.toString(16)}const je=Object.freeze({ArticlePageView:"ali_article_page_view",TitleModalView:"ali_title_modal_view",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click"}),pa="https://insights.playpilot.net";async function Ve(e,t=null,n={}){const r=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,fetch(pa,{headers:r,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}const ya=e=>e;function hn(e){const t=e-1;return t*t*t+1}function On(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function wa(e,{delay:t=0,duration:n=400,easing:r=ya}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:a=>`opacity: ${a*i}`}}function vt(e,{delay:t=0,duration:n=400,easing:r=hn,x:i=0,y:a=0,opacity:o=0}={}){const v=getComputedStyle(e),s=+v.opacity,u=v.transform==="none"?"":v.transform,l=s*(1-o),[d,c]=On(i),[h,g]=On(a);return{delay:t,duration:n,easing:r,css:(f,y)=>`
|
|
3
|
-
transform: ${
|
|
4
|
-
opacity: ${s-l*y}`}}function
|
|
5
|
-
transform: ${s} scale(${1-
|
|
6
|
-
opacity: ${
|
|
7
|
-
`}}var ba=A('<div class="popover svelte-8w8waf" tabindex="-1" aria-hidden="true"><div class="dialog svelte-8w8waf"><!></div></div>');function Sa(e,t){ie(t,!0);let n=O(t,"maxHeight",15);_r("scope","popover");let r=U(null),i=U(!1);yt(async()=>{await En(),a(),await En(),o()});function a(){if(!_(r))return;const{top:d,right:c,bottom:h,height:g}=_(r).getBoundingClientRect(),f=v();L(i,Y(d-f<0&&window.innerHeight-h>d+g));const y=window.innerWidth-c-f;c+f>window.innerWidth&&(_(r).style.left=`${y}px`)}function o(){if(!_(r))return;const{top:d,height:c}=_(r).getBoundingClientRect(),h=v(),g=_(i)?window.innerHeight-d-h:d+c-h;n(Math.min(g,window.innerHeight*.8))}function v(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var s=ba(),u=b(s),l=b(u);rt(l,()=>t.children),zt(s,d=>L(r,d),()=>_(r)),M(()=>{ve(s,"flip",_(i)),vn(s,"--max-height",n()?n()+"px":null)}),xe(3,u,()=>vt,()=>({duration:100,y:10})),S(e,s),ae()}const xa=[{slug:"100",name:"All",categories:{movie:100,series:100,documentary:100,kids:100,cinema:100,podcasts:100}},{slug:"999",name:"Unscripted",categories:{},media_format:"video"},{slug:"900",name:"Independent",categories:{},media_format:"video"},{slug:"113",name:"Game Show",categories:{series:36,kids:28},media_format:"video"},{slug:"112",name:"Film Noir",categories:{movie:37},media_format:"video"},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42},media_format:"video"},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38},media_format:"video"},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36},media_format:"video"},{slug:"902",name:"Bollywood",categories:{},media_format:"video"},{slug:"240",name:"Concert",categories:{movie:45},media_format:"video"},{slug:"901",name:"Arthouse",categories:{},media_format:"video"},{slug:"903",name:"Alternate Version",categories:{},media_format:"video"},{slug:"121",name:"Reality TV",categories:{series:24},media_format:"video"},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44},media_format:"video"},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44},media_format:"video"},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84},media_format:"video"},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24},media_format:"video"},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70},media_format:"video"},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50},media_format:"video"},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76},media_format:"video"},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74},media_format:"video"},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28},media_format:"video"},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66},media_format:"video"},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32},media_format:"video"},{slug:"106",name:"Documentary",categories:{kids:50},media_format:"video"},{slug:"232",name:"Stand-up",categories:{movie:18,series:18},media_format:"video"},{slug:"126",name:"Talk Show",categories:{kids:34,series:16},media_format:"video"},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38},media_format:"video"},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90},media_format:"video"},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88},media_format:"video"},{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90},media_format:"video"},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80},media_format:"video"},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86},media_format:"video"},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46},media_format:"video"},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32},media_format:"video"},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20},media_format:"video"},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74},media_format:"video"},{slug:"103",name:"Kids",categories:{kids:76},media_format:"video"},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34},media_format:"video"},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30},media_format:"video"},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48},media_format:"video"},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40},media_format:"video"}],m=Object.freeze({English:"en-US",Swedish:"sv-SE"}),Ea={"Where To Stream Online":{[m.English]:"Where to stream online",[m.Swedish]:"Var kan man streama online"},"Affiliate Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med"},"An Error Occurred":{[m.English]:"An error occurred",[m.Swedish]:"Ett fel inträffade"},"Title Unavailable":{[m.English]:"This title is not currently available to stream.",[m.Swedish]:"Den här titeln går inte att streama just nu."},"Title Unavailable Suffix":{[m.English]:"is not currently available to stream.",[m.Swedish]:"går inte att streama just nu."},"Is Available To Stream On":{[m.English]:"is available to stream on",[m.Swedish]:"finns att streama på"},"Is Available To Stream":{[m.English]:"is available to stream.",[m.Swedish]:"finns att streama."},"View Streaming Options":{[m.English]:"View streaming options",[m.Swedish]:"Se streamingalternativ"},And:{[m.English]:"and",[m.Swedish]:"och"},Minutes:{[m.English]:"minutes",[m.Swedish]:"minuter"},"Type: movie":{[m.English]:"Movie",[m.Swedish]:"Film"},"Type: series":{[m.English]:"Series",[m.Swedish]:"Serie"},Stream:{[m.English]:"Stream",[m.Swedish]:"Strömma"},Buy:{[m.English]:"Buy",[m.Swedish]:"Köp"},Rent:{[m.English]:"Rent",[m.Swedish]:"Hyra"},"Rent Or Buy":{[m.English]:"Rent or Buy",[m.Swedish]:"Hyra"},All:{[m.English]:"All",[m.Swedish]:"Alla"},Unscripted:{[m.English]:"Unscripted",[m.Swedish]:"Oscripterat"},Independent:{[m.English]:"Independent",[m.Swedish]:"Indie"},"Game Show":{[m.English]:"Game Show",[m.Swedish]:"Gameshow"},"Film Noir":{[m.English]:"Film Noir",[m.Swedish]:"Film noir"},Entertainment:{[m.English]:"Entertainment",[m.Swedish]:"Underhållning"},News:{[m.English]:"News",[m.Swedish]:"Nyheter"},Short:{[m.English]:"Short",[m.Swedish]:"Kortfilm"},Bollywood:{[m.English]:"Bollywood",[m.Swedish]:"Bollywood"},Concert:{[m.English]:"Concert",[m.Swedish]:"Konsert"},Arthouse:{[m.English]:"Arthouse",[m.Swedish]:"Arthouse"},"Alternate Version":{[m.English]:"Alternate Version",[m.Swedish]:"Alternativ version"},"Reality TV":{[m.English]:"Reality TV",[m.Swedish]:"Reality-TV"},Culture:{[m.English]:"Culture",[m.Swedish]:"Kultur"},Drama:{[m.English]:"Drama",[m.Swedish]:"Drama"},Crime:{[m.English]:"Crime",[m.Swedish]:"Kriminal"},Western:{[m.English]:"Western",[m.Swedish]:"Western"},Thriller:{[m.English]:"Thriller",[m.Swedish]:"Thriller"},Animation:{[m.English]:"Animation",[m.Swedish]:"Animerat"},Mystery:{[m.English]:"Mystery",[m.Swedish]:"Mysterium"},Science:{[m.English]:"Science",[m.Swedish]:"Vetenskap"},Nature:{[m.English]:"Nature",[m.Swedish]:"Natur"},War:{[m.English]:"War",[m.Swedish]:"Krig"},"Sci-Fi":{[m.English]:"Sci-Fi",[m.Swedish]:"Sci-fi"},Documentary:{[m.English]:"Documentary",[m.Swedish]:"Dokumentär"},"Stand-up":{[m.English]:"Stand-up",[m.Swedish]:"Standup"},"Talk Show":{[m.English]:"Talk Show",[m.Swedish]:"Talkshow"},Fantasy:{[m.English]:"Fantasy",[m.Swedish]:"Fantasy"},History:{[m.English]:"History",[m.Swedish]:"Historia"},Adventure:{[m.English]:"Adventure",[m.Swedish]:"Äventyr"},Action:{[m.English]:"Action",[m.Swedish]:"Action"},Horror:{[m.English]:"Horror",[m.Swedish]:"Skräck"},Comedy:{[m.English]:"Comedy",[m.Swedish]:"Komedi"},Biography:{[m.English]:"Biography",[m.Swedish]:"Biografi"},Music:{[m.English]:"Music",[m.Swedish]:"Musik"},Sport:{[m.English]:"Sport",[m.Swedish]:"Sport"},Romance:{[m.English]:"Romance",[m.Swedish]:"Romantik"},Kids:{[m.English]:"Kids",[m.Swedish]:"Barn"},Lifestyle:{[m.English]:"Lifestyle",[m.Swedish]:"Livsstil"},Musical:{[m.English]:"Musical",[m.Swedish]:"Musikal"},Anime:{[m.English]:"Anime",[m.Swedish]:"Anime"},Family:{[m.English]:"Family",[m.Swedish]:"Familj"}};function ce(e,t=Ta()){var n;return((n=Ea[e])==null?void 0:n[t])||e}function Ta(){var r,i;const e=(r=window.PlayPilotLinkInjections)==null?void 0:r.language,t=Object.values(m);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(i=document.querySelector("html"))==null?void 0:i.getAttribute("lang");return n&&t.includes(n)?n:m.English}var Ca=A('<div class="genre svelte-1vtdftw"> </div>'),Aa=(e,t)=>L(t,!0),Pa=A('<button class="genre expand svelte-1vtdftw"> </button>'),Ia=A("<!> <!>",1);function La(e,t){ie(t,!0);let n=U(!1),r=ee(()=>_(n)?t.genres:[t.genres[0]]);var i=Ia(),a=re(i);Be(a,17,()=>_(r),dt,(s,u)=>{var l=Xe();const d=ee(()=>{var g;return(g=xa.find(f=>f.slug===_(u)))==null?void 0:g.name});var c=re(l);{var h=g=>{var f=Ca(),y=b(f);M(()=>z(y,ce(_(d)))),S(g,f)};H(c,g=>{_(d)&&g(h)})}S(s,l)});var o=T(a,2);{var v=s=>{var u=Pa();u.__click=[Aa,n];var l=b(u);M(()=>z(l,`+${t.genres.length-1}`)),S(s,u)};H(o,s=>{!_(n)&&t.genres.length>1&&s(v)})}S(e,i),ae()}ue(["click"]);function Ma(e){let t=[];for(const n of e){let r=n;const i=t.find(v=>v.name===r.name),a=i==null?void 0:i.extra_info.category,o=r.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(v=>v.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),t.push(r)}return t}ri();var Na=Ae('<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 11L5 6L0 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Oa(e){var t=Na();S(e,t)}var ja=(e,t,n)=>t(n()),Ra=A('<div class="arrow svelte-z484wk"><!></div>'),qa=A('<a target="_blank" class="playlink svelte-z484wk" rel="sponsored"><img alt="" height="32" width="32" class="svelte-z484wk"> <div><span class="name svelte-z484wk"> </span> <div class="category svelte-z484wk"> </div></div> <!></a>'),Ha=A('<div class="playlink empty svelte-z484wk"> </div>'),Fa=A('<h2 class="svelte-z484wk"> </h2> <div class="playlinks svelte-z484wk"><!> <!></div>',1);function za(e,t){ie(t,!0);const n=O(t,"list",3,!1),r=qi("scope")==="modal",i=ee(()=>t.playlinks.filter(f=>!!f.logo_url)),a=ee(()=>Ma(_(i))),o={SVOD:ce("Stream"),BUY:ce("Buy"),RENT:ce("Rent"),TVOD:ce("Rent Or Buy")};function v(f){Ve(r?je.TitleModalPlaylinkClick:je.TitlePopoverPlaylinkClick,t.title,{playlink:f})}var s=Fa(),u=re(s),l=b(u);M(()=>z(l,ce("Where To Stream Online")));var d=T(u,2),c=b(d);Be(c,17,()=>_(a),dt,(f,y)=>{let k=()=>_(y).name,w=()=>_(y).url,p=()=>_(y).logo_url,E=()=>_(y).extra_info.category;var x=qa();x.__click=[ja,v,k];var C=b(x),R=T(C,2),P=b(R),q=b(P),K=T(P,2),J=b(K);M(()=>z(J,o[E()]||ce("Stream")));var F=T(R,2);{var G=I=>{var j=Ra(),$=b(j);Oa($),S(I,j)};H(F,I=>{n()&&I(G)})}M(()=>{Z(x,"href",w()),Z(x,"data-playlink",k()),Z(C,"src",p()),z(q,k())}),S(f,x)});var h=T(c,2);{var g=f=>{var y=Ha(),k=b(y);M(()=>z(k,ce("Title Unavailable"))),S(f,y)};H(h,f=>{t.playlinks.length||f(g)})}M(()=>ve(d,"list",n())),S(e,s),ae()}ue(["click"]);var Da=(e,t)=>L(t,!0),Ba=A('<button class="show-more svelte-fluzit">Show more</button>'),Va=A('<p class="svelte-fluzit"> </p>'),$a=A('<div><span class="paragraph svelte-fluzit"> <!> <!></span> <!></div>');function Ua(e,t){ie(t,!0);const n=O(t,"blurb",3,""),r=O(t,"limit",3,200);let i=U(!1),a=ee(()=>t.text.slice(0,r()));var o=$a(),v=b(o),s=b(v),u=T(s);{var l=f=>{var y=Oe("...");S(f,y)};H(u,f=>{!_(i)&&t.text.length>r()&&f(l)})}var d=T(u,2);{var c=f=>{var y=Ba();y.__click=[Da,i],S(f,y)};H(d,f=>{!_(i)&&(t.text.length>r()||n())&&f(c)})}var h=T(v,2);{var g=f=>{var y=Va(),k=b(y);M(()=>z(k,n())),S(f,y)};H(h,f=>{_(i)&&f(g)})}M(()=>z(s,_(i)?t.text:_(a))),S(e,o),ae()}ue(["click"]);var Wa=A('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),Ka=A('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function Ya(e,t){var n=Ka(),r=T(re(n),2);Be(r,21,()=>t.participants,dt,(i,a)=>{var o=Wa(),v=b(o),s=T(v),u=b(s);M(()=>{var c;return z(u,((c=_(a).character)==null?void 0:c.slice(0,20))||"")});var l=T(u);{var d=c=>{var h=Oe("...");S(c,h)};H(l,c=>{var h;(h=_(a).character)!=null&&h.length&&c(d)})}M(()=>z(v,`${_(a).name??""} `)),S(i,o)}),S(e,n)}var Ga=Ae('<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function mn(e){var t=Ga();S(e,t)}var Za=A('<div class="top svelte-zq2qln"><img class="poster svelte-zq2qln"></div>'),Ja=A("<div> </div>"),Xa=A("<!> <!>",1),Qa=A('<div class="content svelte-zq2qln" data-playpilot-link-injections-title=""><header class="header svelte-zq2qln"><!> <h1 class="svelte-zq2qln"> </h1> <div class="info svelte-zq2qln"><div class="imdb svelte-zq2qln"><!> </div> <!> <div> </div> <div class="capitalize svelte-zq2qln"> </div> <!></div></header> <main class="main"><!> <!></main></div> <div class="background svelte-zq2qln"><img alt="" class="svelte-zq2qln"></div>',1);function Pr(e,t){ie(t,!0);const n=O(t,"small",3,!1),r=O(t,"compact",3,!1);var i=Qa(),a=re(i),o=b(a),v=b(o);{var s=F=>{var G=Za(),I=b(G);M(()=>{Z(I,"src",t.title.standing_poster),Z(I,"alt",`Movie poster for '${t.title.title??""}'`)}),S(F,G)};H(v,F=>{r()||F(s)})}var u=T(v,2),l=b(u),d=T(u,2),c=b(d),h=b(c);mn(h);var g=T(h),f=T(c,2);La(f,{get genres(){return t.title.genres}});var y=T(f,2),k=b(y),w=T(y,2),p=b(w);M(()=>z(p,ce(`Type: ${t.title.type}`)));var E=T(w,2);{var x=F=>{var G=Ja(),I=b(G);M(()=>z(I,`${t.title.length??""} ${ce("Minutes")??""}`)),S(F,G)};H(E,F=>{t.title.length&&F(x)})}var C=T(o,2),R=b(C);za(R,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var P=T(R,2);{var q=F=>{var G=Xa(),I=re(G);Ua(I,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var j=T(I,2);{var $=X=>{Ya(X,{get participants(){return t.title.participants}})};H(j,X=>{var te;(te=t.title.participants)!=null&&te.length&&X($)})}S(F,G)};H(P,F=>{n()||F(q)})}var K=T(a,2),J=b(K);M(()=>{Z(a,"data-playpilot-original-title",t.title.original_title),ve(a,"small",n()),ve(a,"compact",r()),z(l,t.title.title),z(g,` ${t.title.imdb_score??""}`),z(k,t.title.year),ve(K,"faded",r()),Z(J,"src",t.title.medium_poster)}),S(e,i),ae()}function eo(e,t){ie(t,!0);let n=U(0);Ve(je.TitlePopoverView,t.title),Sa(e,{get maxHeight(){return _(n)},set maxHeight(r){L(n,Y(r))},children:(r,i)=>{var a=ee(()=>_(n)<250);Pr(r,{get title(){return t.title},small:!0,get compact(){return _(a)}})},$$slots:{default:!0}}),ae()}var to=(e,t,n,r)=>t(_(n).title_details,_(r)),no=A(' <span class="svelte-6p0hvs"><button class="svelte-6p0hvs"> </button></span>',1),ro=(e,t,n,r)=>t(_(n).title_details,r()),io=A('<!> <a target="_blank"> </a>',1),ao=A(" <!>.",1),oo=A("<!> <br>",1),lo=A(" <br>",1),so=A('<span class="svelte-6p0hvs"><!></span>'),co=A("<p></p>");function uo(e,t){ie(t,!0);const n=O(t,"onclickmodal",3,s=>null);function r(s,u){Ve(je.AfterArticlePlaylinkClick,s,{playlink:u})}function i(s,u){Ve(je.AfterArticleModalButtonClick,s),n()(u)}var a=Xe(),o=re(a);{var v=s=>{var u=co();Be(u,21,()=>t.linkInjections,dt,(l,d)=>{var c=so();const h=ee(()=>{const{key:w,title:p,title_details:E,after_article_style:x}=_(d);return{key:w,title:p,title_details:E,after_article_style:x}}),g=ee(()=>{var w;return((w=_(h).title_details)==null?void 0:w.providers)||[]});var f=b(c);{var y=w=>{var p=oo(),E=re(p);{var x=R=>{var P=no(),q=re(P);M(()=>z(q,`"${_(h).title??""}" ${ce("Is Available To Stream")??""} `));var K=T(q),J=b(K);J.__click=[to,i,h,d];var F=b(J);M(()=>z(F,ce("View Streaming Options"))),S(R,P)},C=R=>{var P=ao(),q=re(P);M(()=>z(q,`"${_(h).title??""}" ${ce("Is Available To Stream On")??""} `));var K=T(q);Be(K,17,()=>_(g),dt,(J,F,G)=>{let I=()=>_(F).name,j=()=>_(F).url;var $=io(),X=re($);{var te=ne=>{var oe=Oe();M(()=>z(oe,G===_(g).length-1?`, ${ce("And")}`:",")),S(ne,oe)};H(X,ne=>{G&&ne(te)})}var le=T(X,2);le.__click=[ro,r,h,I];var Ie=b(le);M(()=>{Z(le,"href",j()),z(Ie,I())}),S(J,$)}),S(R,P)};H(E,R=>{_(h).after_article_style==="modal_button"?R(x):R(C,!1)})}S(w,p)},k=w=>{var p=lo(),E=re(p);M(()=>z(E,`"${_(h).title??""}" ${ce("Title Unavailable Suffix")??""} `)),S(w,p)};H(f,w=>{_(g).length?w(y):w(k,!1)})}M(()=>Z(c,"data-playpilot-injection-key",_(h).key)),S(l,c)}),S(s,u)};H(o,s=>{t.linkInjections.length&&s(v)})}S(e,a),ae()}ue(["click"]);function vo(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function Ir(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function fo(e,t,n=[]){var a,o;const r=document.createTreeWalker(t);let i;for(;(i=r.nextNode())&&!((a=i.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=i.parentNode)==null?void 0:o.nodeName)||"")););return i}function _o(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function ho(e,t,n,r){const i=vo(t),a=Ir(t),o=e.slice(0,r),v=e.slice(r),s=/[-/\\^$*+?.()|[\]{}]/g,u=new RegExp(`${a.replace(s,"\\$&")}|${i.replace(s,"\\$&")}`),l=v.replace(u,n);return o+l}function mo(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const Pt={};let Qt=null;function go(e){let t=[],n=[e];for(;n.length>0;){const r=n.pop();if(/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(r.tagName))continue;if(Array.from(r.childNodes).some(o=>{var v;return o.nodeType===Node.TEXT_NODE&&((v=o.nodeValue)==null?void 0:v.trim())!==""})){t.push(r);continue}const a=Array.from(r.children);for(let o=a.length-1;o>=0;o--)n.push(a[o])}return t}function gn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),r=document.querySelector(n);if(r)return r}return document.querySelector("article")||document.querySelector("main")||document.body}function po(e,t,n){var u;const r=e.map(l=>l.innerText).join(" "),i=t.filter(l=>l.in_text!==!1&&!l.inactive),a=i.filter(l=>r.includes(l.sentence)),o={};for(const l of a){const d=e.findIndex(k=>k.innerText.includes(l.sentence)),c=e[d];if(!c)continue;const h=fo(l.title,c,["A"]);if(!h||_o(h))continue;const g=document.createElement("a");g.innerText=l.title,g.href=l.playpilot_url,g.dataset.playpilotInjectionKey=l.key,g.dataset.playpilotOriginalTitle=(u=l.title_details)==null?void 0:u.original_title,g.target="_blank",g.rel="noopener nofollow noreferrer";const f=mo(Object.values(o).filter(k=>k.elementIndex===d).map(k=>k.to));c.innerHTML=ho(c.innerHTML,l.title,g.outerHTML,f);const y=c.innerHTML.indexOf(g.outerHTML);o[l.key]={elementIndex:d,from:y,to:y+g.outerHTML.length}}wo(i,n),yo();const v=t.filter(l=>l.after_article&&!l.inactive);return v.length&&So(e,v,n),Eo(t,o).map(l=>{const d=!l.inactive&&!l.after_article&&!document.querySelector(`[data-playpilot-injection-key="${l.key}"]`);return{...l,inactive:!!l.inactive,failed:d}})}function yo(){const e=Array.from(document.querySelectorAll("[data-playpilot-injection-key]")),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(r=>{getComputedStyle(n).getPropertyValue(r)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${r}`)})})}function wo(e,t){document.querySelectorAll("[data-playpilot-injection-key]").forEach(r=>{const i=r.dataset.playpilotInjectionKey,a=e.find(o=>i===o.key);a&&(r.addEventListener("click",o=>ko(o,a,t)),r.addEventListener("mouseenter",o=>bo(o,a)),r.addEventListener("mouseleave",()=>It(a)))})}function ko(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),e.target.closest(".popover"))||(n(t),It(t))}function bo(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget,r=dn(eo,{target:n,props:{title:t.title_details}});Pt[t.key]={injection:t,component:r}}function It(e,t=!0){const n=Pt[e.key];n&&wr(n.component,{outro:t})}function So(e,t,n){if(!t.length)return;const r=document.createElement("div");r.dataset.playpilotAfterArticlePlaylinks="true",e[e.length-1].insertAdjacentElement("afterend",r),Qt=dn(uo,{target:r,props:{linkInjections:t,onclickmodal:n}})}function xo(){var e;Qt&&(wr(Qt),(e=document.querySelector("[data-playpilot-after-article-playlinks"))==null||e.remove())}function en(){Object.values(Pt).forEach(t=>It(t.injection)),document.querySelectorAll("[data-playpilot-injection-key]").forEach(t=>t.outerHTML=t.textContent||""),Object.values(Pt).forEach(({injection:t})=>It(t,!1)),xo()}function Eo(e,t){return e.sort((n,r)=>{const i=t[n.key],a=t[r.key];return!i&&a?1:i&&!a?-1:!i&&!a?0:(i==null?void 0:i.elementIndex)!==(a==null?void 0:a.elementIndex)?((i==null?void 0:i.elementIndex)||0)-((a==null?void 0:a.elementIndex)||0):((i==null?void 0:i.from)||0)-((a==null?void 0:a.from)||0)})}function To(){const e=gn();return{heading:Co(e),modified_time:jn(e),published_time:jn(e)}}function Co(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function jn(e){const t=document.querySelector('meta[property*="modified_time"]')||e.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?Ao(n):null}function Ao(e){try{return new Date(e).toISOString()}catch{return null}}function Lr(){return location.protocol+"//"+location.host+location.pathname}let Ut=null;async function Mr(e,t,{hash:n=Ar(t),params:r={}}={}){const i=new Headers({"Content-Type":"application/json"}),a=pn(),o=_n()?await Tr():!1,v=To();if(!a)throw new Error("No token was provided");const s=await fetch(fn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}`,{headers:i,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:v,page_text:t,...r})});if(!s.ok)throw s;return await s.json()}async function Po(e,t,n=3e3,r=600){let i=Ar(t),a=0;Ut&&clearTimeout(Ut);const o=async(v,s)=>{try{const u=await Mr(e,t,{hash:i});if(u.injections_enabled===!1&&!_n()){v([]);return}if(u.injections_ready){u.link_injections&&(u.link_injections=Lo(u.link_injections)),v(u.link_injections||[]);return}throw new Error}catch{if(a++,a>=r){console.error("Max poll limit exceeded. Please return later."),v();return}Ut=setTimeout(()=>o(v),n)}};return new Promise(o)}async function Io(e,t){var a;const n=(a=window.PlayPilotLinkInjections)==null?void 0:a.selector,r=e.map(o=>({sid:o.sid,title:o.title,sentence:o.sentence,playpilot_url:o.playpilot_url,after_article:!!o.after_article,after_article_style:o.after_article_style||null,in_text:o.in_text??!0,inactive:!!o.inactive}));if(!await Mr(Lr(),t,{params:{private_token:Cr(),automation_enabled:!1,link_injections:r,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}function Lo(e){return e.map(t=>({...t,key:Nr(t.sid)}))}function Nr(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function pn(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}var Mo=Ae('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function No(e){var t=Mo();S(e,t)}function yn(e,t){ie(t,!0);const n=O(t,"children",3,null),r=O(t,"size",3,"margin(2)"),i=O(t,"onclick",3,()=>null),a=fa(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var o=Xe(),v=re(o);ea(v,()=>t.href?"a":"button",!1,(s,u)=>{let l;M(()=>{l=ia(s,l,{role:t.href?"link":"button",onclick:i(),class:"button",...a},"svelte-1ik04fv",s.namespaceURI===Vn,s.nodeName.includes("-")),vn(s,"--size",r())});var d=Xe(),c=re(d);rt(c,()=>n()??Re),S(u,d)}),S(e,o),ae()}var Oo=(e,t)=>t()(),jo=A('<div class="modal svelte-p44kuk"><div class="dialog svelte-p44kuk" role="dialog"><div class="close svelte-p44kuk"><!></div> <!></div> <div class="backdrop svelte-p44kuk"></div></div>');function Ro(e,t){ie(t,!0);const n=O(t,"onclose",3,()=>null),r=O(t,"onscroll",3,()=>null);_r("scope","modal"),yt(()=>{const d=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=d||""});function i(d){return window.innerWidth<600?vt(d,{duration:250,y:window.innerHeight}):ka(d,{duration:150,start:.85})}var a=jo();he("keydown",ye,({key:d})=>{d==="Escape"&&n()()});var o=b(a),v=b(o),s=b(v);yn(s,{onclick:()=>n()(),children:(d,c)=>{No(d)},$$slots:{default:!0}});var u=T(v,2);rt(u,()=>t.children);var l=T(o,2);l.__click=[Oo,n],he("scroll",o,function(...d){var c;(c=r())==null||c.apply(this,d)}),xe(3,o,()=>i),xe(3,a,()=>wa,()=>({duration:150})),S(e,a),ae()}ue(["click"]);function qo(e,t){ie(t,!0),Ve(je.TitleModalView,t.title);let n=!1;function r(){n||(Ve(je.TitleModalScroll,t.title),n=!0)}Ro(e,{get onclose(){return t.onclose},onscroll:r,children:(i,a)=>{Pr(i,{get title(){return t.title}})},$$slots:{default:!0}}),ae()}function Ho(e){const t=e-1;return t*t*t+1}function Fo(e,{from:t,to:n},r={}){var i=getComputedStyle(e),a=zo(e),o=i.transform==="none"?"":i.transform,[v,s]=i.transformOrigin.split(" ").map(parseFloat),u=t.width/n.width,l=t.height/n.height,d=(t.left+u*v-(n.left+v))/a,c=(t.top+l*s-(n.top+s))/a,{delay:h=0,duration:g=y=>Math.sqrt(y)*120,easing:f=Ho}=r;return{delay:h,duration:typeof g=="function"?g(Math.sqrt(d*d+c*c)):g,easing:f,css:(y,k)=>{var w=k*d,p=k*c,E=y+k*u,x=y+k*l;return`transform: ${o} scale(${E}, ${x}) translate(${w}px, ${p}px);`}}}function zo(e){if("currentCSSZoom"in e)return e.currentCSSZoom;for(var t=e,n=1;t!==null;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}var Do=Ae('<svg width="8" height="4" viewBox="0 0 8 4" fill="none" class="svelte-by11ix"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Bo(e,t){const n=O(t,"expanded",3,!1);var r=Do();M(()=>ve(r,"expanded",n())),S(e,r)}function Vo(e,t,n){t(!t()),n()(t())}var $o=A('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function tn(e,t){ie(t,!0);let n=O(t,"active",15),r=O(t,"fullwidth",3,!1),i=O(t,"label",3,""),a=O(t,"onclick",3,()=>null);var o=$o();o.__click=[Vo,n,a];var v=b(o),s=b(v);rt(s,()=>t.children),M(()=>{Z(o,"aria-label",`Toggle ${i()??""} ${(n()?"off":"on")??""}`),ve(o,"active",n()),ve(o,"fullwidth",r())}),S(e,o),ae()}ue(["click"]);var Uo=A('<input type="text" class="svelte-1vrer3i">');function wn(e,t){let n=O(t,"value",15),r=O(t,"label",3,""),i=O(t,"name",3,""),a=O(t,"readonly",3,!1),o=O(t,"oninput",3,()=>null);var v=Uo();v.__input=function(...s){var u;(u=o())==null||u.apply(this,s)},M(()=>{Z(v,"name",i()),Z(v,"aria-label",r()),Z(v,"placeholder",r()),v.readOnly=a()}),ua(v,n),S(e,v)}ue(["input"]);var Wo=Ae('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Ko=Ae('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Yo=Ae('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Rn(e,t){let n=O(t,"align",3,"bottom");var r=Yo(),i=b(r);{var a=v=>{var s=Wo();S(v,s)},o=v=>{var s=Xe(),u=re(s);{var l=d=>{var c=Ko();S(d,c)};H(u,d=>{n()==="center"&&d(l)},!0)}S(v,s)};H(i,v=>{n()==="bottom"?v(a):v(o,!1)})}S(e,r)}var Go=A("<!> In-text Playlink",1),Zo=A("<!> Bottom Playlink",1),Jo=(e,t)=>t().after_article_style="playlinks",Xo=(e,t)=>t().after_article_style="modal_button",Qo=A('<div><div class="label svelte-14krcvc">Bottom playlinks style</div> <div class="group svelte-14krcvc" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-14krcvc">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-14krcvc">Modal button</button> <div class="active-marker svelte-14krcvc"></div></div></div>'),el=A('<div class="switches svelte-14krcvc"><!> <!></div> <!>',1);function tl(e,t){ie(t,!0);let n=O(t,"linkInjection",7),r=ee(()=>n().after_article_style==="modal_button");var i=el(),a=re(i),o=b(a),v=ee(()=>n().in_text??!0);tn(o,{fullwidth:!0,get active(){return _(v)},onclick:c=>n().in_text=c,label:"In-text Playlink",children:(c,h)=>{var g=Go(),f=re(g);Rn(f,{align:"center"}),S(c,g)},$$slots:{default:!0}});var s=T(o,2),u=ee(()=>n().after_article??!1);tn(s,{fullwidth:!0,get active(){return _(u)},onclick:c=>n().after_article=c,label:"Bottom Playlink",children:(c,h)=>{var g=Zo(),f=re(g);Rn(f,{align:"bottom"}),S(c,g)},$$slots:{default:!0}});var l=T(a,2);{var d=c=>{var h=Qo(),g=T(b(h),2),f=b(g);f.__click=[Jo,n];var y=T(f,2);y.__click=[Xo,n];var k=T(y,2);M(()=>{Z(g,"aria-activedescendant",`playlinks-${(_(r)?"after-article":"in-text")??""}`),Z(f,"aria-selected",!_(r)||null),ve(f,"active",!_(r)),Z(y,"aria-selected",_(r)||null),ve(y,"active",_(r)),ve(k,"right",_(r))}),xe(3,h,()=>At,()=>({duration:100})),S(c,h)};H(l,c=>{n().after_article&&c(d)})}S(e,i),ae()}ue(["click"]);var nl=A('<div class="alert svelte-1tq7qhv"><!></div>');function kn(e,t){ie(t,!0);var n=nl(),r=b(n);rt(r,()=>t.children),S(e,n),ae()}var rl=Ae('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function il(e){var t=rl();S(e,t)}var al=(e,t)=>L(t,!_(t)),ol=A('<div class="content svelte-1fmy0wh"><!></div>'),ll=A('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function sl(e,t){ie(t,!0);let n=U(!1),r=U(null);function i(l){var c;const d=l.target;d===_(r)||(c=_(r))!=null&&c.contains(d)||L(n,!1)}var a=ll();he("click",ye,i);var o=b(a);o.__click=[al,n];var v=b(o);il(v),zt(o,l=>L(r,l),()=>_(r));var s=T(o,2);{var u=l=>{var d=ol(),c=b(d);rt(c,()=>t.children),xe(1,d,()=>vt,()=>({duration:150,y:5})),S(l,d)};H(s,l=>{_(n)&&l(u)})}M(()=>{Z(o,"aria-label",t.ariaLabel),Z(o,"aria-expanded",_(n))}),S(e,a),ae()}ue(["click"]);function cl(e,t,n){requestAnimationFrame(()=>t());const r=e.target;if(["BUTTON","INPUT"].includes(r.nodeName)||r.closest("button")||r.closest("input"))return;const i=n()[0];i&&i.scrollIntoView({behavior:"smooth"})}var ul=A('<span data-testid="length" class="svelte-1bz02u6"> </span>'),dl=A('<button class="context-menu-action svelte-1bz02u6">Remove</button>'),vl=(e,t)=>L(t,!_(t)),fl=A('<div class="actions svelte-1bz02u6"><button class="expand svelte-1bz02u6" aria-label="Expand"><!></button> <!></div>'),_l=A('<div class="expanded svelte-1bz02u6"><div class="label svelte-1bz02u6">Link URL</div> <!> <div class="label offset svelte-1bz02u6">Layout options</div> <div class="type-select svelte-1bz02u6"><!></div></div>'),hl=A('<div class="item svelte-1bz02u6"><div class="header svelte-1bz02u6"><img class="poster svelte-1bz02u6" alt=""> <div class="info"><div class="title svelte-1bz02u6"> </div> <div class="meta svelte-1bz02u6"><span class="svelte-1bz02u6"><!> 7.1</span> <span class="svelte-1bz02u6"> </span> <span class="svelte-1bz02u6"> </span> <!></div></div> <div class="context-menu svelte-1bz02u6"><!></div></div> <div class="content svelte-1bz02u6"><!> <!></div></div>');function ml(e,t){ie(t,!0);const n=O(t,"linkInjection",15),r=O(t,"onremove",3,()=>null),i=O(t,"onhighlight",3,()=>null),a=ee(()=>n()||{}),o=ee(()=>_(a).key),v=ee(()=>_(a).title_details),s=ee(()=>_(a).failed),u=ee(()=>_(v));let l=U(!1),d=U(!1),c=U(null);function h(D=!0){f().forEach(Q=>{Q.classList.toggle("injection-highlight",D)})}function g(D){let B=D.target,Q=B==null?void 0:B.dataset.playpilotInjectionKey;B&&!Q&&(B=B.closest(`[data-playpilot-injection-key="${_(o)}"]`),Q=B==null?void 0:B.dataset.playpilotInjectionKey),L(d,Q===_(o)),_(c)&&_(d)&&i()(_(c))}function f(){return Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${_(o)}"]`))}var y=hl();he("mouseover",ye,g),y.__click=[cl,h,f];var k=b(y),w=b(k),p=T(w,2),E=b(p),x=b(E),C=T(E,2),R=b(C),P=b(R);mn(P);var q=T(R,2),K=b(q),J=T(q,2),F=b(J),G=T(J,2);{var I=D=>{var B=ul(),Q=b(B);M(()=>z(Q,`${_(u).length??""}m`)),S(D,B)};H(G,D=>{_(u).length&&D(I)})}var j=T(p,2),$=b(j);sl($,{ariaLabel:"More options",children:(D,B)=>{var Q=dl();Q.__click=function(...pe){var Ue;(Ue=r())==null||Ue.apply(this,pe)},S(D,Q)},$$slots:{default:!0}});var X=T(k,2),te=b(X);{var le=D=>{kn(D,{children:(B,Q)=>{var pe=Oe("A match was found, but the link could not be injected.");S(B,pe)},$$slots:{default:!0}})},Ie=D=>{var B=fl(),Q=b(B);Q.__click=[vl,l];var pe=b(Q);Bo(pe,{get expanded(){return _(l)}});var Ue=T(Q,2),Dt=ee(()=>!n().inactive);tn(Ue,{label:"Visible",get active(){return _(Dt)},onclick:Bt=>n(n().inactive=!Bt,!0),children:(Bt,Zl)=>{var Or=Oe("Visible");S(Bt,Or)},$$slots:{default:!0}}),M(()=>Z(Q,"aria-expanded",_(l))),S(D,B)};H(te,D=>{_(s)?D(le):D(Ie,!1)})}var ne=T(te,2);{var oe=D=>{var B=_l(),Q=T(b(B),2);wn(Q,{label:"Playlink URL",get value(){return n().playpilot_url},set value(Dt){n(n().playpilot_url=Dt,!0)}});var pe=T(Q,4),Ue=b(pe);tl(Ue,{get linkInjection(){return n()}}),xe(3,B,()=>At,()=>({duration:100})),S(D,B)};H(ne,D=>{_(l)&&D(oe)})}zt(y,D=>L(c,D),()=>_(c)),M(()=>{ve(y,"highlighted",_(d)),Z(w,"src",_(u).standing_poster),z(x,_(u).title),z(K,_(u).year),z(F,_(u).type)}),he("mouseenter",y,()=>h(!0)),he("mouseleave",y,()=>h(!1)),xe(6,y,()=>At,()=>({duration:200})),S(e,y),ae()}ue(["click"]);var gl=A('<button class="drag-handle svelte-bwc0q8" aria-label="Move editor"></button>');function pl(e,t){ie(t,!0);let n=O(t,"element",7),r=O(t,"position",23,()=>({x:0,y:0})),i=O(t,"limit",19,()=>({x:0,y:0})),a=O(t,"onchange",3,()=>null),o=!1,v={x:0,y:0},s=r();yt(()=>{u(r().x,r().y)});function u(f,y){const k=window.innerWidth,w=window.innerHeight,p=n().clientWidth,E=n().clientHeight;f=Math.min(Math.max(f,i().x),k-p-i().x),y=Math.min(Math.max(y,i().y),w-E-i().y),n().style.right=f+"px",n().style.bottom=Math.max(y,i().y)+"px",r({x:f,y}),a()(r())}function l(f){var y,k;return{x:f.pageX||((y=f.touches)==null?void 0:y[0].pageX)||0,y:f.pageY||((k=f.touches)==null?void 0:k[0].pageY)||0}}function d(f){o=!0,v=l(f),s=r()}function c(f){if(!o)return;const y=l(f),k=y.x-v.x,w=y.y-v.y,p=s.x-k,E=s.y-w;u(p,E)}function h(){o&&(o=!1)}var g=gl();he("mousemove",ye,c),he("touchmove",ye,c,void 0,!0),he("mouseup",ye,h),he("touchend",ye,h),he("resize",ye,()=>u(r().x,r().y)),g.__mousedown=d,g.__touchstart=d,S(e,g),ae()}ue(["mousedown","touchstart"]);var yl=Ae('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function wl(e){var t=yl();S(e,t)}async function kl(e){const t=new Headers({"Content-Type":"application/json"}),n=pn();if(!n)throw new Error("No token was provided");const r=await fetch(fn+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!r.ok)throw r;return await r.json()}var bl=Ae('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function Sl(e){var t=bl();S(e,t)}var xl=(e,t,n)=>t(_(n)),El=A("<div> </div>"),Tl=e=>e.stopImmediatePropagation(),Cl=A('<button class="item svelte-15ml41d"><img class="poster svelte-15ml41d" alt="" width="28" height="42"> <div class="content"><div class="name svelte-15ml41d"> </div> <div class="meta svelte-15ml41d"><div class="imdb svelte-15ml41d"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-15ml41d"><!></a></button>'),Al=A('<em class="empty svelte-15ml41d">No results found</em>'),Pl=A('<div class="results svelte-15ml41d"></div>'),Il=A('<div class="search svelte-15ml41d"><!> <!></div>');function Ll(e,t){ie(t,!0);let n=O(t,"onselect",3,()=>null),r=O(t,"query",15),i=U(Y([])),a=U(null),o=U(!1);Ot(()=>{r()&&v(r())});async function v(h){L(o,!0),L(a,null);try{L(i,Y(await kl(h)))}finally{L(o,!1)}}function s(h){r(h.title),L(a,Y(h)),n()(h)}var u=Il(),l=b(u);wn(l,{name:"search",label:"Search...",get value(){return r()},set value(h){r(h)}});var d=T(l,2);{var c=h=>{var g=Pl();Be(g,21,()=>_(i),f=>f.sid,(f,y)=>{var k=Cl();k.__click=[xl,s,y];var w=b(k),p=T(w,2),E=b(p),x=b(E),C=T(E,2),R=b(C),P=b(R);mn(P);var q=T(P),K=T(R,2),J=b(K),F=T(K,2),G=b(F),I=T(F,2);{var j=te=>{var le=El(),Ie=b(le);M(()=>z(Ie,`${_(y).length??""} min`)),S(te,le)};H(I,te=>{_(y).length&&te(j)})}var $=T(p,2);$.__click=[Tl];var X=b($);Sl(X),M(()=>{Z(w,"src",_(y).standing_poster),z(x,_(y).title),z(q,` ${_(y).imdb_score??""}`),z(J,_(y).year),z(G,_(y).type),Z($,"href",`${xr}/${_(y).type??""}/${_(y).slug??""}`)}),S(f,k)},f=>{var y=Xe(),k=re(y);{var w=p=>{var E=Al();S(p,E)};H(k,p=>{_(o)||p(w)})}S(f,y)}),S(h,g)};H(d,h=>{r()&&!_(a)&&h(c)})}S(e,u),ae()}ue(["click"]);function Ml(e,t,n,r,i,a){if(!_(t)||!_(n))return;const o=_(n).type==="movie"?"movie":"show",v=xr+`/${o}/${_(n).slug}`,s={sid:_(n).sid,title:_(t),sentence:_(r),playpilot_url:v,key:Nr(_(n).sid),title_details:_(n)};i.onsave(s),a()()}var Nl=A('<div class="error svelte-c3phlu"><!></div>'),Ol=A('<section class="layout svelte-c3phlu"><div class="header svelte-c3phlu"><!> <h2 class="svelte-c3phlu">Add Playlink manually</h2></div> <p class="svelte-c3phlu">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-c3phlu">Selected text</label> <!> <!> <label for="text" class="svelte-c3phlu">Paired title</label> <!> <button class="save svelte-c3phlu">Add playlink</button></section>');function jl(e,t){ie(t,!0);let n=O(t,"htmlString",3,""),r=O(t,"onclose",3,()=>null),i=U(""),a=U(""),o=U(null),v=U(""),s=U("");yt(u);function u(){const p=window.getSelection();if(!(p!=null&&p.anchorNode)||!gn().contains(p.anchorNode.parentElement))return;const E=p.toString().trim();if(!E)return;L(v,""),L(i,Y(E)),L(s,Y(_(i))),L(a,Y(l(p,E)));const x=p.getRangeAt(0).commonAncestorContainer.textContent,C=Ir(n());(!x||!C.includes(x))&&L(v,"Selection was not inside of given content")}function l(p,E){const x=p.getRangeAt(0);let C=x.startContainer;if((C.textContent||"").length<=E.length*2&&x.startContainer.parentNode&&(C=x.startContainer.parentNode),!C)return"";const R=C.textContent||"",P=x.startOffset,q=x.endOffset,K=R.slice(0,P).lastIndexOf("."),J=R.slice(q).search(/[.!?]/),F=K===-1?0:K+1,G=J===-1?R.length:q+J+1;return R.slice(F,G).trim()}var d=Ol();he("mouseup",ye,u);var c=b(d),h=b(c);yn(h,{get onclick(){return r()},size:"24px",children:(p,E)=>{wl(p)},$$slots:{default:!0}});var g=T(c,6);wn(g,{get value(){return _(i)},label:"Select text on the page",name:"selected-text",readonly:!0});var f=T(g,2);{var y=p=>{var E=Nl(),x=b(E);kn(x,{children:(C,R)=>{var P=Oe();M(()=>z(P,_(v))),S(C,P)},$$slots:{default:!0}}),S(p,E)};H(f,p=>{_(v)&&p(y)})}var k=T(f,4);Ll(k,{onselect:p=>L(o,Y(p)),get query(){return _(s)},set query(p){L(s,Y(p))}});var w=T(k,2);w.__click=[Ml,i,o,a,t,r],M(()=>w.disabled=!_(i)||!_(o)),S(e,d),ae()}ue(["click"]);async function Rl(e,t,n,r,i,a,o){try{L(t,!0),L(n,!1),r(await Io(r(),i())),L(a,Y(_(o)))}catch{L(n,!0)}finally{L(t,!1)}}var ql=A('<div class="drag-handle svelte-1xio91e"><!></div>'),Hl=A('<div class="loading svelte-1xio91e">Loading...</div>'),Fl=A('<div class="bubble svelte-1xio91e"> </div> <!>',1),zl=A('<div class="error svelte-1xio91e"><!></div>'),Dl=A("<div><!></div>"),Bl=A('<div class="empty svelte-1xio91e">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),Vl=A('<button class="save svelte-1xio91e"> </button>'),$l=A('<!> <div class="items svelte-1xio91e"></div> <!>',1),Ul=A('<div class="panel svelte-1xio91e"><!></div>'),Wl=A('<section class="editor playpilot-styled-scrollbar svelte-1xio91e"><!> <header class="header svelte-1xio91e"><h1 class="svelte-1xio91e">Playlinks</h1> <!></header> <!> <!></section>');function Kl(e,t){ie(t,!0);let n=O(t,"linkInjections",15),r=O(t,"htmlString",3,""),i=O(t,"loading",3,!1);const a="editor-position";let o=U(null),v=Y(JSON.parse(localStorage.getItem(a)||'{ "x": 0, "y": 0 }')),s=U(!1),u=U(!1),l=U(!1),d=U(0),c=U("");const h=ee(()=>JSON.stringify(n())),g=ee(()=>_(c)!==_(h));Ot(()=>{i()||De(()=>L(c,Y(_(h))))});function f(I){localStorage.setItem(a,JSON.stringify(I))}function y(I){n(n().filter(j=>j.key!==I))}function k(I){if(!_(o))return;const j=I.offsetTop,$=j+I.offsetHeight,X=_(o).scrollTop,te=X+_(o).clientHeight;j>=X&&$<=te||_(o).scrollTo({top:j-_(o).clientHeight/2,behavior:"smooth"})}function w(I){const j=I.target;L(d,Y(j.scrollTop))}var p=Wl(),E=b(p);{var x=I=>{var j=ql(),$=b(j);pl($,{get element(){return _(o)},get position(){return v},limit:{x:16,y:16},onchange:f}),S(I,j)};H(E,I=>{_(o)&&I(x)})}var C=T(E,2),R=T(b(C),2);{var P=I=>{var j=Hl();S(I,j)},q=I=>{var j=Fl(),$=re(j),X=b($),te=T($,2);yn(te,{onclick:()=>L(s,!0),size:"24px","aria-label":"Add manual injection",children:(le,Ie)=>{var ne=Oe("+");S(le,ne)},$$slots:{default:!0}}),M(()=>{Z($,"aria-label",`${n().length??""} found playlinks`),z(X,n().length)}),S(I,j)};H(R,I=>{i()?I(P):I(q,!1)})}var K=T(C,2);{var J=I=>{var j=$l(),$=re(j);{var X=ne=>{var oe=zl(),D=b(oe);kn(D,{children:(B,Q)=>{var pe=Oe("Something went wrong, check your links below.");S(B,pe)},$$slots:{default:!0}}),xe(7,oe,()=>At,()=>({duration:150})),S(ne,oe)};H($,ne=>{_(l)&&ne(X)})}var te=T($,2);Be(te,31,n,ne=>ne.key,(ne,oe,D)=>{var B=Dl(),Q=b(B);ml(Q,{onremove:()=>y(_(oe).key),onhighlight:k,get linkInjection(){return n()[_(D)]},set linkInjection(pe){n(n()[_(D)]=pe,!0)}}),ca(B,()=>Fo,()=>({duration:300})),S(ne,B)},ne=>{var oe=Bl();S(ne,oe)});var le=T(te,2);{var Ie=ne=>{var oe=Vl();oe.__click=[Rl,u,l,n,r,c,h];var D=b(oe);M(()=>{oe.disabled=_(u),z(D,_(u)?"Saving...":"Save links")}),xe(3,oe,()=>vt,()=>({y:70,opacity:1,duration:200})),S(ne,oe)};H(le,ne=>{_(g)&&n().length&&ne(Ie)})}S(I,j)};H(K,I=>{i()||I(J)})}var F=T(K,2);{var G=I=>{var j=Ul(),$=b(j);jl($,{get htmlString(){return r()},onclose:()=>L(s,!1),onsave:X=>n().push(X)}),M(()=>vn(j,"top",`${_(d)??""}px`)),xe(3,j,()=>vt,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),S(I,j)};H(F,I=>{_(s)&&I(G)})}zt(p,I=>L(o,I),()=>_(o)),M(()=>{ve(p,"panel-open",_(s)),ve(p,"loading",i())}),he("scroll",p,w),S(e,p),ae()}ue(["click"]);var Yl=A('<div class="playpilot-link-injections svelte-1ogu7vd"><!> <!></div>');function Gl(e,t){ie(t,!0);const n=gn(),r=go(n),i=r.map(p=>p.outerHTML).join(""),a=_n();let o=U(Y([])),v=U(null),s=U(!1),u=U(!0);Ot(()=>{a&&d()}),yt(()=>(Ve(je.ArticlePageView),l(),()=>en()));async function l(){a&&L(s,Y(await Tr()));const p=await Po(Lr(),i)||[];L(o,Y(p.filter(E=>E.title_details))),c(),L(u,!1)}function d(){en(),c()}function c(){if(!_(o).length)return;const p=po(r,_(o),h);JSON.stringify(_(o))!==JSON.stringify(p)&&L(o,Y(p))}function h(p){L(v,Y(p))}var g=Yl(),f=b(g);{var y=p=>{Kl(p,{htmlString:i,get loading(){return _(u)},get linkInjections(){return _(o)},set linkInjections(E){L(o,Y(E))}})};H(f,p=>{a&&_(s)&&p(y)})}var k=T(f,2);{var w=p=>{qo(p,{get title(){return _(v).title_details},onclose:()=>L(v,null)})};H(k,p=>{_(v)&&_(v).title_details&&p(w)})}S(e,g),ae()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",language:null,app:null,initialize(e={token:"",selector:"",language:null,editorial_token:""}){if(!e.token){console.error("An API token is required.");return}this.token=e.token,this.editorial_token=e.editorial_token,this.selector=e.selector,this.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=dn(Gl,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),en()}};
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css?family=Poppins:400,600,700";.popover.svelte-8w8waf{--offset: 8px;position:absolute;top:calc((var(--offset) - 1px) * -1);left:0;width:calc(100vw - 32px);max-width:320px;padding:var(--offset) 0;transform:translateY(calc(-100% + var(--offset)));z-index:2147483647}.popover.flip.svelte-8w8waf{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-8w8waf{cursor:default;position:relative;border-radius:var(--playpilot-popover-border-radius, 16px);background:var(--playpilot-popover-background, var(--playpilot-light));box-shadow:var(--playpilot-popover-shadow, var(--playpilot-shadow-large));max-height:min(var(--max-height),560px);scrollbar-width:thin;overflow-y:overlay;overflow-x:hidden}.genre.svelte-13nhocm{display:flex;flex-wrap:wrap;background:var(--playpilot-genre-background, var(--playpilot-content));border:0;border-radius:var(--playpilot-genre-border-radius, 16px);padding:4px 8px;font-family:var(--playpilot-genre-font-family, inherit);font-weight:var(--playpilot-playlink-font-weight, inherit);text-transform:var(--playpilot-genre-text-transform, none);color:var(--playpilot-genre-text-color, var(--playpilot-text-color-alt));line-height:1;font-size:inherit}.genre.svelte-13nhocm:is(button:where(.svelte-13nhocm)):hover{cursor:pointer;filter:var(--playpilot-genre-hover-filter, brightness(1.1));background:var(--playpilot-genre-hover-background, var(--playpilot-genre-background, var(--playpilot-content)))}h2.svelte-1f6ryh6{margin:0;color:var(--playpilot-playlinks-title-color, var(--playpilot-text-color-alt));font-family:var(--playpilot-playlinks-title-font-family, inherit);font-weight:var(--playpilot-playlinks-title-font-weight, lighter);font-size:var(--playpilot-playlinks-title-font-size, 14px);line-height:normal}img.svelte-1f6ryh6{border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-1f6ryh6{height:40px;width:40px}}.playlinks.svelte-1f6ryh6{box-sizing:border-box;display:flex;gap:8px;width:calc(100% + 32px);padding:8px 16px;margin:0 -16px;overflow:auto;scrollbar-width:none}.playlinks.svelte-1f6ryh6::-webkit-scrollbar{display:none}.list.svelte-1f6ryh6{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-1f6ryh6 img:where(.svelte-1f6ryh6){height:32px;width:32px}}.playlink.svelte-1f6ryh6{display:flex;align-items:center;gap:12px;padding:12px;background:var(--playpilot-playlink-background, var(--playpilot-lighter));box-shadow:var(--playpilot-playlink-shadow, var(--playpilot-shadow));border-radius:var(--playpilot-playlink-border-radius, 8px);color:var(--playpilot-playlink-text-color, var(--playpilot-text-color-alt))!important;font-weight:var(--playpilot-playlink-font-weight, inherit);font-style:var(--playpilot-playlink-font-style, normal);text-decoration:none!important;white-space:nowrap;font-size:12px;line-height:1}.playlink.svelte-1f6ryh6:hover,.playlink.svelte-1f6ryh6:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)));text-decoration:none!important}.playlink.svelte-1f6ryh6 img:where(.svelte-1f6ryh6){margin:0}.list.svelte-1f6ryh6 .playlink:where(.svelte-1f6ryh6){padding:8px;gap:8px}.name.svelte-1f6ryh6{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-1f6ryh6{margin-top:8px;font-size:10px;color:var(--playpilot-playlink-category-text-color, var(--playpilot-text-color));font-weight:var(--playpilot-playlink-category-font-weight, inherit);font-family:var(--playpilot-playlink-category-font-family, inherit)}.empty.svelte-1f6ryh6{white-space:initial;line-height:1.35}.arrow.svelte-1f6ryh6{margin-left:auto;padding:0 8px}p.svelte-fluzit,.paragraph.svelte-fluzit{display:block;margin:16px 0 0}.show-more.svelte-fluzit{display:inline;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;background:transparent;border:0;color:var(--playpilot-read-more-text-color, var(--playpilot-text-color-alt));font-weight:var(--playpilot-read-more-font-weight, inherit);font-family:inherit;font-size:inherit}.show-more.svelte-fluzit:hover{text-decoration:underline;text-decoration-thickness:2px;cursor:pointer}h2.svelte-15oguej{margin:24px 0 16px;font-size:var(--playpilot-cast-title-font-size, 18px);line-height:normal;font-weight:inherit;color:var(--playpilot-cast-title-text-color, var(--playpilot-text-color))}.participants.svelte-15oguej{display:flex;gap:16px;width:calc(100% + 32px);padding:0 16px;margin:0 -16px;overflow:auto;white-space:nowrap;scrollbar-width:none}.participants.svelte-15oguej::-webkit-scrollbar{display:none}.character.svelte-15oguej{color:var(--playpilot-cast-character-text-color, var(--playpilot-text-color-alt));font-style:italic}h1.svelte-zq2qln{margin:8px 0;color:var(--playpilot-detail-title-text-color, #fff);font-family:var(--playpilot-detail-title-font-family, inherit);font-weight:var(--playpilot-detail-title-font-weight, lighter);font-size:var(--playpilot-detail-title-font-size, 24px);line-height:normal;font-style:var(--playpilot-detail-title-font-style, normal)}.small.svelte-zq2qln h1:where(.svelte-zq2qln){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-zq2qln h1:where(.svelte-zq2qln){margin-top:0}.content.svelte-zq2qln{z-index:1;position:relative;padding:16px;color:var(--playpilot-detail-text-color, var(--playpilot-text-color));font-family:var(--playpilot-detail-font-family, var(--playpilot-font-family));font-weight:var(--playpilot-detail-font-weight, normal);font-size:var(--playpilot-detail-font-size, 14px);line-height:normal;font-style:normal}.content.small.svelte-zq2qln{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-zq2qln{padding:32px 0 16px}.small.svelte-zq2qln .header:where(.svelte-zq2qln){padding-top:16px}.compact.svelte-zq2qln .header:where(.svelte-zq2qln){padding:0 0 16px}.top.svelte-zq2qln{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-zq2qln{display:block;width:72px;margin:0;aspect-ratio:2/3;border-radius:var(--playpilot-detail-image-border-radius, 8px);background:var(--playpilot-detail-image-background, var(--playpilot-content));box-shadow:var(--playpilot-detail-image-shadow, var(--playpilot-shadow))}.info.svelte-zq2qln{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-zq2qln .info:where(.svelte-zq2qln){gap:8px 12px}.imdb.svelte-zq2qln{display:flex;align-items:center;gap:4px}.imdb.svelte-zq2qln svg{margin-top:-2px}.small.svelte-zq2qln .imdb:where(.svelte-zq2qln) svg{margin-top:0;width:12px;height:12px}.background.svelte-zq2qln{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter))}.background.svelte-zq2qln:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top,var(--playpilot-detail-background, var(--playpilot-light)),transparent 40%)}.background.svelte-zq2qln img:where(.svelte-zq2qln){width:100%;height:100%;object-fit:cover;object-position:center;margin:0}.faded.svelte-zq2qln{opacity:.15}.capitalize.svelte-zq2qln{text-transform:capitalize}span.svelte-6p0hvs{display:block}button.svelte-6p0hvs{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--playpilot-after-article-button-padding, 4px 12px);margin:var(--playpilot-after-article-button-margin, 4px 0 0);background:var(--playpilot-after-article-button-background, transparent);border:var(--playpilot-after-article-button-border, 2px solid currentColor);border-radius:var(--playpilot-after-article-button-border-radius, 16px);color:var(--playpilot-after-article-button-text-color, inherit);font-weight:var(--playpilot-after-article-button-font-weight, bold);font-size:var(--playpilot-after-article-button-font-size, 16px);cursor:pointer;transition:all 50ms}button.svelte-6p0hvs:hover{background:var(--playpilot-after-article-button-background-hover, transparent);border:var(--playpilot-after-article-button-border-hover, 2px solid currentColor);color:var(--playpilot-after-article-button-text-color-hover, inherit);transform:var(--playpilot-after-article-button-transform-hover, scale(1.02))}.button.svelte-1qqv88o{display:flex;align-items:center;justify-content:center;flex:0 0 var(--size);width:var(--size);height:var(--size);border-radius:50%;border:0;padding:var(--playpilot-button-padding, 0);background:var(--playpilot-button-background, var(--playpilot-content));box-shadow:var(--playpilot-button-shadow, var(--playpilot-shadow));color:var(--playpilot-button-text-color, var(--playpilot-text-color-alt));cursor:pointer;transition:transform 50ms}.button.svelte-1qqv88o:hover{filter:brightness(1.2);transform:scale(1.05)}.modal.svelte-1riopfw{z-index:2147483647;position:fixed;display:flex;justify-content:center;align-items:flex-start;top:0;left:0;width:100%;height:100%;background:var(--playpilot-detail-backdrop, rgba(0, 0, 0, .65))}@media (min-width: 600px){.modal.svelte-1riopfw{padding:32px}}.dialog.svelte-1riopfw{position:relative;width:100%;max-width:600px;max-height:80vh;overflow:auto;margin-top:auto;border-radius:var(--playpilot-detail-border-radius, 16px 16px 0 0);background:var(--playpilot-detail-background, var(--playpilot-light))}@media (min-width: 600px){.dialog.svelte-1riopfw{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-1riopfw{position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-1riopfw{--playpilot-button-background: var(--playpilot-modal-close-button-background, var(--playpilot-content));--playpilot-button-shadow: var(--playpilot-modal-close-button-shadow, var(--playpilot-shadow));--playpilot-button-padding: var(--playpilot-modal-close-button-padding, .5rem);--playpilot-button-text-color: var(--playpilot-modal-close-button-text-color, var(--playpilot-text-color-alt));z-index:5;position:absolute;top:16px;right:16px}.close.svelte-1riopfw:hover{filter:brightness(1.1)}svg.svelte-by11ix{transition:transform .1s}.expanded.svelte-by11ix{transform:rotate(180deg)}.switch.svelte-91s87b{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;border:0;padding:0;background:transparent;cursor:pointer}.fullwidth.svelte-91s87b{width:100%;justify-content:space-between}.label.svelte-91s87b{display:flex;align-items:center;gap:8px;margin-right:8px;font-family:var(--playpilot-font-family);color:var(--playpilot-text-color-alt);font-size:12px}.switch.svelte-91s87b:hover .label:where(.svelte-91s87b){color:var(--playpilot-text-color)}.track.svelte-91s87b{position:relative;width:32px;height:20px;border-radius:16px;background:var(--playpilot-content);transition:background-color .1s}.active.svelte-91s87b .track:where(.svelte-91s87b){background:var(--playpilot-green)}.knob.svelte-91s87b{position:absolute;top:2px;left:2px;height:16px;width:16px;border-radius:50%;background:#fff;transition:left .1s}.active.svelte-91s87b .knob:where(.svelte-91s87b){left:14px}input.svelte-1vrer3i{width:100%;padding:8px 16px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}input.svelte-1vrer3i:focus{background:var(--playpilot-lighter);outline:1px solid white}input.svelte-1vrer3i::placeholder{color:var(--playpilot-text-color-alt);opacity:.75}.switches.svelte-14krcvc{display:flex;flex-direction:column;gap:12px}button.svelte-14krcvc{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:32px;padding:8px;background:transparent;font-family:var(--playpilot-font-family);font-size:10.4px;color:var(--playpilot-text-color-alt);cursor:pointer}button.svelte-14krcvc:hover,button.active.svelte-14krcvc{color:var(--playpilot-text-color)}.group.svelte-14krcvc{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;padding:4px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}.active-marker.svelte-14krcvc{z-index:0;position:absolute;width:calc(50% - 8px);height:calc(100% - 8px);left:4px;top:4px;border-radius:32px;background:var(--playpilot-content);transition:left .1s}.right.svelte-14krcvc{left:calc(50% + 4px)}.label.svelte-14krcvc{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1tq7qhv{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px}button.svelte-1fmy0wh{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:4px;background:transparent;color:var(--playpilot-text-color-alt)}button.svelte-1fmy0wh:hover{cursor:pointer;color:#fff}.context-menu.svelte-1fmy0wh{position:relative}.content.svelte-1fmy0wh{z-index:1;position:absolute;top:100%;right:0;max-height:80px;max-width:160px;border-radius:8px;background:var(--playpilot-lighter)}.item.svelte-1bz02u6{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-1bz02u6:hover,.item.highlighted.svelte-1bz02u6{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-1bz02u6{outline:2px solid var(--playpilot-primary)}.header.svelte-1bz02u6{display:flex;gap:16px;width:100%}.poster.svelte-1bz02u6{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.title.svelte-1bz02u6{font-size:14px;word-break:break-word}.meta.svelte-1bz02u6{display:flex;gap:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.meta.svelte-1bz02u6 span:where(.svelte-1bz02u6){display:flex;align-items:center}.meta.svelte-1bz02u6 svg{display:block;margin:-2px 2px 0 0;height:1em}.content.svelte-1bz02u6{padding-top:16px}.context-menu.svelte-1bz02u6{margin:0 -4px 0 auto}.context-menu-action.svelte-1bz02u6{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;padding:16px;font-family:inherit;color:var(--playpilot-text-color-alt);cursor:pointer}.context-menu-action.svelte-1bz02u6:hover{color:var(--playpilot-text-color)}.actions.svelte-1bz02u6{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-1bz02u6{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:50%;background:var(--playpilot-content);color:var(--playpilot-text-color);box-shadow:var(--playpilot-shadow);cursor:pointer}.expand.svelte-1bz02u6:hover{filter:brightness(1.2)}.expanded.svelte-1bz02u6{padding-top:16px}.type-select.svelte-1bz02u6{margin-top:8px}.label.svelte-1bz02u6{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-1bz02u6{margin-top:12px}.drag-handle.svelte-bwc0q8{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-bwc0q8:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-bwc0q8:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-bwc0q8:active{cursor:grabbing}.drag-handle.svelte-bwc0q8:before{display:block;content:"";position:absolute;top:40%;right:0;bottom:40%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.search.svelte-15ml41d{position:relative}.results.svelte-15ml41d{z-index:1;position:absolute;top:calc(100% + 8px);left:0;right:0;height:30vh;max-height:160px;border-radius:8px;background:var(--playpilot-light);scrollbar-width:thin;overflow:auto}.item.svelte-15ml41d{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:flex-start;gap:16px;width:100%;background:transparent;border:0;padding:8px;border-bottom:1px solid var(--playpilot-content);color:var(--playpilot-text-color-alt);font-family:inherit;text-align:left}.item.svelte-15ml41d:hover{background:var(--playpilot-lighter)}.item.svelte-15ml41d:last-child{border-bottom:0}.poster.svelte-15ml41d{width:28px;border-radius:4px;height:auto;background:var(--playpilot-dark)}.name.svelte-15ml41d{color:var(--playpilot-text-color)}.meta.svelte-15ml41d{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-15ml41d{display:flex;align-items:center;gap:4px}.empty.svelte-15ml41d{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-15ml41d{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-15ml41d:hover{color:vaR(--playpilot-text-color)}h2.svelte-c3phlu{margin:0;font-size:16px;font-weight:400}p.svelte-c3phlu,label.svelte-c3phlu{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-c3phlu{display:block;margin-top:16px}.layout.svelte-c3phlu{height:100%;display:flex;flex-direction:column}.header.svelte-c3phlu{display:flex;align-items:center;gap:8px;margin-bottom:16px}.error.svelte-c3phlu{margin-top:8px}.save.svelte-c3phlu{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;margin-top:auto;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt)}.save.svelte-c3phlu:not([disabled]):hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-c3phlu{cursor:default;opacity:.5}h1.svelte-1xio91e{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.editor.svelte-1xio91e{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:320px;max-height:min(50vh,800px);min-height:400px;padding:16px;border-radius:24px;background:var(--playpilot-dark);box-shadow:var(--playpilot-shadow-large);color:var(--playpilot-text-color);font-family:var(--playpilot-font-family);transition:border-radius .1s;overflow-y:auto;overflow-x:hidden;line-height:normal}.panel-open.svelte-1xio91e{overflow:hidden}.loading.svelte-1xio91e{min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.drag-handle.svelte-1xio91e{opacity:0;transition:opacity .15s}.editor.svelte-1xio91e:hover .drag-handle:where(.svelte-1xio91e){opacity:1}.header.svelte-1xio91e{z-index:5;position:sticky;top:-16px;margin:-16px -16px 0;padding:16px 16px 16px 24px;background:var(--playpilot-dark);display:flex;align-items:center}.loading.svelte-1xio91e .header:where(.svelte-1xio91e){margin:-16px}.bubble.svelte-1xio91e{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:24px;height:24px;border:0;padding:0;margin-right:auto;border-radius:50%;background:var(--playpilot-green);line-height:24px;text-align:center;font-size:13.6px}.items.svelte-1xio91e{padding-top:8px;margin-bottom:auto}.empty.svelte-1xio91e{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-1xio91e{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:sticky;bottom:0;left:0;width:100%;margin-top:16px;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);box-shadow:0 0 16px 16px var(--playpilot-dark);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt);cursor:pointer}.save.svelte-1xio91e:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-1xio91e{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-1xio91e{margin-top:8px}.panel.svelte-1xio91e{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}:root{--playpilot-primary: #fa548a;--playpilot-dark: #101426;--playpilot-light: #1b2743;--playpilot-lighter: #233257;--playpilot-content: #354367;--playpilot-content-light: #4b5b82;--playpilot-green: #53bca0;--playpilot-font-family: "Poppins", sans-serif;--playpilot-text-color: #fff;--playpilot-text-color-alt: #c8d4de;--playpilot-shadow: 3.2px 2.4px 2.4px rgba(0, 0, 0, .2);--playpilot-shadow-large: 2.4px 2.4px 3.2px rgba(0, 0, 0, .05), 3.2px 5.6px 5.6px rgba(0, 0, 0, .1), 1.6px 1.6px 12px rgba(0, 0, 0, .25);--playpilot-error: #ea5a5a;--playpilot-error-dark: #442533}[data-playpilot-injection-key]{position:relative}[data-playpilot-injection-key].injection-highlight{outline:4px solid var(--playpilot-primary)!important;outline-offset:8px!important;border-radius:.8px;scroll-margin:80px}.playpilot-styled-scrollbar{scrollbar-color:var(--playpilot-content-light) var(--playpilot-lighter);scrollbar-width:thin}.playpilot-styled-scrollbed::-webkit-scrollbar{width:12px}.playpilot-styled-scrollbed::-webkit-scrollbar-track{background:var(--playpilot-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb{border:2px solid var(--playpilot-light);border-radius:16px;background:var(--playpilot-lighter)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:hover{background:var(--playpilot-content-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:active{background:var(--playpilot-text-color-alt)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight]{font-weight:var(--playpilot-injection-font-weight)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color]{color:var(--playpilot-injection-text-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color-hover]:hover{color:var(--playpilot-injection-text-color-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration]{text-decoration:var(--playpilot-injection-text-decoration)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration-hover]:hover{text-decoration:var(--playpilot-injection-text-decoration-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color]{background-color:var(--playpilot-injection-background-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color-hover]:hover{background-color:var(--playpilot-injection-background-color-hover)}.playpilot-link-injections.svelte-1ogu7vd *{box-sizing:border-box}.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections button,.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections input{transition:outline-offset .1s}.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections button:focus-visible,.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections input:focus-visible{outline:2px solid white;outline-offset:2px}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();const Kt=!1;var rn=Array.isArray,Fr=Array.prototype.indexOf,an=Array.from,Dr=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,Br=Object.getOwnPropertyDescriptors,Vr=Object.prototype,zr=Array.prototype,Bn=Object.getPrototypeOf;function $r(e){return typeof e=="function"}const He=()=>{};function Ur(e){for(var t=0;t<e.length;t++)e[t]()}const ye=2,Vn=4,ht=8,Mt=16,we=32,mt=64,Yt=128,Ue=256,Et=512,me=1024,je=2048,Nt=4096,ke=8192,et=16384,zn=32768,tt=65536,Wr=1<<17,Kr=1<<19,$n=1<<20,lt=Symbol("$state"),Yr=Symbol("legacy props"),Gr=Symbol("");function Un(e){return e===this.v}function Zr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function on(e){return!Zr(e,this.v)}function Jr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Xr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Qr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ei(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ti(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ni(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ri(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ii(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function ai(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let nt=!1,oi=!1;function li(){nt=!0}const ln=1,sn=2,Wn=4,si=8,ci=16,ui=1,di=2,fi=4,vi=8,_i=16,hi=1,mi=2,gi=4,pi=1,yi=2,de=Symbol(),Kn="http://www.w3.org/2000/svg";function _e(e,t){var n={f:0,v:e,reactions:null,equals:Un,rv:0,wv:0};return n}function $(e){return wi(_e(e))}function Yn(e,t=!1){var r;const n=_e(e);return t||(n.equals=on),nt&&U!==null&&U.l!==null&&((r=U.l).s??(r.s=[])).push(n),n}function wi(e){return B!==null&&B.f&ye&&(be===null?Ni([e]):be.push(e)),e}function L(e,t){return B!==null&&qt()&&B.f&(ye|Mt)&&(be===null||!be.includes(e))&&ai(),Gt(e,t)}function Gt(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=fr(),Gn(e,je),qt()&&N!==null&&N.f&me&&!(N.f&we)&&(se!==null&&se.includes(e)?(Te(N,je),Dt(N)):Ne===null?ji([e]):Ne.push(e))),t}function Gn(e,t){var n=e.reactions;if(n!==null)for(var r=qt(),i=n.length,a=0;a<i;a++){var o=n[a],d=o.f;d&je||!r&&o===N||(Te(o,t),d&(me|Ue)&&(d&ye?Gn(o,Nt):Dt(o)))}}let ki=!1;function Y(e,t=null,n){if(typeof e!="object"||e===null||lt in e)return e;const r=Bn(e);if(r!==Vr&&r!==zr)return e;var i=new Map,a=rn(e),o=_e(0);a&&i.set("length",_e(e.length));var d;return new Proxy(e,{defineProperty(s,f,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&ni();var u=i.get(f);return u===void 0?(u=_e(l.value),i.set(f,u)):L(u,Y(l.value,d)),!0},deleteProperty(s,f){var l=i.get(f);if(l===void 0)f in s&&i.set(f,_e(de));else{if(a&&typeof f=="string"){var u=i.get("length"),c=Number(f);Number.isInteger(c)&&c<u.v&&L(u,c)}L(l,de),En(o)}return!0},get(s,f,l){var g;if(f===lt)return e;var u=i.get(f),c=f in s;if(u===void 0&&(!c||(g=Ye(s,f))!=null&&g.writable)&&(u=_e(Y(c?s[f]:de,d)),i.set(f,u)),u!==void 0){var h=_(u);return h===de?void 0:h}return Reflect.get(s,f,l)},getOwnPropertyDescriptor(s,f){var l=Reflect.getOwnPropertyDescriptor(s,f);if(l&&"value"in l){var u=i.get(f);u&&(l.value=_(u))}else if(l===void 0){var c=i.get(f),h=c==null?void 0:c.v;if(c!==void 0&&h!==de)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(s,f){var h;if(f===lt)return!0;var l=i.get(f),u=l!==void 0&&l.v!==de||Reflect.has(s,f);if(l!==void 0||N!==null&&(!u||(h=Ye(s,f))!=null&&h.writable)){l===void 0&&(l=_e(u?Y(s[f],d):de),i.set(f,l));var c=_(l);if(c===de)return!1}return u},set(s,f,l,u){var p;var c=i.get(f),h=f in s;if(a&&f==="length")for(var g=l;g<c.v;g+=1){var v=i.get(g+"");v!==void 0?L(v,de):g in s&&(v=_e(de),i.set(g+"",v))}c===void 0?(!h||(p=Ye(s,f))!=null&&p.writable)&&(c=_e(void 0),L(c,Y(l,d)),i.set(f,c)):(h=c.v!==de,L(c,Y(l,d)));var y=Reflect.getOwnPropertyDescriptor(s,f);if(y!=null&&y.set&&y.set.call(u,l),!h){if(a&&typeof f=="string"){var k=i.get("length"),w=Number(f);Number.isInteger(w)&&w>=k.v&&L(k,w+1)}En(o)}return!0},ownKeys(s){_(o);var f=Reflect.ownKeys(s).filter(c=>{var h=i.get(c);return h===void 0||h.v!==de});for(var[l,u]of i)u.v!==de&&!(l in s)&&f.push(l);return f},setPrototypeOf(){ri()}})}function En(e,t=1){L(e,e.v+t)}var pe,Zn,Jn;function bi(){if(pe===void 0){pe=window;var e=Element.prototype,t=Node.prototype;Zn=Ye(t,"firstChild").get,Jn=Ye(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function gt(e=""){return document.createTextNode(e)}function Je(e){return Zn.call(e)}function jt(e){return Jn.call(e)}function b(e,t){return Je(e)}function ne(e,t){{var n=Je(e);return n instanceof Comment&&n.data===""?jt(n):n}}function T(e,t=1,n=!1){let r=e;for(;t--;)r=jt(r);return r}function Si(e){e.textContent=""}function X(e){var t=ye|je;N===null?t|=Ue:N.f|=$n;var n=B!==null&&B.f&ye?B:null;const r={children:null,ctx:U,deps:null,equals:Un,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??N};return n!==null&&(n.children??(n.children=[])).push(r),r}function xi(e){const t=X(e);return t.equals=on,t}function Xn(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var r=t[n];r.f&ye?cn(r):xe(r)}}}function Ei(e){for(var t=e.parent;t!==null;){if(!(t.f&ye))return t;t=t.parent}return null}function Qn(e){var t,n=N;ge(Ei(e));try{Xn(e),t=vr(e)}finally{ge(n)}return t}function er(e){var t=Qn(e),n=(De||e.f&Ue)&&e.deps!==null?Nt:me;Te(e,n),e.equals(t)||(e.v=t,e.wv=fr())}function cn(e){Xn(e),ft(e,0),Te(e,et),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Ti(e){N===null&&B===null&&Qr(),B!==null&&B.f&Ue&&Xr(),dn&&Jr()}function Ci(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function rt(e,t,n,r=!0){var i=(e&mt)!==0,a=N,o={ctx:U,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|je,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var d=Ge;try{Tn(!0),Ft(o),o.f|=zn}catch(l){throw xe(o),l}finally{Tn(d)}}else t!==null&&Dt(o);var s=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&$n)===0;if(!s&&!i&&r&&(a!==null&&Ci(o,a),B!==null&&B.f&ye)){var f=B;(f.children??(f.children=[])).push(o)}return o}function Ai(e){const t=rt(ht,null,!1);return Te(t,me),t.teardown=e,t}function Ot(e){Ti();var t=N!==null&&(N.f&we)!==0&&U!==null&&!U.m;if(t){var n=U;(n.e??(n.e=[])).push({fn:e,effect:N,reaction:B})}else{var r=Rt(e);return r}}function Pi(e){const t=rt(mt,e,!0);return(n={})=>new Promise(r=>{n.outro?st(t,()=>{xe(t),r(void 0)}):(xe(t),r(void 0))})}function Rt(e){return rt(Vn,e,!1)}function tr(e){return rt(ht,e,!0)}function M(e){return pt(e)}function pt(e,t=0){return rt(ht|Mt|t,e,!0)}function Ve(e,t=!0){return rt(ht|we,e,!0,t)}function nr(e){var t=e.teardown;if(t!==null){const n=dn,r=B;Cn(!0),Ee(null);try{t.call(null)}finally{Cn(n),Ee(r)}}}function rr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)cn(t[n])}}function ir(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var r=n.next;xe(n,t),n=r}}function Ii(e){for(var t=e.first;t!==null;){var n=t.next;t.f&we||xe(t),t=n}}function xe(e,t=!0){var n=!1;if((t||e.f&Kr)&&e.nodes_start!==null){for(var r=e.nodes_start,i=e.nodes_end;r!==null;){var a=r===i?null:jt(r);r.remove(),r=a}n=!0}ir(e,t&&!n),rr(e),ft(e,0),Te(e,et);var o=e.transitions;if(o!==null)for(const s of o)s.stop();nr(e);var d=e.parent;d!==null&&d.first!==null&&ar(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function ar(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function st(e,t){var n=[];un(e,n,!0),or(n,()=>{xe(e),t&&t()})}function or(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function un(e,t,n){if(!(e.f&ke)){if(e.f^=ke,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var i=r.next,a=(r.f&tt)!==0||(r.f&we)!==0;un(r,t,a?n:!1),r=i}}}function ct(e){lr(e,!0)}function lr(e,t){if(e.f&ke){wt(e)&&Ft(e),e.f^=ke;for(var n=e.first;n!==null;){var r=n.next,i=(n.f&tt)!==0||(n.f&we)!==0;lr(n,i?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Tt=!1,Zt=[];function sr(){Tt=!1;const e=Zt.slice();Zt=[],Ur(e)}function yt(e){Tt||(Tt=!0,queueMicrotask(sr)),Zt.push(e)}function Li(){Tt&&sr()}function cr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const ur=0,Mi=1;let St=!1,xt=ur,ut=!1,dt=null,Ge=!1,dn=!1;function Tn(e){Ge=e}function Cn(e){dn=e}let Fe=[],Ze=0;let B=null;function Ee(e){B=e}let N=null;function ge(e){N=e}let be=null;function Ni(e){be=e}let se=null,ve=0,Ne=null;function ji(e){Ne=e}let dr=1,Jt=0,De=!1,U=null;function fr(){return++dr}function qt(){return!nt||U!==null&&U.l===null}function wt(e){var f;var t=e.f;if(t&je)return!0;if(t&Nt){var n=e.deps,r=(t&Ue)!==0;if(n!==null){var i,a,o=(t&Et)!==0,d=r&&N!==null&&!De,s=n.length;if(o||d){for(i=0;i<s;i++)a=n[i],(o||!((f=a==null?void 0:a.reactions)!=null&&f.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=Et)}for(i=0;i<s;i++)if(a=n[i],wt(a)&&er(a),a.wv>e.wv)return!0}(!r||N!==null&&!De)&&Te(e,me)}return!1}function Oi(e,t){for(var n=t;n!==null;){if(n.f&Yt)try{n.fn(e);return}catch{n.f^=Yt}n=n.parent}throw St=!1,e}function Ri(e){return(e.f&et)===0&&(e.parent===null||(e.parent.f&Yt)===0)}function Ht(e,t,n,r){if(St){if(n===null&&(St=!1),Ri(t))throw e;return}n!==null&&(St=!0);{Oi(e,t);return}}function vr(e){var c;var t=se,n=ve,r=Ne,i=B,a=De,o=be,d=U,s=e.f;se=null,ve=0,Ne=null,B=s&(we|mt)?null:e,De=!Ge&&(s&Ue)!==0,be=null,U=e.ctx,Jt++;try{var f=(0,e.fn)(),l=e.deps;if(se!==null){var u;if(ft(e,ve),l!==null&&ve>0)for(l.length=ve+se.length,u=0;u<se.length;u++)l[ve+u]=se[u];else e.deps=l=se;if(!De)for(u=ve;u<l.length;u++)((c=l[u]).reactions??(c.reactions=[])).push(e)}else l!==null&&ve<l.length&&(ft(e,ve),l.length=ve);return f}finally{se=t,ve=n,Ne=r,B=i,De=a,be=o,U=d}}function qi(e,t){let n=t.reactions;if(n!==null){var r=Fr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&t.f&ye&&(se===null||!se.includes(t))&&(Te(t,Nt),t.f&(Ue|Et)||(t.f^=Et),ft(t,0))}function ft(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)qi(e,n[r])}function Ft(e){var t=e.f;if(!(t&et)){Te(e,me);var n=N,r=U;N=e;try{t&Mt?Ii(e):ir(e),rr(e),nr(e);var i=vr(e);e.teardown=typeof i=="function"?i:null,e.wv=dr;var a=e.deps,o;Kt&&oi&&e.f&je}catch(d){Ht(d,e,n,r||e.ctx)}finally{N=n}}}function _r(){if(Ze>1e3){Ze=0;try{ei()}catch(e){if(dt!==null)Ht(e,dt,null);else throw e}}Ze++}function hr(e){var t=e.length;if(t!==0){_r();var n=Ge;Ge=!0;try{for(var r=0;r<t;r++){var i=e[r];i.f&me||(i.f^=me);var a=[];mr(i,a),Hi(a)}}finally{Ge=n}}}function Hi(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var r=e[n];if(!(r.f&(et|ke)))try{wt(r)&&(Ft(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null?ar(r):r.fn=null))}catch(i){Ht(i,r,null,r.ctx)}}}function Fi(){if(ut=!1,Ze>1001)return;const e=Fe;Fe=[],hr(e),ut||(Ze=0,dt=null)}function Dt(e){xt===ur&&(ut||(ut=!0,queueMicrotask(Fi))),dt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(mt|we)){if(!(n&me))return;t.f^=me}}Fe.push(t)}function mr(e,t){var n=e.first,r=[];e:for(;n!==null;){var i=n.f,a=(i&we)!==0,o=a&&(i&me)!==0,d=n.next;if(!o&&!(i&ke))if(i&ht){if(a)n.f^=me;else try{wt(n)&&Ft(n)}catch(u){Ht(u,n,null,n.ctx)}var s=n.first;if(s!==null){n=s;continue}}else i&Vn&&r.push(n);if(d===null){let u=n.parent;for(;u!==null;){if(e===u)break e;var f=u.next;if(f!==null){n=f;continue e}u=u.parent}}n=d}for(var l=0;l<r.length;l++)s=r[l],t.push(s),mr(s,t)}function gr(e){var t=xt,n=Fe;try{_r();const i=[];xt=Mi,Fe=i,ut=!1,hr(n);var r=e==null?void 0:e();return Li(),(Fe.length>0||i.length>0)&&gr(),Ze=0,dt=null,r}finally{xt=t,Fe=n}}async function An(){await Promise.resolve(),gr()}function _(e){var l;var t=e.f,n=(t&ye)!==0;if(n&&t&et){var r=Qn(e);return cn(e),r}if(B!==null){be!==null&&be.includes(e)&&ii();var i=B.deps;e.rv<Jt&&(e.rv=Jt,se===null&&i!==null&&i[ve]===e?ve++:se===null?se=[e]:se.push(e),Ne!==null&&N!==null&&N.f&me&&!(N.f&we)&&Ne.includes(e)&&(Te(N,je),Dt(N)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,d=a;o!==null;)if(o.f&ye){var s=o;d=s,o=s.parent}else{var f=o;(l=f.deriveds)!=null&&l.includes(d)||(f.deriveds??(f.deriveds=[])).push(d);break}return n&&(a=e,wt(a)&&er(a)),e.v}function ze(e){const t=B;try{return B=null,e()}finally{B=t}}const Di=-7169;function Te(e,t){e.f=e.f&Di|t}function Bi(e){return yr().get(e)}function pr(e,t){return yr().set(e,t),t}function yr(e){return U===null&&cr(),U.c??(U.c=new Map(Vi(U)||void 0))}function Vi(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function re(e,t=!1,n){U={p:U,c:null,e:null,m:!1,s:e,x:null,l:null},nt&&!t&&(U.l={s:null,u:null,r1:[],r2:_e(!1)})}function ie(e){const t=U;if(t!==null){const o=t.e;if(o!==null){var n=N,r=B;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];ge(a.effect),Ee(a.reaction),Rt(a.fn)}}finally{ge(n),Ee(r)}}U=t.p,t.m=!0}return{}}function zi(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const $i=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ui(e){return $i.includes(e)}const Wi={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Ki(e){return e=e.toLowerCase(),Wi[e]??e}const Yi=["touchstart","touchmove"];function Gi(e){return Yi.includes(e)}function Zi(e,t){if(t){const n=document.body;e.autofocus=!0,yt(()=>{document.activeElement===n&&e.focus()})}}let Pn=!1;function Ji(){Pn||(Pn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function wr(e){var t=B,n=N;Ee(null),ge(null);try{return e()}finally{Ee(t),ge(n)}}function Xi(e,t,n,r=n){e.addEventListener(t,()=>wr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Ji()}const kr=new Set,Xt=new Set;function br(e,t,n,r){function i(a){if(r.capture||ot.call(t,a),!a.cancelBubble)return wr(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?yt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function he(e,t,n,r,i){var a={capture:r,passive:i},o=br(e,t,n,a);(t===document.body||t===window||t===document)&&Ai(()=>{t.removeEventListener(e,o,a)})}function ue(e){for(var t=0;t<e.length;t++)kr.add(e[t]);for(var n of Xt)n(e)}function ot(e){var w;var t=this,n=t.ownerDocument,r=e.type,i=((w=e.composedPath)==null?void 0:w.call(e))||[],a=i[0]||e.target,o=0,d=e.__root;if(d){var s=i.indexOf(d);if(s!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;s<=f&&(o=s)}if(a=i[o]||e.target,a!==t){Dr(e,"currentTarget",{configurable:!0,get(){return a||n}});var l=B,u=N;Ee(null),ge(null);try{for(var c,h=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var v=a["__"+r];if(v!==void 0&&!a.disabled)if(rn(v)){var[y,...k]=v;y.apply(a,[e,...k])}else v.call(a,e)}catch(p){c?h.push(p):c=p}if(e.cancelBubble||g===t||g===null)break;a=g}if(c){for(let p of h)queueMicrotask(()=>{throw p});throw c}}finally{e.__root=t,delete e.currentTarget,Ee(l),ge(u)}}}function Sr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Xe(e,t){var n=N;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function A(e,t){var n=(t&pi)!==0,r=(t&yi)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=Sr(a?e:"<!>"+e),n||(i=Je(i)));var o=r?document.importNode(i,!0):i.cloneNode(!0);if(n){var d=Je(o),s=o.lastChild;Xe(d,s)}else Xe(o,o);return o}}function Ce(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=Sr(i),d=Je(o);a=Je(d)}var s=a.cloneNode(!0);return Xe(s,s),s}}function Oe(e=""){{var t=gt(e+"");return Xe(t,t),t}}function Qe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=gt();return e.append(t,n),Xe(t,n),e}function S(e,t){e!==null&&e.before(t)}let Ct=!0;function In(e){Ct=e}function D(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n==null?"":n+"")}function fn(e,t){return Qi(e,t)}const Ke=new Map;function Qi(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0}){bi();var d=new Set,s=u=>{for(var c=0;c<u.length;c++){var h=u[c];if(!d.has(h)){d.add(h);var g=Gi(h);t.addEventListener(h,ot,{passive:g});var v=Ke.get(h);v===void 0?(document.addEventListener(h,ot,{passive:g}),Ke.set(h,1)):Ke.set(h,v+1)}}};s(an(kr)),Xt.add(s);var f=void 0,l=Pi(()=>{var u=n??t.appendChild(gt());return Ve(()=>{if(a){re({});var c=U;c.c=a}i&&(r.$$events=i),Ct=o,f=e(u,r)||{},Ct=!0,a&&ie()}),()=>{var g;for(var c of d){t.removeEventListener(c,ot);var h=Ke.get(c);--h===0?(document.removeEventListener(c,ot),Ke.delete(c)):Ke.set(c,h)}Xt.delete(s),u!==n&&((g=u.parentNode)==null||g.removeChild(u))}});return Qt.set(f,l),f}let Qt=new WeakMap;function xr(e,t){const n=Qt.get(e);return n?(Qt.delete(e),n(t)):Promise.resolve()}function q(e,t,n=!1){var r=e,i=null,a=null,o=de,d=n?tt:0,s=!1;const f=(u,c=!0)=>{s=!0,l(c,u)},l=(u,c)=>{o!==(o=u)&&(o?(i?ct(i):c&&(i=Ve(()=>c(r))),a&&st(a,()=>{a=null})):(a?ct(a):c&&(a=Ve(()=>c(r))),i&&st(i,()=>{i=null})))};pt(()=>{s=!1,t(f),s||l(null,null)},d)}let Be=null;function Ln(e){Be=e}function vt(e,t){return t}function ea(e,t,n,r){for(var i=[],a=t.length,o=0;o<a;o++)un(t[o].e,i,!0);var d=a>0&&i.length===0&&n!==null;if(d){var s=n.parentNode;Si(s),s.append(n),r.clear(),Me(e,t[0].prev,t[a-1].next)}or(i,()=>{for(var f=0;f<a;f++){var l=t[f];d||(r.delete(l.k),Me(e,l.prev,l.next)),xe(l.e,!d)}})}function $e(e,t,n,r,i,a=null){var o=e,d={flags:t,items:new Map,first:null},s=(t&Wn)!==0;if(s){var f=e;o=f.appendChild(gt())}var l=null,u=!1;pt(()=>{var c=n(),h=rn(c)?c:c==null?[]:an(c),g=h.length;if(!(u&&g===0)){u=g===0;{var v=B;ta(h,d,o,i,t,(v.f&ke)!==0,r)}a!==null&&(g===0?l?ct(l):l=Ve(()=>a(o)):l!==null&&st(l,()=>{l=null})),n()}})}function ta(e,t,n,r,i,a,o,d){var O,V,Q,ae;var s=(i&si)!==0,f=(i&(ln|sn))!==0,l=e.length,u=t.items,c=t.first,h=c,g,v=null,y,k=[],w=[],p,E,x,C;if(s)for(C=0;C<l;C+=1)p=e[C],E=o(p,C),x=u.get(E),x!==void 0&&((O=x.a)==null||O.measure(),(y??(y=new Set)).add(x));for(C=0;C<l;C+=1){if(p=e[C],E=o(p,C),x=u.get(E),x===void 0){var R=h?h.e.nodes_start:n;v=ra(R,t,v,v===null?t.first:v.next,p,E,C,r,i),u.set(E,v),k=[],w=[],h=v.next;continue}if(f&&na(x,p,C,i),x.e.f&ke&&(ct(x.e),s&&((V=x.a)==null||V.unfix(),(y??(y=new Set)).delete(x))),x!==h){if(g!==void 0&&g.has(x)){if(k.length<w.length){var P=w[0],H;v=P.prev;var W=k[0],ee=k[k.length-1];for(H=0;H<k.length;H+=1)Mn(k[H],P,n);for(H=0;H<w.length;H+=1)g.delete(w[H]);Me(t,W.prev,ee.next),Me(t,v,W),Me(t,ee,P),h=P,v=ee,C-=1,k=[],w=[]}else g.delete(x),Mn(x,h,n),Me(t,x.prev,x.next),Me(t,x,v===null?t.first:v.next),Me(t,v,x),v=x;continue}for(k=[],w=[];h!==null&&h.k!==E;)(a||!(h.e.f&ke))&&(g??(g=new Set)).add(h),w.push(h),h=h.next;if(h===null)continue;x=h}k.push(x),v=x,h=x.next}if(h!==null||g!==void 0){for(var F=g===void 0?[]:an(g);h!==null;)(a||!(h.e.f&ke))&&F.push(h),h=h.next;var G=F.length;if(G>0){var I=i&Wn&&l===0?n:null;if(s){for(C=0;C<G;C+=1)(Q=F[C].a)==null||Q.measure();for(C=0;C<G;C+=1)(ae=F[C].a)==null||ae.fix()}ea(t,F,I,u)}}s&&yt(()=>{var le;if(y!==void 0)for(x of y)(le=x.a)==null||le.apply()}),N.first=t.first&&t.first.e,N.last=v&&v.e}function na(e,t,n,r){r&ln&&Gt(e.v,t),r&sn?Gt(e.i,n):e.i=n}function ra(e,t,n,r,i,a,o,d,s,f){var l=Be,u=(s&ln)!==0,c=(s&ci)===0,h=u?c?Yn(i):_e(i):i,g=s&sn?_e(o):o,v={i:g,v:h,k:a,a:null,e:null,prev:n,next:r};Be=v;try{return v.e=Ve(()=>d(e,h,g),ki),v.e.prev=n&&n.e,v.e.next=r&&r.e,n===null?t.first=v:(n.next=v,n.e.next=v.e),r!==null&&(r.prev=v,r.e.prev=v.e),v}finally{Be=l}}function Mn(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==r;){var o=jt(a);i.before(a),a=o}}function Me(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function it(e,t,...n){var r=e,i=He,a;pt(()=>{i!==(i=t())&&(a&&(xe(a),a=null),a=Ve(()=>i(r,...n)))},tt)}function ia(e,t,n,r,i,a){var o,d,s=null,f=e,l,u=Be;pt(()=>{const c=t()||null;var h=c==="svg"?Kn:null;if(c!==o){var g=Be;Ln(u),l&&(c===null?st(l,()=>{l=null,d=null}):c===d?ct(l):(xe(l),In(!1))),c&&c!==d&&(l=Ve(()=>{s=h?document.createElementNS(h,c):document.createElement(c),Xe(s,s);{var v=s.appendChild(gt());r(s,v)}N.nodes_end=s,f.before(s)})),o=c,o&&(d=o),In(!0),Ln(g)}},tt)}function Er(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Er(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function aa(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Er(e))&&(r&&(r+=" "),r+=t);return r}function oa(e){return typeof e=="object"?aa(e):e??""}function la(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Z(e,t,n,r){var i=e.__attributes??(e.__attributes={});i[t]!==(i[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Gr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Tr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function sa(e,t,n,r,i=!1,a=!1,o=!1){var d=t||{},s=e.tagName==="OPTION";for(var f in t)f in n||(n[f]=null);n.class&&(n.class=oa(n.class)),n.class=n.class?n.class+" "+r:r;var l=Tr(e),u=e.__attributes??(e.__attributes={});for(const w in n){let p=n[w];if(s&&w==="value"&&p==null){e.value=e.__value="",d[w]=p;continue}var c=d[w];if(p!==c){d[w]=p;var h=w[0]+w[1];if(h!=="$$"){if(h==="on"){const E={},x="$$"+w;let C=w.slice(2);var g=Ui(C);if(zi(C)&&(C=C.slice(0,-7),E.capture=!0),!g&&c){if(p!=null)continue;e.removeEventListener(C,d[x],E),d[x]=null}if(p!=null)if(g)e[`__${C}`]=p,ue([C]);else{let R=function(P){d[w].call(this,P)};var k=R;d[x]=br(C,e,R,E)}else g&&(e[`__${C}`]=void 0)}else if(w==="style"&&p!=null)e.style.cssText=p+"";else if(w==="autofocus")Zi(e,!!p);else if(w==="__value"||w==="value"&&p!=null)e.value=e[w]=e.__value=p;else if(w==="selected"&&s)la(e,p);else{var v=w;i||(v=Ki(v));var y=v==="defaultValue"||v==="defaultChecked";if(p==null&&!a&&!y)if(u[w]=null,v==="value"||v==="checked"){let E=e;if(v==="value"){let x=E.defaultValue;E.removeAttribute(v),E.defaultValue=x}else{let x=E.defaultChecked;E.removeAttribute(v),E.defaultChecked=x}}else e.removeAttribute(w);else y||l.includes(v)&&(a||typeof p!="string")?e[v]=p:typeof p!="function"&&Z(e,v,p)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return d}var Nn=new Map;function Tr(e){var t=Nn.get(e.nodeName);if(t)return t;Nn.set(e.nodeName,t=[]);for(var n,r=e,i=Element.prototype;i!==r;){n=Br(r);for(var a in n)n[a].set&&t.push(a);r=Bn(r)}return t}function fe(e,t,n){if(n){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function vn(e,t,n,r){var i=e.__styles??(e.__styles={});i[t]!==n&&(i[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const ca=()=>performance.now(),Ae={tick:e=>requestAnimationFrame(e),now:()=>ca(),tasks:new Set};function Cr(){const e=Ae.now();Ae.tasks.forEach(t=>{t.c(e)||(Ae.tasks.delete(t),t.f())}),Ae.tasks.size!==0&&Ae.tick(Cr)}function ua(e){let t;return Ae.tasks.size===0&&Ae.tick(Cr),{promise:new Promise(n=>{Ae.tasks.add(t={c:e,f:n})}),abort(){Ae.tasks.delete(t)}}}function kt(e,t){e.dispatchEvent(new CustomEvent(t))}function da(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function jn(e){const t={},n=e.split(";");for(const r of n){const[i,a]=r.split(":");if(!i||a===void 0)break;const o=da(i.trim());t[o]=a.trim()}return t}const fa=e=>e;function va(e,t,n){var r=Be,i,a,o,d=null;r.a??(r.a={element:e,measure(){i=this.element.getBoundingClientRect()},apply(){if(o==null||o.abort(),a=this.element.getBoundingClientRect(),i.left!==a.left||i.right!==a.right||i.top!==a.top||i.bottom!==a.bottom){const s=t()(this.element,{from:i,to:a},n==null?void 0:n());o=At(this.element,s,void 0,1,()=>{o==null||o.abort(),o=void 0})}},fix(){if(!e.getAnimations().length){var{position:s,width:f,height:l}=getComputedStyle(e);if(s!=="absolute"&&s!=="fixed"){var u=e.style;d={position:u.position,width:u.width,height:u.height,transform:u.transform},u.position="absolute",u.width=f,u.height=l;var c=e.getBoundingClientRect();if(i.left!==c.left||i.top!==c.top){var h=`translate(${i.left-c.left}px, ${i.top-c.top}px)`;u.transform=u.transform?`${u.transform} ${h}`:h}}}},unfix(){if(d){var s=e.style;s.position=d.position,s.width=d.width,s.height=d.height,s.transform=d.transform}}}),r.a.element=e}function Se(e,t,n,r){var i=(e&hi)!==0,a=(e&mi)!==0,o=i&&a,d=(e&gi)!==0,s=o?"both":i?"in":"out",f,l=t.inert,u,c;function h(){var w=B,p=N;Ee(null),ge(null);try{return f??(f=n()(t,(r==null?void 0:r())??{},{direction:s}))}finally{Ee(w),ge(p)}}var g={is_global:d,in(){var w;if(t.inert=l,!i){c==null||c.abort(),(w=c==null?void 0:c.reset)==null||w.call(c);return}a||u==null||u.abort(),kt(t,"introstart"),u=At(t,h(),c,1,()=>{kt(t,"introend"),u==null||u.abort(),u=f=void 0})},out(w){if(!a){w==null||w(),f=void 0;return}t.inert=!0,kt(t,"outrostart"),c=At(t,h(),u,0,()=>{kt(t,"outroend"),w==null||w()})},stop:()=>{u==null||u.abort(),c==null||c.abort()}},v=N;if((v.transitions??(v.transitions=[])).push(g),i&&Ct){var y=d;if(!y){for(var k=v.parent;k&&k.f&tt;)for(;(k=k.parent)&&!(k.f&Mt););y=!k||(k.f&zn)!==0}y&&Rt(()=>{ze(()=>g.in())})}}function At(e,t,n,r,i){var a=r===1;if($r(t)){var o,d=!1;return yt(()=>{if(!d){var y=t({direction:a?"in":"out"});o=At(e,y,n,r,i)}}),{abort:()=>{d=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return i(),{abort:He,deactivate:He,reset:He,t:()=>r};const{delay:s=0,css:f,tick:l,easing:u=fa}=t;var c=[];if(a&&n===void 0&&(l&&l(0,1),f)){var h=jn(f(0,1));c.push(h,h)}var g=()=>1-r,v=e.animate(c,{duration:s});return v.onfinish=()=>{var y=(n==null?void 0:n.t())??1-r;n==null||n.abort();var k=r-y,w=t.duration*Math.abs(k),p=[];if(w>0){if(f)for(var E=Math.ceil(w/16.666666666666668),x=0;x<=E;x+=1){var C=y+k*u(x/E),R=f(C,1-C);p.push(jn(R))}g=()=>{var P=v.currentTime;return y+k*u(P/w)},l&&ua(()=>{if(v.playState!=="running")return!1;var P=g();return l(P,1-P),!0})}v=e.animate(p,{duration:w,fill:"forwards"}),v.onfinish=()=>{g=()=>r,l==null||l(r,1-r),i()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=He)},deactivate:()=>{i=He},reset:()=>{r===0&&(l==null||l(1,0))},t:()=>g()}}function _a(e,t,n=t){var r=qt();Xi(e,"input",i=>{var a=i?e.defaultValue:e.value;if(a=$t(e)?Ut(a):a,n(a),r&&a!==(a=t())){var o=e.selectionStart,d=e.selectionEnd;e.value=a??"",d!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(d,e.value.length))}}),ze(t)==null&&e.value&&n($t(e)?Ut(e.value):e.value),tr(()=>{var i=t();$t(e)&&i===Ut(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function $t(e){var t=e.type;return t==="number"||t==="range"}function Ut(e){return e===""?null:+e}function On(e,t){return e===t||(e==null?void 0:e[lt])===t}function Bt(e={},t,n,r){return Rt(()=>{var i,a;return tr(()=>{i=a,a=[],ze(()=>{e!==n(...a)&&(t(e,...a),i&&On(n(...i),e)&&t(null,...i))})}),()=>{yt(()=>{a&&On(n(...a),e)&&t(null,...a)})}}),e}let bt=!1;function ha(e){var t=bt;try{return bt=!1,[e(),bt]}finally{bt=t}}const ma={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function ga(e,t,n){return new Proxy({props:e,exclude:t},ma)}function Rn(e){for(var t=N,n=N;t!==null&&!(t.f&(we|mt));)t=t.parent;try{return ge(t),e()}finally{ge(n)}}function j(e,t,n,r){var R;var i=(n&ui)!==0,a=!nt||(n&di)!==0,o=(n&vi)!==0,d=(n&_i)!==0,s=!1,f;o?[f,s]=ha(()=>e[t]):f=e[t];var l=lt in e||Yr in e,u=o&&(((R=Ye(e,t))==null?void 0:R.set)??(l&&t in e&&(P=>e[t]=P)))||void 0,c=r,h=!0,g=!1,v=()=>(g=!0,h&&(h=!1,d?c=ze(r):c=r),c);f===void 0&&r!==void 0&&(u&&a&&ti(),f=v(),u&&u(f));var y;if(a)y=()=>{var P=e[t];return P===void 0?v():(h=!0,g=!1,P)};else{var k=Rn(()=>(i?X:xi)(()=>e[t]));k.f|=Wr,y=()=>{var P=_(k);return P!==void 0&&(c=void 0),P===void 0?c:P}}if(!(n&fi))return y;if(u){var w=e.$$legacy;return function(P,H){return arguments.length>0?((!a||!H||w||s)&&u(H?y():P),P):y()}}var p=!1,E=!1,x=Yn(f),C=Rn(()=>X(()=>{var P=y(),H=_(x);return p?(p=!1,E=!0,H):(E=!1,x.v=P)}));return i||(C.equals=on),function(P,H){if(arguments.length>0){const W=H?_(C):a&&o?Y(P):P;return C.equals(W)||(p=!0,L(x,W),g&&c!==void 0&&(c=W),ze(()=>_(C))),P}return _(C)}}function at(e){U===null&&cr(),nt&&U.l!==null?pa(U).m.push(e):Ot(()=>{const t=ze(e);if(typeof t=="function")return t})}function pa(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const ya="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ya);const Ar="https://www.playpilot.com",_n="https://partner-api.playpilot.tech/1.0.0",Pr="EncryptedToken",wa="articleReplacementEditToken";async function Ir(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=kn();if(!n)throw new Error("No token was provided");const r=Lr(e);if(!r)throw new Error("Could not be authenticated");const i=await fetch(_n+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:r})});if(!i.ok)throw i;return ka(r),!0}catch(n){console.error(n)}return!1}function Lr(e=""){var r,i;const t=(r=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:r.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(wa);if(a)return decodeURI(a)}return((i=("; "+document.cookie).split(`; ${Pr}=`).pop())==null?void 0:i.split(";")[0])||""}function ka(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const r="expires="+t.toUTCString();document.cookie=Pr+"="+e+";"+r+";path=/"}function hn(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get("playpilot-editorial-mode")==="true"||!!e}function Mr(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=t*31+r>>>0}return t.toString(16)}const Pe=Object.freeze({ArticlePageView:"ali_article_page_view",TitleModalView:"ali_title_modal_view",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed"}),ba="https://insights.playpilot.net";async function Re(e,t=null,n={}){const r=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,fetch(ba,{headers:r,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}const Sa=e=>e;function mn(e){const t=e-1;return t*t*t+1}function qn(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function xa(e,{delay:t=0,duration:n=400,easing:r=Sa}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:a=>`opacity: ${a*i}`}}function _t(e,{delay:t=0,duration:n=400,easing:r=mn,x:i=0,y:a=0,opacity:o=0}={}){const d=getComputedStyle(e),s=+d.opacity,f=d.transform==="none"?"":d.transform,l=s*(1-o),[u,c]=qn(i),[h,g]=qn(a);return{delay:t,duration:n,easing:r,css:(v,y)=>`
|
|
3
|
+
transform: ${f} translate(${(1-v)*u}${c}, ${(1-v)*h}${g});
|
|
4
|
+
opacity: ${s-l*y}`}}function Pt(e,{delay:t=0,duration:n=400,easing:r=mn,axis:i="y"}={}){const a=getComputedStyle(e),o=+a.opacity,d=i==="y"?"height":"width",s=parseFloat(a[d]),f=i==="y"?["top","bottom"]:["left","right"],l=f.map(k=>`${k[0].toUpperCase()}${k.slice(1)}`),u=parseFloat(a[`padding${l[0]}`]),c=parseFloat(a[`padding${l[1]}`]),h=parseFloat(a[`margin${l[0]}`]),g=parseFloat(a[`margin${l[1]}`]),v=parseFloat(a[`border${l[0]}Width`]),y=parseFloat(a[`border${l[1]}Width`]);return{delay:t,duration:n,easing:r,css:k=>`overflow: hidden;opacity: ${Math.min(k*20,1)*o};${d}: ${k*s}px;padding-${f[0]}: ${k*u}px;padding-${f[1]}: ${k*c}px;margin-${f[0]}: ${k*h}px;margin-${f[1]}: ${k*g}px;border-${f[0]}-width: ${k*v}px;border-${f[1]}-width: ${k*y}px;min-${d}: 0`}}function Ea(e,{delay:t=0,duration:n=400,easing:r=mn,start:i=0,opacity:a=0}={}){const o=getComputedStyle(e),d=+o.opacity,s=o.transform==="none"?"":o.transform,f=1-i,l=d*(1-a);return{delay:t,duration:n,easing:r,css:(u,c)=>`
|
|
5
|
+
transform: ${s} scale(${1-f*c});
|
|
6
|
+
opacity: ${d-l*c}
|
|
7
|
+
`}}var Ta=A('<div class="popover svelte-8w8waf" tabindex="-1" aria-hidden="true"><div class="dialog svelte-8w8waf"><!></div></div>');function Ca(e,t){re(t,!0);let n=j(t,"maxHeight",15);pr("scope","popover");let r=$(null),i=$(!1);at(async()=>{await An(),a(),await An(),o()});function a(){if(!_(r))return;const{top:u,right:c,bottom:h,height:g}=_(r).getBoundingClientRect(),v=d();L(i,Y(u-v<0&&window.innerHeight-h>u+g));const y=window.innerWidth-c-v;c+v>window.innerWidth&&(_(r).style.left=`${y}px`)}function o(){if(!_(r))return;const{top:u,height:c}=_(r).getBoundingClientRect(),h=d(),g=_(i)?window.innerHeight-u-h:u+c-h;n(Math.min(g,window.innerHeight*.8))}function d(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var s=Ta(),f=b(s),l=b(f);it(l,()=>t.children),Bt(s,u=>L(r,u),()=>_(r)),M(()=>{fe(s,"flip",_(i)),vn(s,"--max-height",n()?n()+"px":null)}),Se(3,f,()=>_t,()=>({duration:100,y:10})),S(e,s),ie()}const Aa=[{slug:"100",name:"All",categories:{movie:100,series:100,documentary:100,kids:100,cinema:100,podcasts:100}},{slug:"999",name:"Unscripted",categories:{},media_format:"video"},{slug:"900",name:"Independent",categories:{},media_format:"video"},{slug:"113",name:"Game Show",categories:{series:36,kids:28},media_format:"video"},{slug:"112",name:"Film Noir",categories:{movie:37},media_format:"video"},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42},media_format:"video"},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38},media_format:"video"},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36},media_format:"video"},{slug:"902",name:"Bollywood",categories:{},media_format:"video"},{slug:"240",name:"Concert",categories:{movie:45},media_format:"video"},{slug:"901",name:"Arthouse",categories:{},media_format:"video"},{slug:"903",name:"Alternate Version",categories:{},media_format:"video"},{slug:"121",name:"Reality TV",categories:{series:24},media_format:"video"},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44},media_format:"video"},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44},media_format:"video"},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84},media_format:"video"},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24},media_format:"video"},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70},media_format:"video"},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50},media_format:"video"},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76},media_format:"video"},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74},media_format:"video"},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28},media_format:"video"},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66},media_format:"video"},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32},media_format:"video"},{slug:"106",name:"Documentary",categories:{kids:50},media_format:"video"},{slug:"232",name:"Stand-up",categories:{movie:18,series:18},media_format:"video"},{slug:"126",name:"Talk Show",categories:{kids:34,series:16},media_format:"video"},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38},media_format:"video"},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90},media_format:"video"},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88},media_format:"video"},{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90},media_format:"video"},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80},media_format:"video"},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86},media_format:"video"},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46},media_format:"video"},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32},media_format:"video"},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20},media_format:"video"},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74},media_format:"video"},{slug:"103",name:"Kids",categories:{kids:76},media_format:"video"},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34},media_format:"video"},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30},media_format:"video"},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48},media_format:"video"},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40},media_format:"video"}],m=Object.freeze({English:"en-US",Swedish:"sv-SE"}),Pa={"Where To Stream Online":{[m.English]:"Where to stream online",[m.Swedish]:"Var kan man streama online"},"Affiliate Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med"},"An Error Occurred":{[m.English]:"An error occurred",[m.Swedish]:"Ett fel inträffade"},"Title Unavailable":{[m.English]:"This title is not currently available to stream.",[m.Swedish]:"Den här titeln går inte att streama just nu."},"Title Unavailable Suffix":{[m.English]:"is not currently available to stream.",[m.Swedish]:"går inte att streama just nu."},"Is Available To Stream On":{[m.English]:"is available to stream on",[m.Swedish]:"finns att streama på"},"Is Available To Stream":{[m.English]:"is available to stream.",[m.Swedish]:"finns att streama."},"View Streaming Options":{[m.English]:"View streaming options",[m.Swedish]:"Se streamingalternativ"},And:{[m.English]:"and",[m.Swedish]:"och"},Minutes:{[m.English]:"minutes",[m.Swedish]:"minuter"},"Type: movie":{[m.English]:"Movie",[m.Swedish]:"Film"},"Type: series":{[m.English]:"Series",[m.Swedish]:"Serie"},Stream:{[m.English]:"Stream",[m.Swedish]:"Strömma"},Buy:{[m.English]:"Buy",[m.Swedish]:"Köp"},Rent:{[m.English]:"Rent",[m.Swedish]:"Hyra"},"Rent Or Buy":{[m.English]:"Rent or Buy",[m.Swedish]:"Hyra"},All:{[m.English]:"All",[m.Swedish]:"Alla"},Unscripted:{[m.English]:"Unscripted",[m.Swedish]:"Oscripterat"},Independent:{[m.English]:"Independent",[m.Swedish]:"Indie"},"Game Show":{[m.English]:"Game Show",[m.Swedish]:"Gameshow"},"Film Noir":{[m.English]:"Film Noir",[m.Swedish]:"Film noir"},Entertainment:{[m.English]:"Entertainment",[m.Swedish]:"Underhållning"},News:{[m.English]:"News",[m.Swedish]:"Nyheter"},Short:{[m.English]:"Short",[m.Swedish]:"Kortfilm"},Bollywood:{[m.English]:"Bollywood",[m.Swedish]:"Bollywood"},Concert:{[m.English]:"Concert",[m.Swedish]:"Konsert"},Arthouse:{[m.English]:"Arthouse",[m.Swedish]:"Arthouse"},"Alternate Version":{[m.English]:"Alternate Version",[m.Swedish]:"Alternativ version"},"Reality TV":{[m.English]:"Reality TV",[m.Swedish]:"Reality-TV"},Culture:{[m.English]:"Culture",[m.Swedish]:"Kultur"},Drama:{[m.English]:"Drama",[m.Swedish]:"Drama"},Crime:{[m.English]:"Crime",[m.Swedish]:"Kriminal"},Western:{[m.English]:"Western",[m.Swedish]:"Western"},Thriller:{[m.English]:"Thriller",[m.Swedish]:"Thriller"},Animation:{[m.English]:"Animation",[m.Swedish]:"Animerat"},Mystery:{[m.English]:"Mystery",[m.Swedish]:"Mysterium"},Science:{[m.English]:"Science",[m.Swedish]:"Vetenskap"},Nature:{[m.English]:"Nature",[m.Swedish]:"Natur"},War:{[m.English]:"War",[m.Swedish]:"Krig"},"Sci-Fi":{[m.English]:"Sci-Fi",[m.Swedish]:"Sci-fi"},Documentary:{[m.English]:"Documentary",[m.Swedish]:"Dokumentär"},"Stand-up":{[m.English]:"Stand-up",[m.Swedish]:"Standup"},"Talk Show":{[m.English]:"Talk Show",[m.Swedish]:"Talkshow"},Fantasy:{[m.English]:"Fantasy",[m.Swedish]:"Fantasy"},History:{[m.English]:"History",[m.Swedish]:"Historia"},Adventure:{[m.English]:"Adventure",[m.Swedish]:"Äventyr"},Action:{[m.English]:"Action",[m.Swedish]:"Action"},Horror:{[m.English]:"Horror",[m.Swedish]:"Skräck"},Comedy:{[m.English]:"Comedy",[m.Swedish]:"Komedi"},Biography:{[m.English]:"Biography",[m.Swedish]:"Biografi"},Music:{[m.English]:"Music",[m.Swedish]:"Musik"},Sport:{[m.English]:"Sport",[m.Swedish]:"Sport"},Romance:{[m.English]:"Romance",[m.Swedish]:"Romantik"},Kids:{[m.English]:"Kids",[m.Swedish]:"Barn"},Lifestyle:{[m.English]:"Lifestyle",[m.Swedish]:"Livsstil"},Musical:{[m.English]:"Musical",[m.Swedish]:"Musikal"},Anime:{[m.English]:"Anime",[m.Swedish]:"Anime"},Family:{[m.English]:"Family",[m.Swedish]:"Familj"}};function ce(e,t=Ia()){var n;return((n=Pa[e])==null?void 0:n[t])||e}function Ia(){var r,i;const e=(r=window.PlayPilotLinkInjections)==null?void 0:r.language,t=Object.values(m);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(i=document.querySelector("html"))==null?void 0:i.getAttribute("lang");return n&&t.includes(n)?n:m.English}var La=A('<div class="genre svelte-13nhocm"> </div>'),Ma=(e,t)=>L(t,!0),Na=A('<button class="genre expand svelte-13nhocm"> </button>'),ja=A("<!> <!>",1);function Oa(e,t){re(t,!0);let n=$(!1),r=X(()=>_(n)?t.genres:[t.genres[0]]);var i=ja(),a=ne(i);$e(a,17,()=>_(r),vt,(s,f)=>{var l=Qe();const u=X(()=>{var g;return(g=Aa.find(v=>v.slug===_(f)))==null?void 0:g.name});var c=ne(l);{var h=g=>{var v=La(),y=b(v);M(()=>D(y,ce(_(u)))),S(g,v)};q(c,g=>{_(u)&&g(h)})}S(s,l)});var o=T(a,2);{var d=s=>{var f=Na();f.__click=[Ma,n];var l=b(f);M(()=>D(l,`+${t.genres.length-1}`)),S(s,f)};q(o,s=>{!_(n)&&t.genres.length>1&&s(d)})}S(e,i),ie()}ue(["click"]);function Ra(e){let t=[];for(const n of e){let r=n;const i=t.find(d=>d.name===r.name),a=i==null?void 0:i.extra_info.category,o=r.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(d=>d.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),t.push(r)}return t}li();var qa=Ce('<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 11L5 6L0 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ha(e){var t=qa();S(e,t)}var Fa=(e,t,n)=>t(n()),Da=A('<div class="arrow svelte-1f6ryh6"><!></div>'),Ba=A('<a target="_blank" class="playlink svelte-1f6ryh6" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1f6ryh6"> <div><span class="name svelte-1f6ryh6"> </span> <div class="category svelte-1f6ryh6"> </div></div> <!></a>'),Va=A('<div class="playlink empty svelte-1f6ryh6"> </div>'),za=A('<h2 class="svelte-1f6ryh6"> </h2> <div class="playlinks svelte-1f6ryh6"><!> <!></div>',1);function $a(e,t){re(t,!0);const n=j(t,"list",3,!1),r=Bi("scope")==="modal",i=X(()=>t.playlinks.filter(v=>!!v.logo_url)),a=X(()=>Ra(_(i))),o={SVOD:ce("Stream"),BUY:ce("Buy"),RENT:ce("Rent"),TVOD:ce("Rent Or Buy")};function d(v){Re(r?Pe.TitleModalPlaylinkClick:Pe.TitlePopoverPlaylinkClick,t.title,{playlink:v})}var s=za(),f=ne(s),l=b(f);M(()=>D(l,ce("Where To Stream Online")));var u=T(f,2),c=b(u);$e(c,17,()=>_(a),vt,(v,y)=>{let k=()=>_(y).name,w=()=>_(y).url,p=()=>_(y).logo_url,E=()=>_(y).extra_info.category;var x=Ba();x.__click=[Fa,d,k];var C=b(x),R=T(C,2),P=b(R),H=b(P),W=T(P,2),ee=b(W);M(()=>D(ee,o[E()]||ce("Stream")));var F=T(R,2);{var G=I=>{var O=Da(),V=b(O);Ha(V),S(I,O)};q(F,I=>{n()&&I(G)})}M(()=>{Z(x,"href",w()),Z(x,"data-playlink",k()),Z(C,"src",p()),D(H,k())}),S(v,x)});var h=T(c,2);{var g=v=>{var y=Va(),k=b(y);M(()=>D(k,ce("Title Unavailable"))),S(v,y)};q(h,v=>{t.playlinks.length||v(g)})}M(()=>fe(u,"list",n())),S(e,s),ie()}ue(["click"]);var Ua=(e,t)=>L(t,!0),Wa=A('<button class="show-more svelte-fluzit">Show more</button>'),Ka=A('<p class="svelte-fluzit"> </p>'),Ya=A('<div><span class="paragraph svelte-fluzit"> <!> <!></span> <!></div>');function Ga(e,t){re(t,!0);const n=j(t,"blurb",3,""),r=j(t,"limit",3,200);let i=$(!1),a=X(()=>t.text.slice(0,r()));var o=Ya(),d=b(o),s=b(d),f=T(s);{var l=v=>{var y=Oe("...");S(v,y)};q(f,v=>{!_(i)&&t.text.length>r()&&v(l)})}var u=T(f,2);{var c=v=>{var y=Wa();y.__click=[Ua,i],S(v,y)};q(u,v=>{!_(i)&&(t.text.length>r()||n())&&v(c)})}var h=T(d,2);{var g=v=>{var y=Ka(),k=b(y);M(()=>D(k,n())),S(v,y)};q(h,v=>{_(i)&&v(g)})}M(()=>D(s,_(i)?t.text:_(a))),S(e,o),ie()}ue(["click"]);var Za=A('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),Ja=A('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function Xa(e,t){var n=Ja(),r=T(ne(n),2);$e(r,21,()=>t.participants,vt,(i,a)=>{var o=Za(),d=b(o),s=T(d),f=b(s);M(()=>{var c;return D(f,((c=_(a).character)==null?void 0:c.slice(0,20))||"")});var l=T(f);{var u=c=>{var h=Oe("...");S(c,h)};q(l,c=>{var h;(h=_(a).character)!=null&&h.length&&c(u)})}M(()=>D(d,`${_(a).name??""} `)),S(i,o)}),S(e,n)}var Qa=Ce('<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function gn(e){var t=Qa();S(e,t)}var eo=A('<div class="top svelte-zq2qln"><img class="poster svelte-zq2qln"></div>'),to=A("<div> </div>"),no=A("<!> <!>",1),ro=A('<div class="content svelte-zq2qln" data-playpilot-link-injections-title=""><header class="header svelte-zq2qln"><!> <h1 class="svelte-zq2qln"> </h1> <div class="info svelte-zq2qln"><div class="imdb svelte-zq2qln"><!> </div> <!> <div> </div> <div class="capitalize svelte-zq2qln"> </div> <!></div></header> <main class="main"><!> <!></main></div> <div class="background svelte-zq2qln"><img alt="" class="svelte-zq2qln"></div>',1);function Nr(e,t){re(t,!0);const n=j(t,"small",3,!1),r=j(t,"compact",3,!1);var i=ro(),a=ne(i),o=b(a),d=b(o);{var s=F=>{var G=eo(),I=b(G);M(()=>{Z(I,"src",t.title.standing_poster),Z(I,"alt",`Movie poster for '${t.title.title??""}'`)}),S(F,G)};q(d,F=>{r()||F(s)})}var f=T(d,2),l=b(f),u=T(f,2),c=b(u),h=b(c);gn(h);var g=T(h),v=T(c,2);Oa(v,{get genres(){return t.title.genres}});var y=T(v,2),k=b(y),w=T(y,2),p=b(w);M(()=>D(p,ce(`Type: ${t.title.type}`)));var E=T(w,2);{var x=F=>{var G=to(),I=b(G);M(()=>D(I,`${t.title.length??""} ${ce("Minutes")??""}`)),S(F,G)};q(E,F=>{t.title.length&&F(x)})}var C=T(o,2),R=b(C);$a(R,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var P=T(R,2);{var H=F=>{var G=no(),I=ne(G);Ga(I,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var O=T(I,2);{var V=Q=>{Xa(Q,{get participants(){return t.title.participants}})};q(O,Q=>{var ae;(ae=t.title.participants)!=null&&ae.length&&Q(V)})}S(F,G)};q(P,F=>{n()||F(H)})}var W=T(a,2),ee=b(W);M(()=>{Z(a,"data-playpilot-original-title",t.title.original_title),fe(a,"small",n()),fe(a,"compact",r()),D(l,t.title.title),D(g,` ${t.title.imdb_score??""}`),D(k,t.title.year),fe(W,"faded",r()),Z(ee,"src",t.title.medium_poster)}),S(e,i),ie()}function io(e,t){re(t,!0);let n=$(0);Re(Pe.TitlePopoverView,t.title),Ca(e,{get maxHeight(){return _(n)},set maxHeight(r){L(n,Y(r))},children:(r,i)=>{var a=X(()=>_(n)<250);Nr(r,{get title(){return t.title},small:!0,get compact(){return _(a)}})},$$slots:{default:!0}}),ie()}var ao=(e,t,n,r)=>t(_(n).title_details,_(r)),oo=A(' <span class="svelte-6p0hvs"><button class="svelte-6p0hvs"> </button></span>',1),lo=(e,t,n,r)=>t(_(n).title_details,r()),so=A('<!> <a target="_blank"> </a>',1),co=A(" <!>.",1),uo=A("<!> <br>",1),fo=A(" <br>",1),vo=A('<span class="svelte-6p0hvs"><!></span>'),_o=A("<p></p>");function ho(e,t){re(t,!0);const n=j(t,"onclickmodal",3,s=>null);function r(s,f){Re(Pe.AfterArticlePlaylinkClick,s,{playlink:f})}function i(s,f){Re(Pe.AfterArticleModalButtonClick,s),n()(f)}var a=Qe(),o=ne(a);{var d=s=>{var f=_o();$e(f,21,()=>t.linkInjections,vt,(l,u)=>{var c=vo();const h=X(()=>{const{key:w,title:p,title_details:E,after_article_style:x}=_(u);return{key:w,title:p,title_details:E,after_article_style:x}}),g=X(()=>{var w;return((w=_(h).title_details)==null?void 0:w.providers)||[]});var v=b(c);{var y=w=>{var p=uo(),E=ne(p);{var x=R=>{var P=oo(),H=ne(P);M(()=>D(H,`"${_(h).title??""}" ${ce("Is Available To Stream")??""} `));var W=T(H),ee=b(W);ee.__click=[ao,i,h,u];var F=b(ee);M(()=>D(F,ce("View Streaming Options"))),S(R,P)},C=R=>{var P=co(),H=ne(P);M(()=>D(H,`"${_(h).title??""}" ${ce("Is Available To Stream On")??""} `));var W=T(H);$e(W,17,()=>_(g),vt,(ee,F,G)=>{let I=()=>_(F).name,O=()=>_(F).url;var V=so(),Q=ne(V);{var ae=te=>{var oe=Oe();M(()=>D(oe,G===_(g).length-1?`, ${ce("And")}`:",")),S(te,oe)};q(Q,te=>{G&&te(ae)})}var le=T(Q,2);le.__click=[lo,r,h,I];var Ie=b(le);M(()=>{Z(le,"href",O()),D(Ie,I())}),S(ee,V)}),S(R,P)};q(E,R=>{_(h).after_article_style==="modal_button"?R(x):R(C,!1)})}S(w,p)},k=w=>{var p=fo(),E=ne(p);M(()=>D(E,`"${_(h).title??""}" ${ce("Title Unavailable Suffix")??""} `)),S(w,p)};q(v,w=>{_(g).length?w(y):w(k,!1)})}M(()=>Z(c,"data-playpilot-injection-key",_(h).key)),S(l,c)}),S(s,f)};q(o,s=>{t.linkInjections.length&&s(d)})}S(e,a),ie()}ue(["click"]);function mo(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function jr(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function go(e,t,n=[]){var a,o;const r=document.createTreeWalker(t);let i;for(;(i=r.nextNode())&&!((a=i.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=i.parentNode)==null?void 0:o.nodeName)||"")););return i}function po(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function yo(e,t,n,r){const i=mo(t),a=jr(t),o=e.slice(0,r),d=e.slice(r),s=/[-/\\^$*+?.()|[\]{}]/g,f=new RegExp(`${a.replace(s,"\\$&")}|${i.replace(s,"\\$&")}`),l=d.replace(f,n);return o+l}function wo(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const pn="data-playpilot-injection-key",yn=`[${pn}]`,It={};let en=null;function ko(e){let t=[],n=[e];for(;n.length>0;){const r=n.pop();if(/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(r.tagName))continue;if(Array.from(r.childNodes).some(o=>{var d;return o.nodeType===Node.TEXT_NODE&&((d=o.nodeValue)==null?void 0:d.trim())!==""})){t.push(r);continue}const a=Array.from(r.children);for(let o=a.length-1;o>=0;o--)n.push(a[o])}return t}function wn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),r=document.querySelector(n);if(r)return r}return document.querySelector("article")||document.querySelector("main")||document.body}function bo(e,t,n){var f;const r=e.map(l=>l.innerText).join(" "),i=t.filter(l=>l.in_text!==!1&&!l.inactive),a=i.filter(l=>r.includes(l.sentence)),o={};for(const l of a){const u=e.findIndex(w=>w.innerText.includes(l.sentence)),c=e[u];if(!c)continue;const h=go(l.title,c,["A"]);if(!h||po(h))continue;const g=document.createElement("span");g.dataset.playpilotInjectionKey=l.key;const v=document.createElement("a");v.innerText=l.title,v.href=l.playpilot_url,v.dataset.playpilotOriginalTitle=(f=l.title_details)==null?void 0:f.original_title,v.target="_blank",v.rel="noopener nofollow noreferrer",g.insertAdjacentElement("beforeend",v);const y=wo(Object.values(o).filter(w=>w.elementIndex===u).map(w=>w.to));c.innerHTML=yo(c.innerHTML,l.title,g.outerHTML,y);const k=c.innerHTML.indexOf(g.outerHTML);o[l.key]={elementIndex:u,from:k,to:k+g.outerHTML.length}}xo(i,n),So();const d=t.filter(l=>l.after_article&&!l.inactive);return d.length&&Co(e,d,n),Po(t,o).map(l=>{const u=!l.inactive&&!l.after_article&&!document.querySelector(`[${pn}="${l.key}"]`);return{...l,inactive:!!l.inactive,failed:u}})}function So(){const e=Array.from(document.querySelectorAll(`${yn} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(r=>{getComputedStyle(n).getPropertyValue(r)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${r}`)})})}function xo(e,t){window.addEventListener("click",r=>{const i=r.target;if(!(i!=null&&i.parentElement))return;const a=i.parentElement.getAttribute(pn);if(!a)return;const o=e.find(d=>a===d.key);o&&Eo(r,o,t)}),document.querySelectorAll(yn).forEach(r=>{const i=r.dataset.playpilotInjectionKey,a=e.find(o=>i===o.key);a&&(r.addEventListener("mouseenter",o=>To(o,a)),r.addEventListener("mouseleave",()=>Lt(a)))})}function Eo(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Lt(t))}function To(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget,r=fn(io,{target:n,props:{title:t.title_details}});It[t.key]={injection:t,component:r}}function Lt(e,t=!0){const n=It[e.key];n&&xr(n.component,{outro:t})}function Co(e,t,n){if(!t.length)return;const r=document.createElement("div");r.dataset.playpilotAfterArticlePlaylinks="true",e[e.length-1].insertAdjacentElement("afterend",r),en=fn(ho,{target:r,props:{linkInjections:t,onclickmodal:n}})}function Ao(){var e;en&&(xr(en),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove())}function tn(){Object.values(It).forEach(t=>Lt(t.injection)),document.querySelectorAll(yn).forEach(t=>t.outerHTML=t.textContent||""),Object.values(It).forEach(({injection:t})=>Lt(t,!1)),Ao()}function Po(e,t){return e.sort((n,r)=>{const i=t[n.key],a=t[r.key];return!i&&a?1:i&&!a?-1:!i&&!a?0:(i==null?void 0:i.elementIndex)!==(a==null?void 0:a.elementIndex)?((i==null?void 0:i.elementIndex)||0)-((a==null?void 0:a.elementIndex)||0):((i==null?void 0:i.from)||0)-((a==null?void 0:a.from)||0)})}function Io(){const e=wn();return{heading:Lo(e),modified_time:Hn(e),published_time:Hn(e)}}function Lo(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Hn(e){const t=document.querySelector('meta[property*="modified_time"]')||e.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?Mo(n):null}function Mo(e){try{return new Date(e).toISOString()}catch{return null}}function Or(){return location.protocol+"//"+location.host+location.pathname}let Wt=null;async function Rr(e,t,{hash:n=Mr(t),params:r={}}={}){const i=new Headers({"Content-Type":"application/json"}),a=kn(),o=hn()?await Ir():!1,d=Io();if(!a)throw new Error("No token was provided");const s=await fetch(_n+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}`,{headers:i,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:d,page_text:t,...r})});if(!s.ok)throw s;return await s.json()}async function No(e,t,n=3e3,r=600){let i=Mr(t),a=0;Wt&&clearTimeout(Wt);const o=async(d,s)=>{var f;try{const l=await Rr(e,t,{hash:i});if(l.injections_enabled===!1&&!hn()){d([]);return}if(l.injections_ready===!1&&((f=l.link_injections)!=null&&f.length)){l.link_injections=Fn(l.link_injections),d(l.link_injections||[]);return}if(l.injections_ready){l.link_injections&&(l.link_injections=Fn(l.link_injections)),d(l.link_injections||[]);return}throw new Error}catch{if(a++,a>=r){console.error("Max poll limit exceeded. Please return later."),d();return}Wt=setTimeout(()=>o(d),n)}};return new Promise(o)}async function jo(e,t){var a;const n=(a=window.PlayPilotLinkInjections)==null?void 0:a.selector,r=e.map(o=>({sid:o.sid,title:o.title,sentence:o.sentence,playpilot_url:o.playpilot_url,after_article:!!o.after_article,after_article_style:o.after_article_style||null,in_text:o.in_text??!0,inactive:!!o.inactive}));if(!await Rr(Or(),t,{params:{private_token:Lr(),automation_enabled:!1,link_injections:r,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}function Fn(e){return e.map(t=>({...t,key:qr(t.sid)}))}function qr(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function kn(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}var Oo=Ce('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ro(e){var t=Oo();S(e,t)}function bn(e,t){re(t,!0);const n=j(t,"children",3,null),r=j(t,"size",3,"margin(2)"),i=j(t,"onclick",3,()=>null),a=ga(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var o=Qe(),d=ne(o);ia(d,()=>t.href?"a":"button",!1,(s,f)=>{let l;M(()=>{l=sa(s,l,{role:t.href?"link":"button",onclick:i(),class:"button",...a},"svelte-1qqv88o",s.namespaceURI===Kn,s.nodeName.includes("-")),vn(s,"--size",r())});var u=Qe(),c=ne(u);it(c,()=>n()??He),S(f,u)}),S(e,o),ie()}var qo=(e,t)=>t()(),Ho=A('<div class="modal svelte-1riopfw"><div class="dialog svelte-1riopfw" role="dialog"><div class="close svelte-1riopfw"><!></div> <!></div> <div class="backdrop svelte-1riopfw"></div></div>');function Fo(e,t){re(t,!0);const n=j(t,"onclose",3,()=>null),r=j(t,"onscroll",3,()=>null);pr("scope","modal"),at(()=>{const u=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=u||""});function i(u){return window.innerWidth<600?_t(u,{duration:250,y:window.innerHeight}):Ea(u,{duration:150,start:.85})}var a=Ho();he("keydown",pe,({key:u})=>{u==="Escape"&&n()()});var o=b(a),d=b(o),s=b(d);bn(s,{onclick:()=>n()(),children:(u,c)=>{Ro(u)},$$slots:{default:!0}});var f=T(d,2);it(f,()=>t.children);var l=T(o,2);l.__click=[qo,n],he("scroll",o,function(...u){var c;(c=r())==null||c.apply(this,u)}),Se(3,o,()=>i),Se(3,a,()=>xa,()=>({duration:150})),S(e,a),ie()}ue(["click"]);function Do(e,t){re(t,!0),Re(Pe.TitleModalView,t.title);let n=!1;function r(){n||(Re(Pe.TitleModalScroll,t.title),n=!0)}Fo(e,{get onclose(){return t.onclose},onscroll:r,children:(i,a)=>{Nr(i,{get title(){return t.title}})},$$slots:{default:!0}}),ie()}function Bo(e){const t=e-1;return t*t*t+1}function Vo(e,{from:t,to:n},r={}){var i=getComputedStyle(e),a=zo(e),o=i.transform==="none"?"":i.transform,[d,s]=i.transformOrigin.split(" ").map(parseFloat),f=t.width/n.width,l=t.height/n.height,u=(t.left+f*d-(n.left+d))/a,c=(t.top+l*s-(n.top+s))/a,{delay:h=0,duration:g=y=>Math.sqrt(y)*120,easing:v=Bo}=r;return{delay:h,duration:typeof g=="function"?g(Math.sqrt(u*u+c*c)):g,easing:v,css:(y,k)=>{var w=k*u,p=k*c,E=y+k*f,x=y+k*l;return`transform: ${o} scale(${E}, ${x}) translate(${w}px, ${p}px);`}}}function zo(e){if("currentCSSZoom"in e)return e.currentCSSZoom;for(var t=e,n=1;t!==null;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}var $o=Ce('<svg width="8" height="4" viewBox="0 0 8 4" fill="none" class="svelte-by11ix"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Uo(e,t){const n=j(t,"expanded",3,!1);var r=$o();M(()=>fe(r,"expanded",n())),S(e,r)}function Wo(e,t,n){t(!t()),n()(t())}var Ko=A('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function nn(e,t){re(t,!0);let n=j(t,"active",15),r=j(t,"fullwidth",3,!1),i=j(t,"label",3,""),a=j(t,"onclick",3,()=>null);var o=Ko();o.__click=[Wo,n,a];var d=b(o),s=b(d);it(s,()=>t.children),M(()=>{Z(o,"aria-label",`Toggle ${i()??""} ${(n()?"off":"on")??""}`),fe(o,"active",n()),fe(o,"fullwidth",r())}),S(e,o),ie()}ue(["click"]);var Yo=A('<input type="text" class="svelte-1vrer3i">');function Sn(e,t){let n=j(t,"value",15),r=j(t,"label",3,""),i=j(t,"name",3,""),a=j(t,"readonly",3,!1),o=j(t,"oninput",3,()=>null);var d=Yo();d.__input=function(...s){var f;(f=o())==null||f.apply(this,s)},M(()=>{Z(d,"name",i()),Z(d,"aria-label",r()),Z(d,"placeholder",r()),d.readOnly=a()}),_a(d,n),S(e,d)}ue(["input"]);var Go=Ce('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Zo=Ce('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Jo=Ce('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Dn(e,t){let n=j(t,"align",3,"bottom");var r=Jo(),i=b(r);{var a=d=>{var s=Go();S(d,s)},o=d=>{var s=Qe(),f=ne(s);{var l=u=>{var c=Zo();S(u,c)};q(f,u=>{n()==="center"&&u(l)},!0)}S(d,s)};q(i,d=>{n()==="bottom"?d(a):d(o,!1)})}S(e,r)}var Xo=A("<!> In-text Playlink",1),Qo=A("<!> Bottom Playlink",1),el=(e,t)=>t().after_article_style="playlinks",tl=(e,t)=>t().after_article_style="modal_button",nl=A('<div><div class="label svelte-14krcvc">Bottom playlinks style</div> <div class="group svelte-14krcvc" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-14krcvc">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-14krcvc">Modal button</button> <div class="active-marker svelte-14krcvc"></div></div></div>'),rl=A('<div class="switches svelte-14krcvc"><!> <!></div> <!>',1);function il(e,t){re(t,!0);let n=j(t,"linkInjection",7),r=X(()=>n().after_article_style==="modal_button");var i=rl(),a=ne(i),o=b(a),d=X(()=>n().in_text??!0);nn(o,{fullwidth:!0,get active(){return _(d)},onclick:c=>n().in_text=c,label:"In-text Playlink",children:(c,h)=>{var g=Xo(),v=ne(g);Dn(v,{align:"center"}),S(c,g)},$$slots:{default:!0}});var s=T(o,2),f=X(()=>n().after_article??!1);nn(s,{fullwidth:!0,get active(){return _(f)},onclick:c=>n().after_article=c,label:"Bottom Playlink",children:(c,h)=>{var g=Qo(),v=ne(g);Dn(v,{align:"bottom"}),S(c,g)},$$slots:{default:!0}});var l=T(a,2);{var u=c=>{var h=nl(),g=T(b(h),2),v=b(g);v.__click=[el,n];var y=T(v,2);y.__click=[tl,n];var k=T(y,2);M(()=>{Z(g,"aria-activedescendant",`playlinks-${(_(r)?"after-article":"in-text")??""}`),Z(v,"aria-selected",!_(r)||null),fe(v,"active",!_(r)),Z(y,"aria-selected",_(r)||null),fe(y,"active",_(r)),fe(k,"right",_(r))}),Se(3,h,()=>Pt,()=>({duration:100})),S(c,h)};q(l,c=>{n().after_article&&c(u)})}S(e,i),ie()}ue(["click"]);var al=A('<div class="alert svelte-1tq7qhv"><!></div>');function xn(e,t){re(t,!0);var n=al(),r=b(n);it(r,()=>t.children),S(e,n),ie()}var ol=Ce('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function ll(e){var t=ol();S(e,t)}var sl=(e,t)=>L(t,!_(t)),cl=A('<div class="content svelte-1fmy0wh"><!></div>'),ul=A('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function dl(e,t){re(t,!0);let n=$(!1),r=$(null);function i(l){var c;const u=l.target;u===_(r)||(c=_(r))!=null&&c.contains(u)||L(n,!1)}var a=ul();he("click",pe,i);var o=b(a);o.__click=[sl,n];var d=b(o);ll(d),Bt(o,l=>L(r,l),()=>_(r));var s=T(o,2);{var f=l=>{var u=cl(),c=b(u);it(c,()=>t.children),Se(1,u,()=>_t,()=>({duration:150,y:5})),S(l,u)};q(s,l=>{_(n)&&l(f)})}M(()=>{Z(o,"aria-label",t.ariaLabel),Z(o,"aria-expanded",_(n))}),S(e,a),ie()}ue(["click"]);function fl(e,t,n){requestAnimationFrame(()=>t());const r=e.target;if(["BUTTON","INPUT"].includes(r.nodeName)||r.closest("button")||r.closest("input"))return;const i=n()[0];i&&i.scrollIntoView({behavior:"smooth"})}var vl=A('<span data-testid="length" class="svelte-1bz02u6"> </span>'),_l=A('<button class="context-menu-action svelte-1bz02u6">Remove</button>'),hl=(e,t)=>L(t,!_(t)),ml=A('<div class="actions svelte-1bz02u6"><button class="expand svelte-1bz02u6" aria-label="Expand"><!></button> <!></div>'),gl=A('<div class="expanded svelte-1bz02u6"><div class="label svelte-1bz02u6">Link URL</div> <!> <div class="label offset svelte-1bz02u6">Layout options</div> <div class="type-select svelte-1bz02u6"><!></div></div>'),pl=A('<div class="item svelte-1bz02u6"><div class="header svelte-1bz02u6"><img class="poster svelte-1bz02u6" alt=""> <div class="info"><div class="title svelte-1bz02u6"> </div> <div class="meta svelte-1bz02u6"><span class="svelte-1bz02u6"><!> 7.1</span> <span class="svelte-1bz02u6"> </span> <span class="svelte-1bz02u6"> </span> <!></div></div> <div class="context-menu svelte-1bz02u6"><!></div></div> <div class="content svelte-1bz02u6"><!> <!></div></div>');function yl(e,t){re(t,!0);const n=j(t,"linkInjection",15),r=j(t,"onremove",3,()=>null),i=j(t,"onhighlight",3,()=>null),a=X(()=>n()||{}),o=X(()=>_(a).key),d=X(()=>_(a).sentence),s=X(()=>_(a).title_details),f=X(()=>_(a).failed),l=X(()=>_(s));let u=$(!1),c=$(!1),h=$(null);at(()=>{_(f)&&Re(Pe.InjectionFailed,_(l),{phrase:n().title,sentence:_(d)})});function g(z=!0){y().forEach(J=>{J.classList.toggle("injection-highlight",z)})}function v(z){let K=z.target,J=K==null?void 0:K.dataset.playpilotInjectionKey;K&&!J&&(K=K.closest(`[data-playpilot-injection-key="${_(o)}"]`),J=K==null?void 0:K.dataset.playpilotInjectionKey),L(c,J===_(o)),_(h)&&_(c)&&i()(_(h))}function y(){return Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${_(o)}"]`))}var k=pl();he("mouseover",pe,v),k.__click=[fl,g,y];var w=b(k),p=b(w),E=T(p,2),x=b(E),C=b(x),R=T(x,2),P=b(R),H=b(P);gn(H);var W=T(P,2),ee=b(W),F=T(W,2),G=b(F),I=T(F,2);{var O=z=>{var K=vl(),J=b(K);M(()=>D(J,`${_(l).length??""}m`)),S(z,K)};q(I,z=>{_(l).length&&z(O)})}var V=T(E,2),Q=b(V);dl(Q,{ariaLabel:"More options",children:(z,K)=>{var J=_l();J.__click=function(...qe){var We;(We=r())==null||We.apply(this,qe)},S(z,J)},$$slots:{default:!0}});var ae=T(w,2),le=b(ae);{var Ie=z=>{xn(z,{children:(K,J)=>{var qe=Oe("A match was found, but the link could not be injected.");S(K,qe)},$$slots:{default:!0}})},te=z=>{var K=ml(),J=b(K);J.__click=[hl,u];var qe=b(J);Uo(qe,{get expanded(){return _(u)}});var We=T(J,2),Vt=X(()=>!n().inactive);nn(We,{label:"Visible",get active(){return _(Vt)},onclick:zt=>n(n().inactive=!zt,!0),children:(zt,Ql)=>{var Hr=Oe("Visible");S(zt,Hr)},$$slots:{default:!0}}),M(()=>Z(J,"aria-expanded",_(u))),S(z,K)};q(le,z=>{_(f)?z(Ie):z(te,!1)})}var oe=T(le,2);{var Le=z=>{var K=gl(),J=T(b(K),2);Sn(J,{label:"Playlink URL",get value(){return n().playpilot_url},set value(Vt){n(n().playpilot_url=Vt,!0)}});var qe=T(J,4),We=b(qe);il(We,{get linkInjection(){return n()}}),Se(3,K,()=>Pt,()=>({duration:100})),S(z,K)};q(oe,z=>{_(u)&&z(Le)})}Bt(k,z=>L(h,z),()=>_(h)),M(()=>{fe(k,"highlighted",_(c)),Z(p,"src",_(l).standing_poster),D(C,_(l).title),D(ee,_(l).year),D(G,_(l).type)}),he("mouseenter",k,()=>g(!0)),he("mouseleave",k,()=>g(!1)),Se(6,k,()=>Pt,()=>({duration:200})),S(e,k),ie()}ue(["click"]);var wl=A('<button class="drag-handle svelte-bwc0q8" aria-label="Move editor"></button>');function kl(e,t){re(t,!0);let n=j(t,"element",7),r=j(t,"position",23,()=>({x:0,y:0})),i=j(t,"limit",19,()=>({x:0,y:0})),a=j(t,"onchange",3,()=>null),o=!1,d={x:0,y:0},s=r();at(()=>{f(r().x,r().y)});function f(v,y){const k=window.innerWidth,w=window.innerHeight,p=n().clientWidth,E=n().clientHeight;v=Math.min(Math.max(v,i().x),k-p-i().x),y=Math.min(Math.max(y,i().y),w-E-i().y),n().style.right=v+"px",n().style.bottom=Math.max(y,i().y)+"px",r({x:v,y}),a()(r())}function l(v){var y,k;return{x:v.pageX||((y=v.touches)==null?void 0:y[0].pageX)||0,y:v.pageY||((k=v.touches)==null?void 0:k[0].pageY)||0}}function u(v){o=!0,d=l(v),s=r()}function c(v){if(!o)return;const y=l(v),k=y.x-d.x,w=y.y-d.y,p=s.x-k,E=s.y-w;f(p,E)}function h(){o&&(o=!1)}var g=wl();he("mousemove",pe,c),he("touchmove",pe,c,void 0,!0),he("mouseup",pe,h),he("touchend",pe,h),he("resize",pe,()=>f(r().x,r().y)),g.__mousedown=u,g.__touchstart=u,S(e,g),ie()}ue(["mousedown","touchstart"]);var bl=Ce('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Sl(e){var t=bl();S(e,t)}async function xl(e){const t=new Headers({"Content-Type":"application/json"}),n=kn();if(!n)throw new Error("No token was provided");const r=await fetch(_n+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!r.ok)throw r;return await r.json()}var El=Ce('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function Tl(e){var t=El();S(e,t)}var Cl=(e,t,n)=>t(_(n)),Al=A("<div> </div>"),Pl=e=>e.stopImmediatePropagation(),Il=A('<button class="item svelte-15ml41d"><img class="poster svelte-15ml41d" alt="" width="28" height="42"> <div class="content"><div class="name svelte-15ml41d"> </div> <div class="meta svelte-15ml41d"><div class="imdb svelte-15ml41d"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-15ml41d"><!></a></button>'),Ll=A('<em class="empty svelte-15ml41d">No results found</em>'),Ml=A('<div class="results svelte-15ml41d"></div>'),Nl=A('<div class="search svelte-15ml41d"><!> <!></div>');function jl(e,t){re(t,!0);let n=j(t,"onselect",3,()=>null),r=j(t,"query",15),i=$(Y([])),a=$(null),o=$(!1);Ot(()=>{r()&&d(r())});async function d(h){L(o,!0),L(a,null);try{L(i,Y(await xl(h)))}finally{L(o,!1)}}function s(h){r(h.title),L(a,Y(h)),n()(h)}var f=Nl(),l=b(f);Sn(l,{name:"search",label:"Search...",get value(){return r()},set value(h){r(h)}});var u=T(l,2);{var c=h=>{var g=Ml();$e(g,21,()=>_(i),v=>v.sid,(v,y)=>{var k=Il();k.__click=[Cl,s,y];var w=b(k),p=T(w,2),E=b(p),x=b(E),C=T(E,2),R=b(C),P=b(R);gn(P);var H=T(P),W=T(R,2),ee=b(W),F=T(W,2),G=b(F),I=T(F,2);{var O=ae=>{var le=Al(),Ie=b(le);M(()=>D(Ie,`${_(y).length??""} min`)),S(ae,le)};q(I,ae=>{_(y).length&&ae(O)})}var V=T(p,2);V.__click=[Pl];var Q=b(V);Tl(Q),M(()=>{Z(w,"src",_(y).standing_poster),D(x,_(y).title),D(H,` ${_(y).imdb_score??""}`),D(ee,_(y).year),D(G,_(y).type),Z(V,"href",`${Ar}/${_(y).type??""}/${_(y).slug??""}`)}),S(v,k)},v=>{var y=Qe(),k=ne(y);{var w=p=>{var E=Ll();S(p,E)};q(k,p=>{_(o)||p(w)})}S(v,y)}),S(h,g)};q(u,h=>{r()&&!_(a)&&h(c)})}S(e,f),ie()}ue(["click"]);function Ol(e,t,n,r,i,a){if(!_(t)||!_(n))return;const o=_(n).type==="movie"?"movie":"show",d=Ar+`/${o}/${_(n).slug}`,s={sid:_(n).sid,title:_(t),sentence:_(r),playpilot_url:d,key:qr(_(n).sid),title_details:_(n)};i.onsave(s),a()()}var Rl=A('<div class="error svelte-c3phlu"><!></div>'),ql=A('<section class="layout svelte-c3phlu"><div class="header svelte-c3phlu"><!> <h2 class="svelte-c3phlu">Add Playlink manually</h2></div> <p class="svelte-c3phlu">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-c3phlu">Selected text</label> <!> <!> <label for="text" class="svelte-c3phlu">Paired title</label> <!> <button class="save svelte-c3phlu">Add playlink</button></section>');function Hl(e,t){re(t,!0);let n=j(t,"htmlString",3,""),r=j(t,"onclose",3,()=>null),i=$(""),a=$(""),o=$(null),d=$(""),s=$("");at(f);function f(){const p=window.getSelection();if(!(p!=null&&p.anchorNode)||!wn().contains(p.anchorNode.parentElement))return;const E=p.toString().trim();if(!E)return;L(d,""),L(i,Y(E)),L(s,Y(_(i))),L(a,Y(l(p,E)));const x=p.getRangeAt(0).commonAncestorContainer.textContent,C=jr(n());(!x||!C.includes(x))&&L(d,"Selection was not inside of given content")}function l(p,E){const x=p.getRangeAt(0);let C=x.startContainer;if((C.textContent||"").length<=E.length*2&&x.startContainer.parentNode&&(C=x.startContainer.parentNode),!C)return"";const R=C.textContent||"",P=x.startOffset,H=x.endOffset,W=R.slice(0,P).lastIndexOf("."),ee=R.slice(H).search(/[.!?]/),F=W===-1?0:W+1,G=ee===-1?R.length:H+ee+1;return R.slice(F,G).trim()}var u=ql();he("mouseup",pe,f);var c=b(u),h=b(c);bn(h,{get onclick(){return r()},size:"24px",children:(p,E)=>{Sl(p)},$$slots:{default:!0}});var g=T(c,6);Sn(g,{get value(){return _(i)},label:"Select text on the page",name:"selected-text",readonly:!0});var v=T(g,2);{var y=p=>{var E=Rl(),x=b(E);xn(x,{children:(C,R)=>{var P=Oe();M(()=>D(P,_(d))),S(C,P)},$$slots:{default:!0}}),S(p,E)};q(v,p=>{_(d)&&p(y)})}var k=T(v,4);jl(k,{onselect:p=>L(o,Y(p)),get query(){return _(s)},set query(p){L(s,Y(p))}});var w=T(k,2);w.__click=[Ol,i,o,a,t,r],M(()=>w.disabled=!_(i)||!_(o)),S(e,u),ie()}ue(["click"]);async function Fl(e,t,n,r,i,a,o){try{L(t,!0),L(n,!1),r(await jo(r(),i())),L(a,Y(_(o)))}catch{L(n,!0)}finally{L(t,!1)}}var Dl=A('<div class="drag-handle svelte-1xio91e"><!></div>'),Bl=A('<div class="loading svelte-1xio91e">Loading...</div>'),Vl=A('<div class="bubble svelte-1xio91e"> </div> <!>',1),zl=A('<div class="error svelte-1xio91e"><!></div>'),$l=A("<div><!></div>"),Ul=A('<div class="empty svelte-1xio91e">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),Wl=A('<button class="save svelte-1xio91e"> </button>'),Kl=A('<!> <div class="items svelte-1xio91e"></div> <!>',1),Yl=A('<div class="panel svelte-1xio91e"><!></div>'),Gl=A('<section class="editor playpilot-styled-scrollbar svelte-1xio91e"><!> <header class="header svelte-1xio91e"><h1 class="svelte-1xio91e">Playlinks</h1> <!></header> <!> <!></section>');function Zl(e,t){re(t,!0);let n=j(t,"linkInjections",15),r=j(t,"htmlString",3,""),i=j(t,"loading",3,!1);const a="editor-position";let o=$(null),d=Y(JSON.parse(localStorage.getItem(a)||'{ "x": 0, "y": 0 }')),s=$(!1),f=$(!1),l=$(!1),u=$(0),c=$("");const h=X(()=>JSON.stringify(n())),g=X(()=>_(c)!==_(h));Ot(()=>{i()||ze(()=>L(c,Y(_(h))))});function v(I){localStorage.setItem(a,JSON.stringify(I))}function y(I){n(n().filter(O=>O.key!==I))}function k(I){if(!_(o))return;const O=I.offsetTop,V=O+I.offsetHeight,Q=_(o).scrollTop,ae=Q+_(o).clientHeight;O>=Q&&V<=ae||_(o).scrollTo({top:O-_(o).clientHeight/2,behavior:"smooth"})}function w(I){const O=I.target;L(u,Y(O.scrollTop))}var p=Gl(),E=b(p);{var x=I=>{var O=Dl(),V=b(O);kl(V,{get element(){return _(o)},get position(){return d},limit:{x:16,y:16},onchange:v}),S(I,O)};q(E,I=>{_(o)&&I(x)})}var C=T(E,2),R=T(b(C),2);{var P=I=>{var O=Bl();S(I,O)},H=I=>{var O=Vl(),V=ne(O),Q=b(V),ae=T(V,2);bn(ae,{onclick:()=>L(s,!0),size:"24px","aria-label":"Add manual injection",children:(le,Ie)=>{var te=Oe("+");S(le,te)},$$slots:{default:!0}}),M(()=>{Z(V,"aria-label",`${n().length??""} found playlinks`),D(Q,n().length)}),S(I,O)};q(R,I=>{i()?I(P):I(H,!1)})}var W=T(C,2);{var ee=I=>{var O=Kl(),V=ne(O);{var Q=te=>{var oe=zl(),Le=b(oe);xn(Le,{children:(z,K)=>{var J=Oe("Something went wrong, check your links below.");S(z,J)},$$slots:{default:!0}}),Se(7,oe,()=>Pt,()=>({duration:150})),S(te,oe)};q(V,te=>{_(l)&&te(Q)})}var ae=T(V,2);$e(ae,31,n,te=>te.key,(te,oe,Le)=>{var z=$l(),K=b(z);yl(K,{onremove:()=>y(_(oe).key),onhighlight:k,get linkInjection(){return n()[_(Le)]},set linkInjection(J){n(n()[_(Le)]=J,!0)}}),va(z,()=>Vo,()=>({duration:300})),S(te,z)},te=>{var oe=Ul();S(te,oe)});var le=T(ae,2);{var Ie=te=>{var oe=Wl();oe.__click=[Fl,f,l,n,r,c,h];var Le=b(oe);M(()=>{oe.disabled=_(f),D(Le,_(f)?"Saving...":"Save links")}),Se(3,oe,()=>_t,()=>({y:70,opacity:1,duration:200})),S(te,oe)};q(le,te=>{_(g)&&n().length&&te(Ie)})}S(I,O)};q(W,I=>{i()||I(ee)})}var F=T(W,2);{var G=I=>{var O=Yl(),V=b(O);Hl(V,{get htmlString(){return r()},onclose:()=>L(s,!1),onsave:Q=>n().push(Q)}),M(()=>vn(O,"top",`${_(u)??""}px`)),Se(3,O,()=>_t,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),S(I,O)};q(F,I=>{_(s)&&I(G)})}Bt(p,I=>L(o,I),()=>_(o)),M(()=>{fe(p,"panel-open",_(s)),fe(p,"loading",i())}),he("scroll",p,w),S(e,p),ie()}ue(["click"]);var Jl=A('<div class="playpilot-link-injections svelte-1ogu7vd"><!> <!></div>');function Xl(e,t){re(t,!0);const n=wn(),r=ko(n),i=r.map(p=>p.outerHTML).join(""),a=hn();let o=$(Y([])),d=$(null),s=$(!1),f=$(!0);Ot(()=>{a&&u()}),at(()=>(Re(Pe.ArticlePageView),l(),()=>tn()));async function l(){a&&L(s,Y(await Ir()));const p=await No(Or(),i)||[];L(o,Y(p.filter(E=>E.title_details))),c(),L(f,!1)}function u(){tn(),c()}function c(){if(!_(o).length)return;const p=bo(r,_(o),h);JSON.stringify(_(o))!==JSON.stringify(p)&&L(o,Y(p))}function h(p){L(d,Y(p))}var g=Jl(),v=b(g);{var y=p=>{Zl(p,{htmlString:i,get loading(){return _(f)},get linkInjections(){return _(o)},set linkInjections(E){L(o,Y(E))}})};q(v,p=>{a&&_(s)&&p(y)})}var k=T(v,2);{var w=p=>{Do(p,{get title(){return _(d).title_details},onclose:()=>L(d,null)})};q(k,p=>{_(d)&&_(d).title_details&&p(w)})}S(e,g),ie()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",language:null,app:null,initialize(e={token:"",selector:"",language:null,editorial_token:""}){if(!e.token){console.error("An API token is required.");return}this.token=e.token,this.editorial_token=e.editorial_token,this.selector=e.selector,this.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=fn(Xl,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),tn()}};
|
package/package.json
CHANGED
package/src/lib/api.js
CHANGED
|
@@ -77,6 +77,17 @@ export async function pollLinkInjections(url, html, pollInterval = 3000, maxTrie
|
|
|
77
77
|
return
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
// Temporary solution #2. If you're reading this weeks, months, or maybe even years from now, we've failed.
|
|
81
|
+
// Injections might be re-generated when a hash changes but injections do exist for the same url.
|
|
82
|
+
// In this case previous injections are returned while still generating new injections in the background.
|
|
83
|
+
// We ignore the upcoming re-generation and use the current injections instead.
|
|
84
|
+
if (response.injections_ready === false && response.link_injections?.length) {
|
|
85
|
+
response.link_injections = insertRandomKeys(response.link_injections)
|
|
86
|
+
|
|
87
|
+
resolve(response.link_injections || [])
|
|
88
|
+
return
|
|
89
|
+
}
|
|
90
|
+
|
|
80
91
|
if (response.injections_ready) {
|
|
81
92
|
if (response.link_injections) {
|
|
82
93
|
response.link_injections = insertRandomKeys(response.link_injections)
|
package/src/lib/linkInjection.js
CHANGED
|
@@ -4,6 +4,9 @@ import AfterArticlePlaylinks from '../routes/components/AfterArticlePlaylinks.sv
|
|
|
4
4
|
import { findTextNodeContaining, isNodeInLink, replaceStartingFrom } from './text'
|
|
5
5
|
import { getLargestValueInArray } from './array'
|
|
6
6
|
|
|
7
|
+
const keyDataAttribute = 'data-playpilot-injection-key'
|
|
8
|
+
const keySelector = `[${keyDataAttribute}]`
|
|
9
|
+
|
|
7
10
|
/** @type {Record<string, { injection: LinkInjection, component: object }>} */
|
|
8
11
|
const activePopovers = {}
|
|
9
12
|
/** @type {object | null} */
|
|
@@ -98,25 +101,31 @@ export function injectLinksInDocument(elements, injections, onclick) {
|
|
|
98
101
|
// Ignore if the found injection has no node or if it is inside a link.
|
|
99
102
|
if (!nodeContainingText || isNodeInLink(nodeContainingText)) continue
|
|
100
103
|
|
|
104
|
+
// Create a wrapper in which the link will be placed. This wrapper exists as a parent for the popover
|
|
105
|
+
// so that it is not directly inside of the link.
|
|
106
|
+
const linkWrapperElement = document.createElement('span')
|
|
107
|
+
linkWrapperElement.dataset.playpilotInjectionKey = injection.key
|
|
108
|
+
|
|
101
109
|
const linkElement = document.createElement('a')
|
|
102
110
|
linkElement.innerText = injection.title
|
|
103
111
|
linkElement.href = injection.playpilot_url
|
|
104
|
-
linkElement.dataset.playpilotInjectionKey = injection.key
|
|
105
112
|
linkElement.dataset.playpilotOriginalTitle = injection.title_details?.original_title
|
|
106
113
|
linkElement.target = '_blank'
|
|
107
114
|
linkElement.rel = 'noopener nofollow noreferrer'
|
|
108
115
|
|
|
116
|
+
linkWrapperElement.insertAdjacentElement('beforeend', linkElement)
|
|
117
|
+
|
|
109
118
|
// Replace starting from the end of the previously injected link, making sure injections with the same or overlapping
|
|
110
119
|
// phrases can still be injected.
|
|
111
120
|
const startingIndex = getLargestValueInArray(Object.values(ranges).filter(r => r.elementIndex === elementIndex).map(r => r.to))
|
|
112
|
-
element.innerHTML = replaceStartingFrom(element.innerHTML, injection.title,
|
|
121
|
+
element.innerHTML = replaceStartingFrom(element.innerHTML, injection.title, linkWrapperElement.outerHTML, startingIndex)
|
|
113
122
|
|
|
114
|
-
const from = element.innerHTML.indexOf(
|
|
123
|
+
const from = element.innerHTML.indexOf(linkWrapperElement.outerHTML)
|
|
115
124
|
|
|
116
125
|
ranges[injection.key] = {
|
|
117
126
|
elementIndex,
|
|
118
127
|
from,
|
|
119
|
-
to: from +
|
|
128
|
+
to: from + linkWrapperElement.outerHTML.length,
|
|
120
129
|
}
|
|
121
130
|
}
|
|
122
131
|
|
|
@@ -129,7 +138,7 @@ export function injectLinksInDocument(elements, injections, onclick) {
|
|
|
129
138
|
const sortedInjections = sortLinkInjectionsByRange(injections, ranges)
|
|
130
139
|
|
|
131
140
|
return sortedInjections.map(injection => {
|
|
132
|
-
const failed = !injection.inactive && !injection.after_article && !document.querySelector(`[
|
|
141
|
+
const failed = !injection.inactive && !injection.after_article && !document.querySelector(`[${keyDataAttribute}="${injection.key}"]`)
|
|
133
142
|
|
|
134
143
|
return {
|
|
135
144
|
...injection,
|
|
@@ -146,7 +155,7 @@ export function injectLinksInDocument(elements, injections, onclick) {
|
|
|
146
155
|
* @returns {void}
|
|
147
156
|
*/
|
|
148
157
|
function addCSSVariablesToLinks() {
|
|
149
|
-
const createdLinkElements = /** @type {HTMLElement[]} */ (Array.from(document.querySelectorAll(
|
|
158
|
+
const createdLinkElements = /** @type {HTMLElement[]} */ (Array.from(document.querySelectorAll(`${keySelector} a`)))
|
|
150
159
|
|
|
151
160
|
const variables = [
|
|
152
161
|
'--playpilot-injection-text-color',
|
|
@@ -174,20 +183,33 @@ function addCSSVariablesToLinks() {
|
|
|
174
183
|
* @returns {void}
|
|
175
184
|
*/
|
|
176
185
|
function addLinkInjectionEventListeners(injections, onclick) {
|
|
177
|
-
|
|
186
|
+
// Open modal on click
|
|
187
|
+
window.addEventListener('click', (event) => {
|
|
188
|
+
const target = /** @type {HTMLElement | null} */ (event.target)
|
|
189
|
+
if (!target?.parentElement) return
|
|
190
|
+
|
|
191
|
+
const key = target.parentElement.getAttribute(keyDataAttribute)
|
|
192
|
+
if (!key) return
|
|
193
|
+
|
|
194
|
+
const injection = injections.find(injection => key === injection.key)
|
|
195
|
+
if (!injection) return
|
|
196
|
+
|
|
197
|
+
openLinkModal(event, injection, onclick)
|
|
198
|
+
})
|
|
178
199
|
|
|
179
|
-
|
|
200
|
+
const createdInjectionElements = document.querySelectorAll(keySelector)
|
|
201
|
+
|
|
202
|
+
// Open and close popover on mouseenter/mouseleave
|
|
203
|
+
createdInjectionElements.forEach((injectionElement) => {
|
|
180
204
|
// @ts-ignore
|
|
181
|
-
const key =
|
|
205
|
+
const key = injectionElement.dataset.playpilotInjectionKey
|
|
182
206
|
const injection = injections.find(injection => key === injection.key)
|
|
183
207
|
|
|
184
208
|
if (!injection) return
|
|
185
209
|
|
|
186
210
|
// @ts-ignore
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
linkElement.addEventListener('mouseenter', (event) => openLinkPopover(event, injection))
|
|
190
|
-
linkElement.addEventListener('mouseleave', () => destroyLinkPopover(injection))
|
|
211
|
+
injectionElement.addEventListener('mouseenter', (event) => openLinkPopover(event, injection))
|
|
212
|
+
injectionElement.addEventListener('mouseleave', () => destroyLinkPopover(injection))
|
|
191
213
|
})
|
|
192
214
|
}
|
|
193
215
|
|
|
@@ -204,10 +226,6 @@ function openLinkModal(event, injection, onclick) {
|
|
|
204
226
|
|
|
205
227
|
event.preventDefault()
|
|
206
228
|
|
|
207
|
-
// Don't open modal if click happened inside of popover.
|
|
208
|
-
const target = /** @type {Element} */ (event.target)
|
|
209
|
-
if (target.closest('.popover')) return
|
|
210
|
-
|
|
211
229
|
onclick(injection)
|
|
212
230
|
destroyLinkPopover(injection)
|
|
213
231
|
}
|
|
@@ -259,7 +277,7 @@ function clearAfterArticlePlaylinks() {
|
|
|
259
277
|
if (!afterArticlePlaylinkInsertedComponent) return
|
|
260
278
|
|
|
261
279
|
unmount(afterArticlePlaylinkInsertedComponent)
|
|
262
|
-
document.querySelector('[data-playpilot-after-article-playlinks')?.remove()
|
|
280
|
+
document.querySelector('[data-playpilot-after-article-playlinks]')?.remove()
|
|
263
281
|
}
|
|
264
282
|
|
|
265
283
|
/**
|
|
@@ -268,7 +286,7 @@ function clearAfterArticlePlaylinks() {
|
|
|
268
286
|
export function clearLinkInjections() {
|
|
269
287
|
Object.values(activePopovers).forEach(popover => destroyLinkPopover(popover.injection))
|
|
270
288
|
|
|
271
|
-
const elements = document.querySelectorAll(
|
|
289
|
+
const elements = document.querySelectorAll(keySelector)
|
|
272
290
|
elements.forEach((element /** @type {HTMLAnchorElement} */) => element.outerHTML = element.textContent || '')
|
|
273
291
|
|
|
274
292
|
Object.values(activePopovers).forEach(({ injection }) => destroyLinkPopover(injection, false))
|
|
@@ -282,7 +300,7 @@ export function clearLinkInjections() {
|
|
|
282
300
|
*/
|
|
283
301
|
export function clearLinkInjection(key) {
|
|
284
302
|
/** @type {HTMLAnchorElement | null} */
|
|
285
|
-
const element = document.querySelector(`[
|
|
303
|
+
const element = document.querySelector(`[${keyDataAttribute}="${key}"]`)
|
|
286
304
|
if (element) element.outerHTML = element.textContent || ''
|
|
287
305
|
}
|
|
288
306
|
|
package/src/lib/scss/global.scss
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
Styling for individual CSS variables, with a selector for each variable.
|
|
45
45
|
This is very verbose, but necessary in order to only use the CSS variable when they are actually set.
|
|
46
46
|
*/
|
|
47
|
-
[data-playpilot-injection-key] {
|
|
47
|
+
[data-playpilot-injection-key] a {
|
|
48
48
|
&[data-used-css-variables*="--playpilot-injection-font-weight"] {
|
|
49
49
|
font-weight: var(--playpilot-injection-font-weight);
|
|
50
50
|
}
|
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
import PlaylinkTypeSelect from './PlaylinkTypeSelect.svelte'
|
|
8
8
|
import Alert from './Alert.svelte'
|
|
9
9
|
import ContextMenu from '../ContextMenu.svelte'
|
|
10
|
+
import { onMount } from 'svelte'
|
|
11
|
+
import { track } from '$lib/tracking'
|
|
12
|
+
import { TrackingEvent } from '$lib/enums/TrackingEvent'
|
|
10
13
|
|
|
11
14
|
/** @type {{ linkInjection: LinkInjection, onremove?: () => void, onhighlight?: (element: HTMLElement) => void }} */
|
|
12
15
|
const { linkInjection = $bindable(), onremove = () => null, onhighlight = () => null } = $props()
|
|
13
16
|
|
|
14
|
-
const { key, title_details, failed } = $derived(linkInjection || {})
|
|
17
|
+
const { key, sentence, title_details, failed } = $derived(linkInjection || {})
|
|
15
18
|
|
|
16
19
|
/** @type {TitleData} */
|
|
17
20
|
// @ts-ignore Definitely not null
|
|
@@ -22,6 +25,10 @@
|
|
|
22
25
|
/** @type {HTMLElement | null} */
|
|
23
26
|
let element = $state(null)
|
|
24
27
|
|
|
28
|
+
onMount(() => {
|
|
29
|
+
if (failed) track(TrackingEvent.InjectionFailed, title, { phrase: linkInjection.title, sentence })
|
|
30
|
+
})
|
|
31
|
+
|
|
25
32
|
/**
|
|
26
33
|
* Highlight links beloning to this item in the article itself.
|
|
27
34
|
* @param {boolean} state
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
&:is(button):hover {
|
|
42
42
|
cursor: pointer;
|
|
43
43
|
filter: var(--playpilot-genre-hover-filter, brightness(1.1));
|
|
44
|
-
background: var(--playpilot-genre-hover-background, var(--playpilot-genre-background));
|
|
44
|
+
background: var(--playpilot-genre-hover-background, var(--playpilot-genre-background, var(--playpilot-content)));
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
</style>
|
|
@@ -92,6 +92,10 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.close {
|
|
95
|
+
--playpilot-button-background: var(--playpilot-modal-close-button-background, var(--playpilot-content));
|
|
96
|
+
--playpilot-button-shadow: var(--playpilot-modal-close-button-shadow, var(--playpilot-shadow));
|
|
97
|
+
--playpilot-button-padding: var(--playpilot-modal-close-button-padding, 0.5rem);
|
|
98
|
+
--playpilot-button-text-color: var(--playpilot-modal-close-button-text-color, var(--playpilot-text-color-alt));
|
|
95
99
|
z-index: 5;
|
|
96
100
|
position: absolute;
|
|
97
101
|
top: margin(1);
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
height: var(--size);
|
|
24
24
|
border-radius: 50%;
|
|
25
25
|
border: 0;
|
|
26
|
-
padding: 0;
|
|
26
|
+
padding: var(--playpilot-button-padding, 0);
|
|
27
27
|
background: var(--playpilot-button-background, var(--playpilot-content));
|
|
28
28
|
box-shadow: var(--playpilot-button-shadow, var(--playpilot-shadow));
|
|
29
29
|
color: var(--playpilot-button-text-color, var(--playpilot-text-color-alt));
|
|
@@ -392,7 +392,7 @@ describe('linkInjection.js', () => {
|
|
|
392
392
|
const mock = vi.fn()
|
|
393
393
|
injectLinksInDocument(elements, linkInjections, mock)
|
|
394
394
|
|
|
395
|
-
const link = /** @type {HTMLAnchorElement} */ (document.querySelector('
|
|
395
|
+
const link = /** @type {HTMLAnchorElement} */ (document.querySelector('[data-playpilot-injection-key]'))
|
|
396
396
|
|
|
397
397
|
await fireEvent.mouseEnter(link)
|
|
398
398
|
expect(mount).toHaveBeenCalled()
|
|
@@ -424,7 +424,7 @@ describe('linkInjection.js', () => {
|
|
|
424
424
|
|
|
425
425
|
injectLinksInDocument(elements, linkInjections, () => null)
|
|
426
426
|
|
|
427
|
-
const links = /** @type {HTMLAnchorElement[]} */ (Array.from(document.querySelectorAll('
|
|
427
|
+
const links = /** @type {HTMLAnchorElement[]} */ (Array.from(document.querySelectorAll('[data-playpilot-injection-key]')))
|
|
428
428
|
|
|
429
429
|
expect(links).toHaveLength(2)
|
|
430
430
|
expect(links[0].dataset.playpilotInjectionKey).toBe('some-key')
|
|
@@ -4,6 +4,11 @@ import { describe, expect, it, vi } from 'vitest'
|
|
|
4
4
|
import EditorItem from '../../../../routes/components/Editorial/EditorItem.svelte'
|
|
5
5
|
import { injectLinksInDocument } from '$lib/linkInjection'
|
|
6
6
|
import { title } from '$lib/fakeData'
|
|
7
|
+
import { track } from '$lib/tracking'
|
|
8
|
+
|
|
9
|
+
vi.mock('$lib/tracking', () => ({
|
|
10
|
+
track: vi.fn(),
|
|
11
|
+
}))
|
|
7
12
|
|
|
8
13
|
describe('EditorItem.svelte', () => {
|
|
9
14
|
const linkInjection = {
|
|
@@ -30,10 +35,10 @@ describe('EditorItem.svelte', () => {
|
|
|
30
35
|
const { getAllByText, container } = render(EditorItem, { linkInjection })
|
|
31
36
|
|
|
32
37
|
await fireEvent.mouseEnter(/** @type {HTMLElement} */ (container.querySelector('.item')))
|
|
33
|
-
expect(getAllByText(linkInjection.title)[0].classList).toContain('injection-highlight')
|
|
38
|
+
expect(/** @type {HTMLElement} */ (getAllByText(linkInjection.title)[0].closest('span')).classList).toContain('injection-highlight')
|
|
34
39
|
|
|
35
40
|
await fireEvent.mouseLeave(/** @type {HTMLElement} */ (container.querySelector('.item')))
|
|
36
|
-
expect(getAllByText(linkInjection.title)[0].classList).not.toContain('injection-highlight')
|
|
41
|
+
expect(/** @type {HTMLElement} */ (getAllByText(linkInjection.title)[0].closest('span')).classList).not.toContain('injection-highlight')
|
|
37
42
|
})
|
|
38
43
|
|
|
39
44
|
it('Should highlight multiple elements if multiple are present', async () => {
|
|
@@ -113,6 +118,7 @@ describe('EditorItem.svelte', () => {
|
|
|
113
118
|
|
|
114
119
|
expect(getByText('the link could not be injected', { exact: false })).toBeTruthy()
|
|
115
120
|
expect(queryByLabelText('Expand')).not.toBeTruthy()
|
|
121
|
+
expect(track).toHaveBeenCalled()
|
|
116
122
|
})
|
|
117
123
|
|
|
118
124
|
it('Should show length of title if length is given', () => {
|