@playpilot/tpi 3.2.1 → 3.2.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
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css?family=Poppins:400,600,700";.popover.svelte-qkpa3e{--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.svelte-qkpa3e svg{fill:none}.popover.flip.svelte-qkpa3e{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-qkpa3e{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)))}img.svelte-1itidbd{border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-1itidbd{height:40px;width:40px}}.heading.svelte-1itidbd{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}.playlinks.svelte-1itidbd{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-1itidbd::-webkit-scrollbar{display:none}.list.svelte-1itidbd{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-1itidbd img:where(.svelte-1itidbd){height:32px;width:32px}}.playlink.svelte-1itidbd{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-1itidbd:hover,.playlink.svelte-1itidbd:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)))!important;text-decoration:none!important}.playlink.svelte-1itidbd img:where(.svelte-1itidbd){margin:0}.list.svelte-1itidbd .playlink:where(.svelte-1itidbd){padding:8px;gap:8px}.name.svelte-1itidbd{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-1itidbd{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-1itidbd{white-space:initial;line-height:1.35}.arrow.svelte-1itidbd{margin-left:auto;padding:0 8px}.paragraph.svelte-1u3je71{display:block;margin:16px 0 0}.show-more.svelte-1u3je71{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-1u3je71: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}.heading.svelte-16h1v3j{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-16h1v3j .heading:where(.svelte-16h1v3j){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-16h1v3j .heading:where(.svelte-16h1v3j){margin-top:0}.content.svelte-16h1v3j{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-16h1v3j{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-16h1v3j{padding:32px 0 16px;background:transparent}.small.svelte-16h1v3j .header:where(.svelte-16h1v3j){padding-top:16px}.compact.svelte-16h1v3j .header:where(.svelte-16h1v3j){padding:0 0 16px}.top.svelte-16h1v3j{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-16h1v3j{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));opacity:0}.poster.loaded.svelte-16h1v3j{opacity:1}.info.svelte-16h1v3j{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-16h1v3j .info:where(.svelte-16h1v3j){gap:8px 12px}.imdb.svelte-16h1v3j{display:flex;align-items:center;gap:4px}.imdb.svelte-16h1v3j svg{margin-top:-2px}.small.svelte-16h1v3j .imdb:where(.svelte-16h1v3j) svg{margin-top:0;width:12px;height:12px}.background.svelte-16h1v3j{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter));z-index:0}.background.svelte-16h1v3j: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%);z-index:1}.background.svelte-16h1v3j img:where(.svelte-16h1v3j){width:100%;height:100%;object-fit:cover;object-position:center;margin:0;opacity:0;z-index:0}.background.svelte-16h1v3j img.loaded:where(.svelte-16h1v3j){opacity:1}.background.svelte-16h1v3j img.blur:where(.svelte-16h1v3j){opacity:.5;transform:scale(1.1);filter:blur(.75rem)}.faded.svelte-16h1v3j{opacity:.15}.capitalize.svelte-16h1v3j{text-transform:capitalize}.truncate.svelte-16h1v3j{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}p.svelte-pfvkex{font-weight:var(--playpilot-after-article-text-font-weight, normal)}span.svelte-pfvkex{display:block}button.svelte-pfvkex{-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-pfvkex: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-wrncjp{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-wrncjp{padding:32px}}.modal.svelte-wrncjp svg{fill:none}.dialog.svelte-wrncjp{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-wrncjp{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-wrncjp{position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-wrncjp{--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-wrncjp: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}.alert.svelte-18si0a5{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px}.alert.warning.svelte-18si0a5{border-color:var(--playpilot-warning);background:var(--playpilot-warning-dark)}.alert.svelte-18si0a5 a{color:currentColor}.switches.svelte-1shw34x{display:flex;flex-direction:column;gap:12px}button.svelte-1shw34x{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-1shw34x:hover,button.active.svelte-1shw34x{color:var(--playpilot-text-color)}.group.svelte-1shw34x{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-1shw34x{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-1shw34x{left:calc(50% + 4px)}.label.svelte-1shw34x{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1shw34x{margin-top:8px}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-8gd2db{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-8gd2db:hover,.item.highlighted.svelte-8gd2db{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-8gd2db{outline:2px solid var(--playpilot-primary)}.header.svelte-8gd2db{display:flex;gap:16px;width:100%}.poster.svelte-8gd2db{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.inactive.svelte-8gd2db .poster:where(.svelte-8gd2db){opacity:.35}.title.svelte-8gd2db{font-size:14px;word-break:break-word}.sentence.svelte-8gd2db{font-size:.7em;line-height:150%;margin-right:-8px;color:var(--playpilot-text-color-alt);opacity:.75}.sentence.svelte-8gd2db em{color:var(--playpilot-text-color);font-weight:700}.expand-sentence.svelte-8gd2db{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;margin:0;background:transparent;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;font-style:italic;text-decoration:underline}.expand-sentence.svelte-8gd2db:hover{color:var(--playpilot-text-color)}.content.svelte-8gd2db{padding-top:8px}.inactive.svelte-8gd2db .info:where(.svelte-8gd2db){opacity:.35}.context-menu.svelte-8gd2db{margin:0 -4px 0 auto}.context-menu-action.svelte-8gd2db{-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-8gd2db:hover{color:var(--playpilot-text-color)}.actions.svelte-8gd2db{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-8gd2db{-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-8gd2db:hover{filter:brightness(1.2)}.expanded.svelte-8gd2db{padding-top:16px}.type-select.svelte-8gd2db{margin-top:8px}.label.svelte-8gd2db{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-8gd2db{margin-top:12px}.warning.svelte-8gd2db{margin:0 auto 0 8px}.warning.svelte-8gd2db svg{display:block}.drag-handle.svelte-19mcc5g{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:8px;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-19mcc5g:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-19mcc5g:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-19mcc5g:active{cursor:grabbing}.drag-handle.svelte-19mcc5g:before{display:block;content:"";position:absolute;top:20%;right:0;bottom:60%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.resize-handle.svelte-sxkuxk{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:0;width:100%;height:8px;background:transparent;border:0;cursor:ns-resize}.resize-handle.svelte-sxkuxk:hover:before{opacity:.65;transform:scale(1.05)}.resize-handle.svelte-sxkuxk:active:before{opacity:.9;transform:scale(.95)}.resize-handle.svelte-sxkuxk:active{cursor:grabbing}.resize-handle.svelte-sxkuxk:before{display:block;content:"";position:absolute;top:0;right:20%;left:20%;bottom:80%;border-radius:0 0 16px 16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.item.svelte-rjq94e{-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;font-size:13.6px}.item.hoverable.svelte-rjq94e{cursor:pointer}.item.hoverable.svelte-rjq94e:hover{background:var(--playpilot-lighter)}.item.svelte-rjq94e:last-child{border-bottom:0}.poster.svelte-rjq94e{flex:0 0 auto;height:auto;width:28px;aspect-ratio:28/42;border-radius:4px;background:var(--playpilot-content)}.name.svelte-rjq94e{color:var(--playpilot-text-color)}.meta.svelte-rjq94e{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-rjq94e{display:flex;align-items:center;gap:4px}.open-in-new-tab.svelte-rjq94e{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-rjq94e:hover{color:vaR(--playpilot-text-color)}.search.svelte-1olb8n0{position:relative}.results.svelte-1olb8n0{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}.empty.svelte-1olb8n0{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.selected.svelte-1olb8n0{margin:8px 0;border-radius:.5rem;border:2px solid var(--playpilot-green)}p.svelte-1i8p6op,label.svelte-1i8p6op{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-1i8p6op{display:block;margin-top:16px}.layout.svelte-1i8p6op{height:100%;display:flex;flex-direction:column;margin:0}.header.svelte-1i8p6op{display:flex;align-items:center;gap:8px;margin-bottom:16px}.heading.svelte-1i8p6op{margin:0;color:var(--playpilot-text-color);font-size:16px;line-height:normal;font-weight:400}.error.svelte-1i8p6op{margin-top:8px}.save.svelte-1i8p6op{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-green);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color)}.save.svelte-1i8p6op:not([disabled]):hover{outline:2px solid currentColor}.save[disabled].svelte-1i8p6op{cursor:default;background:var(--playpilot-light);opacity:.5;color:var(--playpilot-text-color-alt)}a.svelte-1l4sxuh{color:currentColor}.ai-indicator.svelte-1l4sxuh{position:relative;margin:0 8px}.content.svelte-1l4sxuh{position:relative;display:flex;gap:8px;background:var(--playpilot-light);padding:8px;margin:2px;border-radius:.5rem;font-size:12px;line-height:1.5;z-index:1;color:var(--playpilot-text-color-alt);overflow:hidden}.message.svelte-1l4sxuh{display:flex;margin-top:4px;font-style:italic}.icon.svelte-1l4sxuh{color:var(--playpilot-green)}.border.svelte-1l4sxuh{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:.5rem;background:var(--playpilot-green);overflow:hidden;transition:background-color .5s}.running.svelte-1l4sxuh .border:where(.svelte-1l4sxuh){background:var(--playpilot-light)}@keyframes svelte-1l4sxuh-rotate{to{rotate:360deg}}.animator.svelte-1l4sxuh{position:absolute;left:50%;top:50%;transform:translateY(-50%);width:100%;height:20rem;background:var(--playpilot-green);transform-origin:left 50%;animation:svelte-1l4sxuh-rotate 2s infinite linear;filter:blur(5rem)}.loading-bar.svelte-1l4sxuh{display:grid;grid-template-columns:auto 3em;align-items:center}.loading-bar-progress.svelte-1l4sxuh{height:.5em;border-radius:.25rem;background:var(--playpilot-dark)}.loading-bar-fill.svelte-1l4sxuh{height:100%;border-radius:.25rem;background:var(--playpilot-green);transition:width .2s}.loading-bar-label.svelte-1l4sxuh{text-align:right}@keyframes svelte-1l4sxuh-fade{0%,to{opacity:0}25%,75%{opacity:1}}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh){animation:svelte-1l4sxuh-fade 2s infinite}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh):nth-child(1){animation-delay:.2s}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh):nth-child(2){animation-delay:.4s}.ellipses.svelte-1l4sxuh span:where(.svelte-1l4sxuh):nth-child(3){animation-delay:.6s}.editor.svelte-1b2vpoj{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:352px;height:min(70vh,640px);min-height:10rem;margin:0;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}.editor.svelte-1b2vpoj svg{fill:none}.panel-open.svelte-1b2vpoj{overflow:hidden}.loading.svelte-1b2vpoj{height:auto;min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.handles.svelte-1b2vpoj,.header.svelte-1b2vpoj{z-index:20;position:sticky;top:-16px;margin:-16px -16px 0}.handle.svelte-1b2vpoj{opacity:0;transition:opacity .15s}.editor.svelte-1b2vpoj:hover .handle:where(.svelte-1b2vpoj){opacity:1}.header.svelte-1b2vpoj{z-index:5;display:flex;align-items:center;padding:16px 16px 16px 24px;margin:0 -16px;border:0;background:var(--playpilot-dark)}.loading.svelte-1b2vpoj .header:where(.svelte-1b2vpoj){margin:-16px}.heading.svelte-1b2vpoj{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.bubble.svelte-1b2vpoj{-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-1b2vpoj{padding-top:8px;margin-bottom:auto}.empty.svelte-1b2vpoj{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-1b2vpoj{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);font-size:.85rem;cursor:pointer}.save.svelte-1b2vpoj:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-1b2vpoj{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-1b2vpoj{margin-top:8px}.alert.svelte-1b2vpoj{margin:0 8px 8px}.panel.svelte-1b2vpoj{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}.trigger.svelte-qee95d{position:fixed;bottom:16px;right:16px}.button.svelte-qee95d{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:48px;height:48px;border:0;padding:12px;border-radius:50%;background:var(--playpilot-light);box-shadow:var(--playpilot-shadow-large);transition:transform 50ms;line-height:24px;text-align:center;font-size:13.6px}.button.svelte-qee95d:hover{filter:brightness(1.1);transform:scale(1.05)}.button.svelte-qee95d svg{width:100%}.close.svelte-qee95d{display:flex;text-align:center;justify-content:center;position:absolute;top:-8px;right:-8px;width:24px;height:24px;padding:4px;background:var(--playpilot-content);color:#fff}.close.svelte-qee95d svg{width:12px}: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;--playpilot-warning: #f7c74e;--playpilot-warning-dark: #413c23}[data-playpilot-injection-key]{position:relative}.playpilot-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-4l9ehd *{box-sizing:border-box}.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections button,.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections input{transition:outline-offset .1s}.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections button:focus-visible,.playpilot-link-injections.svelte-4l9ehd .playpilot-link-injections input:focus-visible{outline:2px solid white;outline-offset:2px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
3
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();const wn=!1;var Nn=Array.isArray,Ar=Array.prototype.indexOf,Ln=Array.from,Ir=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,pi=Object.getOwnPropertyDescriptors,Cr=Object.prototype,Pr=Array.prototype,Mn=Object.getPrototypeOf;function _t(e){return typeof e=="function"}const Ne=()=>{};function jr(e){for(var t=0;t<e.length;t++)e[t]()}function $t(e,t,n=!1){return e===void 0?n?t():t:e}const Le=2,yi=4,Mt=8,Qt=16,De=32,Dt=64,kn=128,lt=256,Zt=512,we=1024,et=2048,en=4096,Re=8192,wt=16384,wi=32768,kt=65536,Nr=1<<17,Lr=1<<19,ki=1<<20,Xe=Symbol("$state"),bi=Symbol("legacy props"),Mr=Symbol("");function xi(e){return e===this.v}function tn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Dr(e,t){return e!==t}function Dn(e){return!tn(e,this.v)}function Or(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Rr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Hr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Fr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Br(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Vr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ur(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Wr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let bt=!1,Kr=!1;function zr(){bt=!0}const On=1,Rn=2,Si=4,Yr=8,$r=16,Zr=1,Gr=2,Jr=4,Xr=8,Qr=16,ea=1,ta=2,na=4,ia=1,ra=2,ve=Symbol(),Ei="http://www.w3.org/2000/svg";function pe(e,t){var n={f:0,v:e,reactions:null,equals:xi,rv:0,wv:0};return n}function z(e){return aa(pe(e))}function Ti(e,t=!1){var i;const n=pe(e);return t||(n.equals=Dn),bt&&Q!==null&&Q.l!==null&&((i=Q.l).s??(i.s=[])).push(n),n}function aa(e){return J!==null&&J.f&Le&&(He===null?ma([e]):He.push(e)),e}function N(e,t){return J!==null&&Ft()&&J.f&(Le|Qt)&&(He===null||!He.includes(e))&&Wr(),bn(e,t)}function bn(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=Wi(),Ai(e,et),Ft()&&K!==null&&K.f&we&&!(K.f&De)&&(de!==null&&de.includes(e)?(qe(K,et),ln(K)):Qe===null?pa([e]):Qe.push(e))),t}function Ai(e,t){var n=e.reactions;if(n!==null)for(var i=Ft(),r=n.length,a=0;a<r;a++){var o=n[a],l=o.f;l&et||!i&&o===K||(qe(o,t),l&(we|lt)&&(l&Le?Ai(o,en):ln(o)))}}let Ii=!1;function Z(e,t=null,n){if(typeof e!="object"||e===null||Xe in e)return e;const i=Mn(e);if(i!==Cr&&i!==Pr)return e;var r=new Map,a=Nn(e),o=pe(0);a&&r.set("length",pe(e.length));var l;return new Proxy(e,{defineProperty(d,u,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Br();var c=r.get(u);return c===void 0?(c=pe(f.value),r.set(u,c)):N(c,Z(f.value,l)),!0},deleteProperty(d,u){var f=r.get(u);if(f===void 0)u in d&&r.set(u,pe(ve));else{if(a&&typeof u=="string"){var c=r.get("length"),h=Number(u);Number.isInteger(h)&&h<c.v&&N(c,h)}N(f,ve),Qn(o)}return!0},get(d,u,f){var m;if(u===Xe)return e;var c=r.get(u),h=u in d;if(c===void 0&&(!h||(m=Je(d,u))!=null&&m.writable)&&(c=pe(Z(h?d[u]:ve,l)),r.set(u,c)),c!==void 0){var g=s(c);return g===ve?void 0:g}return Reflect.get(d,u,f)},getOwnPropertyDescriptor(d,u){var f=Reflect.getOwnPropertyDescriptor(d,u);if(f&&"value"in f){var c=r.get(u);c&&(f.value=s(c))}else if(f===void 0){var h=r.get(u),g=h==null?void 0:h.v;if(h!==void 0&&g!==ve)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return f},has(d,u){var g;if(u===Xe)return!0;var f=r.get(u),c=f!==void 0&&f.v!==ve||Reflect.has(d,u);if(f!==void 0||K!==null&&(!c||(g=Je(d,u))!=null&&g.writable)){f===void 0&&(f=pe(c?Z(d[u],l):ve),r.set(u,f));var h=s(f);if(h===ve)return!1}return c},set(d,u,f,c){var S;var h=r.get(u),g=u in d;if(a&&u==="length")for(var m=f;m<h.v;m+=1){var v=r.get(m+"");v!==void 0?N(v,ve):m in d&&(v=pe(ve),r.set(m+"",v))}h===void 0?(!g||(S=Je(d,u))!=null&&S.writable)&&(h=pe(void 0),N(h,Z(f,l)),r.set(u,h)):(g=h.v!==ve,N(h,Z(f,l)));var p=Reflect.getOwnPropertyDescriptor(d,u);if(p!=null&&p.set&&p.set.call(c,f),!g){if(a&&typeof u=="string"){var y=r.get("length"),w=Number(u);Number.isInteger(w)&&w>=y.v&&N(y,w+1)}Qn(o)}return!0},ownKeys(d){s(o);var u=Reflect.ownKeys(d).filter(h=>{var g=r.get(h);return g===void 0||g.v!==ve});for(var[f,c]of r)c.v!==ve&&!(f in d)&&u.push(f);return u},setPrototypeOf(){Vr()}})}function Qn(e,t=1){N(e,e.v+t)}var fe,Ci,Pi;function oa(){if(fe===void 0){fe=window;var e=Element.prototype,t=Node.prototype;Ci=Je(t,"firstChild").get,Pi=Je(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 Ot(e=""){return document.createTextNode(e)}function at(e){return Ci.call(e)}function nn(e){return Pi.call(e)}function b(e,t){return at(e)}function te(e,t){{var n=at(e);return n instanceof Comment&&n.data===""?nn(n):n}}function T(e,t=1,n=!1){let i=e;for(;t--;)i=nn(i);return i}function la(e){e.textContent=""}function W(e){var t=Le|et;K===null?t|=lt:K.f|=ki;var n=J!==null&&J.f&Le?J:null;const i={children:null,ctx:Q,deps:null,equals:xi,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??K};return n!==null&&(n.children??(n.children=[])).push(i),i}function sa(e){const t=W(e);return t.equals=Dn,t}function ji(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var i=t[n];i.f&Le?Hn(i):Me(i)}}}function ca(e){for(var t=e.parent;t!==null;){if(!(t.f&Le))return t;t=t.parent}return null}function Ni(e){var t,n=K;Ie(ca(e));try{ji(e),t=Ki(e)}finally{Ie(n)}return t}function Li(e){var t=Ni(e),n=(rt||e.f<)&&e.deps!==null?en:we;qe(e,n),e.equals(t)||(e.v=t,e.wv=Wi())}function Hn(e){ji(e),Pt(e,0),qe(e,wt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function ua(e){K===null&&J===null&&Hr(),J!==null&&J.f<&&Rr(),Bn&&Or()}function da(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function xt(e,t,n,i=!0){var r=(e&Dt)!==0,a=K,o={ctx:Q,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|et,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var l=ht;try{ei(!0),on(o),o.f|=wi}catch(f){throw Me(o),f}finally{ei(l)}}else t!==null&&ln(o);var d=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&ki)===0;if(!d&&!r&&i&&(a!==null&&da(o,a),J!==null&&J.f&Le)){var u=J;(u.children??(u.children=[])).push(o)}return o}function fa(e){const t=xt(Mt,null,!1);return qe(t,we),t.teardown=e,t}function rn(e){ua();var t=K!==null&&(K.f&De)!==0&&Q!==null&&!Q.m;if(t){var n=Q;(n.e??(n.e=[])).push({fn:e,effect:K,reaction:J})}else{var i=Rt(e);return i}}function va(e){const t=xt(Dt,e,!0);return(n={})=>new Promise(i=>{n.outro?mt(t,()=>{Me(t),i(void 0)}):(Me(t),i(void 0))})}function Rt(e){return xt(yi,e,!1)}function Fn(e){return xt(Mt,e,!0)}function M(e){return st(e)}function st(e,t=0){return xt(Mt|Qt|t,e,!0)}function Ke(e,t=!0){return xt(Mt|De,e,!0,t)}function Mi(e){var t=e.teardown;if(t!==null){const n=Bn,i=J;ti(!0),Fe(null);try{t.call(null)}finally{ti(n),Fe(i)}}}function Di(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)Hn(t[n])}}function Oi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;Me(n,t),n=i}}function _a(e){for(var t=e.first;t!==null;){var n=t.next;t.f&De||Me(t),t=n}}function Me(e,t=!0){var n=!1;if((t||e.f&Lr)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:nn(i);i.remove(),i=a}n=!0}Oi(e,t&&!n),Di(e),Pt(e,0),qe(e,wt);var o=e.transitions;if(o!==null)for(const d of o)d.stop();Mi(e);var l=e.parent;l!==null&&l.first!==null&&Ri(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Ri(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function mt(e,t){var n=[];qn(e,n,!0),Hi(n,()=>{Me(e),t&&t()})}function Hi(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function qn(e,t,n){if(!(e.f&Re)){if(e.f^=Re,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var r=i.next,a=(i.f&kt)!==0||(i.f&De)!==0;qn(i,t,a?n:!1),i=r}}}function At(e){Fi(e,!0)}function Fi(e,t){if(e.f&Re){qt(e)&&on(e),e.f^=Re;for(var n=e.first;n!==null;){var i=n.next,r=(n.f&kt)!==0||(n.f&De)!==0;Fi(n,r?t:!1),n=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Gt=!1,xn=[];function qi(){Gt=!1;const e=xn.slice();xn=[],jr(e)}function Ht(e){Gt||(Gt=!0,queueMicrotask(qi)),xn.push(e)}function ha(){Gt&&qi()}function Bi(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const Vi=0,ga=1;let Kt=!1,zt=Vi,It=!1,Ct=null,ht=!1,Bn=!1;function ei(e){ht=e}function ti(e){Bn=e}let it=[],gt=0;let J=null;function Fe(e){J=e}let K=null;function Ie(e){K=e}let He=null;function ma(e){He=e}let de=null,me=0,Qe=null;function pa(e){Qe=e}let Ui=1,Sn=0,rt=!1,Q=null;function Wi(){return++Ui}function Ft(){return!bt||Q!==null&&Q.l===null}function qt(e){var u;var t=e.f;if(t&et)return!0;if(t&en){var n=e.deps,i=(t<)!==0;if(n!==null){var r,a,o=(t&Zt)!==0,l=i&&K!==null&&!rt,d=n.length;if(o||l){for(r=0;r<d;r++)a=n[r],(o||!((u=a==null?void 0:a.reactions)!=null&&u.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=Zt)}for(r=0;r<d;r++)if(a=n[r],qt(a)&&Li(a),a.wv>e.wv)return!0}(!i||K!==null&&!rt)&&qe(e,we)}return!1}function ya(e,t){for(var n=t;n!==null;){if(n.f&kn)try{n.fn(e);return}catch{n.f^=kn}n=n.parent}throw Kt=!1,e}function wa(e){return(e.f&wt)===0&&(e.parent===null||(e.parent.f&kn)===0)}function an(e,t,n,i){if(Kt){if(n===null&&(Kt=!1),wa(t))throw e;return}n!==null&&(Kt=!0);{ya(e,t);return}}function Ki(e){var h;var t=de,n=me,i=Qe,r=J,a=rt,o=He,l=Q,d=e.f;de=null,me=0,Qe=null,J=d&(De|Dt)?null:e,rt=!ht&&(d<)!==0,He=null,Q=e.ctx,Sn++;try{var u=(0,e.fn)(),f=e.deps;if(de!==null){var c;if(Pt(e,me),f!==null&&me>0)for(f.length=me+de.length,c=0;c<de.length;c++)f[me+c]=de[c];else e.deps=f=de;if(!rt)for(c=me;c<f.length;c++)((h=f[c]).reactions??(h.reactions=[])).push(e)}else f!==null&&me<f.length&&(Pt(e,me),f.length=me);return u}finally{de=t,me=n,Qe=i,J=r,rt=a,He=o,Q=l}}function ka(e,t){let n=t.reactions;if(n!==null){var i=Ar.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}n===null&&t.f&Le&&(de===null||!de.includes(t))&&(qe(t,en),t.f&(lt|Zt)||(t.f^=Zt),Pt(t,0))}function Pt(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)ka(e,n[i])}function on(e){var t=e.f;if(!(t&wt)){qe(e,we);var n=K,i=Q;K=e;try{t&Qt?_a(e):Oi(e),Di(e),Mi(e);var r=Ki(e);e.teardown=typeof r=="function"?r:null,e.wv=Ui;var a=e.deps,o;wn&&Kr&&e.f&et}catch(l){an(l,e,n,i||e.ctx)}finally{K=n}}}function zi(){if(gt>1e3){gt=0;try{Fr()}catch(e){if(Ct!==null)an(e,Ct,null);else throw e}}gt++}function Yi(e){var t=e.length;if(t!==0){zi();var n=ht;ht=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&we||(r.f^=we);var a=[];$i(r,a),ba(a)}}finally{ht=n}}}function ba(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(wt|Re)))try{qt(i)&&(on(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Ri(i):i.fn=null))}catch(r){an(r,i,null,i.ctx)}}}function xa(){if(It=!1,gt>1001)return;const e=it;it=[],Yi(e),It||(gt=0,Ct=null)}function ln(e){zt===Vi&&(It||(It=!0,queueMicrotask(xa))),Ct=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(Dt|De)){if(!(n&we))return;t.f^=we}}it.push(t)}function $i(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&De)!==0,o=a&&(r&we)!==0,l=n.next;if(!o&&!(r&Re))if(r&Mt){if(a)n.f^=we;else try{qt(n)&&on(n)}catch(c){an(c,n,null,n.ctx)}var d=n.first;if(d!==null){n=d;continue}}else r&yi&&i.push(n);if(l===null){let c=n.parent;for(;c!==null;){if(e===c)break e;var u=c.next;if(u!==null){n=u;continue e}c=c.parent}}n=l}for(var f=0;f<i.length;f++)d=i[f],t.push(d),$i(d,t)}function Zi(e){var t=zt,n=it;try{zi();const r=[];zt=ga,it=r,It=!1,Yi(n);var i=e==null?void 0:e();return ha(),(it.length>0||r.length>0)&&Zi(),gt=0,Ct=null,i}finally{zt=t,it=n}}async function ni(){await Promise.resolve(),Zi()}function s(e){var f;var t=e.f,n=(t&Le)!==0;if(n&&t&wt){var i=Ni(e);return Hn(e),i}if(J!==null){He!==null&&He.includes(e)&&Ur();var r=J.deps;e.rv<Sn&&(e.rv=Sn,de===null&&r!==null&&r[me]===e?me++:de===null?de=[e]:de.push(e),Qe!==null&&K!==null&&K.f&we&&!(K.f&De)&&Qe.includes(e)&&(qe(K,et),ln(K)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,l=a;o!==null;)if(o.f&Le){var d=o;l=d,o=d.parent}else{var u=o;(f=u.deriveds)!=null&&f.includes(l)||(u.deriveds??(u.deriveds=[])).push(l);break}return n&&(a=e,qt(a)&&Li(a)),e.v}function ze(e){const t=J;try{return J=null,e()}finally{J=t}}const Sa=-7169;function qe(e,t){e.f=e.f&Sa|t}function Ea(e){return Ji().get(e)}function Gi(e,t){return Ji().set(e,t),t}function Ji(e){return Q===null&&Bi(),Q.c??(Q.c=new Map(Ta(Q)||void 0))}function Ta(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function ae(e,t=!1,n){Q={p:Q,c:null,e:null,m:!1,s:e,x:null,l:null},bt&&!t&&(Q.l={s:null,u:null,r1:[],r2:pe(!1)})}function oe(e){const t=Q;if(t!==null){const o=t.e;if(o!==null){var n=K,i=J;t.e=null;try{for(var r=0;r<o.length;r++){var a=o[r];Ie(a.effect),Fe(a.reaction),Rt(a.fn)}}finally{Ie(n),Fe(i)}}Q=t.p,t.m=!0}return{}}function Aa(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Xe in e)En(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&Xe in n&&En(n)}}}function En(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let i in e)try{En(e[i],t)}catch{}const n=Mn(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=pi(n);for(let r in i){const a=i[r].get;if(a)try{a.call(e)}catch{}}}}}function Ia(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Ca=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Pa(e){return Ca.includes(e)}const ja={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Na(e){return e=e.toLowerCase(),ja[e]??e}const La=["touchstart","touchmove"];function Ma(e){return La.includes(e)}function Da(e,t){if(t){const n=document.body;e.autofocus=!0,Ht(()=>{document.activeElement===n&&e.focus()})}}let ii=!1;function Oa(){ii||(ii=!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 Xi(e){var t=J,n=K;Fe(null),Ie(null);try{return e()}finally{Fe(t),Ie(n)}}function Ra(e,t,n,i=n){e.addEventListener(t,()=>Xi(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),Oa()}const Qi=new Set,Tn=new Set;function er(e,t,n,i){function r(a){if(i.capture||Tt.call(t,a),!a.cancelBubble)return Xi(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ht(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function re(e,t,n,i,r){var a={capture:i,passive:r},o=er(e,t,n,a);(t===document.body||t===window||t===document)&&fa(()=>{t.removeEventListener(e,o,a)})}function ce(e){for(var t=0;t<e.length;t++)Qi.add(e[t]);for(var n of Tn)n(e)}function Tt(e){var w;var t=this,n=t.ownerDocument,i=e.type,r=((w=e.composedPath)==null?void 0:w.call(e))||[],a=r[0]||e.target,o=0,l=e.__root;if(l){var d=r.indexOf(l);if(d!==-1&&(t===document||t===window)){e.__root=t;return}var u=r.indexOf(t);if(u===-1)return;d<=u&&(o=d)}if(a=r[o]||e.target,a!==t){Ir(e,"currentTarget",{configurable:!0,get(){return a||n}});var f=J,c=K;Fe(null),Ie(null);try{for(var h,g=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var v=a["__"+i];if(v!==void 0&&!a.disabled)if(Nn(v)){var[p,...y]=v;p.apply(a,[e,...y])}else v.call(a,e)}catch(S){h?g.push(S):h=S}if(e.cancelBubble||m===t||m===null)break;a=m}if(h){for(let S of g)queueMicrotask(()=>{throw S});throw h}}finally{e.__root=t,delete e.currentTarget,Fe(f),Ie(c)}}}function Vn(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function ot(e,t){var n=K;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function I(e,t){var n=(t&ia)!==0,i=(t&ra)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=Vn(a?e:"<!>"+e),n||(r=at(r)));var o=i?document.importNode(r,!0):r.cloneNode(!0);if(n){var l=at(o),d=o.lastChild;ot(l,d)}else ot(o,o);return o}}function ke(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=Vn(r),l=at(o);a=at(l)}var d=a.cloneNode(!0);return ot(d,d),d}}function Ye(e=""){{var t=Ot(e+"");return ot(t,t),t}}function tt(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Ot();return e.append(t,n),ot(t,n),e}function k(e,t){e!==null&&e.before(t)}let Jt=!0;function ri(e){Jt=e}function $(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 Un(e,t){return Ha(e,t)}const ft=new Map;function Ha(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:o=!0}){oa();var l=new Set,d=c=>{for(var h=0;h<c.length;h++){var g=c[h];if(!l.has(g)){l.add(g);var m=Ma(g);t.addEventListener(g,Tt,{passive:m});var v=ft.get(g);v===void 0?(document.addEventListener(g,Tt,{passive:m}),ft.set(g,1)):ft.set(g,v+1)}}};d(Ln(Qi)),Tn.add(d);var u=void 0,f=va(()=>{var c=n??t.appendChild(Ot());return Ke(()=>{if(a){ae({});var h=Q;h.c=a}r&&(i.$$events=r),Jt=o,u=e(c,i)||{},Jt=!0,a&&oe()}),()=>{var m;for(var h of l){t.removeEventListener(h,Tt);var g=ft.get(h);--g===0?(document.removeEventListener(h,Tt),ft.delete(h)):ft.set(h,g)}Tn.delete(d),c!==n&&((m=c.parentNode)==null||m.removeChild(c))}});return An.set(u,f),u}let An=new WeakMap;function tr(e,t){const n=An.get(e);return n?(An.delete(e),n(t)):Promise.resolve()}function R(e,t,n=!1){var i=e,r=null,a=null,o=ve,l=n?kt:0,d=!1;const u=(c,h=!0)=>{d=!0,f(h,c)},f=(c,h)=>{o!==(o=c)&&(o?(r?At(r):h&&(r=Ke(()=>h(i))),a&&mt(a,()=>{a=null})):(a?At(a):h&&(a=Ke(()=>h(i))),r&&mt(r,()=>{r=null})))};st(()=>{d=!1,t(u),d||f(null,null)},l)}function nr(e,t,n){var i=e,r=ve,a,o=Ft()?Dr:tn;st(()=>{o(r,r=t())&&(a&&mt(a),a=Ke(()=>n(i)))})}function pt(e,t){return t}function Fa(e,t,n,i){for(var r=[],a=t.length,o=0;o<a;o++)qn(t[o].e,r,!0);var l=a>0&&r.length===0&&n!==null;if(l){var d=n.parentNode;la(d),d.append(n),i.clear(),Ge(e,t[0].prev,t[a-1].next)}Hi(r,()=>{for(var u=0;u<a;u++){var f=t[u];l||(i.delete(f.k),Ge(e,f.prev,f.next)),Me(f.e,!l)}})}function nt(e,t,n,i,r,a=null){var o=e,l={flags:t,items:new Map,first:null},d=(t&Si)!==0;if(d){var u=e;o=u.appendChild(Ot())}var f=null,c=!1;st(()=>{var h=n(),g=Nn(h)?h:h==null?[]:Ln(h),m=g.length;if(!(c&&m===0)){c=m===0;{var v=J;qa(g,l,o,r,t,(v.f&Re)!==0,i)}a!==null&&(m===0?f?At(f):f=Ke(()=>a(o)):f!==null&&mt(f,()=>{f=null})),n()}})}function qa(e,t,n,i,r,a,o,l){var V,Y,ee,se;var d=(r&Yr)!==0,u=(r&(On|Rn))!==0,f=e.length,c=t.items,h=t.first,g=h,m,v=null,p,y=[],w=[],S,j,x,E;if(d)for(E=0;E<f;E+=1)S=e[E],j=o(S,E),x=c.get(j),x!==void 0&&((V=x.a)==null||V.measure(),(p??(p=new Set)).add(x));for(E=0;E<f;E+=1){if(S=e[E],j=o(S,E),x=c.get(j),x===void 0){var C=g?g.e.nodes_start:n;v=Va(C,t,v,v===null?t.first:v.next,S,j,E,i,r),c.set(j,v),y=[],w=[],g=v.next;continue}if(u&&Ba(x,S,E,r),x.e.f&Re&&(At(x.e),d&&((Y=x.a)==null||Y.unfix(),(p??(p=new Set)).delete(x))),x!==g){if(m!==void 0&&m.has(x)){if(y.length<w.length){var A=w[0],D;v=A.prev;var q=y[0],L=y[y.length-1];for(D=0;D<y.length;D+=1)ai(y[D],A,n);for(D=0;D<w.length;D+=1)m.delete(w[D]);Ge(t,q.prev,L.next),Ge(t,v,q),Ge(t,L,A),g=A,v=L,E-=1,y=[],w=[]}else m.delete(x),ai(x,g,n),Ge(t,x.prev,x.next),Ge(t,x,v===null?t.first:v.next),Ge(t,v,x),v=x;continue}for(y=[],w=[];g!==null&&g.k!==j;)(a||!(g.e.f&Re))&&(m??(m=new Set)).add(g),w.push(g),g=g.next;if(g===null)continue;x=g}y.push(x),v=x,g=x.next}if(g!==null||m!==void 0){for(var F=m===void 0?[]:Ln(m);g!==null;)(a||!(g.e.f&Re))&&F.push(g),g=g.next;var U=F.length;if(U>0){var B=r&Si&&f===0?n:null;if(d){for(E=0;E<U;E+=1)(ee=F[E].a)==null||ee.measure();for(E=0;E<U;E+=1)(se=F[E].a)==null||se.fix()}Fa(t,F,B,c)}}d&&Ht(()=>{var be;if(p!==void 0)for(x of p)(be=x.a)==null||be.apply()}),K.first=t.first&&t.first.e,K.last=v&&v.e}function Ba(e,t,n,i){i&On&&bn(e.v,t),i&Rn?bn(e.i,n):e.i=n}function Va(e,t,n,i,r,a,o,l,d,u){var f=(d&On)!==0,c=(d&$r)===0,h=f?c?Ti(r):pe(r):r,g=d&Rn?pe(o):o,m={i:g,v:h,k:a,a:null,e:null,prev:n,next:i};try{return m.e=Ke(()=>l(e,h,g),Ii),m.e.prev=n&&n.e,m.e.next=i&&i.e,n===null?t.first=m:(n.next=m,n.e.next=m.e),i!==null&&(i.prev=m,i.e.prev=m.e),m}finally{}}function ai(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var o=nn(a);r.before(a),a=o}}function Ge(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 Ua(e,t,n,i,r){var a=e,o="",l;st(()=>{o!==(o=t()??"")&&(l!==void 0&&(Me(l),l=void 0),o!==""&&(l=Ke(()=>{var d=o+"",u=Vn(d);ot(at(u),u.lastChild),a.before(u)})))})}function St(e,t,...n){var i=e,r=Ne,a;st(()=>{r!==(r=t())&&(a&&(Me(a),a=null),a=Ke(()=>r(i,...n)))},kt)}function Wa(e,t,n,i,r,a){var o,l,d=null,u=e,f;st(()=>{const c=t()||null;var h=c==="svg"?Ei:null;c!==o&&(f&&(c===null?mt(f,()=>{f=null,l=null}):c===l?At(f):(Me(f),ri(!1))),c&&c!==l&&(f=Ke(()=>{d=h?document.createElementNS(h,c):document.createElement(c),ot(d,d);{var g=d.appendChild(Ot());i(d,g)}K.nodes_end=d,u.before(d)})),o=c,o&&(l=o),ri(!0))},kt)}function sn(e,t,n){Rt(()=>{var i=ze(()=>t(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};Fn(()=>{var o=n();Aa(o),r&&tn(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function ir(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=ir(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Ka(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=ir(e))&&(i&&(i+=" "),i+=t);return i}function za(e){return typeof e=="object"?Ka(e):e??""}function Ya(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ie(e,t,n,i){var r=e.__attributes??(e.__attributes={});r[t]!==(r[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Mr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&rr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function $a(e,t,n,i,r=!1,a=!1,o=!1){var l=t||{},d=e.tagName==="OPTION";for(var u in t)u in n||(n[u]=null);n.class&&(n.class=za(n.class)),n.class=n.class?n.class+" "+i:i;var f=rr(e),c=e.__attributes??(e.__attributes={});for(const w in n){let S=n[w];if(d&&w==="value"&&S==null){e.value=e.__value="",l[w]=S;continue}var h=l[w];if(S!==h){l[w]=S;var g=w[0]+w[1];if(g!=="$$"){if(g==="on"){const j={},x="$$"+w;let E=w.slice(2);var m=Pa(E);if(Ia(E)&&(E=E.slice(0,-7),j.capture=!0),!m&&h){if(S!=null)continue;e.removeEventListener(E,l[x],j),l[x]=null}if(S!=null)if(m)e[`__${E}`]=S,ce([E]);else{let C=function(A){l[w].call(this,A)};var y=C;l[x]=er(E,e,C,j)}else m&&(e[`__${E}`]=void 0)}else if(w==="style"&&S!=null)e.style.cssText=S+"";else if(w==="autofocus")Da(e,!!S);else if(w==="__value"||w==="value"&&S!=null)e.value=e[w]=e.__value=S;else if(w==="selected"&&d)Ya(e,S);else{var v=w;r||(v=Na(v));var p=v==="defaultValue"||v==="defaultChecked";if(S==null&&!a&&!p)if(c[w]=null,v==="value"||v==="checked"){let j=e;if(v==="value"){let x=j.defaultValue;j.removeAttribute(v),j.defaultValue=x}else{let x=j.defaultChecked;j.removeAttribute(v),j.defaultChecked=x}}else e.removeAttribute(w);else p||f.includes(v)&&(a||typeof S!="string")?e[v]=S:typeof S!="function"&&ie(e,v,S)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return l}var oi=new Map;function rr(e){var t=oi.get(e.nodeName);if(t)return t;oi.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=pi(i);for(var a in n)n[a].set&&t.push(a);i=Mn(i)}return t}function Za(e,t,n){var i=e.__className,r=Ga(t);(i!==r||Ii)&&(t==null?e.removeAttribute("class"):e.className=r,e.__className=r)}function Ga(e,t){return(e??"")+""}function le(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 cn(e,t,n,i){var r=e.__styles??(e.__styles={});r[t]!==n&&(r[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Ja=()=>performance.now(),Ue={tick:e=>requestAnimationFrame(e),now:()=>Ja(),tasks:new Set};function ar(){const e=Ue.now();Ue.tasks.forEach(t=>{t.c(e)||(Ue.tasks.delete(t),t.f())}),Ue.tasks.size!==0&&Ue.tick(ar)}function Xa(e){let t;return Ue.tasks.size===0&&Ue.tick(ar),{promise:new Promise(n=>{Ue.tasks.add(t={c:e,f:n})}),abort(){Ue.tasks.delete(t)}}}function Ut(e,t){e.dispatchEvent(new CustomEvent(t))}function Qa(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 li(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=Qa(r.trim());t[o]=a.trim()}return t}const eo=e=>e;function Ee(e,t,n,i){var r=(e&ea)!==0,a=(e&ta)!==0,o=r&&a,l=(e&na)!==0,d=o?"both":r?"in":"out",u,f=t.inert,c,h;function g(){var w=J,S=K;Fe(null),Ie(null);try{return u??(u=n()(t,(i==null?void 0:i())??{},{direction:d}))}finally{Fe(w),Ie(S)}}var m={is_global:l,in(){var w;if(t.inert=f,!r){h==null||h.abort(),(w=h==null?void 0:h.reset)==null||w.call(h);return}a||c==null||c.abort(),Ut(t,"introstart"),c=In(t,g(),h,1,()=>{Ut(t,"introend"),c==null||c.abort(),c=u=void 0})},out(w){if(!a){w==null||w(),u=void 0;return}t.inert=!0,Ut(t,"outrostart"),h=In(t,g(),c,0,()=>{Ut(t,"outroend"),w==null||w()})},stop:()=>{c==null||c.abort(),h==null||h.abort()}},v=K;if((v.transitions??(v.transitions=[])).push(m),r&&Jt){var p=l;if(!p){for(var y=v.parent;y&&y.f&kt;)for(;(y=y.parent)&&!(y.f&Qt););p=!y||(y.f&wi)!==0}p&&Rt(()=>{ze(()=>m.in())})}}function In(e,t,n,i,r){var a=i===1;if(_t(t)){var o,l=!1;return Ht(()=>{if(!l){var p=t({direction:a?"in":"out"});o=In(e,p,n,i,r)}}),{abort:()=>{l=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return r(),{abort:Ne,deactivate:Ne,reset:Ne,t:()=>i};const{delay:d=0,css:u,tick:f,easing:c=eo}=t;var h=[];if(a&&n===void 0&&(f&&f(0,1),u)){var g=li(u(0,1));h.push(g,g)}var m=()=>1-i,v=e.animate(h,{duration:d});return v.onfinish=()=>{var p=(n==null?void 0:n.t())??1-i;n==null||n.abort();var y=i-p,w=t.duration*Math.abs(y),S=[];if(w>0){if(u)for(var j=Math.ceil(w/16.666666666666668),x=0;x<=j;x+=1){var E=p+y*c(x/j),C=u(E,1-E);S.push(li(C))}m=()=>{var A=v.currentTime;return p+y*c(A/w)},f&&Xa(()=>{if(v.playState!=="running")return!1;var A=m();return f(A,1-A),!0})}v=e.animate(S,{duration:w,fill:"forwards"}),v.onfinish=()=>{m=()=>i,f==null||f(i,1-i),r()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=Ne)},deactivate:()=>{r=Ne},reset:()=>{i===0&&(f==null||f(1,0))},t:()=>m()}}function to(e,t,n=t){var i=Ft();Ra(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=mn(e)?pn(a):a,n(a),i&&a!==(a=t())){var o=e.selectionStart,l=e.selectionEnd;e.value=a??"",l!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(l,e.value.length))}}),ze(t)==null&&e.value&&n(mn(e)?pn(e.value):e.value),Fn(()=>{var r=t();mn(e)&&r===pn(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function mn(e){var t=e.type;return t==="number"||t==="range"}function pn(e){return e===""?null:+e}function si(e,t){return e===t||(e==null?void 0:e[Xe])===t}function Bt(e={},t,n,i){return Rt(()=>{var r,a;return Fn(()=>{r=a,a=[],ze(()=>{e!==n(...a)&&(t(e,...a),r&&si(n(...r),e)&&t(null,...r))})}),()=>{Ht(()=>{a&&si(n(...a),e)&&t(null,...a)})}}),e}function no(e,t,n){if(e==null)return t(void 0),Ne;const i=ze(()=>e.subscribe(t,n));return i.unsubscribe?()=>i.unsubscribe():i}let Wt=!1;function io(e){var t=Wt;try{return Wt=!1,[e(),Wt]}finally{Wt=t}}const ro={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 ao(e,t,n){return new Proxy({props:e,exclude:t},ro)}const oo={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(_t(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i)return i[t]}},set(e,t,n){let i=e.props.length;for(;i--;){let r=e.props[i];_t(r)&&(r=r());const a=Je(r,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(_t(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i){const r=Je(i,t);return r&&!r.configurable&&(r.configurable=!0),r}}},has(e,t){if(t===Xe||t===bi)return!1;for(let n of e.props)if(_t(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){_t(n)&&(n=n());for(const i in n)t.includes(i)||t.push(i)}return t}};function lo(...e){return new Proxy({props:e},oo)}function ci(e){for(var t=K,n=K;t!==null&&!(t.f&(De|Dt));)t=t.parent;try{return Ie(t),e()}finally{Ie(n)}}function O(e,t,n,i){var C;var r=(n&Zr)!==0,a=!bt||(n&Gr)!==0,o=(n&Xr)!==0,l=(n&Qr)!==0,d=!1,u;o?[u,d]=io(()=>e[t]):u=e[t];var f=Xe in e||bi in e,c=o&&(((C=Je(e,t))==null?void 0:C.set)??(f&&t in e&&(A=>e[t]=A)))||void 0,h=i,g=!0,m=!1,v=()=>(m=!0,g&&(g=!1,l?h=ze(i):h=i),h);u===void 0&&i!==void 0&&(c&&a&&qr(),u=v(),c&&c(u));var p;if(a)p=()=>{var A=e[t];return A===void 0?v():(g=!0,m=!1,A)};else{var y=ci(()=>(r?W:sa)(()=>e[t]));y.f|=Nr,p=()=>{var A=s(y);return A!==void 0&&(h=void 0),A===void 0?h:A}}if(!(n&Jr))return p;if(c){var w=e.$$legacy;return function(A,D){return arguments.length>0?((!a||!D||w||d)&&c(D?p():A),A):p()}}var S=!1,j=!1,x=Ti(u),E=ci(()=>W(()=>{var A=p(),D=s(x);return S?(S=!1,j=!0,D):(j=!1,x.v=A)}));return r||(E.equals=Dn),function(A,D){if(arguments.length>0){const q=D?s(E):a&&o?Z(A):A;return E.equals(q)||(S=!0,N(x,q),m&&h!==void 0&&(h=q),ze(()=>s(E))),A}return s(E)}}function ct(e){Q===null&&Bi(),bt&&Q.l!==null?so(Q).m.push(e):rn(()=>{const t=ze(e);if(typeof t=="function")return t})}function so(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const co="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(co);const or="https://www.playpilot.com",un="https://partner-api.playpilot.tech/1.0.0",lr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",ye=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",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",TotalInjectionsCount:"ali_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed"}),vt=[];function sr(e,t=Ne){let n=null;const i=new Set;function r(l){if(tn(e,l)&&(e=l,n)){const d=!vt.length;for(const u of i)u[1](),vt.push(u,e);if(d){for(let u=0;u<vt.length;u+=2)vt[u][0](vt[u+1]);vt.length=0}}}function a(l){r(l(e))}function o(l,d=Ne){const u=[l,d];return i.add(u),i.size===1&&(n=t(r,a)||Ne),l(e),()=>{i.delete(u),i.size===0&&n&&(n(),n=null)}}return{set:r,update:a,subscribe:o}}function ui(e){let t;return no(e,n=>t=n)(),t}const cr=sr(null),ur=sr(null),uo="https://insights.playpilot.net";async function Te(e,t=null,n={}){const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,n.organization_sid=ui(cr),n.domain_sid=ui(ur),fetch(uo,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}function fo({organizationSid:e=null,domainSid:t=null}){cr.set(e||null),ur.set(t||null)}const Wn="EncryptedToken",dr="articleReplacementEditToken";async function fr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=_n();if(!n)throw new Error("No token was provided");const i=Kn(e);if(!i)throw new Error("Could not be authenticated");const r=await fetch(un+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:i})});if(!r.ok)throw r;return vo(i),!0}catch(n){console.error(n),Te(ye.AuthFailed)}finally{ho()}return!1}function Kn(e=""){var i,r;const t=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(dr);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${Wn}=`).pop())==null?void 0:r.split(";")[0])||""}function vo(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const i="expires="+t.toUTCString();document.cookie=Wn+"="+e+";"+i+";path=/"}function _o(){document.cookie=Wn+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function vr(){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 ho(){const e=new URL(window.location.href);e.searchParams.delete(dr),window.history.replaceState({},"",e)}function _r(e){let t=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t=t*31+i>>>0}return t.toString(16)}const _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),go={"Where To Stream Online":{[_.English]:"Where to stream online",[_.Swedish]:"Var kan man streama online",[_.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},"Title Unavailable":{[_.English]:"This title is not currently available to stream.",[_.Swedish]:"Den här titeln går inte att streama just nu.",[_.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[_.English]:"is not currently available to stream.",[_.Swedish]:"går inte att streama just nu.",[_.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[_.English]:"is available to stream on",[_.Swedish]:"finns att streama på",[_.Danish]:"kan streames på"},"Is Available To Stream":{[_.English]:"is available to stream.",[_.Swedish]:"finns att streama.",[_.Danish]:"kan streames."},"View Streaming Options":{[_.English]:"View streaming options",[_.Swedish]:"Se streamingalternativ",[_.Danish]:"Se streamingmuligheder"},And:{[_.English]:"and",[_.Swedish]:"och",[_.Danish]:"og"},Minutes:{[_.English]:"minutes",[_.Swedish]:"minuter",[_.Danish]:"minutter"},"Type: movie":{[_.English]:"Movie",[_.Swedish]:"Film",[_.Danish]:"Film"},"Type: series":{[_.English]:"Series",[_.Swedish]:"Serie",[_.Danish]:"Serie"},Stream:{[_.English]:"Stream",[_.Swedish]:"Streama",[_.Danish]:"Stream"},Buy:{[_.English]:"Buy",[_.Swedish]:"Köp",[_.Danish]:"Køb"},Rent:{[_.English]:"Rent",[_.Swedish]:"Hyra",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyra",[_.Danish]:"Lej eller køb"},All:{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},Unscripted:{[_.English]:"Unscripted",[_.Swedish]:"Oscripterat",[_.Danish]:"Umanuskriptet"},Independent:{[_.English]:"Independent",[_.Swedish]:"Indie",[_.Danish]:"Indie"},"Game Show":{[_.English]:"Game Show",[_.Swedish]:"Gameshow",[_.Danish]:"Quizshow"},"Film Noir":{[_.English]:"Film Noir",[_.Swedish]:"Film noir",[_.Danish]:"Film noir"},Entertainment:{[_.English]:"Entertainment",[_.Swedish]:"Underhållning",[_.Danish]:"Underholdning"},News:{[_.English]:"News",[_.Swedish]:"Nyheter",[_.Danish]:"Nyheder"},Short:{[_.English]:"Short",[_.Swedish]:"Kortfilm",[_.Danish]:"Kortfilm"},Bollywood:{[_.English]:"Bollywood",[_.Swedish]:"Bollywood",[_.Danish]:"Bollywood"},Concert:{[_.English]:"Concert",[_.Swedish]:"Konsert",[_.Danish]:"Koncert"},Arthouse:{[_.English]:"Arthouse",[_.Swedish]:"Arthouse",[_.Danish]:"Arthouse"},"Alternate Version":{[_.English]:"Alternate Version",[_.Swedish]:"Alternativ version",[_.Danish]:"Alternativ version"},"Reality TV":{[_.English]:"Reality TV",[_.Swedish]:"Reality-TV",[_.Danish]:"Reality-TV"},Culture:{[_.English]:"Culture",[_.Swedish]:"Kultur",[_.Danish]:"Kultur"},Drama:{[_.English]:"Drama",[_.Swedish]:"Drama",[_.Danish]:"Drama"},Crime:{[_.English]:"Crime",[_.Swedish]:"Kriminal",[_.Danish]:"Krimi"},Western:{[_.English]:"Western",[_.Swedish]:"Western",[_.Danish]:"Western"},Thriller:{[_.English]:"Thriller",[_.Swedish]:"Thriller",[_.Danish]:"Thriller"},Animation:{[_.English]:"Animation",[_.Swedish]:"Animerat",[_.Danish]:"Animation"},Mystery:{[_.English]:"Mystery",[_.Swedish]:"Mysterium",[_.Danish]:"Mysterium"},Science:{[_.English]:"Science",[_.Swedish]:"Vetenskap",[_.Danish]:"Videnskab"},Nature:{[_.English]:"Nature",[_.Swedish]:"Natur",[_.Danish]:"Natur"},War:{[_.English]:"War",[_.Swedish]:"Krig",[_.Danish]:"Krig"},"Sci-Fi":{[_.English]:"Sci-Fi",[_.Swedish]:"Sci-fi",[_.Danish]:"Sci-fi"},Documentary:{[_.English]:"Documentary",[_.Swedish]:"Dokumentär",[_.Danish]:"Dokumentar"},"Stand-up":{[_.English]:"Stand-up",[_.Swedish]:"Standup",[_.Danish]:"Stand-up"},"Talk Show":{[_.English]:"Talk Show",[_.Swedish]:"Talkshow",[_.Danish]:"Talkshow"},Fantasy:{[_.English]:"Fantasy",[_.Swedish]:"Fantasy",[_.Danish]:"Fantasy"},History:{[_.English]:"History",[_.Swedish]:"Historia",[_.Danish]:"Historie"},Adventure:{[_.English]:"Adventure",[_.Swedish]:"Äventyr",[_.Danish]:"Eventyr"},Action:{[_.English]:"Action",[_.Swedish]:"Action",[_.Danish]:"Action"},Horror:{[_.English]:"Horror",[_.Swedish]:"Skräck",[_.Danish]:"Gyser"},Comedy:{[_.English]:"Comedy",[_.Swedish]:"Komedi",[_.Danish]:"Komedie"},Biography:{[_.English]:"Biography",[_.Swedish]:"Biografi",[_.Danish]:"Biografi"},Music:{[_.English]:"Music",[_.Swedish]:"Musik",[_.Danish]:"Musik"},Sport:{[_.English]:"Sport",[_.Swedish]:"Sport",[_.Danish]:"Sport"},Romance:{[_.English]:"Romance",[_.Swedish]:"Romantik",[_.Danish]:"Romantik"},Kids:{[_.English]:"Kids",[_.Swedish]:"Barn",[_.Danish]:"Børn"},Lifestyle:{[_.English]:"Lifestyle",[_.Swedish]:"Livsstil",[_.Danish]:"Livsstil"},Musical:{[_.English]:"Musical",[_.Swedish]:"Musikal",[_.Danish]:"Musical"},Anime:{[_.English]:"Anime",[_.Swedish]:"Anime",[_.Danish]:"Anime"},Family:{[_.English]:"Family",[_.Swedish]:"Familj",[_.Danish]:"Familie"}};function _e(e,t=hr()){var n;return((n=go[e])==null?void 0:n[t])||e}function hr(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(_);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");return n&&t.includes(n)?n:_.English}const mo=e=>e;function zn(e){const t=e-1;return t*t*t+1}function di(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Yn(e,{delay:t=0,duration:n=400,easing:i=mo}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function dn(e,{delay:t=0,duration:n=400,easing:i=zn,x:r=0,y:a=0,opacity:o=0}={}){const l=getComputedStyle(e),d=+l.opacity,u=l.transform==="none"?"":l.transform,f=d*(1-o),[c,h]=di(r),[g,m]=di(a);return{delay:t,duration:n,easing:i,css:(v,p)=>`
|
|
3
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();const wn=!1;var Ln=Array.isArray,Ir=Array.prototype.indexOf,Nn=Array.from,Cr=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,pi=Object.getOwnPropertyDescriptors,Pr=Object.prototype,jr=Array.prototype,Mn=Object.getPrototypeOf;function _t(e){return typeof e=="function"}const Le=()=>{};function Lr(e){for(var t=0;t<e.length;t++)e[t]()}function $t(e,t,n=!1){return e===void 0?n?t():t:e}const Ne=2,yi=4,Mt=8,Qt=16,De=32,Dt=64,kn=128,lt=256,Zt=512,ke=1024,et=2048,en=4096,Re=8192,wt=16384,wi=32768,kt=65536,Nr=1<<17,Mr=1<<19,ki=1<<20,Xe=Symbol("$state"),bi=Symbol("legacy props"),Dr=Symbol("");function xi(e){return e===this.v}function tn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Or(e,t){return e!==t}function Dn(e){return!tn(e,this.v)}function Rr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Hr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Fr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function qr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Br(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Vr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ur(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Wr(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Kr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let bt=!1,zr=!1;function Yr(){bt=!0}const On=1,Rn=2,Si=4,$r=8,Zr=16,Gr=1,Jr=2,Xr=4,Qr=8,ea=16,ta=1,na=2,ia=4,ra=1,aa=2,_e=Symbol(),Ei="http://www.w3.org/2000/svg";function ye(e,t){var n={f:0,v:e,reactions:null,equals:xi,rv:0,wv:0};return n}function W(e){return oa(ye(e))}function Ti(e,t=!1){var i;const n=ye(e);return t||(n.equals=Dn),bt&&Q!==null&&Q.l!==null&&((i=Q.l).s??(i.s=[])).push(n),n}function oa(e){return J!==null&&J.f&Ne&&(He===null?pa([e]):He.push(e)),e}function L(e,t){return J!==null&&Ft()&&J.f&(Ne|Qt)&&(He===null||!He.includes(e))&&Kr(),bn(e,t)}function bn(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=Wi(),Ai(e,et),Ft()&&U!==null&&U.f&ke&&!(U.f&De)&&(de!==null&&de.includes(e)?(qe(U,et),ln(U)):Qe===null?ya([e]):Qe.push(e))),t}function Ai(e,t){var n=e.reactions;if(n!==null)for(var i=Ft(),r=n.length,a=0;a<r;a++){var o=n[a],l=o.f;l&et||!i&&o===U||(qe(o,t),l&(ke|lt)&&(l&Ne?Ai(o,en):ln(o)))}}let Ii=!1;function Z(e,t=null,n){if(typeof e!="object"||e===null||Xe in e)return e;const i=Mn(e);if(i!==Pr&&i!==jr)return e;var r=new Map,a=Ln(e),o=ye(0);a&&r.set("length",ye(e.length));var l;return new Proxy(e,{defineProperty(d,u,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Vr();var c=r.get(u);return c===void 0?(c=ye(f.value),r.set(u,c)):L(c,Z(f.value,l)),!0},deleteProperty(d,u){var f=r.get(u);if(f===void 0)u in d&&r.set(u,ye(_e));else{if(a&&typeof u=="string"){var c=r.get("length"),h=Number(u);Number.isInteger(h)&&h<c.v&&L(c,h)}L(f,_e),Qn(o)}return!0},get(d,u,f){var m;if(u===Xe)return e;var c=r.get(u),h=u in d;if(c===void 0&&(!h||(m=Je(d,u))!=null&&m.writable)&&(c=ye(Z(h?d[u]:_e,l)),r.set(u,c)),c!==void 0){var g=s(c);return g===_e?void 0:g}return Reflect.get(d,u,f)},getOwnPropertyDescriptor(d,u){var f=Reflect.getOwnPropertyDescriptor(d,u);if(f&&"value"in f){var c=r.get(u);c&&(f.value=s(c))}else if(f===void 0){var h=r.get(u),g=h==null?void 0:h.v;if(h!==void 0&&g!==_e)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return f},has(d,u){var g;if(u===Xe)return!0;var f=r.get(u),c=f!==void 0&&f.v!==_e||Reflect.has(d,u);if(f!==void 0||U!==null&&(!c||(g=Je(d,u))!=null&&g.writable)){f===void 0&&(f=ye(c?Z(d[u],l):_e),r.set(u,f));var h=s(f);if(h===_e)return!1}return c},set(d,u,f,c){var S;var h=r.get(u),g=u in d;if(a&&u==="length")for(var m=f;m<h.v;m+=1){var v=r.get(m+"");v!==void 0?L(v,_e):m in d&&(v=ye(_e),r.set(m+"",v))}h===void 0?(!g||(S=Je(d,u))!=null&&S.writable)&&(h=ye(void 0),L(h,Z(f,l)),r.set(u,h)):(g=h.v!==_e,L(h,Z(f,l)));var p=Reflect.getOwnPropertyDescriptor(d,u);if(p!=null&&p.set&&p.set.call(c,f),!g){if(a&&typeof u=="string"){var y=r.get("length"),w=Number(u);Number.isInteger(w)&&w>=y.v&&L(y,w+1)}Qn(o)}return!0},ownKeys(d){s(o);var u=Reflect.ownKeys(d).filter(h=>{var g=r.get(h);return g===void 0||g.v!==_e});for(var[f,c]of r)c.v!==_e&&!(f in d)&&u.push(f);return u},setPrototypeOf(){Ur()}})}function Qn(e,t=1){L(e,e.v+t)}var fe,Ci,Pi;function la(){if(fe===void 0){fe=window;var e=Element.prototype,t=Node.prototype;Ci=Je(t,"firstChild").get,Pi=Je(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 Ot(e=""){return document.createTextNode(e)}function at(e){return Ci.call(e)}function nn(e){return Pi.call(e)}function b(e,t){return at(e)}function te(e,t){{var n=at(e);return n instanceof Comment&&n.data===""?nn(n):n}}function T(e,t=1,n=!1){let i=e;for(;t--;)i=nn(i);return i}function sa(e){e.textContent=""}function V(e){var t=Ne|et;U===null?t|=lt:U.f|=ki;var n=J!==null&&J.f&Ne?J:null;const i={children:null,ctx:Q,deps:null,equals:xi,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??U};return n!==null&&(n.children??(n.children=[])).push(i),i}function ca(e){const t=V(e);return t.equals=Dn,t}function ji(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var i=t[n];i.f&Ne?Hn(i):Me(i)}}}function ua(e){for(var t=e.parent;t!==null;){if(!(t.f&Ne))return t;t=t.parent}return null}function Li(e){var t,n=U;Ie(ua(e));try{ji(e),t=Ki(e)}finally{Ie(n)}return t}function Ni(e){var t=Li(e),n=(rt||e.f<)&&e.deps!==null?en:ke;qe(e,n),e.equals(t)||(e.v=t,e.wv=Wi())}function Hn(e){ji(e),Pt(e,0),qe(e,wt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function da(e){U===null&&J===null&&Fr(),J!==null&&J.f<&&Hr(),Bn&&Rr()}function fa(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function xt(e,t,n,i=!0){var r=(e&Dt)!==0,a=U,o={ctx:Q,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|et,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var l=ht;try{ei(!0),on(o),o.f|=wi}catch(f){throw Me(o),f}finally{ei(l)}}else t!==null&&ln(o);var d=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&ki)===0;if(!d&&!r&&i&&(a!==null&&fa(o,a),J!==null&&J.f&Ne)){var u=J;(u.children??(u.children=[])).push(o)}return o}function va(e){const t=xt(Mt,null,!1);return qe(t,ke),t.teardown=e,t}function rn(e){da();var t=U!==null&&(U.f&De)!==0&&Q!==null&&!Q.m;if(t){var n=Q;(n.e??(n.e=[])).push({fn:e,effect:U,reaction:J})}else{var i=Rt(e);return i}}function _a(e){const t=xt(Dt,e,!0);return(n={})=>new Promise(i=>{n.outro?mt(t,()=>{Me(t),i(void 0)}):(Me(t),i(void 0))})}function Rt(e){return xt(yi,e,!1)}function Fn(e){return xt(Mt,e,!0)}function D(e){return st(e)}function st(e,t=0){return xt(Mt|Qt|t,e,!0)}function Ke(e,t=!0){return xt(Mt|De,e,!0,t)}function Mi(e){var t=e.teardown;if(t!==null){const n=Bn,i=J;ti(!0),Fe(null);try{t.call(null)}finally{ti(n),Fe(i)}}}function Di(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)Hn(t[n])}}function Oi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;Me(n,t),n=i}}function ha(e){for(var t=e.first;t!==null;){var n=t.next;t.f&De||Me(t),t=n}}function Me(e,t=!0){var n=!1;if((t||e.f&Mr)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:nn(i);i.remove(),i=a}n=!0}Oi(e,t&&!n),Di(e),Pt(e,0),qe(e,wt);var o=e.transitions;if(o!==null)for(const d of o)d.stop();Mi(e);var l=e.parent;l!==null&&l.first!==null&&Ri(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Ri(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function mt(e,t){var n=[];qn(e,n,!0),Hi(n,()=>{Me(e),t&&t()})}function Hi(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function qn(e,t,n){if(!(e.f&Re)){if(e.f^=Re,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var r=i.next,a=(i.f&kt)!==0||(i.f&De)!==0;qn(i,t,a?n:!1),i=r}}}function At(e){Fi(e,!0)}function Fi(e,t){if(e.f&Re){qt(e)&&on(e),e.f^=Re;for(var n=e.first;n!==null;){var i=n.next,r=(n.f&kt)!==0||(n.f&De)!==0;Fi(n,r?t:!1),n=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Gt=!1,xn=[];function qi(){Gt=!1;const e=xn.slice();xn=[],Lr(e)}function Ht(e){Gt||(Gt=!0,queueMicrotask(qi)),xn.push(e)}function ga(){Gt&&qi()}function Bi(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const Vi=0,ma=1;let Kt=!1,zt=Vi,It=!1,Ct=null,ht=!1,Bn=!1;function ei(e){ht=e}function ti(e){Bn=e}let it=[],gt=0;let J=null;function Fe(e){J=e}let U=null;function Ie(e){U=e}let He=null;function pa(e){He=e}let de=null,pe=0,Qe=null;function ya(e){Qe=e}let Ui=1,Sn=0,rt=!1,Q=null;function Wi(){return++Ui}function Ft(){return!bt||Q!==null&&Q.l===null}function qt(e){var u;var t=e.f;if(t&et)return!0;if(t&en){var n=e.deps,i=(t<)!==0;if(n!==null){var r,a,o=(t&Zt)!==0,l=i&&U!==null&&!rt,d=n.length;if(o||l){for(r=0;r<d;r++)a=n[r],(o||!((u=a==null?void 0:a.reactions)!=null&&u.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=Zt)}for(r=0;r<d;r++)if(a=n[r],qt(a)&&Ni(a),a.wv>e.wv)return!0}(!i||U!==null&&!rt)&&qe(e,ke)}return!1}function wa(e,t){for(var n=t;n!==null;){if(n.f&kn)try{n.fn(e);return}catch{n.f^=kn}n=n.parent}throw Kt=!1,e}function ka(e){return(e.f&wt)===0&&(e.parent===null||(e.parent.f&kn)===0)}function an(e,t,n,i){if(Kt){if(n===null&&(Kt=!1),ka(t))throw e;return}n!==null&&(Kt=!0);{wa(e,t);return}}function Ki(e){var h;var t=de,n=pe,i=Qe,r=J,a=rt,o=He,l=Q,d=e.f;de=null,pe=0,Qe=null,J=d&(De|Dt)?null:e,rt=!ht&&(d<)!==0,He=null,Q=e.ctx,Sn++;try{var u=(0,e.fn)(),f=e.deps;if(de!==null){var c;if(Pt(e,pe),f!==null&&pe>0)for(f.length=pe+de.length,c=0;c<de.length;c++)f[pe+c]=de[c];else e.deps=f=de;if(!rt)for(c=pe;c<f.length;c++)((h=f[c]).reactions??(h.reactions=[])).push(e)}else f!==null&&pe<f.length&&(Pt(e,pe),f.length=pe);return u}finally{de=t,pe=n,Qe=i,J=r,rt=a,He=o,Q=l}}function ba(e,t){let n=t.reactions;if(n!==null){var i=Ir.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}n===null&&t.f&Ne&&(de===null||!de.includes(t))&&(qe(t,en),t.f&(lt|Zt)||(t.f^=Zt),Pt(t,0))}function Pt(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)ba(e,n[i])}function on(e){var t=e.f;if(!(t&wt)){qe(e,ke);var n=U,i=Q;U=e;try{t&Qt?ha(e):Oi(e),Di(e),Mi(e);var r=Ki(e);e.teardown=typeof r=="function"?r:null,e.wv=Ui;var a=e.deps,o;wn&&zr&&e.f&et}catch(l){an(l,e,n,i||e.ctx)}finally{U=n}}}function zi(){if(gt>1e3){gt=0;try{qr()}catch(e){if(Ct!==null)an(e,Ct,null);else throw e}}gt++}function Yi(e){var t=e.length;if(t!==0){zi();var n=ht;ht=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&ke||(r.f^=ke);var a=[];$i(r,a),xa(a)}}finally{ht=n}}}function xa(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(wt|Re)))try{qt(i)&&(on(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Ri(i):i.fn=null))}catch(r){an(r,i,null,i.ctx)}}}function Sa(){if(It=!1,gt>1001)return;const e=it;it=[],Yi(e),It||(gt=0,Ct=null)}function ln(e){zt===Vi&&(It||(It=!0,queueMicrotask(Sa))),Ct=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(Dt|De)){if(!(n&ke))return;t.f^=ke}}it.push(t)}function $i(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&De)!==0,o=a&&(r&ke)!==0,l=n.next;if(!o&&!(r&Re))if(r&Mt){if(a)n.f^=ke;else try{qt(n)&&on(n)}catch(c){an(c,n,null,n.ctx)}var d=n.first;if(d!==null){n=d;continue}}else r&yi&&i.push(n);if(l===null){let c=n.parent;for(;c!==null;){if(e===c)break e;var u=c.next;if(u!==null){n=u;continue e}c=c.parent}}n=l}for(var f=0;f<i.length;f++)d=i[f],t.push(d),$i(d,t)}function Zi(e){var t=zt,n=it;try{zi();const r=[];zt=ma,it=r,It=!1,Yi(n);var i=e==null?void 0:e();return ga(),(it.length>0||r.length>0)&&Zi(),gt=0,Ct=null,i}finally{zt=t,it=n}}async function ni(){await Promise.resolve(),Zi()}function s(e){var f;var t=e.f,n=(t&Ne)!==0;if(n&&t&wt){var i=Li(e);return Hn(e),i}if(J!==null){He!==null&&He.includes(e)&&Wr();var r=J.deps;e.rv<Sn&&(e.rv=Sn,de===null&&r!==null&&r[pe]===e?pe++:de===null?de=[e]:de.push(e),Qe!==null&&U!==null&&U.f&ke&&!(U.f&De)&&Qe.includes(e)&&(qe(U,et),ln(U)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,l=a;o!==null;)if(o.f&Ne){var d=o;l=d,o=d.parent}else{var u=o;(f=u.deriveds)!=null&&f.includes(l)||(u.deriveds??(u.deriveds=[])).push(l);break}return n&&(a=e,qt(a)&&Ni(a)),e.v}function ze(e){const t=J;try{return J=null,e()}finally{J=t}}const Ea=-7169;function qe(e,t){e.f=e.f&Ea|t}function Ta(e){return Ji().get(e)}function Gi(e,t){return Ji().set(e,t),t}function Ji(e){return Q===null&&Bi(),Q.c??(Q.c=new Map(Aa(Q)||void 0))}function Aa(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function ae(e,t=!1,n){Q={p:Q,c:null,e:null,m:!1,s:e,x:null,l:null},bt&&!t&&(Q.l={s:null,u:null,r1:[],r2:ye(!1)})}function oe(e){const t=Q;if(t!==null){const o=t.e;if(o!==null){var n=U,i=J;t.e=null;try{for(var r=0;r<o.length;r++){var a=o[r];Ie(a.effect),Fe(a.reaction),Rt(a.fn)}}finally{Ie(n),Fe(i)}}Q=t.p,t.m=!0}return{}}function Ia(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Xe in e)En(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&Xe in n&&En(n)}}}function En(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let i in e)try{En(e[i],t)}catch{}const n=Mn(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=pi(n);for(let r in i){const a=i[r].get;if(a)try{a.call(e)}catch{}}}}}function Ca(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Pa=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function ja(e){return Pa.includes(e)}const La={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Na(e){return e=e.toLowerCase(),La[e]??e}const Ma=["touchstart","touchmove"];function Da(e){return Ma.includes(e)}function Oa(e,t){if(t){const n=document.body;e.autofocus=!0,Ht(()=>{document.activeElement===n&&e.focus()})}}let ii=!1;function Ra(){ii||(ii=!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 Xi(e){var t=J,n=U;Fe(null),Ie(null);try{return e()}finally{Fe(t),Ie(n)}}function Ha(e,t,n,i=n){e.addEventListener(t,()=>Xi(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),Ra()}const Qi=new Set,Tn=new Set;function er(e,t,n,i){function r(a){if(i.capture||Tt.call(t,a),!a.cancelBubble)return Xi(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ht(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function re(e,t,n,i,r){var a={capture:i,passive:r},o=er(e,t,n,a);(t===document.body||t===window||t===document)&&va(()=>{t.removeEventListener(e,o,a)})}function ce(e){for(var t=0;t<e.length;t++)Qi.add(e[t]);for(var n of Tn)n(e)}function Tt(e){var w;var t=this,n=t.ownerDocument,i=e.type,r=((w=e.composedPath)==null?void 0:w.call(e))||[],a=r[0]||e.target,o=0,l=e.__root;if(l){var d=r.indexOf(l);if(d!==-1&&(t===document||t===window)){e.__root=t;return}var u=r.indexOf(t);if(u===-1)return;d<=u&&(o=d)}if(a=r[o]||e.target,a!==t){Cr(e,"currentTarget",{configurable:!0,get(){return a||n}});var f=J,c=U;Fe(null),Ie(null);try{for(var h,g=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var v=a["__"+i];if(v!==void 0&&!a.disabled)if(Ln(v)){var[p,...y]=v;p.apply(a,[e,...y])}else v.call(a,e)}catch(S){h?g.push(S):h=S}if(e.cancelBubble||m===t||m===null)break;a=m}if(h){for(let S of g)queueMicrotask(()=>{throw S});throw h}}finally{e.__root=t,delete e.currentTarget,Fe(f),Ie(c)}}}function Vn(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function ot(e,t){var n=U;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function I(e,t){var n=(t&ra)!==0,i=(t&aa)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=Vn(a?e:"<!>"+e),n||(r=at(r)));var o=i?document.importNode(r,!0):r.cloneNode(!0);if(n){var l=at(o),d=o.lastChild;ot(l,d)}else ot(o,o);return o}}function be(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=Vn(r),l=at(o);a=at(l)}var d=a.cloneNode(!0);return ot(d,d),d}}function Ye(e=""){{var t=Ot(e+"");return ot(t,t),t}}function tt(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Ot();return e.append(t,n),ot(t,n),e}function k(e,t){e!==null&&e.before(t)}let Jt=!0;function ri(e){Jt=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 Un(e,t){return Fa(e,t)}const ft=new Map;function Fa(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:o=!0}){la();var l=new Set,d=c=>{for(var h=0;h<c.length;h++){var g=c[h];if(!l.has(g)){l.add(g);var m=Da(g);t.addEventListener(g,Tt,{passive:m});var v=ft.get(g);v===void 0?(document.addEventListener(g,Tt,{passive:m}),ft.set(g,1)):ft.set(g,v+1)}}};d(Nn(Qi)),Tn.add(d);var u=void 0,f=_a(()=>{var c=n??t.appendChild(Ot());return Ke(()=>{if(a){ae({});var h=Q;h.c=a}r&&(i.$$events=r),Jt=o,u=e(c,i)||{},Jt=!0,a&&oe()}),()=>{var m;for(var h of l){t.removeEventListener(h,Tt);var g=ft.get(h);--g===0?(document.removeEventListener(h,Tt),ft.delete(h)):ft.set(h,g)}Tn.delete(d),c!==n&&((m=c.parentNode)==null||m.removeChild(c))}});return An.set(u,f),u}let An=new WeakMap;function tr(e,t){const n=An.get(e);return n?(An.delete(e),n(t)):Promise.resolve()}function H(e,t,n=!1){var i=e,r=null,a=null,o=_e,l=n?kt:0,d=!1;const u=(c,h=!0)=>{d=!0,f(h,c)},f=(c,h)=>{o!==(o=c)&&(o?(r?At(r):h&&(r=Ke(()=>h(i))),a&&mt(a,()=>{a=null})):(a?At(a):h&&(a=Ke(()=>h(i))),r&&mt(r,()=>{r=null})))};st(()=>{d=!1,t(u),d||f(null,null)},l)}function nr(e,t,n){var i=e,r=_e,a,o=Ft()?Or:tn;st(()=>{o(r,r=t())&&(a&&mt(a),a=Ke(()=>n(i)))})}function pt(e,t){return t}function qa(e,t,n,i){for(var r=[],a=t.length,o=0;o<a;o++)qn(t[o].e,r,!0);var l=a>0&&r.length===0&&n!==null;if(l){var d=n.parentNode;sa(d),d.append(n),i.clear(),Ge(e,t[0].prev,t[a-1].next)}Hi(r,()=>{for(var u=0;u<a;u++){var f=t[u];l||(i.delete(f.k),Ge(e,f.prev,f.next)),Me(f.e,!l)}})}function nt(e,t,n,i,r,a=null){var o=e,l={flags:t,items:new Map,first:null},d=(t&Si)!==0;if(d){var u=e;o=u.appendChild(Ot())}var f=null,c=!1;st(()=>{var h=n(),g=Ln(h)?h:h==null?[]:Nn(h),m=g.length;if(!(c&&m===0)){c=m===0;{var v=J;Ba(g,l,o,r,t,(v.f&Re)!==0,i)}a!==null&&(m===0?f?At(f):f=Ke(()=>a(o)):f!==null&&mt(f,()=>{f=null})),n()}})}function Ba(e,t,n,i,r,a,o,l){var M,K,ee,se;var d=(r&$r)!==0,u=(r&(On|Rn))!==0,f=e.length,c=t.items,h=t.first,g=h,m,v=null,p,y=[],w=[],S,j,x,E;if(d)for(E=0;E<f;E+=1)S=e[E],j=o(S,E),x=c.get(j),x!==void 0&&((M=x.a)==null||M.measure(),(p??(p=new Set)).add(x));for(E=0;E<f;E+=1){if(S=e[E],j=o(S,E),x=c.get(j),x===void 0){var C=g?g.e.nodes_start:n;v=Ua(C,t,v,v===null?t.first:v.next,S,j,E,i,r),c.set(j,v),y=[],w=[],g=v.next;continue}if(u&&Va(x,S,E,r),x.e.f&Re&&(At(x.e),d&&((K=x.a)==null||K.unfix(),(p??(p=new Set)).delete(x))),x!==g){if(m!==void 0&&m.has(x)){if(y.length<w.length){var A=w[0],O;v=A.prev;var B=y[0],Y=y[y.length-1];for(O=0;O<y.length;O+=1)ai(y[O],A,n);for(O=0;O<w.length;O+=1)m.delete(w[O]);Ge(t,B.prev,Y.next),Ge(t,v,B),Ge(t,Y,A),g=A,v=Y,E-=1,y=[],w=[]}else m.delete(x),ai(x,g,n),Ge(t,x.prev,x.next),Ge(t,x,v===null?t.first:v.next),Ge(t,v,x),v=x;continue}for(y=[],w=[];g!==null&&g.k!==j;)(a||!(g.e.f&Re))&&(m??(m=new Set)).add(g),w.push(g),g=g.next;if(g===null)continue;x=g}y.push(x),v=x,g=x.next}if(g!==null||m!==void 0){for(var N=m===void 0?[]:Nn(m);g!==null;)(a||!(g.e.f&Re))&&N.push(g),g=g.next;var F=N.length;if(F>0){var $=r&Si&&f===0?n:null;if(d){for(E=0;E<F;E+=1)(ee=N[E].a)==null||ee.measure();for(E=0;E<F;E+=1)(se=N[E].a)==null||se.fix()}qa(t,N,$,c)}}d&&Ht(()=>{var ve;if(p!==void 0)for(x of p)(ve=x.a)==null||ve.apply()}),U.first=t.first&&t.first.e,U.last=v&&v.e}function Va(e,t,n,i){i&On&&bn(e.v,t),i&Rn?bn(e.i,n):e.i=n}function Ua(e,t,n,i,r,a,o,l,d,u){var f=(d&On)!==0,c=(d&Zr)===0,h=f?c?Ti(r):ye(r):r,g=d&Rn?ye(o):o,m={i:g,v:h,k:a,a:null,e:null,prev:n,next:i};try{return m.e=Ke(()=>l(e,h,g),Ii),m.e.prev=n&&n.e,m.e.next=i&&i.e,n===null?t.first=m:(n.next=m,n.e.next=m.e),i!==null&&(i.prev=m,i.e.prev=m.e),m}finally{}}function ai(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var o=nn(a);r.before(a),a=o}}function Ge(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 Wa(e,t,n,i,r){var a=e,o="",l;st(()=>{o!==(o=t()??"")&&(l!==void 0&&(Me(l),l=void 0),o!==""&&(l=Ke(()=>{var d=o+"",u=Vn(d);ot(at(u),u.lastChild),a.before(u)})))})}function St(e,t,...n){var i=e,r=Le,a;st(()=>{r!==(r=t())&&(a&&(Me(a),a=null),a=Ke(()=>r(i,...n)))},kt)}function Ka(e,t,n,i,r,a){var o,l,d=null,u=e,f;st(()=>{const c=t()||null;var h=c==="svg"?Ei:null;c!==o&&(f&&(c===null?mt(f,()=>{f=null,l=null}):c===l?At(f):(Me(f),ri(!1))),c&&c!==l&&(f=Ke(()=>{d=h?document.createElementNS(h,c):document.createElement(c),ot(d,d);{var g=d.appendChild(Ot());i(d,g)}U.nodes_end=d,u.before(d)})),o=c,o&&(l=o),ri(!0))},kt)}function sn(e,t,n){Rt(()=>{var i=ze(()=>t(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};Fn(()=>{var o=n();Ia(o),r&&tn(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function ir(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=ir(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function za(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=ir(e))&&(i&&(i+=" "),i+=t);return i}function Ya(e){return typeof e=="object"?za(e):e??""}function $a(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ie(e,t,n,i){var r=e.__attributes??(e.__attributes={});r[t]!==(r[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Dr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&rr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Za(e,t,n,i,r=!1,a=!1,o=!1){var l=t||{},d=e.tagName==="OPTION";for(var u in t)u in n||(n[u]=null);n.class&&(n.class=Ya(n.class)),n.class=n.class?n.class+" "+i:i;var f=rr(e),c=e.__attributes??(e.__attributes={});for(const w in n){let S=n[w];if(d&&w==="value"&&S==null){e.value=e.__value="",l[w]=S;continue}var h=l[w];if(S!==h){l[w]=S;var g=w[0]+w[1];if(g!=="$$"){if(g==="on"){const j={},x="$$"+w;let E=w.slice(2);var m=ja(E);if(Ca(E)&&(E=E.slice(0,-7),j.capture=!0),!m&&h){if(S!=null)continue;e.removeEventListener(E,l[x],j),l[x]=null}if(S!=null)if(m)e[`__${E}`]=S,ce([E]);else{let C=function(A){l[w].call(this,A)};var y=C;l[x]=er(E,e,C,j)}else m&&(e[`__${E}`]=void 0)}else if(w==="style"&&S!=null)e.style.cssText=S+"";else if(w==="autofocus")Oa(e,!!S);else if(w==="__value"||w==="value"&&S!=null)e.value=e[w]=e.__value=S;else if(w==="selected"&&d)$a(e,S);else{var v=w;r||(v=Na(v));var p=v==="defaultValue"||v==="defaultChecked";if(S==null&&!a&&!p)if(c[w]=null,v==="value"||v==="checked"){let j=e;if(v==="value"){let x=j.defaultValue;j.removeAttribute(v),j.defaultValue=x}else{let x=j.defaultChecked;j.removeAttribute(v),j.defaultChecked=x}}else e.removeAttribute(w);else p||f.includes(v)&&(a||typeof S!="string")?e[v]=S:typeof S!="function"&&ie(e,v,S)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return l}var oi=new Map;function rr(e){var t=oi.get(e.nodeName);if(t)return t;oi.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=pi(i);for(var a in n)n[a].set&&t.push(a);i=Mn(i)}return t}function Ga(e,t,n){var i=e.__className,r=Ja(t);(i!==r||Ii)&&(t==null?e.removeAttribute("class"):e.className=r,e.__className=r)}function Ja(e,t){return(e??"")+""}function le(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 cn(e,t,n,i){var r=e.__styles??(e.__styles={});r[t]!==n&&(r[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Xa=()=>performance.now(),Ue={tick:e=>requestAnimationFrame(e),now:()=>Xa(),tasks:new Set};function ar(){const e=Ue.now();Ue.tasks.forEach(t=>{t.c(e)||(Ue.tasks.delete(t),t.f())}),Ue.tasks.size!==0&&Ue.tick(ar)}function Qa(e){let t;return Ue.tasks.size===0&&Ue.tick(ar),{promise:new Promise(n=>{Ue.tasks.add(t={c:e,f:n})}),abort(){Ue.tasks.delete(t)}}}function Ut(e,t){e.dispatchEvent(new CustomEvent(t))}function eo(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 li(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=eo(r.trim());t[o]=a.trim()}return t}const to=e=>e;function Ee(e,t,n,i){var r=(e&ta)!==0,a=(e&na)!==0,o=r&&a,l=(e&ia)!==0,d=o?"both":r?"in":"out",u,f=t.inert,c,h;function g(){var w=J,S=U;Fe(null),Ie(null);try{return u??(u=n()(t,(i==null?void 0:i())??{},{direction:d}))}finally{Fe(w),Ie(S)}}var m={is_global:l,in(){var w;if(t.inert=f,!r){h==null||h.abort(),(w=h==null?void 0:h.reset)==null||w.call(h);return}a||c==null||c.abort(),Ut(t,"introstart"),c=In(t,g(),h,1,()=>{Ut(t,"introend"),c==null||c.abort(),c=u=void 0})},out(w){if(!a){w==null||w(),u=void 0;return}t.inert=!0,Ut(t,"outrostart"),h=In(t,g(),c,0,()=>{Ut(t,"outroend"),w==null||w()})},stop:()=>{c==null||c.abort(),h==null||h.abort()}},v=U;if((v.transitions??(v.transitions=[])).push(m),r&&Jt){var p=l;if(!p){for(var y=v.parent;y&&y.f&kt;)for(;(y=y.parent)&&!(y.f&Qt););p=!y||(y.f&wi)!==0}p&&Rt(()=>{ze(()=>m.in())})}}function In(e,t,n,i,r){var a=i===1;if(_t(t)){var o,l=!1;return Ht(()=>{if(!l){var p=t({direction:a?"in":"out"});o=In(e,p,n,i,r)}}),{abort:()=>{l=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return r(),{abort:Le,deactivate:Le,reset:Le,t:()=>i};const{delay:d=0,css:u,tick:f,easing:c=to}=t;var h=[];if(a&&n===void 0&&(f&&f(0,1),u)){var g=li(u(0,1));h.push(g,g)}var m=()=>1-i,v=e.animate(h,{duration:d});return v.onfinish=()=>{var p=(n==null?void 0:n.t())??1-i;n==null||n.abort();var y=i-p,w=t.duration*Math.abs(y),S=[];if(w>0){if(u)for(var j=Math.ceil(w/16.666666666666668),x=0;x<=j;x+=1){var E=p+y*c(x/j),C=u(E,1-E);S.push(li(C))}m=()=>{var A=v.currentTime;return p+y*c(A/w)},f&&Qa(()=>{if(v.playState!=="running")return!1;var A=m();return f(A,1-A),!0})}v=e.animate(S,{duration:w,fill:"forwards"}),v.onfinish=()=>{m=()=>i,f==null||f(i,1-i),r()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=Le)},deactivate:()=>{r=Le},reset:()=>{i===0&&(f==null||f(1,0))},t:()=>m()}}function no(e,t,n=t){var i=Ft();Ha(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=mn(e)?pn(a):a,n(a),i&&a!==(a=t())){var o=e.selectionStart,l=e.selectionEnd;e.value=a??"",l!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(l,e.value.length))}}),ze(t)==null&&e.value&&n(mn(e)?pn(e.value):e.value),Fn(()=>{var r=t();mn(e)&&r===pn(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function mn(e){var t=e.type;return t==="number"||t==="range"}function pn(e){return e===""?null:+e}function si(e,t){return e===t||(e==null?void 0:e[Xe])===t}function Bt(e={},t,n,i){return Rt(()=>{var r,a;return Fn(()=>{r=a,a=[],ze(()=>{e!==n(...a)&&(t(e,...a),r&&si(n(...r),e)&&t(null,...r))})}),()=>{Ht(()=>{a&&si(n(...a),e)&&t(null,...a)})}}),e}function io(e,t,n){if(e==null)return t(void 0),Le;const i=ze(()=>e.subscribe(t,n));return i.unsubscribe?()=>i.unsubscribe():i}let Wt=!1;function ro(e){var t=Wt;try{return Wt=!1,[e(),Wt]}finally{Wt=t}}const ao={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 oo(e,t,n){return new Proxy({props:e,exclude:t},ao)}const lo={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(_t(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i)return i[t]}},set(e,t,n){let i=e.props.length;for(;i--;){let r=e.props[i];_t(r)&&(r=r());const a=Je(r,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(_t(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i){const r=Je(i,t);return r&&!r.configurable&&(r.configurable=!0),r}}},has(e,t){if(t===Xe||t===bi)return!1;for(let n of e.props)if(_t(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){_t(n)&&(n=n());for(const i in n)t.includes(i)||t.push(i)}return t}};function so(...e){return new Proxy({props:e},lo)}function ci(e){for(var t=U,n=U;t!==null&&!(t.f&(De|Dt));)t=t.parent;try{return Ie(t),e()}finally{Ie(n)}}function R(e,t,n,i){var C;var r=(n&Gr)!==0,a=!bt||(n&Jr)!==0,o=(n&Qr)!==0,l=(n&ea)!==0,d=!1,u;o?[u,d]=ro(()=>e[t]):u=e[t];var f=Xe in e||bi in e,c=o&&(((C=Je(e,t))==null?void 0:C.set)??(f&&t in e&&(A=>e[t]=A)))||void 0,h=i,g=!0,m=!1,v=()=>(m=!0,g&&(g=!1,l?h=ze(i):h=i),h);u===void 0&&i!==void 0&&(c&&a&&Br(),u=v(),c&&c(u));var p;if(a)p=()=>{var A=e[t];return A===void 0?v():(g=!0,m=!1,A)};else{var y=ci(()=>(r?V:ca)(()=>e[t]));y.f|=Nr,p=()=>{var A=s(y);return A!==void 0&&(h=void 0),A===void 0?h:A}}if(!(n&Xr))return p;if(c){var w=e.$$legacy;return function(A,O){return arguments.length>0?((!a||!O||w||d)&&c(O?p():A),A):p()}}var S=!1,j=!1,x=Ti(u),E=ci(()=>V(()=>{var A=p(),O=s(x);return S?(S=!1,j=!0,O):(j=!1,x.v=A)}));return r||(E.equals=Dn),function(A,O){if(arguments.length>0){const B=O?s(E):a&&o?Z(A):A;return E.equals(B)||(S=!0,L(x,B),m&&h!==void 0&&(h=B),ze(()=>s(E))),A}return s(E)}}function ct(e){Q===null&&Bi(),bt&&Q.l!==null?co(Q).m.push(e):rn(()=>{const t=ze(e);if(typeof t=="function")return t})}function co(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const uo="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(uo);const or="https://www.playpilot.com",un="https://partner-api.playpilot.tech/1.0.0",lr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",we=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",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",TotalInjectionsCount:"ali_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed"}),vt=[];function sr(e,t=Le){let n=null;const i=new Set;function r(l){if(tn(e,l)&&(e=l,n)){const d=!vt.length;for(const u of i)u[1](),vt.push(u,e);if(d){for(let u=0;u<vt.length;u+=2)vt[u][0](vt[u+1]);vt.length=0}}}function a(l){r(l(e))}function o(l,d=Le){const u=[l,d];return i.add(u),i.size===1&&(n=t(r,a)||Le),l(e),()=>{i.delete(u),i.size===0&&n&&(n(),n=null)}}return{set:r,update:a,subscribe:o}}function ui(e){let t;return io(e,n=>t=n)(),t}const cr=sr(null),ur=sr(null),fo="https://insights.playpilot.net";async function Te(e,t=null,n={}){const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,n.organization_sid=ui(cr),n.domain_sid=ui(ur),fetch(fo,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}function vo({organizationSid:e=null,domainSid:t=null}){cr.set(e||null),ur.set(t||null)}const Wn="EncryptedToken",dr="articleReplacementEditToken",fr="playpilot-editorial-mode";async function vr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=_n();if(!n)throw new Error("No token was provided");const i=Kn(e);if(!i)throw new Error("Could not be authenticated");const r=await fetch(un+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:i})});if(!r.ok)throw r;return _o(i),!0}catch(n){console.error(n),Te(we.AuthFailed)}finally{mo()}return!1}function Kn(e=""){var i,r;const t=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(dr);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${Wn}=`).pop())==null?void 0:r.split(";")[0])||""}function _o(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const i="expires="+t.toUTCString();document.cookie=Wn+"="+e+";"+i+";path=/"}function ho(){document.cookie=Wn+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function _r(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get(fr)==="true"||!!e}function go(){const e=new URL(window.location.href);e.searchParams.set(fr,"true"),window.history.replaceState({},"",e)}function mo(){const e=new URL(window.location.href);e.searchParams.delete(dr),window.history.replaceState({},"",e)}function hr(e){let t=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t=t*31+i>>>0}return t.toString(16)}const _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),po={"Where To Stream Online":{[_.English]:"Where to stream online",[_.Swedish]:"Var kan man streama online",[_.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},"Title Unavailable":{[_.English]:"This title is not currently available to stream.",[_.Swedish]:"Den här titeln går inte att streama just nu.",[_.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[_.English]:"is not currently available to stream.",[_.Swedish]:"går inte att streama just nu.",[_.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[_.English]:"is available to stream on",[_.Swedish]:"finns att streama på",[_.Danish]:"kan streames på"},"Is Available To Stream":{[_.English]:"is available to stream.",[_.Swedish]:"finns att streama.",[_.Danish]:"kan streames."},"View Streaming Options":{[_.English]:"View streaming options",[_.Swedish]:"Se streamingalternativ",[_.Danish]:"Se streamingmuligheder"},And:{[_.English]:"and",[_.Swedish]:"och",[_.Danish]:"og"},Minutes:{[_.English]:"minutes",[_.Swedish]:"minuter",[_.Danish]:"minutter"},"Type: movie":{[_.English]:"Movie",[_.Swedish]:"Film",[_.Danish]:"Film"},"Type: series":{[_.English]:"Series",[_.Swedish]:"Serie",[_.Danish]:"Serie"},Stream:{[_.English]:"Stream",[_.Swedish]:"Streama",[_.Danish]:"Stream"},Buy:{[_.English]:"Buy",[_.Swedish]:"Köp",[_.Danish]:"Køb"},Rent:{[_.English]:"Rent",[_.Swedish]:"Hyra",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyra",[_.Danish]:"Lej eller køb"},All:{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},Unscripted:{[_.English]:"Unscripted",[_.Swedish]:"Oscripterat",[_.Danish]:"Umanuskriptet"},Independent:{[_.English]:"Independent",[_.Swedish]:"Indie",[_.Danish]:"Indie"},"Game Show":{[_.English]:"Game Show",[_.Swedish]:"Gameshow",[_.Danish]:"Quizshow"},"Film Noir":{[_.English]:"Film Noir",[_.Swedish]:"Film noir",[_.Danish]:"Film noir"},Entertainment:{[_.English]:"Entertainment",[_.Swedish]:"Underhållning",[_.Danish]:"Underholdning"},News:{[_.English]:"News",[_.Swedish]:"Nyheter",[_.Danish]:"Nyheder"},Short:{[_.English]:"Short",[_.Swedish]:"Kortfilm",[_.Danish]:"Kortfilm"},Bollywood:{[_.English]:"Bollywood",[_.Swedish]:"Bollywood",[_.Danish]:"Bollywood"},Concert:{[_.English]:"Concert",[_.Swedish]:"Konsert",[_.Danish]:"Koncert"},Arthouse:{[_.English]:"Arthouse",[_.Swedish]:"Arthouse",[_.Danish]:"Arthouse"},"Alternate Version":{[_.English]:"Alternate Version",[_.Swedish]:"Alternativ version",[_.Danish]:"Alternativ version"},"Reality TV":{[_.English]:"Reality TV",[_.Swedish]:"Reality-TV",[_.Danish]:"Reality-TV"},Culture:{[_.English]:"Culture",[_.Swedish]:"Kultur",[_.Danish]:"Kultur"},Drama:{[_.English]:"Drama",[_.Swedish]:"Drama",[_.Danish]:"Drama"},Crime:{[_.English]:"Crime",[_.Swedish]:"Kriminal",[_.Danish]:"Krimi"},Western:{[_.English]:"Western",[_.Swedish]:"Western",[_.Danish]:"Western"},Thriller:{[_.English]:"Thriller",[_.Swedish]:"Thriller",[_.Danish]:"Thriller"},Animation:{[_.English]:"Animation",[_.Swedish]:"Animerat",[_.Danish]:"Animation"},Mystery:{[_.English]:"Mystery",[_.Swedish]:"Mysterium",[_.Danish]:"Mysterium"},Science:{[_.English]:"Science",[_.Swedish]:"Vetenskap",[_.Danish]:"Videnskab"},Nature:{[_.English]:"Nature",[_.Swedish]:"Natur",[_.Danish]:"Natur"},War:{[_.English]:"War",[_.Swedish]:"Krig",[_.Danish]:"Krig"},"Sci-Fi":{[_.English]:"Sci-Fi",[_.Swedish]:"Sci-fi",[_.Danish]:"Sci-fi"},Documentary:{[_.English]:"Documentary",[_.Swedish]:"Dokumentär",[_.Danish]:"Dokumentar"},"Stand-up":{[_.English]:"Stand-up",[_.Swedish]:"Standup",[_.Danish]:"Stand-up"},"Talk Show":{[_.English]:"Talk Show",[_.Swedish]:"Talkshow",[_.Danish]:"Talkshow"},Fantasy:{[_.English]:"Fantasy",[_.Swedish]:"Fantasy",[_.Danish]:"Fantasy"},History:{[_.English]:"History",[_.Swedish]:"Historia",[_.Danish]:"Historie"},Adventure:{[_.English]:"Adventure",[_.Swedish]:"Äventyr",[_.Danish]:"Eventyr"},Action:{[_.English]:"Action",[_.Swedish]:"Action",[_.Danish]:"Action"},Horror:{[_.English]:"Horror",[_.Swedish]:"Skräck",[_.Danish]:"Gyser"},Comedy:{[_.English]:"Comedy",[_.Swedish]:"Komedi",[_.Danish]:"Komedie"},Biography:{[_.English]:"Biography",[_.Swedish]:"Biografi",[_.Danish]:"Biografi"},Music:{[_.English]:"Music",[_.Swedish]:"Musik",[_.Danish]:"Musik"},Sport:{[_.English]:"Sport",[_.Swedish]:"Sport",[_.Danish]:"Sport"},Romance:{[_.English]:"Romance",[_.Swedish]:"Romantik",[_.Danish]:"Romantik"},Kids:{[_.English]:"Kids",[_.Swedish]:"Barn",[_.Danish]:"Børn"},Lifestyle:{[_.English]:"Lifestyle",[_.Swedish]:"Livsstil",[_.Danish]:"Livsstil"},Musical:{[_.English]:"Musical",[_.Swedish]:"Musikal",[_.Danish]:"Musical"},Anime:{[_.English]:"Anime",[_.Swedish]:"Anime",[_.Danish]:"Anime"},Family:{[_.English]:"Family",[_.Swedish]:"Familj",[_.Danish]:"Familie"}};function he(e,t=gr()){var n;return((n=po[e])==null?void 0:n[t])||e}function gr(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(_);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");return n&&t.includes(n)?n:_.English}const yo=e=>e;function zn(e){const t=e-1;return t*t*t+1}function di(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Yn(e,{delay:t=0,duration:n=400,easing:i=yo}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function dn(e,{delay:t=0,duration:n=400,easing:i=zn,x:r=0,y:a=0,opacity:o=0}={}){const l=getComputedStyle(e),d=+l.opacity,u=l.transform==="none"?"":l.transform,f=d*(1-o),[c,h]=di(r),[g,m]=di(a);return{delay:t,duration:n,easing:i,css:(v,p)=>`
|
|
4
4
|
transform: ${u} translate(${(1-v)*c}${h}, ${(1-v)*g}${m});
|
|
5
|
-
opacity: ${d-f*p}`}}function jt(e,{delay:t=0,duration:n=400,easing:i=zn,axis:r="y"}={}){const a=getComputedStyle(e),o=+a.opacity,l=r==="y"?"height":"width",d=parseFloat(a[l]),u=r==="y"?["top","bottom"]:["left","right"],f=u.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(a[`padding${f[0]}`]),h=parseFloat(a[`padding${f[1]}`]),g=parseFloat(a[`margin${f[0]}`]),m=parseFloat(a[`margin${f[1]}`]),v=parseFloat(a[`border${f[0]}Width`]),p=parseFloat(a[`border${f[1]}Width`]);return{delay:t,duration:n,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*o};${l}: ${y*d}px;padding-${u[0]}: ${y*c}px;padding-${u[1]}: ${y*h}px;margin-${u[0]}: ${y*g}px;margin-${u[1]}: ${y*m}px;border-${u[0]}-width: ${y*v}px;border-${u[1]}-width: ${y*p}px;min-${l}: 0`}}function
|
|
5
|
+
opacity: ${d-f*p}`}}function jt(e,{delay:t=0,duration:n=400,easing:i=zn,axis:r="y"}={}){const a=getComputedStyle(e),o=+a.opacity,l=r==="y"?"height":"width",d=parseFloat(a[l]),u=r==="y"?["top","bottom"]:["left","right"],f=u.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(a[`padding${f[0]}`]),h=parseFloat(a[`padding${f[1]}`]),g=parseFloat(a[`margin${f[0]}`]),m=parseFloat(a[`margin${f[1]}`]),v=parseFloat(a[`border${f[0]}Width`]),p=parseFloat(a[`border${f[1]}Width`]);return{delay:t,duration:n,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*o};${l}: ${y*d}px;padding-${u[0]}: ${y*c}px;padding-${u[1]}: ${y*h}px;margin-${u[0]}: ${y*g}px;margin-${u[1]}: ${y*m}px;border-${u[0]}-width: ${y*v}px;border-${u[1]}-width: ${y*p}px;min-${l}: 0`}}function wo(e,{delay:t=0,duration:n=400,easing:i=zn,start:r=0,opacity:a=0}={}){const o=getComputedStyle(e),l=+o.opacity,d=o.transform==="none"?"":o.transform,u=1-r,f=l*(1-a);return{delay:t,duration:n,easing:i,css:(c,h)=>`
|
|
6
6
|
transform: ${d} scale(${1-u*h});
|
|
7
7
|
opacity: ${l-f*h}
|
|
8
|
-
`}}var yo=I('<div class="popover svelte-qkpa3e" tabindex="-1" aria-hidden="true"><div class="dialog svelte-qkpa3e"><!></div></div>');function wo(e,t){ae(t,!0);let n=O(t,"maxHeight",15);Gi("scope","popover");let i=z(null),r=z(!1);ct(async()=>{await ni(),a(),await ni(),o()});function a(){if(!s(i))return;const{top:c,right:h,bottom:g,height:m}=s(i).getBoundingClientRect(),v=l();N(r,Z(c-v<0&&window.innerHeight-g>c+m));const p=window.innerWidth-h-v;h+v>window.innerWidth&&(s(i).style.left=`${p}px`)}function o(){if(!s(i))return;const{top:c,height:h}=s(i).getBoundingClientRect(),g=l(),m=s(r)?window.innerHeight-c-g:c+h-g;n(Math.min(m,window.innerHeight*.8))}function l(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var d=yo(),u=b(d),f=b(u);St(f,()=>t.children),Bt(d,c=>N(i,c),()=>s(i)),M(()=>{le(d,"flip",s(r)),cn(d,"--max-height",n()?n()+"px":null)}),Ee(3,u,()=>dn,()=>({duration:100,y:10})),k(e,d),oe()}const ko=[{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"}];var bo=I('<div class="genre svelte-13nhocm"> </div>'),xo=(e,t)=>N(t,!0),So=I('<button class="genre expand svelte-13nhocm"> </button>'),Eo=I("<!> <!>",1);function To(e,t){ae(t,!0);let n=z(!1);const i=W(()=>s(n)?t.genres:[t.genres[0]]);var r=Eo(),a=te(r);nt(a,17,()=>s(i),pt,(d,u)=>{var f=tt();const c=W(()=>{var m;return(m=ko.find(v=>v.slug===s(u)))==null?void 0:m.name});var h=te(f);{var g=m=>{var v=bo(),p=b(v);M(()=>$(p,_e(s(c)))),k(m,v)};R(h,m=>{s(c)&&m(g)})}k(d,f)});var o=T(a,2);{var l=d=>{var u=So();u.__click=[xo,n];var f=b(u);M(()=>$(f,`+${t.genres.length-1}`)),k(d,u)};R(o,d=>{!s(n)&&t.genres.length>1&&d(l)})}k(e,r),oe()}ce(["click"]);function Ao(e){let t=[];for(const n of e){let i=n;const r=t.find(l=>l.name===i.name),a=r==null?void 0:r.extra_info.category,o=i.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(l=>l.name!==i.name),i={...i,extra_info:{...i.extra_info,category:"TVOD"}}),t.push(i)}return t}function Ae(e,t=1){e.role="heading",e.ariaLevel=t.toString()}zr();var Io=ke('<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 Co(e){var t=Io();k(e,t)}function Nt(e){return e.replace("/src/img","")}var Po=(e,t,n)=>t(n()),jo=I('<div class="arrow svelte-1itidbd"><!></div>'),No=I('<a target="_blank" class="playlink svelte-1itidbd" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1itidbd"> <div><span class="name svelte-1itidbd"> </span> <div class="category svelte-1itidbd"> </div></div> <!></a>'),Lo=I('<div class="playlink empty svelte-1itidbd"> </div>'),Mo=I('<div class="heading svelte-1itidbd"> </div> <div class="playlinks svelte-1itidbd"><!> <!></div>',1);function Do(e,t){ae(t,!0);const n=O(t,"list",3,!1),i=Ea("scope")==="modal",r=W(()=>t.playlinks.filter(v=>!!v.logo_url)),a=W(()=>Ao(s(r))),o={SVOD:_e("Stream"),BUY:_e("Buy"),RENT:_e("Rent"),TVOD:_e("Rent Or Buy")};function l(v){Te(i?ye.TitleModalPlaylinkClick:ye.TitlePopoverPlaylinkClick,t.title,{playlink:v})}var d=Mo(),u=te(d),f=b(u);M(()=>$(f,_e("Where To Stream Online"))),sn(u,(v,p)=>Ae==null?void 0:Ae(v,p),()=>2);var c=T(u,2),h=b(c);nt(h,17,()=>s(a),pt,(v,p)=>{let y=()=>s(p).name,w=()=>s(p).url,S=()=>s(p).logo_url,j=()=>s(p).extra_info.category;var x=No();x.__click=[Po,l,y];var E=b(x);M(()=>ie(E,"src",Nt(S())));var C=T(E,2),A=b(C),D=b(A),q=T(A,2),L=b(q);M(()=>$(L,o[j()]||_e("Stream")));var F=T(C,2);{var U=B=>{var V=jo(),Y=b(V);Co(Y),k(B,V)};R(F,B=>{n()&&B(U)})}M(()=>{ie(x,"href",w()),ie(x,"data-playlink",y()),$(D,y())}),k(v,x)});var g=T(h,2);{var m=v=>{var p=Lo(),y=b(p);M(()=>$(y,_e("Title Unavailable"))),k(v,p)};R(g,v=>{t.playlinks.length||v(m)})}M(()=>le(c,"list",n())),k(e,d),oe()}ce(["click"]);var Oo=(e,t)=>N(t,!0),Ro=I('<button class="show-more svelte-1u3je71">Show more</button>'),Ho=I('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),Fo=I('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function qo(e,t){ae(t,!0);const n=O(t,"blurb",3,""),i=O(t,"limit",3,200);let r=z(!1);const a=W(()=>t.text.slice(0,i()));var o=Fo(),l=b(o),d=b(l),u=T(d);{var f=v=>{var p=Ye("...");k(v,p)};R(u,v=>{!s(r)&&t.text.length>i()&&v(f)})}var c=T(u,2);{var h=v=>{var p=Ro();p.__click=[Oo,r],k(v,p)};R(c,v=>{!s(r)&&(t.text.length>i()||n())&&v(h)})}var g=T(l,2);{var m=v=>{var p=Ho(),y=b(p);M(()=>$(y,n())),k(v,p)};R(g,v=>{s(r)&&v(m)})}M(()=>$(d,s(r)?t.text:s(a))),k(e,o),oe()}ce(["click"]);var Bo=I('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),Vo=I('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function Uo(e,t){var n=Vo(),i=T(te(n),2);nt(i,21,()=>t.participants,pt,(r,a)=>{var o=Bo(),l=b(o),d=T(l),u=b(d);M(()=>{var h;return $(u,((h=s(a).character)==null?void 0:h.slice(0,20))||"")});var f=T(u);{var c=h=>{var g=Ye("...");k(h,g)};R(f,h=>{var g;(g=s(a).character)!=null&&g.length&&h(c)})}M(()=>$(l,`${s(a).name??""} `)),k(r,o)}),k(e,n)}var Wo=ke('<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 gr(e){var t=Wo();k(e,t)}var Ko=I('<div class="top svelte-16h1v3j"><img class="poster svelte-16h1v3j"></div>'),zo=I("<div> </div>"),Yo=I("<!> <!>",1),$o=I('<img alt="" class="svelte-16h1v3j">'),Zo=I('<div class="content svelte-16h1v3j" data-playpilot-link-injections-title=""><div class="header svelte-16h1v3j"><!> <div class="heading svelte-16h1v3j"> </div> <div class="info svelte-16h1v3j"><div class="imdb svelte-16h1v3j"><!> </div> <!> <div> </div> <div class="capitalize svelte-16h1v3j"> </div> <!></div></div> <div class="main"><!> <!></div></div> <div class="background svelte-16h1v3j"><!></div>',1);function mr(e,t){ae(t,!0);const n=O(t,"small",3,!1),i=O(t,"compact",3,!1);let r=z(!1),a=z(!1),o=z(!1);var l=Zo(),d=te(l),u=b(d),f=b(u);{var c=V=>{var Y=Ko(),ee=b(Y);M(()=>ie(ee,"src",Nt(t.title.standing_poster))),M(()=>{ie(ee,"alt",`Movie poster for '${t.title.title??""}'`),le(ee,"loaded",s(r))}),re("load",ee,()=>N(r,!0)),k(V,Y)};R(f,V=>{i()||V(c)})}var h=T(f,2),g=b(h);sn(h,V=>Ae==null?void 0:Ae(V));var m=T(h,2),v=b(m),p=b(v);gr(p);var y=T(p),w=T(v,2);To(w,{get genres(){return t.title.genres}});var S=T(w,2),j=b(S),x=T(S,2),E=b(x);M(()=>$(E,_e(`Type: ${t.title.type}`)));var C=T(x,2);{var A=V=>{var Y=zo(),ee=b(Y);M(()=>$(ee,`${t.title.length??""} ${_e("Minutes")??""}`)),k(V,Y)};R(C,V=>{!n()&&t.title.length&&V(A)})}var D=T(u,2),q=b(D);Do(q,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var L=T(q,2);{var F=V=>{var Y=Yo(),ee=te(Y);qo(ee,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var se=T(ee,2);{var be=Be=>{Uo(Be,{get participants(){return t.title.participants}})};R(se,Be=>{var Ce;(Ce=t.title.participants)!=null&&Ce.length&&Be(be)})}k(V,Y)};R(L,V=>{n()||V(F)})}var U=T(d,2),B=b(U);nr(B,()=>s(o),V=>{var Y=$o();M(()=>ie(Y,"src",Nt(s(o)?t.title.standing_poster:t.title.medium_poster))),M(()=>{le(Y,"loaded",s(a)),le(Y,"blur",s(o))}),re("load",Y,()=>N(a,!0)),re("error",Y,()=>N(o,!0)),k(V,Y)}),M(()=>{ie(d,"data-playpilot-original-title",t.title.original_title),le(d,"small",n()),le(d,"compact",i()),le(h,"truncate",n()),$(g,t.title.title),$(y,` ${t.title.imdb_score??""}`),$(j,t.title.year),le(U,"faded",i())}),k(e,l),oe()}function Go(e,t){ae(t,!0);let n=z(0);Te(ye.TitlePopoverView,t.title),wo(e,{get maxHeight(){return s(n)},set maxHeight(i){N(n,Z(i))},children:(i,r)=>{var a=W(()=>!!s(n)&&s(n)<250);mr(i,{get title(){return t.title},small:!0,get compact(){return s(a)}})},$$slots:{default:!0}}),oe()}var Jo=(e,t,n,i)=>t(s(n).title_details,s(i)),Xo=I(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),Qo=(e,t,n,i)=>t(s(n).title_details,i()),el=I('<!> <a target="_blank"> </a>',1),tl=I(" <!>.",1),nl=I("<!> <br>",1),il=I(" <br>",1),rl=I('<span class="svelte-pfvkex"><!></span>'),al=I('<p class="svelte-pfvkex"></p>');function ol(e,t){ae(t,!0);const n=O(t,"onclickmodal",3,d=>null);function i(d,u){Te(ye.AfterArticlePlaylinkClick,d,{playlink:u})}function r(d,u){Te(ye.AfterArticleModalButtonClick,d),n()(u)}var a=tt(),o=te(a);{var l=d=>{var u=al();nt(u,21,()=>t.linkInjections,pt,(f,c)=>{var h=rl();const g=W(()=>{const{key:w,title:S,title_details:j,after_article_style:x}=s(c);return{key:w,title:S,title_details:j,after_article_style:x}}),m=W(()=>{var w;return((w=s(g).title_details)==null?void 0:w.providers)||[]});var v=b(h);{var p=w=>{var S=nl(),j=te(S);{var x=C=>{var A=Xo(),D=te(A);M(()=>$(D,`"${s(g).title??""}" ${_e("Is Available To Stream")??""} `));var q=T(D),L=b(q);L.__click=[Jo,r,g,c];var F=b(L);M(()=>$(F,_e("View Streaming Options"))),k(C,A)},E=C=>{var A=tl(),D=te(A);M(()=>$(D,`"${s(g).title??""}" ${_e("Is Available To Stream On")??""} `));var q=T(D);nt(q,17,()=>s(m),pt,(L,F,U)=>{let B=()=>s(F).name,V=()=>s(F).url;var Y=el(),ee=te(Y);{var se=Ce=>{var ut=Ye();M(()=>$(ut,U===s(m).length-1?`, ${_e("And")}`:",")),k(Ce,ut)};R(ee,Ce=>{U&&Ce(se)})}var be=T(ee,2);be.__click=[Qo,i,g,B];var Be=b(be);M(()=>{ie(be,"href",V()),$(Be,B())}),k(L,Y)}),k(C,A)};R(j,C=>{s(g).after_article_style==="modal_button"?C(x):C(E,!1)})}k(w,S)},y=w=>{var S=il(),j=te(S);M(()=>$(j,`"${s(g).title??""}" ${_e("Title Unavailable Suffix")??""} `)),k(w,S)};R(v,w=>{s(m).length?w(p):w(y,!1)})}M(()=>ie(h,"data-playpilot-injection-key",s(g).key)),k(f,h)}),k(d,u)};R(o,d=>{t.linkInjections.length&&d(l)})}k(e,a),oe()}ce(["click"]);function ll(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function $n(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function fi(e,t,n=[]){var a,o;const i=document.createTreeWalker(t);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=r.parentNode)==null?void 0:o.nodeName)||"")););return r}function vi(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function sl(e,t,n,i){const r=ll(t),a=$n(t),o=e.slice(0,i),l=e.slice(i),d=/[-/\\^$*+?.()|[\]{}]/g,u=new RegExp(`${a.replace(d,"\\$&")}|${r.replace(d,"\\$&")}`),f=l.replace(u,n);return o+f}function We(e){return $n(e).toLowerCase().replace(/\s+/g,"")}function cl(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,r-a),l=o+n;l>e.length&&(l=e.length,o=Math.max(0,l-n));let d=e.slice(o,l).trim();return o>0&&(d="…"+d),l<e.length&&(d+="…"),d}function ul(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const Zn="data-playpilot-injection-key",Gn=`[${Zn}]`,yt={};let Cn=null,Yt=null;function pr(e){const t=[],n=[e];for(;n.length>0;){const i=n.pop();if(t.includes(i)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(i.tagName))continue;const r=Array.from(i.childNodes).some(o=>{var l;return o.nodeType===Node.TEXT_NODE&&((l=o.nodeValue)==null?void 0:l.trim())!==""});if(r&&i.tagName==="LI"){const o=i.closest("ul, ol");o&&!t.includes(o)&&t.push(o);continue}if(r){t.push(i);continue}const a=Array.from(i.children);for(let o=a.length-1;o>=0;o--)n.push(a[o])}return t}function fn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function dl(e,t,n={aiInjections:[],manualInjections:[]}){var f;const i=pl(n);if(!i)return[];const r=We(e.map(c=>c.innerText).join(" ")),a=wl(i),o=a.filter(c=>r.includes(We(c.sentence))),l={},d={};for(const c of o){const h=e.findIndex(E=>We(E.innerText).includes(We(c.sentence))),g=e[h];if(!g)continue;const m=fi(c.title,g,["A"]);if(!(m!=null&&m.nodeValue)||vi(m)){const E=fi(c.title,g);E&&vi(E)&&(d[c.key]="Given text is already inside of a link.");continue}const v=document.createElement("span");v.dataset.playpilotInjectionKey=c.key;const p=document.createElement("a");p.innerText=c.title,p.href=c.playpilot_url,p.dataset.playpilotOriginalTitle=(f=c.title_details)==null?void 0:f.original_title,p.target="_blank",p.rel="noopener nofollow noreferrer",v.insertAdjacentElement("beforeend",p);const y=ul(Object.values(l).filter(E=>E.elementIndex===h).map(E=>E.to)),w=g.innerHTML.indexOf(m.nodeValue),S=g.innerHTML.indexOf(c.sentence),j=Math.max(y,w,S,0);g.innerHTML=sl(g.innerHTML,c.title,v.outerHTML,j);const x=g.innerHTML.indexOf(v.outerHTML);l[c.key]={elementIndex:h,from:x,to:x+v.outerHTML.length}}vl(a,t),fl();const u=kl(i);return u.length&&gl(e,u,t),i.filter(c=>c.title_details).map((c,h)=>{const g=c.duplicate??(!c.manual&&bl(c,h,i)),m=document.querySelector(`[${Zn}="${c.key}"]`),v=vn(c)&&!c.inactive&&!c.after_article&&!m,p=v?d[c.key]||(r.includes(We(c.sentence))?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...c,inactive:c.inactive??!1,duplicate:g,failed:v,failed_message:p}})}function fl(){const e=Array.from(document.querySelectorAll(`${Gn} 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(i=>{getComputedStyle(n).getPropertyValue(i)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${i}`)})})}function vl(e,t){window.addEventListener("click",i=>{const r=i.target;if(!(r!=null&&r.parentElement))return;const a=r.parentElement.getAttribute(Zn);if(!a)return;const o=e.find(l=>a===l.key);o&&_l(i,o,t)}),Array.from(document.querySelectorAll(Gn)).forEach(i=>{const r=i.dataset.playpilotInjectionKey,a=e.find(o=>r===o.key);a&&(i.addEventListener("mouseenter",o=>hl(o,a)),i.addEventListener("mouseleave",()=>Xt(a)))})}function _l(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Xt(t))}function hl(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget;Cn=n,setTimeout(()=>{if(yt[t.key]||Cn!==n)return;const i=Un(Go,{target:n,props:{title:t.title_details}});yt[t.key]={injection:t,component:i}},100)}function Xt(e,t=!0){const n=yt[e.key];Cn=null,n&&(tr(n.component,{outro:t}),delete yt[e.key])}function gl(e,t,n){var l,d;if(!t.length)return;const i=document.createElement("div"),r=(l=window.PlayPilotLinkInjections)==null?void 0:l.after_article_selector,a=(r?document.querySelector(r):null)||e[e.length-1],o=((d=window.PlayPilotLinkInjections)==null?void 0:d.after_article_insert_position)||"afterend";i.dataset.playpilotAfterArticlePlaylinks="true",a.insertAdjacentElement(o,i),Yt=Un(ol,{target:i,props:{linkInjections:t,onclickmodal:n}})}function ml(){var e;Yt&&(tr(Yt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Yt=null)}function Pn(){Object.values(yt).forEach(t=>Xt(t.injection)),document.querySelectorAll(Gn).forEach(t=>t.outerHTML=t.textContent||""),Object.values(yt).forEach(({injection:t})=>Xt(t,!1)),ml()}function pl({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function yl(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function yr(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details&&vn(e)}function vn(e){return e.in_text||e.in_text===void 0?!0:!!e.after_article}function wl(e){return wr(e).filter(t=>t.in_text!==!1&&yr(t))}function kl(e){return wr(e).filter(t=>t.after_article===!0&&yr(t))}function wr(e){return e.filter(t=>t.removed||t.inactive?!1:t.manual&&!t.removed&&!t.inactive?!0:!e.some(n=>n.manual&&(n.removed||n.inactive)&&kr(n,t)))}function bl(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&kr(i,e))}function kr(e,t){return e.title===t.title&&We(e.sentence)===We(t.sentence)}function xl(){const e=fn();return{heading:Sl(e),modified_time:El(e),published_time:Tl(e)}}function Sl(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function El(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?br(n):null}function Tl(e){const t=document.querySelector('meta[property*="published_time"]')||e.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||e.querySelector("time")||document.querySelector("time")||e.querySelector("[datetime]")||document.querySelector("[datetime]")||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?br(n):null}function br(e){try{return new Date(e).toISOString()}catch{return null}}function xr(){return location.protocol+"//"+location.host+location.pathname}let yn=null;async function Sr(e,t,{hash:n=_r(t),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=_n(),o=vr()?await fr():!1,l=hr(),d=xl();if(!a)throw new Error("No token was provided");const u=await fetch(un+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${l}`,{headers:r,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:d,page_text:t,...i})});if(!u.ok)throw u;return await u.json()}async function _i(e,t,{requireCompletedResult:n=!1,pollInterval:i=3e3,maxTries:r=600}={}){let a=_r(t),o=0;yn&&clearTimeout(yn);const l=async(d,u)=>{try{const f=await Sr(e,t,{hash:a});if(n&&f.automation_enabled&&f.ai_running)throw new Error;f.link_injections=hi(f.link_injections||[]),f.ai_injections=hi(f.ai_injections||[]),d(f);return}catch{if(o++,o>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),d();return}yn=setTimeout(()=>l(d),i)}};return new Promise(l)}async function Al(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,r=e.filter(l=>l.manual).map(l=>({sid:l.sid,title:l.title,sentence:l.sentence,playpilot_url:l.playpilot_url,after_article:!!l.after_article,after_article_style:l.after_article_style||null,in_text:l.in_text??!0,inactive:!!l.inactive,removed:!!l.removed}));if(!await Sr(xr(),t,{params:{private_token:Kn(),link_injections:r,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function Il(){const e=new Headers({"Content-Type":"application/json"}),t=_n();if(!t)throw new Error("No token was provided");const n=await fetch(un+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function hi(e){return e.map(t=>({...t,key:Er(t.sid)}))}function Er(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function _n(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function Cl(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var Pl=ke('<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 Tr(e){var t=Pl();k(e,t)}function Jn(e,t){ae(t,!0);const n=O(t,"size",3,"margin(2)"),i=O(t,"onclick",3,()=>null),r=ao(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=tt(),o=te(a);Wa(o,()=>t.href?"a":"button",!1,(l,d)=>{let u;M(()=>{u=$a(l,u,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",l.namespaceURI===Ei,l.nodeName.includes("-")),cn(l,"--size",n())});var f=tt(),c=te(f);St(c,()=>t.children??Ne),k(d,f)}),k(e,a),oe()}var jl=(e,t)=>t()(),Nl=I('<div class="modal svelte-wrncjp"><div class="dialog svelte-wrncjp" role="dialog"><div class="close svelte-wrncjp"><!></div> <!></div> <div class="backdrop svelte-wrncjp"></div></div>');function Ll(e,t){ae(t,!0);const n=O(t,"onclose",3,()=>null),i=O(t,"onscroll",3,()=>null);Gi("scope","modal"),ct(()=>{const c=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=c||""});function r(c){return window.innerWidth<600?dn(c,{duration:250,y:window.innerHeight}):po(c,{duration:150,start:.85})}var a=Nl();re("keydown",fe,({key:c})=>{c==="Escape"&&n()()});var o=b(a),l=b(o),d=b(l);Jn(d,{onclick:()=>n()(),children:(c,h)=>{Tr(c)},$$slots:{default:!0}});var u=T(l,2);St(u,()=>t.children);var f=T(o,2);f.__click=[jl,n],re("scroll",o,function(...c){var h;(h=i())==null||h.apply(this,c)}),Ee(3,o,()=>r),Ee(3,a,()=>Yn,()=>({duration:150})),k(e,a),oe()}ce(["click"]);function Ml(e,t){ae(t,!0),Te(ye.TitleModalView,t.title);let n=!1;function i(){n||(Te(ye.TitleModalScroll,t.title),n=!0)}Ll(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{mr(r,{get title(){return t.title}})},$$slots:{default:!0}}),oe()}var Dl=ke('<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 Ol(e,t){const n=O(t,"expanded",3,!1);var i=Dl();M(()=>le(i,"expanded",n())),k(e,i)}var Rl=ke('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Hl(e){var t=Rl();k(e,t)}function Fl(e,t,n){t(!t()),n()(t())}var ql=I('<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 jn(e,t){ae(t,!0);let n=O(t,"active",15),i=O(t,"fullwidth",3,!1),r=O(t,"label",3,""),a=O(t,"onclick",3,()=>null);var o=ql();o.__click=[Fl,n,a];var l=b(o),d=b(l);St(d,()=>t.children),M(()=>{ie(o,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),le(o,"active",n()),le(o,"fullwidth",i())}),k(e,o),oe()}ce(["click"]);var Bl=I('<input type="text" class="svelte-1vrer3i">');function Xn(e,t){let n=O(t,"value",15),i=O(t,"label",3,""),r=O(t,"name",3,""),a=O(t,"readonly",3,!1),o=O(t,"oninput",3,()=>null);var l=Bl();l.__input=function(...d){var u;(u=o())==null||u.apply(this,d)},M(()=>{ie(l,"name",r()),ie(l,"aria-label",i()),ie(l,"placeholder",i()),l.readOnly=a()}),to(l,n),k(e,l)}ce(["input"]);var Vl=ke('<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>'),Ul=ke('<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>'),Wl=ke('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function gi(e,t){const n=O(t,"align",3,"bottom");var i=Wl(),r=b(i);{var a=l=>{var d=Vl();k(l,d)},o=l=>{var d=tt(),u=te(d);{var f=c=>{var h=Ul();k(c,h)};R(u,c=>{n()==="center"&&c(f)},!0)}k(l,d)};R(r,l=>{n()==="bottom"?l(a):l(o,!1)})}k(e,i)}var Kl=I("<div><!></div>");function Lt(e,t){ae(t,!0);const n=O(t,"type",3,"error");var i=Kl(),r=b(i);St(r,()=>t.children),M(()=>Za(i,`alert ${n()??""} svelte-18si0a5`)),k(e,i),oe()}var zl=I("<!> In-text Playlink",1),Yl=I("<!> Bottom Playlink",1),$l=I('<div class="alert svelte-1shw34x"><!></div>'),Zl=(e,t)=>t().after_article_style="playlinks",Gl=(e,t)=>t().after_article_style="modal_button",Jl=I('<div><div class="label svelte-1shw34x">Bottom playlinks style</div> <div class="group svelte-1shw34x" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-1shw34x">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-1shw34x">Modal button</button> <div class="active-marker svelte-1shw34x"></div></div></div>'),Xl=I('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function Ql(e,t){ae(t,!0);const n=O(t,"linkInjection",7),i=W(()=>n().after_article_style==="modal_button");var r=Xl(),a=te(r),o=b(a),l=W(()=>n().in_text??!0);jn(o,{fullwidth:!0,get active(){return s(l)},onclick:m=>{n().in_text=m,n().manual=!0},label:"In-text Playlink",children:(m,v)=>{var p=zl(),y=te(p);gi(y,{align:"center"}),k(m,p)},$$slots:{default:!0}});var d=T(o,2),u=W(()=>n().after_article??!1);jn(d,{fullwidth:!0,get active(){return s(u)},onclick:m=>{n().after_article=m,n().manual=!0},label:"Bottom Playlink",children:(m,v)=>{var p=Yl(),y=te(p);gi(y,{align:"bottom"}),k(m,p)},$$slots:{default:!0}});var f=T(a,2);{var c=m=>{var v=$l(),p=b(v);Lt(p,{type:"warning",children:(y,w)=>{var S=Ye("At least one layout option must be selected for the playlink to be visible.");k(y,S)},$$slots:{default:!0}}),Ee(3,v,()=>jt,()=>({duration:200})),k(m,v)};R(f,m=>{vn(n())||m(c)})}var h=T(f,2);{var g=m=>{var v=Jl(),p=T(b(v),2),y=b(p);y.__click=[Zl,n];var w=T(y,2);w.__click=[Gl,n];var S=T(w,2);M(()=>{ie(p,"aria-activedescendant",`playlinks-${(s(i)?"after-article":"in-text")??""}`),ie(y,"aria-selected",!s(i)||null),le(y,"active",!s(i)),ie(w,"aria-selected",s(i)||null),le(w,"active",s(i)),le(S,"right",s(i))}),Ee(3,v,()=>jt,()=>({duration:100})),k(m,v)};R(h,m=>{n().after_article&&m(g)})}k(e,r),oe()}ce(["click"]);var es=ke('<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 ts(e){var t=es();k(e,t)}var ns=(e,t)=>N(t,!s(t)),is=I('<div class="content svelte-1fmy0wh"><!></div>'),rs=I('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function as(e,t){ae(t,!0);let n=z(!1),i=z(null);function r(f){var h;const c=f.target;c===s(i)||(h=s(i))!=null&&h.contains(c)||N(n,!1)}var a=rs();re("click",fe,r);var o=b(a);o.__click=[ns,n];var l=b(o);ts(l),Bt(o,f=>N(i,f),()=>s(i));var d=T(o,2);{var u=f=>{var c=is(),h=b(c);St(h,()=>t.children),Ee(1,c,()=>dn,()=>({duration:150,y:5})),k(f,c)};R(d,f=>{s(n)&&f(u)})}M(()=>{ie(o,"aria-label",t.ariaLabel),ie(o,"aria-expanded",s(n))}),k(e,a),oe()}ce(["click"]);function os(e,t,n){requestAnimationFrame(()=>t());const i=e.target;if(["BUTTON","INPUT"].includes(i.nodeName)||i.closest("button")||i.closest("input"))return;const r=n()[0];r&&r.scrollIntoView({behavior:"smooth"})}var ls=(e,t)=>N(t,!s(t)),ss=I('<button class="expand-sentence svelte-8gd2db"> </button>'),cs=I('<button class="context-menu-action svelte-8gd2db">Remove</button>'),us=(e,t)=>N(t,!s(t)),ds=I('<div class="warning svelte-8gd2db" aria-label="Invalid playlink settings"><!></div>'),fs=I('<div class="actions svelte-8gd2db"><button class="expand svelte-8gd2db" aria-label="Expand"><!></button> <!> <!></div>'),vs=I('<div class="expanded svelte-8gd2db"><div class="label svelte-8gd2db">Link URL</div> <!> <div class="label offset svelte-8gd2db">Layout options</div> <div class="type-select svelte-8gd2db"><!></div></div>'),_s=I('<div class="item svelte-8gd2db"><div class="header svelte-8gd2db"><img class="poster svelte-8gd2db" alt="" width="32" height="48"> <div class="info svelte-8gd2db"><div class="title svelte-8gd2db"> </div> <div class="sentence svelte-8gd2db"><!> <!></div></div> <div class="context-menu svelte-8gd2db"><!></div></div> <div class="content svelte-8gd2db"><!> <!></div></div>');function hs(e,t){ae(t,!0);const n=O(t,"linkInjection",15),i=O(t,"onremove",3,()=>null),r=O(t,"onhighlight",3,()=>null),a=W(()=>n()||{}),o=W(()=>s(a).key),l=W(()=>s(a).sentence),d=W(()=>s(a).title_details),u=W(()=>s(a).failed),f=W(()=>s(a).failed_message),c=W(()=>s(a).inactive),h=W(()=>s(d)),g=W(()=>cl(n().sentence,n().title,60));let m=z(!1),v=z(!1),p=z(!1),y=z(null);ct(()=>{s(u)&&Te(ye.InjectionFailed,s(h),{phrase:n().title,sentence:s(l)})});function w(G=!0){j().forEach(P=>{P.classList.toggle("playpilot-injection-highlight",G)})}function S(G){let X=G.target,P=X==null?void 0:X.dataset.playpilotInjectionKey;X&&!P&&(X=X.closest(`[data-playpilot-injection-key="${s(o)}"]`),P=X==null?void 0:X.dataset.playpilotInjectionKey),N(p,P===s(o)),s(y)&&s(p)&&r()(s(y))}function j(){const G=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${s(o)}"]`));return G.length?G:pr(fn()).filter(X=>We(X.innerText).includes(We(n().sentence)))||[]}var x=_s();re("mouseover",fe,S),x.__click=[os,w,j];var E=b(x),C=b(E);M(()=>ie(C,"src",Nt(s(h).standing_poster)));var A=T(C,2),D=b(A),q=b(D),L=T(D,2),F=b(L);Ua(F,()=>(s(v)?s(l):s(g)).replace(n().title,`<em>${n().title}</em>`));var U=T(F,2);{var B=G=>{var X=ss();X.__click=[ls,v];var P=b(X);M(()=>$(P,s(v)?"Less":"More")),k(G,X)};R(U,G=>{s(g).length<s(l).length&&G(B)})}var V=T(A,2),Y=b(V);as(Y,{ariaLabel:"More options",children:(G,X)=>{var P=cs();P.__click=function(...H){var ne;(ne=i())==null||ne.apply(this,H)},k(G,P)},$$slots:{default:!0}});var ee=T(E,2),se=b(ee);{var be=G=>{Lt(G,{children:(X,P)=>{var H=Ye();M(()=>$(H,s(f))),k(X,H)},$$slots:{default:!0}})},Be=G=>{var X=fs(),P=b(X);P.__click=[us,m];var H=b(P);Ol(H,{get expanded(){return s(m)}});var ne=T(P,2);{var he=Pe=>{var $e=ds(),Ze=b($e);Hl(Ze),Ee(3,$e,()=>Yn,()=>({duration:100})),k(Pe,$e)};R(ne,Pe=>{vn(n())||Pe(he)})}var xe=T(ne,2),Ve=W(()=>s(c)?"Inactive":"Visible"),Se=W(()=>!n().inactive);jn(xe,{get label(){return s(Ve)},get active(){return s(Se)},onclick:Pe=>{n(n().inactive=!Pe,!0),n(n().manual=!0,!0)},children:(Pe,$e)=>{var Ze=Ye();M(()=>$(Ze,s(c)?"Inactive":"Visible")),k(Pe,Ze)},$$slots:{default:!0}}),M(()=>ie(P,"aria-expanded",s(m))),k(G,X)};R(se,G=>{s(u)?G(be):G(Be,!1)})}var Ce=T(se,2);{var ut=G=>{var X=vs(),P=T(b(X),2);Xn(P,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(he){n(n().playpilot_url=he,!0)}});var H=T(P,4),ne=b(H);Ql(ne,{get linkInjection(){return n()}}),Ee(3,X,()=>jt,()=>({duration:100})),k(G,X)};R(Ce,G=>{s(m)&&G(ut)})}Bt(x,G=>N(y,G),()=>s(y)),M(()=>{le(x,"highlighted",s(p)),le(x,"inactive",s(c)),$(q,s(h).title)}),re("mouseenter",x,()=>w(!0)),re("mouseleave",x,()=>w(!1)),re("error",C,({target:G})=>G.src=lr),Ee(6,x,()=>jt,()=>({duration:200})),k(e,x),oe()}ce(["click"]);var gs=I('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function ms(e,t){ae(t,!0);let n=O(t,"element",7),i=O(t,"position",23,()=>({x:0,y:0})),r=O(t,"limit",19,()=>({x:0,y:0})),a=O(t,"onchange",3,()=>null),o=!1,l={x:0,y:0},d=i();ct(()=>{u(i().x,i().y)});function u(v,p){const y=window.innerWidth,w=window.innerHeight,S=n().clientWidth,j=n().clientHeight;v=Math.min(Math.max(v,r().x),y-S-r().x),p=Math.min(Math.max(p,r().y),w-j-r().y),n().style.right=v+"px",n().style.bottom=Math.max(p,r().y)+"px",i({x:v,y:p}),a()(i())}function f(v){var p,y;return{x:v.pageX||((p=v.touches)==null?void 0:p[0].pageX)||0,y:v.pageY||((y=v.touches)==null?void 0:y[0].pageY)||0}}function c(v){o=!0,l=f(v),d=i()}function h(v){if(!o)return;const p=f(v),y=p.x-l.x,w=p.y-l.y,S=d.x-y,j=d.y-w;u(S,j)}function g(){o&&(o=!1)}var m=gs();re("mousemove",fe,h),re("touchmove",fe,h,void 0,!0),re("mouseup",fe,g),re("touchend",fe,g),re("resize",fe,()=>u(i().x,i().y)),m.__mousedown=c,m.__touchstart=c,k(e,m),oe()}ce(["mousedown","touchstart"]);var ps=I('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function ys(e,t){ae(t,!0);let n=O(t,"element",7),i=O(t,"height",7,200),r=O(t,"onchange",3,()=>null);const a=16;let o=!1,l=0,d=i();ct(()=>{i()&&u(i())});function u(v){const p=window.getComputedStyle(n()).minHeight||"0",y=Math.max(parseInt(p),Math.min(v,g()));n().style.height=`${y}px`,i(y),r()(y)}function f(v){var p,y;o=!0,l=v.pageY||((y=(p=v.touches)==null?void 0:p[0])==null?void 0:y.pageY)||0,d=n().clientHeight}function c(v){var S,j;if(!o)return;const p=v.pageY||((j=(S=v.touches)==null?void 0:S[0])==null?void 0:j.pageY)||0,y=l-p,w=d+y;u(w)}function h(){o=!1}function g(){const v=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-v,0)}var m=ps();re("mousemove",fe,c),re("touchmove",fe,c,void 0,!0),re("mouseup",fe,h),re("touchend",fe,h),re("resize",fe,()=>{i()&&u(i())}),m.__mousedown=f,m.__touchstart=f,k(e,m),oe()}ce(["mousedown","touchstart"]);var ws=ke('<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 ks(e){var t=ws();k(e,t)}async function bs(e){const t=new Headers({"Content-Type":"application/json"}),n=_n();if(!n)throw new Error("No token was provided");const i=await fetch(un+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!i.ok)throw i;return await i.json()}var xs=ke('<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 Ss(e){var t=xs();k(e,t)}var Es=I("<div> </div>"),Ts=e=>e.stopImmediatePropagation(),As=I('<button class="item svelte-rjq94e"><img class="poster svelte-rjq94e" alt="" width="28" height="42"> <div class="content"><div class="name svelte-rjq94e"> </div> <div class="meta svelte-rjq94e"><div class="imdb svelte-rjq94e"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-rjq94e"><!></a></button>');function mi(e,t){ae(t,!0);const n=O(t,"hoverable",3,!0),i=O(t,"onclick",3,()=>null);var r=As();r.__click=function(...x){var E;(E=i())==null||E.apply(this,x)};var a=b(r);M(()=>ie(a,"src",Nt(t.title.standing_poster)));var o=T(a,2),l=b(o),d=b(l),u=T(l,2),f=b(u),c=b(f);gr(c);var h=T(c),g=T(f,2),m=b(g),v=T(g,2),p=b(v),y=T(v,2);{var w=x=>{var E=Es(),C=b(E);M(()=>$(C,`${t.title.length??""} min`)),k(x,E)};R(y,x=>{t.title.length&&x(w)})}var S=T(o,2);S.__click=[Ts];var j=b(S);Ss(j),M(()=>{le(r,"hoverable",n()),$(d,t.title.title),$(h,` ${t.title.imdb_score??""}`),$(m,t.title.year),$(p,t.title.type),ie(S,"href",`${or}/${t.title.type??""}/${t.title.slug??""}`)}),re("error",a,({target:x})=>x.src=lr),k(e,r),oe()}ce(["click"]);var Is=I('<em class="empty svelte-1olb8n0">No results found</em>'),Cs=I('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),Ps=I('<div class="selected svelte-1olb8n0"><!></div>'),js=I('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function Ns(e,t){ae(t,!0);let n=O(t,"onselect",3,()=>null),i=O(t,"query",15),r=z(Z([])),a=z(null),o=z(!1);rn(()=>{i()&&l(i())});async function l(v){N(o,!0);try{N(r,Z(await bs(v)))}finally{N(o,!1)}}function d(v){i(v.title),N(a,Z(v)),n()(v)}var u=js(),f=b(u);Xn(f,{oninput:()=>N(a,null),name:"search",label:"Search...",get value(){return i()},set value(v){i(v)}});var c=T(f,2);{var h=v=>{var p=Cs();nt(p,21,()=>s(r),y=>y.sid,(y,w)=>{mi(y,{get title(){return s(w)},onclick:()=>d(s(w))})},y=>{var w=tt(),S=te(w);{var j=x=>{var E=Is();k(x,E)};R(S,x=>{s(o)||x(j)})}k(y,w)}),k(v,p)};R(c,v=>{i()&&!s(a)&&v(h)})}var g=T(c,2);{var m=v=>{var p=Ps(),y=b(p);mi(y,{get title(){return s(a)},hoverable:!1}),k(v,p)};R(g,v=>{s(a)&&v(m)})}k(e,u),oe()}function Ls(e,t,n,i,r,a){if(!s(t)||!s(n))return;const o=s(n).type==="movie"?"movie":"show",l=or+`/${o}/${s(n).slug}`,d={sid:s(n).sid,title:s(t),sentence:s(i),playpilot_url:l,key:Er(s(n).sid),title_details:s(n),manual:!0};r.onsave(d),a()()}var Ms=I('<div class="error svelte-1i8p6op"><!></div>'),Ds=I('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),Os=I('<section class="layout svelte-1i8p6op"><div class="header svelte-1i8p6op"><!> <div class="heading svelte-1i8p6op">Add Playlink manually</div></div> <p class="svelte-1i8p6op">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-1i8p6op">Selected text</label> <!> <!> <!> <button class="save svelte-1i8p6op">Add playlink</button></section>');function Rs(e,t){ae(t,!0);let n=O(t,"htmlString",3,""),i=O(t,"onclose",3,()=>null),r=z(""),a=z(""),o=z(null),l=z(""),d=z("");ct(u);function u(){const C=window.getSelection();if(!(C!=null&&C.anchorNode)||C.anchorNode.parentElement&&!fn().contains(C.anchorNode.parentElement))return;const A=C.toString().trim();if(!A)return;N(l,""),N(r,Z(A));const D=C.getRangeAt(0).cloneContents();if(Array.from(D.childNodes).filter(U=>{var B;return(B=U.textContent)==null?void 0:B.trim()}).length>1){N(l,"Selection contains multiple items. Selection may not contain a mix of styled and non styled text. Please select the text more directly.");return}N(d,Z(s(r))),N(a,Z(f(C,A)));const L=C.getRangeAt(0).commonAncestorContainer.textContent,F=$n(n());(!L||!F.includes(L))&&N(l,"Selection was not inside of given content")}function f(C,A){const D=C.getRangeAt(0);let q=D.startContainer;for(;(q.textContent||"").length<=A.length*3&&q.parentNode;)q=q.parentNode;if(!q||!q.textContent)return"";const L=q.textContent,F=c(q,D.startContainer,D.startOffset),U=c(q,D.endContainer,D.endOffset),B=L.slice(0,F).lastIndexOf("."),V=L.slice(U).match(/[.!?]/),Y=V?U+V.index:L.length,ee=B===-1?0:B+1,se=Y;return L.slice(ee,se+1).trim()}function c(C,A,D){let q=0;const L=C,F=U=>{var B;if(U===A)return q+=D,!0;U.nodeType===Node.TEXT_NODE&&(q+=((B=U.textContent)==null?void 0:B.length)||0);for(let V=U.firstChild;V;V=V.nextSibling)if(F(V))return!0;return!1};return F(L),q}function h(C){var A,D;N(o,Z(C)),(D=(A=window.getSelection())==null?void 0:A.removeAllRanges)==null||D.call(A)}var g=Os();re("mouseup",fe,u);var m=b(g),v=b(m);Jn(v,{get onclick(){return i()},size:"24px",children:(C,A)=>{ks(C)},$$slots:{default:!0}});var p=T(v,2);sn(p,(C,A)=>Ae==null?void 0:Ae(C,A),()=>2);var y=T(m,6);Xn(y,{get value(){return s(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var w=T(y,2);{var S=C=>{var A=Ms(),D=b(A);Lt(D,{children:(q,L)=>{var F=Ye();M(()=>$(F,s(l))),k(q,F)},$$slots:{default:!0}}),k(C,A)};R(w,C=>{s(l)&&C(S)})}var j=T(w,2);{var x=C=>{var A=Ds(),D=T(te(A),2);nr(D,()=>s(a)+s(r),q=>{Ns(q,{onselect:h,get query(){return s(d)},set query(L){N(d,Z(L))}})}),k(C,A)};R(j,C=>{s(l)||C(x)})}var E=T(j,2);E.__click=[Ls,r,o,a,t,i],M(()=>E.disabled=!s(r)||!s(o)),k(e,g),oe()}ce(["click"]);var Hs=ke('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function Fs(e){var t=Hs();k(e,t)}var qs=I('<strong class="svelte-1l4sxuh">AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net" class="svelte-1l4sxuh">Partner Portal</a>',1),Bs=I('<span class="svelte-1l4sxuh">.</span>'),Vs=I(`AI links are currently processing. This can take several minutes. We'll automatically insert all found injections once ready. <div class="message svelte-1l4sxuh"> <span class="ellipses svelte-1l4sxuh"></span></div> <div class="loading-bar svelte-1l4sxuh"><div class="loading-bar-progress svelte-1l4sxuh"><div class="loading-bar-fill svelte-1l4sxuh" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1l4sxuh"> </div></div>`,1),Us=I('<div class="animator svelte-1l4sxuh" data-test-id="animator"></div>'),Ws=I('<div class="ai-indicator svelte-1l4sxuh"><div class="content svelte-1l4sxuh"><div class="icon svelte-1l4sxuh"><!></div> <div class="svelte-1l4sxuh"><!></div></div> <div class="border svelte-1l4sxuh"><!></div></div>');function Ks(e,t){const n=O(t,"aiRunning",3,!1),i=O(t,"automationEnabled",3,!1),r=O(t,"message",3,""),a=O(t,"percentage",3,0);var o=Ws(),l=b(o),d=b(l),u=b(d);Fs(u);var f=T(d,2),c=b(f);{var h=y=>{var w=qs();k(y,w)},g=y=>{var w=tt(),S=te(w);{var j=x=>{var E=Vs(),C=T(te(E)),A=b(C),D=T(A);nt(D,20,()=>({length:3}),pt,(Y,ee)=>{var se=Bs();k(Y,se)});var q=T(C,2),L=b(q),F=b(L);const U=W(()=>`${Math.max(a(),3)??""}%`);M(()=>cn(F,"width",s(U)));var B=T(L,2),V=b(B);M(()=>{$(A,`${r()??""} `),$(V,`${a()??""}%`)}),k(x,E)};R(S,x=>{n()&&x(j)},!0)}k(y,w)};R(c,y=>{i()?y(g,!1):y(h)})}var m=T(l,2),v=b(m);{var p=y=>{var w=Us();k(y,w)};R(v,y=>{n()&&y(p)})}M(()=>le(o,"running",n())),k(e,o)}async function zs(e,t,n,i,r,a,o){try{N(t,!0),N(n,!1),i(await Al(i(),r())),N(a,Z(s(o)))}catch{N(n,!0)}finally{N(t,!1)}}var Ys=I('<div class="handles svelte-1b2vpoj"><div class="handle svelte-1b2vpoj"><!></div> <div class="handle svelte-1b2vpoj"><!></div></div>'),$s=I('<div class="loading svelte-1b2vpoj">Loading...</div>'),Zs=I('<div class="bubble svelte-1b2vpoj"> </div> <!>',1),Gs=I(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
9
|
-
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal</a>`,1),
|
|
8
|
+
`}}var ko=I('<div class="popover svelte-qkpa3e" tabindex="-1" aria-hidden="true"><div class="dialog svelte-qkpa3e"><!></div></div>');function bo(e,t){ae(t,!0);let n=R(t,"maxHeight",15);Gi("scope","popover");let i=W(null),r=W(!1);ct(async()=>{await ni(),a(),await ni(),o()});function a(){if(!s(i))return;const{top:c,right:h,bottom:g,height:m}=s(i).getBoundingClientRect(),v=l();L(r,Z(c-v<0&&window.innerHeight-g>c+m));const p=window.innerWidth-h-v;h+v>window.innerWidth&&(s(i).style.left=`${p}px`)}function o(){if(!s(i))return;const{top:c,height:h}=s(i).getBoundingClientRect(),g=l(),m=s(r)?window.innerHeight-c-g:c+h-g;n(Math.min(m,window.innerHeight*.8))}function l(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var d=ko(),u=b(d),f=b(u);St(f,()=>t.children),Bt(d,c=>L(i,c),()=>s(i)),D(()=>{le(d,"flip",s(r)),cn(d,"--max-height",n()?n()+"px":null)}),Ee(3,u,()=>dn,()=>({duration:100,y:10})),k(e,d),oe()}const xo=[{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"}];var So=I('<div class="genre svelte-13nhocm"> </div>'),Eo=(e,t)=>L(t,!0),To=I('<button class="genre expand svelte-13nhocm"> </button>'),Ao=I("<!> <!>",1);function Io(e,t){ae(t,!0);let n=W(!1);const i=V(()=>s(n)?t.genres:[t.genres[0]]);var r=Ao(),a=te(r);nt(a,17,()=>s(i),pt,(d,u)=>{var f=tt();const c=V(()=>{var m;return(m=xo.find(v=>v.slug===s(u)))==null?void 0:m.name});var h=te(f);{var g=m=>{var v=So(),p=b(v);D(()=>z(p,he(s(c)))),k(m,v)};H(h,m=>{s(c)&&m(g)})}k(d,f)});var o=T(a,2);{var l=d=>{var u=To();u.__click=[Eo,n];var f=b(u);D(()=>z(f,`+${t.genres.length-1}`)),k(d,u)};H(o,d=>{!s(n)&&t.genres.length>1&&d(l)})}k(e,r),oe()}ce(["click"]);function Co(e){let t=[];for(const n of e){let i=n;const r=t.find(l=>l.name===i.name),a=r==null?void 0:r.extra_info.category,o=i.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(l=>l.name!==i.name),i={...i,extra_info:{...i.extra_info,category:"TVOD"}}),t.push(i)}return t}function Ae(e,t=1){e.role="heading",e.ariaLevel=t.toString()}Yr();var Po=be('<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 jo(e){var t=Po();k(e,t)}function Lt(e){return e.replace("/src/img","")}var Lo=(e,t,n)=>t(n()),No=I('<div class="arrow svelte-1itidbd"><!></div>'),Mo=I('<a target="_blank" class="playlink svelte-1itidbd" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1itidbd"> <div><span class="name svelte-1itidbd"> </span> <div class="category svelte-1itidbd"> </div></div> <!></a>'),Do=I('<div class="playlink empty svelte-1itidbd"> </div>'),Oo=I('<div class="heading svelte-1itidbd"> </div> <div class="playlinks svelte-1itidbd"><!> <!></div>',1);function Ro(e,t){ae(t,!0);const n=R(t,"list",3,!1),i=Ta("scope")==="modal",r=V(()=>t.playlinks.filter(v=>!!v.logo_url)),a=V(()=>Co(s(r))),o={SVOD:he("Stream"),BUY:he("Buy"),RENT:he("Rent"),TVOD:he("Rent Or Buy")};function l(v){Te(i?we.TitleModalPlaylinkClick:we.TitlePopoverPlaylinkClick,t.title,{playlink:v})}var d=Oo(),u=te(d),f=b(u);D(()=>z(f,he("Where To Stream Online"))),sn(u,(v,p)=>Ae==null?void 0:Ae(v,p),()=>2);var c=T(u,2),h=b(c);nt(h,17,()=>s(a),pt,(v,p)=>{let y=()=>s(p).name,w=()=>s(p).url,S=()=>s(p).logo_url,j=()=>s(p).extra_info.category;var x=Mo();x.__click=[Lo,l,y];var E=b(x);D(()=>ie(E,"src",Lt(S())));var C=T(E,2),A=b(C),O=b(A),B=T(A,2),Y=b(B);D(()=>z(Y,o[j()]||he("Stream")));var N=T(C,2);{var F=$=>{var M=No(),K=b(M);jo(K),k($,M)};H(N,$=>{n()&&$(F)})}D(()=>{ie(x,"href",w()),ie(x,"data-playlink",y()),z(O,y())}),k(v,x)});var g=T(h,2);{var m=v=>{var p=Do(),y=b(p);D(()=>z(y,he("Title Unavailable"))),k(v,p)};H(g,v=>{t.playlinks.length||v(m)})}D(()=>le(c,"list",n())),k(e,d),oe()}ce(["click"]);var Ho=(e,t)=>L(t,!0),Fo=I('<button class="show-more svelte-1u3je71">Show more</button>'),qo=I('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),Bo=I('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function Vo(e,t){ae(t,!0);const n=R(t,"blurb",3,""),i=R(t,"limit",3,200);let r=W(!1);const a=V(()=>t.text.slice(0,i()));var o=Bo(),l=b(o),d=b(l),u=T(d);{var f=v=>{var p=Ye("...");k(v,p)};H(u,v=>{!s(r)&&t.text.length>i()&&v(f)})}var c=T(u,2);{var h=v=>{var p=Fo();p.__click=[Ho,r],k(v,p)};H(c,v=>{!s(r)&&(t.text.length>i()||n())&&v(h)})}var g=T(l,2);{var m=v=>{var p=qo(),y=b(p);D(()=>z(y,n())),k(v,p)};H(g,v=>{s(r)&&v(m)})}D(()=>z(d,s(r)?t.text:s(a))),k(e,o),oe()}ce(["click"]);var Uo=I('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),Wo=I('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function Ko(e,t){var n=Wo(),i=T(te(n),2);nt(i,21,()=>t.participants,pt,(r,a)=>{var o=Uo(),l=b(o),d=T(l),u=b(d);D(()=>{var h;return z(u,((h=s(a).character)==null?void 0:h.slice(0,20))||"")});var f=T(u);{var c=h=>{var g=Ye("...");k(h,g)};H(f,h=>{var g;(g=s(a).character)!=null&&g.length&&h(c)})}D(()=>z(l,`${s(a).name??""} `)),k(r,o)}),k(e,n)}var zo=be('<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 mr(e){var t=zo();k(e,t)}var Yo=I('<div class="top svelte-16h1v3j"><img class="poster svelte-16h1v3j"></div>'),$o=I("<div> </div>"),Zo=I("<!> <!>",1),Go=I('<img alt="" class="svelte-16h1v3j">'),Jo=I('<div class="content svelte-16h1v3j" data-playpilot-link-injections-title=""><div class="header svelte-16h1v3j"><!> <div class="heading svelte-16h1v3j"> </div> <div class="info svelte-16h1v3j"><div class="imdb svelte-16h1v3j"><!> </div> <!> <div> </div> <div class="capitalize svelte-16h1v3j"> </div> <!></div></div> <div class="main"><!> <!></div></div> <div class="background svelte-16h1v3j"><!></div>',1);function pr(e,t){ae(t,!0);const n=R(t,"small",3,!1),i=R(t,"compact",3,!1);let r=W(!1),a=W(!1),o=W(!1);var l=Jo(),d=te(l),u=b(d),f=b(u);{var c=M=>{var K=Yo(),ee=b(K);D(()=>ie(ee,"src",Lt(t.title.standing_poster))),D(()=>{ie(ee,"alt",`Movie poster for '${t.title.title??""}'`),le(ee,"loaded",s(r))}),re("load",ee,()=>L(r,!0)),k(M,K)};H(f,M=>{i()||M(c)})}var h=T(f,2),g=b(h);sn(h,M=>Ae==null?void 0:Ae(M));var m=T(h,2),v=b(m),p=b(v);mr(p);var y=T(p),w=T(v,2);Io(w,{get genres(){return t.title.genres}});var S=T(w,2),j=b(S),x=T(S,2),E=b(x);D(()=>z(E,he(`Type: ${t.title.type}`)));var C=T(x,2);{var A=M=>{var K=$o(),ee=b(K);D(()=>z(ee,`${t.title.length??""} ${he("Minutes")??""}`)),k(M,K)};H(C,M=>{!n()&&t.title.length&&M(A)})}var O=T(u,2),B=b(O);Ro(B,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var Y=T(B,2);{var N=M=>{var K=Zo(),ee=te(K);Vo(ee,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var se=T(ee,2);{var ve=Be=>{Ko(Be,{get participants(){return t.title.participants}})};H(se,Be=>{var Ce;(Ce=t.title.participants)!=null&&Ce.length&&Be(ve)})}k(M,K)};H(Y,M=>{n()||M(N)})}var F=T(d,2),$=b(F);nr($,()=>s(o),M=>{var K=Go();D(()=>ie(K,"src",Lt(s(o)?t.title.standing_poster:t.title.medium_poster))),D(()=>{le(K,"loaded",s(a)),le(K,"blur",s(o))}),re("load",K,()=>L(a,!0)),re("error",K,()=>L(o,!0)),k(M,K)}),D(()=>{ie(d,"data-playpilot-original-title",t.title.original_title),le(d,"small",n()),le(d,"compact",i()),le(h,"truncate",n()),z(g,t.title.title),z(y,` ${t.title.imdb_score??""}`),z(j,t.title.year),le(F,"faded",i())}),k(e,l),oe()}function Xo(e,t){ae(t,!0);let n=W(0);Te(we.TitlePopoverView,t.title),bo(e,{get maxHeight(){return s(n)},set maxHeight(i){L(n,Z(i))},children:(i,r)=>{var a=V(()=>!!s(n)&&s(n)<250);pr(i,{get title(){return t.title},small:!0,get compact(){return s(a)}})},$$slots:{default:!0}}),oe()}var Qo=(e,t,n,i)=>t(s(n).title_details,s(i)),el=I(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),tl=(e,t,n,i)=>t(s(n).title_details,i()),nl=I('<!> <a target="_blank"> </a>',1),il=I(" <!>.",1),rl=I("<!> <br>",1),al=I(" <br>",1),ol=I('<span class="svelte-pfvkex"><!></span>'),ll=I('<p class="svelte-pfvkex"></p>');function sl(e,t){ae(t,!0);const n=R(t,"onclickmodal",3,d=>null);function i(d,u){Te(we.AfterArticlePlaylinkClick,d,{playlink:u})}function r(d,u){Te(we.AfterArticleModalButtonClick,d),n()(u)}var a=tt(),o=te(a);{var l=d=>{var u=ll();nt(u,21,()=>t.linkInjections,pt,(f,c)=>{var h=ol();const g=V(()=>{const{key:w,title:S,title_details:j,after_article_style:x}=s(c);return{key:w,title:S,title_details:j,after_article_style:x}}),m=V(()=>{var w;return((w=s(g).title_details)==null?void 0:w.providers)||[]});var v=b(h);{var p=w=>{var S=rl(),j=te(S);{var x=C=>{var A=el(),O=te(A);D(()=>z(O,`"${s(g).title??""}" ${he("Is Available To Stream")??""} `));var B=T(O),Y=b(B);Y.__click=[Qo,r,g,c];var N=b(Y);D(()=>z(N,he("View Streaming Options"))),k(C,A)},E=C=>{var A=il(),O=te(A);D(()=>z(O,`"${s(g).title??""}" ${he("Is Available To Stream On")??""} `));var B=T(O);nt(B,17,()=>s(m),pt,(Y,N,F)=>{let $=()=>s(N).name,M=()=>s(N).url;var K=nl(),ee=te(K);{var se=Ce=>{var ut=Ye();D(()=>z(ut,F===s(m).length-1?`, ${he("And")}`:",")),k(Ce,ut)};H(ee,Ce=>{F&&Ce(se)})}var ve=T(ee,2);ve.__click=[tl,i,g,$];var Be=b(ve);D(()=>{ie(ve,"href",M()),z(Be,$())}),k(Y,K)}),k(C,A)};H(j,C=>{s(g).after_article_style==="modal_button"?C(x):C(E,!1)})}k(w,S)},y=w=>{var S=al(),j=te(S);D(()=>z(j,`"${s(g).title??""}" ${he("Title Unavailable Suffix")??""} `)),k(w,S)};H(v,w=>{s(m).length?w(p):w(y,!1)})}D(()=>ie(h,"data-playpilot-injection-key",s(g).key)),k(f,h)}),k(d,u)};H(o,d=>{t.linkInjections.length&&d(l)})}k(e,a),oe()}ce(["click"]);function cl(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function $n(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function fi(e,t,n=[]){var a,o;const i=document.createTreeWalker(t);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=r.parentNode)==null?void 0:o.nodeName)||"")););return r}function vi(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function ul(e,t,n,i){const r=cl(t),a=$n(t),o=e.slice(0,i),l=e.slice(i),d=/[-/\\^$*+?.()|[\]{}]/g,u=new RegExp(`${a.replace(d,"\\$&")}|${r.replace(d,"\\$&")}`),f=l.replace(u,n);return o+f}function We(e){return $n(e).toLowerCase().replace(/\s+/g,"")}function dl(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,r-a),l=o+n;l>e.length&&(l=e.length,o=Math.max(0,l-n));let d=e.slice(o,l).trim();return o>0&&(d="…"+d),l<e.length&&(d+="…"),d}function fl(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const Zn="data-playpilot-injection-key",Gn=`[${Zn}]`,yt={};let Cn=null,Yt=null;function yr(e){const t=[],n=[e];for(;n.length>0;){const i=n.pop();if(t.includes(i)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(i.tagName))continue;const r=Array.from(i.childNodes).some(o=>{var l;return o.nodeType===Node.TEXT_NODE&&((l=o.nodeValue)==null?void 0:l.trim())!==""});if(r&&i.tagName==="LI"){const o=i.closest("ul, ol");o&&!t.includes(o)&&t.push(o);continue}if(r){t.push(i);continue}const a=Array.from(i.children);for(let o=a.length-1;o>=0;o--)n.push(a[o])}return t}function fn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function vl(e,t,n={aiInjections:[],manualInjections:[]}){var f;const i=wl(n);if(!i)return[];const r=We(e.map(c=>c.innerText).join(" ")),a=bl(i),o=a.filter(c=>r.includes(We(c.sentence))),l={},d={};for(const c of o){const h=e.findIndex(E=>We(E.innerText).includes(We(c.sentence))),g=e[h];if(!g)continue;const m=fi(c.title,g,["A"]);if(!(m!=null&&m.nodeValue)||vi(m)){const E=fi(c.title,g);E&&vi(E)&&(d[c.key]="Given text is already inside of a link.");continue}const v=document.createElement("span");v.dataset.playpilotInjectionKey=c.key;const p=document.createElement("a");p.innerText=c.title,p.href=c.playpilot_url,p.dataset.playpilotOriginalTitle=(f=c.title_details)==null?void 0:f.original_title,p.target="_blank",p.rel="noopener nofollow noreferrer",v.insertAdjacentElement("beforeend",p);const y=fl(Object.values(l).filter(E=>E.elementIndex===h).map(E=>E.to)),w=g.innerHTML.indexOf(m.nodeValue),S=g.innerHTML.indexOf(c.sentence),j=Math.max(y,w,S,0);g.innerHTML=ul(g.innerHTML,c.title,v.outerHTML,j);const x=g.innerHTML.indexOf(v.outerHTML);l[c.key]={elementIndex:h,from:x,to:x+v.outerHTML.length}}hl(a,t),_l();const u=xl(i);return u.length&&pl(e,u,t),i.filter(c=>c.title_details).map((c,h)=>{const g=c.duplicate??(!c.manual&&Sl(c,h,i)),m=document.querySelector(`[${Zn}="${c.key}"]`),v=vn(c)&&!c.inactive&&!c.after_article&&!m,p=v?d[c.key]||(r.includes(We(c.sentence))?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...c,inactive:c.inactive??!1,duplicate:g,failed:v,failed_message:p}})}function _l(){const e=Array.from(document.querySelectorAll(`${Gn} 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(i=>{getComputedStyle(n).getPropertyValue(i)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${i}`)})})}function hl(e,t){window.addEventListener("click",i=>{const r=i.target;if(!(r!=null&&r.parentElement))return;const a=r.parentElement.getAttribute(Zn);if(!a)return;const o=e.find(l=>a===l.key);o&&gl(i,o,t)}),Array.from(document.querySelectorAll(Gn)).forEach(i=>{const r=i.dataset.playpilotInjectionKey,a=e.find(o=>r===o.key);a&&(i.addEventListener("mouseenter",o=>ml(o,a)),i.addEventListener("mouseleave",()=>Xt(a)))})}function gl(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Xt(t))}function ml(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget;Cn=n,setTimeout(()=>{if(yt[t.key]||Cn!==n)return;const i=Un(Xo,{target:n,props:{title:t.title_details}});yt[t.key]={injection:t,component:i}},100)}function Xt(e,t=!0){const n=yt[e.key];Cn=null,n&&(tr(n.component,{outro:t}),delete yt[e.key])}function pl(e,t,n){var l,d;if(!t.length)return;const i=document.createElement("div"),r=(l=window.PlayPilotLinkInjections)==null?void 0:l.after_article_selector,a=(r?document.querySelector(r):null)||e[e.length-1],o=((d=window.PlayPilotLinkInjections)==null?void 0:d.after_article_insert_position)||"afterend";i.dataset.playpilotAfterArticlePlaylinks="true",a.insertAdjacentElement(o,i),Yt=Un(sl,{target:i,props:{linkInjections:t,onclickmodal:n}})}function yl(){var e;Yt&&(tr(Yt),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Yt=null)}function Pn(){Object.values(yt).forEach(t=>Xt(t.injection)),document.querySelectorAll(Gn).forEach(t=>t.outerHTML=t.textContent||""),Object.values(yt).forEach(({injection:t})=>Xt(t,!1)),yl()}function wl({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function kl(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function wr(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details&&vn(e)}function vn(e){return e.in_text||e.in_text===void 0?!0:!!e.after_article}function bl(e){return kr(e).filter(t=>t.in_text!==!1&&wr(t))}function xl(e){return kr(e).filter(t=>t.after_article===!0&&wr(t))}function kr(e){return e.filter(t=>t.removed||t.inactive?!1:t.manual&&!t.removed&&!t.inactive?!0:!e.some(n=>n.manual&&(n.removed||n.inactive)&&br(n,t)))}function Sl(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&br(i,e))}function br(e,t){return e.title===t.title&&We(e.sentence)===We(t.sentence)}function El(){const e=fn();return{heading:Tl(e),modified_time:Al(e),published_time:Il(e)}}function Tl(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Al(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?xr(n):null}function Il(e){const t=document.querySelector('meta[property*="published_time"]')||e.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||e.querySelector("time")||document.querySelector("time")||e.querySelector("[datetime]")||document.querySelector("[datetime]")||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?xr(n):null}function xr(e){try{return new Date(e).toISOString()}catch{return null}}function Sr(){return location.protocol+"//"+location.host+location.pathname}let yn=null;async function Er(e,t,{hash:n=hr(t),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=_n(),o=_r()?await vr():!1,l=gr(),d=El();if(!a)throw new Error("No token was provided");const u=await fetch(un+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${l}`,{headers:r,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:d,page_text:t,...i})});if(!u.ok)throw u;return await u.json()}async function _i(e,t,{requireCompletedResult:n=!1,pollInterval:i=3e3,maxTries:r=600}={}){let a=hr(t),o=0;yn&&clearTimeout(yn);const l=async(d,u)=>{try{const f=await Er(e,t,{hash:a});if(n&&f.automation_enabled&&f.ai_running)throw new Error;f.link_injections=hi(f.link_injections||[]),f.ai_injections=hi(f.ai_injections||[]),d(f);return}catch{if(o++,o>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),d();return}yn=setTimeout(()=>l(d),i)}};return new Promise(l)}async function Cl(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,r=e.filter(l=>l.manual).map(l=>({sid:l.sid,title:l.title,sentence:l.sentence,playpilot_url:l.playpilot_url,after_article:!!l.after_article,after_article_style:l.after_article_style||null,in_text:l.in_text??!0,inactive:!!l.inactive,removed:!!l.removed}));if(!await Er(Sr(),t,{params:{private_token:Kn(),link_injections:r,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function Pl(){const e=new Headers({"Content-Type":"application/json"}),t=_n();if(!t)throw new Error("No token was provided");const n=await fetch(un+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function hi(e){return e.map(t=>({...t,key:Tr(t.sid)}))}function Tr(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function _n(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function jl(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var Ll=be('<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 Ar(e){var t=Ll();k(e,t)}function Jn(e,t){ae(t,!0);const n=R(t,"size",3,"margin(2)"),i=R(t,"onclick",3,()=>null),r=oo(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=tt(),o=te(a);Ka(o,()=>t.href?"a":"button",!1,(l,d)=>{let u;D(()=>{u=Za(l,u,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",l.namespaceURI===Ei,l.nodeName.includes("-")),cn(l,"--size",n())});var f=tt(),c=te(f);St(c,()=>t.children??Le),k(d,f)}),k(e,a),oe()}var Nl=(e,t)=>t()(),Ml=I('<div class="modal svelte-wrncjp"><div class="dialog svelte-wrncjp" role="dialog"><div class="close svelte-wrncjp"><!></div> <!></div> <div class="backdrop svelte-wrncjp"></div></div>');function Dl(e,t){ae(t,!0);const n=R(t,"onclose",3,()=>null),i=R(t,"onscroll",3,()=>null);Gi("scope","modal"),ct(()=>{const c=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=c||""});function r(c){return window.innerWidth<600?dn(c,{duration:250,y:window.innerHeight}):wo(c,{duration:150,start:.85})}var a=Ml();re("keydown",fe,({key:c})=>{c==="Escape"&&n()()});var o=b(a),l=b(o),d=b(l);Jn(d,{onclick:()=>n()(),children:(c,h)=>{Ar(c)},$$slots:{default:!0}});var u=T(l,2);St(u,()=>t.children);var f=T(o,2);f.__click=[Nl,n],re("scroll",o,function(...c){var h;(h=i())==null||h.apply(this,c)}),Ee(3,o,()=>r),Ee(3,a,()=>Yn,()=>({duration:150})),k(e,a),oe()}ce(["click"]);function Ol(e,t){ae(t,!0),Te(we.TitleModalView,t.title);let n=!1;function i(){n||(Te(we.TitleModalScroll,t.title),n=!0)}Dl(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{pr(r,{get title(){return t.title}})},$$slots:{default:!0}}),oe()}var Rl=be('<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 Hl(e,t){const n=R(t,"expanded",3,!1);var i=Rl();D(()=>le(i,"expanded",n())),k(e,i)}var Fl=be('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function ql(e){var t=Fl();k(e,t)}function Bl(e,t,n){t(!t()),n()(t())}var Vl=I('<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 jn(e,t){ae(t,!0);let n=R(t,"active",15),i=R(t,"fullwidth",3,!1),r=R(t,"label",3,""),a=R(t,"onclick",3,()=>null);var o=Vl();o.__click=[Bl,n,a];var l=b(o),d=b(l);St(d,()=>t.children),D(()=>{ie(o,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),le(o,"active",n()),le(o,"fullwidth",i())}),k(e,o),oe()}ce(["click"]);var Ul=I('<input type="text" class="svelte-1vrer3i">');function Xn(e,t){let n=R(t,"value",15),i=R(t,"label",3,""),r=R(t,"name",3,""),a=R(t,"readonly",3,!1),o=R(t,"oninput",3,()=>null);var l=Ul();l.__input=function(...d){var u;(u=o())==null||u.apply(this,d)},D(()=>{ie(l,"name",r()),ie(l,"aria-label",i()),ie(l,"placeholder",i()),l.readOnly=a()}),no(l,n),k(e,l)}ce(["input"]);var Wl=be('<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>'),Kl=be('<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>'),zl=be('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function gi(e,t){const n=R(t,"align",3,"bottom");var i=zl(),r=b(i);{var a=l=>{var d=Wl();k(l,d)},o=l=>{var d=tt(),u=te(d);{var f=c=>{var h=Kl();k(c,h)};H(u,c=>{n()==="center"&&c(f)},!0)}k(l,d)};H(r,l=>{n()==="bottom"?l(a):l(o,!1)})}k(e,i)}var Yl=I("<div><!></div>");function Nt(e,t){ae(t,!0);const n=R(t,"type",3,"error");var i=Yl(),r=b(i);St(r,()=>t.children),D(()=>Ga(i,`alert ${n()??""} svelte-18si0a5`)),k(e,i),oe()}var $l=I("<!> In-text Playlink",1),Zl=I("<!> Bottom Playlink",1),Gl=I('<div class="alert svelte-1shw34x"><!></div>'),Jl=(e,t)=>t().after_article_style="playlinks",Xl=(e,t)=>t().after_article_style="modal_button",Ql=I('<div><div class="label svelte-1shw34x">Bottom playlinks style</div> <div class="group svelte-1shw34x" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-1shw34x">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-1shw34x">Modal button</button> <div class="active-marker svelte-1shw34x"></div></div></div>'),es=I('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function ts(e,t){ae(t,!0);const n=R(t,"linkInjection",7),i=V(()=>n().after_article_style==="modal_button");var r=es(),a=te(r),o=b(a),l=V(()=>n().in_text??!0);jn(o,{fullwidth:!0,get active(){return s(l)},onclick:m=>{n().in_text=m,n().manual=!0},label:"In-text Playlink",children:(m,v)=>{var p=$l(),y=te(p);gi(y,{align:"center"}),k(m,p)},$$slots:{default:!0}});var d=T(o,2),u=V(()=>n().after_article??!1);jn(d,{fullwidth:!0,get active(){return s(u)},onclick:m=>{n().after_article=m,n().manual=!0},label:"Bottom Playlink",children:(m,v)=>{var p=Zl(),y=te(p);gi(y,{align:"bottom"}),k(m,p)},$$slots:{default:!0}});var f=T(a,2);{var c=m=>{var v=Gl(),p=b(v);Nt(p,{type:"warning",children:(y,w)=>{var S=Ye("At least one layout option must be selected for the playlink to be visible.");k(y,S)},$$slots:{default:!0}}),Ee(3,v,()=>jt,()=>({duration:200})),k(m,v)};H(f,m=>{vn(n())||m(c)})}var h=T(f,2);{var g=m=>{var v=Ql(),p=T(b(v),2),y=b(p);y.__click=[Jl,n];var w=T(y,2);w.__click=[Xl,n];var S=T(w,2);D(()=>{ie(p,"aria-activedescendant",`playlinks-${(s(i)?"after-article":"in-text")??""}`),ie(y,"aria-selected",!s(i)||null),le(y,"active",!s(i)),ie(w,"aria-selected",s(i)||null),le(w,"active",s(i)),le(S,"right",s(i))}),Ee(3,v,()=>jt,()=>({duration:100})),k(m,v)};H(h,m=>{n().after_article&&m(g)})}k(e,r),oe()}ce(["click"]);var ns=be('<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 is(e){var t=ns();k(e,t)}var rs=(e,t)=>L(t,!s(t)),as=I('<div class="content svelte-1fmy0wh"><!></div>'),os=I('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function ls(e,t){ae(t,!0);let n=W(!1),i=W(null);function r(f){var h;const c=f.target;c===s(i)||(h=s(i))!=null&&h.contains(c)||L(n,!1)}var a=os();re("click",fe,r);var o=b(a);o.__click=[rs,n];var l=b(o);is(l),Bt(o,f=>L(i,f),()=>s(i));var d=T(o,2);{var u=f=>{var c=as(),h=b(c);St(h,()=>t.children),Ee(1,c,()=>dn,()=>({duration:150,y:5})),k(f,c)};H(d,f=>{s(n)&&f(u)})}D(()=>{ie(o,"aria-label",t.ariaLabel),ie(o,"aria-expanded",s(n))}),k(e,a),oe()}ce(["click"]);function ss(e,t,n){requestAnimationFrame(()=>t());const i=e.target;if(["BUTTON","INPUT"].includes(i.nodeName)||i.closest("button")||i.closest("input"))return;const r=n()[0];r&&r.scrollIntoView({behavior:"smooth"})}var cs=(e,t)=>L(t,!s(t)),us=I('<button class="expand-sentence svelte-8gd2db"> </button>'),ds=I('<button class="context-menu-action svelte-8gd2db">Remove</button>'),fs=(e,t)=>L(t,!s(t)),vs=I('<div class="warning svelte-8gd2db" aria-label="Invalid playlink settings"><!></div>'),_s=I('<div class="actions svelte-8gd2db"><button class="expand svelte-8gd2db" aria-label="Expand"><!></button> <!> <!></div>'),hs=I('<div class="expanded svelte-8gd2db"><div class="label svelte-8gd2db">Link URL</div> <!> <div class="label offset svelte-8gd2db">Layout options</div> <div class="type-select svelte-8gd2db"><!></div></div>'),gs=I('<div class="item svelte-8gd2db"><div class="header svelte-8gd2db"><img class="poster svelte-8gd2db" alt="" width="32" height="48"> <div class="info svelte-8gd2db"><div class="title svelte-8gd2db"> </div> <div class="sentence svelte-8gd2db"><!> <!></div></div> <div class="context-menu svelte-8gd2db"><!></div></div> <div class="content svelte-8gd2db"><!> <!></div></div>');function ms(e,t){ae(t,!0);const n=R(t,"linkInjection",15),i=R(t,"onremove",3,()=>null),r=R(t,"onhighlight",3,()=>null),a=V(()=>n()||{}),o=V(()=>s(a).key),l=V(()=>s(a).sentence),d=V(()=>s(a).title_details),u=V(()=>s(a).failed),f=V(()=>s(a).failed_message),c=V(()=>s(a).inactive),h=V(()=>s(d)),g=V(()=>dl(n().sentence,n().title,60));let m=W(!1),v=W(!1),p=W(!1),y=W(null);ct(()=>{s(u)&&Te(we.InjectionFailed,s(h),{phrase:n().title,sentence:s(l)})});function w(G=!0){j().forEach(P=>{P.classList.toggle("playpilot-injection-highlight",G)})}function S(G){let X=G.target,P=X==null?void 0:X.dataset.playpilotInjectionKey;X&&!P&&(X=X.closest(`[data-playpilot-injection-key="${s(o)}"]`),P=X==null?void 0:X.dataset.playpilotInjectionKey),L(p,P===s(o)),s(y)&&s(p)&&r()(s(y))}function j(){const G=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${s(o)}"]`));return G.length?G:yr(fn()).filter(X=>We(X.innerText).includes(We(n().sentence)))||[]}var x=gs();re("mouseover",fe,S),x.__click=[ss,w,j];var E=b(x),C=b(E);D(()=>ie(C,"src",Lt(s(h).standing_poster)));var A=T(C,2),O=b(A),B=b(O),Y=T(O,2),N=b(Y);Wa(N,()=>(s(v)?s(l):s(g)).replace(n().title,`<em>${n().title}</em>`));var F=T(N,2);{var $=G=>{var X=us();X.__click=[cs,v];var P=b(X);D(()=>z(P,s(v)?"Less":"More")),k(G,X)};H(F,G=>{s(g).length<s(l).length&&G($)})}var M=T(A,2),K=b(M);ls(K,{ariaLabel:"More options",children:(G,X)=>{var P=ds();P.__click=function(...q){var ne;(ne=i())==null||ne.apply(this,q)},k(G,P)},$$slots:{default:!0}});var ee=T(E,2),se=b(ee);{var ve=G=>{Nt(G,{children:(X,P)=>{var q=Ye();D(()=>z(q,s(f))),k(X,q)},$$slots:{default:!0}})},Be=G=>{var X=_s(),P=b(X);P.__click=[fs,m];var q=b(P);Hl(q,{get expanded(){return s(m)}});var ne=T(P,2);{var ge=Pe=>{var $e=vs(),Ze=b($e);ql(Ze),Ee(3,$e,()=>Yn,()=>({duration:100})),k(Pe,$e)};H(ne,Pe=>{vn(n())||Pe(ge)})}var xe=T(ne,2),Ve=V(()=>s(c)?"Inactive":"Visible"),Se=V(()=>!n().inactive);jn(xe,{get label(){return s(Ve)},get active(){return s(Se)},onclick:Pe=>{n(n().inactive=!Pe,!0),n(n().manual=!0,!0)},children:(Pe,$e)=>{var Ze=Ye();D(()=>z(Ze,s(c)?"Inactive":"Visible")),k(Pe,Ze)},$$slots:{default:!0}}),D(()=>ie(P,"aria-expanded",s(m))),k(G,X)};H(se,G=>{s(u)?G(ve):G(Be,!1)})}var Ce=T(se,2);{var ut=G=>{var X=hs(),P=T(b(X),2);Xn(P,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(ge){n(n().playpilot_url=ge,!0)}});var q=T(P,4),ne=b(q);ts(ne,{get linkInjection(){return n()}}),Ee(3,X,()=>jt,()=>({duration:100})),k(G,X)};H(Ce,G=>{s(m)&&G(ut)})}Bt(x,G=>L(y,G),()=>s(y)),D(()=>{le(x,"highlighted",s(p)),le(x,"inactive",s(c)),z(B,s(h).title)}),re("mouseenter",x,()=>w(!0)),re("mouseleave",x,()=>w(!1)),re("error",C,({target:G})=>G.src=lr),Ee(6,x,()=>jt,()=>({duration:200})),k(e,x),oe()}ce(["click"]);var ps=I('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function ys(e,t){ae(t,!0);let n=R(t,"element",7),i=R(t,"position",23,()=>({x:0,y:0})),r=R(t,"limit",19,()=>({x:0,y:0})),a=R(t,"onchange",3,()=>null),o=!1,l={x:0,y:0},d=i();ct(()=>{u(i().x,i().y)});function u(v,p){const y=window.innerWidth,w=window.innerHeight,S=n().clientWidth,j=n().clientHeight;v=Math.min(Math.max(v,r().x),y-S-r().x),p=Math.min(Math.max(p,r().y),w-j-r().y),n().style.right=v+"px",n().style.bottom=Math.max(p,r().y)+"px",i({x:v,y:p}),a()(i())}function f(v){var p,y;return{x:v.pageX||((p=v.touches)==null?void 0:p[0].pageX)||0,y:v.pageY||((y=v.touches)==null?void 0:y[0].pageY)||0}}function c(v){o=!0,l=f(v),d=i()}function h(v){if(!o)return;const p=f(v),y=p.x-l.x,w=p.y-l.y,S=d.x-y,j=d.y-w;u(S,j)}function g(){o&&(o=!1)}var m=ps();re("mousemove",fe,h),re("touchmove",fe,h,void 0,!0),re("mouseup",fe,g),re("touchend",fe,g),re("resize",fe,()=>u(i().x,i().y)),m.__mousedown=c,m.__touchstart=c,k(e,m),oe()}ce(["mousedown","touchstart"]);var ws=I('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function ks(e,t){ae(t,!0);let n=R(t,"element",7),i=R(t,"height",7,200),r=R(t,"onchange",3,()=>null);const a=16;let o=!1,l=0,d=i();ct(()=>{i()&&u(i())});function u(v){const p=window.getComputedStyle(n()).minHeight||"0",y=Math.max(parseInt(p),Math.min(v,g()));n().style.height=`${y}px`,i(y),r()(y)}function f(v){var p,y;o=!0,l=v.pageY||((y=(p=v.touches)==null?void 0:p[0])==null?void 0:y.pageY)||0,d=n().clientHeight}function c(v){var S,j;if(!o)return;const p=v.pageY||((j=(S=v.touches)==null?void 0:S[0])==null?void 0:j.pageY)||0,y=l-p,w=d+y;u(w)}function h(){o=!1}function g(){const v=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-v,0)}var m=ws();re("mousemove",fe,c),re("touchmove",fe,c,void 0,!0),re("mouseup",fe,h),re("touchend",fe,h),re("resize",fe,()=>{i()&&u(i())}),m.__mousedown=f,m.__touchstart=f,k(e,m),oe()}ce(["mousedown","touchstart"]);var bs=be('<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 xs(e){var t=bs();k(e,t)}async function Ss(e){const t=new Headers({"Content-Type":"application/json"}),n=_n();if(!n)throw new Error("No token was provided");const i=await fetch(un+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!i.ok)throw i;return await i.json()}var Es=be('<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 Ts(e){var t=Es();k(e,t)}var As=I("<div> </div>"),Is=e=>e.stopImmediatePropagation(),Cs=I('<button class="item svelte-rjq94e"><img class="poster svelte-rjq94e" alt="" width="28" height="42"> <div class="content"><div class="name svelte-rjq94e"> </div> <div class="meta svelte-rjq94e"><div class="imdb svelte-rjq94e"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-rjq94e"><!></a></button>');function mi(e,t){ae(t,!0);const n=R(t,"hoverable",3,!0),i=R(t,"onclick",3,()=>null);var r=Cs();r.__click=function(...x){var E;(E=i())==null||E.apply(this,x)};var a=b(r);D(()=>ie(a,"src",Lt(t.title.standing_poster)));var o=T(a,2),l=b(o),d=b(l),u=T(l,2),f=b(u),c=b(f);mr(c);var h=T(c),g=T(f,2),m=b(g),v=T(g,2),p=b(v),y=T(v,2);{var w=x=>{var E=As(),C=b(E);D(()=>z(C,`${t.title.length??""} min`)),k(x,E)};H(y,x=>{t.title.length&&x(w)})}var S=T(o,2);S.__click=[Is];var j=b(S);Ts(j),D(()=>{le(r,"hoverable",n()),z(d,t.title.title),z(h,` ${t.title.imdb_score??""}`),z(m,t.title.year),z(p,t.title.type),ie(S,"href",`${or}/${t.title.type??""}/${t.title.slug??""}`)}),re("error",a,({target:x})=>x.src=lr),k(e,r),oe()}ce(["click"]);var Ps=I('<em class="empty svelte-1olb8n0">No results found</em>'),js=I('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),Ls=I('<div class="selected svelte-1olb8n0"><!></div>'),Ns=I('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function Ms(e,t){ae(t,!0);let n=R(t,"onselect",3,()=>null),i=R(t,"query",15),r=W(Z([])),a=W(null),o=W(!1);rn(()=>{i()&&l(i())});async function l(v){L(o,!0);try{L(r,Z(await Ss(v)))}finally{L(o,!1)}}function d(v){i(v.title),L(a,Z(v)),n()(v)}var u=Ns(),f=b(u);Xn(f,{oninput:()=>L(a,null),name:"search",label:"Search...",get value(){return i()},set value(v){i(v)}});var c=T(f,2);{var h=v=>{var p=js();nt(p,21,()=>s(r),y=>y.sid,(y,w)=>{mi(y,{get title(){return s(w)},onclick:()=>d(s(w))})},y=>{var w=tt(),S=te(w);{var j=x=>{var E=Ps();k(x,E)};H(S,x=>{s(o)||x(j)})}k(y,w)}),k(v,p)};H(c,v=>{i()&&!s(a)&&v(h)})}var g=T(c,2);{var m=v=>{var p=Ls(),y=b(p);mi(y,{get title(){return s(a)},hoverable:!1}),k(v,p)};H(g,v=>{s(a)&&v(m)})}k(e,u),oe()}function Ds(e,t,n,i,r,a){if(!s(t)||!s(n))return;const o=s(n).type==="movie"?"movie":"show",l=or+`/${o}/${s(n).slug}`,d={sid:s(n).sid,title:s(t),sentence:s(i),playpilot_url:l,key:Tr(s(n).sid),title_details:s(n),manual:!0};r.onsave(d),a()()}var Os=I('<div class="error svelte-1i8p6op"><!></div>'),Rs=I('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),Hs=I('<section class="layout svelte-1i8p6op"><div class="header svelte-1i8p6op"><!> <div class="heading svelte-1i8p6op">Add Playlink manually</div></div> <p class="svelte-1i8p6op">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-1i8p6op">Selected text</label> <!> <!> <!> <button class="save svelte-1i8p6op">Add playlink</button></section>');function Fs(e,t){ae(t,!0);let n=R(t,"htmlString",3,""),i=R(t,"onclose",3,()=>null),r=W(""),a=W(""),o=W(null),l=W(""),d=W("");ct(u);function u(){const C=window.getSelection();if(!(C!=null&&C.anchorNode)||C.anchorNode.parentElement&&!fn().contains(C.anchorNode.parentElement))return;const A=C.toString().trim();if(!A)return;L(l,""),L(r,Z(A));const O=C.getRangeAt(0).cloneContents();if(Array.from(O.childNodes).filter(F=>{var $;return($=F.textContent)==null?void 0:$.trim()}).length>1){L(l,"Selection contains multiple items. Selection may not contain a mix of styled and non styled text. Please select the text more directly.");return}L(d,Z(s(r))),L(a,Z(f(C,A)));const Y=C.getRangeAt(0).commonAncestorContainer.textContent,N=$n(n());(!Y||!N.includes(Y))&&L(l,"Selection was not inside of given content")}function f(C,A){const O=C.getRangeAt(0);let B=O.startContainer;for(;(B.textContent||"").length<=A.length*3&&B.parentNode;)B=B.parentNode;if(!B||!B.textContent)return"";const Y=B.textContent,N=c(B,O.startContainer,O.startOffset),F=c(B,O.endContainer,O.endOffset),$=Y.slice(0,N).lastIndexOf("."),M=Y.slice(F).match(/[.!?]/),K=M?F+M.index:Y.length,ee=$===-1?0:$+1,se=K;return Y.slice(ee,se+1).trim()}function c(C,A,O){let B=0;const Y=C,N=F=>{var $;if(F===A)return B+=O,!0;F.nodeType===Node.TEXT_NODE&&(B+=(($=F.textContent)==null?void 0:$.length)||0);for(let M=F.firstChild;M;M=M.nextSibling)if(N(M))return!0;return!1};return N(Y),B}function h(C){var A,O;L(o,Z(C)),(O=(A=window.getSelection())==null?void 0:A.removeAllRanges)==null||O.call(A)}var g=Hs();re("mouseup",fe,u);var m=b(g),v=b(m);Jn(v,{get onclick(){return i()},size:"24px",children:(C,A)=>{xs(C)},$$slots:{default:!0}});var p=T(v,2);sn(p,(C,A)=>Ae==null?void 0:Ae(C,A),()=>2);var y=T(m,6);Xn(y,{get value(){return s(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var w=T(y,2);{var S=C=>{var A=Os(),O=b(A);Nt(O,{children:(B,Y)=>{var N=Ye();D(()=>z(N,s(l))),k(B,N)},$$slots:{default:!0}}),k(C,A)};H(w,C=>{s(l)&&C(S)})}var j=T(w,2);{var x=C=>{var A=Rs(),O=T(te(A),2);nr(O,()=>s(a)+s(r),B=>{Ms(B,{onselect:h,get query(){return s(d)},set query(Y){L(d,Z(Y))}})}),k(C,A)};H(j,C=>{s(l)||C(x)})}var E=T(j,2);E.__click=[Ds,r,o,a,t,i],D(()=>E.disabled=!s(r)||!s(o)),k(e,g),oe()}ce(["click"]);var qs=be('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function Bs(e){var t=qs();k(e,t)}var Vs=I('<strong class="svelte-1l4sxuh">AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net" class="svelte-1l4sxuh">Partner Portal</a>',1),Us=I('<span class="svelte-1l4sxuh">.</span>'),Ws=I(`AI links are currently processing. This can take several minutes. We'll automatically insert all found injections once ready. <div class="message svelte-1l4sxuh"> <span class="ellipses svelte-1l4sxuh"></span></div> <div class="loading-bar svelte-1l4sxuh"><div class="loading-bar-progress svelte-1l4sxuh"><div class="loading-bar-fill svelte-1l4sxuh" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1l4sxuh"> </div></div>`,1),Ks=I('<div class="animator svelte-1l4sxuh" data-test-id="animator"></div>'),zs=I('<div class="ai-indicator svelte-1l4sxuh"><div class="content svelte-1l4sxuh"><div class="icon svelte-1l4sxuh"><!></div> <div class="svelte-1l4sxuh"><!></div></div> <div class="border svelte-1l4sxuh"><!></div></div>');function Ys(e,t){const n=R(t,"aiRunning",3,!1),i=R(t,"automationEnabled",3,!1),r=R(t,"message",3,""),a=R(t,"percentage",3,0);var o=zs(),l=b(o),d=b(l),u=b(d);Bs(u);var f=T(d,2),c=b(f);{var h=y=>{var w=Vs();k(y,w)},g=y=>{var w=tt(),S=te(w);{var j=x=>{var E=Ws(),C=T(te(E)),A=b(C),O=T(A);nt(O,20,()=>({length:3}),pt,(K,ee)=>{var se=Us();k(K,se)});var B=T(C,2),Y=b(B),N=b(Y);const F=V(()=>`${Math.max(a(),3)??""}%`);D(()=>cn(N,"width",s(F)));var $=T(Y,2),M=b($);D(()=>{z(A,`${r()??""} `),z(M,`${a()??""}%`)}),k(x,E)};H(S,x=>{n()&&x(j)},!0)}k(y,w)};H(c,y=>{i()?y(g,!1):y(h)})}var m=T(l,2),v=b(m);{var p=y=>{var w=Ks();k(y,w)};H(v,y=>{n()&&y(p)})}D(()=>le(o,"running",n())),k(e,o)}async function $s(e,t,n,i,r,a,o){try{L(t,!0),L(n,!1),i(await Cl(i(),r())),L(a,Z(s(o)))}catch{L(n,!0)}finally{L(t,!1)}}var Zs=I('<div class="handles svelte-1b2vpoj"><div class="handle svelte-1b2vpoj"><!></div> <div class="handle svelte-1b2vpoj"><!></div></div>'),Gs=I('<div class="loading svelte-1b2vpoj">Loading...</div>'),Js=I('<div class="bubble svelte-1b2vpoj"> </div> <!>',1),Xs=I(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
9
|
+
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal</a>`,1),Qs=I('<div class="alert svelte-1b2vpoj"><!></div>'),ec=I('<div class="error svelte-1b2vpoj"><!></div>'),tc=I('<div class="empty svelte-1b2vpoj">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),nc=I('<button class="save svelte-1b2vpoj"> </button>'),ic=I('<div class="items svelte-1b2vpoj"></div> <!>',1),rc=I("<!> <!> <!> <!>",1),ac=I('<div class="panel playpilot-styled-scrollbar svelte-1b2vpoj"><!></div>'),oc=I('<section class="editor playpilot-styled-scrollbar svelte-1b2vpoj"><!> <header class="header svelte-1b2vpoj"><div class="heading svelte-1b2vpoj">Playlinks</div> <!></header> <!> <!></section>');function lc(e,t){ae(t,!0);let n=R(t,"linkInjections",15),i=R(t,"htmlString",3,""),r=R(t,"loading",3,!1),a=R(t,"injectionsEnabled",3,!1),o=R(t,"aiStatus",19,()=>({}));const l="editor-position",d="editor-height";let u=W(null),f=Z(JSON.parse(localStorage.getItem(l)||'{ "x": 0, "y": 0 }')),c=Z(parseInt(localStorage.getItem(d)||"0")),h=W(!1),g=W(!1),m=W(!1),v=W(0),p=W("");const y=V(()=>JSON.stringify(n())),w=V(()=>s(p)&&s(p)!==s(y)),S=V(()=>n().filter(P=>P.title_details&&!P.removed&&!P.duplicate&&(P.manual||!P.manual&&!P.failed))),j=V(()=>C(s(S))),x=V(()=>$t(o().automationEnabled,!1)),E=V(()=>$t(o().aiRunning,!1));rn(()=>{r()||ze(()=>{requestAnimationFrame(()=>L(p,Z(s(y)))),N()})});function C(P){return P.sort((q,ne)=>q.failed!==ne.failed?q.failed?1:-1:q.title_details.title.localeCompare(ne.title_details.title))}function A(P,q){localStorage.setItem(P,q)}function O(P){const q=n().findIndex(ne=>ne.key===P);n(n()[q].manual=!0,!0),n(n()[q].removed=!0,!0),n([...n()])}function B(P){if(!s(u))return;const q=P.offsetTop,ne=q+P.offsetHeight,ge=s(u).scrollTop,xe=ge+s(u).clientHeight;q>=ge&&ne<=xe||s(u).scrollTo({top:q-s(u).clientHeight/2,behavior:"smooth"})}function Y(P){const q=P.target;L(v,Z(q.scrollTop))}function N(){const P={total:n().length,failed_automatic:n().filter(q=>q.failed&&!q.manual).length,failed_manual:n().filter(q=>q.failed&&q.manual).length,final_injected:s(S).length};Te(we.TotalInjectionsCount,null,P)}var F=oc(),$=b(F);{var M=P=>{var q=Zs(),ne=b(q),ge=b(ne);ks(ge,{get element(){return s(u)},get height(){return c},onchange:Se=>A(d,JSON.stringify(Se))});var xe=T(ne,2),Ve=b(xe);ys(Ve,{get element(){return s(u)},get position(){return f},limit:{x:16,y:16},onchange:Se=>A(l,JSON.stringify(Se))}),k(P,q)};H($,P=>{s(u)&&!r()&&P(M)})}var K=T($,2),ee=b(K);sn(ee,P=>Ae==null?void 0:Ae(P));var se=T(ee,2);{var ve=P=>{var q=Gs();k(P,q)},Be=P=>{var q=tt(),ne=te(q);{var ge=xe=>{var Ve=Js(),Se=te(Ve),Pe=b(Se),$e=T(Se,2);Jn($e,{onclick:()=>L(h,!0),size:"24px","aria-label":"Add manual injection",children:(Ze,ue)=>{var je=Ye("+");k(Ze,je)},$$slots:{default:!0}}),D(()=>{ie(Se,"aria-label",`${s(S).length??""} found playlinks`),z(Pe,s(S).length)}),k(xe,Ve)};H(ne,xe=>{s(E)||xe(ge)},!0)}k(P,q)};H(se,P=>{r()?P(ve):P(Be,!1)})}var Ce=T(K,2);{var ut=P=>{var q=rc(),ne=te(q);{var ge=ue=>{var je=Qs(),dt=b(je);Nt(dt,{type:"warning",children:(Et,hn)=>{var me=Xs();k(Et,me)},$$slots:{default:!0}}),k(ue,je)};H(ne,ue=>{a()||ue(ge)})}var xe=T(ne,2);{var Ve=ue=>{Ys(ue,so(o))};H(xe,ue=>{(s(E)||!s(x))&&ue(Ve)})}var Se=T(xe,2);{var Pe=ue=>{var je=ec(),dt=b(je);Nt(dt,{children:(Et,hn)=>{var me=Ye("Something went wrong, check your links below.");k(Et,me)},$$slots:{default:!0}}),Ee(7,je,()=>jt,()=>({duration:150})),k(ue,je)};H(Se,ue=>{s(m)&&ue(Pe)})}var $e=T(Se,2);{var Ze=ue=>{var je=ic(),dt=te(je);nt(dt,21,()=>s(j),me=>me.key,(me,Oe)=>{const Vt=V(()=>n().findIndex(gn=>gn.key===s(Oe).key));ms(me,{onremove:()=>O(s(Oe).key),onhighlight:B,get linkInjection(){return n()[s(Vt)]},set linkInjection(gn){n(n()[s(Vt)]=gn,!0)}})},me=>{var Oe=tc();k(me,Oe)});var Et=T(dt,2);{var hn=me=>{var Oe=nc();Oe.__click=[$s,g,m,n,i,p,y];var Vt=b(Oe);D(()=>{Oe.disabled=s(g),z(Vt,s(g)?"Saving...":"Save links")}),Ee(1,Oe,()=>Yn,()=>({duration:100})),k(me,Oe)};H(Et,me=>{s(w)&&n().length&&me(hn)})}k(ue,je)};H($e,ue=>{s(E)||ue(Ze)})}k(P,q)};H(Ce,P=>{r()||P(ut)})}var G=T(Ce,2);{var X=P=>{var q=ac(),ne=b(q);Fs(ne,{get htmlString(){return i()},onclose:()=>L(h,!1),onsave:ge=>n().push(ge)}),D(()=>cn(q,"top",`${s(v)??""}px`)),Ee(3,q,()=>dn,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),k(P,q)};H(G,P=>{s(h)&&P(X)})}Bt(F,P=>L(u,P),()=>s(u)),D(()=>{le(F,"panel-open",s(h)),le(F,"loading",r())}),re("scroll",F,Y),k(e,F),oe()}ce(["click"]);var sc=be('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function cc(e){var t=sc();k(e,t)}var uc=I('<div class="trigger svelte-qee95d"><button type="button" class="button svelte-qee95d" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qee95d" title="Close PlayPilot TPI"><!></button></div>');function dc(e,t){var n=uc(),i=b(n);i.__click=function(...l){var d;(d=t.onclick)==null||d.apply(this,l)};var r=b(i);cc(r);var a=T(i,2);a.__click=function(...l){var d;(d=t.onclose)==null||d.apply(this,l)};var o=b(a);Ar(o),k(e,n)}ce(["click"]);var fc=I('<div class="playpilot-link-injections svelte-4l9ehd"><!> <!> <!></div>');function vc(e,t){ae(t,!0);const n=fn(),i=yr(n),r=i.map(N=>N.outerHTML).join("");let a=W(null),o=W(null),l=W(Z(_r())),d=W(!!Kn()),u=W(!1),f=W(!0),c=W(Z([])),h=W(void 0);const g=V(()=>s(a)||{}),m=V(()=>$t(s(g).ai_injections,()=>[],!0)),v=V(()=>$t(s(g).link_injections,()=>[],!0));rn(()=>{s(l)&&!s(f)&&y()}),ct(()=>{if(!jl())return(async()=>(await p(),Te(we.ArticlePageView)))(),()=>Pn()});async function p(){L(f,!0),s(l)&&L(u,Z(await vr()));const N=Sr();try{const F=await Pl();if(!s(l)&&(F!=null&&F.exclude_urls_pattern)&&N.match(F.exclude_urls_pattern))return}catch(F){Te(we.FetchingConfigFailed),console.error("TPI Config failed to fetch",F);return}if(L(a,Z(await _i(N,r,{maxTries:1}))),L(f,!1),!!s(a)){if(vo({organizationSid:s(a).organization_sid,domainSid:s(a).domain_sid}),!s(a).ai_running||!s(a).automation_enabled){w({aiInjections:s(m),manualInjections:s(v)});return}s(l)&&(L(a,Z(await _i(N,r,{requireCompletedResult:!0}))),w({aiInjections:s(m),manualInjections:s(v)}))}}function y(){Pn(),w(kl(s(c)))}function w(N={aiInjections:s(m),manualInjections:s(v)}){const F=vl(i,S,N);JSON.stringify(F)!==JSON.stringify(s(c))&&L(c,Z(F));const $=F.filter(M=>!M.failed);$.length&&(s(l)||Te(we.ArticleInjected,null,{manual:$.filter(M=>M.manual).length,ai:$.filter(M=>!M.manual).length}))}function S(N){L(o,Z(N))}function j(){L(l,!0),go(),p()}var x=fc(),E=b(x);{var C=N=>{dc(N,{onclick:j,onclose:()=>{L(d,!1),ho()}})};H(E,N=>{s(d)&&!s(l)&&N(C)})}var A=T(E,2);{var O=N=>{var F=V(()=>{var M;return(M=s(a))==null?void 0:M.injections_enabled}),$=V(()=>{var M,K,ee,se,ve;return{automationEnabled:(M=s(a))==null?void 0:M.automation_enabled,aiRunning:((K=s(a))==null?void 0:K.ai_running)&&((ee=s(a))==null?void 0:ee.automation_enabled),message:(se=s(a))==null?void 0:se.ai_progress_message,percentage:(ve=s(a))==null?void 0:ve.ai_progress_percentage}});Bt(lc(N,{htmlString:r,get loading(){return s(f)},get injectionsEnabled(){return s(F)},get aiStatus(){return s($)},get linkInjections(){return s(c)},set linkInjections(M){L(c,Z(M))}}),M=>L(h,Z(M)),()=>s(h))};H(A,N=>{s(l)&&s(u)&&N(O)})}var B=T(A,2);{var Y=N=>{Ol(N,{get title(){return s(o).title_details},onclose:()=>L(o,null)})};H(B,N=>{s(o)&&s(o).title_details&&N(Y)})}k(e,x),oe()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,app:null,initialize(e={token:"",selector:"",after_article_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.after_article_selector=e.after_article_selector,this.after_article_insert_position=e.after_article_insert_position,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=Un(vc,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),Pn()}};
|
|
10
10
|
|
|
11
11
|
})();
|
package/package.json
CHANGED
package/src/lib/auth.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { track } from './tracking'
|
|
|
5
5
|
|
|
6
6
|
const cookieName = 'EncryptedToken'
|
|
7
7
|
const urlParam = 'articleReplacementEditToken'
|
|
8
|
+
const editorialParam = 'playpilot-editorial-mode'
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Authorize the user
|
|
@@ -87,7 +88,14 @@ export function removeAuthCookie(): void {
|
|
|
87
88
|
*/
|
|
88
89
|
export function isEditorialModeEnabled(): boolean {
|
|
89
90
|
const windowToken = window?.PlayPilotLinkInjections?.editorial_token
|
|
90
|
-
return new URLSearchParams(window.location.search).get(
|
|
91
|
+
return new URLSearchParams(window.location.search).get(editorialParam) === 'true' || !!windowToken
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function setEditorialParamInUrl(): void {
|
|
95
|
+
const url = new URL(window.location.href)
|
|
96
|
+
url.searchParams.set(editorialParam, 'true')
|
|
97
|
+
|
|
98
|
+
window.history.replaceState({}, '', url)
|
|
91
99
|
}
|
|
92
100
|
|
|
93
101
|
export function removeAuthParamFromUrl(): void {
|
package/src/routes/+page.svelte
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { getFullUrlPath } from '$lib/url'
|
|
7
7
|
import { isCrawler } from '$lib/crawler'
|
|
8
8
|
import { TrackingEvent } from '$lib/enums/TrackingEvent'
|
|
9
|
-
import { authorize, getAuthToken, isEditorialModeEnabled, removeAuthCookie } from '$lib/auth'
|
|
9
|
+
import { authorize, getAuthToken, isEditorialModeEnabled, removeAuthCookie, setEditorialParamInUrl } from '$lib/auth'
|
|
10
10
|
import TitleModal from './components/TitleModal.svelte'
|
|
11
11
|
import Editor from './components/Editorial/Editor.svelte'
|
|
12
12
|
import EditorTrigger from './components/Editorial/EditorTrigger.svelte'
|
|
@@ -116,12 +116,19 @@
|
|
|
116
116
|
function setTarget(injection: LinkInjection): void {
|
|
117
117
|
activeInjection = injection
|
|
118
118
|
}
|
|
119
|
+
|
|
120
|
+
function openEditorialMode() {
|
|
121
|
+
isEditorialMode = true
|
|
122
|
+
setEditorialParamInUrl()
|
|
123
|
+
|
|
124
|
+
initialize()
|
|
125
|
+
}
|
|
119
126
|
</script>
|
|
120
127
|
|
|
121
128
|
<div class="playpilot-link-injections">
|
|
122
129
|
{#if hasAuthToken && !isEditorialMode}
|
|
123
130
|
<EditorTrigger
|
|
124
|
-
onclick={
|
|
131
|
+
onclick={openEditorialMode}
|
|
125
132
|
onclose={() => { hasAuthToken = false; removeAuthCookie() }} />
|
|
126
133
|
{/if}
|
|
127
134
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
|
2
2
|
|
|
3
|
-
import { authorize, getAuthToken, isEditorialModeEnabled, removeAuthCookie, removeAuthParamFromUrl } from '$lib/auth'
|
|
3
|
+
import { authorize, getAuthToken, isEditorialModeEnabled, removeAuthCookie, removeAuthParamFromUrl, setEditorialParamInUrl } from '$lib/auth'
|
|
4
4
|
import { track } from '$lib/tracking'
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -152,4 +152,20 @@ describe('$lib/auth', () => {
|
|
|
152
152
|
expect(window.location.search).toBe('?some_param=abc&some-other_param=123')
|
|
153
153
|
})
|
|
154
154
|
})
|
|
155
|
+
|
|
156
|
+
describe('removeAuthParamFromUrl', () => {
|
|
157
|
+
it('Should add param to url', async () => {
|
|
158
|
+
window.location.search = ''
|
|
159
|
+
setEditorialParamInUrl()
|
|
160
|
+
|
|
161
|
+
expect(window.location.search).toBe('?playpilot-editorial-mode=true')
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
it('Should add param to url even if other params are already present', async () => {
|
|
165
|
+
window.location.search = '?other-param=123'
|
|
166
|
+
setEditorialParamInUrl()
|
|
167
|
+
|
|
168
|
+
expect(window.location.search).toBe('?other-param=123&playpilot-editorial-mode=true')
|
|
169
|
+
})
|
|
170
|
+
})
|
|
155
171
|
})
|
|
@@ -55,7 +55,7 @@ describe('$routes/+page.svelte', () => {
|
|
|
55
55
|
afterEach(() => {
|
|
56
56
|
Object.defineProperty(window, 'location', {
|
|
57
57
|
writable: true,
|
|
58
|
-
value: { search: '' },
|
|
58
|
+
value: { search: '', href: 'http://localhost:3000/' },
|
|
59
59
|
})
|
|
60
60
|
|
|
61
61
|
// @ts-ignore
|
|
@@ -74,6 +74,7 @@ describe('$routes/+page.svelte', () => {
|
|
|
74
74
|
// @ts-ignore
|
|
75
75
|
window.PlayPilotLinkInjections = { editorial_token: 'some-token' }
|
|
76
76
|
|
|
77
|
+
// @ts-ignore
|
|
77
78
|
vi.mocked(pollLinkInjections).mockResolvedValueOnce({ ai_running: true, injections_ready: true, page_updated: false, automation_enabled: true, injections_enabled: true, ai_injections: [], link_injections: [] })
|
|
78
79
|
|
|
79
80
|
render(page)
|