{
  "version": 3,
  "sources": ["../src/concat.js"],
  "sourcesContent": ["/**\n * Internal dependencies\n */\n\nimport { normaliseFormats } from './normalise-formats';\nimport { create } from './create';\n\n/** @typedef {import('./types').RichTextValue} RichTextValue */\n\n/**\n * Concats a pair of rich text values. Not that this mutates `a` and does NOT\n * normalise formats!\n *\n * @param {Object} a Value to mutate.\n * @param {Object} b Value to add read from.\n *\n * @return {Object} `a`, mutated.\n */\nexport function mergePair( a, b ) {\n\ta.formats = a.formats.concat( b.formats );\n\ta.replacements = a.replacements.concat( b.replacements );\n\ta.text += b.text;\n\n\treturn a;\n}\n\n/**\n * Combine all Rich Text values into one. This is similar to\n * `String.prototype.concat`.\n *\n * @param {...RichTextValue} values Objects to combine.\n *\n * @return {RichTextValue} A new value combining all given records.\n */\nexport function concat( ...values ) {\n\treturn normaliseFormats( values.reduce( mergePair, create() ) );\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,+BAAiC;AACjC,oBAAuB;AAahB,SAAS,UAAW,GAAG,GAAI;AACjC,IAAE,UAAU,EAAE,QAAQ,OAAQ,EAAE,OAAQ;AACxC,IAAE,eAAe,EAAE,aAAa,OAAQ,EAAE,YAAa;AACvD,IAAE,QAAQ,EAAE;AAEZ,SAAO;AACR;AAUO,SAAS,UAAW,QAAS;AACnC,aAAO,2CAAkB,OAAO,OAAQ,eAAW,sBAAO,CAAE,CAAE;AAC/D;",
  "names": []
}
