vendor: 9,646 bytes, lines 1-2
1import"./IconButtonWrapper.svelte_svelte_type_style_lang-DAP8_Zsr.js";import{L as te}from"./LineChart-CKh1Fdep.js";import{B as ne}from"./Block-rEXcgPfT.js";import"./MarkdownCode.svelte_svelte_type_style_lang-CaEo_I2i.js";import{B as ae}from"./BlockLabel-CnzaitFN.js";import{E as se}from"./Empty-CMV1fpYf.js";import{S as ie}from"./index-DbBaXY2J.js";import"./StreamingBar.svelte_svelte_type_style_lang-CxOfZBE-.js";import"./prism-python-DMUsXzi0.js";import"./index-Ya43XIXp.js";import"./svelte/svelte.js";import"./IconButton-DtUbToT-.js";import"./Clear-By3xiIwg.js";const{SvelteComponent:re,append:h,attr:d,destroy_each:oe,detach:Q,element:B,empty:ce,ensure_array_like:U,flush:G,init:ue,insert:R,listen:fe,noop:V,safe_not_equal:_e,set_data:P,set_style:E,space:D,text:z,toggle_class:A}=window.__gradio__svelte__internal,{createEventDispatcher:de}=window.__gradio__svelte__internal;function W(n,e,a){const t=n.slice();return t[5]=e[a],t[7]=a,t}function X(n){let e,a=U(n[0].confidences),t=[];for(let l=0;l<a.length;l+=1)t[l]=Y(W(n,a,l));return{c(){for(let l=0;l<t.length;l+=1)t[l].c();e=ce()},m(l,s){for(let i=0;i<t.length;i+=1)t[i]&&t[i].m(l,s);R(l,e,s)},p(l,s){if(s&13){a=U(l[0].confidences);let i;for(i=0;i<a.length;i+=1){const u=W(l,a,i);t[i]?t[i].p(u,s):(t[i]=Y(u),t[i].c(),t[i].m(e.parentNode,e))}for(;i<t.length;i+=1)t[i].d(1);t.length=a.length}},d(l){l&&Q(e),oe(t,l)}}}function Y(n){let e,a,t,l,s,i,u,f,b,c,$=n[5].label+"",m,N,r,_,S,k=Math.round(n[5].confidence*100)+"",j,I,o,J,F,T;function le(){return n[4](n[7],n[5])}return{c(){e=B("button"),a=B("div"),t=B("meter"),f=D(),b=B("dl"),c=B("dt"),m=z($),N=D(),_=B("div"),S=B("dd"),j=z(k),I=z("%"),o=D(),d(t,"aria-labelledby",l=O(`meter-text-${n[5].label}`)),d(t,"aria-label",s=n[5].label),d(t,"aria-valuenow",i=Math.round(n[5].confidence*100)),d(t,"aria-valuemin","0"),d(t,"aria-valuemax","100"),d(t,"class","bar svelte-1l15rn0"),d(t,"min","0"),d(t,"max","1"),t.value=u=n[5].confidence,E(t,"width",n[5].confidence*100+"%"),E(t,"background","var(--stat-background-fill)"),d(c,"id",r=O(`meter-text-${n[5].label}`)),d(c,"class","text svelte-1l15rn0"),d(_,"class","line svelte-1l15rn0"),d(S,"class","confidence svelte-1l15rn0"),d(b,"class","label svelte-1l15rn0"),d(a,"class","inner-wrap svelte-1l15rn0"),d(e,"class","confidence-set group svelte-1l15rn0"),d(e,"data-testid",J=`${n[5].label}-confidence-set`),A(e,"selectable",n[2])},m(q,v){R(q,e,v),h(e,a),h(a,t),h(a,f),h(a,b),h(b,c),h(c,m),h(c,N),h(b,_),h(b,S),h(S,j),h(S,I),h(e,o),F||(T=fe(e,"click",le),F=!0)},p(q,v){n=q,v&1&&l!==(l=O(`meter-text-${n[5].label}`))&&d(t,"aria-labelledby",l),v&1&&s!==(s=n[5].label)&&d(t,"aria-label",s),v&1&&i!==(i=Math.round(n[5].confidence*100))&&d(t,"aria-valuenow",i),v&1&&u!==(u=n[5].confidence)&&(t.value=u),v&1&&E(t,"width",n[5].confidence*100+"%"),v&1&&$!==($=n[5].label+"")&&P(m,$),v&1&&r!==(r=O(`meter-text-${n[5].label}`))&&d(c,"id",r),v&1&&k!==(k=Math.round(n[5].confidence*100)+"")&&P(j,k),v&1&&J!==(J=`${n[5].label}-confidence-set`)&&d(e,"data-testid",J),v&4&&A(e,"selectable",n[2])},d(q){q&&Q(e),F=!1,T()}}}function be(n){let e,a,t=n[0].label+"",l,s,i=typeof n[0]=="object"&&n[0].confidences&&X(n);return{c(){e=B("div"),a=B("h2"),l=z(t),s=D(),i&&i.c(),d(a,"class","output-class svelte-1l15rn0"),d(a,"data-testid","label-output-value"),A(a,"no-confidence",!("confidences"in n[0])),E(a,"background-color",n[1]||"transparent"),d(e,"class","container svelte-1l15rn0")},m(u,f){R(u,e,f),h(e,a),h(a,l),h(e,s),i&&i.m(e,null)},p(u,[f]){f&1&&t!==(t=u[0].label+"")&&P(l,t),f&1&&A(a,"no-confidence",!("confidences"in u[0])),f&2&&E(a,"background-color",u[1]||"transparent"),typeof u[0]=="object"&&u[0].confidences?i?i.p(u,f):(i=X(u),i.c(),i.m(e,null)):i&&(i.d(1),i=null)},i:V,o:V,d(u){u&&Q(e),i&&i.d()}}}function O(n){return n.replace(/\s/g,"-")}function me(n,e,a){let{value:t}=e;const l=de();let{color:s=void 0}=e,{selectable:i=!1}=e;const u=(f,b)=>{l("select",{index:f,value:b.label})};return n.$$set=f=>{"value"in f&&a(0,t=f.value),"color"in f&&a(1,s=f.color),"selectable"in f&&a(2,i=f.selectable)},[t,s,i,l,u]}class he extends re{constructor(e){super(),ue(this,e,me,be,_e,{value:0,color:1,selectable:2})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),G()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),G()}get selectable(){return this.$$.ctx[2]}set selectable(e){this.$$set({selectable:e}),G()}}const ge=he,{SvelteComponent:ve,assign:ke,check_outros:Z,create_component:p,destroy_component:C,detach:H,empty:we,flush:g,get_spread_object:$e,get_spread_update:Se,group_outros:y,init:Le,insert:K,mount_component:M,safe_not_equal:Be,space:x,transition_in:w,transition_out:L}=window.__gradio__svelte__internal;function ee(n){let e,a;return e=new ae({props:{Icon:te,label:n[6],disable:n[7]===!1}}),{c(){p(e.$$.fragment)},m(t,l){M(e,t,l),a=!0},p(t,l){const s={};l&64&&(s.label=t[6]),l&128&&(s.disable=t[7]===!1),e.$set(s)},i(t){a||(w(e.$$.fragment,t),a=!0)},o(t){L(e.$$.fragment,t),a=!1},d(t){C(e,t)}}}function Ne(n){let e,a;return e=new se({props:{unpadded_box:!0,$$slots:{default:[Ce]},$$scope:{ctx:n}}}),{c(){p(e.$$.fragment)},m(t,l){M(e,t,l),a=!0},p(t,l){const s={};l&131072&&(s.$$scope={dirty:l,ctx:t}),e.$set(s)},i(t){a||(w(e.$$.fragment,t),a=!0)},o(t){L(e.$$.fragment,t),a=!1},d(t){C(e,t)}}}function pe(n){let e,a;return e=new ge({props:{selectable:n[12],value:n[5],color:n[4]}}),e.$on("select",n[16]),{c(){p(e.$$.fragment)},m(t,l){M(e,t,l),a=!0},p(t,l){const s={};l&4096&&(s.selectable=t[12]),l&32&&(s.value=t[5]),l&16&&(s.color=t[4]),e.$set(s)},i(t){a||(w(e.$$.fragment,t),a=!0)},o(t){L(e.$$.fragment,t),a=!1},d(t){C(e,t)}}}function Ce(n){let e,a;return e=new te({}),{c(){p(e.$$.fragment)},m(t,l){M(e,t,l),a=!0},i(t){a||(w(e.$$.fragment,t),a=!0)},o(t){L(e.$$.fragment,t),a=!1},d(t){C(e,t)}}}function Me(n){let e,a,t,l,s,i,u;const f=[{autoscroll:n[0].autoscroll},{i18n:n[0].i18n},n[10]];let b={};for(let r=0;r<f.length;r+=1)b=ke(b,f[r]);e=new ie({props:b}),e.$on("clear_status",n[15]);let c=n[11]&&ee(n);const $=[pe,Ne],m=[];function N(r,_){return r[13]!==void 0&&r[13]!==null?0:1}return l=N(n),s=m[l]=$[l](n),{c(){p(e.$$.fragment),a=x(),c&&c.c(),t=x(),s.c(),i=we()},m(r,_){M(e,r,_),K(r,a,_),c&&c.m(r,_),K(r,t,_),m[l].m(r,_),K(r,i,_),u=!0},p(r,_){const S=_&1025?Se(f,[_&1&&{autoscroll:r[0].autoscroll},_&1&&{i18n:r[0].i18n},_&1024&&$e(r[10])]):{};e.$set(S),r[11]?c?(c.p(r,_),_&2048&&w(c,1)):(c=ee(r),c.c(),w(c,1),c.m(t.parentNode,t)):c&&(y(),L(c,1,1,()=>{c=null}),Z());let k=l;l=N(r),l===k?m[l].p(r,_):(y(),L(m[k],1,1,()=>{m[k]=null}),Z(),s=m[l],s?s.p(r,_):(s=m[l]=$[l](r),s.c()),w(s,1),s.m(i.parentNode,i))},i(r){u||(w(e.$$.fragment,r),w(c),w(s),u=!0)},o(r){L(e.$$.fragment,r),L(c),L(s),u=!1},d(r){r&&(H(a),H(t),H(i)),C(e,r),c&&c.d(r),m[l].d(r)}}}function je(n){let e,a;return e=new ne({props:{test_id:"label",visible:n[3],elem_id:n[1],elem_classes:n[2],container:n[7],scale:n[8],min_width:n[9],padding:!1,$$slots:{default:[Me]},$$scope:{ctx:n}}}),{c(){p(e.$$.fragment)},m(t,l){M(e,t,l),a=!0},p(t,[l]){const s={};l&8&&(s.visible=t[3]),l&2&&(s.elem_id=t[1]),l&4&&(s.elem_classes=t[2]),l&128&&(s.container=t[7]),l&256&&(s.scale=t[8]),l&512&&(s.min_width=t[9]),l&146673&&(s.$$scope={dirty:l,ctx:t}),e.$set(s)},i(t){a||(w(e.$$.fragment,t),a=!0)},o(t){L(e.$$.fragment,t),a=!1},d(t){C(e,t)}}}function qe(n,e,a){let t,{gradio:l}=e,{elem_id:s=""}=e,{elem_classes:i=[]}=e,{visible:u=!0}=e,{color:f=void 0}=e,{value:b={}}=e,c=null,{label:$=l.i18n("label.label")}=e,{container:m=!0}=e,{scale:N=null}=e,{min_width:r=void 0}=e,{loading_status:_}=e,{show_label:S=!0}=e,{_selectable:k=!1}=e;const j=()=>l.dispatch("clear_status",_),I=({detail:o})=>l.dispatch("select",o);return n.$$set=o=>{"gradio"in o&&a(0,l=o.gradio),"elem_id"in o&&a(1,s=o.elem_id),"elem_classes"in o&&a(2,i=o.elem_classes),"visible"in o&&a(3,u=o.visible),"color"in o&&a(4,f=o.color),"value"in o&&a(5,b=o.value),"label"in o&&a(6,$=o.label),"container"in o&&a(7,m=o.container),"scale"in o&&a(8,N=o.scale),"min_width"in o&&a(9,r=o.min_width),"loading_status"in o&&a(10,_=o.loading_status),"show_label"in o&&a(11,S=o.show_label),"_selectable"in o&&a(12,k=o._selectable)},n.$$.update=()=>{n.$$.dirty&16417&&JSON.stringify(b)!==JSON.stringify(c)&&(a(14,c=b),l.dispatch("change")),n.$$.dirty&32&&a(13,t=b.label)},[l,s,i,u,f,b,$,m,N,r,_,S,k,t,c,j,I]}class Re extends ve{constructor(e){super(),Le(this,e,qe,je,Be,{gradio:0,elem_id:1,elem_classes:2,visible:3,color:4,value:5,label:6,container:7,scale:8,min_width:9,loading_status:10,show_label:11,_selectable:12})}get gradio(){return this.$$.ctx[0]}set gradio(e){this.$$set({gradio:e}),g()}get elem_id(){return this.$$.ctx[1]}set elem_id(e){this.$$set({elem_id:e}),g()}get elem_classes(){return this.$$.ctx[2]}set elem_classes(e){this.$$set({elem_classes:e}),g()}get visible(){return this.$$.ctx[3]}set visible(e){this.$$set({visible:e}),g()}get color(){return this.$$.ctx[4]}set color(e){this.$$set({color:e}),g()}get value(){return this.$$.ctx[5]}set value(e){this.$$set({value:e}),g()}get label(){return this.$$.ctx[6]}set label(e){this.$$set({label:e}),g()}get container(){return this.$$.ctx[7]}set container(e){this.$$set({container:e}),g()}get scale(){return this.$$.ctx[8]}set scale(e){this.$$set({scale:e}),g()}get min_width(){return this.$$.ctx[9]}set min_width(e){this.$$set({min_width:e}),g()}get loading_status(){return this.$$.ctx[10]}set loading_status(e){this.$$set({loading_status:e}),g()}get show_label(){return this.$$.ctx[11]}set show_label(e){this.$$set({show_label:e}),g()}get _selectable(){return this.$$.ctx[12]}set _selectable(e){this.$$set({_selectable:e}),g()}}export{ge as BaseLabel,Re as default}; 2//# sourceMappingURL=Index-w181i_M9.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.