omJson(data[i + 2]));
      }
      return breakdown;
    }

    static fromDict(d) {
      const breakdown = new Breakdown();
      for (const [name, value] of Object.entries(d.values)) {
        breakdown.set(name, tr.b.numberFromJson(value));
      }
      if (d.colorScheme) {
        breakdown.colorScheme = d.colorScheme;
      }
      return breakdown;
    }
  }

  tr.v.d.Diagnostic.register(Breakdown, {
    elementName: 'tr-v-ui-breakdown-span'
  });

  return {
    Breakdown,
  };
});
</script>
