import{S as N,i as W,s as z,b as h,d as k,g as r,v as w,a as v,h as d,c as p,j as L,k as b,x as M,w as j,C as x,f as A,m as B,t as g,p as y,q as F,e as G,o as I,r as J,H as K}from"./vendor.906e418a.js";function C(a,e,l){const t=a.slice();return t[2]=e[l],t[4]=l,t}function q(a,e,l){const t=a.slice();return t[2]=e[l],t}function S(a){let e,l,t,s,i=a[0].confidences,n=[];for(let o=0;o<i.length;o+=1)n[o]=D(q(a,i,o));let f=a[0].confidences,u=[];for(let o=0;o<f.length;o+=1)u[o]=E(C(a,f,o));return{c(){e=h("div"),l=h("div");for(let o=0;o<n.length;o+=1)n[o].c();t=k(),s=h("div");for(let o=0;o<u.length;o+=1)u[o].c();r(l,"class","labels mr-2 svelte-13dhi3y"),w(l,"maxWidth","120px"),r(s,"class","confidences flex flex-grow flex-col items-baseline svelte-13dhi3y"),r(e,"class","confidence-intervals flex text-xl svelte-13dhi3y")},m(o,_){v(o,e,_),d(e,l);for(let c=0;c<n.length;c+=1)n[c].m(l,null);d(e,t),d(e,s);for(let c=0;c<u.length;c+=1)u[c].m(s,null)},p(o,_){if(_&1){i=o[0].confidences;let c;for(c=0;c<i.length;c+=1){const m=q(o,i,c);n[c]?n[c].p(m,_):(n[c]=D(m),n[c].c(),n[c].m(l,null))}for(;c<n.length;c+=1)n[c].d(1);n.length=i.length}if(_&1){f=o[0].confidences;let c;for(c=0;c<f.length;c+=1){const m=C(o,f,c);u[c]?u[c].p(m,_):(u[c]=E(m),u[c].c(),u[c].m(s,null))}for(;c<u.length;c+=1)u[c].d(1);u.length=f.length}},d(o){o&&b(e),M(n,o),M(u,o)}}}function D(a){let e,l=a[2].label+"",t,s,i;return{c(){e=h("div"),t=p(l),s=k(),r(e,"class","label overflow-hidden whitespace-nowrap h-7 mb-2 overflow-ellipsis text-right svelte-13dhi3y"),r(e,"title",i=a[2].label)},m(n,f){v(n,e,f),d(e,t),d(e,s)},p(n,f){f&1&&l!==(l=n[2].label+"")&&L(t,l),f&1&&i!==(i=n[2].label)&&r(e,"title",i)},d(n){n&&b(e)}}}function E(a){let e,l=Math.round(a[2].confidence*100)+"",t,s;return{c(){e=h("div"),t=p(l),s=p(`%
					`),r(e,"class","confidence flex justify-end items-center overflow-hidden whitespace-nowrap h-7 mb-2 px-1 svelte-13dhi3y"),w(e,"min-width","calc( "+Math.round(a[2].confidence*100)+"% - 12px)")},m(i,n){v(i,e,n),d(e,t),d(e,s)},p(i,n){n&1&&l!==(l=Math.round(i[2].confidence*100)+"")&&L(t,l),n&1&&w(e,"min-width","calc( "+Math.round(i[2].confidence*100)+"% - 12px)")},d(i){i&&b(e)}}}function O(a){let e,l,t=a[0].label+"",s,i,n=a[0].confidences&&S(a);return{c(){e=h("div"),l=h("div"),s=p(t),i=k(),n&&n.c(),r(l,"class","output-class font-bold text-2xl py-6 px-4 flex-grow flex items-center justify-center svelte-13dhi3y"),j(l,"no-confidence",!("confidences"in a[0])),r(e,"class","output-label svelte-13dhi3y"),r(e,"theme",a[1])},m(f,u){v(f,e,u),d(e,l),d(l,s),d(e,i),n&&n.m(e,null)},p(f,[u]){u&1&&t!==(t=f[0].label+"")&&L(s,t),u&1&&j(l,"no-confidence",!("confidences"in f[0])),f[0].confidences?n?n.p(f,u):(n=S(f),n.c(),n.m(e,null)):n&&(n.d(1),n=null),u&2&&r(e,"theme",f[1])},i:x,o:x,d(f){f&&b(e),n&&n.d()}}}function P(a,e,l){let{value:t}=e,{theme:s="default"}=e;return a.$$set=i=>{"value"in i&&l(0,t=i.value),"theme"in i&&l(1,s=i.theme)},[t,s]}class Q extends N{constructor(e){super();W(this,e,P,O,z,{value:0,theme:1})}}function H(a){let e,l;return e=new Q({props:{theme:a[1],style:a[2],value:a[0]}}),{c(){A(e.$$.fragment)},m(t,s){B(e,t,s),l=!0},p(t,s){const i={};s&2&&(i.theme=t[1]),s&4&&(i.style=t[2]),s&1&&(i.value=t[0]),e.$set(i)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){y(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function R(a){let e,l,t=a[0]!==void 0&&H(a);return{c(){t&&t.c(),e=G()},m(s,i){t&&t.m(s,i),v(s,e,i),l=!0},p(s,[i]){s[0]!==void 0?t?(t.p(s,i),i&1&&g(t,1)):(t=H(s),t.c(),g(t,1),t.m(e.parentNode,e)):t&&(I(),y(t,1,1,()=>{t=null}),J())},i(s){l||(g(t),l=!0)},o(s){y(t),l=!1},d(s){t&&t.d(s),s&&b(e)}}}function T(a,e,l){let{value:t}=e,{theme:s}=e,{style:i}=e;const n=K();return a.$$set=f=>{"value"in f&&l(0,t=f.value),"theme"in f&&l(1,s=f.theme),"style"in f&&l(2,i=f.style)},a.$$.update=()=>{a.$$.dirty&1&&n("change")},[t,s,i]}class U extends N{constructor(e){super();W(this,e,T,R,z,{value:0,theme:1,style:2})}}var X=U;const Y=["static"];export{X as Component,Y as modes};
