import{l as H,m as T,s as L,V as j,q as c,z as g,G as h,H as v,K as b,Y as q,Z as z,$ as B,o as D,n as C,v as d,w as f,x as k,a1 as E,a2 as G,J as w,a5 as J,am as K,aa as M,a8 as V}from"./index.881b9b68.js";function Y(i){let e;return{c(){e=C("div"),d(e,"id",i[0]),d(e,"class","output-markdown gr-prose"),K(e,"max-width","100%"),f(e,"min-h-[6rem]",i[3]),f(e,"hidden",!i[1])},m(a,n){k(a,e,n),e.innerHTML=i[2],i[5](e)},p(a,[n]){n&4&&(e.innerHTML=a[2]),n&1&&d(e,"id",a[0]),n&8&&f(e,"min-h-[6rem]",a[3]),n&2&&f(e,"hidden",!a[1])},i:M,o:M,d(a){a&&w(e),i[5](null)}}}function Z(i,e,a){let{elem_id:n=""}=e,{visible:l=!0}=e,{value:u}=e,{min_height:o=!1}=e;const m=q();let t;function r(s){V[s?"unshift":"push"](()=>{t=s,a(4,t)})}return i.$$set=s=>{"elem_id"in s&&a(0,n=s.elem_id),"visible"in s&&a(1,l=s.visible),"value"in s&&a(2,u=s.value),"min_height"in s&&a(3,o=s.min_height)},i.$$.update=()=>{i.$$.dirty&4&&m("change")},[n,l,u,o,t,r]}class A extends H{constructor(e){super(),T(this,e,Z,Y,L,{elem_id:0,visible:1,value:2,min_height:3})}}function F(i){let e,a,n,l,u;const o=[i[3],{variant:"center"}];let m={};for(let t=0;t<o.length;t+=1)m=z(m,o[t]);return e=new B({props:m}),l=new A({props:{min_height:i[3]&&i[3].status!=="complete",value:i[2],elem_id:i[0],visible:i[1]}}),l.$on("change",i[5]),{c(){var t;c(e.$$.fragment),a=D(),n=C("div"),c(l.$$.fragment),d(n,"class","transition"),f(n,"opacity-20",((t=i[3])==null?void 0:t.status)==="pending")},m(t,r){g(e,t,r),k(t,a,r),k(t,n,r),g(l,n,null),u=!0},p(t,r){var s;const S=r&8?E(o,[G(t[3]),o[1]]):{};e.$set(S);const _={};r&8&&(_.min_height=t[3]&&t[3].status!=="complete"),r&4&&(_.value=t[2]),r&1&&(_.elem_id=t[0]),r&2&&(_.visible=t[1]),l.$set(_),r&8&&f(n,"opacity-20",((s=t[3])==null?void 0:s.status)==="pending")},i(t){u||(h(e.$$.fragment,t),h(l.$$.fragment,t),u=!0)},o(t){v(e.$$.fragment,t),v(l.$$.fragment,t),u=!1},d(t){b(e,t),t&&w(a),t&&w(n),b(l)}}}function I(i){let e,a;return e=new j({props:{visible:i[1],elem_id:i[0],disable:!0,$$slots:{default:[F]},$$scope:{ctx:i}}}),{c(){c(e.$$.fragment)},m(n,l){g(e,n,l),a=!0},p(n,[l]){const u={};l&2&&(u.visible=n[1]),l&1&&(u.elem_id=n[0]),l&143&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){a||(h(e.$$.fragment,n),a=!0)},o(n){v(e.$$.fragment,n),a=!1},d(n){b(e,n)}}}function N(i,e,a){let{label:n}=e,{elem_id:l=""}=e,{visible:u=!0}=e,{value:o=""}=e,{loading_status:m}=e;const t=q();function r(s){J.call(this,i,s)}return i.$$set=s=>{"label"in s&&a(4,n=s.label),"elem_id"in s&&a(0,l=s.elem_id),"visible"in s&&a(1,u=s.visible),"value"in s&&a(2,o=s.value),"loading_status"in s&&a(3,m=s.loading_status)},i.$$.update=()=>{i.$$.dirty&16&&t("change")},[l,u,o,m,n,r]}class O extends H{constructor(e){super(),T(this,e,N,I,L,{label:4,elem_id:0,visible:1,value:2,loading_status:3})}}var Q=O;const R=["static"],U=i=>({type:"string",description:"HTML rendering of markdown"});export{Q as Component,U as document,R as modes};
