```
import { Map } from "typescript-collections";

export function stampCover(label: string, dies: [string, number][]): number {
  if (typeof label !== "string" || label.length === 0) {
    throw new Error("Invalid label");
  }

  const table = stampTable(dies);

  const dp = Array(label.length + 1).fill(Infinity);
  dp[0] = 0;

  for (let i = 1; i <= label.length; i++) {
    for (const [fragment, price] of dies) {
      if (label.substring(i - fragment.length, i) === fragment) {
        dp[i] = Math.min(dp[i], dp[i - fragment.length] + price);
      }
    }
  }

  return dp[label.length] === Infinity ? -1 : dp[label.length];
}

export function stampTable(dies: [string, number][]): Map<string, number> {
  const table = new Map<string, number>();

  for (const [fragment, price] of dies) {
    if (typeof fragment !== "string" || typeof price !== "number") {
      throw new Error("Invalid die entry");
    }
    if (price <= 0) {
      throw new Error("Price must be a positive integer");
    }

    const existingPrice = table.get(fragment);
    if (existingPrice !== undefined) {
      throw new Error(`Fragment "${fragment}" already exists with price ${existingPrice}`);
    }

    table.set(fragment, price);
  }

  return table;
}
```