{"version":3,"file":"save.cjs","names":["useBlockProps"],"sources":["../../src/math/save.jsx"],"sourcesContent":["import { useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { latex, mathML } = attributes;\n\n\tif ( ! latex ) {\n\t\treturn null;\n\t}\n\n\t// The LaTeX source lives in the `<annotation>` inside the MathML, where\n\t// it is HTML-escaped, so `wp_kses` leaves characters such as `&` and `<`\n\t// alone. Until the source renders, save it on its own: with the\n\t// annotation as the only child of `<semantics>`, browsers display the\n\t// source text.\n\treturn (\n\t\t<div { ...useBlockProps.save() }>\n\t\t\t{ mathML ? (\n\t\t\t\t<math\n\t\t\t\t\tdisplay=\"block\"\n\t\t\t\t\tdangerouslySetInnerHTML={ { __html: mathML } }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<math display=\"block\">\n\t\t\t\t\t<semantics>\n\t\t\t\t\t\t{ /* eslint-disable-next-line react/no-unknown-property -- MathML attribute. */ }\n\t\t\t\t\t\t<annotation encoding=\"application/x-tex\">\n\t\t\t\t\t\t\t{ latex }\n\t\t\t\t\t\t</annotation>\n\t\t\t\t\t</semantics>\n\t\t\t\t</math>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAEA,SAAwB,KAAM,EAAE,cAAe;CAC9C,MAAM,EAAE,OAAO,WAAW;CAE1B,IAAK,CAAE,OACN,OAAO;CAQR,OACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,GAAKA,wBAAAA,cAAc,KAAK;EAC1B,UAAA,SACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACC,SAAQ;GACR,yBAA0B,EAAE,QAAQ,OAAO;EAC3C,CAAA,IAED,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,SAAQ;GACb,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD,EAAA,UAEC,iBAAA,GAAA,kBAAA,IAAA,CAAC,cAAD;IAAY,UAAS;IAClB,UAAA;GACS,CAAA,EACF,CAAA;EACN,CAAA;CAEH,CAAA;AAEP"}