import{S as G,i as K,s as Q,a as x,k as g,y as A,D as U,h,c as V,l as b,m as w,z as B,n as k,b as D,A as C,E as p,g as $,d as I,f as N,B as M,J as L,o as W,q as P,r as q,u as X,v as j,_ as Y}from"../chunks/index.a38b3e2d.js";import{N as Z,g as ee,H as te,S as re,k as ae}from"../chunks/HTMLPreview.47874c98.js";import{p as le}from"../chunks/stores.d306f65a.js";function T(d,a,n){const l=d.slice();return l[6]=a[n],l}function J(d){let a,n;return{c(){a=g("div"),n=P("loading..."),this.h()},l(l){a=b(l,"DIV",{class:!0});var i=w(a);n=q(i,"loading..."),i.forEach(h),this.h()},h(){k(a,"class","flex items-center justify-center w-full pt-1 pb-6 tracking-tight text-sm text-gray-500 dark:text-gray-400 font-mono")},m(l,i){D(l,a,i),p(a,n)},d(l){l&&h(a)}}}function O(d){let a,n,l,i,u=d[0].name+"",_,c,f,m,v;return m=new te({props:{data:d[0]}}),{c(){a=g("div"),n=g("div"),l=g("div"),i=g("h1"),_=P(u),c=x(),f=g("div"),A(m.$$.fragment),this.h()},l(e){a=b(e,"DIV",{class:!0});var o=w(a);n=b(o,"DIV",{class:!0});var t=w(n);l=b(t,"DIV",{class:!0});var r=w(l);i=b(r,"H1",{class:!0});var s=w(i);_=q(s,u),s.forEach(h),r.forEach(h),t.forEach(h),c=V(o),f=b(o,"DIV",{class:!0});var y=w(f);B(m.$$.fragment,y),y.forEach(h),o.forEach(h),this.h()},h(){k(i,"class","text-l font-medium text-gray-900 dark:text-white"),k(l,"class","w-1/3 overflow-hidden"),k(n,"class","flex justify-between items-center py-4 pl-5 pr-4 rounded-t border-b dark:border-gray-700"),k(f,"class","overflow-y-auto overflow-x-hidden w-full p-10"),k(a,"class","border rounded-md border-gray-200 dark:border-gray-700 dark:bg-gray-800 bg-white")},m(e,o){D(e,a,o),p(a,n),p(n,l),p(l,i),p(i,_),p(a,c),p(a,f),C(m,f,null),v=!0},p(e,o){(!v||o&1)&&u!==(u=e[0].name+"")&&X(_,u);const t={};o&1&&(t.data=e[0]),m.$set(t)},i(e){v||($(m.$$.fragment,e),v=!0)},o(e){I(m.$$.fragment,e),v=!1},d(e){e&&h(a),M(m)}}}function R(d){let a,n,l,i,u,_,c,f,m,v=d[2],e=[];for(let t=0;tI(e[t],1,1,()=>{e[t]=null});return{c(){a=g("div"),n=g("div"),l=g("div"),i=g("h3"),u=P("Streams"),_=x(),c=g("div"),f=g("div");for(let t=0;t{o=null}),N()),r[2].length?t?(t.p(r,s),s&4&&$(t,1)):(t=R(r),t.c(),$(t,1),t.m(c,null)):t&&(j(),I(t,1,1,()=>{t=null}),N())},i(r){v||($(i.$$.fragment,r),$(o),$(t),v=!0)},o(r){I(i.$$.fragment,r),I(o),I(t),v=!1},d(r){r&&h(n),r&&h(l),M(i),r&&h(u),r&&h(_),e&&e.d(),o&&o.d(),t&&t.d()}}}function ne(d,a,n){let l,i;L(d,ae,f=>n(4,l=f)),L(d,le,f=>n(5,i=f));let u,_=!0,c=[];return W(async()=>{const f=i.url.searchParams.get("id");f&&!l.length&&await ee(),n(0,u=l.find(m=>m.id===f)),u&&(n(2,c=u._streams),u._guides),n(1,_=!1)}),[u,_,c]}class fe extends G{constructor(a){super(),K(this,a,ne,se,Q,{})}}export{fe as component};