@playpilot/tpi 8.41.0-beta.1 → 8.41.0
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/editorial.mount.js +10 -10
- package/dist/link-injections.js +2 -2
- package/dist/mount.css +1 -1
- package/dist/mount.js +7 -7
- package/package.json +1 -1
- package/src/lib/enums/SplitTest.ts +0 -5
- package/src/lib/fakeData.ts +2 -2
- package/src/lib/injection.ts +13 -3
- package/src/lib/types/config.d.ts +5 -0
- package/src/lib/url.ts +4 -0
- package/src/routes/components/Ads/Display.svelte +5 -52
- package/src/routes/components/Modals/RailModal.svelte +2 -6
- package/src/routes/components/Modals/TitlesRailModal.svelte +1 -3
- package/src/routes/components/Playlinks/Playlinks.svelte +3 -11
- package/src/routes/components/Title.svelte +2 -10
- package/src/routes/elements/+page.svelte +1 -20
- package/src/tests/lib/injection.test.js +28 -0
- package/src/tests/lib/url.test.js +24 -1
- package/src/tests/routes/components/Ads/Display.test.js +156 -166
package/dist/editorial.mount.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(() => {
|
|
2
|
-
var Pu=Object.defineProperty;var po=t=>{throw TypeError(t)};var Iu=(t,e,n)=>e in t?Pu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var _t=(t,e,n)=>Iu(t,typeof e!="symbol"?e+"":e,n),qa=(t,e,n)=>e.has(t)||po("Cannot "+n);var N=(t,e,n)=>(qa(t,e,"read from private field"),n?n.call(t):e.get(t)),be=(t,e,n)=>e.has(t)?po("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ke=(t,e,n,i)=>(qa(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),Pe=(t,e,n)=>(qa(t,e,"access private method"),n);var ka=Array.isArray,Au=Array.prototype.indexOf,$r=Array.prototype.includes,xa=Array.from,cs=Object.defineProperty,qn=Object.getOwnPropertyDescriptor,us=Object.getOwnPropertyDescriptors,Cu=Object.prototype,Mu=Array.prototype,Cl=Object.getPrototypeOf,_o=Object.isExtensible;function _i(t){return typeof t=="function"}const Pt=()=>{};function Lu(t){return typeof(t==null?void 0:t.then)=="function"}function ju(t){return t()}function il(t){for(var e=0;e<t.length;e++)t[e]()}function ds(){var t,e,n=new Promise((i,r)=>{t=i,e=r});return{promise:n,resolve:t,reject:e}}function vr(t,e,n=!1){return t===void 0?n?e():e:t}function ui(t,e){if(Array.isArray(t))return t;if(e===void 0||!(Symbol.iterator in t))return Array.from(t);const n=[];for(const i of t)if(n.push(i),n.length===e)break;return n}const ft=2,Ni=4,Ir=8,Ml=1<<24,Dt=16,qt=32,kn=64,rl=128,Ll=256,Jt=512,ot=1024,at=2048,Rt=4096,mt=8192,pt=16384,hi=32768,ea=1<<25,un=65536,ta=1<<17,fs=1<<18,Zi=1<<19,vs=1<<20,an=1<<25,na=1<<21,ki=1<<22,zn=1<<23,on=Symbol("$state"),hs=Symbol("component"),gs=Symbol("legacy props"),Du=Symbol(""),Wr=Symbol("attributes"),al=Symbol("class"),ll=Symbol("style"),ir=Symbol("text"),Ur=Symbol("form reset"),Ar=new class extends Error{constructor(){super(...arguments);_t(this,"name","StaleReactionError");_t(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var ls;const Cr=!!((ls=globalThis.document)!=null&&ls.contentType)&&globalThis.document.contentType.includes("xml"),Ru=11,Nu=1,Ou=2,ms=4,qu=8,zu=16,Hu=1,Fu=2,Bu=4,Vu=8,Wu=16,Uu=1,Gu=2,Zu=4,Ku=1,Yu=2,it=Symbol("uninitialized"),ps="http://www.w3.org/1999/xhtml",_s="http://www.w3.org/2000/svg",Ju="http://www.w3.org/1998/Math/MathML",Qu="@attach";function Xu(){console.warn("https://svelte.dev/e/derived_inert")}function $u(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ed(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let ys=!1;function ws(t){return t===this.v}function bs(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function ks(t){return!bs(t,this.v)}function jl(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function td(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function nd(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function id(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function rd(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ad(t){throw new Error("https://svelte.dev/e/effect_orphan")}function ld(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function od(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function sd(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function cd(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ud(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function dd(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}let Ki=!1;function fd(){Ki=!0}function vd(t){let e=t.p;for(;e!==null&&e.c===null;)e=e.p;return(e==null?void 0:e.c)??null}function xs(t,e){return t===null&&jl(),t.c??(t.c=new Map(vd(t)||void 0))}let Ze=null;function Oi(t){Ze=t}function hr(t){return xs(Ze).get(t)}function Mr(t,e){return xs(Ze).set(t,e),e}function re(t,e=!1,n){Ze={p:Ze,i:!1,c:null,e:null,s:t,x:null,r:Ie,l:Ki&&!e?{s:null,u:null,$:[]}:null}}function ae(t){var e=Ze,n=e.e;if(n!==null){e.e=null;for(var i of n)Us(i)}return t!==void 0&&(e.x=t),e.i=!0,Ze=e.p,Dl(t)}function Dl(t={}){return cs(t,hs,{value:!0}),t}function gi(){return!Ki||Ze!==null&&Ze.l===null}let $n=[];function Ss(){var t=$n;$n=[],il(t)}function It(t){if($n.length===0&&!xi){var e=$n;queueMicrotask(()=>{e===$n&&Ss()})}$n.push(t)}function hd(){for(;$n.length>0;)Ss()}const gd=-7169;function nt(t,e){t.f=t.f&gd|e}function Rl(t){t.f&Jt||t.deps===null?nt(t,ot):nt(t,Rt)}function Ts(t,e,n){t.f&at?e.add(t):t.f&Rt&&n.add(t),nt(t,ot)}function md(t,e){if(e){const n=document.body;t.autofocus=!0,It(()=>{document.activeElement===n&&t.focus()})}}let yo=!1;function pd(){yo||(yo=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)(e=n[Ur])==null||e.call(n)})},{capture:!0}))}function _d(t,e,n,i=!0){i&&n();for(var r of e)t.addEventListener(r,n);jr(()=>{for(var a of e)t.removeEventListener(a,n)})}function In(t){var e=Le,n=Ie;zt(null),fn(null);try{return t()}finally{zt(e),fn(n)}}function Nl(t,e,n,i=n){t.addEventListener(e,()=>In(n));const r=t[Ur];r?t[Ur]=()=>{r(),i(!0)}:t[Ur]=()=>i(!0),pd()}function Es(t,e,n,i){const r=gi()?qi:Sa;var a=t.filter(v=>!v.settled),o=e.map(r);if(n.length===0&&a.length===0){i(o);return}var s=Ie,c=Ps(),u=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(v=>v.promise)):null;function d(v){if(!(s.f&pt)){c();try{i([...o,...v])}catch(g){rn(g,s)}gr()}}var h=Is();if(n.length===0){u.then(()=>d([])).finally(h);return}function f(){Promise.all(n.map(v=>yd(v))).then(d).catch(v=>rn(v,s)).finally(h)}u?u.then(()=>{c(),f(),gr()}):f()}function Ps(){var t=Ie,e=Le,n=Ze,i=me;return function(a=!0){fn(t),zt(e),Oi(n),a&&!(t.f&pt)&&(i==null||i.activate(),i==null||i.apply())}}function gr(t=!0){fn(null),zt(null),Oi(null),t&&(me==null||me.deactivate())}function Is(){var t=Ie,e=t.b,n=me,i=!!(e!=null&&e.is_rendered());return e==null||e.update_pending_count(1,n),n.increment(i,t),()=>{e==null||e.update_pending_count(-1,n),n.decrement(i,t)}}function qi(t){var e=ft|at;return Ie!==null&&(Ie.f|=Zi),{ctx:Ze,deps:null,effects:null,equals:ws,f:e,fn:t,reactions:null,rv:0,v:it,wv:0,parent:Ie,ac:null}}const rr=Symbol("obsolete");function yd(t,e,n){let i=Ie;i===null&&td();var r=void 0,a=dn(it),o=!Le,s=new Set;return jd(()=>{var v,g;var c=Ie,u=ds();r=u.promise;try{Promise.resolve(t()).then(u.resolve,m=>{m!==Ar&&u.reject(m)}).finally(gr)}catch(m){u.reject(m),gr()}var d=me;if(o){if(c.f&hi)var h=Is();if((v=i.b)!=null&&v.is_rendered())(g=d.async_deriveds.get(c))==null||g.reject(rr);else for(const m of s.values())m.reject(rr);s.add(u),d.async_deriveds.set(c,u)}const f=(m,p=void 0)=>{h==null||h(),s.delete(u),p!==rr&&(d.activate(),p?(a.f|=zn,wn(a,p)):(a.f&zn&&(a.f^=zn),wn(a,m)),d.deactivate())};u.promise.then(f,m=>f(null,m||"unknown"))}),jr(()=>{for(const c of s)c.reject(rr)}),new Promise(c=>{function u(d){function h(){d===r?c(a):u(r)}d.then(h,h)}u(r)})}function V(t){const e=qi(t);return Xs(e),e}function Sa(t){const e=qi(t);return e.equals=ks,e}function wd(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)dt(e[n])}}function Ol(t){var e,n=Ie,i=t.parent;if(!xn&&i!==null&&t.v!==it&&i.f&(pt|mt))return Xu(),t.v;fn(i);try{wd(t),e=nc(t)}finally{fn(n)}return e}function As(t){var e=Ol(t);if(!t.equals(e)&&(t.wv=ec(),(!(me!=null&&me.is_fork)||t.deps===null)&&(me!==null?(me.capture(t,e,!0),cr==null||cr.capture(t,e,!0)):t.v=e,t.deps===null))){nt(t,ot);return}xn||(ut!==null?(Hl()||me!=null&&me.is_fork)&&ut.set(t,e):Rl(t))}function bd(t){var e;if(t.effects!==null)for(const n of t.effects)(n.teardown||n.ac)&&((e=n.teardown)==null||e.call(n),n.ac!==null&&In(()=>{n.ac.abort(Ar),n.ac=null}),n.fn!==null&&(n.teardown=Pt),mr(n,0),Fl(n))}function Cs(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&zi(e)}let za=null,pi=null,me=null,cr=null,ut=null,ol=null,xi=!1,Ha=!1,ur=null,Gr=null;var wo=0;let kd=1;var Pi,Ln,ni,Ii,Ai,Ci,mn,Mi,kt,wr,pn,Wt,en,Li,ii,qe,sl,cl,ar,ul,Ms,Ls,yi,xd,lr;const ga=class ga{constructor(){be(this,qe);_t(this,"id",kd++);be(this,Pi,!1);_t(this,"linked",!0);be(this,Ln,null);be(this,ni,null);_t(this,"async_deriveds",new Map);_t(this,"current",new Map);_t(this,"previous",new Map);be(this,Ii,new Set);be(this,Ai,new Set);be(this,Ci,0);be(this,mn,new Map);be(this,Mi,null);be(this,kt,[]);be(this,wr,[]);be(this,pn,new Set);be(this,Wt,new Set);be(this,en,new Map);be(this,Li,new Set);_t(this,"is_fork",!1);be(this,ii,!1);pi===null?za=pi=this:(ke(pi,ni,this),ke(this,Ln,pi)),pi=this}skip_effect(e){N(this,en).has(e)||N(this,en).set(e,{d:[],m:[]}),N(this,Li).delete(e)}unskip_effect(e,n=i=>this.schedule(i)){var i=N(this,en).get(e);if(i){N(this,en).delete(e);for(var r of i.d)nt(r,at),n(r);for(r of i.m)nt(r,Rt),n(r)}N(this,Li).add(e)}capture(e,n,i=!1){e.v!==it&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&zn||(this.current.set(e,[n,i]),ut==null||ut.set(e,n)),this.is_fork||(e.v=n)}activate(){me=this}deactivate(){me=null,ut=null}flush(){try{Ha=!0,me=this,Pe(this,qe,ar).call(this)}finally{wo=0,ol=null,ur=null,Gr=null,Ha=!1,me=null,ut=null,sn.clear()}}discard(){var e;for(const n of N(this,Ai))n(this);N(this,Ai).clear();for(const n of this.async_deriveds.values())n.reject(rr);Pe(this,qe,lr).call(this),(e=N(this,Mi))==null||e.resolve()}register_created_effect(e){N(this,wr).push(e)}increment(e,n){if(ke(this,Ci,N(this,Ci)+1),e){let i=N(this,mn).get(n)??0;N(this,mn).set(n,i+1)}}decrement(e,n){if(ke(this,Ci,N(this,Ci)-1),e){let i=N(this,mn).get(n)??0;i===1?N(this,mn).delete(n):N(this,mn).set(n,i-1)}N(this,ii)||(ke(this,ii,!0),It(()=>{ke(this,ii,!1),this.linked&&this.flush()}))}transfer_effects(e,n){for(const i of e)N(this,pn).add(i);for(const i of n)N(this,Wt).add(i);e.clear(),n.clear()}oncommit(e){N(this,Ii).add(e)}ondiscard(e){N(this,Ai).add(e)}settled(){return(N(this,Mi)??ke(this,Mi,ds())).promise}static ensure(){if(me===null){const e=me=new ga;!Ha&&!xi&&It(()=>{N(e,Pi)||e.flush()})}return me}apply(){{ut=null;return}}schedule(e){var n;if(ol=e,(n=e.b)!=null&&n.is_pending&&e.f&(Ni|Ir|Ml)&&!(e.f&hi)){e.b.defer_effect(e);return}N(this,kt).push(e)}};Pi=new WeakMap,Ln=new WeakMap,ni=new WeakMap,Ii=new WeakMap,Ai=new WeakMap,Ci=new WeakMap,mn=new WeakMap,Mi=new WeakMap,kt=new WeakMap,wr=new WeakMap,pn=new WeakMap,Wt=new WeakMap,en=new WeakMap,Li=new WeakMap,ii=new WeakMap,qe=new WeakSet,sl=function(){if(this.is_fork)return!0;for(const i of N(this,mn).keys()){for(var e=i,n=!1;e.parent!==null;){if(N(this,en).has(e)){n=!0;break}e=e.parent}if(!n)return!0}return!1},cl=function(){var e=[];for(const a of N(this,kt))if(!(a.f&pt||!(a.f&(at|Rt)))){for(var n=a,i=!1;n.parent!==null;){n=n.parent;var r=n.f;if(r&(kn|qt)){if(!(r&ot)){i=!0;break}n.f^=ot}}i||e.push(n)}return ke(this,kt,[]),e},ar=function(){var s,c,u,d;ke(this,Pi,!0);for(const h of N(this,pn))N(this,Wt).delete(h),nt(h,at),this.schedule(h);for(const h of N(this,Wt))nt(h,Rt),this.schedule(h);this.apply();for(var e=ur=[],n=[],i=Gr=[];N(this,kt).length>0;){wo++>1e3&&(Pe(this,qe,lr).call(this),Sd());for(const h of Pe(this,qe,cl).call(this))try{Pe(this,qe,ul).call(this,h,e,n)}catch(f){throw Ns(h),Pe(this,qe,sl).call(this)||this.discard(),f}}if(me=null,i.length>0){var r=ga.ensure();for(const h of i)r.schedule(h)}if(ur=null,Gr=null,Pe(this,qe,sl).call(this)){Pe(this,qe,yi).call(this,n),Pe(this,qe,yi).call(this,e);for(const[h,f]of N(this,en))Rs(h,f);i.length>0&&Pe(s=me,qe,ar).call(s);return}const a=Pe(this,qe,Ms).call(this);if(a){Pe(this,qe,yi).call(this,n),Pe(this,qe,yi).call(this,e),Pe(c=a,qe,Ls).call(c,this);return}N(this,pn).clear(),N(this,Wt).clear();for(const h of N(this,Ii))h(this);N(this,Ii).clear(),cr=this,bo(n),bo(e),cr=null,(u=N(this,Mi))==null||u.resolve();var o=me;if(N(this,Ci)===0&&(N(this,kt).length===0||o!==null)&&Pe(this,qe,lr).call(this),N(this,kt).length>0)if(o!==null){for(const h of N(this,kt))N(o,kt).push(h);ke(this,kt,[])}else o=this;o!==null&&(sn.clear(),Pe(d=o,qe,ar).call(d))},ul=function(e,n,i){e.f^=ot;for(var r=e.first;r!==null;){var a=r.f,o=(a&(qt|kn))!==0,s=o&&(a&ot)!==0,c=s||(a&mt)!==0||N(this,en).has(r);if(!c&&r.fn!==null){o?r.f^=ot:a&Ni?n.push(r):Rr(r)&&(a&Dt&&N(this,Wt).add(r),zi(r));var u=r.first;if(u!==null){r=u;continue}}for(;r!==null;){var d=r.next;if(d!==null){r=d;break}r=r.parent}}},Ms=function(){for(var e=N(this,Ln);e!==null;){if(!e.is_fork){for(const[n,[,i]]of this.current)if(e.current.has(n)&&!i)return e}e=N(e,Ln)}return null},Ls=function(e){var i;for(const[r,a]of e.current)!this.previous.has(r)&&e.previous.has(r)&&this.previous.set(r,e.previous.get(r)),this.current.set(r,a);for(const[r,a]of e.async_deriveds){const o=this.async_deriveds.get(r);o&&a.promise.then(o.resolve).catch(o.reject)}e.async_deriveds.clear(),this.transfer_effects(N(e,pn),N(e,Wt));const n=r=>{var a=r.reactions;if(a!==null&&!(r.f&ft&&!(r.f&(at|Rt))))for(const c of a){var o=c.f;if(o&ft)n(c);else{var s=c;o&(ki|Dt)&&!this.async_deriveds.has(s)&&(N(this,Wt).delete(s),nt(s,at),this.schedule(s))}}};for(const r of this.current.keys())n(r);this.oncommit(()=>e.discard()),Pe(i=e,qe,lr).call(i),me=this,Pe(this,qe,ar).call(this)},yi=function(e){for(var n=0;n<e.length;n+=1)Ts(e[n],N(this,pn),N(this,Wt))},xd=function(){var h,f;for(let v=za;v!==null;v=N(v,ni)){var e=v.id<this.id,n=[];for(const[g,[m,p]]of this.current){if(v.current.has(g)){var i=v.current.get(g)[0];if(e&&m!==i)v.current.set(g,[m,p]);else continue}n.push(g)}if(e)for(const[g,m]of this.async_deriveds){const p=v.async_deriveds.get(g);p&&m.promise.then(p.resolve).catch(p.reject)}var r=[...v.current.keys()].filter(g=>!v.current.get(g)[1]);if(!(!N(v,Pi)||r.length===0)){var a=r.filter(g=>!this.current.has(g));if(a.length===0)e&&v.discard();else if(n.length>0){if(e)for(const g of N(this,Li))v.unskip_effect(g,m=>{var p;m.f&(Dt|ki)?v.schedule(m):Pe(p=v,qe,yi).call(p,[m])});v.activate();var o=new Set,s=new Map;for(var c of n)Ds(c,a,o,s);s=new Map;var u=[...v.current].filter(([g,m])=>{const p=this.current.get(g);return p?p[0]!==m[0]||p[1]!==m[1]:!0}).map(([g])=>g);if(u.length>0)for(const g of N(this,wr))!(g.f&(pt|mt|ta))&&ql(g,u,s)&&(g.f&(ki|Dt)?(nt(g,at),v.schedule(g)):N(v,pn).add(g));if(N(v,kt).length>0&&!N(v,ii)){v.apply();for(var d of Pe(h=v,qe,cl).call(h))Pe(f=v,qe,ul).call(f,d,[],[])}v.deactivate()}}}},lr=function(){if(this.linked){var e=N(this,Ln),n=N(this,ni);e===null?za=n:ke(e,ni,n),n===null?pi=e:ke(n,Ln,e),this.linked=!1}};let Vn=ga;function js(t){var e=xi;xi=!0;try{for(var n;;){if(hd(),me===null)return n;me.flush()}}finally{xi=e}}function Sd(){try{ld()}catch(t){rn(t,ol)}}let Vt=null;function bo(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var i=t[n++];if(!(i.f&(pt|mt))&&Rr(i)&&(Vt=new Set,zi(i),i.deps===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&Ys(i),(Vt==null?void 0:Vt.size)>0)){sn.clear();for(const r of Vt){if(r.f&(pt|mt))continue;const a=[r];let o=r.parent;for(;o!==null;)Vt.has(o)&&(Vt.delete(o),a.push(o)),o=o.parent;for(let s=a.length-1;s>=0;s--){const c=a[s];c.f&(pt|mt)||zi(c)}}Vt.clear()}}Vt=null}}function Ds(t,e,n,i){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const r of t.reactions){const a=r.f;a&ft?Ds(r,e,n,i):a&(ki|Dt)&&!(a&at)&&ql(r,e,i)&&(nt(r,at),zl(r))}}function ql(t,e,n){const i=n.get(t);if(i!==void 0)return i;if(t.deps!==null)for(const r of t.deps){if($r.call(e,r))return!0;if(r.f&ft&&ql(r,e,n))return n.set(r,!0),!0}return n.set(t,!1),!1}function zl(t){me.schedule(t)}function Rs(t,e){if(!(t.f&qt&&t.f&ot)){t.f&at?e.d.push(t):t.f&Rt&&e.m.push(t),nt(t,ot);for(var n=t.first;n!==null;)Rs(n,e),n=n.next}}function Ns(t){nt(t,ot);for(var e=t.first;e!==null;)Ns(e),e=e.next}let ia=new Set;const sn=new Map;let Os=!1;function dn(t,e){var n={f:0,v:t,reactions:null,equals:ws,rv:0,wv:0};return n}function Y(t,e){const n=dn(t);return Xs(n),n}function dl(t,e=!1,n=!0){var r;const i=dn(t);return e||(i.equals=ks),Ki&&n&&Ze!==null&&Ze.l!==null&&((r=Ze.l).s??(r.s=[])).push(i),i}function R(t,e,n=!1){Le!==null&&(!Kt||Le.f&ta)&&gi()&&Le.f&(ft|Dt|ki|ta)&&(cn===null||!cn.has(t))&&ud();let i=n?Oe(e):e;return wn(t,i,Gr)}var Xn=null,fl=0;function wn(t,e,n=null){if(!t.equals(e)){xn?sn.set(t,e):sn.has(t)||sn.set(t,t.v);var i=Vn.ensure();if(i.capture(t,e),t.f&ft){const r=t;t.f&at&&Ol(r),ut===null&&Rl(r)}t.wv=ec(),Xn=null,fl=0,qs(t,at,n),Xn=null,gi()&&Ie!==null&&Ie.f&ot&&!(Ie.f&(qt|kn))&&(Mt===null?Rd([t]):Mt.push(t)),!i.is_fork&&ia.size>0&&!Os&&Td()}return e}function Td(){Os=!1;for(const t of ia){t.f&ot&&nt(t,Rt);let e;try{e=Rr(t)}catch{e=!0}e&&zi(t)}ia.clear()}function Ed(t,e=1){var n=l(t),i=e===1?n++:n--;return R(t,n),i}function Hn(t){R(t,t.v+1)}function qs(t,e,n){var i=t.reactions;if(i!==null){var r=gi(),a=i.length;if(fl+=a,fl>1e5&&Xn===null&&(Xn=new Set),Xn!==null){if(Xn.has(t))return;Xn.add(t)}for(var o=0;o<a;o++){var s=i[o],c=s.f;if(!(!r&&s===Ie)){var u=(c&at)===0;if(u&&nt(s,e),c&ta)ia.add(s);else if(c&ft){var d=s;ut==null||ut.delete(d),qs(d,Rt,n)}else if(u){var h=s;c&Dt&&Vt!==null&&Vt.add(h),n!==null?n.push(h):zl(h)}}}}}function Oe(t){if(typeof t!="object"||t===null||on in t||hs in t)return t;const e=Cl(t);if(e!==Cu&&e!==Mu)return t;var n=new Map,i=ka(t),r=Y(0),a=bn,o=s=>{if(bn===a)return s();var c=Le,u=bn;zt(null),So(a);var d=s();return zt(c),So(u),d};return i&&n.set("length",Y(t.length)),new Proxy(t,{defineProperty(s,c,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&sd();var d=n.get(c);return d===void 0?o(()=>{var h=Y(u.value);return n.set(c,h),h}):R(d,u.value,!0),!0},deleteProperty(s,c){var u=n.get(c);if(u===void 0){if(c in s){const d=o(()=>Y(it));n.set(c,d),Hn(r)}}else R(u,it),Hn(r);return!0},get(s,c,u){var v;if(c===on)return t;var d=n.get(c),h=c in s;if(d===void 0&&(!h||(v=qn(s,c))!=null&&v.writable)&&(d=o(()=>{var g=Oe(h?s[c]:it),m=Y(g);return m}),n.set(c,d)),d!==void 0){var f=l(d);return f===it?void 0:f}return Reflect.get(s,c,u)},getOwnPropertyDescriptor(s,c){var f;(f=this.has)==null||f.call(this,s,c);var u=Reflect.getOwnPropertyDescriptor(s,c),d=n.get(c);if(d!==void 0){var h=l(d);if(h===it)return;if(u&&"value"in u)u.value=h;else return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(s,c){var f;if(c===on)return!0;var u=n.get(c),d=u!==void 0&&u.v!==it||Reflect.has(s,c);if(u!==void 0||Ie!==null&&(!d||(f=qn(s,c))!=null&&f.writable)){u===void 0&&(u=o(()=>{var v=d?Oe(s[c]):it,g=Y(v);return g}),n.set(c,u));var h=l(u);if(h===it)return!1}return d},set(s,c,u,d){var T;var h=n.get(c),f=c in s;if(i&&c==="length")for(var v=u;v<h.v;v+=1){var g=n.get(v+"");g!==void 0?R(g,it):v in s&&(g=o(()=>Y(it)),n.set(v+"",g))}if(h===void 0)(!f||(T=qn(s,c))!=null&&T.writable)&&(h=o(()=>Y(void 0)),R(h,Oe(u)),n.set(c,h));else{f=h.v!==it;var m=o(()=>Oe(u));R(h,m)}var p=Reflect.getOwnPropertyDescriptor(s,c);if(p!=null&&p.set&&p.set.call(d,u),!f){if(i&&typeof c=="string"){var w=n.get("length"),b=Number(c);Number.isInteger(b)&&b>=w.v&&R(w,b+1)}Hn(r)}return!0},ownKeys(s){l(r);var c=Reflect.ownKeys(s).filter(h=>{var f=n.get(h);return f===void 0||f.v!==it});for(var[u,d]of n)d.v!==it&&!(u in s)&&c.push(u);return c},setPrototypeOf(){cd()}})}function ko(t){try{if(t!==null&&typeof t=="object"&&on in t)return t[on]}catch{}return t}function zs(t,e){return Object.is(ko(t),ko(e))}var Ae,Hs,Fs,Bs;function Pd(){if(Ae===void 0){Ae=window,Hs=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;Fs=qn(e,"firstChild").get,Bs=qn(e,"nextSibling").get,_o(t)&&(t[al]=void 0,t[Wr]=null,t[ll]=void 0,t.__e=void 0),_o(n)&&(n[ir]=void 0)}}function Qt(t=""){return document.createTextNode(t)}function Zt(t){return Fs.call(t)}function Lr(t){return Bs.call(t)}function C(t,e){return Zt(t)}function J(t,e=!1){{var n=Zt(t);return n instanceof Comment&&n.data===""?Lr(n):n}}function oe(t,e=!1){return Zt(t)}function k(t,e=1,n=!1){let i=t;for(;e--;)i=Lr(i);return i}function Id(t){t.textContent=""}function Vs(){return!1}function Ta(t,e,n){return e==null||e===ps?n?document.createElement(t,{is:n}):document.createElement(t):n?document.createElementNS(e,t,{is:n}):document.createElementNS(e,t)}function Ad(t){var e=Ie;if(e===null)return Le.f|=zn,t;if(!(e.f&hi)&&!(e.f&Ni))throw t;rn(t,e)}function rn(t,e){if(!(e!==null&&e.f&pt)){for(;e!==null;){if(e.f&rl&&!(e.f&(pt|ea))){if(!(e.f&hi))throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw t}}function Ws(t){Ie===null&&(Le===null&&ad(),rd()),xn&&id()}function Cd(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function Xt(t,e){var n=Ie;n!==null&&n.f&mt&&(t|=mt);var i={ctx:Ze,deps:null,nodes:null,f:t|at|Jt,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};me==null||me.register_created_effect(i);var r=i;if(t&Ni)ur!==null?ur.push(i):Vn.ensure().schedule(i);else if(e!==null){try{zi(i)}catch(o){throw dt(i),o}r.deps===null&&r.teardown===null&&r.nodes===null&&r.first===r.last&&!(r.f&Zi)&&(r=r.first,t&Dt&&t&un&&r!==null&&(r.f|=un))}if(r!==null&&(r.parent=n,n!==null&&Cd(r,n),Le!==null&&Le.f&ft&&!(t&kn))){var a=Le;(a.effects??(a.effects=[])).push(r)}return i}function Hl(){return Le!==null&&!Kt}function jr(t){const e=Xt(Ir,null);return nt(e,ot),e.teardown=t,e}function tt(t){Ws();var e=Ie.f,n=!Le&&(e&qt)!==0&&Ze!==null&&!Ze.i;if(n){var i=Ze;(i.e??(i.e=[])).push(t)}else return Us(t)}function Us(t){return Xt(Ni|vs,t)}function Md(t){return Ws(),Xt(Ir|vs,t)}function Ld(t){Vn.ensure();const e=Xt(kn|Zi,t);return(n={})=>new Promise(i=>{n.outro?oi(e,()=>{dt(e),i(void 0)}):(dt(e),i(void 0))})}function Gn(t){return Xt(Ni,t)}function jd(t){return Xt(ki|Zi,t)}function Dr(t,e=0){return Xt(Ir|e,t)}function G(t,e=[],n=[],i=[]){Es(i,e,n,r=>{Xt(Ir,()=>{t(...r.map(l))})})}function An(t,e=0){var n=Xt(Dt|e,t);return n}function Gs(t,e=0){var n=Xt(Ml|e,t);return n}function gt(t){return Xt(qt|Zi,t)}function Zs(t){var e=t.teardown;if(e!==null){const n=xn,i=Le;xo(!0),zt(null);try{e.call(null)}catch(r){rn(r,t.parent)}finally{xo(n),zt(i)}}}function Fl(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const r=n.ac;r!==null&&In(()=>{r.abort(Ar)});var i=n.next;n.f&kn?n.parent=null:dt(n,e),n=i}}function Dd(t){for(var e=t.first;e!==null;){var n=e.next;e.f&qt||dt(e),e=n}}function dt(t,e=!0){var n=!1;(e||t.f&fs)&&t.nodes!==null&&t.nodes.end!==null&&(Ks(t.nodes.start,t.nodes.end),n=!0),t.f|=ea,Fl(t,e&&!n),mr(t,0);var i=t.nodes&&t.nodes.t;if(i!==null)for(const a of i)a.stop();Zs(t),t.f^=ea,t.f|=pt;var r=t.parent;r!==null&&r.first!==null&&Ys(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Ks(t,e){for(;t!==null;){var n=t===e?null:Lr(t);t.remove(),t=n}}function Ys(t){var e=t.parent,n=t.prev,i=t.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),e!==null&&(e.first===t&&(e.first=i),e.last===t&&(e.last=n))}function oi(t,e,n=!0){var i=[];t.f|=Ll,Js(t,i,!0);var r=()=>{n&&dt(t),e&&e()},a=i.length;if(a>0){var o=()=>--a||r();for(var s of i)s.out(o)}else r()}function Js(t,e,n){if(!(t.f&mt)){t.f^=mt;var i=t.nodes&&t.nodes.t;if(i!==null)for(const s of i)(s.is_global||n)&&e.push(s);for(var r=t.first;r!==null;){var a=r.next;if(!(r.f&kn)){var o=(r.f&un)!==0||(r.f&qt)!==0&&(t.f&Dt)!==0;Js(r,e,o?n:!1)}r=a}}}function ra(t){t.f&=~Ll,Qs(t,!0)}function Qs(t,e){if(!(t.f&Ll)&&t.f&mt){t.f^=mt,t.f&ot||(nt(t,at),Vn.ensure().schedule(t));for(var n=t.first;n!==null;){var i=n.next,r=(n.f&un)!==0||(n.f&qt)!==0;Qs(n,r?e:!1),n=i}var a=t.nodes&&t.nodes.t;if(a!==null)for(const o of a)(o.is_global||e)&&o.in()}}function Bl(t,e){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end;n!==null;){var r=n===i?null:Lr(n);e.append(n),n=r}}let Zr=!1,xn=!1;function xo(t){xn=t}let Le=null,Kt=!1;function zt(t){Le=t}let Ie=null;function fn(t){Ie=t}let cn=null;function Xs(t){Le!==null&&(Le.f&na||Le.f&ft)&&(cn??(cn=new Set)).add(t)}let wt=null,Et=0,Mt=null;function Rd(t){Mt=t}let $s=1,ei=0,bn=ei;function So(t){bn=t}function ec(){return++$s}function Rr(t){var e=t.f;if(e&at)return!0;if(e&Rt){for(var n=t.deps,i=n.length,r=0;r<i;r++){var a=n[r];if(Rr(a)&&As(a),a.wv>t.wv)return!0}e&Jt&&ut===null&&nt(t,ot)}return!1}function tc(t,e,n=!0){var i=t.reactions;if(i!==null&&!(cn!==null&&cn.has(t)))for(var r=0;r<i.length;r++){var a=i[r];a.f&ft?tc(a,e,!1):e===a&&(n?nt(a,at):a.f&ot&&nt(a,Rt),zl(a))}}function nc(t){var e=wt,n=Et,i=Mt,r=Le,a=cn,o=Ze,s=Kt,c=bn,u=t.f;wt=null,Et=0,Mt=null,Le=u&(qt|kn)?null:t,cn=null,Oi(t.ctx),Kt=!1,bn=++ei,t.ac!==null&&(In(()=>{t.ac.abort(Ar)}),t.ac=null);try{t.f|=na;var d=t.fn,h=d();t.f|=hi;var f=To(t);if(gi()&&Mt!==null&&!Kt&&f!==null&&!(t.f&(ft|Rt|at)))for(var v=0;v<Mt.length;v++)tc(Mt[v],t);if(r!==null&&r!==t){if(ei++,r.deps!==null)for(let g=0;g<n;g+=1)r.deps[g].rv=ei;if(e!==null)for(const g of e)g.rv=ei;Mt!==null&&(i===null?i=Mt:i.push(...Mt))}return t.f&zn&&(t.f^=zn),h}catch(g){return To(t),Ad(g)}finally{t.f^=na,wt=e,Et=n,Mt=i,Le=r,cn=a,Oi(o),Kt=s,bn=c}}function To(t){var r;var e=t.deps,n=me==null?void 0:me.is_fork;if(wt!==null){var i;if(n||mr(t,Et),e!==null&&Et>0)for(e.length=Et+wt.length,i=0;i<wt.length;i++)e[Et+i]=wt[i];else t.deps=e=wt;if(Hl()&&t.f&Jt)for(i=Et;i<e.length;i++)((r=e[i]).reactions??(r.reactions=[])).push(t)}else!n&&e!==null&&Et<e.length&&(mr(t,Et),e.length=Et);return e}function Nd(t,e){let n=e.reactions;if(n!==null){var i=Au.call(n,t);if(i!==-1){var r=n.length-1;r===0?n=e.reactions=null:(n[i]=n[r],n.pop())}}if(n===null&&e.f&ft&&(wt===null||!$r.call(wt,e))){var a=e;a.f&Jt&&(a.f^=Jt),a.v!==it&&Rl(a),a.ac!==null&&In(()=>{a.ac.abort(Ar),a.ac=null,nt(a,at)}),bd(a),mr(a,0)}}function mr(t,e){var n=t.deps;if(n!==null)for(var i=e;i<n.length;i++)Nd(t,n[i])}function zi(t){var e=t.f;if(!(e&pt)){nt(t,ot);var n=Ie,i=Zr;Ie=t,Zr=(e&(qt|kn))===0;try{e&(Dt|Ml)?Dd(t):Fl(t),Zs(t);var r=nc(t);t.teardown=typeof r=="function"?r:null,t.wv=$s;var a}finally{Zr=i,Ie=n}}}async function pr(){await Promise.resolve(),js()}function l(t){var e=t.f,n=(e&ft)!==0;if(Le!==null&&!Kt){var i=Ie!==null&&(Ie.f&pt)!==0;if(!i&&(cn===null||!cn.has(t))){var r=Le.deps;if(Le.f&na)t.rv<ei&&(t.rv=ei,wt===null&&r!==null&&r[Et]===t?Et++:wt===null?wt=[t]:wt.push(t));else{Le.deps??(Le.deps=[]),$r.call(Le.deps,t)||Le.deps.push(t);var a=t.reactions;a===null?t.reactions=[Le]:$r.call(a,Le)||a.push(Le)}}}if(xn&&sn.has(t))return sn.get(t);if(n){var o=t;if(xn){var s=o.v;return(!(o.f&ot)&&o.reactions!==null||rc(o))&&(s=Ol(o)),sn.set(o,s),s}var c=(o.f&Jt)===0&&!Kt&&Le!==null&&(Zr||(Le.f&Jt)!==0),u=(o.f&hi)===0;Rr(o)&&(c&&(o.f|=Jt),As(o)),c&&!u&&(Cs(o),ic(o))}if(ut!=null&&ut.has(t))return ut.get(t);if(t.f&zn)throw t.v;return t.v}function ic(t){if(t.f|=Jt,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),e.f&ft&&!(e.f&Jt)&&(Cs(e),ic(e))}function rc(t){if(t.v===it)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(sn.has(e)||e.f&ft&&rc(e))return!0;return!1}function At(t){var e=Kt;try{return Kt=!0,t()}finally{Kt=e}}function ac(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(on in t)vl(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];typeof n=="object"&&n&&on in n&&vl(n)}}}function vl(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let i in t)try{vl(t[i],e)}catch{}const n=Cl(t);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=us(n);for(let r in i){const a=i[r].get;if(a)try{a.call(t)}catch{}}}}}function Od(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const qd=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function zd(t){return qd.includes(t)}const Hd={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Fd(t){return t=t.toLowerCase(),Hd[t]??t}const Bd=["touchstart","touchmove"];function Vd(t){return Bd.includes(t)}const ti=Symbol("events"),lc=new Set,hl=new Set;function Vl(t,e,n,i={}){function r(a){if(i.capture||gl.call(e,a),!a.cancelBubble)return In(()=>n==null?void 0:n.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(r.__removed=!1,It(()=>{r.__removed||e.addEventListener(t,r,i)})):e.addEventListener(t,r,i),r}function Wd(t,e,n,i={}){var r=Vl(e,t,n,i);return()=>{r.__removed=!0,t.removeEventListener(e,r,i)}}function pe(t,e,n,i,r){var a={capture:i,passive:r},o=Vl(t,e,n,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&jr(()=>{o.__removed=!0,e.removeEventListener(t,o,a)})}function ne(t,e,n){(e[ti]??(e[ti]={}))[t]=n}function Se(t){for(var e=0;e<t.length;e++)lc.add(t[e]);for(var n of hl)n(t)}let Fa=null,Ba=!1;function gl(t){var m,p;var e=this,n=e.ownerDocument,i=t.type,r=((m=t.composedPath)==null?void 0:m.call(t))||[],a=r[0]||t.target;Fa=t,Ba||(Ba=!0,setTimeout(()=>{Ba=!1,Fa=null}));var o=0,s=Fa===t&&t[ti];if(s){var c=r.indexOf(s);if(c!==-1&&(e===document||e===window)){t[ti]=e;return}var u=r.indexOf(e);if(u===-1)return;c<=u&&(o=c)}if(a=r[o]||t.target,a!==e){cs(t,"currentTarget",{configurable:!0,get(){return a||n}});var d=Le,h=Ie;zt(null),fn(null);try{for(var f,v=[];a!==null&&a!==e;){try{var g=(p=a[ti])==null?void 0:p[i];g!=null&&(!a.disabled||t.target===a)&&g.call(a,t)}catch(w){f?v.push(w):f=w}if(t.cancelBubble)break;o++,a=o<r.length?r[o]:null}if(f){for(let w of v)queueMicrotask(()=>{throw w});throw f}}finally{t[ti]=e,delete t.currentTarget,zt(d),fn(h)}}}var os;const Va=((os=globalThis==null?void 0:globalThis.window)==null?void 0:os.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Ud(t){return(Va==null?void 0:Va.createHTML(t))??t}function oc(t){var e=Ta("template");return e.innerHTML=Ud(t.replaceAll("<!>","<!---->")),e.content}const Gd=Cr?"script":"SCRIPT";function Wn(t,e){var n=Ie;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function S(t,e){var n=(e&Ku)!==0,i=(e&Yu)!==0,r,a=!t.startsWith("<!>");return()=>{r===void 0&&(r=oc(a?t:"<!>"+t),n||(r=Zt(r)));var o=i||Hs?document.importNode(r,!0):r.cloneNode(!0);if(n){var s=Zt(o),c=o.lastChild;Wn(s,c)}else Wn(o,o);return o}}function Zd(t,e,n="svg"){var i=!t.startsWith("<!>"),r=`<${n}>${i?t:"<!>"+t}</${n}>`,a;return()=>{if(!a){var o=oc(r),s=Zt(o);a=Zt(s)}var c=a.cloneNode(!0);return Wn(c,c),c}}function Ge(t,e){return Zd(t,e,"svg")}function Kd(t){return()=>Yd(t())}function Yd(t){const e=t.nodeType===Ru,n=t.nodeName===Gd?[t]:t.querySelectorAll("script"),i=Ie;for(const a of n){const o=Ta("script");for(var r of a.attributes)o.setAttribute(r.name,r.value);o.textContent=a.textContent,(e?t.firstChild===a:t===a)&&(i.nodes.start=o),(e?t.lastChild===a:t===a)&&(i.nodes.end=o),a.replaceWith(o)}return t}function Xe(t=""){{var e=Qt(t+"");return Wn(e,e),e}}function we(){var t=document.createDocumentFragment(),e=document.createComment(""),n=Qt();return t.append(e,n),Wn(e,n),t}function y(t,e){t!==null&&t.before(e)}function sc(t){let e=0,n=dn(0),i;return()=>{Hl()&&(l(n),Dr(()=>(e===0&&(i=At(()=>t(()=>Hn(n)))),e+=1,()=>{It(()=>{e-=1,e===0&&(i==null||i(),i=void 0,Hn(n))})})))}}var Jd=un|Zi;function Wl(t,e,n,i){new Qd(t,e,n,i)}var Lt,Al,jt,ri,vt,xt,ht,St,tn,ai,jn,ji,br,kr,_n,ma,Ye,Xd,$d,ml,ef,pl,or,Kr,_l,yl;class Qd{constructor(e,n,i,r){be(this,Ye);_t(this,"parent");_t(this,"is_pending",!1);_t(this,"transform_error");be(this,Lt);be(this,Al,null);be(this,jt);be(this,ri);be(this,vt);be(this,xt,null);be(this,ht,null);be(this,St,null);be(this,tn,null);be(this,ai,0);be(this,jn,0);be(this,ji,!1);be(this,br,new Set);be(this,kr,new Set);be(this,_n,null);be(this,ma,sc(()=>(ke(this,_n,dn(N(this,ai))),()=>{ke(this,_n,null)})));var a;ke(this,Lt,e),ke(this,jt,n),ke(this,ri,o=>{var s=Ie;s.b=this,s.f|=rl,i(o)}),this.parent=Ie.b,this.transform_error=r??((a=this.parent)==null?void 0:a.transform_error)??(o=>o),ke(this,vt,An(()=>{Pe(this,Ye,pl).call(this)},Jd))}defer_effect(e){Ts(e,N(this,br),N(this,kr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!N(this,jt).pending}update_pending_count(e,n){Pe(this,Ye,_l).call(this,e,n),ke(this,ai,N(this,ai)+e),!(!N(this,_n)||N(this,ji))&&(ke(this,ji,!0),It(()=>{ke(this,ji,!1),N(this,_n)&&wn(N(this,_n),N(this,ai))}))}get_effect_pending(){return N(this,ma).call(this),l(N(this,_n))}error(e){if(!N(this,jt).onerror&&!N(this,jt).failed)throw e;me!=null&&me.is_fork?(N(this,xt)&&me.skip_effect(N(this,xt)),N(this,ht)&&me.skip_effect(N(this,ht)),N(this,St)&&me.skip_effect(N(this,St)),me.oncommit(()=>{Pe(this,Ye,yl).call(this,e)})):Pe(this,Ye,yl).call(this,e)}}Lt=new WeakMap,Al=new WeakMap,jt=new WeakMap,ri=new WeakMap,vt=new WeakMap,xt=new WeakMap,ht=new WeakMap,St=new WeakMap,tn=new WeakMap,ai=new WeakMap,jn=new WeakMap,ji=new WeakMap,br=new WeakMap,kr=new WeakMap,_n=new WeakMap,ma=new WeakMap,Ye=new WeakSet,Xd=function(){try{ke(this,xt,gt(()=>N(this,ri).call(this,N(this,Lt))))}catch(e){this.error(e)}},$d=function(e){const n=N(this,jt).failed,{reset:i,invoke_onerror:r}=Pe(this,Ye,ml).call(this,e);It(r),n&&ke(this,St,gt(()=>{n(N(this,Lt),()=>e,()=>i)}))},ml=function(e){var n=!1,i=!1;const r=()=>{if(n){ed();return}n=!0,i&&dd(),N(this,St)!==null&&oi(N(this,St),()=>{ke(this,St,null)}),Pe(this,Ye,Kr).call(this,()=>{Pe(this,Ye,pl).call(this)})};return{reset:r,invoke_onerror:()=>{var o,s;try{i=!0,(s=(o=N(this,jt)).onerror)==null||s.call(o,e,r),i=!1}catch(c){rn(c,N(this,vt)&&N(this,vt).parent)}}}},ef=function(){const e=N(this,jt).pending;e&&(this.is_pending=!0,ke(this,ht,gt(()=>e(N(this,Lt)))),It(()=>{var n=ke(this,tn,document.createDocumentFragment()),i=Qt(),r=!1;if(n.append(i),ke(this,xt,Pe(this,Ye,Kr).call(this,()=>{try{return gt(()=>N(this,ri).call(this,i))}catch(a){try{this.error(a),r=!0}catch(o){rn(o,N(this,vt).parent)}return null}})),N(this,xt)===null){ke(this,tn,null),r&&Pe(this,Ye,or).call(this,me);return}N(this,jn)===0&&(N(this,Lt).before(n),ke(this,tn,null),oi(N(this,ht),()=>{ke(this,ht,null)}),Pe(this,Ye,or).call(this,me))}))},pl=function(){try{if(this.is_pending=this.has_pending_snippet(),ke(this,jn,0),ke(this,ai,0),ke(this,xt,gt(()=>{N(this,ri).call(this,N(this,Lt))})),N(this,jn)>0){var e=ke(this,tn,document.createDocumentFragment());Bl(N(this,xt),e);const n=N(this,jt).pending;ke(this,ht,gt(()=>n(N(this,Lt))))}else Pe(this,Ye,or).call(this,me)}catch(n){this.error(n)}},or=function(e){this.is_pending=!1,e.transfer_effects(N(this,br),N(this,kr))},Kr=function(e){var n=Ie,i=Le,r=Ze;fn(N(this,vt)),zt(N(this,vt)),Oi(N(this,vt).ctx);try{return Vn.ensure(),e()}finally{fn(n),zt(i),Oi(r)}},_l=function(e,n){var i;if(!this.has_pending_snippet()){this.parent&&Pe(i=this.parent,Ye,_l).call(i,e,n);return}ke(this,jn,N(this,jn)+e),N(this,jn)===0&&(Pe(this,Ye,or).call(this,n),N(this,ht)&&oi(N(this,ht),()=>{ke(this,ht,null)}),N(this,tn)&&(N(this,Lt).before(N(this,tn)),ke(this,tn,null)))},yl=function(e){N(this,xt)&&(dt(N(this,xt)),ke(this,xt,null)),N(this,ht)&&(dt(N(this,ht)),ke(this,ht,null)),N(this,St)&&(dt(N(this,St)),ke(this,St,null));let n=N(this,jt).failed;const i=r=>{const{reset:a,invoke_onerror:o}=Pe(this,Ye,ml).call(this,r);o(),n&&ke(this,St,Pe(this,Ye,Kr).call(this,()=>{try{return gt(()=>{var s=Ie;s.b=this,s.f|=rl,n(N(this,Lt),()=>r,()=>a)})}catch(s){return rn(s,N(this,vt).parent),null}}))};It(()=>{var r;try{r=this.transform_error(e)}catch(a){rn(a,N(this,vt)&&N(this,vt).parent);return}r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(i,a=>rn(a,N(this,vt)&&N(this,vt).parent)):i(r)})};let aa=!0;function Hr(t){aa=t}function Q(t,e){var n=e==null?"":typeof e=="object"?`${e}`:e;n!==(t[ir]??(t[ir]=t.nodeValue))&&(t[ir]=n,t.nodeValue=`${n}`)}function Nt(t,e){return tf(t,e)}const Fr=new Map;function tf(t,{target:e,anchor:n,props:i={},events:r,context:a,intro:o=!0,transformError:s}){Pd();var c=void 0,u=Ld(()=>{var d=n??e.appendChild(Qt());Wl(d,{pending:()=>{}},v=>{re({});var g=Ze;a&&(g.c=a),r&&(i.$$events=r),aa=o,c=t(v,i)||Dl(),aa=!0,ae()},s);var h=new Set,f=v=>{for(var g=0;g<v.length;g++){var m=v[g];if(!h.has(m)){h.add(m);var p=Vd(m);for(const T of[e,document]){var w=Fr.get(T);w===void 0&&(w=new Map,Fr.set(T,w));var b=w.get(m);b===void 0?(T.addEventListener(m,gl,{passive:p}),w.set(m,1)):w.set(m,b+1)}}}};return f(xa(lc)),hl.add(f),()=>{var p;for(var v of h)for(const w of[e,document]){var g=Fr.get(w),m=g.get(v);--m==0?(w.removeEventListener(v,gl),g.delete(v),g.size===0&&Fr.delete(w)):g.set(v,m)}hl.delete(f),d!==n&&((p=d.parentNode)==null||p.removeChild(d))}});return wl.set(c,u),c}let wl=new WeakMap;function Zn(t,e){const n=wl.get(t);return n?(wl.delete(t),n(e)):Promise.resolve()}var Ut,nn,Tt,li,xr,Sr,pa;class Yi{constructor(e,n=!0){_t(this,"anchor");be(this,Ut,new Map);be(this,nn,new Map);be(this,Tt,new Map);be(this,li,new Set);be(this,xr,!0);be(this,Sr,e=>{if(N(this,Ut).has(e)){var n=N(this,Ut).get(e),i=N(this,nn).get(n);if(i)ra(i),N(this,li).delete(n);else{var r=N(this,Tt).get(n);r&&(ra(r.effect),N(this,nn).set(n,r.effect),N(this,Tt).delete(n),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),i=r.effect)}for(const[a,o]of N(this,Ut)){if(N(this,Ut).delete(a),a===e)break;const s=N(this,Tt).get(o);s&&(dt(s.effect),N(this,Tt).delete(o))}for(const[a,o]of N(this,nn)){if(a===n||N(this,li).has(a))continue;const s=()=>{if(Array.from(N(this,Ut).values()).includes(a)){var u=document.createDocumentFragment();Bl(o,u),u.append(Qt()),N(this,Tt).set(a,{effect:o,fragment:u})}else dt(o);N(this,li).delete(a),N(this,nn).delete(a)};N(this,xr)||!i?(N(this,li).add(a),oi(o,s,!1)):s()}}});be(this,pa,e=>{N(this,Ut).delete(e);const n=Array.from(N(this,Ut).values());for(const[i,r]of N(this,Tt))n.includes(i)||(dt(r.effect),N(this,Tt).delete(i))});this.anchor=e,ke(this,xr,n)}ensure(e,n){var i=me,r=Vs();if(n&&!N(this,nn).has(e)&&!N(this,Tt).has(e))if(r){var a=document.createDocumentFragment(),o=Qt();a.append(o),N(this,Tt).set(e,{effect:gt(()=>n(o)),fragment:a})}else N(this,nn).set(e,gt(()=>n(this.anchor)));if(N(this,Ut).set(i,e),r){for(const[s,c]of N(this,nn))s===e?i.unskip_effect(c):i.skip_effect(c);for(const[s,c]of N(this,Tt))s===e?i.unskip_effect(c.effect):i.skip_effect(c.effect);i.oncommit(N(this,Sr)),i.ondiscard(N(this,pa))}else N(this,Sr).call(this,i)}}Ut=new WeakMap,nn=new WeakMap,Tt=new WeakMap,li=new WeakMap,xr=new WeakMap,Sr=new WeakMap,pa=new WeakMap;const nf=0,Eo=1,rf=2;function Sn(t,e,n,i,r){var a=gi(),o=it,s=a?dn(o):dl(o,!1,!1),c=a?dn(o):dl(o,!1,!1),u=new Yi(t);An(()=>{var d=me,h=e(),f=!1;if(Lu(h)){var v=Ps(),g=!1;const m=p=>{if(!f){g=!0,v(!1),me===d&&d.deactivate(),Vn.ensure();try{p()}finally{gr(!1),xi||js()}}};h.then(p=>{m(()=>{wn(s,p),u.ensure(Eo,i&&(w=>i(w,s)))})},p=>{m(()=>{if(wn(c,p),u.ensure(rf,r&&(w=>r(w,c))),!r)throw c.v})}),It(()=>{g||m(()=>{u.ensure(nf,n)})})}else wn(s,h),u.ensure(Eo,i&&(m=>i(m,s)));return()=>{f=!0}})}function U(t,e,n=!1){var i=new Yi(t),r=n?un:0;function a(o,s){i.ensure(o,s)}An(()=>{var o=!1;e((s,c=0)=>{o=!0,a(c,s)}),o||a(-1,null)},r)}const af=Symbol("NaN");function Ji(t,e,n){var i=new Yi(t),r=!gi();An(()=>{var a=e();a!==a&&(a=af),r&&a!==null&&typeof a=="object"&&(a={}),i.ensure(a,n)})}function Ue(t,e){return e}function lf(t,e,n){for(var i=[],r=e.length,a,o=e.length,s=0;s<r;s++){let h=e[s];oi(h,()=>{if(a){if(a.pending.delete(h),a.done.add(h),a.pending.size===0){var f=t.outrogroups;bl(t,xa(a.done)),f.delete(a),f.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var c=i.length===0&&n!==null&&t.pending.size===0;if(c){var u=n,d=u.parentNode;Id(d),d.append(u),t.items.clear()}bl(t,e,!c)}else a={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(a)}function bl(t,e,n=!0){var i;if(t.pending.size>0){i=new Set;for(const o of t.pending.values())for(const s of o)i.add(t.items.get(s).e)}for(var r=0;r<e.length;r++){var a=e[r];if(i!=null&&i.has(a)){a.f|=an;const o=document.createDocumentFragment();Bl(a,o)}else dt(e[r],n)}}var Po;function He(t,e,n,i,r,a=null){var o=t,s=new Map,c=(e&ms)!==0;if(c){var u=t;o=u.appendChild(Qt())}var d=null,h=Sa(()=>{var T=n();return ka(T)?T:T==null?[]:xa(T)}),f,v=new Map,g=!0;function m(T){b.effect.f&pt||(b.pending.delete(T),b.fallback=d,of(b,f,o,e,i),d!==null&&(f.length===0?d.f&an?(d.f^=an,sr(d,null,o)):ra(d):oi(d,()=>{d=null})))}function p(T){b.pending.delete(T)}var w=An(()=>{f=l(h);for(var T=f.length,x=new Set,P=me,E=Vs(),M=0;M<T;M+=1){var O=f[M],F=i(O,M),j=g?null:s.get(F);j?(j.v&&wn(j.v,O),j.i&&wn(j.i,M),E&&P.unskip_effect(j.e)):(j=sf(s,g?o:Po??(Po=Qt()),O,F,M,r,e,n),g||(j.e.f|=an),s.set(F,j)),x.add(F)}if(T===0&&a&&!d&&(g?d=gt(()=>a(o)):(d=gt(()=>a(Po??(Po=Qt()))),d.f|=an)),T>x.size&&nd(),!g)if(v.set(P,x),E){for(const[L,D]of s)x.has(L)||P.skip_effect(D.e);P.oncommit(m),P.ondiscard(p)}else m(P);l(h)}),b={effect:w,items:s,pending:v,outrogroups:null,fallback:d};g=!1}function nr(t){for(;t!==null&&!(t.f&qt);)t=t.next;return t}function of(t,e,n,i,r){var j,L,D,H,Z,B,z,A,q;var a=(i&qu)!==0,o=e.length,s=t.items,c=nr(t.effect.first),u,d=null,h,f=[],v=[],g,m,p,w;if(a)for(w=0;w<o;w+=1)g=e[w],m=r(g,w),p=s.get(m).e,p.f&an||((L=(j=p.nodes)==null?void 0:j.a)==null||L.measure(),(h??(h=new Set)).add(p));for(w=0;w<o;w+=1){if(g=e[w],m=r(g,w),p=s.get(m).e,t.outrogroups!==null)for(const W of t.outrogroups)W.pending.delete(p),W.done.delete(p);if(p.f&mt&&(ra(p),a&&((H=(D=p.nodes)==null?void 0:D.a)==null||H.unfix(),(h??(h=new Set)).delete(p))),p.f&an)if(p.f^=an,p===c)sr(p,null,n);else{var b=d?d.next:c;p===t.effect.last&&(t.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),Mn(t,d,p),Mn(t,p,b),sr(p,b,n),d=p,f=[],v=[],c=nr(d.next);continue}if(p!==c){if(u!==void 0&&u.has(p)){if(f.length<v.length){var T=v[0],x;d=T.prev;var P=f[0],E=f[f.length-1];for(x=0;x<f.length;x+=1)sr(f[x],T,n);for(x=0;x<v.length;x+=1)u.delete(v[x]);Mn(t,P.prev,E.next),Mn(t,d,P),Mn(t,E,T),c=T,d=E,w-=1,f=[],v=[]}else u.delete(p),sr(p,c,n),Mn(t,p.prev,p.next),Mn(t,p,d===null?t.effect.first:d.next),Mn(t,d,p),d=p;continue}for(f=[],v=[];c!==null&&c!==p;)(u??(u=new Set)).add(c),v.push(c),c=nr(c.next);if(c===null)continue}p.f&an||f.push(p),d=p,c=nr(p.next)}if(t.outrogroups!==null){for(const W of t.outrogroups)W.pending.size===0&&(bl(t,xa(W.done)),(Z=t.outrogroups)==null||Z.delete(W));t.outrogroups.size===0&&(t.outrogroups=null)}if(c!==null||u!==void 0){var M=[];if(u!==void 0)for(p of u)p.f&mt||M.push(p);for(;c!==null;)!(c.f&mt)&&c!==t.fallback&&M.push(c),c=nr(c.next);var O=M.length;if(O>0){var F=i&ms&&o===0?n:null;if(a){for(w=0;w<O;w+=1)(z=(B=M[w].nodes)==null?void 0:B.a)==null||z.measure();for(w=0;w<O;w+=1)(q=(A=M[w].nodes)==null?void 0:A.a)==null||q.fix()}lf(t,M,F)}}a&&It(()=>{var W,K;if(h!==void 0)for(p of h)(K=(W=p.nodes)==null?void 0:W.a)==null||K.apply()})}function sf(t,e,n,i,r,a,o,s){var c=o&Nu?o&zu?dn(n):dl(n,!1,!1):null,u=o&Ou?dn(r):null;return{v:c,i:u,e:gt(()=>(a(e,c??n,u??r,s),()=>{t.delete(i)}))}}function sr(t,e,n){if(t.nodes)for(var i=t.nodes.start,r=t.nodes.end,a=e&&!(e.f&an)?e.nodes.start:n;i!==null;){var o=Lr(i);if(a.before(i),i===r)return;i=o}}function Mn(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function cc(t,e,n=!1,i=!1,r=!1,a=!1){var o=t,s="";if(n)var c=t;G(()=>{var u=Ie;if(s!==(s=e()??"")){if(n&&!ys){u.nodes=null,c.innerHTML=s,s!==""&&Wn(Zt(c),c.lastChild);return}if(u.nodes!==null&&(Ks(u.nodes.start,u.nodes.end),u.nodes=null),s!==""){var d=i?_s:r?Ju:void 0,h=Ta(i?"svg":r?"math":"template",d);h.innerHTML=s;var f=i||r?h:h.content;if(Wn(Zt(f),f.lastChild),i||r)for(;Zt(f);)o.before(Zt(f));else o.before(f)}}})}function $e(t,e,...n){var i=new Yi(t);An(()=>{const r=e()??null;i.ensure(r,r&&(a=>r(a,...n)))},un)}function la(t,e,n){var i=new Yi(t);An(()=>{var r=e()??null;i.ensure(r,r&&(a=>n(a,r)))},un)}const cf=()=>performance.now(),yn={tick:t=>requestAnimationFrame(t),now:()=>cf(),tasks:new Set};function uc(){const t=yn.now();yn.tasks.forEach(e=>{e.c(t)||(yn.tasks.delete(e),e.f())}),yn.tasks.size!==0&&yn.tick(uc)}function uf(t){let e;return yn.tasks.size===0&&yn.tick(uc),{promise:new Promise(n=>{yn.tasks.add(e={c:t,f:n})}),abort(){yn.tasks.delete(e)}}}function Br(t,e){In(()=>{t.dispatchEvent(new CustomEvent(e))})}function df(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function Io(t){const e={},n=t.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=df(r.trim());e[o]=a.trim()}return e}const ff=t=>t;let dc=null;function Ao(t){dc=t}function vf(t,e,n){var i=dc??Ie,r=i.nodes,a,o,s,c=null;r.a??(r.a={element:t,measure(){a=this.element.getBoundingClientRect()},apply(){if(s==null||s.abort(),o=this.element.getBoundingClientRect(),a.left!==o.left||a.right!==o.right||a.top!==o.top||a.bottom!==o.bottom){const u=e()(this.element,{from:a,to:o},n==null?void 0:n());s=oa(this.element,u,void 0,1,()=>{},()=>{s==null||s.abort(),s=void 0})}},fix(){if(!t.getAnimations().length){var{position:u,width:d,height:h}=getComputedStyle(t);if(u!=="absolute"&&u!=="fixed"){var f=t.style;c={position:f.position,width:f.width,height:f.height,transform:f.transform},f.position="absolute",f.width=d,f.height=h;var v=t.getBoundingClientRect();if(a.left!==v.left||a.top!==v.top){var g=`translate(${a.left-v.left}px, ${a.top-v.top}px)`;f.transform=f.transform?`${f.transform} ${g}`:g}}}},unfix(){if(c){var u=t.style;u.position=c.position,u.width=c.width,u.height=c.height,u.transform=c.transform}}}),r.a.element=t}function ze(t,e,n,i){var T;var r=(t&Uu)!==0,a=(t&Gu)!==0,o=r&&a,s=(t&Zu)!==0,c=o?"both":r?"in":"out",u,d=e.inert,h=e.style.overflow,f,v;function g(){return In(()=>u??(u=n()(e,(i==null?void 0:i())??{},{direction:c})))}var m={is_global:s,in(){var x;if(e.inert=d,!r){v==null||v.abort(),(x=v==null?void 0:v.reset)==null||x.call(v);return}a||f==null||f.abort(),f=oa(e,g(),v,1,()=>{Br(e,"introstart")},()=>{Br(e,"introend"),f==null||f.abort(),f=u=void 0,e.style.overflow=h})},out(x){if(!a){x==null||x(),u=void 0;return}e.inert=!0,v=oa(e,g(),f,0,()=>{Br(e,"outrostart")},()=>{Br(e,"outroend"),x==null||x()})},stop:()=>{f==null||f.abort(),v==null||v.abort()}},p=Ie;if(((T=p.nodes).t??(T.t=[])).push(m),r&&aa){var w=s;if(!w){for(var b=p.parent;b&&b.f&un;)for(;(b=b.parent)&&!(b.f&Dt););w=!b||(b.f&hi)!==0}w&&Gn(()=>{At(()=>m.in())})}}function oa(t,e,n,i,r,a){var o=i===1,s=!1;if(_i(e)){var c;return It(()=>{if(!s){var m=e({direction:o?"in":"out"});c=oa(t,m,n,i,r,a)}}),{abort:()=>{s=!0,c==null||c.abort()},deactivate:()=>c.deactivate(),reset:()=>c.reset(),t:()=>c.t()}}if(n==null||n.deactivate(),!(e!=null&&e.duration)&&!(e!=null&&e.delay))return r(),a(),{abort:Pt,deactivate:Pt,reset:Pt,t:()=>i};const{delay:u=0,css:d,tick:h,easing:f=ff}=e;var v,g=()=>1-i;return It(()=>{if(!s){var m=[];if(o&&n===void 0&&(h&&h(0,1),d)){var p=Io(d(0,1));m.push(p,p)}v=t.animate(m,{duration:u,fill:"forwards"}),v.onfinish=()=>{v.cancel(),r();var w=(n==null?void 0:n.t())??1-i;n==null||n.abort();var b=i-w,T=e.duration*Math.abs(b),x=[];if(T>0){var P=!1;if(d)for(var E=Math.ceil(T/16.666666666666668),M=0;M<=E;M+=1){var O=w+b*f(M/E),F=Io(d(O,1-O));x.push(F),P||(P=F.overflow==="hidden")}P&&(t.style.overflow="hidden"),g=()=>{var j=v.currentTime;return w+b*f(j/T)},h&&uf(()=>{if(v.playState!=="running")return!1;var j=g();return h(j,1-j),!0})}v=t.animate(x,{duration:T,fill:"forwards"}),v.onfinish=()=>{g=()=>i,h==null||h(i,1-i),a()}}}}),{abort:()=>{s=!0,v&&(v.cancel(),v.effect=null,v.onfinish=Pt)},deactivate:()=>{a=Pt},reset:()=>{i===0&&(h==null||h(1,0))},t:()=>g()}}function fc(t,e,n,i,r,a){var o=null,s=t,c=Ie,u=new Yi(s,!1);An(()=>{const d=e()||null;var h=d==="svg"?_s:void 0;if(d===null){u.ensure(null,null),Hr(!0);return}return u.ensure(d,f=>{if(d){if(o=Ta(d,h),Wn(o,o),i){var v=null,g=o.appendChild(Qt());Ao(c),i(o,g),v==null||v.remove(),Ao(null)}Ie.nodes.end=o,f.before(o)}}),Hr(!0),()=>{d&&Hr(!1)}},un),jr(()=>{Hr(!0)})}function vc(t,e){var n;n=document.head.appendChild(Qt());try{An(()=>{var i=gt(()=>e(n));i.f|=fs,ys||(i.nodes===null?i.nodes={start:n,end:n,a:null,t:null}:i.nodes.end=n)})}finally{}}function bt(t,e,n){Gn(()=>{var i=At(()=>e(t,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};Dr(()=>{var o=n();ac(o),r&&bs(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function sa(t,e){var n=void 0,i;Gs(()=>{n!==(n=e())&&(i&&(dt(i),i=null),n&&(i=gt(()=>{Gn(()=>n(t))})))})}function hc(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=hc(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function hf(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=hc(t))&&(i&&(i+=" "),i+=e);return i}function gf(t){return typeof t=="object"?hf(t):t??""}const Co=[...`
|
|
3
|
-
\r\f \v\uFEFF`];function mf(t,e,n){var i=t==null?"":""+t;if(e&&(i=i?i+" "+e:e),n){for(var r of Object.keys(n))if(n[r])i=i?i+" "+r:r;else if(i.length)for(var a=r.length,o=0;(o=i.indexOf(r,o))>=0;){var s=o+a;(o===0||Co.includes(i[o-1]))&&(s===i.length||Co.includes(i[s]))?i=(o===0?"":i.substring(0,o))+i.substring(s+1):o=s}}return i===""?null:i}function Mo(t,e=!1){var n=e?" !important;":";",i="";for(var r of Object.keys(t)){var a=t[r];a!=null&&a!==""&&(i+=" "+r+": "+a+n)}return i}function Wa(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function pf(t,e){if(e){var n="",i,r;if(Array.isArray(e)?(i=e[0],r=e[1]):i=e,t){t=String(t).replaceAll(/\/\*.*?\*\//g,"").trim();var a=!1,o=0,s=!1,c=[];i&&c.push(...Object.keys(i).map(Wa)),r&&c.push(...Object.keys(r).map(Wa));var u=0,d=-1;const m=t.length;for(var h=0;h<m;h++){var f=t[h];if(s?f==="/"&&t[h-1]==="*"&&(s=!1):a?a===f&&(a=!1):f==="/"&&t[h+1]==="*"?s=!0:f==='"'||f==="'"?a=f:f==="("?o++:f===")"&&o--,!s&&a===!1&&o===0){if(f===":"&&d===-1)d=h;else if(f===";"||h===m-1){if(d!==-1){var v=Wa(t.substring(u,d).trim());if(!c.includes(v)){f!==";"&&h++;var g=t.substring(u,h).trim();n+=" "+g+";"}}u=h+1,d=-1}}}}return i&&(n+=Mo(i)),r&&(n+=Mo(r,!0)),n=n.trim(),n===""?null:n}return t==null?null:String(t)}function ye(t,e,n,i,r,a){var o=t[al];if(o!==n||o===void 0){var s=mf(n,i,a);s==null?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s),t[al]=n}else if(a&&r!==a)for(var c in a){var u=!!a[c];(r==null||u!==!!r[c])&&t.classList.toggle(c,u)}return a}function Ua(t,e={},n,i){for(var r in n){var a=n[r];e[r]!==a&&(n[r]==null?t.style.removeProperty(r):t.style.setProperty(r,a,i))}}function rt(t,e,n,i){var r=t[ll];if(r!==e){var a=pf(e,i);a==null?t.removeAttribute("style"):t.style.cssText=a,t[ll]=e}else i&&(Array.isArray(i)?(Ua(t,n==null?void 0:n[0],i[0]),Ua(t,n==null?void 0:n[1],i[1],"important")):Ua(t,n,i));return i}function Ul(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Lo(t,e){var n=!("__defaultValue"in t);!n&&t.__defaultValue===e||(t.__defaultValue=e,gc(t,!n||"__value"in t))}function gc(t,e){var n=t.__defaultValue,i=t.multiple,r=i?n??[]:null;if(!(i&&!ka(r))){var a=t.selectedIndex,o=e&&i?new Set(t.selectedOptions):null;for(var s of t.options){var c=Si(s);Ul(s,i?r.includes(c):zs(c,n))}if(e)if(o!==null)for(s of t.options){var u=o.has(s);s.selected!==u&&(s.selected=u)}else t.selectedIndex!==a&&(t.selectedIndex=a)}}function ca(t,e,n=!1){if(t.multiple){if(e==null)return;if(!ka(e))return $u();for(var i of t.options)i.selected=e.includes(Si(i));return}for(i of t.options){var r=Si(i);if(zs(r,e)){i.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function mc(t){var e=new MutationObserver(n=>{n.every(yf)||("__defaultValue"in t&&gc(t,!1),"__value"in t&&ca(t,t.__value))});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),jr(()=>{e.disconnect()})}function _f(t,e,n=e){var i=new WeakSet,r=!0;Nl(t,"change",a=>{var o=a?"[selected]":":checked",s;if(t.multiple)s=[].map.call(t.querySelectorAll(o),Si);else{var c=t.querySelector(o)??t.querySelector("option:not([disabled])");s=c&&Si(c)}n(s),t.__value=s,me!==null&&i.add(me)}),Gn(()=>{var a=e();if(t===document.activeElement){var o=me;if(i.has(o))return}if(ca(t,a,r),r&&a===void 0){var s=t.querySelector(":checked");s!==null&&(a=Si(s),n(a))}t.__value=a,r=!1})}function Si(t){return"__value"in t?t.__value:t.value}function yf(t){if(t.target.closest("selectedcontent")!==null)return!0;if(t.type==="childList"){var e=[...t.addedNodes,...t.removedNodes];return e.length>0&&e.every(n=>n.nodeName==="SELECTEDCONTENT")}return!1}const wi=Symbol("class"),bi=Symbol("style"),pc=Symbol("is custom element"),_c=Symbol("is html"),wf=Cr?"input":"INPUT",bf=Cr?"option":"OPTION",yc=Cr?"select":"SELECT",kf=Cr?"progress":"PROGRESS";function xf(t,e){var n=Gl(t);n.value===(n.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!==kf)||(t.value=e??"")}function le(t,e,n,i){var r=Gl(t);r[e]!==(r[e]=n)&&(e==="loading"&&(t[Du]=n),n==null?t.removeAttribute(e):typeof n!="string"&&bc(t).has(e)?t[e]=n:t.setAttribute(e,n))}function Sf(t,e,n,i,r=!1,a=!1){var o=Gl(t),s=o[pc],c=!o[_c],u=e||{},d=t.nodeName===bf,h=t.nodeName===yc;for(var f in e)!(f in n)&&f[0]+f[1]!=="$$"&&(n[f]=null);n.class?n.class=gf(n.class):(i||n[wi])&&(n.class=null),n[bi]&&(n.style??(n.style=null));var v=bc(t);if(t.nodeName===wf&&"type"in n&&("value"in n||"__value"in n)){var g=n.type;(g!==u.type||g===void 0&&t.hasAttribute("type"))&&(u.type=g,le(t,"type",g))}for(const E in n){let M=n[E];if(d&&E==="value"&&M==null){t.value=t.__value="",u[E]=M;continue}if(E==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";ye(t,m,M,i,e==null?void 0:e[wi],n[wi]),u[E]=M,u[wi]=n[wi];continue}if(E==="style"){rt(t,M,e==null?void 0:e[bi],n[bi]),u[E]=M,u[bi]=n[bi];continue}var p=u[E];if(!(M===p&&!(M===void 0&&t.hasAttribute(E)))){u[E]=M;var w=E[0]+E[1];if(w!=="$$")if(w==="on"){const O={},F="$$"+E;let j=E.slice(2);var b=zd(j);if(Od(j)&&(j=j.slice(0,-7),O.capture=!0),!b&&p){if(M!=null)continue;t.removeEventListener(j,u[F],O),u[F]=null}if(b)ne(j,t,M),Se([j]);else if(M!=null){let L=function(D){u[E].call(this,D)};var P=L;u[F]=Vl(j,t,L,O)}}else if(E==="style")le(t,E,M);else if(E==="autofocus")md(t,!!M);else if(!s&&(E==="__value"||E==="value"&&M!=null))t.value=t.__value=M;else if(E==="selected"&&d)Ul(t,M);else{var T=E;c||(T=Fd(T));var x=T==="defaultValue"||T==="defaultChecked";if(h&&T==="defaultValue")continue;if(M==null&&!s&&!x)if(o[E]=null,T==="value"||T==="checked"){let O=t;const F=e===void 0;if(T==="value"){let j=O.defaultValue;O.removeAttribute(T),O.defaultValue=j,O.value=O.__value=F?j:null}else{let j=O.defaultChecked;O.removeAttribute(T),O.defaultChecked=j,O.checked=F?j:!1}}else t.removeAttribute(E);else x||(s||typeof M!="string")&&v.has(T)?(t[T]=M,T in o&&(o[T]=it)):typeof M!="function"&&le(t,T,M)}}}return u}function wc(t,e,n=[],i=[],r=[],a,o=!1,s=!1){Es(r,n,i,c=>{var u=void 0,d={},h=t.nodeName===yc,f=!1;if(Gs(()=>{var g=e(...c.map(l)),m=Sf(t,u,g,a,o,s);if(f&&h){var p=t;"defaultValue"in g&&Lo(p,g.defaultValue),"value"in g&&ca(p,g.value)}for(let b of Object.getOwnPropertySymbols(d))g[b]||dt(d[b]);for(let b of Object.getOwnPropertySymbols(g)){var w=g[b];b.description===Qu&&(!u||w!==u[b])&&(d[b]&&dt(d[b]),d[b]=gt(()=>sa(t,()=>w))),m[b]=w}u=m}),h){var v=t;Gn(()=>{var g=u;"defaultValue"in g&&Lo(v,g.defaultValue),ca(v,g.value,!0),mc(v)})}f=!0})}function Gl(t){return t[Wr]??(t[Wr]={[pc]:t.nodeName.includes("-"),[_c]:t.namespaceURI===ps})}var jo=new Map;function bc(t){var e=t.getAttribute("is")||t.nodeName,n=jo.get(e);if(n)return n;jo.set(e,n=new Set);for(var i,r=t,a=Element.prototype;a!==r;){i=us(r);for(var o in i)i[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&n.add(o);r=Cl(r)}return n}function di(t,e,n=e){var i=new WeakSet;Nl(t,"input",async r=>{var a=r?t.defaultValue:t.value;if(a=Ga(t)?Za(a):a,n(a),me!==null&&i.add(me),await pr(),a!==(a=e())){var o=t.selectionStart,s=t.selectionEnd,c=t.value.length;if(t.value=a??"",s!==null){var u=t.value.length;o===s&&s===c&&u>c?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=o,t.selectionEnd=Math.min(s,u))}}}),At(e)==null&&t.value&&(n(Ga(t)?Za(t.value):t.value),me!==null&&i.add(me)),Dr(()=>{var r=e();if(t===document.activeElement){var a=me;if(i.has(a))return}Ga(t)&&r===Za(t.value)||t.type==="date"&&!r&&!t.value||r!==t.value&&(t.value=r??"")})}function Tf(t,e,n=e){Nl(t,"change",i=>{var r=i?t.defaultChecked:t.checked;n(r)}),At(e)==null&&n(t.checked),Dr(()=>{var i=e();t.checked=!!i})}function Ga(t){var e=t.type;return e==="number"||e==="range"}function Za(t){return t===""?null:+t}var Dn,Di,Tr,_a,kc;const ya=class ya{constructor(e){be(this,_a);be(this,Dn,new WeakMap);be(this,Di);be(this,Tr);ke(this,Tr,e)}observe(e,n){var i=N(this,Dn).get(e)||new Set;return i.add(n),N(this,Dn).set(e,i),Pe(this,_a,kc).call(this).observe(e,N(this,Tr)),()=>{var r=N(this,Dn).get(e);r.delete(n),r.size===0&&(N(this,Dn).delete(e),N(this,Di).unobserve(e))}}};Dn=new WeakMap,Di=new WeakMap,Tr=new WeakMap,_a=new WeakSet,kc=function(){return N(this,Di)??ke(this,Di,new ResizeObserver(e=>{for(var n of e){ya.entries.set(n.target,n);for(var i of N(this,Dn).get(n.target)||[])i(n)}}))},_t(ya,"entries",new WeakMap);let kl=ya;var Ef=new kl({box:"border-box"});function Ct(t,e,n){var i=Ef.observe(t,()=>n(t[e]));Gn(()=>(At(()=>n(t[e])),i))}function Ka(t,e){return t===e||(t==null?void 0:t[on])===e}function et(t=Dl(),e,n,i){var r=Ze.r,a=Ie;return Gn(()=>{var o,s;return Dr(()=>{o=s,s=[],At(()=>{Ka(n(...s),t)||(e(t,...s),o&&Ka(n(...o),t)&&e(null,...o))})}),()=>{let c=a;for(;c!==r&&c.parent!==null&&c.parent.f&ea;)c=c.parent;const u=()=>{s&&Ka(n(...s),t)&&e(null,...s)},d=c.teardown;c.teardown=()=>{u(),d==null||d()}}}),t}function Hi(t,e){_d(window,["resize"],()=>In(()=>e(window[t])))}function Zl(t=!1){const e=Ze,n=e.l.u;if(!n)return;let i=()=>ac(e.s);if(t){let r=0,a={};const o=qi(()=>{let s=!1;const c=e.s;for(const u in c)c[u]!==a[u]&&(a[u]=c[u],s=!0);return s&&r++,r});i=()=>l(o)}n.b.length&&Md(()=>{Do(e,i),il(n.b)}),tt(()=>{const r=At(()=>n.m.map(ju));return()=>{for(const a of r)typeof a=="function"&&a()}}),n.a.length&&tt(()=>{Do(e,i),il(n.a)})}function Do(t,e){if(t.l.s)for(const n of t.l.s)l(n);e()}let Vr=!1;function Pf(t){var e=Vr;try{return Vr=!1,[t(),Vr]}finally{Vr=e}}const If={get(t,e){if(!t.exclude.has(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.has(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.has(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.has(e))}};function Qi(t,e,n){return new Proxy({props:t,exclude:e},If)}const Af={get(t,e){let n=t.props.length;for(;n--;){let i=t.props[n];if(_i(i)&&(i=i()),typeof i=="object"&&i!==null&&e in i)return i[e]}},set(t,e,n){let i=t.props.length;for(;i--;){let r=t.props[i];_i(r)&&(r=r());const a=qn(r,e);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(t,e){let n=t.props.length;for(;n--;){let i=t.props[n];if(_i(i)&&(i=i()),typeof i=="object"&&i!==null&&e in i){const r=qn(i,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===on||e===gs)return!1;for(let n of t.props)if(_i(n)&&(n=n()),n!=null&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props)if(_i(n)&&(n=n()),!!n){for(const i in n)e.includes(i)||e.push(i);for(const i of Object.getOwnPropertySymbols(n))e.includes(i)||e.push(i)}return e}};function Tn(...t){return new Proxy({props:t},Af)}function I(t,e,n,i){var x;var r=!Ki||(n&Fu)!==0,a=(n&Vu)!==0,o=(n&Wu)!==0,s=i,c=!0,u=void 0,d=()=>o&&r?(u??(u=qi(i)),l(u)):(c&&(c=!1,s=o?At(i):i),s);let h;if(a){var f=on in t||gs in t;h=((x=qn(t,e))==null?void 0:x.set)??(f&&e in t?P=>t[e]=P:void 0)}var v,g=!1;a?[v,g]=Pf(()=>t[e]):v=t[e],v===void 0&&i!==void 0&&(v=d(),h&&(r&&od(),h(v)));var m;if(r?m=()=>{var P=t[e];return P===void 0?d():(c=!0,P)}:m=()=>{var P=t[e];return P!==void 0&&(s=void 0),P===void 0?s:P},r&&!(n&Bu))return m;if(h){var p=t.$$legacy;return function(P,E){return arguments.length>0?((!r||!E||p||g)&&h(E?m():P),P):m()}}var w=!1,b=(n&Hu?qi:Sa)(()=>(w=!1,m()));a&&l(b);var T=Ie;return function(P,E){if(arguments.length>0){const M=E?l(b):r&&a?Oe(P):P;return R(b,M),w=!0,s!==void 0&&(s=M),P}return xn&&w||T.f&pt?b.v:l(b)}}function lt(t){Ze===null&&jl(),Ki&&Ze.l!==null?Cf(Ze).m.push(t):tt(()=>{const e=At(t);if(typeof e=="function")return e})}function Nr(t){Ze===null&&jl(),lt(()=>()=>At(t))}function Cf(t){var e=t.l;return e.u??(e.u={a:[],b:[],m:[]})}const Mf="5";var ss;typeof window<"u"&&((ss=window.__svelte??(window.__svelte={})).v??(ss.v=new Set)).add(Mf);function vn(){var t;return(t=window.PlayPilotLinkInjections)==null?void 0:t.token}const xc="https://www.playpilot.com",Lf="https://partner-api.playpilot.tech/1.0",jf="https://img-external.playpilot.tech",Df="https://cdn.jsdelivr.net/npm/@playpilot/tpi@8.41.0-beta.1",Fi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",Un=600,Ya={};async function Ht(t,{headers:e={},method:n="GET",body:i=null,baseUrl:r=Lf}={}){const a=!Ea()&&n==="GET";if(a&&t in Ya)return Ya[t];const o=n==="GET"?{}:{"Content-Type":"application/json"},s=await fetch(r+t,{method:n,headers:new Headers({...o,...e}),body:i?JSON.stringify(i):null});if(!(s!=null&&s.ok))throw s;const c=await s.text();let u=c;try{c&&(u=JSON.parse(c))}catch{}return a&&(Ya[t]=u),u}const Kl="EncryptedToken",Sc="articleReplacementEditToken",Tc="playpilot-editorial-mode";async function Ec({href:t=window.location.href,throwError:e=!1}={}){try{const n=vn();if(!n)throw new Error("No token was provided");const i=Yl(t);if(!i)throw new Error("Could not be authenticated");return await Ht(`/external-pages/edit-authorization?api-token=${n}`,{method:"POST",body:{private_token:i}}),Rf(i),!0}catch(n){if(console.error(n),e)throw n}finally{qf()}return!1}function Yl(t=""){var i,r;const e=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(e)return e;if(t){const a=new URL(t).searchParams.get(Sc);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${Kl}=`).pop())==null?void 0:r.split(";")[0])||""}function Rf(t){const e=new Date;e.setTime(e.getTime()+30*24*60*60*1e3);const i="expires="+e.toUTCString();document.cookie=Kl+"="+t+";"+i+";path=/"}function Nf(){document.cookie=Kl+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function Ea(){var e;const t=(e=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:e.editorial_token;return new URLSearchParams(window.location.search).get(Tc)==="true"||!!t}function Of(){const t=new URL(window.location.href);t.searchParams.set(Tc,"true"),window.history.replaceState({},"",t)}function qf(){const t=new URL(window.location.href);t.searchParams.delete(Sc),window.history.replaceState({},"",t)}function zf(t){let e=0;for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);e=e*31+i>>>0}return e.toString(16)}function Or(t=5){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(;n.length<t;)n+=e[Math.floor(Math.random()*e.length)];return n}const _={English:"en-US",Swedish:"sv-SE",Danish:"da-DK"};function qr(){var i,r;const t=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,e=Object.values(_);if(t){if(e.includes(t))return t;console.warn(`PlayPilot Link Injections: ${t} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");if(n){if(e.includes(n))return n;const a=e.find(o=>o.toLowerCase().startsWith(n+"-"));if(a)return a}return _.English}function Jl(t,e=""){const n=[],i=[t];for(;i.length>0;){const r=i.pop();if(n.includes(r)||e&&r.matches(e)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|FIGCAPTION|TIME|LABEL|BLOCKQUOTE|H1|H2|H3|H4|H5)$/.test(r.tagName)||r.offsetWidth<=1)continue;const a=Array.from(r.childNodes).some(c=>{var u;return c.nodeType===Node.TEXT_NODE&&((u=c.nodeValue)==null?void 0:u.trim())!==""});if(a&&r.tagName==="LI"){const c=r.closest("ul, ol");c&&!n.includes(c)&&n.push(c);continue}const o=r.tagName==="P"&&!!r.textContent;if(a||o){n.push(r);continue}const s=Array.from(r.children);for(let c=s.length-1;c>=0;c--)i.push(s[c])}return n}function Bi(){var e;const t=(e=window.PlayPilotLinkInjections)==null?void 0:e.selector;if(t){const n=t.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function Pc(t){return t.map(e=>e.innerText).join(`
|
|
2
|
+
var Tu=Object.defineProperty;var mo=t=>{throw TypeError(t)};var Eu=(t,e,n)=>e in t?Tu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var _t=(t,e,n)=>Eu(t,typeof e!="symbol"?e+"":e,n),Ra=(t,e,n)=>e.has(t)||mo("Cannot "+n);var N=(t,e,n)=>(Ra(t,e,"read from private field"),n?n.call(t):e.get(t)),we=(t,e,n)=>e.has(t)?mo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),xe=(t,e,n,i)=>(Ra(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),Ee=(t,e,n)=>(Ra(t,e,"access private method"),n);var ba=Array.isArray,Pu=Array.prototype.indexOf,Xr=Array.prototype.includes,ka=Array.from,ss=Object.defineProperty,On=Object.getOwnPropertyDescriptor,cs=Object.getOwnPropertyDescriptors,Iu=Object.prototype,Cu=Array.prototype,Pl=Object.getPrototypeOf,po=Object.isExtensible;function pi(t){return typeof t=="function"}const Pt=()=>{};function Au(t){return typeof(t==null?void 0:t.then)=="function"}function Mu(t){return t()}function el(t){for(var e=0;e<t.length;e++)t[e]()}function us(){var t,e,n=new Promise((i,r)=>{t=i,e=r});return{promise:n,resolve:t,reject:e}}function fr(t,e,n=!1){return t===void 0?n?e():e:t}function ci(t,e){if(Array.isArray(t))return t;if(e===void 0||!(Symbol.iterator in t))return Array.from(t);const n=[];for(const i of t)if(n.push(i),n.length===e)break;return n}const ft=2,Ri=4,Pr=8,Il=1<<24,Dt=16,qt=32,kn=64,tl=128,Cl=256,Jt=512,ot=1024,at=2048,Rt=4096,mt=8192,pt=16384,vi=32768,$r=1<<25,un=65536,ea=1<<17,ds=1<<18,Gi=1<<19,fs=1<<20,an=1<<25,ta=1<<21,bi=1<<22,qn=1<<23,on=Symbol("$state"),vs=Symbol("component"),hs=Symbol("legacy props"),Lu=Symbol(""),Vr=Symbol("attributes"),nl=Symbol("class"),il=Symbol("style"),nr=Symbol("text"),Wr=Symbol("form reset"),Ir=new class extends Error{constructor(){super(...arguments);_t(this,"name","StaleReactionError");_t(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var as;const Cr=!!((as=globalThis.document)!=null&&as.contentType)&&globalThis.document.contentType.includes("xml"),ju=11,Du=1,Ru=2,gs=4,Nu=8,Ou=16,qu=1,zu=2,Hu=4,Fu=8,Bu=16,Vu=1,Wu=2,Uu=4,Gu=1,Zu=2,it=Symbol("uninitialized"),ms="http://www.w3.org/1999/xhtml",ps="http://www.w3.org/2000/svg",Ku="http://www.w3.org/1998/Math/MathML",Yu="@attach";function Ju(){console.warn("https://svelte.dev/e/derived_inert")}function Qu(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Xu(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let _s=!1;function ys(t){return t===this.v}function ws(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function bs(t){return!ws(t,this.v)}function Al(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function $u(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ed(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function td(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function nd(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function id(t){throw new Error("https://svelte.dev/e/effect_orphan")}function rd(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ad(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function ld(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function od(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function sd(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function cd(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}let Zi=!1;function ud(){Zi=!0}function dd(t){let e=t.p;for(;e!==null&&e.c===null;)e=e.p;return(e==null?void 0:e.c)??null}function ks(t,e){return t===null&&Al(),t.c??(t.c=new Map(dd(t)||void 0))}let Ze=null;function Ni(t){Ze=t}function vr(t){return ks(Ze).get(t)}function Ar(t,e){return ks(Ze).set(t,e),e}function re(t,e=!1,n){Ze={p:Ze,i:!1,c:null,e:null,s:t,x:null,r:Pe,l:Zi&&!e?{s:null,u:null,$:[]}:null}}function ae(t){var e=Ze,n=e.e;if(n!==null){e.e=null;for(var i of n)Ws(i)}return t!==void 0&&(e.x=t),e.i=!0,Ze=e.p,Ml(t)}function Ml(t={}){return ss(t,vs,{value:!0}),t}function hi(){return!Zi||Ze!==null&&Ze.l===null}let $n=[];function xs(){var t=$n;$n=[],el(t)}function It(t){if($n.length===0&&!ki){var e=$n;queueMicrotask(()=>{e===$n&&xs()})}$n.push(t)}function fd(){for(;$n.length>0;)xs()}const vd=-7169;function tt(t,e){t.f=t.f&vd|e}function Ll(t){t.f&Jt||t.deps===null?tt(t,ot):tt(t,Rt)}function Ss(t,e,n){t.f&at?e.add(t):t.f&Rt&&n.add(t),tt(t,ot)}function hd(t,e){if(e){const n=document.body;t.autofocus=!0,It(()=>{document.activeElement===n&&t.focus()})}}let _o=!1;function gd(){_o||(_o=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)(e=n[Wr])==null||e.call(n)})},{capture:!0}))}function md(t,e,n,i=!0){i&&n();for(var r of e)t.addEventListener(r,n);Lr(()=>{for(var a of e)t.removeEventListener(a,n)})}function Pn(t){var e=Me,n=Pe;zt(null),fn(null);try{return t()}finally{zt(e),fn(n)}}function jl(t,e,n,i=n){t.addEventListener(e,()=>Pn(n));const r=t[Wr];r?t[Wr]=()=>{r(),i(!0)}:t[Wr]=()=>i(!0),gd()}function Ts(t,e,n,i){const r=hi()?Oi:xa;var a=t.filter(h=>!h.settled),o=e.map(r);if(n.length===0&&a.length===0){i(o);return}var s=Pe,c=Es(),u=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(h=>h.promise)):null;function f(h){if(!(s.f&pt)){c();try{i([...o,...h])}catch(g){rn(g,s)}hr()}}var d=Ps();if(n.length===0){u.then(()=>f([])).finally(d);return}function v(){Promise.all(n.map(h=>pd(h))).then(f).catch(h=>rn(h,s)).finally(d)}u?u.then(()=>{c(),v(),hr()}):v()}function Es(){var t=Pe,e=Me,n=Ze,i=ge;return function(a=!0){fn(t),zt(e),Ni(n),a&&!(t.f&pt)&&(i==null||i.activate(),i==null||i.apply())}}function hr(t=!0){fn(null),zt(null),Ni(null),t&&(ge==null||ge.deactivate())}function Ps(){var t=Pe,e=t.b,n=ge,i=!!(e!=null&&e.is_rendered());return e==null||e.update_pending_count(1,n),n.increment(i,t),()=>{e==null||e.update_pending_count(-1,n),n.decrement(i,t)}}function Oi(t){var e=ft|at;return Pe!==null&&(Pe.f|=Gi),{ctx:Ze,deps:null,effects:null,equals:ys,f:e,fn:t,reactions:null,rv:0,v:it,wv:0,parent:Pe,ac:null}}const ir=Symbol("obsolete");function pd(t,e,n){let i=Pe;i===null&&$u();var r=void 0,a=dn(it),o=!Me,s=new Set;return Md(()=>{var h,g;var c=Pe,u=us();r=u.promise;try{Promise.resolve(t()).then(u.resolve,m=>{m!==Ir&&u.reject(m)}).finally(hr)}catch(m){u.reject(m),hr()}var f=ge;if(o){if(c.f&vi)var d=Ps();if((h=i.b)!=null&&h.is_rendered())(g=f.async_deriveds.get(c))==null||g.reject(ir);else for(const m of s.values())m.reject(ir);s.add(u),f.async_deriveds.set(c,u)}const v=(m,p=void 0)=>{d==null||d(),s.delete(u),p!==ir&&(f.activate(),p?(a.f|=qn,wn(a,p)):(a.f&qn&&(a.f^=qn),wn(a,m)),f.deactivate())};u.promise.then(v,m=>v(null,m||"unknown"))}),Lr(()=>{for(const c of s)c.reject(ir)}),new Promise(c=>{function u(f){function d(){f===r?c(a):u(r)}f.then(d,d)}u(r)})}function B(t){const e=Oi(t);return Qs(e),e}function xa(t){const e=Oi(t);return e.equals=bs,e}function _d(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)dt(e[n])}}function Dl(t){var e,n=Pe,i=t.parent;if(!xn&&i!==null&&t.v!==it&&i.f&(pt|mt))return Ju(),t.v;fn(i);try{_d(t),e=tc(t)}finally{fn(n)}return e}function Is(t){var e=Dl(t);if(!t.equals(e)&&(t.wv=$s(),(!(ge!=null&&ge.is_fork)||t.deps===null)&&(ge!==null?(ge.capture(t,e,!0),sr==null||sr.capture(t,e,!0)):t.v=e,t.deps===null))){tt(t,ot);return}xn||(ut!==null?(Ol()||ge!=null&&ge.is_fork)&&ut.set(t,e):Ll(t))}function yd(t){var e;if(t.effects!==null)for(const n of t.effects)(n.teardown||n.ac)&&((e=n.teardown)==null||e.call(n),n.ac!==null&&Pn(()=>{n.ac.abort(Ir),n.ac=null}),n.fn!==null&&(n.teardown=Pt),gr(n,0),ql(n))}function Cs(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&qi(e)}let Na=null,mi=null,ge=null,sr=null,ut=null,rl=null,ki=!1,Oa=!1,cr=null,Ur=null;var yo=0;let wd=1;var Ei,Mn,ni,Pi,Ii,Ci,mn,Ai,kt,yr,pn,Wt,en,Mi,ii,Oe,al,ll,rr,ol,As,Ms,_i,bd,ar;const ha=class ha{constructor(){we(this,Oe);_t(this,"id",wd++);we(this,Ei,!1);_t(this,"linked",!0);we(this,Mn,null);we(this,ni,null);_t(this,"async_deriveds",new Map);_t(this,"current",new Map);_t(this,"previous",new Map);we(this,Pi,new Set);we(this,Ii,new Set);we(this,Ci,0);we(this,mn,new Map);we(this,Ai,null);we(this,kt,[]);we(this,yr,[]);we(this,pn,new Set);we(this,Wt,new Set);we(this,en,new Map);we(this,Mi,new Set);_t(this,"is_fork",!1);we(this,ii,!1);mi===null?Na=mi=this:(xe(mi,ni,this),xe(this,Mn,mi)),mi=this}skip_effect(e){N(this,en).has(e)||N(this,en).set(e,{d:[],m:[]}),N(this,Mi).delete(e)}unskip_effect(e,n=i=>this.schedule(i)){var i=N(this,en).get(e);if(i){N(this,en).delete(e);for(var r of i.d)tt(r,at),n(r);for(r of i.m)tt(r,Rt),n(r)}N(this,Mi).add(e)}capture(e,n,i=!1){e.v!==it&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&qn||(this.current.set(e,[n,i]),ut==null||ut.set(e,n)),this.is_fork||(e.v=n)}activate(){ge=this}deactivate(){ge=null,ut=null}flush(){try{Oa=!0,ge=this,Ee(this,Oe,rr).call(this)}finally{yo=0,rl=null,cr=null,Ur=null,Oa=!1,ge=null,ut=null,sn.clear()}}discard(){var e;for(const n of N(this,Ii))n(this);N(this,Ii).clear();for(const n of this.async_deriveds.values())n.reject(ir);Ee(this,Oe,ar).call(this),(e=N(this,Ai))==null||e.resolve()}register_created_effect(e){N(this,yr).push(e)}increment(e,n){if(xe(this,Ci,N(this,Ci)+1),e){let i=N(this,mn).get(n)??0;N(this,mn).set(n,i+1)}}decrement(e,n){if(xe(this,Ci,N(this,Ci)-1),e){let i=N(this,mn).get(n)??0;i===1?N(this,mn).delete(n):N(this,mn).set(n,i-1)}N(this,ii)||(xe(this,ii,!0),It(()=>{xe(this,ii,!1),this.linked&&this.flush()}))}transfer_effects(e,n){for(const i of e)N(this,pn).add(i);for(const i of n)N(this,Wt).add(i);e.clear(),n.clear()}oncommit(e){N(this,Pi).add(e)}ondiscard(e){N(this,Ii).add(e)}settled(){return(N(this,Ai)??xe(this,Ai,us())).promise}static ensure(){if(ge===null){const e=ge=new ha;!Oa&&!ki&&It(()=>{N(e,Ei)||e.flush()})}return ge}apply(){{ut=null;return}}schedule(e){var n;if(rl=e,(n=e.b)!=null&&n.is_pending&&e.f&(Ri|Pr|Il)&&!(e.f&vi)){e.b.defer_effect(e);return}N(this,kt).push(e)}};Ei=new WeakMap,Mn=new WeakMap,ni=new WeakMap,Pi=new WeakMap,Ii=new WeakMap,Ci=new WeakMap,mn=new WeakMap,Ai=new WeakMap,kt=new WeakMap,yr=new WeakMap,pn=new WeakMap,Wt=new WeakMap,en=new WeakMap,Mi=new WeakMap,ii=new WeakMap,Oe=new WeakSet,al=function(){if(this.is_fork)return!0;for(const i of N(this,mn).keys()){for(var e=i,n=!1;e.parent!==null;){if(N(this,en).has(e)){n=!0;break}e=e.parent}if(!n)return!0}return!1},ll=function(){var e=[];for(const a of N(this,kt))if(!(a.f&pt||!(a.f&(at|Rt)))){for(var n=a,i=!1;n.parent!==null;){n=n.parent;var r=n.f;if(r&(kn|qt)){if(!(r&ot)){i=!0;break}n.f^=ot}}i||e.push(n)}return xe(this,kt,[]),e},rr=function(){var s,c,u,f;xe(this,Ei,!0);for(const d of N(this,pn))N(this,Wt).delete(d),tt(d,at),this.schedule(d);for(const d of N(this,Wt))tt(d,Rt),this.schedule(d);this.apply();for(var e=cr=[],n=[],i=Ur=[];N(this,kt).length>0;){yo++>1e3&&(Ee(this,Oe,ar).call(this),kd());for(const d of Ee(this,Oe,ll).call(this))try{Ee(this,Oe,ol).call(this,d,e,n)}catch(v){throw Rs(d),Ee(this,Oe,al).call(this)||this.discard(),v}}if(ge=null,i.length>0){var r=ha.ensure();for(const d of i)r.schedule(d)}if(cr=null,Ur=null,Ee(this,Oe,al).call(this)){Ee(this,Oe,_i).call(this,n),Ee(this,Oe,_i).call(this,e);for(const[d,v]of N(this,en))Ds(d,v);i.length>0&&Ee(s=ge,Oe,rr).call(s);return}const a=Ee(this,Oe,As).call(this);if(a){Ee(this,Oe,_i).call(this,n),Ee(this,Oe,_i).call(this,e),Ee(c=a,Oe,Ms).call(c,this);return}N(this,pn).clear(),N(this,Wt).clear();for(const d of N(this,Pi))d(this);N(this,Pi).clear(),sr=this,wo(n),wo(e),sr=null,(u=N(this,Ai))==null||u.resolve();var o=ge;if(N(this,Ci)===0&&(N(this,kt).length===0||o!==null)&&Ee(this,Oe,ar).call(this),N(this,kt).length>0)if(o!==null){for(const d of N(this,kt))N(o,kt).push(d);xe(this,kt,[])}else o=this;o!==null&&(sn.clear(),Ee(f=o,Oe,rr).call(f))},ol=function(e,n,i){e.f^=ot;for(var r=e.first;r!==null;){var a=r.f,o=(a&(qt|kn))!==0,s=o&&(a&ot)!==0,c=s||(a&mt)!==0||N(this,en).has(r);if(!c&&r.fn!==null){o?r.f^=ot:a&Ri?n.push(r):Dr(r)&&(a&Dt&&N(this,Wt).add(r),qi(r));var u=r.first;if(u!==null){r=u;continue}}for(;r!==null;){var f=r.next;if(f!==null){r=f;break}r=r.parent}}},As=function(){for(var e=N(this,Mn);e!==null;){if(!e.is_fork){for(const[n,[,i]]of this.current)if(e.current.has(n)&&!i)return e}e=N(e,Mn)}return null},Ms=function(e){var i;for(const[r,a]of e.current)!this.previous.has(r)&&e.previous.has(r)&&this.previous.set(r,e.previous.get(r)),this.current.set(r,a);for(const[r,a]of e.async_deriveds){const o=this.async_deriveds.get(r);o&&a.promise.then(o.resolve).catch(o.reject)}e.async_deriveds.clear(),this.transfer_effects(N(e,pn),N(e,Wt));const n=r=>{var a=r.reactions;if(a!==null&&!(r.f&ft&&!(r.f&(at|Rt))))for(const c of a){var o=c.f;if(o&ft)n(c);else{var s=c;o&(bi|Dt)&&!this.async_deriveds.has(s)&&(N(this,Wt).delete(s),tt(s,at),this.schedule(s))}}};for(const r of this.current.keys())n(r);this.oncommit(()=>e.discard()),Ee(i=e,Oe,ar).call(i),ge=this,Ee(this,Oe,rr).call(this)},_i=function(e){for(var n=0;n<e.length;n+=1)Ss(e[n],N(this,pn),N(this,Wt))},bd=function(){var d,v;for(let h=Na;h!==null;h=N(h,ni)){var e=h.id<this.id,n=[];for(const[g,[m,p]]of this.current){if(h.current.has(g)){var i=h.current.get(g)[0];if(e&&m!==i)h.current.set(g,[m,p]);else continue}n.push(g)}if(e)for(const[g,m]of this.async_deriveds){const p=h.async_deriveds.get(g);p&&m.promise.then(p.resolve).catch(p.reject)}var r=[...h.current.keys()].filter(g=>!h.current.get(g)[1]);if(!(!N(h,Ei)||r.length===0)){var a=r.filter(g=>!this.current.has(g));if(a.length===0)e&&h.discard();else if(n.length>0){if(e)for(const g of N(this,Mi))h.unskip_effect(g,m=>{var p;m.f&(Dt|bi)?h.schedule(m):Ee(p=h,Oe,_i).call(p,[m])});h.activate();var o=new Set,s=new Map;for(var c of n)js(c,a,o,s);s=new Map;var u=[...h.current].filter(([g,m])=>{const p=this.current.get(g);return p?p[0]!==m[0]||p[1]!==m[1]:!0}).map(([g])=>g);if(u.length>0)for(const g of N(this,yr))!(g.f&(pt|mt|ea))&&Rl(g,u,s)&&(g.f&(bi|Dt)?(tt(g,at),h.schedule(g)):N(h,pn).add(g));if(N(h,kt).length>0&&!N(h,ii)){h.apply();for(var f of Ee(d=h,Oe,ll).call(d))Ee(v=h,Oe,ol).call(v,f,[],[])}h.deactivate()}}}},ar=function(){if(this.linked){var e=N(this,Mn),n=N(this,ni);e===null?Na=n:xe(e,ni,n),n===null?mi=e:xe(n,Mn,e),this.linked=!1}};let Vn=ha;function Ls(t){var e=ki;ki=!0;try{for(var n;;){if(fd(),ge===null)return n;ge.flush()}}finally{ki=e}}function kd(){try{rd()}catch(t){rn(t,rl)}}let Vt=null;function wo(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var i=t[n++];if(!(i.f&(pt|mt))&&Dr(i)&&(Vt=new Set,qi(i),i.deps===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&Ks(i),(Vt==null?void 0:Vt.size)>0)){sn.clear();for(const r of Vt){if(r.f&(pt|mt))continue;const a=[r];let o=r.parent;for(;o!==null;)Vt.has(o)&&(Vt.delete(o),a.push(o)),o=o.parent;for(let s=a.length-1;s>=0;s--){const c=a[s];c.f&(pt|mt)||qi(c)}}Vt.clear()}}Vt=null}}function js(t,e,n,i){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const r of t.reactions){const a=r.f;a&ft?js(r,e,n,i):a&(bi|Dt)&&!(a&at)&&Rl(r,e,i)&&(tt(r,at),Nl(r))}}function Rl(t,e,n){const i=n.get(t);if(i!==void 0)return i;if(t.deps!==null)for(const r of t.deps){if(Xr.call(e,r))return!0;if(r.f&ft&&Rl(r,e,n))return n.set(r,!0),!0}return n.set(t,!1),!1}function Nl(t){ge.schedule(t)}function Ds(t,e){if(!(t.f&qt&&t.f&ot)){t.f&at?e.d.push(t):t.f&Rt&&e.m.push(t),tt(t,ot);for(var n=t.first;n!==null;)Ds(n,e),n=n.next}}function Rs(t){tt(t,ot);for(var e=t.first;e!==null;)Rs(e),e=e.next}let na=new Set;const sn=new Map;let Ns=!1;function dn(t,e){var n={f:0,v:t,reactions:null,equals:ys,rv:0,wv:0};return n}function K(t,e){const n=dn(t);return Qs(n),n}function sl(t,e=!1,n=!0){var r;const i=dn(t);return e||(i.equals=bs),Zi&&n&&Ze!==null&&Ze.l!==null&&((r=Ze.l).s??(r.s=[])).push(i),i}function R(t,e,n=!1){Me!==null&&(!Kt||Me.f&ea)&&hi()&&Me.f&(ft|Dt|bi|ea)&&(cn===null||!cn.has(t))&&sd();let i=n?Ne(e):e;return wn(t,i,Ur)}var Xn=null,cl=0;function wn(t,e,n=null){if(!t.equals(e)){xn?sn.set(t,e):sn.has(t)||sn.set(t,t.v);var i=Vn.ensure();if(i.capture(t,e),t.f&ft){const r=t;t.f&at&&Dl(r),ut===null&&Ll(r)}t.wv=$s(),Xn=null,cl=0,Os(t,at,n),Xn=null,hi()&&Pe!==null&&Pe.f&ot&&!(Pe.f&(qt|kn))&&(Mt===null?jd([t]):Mt.push(t)),!i.is_fork&&na.size>0&&!Ns&&xd()}return e}function xd(){Ns=!1;for(const t of na){t.f&ot&&tt(t,Rt);let e;try{e=Dr(t)}catch{e=!0}e&&qi(t)}na.clear()}function Sd(t,e=1){var n=l(t),i=e===1?n++:n--;return R(t,n),i}function zn(t){R(t,t.v+1)}function Os(t,e,n){var i=t.reactions;if(i!==null){var r=hi(),a=i.length;if(cl+=a,cl>1e5&&Xn===null&&(Xn=new Set),Xn!==null){if(Xn.has(t))return;Xn.add(t)}for(var o=0;o<a;o++){var s=i[o],c=s.f;if(!(!r&&s===Pe)){var u=(c&at)===0;if(u&&tt(s,e),c&ea)na.add(s);else if(c&ft){var f=s;ut==null||ut.delete(f),Os(f,Rt,n)}else if(u){var d=s;c&Dt&&Vt!==null&&Vt.add(d),n!==null?n.push(d):Nl(d)}}}}}function Ne(t){if(typeof t!="object"||t===null||on in t||vs in t)return t;const e=Pl(t);if(e!==Iu&&e!==Cu)return t;var n=new Map,i=ba(t),r=K(0),a=bn,o=s=>{if(bn===a)return s();var c=Me,u=bn;zt(null),xo(a);var f=s();return zt(c),xo(u),f};return i&&n.set("length",K(t.length)),new Proxy(t,{defineProperty(s,c,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ld();var f=n.get(c);return f===void 0?o(()=>{var d=K(u.value);return n.set(c,d),d}):R(f,u.value,!0),!0},deleteProperty(s,c){var u=n.get(c);if(u===void 0){if(c in s){const f=o(()=>K(it));n.set(c,f),zn(r)}}else R(u,it),zn(r);return!0},get(s,c,u){var h;if(c===on)return t;var f=n.get(c),d=c in s;if(f===void 0&&(!d||(h=On(s,c))!=null&&h.writable)&&(f=o(()=>{var g=Ne(d?s[c]:it),m=K(g);return m}),n.set(c,f)),f!==void 0){var v=l(f);return v===it?void 0:v}return Reflect.get(s,c,u)},getOwnPropertyDescriptor(s,c){var v;(v=this.has)==null||v.call(this,s,c);var u=Reflect.getOwnPropertyDescriptor(s,c),f=n.get(c);if(f!==void 0){var d=l(f);if(d===it)return;if(u&&"value"in u)u.value=d;else return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(s,c){var v;if(c===on)return!0;var u=n.get(c),f=u!==void 0&&u.v!==it||Reflect.has(s,c);if(u!==void 0||Pe!==null&&(!f||(v=On(s,c))!=null&&v.writable)){u===void 0&&(u=o(()=>{var h=f?Ne(s[c]):it,g=K(h);return g}),n.set(c,u));var d=l(u);if(d===it)return!1}return f},set(s,c,u,f){var T;var d=n.get(c),v=c in s;if(i&&c==="length")for(var h=u;h<d.v;h+=1){var g=n.get(h+"");g!==void 0?R(g,it):h in s&&(g=o(()=>K(it)),n.set(h+"",g))}if(d===void 0)(!v||(T=On(s,c))!=null&&T.writable)&&(d=o(()=>K(void 0)),R(d,Ne(u)),n.set(c,d));else{v=d.v!==it;var m=o(()=>Ne(u));R(d,m)}var p=Reflect.getOwnPropertyDescriptor(s,c);if(p!=null&&p.set&&p.set.call(f,u),!v){if(i&&typeof c=="string"){var w=n.get("length"),b=Number(c);Number.isInteger(b)&&b>=w.v&&R(w,b+1)}zn(r)}return!0},ownKeys(s){l(r);var c=Reflect.ownKeys(s).filter(d=>{var v=n.get(d);return v===void 0||v.v!==it});for(var[u,f]of n)f.v!==it&&!(u in s)&&c.push(u);return c},setPrototypeOf(){od()}})}function bo(t){try{if(t!==null&&typeof t=="object"&&on in t)return t[on]}catch{}return t}function qs(t,e){return Object.is(bo(t),bo(e))}var Ie,zs,Hs,Fs;function Td(){if(Ie===void 0){Ie=window,zs=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;Hs=On(e,"firstChild").get,Fs=On(e,"nextSibling").get,po(t)&&(t[nl]=void 0,t[Vr]=null,t[il]=void 0,t.__e=void 0),po(n)&&(n[nr]=void 0)}}function Qt(t=""){return document.createTextNode(t)}function Zt(t){return Hs.call(t)}function Mr(t){return Fs.call(t)}function C(t,e){return Zt(t)}function Q(t,e=!1){{var n=Zt(t);return n instanceof Comment&&n.data===""?Mr(n):n}}function oe(t,e=!1){return Zt(t)}function k(t,e=1,n=!1){let i=t;for(;e--;)i=Mr(i);return i}function Ed(t){t.textContent=""}function Bs(){return!1}function Sa(t,e,n){return e==null||e===ms?n?document.createElement(t,{is:n}):document.createElement(t):n?document.createElementNS(e,t,{is:n}):document.createElementNS(e,t)}function Pd(t){var e=Pe;if(e===null)return Me.f|=qn,t;if(!(e.f&vi)&&!(e.f&Ri))throw t;rn(t,e)}function rn(t,e){if(!(e!==null&&e.f&pt)){for(;e!==null;){if(e.f&tl&&!(e.f&(pt|$r))){if(!(e.f&vi))throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw t}}function Vs(t){Pe===null&&(Me===null&&id(),nd()),xn&&td()}function Id(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function Xt(t,e){var n=Pe;n!==null&&n.f&mt&&(t|=mt);var i={ctx:Ze,deps:null,nodes:null,f:t|at|Jt,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};ge==null||ge.register_created_effect(i);var r=i;if(t&Ri)cr!==null?cr.push(i):Vn.ensure().schedule(i);else if(e!==null){try{qi(i)}catch(o){throw dt(i),o}r.deps===null&&r.teardown===null&&r.nodes===null&&r.first===r.last&&!(r.f&Gi)&&(r=r.first,t&Dt&&t&un&&r!==null&&(r.f|=un))}if(r!==null&&(r.parent=n,n!==null&&Id(r,n),Me!==null&&Me.f&ft&&!(t&kn))){var a=Me;(a.effects??(a.effects=[])).push(r)}return i}function Ol(){return Me!==null&&!Kt}function Lr(t){const e=Xt(Pr,null);return tt(e,ot),e.teardown=t,e}function et(t){Vs();var e=Pe.f,n=!Me&&(e&qt)!==0&&Ze!==null&&!Ze.i;if(n){var i=Ze;(i.e??(i.e=[])).push(t)}else return Ws(t)}function Ws(t){return Xt(Ri|fs,t)}function Cd(t){return Vs(),Xt(Pr|fs,t)}function Ad(t){Vn.ensure();const e=Xt(kn|Gi,t);return(n={})=>new Promise(i=>{n.outro?oi(e,()=>{dt(e),i(void 0)}):(dt(e),i(void 0))})}function Gn(t){return Xt(Ri,t)}function Md(t){return Xt(bi|Gi,t)}function jr(t,e=0){return Xt(Pr|e,t)}function G(t,e=[],n=[],i=[]){Ts(i,e,n,r=>{Xt(Pr,()=>{t(...r.map(l))})})}function In(t,e=0){var n=Xt(Dt|e,t);return n}function Us(t,e=0){var n=Xt(Il|e,t);return n}function gt(t){return Xt(qt|Gi,t)}function Gs(t){var e=t.teardown;if(e!==null){const n=xn,i=Me;ko(!0),zt(null);try{e.call(null)}catch(r){rn(r,t.parent)}finally{ko(n),zt(i)}}}function ql(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const r=n.ac;r!==null&&Pn(()=>{r.abort(Ir)});var i=n.next;n.f&kn?n.parent=null:dt(n,e),n=i}}function Ld(t){for(var e=t.first;e!==null;){var n=e.next;e.f&qt||dt(e),e=n}}function dt(t,e=!0){var n=!1;(e||t.f&ds)&&t.nodes!==null&&t.nodes.end!==null&&(Zs(t.nodes.start,t.nodes.end),n=!0),t.f|=$r,ql(t,e&&!n),gr(t,0);var i=t.nodes&&t.nodes.t;if(i!==null)for(const a of i)a.stop();Gs(t),t.f^=$r,t.f|=pt;var r=t.parent;r!==null&&r.first!==null&&Ks(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Zs(t,e){for(;t!==null;){var n=t===e?null:Mr(t);t.remove(),t=n}}function Ks(t){var e=t.parent,n=t.prev,i=t.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),e!==null&&(e.first===t&&(e.first=i),e.last===t&&(e.last=n))}function oi(t,e,n=!0){var i=[];t.f|=Cl,Ys(t,i,!0);var r=()=>{n&&dt(t),e&&e()},a=i.length;if(a>0){var o=()=>--a||r();for(var s of i)s.out(o)}else r()}function Ys(t,e,n){if(!(t.f&mt)){t.f^=mt;var i=t.nodes&&t.nodes.t;if(i!==null)for(const s of i)(s.is_global||n)&&e.push(s);for(var r=t.first;r!==null;){var a=r.next;if(!(r.f&kn)){var o=(r.f&un)!==0||(r.f&qt)!==0&&(t.f&Dt)!==0;Ys(r,e,o?n:!1)}r=a}}}function ia(t){t.f&=~Cl,Js(t,!0)}function Js(t,e){if(!(t.f&Cl)&&t.f&mt){t.f^=mt,t.f&ot||(tt(t,at),Vn.ensure().schedule(t));for(var n=t.first;n!==null;){var i=n.next,r=(n.f&un)!==0||(n.f&qt)!==0;Js(n,r?e:!1),n=i}var a=t.nodes&&t.nodes.t;if(a!==null)for(const o of a)(o.is_global||e)&&o.in()}}function zl(t,e){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end;n!==null;){var r=n===i?null:Mr(n);e.append(n),n=r}}let Gr=!1,xn=!1;function ko(t){xn=t}let Me=null,Kt=!1;function zt(t){Me=t}let Pe=null;function fn(t){Pe=t}let cn=null;function Qs(t){Me!==null&&(Me.f&ta||Me.f&ft)&&(cn??(cn=new Set)).add(t)}let wt=null,Et=0,Mt=null;function jd(t){Mt=t}let Xs=1,ei=0,bn=ei;function xo(t){bn=t}function $s(){return++Xs}function Dr(t){var e=t.f;if(e&at)return!0;if(e&Rt){for(var n=t.deps,i=n.length,r=0;r<i;r++){var a=n[r];if(Dr(a)&&Is(a),a.wv>t.wv)return!0}e&Jt&&ut===null&&tt(t,ot)}return!1}function ec(t,e,n=!0){var i=t.reactions;if(i!==null&&!(cn!==null&&cn.has(t)))for(var r=0;r<i.length;r++){var a=i[r];a.f&ft?ec(a,e,!1):e===a&&(n?tt(a,at):a.f&ot&&tt(a,Rt),Nl(a))}}function tc(t){var e=wt,n=Et,i=Mt,r=Me,a=cn,o=Ze,s=Kt,c=bn,u=t.f;wt=null,Et=0,Mt=null,Me=u&(qt|kn)?null:t,cn=null,Ni(t.ctx),Kt=!1,bn=++ei,t.ac!==null&&(Pn(()=>{t.ac.abort(Ir)}),t.ac=null);try{t.f|=ta;var f=t.fn,d=f();t.f|=vi;var v=So(t);if(hi()&&Mt!==null&&!Kt&&v!==null&&!(t.f&(ft|Rt|at)))for(var h=0;h<Mt.length;h++)ec(Mt[h],t);if(r!==null&&r!==t){if(ei++,r.deps!==null)for(let g=0;g<n;g+=1)r.deps[g].rv=ei;if(e!==null)for(const g of e)g.rv=ei;Mt!==null&&(i===null?i=Mt:i.push(...Mt))}return t.f&qn&&(t.f^=qn),d}catch(g){return So(t),Pd(g)}finally{t.f^=ta,wt=e,Et=n,Mt=i,Me=r,cn=a,Ni(o),Kt=s,bn=c}}function So(t){var r;var e=t.deps,n=ge==null?void 0:ge.is_fork;if(wt!==null){var i;if(n||gr(t,Et),e!==null&&Et>0)for(e.length=Et+wt.length,i=0;i<wt.length;i++)e[Et+i]=wt[i];else t.deps=e=wt;if(Ol()&&t.f&Jt)for(i=Et;i<e.length;i++)((r=e[i]).reactions??(r.reactions=[])).push(t)}else!n&&e!==null&&Et<e.length&&(gr(t,Et),e.length=Et);return e}function Dd(t,e){let n=e.reactions;if(n!==null){var i=Pu.call(n,t);if(i!==-1){var r=n.length-1;r===0?n=e.reactions=null:(n[i]=n[r],n.pop())}}if(n===null&&e.f&ft&&(wt===null||!Xr.call(wt,e))){var a=e;a.f&Jt&&(a.f^=Jt),a.v!==it&&Ll(a),a.ac!==null&&Pn(()=>{a.ac.abort(Ir),a.ac=null,tt(a,at)}),yd(a),gr(a,0)}}function gr(t,e){var n=t.deps;if(n!==null)for(var i=e;i<n.length;i++)Dd(t,n[i])}function qi(t){var e=t.f;if(!(e&pt)){tt(t,ot);var n=Pe,i=Gr;Pe=t,Gr=(e&(qt|kn))===0;try{e&(Dt|Il)?Ld(t):ql(t),Gs(t);var r=tc(t);t.teardown=typeof r=="function"?r:null,t.wv=Xs;var a}finally{Gr=i,Pe=n}}}async function mr(){await Promise.resolve(),Ls()}function l(t){var e=t.f,n=(e&ft)!==0;if(Me!==null&&!Kt){var i=Pe!==null&&(Pe.f&pt)!==0;if(!i&&(cn===null||!cn.has(t))){var r=Me.deps;if(Me.f&ta)t.rv<ei&&(t.rv=ei,wt===null&&r!==null&&r[Et]===t?Et++:wt===null?wt=[t]:wt.push(t));else{Me.deps??(Me.deps=[]),Xr.call(Me.deps,t)||Me.deps.push(t);var a=t.reactions;a===null?t.reactions=[Me]:Xr.call(a,Me)||a.push(Me)}}}if(xn&&sn.has(t))return sn.get(t);if(n){var o=t;if(xn){var s=o.v;return(!(o.f&ot)&&o.reactions!==null||ic(o))&&(s=Dl(o)),sn.set(o,s),s}var c=(o.f&Jt)===0&&!Kt&&Me!==null&&(Gr||(Me.f&Jt)!==0),u=(o.f&vi)===0;Dr(o)&&(c&&(o.f|=Jt),Is(o)),c&&!u&&(Cs(o),nc(o))}if(ut!=null&&ut.has(t))return ut.get(t);if(t.f&qn)throw t.v;return t.v}function nc(t){if(t.f|=Jt,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),e.f&ft&&!(e.f&Jt)&&(Cs(e),nc(e))}function ic(t){if(t.v===it)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(sn.has(e)||e.f&ft&&ic(e))return!0;return!1}function Ct(t){var e=Kt;try{return Kt=!0,t()}finally{Kt=e}}function rc(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(on in t)ul(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];typeof n=="object"&&n&&on in n&&ul(n)}}}function ul(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let i in t)try{ul(t[i],e)}catch{}const n=Pl(t);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=cs(n);for(let r in i){const a=i[r].get;if(a)try{a.call(t)}catch{}}}}}function Rd(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const Nd=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Od(t){return Nd.includes(t)}const qd={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function zd(t){return t=t.toLowerCase(),qd[t]??t}const Hd=["touchstart","touchmove"];function Fd(t){return Hd.includes(t)}const ti=Symbol("events"),ac=new Set,dl=new Set;function Hl(t,e,n,i={}){function r(a){if(i.capture||fl.call(e,a),!a.cancelBubble)return Pn(()=>n==null?void 0:n.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(r.__removed=!1,It(()=>{r.__removed||e.addEventListener(t,r,i)})):e.addEventListener(t,r,i),r}function Bd(t,e,n,i={}){var r=Hl(e,t,n,i);return()=>{r.__removed=!0,t.removeEventListener(e,r,i)}}function me(t,e,n,i,r){var a={capture:i,passive:r},o=Hl(t,e,n,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Lr(()=>{o.__removed=!0,e.removeEventListener(t,o,a)})}function te(t,e,n){(e[ti]??(e[ti]={}))[t]=n}function Se(t){for(var e=0;e<t.length;e++)ac.add(t[e]);for(var n of dl)n(t)}let qa=null,za=!1;function fl(t){var m,p;var e=this,n=e.ownerDocument,i=t.type,r=((m=t.composedPath)==null?void 0:m.call(t))||[],a=r[0]||t.target;qa=t,za||(za=!0,setTimeout(()=>{za=!1,qa=null}));var o=0,s=qa===t&&t[ti];if(s){var c=r.indexOf(s);if(c!==-1&&(e===document||e===window)){t[ti]=e;return}var u=r.indexOf(e);if(u===-1)return;c<=u&&(o=c)}if(a=r[o]||t.target,a!==e){ss(t,"currentTarget",{configurable:!0,get(){return a||n}});var f=Me,d=Pe;zt(null),fn(null);try{for(var v,h=[];a!==null&&a!==e;){try{var g=(p=a[ti])==null?void 0:p[i];g!=null&&(!a.disabled||t.target===a)&&g.call(a,t)}catch(w){v?h.push(w):v=w}if(t.cancelBubble)break;o++,a=o<r.length?r[o]:null}if(v){for(let w of h)queueMicrotask(()=>{throw w});throw v}}finally{t[ti]=e,delete t.currentTarget,zt(f),fn(d)}}}var ls;const Ha=((ls=globalThis==null?void 0:globalThis.window)==null?void 0:ls.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Vd(t){return(Ha==null?void 0:Ha.createHTML(t))??t}function lc(t){var e=Sa("template");return e.innerHTML=Vd(t.replaceAll("<!>","<!---->")),e.content}const Wd=Cr?"script":"SCRIPT";function Wn(t,e){var n=Pe;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function x(t,e){var n=(e&Gu)!==0,i=(e&Zu)!==0,r,a=!t.startsWith("<!>");return()=>{r===void 0&&(r=lc(a?t:"<!>"+t),n||(r=Zt(r)));var o=i||zs?document.importNode(r,!0):r.cloneNode(!0);if(n){var s=Zt(o),c=o.lastChild;Wn(s,c)}else Wn(o,o);return o}}function Ud(t,e,n="svg"){var i=!t.startsWith("<!>"),r=`<${n}>${i?t:"<!>"+t}</${n}>`,a;return()=>{if(!a){var o=lc(r),s=Zt(o);a=Zt(s)}var c=a.cloneNode(!0);return Wn(c,c),c}}function Ge(t,e){return Ud(t,e,"svg")}function Gd(t){return()=>Zd(t())}function Zd(t){const e=t.nodeType===ju,n=t.nodeName===Wd?[t]:t.querySelectorAll("script"),i=Pe;for(const a of n){const o=Sa("script");for(var r of a.attributes)o.setAttribute(r.name,r.value);o.textContent=a.textContent,(e?t.firstChild===a:t===a)&&(i.nodes.start=o),(e?t.lastChild===a:t===a)&&(i.nodes.end=o),a.replaceWith(o)}return t}function Xe(t=""){{var e=Qt(t+"");return Wn(e,e),e}}function ke(){var t=document.createDocumentFragment(),e=document.createComment(""),n=Qt();return t.append(e,n),Wn(e,n),t}function y(t,e){t!==null&&t.before(e)}function oc(t){let e=0,n=dn(0),i;return()=>{Ol()&&(l(n),jr(()=>(e===0&&(i=Ct(()=>t(()=>zn(n)))),e+=1,()=>{It(()=>{e-=1,e===0&&(i==null||i(),i=void 0,zn(n))})})))}}var Kd=un|Gi;function Fl(t,e,n,i){new Yd(t,e,n,i)}var Lt,El,jt,ri,vt,xt,ht,St,tn,ai,Ln,Li,wr,br,_n,ga,Ye,Jd,Qd,vl,Xd,hl,lr,Zr,gl,ml;class Yd{constructor(e,n,i,r){we(this,Ye);_t(this,"parent");_t(this,"is_pending",!1);_t(this,"transform_error");we(this,Lt);we(this,El,null);we(this,jt);we(this,ri);we(this,vt);we(this,xt,null);we(this,ht,null);we(this,St,null);we(this,tn,null);we(this,ai,0);we(this,Ln,0);we(this,Li,!1);we(this,wr,new Set);we(this,br,new Set);we(this,_n,null);we(this,ga,oc(()=>(xe(this,_n,dn(N(this,ai))),()=>{xe(this,_n,null)})));var a;xe(this,Lt,e),xe(this,jt,n),xe(this,ri,o=>{var s=Pe;s.b=this,s.f|=tl,i(o)}),this.parent=Pe.b,this.transform_error=r??((a=this.parent)==null?void 0:a.transform_error)??(o=>o),xe(this,vt,In(()=>{Ee(this,Ye,hl).call(this)},Kd))}defer_effect(e){Ss(e,N(this,wr),N(this,br))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!N(this,jt).pending}update_pending_count(e,n){Ee(this,Ye,gl).call(this,e,n),xe(this,ai,N(this,ai)+e),!(!N(this,_n)||N(this,Li))&&(xe(this,Li,!0),It(()=>{xe(this,Li,!1),N(this,_n)&&wn(N(this,_n),N(this,ai))}))}get_effect_pending(){return N(this,ga).call(this),l(N(this,_n))}error(e){if(!N(this,jt).onerror&&!N(this,jt).failed)throw e;ge!=null&&ge.is_fork?(N(this,xt)&&ge.skip_effect(N(this,xt)),N(this,ht)&&ge.skip_effect(N(this,ht)),N(this,St)&&ge.skip_effect(N(this,St)),ge.oncommit(()=>{Ee(this,Ye,ml).call(this,e)})):Ee(this,Ye,ml).call(this,e)}}Lt=new WeakMap,El=new WeakMap,jt=new WeakMap,ri=new WeakMap,vt=new WeakMap,xt=new WeakMap,ht=new WeakMap,St=new WeakMap,tn=new WeakMap,ai=new WeakMap,Ln=new WeakMap,Li=new WeakMap,wr=new WeakMap,br=new WeakMap,_n=new WeakMap,ga=new WeakMap,Ye=new WeakSet,Jd=function(){try{xe(this,xt,gt(()=>N(this,ri).call(this,N(this,Lt))))}catch(e){this.error(e)}},Qd=function(e){const n=N(this,jt).failed,{reset:i,invoke_onerror:r}=Ee(this,Ye,vl).call(this,e);It(r),n&&xe(this,St,gt(()=>{n(N(this,Lt),()=>e,()=>i)}))},vl=function(e){var n=!1,i=!1;const r=()=>{if(n){Xu();return}n=!0,i&&cd(),N(this,St)!==null&&oi(N(this,St),()=>{xe(this,St,null)}),Ee(this,Ye,Zr).call(this,()=>{Ee(this,Ye,hl).call(this)})};return{reset:r,invoke_onerror:()=>{var o,s;try{i=!0,(s=(o=N(this,jt)).onerror)==null||s.call(o,e,r),i=!1}catch(c){rn(c,N(this,vt)&&N(this,vt).parent)}}}},Xd=function(){const e=N(this,jt).pending;e&&(this.is_pending=!0,xe(this,ht,gt(()=>e(N(this,Lt)))),It(()=>{var n=xe(this,tn,document.createDocumentFragment()),i=Qt(),r=!1;if(n.append(i),xe(this,xt,Ee(this,Ye,Zr).call(this,()=>{try{return gt(()=>N(this,ri).call(this,i))}catch(a){try{this.error(a),r=!0}catch(o){rn(o,N(this,vt).parent)}return null}})),N(this,xt)===null){xe(this,tn,null),r&&Ee(this,Ye,lr).call(this,ge);return}N(this,Ln)===0&&(N(this,Lt).before(n),xe(this,tn,null),oi(N(this,ht),()=>{xe(this,ht,null)}),Ee(this,Ye,lr).call(this,ge))}))},hl=function(){try{if(this.is_pending=this.has_pending_snippet(),xe(this,Ln,0),xe(this,ai,0),xe(this,xt,gt(()=>{N(this,ri).call(this,N(this,Lt))})),N(this,Ln)>0){var e=xe(this,tn,document.createDocumentFragment());zl(N(this,xt),e);const n=N(this,jt).pending;xe(this,ht,gt(()=>n(N(this,Lt))))}else Ee(this,Ye,lr).call(this,ge)}catch(n){this.error(n)}},lr=function(e){this.is_pending=!1,e.transfer_effects(N(this,wr),N(this,br))},Zr=function(e){var n=Pe,i=Me,r=Ze;fn(N(this,vt)),zt(N(this,vt)),Ni(N(this,vt).ctx);try{return Vn.ensure(),e()}finally{fn(n),zt(i),Ni(r)}},gl=function(e,n){var i;if(!this.has_pending_snippet()){this.parent&&Ee(i=this.parent,Ye,gl).call(i,e,n);return}xe(this,Ln,N(this,Ln)+e),N(this,Ln)===0&&(Ee(this,Ye,lr).call(this,n),N(this,ht)&&oi(N(this,ht),()=>{xe(this,ht,null)}),N(this,tn)&&(N(this,Lt).before(N(this,tn)),xe(this,tn,null)))},ml=function(e){N(this,xt)&&(dt(N(this,xt)),xe(this,xt,null)),N(this,ht)&&(dt(N(this,ht)),xe(this,ht,null)),N(this,St)&&(dt(N(this,St)),xe(this,St,null));let n=N(this,jt).failed;const i=r=>{const{reset:a,invoke_onerror:o}=Ee(this,Ye,vl).call(this,r);o(),n&&xe(this,St,Ee(this,Ye,Zr).call(this,()=>{try{return gt(()=>{var s=Pe;s.b=this,s.f|=tl,n(N(this,Lt),()=>r,()=>a)})}catch(s){return rn(s,N(this,vt).parent),null}}))};It(()=>{var r;try{r=this.transform_error(e)}catch(a){rn(a,N(this,vt)&&N(this,vt).parent);return}r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(i,a=>rn(a,N(this,vt)&&N(this,vt).parent)):i(r)})};let ra=!0;function zr(t){ra=t}function J(t,e){var n=e==null?"":typeof e=="object"?`${e}`:e;n!==(t[nr]??(t[nr]=t.nodeValue))&&(t[nr]=n,t.nodeValue=`${n}`)}function Nt(t,e){return $d(t,e)}const Hr=new Map;function $d(t,{target:e,anchor:n,props:i={},events:r,context:a,intro:o=!0,transformError:s}){Td();var c=void 0,u=Ad(()=>{var f=n??e.appendChild(Qt());Fl(f,{pending:()=>{}},h=>{re({});var g=Ze;a&&(g.c=a),r&&(i.$$events=r),ra=o,c=t(h,i)||Ml(),ra=!0,ae()},s);var d=new Set,v=h=>{for(var g=0;g<h.length;g++){var m=h[g];if(!d.has(m)){d.add(m);var p=Fd(m);for(const T of[e,document]){var w=Hr.get(T);w===void 0&&(w=new Map,Hr.set(T,w));var b=w.get(m);b===void 0?(T.addEventListener(m,fl,{passive:p}),w.set(m,1)):w.set(m,b+1)}}}};return v(ka(ac)),dl.add(v),()=>{var p;for(var h of d)for(const w of[e,document]){var g=Hr.get(w),m=g.get(h);--m==0?(w.removeEventListener(h,fl),g.delete(h),g.size===0&&Hr.delete(w)):g.set(h,m)}dl.delete(v),f!==n&&((p=f.parentNode)==null||p.removeChild(f))}});return pl.set(c,u),c}let pl=new WeakMap;function Zn(t,e){const n=pl.get(t);return n?(pl.delete(t),n(e)):Promise.resolve()}var Ut,nn,Tt,li,kr,xr,ma;class Ki{constructor(e,n=!0){_t(this,"anchor");we(this,Ut,new Map);we(this,nn,new Map);we(this,Tt,new Map);we(this,li,new Set);we(this,kr,!0);we(this,xr,e=>{if(N(this,Ut).has(e)){var n=N(this,Ut).get(e),i=N(this,nn).get(n);if(i)ia(i),N(this,li).delete(n);else{var r=N(this,Tt).get(n);r&&(ia(r.effect),N(this,nn).set(n,r.effect),N(this,Tt).delete(n),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),i=r.effect)}for(const[a,o]of N(this,Ut)){if(N(this,Ut).delete(a),a===e)break;const s=N(this,Tt).get(o);s&&(dt(s.effect),N(this,Tt).delete(o))}for(const[a,o]of N(this,nn)){if(a===n||N(this,li).has(a))continue;const s=()=>{if(Array.from(N(this,Ut).values()).includes(a)){var u=document.createDocumentFragment();zl(o,u),u.append(Qt()),N(this,Tt).set(a,{effect:o,fragment:u})}else dt(o);N(this,li).delete(a),N(this,nn).delete(a)};N(this,kr)||!i?(N(this,li).add(a),oi(o,s,!1)):s()}}});we(this,ma,e=>{N(this,Ut).delete(e);const n=Array.from(N(this,Ut).values());for(const[i,r]of N(this,Tt))n.includes(i)||(dt(r.effect),N(this,Tt).delete(i))});this.anchor=e,xe(this,kr,n)}ensure(e,n){var i=ge,r=Bs();if(n&&!N(this,nn).has(e)&&!N(this,Tt).has(e))if(r){var a=document.createDocumentFragment(),o=Qt();a.append(o),N(this,Tt).set(e,{effect:gt(()=>n(o)),fragment:a})}else N(this,nn).set(e,gt(()=>n(this.anchor)));if(N(this,Ut).set(i,e),r){for(const[s,c]of N(this,nn))s===e?i.unskip_effect(c):i.skip_effect(c);for(const[s,c]of N(this,Tt))s===e?i.unskip_effect(c.effect):i.skip_effect(c.effect);i.oncommit(N(this,xr)),i.ondiscard(N(this,ma))}else N(this,xr).call(this,i)}}Ut=new WeakMap,nn=new WeakMap,Tt=new WeakMap,li=new WeakMap,kr=new WeakMap,xr=new WeakMap,ma=new WeakMap;const ef=0,To=1,tf=2;function Sn(t,e,n,i,r){var a=hi(),o=it,s=a?dn(o):sl(o,!1,!1),c=a?dn(o):sl(o,!1,!1),u=new Ki(t);In(()=>{var f=ge,d=e(),v=!1;if(Au(d)){var h=Es(),g=!1;const m=p=>{if(!v){g=!0,h(!1),ge===f&&f.deactivate(),Vn.ensure();try{p()}finally{hr(!1),ki||Ls()}}};d.then(p=>{m(()=>{wn(s,p),u.ensure(To,i&&(w=>i(w,s)))})},p=>{m(()=>{if(wn(c,p),u.ensure(tf,r&&(w=>r(w,c))),!r)throw c.v})}),It(()=>{g||m(()=>{u.ensure(ef,n)})})}else wn(s,d),u.ensure(To,i&&(m=>i(m,s)));return()=>{v=!0}})}function Z(t,e,n=!1){var i=new Ki(t),r=n?un:0;function a(o,s){i.ensure(o,s)}In(()=>{var o=!1;e((s,c=0)=>{o=!0,a(c,s)}),o||a(-1,null)},r)}const nf=Symbol("NaN");function Yi(t,e,n){var i=new Ki(t),r=!hi();In(()=>{var a=e();a!==a&&(a=nf),r&&a!==null&&typeof a=="object"&&(a={}),i.ensure(a,n)})}function Ue(t,e){return e}function rf(t,e,n){for(var i=[],r=e.length,a,o=e.length,s=0;s<r;s++){let d=e[s];oi(d,()=>{if(a){if(a.pending.delete(d),a.done.add(d),a.pending.size===0){var v=t.outrogroups;_l(t,ka(a.done)),v.delete(a),v.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var c=i.length===0&&n!==null&&t.pending.size===0;if(c){var u=n,f=u.parentNode;Ed(f),f.append(u),t.items.clear()}_l(t,e,!c)}else a={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(a)}function _l(t,e,n=!0){var i;if(t.pending.size>0){i=new Set;for(const o of t.pending.values())for(const s of o)i.add(t.items.get(s).e)}for(var r=0;r<e.length;r++){var a=e[r];if(i!=null&&i.has(a)){a.f|=an;const o=document.createDocumentFragment();zl(a,o)}else dt(e[r],n)}}var Eo;function ze(t,e,n,i,r,a=null){var o=t,s=new Map,c=(e&gs)!==0;if(c){var u=t;o=u.appendChild(Qt())}var f=null,d=xa(()=>{var T=n();return ba(T)?T:T==null?[]:ka(T)}),v,h=new Map,g=!0;function m(T){b.effect.f&pt||(b.pending.delete(T),b.fallback=f,af(b,v,o,e,i),f!==null&&(v.length===0?f.f&an?(f.f^=an,or(f,null,o)):ia(f):oi(f,()=>{f=null})))}function p(T){b.pending.delete(T)}var w=In(()=>{v=l(d);for(var T=v.length,S=new Set,A=ge,E=Bs(),P=0;P<T;P+=1){var q=v[P],F=i(q,P),j=g?null:s.get(F);j?(j.v&&wn(j.v,q),j.i&&wn(j.i,P),E&&A.unskip_effect(j.e)):(j=lf(s,g?o:Eo??(Eo=Qt()),q,F,P,r,e,n),g||(j.e.f|=an),s.set(F,j)),S.add(F)}if(T===0&&a&&!f&&(g?f=gt(()=>a(o)):(f=gt(()=>a(Eo??(Eo=Qt()))),f.f|=an)),T>S.size&&ed(),!g)if(h.set(A,S),E){for(const[M,D]of s)S.has(M)||A.skip_effect(D.e);A.oncommit(m),A.ondiscard(p)}else m(A);l(d)}),b={effect:w,items:s,pending:h,outrogroups:null,fallback:f};g=!1}function tr(t){for(;t!==null&&!(t.f&qt);)t=t.next;return t}function af(t,e,n,i,r){var j,M,D,L,V,W,z,O,H;var a=(i&Nu)!==0,o=e.length,s=t.items,c=tr(t.effect.first),u,f=null,d,v=[],h=[],g,m,p,w;if(a)for(w=0;w<o;w+=1)g=e[w],m=r(g,w),p=s.get(m).e,p.f&an||((M=(j=p.nodes)==null?void 0:j.a)==null||M.measure(),(d??(d=new Set)).add(p));for(w=0;w<o;w+=1){if(g=e[w],m=r(g,w),p=s.get(m).e,t.outrogroups!==null)for(const U of t.outrogroups)U.pending.delete(p),U.done.delete(p);if(p.f&mt&&(ia(p),a&&((L=(D=p.nodes)==null?void 0:D.a)==null||L.unfix(),(d??(d=new Set)).delete(p))),p.f&an)if(p.f^=an,p===c)or(p,null,n);else{var b=f?f.next:c;p===t.effect.last&&(t.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),An(t,f,p),An(t,p,b),or(p,b,n),f=p,v=[],h=[],c=tr(f.next);continue}if(p!==c){if(u!==void 0&&u.has(p)){if(v.length<h.length){var T=h[0],S;f=T.prev;var A=v[0],E=v[v.length-1];for(S=0;S<v.length;S+=1)or(v[S],T,n);for(S=0;S<h.length;S+=1)u.delete(h[S]);An(t,A.prev,E.next),An(t,f,A),An(t,E,T),c=T,f=E,w-=1,v=[],h=[]}else u.delete(p),or(p,c,n),An(t,p.prev,p.next),An(t,p,f===null?t.effect.first:f.next),An(t,f,p),f=p;continue}for(v=[],h=[];c!==null&&c!==p;)(u??(u=new Set)).add(c),h.push(c),c=tr(c.next);if(c===null)continue}p.f&an||v.push(p),f=p,c=tr(p.next)}if(t.outrogroups!==null){for(const U of t.outrogroups)U.pending.size===0&&(_l(t,ka(U.done)),(V=t.outrogroups)==null||V.delete(U));t.outrogroups.size===0&&(t.outrogroups=null)}if(c!==null||u!==void 0){var P=[];if(u!==void 0)for(p of u)p.f&mt||P.push(p);for(;c!==null;)!(c.f&mt)&&c!==t.fallback&&P.push(c),c=tr(c.next);var q=P.length;if(q>0){var F=i&gs&&o===0?n:null;if(a){for(w=0;w<q;w+=1)(z=(W=P[w].nodes)==null?void 0:W.a)==null||z.measure();for(w=0;w<q;w+=1)(H=(O=P[w].nodes)==null?void 0:O.a)==null||H.fix()}rf(t,P,F)}}a&&It(()=>{var U,Y;if(d!==void 0)for(p of d)(Y=(U=p.nodes)==null?void 0:U.a)==null||Y.apply()})}function lf(t,e,n,i,r,a,o,s){var c=o&Du?o&Ou?dn(n):sl(n,!1,!1):null,u=o&Ru?dn(r):null;return{v:c,i:u,e:gt(()=>(a(e,c??n,u??r,s),()=>{t.delete(i)}))}}function or(t,e,n){if(t.nodes)for(var i=t.nodes.start,r=t.nodes.end,a=e&&!(e.f&an)?e.nodes.start:n;i!==null;){var o=Mr(i);if(a.before(i),i===r)return;i=o}}function An(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function sc(t,e,n=!1,i=!1,r=!1,a=!1){var o=t,s="";if(n)var c=t;G(()=>{var u=Pe;if(s!==(s=e()??"")){if(n&&!_s){u.nodes=null,c.innerHTML=s,s!==""&&Wn(Zt(c),c.lastChild);return}if(u.nodes!==null&&(Zs(u.nodes.start,u.nodes.end),u.nodes=null),s!==""){var f=i?ps:r?Ku:void 0,d=Sa(i?"svg":r?"math":"template",f);d.innerHTML=s;var v=i||r?d:d.content;if(Wn(Zt(v),v.lastChild),i||r)for(;Zt(v);)o.before(Zt(v));else o.before(v)}}})}function nt(t,e,...n){var i=new Ki(t);In(()=>{const r=e()??null;i.ensure(r,r&&(a=>r(a,...n)))},un)}function aa(t,e,n){var i=new Ki(t);In(()=>{var r=e()??null;i.ensure(r,r&&(a=>n(a,r)))},un)}const of=()=>performance.now(),yn={tick:t=>requestAnimationFrame(t),now:()=>of(),tasks:new Set};function cc(){const t=yn.now();yn.tasks.forEach(e=>{e.c(t)||(yn.tasks.delete(e),e.f())}),yn.tasks.size!==0&&yn.tick(cc)}function sf(t){let e;return yn.tasks.size===0&&yn.tick(cc),{promise:new Promise(n=>{yn.tasks.add(e={c:t,f:n})}),abort(){yn.tasks.delete(e)}}}function Fr(t,e){Pn(()=>{t.dispatchEvent(new CustomEvent(e))})}function cf(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function Po(t){const e={},n=t.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=cf(r.trim());e[o]=a.trim()}return e}const uf=t=>t;let uc=null;function Io(t){uc=t}function df(t,e,n){var i=uc??Pe,r=i.nodes,a,o,s,c=null;r.a??(r.a={element:t,measure(){a=this.element.getBoundingClientRect()},apply(){if(s==null||s.abort(),o=this.element.getBoundingClientRect(),a.left!==o.left||a.right!==o.right||a.top!==o.top||a.bottom!==o.bottom){const u=e()(this.element,{from:a,to:o},n==null?void 0:n());s=la(this.element,u,void 0,1,()=>{},()=>{s==null||s.abort(),s=void 0})}},fix(){if(!t.getAnimations().length){var{position:u,width:f,height:d}=getComputedStyle(t);if(u!=="absolute"&&u!=="fixed"){var v=t.style;c={position:v.position,width:v.width,height:v.height,transform:v.transform},v.position="absolute",v.width=f,v.height=d;var h=t.getBoundingClientRect();if(a.left!==h.left||a.top!==h.top){var g=`translate(${a.left-h.left}px, ${a.top-h.top}px)`;v.transform=v.transform?`${v.transform} ${g}`:g}}}},unfix(){if(c){var u=t.style;u.position=c.position,u.width=c.width,u.height=c.height,u.transform=c.transform}}}),r.a.element=t}function qe(t,e,n,i){var T;var r=(t&Vu)!==0,a=(t&Wu)!==0,o=r&&a,s=(t&Uu)!==0,c=o?"both":r?"in":"out",u,f=e.inert,d=e.style.overflow,v,h;function g(){return Pn(()=>u??(u=n()(e,(i==null?void 0:i())??{},{direction:c})))}var m={is_global:s,in(){var S;if(e.inert=f,!r){h==null||h.abort(),(S=h==null?void 0:h.reset)==null||S.call(h);return}a||v==null||v.abort(),v=la(e,g(),h,1,()=>{Fr(e,"introstart")},()=>{Fr(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=d})},out(S){if(!a){S==null||S(),u=void 0;return}e.inert=!0,h=la(e,g(),v,0,()=>{Fr(e,"outrostart")},()=>{Fr(e,"outroend"),S==null||S()})},stop:()=>{v==null||v.abort(),h==null||h.abort()}},p=Pe;if(((T=p.nodes).t??(T.t=[])).push(m),r&&ra){var w=s;if(!w){for(var b=p.parent;b&&b.f&un;)for(;(b=b.parent)&&!(b.f&Dt););w=!b||(b.f&vi)!==0}w&&Gn(()=>{Ct(()=>m.in())})}}function la(t,e,n,i,r,a){var o=i===1,s=!1;if(pi(e)){var c;return It(()=>{if(!s){var m=e({direction:o?"in":"out"});c=la(t,m,n,i,r,a)}}),{abort:()=>{s=!0,c==null||c.abort()},deactivate:()=>c.deactivate(),reset:()=>c.reset(),t:()=>c.t()}}if(n==null||n.deactivate(),!(e!=null&&e.duration)&&!(e!=null&&e.delay))return r(),a(),{abort:Pt,deactivate:Pt,reset:Pt,t:()=>i};const{delay:u=0,css:f,tick:d,easing:v=uf}=e;var h,g=()=>1-i;return It(()=>{if(!s){var m=[];if(o&&n===void 0&&(d&&d(0,1),f)){var p=Po(f(0,1));m.push(p,p)}h=t.animate(m,{duration:u,fill:"forwards"}),h.onfinish=()=>{h.cancel(),r();var w=(n==null?void 0:n.t())??1-i;n==null||n.abort();var b=i-w,T=e.duration*Math.abs(b),S=[];if(T>0){var A=!1;if(f)for(var E=Math.ceil(T/16.666666666666668),P=0;P<=E;P+=1){var q=w+b*v(P/E),F=Po(f(q,1-q));S.push(F),A||(A=F.overflow==="hidden")}A&&(t.style.overflow="hidden"),g=()=>{var j=h.currentTime;return w+b*v(j/T)},d&&sf(()=>{if(h.playState!=="running")return!1;var j=g();return d(j,1-j),!0})}h=t.animate(S,{duration:T,fill:"forwards"}),h.onfinish=()=>{g=()=>i,d==null||d(i,1-i),a()}}}}),{abort:()=>{s=!0,h&&(h.cancel(),h.effect=null,h.onfinish=Pt)},deactivate:()=>{a=Pt},reset:()=>{i===0&&(d==null||d(1,0))},t:()=>g()}}function dc(t,e,n,i,r,a){var o=null,s=t,c=Pe,u=new Ki(s,!1);In(()=>{const f=e()||null;var d=f==="svg"?ps:void 0;if(f===null){u.ensure(null,null),zr(!0);return}return u.ensure(f,v=>{if(f){if(o=Sa(f,d),Wn(o,o),i){var h=null,g=o.appendChild(Qt());Io(c),i(o,g),h==null||h.remove(),Io(null)}Pe.nodes.end=o,v.before(o)}}),zr(!0),()=>{f&&zr(!1)}},un),Lr(()=>{zr(!0)})}function fc(t,e){var n;n=document.head.appendChild(Qt());try{In(()=>{var i=gt(()=>e(n));i.f|=ds,_s||(i.nodes===null?i.nodes={start:n,end:n,a:null,t:null}:i.nodes.end=n)})}finally{}}function bt(t,e,n){Gn(()=>{var i=Ct(()=>e(t,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};jr(()=>{var o=n();rc(o),r&&ws(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function oa(t,e){var n=void 0,i;Us(()=>{n!==(n=e())&&(i&&(dt(i),i=null),n&&(i=gt(()=>{Gn(()=>n(t))})))})}function vc(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=vc(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function ff(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=vc(t))&&(i&&(i+=" "),i+=e);return i}function vf(t){return typeof t=="object"?ff(t):t??""}const Co=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function hf(t,e,n){var i=t==null?"":""+t;if(e&&(i=i?i+" "+e:e),n){for(var r of Object.keys(n))if(n[r])i=i?i+" "+r:r;else if(i.length)for(var a=r.length,o=0;(o=i.indexOf(r,o))>=0;){var s=o+a;(o===0||Co.includes(i[o-1]))&&(s===i.length||Co.includes(i[s]))?i=(o===0?"":i.substring(0,o))+i.substring(s+1):o=s}}return i===""?null:i}function Ao(t,e=!1){var n=e?" !important;":";",i="";for(var r of Object.keys(t)){var a=t[r];a!=null&&a!==""&&(i+=" "+r+": "+a+n)}return i}function Fa(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function gf(t,e){if(e){var n="",i,r;if(Array.isArray(e)?(i=e[0],r=e[1]):i=e,t){t=String(t).replaceAll(/\/\*.*?\*\//g,"").trim();var a=!1,o=0,s=!1,c=[];i&&c.push(...Object.keys(i).map(Fa)),r&&c.push(...Object.keys(r).map(Fa));var u=0,f=-1;const m=t.length;for(var d=0;d<m;d++){var v=t[d];if(s?v==="/"&&t[d-1]==="*"&&(s=!1):a?a===v&&(a=!1):v==="/"&&t[d+1]==="*"?s=!0:v==='"'||v==="'"?a=v:v==="("?o++:v===")"&&o--,!s&&a===!1&&o===0){if(v===":"&&f===-1)f=d;else if(v===";"||d===m-1){if(f!==-1){var h=Fa(t.substring(u,f).trim());if(!c.includes(h)){v!==";"&&d++;var g=t.substring(u,d).trim();n+=" "+g+";"}}u=d+1,f=-1}}}}return i&&(n+=Ao(i)),r&&(n+=Ao(r,!0)),n=n.trim(),n===""?null:n}return t==null?null:String(t)}function _e(t,e,n,i,r,a){var o=t[nl];if(o!==n||o===void 0){var s=hf(n,i,a);s==null?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s),t[nl]=n}else if(a&&r!==a)for(var c in a){var u=!!a[c];(r==null||u!==!!r[c])&&t.classList.toggle(c,u)}return a}function Ba(t,e={},n,i){for(var r in n){var a=n[r];e[r]!==a&&(n[r]==null?t.style.removeProperty(r):t.style.setProperty(r,a,i))}}function rt(t,e,n,i){var r=t[il];if(r!==e){var a=gf(e,i);a==null?t.removeAttribute("style"):t.style.cssText=a,t[il]=e}else i&&(Array.isArray(i)?(Ba(t,n==null?void 0:n[0],i[0]),Ba(t,n==null?void 0:n[1],i[1],"important")):Ba(t,n,i));return i}function Bl(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Mo(t,e){var n=!("__defaultValue"in t);!n&&t.__defaultValue===e||(t.__defaultValue=e,hc(t,!n||"__value"in t))}function hc(t,e){var n=t.__defaultValue,i=t.multiple,r=i?n??[]:null;if(!(i&&!ba(r))){var a=t.selectedIndex,o=e&&i?new Set(t.selectedOptions):null;for(var s of t.options){var c=xi(s);Bl(s,i?r.includes(c):qs(c,n))}if(e)if(o!==null)for(s of t.options){var u=o.has(s);s.selected!==u&&(s.selected=u)}else t.selectedIndex!==a&&(t.selectedIndex=a)}}function sa(t,e,n=!1){if(t.multiple){if(e==null)return;if(!ba(e))return Qu();for(var i of t.options)i.selected=e.includes(xi(i));return}for(i of t.options){var r=xi(i);if(qs(r,e)){i.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function gc(t){var e=new MutationObserver(n=>{n.every(pf)||("__defaultValue"in t&&hc(t,!1),"__value"in t&&sa(t,t.__value))});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Lr(()=>{e.disconnect()})}function mf(t,e,n=e){var i=new WeakSet,r=!0;jl(t,"change",a=>{var o=a?"[selected]":":checked",s;if(t.multiple)s=[].map.call(t.querySelectorAll(o),xi);else{var c=t.querySelector(o)??t.querySelector("option:not([disabled])");s=c&&xi(c)}n(s),t.__value=s,ge!==null&&i.add(ge)}),Gn(()=>{var a=e();if(t===document.activeElement){var o=ge;if(i.has(o))return}if(sa(t,a,r),r&&a===void 0){var s=t.querySelector(":checked");s!==null&&(a=xi(s),n(a))}t.__value=a,r=!1})}function xi(t){return"__value"in t?t.__value:t.value}function pf(t){if(t.target.closest("selectedcontent")!==null)return!0;if(t.type==="childList"){var e=[...t.addedNodes,...t.removedNodes];return e.length>0&&e.every(n=>n.nodeName==="SELECTEDCONTENT")}return!1}const yi=Symbol("class"),wi=Symbol("style"),mc=Symbol("is custom element"),pc=Symbol("is html"),_f=Cr?"input":"INPUT",yf=Cr?"option":"OPTION",_c=Cr?"select":"SELECT",wf=Cr?"progress":"PROGRESS";function bf(t,e){var n=Vl(t);n.value===(n.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!==wf)||(t.value=e??"")}function le(t,e,n,i){var r=Vl(t);r[e]!==(r[e]=n)&&(e==="loading"&&(t[Lu]=n),n==null?t.removeAttribute(e):typeof n!="string"&&wc(t).has(e)?t[e]=n:t.setAttribute(e,n))}function kf(t,e,n,i,r=!1,a=!1){var o=Vl(t),s=o[mc],c=!o[pc],u=e||{},f=t.nodeName===yf,d=t.nodeName===_c;for(var v in e)!(v in n)&&v[0]+v[1]!=="$$"&&(n[v]=null);n.class?n.class=vf(n.class):(i||n[yi])&&(n.class=null),n[wi]&&(n.style??(n.style=null));var h=wc(t);if(t.nodeName===_f&&"type"in n&&("value"in n||"__value"in n)){var g=n.type;(g!==u.type||g===void 0&&t.hasAttribute("type"))&&(u.type=g,le(t,"type",g))}for(const E in n){let P=n[E];if(f&&E==="value"&&P==null){t.value=t.__value="",u[E]=P;continue}if(E==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";_e(t,m,P,i,e==null?void 0:e[yi],n[yi]),u[E]=P,u[yi]=n[yi];continue}if(E==="style"){rt(t,P,e==null?void 0:e[wi],n[wi]),u[E]=P,u[wi]=n[wi];continue}var p=u[E];if(!(P===p&&!(P===void 0&&t.hasAttribute(E)))){u[E]=P;var w=E[0]+E[1];if(w!=="$$")if(w==="on"){const q={},F="$$"+E;let j=E.slice(2);var b=Od(j);if(Rd(j)&&(j=j.slice(0,-7),q.capture=!0),!b&&p){if(P!=null)continue;t.removeEventListener(j,u[F],q),u[F]=null}if(b)te(j,t,P),Se([j]);else if(P!=null){let M=function(D){u[E].call(this,D)};var A=M;u[F]=Hl(j,t,M,q)}}else if(E==="style")le(t,E,P);else if(E==="autofocus")hd(t,!!P);else if(!s&&(E==="__value"||E==="value"&&P!=null))t.value=t.__value=P;else if(E==="selected"&&f)Bl(t,P);else{var T=E;c||(T=zd(T));var S=T==="defaultValue"||T==="defaultChecked";if(d&&T==="defaultValue")continue;if(P==null&&!s&&!S)if(o[E]=null,T==="value"||T==="checked"){let q=t;const F=e===void 0;if(T==="value"){let j=q.defaultValue;q.removeAttribute(T),q.defaultValue=j,q.value=q.__value=F?j:null}else{let j=q.defaultChecked;q.removeAttribute(T),q.defaultChecked=j,q.checked=F?j:!1}}else t.removeAttribute(E);else S||(s||typeof P!="string")&&h.has(T)?(t[T]=P,T in o&&(o[T]=it)):typeof P!="function"&&le(t,T,P)}}}return u}function yc(t,e,n=[],i=[],r=[],a,o=!1,s=!1){Ts(r,n,i,c=>{var u=void 0,f={},d=t.nodeName===_c,v=!1;if(Us(()=>{var g=e(...c.map(l)),m=kf(t,u,g,a,o,s);if(v&&d){var p=t;"defaultValue"in g&&Mo(p,g.defaultValue),"value"in g&&sa(p,g.value)}for(let b of Object.getOwnPropertySymbols(f))g[b]||dt(f[b]);for(let b of Object.getOwnPropertySymbols(g)){var w=g[b];b.description===Yu&&(!u||w!==u[b])&&(f[b]&&dt(f[b]),f[b]=gt(()=>oa(t,()=>w))),m[b]=w}u=m}),d){var h=t;Gn(()=>{var g=u;"defaultValue"in g&&Mo(h,g.defaultValue),sa(h,g.value,!0),gc(h)})}v=!0})}function Vl(t){return t[Vr]??(t[Vr]={[mc]:t.nodeName.includes("-"),[pc]:t.namespaceURI===ms})}var Lo=new Map;function wc(t){var e=t.getAttribute("is")||t.nodeName,n=Lo.get(e);if(n)return n;Lo.set(e,n=new Set);for(var i,r=t,a=Element.prototype;a!==r;){i=cs(r);for(var o in i)i[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&n.add(o);r=Pl(r)}return n}function ui(t,e,n=e){var i=new WeakSet;jl(t,"input",async r=>{var a=r?t.defaultValue:t.value;if(a=Va(t)?Wa(a):a,n(a),ge!==null&&i.add(ge),await mr(),a!==(a=e())){var o=t.selectionStart,s=t.selectionEnd,c=t.value.length;if(t.value=a??"",s!==null){var u=t.value.length;o===s&&s===c&&u>c?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=o,t.selectionEnd=Math.min(s,u))}}}),Ct(e)==null&&t.value&&(n(Va(t)?Wa(t.value):t.value),ge!==null&&i.add(ge)),jr(()=>{var r=e();if(t===document.activeElement){var a=ge;if(i.has(a))return}Va(t)&&r===Wa(t.value)||t.type==="date"&&!r&&!t.value||r!==t.value&&(t.value=r??"")})}function xf(t,e,n=e){jl(t,"change",i=>{var r=i?t.defaultChecked:t.checked;n(r)}),Ct(e)==null&&n(t.checked),jr(()=>{var i=e();t.checked=!!i})}function Va(t){var e=t.type;return e==="number"||e==="range"}function Wa(t){return t===""?null:+t}var jn,ji,Sr,pa,bc;const _a=class _a{constructor(e){we(this,pa);we(this,jn,new WeakMap);we(this,ji);we(this,Sr);xe(this,Sr,e)}observe(e,n){var i=N(this,jn).get(e)||new Set;return i.add(n),N(this,jn).set(e,i),Ee(this,pa,bc).call(this).observe(e,N(this,Sr)),()=>{var r=N(this,jn).get(e);r.delete(n),r.size===0&&(N(this,jn).delete(e),N(this,ji).unobserve(e))}}};jn=new WeakMap,ji=new WeakMap,Sr=new WeakMap,pa=new WeakSet,bc=function(){return N(this,ji)??xe(this,ji,new ResizeObserver(e=>{for(var n of e){_a.entries.set(n.target,n);for(var i of N(this,jn).get(n.target)||[])i(n)}}))},_t(_a,"entries",new WeakMap);let yl=_a;var Sf=new yl({box:"border-box"});function At(t,e,n){var i=Sf.observe(t,()=>n(t[e]));Gn(()=>(Ct(()=>n(t[e])),i))}function Ua(t,e){return t===e||(t==null?void 0:t[on])===e}function $e(t=Ml(),e,n,i){var r=Ze.r,a=Pe;return Gn(()=>{var o,s;return jr(()=>{o=s,s=[],Ct(()=>{Ua(n(...s),t)||(e(t,...s),o&&Ua(n(...o),t)&&e(null,...o))})}),()=>{let c=a;for(;c!==r&&c.parent!==null&&c.parent.f&$r;)c=c.parent;const u=()=>{s&&Ua(n(...s),t)&&e(null,...s)},f=c.teardown;c.teardown=()=>{u(),f==null||f()}}}),t}function zi(t,e){md(window,["resize"],()=>Pn(()=>e(window[t])))}function Wl(t=!1){const e=Ze,n=e.l.u;if(!n)return;let i=()=>rc(e.s);if(t){let r=0,a={};const o=Oi(()=>{let s=!1;const c=e.s;for(const u in c)c[u]!==a[u]&&(a[u]=c[u],s=!0);return s&&r++,r});i=()=>l(o)}n.b.length&&Cd(()=>{jo(e,i),el(n.b)}),et(()=>{const r=Ct(()=>n.m.map(Mu));return()=>{for(const a of r)typeof a=="function"&&a()}}),n.a.length&&et(()=>{jo(e,i),el(n.a)})}function jo(t,e){if(t.l.s)for(const n of t.l.s)l(n);e()}let Br=!1;function Tf(t){var e=Br;try{return Br=!1,[t(),Br]}finally{Br=e}}const Ef={get(t,e){if(!t.exclude.has(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.has(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.has(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.has(e))}};function Ji(t,e,n){return new Proxy({props:t,exclude:e},Ef)}const Pf={get(t,e){let n=t.props.length;for(;n--;){let i=t.props[n];if(pi(i)&&(i=i()),typeof i=="object"&&i!==null&&e in i)return i[e]}},set(t,e,n){let i=t.props.length;for(;i--;){let r=t.props[i];pi(r)&&(r=r());const a=On(r,e);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(t,e){let n=t.props.length;for(;n--;){let i=t.props[n];if(pi(i)&&(i=i()),typeof i=="object"&&i!==null&&e in i){const r=On(i,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===on||e===hs)return!1;for(let n of t.props)if(pi(n)&&(n=n()),n!=null&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props)if(pi(n)&&(n=n()),!!n){for(const i in n)e.includes(i)||e.push(i);for(const i of Object.getOwnPropertySymbols(n))e.includes(i)||e.push(i)}return e}};function Tn(...t){return new Proxy({props:t},Pf)}function I(t,e,n,i){var S;var r=!Zi||(n&zu)!==0,a=(n&Fu)!==0,o=(n&Bu)!==0,s=i,c=!0,u=void 0,f=()=>o&&r?(u??(u=Oi(i)),l(u)):(c&&(c=!1,s=o?Ct(i):i),s);let d;if(a){var v=on in t||hs in t;d=((S=On(t,e))==null?void 0:S.set)??(v&&e in t?A=>t[e]=A:void 0)}var h,g=!1;a?[h,g]=Tf(()=>t[e]):h=t[e],h===void 0&&i!==void 0&&(h=f(),d&&(r&&ad(),d(h)));var m;if(r?m=()=>{var A=t[e];return A===void 0?f():(c=!0,A)}:m=()=>{var A=t[e];return A!==void 0&&(s=void 0),A===void 0?s:A},r&&!(n&Hu))return m;if(d){var p=t.$$legacy;return function(A,E){return arguments.length>0?((!r||!E||p||g)&&d(E?m():A),A):m()}}var w=!1,b=(n&qu?Oi:xa)(()=>(w=!1,m()));a&&l(b);var T=Pe;return function(A,E){if(arguments.length>0){const P=E?l(b):r&&a?Ne(A):A;return R(b,P),w=!0,s!==void 0&&(s=P),A}return xn&&w||T.f&pt?b.v:l(b)}}function lt(t){Ze===null&&Al(),Zi&&Ze.l!==null?If(Ze).m.push(t):et(()=>{const e=Ct(t);if(typeof e=="function")return e})}function Rr(t){Ze===null&&Al(),lt(()=>()=>Ct(t))}function If(t){var e=t.l;return e.u??(e.u={a:[],b:[],m:[]})}const Cf="5";var os;typeof window<"u"&&((os=window.__svelte??(window.__svelte={})).v??(os.v=new Set)).add(Cf);function vn(){var t;return(t=window.PlayPilotLinkInjections)==null?void 0:t.token}const kc="https://www.playpilot.com",Af="https://partner-api.playpilot.tech/1.0",Mf="https://img-external.playpilot.tech",Lf="https://cdn.jsdelivr.net/npm/@playpilot/tpi@8.41.0",Hi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",Un=600,Ga={};async function Ht(t,{headers:e={},method:n="GET",body:i=null,baseUrl:r=Af}={}){const a=!Ta()&&n==="GET";if(a&&t in Ga)return Ga[t];const o=n==="GET"?{}:{"Content-Type":"application/json"},s=await fetch(r+t,{method:n,headers:new Headers({...o,...e}),body:i?JSON.stringify(i):null});if(!(s!=null&&s.ok))throw s;const c=await s.text();let u=c;try{c&&(u=JSON.parse(c))}catch{}return a&&(Ga[t]=u),u}const Ul="EncryptedToken",xc="articleReplacementEditToken",Sc="playpilot-editorial-mode";async function Tc({href:t=window.location.href,throwError:e=!1}={}){try{const n=vn();if(!n)throw new Error("No token was provided");const i=Gl(t);if(!i)throw new Error("Could not be authenticated");return await Ht(`/external-pages/edit-authorization?api-token=${n}`,{method:"POST",body:{private_token:i}}),jf(i),!0}catch(n){if(console.error(n),e)throw n}finally{Nf()}return!1}function Gl(t=""){var i,r;const e=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(e)return e;if(t){const a=new URL(t).searchParams.get(xc);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${Ul}=`).pop())==null?void 0:r.split(";")[0])||""}function jf(t){const e=new Date;e.setTime(e.getTime()+30*24*60*60*1e3);const i="expires="+e.toUTCString();document.cookie=Ul+"="+t+";"+i+";path=/"}function Df(){document.cookie=Ul+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function Ta(){var e;const t=(e=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:e.editorial_token;return new URLSearchParams(window.location.search).get(Sc)==="true"||!!t}function Rf(){const t=new URL(window.location.href);t.searchParams.set(Sc,"true"),window.history.replaceState({},"",t)}function Nf(){const t=new URL(window.location.href);t.searchParams.delete(xc),window.history.replaceState({},"",t)}function Of(t){let e=0;for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);e=e*31+i>>>0}return e.toString(16)}function Nr(t=5){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(;n.length<t;)n+=e[Math.floor(Math.random()*e.length)];return n}const _={English:"en-US",Swedish:"sv-SE",Danish:"da-DK"};function Or(){var i,r;const t=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,e=Object.values(_);if(t){if(e.includes(t))return t;console.warn(`PlayPilot Link Injections: ${t} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");if(n){if(e.includes(n))return n;const a=e.find(o=>o.toLowerCase().startsWith(n+"-"));if(a)return a}return _.English}function Zl(t,e=""){const n=[],i=[t];for(;i.length>0;){const r=i.pop();if(n.includes(r)||e&&r.matches(e)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|FIGCAPTION|TIME|LABEL|BLOCKQUOTE|H1|H2|H3|H4|H5)$/.test(r.tagName)||r.offsetWidth<=1)continue;const a=Array.from(r.childNodes).some(c=>{var u;return c.nodeType===Node.TEXT_NODE&&((u=c.nodeValue)==null?void 0:u.trim())!==""});if(a&&r.tagName==="LI"){const c=r.closest("ul, ol");c&&!n.includes(c)&&n.push(c);continue}const o=r.tagName==="P"&&!!r.textContent;if(a||o){n.push(r);continue}const s=Array.from(r.children);for(let c=s.length-1;c>=0;c--)i.push(s[c])}return n}function Fi(){var e;const t=(e=window.PlayPilotLinkInjections)==null?void 0:e.selector;if(t){const n=t.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function Ec(t){return t.map(e=>e.innerText).join(`
|
|
4
4
|
|
|
5
|
-
`)}function Vi(t=(e=>(e=window.PlayPilotLinkInjections)==null?void 0:e.config)()||null){const n=Bi(),i=Jl(n,(t==null?void 0:t.exclude_elements_selector)||""),r=Pc(i);return{parentElement:n,elements:i,pageText:r}}function Ic(){const t=Bi();return{content_heading:Hf(t),content_modified_time:Ff(t),content_published_time:Bf(t)}}function Hf(t){const e=t.querySelector("h1")||document.querySelector("h1");return(e==null?void 0:e.innerText.trim())||null}function Ff(t){const e=document.querySelector('meta[property*="modified_time"]')||document.querySelector('meta[name*="modified_time"]')||t.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,n=Ac().dateModified||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return n?Ql(n):null}function Bf(t){const e=document.querySelector('meta[property*="published_time"]')||document.querySelector('meta[name*="published_time"]')||t.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||t.querySelector("time")||document.querySelector("time")||t.querySelector("[datetime]")||document.querySelector("[datetime]")||null,n=Ac().datePublished||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return n?Ql(n):null}function Ql(t){try{return new Date(t).toISOString()}catch{return null}}function Ac(){const e=Array.from(document.querySelectorAll('[type="application/ld+json"]')).find(n=>n.textContent.includes("dateModified")||n.textContent.includes("datePublished"));if(!e)return{};try{return JSON.parse(e.textContent||"")}catch{return{}}}function si(){const t=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+t}function Vf(){try{const t=new URL(location.href);return Object.fromEntries(t.searchParams.entries())}catch{return{}}}function Cc(t){return Object.entries(t).filter(([n,i])=>i!=null&&i!=="").map(([n,i])=>`${n}=${i}`).join("&")}function Wf(t){return!!(t.exclude_urls_pattern&&si().match(new RegExp(t.exclude_urls_pattern)))}let Ja=null;async function Fn({url:t=si(),params:e={},method:n="GET"}={}){const i=vn(),r=Ea()?await Ec():!1,a=qr();if(!i)throw new Error("No token was provided");const o=`/external-pages/?api-token=${i}&include_title_details=true&include_participant_details=true${r?"&editorial_mode_enabled=true":""}&language=${a}`;let s;if(n==="POST"){const{pageText:c}=Vi();e.run_ai&&(e.hash=zf(c||""),e.page_text=c),e.url=t,e.metadata=Ic(),s=await Ht(o,{method:"POST",body:e})}else s=await Ht(o+`&url=${t}`,{method:"GET"});return window.PlayPilotLinkInjections.last_successful_fetch=s,s}async function Ro({requireCompletedResult:t=!1,runAiWhenRelevant:e=!1,pollInterval:n=3e3,maxTries:i=600,onpoll:r=()=>null}={}){let a=0;Ja&&clearTimeout(Ja);const o=async(s,c)=>{let u;try{try{u=await Fn()}catch(h){throw console.error(h),(h==null?void 0:h.status)===404&&(u=await Fn({method:"POST"}),u.ai_enabled&&(u=await Fn({params:{run_ai:!0},method:"POST"}))),new Error}const{pageText:d}=Vi();if(u&&e&&(u=await Uf(d,u)),t&&u.ai_enabled&&u.ai_running)throw new Error;u.manual_injections=No(u.manual_injections||[]),u.ai_injections=No(u.ai_injections||[]),s(u);return}catch{if(a++,a>=i){i>1&&console.error("Max poll limit exceeded. Please return later."),s();return}u&&r(u),Ja=setTimeout(()=>o(s),n)}};return new Promise(o)}async function Uf(t,e){if(!t||!e.ai_enabled||e.ai_running)return e;const n=async()=>await Fn({params:{run_ai:!0},method:"POST"}),i=Ic().content_modified_time,r=e.content_modified_time?Ql(e.content_modified_time):null,a=i&&r===i;if(i&&e.ai_last_run&&e.ai_progress_message==="Failed"){const o=new Date(Date.now()-6e5);if(new Date().getTime()-new Date(i).getTime()<864e5&&new Date(e.ai_last_run)<o)return await n()}return e.ai_last_run&&a||new Date(i||0)<=new Date(r||0)?e:await n()}async function Gf(t){var a;const e=(a=window.PlayPilotLinkInjections)==null?void 0:a.selector,i=t.filter(o=>o.manual).map(o=>({sid:o.sid,title:o.title,sentence:o.sentence,phrase_before:o.phrase_before,phrase_after:o.phrase_after,playpilot_url:o.playpilot_url,after_article:!!o.after_article,after_article_style:o.after_article_style||null,in_text:o.in_text??!0,inactive:!!o.inactive,removed:!!o.removed,type:o.type}));if(!await Fn({method:"POST",params:{private_token:Yl(),manual_injections:i,content_text_selector:e}}))throw new Error("saveLinkInjections response was faulty");return t}function No(t){return t.map(e=>({...e,key:Mc(e.sid)}))}function Mc(t){return t+"-"+Or()}function Zf(t,e,n){return t.filter(i=>n.every(r=>i[r]===e[r])).length}function Kf(t,e){return e.some(n=>t>=n.start&&t<n.end)}function Lc(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function Xl(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||""}function Oo(t,e,n=[]){var a,o;const i=document.createTreeWalker(e);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(t)&&!n.includes(((o=r.parentNode)==null?void 0:o.nodeName)||"")););return r}function qo(t){const e=t.parentNode;return e?e.nodeName==="A"||!!e.closest("a"):!1}function Yf(t,e,n,i){const r=Lc(e),a=Xl(e),o=t.slice(0,i),s=t.slice(i),c=/[-/\\^$*+?.()|[\]{}]/g,u=new RegExp(`${a.replace(c,"\\$&")}|${r.replace(c,"\\$&")}`),d=s.replace(u,n);return o+d}function Jf(t,e,n,i){return t.substring(0,n)+e+t.substring(i)}function yt(t){return Xl(t).toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").replace(/[^a-z0-9]+/g,"")}function jc(t,e,n){const r=t.indexOf(e),a=Math.floor((n-e.length)/2);let o=Math.max(0,r-a),s=o+n;s>t.length&&(s=t.length,o=Math.max(0,s-n));let c=t.slice(o,s).trim();return o>0&&(c="…"+c),s<t.length&&(c+="…"),c}function Dc(t,e,n){const i=t.nodeType===Node.TEXT_NODE&&t.parentNode?t.parentElement:t;if(!i||!t.textContent)return{before:"",after:""};const r=Math.max(i.innerText.indexOf(t.textContent),0),a=zo(i.innerText.slice(0,e+r)),o=i.innerText.slice(n+r),s=zo(Ho(a,2)),c=Ho(o,2);return{before:s,after:c}}function zo(t){return t.split("").reverse().join("")}function Ho(t,e=1){const n=t.match(/[^\s]+/g);return n?n.slice(0,e).join(" ").replace(/[.,!?;:]+$/u,""):""}function ua(t,e){let n=0,i=0;for(;(i=t.indexOf(e,i))!==-1;)n++,i+=e.length;return n}function Qf(t,e,n){const i=[];let r=0;for(;r<=t.length;){const a=e?t.indexOf(e,r):r;if(a===-1&&e)break;const o=e?a+e.length:a,s=n?t.indexOf(n,o):t.length;if(n&&s===-1)break;const c=t.slice(o,s);i.push({match:c,index:o}),r=n?s+n.length:t.length+1}return i}function Xf(t,e,n,i){const a=Qf(t,n,i).filter(({match:s})=>Xl(s).includes(e));return a.length?a.reduce((s,c)=>!s||c.match.length<s.match.length?c:s):null}function $f(t){var e,n;return{leadingSpaces:((e=t.match(/^\s*/))==null?void 0:e[0].length)||0,trailingSpaces:((n=t.match(/\s*$/))==null?void 0:n[0].length)||0}}function ev(t,e,n=0){const i=e.innerHTML,r=[],a=tv(e);let o=i.indexOf(t);for(;o!==-1;)Kf(o,a)&&r.push(o),o=i.indexOf(t,o+t.length);return r[n]??-1}function tv(t){const e=[],n=t.innerHTML;let i=!1,r=!1,a=!1,o=0;for(let s=0;s<n.length;s++){const c=n[s];if(!r&&!i&&c==="<"){i=!0,a&&(e.push({start:o,end:s}),a=!1);continue}if(i&&c==='"'&&(r=!r),i&&!r&&c===">"){i=!1;continue}!i&&!r&&!a&&(o=s,a=!0)}return!e.length&&t.textContent.length&&e.push({start:o,end:t.innerHTML.length}),e}function nv(t,e){const n=[" ",".",",","<",">"];try{const i=n.map(s=>"\\"+s).join(""),r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`([${i}])${r}([${i}])`),o=e.match(a);return o!=null&&o.index?o.index+1:-1}catch{return-1}}function Rc(t){return t.ctrlKey||t.metaKey||t.button!==0}const ve={ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",UserLeft:"ali_user_left",TitleModalView:"ali_title_modal_view",TitleModalClose:"ali_title_modal_close",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",ParticipantModalView:"ali_participant_modal_view",ParticipantModalClose:"ali_participant_modal_close",InjectionPopoverView:"ali_injection_popover_view",InjectionPopoverClose:"ali_injection_popover_close",InjectionPopoverPlaylinkClick:"ali_injection_popover_playlink_click",SimilarTitleClick:"ali_similar_title_click",ParticipantClick:"ali_title_participant_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FailedInjectionsCount:"ali_failed_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed",ManualReport:"ali_manual_report",EditorError:"ali_editor_error",InjectionError:"ali_injection_error",ExploreResultsError:"venus_explore_results_error",ExploreHomeRailError:"venus_explore_home_rail_error",TopScrollView:"ali_top_scroll_view",TopScrollClick:"ali_top_scroll_click",DisplayAdView:"ali_display_ad_view",DisplayAdClick:"ali_display_ad_click",DisplayedAdPlaylickClick:"ali_display_ad_playlink_click",DisplayedAdVideoPercentage:"ali_display_ad_video_percentage",AdsFetchFailed:"ali_ads_fetch_failed",SplitTestView:"ali_split_test_view",WidgetArticleRailTitleClick:"ali_widget_article_rail_title_click",ShareTitle:"ali_share_title",TrailerClick:"ali_trailer_button_click",ExpandTitleDescription:"ali_expand_title_description",RegionRequestFailed:"ali_region_request_failed",CardToExploreCta:"ali_card_to_explore_cta",TitleParticipantsView:"ali_title_participants_view",ExplorePageView:"venus_page_view",ExploreTitleClick:"venus_title_click",ExploreShowMore:"venus_show_more",ExploreSetFilter:"venus_set_filter",ExploreSearch:"venus_search",ExploreFetchProvidersFailed:"venus_fetch_providers_failed",ExploreTitleRailModalView:"venus_title_rail_modal_view",ExploreTitleRailExpandClick:"venus_title_rail_expand_click",ExploreTitleRailSetIndex:"venus_title_rail_set_index",ExploreNavigate:"venus_navigate",ExploreAnyClick:"venus_any_click",ExploreScrollDistance:"venus_scroll_distance"},Yt={ProviderInterest:"ProviderInterest",ProviderClick:"ProviderClick",ParticipantInterest:"ParticipantInterest",ParticipantView:"ParticipantView",SearchQuery:"SearchQuery",GenreInterest:"GenreInterest",TitleInterest:"TitleInterest"},Nn={Card:"tpi_card",Link:"tpi_link"};function iv(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.consents=t)}function Kn(t){var e;return window.PlayPilotLinkInjections.require_consent===!1?!0:!!((e=window.PlayPilotLinkInjections.consents)!=null&&e[t])}function Yr(){const t=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(t)}const Pa=[{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90}},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50}},{slug:"103",name:"Kids",categories:{kids:76}},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46}},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84}},{slug:"106",name:"Documentary",categories:{kids:50}},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44}},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28}},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88}},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40}},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38}},{slug:"112",name:"Film Noir",categories:{movie:37}},{slug:"113",name:"Game Show",categories:{series:36,kids:28}},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90}},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86}},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66}},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30}},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32}},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76}},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38}},{slug:"121",name:"Reality TV",categories:{series:24}},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74}},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32}},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80}},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20}},{slug:"126",name:"Talk Show",categories:{kids:34,series:16}},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70}},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24}},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48}},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44}},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36}},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42}},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34}},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74}},{slug:"232",name:"Stand-up",categories:{movie:18,series:18}},{slug:"240",name:"Concert",categories:{movie:45}},{slug:"900",name:"Independent",categories:{}},{slug:"901",name:"Arthouse",categories:{}},{slug:"902",name:"Bollywood",categories:{}},{slug:"903",name:"Alternate Version",categories:{}},{slug:"999",name:"Unscripted",categories:{}}];function rv(t=[]){return t.map(e=>{var n;return((n=Pa.find(i=>i.slug===e))==null?void 0:n.name)||""}).filter(Boolean)}async function av(){const t=vn();if(!t)throw new Error("No token was provided");try{return await await Ht(`/domains/config?api-token=${t}`)||null}catch{return null}}function Je(t){var e,n;return(n=(e=window.PlayPilotLinkInjections)==null?void 0:e.config)==null?void 0:n[t]}const Qa="playpilot_user_id",Xa="playpilot_session_id";function Nc(){if(!$l())return null;try{const t=localStorage.getItem(Qa);return t||(localStorage.setItem(Qa,Or(16)),localStorage.getItem(Qa))}catch{return null}}function lv(){if(!$l())return null;try{const t=sessionStorage.getItem(Xa);return t||(sessionStorage.setItem(Xa,Or(16)),sessionStorage.getItem(Xa))}catch{return null}}function $l(){return!!Je("allow_user_id_tracking")&&Kn("tracking")}const ov="https://insights.playpilot.net";async function he(t,e=null,n={}){var r,a,o,s,c,u;if(Yr())return;if(!Kn("tracking")){cv(t,e,n);return}if((((r=window.PlayPilotLinkInjections.tracked_events)==null?void 0:r.length)||0)>500)return;const i=new Headers({"Content-Type":"application/json"});e&&(n={original_title:e.original_title,title:e.title,title_sid:e.sid,title_type:e.type,genres:rv(e.genres),providers:[...new Set(((a=e.providers)==null?void 0:a.map(d=>d.name))||[])],...n}),$l()&&(n.user_id=Nc(),n.session_id=lv(),n.region=window.PlayPilotLinkInjections.region),n.version="8.41.0-beta.1",n.time_since_initialize=(o=window.PlayPilotLinkInjections)!=null&&o.time_at_initialize?Date.now()-window.PlayPilotLinkInjections.time_at_initialize:0,n.url=si(),n.url_params=Vf(),n.organization_sid=((s=window.PlayPilotLinkInjections)==null?void 0:s.organization_sid)||"undefined",n.domain_sid=((c=window.PlayPilotLinkInjections)==null?void 0:c.domain_sid)||"undefined",n.device={type:window.innerWidth>Un?"desktop":"mobile",width:window.innerWidth,height:window.innerHeight,touch:window.matchMedia("(pointer: coarse)").matches,orientation:((u=screen.orientation)==null?void 0:u.type)||"undefined"},fetch(ov,{headers:i,method:"POST",body:JSON.stringify({event:t,payload:n,source:"ali",keepalive:!0})}),sv({event:t,payload:n})}function sv(t){var e;window.PlayPilotLinkInjections.tracked_events||(window.PlayPilotLinkInjections.tracked_events=[]),(e=window.PlayPilotLinkInjections.tracked_events)==null||e.push(t)}function Fo({organizationSid:t=null,domainSid:e=null}){window.PlayPilotLinkInjections.organization_sid=t||null,window.PlayPilotLinkInjections.domain_sid=e||null}function cv(t,e=null,n={}){var i;(i=window.PlayPilotLinkInjections).queued_tracking_events||(i.queued_tracking_events=[]),window.PlayPilotLinkInjections.queued_tracking_events.push({event:t,title:e,payload:n})}function uv(){if(Kn("tracking")){for(const{event:t,title:e,payload:n}of window.PlayPilotLinkInjections.queued_tracking_events||[])he(t,e,n);window.PlayPilotLinkInjections.queued_tracking_events=[]}}const dv={Argentina:"ar",Australia:"au",Austria:"at",Belgium:"be",Brazil:"br",Canada:"ca",Chile:"cl",Colombia:"co",Denmark:"dk",Finland:"fi",France:"fr",Germany:"de",India:"in",Ireland:"ie",Italy:"it",Mexico:"mx",Netherlands:"nl",Norway:"no",Peru:"pe",Poland:"pl",Portugal:"pt",Russia:"ru",Singapore:"sg",Spain:"es",Sweden:"se",Switzerland:"ch",UK:"uk",USA:"us"},Oc="playpilot_retargeting_user_id",qc="playpilot_retargeting_region",fv=500,Bo=[];let $a=[],el=null;function ln(t,e={}){var c;const n=window[Oc]||null,i=window[qc]||null,r=((c=document.cookie.match(/_ga=GA\d\.\d\.(\d+\.\d+)/))==null?void 0:c[1])||null,a=window.location.href,o={event:t,url:a,user_id:n,client_id:r,region:i,params:e},s=JSON.stringify(o);Bo.includes(s)||($a.push(o),Bo.push(s),el&&clearTimeout(el),el=setTimeout(()=>{fetch("https://retargeting-do.playpilot.net/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($a)}),$a=[]},fv))}function zc(t,e={}){return()=>{tt(()=>ln(t,e))}}function vv(t,e={}){return n=>{const i=()=>ln(t,e);tt(()=>(n.addEventListener("click",i),()=>n.removeEventListener("click",i)))}}async function Xi(t=5e3){var n,i;const e=(n=window.PlayPilotLinkInjections)==null?void 0:n.region;if(e)return e;try{const a=await(await fetch("https://api.country.is/",{signal:AbortSignal.timeout(t)})).json();let o=(i=a==null?void 0:a.country)==null?void 0:i.toLowerCase();if(!o)throw new Error("No country was returned by api.country.is");return o==="gb"&&(o="uk"),hv(o),o}catch(r){return he(ve.RegionRequestFailed,null,{message:r.message}),Je("fallback_region")||""}}async function Hc(t=""){try{return t||(t=await Xi()),!t||Object.values(dv).some(e=>e===t)}catch{return!0}}function hv(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.region=t,window[qc]=t)}async function Fc(){if(!Kn("ads"))return[];if(window.PlayPilotLinkInjections.no_affiliate)return[];const t=vn();if(!t)throw new Error("No token was provided");try{const e=await Xi();return await Ht(`/ads/browse/?api-token=${t}®ion=${e}`)}catch(e){throw he(ve.AdsFetchFailed,null,{status:e.status}),e}}function En(t){var e;return!Kn("ads")||window.PlayPilotLinkInjections.no_affiliate?null:(((e=window.PlayPilotLinkInjections)==null?void 0:e.ads)||[]).find(n=>n.campaign_format===t)||null}function gv(t){return{sid:"",name:t.content.header||"",url:t.cta.url||"",logo_url:t.cta.image||"",highlighted:!0,cta_text:t.content.subheader,action_text:t.cta.header,slug:t.campaign_name,extra_info:{category:"SVOD"}}}async function Ia(t={}){const e=vn();if(!e)throw new Error("No token was provided");if(t={...t,language:qr(),include_count:!1},t.region!==null){let n=t.region||await Xi();await Hc(n)||(n="gl"),t.region=n}return await Ht(`/titles/browse?api-token=${e}&`+Cc(t))}async function Bc(t){return(await Ia({related_to_sid:t.sid})).results}async function Vc(t){const n=(await Ia({sids:t,no_region_filter:!0})).results[0];if(!n)throw new Error("No title was returned for sid: "+t);return n}const mv={"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"},"In-Text Disclaimer":{[_.English]:"We may earn a commission from purchases made through some of the links below.",[_.Swedish]:"Vi kan få en provision för köp som görs via några av länkarna nedan.",[_.Danish]:"Vi kan modtage en kommission for køb foretaget gennem nogle af nedenstående links."},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},Loading:{[_.English]:"Loading",[_.Swedish]:"Laddar",[_.Danish]:"Indlæser"},"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"},"Commission Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan tjäna en provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan tjene en kommission, hvis du foretager et køb via disse links. I samarbejde med"},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]:"Hyr",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyr/köp",[_.Danish]:"Lej eller køb"},Watch:{[_.English]:"Watch",[_.Swedish]:"Titta nu",[_.Danish]:"Se nu"},"Category: AVOD":{[_.English]:"Stream for free",[_.Swedish]:"Streama gratis",[_.Danish]:"Stream gratis"},"Category: SVOD":{[_.English]:"Streaming services",[_.Swedish]:"Streamingtjänster",[_.Danish]:"Streamingtjenester"},"Category: RENT":{[_.English]:"Rent it",[_.Swedish]:"Hyr den",[_.Danish]:"Lej den"},"Category: BUY":{[_.English]:"Buy it",[_.Swedish]:"Köp den",[_.Danish]:"Køb den"},"Category: Other":{[_.English]:"Other",[_.Swedish]:"Annat",[_.Danish]:"Andet"},Share:{[_.English]:"Share",[_.Swedish]:"Dela",[_.Danish]:"Del"},"Copy URL":{[_.English]:"Copy URL",[_.Swedish]:"Kopiera URL",[_.Danish]:"Kopiér URL"},Email:{[_.English]:"Email",[_.Swedish]:"E-post",[_.Danish]:"E-mail"},"Show More":{[_.English]:"Show more",[_.Swedish]:"Visa mer",[_.Danish]:"Vis mere"},"Show Less":{[_.English]:"Show less",[_.Swedish]:"Visa mindre",[_.Danish]:"Vis mindre"},"Read More":{[_.English]:"Read more",[_.Swedish]:"Läs mer",[_.Danish]:"Læs mere"},"Read Less":{[_.English]:"Read less",[_.Swedish]:"Läs mindre",[_.Danish]:"Læs mindre"},Cast:{[_.English]:"Cast",[_.Swedish]:"Rollista",[_.Danish]:"Skuespillere"},"Similar Titles":{[_.English]:"Similar movies & shows",[_.Swedish]:"Liknande filmer och serier",[_.Danish]:"Lignende film og serier"},"Watch Trailer":{[_.English]:"Watch trailer",[_.Swedish]:"Se trailer",[_.Danish]:"Se trailer"},"Streaming Guide":{[_.English]:"Streaming Guide",[_.Swedish]:"Streaming Guide",[_.Danish]:"Streaming Guide"},"Streaming Guide Subheading":{[_.English]:"Discover and search all movies and TV shows",[_.Swedish]:"Upptäck och sök bland alla filmer och tv-serier",[_.Danish]:"Opdag og søg i alle film og tv-serier"},"Streaming Guide Disclaimer":{[_.English]:'In collaboration with <a href="https://www.playpilot.com/" target="_blank" rel="sponsored">PlayPilot.com</a>',[_.Swedish]:'I samarbete med <a href="https://www.playpilot.com/" target="_blank" rel="sponsored">PlayPilot.com</a>',[_.Danish]:'I samarbejde med <a href="https://www.playpilot.com/" target="_blank" rel="sponsored">PlayPilot.com</a>'},"Streaming Guide Description":{[_.English]:"Find where to watch movies online - the ultimate guide that helps you find the best movies and shows across streaming services.",[_.Swedish]:"Sök bland alla filmer och serier för att ta reda på var du kan streama dem",[_.Danish]:"Find ud af, hvor du kan se film online - den ultimative guide, der hjælper dig med at finde de bedste film og serier på streamingtjenester."},"Search Movies And Shows":{[_.English]:"Search movies and shows",[_.Swedish]:"Sök filmer och serier",[_.Danish]:"Søg film og serier"},Services:{[_.English]:"Services",[_.Swedish]:"Tjänster",[_.Danish]:"Tjenester"},Genres:{[_.English]:"Genres",[_.Swedish]:"Genrer",[_.Danish]:"Genrer"},IMDb:{[_.English]:"IMDb",[_.Swedish]:"IMDb",[_.Danish]:"IMDb"},Year:{[_.English]:"Year",[_.Swedish]:"År",[_.Danish]:"År"},Runtime:{[_.English]:"Runtime",[_.Swedish]:"Speltid",[_.Danish]:"Spilletid"},Countries:{[_.English]:"Countries",[_.Swedish]:"Länder",[_.Danish]:"Lande"},"All Filters":{[_.English]:"All filters",[_.Swedish]:"Alla filter",[_.Danish]:"Alle filtre"},"Sort By":{[_.English]:"Sort by",[_.Swedish]:"Sortera efter",[_.Danish]:"Sortér efter"},Popularity:{[_.English]:"Popularity",[_.Swedish]:"Popularitet",[_.Danish]:"Popularitet"},New:{[_.English]:"New",[_.Swedish]:"Nytt",[_.Danish]:"Nyt"},"Top Rated":{[_.English]:"Top Rated",[_.Swedish]:"Toppbetyg",[_.Danish]:"Højst vurderet"},"IMDb Rating":{[_.English]:"IMDb Rating",[_.Swedish]:"IMDb-betyg",[_.Danish]:"IMDb-vurdering"},"-popularity":{[_.English]:"Popularity",[_.Swedish]:"Popularitet",[_.Danish]:"Popularitet"},"-new":{[_.English]:"New",[_.Swedish]:"Nytt",[_.Danish]:"Nyt"},"-best":{[_.English]:"Top Rated",[_.Swedish]:"Toppbetyg",[_.Danish]:"Højst vurderet"},"-imdb_score":{[_.English]:"IMDb Rating",[_.Swedish]:"IMDb-betyg",[_.Danish]:"IMDb-vurdering"},Search:{[_.English]:"Search",[_.Swedish]:"Sök",[_.Danish]:"Søg"},"Born On":{[_.English]:"Born on",[_.Swedish]:"Född den",[_.Danish]:"Født den"},"Died On":{[_.English]:"Died on",[_.Swedish]:"Död den",[_.Danish]:"Død den"},Credits:{[_.English]:"Credits",[_.Swedish]:"Medverkande",[_.Danish]:"Medvirkende"},Home:{[_.English]:"Home",[_.Swedish]:"Hem",[_.Danish]:"Hjem"},Explore:{[_.English]:"Explore",[_.Swedish]:"Utforska",[_.Danish]:"Udforsk"},"Page Not Found":{[_.English]:"Page not found",[_.Swedish]:"Sidan hittades inte",[_.Danish]:"Siden blev ikke fundet"},"Mentioned In This Article":{[_.English]:"Mentioned in this article",[_.Swedish]:"Nämnda i den här artikeln",[_.Danish]:"Nævnt i denne artikel"},"Sorry Region Not Supported":{[_.English]:"Sorry, your region is not supported",[_.Swedish]:"Tyvärr stöds inte din region",[_.Danish]:"Beklager, din region understøttes ikke"},"Show Count More":{[_.English]:"Show [[count]] more",[_.Swedish]:"Visa [[count]] till",[_.Danish]:"Vis [[count]] mere"},Movies:{[_.English]:"Movies",[_.Swedish]:"Filmer",[_.Danish]:"Film"},Shows:{[_.English]:"Shows",[_.Swedish]:"Serier",[_.Danish]:"Serier"},Documentaries:{[_.English]:"Documentaries",[_.Swedish]:"Dokumentärer",[_.Danish]:"Dokumentarer"},"List: Trending":{[_.English]:"Trending Movies & Shows",[_.Swedish]:"Trendande Titlar",[_.Danish]:"Populære film og serier"},"List: Upcoming":{[_.English]:"Upcoming Releases",[_.Swedish]:"Kommande Premiärer",[_.Danish]:"Mest ventede film"},"List: New":{[_.English]:"New Releases",[_.Swedish]:"Nya Filmer & Serier",[_.Danish]:"Nye film og serier"},"List: Demand":{[_.English]:"Always in Demand",[_.Swedish]:"Tidlösa Favoriter",[_.Danish]:"Tidløse favoritter"},"List: Cinema":{[_.English]:"Coming to Cinemas",[_.Swedish]:"Snart på Bio",[_.Danish]:"Kommende film"},"Explore All Movies And Shows":{[_.English]:"Explore all movies and TV shows",[_.Swedish]:"Utforska alla filmer och tv-serier",[_.Danish]:"Udforsk alle film og tv-serier"},"Job: all":{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},"Job: actor":{[_.English]:"Actor",[_.Swedish]:"Skådespelare",[_.Danish]:"Skuespiller"},"Job: producer":{[_.English]:"Producer",[_.Swedish]:"Producent",[_.Danish]:"Producer"},"Job: executive-producer":{[_.English]:"Executive Producer",[_.Swedish]:"Verkställande producent",[_.Danish]:"Administrerende producer"},"Job: writer":{[_.English]:"Writer",[_.Swedish]:"Manusförfattare",[_.Danish]:"Manuskriptforfatter"},"Job: director":{[_.English]:"Director",[_.Swedish]:"Regissör",[_.Danish]:"Instruktør"},"Job: cinematographer":{[_.English]:"Cinematographer",[_.Swedish]:"Filmfotograf",[_.Danish]:"Filmfotograf"},"Job: editor":{[_.English]:"Editor",[_.Swedish]:"Redaktör",[_.Danish]:"Redaktør"},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 se(t,e=qr()){var n;return((n=mv[t])==null?void 0:n[e])||t}const pv=t=>t;function eo(t){const e=t-1;return e*e*e+1}function Vo(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Qn(t,e,n){return Number.isNaN(e)?"":`${t}: ${n*e}px;`}function Ot(t,{delay:e=0,duration:n=400,easing:i=pv}={}){const r=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function Ti(t,{delay:e=0,duration:n=400,easing:i=eo,x:r=0,y:a=0,opacity:o=0}={}){const s=getComputedStyle(t),c=+s.opacity,u=s.transform==="none"?"":s.transform,d=c*(1-o),[h,f]=Vo(r),[v,g]=Vo(a);return{delay:e,duration:n,easing:i,css:(m,p)=>`
|
|
6
|
-
transform: ${u} translate(${(1-m)*
|
|
7
|
-
opacity: ${c-
|
|
8
|
-
transform: ${c} scale(${1-u*
|
|
9
|
-
opacity: ${s-
|
|
10
|
-
`}}function er(t){return t?t.replace("/src/img",""):null}function Wo(t,e=null){return t!=null&&t.length?`${jf}/${t}?${e?`class=${e}&`:""}optimizer=image`:""}var _v=S('<img class="svelte-p6g2a"/>');function Aa(t,e){re(e,!0);const n=I(e,"width",3,96),i=I(e,"height",3,144),r=I(e,"lazy",3,!0),a=I(e,"onload",3,()=>null);var o=_v();G(s=>{le(o,"loading",r()?"lazy":null),le(o,"src",s),le(o,"alt",`Movie poster for '${e.title.title??""}'`),le(o,"width",n()),le(o,"height",i())},[()=>er(e.title.standing_poster)]),pe("error",o,({target:s})=>s.src=Fi),pe("load",o,function(...s){var c;(c=a())==null||c.apply(this,s)}),y(t,o),ae()}var yv=Ge('<svg viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function zr(t,e){const n=I(e,"size",3,16);var i=yv();G(()=>{le(i,"width",n()),le(i,"height",n())}),y(t,i)}var wv=new Set(["$$slots","$$events","$$legacy","children","size","onclick"]);function Wi(t,e){re(e,!0);const n=I(e,"size",3,"32px"),i=I(e,"onclick",3,()=>null),r=Qi(e,wv);var a=we(),o=J(a);fc(o,()=>e.href?"a":"button",!1,(s,c)=>{wc(s,()=>({role:e.href?"link":"button",onclick:i(),class:"button",...r,[bi]:{"--size":n()}}),void 0,void 0,void 0,"svelte-1ch8qoj");var u=we(),d=J(u);$e(d,()=>e.children??Pt),y(c,u)}),y(t,a),ae()}var bv=S('<div><!> <div class="backdrop svelte-f0c4xl" data-testid="backdrop"></div> <div class="close svelte-f0c4xl"><!></div></div>');function kv(t,e){const n=I(e,"embeddable_url",3,"");let i=Y(Oe(window.innerHeight)),r=Y(Oe(window.innerWidth)),a=V(()=>l(r)<l(i));var o=bv();let s;var c=C(o);no(c,{get embeddable_url(){return n()},controls:["current-time","fullscreen","mute","play","progress"]});var u=k(c,2),d=k(u,2),h=C(d);Wi(h,{size:"42px",get onclick(){return e.onclose},"aria-label":"Close",children:(f,v)=>{zr(f,{size:24})},$$slots:{default:!0}}),G(()=>s=ye(o,1,"overlay svelte-f0c4xl",null,s,{portrait:l(a)})),Hi("innerWidth",f=>R(r,f,!0)),Hi("innerHeight",f=>R(i,f,!0)),ne("click",u,function(...f){var v;(v=e.onclose)==null||v.apply(this,f)}),ze(3,o,()=>Ot,()=>({duration:100})),y(t,o)}Se(["click"]);const xv="https://youtube-availability.playpilot.workers.dev";async function Wc(t){var n,i,r;const e=(n=await Xi())==null?void 0:n.toUpperCase();if(!e)return!0;try{const a=await fetch(`${xv}/?video_id=${t}`);if(!a.ok)throw new Error("Response was not ok");const o=await a.json();return!((i=o.blocked)!=null&&i[e]||!o.blocked&&o.allowed&&!((r=o.allowed)!=null&&r.includes(e)))}catch{return!1}}let Jr={};function Uc(t){const e=ci(),n={onclose:Sv,embeddable_url:t.embeddable_url||""};Jr=Nt(kv,{target:e,props:n})}function Sv(){Jr&&(Zn(Jr,{outro:!0}),Jr=null)}function to(t){const e=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/,n=t.match(e);return(n==null?void 0:n[7])||null}async function Tv(t,e=3){let n=0,i=null;for(;n<e&&!i;){const r=t[n],a=(r==null?void 0:r.embeddable_url)&&to(r.embeddable_url);try{a&&await Wc(a)&&(i=r)}catch{}n++}return i}var Ev=Ge('<path fill="currentColor" d="m616-320-56-56 104-104-104-104 56-56 104 104 104-104 56 56-104 104 104 104-56 56-104-104-104 104Zm-496-40v-240h160l200-200v640L280-360H120Zm280-246-86 86H200v80h114l86 86v-252ZM300-480Z"></path>'),Pv=Ge('<path fill="currentColor" d="M560-131v-82q90-26 145-100t55-168q0-94-55-168T560-749v-82q124 28 202 125.5T840-481q0 127-78 224.5T560-131ZM120-360v-240h160l200-200v640L280-360H120Zm440 40v-322q47 22 73.5 66t26.5 96q0 51-26.5 94.5T560-320ZM400-606l-86 86H200v80h114l86 86v-252ZM300-480Z"></path>'),Iv=Ge('<svg width="32px" height="32px" viewBox="0 -960 960 960"><!></svg>');function Av(t,e){const n=I(e,"muted",3,!1);var i=Iv(),r=C(i);{var a=s=>{var c=Ev();y(s,c)},o=s=>{var c=Pv();y(s,c)};U(r,s=>{n()?s(a):s(o,-1)})}y(t,i)}fd();var Cv=Ge('<svg width="32px" height="32px" viewBox="0 -960 960 960"><path fill="currentColor" d="M120-120v-200h80v120h120v80H120Zm520 0v-80h120v-120h80v200H640ZM120-640v-200h200v80H200v120h-80Zm640 0v-120H640v-80h200v200h-80Z"></path></svg>');function Mv(t){var e=Cv();y(t,e)}var Lv=Kd(S('<script src="https://unpkg.com/plyr@3"><\/script> <link rel="stylesheet" href="https://unpkg.com/plyr@3/dist/plyr.css"/>',1)),jv=S('<button class="action svelte-1ivh34t" aria-label="Mute"><!></button> <button class="action secondary svelte-1ivh34t" aria-label="Fullscreen"><!></button>',1),Dv=S('<div><div class="player svelte-1ivh34t" data-plyr-provider="youtube" data-plyr-embed-id=""></div> <!></div>');function no(t,e){var L;re(e,!0);let n=I(e,"embeddable_url",3,""),i=I(e,"controls",19,()=>[]),r=I(e,"muted",7,!1),a=I(e,"loop",3,!1),o=I(e,"captions",3,!1),s=I(e,"autoplay",3,!0),c=I(e,"showActions",3,!1),u=I(e,"fallbackStartTime",3,0),d=I(e,"clickToPlay",3,!0);const h=V(()=>to(n())),f=V(()=>{var D,H;return(((H=(D=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:D.video_playtimes)==null?void 0:H[l(h)||""])||u()+1)-1}),v=((L=window==null?void 0:window.getComputedStyle(document.body).getPropertyValue("--playpilot-primary"))==null?void 0:L.replace("#",""))||"fa548a";let g=Y(null),m=Y(!1),p;lt(()=>{if(!l(h))return;window.PlayPilotLinkInjections.video_playtimes||(window.PlayPilotLinkInjections.video_playtimes={});let D=l(f);const H=setInterval(()=>{D++,window.PlayPilotLinkInjections.video_playtimes[l(h)]=D},1e3);return()=>clearInterval(H)});function w(){typeof window.Plyr>"u"||l(g)&&(l(g).dataset.plyrEmbedId=l(h),l(g).style.setProperty("--plyr-color-main","#"+v),p=new window.Plyr(l(g),{controls:i().length===0?["play","mute","fullscreen","progress","current-time"]:i(),playsinline:!0,autoplay:s(),muted:r(),clickToPlay:d(),storage:{enabled:!1},youtube:{noCookie:!0,cc_load_policy:o()?1:0,cc_lang_pref:"auto"}}),p.on("ready",()=>{p.currentTime=l(f),b(r())}),p.on("enterfullscreen",()=>{R(m,!0),b(!1)}),p.on("exitfullscreen",()=>{R(m,!1),b(!0)}),a()&&p.on("statechange",D=>{D.detail.code===0&&requestAnimationFrame(()=>{p.play(),b(r())})}))}function b(D=!r()){r(D),p.muted=D,p.volume=D?0:1}function T(){if(/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1){Uc({embeddable_url:n()}),b(!0);return}p.fullscreen.enter()}function x(D){D.detail===n()&&(p==null||p.play())}function P(D){D.detail===n()&&(p==null||p.pause())}var E={toggleMute:b,enterFullscreen:T,play:x,pause:P},M=we();pe("playembed",Ae,x),pe("pauseembed",Ae,P),vc("1ivh34t",D=>{var H=we(),Z=J(H);{var B=z=>{var A=Lv(),q=J(A);pe("load",q,w),y(z,A)};U(Z,z=>{l(h)&&z(B)})}y(D,H)});var O=J(M);{var F=D=>{var H=Dv();let Z;var B=C(H);et(B,q=>R(g,q),()=>l(g));var z=k(B,2);{var A=q=>{var W=jv(),K=J(W),ee=C(K);Av(ee,{get muted(){return r()}});var te=k(K,2),ue=C(te);Mv(ue),ne("click",K,()=>b()),ne("click",te,T),y(q,W)};U(z,q=>{c()&&q(A)})}G(()=>{Z=ye(H,1,"svelte-1ivh34t",null,Z,{fullscreen:l(m),"hide-controls":i().length===0&&!l(m)}),le(B,"data-testid",n())}),y(D,H)},j=D=>{var H=Xe("Something went wrong");y(D,H)};U(O,D=>{l(h)?D(F):D(j,-1)})}return y(t,M),ae(E)}Se(["click"]);var Rv=S('<div tabindex="-1"><div tabindex="0" class="slider-content svelte-1gs8ha8"><!></div></div> <!>',1);function Gc(t,e){re(e,!0);let n=I(e,"gap",3,"0"),i=I(e,"fill",3,!0),r=I(e,"vertical",3,!1),a=I(e,"transitionDuration",3,300),o=I(e,"threshold",3,30),s=I(e,"moveThreshold",3,0),c=I(e,"currentIndex",15,0),u=I(e,"shown",31,()=>Oe([])),d=I(e,"sliderWidth",15,0),h=I(e,"sliderHeight",15,0),f=I(e,"currentScrollPosition",15,0),v=I(e,"maxWidth",15,0),g=I(e,"maxHeight",15,0),m=I(e,"reachedEnd",15,!1),p=I(e,"distanceToEnd",15,0),w=I(e,"passedThreshold",15,!1),b=I(e,"passedMoveThreshold",15,!1),T=I(e,"allowWheel",3,!1),x=I(e,"end",3,()=>null),P=I(e,"change",3,ie=>null),E=I(e,"onend",19,x),M=I(e,"onchange",19,P),O=I(e,"onresize",3,()=>null),F=Y(!1),j=Y(!1),L=0,D=0,H=Y(void 0),Z=Y(void 0),B=null,z=null;tt(()=>{l(Z)&&de(),l(Z)&&p((r()?g():v())-f()-(r()?h():d()))}),lt(()=>($(),()=>B==null?void 0:B.disconnect()));function A(ie){const _e=l(Z).children.length,Ce=Math.max(0,Math.min(ie,_e-1));xe({setIndex:Ce}),de()}function q(){R(j,!0),A(c()),requestAnimationFrame(()=>R(j,!1))}function W(ie){X(ie.target)&&(ie.preventDefault(),L=fe(ie),R(F,!0))}function K(){if(l(F)){if(!w())xe({setIndex:c()});else{const ie=f()-D,_e=ie>0?1:-1;ie!=0&&xe({direction:_e})}R(F,!1),w(!1)}}function ee(ie){if(!l(F))return;const _e=fe(ie),Ce=D+(L-_e),We=L-_e;b(Math.abs(We)>s()),w(Math.abs(f()-D)>o()),b()&&(Te(Ce-s()*(We>0?1:-1)),de())}function te(ie){if(!T())return;const{deltaX:_e,deltaY:Ce}=ie;if(Math.abs(_e)<Math.abs(Ce))return;ie.preventDefault();const We=20,Qe=r()?Ce:_e,hn=f()+Qe*We*.02;Te(hn),de(),z&&clearTimeout(z),z=setTimeout(()=>{xe({direction:Qe>0?1:-1})},100)}function ue(ie){X(document.activeElement)&&(ie.key=="ArrowLeft"&&A(c()-1),ie.key=="ArrowRight"&&A(c()+1))}function xe({setIndex:ie=-1,direction:_e=1}={}){const Ce=je(),We=c();c(0);let Qe;for(Qe=0;Qe<Ce.length;Qe++)if(ie!=-1){if(Qe>=ie)break}else if(_e>0&&Ce[Qe]>f()||_e<0&&Ce[Qe+1]>f())break;c(Math.min(Qe,Fe().length-1)),Te(Ce[c()],!0),D=f(),M()&&c()!=We&&M()(c())}function Te(ie,_e=!1){f(ie);const Ce=r()?g():v(),We=r()?h():d(),Qe=Ce-We,hn=r()?"clientHeight":"clientWidth";m(f()>=Qe),m()&&(E()&&E()(),i()&&_e&&f(l(Z)[hn]<We?0:Qe))}function de(){const ie=je();Array.from(ie).forEach((_e,Ce)=>{f()+d()<_e||u().includes(Ce)||u([...u(),Ce])})}function fe(ie){var Ce,We;const _e=r()?"pageY":"pageX";return ie[_e]??((We=(Ce=ie.touches)==null?void 0:Ce[0])==null?void 0:We[_e])}function je(){return Fe().map(ie=>r()?ie.offsetTop:ie.offsetLeft)}function Fe(){return Array.from(l(Z).children).filter(ie=>ie instanceof HTMLElement).filter(ie=>ie.src!="about:blank")}function $(){B=new ResizeObserver(ie=>{for(const _e of ie){const Ce=Array.isArray(_e.contentBoxSize)?_e.contentBoxSize[0]:_e.contentBoxSize;v(Ce.inlineSize),g(Ce.blockSize)}O()()}),B.observe(l(Z))}function X(ie){return ie===l(H)||(ie==null?void 0:ie.closest(".slider"))===l(H)}var ce={setIndex:A,reposition:q},Ee=Rv();pe("mousedown",Ae,W),pe("mouseup",Ae,K),pe("mousemove",Ae,ee),pe("touchstart",Ae,W,void 0,!0),pe("touchend",Ae,K),pe("touchmove",Ae,ee,void 0,!0),pe("keydown",Ae,ue),pe("resize",Ae,q);var Be=J(Ee);let ge;var Me=C(Be);let Ve;var st=C(Me);$e(st,()=>e.children??Pt,()=>({sliderWidth:d(),sliderHeight:h(),shown:u(),currentIndex:c(),setIndex:A,currentScrollPosition:f(),maxWidth:v(),reachedEnd:m(),distanceToEnd:p()})),et(Me,ie=>R(Z,ie),()=>l(Z)),et(Be,ie=>R(H,ie),()=>l(H));var Ke=k(Be,2);return $e(Ke,()=>e.controls??Pt,()=>({sliderWidth:d(),sliderHeight:h(),shown:u(),currentIndex:c(),setIndex:A,currentScrollPosition:f(),maxWidth:v(),reachedEnd:m(),distanceToEnd:p()})),G(ie=>{ge=ye(Be,1,"slider svelte-1gs8ha8",null,ge,{dragging:l(F),"passed-threshold":w(),vertical:r()}),Ve=rt(Me,"",Ve,{transform:`translate${r()?"Y":"X"}(${f()*-1}px)`,"transition-duration":`${(l(F)||l(j)?0:a())??""}ms`,"--gap":ie})},[()=>parseFloat(n()||"0")?n():null]),pe("wheel",Be,te),Ct(Be,"clientWidth",d),Ct(Be,"clientHeight",h),y(t,Ee),ae(ce)}var Nv=Ge("<title> </title>"),Ov=Ge('<svg viewBox="0 -960 960 960"><!><path d="m288-96-68-68 316-316-316-316 68-68 384 384L288-96Z" fill="currentColor"></path></svg>');function Ft(t,e){const n=I(e,"direction",3,"right"),i=I(e,"title",3,""),r=I(e,"size",3,16);var a=Ov(),o=C(a);{var s=c=>{var u=Nv(),d=oe(u,!0);G(()=>Q(d,i())),y(c,u)};U(o,c=>{i()&&c(s)})}G(()=>{ye(a,0,n(),"svelte-1m6nwwy"),le(a,"width",`${r()??""}px`),le(a,"height",`${r()??""}px`)}),y(t,a)}function Ne(t,e=1){t.role="heading",t.ariaLevel=e.toString()}var qv=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],zv=["difference","intersection","symmetricDifference","union"],Uo=!1,Ri,Gt,Rn,wa,Gi,Zc,Kc;const ba=class ba extends Set{constructor(n){super();be(this,Gi);be(this,Ri,new Map);be(this,Gt,Y(0));be(this,Rn,Y(0));be(this,wa,bn||-1);if(n){for(var i of n)super.add(i);N(this,Rn).v=super.size}Uo||Pe(this,Gi,Kc).call(this)}has(n){var i=super.has(n),r=N(this,Ri),a=r.get(n);if(a===void 0){if(!i)return l(N(this,Gt)),!1;a=Pe(this,Gi,Zc).call(this,!0),r.set(n,a)}return l(a),i}add(n){return super.has(n)||(super.add(n),R(N(this,Rn),super.size),Hn(N(this,Gt))),this}delete(n){var i=super.delete(n),r=N(this,Ri),a=r.get(n);return a!==void 0&&(r.delete(n),R(a,!1)),i&&(R(N(this,Rn),super.size),Hn(N(this,Gt))),i}clear(){if(super.size!==0){super.clear();var n=N(this,Ri);for(var i of n.values())R(i,!1);n.clear(),R(N(this,Rn),0),Hn(N(this,Gt))}}keys(){return this.values()}values(){return l(N(this,Gt)),super.values()}entries(){return l(N(this,Gt)),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return l(N(this,Rn))}};Ri=new WeakMap,Gt=new WeakMap,Rn=new WeakMap,wa=new WeakMap,Gi=new WeakSet,Zc=function(n){return bn===N(this,wa)?Y(n):dn(n)},Kc=function(){Uo=!0;var n=ba.prototype,i=Set.prototype;for(const r of qv)n[r]=function(...a){return l(N(this,Gt)),i[r].apply(this,a)};for(const r of zv)n[r]=function(...a){l(N(this,Gt));var o=i[r].apply(this,a);return new ba(o)}};let da=ba;var Er,Pr;class Hv{constructor(e,n){be(this,Er);be(this,Pr);ke(this,Er,e),ke(this,Pr,sc(n))}get current(){return N(this,Pr).call(this),N(this,Er).call(this)}}Er=new WeakMap,Pr=new WeakMap;const Fv=/\(.+\)/,Bv=new Set(["all","print","screen","and","or","not","only"]);class Vv extends Hv{constructor(e,n){let i=Fv.test(e)||e.split(/[\s,]+/).some(a=>Bv.has(a.trim()))?e:`(${e})`;const r=window.matchMedia(i);super(()=>r.matches,a=>Wd(r,"change",a))}}function Wv(t){const e=t-1;return e*e*e+1}const tr=new Vv("(prefers-reduced-motion: reduce)");var Uv=S('<div class="heading svelte-1ayf7b5"> </div>'),Gv=S('<button class="arrow left svelte-1ayf7b5" aria-label="Previous" aria-live="polite"><!></button>'),Zv=S('<button class="arrow right svelte-1ayf7b5" aria-label="Next" aria-live="polite"><!></button>'),Kv=S("<!> <!>",1),Yv=S('<!> <div class="rail svelte-1ayf7b5"><!></div>',1);function fa(t,e){re(e,!0);let n=I(e,"heading",3,""),i=I(e,"onchange",3,()=>null),r=I(e,"onresize",3,()=>null),a=I(e,"slider",15),o=I(e,"shown",31,()=>Oe([]));var s=Yv(),c=J(s);{var u=f=>{var v=Uv(),g=oe(v,!0);bt(v,(m,p)=>Ne==null?void 0:Ne(m,p),()=>2),G(()=>Q(g,n())),y(f,v)};U(c,f=>{n()&&f(u)})}var d=k(c,2),h=C(d);{const f=(g,m)=>{let p=()=>(m==null?void 0:m()).setIndex,w=()=>(m==null?void 0:m()).currentIndex,b=()=>(m==null?void 0:m()).reachedEnd;var T=Kv(),x=J(T);{var P=O=>{var F=Gv(),j=C(F);Ft(j,{direction:"left",title:"Previous"}),ne("click",F,()=>p()(w()-1)),y(O,F)};U(x,O=>{w()>0&&O(P)})}var E=k(x,2);{var M=O=>{var F=Zv(),j=C(F);Ft(j,{title:"Next"}),ne("click",F,()=>p()(w()+1)),y(O,F)};U(E,O=>{b()||O(M)})}y(g,T)};let v=V(()=>tr.current?0:300);et(Gc(h,{get onchange(){return i()},get onresize(){return r()},get transitionDuration(){return l(v)},allowWheel:!0,get shown(){return o()},set shown(g){o(g)},controls:f,children:(g,m)=>{var p=we(),w=J(p);$e(w,()=>e.children),y(g,p)},$$slots:{controls:!0,default:!0}}),g=>a(g),()=>a())}y(t,s),ae()}Se(["click"]);function Ca(t){return`${xc}/${t.type}/${t.slug}/`}function io(t){return`${xc}/name/${t.sid}/`}function ro(t){return Je("explore_navigation_path")+`?route=modal&sid=${t}`}var Jv=S('<img class="video-fallback svelte-12ph9f6" alt=""/>'),Qv=S('<div class="video svelte-12ph9f6"><div class="video-overlay svelte-12ph9f6" title=""></div> <!></div>'),Xv=S('<div class="poster svelte-12ph9f6"><!></div>'),$v=S('<div class="aside svelte-12ph9f6" data-testid="aside"> </div>'),eh=S('<div data-testid="title"><div class="media svelte-12ph9f6"><!></div> <span class="heading svelte-12ph9f6" data-testid="heading"> </span> <!></div>'),th=S('<div class="skeleton svelte-12ph9f6"> </div>'),nh=S('<div class="aside svelte-12ph9f6"><div class="aside-skeleton svelte-12ph9f6"></div></div>'),ih=S('<div class="title svelte-12ph9f6" data-testid="skeleton"><div class="poster svelte-12ph9f6"></div> <div class="heading svelte-12ph9f6"><span class="skeleton svelte-12ph9f6"> </span> <span class="skeleton svelte-12ph9f6"> </span></div> <!></div>'),rh=S("<div><!></div>");function yr(t,e){re(e,!0);let n=I(e,"minimumLength",3,1),i=I(e,"heading",3,""),r=I(e,"size",3,"small"),a=I(e,"aside",3,!1),o=I(e,"navigateToExplore",3,!1),s=I(e,"expandable",3,!1),c=I(e,"expandedTitle",15,null),u=I(e,"expandedRailKey",15,null),d=I(e,"shown",31,()=>Oe([])),h=I(e,"onclick",3,()=>null),f=I(e,"onexpand",3,()=>null);const v=Or(),m=hr("scope")==="popover"?hr("title"):null;let p=Y(null),w=Y(null),b=Y(null),T=!1;lt(()=>{s()&&M()});function x(H,Z,B){var A,q,W,K,ee;H==null||H.preventDefault();const z=Z[B];if(s()&&!O(z)){const te=(A=l(p))==null?void 0:A.querySelectorAll(".title")[B],Te=(((q=l(p))==null?void 0:q.getBoundingClientRect().right)||0)-te.getBoundingClientRect().right>te.clientWidth*2;T=!0,setTimeout(()=>T=!1,500),r()==="flexible"&&!Te?(W=l(w))==null||W.setIndex(B-2):r()==="huge"&&!Te&&((K=l(w))==null||K.setIndex(B)),E(z),H&&f()(z);return}if(H){if((ee=l(b))==null||ee.toggleMute(!0),h()(z),o()){window.location.href=ro(z.sid);return}Yn({event:H,type:"titles-rail",data:Z,returnToTitle:m,props:{initialIndex:B}})}}async function P(){const H=await e.titles,Z=await Tv(H);Z&&(c()||u()&&u()!==v||E(Z))}function E(H){u(v),c(H)}function M(){u()===v||Array.from(document.querySelectorAll('[data-role="expandable-rail"]')).filter(z=>z.getBoundingClientRect().top>=0).sort((z,A)=>z.getBoundingClientRect().top-A.getBoundingClientRect().top)[0]!==l(p)||(c(null),u(null),P())}function O(H){var Z;return u()===v&&H.sid===((Z=c())==null?void 0:Z.sid)}function F(H,Z){s()&&(T||setTimeout(()=>x(null,H,Z),250))}var j=rh();pe("scroll",Ae,M);let L;var D=C(j);Sn(D,()=>e.titles,H=>{fa(H,{get heading(){return i()},children:(Z,B)=>{var z=we(),A=J(z);He(A,16,()=>({length:12}),Ue,(q,W)=>{var K=ih(),ee=k(C(K),4);{var te=ue=>{var xe=nh(),Te=C(xe);He(Te,20,()=>({length:3}),Ue,(de,fe)=>{var je=th();y(de,je)}),y(ue,xe)};U(ee,ue=>{a()&&ue(te)})}y(q,K)}),y(Z,z)},$$slots:{default:!0}})},(H,Z)=>{const B=V(()=>{var W;return(W=l(Z))==null?void 0:W.filter((K,ee,te)=>te.findIndex(ue=>ue.sid===K.sid)===ee)});var z=we(),A=J(z);{var q=W=>{fa(W,{get heading(){return i()},onchange:K=>F(l(Z),K),onresize:()=>{var K;return(K=l(w))==null?void 0:K.reposition()},get slider(){return l(w)},set slider(K){R(w,K,!0)},get shown(){return d()},set shown(K){d(K)},children:(K,ee)=>{var te=we(),ue=J(te);He(ue,17,()=>l(B),Ue,(xe,Te,de,fe)=>{const je=V(()=>O(l(Te))),Fe=V(()=>ie=>x(ie,l(Z),de));var $=eh();let X;var ce=C($),Ee=C(ce);{var Be=ie=>{var _e=Qv(),Ce=C(_e),We=k(Ce,2);{var Qe=De=>{et(no(De,{get embeddable_url(){return l(Te).embeddable_url},muted:!0,loop:!0,captions:!0,showActions:!0}),Re=>R(b,Re,!0),()=>l(b))},hn=De=>{var Re=Jv();G(()=>le(Re,"src",l(Te).medium_poster)),y(De,Re)};U(We,De=>{l(Te).embeddable_url?De(Qe):De(hn,-1)})}ne("click",Ce,function(...De){var Re;(Re=l(Fe))==null||Re.apply(this,De)}),ze(2,_e,()=>Ot,()=>({delay:200,duration:200})),y(ie,_e)},ge=ie=>{var _e=Xv(),Ce=C(_e);Aa(Ce,{get title(){return l(Te)},width:96,height:144}),ne("click",_e,function(...We){var Qe;(Qe=l(Fe))==null||Qe.apply(this,We)}),y(ie,_e)};U(Ee,ie=>{l(je)?ie(Be):ie(ge,-1)})}var Me=k(ce,2),Ve=oe(Me,!0),st=k(Me,2);{var Ke=ie=>{var _e=$v(),Ce=oe(_e,!0);G(()=>Q(Ce,l(Te).description)),ne("click",_e,function(...We){var Qe;(Qe=l(Fe))==null||Qe.apply(this,We)}),y(ie,_e)};U(st,ie=>{a()&&ie(Ke)})}G(()=>{X=ye($,1,"title svelte-12ph9f6",null,X,{expanded:l(je)}),Q(Ve,l(Te).title)}),ne("click",Me,function(...ie){var _e;(_e=l(Fe))==null||_e.apply(this,ie)}),y(xe,$)}),y(K,te)},$$slots:{default:!0}})};U(A,W=>{var K;((K=l(Z))==null?void 0:K.length)>=n()&&W(q)})}y(H,z)}),et(j,H=>R(p,H),()=>l(p)),G(()=>{L=ye(j,1,`titles ${r()??""}`,"svelte-12ph9f6",L,{"with-aside":a()}),le(j,"data-role",s()?"expandable-rail":null)}),y(t,j),ae()}Se(["click"]);var ah=new Set(["$$slots","$$events","$$legacy","fetchFunction","maxPage","lazy","expandedTitle","expandedRailKey"]),lh=S("<div><!></div>");function oh(t,e){re(e,!0);const n=I(e,"maxPage",3,4),i=I(e,"lazy",3,!1);I(e,"expandedTitle",11,null),I(e,"expandedRailKey",11,null);const r=Qi(e,ah),a=new Promise(()=>{});let o=Y(Oe([])),s=Y(Oe([])),c=Y(1),u=Y(!1),d=Y(!0),h=Y(null),f=V(()=>!i());tt(()=>{l(f)&&v()}),tt(()=>{l(d)||l(u)&&(l(c)>=n()||l(o).length-l(s).length>10||(Ed(c),v()))}),lt(()=>{if(!i()||!l(h))return;const b=new IntersectionObserver(([T])=>{T.isIntersecting&&(R(f,!0),b.disconnect())},{rootMargin:window.innerHeight/2+"px"});return b.observe(l(h)),()=>b==null?void 0:b.disconnect()});async function v(){R(d,!0),R(u,!1);try{const{next:b,results:T}=await e.fetchFunction(l(c));R(o,[...l(o),...T],!0),R(u,!!b)}finally{R(d,!1)}}var g=lh(),m=C(g);{var p=b=>{yr(b,Tn({get titles(){return a}},()=>r))},w=b=>{yr(b,Tn({get titles(){return l(o)}},()=>r,{get shown(){return l(s)},set shown(T){R(s,T,!0)}}))};U(m,b=>{i()&&!l(f)||!l(o).length&&l(d)?b(p):b(w,-1)})}et(g,b=>R(h,b),()=>l(h)),y(t,g),ae()}var Go=S('<div class="rail svelte-1b834ry"><!></div>'),sh=S('<div data-testid="explore-home"></div> <!>',1);function Zo(t,e){re(e,!0);let n=Y(null),i=Y(null),r=Y(Oe(window.innerWidth));async function a(){return await Ht("/streaming-guide/rails",{baseUrl:"https://partner.playpilot.net/api"})}async function o(u={}){try{return await Ia({...u,page_size:25})}catch(d){throw console.log(d),he(ve.ExploreHomeRailError,null,{message:d.message||d.status.toString()||"",params:u}),new Error(d)}}var s=sh(),c=k(J(s),2);Sn(c,a,u=>{var d=we(),h=J(d);He(h,16,()=>({length:3}),Ue,(f,v)=>{var g=Go(),m=C(g);yr(m,{heading:" ",titles:new Promise(()=>{}),size:"huge"}),y(f,g)}),y(u,d)},(u,d)=>{var h=we(),f=J(h);He(f,17,()=>l(d),Ue,(v,g)=>{let m=()=>l(g).headings,p=()=>l(g).params,w=()=>l(g).properties;const b=V(()=>m()[qr()]);var T=Go(),x=C(T);{let P=V(()=>w().size||"flexible"),E=V(()=>w().minimum??7);oh(x,Tn({get heading(){return l(b)}},w,{lazy:!0,onclick:()=>he(ve.ExploreTitleRailModalView,null,{rail:m()}),onexpand:M=>he(ve.ExploreTitleRailExpandClick,M,{rail:m()}),fetchFunction:M=>o({...p(),page:M}),get size(){return l(P)},get minimumLength(){return l(E)},get expandedTitle(){return l(n)},set expandedTitle(M){R(n,M,!0)},get expandedRailKey(){return l(i)},set expandedRailKey(M){R(i,M,!0)}}))}y(v,T)}),y(u,h)},u=>{var d=Xe();G(h=>Q(d,h),[()=>se("An Error Occurred")]),y(u,d)}),Hi("innerWidth",u=>R(r,u,!0)),y(t,s),ae()}function mi(){return!Je("allow_retargeting_pixels")||!Kn("pixels")?!1:(window[Oc]=Nc(),!0)}var ch=S("<button><!></button>");function Bt(t,e){const n=I(e,"variant",3,"filled"),i=I(e,"size",3,"base"),r=I(e,"label",3,null),a=I(e,"active",3,!1);var o=ch();let s;var c=C(o);$e(c,()=>e.children??Pt),G(()=>{s=ye(o,1,`button ${n()??""} ${i()??""}`,"svelte-5bqh67",s,{active:a()}),le(o,"aria-label",r())}),ne("click",o,function(...u){var d;(d=e.onclick)==null||d.apply(this,u)}),y(t,o)}Se(["click"]);var uh=Ge('<svg viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><title>IMDb rating</title><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 Ma(t,e){const n=I(e,"size",3,14);var i=uh();G(()=>{le(i,"width",n()),le(i,"height",n())}),y(t,i)}function Yc(t){const e=t.filter(i=>!!i.logo_url);let n=[];for(const i of e){let r=i;const a=n.find(c=>c.name===r.name),o=a==null?void 0:a.extra_info.category,s=r.extra_info.category;(o==="RENT"&&s==="BUY"||o==="BUY"&&s==="RENT")&&(n=n.filter(c=>c.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),n.push(r)}return n}var dh=S('<img alt="" data-playpilot-pixel="" class="svelte-ico4xd"/>');function ao(t,e){re(e,!0);let n=Y(Oe(Math.random()));var i=we();pe("updateconsent",Ae,()=>R(n,Math.random(),!0));var r=J(i);Ji(r,()=>l(n),a=>{var o=we(),s=J(o);{var c=d=>{var h=we(),f=J(h);He(f,17,()=>e.pixels,Ue,(v,g)=>{var m=dh();G(()=>le(m,"src",l(g))),y(v,m)}),y(d,h)},u=V(()=>Kn("pixels"));U(s,d=>{l(u)&&d(c)})}y(a,o)}),y(t,i),ae()}var fh=S('<a target="_blank" class="playlink svelte-1tx3tz8" rel="sponsored"><img class="svelte-1tx3tz8"/> <!></a>');function vh(t,e){re(e,!0);const n=I(e,"size",3,30),i=I(e,"onclick",3,()=>null),r=V(()=>e.playlink.name),a=V(()=>e.playlink.url),o=V(()=>e.playlink.logo_url),s=V(()=>e.playlink.pixels);var c=fh();let u;var d=C(c),h=k(d,2);{var f=v=>{ao(v,{get pixels(){return l(s)}})};U(h,v=>{var g;(g=l(s))!=null&&g.length&&v(f)})}G(v=>{le(c,"href",l(a)),le(c,"data-playlink",l(r)),u=rt(c,"",u,{"--size":`${n()??""}px`}),le(d,"src",v),le(d,"alt",l(r)),le(d,"height",n()),le(d,"width",n())},[()=>er(l(o))]),ne("click",c,function(...v){var g;(g=i())==null||g.apply(this,v)}),y(t,c),ae()}Se(["click"]);var hh=S('<button class="button more svelte-1plv45z"> </button>'),gh=S('<div class="empty svelte-1plv45z" data-testid="playlinks-empty">Unavailable to stream</div>'),mh=S('<div class="playlinks svelte-1plv45z"><!> <!> <!></div>');function Jc(t,e){re(e,!0);const n=I(e,"size",3,30);let i=Y(3);const r=Yc(e.playlinks),a=V(()=>r.slice(0,l(i)));function o(g){g.stopPropagation()}function s(){R(i,r.length,!0)}var c=mh(),u=C(c);He(u,17,()=>l(a),Ue,(g,m)=>{vh(g,{get playlink(){return l(m)},onclick:o,get size(){return n()}})});var d=k(u,2);{var h=g=>{var m=hh(),p=oe(m);G(()=>Q(p,`+${r.length-l(i)}`)),ne("click",m,s),y(g,m)};U(d,g=>{r.length>l(i)&&g(h)})}var f=k(d,2);{var v=g=>{var m=gh();y(g,m)};U(f,g=>{r.length||g(v)})}y(t,c),ae()}Se(["click"]);var ph=S("<div>Series</div>"),_h=S("<div> </div>"),yh=S('<button class="title svelte-12igath" data-testid="title"><div class="poster svelte-12igath"><!> <div class="meta svelte-12igath"><div class="imdb svelte-12igath"><!> </div> <!> <!></div></div> <div class="content svelte-12igath"><div> </div> <!></div></button>');function wh(t,e){re(e,!0);const n=I(e,"onclick",3,()=>null),i=I(e,"hidePlaylinks",3,!1);var r=yh(),a=C(r),o=C(a);Aa(o,{get title(){return e.title},width:120,height:213,lazy:!0});var s=k(o,2),c=C(s),u=C(c);Ma(u,{size:12});var d=k(u),h=k(c,2);{var f=P=>{var E=ph();y(P,E)};U(h,P=>{e.title.type==="series"&&P(f)})}var v=k(h,2);{var g=P=>{var E=_h(),M=oe(E);G(()=>Q(M,`${e.title.length??""} min`)),y(P,E)};U(v,P=>{e.title.length&&P(g)})}var m=k(a,2),p=C(m);let w;var b=oe(p,!0),T=k(p,2);{var x=P=>{Jc(P,{get playlinks(){return e.title.providers},size:20})};U(T,P=>{i()||P(x)})}G(()=>{Q(d,` ${(e.title.imdb_score||"-")??""}`),w=ye(p,1,"heading svelte-12igath",null,w,{margin:!i()}),Q(b,e.title.title)}),ne("click",r,function(...P){var E;(E=n())==null||E.apply(this,P)}),y(t,r),ae()}Se(["click"]);var bh=S('<div class="skeleton svelte-1uz2nzg" data-testid="skeleton"><div class="poster svelte-1uz2nzg"></div> <div class="lines svelte-1uz2nzg"><div class="line svelte-1uz2nzg"></div></div></div>');function kh(t){var e=bh(),n=k(C(e),2),i=C(n);rt(i,"",{},{width:"60%"}),y(t,e)}var xh=S('<div class="svelte-pkkpyl"> </div>'),Sh=S("<div> </div>"),Th=S('<button data-testid="title"><div class="poster svelte-pkkpyl"><!></div> <div class="content svelte-pkkpyl"><div class="heading svelte-pkkpyl"> </div> <div class="meta svelte-pkkpyl"><div class="imdb svelte-pkkpyl"><!> </div> <div class="svelte-pkkpyl"> </div> <div class="svelte-pkkpyl"> </div> <!></div> <!> <!></div> <div class="action svelte-pkkpyl"><!></div></button>');function Eh(t,e){var D;re(e,!0);const n=I(e,"compact",3,!1),i=I(e,"onclick",3,()=>null),r=!!((D=window.PlayPilotLinkInjections)!=null&&D.no_affiliate);var a=Th();let o;var s=C(a),c=C(s);Aa(c,{get title(){return e.title},width:30,height:43,lazy:!0});var u=k(s,2),d=C(u),h=oe(d,!0),f=k(d,2),v=C(f),g=C(v);Ma(g,{size:11});var m=k(g),p=k(v,2),w=oe(p,!0),b=k(p,2),T=oe(b,!0),x=k(b,2);{var P=H=>{var Z=xh(),B=oe(Z);G(()=>Q(B,`${e.title.length??""} min`)),y(H,Z)};U(x,H=>{e.title.length&&H(P)})}var E=k(f,2);{var M=H=>{var Z=Sh();let B;var z=oe(Z,!0);G(()=>{B=ye(Z,1,"description svelte-pkkpyl",null,B,{large:r}),Q(z,e.title.description)}),y(H,Z)};U(E,H=>{n()||H(M)})}var O=k(E,2);{var F=H=>{{let Z=V(()=>n()?24:30);Jc(H,{get playlinks(){return e.title.providers},get size(){return l(Z)}})}};U(O,H=>{r||H(F)})}var j=k(u,2),L=C(j);Ft(L,{}),G(H=>{o=ye(a,1,"title svelte-pkkpyl",null,o,{compact:n()}),Q(h,e.title.title),Q(m,` ${(e.title.imdb_score||"-")??""}`),Q(w,e.title.year),Q(T,H)},[()=>se(`Type: ${e.title.type}`)]),ne("click",a,function(...H){var Z;(Z=i())==null||Z.apply(this,H)}),y(t,a),ae()}Se(["click"]);var Ph=S('<div class="skeleton svelte-17sb7p8" data-testid="skeleton"><div class="poster svelte-17sb7p8"></div> <div class="lines svelte-17sb7p8"><div class="line svelte-17sb7p8"></div> <div class="line svelte-17sb7p8"></div> <div class="line svelte-17sb7p8"></div></div></div>');function Ih(t){var e=Ph(),n=k(C(e),2),i=C(n);rt(i,"",{},{width:"40%"});var r=k(i,2);rt(r,"",{},{width:"60%"});var a=k(r,2);rt(a,"",{},{width:"80%"}),y(t,e)}var Ah=S(`<div class="empty svelte-4bt48"><p class="svelte-4bt48"><strong class="svelte-4bt48">No results were found</strong><br/> Sorry, we couldn't find anything matching your filter.</p></div>`);function Ch(t){var e=Ah();y(t,e)}var Mh=S("<div><!></div>"),Lh=S("<!> <!>",1),jh=S("<p>Something went wrong</p>"),Dh=S('<div role="main" data-testid="explore-results"><!> <!></div> <!>',1);function Qc(t,e){re(e,!0);const n=I(e,"searchQuery",3,""),i=I(e,"filter",19,()=>({})),r=I(e,"forceGrid",3,!1),a=I(e,"hidePlaylinks",3,!1),o=I(e,"onTitleClick",3,null);let s=1,c=Y(Oe([])),u=null,d=0,h=JSON.stringify(i())+n(),f=Y(Oe(b())),v=Y(0);const g=V(()=>r()||l(v)>500),m=V(()=>l(v)>1400?8:l(v)>900?6:l(v)>600?4:l(v)>400?3:2),p=V(()=>l(g)?wh:Eh),w=V(()=>l(g)?kh:Ih);tt(()=>{(n()||d!=0)&&T(n())}),tt(()=>{i()&&x()}),Nr(P);async function b(){d+=1;const A=d,q={page_size:24,page:s};n()&&(q.search=n()),Object.entries(i()).forEach(([W,{type:K,value:ee}])=>{if(K==="string")q[W]=ee;else if(K==="array")q[W]=ee.join(",");else if(K==="range"){const[te,ue]=ee;q[W+"_min"]=te,q[W+"_max"]=ue}});try{const W=await Ia(q)||{next:null,previous:null,results:[]};return A===d&&R(c,[...l(c),...W.results],!0),W}catch(W){throw console.log(W.status),he(ve.ExploreResultsError,null,{message:W.message||W.status.toString()||"",params:q}),new Error(W)}}async function T(A){F()&&(u&&clearTimeout(u),u=setTimeout(()=>{E(),R(f,b(),!0),A&&(he(ve.ExploreSearch,null,{query:A}),mi()&&ln(Yt.SearchQuery,{query:A}))},100))}function x(){F()&&(E(),R(f,b(),!0))}function P(){for(const A of Object.keys(i()))delete i()[A]}function E(){s=1,R(c,[],!0)}function M(){s++,R(f,b(),!0),he(ve.ExploreShowMore,null,{page:s})}function O(A,q,W){if(o()){o()(A,l(c),W);return}Yn({event:A,data:q}),he(ve.ExploreTitleClick,q)}function F(){const A=JSON.stringify(i())+n();return A===h?!1:(h=A,!0)}var j=Dh(),L=J(j);let D,H;var Z=C(L);He(Z,17,()=>l(c),Ue,(A,q,W)=>{var K=we(),ee=J(K);Ji(ee,()=>l(q).sid,te=>{var ue=we(),xe=J(ue);la(xe,()=>l(p),(Te,de)=>{de(Te,{get title(){return l(q)},get hidePlaylinks(){return a()},onclick:fe=>O(fe,l(q),W)})}),y(te,ue)}),y(A,K)});var B=k(Z,2);Sn(B,()=>l(f),A=>{var q=we(),W=J(q);He(W,16,()=>({length:24}),Ue,(K,ee)=>{var te=we(),ue=J(te);la(ue,()=>l(w),(xe,Te)=>{Te(xe,{})}),y(K,te)}),y(A,q)},void 0,A=>{});var z=k(L,2);Sn(z,()=>l(f),null,(A,q)=>{var W=V(()=>{var{next:de}=l(q);return{next:de}}),K=V(()=>l(W).next),ee=Lh(),te=J(ee);{var ue=de=>{var fe=Mh();let je;var Fe=C(fe);Bt(Fe,{size:"large",onclick:M,label:"Show more movies & shows",children:($,X)=>{var ce=Xe();G(Ee=>Q(ce,Ee),[()=>se("Show More")]),y($,ce)},$$slots:{default:!0}}),G(()=>je=ye(fe,1,"show-more svelte-qc99of",null,je,{grid:l(g)})),y(de,fe)};U(te,de=>{l(K)&&de(ue)})}var xe=k(te,2);{var Te=de=>{Ch(de)};U(xe,de=>{var fe;!((fe=l(c))!=null&&fe.length)&&s===1&&de(Te)})}y(A,ee)},A=>{var q=jh();y(A,q)}),G(()=>{D=ye(L,1,"titles svelte-qc99of",null,D,{grid:l(g)}),H=rt(L,"",H,{"--grid-columns":l(m)})}),Ct(L,"clientWidth",A=>R(v,A)),y(t,j),ae()}var Rh=Ge('<svg width="18" height="18" viewBox="0 0 19 19"><path fill="currentColor" d="M16.593,2.407a8.155,8.155,0,0,0-11.569,0A8.166,8.166,0,0,0,4.18,12.983L.38,16.8a1.3,1.3,0,0,0,0,1.837A1.372,1.372,0,0,0,1.288,19a1.3,1.3,0,0,0,.908-.38L6.017,14.8A8.172,8.172,0,0,0,16.593,2.407ZM15.327,12.688A6.4,6.4,0,1,1,17.184,8.17,6.324,6.324,0,0,1,15.327,12.688Z"></path></svg>');function Nh(t){var e=Rh();y(t,e)}var Oh=S('<div class="search svelte-1pnrmr6" role="search"><div class="icon svelte-1pnrmr6"><!></div> <input class="input svelte-1pnrmr6" type="search"/></div>');function qh(t,e){re(e,!0);let n=Y("");var i=Oh(),r=C(i),a=C(r);Nh(a);var o=k(r,2);G(s=>le(o,"placeholder",s),[()=>se("Search Movies And Shows")]),ne("input",o,()=>e.oninput(l(n))),di(o,()=>l(n),s=>R(n,s)),y(t,i),ae()}Se(["input"]);async function zh(){const t=vn();if(!t)throw new Error("No token was provided");const e={region:await Xi(),page:1,include_count:!1};let n=await Ht(`/providers/?api-token=${t}&`+Cc(e));return n=n.filter((i,r,a)=>a.findIndex(o=>o.slug===i.slug)===r),n}function Hh(t,{from:e,to:n},i={}){var{delay:r=0,duration:a=E=>Math.sqrt(E)*120,easing:o=Wv}=i,s=getComputedStyle(t),c=s.transform==="none"?"":s.transform,[u,d]=s.transformOrigin.split(" ").map(parseFloat);u/=t.clientWidth,d/=t.clientHeight;var h=Fh(t),f=t.clientWidth/n.width/h,v=t.clientHeight/n.height/h,g=e.left+e.width*u,m=e.top+e.height*d,p=n.left+n.width*u,w=n.top+n.height*d,b=(g-p)*f,T=(m-w)*v,x=e.width/n.width,P=e.height/n.height;return{delay:r,duration:typeof a=="function"?a(Math.sqrt(b*b+T*T)):a,easing:o,css:(E,M)=>{var O=M*b,F=M*T,j=E+M*x,L=E+M*P;return`transform: ${c} translate(${O}px, ${F}px) scale(${j}, ${L});`}}}function Fh(t){if("currentCSSZoom"in t)return t.currentCSSZoom;for(var e=t,n=1;e!==null;)n*=+getComputedStyle(e).zoom,e=e.parentElement;return n}var Bh=Ge('<svg width="18px" height="18px" viewBox="0 -960 960 960"><path d="M200-440v-80h560v80H200Z" fill="currentColor"></path></svg>');function Vh(t){var e=Bh();y(t,e)}var Wh=Ge('<svg width="18px" height="18px" viewBox="0 -960 960 960"><path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z" fill="currentColor"></path></svg>');function Uh(t){var e=Wh();y(t,e)}var Gh=S('<div class="icon svelte-dfwzqz"><!></div>'),Zh=S('<div><button> <div class="action svelte-dfwzqz"><!></div></button></div>'),Kh=S('<div class="header svelte-dfwzqz"><input type="text" class="input svelte-dfwzqz" aria-label="Search"/></div> <div class="options" data-testid="toggles-with-search"></div>',1);function Yh(t,e){re(e,!0);let n=I(e,"options",19,()=>[{label:"Label",value:"Value"}]),i=I(e,"selected",23,()=>[]),r=I(e,"placeholder",19,()=>`${se("Search")}...`),a=I(e,"onchange",3,()=>null),o=Y("");const s=V(c);function c(){var g;return(g=n())!=null&&g.length?l(o)?n().filter(({label:m})=>m.toLowerCase().indexOf(l(o).toLowerCase())!==-1):n():[]}function u(g){const m=i().find(p=>p===g);i(m?i().filter(p=>p!==g):[...i(),g]),a()(i())}var d=Kh(),h=J(d),f=C(h),v=k(h,2);He(v,29,()=>l(s)||[],({label:g,value:m})=>m,(g,m)=>{let p=()=>l(m).label,w=()=>l(m).value;const b=V(()=>!!i().find(F=>F===w()));var T=Zh(),x=C(T);let P;var E=C(x),M=k(E),O=C(M);Ji(O,()=>l(b),F=>{var j=Gh(),L=C(j);{var D=Z=>{Vh(Z)},H=Z=>{Uh(Z)};U(L,Z=>{l(b)?Z(D):Z(H,-1)})}ze(3,j,()=>$i,()=>({start:.25,duration:100})),y(F,j)}),G(()=>{P=ye(x,1,"option svelte-dfwzqz",null,P,{active:l(b)}),Q(E,`${p()??""} `)}),ne("click",x,()=>u(w())),vf(T,()=>Hh,()=>({duration:150})),y(g,T)}),G(()=>le(f,"placeholder",r())),di(f,()=>l(o),g=>R(o,g)),y(t,d),ae()}Se(["click"]);var Jh=S('<div class="content svelte-fg0dzp"><!></div>'),Qh=S("<div><!> <!></div>");function Xc(t,e){re(e,!0);let n=Y(!1),i=Y(null),r=Y(null),a=Y("left"),o=Y(0),s=Y(0);function c(m){const p=m.target;p&&p.closest(".dropdown")!==l(i)&&R(n,!1)}function u(m){R(n,!l(n)),l(n)&&(R(s,0),R(o,0),d(m.target))}async function d(m){if(await pr(),!l(r))return;const p=16,w=200,b=window.innerHeight,T=window.innerWidth,{top:x}=l(r).getBoundingClientRect(),{left:P}=m.getBoundingClientRect();R(a,P<window.innerWidth/2?"left":"right",!0),R(o,Math.max(Math.min(window.innerHeight-x-p,b*.6),w),!0),await pr();const{left:E,right:M}=l(r).getBoundingClientRect(),O=T-M;E-p<0?R(s,O):O-p<0&&R(s,O-p)}var h=Qh();pe("click",Ae,c);var f=C(h);$e(f,()=>e.button,()=>({toggle:u}));var v=k(f,2);{var g=m=>{var p=Jh();let w;var b=C(p);$e(b,()=>e.content),et(p,T=>R(r,T),()=>l(r)),G(()=>w=rt(p,"",w,{"--max-height":l(o)?`${l(o)}px`:null,"--offset":l(s)?`${l(s)}px`:null})),ze(3,p,()=>$i,()=>({start:tr.current?1:.85,duration:100})),y(m,p)};U(v,m=>{l(n)&&m(g)})}et(h,m=>R(i,m),()=>l(i)),G(()=>ye(h,1,`dropdown ${l(a)??""}`,"svelte-fg0dzp")),y(t,h),ae()}var Xh=S('<span class="label svelte-1mfj6k7"> </span>'),$h=S('<div class="active-line svelte-1mfj6k7"></div>'),eg=S('<div class="slider svelte-1mfj6k7"><!> <span><input type="range" id="lower"/> <input type="range" id="upper"/> <div class="value-marker svelte-1mfj6k7"> </div> <div class="value-marker right svelte-1mfj6k7"> </div> <!></span></div>');function tg(t,e){re(e,!0);const n=I(e,"range",19,()=>[0,100]),i=I(e,"step",3,1),r=I(e,"value",19,n),a=I(e,"label",3,""),o=I(e,"valueAppend",3,""),s=I(e,"formatFunction",3,q=>q.toString()),c=I(e,"onchange",3,()=>null);let u=n(),d=V(()=>ui(u,2)),h=Y(Oe(l(d)[0])),f=Y(Oe(l(d)[1]));const v=V(()=>l(h)!==n()[0]||l(f)!==n()[1]),g=V(()=>100/(n()[1]-n()[0])*(l(h)-n()[0])),m=V(()=>100+100/(n()[1]-n()[0])*(l(f)-n()[1])-l(g)),p=V(()=>Math.abs(n()[0]-n()[1])>10&&Math.abs(l(h)-l(f))<5);tt(()=>{w(r())}),tt(()=>{R(f,Math.max(l(f),l(h)+1),!0),R(f,Math.min(l(f),n()[1]),!0),R(h,Math.min(l(h),l(f)-1),!0),R(h,Math.max(l(h),n()[0]),!0)});function w(q){(W=>{var K=ui(W,2);R(h,K[0],!0),R(f,K[1],!0)})(q)}function b(){requestAnimationFrame(()=>c()([l(h),l(f)]))}var T=eg(),x=C(T);{var P=q=>{var W=Xh(),K=oe(W);G((ee,te)=>Q(K,`${a()??""}: ${ee??""}—${te??""} ${o()??""}`),[()=>s()(l(h)),()=>s()(l(f))]),y(q,W)};U(x,q=>{a()&&q(P)})}var E=k(x,2);let M;var O=C(E);let F;var j=k(O,2);let L;var D=k(j,2),H=oe(D,!0),Z=k(D,2),B=oe(Z,!0),z=k(Z,2);{var A=q=>{var W=$h();let K;G(()=>K=rt(W,"",K,{left:l(g)+"%","--width":l(m)+"%"})),y(q,W)};U(z,q=>{l(v)&&q(A)})}G(()=>{M=ye(E,1,"range svelte-1mfj6k7",null,M,{halved:l(p)}),le(O,"min",n()[0]),le(O,"max",n()[1]),le(O,"step",i()),F=ye(O,1,"svelte-1mfj6k7",null,F,{active:l(v)}),le(j,"min",n()[0]),le(j,"max",n()[1]),le(j,"step",i()),L=ye(j,1,"svelte-1mfj6k7",null,L,{active:l(v)}),Q(H,l(h)),Q(B,l(f))}),ne("mouseup",O,b),ne("touchend",O,b),ne("input",O,function(...q){}),di(O,()=>l(h),q=>R(h,q)),ne("mouseup",j,b),ne("touchend",j,b),ne("input",j,function(...q){}),di(j,()=>l(f),q=>R(f,q)),y(t,T),ae()}Se(["mouseup","touchend","input"]);function lo(t,e){if(!t)return!1;const{type:n,value:i}=t;return!(n==="array"&&!i.length||n==="range"&&JSON.stringify(i)===JSON.stringify(e))}var ng=S(" <!>",1),ig=S('<p class="loading"> </p>'),rg=S('<p class="error"> </p>'),ag=S('<div class="content svelte-er0ukh" data-testid="content"><!> <!></div>'),lg=S('<div data-testid="filter-item"><!></div>');function og(t,e){re(e,!0);let n=I(e,"filter",7),i=I(e,"onchange",3,()=>null),r=I(e,"data",7,null),a=I(e,"fetchData",3,null),o=I(e,"range",3,null),s=I(e,"step",3,1),c=I(e,"valueAppend",3,"");const u=V(()=>lo(n()[e.param],o()));let d=Y(!!a());tt(()=>{!r()&&a()&&h()});async function h(){try{R(d,!0),r(await a()())}catch{he(ve.ExploreFetchProvidersFailed)}finally{R(d,!1)}}function f(p,w){if(he(ve.ExploreSetFilter,null,{key:e.param,value:p,total_filter:n()}),!p){delete n()[e.param];return}n()[e.param]={type:w,value:p},i()()}var v=lg();let g;var m=C(v);Xc(m,{button:(b,T)=>{let x=()=>(T==null?void 0:T()).toggle;Bt(b,{variant:"border",size:"large",get active(){return l(u)},get onclick(){return x()},children:(P,E)=>{var M=ng(),O=J(M),F=k(O);Ft(F,{direction:"down"}),G(()=>Q(O,`${e.label??""} `)),y(P,M)},$$slots:{default:!0}})},content:b=>{var T=ag(),x=C(T);{var P=j=>{var L=ig(),D=oe(L);G(H=>Q(D,`${H??""}...`),[()=>se("Loading")]),y(j,L)},E=j=>{var L=rg(),D=oe(L,!0);G(H=>Q(D,H),[()=>se("An Error Occurred")]),y(j,L)};U(x,j=>{l(d)?j(P):a()&&!r()&&j(E,1)})}var M=k(x,2);{var O=j=>{const L=V(()=>{var D;return(D=n()[e.param])==null?void 0:D.value});Yh(j,{get options(){return r()},get selected(){return l(L)},onchange:D=>f(D,"array")})},F=j=>{const L=V(()=>{var D;return(D=n()[e.param])==null?void 0:D.value});tg(j,{get range(){return o()},get value(){return l(L)},get step(){return s()},get label(){return e.label},get valueAppend(){return c()},onchange:D=>f(D,"range")})};U(M,j=>{r()?j(O):o()&&j(F,1)})}y(b,T)},$$slots:{button:!0,content:!0}}),G(()=>g=ye(v,1,"filter-item svelte-er0ukh",null,g,{active:l(u)})),y(t,v),ae()}const On=Object.freeze({Popular:"-popularity",New:"-new",Best:"-best",Chronological:"-year",IMDb:"-imdb_score"});var sg=S(" <!>",1),cg=S("<button> </button>"),ug=S('<div data-testid="content"></div>');function dg(t,e){re(e,!0);const n=I(e,"filter",7),i=I(e,"onchange",3,()=>null),r=I(e,"sortings",3,null),a="ordering",o=V(()=>r()||[{label:"Popularity",value:On.Popular},{label:"New",value:On.New},{label:"Top Rated",value:On.Best},{label:"IMDb Rating",value:On.IMDb}]),s=V(()=>{var u;return((u=l(o).find(({value:d})=>{var h;return d===((h=n()[a])==null?void 0:h.value)}))==null?void 0:u.label)||"Sort By"});function c(u){u?n()[a]={type:"string",value:u}:delete n()[a],i()()}Xc(t,{button:(h,f)=>{let v=()=>(f==null?void 0:f()).toggle;Bt(h,{variant:"link",get onclick(){return v()},children:(g,m)=>{var p=sg(),w=J(p),b=k(w);Ft(b,{direction:"down"}),G(T=>Q(w,`${T??""} `),[()=>se(l(s))]),y(g,p)},$$slots:{default:!0}})},content:h=>{var f=ug();He(f,21,()=>l(o),Ue,(v,g,m,p)=>{let w=()=>l(g).label,b=()=>l(g).value;const T=V(()=>{var M;return b()===((M=n()[a])==null?void 0:M.value)});var x=cg();let P;var E=oe(x,!0);G(M=>{P=ye(x,1,"option svelte-1ibt2k4",null,P,{active:l(T)}),Q(E,M)},[()=>se(w())]),ne("click",x,()=>c(b())),y(v,x)}),y(h,f)},$$slots:{button:!0,content:!0}}),ae()}Se(["click"]);var fg=Ge('<svg height="24px" viewBox="0 -960 960 960" width="24px"><path fill="currentColor" transform="scale(1.2) translate(0, 75)" scale="1.2" d="M440-120v-240h80v80h320v80H520v80h-80Zm-320-80v-80h240v80H120Zm160-160v-80H120v-80h160v-80h80v240h-80Zm160-80v-80h400v80H440Zm160-160v-240h80v80h160v80H680v80h-80Zm-480-80v-80h400v80H120Z"></path></svg>');function vg(t){var e=fg();y(t,e)}var hg=S('<button class="item svelte-cwy6fi"><!> <!></button>'),gg=S('<div class="active-filter svelte-cwy6fi"></div>');function mg(t,e){re(e,!0);function n(a){delete e.filter[a]}function i(a){let o=a.slice(0,30).trim();return a.length>o.length&&(o+="..."),o}var r=gg();He(r,21,()=>Object.entries(e.filter),Ue,(a,o)=>{var s=V(()=>ui(l(o),2));let c=()=>l(s)[0],u=()=>l(s)[1];const d=V(()=>e.items.find(m=>c()===m.param)||{});var h=we(),f=J(h);{var v=m=>{var p=hg(),w=C(p);{var b=E=>{var M=we(),O=J(M);Sn(O,()=>{var F,j;return((j=(F=l(d)).fetchData)==null?void 0:j.call(F))||l(d).data},null,(F,j)=>{var L=Xe();G(D=>Q(L,D),[()=>{var D;return i((D=l(j))==null?void 0:D.filter(H=>u().value.includes(H.value)).map(H=>H.label).join(" + "))}]),y(F,L)}),y(E,M)},T=E=>{var M=Xe();G(O=>Q(M,`${l(d).label??""}: ${O??""}`),[()=>u().value.join(" - ")]),y(E,M)},x=E=>{var M=Xe();G(O=>Q(M,O),[()=>se(u().value)]),y(E,M)};U(w,E=>{u().type==="array"?E(b):u().type==="range"?E(T,1):E(x,-1)})}var P=k(w,2);zr(P,{size:8}),ne("click",p,()=>n(c())),y(m,p)},g=V(()=>lo(u(),l(d).range));U(f,m=>{l(g)&&m(v)})}y(a,h)}),y(t,r),ae()}Se(["click"]);var pg=S("<div><!></div>"),_g=S("<!> <!>",1),yg=S('<div class="sorting svelte-11dg01g"><!></div>'),wg=S('<div role="navigation"><div class="items svelte-11dg01g"></div> <div class="actions svelte-11dg01g"><!> <!></div></div> <!>',1);function $c(t,e){re(e,!0);const n=I(e,"limit",3,!0),i=I(e,"hideActive",3,!1),r=I(e,"showSorting",3,!0),a=I(e,"sortings",3,null),o=I(e,"searchQuery",3,""),s=I(e,"onchange",3,()=>null),c=I(e,"onempty",3,()=>null),u=3,d=[{label:se("Services"),param:"providers",fetchData:async()=>(await zh()).map(O=>({label:O.name,value:O.slug}))},{label:se("Genres"),param:"genres",data:Pa.filter(O=>parseInt(O.slug)<900).map(O=>({label:se(O.name),value:O.slug}))},{label:se("IMDb"),param:"imdb_score",range:[0,10],step:.1},{label:se("Year"),param:"year",range:[1900,new Date().getFullYear()]},{label:se("Runtime"),param:"length",range:[0,180],valueAppend:se("Minutes")},{label:se("Countries"),param:"country_codes",fetchData:async()=>(await fetch(`${Df}/src/lib/data/countries.json`)).json()},{label:se("Category"),param:"category",data:[{label:se("Movies"),value:"movie"},{label:se("Shows"),value:"series"},{label:se("Kids"),value:"kids"},{label:se("Documentary"),value:"documentary"}]}];let h=V(n),f=!1;tt(()=>{Object.keys(e.filter).some(F=>{const{range:j}=d.find(L=>F===L.param)||{};return lo(e.filter[F],j)})||o()?f=!0:f&&(f=!1,c()())});var v=wg(),g=J(v);let m;var p=C(g);He(p,21,()=>l(h)?d.slice(0,u):d,Ue,(O,F)=>{var j=pg(),L=C(j);og(L,Tn({get filter(){return e.filter},get onchange(){return s()}},()=>l(F))),ze(3,j,()=>$i,()=>({start:.75,duration:100})),y(O,j)});var w=k(p,2),b=C(w);{var T=O=>{Bt(O,{variant:"link",onclick:()=>R(h,!l(h)),children:(F,j)=>{var L=_g(),D=J(L);vg(D);var H=k(D),Z=k(H);{let B=V(()=>l(h)?"down":"up");Ft(Z,{get direction(){return l(B)}})}G(B=>Q(H,` ${B??""} `),[()=>l(h)?se("Show More"):se("Show Less")]),y(F,L)},$$slots:{default:!0}})};U(b,O=>{n()&&O(T)})}var x=k(b,2);{var P=O=>{var F=yg(),j=C(F);dg(j,{get filter(){return e.filter},get onchange(){return s()},get sortings(){return a()}}),ze(3,F,()=>Ti,()=>({x:5,duration:100})),y(O,F)};U(x,O=>{r()&&O(P)})}var E=k(g,2);{var M=O=>{mg(O,{get filter(){return e.filter},get items(){return d}})};U(E,O=>{i()||O(M)})}G(()=>m=ye(g,1,"filter svelte-11dg01g",null,m,{limit:n()})),y(t,v),ae()}function bg(t,e){re(e,!0);const n=I(e,"trackingEvent",19,()=>ve.ExploreAnyClick);function i(o){var T;const s=o.target,c=s.parentElement;if(s===document.body)return;const u=`${c==null?void 0:c.nodeName.toLowerCase()}${r(c)}`,d=`${s==null?void 0:s.nodeName.toLowerCase()}${r(s)}`,h=`${u} > ${d}`,f=s.closest("a, button"),v=a(s)||a(c)||f&&a(f),g=v?(T=v.textContent)==null?void 0:T.slice(0,30):"",m=s.getAttribute("aria-label")||(f==null?void 0:f.getAttribute("aria-label"))||(c==null?void 0:c.getAttribute("aria-label")),p=s.placeholder,w=s.alt,b=(g||m||p||w||"").trim();he(n(),null,{selector:h,text:b})}function r(o){if(!o)return"";const s=Array.from(o.classList).filter(c=>!c.startsWith("s-"));return s.length?"."+s.join("."):""}function a(o){var s;return(s=o==null?void 0:o.childNodes)!=null&&s.length&&Array.from(o.childNodes).find(c=>{var u;return c.nodeName==="#text"&&!!((u=c.textContent)!=null&&u.trim())})||null}pe("click",Ae,i),ae()}function kg(t,e){re(e,!0);const n=I(e,"trackingEvent",19,()=>ve.ExploreScrollDistance),i={25:!1,50:!1,75:!1,100:!1};function r(){const a=window.scrollY,o=window.innerHeight,u=100/(e.element.clientHeight+a+e.element.getBoundingClientRect().top)*(a+o);for(const d in i)i[d]||u<parseInt(d)||(i[d]=!0,he(n(),null,{scroll_percentage:d+"%"}))}pe("scroll",Ae,r),ae()}var xg=S('<div class="unsupported-region svelte-l2apr8"> </div>'),Sg=S('<div class="explore svelte-l2apr8"><div class="header svelte-l2apr8" role="banner"><div><div class="divider svelte-l2apr8"></div> <div class="heading svelte-l2apr8"> </div> <div class="subheading svelte-l2apr8"> </div> <p class="disclaimer svelte-l2apr8"></p></div></div> <!> <div class="filter svelte-l2apr8"><!></div> <!> <!></div> <!> <!>',1);function Tg(t,e){re(e,!0);let n=I(e,"navigate",3,()=>null),i=I(e,"searchQuery",15,""),r=I(e,"filter",27,()=>Oe({})),a=null,o=Y(null),s=Y(Oe(window.innerWidth));tt(()=>{var F;R(o,((F=a==null?void 0:a.closest(so))==null?void 0:F.style.height)||null,!0)}),lt(async()=>{he(ve.ExplorePageView),window.PlayPilotLinkInjections.ads=await Fc()});var c=Sg(),u=J(c);let d;var h=C(u),f=C(h),v=k(C(f),2),g=oe(v,!0);bt(v,F=>Ne==null?void 0:Ne(F));var m=k(v,2),p=oe(m,!0);bt(m,(F,j)=>Ne==null?void 0:Ne(F,j),()=>2);var w=k(m,2);cc(w,()=>se("Streaming Guide Disclaimer"),!0);var b=k(h,2);qh(b,{oninput:F=>i(F)});var T=k(b,2),x=C(T);{let F=V(()=>l(s)<500),j=V(()=>!i());$c(x,{get filter(){return r()},get searchQuery(){return i()},get limit(){return l(F)},get showSorting(){return l(j)},onchange:()=>n()("results"),onempty:()=>n()("home")})}var P=k(T,2);Sn(P,Hc,null,(F,j)=>{var L=we(),D=J(L);{var H=Z=>{var B=xg(),z=oe(B,!0);G(A=>Q(z,A),[()=>se("Sorry Region Not Supported")]),y(Z,B)};U(D,Z=>{l(j)||Z(H)})}y(F,L)});var E=k(P,2);$e(E,()=>e.children),et(u,F=>a=F,()=>a);var M=k(u,2);bg(M,{});var O=k(M,2);kg(O,{get element(){return a}}),G((F,j)=>{d=rt(u,"",d,{height:l(o),"--playpilot-explore-width":`${l(s)??""}px`}),Q(g,F),Q(p,j)},[()=>se("Streaming Guide"),()=>se("Streaming Guide Subheading")]),Ct(u,"clientWidth",F=>R(s,F)),y(t,c),ae()}var Eg=S('<div class="tooltip-content svelte-1ldthr7" role="paragraph"> </div>'),Pg=S('<button class="tooltip svelte-1ldthr7" data-testid="disclaimer"><div aria-label="Disclaimer">i</div> <!></button>');function oo(t,e){const n=I(e,"small",3,!1);let i=Y(!1);function r(d){d.preventDefault(),d.stopPropagation(),R(i,!l(i))}var a=Pg(),o=C(a);let s;var c=k(o,2);{var u=d=>{var h=Eg(),f=oe(h,!0);G(()=>Q(f,e.disclaimer)),ze(3,h,()=>Ot,()=>({duration:50})),y(d,h)};U(c,d=>{l(i)&&d(u)})}G(()=>s=ye(o,1,"disclaimer svelte-1ldthr7",null,s,{small:n()})),ne("click",a,r),y(t,a)}Se(["click"]);var Ig=S('<span class="category svelte-13ka2ap" data-testid="category"> </span>'),Ag=S('<span class="cta svelte-13ka2ap"> </span>'),Cg=S('<div class="playlink-content svelte-13ka2ap"><img alt="" height="36" width="36" class="svelte-13ka2ap"/> <span class="name svelte-13ka2ap"> </span> <!> <!> <div class="action svelte-13ka2ap"> </div> <!></div> <!>',1);function Ko(t,e){re(e,!0);const n=I(e,"disclaimer",3,""),i=I(e,"hideCategory",3,!1),r=I(e,"onclick",3,()=>null),a=V(()=>e.playlink.name),o=V(()=>e.playlink.url),s=V(()=>e.playlink.logo_url),c=V(()=>e.playlink.highlighted),u=V(()=>e.playlink.cta_text),d=V(()=>e.playlink.action_text),h=V(()=>e.playlink.pixels),f=V(()=>e.playlink.extra_info.category),v=V(()=>mi()&&!l(c)),g={AVOD:se("Stream"),SVOD:se("Stream"),BUY:se("Buy"),RENT:se("Rent"),TVOD:se("Rent Or Buy")};let m=Y(0);var p=we(),w=J(p);fc(w,()=>!Je("require_affiliate_consent")||Kn("affiliate")?"a":"span",!1,(b,T)=>{sa(b,()=>l(v)?zc(Yt.ProviderInterest,{provider:e.playlink.slug,source:Nn.Card}):null),sa(b,()=>l(v)?vv(Yt.ProviderClick,{provider:e.playlink.slug}):null),wc(b,()=>({onclick:r(),href:l(o),target:"_blank",class:"playlink","data-playlink":l(a),rel:"sponsored",[wi]:{highlighted:l(c),"no-category":i(),"no-subtext":!l(u)&&i()}}),void 0,void 0,void 0,"svelte-13ka2ap");var x=Cg(),P=J(x);let E;var M=C(P),O=k(M,2),F=oe(O,!0),j=k(O,2);{var L=K=>{var ee=Ig(),te=oe(ee,!0);G(ue=>Q(te,ue),[()=>g[l(f)]||se("Stream")]),y(K,ee)};U(j,K=>{i()||K(L)})}var D=k(j,2);{var H=K=>{var ee=Ag(),te=oe(ee,!0);G(()=>Q(te,l(u))),y(K,ee)};U(D,K=>{l(u)&&K(H)})}var Z=k(D,2),B=oe(Z,!0),z=k(Z,2);{var A=K=>{oo(K,{get disclaimer(){return n()},small:!0})};U(z,K=>{n()&&K(A)})}var q=k(P,2);{var W=K=>{ao(K,{get pixels(){return l(h)}})};U(q,K=>{var ee;(ee=l(h))!=null&&ee.length&&K(W)})}G((K,ee)=>{E=rt(P,"",E,{"--action-width":l(m)?`${l(m)}px`:null}),le(M,"src",K),Q(F,l(a)),Q(B,ee)},[()=>er(l(s)),()=>l(d)||se("Watch")]),Ct(Z,"clientWidth",K=>R(m,K)),y(T,x)}),y(t,p),ae()}var Mg=S('<div class="disclaimer svelte-1v1053" data-testid="commission-disclaimer"> <a href="https://playpilot.com/" target="_blank" rel="sponsored" class="svelte-1v1053">PlayPilot.com</a></div>'),Lg=S('<div class="empty svelte-1v1053" data-testid="playlinks-empty"> </div>');function jg(t,e){re(e,!0);var n=we(),i=J(n);{var r=o=>{var s=Mg(),c=C(s);G(u=>Q(c,`${u??""} `),[()=>{var u,d;return((d=(u=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:u.config)==null?void 0:d.playlinks_disclaimer_text)||se("Commission Disclaimer")}]),y(o,s)},a=o=>{var s=Lg(),c=oe(s,!0);G(u=>Q(c,u),[()=>se("Title Unavailable")]),y(o,s)};U(i,o=>{e.playlinks.length?o(r):o(a,-1)})}y(t,n),ae()}const Yo="playpilot_split_test_";function Dg({key:t}){var r,a,o;const e=(a=(r=window.PlayPilotLinkInjections)==null?void 0:r.split_test_identifiers)==null?void 0:a[t];if(e!==void 0)return e;(o=window.PlayPilotLinkInjections)!=null&&o.split_test_identifiers||(window.PlayPilotLinkInjections.split_test_identifiers={});let n=sessionStorage.getItem(Yo+t);if(!n){const s=(Math.floor(Math.random()*100)/100).toString();sessionStorage.setItem(Yo+t,s),n=s}const i=parseFloat(n);return window.PlayPilotLinkInjections.split_test_identifiers[t]=i,i}function eu(t){const e=Dg(t);return Math.floor(e*t.numberOfVariants)}function La(t){var n;const e=eu(t);return((n=t.variantNames)==null?void 0:n[e])||e.toString()}function Rg(t,e=1){return eu(t)===e}function tu(t){const e=La(t);he(ve.SplitTestView,null,{key:t.key,variant:e})}const fi={TopScrollFormat:{key:"top_scroll_format",numberOfVariants:2,variantNames:["Separated","Inline"]},DisplayAdFormat:{key:"display_ad_format",numberOfVariants:3,variantNames:["Default","Tall","Inline"]}};function Ei(t,e){const{onclick:n}=e;function i(r){return r.button!==1?null:(n(r),r)}return t.addEventListener("mouseup",i),{destroy(){t.removeEventListener("mouseup",i)}}}var Ng=S('<div class="content svelte-r7ubzi"><!></div>'),Og=S('<div class="tooltip svelte-r7ubzi" data-testid="tooltip"><!> <!></div>');function qg(t,e){let n=Y(!1);var i=Og(),r=C(i);$e(r,()=>e.children);var a=k(r,2);{var o=s=>{var c=Ng(),u=C(c);$e(u,()=>e.content),ze(1,c,()=>Ot,()=>({duration:100})),y(s,c)};U(a,s=>{l(n)&&s(o)})}ne("touchstart",i,()=>R(n,!l(n))),pe("mouseenter",i,()=>R(n,!0)),pe("mouseleave",i,()=>R(n,!1)),y(t,i)}Se(["touchstart"]);var zg=S('<div class="info svelte-qcpiki"><!></div>'),Hg=S('<img class="logo svelte-qcpiki" alt="" height="40" width="40"/>'),Fg=S('<span class="name svelte-qcpiki"> </span>'),Bg=S('<div class="subheader svelte-qcpiki"> </div>'),Vg=S('<div class="action svelte-qcpiki"> </div>'),Wg=S('<div class="cta svelte-qcpiki"><!> <div><!> <!></div> <!></div>'),Ug=S('<img class="background svelte-qcpiki" alt=""/>'),Gg=S('<video class="background svelte-qcpiki" autoplay="" playsinline="" loop=""><source type="video/mp4"/> <track kind="captions"/></video>',2),Zg=S('<div class="disclaimer svelte-qcpiki"><!></div>'),Kg=S('<a target="_blank" rel="sponsored"><!> <!> <!> <!></a>');function ja(t,e){re(e,!0);const n=I(e,"compact",3,!1),i=I(e,"slim",3,!1),r=V(()=>e.campaign.disclaimer),a=V(()=>e.campaign.content),o=V(()=>e.campaign.cta),s=V(()=>e.campaign.campaign_type),c=V(()=>l(a).header),u=V(()=>l(a).subheader),d=V(()=>l(a).header_logo),h=V(()=>l(a).image),f=V(()=>l(a).video),v=V(()=>l(o).header),g=V(()=>l(o).url),m=V(()=>l(o).subheader),p=i()&&La(fi.DisplayAdFormat)==="Tall";let w=Y(0),b=Y(null);he(ve.DisplayAdView,null,{campaign_name:e.campaign.campaign_name});function T(){he(ve.DisplayAdClick,null,{campaign_name:e.campaign.campaign_name})}Nr(()=>{l(b)&&he(ve.DisplayedAdVideoPercentage,null,{percentage:100/l(b).duration*l(b).currentTime})});var x=Kg();let P;var E=C(x);{var M=B=>{var z=zg(),A=C(z);{var q=K=>{qg(K,{content:te=>{var ue=Xe();G(()=>Q(ue,l(m))),y(te,ue)},children:(te,ue)=>{var xe=Xe("Ad");y(te,xe)}})},W=K=>{var ee=Xe();G(()=>Q(ee,l(m))),y(K,ee)};U(A,K=>{n()?K(q):K(W,-1)})}y(B,z)};U(E,B=>{l(m)&&!i()&&B(M)})}var O=k(E,2);{var F=B=>{var z=Wg(),A=C(z);{var q=de=>{var fe=Hg();G(()=>le(fe,"src",l(d))),y(de,fe)};U(A,de=>{l(d)&&de(q)})}var W=k(A,2),K=C(W);{var ee=de=>{var fe=Fg(),je=oe(fe,!0);G(()=>Q(je,l(c))),y(de,fe)};U(K,de=>{l(c)&&de(ee)})}var te=k(K,2);{var ue=de=>{var fe=Bg(),je=oe(fe,!0);G(()=>Q(je,l(u))),y(de,fe)};U(te,de=>{l(u)&&!i()&&de(ue)})}var xe=k(W,2);{var Te=de=>{var fe=Vg(),je=oe(fe,!0);G(()=>Q(je,l(v))),y(de,fe)};U(xe,de=>{l(v)&&de(Te)})}Ct(z,"clientHeight",de=>R(w,de)),y(B,z)};U(O,B=>{(l(d)||l(c)||l(u)||l(v))&&B(F)})}var j=k(O,2);{var L=B=>{var z=Ug();G(()=>le(z,"src",l(h))),y(B,z)},D=B=>{var z=Gg();z.muted=!0;var A=C(z);et(z,q=>R(b,q),()=>l(b)),G(()=>le(A,"src",l(f))),y(B,z)};U(j,B=>{l(s)==="image"&&l(h)?B(L):l(s)==="video"&&l(f)&&B(D,1)})}var H=k(j,2);{var Z=B=>{var z=Zg();let A;var q=C(z);oo(q,{get disclaimer(){return l(r)}}),G(()=>A=rt(z,"",A,{"--offset":`${l(w)??""}px`})),y(B,z)};U(H,B=>{l(r)&&B(Z)})}bt(x,(B,z)=>Ei==null?void 0:Ei(B,z),()=>({onclick:T})),G(()=>{le(x,"href",l(g)),P=ye(x,1,"display svelte-qcpiki",null,P,{compact:n(),slim:i(),tall:p})}),ne("click",x,T),y(t,x),ae()}Se(["click"]);var Yg=S('<div class="heading category svelte-1fykz2q"> </div>'),Jg=S("<!> <!>",1),Qg=S('<div class="show-more svelte-1fykz2q" data-testid="show-more"><!></div>'),Xg=S("<!> <div></div> <!>",1),$g=S('<div class="heading svelte-1fykz2q"> </div> <!> <!>',1);function em(t,e){re(e,!0);const n=I(e,"limit",3,3),i=hr("scope")==="modal",r=hr("type"),a=En("card"),o=!!Je("categorize_playlinks");let s=Y(0),c=Y(!o);const u=V(()=>Yc(e.playlinks)),d=V(()=>g(e.playlinks)),h=V(()=>o?m(l(d)):[["",l(u)]]),f=V(()=>l(s)<500||!!a||l(u).length===1);function v(P){he(i?ve.TitleModalPlaylinkClick:ve.InjectionPopoverPlaylinkClick,e.title,{playlink:P,type:r})}function g(P){const E={};for(const M of P){const{category:O}=M.extra_info;O in E||(E[O]=[]),E[O].push(M)}return E}function m(P){const E=["AVOD","SVOD","RENT","BUY"],M=[];for(const F of E)P[F]&&M.push([F,P[F]]);const O=[];for(const F of Object.values(P))for(const j of F)E.includes(j.extra_info.category)||O.push(j);return[...M,["Other",O]]}var p=$g(),w=J(p),b=oe(w,!0);bt(w,(P,E)=>Ne==null?void 0:Ne(P,E),()=>3);var T=k(w,2);jg(T,{get playlinks(){return l(u)}});var x=k(T,2);He(x,17,()=>l(h),Ue,(P,E,M,O)=>{var F=V(()=>ui(l(E),2));let j=()=>l(F)[0],L=()=>l(F)[1];var D=Xg(),H=J(D);{var Z=W=>{var K=Yg(),ee=oe(K,!0);bt(K,(te,ue)=>Ne==null?void 0:Ne(te,ue),()=>4),G(te=>Q(ee,te),[()=>se(`Category: ${j()}`)]),y(W,K)};U(H,W=>{j()&&L().length&&W(Z)})}var B=k(H,2);let z;He(B,21,()=>L().slice(0,l(c)?n():L().length),Ue,(W,K,ee)=>{var te=Jg(),ue=J(te);Ko(ue,{get playlink(){return l(K)},onclick:()=>v(l(K).name)});var xe=k(ue,2);{var Te=de=>{var fe=we(),je=J(fe);{var Fe=X=>{var ce=we(),Ee=J(ce);$e(Ee,()=>e.children),y(X,ce)},$=X=>{{let ce=V(()=>gv(a)),Ee=V(()=>a.disclaimer||"");Ko(X,{get playlink(){return l(ce)},onclick:()=>he(ve.DisplayedAdPlaylickClick,e.title,{campaign_name:a.campaign_name}),hideCategory:!0,get disclaimer(){return l(Ee)}})}};U(je,X=>{e.children?X(Fe):X($,-1)})}y(de,fe)};U(xe,de=>{a&&ee===0&&de(Te)})}y(W,te)});var A=k(B,2);{var q=W=>{var K=Qg(),ee=C(K);Bt(ee,{onclick:()=>R(c,!l(c)),size:"large",children:(te,ue)=>{var xe=Xe();G(Te=>Q(xe,Te),[()=>se("Show Count More").replace("[[count]]",(L().length-n()).toString())]),y(te,xe)},$$slots:{default:!0}}),y(W,K)};U(A,W=>{L().length>n()&&l(c)&&W(q)})}G(()=>{z=ye(B,1,"playlinks svelte-1fykz2q",null,z,{list:l(f)}),le(B,"data-testid",`category-${j()??""}`)}),Ct(B,"clientWidth",W=>R(s,W)),y(P,D)}),G(P=>Q(b,P),[()=>se("Where To Stream Online")]),y(t,p),ae()}var Jo=S('<button class="toggle svelte-7itcht"> </button>'),tm=S('<div class="paragraph svelte-7itcht" role="paragraph"> </div>'),nm=S('<div class="description svelte-7itcht"><span class="paragraph svelte-7itcht" role="paragraph"> <!> <!></span> <!></div> <!>',1);function im(t,e){re(e,!0);const n=I(e,"blurb",3,""),i=I(e,"limit",3,200),r=I(e,"onclick",3,()=>null);let a=Y(!1);const o=V(()=>e.text.slice(0,i()));function s(){R(a,!l(a)),r()()}var c=nm(),u=J(c),d=C(u),h=C(d),f=k(h);{var v=x=>{var P=Xe("...");y(x,P)};U(f,x=>{!l(a)&&e.text.length>i()&&x(v)})}var g=k(f,2);{var m=x=>{var P=Jo(),E=oe(P,!0);G(M=>Q(E,M),[()=>se("Show More")]),ne("click",P,s),y(x,P)};U(g,x=>{!l(a)&&(e.text.length>i()||n())&&x(m)})}var p=k(d,2);{var w=x=>{var P=tm(),E=oe(P,!0);G(()=>Q(E,n())),y(x,P)};U(p,x=>{l(a)&&x(w)})}var b=k(u,2);{var T=x=>{var P=Jo(),E=oe(P,!0);G(M=>Q(E,M),[()=>se("Show Less")]),ne("click",P,s),y(x,P)};U(b,x=>{l(a)&&x(T)})}G(()=>Q(h,l(a)?e.text:l(o))),y(t,c),ae()}Se(["click"]);async function rm(t){return(await Ht(`/participants/browse?api-token=${vn()}&title_sid=${t.sid}`)).results}async function Qr(t){const e=await Ht(`/participants/${t}?api-token=${vn()}`);if(!e)throw new Error("No participant was returned for sid: "+t);return e}var am=Ge('<svg width="21px" height="21px" viewBox="0 -960 960 960"><path fill="currentColor" d="M430-200h100v-180h60v-184q0-27-28.5-41.5T480-620q-53 0-81.5 14.5T370-564v184h60v180Zm-105 88.5q-73-31.5-127.5-86t-86-127.5Q80-398 80-480.5t31.5-155q31.5-72.5 86-127t127.5-86Q398-880 480.5-880t155 31.5q72.5 31.5 127 86t86 127Q880-563 880-480.5T848.5-325q-31.5 73-86 127.5t-127 86Q563-80 480.5-80T325-111.5Zm381.5-142Q800-347 800-480t-93.5-226.5Q613-800 480-800t-226.5 93.5Q160-613 160-480t93.5 226.5Q347-160 480-160t226.5-93.5ZM523-657q17-17 17-43t-17-43q-17-17-43-17t-43 17q-17 17-17 43t17 43q17 17 43 17t43-17Zm-43 177Z"></path></svg>');function lm(t){var e=am();y(t,e)}var om=S('<button class="attribution-icon svelte-1d2v314"><!></button>'),sm=S('<img loading="lazy" alt="" class="svelte-1d2v314"/> <!>',1),cm=S('<div class="attribution-overlay svelte-1d2v314"><a target="_blank" rel="external nofollow noreferrer" class="svelte-1d2v314"> </a> <a target="_blank" rel="external nofollow noreferrer" class="svelte-1d2v314"> </a> / <a target="_blank" rel="external nofollow noreferrer" class="svelte-1d2v314"> </a></div>'),um=S('<div class="image svelte-1d2v314" data-testid="participant-image"><!> <!></div>');function xl(t,e){re(e,!0);const n=I(e,"participant",3,null),i=V(()=>n()||{image_metadata:null}),r=V(()=>l(i).image_metadata);let a=Y(!1);function o(f){f.stopImmediatePropagation(),f.target.nodeName!=="A"&&(f.preventDefault(),R(a,!l(a)))}var s=um(),c=C(s);{var u=f=>{var v=sm(),g=J(v),m=k(g,2);{var p=w=>{var b=om(),T=C(b);lm(T),ne("click",b,o),y(w,b)};U(m,w=>{l(r)&&w(p)})}G(()=>le(g,"src",n().image)),y(f,v)};U(c,f=>{var v;(v=n())!=null&&v.image&&f(u)})}var d=k(c,2);{var h=f=>{var v=cm(),g=C(v),m=oe(g,!0),p=k(g),w=k(p),b=oe(w,!0),T=k(w,2),x=oe(T,!0);G(P=>{le(g,"href",l(r).source_url),Q(m,l(r).source_text),Q(p,` ${P??""} `),le(w,"href",l(r).author_url),Q(b,l(r).author_text),le(T,"href",l(r).license_url),Q(x,l(r).license_name)},[()=>se("By")]),ne("click",v,o),y(f,v)};U(d,f=>{n()&&l(r)&&l(a)&&f(h)})}y(t,s),ae()}Se(["click"]);var dm=S('<button class="participant svelte-zy7e3f" data-testid="participant"><!> <div class="name svelte-zy7e3f"> </div></button>'),fm=S('<div class="participant svelte-zy7e3f"><!> <div class="name svelte-zy7e3f"> </div></div>');function vm(t,e){re(e,!0);const n=I(e,"heading",19,()=>se("Cast"));function i(c){const u=yt(Pc(Jl(Bi()))),d={};for(const f of c){const v=ua(u,yt(f.name));d[f.sid]={participant:f,count:v}}return Object.values(d).sort((f,v)=>v.count-f.count).map(({participant:f})=>f)}async function r(c,u){if(he(ve.ParticipantClick,null,{title_source:e.title.original_title||e.title.title,participant:u.name}),!Je("open_tpi_links_in_explore")||window.location.href.includes(Je("explore_navigation_path")||"")){const d=await Qr(u.sid);Yn({event:c,type:"participant",data:d});return}window.location.href=ro(u.sid)}async function a(){const c=await rm(e.title);return c!=null&&c.length&&he(ve.TitleParticipantsView,e.title,{participants:c.map(u=>u.name).slice(0,20)}),c}var o=we(),s=J(o);Sn(s,a,c=>{fa(c,{get heading(){return n()},children:(u,d)=>{var h=we(),f=J(h);He(f,16,()=>({length:5}),Ue,(v,g)=>{var m=fm(),p=C(m);xl(p,{}),y(v,m)}),y(u,h)},$$slots:{default:!0}})},(c,u)=>{var d=we(),h=J(d);{var f=v=>{fa(v,{get heading(){return n()},children:(g,m)=>{var p=we(),w=J(p);He(w,17,()=>i(l(u)).slice(0,15),Ue,(b,T)=>{var x=dm(),P=C(x);xl(P,{get participant(){return l(T)}});var E=k(P,2),M=oe(E,!0);G(()=>Q(M,l(T).name)),ne("click",x,O=>r(O,l(T))),pe("mouseenter",x,()=>Qr(l(T).sid)),ne("touchstart",x,()=>Qr(l(T).sid)),y(b,x)}),y(g,p)},$$slots:{default:!0}})};U(h,v=>{var g;(g=l(u))!=null&&g.length&&v(f)})}y(c,d)}),y(t,o),ae()}Se(["click","touchstart"]);function hm(t,e){re(e,!0);const n=Bc(e.title);{let i=V(()=>se("Similar Titles"));yr(t,{get titles(){return n},get heading(){return l(i)},onclick:r=>he(ve.SimilarTitleClick,r,{title_source:e.title.original_title||e.title.title})})}ae()}function gm(t){const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.left="-9999px",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}var mm=Ge('<svg width="16" height="15" viewBox="0 0 16 15"><path fill="currentColor" d="M6.70138 1.36838C6.70187 0.320494 7.75924 -0.233702 8.60177 0.0939687L8.76779 0.172094L8.82345 0.203344L8.87521 0.240453L14.4748 4.35666C15.273 4.89508 15.2742 6.06459 14.4807 6.60666L8.8879 10.8586L8.83029 10.9026L8.76779 10.9367C7.90544 11.4141 6.70148 10.8588 6.70138 9.74045V9.051C6.21939 9.09485 5.65912 9.18628 5.11056 9.37034C4.41863 9.60256 3.79163 9.96387 3.33907 10.5061C2.89934 11.0331 2.56088 11.8063 2.56075 12.9924C2.56075 13.1083 2.55351 13.2694 2.50802 13.4348C2.48558 13.5162 2.34386 14.0279 1.78439 14.1965C1.18154 14.3778 0.775385 13.9725 0.706262 13.9006C0.580913 13.7702 0.500537 13.626 0.452356 13.5305C0.257874 13.1448 0.107806 12.5395 0.0402463 11.841C-0.0994489 10.3951 0.0801391 8.23145 1.2922 5.90647C2.38232 3.81585 4.09969 2.85246 5.51095 2.42209C5.94157 2.29082 6.34701 2.20931 6.70138 2.15745V1.36838ZM8.28341 1.04709C8.02513 0.904267 7.70193 1.08266 7.70138 1.36838V3.07346C6.71677 3.09168 3.72663 3.40026 2.17892 6.36838L1.98165 6.76584C0.053228 10.8548 1.56075 14.193 1.56075 12.9924C1.56118 8.17098 6.39327 7.98172 7.70138 8.01877V9.74045C7.70147 9.9908 7.94881 10.1585 8.1838 10.1008L8.28341 10.0627L13.883 5.80686C14.1412 5.66368 14.1413 5.30543 13.883 5.16233L8.28341 1.04709Z"></path></svg>');function pm(t){var e=mm();y(t,e)}var _m=Ge('<svg viewBox="0 -960 960 960" width="18px" height="18px"><path fill="currentColor" d="M440-280H280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h160v80H280q-50 0-85 35t-35 85q0 50 35 85t85 35h160v80ZM320-440v-80h320v80H320Zm200 160v-80h160q50 0 85-35t35-85q0-50-35-85t-85-35H520v-80h160q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H520Z"></path></svg>');function ym(t){var e=_m();y(t,e)}var wm=Ge('<svg viewBox="0 -960 960 960" width="18px" height="18px"><path fill="currentColor" d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z"></path></svg>');function bm(t){var e=wm();y(t,e)}var km=Ge('<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 xm(t){var e=km();y(t,e)}var Sm=S('<button class="svelte-827qd7"><!></button>'),Tm=S('<div class="content svelte-827qd7"><!></div>'),Em=S("<div><!> <!></div>");function nu(t,e){const n=I(e,"label",3,""),i=I(e,"align",3,"right");let r=Y(!1),a=Y(null);function o(v){var m;v.currentTarget===((m=l(a))==null?void 0:m.querySelector("button"))&&v.stopPropagation(),R(r,!l(r))}var s=Em();pe("click",Ae,()=>R(r,!1));var c=C(s);{var u=v=>{var g=we(),m=J(g);$e(m,()=>e.button,()=>({toggle:o})),y(v,g)},d=v=>{var g=Sm(),m=C(g);xm(m),G(()=>{le(g,"aria-label",n()),le(g,"aria-expanded",l(r))}),ne("click",g,o),y(v,g)};U(c,v=>{e.button?v(u):v(d,-1)})}var h=k(c,2);{var f=v=>{var g=Tm(),m=C(g);$e(m,()=>e.children),ze(1,g,()=>$i,()=>({duration:50,start:.85})),y(v,g)};U(h,v=>{l(r)&&v(f)})}et(s,v=>R(a,v),()=>l(a)),G(()=>ye(s,1,`context-menu ${i()??""}`,"svelte-827qd7")),y(t,s)}Se(["click"]);var Pm=S("<!> ",1),Im=S('<button class="item svelte-npfy12"><!> </button> <button class="item svelte-npfy12"><!> </button>',1);function Am(t,e){re(e,!0);let n=I(e,"url",7);const r=window.innerWidth<Un&&typeof navigator.share<"u";lt(()=>{n(n()+"?utm_source=tpi")});function a(c,u){if(!r){u(c);return}he(ve.ShareTitle,null,{title:e.title,url:si(),method:"native"}),navigator.share({title:e.title,url:n()})}function o(){he(ve.ShareTitle,null,{title:e.title,url:si(),method:"copy"}),gm(n())}function s(){he(ve.ShareTitle,null,{title:e.title,url:si(),method:"email"}),window.location.href=`mailto:?body=${n()}`}nu(t,{button:(u,d)=>{let h=()=>(d==null?void 0:d()).toggle;Bt(u,{onclick:f=>a(f,h()),children:(f,v)=>{var g=Pm(),m=J(g);pm(m);var p=k(m);G(w=>Q(p,` ${w??""}`),[()=>se("Share")]),y(f,g)},$$slots:{default:!0}})},children:(u,d)=>{var h=Im(),f=J(h),v=C(f);ym(v);var g=k(v),m=k(f,2),p=C(m);bm(p);var w=k(p);G((b,T)=>{Q(g,` ${b??""}`),Q(w,` ${T??""}`)},[()=>se("Copy URL"),()=>se("Email")]),ne("click",f,o),ne("click",m,s),y(u,h)},$$slots:{button:!0,default:!0}}),ae()}Se(["click"]);var Cm=Ge('<svg width="12" height="12" viewBox="0 0 12 12"><path stroke="currentColor" stroke-width="1.1" transform="translate(2 0)" d="M9.47461 5.37598C9.77461 5.54918 9.77461 5.98207 9.47461 6.15527L1.22461 10.9189C0.924693 11.0916 0.549804 10.8745 0.549804 10.5283L0.549805 1.00293C0.549805 0.656711 0.924691 0.439623 1.22461 0.612304L9.47461 5.37598Z"></path></svg>');function Mm(t){var e=Cm();y(t,e)}var Lm=S("<!> ",1);function jm(t,e){re(e,!0);function n(){Uc(e.title),he(ve.TrailerClick,e.title)}Bt(t,{onclick:n,children:(i,r)=>{var a=Lm(),o=J(a);Mm(o);var s=k(o);G(c=>Q(s,` ${c??""}`),[()=>se("Watch Trailer")]),y(i,a)},$$slots:{default:!0}}),ae()}var Dm=S('<div class="video-background svelte-18bbkrh" data-testid="video-background"><!></div>');function Rm(t,e){const n=I(e,"embeddable_url",3,""),i=I(e,"autoplay",3,!0);let r=Y(0),a=Y(0);const o=V(()=>Math.max(l(r),l(a)));var s=Dm(),c=C(s);no(c,{get embeddable_url(){return n()},get autoplay(){return i()},fallbackStartTime:5,muted:!0,loop:!0,showActions:!0,clickToPlay:!1}),G(()=>rt(s,`--height: ${l(o)??""}px; --width: ${l(r)??""}px;`)),Ct(s,"clientWidth",u=>R(r,u)),Ct(s,"clientHeight",u=>R(a,u)),y(t,s)}var Nm=S('<img alt=""/>'),Om=S("<div><!></div>");function qm(t,e){re(e,!0);const n=I(e,"small",3,!1),i=I(e,"offsetMute",3,!1),r=I(e,"useVideoBackground",3,!0),a=I(e,"autoplay",3,!0),o=I(e,"inline",3,!1);let s=Y(!1),c=Y(!1),u=Y(!1);tt(()=>{r()&&e.title.embeddable_url&&Wc(to(e.title.embeddable_url)).then(m=>{R(u,m,!0)})});var d=Om();let h;var f=C(d);{var v=m=>{Rm(m,{get embeddable_url(){return e.title.embeddable_url},get autoplay(){return a()}})},g=m=>{var p=we(),w=J(p);Ji(w,()=>l(c),b=>{var T=Nm();let x;G(P=>{le(T,"src",P),x=ye(T,1,"svelte-1h1ov71",null,x,{loaded:l(s),blur:l(c)})},[()=>er(l(c)?e.title.standing_poster:e.title.medium_poster)]),pe("load",T,()=>R(s,!0)),pe("error",T,()=>R(c,!0)),y(b,T)}),y(m,p)};U(f,m=>{r()&&l(u)?m(v):m(g,-1)})}G(()=>h=ye(d,1,"background svelte-1h1ov71",null,h,{small:n(),inline:o(),"offset-mute":i()})),y(t,d),ae()}var zm=S('<div class="genre svelte-1mphbln"> </div>'),Hm=S('<button class="genre expand svelte-1mphbln"> </button>'),Fm=S("<!> <!>",1);function Bm(t,e){re(e,!0);let n=Y(!1);const i=V(()=>l(n)?e.genres:[e.genres[0]]);var r=Fm(),a=J(r);He(a,17,()=>l(i),Ue,(c,u)=>{const d=V(()=>{var g;return(g=Pa.find(m=>m.slug===l(u)))==null?void 0:g.name});var h=we(),f=J(h);{var v=g=>{var m=zm(),p=oe(m,!0);sa(m,()=>mi()?zc(Yt.GenreInterest,{genre:l(d),source:Nn.Card}):null),G(w=>Q(p,w),[()=>se(l(d))]),y(g,m)};U(f,g=>{l(d)&&g(v)})}y(c,h)});var o=k(a,2);{var s=c=>{var u=Hm(),d=oe(u);G(()=>Q(d,`+${e.genres.length-1}`)),ne("click",u,()=>R(n,!0)),y(c,u)};U(o,c=>{!l(n)&&e.genres.length>1&&c(s)})}y(t,r),ae()}Se(["click"]);var Vm=S("<div> </div>"),Wm=S('<div><div class="imdb svelte-13b1w31"><!> </div> <!> <div> </div> <div class="capitalize svelte-13b1w31"> </div> <!></div>');function Um(t,e){re(e,!0);const n=I(e,"small",3,!1);var i=Wm();let r;var a=C(i),o=C(a);Ma(o,{});var s=k(o),c=k(a,2);Bm(c,{get genres(){return e.title.genres}});var u=k(c,2),d=oe(u,!0),h=k(u,2),f=oe(h,!0),v=k(h,2);{var g=m=>{var p=Vm(),w=oe(p);G(b=>Q(w,`${e.title.length??""} ${b??""}`),[()=>se("Minutes")]),y(m,p)};U(v,m=>{!n()&&e.title.length&&m(g)})}G(m=>{r=ye(i,1,"info svelte-13b1w31",null,r,{small:n()}),Q(s,` ${e.title.imdb_score??""}`),Q(d,e.title.year),Q(f,m)},[()=>se(`Type: ${e.title.type}`)]),y(t,i),ae()}var Gm=S('<div><div class="header svelte-16ajinh"><div><!></div> <div id="heading"> </div> <!> <div class="actions svelte-16ajinh"><!> <!></div></div> <div class="main svelte-16ajinh"><!> <!> <!> <!></div></div> <!>',1);function Da(t,e){var z;re(e,!0);const n=I(e,"small",3,!1),i=I(e,"useVideoBackground",3,!0),r=I(e,"useDisplayAdSplitTest",3,!1),a=!!((z=window.PlayPilotLinkInjections)!=null&&z.no_affiliate);Mr("title",e.title);const o=hr("modal"),s=V(()=>(!n()||a)&&e.title.description);let c=Y(!1);var u=Gm(),d=J(u);let h;var f=C(d),v=C(f);let g;var m=C(v);Aa(m,{get title(){return e.title},onload:()=>R(c,!0),lazy:!1});var p=k(v,2);let w;var b=oe(p,!0);bt(p,(A,q)=>Ne==null?void 0:Ne(A,q),()=>2);var T=k(p,2);Um(T,{get title(){return e.title},get small(){return n()}});var x=k(T,2),P=C(x);{var E=A=>{jm(A,{get title(){return e.title}})};U(P,A=>{e.title.embeddable_url&&A(E)})}var M=k(P,2);{let A=V(()=>Ca(e.title));Am(M,{get title(){return e.title.title},get url(){return l(A)}})}var O=k(f,2),F=C(O);{var j=A=>{im(A,{get text(){return e.title.description},get blurb(){return e.title.blurb},onclick:()=>he(ve.ExpandTitleDescription,e.title)})};U(F,A=>{l(s)&&A(j)})}var L=k(F,2);{var D=A=>{em(A,{get playlinks(){return e.title.providers},get title(){return e.title},children:(q,W)=>{var K=we(),ee=J(K);{var te=xe=>{{let Te=V(()=>En("card"));ja(xe,{get campaign(){return l(Te)}})}},ue=V(()=>r()&&En("card"));U(ee,xe=>{l(ue)&&xe(te)})}y(q,K)},$$slots:{default:!0}})};U(L,A=>{a||A(D)})}var H=k(L,2);vm(H,{get title(){return e.title}});var Z=k(H,2);hm(Z,{get title(){return e.title}});var B=k(d,2);{let A=V(()=>o==="title");qm(B,{get title(){return e.title},get small(){return n()},get useVideoBackground(){return i()},get offsetMute(){return l(A)}})}G(()=>{h=ye(d,1,"content svelte-16ajinh",null,h,{small:n()}),g=ye(v,1,"poster svelte-16ajinh",null,g,{loaded:l(c)}),w=ye(p,1,"heading svelte-16ajinh",null,w,{truncate:n()}),Q(b,e.title.title)}),y(t,u),ae()}var Zm=S('<!> <p class="empty svelte-1nq44zr"> </p>',1),Km=S("<!> ",1),Ym=S("<div><!></div>"),Jm=S('<!> <div class="title svelte-1nq44zr" data-testid="title"><!></div>',1),Qm=S("<!> Loading...",1);function Xm(t,e){re(e,!0);const n=f=>{var v=Zm(),g=J(v);i(g);var m=k(g,2),p=oe(m,!0);G(w=>Q(p,w),[()=>se("Page Not Found")]),y(f,v)},i=(f,v)=>{let g=Sa(()=>vr(v==null?void 0:v(),!1));var m=Ym();let p;var w=C(m);Bt(w,{variant:"link",onclick:()=>r()("home"),children:(b,T)=>{var x=Km(),P=J(x);Ft(P,{direction:"left"});var E=k(P);G(M=>Q(E,` ${M??""}`),[()=>se("Home")]),y(b,x)},$$slots:{default:!0}}),G(()=>p=ye(m,1,"back svelte-1nq44zr",null,p,{offset:l(g)})),y(f,m)},r=I(e,"navigate",3,()=>null);let a=Y(Oe(window.innerWidth));const o=V(()=>l(a)<Un),s=new URL(document.location.toString()).searchParams.get("sid");var c=we(),u=J(c);{var d=f=>{var v=we(),g=J(v);Sn(g,()=>Vc(s),m=>{var p=Qm(),w=J(p);i(w),y(m,p)},(m,p)=>{var w=Jm(),b=J(w);i(b,()=>!0);var T=k(b,2),x=C(T);Da(x,{get title(){return l(p)},get useVideoBackground(){return l(o)}}),y(m,w)},m=>{n(m)}),y(f,v)},h=f=>{n(f)};U(u,f=>{s?f(d):f(h,-1)})}Hi("innerWidth",f=>R(a,f,!0)),y(t,c),ae()}var $m=S("<div></div>");function ep(t,e){re(e,!0);let n=I(e,"threshold",3,100),i=I(e,"isDragging",15,!1),r=I(e,"passedThreshold",15,!1),a=I(e,"onpassed",3,()=>null),o=Y(0),s=Y(0),c=Y(null),u=Y(!1);const d=V(()=>Math.max(l(s)-l(o),0));tt(()=>{r(l(d)>n())});function h(w){if(w){i(!0),R(u,!0),R(o,w.touches[0].pageY,!0);for(const b of e.targets)b.style.transitionDuration="0ms"}}function f(w){if(w&&i()){w.preventDefault(),R(s,w.touches[0].pageY,!0),l(c).style.transform=`translateY(${l(d)}px)`;for(const b of e.targets)b.style.top=`${l(d)}px`}}function v(){if(i()){if(i(!1),r())a()();else{l(c).removeAttribute("style");for(const w of e.targets)w.style.removeProperty("transition"),requestAnimationFrame(()=>w.style.top="0px")}R(o,0),R(s,0)}}var g={start:h,move:f,end:v},m=$m();pe("touchmove",Ae,f,void 0,!0),pe("touchend",Ae,v);let p;return et(m,w=>R(c,w),()=>l(c)),G(()=>p=ye(m,1,"handle svelte-1xqgdsn",null,p,{dragging:i(),dragged:l(u)})),ne("touchstart",m,h),y(t,m),ae(g)}Se(["touchstart"]);function tl(t){function e(){return Array.from(t.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])'))}function n(a){if(a.key!=="Tab")return;const o=document.activeElement;if(!o)return;const s=e();if(!s.length)return;const[c]=s,u=s[s.length-1];a.shiftKey&&o===c&&(u.focus(),a.preventDefault()),!a.shiftKey&&o===u&&(c.focus(),a.preventDefault())}const i=document.activeElement,[r]=e();return i!=null&&i.matches(":focus-visible")&&(r==null||r.focus()),window.addEventListener("keydown",n),{destroy(){window.removeEventListener("keydown",n),i==null||i.focus()}}}function tp(){return document.scrollingElement?document.scrollingElement:document.documentElement.scrollTop?document.documentElement:document.body}var Qo=S("<div><!></div>"),np=S('<div class="prepend svelte-1rbidhv" data-view-transition-new="playpilot-title-extra"><!></div>'),ip=S('<div class="bubble svelte-1rbidhv" data-view-transition-new="playpilot-title-extra"><!></div>'),rp=S('<div class="swipe-handle svelte-1rbidhv"><!></div>'),ap=S('<div class="dialog svelte-1rbidhv" role="dialog" aria-labelledby="title" data-view-transition-new="playpilot-title-content"><!> <!> <!></div> <!>',1),lp=S('<div data-testid="modal"><!> <!> <!> <!></div>');function Ui(t,e){re(e,!0);const n=A=>{var q=Qo(),W=C(q);Wi(W,{onclick:T,"aria-label":"Close",children:(K,ee)=>{zr(K,{})},$$slots:{default:!0}}),et(q,K=>R(v,K),()=>l(v)),G(()=>ye(q,1,`close ${o()??""}`,"svelte-1rbidhv")),ze(7,q,()=>b),y(A,q)},i=I(e,"tall",3,!1),r=I(e,"wide",3,!1),a=I(e,"blur",3,!1),o=I(e,"closeButtonStyle",3,"shadow"),s=I(e,"initialScrollPosition",3,0),c=I(e,"onscroll",3,()=>null),u=I(e,"onclose",3,()=>null);let d=Y(0),h=Y(null),f=Y(null),v=Y(null),g=Y(0),m=Y(!1);const p=V(()=>l(d)<Un);tt(()=>{var A;l(d)&&R(g,((A=l(f))==null?void 0:A.offsetTop)||0,!0)}),tt(()=>{setTimeout(()=>{var A;return R(g,((A=l(f))==null?void 0:A.offsetTop)||0,!0)})}),Mr("scope","modal"),lt(()=>{const A=tp();return A.classList.add("playpilot-modal-open"),R(m,!!ts()),requestAnimationFrame(()=>requestAnimationFrame(w)),()=>{var q;document.querySelector(".modal")||A.classList.remove("playpilot-modal-open"),!ts()&&((q=history.state)!=null&&q.modal)&&history.back()}});function w(){const A=ci().querySelector("[data-modal-scroll-target]")||(window.innerWidth>Un?l(h):l(f));A==null||A.scrollTo(0,s())}function b(A){return tr.current?Ot(A,{duration:0}):l(p)?Ti(A,{duration:250,y:window.innerHeight,opacity:1}):$i(A,{duration:150,start:.85})}function T(){u()(),ha()}function x(A){A.target===l(h)&&T()}var P=lp();pe("keydown",Ae,({key:A})=>{A==="Escape"&&T()});let E,M;var O=C(P);{var F=A=>{var q=np(),W=C(q);$e(W,()=>e.prepend),ze(7,q,()=>b),y(A,q)};U(O,A=>{e.prepend&&A(F)})}var j=k(O,2);{var L=A=>{var q=ip(),W=C(q);$e(W,()=>e.bubble),ze(7,q,()=>b),y(A,q)};U(j,A=>{e.bubble&&A(L)})}var D=k(j,2);{var H=A=>{var q=rp(),W=C(q);{var K=ee=>{{let te=V(()=>[l(f),l(v)]);ep(ee,{get targets(){return l(te)},onpassed:T})}};U(W,ee=>{l(f)&&l(v)&&ee(K)})}ze(7,q,()=>b),y(A,q)};U(D,A=>{l(p)&&A(H)})}var Z=k(D,2);{var B=A=>{var q=we(),W=J(q);$e(W,()=>e.dialog),y(A,q)},z=A=>{var q=ap(),W=J(q),K=C(W);{var ee=fe=>{var je=Qo(),Fe=C(je);Wi(Fe,{get onclick(){return c_},"aria-label":"Back",children:($,X)=>{Ft($,{direction:"left"})},$$slots:{default:!0}}),G(()=>ye(je,1,`close back ${o()??""}`,"svelte-1rbidhv")),y(fe,je)};U(K,fe=>{l(m)&&fe(ee)})}var te=k(K,2);$e(te,()=>e.children??Pt);var ue=k(te,2);{var xe=fe=>{n(fe)};U(ue,fe=>{l(p)||fe(xe)})}et(W,fe=>R(f,fe),()=>l(f));var Te=k(W,2);{var de=fe=>{n(fe)};U(Te,fe=>{l(p)&&fe(de)})}pe("scroll",W,function(...fe){var je;(je=c())==null||je.apply(this,fe)}),ze(7,W,()=>b),y(A,q)};U(Z,A=>{e.dialog?A(B):A(z,-1)})}et(P,A=>R(h,A),()=>l(h)),bt(P,A=>tl==null?void 0:tl(A)),G(()=>{E=ye(P,1,"modal svelte-1rbidhv",null,E,{wide:r(),tall:i(),"background-blur":a(),"has-bubble":!!e.bubble,"has-prepend":!!e.prepend}),M=rt(P,"",M,{"--dialog-offset":`${l(g)??""}px`})}),Hi("innerWidth",A=>R(d,A,!0)),ne("click",P,x),ze(5,P,()=>Ot,()=>({duration:150})),ze(6,P,()=>Ot,()=>({duration:150,delay:100})),y(t,P),ae()}Se(["click"]);var op=S('<div class="error svelte-1bjke62"> </div>'),sp=S('<div class="loading svelte-1bjke62"><div class="bar svelte-1bjke62"></div> <div class="bar svelte-1bjke62"></div> <div class="bar svelte-1bjke62"></div></div>');function cp(t,e){re(e,!0);const n=I(e,"navigate",3,()=>null);async function i(){const s=new URL(document.location.toString()).searchParams.get("sid");if(!s)return;let c=s.startsWith("pr")?"participant":"titles-rail",u=null;if(c==="titles-rail"){const[d,h]=(await Promise.allSettled([Vc(s),Bc({sid:s})])).map(f=>f.status==="fulfilled"?f.value:null);u=[d,...h]}else c==="participant"&&(u=await Qr(s));Yn({type:c,data:u,props:{onclose:()=>n()("home")}})}var r=we(),a=J(r);Sn(a,i,o=>{Ui(o,{blur:!0,dialog:c=>{var u=sp();y(c,u)},$$slots:{dialog:!0}})},void 0,o=>{Ui(o,{blur:!0,onclose:()=>n()("home"),children:(s,c)=>{var u=op(),d=oe(u,!0);G(h=>Q(d,h),[()=>se("An Error Occurred")]),y(s,u)},$$slots:{default:!0}})}),y(t,r),ae()}var up=S("<p>An error occurred.</p>"),dp=S("<!> <!>",1);function fp(t,e){re(e,!0);const n=[{key:"home",component:Zo},{key:"results",component:Qc},{key:"title",component:Xm},{key:"modal",component:Zo,appendComponent:cp}],i=d()||n[0].key;let r=Y(Oe(n.find(({key:g})=>g===i)||n[0])),a=Y(""),o=Y(Oe({}));const s=V(()=>l(r).component),c=V(()=>l(r).appendComponent);tt(()=>{l(a)&&R(r,n.find(g=>g.key==="results"),!0)});function u(g,m=!0){R(r,n.find(w=>w.key===g)||n[0],!0);const p=new URL(document.location.toString());g!=="title"&&g!=="modal"&&p.searchParams.delete("sid"),g===n[0].key?p.searchParams.delete("route"):p.searchParams.set("route",l(r).key),m&&history.pushState({},"",p),he(ve.ExploreNavigate,null,{route:l(r).key})}function d(){return new URL(document.location.toString()).searchParams.get("route")||n[0].key}function h(){u(d(),!1)}var f=we();pe("popstate",Ae,h);var v=J(f);Wl(v,{onerror:m=>console.error(m),failed:m=>{var p=up();y(m,p)}},m=>{Tg(m,{navigate:u,get searchQuery(){return l(a)},set searchQuery(p){R(a,p,!0)},get filter(){return l(o)},set filter(p){R(o,p,!0)},children:(p,w)=>{var b=dp(),T=J(b);la(T,()=>l(s),(P,E)=>{E(P,{get searchQuery(){return l(a)},get filter(){return l(o)},navigate:u})});var x=k(T,2);la(x,()=>l(c),(P,E)=>{E(P,{navigate:u})}),y(p,b)},$$slots:{default:!0}})}),y(t,f),ae()}const so="[data-playpilot-explore]",vp="[data-playpilot-pre-consent-explore]",iu="playpilot-explore-custom-style";let Xr=null;function Sl(){var e;const t=document.querySelector(so);t&&(Tl(),(e=document.querySelector(vp))==null||e.remove(),t.innerHTML="",Xr=Nt(fp,{target:t}),gp())}function Tl(){var t;Xr&&(Zn(Xr),Xr=null,(t=document.querySelector("#"+iu))==null||t.remove())}function hp(){var c;const t=window.PlayPilotLinkInjections.config;if(!t)return!1;const{explore_navigation_selector:e,explore_navigation_label:n,explore_navigation_path:i,explore_navigation_insert_position:r}=t;if(!e||!i)return!1;(c=document.querySelector("[data-playpilot-explore-navigation-element]"))==null||c.remove();const a=document.querySelector(e);if(!a)return!1;const o=a.cloneNode(!0),s=o.nodeName==="A"?o:o.querySelector("a");return s.classList.remove("active"),s.innerText=n||"Streaming Guide",s.href=i,o.dataset.playpilotExploreNavigationElement="true",a.insertAdjacentElement(r||"afterend",o),!0}function gp(){const t=Je("explore_custom_style");if(!t)return;const e=document.createElement("style");e.textContent=t,e.id=iu,document.body.appendChild(e)}const Xo={TopScrollBackground:"topscrollBackgroundMobile",TopScrollContent:"8by1x23"};var mp=S('<img class="content-image svelte-1mt6g1y" width="728" height="90"/>'),pp=S('<img class="logo svelte-1mt6g1y" alt="" width="50" height="50"/>'),_p=S('<button class="button svelte-1mt6g1y"> </button>'),yp=S('<!> <p class="tagline svelte-1mt6g1y"> </p> <!>',1),wp=S('<div class="background svelte-1mt6g1y"></div>'),bp=S("<!> <!>",1),kp=S('<a target="_blank" tabindex="-1" rel="sponsored"><div class="content svelte-1mt6g1y"><!></div> <!></a>');function ru(t,e){re(e,!0),he(ve.TopScrollView,null,{campaign_name:e.campaign.campaign_name}),tu(fi.TopScrollFormat);const n=V(()=>e.campaign.disclaimer),i=V(()=>e.campaign.content),r=V(()=>e.campaign.cta),a=V(()=>l(i).format),o=V(()=>l(i).header),s=V(()=>l(i).header_logo),c=V(()=>l(i).image_uuid),u=V(()=>l(r).header),d=V(()=>l(r).url),h=V(()=>l(a)==="large"),f=V(()=>Wo(l(c),Xo.TopScrollBackground)),v=V(()=>Wo(l(c),Xo.TopScrollContent));let g=Y(0);function m(){he(ve.TopScrollClick,null,{campaign_name:e.campaign.campaign_name})}var p=kp();let w,b;var T=C(p),x=C(T);{var P=F=>{var j=mp();G(()=>{le(j,"src",l(v)),le(j,"alt",l(o))}),y(F,j)},E=F=>{var j=yp(),L=J(j);{var D=A=>{var q=pp();G(()=>le(q,"src",l(s))),y(A,q)};U(L,A=>{l(s)&&A(D)})}var H=k(L,2),Z=oe(H,!0),B=k(H,2);{var z=A=>{var q=_p(),W=oe(q,!0);G(()=>Q(W,l(u))),y(A,q)};U(B,A=>{l(u)&&A(z)})}G(()=>Q(Z,l(o))),y(F,j)};U(x,F=>{l(h)?F(P):F(E,-1)})}var M=k(T,2);{var O=F=>{var j=bp(),L=J(j);{var D=B=>{var z=wp();let A;G(()=>A=rt(z,"",A,{"--background":`url('${l(f)??""}')`})),y(B,z)};U(L,B=>{l(c)&&B(D)})}var H=k(L,2);{var Z=B=>{oo(B,{get disclaimer(){return l(n)}})};U(H,B=>{l(n)&&B(Z)})}y(F,j)};U(M,F=>{l(h)||F(O)})}bt(p,(F,j)=>Ei==null?void 0:Ei(F,j),()=>({onclick:m})),Gn(()=>Ct(p,"clientWidth",F=>R(g,F))),G(()=>{le(p,"href",l(d)),w=ye(p,1,"top-scroll svelte-1mt6g1y",null,w,{simple:l(h)}),b=rt(p,"",b,{"--width":`${l(g)??""}px`})}),ne("click",p,m),y(t,p),ae()}Se(["click"]);var xp=S('<a class="call-to-action svelte-1677ll3"><img alt="" width="70" height="57"/> <div><strong class="svelte-1677ll3">Looking for something else?</strong> <div>Use our streamingguide</div></div> <div class="arrow svelte-1677ll3"><!></div></a>');function Sp(t,e){re(e,!1);const n="https://cdn.jsdelivr.net/npm/@playpilot/tpi@latest/src/lib/images/titles-list.webp",i=Je("explore_navigation_path");Zl();var r=xp(),a=C(r);le(a,"src",n);var o=k(a,4),s=C(o);Ft(s,{}),G(()=>le(r,"href",i)),ne("click",r,()=>he(ve.CardToExploreCta)),y(t,r),ae()}Se(["click"]);var Tp=new Set(["$$slots","$$events","$$legacy","title","initialScrollPosition"]);function Ep(t,e){re(e,!0);const n=f=>{var v=we(),g=J(v);{var m=w=>{ru(w,{get campaign(){return o}})},p=w=>{Sp(w,{})};U(g,w=>{o?w(m):w(p,-1)})}y(f,v)},i=f=>{var v=we(),g=J(v);{var m=p=>{ja(p,{get campaign(){return s}})};U(g,p=>{s&&p(m)})}y(f,v)},r=I(e,"initialScrollPosition",3,0),a=Qi(e,Tp);Mr("modal","title");const o=En("top_scroll"),s=En("card"),c=Je("explore_insert_cta_in_tpi"),u=!!o||c&&!document.querySelector(so);let d=!1;he(ve.TitleModalView,e.title),mi()&&ln(Yt.TitleInterest,{title:e.title.title,source:Nn.Card}),lt(()=>{const f=Date.now();return()=>he(ve.TitleModalClose,e.title,{time_spent:Date.now()-f})});function h(){d||(he(ve.TitleModalScroll,e.title),d=!0)}{let f=V(()=>u?n:null),v=V(()=>s?i:null);Ui(t,{onscroll:h,get initialScrollPosition(){return r()},get bubble(){return l(f)},get prepend(){return l(v)},tall:!0,children:(g,m)=>{Da(g,Tn({get title(){return e.title}},()=>a))},$$slots:{default:!0}})}ae()}var Pp=S('<div class="read-more svelte-zuyh9b"><!></div>'),Ip=S("<p> </p> <!>",1),Ap=S('<div class="list-header svelte-zuyh9b"><div class="heading subheading svelte-zuyh9b" id="credits"> </div></div> <div class="jobs svelte-zuyh9b"></div> <!>',1),Cp=S('<div><!> <div><div class="heading svelte-zuyh9b" id="heading"> </div> <!></div></div> <div><!> <!></div>',1);function au(t,e){re(e,!0);const n=I(e,"small",3,!1),i=V(()=>e.participant.name),r=V(()=>e.participant.description),a=Oe({}),o=[{label:"Popularity",value:On.Popular},{label:"Top Rated",value:On.Best},{label:"IMDb Rating",value:On.IMDb},{label:"Year",value:On.Chronological}];let s=Y(0),c=Y("all"),u=Y(!1);const d=V(()=>({...a,participant_sid:{type:"string",value:e.participant.sid},participant_job:{type:"string",value:l(c)==="all"?null:l(c)}}));mi()&&ln(Yt.ParticipantView,{participant:e.participant.name});function h(L,D,H){Yn({event:L,type:"titles-rail",data:D,props:{initialIndex:H}})}var f=Cp(),v=J(f);let g;var m=C(v);{var p=L=>{xl(L,{get participant(){return e.participant}})};U(m,L=>{e.participant.image&&L(p)})}var w=k(m,2),b=C(w),T=oe(b,!0);bt(b,(L,D)=>Ne==null?void 0:Ne(L,D),()=>2);var x=k(b,2);{var P=L=>{var D=Ip(),H=J(D);let Z;var B=oe(H,!0),z=k(H,2);{var A=q=>{var W=Pp(),K=C(W);Bt(K,{variant:"link",onclick:()=>R(u,!l(u)),children:(ee,te)=>{var ue=Xe();G(xe=>Q(ue,xe),[()=>l(u)?se("Read Less"):se("Read More")]),y(ee,ue)},$$slots:{default:!0}}),y(q,W)};U(z,q=>{n()||q(A)})}G(()=>{Z=ye(H,1,"description svelte-zuyh9b",null,Z,{expanded:l(u)}),Q(B,l(r))}),y(L,D)};U(x,L=>{l(r)&&L(P)})}var E=k(v,2);let M;var O=C(E);{var F=L=>{var D=Ap(),H=J(D),Z=C(H),B=oe(Z,!0);bt(Z,(q,W)=>Ne==null?void 0:Ne(q,W),()=>3);var z=k(H,2);He(z,21,()=>["all",...e.participant.jobs],Ue,(q,W)=>{{let K=V(()=>l(c)===l(W));Bt(q,{variant:"border",size:"large",get active(){return l(K)},onclick:()=>R(c,l(W),!0),children:(ee,te)=>{var ue=Xe();G(xe=>Q(ue,xe),[()=>se("Job: "+l(W)).replace("Job: ","")]),y(ee,ue)},$$slots:{default:!0}})}});var A=k(z,2);{let q=V(()=>l(s)<700);$c(A,{get filter(){return a},get sortings(){return o},get limit(){return l(q)},hideActive:!0})}G(q=>Q(B,q),[()=>se("Credits")]),y(L,D)};U(O,L=>{n()||L(F)})}var j=k(O,2);Qc(j,{forceGrid:!0,hidePlaylinks:!0,get filter(){return l(d)},onTitleClick:h}),G(()=>{g=ye(v,1,"header svelte-zuyh9b",null,g,{small:n(),"no-image":!e.participant.image}),Q(T,l(i)),M=ye(E,1,"content svelte-zuyh9b",null,M,{small:n()})}),Ct(E,"clientWidth",L=>R(s,L)),y(t,f),ae()}var Mp=new Set(["$$slots","$$events","$$legacy","participant","initialScrollPosition"]);function Lp(t,e){re(e,!0);const n=I(e,"initialScrollPosition",3,0),i=Qi(e,Mp);he(ve.ParticipantModalView,null,{participant:e.participant.name}),lt(()=>{const r=Date.now();return()=>he(ve.ParticipantModalClose,null,{participant:e.participant.name,time_spent:Date.now()-r})}),Ui(t,Tn({get initialScrollPosition(){return n()}},()=>i,{closeButtonStyle:"flat",tall:!0,wide:!0,blur:!0,children:(r,a)=>{au(r,{get participant(){return e.participant}})},$$slots:{default:!0}})),ae()}function jp(t,e=!0){if(!document.startViewTransition||!e){t();return}document.startViewTransition(()=>{const n=document.querySelectorAll("[data-view-transition-old]");if(t(),!n.length)return;document.querySelectorAll("[data-view-transition-new]").forEach(r=>{r.style.viewTransitionName=r.dataset.viewTransitionNew||""})})}var Dp=Ge('<svg viewBox="0 -960 960 960" width="24px" height="24px" fill="currentColor"><path d="m480-320 160-160-56-56-64 64v-168h-80v168l-64-64-56 56 160 160Zm0 240q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"></path></svg>');function Rp(t){var e=Dp();y(t,e)}var Np=S('<div class="scroll-indicator svelte-wxwoko"><div class="scroll-indicator-icon svelte-wxwoko"><!></div></div>'),Op=S('<div class="bubble svelte-wxwoko" data-view-transition-old=""><!></div>'),qp=S('<div class="append svelte-wxwoko" data-view-transition-old=""><!></div>'),zp=S('<div tabindex="-1" aria-hidden="true"><div class="dialog svelte-wxwoko" data-view-transition-old=""><!> <!></div> <!> <!></div>');function Hp(t,e){re(e,!0),Mr("scope","popover");const n=e.bubble&&Rg(fi.TopScrollFormat,1),i=V(()=>({duration:tr.current?0:100,y:10}));let r=Y(null),a=Y(!1),o=Y(!0),s=Y(!1),c=Y(0),u=Y(0),d=Y(0);lt(async()=>{await pr(),h(),await v(),e.append&&requestAnimationFrame(()=>{f(),v()}),await pr(),m()});function h(){if(!l(r))return;const{top:L,right:D,bottom:H,height:Z}=l(r).getBoundingClientRect(),B=g();R(a,L-B<0&&window.innerHeight-H>L+Z,!0);const z=window.innerWidth-D-B;D+B>window.innerWidth&&(l(r).style.left=`${z}px`)}function f(){R(o,l(c)>450)}async function v(){if(R(d,0),await new Promise(A=>requestAnimationFrame(A)),!l(r))return;const{top:L,height:D}=l(r).getBoundingClientRect(),H=g(),Z=e.append?parseInt(window.getComputedStyle(l(r)).gap):0,B=l(o)?l(u)+Z:0,z=l(a)?window.innerHeight-L-H-B:L+D-B-H;R(d,Math.min(z,window.innerHeight*.8),!0)}function g(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function m(){var B;if(!((B=l(r))!=null&&B.firstChild))return;const L=l(r).firstChild,{offsetHeight:D,scrollHeight:H,scrollTop:Z}=L;H<=D?R(s,!1):R(s,Z+D<H)}var p=zp();let w,b;var T=C(p),x=C(T);$e(x,()=>e.children);var P=k(x,2);{var E=L=>{var D=Np(),H=C(D),Z=C(H);Rp(Z),ze(3,D,()=>Ot,()=>({duration:100})),y(L,D)};U(P,L=>{l(s)&&L(E)})}var M=k(T,2);{var O=L=>{var D=Op(),H=C(D);$e(H,()=>e.bubble),ze(7,D,()=>Ti,()=>l(i)),y(L,D)};U(M,L=>{e.bubble&&L(O)})}var F=k(M,2);{var j=L=>{var D=qp(),H=C(D);$e(H,()=>e.append),ze(7,D,()=>Ti,()=>l(i)),Ct(D,"clientHeight",Z=>R(u,Z)),y(L,D)};U(F,L=>{e.append&&l(o)&&L(j)})}et(p,L=>R(r,L),()=>l(r)),G(()=>{w=ye(p,1,"popover svelte-wxwoko",null,w,{flip:l(a),inline:n,"has-bubble":!!e.bubble&&n}),b=rt(p,"",b,{"--max-height":l(d)?l(d)+"px":null})}),pe("scroll",T,m),ze(7,T,()=>Ti,()=>l(i)),Ct(p,"clientHeight",L=>R(c,L)),y(t,p),ae()}var Fp=S('<div class="injection-popover svelte-1laomht" data-playpilot-injection-popover="" role="region" aria-labelledby="heading"><!></div>');function $o(t,e){re(e,!0);const n=h=>{var f=we(),v=J(f);{var g=m=>{ru(m,{get campaign(){return a}})};U(v,m=>{a&&m(g)})}y(h,f)},i=h=>{var f=we(),v=J(f);{var g=m=>{ja(m,{get campaign(){return o},compact:!0})};U(v,m=>{o&&m(g)})}y(h,f)},r=I(e,"type",3,"title");Mr("type",r());const a=En("top_scroll"),o=En("card");let s=Y(null);r()==="title"&&he(ve.InjectionPopoverView,e.data,{type:r()}),r()==="participant"&&he(ve.InjectionPopoverView,null,{type:r(),participant:e.data.name}),mi()&&r()==="title"&&ln(Yt.TitleInterest,{title:e.data.title,source:Nn.Card}),lt(()=>{c();const h=Date.now();return()=>{const f=Date.now()-h;r()==="title"&&he(ve.InjectionPopoverClose,e.data,{type:r(),time_spent:f}),r()==="participant"&&he(ve.InjectionPopoverClose,null,{type:r(),participant:e.data.name,time_spent:f})}});function c(){const h=e.event.target;if(!(h!=null&&h.getClientRects))return;const f=Array.from(h.getClientRects()),g=f.map(p=>p.x).map(p=>Math.abs(p-e.event.clientX)),m=f[g.indexOf(Math.min(...g))];l(s).style.top=m.top+window.scrollY+"px",l(s).style.left=m.left+window.scrollX+"px",l(s).style.height=m.height+"px"}var u=Fp(),d=C(u);{let h=V(()=>o?i:null),f=V(()=>a?n:null);Hp(d,{get append(){return l(h)},get bubble(){return l(f)},children:(v,g)=>{var m=we(),p=J(m);{var w=T=>{Da(T,{get title(){return e.data},small:!0})},b=T=>{au(T,{get participant(){return e.data},small:!0})};U(p,T=>{r()==="title"?T(w):r()==="participant"&&T(b,1)})}y(v,m)},$$slots:{default:!0}})}et(u,h=>R(s,h),()=>l(s)),y(t,u),ae()}let va=null,Bn=null;function Bp(t,e){if(window.matchMedia("(pointer: coarse)").matches)return;Bn&&Ra();const n=t.currentTarget;va=n,setTimeout(()=>{if(va!==n)return;const i=ci();e.type==="title"?Bn=Nt($o,{target:i,props:{event:t,type:"title",data:e.title_details}}):e.type==="participant"&&(Bn=Nt($o,{target:i,props:{event:t,type:"participant",data:e.participant_details}}))},100)}async function Ra(t=!0){if(Bn){const e=Zn(Bn,{outro:t});va=null,Bn=null,await e}document.querySelectorAll("[data-playpilot-injection-popover]").forEach(e=>e.remove())}function Vp(t){if(!Bn)return;const e=t.target;e.hasAttribute("data-playpilot-injection-popover")||e.closest("[data-playpilot-injection-popover]")||e.hasAttribute(Pn)||e.closest(Cn)||Ra()}function Wp(){va=null}function Up(){return!!Bn}var Gp=S("<!> ",1),Zp=S('<div class="back svelte-29uorr"><!></div>'),Kp=S('<!> <div class="close svelte-29uorr"><!></div>',1);function Yp(t,e){re(e,!0);const n=I(e,"label",3,""),i=I(e,"onclose",3,()=>null);var r=Kp(),a=J(r);{var o=u=>{var d=Zp(),h=C(d);Bt(h,{variant:"link",onclick:()=>{i()(),ha()},children:(f,v)=>{var g=Gp(),m=J(g);Ft(m,{direction:"left"});var p=k(m);G(()=>Q(p,` ${n()??""}`)),y(f,g)},$$slots:{default:!0}}),y(u,d)};U(a,u=>{n()&&u(o)})}var s=k(a,2),c=C(s);Wi(c,{size:"42px",onclick:()=>{i()(),ha()},"aria-label":"Close",children:(u,d)=>{zr(u,{size:24})},$$slots:{default:!0}}),ze(7,s,()=>$i),y(t,r),ae()}var Jp=new Set(["$$slots","$$events","$$legacy","items","initialIndex","onchange","onclose","each"]),Qp=S('<div class="ad svelte-c2erhr"><!></div>'),Xp=S('<div class="content svelte-c2erhr"><!></div>'),$p=S("<div><!></div>"),e_=S('<button class="arrow left svelte-c2erhr" aria-label="Previous" aria-live="polite"><!></button>'),t_=S('<button class="arrow right svelte-c2erhr" aria-label="Next" aria-live="polite"><!></button>'),n_=S("<!> <!>",1),i_=S('<div><!></div> <div class="close svelte-c2erhr"><!></div>',1);function r_(t,e){re(e,!0);const n=m=>{var p=we(),w=J(p);{var b=x=>{var P=Qp(),E=C(P);ja(E,{get campaign(){return l(f)},slim:!0}),y(x,P)},T=V(()=>l(f)&&La(fi.DisplayAdFormat)!=="Inline");U(w,x=>{l(T)&&x(b)})}y(m,p)},i=I(e,"initialIndex",3,0),r=I(e,"onchange",3,()=>null),a=I(e,"onclose",3,()=>null),o=Qi(e,Jp);let s,c=Y(!1),u=Oe(tr.current?0:300),d=Y(null),h=Y(null),f=Y(Oe(En("card")));l(f)&&tu(fi.DisplayAdFormat),lt(()=>{g(),requestAnimationFrame(()=>{i()!==0&&(s==null||s.setIndex(i())),requestAnimationFrame(()=>{s==null||s.reposition(),R(c,!0)})})});function v(m){r()(m),s.setIndex(m)}function g(){if(!l(f)){R(d,null);return}const m=document.querySelector(".modal");R(d,window.innerHeight-(l(h).getBoundingClientRect().top+m.scrollTop+parseInt(window.getComputedStyle(m).paddingBottom)))}pe("resize",Ae,g),pe("updateads",Ae,()=>R(f,En("card"),!0)),Ui(t,Tn({blur:!0,get onclose(){return a()},get prepend(){return n}},()=>o,{dialog:p=>{var w=i_(),b=J(w);let T,x;var P=C(b);{const O=(L,D)=>{let H=()=>(D==null?void 0:D()).currentIndex;var Z=we(),B=J(Z);He(B,17,()=>e.items,Ue,(z,A,q)=>{const W=V(()=>H()===q);var K=$p();let ee;var te=C(K);{var ue=Te=>{var de=Xp(),fe=C(de);$e(fe,()=>e.each,()=>l(A),H),G(()=>le(de,"data-modal-scroll-target",l(W)?"":null)),ze(3,de,()=>Ot,()=>({duration:l(c)?u:0})),y(Te,de)},xe=V(()=>Math.abs(q-H())===1||l(W));U(te,Te=>{l(xe)&&Te(ue)})}G(()=>{ee=ye(K,1,"item svelte-c2erhr",null,ee,{active:l(W)}),le(K,"data-active-index",l(W)?q:null)}),ne("click",K,()=>v(q)),y(z,K)}),y(L,Z)},F=(L,D)=>{let H=()=>(D==null?void 0:D()).currentIndex,Z=()=>(D==null?void 0:D()).reachedEnd;var B=n_(),z=J(B);{var A=K=>{var ee=e_(),te=C(ee);Ft(te,{size:21,direction:"left",title:"Previous"}),ne("click",ee,()=>v(H()-1)),y(K,ee)};U(z,K=>{H()>0&&K(A)})}var q=k(z,2);{var W=K=>{var ee=t_(),te=C(ee);Ft(te,{size:21,title:"Next"}),ne("click",ee,()=>v(H()+1)),y(K,ee)};U(q,K=>{Z()||K(W)})}y(L,B)};let j=V(()=>l(c)?u:0);et(Gc(P,{threshold:40,moveThreshold:40,get transitionDuration(){return l(j)},children:O,controls:F,$$slots:{default:!0,controls:!0}}),L=>s=L,()=>s)}et(b,O=>R(h,O),()=>l(h));var E=k(b,2),M=C(E);{let O=V(()=>window.location.href.includes("route=modal")?se("Explore All Movies And Shows"):"");Yp(M,{get onclose(){return a()},get label(){return l(O)}})}G(()=>{T=ye(b,1,"rail-modal svelte-c2erhr",null,T,{initialized:l(c)}),x=rt(b,"",x,{"--transition-duration":`${u}ms`,"--available-height":l(d)&&l(d)+"px"})}),y(p,w)},$$slots:{dialog:!0}})),ae()}Se(["click"]);var a_=new Set(["$$slots","$$events","$$legacy","titles","initialIndex","onclose"]);function l_(t,e){re(e,!0);const n=I(e,"initialIndex",3,0),i=I(e,"onclose",3,()=>null),r=Qi(e,a_);r_(t,Tn({get items(){return e.titles},get initialIndex(){return n()},get onclose(){return i()},onchange:o=>he(ve.ExploreTitleRailSetIndex,e.titles[o],{index:o})},()=>r,{each:(o,s=Pt,c=Pt)=>{{let u=V(()=>{var h;return s().sid===((h=e.titles[c()])==null?void 0:h.sid)}),d=V(()=>La(fi.DisplayAdFormat)==="Inline");Da(o,{get title(){return s()},get useVideoBackground(){return l(u)},get useDisplayAdSplitTest(){return l(d)}})}},$$slots:{each:!0}})),ae()}const ct=[];function Yn({type:t="title",event:e=null,injection:n=null,data:i=null,scrollPosition:r=0,returnToTitle:a=null,props:o={}}={}){if(e&&Rc(e))return;e==null||e.preventDefault(),ct!=null&&ct.length&&co();const s=ci(),c={initialScrollPosition:r,...o},u=o_({type:t,target:s,data:i,props:c});a&&es({type:t,injection:n,data:a}),es({type:t,injection:n,data:i,scrollPosition:r,component:u})}function o_({type:t="title",target:e,data:n,props:i={}}){return t==="participant"?Nt(Lp,{target:e,props:{participant:n,...i}}):t==="titles-rail"?Nt(l_,{target:e,props:{titles:n,...i}}):Nt(Ep,{target:e,props:{title:n,...i}})}function es({type:t="title",injection:e=null,data:n,scrollPosition:i=0,component:r}){ct.push({type:t,injection:e,data:n,scrollPosition:i,component:r})}function co(t=!0){ct.length&&(u_(),Zn(ct[ct.length-1].component,{outro:t}))}function s_(t=!0){co(t),ct.pop()}function ha(t=!0){for(co(t);ct.length>0;)ct.pop()}function ts(){return ct[ct.length-2]||null}function c_(){if(ct.length<2)return;s_();const t=ct.pop();t&&Yn({...t})}function u_(){var n;const t=window.innerWidth>Un?".modal":".dialog",e=ci().querySelector("[data-modal-scroll-target]")||ci().querySelector(t);e!=null&&e.scrollTop&&(ct[ct.length-1].scrollPosition=e.scrollTop,ct[ct.length-1].props={initialIndex:parseInt(((n=ci().querySelector("[data-active-index]"))==null?void 0:n.dataset.activeIndex)||"0")})}function d_(t,e){if(Rc(t))return;let n=t.target;if(!n||(n.hasAttribute(Pn)||(n=n.closest(Cn)),!n))return;const i=n.getAttribute(Pn);if(!i)return;const r=e.find(a=>i===a.key);r&&(t.preventDefault(),jp(()=>{const a=r.title_details||r.participant_details;Ra(!1),Yn({event:t,injection:r,data:a,type:r.type})},!tr.current&&window.innerWidth>=Un&&!window.matchMedia("(pointer: coarse)").matches))}var f_=S(' <span class="svelte-1to4glm"><button class="svelte-1to4glm"> </button></span>',1),v_=S('<!> <a target="_blank"> </a>',1),h_=S(" <!>.",1),g_=S("<!> <br/>",1),m_=S(" <br/>",1),p_=S('<span class="svelte-1to4glm"><!></span>'),__=S('<p class="svelte-1to4glm"></p>');function y_(t,e){re(e,!0);const n=I(e,"onclickmodal",3,()=>null);function i(c,u){he(ve.AfterArticlePlaylinkClick,c,{playlink:u})}function r(c,u,d){he(ve.AfterArticleModalButtonClick,u),n()(c,d)}var a=we(),o=J(a);{var s=c=>{var u=__();He(u,21,()=>e.linkInjections,Ue,(d,h)=>{const f=V(()=>l(h)),v=V(()=>{var b;return((b=l(f).title_details)==null?void 0:b.providers)||[]});var g=p_(),m=C(g);{var p=b=>{var T=g_(),x=J(T);{var P=M=>{var O=f_(),F=J(O),j=k(F),L=C(j),D=oe(L,!0);G((H,Z)=>{Q(F,`"${l(f).title??""}" ${H??""} `),Q(D,Z)},[()=>se("Is Available To Stream"),()=>se("View Streaming Options")]),ne("click",j,H=>H.stopPropagation()),ne("click",L,H=>r(H,l(f).title_details,l(h))),y(M,O)},E=M=>{var O=h_(),F=J(O),j=k(F);He(j,17,()=>l(v),Ue,(L,D,H)=>{let Z=()=>l(D).name,B=()=>l(D).url;var z=v_(),A=J(z);{var q=ee=>{var te=Xe();G(ue=>Q(te,ue),[()=>H===l(v).length-1?`, ${se("And")}`:","]),y(ee,te)};U(A,ee=>{H&&ee(q)})}var W=k(A,2),K=oe(W,!0);G(()=>{le(W,"href",B()),Q(K,Z())}),ne("click",W,()=>i(l(f).title_details,Z())),y(L,z)}),G(L=>Q(F,`"${l(f).title??""}" ${L??""} `),[()=>se("Is Available To Stream On")]),y(M,O)};U(x,M=>{l(f).after_article_style==="modal_button"?M(P):M(E,-1)})}y(b,T)},w=b=>{var T=m_(),x=J(T);G(P=>Q(x,`"${l(f).title??""}" ${P??""} `),[()=>se("Title Unavailable Suffix")]),y(b,T)};U(m,b=>{l(v).length?b(p):b(w,-1)})}G(()=>le(g,"data-playpilot-injection-key",l(f).key)),y(d,g)}),y(c,u)};U(o,c=>{e.linkInjections.length&&c(s)})}y(t,a),ae()}Se(["click"]);let dr=null;function w_(t,e){var o,s;if(dr||!e.length)return;const n=document.createElement("div"),i=(o=window.PlayPilotLinkInjections)==null?void 0:o.after_article_selector,r=(i?document.querySelector(i):null)||t[t.length-1],a=((s=window.PlayPilotLinkInjections)==null?void 0:s.after_article_insert_position)||"afterend";n.dataset.playpilotAfterArticlePlaylinks="true",r.insertAdjacentElement(a,n),dr=Nt(y_,{target:n,props:{linkInjections:e,onclickmodal:(c,u)=>Yn({event:c,injection:u,data:u.title_details})}})}function b_(){var t;dr&&(Zn(dr),(t=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||t.remove(),dr=null)}var k_=S('<p class="svelte-1epbbn0"> </p>');function x_(t,e){re(e,!1),Zl();var n=k_(),i=oe(n,!0);G(r=>Q(i,r),[()=>{var r,a;return((a=(r=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:r.config)==null?void 0:a.in_text_disclaimer_text)||se("In-Text Disclaimer")}]),y(t,n),ae()}let fr=null;function S_(t){if(!Je("in_text_disclaimer_enabled")||fr)return;const e=document.createElement("div"),n=Je("in_text_disclaimer_selector"),i=(n?document.querySelector(n):null)||t[0],r=Je("in_text_disclaimer_insert_position")||"beforebegin";e.dataset.playpilotInTextDisclaimer="true",i.insertAdjacentElement(r,e),fr=Nt(x_,{target:e})}function T_(){var t;fr&&(Zn(fr),(t=document.querySelector("[data-playpilot-in-text-disclaimer]"))==null||t.remove(),fr=null)}var E_=S('<div class="widget svelte-l6zazf" data-testid="widget"><!></div>');function P_(t,e){re(e,!0);let n=Y(null);const i=V(()=>{var c,u;return((u=(c=l(n))==null?void 0:c.parentNode)==null?void 0:u.dataset.heading)||se("Mentioned In This Article")}),r=V(()=>{const c=[];return e.linkInjections.forEach(u=>{const d=u.title_details;d&&(c.some(h=>h.sid===d.sid)||c.push(d))}),c});var a=we(),o=J(a);{var s=c=>{var u=E_(),d=C(u);{let h=V(()=>!!Je("open_tpi_links_in_explore"));yr(d,{get titles(){return l(r)},get heading(){return l(i)},get navigateToExplore(){return l(h)},onclick:f=>he(ve.WidgetArticleRailTitleClick,f)})}et(u,h=>R(n,h),()=>l(n)),y(c,u)};U(o,c=>{l(r).length&&c(s)})}y(t,a),ae()}const I_={"tpi-rail":P_},A_="[data-playpilot-widget]";let El=[];function C_(t){if(lu(),!t.length)return;document.querySelectorAll(A_).forEach(n=>{const i=n.dataset.playpilotWidget||"",r=I_[i];if(!r)return;const a=Nt(r,{target:n,props:{linkInjections:t}});El.push(a)})}function lu(){El.forEach(t=>Zn(t)),document.querySelectorAll("[data-playpilot-widget]").forEach(t=>t.innerHTML=""),El=[]}const Pn="data-playpilot-injection-key",Cn=`[${Pn}]`;function M_(t,e={aiInjections:[],manualInjections:[]}){uo(),O_();const n=q_(e);if(!n.length)return[];const i=yt(t.map(d=>d.innerText).join(" ")),a=z_(n).filter(d=>i.includes(yt(d.sentence))),{injections:o,failedMessages:s}=F_(a);let c=-1;for(const d of B_(o)){if(c++,!d.manual&&d.type==="participant"&&!W_(n,d.participant_details)){s[d.key]="Participant does not meet popularity threshold.";continue}const h=t.findIndex(P=>yt(P.innerText).includes(yt(d.sentence))),f=t[h];if(!f)continue;const v=Oo(d.title,f,["A"]);if(!(v!=null&&v.nodeValue)||qo(v)){const P=Oo(d.title,f);if(P&&qo(P)){s[d.key]="Given text is already inside of a link.";continue}}const{injectionElement:g,linkElement:m}=L_(d);let p=-1,w=!1;ua(f.innerHTML,d.title)===1&&(p=f.innerHTML.indexOf(d.title));const{phrase_before:T,phrase_after:x}=j_(f,d);if(p===-1&&(T||x)){const P=[T,d.title,x].filter(Boolean).join(" ");if(p=f.innerHTML.indexOf(P),p===-1){let E=Xf(f.innerHTML,d.title,T||"",x||"");if(E){if(E.match.includes(">")&&E.match.includes("<")){const L=Lc(d.title),D=E.match.search(new RegExp(`>s*${L}s*<`))+1;D>0&&(E={match:E.match.slice(D,D+L.length),index:D})}const{leadingSpaces:M,trailingSpaces:O}=$f(E.match);m.innerHTML=E.match.trim();const F=E.index+M,j=E.index+E.match.length-O;if(f.innerHTML.slice(F,j).includes("href="))continue;nl(f.innerHTML,d.title,f,g,F,j)&&(p=E.index,w=!0)}}}if(p===-1&&(v!=null&&v.nodeValue)){const P=f.innerHTML.indexOf(v.nodeValue),E=f.innerHTML.indexOf(d.sentence),M=E===-1?f.innerHTML.indexOf(d.sentence.slice(0,20)):-1,O=d.sentence.split(" ")[0],j=ua(f.innerHTML,O)===1?f.innerHTML.indexOf(O):-1,L=Zf(a.slice(0,c+1),d,["title","sentence"])-1,D=ev(v.nodeValue,f,L);p=Math.max(P,M,D,j,E,0)}if(p!==-1&&!w&&!nl(f.innerHTML,d.title,f,g,p)){const P=nv(d.title,f.innerHTML);P>-1?nl(f.innerHTML,d.title,f,g,P):s[d.key]="Injection would have lead to broken HTML."}}R_(a),D_();const u=H_(n);return u.length&&w_(t,u),document.querySelector(Cn)&&S_(t),C_(a),n.filter(d=>du(d)).map((d,h)=>{const f=!d.manual&&V_(d,h,n),v=d.duplicate??f;v&&(s[d.key]=f?"Injection was manually removed.":"Injection was marked as duplicate.");const g=document.querySelector(`[${Pn}="${d.key}"]`),m=Na(d)&&!d.inactive&&!d.removed&&!d.after_article&&!g,p=m&&t.some(b=>yt(b.innerText).includes(yt(d.sentence))),w=m?s[d.key]||(p?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...d,inactive:d.inactive??!1,duplicate:v,failed:m,failed_message:w,matchingElement:g}})}function L_(t){var o,s,c;const e=document.createElement("span");e.dataset.playpilotInjectionKey=t.key,e.dataset.playpilotInjectionType=t.type;const n=!!Je("open_tpi_links_in_explore"),i=((o=t.title_details)==null?void 0:o.sid)||((s=t.participant_details)==null?void 0:s.sid),r=n?ro(i):t.type==="title"?Ca(t.title_details):io(t.participant_details),a=document.createElement("a");return a.innerText=t.title,a.href=r,a.target=n?"":"_blank",a.rel="noopener nofollow noreferrer",t.type==="title"&&(a.dataset.playpilotPosterUrl=(c=t.title_details)==null?void 0:c.standing_poster),e.insertAdjacentElement("beforeend",a),{injectionElement:e,linkElement:a}}function nl(t,e,n,i,r,a=-1){const o=d=>Array.from(d.querySelectorAll(`a, ${Cn}`)).filter(h=>!h.innerText).length,s=document.createElement("div");s.innerHTML=t;const c=o(s),u=s.innerText;return a>0?s.innerHTML=Jf(t,i.outerHTML,r,a):s.innerHTML=Yf(t,e,i.outerHTML,r),Math.abs(s.innerText.length-u.length)>1||c!=o(s)?!1:(n.innerHTML=s.innerHTML,!0)}function j_(t,e){const{phrase_before:n,phrase_after:i}=e;if(n||i)return{phrase_before:n,phrase_after:i};if(ua(t.innerText,e.title)!==1)return{phrase_before:null,phrase_after:null};const a=t.innerText.indexOf(e.title),o=Dc(t,a,a+e.title.length);return{phrase_before:o.before,phrase_after:o.after}}function D_(){const t=Array.from(document.querySelectorAll(`${Cn} a`)),e=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-font-weight-headings","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];for(const n of t){const i=getComputedStyle(n);for(const r of e)i.getPropertyValue(r)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${r}`)}}function R_(t){window.addEventListener("mousemove",Vp),window.addEventListener("click",n=>{Je("open_tpi_links_in_explore")||d_(n,t)}),document.querySelectorAll(Cn).forEach(n=>{const i=n.dataset.playpilotInjectionKey,r=t.find(a=>i===a.key);r&&(n.addEventListener("mouseenter",a=>{Up()||Bp(a,r)}),n.addEventListener("mouseleave",Wp))})}function uo(){const t=document.querySelectorAll(Cn);t.forEach(e=>N_(e.getAttribute(Pn)||"")),b_(),T_(),lu(),t.length&&(ha(!1),Ra(!1))}function N_(t){var r;const e=document.querySelector(`[${Pn}="${t}"]`);if(!e)return;e.querySelectorAll("[data-playpilot-element]").forEach(a=>a.remove());const i=(r=e.querySelector("a"))==null?void 0:r.innerHTML;e.outerHTML=i||""}function O_(){document.querySelectorAll('a[href*="playpilot.com"]').forEach(e=>{e.closest(Cn)||/\/movie|show\//.test(e.href)&&(e.outerHTML=e.innerHTML)})}function q_({aiInjections:t,manualInjections:e}){return[...e.map(n=>({...n,manual:!0})),...t]}function ou(t){return{aiInjections:t.filter(e=>!e.manual),manualInjections:t.filter(e=>e.manual)}}function su(t){return!t.inactive&&!t.removed&&!t.duplicate&&du(t)&&Na(t)}function Na(t){return t.in_text||t.in_text===void 0?!0:!!t.after_article}function z_(t){return cu(t).filter(e=>e.in_text!==!1&&su(e))}function H_(t){return cu(t).filter(e=>e.after_article===!0&&su(e))}function cu(t){return t.filter(e=>e.removed||e.inactive?!1:e.manual&&!e.removed&&!e.inactive?!0:!t.some(n=>n.manual&&(n.removed||n.inactive)&&uu(n,e)))}function F_(t){const e=[],n={},i={};let r=0;for(const a of t){if(!a.manual){const o=i[a.sid]||0,s=Je("unique_injection_count_limit"),c=Je("total_participant_injection_count_limit"),u=s&&o>=s,d=a.type==="participant"&&c&&r>=c;if(u||d){n[a.key]=`Injection was withheld because it exceeded the maximum ${u?"unique":"total"} count.`;continue}else i[a.sid]=o+1,a.type==="participant"&&r++}e.push(a)}return{injections:e,failedMessages:n}}function B_(t){return t.slice().sort((e,n)=>{if(e.sentence<n.sentence)return-1;if(e.sentence>n.sentence)return 1;const i=n.title.length-e.title.length;return i!==0?i:0})}function V_(t,e,n){return n.some((i,r)=>e!==r&&i.manual&&uu(i,t))}function uu(t,e){return t.title===e.title&&yt(t.sentence)===yt(e.sentence)}function du(t){return!!(t.type==="title"&&t.title_details||t.type==="participant"&&t.participant_details)}function ci(){return document.querySelector("[data-playpilot-link-injections]")||document.body}function W_(t,e){if(e.popularity===null||e.popularity===void 0)return!0;const n=Je("participant_injection_popularity_threshold_use_article_average")??!0,a=Je("participant_injection_popularity_threshold")??0;if(a===0)return!0;if(!n)return e.popularity>=a;const o=t.filter(s=>s.type==="participant").reduce((s,{participant_details:c},u,{length:d})=>s+(c.popularity||0)/d,0);return e.popularity>=o*(a/100)}var U_=Ge('<svg width="8" height="4" viewBox="0 0 8 4" fill="none"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function G_(t,e){const n=I(e,"expanded",3,!1);var i=U_();let r;G(()=>r=ye(i,0,"svelte-abbsts",null,r,{expanded:n()})),y(t,i)}var Z_=Ge('<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 K_(t){var e=Z_();y(t,e)}var Y_=S('<button><div class="label svelte-1201akx"><!></div> <div class="track svelte-1201akx"><div class="knob svelte-1201akx"></div></div></button>');function Pl(t,e){re(e,!0);let n=I(e,"active",15),i=I(e,"fullwidth",3,!1),r=I(e,"label",3,""),a=I(e,"onclick",3,()=>null);function o(){n(!n()),a()(n())}var s=Y_();let c;var u=C(s),d=C(u);$e(d,()=>e.children),G(()=>{c=ye(s,1,"switch svelte-1201akx",null,c,{active:n(),fullwidth:i()}),le(s,"aria-label",`Toggle ${r()??""} ${n()?"off":"on"}`)}),ne("click",s,o),y(t,s),ae()}Se(["click"]);var J_=S('<input type="text" autocomplete="off" class="svelte-v3h1om"/>');function fo(t,e){re(e,!0);let n=I(e,"value",15),i=I(e,"label",3,""),r=I(e,"name",3,""),a=I(e,"readonly",3,!1),o=I(e,"oninput",3,()=>null);var s=J_();G(()=>{le(s,"name",r()),le(s,"aria-label",i()),le(s,"placeholder",i()),s.readOnly=a()}),ne("input",s,function(...c){var u;(u=o())==null||u.apply(this,c)}),di(s,n),y(t,s),ae()}Se(["input"]);var Q_=Ge('<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>'),X_=Ge('<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>'),$_=Ge('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function ns(t,e){const n=I(e,"align",3,"bottom");var i=$_(),r=C(i);{var a=s=>{var c=Q_();y(s,c)},o=s=>{var c=X_();y(s,c)};U(r,s=>{n()==="bottom"?s(a):n()==="center"&&s(o,1)})}y(t,i)}var e1=S("<div><!></div>");function vi(t,e){const n=I(e,"type",3,"error"),i=I(e,"fixed",3,!1);var r=e1();let a;var o=C(r);$e(o,()=>e.children),G(()=>a=ye(r,1,`alert ${n()??""}`,"svelte-1v44877",a,{fixed:i()})),y(t,r)}var t1=S("<!> In-text Playlink",1),n1=S("<!> Bottom Playlink",1),i1=S('<div class="alert svelte-1fv3ko3"><!></div>'),r1=S('<div><div class="label svelte-1fv3ko3">Bottom playlinks style</div> <div class="group svelte-1fv3ko3" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text">Playlinks sentence</button> <button role="option" id="playlinks-after-article">Modal button</button> <div></div></div></div>'),a1=S('<div class="switches svelte-1fv3ko3"><!> <!></div> <!> <!>',1);function l1(t,e){re(e,!0);const n=I(e,"linkInjection",7),i=V(()=>n().after_article_style==="modal_button");var r=a1(),a=J(r),o=C(a);{let v=V(()=>n().in_text??!0);Pl(o,{fullwidth:!0,get active(){return l(v)},onclick:g=>{n().in_text=g,n().manual=!0},label:"In-text Playlink",children:(g,m)=>{var p=t1(),w=J(p);ns(w,{align:"center"}),y(g,p)},$$slots:{default:!0}})}var s=k(o,2);{let v=V(()=>n().after_article??!1);Pl(s,{fullwidth:!0,get active(){return l(v)},onclick:g=>{n().after_article=g,n().manual=!0},label:"Bottom Playlink",children:(g,m)=>{var p=n1(),w=J(p);ns(w,{align:"bottom"}),y(g,p)},$$slots:{default:!0}})}var c=k(a,2);{var u=v=>{var g=i1(),m=C(g);vi(m,{type:"warning",children:(p,w)=>{var b=Xe("At least one layout option must be selected for the playlink to be visible.");y(p,b)},$$slots:{default:!0}}),ze(3,g,()=>_r,()=>({duration:200})),y(v,g)},d=V(()=>!Na(n()));U(c,v=>{l(d)&&v(u)})}var h=k(c,2);{var f=v=>{var g=r1(),m=k(C(g),2),p=C(m);let w;var b=k(p,2);let T;var x=k(b,2);let P;G(()=>{le(m,"aria-activedescendant",`playlinks-${l(i)?"after-article":"in-text"}`),le(p,"aria-selected",!l(i)||null),w=ye(p,1,"svelte-1fv3ko3",null,w,{active:!l(i)}),le(b,"aria-selected",l(i)||null),T=ye(b,1,"svelte-1fv3ko3",null,T,{active:l(i)}),P=ye(x,1,"active-marker svelte-1fv3ko3",null,P,{right:l(i)})}),ne("click",p,()=>n().after_article_style="playlinks"),ne("click",b,()=>n().after_article_style="modal_button"),ze(3,g,()=>_r,()=>({duration:100})),y(v,g)};U(h,v=>{n().after_article&&v(f)})}y(t,r),ae()}Se(["click"]);var o1=S('<option class="svelte-1yg5wso"> </option>'),s1=S('<div class="sent svelte-1yg5wso">Report has been sent, thank you! Closing window...</div>'),c1=S('<button class="submit svelte-1yg5wso">Send report</button>'),u1=S('<div class="form svelte-1yg5wso"><div class="heading svelte-1yg5wso">Report issue</div> <div class="info svelte-1yg5wso"><div><strong class="svelte-1yg5wso">Title</strong> </div> <div><strong class="svelte-1yg5wso">Sentence</strong> </div></div> <label for="reason">What would you like to report?</label> <select id="reason" name="reason" class="svelte-1yg5wso"><option class="svelte-1yg5wso">Select an issue...</option><!></select> <div><!></div></div>');function d1(t,e){re(e,!0);const n=[{value:"failed_injection",label:"The link failed to appear on the page."},{value:"layout_issue",label:"The link is breaking the layout or formatting of my page."},{value:"wrong_content",label:"The link points to the wrong movie or show."},{value:"inappropriate_title",label:"The link points to an inappropriate movie or show."},{value:"broken_link",label:"The link is broken or leads to an error page."},{value:"other",label:"My issue is not listed, but please have a look regardless."}];let i=Y(""),r=Y(!1);function a(){var o,s;l(i)&&(he(ve.ManualReport,e.linkInjection.title_details,{report_reason:l(i),sid:e.linkInjection.sid,title:e.linkInjection.title,sentence:e.linkInjection.sentence,failed:(o=e.linkInjection.failed)==null?void 0:o.toString(),failed_message:e.linkInjection.failed_message,manual:(s=e.linkInjection.manual)==null?void 0:s.toString()}),R(r,!0),setTimeout(e.onclose,3e3))}Ui(t,{get onclose(){return e.onclose},children:(o,s)=>{var c=u1(),u=C(c);bt(u,(E,M)=>Ne==null?void 0:Ne(E,M),()=>2);var d=k(u,2),h=C(d),f=k(C(h)),v=k(h,2),g=k(C(v)),m=k(d,4),p=C(m);p.value=p.__value="";var w=k(p);He(w,17,()=>n,Ue,(E,M)=>{let O=()=>l(M).value,F=()=>l(M).label;var j=o1(),L=oe(j,!0),D={};G(()=>{Q(L,F()),D!==(D=O())&&(j.value=(j.__value=D)??"")}),ne("click",j,()=>R(i,O(),!0)),y(E,j)}),mc(m);var b=k(m,2),T=C(b);{var x=E=>{var M=s1();ze(1,M,()=>Ot,()=>({duration:200})),y(E,M)},P=E=>{var M=c1();G(()=>M.disabled=!l(i)),ne("click",M,a),y(E,M)};U(T,E=>{l(r)?E(x):E(P,-1)})}G(E=>{Q(f,`: ${e.linkInjection.title??""}`),Q(g,`:
|
|
11
|
-
${E??""}`)},[()=>jc(e.linkInjection.sentence,e.linkInjection.title,100)]),_f(m,()=>l(i),E=>R(i,E)),y(o,c)},$$slots:{default:!0}}),ae()}Se(["click"]);var f1=S('<img class="poster svelte-tlh9c3" alt="" width="32" height="48"/>'),v1=S('<img class="poster participant svelte-tlh9c3" alt="" width="32" height="32"/>'),h1=S('<div class="placeholder-image svelte-tlh9c3"></div>'),g1=S('<button class="expand-sentence svelte-tlh9c3"> </button>'),m1=S('<button class="context-menu-action svelte-tlh9c3">Remove</button> <button class="context-menu-action svelte-tlh9c3">Report issue</button>',1),p1=S('<button class="expand svelte-tlh9c3" aria-label="Expand"><!></button>'),_1=S("<div></div>"),y1=S('<div class="warning svelte-tlh9c3" aria-label="Invalid playlink settings"><!></div>'),w1=S('<div class="actions svelte-tlh9c3"><!> <!> <!></div>'),b1=S('<div class="expanded svelte-tlh9c3"><div class="label svelte-tlh9c3">Link URL</div> <!> <div class="label offset svelte-tlh9c3">Layout options</div> <div class="type-select svelte-tlh9c3"><!></div></div>'),k1=S('<div><div class="header svelte-tlh9c3"><!> <div class="info svelte-tlh9c3"><div class="title svelte-tlh9c3"> </div> <div class="sentence svelte-tlh9c3"><!> <!></div></div> <div class="context-menu svelte-tlh9c3"><!></div></div> <div class="content svelte-tlh9c3"><!> <!></div></div>');function x1(t,e){re(e,!0);const n=I(e,"linkInjection",15),i=I(e,"onremove",3,()=>null),r=I(e,"onhighlight",3,()=>null),a=V(()=>n()||{}),o=V(()=>l(a).key),s=V(()=>l(a).type),c=V(()=>l(a).sentence),u=V(()=>l(a).title_details),d=V(()=>l(a).participant_details),h=V(()=>l(a).failed),f=V(()=>l(a).failed_message),v=V(()=>l(a).inactive),g=V(()=>jc(n().sentence,n().title,60));let m=Y(!1),p=Y(!1),w=Y(!1),b=Y(null);lt(()=>{l(h)&&he(ve.InjectionFailed,l(s)==="title"?l(u):null,{phrase:n().title,sentence:l(c)})});function T($=!0){E().forEach(ce=>{ce.classList.toggle("playpilot-injection-highlight",$)})}function x($){let X=$.target,ce=X==null?void 0:X.dataset.playpilotInjectionKey;X&&!ce&&(X=X.closest(`[data-playpilot-injection-key="${l(o)}"]`),ce=X==null?void 0:X.dataset.playpilotInjectionKey),R(w,ce===l(o)),l(b)&&l(w)&&r()(l(b))}function P($){requestAnimationFrame(()=>T());const X=$.target;if(["BUTTON","INPUT"].includes(X.nodeName)||X.closest("button")||X.closest("input"))return;const ce=E()[0];ce&&ce.scrollIntoView({behavior:"smooth"})}function E(){const $=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${l(o).toString()}"]`));return $.length?$:Jl(Bi()).filter(X=>yt(X.innerText).includes(yt(n().sentence)))||[]}function M(){const $=Nt(d1,{target:document.body,props:{linkInjection:n(),onclose:()=>Zn($)}})}var O=k1();pe("mouseover",Ae,x);let F;var j=C(O),L=C(j);{var D=$=>{var X=f1();G(ce=>le(X,"src",ce),[()=>er(l(u).standing_poster)]),pe("error",X,({target:ce})=>ce.src=Fi),y($,X)},H=$=>{var X=v1();G(()=>le(X,"src",l(d).image)),pe("error",X,({target:ce})=>ce.src=Fi),y($,X)},Z=$=>{var X=h1();y($,X)};U(L,$=>{l(s)==="title"?$(D):l(s)==="participant"?$(H,1):$(Z,-1)})}var B=k(L,2),z=C(B),A=oe(z,!0),q=k(z,2),W=C(q);cc(W,()=>(l(p)?l(c):l(g)).replace(n().title,`<em>${n().title}</em>`));var K=k(W,2);{var ee=$=>{var X=g1(),ce=oe(X,!0);G(()=>Q(ce,l(p)?"Less":"More")),ne("click",X,()=>R(p,!l(p))),y($,X)};U(K,$=>{l(g).length<l(c).length&&$(ee)})}var te=k(B,2),ue=C(te);nu(ue,{label:"More options",children:($,X)=>{var ce=m1(),Ee=J(ce),Be=k(Ee,2);ne("click",Ee,function(...ge){var Me;(Me=i())==null||Me.apply(this,ge)}),ne("click",Be,M),y($,ce)},$$slots:{default:!0}});var xe=k(j,2),Te=C(xe);{var de=$=>{vi($,{children:(X,ce)=>{var Ee=Xe();G(()=>Q(Ee,l(f))),y(X,Ee)},$$slots:{default:!0}})},fe=$=>{var X=w1(),ce=C(X);{var Ee=Ke=>{var ie=p1(),_e=C(ie);G_(_e,{get expanded(){return l(m)}}),G(()=>le(ie,"aria-expanded",l(m))),ne("click",ie,()=>R(m,!l(m))),y(Ke,ie)},Be=Ke=>{var ie=_1();y(Ke,ie)};U(ce,Ke=>{l(s)==="title"?Ke(Ee):Ke(Be,-1)})}var ge=k(ce,2);{var Me=Ke=>{var ie=y1(),_e=C(ie);K_(_e),ze(3,ie,()=>Ot,()=>({duration:100})),y(Ke,ie)},Ve=V(()=>!Na(n()));U(ge,Ke=>{l(Ve)&&Ke(Me)})}var st=k(ge,2);{let Ke=V(()=>l(v)?"Inactive":"Visible"),ie=V(()=>!n().inactive);Pl(st,{get label(){return l(Ke)},get active(){return l(ie)},onclick:_e=>{n(n().inactive=!_e,!0),n(n().manual=!0,!0)},children:(_e,Ce)=>{var We=Xe();G(()=>Q(We,l(v)?"Inactive":"Visible")),y(_e,We)},$$slots:{default:!0}})}y($,X)};U(Te,$=>{l(h)?$(de):$(fe,-1)})}var je=k(Te,2);{var Fe=$=>{var X=b1(),ce=k(C(X),2);fo(ce,{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 Ee=k(ce,4),Be=C(Ee);l1(Be,{get linkInjection(){return n()}}),ze(3,X,()=>_r,()=>({duration:100})),y($,X)};U(je,$=>{l(m)&&$(Fe)})}et(O,$=>R(b,$),()=>l(b)),G(()=>{var $,X;F=ye(O,1,"item svelte-tlh9c3",null,F,{highlighted:l(w),inactive:l(v)}),Q(A,(($=l(u))==null?void 0:$.title)||((X=l(d))==null?void 0:X.name))}),pe("mouseenter",O,()=>T(!0)),pe("mouseleave",O,()=>T(!1)),ne("click",O,P),ze(6,O,()=>_r,()=>({duration:200})),y(t,O),ae()}Se(["click"]);var S1=S('<button class="drag-handle svelte-1fk5ijl" aria-label="Move editor"></button>');function T1(t,e){re(e,!0);let n=I(e,"element",7),i=I(e,"position",23,()=>({x:0,y:0})),r=I(e,"limit",19,()=>({x:0,y:0})),a=I(e,"onchange",3,()=>null),o=!1,s={x:0,y:0},c=i();lt(()=>{u(i().x,i().y)});function u(m,p){const w=window.innerWidth,b=window.innerHeight,T=n().clientWidth,x=n().clientHeight;m=Math.min(Math.max(m,r().x),w-T-r().x),p=Math.min(Math.max(p,r().y),b-x-r().y),n().style.right=m+"px",n().style.bottom=Math.max(p,r().y)+"px",i({x:m,y:p}),a()(i())}function d(m){var p,w;return{x:m.pageX||((p=m.touches)==null?void 0:p[0].pageX)||0,y:m.pageY||((w=m.touches)==null?void 0:w[0].pageY)||0}}function h(m){o=!0,s=d(m),c=i()}function f(m){if(!o)return;const p=d(m),w=p.x-s.x,b=p.y-s.y,T=c.x-w,x=c.y-b;u(T,x)}function v(){o&&(o=!1)}var g=S1();pe("mousemove",Ae,f),pe("touchmove",Ae,f,void 0,!0),pe("mouseup",Ae,v),pe("touchend",Ae,v),pe("resize",Ae,()=>u(i().x,i().y)),ne("mousedown",g,h),ne("touchstart",g,h),y(t,g),ae()}Se(["mousedown","touchstart"]);var E1=S('<button class="resize-handle svelte-iir57j" aria-label="Move editor"></button>');function P1(t,e){re(e,!0);let n=I(e,"element",7),i=I(e,"height",7,200),r=I(e,"onchange",3,()=>null);const a=16;let o=!1,s=0,c=i();lt(()=>{i()&&u(i())});function u(m){const p=window.getComputedStyle(n()).minHeight||"0",w=Math.max(parseInt(p),Math.min(m,v()));n().style.height=`${w}px`,i(w),r()(w)}function d(m){var p,w;o=!0,s=m.pageY||((w=(p=m.touches)==null?void 0:p[0])==null?void 0:w.pageY)||0,c=n().clientHeight}function h(m){var T,x;if(!o)return;const p=m.pageY||((x=(T=m.touches)==null?void 0:T[0])==null?void 0:x.pageY)||0,w=s-p,b=c+w;u(b)}function f(){o=!1}function v(){const m=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-m,0)}var g=E1();pe("mousemove",Ae,h),pe("touchmove",Ae,h,void 0,!0),pe("mouseup",Ae,f),pe("touchend",Ae,f),pe("resize",Ae,()=>{i()&&u(i())}),ne("mousedown",g,d),ne("touchstart",g,d),y(t,g),ae()}Se(["mousedown","touchstart"]);function I1(t,e=t.anchorNode){if(!t.anchorNode||!e)return{start:-1,end:-1};const n=t.toString().trim(),i=t.toString().search(/\S/);if(t.anchorNode===e&&e.nodeType===Node.TEXT_NODE){const u=Math.min(t.anchorOffset,t.focusOffset)+i;return{start:u,end:u+n.length}}const r=t.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(e),a.setEnd(r.startContainer,r.startOffset);const s=a.toString().length+i,c=s+n.length;return{start:s,end:c}}var A1=Ge('<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 C1(t){var e=A1();y(t,e)}async function M1(t){const e=vn();if(!e)throw new Error("No token was provided");return await Ht(`/search/titles/?api-token=${e}&query=${t}`)}async function L1(t){const e=vn();if(!e)throw new Error("No token was provided");return await Ht(`/search/participants/?api-token=${e}&query=${t}`)}var j1=S('<div class="tabs svelte-1xf95vf"></div>');function D1(t,e){re(e,!0);const n=I(e,"onclick",3,()=>null);let i=V(()=>{var o;return(o=e.options[0])==null?void 0:o.value});function r(o){R(i,o),n()(o)}var a=j1();He(a,21,()=>e.options,Ue,(o,s)=>{let c=()=>l(s).label,u=()=>l(s).value;{let d=V(()=>u()===l(i)?"filled":"border");Bt(o,{get variant(){return l(d)},onclick:()=>r(u()),children:(h,f)=>{var v=Xe();G(()=>Q(v,c())),y(h,v)},$$slots:{default:!0}})}}),y(t,a),ae()}var R1=Ge('<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 fu(t){var e=R1();y(t,e)}var N1=S('<button><img class="image svelte-uqnibc" alt="" width="42" height="42"/> <div class="content"><div class="name svelte-uqnibc"> </div></div> <a target="_blank" class="open-in-new-tab svelte-uqnibc"><!></a></button>');function is(t,e){re(e,!0);const n=I(e,"hoverable",3,!0),i=I(e,"onclick",3,()=>null);var r=N1();let a;var o=C(r),s=k(o,2),c=C(s),u=oe(c,!0),d=k(s,2),h=C(d);fu(h),G(f=>{a=ye(r,1,"item svelte-uqnibc",null,a,{hoverable:n()}),le(o,"src",e.participant.image||Fi),Q(u,e.participant.name),le(d,"href",f)},[()=>io(e.participant)]),ne("click",r,function(...f){var v;(v=i())==null||v.apply(this,f)}),pe("error",o,({target:f})=>f.src=Fi),ne("click",d,f=>f.stopImmediatePropagation()),y(t,r),ae()}Se(["click"]);var O1=S("<div> </div>"),q1=S('<button><img class="poster svelte-fntasr" alt="" width="28" height="42"/> <div class="content"><div class="name svelte-fntasr"> </div> <div class="meta svelte-fntasr"><div class="imdb svelte-fntasr"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-fntasr"><!></a></button>');function rs(t,e){re(e,!0);const n=I(e,"hoverable",3,!0),i=I(e,"onclick",3,()=>null);var r=q1();let a;var o=C(r),s=k(o,2),c=C(s),u=oe(c,!0),d=k(c,2),h=C(d),f=C(h);Ma(f,{});var v=k(f),g=k(h,2),m=oe(g,!0),p=k(g,2),w=oe(p,!0),b=k(p,2);{var T=E=>{var M=O1(),O=oe(M);G(()=>Q(O,`${e.title.length??""} min`)),y(E,M)};U(b,E=>{e.title.length&&E(T)})}var x=k(s,2),P=C(x);fu(P),G((E,M)=>{a=ye(r,1,"item svelte-fntasr",null,a,{hoverable:n()}),le(o,"src",E),Q(u,e.title.title),Q(v,` ${e.title.imdb_score??""}`),Q(m,e.title.year),Q(w,e.title.type),le(x,"href",M)},[()=>er(e.title.standing_poster),()=>Ca(e.title)]),ne("click",r,function(...E){var M;(M=i())==null||M.apply(this,E)}),pe("error",o,({target:E})=>E.src=Fi),ne("click",x,E=>E.stopImmediatePropagation()),y(t,r),ae()}Se(["click"]);var z1=S('<em class="empty svelte-c0n5tq">No results found</em>'),H1=S('<div class="results svelte-c0n5tq" data-testid="search-results"></div>'),F1=S('<div class="selected svelte-c0n5tq"><!></div>'),B1=S('<!> <div class="search svelte-c0n5tq"><!> <!> <!></div>',1);function V1(t,e){re(e,!0);let n=I(e,"onselect",3,()=>null),i=I(e,"query",15);const r=[{label:"Movies & Shows",value:"title"},{label:"Cast & Crew",value:"participant"}];let a=Y(Oe([])),o=Y(null),s=Y(Oe(r[0].value)),c=Y(!1);tt(()=>{i()&&u(i())});async function u(x){R(c,!0);try{R(a,l(s)==="title"?await M1(x):await L1(x),!0)}finally{R(c,!1)}}function d(x){i(l(s)==="title"?x.title:x.name),R(o,x,!0),n()(x,l(s))}function h(x){R(s,x,!0),i(""),R(o,null)}var f=B1(),v=J(f);D1(v,{get options(){return r},onclick:x=>h(x)});var g=k(v,2),m=C(g);fo(m,{oninput:()=>R(o,null),name:"search",label:"Search...",get value(){return i()},set value(x){i(x)}});var p=k(m,2);{var w=x=>{var P=H1();He(P,21,()=>l(a),E=>E.sid,(E,M)=>{var O=we(),F=J(O);{var j=D=>{rs(D,{get title(){return l(M)},onclick:()=>d(l(M))})},L=D=>{is(D,{get participant(){return l(M)},onclick:()=>d(l(M))})};U(F,D=>{l(s)==="title"?D(j):l(s)==="participant"&&D(L,1)})}y(E,O)},E=>{var M=we(),O=J(M);{var F=j=>{var L=z1();y(j,L)};U(O,j=>{l(c)||j(F)})}y(E,M)}),y(x,P)};U(p,x=>{i()&&!l(o)&&x(w)})}var b=k(p,2);{var T=x=>{var P=F1(),E=C(P);{var M=F=>{rs(F,{get title(){return l(o)},hoverable:!1})},O=F=>{is(F,{get participant(){return l(o)},hoverable:!1})};U(E,F=>{l(s)==="title"?F(M):l(s)==="participant"&&F(O,1)})}y(x,P)};U(b,x=>{l(o)&&x(T)})}y(t,f),ae()}var W1=S('<div class="error svelte-12oucrc"><!></div>'),U1=S('<label for="text" class="svelte-12oucrc">Paired link</label> <!>',1),G1=S('<section class="layout svelte-12oucrc"><div class="header svelte-12oucrc"><!> <div class="heading svelte-12oucrc">Add Playlink manually</div></div> <p class="svelte-12oucrc">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-12oucrc">Selected text</label> <!> <!> <!> <button class="save svelte-12oucrc">Add playlink</button></section>');function Z1(t,e){re(e,!0);const n=I(e,"onclose",3,()=>null),{pageText:i}=Vi();let r=Y(""),a=Y(""),o=Y(null),s=Y("title"),c=Y(""),u=Y(""),d=Y(""),h=Y("");lt(f);function f(){const L=window.getSelection();if(!(L!=null&&L.anchorNode)||L.anchorNode.parentElement&&!Bi().contains(L.anchorNode.parentElement))return;const D=L.toString().trim();if(!D)return;R(d,""),R(r,D,!0);const H=L.getRangeAt(0).cloneContents();if(Array.from(H.childNodes).filter(ee=>{var te;return(te=ee.textContent)==null?void 0:te.trim()}).find(ee=>{var te;return ee.nodeName==="A"||((te=ee.querySelector)==null?void 0:te.call(ee,"a"))})){R(d,"Selection is or contains a link. Injections can not be created around already existing links.");return}R(h,l(r),!0);const{node:B,sentence:z}=v(L,D);if(!B)return;R(a,z,!0);const{start:A,end:q}=I1(L,B);(ee=>{R(u,ee.before,!0),R(c,ee.after,!0)})(Dc(B,A,q)),z.includes(l(u))||R(u,""),z.includes(l(c))||R(c,"");const W=L.getRangeAt(0).commonAncestorContainer.textContent,K=yt(i);(!W||!K.includes(yt(W)))&&R(d,"Selection was not inside of given content")}function v(L,D){const H=L.getRangeAt(0),Z=Bi();let B=H.startContainer;for(;(B.textContent||"").length<=D.length*3&&B.parentNode&&B.nodeName!=="P"&&B.parentNode.textContent!==Z.textContent;)B=B.parentNode;if(!B||!B.textContent)return{node:null,sentence:""};const z=B.textContent,A=g(B,H.startContainer,H.startOffset),q=g(B,H.endContainer,H.endOffset),W=z.slice(0,A).lastIndexOf("."),K=z.slice(q).match(/[.!?\n]/),ee=K?q+K.index:z.length,te=W===-1?0:W+1,ue=ee,xe=z.slice(te,ue+1).trim();return{node:B,sentence:xe}}function g(L,D,H){let Z=0;const B=L,z=A=>{var q;if(A===D)return Z+=H,!0;A.nodeType===Node.TEXT_NODE&&(Z+=((q=A.textContent)==null?void 0:q.length)||0);for(let W=A.firstChild;W;W=W.nextSibling)if(z(W))return!0;return!1};return z(B),Z}function m(L,D){var H,Z;R(o,L,!0),R(s,D,!0),(Z=(H=window.getSelection())==null?void 0:H.removeAllRanges)==null||Z.call(H)}function p(){if(!l(r)||!l(o))return;const L={sid:l(o).sid,title:l(r),sentence:l(a),phrase_before:l(u),phrase_after:l(c),key:Mc(l(o).sid),manual:!0,type:l(s)};l(s)==="title"?(L.title_details=l(o),L.playpilot_url=Ca(l(o))):l(s)==="participant"&&(L.participant_details=l(o),L.playpilot_url=io(l(o))),e.onsave(L),n()()}var w=G1();pe("mouseup",Ae,f);var b=C(w),T=C(b);Wi(T,{get onclick(){return n()},size:"24px",children:(L,D)=>{C1(L)},$$slots:{default:!0}});var x=k(T,2);bt(x,(L,D)=>Ne==null?void 0:Ne(L,D),()=>2);var P=k(b,6);fo(P,{get value(){return l(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var E=k(P,2);{var M=L=>{var D=W1(),H=C(D);vi(H,{children:(Z,B)=>{var z=Xe();G(()=>Q(z,l(d))),y(Z,z)},$$slots:{default:!0}}),y(L,D)};U(E,L=>{l(d)&&L(M)})}var O=k(E,2);{var F=L=>{var D=U1(),H=k(J(D),2);Ji(H,()=>l(a)+l(r),Z=>{V1(Z,{onselect:m,get query(){return l(h)},set query(B){R(h,B,!0)}})}),y(L,D)};U(O,L=>{l(d)||L(F)})}var j=k(O,2);G(()=>j.disabled=!l(r)||!l(o)),ne("click",j,p),y(t,w),ae()}Se(["click"]);const Il="PlayPilotEditorialSessionId",vu=5e3,K1=vu*2;async function Y1(){const{ai_enabled:t,injections_enabled:e,ai_last_run:n,session_id:i,session_last_ping:r}=await Fn(),a=gu(i||null,r||null),o={ai_enabled:t,ai_last_run:n,injections_enabled:e,session_id:i,session_last_ping:r};return a?await hu():o}async function hu(){const t=mu(),e=new Date(Date.now()).toISOString(),n={session_id:t,session_last_ping:e.toString()},{ai_enabled:i,injections_enabled:r,ai_last_run:a}=await Fn({params:n});return{ai_enabled:i,ai_last_run:a,injections_enabled:r,...n}}function gu(t,e){if(!t||!e)return!0;const n=Date.now(),i=new Date(e),r=mu();return n-i.getTime()>K1?!0:r===t}function mu(){return sessionStorage.getItem(Il)||J1()}function J1(){const t=sessionStorage.getItem(Il)||Or();return sessionStorage.setItem(Il,t),t}var Q1=S('<p class="svelte-16jrr0h"><strong>Someone else is currently editing this document.</strong> Wait for them to exit the page or take over edit permissions, preventing them from making more changes.</p> <button class="button svelte-16jrr0h">Take over editing</button>',1),X1=S('<div class="alert svelte-16jrr0h"><!></div>');function $1(t,e){re(e,!0);const n=I(e,"onpoll",3,()=>null),i=I(e,"onallow",3,()=>null),r=I(e,"ondisallow",3,()=>null),a=I(e,"ontakeover",3,()=>null);let o=null,s=Y(!0);lt(()=>(c(),()=>{o&&clearInterval(o)}));function c(){u(),o=setInterval(u,vu)}async function u(){const g=await Y1();g&&(R(s,gu(g.session_id||null,g.session_last_ping||null),!0),l(s)?i()():r()(),n()({injectionsEnabled:!!g.injections_enabled,aiEnabled:!!g.ai_enabled}))}function d(){hu(),a()()}var h=we(),f=J(h);{var v=g=>{var m=X1(),p=C(m);vi(p,{type:"warning",children:(w,b)=>{var T=Q1(),x=k(J(T),2);ne("click",x,d),y(w,T)},$$slots:{default:!0}}),y(g,m)};U(f,g=>{l(s)||g(v)})}y(t,h),ae()}Se(["click"]);var e0=Ge('<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 t0(t){var e=e0();y(t,e)}var n0=S('<strong class="svelte-1q9haus">AI processing is disabled.</strong>'),i0=S('<span class="svelte-1q9haus">.</span>'),r0=S(`<strong class="svelte-1q9haus">AI links are currently processing.</strong> This can take several minutes. We'll insert all found injections once ready. <div class="message svelte-1q9haus"> <span class="ellipses svelte-1q9haus"></span></div> <div class="loading-bar svelte-1q9haus"><div class="loading-bar-progress svelte-1q9haus"><div class="loading-bar-fill svelte-1q9haus" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1q9haus"> </div></div>`,1),a0=S('<p class="svelte-1q9haus"><strong class="svelte-1q9haus">AI has finished processing.</strong> <br class="svelte-1q9haus"/> <!></p> <button class="dismiss svelte-1q9haus">Dismiss</button>',1),l0=S('<div class="animator svelte-1q9haus" data-test-id="animator"></div>'),o0=S('<div data-testid="ai-indicator"><div class="content svelte-1q9haus"><div class="icon svelte-1q9haus"><!></div> <div class="svelte-1q9haus"><!></div></div> <div class="border svelte-1q9haus"><!></div></div>');function s0(t,e){const n=I(e,"aiRunning",3,!1),i=I(e,"aiEnabled",3,!1),r=I(e,"message",3,""),a=I(e,"percentage",3,0),o=I(e,"aiInjectionsCount",3,0),s=o();let c=Y(!1);var u=we(),d=J(u);{var h=f=>{var v=o0();let g;var m=C(v),p=C(m),w=C(p);t0(w);var b=k(p,2),T=C(b);{var x=j=>{var L=n0();y(j,L)},P=j=>{var L=r0(),D=k(J(L),2),H=C(D),Z=k(H);He(Z,20,()=>({length:3}),Ue,(ee,te)=>{var ue=i0();y(ee,ue)});var B=k(D,2),z=C(B),A=C(z);let q;var W=k(z,2),K=oe(W);G((ee,te)=>{Q(H,`${r()??""} `),q=rt(A,"",q,{width:ee}),Q(K,`${te??""}%`)},[()=>`${Math.max(a(),3)}%`,()=>Math.floor(a())]),y(j,L)},E=j=>{var L=a0(),D=J(L),H=k(C(D),4);{var Z=A=>{var q=Xe("No new injections where found.");y(A,q)},B=A=>{var q=Xe();G(()=>Q(q,`${o()??""} Injections where found and added to the page.`)),y(A,q)};U(H,A=>{s===o()?A(Z):A(B,-1)})}var z=k(D,2);ne("click",z,()=>R(c,!0)),y(j,L)};U(T,j=>{i()?n()?j(P,1):j(E,-1):j(x)})}var M=k(m,2),O=C(M);{var F=j=>{var L=l0();y(j,L)};U(O,j=>{n()&&j(F)})}G(()=>g=ye(v,1,"ai-indicator svelte-1q9haus",null,g,{running:n()})),y(f,v)};U(d,f=>{l(c)||f(h)})}y(t,u)}Se(["click"]);var c0=S('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:400,600,700"/>'),u0=S('<div class="handles svelte-7r3240"><div class="handle svelte-7r3240"><!></div> <div class="handle svelte-7r3240"><!></div></div>'),d0=S('<div class="loading svelte-7r3240">Loading...</div>'),f0=S('<div class="bubble svelte-7r3240"> </div> <!>',1),v0=S(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
12
|
-
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),h0=S('<div class="alert svelte-7r3240"><!></div>'),g0=S('<div class="error svelte-7r3240"><!></div>'),m0=S('<div class="empty svelte-7r3240">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),p0=S('<button class="save svelte-7r3240"> </button>'),_0=S('<!> <!> <div class="items svelte-7r3240"></div> <!>',1),y0=S("<!> <!> <!>",1),w0=S('<div class="panel svelte-7r3240"><!></div>'),b0=S('<section><!> <header class="header svelte-7r3240"><div class="heading svelte-7r3240">Playlinks</div> <!></header> <!> <!></section>');function k0(t,e){re(e,!0);let n=I(e,"linkInjections",15),i=I(e,"loading",3,!1),r=I(e,"injectionsEnabled",7,!1),a=I(e,"aiStatus",23,()=>({})),o=I(e,"onreinitialize",3,()=>null);const s="editor-position",c="editor-height",u=JSON.parse(localStorage.getItem(s)||'{ "x": 0, "y": 0 }'),d=parseInt(localStorage.getItem(c)||"0");let h=Y(null),f=Y(!1),v=Y(!1),g=Y(!1),m=Y(!0),p=Y(0),w=Y("");const b=V(()=>vr(a().aiEnabled,!1)),T=V(()=>vr(a().aiRunning,!1)),x=V(()=>JSON.stringify(n())),P=V(()=>!l(T)&&l(m)),E=V(()=>l(w)&&l(w)!==l(x)),M=V(()=>n().filter($=>($.title_details||$.participant_details)&&!$.removed&&!$.duplicate&&($.manual||!$.manual&&!$.failed))),O=V(()=>j(l(M))),F=V(()=>!i()&&At(()=>a().aiRunning));tt(()=>{i()||At(()=>{requestAnimationFrame(()=>R(w,l(x),!0)),z()})});function j($){return $.sort((X,ce)=>{var Ee,Be,ge,Me;return X.failed!==ce.failed?X.failed?1:-1:(((Ee=X.title_details)==null?void 0:Ee.title)||((Be=X.participant_details)==null?void 0:Be.name)).localeCompare(((ge=ce.title_details)==null?void 0:ge.title)||((Me=ce.participant_details)==null?void 0:Me.name))})}async function L(){try{R(v,!0),R(g,!1),n(await Gf(n())),R(w,l(x),!0)}catch{R(g,!0)}finally{R(v,!1)}}function D($,X){localStorage.setItem($,X)}function H($){const X=n().findIndex(ce=>ce.key===$);n(n()[X].manual=!0,!0),n(n()[X].removed=!0,!0),n([...n()])}function Z($){if(!l(h))return;const X=$.offsetTop,ce=X+$.offsetHeight,Ee=l(h).scrollTop,Be=Ee+l(h).clientHeight;X>=Ee&&ce<=Be||l(h).scrollTo({top:X-l(h).clientHeight/2,behavior:"smooth"})}function B($){const X=$.target;R(p,X.scrollTop,!0)}function z(){const $={total:n().length,failed_automatic:n().filter(X=>X.failed&&!X.manual).length,failed_manual:n().filter(X=>X.failed&&X.manual).length,final_injected:l(M).length};he(ve.TotalInjectionsCount,null,$)}var A=b0();vc("7r3240",$=>{var X=c0();y($,X)});let q;var W=C(A);{var K=$=>{var X=u0(),ce=C(X),Ee=C(ce);P1(Ee,{get element(){return l(h)},get height(){return d},onchange:Me=>D(c,JSON.stringify(Me))});var Be=k(ce,2),ge=C(Be);T1(ge,{get element(){return l(h)},get position(){return u},limit:{x:16,y:16},onchange:Me=>D(s,JSON.stringify(Me))}),y($,X)};U(W,$=>{l(h)&&!i()&&$(K)})}var ee=k(W,2),te=C(ee);bt(te,$=>Ne==null?void 0:Ne($));var ue=k(te,2);{var xe=$=>{var X=d0();y($,X)},Te=$=>{var X=f0(),ce=J(X),Ee=oe(ce,!0),Be=k(ce,2);Wi(Be,{onclick:()=>R(f,!0),size:"24px","aria-label":"Add manual injection",children:(ge,Me)=>{var Ve=Xe("+");y(ge,Ve)},$$slots:{default:!0}}),G(()=>{le(ce,"aria-label",`${l(M).length??""} found playlinks`),Q(Ee,l(M).length)}),y($,X)};U(ue,$=>{i()?$(xe):l(P)&&$(Te,1)})}var de=k(ee,2);{var fe=$=>{var X=y0(),ce=J(X);$1(ce,{onallow:()=>R(m,!0),ondisallow:()=>R(m,!1),get ontakeover(){return o()},onpoll:Ve=>{r(Ve.injectionsEnabled),a({...a(),aiEnabled:Ve.aiEnabled})}});var Ee=k(ce,2);{var Be=Ve=>{{let st=V(()=>ou(n()).aiInjections.length);s0(Ve,Tn(a,{get aiInjectionsCount(){return l(st)}}))}};U(Ee,Ve=>{l(m)&&(l(F)||!l(b))&&Ve(Be)})}var ge=k(Ee,2);{var Me=Ve=>{var st=_0(),Ke=J(st);{var ie=De=>{var Re=h0(),$t=C(Re);vi($t,{type:"warning",children:(gn,Oa)=>{var Jn=v0();y(gn,Jn)},$$slots:{default:!0}}),y(De,Re)};U(Ke,De=>{r()||De(ie)})}var _e=k(Ke,2);{var Ce=De=>{var Re=g0(),$t=C(Re);vi($t,{children:(gn,Oa)=>{var Jn=Xe("Something went wrong, check your links below.");y(gn,Jn)},$$slots:{default:!0}}),ze(7,Re,()=>_r,()=>({duration:150})),y(De,Re)};U(_e,De=>{l(g)&&De(Ce)})}var We=k(_e,2);He(We,21,()=>l(O),De=>De.key,(De,Re)=>{const $t=V(()=>n().findIndex(gn=>gn.key===l(Re).key));x1(De,{onremove:()=>H(l(Re).key),onhighlight:Z,get linkInjection(){return n()[l($t)]},set linkInjection(gn){n(n()[l($t)]=gn,!0)}})},De=>{var Re=m0();y(De,Re)});var Qe=k(We,2);{var hn=De=>{var Re=p0(),$t=oe(Re,!0);G(()=>{Re.disabled=l(v),Q($t,l(v)?"Saving...":"Save links")}),ne("click",Re,L),ze(1,Re,()=>Ot,()=>({duration:100})),y(De,Re)};U(Qe,De=>{l(E)&&n().length&&l(m)&&De(hn)})}y(Ve,st)};U(ge,Ve=>{l(P)&&Ve(Me)})}y($,X)};U(de,$=>{i()||$(fe)})}var je=k(de,2);{var Fe=$=>{var X=w0();let ce;var Ee=C(X);Z1(Ee,{onclose:()=>R(f,!1),onsave:Be=>n().push(Be)}),G(()=>ce=rt(X,"",ce,{top:`${l(p)??""}px`})),ze(3,X,()=>Ti,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),y($,X)};U(je,$=>{l(f)&&$(Fe)})}et(A,$=>R(h,$),()=>l(h)),G(()=>q=ye(A,1,"editor svelte-7r3240",null,q,{"panel-open":l(f),loading:i()})),pe("scroll",A,B),y(t,A),ae()}Se(["click"]);var x0=Ge('<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 S0(t){var e=x0();y(t,e)}var T0=S('<div class="trigger svelte-qpyyh0"><button type="button" class="button svelte-qpyyh0" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qpyyh0" title="Close PlayPilot TPI"><!></button></div>');function E0(t,e){var n=T0(),i=C(n),r=C(i);S0(r);var a=k(i,2),o=C(a);zr(o,{}),ne("click",i,function(...s){var c;(c=e.onclick)==null||c.apply(this,s)}),ne("click",a,function(...s){var c;(c=e.onclose)==null||c.apply(this,s)}),y(t,n)}Se(["click"]);function P0(t,e){re(e,!0),lt(()=>{if(!mi())return;const i=new IntersectionObserver(r=>{r.forEach(a=>{if(!a.isIntersecting)return;i.unobserve(a.target);const o=a.target.getAttribute(Pn),s=e.linkInjections.find(u=>u.key===o),c=s==null?void 0:s.title_details;!o||!s||!c||n(c)})});return e.linkInjections.forEach(r=>{r.matchingElement&&i.observe(r.matchingElement)}),()=>i.disconnect()});function n({genres:i,participants:r,providers:a,title:o}){ln(Yt.TitleInterest,{title:o,source:Nn.Link}),i.slice(0,3).forEach(s=>{var c;ln(Yt.GenreInterest,{genre:(c=Pa.find(u=>u.slug===s))==null?void 0:c.name,source:Nn.Link})}),r==null||r.slice(0,20).forEach(s=>{ln(Yt.ParticipantInterest,{participant:s.name,source:Nn.Link})}),a==null||a.forEach(s=>{ln(Yt.ProviderInterest,{provider:s.name,source:Nn.Link})})}ae()}function I0(t,e){re(e,!1);const n=Array.from(document.querySelectorAll(Cn)),i=[],r=Date.now();let a=!1,o=null;lt(()=>{if(!Ea())return s(),()=>{var h;return(h=o==null?void 0:o.disconnect)==null?void 0:h.call(o)}});function s(){o=new IntersectionObserver(c),n.forEach(h=>{o.observe(h)})}function c(h){h.forEach(f=>{if(!f.isIntersecting)return;const v=f.target.getAttribute(Pn);v&&i.push(v),o.unobserve(f.target)})}function u(){const{scrollHeight:h,scrollTop:f,clientHeight:v}=document.documentElement;return f/(h-v)*100}function d(){var f,v;if(a||document.visibilityState!=="hidden")return;a=!0;const h=Date.now();he(ve.UserLeft,null,{time_start:r,time_end:h,time_spent:h-r,existing_injections_count:n.length,shown_injections_count:i.length,fired_events:((v=(f=window.PlayPilotLinkInjections)==null?void 0:f.tracked_events)==null?void 0:v.map(g=>g.event))||[],scroll_percentage:u()})}Zl(),pe("visibilitychange",Ae,d),ae()}function A0(t,e){re(e,!0);const n=100;let i=1;r();function r(){if(window.PlayPilotLinkInjections.require_consent===!1){a();return}if(!window.__tcfapi){i<n&&setTimeout(r,100),i++;return}window.__tcfapi("addEventListener",2,(o,s)=>{if(!s)return;const{purpose:c,eventStatus:u}=o;if(u!=="tcloaded"&&u!=="useractioncomplete")return;const d=h=>c.consents[h]===!0;iv({ads:d(1),pixels:d(1)&&d(7),split_tests:d(9)&&d(10),tracking:d(7)&&d(8),affiliate:d(1)&&d(7)}),a()})}function a(){window.dispatchEvent(new CustomEvent("updateconsent",{bubbles:!0})),e.onchange()}ae()}var C0=S('<span class="error svelte-1tp7i1s">The current URL is excluded via the config</span> <hr class="svelte-1tp7i1s"/>',1),M0=S('<tr class="svelte-1tp7i1s"><td><span class="label"> </span></td><td><span class="data svelte-1tp7i1s"> </span></td></tr>'),L0=S('<table border="0" cellpadding="0" class="svelte-1tp7i1s"><tbody></tbody></table>'),j0=S('<details><summary class="svelte-1tp7i1s"> </summary> <!></details>'),D0=S('<button class="svelte-1tp7i1s"></button>'),R0=S("<small>You are using the beta version of TPI</small>"),N0=S('<button class="svelte-1tp7i1s">Use beta script</button>'),O0=S("<option> </option>"),q0=S('<div class="debugger svelte-1tp7i1s"><strong>TPI Debugger</strong> <hr class="svelte-1tp7i1s"/> <!> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Insert mock card ad</button> <button class="svelte-1tp7i1s">Insert mock top scroll ad</button> <hr class="svelte-1tp7i1s"/> <small>Force split test variant</small> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Output elements in console</button> <button class="svelte-1tp7i1s">Output text in console</button> <hr class="svelte-1tp7i1s"/> <div class="form-group svelte-1tp7i1s"><label for="participant-threshold"><small>Participant use article average</small></label> <input id="participant-threshold" type="checkbox"/></div> <div class="form-group svelte-1tp7i1s"><small>Participant threshold</small> <input type="range"/> <small> </small></div> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Re-inject</button> <button class="svelte-1tp7i1s">Re-run AI</button> <!> <hr class="svelte-1tp7i1s"/> <div><small>Region</small> <input type="text" class="svelte-1tp7i1s"/></div> <div style="margin-top: 4px"><small>Language</small> <select class="svelte-1tp7i1s"></select></div> <hr class="svelte-1tp7i1s"/> <div class="form-group svelte-1tp7i1s"><small>Desktop rail size</small> <input type="range"/> <small> </small></div> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Close</button></div>');function z0(t,e){var T;re(e,!0);const n=["tpidebug","debugtpi"],i=[],r=!!document.querySelector('script[src*="scripts.playpilot.com/link-injection@next"]');let a=Y(Oe(h())),o=Y(!1),s=null,c=Y(184),u=Y(Oe(((T=window.PlayPilotLinkInjections.config)==null?void 0:T.participant_injection_popularity_threshold_use_article_average)??!0)),d=V(()=>{var x;return((x=window.PlayPilotLinkInjections.config)==null?void 0:x.participant_injection_popularity_threshold)||(l(u)?50:1e3)});Nr(()=>{s&&clearInterval(s)});function h(){var F,j,L,D,H,Z;const x=window.PlayPilotLinkInjections,P=((F=x.evaluated_link_injections)==null?void 0:F.filter(B=>!B.failed))||[],E=((j=x.evaluated_link_injections)==null?void 0:j.filter(B=>B.failed))||[],M=[...P,...E].filter(B=>B.type==="participant"),O=Array.from(document.querySelectorAll("[data-playpilot-pixel]"));return{Config:[{label:"Domain",data:x.domain_sid},{label:"Organization",data:x.organization_sid},{label:"HTML selector",data:x.selector}],"API Config":Object.entries(window.PlayPilotLinkInjections.config||{}).map(([B,z])=>({label:B,data:z})),[`Succesful injections (${P.length})`]:P.map(B=>({label:B.title,data:B.sentence})),[`Failed injections (${E.length})`]:E.map(B=>({label:B.title,data:`Reason: ${B.failed_message} | Sentence: ${B.sentence}`})),[`Participant popularity (${M.length})`]:M.map(B=>({label:B.participant_details.name,data:B.popularity||B.participant_details.popularity||"Not set"})),[`Fetched ads (${((L=x.ads)==null?void 0:L.length)||0})`]:(D=x.ads)==null?void 0:D.map(B=>({label:B.campaign_name,data:B})),[`Tracking events (${((H=x.tracked_events)==null?void 0:H.length)||0})`]:(Z=x.tracked_events)==null?void 0:Z.map(B=>({label:B.event,data:B.payload})),[`Visible pixels (${O.length})`]:O.map((B,z)=>({label:z+1,data:B.src}))}}function f(x){l(o)||(i.push(x.key),R(o,n.some(P=>i.slice(i.length-P.length,i.length).join("")===P),!0),s=setInterval(()=>R(a,h(),!0),200))}function v(x){window.PlayPilotLinkInjections.ads.unshift({campaign_format:x,campaign_type:"image",campaign_name:"some_campaign",content:{header:"Content header",subheader:"Content subheader"},cta:{header:"Cta header",subheader:"Cta subheader"},disclaimer:"Disclaimer"})}function g(x){window.PlayPilotLinkInjections.split_test_identifiers={},Object.values(fi).forEach(({key:P,numberOfVariants:E})=>{const M=1/E;window.PlayPilotLinkInjections.split_test_identifiers[P]=Math.min(M*x,1)})}function m(){var E,M;const x=document.querySelector('script[src*="scripts.playpilot.com/link-injection"]');if(!x)return;(M=(E=window.PlayPilotLinkInjections)==null?void 0:E.destroy)==null||M.call(E);const P=document.createElement("script");for(const O of x.attributes)P.setAttribute(O.name,O.value);P.getAttribute("onload")||P.setAttribute("onload",`window.PlayPilotLinkInjections.initialize({ token: '${window.PlayPilotLinkInjections.token}' })`),P.src=x.src.replace("link-injection","link-injection@next"),x.insertAdjacentElement("afterend",P),x.remove()}var p=we();pe("keydown",Ae,f);var w=J(p);{var b=x=>{var P=q0(),E=k(C(P),4);{var M=ge=>{var Me=C0();y(ge,Me)},O=V(()=>!!(Je("exclude_urls_pattern")&&si().match(Je("exclude_urls_pattern"))));U(E,ge=>{l(O)&&ge(M)})}var F=k(E,2);He(F,17,()=>Object.entries(l(a)),Ue,(ge,Me)=>{var Ve=V(()=>ui(l(Me),2));let st=()=>l(Ve)[0],Ke=()=>l(Ve)[1];var ie=j0(),_e=C(ie),Ce=oe(_e,!0),We=k(_e,2);{var Qe=De=>{var Re=we(),$t=J(Re);{var gn=Jn=>{var vo=L0(),pu=C(vo);He(pu,21,Ke,Ue,(_u,ho,V0,W0)=>{let yu=()=>l(ho).label,wu=()=>l(ho).data;var go=M0(),mo=C(go),bu=C(mo),ku=oe(bu,!0),xu=k(mo),Su=C(xu),Tu=oe(Su,!0);G(Eu=>{Q(ku,yu()),Q(Tu,Eu)},[()=>JSON.stringify(wu())]),y(_u,go)}),y(Jn,vo)},Oa=V(()=>Array.isArray(Ke()));U($t,Jn=>{l(Oa)&&Jn(gn)})}y(De,Re)},hn=De=>{var Re=Xe("No data");y(De,Re)};U(We,De=>{var Re;(Re=Ke())!=null&&Re.length?De(Qe):De(hn,-1)})}G(()=>Q(Ce,st())),y(ge,ie)});var j=k(F,4),L=k(j,2),D=k(L,6);He(D,16,()=>({length:4}),Ue,(ge,Me,Ve)=>{var st=D0();st.textContent=Ve,ne("click",st,()=>g(Ve)),y(ge,st)});var H=k(D,4),Z=k(H,2),B=k(Z,4),z=k(C(B),2),A=k(B,2),q=k(C(A),2);le(q,"min",0),le(q,"step",1);var W=k(q,2),K=oe(W,!0),ee=k(A,4),te=k(ee,2),ue=k(te,2);{var xe=ge=>{var Me=R0();y(ge,Me)},Te=ge=>{var Me=N0();ne("click",Me,m),y(ge,Me)};U(ue,ge=>{r?ge(xe):ge(Te,-1)})}var de=k(ue,4),fe=k(C(de),2);xf(fe,window.PlayPilotLinkInjections.region);var je=k(de,2),Fe=k(C(je),2);He(Fe,21,()=>Object.entries(_),Ue,(ge,Me)=>{var Ve=V(()=>ui(l(Me),2));let st=()=>l(Ve)[0],Ke=()=>l(Ve)[1];var ie=O0(),_e=oe(ie,!0),Ce={};G(We=>{Ul(ie,We),Q(_e,st()),Ce!==(Ce=Ke())&&(ie.value=(ie.__value=Ce)??"")},[()=>Ke()===qr()]),y(ge,ie)});var $=k(je,4),X=k(C($),2);le(X,"min",80),le(X,"max",240),le(X,"step",8);var ce=k(X,2),Ee=oe(ce,!0),Be=k($,4);G(()=>{le(q,"max",l(u)?100:1e4),Q(K,l(d)),Q(Ee,l(c))}),ne("click",j,()=>v("card")),ne("click",L,()=>v("top_scroll")),ne("click",H,()=>console.log(Vi(window.PlayPilotLinkInjections.config))),ne("click",Z,()=>console.log(Vi(window.PlayPilotLinkInjections.config).pageText)),ne("input",z,ge=>window.PlayPilotLinkInjections.config.participant_injection_popularity_threshold_use_article_average=ge.target.checked),Tf(z,()=>l(u),ge=>R(u,ge)),ne("input",q,ge=>window.PlayPilotLinkInjections.config.participant_injection_popularity_threshold=parseInt(ge.target.value)),di(q,()=>l(d),ge=>R(d,ge)),ne("click",ee,function(...ge){var Me;(Me=e.onrerender)==null||Me.apply(this,ge)}),ne("click",te,ge=>{confirm("You sure? Rerunning the AI will take some time, refresh whenever")&&(Fn({params:{run_ai:!0},method:"POST"}),ge.target.disabled=!0)}),ne("change",fe,ge=>{Tl(),window.PlayPilotLinkInjections.region=ge.target.value,Sl()}),ne("change",Fe,ge=>{Tl(),window.PlayPilotLinkInjections.language=ge.target.value,Sl()}),ne("input",X,()=>document.body.style.setProperty("--playpilot-rail-size-flexible",`${l(c)}px`)),di(X,()=>l(c),ge=>R(c,ge)),ne("click",Be,()=>R(o,!1)),y(x,P)};U(w,x=>{l(o)&&x(b)})}y(t,p),ae()}Se(["click","input","change"]);function H0(t,e){re(e,!0);const n=Array.from(document.querySelectorAll("[data-playpilot-poster-url]")),i=new da,r=.7,a="[data-playpilot-poster]";let o=Y(0),s={},c=null;const u=V(()=>l(o)<Un);Nr(v);function d(){if(Je("disable_scroll_reveal_posters")||!l(u))return;g();const m=window.innerHeight,p=new da,w=m*r,b=m-w;for(const T of n){const{top:x}=T.getBoundingClientRect();x<w&&x>b&&p.add(T)}for(const T of p){if(i.has(T))continue;const x=T.dataset.playpilotPosterUrl;x in s&&s[x]!==T||(h(T,x),i.add(T),s[x]=T)}}function h(m,p){const w=document.createElement("img");w.classList.add("playpilot-floating-poster"),w.dataset.playpilotPoster="",w.src=p,w.alt="",w.onload=()=>w.classList.add("loaded"),m.insertAdjacentElement("afterbegin",w)}function f(m){const p=m.querySelector(a);p&&(p.classList.add("animating-out"),setTimeout(()=>p.remove(),500))}function v(){for(const m of Array.from(document.querySelectorAll(a)))m.remove()}function g(){c&&clearTimeout(c),c=setTimeout(()=>{for(const m of i)f(m),i.delete(m),s={}},1e3)}pe("scroll",Ae,d),Hi("innerWidth",m=>R(o,m,!0)),ae()}var as=S("<!> <!>",1),F0=S('<div class="playpilot-link-injections svelte-1uha8ag" data-playpilot-link-injections=""><!> <!></div> <!> <!> <!> <!>',1);function B0(t,e){re(e,!0);let n=Y(null),i=Y(Oe(Ea())),r=Y(!!Yl()),a=Y(!1),o=Y(!0),s=Y(!0),c=Y(Oe([]));const u=V(()=>l(n)||{}),d=V(()=>vr(l(u).ai_injections,()=>[],!0)),h=V(()=>vr(l(u).manual_injections,()=>[],!0)),f=g();tt(()=>{l(i)&&!l(o)&&m()}),Sl(),Nr(uo);async function v(){if(Yr())return;await f,uv(),he(ve.ArticlePageView);const z=Je("explore_navigation_path");!l(d).length&&!l(h).length&&!(z&&document.location.href.includes(z))||(window.PlayPilotLinkInjections.ads=await Fc(),window.dispatchEvent(new CustomEvent("updateads",{bubbles:!0})))}async function g(){R(o,!0);try{l(i)&&R(a,await Ec({throwError:!0}),!0)}catch{he(ve.AuthFailed)}try{const z=window.PlayPilotLinkInjections.config||await av()||{};if(window.PlayPilotLinkInjections.config=z,z!=null&&z.custom_style&&T(z.custom_style||""),z!=null&&z.explore_navigation_selector&&hp(),z!=null&&z.no_affiliate&&(window.PlayPilotLinkInjections.no_affiliate=!0),z!=null&&z.domain_sid&&Fo({organizationSid:z.organization_sid,domainSid:z.domain_sid}),R(s,Wf(z),!0),l(s))return;z!=null&&z.html_selector&&(window.PlayPilotLinkInjections.selector=z==null?void 0:z.html_selector)}catch(z){he(ve.FetchingConfigFailed),console.error("TPI Config failed to fetch",z);return}try{if(await(async z=>{var A=ui(z,1);R(n,A[0],!0)})(await Promise.all([await(window.PlayPilotLinkInjections.initial_link_injections_promise||Ro({maxTries:1,runAiWhenRelevant:!Yr()})),await Xi()])),R(o,!1),!l(n)||Je("disable_public_injections")&&!(l(i)&&l(a)))return;if(Fo({organizationSid:l(n).organization_sid,domainSid:l(n).domain_sid}),!l(n).ai_running||!l(n).ai_enabled){w({aiInjections:l(d),manualInjections:l(h)});return}if(!l(i)||Yr())return;R(n,await Ro({requireCompletedResult:!0,onpoll:z=>R(n,z,!0)}),!0),w({aiInjections:l(d),manualInjections:l(h)})}catch(z){console.error(z),he(ve.InjectionError,null,{message:z.message})}}function m(){w(ou(l(c)))}function p(){R(i,!1),requestAnimationFrame(()=>{R(i,!0),g()})}function w(z={aiInjections:l(d),manualInjections:l(h)}){const{elements:A}=Vi(),q=M_(A,z);JSON.stringify(q)!==JSON.stringify(l(c))&&(R(c,q,!0),window.PlayPilotLinkInjections.evaluated_link_injections=q),l(i)||x(q)}function b(){R(i,!0),Of(),g()}function T(z){const A="playpilot-custom-style",q=document.getElementById(A),W=q||document.createElement("style");W.textContent=`body { ${z} }`,W.id=A,q||document.body.appendChild(W)}function x(z){const A=z.filter(W=>!W.failed),q=z.filter(W=>W.failed);if(A.length&&he(ve.ArticleInjected,null,{manual:A.filter(W=>W.manual).length,ai:A.filter(W=>!W.manual).length}),q.length){const W=K=>q.filter(({failed_message:ee})=>ee==null?void 0:ee.includes(K)).length;he(ve.FailedInjectionsCount,null,{total:q.length,sentence_not_found:W("sentence was not found"),already_linked:W("already inside of a link"),broken_html:W("broken HTML"),duplicate:W("duplicate"),unknown:W("unknown reasons")})}}var P=F0(),E=J(P),M=C(E);{var O=z=>{var A=as(),q=J(A);{var W=te=>{E0(te,{onclick:b,onclose:()=>{R(r,!1),Nf()}})};U(q,te=>{!l(s)&&l(r)&&!l(i)&&te(W)})}var K=k(q,2);{var ee=te=>{var ue=we(),xe=J(ue);Wl(xe,{onerror:de=>he(ve.EditorError,null,{message:de.message}),failed:de=>{vi(de,{fixed:!0,children:(fe,je)=>{var Fe=Xe("An error has occurred in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");y(fe,Fe)},$$slots:{default:!0}})}},de=>{{let fe=V(()=>{var Fe;return(Fe=l(n))==null?void 0:Fe.injections_enabled}),je=V(()=>{var Fe,$,X,ce,Ee;return{aiEnabled:(Fe=l(n))==null?void 0:Fe.ai_enabled,aiRunning:(($=l(n))==null?void 0:$.ai_running)&&((X=l(n))==null?void 0:X.ai_enabled),message:(ce=l(n))==null?void 0:ce.ai_progress_message,percentage:(Ee=l(n))==null?void 0:Ee.ai_progress_percentage}});k0(de,{get loading(){return l(o)},onreinitialize:p,get injectionsEnabled(){return l(fe)},get aiStatus(){return l(je)},get linkInjections(){return l(c)},set linkInjections(Fe){R(c,Fe,!0)}})}}),y(te,ue)};U(K,te=>{!l(s)&&l(i)&&l(a)&&te(ee)})}y(z,A)};U(M,z=>{z(O)})}var F=k(M,2);z0(F,{onrerender:m});var j=k(E,2);{var L=z=>{ao(z,{get pixels(){return l(n).pixels}})};U(j,z=>{var A,q;(q=(A=l(n))==null?void 0:A.pixels)!=null&&q.length&&z(L)})}var D=k(j,2);{var H=z=>{P0(z,{get linkInjections(){return l(c)}})};U(D,z=>{l(c).length&&z(H)})}var Z=k(D,2);Ji(Z,()=>l(c),z=>{var A=as(),q=J(A);I0(q,{});var W=k(q,2);H0(W,{}),y(z,A)});var B=k(Z,2);A0(B,{onchange:v}),y(t,P),ae()}window.PlayPilotMount={mount(){if(window.PlayPilotLinkInjections.app)return;const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),window.PlayPilotLinkInjections.app=Nt(B0,{target:t})},destroy(){if(!window.PlayPilotLinkInjections)return;window.PlayPilotLinkInjections.app=null;const t=document.getElementById("playpilot-link-injection");t&&t.remove(),uo()}};
|
|
5
|
+
`)}function Bi(t=(e=>(e=window.PlayPilotLinkInjections)==null?void 0:e.config)()||null){const n=Fi(),i=Zl(n,(t==null?void 0:t.exclude_elements_selector)||""),r=Ec(i);return{parentElement:n,elements:i,pageText:r}}function Pc(){const t=Fi();return{content_heading:qf(t),content_modified_time:zf(t),content_published_time:Hf(t)}}function qf(t){const e=t.querySelector("h1")||document.querySelector("h1");return(e==null?void 0:e.innerText.trim())||null}function zf(t){const e=document.querySelector('meta[property*="modified_time"]')||document.querySelector('meta[name*="modified_time"]')||t.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,n=Ic().dateModified||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return n?Kl(n):null}function Hf(t){const e=document.querySelector('meta[property*="published_time"]')||document.querySelector('meta[name*="published_time"]')||t.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||t.querySelector("time")||document.querySelector("time")||t.querySelector("[datetime]")||document.querySelector("[datetime]")||null,n=Ic().datePublished||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return n?Kl(n):null}function Kl(t){try{return new Date(t).toISOString()}catch{return null}}function Ic(){const e=Array.from(document.querySelectorAll('[type="application/ld+json"]')).find(n=>n.textContent.includes("dateModified")||n.textContent.includes("datePublished"));if(!e)return{};try{return JSON.parse(e.textContent||"")}catch{return{}}}function Hn(){const t=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+t}function Ff(){try{const t=new URL(location.href);return Object.fromEntries(t.searchParams.entries())}catch{return{}}}function Cc(t){return Object.entries(t).filter(([n,i])=>i!=null&&i!=="").map(([n,i])=>`${n}=${i}`).join("&")}function Bf(t){return!!(t.exclude_urls_pattern&&Hn().match(new RegExp(t.exclude_urls_pattern)))}function Vf(t){return!!(t.exclude_participants_urls_pattern&&Hn().match(new RegExp(t.exclude_participants_urls_pattern)))}let Za=null;async function Fn({url:t=Hn(),params:e={},method:n="GET"}={}){const i=vn(),r=Ta()?await Tc():!1,a=Or();if(!i)throw new Error("No token was provided");const o=`/external-pages/?api-token=${i}&include_title_details=true&include_participant_details=true${r?"&editorial_mode_enabled=true":""}&language=${a}`;let s;if(n==="POST"){const{pageText:c}=Bi();e.run_ai&&(e.hash=Of(c||""),e.page_text=c),e.url=t,e.metadata=Pc(),s=await Ht(o,{method:"POST",body:e})}else s=await Ht(o+`&url=${t}`,{method:"GET"});return window.PlayPilotLinkInjections.last_successful_fetch=s,s}async function Do({requireCompletedResult:t=!1,runAiWhenRelevant:e=!1,pollInterval:n=3e3,maxTries:i=600,onpoll:r=()=>null}={}){let a=0;Za&&clearTimeout(Za);const o=async(s,c)=>{let u;try{try{u=await Fn()}catch(d){throw console.error(d),(d==null?void 0:d.status)===404&&(u=await Fn({method:"POST"}),u.ai_enabled&&(u=await Fn({params:{run_ai:!0},method:"POST"}))),new Error}const{pageText:f}=Bi();if(u&&e&&(u=await Wf(f,u)),t&&u.ai_enabled&&u.ai_running)throw new Error;u.manual_injections=Ro(u.manual_injections||[]),u.ai_injections=Ro(u.ai_injections||[]),s(u);return}catch{if(a++,a>=i){i>1&&console.error("Max poll limit exceeded. Please return later."),s();return}u&&r(u),Za=setTimeout(()=>o(s),n)}};return new Promise(o)}async function Wf(t,e){if(!t||!e.ai_enabled||e.ai_running)return e;const n=async()=>await Fn({params:{run_ai:!0},method:"POST"}),i=Pc().content_modified_time,r=e.content_modified_time?Kl(e.content_modified_time):null,a=i&&r===i;if(i&&e.ai_last_run&&e.ai_progress_message==="Failed"){const o=new Date(Date.now()-6e5);if(new Date().getTime()-new Date(i).getTime()<864e5&&new Date(e.ai_last_run)<o)return await n()}return e.ai_last_run&&a||new Date(i||0)<=new Date(r||0)?e:await n()}async function Uf(t){var a;const e=(a=window.PlayPilotLinkInjections)==null?void 0:a.selector,i=t.filter(o=>o.manual).map(o=>({sid:o.sid,title:o.title,sentence:o.sentence,phrase_before:o.phrase_before,phrase_after:o.phrase_after,playpilot_url:o.playpilot_url,after_article:!!o.after_article,after_article_style:o.after_article_style||null,in_text:o.in_text??!0,inactive:!!o.inactive,removed:!!o.removed,type:o.type}));if(!await Fn({method:"POST",params:{private_token:Gl(),manual_injections:i,content_text_selector:e}}))throw new Error("saveLinkInjections response was faulty");return t}function Ro(t){return t.map(e=>({...e,key:Ac(e.sid)}))}function Ac(t){return t+"-"+Nr()}function Gf(t,e,n){return t.filter(i=>n.every(r=>i[r]===e[r])).length}function Zf(t,e){return e.some(n=>t>=n.start&&t<n.end)}function Mc(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function Yl(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||""}function No(t,e,n=[]){var a,o;const i=document.createTreeWalker(e);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(t)&&!n.includes(((o=r.parentNode)==null?void 0:o.nodeName)||"")););return r}function Oo(t){const e=t.parentNode;return e?e.nodeName==="A"||!!e.closest("a"):!1}function Kf(t,e,n,i){const r=Mc(e),a=Yl(e),o=t.slice(0,i),s=t.slice(i),c=/[-/\\^$*+?.()|[\]{}]/g,u=new RegExp(`${a.replace(c,"\\$&")}|${r.replace(c,"\\$&")}`),f=s.replace(u,n);return o+f}function Yf(t,e,n,i){return t.substring(0,n)+e+t.substring(i)}function yt(t){return Yl(t).toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").replace(/[^a-z0-9]+/g,"")}function Lc(t,e,n){const r=t.indexOf(e),a=Math.floor((n-e.length)/2);let o=Math.max(0,r-a),s=o+n;s>t.length&&(s=t.length,o=Math.max(0,s-n));let c=t.slice(o,s).trim();return o>0&&(c="…"+c),s<t.length&&(c+="…"),c}function jc(t,e,n){const i=t.nodeType===Node.TEXT_NODE&&t.parentNode?t.parentElement:t;if(!i||!t.textContent)return{before:"",after:""};const r=Math.max(i.innerText.indexOf(t.textContent),0),a=qo(i.innerText.slice(0,e+r)),o=i.innerText.slice(n+r),s=qo(zo(a,2)),c=zo(o,2);return{before:s,after:c}}function qo(t){return t.split("").reverse().join("")}function zo(t,e=1){const n=t.match(/[^\s]+/g);return n?n.slice(0,e).join(" ").replace(/[.,!?;:]+$/u,""):""}function ca(t,e){let n=0,i=0;for(;(i=t.indexOf(e,i))!==-1;)n++,i+=e.length;return n}function Jf(t,e,n){const i=[];let r=0;for(;r<=t.length;){const a=e?t.indexOf(e,r):r;if(a===-1&&e)break;const o=e?a+e.length:a,s=n?t.indexOf(n,o):t.length;if(n&&s===-1)break;const c=t.slice(o,s);i.push({match:c,index:o}),r=n?s+n.length:t.length+1}return i}function Qf(t,e,n,i){const a=Jf(t,n,i).filter(({match:s})=>Yl(s).includes(e));return a.length?a.reduce((s,c)=>!s||c.match.length<s.match.length?c:s):null}function Xf(t){var e,n;return{leadingSpaces:((e=t.match(/^\s*/))==null?void 0:e[0].length)||0,trailingSpaces:((n=t.match(/\s*$/))==null?void 0:n[0].length)||0}}function $f(t,e,n=0){const i=e.innerHTML,r=[],a=ev(e);let o=i.indexOf(t);for(;o!==-1;)Zf(o,a)&&r.push(o),o=i.indexOf(t,o+t.length);return r[n]??-1}function ev(t){const e=[],n=t.innerHTML;let i=!1,r=!1,a=!1,o=0;for(let s=0;s<n.length;s++){const c=n[s];if(!r&&!i&&c==="<"){i=!0,a&&(e.push({start:o,end:s}),a=!1);continue}if(i&&c==='"'&&(r=!r),i&&!r&&c===">"){i=!1;continue}!i&&!r&&!a&&(o=s,a=!0)}return!e.length&&t.textContent.length&&e.push({start:o,end:t.innerHTML.length}),e}function tv(t,e){const n=[" ",".",",","<",">"];try{const i=n.map(s=>"\\"+s).join(""),r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`([${i}])${r}([${i}])`),o=e.match(a);return o!=null&&o.index?o.index+1:-1}catch{return-1}}function Dc(t){return t.ctrlKey||t.metaKey||t.button!==0}const fe={ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",UserLeft:"ali_user_left",TitleModalView:"ali_title_modal_view",TitleModalClose:"ali_title_modal_close",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",ParticipantModalView:"ali_participant_modal_view",ParticipantModalClose:"ali_participant_modal_close",InjectionPopoverView:"ali_injection_popover_view",InjectionPopoverClose:"ali_injection_popover_close",InjectionPopoverPlaylinkClick:"ali_injection_popover_playlink_click",SimilarTitleClick:"ali_similar_title_click",ParticipantClick:"ali_title_participant_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FailedInjectionsCount:"ali_failed_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed",ManualReport:"ali_manual_report",EditorError:"ali_editor_error",InjectionError:"ali_injection_error",ExploreResultsError:"venus_explore_results_error",ExploreHomeRailError:"venus_explore_home_rail_error",TopScrollView:"ali_top_scroll_view",TopScrollClick:"ali_top_scroll_click",DisplayAdView:"ali_display_ad_view",DisplayAdClick:"ali_display_ad_click",DisplayedAdPlaylickClick:"ali_display_ad_playlink_click",DisplayedAdVideoPercentage:"ali_display_ad_video_percentage",AdsFetchFailed:"ali_ads_fetch_failed",SplitTestView:"ali_split_test_view",WidgetArticleRailTitleClick:"ali_widget_article_rail_title_click",ShareTitle:"ali_share_title",TrailerClick:"ali_trailer_button_click",ExpandTitleDescription:"ali_expand_title_description",RegionRequestFailed:"ali_region_request_failed",CardToExploreCta:"ali_card_to_explore_cta",TitleParticipantsView:"ali_title_participants_view",ExplorePageView:"venus_page_view",ExploreTitleClick:"venus_title_click",ExploreShowMore:"venus_show_more",ExploreSetFilter:"venus_set_filter",ExploreSearch:"venus_search",ExploreFetchProvidersFailed:"venus_fetch_providers_failed",ExploreTitleRailModalView:"venus_title_rail_modal_view",ExploreTitleRailExpandClick:"venus_title_rail_expand_click",ExploreTitleRailSetIndex:"venus_title_rail_set_index",ExploreNavigate:"venus_navigate",ExploreAnyClick:"venus_any_click",ExploreScrollDistance:"venus_scroll_distance"},Yt={ProviderInterest:"ProviderInterest",ProviderClick:"ProviderClick",ParticipantInterest:"ParticipantInterest",ParticipantView:"ParticipantView",SearchQuery:"SearchQuery",GenreInterest:"GenreInterest",TitleInterest:"TitleInterest"},Rn={Card:"tpi_card",Link:"tpi_link"};function nv(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.consents=t)}function Kn(t){var e;return window.PlayPilotLinkInjections.require_consent===!1?!0:!!((e=window.PlayPilotLinkInjections.consents)!=null&&e[t])}function Kr(){const t=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(t)}const Ea=[{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90}},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50}},{slug:"103",name:"Kids",categories:{kids:76}},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46}},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84}},{slug:"106",name:"Documentary",categories:{kids:50}},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44}},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28}},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88}},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40}},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38}},{slug:"112",name:"Film Noir",categories:{movie:37}},{slug:"113",name:"Game Show",categories:{series:36,kids:28}},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90}},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86}},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66}},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30}},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32}},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76}},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38}},{slug:"121",name:"Reality TV",categories:{series:24}},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74}},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32}},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80}},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20}},{slug:"126",name:"Talk Show",categories:{kids:34,series:16}},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70}},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24}},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48}},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44}},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36}},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42}},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34}},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74}},{slug:"232",name:"Stand-up",categories:{movie:18,series:18}},{slug:"240",name:"Concert",categories:{movie:45}},{slug:"900",name:"Independent",categories:{}},{slug:"901",name:"Arthouse",categories:{}},{slug:"902",name:"Bollywood",categories:{}},{slug:"903",name:"Alternate Version",categories:{}},{slug:"999",name:"Unscripted",categories:{}}];function iv(t=[]){return t.map(e=>{var n;return((n=Ea.find(i=>i.slug===e))==null?void 0:n.name)||""}).filter(Boolean)}async function rv(){const t=vn();if(!t)throw new Error("No token was provided");try{return await await Ht(`/domains/config?api-token=${t}`)||null}catch{return null}}function Je(t){var e,n;return(n=(e=window.PlayPilotLinkInjections)==null?void 0:e.config)==null?void 0:n[t]}const Ka="playpilot_user_id",Ya="playpilot_session_id";function Rc(){if(!Jl())return null;try{const t=localStorage.getItem(Ka);return t||(localStorage.setItem(Ka,Nr(16)),localStorage.getItem(Ka))}catch{return null}}function av(){if(!Jl())return null;try{const t=sessionStorage.getItem(Ya);return t||(sessionStorage.setItem(Ya,Nr(16)),sessionStorage.getItem(Ya))}catch{return null}}function Jl(){return!!Je("allow_user_id_tracking")&&Kn("tracking")}const lv="https://insights.playpilot.net";async function ve(t,e=null,n={}){var r,a,o,s,c,u;if(Kr())return;if(!Kn("tracking")){sv(t,e,n);return}if((((r=window.PlayPilotLinkInjections.tracked_events)==null?void 0:r.length)||0)>500)return;const i=new Headers({"Content-Type":"application/json"});e&&(n={original_title:e.original_title,title:e.title,title_sid:e.sid,title_type:e.type,genres:iv(e.genres),providers:[...new Set(((a=e.providers)==null?void 0:a.map(f=>f.name))||[])],...n}),Jl()&&(n.user_id=Rc(),n.session_id=av(),n.region=window.PlayPilotLinkInjections.region),n.version="8.41.0",n.time_since_initialize=(o=window.PlayPilotLinkInjections)!=null&&o.time_at_initialize?Date.now()-window.PlayPilotLinkInjections.time_at_initialize:0,n.url=Hn(),n.url_params=Ff(),n.organization_sid=((s=window.PlayPilotLinkInjections)==null?void 0:s.organization_sid)||"undefined",n.domain_sid=((c=window.PlayPilotLinkInjections)==null?void 0:c.domain_sid)||"undefined",n.device={type:window.innerWidth>Un?"desktop":"mobile",width:window.innerWidth,height:window.innerHeight,touch:window.matchMedia("(pointer: coarse)").matches,orientation:((u=screen.orientation)==null?void 0:u.type)||"undefined"},fetch(lv,{headers:i,method:"POST",body:JSON.stringify({event:t,payload:n,source:"ali",keepalive:!0})}),ov({event:t,payload:n})}function ov(t){var e;window.PlayPilotLinkInjections.tracked_events||(window.PlayPilotLinkInjections.tracked_events=[]),(e=window.PlayPilotLinkInjections.tracked_events)==null||e.push(t)}function Ho({organizationSid:t=null,domainSid:e=null}){window.PlayPilotLinkInjections.organization_sid=t||null,window.PlayPilotLinkInjections.domain_sid=e||null}function sv(t,e=null,n={}){var i;(i=window.PlayPilotLinkInjections).queued_tracking_events||(i.queued_tracking_events=[]),window.PlayPilotLinkInjections.queued_tracking_events.push({event:t,title:e,payload:n})}function cv(){if(Kn("tracking")){for(const{event:t,title:e,payload:n}of window.PlayPilotLinkInjections.queued_tracking_events||[])ve(t,e,n);window.PlayPilotLinkInjections.queued_tracking_events=[]}}const uv={Argentina:"ar",Australia:"au",Austria:"at",Belgium:"be",Brazil:"br",Canada:"ca",Chile:"cl",Colombia:"co",Denmark:"dk",Finland:"fi",France:"fr",Germany:"de",India:"in",Ireland:"ie",Italy:"it",Mexico:"mx",Netherlands:"nl",Norway:"no",Peru:"pe",Poland:"pl",Portugal:"pt",Russia:"ru",Singapore:"sg",Spain:"es",Sweden:"se",Switzerland:"ch",UK:"uk",USA:"us"},Nc="playpilot_retargeting_user_id",Oc="playpilot_retargeting_region",dv=500,Fo=[];let Ja=[],Qa=null;function ln(t,e={}){var c;const n=window[Nc]||null,i=window[Oc]||null,r=((c=document.cookie.match(/_ga=GA\d\.\d\.(\d+\.\d+)/))==null?void 0:c[1])||null,a=window.location.href,o={event:t,url:a,user_id:n,client_id:r,region:i,params:e},s=JSON.stringify(o);Fo.includes(s)||(Ja.push(o),Fo.push(s),Qa&&clearTimeout(Qa),Qa=setTimeout(()=>{fetch("https://retargeting-do.playpilot.net/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ja)}),Ja=[]},dv))}function qc(t,e={}){return()=>{et(()=>ln(t,e))}}function fv(t,e={}){return n=>{const i=()=>ln(t,e);et(()=>(n.addEventListener("click",i),()=>n.removeEventListener("click",i)))}}async function Qi(t=5e3){var n,i;const e=(n=window.PlayPilotLinkInjections)==null?void 0:n.region;if(e)return e;try{const a=await(await fetch("https://api.country.is/",{signal:AbortSignal.timeout(t)})).json();let o=(i=a==null?void 0:a.country)==null?void 0:i.toLowerCase();if(!o)throw new Error("No country was returned by api.country.is");return o==="gb"&&(o="uk"),vv(o),o}catch(r){return ve(fe.RegionRequestFailed,null,{message:r.message}),Je("fallback_region")||""}}async function zc(t=""){try{return t||(t=await Qi()),!t||Object.values(uv).some(e=>e===t)}catch{return!0}}function vv(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.region=t,window[Oc]=t)}async function Hc(){if(!Kn("ads"))return[];if(window.PlayPilotLinkInjections.no_affiliate)return[];const t=vn();if(!t)throw new Error("No token was provided");try{const e=await Qi();return await Ht(`/ads/browse/?api-token=${t}®ion=${e}`)}catch(e){throw ve(fe.AdsFetchFailed,null,{status:e.status}),e}}function di(t){var e;return!Kn("ads")||window.PlayPilotLinkInjections.no_affiliate?null:(((e=window.PlayPilotLinkInjections)==null?void 0:e.ads)||[]).find(n=>n.campaign_format===t)||null}function hv(t){return{sid:"",name:t.content.header||"",url:t.cta.url||"",logo_url:t.cta.image||"",highlighted:!0,cta_text:t.content.subheader,action_text:t.cta.header,slug:t.campaign_name,extra_info:{category:"SVOD"}}}async function Pa(t={}){const e=vn();if(!e)throw new Error("No token was provided");if(t={...t,language:Or(),include_count:!1},t.region!==null){let n=t.region||await Qi();await zc(n)||(n="gl"),t.region=n}return await Ht(`/titles/browse?api-token=${e}&`+Cc(t))}async function Fc(t){return(await Pa({related_to_sid:t.sid})).results}async function Bc(t){const n=(await Pa({sids:t,no_region_filter:!0})).results[0];if(!n)throw new Error("No title was returned for sid: "+t);return n}const gv={"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"},"In-Text Disclaimer":{[_.English]:"We may earn a commission from purchases made through some of the links below.",[_.Swedish]:"Vi kan få en provision för köp som görs via några av länkarna nedan.",[_.Danish]:"Vi kan modtage en kommission for køb foretaget gennem nogle af nedenstående links."},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},Loading:{[_.English]:"Loading",[_.Swedish]:"Laddar",[_.Danish]:"Indlæser"},"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"},"Commission Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan tjäna en provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan tjene en kommission, hvis du foretager et køb via disse links. I samarbejde med"},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]:"Hyr",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyr/köp",[_.Danish]:"Lej eller køb"},Watch:{[_.English]:"Watch",[_.Swedish]:"Titta nu",[_.Danish]:"Se nu"},"Category: AVOD":{[_.English]:"Stream for free",[_.Swedish]:"Streama gratis",[_.Danish]:"Stream gratis"},"Category: SVOD":{[_.English]:"Streaming services",[_.Swedish]:"Streamingtjänster",[_.Danish]:"Streamingtjenester"},"Category: RENT":{[_.English]:"Rent it",[_.Swedish]:"Hyr den",[_.Danish]:"Lej den"},"Category: BUY":{[_.English]:"Buy it",[_.Swedish]:"Köp den",[_.Danish]:"Køb den"},"Category: Other":{[_.English]:"Other",[_.Swedish]:"Annat",[_.Danish]:"Andet"},Share:{[_.English]:"Share",[_.Swedish]:"Dela",[_.Danish]:"Del"},"Copy URL":{[_.English]:"Copy URL",[_.Swedish]:"Kopiera URL",[_.Danish]:"Kopiér URL"},Email:{[_.English]:"Email",[_.Swedish]:"E-post",[_.Danish]:"E-mail"},"Show More":{[_.English]:"Show more",[_.Swedish]:"Visa mer",[_.Danish]:"Vis mere"},"Show Less":{[_.English]:"Show less",[_.Swedish]:"Visa mindre",[_.Danish]:"Vis mindre"},"Read More":{[_.English]:"Read more",[_.Swedish]:"Läs mer",[_.Danish]:"Læs mere"},"Read Less":{[_.English]:"Read less",[_.Swedish]:"Läs mindre",[_.Danish]:"Læs mindre"},Cast:{[_.English]:"Cast",[_.Swedish]:"Rollista",[_.Danish]:"Skuespillere"},"Similar Titles":{[_.English]:"Similar movies & shows",[_.Swedish]:"Liknande filmer och serier",[_.Danish]:"Lignende film og serier"},"Watch Trailer":{[_.English]:"Watch trailer",[_.Swedish]:"Se trailer",[_.Danish]:"Se trailer"},"Streaming Guide":{[_.English]:"Streaming Guide",[_.Swedish]:"Streaming Guide",[_.Danish]:"Streaming Guide"},"Streaming Guide Subheading":{[_.English]:"Discover and search all movies and TV shows",[_.Swedish]:"Upptäck och sök bland alla filmer och tv-serier",[_.Danish]:"Opdag og søg i alle film og tv-serier"},"Streaming Guide Disclaimer":{[_.English]:'In collaboration with <a href="https://www.playpilot.com/" target="_blank" rel="sponsored">PlayPilot.com</a>',[_.Swedish]:'I samarbete med <a href="https://www.playpilot.com/" target="_blank" rel="sponsored">PlayPilot.com</a>',[_.Danish]:'I samarbejde med <a href="https://www.playpilot.com/" target="_blank" rel="sponsored">PlayPilot.com</a>'},"Streaming Guide Description":{[_.English]:"Find where to watch movies online - the ultimate guide that helps you find the best movies and shows across streaming services.",[_.Swedish]:"Sök bland alla filmer och serier för att ta reda på var du kan streama dem",[_.Danish]:"Find ud af, hvor du kan se film online - den ultimative guide, der hjælper dig med at finde de bedste film og serier på streamingtjenester."},"Search Movies And Shows":{[_.English]:"Search movies and shows",[_.Swedish]:"Sök filmer och serier",[_.Danish]:"Søg film og serier"},Services:{[_.English]:"Services",[_.Swedish]:"Tjänster",[_.Danish]:"Tjenester"},Genres:{[_.English]:"Genres",[_.Swedish]:"Genrer",[_.Danish]:"Genrer"},IMDb:{[_.English]:"IMDb",[_.Swedish]:"IMDb",[_.Danish]:"IMDb"},Year:{[_.English]:"Year",[_.Swedish]:"År",[_.Danish]:"År"},Runtime:{[_.English]:"Runtime",[_.Swedish]:"Speltid",[_.Danish]:"Spilletid"},Countries:{[_.English]:"Countries",[_.Swedish]:"Länder",[_.Danish]:"Lande"},"All Filters":{[_.English]:"All filters",[_.Swedish]:"Alla filter",[_.Danish]:"Alle filtre"},"Sort By":{[_.English]:"Sort by",[_.Swedish]:"Sortera efter",[_.Danish]:"Sortér efter"},Popularity:{[_.English]:"Popularity",[_.Swedish]:"Popularitet",[_.Danish]:"Popularitet"},New:{[_.English]:"New",[_.Swedish]:"Nytt",[_.Danish]:"Nyt"},"Top Rated":{[_.English]:"Top Rated",[_.Swedish]:"Toppbetyg",[_.Danish]:"Højst vurderet"},"IMDb Rating":{[_.English]:"IMDb Rating",[_.Swedish]:"IMDb-betyg",[_.Danish]:"IMDb-vurdering"},"-popularity":{[_.English]:"Popularity",[_.Swedish]:"Popularitet",[_.Danish]:"Popularitet"},"-new":{[_.English]:"New",[_.Swedish]:"Nytt",[_.Danish]:"Nyt"},"-best":{[_.English]:"Top Rated",[_.Swedish]:"Toppbetyg",[_.Danish]:"Højst vurderet"},"-imdb_score":{[_.English]:"IMDb Rating",[_.Swedish]:"IMDb-betyg",[_.Danish]:"IMDb-vurdering"},Search:{[_.English]:"Search",[_.Swedish]:"Sök",[_.Danish]:"Søg"},"Born On":{[_.English]:"Born on",[_.Swedish]:"Född den",[_.Danish]:"Født den"},"Died On":{[_.English]:"Died on",[_.Swedish]:"Död den",[_.Danish]:"Død den"},Credits:{[_.English]:"Credits",[_.Swedish]:"Medverkande",[_.Danish]:"Medvirkende"},Home:{[_.English]:"Home",[_.Swedish]:"Hem",[_.Danish]:"Hjem"},Explore:{[_.English]:"Explore",[_.Swedish]:"Utforska",[_.Danish]:"Udforsk"},"Page Not Found":{[_.English]:"Page not found",[_.Swedish]:"Sidan hittades inte",[_.Danish]:"Siden blev ikke fundet"},"Mentioned In This Article":{[_.English]:"Mentioned in this article",[_.Swedish]:"Nämnda i den här artikeln",[_.Danish]:"Nævnt i denne artikel"},"Sorry Region Not Supported":{[_.English]:"Sorry, your region is not supported",[_.Swedish]:"Tyvärr stöds inte din region",[_.Danish]:"Beklager, din region understøttes ikke"},"Show Count More":{[_.English]:"Show [[count]] more",[_.Swedish]:"Visa [[count]] till",[_.Danish]:"Vis [[count]] mere"},Movies:{[_.English]:"Movies",[_.Swedish]:"Filmer",[_.Danish]:"Film"},Shows:{[_.English]:"Shows",[_.Swedish]:"Serier",[_.Danish]:"Serier"},Documentaries:{[_.English]:"Documentaries",[_.Swedish]:"Dokumentärer",[_.Danish]:"Dokumentarer"},"List: Trending":{[_.English]:"Trending Movies & Shows",[_.Swedish]:"Trendande Titlar",[_.Danish]:"Populære film og serier"},"List: Upcoming":{[_.English]:"Upcoming Releases",[_.Swedish]:"Kommande Premiärer",[_.Danish]:"Mest ventede film"},"List: New":{[_.English]:"New Releases",[_.Swedish]:"Nya Filmer & Serier",[_.Danish]:"Nye film og serier"},"List: Demand":{[_.English]:"Always in Demand",[_.Swedish]:"Tidlösa Favoriter",[_.Danish]:"Tidløse favoritter"},"List: Cinema":{[_.English]:"Coming to Cinemas",[_.Swedish]:"Snart på Bio",[_.Danish]:"Kommende film"},"Explore All Movies And Shows":{[_.English]:"Explore all movies and TV shows",[_.Swedish]:"Utforska alla filmer och tv-serier",[_.Danish]:"Udforsk alle film og tv-serier"},"Job: all":{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},"Job: actor":{[_.English]:"Actor",[_.Swedish]:"Skådespelare",[_.Danish]:"Skuespiller"},"Job: producer":{[_.English]:"Producer",[_.Swedish]:"Producent",[_.Danish]:"Producer"},"Job: executive-producer":{[_.English]:"Executive Producer",[_.Swedish]:"Verkställande producent",[_.Danish]:"Administrerende producer"},"Job: writer":{[_.English]:"Writer",[_.Swedish]:"Manusförfattare",[_.Danish]:"Manuskriptforfatter"},"Job: director":{[_.English]:"Director",[_.Swedish]:"Regissör",[_.Danish]:"Instruktør"},"Job: cinematographer":{[_.English]:"Cinematographer",[_.Swedish]:"Filmfotograf",[_.Danish]:"Filmfotograf"},"Job: editor":{[_.English]:"Editor",[_.Swedish]:"Redaktör",[_.Danish]:"Redaktør"},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 se(t,e=Or()){var n;return((n=gv[t])==null?void 0:n[e])||t}const mv=t=>t;function Ql(t){const e=t-1;return e*e*e+1}function Bo(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Qn(t,e,n){return Number.isNaN(e)?"":`${t}: ${n*e}px;`}function Ot(t,{delay:e=0,duration:n=400,easing:i=mv}={}){const r=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function Si(t,{delay:e=0,duration:n=400,easing:i=Ql,x:r=0,y:a=0,opacity:o=0}={}){const s=getComputedStyle(t),c=+s.opacity,u=s.transform==="none"?"":s.transform,f=c*(1-o),[d,v]=Bo(r),[h,g]=Bo(a);return{delay:e,duration:n,easing:i,css:(m,p)=>`
|
|
6
|
+
transform: ${u} translate(${(1-m)*d}${v}, ${(1-m)*h}${g});
|
|
7
|
+
opacity: ${c-f*p}`}}function pr(t,{delay:e=0,duration:n=400,easing:i=Ql,axis:r="y"}={}){const a=getComputedStyle(t),o=+a.opacity,s=r==="y"?"height":"width",c=parseFloat(a[s]),u=r==="y"?["top","bottom"]:["left","right"],f=u.map(w=>`${w[0].toUpperCase()}${w.slice(1)}`),d=parseFloat(a[`padding${f[0]}`]),v=parseFloat(a[`padding${f[1]}`]),h=parseFloat(a[`margin${f[0]}`]),g=parseFloat(a[`margin${f[1]}`]),m=parseFloat(a[`border${f[0]}Width`]),p=parseFloat(a[`border${f[1]}Width`]);return{delay:e,duration:n,easing:i,css:w=>`overflow: hidden;opacity: ${Math.min(w*20,1)*o};`+Qn(s,c,w)+Qn(`padding-${u[0]}`,d,w)+Qn(`padding-${u[1]}`,v,w)+Qn(`margin-${u[0]}`,h,w)+Qn(`margin-${u[1]}`,g,w)+Qn(`border-${u[0]}-width`,m,w)+Qn(`border-${u[1]}-width`,p,w)+`min-${s}: 0`}}function Xi(t,{delay:e=0,duration:n=400,easing:i=Ql,start:r=0,opacity:a=0}={}){const o=getComputedStyle(t),s=+o.opacity,c=o.transform==="none"?"":o.transform,u=1-r,f=s*(1-a);return{delay:e,duration:n,easing:i,css:(d,v)=>`
|
|
8
|
+
transform: ${c} scale(${1-u*v});
|
|
9
|
+
opacity: ${s-f*v}
|
|
10
|
+
`}}function $i(t){return t?t.replace("/src/img",""):null}function Vo(t,e=null){return t!=null&&t.length?`${Mf}/${t}?${e?`class=${e}&`:""}optimizer=image`:""}var pv=x('<img class="svelte-p6g2a"/>');function Ia(t,e){re(e,!0);const n=I(e,"width",3,96),i=I(e,"height",3,144),r=I(e,"lazy",3,!0),a=I(e,"onload",3,()=>null);var o=pv();G(s=>{le(o,"loading",r()?"lazy":null),le(o,"src",s),le(o,"alt",`Movie poster for '${e.title.title??""}'`),le(o,"width",n()),le(o,"height",i())},[()=>$i(e.title.standing_poster)]),me("error",o,({target:s})=>s.src=Hi),me("load",o,function(...s){var c;(c=a())==null||c.apply(this,s)}),y(t,o),ae()}var _v=Ge('<svg viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function qr(t,e){const n=I(e,"size",3,16);var i=_v();G(()=>{le(i,"width",n()),le(i,"height",n())}),y(t,i)}var yv=new Set(["$$slots","$$events","$$legacy","children","size","onclick"]);function Vi(t,e){re(e,!0);const n=I(e,"size",3,"32px"),i=I(e,"onclick",3,()=>null),r=Ji(e,yv);var a=ke(),o=Q(a);dc(o,()=>e.href?"a":"button",!1,(s,c)=>{yc(s,()=>({role:e.href?"link":"button",onclick:i(),class:"button",...r,[wi]:{"--size":n()}}),void 0,void 0,void 0,"svelte-1ch8qoj");var u=ke(),f=Q(u);nt(f,()=>e.children??Pt),y(c,u)}),y(t,a),ae()}var wv=x('<div><!> <div class="backdrop svelte-f0c4xl" data-testid="backdrop"></div> <div class="close svelte-f0c4xl"><!></div></div>');function bv(t,e){const n=I(e,"embeddable_url",3,"");let i=K(Ne(window.innerHeight)),r=K(Ne(window.innerWidth)),a=B(()=>l(r)<l(i));var o=wv();let s;var c=C(o);$l(c,{get embeddable_url(){return n()},controls:["current-time","fullscreen","mute","play","progress"]});var u=k(c,2),f=k(u,2),d=C(f);Vi(d,{size:"42px",get onclick(){return e.onclose},"aria-label":"Close",children:(v,h)=>{qr(v,{size:24})},$$slots:{default:!0}}),G(()=>s=_e(o,1,"overlay svelte-f0c4xl",null,s,{portrait:l(a)})),zi("innerWidth",v=>R(r,v,!0)),zi("innerHeight",v=>R(i,v,!0)),te("click",u,function(...v){var h;(h=e.onclose)==null||h.apply(this,v)}),qe(3,o,()=>Ot,()=>({duration:100})),y(t,o)}Se(["click"]);const kv="https://youtube-availability.playpilot.workers.dev";async function Vc(t){var n,i,r;const e=(n=await Qi())==null?void 0:n.toUpperCase();if(!e)return!0;try{const a=await fetch(`${kv}/?video_id=${t}`);if(!a.ok)throw new Error("Response was not ok");const o=await a.json();return!((i=o.blocked)!=null&&i[e]||!o.blocked&&o.allowed&&!((r=o.allowed)!=null&&r.includes(e)))}catch{return!1}}let Yr={};function Wc(t){const e=si(),n={onclose:xv,embeddable_url:t.embeddable_url||""};Yr=Nt(bv,{target:e,props:n})}function xv(){Yr&&(Zn(Yr,{outro:!0}),Yr=null)}function Xl(t){const e=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/,n=t.match(e);return(n==null?void 0:n[7])||null}async function Sv(t,e=3){let n=0,i=null;for(;n<e&&!i;){const r=t[n],a=(r==null?void 0:r.embeddable_url)&&Xl(r.embeddable_url);try{a&&await Vc(a)&&(i=r)}catch{}n++}return i}var Tv=Ge('<path fill="currentColor" d="m616-320-56-56 104-104-104-104 56-56 104 104 104-104 56 56-104 104 104 104-56 56-104-104-104 104Zm-496-40v-240h160l200-200v640L280-360H120Zm280-246-86 86H200v80h114l86 86v-252ZM300-480Z"></path>'),Ev=Ge('<path fill="currentColor" d="M560-131v-82q90-26 145-100t55-168q0-94-55-168T560-749v-82q124 28 202 125.5T840-481q0 127-78 224.5T560-131ZM120-360v-240h160l200-200v640L280-360H120Zm440 40v-322q47 22 73.5 66t26.5 96q0 51-26.5 94.5T560-320ZM400-606l-86 86H200v80h114l86 86v-252ZM300-480Z"></path>'),Pv=Ge('<svg width="32px" height="32px" viewBox="0 -960 960 960"><!></svg>');function Iv(t,e){const n=I(e,"muted",3,!1);var i=Pv(),r=C(i);{var a=s=>{var c=Tv();y(s,c)},o=s=>{var c=Ev();y(s,c)};Z(r,s=>{n()?s(a):s(o,-1)})}y(t,i)}ud();var Cv=Ge('<svg width="32px" height="32px" viewBox="0 -960 960 960"><path fill="currentColor" d="M120-120v-200h80v120h120v80H120Zm520 0v-80h120v-120h80v200H640ZM120-640v-200h200v80H200v120h-80Zm640 0v-120H640v-80h200v200h-80Z"></path></svg>');function Av(t){var e=Cv();y(t,e)}var Mv=Gd(x('<script src="https://unpkg.com/plyr@3"><\/script> <link rel="stylesheet" href="https://unpkg.com/plyr@3/dist/plyr.css"/>',1)),Lv=x('<button class="action svelte-1ivh34t" aria-label="Mute"><!></button> <button class="action secondary svelte-1ivh34t" aria-label="Fullscreen"><!></button>',1),jv=x('<div><div class="player svelte-1ivh34t" data-plyr-provider="youtube" data-plyr-embed-id=""></div> <!></div>');function $l(t,e){var M;re(e,!0);let n=I(e,"embeddable_url",3,""),i=I(e,"controls",19,()=>[]),r=I(e,"muted",7,!1),a=I(e,"loop",3,!1),o=I(e,"captions",3,!1),s=I(e,"autoplay",3,!0),c=I(e,"showActions",3,!1),u=I(e,"fallbackStartTime",3,0),f=I(e,"clickToPlay",3,!0);const d=B(()=>Xl(n())),v=B(()=>{var D,L;return(((L=(D=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:D.video_playtimes)==null?void 0:L[l(d)||""])||u()+1)-1}),h=((M=window==null?void 0:window.getComputedStyle(document.body).getPropertyValue("--playpilot-primary"))==null?void 0:M.replace("#",""))||"fa548a";let g=K(null),m=K(!1),p;lt(()=>{if(!l(d))return;window.PlayPilotLinkInjections.video_playtimes||(window.PlayPilotLinkInjections.video_playtimes={});let D=l(v);const L=setInterval(()=>{D++,window.PlayPilotLinkInjections.video_playtimes[l(d)]=D},1e3);return()=>clearInterval(L)});function w(){typeof window.Plyr>"u"||l(g)&&(l(g).dataset.plyrEmbedId=l(d),l(g).style.setProperty("--plyr-color-main","#"+h),p=new window.Plyr(l(g),{controls:i().length===0?["play","mute","fullscreen","progress","current-time"]:i(),playsinline:!0,autoplay:s(),muted:r(),clickToPlay:f(),storage:{enabled:!1},youtube:{noCookie:!0,cc_load_policy:o()?1:0,cc_lang_pref:"auto"}}),p.on("ready",()=>{p.currentTime=l(v),b(r())}),p.on("enterfullscreen",()=>{R(m,!0),b(!1)}),p.on("exitfullscreen",()=>{R(m,!1),b(!0)}),a()&&p.on("statechange",D=>{D.detail.code===0&&requestAnimationFrame(()=>{p.play(),b(r())})}))}function b(D=!r()){r(D),p.muted=D,p.volume=D?0:1}function T(){if(/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1){Wc({embeddable_url:n()}),b(!0);return}p.fullscreen.enter()}function S(D){D.detail===n()&&(p==null||p.play())}function A(D){D.detail===n()&&(p==null||p.pause())}var E={toggleMute:b,enterFullscreen:T,play:S,pause:A},P=ke();me("playembed",Ie,S),me("pauseembed",Ie,A),fc("1ivh34t",D=>{var L=ke(),V=Q(L);{var W=z=>{var O=Mv(),H=Q(O);me("load",H,w),y(z,O)};Z(V,z=>{l(d)&&z(W)})}y(D,L)});var q=Q(P);{var F=D=>{var L=jv();let V;var W=C(L);$e(W,H=>R(g,H),()=>l(g));var z=k(W,2);{var O=H=>{var U=Lv(),Y=Q(U),$=C(Y);Iv($,{get muted(){return r()}});var ne=k(Y,2),ue=C(ne);Av(ue),te("click",Y,()=>b()),te("click",ne,T),y(H,U)};Z(z,H=>{c()&&H(O)})}G(()=>{V=_e(L,1,"svelte-1ivh34t",null,V,{fullscreen:l(m),"hide-controls":i().length===0&&!l(m)}),le(W,"data-testid",n())}),y(D,L)},j=D=>{var L=Xe("Something went wrong");y(D,L)};Z(q,D=>{l(d)?D(F):D(j,-1)})}return y(t,P),ae(E)}Se(["click"]);var Dv=x('<div tabindex="-1"><div tabindex="0" class="slider-content svelte-1gs8ha8"><!></div></div> <!>',1);function Uc(t,e){re(e,!0);let n=I(e,"gap",3,"0"),i=I(e,"fill",3,!0),r=I(e,"vertical",3,!1),a=I(e,"transitionDuration",3,300),o=I(e,"threshold",3,30),s=I(e,"moveThreshold",3,0),c=I(e,"currentIndex",15,0),u=I(e,"shown",31,()=>Ne([])),f=I(e,"sliderWidth",15,0),d=I(e,"sliderHeight",15,0),v=I(e,"currentScrollPosition",15,0),h=I(e,"maxWidth",15,0),g=I(e,"maxHeight",15,0),m=I(e,"reachedEnd",15,!1),p=I(e,"distanceToEnd",15,0),w=I(e,"passedThreshold",15,!1),b=I(e,"passedMoveThreshold",15,!1),T=I(e,"allowWheel",3,!1),S=I(e,"end",3,()=>null),A=I(e,"change",3,ie=>null),E=I(e,"onend",19,S),P=I(e,"onchange",19,A),q=I(e,"onresize",3,()=>null),F=K(!1),j=K(!1),M=0,D=0,L=K(void 0),V=K(void 0),W=null,z=null;et(()=>{l(V)&&be(),l(V)&&p((r()?g():h())-v()-(r()?d():f()))}),lt(()=>(X(),()=>W==null?void 0:W.disconnect()));function O(ie){const pe=l(V).children.length,Ce=Math.max(0,Math.min(ie,pe-1));de({setIndex:Ce}),be()}function H(){R(j,!0),O(c()),requestAnimationFrame(()=>R(j,!1))}function U(ie){ee(ie.target)&&(ie.preventDefault(),M=Te(ie),R(F,!0))}function Y(){if(l(F)){if(!w())de({setIndex:c()});else{const ie=v()-D,pe=ie>0?1:-1;ie!=0&&de({direction:pe})}R(F,!1),w(!1)}}function $(ie){if(!l(F))return;const pe=Te(ie),Ce=D+(M-pe),We=M-pe;b(Math.abs(We)>s()),w(Math.abs(v()-D)>o()),b()&&(ye(Ce-s()*(We>0?1:-1)),be())}function ne(ie){if(!T())return;const{deltaX:pe,deltaY:Ce}=ie;if(Math.abs(pe)<Math.abs(Ce))return;ie.preventDefault();const We=20,Qe=r()?Ce:pe,hn=v()+Qe*We*.02;ye(hn),be(),z&&clearTimeout(z),z=setTimeout(()=>{de({direction:Qe>0?1:-1})},100)}function ue(ie){ee(document.activeElement)&&(ie.key=="ArrowLeft"&&O(c()-1),ie.key=="ArrowRight"&&O(c()+1))}function de({setIndex:ie=-1,direction:pe=1}={}){const Ce=Fe(),We=c();c(0);let Qe;for(Qe=0;Qe<Ce.length;Qe++)if(ie!=-1){if(Qe>=ie)break}else if(pe>0&&Ce[Qe]>v()||pe<0&&Ce[Qe+1]>v())break;c(Math.min(Qe,Be().length-1)),ye(Ce[c()],!0),D=v(),P()&&c()!=We&&P()(c())}function ye(ie,pe=!1){v(ie);const Ce=r()?g():h(),We=r()?d():f(),Qe=Ce-We,hn=r()?"clientHeight":"clientWidth";m(v()>=Qe),m()&&(E()&&E()(),i()&&pe&&v(l(V)[hn]<We?0:Qe))}function be(){const ie=Fe();Array.from(ie).forEach((pe,Ce)=>{v()+f()<pe||u().includes(Ce)||u([...u(),Ce])})}function Te(ie){var Ce,We;const pe=r()?"pageY":"pageX";return ie[pe]??((We=(Ce=ie.touches)==null?void 0:Ce[0])==null?void 0:We[pe])}function Fe(){return Be().map(ie=>r()?ie.offsetTop:ie.offsetLeft)}function Be(){return Array.from(l(V).children).filter(ie=>ie instanceof HTMLElement).filter(ie=>ie.src!="about:blank")}function X(){W=new ResizeObserver(ie=>{for(const pe of ie){const Ce=Array.isArray(pe.contentBoxSize)?pe.contentBoxSize[0]:pe.contentBoxSize;h(Ce.inlineSize),g(Ce.blockSize)}q()()}),W.observe(l(V))}function ee(ie){return ie===l(L)||(ie==null?void 0:ie.closest(".slider"))===l(L)}var ce={setIndex:O,reposition:H},Le=Dv();me("mousedown",Ie,U),me("mouseup",Ie,Y),me("mousemove",Ie,$),me("touchstart",Ie,U,void 0,!0),me("touchend",Ie,Y),me("touchmove",Ie,$,void 0,!0),me("keydown",Ie,ue),me("resize",Ie,H);var He=Q(Le);let he;var Ae=C(He);let Ve;var st=C(Ae);nt(st,()=>e.children??Pt,()=>({sliderWidth:f(),sliderHeight:d(),shown:u(),currentIndex:c(),setIndex:O,currentScrollPosition:v(),maxWidth:h(),reachedEnd:m(),distanceToEnd:p()})),$e(Ae,ie=>R(V,ie),()=>l(V)),$e(He,ie=>R(L,ie),()=>l(L));var Ke=k(He,2);return nt(Ke,()=>e.controls??Pt,()=>({sliderWidth:f(),sliderHeight:d(),shown:u(),currentIndex:c(),setIndex:O,currentScrollPosition:v(),maxWidth:h(),reachedEnd:m(),distanceToEnd:p()})),G(ie=>{he=_e(He,1,"slider svelte-1gs8ha8",null,he,{dragging:l(F),"passed-threshold":w(),vertical:r()}),Ve=rt(Ae,"",Ve,{transform:`translate${r()?"Y":"X"}(${v()*-1}px)`,"transition-duration":`${(l(F)||l(j)?0:a())??""}ms`,"--gap":ie})},[()=>parseFloat(n()||"0")?n():null]),me("wheel",He,ne),At(He,"clientWidth",f),At(He,"clientHeight",d),y(t,Le),ae(ce)}var Rv=Ge("<title> </title>"),Nv=Ge('<svg viewBox="0 -960 960 960"><!><path d="m288-96-68-68 316-316-316-316 68-68 384 384L288-96Z" fill="currentColor"></path></svg>');function Ft(t,e){const n=I(e,"direction",3,"right"),i=I(e,"title",3,""),r=I(e,"size",3,16);var a=Nv(),o=C(a);{var s=c=>{var u=Rv(),f=oe(u,!0);G(()=>J(f,i())),y(c,u)};Z(o,c=>{i()&&c(s)})}G(()=>{_e(a,0,n(),"svelte-1m6nwwy"),le(a,"width",`${r()??""}px`),le(a,"height",`${r()??""}px`)}),y(t,a)}function Re(t,e=1){t.role="heading",t.ariaLevel=e.toString()}var Ov=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],qv=["difference","intersection","symmetricDifference","union"],Wo=!1,Di,Gt,Dn,ya,Ui,Gc,Zc;const wa=class wa extends Set{constructor(n){super();we(this,Ui);we(this,Di,new Map);we(this,Gt,K(0));we(this,Dn,K(0));we(this,ya,bn||-1);if(n){for(var i of n)super.add(i);N(this,Dn).v=super.size}Wo||Ee(this,Ui,Zc).call(this)}has(n){var i=super.has(n),r=N(this,Di),a=r.get(n);if(a===void 0){if(!i)return l(N(this,Gt)),!1;a=Ee(this,Ui,Gc).call(this,!0),r.set(n,a)}return l(a),i}add(n){return super.has(n)||(super.add(n),R(N(this,Dn),super.size),zn(N(this,Gt))),this}delete(n){var i=super.delete(n),r=N(this,Di),a=r.get(n);return a!==void 0&&(r.delete(n),R(a,!1)),i&&(R(N(this,Dn),super.size),zn(N(this,Gt))),i}clear(){if(super.size!==0){super.clear();var n=N(this,Di);for(var i of n.values())R(i,!1);n.clear(),R(N(this,Dn),0),zn(N(this,Gt))}}keys(){return this.values()}values(){return l(N(this,Gt)),super.values()}entries(){return l(N(this,Gt)),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return l(N(this,Dn))}};Di=new WeakMap,Gt=new WeakMap,Dn=new WeakMap,ya=new WeakMap,Ui=new WeakSet,Gc=function(n){return bn===N(this,ya)?K(n):dn(n)},Zc=function(){Wo=!0;var n=wa.prototype,i=Set.prototype;for(const r of Ov)n[r]=function(...a){return l(N(this,Gt)),i[r].apply(this,a)};for(const r of qv)n[r]=function(...a){l(N(this,Gt));var o=i[r].apply(this,a);return new wa(o)}};let ua=wa;var Tr,Er;class zv{constructor(e,n){we(this,Tr);we(this,Er);xe(this,Tr,e),xe(this,Er,oc(n))}get current(){return N(this,Er).call(this),N(this,Tr).call(this)}}Tr=new WeakMap,Er=new WeakMap;const Hv=/\(.+\)/,Fv=new Set(["all","print","screen","and","or","not","only"]);class Bv extends zv{constructor(e,n){let i=Hv.test(e)||e.split(/[\s,]+/).some(a=>Fv.has(a.trim()))?e:`(${e})`;const r=window.matchMedia(i);super(()=>r.matches,a=>Bd(r,"change",a))}}function Vv(t){const e=t-1;return e*e*e+1}const er=new Bv("(prefers-reduced-motion: reduce)");var Wv=x('<div class="heading svelte-1ayf7b5"> </div>'),Uv=x('<button class="arrow left svelte-1ayf7b5" aria-label="Previous" aria-live="polite"><!></button>'),Gv=x('<button class="arrow right svelte-1ayf7b5" aria-label="Next" aria-live="polite"><!></button>'),Zv=x("<!> <!>",1),Kv=x('<!> <div class="rail svelte-1ayf7b5"><!></div>',1);function da(t,e){re(e,!0);let n=I(e,"heading",3,""),i=I(e,"onchange",3,()=>null),r=I(e,"onresize",3,()=>null),a=I(e,"slider",15),o=I(e,"shown",31,()=>Ne([]));var s=Kv(),c=Q(s);{var u=v=>{var h=Wv(),g=oe(h,!0);bt(h,(m,p)=>Re==null?void 0:Re(m,p),()=>2),G(()=>J(g,n())),y(v,h)};Z(c,v=>{n()&&v(u)})}var f=k(c,2),d=C(f);{const v=(g,m)=>{let p=()=>(m==null?void 0:m()).setIndex,w=()=>(m==null?void 0:m()).currentIndex,b=()=>(m==null?void 0:m()).reachedEnd;var T=Zv(),S=Q(T);{var A=q=>{var F=Uv(),j=C(F);Ft(j,{direction:"left",title:"Previous"}),te("click",F,()=>p()(w()-1)),y(q,F)};Z(S,q=>{w()>0&&q(A)})}var E=k(S,2);{var P=q=>{var F=Gv(),j=C(F);Ft(j,{title:"Next"}),te("click",F,()=>p()(w()+1)),y(q,F)};Z(E,q=>{b()||q(P)})}y(g,T)};let h=B(()=>er.current?0:300);$e(Uc(d,{get onchange(){return i()},get onresize(){return r()},get transitionDuration(){return l(h)},allowWheel:!0,get shown(){return o()},set shown(g){o(g)},controls:v,children:(g,m)=>{var p=ke(),w=Q(p);nt(w,()=>e.children),y(g,p)},$$slots:{controls:!0,default:!0}}),g=>a(g),()=>a())}y(t,s),ae()}Se(["click"]);function Ca(t){return`${kc}/${t.type}/${t.slug}/`}function eo(t){return`${kc}/name/${t.sid}/`}function to(t){return Je("explore_navigation_path")+`?route=modal&sid=${t}`}var Yv=x('<img class="video-fallback svelte-12ph9f6" alt=""/>'),Jv=x('<div class="video svelte-12ph9f6"><div class="video-overlay svelte-12ph9f6" title=""></div> <!></div>'),Qv=x('<div class="poster svelte-12ph9f6"><!></div>'),Xv=x('<div class="aside svelte-12ph9f6" data-testid="aside"> </div>'),$v=x('<div data-testid="title"><div class="media svelte-12ph9f6"><!></div> <span class="heading svelte-12ph9f6" data-testid="heading"> </span> <!></div>'),eh=x('<div class="skeleton svelte-12ph9f6"> </div>'),th=x('<div class="aside svelte-12ph9f6"><div class="aside-skeleton svelte-12ph9f6"></div></div>'),nh=x('<div class="title svelte-12ph9f6" data-testid="skeleton"><div class="poster svelte-12ph9f6"></div> <div class="heading svelte-12ph9f6"><span class="skeleton svelte-12ph9f6"> </span> <span class="skeleton svelte-12ph9f6"> </span></div> <!></div>'),ih=x("<div><!></div>");function _r(t,e){re(e,!0);let n=I(e,"minimumLength",3,1),i=I(e,"heading",3,""),r=I(e,"size",3,"small"),a=I(e,"aside",3,!1),o=I(e,"navigateToExplore",3,!1),s=I(e,"expandable",3,!1),c=I(e,"expandedTitle",15,null),u=I(e,"expandedRailKey",15,null),f=I(e,"shown",31,()=>Ne([])),d=I(e,"onclick",3,()=>null),v=I(e,"onexpand",3,()=>null);const h=Nr(),m=vr("scope")==="popover"?vr("title"):null;let p=K(null),w=K(null),b=K(null),T=!1;lt(()=>{s()&&P()});function S(L,V,W){var O,H,U,Y,$;L==null||L.preventDefault();const z=V[W];if(s()&&!q(z)){const ne=(O=l(p))==null?void 0:O.querySelectorAll(".title")[W],ye=(((H=l(p))==null?void 0:H.getBoundingClientRect().right)||0)-ne.getBoundingClientRect().right>ne.clientWidth*2;T=!0,setTimeout(()=>T=!1,500),r()==="flexible"&&!ye?(U=l(w))==null||U.setIndex(W-2):r()==="huge"&&!ye&&((Y=l(w))==null||Y.setIndex(W)),E(z),L&&v()(z);return}if(L){if(($=l(b))==null||$.toggleMute(!0),d()(z),o()){window.location.href=to(z.sid);return}Yn({event:L,type:"titles-rail",data:V,returnToTitle:m,props:{initialIndex:W}})}}async function A(){const L=await e.titles,V=await Sv(L);V&&(c()||u()&&u()!==h||E(V))}function E(L){u(h),c(L)}function P(){u()===h||Array.from(document.querySelectorAll('[data-role="expandable-rail"]')).filter(z=>z.getBoundingClientRect().top>=0).sort((z,O)=>z.getBoundingClientRect().top-O.getBoundingClientRect().top)[0]!==l(p)||(c(null),u(null),A())}function q(L){var V;return u()===h&&L.sid===((V=c())==null?void 0:V.sid)}function F(L,V){s()&&(T||setTimeout(()=>S(null,L,V),250))}var j=ih();me("scroll",Ie,P);let M;var D=C(j);Sn(D,()=>e.titles,L=>{da(L,{get heading(){return i()},children:(V,W)=>{var z=ke(),O=Q(z);ze(O,16,()=>({length:12}),Ue,(H,U)=>{var Y=nh(),$=k(C(Y),4);{var ne=ue=>{var de=th(),ye=C(de);ze(ye,20,()=>({length:3}),Ue,(be,Te)=>{var Fe=eh();y(be,Fe)}),y(ue,de)};Z($,ue=>{a()&&ue(ne)})}y(H,Y)}),y(V,z)},$$slots:{default:!0}})},(L,V)=>{const W=B(()=>{var U;return(U=l(V))==null?void 0:U.filter((Y,$,ne)=>ne.findIndex(ue=>ue.sid===Y.sid)===$)});var z=ke(),O=Q(z);{var H=U=>{da(U,{get heading(){return i()},onchange:Y=>F(l(V),Y),onresize:()=>{var Y;return(Y=l(w))==null?void 0:Y.reposition()},get slider(){return l(w)},set slider(Y){R(w,Y,!0)},get shown(){return f()},set shown(Y){f(Y)},children:(Y,$)=>{var ne=ke(),ue=Q(ne);ze(ue,17,()=>l(W),Ue,(de,ye,be,Te)=>{const Fe=B(()=>q(l(ye))),Be=B(()=>ie=>S(ie,l(V),be));var X=$v();let ee;var ce=C(X),Le=C(ce);{var He=ie=>{var pe=Jv(),Ce=C(pe),We=k(Ce,2);{var Qe=je=>{$e($l(je,{get embeddable_url(){return l(ye).embeddable_url},muted:!0,loop:!0,captions:!0,showActions:!0}),De=>R(b,De,!0),()=>l(b))},hn=je=>{var De=Yv();G(()=>le(De,"src",l(ye).medium_poster)),y(je,De)};Z(We,je=>{l(ye).embeddable_url?je(Qe):je(hn,-1)})}te("click",Ce,function(...je){var De;(De=l(Be))==null||De.apply(this,je)}),qe(2,pe,()=>Ot,()=>({delay:200,duration:200})),y(ie,pe)},he=ie=>{var pe=Qv(),Ce=C(pe);Ia(Ce,{get title(){return l(ye)},width:96,height:144}),te("click",pe,function(...We){var Qe;(Qe=l(Be))==null||Qe.apply(this,We)}),y(ie,pe)};Z(Le,ie=>{l(Fe)?ie(He):ie(he,-1)})}var Ae=k(ce,2),Ve=oe(Ae,!0),st=k(Ae,2);{var Ke=ie=>{var pe=Xv(),Ce=oe(pe,!0);G(()=>J(Ce,l(ye).description)),te("click",pe,function(...We){var Qe;(Qe=l(Be))==null||Qe.apply(this,We)}),y(ie,pe)};Z(st,ie=>{a()&&ie(Ke)})}G(()=>{ee=_e(X,1,"title svelte-12ph9f6",null,ee,{expanded:l(Fe)}),J(Ve,l(ye).title)}),te("click",Ae,function(...ie){var pe;(pe=l(Be))==null||pe.apply(this,ie)}),y(de,X)}),y(Y,ne)},$$slots:{default:!0}})};Z(O,U=>{var Y;((Y=l(V))==null?void 0:Y.length)>=n()&&U(H)})}y(L,z)}),$e(j,L=>R(p,L),()=>l(p)),G(()=>{M=_e(j,1,`titles ${r()??""}`,"svelte-12ph9f6",M,{"with-aside":a()}),le(j,"data-role",s()?"expandable-rail":null)}),y(t,j),ae()}Se(["click"]);var rh=new Set(["$$slots","$$events","$$legacy","fetchFunction","maxPage","lazy","expandedTitle","expandedRailKey"]),ah=x("<div><!></div>");function lh(t,e){re(e,!0);const n=I(e,"maxPage",3,4),i=I(e,"lazy",3,!1);I(e,"expandedTitle",11,null),I(e,"expandedRailKey",11,null);const r=Ji(e,rh),a=new Promise(()=>{});let o=K(Ne([])),s=K(Ne([])),c=K(1),u=K(!1),f=K(!0),d=K(null),v=B(()=>!i());et(()=>{l(v)&&h()}),et(()=>{l(f)||l(u)&&(l(c)>=n()||l(o).length-l(s).length>10||(Sd(c),h()))}),lt(()=>{if(!i()||!l(d))return;const b=new IntersectionObserver(([T])=>{T.isIntersecting&&(R(v,!0),b.disconnect())},{rootMargin:window.innerHeight/2+"px"});return b.observe(l(d)),()=>b==null?void 0:b.disconnect()});async function h(){R(f,!0),R(u,!1);try{const{next:b,results:T}=await e.fetchFunction(l(c));R(o,[...l(o),...T],!0),R(u,!!b)}finally{R(f,!1)}}var g=ah(),m=C(g);{var p=b=>{_r(b,Tn({get titles(){return a}},()=>r))},w=b=>{_r(b,Tn({get titles(){return l(o)}},()=>r,{get shown(){return l(s)},set shown(T){R(s,T,!0)}}))};Z(m,b=>{i()&&!l(v)||!l(o).length&&l(f)?b(p):b(w,-1)})}$e(g,b=>R(d,b),()=>l(d)),y(t,g),ae()}var Uo=x('<div class="rail svelte-1b834ry"><!></div>'),oh=x('<div data-testid="explore-home"></div> <!>',1);function Go(t,e){re(e,!0);let n=K(null),i=K(null),r=K(Ne(window.innerWidth));async function a(){return await Ht("/streaming-guide/rails",{baseUrl:"https://partner.playpilot.net/api"})}async function o(u={}){try{return await Pa({...u,page_size:25})}catch(f){throw console.log(f),ve(fe.ExploreHomeRailError,null,{message:f.message||f.status.toString()||"",params:u}),new Error(f)}}var s=oh(),c=k(Q(s),2);Sn(c,a,u=>{var f=ke(),d=Q(f);ze(d,16,()=>({length:3}),Ue,(v,h)=>{var g=Uo(),m=C(g);_r(m,{heading:" ",titles:new Promise(()=>{}),size:"huge"}),y(v,g)}),y(u,f)},(u,f)=>{var d=ke(),v=Q(d);ze(v,17,()=>l(f),Ue,(h,g)=>{let m=()=>l(g).headings,p=()=>l(g).params,w=()=>l(g).properties;const b=B(()=>m()[Or()]);var T=Uo(),S=C(T);{let A=B(()=>w().size||"flexible"),E=B(()=>w().minimum??7);lh(S,Tn({get heading(){return l(b)}},w,{lazy:!0,onclick:()=>ve(fe.ExploreTitleRailModalView,null,{rail:m()}),onexpand:P=>ve(fe.ExploreTitleRailExpandClick,P,{rail:m()}),fetchFunction:P=>o({...p(),page:P}),get size(){return l(A)},get minimumLength(){return l(E)},get expandedTitle(){return l(n)},set expandedTitle(P){R(n,P,!0)},get expandedRailKey(){return l(i)},set expandedRailKey(P){R(i,P,!0)}}))}y(h,T)}),y(u,d)},u=>{var f=Xe();G(d=>J(f,d),[()=>se("An Error Occurred")]),y(u,f)}),zi("innerWidth",u=>R(r,u,!0)),y(t,s),ae()}function gi(){return!Je("allow_retargeting_pixels")||!Kn("pixels")?!1:(window[Nc]=Rc(),!0)}var sh=x("<button><!></button>");function Bt(t,e){const n=I(e,"variant",3,"filled"),i=I(e,"size",3,"base"),r=I(e,"label",3,null),a=I(e,"active",3,!1);var o=sh();let s;var c=C(o);nt(c,()=>e.children??Pt),G(()=>{s=_e(o,1,`button ${n()??""} ${i()??""}`,"svelte-5bqh67",s,{active:a()}),le(o,"aria-label",r())}),te("click",o,function(...u){var f;(f=e.onclick)==null||f.apply(this,u)}),y(t,o)}Se(["click"]);var ch=Ge('<svg viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><title>IMDb rating</title><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 Aa(t,e){const n=I(e,"size",3,14);var i=ch();G(()=>{le(i,"width",n()),le(i,"height",n())}),y(t,i)}function Kc(t){const e=t.filter(i=>!!i.logo_url);let n=[];for(const i of e){let r=i;const a=n.find(c=>c.name===r.name),o=a==null?void 0:a.extra_info.category,s=r.extra_info.category;(o==="RENT"&&s==="BUY"||o==="BUY"&&s==="RENT")&&(n=n.filter(c=>c.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),n.push(r)}return n}var uh=x('<img alt="" data-playpilot-pixel="" class="svelte-ico4xd"/>');function no(t,e){re(e,!0);let n=K(Ne(Math.random()));var i=ke();me("updateconsent",Ie,()=>R(n,Math.random(),!0));var r=Q(i);Yi(r,()=>l(n),a=>{var o=ke(),s=Q(o);{var c=f=>{var d=ke(),v=Q(d);ze(v,17,()=>e.pixels,Ue,(h,g)=>{var m=uh();G(()=>le(m,"src",l(g))),y(h,m)}),y(f,d)},u=B(()=>Kn("pixels"));Z(s,f=>{l(u)&&f(c)})}y(a,o)}),y(t,i),ae()}var dh=x('<a target="_blank" class="playlink svelte-1tx3tz8" rel="sponsored"><img class="svelte-1tx3tz8"/> <!></a>');function fh(t,e){re(e,!0);const n=I(e,"size",3,30),i=I(e,"onclick",3,()=>null),r=B(()=>e.playlink.name),a=B(()=>e.playlink.url),o=B(()=>e.playlink.logo_url),s=B(()=>e.playlink.pixels);var c=dh();let u;var f=C(c),d=k(f,2);{var v=h=>{no(h,{get pixels(){return l(s)}})};Z(d,h=>{var g;(g=l(s))!=null&&g.length&&h(v)})}G(h=>{le(c,"href",l(a)),le(c,"data-playlink",l(r)),u=rt(c,"",u,{"--size":`${n()??""}px`}),le(f,"src",h),le(f,"alt",l(r)),le(f,"height",n()),le(f,"width",n())},[()=>$i(l(o))]),te("click",c,function(...h){var g;(g=i())==null||g.apply(this,h)}),y(t,c),ae()}Se(["click"]);var vh=x('<button class="button more svelte-1plv45z"> </button>'),hh=x('<div class="empty svelte-1plv45z" data-testid="playlinks-empty">Unavailable to stream</div>'),gh=x('<div class="playlinks svelte-1plv45z"><!> <!> <!></div>');function Yc(t,e){re(e,!0);const n=I(e,"size",3,30);let i=K(3);const r=Kc(e.playlinks),a=B(()=>r.slice(0,l(i)));function o(g){g.stopPropagation()}function s(){R(i,r.length,!0)}var c=gh(),u=C(c);ze(u,17,()=>l(a),Ue,(g,m)=>{fh(g,{get playlink(){return l(m)},onclick:o,get size(){return n()}})});var f=k(u,2);{var d=g=>{var m=vh(),p=oe(m);G(()=>J(p,`+${r.length-l(i)}`)),te("click",m,s),y(g,m)};Z(f,g=>{r.length>l(i)&&g(d)})}var v=k(f,2);{var h=g=>{var m=hh();y(g,m)};Z(v,g=>{r.length||g(h)})}y(t,c),ae()}Se(["click"]);var mh=x("<div>Series</div>"),ph=x("<div> </div>"),_h=x('<button class="title svelte-12igath" data-testid="title"><div class="poster svelte-12igath"><!> <div class="meta svelte-12igath"><div class="imdb svelte-12igath"><!> </div> <!> <!></div></div> <div class="content svelte-12igath"><div> </div> <!></div></button>');function yh(t,e){re(e,!0);const n=I(e,"onclick",3,()=>null),i=I(e,"hidePlaylinks",3,!1);var r=_h(),a=C(r),o=C(a);Ia(o,{get title(){return e.title},width:120,height:213,lazy:!0});var s=k(o,2),c=C(s),u=C(c);Aa(u,{size:12});var f=k(u),d=k(c,2);{var v=A=>{var E=mh();y(A,E)};Z(d,A=>{e.title.type==="series"&&A(v)})}var h=k(d,2);{var g=A=>{var E=ph(),P=oe(E);G(()=>J(P,`${e.title.length??""} min`)),y(A,E)};Z(h,A=>{e.title.length&&A(g)})}var m=k(a,2),p=C(m);let w;var b=oe(p,!0),T=k(p,2);{var S=A=>{Yc(A,{get playlinks(){return e.title.providers},size:20})};Z(T,A=>{i()||A(S)})}G(()=>{J(f,` ${(e.title.imdb_score||"-")??""}`),w=_e(p,1,"heading svelte-12igath",null,w,{margin:!i()}),J(b,e.title.title)}),te("click",r,function(...A){var E;(E=n())==null||E.apply(this,A)}),y(t,r),ae()}Se(["click"]);var wh=x('<div class="skeleton svelte-1uz2nzg" data-testid="skeleton"><div class="poster svelte-1uz2nzg"></div> <div class="lines svelte-1uz2nzg"><div class="line svelte-1uz2nzg"></div></div></div>');function bh(t){var e=wh(),n=k(C(e),2),i=C(n);rt(i,"",{},{width:"60%"}),y(t,e)}var kh=x('<div class="svelte-pkkpyl"> </div>'),xh=x("<div> </div>"),Sh=x('<button data-testid="title"><div class="poster svelte-pkkpyl"><!></div> <div class="content svelte-pkkpyl"><div class="heading svelte-pkkpyl"> </div> <div class="meta svelte-pkkpyl"><div class="imdb svelte-pkkpyl"><!> </div> <div class="svelte-pkkpyl"> </div> <div class="svelte-pkkpyl"> </div> <!></div> <!> <!></div> <div class="action svelte-pkkpyl"><!></div></button>');function Th(t,e){var D;re(e,!0);const n=I(e,"compact",3,!1),i=I(e,"onclick",3,()=>null),r=!!((D=window.PlayPilotLinkInjections)!=null&&D.no_affiliate);var a=Sh();let o;var s=C(a),c=C(s);Ia(c,{get title(){return e.title},width:30,height:43,lazy:!0});var u=k(s,2),f=C(u),d=oe(f,!0),v=k(f,2),h=C(v),g=C(h);Aa(g,{size:11});var m=k(g),p=k(h,2),w=oe(p,!0),b=k(p,2),T=oe(b,!0),S=k(b,2);{var A=L=>{var V=kh(),W=oe(V);G(()=>J(W,`${e.title.length??""} min`)),y(L,V)};Z(S,L=>{e.title.length&&L(A)})}var E=k(v,2);{var P=L=>{var V=xh();let W;var z=oe(V,!0);G(()=>{W=_e(V,1,"description svelte-pkkpyl",null,W,{large:r}),J(z,e.title.description)}),y(L,V)};Z(E,L=>{n()||L(P)})}var q=k(E,2);{var F=L=>{{let V=B(()=>n()?24:30);Yc(L,{get playlinks(){return e.title.providers},get size(){return l(V)}})}};Z(q,L=>{r||L(F)})}var j=k(u,2),M=C(j);Ft(M,{}),G(L=>{o=_e(a,1,"title svelte-pkkpyl",null,o,{compact:n()}),J(d,e.title.title),J(m,` ${(e.title.imdb_score||"-")??""}`),J(w,e.title.year),J(T,L)},[()=>se(`Type: ${e.title.type}`)]),te("click",a,function(...L){var V;(V=i())==null||V.apply(this,L)}),y(t,a),ae()}Se(["click"]);var Eh=x('<div class="skeleton svelte-17sb7p8" data-testid="skeleton"><div class="poster svelte-17sb7p8"></div> <div class="lines svelte-17sb7p8"><div class="line svelte-17sb7p8"></div> <div class="line svelte-17sb7p8"></div> <div class="line svelte-17sb7p8"></div></div></div>');function Ph(t){var e=Eh(),n=k(C(e),2),i=C(n);rt(i,"",{},{width:"40%"});var r=k(i,2);rt(r,"",{},{width:"60%"});var a=k(r,2);rt(a,"",{},{width:"80%"}),y(t,e)}var Ih=x(`<div class="empty svelte-4bt48"><p class="svelte-4bt48"><strong class="svelte-4bt48">No results were found</strong><br/> Sorry, we couldn't find anything matching your filter.</p></div>`);function Ch(t){var e=Ih();y(t,e)}var Ah=x("<div><!></div>"),Mh=x("<!> <!>",1),Lh=x("<p>Something went wrong</p>"),jh=x('<div role="main" data-testid="explore-results"><!> <!></div> <!>',1);function Jc(t,e){re(e,!0);const n=I(e,"searchQuery",3,""),i=I(e,"filter",19,()=>({})),r=I(e,"forceGrid",3,!1),a=I(e,"hidePlaylinks",3,!1),o=I(e,"onTitleClick",3,null);let s=1,c=K(Ne([])),u=null,f=0,d=JSON.stringify(i())+n(),v=K(Ne(b())),h=K(0);const g=B(()=>r()||l(h)>500),m=B(()=>l(h)>1400?8:l(h)>900?6:l(h)>600?4:l(h)>400?3:2),p=B(()=>l(g)?yh:Th),w=B(()=>l(g)?bh:Ph);et(()=>{(n()||f!=0)&&T(n())}),et(()=>{i()&&S()}),Rr(A);async function b(){f+=1;const O=f,H={page_size:24,page:s};n()&&(H.search=n()),Object.entries(i()).forEach(([U,{type:Y,value:$}])=>{if(Y==="string")H[U]=$;else if(Y==="array")H[U]=$.join(",");else if(Y==="range"){const[ne,ue]=$;H[U+"_min"]=ne,H[U+"_max"]=ue}});try{const U=await Pa(H)||{next:null,previous:null,results:[]};return O===f&&R(c,[...l(c),...U.results],!0),U}catch(U){throw console.log(U.status),ve(fe.ExploreResultsError,null,{message:U.message||U.status.toString()||"",params:H}),new Error(U)}}async function T(O){F()&&(u&&clearTimeout(u),u=setTimeout(()=>{E(),R(v,b(),!0),O&&(ve(fe.ExploreSearch,null,{query:O}),gi()&&ln(Yt.SearchQuery,{query:O}))},100))}function S(){F()&&(E(),R(v,b(),!0))}function A(){for(const O of Object.keys(i()))delete i()[O]}function E(){s=1,R(c,[],!0)}function P(){s++,R(v,b(),!0),ve(fe.ExploreShowMore,null,{page:s})}function q(O,H,U){if(o()){o()(O,l(c),U);return}Yn({event:O,data:H}),ve(fe.ExploreTitleClick,H)}function F(){const O=JSON.stringify(i())+n();return O===d?!1:(d=O,!0)}var j=jh(),M=Q(j);let D,L;var V=C(M);ze(V,17,()=>l(c),Ue,(O,H,U)=>{var Y=ke(),$=Q(Y);Yi($,()=>l(H).sid,ne=>{var ue=ke(),de=Q(ue);aa(de,()=>l(p),(ye,be)=>{be(ye,{get title(){return l(H)},get hidePlaylinks(){return a()},onclick:Te=>q(Te,l(H),U)})}),y(ne,ue)}),y(O,Y)});var W=k(V,2);Sn(W,()=>l(v),O=>{var H=ke(),U=Q(H);ze(U,16,()=>({length:24}),Ue,(Y,$)=>{var ne=ke(),ue=Q(ne);aa(ue,()=>l(w),(de,ye)=>{ye(de,{})}),y(Y,ne)}),y(O,H)},void 0,O=>{});var z=k(M,2);Sn(z,()=>l(v),null,(O,H)=>{var U=B(()=>{var{next:be}=l(H);return{next:be}}),Y=B(()=>l(U).next),$=Mh(),ne=Q($);{var ue=be=>{var Te=Ah();let Fe;var Be=C(Te);Bt(Be,{size:"large",onclick:P,label:"Show more movies & shows",children:(X,ee)=>{var ce=Xe();G(Le=>J(ce,Le),[()=>se("Show More")]),y(X,ce)},$$slots:{default:!0}}),G(()=>Fe=_e(Te,1,"show-more svelte-qc99of",null,Fe,{grid:l(g)})),y(be,Te)};Z(ne,be=>{l(Y)&&be(ue)})}var de=k(ne,2);{var ye=be=>{Ch(be)};Z(de,be=>{var Te;!((Te=l(c))!=null&&Te.length)&&s===1&&be(ye)})}y(O,$)},O=>{var H=Lh();y(O,H)}),G(()=>{D=_e(M,1,"titles svelte-qc99of",null,D,{grid:l(g)}),L=rt(M,"",L,{"--grid-columns":l(m)})}),At(M,"clientWidth",O=>R(h,O)),y(t,j),ae()}var Dh=Ge('<svg width="18" height="18" viewBox="0 0 19 19"><path fill="currentColor" d="M16.593,2.407a8.155,8.155,0,0,0-11.569,0A8.166,8.166,0,0,0,4.18,12.983L.38,16.8a1.3,1.3,0,0,0,0,1.837A1.372,1.372,0,0,0,1.288,19a1.3,1.3,0,0,0,.908-.38L6.017,14.8A8.172,8.172,0,0,0,16.593,2.407ZM15.327,12.688A6.4,6.4,0,1,1,17.184,8.17,6.324,6.324,0,0,1,15.327,12.688Z"></path></svg>');function Rh(t){var e=Dh();y(t,e)}var Nh=x('<div class="search svelte-1pnrmr6" role="search"><div class="icon svelte-1pnrmr6"><!></div> <input class="input svelte-1pnrmr6" type="search"/></div>');function Oh(t,e){re(e,!0);let n=K("");var i=Nh(),r=C(i),a=C(r);Rh(a);var o=k(r,2);G(s=>le(o,"placeholder",s),[()=>se("Search Movies And Shows")]),te("input",o,()=>e.oninput(l(n))),ui(o,()=>l(n),s=>R(n,s)),y(t,i),ae()}Se(["input"]);async function qh(){const t=vn();if(!t)throw new Error("No token was provided");const e={region:await Qi(),page:1,include_count:!1};let n=await Ht(`/providers/?api-token=${t}&`+Cc(e));return n=n.filter((i,r,a)=>a.findIndex(o=>o.slug===i.slug)===r),n}function zh(t,{from:e,to:n},i={}){var{delay:r=0,duration:a=E=>Math.sqrt(E)*120,easing:o=Vv}=i,s=getComputedStyle(t),c=s.transform==="none"?"":s.transform,[u,f]=s.transformOrigin.split(" ").map(parseFloat);u/=t.clientWidth,f/=t.clientHeight;var d=Hh(t),v=t.clientWidth/n.width/d,h=t.clientHeight/n.height/d,g=e.left+e.width*u,m=e.top+e.height*f,p=n.left+n.width*u,w=n.top+n.height*f,b=(g-p)*v,T=(m-w)*h,S=e.width/n.width,A=e.height/n.height;return{delay:r,duration:typeof a=="function"?a(Math.sqrt(b*b+T*T)):a,easing:o,css:(E,P)=>{var q=P*b,F=P*T,j=E+P*S,M=E+P*A;return`transform: ${c} translate(${q}px, ${F}px) scale(${j}, ${M});`}}}function Hh(t){if("currentCSSZoom"in t)return t.currentCSSZoom;for(var e=t,n=1;e!==null;)n*=+getComputedStyle(e).zoom,e=e.parentElement;return n}var Fh=Ge('<svg width="18px" height="18px" viewBox="0 -960 960 960"><path d="M200-440v-80h560v80H200Z" fill="currentColor"></path></svg>');function Bh(t){var e=Fh();y(t,e)}var Vh=Ge('<svg width="18px" height="18px" viewBox="0 -960 960 960"><path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z" fill="currentColor"></path></svg>');function Wh(t){var e=Vh();y(t,e)}var Uh=x('<div class="icon svelte-dfwzqz"><!></div>'),Gh=x('<div><button> <div class="action svelte-dfwzqz"><!></div></button></div>'),Zh=x('<div class="header svelte-dfwzqz"><input type="text" class="input svelte-dfwzqz" aria-label="Search"/></div> <div class="options" data-testid="toggles-with-search"></div>',1);function Kh(t,e){re(e,!0);let n=I(e,"options",19,()=>[{label:"Label",value:"Value"}]),i=I(e,"selected",23,()=>[]),r=I(e,"placeholder",19,()=>`${se("Search")}...`),a=I(e,"onchange",3,()=>null),o=K("");const s=B(c);function c(){var g;return(g=n())!=null&&g.length?l(o)?n().filter(({label:m})=>m.toLowerCase().indexOf(l(o).toLowerCase())!==-1):n():[]}function u(g){const m=i().find(p=>p===g);i(m?i().filter(p=>p!==g):[...i(),g]),a()(i())}var f=Zh(),d=Q(f),v=C(d),h=k(d,2);ze(h,29,()=>l(s)||[],({label:g,value:m})=>m,(g,m)=>{let p=()=>l(m).label,w=()=>l(m).value;const b=B(()=>!!i().find(F=>F===w()));var T=Gh(),S=C(T);let A;var E=C(S),P=k(E),q=C(P);Yi(q,()=>l(b),F=>{var j=Uh(),M=C(j);{var D=V=>{Bh(V)},L=V=>{Wh(V)};Z(M,V=>{l(b)?V(D):V(L,-1)})}qe(3,j,()=>Xi,()=>({start:.25,duration:100})),y(F,j)}),G(()=>{A=_e(S,1,"option svelte-dfwzqz",null,A,{active:l(b)}),J(E,`${p()??""} `)}),te("click",S,()=>u(w())),df(T,()=>zh,()=>({duration:150})),y(g,T)}),G(()=>le(v,"placeholder",r())),ui(v,()=>l(o),g=>R(o,g)),y(t,f),ae()}Se(["click"]);var Yh=x('<div class="content svelte-fg0dzp"><!></div>'),Jh=x("<div><!> <!></div>");function Qc(t,e){re(e,!0);let n=K(!1),i=K(null),r=K(null),a=K("left"),o=K(0),s=K(0);function c(m){const p=m.target;p&&p.closest(".dropdown")!==l(i)&&R(n,!1)}function u(m){R(n,!l(n)),l(n)&&(R(s,0),R(o,0),f(m.target))}async function f(m){if(await mr(),!l(r))return;const p=16,w=200,b=window.innerHeight,T=window.innerWidth,{top:S}=l(r).getBoundingClientRect(),{left:A}=m.getBoundingClientRect();R(a,A<window.innerWidth/2?"left":"right",!0),R(o,Math.max(Math.min(window.innerHeight-S-p,b*.6),w),!0),await mr();const{left:E,right:P}=l(r).getBoundingClientRect(),q=T-P;E-p<0?R(s,q):q-p<0&&R(s,q-p)}var d=Jh();me("click",Ie,c);var v=C(d);nt(v,()=>e.button,()=>({toggle:u}));var h=k(v,2);{var g=m=>{var p=Yh();let w;var b=C(p);nt(b,()=>e.content),$e(p,T=>R(r,T),()=>l(r)),G(()=>w=rt(p,"",w,{"--max-height":l(o)?`${l(o)}px`:null,"--offset":l(s)?`${l(s)}px`:null})),qe(3,p,()=>Xi,()=>({start:er.current?1:.85,duration:100})),y(m,p)};Z(h,m=>{l(n)&&m(g)})}$e(d,m=>R(i,m),()=>l(i)),G(()=>_e(d,1,`dropdown ${l(a)??""}`,"svelte-fg0dzp")),y(t,d),ae()}var Qh=x('<span class="label svelte-1mfj6k7"> </span>'),Xh=x('<div class="active-line svelte-1mfj6k7"></div>'),$h=x('<div class="slider svelte-1mfj6k7"><!> <span><input type="range" id="lower"/> <input type="range" id="upper"/> <div class="value-marker svelte-1mfj6k7"> </div> <div class="value-marker right svelte-1mfj6k7"> </div> <!></span></div>');function eg(t,e){re(e,!0);const n=I(e,"range",19,()=>[0,100]),i=I(e,"step",3,1),r=I(e,"value",19,n),a=I(e,"label",3,""),o=I(e,"valueAppend",3,""),s=I(e,"formatFunction",3,H=>H.toString()),c=I(e,"onchange",3,()=>null);let u=n(),f=B(()=>ci(u,2)),d=K(Ne(l(f)[0])),v=K(Ne(l(f)[1]));const h=B(()=>l(d)!==n()[0]||l(v)!==n()[1]),g=B(()=>100/(n()[1]-n()[0])*(l(d)-n()[0])),m=B(()=>100+100/(n()[1]-n()[0])*(l(v)-n()[1])-l(g)),p=B(()=>Math.abs(n()[0]-n()[1])>10&&Math.abs(l(d)-l(v))<5);et(()=>{w(r())}),et(()=>{R(v,Math.max(l(v),l(d)+1),!0),R(v,Math.min(l(v),n()[1]),!0),R(d,Math.min(l(d),l(v)-1),!0),R(d,Math.max(l(d),n()[0]),!0)});function w(H){(U=>{var Y=ci(U,2);R(d,Y[0],!0),R(v,Y[1],!0)})(H)}function b(){requestAnimationFrame(()=>c()([l(d),l(v)]))}var T=$h(),S=C(T);{var A=H=>{var U=Qh(),Y=oe(U);G(($,ne)=>J(Y,`${a()??""}: ${$??""}—${ne??""} ${o()??""}`),[()=>s()(l(d)),()=>s()(l(v))]),y(H,U)};Z(S,H=>{a()&&H(A)})}var E=k(S,2);let P;var q=C(E);let F;var j=k(q,2);let M;var D=k(j,2),L=oe(D,!0),V=k(D,2),W=oe(V,!0),z=k(V,2);{var O=H=>{var U=Xh();let Y;G(()=>Y=rt(U,"",Y,{left:l(g)+"%","--width":l(m)+"%"})),y(H,U)};Z(z,H=>{l(h)&&H(O)})}G(()=>{P=_e(E,1,"range svelte-1mfj6k7",null,P,{halved:l(p)}),le(q,"min",n()[0]),le(q,"max",n()[1]),le(q,"step",i()),F=_e(q,1,"svelte-1mfj6k7",null,F,{active:l(h)}),le(j,"min",n()[0]),le(j,"max",n()[1]),le(j,"step",i()),M=_e(j,1,"svelte-1mfj6k7",null,M,{active:l(h)}),J(L,l(d)),J(W,l(v))}),te("mouseup",q,b),te("touchend",q,b),te("input",q,function(...H){}),ui(q,()=>l(d),H=>R(d,H)),te("mouseup",j,b),te("touchend",j,b),te("input",j,function(...H){}),ui(j,()=>l(v),H=>R(v,H)),y(t,T),ae()}Se(["mouseup","touchend","input"]);function io(t,e){if(!t)return!1;const{type:n,value:i}=t;return!(n==="array"&&!i.length||n==="range"&&JSON.stringify(i)===JSON.stringify(e))}var tg=x(" <!>",1),ng=x('<p class="loading"> </p>'),ig=x('<p class="error"> </p>'),rg=x('<div class="content svelte-er0ukh" data-testid="content"><!> <!></div>'),ag=x('<div data-testid="filter-item"><!></div>');function lg(t,e){re(e,!0);let n=I(e,"filter",7),i=I(e,"onchange",3,()=>null),r=I(e,"data",7,null),a=I(e,"fetchData",3,null),o=I(e,"range",3,null),s=I(e,"step",3,1),c=I(e,"valueAppend",3,"");const u=B(()=>io(n()[e.param],o()));let f=K(!!a());et(()=>{!r()&&a()&&d()});async function d(){try{R(f,!0),r(await a()())}catch{ve(fe.ExploreFetchProvidersFailed)}finally{R(f,!1)}}function v(p,w){if(ve(fe.ExploreSetFilter,null,{key:e.param,value:p,total_filter:n()}),!p){delete n()[e.param];return}n()[e.param]={type:w,value:p},i()()}var h=ag();let g;var m=C(h);Qc(m,{button:(b,T)=>{let S=()=>(T==null?void 0:T()).toggle;Bt(b,{variant:"border",size:"large",get active(){return l(u)},get onclick(){return S()},children:(A,E)=>{var P=tg(),q=Q(P),F=k(q);Ft(F,{direction:"down"}),G(()=>J(q,`${e.label??""} `)),y(A,P)},$$slots:{default:!0}})},content:b=>{var T=rg(),S=C(T);{var A=j=>{var M=ng(),D=oe(M);G(L=>J(D,`${L??""}...`),[()=>se("Loading")]),y(j,M)},E=j=>{var M=ig(),D=oe(M,!0);G(L=>J(D,L),[()=>se("An Error Occurred")]),y(j,M)};Z(S,j=>{l(f)?j(A):a()&&!r()&&j(E,1)})}var P=k(S,2);{var q=j=>{const M=B(()=>{var D;return(D=n()[e.param])==null?void 0:D.value});Kh(j,{get options(){return r()},get selected(){return l(M)},onchange:D=>v(D,"array")})},F=j=>{const M=B(()=>{var D;return(D=n()[e.param])==null?void 0:D.value});eg(j,{get range(){return o()},get value(){return l(M)},get step(){return s()},get label(){return e.label},get valueAppend(){return c()},onchange:D=>v(D,"range")})};Z(P,j=>{r()?j(q):o()&&j(F,1)})}y(b,T)},$$slots:{button:!0,content:!0}}),G(()=>g=_e(h,1,"filter-item svelte-er0ukh",null,g,{active:l(u)})),y(t,h),ae()}const Nn=Object.freeze({Popular:"-popularity",New:"-new",Best:"-best",Chronological:"-year",IMDb:"-imdb_score"});var og=x(" <!>",1),sg=x("<button> </button>"),cg=x('<div data-testid="content"></div>');function ug(t,e){re(e,!0);const n=I(e,"filter",7),i=I(e,"onchange",3,()=>null),r=I(e,"sortings",3,null),a="ordering",o=B(()=>r()||[{label:"Popularity",value:Nn.Popular},{label:"New",value:Nn.New},{label:"Top Rated",value:Nn.Best},{label:"IMDb Rating",value:Nn.IMDb}]),s=B(()=>{var u;return((u=l(o).find(({value:f})=>{var d;return f===((d=n()[a])==null?void 0:d.value)}))==null?void 0:u.label)||"Sort By"});function c(u){u?n()[a]={type:"string",value:u}:delete n()[a],i()()}Qc(t,{button:(d,v)=>{let h=()=>(v==null?void 0:v()).toggle;Bt(d,{variant:"link",get onclick(){return h()},children:(g,m)=>{var p=og(),w=Q(p),b=k(w);Ft(b,{direction:"down"}),G(T=>J(w,`${T??""} `),[()=>se(l(s))]),y(g,p)},$$slots:{default:!0}})},content:d=>{var v=cg();ze(v,21,()=>l(o),Ue,(h,g,m,p)=>{let w=()=>l(g).label,b=()=>l(g).value;const T=B(()=>{var P;return b()===((P=n()[a])==null?void 0:P.value)});var S=sg();let A;var E=oe(S,!0);G(P=>{A=_e(S,1,"option svelte-1ibt2k4",null,A,{active:l(T)}),J(E,P)},[()=>se(w())]),te("click",S,()=>c(b())),y(h,S)}),y(d,v)},$$slots:{button:!0,content:!0}}),ae()}Se(["click"]);var dg=Ge('<svg height="24px" viewBox="0 -960 960 960" width="24px"><path fill="currentColor" transform="scale(1.2) translate(0, 75)" scale="1.2" d="M440-120v-240h80v80h320v80H520v80h-80Zm-320-80v-80h240v80H120Zm160-160v-80H120v-80h160v-80h80v240h-80Zm160-80v-80h400v80H440Zm160-160v-240h80v80h160v80H680v80h-80Zm-480-80v-80h400v80H120Z"></path></svg>');function fg(t){var e=dg();y(t,e)}var vg=x('<button class="item svelte-cwy6fi"><!> <!></button>'),hg=x('<div class="active-filter svelte-cwy6fi"></div>');function gg(t,e){re(e,!0);function n(a){delete e.filter[a]}function i(a){let o=a.slice(0,30).trim();return a.length>o.length&&(o+="..."),o}var r=hg();ze(r,21,()=>Object.entries(e.filter),Ue,(a,o)=>{var s=B(()=>ci(l(o),2));let c=()=>l(s)[0],u=()=>l(s)[1];const f=B(()=>e.items.find(m=>c()===m.param)||{});var d=ke(),v=Q(d);{var h=m=>{var p=vg(),w=C(p);{var b=E=>{var P=ke(),q=Q(P);Sn(q,()=>{var F,j;return((j=(F=l(f)).fetchData)==null?void 0:j.call(F))||l(f).data},null,(F,j)=>{var M=Xe();G(D=>J(M,D),[()=>{var D;return i((D=l(j))==null?void 0:D.filter(L=>u().value.includes(L.value)).map(L=>L.label).join(" + "))}]),y(F,M)}),y(E,P)},T=E=>{var P=Xe();G(q=>J(P,`${l(f).label??""}: ${q??""}`),[()=>u().value.join(" - ")]),y(E,P)},S=E=>{var P=Xe();G(q=>J(P,q),[()=>se(u().value)]),y(E,P)};Z(w,E=>{u().type==="array"?E(b):u().type==="range"?E(T,1):E(S,-1)})}var A=k(w,2);qr(A,{size:8}),te("click",p,()=>n(c())),y(m,p)},g=B(()=>io(u(),l(f).range));Z(v,m=>{l(g)&&m(h)})}y(a,d)}),y(t,r),ae()}Se(["click"]);var mg=x("<div><!></div>"),pg=x("<!> <!>",1),_g=x('<div class="sorting svelte-11dg01g"><!></div>'),yg=x('<div role="navigation"><div class="items svelte-11dg01g"></div> <div class="actions svelte-11dg01g"><!> <!></div></div> <!>',1);function Xc(t,e){re(e,!0);const n=I(e,"limit",3,!0),i=I(e,"hideActive",3,!1),r=I(e,"showSorting",3,!0),a=I(e,"sortings",3,null),o=I(e,"searchQuery",3,""),s=I(e,"onchange",3,()=>null),c=I(e,"onempty",3,()=>null),u=3,f=[{label:se("Services"),param:"providers",fetchData:async()=>(await qh()).map(q=>({label:q.name,value:q.slug}))},{label:se("Genres"),param:"genres",data:Ea.filter(q=>parseInt(q.slug)<900).map(q=>({label:se(q.name),value:q.slug}))},{label:se("IMDb"),param:"imdb_score",range:[0,10],step:.1},{label:se("Year"),param:"year",range:[1900,new Date().getFullYear()]},{label:se("Runtime"),param:"length",range:[0,180],valueAppend:se("Minutes")},{label:se("Countries"),param:"country_codes",fetchData:async()=>(await fetch(`${Lf}/src/lib/data/countries.json`)).json()},{label:se("Category"),param:"category",data:[{label:se("Movies"),value:"movie"},{label:se("Shows"),value:"series"},{label:se("Kids"),value:"kids"},{label:se("Documentary"),value:"documentary"}]}];let d=B(n),v=!1;et(()=>{Object.keys(e.filter).some(F=>{const{range:j}=f.find(M=>F===M.param)||{};return io(e.filter[F],j)})||o()?v=!0:v&&(v=!1,c()())});var h=yg(),g=Q(h);let m;var p=C(g);ze(p,21,()=>l(d)?f.slice(0,u):f,Ue,(q,F)=>{var j=mg(),M=C(j);lg(M,Tn({get filter(){return e.filter},get onchange(){return s()}},()=>l(F))),qe(3,j,()=>Xi,()=>({start:.75,duration:100})),y(q,j)});var w=k(p,2),b=C(w);{var T=q=>{Bt(q,{variant:"link",onclick:()=>R(d,!l(d)),children:(F,j)=>{var M=pg(),D=Q(M);fg(D);var L=k(D),V=k(L);{let W=B(()=>l(d)?"down":"up");Ft(V,{get direction(){return l(W)}})}G(W=>J(L,` ${W??""} `),[()=>l(d)?se("Show More"):se("Show Less")]),y(F,M)},$$slots:{default:!0}})};Z(b,q=>{n()&&q(T)})}var S=k(b,2);{var A=q=>{var F=_g(),j=C(F);ug(j,{get filter(){return e.filter},get onchange(){return s()},get sortings(){return a()}}),qe(3,F,()=>Si,()=>({x:5,duration:100})),y(q,F)};Z(S,q=>{r()&&q(A)})}var E=k(g,2);{var P=q=>{gg(q,{get filter(){return e.filter},get items(){return f}})};Z(E,q=>{i()||q(P)})}G(()=>m=_e(g,1,"filter svelte-11dg01g",null,m,{limit:n()})),y(t,h),ae()}function wg(t,e){re(e,!0);const n=I(e,"trackingEvent",19,()=>fe.ExploreAnyClick);function i(o){var T;const s=o.target,c=s.parentElement;if(s===document.body)return;const u=`${c==null?void 0:c.nodeName.toLowerCase()}${r(c)}`,f=`${s==null?void 0:s.nodeName.toLowerCase()}${r(s)}`,d=`${u} > ${f}`,v=s.closest("a, button"),h=a(s)||a(c)||v&&a(v),g=h?(T=h.textContent)==null?void 0:T.slice(0,30):"",m=s.getAttribute("aria-label")||(v==null?void 0:v.getAttribute("aria-label"))||(c==null?void 0:c.getAttribute("aria-label")),p=s.placeholder,w=s.alt,b=(g||m||p||w||"").trim();ve(n(),null,{selector:d,text:b})}function r(o){if(!o)return"";const s=Array.from(o.classList).filter(c=>!c.startsWith("s-"));return s.length?"."+s.join("."):""}function a(o){var s;return(s=o==null?void 0:o.childNodes)!=null&&s.length&&Array.from(o.childNodes).find(c=>{var u;return c.nodeName==="#text"&&!!((u=c.textContent)!=null&&u.trim())})||null}me("click",Ie,i),ae()}function bg(t,e){re(e,!0);const n=I(e,"trackingEvent",19,()=>fe.ExploreScrollDistance),i={25:!1,50:!1,75:!1,100:!1};function r(){const a=window.scrollY,o=window.innerHeight,u=100/(e.element.clientHeight+a+e.element.getBoundingClientRect().top)*(a+o);for(const f in i)i[f]||u<parseInt(f)||(i[f]=!0,ve(n(),null,{scroll_percentage:f+"%"}))}me("scroll",Ie,r),ae()}var kg=x('<div class="unsupported-region svelte-l2apr8"> </div>'),xg=x('<div class="explore svelte-l2apr8"><div class="header svelte-l2apr8" role="banner"><div><div class="divider svelte-l2apr8"></div> <div class="heading svelte-l2apr8"> </div> <div class="subheading svelte-l2apr8"> </div> <p class="disclaimer svelte-l2apr8"></p></div></div> <!> <div class="filter svelte-l2apr8"><!></div> <!> <!></div> <!> <!>',1);function Sg(t,e){re(e,!0);let n=I(e,"navigate",3,()=>null),i=I(e,"searchQuery",15,""),r=I(e,"filter",27,()=>Ne({})),a=null,o=K(null),s=K(Ne(window.innerWidth));et(()=>{var F;R(o,((F=a==null?void 0:a.closest(lo))==null?void 0:F.style.height)||null,!0)}),lt(async()=>{ve(fe.ExplorePageView),window.PlayPilotLinkInjections.ads=await Hc()});var c=xg(),u=Q(c);let f;var d=C(u),v=C(d),h=k(C(v),2),g=oe(h,!0);bt(h,F=>Re==null?void 0:Re(F));var m=k(h,2),p=oe(m,!0);bt(m,(F,j)=>Re==null?void 0:Re(F,j),()=>2);var w=k(m,2);sc(w,()=>se("Streaming Guide Disclaimer"),!0);var b=k(d,2);Oh(b,{oninput:F=>i(F)});var T=k(b,2),S=C(T);{let F=B(()=>l(s)<500),j=B(()=>!i());Xc(S,{get filter(){return r()},get searchQuery(){return i()},get limit(){return l(F)},get showSorting(){return l(j)},onchange:()=>n()("results"),onempty:()=>n()("home")})}var A=k(T,2);Sn(A,zc,null,(F,j)=>{var M=ke(),D=Q(M);{var L=V=>{var W=kg(),z=oe(W,!0);G(O=>J(z,O),[()=>se("Sorry Region Not Supported")]),y(V,W)};Z(D,V=>{l(j)||V(L)})}y(F,M)});var E=k(A,2);nt(E,()=>e.children),$e(u,F=>a=F,()=>a);var P=k(u,2);wg(P,{});var q=k(P,2);bg(q,{get element(){return a}}),G((F,j)=>{f=rt(u,"",f,{height:l(o),"--playpilot-explore-width":`${l(s)??""}px`}),J(g,F),J(p,j)},[()=>se("Streaming Guide"),()=>se("Streaming Guide Subheading")]),At(u,"clientWidth",F=>R(s,F)),y(t,c),ae()}var Tg=x('<div class="tooltip-content svelte-1ldthr7" role="paragraph"> </div>'),Eg=x('<button class="tooltip svelte-1ldthr7" data-testid="disclaimer"><div aria-label="Disclaimer">i</div> <!></button>');function ro(t,e){const n=I(e,"small",3,!1);let i=K(!1);function r(f){f.preventDefault(),f.stopPropagation(),R(i,!l(i))}var a=Eg(),o=C(a);let s;var c=k(o,2);{var u=f=>{var d=Tg(),v=oe(d,!0);G(()=>J(v,e.disclaimer)),qe(3,d,()=>Ot,()=>({duration:50})),y(f,d)};Z(c,f=>{l(i)&&f(u)})}G(()=>s=_e(o,1,"disclaimer svelte-1ldthr7",null,s,{small:n()})),te("click",a,r),y(t,a)}Se(["click"]);var Pg=x('<span class="category svelte-13ka2ap" data-testid="category"> </span>'),Ig=x('<span class="cta svelte-13ka2ap"> </span>'),Cg=x('<div class="playlink-content svelte-13ka2ap"><img alt="" height="36" width="36" class="svelte-13ka2ap"/> <span class="name svelte-13ka2ap"> </span> <!> <!> <div class="action svelte-13ka2ap"> </div> <!></div> <!>',1);function Zo(t,e){re(e,!0);const n=I(e,"disclaimer",3,""),i=I(e,"hideCategory",3,!1),r=I(e,"onclick",3,()=>null),a=B(()=>e.playlink.name),o=B(()=>e.playlink.url),s=B(()=>e.playlink.logo_url),c=B(()=>e.playlink.highlighted),u=B(()=>e.playlink.cta_text),f=B(()=>e.playlink.action_text),d=B(()=>e.playlink.pixels),v=B(()=>e.playlink.extra_info.category),h=B(()=>gi()&&!l(c)),g={AVOD:se("Stream"),SVOD:se("Stream"),BUY:se("Buy"),RENT:se("Rent"),TVOD:se("Rent Or Buy")};let m=K(0);var p=ke(),w=Q(p);dc(w,()=>!Je("require_affiliate_consent")||Kn("affiliate")?"a":"span",!1,(b,T)=>{oa(b,()=>l(h)?qc(Yt.ProviderInterest,{provider:e.playlink.slug,source:Rn.Card}):null),oa(b,()=>l(h)?fv(Yt.ProviderClick,{provider:e.playlink.slug}):null),yc(b,()=>({onclick:r(),href:l(o),target:"_blank",class:"playlink","data-playlink":l(a),rel:"sponsored",[yi]:{highlighted:l(c),"no-category":i(),"no-subtext":!l(u)&&i()}}),void 0,void 0,void 0,"svelte-13ka2ap");var S=Cg(),A=Q(S);let E;var P=C(A),q=k(P,2),F=oe(q,!0),j=k(q,2);{var M=Y=>{var $=Pg(),ne=oe($,!0);G(ue=>J(ne,ue),[()=>g[l(v)]||se("Stream")]),y(Y,$)};Z(j,Y=>{i()||Y(M)})}var D=k(j,2);{var L=Y=>{var $=Ig(),ne=oe($,!0);G(()=>J(ne,l(u))),y(Y,$)};Z(D,Y=>{l(u)&&Y(L)})}var V=k(D,2),W=oe(V,!0),z=k(V,2);{var O=Y=>{ro(Y,{get disclaimer(){return n()},small:!0})};Z(z,Y=>{n()&&Y(O)})}var H=k(A,2);{var U=Y=>{no(Y,{get pixels(){return l(d)}})};Z(H,Y=>{var $;($=l(d))!=null&&$.length&&Y(U)})}G((Y,$)=>{E=rt(A,"",E,{"--action-width":l(m)?`${l(m)}px`:null}),le(P,"src",Y),J(F,l(a)),J(W,$)},[()=>$i(l(s)),()=>l(f)||se("Watch")]),At(V,"clientWidth",Y=>R(m,Y)),y(T,S)}),y(t,p),ae()}var Ag=x('<div class="disclaimer svelte-1v1053" data-testid="commission-disclaimer"> <a href="https://playpilot.com/" target="_blank" rel="sponsored" class="svelte-1v1053">PlayPilot.com</a></div>'),Mg=x('<div class="empty svelte-1v1053" data-testid="playlinks-empty"> </div>');function Lg(t,e){re(e,!0);var n=ke(),i=Q(n);{var r=o=>{var s=Ag(),c=C(s);G(u=>J(c,`${u??""} `),[()=>{var u,f;return((f=(u=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:u.config)==null?void 0:f.playlinks_disclaimer_text)||se("Commission Disclaimer")}]),y(o,s)},a=o=>{var s=Mg(),c=oe(s,!0);G(u=>J(c,u),[()=>se("Title Unavailable")]),y(o,s)};Z(i,o=>{e.playlinks.length?o(r):o(a,-1)})}y(t,n),ae()}var jg=x('<div class="heading category svelte-1fykz2q"> </div>'),Dg=x("<!> <!>",1),Rg=x('<div class="show-more svelte-1fykz2q" data-testid="show-more"><!></div>'),Ng=x("<!> <div></div> <!>",1),Og=x('<div class="heading svelte-1fykz2q"> </div> <!> <!>',1);function qg(t,e){re(e,!0);const n=I(e,"limit",3,3),i=vr("scope")==="modal",r=vr("type"),a=di("card"),o=!!Je("categorize_playlinks");let s=K(0),c=K(!o);const u=B(()=>Kc(e.playlinks)),f=B(()=>g(e.playlinks)),d=B(()=>o?m(l(f)):[["",l(u)]]),v=B(()=>l(s)<500||!!a||l(u).length===1);function h(A){ve(i?fe.TitleModalPlaylinkClick:fe.InjectionPopoverPlaylinkClick,e.title,{playlink:A,type:r})}function g(A){const E={};for(const P of A){const{category:q}=P.extra_info;q in E||(E[q]=[]),E[q].push(P)}return E}function m(A){const E=["AVOD","SVOD","RENT","BUY"],P=[];for(const F of E)A[F]&&P.push([F,A[F]]);const q=[];for(const F of Object.values(A))for(const j of F)E.includes(j.extra_info.category)||q.push(j);return[...P,["Other",q]]}var p=Og(),w=Q(p),b=oe(w,!0);bt(w,(A,E)=>Re==null?void 0:Re(A,E),()=>3);var T=k(w,2);Lg(T,{get playlinks(){return l(u)}});var S=k(T,2);ze(S,17,()=>l(d),Ue,(A,E,P,q)=>{var F=B(()=>ci(l(E),2));let j=()=>l(F)[0],M=()=>l(F)[1];var D=Ng(),L=Q(D);{var V=U=>{var Y=jg(),$=oe(Y,!0);bt(Y,(ne,ue)=>Re==null?void 0:Re(ne,ue),()=>4),G(ne=>J($,ne),[()=>se(`Category: ${j()}`)]),y(U,Y)};Z(L,U=>{j()&&M().length&&U(V)})}var W=k(L,2);let z;ze(W,21,()=>M().slice(0,l(c)?n():M().length),Ue,(U,Y,$)=>{var ne=Dg(),ue=Q(ne);Zo(ue,{get playlink(){return l(Y)},onclick:()=>h(l(Y).name)});var de=k(ue,2);{var ye=be=>{{let Te=B(()=>hv(a)),Fe=B(()=>a.disclaimer||"");Zo(be,{get playlink(){return l(Te)},onclick:()=>ve(fe.DisplayedAdPlaylickClick,e.title,{campaign_name:a.campaign_name}),hideCategory:!0,get disclaimer(){return l(Fe)}})}};Z(de,be=>{a&&$===0&&be(ye)})}y(U,ne)});var O=k(W,2);{var H=U=>{var Y=Rg(),$=C(Y);Bt($,{onclick:()=>R(c,!l(c)),size:"large",children:(ne,ue)=>{var de=Xe();G(ye=>J(de,ye),[()=>se("Show Count More").replace("[[count]]",(M().length-n()).toString())]),y(ne,de)},$$slots:{default:!0}}),y(U,Y)};Z(O,U=>{M().length>n()&&l(c)&&U(H)})}G(()=>{z=_e(W,1,"playlinks svelte-1fykz2q",null,z,{list:l(v)}),le(W,"data-testid",`category-${j()??""}`)}),At(W,"clientWidth",U=>R(s,U)),y(A,D)}),G(A=>J(b,A),[()=>se("Where To Stream Online")]),y(t,p),ae()}var Ko=x('<button class="toggle svelte-7itcht"> </button>'),zg=x('<div class="paragraph svelte-7itcht" role="paragraph"> </div>'),Hg=x('<div class="description svelte-7itcht"><span class="paragraph svelte-7itcht" role="paragraph"> <!> <!></span> <!></div> <!>',1);function Fg(t,e){re(e,!0);const n=I(e,"blurb",3,""),i=I(e,"limit",3,200),r=I(e,"onclick",3,()=>null);let a=K(!1);const o=B(()=>e.text.slice(0,i()));function s(){R(a,!l(a)),r()()}var c=Hg(),u=Q(c),f=C(u),d=C(f),v=k(d);{var h=S=>{var A=Xe("...");y(S,A)};Z(v,S=>{!l(a)&&e.text.length>i()&&S(h)})}var g=k(v,2);{var m=S=>{var A=Ko(),E=oe(A,!0);G(P=>J(E,P),[()=>se("Show More")]),te("click",A,s),y(S,A)};Z(g,S=>{!l(a)&&(e.text.length>i()||n())&&S(m)})}var p=k(f,2);{var w=S=>{var A=zg(),E=oe(A,!0);G(()=>J(E,n())),y(S,A)};Z(p,S=>{l(a)&&S(w)})}var b=k(u,2);{var T=S=>{var A=Ko(),E=oe(A,!0);G(P=>J(E,P),[()=>se("Show Less")]),te("click",A,s),y(S,A)};Z(b,S=>{l(a)&&S(T)})}G(()=>J(d,l(a)?e.text:l(o))),y(t,c),ae()}Se(["click"]);async function Bg(t){return(await Ht(`/participants/browse?api-token=${vn()}&title_sid=${t.sid}`)).results}async function Jr(t){const e=await Ht(`/participants/${t}?api-token=${vn()}`);if(!e)throw new Error("No participant was returned for sid: "+t);return e}var Vg=Ge('<svg width="21px" height="21px" viewBox="0 -960 960 960"><path fill="currentColor" d="M430-200h100v-180h60v-184q0-27-28.5-41.5T480-620q-53 0-81.5 14.5T370-564v184h60v180Zm-105 88.5q-73-31.5-127.5-86t-86-127.5Q80-398 80-480.5t31.5-155q31.5-72.5 86-127t127.5-86Q398-880 480.5-880t155 31.5q72.5 31.5 127 86t86 127Q880-563 880-480.5T848.5-325q-31.5 73-86 127.5t-127 86Q563-80 480.5-80T325-111.5Zm381.5-142Q800-347 800-480t-93.5-226.5Q613-800 480-800t-226.5 93.5Q160-613 160-480t93.5 226.5Q347-160 480-160t226.5-93.5ZM523-657q17-17 17-43t-17-43q-17-17-43-17t-43 17q-17 17-17 43t17 43q17 17 43 17t43-17Zm-43 177Z"></path></svg>');function Wg(t){var e=Vg();y(t,e)}var Ug=x('<button class="attribution-icon svelte-1d2v314"><!></button>'),Gg=x('<img loading="lazy" alt="" class="svelte-1d2v314"/> <!>',1),Zg=x('<div class="attribution-overlay svelte-1d2v314"><a target="_blank" rel="external nofollow noreferrer" class="svelte-1d2v314"> </a> <a target="_blank" rel="external nofollow noreferrer" class="svelte-1d2v314"> </a> / <a target="_blank" rel="external nofollow noreferrer" class="svelte-1d2v314"> </a></div>'),Kg=x('<div class="image svelte-1d2v314" data-testid="participant-image"><!> <!></div>');function wl(t,e){re(e,!0);const n=I(e,"participant",3,null),i=B(()=>n()||{image_metadata:null}),r=B(()=>l(i).image_metadata);let a=K(!1);function o(v){v.stopImmediatePropagation(),v.target.nodeName!=="A"&&(v.preventDefault(),R(a,!l(a)))}var s=Kg(),c=C(s);{var u=v=>{var h=Gg(),g=Q(h),m=k(g,2);{var p=w=>{var b=Ug(),T=C(b);Wg(T),te("click",b,o),y(w,b)};Z(m,w=>{l(r)&&w(p)})}G(()=>le(g,"src",n().image)),y(v,h)};Z(c,v=>{var h;(h=n())!=null&&h.image&&v(u)})}var f=k(c,2);{var d=v=>{var h=Zg(),g=C(h),m=oe(g,!0),p=k(g),w=k(p),b=oe(w,!0),T=k(w,2),S=oe(T,!0);G(A=>{le(g,"href",l(r).source_url),J(m,l(r).source_text),J(p,` ${A??""} `),le(w,"href",l(r).author_url),J(b,l(r).author_text),le(T,"href",l(r).license_url),J(S,l(r).license_name)},[()=>se("By")]),te("click",h,o),y(v,h)};Z(f,v=>{n()&&l(r)&&l(a)&&v(d)})}y(t,s),ae()}Se(["click"]);var Yg=x('<button class="participant svelte-zy7e3f" data-testid="participant"><!> <div class="name svelte-zy7e3f"> </div></button>'),Jg=x('<div class="participant svelte-zy7e3f"><!> <div class="name svelte-zy7e3f"> </div></div>');function Qg(t,e){re(e,!0);const n=I(e,"heading",19,()=>se("Cast"));function i(c){const u=yt(Ec(Zl(Fi()))),f={};for(const v of c){const h=ca(u,yt(v.name));f[v.sid]={participant:v,count:h}}return Object.values(f).sort((v,h)=>h.count-v.count).map(({participant:v})=>v)}async function r(c,u){if(ve(fe.ParticipantClick,null,{title_source:e.title.original_title||e.title.title,participant:u.name}),!Je("open_tpi_links_in_explore")||window.location.href.includes(Je("explore_navigation_path")||"")){const f=await Jr(u.sid);Yn({event:c,type:"participant",data:f});return}window.location.href=to(u.sid)}async function a(){const c=await Bg(e.title);return c!=null&&c.length&&ve(fe.TitleParticipantsView,e.title,{participants:c.map(u=>u.name).slice(0,20)}),c}var o=ke(),s=Q(o);Sn(s,a,c=>{da(c,{get heading(){return n()},children:(u,f)=>{var d=ke(),v=Q(d);ze(v,16,()=>({length:5}),Ue,(h,g)=>{var m=Jg(),p=C(m);wl(p,{}),y(h,m)}),y(u,d)},$$slots:{default:!0}})},(c,u)=>{var f=ke(),d=Q(f);{var v=h=>{da(h,{get heading(){return n()},children:(g,m)=>{var p=ke(),w=Q(p);ze(w,17,()=>i(l(u)).slice(0,15),Ue,(b,T)=>{var S=Yg(),A=C(S);wl(A,{get participant(){return l(T)}});var E=k(A,2),P=oe(E,!0);G(()=>J(P,l(T).name)),te("click",S,q=>r(q,l(T))),me("mouseenter",S,()=>Jr(l(T).sid)),te("touchstart",S,()=>Jr(l(T).sid)),y(b,S)}),y(g,p)},$$slots:{default:!0}})};Z(d,h=>{var g;(g=l(u))!=null&&g.length&&h(v)})}y(c,f)}),y(t,o),ae()}Se(["click","touchstart"]);function Xg(t,e){re(e,!0);const n=Fc(e.title);{let i=B(()=>se("Similar Titles"));_r(t,{get titles(){return n},get heading(){return l(i)},onclick:r=>ve(fe.SimilarTitleClick,r,{title_source:e.title.original_title||e.title.title})})}ae()}function $g(t){const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.left="-9999px",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}var em=Ge('<svg width="16" height="15" viewBox="0 0 16 15"><path fill="currentColor" d="M6.70138 1.36838C6.70187 0.320494 7.75924 -0.233702 8.60177 0.0939687L8.76779 0.172094L8.82345 0.203344L8.87521 0.240453L14.4748 4.35666C15.273 4.89508 15.2742 6.06459 14.4807 6.60666L8.8879 10.8586L8.83029 10.9026L8.76779 10.9367C7.90544 11.4141 6.70148 10.8588 6.70138 9.74045V9.051C6.21939 9.09485 5.65912 9.18628 5.11056 9.37034C4.41863 9.60256 3.79163 9.96387 3.33907 10.5061C2.89934 11.0331 2.56088 11.8063 2.56075 12.9924C2.56075 13.1083 2.55351 13.2694 2.50802 13.4348C2.48558 13.5162 2.34386 14.0279 1.78439 14.1965C1.18154 14.3778 0.775385 13.9725 0.706262 13.9006C0.580913 13.7702 0.500537 13.626 0.452356 13.5305C0.257874 13.1448 0.107806 12.5395 0.0402463 11.841C-0.0994489 10.3951 0.0801391 8.23145 1.2922 5.90647C2.38232 3.81585 4.09969 2.85246 5.51095 2.42209C5.94157 2.29082 6.34701 2.20931 6.70138 2.15745V1.36838ZM8.28341 1.04709C8.02513 0.904267 7.70193 1.08266 7.70138 1.36838V3.07346C6.71677 3.09168 3.72663 3.40026 2.17892 6.36838L1.98165 6.76584C0.053228 10.8548 1.56075 14.193 1.56075 12.9924C1.56118 8.17098 6.39327 7.98172 7.70138 8.01877V9.74045C7.70147 9.9908 7.94881 10.1585 8.1838 10.1008L8.28341 10.0627L13.883 5.80686C14.1412 5.66368 14.1413 5.30543 13.883 5.16233L8.28341 1.04709Z"></path></svg>');function tm(t){var e=em();y(t,e)}var nm=Ge('<svg viewBox="0 -960 960 960" width="18px" height="18px"><path fill="currentColor" d="M440-280H280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h160v80H280q-50 0-85 35t-35 85q0 50 35 85t85 35h160v80ZM320-440v-80h320v80H320Zm200 160v-80h160q50 0 85-35t35-85q0-50-35-85t-85-35H520v-80h160q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H520Z"></path></svg>');function im(t){var e=nm();y(t,e)}var rm=Ge('<svg viewBox="0 -960 960 960" width="18px" height="18px"><path fill="currentColor" d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z"></path></svg>');function am(t){var e=rm();y(t,e)}var lm=Ge('<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 om(t){var e=lm();y(t,e)}var sm=x('<button class="svelte-827qd7"><!></button>'),cm=x('<div class="content svelte-827qd7"><!></div>'),um=x("<div><!> <!></div>");function $c(t,e){const n=I(e,"label",3,""),i=I(e,"align",3,"right");let r=K(!1),a=K(null);function o(h){var m;h.currentTarget===((m=l(a))==null?void 0:m.querySelector("button"))&&h.stopPropagation(),R(r,!l(r))}var s=um();me("click",Ie,()=>R(r,!1));var c=C(s);{var u=h=>{var g=ke(),m=Q(g);nt(m,()=>e.button,()=>({toggle:o})),y(h,g)},f=h=>{var g=sm(),m=C(g);om(m),G(()=>{le(g,"aria-label",n()),le(g,"aria-expanded",l(r))}),te("click",g,o),y(h,g)};Z(c,h=>{e.button?h(u):h(f,-1)})}var d=k(c,2);{var v=h=>{var g=cm(),m=C(g);nt(m,()=>e.children),qe(1,g,()=>Xi,()=>({duration:50,start:.85})),y(h,g)};Z(d,h=>{l(r)&&h(v)})}$e(s,h=>R(a,h),()=>l(a)),G(()=>_e(s,1,`context-menu ${i()??""}`,"svelte-827qd7")),y(t,s)}Se(["click"]);var dm=x("<!> ",1),fm=x('<button class="item svelte-npfy12"><!> </button> <button class="item svelte-npfy12"><!> </button>',1);function vm(t,e){re(e,!0);let n=I(e,"url",7);const r=window.innerWidth<Un&&typeof navigator.share<"u";lt(()=>{n(n()+"?utm_source=tpi")});function a(c,u){if(!r){u(c);return}ve(fe.ShareTitle,null,{title:e.title,url:Hn(),method:"native"}),navigator.share({title:e.title,url:n()})}function o(){ve(fe.ShareTitle,null,{title:e.title,url:Hn(),method:"copy"}),$g(n())}function s(){ve(fe.ShareTitle,null,{title:e.title,url:Hn(),method:"email"}),window.location.href=`mailto:?body=${n()}`}$c(t,{button:(u,f)=>{let d=()=>(f==null?void 0:f()).toggle;Bt(u,{onclick:v=>a(v,d()),children:(v,h)=>{var g=dm(),m=Q(g);tm(m);var p=k(m);G(w=>J(p,` ${w??""}`),[()=>se("Share")]),y(v,g)},$$slots:{default:!0}})},children:(u,f)=>{var d=fm(),v=Q(d),h=C(v);im(h);var g=k(h),m=k(v,2),p=C(m);am(p);var w=k(p);G((b,T)=>{J(g,` ${b??""}`),J(w,` ${T??""}`)},[()=>se("Copy URL"),()=>se("Email")]),te("click",v,o),te("click",m,s),y(u,d)},$$slots:{button:!0,default:!0}}),ae()}Se(["click"]);var hm=Ge('<svg width="12" height="12" viewBox="0 0 12 12"><path stroke="currentColor" stroke-width="1.1" transform="translate(2 0)" d="M9.47461 5.37598C9.77461 5.54918 9.77461 5.98207 9.47461 6.15527L1.22461 10.9189C0.924693 11.0916 0.549804 10.8745 0.549804 10.5283L0.549805 1.00293C0.549805 0.656711 0.924691 0.439623 1.22461 0.612304L9.47461 5.37598Z"></path></svg>');function gm(t){var e=hm();y(t,e)}var mm=x("<!> ",1);function pm(t,e){re(e,!0);function n(){Wc(e.title),ve(fe.TrailerClick,e.title)}Bt(t,{onclick:n,children:(i,r)=>{var a=mm(),o=Q(a);gm(o);var s=k(o);G(c=>J(s,` ${c??""}`),[()=>se("Watch Trailer")]),y(i,a)},$$slots:{default:!0}}),ae()}var _m=x('<div class="video-background svelte-18bbkrh" data-testid="video-background"><!></div>');function ym(t,e){const n=I(e,"embeddable_url",3,""),i=I(e,"autoplay",3,!0);let r=K(0),a=K(0);const o=B(()=>Math.max(l(r),l(a)));var s=_m(),c=C(s);$l(c,{get embeddable_url(){return n()},get autoplay(){return i()},fallbackStartTime:5,muted:!0,loop:!0,showActions:!0,clickToPlay:!1}),G(()=>rt(s,`--height: ${l(o)??""}px; --width: ${l(r)??""}px;`)),At(s,"clientWidth",u=>R(r,u)),At(s,"clientHeight",u=>R(a,u)),y(t,s)}var wm=x('<img alt=""/>'),bm=x("<div><!></div>");function km(t,e){re(e,!0);const n=I(e,"small",3,!1),i=I(e,"offsetMute",3,!1),r=I(e,"useVideoBackground",3,!0),a=I(e,"autoplay",3,!0),o=I(e,"inline",3,!1);let s=K(!1),c=K(!1),u=K(!1);et(()=>{r()&&e.title.embeddable_url&&Vc(Xl(e.title.embeddable_url)).then(m=>{R(u,m,!0)})});var f=bm();let d;var v=C(f);{var h=m=>{ym(m,{get embeddable_url(){return e.title.embeddable_url},get autoplay(){return a()}})},g=m=>{var p=ke(),w=Q(p);Yi(w,()=>l(c),b=>{var T=wm();let S;G(A=>{le(T,"src",A),S=_e(T,1,"svelte-1h1ov71",null,S,{loaded:l(s),blur:l(c)})},[()=>$i(l(c)?e.title.standing_poster:e.title.medium_poster)]),me("load",T,()=>R(s,!0)),me("error",T,()=>R(c,!0)),y(b,T)}),y(m,p)};Z(v,m=>{r()&&l(u)?m(h):m(g,-1)})}G(()=>d=_e(f,1,"background svelte-1h1ov71",null,d,{small:n(),inline:o(),"offset-mute":i()})),y(t,f),ae()}var xm=x('<div class="genre svelte-1mphbln"> </div>'),Sm=x('<button class="genre expand svelte-1mphbln"> </button>'),Tm=x("<!> <!>",1);function Em(t,e){re(e,!0);let n=K(!1);const i=B(()=>l(n)?e.genres:[e.genres[0]]);var r=Tm(),a=Q(r);ze(a,17,()=>l(i),Ue,(c,u)=>{const f=B(()=>{var g;return(g=Ea.find(m=>m.slug===l(u)))==null?void 0:g.name});var d=ke(),v=Q(d);{var h=g=>{var m=xm(),p=oe(m,!0);oa(m,()=>gi()?qc(Yt.GenreInterest,{genre:l(f),source:Rn.Card}):null),G(w=>J(p,w),[()=>se(l(f))]),y(g,m)};Z(v,g=>{l(f)&&g(h)})}y(c,d)});var o=k(a,2);{var s=c=>{var u=Sm(),f=oe(u);G(()=>J(f,`+${e.genres.length-1}`)),te("click",u,()=>R(n,!0)),y(c,u)};Z(o,c=>{!l(n)&&e.genres.length>1&&c(s)})}y(t,r),ae()}Se(["click"]);var Pm=x("<div> </div>"),Im=x('<div><div class="imdb svelte-13b1w31"><!> </div> <!> <div> </div> <div class="capitalize svelte-13b1w31"> </div> <!></div>');function Cm(t,e){re(e,!0);const n=I(e,"small",3,!1);var i=Im();let r;var a=C(i),o=C(a);Aa(o,{});var s=k(o),c=k(a,2);Em(c,{get genres(){return e.title.genres}});var u=k(c,2),f=oe(u,!0),d=k(u,2),v=oe(d,!0),h=k(d,2);{var g=m=>{var p=Pm(),w=oe(p);G(b=>J(w,`${e.title.length??""} ${b??""}`),[()=>se("Minutes")]),y(m,p)};Z(h,m=>{!n()&&e.title.length&&m(g)})}G(m=>{r=_e(i,1,"info svelte-13b1w31",null,r,{small:n()}),J(s,` ${e.title.imdb_score??""}`),J(f,e.title.year),J(v,m)},[()=>se(`Type: ${e.title.type}`)]),y(t,i),ae()}var Am=x('<div><div class="header svelte-16ajinh"><div><!></div> <div id="heading"> </div> <!> <div class="actions svelte-16ajinh"><!> <!></div></div> <div class="main svelte-16ajinh"><!> <!> <!> <!></div></div> <!>',1);function Ma(t,e){var W;re(e,!0);const n=I(e,"small",3,!1),i=I(e,"useVideoBackground",3,!0),r=!!((W=window.PlayPilotLinkInjections)!=null&&W.no_affiliate);Ar("title",e.title);const a=vr("modal"),o=B(()=>(!n()||r)&&e.title.description);let s=K(!1);var c=Am(),u=Q(c);let f;var d=C(u),v=C(d);let h;var g=C(v);Ia(g,{get title(){return e.title},onload:()=>R(s,!0),lazy:!1});var m=k(v,2);let p;var w=oe(m,!0);bt(m,(z,O)=>Re==null?void 0:Re(z,O),()=>2);var b=k(m,2);Cm(b,{get title(){return e.title},get small(){return n()}});var T=k(b,2),S=C(T);{var A=z=>{pm(z,{get title(){return e.title}})};Z(S,z=>{e.title.embeddable_url&&z(A)})}var E=k(S,2);{let z=B(()=>Ca(e.title));vm(E,{get title(){return e.title.title},get url(){return l(z)}})}var P=k(d,2),q=C(P);{var F=z=>{Fg(z,{get text(){return e.title.description},get blurb(){return e.title.blurb},onclick:()=>ve(fe.ExpandTitleDescription,e.title)})};Z(q,z=>{l(o)&&z(F)})}var j=k(q,2);{var M=z=>{qg(z,{get playlinks(){return e.title.providers},get title(){return e.title}})};Z(j,z=>{r||z(M)})}var D=k(j,2);Qg(D,{get title(){return e.title}});var L=k(D,2);Xg(L,{get title(){return e.title}});var V=k(u,2);{let z=B(()=>a==="title");km(V,{get title(){return e.title},get small(){return n()},get useVideoBackground(){return i()},get offsetMute(){return l(z)}})}G(()=>{f=_e(u,1,"content svelte-16ajinh",null,f,{small:n()}),h=_e(v,1,"poster svelte-16ajinh",null,h,{loaded:l(s)}),p=_e(m,1,"heading svelte-16ajinh",null,p,{truncate:n()}),J(w,e.title.title)}),y(t,c),ae()}var Mm=x('<!> <p class="empty svelte-1nq44zr"> </p>',1),Lm=x("<!> ",1),jm=x("<div><!></div>"),Dm=x('<!> <div class="title svelte-1nq44zr" data-testid="title"><!></div>',1),Rm=x("<!> Loading...",1);function Nm(t,e){re(e,!0);const n=v=>{var h=Mm(),g=Q(h);i(g);var m=k(g,2),p=oe(m,!0);G(w=>J(p,w),[()=>se("Page Not Found")]),y(v,h)},i=(v,h)=>{let g=xa(()=>fr(h==null?void 0:h(),!1));var m=jm();let p;var w=C(m);Bt(w,{variant:"link",onclick:()=>r()("home"),children:(b,T)=>{var S=Lm(),A=Q(S);Ft(A,{direction:"left"});var E=k(A);G(P=>J(E,` ${P??""}`),[()=>se("Home")]),y(b,S)},$$slots:{default:!0}}),G(()=>p=_e(m,1,"back svelte-1nq44zr",null,p,{offset:l(g)})),y(v,m)},r=I(e,"navigate",3,()=>null);let a=K(Ne(window.innerWidth));const o=B(()=>l(a)<Un),s=new URL(document.location.toString()).searchParams.get("sid");var c=ke(),u=Q(c);{var f=v=>{var h=ke(),g=Q(h);Sn(g,()=>Bc(s),m=>{var p=Rm(),w=Q(p);i(w),y(m,p)},(m,p)=>{var w=Dm(),b=Q(w);i(b,()=>!0);var T=k(b,2),S=C(T);Ma(S,{get title(){return l(p)},get useVideoBackground(){return l(o)}}),y(m,w)},m=>{n(m)}),y(v,h)},d=v=>{n(v)};Z(u,v=>{s?v(f):v(d,-1)})}zi("innerWidth",v=>R(a,v,!0)),y(t,c),ae()}const ao={TopScrollFormat:{key:"top_scroll_format",numberOfVariants:2,variantNames:["Separated","Inline"]}},Yo="playpilot_split_test_";function Om({key:t}){var r,a,o;const e=(a=(r=window.PlayPilotLinkInjections)==null?void 0:r.split_test_identifiers)==null?void 0:a[t];if(e!==void 0)return e;(o=window.PlayPilotLinkInjections)!=null&&o.split_test_identifiers||(window.PlayPilotLinkInjections.split_test_identifiers={});let n=sessionStorage.getItem(Yo+t);if(!n){const s=(Math.floor(Math.random()*100)/100).toString();sessionStorage.setItem(Yo+t,s),n=s}const i=parseFloat(n);return window.PlayPilotLinkInjections.split_test_identifiers[t]=i,i}function eu(t){const e=Om(t);return Math.floor(e*t.numberOfVariants)}function qm(t){var n;const e=eu(t);return((n=t.variantNames)==null?void 0:n[e])||e.toString()}function zm(t,e=1){return eu(t)===e}function Hm(t){const e=qm(t);ve(fe.SplitTestView,null,{key:t.key,variant:e})}var Fm=x("<div></div>");function Bm(t,e){re(e,!0);let n=I(e,"threshold",3,100),i=I(e,"isDragging",15,!1),r=I(e,"passedThreshold",15,!1),a=I(e,"onpassed",3,()=>null),o=K(0),s=K(0),c=K(null),u=K(!1);const f=B(()=>Math.max(l(s)-l(o),0));et(()=>{r(l(f)>n())});function d(w){if(w){i(!0),R(u,!0),R(o,w.touches[0].pageY,!0);for(const b of e.targets)b.style.transitionDuration="0ms"}}function v(w){if(w&&i()){w.preventDefault(),R(s,w.touches[0].pageY,!0),l(c).style.transform=`translateY(${l(f)}px)`;for(const b of e.targets)b.style.top=`${l(f)}px`}}function h(){if(i()){if(i(!1),r())a()();else{l(c).removeAttribute("style");for(const w of e.targets)w.style.removeProperty("transition"),requestAnimationFrame(()=>w.style.top="0px")}R(o,0),R(s,0)}}var g={start:d,move:v,end:h},m=Fm();me("touchmove",Ie,v,void 0,!0),me("touchend",Ie,h);let p;return $e(m,w=>R(c,w),()=>l(c)),G(()=>p=_e(m,1,"handle svelte-1xqgdsn",null,p,{dragging:i(),dragged:l(u)})),te("touchstart",m,d),y(t,m),ae(g)}Se(["touchstart"]);function Xa(t){function e(){return Array.from(t.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])'))}function n(a){if(a.key!=="Tab")return;const o=document.activeElement;if(!o)return;const s=e();if(!s.length)return;const[c]=s,u=s[s.length-1];a.shiftKey&&o===c&&(u.focus(),a.preventDefault()),!a.shiftKey&&o===u&&(c.focus(),a.preventDefault())}const i=document.activeElement,[r]=e();return i!=null&&i.matches(":focus-visible")&&(r==null||r.focus()),window.addEventListener("keydown",n),{destroy(){window.removeEventListener("keydown",n),i==null||i.focus()}}}function Vm(){return document.scrollingElement?document.scrollingElement:document.documentElement.scrollTop?document.documentElement:document.body}var Jo=x("<div><!></div>"),Wm=x('<div class="prepend svelte-1rbidhv" data-view-transition-new="playpilot-title-extra"><!></div>'),Um=x('<div class="bubble svelte-1rbidhv" data-view-transition-new="playpilot-title-extra"><!></div>'),Gm=x('<div class="swipe-handle svelte-1rbidhv"><!></div>'),Zm=x('<div class="dialog svelte-1rbidhv" role="dialog" aria-labelledby="title" data-view-transition-new="playpilot-title-content"><!> <!> <!></div> <!>',1),Km=x('<div data-testid="modal"><!> <!> <!> <!></div>');function Wi(t,e){re(e,!0);const n=O=>{var H=Jo(),U=C(H);Vi(U,{onclick:T,"aria-label":"Close",children:(Y,$)=>{qr(Y,{})},$$slots:{default:!0}}),$e(H,Y=>R(h,Y),()=>l(h)),G(()=>_e(H,1,`close ${o()??""}`,"svelte-1rbidhv")),qe(7,H,()=>b),y(O,H)},i=I(e,"tall",3,!1),r=I(e,"wide",3,!1),a=I(e,"blur",3,!1),o=I(e,"closeButtonStyle",3,"shadow"),s=I(e,"initialScrollPosition",3,0),c=I(e,"onscroll",3,()=>null),u=I(e,"onclose",3,()=>null);let f=K(0),d=K(null),v=K(null),h=K(null),g=K(0),m=K(!1);const p=B(()=>l(f)<Un);et(()=>{var O;l(f)&&R(g,((O=l(v))==null?void 0:O.offsetTop)||0,!0)}),et(()=>{setTimeout(()=>{var O;return R(g,((O=l(v))==null?void 0:O.offsetTop)||0,!0)})}),Ar("scope","modal"),lt(()=>{const O=Vm();return O.classList.add("playpilot-modal-open"),R(m,!!es()),requestAnimationFrame(()=>requestAnimationFrame(w)),()=>{var H;document.querySelector(".modal")||O.classList.remove("playpilot-modal-open"),!es()&&((H=history.state)!=null&&H.modal)&&history.back()}});function w(){const O=si().querySelector("[data-modal-scroll-target]")||(window.innerWidth>Un?l(d):l(v));O==null||O.scrollTo(0,s())}function b(O){return er.current?Ot(O,{duration:0}):l(p)?Si(O,{duration:250,y:window.innerHeight,opacity:1}):Xi(O,{duration:150,start:.85})}function T(){u()(),va()}function S(O){O.target===l(d)&&T()}var A=Km();me("keydown",Ie,({key:O})=>{O==="Escape"&&T()});let E,P;var q=C(A);{var F=O=>{var H=Wm(),U=C(H);nt(U,()=>e.prepend),qe(7,H,()=>b),y(O,H)};Z(q,O=>{e.prepend&&O(F)})}var j=k(q,2);{var M=O=>{var H=Um(),U=C(H);nt(U,()=>e.bubble),qe(7,H,()=>b),y(O,H)};Z(j,O=>{e.bubble&&O(M)})}var D=k(j,2);{var L=O=>{var H=Gm(),U=C(H);{var Y=$=>{{let ne=B(()=>[l(v),l(h)]);Bm($,{get targets(){return l(ne)},onpassed:T})}};Z(U,$=>{l(v)&&l(h)&&$(Y)})}qe(7,H,()=>b),y(O,H)};Z(D,O=>{l(p)&&O(L)})}var V=k(D,2);{var W=O=>{var H=ke(),U=Q(H);nt(U,()=>e.dialog),y(O,H)},z=O=>{var H=Zm(),U=Q(H),Y=C(U);{var $=Te=>{var Fe=Jo(),Be=C(Fe);Vi(Be,{get onclick(){return u_},"aria-label":"Back",children:(X,ee)=>{Ft(X,{direction:"left"})},$$slots:{default:!0}}),G(()=>_e(Fe,1,`close back ${o()??""}`,"svelte-1rbidhv")),y(Te,Fe)};Z(Y,Te=>{l(m)&&Te($)})}var ne=k(Y,2);nt(ne,()=>e.children??Pt);var ue=k(ne,2);{var de=Te=>{n(Te)};Z(ue,Te=>{l(p)||Te(de)})}$e(U,Te=>R(v,Te),()=>l(v));var ye=k(U,2);{var be=Te=>{n(Te)};Z(ye,Te=>{l(p)&&Te(be)})}me("scroll",U,function(...Te){var Fe;(Fe=c())==null||Fe.apply(this,Te)}),qe(7,U,()=>b),y(O,H)};Z(V,O=>{e.dialog?O(W):O(z,-1)})}$e(A,O=>R(d,O),()=>l(d)),bt(A,O=>Xa==null?void 0:Xa(O)),G(()=>{E=_e(A,1,"modal svelte-1rbidhv",null,E,{wide:r(),tall:i(),"background-blur":a(),"has-bubble":!!e.bubble,"has-prepend":!!e.prepend}),P=rt(A,"",P,{"--dialog-offset":`${l(g)??""}px`})}),zi("innerWidth",O=>R(f,O,!0)),te("click",A,S),qe(5,A,()=>Ot,()=>({duration:150})),qe(6,A,()=>Ot,()=>({duration:150,delay:100})),y(t,A),ae()}Se(["click"]);var Ym=x('<div class="error svelte-1bjke62"> </div>'),Jm=x('<div class="loading svelte-1bjke62"><div class="bar svelte-1bjke62"></div> <div class="bar svelte-1bjke62"></div> <div class="bar svelte-1bjke62"></div></div>');function Qm(t,e){re(e,!0);const n=I(e,"navigate",3,()=>null);async function i(){const s=new URL(document.location.toString()).searchParams.get("sid");if(!s)return;let c=s.startsWith("pr")?"participant":"titles-rail",u=null;if(c==="titles-rail"){const[f,d]=(await Promise.allSettled([Bc(s),Fc({sid:s})])).map(v=>v.status==="fulfilled"?v.value:null);u=[f,...d]}else c==="participant"&&(u=await Jr(s));Yn({type:c,data:u,props:{onclose:()=>n()("home")}})}var r=ke(),a=Q(r);Sn(a,i,o=>{Wi(o,{blur:!0,dialog:c=>{var u=Jm();y(c,u)},$$slots:{dialog:!0}})},void 0,o=>{Wi(o,{blur:!0,onclose:()=>n()("home"),children:(s,c)=>{var u=Ym(),f=oe(u,!0);G(d=>J(f,d),[()=>se("An Error Occurred")]),y(s,u)},$$slots:{default:!0}})}),y(t,r),ae()}var Xm=x("<p>An error occurred.</p>"),$m=x("<!> <!>",1);function ep(t,e){re(e,!0);const n=[{key:"home",component:Go},{key:"results",component:Jc},{key:"title",component:Nm},{key:"modal",component:Go,appendComponent:Qm}],i=f()||n[0].key;let r=K(Ne(n.find(({key:g})=>g===i)||n[0])),a=K(""),o=K(Ne({}));const s=B(()=>l(r).component),c=B(()=>l(r).appendComponent);et(()=>{l(a)&&R(r,n.find(g=>g.key==="results"),!0)});function u(g,m=!0){R(r,n.find(w=>w.key===g)||n[0],!0);const p=new URL(document.location.toString());g!=="title"&&g!=="modal"&&p.searchParams.delete("sid"),g===n[0].key?p.searchParams.delete("route"):p.searchParams.set("route",l(r).key),m&&history.pushState({},"",p),ve(fe.ExploreNavigate,null,{route:l(r).key})}function f(){return new URL(document.location.toString()).searchParams.get("route")||n[0].key}function d(){u(f(),!1)}var v=ke();me("popstate",Ie,d);var h=Q(v);Fl(h,{onerror:m=>console.error(m),failed:m=>{var p=Xm();y(m,p)}},m=>{Sg(m,{navigate:u,get searchQuery(){return l(a)},set searchQuery(p){R(a,p,!0)},get filter(){return l(o)},set filter(p){R(o,p,!0)},children:(p,w)=>{var b=$m(),T=Q(b);aa(T,()=>l(s),(A,E)=>{E(A,{get searchQuery(){return l(a)},get filter(){return l(o)},navigate:u})});var S=k(T,2);aa(S,()=>l(c),(A,E)=>{E(A,{navigate:u})}),y(p,b)},$$slots:{default:!0}})}),y(t,v),ae()}const lo="[data-playpilot-explore]",tp="[data-playpilot-pre-consent-explore]",tu="playpilot-explore-custom-style";let Qr=null;function bl(){var e;const t=document.querySelector(lo);t&&(kl(),(e=document.querySelector(tp))==null||e.remove(),t.innerHTML="",Qr=Nt(ep,{target:t}),ip())}function kl(){var t;Qr&&(Zn(Qr),Qr=null,(t=document.querySelector("#"+tu))==null||t.remove())}function np(){var c;const t=window.PlayPilotLinkInjections.config;if(!t)return!1;const{explore_navigation_selector:e,explore_navigation_label:n,explore_navigation_path:i,explore_navigation_insert_position:r}=t;if(!e||!i)return!1;(c=document.querySelector("[data-playpilot-explore-navigation-element]"))==null||c.remove();const a=document.querySelector(e);if(!a)return!1;const o=a.cloneNode(!0),s=o.nodeName==="A"?o:o.querySelector("a");return s.classList.remove("active"),s.innerText=n||"Streaming Guide",s.href=i,o.dataset.playpilotExploreNavigationElement="true",a.insertAdjacentElement(r||"afterend",o),!0}function ip(){const t=Je("explore_custom_style");if(!t)return;const e=document.createElement("style");e.textContent=t,e.id=tu,document.body.appendChild(e)}function Ti(t,e){const{onclick:n}=e;function i(r){return r.button!==1?null:(n(r),r)}return t.addEventListener("mouseup",i),{destroy(){t.removeEventListener("mouseup",i)}}}const Qo={TopScrollBackground:"topscrollBackgroundMobile",TopScrollContent:"8by1x23"};var rp=x('<img class="content-image svelte-1mt6g1y" width="728" height="90"/>'),ap=x('<img class="logo svelte-1mt6g1y" alt="" width="50" height="50"/>'),lp=x('<button class="button svelte-1mt6g1y"> </button>'),op=x('<!> <p class="tagline svelte-1mt6g1y"> </p> <!>',1),sp=x('<div class="background svelte-1mt6g1y"></div>'),cp=x("<!> <!>",1),up=x('<a target="_blank" tabindex="-1" rel="sponsored"><div class="content svelte-1mt6g1y"><!></div> <!></a>');function nu(t,e){re(e,!0),ve(fe.TopScrollView,null,{campaign_name:e.campaign.campaign_name}),Hm(ao.TopScrollFormat);const n=B(()=>e.campaign.disclaimer),i=B(()=>e.campaign.content),r=B(()=>e.campaign.cta),a=B(()=>l(i).format),o=B(()=>l(i).header),s=B(()=>l(i).header_logo),c=B(()=>l(i).image_uuid),u=B(()=>l(r).header),f=B(()=>l(r).url),d=B(()=>l(a)==="large"),v=B(()=>Vo(l(c),Qo.TopScrollBackground)),h=B(()=>Vo(l(c),Qo.TopScrollContent));let g=K(0);function m(){ve(fe.TopScrollClick,null,{campaign_name:e.campaign.campaign_name})}var p=up();let w,b;var T=C(p),S=C(T);{var A=F=>{var j=rp();G(()=>{le(j,"src",l(h)),le(j,"alt",l(o))}),y(F,j)},E=F=>{var j=op(),M=Q(j);{var D=O=>{var H=ap();G(()=>le(H,"src",l(s))),y(O,H)};Z(M,O=>{l(s)&&O(D)})}var L=k(M,2),V=oe(L,!0),W=k(L,2);{var z=O=>{var H=lp(),U=oe(H,!0);G(()=>J(U,l(u))),y(O,H)};Z(W,O=>{l(u)&&O(z)})}G(()=>J(V,l(o))),y(F,j)};Z(S,F=>{l(d)?F(A):F(E,-1)})}var P=k(T,2);{var q=F=>{var j=cp(),M=Q(j);{var D=W=>{var z=sp();let O;G(()=>O=rt(z,"",O,{"--background":`url('${l(v)??""}')`})),y(W,z)};Z(M,W=>{l(c)&&W(D)})}var L=k(M,2);{var V=W=>{ro(W,{get disclaimer(){return l(n)}})};Z(L,W=>{l(n)&&W(V)})}y(F,j)};Z(P,F=>{l(d)||F(q)})}bt(p,(F,j)=>Ti==null?void 0:Ti(F,j),()=>({onclick:m})),Gn(()=>At(p,"clientWidth",F=>R(g,F))),G(()=>{le(p,"href",l(f)),w=_e(p,1,"top-scroll svelte-1mt6g1y",null,w,{simple:l(d)}),b=rt(p,"",b,{"--width":`${l(g)??""}px`})}),te("click",p,m),y(t,p),ae()}Se(["click"]);var dp=x('<div class="content svelte-r7ubzi"><!></div>'),fp=x('<div class="tooltip svelte-r7ubzi" data-testid="tooltip"><!> <!></div>');function vp(t,e){let n=K(!1);var i=fp(),r=C(i);nt(r,()=>e.children);var a=k(r,2);{var o=s=>{var c=dp(),u=C(c);nt(u,()=>e.content),qe(1,c,()=>Ot,()=>({duration:100})),y(s,c)};Z(a,s=>{l(n)&&s(o)})}te("touchstart",i,()=>R(n,!l(n))),me("mouseenter",i,()=>R(n,!0)),me("mouseleave",i,()=>R(n,!1)),y(t,i)}Se(["touchstart"]);var hp=x('<div class="info svelte-qcpiki"><!></div>'),gp=x('<img class="logo svelte-qcpiki" alt="" height="40" width="40"/>'),mp=x('<span class="name svelte-qcpiki"> </span>'),pp=x('<div class="subheader svelte-qcpiki"> </div>'),_p=x('<div class="action svelte-qcpiki"> </div>'),yp=x('<div class="cta svelte-qcpiki"><!> <div><!> <!></div> <!></div>'),wp=x('<img class="background svelte-qcpiki" alt=""/>'),bp=x('<video class="background svelte-qcpiki" autoplay="" playsinline="" loop=""><source type="video/mp4"/> <track kind="captions"/></video>',2),kp=x('<div class="disclaimer svelte-qcpiki"><!></div>'),xp=x('<a target="_blank" rel="sponsored"><!> <!> <!> <!></a>');function oo(t,e){re(e,!0);const n=I(e,"compact",3,!1),i=B(()=>e.campaign.disclaimer),r=B(()=>e.campaign.content),a=B(()=>e.campaign.cta),o=B(()=>e.campaign.campaign_type),s=B(()=>l(r).header),c=B(()=>l(r).subheader),u=B(()=>l(r).header_logo),f=B(()=>l(r).image),d=B(()=>l(r).video),v=B(()=>l(a).header),h=B(()=>l(a).url),g=B(()=>l(a).subheader);let m=K(0),p=K(null);ve(fe.DisplayAdView,null,{campaign_name:e.campaign.campaign_name});function w(){ve(fe.DisplayAdClick,null,{campaign_name:e.campaign.campaign_name})}Rr(()=>{l(p)&&ve(fe.DisplayedAdVideoPercentage,null,{percentage:100/l(p).duration*l(p).currentTime})});var b=xp();let T;var S=C(b);{var A=L=>{var V=hp(),W=C(V);{var z=H=>{vp(H,{content:Y=>{var $=Xe();G(()=>J($,l(g))),y(Y,$)},children:(Y,$)=>{var ne=Xe("Ad");y(Y,ne)}})},O=H=>{var U=Xe();G(()=>J(U,l(g))),y(H,U)};Z(W,H=>{n()?H(z):H(O,-1)})}y(L,V)};Z(S,L=>{l(g)&&L(A)})}var E=k(S,2);{var P=L=>{var V=yp(),W=C(V);{var z=de=>{var ye=gp();G(()=>le(ye,"src",l(u))),y(de,ye)};Z(W,de=>{l(u)&&de(z)})}var O=k(W,2),H=C(O);{var U=de=>{var ye=mp(),be=oe(ye,!0);G(()=>J(be,l(s))),y(de,ye)};Z(H,de=>{l(s)&&de(U)})}var Y=k(H,2);{var $=de=>{var ye=pp(),be=oe(ye,!0);G(()=>J(be,l(c))),y(de,ye)};Z(Y,de=>{l(c)&&de($)})}var ne=k(O,2);{var ue=de=>{var ye=_p(),be=oe(ye,!0);G(()=>J(be,l(v))),y(de,ye)};Z(ne,de=>{l(v)&&de(ue)})}At(V,"clientHeight",de=>R(m,de)),y(L,V)};Z(E,L=>{(l(u)||l(s)||l(c)||l(v))&&L(P)})}var q=k(E,2);{var F=L=>{var V=wp();G(()=>le(V,"src",l(f))),y(L,V)},j=L=>{var V=bp();V.muted=!0;var W=C(V);$e(V,z=>R(p,z),()=>l(p)),G(()=>le(W,"src",l(d))),y(L,V)};Z(q,L=>{l(o)==="image"&&l(f)?L(F):l(o)==="video"&&l(d)&&L(j,1)})}var M=k(q,2);{var D=L=>{var V=kp();let W;var z=C(V);ro(z,{get disclaimer(){return l(i)}}),G(()=>W=rt(V,"",W,{"--offset":`${l(m)??""}px`})),y(L,V)};Z(M,L=>{l(i)&&L(D)})}bt(b,(L,V)=>Ti==null?void 0:Ti(L,V),()=>({onclick:w})),G(()=>{le(b,"href",l(h)),T=_e(b,1,"display svelte-qcpiki",null,T,{compact:n()})}),te("click",b,w),y(t,b),ae()}Se(["click"]);var Sp=x('<a class="call-to-action svelte-1677ll3"><img alt="" width="70" height="57"/> <div><strong class="svelte-1677ll3">Looking for something else?</strong> <div>Use our streamingguide</div></div> <div class="arrow svelte-1677ll3"><!></div></a>');function Tp(t,e){re(e,!1);const n="https://cdn.jsdelivr.net/npm/@playpilot/tpi@latest/src/lib/images/titles-list.webp",i=Je("explore_navigation_path");Wl();var r=Sp(),a=C(r);le(a,"src",n);var o=k(a,4),s=C(o);Ft(s,{}),G(()=>le(r,"href",i)),te("click",r,()=>ve(fe.CardToExploreCta)),y(t,r),ae()}Se(["click"]);var Ep=new Set(["$$slots","$$events","$$legacy","title","initialScrollPosition"]);function Pp(t,e){re(e,!0);const n=v=>{var h=ke(),g=Q(h);{var m=w=>{nu(w,{get campaign(){return o}})},p=w=>{Tp(w,{})};Z(g,w=>{o?w(m):w(p,-1)})}y(v,h)},i=v=>{var h=ke(),g=Q(h);{var m=p=>{oo(p,{get campaign(){return s}})};Z(g,p=>{s&&p(m)})}y(v,h)},r=I(e,"initialScrollPosition",3,0),a=Ji(e,Ep);Ar("modal","title");const o=di("top_scroll"),s=di("card"),c=Je("explore_insert_cta_in_tpi"),u=!!o||c&&!document.querySelector(lo);let f=!1;ve(fe.TitleModalView,e.title),gi()&&ln(Yt.TitleInterest,{title:e.title.title,source:Rn.Card}),lt(()=>{const v=Date.now();return()=>ve(fe.TitleModalClose,e.title,{time_spent:Date.now()-v})});function d(){f||(ve(fe.TitleModalScroll,e.title),f=!0)}{let v=B(()=>u?n:null),h=B(()=>s?i:null);Wi(t,{onscroll:d,get initialScrollPosition(){return r()},get bubble(){return l(v)},get prepend(){return l(h)},tall:!0,children:(g,m)=>{Ma(g,Tn({get title(){return e.title}},()=>a))},$$slots:{default:!0}})}ae()}var Ip=x('<div class="read-more svelte-zuyh9b"><!></div>'),Cp=x("<p> </p> <!>",1),Ap=x('<div class="list-header svelte-zuyh9b"><div class="heading subheading svelte-zuyh9b" id="credits"> </div></div> <div class="jobs svelte-zuyh9b"></div> <!>',1),Mp=x('<div><!> <div><div class="heading svelte-zuyh9b" id="heading"> </div> <!></div></div> <div><!> <!></div>',1);function iu(t,e){re(e,!0);const n=I(e,"small",3,!1),i=B(()=>e.participant.name),r=B(()=>e.participant.description),a=Ne({}),o=[{label:"Popularity",value:Nn.Popular},{label:"Top Rated",value:Nn.Best},{label:"IMDb Rating",value:Nn.IMDb},{label:"Year",value:Nn.Chronological}];let s=K(0),c=K("all"),u=K(!1);const f=B(()=>({...a,participant_sid:{type:"string",value:e.participant.sid},participant_job:{type:"string",value:l(c)==="all"?null:l(c)}}));gi()&&ln(Yt.ParticipantView,{participant:e.participant.name});function d(M,D,L){Yn({event:M,type:"titles-rail",data:D,props:{initialIndex:L}})}var v=Mp(),h=Q(v);let g;var m=C(h);{var p=M=>{wl(M,{get participant(){return e.participant}})};Z(m,M=>{e.participant.image&&M(p)})}var w=k(m,2),b=C(w),T=oe(b,!0);bt(b,(M,D)=>Re==null?void 0:Re(M,D),()=>2);var S=k(b,2);{var A=M=>{var D=Cp(),L=Q(D);let V;var W=oe(L,!0),z=k(L,2);{var O=H=>{var U=Ip(),Y=C(U);Bt(Y,{variant:"link",onclick:()=>R(u,!l(u)),children:($,ne)=>{var ue=Xe();G(de=>J(ue,de),[()=>l(u)?se("Read Less"):se("Read More")]),y($,ue)},$$slots:{default:!0}}),y(H,U)};Z(z,H=>{n()||H(O)})}G(()=>{V=_e(L,1,"description svelte-zuyh9b",null,V,{expanded:l(u)}),J(W,l(r))}),y(M,D)};Z(S,M=>{l(r)&&M(A)})}var E=k(h,2);let P;var q=C(E);{var F=M=>{var D=Ap(),L=Q(D),V=C(L),W=oe(V,!0);bt(V,(H,U)=>Re==null?void 0:Re(H,U),()=>3);var z=k(L,2);ze(z,21,()=>["all",...e.participant.jobs],Ue,(H,U)=>{{let Y=B(()=>l(c)===l(U));Bt(H,{variant:"border",size:"large",get active(){return l(Y)},onclick:()=>R(c,l(U),!0),children:($,ne)=>{var ue=Xe();G(de=>J(ue,de),[()=>se("Job: "+l(U)).replace("Job: ","")]),y($,ue)},$$slots:{default:!0}})}});var O=k(z,2);{let H=B(()=>l(s)<700);Xc(O,{get filter(){return a},get sortings(){return o},get limit(){return l(H)},hideActive:!0})}G(H=>J(W,H),[()=>se("Credits")]),y(M,D)};Z(q,M=>{n()||M(F)})}var j=k(q,2);Jc(j,{forceGrid:!0,hidePlaylinks:!0,get filter(){return l(f)},onTitleClick:d}),G(()=>{g=_e(h,1,"header svelte-zuyh9b",null,g,{small:n(),"no-image":!e.participant.image}),J(T,l(i)),P=_e(E,1,"content svelte-zuyh9b",null,P,{small:n()})}),At(E,"clientWidth",M=>R(s,M)),y(t,v),ae()}var Lp=new Set(["$$slots","$$events","$$legacy","participant","initialScrollPosition"]);function jp(t,e){re(e,!0);const n=I(e,"initialScrollPosition",3,0),i=Ji(e,Lp);ve(fe.ParticipantModalView,null,{participant:e.participant.name}),lt(()=>{const r=Date.now();return()=>ve(fe.ParticipantModalClose,null,{participant:e.participant.name,time_spent:Date.now()-r})}),Wi(t,Tn({get initialScrollPosition(){return n()}},()=>i,{closeButtonStyle:"flat",tall:!0,wide:!0,blur:!0,children:(r,a)=>{iu(r,{get participant(){return e.participant}})},$$slots:{default:!0}})),ae()}function Dp(t,e=!0){if(!document.startViewTransition||!e){t();return}document.startViewTransition(()=>{const n=document.querySelectorAll("[data-view-transition-old]");if(t(),!n.length)return;document.querySelectorAll("[data-view-transition-new]").forEach(r=>{r.style.viewTransitionName=r.dataset.viewTransitionNew||""})})}var Rp=Ge('<svg viewBox="0 -960 960 960" width="24px" height="24px" fill="currentColor"><path d="m480-320 160-160-56-56-64 64v-168h-80v168l-64-64-56 56 160 160Zm0 240q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"></path></svg>');function Np(t){var e=Rp();y(t,e)}var Op=x('<div class="scroll-indicator svelte-wxwoko"><div class="scroll-indicator-icon svelte-wxwoko"><!></div></div>'),qp=x('<div class="bubble svelte-wxwoko" data-view-transition-old=""><!></div>'),zp=x('<div class="append svelte-wxwoko" data-view-transition-old=""><!></div>'),Hp=x('<div tabindex="-1" aria-hidden="true"><div class="dialog svelte-wxwoko" data-view-transition-old=""><!> <!></div> <!> <!></div>');function Fp(t,e){re(e,!0),Ar("scope","popover");const n=e.bubble&&zm(ao.TopScrollFormat,1),i=B(()=>({duration:er.current?0:100,y:10}));let r=K(null),a=K(!1),o=K(!0),s=K(!1),c=K(0),u=K(0),f=K(0);lt(async()=>{await mr(),d(),await h(),e.append&&requestAnimationFrame(()=>{v(),h()}),await mr(),m()});function d(){if(!l(r))return;const{top:M,right:D,bottom:L,height:V}=l(r).getBoundingClientRect(),W=g();R(a,M-W<0&&window.innerHeight-L>M+V,!0);const z=window.innerWidth-D-W;D+W>window.innerWidth&&(l(r).style.left=`${z}px`)}function v(){R(o,l(c)>450)}async function h(){if(R(f,0),await new Promise(O=>requestAnimationFrame(O)),!l(r))return;const{top:M,height:D}=l(r).getBoundingClientRect(),L=g(),V=e.append?parseInt(window.getComputedStyle(l(r)).gap):0,W=l(o)?l(u)+V:0,z=l(a)?window.innerHeight-M-L-W:M+D-W-L;R(f,Math.min(z,window.innerHeight*.8),!0)}function g(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function m(){var W;if(!((W=l(r))!=null&&W.firstChild))return;const M=l(r).firstChild,{offsetHeight:D,scrollHeight:L,scrollTop:V}=M;L<=D?R(s,!1):R(s,V+D<L)}var p=Hp();let w,b;var T=C(p),S=C(T);nt(S,()=>e.children);var A=k(S,2);{var E=M=>{var D=Op(),L=C(D),V=C(L);Np(V),qe(3,D,()=>Ot,()=>({duration:100})),y(M,D)};Z(A,M=>{l(s)&&M(E)})}var P=k(T,2);{var q=M=>{var D=qp(),L=C(D);nt(L,()=>e.bubble),qe(7,D,()=>Si,()=>l(i)),y(M,D)};Z(P,M=>{e.bubble&&M(q)})}var F=k(P,2);{var j=M=>{var D=zp(),L=C(D);nt(L,()=>e.append),qe(7,D,()=>Si,()=>l(i)),At(D,"clientHeight",V=>R(u,V)),y(M,D)};Z(F,M=>{e.append&&l(o)&&M(j)})}$e(p,M=>R(r,M),()=>l(r)),G(()=>{w=_e(p,1,"popover svelte-wxwoko",null,w,{flip:l(a),inline:n,"has-bubble":!!e.bubble&&n}),b=rt(p,"",b,{"--max-height":l(f)?l(f)+"px":null})}),me("scroll",T,m),qe(7,T,()=>Si,()=>l(i)),At(p,"clientHeight",M=>R(c,M)),y(t,p),ae()}var Bp=x('<div class="injection-popover svelte-1laomht" data-playpilot-injection-popover="" role="region" aria-labelledby="heading"><!></div>');function Xo(t,e){re(e,!0);const n=d=>{var v=ke(),h=Q(v);{var g=m=>{nu(m,{get campaign(){return a}})};Z(h,m=>{a&&m(g)})}y(d,v)},i=d=>{var v=ke(),h=Q(v);{var g=m=>{oo(m,{get campaign(){return o},compact:!0})};Z(h,m=>{o&&m(g)})}y(d,v)},r=I(e,"type",3,"title");Ar("type",r());const a=di("top_scroll"),o=di("card");let s=K(null);r()==="title"&&ve(fe.InjectionPopoverView,e.data,{type:r()}),r()==="participant"&&ve(fe.InjectionPopoverView,null,{type:r(),participant:e.data.name}),gi()&&r()==="title"&&ln(Yt.TitleInterest,{title:e.data.title,source:Rn.Card}),lt(()=>{c();const d=Date.now();return()=>{const v=Date.now()-d;r()==="title"&&ve(fe.InjectionPopoverClose,e.data,{type:r(),time_spent:v}),r()==="participant"&&ve(fe.InjectionPopoverClose,null,{type:r(),participant:e.data.name,time_spent:v})}});function c(){const d=e.event.target;if(!(d!=null&&d.getClientRects))return;const v=Array.from(d.getClientRects()),g=v.map(p=>p.x).map(p=>Math.abs(p-e.event.clientX)),m=v[g.indexOf(Math.min(...g))];l(s).style.top=m.top+window.scrollY+"px",l(s).style.left=m.left+window.scrollX+"px",l(s).style.height=m.height+"px"}var u=Bp(),f=C(u);{let d=B(()=>o?i:null),v=B(()=>a?n:null);Fp(f,{get append(){return l(d)},get bubble(){return l(v)},children:(h,g)=>{var m=ke(),p=Q(m);{var w=T=>{Ma(T,{get title(){return e.data},small:!0})},b=T=>{iu(T,{get participant(){return e.data},small:!0})};Z(p,T=>{r()==="title"?T(w):r()==="participant"&&T(b,1)})}y(h,m)},$$slots:{default:!0}})}$e(u,d=>R(s,d),()=>l(s)),y(t,u),ae()}let fa=null,Bn=null;function Vp(t,e){if(window.matchMedia("(pointer: coarse)").matches)return;Bn&&La();const n=t.currentTarget;fa=n,setTimeout(()=>{if(fa!==n)return;const i=si();e.type==="title"?Bn=Nt(Xo,{target:i,props:{event:t,type:"title",data:e.title_details}}):e.type==="participant"&&(Bn=Nt(Xo,{target:i,props:{event:t,type:"participant",data:e.participant_details}}))},100)}async function La(t=!0){if(Bn){const e=Zn(Bn,{outro:t});fa=null,Bn=null,await e}document.querySelectorAll("[data-playpilot-injection-popover]").forEach(e=>e.remove())}function Wp(t){if(!Bn)return;const e=t.target;e.hasAttribute("data-playpilot-injection-popover")||e.closest("[data-playpilot-injection-popover]")||e.hasAttribute(En)||e.closest(Cn)||La()}function Up(){fa=null}function Gp(){return!!Bn}var Zp=x("<!> ",1),Kp=x('<div class="back svelte-29uorr"><!></div>'),Yp=x('<!> <div class="close svelte-29uorr"><!></div>',1);function Jp(t,e){re(e,!0);const n=I(e,"label",3,""),i=I(e,"onclose",3,()=>null);var r=Yp(),a=Q(r);{var o=u=>{var f=Kp(),d=C(f);Bt(d,{variant:"link",onclick:()=>{i()(),va()},children:(v,h)=>{var g=Zp(),m=Q(g);Ft(m,{direction:"left"});var p=k(m);G(()=>J(p,` ${n()??""}`)),y(v,g)},$$slots:{default:!0}}),y(u,f)};Z(a,u=>{n()&&u(o)})}var s=k(a,2),c=C(s);Vi(c,{size:"42px",onclick:()=>{i()(),va()},"aria-label":"Close",children:(u,f)=>{qr(u,{size:24})},$$slots:{default:!0}}),qe(7,s,()=>Xi),y(t,r),ae()}var Qp=new Set(["$$slots","$$events","$$legacy","items","initialIndex","onchange","onclose","each"]),Xp=x('<div class="ad svelte-c2erhr"><!></div>'),$p=x('<div class="content svelte-c2erhr"><!></div>'),e_=x("<div><!></div>"),t_=x('<button class="arrow left svelte-c2erhr" aria-label="Previous" aria-live="polite"><!></button>'),n_=x('<button class="arrow right svelte-c2erhr" aria-label="Next" aria-live="polite"><!></button>'),i_=x("<!> <!>",1),r_=x('<div><!></div> <div class="close svelte-c2erhr"><!></div>',1);function a_(t,e){re(e,!0);const n=m=>{var p=ke(),w=Q(p);{var b=T=>{var S=Xp(),A=C(S);oo(A,{get campaign(){return l(v)}}),y(T,S)};Z(w,T=>{l(v)&&T(b)})}y(m,p)},i=I(e,"initialIndex",3,0),r=I(e,"onchange",3,()=>null),a=I(e,"onclose",3,()=>null),o=Ji(e,Qp);let s,c=K(!1),u=Ne(er.current?0:300),f=K(null),d=K(null),v=K(Ne(di("card")));lt(()=>{g(),requestAnimationFrame(()=>{i()!==0&&(s==null||s.setIndex(i())),requestAnimationFrame(()=>{s==null||s.reposition(),R(c,!0)})})});function h(m){r()(m),s.setIndex(m)}function g(){if(!l(v)){R(f,null);return}const m=document.querySelector(".modal");R(f,window.innerHeight-(l(d).getBoundingClientRect().top+m.scrollTop+parseInt(window.getComputedStyle(m).paddingBottom)))}me("resize",Ie,g),me("updateads",Ie,()=>R(v,di("card"),!0)),Wi(t,Tn({blur:!0,get onclose(){return a()},get prepend(){return n}},()=>o,{dialog:p=>{var w=r_(),b=Q(w);let T,S;var A=C(b);{const q=(M,D)=>{let L=()=>(D==null?void 0:D()).currentIndex;var V=ke(),W=Q(V);ze(W,17,()=>e.items,Ue,(z,O,H)=>{const U=B(()=>L()===H);var Y=e_();let $;var ne=C(Y);{var ue=ye=>{var be=$p(),Te=C(be);nt(Te,()=>e.each,()=>l(O),L),G(()=>le(be,"data-modal-scroll-target",l(U)?"":null)),qe(3,be,()=>Ot,()=>({duration:l(c)?u:0})),y(ye,be)},de=B(()=>Math.abs(H-L())===1||l(U));Z(ne,ye=>{l(de)&&ye(ue)})}G(()=>{$=_e(Y,1,"item svelte-c2erhr",null,$,{active:l(U)}),le(Y,"data-active-index",l(U)?H:null)}),te("click",Y,()=>h(H)),y(z,Y)}),y(M,V)},F=(M,D)=>{let L=()=>(D==null?void 0:D()).currentIndex,V=()=>(D==null?void 0:D()).reachedEnd;var W=i_(),z=Q(W);{var O=Y=>{var $=t_(),ne=C($);Ft(ne,{size:21,direction:"left",title:"Previous"}),te("click",$,()=>h(L()-1)),y(Y,$)};Z(z,Y=>{L()>0&&Y(O)})}var H=k(z,2);{var U=Y=>{var $=n_(),ne=C($);Ft(ne,{size:21,title:"Next"}),te("click",$,()=>h(L()+1)),y(Y,$)};Z(H,Y=>{V()||Y(U)})}y(M,W)};let j=B(()=>l(c)?u:0);$e(Uc(A,{threshold:40,moveThreshold:40,get transitionDuration(){return l(j)},children:q,controls:F,$$slots:{default:!0,controls:!0}}),M=>s=M,()=>s)}$e(b,q=>R(d,q),()=>l(d));var E=k(b,2),P=C(E);{let q=B(()=>window.location.href.includes("route=modal")?se("Explore All Movies And Shows"):"");Jp(P,{get onclose(){return a()},get label(){return l(q)}})}G(()=>{T=_e(b,1,"rail-modal svelte-c2erhr",null,T,{initialized:l(c)}),S=rt(b,"",S,{"--transition-duration":`${u}ms`,"--available-height":l(f)&&l(f)+"px"})}),y(p,w)},$$slots:{dialog:!0}})),ae()}Se(["click"]);var l_=new Set(["$$slots","$$events","$$legacy","titles","initialIndex","onclose"]);function o_(t,e){re(e,!0);const n=I(e,"initialIndex",3,0),i=I(e,"onclose",3,()=>null),r=Ji(e,l_);a_(t,Tn({get items(){return e.titles},get initialIndex(){return n()},get onclose(){return i()},onchange:o=>ve(fe.ExploreTitleRailSetIndex,e.titles[o],{index:o})},()=>r,{each:(o,s=Pt,c=Pt)=>{{let u=B(()=>{var f;return s().sid===((f=e.titles[c()])==null?void 0:f.sid)});Ma(o,{get title(){return s()},get useVideoBackground(){return l(u)}})}},$$slots:{each:!0}})),ae()}const ct=[];function Yn({type:t="title",event:e=null,injection:n=null,data:i=null,scrollPosition:r=0,returnToTitle:a=null,props:o={}}={}){if(e&&Dc(e))return;e==null||e.preventDefault(),ct!=null&&ct.length&&so();const s=si(),c={initialScrollPosition:r,...o},u=s_({type:t,target:s,data:i,props:c});a&&$o({type:t,injection:n,data:a}),$o({type:t,injection:n,data:i,scrollPosition:r,component:u})}function s_({type:t="title",target:e,data:n,props:i={}}){return t==="participant"?Nt(jp,{target:e,props:{participant:n,...i}}):t==="titles-rail"?Nt(o_,{target:e,props:{titles:n,...i}}):Nt(Pp,{target:e,props:{title:n,...i}})}function $o({type:t="title",injection:e=null,data:n,scrollPosition:i=0,component:r}){ct.push({type:t,injection:e,data:n,scrollPosition:i,component:r})}function so(t=!0){ct.length&&(d_(),Zn(ct[ct.length-1].component,{outro:t}))}function c_(t=!0){so(t),ct.pop()}function va(t=!0){for(so(t);ct.length>0;)ct.pop()}function es(){return ct[ct.length-2]||null}function u_(){if(ct.length<2)return;c_();const t=ct.pop();t&&Yn({...t})}function d_(){var n;const t=window.innerWidth>Un?".modal":".dialog",e=si().querySelector("[data-modal-scroll-target]")||si().querySelector(t);e!=null&&e.scrollTop&&(ct[ct.length-1].scrollPosition=e.scrollTop,ct[ct.length-1].props={initialIndex:parseInt(((n=si().querySelector("[data-active-index]"))==null?void 0:n.dataset.activeIndex)||"0")})}function f_(t,e){if(Dc(t))return;let n=t.target;if(!n||(n.hasAttribute(En)||(n=n.closest(Cn)),!n))return;const i=n.getAttribute(En);if(!i)return;const r=e.find(a=>i===a.key);r&&(t.preventDefault(),Dp(()=>{const a=r.title_details||r.participant_details;La(!1),Yn({event:t,injection:r,data:a,type:r.type})},!er.current&&window.innerWidth>=Un&&!window.matchMedia("(pointer: coarse)").matches))}var v_=x(' <span class="svelte-1to4glm"><button class="svelte-1to4glm"> </button></span>',1),h_=x('<!> <a target="_blank"> </a>',1),g_=x(" <!>.",1),m_=x("<!> <br/>",1),p_=x(" <br/>",1),__=x('<span class="svelte-1to4glm"><!></span>'),y_=x('<p class="svelte-1to4glm"></p>');function w_(t,e){re(e,!0);const n=I(e,"onclickmodal",3,()=>null);function i(c,u){ve(fe.AfterArticlePlaylinkClick,c,{playlink:u})}function r(c,u,f){ve(fe.AfterArticleModalButtonClick,u),n()(c,f)}var a=ke(),o=Q(a);{var s=c=>{var u=y_();ze(u,21,()=>e.linkInjections,Ue,(f,d)=>{const v=B(()=>l(d)),h=B(()=>{var b;return((b=l(v).title_details)==null?void 0:b.providers)||[]});var g=__(),m=C(g);{var p=b=>{var T=m_(),S=Q(T);{var A=P=>{var q=v_(),F=Q(q),j=k(F),M=C(j),D=oe(M,!0);G((L,V)=>{J(F,`"${l(v).title??""}" ${L??""} `),J(D,V)},[()=>se("Is Available To Stream"),()=>se("View Streaming Options")]),te("click",j,L=>L.stopPropagation()),te("click",M,L=>r(L,l(v).title_details,l(d))),y(P,q)},E=P=>{var q=g_(),F=Q(q),j=k(F);ze(j,17,()=>l(h),Ue,(M,D,L)=>{let V=()=>l(D).name,W=()=>l(D).url;var z=h_(),O=Q(z);{var H=$=>{var ne=Xe();G(ue=>J(ne,ue),[()=>L===l(h).length-1?`, ${se("And")}`:","]),y($,ne)};Z(O,$=>{L&&$(H)})}var U=k(O,2),Y=oe(U,!0);G(()=>{le(U,"href",W()),J(Y,V())}),te("click",U,()=>i(l(v).title_details,V())),y(M,z)}),G(M=>J(F,`"${l(v).title??""}" ${M??""} `),[()=>se("Is Available To Stream On")]),y(P,q)};Z(S,P=>{l(v).after_article_style==="modal_button"?P(A):P(E,-1)})}y(b,T)},w=b=>{var T=p_(),S=Q(T);G(A=>J(S,`"${l(v).title??""}" ${A??""} `),[()=>se("Title Unavailable Suffix")]),y(b,T)};Z(m,b=>{l(h).length?b(p):b(w,-1)})}G(()=>le(g,"data-playpilot-injection-key",l(v).key)),y(f,g)}),y(c,u)};Z(o,c=>{e.linkInjections.length&&c(s)})}y(t,a),ae()}Se(["click"]);let ur=null;function b_(t,e){var o,s;if(ur||!e.length)return;const n=document.createElement("div"),i=(o=window.PlayPilotLinkInjections)==null?void 0:o.after_article_selector,r=(i?document.querySelector(i):null)||t[t.length-1],a=((s=window.PlayPilotLinkInjections)==null?void 0:s.after_article_insert_position)||"afterend";n.dataset.playpilotAfterArticlePlaylinks="true",r.insertAdjacentElement(a,n),ur=Nt(w_,{target:n,props:{linkInjections:e,onclickmodal:(c,u)=>Yn({event:c,injection:u,data:u.title_details})}})}function k_(){var t;ur&&(Zn(ur),(t=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||t.remove(),ur=null)}var x_=x('<p class="svelte-1epbbn0"> </p>');function S_(t,e){re(e,!1),Wl();var n=x_(),i=oe(n,!0);G(r=>J(i,r),[()=>{var r,a;return((a=(r=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:r.config)==null?void 0:a.in_text_disclaimer_text)||se("In-Text Disclaimer")}]),y(t,n),ae()}let dr=null;function T_(t){if(!Je("in_text_disclaimer_enabled")||dr)return;const e=document.createElement("div"),n=Je("in_text_disclaimer_selector"),i=(n?document.querySelector(n):null)||t[0],r=Je("in_text_disclaimer_insert_position")||"beforebegin";e.dataset.playpilotInTextDisclaimer="true",i.insertAdjacentElement(r,e),dr=Nt(S_,{target:e})}function E_(){var t;dr&&(Zn(dr),(t=document.querySelector("[data-playpilot-in-text-disclaimer]"))==null||t.remove(),dr=null)}var P_=x('<div class="widget svelte-l6zazf" data-testid="widget"><!></div>');function I_(t,e){re(e,!0);let n=K(null);const i=B(()=>{var c,u;return((u=(c=l(n))==null?void 0:c.parentNode)==null?void 0:u.dataset.heading)||se("Mentioned In This Article")}),r=B(()=>{const c=[];return e.linkInjections.forEach(u=>{const f=u.title_details;f&&(c.some(d=>d.sid===f.sid)||c.push(f))}),c});var a=ke(),o=Q(a);{var s=c=>{var u=P_(),f=C(u);{let d=B(()=>!!Je("open_tpi_links_in_explore"));_r(f,{get titles(){return l(r)},get heading(){return l(i)},get navigateToExplore(){return l(d)},onclick:v=>ve(fe.WidgetArticleRailTitleClick,v)})}$e(u,d=>R(n,d),()=>l(n)),y(c,u)};Z(o,c=>{l(r).length&&c(s)})}y(t,a),ae()}const C_={"tpi-rail":I_},A_="[data-playpilot-widget]";let xl=[];function M_(t){if(ru(),!t.length)return;document.querySelectorAll(A_).forEach(n=>{const i=n.dataset.playpilotWidget||"",r=C_[i];if(!r)return;const a=Nt(r,{target:n,props:{linkInjections:t}});xl.push(a)})}function ru(){xl.forEach(t=>Zn(t)),document.querySelectorAll("[data-playpilot-widget]").forEach(t=>t.innerHTML=""),xl=[]}const En="data-playpilot-injection-key",Cn=`[${En}]`;function L_(t,e={aiInjections:[],manualInjections:[]}){co(),q_();const n=z_(e);if(!n.length)return[];const i=yt(t.map(d=>d.innerText).join(" ")),r=Vf(window.PlayPilotLinkInjections.config||{}),o=H_(n).filter(d=>i.includes(yt(d.sentence))),{injections:s,failedMessages:c}=B_(o);let u=-1;for(const d of V_(s)){if(u++,!d.manual&&d.type==="participant"){if(r){c[d.key]="Participants are excluded from this URL.";continue}if(!U_(n,d.participant_details)){c[d.key]="Participant does not meet popularity threshold.";continue}}const v=t.findIndex(E=>yt(E.innerText).includes(yt(d.sentence))),h=t[v];if(!h)continue;const g=No(d.title,h,["A"]);if(!(g!=null&&g.nodeValue)||Oo(g)){const E=No(d.title,h);if(E&&Oo(E)){c[d.key]="Given text is already inside of a link.";continue}}const{injectionElement:m,linkElement:p}=j_(d);let w=-1,b=!1;ca(h.innerHTML,d.title)===1&&(w=h.innerHTML.indexOf(d.title));const{phrase_before:S,phrase_after:A}=D_(h,d);if(w===-1&&(S||A)){const E=[S,d.title,A].filter(Boolean).join(" ");if(w=h.innerHTML.indexOf(E),w===-1){let P=Qf(h.innerHTML,d.title,S||"",A||"");if(P){if(P.match.includes(">")&&P.match.includes("<")){const D=Mc(d.title),L=P.match.search(new RegExp(`>s*${D}s*<`))+1;L>0&&(P={match:P.match.slice(L,L+D.length),index:L})}const{leadingSpaces:q,trailingSpaces:F}=Xf(P.match);p.innerHTML=P.match.trim();const j=P.index+q,M=P.index+P.match.length-F;if(h.innerHTML.slice(j,M).includes("href="))continue;$a(h.innerHTML,d.title,h,m,j,M)&&(w=P.index,b=!0)}}}if(w===-1&&(g!=null&&g.nodeValue)){const E=h.innerHTML.indexOf(g.nodeValue),P=h.innerHTML.indexOf(d.sentence),q=P===-1?h.innerHTML.indexOf(d.sentence.slice(0,20)):-1,F=d.sentence.split(" ")[0],M=ca(h.innerHTML,F)===1?h.innerHTML.indexOf(F):-1,D=Gf(o.slice(0,u+1),d,["title","sentence"])-1,L=$f(g.nodeValue,h,D);w=Math.max(E,q,L,M,P,0)}if(w!==-1&&!b&&!$a(h.innerHTML,d.title,h,m,w)){const E=tv(d.title,h.innerHTML);E>-1?$a(h.innerHTML,d.title,h,m,E):c[d.key]="Injection would have lead to broken HTML."}}N_(o),R_();const f=F_(n);return f.length&&b_(t,f),document.querySelector(Cn)&&T_(t),M_(o),n.filter(d=>cu(d)).map((d,v)=>{const h=!d.manual&&W_(d,v,n),g=d.duplicate??h;g&&(c[d.key]=h?"Injection was manually removed.":"Injection was marked as duplicate.");const m=document.querySelector(`[${En}="${d.key}"]`),p=ja(d)&&!d.inactive&&!d.removed&&!d.after_article&&!m,w=p&&t.some(T=>yt(T.innerText).includes(yt(d.sentence))),b=p?c[d.key]||(w?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...d,inactive:d.inactive??!1,duplicate:g,failed:p,failed_message:b,matchingElement:m}})}function j_(t){var o,s,c;const e=document.createElement("span");e.dataset.playpilotInjectionKey=t.key,e.dataset.playpilotInjectionType=t.type;const n=!!Je("open_tpi_links_in_explore"),i=((o=t.title_details)==null?void 0:o.sid)||((s=t.participant_details)==null?void 0:s.sid),r=n?to(i):t.type==="title"?Ca(t.title_details):eo(t.participant_details),a=document.createElement("a");return a.innerText=t.title,a.href=r,a.target=n?"":"_blank",a.rel="noopener nofollow noreferrer",t.type==="title"&&(a.dataset.playpilotPosterUrl=(c=t.title_details)==null?void 0:c.standing_poster),e.insertAdjacentElement("beforeend",a),{injectionElement:e,linkElement:a}}function $a(t,e,n,i,r,a=-1){const o=f=>Array.from(f.querySelectorAll(`a, ${Cn}`)).filter(d=>!d.innerText).length,s=document.createElement("div");s.innerHTML=t;const c=o(s),u=s.innerText;return a>0?s.innerHTML=Yf(t,i.outerHTML,r,a):s.innerHTML=Kf(t,e,i.outerHTML,r),Math.abs(s.innerText.length-u.length)>1||c!=o(s)?!1:(n.innerHTML=s.innerHTML,!0)}function D_(t,e){const{phrase_before:n,phrase_after:i}=e;if(n||i)return{phrase_before:n,phrase_after:i};if(ca(t.innerText,e.title)!==1)return{phrase_before:null,phrase_after:null};const a=t.innerText.indexOf(e.title),o=jc(t,a,a+e.title.length);return{phrase_before:o.before,phrase_after:o.after}}function R_(){const t=Array.from(document.querySelectorAll(`${Cn} a`)),e=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-font-weight-headings","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];for(const n of t){const i=getComputedStyle(n);for(const r of e)i.getPropertyValue(r)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${r}`)}}function N_(t){window.addEventListener("mousemove",Wp),window.addEventListener("click",n=>{Je("open_tpi_links_in_explore")||f_(n,t)}),document.querySelectorAll(Cn).forEach(n=>{const i=n.dataset.playpilotInjectionKey,r=t.find(a=>i===a.key);r&&(n.addEventListener("mouseenter",a=>{Gp()||Vp(a,r)}),n.addEventListener("mouseleave",Up))})}function co(){const t=document.querySelectorAll(Cn);t.forEach(e=>O_(e.getAttribute(En)||"")),k_(),E_(),ru(),t.length&&(va(!1),La(!1))}function O_(t){var r;const e=document.querySelector(`[${En}="${t}"]`);if(!e)return;e.querySelectorAll("[data-playpilot-element]").forEach(a=>a.remove());const i=(r=e.querySelector("a"))==null?void 0:r.innerHTML;e.outerHTML=i||""}function q_(){document.querySelectorAll('a[href*="playpilot.com"]').forEach(e=>{e.closest(Cn)||/\/movie|show\//.test(e.href)&&(e.outerHTML=e.innerHTML)})}function z_({aiInjections:t,manualInjections:e}){return[...e.map(n=>({...n,manual:!0})),...t]}function au(t){return{aiInjections:t.filter(e=>!e.manual),manualInjections:t.filter(e=>e.manual)}}function lu(t){return!t.inactive&&!t.removed&&!t.duplicate&&cu(t)&&ja(t)}function ja(t){return t.in_text||t.in_text===void 0?!0:!!t.after_article}function H_(t){return ou(t).filter(e=>e.in_text!==!1&&lu(e))}function F_(t){return ou(t).filter(e=>e.after_article===!0&&lu(e))}function ou(t){return t.filter(e=>e.removed||e.inactive?!1:e.manual&&!e.removed&&!e.inactive?!0:!t.some(n=>n.manual&&(n.removed||n.inactive)&&su(n,e)))}function B_(t){const e=[],n={},i={};let r=0;for(const a of t){if(!a.manual){const o=i[a.sid]||0,s=Je("unique_injection_count_limit"),c=Je("total_participant_injection_count_limit"),u=s&&o>=s,f=a.type==="participant"&&c&&r>=c;if(u||f){n[a.key]=`Injection was withheld because it exceeded the maximum ${u?"unique":"total"} count.`;continue}else i[a.sid]=o+1,a.type==="participant"&&r++}e.push(a)}return{injections:e,failedMessages:n}}function V_(t){return t.slice().sort((e,n)=>{if(e.sentence<n.sentence)return-1;if(e.sentence>n.sentence)return 1;const i=n.title.length-e.title.length;return i!==0?i:0})}function W_(t,e,n){return n.some((i,r)=>e!==r&&i.manual&&su(i,t))}function su(t,e){return t.title===e.title&&yt(t.sentence)===yt(e.sentence)}function cu(t){return!!(t.type==="title"&&t.title_details||t.type==="participant"&&t.participant_details)}function si(){return document.querySelector("[data-playpilot-link-injections]")||document.body}function U_(t,e){if(e.popularity===null||e.popularity===void 0)return!0;const n=Je("participant_injection_popularity_threshold_use_article_average")??!0,a=Je("participant_injection_popularity_threshold")??0;if(a===0)return!0;if(!n)return e.popularity>=a;const o=t.filter(s=>s.type==="participant").reduce((s,{participant_details:c},u,{length:f})=>s+(c.popularity||0)/f,0);return e.popularity>=o*(a/100)}var G_=Ge('<svg width="8" height="4" viewBox="0 0 8 4" fill="none"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Z_(t,e){const n=I(e,"expanded",3,!1);var i=G_();let r;G(()=>r=_e(i,0,"svelte-abbsts",null,r,{expanded:n()})),y(t,i)}var K_=Ge('<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 Y_(t){var e=K_();y(t,e)}var J_=x('<button><div class="label svelte-1201akx"><!></div> <div class="track svelte-1201akx"><div class="knob svelte-1201akx"></div></div></button>');function Sl(t,e){re(e,!0);let n=I(e,"active",15),i=I(e,"fullwidth",3,!1),r=I(e,"label",3,""),a=I(e,"onclick",3,()=>null);function o(){n(!n()),a()(n())}var s=J_();let c;var u=C(s),f=C(u);nt(f,()=>e.children),G(()=>{c=_e(s,1,"switch svelte-1201akx",null,c,{active:n(),fullwidth:i()}),le(s,"aria-label",`Toggle ${r()??""} ${n()?"off":"on"}`)}),te("click",s,o),y(t,s),ae()}Se(["click"]);var Q_=x('<input type="text" autocomplete="off" class="svelte-v3h1om"/>');function uo(t,e){re(e,!0);let n=I(e,"value",15),i=I(e,"label",3,""),r=I(e,"name",3,""),a=I(e,"readonly",3,!1),o=I(e,"oninput",3,()=>null);var s=Q_();G(()=>{le(s,"name",r()),le(s,"aria-label",i()),le(s,"placeholder",i()),s.readOnly=a()}),te("input",s,function(...c){var u;(u=o())==null||u.apply(this,c)}),ui(s,n),y(t,s),ae()}Se(["input"]);var X_=Ge('<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>'),$_=Ge('<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>'),e1=Ge('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function ts(t,e){const n=I(e,"align",3,"bottom");var i=e1(),r=C(i);{var a=s=>{var c=X_();y(s,c)},o=s=>{var c=$_();y(s,c)};Z(r,s=>{n()==="bottom"?s(a):n()==="center"&&s(o,1)})}y(t,i)}var t1=x("<div><!></div>");function fi(t,e){const n=I(e,"type",3,"error"),i=I(e,"fixed",3,!1);var r=t1();let a;var o=C(r);nt(o,()=>e.children),G(()=>a=_e(r,1,`alert ${n()??""}`,"svelte-1v44877",a,{fixed:i()})),y(t,r)}var n1=x("<!> In-text Playlink",1),i1=x("<!> Bottom Playlink",1),r1=x('<div class="alert svelte-1fv3ko3"><!></div>'),a1=x('<div><div class="label svelte-1fv3ko3">Bottom playlinks style</div> <div class="group svelte-1fv3ko3" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text">Playlinks sentence</button> <button role="option" id="playlinks-after-article">Modal button</button> <div></div></div></div>'),l1=x('<div class="switches svelte-1fv3ko3"><!> <!></div> <!> <!>',1);function o1(t,e){re(e,!0);const n=I(e,"linkInjection",7),i=B(()=>n().after_article_style==="modal_button");var r=l1(),a=Q(r),o=C(a);{let h=B(()=>n().in_text??!0);Sl(o,{fullwidth:!0,get active(){return l(h)},onclick:g=>{n().in_text=g,n().manual=!0},label:"In-text Playlink",children:(g,m)=>{var p=n1(),w=Q(p);ts(w,{align:"center"}),y(g,p)},$$slots:{default:!0}})}var s=k(o,2);{let h=B(()=>n().after_article??!1);Sl(s,{fullwidth:!0,get active(){return l(h)},onclick:g=>{n().after_article=g,n().manual=!0},label:"Bottom Playlink",children:(g,m)=>{var p=i1(),w=Q(p);ts(w,{align:"bottom"}),y(g,p)},$$slots:{default:!0}})}var c=k(a,2);{var u=h=>{var g=r1(),m=C(g);fi(m,{type:"warning",children:(p,w)=>{var b=Xe("At least one layout option must be selected for the playlink to be visible.");y(p,b)},$$slots:{default:!0}}),qe(3,g,()=>pr,()=>({duration:200})),y(h,g)},f=B(()=>!ja(n()));Z(c,h=>{l(f)&&h(u)})}var d=k(c,2);{var v=h=>{var g=a1(),m=k(C(g),2),p=C(m);let w;var b=k(p,2);let T;var S=k(b,2);let A;G(()=>{le(m,"aria-activedescendant",`playlinks-${l(i)?"after-article":"in-text"}`),le(p,"aria-selected",!l(i)||null),w=_e(p,1,"svelte-1fv3ko3",null,w,{active:!l(i)}),le(b,"aria-selected",l(i)||null),T=_e(b,1,"svelte-1fv3ko3",null,T,{active:l(i)}),A=_e(S,1,"active-marker svelte-1fv3ko3",null,A,{right:l(i)})}),te("click",p,()=>n().after_article_style="playlinks"),te("click",b,()=>n().after_article_style="modal_button"),qe(3,g,()=>pr,()=>({duration:100})),y(h,g)};Z(d,h=>{n().after_article&&h(v)})}y(t,r),ae()}Se(["click"]);var s1=x('<option class="svelte-1yg5wso"> </option>'),c1=x('<div class="sent svelte-1yg5wso">Report has been sent, thank you! Closing window...</div>'),u1=x('<button class="submit svelte-1yg5wso">Send report</button>'),d1=x('<div class="form svelte-1yg5wso"><div class="heading svelte-1yg5wso">Report issue</div> <div class="info svelte-1yg5wso"><div><strong class="svelte-1yg5wso">Title</strong> </div> <div><strong class="svelte-1yg5wso">Sentence</strong> </div></div> <label for="reason">What would you like to report?</label> <select id="reason" name="reason" class="svelte-1yg5wso"><option class="svelte-1yg5wso">Select an issue...</option><!></select> <div><!></div></div>');function f1(t,e){re(e,!0);const n=[{value:"failed_injection",label:"The link failed to appear on the page."},{value:"layout_issue",label:"The link is breaking the layout or formatting of my page."},{value:"wrong_content",label:"The link points to the wrong movie or show."},{value:"inappropriate_title",label:"The link points to an inappropriate movie or show."},{value:"broken_link",label:"The link is broken or leads to an error page."},{value:"other",label:"My issue is not listed, but please have a look regardless."}];let i=K(""),r=K(!1);function a(){var o,s;l(i)&&(ve(fe.ManualReport,e.linkInjection.title_details,{report_reason:l(i),sid:e.linkInjection.sid,title:e.linkInjection.title,sentence:e.linkInjection.sentence,failed:(o=e.linkInjection.failed)==null?void 0:o.toString(),failed_message:e.linkInjection.failed_message,manual:(s=e.linkInjection.manual)==null?void 0:s.toString()}),R(r,!0),setTimeout(e.onclose,3e3))}Wi(t,{get onclose(){return e.onclose},children:(o,s)=>{var c=d1(),u=C(c);bt(u,(E,P)=>Re==null?void 0:Re(E,P),()=>2);var f=k(u,2),d=C(f),v=k(C(d)),h=k(d,2),g=k(C(h)),m=k(f,4),p=C(m);p.value=p.__value="";var w=k(p);ze(w,17,()=>n,Ue,(E,P)=>{let q=()=>l(P).value,F=()=>l(P).label;var j=s1(),M=oe(j,!0),D={};G(()=>{J(M,F()),D!==(D=q())&&(j.value=(j.__value=D)??"")}),te("click",j,()=>R(i,q(),!0)),y(E,j)}),gc(m);var b=k(m,2),T=C(b);{var S=E=>{var P=c1();qe(1,P,()=>Ot,()=>({duration:200})),y(E,P)},A=E=>{var P=u1();G(()=>P.disabled=!l(i)),te("click",P,a),y(E,P)};Z(T,E=>{l(r)?E(S):E(A,-1)})}G(E=>{J(v,`: ${e.linkInjection.title??""}`),J(g,`:
|
|
11
|
+
${E??""}`)},[()=>Lc(e.linkInjection.sentence,e.linkInjection.title,100)]),mf(m,()=>l(i),E=>R(i,E)),y(o,c)},$$slots:{default:!0}}),ae()}Se(["click"]);var v1=x('<img class="poster svelte-tlh9c3" alt="" width="32" height="48"/>'),h1=x('<img class="poster participant svelte-tlh9c3" alt="" width="32" height="32"/>'),g1=x('<div class="placeholder-image svelte-tlh9c3"></div>'),m1=x('<button class="expand-sentence svelte-tlh9c3"> </button>'),p1=x('<button class="context-menu-action svelte-tlh9c3">Remove</button> <button class="context-menu-action svelte-tlh9c3">Report issue</button>',1),_1=x('<button class="expand svelte-tlh9c3" aria-label="Expand"><!></button>'),y1=x("<div></div>"),w1=x('<div class="warning svelte-tlh9c3" aria-label="Invalid playlink settings"><!></div>'),b1=x('<div class="actions svelte-tlh9c3"><!> <!> <!></div>'),k1=x('<div class="expanded svelte-tlh9c3"><div class="label svelte-tlh9c3">Link URL</div> <!> <div class="label offset svelte-tlh9c3">Layout options</div> <div class="type-select svelte-tlh9c3"><!></div></div>'),x1=x('<div><div class="header svelte-tlh9c3"><!> <div class="info svelte-tlh9c3"><div class="title svelte-tlh9c3"> </div> <div class="sentence svelte-tlh9c3"><!> <!></div></div> <div class="context-menu svelte-tlh9c3"><!></div></div> <div class="content svelte-tlh9c3"><!> <!></div></div>');function S1(t,e){re(e,!0);const n=I(e,"linkInjection",15),i=I(e,"onremove",3,()=>null),r=I(e,"onhighlight",3,()=>null),a=B(()=>n()||{}),o=B(()=>l(a).key),s=B(()=>l(a).type),c=B(()=>l(a).sentence),u=B(()=>l(a).title_details),f=B(()=>l(a).participant_details),d=B(()=>l(a).failed),v=B(()=>l(a).failed_message),h=B(()=>l(a).inactive),g=B(()=>Lc(n().sentence,n().title,60));let m=K(!1),p=K(!1),w=K(!1),b=K(null);lt(()=>{l(d)&&ve(fe.InjectionFailed,l(s)==="title"?l(u):null,{phrase:n().title,sentence:l(c)})});function T(X=!0){E().forEach(ce=>{ce.classList.toggle("playpilot-injection-highlight",X)})}function S(X){let ee=X.target,ce=ee==null?void 0:ee.dataset.playpilotInjectionKey;ee&&!ce&&(ee=ee.closest(`[data-playpilot-injection-key="${l(o)}"]`),ce=ee==null?void 0:ee.dataset.playpilotInjectionKey),R(w,ce===l(o)),l(b)&&l(w)&&r()(l(b))}function A(X){requestAnimationFrame(()=>T());const ee=X.target;if(["BUTTON","INPUT"].includes(ee.nodeName)||ee.closest("button")||ee.closest("input"))return;const ce=E()[0];ce&&ce.scrollIntoView({behavior:"smooth"})}function E(){const X=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${l(o).toString()}"]`));return X.length?X:Zl(Fi()).filter(ee=>yt(ee.innerText).includes(yt(n().sentence)))||[]}function P(){const X=Nt(f1,{target:document.body,props:{linkInjection:n(),onclose:()=>Zn(X)}})}var q=x1();me("mouseover",Ie,S);let F;var j=C(q),M=C(j);{var D=X=>{var ee=v1();G(ce=>le(ee,"src",ce),[()=>$i(l(u).standing_poster)]),me("error",ee,({target:ce})=>ce.src=Hi),y(X,ee)},L=X=>{var ee=h1();G(()=>le(ee,"src",l(f).image)),me("error",ee,({target:ce})=>ce.src=Hi),y(X,ee)},V=X=>{var ee=g1();y(X,ee)};Z(M,X=>{l(s)==="title"?X(D):l(s)==="participant"?X(L,1):X(V,-1)})}var W=k(M,2),z=C(W),O=oe(z,!0),H=k(z,2),U=C(H);sc(U,()=>(l(p)?l(c):l(g)).replace(n().title,`<em>${n().title}</em>`));var Y=k(U,2);{var $=X=>{var ee=m1(),ce=oe(ee,!0);G(()=>J(ce,l(p)?"Less":"More")),te("click",ee,()=>R(p,!l(p))),y(X,ee)};Z(Y,X=>{l(g).length<l(c).length&&X($)})}var ne=k(W,2),ue=C(ne);$c(ue,{label:"More options",children:(X,ee)=>{var ce=p1(),Le=Q(ce),He=k(Le,2);te("click",Le,function(...he){var Ae;(Ae=i())==null||Ae.apply(this,he)}),te("click",He,P),y(X,ce)},$$slots:{default:!0}});var de=k(j,2),ye=C(de);{var be=X=>{fi(X,{children:(ee,ce)=>{var Le=Xe();G(()=>J(Le,l(v))),y(ee,Le)},$$slots:{default:!0}})},Te=X=>{var ee=b1(),ce=C(ee);{var Le=Ke=>{var ie=_1(),pe=C(ie);Z_(pe,{get expanded(){return l(m)}}),G(()=>le(ie,"aria-expanded",l(m))),te("click",ie,()=>R(m,!l(m))),y(Ke,ie)},He=Ke=>{var ie=y1();y(Ke,ie)};Z(ce,Ke=>{l(s)==="title"?Ke(Le):Ke(He,-1)})}var he=k(ce,2);{var Ae=Ke=>{var ie=w1(),pe=C(ie);Y_(pe),qe(3,ie,()=>Ot,()=>({duration:100})),y(Ke,ie)},Ve=B(()=>!ja(n()));Z(he,Ke=>{l(Ve)&&Ke(Ae)})}var st=k(he,2);{let Ke=B(()=>l(h)?"Inactive":"Visible"),ie=B(()=>!n().inactive);Sl(st,{get label(){return l(Ke)},get active(){return l(ie)},onclick:pe=>{n(n().inactive=!pe,!0),n(n().manual=!0,!0)},children:(pe,Ce)=>{var We=Xe();G(()=>J(We,l(h)?"Inactive":"Visible")),y(pe,We)},$$slots:{default:!0}})}y(X,ee)};Z(ye,X=>{l(d)?X(be):X(Te,-1)})}var Fe=k(ye,2);{var Be=X=>{var ee=k1(),ce=k(C(ee),2);uo(ce,{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 Le=k(ce,4),He=C(Le);o1(He,{get linkInjection(){return n()}}),qe(3,ee,()=>pr,()=>({duration:100})),y(X,ee)};Z(Fe,X=>{l(m)&&X(Be)})}$e(q,X=>R(b,X),()=>l(b)),G(()=>{var X,ee;F=_e(q,1,"item svelte-tlh9c3",null,F,{highlighted:l(w),inactive:l(h)}),J(O,((X=l(u))==null?void 0:X.title)||((ee=l(f))==null?void 0:ee.name))}),me("mouseenter",q,()=>T(!0)),me("mouseleave",q,()=>T(!1)),te("click",q,A),qe(6,q,()=>pr,()=>({duration:200})),y(t,q),ae()}Se(["click"]);var T1=x('<button class="drag-handle svelte-1fk5ijl" aria-label="Move editor"></button>');function E1(t,e){re(e,!0);let n=I(e,"element",7),i=I(e,"position",23,()=>({x:0,y:0})),r=I(e,"limit",19,()=>({x:0,y:0})),a=I(e,"onchange",3,()=>null),o=!1,s={x:0,y:0},c=i();lt(()=>{u(i().x,i().y)});function u(m,p){const w=window.innerWidth,b=window.innerHeight,T=n().clientWidth,S=n().clientHeight;m=Math.min(Math.max(m,r().x),w-T-r().x),p=Math.min(Math.max(p,r().y),b-S-r().y),n().style.right=m+"px",n().style.bottom=Math.max(p,r().y)+"px",i({x:m,y:p}),a()(i())}function f(m){var p,w;return{x:m.pageX||((p=m.touches)==null?void 0:p[0].pageX)||0,y:m.pageY||((w=m.touches)==null?void 0:w[0].pageY)||0}}function d(m){o=!0,s=f(m),c=i()}function v(m){if(!o)return;const p=f(m),w=p.x-s.x,b=p.y-s.y,T=c.x-w,S=c.y-b;u(T,S)}function h(){o&&(o=!1)}var g=T1();me("mousemove",Ie,v),me("touchmove",Ie,v,void 0,!0),me("mouseup",Ie,h),me("touchend",Ie,h),me("resize",Ie,()=>u(i().x,i().y)),te("mousedown",g,d),te("touchstart",g,d),y(t,g),ae()}Se(["mousedown","touchstart"]);var P1=x('<button class="resize-handle svelte-iir57j" aria-label="Move editor"></button>');function I1(t,e){re(e,!0);let n=I(e,"element",7),i=I(e,"height",7,200),r=I(e,"onchange",3,()=>null);const a=16;let o=!1,s=0,c=i();lt(()=>{i()&&u(i())});function u(m){const p=window.getComputedStyle(n()).minHeight||"0",w=Math.max(parseInt(p),Math.min(m,h()));n().style.height=`${w}px`,i(w),r()(w)}function f(m){var p,w;o=!0,s=m.pageY||((w=(p=m.touches)==null?void 0:p[0])==null?void 0:w.pageY)||0,c=n().clientHeight}function d(m){var T,S;if(!o)return;const p=m.pageY||((S=(T=m.touches)==null?void 0:T[0])==null?void 0:S.pageY)||0,w=s-p,b=c+w;u(b)}function v(){o=!1}function h(){const m=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-m,0)}var g=P1();me("mousemove",Ie,d),me("touchmove",Ie,d,void 0,!0),me("mouseup",Ie,v),me("touchend",Ie,v),me("resize",Ie,()=>{i()&&u(i())}),te("mousedown",g,f),te("touchstart",g,f),y(t,g),ae()}Se(["mousedown","touchstart"]);function C1(t,e=t.anchorNode){if(!t.anchorNode||!e)return{start:-1,end:-1};const n=t.toString().trim(),i=t.toString().search(/\S/);if(t.anchorNode===e&&e.nodeType===Node.TEXT_NODE){const u=Math.min(t.anchorOffset,t.focusOffset)+i;return{start:u,end:u+n.length}}const r=t.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(e),a.setEnd(r.startContainer,r.startOffset);const s=a.toString().length+i,c=s+n.length;return{start:s,end:c}}var A1=Ge('<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 M1(t){var e=A1();y(t,e)}async function L1(t){const e=vn();if(!e)throw new Error("No token was provided");return await Ht(`/search/titles/?api-token=${e}&query=${t}`)}async function j1(t){const e=vn();if(!e)throw new Error("No token was provided");return await Ht(`/search/participants/?api-token=${e}&query=${t}`)}var D1=x('<div class="tabs svelte-1xf95vf"></div>');function R1(t,e){re(e,!0);const n=I(e,"onclick",3,()=>null);let i=B(()=>{var o;return(o=e.options[0])==null?void 0:o.value});function r(o){R(i,o),n()(o)}var a=D1();ze(a,21,()=>e.options,Ue,(o,s)=>{let c=()=>l(s).label,u=()=>l(s).value;{let f=B(()=>u()===l(i)?"filled":"border");Bt(o,{get variant(){return l(f)},onclick:()=>r(u()),children:(d,v)=>{var h=Xe();G(()=>J(h,c())),y(d,h)},$$slots:{default:!0}})}}),y(t,a),ae()}var N1=Ge('<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 uu(t){var e=N1();y(t,e)}var O1=x('<button><img class="image svelte-uqnibc" alt="" width="42" height="42"/> <div class="content"><div class="name svelte-uqnibc"> </div></div> <a target="_blank" class="open-in-new-tab svelte-uqnibc"><!></a></button>');function ns(t,e){re(e,!0);const n=I(e,"hoverable",3,!0),i=I(e,"onclick",3,()=>null);var r=O1();let a;var o=C(r),s=k(o,2),c=C(s),u=oe(c,!0),f=k(s,2),d=C(f);uu(d),G(v=>{a=_e(r,1,"item svelte-uqnibc",null,a,{hoverable:n()}),le(o,"src",e.participant.image||Hi),J(u,e.participant.name),le(f,"href",v)},[()=>eo(e.participant)]),te("click",r,function(...v){var h;(h=i())==null||h.apply(this,v)}),me("error",o,({target:v})=>v.src=Hi),te("click",f,v=>v.stopImmediatePropagation()),y(t,r),ae()}Se(["click"]);var q1=x("<div> </div>"),z1=x('<button><img class="poster svelte-fntasr" alt="" width="28" height="42"/> <div class="content"><div class="name svelte-fntasr"> </div> <div class="meta svelte-fntasr"><div class="imdb svelte-fntasr"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-fntasr"><!></a></button>');function is(t,e){re(e,!0);const n=I(e,"hoverable",3,!0),i=I(e,"onclick",3,()=>null);var r=z1();let a;var o=C(r),s=k(o,2),c=C(s),u=oe(c,!0),f=k(c,2),d=C(f),v=C(d);Aa(v,{});var h=k(v),g=k(d,2),m=oe(g,!0),p=k(g,2),w=oe(p,!0),b=k(p,2);{var T=E=>{var P=q1(),q=oe(P);G(()=>J(q,`${e.title.length??""} min`)),y(E,P)};Z(b,E=>{e.title.length&&E(T)})}var S=k(s,2),A=C(S);uu(A),G((E,P)=>{a=_e(r,1,"item svelte-fntasr",null,a,{hoverable:n()}),le(o,"src",E),J(u,e.title.title),J(h,` ${e.title.imdb_score??""}`),J(m,e.title.year),J(w,e.title.type),le(S,"href",P)},[()=>$i(e.title.standing_poster),()=>Ca(e.title)]),te("click",r,function(...E){var P;(P=i())==null||P.apply(this,E)}),me("error",o,({target:E})=>E.src=Hi),te("click",S,E=>E.stopImmediatePropagation()),y(t,r),ae()}Se(["click"]);var H1=x('<em class="empty svelte-c0n5tq">No results found</em>'),F1=x('<div class="results svelte-c0n5tq" data-testid="search-results"></div>'),B1=x('<div class="selected svelte-c0n5tq"><!></div>'),V1=x('<!> <div class="search svelte-c0n5tq"><!> <!> <!></div>',1);function W1(t,e){re(e,!0);let n=I(e,"onselect",3,()=>null),i=I(e,"query",15);const r=[{label:"Movies & Shows",value:"title"},{label:"Cast & Crew",value:"participant"}];let a=K(Ne([])),o=K(null),s=K(Ne(r[0].value)),c=K(!1);et(()=>{i()&&u(i())});async function u(S){R(c,!0);try{R(a,l(s)==="title"?await L1(S):await j1(S),!0)}finally{R(c,!1)}}function f(S){i(l(s)==="title"?S.title:S.name),R(o,S,!0),n()(S,l(s))}function d(S){R(s,S,!0),i(""),R(o,null)}var v=V1(),h=Q(v);R1(h,{get options(){return r},onclick:S=>d(S)});var g=k(h,2),m=C(g);uo(m,{oninput:()=>R(o,null),name:"search",label:"Search...",get value(){return i()},set value(S){i(S)}});var p=k(m,2);{var w=S=>{var A=F1();ze(A,21,()=>l(a),E=>E.sid,(E,P)=>{var q=ke(),F=Q(q);{var j=D=>{is(D,{get title(){return l(P)},onclick:()=>f(l(P))})},M=D=>{ns(D,{get participant(){return l(P)},onclick:()=>f(l(P))})};Z(F,D=>{l(s)==="title"?D(j):l(s)==="participant"&&D(M,1)})}y(E,q)},E=>{var P=ke(),q=Q(P);{var F=j=>{var M=H1();y(j,M)};Z(q,j=>{l(c)||j(F)})}y(E,P)}),y(S,A)};Z(p,S=>{i()&&!l(o)&&S(w)})}var b=k(p,2);{var T=S=>{var A=B1(),E=C(A);{var P=F=>{is(F,{get title(){return l(o)},hoverable:!1})},q=F=>{ns(F,{get participant(){return l(o)},hoverable:!1})};Z(E,F=>{l(s)==="title"?F(P):l(s)==="participant"&&F(q,1)})}y(S,A)};Z(b,S=>{l(o)&&S(T)})}y(t,v),ae()}var U1=x('<div class="error svelte-12oucrc"><!></div>'),G1=x('<label for="text" class="svelte-12oucrc">Paired link</label> <!>',1),Z1=x('<section class="layout svelte-12oucrc"><div class="header svelte-12oucrc"><!> <div class="heading svelte-12oucrc">Add Playlink manually</div></div> <p class="svelte-12oucrc">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-12oucrc">Selected text</label> <!> <!> <!> <button class="save svelte-12oucrc">Add playlink</button></section>');function K1(t,e){re(e,!0);const n=I(e,"onclose",3,()=>null),{pageText:i}=Bi();let r=K(""),a=K(""),o=K(null),s=K("title"),c=K(""),u=K(""),f=K(""),d=K("");lt(v);function v(){const M=window.getSelection();if(!(M!=null&&M.anchorNode)||M.anchorNode.parentElement&&!Fi().contains(M.anchorNode.parentElement))return;const D=M.toString().trim();if(!D)return;R(f,""),R(r,D,!0);const L=M.getRangeAt(0).cloneContents();if(Array.from(L.childNodes).filter($=>{var ne;return(ne=$.textContent)==null?void 0:ne.trim()}).find($=>{var ne;return $.nodeName==="A"||((ne=$.querySelector)==null?void 0:ne.call($,"a"))})){R(f,"Selection is or contains a link. Injections can not be created around already existing links.");return}R(d,l(r),!0);const{node:W,sentence:z}=h(M,D);if(!W)return;R(a,z,!0);const{start:O,end:H}=C1(M,W);($=>{R(u,$.before,!0),R(c,$.after,!0)})(jc(W,O,H)),z.includes(l(u))||R(u,""),z.includes(l(c))||R(c,"");const U=M.getRangeAt(0).commonAncestorContainer.textContent,Y=yt(i);(!U||!Y.includes(yt(U)))&&R(f,"Selection was not inside of given content")}function h(M,D){const L=M.getRangeAt(0),V=Fi();let W=L.startContainer;for(;(W.textContent||"").length<=D.length*3&&W.parentNode&&W.nodeName!=="P"&&W.parentNode.textContent!==V.textContent;)W=W.parentNode;if(!W||!W.textContent)return{node:null,sentence:""};const z=W.textContent,O=g(W,L.startContainer,L.startOffset),H=g(W,L.endContainer,L.endOffset),U=z.slice(0,O).lastIndexOf("."),Y=z.slice(H).match(/[.!?\n]/),$=Y?H+Y.index:z.length,ne=U===-1?0:U+1,ue=$,de=z.slice(ne,ue+1).trim();return{node:W,sentence:de}}function g(M,D,L){let V=0;const W=M,z=O=>{var H;if(O===D)return V+=L,!0;O.nodeType===Node.TEXT_NODE&&(V+=((H=O.textContent)==null?void 0:H.length)||0);for(let U=O.firstChild;U;U=U.nextSibling)if(z(U))return!0;return!1};return z(W),V}function m(M,D){var L,V;R(o,M,!0),R(s,D,!0),(V=(L=window.getSelection())==null?void 0:L.removeAllRanges)==null||V.call(L)}function p(){if(!l(r)||!l(o))return;const M={sid:l(o).sid,title:l(r),sentence:l(a),phrase_before:l(u),phrase_after:l(c),key:Ac(l(o).sid),manual:!0,type:l(s)};l(s)==="title"?(M.title_details=l(o),M.playpilot_url=Ca(l(o))):l(s)==="participant"&&(M.participant_details=l(o),M.playpilot_url=eo(l(o))),e.onsave(M),n()()}var w=Z1();me("mouseup",Ie,v);var b=C(w),T=C(b);Vi(T,{get onclick(){return n()},size:"24px",children:(M,D)=>{M1(M)},$$slots:{default:!0}});var S=k(T,2);bt(S,(M,D)=>Re==null?void 0:Re(M,D),()=>2);var A=k(b,6);uo(A,{get value(){return l(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var E=k(A,2);{var P=M=>{var D=U1(),L=C(D);fi(L,{children:(V,W)=>{var z=Xe();G(()=>J(z,l(f))),y(V,z)},$$slots:{default:!0}}),y(M,D)};Z(E,M=>{l(f)&&M(P)})}var q=k(E,2);{var F=M=>{var D=G1(),L=k(Q(D),2);Yi(L,()=>l(a)+l(r),V=>{W1(V,{onselect:m,get query(){return l(d)},set query(W){R(d,W,!0)}})}),y(M,D)};Z(q,M=>{l(f)||M(F)})}var j=k(q,2);G(()=>j.disabled=!l(r)||!l(o)),te("click",j,p),y(t,w),ae()}Se(["click"]);const Tl="PlayPilotEditorialSessionId",du=5e3,Y1=du*2;async function J1(){const{ai_enabled:t,injections_enabled:e,ai_last_run:n,session_id:i,session_last_ping:r}=await Fn(),a=vu(i||null,r||null),o={ai_enabled:t,ai_last_run:n,injections_enabled:e,session_id:i,session_last_ping:r};return a?await fu():o}async function fu(){const t=hu(),e=new Date(Date.now()).toISOString(),n={session_id:t,session_last_ping:e.toString()},{ai_enabled:i,injections_enabled:r,ai_last_run:a}=await Fn({params:n});return{ai_enabled:i,ai_last_run:a,injections_enabled:r,...n}}function vu(t,e){if(!t||!e)return!0;const n=Date.now(),i=new Date(e),r=hu();return n-i.getTime()>Y1?!0:r===t}function hu(){return sessionStorage.getItem(Tl)||Q1()}function Q1(){const t=sessionStorage.getItem(Tl)||Nr();return sessionStorage.setItem(Tl,t),t}var X1=x('<p class="svelte-16jrr0h"><strong>Someone else is currently editing this document.</strong> Wait for them to exit the page or take over edit permissions, preventing them from making more changes.</p> <button class="button svelte-16jrr0h">Take over editing</button>',1),$1=x('<div class="alert svelte-16jrr0h"><!></div>');function e0(t,e){re(e,!0);const n=I(e,"onpoll",3,()=>null),i=I(e,"onallow",3,()=>null),r=I(e,"ondisallow",3,()=>null),a=I(e,"ontakeover",3,()=>null);let o=null,s=K(!0);lt(()=>(c(),()=>{o&&clearInterval(o)}));function c(){u(),o=setInterval(u,du)}async function u(){const g=await J1();g&&(R(s,vu(g.session_id||null,g.session_last_ping||null),!0),l(s)?i()():r()(),n()({injectionsEnabled:!!g.injections_enabled,aiEnabled:!!g.ai_enabled}))}function f(){fu(),a()()}var d=ke(),v=Q(d);{var h=g=>{var m=$1(),p=C(m);fi(p,{type:"warning",children:(w,b)=>{var T=X1(),S=k(Q(T),2);te("click",S,f),y(w,T)},$$slots:{default:!0}}),y(g,m)};Z(v,g=>{l(s)||g(h)})}y(t,d),ae()}Se(["click"]);var t0=Ge('<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 n0(t){var e=t0();y(t,e)}var i0=x('<strong class="svelte-1q9haus">AI processing is disabled.</strong>'),r0=x('<span class="svelte-1q9haus">.</span>'),a0=x(`<strong class="svelte-1q9haus">AI links are currently processing.</strong> This can take several minutes. We'll insert all found injections once ready. <div class="message svelte-1q9haus"> <span class="ellipses svelte-1q9haus"></span></div> <div class="loading-bar svelte-1q9haus"><div class="loading-bar-progress svelte-1q9haus"><div class="loading-bar-fill svelte-1q9haus" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1q9haus"> </div></div>`,1),l0=x('<p class="svelte-1q9haus"><strong class="svelte-1q9haus">AI has finished processing.</strong> <br class="svelte-1q9haus"/> <!></p> <button class="dismiss svelte-1q9haus">Dismiss</button>',1),o0=x('<div class="animator svelte-1q9haus" data-test-id="animator"></div>'),s0=x('<div data-testid="ai-indicator"><div class="content svelte-1q9haus"><div class="icon svelte-1q9haus"><!></div> <div class="svelte-1q9haus"><!></div></div> <div class="border svelte-1q9haus"><!></div></div>');function c0(t,e){const n=I(e,"aiRunning",3,!1),i=I(e,"aiEnabled",3,!1),r=I(e,"message",3,""),a=I(e,"percentage",3,0),o=I(e,"aiInjectionsCount",3,0),s=o();let c=K(!1);var u=ke(),f=Q(u);{var d=v=>{var h=s0();let g;var m=C(h),p=C(m),w=C(p);n0(w);var b=k(p,2),T=C(b);{var S=j=>{var M=i0();y(j,M)},A=j=>{var M=a0(),D=k(Q(M),2),L=C(D),V=k(L);ze(V,20,()=>({length:3}),Ue,($,ne)=>{var ue=r0();y($,ue)});var W=k(D,2),z=C(W),O=C(z);let H;var U=k(z,2),Y=oe(U);G(($,ne)=>{J(L,`${r()??""} `),H=rt(O,"",H,{width:$}),J(Y,`${ne??""}%`)},[()=>`${Math.max(a(),3)}%`,()=>Math.floor(a())]),y(j,M)},E=j=>{var M=l0(),D=Q(M),L=k(C(D),4);{var V=O=>{var H=Xe("No new injections where found.");y(O,H)},W=O=>{var H=Xe();G(()=>J(H,`${o()??""} Injections where found and added to the page.`)),y(O,H)};Z(L,O=>{s===o()?O(V):O(W,-1)})}var z=k(D,2);te("click",z,()=>R(c,!0)),y(j,M)};Z(T,j=>{i()?n()?j(A,1):j(E,-1):j(S)})}var P=k(m,2),q=C(P);{var F=j=>{var M=o0();y(j,M)};Z(q,j=>{n()&&j(F)})}G(()=>g=_e(h,1,"ai-indicator svelte-1q9haus",null,g,{running:n()})),y(v,h)};Z(f,v=>{l(c)||v(d)})}y(t,u)}Se(["click"]);var u0=x('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:400,600,700"/>'),d0=x('<div class="handles svelte-7r3240"><div class="handle svelte-7r3240"><!></div> <div class="handle svelte-7r3240"><!></div></div>'),f0=x('<div class="loading svelte-7r3240">Loading...</div>'),v0=x('<div class="bubble svelte-7r3240"> </div> <!>',1),h0=x(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
12
|
+
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),g0=x('<div class="alert svelte-7r3240"><!></div>'),m0=x('<div class="error svelte-7r3240"><!></div>'),p0=x('<div class="empty svelte-7r3240">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),_0=x('<button class="save svelte-7r3240"> </button>'),y0=x('<!> <!> <div class="items svelte-7r3240"></div> <!>',1),w0=x("<!> <!> <!>",1),b0=x('<div class="panel svelte-7r3240"><!></div>'),k0=x('<section><!> <header class="header svelte-7r3240"><div class="heading svelte-7r3240">Playlinks</div> <!></header> <!> <!></section>');function x0(t,e){re(e,!0);let n=I(e,"linkInjections",15),i=I(e,"loading",3,!1),r=I(e,"injectionsEnabled",7,!1),a=I(e,"aiStatus",23,()=>({})),o=I(e,"onreinitialize",3,()=>null);const s="editor-position",c="editor-height",u=JSON.parse(localStorage.getItem(s)||'{ "x": 0, "y": 0 }'),f=parseInt(localStorage.getItem(c)||"0");let d=K(null),v=K(!1),h=K(!1),g=K(!1),m=K(!0),p=K(0),w=K("");const b=B(()=>fr(a().aiEnabled,!1)),T=B(()=>fr(a().aiRunning,!1)),S=B(()=>JSON.stringify(n())),A=B(()=>!l(T)&&l(m)),E=B(()=>l(w)&&l(w)!==l(S)),P=B(()=>n().filter(X=>(X.title_details||X.participant_details)&&!X.removed&&!X.duplicate&&(X.manual||!X.manual&&!X.failed))),q=B(()=>j(l(P))),F=B(()=>!i()&&Ct(()=>a().aiRunning));et(()=>{i()||Ct(()=>{requestAnimationFrame(()=>R(w,l(S),!0)),z()})});function j(X){return X.sort((ee,ce)=>{var Le,He,he,Ae;return ee.failed!==ce.failed?ee.failed?1:-1:(((Le=ee.title_details)==null?void 0:Le.title)||((He=ee.participant_details)==null?void 0:He.name)).localeCompare(((he=ce.title_details)==null?void 0:he.title)||((Ae=ce.participant_details)==null?void 0:Ae.name))})}async function M(){try{R(h,!0),R(g,!1),n(await Uf(n())),R(w,l(S),!0)}catch{R(g,!0)}finally{R(h,!1)}}function D(X,ee){localStorage.setItem(X,ee)}function L(X){const ee=n().findIndex(ce=>ce.key===X);n(n()[ee].manual=!0,!0),n(n()[ee].removed=!0,!0),n([...n()])}function V(X){if(!l(d))return;const ee=X.offsetTop,ce=ee+X.offsetHeight,Le=l(d).scrollTop,He=Le+l(d).clientHeight;ee>=Le&&ce<=He||l(d).scrollTo({top:ee-l(d).clientHeight/2,behavior:"smooth"})}function W(X){const ee=X.target;R(p,ee.scrollTop,!0)}function z(){const X={total:n().length,failed_automatic:n().filter(ee=>ee.failed&&!ee.manual).length,failed_manual:n().filter(ee=>ee.failed&&ee.manual).length,final_injected:l(P).length};ve(fe.TotalInjectionsCount,null,X)}var O=k0();fc("7r3240",X=>{var ee=u0();y(X,ee)});let H;var U=C(O);{var Y=X=>{var ee=d0(),ce=C(ee),Le=C(ce);I1(Le,{get element(){return l(d)},get height(){return f},onchange:Ae=>D(c,JSON.stringify(Ae))});var He=k(ce,2),he=C(He);E1(he,{get element(){return l(d)},get position(){return u},limit:{x:16,y:16},onchange:Ae=>D(s,JSON.stringify(Ae))}),y(X,ee)};Z(U,X=>{l(d)&&!i()&&X(Y)})}var $=k(U,2),ne=C($);bt(ne,X=>Re==null?void 0:Re(X));var ue=k(ne,2);{var de=X=>{var ee=f0();y(X,ee)},ye=X=>{var ee=v0(),ce=Q(ee),Le=oe(ce,!0),He=k(ce,2);Vi(He,{onclick:()=>R(v,!0),size:"24px","aria-label":"Add manual injection",children:(he,Ae)=>{var Ve=Xe("+");y(he,Ve)},$$slots:{default:!0}}),G(()=>{le(ce,"aria-label",`${l(P).length??""} found playlinks`),J(Le,l(P).length)}),y(X,ee)};Z(ue,X=>{i()?X(de):l(A)&&X(ye,1)})}var be=k($,2);{var Te=X=>{var ee=w0(),ce=Q(ee);e0(ce,{onallow:()=>R(m,!0),ondisallow:()=>R(m,!1),get ontakeover(){return o()},onpoll:Ve=>{r(Ve.injectionsEnabled),a({...a(),aiEnabled:Ve.aiEnabled})}});var Le=k(ce,2);{var He=Ve=>{{let st=B(()=>au(n()).aiInjections.length);c0(Ve,Tn(a,{get aiInjectionsCount(){return l(st)}}))}};Z(Le,Ve=>{l(m)&&(l(F)||!l(b))&&Ve(He)})}var he=k(Le,2);{var Ae=Ve=>{var st=y0(),Ke=Q(st);{var ie=je=>{var De=g0(),$t=C(De);fi($t,{type:"warning",children:(gn,Da)=>{var Jn=h0();y(gn,Jn)},$$slots:{default:!0}}),y(je,De)};Z(Ke,je=>{r()||je(ie)})}var pe=k(Ke,2);{var Ce=je=>{var De=m0(),$t=C(De);fi($t,{children:(gn,Da)=>{var Jn=Xe("Something went wrong, check your links below.");y(gn,Jn)},$$slots:{default:!0}}),qe(7,De,()=>pr,()=>({duration:150})),y(je,De)};Z(pe,je=>{l(g)&&je(Ce)})}var We=k(pe,2);ze(We,21,()=>l(q),je=>je.key,(je,De)=>{const $t=B(()=>n().findIndex(gn=>gn.key===l(De).key));S1(je,{onremove:()=>L(l(De).key),onhighlight:V,get linkInjection(){return n()[l($t)]},set linkInjection(gn){n(n()[l($t)]=gn,!0)}})},je=>{var De=p0();y(je,De)});var Qe=k(We,2);{var hn=je=>{var De=_0(),$t=oe(De,!0);G(()=>{De.disabled=l(h),J($t,l(h)?"Saving...":"Save links")}),te("click",De,M),qe(1,De,()=>Ot,()=>({duration:100})),y(je,De)};Z(Qe,je=>{l(E)&&n().length&&l(m)&&je(hn)})}y(Ve,st)};Z(he,Ve=>{l(A)&&Ve(Ae)})}y(X,ee)};Z(be,X=>{i()||X(Te)})}var Fe=k(be,2);{var Be=X=>{var ee=b0();let ce;var Le=C(ee);K1(Le,{onclose:()=>R(v,!1),onsave:He=>n().push(He)}),G(()=>ce=rt(ee,"",ce,{top:`${l(p)??""}px`})),qe(3,ee,()=>Si,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),y(X,ee)};Z(Fe,X=>{l(v)&&X(Be)})}$e(O,X=>R(d,X),()=>l(d)),G(()=>H=_e(O,1,"editor svelte-7r3240",null,H,{"panel-open":l(v),loading:i()})),me("scroll",O,W),y(t,O),ae()}Se(["click"]);var S0=Ge('<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 T0(t){var e=S0();y(t,e)}var E0=x('<div class="trigger svelte-qpyyh0"><button type="button" class="button svelte-qpyyh0" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qpyyh0" title="Close PlayPilot TPI"><!></button></div>');function P0(t,e){var n=E0(),i=C(n),r=C(i);T0(r);var a=k(i,2),o=C(a);qr(o,{}),te("click",i,function(...s){var c;(c=e.onclick)==null||c.apply(this,s)}),te("click",a,function(...s){var c;(c=e.onclose)==null||c.apply(this,s)}),y(t,n)}Se(["click"]);function I0(t,e){re(e,!0),lt(()=>{if(!gi())return;const i=new IntersectionObserver(r=>{r.forEach(a=>{if(!a.isIntersecting)return;i.unobserve(a.target);const o=a.target.getAttribute(En),s=e.linkInjections.find(u=>u.key===o),c=s==null?void 0:s.title_details;!o||!s||!c||n(c)})});return e.linkInjections.forEach(r=>{r.matchingElement&&i.observe(r.matchingElement)}),()=>i.disconnect()});function n({genres:i,participants:r,providers:a,title:o}){ln(Yt.TitleInterest,{title:o,source:Rn.Link}),i.slice(0,3).forEach(s=>{var c;ln(Yt.GenreInterest,{genre:(c=Ea.find(u=>u.slug===s))==null?void 0:c.name,source:Rn.Link})}),r==null||r.slice(0,20).forEach(s=>{ln(Yt.ParticipantInterest,{participant:s.name,source:Rn.Link})}),a==null||a.forEach(s=>{ln(Yt.ProviderInterest,{provider:s.name,source:Rn.Link})})}ae()}function C0(t,e){re(e,!1);const n=Array.from(document.querySelectorAll(Cn)),i=[],r=Date.now();let a=!1,o=null;lt(()=>{if(!Ta())return s(),()=>{var d;return(d=o==null?void 0:o.disconnect)==null?void 0:d.call(o)}});function s(){o=new IntersectionObserver(c),n.forEach(d=>{o.observe(d)})}function c(d){d.forEach(v=>{if(!v.isIntersecting)return;const h=v.target.getAttribute(En);h&&i.push(h),o.unobserve(v.target)})}function u(){const{scrollHeight:d,scrollTop:v,clientHeight:h}=document.documentElement;return v/(d-h)*100}function f(){var v,h;if(a||document.visibilityState!=="hidden")return;a=!0;const d=Date.now();ve(fe.UserLeft,null,{time_start:r,time_end:d,time_spent:d-r,existing_injections_count:n.length,shown_injections_count:i.length,fired_events:((h=(v=window.PlayPilotLinkInjections)==null?void 0:v.tracked_events)==null?void 0:h.map(g=>g.event))||[],scroll_percentage:u()})}Wl(),me("visibilitychange",Ie,f),ae()}function A0(t,e){re(e,!0);const n=100;let i=1;r();function r(){if(window.PlayPilotLinkInjections.require_consent===!1){a();return}if(!window.__tcfapi){i<n&&setTimeout(r,100),i++;return}window.__tcfapi("addEventListener",2,(o,s)=>{if(!s)return;const{purpose:c,eventStatus:u}=o;if(u!=="tcloaded"&&u!=="useractioncomplete")return;const f=d=>c.consents[d]===!0;nv({ads:f(1),pixels:f(1)&&f(7),split_tests:f(9)&&f(10),tracking:f(7)&&f(8),affiliate:f(1)&&f(7)}),a()})}function a(){window.dispatchEvent(new CustomEvent("updateconsent",{bubbles:!0})),e.onchange()}ae()}var M0=x('<span class="error svelte-1tp7i1s">The current URL is excluded via the config</span> <hr class="svelte-1tp7i1s"/>',1),L0=x('<tr class="svelte-1tp7i1s"><td><span class="label"> </span></td><td><span class="data svelte-1tp7i1s"> </span></td></tr>'),j0=x('<table border="0" cellpadding="0" class="svelte-1tp7i1s"><tbody></tbody></table>'),D0=x('<details><summary class="svelte-1tp7i1s"> </summary> <!></details>'),R0=x('<button class="svelte-1tp7i1s"></button>'),N0=x("<small>You are using the beta version of TPI</small>"),O0=x('<button class="svelte-1tp7i1s">Use beta script</button>'),q0=x("<option> </option>"),z0=x('<div class="debugger svelte-1tp7i1s"><strong>TPI Debugger</strong> <hr class="svelte-1tp7i1s"/> <!> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Insert mock card ad</button> <button class="svelte-1tp7i1s">Insert mock top scroll ad</button> <hr class="svelte-1tp7i1s"/> <small>Force split test variant</small> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Output elements in console</button> <button class="svelte-1tp7i1s">Output text in console</button> <hr class="svelte-1tp7i1s"/> <div class="form-group svelte-1tp7i1s"><label for="participant-threshold"><small>Participant use article average</small></label> <input id="participant-threshold" type="checkbox"/></div> <div class="form-group svelte-1tp7i1s"><small>Participant threshold</small> <input type="range"/> <small> </small></div> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Re-inject</button> <button class="svelte-1tp7i1s">Re-run AI</button> <!> <hr class="svelte-1tp7i1s"/> <div><small>Region</small> <input type="text" class="svelte-1tp7i1s"/></div> <div style="margin-top: 4px"><small>Language</small> <select class="svelte-1tp7i1s"></select></div> <hr class="svelte-1tp7i1s"/> <div class="form-group svelte-1tp7i1s"><small>Desktop rail size</small> <input type="range"/> <small> </small></div> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Close</button></div>');function H0(t,e){var T;re(e,!0);const n=["tpidebug","debugtpi"],i=[],r=!!document.querySelector('script[src*="scripts.playpilot.com/link-injection@next"]');let a=K(Ne(d())),o=K(!1),s=null,c=K(184),u=K(Ne(((T=window.PlayPilotLinkInjections.config)==null?void 0:T.participant_injection_popularity_threshold_use_article_average)??!0)),f=B(()=>{var S;return((S=window.PlayPilotLinkInjections.config)==null?void 0:S.participant_injection_popularity_threshold)||(l(u)?50:1e3)});Rr(()=>{s&&clearInterval(s)});function d(){var F,j,M,D,L,V;const S=window.PlayPilotLinkInjections,A=((F=S.evaluated_link_injections)==null?void 0:F.filter(W=>!W.failed))||[],E=((j=S.evaluated_link_injections)==null?void 0:j.filter(W=>W.failed))||[],P=[...A,...E].filter(W=>W.type==="participant"),q=Array.from(document.querySelectorAll("[data-playpilot-pixel]"));return{Config:[{label:"Domain",data:S.domain_sid},{label:"Organization",data:S.organization_sid},{label:"HTML selector",data:S.selector}],"API Config":Object.entries(window.PlayPilotLinkInjections.config||{}).map(([W,z])=>({label:W,data:z})),[`Succesful injections (${A.length})`]:A.map(W=>({label:W.title,data:W.sentence})),[`Failed injections (${E.length})`]:E.map(W=>({label:W.title,data:`Reason: ${W.failed_message} | Sentence: ${W.sentence}`})),[`Participant popularity (${P.length})`]:P.map(W=>({label:W.participant_details.name,data:W.popularity||W.participant_details.popularity||"Not set"})),[`Fetched ads (${((M=S.ads)==null?void 0:M.length)||0})`]:(D=S.ads)==null?void 0:D.map(W=>({label:W.campaign_name,data:W})),[`Tracking events (${((L=S.tracked_events)==null?void 0:L.length)||0})`]:(V=S.tracked_events)==null?void 0:V.map(W=>({label:W.event,data:W.payload})),[`Visible pixels (${q.length})`]:q.map((W,z)=>({label:z+1,data:W.src}))}}function v(S){l(o)||(i.push(S.key),R(o,n.some(A=>i.slice(i.length-A.length,i.length).join("")===A),!0),s=setInterval(()=>R(a,d(),!0),200))}function h(S){window.PlayPilotLinkInjections.ads.unshift({campaign_format:S,campaign_type:"image",campaign_name:"some_campaign",content:{header:"Content header",subheader:"Content subheader"},cta:{header:"Cta header",subheader:"Cta subheader"},disclaimer:"Disclaimer"})}function g(S){window.PlayPilotLinkInjections.split_test_identifiers={},Object.values(ao).forEach(({key:A,numberOfVariants:E})=>{const P=1/E;window.PlayPilotLinkInjections.split_test_identifiers[A]=Math.min(P*S,1)})}function m(){var E,P;const S=document.querySelector('script[src*="scripts.playpilot.com/link-injection"]');if(!S)return;(P=(E=window.PlayPilotLinkInjections)==null?void 0:E.destroy)==null||P.call(E);const A=document.createElement("script");for(const q of S.attributes)A.setAttribute(q.name,q.value);A.getAttribute("onload")||A.setAttribute("onload",`window.PlayPilotLinkInjections.initialize({ token: '${window.PlayPilotLinkInjections.token}' })`),A.src=S.src.replace("link-injection","link-injection@next"),S.insertAdjacentElement("afterend",A),S.remove()}var p=ke();me("keydown",Ie,v);var w=Q(p);{var b=S=>{var A=z0(),E=k(C(A),4);{var P=he=>{var Ae=M0();y(he,Ae)},q=B(()=>!!(Je("exclude_urls_pattern")&&Hn().match(Je("exclude_urls_pattern"))));Z(E,he=>{l(q)&&he(P)})}var F=k(E,2);ze(F,17,()=>Object.entries(l(a)),Ue,(he,Ae)=>{var Ve=B(()=>ci(l(Ae),2));let st=()=>l(Ve)[0],Ke=()=>l(Ve)[1];var ie=D0(),pe=C(ie),Ce=oe(pe,!0),We=k(pe,2);{var Qe=je=>{var De=ke(),$t=Q(De);{var gn=Jn=>{var fo=j0(),gu=C(fo);ze(gu,21,Ke,Ue,(mu,vo,W0,U0)=>{let pu=()=>l(vo).label,_u=()=>l(vo).data;var ho=L0(),go=C(ho),yu=C(go),wu=oe(yu,!0),bu=k(go),ku=C(bu),xu=oe(ku,!0);G(Su=>{J(wu,pu()),J(xu,Su)},[()=>JSON.stringify(_u())]),y(mu,ho)}),y(Jn,fo)},Da=B(()=>Array.isArray(Ke()));Z($t,Jn=>{l(Da)&&Jn(gn)})}y(je,De)},hn=je=>{var De=Xe("No data");y(je,De)};Z(We,je=>{var De;(De=Ke())!=null&&De.length?je(Qe):je(hn,-1)})}G(()=>J(Ce,st())),y(he,ie)});var j=k(F,4),M=k(j,2),D=k(M,6);ze(D,16,()=>({length:4}),Ue,(he,Ae,Ve)=>{var st=R0();st.textContent=Ve,te("click",st,()=>g(Ve)),y(he,st)});var L=k(D,4),V=k(L,2),W=k(V,4),z=k(C(W),2),O=k(W,2),H=k(C(O),2);le(H,"min",0),le(H,"step",1);var U=k(H,2),Y=oe(U,!0),$=k(O,4),ne=k($,2),ue=k(ne,2);{var de=he=>{var Ae=N0();y(he,Ae)},ye=he=>{var Ae=O0();te("click",Ae,m),y(he,Ae)};Z(ue,he=>{r?he(de):he(ye,-1)})}var be=k(ue,4),Te=k(C(be),2);bf(Te,window.PlayPilotLinkInjections.region);var Fe=k(be,2),Be=k(C(Fe),2);ze(Be,21,()=>Object.entries(_),Ue,(he,Ae)=>{var Ve=B(()=>ci(l(Ae),2));let st=()=>l(Ve)[0],Ke=()=>l(Ve)[1];var ie=q0(),pe=oe(ie,!0),Ce={};G(We=>{Bl(ie,We),J(pe,st()),Ce!==(Ce=Ke())&&(ie.value=(ie.__value=Ce)??"")},[()=>Ke()===Or()]),y(he,ie)});var X=k(Fe,4),ee=k(C(X),2);le(ee,"min",80),le(ee,"max",240),le(ee,"step",8);var ce=k(ee,2),Le=oe(ce,!0),He=k(X,4);G(()=>{le(H,"max",l(u)?100:1e4),J(Y,l(f)),J(Le,l(c))}),te("click",j,()=>h("card")),te("click",M,()=>h("top_scroll")),te("click",L,()=>console.log(Bi(window.PlayPilotLinkInjections.config))),te("click",V,()=>console.log(Bi(window.PlayPilotLinkInjections.config).pageText)),te("input",z,he=>window.PlayPilotLinkInjections.config.participant_injection_popularity_threshold_use_article_average=he.target.checked),xf(z,()=>l(u),he=>R(u,he)),te("input",H,he=>window.PlayPilotLinkInjections.config.participant_injection_popularity_threshold=parseInt(he.target.value)),ui(H,()=>l(f),he=>R(f,he)),te("click",$,function(...he){var Ae;(Ae=e.onrerender)==null||Ae.apply(this,he)}),te("click",ne,he=>{confirm("You sure? Rerunning the AI will take some time, refresh whenever")&&(Fn({params:{run_ai:!0},method:"POST"}),he.target.disabled=!0)}),te("change",Te,he=>{kl(),window.PlayPilotLinkInjections.region=he.target.value,bl()}),te("change",Be,he=>{kl(),window.PlayPilotLinkInjections.language=he.target.value,bl()}),te("input",ee,()=>document.body.style.setProperty("--playpilot-rail-size-flexible",`${l(c)}px`)),ui(ee,()=>l(c),he=>R(c,he)),te("click",He,()=>R(o,!1)),y(S,A)};Z(w,S=>{l(o)&&S(b)})}y(t,p),ae()}Se(["click","input","change"]);function F0(t,e){re(e,!0);const n=Array.from(document.querySelectorAll("[data-playpilot-poster-url]")),i=new ua,r=.7,a="[data-playpilot-poster]";let o=K(0),s={},c=null;const u=B(()=>l(o)<Un);Rr(h);function f(){if(Je("disable_scroll_reveal_posters")||!l(u))return;g();const m=window.innerHeight,p=new ua,w=m*r,b=m-w;for(const T of n){const{top:S}=T.getBoundingClientRect();S<w&&S>b&&p.add(T)}for(const T of p){if(i.has(T))continue;const S=T.dataset.playpilotPosterUrl;S in s&&s[S]!==T||(d(T,S),i.add(T),s[S]=T)}}function d(m,p){const w=document.createElement("img");w.classList.add("playpilot-floating-poster"),w.dataset.playpilotPoster="",w.src=p,w.alt="",w.onload=()=>w.classList.add("loaded"),m.insertAdjacentElement("afterbegin",w)}function v(m){const p=m.querySelector(a);p&&(p.classList.add("animating-out"),setTimeout(()=>p.remove(),500))}function h(){for(const m of Array.from(document.querySelectorAll(a)))m.remove()}function g(){c&&clearTimeout(c),c=setTimeout(()=>{for(const m of i)v(m),i.delete(m),s={}},1e3)}me("scroll",Ie,f),zi("innerWidth",m=>R(o,m,!0)),ae()}var rs=x("<!> <!>",1),B0=x('<div class="playpilot-link-injections svelte-1uha8ag" data-playpilot-link-injections=""><!> <!></div> <!> <!> <!> <!>',1);function V0(t,e){re(e,!0);let n=K(null),i=K(Ne(Ta())),r=K(!!Gl()),a=K(!1),o=K(!0),s=K(!0),c=K(Ne([]));const u=B(()=>l(n)||{}),f=B(()=>fr(l(u).ai_injections,()=>[],!0)),d=B(()=>fr(l(u).manual_injections,()=>[],!0)),v=g();et(()=>{l(i)&&!l(o)&&m()}),bl(),Rr(co);async function h(){if(Kr())return;await v,cv(),ve(fe.ArticlePageView);const z=Je("explore_navigation_path");!l(f).length&&!l(d).length&&!(z&&document.location.href.includes(z))||(window.PlayPilotLinkInjections.ads=await Hc(),window.dispatchEvent(new CustomEvent("updateads",{bubbles:!0})))}async function g(){R(o,!0);try{l(i)&&R(a,await Tc({throwError:!0}),!0)}catch{ve(fe.AuthFailed)}try{const z=window.PlayPilotLinkInjections.config||await rv()||{};if(window.PlayPilotLinkInjections.config=z,z!=null&&z.custom_style&&T(z.custom_style||""),z!=null&&z.explore_navigation_selector&&np(),z!=null&&z.no_affiliate&&(window.PlayPilotLinkInjections.no_affiliate=!0),z!=null&&z.domain_sid&&Ho({organizationSid:z.organization_sid,domainSid:z.domain_sid}),R(s,Bf(z),!0),l(s))return;z!=null&&z.html_selector&&(window.PlayPilotLinkInjections.selector=z==null?void 0:z.html_selector)}catch(z){ve(fe.FetchingConfigFailed),console.error("TPI Config failed to fetch",z);return}try{if(await(async z=>{var O=ci(z,1);R(n,O[0],!0)})(await Promise.all([await(window.PlayPilotLinkInjections.initial_link_injections_promise||Do({maxTries:1,runAiWhenRelevant:!Kr()})),await Qi()])),R(o,!1),!l(n)||Je("disable_public_injections")&&!(l(i)&&l(a)))return;if(Ho({organizationSid:l(n).organization_sid,domainSid:l(n).domain_sid}),!l(n).ai_running||!l(n).ai_enabled){w({aiInjections:l(f),manualInjections:l(d)});return}if(!l(i)||Kr())return;R(n,await Do({requireCompletedResult:!0,onpoll:z=>R(n,z,!0)}),!0),w({aiInjections:l(f),manualInjections:l(d)})}catch(z){console.error(z),ve(fe.InjectionError,null,{message:z.message})}}function m(){w(au(l(c)))}function p(){R(i,!1),requestAnimationFrame(()=>{R(i,!0),g()})}function w(z={aiInjections:l(f),manualInjections:l(d)}){const{elements:O}=Bi(),H=L_(O,z);JSON.stringify(H)!==JSON.stringify(l(c))&&(R(c,H,!0),window.PlayPilotLinkInjections.evaluated_link_injections=H),l(i)||S(H)}function b(){R(i,!0),Rf(),g()}function T(z){const O="playpilot-custom-style",H=document.getElementById(O),U=H||document.createElement("style");U.textContent=`body { ${z} }`,U.id=O,H||document.body.appendChild(U)}function S(z){const O=z.filter(U=>!U.failed),H=z.filter(U=>U.failed);if(O.length&&ve(fe.ArticleInjected,null,{manual:O.filter(U=>U.manual).length,ai:O.filter(U=>!U.manual).length}),H.length){const U=Y=>H.filter(({failed_message:$})=>$==null?void 0:$.includes(Y)).length;ve(fe.FailedInjectionsCount,null,{total:H.length,sentence_not_found:U("sentence was not found"),already_linked:U("already inside of a link"),broken_html:U("broken HTML"),duplicate:U("duplicate"),unknown:U("unknown reasons")})}}var A=B0(),E=Q(A),P=C(E);{var q=z=>{var O=rs(),H=Q(O);{var U=ne=>{P0(ne,{onclick:b,onclose:()=>{R(r,!1),Df()}})};Z(H,ne=>{!l(s)&&l(r)&&!l(i)&&ne(U)})}var Y=k(H,2);{var $=ne=>{var ue=ke(),de=Q(ue);Fl(de,{onerror:be=>ve(fe.EditorError,null,{message:be.message}),failed:be=>{fi(be,{fixed:!0,children:(Te,Fe)=>{var Be=Xe("An error has occurred in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");y(Te,Be)},$$slots:{default:!0}})}},be=>{{let Te=B(()=>{var Be;return(Be=l(n))==null?void 0:Be.injections_enabled}),Fe=B(()=>{var Be,X,ee,ce,Le;return{aiEnabled:(Be=l(n))==null?void 0:Be.ai_enabled,aiRunning:((X=l(n))==null?void 0:X.ai_running)&&((ee=l(n))==null?void 0:ee.ai_enabled),message:(ce=l(n))==null?void 0:ce.ai_progress_message,percentage:(Le=l(n))==null?void 0:Le.ai_progress_percentage}});x0(be,{get loading(){return l(o)},onreinitialize:p,get injectionsEnabled(){return l(Te)},get aiStatus(){return l(Fe)},get linkInjections(){return l(c)},set linkInjections(Be){R(c,Be,!0)}})}}),y(ne,ue)};Z(Y,ne=>{!l(s)&&l(i)&&l(a)&&ne($)})}y(z,O)};Z(P,z=>{z(q)})}var F=k(P,2);H0(F,{onrerender:m});var j=k(E,2);{var M=z=>{no(z,{get pixels(){return l(n).pixels}})};Z(j,z=>{var O,H;(H=(O=l(n))==null?void 0:O.pixels)!=null&&H.length&&z(M)})}var D=k(j,2);{var L=z=>{I0(z,{get linkInjections(){return l(c)}})};Z(D,z=>{l(c).length&&z(L)})}var V=k(D,2);Yi(V,()=>l(c),z=>{var O=rs(),H=Q(O);C0(H,{});var U=k(H,2);F0(U,{}),y(z,O)});var W=k(V,2);A0(W,{onchange:h}),y(t,A),ae()}window.PlayPilotMount={mount(){if(window.PlayPilotLinkInjections.app)return;const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),window.PlayPilotLinkInjections.app=Nt(V0,{target:t})},destroy(){if(!window.PlayPilotLinkInjections)return;window.PlayPilotLinkInjections.app=null;const t=document.getElementById("playpilot-link-injection");t&&t.remove(),co()}};
|
|
13
13
|
|
|
14
14
|
})();
|