{
  "version": 3,
  "file": "bundle.css",
  "sources": [
    "App.svelte",
    "Keyboard.svelte",
    "Cell.svelte",
    "Clue.svelte",
    "ClueBar.svelte",
    "ClueList.svelte",
    "Clues.svelte",
    "CompletedMessage.svelte",
    "Confetti.svelte",
    "Crossword.svelte",
    "Puzzle.svelte",
    "Toolbar.svelte"
  ],
  "sourcesContent": [
    "<script>\n  import Crossword from \"../src/Crossword.svelte\";\n  import dataNYTMini from \"./data/nyt-mini.json\";\n  import dataNYTDaily from \"./data/nyt-daily.json\";\n  import dataOreo from \"./data/oreo.json\";\n  import dataUSA from \"./data/usa.json\";\n\n  let revealedUSA;\n  let theme;\n</script>\n\n<article>\n  <div class=\"intro\">\n    <h1>svelte-crossword</h1>\n    <p>\n      A crossword component for\n      <a href=\"https://svelte.dev\">Svelte</a>. Read the docs on\n      <a\n        href=\"https://github.com/russellgoldenberg/svelte-crossword#svelte-crossword\">Github</a>.\n      Made with ☕ by\n      <a href=\"https://twitter.com/wattenberger\">Amelia Wattenberger</a>\n      and\n      <a href=\"https://twitter.com/codenberg\">Russell Goldenberg</a>.\n    </p>\n  </div>\n\n  <section id=\"default\">\n    <div class=\"info\">\n      <h2><a href=\"#default\">Default Example</a></h2>\n      <p>\n        A\n        <a href=\"https://www.nytimes.com/crosswords/game/daily/2020/10/21\">NYT\n          daily</a>\n        puzzle with all default settings.\n      </p>\n    </div>\n    <Crossword data=\"{dataNYTDaily}\" />\n  </section>\n\n  <section id=\"mobile\" style=\"max-width: 500px;\">\n    <div class=\"info\">\n      <h2><a href=\"#mobile\">Mobile</a></h2>\n      <p>\n        A\n        <a href=\"https://www.nytimes.com/crosswords/game/mini/2020/10/21\">NYT\n          mini</a>\n        puzzle with all default settings and forced mobile view.\n      </p>\n    </div>\n    <Crossword data=\"{dataNYTMini}\" showKeyboard=\"{true}\" />\n  </section>\n\n  <section id=\"themes\" class=\"{theme}\" style=\"max-width: 760px;\">\n    <div class=\"info\">\n      <h2><a href=\"#themes\">Themes</a></h2>\n      <p>A library of preset style themes to choose from.</p>\n      <select bind:value=\"{theme}\">\n        <option value=\"classic\">Classic</option>\n        <option value=\"dark\">Dark</option>\n        <option value=\"citrus\">Citrus</option>\n        <option value=\"amelia\">Amelia</option>\n      </select>\n    </div>\n    <div>\n      <Crossword data=\"{dataOreo}\" theme=\"{theme}\" />\n    </div>\n  </section>\n\n  <section id=\"simple-customization\" class:is-revealed=\"{revealedUSA}\">\n    <div class=\"info\">\n      <h2><a href=\"#simple\">Simple Customization</a></h2>\n      <p>\n        A few customizations: custom class names on clues/cells,\n        <code>revealed</code>\n        binding (apply custom style), and\n        <code>disableHighlight</code>\n        parameter.\n      </p>\n    </div>\n    <Crossword\n      data=\"{dataUSA}\"\n      disableHighlight=\"{revealedUSA}\"\n      bind:revealed=\"{revealedUSA}\" />\n  </section>\n\n  <section id=\"slots\">\n    <div class=\"info\">\n      <h2><a href=\"#slots\">Slots</a></h2>\n      <p>Custom slots for the toolbar and completion message.</p>\n    </div>\n    <Crossword data=\"{dataNYTDaily}\">\n      <div\n        class=\"toolbar\"\n        slot=\"toolbar\"\n        let:onClear\n        let:onReveal\n        style=\"background: #333; padding: 1em; margin: 1em 0;\">\n        <button\n          style=\"font-size: 1.5em; background-color: #888;\"\n          on:click=\"{onClear}\">clear puzzle</button>\n        <button\n          style=\"font-size: 1.5em; background-color: #888;\"\n          on:click=\"{onReveal}\">show answers</button>\n      </div>\n      <div slot=\"message\">\n        <h3>OMG, congrats!</h3>\n        <img\n          alt=\"celebration\"\n          src=\"https://media3.giphy.com/media/QpOZPQQ2wbjOM/giphy.gif\" />\n      </div>\n    </Crossword>\n  </section>\n</article>\n\n<style>\n  article {\n    max-width: 960px;\n    margin: 0 auto;\n    padding: 1em;\n    font-family: sans-serif;\n  }\n  .intro {\n    text-align: left;\n    max-width: 760px;\n    font-size: 1.5em;\n  }\n  section {\n    max-width: 960px;\n    margin: 5em 0;\n  }\n\n  .info {\n    max-width: 640px;\n    margin: 1em 0;\n    text-align: left;\n    font-size: 1.125em;\n  }\n  .info a {\n    margin-right: 0.25em;\n  }\n  h1 {\n    font-size: 1.5em;\n  }\n  h2 {\n    font-size: 1.5em;\n    padding-top: 1em;\n  }\n  p {\n    margin: 1em auto;\n  }\n\n  #themes {\n    padding: 1em;\n  }\n\n  #themes.dark {\n    background: #1a1a1a;\n    color: #fff;\n  }\n  code {\n    font-size: 0.85em;\n    background-color: #efefef;\n    padding: 0 0.25em;\n  }\n\n  button {\n    cursor: pointer;\n  }\n</style>\n",
    "<script>\n  import { createEventDispatcher } from \"svelte\";\n  import standard from \"./layouts/standard.js\";\n  import crossword from \"./layouts/crossword.js\";\n\n  import backspaceSVG from \"./svg/backspace.js\";\n  import enterSVG from \"./svg/enter.js\";\n\n  const dispatch = createEventDispatcher();\n\n  export let custom;\n  export let style = \"\";\n  export let layout = \"standard\";\n\n  let page = 0;\n  let shifted = false;\n\n  const alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n  const layouts = { standard, crossword };\n\n  const swaps = {\n    Page0: \"abc\",\n    Page1: \"?123\",\n    Space: \" \",\n    Shift: \"abc\",\n    Enter: enterSVG,\n    Backspace: backspaceSVG,\n  };\n\n  const unique = (arr) => [...new Set(arr)];\n\n  $: rawData = custom || layouts[layout];\n  $: data = rawData.map((d) => {\n    let display = d.display;\n    if (swaps[d.value]) display = swaps[d.value];\n    if (!display) display = shifted ? d.value.toUpperCase() : d.value;\n    if (d.value === \"Shift\")\n      display = shifted ? swaps[d.value] : swaps[d.value].toUpperCase();\n    return {\n      ...d,\n      display,\n    };\n  });\n\n  $: page0 = data.filter((d) => !d.page);\n  $: page1 = data.filter((d) => d.page);\n\n  $: rows0 = unique(page0.map((d) => d.row));\n  $: rows0, rows0.sort((a, b) => a - b);\n\n  $: rows1 = unique(page1.map((d) => d.row));\n  $: rows1, rows1.sort((a, b) => a - b);\n\n  $: rowData0 = rows0.map((r) => page0.filter((k) => k.row === r));\n  $: rowData1 = rows0.map((r) => page1.filter((k) => k.row === r));\n  $: rowData = [rowData0, rowData1];\n  $: maxInRow0 = Math.max(...rowData0.map((r) => r.length));\n  $: maxInRow1 = Math.max(...rowData1.map((r) => r.length));\n  $: maxInRow = Math.max(maxInRow0, maxInRow1);\n  $: percentWidth = `${(1 / maxInRow) * 100}%`;\n\n  function onKey(value, event) {\n    event.preventDefault();\n    if (value.includes(\"Page\")) {\n      page = +value.substr(-1);\n    } else if (value === \"Shift\") {\n      shifted = !shifted;\n    } else {\n      let output = value;\n      if (shifted && alphabet.includes(value)) output = value.toUpperCase();\n      if (value === \"Space\") output = \" \";\n      dispatch(\"keydown\", output);\n    }\n    event.stopPropagation();\n    return false;\n  }\n</script>\n\n<div class=\"keyboard\">\n  {#each rowData as row, i}\n    <div class=\"page\" class:visible=\"{i === page}\">\n      {#each row as keys}\n        <div class=\"row row--{i}\">\n          {#each keys as { value, display }}\n            <button\n              style=\"--w: {percentWidth};\"\n              class=\"{style} key--{value}\"\n              class:single=\"{value.length === 1}\"\n              on:touchstart=\"{(e) => onKey(value, e)}\"\n              on:mousedown=\"{(e) => onKey(value, e)}\">\n              {#if display.includes('<svg')}\n                {@html display}\n              {:else}{display}{/if}\n            </button>\n          {/each}\n        </div>\n      {/each}\n    </div>\n  {/each}\n</div>\n\n<style>\n  .row {\n    display: flex;\n    justify-content: center;\n  }\n\n  button {\n    display: inline-block;\n    font-family: sans-serif;\n    font-size: 1em;\n    text-align: center;\n    padding: 0.5em;\n    margin: 0.1em;\n    border-radius: 2px;\n    background-color: #efefef;\n    border: none;\n    cursor: pointer;\n    line-height: 1;\n    vertical-align: baseline;\n    width: var(--w);\n  }\n\n  button.depth {\n    box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.25);\n    margin: 0.2em;\n  }\n\n  button.outline {\n    border: 1px solid rgba(0, 0, 0, 0.25);\n  }\n\n  button:active {\n    transform: scale(2);\n    background-color: #cdcdcd;\n  }\n\n  button.single {\n    padding: 0.5em 0;\n  }\n\n  .page {\n    display: none;\n  }\n\n  .page.visible {\n    display: block;\n  }\n\n  button.key--Space {\n    width: 20%;\n  }\n\n  button.key--Page0,\n  button.key--Page1,\n  button.key--Shift,\n  button.key--Backspace,\n  button.key--Enter {\n    width: auto;\n    min-width: var(--w);\n  }\n</style>\n",
    "<script>\n  export let x;\n  export let y;\n  export let value;\n  export let answer;\n  export let number;\n  export let index;\n  export let custom;\n  export let changeDelay = 0;\n  export let isRevealing = false;\n  export let isChecking = false;\n  export let isFocused = false;\n  export let isSecondarilyFocused = false;\n  export let onFocusCell = () => {};\n  export let onCellUpdate = () => {};\n  export let onFocusClueDiff = () => {};\n  export let onMoveFocus = () => {};\n  export let onFlipDirection = () => {};\n  export let onHistoricalChange = () => {};\n\n  let element;\n\n  $: isFocused, onFocusSelf();\n  $: correct = answer === value;\n  $: showCheck = isChecking && value;\n\n  function onFocusSelf() {\n    if (!element) return;\n    if (isFocused) element.focus();\n  }\n\n  function onKeydown(e) {\n    if (e.ctrlKey && e.key.toLowerCase() == \"z\") {\n      onHistoricalChange(e.shiftKey ? 1 : -1);\n    }\n\n    if (e.ctrlKey) return;\n    if (e.altKey) return;\n\n    if (e.key === \"Tab\") {\n      onFocusClueDiff(e.shiftKey ? -1 : 1);\n      e.preventDefault();\n      e.stopPropagation();\n      return;\n    }\n\n    if (e.key == \" \") {\n      onFlipDirection();\n      e.preventDefault();\n      e.stopPropagation();\n      return;\n    }\n\n    if ([\"Delete\", \"Backspace\"].includes(e.key)) {\n      onCellUpdate(index, \"\", -1, true);\n      return;\n    }\n\n    const isKeyInAlphabet = /^[a-zA-Z()]$/.test(e.key);\n    if (isKeyInAlphabet) {\n      onCellUpdate(index, e.key.toUpperCase());\n      return;\n    }\n\n    const diff = {\n      ArrowLeft: [\"across\", -1],\n      ArrowRight: [\"across\", 1],\n      ArrowUp: [\"down\", -1],\n      ArrowDown: [\"down\", 1],\n    }[e.key];\n    if (diff) {\n      onMoveFocus(...diff);\n      e.preventDefault();\n      e.stopPropagation();\n      return;\n    }\n  }\n\n  function onClick() {\n    onFocusCell(index);\n  }\n\n  function pop(node, { delay = 0, duration = 250 }) {\n    return {\n      delay,\n      duration,\n      css: (t) =>\n        [\n          `transform: translate(0, ${1 - t}px)`, //\n        ].join(\";\"),\n    };\n  }\n</script>\n\n<g\n  class=\"cell {custom} cell-{x}-{y}\"\n  class:is-focused=\"{isFocused}\"\n  class:is-secondarily-focused=\"{isSecondarilyFocused}\"\n  class:is-correct=\"{showCheck && correct}\"\n  class:is-incorrect=\"{showCheck && !correct}\"\n  transform=\"{`translate(${x}, ${y})`}\"\n  tabIndex=\"0\"\n  on:click=\"{onClick}\"\n  on:keydown=\"{onKeydown}\"\n  bind:this=\"{element}\">\n  <rect width=\"1\" height=\"1\"></rect>\n\n  {#if showCheck && !correct}\n    <line x1=\"0\" y1=\"1\" x2=\"1\" y2=\"0\"></line>\n  {/if}\n\n  {#if value}\n    <text\n      transition:pop=\"{{ y: 5, delay: changeDelay, duration: isRevealing ? 250 : 0 }}\"\n      class=\"value\"\n      x=\"0.5\"\n      y=\"0.9\"\n      text-anchor=\"middle\">\n      {value}\n    </text>\n  {/if}\n  <text class=\"number\" x=\"0.08\" y=\"0.3\" text-anchor=\"start\">{number}</text>\n</g>\n\n<style>\n  g {\n    cursor: pointer;\n    user-select: none;\n  }\n\n  g:focus {\n    outline: none;\n  }\n\n  g.is-secondarily-focused rect {\n    fill: var(--secondary-highlight-color);\n  }\n\n  g.is-focused rect {\n    fill: var(--primary-highlight-color);\n  }\n\n  text {\n    pointer-events: none;\n    line-height: 1;\n    font-family: var(--font);\n    fill: var(--main-color);\n  }\n\n  .value {\n    font-size: 0.7em;\n    font-weight: 400;\n  }\n\n  .number {\n    font-size: 0.3em;\n    font-weight: 400;\n    fill: var(--main-color);\n    opacity: 0.5;\n  }\n\n  rect {\n    fill: var(--bg-color);\n    stroke: var(--main-color);\n    stroke-width: 0.01em;\n    transition: fill 0.1s ease-out;\n  }\n\n  line {\n    stroke: var(--main-color);\n    stroke-width: 0.02em;\n  }\n</style>\n",
    "<script>\n  import scrollTo from \"./helpers/scrollTo.js\";\n\n  export let number;\n  export let clue;\n  export let custom;\n  export let isFilled;\n  export let isNumberFocused = false;\n  export let isDirectionFocused = false;\n  export let isDisableHighlight = false;\n  export let onFocus = () => {};\n\n  let element;\n\n  $: isFocused = isNumberFocused;\n</script>\n\n<li bind:this=\"{element}\" use:scrollTo=\"{isFocused}\">\n  <button\n    class=\"clue {custom}\"\n    class:is-disable-highlight=\"{isDisableHighlight}\"\n    class:is-number-focused=\"{isNumberFocused}\"\n    class:is-direction-focused=\"{isDirectionFocused}\"\n    class:is-filled=\"{isFilled}\"\n    on:click=\"{onFocus}\">\n    <strong>{number}</strong>\n    {clue}\n  </button>\n</li>\n\n<style>\n  button {\n    display: flex;\n    width: 100%;\n    background: none;\n    text-align: left;\n    appearance: none;\n    outline: none;\n    border: none;\n    border-left: 6px solid transparent;\n    padding: 0.5em;\n    cursor: pointer;\n    line-height: 1.325;\n    color: var(--main-color);\n    font-family: var(--font);\n    font-size: 1em;\n    cursor: pointer;\n  }\n\n  strong {\n    min-width: 1.25em;\n    display: inline-block;\n    text-align: right;\n    margin-right: 0.5em;\n  }\n\n  .clue:focus:not(.is-disable-highlight) {\n    border-color: var(--secondary-highlight-color);\n  }\n  .is-number-focused:not(.is-disable-highlight) {\n    border-left-color: var(--secondary-highlight-color);\n  }\n  .is-number-focused.is-direction-focused:not(.is-disable-highlight) {\n    background: var(--secondary-highlight-color);\n  }\n  .is-filled {\n    opacity: 0.5;\n  }\n</style>\n",
    "<script>\n  import { createEventDispatcher } from \"svelte\";\n  const dispatch = createEventDispatcher();\n\n  export let currentClue = {};\n  $: clue = currentClue[\"clue\"];\n  $: custom = currentClue[\"custom\"] || \"\";\n</script>\n\n<div class=\"bar {custom}\">\n  <button on:click=\"{() => dispatch('nextClue', currentClue.index - 1)}\">\n    <svg\n      width=\"24\"\n      height=\"24\"\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      stroke-width=\"2\"\n      stroke-linecap=\"round\"\n      stroke-linejoin=\"round\"\n      class=\"feather feather-chevron-left\">\n      <polyline points=\"15 18 9 12 15 6\"></polyline>\n    </svg>\n  </button>\n  <p>{clue}</p>\n  <button on:click=\"{() => dispatch('nextClue', currentClue.index + 1)}\">\n    <svg\n      width=\"24\"\n      height=\"24\"\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      stroke-width=\"2\"\n      stroke-linecap=\"round\"\n      stroke-linejoin=\"round\"\n      class=\"feather feather-chevron-right\">\n      <polyline points=\"9 18 15 12 9 6\"></polyline>\n    </svg>\n  </button>\n</div>\n\n<style>\n  .bar {\n    width: 100%;\n    display: flex;\n    justify-content: space-between;\n    background-color: var(--secondary-highlight-color);\n    align-items: center;\n  }\n\n  p {\n    padding: 0 1em;\n    line-height: 1.325;\n    font-family: var(--font);\n  }\n\n  button {\n    cursor: pointer;\n    font-size: 1em;\n    border: none;\n    line-height: 1;\n    color: var(--main-color);\n    background-color: transparent;\n  }\n</style>\n",
    "<script>\n  import Clue from \"./Clue.svelte\";\n\n  export let direction;\n  export let clues;\n  export let focusedClueNumbers;\n  export let isDirectionFocused;\n  export let onClueFocus;\n  export let isDisableHighlight;\n</script>\n\n<p>{direction}</p>\n<div class=\"list\">\n  <ul>\n    {#each clues as clue}\n      <Clue\n        clue=\"{clue.clue}\"\n        number=\"{clue.number}\"\n        custom=\"{clue.custom}\"\n        isFilled=\"{clue.isFilled}\"\n        isNumberFocused=\"{focusedClueNumbers[direction] === clue.number}\"\n        isDirectionFocused=\"{isDirectionFocused}\"\n        isDisableHighlight=\"{isDisableHighlight}\"\n        onFocus=\"{() => onClueFocus(clue)}\" />\n    {/each}\n  </ul>\n</div>\n\n<style>\n  .list {\n    position: relative;\n    max-height: 45vh;\n    margin-bottom: 2em;\n    overflow: auto;\n  }\n\n  p {\n    font-family: var(--font);\n    color: var(--main-color);\n    font-weight: 700;\n    text-transform: uppercase;\n    padding-left: calc(2.5em + 6px);\n    padding-bottom: 0.5em;\n    font-size: 0.85em;\n    border-bottom: 1px solid var(--accent-color);\n    margin: 0;\n  }\n\n  ul {\n    list-style-type: none;\n    padding-left: 0;\n    margin: 0;\n    margin-top: 1em;\n  }\n\n  ::-moz-scrollbar {\n    width: 9px;\n  }\n  ::-webkit-scrollbar {\n    width: 9px;\n  }\n\n  ::-moz-scrollbar-track {\n    box-shadow: none;\n    border-radius: 8px;\n    background-color: var(--accent-color);\n  }\n  ::-webkit-scrollbar-track {\n    box-shadow: none;\n    border-radius: 8px;\n    background-color: var(--accent-color);\n  }\n  ::scrollbar-thumb {\n    border-radius: 8px;\n    background-color: var(--scrollbar-color);\n    box-shadow: none;\n  }\n  ::-moz-scrollbar-thumb {\n    background-color: var(--scrollbar-color);\n    border-radius: 6px;\n  }\n  ::-webkit-scrollbar-thumb {\n    background-color: var(--scrollbar-color);\n    border-radius: 6px;\n  }\n</style>\n",
    "<script>\n  import ClueList from \"./ClueList.svelte\";\n  import ClueBar from \"./ClueBar.svelte\";\n\n  export let clues;\n  export let cellIndexMap;\n  export let focusedDirection;\n  export let focusedCellIndex;\n  export let focusedCell;\n  export let stacked;\n  export let isDisableHighlight;\n  export let isLoaded;\n\n  $: focusedClueNumbers = focusedCell.clueNumbers || {};\n  $: currentClue =\n    clues.find(\n      c =>\n        c.direction === focusedDirection &&\n        c.number === focusedClueNumbers[focusedDirection]\n    ) || {};\n\n  function onClueFocus({ direction, id }) {\n    focusedDirection = direction;\n    focusedCellIndex = cellIndexMap[id] || 0;\n  }\n\n  function onNextClue({ detail }) {\n    let next = detail;\n    if (next < 0) next = clues.length - 1;\n    else if (next > clues.length - 1) next = 0;\n    const { direction, id } = clues[next];\n    onClueFocus({ direction, id });\n  }\n</script>\n\n<section class=\"clues\" class:stacked class:is-loaded=\"{isLoaded}\">\n  <div class=\"clues--stacked\">\n    <ClueBar {currentClue} on:nextClue=\"{onNextClue}\" />\n  </div>\n\n  <div class=\"clues--list\">\n    {#each ['across', 'down'] as direction}\n      <ClueList\n        {direction}\n        {focusedClueNumbers}\n        clues=\"{clues.filter(d => d.direction === direction)}\"\n        isDirectionFocused=\"{focusedDirection === direction}\"\n        {isDisableHighlight}\n        {onClueFocus} />\n    {/each}\n  </div>\n</section>\n\n<style>\n  section {\n    position: sticky;\n    top: 1em;\n    flex: 0 1 16em;\n    height: fit-content;\n    margin: 0;\n    margin-right: 1em;\n  }\n\n  section.is-loaded.stacked {\n    position: static;\n    height: auto;\n    top: auto;\n    display: block;\n    margin: 1em 0;\n    flex: auto;\n  }\n\n  .clues--stacked {\n    margin: 0;\n    display: none;\n  }\n\n  .is-loaded.stacked .clues--stacked {\n    display: block;\n  }\n\n  .is-loaded.stacked .clues--list {\n    display: none;\n  }\n\n  @media only screen and (max-width: 720px) {\n    section:not(.is-loaded) {\n      position: static;\n      height: auto;\n      top: auto;\n      display: block;\n      margin: 1em 0;\n      flex: auto;\n    }\n\n    .clues--stacked:not(.is-loaded) {\n      display: block;\n    }\n\n    .clues--list:not(.is-loaded) {\n      display: none;\n    }\n  }\n</style>\n",
    "<script>\n  import { fade } from \"svelte/transition\";\n  import Confetti from \"./Confetti.svelte\";\n\n  export let showConfetti = true;\n\n  let isOpen = true;\n</script>\n\n{#if isOpen}\n  <div class=\"completed\" transition:fade=\"{{ y: 20 }}\">\n    <div class=\"content\">\n      <div class=\"message\">\n        <slot />\n      </div>\n\n      <button on:click=\"{() => (isOpen = false)}\">View puzzle</button>\n    </div>\n\n    {#if showConfetti}\n      <div class=\"confetti\">\n        <Confetti />\n      </div>\n    {/if}\n  </div>\n  <div\n    class=\"curtain\"\n    transition:fade=\"{{ duration: 250 }}\"\n    on:click=\"{() => (isOpen = false)}\"></div>\n{/if}\n\n<style>\n  .completed {\n    position: absolute;\n    top: min(50%, 15em);\n    left: 50%;\n    background-color: var(--bg-color);\n    transform: translate(-50%, -50%);\n    border-radius: 4px;\n    z-index: 100;\n    box-shadow: 0 4px 8px 4px rgba(0, 0, 0, 0.2);\n    font-family: var(--font);\n  }\n\n  .curtain {\n    position: absolute;\n    top: 0;\n    right: -2px;\n    bottom: 0;\n    left: 0;\n    background-color: var(--bg-color);\n    opacity: 0.9;\n    cursor: pointer;\n    z-index: 1;\n  }\n\n  button {\n    cursor: pointer;\n    margin-left: 1em;\n    font-size: 1em;\n    font-family: var(--font);\n    background-color: var(--accent-color);\n    border-radius: 4px;\n    color: var(--main-color);\n    padding: 0.75em;\n    border: none;\n    font-weight: 400;\n    transition: background-color 150ms;\n  }\n\n  button:hover {\n    background-color: var(--secondary-highlight-color);\n  }\n\n  .content {\n    position: relative;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    padding: 2em;\n  }\n\n  .message {\n    margin-bottom: 1em;\n  }\n\n  .confetti {\n    position: absolute;\n    top: 30%;\n    left: 50%;\n    transform: translate(-50%, -50%);\n  }\n</style>\n",
    "<script>\n  import { quadIn } from \"svelte/easing\";\n\n  export let numberOfElements = 50;\n  export let durationInSeconds = 2;\n  export let colors = [\n    \"#fff\",\n    \"#c7ecee\",\n    \"#778beb\",\n    \"#f7d794\",\n    \"#63cdda\",\n    \"#cf6a87\",\n    \"#e77f67\",\n    \"#786fa6\",\n    \"#FDA7DF\",\n    \"#4b7bec\",\n    \"#475c83\",\n  ];\n\n  const pickFrom = (arr) => arr[Math.round(Math.random() * arr.length)];\n  const randomNumber = (min, max) => Math.random() * (max - min) + min;\n  const getManyOf = (str) => new Array(30).fill(0).map(() => str);\n\n  const elementOptions = [\n    ...getManyOf(`<circle r=\"3\" />`),\n    ...getManyOf(\n      `<path d=\"M3.83733 4.73234C4.38961 4.73234 4.83733 4.28463 4.83733 3.73234C4.83733 3.18006 4.38961 2.73234 3.83733 2.73234C3.28505 2.73234 2.83733 3.18006 2.83733 3.73234C2.83733 4.28463 3.28505 4.73234 3.83733 4.73234ZM3.83733 6.73234C5.49418 6.73234 6.83733 5.38919 6.83733 3.73234C6.83733 2.07549 5.49418 0.732341 3.83733 0.732341C2.18048 0.732341 0.83733 2.07549 0.83733 3.73234C0.83733 5.38919 2.18048 6.73234 3.83733 6.73234Z\" />`\n    ),\n    ...getManyOf(\n      `<path d=\"M4.29742 2.26041C3.86864 2.1688 3.20695 2.21855 2.13614 3.0038C1.69078 3.33041 1.06498 3.23413 0.738375 2.78876C0.411774 2.3434 0.508051 1.7176 0.953417 1.39099C2.32237 0.387097 3.55827 0.0573281 4.71534 0.304565C5.80081 0.536504 6.61625 1.24716 7.20541 1.78276C7.28295 1.85326 7.35618 1.92051 7.4263 1.9849C7.64841 2.18888 7.83929 2.36418 8.03729 2.52315C8.29108 2.72692 8.48631 2.8439 8.64952 2.90181C8.7915 2.95219 8.91895 2.96216 9.07414 2.92095C9.24752 2.8749 9.5134 2.7484 9.88467 2.42214C10.2995 2.05757 10.9314 2.09833 11.2959 2.51319C11.6605 2.92805 11.6198 3.5599 11.2049 3.92447C10.6816 4.38435 10.1478 4.70514 9.58752 4.85394C9.00909 5.00756 8.469 4.95993 7.9807 4.78667C7.51364 4.62093 7.11587 4.34823 6.78514 4.08268C6.53001 3.87783 6.27248 3.64113 6.04114 3.4285C5.97868 3.37109 5.91814 3.31544 5.86006 3.26264C5.25645 2.7139 4.79779 2.36733 4.29742 2.26041Z\" />`\n    ),\n    ...getManyOf(`<rect width=\"4\" height=\"4\" x=\"-2\" y=\"-2\" />`),\n    `<path d=\"M -5 5 L 0 -5 L 5 5 Z\" />`,\n    ...\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n      .split(\"\")\n      .map((letter) => `<text style=\"font-weight: 700\">${letter}</text>`),\n  ];\n\n  const allElements = new Array(numberOfElements)\n    .fill(0)\n    .map((_, i) => [pickFrom(elementOptions), pickFrom(colors), Math.random()]);\n</script>\n\n<svg class=\"confetti\" viewBox=\"-10 -10 10 10\">\n  {#each allElements as [element, color, scale], i}\n    <g style=\"transform: scale({scale})\">\n      <g\n        fill=\"{color}\"\n        style=\"{[`--rotation: ${Math.random() * 360}deg`, `animation-delay: ${quadIn(i / numberOfElements)}s`, `animation-duration: ${durationInSeconds * randomNumber(0.7, 1)}s`].join(';')}\">\n        {@html element}\n      </g>\n    </g>\n  {/each}\n</svg>\n\n<style>\n  .confetti {\n    width: 2em;\n    position: absolute;\n    stroke-linecap: round;\n    stroke-linejoin: round;\n    fill-rule: evenodd;\n    clip-rule: evenodd;\n    pointer-events: none;\n    overflow: visible;\n    transform: translate(-50%, -50%);\n  }\n  @keyframes pop {\n    0% {\n      transform: rotate(var(--rotation)) scale(1) translate(0em, 0em);\n    }\n    100% {\n      transform: rotate(calc(var(--rotation) + 60deg)) scale(0)\n        translate(9em, 9em);\n      fill: white;\n    }\n  }\n  g {\n    transition: all 0.5s ease-out;\n    transform: rotate(var(--rotation)) scale(0) translate(0, 0);\n    animation: pop 2s ease-out;\n    animation-iteration-count: infinite;\n  }\n</style>\n",
    "<script>\n  import { onMount } from \"svelte\";\n  import Toolbar from \"./Toolbar.svelte\";\n  import Puzzle from \"./Puzzle.svelte\";\n  import Clues from \"./Clues.svelte\";\n  import CompletedMessage from \"./CompletedMessage.svelte\";\n  import createClues from \"./helpers/createClues.js\";\n  import createCells from \"./helpers/createCells.js\";\n  import validateClues from \"./helpers/validateClues.js\";\n  import { fromPairs } from \"./helpers/utils.js\";\n  import themeStyles from \"./helpers/themeStyles.js\";\n\n  export let data = [];\n  export let actions = [\"clear\", \"reveal\", \"check\"];\n  export let theme = \"classic\";\n  export let revealDuration = 1000;\n  export let breakpoint = 720;\n  export let revealed = false;\n  export let disableHighlight = false;\n  export let showCompleteMessage = true;\n  export let showConfetti = true;\n  export let showKeyboard;\n  export let keyboardStyle = \"outline\";\n\n  let width = 0;\n  let focusedDirection = \"across\";\n  let focusedCellIndex = 0;\n  let isRevealing = false;\n  let isLoaded = false;\n  let isChecking = false;\n  let revealTimeout;\n  let clueCompletion;\n\n  let originalClues = [];\n  let validated = [];\n  let clues = [];\n  let cells = [];\n\n  const onDataUpdate = () => {\n    originalClues = createClues(data);\n    validated = validateClues(originalClues);\n    clues = originalClues.map((d) => ({ ...d }));\n    cells = createCells(originalClues);\n    reset();\n  };\n\n  $: data, onDataUpdate();\n  $: focusedCell = cells[focusedCellIndex] || {};\n  $: cellIndexMap = fromPairs(cells.map((cell) => [cell.id, cell.index]));\n  $: percentCorrect =\n    cells.filter((d) => d.answer === d.value).length / cells.length;\n  $: isComplete = percentCorrect == 1;\n  $: isDisableHighlight = isComplete && disableHighlight;\n  $: cells, (clues = checkClues());\n  $: cells, (revealed = !clues.filter((d) => !d.isCorrect).length);\n  $: stacked = width < breakpoint;\n  $: inlineStyles = themeStyles[theme];\n\n  onMount(() => {\n    isLoaded = true;\n  });\n\n  function checkClues() {\n    return clues.map((d) => {\n      const index = d.index;\n      const cellChecks = d.cells.map((c) => {\n        const { value } = cells.find((e) => e.id === c.id);\n        const hasValue = !!value;\n        const hasCorrect = value === c.answer;\n        return { hasValue, hasCorrect };\n      });\n      const isCorrect =\n        cellChecks.filter((c) => c.hasCorrect).length === d.answer.length;\n      const isFilled =\n        cellChecks.filter((c) => c.hasValue).length === d.answer.length;\n      return {\n        ...d,\n        isCorrect,\n        isFilled,\n      };\n    });\n  }\n\n  function reset() {\n    isRevealing = false;\n    isChecking = false;\n    focusedCellIndex = 0;\n    focusedDirection = \"across\";\n  }\n\n  function onClear() {\n    reset();\n    if (revealTimeout) clearTimeout(revealTimeout);\n    cells = cells.map((cell) => ({\n      ...cell,\n      value: \"\",\n    }));\n  }\n\n  function onReveal() {\n    if (revealed) return true;\n    reset();\n    cells = cells.map((cell) => ({\n      ...cell,\n      value: cell.answer,\n    }));\n    startReveal();\n  }\n\n  function onCheck() {\n    isChecking = true;\n  }\n\n  function startReveal() {\n    isRevealing = true;\n    isChecking = false;\n    if (revealTimeout) clearTimeout(revealTimeout);\n    revealTimeout = setTimeout(() => {\n      isRevealing = false;\n    }, revealDuration + 250);\n  }\n\n  function onToolbarEvent({ detail }) {\n    if (detail === \"clear\") onClear();\n    else if (detail === \"reveal\") onReveal();\n    else if (detail === \"check\") onCheck();\n  }\n</script>\n\n{#if validated}\n  <article\n    class=\"svelte-crossword\"\n    bind:offsetWidth=\"{width}\"\n    style=\"{inlineStyles}\">\n    <slot\n      name=\"toolbar\"\n      onClear=\"{onClear}\"\n      onReveal=\"{onReveal}\"\n      onCheck=\"{onCheck}\">\n      <Toolbar actions=\"{actions}\" on:event=\"{onToolbarEvent}\" />\n    </slot>\n\n    <div class=\"play\" class:stacked class:is-loaded=\"{isLoaded}\">\n      <Clues\n        clues=\"{clues}\"\n        cellIndexMap=\"{cellIndexMap}\"\n        stacked=\"{stacked}\"\n        isDisableHighlight=\"{isDisableHighlight}\"\n        isLoaded=\"{isLoaded}\"\n        bind:focusedCellIndex\n        bind:focusedCell\n        bind:focusedDirection />\n      <Puzzle\n        clues=\"{clues}\"\n        focusedCell=\"{focusedCell}\"\n        isRevealing=\"{isRevealing}\"\n        isChecking=\"{isChecking}\"\n        isDisableHighlight=\"{isDisableHighlight}\"\n        revealDuration=\"{revealDuration}\"\n        showKeyboard=\"{showKeyboard}\"\n        stacked=\"{stacked}\"\n        isLoaded=\"{isLoaded}\"\n        keyboardStyle=\"{keyboardStyle}\"\n        bind:cells\n        bind:focusedCellIndex\n        bind:focusedDirection />\n    </div>\n\n    {#if isComplete && !isRevealing && showCompleteMessage}\n      <CompletedMessage showConfetti=\"{showConfetti}\">\n        <slot name=\"message\">\n          <h3>You solved it!</h3>\n        </slot>\n      </CompletedMessage>\n    {/if}\n  </article>\n{/if}\n\n<style>\n  article {\n    position: relative;\n    background-color: transparent;\n    font-size: 16px;\n  }\n\n  .play {\n    display: flex;\n    flex-direction: var(--order, row);\n  }\n\n  .play.is-loaded.stacked {\n    flex-direction: column;\n  }\n\n  h3 {\n    margin: 0;\n    margin-bottom: 0.5em;\n  }\n\n  @media only screen and (max-width: 720px) {\n    .play:not(.is-loaded) {\n      flex-direction: column;\n    }\n  }\n</style>\n",
    "<script>\n  import { onMount } from \"svelte\";\n  import Keyboard from \"svelte-keyboard\";\n  import getSecondarilyFocusedCells from \"./helpers/getSecondarilyFocusedCells.js\";\n  import getCellAfterDiff from \"./helpers/getCellAfterDiff.js\";\n  import checkMobile from \"./helpers/checkMobile.js\";\n\n  import Cell from \"./Cell.svelte\";\n\n  export let clues;\n  export let cells;\n  export let focusedDirection;\n  export let focusedCellIndex;\n  export let focusedCell;\n  export let isRevealing;\n  export let isChecking;\n  export let isDisableHighlight;\n  export let stacked;\n  export let revealDuration = 0;\n  export let showKeyboard;\n  export let isLoaded;\n  export let keyboardStyle;\n\n  let element;\n  let cellsHistoryIndex = 0;\n  let cellsHistory = [];\n  let focusedCellIndexHistoryIndex = 0;\n  let focusedCellIndexHistory = [];\n  let secondarilyFocusedCells = [];\n  let isMobile = false;\n  let isPuzzleFocused = false;\n\n  const numberOfStatesInHistory = 10;\n  $: w = Math.max(...cells.map((d) => d.x)) + 1;\n  $: h = Math.max(...cells.map((d) => d.y)) + 1;\n  $: keyboardVisible =\n    typeof showKeyboard === \"boolean\" ? showKeyboard : isMobile;\n\n  $: cells, focusedCellIndex, focusedDirection, updateSecondarilyFocusedCells();\n  $: sortedCellsInDirection = [...cells].sort((a, b) =>\n    focusedDirection == \"down\" ? a.x - b.x || a.y - b.y : a.y - b.y || a.x - b.x\n  );\n\n  onMount(() => {\n    isMobile = checkMobile();\n  });\n\n  function updateSecondarilyFocusedCells() {\n    secondarilyFocusedCells = getSecondarilyFocusedCells({\n      cells,\n      focusedDirection,\n      focusedCell,\n    });\n  }\n\n  function onCellUpdate(index, newValue, diff = 1, doReplaceFilledCells) {\n    doReplaceFilledCells = doReplaceFilledCells || !!cells[index].value;\n\n    const dimension = focusedDirection == \"across\" ? \"x\" : \"y\";\n    const clueIndex = cells[index].clueNumbers[focusedDirection];\n    const cellsInClue = cells.filter(\n      (cell) =>\n        cell.clueNumbers[focusedDirection] == clueIndex &&\n        (doReplaceFilledCells || !cell.value)\n    );\n    const cellsInCluePositions = cellsInClue\n      .map((cell) => cell[dimension])\n      .filter(Number.isFinite);\n    const isAtEndOfClue =\n      cells[index][dimension] == Math.max(...cellsInCluePositions);\n\n    const newCells = [\n      ...cells.slice(0, index),\n      { ...cells[index], value: newValue },\n      ...cells.slice(index + 1),\n    ];\n    cellsHistory = [newCells, ...cellsHistory.slice(cellsHistoryIndex)].slice(\n      0,\n      numberOfStatesInHistory\n    );\n    cellsHistoryIndex = 0;\n    cells = newCells;\n\n    if (isAtEndOfClue && diff > 0) {\n      onFocusClueDiff(diff);\n    } else {\n      onFocusCellDiff(diff, doReplaceFilledCells);\n    }\n  }\n\n  function onHistoricalChange(diff) {\n    cellsHistoryIndex += -diff;\n    cells = cellsHistory[cellsHistoryIndex] || cells;\n    focusedCellIndexHistoryIndex += -diff;\n    focusedCellIndex =\n      focusedCellIndexHistory[cellsHistoryIndex] || focusedCellIndex;\n  }\n\n  function onFocusCell(index) {\n    if (isPuzzleFocused && index == focusedCellIndex) {\n      onFlipDirection();\n    } else {\n      focusedCellIndex = index;\n      \n      if (!cells[focusedCellIndex].clueNumbers[focusedDirection]) {\n        const newDirection = focusedDirection === \"across\" ? \"down\" : \"across\";\n        focusedDirection = newDirection\n      }\n\n      focusedCellIndexHistory = [\n        index,\n        ...focusedCellIndexHistory.slice(0, numberOfStatesInHistory),\n      ];\n      focusedCellIndexHistoryIndex = 0;\n    }\n  }\n\n  function onFocusCellDiff(diff, doReplaceFilledCells = true) {\n    const sortedCellsInDirectionFiltered = sortedCellsInDirection.filter((d) =>\n      doReplaceFilledCells ? true : !d.value\n    );\n    const currentCellIndex = sortedCellsInDirectionFiltered.findIndex(\n      (d) => d.index == focusedCellIndex\n    );\n    const nextCellIndex = (\n      sortedCellsInDirectionFiltered[currentCellIndex + diff] || {}\n    ).index;\n    const nextCell = cells[nextCellIndex];\n    if (!nextCell) return;\n    onFocusCell(nextCellIndex);\n  }\n\n  function onFocusClueDiff(diff = 1) {\n    const currentNumber = focusedCell.clueNumbers[focusedDirection];\n    let nextCluesInDirection = clues.filter(\n      (clue) =>\n        !clue.isFilled &&\n        (diff > 0\n          ? clue.number > currentNumber\n          : clue.number < currentNumber) &&\n        clue.direction == focusedDirection\n    );\n    if (diff < 0) {\n      nextCluesInDirection = nextCluesInDirection.reverse();\n    }\n    let nextClue = nextCluesInDirection[Math.abs(diff) - 1];\n    if (!nextClue) {\n      onFlipDirection();\n      nextClue = clues.filter((clue) => clue.direction == focusedDirection)[0];\n    }\n    const nextFocusedCell =\n      sortedCellsInDirection.find(\n        (cell) =>\n          !cell.value && cell.clueNumbers[focusedDirection] == nextClue.number\n      ) || {};\n    focusedCellIndex = nextFocusedCell.index || 0;\n  }\n\n  function onMoveFocus(direction, diff) {\n    if (focusedDirection != direction) {\n      const dimension = direction == \"across\" ? \"x\" : \"y\";\n      focusedDirection = direction;\n    } else {\n      const nextCell = getCellAfterDiff({\n        diff,\n        cells,\n        direction,\n        focusedCell,\n      });\n      if (!nextCell) return;\n      onFocusCell(nextCell.index);\n    }\n  }\n\n  function onFlipDirection() {\n    const newDirection = focusedDirection === \"across\" ? \"down\" : \"across\";\n    const hasClueInNewDirection = !!focusedCell[\"clueNumbers\"][newDirection];\n    if (hasClueInNewDirection) focusedDirection = newDirection;\n  }\n\n  function onKeydown({ detail }) {\n    const diff = detail === \"Backspace\" ? -1 : 1;\n    const value = detail === \"Backspace\" ? \"\" : detail;\n    onCellUpdate(focusedCellIndex, value, diff);\n  }\n\n  function onClick() {\n    isPuzzleFocused = element.contains(document.activeElement);\n  }\n</script>\n\n<svelte:window on:click=\"{onClick}\" />\n\n<section\n  class=\"puzzle\"\n  class:stacked\n  class:is-loaded=\"{isLoaded}\"\n  bind:this=\"{element}\">\n  <svg viewBox=\"0 0 {w} {h}\">\n    {#each cells as { x, y, value, answer, index, number, custom }}\n      <Cell\n        x=\"{x}\"\n        y=\"{y}\"\n        index=\"{index}\"\n        value=\"{value}\"\n        answer=\"{answer}\"\n        number=\"{number}\"\n        custom=\"{custom}\"\n        changeDelay=\"{isRevealing ? (revealDuration / cells.length) * index : 0}\"\n        isRevealing=\"{isRevealing}\"\n        isChecking=\"{isChecking}\"\n        isFocused=\"{focusedCellIndex == index && !isDisableHighlight}\"\n        isSecondarilyFocused=\"{secondarilyFocusedCells.includes(index) && !isDisableHighlight}\"\n        onFocusCell=\"{onFocusCell}\"\n        onCellUpdate=\"{onCellUpdate}\"\n        onFocusClueDiff=\"{onFocusClueDiff}\"\n        onMoveFocus=\"{onMoveFocus}\"\n        onFlipDirection=\"{onFlipDirection}\"\n        onHistoricalChange=\"{onHistoricalChange}\" />\n    {/each}\n  </svg>\n</section>\n\n{#if keyboardVisible}\n  <div class=\"keyboard\">\n    <Keyboard\n      layout=\"crossword\"\n      style=\"{keyboardStyle}\"\n      on:keydown=\"{onKeydown}\" />\n  </div>\n{/if}\n\n<style>\n  section {\n    position: sticky;\n    top: 1em;\n    order: 0;\n    flex: 1;\n    height: fit-content;\n  }\n\n  section.is-loaded.stacked {\n    position: relative;\n    top: auto;\n    height: auto;\n    order: -1;\n  }\n\n  svg {\n    width: 100%;\n    display: block;\n    font-size: 1px;\n    background: var(--main-color);\n    border: 4px solid var(--main-color);\n    box-sizing: border-box;\n  }\n\n  .keyboard {\n    order: 3;\n  }\n\n  @media only screen and (max-width: 720px) {\n    section:not(.is-loaded) {\n      position: relative;\n      top: auto;\n      height: auto;\n      order: -1;\n    }\n  }\n</style>\n",
    "<script>\n  import { createEventDispatcher } from \"svelte\";\n  const dispatch = createEventDispatcher();\n\n  export let actions = [\"clear\", \"reveal\", \"check\"];\n</script>\n\n<div class=\"toolbar\">\n  {#each actions as action}\n    {#if action === 'clear'}\n      <button on:click=\"{() => dispatch('event', 'clear')}\">Clear</button>\n    {:else if action === 'reveal'}\n      <button on:click=\"{() => dispatch('event', 'reveal')}\">Reveal</button>\n    {:else if action === 'check'}\n      <button on:click=\"{() => dispatch('event', 'check')}\">Check</button>\n    {/if}\n  {/each}\n</div>\n\n<style>\n  .toolbar {\n    margin-bottom: 1em;\n    padding: 1em 0;\n    display: flex;\n    justify-content: flex-end;\n    font-family: var(--font);\n    font-size: 0.85em;\n    background-color: transparent;\n  }\n\n  button {\n    cursor: pointer;\n    margin-left: 1em;\n    font-size: 1em;\n    font-family: var(--font);\n    background-color: var(--accent-color);\n    border-radius: 4px;\n    color: var(--main-color);\n    padding: 0.75em;\n    border: none;\n    font-weight: 400;\n    transition: background-color 150ms;\n  }\n\n  button:hover {\n    background-color: var(--secondary-highlight-color);\n  }\n</style>\n"
  ],
  "names": [],
  "mappings": "AAmHE,OAAO,8BAAC,CAAC,AACP,SAAS,CAAE,KAAK,CAChB,MAAM,CAAE,CAAC,CAAC,IAAI,CACd,OAAO,CAAE,GAAG,CACZ,WAAW,CAAE,UAAU,AACzB,CAAC,AACD,MAAM,8BAAC,CAAC,AACN,UAAU,CAAE,IAAI,CAChB,SAAS,CAAE,KAAK,CAChB,SAAS,CAAE,KAAK,AAClB,CAAC,AACD,OAAO,8BAAC,CAAC,AACP,SAAS,CAAE,KAAK,CAChB,MAAM,CAAE,GAAG,CAAC,CAAC,AACf,CAAC,AAED,KAAK,8BAAC,CAAC,AACL,SAAS,CAAE,KAAK,CAChB,MAAM,CAAE,GAAG,CAAC,CAAC,CACb,UAAU,CAAE,IAAI,CAChB,SAAS,CAAE,OAAO,AACpB,CAAC,AACD,oBAAK,CAAC,CAAC,eAAC,CAAC,AACP,YAAY,CAAE,MAAM,AACtB,CAAC,AACD,EAAE,8BAAC,CAAC,AACF,SAAS,CAAE,KAAK,AAClB,CAAC,AACD,EAAE,8BAAC,CAAC,AACF,SAAS,CAAE,KAAK,CAChB,WAAW,CAAE,GAAG,AAClB,CAAC,AACD,CAAC,8BAAC,CAAC,AACD,MAAM,CAAE,GAAG,CAAC,IAAI,AAClB,CAAC,AAED,OAAO,8BAAC,CAAC,AACP,OAAO,CAAE,GAAG,AACd,CAAC,AAED,OAAO,KAAK,8BAAC,CAAC,AACZ,UAAU,CAAE,OAAO,CACnB,KAAK,CAAE,IAAI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