1import{C as wn,S as pn}from"./Index-B0pzGNvZ.js";import{u as ht,c as vn}from"./Blocks-CbMTi72h.js";import{d as kn}from"./index-CnqicUFC.js";import{S as $n}from"./ShareButton-DY61e3s8.js";import{I as Cn}from"./Image-D0PROUKW.js";import"./index-BBXRYz6K.js";/* empty css */import"./Index.svelte_svelte_type_style_lang-wTNMo9lJ.js";import{M as ln}from"./Example.svelte_svelte_type_style_lang-CUvE1Mae.js";import{C as yn}from"./Check-Ck0iADAu.js";import{C as qn}from"./Copy-ZPOKSMtK.js";import{D as zn}from"./DownloadLink-8VIFhju3.js";import{B as Hn}from"./Button-B9ZzokJD.js";import{B as Sn}from"./BlockLabel-BIX1_TXx.js";import"./file-url-MvGfSkSF.js";import"./svelte/svelte.js";import"./prism-python-CwvNCBdh.js";const{SvelteComponent:Vn,append:mt,attr:P,detach:Ln,init:Mn,insert:Bn,noop:Xe,safe_not_equal:Nn,svg_element:xe}=window.__gradio__svelte__internal;function jn(n){let e,l,t;return{c(){e=xe("svg"),l=xe("path"),t=xe("path"),P(l,"fill","currentColor"),P(l,"d","M17.74 30L16 29l4-7h6a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h9v2H6a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4h20a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4h-4.84Z"),P(t,"fill","currentColor"),P(t,"d","M8 10h16v2H8zm0 6h10v2H8z"),P(e,"xmlns","http://www.w3.org/2000/svg"),P(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),P(e,"aria-hidden","true"),P(e,"role","img"),P(e,"class","iconify iconify--carbon"),P(e,"width","100%"),P(e,"height","100%"),P(e,"preserveAspectRatio","xMidYMid meet"),P(e,"viewBox","0 0 32 32")},m(i,s){Bn(i,e,s),mt(e,l),mt(e,t)},p:Xe,i:Xe,o:Xe,d(i){i&&Ln(e)}}}class An extends Vn{constructor(e){super(),Mn(this,e,null,jn,Nn,{})}}const Zn=async n=>(await Promise.all(n.map(async l=>await Promise.all(l.map(async(t,i)=>{if(t===null)return"";let s=i===0?"ð":"ð¤",o="";if(typeof t=="string"){const r={audio:/<audio.*?src="(\/file=.*?)"/g,video:/<video.*?src="(\/file=.*?)"/g,image:/<img.*?src="(\/file=.*?)".*?\/>|!\[.*?\]\((\/file=.*?)\)/g};o=t;for(let[a,u]of Object.entries(r)){let f;for(;(f=u.exec(t))!==null;){const p=f[1]||f[2],v=await ht(p,"url");o=o.replace(p,v)}}}else{if(!t?.url)return"";const r=await ht(t.url,"url");t.mime_type?.includes("audio")?o=`<audio controls src="${r}"></audio>`:t.mime_type?.includes("video")?o=r:t.mime_type?.includes("image")&&(o=`<img src="${r}" />`)}return`${s}: ${o}`}))))).map(l=>l.join(l[0]!==""&&l[1]!==""?` 2`:"")).join(` 3`);function Ae(){return Math.random().toString(36).substring(7)}const Tn=(n,e)=>n.replace('src="/file',`src="${e}file`);function Dn(n){return n?n.includes("audio")?"audio":n.includes("video")?"video":n.includes("image")?"image":"file":"file"}function En(n,e){return n===null?null:n.map(l=>l.map(t=>{if(t==null)return{value:null,id:Ae(),type:"empty"};if(typeof t=="string")return{type:"text",value:Tn(t,e),id:Ae()};if("file"in t){const i=Array.isArray(t.file)?t.file[0]:t.file;return{type:"component",component:Dn(i?.mime_type),value:t.file,alt_text:t.alt_text,id:Ae()}}return{...t,type:"component",id:Ae()}}))}const{SvelteComponent:Pn,attr:Ze,detach:Un,element:In,flush:Fn,init:On,insert:Rn,noop:dt,safe_not_equal:Yn,set_style:gt}=window.__gradio__svelte__internal;function Gn(n){let e;return{c(){e=In("div"),e.innerHTML=`<span class="sr-only">Loading content</span> <div class="dot-flashing svelte-1gpwetz"></div> 4  5 <div class="dot-flashing svelte-1gpwetz"></div> 6  7 <div class="dot-flashing svelte-1gpwetz"></div>`,Ze(e,"class","message pending svelte-1gpwetz"),Ze(e,"role","status"),Ze(e,"aria-label","Loading response"),Ze(e,"aria-live","polite"),gt(e,"border-radius",n[0]==="bubble"?"var(--radius-xxl)":"none")},m(l,t){Rn(l,e,t)},p(l,[t]){t&1&>(e,"border-radius",l[0]==="bubble"?"var(--radius-xxl)":"none")},i:dt,o:dt,d(l){l&&Un(e)}}}function Jn(n,e,l){let{layout:t="bubble"}=e;return n.$$set=i=>{"layout"in i&&l(0,t=i.layout)},[t]}class Kn extends Pn{constructor(e){super(),On(this,e,Jn,Gn,Yn,{layout:0})}get layout(){return this.$$.ctx[0]}set layout(e){this.$$set({layout:e}),Fn()}}const{SvelteComponent:Qn,attr:Wn,bubble:ye,check_outros:ve,construct_svelte_component:R,create_component:Y,destroy_component:G,detach:_e,element:Xn,empty:ke,flush:x,group_outros:$e,init:xn,insert:ce,mount_component:J,noop:el,safe_not_equal:tl,transition_in:T,transition_out:D}=window.__gradio__svelte__internal;function nl(n){let e,l,t;var i=n[1][n[0]];function s(o,r){return{props:{value:o[2],show_label:!1,label:"chatbot-image",show_share_button:!0,i18n:o[6],gradio:{dispatch:fl}}}}
7return i&&(e=R(i,s(n)),e.$on("load",n[14])),{c(){e&&Y(e.$$.fragment),l=ke()},m(o,r){e&&J(e,o,r),ce(o,l,r),t=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){$e();const a=e;D(a.$$.fragment,1,0,()=>{G(a,1)}),ve()}i?(e=R(i,s(o)),e.$on("load",o[14]),Y(e.$$.fragment),T(e.$$.fragment,1),J(e,l.parentNode,l)):e=null}else if(i){const a={};r&4&&(a.value=o[2]),r&64&&(a.i18n=o[6]),e.$set(a)}},i(o){t||(e&&T(e.$$.fragment,o),t=!0)},o(o){e&&D(e.$$.fragment,o),t=!1},d(o){o&&_e(l),e&&G(e,o)}}}function ll(n){let e,l,t;var i=n[1][n[0]];function s(o,r){return{props:{value:o[2],show_label:!1,label:"chatbot-image",show_download_button:!1,i18n:o[6]}}}return i&&(e=R(i,s(n)),e.$on("load",n[13])),{c(){e&&Y(e.$$.fragment),l=ke()},m(o,r){e&&J(e,o,r),ce(o,l,r),t=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){$e();const a=e;D(a.$$.fragment,1,0,()=>{G(a,1)}),ve()}i?(e=R(i,s(o)),e.$on("load",o[13]),Y(e.$$.fragment),T(e.$$.fragment,1),J(e,l.parentNode,l)):e=null}else if(i){const a={};r&4&&(a.value=o[2]),r&64&&(a.i18n=o[6]),e.$set(a)}},i(o){t||(e&&T(e.$$.fragment,o),t=!0)},o(o){e&&D(e.$$.fragment,o),t=!1},d(o){o&&_e(l),e&&G(e,o)}}}function il(n){let e,l,t;var i=n[1][n[0]];function s(o,r){return{props:{autoplay:!0,value:o[2].video||o[2],show_label:!1,show_share_button:!0,i18n:o[6],upload:o[7],show_download_button:!1,$$slots:{default:[rl]},$$scope:{ctx:o}}}}return i&&(e=R(i,s(n)),e.$on("load",n[12])),{c(){e&&Y(e.$$.fragment),l=ke()},m(o,r){e&&J(e,o,r),ce(o,l,r),t=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){$e();const a=e;D(a.$$.fragment,1,0,()=>{G(a,1)}),ve()}i?(e=R(i,s(o)),e.$on("load",o[12]),Y(e.$$.fragment),T(e.$$.fragment,1),J(e,l.parentNode,l)):e=null}else if(i){const a={};r&4&&(a.value=o[2].video||o[2]),r&64&&(a.i18n=o[6]),r&128&&(a.upload=o[7]),r&32768&&(a.$$scope={dirty:r,ctx:o}),e.$set(a)}},i(o){t||(e&&T(e.$$.fragment,o),t=!0)},o(o){e&&D(e.$$.fragment,o),t=!1},d(o){o&&_e(l),e&&G(e,o)}}}function ol(n){let e,l,t;var i=n[1][n[0]];function s(o,r){return{props:{value:o[2],show_label:!1,show_share_button:!0,i18n:o[6],label:"",waveform_settings:{},waveform_options:{},show_download_button:!1}}}return i&&(e=R(i,s(n)),e.$on("load",n[11])),{c(){e&&Y(e.$$.fragment),l=ke()},m(o,r){e&&J(e,o,r),ce(o,l,r),t=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){$e();const a=e;D(a.$$.fragment,1,0,()=>{G(a,1)}),ve()}i?(e=R(i,s(o)),e.$on("load",o[11]),Y(e.$$.fragment),T(e.$$.fragment,1),J(e,l.parentNode,l)):e=null}else if(i){const a={};r&4&&(a.value=o[2]),r&64&&(a.i18n=o[6]),e.$set(a)}},i(o){t||(e&&T(e.$$.fragment,o),t=!0)},o(o){e&&D(e.$$.fragment,o),t=!1},d(o){o&&_e(l),e&&G(e,o)}}}function al(n){let e,l,t;var i=n[1][n[0]];function s(o,r){return{props:{value:o[2],target:o[3],theme_mode:o[4],bokeh_version:o[5].bokeh_version,caption:"",show_actions_button:!0}}}return i&&(e=R(i,s(n)),e.$on("load",n[10])),{c(){e&&Y(e.$$.fragment),l=ke()},m(o,r){e&&J(e,o,r),ce(o,l,r),t=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){$e();const a=e;D(a.$$.fragment,1,0,()=>{G(a,1)}),ve()}i?(e=R(i,s(o)),e.$on("load",o[10]),Y(e.$$.fragment),T(e.$$.fragment,1),J(e,l.parentNode,l)):e=null}else if(i){const a={};r&4&&(a.value=o[2]),r&8&&(a.target=o[3]),r&16&&(a.theme_mode=o[4]),r&32&&(a.bokeh_version=o[5].bokeh_version),e.$set(a
vendor: 5,313 bytes, line 7
7)}},i(o){t||(e&&T(e.$$.fragment,o),t=!0)},o(o){e&&D(e.$$.fragment,o),t=!1},d(o){o&&_e(l),e&&G(e,o)}}}function sl(n){let e,l,t;var i=n[1][n[0]];function s(o,r){return{props:{value:o[2],show_label:!1,i18n:o[6],label:"",_fetch:o[8],allow_preview:!1,interactive:!1,mode:"minimal",fixed_height:1}}}return i&&(e=R(i,s(n)),e.$on("load",n[9])),{c(){e&&Y(e.$$.fragment),l=ke()},m(o,r){e&&J(e,o,r),ce(o,l,r),t=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){$e();const a=e;D(a.$$.fragment,1,0,()=>{G(a,1)}),ve()}i?(e=R(i,s(o)),e.$on("load",o[9]),Y(e.$$.fragment),T(e.$$.fragment,1),J(e,l.parentNode,l)):e=null}else if(i){const a={};r&4&&(a.value=o[2]),r&64&&(a.i18n=o[6]),r&256&&(a._fetch=o[8]),e.$set(a)}},i(o){t||(e&&T(e.$$.fragment,o),t=!0)},o(o){e&&D(e.$$.fragment,o),t=!1},d(o){o&&_e(l),e&&G(e,o)}}}function rl(n){let e;return{c(){e=Xn("track"),Wn(e,"kind","captions")},m(l,t){ce(l,e,t)},p:el,d(l){l&&_e(e)}}}function ul(n){let e,l,t,i;const s=[sl,al,ol,il,ll,nl],o=[];function r(a,u){return a[0]==="gallery"?0:a[0]==="plot"?1:a[0]==="audio"?2:a[0]==="video"?3:a[0]==="image"?4:a[0]==="html"?5:-1}return~(e=r(n))&&(l=o[e]=s[e](n)),{c(){l&&l.c(),t=ke()},m(a,u){~e&&o[e].m(a,u),ce(a,t,u),i=!0},p(a,[u]){let f=e;e=r(a),e===f?~e&&o[e].p(a,u):(l&&($e(),D(o[f],1,1,()=>{o[f]=null}),ve()),~e?(l=o[e],l?l.p(a,u):(l=o[e]=s[e](a),l.c()),T(l,1),l.m(t.parentNode,t)):l=null)},i(a){i||(T(l),i=!0)},o(a){D(l),i=!1},d(a){a&&_e(t),~e&&o[e].d(a)}}}const fl=()=>{};function _l(n,e,l){let{type:t}=e,{components:i}=e,{value:s}=e,{target:o}=e,{theme_mode:r}=e,{props:a}=e,{i18n:u}=e,{upload:f}=e,{_fetch:p}=e;function v(h){ye.call(this,n,h)}function m(h){ye.call(this,n,h)}function d(h){ye.call(this,n,h)}function g(h){ye.call(this,n,h)}function H(h){ye.call(this,n,h)}function E(h){ye.call(this,n,h)}return n.$$set=h=>{"type"in h&&l(0,t=h.type),"components"in h&&l(1,i=h.components),"value"in h&&l(2,s=h.value),"target"in h&&l(3,o=h.target),"theme_mode"in h&&l(4,r=h.theme_mode),"props"in h&&l(5,a=h.props),"i18n"in h&&l(6,u=h.i18n),"upload"in h&&l(7,f=h.upload),"_fetch"in h&&l(8,p=h._fetch)},[t,i,s,o,r,a,u,f,p,v,m,d,g,H,E]}class cl extends Qn{constructor(e){super(),xn(this,e,_l,ul,tl,{type:0,components:1,value:2,target:3,theme_mode:4,props:5,i18n:6,upload:7,_fetch:8})}get type(){return this.$$.ctx[0]}set type(e){this.$$set({type:e}),x()}get components(){return this.$$.ctx[1]}set components(e){this.$$set({components:e}),x()}get value(){return this.$$.ctx[2]}set value(e){this.$$set({value:e}),x()}get target(){return this.$$.ctx[3]}set target(e){this.$$set({target:e}),x()}get theme_mode(){return this.$$.ctx[4]}set theme_mode(e){this.$$set({theme_mode:e}),x()}get props(){return this.$$.ctx[5]}set props(e){this.$$set({props:e}),x()}get i18n(){return this.$$.ctx[6]}set i18n(e){this.$$set({i18n:e}),x()}get upload(){return this.$$.ctx[7]}set upload(e){this.$$set({upload:e}),x()}get _fetch(){return this.$$.ctx[8]}set _fetch(e){this.$$set({_fetch:e}),x()}}const{SvelteComponent:hl,append:ml,attr:ge,detach:dl,init:gl,insert:bl,noop:et,safe_not_equal:wl,svg_element:bt}=window.__gradio__svelte__internal;function pl(n){let e,l;return{c(){e=bt("svg"),l=bt("path"),ge(l,"d","M11.25 6.61523H9.375V1.36523H11.25V6.61523ZM3.375 1.36523H8.625V6.91636L7.48425 8.62748L7.16737 10.8464C7.14108 11.0248 7.05166 11.1879 6.91535 11.3061C6.77904 11.4242 6.60488 11.4896 6.4245 11.4902H6.375C6.07672 11.4899 5.79075 11.3713 5.57983 11.1604C5.36892 10.9495 5.2503 10.6635 5.25 10.3652V8.11523H2.25C1.85233 8.11474 1.47109 7.95654 1.18989 7.67535C0.908691 7.39415 0.750496 7.01291 0.75 6.61523V3.99023C0.750992 3.29435 1.02787 2.62724 1.51994 2.13517C2.01201 1.64311 2.67911 1.36623 3.375 1.36523Z"),ge(l,"fill","currentColor"),ge(e,"width","16"),ge(e,"height","16"),ge(e,"viewBox","0 0 12 12"),ge(e,"fill","none"),ge(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){bl(t,e,i),ml(e,l)},p:et,i:et,o:et,d(t){t&&dl(e)}}}class vl extends hl{constructor(e){super(),gl(this,e,null,pl,wl,{})}}const{SvelteComponent:kl,append:$l,attr:be,detach:Cl,init:yl,insert:ql,noop:tt,safe_not_equal:zl,svg_element:wt}=window.__gradio__svelte__internal;function Hl(n){let e,l;return{c(){e=wt("svg"),l=wt("path"),be(l,"d","M2.25 8.11523H4.5V10.3652C4.5003 10.6635 4.61892 10.9495 4.82983 11.1604C5.04075 11.3713 5.32672 11.4899 5.625 11.4902H6.42488C6.60519 11.4895 6.77926 11.4241 6.91549 11.3059C7.05172 11.1878 7.14109 11.0248 7.16737 10.8464L7.48425 8.62748L8.82562 6.61523H11.25V1.36523H3.375C2.67911 1.36623 2.01201 1.64311 1.51994 2.13517C1.02787 2.62724 0.750992 3.29435 0.75 3.99023V6.61523C0.750496 7.01291 0.908691 7.39415 1.18989 7.67535C1.47109 7.95654 1.85233 8.11474 2.25 8.11523ZM9 2.11523H10.5V5.86523H9V2.11523ZM1.5 3.99023C1.5006 3.49314 1.69833 3.01657 2.04983 2.66507C2.40133 2.31356 2.8779 2.11583 3.375 2.11523H8.25V6.12661L6.76575 8.35298L6.4245 10.7402H5.625C5.52554 10.7402 5.43016 10.7007 5.35983 10.6304C5.28951 10.5601 5.25 10.4647 5.25 10.3652V7.36523H2.25C2.05118 7.36494 1.86059 7.28582 1.72 7.14524C1.57941 7.00465 1.5003 6.81406 1.5 6.61523V3.99023Z"),be(l,"fill","currentColor"),be(e,"width","16"),be(e,"height","16"),be(e,"viewBox","0 0 12 12"),be(e,"fill","none"),be(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){ql(t,e,i),$l(e,l)},p:tt,i:tt,o:tt,d(t){t&&Cl(e)}}}class Sl extends kl{constructor(e){super(),yl(this,e,null,Hl,zl,{})}}
7const{SvelteComponent:Vl,append:Ll,attr:we,detach:Ml,init:Bl,insert:Nl,noop:nt,safe_not_equal:jl,svg_element:pt}=window.__gradio__svelte__internal;function Al(n){let e,l;return{c(){e=pt("svg"),l=pt("path"),we(l,"d","M0.75 6.24023H2.625V11.4902H0.75V6.24023ZM8.625 11.4902H3.375V5.93911L4.51575 4.22798L4.83263 2.00911C4.85892 1.83065 4.94834 1.66754 5.08465 1.5494C5.22096 1.43125 5.39512 1.36591 5.5755 1.36523H5.625C5.92328 1.36553 6.20925 1.48415 6.42017 1.69507C6.63108 1.90598 6.7497 2.19196 6.75 2.49023V4.74023H9.75C10.1477 4.74073 10.5289 4.89893 10.8101 5.18012C11.0913 5.46132 11.2495 5.84256 11.25 6.24023V8.86523C11.249 9.56112 10.9721 10.2282 10.4801 10.7203C9.98799 11.2124 9.32089 11.4892 8.625 11.4902Z"),we(l,"fill","currentColor"),we(e,"width","16"),we(e,"height","16"),we(e,"viewBox","0 0 12 12"),we(e,"fill","none"),we(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){Nl(t,e,i),Ll(e,l)},p:nt,i:nt,o:nt,d(t){t&&Ml(e)}}}class Zl extends Vl{constructor(e){super(),Bl(this,e,null,Al,jl,{})}}const{SvelteComponent:Tl,append:Dl,attr:pe,detach:El,init:Pl,insert:Ul,noop:lt,safe_not_equal:Il,svg_element:vt}=window.__gradio__svelte__internal;function Fl(n){let e,l;return{c(){e=vt("svg"),l=vt("path"),pe(l,"d","M9.75 4.74023H7.5V2.49023C7.4997 2.19196 7.38108 1.90598 7.17017 1.69507C6.95925 1.48415 6.67328 1.36553 6.375 1.36523H5.57512C5.39481 1.366 5.22074 1.43138 5.08451 1.54952C4.94828 1.66766 4.85891 1.83072 4.83262 2.00911L4.51575 4.22798L3.17438 6.24023H0.75V11.4902H8.625C9.32089 11.4892 9.98799 11.2124 10.4801 10.7203C10.9721 10.2282 11.249 9.56112 11.25 8.86523V6.24023C11.2495 5.84256 11.0913 5.46132 10.8101 5.18012C10.5289 4.89893 10.1477 4.74073 9.75 4.74023ZM3 10.7402H1.5V6.99023H3V10.7402ZM10.5 8.86523C10.4994 9.36233 10.3017 9.8389 9.95017 10.1904C9.59867 10.5419 9.1221 10.7396 8.625 10.7402H3.75V6.72886L5.23425 4.50248L5.5755 2.11523H6.375C6.47446 2.11523 6.56984 2.15474 6.64017 2.22507C6.71049 2.2954 6.75 2.39078 6.75 2.49023V5.49023H9.75C9.94882 5.49053 10.1394 5.56965 10.28 5.71023C10.4206 5.85082 10.4997 6.04141 10.5 6.24023V8.86523Z"),pe(l,"fill","currentColor"),pe(e,"width","16"),pe(e,"height","16"),pe(e,"viewBox","0 0 12 12"),pe(e,"fill","none"),pe(e,"xmlns","http://www.w3.org/2000/svg")},m(t,i){Ul(t,e,i),Dl(e,l)},p:lt,i:lt,o:lt,d(t){t&&El(e)}}}class Ol extends Tl{constructor(e){super(),Pl(this,e,null,Fl,Il,{})}}const{SvelteComponent:Rl,append:kt,attr:oe,check_outros:$t,create_component:Ie,destroy_component:Fe,detach:it,element:Te,flush:Ct,group_outros:yt,init:Yl,insert:ot,listen:qt,mount_component:Oe,run_all:Gl,safe_not_equal:Jl,space:Kl,toggle_class:ae,transition_in:ue,transition_out:fe}=window.__gradio__svelte__internal;function Ql(n){let e,l;return e=new Sl({}),{c(){Ie(e.$$.fragment)},m(t,i){Oe(e,t,i),l=!0},i(t){l||(ue(e.$$.fragment,t),l=!0)},o(t){fe(e.$$.fragment,t),l=!1},d(t){Fe(e,t)}}}function Wl(n){let e,l;return e=new vl({}),{c(){Ie(e.$$.fragment)},m(t,i){Oe(e,t,i),l=!0},i(t){l||(ue(e.$$.fragment,t),l=!0)},o(t){fe(e.$$.fragment,t),l=!1},d(t){Fe(e,t)}}}function Xl(n){let e,l;return e=new Ol({}),{c(){Ie(e.$$.fragment)},m(t,i){Oe(e,t,i),l=!0},i(t){l||(ue(e.$$.fragment,t),l=!0)},o(t){fe(e.$$.fragment,t),l=!1},d(t){Fe(e,t)}}}function xl(n){let e,l;return e=new Zl({}),{c(){Ie(e.$$.fragment)},m(t,i){Oe(e,t,i),l=!0},i(t){l||(ue(e.$$.fragment,t),l=!0)},o(t){fe(e.$$.fragment,t),l=!1},d(t){Fe(e,t)}}}function ei(n){let e,l,t,i,s,o,r,a,u,f,p,v,m,d;const g=[Wl,Ql],H=[];function E(w,L){return w[2]==="dislike"?0:1}t=E(n),i=H[t]=g[t](n);const h=[xl,Xl],C=[];function K(w,L){return w[2]==="like"?0:1}return u=K(n),f=C[u]=h[u](n),{c(){e=Te("button"),l=Te("span"),i.c(),o=Kl(),r=Te("button"),a=Te("span"),f.c(),oe(l,"class","svelte-19sx8ev"),oe(e,"aria-label",s=n[2]==="dislike"?"clicked dislike":"dislike"),oe(e,"class","dislike-button svelte-19sx8ev"),ae(e,"padded",n[1]),ae(e,"selected",n[2]==="dislike"),oe(a,"class","svelte-19sx8ev"),oe(r,"class","like-button svelte-19sx8ev"),oe(r,"aria-label",p=n[2]==="like"?"clicked like":"like"),ae(r,"padded",n[1]),ae(r,"selected",n[2]==="like")},m(w,L){ot(w,e,L),kt(e,l),H[t].m(l,null),ot(w,o,L),ot(w,r,L),kt(r,a),C[u].m(a,null),v=!0,m||(d=[qt(e,"click",n[3]),qt(r,"click",n[4])],m=!0)},p(w,[L]){let B=t;t=E(w),t!==B&&(yt(),fe(H[B],1,1,()=>{H[B]=null}),$t(),i=H[t],i||(i=H[t]=g[t](w),i.c()),ue(i,1),i.m(l,null)),(!v||L&4&&s!==(s=w[2]==="dislike"?"clicked dislike":"dislike"))&&oe(e,"aria-label",s),(!v||L&2)&&ae(e,"padded",w[1]),(!v||L&4)&&ae(e,"selected",w[2]==="dislike");let Q=u;u=K(w),u!==Q&&(yt(),fe(C[Q],1,1,()=>{C[Q]=null}),$t(),f=C[u],f||(f=C[u]=h[u](w),f.c()),ue(f,1),f.m(a,null)),(!v||L&4&&p!==(p=w[2]==="like"?"clicked like"
7:"like"))&&oe(r,"aria-label",p),(!v||L&2)&&ae(r,"padded",w[1]),(!v||L&4)&&ae(r,"selected",w[2]==="like")},i(w){v||(ue(i),ue(f),v=!0)},o(w){fe(i),fe(f),v=!1},d(w){w&&(it(e),it(o),it(r)),H[t].d(),C[u].d(),m=!1,Gl(d)}}}function ti(n,e,l){let{handle_action:t}=e,{padded:i=!1}=e,s=null;const o=()=>{l(2,s="dislike"),t(s)},r=()=>{l(2,s="like"),t(s)};return n.$$set=a=>{"handle_action"in a&&l(0,t=a.handle_action),"padded"in a&&l(1,i=a.padded)},[t,i,s,o,r]}class ni extends Rl{constructor(e){super(),Yl(this,e,ti,ei,Jl,{handle_action:0,padded:1})}get handle_action(){return this.$$.ctx[0]}set handle_action(e){this.$$set({handle_action:e}),Ct()}get padded(){return this.$$.ctx[1]}set padded(e){this.$$set({padded:e}),Ct()}}const{SvelteComponent:li,append:ii,attr:De,check_outros:zt,create_component:on,destroy_component:an,detach:oi,element:ai,flush:si,group_outros:Ht,init:ri,insert:ui,listen:fi,mount_component:sn,safe_not_equal:_i,space:ci,transition_in:se,transition_out:qe}=window.__gradio__svelte__internal,{onDestroy:hi}=window.__gradio__svelte__internal;function St(n){let e,l;return e=new qn({}),{c(){on(e.$$.fragment)},m(t,i){sn(e,t,i),l=!0},i(t){l||(se(e.$$.fragment,t),l=!0)},o(t){qe(e.$$.fragment,t),l=!1},d(t){an(e,t)}}}function Vt(n){let e,l;return e=new yn({}),{c(){on(e.$$.fragment)},m(t,i){sn(e,t,i),l=!0},i(t){l||(se(e.$$.fragment,t),l=!0)},o(t){qe(e.$$.fragment,t),l=!1},d(t){an(e,t)}}}function mi(n){let e,l,t,i,s,o,r=!n[0]&&St(),a=n[0]&&Vt();return{c(){e=ai("button"),r&&r.c(),l=ci(),a&&a.c(),De(e,"class","action svelte-6u540h"),De(e,"title","copy"),De(e,"aria-label",t=n[0]?"Copied message":"Copy message")},m(u,f){ui(u,e,f),r&&r.m(e,null),ii(e,l),a&&a.m(e,null),i=!0,s||(o=fi(e,"click",n[1]),s=!0)},p(u,[f]){u[0]?r&&(Ht(),qe(r,1,1,()=>{r=null}),zt()):r?f&1&&se(r,1):(r=St(),r.c(),se(r,1),r.m(e,l)),u[0]?a?f&1&&se(a,1):(a=Vt(),a.c(),se(a,1),a.m(e,null)):a&&(Ht(),qe(a,1,1,()=>{a=null}),zt()),(!i||f&1&&t!==(t=u[0]?"Copied message":"Copy message"))&&De(e,"aria-label",t)},i(u){i||(se(r),se(a),i=!0)},o(u){qe(r),qe(a),i=!1},d(u){u&&oi(e),r&&r.d(),a&&a.d(),s=!1,o()}}}function di(n,e,l){let t=!1,{value:i}=e,s;function o(){l(0,t=!0),s&&clearTimeout(s),s=setTimeout(()=>{l(0,t=!1)},2e3)}async function r(){if("clipboard"in navigator)await navigator.clipboard.writeText(i),o();else{const a=document.createElement("textarea");a.value=i,a.style.position="absolute",a.style.left="-999999px",document.body.prepend(a),a.select();try{document.execCommand("copy"),o()}catch(u){console.error(u)}finally{a.remove()}}}return hi(()=>{s&&clearTimeout(s)}),n.$$set=a=>{"value"in a&&l(2,i=a.value)},[t,r,i]}class gi extends li{constructor(e){super(),ri(this,e,di,mi,_i,{value:2})}get value(){return this.$$.ctx[2]}set value(e){this.$$set({value:e}),si()}}const{SvelteComponent:bi,append:Lt,attr:ee,detach:wi,init:pi,insert:vi,noop:at,safe_not_equal:ki,svg_element:st}=window.__gradio__svelte__internal;function $i(n){let e,l,t;return{c(){e=st("svg"),l=st("path"),t=st("path"),ee(l,"d","M6.27701 8.253C6.24187 8.29143 6.19912 8.32212 6.15147 8.34311C6.10383 8.36411 6.05233 8.37495 6.00026 8.37495C5.94819 8.37495 5.89669 8.36411 5.84905 8.34311C5.8014 8.32212 5.75865 8.29143 5.72351 8.253L3.72351 6.0655C3.65798 5.99185 3.62408 5.89536 3.62916 5.79691C3.63424 5.69846 3.67788 5.60596 3.75064 5.53945C3.8234 5.47293 3.91943 5.43774 4.01794 5.44149C4.11645 5.44525 4.20952 5.48764 4.27701 5.5595L5.62501 7.0345V1.5C5.62501 1.40054 5.66452 1.30516 5.73485 1.23483C5.80517 1.16451 5.90055 1.125 6.00001 1.125C6.09947 1.125 6.19485 1.16451 6.26517 1.23483C6.3355 1.30516 6.37501 1.40054 6.37501 1.5V7.034L7.72351 5.559C7.79068 5.4856 7.88425 5.44189 7.98364 5.43748C8.08304 5.43308 8.18011 5.46833 8.25351 5.5355C8.32691 5.60267 8.37062 5.69624 8.37503 5.79563C8.37943 5.89503 8.34418 5.9921 8.27701 6.0655L6.27701 8.253Z"),ee(l,"fill","currentColor"),ee(t,"d","M1.875 7.39258C1.875 7.29312 1.83549 7.19774 1.76517 7.12741C1.69484 7.05709 1.59946 7.01758 1.5 7.01758C1.40054 7.01758 1.30516 7.05709 1.23483 7.12741C1.16451 7.19774 1.125 7.29312 1.125 7.39258V7.42008C1.125 8.10358 1.125 8.65508 1.1835 9.08858C1.2435 9.53858 1.3735 9.91758 1.674 10.2186C1.975 10.5196 2.354 10.6486 2.804 10.7096C3.2375 10.7676 3.789 10.7676 4.4725 10.7676H7.5275C8.211 10.7676 8.7625 10.7676 9.196 10.7096C9.646 10.6486 10.025 10.5196 10.326 10.2186C10.627 9.91758 10.756 9.53858 10.817 9.08858C10.875 8.65508 10.875 8.10358 10.875 7.42008V7.39258C10.875 7.29312 10.8355 7.19774 10.7652 7.12741C10.6948 7.05709 10.5995 7.01758 10.5 7.01758C10.4005 7.01758 10.3052 7.05709 10.2348 7.12741C10.1645 7.19774 10.125 7.29312 10.125 7.39258C10.125 8.11008 10.124 8.61058 10.0735 8.98858C10.024 9.35558 9.9335 9.54958 9.7955 9.68808C9.657 9.82658 9.463 9.91658 9.0955 9.96608C8.718 10.0166 8.2175 10.0176 7.5 10.0176H4.5C3.7825 10.0176 3.2815 10.0166 2.904 9.96608C2.537 9.91658 2.343 9.82608 2.2045 9.68808C2.066 9.54958 1.976 9.35558 1.9265 8.98808C1.876 8.61058 1.875 8.11008 1.875 7.39258Z"),ee(t,"fill","currentColor"),ee(e,"width","16"),ee(e,"height","16"),ee(e,"viewBox","0 0 12 12"),ee(e,"fill","none"),ee(e,"xmlns","http://www.w3.org/2000/svg")},m(i,s){vi(i,e,s),Lt(e,l),Lt(e,t)},p:at,i:at,o:at,d(i){i&&wi(e)}}}class Ci extends bi{constructor(e){super(),pi(this,e,null,$i,ki,{})}}const{SvelteComponent:yi,append:Mt,attr:rt,check_outros:Ee,create_component:Re,destroy_component:Ye,detach:ft,element:rn,empty:qi,flush:te,group_outros:Pe,init:zi,insert:_t,mount_component:Ge,noop:Hi,safe_not_equal:Si,space:Bt,transition_in:A,transition_out:O}=window.__gradio__svelte__internal;function Nt(n){let e,l,t,i,s,o=n[8]&&jt(n),r=n[0]&&At(n),a=n[1]&&n[4]==="left"&&Zt(n);return{c(){e=rn("div"),o&&o.c(),l=Bt(),r&&r.c(),t=Bt(),a&&a.c(),rt(e,"class",i="message-buttons-"+n[4]+" "+n[7]+" message-buttons "+(n[5]!==null&&"with-avatar")+" svelte-1ceq9ga")},m(u,f){_t(u,e,f),o&&o.m(e,null),Mt(e,l),r&&r.m(e,null),Mt(e,t),a&&a.m(e,null),s=!0},p(u,f){u[8]?o?(o.p(u,f),f&256&&A(o,1)):(o=jt(u),o.c(),A(o,1),o.m(e,l)):o&&(Pe(),O(o,1,1,()=>{o=null}),Ee()),u[0]?r?(r.p(u,f),f&1&&A(r,1)):(r=At(u),r.c(),A(r,1),r.m(e,t)):r&&(Pe(),O(r,1,1,()=>{r=null}),Ee()),u[1]&&u[4]==="left"?a?(a.p(u,f),f&18&&A(a,1)):(a=Zt(u),a.c(),A(a,1),a.m(e,null)):a&&(Pe(),O(a,1,1,()=>{a=null}),Ee()),(!s||f&176&&i!==(i="message-buttons-"+u[4]+" "+u[7]+" message-buttons "+(u[5]!==null&&"with-avatar")+" svelte-1ceq9ga"))&&rt(e,"class",i)},i(u){s||(A(o),A(r),A(a),s=!0)},o(u){O(o),O(r),O(a),s=!1},d(u){u&&ft(e),o&&o.d(),r&&r.d(),a&&a.d()}}}function jt(n){let e,l;return e=new gi({props:{value:n[3].value}}),{c(){Re(e.$$.fragment)},m(t,i){Ge(e,t,i),l=!0},p(t,i){const s={};i&8&&(s.value=t[3].value),e.$set(s)},i(t){l||(A(e.$$.fragment,t),l=!0)},o(t){O(e.$$.fragment,t),l=!1},d(t){Ye(e,t)}}}function At(n){let e,l;return e=new zn({props:{href:n[3]?.value?.video?.url||n[3]?.value?.url,download:n[3]?.value?.video?.orig_name||n[3].value.orig_name||"image",$$slots:{default:[Vi]},$$scope:{ctx:n}}}),{c(){Re(e.$$.fragment)},m(t,i){Ge(e,t,i),l=!0},p(t,i){const s={};i&8&&(s.href=t[3]?.value?.video?.url||t[3]?.value?.url),i&8&&(s.download=t[3]?.value?.video?.orig_name||t[3].value.orig_name||"image"),i&1024&&(s.$$scope={dirty:i,ctx:t}),e.$set(s)},i(t){l||(A(e.$$.fragment,t),l=!0)},o(t){O(e.$$.fragment,t),l=!1},d(t){Ye(e,t)}}}function Vi(n){let e,l,t;return l=new Ci({}),{c(){e=rn("span"),Re(l.$$.fragment),rt(e,"class","icon-wrap svelte-1ceq9ga")},m(i,s){_t(i,e,s),Ge(l,e,null),t=!0},p:Hi,i(i){t||(A(l.$$.fragment,i),t=!0)},o(i){O(l.$$.fragment,i),t=!1},d(i){i&&ft(e),Ye(l)}}}function Zt(n){let e,l;return e=new ni({props:{handle_action:n[6],padded:n[8]||n[0]}}),{c(){Re(e.$$.fragment)},m(t,i){Ge(e,t,i),l=!0},p(t,i){const s={};i&64&&(s.handle_action=t[6]),i&257&&(s.padded=t[8]||t[0]),e.$set(s)},i(t){l||(A(e.$$.fragment,t),l=!0)},o(t){O(e.$$.fragment,t),l=!1},d(t){Ye(e,t)}}}function Li(n){let e,l,t=n[2]&&Nt(n);return{c(){t&&t.c(),e=qi()},m(i,s){t&&t.m(i,s),_t(i,e,s),l=!0},p(i,[s]){i[2]?t?(t.p(i,s),s&4&&A(t,1)):(t=Nt(i),t.c(),A(t,1),t.m(e.parentNode,e)):t&&(Pe(),O(t,1,1,()=>{t=null}),Ee())},i(i){l||(A(t),l=!0)},o(i){O(t),l=!1},d(i){i&&ft(e),t&&t.d(i)}}}function Mi(n,e,l){let t,{likeable:i}=e,{show_copy_button:s}=e,{show:o}=e,{message:r}=e,{position:a}=e,{avatar:u}=e,{show_download:f=!1}=e,{handle_action:p}=e,{layout:v}=e;return n.$$set=m=>{"likeable"in m&&l(1,i=m.likeable),"show_copy_button"in m&&l(9,s=m.show_copy_button),"show"in m&&l(2,o=m.show),"message"in m&&l(3,r=m.message),"position"in m&&l(4,a=m.position),"avatar"in m&&l(5,u=m.avatar),"show_download"in m&&l(0,f=m.show_download),"handle_action"in m&&l(6,p=m.handle_action),"layout"in m&&l(7,v=m.layout)},n.$$.update=()=>{n.$$.dirty&520&&l(8,t=s&&r&&r?.type==="text"),n.$$.dirty&9&&l(0,f=f&&r?.value?.video?.url||r?.value?.url)},[f,i,o,r,a,u,p,v,t,s]}class Bi extends yi{constructor(e){super(),zi(this,e,Mi,Li,Si,{likeable:1,show_copy_button:9,show:2,message:3,position:4,avatar:5,show_download:0,handle_action:6,layout:7})}get likeable(){return this.$$.ctx[1]}set likeable(e){this.$$set({likeable:e}),te()}get show_copy_button(){return this.$$.ctx[9]}set show_copy_button(e){this.$$set({show_copy_button:e}),te()}get show(){return this.$$.ctx[2]}set show(e){this.$$set({show:e}),te()}get message(){return this.$$.ctx[3]}set message(e){this.$$set({message:e}),te()}get position(){return this.$$.ctx[4]}set position(e){this.$$set({position:e}),te()}get avatar(){return this.$$.ctx[5]}set avatar(e){this.$$set({avatar:e}),te()}get show_download(){return this.$$.ctx[0]}set show_download(e){this.$$set({show_download:e}),te()}get handle_action(){return this.$$.ctx[6]}set handle_action(e){this.$$set({handle_action:e}),te()}get layout(){return this.$$.ctx[7]}set layout(e){this.$$set({layout:e}),te()}}const{SvelteComponent:Ni,action_destroyer:ji,append:X,attr:k,binding_callbacks:Ai,bubble:Tt,check_outros:ne,create_component:he,destroy_component:me,destroy_each:un,detach:I,element:U,empty:ct,ensure_array_like:Ue,flush:M,group_outros:le,init:Zi,insert:F,listen:ut,mount_component:de,noop:Dt,null_to_empty:Et,run_all:Ti,safe_not_equal:Di,set_data:Ei,set_style:Me,space:ze,src_url_equal:Pt,text:Pi,toggle_class:V,transition_in:$,transition_out:z}=window.__gradio__svelte__internal,{beforeUpdate:Ui,afterUpdate:Ii,createEventDispatcher:Fi,tick:Oi}=window.__gradio__svelte__internal;function Ut(n,e,l){const t=n.slice();return t[41]=e[l],t[43]=l,t}function It(n,e,l){const t=n.slice();return t[44]=e[l],t[46]=l,t}function Ft(n){let e,l,t;return l=new $n({props:{i18n:n[15],formatter:Zn,value:n[1]}}),l.$on("error",n[31]),l.$on("share",n[32]),{c(){e=U("div"),he(l.$$.fragment),k(e,"class","share-button svelte-x4qvqz")},m(i,s){F(i,e,s),de(l,e,null),t=!0},p(i,s){const o={};
7s[0]&32768&&(o.i18n=i[15]),s[0]&2&&(o.value=i[1]),l.$set(o)},i(i){t||($(l.$$.fragment,i),t=!0)},o(i){z(l.$$.fragment,i),t=!1},d(i){i&&I(e),me(l)}}}function Ri(n){let e,l,t;return l=new ln({props:{message:n[17],latex_delimiters:n[2]}}),{c(){e=U("center"),he(l.$$.fragment),k(e,"class","svelte-x4qvqz")},m(i,s){F(i,e,s),de(l,e,null),t=!0},p(i,s){const o={};s[0]&131072&&(o.message=i[17]),s[0]&4&&(o.latex_delimiters=i[2]),l.$set(o)},i(i){t||($(l.$$.fragment,i),t=!0)},o(i){z(l.$$.fragment,i),t=!1},d(i){i&&I(e),me(l)}}}function Yi(n){let e,l,t,i=Ue(n[1]),s=[];for(let a=0;a<i.length;a+=1)s[a]=Jt(Ut(n,i,a));const o=a=>z(s[a],1,1,()=>{s[a]=null});let r=n[3]&&Kt(n);return{c(){for(let a=0;a<s.length;a+=1)s[a].c();e=ze(),r&&r.c(),l=ct()},m(a,u){for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(a,u);F(a,e,u),r&&r.m(a,u),F(a,l,u),t=!0},p(a,u){if(u[0]&267255735){i=Ue(a[1]);let f;for(f=0;f<i.length;f+=1){const p=Ut(a,i,f);s[f]?(s[f].p(p,u),$(s[f],1)):(s[f]=Jt(p),s[f].c(),$(s[f],1),s[f].m(e.parentNode,e))}for(le(),f=i.length;f<s.length;f+=1)o(f);ne()}a[3]?r?(r.p(a,u),u[0]&8&&$(r,1)):(r=Kt(a),r.c(),$(r,1),r.m(l.parentNode,l)):r&&(le(),z(r,1,1,()=>{r=null}),ne())},i(a){if(!t){for(let u=0;u<i.length;u+=1)$(s[u]);$(r),t=!0}},o(a){s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)z(s[u]);z(r),t=!1},d(a){a&&(I(e),I(l)),un(s,a),r&&r.d(a)}}}function Ot(n){let e,l,t,i,s,o,r,a,u,f,p,v,m,d,g,H,E,h=n[23]&&Rt(n),C=n[9][n[46]]!==null&&Yt(n);const K=[Ki,Ji,Gi],w=[];function L(y,b){return y[44].type==="text"?0:y[44].type==="component"&&y[44].component in y[19]?1:y[44].type==="component"&&y[44].component==="file"?2:-1}~(r=L(n))&&(a=w[r]=K[r](n));function B(){return n[34](n[43],n[46],n[44])}function Q(...y){return n[35](n[43],n[46],n[44],...y)}function ie(...y){return n[36](n[43],n[46],n[44],...y)}return m=new Bi({props:{show:n[5]&&n[46]===1||n[8]&&n[44]&&typeof n[44]=="string",handle_action:ie,likeable:n[5],show_copy_button:n[8],message:n[44],position:n[46]===0?"right":"left",avatar:n[9][n[46]],show_download:!0,layout:n[16]}}),{c(){h&&h.c(),e=ze(),l=U("div"),C&&C.c(),t=ze(),i=U("div"),s=U("div"),o=U("button"),a&&a.c(),v=ze(),he(m.$$.fragment),k(o,"data-testid",n[46]==0?"user":"bot"),k(o,"dir",u=n[7]?"rtl":"ltr"),k(o,"aria-label",f=(n[46]==0?"user":"bot")+"'s message: "+(typeof n[44]=="string"?n[44]:"file"in n[44]&&n[44].file!==void 0&&!Array.isArray(n[44].file)?`a file of type ${n[44].file?.mime_type}, ${n[44].file?.alt_text??n[44].file?.orig_name??""}`:"")),k(o,"class","svelte-x4qvqz"),V(o,"latest",n[43]===n[1].length-1),V(o,"message-markdown-disabled",!n[12]),V(o,"selectable",n[4]),Me(o,"user-select","text"),Me(o,"text-align",n[7]?"right":"left"),k(s,"class",p="message "+(n[46]==0?"user":"bot")+" "+(typeof n[44]=="object"&&n[44]!==null&&"component"in n[44]?n[44]?.component:"")+" svelte-x4qvqz"),V(s,"message-fit",!n[11]),V(s,"panel-full-width",!0),V(s,"message-markdown-disabled",!n[12]),V(s,"component",typeof n[44]=="object"&&n[44]!==null&&"component"in n[44]),V(s,"html",typeof n[44]=="object"&&n[44]!==null&&"component"in n[44]&&n[44].component==="html"),Me(s,"text-align",n[7]&&n[46]==0?"left":"right"),k(i,"class","flex-wrap svelte-x4qvqz"),k(l,"class",d="message-row "+n[16]+" "+(n[46]==0?"user-row":"bot-row")+" svelte-x4qvqz"),V(l,"with_avatar",n[9][n[46]]!==null),V(l,"with_opposite_avatar",n[9][n[46]===0?1:0]!==null)},m(y,b){h&&h.m(y,b),F(y,e,b),F(y,l,b),C&&C.m(l,null),X(l,t),X(l,i),X(i,s),X(s,o),~r&&w[r].m(o,null),X(i,v),de(m,i,null),g=!0,H||(E=[ut(o,"click",B),ut(o,"keydown",Q)],H=!0)},p(y,b){n=y,n[23]?h?(h.p(n,b),b[0]&8388608&&$(h,1)):(h=Rt(n),h.c(),$(h,1),h.m(e.parentNode,e)):h&&(le(),z(h,1,1,()=>{h=null}),ne()),n[9][n[46]]!==null?C?(C.p(n,b),b[0]&512&&$(C,1)):(C=Yt(n),C.c(),$(C,1),C.m(l,t)):C&&(le(),z(C,1,1,()=>{C=null}),ne());let N=r;r=L(n),r===N?~r&&w[r].p(n,b):(a&&(le(),z(w[N],1,1,()=>{w[N]=null}),ne()),~r?(a=w[r],a?a.p(n,b):(a=w[r]=K[r](n),a.c()),$(a,1),a.m(o,null)):a=null),(!g||b[0]&128&&u!==(u=n[7]?"rtl":"ltr"))&&k(o,"dir",u),(!g||b[0]&2&&f!==(f=(n[46]==0?"user":"bot")+"'s message: "+(typeof n[44]=="string"?n[44]:"file"in n[44]&&n[44].file!==void 0&&!Array.isArray(n[44].file)?`a file of type ${n[44].file?.mime_type}, ${n[44].file?.alt_text??n[44].file?.orig_name??""}`:"")))&&k(o,"aria-label",f),(!g||b[0]&2)&&V(o,"latest",n[43]===n[1].length-1),(!g||b[0]&4096)&&V(o,"message-markdown-disabled",!n[12]),(!g||b[0]&16)&&V(o,"selectable",n[4]),b[0]&128&&Me(o,"text-align",n[7]?"right":"left"),(!g||b[0]&2&&p!==(p="message "+(n[46]==0?"user":"bot")+" "+(typeof n[44]=="object"&&n[44]!==null&&"component"in n[44]?n[44]?.component:"")+" svelte-x4qvqz"))&&k(s,"class",p),(!g||b[0]&2050)&&V(s,"message-fit",!n[11]),(!g||b[0]&2)&&V(s,"panel-full-width",!0),(!g||b[0]&4098)&&V(s,"message-markdown-disabled",!n[12]),(!g||b[0]&2)&&V(s,"component",typeof n[44]=="object"&&n[44]!==null&&"component"in n[44]),(!g||b[0]&2)&&V(s,"html",typeof n[44]=="object"&&n[44]!==null&&"component"in n[44]&&n[44].component==="html"),b[0]&128&&Me(s,"text-align",n[7]&&n[46]==0?"left":"right");const Z={};b[0]&290&&(Z.show=n[5]&&n[46]===1||n[8]&&n[44]&&typeof n[44]=="str
7ing"),b[0]&2&&(Z.handle_action=ie),b[0]&32&&(Z.likeable=n[5]),b[0]&256&&(Z.show_copy_button=n[8]),b[0]&2&&(Z.message=n[44]),b[0]&512&&(Z.avatar=n[9][n[46]]),b[0]&65536&&(Z.layout=n[16]),m.$set(Z),(!g||b[0]&65536&&d!==(d="message-row "+n[16]+" "+(n[46]==0?"user-row":"bot-row")+" svelte-x4qvqz"))&&k(l,"class",d),(!g||b[0]&66048)&&V(l,"with_avatar",n[9][n[46]]!==null),(!g||b[0]&66048)&&V(l,"with_opposite_avatar",n[9][n[46]===0?1:0]!==null)},i(y){g||($(h),$(C),$(a),$(m.$$.fragment,y),g=!0)},o(y){z(h),z(C),z(a),z(m.$$.fragment,y),g=!1},d(y){y&&(I(e),I(l)),h&&h.d(y),C&&C.d(),~r&&w[r].d(),me(m),H=!1,Ti(E)}}}function Rt(n){let e,l,t,i,s,o,r,a,u;return o=new wn({}),{c(){e=U("div"),l=U("img"),i=ze(),s=U("button"),he(o.$$.fragment),Pt(l.src,t=n[21])||k(l,"src",t),k(l,"alt",n[22]),k(l,"class","svelte-x4qvqz"),k(s,"class","image-preview-close-button svelte-x4qvqz"),k(e,"class","image-preview svelte-x4qvqz")},m(f,p){F(f,e,p),X(e,l),X(e,i),X(e,s),de(o,s,null),r=!0,a||(u=ut(s,"click",n[33]),a=!0)},p(f,p){(!r||p[0]&2097152&&!Pt(l.src,t=f[21]))&&k(l,"src",t),(!r||p[0]&4194304)&&k(l,"alt",f[22])},i(f){r||($(o.$$.fragment,f),r=!0)},o(f){z(o.$$.fragment,f),r=!1},d(f){f&&I(e),me(o),a=!1,u()}}}function Yt(n){let e,l,t;return l=new Cn({props:{class:"avatar-image",src:n[9][n[46]]?.url,alt:(n[46]==0?"user":"bot")+" avatar"}}),{c(){e=U("div"),he(l.$$.fragment),k(e,"class","avatar-container svelte-x4qvqz")},m(i,s){F(i,e,s),de(l,e,null),t=!0},p(i,s){const o={};s[0]&512&&(o.src=i[9][i[46]]?.url),l.$set(o)},i(i){t||($(l.$$.fragment,i),t=!0)},o(i){z(l.$$.fragment,i),t=!1},d(i){i&&I(e),me(l)}}}function Gi(n){let e,l=(n[44].value?.orig_name||n[44].value?.path.split("/").pop()||"file")+"",t,i,s;return{c(){e=U("a"),t=Pi(l),k(e,"data-testid","chatbot-file"),k(e,"class","file-pil svelte-x4qvqz"),k(e,"href",i=n[44].value.url),k(e,"target","_blank"),k(e,"download",s=window.__is_colab__?null:n[44].value?.orig_name||n[44].value?.path.split("/").pop()||"file")},m(o,r){F(o,e,r),X(e,t)},p(o,r){r[0]&2&&l!==(l=(o[44].value?.orig_name||o[44].value?.path.split("/").pop()||"file")+"")&&Ei(t,l),r[0]&2&&i!==(i=o[44].value.url)&&k(e,"href",i),r[0]&2&&s!==(s=window.__is_colab__?null:o[44].value?.orig_name||o[44].value?.path.split("/").pop()||"file")&&k(e,"download",s)},i:Dt,o:Dt,d(o){o&&I(e)}}}function Ji(n){let e,l;return e=new cl({props:{target:n[24],theme_mode:n[14],props:n[44].props,type:n[44].component,components:n[19],value:n[44].value,i18n:n[15],upload:n[18],_fetch:n[0]}}),e.$on("load",n[25]),{c(){he(e.$$.fragment)},m(t,i){de(e,t,i),l=!0},p(t,i){const s={};i[0]&16384&&(s.theme_mode=t[14]),i[0]&2&&(s.props=t[44].props),i[0]&2&&(s.type=t[44].component),i[0]&524288&&(s.components=t[19]),i[0]&2&&(s.value=t[44].value),i[0]&32768&&(s.i18n=t[15]),i[0]&262144&&(s.upload=t[18]),i[0]&1&&(s._fetch=t[0]),e.$set(s)},i(t){l||($(e.$$.fragment,t),l=!0)},o(t){z(e.$$.fragment,t),l=!1},d(t){me(e,t)}}}function Ki(n){let e,l;return e=new ln({props:{message:n[44].value,latex_delimiters:n[2],sanitize_html:n[10],render_markdown:n[12],line_breaks:n[13]}}),e.$on("load",n[25]),{c(){he(e.$$.fragment)},m(t,i){de(e,t,i),l=!0},p(t,i){const s={};i[0]&2&&(s.message=t[44].value),i[0]&4&&(s.latex_delimiters=t[2]),i[0]&1024&&(s.sanitize_html=t[10]),i[0]&4096&&(s.render_markdown=t[12]),i[0]&8192&&(s.line_breaks=t[13]),e.$set(s)},i(t){l||($(e.$$.fragment,t),l=!0)},o(t){z(e.$$.fragment,t),l=!1},d(t){me(e,t)}}}function Gt(n){let e,l,t=n[44].type!=="empty"&&Ot(n);return{c(){t&&t.c(),e=ct()},m(i,s){t&&t.m(i,s),F(i,e,s),l=!0},p(i,s){i[44].type!=="empty"?t?(t.p(i,s),s[0]&2&&$(t,1)):(t=Ot(i),t.c(),$(t,1),t.m(e.parentNode,e)):t&&(le(),z(t,1,1,()=>{t=null}),ne())},i(i){l||($(t),l=!0)},o(i){z(t),l=!1},d(i){i&&I(e),t&&t.d(i)}}}function Jt(n){let e,l,t=Ue(n[41]),i=[];for(let o=0;o<t.length;o+=1)i[o]=Gt(It(n,t,o));const s=o=>z(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=ct()},m(o,r){for(let a=0;a<i.length;a+=1)i[a]&&i[a].m(o,r);F(o,e,r),l=!0},p(o,r){if(r[0]&267255735){t=Ue(o[41]);let a;for(a=0;a<t.length;a+=1){const u=It(o,t,a);i[a]?(i[a].p(u,r),$(i[a],1)):(i[a]=Gt(u),i[a].c(),$(i[a],1),i[a].m(e.parentNode,e))}for(le(),a=t.length;a<i.length;a+=1)s(a);ne()}},i(o){if(!l){for(let r=0;r<t.length;r+=1)$(i[r]);l=!0}}
7,o(o){i=i.filter(Boolean);for(let r=0;r<i.length;r+=1)z(i[r]);l=!1},d(o){o&&I(e),un(i,o)}}}function Kt(n){let e,l;return e=new Kn({props:{layout:n[16]}}),{c(){he(e.$$.fragment)},m(t,i){de(e,t,i),l=!0},p(t,i){const s={};i[0]&65536&&(s.layout=t[16]),e.$set(s)},i(t){l||($(e.$$.fragment,t),l=!0)},o(t){z(e.$$.fragment,t),l=!1},d(t){me(e,t)}}}function Qi(n){let e,l,t,i,s,o,r,a,u,f=n[6]&&n[1]!==null&&n[1].length>0&&Ft(n);const p=[Yi,Ri],v=[];function m(d,g){return d[1]!==null&&d[1].length>0?0:d[17]!==null?1:-1}return~(i=m(n))&&(s=v[i]=p[i](n)),{c(){f&&f.c(),e=ze(),l=U("div"),t=U("div"),s&&s.c(),k(t,"class","message-wrap svelte-x4qvqz"),k(l,"class",o=Et(n[16]==="bubble"?"bubble-wrap":"panel-wrap")+" svelte-x4qvqz"),k(l,"role","log"),k(l,"aria-label","chatbot conversation"),k(l,"aria-live","polite"),V(l,"placeholder-container",n[1]===null||n[1].length===0)},m(d,g){f&&f.m(d,g),F(d,e,g),F(d,l,g),X(l,t),~i&&v[i].m(t,null),n[37](l),r=!0,a||(u=ji(vn.call(null,t)),a=!0)},p(d,g){d[6]&&d[1]!==null&&d[1].length>0?f?(f.p(d,g),g[0]&66&&$(f,1)):(f=Ft(d),f.c(),$(f,1),f.m(e.parentNode,e)):f&&(le(),z(f,1,1,()=>{f=null}),ne());let H=i;i=m(d),i===H?~i&&v[i].p(d,g):(s&&(le(),z(v[H],1,1,()=>{v[H]=null}),ne()),~i?(s=v[i],s?s.p(d,g):(s=v[i]=p[i](d),s.c()),$(s,1),s.m(t,null)):s=null),(!r||g[0]&65536&&o!==(o=Et(d[16]==="bubble"?"bubble-wrap":"panel-wrap")+" svelte-x4qvqz"))&&k(l,"class",o),(!r||g[0]&65538)&&V(l,"placeholder-container",d[1]===null||d[1].length===0)},i(d){r||($(f),$(s),r=!0)},o(d){z(f),z(s),r=!1},d(d){d&&(I(e),I(l)),f&&f.d(d),~i&&v[i].d(),n[37](null),a=!1,u()}}}function Wi(n){if(!n)return[];let e=new Set;return n.forEach(l=>{l.forEach(t=>{typeof t=="object"&&t!==null&&"component"in t&&e.add(t.component)})}),Array.from(e)}function Xi(n,e,l){let t,{_fetch:i}=e,{load_component:s}=e,o={};async function r(c){let j=[],S=[];c.forEach(Le=>{if(o[Le]||Le==="file")return;const{name:We,component:bn}=s(Le,"base");j.push(We),S.push(bn)}),(await Promise.all(S)).forEach((Le,We)=>{l(19,o[j[We]]=Le.default,o)})}let{value:a=[]}=e,u=null,{latex_delimiters:f}=e,{pending_message:p=!1}=e,{selectable:v=!1}=e,{likeable:m=!1}=e,{show_share_button:d=!1}=e,{rtl:g=!1}=e,{show_copy_button:H=!1}=e,{avatar_images:E=[null,null]}=e,{sanitize_html:h=!0}=e,{bubble_full_width:C=!0}=e,{render_markdown:K=!0}=e,{line_breaks:w=!0}=e,{theme_mode:L}=e,{i18n:B}=e,{layout:Q="bubble"}=e,{placeholder:ie=null}=e,{upload:y}=e,b=document.querySelector("div.gradio-container"),N,Z;const He=Fi();Ui(()=>{Z=N&&N.offsetHeight+N.scrollTop>N.scrollHeight-100});async function Be(){await Oi(),requestAnimationFrame(()=>{Z&&N?.scrollTo(0,N.scrollHeight)})}let Ne,je,Se=!1;Ii(()=>{(Z||o)&&Be(),N.querySelectorAll("img").forEach(c=>{c.addEventListener("click",j=>{const S=j.target;S&&(l(21,Ne=S.src),l(22,je=S.alt),l(23,Se=!0))})})});function Ve(c,j,S){He("select",{index:[c,j],value:S})}function _(c,j,S,Ce){He("like",{index:[c,j],value:S,liked:Ce==="like"})}function fn(c){Tt.call(this,n,c)}function _n(c){Tt.call(this,n,c)}const cn=()=>{l(23,Se=!1)},hn=(c,j,S)=>Ve(c,j,S),mn=(c,j,S,Ce)=>{Ce.key==="Enter"&&Ve(c,j,S)},dn=(c,j,S,Ce)=>_(c,j,S,Ce);function gn(c){Ai[c?"unshift":"push"](()=>{N=c,l(20,N)})}return n.$$set=c=>{"_fetch"in c&&l(0,i=c._fetch),"load_component"in c&&l(28,s=c.load_component),"value"in c&&l(1,a=c.value),"latex_delimiters"in c&&l(2,f=c.latex_delimiters),"pending_message"in c&&l(3,p=c.pending_message),"selectable"in c&&l(4,v=c.selectable),"likeable"in c&&l(5,m=c.likeable),"show_share_button"in c&&l(6,d=c.show_share_button),"rtl"in c&&l(7,g=c.rtl),"show_copy_button"in c&&l(8,H=c.show_copy_button),"avatar_images"in c&&l(9,E=c.avatar_images),"sanitize_html"in c&&l(10,h=c.sanitize_html),"bubble_full_width"in c&&l(11,C=c.bubble_full_width),"render_markdown"in c&&l(12,K=c.render_markdown),"line_breaks"in c&&l(13,w=c.line_breaks),"theme_mode"in c&&l(14,L=c.theme_mode),"i18n"in c&&l(15,B=c.i18n),"layout"in c&&l(16,Q=c.layout),"placeholder"in c&&l(17,ie=c.placeholder),"upload"in c&&l(18,y=c.upload)},n.$$.update=()=>{n.$$.dirty[0]&2&&r(Wi(a)),n.$$.dirty[0]&1073741824&&t(),n.$$.dirty[0]&536870914&&(kn(a,u)||(l(29,u=a),He("change")))},l(30,t=()=>{let j=getComputedStyle(document.body).getPropertyValue("--body-text-size"),S;switch(j){case"13px":S=14;break;case"14px":S=16;break;case"16px":S=20;break;default:S=14;break}document.body.style.setProperty("--chatbot-body-text-size",S+"px")}
vendor: 10,798 bytes, lines 7-8
7),[i,a,f,p,v,m,d,g,H,E,h,C,K,w,L,B,Q,ie,y,o,N,Ne,je,Se,b,Be,Ve,_,s,u,t,fn,_n,cn,hn,mn,dn,gn]}class xi extends Ni{constructor(e){super(),Zi(this,e,Xi,Qi,Di,{_fetch:0,load_component:28,value:1,latex_delimiters:2,pending_message:3,selectable:4,likeable:5,show_share_button:6,rtl:7,show_copy_button:8,avatar_images:9,sanitize_html:10,bubble_full_width:11,render_markdown:12,line_breaks:13,theme_mode:14,i18n:15,layout:16,placeholder:17,upload:18},null,[-1,-1])}get _fetch(){return this.$$.ctx[0]}set _fetch(e){this.$$set({_fetch:e}),M()}get load_component(){return this.$$.ctx[28]}set load_component(e){this.$$set({load_component:e}),M()}get value(){return this.$$.ctx[1]}set value(e){this.$$set({value:e}),M()}get latex_delimiters(){return this.$$.ctx[2]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),M()}get pending_message(){return this.$$.ctx[3]}set pending_message(e){this.$$set({pending_message:e}),M()}get selectable(){return this.$$.ctx[4]}set selectable(e){this.$$set({selectable:e}),M()}get likeable(){return this.$$.ctx[5]}set likeable(e){this.$$set({likeable:e}),M()}get show_share_button(){return this.$$.ctx[6]}set show_share_button(e){this.$$set({show_share_button:e}),M()}get rtl(){return this.$$.ctx[7]}set rtl(e){this.$$set({rtl:e}),M()}get show_copy_button(){return this.$$.ctx[8]}set show_copy_button(e){this.$$set({show_copy_button:e}),M()}get avatar_images(){return this.$$.ctx[9]}set avatar_images(e){this.$$set({avatar_images:e}),M()}get sanitize_html(){return this.$$.ctx[10]}set sanitize_html(e){this.$$set({sanitize_html:e}),M()}get bubble_full_width(){return this.$$.ctx[11]}set bubble_full_width(e){this.$$set({bubble_full_width:e}),M()}get render_markdown(){return this.$$.ctx[12]}set render_markdown(e){this.$$set({render_markdown:e}),M()}get line_breaks(){return this.$$.ctx[13]}set line_breaks(e){this.$$set({line_breaks:e}),M()}get theme_mode(){return this.$$.ctx[14]}set theme_mode(e){this.$$set({theme_mode:e}),M()}get i18n(){return this.$$.ctx[15]}set i18n(e){this.$$set({i18n:e}),M()}get layout(){return this.$$.ctx[16]}set layout(e){this.$$set({layout:e}),M()}get placeholder(){return this.$$.ctx[17]}set placeholder(e){this.$$set({placeholder:e}),M()}get upload(){return this.$$.ctx[18]}set upload(e){this.$$set({upload:e}),M()}}const eo=xi,{SvelteComponent:to,append:no,assign:lo,attr:io,check_outros:Qt,create_component:Je,destroy_component:Ke,detach:Wt,element:oo,flush:q,get_spread_object:ao,get_spread_update:so,group_outros:Xt,init:ro,insert:xt,mount_component:Qe,safe_not_equal:uo,space:en,transition_in:W,transition_out:re}=window.__gradio__svelte__internal;function tn(n){let e,l;const t=[{autoscroll:n[19].autoscroll},{i18n:n[19].i18n},n[21],{show_progress:n[21].show_progress==="hidden"?"hidden":"minimal"}];let i={};for(let s=0;s<t.length;s+=1)i=lo(i,t[s]);return e=new pn({props:i}),e.$on("clear_status",n[27]),{c(){Je(e.$$.fragment)},m(s,o){Qe(e,s,o),l=!0},p(s,o){const r=o[0]&2621440?so(t,[o[0]&524288&&{autoscroll:s[19].autoscroll},o[0]&524288&&{i18n:s[19].i18n},o[0]&2097152&&ao(s[21]),o[0]&2097152&&{show_progress:s[21].show_progress==="hidden"?"hidden":"minimal"}]):{};e.$set(r)},i(s){l||(W(e.$$.fragment,s),l=!0)},o(s){re(e.$$.fragment,s),l=!1},d(s){Ke(e,s)}}}function nn(n){let e,l;return e=new Sn({props:{show_label:n[7],Icon:An,float:!0,label:n[6]||"Chatbot"}}),{c(){Je(e.$$.fragment)},m(t,i){Qe(e,t,i),l=!0},p(t,i){const s={};i[0]&128&&(s.show_label=t[7]),i[0]&64&&(s.label=t[6]||"Chatbot"),e.$set(s)},i(t){l||(W(e.$$.fragment,t),l=!0)},o(t){re(e.$$.fragment,t),l=!1},d(t){Ke(e,t)}}}function fo(n){let e,l,t,i,s,o=n[21]&&tn(n),r=n[7]&&nn(n);return i=new eo({props:{i18n:n[19].i18n,selectable:n[8],likeable:n[9],show_share_button:n[10],value:n[25],latex_delimiters:n[18],render_markdown:n[16],theme_mode:n[24],pending_message:n[21]?.status==="pending",rtl:n[11],show_copy_button:n[12],avatar_images:n[20],sanitize_html:n[13],bubble_full_width:n[14],line_breaks:n[17],layout:n[15],placeholder:n[23],upload:n[19].client.upload,_fetch:n[19].client.fetch,load_component:n[19].load_component}}),i.$on("change",n[28]),i.$on("select",n[29]),i.$on("like",n[30]),i.$on("share",n[31]),i.$on("error",n[32]),{c(){o&&o.c(),e=en(),l=oo("div"),r&&r.c(),t=en(),Je(i.$$.fragment),io(l,"class","wrapper svelte-nab2ao")},m(a,u){o&&o.m(a,u),xt(a,e,u),xt(a,l,u),r&&r.m(l,null),no(l,t),Qe(i,l,null),s=!0},p(a,u){a[21]?o?(o.p(a,u),u[0]&2097152&&W(o,1)):(o=tn(a),o.c(),W(o,1),o.m(e.parentNode,e)):o&&(Xt(),re(o,1,1,()=>{o=null}),Qt()),a[7]?r?(r.p(a,u),u[0]&128&&W(r,1)):(r=nn(a),r.c(),W(r,1),r.m(l,t)):r&&(Xt(),re(r,1,1,()=>{r=null}),Qt());const f={};u[0]&524288&&(f.i18n=a[19].i18n),u[0]&256&&(f.selectable=a[8]),u[0]&512&&(f.likeable=a[9]),u[0]&1024&&(f.show_share_button=a[10]),u[0]&33554432&&(f.value=a[25]),u[0]&262144&&(f.latex_delimiters=a[18]),u[0]&65536&&(f.render_markdown=a[16]),u[0]&16777216&&(f.theme_mode=a[24]),u[0]&2097152&&(f.pending_message=a[21]?.status==="pending"),u[0]&2048&&(f.rtl=a[11]),u[0]&4096&&(f.show_copy_button=a[12]),u[0]&1048576&&(f.avatar_images=a[20]),u[0]&8192&&(f.sanitize_html=a[13]),u[0]&16384&&(f.bubble_full_width=a[14]),u[0]&131072&&(f.line_breaks=a[17]),u[0]&32768&&(f.layout=a[15]),u[0]&8388608&&(f.placeholder=a[23]),u[0]&524288&&(f.upload=a[19].client.upload),u[0]&524288&&(f._fetch=a[19].client.fetch),u[0]&524288&&(f.load_component=a[19].load_component),i.$set(f)},i(a){s||(W(o),W(r),W(i.$$.fragment,a),s=!0)},o(a){re(o),re(r),re(i.$$.fragment,a),s=!1},d(a){a&&(Wt(e),Wt(l)),o&&o.d(a),r&&r.d(),Ke(i)}}}function _o(n){let e,l;return e=new Hn({props:{elem_id:n[0],elem_classes:n[1],visible:n[2],padding:!1,scale:n[4],min_width:n[5],height:n[22],allow_overflow:!1,$$slots:{default:[fo]},$$scope:{ctx:n}}}),{c(){Je(e.$$.fragment)},m(t,i){Qe(e,t,i),l=!0},p(t,i){const s={};i[0]&1&&(s.elem_id=t[0]),i[0]&2&&(s.elem_classes=t[1]),i[0]&4&&(s.visible=t[2]),i[0]&16&&(s.scale=t[4]),i[0]&32&&(s.min_width=t[5]),i[0]&4194304&&(s.height=t[22]),i[0]&62914504|i[1]&4&&(s.$$scope={dirty:i,ctx:t}),e.$set(s)},i(t){l||(W(e.$$.fragment,t),l=!0)},o(t){re(e.$$.fragment,t),l=!1},d(t){Ke(e,t)}}}function co(n,e,l){let{elem_id:t=""}=e,{elem_classes:i=[]}=e,{visible:s=!0}=e,{value:o=[]}=e,{scale:r=null}=e,{min_width:a=void 0}=e,{label:u}=e,{show_label:f=!0}=e,{root:p}=e,{_selectable:v=!1}=e,{likeable:m=!1}=e,{show_share_button:d=!1}=e,{rtl:g=!1}=e,{show_copy_button:H=!0}=e,{sanitize_html:E=!0}=e,{bubble_full_width:h=!0}=e,{layout:C="bubble"}=e,{render_markdown:K=!0}=e,{line_breaks:w=!0}=e,{latex_delimiters:L}=e,{gradio:B}=e,{avatar_images:Q=[null,null]}=e,ie=[],{loading_status:y=void 0}=e,{height:b=400}=e,{placeholder:N=null}=e,{theme_mode:Z}=e;const He=()=>B.dispatch("clear_status",y),Be=()=>B.dispatch("change",o),Ne=_=>B.dispatch("select",_.detail),je=_=>B.dispatch("like",_.detail),Se=_=>B.dispatch("share",_.detail),Ve=_=>B.dispatch("error",_.detail);return n.$$set=_=>{"elem_id"in _&&l(0,t=_.elem_id),"elem_classes"in _&&l(1,i=_.elem_classes),"visible"in _&&l(2,s=_.visible),"value"in _&&l(3,o=_.value),"scale"in _&&l(4,r=_.scale),"min_width"in _&&l(5,a=_.min_width),"label"in _&&l(6,u=_.label),"show_label"in _&&l(7,f=_.show_label),"root"in _&&l(26,p=_.root),"_selectable"in _&&l(8,v=_._selectable),"likeable"in _&&l(9,m=_.likeable),"show_share_button"in _&&l(10,d=_.show_share_button),"rtl"in _&&l(11,g=_.rtl),"show_copy_button"in _&&l(12,H=_.show_copy_button),"sanitize_html"in _&&l(13,E=_.sanitize_html),"bubble_full_width"in _&&l(14,h=_.bubble_full_width),"layout"in _&&l(15,C=_.layout),"render_markdown"in _&&l(16,K=_.render_markdown),"line_breaks"in _&&l(17,w=_.line_breaks),"latex_delimiters"in _&&l(18,L=_.latex_delimiters),"gradio"in _&&l(19,B=_.gradio),"avatar_images"in _&&l(20,Q=_.avatar_images),"loading_status"in _&&l(21,y=_.loading_status),"height"in _&&l(22,b=_.height),"placeholder"in _&&l(23,N=_.placeholder),"theme_mode"in _&&l(24,Z=_.theme_mode)},n.$$.update=()=>{n.$$.dirty[0]&67108872&&l(25,ie=En(o,p))},[t,i,s,o,r,a,u,f,v,m,d,g,H,E,h,C,K,w,L,B,Q,y,b,N,Z,ie,p,He,Be,Ne,je,Se,Ve]}class Mo extends to{constructor(e){super(),ro(this,e,co,_o,uo,{elem_id:0,elem_classes:1,visible:2,value:3,scale:4,min_width:5,label:6,show_label:7,root:26,_selectable:8,likeable:9,show_share_button:10,rtl:11,show_copy_button:12,sanitize_html:13,bubble_full_width:14,layout:15,render_markdown:16,line_breaks:17,latex_delimiters:18,gradio:19,avatar_images:20,loading_status:21,height:22,placeholder:23,theme_mode:24},null,[-1,-1])}get elem_id(){return this.$$.ctx[0]}set elem_id(e){this.$$set({elem_id:e}),q()}get elem_classes(){return this.$$.ctx[1]}set elem_classes(e){this.$$set({elem_classes:e}),q()}get visible(){return this.$$.ctx[2]}set visible(e){this.$$set({visible:e}),q()}get value(){return this.$$.ctx[3]}set value(e){this.$$set({value:e}),q()}get scale(){return this.$$.ctx[4]}set scale(e){this.$$set({scale:e}),q()}get min_width(){return this.$$.ctx[5]}set min_width(e){this.$$set({min_width:e}),q()}get label(){return this.$$.ctx[6]}set label(e){this.$$set({label:e}),q()}get show_label(){return this.$$.ctx[7]}set show_label(e){this.$$set({show_label:e}),q()}get root(){return this.$$.ctx[26]}set root(e){this.$$set({root:e}),q()}get _selectable(){return this.$$.ctx[8]}set _selectable(e){this.$$set({_selectable:e}),q()}get likeable(){return this.$$.ctx[9]}set likeable(e){this.$$set({likeable:e}),q()}get show_share_button(){return this.$$.ctx[10]}set show_share_button(e){this.$$set({show_share_button:e}),q()}get rtl(){return this.$$.ctx[11]}set rtl(e){this.$$set({rtl:e}),q()}get show_copy_button(){return this.$$.ctx[12]}set show_copy_button(e){this.$$set({show_copy_button:e}),q()}get sanitize_html(){return this.$$.ctx[13]}set sanitize_html(e){this.$$set({sanitize_html:e}),q()}get bubble_full_width(){return this.$$.ctx[14]}set bubble_full_width(e){this.$$set({bubble_full_width:e}),q()}get layout(){return this.$$.ctx[15]}set layout(e){this.$$set({layout:e}),q()}get render_markdown(){return this.$$.ctx[16]}set render_markdown(e){this.$$set({render_markdown:e}),q()}get line_breaks(){return this.$$.ctx[17]}set line_breaks(e){this.$$set({line_breaks:e}),q()}get latex_delimiters(){return this.$$.ctx[18]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),q()}get gradio(){return this.$$.ctx[19]}set gradio(e){this.$$set({gradio:e}),q()}get avatar_images(){return this.$$.ctx[20]}set avatar_images(e){this.$$set({avatar_images:e}),q()}get loading_status(){return this.$$.ctx[21]}set loading_status(e){this.$$set({loading_status:e}),q()}get height(){return this.$$.ctx[22]}set height(e){this.$$set({height:e}),q()}get placeholder(){return this.$$.ctx[23]}set placeholder(e){this.$$set({placeholder:e}),q()}get theme_mode(){return this.$$.ctx[24]}set theme_mode(e){this.$$set({theme_mode:e}),q()}}export{eo as BaseChatBot,Mo as default}; 8//# sourceMappingURL=Index-ClL8diVE.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.