rotion 1.13.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/cjs/index.js +1 -1
- package/dist/ui/cjs/index.js.map +1 -1
- package/dist/ui/esm/index.js +1 -1
- package/dist/ui/esm/index.js.map +1 -1
- package/dist/ui/types.d.ts +6 -5
- package/dist/ui/umd/index.js +1 -1
- package/dist/ui/umd/index.js.map +1 -1
- package/package.json +5 -6
- package/dist/ui/cjs/types/exporter/api.d.ts +0 -19
- package/dist/ui/cjs/types/exporter/blocks.d.ts +0 -13
- package/dist/ui/cjs/types/exporter/breadcrumbs.d.ts +0 -7
- package/dist/ui/cjs/types/exporter/database.d.ts +0 -12
- package/dist/ui/cjs/types/exporter/files.d.ts +0 -27
- package/dist/ui/cjs/types/exporter/github.d.ts +0 -241
- package/dist/ui/cjs/types/exporter/index.d.ts +0 -5
- package/dist/ui/cjs/types/exporter/page.d.ts +0 -15
- package/dist/ui/cjs/types/exporter/types.d.ts +0 -748
- package/dist/ui/cjs/types/exporter/variables.d.ts +0 -22
- package/dist/ui/cjs/types/ui/components/Checkbox/Checkbox.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Checkbox/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/Gallery.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Gallery/Gallery.types.d.ts +0 -23
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryCard.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryCard.types.d.ts +0 -7
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryHandler.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryHandler.types.d.ts +0 -14
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.types.d.ts +0 -9
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCheckboxField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryDateField/GalleryDateField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryDateField/GalleryDateField.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryDateField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryFormulaField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.types.d.ts +0 -9
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryMultiSelectField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryNumberField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryPreview/GalleryPreview.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryPreview/GalleryPreview.types.d.ts +0 -14
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryPreview/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryRichTextField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/GallerySelectField/GallerySelectField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GallerySelectField/GallerySelectField.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Gallery/GallerySelectField/LinkedTag.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GallerySelectField/LinkedTag.types.d.ts +0 -9
- package/dist/ui/cjs/types/ui/components/Gallery/GallerySelectField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryTitleField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.types.d.ts +0 -3
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryUrlField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Gallery/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Icon/Icon.d.ts +0 -10
- package/dist/ui/cjs/types/ui/components/Icon/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/List/Column.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/List/Column.types.d.ts +0 -7
- package/dist/ui/cjs/types/ui/components/List/List.d.ts +0 -9
- package/dist/ui/cjs/types/ui/components/List/List.types.d.ts +0 -23
- package/dist/ui/cjs/types/ui/components/List/ListCheckboxField/ListCheckboxField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListCheckboxField/ListCheckboxField.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListCheckboxField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/List/ListDateField/ListDateField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListDateField/ListDateField.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/List/ListDateField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/List/ListFormulaField/ListFormulaField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListFormulaField/ListFormulaField.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListFormulaField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/List/ListHandler.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/List/ListHandler.types.d.ts +0 -14
- package/dist/ui/cjs/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/cjs/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/List/ListMultiSelectField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/List/ListNumberField/ListNumberField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListNumberField/ListNumberField.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListNumberField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/List/ListRichTextField/ListRichTextField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListRichTextField/ListRichTextField.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/List/ListRichTextField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/List/ListSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/cjs/types/ui/components/List/ListSelectField/ListSelectField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListSelectField/ListSelectField.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/List/ListSelectField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/List/ListTitleField/LinkedTitle.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListTitleField/LinkedTitle.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/List/ListTitleField/ListTitleField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListTitleField/ListTitleField.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/List/ListTitleField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/List/ListUrlField/ListUrlField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/List/ListUrlField/ListUrlField.types.d.ts +0 -3
- package/dist/ui/cjs/types/ui/components/List/ListUrlField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/List/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/BookmarkBlock/BookmarkBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/BookmarkBlock/BookmarkBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/BookmarkBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +0 -9
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.types.d.ts +0 -9
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.types.d.ts +0 -11
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/index.d.ts +0 -3
- package/dist/ui/cjs/types/ui/components/Page/BulletedListBlock/BulletedListBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/BulletedListBlock/BulletedListBlock.types.d.ts +0 -9
- package/dist/ui/cjs/types/ui/components/Page/BulletedListBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/CalloutBlock/CalloutBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/CalloutBlock/CalloutBlock.types.d.ts +0 -9
- package/dist/ui/cjs/types/ui/components/Page/CalloutBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.types.d.ts +0 -12
- package/dist/ui/cjs/types/ui/components/Page/ChildDatabaseBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/ChildPageBlock/ChildPageBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/ChildPageBlock/ChildPageBlock.types.d.ts +0 -12
- package/dist/ui/cjs/types/ui/components/Page/ChildPageBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/Code/Code.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/Code/Code.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/Code/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/CodeBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/CodeBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/ColumnListBlock/ColumnListBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/ColumnListBlock/ColumnListBlock.types.d.ts +0 -9
- package/dist/ui/cjs/types/ui/components/Page/ColumnListBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/EmbedBlock/EmbedBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/EmbedBlock/EmbedBlock.types.d.ts +0 -13
- package/dist/ui/cjs/types/ui/components/Page/EmbedBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/EquationBlock/EquationBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/EquationBlock/EquationBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/EquationBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/FileBlock/FileBlock.d.ts +0 -7
- package/dist/ui/cjs/types/ui/components/Page/FileBlock/FileBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/FileBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/ImageBlock/ImageBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/ImageBlock/ImageBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/ImageBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.d.ts +0 -7
- package/dist/ui/cjs/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/LinkPreviewBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/ListBlocks/ListBlocks.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/ListBlocks/ListBlocks.types.d.ts +0 -10
- package/dist/ui/cjs/types/ui/components/Page/ListBlocks/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/NumberedListBlock/NumberedListBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/NumberedListBlock/NumberedListBlock.types.d.ts +0 -9
- package/dist/ui/cjs/types/ui/components/Page/NumberedListBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/Page.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/Page.types.d.ts +0 -14
- package/dist/ui/cjs/types/ui/components/Page/PageHandler.d.ts +0 -15
- package/dist/ui/cjs/types/ui/components/Page/PageHandler.types.d.ts +0 -10
- package/dist/ui/cjs/types/ui/components/Page/PdfBlock/Pdf.d.ts +0 -24
- package/dist/ui/cjs/types/ui/components/Page/PdfBlock/PdfBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/PdfBlock/PdfBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/PdfBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/SyncedBlock/SyncedBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/SyncedBlock/SyncedBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/SyncedBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/TableBlock/TableBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/TableBlock/TableBlock.types.d.ts +0 -13
- package/dist/ui/cjs/types/ui/components/Page/TableBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/TableOfContentsBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/TextBlock/TextBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/TextBlock/TextBlock.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Page/TextBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/ToDoBlock/ToDoBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/ToDoBlock/ToDoBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/ToDoBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/ToggleBlock/ToggleBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/ToggleBlock/ToggleBlock.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Page/ToggleBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/VideoBlock/VideoBlock.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Page/VideoBlock/VideoBlock.types.d.ts +0 -10
- package/dist/ui/cjs/types/ui/components/Page/VideoBlock/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Page/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/PrefixSuffix/PrefixSuffix.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/PrefixSuffix/PrefixSuffix.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/PrefixSuffix/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/Annotation/Annotation.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/RichText/Annotation/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/Caption.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/RichText/Equation/Equation.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/RichText/Equation/Equation.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/RichText/Equation/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.d.ts +0 -7
- package/dist/ui/cjs/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.types.d.ts +0 -12
- package/dist/ui/cjs/types/ui/components/RichText/LinkIfLinked/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/Mention/DateMention/DateMention.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/RichText/Mention/DateMention/DateMention.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/RichText/Mention/DateMention/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/RichText/Mention/LinkPreviewMention/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/Mention/Mention.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/RichText/Mention/Mention.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/RichText/Mention/PageOrDatabaseMention/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/RichText/Mention/TemplateMention/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/Mention/UserMention/UserMention.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/RichText/Mention/UserMention/UserMention.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/RichText/Mention/UserMention/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/Mention/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/RichText.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/RichText/RichText.types.d.ts +0 -11
- package/dist/ui/cjs/types/ui/components/RichText/Text/Text.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/RichText/Text/Text.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/RichText/Text/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/RichText/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/Column.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Table/Column.types.d.ts +0 -7
- package/dist/ui/cjs/types/ui/components/Table/Table.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Table/Table.types.d.ts +0 -24
- package/dist/ui/cjs/types/ui/components/Table/TableCheckboxField/TableCheckboxField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableCheckboxField/TableCheckboxField.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableCheckboxField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/TableDateField/TableDateField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableDateField/TableDateField.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Table/TableDateField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/TableFormulaField/TableFormulaField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableFormulaField/TableFormulaField.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableFormulaField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/TableHandler.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Table/TableHandler.types.d.ts +0 -14
- package/dist/ui/cjs/types/ui/components/Table/TableIcon/TableIcon.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Table/TableIcon/TableIcon.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Table/TableIcon/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/cjs/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Table/TableMultiSelectField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/TableNumberField/TableNumberField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableNumberField/TableNumberField.types.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableNumberField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/TableRichTextField/TableRichTextField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableRichTextField/TableRichTextField.types.d.ts +0 -4
- package/dist/ui/cjs/types/ui/components/Table/TableRichTextField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/cjs/types/ui/components/Table/TableSelectField/TableSelectField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableSelectField/TableSelectField.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Table/TableSelectField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Table/TableTitleField/TableTitleField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableTitleField/TableTitleField.types.d.ts +0 -6
- package/dist/ui/cjs/types/ui/components/Table/TableTitleField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/TableUrlField/TableUrlField.d.ts +0 -5
- package/dist/ui/cjs/types/ui/components/Table/TableUrlField/TableUrlField.types.d.ts +0 -3
- package/dist/ui/cjs/types/ui/components/Table/TableUrlField/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/Table/index.d.ts +0 -2
- package/dist/ui/cjs/types/ui/components/index.d.ts +0 -61
- package/dist/ui/cjs/types/ui/components/lib.d.ts +0 -21
- package/dist/ui/cjs/types/ui/components/types.d.ts +0 -8
- package/dist/ui/cjs/types/ui/index.d.ts +0 -1
- package/dist/ui/esm/types/exporter/api.d.ts +0 -19
- package/dist/ui/esm/types/exporter/blocks.d.ts +0 -13
- package/dist/ui/esm/types/exporter/breadcrumbs.d.ts +0 -7
- package/dist/ui/esm/types/exporter/database.d.ts +0 -12
- package/dist/ui/esm/types/exporter/files.d.ts +0 -27
- package/dist/ui/esm/types/exporter/github.d.ts +0 -241
- package/dist/ui/esm/types/exporter/index.d.ts +0 -5
- package/dist/ui/esm/types/exporter/page.d.ts +0 -15
- package/dist/ui/esm/types/exporter/types.d.ts +0 -748
- package/dist/ui/esm/types/exporter/variables.d.ts +0 -22
- package/dist/ui/esm/types/ui/components/Checkbox/Checkbox.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Checkbox/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/Gallery.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Gallery/Gallery.types.d.ts +0 -23
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryCard.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryCard.types.d.ts +0 -7
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryHandler.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryHandler.types.d.ts +0 -14
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.types.d.ts +0 -9
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCheckboxField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/GalleryDateField/GalleryDateField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryDateField/GalleryDateField.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Gallery/GalleryDateField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryFormulaField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.types.d.ts +0 -9
- package/dist/ui/esm/types/ui/components/Gallery/GalleryMultiSelectField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryNumberField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/GalleryPreview/GalleryPreview.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryPreview/GalleryPreview.types.d.ts +0 -14
- package/dist/ui/esm/types/ui/components/Gallery/GalleryPreview/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryRichTextField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/GallerySelectField/GallerySelectField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GallerySelectField/GallerySelectField.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Gallery/GallerySelectField/LinkedTag.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GallerySelectField/LinkedTag.types.d.ts +0 -9
- package/dist/ui/esm/types/ui/components/Gallery/GallerySelectField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Gallery/GalleryTitleField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.types.d.ts +0 -3
- package/dist/ui/esm/types/ui/components/Gallery/GalleryUrlField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Gallery/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Icon/Icon.d.ts +0 -10
- package/dist/ui/esm/types/ui/components/Icon/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/List/Column.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/List/Column.types.d.ts +0 -7
- package/dist/ui/esm/types/ui/components/List/List.d.ts +0 -9
- package/dist/ui/esm/types/ui/components/List/List.types.d.ts +0 -23
- package/dist/ui/esm/types/ui/components/List/ListCheckboxField/ListCheckboxField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListCheckboxField/ListCheckboxField.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListCheckboxField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/List/ListDateField/ListDateField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListDateField/ListDateField.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/List/ListDateField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/List/ListFormulaField/ListFormulaField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListFormulaField/ListFormulaField.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListFormulaField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/List/ListHandler.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/List/ListHandler.types.d.ts +0 -14
- package/dist/ui/esm/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/esm/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/List/ListMultiSelectField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/List/ListNumberField/ListNumberField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListNumberField/ListNumberField.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListNumberField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/List/ListRichTextField/ListRichTextField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListRichTextField/ListRichTextField.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/List/ListRichTextField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/List/ListSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/esm/types/ui/components/List/ListSelectField/ListSelectField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListSelectField/ListSelectField.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/List/ListSelectField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/List/ListTitleField/LinkedTitle.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListTitleField/LinkedTitle.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/List/ListTitleField/ListTitleField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListTitleField/ListTitleField.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/List/ListTitleField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/List/ListUrlField/ListUrlField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/List/ListUrlField/ListUrlField.types.d.ts +0 -3
- package/dist/ui/esm/types/ui/components/List/ListUrlField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/List/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/BookmarkBlock/BookmarkBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/BookmarkBlock/BookmarkBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/BookmarkBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +0 -9
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.types.d.ts +0 -9
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.types.d.ts +0 -11
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/index.d.ts +0 -3
- package/dist/ui/esm/types/ui/components/Page/BulletedListBlock/BulletedListBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/BulletedListBlock/BulletedListBlock.types.d.ts +0 -9
- package/dist/ui/esm/types/ui/components/Page/BulletedListBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/CalloutBlock/CalloutBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/CalloutBlock/CalloutBlock.types.d.ts +0 -9
- package/dist/ui/esm/types/ui/components/Page/CalloutBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.types.d.ts +0 -12
- package/dist/ui/esm/types/ui/components/Page/ChildDatabaseBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/ChildPageBlock/ChildPageBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/ChildPageBlock/ChildPageBlock.types.d.ts +0 -12
- package/dist/ui/esm/types/ui/components/Page/ChildPageBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/Code/Code.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/Code/Code.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/Code/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/CodeBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/CodeBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/ColumnListBlock/ColumnListBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/ColumnListBlock/ColumnListBlock.types.d.ts +0 -9
- package/dist/ui/esm/types/ui/components/Page/ColumnListBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/EmbedBlock/EmbedBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/EmbedBlock/EmbedBlock.types.d.ts +0 -13
- package/dist/ui/esm/types/ui/components/Page/EmbedBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/EquationBlock/EquationBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/EquationBlock/EquationBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/EquationBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/FileBlock/FileBlock.d.ts +0 -7
- package/dist/ui/esm/types/ui/components/Page/FileBlock/FileBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/FileBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/ImageBlock/ImageBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/ImageBlock/ImageBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/ImageBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.d.ts +0 -7
- package/dist/ui/esm/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/LinkPreviewBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/ListBlocks/ListBlocks.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/ListBlocks/ListBlocks.types.d.ts +0 -10
- package/dist/ui/esm/types/ui/components/Page/ListBlocks/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/NumberedListBlock/NumberedListBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/NumberedListBlock/NumberedListBlock.types.d.ts +0 -9
- package/dist/ui/esm/types/ui/components/Page/NumberedListBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/Page.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/Page.types.d.ts +0 -14
- package/dist/ui/esm/types/ui/components/Page/PageHandler.d.ts +0 -15
- package/dist/ui/esm/types/ui/components/Page/PageHandler.types.d.ts +0 -10
- package/dist/ui/esm/types/ui/components/Page/PdfBlock/Pdf.d.ts +0 -24
- package/dist/ui/esm/types/ui/components/Page/PdfBlock/PdfBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/PdfBlock/PdfBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/PdfBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/SyncedBlock/SyncedBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/SyncedBlock/SyncedBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/SyncedBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/TableBlock/TableBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/TableBlock/TableBlock.types.d.ts +0 -13
- package/dist/ui/esm/types/ui/components/Page/TableBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/TableOfContentsBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/TextBlock/TextBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/TextBlock/TextBlock.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Page/TextBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/ToDoBlock/ToDoBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/ToDoBlock/ToDoBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/ToDoBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/ToggleBlock/ToggleBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/ToggleBlock/ToggleBlock.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Page/ToggleBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/VideoBlock/VideoBlock.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Page/VideoBlock/VideoBlock.types.d.ts +0 -10
- package/dist/ui/esm/types/ui/components/Page/VideoBlock/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Page/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/PrefixSuffix/PrefixSuffix.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/PrefixSuffix/PrefixSuffix.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/PrefixSuffix/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/Annotation/Annotation.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/RichText/Annotation/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/Caption.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/RichText/Equation/Equation.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/RichText/Equation/Equation.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/RichText/Equation/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.d.ts +0 -7
- package/dist/ui/esm/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.types.d.ts +0 -12
- package/dist/ui/esm/types/ui/components/RichText/LinkIfLinked/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/Mention/DateMention/DateMention.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/RichText/Mention/DateMention/DateMention.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/RichText/Mention/DateMention/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/RichText/Mention/LinkPreviewMention/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/Mention/Mention.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/RichText/Mention/Mention.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/RichText/Mention/PageOrDatabaseMention/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/RichText/Mention/TemplateMention/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/Mention/UserMention/UserMention.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/RichText/Mention/UserMention/UserMention.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/RichText/Mention/UserMention/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/Mention/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/RichText.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/RichText/RichText.types.d.ts +0 -11
- package/dist/ui/esm/types/ui/components/RichText/Text/Text.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/RichText/Text/Text.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/RichText/Text/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/RichText/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/Column.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Table/Column.types.d.ts +0 -7
- package/dist/ui/esm/types/ui/components/Table/Table.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Table/Table.types.d.ts +0 -24
- package/dist/ui/esm/types/ui/components/Table/TableCheckboxField/TableCheckboxField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableCheckboxField/TableCheckboxField.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableCheckboxField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/TableDateField/TableDateField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableDateField/TableDateField.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Table/TableDateField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/TableFormulaField/TableFormulaField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableFormulaField/TableFormulaField.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableFormulaField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/TableHandler.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Table/TableHandler.types.d.ts +0 -14
- package/dist/ui/esm/types/ui/components/Table/TableIcon/TableIcon.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Table/TableIcon/TableIcon.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Table/TableIcon/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/esm/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Table/TableMultiSelectField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/TableNumberField/TableNumberField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableNumberField/TableNumberField.types.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableNumberField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/TableRichTextField/TableRichTextField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableRichTextField/TableRichTextField.types.d.ts +0 -4
- package/dist/ui/esm/types/ui/components/Table/TableRichTextField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/esm/types/ui/components/Table/TableSelectField/TableSelectField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableSelectField/TableSelectField.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Table/TableSelectField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Table/TableTitleField/TableTitleField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableTitleField/TableTitleField.types.d.ts +0 -6
- package/dist/ui/esm/types/ui/components/Table/TableTitleField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/TableUrlField/TableUrlField.d.ts +0 -5
- package/dist/ui/esm/types/ui/components/Table/TableUrlField/TableUrlField.types.d.ts +0 -3
- package/dist/ui/esm/types/ui/components/Table/TableUrlField/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/Table/index.d.ts +0 -2
- package/dist/ui/esm/types/ui/components/index.d.ts +0 -61
- package/dist/ui/esm/types/ui/components/lib.d.ts +0 -21
- package/dist/ui/esm/types/ui/components/types.d.ts +0 -8
- package/dist/ui/esm/types/ui/index.d.ts +0 -1
- package/dist/ui/umd/types/exporter/api.d.ts +0 -19
- package/dist/ui/umd/types/exporter/blocks.d.ts +0 -13
- package/dist/ui/umd/types/exporter/breadcrumbs.d.ts +0 -7
- package/dist/ui/umd/types/exporter/database.d.ts +0 -12
- package/dist/ui/umd/types/exporter/files.d.ts +0 -27
- package/dist/ui/umd/types/exporter/github.d.ts +0 -241
- package/dist/ui/umd/types/exporter/index.d.ts +0 -5
- package/dist/ui/umd/types/exporter/page.d.ts +0 -15
- package/dist/ui/umd/types/exporter/types.d.ts +0 -748
- package/dist/ui/umd/types/exporter/variables.d.ts +0 -22
- package/dist/ui/umd/types/ui/components/Checkbox/Checkbox.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Checkbox/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/Gallery.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Gallery/Gallery.types.d.ts +0 -23
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryCard.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryCard.types.d.ts +0 -7
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryHandler.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryHandler.types.d.ts +0 -14
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.types.d.ts +0 -9
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCheckboxField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/GalleryDateField/GalleryDateField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryDateField/GalleryDateField.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Gallery/GalleryDateField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryFormulaField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.types.d.ts +0 -9
- package/dist/ui/umd/types/ui/components/Gallery/GalleryMultiSelectField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryNumberField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/GalleryPreview/GalleryPreview.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryPreview/GalleryPreview.types.d.ts +0 -14
- package/dist/ui/umd/types/ui/components/Gallery/GalleryPreview/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryRichTextField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/GallerySelectField/GallerySelectField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GallerySelectField/GallerySelectField.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Gallery/GallerySelectField/LinkedTag.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GallerySelectField/LinkedTag.types.d.ts +0 -9
- package/dist/ui/umd/types/ui/components/Gallery/GallerySelectField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Gallery/GalleryTitleField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.types.d.ts +0 -3
- package/dist/ui/umd/types/ui/components/Gallery/GalleryUrlField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Gallery/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Icon/Icon.d.ts +0 -10
- package/dist/ui/umd/types/ui/components/Icon/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/List/Column.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/List/Column.types.d.ts +0 -7
- package/dist/ui/umd/types/ui/components/List/List.d.ts +0 -9
- package/dist/ui/umd/types/ui/components/List/List.types.d.ts +0 -23
- package/dist/ui/umd/types/ui/components/List/ListCheckboxField/ListCheckboxField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListCheckboxField/ListCheckboxField.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListCheckboxField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/List/ListDateField/ListDateField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListDateField/ListDateField.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/List/ListDateField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/List/ListFormulaField/ListFormulaField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListFormulaField/ListFormulaField.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListFormulaField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/List/ListHandler.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/List/ListHandler.types.d.ts +0 -14
- package/dist/ui/umd/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/umd/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/List/ListMultiSelectField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/List/ListNumberField/ListNumberField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListNumberField/ListNumberField.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListNumberField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/List/ListRichTextField/ListRichTextField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListRichTextField/ListRichTextField.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/List/ListRichTextField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/List/ListSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/umd/types/ui/components/List/ListSelectField/ListSelectField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListSelectField/ListSelectField.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/List/ListSelectField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/List/ListTitleField/LinkedTitle.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListTitleField/LinkedTitle.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/List/ListTitleField/ListTitleField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListTitleField/ListTitleField.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/List/ListTitleField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/List/ListUrlField/ListUrlField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/List/ListUrlField/ListUrlField.types.d.ts +0 -3
- package/dist/ui/umd/types/ui/components/List/ListUrlField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/List/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/BookmarkBlock/BookmarkBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/BookmarkBlock/BookmarkBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/BookmarkBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +0 -9
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.types.d.ts +0 -9
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.types.d.ts +0 -11
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/index.d.ts +0 -3
- package/dist/ui/umd/types/ui/components/Page/BulletedListBlock/BulletedListBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/BulletedListBlock/BulletedListBlock.types.d.ts +0 -9
- package/dist/ui/umd/types/ui/components/Page/BulletedListBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/CalloutBlock/CalloutBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/CalloutBlock/CalloutBlock.types.d.ts +0 -9
- package/dist/ui/umd/types/ui/components/Page/CalloutBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.types.d.ts +0 -12
- package/dist/ui/umd/types/ui/components/Page/ChildDatabaseBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/ChildPageBlock/ChildPageBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/ChildPageBlock/ChildPageBlock.types.d.ts +0 -12
- package/dist/ui/umd/types/ui/components/Page/ChildPageBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/Code/Code.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/Code/Code.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/Code/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/CodeBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/CodeBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/ColumnListBlock/ColumnListBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/ColumnListBlock/ColumnListBlock.types.d.ts +0 -9
- package/dist/ui/umd/types/ui/components/Page/ColumnListBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/EmbedBlock/EmbedBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/EmbedBlock/EmbedBlock.types.d.ts +0 -13
- package/dist/ui/umd/types/ui/components/Page/EmbedBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/EquationBlock/EquationBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/EquationBlock/EquationBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/EquationBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/FileBlock/FileBlock.d.ts +0 -7
- package/dist/ui/umd/types/ui/components/Page/FileBlock/FileBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/FileBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/ImageBlock/ImageBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/ImageBlock/ImageBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/ImageBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.d.ts +0 -7
- package/dist/ui/umd/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/LinkPreviewBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/ListBlocks/ListBlocks.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/ListBlocks/ListBlocks.types.d.ts +0 -10
- package/dist/ui/umd/types/ui/components/Page/ListBlocks/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/NumberedListBlock/NumberedListBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/NumberedListBlock/NumberedListBlock.types.d.ts +0 -9
- package/dist/ui/umd/types/ui/components/Page/NumberedListBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/Page.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/Page.types.d.ts +0 -14
- package/dist/ui/umd/types/ui/components/Page/PageHandler.d.ts +0 -15
- package/dist/ui/umd/types/ui/components/Page/PageHandler.types.d.ts +0 -10
- package/dist/ui/umd/types/ui/components/Page/PdfBlock/Pdf.d.ts +0 -24
- package/dist/ui/umd/types/ui/components/Page/PdfBlock/PdfBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/PdfBlock/PdfBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/PdfBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/SyncedBlock/SyncedBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/SyncedBlock/SyncedBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/SyncedBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/TableBlock/TableBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/TableBlock/TableBlock.types.d.ts +0 -13
- package/dist/ui/umd/types/ui/components/Page/TableBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/TableOfContentsBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/TextBlock/TextBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/TextBlock/TextBlock.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Page/TextBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/ToDoBlock/ToDoBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/ToDoBlock/ToDoBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/ToDoBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/ToggleBlock/ToggleBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/ToggleBlock/ToggleBlock.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Page/ToggleBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/VideoBlock/VideoBlock.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Page/VideoBlock/VideoBlock.types.d.ts +0 -10
- package/dist/ui/umd/types/ui/components/Page/VideoBlock/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Page/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/PrefixSuffix/PrefixSuffix.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/PrefixSuffix/PrefixSuffix.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/PrefixSuffix/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/Annotation/Annotation.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/RichText/Annotation/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/Caption.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/RichText/Equation/Equation.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/RichText/Equation/Equation.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/RichText/Equation/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.d.ts +0 -7
- package/dist/ui/umd/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.types.d.ts +0 -12
- package/dist/ui/umd/types/ui/components/RichText/LinkIfLinked/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/Mention/DateMention/DateMention.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/RichText/Mention/DateMention/DateMention.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/RichText/Mention/DateMention/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/RichText/Mention/LinkPreviewMention/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/Mention/Mention.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/RichText/Mention/Mention.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/RichText/Mention/PageOrDatabaseMention/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/RichText/Mention/TemplateMention/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/Mention/UserMention/UserMention.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/RichText/Mention/UserMention/UserMention.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/RichText/Mention/UserMention/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/Mention/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/RichText.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/RichText/RichText.types.d.ts +0 -11
- package/dist/ui/umd/types/ui/components/RichText/Text/Text.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/RichText/Text/Text.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/RichText/Text/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/RichText/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/Column.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Table/Column.types.d.ts +0 -7
- package/dist/ui/umd/types/ui/components/Table/Table.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Table/Table.types.d.ts +0 -24
- package/dist/ui/umd/types/ui/components/Table/TableCheckboxField/TableCheckboxField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableCheckboxField/TableCheckboxField.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableCheckboxField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/TableDateField/TableDateField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableDateField/TableDateField.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Table/TableDateField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/TableFormulaField/TableFormulaField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableFormulaField/TableFormulaField.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableFormulaField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/TableHandler.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Table/TableHandler.types.d.ts +0 -14
- package/dist/ui/umd/types/ui/components/Table/TableIcon/TableIcon.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Table/TableIcon/TableIcon.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Table/TableIcon/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/umd/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Table/TableMultiSelectField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/TableNumberField/TableNumberField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableNumberField/TableNumberField.types.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableNumberField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/TableRichTextField/TableRichTextField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableRichTextField/TableRichTextField.types.d.ts +0 -4
- package/dist/ui/umd/types/ui/components/Table/TableRichTextField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.types.d.ts +0 -10
- package/dist/ui/umd/types/ui/components/Table/TableSelectField/TableSelectField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableSelectField/TableSelectField.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Table/TableSelectField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Table/TableTitleField/TableTitleField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableTitleField/TableTitleField.types.d.ts +0 -6
- package/dist/ui/umd/types/ui/components/Table/TableTitleField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/TableUrlField/TableUrlField.d.ts +0 -5
- package/dist/ui/umd/types/ui/components/Table/TableUrlField/TableUrlField.types.d.ts +0 -3
- package/dist/ui/umd/types/ui/components/Table/TableUrlField/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/Table/index.d.ts +0 -2
- package/dist/ui/umd/types/ui/components/index.d.ts +0 -61
- package/dist/ui/umd/types/ui/components/lib.d.ts +0 -21
- package/dist/ui/umd/types/ui/components/types.d.ts +0 -8
- package/dist/ui/umd/types/ui/index.d.ts +0 -1
package/dist/ui/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("mermaid"),r=require("prismjs"),a=require("pdfjs-dist"),n=function(t){var r=t.payload;if("user"!==r.mention.type)return e.createElement(e.Fragment,null);var a=r.mention.user;return"type"in a?e.createElement("span",{className:"rotion-richtext-user"},e.createElement("span",{className:"rotion-richtext-user-atsign"},"@"),a.name):e.createElement("span",{className:"rotion-richtext-user"},e.createElement("span",{className:"rotion-richtext-user-atsign"},"@"),r.plain_text.replace("@",""))},i=function(t){var r=t.name,a=t.width,n=t.height,i=t.className;switch(r){case"figma":return e.createElement("svg",{className:"rotion-icon-figma ".concat(i),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:a||"12px",height:n||"18px",viewBox:"0 0 200 300"},e.createElement("path",{d:"M50 300c27.6 0 50-22.4 50-50v-50H50c-27.6 0-50 22.4-50 50s22.4 50 50 50z",fill:"#0acf83"}),e.createElement("path",{d:"M0 150c0-27.6 22.4-50 50-50h50v100H50c-27.6 0-50-22.4-50-50z",fill:"#a259ff"}),e.createElement("path",{d:"M0 50C0 22.4 22.4 0 50 0h50v100H50C22.4 100 0 77.6 0 50z",fill:"#f24e1e"}),e.createElement("path",{d:"M100 0h50c27.6 0 50 22.4 50 50s-22.4 50-50 50h-50V0z",fill:"#ff7262"}),e.createElement("path",{d:"M200 150c0 27.6-22.4 50-50 50s-50-22.4-50-50 22.4-50 50-50 50 22.4 50 50z",fill:"#1abcfe"}));case"slack":return e.createElement("svg",{className:"rotion-icon-slack ".concat(i),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:a||"20px",height:n||"20px",viewBox:"0 0 140 140"},e.createElement("path",{d:"M27.2 80c0 7.3-5.9 13.2-13.2 13.2C6.7 93.2.8 87.3.8 80c0-7.3 5.9-13.2 13.2-13.2h13.2V80zm6.6 0c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2v33c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V80z",fill:"#E01E5A"}),e.createElement("path",{d:"M47 27c-7.3 0-13.2-5.9-13.2-13.2C33.8 6.5 39.7.6 47 .6c7.3 0 13.2 5.9 13.2 13.2V27H47zm0 6.7c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H13.9C6.6 60.1.7 54.2.7 46.9c0-7.3 5.9-13.2 13.2-13.2H47z",fill:"#36C5F0"}),e.createElement("path",{d:"M99.9 46.9c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H99.9V46.9zm-6.6 0c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V13.8C66.9 6.5 72.8.6 80.1.6c7.3 0 13.2 5.9 13.2 13.2v33.1z",fill:"#2EB67D"}),e.createElement("path",{d:"M80.1 99.8c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V99.8h13.2zm0-6.6c-7.3 0-13.2-5.9-13.2-13.2 0-7.3 5.9-13.2 13.2-13.2h33.1c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H80.1z",fill:"#ECB22E"}));case"github":return e.createElement("svg",{className:"rotion-icon-github ".concat(i),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:a||"20px",height:n||"20px",viewBox:"0 0 200 200",preserveAspectRatio:"xMidYMid meet"},e.createElement("g",{transform:"translate(0.000000,200.000000) scale(0.100000,-0.100000)",stroke:"none"},e.createElement("path",{d:"M899 1910 c-314 -38 -586 -232 -720 -515 -63 -133 -80 -205 -86 -356 -6 -144 10 -245 57 -367 88 -226 287 -429 503 -512 110 -43 117 -38 117 88 l0 97 -98 0 c-89 0 -102 2 -138 26 -27 18 -49 46 -72 90 -37 74 -54 96 -99 127 -39 28 -42 49 -9 58 43 10 110 -28 155 -90 46 -61 71 -82 122 -96 45 -13 138 5 145 28 3 10 15 38 28 63 l22 46 -76 17 c-220 47 -330 188 -330 425 0 81 19 150 59 213 29 45 30 51 21 100 -10 52 -7 95 12 157 10 33 11 33 56 28 25 -3 82 -24 128 -47 l82 -42 59 13 c79 16 232 17 324 0 76 -13 76 -13 116 13 50 34 148 68 182 64 20 -2 28 -11 37 -43 15 -49 17 -135 4 -169 -8 -21 -4 -34 25 -76 45 -67 57 -116 57 -225 -2 -235 -118 -376 -344 -416 -64 -12 -67 -13 -52 -30 34 -38 43 -91 44 -256 0 -133 3 -164 16 -177 21 -22 25 -21 115 18 147 64 292 181 385 311 50 70 109 196 136 290 19 68 23 104 23 235 0 188 -13 248 -90 405 -92 185 -230 325 -411 415 -144 72 -349 108 -505 90z"})));case"file":return e.createElement("svg",{className:"rotion-icon-file ".concat(i),width:a||"20px",height:n||"20px",viewBox:"0 0 16 16"},e.createElement("path",{d:"M4.35645 15.4678H11.6367C13.0996 15.4678 13.8584 14.6953 13.8584 13.2256V7.02539C13.8584 6.0752 13.7354 5.6377 13.1406 5.03613L9.55176 1.38574C8.97754 0.804688 8.50586 0.667969 7.65137 0.667969H4.35645C2.89355 0.667969 2.13477 1.44043 2.13477 2.91016V13.2256C2.13477 14.7021 2.89355 15.4678 4.35645 15.4678ZM4.46582 14.1279C3.80273 14.1279 3.47461 13.7793 3.47461 13.1436V2.99219C3.47461 2.36328 3.80273 2.00781 4.46582 2.00781H7.37793V5.75391C7.37793 6.73145 7.86328 7.20312 8.83398 7.20312H12.5186V13.1436C12.5186 13.7793 12.1836 14.1279 11.5205 14.1279H4.46582ZM8.95703 6.02734C8.67676 6.02734 8.56055 5.9043 8.56055 5.62402V2.19238L12.334 6.02734H8.95703ZM8.59473 12.7266V10.6279L8.54004 9.56152L9.06641 10.1152L9.59277 10.6484C9.68848 10.7646 9.8457 10.833 9.98926 10.833C10.2969 10.833 10.5293 10.6143 10.5293 10.3066C10.5293 10.1357 10.4678 10.0127 10.3379 9.90332L8.45117 8.16699C8.29395 8.02344 8.16406 7.96191 7.99316 7.96191C7.8291 7.96191 7.69922 8.02344 7.54199 8.16699L5.65527 9.90332C5.52539 10.0127 5.46387 10.1357 5.46387 10.3066C5.46387 10.6143 5.68945 10.833 6.00391 10.833C6.14746 10.833 6.29785 10.7646 6.40039 10.6484L6.92676 10.1152L7.45312 9.56152L7.39844 10.6279V12.7266C7.39844 13.0547 7.67188 13.3008 7.99316 13.3008C8.32129 13.3008 8.59473 13.0547 8.59473 12.7266Z"}));case"link":return e.createElement("svg",{className:"rotion-icon-link ".concat(i),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"13px",height:"13px",viewBox:"0 0 13 13",role:"graphics-symbol"},e.createElement("path",{d:"M6.30826 4.43292L1.76184 8.98454C1.76176 8.98462 1.76169 8.9847 1.76161 8.98477C1.76158 8.9848 1.76156 8.98482 1.76154 8.98484C1.46068 9.28584 1.25 9.6914 1.25 10.1565C1.25 10.6117 1.45865 11.0119 1.73417 11.2886C2.01014 11.5658 2.41107 11.7773 2.87078 11.7773C3.34169 11.7773 3.73758 11.5617 4.03477 11.2733L4.03482 11.2734L4.04244 11.2657L8.58864 6.72474V8.667C8.58864 9.51956 9.22729 10.2935 10.1521 10.2935C11.0528 10.2935 11.75 9.54534 11.75 8.66127V2.92671C11.75 2.48722 11.5981 2.06381 11.2838 1.74808C10.9689 1.43182 10.5446 1.27728 10.1006 1.27728H4.36028C3.46161 1.27728 2.72804 1.97749 2.72804 2.86942C2.72804 3.79734 3.51104 4.43292 4.35455 4.43292H6.30826Z",fill:"#3E3C38",stroke:"white",strokeWidth:"1.5"}));case"circledot":return e.createElement("svg",{className:"rotion-icon-circledot ".concat(i),xmlns:"http://www.w3.org/2000/svg",width:a||"15px",height:n||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"}));case"circlecheck":return e.createElement("svg",{className:"rotion-icon-circlecheck ".concat(i),xmlns:"http://www.w3.org/2000/svg",width:a||"15px",height:n||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369 209z"}));case"codemerge":return e.createElement("svg",{className:"rotion-icon-codemerge ".concat(i),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:a||"15px",height:n||"15px",viewBox:"0 0 448 512"},e.createElement("path",{d:"M80 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm32.4 97.2c28-12.4 47.6-40.5 47.6-73.2c0-44.2-35.8-80-80-80S0 35.8 0 80c0 32.8 19.7 61 48 73.3V358.7C19.7 371 0 399.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-32.8-19.7-61-48-73.3V272c26.7 20.1 60 32 96 32h86.7c12.3 28.3 40.5 48 73.3 48c44.2 0 80-35.8 80-80s-35.8-80-80-80c-32.8 0-61 19.7-73.3 48H208c-49.9 0-91-38.1-95.6-86.8zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM344 272a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"}));case"downloadfile":return e.createElement("svg",{className:"rotion-icon-downloadfile ".concat(i),xmlns:"http://www.w3.org/2000/svg",width:a||"15px",height:n||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3H304V160c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32v96H150.3C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z"}))}},o=function(t){var r=t.mention;return e.createElement("span",{className:"rotion-richtext-pageordb"},e.createElement("span",{className:"rotion-richtext-pageordb-icon"},"emoji"===r.icon.type&&r.icon.emoji,"emoji"!==r.icon.type&&e.createElement("img",{src:r.icon.src,className:"rotion-richtext-pageordb-img",alt:"icon"}),e.createElement(i,{name:"link",className:"rotion-richtext-pageordb-arrow"})),e.createElement("span",{className:"rotion-richtext-pageordb-title"},r.name))};function l(e){if(void 0===e)return"";var t=Object.entries(e).map((function(e){return"".concat(e[0],"=").concat(encodeURIComponent("".concat(e[1])))})).join("&");return"?".concat(t)}var s=function(e){var t=e.split("[");return""===e?["/",""]:t.length<2?[e,""]:[t[0],t[1].split("]")[0]]};function c(e,t){if(!("properties"in t))return"not-found-properties";if("id"===e)return t.id;if(!(e in t.properties))return"not-found-key-in-page-properties";var r=t.properties[e];return"rich_text"in r?r.rich_text.map((function(e){return e.text.content})).join(","):"not-found-richtext-in-key"}function m(e){var t=e.replace(/\/$/,""),r=t.substring(t.lastIndexOf("/")+1);return r.lastIndexOf("?")>0?r.substring(0,r.lastIndexOf("?")):r}function h(e){var t="MMMM D, YYYY",r="h:mm A";return e?(e.includes("ja")&&(t="YYYY年M月D日",r="H:mm"),{dateF:t,timeF:r}):{dateF:t,timeF:r}}function u(e){var t=e.replace(/https?:\/\//,"").split("/"),r="".concat(t.shift()),a=t.join("/");return{domain:r,omittedPath:"/".concat(a.length>12?"".concat(a.substring(0,3),"...").concat(a.substring(a.length-6)):a)}}var p=function(t){var r=t.url,a=t.text;return r.includes("slack.com")?e.createElement("a",{className:"rotion-richtext-linkpreview",href:r,rel:"noreferrer",target:"_blank"},e.createElement(i,{name:"slack",className:"rotion-richtext-linkpreview-icon",width:"17px",height:"17px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},"Message in Slack")):r.includes("figma.com")?e.createElement("a",{className:"rotion-richtext-linkpreview",href:r,rel:"noreferrer",target:"_blank"},e.createElement(i,{name:"figma",className:"rotion-richtext-linkpreview-icon",width:"10px",height:"16px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},m(a).replace(/-/g," "))):e.createElement("a",{className:"rotion-richtext-linkpreview",href:r,rel:"noreferrer",target:"_blank"},r.includes("github.com")&&e.createElement(i,{name:"github",className:"rotion-richtext-linkpreview-icon",width:"17px",height:"17px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},m(a)))};const d=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],v=["January","February","March","April","May","June","July","August","September","October","November","December"],b={"%a":e=>d[e.getDay()],"%A":e=>f[e.getDay()],"%b":e=>g[e.getMonth()],"%B":e=>v[e.getMonth()],"%p":e=>e.getHours()<12?"AM":"PM","%r":"%-I:%M:%S %p","%x":"%-m/%-d/%y","%X":"%-I:%M:%S %p"},y={year:"y",month:"M",week:"w",date:"D",day:"d",hour:"h",minute:"m",second:"s",millisecond:"ms"};Object.keys(y).forEach((e=>{const t=e+"s",r=y[e];r&&(y[t]=y[r]=r)}));const x=e=>y[e||"ms"]||y[String(e).toLowerCase()],w={h:36e5,m:6e4,s:1e3,ms:1},k={y:e=>e.getFullYear(),M:e=>e.getMonth(),D:e=>e.getDate(),d:e=>e.getDay(),h:e=>e.getHours(),m:e=>e.getMinutes(),s:e=>e.getSeconds(),ms:e=>e.getMilliseconds(),TZO:e=>e.getTimezoneOffset(),T:e=>e.getTime()},E=k.d,M=["Su","Mo","Tu","We","Th","Fr","Sa"],S=["th","st","nd","rd"],C={YY:"%y",YYYY:"%Y",M:"%-m",MM:"%m",MMM:"%b",MMMM:"%B",D:"%-d",Do:e=>{return(t=e.getDate())+(S[t]||t>20&&S[t%10]||S[0]);var t},DD:"%d",d:"%w",dd:e=>M[E(e)],ddd:"%a",dddd:"%A",H:"%-H",HH:"%H",h:"%-I",hh:"%I",m:"%-M",mm:"%M",s:"%-S",ss:"%S",SSS:"%L",Z:"%:z",ZZ:"%z",A:"%p",a:"%P",X:"%s",x:k.T},N=e=>{let t={};return r=>t[r]||(t[r]=e(r))},z=(()=>{const e="2-digit",t="medium",r="numeric",a="short",n="long",i={a:{weekday:a},A:{weekday:n},b:{month:a},B:{month:n},c:{weekday:a,year:r,month:a,day:r,hour:e,minute:e,second:e},p:{hour:r,hour12:!0},r:{timeStyle:t,hour12:!0},x:{dateStyle:a},X:{timeStyle:t}};return Object.keys(i).forEach((e=>i[e].timeZone="UTC")),i})(),T=N((e=>{const t=(t,r,a)=>{let n;const i=r=>{const i=r.getTimezoneOffset(),o=new Date(+r-6e4*i);if(n||(n=new Intl.DateTimeFormat(e,t)),a){const e=n.formatToParts(o).find((e=>e.type===a));return e&&e.value}const l=n.format(o);if(l)return l.replace(/\s+UTC$/,"")};if(!r)return i;const o={};return e=>{const t=r(e);return o[t]||(o[t]=i(e))}},r=e=>e.getDay(),a=e=>e.getMonth();return{"%a":t(z.a,r),"%A":t(z.A,r),"%b":t(z.b,a),"%B":t(z.B,a),"%c":t(z.c),"%p":t(z.p,(e=>e.getHours()),"dayPeriod"),"%r":t(z.r),"%x":t(z.x),"%X":t(z.X)}})),A=/%(?:[EO]\w|[0_#^-]?[1-9]?\w|::?z|[%+])/g,B=(()=>{let e=["\\[(.*?)\\]","[A-Za-z]o"];const t=e=>String.fromCharCode(e+65)+"+";for(let r=0;r<26;r++)e.push(t(r),t(r+32));return new RegExp(e.join("|"),"g")})(),q={ISO:"%Y-%m-%dT%H:%M:%S.%L%:z",undef:"YYYY-MM-DDTHH:mm:ssZ",NaN:new Date(NaN)+""},L=e=>{const t=(t,r)=>{let n=e(t);if("string"==typeof n){const t=e(n);null!=t&&(n=t)}return"function"==typeof n?n(r):null==n?t:a(n,r)},r={},a=(e,r)=>e.replace(A,(e=>t(e,r)));return r.strftime=(e,r)=>isNaN(+r)?t("NaN",r):null==e?t("ISO",r):a(e,r),r.format=(r,a)=>isNaN(+a)?t("NaN",a):(null==r&&(r=String(e("undef"))),r.replace(B,((e,r)=>r||t(e,a)))),r.handler=t=>{return L((a=e,(r=(n=t)&&(e=>n[e]))&&a?e=>r(e)||a(e):r||a));var r,a,n},r},O=L().handler(q).handler(b).handler(C).handler((()=>{const e=e=>t=>("0"+e(t)).substr(-2),t=e=>t=>(" "+e(t)).substr(-2),r=e=>t=>("00"+e(t)).substr(-3),a=k.y,n=k.M,i=k.D,o=k.d,l=k.h,s=k.m,c=k.s,m=k.ms,h=k.T,u=k.TZO,p=e=>Math.floor(a(e)/100),d=e=>(l(e)+11)%12+1,f=e=>n(e)+1,g=e=>a(e)%100,v=e=>e<10?"0"+e:e,b=(e,t)=>r=>{let a=-u(r);const n=a<0;n&&(a=-a);const i=Math.floor(a/60),o=Math.floor(a%60),l=t?e+v(Math.floor(a%1*60)):"";return(n?"-":"+")+v(i)+e+v(o)+l},y={"%c":"%a %b %e %T %Y","%-C":p,"%C":e(p),"%-d":i,"%d":e(i),"%D":"%m/%d/%y","%e":t(i),"%F":"%Y-%m-%d","%-H":l,"%H":e(l),"%-I":d,"%I":e(d),"%k":t(l),"%l":t(d),"%-L":r(m),"%L":r(m),"%-m":f,"%m":e(f),"%-M":s,"%M":e(s),"%P":e=>l(e)<12?"am":"pm","%R":"%H:%M","%s":e=>Math.floor(h(e)/1e3),"%-S":c,"%S":e(c),"%T":"%H:%M:%S","%-y":g,"%y":e(g),"%-Y":a,"%Y":(x=a,e=>{let t=x(e);if(0<=t&&t<=9999)return("000"+t).substr(-4);let r="+";return t<0&&(r="-",t=-t),r+("00000"+t).substr(-6)}),"%u":e=>(o(e)+6)%7+1,"%v":"%e-%b-%Y","%w":o,"%::z":b(":",!0),"%:z":b(":"),"%z":b(""),"%%":()=>"%","%n":()=>"\n","%t":()=>"\t"};var x;const w=(e,t)=>{t.split("").forEach((t=>y[e+t]=y["%"+t]))};return w("%E","cCxXyY"),w("%O","deHImMSuUVwWy"),y})());O.strftime;const H=e=>e&&e.tx||O,I=(e,t)=>{const r=e.getFullYear(),a=e.getMonth(),n=e.getDate(),i=new Date(r,a,1),o=+i,l=12*r+a+t;i.setFullYear(Math.floor(l/12));const s=l%12;i.setMonth(s);const c=Math.round((+i-o)/864e5);R(e,c);const m=e.getDate();s!==e.getMonth()&&n>m&&R(e,-m)},R=(e,t)=>{const r=e.getTimezoneOffset();e.setTime(+e+864e5*t);const a=e.getTimezoneOffset();r!==a&&e.setTime(+e+6e4*(a-r))},F=(e,t,r)=>{if(!t)return;const a=x(r),n=w[a];if(n)e.setTime(+e+t*n);else switch(a){case"y":return I(e,12*t);case"M":return I(e,t);case"w":return R(e,7*t);case"D":case"d":return R(e,t)}},D=e=>{j(e),F(e,1-e.getDate(),"day")},j=e=>{const t=e.getTimezoneOffset();V(e,864e5);const r=e.getTimezoneOffset();t!==r&&e.setTime(+e+6e4*(r-t))},V=(e,t)=>{const r=6e4*e.getTimezoneOffset();e.setTime(Math.floor((+e-r)/t)*t+r)},P=(e,t)=>{const r=x(t),a=w[r];if(a)return V(e,a);switch(r){case"y":return D(e),F(e,-e.getMonth(),"M");case"M":return D(e);case"w":return j(e),F(e,-e.getDay(),"d");case"D":case"d":return j(e)}},_={su:0,mo:1,tu:2,we:3,th:4,fr:5,sa:6},U=(e,t)=>{const r=e.formatToParts(t),a={};r.forEach((e=>a[e.type]=e.value));const n=_[(i=a.weekday,String(i).toLowerCase().substr(0,2))];var i;let o=(7+t.getUTCDay()-n)%7;o>3&&(o-=7);return-(60*(24*o+(t.getUTCHours()-a.hour%24))+(t.getUTCMinutes()-a.minute)+(t.getUTCSeconds()-a.second)/60)},G=N((e=>{let t,r={},a=0;return n=>{const i=Math.floor(n/9e5);let o=r&&r[i];if(null!=o)return o;a++>96&&(r={},a=0);const l=new Date(n);if(!t){const r="numeric";t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,weekday:"short",hour:r,minute:r,second:r})}return o=U(t,l),null==o&&(o=-l.getTimezoneOffset()),r[i]=o,o}}));class Y{constructor(e){this.dt=new Date(e)}valueOf(){return+this.dt}setTime(e){return this.dt.setTime(e)}getTimezoneOffset(){return 0}getMilliseconds(){return this.dt.getUTCMilliseconds()}getSeconds(){return this.dt.getUTCSeconds()}getMinutes(){return this.dt.getUTCMinutes()}getHours(){return this.dt.getUTCHours()}getDay(){return this.dt.getUTCDay()}getDate(){return this.dt.getUTCDate()}getMonth(){return this.dt.getUTCMonth()}getFullYear(){return this.dt.getUTCFullYear()}getTime(){return+this}}class Z extends Y{constructor(e,t){const r=t(e);super(e+6e4*r),this.t=e,this.tzf=t,this.tzo=r}valueOf(){return this.t}setTime(e){const t=this.tzo=this.tzf(e);return this.dt.setTime(+e+6e4*t),this.t=e}getTimezoneOffset(){return-this.tzo}}const X=(e,t,r)=>{const a=e.ro(),n=t.rw();return W(a,n,r),t.create(n)},W=(e,t,r)=>{const a=$(e),n=$(t);if(a===n)return;if(F(t,n-a,"m"),!r)return;const i=$(t);n!==i&&F(t,i-n,"m")},$=k.TZO,J=N((e=>{if("number"==typeof e)-16<e&&e<16&&(e*=60);else{const t=String(e).match(/(?:^|GMT)?(?:([+-])([01]?\d):?(\d[05])|$)|(UTC|Z)$/);if(!t)return;e=60*+t[2]+ +t[3]|0,"-"===t[1]&&(e=0-e)}return t=>e}));const K=e=>t=>(null==t?t=new Date:"string"==typeof t&&(t=+Q(t,e.x.rw)),e.create(+t)),Q=(e,t)=>{const r=e.match(/^(\d{4}|[-+]\d{4,6})(?:(-)(\d{2})(?:-(\d{2})(?:T((\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?))?)?)?$/)||e.match(/^(\d{4}|[-+]\d{4,6})(?:([-/])(\d+)(?:\2(\d+)(?:\s+((\d+):(\d+)(?::(\d+)(\.\d+)?)?))?)?)?$/);if(!r)return new Date(e);const a=+r[1]||0,n=+r[3]-1||0,i=+r[4]||1,o=+r[6]||0,l=+r[7]||0,s=+r[8]||0,c=1e3*+r[9]||0,m=0<=a&&a<100?100:0;if(t){const e=new Date(Date.UTC(a+m,n,i,o,l,s,c));m&&e.setUTCFullYear(a);const r=new Y(+e),h=t(+e);return W(r,h,!0),h}{const e=new Date(a+m,n,i,o,l,s,c);return m&&e.setFullYear(a),e}},ee=new class{constructor(e,t){this.t=e,"number"!=typeof e&&(this.d=e),this.x=t||Object.create({cdate:{}})}cdateFn(){return K(this)}rw(){const e=+this.t,t=this.x.rw;return t?t(e):new Date(e)}ro(){return this.d||(this.d=this.rw())}valueOf(){return+this.ro()}toDate(){return new Date(+this)}toJSON(){return this.toDate().toJSON()}plugin(e){const t=this.constructor;return new(e(t)||t)(this.t,this.x)}create(e){return new this.constructor(e,this.x)}inherit(){const e=this.create(+this);return e.x=Object.create(e.x),e}}(0,null).plugin((e=>class extends e{handler(e){const t=this.inherit(),{x:r}=t;return r.tx=H(r).handler(e),t}format(e){return H(this.x).format(e,this.ro())}text(e){return H(this.x).strftime(e,this.ro())}locale(e){return this.handler(T(e))}})).plugin((e=>class extends e{get(e){const t=k[x(e)];if(t)return t(this.ro())}set(e,t){e=x(e);const r=k[e];if(!r)return this;const a=this.rw();return F(a,t-r(a),e),this.create(a)}startOf(e){if(!(e=x(e)))return this;const t=this.rw();return P(t,e),this.create(t)}endOf(e){if(!(e=x(e)))return this;const t=this.rw();return P(t,e),F(t,1,e),F(t,-1),this.create(t)}add(e,t){if(!(t=x(t)))return this;const r=this.rw();return F(r,e,t),this.create(r)}next(e){return this.add(1,e)}prev(e){return this.add(-1,e)}})).plugin((e=>class extends e{utc(e){const t=this.inherit();return t.x.rw=e=>new Y(+e),e?X(this,t):t}utcOffset(e,t){if(null==e)return 0-$(this.ro());const r=this.inherit();return r.x.rw=t=>new Z(+t,J(e)),t?X(this,r):r}tz(e,t){const r=this.inherit();return r.x.rw=t=>new Z(+t,G(e)),t?X(this,r,!0):r}})).cdateFn(),te={labels:{yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",next:"Next",last:"Last",week:"dddd",others:"MMMM D, YYYY",past:"%s ago",future:"in %s",seconds:"seconds",minutes:"minutes",hours:"hours",days:"days",months:"months",years:"years"}};const re={R:e=>function(e,t=te){const r="X",a=e.toString(),{specificNow:n,labels:i}={specificNow:t.specificNow,labels:{...te.labels,...t.labels}},o=n||new Date(Date.now()),l=ee(o),s=l.format(i.others),c=l.add(-1,"day").format(i.others),m=l.add(1,"day").format(i.others),h=-o.getTimezoneOffset(),u=ee(a).utcOffset(h),p=u.format(r);switch(u.format(i.others)){case s:return i.today;case c:return i.yesterday;case m:return i.tomorrow}const d=u.format(i.week),f=u.format(i.others),g=l.add(-1,"week").startOf("week"),v=l.add(-1,"week").endOf("week"),b=g.format(r),y=v.format(r);if(b<=p&&p<=y)return`${i.last} ${d}`;const x=l.startOf("week"),w=l.endOf("week"),k=x.format(r),E=w.format(r);if(k<=p&&p<=E)return d;const M=l.add(1,"week").startOf("week"),S=l.add(1,"week").endOf("week"),C=M.format(r),N=S.format(r);return C<=p&&p<=N?`${i.next} ${d}`:f}(e,{labels:ae}),F:e=>function(e,t=te){const r=e.toString(),{specificNow:a,labels:n}={specificNow:t.specificNow,labels:{...te.labels,...t.labels}},i=3600,o=86400,l=2592e3,s=31536e3,c=a||new Date(Date.now()),m=+ee(c).format("X"),h=+ee(r).format("X"),u=m<h?h-m:m-h;let p="";switch(!0){case u<60:p=`${u} ${n.seconds}`;break;case u<i:p=`${Math.floor(u/60)} ${n.minutes}`;break;case u<o:p=`${Math.floor(u/i)} ${n.hours}`;break;case u<l:p=`${Math.floor(u/o)} ${n.days}`;break;case u<s:p=`${Math.floor(u/l)} ${n.months}`;break;default:p=`${Math.floor(u/s)} ${n.years}`}return(m<h?n.future:n.past).replace("%s",p)}(e,{labels:ae})};var ae,ne=function(t){var r=t.dateOrDateTime,a=t.prefix;if(!r)return e.createElement(e.Fragment,null);var n=ee().handler(re).cdateFn();return e.createElement("span",null,a,e.createElement("span",{title:n(r).format()},n(r).format(r.length>10?"R HH:mm A":"R")))},ie=function(t){var r=t.date,a=r.start,n=r.end,i=r.time_zone;return e.createElement("span",{className:"rotion-richtext-date"},e.createElement("span",{className:"rotion-richtext-atsign"},"@"),e.createElement(ne,{dateOrDateTime:a}),null!==n&&e.createElement(ne,{dateOrDateTime:n,prefix:" → "}),null!==i&&"(".concat(i,")"))},oe=function(t){var r=t.text,a=t.children;return e.createElement("span",{className:"rotion-mention-template"},r,a)},le=function(t){var r=t.textObject,a=t.children;if(!r)return e.createElement(e.Fragment,null);switch(r.mention.type){case"user":return e.createElement(n,{payload:r});case"date":return e.createElement(ie,{date:r.mention.date});case"link_preview":return e.createElement(p,{url:r.mention.link_preview.url,text:r.plain_text});case"page":return e.createElement(o,{mention:r.mention.page});case"database":return e.createElement(o,{mention:r.mention.database});case"template_mention":return e.createElement(oe,{text:r.plain_text},a);default:return console.log("unsupport mention: ".concat(r.mention)),e.createElement(e.Fragment,null)}},se=function(t){var r=t.condition,a=t.textObject,n=t.children;return r?function(t){var r=t.textObject,a=t.children;return e.createElement("a",{className:"rotion-richtext-link",href:r.href,rel:"noreferrer",target:"_blank"},a)}({textObject:a,children:n}):function(t){var r=t.children;return e.createElement(e.Fragment,null,r)}({children:n})},ce=function(t){var r=t.textObject,a=t.children;if(!r)return e.createElement(e.Fragment,null);var n=r.annotations,i=n.color,o=["rotion-richtext-annot"];if(o.push(n.code&&"default"===i?"":"rotion-richtext-".concat(i.replace("_background","-bg"))),n.bold&&o.push("rotion-richtext-bold"),n.italic&&o.push("rotion-richtext-italic"),n.strikethrough&&o.push("rotion-richtext-strikethrough"),n.underline&&o.push("rotion-richtext-underline"),n.code&&o.push("rotion-richtext-code ".concat("default"===i||i.includes("background")?"rotion-richtext-code-color":"")),!n.code&&i.includes("background")&&o.push("rotion-richtext-nocode-bg"),a)return e.createElement("span",{className:o.join(" ")},a);var l=r.plain_text.replace(/\n/g,"<br />");return e.createElement("span",{className:o.join(" "),dangerouslySetInnerHTML:{__html:l}})},me=function(t){var r=t.textObject,a=r.href;return e.createElement(se,{condition:null!==a,textObject:r},e.createElement(ce,{textObject:r}))};class he{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new he(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class ue{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new ue(t,he.range(this,e))}}class pe{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,a,n="KaTeX parse error: "+e,i=t&&t.loc;if(i&&i.start<=i.end){var o=i.lexer.input;r=i.start,a=i.end,r===o.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=o.slice(r,a).replace(/[^]/g,"$&̲");n+=(r>15?"…"+o.slice(r-15,r):o.slice(0,r))+l+(a+15<o.length?o.slice(a,a+15)+"…":o.slice(a))}var s=new Error(n);return s.name="ParseError",s.__proto__=pe.prototype,s.position=r,null!=r&&null!=a&&(s.length=a-r),s.rawMessage=e,s}}pe.prototype.__proto__=Error.prototype;var de=/([A-Z])/g,fe={"&":"&",">":">","<":"<",'"':""","'":"'"},ge=/[&><"']/g;var ve=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},be={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(ge,(e=>fe[e]))},hyphenate:function(e){return e.replace(de,"-$1").toLowerCase()},getBaseElem:ve,isCharacterBox:function(e){var t=ve(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},ye={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function xe(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class we{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},ye)if(ye.hasOwnProperty(t)){var r=ye[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:xe(r)}}reportNonstrict(e,t,r){var a=this.strict;if("function"==typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new pe("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var a=this.strict;if("function"==typeof a)try{a=a(e,t,r)}catch(e){a="error"}return!(!a||"ignore"===a)&&(!0===a||"error"===a||("warn"===a?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=be.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class ke{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return Ee[Me[this.id]]}sub(){return Ee[Se[this.id]]}fracNum(){return Ee[Ce[this.id]]}fracDen(){return Ee[Ne[this.id]]}cramp(){return Ee[ze[this.id]]}text(){return Ee[Te[this.id]]}isTight(){return this.size>=2}}var Ee=[new ke(0,0,!1),new ke(1,0,!0),new ke(2,1,!1),new ke(3,1,!0),new ke(4,2,!1),new ke(5,2,!0),new ke(6,3,!1),new ke(7,3,!0)],Me=[4,5,4,5,6,7,6,7],Se=[5,5,5,5,7,7,7,7],Ce=[2,3,4,5,6,7,6,7],Ne=[3,3,5,5,7,7,7,7],ze=[1,1,3,3,5,5,7,7],Te=[0,1,2,3,2,3,2,3],Ae={DISPLAY:Ee[0],TEXT:Ee[2],SCRIPT:Ee[4],SCRIPTSCRIPT:Ee[6]},Be=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var qe=[];function Le(e){for(var t=0;t<qe.length;t+=2)if(e>=qe[t]&&e<=qe[t+1])return!0;return!1}Be.forEach((e=>e.blocks.forEach((e=>qe.push(...e)))));var Oe=80,He={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class Ie{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return be.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var Re={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Fe={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},De={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function je(e,t,r){if(!Re[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),n=Re[t][a];if(!n&&e[0]in De&&(a=De[e[0]].charCodeAt(0),n=Re[t][a]),n||"text"!==r||Le(a)&&(n=Re[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var Ve={};var Pe=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],_e=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ue=function(e,t){return t.size<2?e:Pe[e-1][t.size-1]};class Ge{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||Ge.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=_e[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new Ge(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ue(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:_e[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ue(Ge.BASESIZE,e);return this.size===t&&this.textSize===Ge.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Ge.BASESIZE?["sizing","reset-size"+this.size,"size"+Ge.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!Ve[t=e>=5?0:e>=3?1:2]){var r=Ve[t]={cssEmPerMu:Fe.quad[t]/18};for(var a in Fe)Fe.hasOwnProperty(a)&&(r[a]=Fe[a][t])}return Ve[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Ge.BASESIZE=6;var Ye={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Ze={ex:!0,em:!0,mu:!0},Xe=function(e){return"string"!=typeof e&&(e=e.unit),e in Ye||e in Ze||"ex"===e},We=function(e,t){var r;if(e.unit in Ye)r=Ye[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new pe("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},$e=function(e){return+e.toFixed(4)+"em"},Je=function(e){return e.filter((e=>e)).join(" ")},Ke=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var a=t.getColor();a&&(this.style.color=a)}},Qe=function(e){var t=document.createElement(e);for(var r in t.className=Je(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t},et=/[\s"'>/=\x00-\x1f]/,tt=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+be.escape(Je(this.classes))+'"');var r="";for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=be.hyphenate(a)+":"+this.style[a]+";");for(var n in r&&(t+=' style="'+be.escape(r)+'"'),this.attributes)if(this.attributes.hasOwnProperty(n)){if(et.test(n))throw new pe("Invalid attribute name '"+n+"'");t+=" "+n+'="'+be.escape(this.attributes[n])+'"'}t+=">";for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+="</"+e+">"};class rt{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Ke.call(this,e,r,a),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return be.contains(this.classes,e)}toNode(){return Qe.call(this,"span")}toMarkup(){return tt.call(this,"span")}}class at{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Ke.call(this,t,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return be.contains(this.classes,e)}toNode(){return Qe.call(this,"a")}toMarkup(){return tt.call(this,"a")}}class nt{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return be.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+be.escape(this.src)+'" alt="'+be.escape(this.alt)+'"',t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=be.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+be.escape(t)+'"'),e+="'/>"}}var it={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class ot{constructor(e,t,r,a,n,i,o,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=a||0,this.skew=n||0,this.width=i||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var s=function(e){for(var t=0;t<Be.length;t++)for(var r=Be[t],a=0;a<r.blocks.length;a++){var n=r.blocks[a];if(e>=n[0]&&e<=n[1])return r.name}return null}(this.text.charCodeAt(0));s&&this.classes.push(s+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=it[this.text])}hasClass(e){return be.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=$e(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=Je(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=be.escape(Je(this.classes)),t+='"');var r="";for(var a in this.italic>0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(a)&&(r+=be.hyphenate(a)+":"+this.style[a]+";");r&&(e=!0,t+=' style="'+be.escape(r)+'"');var n=be.escape(this.text);return e?(t+=">",t+=n,t+="</span>"):n}}class lt{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+be.escape(this.attributes[t])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>"}}class st{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",He[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+be.escape(this.alternate)+'"/>':'<path d="'+be.escape(He[this.pathName])+'"/>'}}class ct{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+be.escape(this.attributes[t])+'"');return e+="/>"}}function mt(e){if(e instanceof ot)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var ht={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ut={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},pt={math:{},text:{}};function dt(e,t,r,a,n,i){pt[e][n]={font:t,group:r,replace:a},i&&a&&(pt[e][a]=pt[e][n])}var ft="math",gt="text",vt="main",bt="ams",yt="accent-token",xt="bin",wt="close",kt="inner",Et="mathord",Mt="op-token",St="open",Ct="punct",Nt="rel",zt="spacing",Tt="textord";dt(ft,vt,Nt,"≡","\\equiv",!0),dt(ft,vt,Nt,"≺","\\prec",!0),dt(ft,vt,Nt,"≻","\\succ",!0),dt(ft,vt,Nt,"∼","\\sim",!0),dt(ft,vt,Nt,"⊥","\\perp"),dt(ft,vt,Nt,"⪯","\\preceq",!0),dt(ft,vt,Nt,"⪰","\\succeq",!0),dt(ft,vt,Nt,"≃","\\simeq",!0),dt(ft,vt,Nt,"∣","\\mid",!0),dt(ft,vt,Nt,"≪","\\ll",!0),dt(ft,vt,Nt,"≫","\\gg",!0),dt(ft,vt,Nt,"≍","\\asymp",!0),dt(ft,vt,Nt,"∥","\\parallel"),dt(ft,vt,Nt,"⋈","\\bowtie",!0),dt(ft,vt,Nt,"⌣","\\smile",!0),dt(ft,vt,Nt,"⊑","\\sqsubseteq",!0),dt(ft,vt,Nt,"⊒","\\sqsupseteq",!0),dt(ft,vt,Nt,"≐","\\doteq",!0),dt(ft,vt,Nt,"⌢","\\frown",!0),dt(ft,vt,Nt,"∋","\\ni",!0),dt(ft,vt,Nt,"∝","\\propto",!0),dt(ft,vt,Nt,"⊢","\\vdash",!0),dt(ft,vt,Nt,"⊣","\\dashv",!0),dt(ft,vt,Nt,"∋","\\owns"),dt(ft,vt,Ct,".","\\ldotp"),dt(ft,vt,Ct,"⋅","\\cdotp"),dt(ft,vt,Tt,"#","\\#"),dt(gt,vt,Tt,"#","\\#"),dt(ft,vt,Tt,"&","\\&"),dt(gt,vt,Tt,"&","\\&"),dt(ft,vt,Tt,"ℵ","\\aleph",!0),dt(ft,vt,Tt,"∀","\\forall",!0),dt(ft,vt,Tt,"ℏ","\\hbar",!0),dt(ft,vt,Tt,"∃","\\exists",!0),dt(ft,vt,Tt,"∇","\\nabla",!0),dt(ft,vt,Tt,"♭","\\flat",!0),dt(ft,vt,Tt,"ℓ","\\ell",!0),dt(ft,vt,Tt,"♮","\\natural",!0),dt(ft,vt,Tt,"♣","\\clubsuit",!0),dt(ft,vt,Tt,"℘","\\wp",!0),dt(ft,vt,Tt,"♯","\\sharp",!0),dt(ft,vt,Tt,"♢","\\diamondsuit",!0),dt(ft,vt,Tt,"ℜ","\\Re",!0),dt(ft,vt,Tt,"♡","\\heartsuit",!0),dt(ft,vt,Tt,"ℑ","\\Im",!0),dt(ft,vt,Tt,"♠","\\spadesuit",!0),dt(ft,vt,Tt,"§","\\S",!0),dt(gt,vt,Tt,"§","\\S"),dt(ft,vt,Tt,"¶","\\P",!0),dt(gt,vt,Tt,"¶","\\P"),dt(ft,vt,Tt,"†","\\dag"),dt(gt,vt,Tt,"†","\\dag"),dt(gt,vt,Tt,"†","\\textdagger"),dt(ft,vt,Tt,"‡","\\ddag"),dt(gt,vt,Tt,"‡","\\ddag"),dt(gt,vt,Tt,"‡","\\textdaggerdbl"),dt(ft,vt,wt,"⎱","\\rmoustache",!0),dt(ft,vt,St,"⎰","\\lmoustache",!0),dt(ft,vt,wt,"⟯","\\rgroup",!0),dt(ft,vt,St,"⟮","\\lgroup",!0),dt(ft,vt,xt,"∓","\\mp",!0),dt(ft,vt,xt,"⊖","\\ominus",!0),dt(ft,vt,xt,"⊎","\\uplus",!0),dt(ft,vt,xt,"⊓","\\sqcap",!0),dt(ft,vt,xt,"∗","\\ast"),dt(ft,vt,xt,"⊔","\\sqcup",!0),dt(ft,vt,xt,"◯","\\bigcirc",!0),dt(ft,vt,xt,"∙","\\bullet",!0),dt(ft,vt,xt,"‡","\\ddagger"),dt(ft,vt,xt,"≀","\\wr",!0),dt(ft,vt,xt,"⨿","\\amalg"),dt(ft,vt,xt,"&","\\And"),dt(ft,vt,Nt,"⟵","\\longleftarrow",!0),dt(ft,vt,Nt,"⇐","\\Leftarrow",!0),dt(ft,vt,Nt,"⟸","\\Longleftarrow",!0),dt(ft,vt,Nt,"⟶","\\longrightarrow",!0),dt(ft,vt,Nt,"⇒","\\Rightarrow",!0),dt(ft,vt,Nt,"⟹","\\Longrightarrow",!0),dt(ft,vt,Nt,"↔","\\leftrightarrow",!0),dt(ft,vt,Nt,"⟷","\\longleftrightarrow",!0),dt(ft,vt,Nt,"⇔","\\Leftrightarrow",!0),dt(ft,vt,Nt,"⟺","\\Longleftrightarrow",!0),dt(ft,vt,Nt,"↦","\\mapsto",!0),dt(ft,vt,Nt,"⟼","\\longmapsto",!0),dt(ft,vt,Nt,"↗","\\nearrow",!0),dt(ft,vt,Nt,"↩","\\hookleftarrow",!0),dt(ft,vt,Nt,"↪","\\hookrightarrow",!0),dt(ft,vt,Nt,"↘","\\searrow",!0),dt(ft,vt,Nt,"↼","\\leftharpoonup",!0),dt(ft,vt,Nt,"⇀","\\rightharpoonup",!0),dt(ft,vt,Nt,"↙","\\swarrow",!0),dt(ft,vt,Nt,"↽","\\leftharpoondown",!0),dt(ft,vt,Nt,"⇁","\\rightharpoondown",!0),dt(ft,vt,Nt,"↖","\\nwarrow",!0),dt(ft,vt,Nt,"⇌","\\rightleftharpoons",!0),dt(ft,bt,Nt,"≮","\\nless",!0),dt(ft,bt,Nt,"","\\@nleqslant"),dt(ft,bt,Nt,"","\\@nleqq"),dt(ft,bt,Nt,"⪇","\\lneq",!0),dt(ft,bt,Nt,"≨","\\lneqq",!0),dt(ft,bt,Nt,"","\\@lvertneqq"),dt(ft,bt,Nt,"⋦","\\lnsim",!0),dt(ft,bt,Nt,"⪉","\\lnapprox",!0),dt(ft,bt,Nt,"⊀","\\nprec",!0),dt(ft,bt,Nt,"⋠","\\npreceq",!0),dt(ft,bt,Nt,"⋨","\\precnsim",!0),dt(ft,bt,Nt,"⪹","\\precnapprox",!0),dt(ft,bt,Nt,"≁","\\nsim",!0),dt(ft,bt,Nt,"","\\@nshortmid"),dt(ft,bt,Nt,"∤","\\nmid",!0),dt(ft,bt,Nt,"⊬","\\nvdash",!0),dt(ft,bt,Nt,"⊭","\\nvDash",!0),dt(ft,bt,Nt,"⋪","\\ntriangleleft"),dt(ft,bt,Nt,"⋬","\\ntrianglelefteq",!0),dt(ft,bt,Nt,"⊊","\\subsetneq",!0),dt(ft,bt,Nt,"","\\@varsubsetneq"),dt(ft,bt,Nt,"⫋","\\subsetneqq",!0),dt(ft,bt,Nt,"","\\@varsubsetneqq"),dt(ft,bt,Nt,"≯","\\ngtr",!0),dt(ft,bt,Nt,"","\\@ngeqslant"),dt(ft,bt,Nt,"","\\@ngeqq"),dt(ft,bt,Nt,"⪈","\\gneq",!0),dt(ft,bt,Nt,"≩","\\gneqq",!0),dt(ft,bt,Nt,"","\\@gvertneqq"),dt(ft,bt,Nt,"⋧","\\gnsim",!0),dt(ft,bt,Nt,"⪊","\\gnapprox",!0),dt(ft,bt,Nt,"⊁","\\nsucc",!0),dt(ft,bt,Nt,"⋡","\\nsucceq",!0),dt(ft,bt,Nt,"⋩","\\succnsim",!0),dt(ft,bt,Nt,"⪺","\\succnapprox",!0),dt(ft,bt,Nt,"≆","\\ncong",!0),dt(ft,bt,Nt,"","\\@nshortparallel"),dt(ft,bt,Nt,"∦","\\nparallel",!0),dt(ft,bt,Nt,"⊯","\\nVDash",!0),dt(ft,bt,Nt,"⋫","\\ntriangleright"),dt(ft,bt,Nt,"⋭","\\ntrianglerighteq",!0),dt(ft,bt,Nt,"","\\@nsupseteqq"),dt(ft,bt,Nt,"⊋","\\supsetneq",!0),dt(ft,bt,Nt,"","\\@varsupsetneq"),dt(ft,bt,Nt,"⫌","\\supsetneqq",!0),dt(ft,bt,Nt,"","\\@varsupsetneqq"),dt(ft,bt,Nt,"⊮","\\nVdash",!0),dt(ft,bt,Nt,"⪵","\\precneqq",!0),dt(ft,bt,Nt,"⪶","\\succneqq",!0),dt(ft,bt,Nt,"","\\@nsubseteqq"),dt(ft,bt,xt,"⊴","\\unlhd"),dt(ft,bt,xt,"⊵","\\unrhd"),dt(ft,bt,Nt,"↚","\\nleftarrow",!0),dt(ft,bt,Nt,"↛","\\nrightarrow",!0),dt(ft,bt,Nt,"⇍","\\nLeftarrow",!0),dt(ft,bt,Nt,"⇏","\\nRightarrow",!0),dt(ft,bt,Nt,"↮","\\nleftrightarrow",!0),dt(ft,bt,Nt,"⇎","\\nLeftrightarrow",!0),dt(ft,bt,Nt,"△","\\vartriangle"),dt(ft,bt,Tt,"ℏ","\\hslash"),dt(ft,bt,Tt,"▽","\\triangledown"),dt(ft,bt,Tt,"◊","\\lozenge"),dt(ft,bt,Tt,"Ⓢ","\\circledS"),dt(ft,bt,Tt,"®","\\circledR"),dt(gt,bt,Tt,"®","\\circledR"),dt(ft,bt,Tt,"∡","\\measuredangle",!0),dt(ft,bt,Tt,"∄","\\nexists"),dt(ft,bt,Tt,"℧","\\mho"),dt(ft,bt,Tt,"Ⅎ","\\Finv",!0),dt(ft,bt,Tt,"⅁","\\Game",!0),dt(ft,bt,Tt,"‵","\\backprime"),dt(ft,bt,Tt,"▲","\\blacktriangle"),dt(ft,bt,Tt,"▼","\\blacktriangledown"),dt(ft,bt,Tt,"■","\\blacksquare"),dt(ft,bt,Tt,"⧫","\\blacklozenge"),dt(ft,bt,Tt,"★","\\bigstar"),dt(ft,bt,Tt,"∢","\\sphericalangle",!0),dt(ft,bt,Tt,"∁","\\complement",!0),dt(ft,bt,Tt,"ð","\\eth",!0),dt(gt,vt,Tt,"ð","ð"),dt(ft,bt,Tt,"╱","\\diagup"),dt(ft,bt,Tt,"╲","\\diagdown"),dt(ft,bt,Tt,"□","\\square"),dt(ft,bt,Tt,"□","\\Box"),dt(ft,bt,Tt,"◊","\\Diamond"),dt(ft,bt,Tt,"¥","\\yen",!0),dt(gt,bt,Tt,"¥","\\yen",!0),dt(ft,bt,Tt,"✓","\\checkmark",!0),dt(gt,bt,Tt,"✓","\\checkmark"),dt(ft,bt,Tt,"ℶ","\\beth",!0),dt(ft,bt,Tt,"ℸ","\\daleth",!0),dt(ft,bt,Tt,"ℷ","\\gimel",!0),dt(ft,bt,Tt,"ϝ","\\digamma",!0),dt(ft,bt,Tt,"ϰ","\\varkappa"),dt(ft,bt,St,"┌","\\@ulcorner",!0),dt(ft,bt,wt,"┐","\\@urcorner",!0),dt(ft,bt,St,"└","\\@llcorner",!0),dt(ft,bt,wt,"┘","\\@lrcorner",!0),dt(ft,bt,Nt,"≦","\\leqq",!0),dt(ft,bt,Nt,"⩽","\\leqslant",!0),dt(ft,bt,Nt,"⪕","\\eqslantless",!0),dt(ft,bt,Nt,"≲","\\lesssim",!0),dt(ft,bt,Nt,"⪅","\\lessapprox",!0),dt(ft,bt,Nt,"≊","\\approxeq",!0),dt(ft,bt,xt,"⋖","\\lessdot"),dt(ft,bt,Nt,"⋘","\\lll",!0),dt(ft,bt,Nt,"≶","\\lessgtr",!0),dt(ft,bt,Nt,"⋚","\\lesseqgtr",!0),dt(ft,bt,Nt,"⪋","\\lesseqqgtr",!0),dt(ft,bt,Nt,"≑","\\doteqdot"),dt(ft,bt,Nt,"≓","\\risingdotseq",!0),dt(ft,bt,Nt,"≒","\\fallingdotseq",!0),dt(ft,bt,Nt,"∽","\\backsim",!0),dt(ft,bt,Nt,"⋍","\\backsimeq",!0),dt(ft,bt,Nt,"⫅","\\subseteqq",!0),dt(ft,bt,Nt,"⋐","\\Subset",!0),dt(ft,bt,Nt,"⊏","\\sqsubset",!0),dt(ft,bt,Nt,"≼","\\preccurlyeq",!0),dt(ft,bt,Nt,"⋞","\\curlyeqprec",!0),dt(ft,bt,Nt,"≾","\\precsim",!0),dt(ft,bt,Nt,"⪷","\\precapprox",!0),dt(ft,bt,Nt,"⊲","\\vartriangleleft"),dt(ft,bt,Nt,"⊴","\\trianglelefteq"),dt(ft,bt,Nt,"⊨","\\vDash",!0),dt(ft,bt,Nt,"⊪","\\Vvdash",!0),dt(ft,bt,Nt,"⌣","\\smallsmile"),dt(ft,bt,Nt,"⌢","\\smallfrown"),dt(ft,bt,Nt,"≏","\\bumpeq",!0),dt(ft,bt,Nt,"≎","\\Bumpeq",!0),dt(ft,bt,Nt,"≧","\\geqq",!0),dt(ft,bt,Nt,"⩾","\\geqslant",!0),dt(ft,bt,Nt,"⪖","\\eqslantgtr",!0),dt(ft,bt,Nt,"≳","\\gtrsim",!0),dt(ft,bt,Nt,"⪆","\\gtrapprox",!0),dt(ft,bt,xt,"⋗","\\gtrdot"),dt(ft,bt,Nt,"⋙","\\ggg",!0),dt(ft,bt,Nt,"≷","\\gtrless",!0),dt(ft,bt,Nt,"⋛","\\gtreqless",!0),dt(ft,bt,Nt,"⪌","\\gtreqqless",!0),dt(ft,bt,Nt,"≖","\\eqcirc",!0),dt(ft,bt,Nt,"≗","\\circeq",!0),dt(ft,bt,Nt,"≜","\\triangleq",!0),dt(ft,bt,Nt,"∼","\\thicksim"),dt(ft,bt,Nt,"≈","\\thickapprox"),dt(ft,bt,Nt,"⫆","\\supseteqq",!0),dt(ft,bt,Nt,"⋑","\\Supset",!0),dt(ft,bt,Nt,"⊐","\\sqsupset",!0),dt(ft,bt,Nt,"≽","\\succcurlyeq",!0),dt(ft,bt,Nt,"⋟","\\curlyeqsucc",!0),dt(ft,bt,Nt,"≿","\\succsim",!0),dt(ft,bt,Nt,"⪸","\\succapprox",!0),dt(ft,bt,Nt,"⊳","\\vartriangleright"),dt(ft,bt,Nt,"⊵","\\trianglerighteq"),dt(ft,bt,Nt,"⊩","\\Vdash",!0),dt(ft,bt,Nt,"∣","\\shortmid"),dt(ft,bt,Nt,"∥","\\shortparallel"),dt(ft,bt,Nt,"≬","\\between",!0),dt(ft,bt,Nt,"⋔","\\pitchfork",!0),dt(ft,bt,Nt,"∝","\\varpropto"),dt(ft,bt,Nt,"◀","\\blacktriangleleft"),dt(ft,bt,Nt,"∴","\\therefore",!0),dt(ft,bt,Nt,"∍","\\backepsilon"),dt(ft,bt,Nt,"▶","\\blacktriangleright"),dt(ft,bt,Nt,"∵","\\because",!0),dt(ft,bt,Nt,"⋘","\\llless"),dt(ft,bt,Nt,"⋙","\\gggtr"),dt(ft,bt,xt,"⊲","\\lhd"),dt(ft,bt,xt,"⊳","\\rhd"),dt(ft,bt,Nt,"≂","\\eqsim",!0),dt(ft,vt,Nt,"⋈","\\Join"),dt(ft,bt,Nt,"≑","\\Doteq",!0),dt(ft,bt,xt,"∔","\\dotplus",!0),dt(ft,bt,xt,"∖","\\smallsetminus"),dt(ft,bt,xt,"⋒","\\Cap",!0),dt(ft,bt,xt,"⋓","\\Cup",!0),dt(ft,bt,xt,"⩞","\\doublebarwedge",!0),dt(ft,bt,xt,"⊟","\\boxminus",!0),dt(ft,bt,xt,"⊞","\\boxplus",!0),dt(ft,bt,xt,"⋇","\\divideontimes",!0),dt(ft,bt,xt,"⋉","\\ltimes",!0),dt(ft,bt,xt,"⋊","\\rtimes",!0),dt(ft,bt,xt,"⋋","\\leftthreetimes",!0),dt(ft,bt,xt,"⋌","\\rightthreetimes",!0),dt(ft,bt,xt,"⋏","\\curlywedge",!0),dt(ft,bt,xt,"⋎","\\curlyvee",!0),dt(ft,bt,xt,"⊝","\\circleddash",!0),dt(ft,bt,xt,"⊛","\\circledast",!0),dt(ft,bt,xt,"⋅","\\centerdot"),dt(ft,bt,xt,"⊺","\\intercal",!0),dt(ft,bt,xt,"⋒","\\doublecap"),dt(ft,bt,xt,"⋓","\\doublecup"),dt(ft,bt,xt,"⊠","\\boxtimes",!0),dt(ft,bt,Nt,"⇢","\\dashrightarrow",!0),dt(ft,bt,Nt,"⇠","\\dashleftarrow",!0),dt(ft,bt,Nt,"⇇","\\leftleftarrows",!0),dt(ft,bt,Nt,"⇆","\\leftrightarrows",!0),dt(ft,bt,Nt,"⇚","\\Lleftarrow",!0),dt(ft,bt,Nt,"↞","\\twoheadleftarrow",!0),dt(ft,bt,Nt,"↢","\\leftarrowtail",!0),dt(ft,bt,Nt,"↫","\\looparrowleft",!0),dt(ft,bt,Nt,"⇋","\\leftrightharpoons",!0),dt(ft,bt,Nt,"↶","\\curvearrowleft",!0),dt(ft,bt,Nt,"↺","\\circlearrowleft",!0),dt(ft,bt,Nt,"↰","\\Lsh",!0),dt(ft,bt,Nt,"⇈","\\upuparrows",!0),dt(ft,bt,Nt,"↿","\\upharpoonleft",!0),dt(ft,bt,Nt,"⇃","\\downharpoonleft",!0),dt(ft,vt,Nt,"⊶","\\origof",!0),dt(ft,vt,Nt,"⊷","\\imageof",!0),dt(ft,bt,Nt,"⊸","\\multimap",!0),dt(ft,bt,Nt,"↭","\\leftrightsquigarrow",!0),dt(ft,bt,Nt,"⇉","\\rightrightarrows",!0),dt(ft,bt,Nt,"⇄","\\rightleftarrows",!0),dt(ft,bt,Nt,"↠","\\twoheadrightarrow",!0),dt(ft,bt,Nt,"↣","\\rightarrowtail",!0),dt(ft,bt,Nt,"↬","\\looparrowright",!0),dt(ft,bt,Nt,"↷","\\curvearrowright",!0),dt(ft,bt,Nt,"↻","\\circlearrowright",!0),dt(ft,bt,Nt,"↱","\\Rsh",!0),dt(ft,bt,Nt,"⇊","\\downdownarrows",!0),dt(ft,bt,Nt,"↾","\\upharpoonright",!0),dt(ft,bt,Nt,"⇂","\\downharpoonright",!0),dt(ft,bt,Nt,"⇝","\\rightsquigarrow",!0),dt(ft,bt,Nt,"⇝","\\leadsto"),dt(ft,bt,Nt,"⇛","\\Rrightarrow",!0),dt(ft,bt,Nt,"↾","\\restriction"),dt(ft,vt,Tt,"‘","`"),dt(ft,vt,Tt,"$","\\$"),dt(gt,vt,Tt,"$","\\$"),dt(gt,vt,Tt,"$","\\textdollar"),dt(ft,vt,Tt,"%","\\%"),dt(gt,vt,Tt,"%","\\%"),dt(ft,vt,Tt,"_","\\_"),dt(gt,vt,Tt,"_","\\_"),dt(gt,vt,Tt,"_","\\textunderscore"),dt(ft,vt,Tt,"∠","\\angle",!0),dt(ft,vt,Tt,"∞","\\infty",!0),dt(ft,vt,Tt,"′","\\prime"),dt(ft,vt,Tt,"△","\\triangle"),dt(ft,vt,Tt,"Γ","\\Gamma",!0),dt(ft,vt,Tt,"Δ","\\Delta",!0),dt(ft,vt,Tt,"Θ","\\Theta",!0),dt(ft,vt,Tt,"Λ","\\Lambda",!0),dt(ft,vt,Tt,"Ξ","\\Xi",!0),dt(ft,vt,Tt,"Π","\\Pi",!0),dt(ft,vt,Tt,"Σ","\\Sigma",!0),dt(ft,vt,Tt,"Υ","\\Upsilon",!0),dt(ft,vt,Tt,"Φ","\\Phi",!0),dt(ft,vt,Tt,"Ψ","\\Psi",!0),dt(ft,vt,Tt,"Ω","\\Omega",!0),dt(ft,vt,Tt,"A","Α"),dt(ft,vt,Tt,"B","Β"),dt(ft,vt,Tt,"E","Ε"),dt(ft,vt,Tt,"Z","Ζ"),dt(ft,vt,Tt,"H","Η"),dt(ft,vt,Tt,"I","Ι"),dt(ft,vt,Tt,"K","Κ"),dt(ft,vt,Tt,"M","Μ"),dt(ft,vt,Tt,"N","Ν"),dt(ft,vt,Tt,"O","Ο"),dt(ft,vt,Tt,"P","Ρ"),dt(ft,vt,Tt,"T","Τ"),dt(ft,vt,Tt,"X","Χ"),dt(ft,vt,Tt,"¬","\\neg",!0),dt(ft,vt,Tt,"¬","\\lnot"),dt(ft,vt,Tt,"⊤","\\top"),dt(ft,vt,Tt,"⊥","\\bot"),dt(ft,vt,Tt,"∅","\\emptyset"),dt(ft,bt,Tt,"∅","\\varnothing"),dt(ft,vt,Et,"α","\\alpha",!0),dt(ft,vt,Et,"β","\\beta",!0),dt(ft,vt,Et,"γ","\\gamma",!0),dt(ft,vt,Et,"δ","\\delta",!0),dt(ft,vt,Et,"ϵ","\\epsilon",!0),dt(ft,vt,Et,"ζ","\\zeta",!0),dt(ft,vt,Et,"η","\\eta",!0),dt(ft,vt,Et,"θ","\\theta",!0),dt(ft,vt,Et,"ι","\\iota",!0),dt(ft,vt,Et,"κ","\\kappa",!0),dt(ft,vt,Et,"λ","\\lambda",!0),dt(ft,vt,Et,"μ","\\mu",!0),dt(ft,vt,Et,"ν","\\nu",!0),dt(ft,vt,Et,"ξ","\\xi",!0),dt(ft,vt,Et,"ο","\\omicron",!0),dt(ft,vt,Et,"π","\\pi",!0),dt(ft,vt,Et,"ρ","\\rho",!0),dt(ft,vt,Et,"σ","\\sigma",!0),dt(ft,vt,Et,"τ","\\tau",!0),dt(ft,vt,Et,"υ","\\upsilon",!0),dt(ft,vt,Et,"ϕ","\\phi",!0),dt(ft,vt,Et,"χ","\\chi",!0),dt(ft,vt,Et,"ψ","\\psi",!0),dt(ft,vt,Et,"ω","\\omega",!0),dt(ft,vt,Et,"ε","\\varepsilon",!0),dt(ft,vt,Et,"ϑ","\\vartheta",!0),dt(ft,vt,Et,"ϖ","\\varpi",!0),dt(ft,vt,Et,"ϱ","\\varrho",!0),dt(ft,vt,Et,"ς","\\varsigma",!0),dt(ft,vt,Et,"φ","\\varphi",!0),dt(ft,vt,xt,"∗","*",!0),dt(ft,vt,xt,"+","+"),dt(ft,vt,xt,"−","-",!0),dt(ft,vt,xt,"⋅","\\cdot",!0),dt(ft,vt,xt,"∘","\\circ",!0),dt(ft,vt,xt,"÷","\\div",!0),dt(ft,vt,xt,"±","\\pm",!0),dt(ft,vt,xt,"×","\\times",!0),dt(ft,vt,xt,"∩","\\cap",!0),dt(ft,vt,xt,"∪","\\cup",!0),dt(ft,vt,xt,"∖","\\setminus",!0),dt(ft,vt,xt,"∧","\\land"),dt(ft,vt,xt,"∨","\\lor"),dt(ft,vt,xt,"∧","\\wedge",!0),dt(ft,vt,xt,"∨","\\vee",!0),dt(ft,vt,Tt,"√","\\surd"),dt(ft,vt,St,"⟨","\\langle",!0),dt(ft,vt,St,"∣","\\lvert"),dt(ft,vt,St,"∥","\\lVert"),dt(ft,vt,wt,"?","?"),dt(ft,vt,wt,"!","!"),dt(ft,vt,wt,"⟩","\\rangle",!0),dt(ft,vt,wt,"∣","\\rvert"),dt(ft,vt,wt,"∥","\\rVert"),dt(ft,vt,Nt,"=","="),dt(ft,vt,Nt,":",":"),dt(ft,vt,Nt,"≈","\\approx",!0),dt(ft,vt,Nt,"≅","\\cong",!0),dt(ft,vt,Nt,"≥","\\ge"),dt(ft,vt,Nt,"≥","\\geq",!0),dt(ft,vt,Nt,"←","\\gets"),dt(ft,vt,Nt,">","\\gt",!0),dt(ft,vt,Nt,"∈","\\in",!0),dt(ft,vt,Nt,"","\\@not"),dt(ft,vt,Nt,"⊂","\\subset",!0),dt(ft,vt,Nt,"⊃","\\supset",!0),dt(ft,vt,Nt,"⊆","\\subseteq",!0),dt(ft,vt,Nt,"⊇","\\supseteq",!0),dt(ft,bt,Nt,"⊈","\\nsubseteq",!0),dt(ft,bt,Nt,"⊉","\\nsupseteq",!0),dt(ft,vt,Nt,"⊨","\\models"),dt(ft,vt,Nt,"←","\\leftarrow",!0),dt(ft,vt,Nt,"≤","\\le"),dt(ft,vt,Nt,"≤","\\leq",!0),dt(ft,vt,Nt,"<","\\lt",!0),dt(ft,vt,Nt,"→","\\rightarrow",!0),dt(ft,vt,Nt,"→","\\to"),dt(ft,bt,Nt,"≱","\\ngeq",!0),dt(ft,bt,Nt,"≰","\\nleq",!0),dt(ft,vt,zt," ","\\ "),dt(ft,vt,zt," ","\\space"),dt(ft,vt,zt," ","\\nobreakspace"),dt(gt,vt,zt," ","\\ "),dt(gt,vt,zt," "," "),dt(gt,vt,zt," ","\\space"),dt(gt,vt,zt," ","\\nobreakspace"),dt(ft,vt,zt,null,"\\nobreak"),dt(ft,vt,zt,null,"\\allowbreak"),dt(ft,vt,Ct,",",","),dt(ft,vt,Ct,";",";"),dt(ft,bt,xt,"⊼","\\barwedge",!0),dt(ft,bt,xt,"⊻","\\veebar",!0),dt(ft,vt,xt,"⊙","\\odot",!0),dt(ft,vt,xt,"⊕","\\oplus",!0),dt(ft,vt,xt,"⊗","\\otimes",!0),dt(ft,vt,Tt,"∂","\\partial",!0),dt(ft,vt,xt,"⊘","\\oslash",!0),dt(ft,bt,xt,"⊚","\\circledcirc",!0),dt(ft,bt,xt,"⊡","\\boxdot",!0),dt(ft,vt,xt,"△","\\bigtriangleup"),dt(ft,vt,xt,"▽","\\bigtriangledown"),dt(ft,vt,xt,"†","\\dagger"),dt(ft,vt,xt,"⋄","\\diamond"),dt(ft,vt,xt,"⋆","\\star"),dt(ft,vt,xt,"◃","\\triangleleft"),dt(ft,vt,xt,"▹","\\triangleright"),dt(ft,vt,St,"{","\\{"),dt(gt,vt,Tt,"{","\\{"),dt(gt,vt,Tt,"{","\\textbraceleft"),dt(ft,vt,wt,"}","\\}"),dt(gt,vt,Tt,"}","\\}"),dt(gt,vt,Tt,"}","\\textbraceright"),dt(ft,vt,St,"{","\\lbrace"),dt(ft,vt,wt,"}","\\rbrace"),dt(ft,vt,St,"[","\\lbrack",!0),dt(gt,vt,Tt,"[","\\lbrack",!0),dt(ft,vt,wt,"]","\\rbrack",!0),dt(gt,vt,Tt,"]","\\rbrack",!0),dt(ft,vt,St,"(","\\lparen",!0),dt(ft,vt,wt,")","\\rparen",!0),dt(gt,vt,Tt,"<","\\textless",!0),dt(gt,vt,Tt,">","\\textgreater",!0),dt(ft,vt,St,"⌊","\\lfloor",!0),dt(ft,vt,wt,"⌋","\\rfloor",!0),dt(ft,vt,St,"⌈","\\lceil",!0),dt(ft,vt,wt,"⌉","\\rceil",!0),dt(ft,vt,Tt,"\\","\\backslash"),dt(ft,vt,Tt,"∣","|"),dt(ft,vt,Tt,"∣","\\vert"),dt(gt,vt,Tt,"|","\\textbar",!0),dt(ft,vt,Tt,"∥","\\|"),dt(ft,vt,Tt,"∥","\\Vert"),dt(gt,vt,Tt,"∥","\\textbardbl"),dt(gt,vt,Tt,"~","\\textasciitilde"),dt(gt,vt,Tt,"\\","\\textbackslash"),dt(gt,vt,Tt,"^","\\textasciicircum"),dt(ft,vt,Nt,"↑","\\uparrow",!0),dt(ft,vt,Nt,"⇑","\\Uparrow",!0),dt(ft,vt,Nt,"↓","\\downarrow",!0),dt(ft,vt,Nt,"⇓","\\Downarrow",!0),dt(ft,vt,Nt,"↕","\\updownarrow",!0),dt(ft,vt,Nt,"⇕","\\Updownarrow",!0),dt(ft,vt,Mt,"∐","\\coprod"),dt(ft,vt,Mt,"⋁","\\bigvee"),dt(ft,vt,Mt,"⋀","\\bigwedge"),dt(ft,vt,Mt,"⨄","\\biguplus"),dt(ft,vt,Mt,"⋂","\\bigcap"),dt(ft,vt,Mt,"⋃","\\bigcup"),dt(ft,vt,Mt,"∫","\\int"),dt(ft,vt,Mt,"∫","\\intop"),dt(ft,vt,Mt,"∬","\\iint"),dt(ft,vt,Mt,"∭","\\iiint"),dt(ft,vt,Mt,"∏","\\prod"),dt(ft,vt,Mt,"∑","\\sum"),dt(ft,vt,Mt,"⨂","\\bigotimes"),dt(ft,vt,Mt,"⨁","\\bigoplus"),dt(ft,vt,Mt,"⨀","\\bigodot"),dt(ft,vt,Mt,"∮","\\oint"),dt(ft,vt,Mt,"∯","\\oiint"),dt(ft,vt,Mt,"∰","\\oiiint"),dt(ft,vt,Mt,"⨆","\\bigsqcup"),dt(ft,vt,Mt,"∫","\\smallint"),dt(gt,vt,kt,"…","\\textellipsis"),dt(ft,vt,kt,"…","\\mathellipsis"),dt(gt,vt,kt,"…","\\ldots",!0),dt(ft,vt,kt,"…","\\ldots",!0),dt(ft,vt,kt,"⋯","\\@cdots",!0),dt(ft,vt,kt,"⋱","\\ddots",!0),dt(ft,vt,Tt,"⋮","\\varvdots"),dt(gt,vt,Tt,"⋮","\\varvdots"),dt(ft,vt,yt,"ˊ","\\acute"),dt(ft,vt,yt,"ˋ","\\grave"),dt(ft,vt,yt,"¨","\\ddot"),dt(ft,vt,yt,"~","\\tilde"),dt(ft,vt,yt,"ˉ","\\bar"),dt(ft,vt,yt,"˘","\\breve"),dt(ft,vt,yt,"ˇ","\\check"),dt(ft,vt,yt,"^","\\hat"),dt(ft,vt,yt,"⃗","\\vec"),dt(ft,vt,yt,"˙","\\dot"),dt(ft,vt,yt,"˚","\\mathring"),dt(ft,vt,Et,"","\\@imath"),dt(ft,vt,Et,"","\\@jmath"),dt(ft,vt,Tt,"ı","ı"),dt(ft,vt,Tt,"ȷ","ȷ"),dt(gt,vt,Tt,"ı","\\i",!0),dt(gt,vt,Tt,"ȷ","\\j",!0),dt(gt,vt,Tt,"ß","\\ss",!0),dt(gt,vt,Tt,"æ","\\ae",!0),dt(gt,vt,Tt,"œ","\\oe",!0),dt(gt,vt,Tt,"ø","\\o",!0),dt(gt,vt,Tt,"Æ","\\AE",!0),dt(gt,vt,Tt,"Œ","\\OE",!0),dt(gt,vt,Tt,"Ø","\\O",!0),dt(gt,vt,yt,"ˊ","\\'"),dt(gt,vt,yt,"ˋ","\\`"),dt(gt,vt,yt,"ˆ","\\^"),dt(gt,vt,yt,"˜","\\~"),dt(gt,vt,yt,"ˉ","\\="),dt(gt,vt,yt,"˘","\\u"),dt(gt,vt,yt,"˙","\\."),dt(gt,vt,yt,"¸","\\c"),dt(gt,vt,yt,"˚","\\r"),dt(gt,vt,yt,"ˇ","\\v"),dt(gt,vt,yt,"¨",'\\"'),dt(gt,vt,yt,"˝","\\H"),dt(gt,vt,yt,"◯","\\textcircled");var At={"--":!0,"---":!0,"``":!0,"''":!0};dt(gt,vt,Tt,"–","--",!0),dt(gt,vt,Tt,"–","\\textendash"),dt(gt,vt,Tt,"—","---",!0),dt(gt,vt,Tt,"—","\\textemdash"),dt(gt,vt,Tt,"‘","`",!0),dt(gt,vt,Tt,"‘","\\textquoteleft"),dt(gt,vt,Tt,"’","'",!0),dt(gt,vt,Tt,"’","\\textquoteright"),dt(gt,vt,Tt,"“","``",!0),dt(gt,vt,Tt,"“","\\textquotedblleft"),dt(gt,vt,Tt,"”","''",!0),dt(gt,vt,Tt,"”","\\textquotedblright"),dt(ft,vt,Tt,"°","\\degree",!0),dt(gt,vt,Tt,"°","\\degree"),dt(gt,vt,Tt,"°","\\textdegree",!0),dt(ft,vt,Tt,"£","\\pounds"),dt(ft,vt,Tt,"£","\\mathsterling",!0),dt(gt,vt,Tt,"£","\\pounds"),dt(gt,vt,Tt,"£","\\textsterling",!0),dt(ft,bt,Tt,"✠","\\maltese"),dt(gt,bt,Tt,"✠","\\maltese");for(var Bt='0123456789/@."',qt=0;qt<14;qt++){var Lt=Bt.charAt(qt);dt(ft,vt,Tt,Lt,Lt)}for(var Ot='0123456789!@*()-=+";:?/.,',Ht=0;Ht<25;Ht++){var It=Ot.charAt(Ht);dt(gt,vt,Tt,It,It)}for(var Rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ft=0;Ft<52;Ft++){var Dt=Rt.charAt(Ft);dt(ft,vt,Et,Dt,Dt),dt(gt,vt,Tt,Dt,Dt)}dt(ft,bt,Tt,"C","ℂ"),dt(gt,bt,Tt,"C","ℂ"),dt(ft,bt,Tt,"H","ℍ"),dt(gt,bt,Tt,"H","ℍ"),dt(ft,bt,Tt,"N","ℕ"),dt(gt,bt,Tt,"N","ℕ"),dt(ft,bt,Tt,"P","ℙ"),dt(gt,bt,Tt,"P","ℙ"),dt(ft,bt,Tt,"Q","ℚ"),dt(gt,bt,Tt,"Q","ℚ"),dt(ft,bt,Tt,"R","ℝ"),dt(gt,bt,Tt,"R","ℝ"),dt(ft,bt,Tt,"Z","ℤ"),dt(gt,bt,Tt,"Z","ℤ"),dt(ft,vt,Et,"h","ℎ"),dt(gt,vt,Et,"h","ℎ");for(var jt="",Vt=0;Vt<52;Vt++){var Pt=Rt.charAt(Vt);dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56320+Vt)),dt(gt,vt,Tt,Pt,jt),dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56372+Vt)),dt(gt,vt,Tt,Pt,jt),dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56424+Vt)),dt(gt,vt,Tt,Pt,jt),dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56580+Vt)),dt(gt,vt,Tt,Pt,jt),dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56684+Vt)),dt(gt,vt,Tt,Pt,jt),dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56736+Vt)),dt(gt,vt,Tt,Pt,jt),dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56788+Vt)),dt(gt,vt,Tt,Pt,jt),dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56840+Vt)),dt(gt,vt,Tt,Pt,jt),dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56944+Vt)),dt(gt,vt,Tt,Pt,jt),Vt<26&&(dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56632+Vt)),dt(gt,vt,Tt,Pt,jt),dt(ft,vt,Et,Pt,jt=String.fromCharCode(55349,56476+Vt)),dt(gt,vt,Tt,Pt,jt))}dt(ft,vt,Et,"k",jt=String.fromCharCode(55349,56668)),dt(gt,vt,Tt,"k",jt);for(var _t=0;_t<10;_t++){var Ut=_t.toString();dt(ft,vt,Et,Ut,jt=String.fromCharCode(55349,57294+_t)),dt(gt,vt,Tt,Ut,jt),dt(ft,vt,Et,Ut,jt=String.fromCharCode(55349,57314+_t)),dt(gt,vt,Tt,Ut,jt),dt(ft,vt,Et,Ut,jt=String.fromCharCode(55349,57324+_t)),dt(gt,vt,Tt,Ut,jt),dt(ft,vt,Et,Ut,jt=String.fromCharCode(55349,57334+_t)),dt(gt,vt,Tt,Ut,jt)}for(var Gt="ÐÞþ",Yt=0;Yt<3;Yt++){var Zt=Gt.charAt(Yt);dt(ft,vt,Et,Zt,Zt),dt(gt,vt,Tt,Zt,Zt)}var Xt=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Wt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],$t=function(e,t,r){return pt[r][e]&&pt[r][e].replace&&(e=pt[r][e].replace),{value:e,metrics:je(e,t,r)}},Jt=function(e,t,r,a,n){var i,o=$t(e,t,r),l=o.metrics;if(e=o.value,l){var s=l.italic;("text"===r||a&&"mathit"===a.font)&&(s=0),i=new ot(e,l.height,l.depth,s,l.skew,l.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new ot(e,0,0,0,0,0,n);if(a){i.maxFontSize=a.sizeMultiplier,a.style.isTight()&&i.classes.push("mtight");var c=a.getColor();c&&(i.style.color=c)}return i},Kt=(e,t)=>{if(Je(e.classes)!==Je(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var a in e.style)if(e.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},Qt=function(e){for(var t=0,r=0,a=0,n=0;n<e.children.length;n++){var i=e.children[n];i.height>t&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=a},er=function(e,t,r,a){var n=new rt(e,t,r,a);return Qt(n),n},tr=(e,t,r,a)=>new rt(e,t,r,a),rr=function(e){var t=new Ie(e);return Qt(t),t},ar=function(e,t,r){var a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return a+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},nr={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},ir={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},or={fontMap:nr,makeSymbol:Jt,mathsym:function(e,t,r,a){return void 0===a&&(a=[]),"boldsymbol"===r.font&&$t(e,"Main-Bold",t).metrics?Jt(e,"Main-Bold",t,r,a.concat(["mathbf"])):"\\"===e||"main"===pt[t][e].font?Jt(e,"Main-Regular",t,r,a):Jt(e,"AMS-Regular",t,r,a.concat(["amsrm"]))},makeSpan:er,makeSvgSpan:tr,makeLineSpan:function(e,t,r){var a=er([e],[],t);return a.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),a.style.borderBottomWidth=$e(a.height),a.maxFontSize=1,a},makeAnchor:function(e,t,r,a){var n=new at(e,t,r,a);return Qt(n),n},makeFragment:rr,wrapFragment:function(e,t){return e instanceof Ie?er([],[e],t):e},makeVList:function(e,t){for(var{children:r,depth:a}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],a=-t[0].shift-t[0].elem.depth,n=a,i=1;i<t.length;i++){var o=-t[i].shift-n-t[i].elem.depth,l=o-(t[i-1].elem.height+t[i-1].elem.depth);n+=o,r.push({type:"kern",size:l}),r.push(t[i])}return{children:r,depth:a}}var s;if("top"===e.positionType){for(var c=e.positionData,m=0;m<e.children.length;m++){var h=e.children[m];c-="kern"===h.type?h.size:h.elem.height+h.elem.depth}s=c}else if("bottom"===e.positionType)s=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)s=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");s=-u.elem.depth}}return{children:e.children,depth:s}}(e),n=0,i=0;i<r.length;i++){var o=r[i];if("elem"===o.type){var l=o.elem;n=Math.max(n,l.maxFontSize,l.height)}}n+=2;var s=er(["pstrut"],[]);s.style.height=$e(n);for(var c=[],m=a,h=a,u=a,p=0;p<r.length;p++){var d=r[p];if("kern"===d.type)u+=d.size;else{var f=d.elem,g=d.wrapperClasses||[],v=d.wrapperStyle||{},b=er(g,[s,f],void 0,v);b.style.top=$e(-n-u-f.depth),d.marginLeft&&(b.style.marginLeft=d.marginLeft),d.marginRight&&(b.style.marginRight=d.marginRight),c.push(b),u+=f.height+f.depth}m=Math.min(m,u),h=Math.max(h,u)}var y,x=er(["vlist"],c);if(x.style.height=$e(h),m<0){var w=er([],[]),k=er(["vlist"],[w]);k.style.height=$e(-m);var E=er(["vlist-s"],[new ot("")]);y=[er(["vlist-r"],[x,E]),er(["vlist-r"],[k])]}else y=[er(["vlist-r"],[x])];var M=er(["vlist-t"],y);return 2===y.length&&M.classes.push("vlist-t2"),M.height=h,M.depth=-m,M},makeOrd:function(e,t,r){var a=e.mode,n=e.text,i=["mord"],o="math"===a||"text"===a&&t.font,l=o?t.font:t.fontFamily,s="",c="";if(55349===n.charCodeAt(0)&&([s,c]=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,a="math"===t?0:1;if(119808<=r&&r<120484){var n=Math.floor((r-119808)/26);return[Xt[n][2],Xt[n][a]]}if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return[Wt[i][2],Wt[i][a]]}if(120485===r||120486===r)return[Xt[0][2],Xt[0][a]];if(120486<r&&r<120782)return["",""];throw new pe("Unsupported character: "+e)}(n,a)),s.length>0)return Jt(n,s,a,t,i.concat(c));if(l){var m,h;if("boldsymbol"===l){var u=function(e,t,r,a,n){return"textord"!==n&&$t(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(n,a,0,0,r);m=u.fontName,h=[u.fontClass]}else o?(m=nr[l].fontName,h=[l]):(m=ar(l,t.fontWeight,t.fontShape),h=[l,t.fontWeight,t.fontShape]);if($t(n,m,a).metrics)return Jt(n,m,a,t,i.concat(h));if(At.hasOwnProperty(n)&&"Typewriter"===m.slice(0,10)){for(var p=[],d=0;d<n.length;d++)p.push(Jt(n[d],m,a,t,i.concat(h)));return rr(p)}}if("mathord"===r)return Jt(n,"Math-Italic",a,t,i.concat(["mathnormal"]));if("textord"===r){var f=pt[a][n]&&pt[a][n].font;if("ams"===f){var g=ar("amsrm",t.fontWeight,t.fontShape);return Jt(n,g,a,t,i.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==f&&f){var v=ar(f,t.fontWeight,t.fontShape);return Jt(n,v,a,t,i.concat(v,t.fontWeight,t.fontShape))}var b=ar("textrm",t.fontWeight,t.fontShape);return Jt(n,b,a,t,i.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:(e,t)=>{var r=er(["mspace"],[],t),a=We(e,t);return r.style.marginRight=$e(a),r},staticSvg:function(e,t){var[r,a,n]=ir[e],i=new st(r),o=new lt([i],{width:$e(a),height:$e(n),style:"width:"+$e(a),viewBox:"0 0 "+1e3*a+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),l=tr(["overlay"],[o],t);return l.height=n,l.style.height=$e(n),l.style.width=$e(a),l},svgData:ir,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var r=e[t],a=e[t+1];r instanceof ot&&a instanceof ot&&Kt(r,a)&&(r.text+=a.text,r.height=Math.max(r.height,a.height),r.depth=Math.max(r.depth,a.depth),r.italic=a.italic,e.splice(t+1,1),t--)}return e}},lr={number:3,unit:"mu"},sr={number:4,unit:"mu"},cr={number:5,unit:"mu"},mr={mord:{mop:lr,mbin:sr,mrel:cr,minner:lr},mop:{mord:lr,mop:lr,mrel:cr,minner:lr},mbin:{mord:sr,mop:sr,mopen:sr,minner:sr},mrel:{mord:cr,mop:cr,mopen:cr,minner:cr},mopen:{},mclose:{mop:lr,mbin:sr,mrel:cr,minner:lr},mpunct:{mord:lr,mop:lr,mrel:cr,mopen:lr,mclose:lr,mpunct:lr,minner:lr},minner:{mord:lr,mop:lr,mbin:sr,mrel:cr,mopen:lr,mpunct:lr,minner:lr}},hr={mord:{mop:lr},mop:{mord:lr,mop:lr},mbin:{},mrel:{},mopen:{},mclose:{mop:lr},mpunct:{},minner:{mop:lr}},ur={},pr={},dr={};function fr(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,l={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:void 0===a.allowedInMath||a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},s=0;s<r.length;++s)ur[r[s]]=l;t&&(i&&(pr[t]=i),o&&(dr[t]=o))}function gr(e){var{type:t,htmlBuilder:r,mathmlBuilder:a}=e;fr({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:a})}var vr=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},br=function(e){return"ordgroup"===e.type?e.body:[e]},yr=or.makeSpan,xr=["leftmost","mbin","mopen","mrel","mop","mpunct"],wr=["rightmost","mrel","mclose","mpunct"],kr={display:Ae.DISPLAY,text:Ae.TEXT,script:Ae.SCRIPT,scriptscript:Ae.SCRIPTSCRIPT},Er={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Mr=function(e,t,r,a){void 0===a&&(a=[null,null]);for(var n=[],i=0;i<e.length;i++){var o=Ar(e[i],t);if(o instanceof Ie){var l=o.children;n.push(...l)}else n.push(o)}if(or.tryCombineChars(n),!r)return n;var s=t;if(1===e.length){var c=e[0];"sizing"===c.type?s=t.havingSize(c.size):"styling"===c.type&&(s=t.havingStyle(kr[c.style]))}var m=yr([a[0]||"leftmost"],[],t),h=yr([a[1]||"rightmost"],[],t),u="root"===r;return Sr(n,((e,t)=>{var r=t.classes[0],a=e.classes[0];"mbin"===r&&be.contains(wr,a)?t.classes[0]="mord":"mbin"===a&&be.contains(xr,r)&&(e.classes[0]="mord")}),{node:m},h,u),Sr(n,((e,t)=>{var r=zr(t),a=zr(e),n=r&&a?e.hasClass("mtight")?hr[r][a]:mr[r][a]:null;if(n)return or.makeGlue(n,s)}),{node:m},h,u),n},Sr=function e(t,r,a,n,i){n&&t.push(n);for(var o=0;o<t.length;o++){var l=t[o],s=Cr(l);if(s)e(s.children,r,a,null,i);else{var c=!l.hasClass("mspace");if(c){var m=r(l,a.node);m&&(a.insertAfter?a.insertAfter(m):(t.unshift(m),o++))}c?a.node=l:i&&l.hasClass("newline")&&(a.node=yr(["leftmost"])),a.insertAfter=(e=>r=>{t.splice(e+1,0,r),o++})(o)}}n&&t.pop()},Cr=function(e){return e instanceof Ie||e instanceof at||e instanceof rt&&e.hasClass("enclosing")?e:null},Nr=function e(t,r){var a=Cr(t);if(a){var n=a.children;if(n.length){if("right"===r)return e(n[n.length-1],"right");if("left"===r)return e(n[0],"left")}}return t},zr=function(e,t){return e?(t&&(e=Nr(e,t)),Er[e.classes[0]]||null):null},Tr=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return yr(t.concat(r))},Ar=function(e,t,r){if(!e)return yr();if(pr[e.type]){var a=pr[e.type](e,t);if(r&&t.size!==r.size){a=yr(t.sizingClasses(r),[a],t);var n=t.sizeMultiplier/r.sizeMultiplier;a.height*=n,a.depth*=n}return a}throw new pe("Got group of unknown type: '"+e.type+"'")};function Br(e,t){var r=yr(["base"],e,t),a=yr(["strut"]);return a.style.height=$e(r.height+r.depth),r.depth&&(a.style.verticalAlign=$e(-r.depth)),r.children.unshift(a),r}function qr(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var a,n=Mr(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(a=n.pop());for(var i,o=[],l=[],s=0;s<n.length;s++)if(l.push(n[s]),n[s].hasClass("mbin")||n[s].hasClass("mrel")||n[s].hasClass("allowbreak")){for(var c=!1;s<n.length-1&&n[s+1].hasClass("mspace")&&!n[s+1].hasClass("newline");)s++,l.push(n[s]),n[s].hasClass("nobreak")&&(c=!0);c||(o.push(Br(l,t)),l=[])}else n[s].hasClass("newline")&&(l.pop(),l.length>0&&(o.push(Br(l,t)),l=[]),o.push(n[s]));l.length>0&&o.push(Br(l,t)),r?((i=Br(Mr(r,t,!0))).classes=["tag"],o.push(i)):a&&o.push(a);var m=yr(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var h=i.children[0];h.style.height=$e(m.height+m.depth),m.depth&&(h.style.verticalAlign=$e(-m.depth))}return m}function Lr(e){return new Ie(e)}class Or{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Je(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Hr&&this.children[r+1]instanceof Hr){for(var a=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Hr;)a+=this.children[++r].toText();e.appendChild(new Hr(a).toNode())}else e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=be.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+be.escape(Je(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class Hr{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return be.escape(this.toText())}toText(){return this.text}}var Ir={MathNode:Or,TextNode:Hr,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",$e(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+$e(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:Lr},Rr=function(e,t,r){return!pt[t][e]||!pt[t][e].replace||55349===e.charCodeAt(0)||At.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=pt[t][e].replace),new Ir.TextNode(e)},Fr=function(e){return 1===e.length?e[0]:new Ir.MathNode("mrow",e)},Dr=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var a=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathsfit"===r)return"sans-serif-italic";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var n=e.text;return be.contains(["\\imath","\\jmath"],n)?null:(pt[a][n]&&pt[a][n].replace&&(n=pt[a][n].replace),je(n,or.fontMap[r].fontName,a)?or.fontMap[r].variant:null)};function jr(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Hr&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var r=e.children[0];return r instanceof Hr&&","===r.text}return!1}var Vr=function(e,t,r){if(1===e.length){var a=_r(e[0],t);return r&&a instanceof Or&&"mo"===a.type&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var n,i=[],o=0;o<e.length;o++){var l=_r(e[o],t);if(l instanceof Or&&n instanceof Or){if("mtext"===l.type&&"mtext"===n.type&&l.getAttribute("mathvariant")===n.getAttribute("mathvariant")){n.children.push(...l.children);continue}if("mn"===l.type&&"mn"===n.type){n.children.push(...l.children);continue}if(jr(l)&&"mn"===n.type){n.children.push(...l.children);continue}if("mn"===l.type&&jr(n))l.children=[...n.children,...l.children],i.pop();else if(("msup"===l.type||"msub"===l.type)&&l.children.length>=1&&("mn"===n.type||jr(n))){var s=l.children[0];s instanceof Or&&"mn"===s.type&&(s.children=[...n.children,...s.children],i.pop())}else if("mi"===n.type&&1===n.children.length){var c=n.children[0];if(c instanceof Hr&&"̸"===c.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)){var m=l.children[0];m instanceof Hr&&m.text.length>0&&(m.text=m.text.slice(0,1)+"̸"+m.text.slice(1),i.pop())}}}i.push(l),n=l}return i},Pr=function(e,t,r){return Fr(Vr(e,t,r))},_r=function(e,t){if(!e)return new Ir.MathNode("mrow");if(dr[e.type])return dr[e.type](e,t);throw new pe("Got group of unknown type: '"+e.type+"'")};function Ur(e,t,r,a,n){var i,o=Vr(e,r);i=1===o.length&&o[0]instanceof Or&&be.contains(["mrow","mtable"],o[0].type)?o[0]:new Ir.MathNode("mrow",o);var l=new Ir.MathNode("annotation",[new Ir.TextNode(t)]);l.setAttribute("encoding","application/x-tex");var s=new Ir.MathNode("semantics",[i,l]),c=new Ir.MathNode("math",[s]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&c.setAttribute("display","block");var m=n?"katex":"katex-mathml";return or.makeSpan([m],[c])}var Gr=function(e){return new Ge({style:e.displayMode?Ae.DISPLAY:Ae.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Yr=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=or.makeSpan(r,[e])}return e},Zr={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Xr={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Wr=function(e,t,r,a,n){var i,o=e.height+e.depth+r+a;if(/fbox|color|angl/.test(t)){if(i=or.makeSpan(["stretchy",t],[],n),"fbox"===t){var l=n.color&&n.getColor();l&&(i.style.borderColor=l)}}else{var s=[];/^[bx]cancel$/.test(t)&&s.push(new ct({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&s.push(new ct({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new lt(s,{width:"100%",height:$e(o)});i=or.makeSvgSpan([],[c],n)}return i.height=o,i.style.height=$e(o),i},$r=function(e){var t=new Ir.MathNode("mo",[new Ir.TextNode(Zr[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Jr=function(e,t){var{span:r,minWidth:a,height:n}=function(){var r=4e5,a=e.label.slice(1);if(be.contains(["widehat","widecheck","widetilde","utilde"],a)){var n,i,o,l="ordgroup"===(p=e.base).type?p.body.length:1;if(l>5)"widehat"===a||"widecheck"===a?(n=420,r=2364,o=.42,i=a+"4"):(n=312,r=2340,o=.34,i="tilde4");else{var s=[1,1,2,2,3,3][l];"widehat"===a||"widecheck"===a?(r=[0,1062,2364,2364,2364][s],n=[0,239,300,360,420][s],o=[0,.24,.3,.3,.36,.42][s],i=a+s):(r=[0,600,1033,2339,2340][s],n=[0,260,286,306,312][s],o=[0,.26,.286,.3,.306,.34][s],i="tilde"+s)}var c=new st(i),m=new lt([c],{width:"100%",height:$e(o),viewBox:"0 0 "+r+" "+n,preserveAspectRatio:"none"});return{span:or.makeSvgSpan([],[m],t),minWidth:0,height:o}}var h,u,p,d=[],f=Xr[a],[g,v,b]=f,y=b/1e3,x=g.length;if(1===x)h=["hide-tail"],u=[f[3]];else if(2===x)h=["halfarrow-left","halfarrow-right"],u=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");h=["brace-left","brace-center","brace-right"],u=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w<x;w++){var k=new st(g[w]),E=new lt([k],{width:"400em",height:$e(y),viewBox:"0 0 "+r+" "+b,preserveAspectRatio:u[w]+" slice"}),M=or.makeSvgSpan([h[w]],[E],t);if(1===x)return{span:M,minWidth:v,height:y};M.style.height=$e(y),d.push(M)}return{span:or.makeSpan(["stretchy"],d,t),minWidth:v,height:y}}();return r.height=n,r.style.height=$e(n),a>0&&(r.style.minWidth=$e(a)),r};function Kr(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Qr(e){var t=ea(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function ea(e){return e&&("atom"===e.type||ut.hasOwnProperty(e.type))?e:null}var ta=(e,t)=>{var r,a,n;e&&"supsub"===e.type?(r=(a=Kr(e.base,"accent")).base,e.base=r,n=function(e){if(e instanceof rt)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Ar(e,t)),e.base=a):r=(a=Kr(e,"accent")).base;var i=Ar(r,t.havingCrampedStyle()),o=0;if(a.isShifty&&be.isCharacterBox(r)){var l=be.getBaseElem(r);o=mt(Ar(l,t.havingCrampedStyle())).skew}var s,c="\\c"===a.label,m=c?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(a.isStretchy)s=Jr(a,t),s=or.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:s,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+$e(2*o)+")",marginLeft:$e(2*o)}:void 0}]},t);else{var h,u;"\\vec"===a.label?(h=or.staticSvg("vec",t),u=or.svgData.vec[1]):((h=mt(h=or.makeOrd({mode:a.mode,text:a.label},t,"textord"))).italic=0,u=h.width,c&&(m+=h.depth)),s=or.makeSpan(["accent-body"],[h]);var p="\\textcircled"===a.label;p&&(s.classes.push("accent-full"),m=i.height);var d=o;p||(d-=u/2),s.style.left=$e(d),"\\textcircled"===a.label&&(s.style.top=".2em"),s=or.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-m},{type:"elem",elem:s}]},t)}var f=or.makeSpan(["mord","accent"],[s],t);return n?(n.children[0]=f,n.height=Math.max(f.height,n.height),n.classes[0]="mord",n):f},ra=(e,t)=>{var r=e.isStretchy?$r(e.label):new Ir.MathNode("mo",[Rr(e.label,e.mode)]),a=new Ir.MathNode("mover",[_r(e.base,t),r]);return a.setAttribute("accent","true"),a},aa=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));fr({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=vr(t[0]),a=!aa.test(e.funcName),n=!a||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:n,base:r}},htmlBuilder:ta,mathmlBuilder:ra}),fr({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],a=e.parser.mode;return"math"===a&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:ta,mathmlBuilder:ra}),fr({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:a,base:n}},htmlBuilder:(e,t)=>{var r=Ar(e.base,t),a=Jr(e,t),n="\\utilde"===e.label?.12:0,i=or.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]},t);return or.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=$r(e.label),a=new Ir.MathNode("munder",[_r(e.base,t),r]);return a.setAttribute("accentunder","true"),a}});var na=e=>{var t=new Ir.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};fr({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a,funcName:n}=e;return{type:"xArrow",mode:a.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,a=t.style,n=t.havingStyle(a.sup()),i=or.wrapFragment(Ar(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(a.sub()),(r=or.wrapFragment(Ar(e.below,n,t),t)).classes.push(o+"-arrow-pad"));var l,s=Jr(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,m=-t.fontMetrics().axisHeight-.5*s.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var h=-t.fontMetrics().axisHeight+r.height+.5*s.height+.111;l=or.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:s,shift:c},{type:"elem",elem:r,shift:h}]},t)}else l=or.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:s,shift:c}]},t);return l.children[0].children[0].children[1].classes.push("svg-align"),or.makeSpan(["mrel","x-arrow"],[l],t)},mathmlBuilder(e,t){var r,a=$r(e.label);if(a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=na(_r(e.body,t));if(e.below){var i=na(_r(e.below,t));r=new Ir.MathNode("munderover",[a,i,n])}else r=new Ir.MathNode("mover",[a,n])}else if(e.below){var o=na(_r(e.below,t));r=new Ir.MathNode("munder",[a,o])}else r=na(),r=new Ir.MathNode("mover",[a,r]);return r}});var ia=or.makeSpan;function oa(e,t){var r=Mr(e.body,t,!0);return ia([e.mclass],r,t)}function la(e,t){var r,a=Vr(e.body,t);return"minner"===e.mclass?r=new Ir.MathNode("mpadded",a):"mord"===e.mclass?e.isCharacterBox?(r=a[0]).type="mi":r=new Ir.MathNode("mi",a):(e.isCharacterBox?(r=a[0]).type="mo":r=new Ir.MathNode("mo",a),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}fr({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+a.slice(5),body:br(n),isCharacterBox:be.isCharacterBox(n)}},htmlBuilder:oa,mathmlBuilder:la});var sa=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};fr({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:sa(t[0]),body:br(t[1]),isCharacterBox:be.isCharacterBox(t[1])}}}),fr({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:a,funcName:n}=e,i=t[1],o=t[0];r="\\stackrel"!==n?sa(i):"mrel";var l={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:br(i)},s={type:"supsub",mode:o.mode,base:l,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:a.mode,mclass:r,body:[s],isCharacterBox:be.isCharacterBox(s)}},htmlBuilder:oa,mathmlBuilder:la}),fr({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:sa(t[0]),body:br(t[0])}},htmlBuilder(e,t){var r=Mr(e.body,t,!0),a=or.makeSpan([e.mclass],r,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var r=Vr(e.body,t),a=new Ir.MathNode("mstyle",r);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var ca={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ma=e=>"textord"===e.type&&"@"===e.text;function ha(e,t,r){var a=ca[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:a,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[n],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}fr({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"cdlabel",mode:r.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),a=or.wrapFragment(Ar(e.label,r,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=$e(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var r=new Ir.MathNode("mrow",[_r(e.label,t)]);return(r=new Ir.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Ir.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),fr({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=or.wrapFragment(Ar(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new Ir.MathNode("mrow",[_r(e.fragment,t)])}),fr({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,a=Kr(t[0],"ordgroup").body,n="",i=0;i<a.length;i++){n+=Kr(a[i],"textord").text}var o,l=parseInt(n);if(isNaN(l))throw new pe("\\@char has non-numeric argument "+n);if(l<0||l>=1114111)throw new pe("\\@char with invalid code point "+n);return l<=65535?o=String.fromCharCode(l):(l-=65536,o=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:o}}});var ua=(e,t)=>{var r=Mr(e.body,t.withColor(e.color),!1);return or.makeFragment(r)},pa=(e,t)=>{var r=Vr(e.body,t.withColor(e.color)),a=new Ir.MathNode("mstyle",r);return a.setAttribute("mathcolor",e.color),a};fr({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,a=Kr(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:a,body:br(n)}},htmlBuilder:ua,mathmlBuilder:pa}),fr({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:a}=e,n=Kr(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var i=r.parseExpression(!0,a);return{type:"color",mode:r.mode,color:n,body:i}},htmlBuilder:ua,mathmlBuilder:pa}),fr({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:a}=e,n="["===a.gullet.future().text?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&Kr(n,"size").value}},htmlBuilder(e,t){var r=or.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=$e(We(e.size,t)))),r},mathmlBuilder(e,t){var r=new Ir.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",$e(We(e.size,t)))),r}});var da={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},fa=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new pe("Expected a control sequence",e);return t},ga=(e,t,r,a)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,a)};fr({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var a=t.fetch();if(da[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=da[a.text]),Kr(t.parseFunction(),"internal");throw new pe("Invalid token after macro prefix",a)}}),fr({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=t.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new pe("Expected a control sequence",a);for(var i,o=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){i=t.gullet.future(),l[o].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new pe('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==o+1)throw new pe('Argument number "'+a.text+'" out of order');o++,l.push([])}else{if("EOF"===a.text)throw new pe("Expected a macro definition");l[o].push(a.text)}var{tokens:s}=t.gullet.consumeArg();return i&&s.unshift(i),"\\edef"!==r&&"\\xdef"!==r||(s=t.gullet.expandTokens(s)).reverse(),t.gullet.macros.set(n,{tokens:s,numArgs:o,delimiters:l},r===da[r]),{type:"internal",mode:t.mode}}}),fr({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=fa(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return ga(t,a,n,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),fr({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=fa(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return ga(t,a,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var va=function(e,t,r){var a=je(pt.math[e]&&pt.math[e].replace||e,t,r);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return a},ba=function(e,t,r,a){var n=r.havingBaseStyle(t),i=or.makeSpan(a.concat(n.sizingClasses(r)),[e],r),o=n.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=n.sizeMultiplier,i},ya=function(e,t,r){var a=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/a.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=$e(n),e.height-=n,e.depth+=n},xa=function(e,t,r,a,n,i){var o=function(e,t,r,a){return or.makeSymbol(e,"Size"+t+"-Regular",r,a)}(e,t,n,a),l=ba(or.makeSpan(["delimsizing","size"+t],[o],a),Ae.TEXT,a,i);return r&&ya(l,a,Ae.TEXT),l},wa=function(e,t,r){var a;return a="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:or.makeSpan(["delimsizinginner",a],[or.makeSpan([],[or.makeSymbol(e,t,r)])])}},ka=function(e,t,r){var a=Re["Size4-Regular"][e.charCodeAt(0)]?Re["Size4-Regular"][e.charCodeAt(0)][4]:Re["Size1-Regular"][e.charCodeAt(0)][4],n=new st("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new lt([n],{width:$e(a),height:$e(t),style:"width:"+$e(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=or.makeSvgSpan([],[i],r);return o.height=t,o.style.height=$e(t),o.style.width=$e(a),{type:"elem",elem:o}},Ea={type:"kern",size:-.008},Ma=["|","\\lvert","\\rvert","\\vert"],Sa=["\\|","\\lVert","\\rVert","\\Vert"],Ca=function(e,t,r,a,n,i){var o,l,s,c,m="",h=0;o=s=c=e,l=null;var u="Size1-Regular";"\\uparrow"===e?s=c="⏐":"\\Uparrow"===e?s=c="‖":"\\downarrow"===e?o=s="⏐":"\\Downarrow"===e?o=s="‖":"\\updownarrow"===e?(o="\\uparrow",s="⏐",c="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",s="‖",c="\\Downarrow"):be.contains(Ma,e)?(s="∣",m="vert",h=333):be.contains(Sa,e)?(s="∥",m="doublevert",h=556):"["===e||"\\lbrack"===e?(o="⎡",s="⎢",c="⎣",u="Size4-Regular",m="lbrack",h=667):"]"===e||"\\rbrack"===e?(o="⎤",s="⎥",c="⎦",u="Size4-Regular",m="rbrack",h=667):"\\lfloor"===e||"⌊"===e?(s=o="⎢",c="⎣",u="Size4-Regular",m="lfloor",h=667):"\\lceil"===e||"⌈"===e?(o="⎡",s=c="⎢",u="Size4-Regular",m="lceil",h=667):"\\rfloor"===e||"⌋"===e?(s=o="⎥",c="⎦",u="Size4-Regular",m="rfloor",h=667):"\\rceil"===e||"⌉"===e?(o="⎤",s=c="⎥",u="Size4-Regular",m="rceil",h=667):"("===e||"\\lparen"===e?(o="⎛",s="⎜",c="⎝",u="Size4-Regular",m="lparen",h=875):")"===e||"\\rparen"===e?(o="⎞",s="⎟",c="⎠",u="Size4-Regular",m="rparen",h=875):"\\{"===e||"\\lbrace"===e?(o="⎧",l="⎨",c="⎩",s="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",l="⎬",c="⎭",s="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",c="⎩",s="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",c="⎭",s="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",c="⎭",s="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",c="⎩",s="⎪",u="Size4-Regular");var p=va(o,u,n),d=p.height+p.depth,f=va(s,u,n),g=f.height+f.depth,v=va(c,u,n),b=v.height+v.depth,y=0,x=1;if(null!==l){var w=va(l,u,n);y=w.height+w.depth,x=2}var k=d+b+y,E=k+Math.max(0,Math.ceil((t-k)/(x*g)))*x*g,M=a.fontMetrics().axisHeight;r&&(M*=a.sizeMultiplier);var S=E/2-M,C=[];if(m.length>0){var N=E-d-b,z=Math.round(1e3*E),T=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*N)),A=new st(m,T),B=(h/1e3).toFixed(3)+"em",q=(z/1e3).toFixed(3)+"em",L=new lt([A],{width:B,height:q,viewBox:"0 0 "+h+" "+z}),O=or.makeSvgSpan([],[L],a);O.height=z/1e3,O.style.width=B,O.style.height=q,C.push({type:"elem",elem:O})}else{if(C.push(wa(c,u,n)),C.push(Ea),null===l){var H=E-d-b+.016;C.push(ka(s,H,a))}else{var I=(E-d-b-y)/2+.016;C.push(ka(s,I,a)),C.push(Ea),C.push(wa(l,u,n)),C.push(Ea),C.push(ka(s,I,a))}C.push(Ea),C.push(wa(o,u,n))}var R=a.havingBaseStyle(Ae.TEXT),F=or.makeVList({positionType:"bottom",positionData:S,children:C},R);return ba(or.makeSpan(["delimsizing","mult"],[F],R),Ae.TEXT,a,i)},Na=.08,za=function(e,t,r,a,n){var i=function(e,t,r){t*=1e3;var a="";switch(e){case"sqrtMain":a=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Oe);break;case"sqrtSize1":a=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Oe);break;case"sqrtSize2":a=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Oe);break;case"sqrtSize3":a=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,Oe);break;case"sqrtSize4":a=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,Oe);break;case"sqrtTall":a=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,Oe,r)}return a}(e,a,r),o=new st(e,i),l=new lt([o],{width:"400em",height:$e(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return or.makeSvgSpan(["hide-tail"],[l],n)},Ta=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Aa=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Ba=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],qa=[0,1.2,1.8,2.4,3],La=[{type:"small",style:Ae.SCRIPTSCRIPT},{type:"small",style:Ae.SCRIPT},{type:"small",style:Ae.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Oa=[{type:"small",style:Ae.SCRIPTSCRIPT},{type:"small",style:Ae.SCRIPT},{type:"small",style:Ae.TEXT},{type:"stack"}],Ha=[{type:"small",style:Ae.SCRIPTSCRIPT},{type:"small",style:Ae.SCRIPT},{type:"small",style:Ae.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ia=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Ra=function(e,t,r,a){for(var n=Math.min(2,3-a.style.size);n<r.length&&"stack"!==r[n].type;n++){var i=va(e,Ia(r[n]),"math"),o=i.height+i.depth;if("small"===r[n].type&&(o*=a.havingBaseStyle(r[n].style).sizeMultiplier),o>t)return r[n]}return r[r.length-1]},Fa=function(e,t,r,a,n,i){var o;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),o=be.contains(Ba,e)?La:be.contains(Ta,e)?Ha:Oa;var l=Ra(e,t,o,a);return"small"===l.type?function(e,t,r,a,n,i){var o=or.makeSymbol(e,"Main-Regular",n,a),l=ba(o,t,a,i);return r&&ya(l,a,t),l}(e,l.style,r,a,n,i):"large"===l.type?xa(e,l.size,r,a,n,i):Ca(e,t,r,a,n,i)},Da={sqrtImage:function(e,t){var r,a,n=t.havingBaseSizing(),i=Ra("\\surd",e*n.sizeMultiplier,Ha,n),o=n.sizeMultiplier,l=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),s=0,c=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),c=(1+l)/o,(r=za("sqrtMain",s=(1+l+Na)/o,m=1e3+1e3*l+80,l,t)).style.minWidth="0.853em",a=.833/o):"large"===i.type?(m=1080*qa[i.size],c=(qa[i.size]+l)/o,s=(qa[i.size]+l+Na)/o,(r=za("sqrtSize"+i.size,s,m,l,t)).style.minWidth="1.02em",a=1/o):(s=e+l+Na,c=e+l,m=Math.floor(1e3*e+l)+80,(r=za("sqrtTall",s,m,l,t)).style.minWidth="0.742em",a=1.056),r.height=c,r.style.height=$e(s),{span:r,advanceWidth:a,ruleWidth:(t.fontMetrics().sqrtRuleThickness+l)*o}},sizedDelim:function(e,t,r,a,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),be.contains(Ta,e)||be.contains(Ba,e))return xa(e,t,!1,r,a,n);if(be.contains(Aa,e))return Ca(e,qa[t],!1,r,a,n);throw new pe("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:qa,customSizedDelim:Fa,leftRightDelim:function(e,t,r,a,n,i){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,l=5/a.fontMetrics().ptPerEm,s=Math.max(t-o,r+o),c=Math.max(s/500*901,2*s-l);return Fa(e,c,!0,a,n,i)}},ja={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Va=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Pa(e,t){var r=ea(e);if(r&&be.contains(Va,r.text))return r;throw new pe(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function _a(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}fr({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=Pa(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:ja[e.funcName].size,mclass:ja[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?or.makeSpan([e.mclass]):Da.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Rr(e.delim,e.mode));var r=new Ir.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var a=$e(Da.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",a),r.setAttribute("maxsize",a),r}}),fr({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new pe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Pa(t[0],e).text,color:r}}}),fr({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Pa(t[0],e),a=e.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=Kr(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{_a(e);for(var r,a,n=Mr(e.body,t,!0,["mopen","mclose"]),i=0,o=0,l=!1,s=0;s<n.length;s++)n[s].isMiddle?l=!0:(i=Math.max(n[s].height,i),o=Math.max(n[s].depth,o));if(i*=t.sizeMultiplier,o*=t.sizeMultiplier,r="."===e.left?Tr(t,["mopen"]):Da.leftRightDelim(e.left,i,o,t,e.mode,["mopen"]),n.unshift(r),l)for(var c=1;c<n.length;c++){var m=n[c].isMiddle;m&&(n[c]=Da.leftRightDelim(m.delim,i,o,m.options,e.mode,[]))}if("."===e.right)a=Tr(t,["mclose"]);else{var h=e.rightColor?t.withColor(e.rightColor):t;a=Da.leftRightDelim(e.right,i,o,h,e.mode,["mclose"])}return n.push(a),or.makeSpan(["minner"],n,t)},mathmlBuilder:(e,t)=>{_a(e);var r=Vr(e.body,t);if("."!==e.left){var a=new Ir.MathNode("mo",[Rr(e.left,e.mode)]);a.setAttribute("fence","true"),r.unshift(a)}if("."!==e.right){var n=new Ir.MathNode("mo",[Rr(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return Fr(r)}}),fr({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Pa(t[0],e);if(!e.parser.leftrightDepth)throw new pe("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=Tr(t,[]);else{r=Da.sizedDelim(e.delim,1,t,e.mode,[]);var a={delim:e.delim,options:t};r.isMiddle=a}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?Rr("|","text"):Rr(e.delim,e.mode),a=new Ir.MathNode("mo",[r]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Ua=(e,t)=>{var r,a,n,i=or.wrapFragment(Ar(e.body,t),t),o=e.label.slice(1),l=t.sizeMultiplier,s=0,c=be.isCharacterBox(e.body);if("sout"===o)(r=or.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/l,s=-.5*t.fontMetrics().xHeight;else if("phase"===o){var m=We({number:.6,unit:"pt"},t),h=We({number:.35,unit:"ex"},t);l/=t.havingBaseSizing().sizeMultiplier;var u=i.height+i.depth+m+h;i.style.paddingLeft=$e(u/2+m);var p=Math.floor(1e3*u*l),d="M400000 "+(a=p)+" H0 L"+a/2+" 0 l65 45 L145 "+(a-80)+" H400000z",f=new lt([new st("phase",d)],{width:"400em",height:$e(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});(r=or.makeSvgSpan(["hide-tail"],[f],t)).style.height=$e(u),s=i.depth+m+h}else{/cancel/.test(o)?c||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var g=0,v=0,b=0;/box/.test(o)?(b=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),v=g=t.fontMetrics().fboxsep+("colorbox"===o?0:b)):"angl"===o?(g=4*(b=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),v=Math.max(0,.25-i.depth)):v=g=c?.2:0,r=Wr(i,o,g,v,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=$e(b)):"angl"===o&&.049!==b&&(r.style.borderTopWidth=$e(b),r.style.borderRightWidth=$e(b)),s=i.depth+v,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)n=or.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:s},{type:"elem",elem:i,shift:0}]},t);else{var y=/cancel|phase/.test(o)?["svg-align"]:[];n=or.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:s,wrapperClasses:y}]},t)}return/cancel/.test(o)&&(n.height=i.height,n.depth=i.depth),/cancel/.test(o)&&!c?or.makeSpan(["mord","cancel-lap"],[n],t):or.makeSpan(["mord"],[n],t)},Ga=(e,t)=>{var r=0,a=new Ir.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[_r(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*r+"pt"),a.setAttribute("height","+"+2*r+"pt"),a.setAttribute("lspace",r+"pt"),a.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};fr({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Kr(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:o}},htmlBuilder:Ua,mathmlBuilder:Ga}),fr({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Kr(t[0],"color-token").color,o=Kr(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:i,body:l}},htmlBuilder:Ua,mathmlBuilder:Ga}),fr({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),fr({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:Ua,mathmlBuilder:Ga}),fr({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Ya={};function Za(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,l={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},s=0;s<r.length;++s)Ya[r[s]]=l;i&&(pr[t]=i),o&&(dr[t]=o)}var Xa={};function Wa(e,t){Xa[e]=t}function $a(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}var Ja=e=>{if(!e.parser.settings.displayMode)throw new pe("{"+e.envName+"} can be used only in display mode.")};function Ka(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Qa(e,t,r){var{hskipBeforeAndAfter:a,addJot:n,cols:i,arraystretch:o,colSeparationType:l,autoTag:s,singleRow:c,emptySingleRow:m,maxNumCols:h,leqno:u}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)o=1;else if(!(o=parseFloat(p))||o<0)throw new pe("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var d=[],f=[d],g=[],v=[],b=null!=s?[]:void 0;function y(){s&&e.gullet.macros.set("\\@eqnsw","1",!0)}function x(){b&&(e.gullet.macros.get("\\df@tag")?(b.push(e.subparse([new ue("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(s)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),v.push($a(e));;){var w=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),w={type:"ordgroup",mode:e.mode,body:w},r&&(w={type:"styling",mode:e.mode,style:r,body:[w]}),d.push(w);var k=e.fetch().text;if("&"===k){if(h&&d.length===h){if(c||l)throw new pe("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===k){x(),1===d.length&&"styling"===w.type&&0===w.body[0].body.length&&(f.length>1||!m)&&f.pop(),v.length<f.length+1&&v.push([]);break}if("\\\\"!==k)throw new pe("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var E=void 0;" "!==e.gullet.future().text&&(E=e.parseSizeGroup(!0)),g.push(E?E.value:null),x(),v.push($a(e)),d=[],f.push(d),y()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:n,arraystretch:o,body:f,cols:i,rowGaps:g,hskipBeforeAndAfter:a,hLinesBeforeRow:v,colSeparationType:l,tags:b,leqno:u}}function en(e){return"d"===e.slice(0,1)?"display":"text"}var tn=function(e,t){var r,a,n=e.body.length,i=e.hLinesBeforeRow,o=0,l=new Array(n),s=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),m=1/t.fontMetrics().ptPerEm,h=5*m;e.colSeparationType&&"small"===e.colSeparationType&&(h=t.havingStyle(Ae.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var u="CD"===e.colSeparationType?We({number:3,unit:"ex"},t):12*m,p=3*m,d=e.arraystretch*u,f=.7*d,g=.3*d,v=0;function b(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),s.push({pos:v,isDashed:e[t]})}for(b(i[0]),r=0;r<e.body.length;++r){var y=e.body[r],x=f,w=g;o<y.length&&(o=y.length);var k=new Array(y.length);for(a=0;a<y.length;++a){var E=Ar(y[a],t);w<E.depth&&(w=E.depth),x<E.height&&(x=E.height),k[a]=E}var M=e.rowGaps[r],S=0;M&&(S=We(M,t))>0&&(w<(S+=g)&&(w=S),S=0),e.addJot&&(w+=p),k.height=x,k.depth=w,v+=x,k.pos=v,v+=w+S,l[r]=k,b(i[r+1])}var C,N,z=v/2+t.fontMetrics().axisHeight,T=e.cols||[],A=[],B=[];if(e.tags&&e.tags.some((e=>e)))for(r=0;r<n;++r){var q=l[r],L=q.pos-z,O=e.tags[r],H=void 0;(H=!0===O?or.makeSpan(["eqn-num"],[],t):!1===O?or.makeSpan([],[],t):or.makeSpan([],Mr(O,t,!0),t)).depth=q.depth,H.height=q.height,B.push({type:"elem",elem:H,shift:L})}for(a=0,N=0;a<o||N<T.length;++a,++N){for(var I=T[N]||{},R=!0;"separator"===I.type;){if(R||((C=or.makeSpan(["arraycolsep"],[])).style.width=$e(t.fontMetrics().doubleRuleSep),A.push(C)),"|"!==I.separator&&":"!==I.separator)throw new pe("Invalid separator type: "+I.separator);var F="|"===I.separator?"solid":"dashed",D=or.makeSpan(["vertical-separator"],[],t);D.style.height=$e(v),D.style.borderRightWidth=$e(c),D.style.borderRightStyle=F,D.style.margin="0 "+$e(-c/2);var j=v-z;j&&(D.style.verticalAlign=$e(-j)),A.push(D),I=T[++N]||{},R=!1}if(!(a>=o)){var V=void 0;(a>0||e.hskipBeforeAndAfter)&&0!==(V=be.deflt(I.pregap,h))&&((C=or.makeSpan(["arraycolsep"],[])).style.width=$e(V),A.push(C));var P=[];for(r=0;r<n;++r){var _=l[r],U=_[a];if(U){var G=_.pos-z;U.depth=_.depth,U.height=_.height,P.push({type:"elem",elem:U,shift:G})}}P=or.makeVList({positionType:"individualShift",children:P},t),P=or.makeSpan(["col-align-"+(I.align||"c")],[P]),A.push(P),(a<o-1||e.hskipBeforeAndAfter)&&0!==(V=be.deflt(I.postgap,h))&&((C=or.makeSpan(["arraycolsep"],[])).style.width=$e(V),A.push(C))}}if(l=or.makeSpan(["mtable"],A),s.length>0){for(var Y=or.makeLineSpan("hline",t,c),Z=or.makeLineSpan("hdashline",t,c),X=[{type:"elem",elem:l,shift:0}];s.length>0;){var W=s.pop(),$=W.pos-z;W.isDashed?X.push({type:"elem",elem:Z,shift:$}):X.push({type:"elem",elem:Y,shift:$})}l=or.makeVList({positionType:"individualShift",children:X},t)}if(0===B.length)return or.makeSpan(["mord"],[l],t);var J=or.makeVList({positionType:"individualShift",children:B},t);return J=or.makeSpan(["tag"],[J],t),or.makeFragment([l,J])},rn={c:"center ",l:"left ",r:"right "},an=function(e,t){for(var r=[],a=new Ir.MathNode("mtd",[],["mtr-glue"]),n=new Ir.MathNode("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var o=e.body[i],l=[],s=0;s<o.length;s++)l.push(new Ir.MathNode("mtd",[_r(o[s],t)]));e.tags&&e.tags[i]&&(l.unshift(a),l.push(a),e.leqno?l.unshift(n):l.push(n)),r.push(new Ir.MathNode("mtr",l))}var c=new Ir.MathNode("mtable",r),m=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",$e(m));var h="",u="";if(e.cols&&e.cols.length>0){var p=e.cols,d="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(h+="top ",g=1),"separator"===p[p.length-1].type&&(h+="bottom ",v-=1);for(var b=g;b<v;b++)"align"===p[b].type?(u+=rn[p[b].align],f&&(d+="none "),f=!0):"separator"===p[b].type&&f&&(d+="|"===p[b].separator?"solid ":"dashed ",f=!1);c.setAttribute("columnalign",u.trim()),/[sd]/.test(d)&&c.setAttribute("columnlines",d.trim())}if("align"===e.colSeparationType){for(var y=e.cols||[],x="",w=1;w<y.length;w++)x+=w%2?"0em ":"1em ";c.setAttribute("columnspacing",x.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var k="",E=e.hLinesBeforeRow;h+=E[0].length>0?"left ":"",h+=E[E.length-1].length>0?"right ":"";for(var M=1;M<E.length-1;M++)k+=0===E[M].length?"none ":E[M][0]?"dashed ":"solid ";return/[sd]/.test(k)&&c.setAttribute("rowlines",k.trim()),""!==h&&(c=new Ir.MathNode("menclose",[c])).setAttribute("notation",h.trim()),e.arraystretch&&e.arraystretch<1&&(c=new Ir.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},nn=function(e,t){-1===e.envName.indexOf("ed")&&Ja(e);var r,a=[],n=e.envName.indexOf("at")>-1?"alignat":"align",i="split"===e.envName,o=Qa(e.parser,{cols:a,addJot:!0,autoTag:i?void 0:Ka(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,s={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",m=0;m<t[0].body.length;m++){c+=Kr(t[0].body[m],"textord").text}r=Number(c),l=2*r}var h=!l;o.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var a=Kr(e[t],"styling");Kr(a.body[0],"ordgroup").body.unshift(s)}if(h)l<e.length&&(l=e.length);else{var n=e.length/2;if(r<n)throw new pe("Too many math in a row: expected "+r+", but got "+n,e[0])}}));for(var u=0;u<l;++u){var p="r",d=0;u%2==1?p="l":u>0&&h&&(d=1),a[u]={type:"align",align:p,pregap:d,postgap:0}}return o.colSeparationType=h?"align":"alignat",o};Za({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(ea(t[0])?[t[0]]:Kr(t[0],"ordgroup").body).map((function(e){var t=Qr(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new pe("Unknown column alignment: "+t,e)})),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Qa(e.parser,a,en(e.envName))},htmlBuilder:tn,mathmlBuilder:an}),Za({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var n=e.parser;if(n.consumeSpaces(),"["===n.fetch().text){if(n.consume(),n.consumeSpaces(),r=n.fetch().text,-1==="lcr".indexOf(r))throw new pe("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:r}]}}var i=Qa(e.parser,a,en(e.envName)),o=Math.max(0,...i.body.map((e=>e.length)));return i.cols=new Array(o).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:tn,mathmlBuilder:an}),Za({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Qa(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:tn,mathmlBuilder:an}),Za({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(ea(t[0])?[t[0]]:Kr(t[0],"ordgroup").body).map((function(e){var t=Qr(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new pe("Unknown column alignment: "+t,e)}));if(r.length>1)throw new pe("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=Qa(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new pe("{subarray} can contain only one column");return a},htmlBuilder:tn,mathmlBuilder:an}),Za({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Qa(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},en(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:tn,mathmlBuilder:an}),Za({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:nn,htmlBuilder:tn,mathmlBuilder:an}),Za({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){be.contains(["gather","gather*"],e.envName)&&Ja(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ka(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Qa(e.parser,t,"display")},htmlBuilder:tn,mathmlBuilder:an}),Za({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:nn,htmlBuilder:tn,mathmlBuilder:an}),Za({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Ja(e);var t={autoTag:Ka(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Qa(e.parser,t,"display")},htmlBuilder:tn,mathmlBuilder:an}),Za({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Ja(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new pe("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a,n,i=[],o=[i],l=0;l<t.length;l++){for(var s=t[l],c={type:"styling",body:[],mode:"math",style:"display"},m=0;m<s.length;m++)if(ma(s[m])){i.push(c);var h=Qr(s[m+=1]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(h)>-1);else{if(!("<>AV".indexOf(h)>-1))throw new pe('Expected one of "<>AV=|." after @',s[m]);for(var p=0;p<2;p++){for(var d=!0,f=m+1;f<s.length;f++){if(n=h,("mathord"===(a=s[f]).type||"atom"===a.type)&&a.text===n){d=!1,m=f;break}if(ma(s[f]))throw new pe("Missing a "+h+" character to complete a CD arrow.",s[f]);u[p].body.push(s[f])}if(d)throw new pe("Missing a "+h+" character to complete a CD arrow.",s[m])}}var g={type:"styling",body:[ha(h,u,e)],mode:"math",style:"display"};i.push(g),c={type:"styling",body:[],mode:"math",style:"display"}}else c.body.push(s[m]);l%2==0?i.push(c):i.shift(),i=[],o.push(i)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}(e.parser)),htmlBuilder:tn,mathmlBuilder:an}),Wa("\\nonumber","\\gdef\\@eqnsw{0}"),Wa("\\notag","\\nonumber"),fr({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new pe(e.funcName+" valid only within array environment")}});var on=Ya;fr({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];if("ordgroup"!==n.type)throw new pe("Invalid environment name",n);for(var i="",o=0;o<n.body.length;++o)i+=Kr(n.body[o],"textord").text;if("\\begin"===a){if(!on.hasOwnProperty(i))throw new pe("No such environment: "+i,n);var l=on[i],{args:s,optArgs:c}=r.parseArguments("\\begin{"+i+"}",l),m={mode:r.mode,envName:i,parser:r},h=l.handler(m,s,c);r.expect("\\end",!1);var u=r.nextToken,p=Kr(r.parseFunction(),"environment");if(p.name!==i)throw new pe("Mismatch: \\begin{"+i+"} matched by \\end{"+p.name+"}",u);return h}return{type:"environment",mode:r.mode,name:i,nameGroup:n}}});var ln=(e,t)=>{var r=e.font,a=t.withFont(r);return Ar(e.body,a)},sn=(e,t)=>{var r=e.font,a=t.withFont(r);return _r(e.body,a)},cn={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};fr({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=vr(t[0]),i=a;return i in cn&&(i=cn[i]),{type:"font",mode:r.mode,font:i.slice(1),body:n}},htmlBuilder:ln,mathmlBuilder:sn}),fr({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,a=t[0],n=be.isCharacterBox(a);return{type:"mclass",mode:r.mode,mclass:sa(a),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}}),fr({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a,breakOnTokenText:n}=e,{mode:i}=r,o=r.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+a.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:ln,mathmlBuilder:sn});var mn=(e,t)=>{var r=t;return"display"===e?r=r.id>=Ae.SCRIPT.id?r.text():Ae.DISPLAY:"text"===e&&r.size===Ae.DISPLAY.size?r=Ae.TEXT:"script"===e?r=Ae.SCRIPT:"scriptscript"===e&&(r=Ae.SCRIPTSCRIPT),r},hn=(e,t)=>{var r,a=mn(e.size,t.style),n=a.fracNum(),i=a.fracDen();r=t.havingStyle(n);var o=Ar(e.numer,r,t);if(e.continued){var l=8.5/t.fontMetrics().ptPerEm,s=3.5/t.fontMetrics().ptPerEm;o.height=o.height<l?l:o.height,o.depth=o.depth<s?s:o.depth}r=t.havingStyle(i);var c,m,h,u,p,d,f,g,v,b,y=Ar(e.denom,r,t);if(e.hasBarLine?(e.barSize?(m=We(e.barSize,t),c=or.makeLineSpan("frac-line",t,m)):c=or.makeLineSpan("frac-line",t),m=c.height,h=c.height):(c=null,m=0,h=t.fontMetrics().defaultRuleThickness),a.size===Ae.DISPLAY.size||"display"===e.size?(u=t.fontMetrics().num1,p=m>0?3*h:7*h,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=h):(u=t.fontMetrics().num3,p=3*h),d=t.fontMetrics().denom2),c){var x=t.fontMetrics().axisHeight;u-o.depth-(x+.5*m)<p&&(u+=p-(u-o.depth-(x+.5*m))),x-.5*m-(y.height-d)<p&&(d+=p-(x-.5*m-(y.height-d)));var w=-(x-.5*m);f=or.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:c,shift:w},{type:"elem",elem:o,shift:-u}]},t)}else{var k=u-o.depth-(y.height-d);k<p&&(u+=.5*(p-k),d+=.5*(p-k)),f=or.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:o,shift:-u}]},t)}return r=t.havingStyle(a),f.height*=r.sizeMultiplier/t.sizeMultiplier,f.depth*=r.sizeMultiplier/t.sizeMultiplier,g=a.size===Ae.DISPLAY.size?t.fontMetrics().delim1:a.size===Ae.SCRIPTSCRIPT.size?t.havingStyle(Ae.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?Tr(t,["mopen"]):Da.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(a),e.mode,["mopen"]),b=e.continued?or.makeSpan([]):null==e.rightDelim?Tr(t,["mclose"]):Da.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(a),e.mode,["mclose"]),or.makeSpan(["mord"].concat(r.sizingClasses(t)),[v,or.makeSpan(["mfrac"],[f]),b],t)},un=(e,t)=>{var r=new Ir.MathNode("mfrac",[_r(e.numer,t),_r(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var a=We(e.barSize,t);r.setAttribute("linethickness",$e(a))}}else r.setAttribute("linethickness","0px");var n=mn(e.size,t.style);if(n.size!==t.style.size){r=new Ir.MathNode("mstyle",[r]);var i=n.size===Ae.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var l=new Ir.MathNode("mo",[new Ir.TextNode(e.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}if(o.push(r),null!=e.rightDelim){var s=new Ir.MathNode("mo",[new Ir.TextNode(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}return Fr(o)}return r};fr({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:a,funcName:n}=e,i=t[0],o=t[1],l=null,s=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,l="(",s=")";break;case"\\\\bracefrac":r=!1,l="\\{",s="\\}";break;case"\\\\brackfrac":r=!1,l="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:a.mode,continued:!1,numer:i,denom:o,hasBarLine:r,leftDelim:l,rightDelim:s,size:c,barSize:null}},htmlBuilder:hn,mathmlBuilder:un}),fr({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:n,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),fr({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:a,token:n}=e;switch(a){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:n}}});var pn=["display","text","script","scriptscript"],dn=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};fr({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:a}=e,n=t[4],i=t[5],o=vr(t[0]),l="atom"===o.type&&"open"===o.family?dn(o.text):null,s=vr(t[1]),c="atom"===s.type&&"close"===s.family?dn(s.text):null,m=Kr(t[2],"size"),h=null;r=!!m.isBlank||(h=m.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Kr(p.body[0],"textord");u=pn[Number(d.text)]}}else p=Kr(p,"textord"),u=pn[Number(p.text)];return{type:"genfrac",mode:a.mode,numer:n,denom:i,continued:!1,hasBarLine:r,barSize:h,leftDelim:l,rightDelim:c,size:u}},htmlBuilder:hn,mathmlBuilder:un}),fr({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:a,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Kr(t[0],"size").value,token:n}}}),fr({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Kr(t[1],"infix").size),o=t[2],l=i.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:l,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:hn,mathmlBuilder:un});var fn=(e,t)=>{var r,a,n=t.style;"supsub"===e.type?(r=e.sup?Ar(e.sup,t.havingStyle(n.sup()),t):Ar(e.sub,t.havingStyle(n.sub()),t),a=Kr(e.base,"horizBrace")):a=Kr(e,"horizBrace");var i,o=Ar(a.base,t.havingBaseStyle(Ae.DISPLAY)),l=Jr(a,t);if(a.isOver?(i=or.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:l}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=or.makeVList({positionType:"bottom",positionData:o.depth+.1+l.height,children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var s=or.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t);i=a.isOver?or.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:r}]},t):or.makeVList({positionType:"bottom",positionData:s.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:s}]},t)}return or.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t)};fr({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"horizBrace",mode:r.mode,label:a,isOver:/^\\over/.test(a),base:t[0]}},htmlBuilder:fn,mathmlBuilder:(e,t)=>{var r=$r(e.label);return new Ir.MathNode(e.isOver?"mover":"munder",[_r(e.base,t),r])}}),fr({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[1],n=Kr(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:br(a)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Mr(e.body,t,!1);return or.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Pr(e.body,t);return r instanceof Or||(r=new Or("mrow",[r])),r.setAttribute("href",e.href),r}}),fr({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=Kr(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:a}))return r.formatUnsupportedCmd("\\url");for(var n=[],i=0;i<a.length;i++){var o=a[i];"~"===o&&(o="\\textasciitilde"),n.push({type:"textord",mode:"text",text:o})}var l={type:"text",mode:r.mode,font:"\\texttt",body:n};return{type:"href",mode:r.mode,href:a,body:br(l)}}}),fr({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:br(t[0])}},htmlBuilder(e,t){var r=Mr(e.body,t,!1);return or.makeFragment(r)},mathmlBuilder:(e,t)=>new Ir.MathNode("mrow",Vr(e.body,t))}),fr({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:a,funcName:n,token:i}=e,o=Kr(t[0],"raw").string,l=t[1];a.settings.strict&&a.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s={};switch(n){case"\\htmlClass":s.class=o,r={command:"\\htmlClass",class:o};break;case"\\htmlId":s.id=o,r={command:"\\htmlId",id:o};break;case"\\htmlStyle":s.style=o,r={command:"\\htmlStyle",style:o};break;case"\\htmlData":for(var c=o.split(","),m=0;m<c.length;m++){var h=c[m].split("=");if(2!==h.length)throw new pe("Error parsing key-value for \\htmlData");s["data-"+h[0].trim()]=h[1].trim()}r={command:"\\htmlData",attributes:s};break;default:throw new Error("Unrecognized html command")}return a.settings.isTrusted(r)?{type:"html",mode:a.mode,attributes:s,body:br(l)}:a.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=Mr(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var n=or.makeSpan(a,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&n.setAttribute(i,e.attributes[i]);return n},mathmlBuilder:(e,t)=>Pr(e.body,t)}),fr({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:br(t[0]),mathml:br(t[1])}},htmlBuilder:(e,t)=>{var r=Mr(e.html,t,!1);return or.makeFragment(r)},mathmlBuilder:(e,t)=>Pr(e.mathml,t)});var gn=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new pe("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!Xe(r))throw new pe("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};fr({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:a}=e,n={number:0,unit:"em"},i={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(r[0])for(var s=Kr(r[0],"raw").string.split(","),c=0;c<s.length;c++){var m=s[c].split("=");if(2===m.length){var h=m[1].trim();switch(m[0].trim()){case"alt":l=h;break;case"width":n=gn(h);break;case"height":i=gn(h);break;case"totalheight":o=gn(h);break;default:throw new pe("Invalid key: '"+m[0]+"' in \\includegraphics.")}}}var u=Kr(t[0],"url").url;return""===l&&(l=(l=(l=u).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:u})?{type:"includegraphics",mode:a.mode,alt:l,width:n,height:i,totalheight:o,src:u}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=We(e.height,t),a=0;e.totalheight.number>0&&(a=We(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=We(e.width,t));var i={height:$e(r+a)};n>0&&(i.width=$e(n)),a>0&&(i.verticalAlign=$e(-a));var o=new nt(e.src,e.alt,i);return o.height=r,o.depth=a,o},mathmlBuilder:(e,t)=>{var r=new Ir.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var a=We(e.height,t),n=0;if(e.totalheight.number>0&&(n=We(e.totalheight,t)-a,r.setAttribute("valign",$e(-n))),r.setAttribute("height",$e(a+n)),e.width.number>0){var i=We(e.width,t);r.setAttribute("width",$e(i))}return r.setAttribute("src",e.src),r}}),fr({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=Kr(t[0],"size");if(r.settings.strict){var i="m"===a[1],o="mu"===n.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+n.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder:(e,t)=>or.makeGlue(e.dimension,t),mathmlBuilder(e,t){var r=We(e.dimension,t);return new Ir.SpaceNode(r)}}),fr({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:a.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=or.makeSpan([],[Ar(e.body,t)]),r=or.makeSpan(["inner"],[r],t)):r=or.makeSpan(["inner"],[Ar(e.body,t)]);var a=or.makeSpan(["fix"],[]),n=or.makeSpan([e.alignment],[r,a],t),i=or.makeSpan(["strut"]);return i.style.height=$e(n.height+n.depth),n.depth&&(i.style.verticalAlign=$e(-n.depth)),n.children.unshift(i),n=or.makeSpan(["thinbox"],[n],t),or.makeSpan(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new Ir.MathNode("mpadded",[_r(e.body,t)]);if("rlap"!==e.alignment){var a="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",a+"width")}return r.setAttribute("width","0px"),r}}),fr({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:a}=e,n=a.mode;a.switchMode("math");var i="\\("===r?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}}),fr({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new pe("Mismatched "+e.funcName)}});var vn=(e,t)=>{switch(t.style.size){case Ae.DISPLAY.size:return e.display;case Ae.TEXT.size:return e.text;case Ae.SCRIPT.size:return e.script;case Ae.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};fr({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:br(t[0]),text:br(t[1]),script:br(t[2]),scriptscript:br(t[3])}},htmlBuilder:(e,t)=>{var r=vn(e,t),a=Mr(r,t,!1);return or.makeFragment(a)},mathmlBuilder:(e,t)=>{var r=vn(e,t);return Pr(r,t)}});var bn=(e,t,r,a,n,i,o)=>{e=or.makeSpan([],[e]);var l,s,c,m=r&&be.isCharacterBox(r);if(t){var h=Ar(t,a.havingStyle(n.sup()),a);s={elem:h,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-h.depth)}}if(r){var u=Ar(r,a.havingStyle(n.sub()),a);l={elem:u,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-u.height)}}if(s&&l){var p=a.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;c=or.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:$e(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:$e(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(l){var d=e.height-o;c=or.makeVList({positionType:"top",positionData:d,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:$e(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},a)}else{if(!s)return e;var f=e.depth+o;c=or.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:$e(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}var g=[c];if(l&&0!==i&&!m){var v=or.makeSpan(["mspace"],[],a);v.style.marginRight=$e(i),g.unshift(v)}return or.makeSpan(["mop","op-limits"],g,a)},yn=["\\smallint"],xn=(e,t)=>{var r,a,n,i=!1;"supsub"===e.type?(r=e.sup,a=e.sub,n=Kr(e.base,"op"),i=!0):n=Kr(e,"op");var o,l=t.style,s=!1;if(l.size===Ae.DISPLAY.size&&n.symbol&&!be.contains(yn,n.name)&&(s=!0),n.symbol){var c=s?"Size2-Regular":"Size1-Regular",m="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(m=n.name.slice(1),n.name="oiint"===m?"\\iint":"\\iiint"),o=or.makeSymbol(n.name,c,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),m.length>0){var h=o.italic,u=or.staticSvg(m+"Size"+(s?"2":"1"),t);o=or.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:u,shift:s?.08:0}]},t),n.name="\\"+m,o.classes.unshift("mop"),o.italic=h}}else if(n.body){var p=Mr(n.body,t,!0);1===p.length&&p[0]instanceof ot?(o=p[0]).classes[0]="mop":o=or.makeSpan(["mop"],p,t)}else{for(var d=[],f=1;f<n.name.length;f++)d.push(or.mathsym(n.name[f],n.mode,t));o=or.makeSpan(["mop"],d,t)}var g=0,v=0;return(o instanceof ot||"\\oiint"===n.name||"\\oiiint"===n.name)&&!n.suppressBaseShift&&(g=(o.height-o.depth)/2-t.fontMetrics().axisHeight,v=o.italic),i?bn(o,r,a,t,l,v,g):(g&&(o.style.position="relative",o.style.top=$e(g)),o)},wn=(e,t)=>{var r;if(e.symbol)r=new Or("mo",[Rr(e.name,e.mode)]),be.contains(yn,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Or("mo",Vr(e.body,t));else{r=new Or("mi",[new Hr(e.name.slice(1))]);var a=new Or("mo",[Rr("","text")]);r=e.parentIsSupSub?new Or("mrow",[r,a]):Lr([r,a])}return r},kn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};fr({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=a;return 1===n.length&&(n=kn[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:xn,mathmlBuilder:wn}),fr({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:br(a)}},htmlBuilder:xn,mathmlBuilder:wn});var En={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};fr({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:xn,mathmlBuilder:wn}),fr({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:xn,mathmlBuilder:wn}),fr({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,a=r;return 1===a.length&&(a=En[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:xn,mathmlBuilder:wn});var Mn=(e,t)=>{var r,a,n,i,o=!1;if("supsub"===e.type?(r=e.sup,a=e.sub,n=Kr(e.base,"operatorname"),o=!0):n=Kr(e,"operatorname"),n.body.length>0){for(var l=n.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),s=Mr(l,t.withFont("mathrm"),!0),c=0;c<s.length;c++){var m=s[c];m instanceof ot&&(m.text=m.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=or.makeSpan(["mop"],s,t)}else i=or.makeSpan(["mop"],[],t);return o?bn(i,r,a,t,t.style,0,0):i};function Sn(e,t,r){for(var a=Mr(e,t,!1),n=t.sizeMultiplier/r.sizeMultiplier,i=0;i<a.length;i++){var o=a[i].classes.indexOf("sizing");o<0?Array.prototype.push.apply(a[i].classes,t.sizingClasses(r)):a[i].classes[o+1]==="reset-size"+t.size&&(a[i].classes[o+1]="reset-size"+r.size),a[i].height*=n,a[i].depth*=n}return or.makeFragment(a)}fr({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:br(n),alwaysHandleSupSub:"\\operatornamewithlimits"===a,limits:!1,parentIsSupSub:!1}},htmlBuilder:Mn,mathmlBuilder:(e,t)=>{for(var r=Vr(e.body,t.withFont("mathrm")),a=!0,n=0;n<r.length;n++){var i=r[n];if(i instanceof Ir.SpaceNode);else if(i instanceof Ir.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var o=i.children[0];1===i.children.length&&o instanceof Ir.TextNode?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break;default:a=!1}else a=!1}if(a){var l=r.map((e=>e.toText())).join("");r=[new Ir.TextNode(l)]}var s=new Ir.MathNode("mi",r);s.setAttribute("mathvariant","normal");var c=new Ir.MathNode("mo",[Rr("","text")]);return e.parentIsSupSub?new Ir.MathNode("mrow",[s,c]):Ir.newDocumentFragment([s,c])}}),Wa("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),gr({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?or.makeFragment(Mr(e.body,t,!1)):or.makeSpan(["mord"],Mr(e.body,t,!0),t),mathmlBuilder:(e,t)=>Pr(e.body,t,!0)}),fr({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,a=t[0];return{type:"overline",mode:r.mode,body:a}},htmlBuilder(e,t){var r=Ar(e.body,t.havingCrampedStyle()),a=or.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,i=or.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},t);return or.makeSpan(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new Ir.MathNode("mo",[new Ir.TextNode("‾")]);r.setAttribute("stretchy","true");var a=new Ir.MathNode("mover",[_r(e.body,t),r]);return a.setAttribute("accent","true"),a}}),fr({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"phantom",mode:r.mode,body:br(a)}},htmlBuilder:(e,t)=>{var r=Mr(e.body,t.withPhantom(),!1);return or.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=Vr(e.body,t);return new Ir.MathNode("mphantom",r)}}),fr({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"hphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=or.makeSpan([],[Ar(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var a=0;a<r.children.length;a++)r.children[a].height=0,r.children[a].depth=0;return r=or.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),or.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>{var r=Vr(br(e.body),t),a=new Ir.MathNode("mphantom",r),n=new Ir.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}}),fr({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"vphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=or.makeSpan(["inner"],[Ar(e.body,t.withPhantom())]),a=or.makeSpan(["fix"],[]);return or.makeSpan(["mord","rlap"],[r,a],t)},mathmlBuilder:(e,t)=>{var r=Vr(br(e.body),t),a=new Ir.MathNode("mphantom",r),n=new Ir.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}}),fr({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,a=Kr(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:a,body:n}},htmlBuilder(e,t){var r=Ar(e.body,t),a=We(e.dy,t);return or.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new Ir.MathNode("mpadded",[_r(e.body,t)]),a=e.dy.number+e.dy.unit;return r.setAttribute("voffset",a),r}}),fr({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),fr({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:a}=e,n=r[0],i=Kr(t[0],"size"),o=Kr(t[1],"size");return{type:"rule",mode:a.mode,shift:n&&Kr(n,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=or.makeSpan(["mord","rule"],[],t),a=We(e.width,t),n=We(e.height,t),i=e.shift?We(e.shift,t):0;return r.style.borderRightWidth=$e(a),r.style.borderTopWidth=$e(n),r.style.bottom=$e(i),r.width=a,r.height=n+i,r.depth=-i,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=We(e.width,t),a=We(e.height,t),n=e.shift?We(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new Ir.MathNode("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",$e(r)),o.setAttribute("height",$e(a));var l=new Ir.MathNode("mpadded",[o]);return n>=0?l.setAttribute("height",$e(n)):(l.setAttribute("height",$e(n)),l.setAttribute("depth",$e(-n))),l.setAttribute("voffset",$e(n)),l}});var Cn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];fr({type:"sizing",names:Cn,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:Cn.indexOf(a)+1,body:i}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return Sn(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),a=Vr(e.body,r),n=new Ir.MathNode("mstyle",a);return n.setAttribute("mathsize",$e(r.sizeMultiplier)),n}}),fr({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:a}=e,n=!1,i=!1,o=r[0]&&Kr(r[0],"ordgroup");if(o)for(var l="",s=0;s<o.body.length;++s){if("t"===(l=o.body[s].text))n=!0;else{if("b"!==l){n=!1,i=!1;break}i=!0}}else n=!0,i=!0;var c=t[0];return{type:"smash",mode:a.mode,body:c,smashHeight:n,smashDepth:i}},htmlBuilder:(e,t)=>{var r=or.makeSpan([],[Ar(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var a=0;a<r.children.length;a++)r.children[a].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].depth=0;var i=or.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return or.makeSpan(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var r=new Ir.MathNode("mpadded",[_r(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),fr({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a}=e,n=r[0],i=t[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(e,t){var r=Ar(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=or.wrapFragment(r,t);var a=t.fontMetrics().defaultRuleThickness,n=a;t.style.id<Ae.TEXT.id&&(n=t.fontMetrics().xHeight);var i=a+n/4,o=r.height+r.depth+i+a,{span:l,ruleWidth:s,advanceWidth:c}=Da.sqrtImage(o,t),m=l.height-s;m>r.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var h=l.height-r.height-i-s;r.style.paddingLeft=$e(c);var u=or.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+h)},{type:"elem",elem:l},{type:"kern",size:s}]},t);if(e.index){var p=t.havingStyle(Ae.SCRIPTSCRIPT),d=Ar(e.index,p,t),f=.6*(u.height-u.depth),g=or.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:d}]},t),v=or.makeSpan(["root"],[g]);return or.makeSpan(["mord","sqrt"],[v,u],t)}return or.makeSpan(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:r,index:a}=e;return a?new Ir.MathNode("mroot",[_r(r,t),_r(a,t)]):new Ir.MathNode("msqrt",[_r(r,t)])}});var Nn={display:Ae.DISPLAY,text:Ae.TEXT,script:Ae.SCRIPT,scriptscript:Ae.SCRIPTSCRIPT};fr({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!0,r),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:i}},htmlBuilder(e,t){var r=Nn[e.style],a=t.havingStyle(r).withFont("");return Sn(e.body,a,t)},mathmlBuilder(e,t){var r=Nn[e.style],a=t.havingStyle(r),n=Vr(e.body,a),i=new Ir.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});gr({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===Ae.DISPLAY.size||r.alwaysHandleSupSub)?xn:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===Ae.DISPLAY.size||r.limits)?Mn:null:"accent"===r.type?be.isCharacterBox(r.base)?ta:null:"horizBrace"===r.type&&!e.sub===r.isOver?fn:null:null}(e,t);if(r)return r(e,t);var a,n,i,{base:o,sup:l,sub:s}=e,c=Ar(o,t),m=t.fontMetrics(),h=0,u=0,p=o&&be.isCharacterBox(o);if(l){var d=t.havingStyle(t.style.sup());a=Ar(l,d,t),p||(h=c.height-d.fontMetrics().supDrop*d.sizeMultiplier/t.sizeMultiplier)}if(s){var f=t.havingStyle(t.style.sub());n=Ar(s,f,t),p||(u=c.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===Ae.DISPLAY?m.sup1:t.style.cramped?m.sup3:m.sup2;var g,v=t.sizeMultiplier,b=$e(.5/m.ptPerEm/v),y=null;if(n){var x=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof ot||x)&&(y=$e(-c.italic))}if(a&&n){h=Math.max(h,i,a.depth+.25*m.xHeight),u=Math.max(u,m.sub2);var w=4*m.defaultRuleThickness;if(h-a.depth-(n.height-u)<w){u=w-(h-a.depth)+n.height;var k=.8*m.xHeight-(h-a.depth);k>0&&(h+=k,u-=k)}var E=[{type:"elem",elem:n,shift:u,marginRight:b,marginLeft:y},{type:"elem",elem:a,shift:-h,marginRight:b}];g=or.makeVList({positionType:"individualShift",children:E},t)}else if(n){u=Math.max(u,m.sub1,n.height-.8*m.xHeight);var M=[{type:"elem",elem:n,marginLeft:y,marginRight:b}];g=or.makeVList({positionType:"shift",positionData:u,children:M},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");h=Math.max(h,i,a.depth+.25*m.xHeight),g=or.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:a,marginRight:b}]},t)}var S=zr(c,"right")||"mord";return or.makeSpan([S],[c,or.makeSpan(["msupsub"],[g])],t)},mathmlBuilder(e,t){var r,a=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(a=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,i=[_r(e.base,t)];if(e.sub&&i.push(_r(e.sub,t)),e.sup&&i.push(_r(e.sup,t)),a)n=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;n=o&&"op"===o.type&&o.limits&&t.style===Ae.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===Ae.DISPLAY||o.limits)?"munderover":"msubsup"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===Ae.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===Ae.DISPLAY)?"munder":"msub"}else{var s=e.base;n=s&&"op"===s.type&&s.limits&&(t.style===Ae.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===Ae.DISPLAY)?"mover":"msup"}return new Ir.MathNode(n,i)}}),gr({type:"atom",htmlBuilder:(e,t)=>or.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new Ir.MathNode("mo",[Rr(e.text,e.mode)]);if("bin"===e.family){var a=Dr(e,t);"bold-italic"===a&&r.setAttribute("mathvariant",a)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var zn={mi:"italic",mn:"normal",mtext:"normal"};gr({type:"mathord",htmlBuilder:(e,t)=>or.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var r=new Ir.MathNode("mi",[Rr(e.text,e.mode,t)]),a=Dr(e,t)||"italic";return a!==zn[r.type]&&r.setAttribute("mathvariant",a),r}}),gr({type:"textord",htmlBuilder:(e,t)=>or.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var r,a=Rr(e.text,e.mode,t),n=Dr(e,t)||"normal";return r="text"===e.mode?new Ir.MathNode("mtext",[a]):/[0-9]/.test(e.text)?new Ir.MathNode("mn",[a]):"\\prime"===e.text?new Ir.MathNode("mo",[a]):new Ir.MathNode("mi",[a]),n!==zn[r.type]&&r.setAttribute("mathvariant",n),r}});var Tn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},An={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};gr({type:"spacing",htmlBuilder(e,t){if(An.hasOwnProperty(e.text)){var r=An[e.text].className||"";if("text"===e.mode){var a=or.makeOrd(e,t,"textord");return a.classes.push(r),a}return or.makeSpan(["mspace",r],[or.mathsym(e.text,e.mode,t)],t)}if(Tn.hasOwnProperty(e.text))return or.makeSpan(["mspace",Tn[e.text]],[],t);throw new pe('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!An.hasOwnProperty(e.text)){if(Tn.hasOwnProperty(e.text))return new Ir.MathNode("mspace");throw new pe('Unknown type of space "'+e.text+'"')}return new Ir.MathNode("mtext",[new Ir.TextNode(" ")])}});var Bn=()=>{var e=new Ir.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};gr({type:"tag",mathmlBuilder(e,t){var r=new Ir.MathNode("mtable",[new Ir.MathNode("mtr",[Bn(),new Ir.MathNode("mtd",[Pr(e.body,t)]),Bn(),new Ir.MathNode("mtd",[Pr(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var qn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ln={"\\textbf":"textbf","\\textmd":"textmd"},On={"\\textit":"textit","\\textup":"textup"},Hn=(e,t)=>{var r=e.font;return r?qn[r]?t.withTextFontFamily(qn[r]):Ln[r]?t.withTextFontWeight(Ln[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(On[r]):t};fr({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"text",mode:r.mode,body:br(n),font:a}},htmlBuilder(e,t){var r=Hn(e,t),a=Mr(e.body,r,!0);return or.makeSpan(["mord","text"],a,r)},mathmlBuilder(e,t){var r=Hn(e,t);return Pr(e.body,r)}}),fr({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Ar(e.body,t),a=or.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=or.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:r}]},t);return or.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new Ir.MathNode("mo",[new Ir.TextNode("‾")]);r.setAttribute("stretchy","true");var a=new Ir.MathNode("munder",[_r(e.body,t),r]);return a.setAttribute("accentunder","true"),a}}),fr({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Ar(e.body,t),a=t.fontMetrics().axisHeight,n=.5*(r.height-a-(r.depth+a));return or.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:(e,t)=>new Ir.MathNode("mpadded",[_r(e.body,t)],["vcenter"])}),fr({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new pe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=In(e),a=[],n=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];"~"===o&&(o="\\textasciitilde"),a.push(or.makeSymbol(o,"Typewriter-Regular",e.mode,n,["mord","texttt"]))}return or.makeSpan(["mord","text"].concat(n.sizingClasses(t)),or.tryCombineChars(a),n)},mathmlBuilder(e,t){var r=new Ir.TextNode(In(e)),a=new Ir.MathNode("mtext",[r]);return a.setAttribute("mathvariant","monospace"),a}});var In=e=>e.body.replace(/ /g,e.star?"␣":" "),Rn=ur,Fn="[ \r\n\t]",Dn="(\\\\[a-zA-Z@]+)"+Fn+"*",jn="[̀-ͯ]",Vn=new RegExp(jn+"+$"),Pn="("+Fn+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+jn+"*|[\ud800-\udbff][\udc00-\udfff]"+jn+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Dn+"|\\\\[^\ud800-\udfff])";class _n{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Pn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new ue("EOF",new he(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new pe("Unexpected character: '"+e[t]+"'",new ue(e[t],new he(this,t,t+1)));var a=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[a]){var n=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===n?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=n+1,this.lex()}return new ue(a,new he(this,t,this.tokenRegex.lastIndex))}}class Un{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new pe("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Gn=Xa;Wa("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Wa("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Wa("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Wa("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Wa("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Wa("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Wa("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Yn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Wa("\\char",(function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new pe("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=Yn[r.text])||a>=t)throw new pe("Invalid base-"+t+" digit "+r.text);for(var n;null!=(n=Yn[e.future().text])&&n<t;)a*=t,a+=n,e.popToken()}return"\\@char{"+a+"}"}));var Zn=(e,t,r,a)=>{var n=e.consumeArg().tokens;if(1!==n.length)throw new pe("\\newcommand's first argument must be a macro name");var i=n[0].text,o=e.isDefined(i);if(o&&!t)throw new pe("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!o&&!r)throw new pe("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var l=0;if(1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var s="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)s+=c.text,c=e.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new pe("Invalid number of arguments: "+s);l=parseInt(s),n=e.consumeArg().tokens}return o&&a||e.macros.set(i,{tokens:n,numArgs:l}),""};Wa("\\newcommand",(e=>Zn(e,!1,!0,!1))),Wa("\\renewcommand",(e=>Zn(e,!0,!1,!1))),Wa("\\providecommand",(e=>Zn(e,!0,!0,!0))),Wa("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Wa("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Wa("\\show",(e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Rn[r],pt.math[r],pt.text[r]),""})),Wa("\\bgroup","{"),Wa("\\egroup","}"),Wa("~","\\nobreakspace"),Wa("\\lq","`"),Wa("\\rq","'"),Wa("\\aa","\\r a"),Wa("\\AA","\\r A"),Wa("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Wa("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Wa("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Wa("ℬ","\\mathscr{B}"),Wa("ℰ","\\mathscr{E}"),Wa("ℱ","\\mathscr{F}"),Wa("ℋ","\\mathscr{H}"),Wa("ℐ","\\mathscr{I}"),Wa("ℒ","\\mathscr{L}"),Wa("ℳ","\\mathscr{M}"),Wa("ℛ","\\mathscr{R}"),Wa("ℭ","\\mathfrak{C}"),Wa("ℌ","\\mathfrak{H}"),Wa("ℨ","\\mathfrak{Z}"),Wa("\\Bbbk","\\Bbb{k}"),Wa("·","\\cdotp"),Wa("\\llap","\\mathllap{\\textrm{#1}}"),Wa("\\rlap","\\mathrlap{\\textrm{#1}}"),Wa("\\clap","\\mathclap{\\textrm{#1}}"),Wa("\\mathstrut","\\vphantom{(}"),Wa("\\underbar","\\underline{\\text{#1}}"),Wa("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Wa("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Wa("\\ne","\\neq"),Wa("≠","\\neq"),Wa("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Wa("∉","\\notin"),Wa("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Wa("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Wa("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Wa("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Wa("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Wa("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Wa("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Wa("⟂","\\perp"),Wa("‼","\\mathclose{!\\mkern-0.8mu!}"),Wa("∌","\\notni"),Wa("⌜","\\ulcorner"),Wa("⌝","\\urcorner"),Wa("⌞","\\llcorner"),Wa("⌟","\\lrcorner"),Wa("©","\\copyright"),Wa("®","\\textregistered"),Wa("️","\\textregistered"),Wa("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Wa("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Wa("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Wa("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Wa("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Wa("⋮","\\vdots"),Wa("\\varGamma","\\mathit{\\Gamma}"),Wa("\\varDelta","\\mathit{\\Delta}"),Wa("\\varTheta","\\mathit{\\Theta}"),Wa("\\varLambda","\\mathit{\\Lambda}"),Wa("\\varXi","\\mathit{\\Xi}"),Wa("\\varPi","\\mathit{\\Pi}"),Wa("\\varSigma","\\mathit{\\Sigma}"),Wa("\\varUpsilon","\\mathit{\\Upsilon}"),Wa("\\varPhi","\\mathit{\\Phi}"),Wa("\\varPsi","\\mathit{\\Psi}"),Wa("\\varOmega","\\mathit{\\Omega}"),Wa("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Wa("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Wa("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Wa("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Wa("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Wa("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Wa("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Wa("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Xn={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Wa("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Xn?t=Xn[r]:("\\not"===r.slice(0,4)||r in pt.math&&be.contains(["bin","rel"],pt.math[r].group))&&(t="\\dotsb"),t}));var Wn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Wa("\\dotso",(function(e){return e.future().text in Wn?"\\ldots\\,":"\\ldots"})),Wa("\\dotsc",(function(e){var t=e.future().text;return t in Wn&&","!==t?"\\ldots\\,":"\\ldots"})),Wa("\\cdots",(function(e){return e.future().text in Wn?"\\@cdots\\,":"\\@cdots"})),Wa("\\dotsb","\\cdots"),Wa("\\dotsm","\\cdots"),Wa("\\dotsi","\\!\\cdots"),Wa("\\dotsx","\\ldots\\,"),Wa("\\DOTSI","\\relax"),Wa("\\DOTSB","\\relax"),Wa("\\DOTSX","\\relax"),Wa("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Wa("\\,","\\tmspace+{3mu}{.1667em}"),Wa("\\thinspace","\\,"),Wa("\\>","\\mskip{4mu}"),Wa("\\:","\\tmspace+{4mu}{.2222em}"),Wa("\\medspace","\\:"),Wa("\\;","\\tmspace+{5mu}{.2777em}"),Wa("\\thickspace","\\;"),Wa("\\!","\\tmspace-{3mu}{.1667em}"),Wa("\\negthinspace","\\!"),Wa("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Wa("\\negthickspace","\\tmspace-{5mu}{.277em}"),Wa("\\enspace","\\kern.5em "),Wa("\\enskip","\\hskip.5em\\relax"),Wa("\\quad","\\hskip1em\\relax"),Wa("\\qquad","\\hskip2em\\relax"),Wa("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Wa("\\tag@paren","\\tag@literal{({#1})}"),Wa("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new pe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Wa("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Wa("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Wa("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Wa("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Wa("\\newline","\\\\\\relax"),Wa("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var $n=$e(Re["Main-Regular"]["T".charCodeAt(0)][1]-.7*Re["Main-Regular"]["A".charCodeAt(0)][1]);Wa("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+$n+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Wa("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+$n+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Wa("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Wa("\\@hspace","\\hskip #1\\relax"),Wa("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Wa("\\ordinarycolon",":"),Wa("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Wa("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Wa("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Wa("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Wa("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Wa("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Wa("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Wa("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Wa("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Wa("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Wa("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Wa("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Wa("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Wa("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Wa("∷","\\dblcolon"),Wa("∹","\\eqcolon"),Wa("≔","\\coloneqq"),Wa("≕","\\eqqcolon"),Wa("⩴","\\Coloneqq"),Wa("\\ratio","\\vcentcolon"),Wa("\\coloncolon","\\dblcolon"),Wa("\\colonequals","\\coloneqq"),Wa("\\coloncolonequals","\\Coloneqq"),Wa("\\equalscolon","\\eqqcolon"),Wa("\\equalscoloncolon","\\Eqqcolon"),Wa("\\colonminus","\\coloneq"),Wa("\\coloncolonminus","\\Coloneq"),Wa("\\minuscolon","\\eqcolon"),Wa("\\minuscoloncolon","\\Eqcolon"),Wa("\\coloncolonapprox","\\Colonapprox"),Wa("\\coloncolonsim","\\Colonsim"),Wa("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Wa("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Wa("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Wa("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Wa("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Wa("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Wa("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Wa("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Wa("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Wa("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Wa("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Wa("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Wa("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Wa("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Wa("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Wa("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Wa("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Wa("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Wa("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Wa("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Wa("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Wa("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Wa("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Wa("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Wa("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Wa("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Wa("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Wa("\\imath","\\html@mathml{\\@imath}{ı}"),Wa("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Wa("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Wa("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Wa("⟦","\\llbracket"),Wa("⟧","\\rrbracket"),Wa("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Wa("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Wa("⦃","\\lBrace"),Wa("⦄","\\rBrace"),Wa("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Wa("⦵","\\minuso"),Wa("\\darr","\\downarrow"),Wa("\\dArr","\\Downarrow"),Wa("\\Darr","\\Downarrow"),Wa("\\lang","\\langle"),Wa("\\rang","\\rangle"),Wa("\\uarr","\\uparrow"),Wa("\\uArr","\\Uparrow"),Wa("\\Uarr","\\Uparrow"),Wa("\\N","\\mathbb{N}"),Wa("\\R","\\mathbb{R}"),Wa("\\Z","\\mathbb{Z}"),Wa("\\alef","\\aleph"),Wa("\\alefsym","\\aleph"),Wa("\\Alpha","\\mathrm{A}"),Wa("\\Beta","\\mathrm{B}"),Wa("\\bull","\\bullet"),Wa("\\Chi","\\mathrm{X}"),Wa("\\clubs","\\clubsuit"),Wa("\\cnums","\\mathbb{C}"),Wa("\\Complex","\\mathbb{C}"),Wa("\\Dagger","\\ddagger"),Wa("\\diamonds","\\diamondsuit"),Wa("\\empty","\\emptyset"),Wa("\\Epsilon","\\mathrm{E}"),Wa("\\Eta","\\mathrm{H}"),Wa("\\exist","\\exists"),Wa("\\harr","\\leftrightarrow"),Wa("\\hArr","\\Leftrightarrow"),Wa("\\Harr","\\Leftrightarrow"),Wa("\\hearts","\\heartsuit"),Wa("\\image","\\Im"),Wa("\\infin","\\infty"),Wa("\\Iota","\\mathrm{I}"),Wa("\\isin","\\in"),Wa("\\Kappa","\\mathrm{K}"),Wa("\\larr","\\leftarrow"),Wa("\\lArr","\\Leftarrow"),Wa("\\Larr","\\Leftarrow"),Wa("\\lrarr","\\leftrightarrow"),Wa("\\lrArr","\\Leftrightarrow"),Wa("\\Lrarr","\\Leftrightarrow"),Wa("\\Mu","\\mathrm{M}"),Wa("\\natnums","\\mathbb{N}"),Wa("\\Nu","\\mathrm{N}"),Wa("\\Omicron","\\mathrm{O}"),Wa("\\plusmn","\\pm"),Wa("\\rarr","\\rightarrow"),Wa("\\rArr","\\Rightarrow"),Wa("\\Rarr","\\Rightarrow"),Wa("\\real","\\Re"),Wa("\\reals","\\mathbb{R}"),Wa("\\Reals","\\mathbb{R}"),Wa("\\Rho","\\mathrm{P}"),Wa("\\sdot","\\cdot"),Wa("\\sect","\\S"),Wa("\\spades","\\spadesuit"),Wa("\\sub","\\subset"),Wa("\\sube","\\subseteq"),Wa("\\supe","\\supseteq"),Wa("\\Tau","\\mathrm{T}"),Wa("\\thetasym","\\vartheta"),Wa("\\weierp","\\wp"),Wa("\\Zeta","\\mathrm{Z}"),Wa("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Wa("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Wa("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Wa("\\bra","\\mathinner{\\langle{#1}|}"),Wa("\\ket","\\mathinner{|{#1}\\rangle}"),Wa("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Wa("\\Bra","\\left\\langle#1\\right|"),Wa("\\Ket","\\left|#1\\right\\rangle");var Jn=e=>t=>{var r=t.consumeArg().tokens,a=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),l=t.macros.get("\\|");t.macros.beginGroup();var s=t=>r=>{e&&(r.macros.set("|",o),n.length&&r.macros.set("\\|",l));var i=t;!t&&n.length&&("|"===r.future().text&&(r.popToken(),i=!0));return{tokens:i?n:a,numArgs:0}};t.macros.set("|",s(!1)),n.length&&t.macros.set("\\|",s(!0));var c=t.consumeArg().tokens,m=t.expandTokens([...i,...c,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};Wa("\\bra@ket",Jn(!1)),Wa("\\bra@set",Jn(!0)),Wa("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Wa("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Wa("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Wa("\\angln","{\\angl n}"),Wa("\\blue","\\textcolor{##6495ed}{#1}"),Wa("\\orange","\\textcolor{##ffa500}{#1}"),Wa("\\pink","\\textcolor{##ff00af}{#1}"),Wa("\\red","\\textcolor{##df0030}{#1}"),Wa("\\green","\\textcolor{##28ae7b}{#1}"),Wa("\\gray","\\textcolor{gray}{#1}"),Wa("\\purple","\\textcolor{##9d38bd}{#1}"),Wa("\\blueA","\\textcolor{##ccfaff}{#1}"),Wa("\\blueB","\\textcolor{##80f6ff}{#1}"),Wa("\\blueC","\\textcolor{##63d9ea}{#1}"),Wa("\\blueD","\\textcolor{##11accd}{#1}"),Wa("\\blueE","\\textcolor{##0c7f99}{#1}"),Wa("\\tealA","\\textcolor{##94fff5}{#1}"),Wa("\\tealB","\\textcolor{##26edd5}{#1}"),Wa("\\tealC","\\textcolor{##01d1c1}{#1}"),Wa("\\tealD","\\textcolor{##01a995}{#1}"),Wa("\\tealE","\\textcolor{##208170}{#1}"),Wa("\\greenA","\\textcolor{##b6ffb0}{#1}"),Wa("\\greenB","\\textcolor{##8af281}{#1}"),Wa("\\greenC","\\textcolor{##74cf70}{#1}"),Wa("\\greenD","\\textcolor{##1fab54}{#1}"),Wa("\\greenE","\\textcolor{##0d923f}{#1}"),Wa("\\goldA","\\textcolor{##ffd0a9}{#1}"),Wa("\\goldB","\\textcolor{##ffbb71}{#1}"),Wa("\\goldC","\\textcolor{##ff9c39}{#1}"),Wa("\\goldD","\\textcolor{##e07d10}{#1}"),Wa("\\goldE","\\textcolor{##a75a05}{#1}"),Wa("\\redA","\\textcolor{##fca9a9}{#1}"),Wa("\\redB","\\textcolor{##ff8482}{#1}"),Wa("\\redC","\\textcolor{##f9685d}{#1}"),Wa("\\redD","\\textcolor{##e84d39}{#1}"),Wa("\\redE","\\textcolor{##bc2612}{#1}"),Wa("\\maroonA","\\textcolor{##ffbde0}{#1}"),Wa("\\maroonB","\\textcolor{##ff92c6}{#1}"),Wa("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Wa("\\maroonD","\\textcolor{##ca337c}{#1}"),Wa("\\maroonE","\\textcolor{##9e034e}{#1}"),Wa("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Wa("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Wa("\\purpleC","\\textcolor{##aa87ff}{#1}"),Wa("\\purpleD","\\textcolor{##7854ab}{#1}"),Wa("\\purpleE","\\textcolor{##543b78}{#1}"),Wa("\\mintA","\\textcolor{##f5f9e8}{#1}"),Wa("\\mintB","\\textcolor{##edf2df}{#1}"),Wa("\\mintC","\\textcolor{##e0e5cc}{#1}"),Wa("\\grayA","\\textcolor{##f6f7f7}{#1}"),Wa("\\grayB","\\textcolor{##f0f1f2}{#1}"),Wa("\\grayC","\\textcolor{##e3e5e6}{#1}"),Wa("\\grayD","\\textcolor{##d6d8da}{#1}"),Wa("\\grayE","\\textcolor{##babec2}{#1}"),Wa("\\grayF","\\textcolor{##888d93}{#1}"),Wa("\\grayG","\\textcolor{##626569}{#1}"),Wa("\\grayH","\\textcolor{##3b3e40}{#1}"),Wa("\\grayI","\\textcolor{##21242c}{#1}"),Wa("\\kaBlue","\\textcolor{##314453}{#1}"),Wa("\\kaGreen","\\textcolor{##71B307}{#1}");var Kn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Qn{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Un(Gn,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new _n(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,a;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:a,end:r}=this.consumeArg(["]"]))}else({tokens:a,start:t,end:r}=this.consumeArg());return this.pushToken(new ue("EOF",r.loc)),this.pushTokens(a),t.range(r,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,n=this.future(),i=0,o=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++i;else if("}"===a.text){if(-1===--i)throw new pe("Extra }",a)}else if("EOF"===a.text)throw new pe("Unexpected end of input in a macro argument, expected '"+(e&&r?e[o]:"}")+"'",a);if(e&&r)if((0===i||1===i&&"{"===e[o])&&a.text===e[o]){if(++o===e.length){t.splice(-o,o);break}}else o=0}while(0!==i||r);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:a}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new pe("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;a<r.length;a++){var n=this.popToken();if(r[a]!==n.text)throw new pe("Use of the macro doesn't match its definition",n)}}for(var i=[],o=0;o<e;o++)i.push(this.consumeArg(t&&t[o+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new pe("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,a=t.noexpand?null:this._getExpansion(r);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===r[0]&&!this.isDefined(r))throw new pe("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var n=a.tokens,i=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var o=(n=n.slice()).length-1;o>=0;--o){var l=n[o];if("#"===l.text){if(0===o)throw new pe("Incomplete placeholder at end of macro body",l);if("#"===(l=n[--o]).text)n.splice(o+1,1);else{if(!/^[1-9]$/.test(l.text))throw new pe("Not a valid argument number",l);n.splice(o,2,...i[+l.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ue(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),t.push(a)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var a="function"==typeof t?t(this):t;if("string"==typeof a){var n=0;if(-1!==a.indexOf("#"))for(var i=a.replace(/##/g,"");-1!==i.indexOf("#"+(n+1));)++n;for(var o=new _n(a,this.settings),l=[],s=o.lex();"EOF"!==s.text;)l.push(s),s=o.lex();return l.reverse(),{tokens:l,numArgs:n}}return a}isDefined(e){return this.macros.has(e)||Rn.hasOwnProperty(e)||pt.math.hasOwnProperty(e)||pt.text.hasOwnProperty(e)||Kn.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Rn.hasOwnProperty(e)&&!Rn[e].primitive}}var ei=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ti=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),ri={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},ai={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class ni{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Qn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new pe("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ue("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==ni.endOfExpression.indexOf(a.text))break;if(t&&a.text===t)break;if(e&&Rn[a.text]&&Rn[a.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==r)throw new pe("only one infix operator per group",e[a].token);r=a,t=e[a].replaceWith}if(-1!==r&&t){var n,i,o=e.slice(0,r),l=e.slice(r+1);return n=1===o.length&&"ordgroup"===o[0].type?o[0]:{type:"ordgroup",mode:this.mode,body:o},i=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[n,e[r],i],[]):this.callFunction(t,[n,i],[])]}return e}handleSupSubscript(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();var a=this.parseGroup(e);if(!a)throw new pe("Expected group after '"+r+"'",t);return a}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var a={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]}}parseAtom(e){var t,r,a=this.parseGroup("atom",e);if("text"===this.mode)return a;for(;;){this.consumeSpaces();var n=this.fetch();if("\\limits"===n.text||"\\nolimits"===n.text){if(a&&"op"===a.type){var i="\\limits"===n.text;a.limits=i,a.alwaysHandleSupSub=!0}else{if(!a||"operatorname"!==a.type)throw new pe("Limit controls must follow a math operator",n);a.alwaysHandleSupSub&&(a.limits="\\limits"===n.text)}this.consume()}else if("^"===n.text){if(t)throw new pe("Double superscript",n);t=this.handleSupSubscript("superscript")}else if("_"===n.text){if(r)throw new pe("Double subscript",n);r=this.handleSupSubscript("subscript")}else if("'"===n.text){if(t)throw new pe("Double superscript",n);var o={type:"textord",mode:this.mode,text:"\\prime"},l=[o];for(this.consume();"'"===this.fetch().text;)l.push(o),this.consume();"^"===this.fetch().text&&l.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:l}}else{if(!ti[n.text])break;var s=ei.test(n.text),c=[];for(c.push(new ue(ti[n.text])),this.consume();;){var m=this.fetch().text;if(!ti[m])break;if(ei.test(m)!==s)break;c.unshift(new ue(ti[m])),this.consume()}var h=this.subparse(c);s?r={type:"ordgroup",mode:"math",body:h}:t={type:"ordgroup",mode:"math",body:h}}}return t||r?{type:"supsub",mode:this.mode,base:a,sup:t,sub:r}:a}parseFunction(e,t){var r=this.fetch(),a=r.text,n=Rn[a];if(!n)return null;if(this.consume(),t&&"atom"!==t&&!n.allowedInArgument)throw new pe("Got function '"+a+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!n.allowedInText)throw new pe("Can't use function '"+a+"' in text mode",r);if("math"===this.mode&&!1===n.allowedInMath)throw new pe("Can't use function '"+a+"' in math mode",r);var{args:i,optArgs:o}=this.parseArguments(a,n);return this.callFunction(a,i,o,r,e)}callFunction(e,t,r,a,n){var i={funcName:e,parser:this,token:a,breakOnTokenText:n},o=Rn[e];if(o&&o.handler)return o.handler(i,t,r);throw new pe("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var a=[],n=[],i=0;i<r;i++){var o=t.argTypes&&t.argTypes[i],l=i<t.numOptionalArgs;(t.primitive&&null==o||"sqrt"===t.type&&1===i&&null==n[0])&&(o="primitive");var s=this.parseGroupOfType("argument to '"+e+"'",o,l);if(l)n.push(s);else{if(null==s)throw new pe("Null argument, please report this as a bug");a.push(s)}}return{args:a,optArgs:n}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var a=this.parseArgumentGroup(r,"text");return null!=a?{type:"styling",mode:a.mode,body:[a],style:"text"}:null;case"raw":var n=this.parseStringGroup("raw",r);return null!=n?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(r)throw new pe("A primitive argument cannot be optional");var i=this.parseGroup(e);if(null==i)throw new pe("Expected group as "+e,this.fetch());return i;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new pe("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var r=this.gullet.scanArgument(t);if(null==r)return null;for(var a,n="";"EOF"!==(a=this.fetch()).text;)n+=a.text,this.consume();return this.consume(),r.text=n,r}parseRegexGroup(e,t){for(var r,a=this.fetch(),n=a,i="";"EOF"!==(r=this.fetch()).text&&e.test(i+r.text);)i+=(n=r).text,this.consume();if(""===i)throw new pe("Invalid "+t+": '"+a.text+"'",a);return a.range(n,i)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new pe("Invalid color: '"+t.text+"'",t);var a=r[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}parseSizeGroup(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",r=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!a)throw new pe("Invalid size: '"+t.text+"'",t);var n={number:+(a[1]+a[2]),unit:a[3]};if(!Xe(n))throw new pe("Invalid unit: '"+n.unit+"'",t);return{type:"size",mode:this.mode,value:n,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){var r=this.gullet.scanArgument(e);if(null==r)return null;var a=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var n=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:r.loc,body:n};return t&&this.switchMode(a),i}parseGroup(e,t){var r,a=this.fetch(),n=a.text;if("{"===n||"\\begingroup"===n){this.consume();var i="{"===n?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,i),l=this.fetch();this.expect(i),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:he.range(a,l),body:o,semisimple:"\\begingroup"===n||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===n[0]&&!Kn.hasOwnProperty(n)){if(this.settings.throwOnError)throw new pe("Undefined control sequence: "+n,a);r=this.formatUnsupportedCmd(n),this.consume()}return r}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var a=e[r],n=a.text;"-"===n&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:he.range(a,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:he.range(a,e[r+1]),text:"--"}),t-=1)),"'"!==n&&"`"!==n||e[r+1].text!==n||(e.splice(r,2,{type:"textord",mode:"text",loc:he.range(a,e[r+1]),text:n+n}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),a="*"===r.charAt(0);if(a&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new pe("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:a}}ai.hasOwnProperty(t[0])&&!pt[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=ai[t[0]]+t.slice(1));var n,i=Vn.exec(t);if(i&&("i"===(t=t.substring(0,i.index))?t="ı":"j"===t&&(t="ȷ")),pt[this.mode][t]){this.settings.strict&&"math"===this.mode&&Gt.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var o,l=pt[this.mode][t].group,s=he.range(e);if(ht.hasOwnProperty(l)){var c=l;o={type:"atom",mode:this.mode,family:c,loc:s,text:t}}else o={type:l,mode:this.mode,loc:s,text:t};n=o}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(Le(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),n={type:"textord",mode:"text",loc:he.range(e),text:t}}if(this.consume(),i)for(var m=0;m<i[0].length;m++){var h=i[0][m];if(!ri[h])throw new pe("Unknown accent ' "+h+"'",e);var u=ri[h][this.mode]||ri[h].text;if(!u)throw new pe("Accent "+h+" unsupported in "+this.mode+" mode",e);n={type:"accent",mode:this.mode,loc:he.range(e),label:u,isStretchy:!1,isShifty:!0,base:n}}return n}}ni.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var ii=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new ni(e,t);delete r.gullet.macros.current["\\df@tag"];var a=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new pe("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:r.subparse([new ue("\\df@tag")])}]}return a};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."));var oi=function(e,t,r){if(r.throwOnError||!(e instanceof pe))throw e;var a=or.makeSpan(["katex-error"],[new ot(t)]);return a.setAttribute("title",e.toString()),a.setAttribute("style","color:"+r.errorColor),a},li=function(e,t){var r=new we(t);try{return function(e,t,r){var a,n=Gr(r);if("mathml"===r.output)return Ur(e,t,n,r.displayMode,!0);if("html"===r.output){var i=qr(e,n);a=or.makeSpan(["katex"],[i])}else{var o=Ur(e,t,n,r.displayMode,!1),l=qr(e,n);a=or.makeSpan(["katex"],[o,l])}return Yr(a,r)}(ii(e,r),e,r)}catch(t){return oi(t,e,r)}},si=function(e,t){return li(e,t).toMarkup()},ci=function(t){var r=t.textObject.equation.expression,a=e.useMemo((function(){return si(r,{throwOnError:!1,output:"mathml"})}),[r]);return e.createElement("span",{className:"rotion-richtext-equation",dangerouslySetInnerHTML:{__html:a}})},mi=function(t){var r=t.textObject;if(!r)return e.createElement(e.Fragment,null);var a=r.type,n=r.plain_text;switch(a){case"text":return e.createElement(me,{textObject:r});case"mention":return e.createElement(le,{textObject:r},n);case"equation":return e.createElement(ci,{textObject:r});default:return e.createElement(e.Fragment,null)}},hi=function(t){var r=t.textObjects;return e.createElement("div",{className:"rotion-gallery-title"},r.map((function(t,r){return e.createElement(mi,{key:"richtext-".concat(r),textObject:t})})))},ui=function(t){var r=t.date;if(null===r)return e.createElement(e.Fragment,null);var a=r.start,n=r.end,i=e.useState(""),o=i[0],l=i[1],s=e.useState(""),c=s[0],m=s[1];return e.useEffect((function(){var e,t=h(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),r=t.dateF,i=t.timeF;l(ee(a).format(a.length>10?"".concat(r," ").concat(i):r)),n&&m(ee(n).format(n.length>10?"".concat(r," ").concat(i):r))}),[o,c]),e.createElement("div",{className:"rotion-gallery-date"},o,n&&" → ".concat(c))},pi=function(t){var r=t.textObjects,a=t.size;return e.createElement("div",{className:"rotion-gallery-richtext rotion-gallery-richtext-".concat(a||"medium")},r.map((function(t,r){return e.createElement(mi,{key:"richtext-".concat(r),textObject:t})})))},di=function(t){var r=t.pathname,a=t.link,n=t.query,i=t.children,o=n?{pathname:r,query:n}:r;if(!o)return e.createElement("span",{className:"rotion-gallery-multiselect-tag"},i);if(a){var l=a;return e.createElement(l,{className:"rotion-gallery-multiselect-tag rotion-gallery-multiselect-link",href:o},i)}return e.createElement("a",{className:"rotion-gallery-multiselect-tag rotion-gallery-multiselect-link",href:r},i)},fi=function(t){var r=t.multiSelect,a=t.options||{},n=a.pathname,i=a.link,o=a.query;return e.createElement("ul",{className:"rotion-gallery-multiselect-ul"},r.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-gallery-multiselect-li rotion-gallery-multiselect-".concat(t.color)},e.createElement(di,{pathname:n?"".concat(n,"/").concat(encodeURIComponent(t.name)):void 0,link:i,query:o},t.name))})))},gi=function(t){var r=t.url;if(!r)return e.createElement(e.Fragment,null);var a=u(r),n=a.domain,i=a.omittedPath;return e.createElement("div",{className:"rotion-gallery-url"},e.createElement("a",{className:"rotion-gallery-url-link",href:r,rel:"noreferrer",target:"_blank"},e.createElement("svg",{className:"rotion-gallery-url-chain",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.4 3h3.085a3.4 3.4 0 0 1 3.4 3.4v.205A3.4 3.4 0 0 1 7.485 10H7V9h.485A2.4 2.4 0 0 0 9.88 6.61V6.4A2.4 2.4 0 0 0 7.49 4H4.4A2.4 2.4 0 0 0 2 6.4v.205A2.394 2.394 0 0 0 4 8.96v1a3.4 3.4 0 0 1-3-3.35V6.4A3.405 3.405 0 0 1 4.4 3zM12 7.04v-1a3.4 3.4 0 0 1 3 3.36v.205A3.405 3.405 0 0 1 11.605 13h-3.09A3.4 3.4 0 0 1 5.12 9.61V9.4A3.4 3.4 0 0 1 8.515 6H9v1h-.485A2.4 2.4 0 0 0 6.12 9.4v.205A2.4 2.4 0 0 0 8.515 12h3.09A2.4 2.4 0 0 0 14 9.61V9.4a2.394 2.394 0 0 0-2-2.36z"})),e.createElement("span",{className:"rotion-gallery-url-domain"},n),e.createElement("span",{className:"rotion-gallery-url-path"},i)))},vi=function(){return e.createElement("div",{className:"rotion-checkbox-checked"},e.createElement("div",{className:"rotion-checkbox-checked-inner"},e.createElement("svg",{className:"rotion-checkbox-checked-checkbox",viewBox:"0 0 14 14"},e.createElement("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"}))))},bi=function(){return e.createElement("div",{className:"rotion-checkbox-unchecked"},e.createElement("svg",{className:"rotion-checkbox-unchecked-checkbox",viewBox:"0 0 16 16"},e.createElement("path",{d:"M1.5,1.5 L1.5,14.5 L14.5,14.5 L14.5,1.5 L1.5,1.5 Z M0,0 L16,0 L16,16 L0,16 L0,0 Z"})))},yi=function(t){return t.bool?e.createElement(vi,null):e.createElement(bi,null)},xi=function(t){var r=t.prefix,a=t.suffix,n=t.children;return e.createElement(e.Fragment,null,r&&e.createElement("span",{className:"rotion-prefix"},r),n,a&&e.createElement("span",{className:"rotion-suffix"},a))},wi=function(t){var r=t.checked,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-gallery-checkbox"},e.createElement(xi,{prefix:n,suffix:i},e.createElement(yi,{bool:r})))},ki=function(t){var r=t.number,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-gallery-number"},e.createElement(xi,{prefix:n,suffix:i},r))},Ei=function(t){var r=t.pathname,a=t.link,n=t.query,i=t.children;if(!r)return e.createElement("span",{className:"rotion-gallery-select-tag"},i);if(a){var o=n?{pathname:r,query:n}:r,l=a;return e.createElement(l,{className:"rotion-gallery-select-tag rotion-gallery-select-link",href:o},i)}return e.createElement("a",{className:"rotion-gallery-select-tag rotion-gallery-select-link",href:r},i)},Mi=function(t){var r=t.select,a=t.options,n=r.name,i=r.color,o=a||{},l=o.pathname,s=o.link,c=o.query;return e.createElement("div",{className:"rotion-gallery-select"},e.createElement("span",{className:"rotion-gallery-select-wrapper rotion-gallery-select-".concat(i)},e.createElement(Ei,{pathname:l?"".concat(l,"/").concat(encodeURIComponent(n)):void 0,link:s,query:c},n)))},Si=function(t){var r=t.number,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-gallery-formula"},e.createElement(xi,{prefix:n,suffix:i},r))},Ci=function(t){var r=t.property,a=t.options;if(!r||!r.type)return console.log("property empty in gallery handler: ",r),e.createElement(e.Fragment,null);switch(r.type){case"title":return e.createElement(hi,{textObjects:r.title});case"rich_text":return e.createElement(pi,{textObjects:r.rich_text});case"multi_select":return e.createElement(fi,{multiSelect:r.multi_select,options:a});case"select":return e.createElement(Mi,{select:r.select,options:a});case"date":return e.createElement(ui,{date:r.date});case"url":return e.createElement(gi,{url:r.url});case"checkbox":return e.createElement(wi,{checked:r.checkbox,options:a});case"number":return e.createElement(ki,{number:r.number,options:a});case"formula":return e.createElement(Si,{number:r.formula.number,options:a});default:return console.log("unsupport database property:",r),e.createElement(e.Fragment,null)}},Ni=function(t){var r=t.children,a=t.link,n=t.query,i=t.pathname;if(i&&a&&n){var o=a;return e.createElement(o,{className:"rotion-gallery-card rotion-gallery-link",href:{pathname:i,query:n}},r)}if(i&&a){o=a;return e.createElement(o,{className:"rotion-gallery-card rotion-gallery-link",href:i},r)}return i?e.createElement("a",{className:"rotion-gallery-card rotion-gallery-link",href:i},r):e.createElement("div",{className:"rotion-gallery-card"},r)},zi={small:"100px",medium:"146px",large:"180px"},Ti=function(t){var r=t.src,a=t.options||{},n=a.size,i=a.height,o=a.fit,l="";return l=n&&i?"string"==typeof i?i:i[n]:zi[n||"medium"],e.createElement("div",{className:"rotion-gallery-preview",style:{height:l}},e.createElement("img",{src:r,className:"rotion-gallery-preview-img rotion-gallery-preview-".concat(o?"fit":"nofit"),style:{height:l}}))};function Ai(e,t,r){if(!r)return t;var a=r||{},n=a.href,i=a.prefix,o=a.suffix;return n&&n[e]&&(t.pathname=n[e]),i&&i[e]&&(t.prefix=i[e]),o&&o[e]&&(t.suffix=o[e]),t}var Bi=function(t){var r,a=t.keys,n=t.page,i=t.options,o=function(e){for(var t in e.properties)if("title"===e.properties[t].type)return t}(n);if(!o)return e.createElement(e.Fragment,null);var l=i||{},m=l.href,h=l.link,u=l.query,p=l.image,d={link:h,query:u};if(m&&m[o]){var f=s(m[o]),g=f[0],v=f[1];d.pathname=""===v?g:"".concat(g).concat(c(v,n))}return e.createElement(Ni,{pathname:d.pathname,link:h,query:u},(null==p?void 0:p.preview)&&(null===(r=n.cover)||void 0===r?void 0:r.src)&&e.createElement(Ti,{src:n.cover.src,options:p}),e.createElement("div",{className:"rotion-gallery-card-text"},a.map((function(t,r){return e.createElement("div",{key:"".concat(n.id).concat(t),className:"field".concat(r)},e.createElement(Ci,{property:n.properties[t],options:Ai(t,structuredClone(d),i)}))}))))},qi=function(t){var r=t.textObjects,a=t.options,n=function(){return"rotion-list-title-wrapper ".concat((null==a?void 0:a.pathname)?"rotion-list-title-link":"")};if((null==a?void 0:a.link)&&(null==a?void 0:a.pathname)&&(null==a?void 0:a.query)){var i=a.link;return e.createElement(i,{className:n(),href:{pathname:a.pathname,query:a.query}},r.map((function(t,r){return e.createElement(mi,{key:"richtext-".concat(r),textObject:t})})))}if((null==a?void 0:a.link)&&(null==a?void 0:a.pathname)){i=a.link;return e.createElement(i,{className:n(),href:a.pathname},r.map((function(t,r){return e.createElement(mi,{key:"richtext-".concat(r),textObject:t})})))}return(null==a?void 0:a.pathname)?e.createElement("a",{className:n(),href:a.pathname},r.map((function(t,r){return e.createElement(mi,{key:"richtext-".concat(r),textObject:t})}))):e.createElement("span",{className:n()},r.map((function(t,r){return e.createElement(mi,{key:"richtext-".concat(r),textObject:t})})))},Li=function(t){var r=t.textObjects,a=t.options;return e.createElement("div",{className:"rotion-list-title"},e.createElement(qi,{textObjects:r,options:a}))},Oi=function(t){var r=t.date;if(null===r)return e.createElement(e.Fragment,null);var a=r.start,n=r.end,i=e.useState(""),o=i[0],l=i[1],s=e.useState(""),c=s[0],m=s[1];return e.useEffect((function(){var e,t=h(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),r=t.dateF,i=t.timeF;l(ee(a).format(a.length>10?"".concat(r," ").concat(i):r)),n&&m(ee(n).format(n.length>10?"".concat(r," ").concat(i):r))}),[o,c]),e.createElement("div",{className:"rotion-list-date"},o,n&&" → ".concat(c))},Hi=function(t){var r=t.textObjects;return e.createElement("div",{className:"rotion-list-richtext"},r.map((function(t,r){return e.createElement(mi,{key:"richtext-".concat(r),textObject:t})})))},Ii=function(t){var r=t.color,a=t.pathname,n=t.link,i=t.query,o=t.children,l=i?{pathname:a,query:i}:a,s=function(e){return"rotion-list-multiselect-wrapper ".concat(l?"rotion-list-multiselect-link":""," rotion-list-multiselect-").concat(e)};if(!l)return e.createElement("span",{className:s(r)},o);if(n){var c=n;return e.createElement(c,{className:s(r),href:l},o)}return e.createElement("a",{className:s(r),href:a},o)},Ri=function(t){var r=t.multiSelect,a=t.options;if(!r)return e.createElement(e.Fragment,null);var n=a||{},i=n.pathname,o=n.link,l=n.query;return e.createElement("ul",{className:"rotion-list-multiselect-ul"},r.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-list-multiselect-li"},e.createElement(Ii,{pathname:i?"".concat(i,"/").concat(encodeURIComponent(t.name)):void 0,color:t.color,link:o,query:l},t.name))})))},Fi=function(t){var r=t.color,a=t.pathname,n=t.link,i=t.query,o=t.children,l=i?{pathname:a,query:i}:a,s=function(e){return"rotion-list-select-wrapper ".concat(l?"rotion-list-select-link":""," rotion-list-select-").concat(e)};if(!l)return e.createElement("span",{className:s(r)},o);if(n){var c=n;return e.createElement(c,{className:s(r),href:l},o)}return e.createElement("a",{className:s(r),href:a},o)},Di=function(t){var r=t.select,a=t.options;if(!r)return e.createElement(e.Fragment,null);var n=r.name,i=r.color,o=a||{},l=o.pathname,s=o.link,c=o.query;return e.createElement("div",{className:"rotion-list-select"},e.createElement(Fi,{pathname:l?"".concat(l,"/").concat(encodeURIComponent(n)):void 0,color:i,link:s,query:c},n))},ji=function(t){var r=t.url;if(!r)return e.createElement(e.Fragment,null);var a=u(r),n=a.domain,i=a.omittedPath;return e.createElement("div",{className:"rotion-list-url"},e.createElement("a",{className:"rotion-list-url-link",href:r,rel:"noreferrer",target:"_blank"},e.createElement("svg",{className:"rotion-list-url-chain",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.4 3h3.085a3.4 3.4 0 0 1 3.4 3.4v.205A3.4 3.4 0 0 1 7.485 10H7V9h.485A2.4 2.4 0 0 0 9.88 6.61V6.4A2.4 2.4 0 0 0 7.49 4H4.4A2.4 2.4 0 0 0 2 6.4v.205A2.394 2.394 0 0 0 4 8.96v1a3.4 3.4 0 0 1-3-3.35V6.4A3.405 3.405 0 0 1 4.4 3zM12 7.04v-1a3.4 3.4 0 0 1 3 3.36v.205A3.405 3.405 0 0 1 11.605 13h-3.09A3.4 3.4 0 0 1 5.12 9.61V9.4A3.4 3.4 0 0 1 8.515 6H9v1h-.485A2.4 2.4 0 0 0 6.12 9.4v.205A2.4 2.4 0 0 0 8.515 12h3.09A2.4 2.4 0 0 0 14 9.61V9.4a2.394 2.394 0 0 0-2-2.36z"})),e.createElement("span",{className:"rotion-list-url-domain"},n),e.createElement("span",{className:"rotion-list-url-path"},i)))},Vi=function(t){var r=t.checked,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-list-checkbox"},e.createElement(xi,{prefix:n,suffix:i},e.createElement(yi,{bool:r})))},Pi=function(t){var r=t.number,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-list-number"},e.createElement(xi,{prefix:n,suffix:i},r))},_i=function(t){var r=t.number,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-list-formula"},e.createElement(xi,{prefix:n,suffix:i},r))},Ui=function(t){var r=t.property,a=t.options;if(!r||!r.type)return console.log("property empty in table handler: ",r),e.createElement(e.Fragment,null);switch(r.type){case"title":return e.createElement(Li,{textObjects:r.title,options:a});case"rich_text":return e.createElement(Hi,{textObjects:r.rich_text});case"url":return e.createElement(ji,{url:r.url});case"date":return e.createElement(Oi,{date:r.date});case"multi_select":return e.createElement(Ri,{multiSelect:r.multi_select,options:a});case"checkbox":return e.createElement(Vi,{checked:r.checkbox,options:a});case"number":return e.createElement(Pi,{number:r.number,options:a});case"select":return e.createElement(Di,{select:r.select,options:a});case"formula":return e.createElement(_i,{number:r.formula.number,options:a});default:return console.log("unsupport database property:",r),e.createElement(e.Fragment,null)}},Gi=function(t){var r=t.name,a=t.page,n=t.options;if("spacer"===r||"dashed"===r||!("properties"in a))return e.createElement(e.Fragment,null);var i=a.properties[r];if(!i)return e.createElement(e.Fragment,null);var o=n||{},l=o.href,m=o.prefix,h=o.suffix,u={link:o.link,query:o.query};if(l&&l[r]){var p=s(l[r]),d=p[0],f=p[1];u.pathname=""===f?d:"".concat(d).concat(c(f,a))}return m&&m[r]&&(u.prefix=m[r]),h&&h[r]&&(u.suffix=h[r]),e.createElement(Ui,{property:i,options:u})};function Yi(e,t){var r=["rotion-list-column".concat(t)];switch(e){case"spacer":r.push("rotion-list-spacer");break;case"dashed":r.push("rotion-list-dashed")}return r.join(" ")}var Zi=function(t){var r=t.type,a=t.className;switch(r){case"title":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M7.73943662,8.6971831 C7.77640845,8.7834507 7.81338028,8.8943662 7.81338028,9.00528169 C7.81338028,9.49823944 7.40669014,9.89260563 6.91373239,9.89260563 C6.53169014,9.89260563 6.19894366,9.64612676 6.08802817,9.30105634 L5.75528169,8.33978873 L2.05809859,8.33978873 L1.72535211,9.30105634 C1.61443662,9.64612676 1.2693662,9.89260563 0.887323944,9.89260563 C0.394366197,9.89260563 0,9.49823944 0,9.00528169 C0,8.8943662 0.0246478873,8.7834507 0.0616197183,8.6971831 L2.46478873,2.48591549 C2.68661972,1.90669014 3.24119718,1.5 3.90669014,1.5 C4.55985915,1.5 5.12676056,1.90669014 5.34859155,2.48591549 L7.73943662,8.6971831 Z M2.60035211,6.82394366 L5.21302817,6.82394366 L3.90669014,3.10211268 L2.60035211,6.82394366 Z M11.3996479,3.70598592 C12.7552817,3.70598592 14,4.24823944 14,5.96126761 L14,9.07922535 C14,9.52288732 13.6549296,9.89260563 13.2112676,9.89260563 C12.8169014,9.89260563 12.471831,9.59683099 12.4225352,9.19014085 C12.028169,9.6584507 11.3257042,9.95422535 10.5492958,9.95422535 C9.60035211,9.95422535 8.47887324,9.31338028 8.47887324,7.98239437 C8.47887324,6.58978873 9.60035211,6.08450704 10.5492958,6.08450704 C11.3380282,6.08450704 12.040493,6.33098592 12.4348592,6.81161972 L12.4348592,5.98591549 C12.4348592,5.38204225 11.9172535,4.98767606 11.1285211,4.98767606 C10.6602113,4.98767606 10.2411972,5.11091549 9.80985915,5.38204225 C9.72359155,5.43133803 9.61267606,5.46830986 9.50176056,5.46830986 C9.18133803,5.46830986 8.91021127,5.1971831 8.91021127,4.86443662 C8.91021127,4.64260563 9.0334507,4.44542254 9.19366197,4.34683099 C9.87147887,3.90316901 10.6232394,3.70598592 11.3996479,3.70598592 Z M11.1778169,8.8943662 C11.6830986,8.8943662 12.1760563,8.72183099 12.4348592,8.37676056 L12.4348592,7.63732394 C12.1760563,7.29225352 11.6830986,7.11971831 11.1778169,7.11971831 C10.5616197,7.11971831 10.056338,7.45246479 10.056338,8.0193662 C10.056338,8.57394366 10.5616197,8.8943662 11.1778169,8.8943662 Z M0.65625,11.125 L13.34375,11.125 C13.7061869,11.125 14,11.4188131 14,11.78125 C14,12.1436869 13.7061869,12.4375 13.34375,12.4375 L0.65625,12.4375 C0.293813133,12.4375 4.43857149e-17,12.1436869 0,11.78125 C-4.43857149e-17,11.4188131 0.293813133,11.125 0.65625,11.125 Z"}));case"date":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"}));case"rich_text":return e.createElement("svg",{viewBox:"0 0 16 16",className:a},e.createElement("path",{d:"M1.56738 3.25879H14.4258C14.7676 3.25879 15.0479 2.97852 15.0479 2.63672C15.0479 2.29492 14.7744 2.02148 14.4258 2.02148H1.56738C1.21875 2.02148 0.952148 2.29492 0.952148 2.63672C0.952148 2.97852 1.22559 3.25879 1.56738 3.25879ZM1.56738 6.84082H14.4258C14.7676 6.84082 15.0479 6.56055 15.0479 6.21875C15.0479 5.87695 14.7744 5.60352 14.4258 5.60352H1.56738C1.21875 5.60352 0.952148 5.87695 0.952148 6.21875C0.952148 6.56055 1.22559 6.84082 1.56738 6.84082ZM1.56738 10.4229H14.4258C14.7676 10.4229 15.0479 10.1426 15.0479 9.80078C15.0479 9.45898 14.7744 9.18555 14.4258 9.18555H1.56738C1.21875 9.18555 0.952148 9.45898 0.952148 9.80078C0.952148 10.1426 1.22559 10.4229 1.56738 10.4229ZM1.56738 14.0049H8.75879C9.10059 14.0049 9.38086 13.7246 9.38086 13.3828C9.38086 13.041 9.10742 12.7676 8.75879 12.7676H1.56738C1.21875 12.7676 0.952148 13.041 0.952148 13.3828C0.952148 13.7246 1.22559 14.0049 1.56738 14.0049Z"}));case"multi_select":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M4,3 C4,2.447715 4.447715,2 5,2 L12,2 C12.5523,2 13,2.447716 13,3 C13,3.55228 12.5523,4 12,4 L5,4 C4.447715,4 4,3.55228 4,3 Z M4,7 C4,6.447715 4.447715,6 5,6 L12,6 C12.5523,6 13,6.447716 13,7 C13,7.55228 12.5523,8 12,8 L5,8 C4.447715,8 4,7.55228 4,7 Z M4,11 C4,10.447715 4.447715,10 5,10 L12,10 C12.5523,10 13,10.447716 13,11 C13,11.55228 12.5523,12 12,12 L5,12 C4.447715,12 4,11.55228 4,11 Z M2,4 C1.44771525,4 1,3.55228475 1,3 C1,2.44771525 1.44771525,2 2,2 C2.55228475,2 3,2.44771525 3,3 C3,3.55228475 2.55228475,4 2,4 Z M2,8 C1.44771525,8 1,7.55228475 1,7 C1,6.44771525 1.44771525,6 2,6 C2.55228475,6 3,6.44771525 3,7 C3,7.55228475 2.55228475,8 2,8 Z M2,12 C1.44771525,12 1,11.5522847 1,11 C1,10.4477153 1.44771525,10 2,10 C2.55228475,10 3,10.4477153 3,11 C3,11.5522847 2.55228475,12 2,12 Z"}));case"url":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M3.73333,3.86667 L7.46667,3.86667 C8.49613,3.86667 9.33333,4.70387 9.33333,5.73333 C9.33333,6.7628 8.49613,7.6 7.46667,7.6 L6.53333,7.6 C6.01813,7.6 5.6,8.0186 5.6,8.53333 C5.6,9.04807 6.01813,9.46667 6.53333,9.46667 L7.46667,9.46667 C9.5284,9.46667 11.2,7.79507 11.2,5.73333 C11.2,3.6716 9.5284,2 7.46667,2 L3.73333,2 C1.6716,2 0,3.6716 0,5.73333 C0,7.124 0.762067,8.33453 1.88953,8.97713 C1.87553,8.83107 1.86667,8.6836 1.86667,8.53333 C1.86667,7.92013 1.98753,7.33447 2.2036,6.7978 C1.99267,6.4954 1.86667,6.12953 1.86667,5.73333 C1.86667,4.70387 2.70387,3.86667 3.73333,3.86667 Z M12.1095,5.28907 C12.1231,5.4356 12.1333,5.58307 12.1333,5.73333 C12.1333,6.34607 12.0101,6.9294 11.7931,7.46513 C12.0059,7.768 12.1333,8.13573 12.1333,8.53333 C12.1333,9.5628 11.2961,10.4 10.2667,10.4 L6.53333,10.4 C5.50387,10.4 4.66667,9.5628 4.66667,8.53333 C4.66667,7.50387 5.50387,6.66667 6.53333,6.66667 L7.46667,6.66667 C7.98187,6.66667 8.4,6.24807 8.4,5.73333 C8.4,5.2186 7.98187,4.8 7.46667,4.8 L6.53333,4.8 C4.4716,4.8 2.8,6.4716 2.8,8.53333 C2.8,10.59507 4.4716,12.2667 6.53333,12.2667 L10.2667,12.2667 C12.3284,12.2667 14,10.59507 14,8.53333 C14,7.14267 13.2375,5.93167 12.1095,5.28907 Z"}));case"number":return e.createElement("svg",{viewBox:"0 0 16 16",className:a},e.createElement("path",{d:"M2.4834 10.9902H4.33594L3.75488 13.8887C3.74121 13.9639 3.72754 14.0664 3.72754 14.1416C3.72754 14.5381 3.99414 14.7637 4.39746 14.7637C4.81445 14.7637 5.09473 14.5449 5.18359 14.1143L5.80566 10.9902H8.79297L8.21191 13.8887C8.19824 13.9639 8.18457 14.0664 8.18457 14.1416C8.18457 14.5381 8.45117 14.7637 8.85449 14.7637C9.27148 14.7637 9.55176 14.5449 9.63379 14.1143L10.2627 10.9902H12.4502C12.9287 10.9902 13.2432 10.6758 13.2432 10.2109C13.2432 9.8418 12.9902 9.56836 12.6006 9.56836H10.5498L11.2129 6.28711H13.3662C13.8379 6.28711 14.1523 5.96582 14.1523 5.50098C14.1523 5.13184 13.9062 4.8584 13.5098 4.8584H11.5L12.0195 2.27441C12.0264 2.21973 12.0469 2.11035 12.0469 2.01465C12.0469 1.625 11.7666 1.39258 11.3633 1.39258C10.9053 1.39258 10.6797 1.63867 10.5977 2.05566L10.0303 4.8584H7.04297L7.5625 2.27441C7.57617 2.21973 7.58984 2.11035 7.58984 2.01465C7.58984 1.625 7.30957 1.39258 6.91309 1.39258C6.44824 1.39258 6.21582 1.63867 6.13379 2.05566L5.57324 4.8584H3.54297C3.06445 4.8584 2.75 5.18652 2.75 5.65137C2.75 6.03418 3.00293 6.28711 3.39258 6.28711H5.28613L4.62305 9.56836H2.63379C2.15527 9.56836 1.84082 9.89648 1.84082 10.3613C1.84082 10.7373 2.09375 10.9902 2.4834 10.9902ZM6.09277 9.56836L6.75586 6.28711H9.74316L9.08008 9.56836H6.09277Z"}));case"checkbox":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M0,3 C0,1.34314 1.34326,0 3,0 L11,0 C12.6567,0 14,1.34314 14,3 L14,11 C14,12.6569 12.6567,14 11,14 L3,14 C1.34326,14 0,12.6569 0,11 L0,3 Z M3,1.5 C2.17139,1.5 1.5,2.17157 1.5,3 L1.5,11 C1.5,11.8284 2.17139,12.5 3,12.5 L11,12.5 C11.8286,12.5 12.5,11.8284 12.5,11 L12.5,3 C12.5,2.17157 11.8286,1.5 11,1.5 L3,1.5 Z M2.83252,6.8161 L3.39893,6.27399 L3.57617,6.10425 L3.92334,5.77216 L4.26904,6.10559 L4.44531,6.27582 L5.58398,7.37402 L9.28271,3.81073 L9.45996,3.64008 L9.80664,3.3056 L10.1538,3.63989 L10.3311,3.81067 L10.8936,4.35303 L11.0708,4.52399 L11.4434,4.88379 L11.0708,5.24353 L10.8936,5.41437 L6.1084,10.0291 L5.93115,10.2 L5.58398,10.5344 L5.23682,10.2 L5.05957,10.0292 L2.83057,7.87946 L2.65283,7.70801 L2.27832,7.34674 L2.6543,6.98694 L2.83252,6.8161 Z"}));case"select":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M7,13 C10.31348,13 13,10.31371 13,7 C13,3.68629 10.31348,1 7,1 C3.68652,1 1,3.68629 1,7 C1,10.31371 3.68652,13 7,13 Z M3.75098,5.32278 C3.64893,5.19142 3.74268,5 3.90869,5 L10.09131,5 C10.25732,5 10.35107,5.19142 10.24902,5.32278 L7.15771,9.29703 C7.07764,9.39998 6.92236,9.39998 6.84229,9.29703 L3.75098,5.32278 Z"}));case"status":return e.createElement("svg",{viewBox:"0 0 16 16",className:a},e.createElement("path",{d:"M8.75488 1.02344C8.75488 0.613281 8.41309 0.264648 8.00293 0.264648C7.59277 0.264648 7.25098 0.613281 7.25098 1.02344V3.11523C7.25098 3.51855 7.59277 3.86719 8.00293 3.86719C8.41309 3.86719 8.75488 3.51855 8.75488 3.11523V1.02344ZM3.91504 5.0293C4.20215 5.31641 4.69434 5.32324 4.97461 5.03613C5.26855 4.74902 5.26855 4.25684 4.98145 3.96973L3.53906 2.52051C3.25195 2.2334 2.7666 2.21973 2.47949 2.50684C2.19238 2.79395 2.18555 3.28613 2.47266 3.57324L3.91504 5.0293ZM10.9629 4.01758C10.6826 4.30469 10.6826 4.79688 10.9697 5.08398C11.2568 5.37109 11.749 5.36426 12.0361 5.07715L13.4854 3.62793C13.7725 3.34082 13.7725 2.84863 13.4785 2.55469C13.1982 2.27441 12.7061 2.27441 12.4189 2.56152L10.9629 4.01758ZM15.0234 8.78906C15.4336 8.78906 15.7822 8.44727 15.7822 8.03711C15.7822 7.62695 15.4336 7.28516 15.0234 7.28516H12.9385C12.5283 7.28516 12.1797 7.62695 12.1797 8.03711C12.1797 8.44727 12.5283 8.78906 12.9385 8.78906H15.0234ZM0.975586 7.28516C0.56543 7.28516 0.223633 7.62695 0.223633 8.03711C0.223633 8.44727 0.56543 8.78906 0.975586 8.78906H3.07422C3.48438 8.78906 3.83301 8.44727 3.83301 8.03711C3.83301 7.62695 3.48438 7.28516 3.07422 7.28516H0.975586ZM12.0361 10.9902C11.749 10.71 11.2568 10.71 10.9629 10.9971C10.6826 11.2842 10.6826 11.7764 10.9697 12.0635L12.4258 13.5127C12.7129 13.7998 13.2051 13.793 13.4922 13.5059C13.7793 13.2256 13.7725 12.7266 13.4854 12.4395L12.0361 10.9902ZM2.52051 12.4395C2.22656 12.7266 2.22656 13.2188 2.50684 13.5059C2.79395 13.793 3.28613 13.7998 3.57324 13.5127L5.02246 12.0703C5.31641 11.7832 5.31641 11.291 5.03613 11.0039C4.74902 10.7168 4.25684 10.71 3.96973 10.9971L2.52051 12.4395ZM8.75488 12.9658C8.75488 12.5557 8.41309 12.207 8.00293 12.207C7.59277 12.207 7.25098 12.5557 7.25098 12.9658V15.0576C7.25098 15.4609 7.59277 15.8096 8.00293 15.8096C8.41309 15.8096 8.75488 15.4609 8.75488 15.0576V12.9658Z"}));case"person":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M9.625,10.8465 C8.91187,10.2891 8.12088,9.926 7,9.26013 L7,8.71938 C7.21175,8.47612 7.392,8.176 7.53813,7.83213 C7.94587,7.7315 8.3125,7.33425 8.3125,7 C8.3125,6.51788 8.1095,6.32713 7.8715,6.17137 C7.8715,6.15562 7.875,6.14162 7.875,6.125 C7.875,5.41362 7.4375,3.5 5.25,3.5 C3.0625,3.5 2.625,5.4145 2.625,6.125 C2.625,6.14162 2.6285,6.15562 2.6285,6.17137 C2.3905,6.32713 2.1875,6.51788 2.1875,7 C2.1875,7.33425 2.55413,7.7315 2.96187,7.833 C3.108,8.176 3.28825,8.47612 3.5,8.71938 L3.5,9.26013 C2.37912,9.92513 1.58812,10.2882 0.875,10.8465 C0.041125,11.4984 0,12.4688 0,14 L10.5,14 C10.5,12.4688 10.4589,11.4984 9.625,10.8465 Z M13.125,7.3465 C12.4119,6.78912 11.6209,6.426 10.5,5.76013 L10.5,5.21938 C10.7118,4.97613 10.892,4.676 11.0381,4.33213 C11.4459,4.2315 11.8125,3.83425 11.8125,3.5 C11.8125,3.01787 11.6095,2.82713 11.3715,2.67138 C11.3715,2.65562 11.375,2.64162 11.375,2.625 C11.375,1.91363 10.9375,0 8.75,0 C6.5625,0 6.125,1.9145 6.125,2.625 C6.125,2.64162 6.1285,2.65562 6.1285,2.67138 C6.11188,2.68275 6.09787,2.69588 6.08125,2.70725 C7.83212,3.066 8.59688,4.54825 8.72813,5.74787 C8.97575,6.00863 9.1875,6.39625 9.1875,7 C9.1875,7.60288 8.771,8.20312 8.18388,8.51462 C8.127,8.624 8.06662,8.729 8.00275,8.82962 C8.155,8.91537 8.30025,8.99675 8.44025,9.07463 C9.08075,9.4325 9.63375,9.74137 10.164,10.1561 C10.3022,10.2638 10.4204,10.3801 10.5289,10.4991 L14,10.4991 C14,8.96875 13.9589,7.99837 13.125,7.3465 Z"}));case"email":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M14,6.22508 C14,7.0471 13.8666,7.79918 13.5999,8.48134 C13.3332,9.16351 12.9563,9.69867 12.4692,10.0868 C11.9821,10.475 11.524,10.6862 10.9764,10.6862 C10.5473,10.6862 10.1676,10.5849 9.83705,10.3823 C9.50653,10.1796 9.2688,9.91274 9.12384,9.58165 C8.51065,10.318 7.56114,10.6862 6.5928,10.6862 C5.56647,10.6862 4.75762,10.3823 4.16618,9.77431 C3.57473,9.16636 3.27902,8.33436 3.27902,7.27829 C3.27902,6.0738 3.66752,5.10337 4.44451,4.36697 C5.2215,3.63058 6.2362,3.26239 7.48867,3.26239 C7.98734,3.26239 9.5206,3.47449 9.74131,3.53033 C10.2518,3.65949 10.6003,4.12335 10.5763,4.6417 C10.5697,4.78537 10.5175,5.88115 10.4198,7.92905 C10.4198,8.72253 10.6401,9.11927 11.0808,9.11927 C11.4519,9.11927 11.7476,8.8524 11.968,8.31865 C12.1883,7.78491 12.2985,7.08706 12.2985,6.22508 C12.2985,5.30601 12.1042,4.49399 11.7157,3.78899 C11.3272,3.08399 10.7808,2.54597 10.0762,2.17492 C9.37173,1.80387 8.56719,1.61835 7.66263,1.61835 C6.49134,1.61835 5.47373,1.85525 4.60976,2.32905 C3.74579,2.80286 3.08332,3.48644 2.62234,4.37981 C2.16136,5.27319 1.93089,6.30499 1.93089,7.47523 C1.93089,9.05077 2.35851,10.2595 3.21378,11.1015 C4.06905,11.9435 5.30847,12.3645 6.93203,12.3645 C7.54667,12.3645 8.22216,12.2975 8.95856,12.1633 C9.18419,12.1222 9.47682,12.0555 9.83645,11.9632 C10.2649,11.8532 10.7081,12.0814 10.8607,12.4905 C11.0082,12.8863 10.802,13.3249 10.4001,13.4701 C10.3865,13.475 10.3728,13.4796 10.359,13.4837 C9.30721,13.7996 8.18808,13.9716 7.00161,14 C4.7982,14 3.08041,13.4292 1.84823,12.2875 C0.616061,11.1458 0,9.55883 0,7.52661 C0,6.11661 0.314555,4.8365 0.943688,3.68624 C1.57282,2.53598 2.46867,1.63405 3.63126,0.980429 C4.79385,0.326807 6.13184,0 7.64524,0 C8.9209,0 10.1589,0.290316 11.0634,0.770643 C11.968,1.25097 12.6374,1.99796 13.1824,2.94557 C13.7275,3.89318 14,4.98634 14,6.22508 Z M5.38462,7.23555 C5.38462,8.44263 5.87335,9.04616 6.85083,9.04616 C7.3623,9.04616 7.75159,8.86452 8.01869,8.50126 C8.28579,8.13799 8.44773,7.54734 8.50456,6.72927 L8.61539,4.83286 C8.32555,4.76993 7.9988,4.73846 7.63509,4.73846 C6.92471,4.73846 6.37204,4.96157 5.97707,5.40779 C5.58211,5.854 5.38462,6.46325 5.38462,7.23555 Z"}));case"phone_number":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z"}));case"file":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M5.94578,14 C4.62416,14 3.38248,13.4963 2.44892,12.585 C1.514641,11.6736 1,10.4639 1,9.17405 C1.00086108,7.88562 1.514641,6.67434 2.44892,5.76378 L7.45612,0.985988 C8.80142,-0.327216 11.1777,-0.332396 12.5354,0.992848 C13.9369,2.36163 13.9369,4.58722 12.5354,5.95418 L8.03046,10.2414 C7.16278,11.0877 5.73682,11.0894 4.86024,10.2345 C3.98394,9.37789 3.98394,7.98769 4.86024,7.1327 L6.60422,5.4317 L7.87576,6.67196 L6.13177,8.37297 C6.01668,8.48539 6.00003,8.61545 6.00003,8.68335 C6.00003,8.75083 6.01668,8.88103 6.13177,8.99429 C6.36197,9.21689 6.53749,9.21689 6.76768,8.99429 L11.2707,4.70622 C11.9645,4.03016 11.9645,2.91757 11.2638,2.23311 C10.5843,1.57007 9.40045,1.57007 8.72077,2.23311 L3.71342,7.0109 C3.12602,7.58406 2.79837,8.35435 2.79837,9.17405 C2.79837,9.99459 3.12602,10.7654 3.72045,11.3446 C4.90947,12.5062 6.98195,12.5062 8.17096,11.3446 L10.41911,9.15165 L11.6906,10.3919 L9.4425,12.585 C8.50808,13.4963 7.2664,14 5.94578,14 Z"}));case"formula":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M7.77892,7.06304 L4.62218,11.2875 C4.58556,11.3416 4.55285,11.4392 4.5504,11.5052 C4.5504,11.7022 4.7047,11.8619 4.89562,11.8619 L11.1383,11.8619 C11.6139,11.8619 11.9996,12.2598 11.9996,12.7507 L11.9996,13.1111 C11.9996,13.602 11.6139,14 11.1383,14 L1.861927,14 C1.385853,14 1.00011061,13.602 1.00011061,13.1111 L1.00011061,12.6858 C0.99718092,12.4783 1.0523567,12.3098 1.176868,12.1466 L4.39269,7.79888 C4.74816,7.31841 4.74572,6.65139 4.38683,6.17354 L1.400013,2.19436 C1.27306,2.03028 1.216419,1.85993 1.219349,1.65006 L1.219349,0.888889 C1.219349,0.397968 1.605091,0 2.08117,0 L10.91906,0 C11.3946,0 11.7804,0.397968 11.7804,0.888889 L11.7804,1.24925 C11.7804,1.74017 11.3946,2.13814 10.91906,2.13814 L5.13634,2.13814 C4.94542,2.13814 4.79064,2.29801 4.79064,2.49522 C4.79308,2.56049 4.82482,2.65709 4.86095,2.71087 L7.78038,6.68628 C7.8297,6.74847 7.84435,6.7934 7.84142,6.87363 C7.84435,6.95493 7.82921,7.00048 7.77892,7.06304 Z"}));case"rollup":return e.createElement("svg",{viewBox:"0 0 18 18",className:a},e.createElement("path",{d:"M17,15.6l-5.119-5.119C12.583,9.499,13,8.299,13,7c0-3.314-2.686-6-6-6S1,3.686,1,7s2.686,6,6,6 c1.299,0,2.499-0.417,3.481-1.119L15.6,17L17,15.6z M7,11c-2.209,0-4-1.791-4-4c0-2.209,1.791-4,4-4s4,1.791,4,4 C11,9.209,9.209,11,7,11z"}));case"created_at":case"last_edited_at":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M7.01356 14.0001C8.8042 14.0001 10.5958 13.3107 11.9575 11.9324C14.681 9.21201 14.6808 4.7603 11.9571 2.04013C9.23336 -0.680043 4.77573 -0.680043 2.05199 2.04013C0.727519 3.36277 0 5.13301 0 6.99553C0 8.8764 0.727811 10.6285 2.05199 11.9509C3.43207 13.3106 5.22243 14.0001 7.01356 14.0001ZM3.72947 7.00914V8.461V8.65543H3.92382H5.34563H8.2794H8.4738V8.461V5.52541V3.37947V3.18502H8.2794H6.82747H6.63307V3.37947V6.81467H3.92382H3.72947V7.00914ZM1.83985 6.99553C1.83985 5.61698 2.38099 4.32597 3.36061 3.3477C5.36746 1.34337 8.64803 1.34062 10.6585 3.33944C10.6613 3.34219 10.6639 3.34494 10.6668 3.3477C12.676 5.3546 12.6763 8.63642 10.6668 10.6434C8.65705 12.6504 5.37031 12.6504 3.36061 10.6434C2.38099 9.66506 1.83985 8.37408 1.83985 6.99553Z"}));case"created_by":case"last_edited_by":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M13.125,10.0354 C12.5536,9.48588 10.801,8.53125 9.625,7.875 L9.625,7.04112 C9.849,6.71912 10.045,6.37 10.1911,5.98588 C10.5849,5.7435 10.9375,5.28412 10.9375,4.8125 C10.9375,4.35488 10.9323,3.94275 10.4668,3.605 C10.3049,1.5575 9.436,0 7,0 C4.564,0 3.69513,1.5575 3.53325,3.605 C3.06775,3.94275 3.0625,4.35488 3.0625,4.8125 C3.0625,5.28412 3.41513,5.7435 3.80888,5.98588 C3.955,6.37 4.151,6.71912 4.375,7.04112 L4.375,7.875 C3.199,8.53125 1.44638,9.48588 0.875,10.0354 C0.1645,10.7188 0,11.8125 0,14 L14,14 C14,11.8125 13.8364,10.7188 13.125,10.0354 Z"}));default:return e.createElement("span",null,"❓")}},Xi=function(t){var r=t.options,a=t.children,n=r||{},i=n.pathname,o=n.link,l=n.query;if(i&&o){var s=o;return e.createElement(s,{className:"rotion-table-title-wrapper rotion-table-title-link",href:l?{pathname:i,query:l}:i},a)}return i?e.createElement("a",{className:"rotion-table-title-wrapper rotion-table-title-link",href:i},a):e.createElement("span",{className:"rotion-table-title-wrapper"},a)},Wi=function(t){var r=t.textObjects,a=t.options;return e.createElement("div",{className:"rotion-table-title"},e.createElement(Xi,{options:a},r.map((function(t,r){return e.createElement(mi,{key:"richtext-".concat(r),textObject:t})}))))},$i=function(t){var r=t.date;if(null===r)return e.createElement(e.Fragment,null);var a=r.start,n=r.end,i=e.useState(""),o=i[0],l=i[1],s=e.useState(""),c=s[0],m=s[1];return e.useEffect((function(){var e,t=h(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),r=t.dateF,i=t.timeF;l(ee(a).format(a.length>10?"".concat(r," ").concat(i):r)),n&&m(ee(n).format(n.length>10?"".concat(r," ").concat(i):r))}),[o,c]),e.createElement("div",{className:"rotion-table-date"},o,n&&" → ".concat(c))},Ji=function(t){var r=t.textObjects;return r?e.createElement("div",{className:"rotion-table-richtext"},r.map((function(t,r){return e.createElement(mi,{key:"richtext-".concat(r),textObject:t})}))):e.createElement(e.Fragment,null)},Ki=function(t){var r=t.color,a=t.pathname,n=t.link,i=t.query,o=t.children,l=i?{pathname:a,query:i}:a,s=function(e){return"rotion-table-multiselect-link rotion-table-multiselect-".concat(e)};if(""===l)return e.createElement("span",{className:s(r)},o);if(n){var c=n;return e.createElement(c,{className:s(r),href:l},o)}return e.createElement("a",{className:s(r),href:a},o)},Qi=function(t){var r=t.multiSelect,a=t.options||{},n=a.pathname,i=a.link,o=a.query;return e.createElement("ul",{className:"rotion-table-multiselect-ul"},r.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-table-multiselect-li"},e.createElement(Ki,{pathname:n?"".concat(n,"/").concat(encodeURIComponent(t.name)):"",color:t.color,link:i,query:o},t.name))})))},eo=function(t){var r=t.pathname,a=t.color,n=t.link,i=t.query,o=t.children,l=i?{pathname:r,query:i}:r,s=function(e){return"rotion-table-select-link rotion-table-select-".concat(e)};if(""===l)return e.createElement("span",{className:s(a)},o);if(n){var c=n;return e.createElement(c,{className:s(a),href:l},o)}return e.createElement("a",{className:s(a),href:r},o)},to=function(t){var r=t.select,a=t.options;if(!r)return e.createElement(e.Fragment,null);var n=a||{},i=n.pathname,o=n.link,l=n.query;return e.createElement("div",{className:"rotion-table-select"},e.createElement(eo,{pathname:i?"".concat(i,"/").concat(encodeURIComponent(r.name)):"",color:r.color,link:o,query:l},r.name))},ro=function(t){var r=t.url;if(!r)return e.createElement(e.Fragment,null);var a=u(r),n=a.domain,i=a.omittedPath;return e.createElement("div",{className:"rotion-table-url"},e.createElement("a",{className:"rotion-table-url-link",href:r,rel:"noreferrer",target:"_blank"},e.createElement("span",{className:"rotion-table-url-domain"},n),e.createElement("span",{className:"rotion-table-url-path"},i)))},ao=function(t){var r=t.checked,a=t.options;return e.createElement("div",{className:"rotion-table-checkbox"},e.createElement(xi,{prefix:null==a?void 0:a.prefix,suffix:null==a?void 0:a.suffix},e.createElement(yi,{bool:r})))},no=function(t){var r=t.number,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-table-number"},e.createElement(xi,{prefix:n,suffix:i},r))},io=function(t){var r=t.number,a=t.options;return e.createElement("div",{className:"rotion-table-formula"},e.createElement(xi,{prefix:null==a?void 0:a.prefix,suffix:null==a?void 0:a.suffix},r))},oo=function(t){var r=t.property,a=t.options;if(!r||!r.type)return console.log("property empty in table handler: ",r),e.createElement(e.Fragment,null);switch(r.type){case"title":return e.createElement(Wi,{textObjects:r.title,options:a});case"rich_text":return e.createElement(Ji,{textObjects:r.rich_text});case"url":return e.createElement(ro,{url:r.url});case"date":return e.createElement($i,{date:r.date});case"multi_select":return e.createElement(Qi,{multiSelect:r.multi_select,options:a});case"checkbox":return e.createElement(ao,{checked:r.checkbox,options:a});case"number":return e.createElement(no,{number:r.number,options:a});case"select":return e.createElement(to,{select:r.select,options:a});case"formula":return e.createElement(io,{number:r.formula.number,options:a});default:return console.log("unsupport database property:",r),e.createElement(e.Fragment,null)}},lo=function(t){var r=t.name,a=t.page,n=t.options;if(!("properties"in a))return e.createElement(e.Fragment,null);var i=a.properties[r];if(!i)return e.createElement(e.Fragment,null);var o=n||{},l=o.href,m=o.link,h=o.query,u=o.prefix,p=o.suffix,d={};if(l&&l[r]){var f=s(l[r]),g=f[0],v=f[1];d.pathname=""===v?g:"".concat(g).concat(c(v,a)),m&&(d.link=m),h&&(d.query=h)}return u&&u[r]&&(d.prefix=u[r]),p&&p[r]&&(d.suffix=p[r]),e.createElement(oo,{property:i,options:d})},so=function(t){var r=t.block;if(!r.bookmark)return e.createElement(e.Fragment,null);var a=r.bookmark.site,n=a.title,i=a.desc,o=a.icon,l=a.image,s=function(){var e;return window.open(null===(e=r.bookmark)||void 0===e?void 0:e.url,"_blank","noreferrer")},c=r.bookmark.url;return""===n&&""===i&&""===l?e.createElement("div",{className:"rotion-bookmark"},e.createElement("div",{className:"rotion-bookmark-area",onClick:s},e.createElement("div",{className:"rotion-bookmark-text"},e.createElement("div",{className:"rotion-bookmark-title"},c.substring(c.lastIndexOf("/")+1)),e.createElement("div",{className:"rotion-bookmark-desc"},c)))):e.createElement("div",{className:"rotion-bookmark"},e.createElement("div",{className:"rotion-bookmark-area",onClick:s},e.createElement("div",{className:"rotion-bookmark-text"},e.createElement("div",{className:"rotion-bookmark-title"},n),e.createElement("div",{className:"rotion-bookmark-desc"},i),e.createElement("div",{className:"rotion-bookmark-url"},""!==o&&e.createElement("img",{className:"rotion-bookmark-favicon",src:o,width:"16px",alt:"icon"}),c)),e.createElement("div",{className:"rotion-bookmark-image"},""!==l&&e.createElement("img",{className:"rotion-bookmark-img",src:l,width:"200px",height:"auto",alt:"image"}))),e.createElement("div",{className:"rotion-bookmark-caption"},r.bookmark.caption.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})}))))};var co=function(t){var r=t.breadcrumb,a=t.link,n=t.href,i=t.query,o=t.children,c=function(e,t,r){if("/"===r)return r;var a=s(r||""),n=a[0],i="";return i="id"===a[1]?e:encodeURIComponent(t.toLowerCase()).replace(/%20/g,"-"),"".concat(n).concat(i)}(r.id,r.name,n);if(a&&n){var m=a;return e.createElement(m,{className:"rotion-breadcrumb-link",href:{pathname:c,query:i}},o)}return n?e.createElement("a",{className:"rotion-breadcrumb-link",href:"".concat(c).concat(l(i))},o):e.createElement("span",{className:"rotion-breadcrumb-link"},o)},mo=function(t){var r=t.list,a=t.link,n=t.hrefs,i=t.query,o=r.length;return e.createElement("div",{className:"rotion-breadcrumb"},r.map((function(t,r){return e.createElement("span",{key:"crumb-".concat(r)},e.createElement(co,{breadcrumb:t,href:void 0===n?void 0:n[r],link:a,query:i},"emoji"===t.icon.type&&e.createElement("span",{className:"rotion-breadcrumb-emoji"},t.icon.emoji),"emoji"!==t.icon.type&&e.createElement("img",{className:"rotion-breadcrumb-icon",src:t.icon.src,width:20,height:20,alt:t.name}),e.createElement("span",{className:"rotion-breadcrumb-title"},t.name)),r+1<o&&e.createElement("span",{className:"rotion-breadcrumb-slash"},"/"))})))},ho=function(t){var r=t.block,a=t.link,n=t.hrefs,i=t.query;return e.createElement(mo,{list:r.list,link:a,hrefs:n,query:i})},uo=function(t){var r,a=t.block,n=t.href,i=t.link,o=t.query,l=el[a.type],s=null===(r=a[a.type])||void 0===r?void 0:r.rich_text;return a.has_children&&void 0!==a.children?e.createElement(l,{key:a.id,className:"rotion-bulleted-list"},s.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})})),e.createElement(rl,{blocks:a.children,href:n,link:i,query:o})):e.createElement(l,{className:"rotion-bulleted-list"},s.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})})))},po=function(t){var r=t.block;if(!r.callout.icon)return e.createElement(e.Fragment,null);switch(r.callout.icon.type){case"emoji":return e.createElement("span",{className:"rotion-callout-emoji"},r.callout.icon.emoji);case"external":case"file":return e.createElement("img",{className:"rotion-callout-img",src:r.callout.icon.src,alt:"Icon"});default:return e.createElement(e.Fragment,null)}},fo=function(t){var r=t.block,a=t.href,n=t.link,i=t.query,o=r.callout,l=o.color,s=o.rich_text;return e.createElement("div",{className:"rotion-callout rotion-callout-".concat(l.replace("_background","-bg"))},e.createElement("div",{className:"rotion-callout-icon"},e.createElement(po,{block:r})),e.createElement("div",{className:"rotion-callout-text"},s.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})})),r.has_children&&void 0!==r.children&&e.createElement(rl,{blocks:r.children,href:a,link:n,query:i})))},go=function(t){var r=t.block,a=t.href,n=t.link,i=t.query,o=t.children,c=r.child_database.title,m=s(a||""),h=m[0],u="id"===m[1]?r.database.id:encodeURIComponent(c.toLowerCase()).replace(/%20/g,"-");if(!a)return e.createElement("div",{className:"rotion-childdb-link"},o);if(n){var p=n;return void 0===i&&(i={}),e.createElement(p,{className:"rotion-childdb-link",href:{pathname:"".concat(h).concat(u),query:i}},o)}return e.createElement("a",{className:"rotion-childdb-link",href:"".concat(h).concat(u).concat(l(i))},o)},vo=function(t){var r=t.block,a=t.href,n=t.link,i=t.query;if(void 0===r.database)return e.createElement(e.Fragment,null);var o=r.child_database.title;return null===r.database||void 0===r.database.icon||null===r.database.icon?e.createElement("div",{className:"rotion-childdb"},e.createElement(go,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childdb-icon"},"️-"),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},o)))):"emoji"===r.database.icon.type?e.createElement("div",{className:"rotion-childdb"},e.createElement(go,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childdb-emoji"},r.database.icon.emoji),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},o)))):e.createElement("div",{className:"rotion-childdb"},e.createElement(go,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childdb-icon"},e.createElement("img",{className:"rotion-childdb-icon-img",src:r.database.icon.src,alt:"Icon"})),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},o))))},bo=function(t){var r=t.block,a=t.href,n=t.link,i=t.query,o=t.children,c=r.child_page.title,m=s(a||""),h=m[0],u="id"===m[1]?r.page.id:encodeURIComponent(c.toLowerCase()).replace(/%20/g,"-");if(!a)return e.createElement("div",{className:"rotion-childpage-link"},o);if(n){var p=n;return void 0===i&&(i={}),e.createElement(p,{className:"rotion-childpage-link",href:{pathname:"".concat(h).concat(u),query:i}},o)}return e.createElement("a",{className:"rotion-childpage-link",href:"".concat(h).concat(u).concat(l(i))},o)},yo=function(t){var r=t.block,a=t.href,n=t.link,i=t.query;if(void 0===r.page)return e.createElement(e.Fragment,null);var o=r.child_page.title;return null===r.page||void 0===r.page.icon||null===r.page.icon?e.createElement("div",{className:"rotion-childpage"},e.createElement(bo,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childpage-icon"},"️-"),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},o)))):"emoji"===r.page.icon.type?e.createElement("div",{className:"rotion-childpage"},e.createElement(bo,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childpage-emoji"},r.page.icon.emoji),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},o)))):e.createElement("div",{className:"rotion-childpage"},e.createElement(bo,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childpage-icon"},e.createElement("img",{className:"rotion-childpage-icon-img",src:r.page.icon.src,alt:"Icon"})),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},o))))};function xo(e,t,r,a){return new(r||(r=Promise))((function(n,i){function o(e){try{s(a.next(e))}catch(e){i(e)}}function l(e){try{s(a.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,l)}s((a=a.apply(e,t||[])).next())}))}function wo(e,t){var r,a,n,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(r=1,a&&(n=2&l[0]?a.return:l[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,l[1])).done)return n;switch(a=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,a=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){i.label=l[1];break}if(6===l[0]&&i.label<n[1]){i.label=n[1],n=l;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(l);break}n[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],a=0}finally{r=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}"function"==typeof SuppressedError&&SuppressedError;var ko;ko||(ko=1,function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],cilkc:"c",cilkcpp:"cpp",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",gradle:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",cshtml:["markup","csharp"],jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",stata:["mata","java","python"],"t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup-templating",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},t={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",ino:"arduino","arm-asm":"armasm",art:"arturo",adoc:"asciidoc",avs:"avisynth",avdl:"avro-idl",gawk:"awk",sh:"bash",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript","cilk-c":"cilkc","cilk-cpp":"cilkcpp",cilk:"cilkcpp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",po:"gettext",gni:"gn",ld:"linker-script","go-mod":"go-module",hbs:"handlebars",mustache:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",plantuml:"plant-uml",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",razor:"cshtml",rpy:"renpy",res:"rescript",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",sclang:"supercollider",t4:"t4-cs",trickle:"tremor",troy:"tremor",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",webidl:"web-idl",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},r={},a="components/",n=Prism.util.currentScript();if(n){var i=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,o=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,l=n.getAttribute("data-autoloader-path");if(null!=l)a=l.trim().replace(/\/?$/,"/");else{var s=n.src;i.test(s)?a=s.replace(i,"components/"):o.test(s)&&(a=s.replace(o,"$1components/"))}}var c=Prism.plugins.autoloader={languages_path:a,use_minified:!0,loadLanguages:h};Prism.hooks.add("complete",(function(e){var t=e.element,r=e.language;if(t&&r&&"none"!==r){var a=function(e){var t=(e.getAttribute("data-dependencies")||"").trim();if(!t){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}return t?t.split(/\s*,\s*/g):[]}(t);/^diff-./i.test(r)?(a.push("diff"),a.push(r.substr(5))):a.push(r),a.every(m)||h(a,(function(){Prism.highlightElement(t)}))}}))}function m(e){if(e.indexOf("!")>=0)return!1;if((e=t[e]||e)in Prism.languages)return!0;var a=r[e];return a&&!a.error&&!1===a.loading}function h(a,n,i){"string"==typeof a&&(a=[a]);var o=a.length,l=0,s=!1;function p(){s||++l===o&&n&&n(a)}0!==o?a.forEach((function(a){!function(a,n,i){var o=a.indexOf("!")>=0;function l(){var e=r[a];e||(e=r[a]={callbacks:[]}),e.callbacks.push({success:n,error:i}),!o&&m(a)?u(a,"success"):!o&&e.error?u(a,"error"):!o&&e.loading||(e.loading=!0,e.error=!1,function(e,t,r){var a=document.createElement("script");a.src=e,a.async=!0,a.onload=function(){document.body.removeChild(a),t&&t()},a.onerror=function(){document.body.removeChild(a),r&&r()},document.body.appendChild(a)}(function(e){return c.languages_path+"prism-"+e+(c.use_minified?".min":"")+".js"}(a),(function(){e.loading=!1,u(a,"success")}),(function(){e.loading=!1,e.error=!0,u(a,"error")})))}a=a.replace("!",""),a=t[a]||a;var s=e[a];s&&s.length?h(s,l,i):l()}(a,p,(function(){s||(s=!0,i&&i(a))}))})):n&&setTimeout(n,0)}function u(e,t){if(r[e]){for(var a=r[e].callbacks,n=0,i=a.length;n<i;n++){var o=a[n][t];o&&setTimeout(o,0)}a.length=0}}}()),r.plugins.autoloader&&(r.plugins.autoloader.languages_path="https://unpkg.com/prismjs@1.29.0/components/");var Eo=function(a){var n=a.children,i=a.language,o=void 0===i?"text":i,l=function(){return window.matchMedia("(prefers-color-scheme: dark)").matches},s=e.createRef(),c=function(e){return xo(void 0,void 0,void 0,(function(){return wo(this,(function(a){return s.current&&("mermaid"===e?(t.initialize({theme:l()?"dark":"neutral"}),t.init(void 0,s.current)):(!function(){var e="prism-theme",t=window.document.getElementById(e);if(t&&"href"in t)t.href="https://unpkg.com/prismjs@1.29.0/themes/".concat(l()?"prism-tomorrow.min.css":"prism.min.css");else{var r=window.document.createElement("link");r.rel="stylesheet",r.id=e,r.href="https://unpkg.com/prismjs@1.29.0/themes/".concat(l()?"prism-tomorrow.min.css":"prism.min.css"),window.document.head.appendChild(r)}}(),r.highlightElement(s.current))),[2]}))}))},m="mermaid"===o?"mermaid":"language-".concat(o.toLowerCase()),h=e.useState(!1),u=h[0],p=h[1];return e.useEffect((function(){c(o)}),[o,""]),e.createElement("div",{className:"rotion-code-area",onMouseOver:function(){return p(!0)},onMouseOut:function(){return p(!1)}},u&&e.createElement("div",{className:"rotion-code-lang"},o),e.createElement("pre",{className:m},e.createElement("code",{ref:s},n)))},Mo=function(t){var r,a,n=t.block,i=null===(r=n.code)||void 0===r?void 0:r.rich_text.map((function(t,r){var a,i=t;return e.createElement(Eo,{language:(null===(a=n.code)||void 0===a?void 0:a.language)||"",key:"".concat(r)},i.text.content)})),o=null===(a=n.code)||void 0===a?void 0:a.caption.map((function(t,r){return e.createElement(mi,{textObject:t,key:"".concat(r)})}));return e.createElement("div",{className:"rotion-code"},i,e.createElement("div",{className:"rotion-code-caption"},o))},So=function(t){var r=t.block,a=t.href,n=t.link,i=t.query,o=r.columns.map((function(t,r){return e.createElement("div",{key:r,className:"rotion-columnlist-column"},e.createElement(rl,{blocks:t,href:a,link:n,query:i}))})),l=o.length,s={gridTemplate:"repeat(1, 1fr) / repeat(".concat(l,", 1fr)")};return e.createElement("div",{className:"rotion-columnlist",style:s},o)},Co=function(t){var r=t.type,a=t.caption;return e.createElement("div",{className:"rotion-".concat(r,"-caption")},a.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})})))},No=function(t){var r=t.html,a=t.caption,n=r.replace(/<script>.*/,""),i="rotion-embed-html";return e.useEffect((function(){var e=document.createElement("script");e.src="https://www.instagram.com/embed.js",document.getElementsByClassName(i)[0].appendChild(e),window.instgrm&&window.instgrm.Embeds.process()}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-instagram"},e.createElement("div",{className:i,dangerouslySetInnerHTML:{__html:n}}),e.createElement(Co,{type:"embed",caption:a})))},zo=function(t){var r=t.html,a=t.caption,n=r.replace(/<script>.*/,""),i="rotion-embed-html";return e.useEffect((function(){var e=document.createElement("script");e.src="https://platform.twitter.com/widgets.js",document.getElementsByClassName(i)[0].appendChild(e)}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-twitter"},e.createElement("div",{className:i,dangerouslySetInnerHTML:{__html:n}}),e.createElement(Co,{type:"embed",caption:a})))},To=function(t){var r=t.html,a=t.caption,n=r.replace(/<script>.*/,""),i="rotion-embed-html";return e.useEffect((function(){var e=document.createElement("script");e.src="https://www.tiktok.com/embed.js",document.getElementsByClassName(i)[0].appendChild(e)}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-tiktok"},e.createElement("div",{className:i,dangerouslySetInnerHTML:{__html:n}}),e.createElement(Co,{type:"embed",caption:a})))},Ao=function(t){var r=t.type,a=t.html,n=t.caption;return e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-".concat(r)},e.createElement("div",{className:"rotion-embed-html",dangerouslySetInnerHTML:{__html:a}}),e.createElement(Co,{type:"embed",caption:n})))},Bo=function(t){var r=t.block,a=r.embed,n=a.html,i=a.caption;return void 0===n||""===n?(console.log("The html property for this embed block was undefined:",r),e.createElement(e.Fragment,null)):n.includes("instagram")?e.createElement(No,{html:n,caption:i}):n.includes("twitter")?e.createElement(zo,{html:n,caption:i}):n.includes("tiktok")?e.createElement(To,{html:n,caption:i}):n.includes("speakerdeck")?e.createElement(Ao,{type:"speakerdeck",html:n,caption:i}):n.includes("slideshare")?e.createElement(Ao,{type:"slideshare",html:n,caption:i}):n.includes("music.apple.com")?e.createElement(Ao,{type:"applemusic",html:n,caption:i}):n.includes("google")?e.createElement(Ao,{type:"googlemap",html:n,caption:i}):e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-html",dangerouslySetInnerHTML:{__html:n}}),e.createElement(Co,{type:"embed",caption:i}))},qo=function(t){var r=t.block.equation.expression,a=e.useMemo((function(){return si(r,{throwOnError:!1,output:"mathml"})}),[r]);return e.createElement("div",{className:"rotion-equation"},e.createElement("div",{className:"rotion-equation-html",dangerouslySetInnerHTML:{__html:a}}))},Lo=function(t){var r=t.block.file,a=r.size>9999?"".concat((Math.ceil(r.size/1024/1e3*10)/10).toFixed(1),"MB"):"".concat((Math.ceil(r.size/1024*10)/10).toFixed(1),"KB");return e.createElement("div",{className:"rotion-file"},e.createElement("a",{href:r.src,target:"_blank",className:"rotion-file-link",rel:"noreferrer"},e.createElement(i,{name:"file"}),e.createElement("span",null,r.name,e.createElement("span",{className:"rotion-file-size"},a))),r.caption.length>0&&e.createElement("div",{className:"rotion-file-caption"},r.caption.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})}))))},Oo=function(t){var r=t.tag,a=t.block;if("divider"===a.type)return e.createElement("div",{className:"rotion-text-hr"});var n={hr:"hr",heading_1:"h1",heading_2:"h2",heading_3:"h3",paragraph:"p",quote:"quote"},i=r,o=["rotion-text"];a.type in n&&o.push("rotion-text-".concat(n[a.type]));var l=a[a.type].rich_text;return e.createElement(i,{className:o.join(" ")},l.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})})))},Ho=function(t){var r,a=t.block,n="rotion-image-ratio-unknown";if(a.image&&a.image.width&&a.image.height){var i=a.image;n=i.width>i.height?"rotion-image-ratio-landscape":"rotion-image-ratio-portrait"}return e.createElement("div",{className:"rotion-image"},e.createElement("div",{className:"rotion-image-area"},e.createElement("img",{className:"rotion-image-img ".concat(n),src:null===(r=a.image)||void 0===r?void 0:r.src,alt:"Image"})),e.createElement("div",{className:"rotion-image-caption"},a.image.caption.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})}))))},Io=function(t){var r=t.url,a=t.github;if(void 0===a){var n=r.match(/github\.com\/(\w+)\/(\w+)/),o=n?n[1]:"",l=n?n[2]:"";return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(i,{name:"github",width:"32px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},o,"/",l),e.createElement("span",{className:"rotion-linkpreview-desc"},"Repository in Github")))}var s=ee().handler(re).cdateFn();if("issue"===a.type){var c=a.issue,m=c.title,h=c.login,u=c.number,p=c.created_at,d=c.closed_at,f=c.merged_at,g=c.state,v=c.avatar_src,b=f||d||p,y="merged"===g?"codemerge":"closed"===g?"circlecheck":"circledot",x="rotion-linkpreview-github-state-icon rotion-linkpreview-issue-".concat(g);return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-githubicon"},e.createElement("img",{className:"rotion-linkpreview-githubicon-user",src:v,width:"32px",height:"32px"}),e.createElement(i,{className:"rotion-linkpreview-githubicon-octocat",name:"github",width:"15px",height:"15px"})),e.createElement("div",null,e.createElement("div",{className:"rotion-linkpreview-title"},e.createElement("span",{className:"rotion-linkpreview-github-title"},m),e.createElement("span",{className:"rotion-linkpreview-github-state"},e.createElement(i,{className:x,name:y,width:"14px",height:"14px"}),e.createElement("span",{className:"rotion-linkpreview-state"},g))),e.createElement("div",{className:"rotion-linkpreview-desc"},e.createElement(i,{className:x,name:y,width:"12px",height:"12px"})," #",u,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),h,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),e.createElement("span",{className:"rotion-linkpreview-state"},g)," ",e.createElement("span",{title:b},s(b).format("F")))))}if("repo"===a.type){var w=a.repo,k=(v=w.avatar_src,w.name),E=(h=w.login,w.updated_at);return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-githubicon"},e.createElement("img",{className:"rotion-linkpreview-githubicon-user",src:v,width:"32px",height:"32px"}),e.createElement(i,{className:"rotion-linkpreview-githubicon-octocat",name:"github",width:"15px",height:"15px"})),e.createElement("div",null,e.createElement("div",{className:"rotion-linkpreview-title"},e.createElement("span",{className:"rotion-linkpreview-github-title"},k)),e.createElement("div",{className:"rotion-linkpreview-desc"},h,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),e.createElement("span",{title:E},"Updated ",s(E).format("F")))))}},Ro=function(t){var r=t.url.replace("https://","").split("/")[0];return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-slack"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(i,{name:"slack",width:"32px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},"Message in Slack"),e.createElement("span",{className:"rotion-linkpreview-desc"},r)))},Fo=function(t){var r=t.url.split("/"),a=r[r.length-1].split("?")[0].replace("-"," ");return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-figma"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(i,{name:"figma",width:"21px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},a),e.createElement("span",{className:"rotion-linkpreview-desc"},"Assets in Figma")))},Do=function(t){var r,a=t.block;if(!a.link_preview)return e.createElement(e.Fragment,null);var n=a.link_preview,i=n.url;return i.includes("figma.com")&&n.figma?e.createElement("div",{className:"rotion-linkpreview-figma",dangerouslySetInnerHTML:{__html:null===(r=n.figma)||void 0===r?void 0:r.html}}):e.createElement("div",{className:"rotion-linkpreview"},e.createElement("a",{className:"rotion-linkpreview-link",href:i,rel:"noreferrer",target:"_blank"},i.includes("github.com")&&e.createElement(Io,{url:i,github:n.github}),i.includes("slack.com")&&e.createElement(Ro,{url:i}),i.includes("figma.com")&&e.createElement(Fo,{url:i}),!i.includes("github.com")&&!i.includes("slack.com")&&!i.includes("figma.com")&&"".concat(i)))},jo=function(t){var r,a=t.block,n=t.href,i=t.link,o=t.query,l=el[a.type],s=null===(r=a[a.type])||void 0===r?void 0:r.rich_text;return a.has_children&&void 0!==a.children?e.createElement(l,{key:a.id,className:"rotion-numbered-list"},s.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})})),e.createElement(rl,{blocks:a.children,href:n,link:i,query:o})):e.createElement(l,{className:"rotion-numbered-list"},s.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})})))};function Vo(e){return"function"==typeof e}var Po=function(t){var r=t.block.pdf,n=r.src,o=r.caption,l=e.useState(1),s=l[0],c=l[1],m=e.useRef(null),h=function(t){var r=t.canvasRef,n=t.file,i=t.onDocumentLoadSuccess,o=t.onDocumentLoadFail,l=t.onPageLoadSuccess,s=t.onPageLoadFail,c=t.onPageRenderSuccess,m=t.onPageRenderFail,h=t.scale,u=void 0===h?1:h,p=t.rotate,d=void 0===p?0:p,f=t.page,g=void 0===f?1:f,v=t.cMapUrl,b=t.cMapPacked,y=t.workerSrc,x=void 0===y?"//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(a.version,"/pdf.worker.mjs"):y,w=t.withCredentials,k=void 0!==w&&w,E=e.useState(),M=E[0],S=E[1],C=e.useState(),N=C[0],z=C[1],T=e.useRef(null),A=e.useRef(null),B=e.useRef(i),q=e.useRef(o),L=e.useRef(l),O=e.useRef(s),H=e.useRef(c),I=e.useRef(m);return e.useEffect((function(){B.current=i}),[i]),e.useEffect((function(){q.current=o}),[o]),e.useEffect((function(){L.current=l}),[l]),e.useEffect((function(){O.current=s}),[s]),e.useEffect((function(){H.current=c}),[c]),e.useEffect((function(){I.current=m}),[m]),e.useEffect((function(){a.GlobalWorkerOptions.workerSrc=x}),[x]),e.useEffect((function(){var e={url:n,withCredentials:k};v&&(e.cMapUrl=v,e.cMapPacked=b),a.getDocument(e).promise.then((function(e){S(e),Vo(B.current)&&B.current(e)}),(function(){Vo(q.current)&&q.current()}))}),[n,k,v,b]),e.useEffect((function(){var e=function(t){var a=0===d?t.rotate:t.rotate+d,n=t.getViewport({scale:u,rotation:a}),i=r.current;if(i){var o=i.getContext("2d");if(o)return i.height=n.height*window.devicePixelRatio,i.width=n.width*window.devicePixelRatio,o.scale(window.devicePixelRatio,window.devicePixelRatio),T.current?(A.current=t,void T.current.cancel()):(T.current=t.render({canvasContext:o,viewport:n}),T.current.promise.then((function(){T.current=null,Vo(H.current)&&H.current(t)}),(function(r){var a;if(T.current=null,r&&"RenderingCancelledException"===r.name){var n=null!==(a=A.current)&&void 0!==a?a:t;A.current=null,e(n)}else Vo(I.current)&&I.current()})))}};M&&M.getPage(g).then((function(t){z(t),Vo(L.current)&&L.current(t),e(t)}),(function(){Vo(O.current)&&O.current()}))}),[r,g,M,d,u]),{pdfDocument:M,pdfPage:N}}({file:n,page:s,canvasRef:m}).pdfDocument;return e.createElement("div",{className:"rotion-pdf"},Boolean(h&&h.numPages)&&e.createElement("nav",{className:"rotion-pdf-nav"},e.createElement("ul",{className:"rotion-pdf-pager"},e.createElement("li",{className:"rotion-pdf-prev"},e.createElement("span",{className:"rotion-pdf-prevnext ".concat(1===s?"rotion-pdf-prevnext-disabled":""),onClick:function(){return c(s-1)}},"◀︎")),e.createElement("li",{className:"rotion-pdf-next"},e.createElement("span",{className:"rotion-pdf-prevnext ".concat(s===h.numPages?"rotion-pdf-prevnext-disabled":""),onClick:function(){return c(s+1)}},"▶"))),e.createElement("a",{href:n,className:"rotion-pdf-link",title:"Download PDF",target:"_blank",rel:"noopener noreferrer"},e.createElement(i,{name:"downloadfile",width:"20px",height:"20px"}))),!h&&e.createElement("span",null,"Loading..."),e.createElement("canvas",{className:"rotion-pdf-canvas",ref:m}),o.length>0&&e.createElement("div",{className:"rotion-pdf-caption"},o.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})}))))},_o=function(t){var r=t.block;return r.has_children&&void 0!==r.children?e.createElement("div",{className:"rotion-syncedblock"},r.children.results.map((function(t){return e.createElement(tl,{block:t,key:"block-".concat(t.id)})}))):e.createElement(e.Fragment,null)},Uo=function(t){var r=t.block;if(!r.table||!r.children)return e.createElement(e.Fragment,null);var a=[],n=r.table.has_column_header,i=r.table.has_row_header;return r.children.results.map((function(t,o){var l=t,s=[];if(void 0===l.table_row)return"";l.table_row.cells.map((function(t,r){var a="".concat(l.id,"-").concat(o,"-").concat(r);return 0===o&&n||0===r&&i?s.push(function(t){var r=t.richTexts,a=t.key;return e.createElement("td",{className:"rotion-table-td-header",key:a},e.createElement("div",{className:"rotion-table-td-header-inner"},r.map((function(t,r){return e.createElement(mi,{textObject:t,key:"tabletdh-".concat(r)})}))))}({richTexts:t,key:a})||e.createElement(e.Fragment,null)):s.push(function(t){var r=t.richTexts,a=t.key;return e.createElement("td",{className:"rotion-table-td",key:a},e.createElement("div",{className:"rotion-table-td-inner"},r.map((function(t,r){return e.createElement(mi,{textObject:t,key:"tabletd-".concat(r)})}))))}({richTexts:t,key:a})||e.createElement(e.Fragment,null)),""}));var c="".concat(r.id,"-").concat(o);return a.push(function(t){var r=t.children,a=t.key;return e.createElement("tr",{className:"rotion-table-tr",key:a},r)}({children:s,key:c})||e.createElement(e.Fragment,null)),""})),e.createElement("div",{className:"rotion-table"},e.createElement("table",{className:"rotion-table-area"},e.createElement("tbody",null,a)))},Go=function(t){var r=t.block.table_of_contents;return e.createElement("div",{className:"rotion-tableofcontents"},r.color)},Yo=function(t){var r=t.block;if(!r.to_do)return e.createElement(e.Fragment,null);var a=r.to_do.checked;return e.createElement("div",{className:"rotion-todo"},e.createElement("div",{className:"rotion-todo-checkbox"},e.createElement(yi,{bool:a})),e.createElement("div",{className:"rotion-todo-text"},e.createElement("div",{className:"rotion-todo-text-inner ".concat(a?"rotion-todo-text-inner-checked":"")},r.to_do.rich_text.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})})))))},Zo=function(t){var r=t.open,a={transform:"rotateZ(".concat(r?180:90,"deg)")};return e.createElement("svg",{className:"rotion-toggle-icon",style:a,viewBox:"0 0 100 100"},e.createElement("polygon",{points:"5.9,88.2 50,11.8 94.1,88.2 "}))},Xo=function(t){var r=t.block,a=e.useState(!1),n=a[0],i=a[1],o=r.children.results.map((function(t,r){var a=t;return e.createElement(e.Fragment,null,a.paragraph.rich_text.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})})))}));return e.createElement("div",{className:"rotion-toggle"},e.createElement("div",{className:"rotion-toggle-triangle",onClick:function(){return i(!n)}},e.createElement(Zo,{open:n})),e.createElement("div",{className:"rotion-toggle-text"},e.createElement("div",null,r.toggle.rich_text.map((function(t,r){return e.createElement(mi,{textObject:t,key:"richtext-".concat(r)})}))),n?o:null))},Wo=function(t){var r=t.video,a=r.html,n=r.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html rotion-video-youtube",dangerouslySetInnerHTML:{__html:a}}),e.createElement(Co,{type:"video",caption:n})))},$o=function(t){var r=t.video,a=r.html,n=r.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html rotion-video-vimeo",dangerouslySetInnerHTML:{__html:a}}),e.createElement(Co,{type:"video",caption:n})))},Jo=function(t){var r=t.video,a=r.html,n=r.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html",dangerouslySetInnerHTML:{__html:a}}),e.createElement(Co,{type:"video",caption:n})))},Ko=function(t){var r=t.video,a=r.src,n=r.caption,i=r.videoType;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-file"},e.createElement("video",{controls:!0,preload:"metadata",width:"100%"},e.createElement("source",{src:a,type:i}),"Download the ",e.createElement("a",{href:a},"Video"))),e.createElement(Co,{type:"video",caption:n})))},Qo=function(t){var r=t.block,a=r.video;switch(null==a?void 0:a.type){case"file":return a.src?e.createElement(Ko,{video:a}):(console.log("The video source for this video block was undefined:",r),e.createElement(e.Fragment,null));case"external":return a.html?a.html.includes("youtube")?e.createElement(Wo,{video:a}):a.html.includes("vimeo")?e.createElement($o,{video:a}):e.createElement(Jo,{video:a}):(console.log("The html for this video block was undefined:",r),e.createElement(e.Fragment,null));default:return console.log("The video type is unknown:",r),e.createElement(e.Fragment,null)}},el={heading_1:"h2",heading_2:"h3",heading_3:"h4",bulleted_list_item:"li",numbered_list_item:"li",divider:"hr",paragraph:"p",code:"code",quote:"blockquote"},tl=function(t){var r=t.block,a=t.href,n=t.link,i=t.query,o=t.breadcrumb_hrefs;switch(r.type){case"bookmark":return e.createElement(so,{block:r,key:r.id});case"breadcrumb":return e.createElement(ho,{block:r,hrefs:o,link:n,query:i,key:r.id});case"bulleted_list_item":return e.createElement(uo,{block:r,key:r.id});case"callout":return e.createElement(fo,{block:r,href:a,link:n,query:i,key:r.id});case"child_database":return e.createElement(vo,{block:r,href:a,link:n,query:i,key:r.id});case"child_page":return e.createElement(yo,{block:r,href:a,link:n,key:r.id});case"code":return e.createElement(Mo,{block:r,key:r.id});case"column_list":return e.createElement(So,{block:r,href:a,link:n,query:i,key:r.id});case"embed":return e.createElement(Bo,{block:r,key:r.id});case"equation":return e.createElement(qo,{block:r,key:r.id});case"file":return e.createElement(Lo,{block:r,key:r.id});case"heading_1":case"heading_2":case"heading_3":case"paragraph":case"quote":case"divider":var l=el[r.type];return e.createElement(Oo,{tag:l,block:r,key:r.id});case"image":return e.createElement(Ho,{block:r,key:r.id});case"link_preview":return e.createElement(Do,{block:r,key:r.id});case"numbered_list_item":return e.createElement(jo,{block:r,key:r.id});case"pdf":return e.createElement(Po,{block:r,key:r.id});case"synced_block":return e.createElement(_o,{block:r,key:r.id});case"table":return e.createElement(Uo,{block:r,key:r.id});case"table_of_contents":return e.createElement(Go,{block:r,key:r.id});case"to_do":return e.createElement(Yo,{block:r,key:r.id});case"toggle":return e.createElement(Xo,{block:r,key:r.id});case"video":return e.createElement(Qo,{block:r,key:r.id});default:return console.log("unknown component: ".concat(r.type),r),e.createElement(e.Fragment,null)}},rl=function(t){var r=t.blocks,a=t.href,n=t.link,i=t.query,o=t.breadcrumb_hrefs,l=r.results,s={bulleted_list_item:"ul",numbered_list_item:"ol"},c=Object.keys(s),m=!1,h=[],u=[],p=function(e){var t,r=e+1;return c.includes((null===(t=l[r])||void 0===t?void 0:t.type)||"")};return l.map((function(t,r){var l=t;if(c.includes(l.type))if(m&&p(r))u.push(l);else if(m||!p(r)){if(m=!1,u.push(l),Object.keys(s).includes(l.type)){var d=s[l.type];h.push(function(t){var r=t.tag,a=t.blocks,n=t.href,i=t.link,o=t.query,l=r;return e.createElement(l,{className:"rotion-listblocks rotion-list-".concat(r),key:r+a[0].id},a.map((function(e){return tl({block:e,href:n,link:i,query:o})})))}({tag:d,blocks:u,href:a,link:n,query:i})),u=[]}}else m=!0,u.push(l);else{var f=tl({block:l,href:a,link:n,query:i,breadcrumb_hrefs:o});h.push(f)}return""})),e.createElement("div",{className:"rotion-blocks"},h)};exports.BookmarkBlock=so,exports.BreadcrumbBlock=ho,exports.Breadcrumbs=mo,exports.BuildPlainTextByPage=function(e){return e.results.map((function(e){return"type"in e&&"paragraph"===e.type?e.paragraph.rich_text:[]})).map((function(e){return e.map((function(e){return e.plain_text}))})).flat().join("")},exports.BulletedListBlock=uo,exports.CalloutBlock=fo,exports.Checkbox=yi,exports.ChildDatabaseBlock=vo,exports.ChildPageBlock=yo,exports.CodeBlock=Mo,exports.ColumnListBlock=So,exports.EmbedBlock=Bo,exports.EquationBlock=qo,exports.FileBlock=Lo,exports.Gallery=function(t){var r=t.keys,a=t.db,n=t.options;void 0===n&&(n={});var i=n.image;void 0===i&&(n.image={});var o=i||{},l=o.preview,s=void 0===l?"cover":l,c=o.fit,m=void 0===c||c,h=o.size,u=void 0===h?"medium":h;return n.image={preview:s,fit:m,size:u},e.createElement("div",{className:"rotion-gallery ".concat(m?"rotion-gallery-fit":"")},e.createElement("div",{className:"rotion-gallery-inner rotion-gallery-".concat(u)},a.results.map((function(t){return e.createElement(Bi,{key:t.id,keys:r,page:t,options:n})}))))},exports.GalleryCard=Bi,exports.GalleryCheckboxField=wi,exports.GalleryDateField=ui,exports.GalleryFormulaField=Si,exports.GalleryMultiSelectField=fi,exports.GalleryNumberField=ki,exports.GalleryRichTextField=pi,exports.GallerySelectField=Mi,exports.GalleryTitleField=hi,exports.GalleryUrlField=gi,exports.Icon=i,exports.ImageBlock=Ho,exports.LinkPreviewBlock=Do,exports.List=function(t){var r=t.keys,a=t.db,n=t.options;return e.createElement("div",{className:"rotion-list"},e.createElement("div",{className:"rotion-list-inner"},a.results.map((function(t){return e.createElement("div",{key:t.id,className:"rotion-list-line"},r.map((function(r,a){return e.createElement("div",{key:"".concat(t.id).concat(r),className:Yi(r,a)},e.createElement(Gi,{name:r,page:t,options:n}))})))}))))},exports.ListCheckboxField=Vi,exports.ListDateField=Oi,exports.ListFormulaField=_i,exports.ListMultiSelectField=Ri,exports.ListNumberField=Pi,exports.ListRichTextField=Hi,exports.ListSelectField=Di,exports.ListTitleField=Li,exports.ListUrlField=ji,exports.NumberedListBlock=jo,exports.Page=rl,exports.PdfBlock=Po,exports.PrefixSuffix=xi,exports.RichText=mi,exports.SyncedBlock=_o,exports.Table=function(t){var r=t.keys,a=t.db,n=t.options,i=function(e){return a.meta.properties[e]?a.meta.properties[e].type:'Unknown "'.concat(e,'"')},o=(n||{}).verticalLines,l=void 0===o||o;return e.createElement("div",{className:"rotion-table ".concat(l?"rotion-table-verticallines":"")},e.createElement("div",{className:"rotion-table-inner"},e.createElement("div",{className:"rotion-table-header rotion-table-row"},r.map((function(t,r){return e.createElement("div",{key:"".concat(t,"-").concat(r),className:"rotion-table-cell rotion-table-column".concat(r)},e.createElement("div",{className:"rotion-table-cell-inner"},e.createElement(Zi,{type:i(t),className:"rotion-table-header-icon"}),e.createElement("div",{className:"rotion-table-header-text"},t)))}))),a.results.map((function(t){return e.createElement("div",{key:t.id,className:"rotion-table-row"},r.map((function(r,a){return e.createElement("div",{key:"".concat(t.id).concat(r),className:"rotion-table-cell rotion-table-column".concat(a)},e.createElement("div",{className:"rotion-table-cell-inner"},e.createElement(lo,{name:r,page:t,options:n})))})))}))))},exports.TableBlock=Uo,exports.TableCheckboxField=ao,exports.TableDateField=$i,exports.TableFormulaField=io,exports.TableIcon=Zi,exports.TableMultiSelectField=Qi,exports.TableNumberField=no,exports.TableOfContentsBlock=Go,exports.TableRichTextField=Ji,exports.TableSelectField=to,exports.TableTitleField=Wi,exports.TableUrlField=ro,exports.TextBlock=Oo,exports.ToDoBlock=Yo,exports.ToggleBlock=Xo,exports.UsePagination=function(t,r){var a=e.useState(1),n=a[0],i=a[1],o=Math.ceil(t.length/r);return{next:function(){i((function(e){return Math.min(e+1,o)}))},currentData:function(){var e=(n-1)*r+r;return t.slice(void 0,e)},currentPage:n,maxPage:o}},exports.VideoBlock=Qo,exports.getDatetimeFormat=h,exports.getLinkPathAndLinkKey=s,exports.getSlug=c,exports.pathBasename=m,exports.queryToString=l,exports.splitUrl=u;
|
|
1
|
+
"use strict";var e=require("react"),t=require("mermaid"),i=require("prismjs"),r="undefined"!=typeof document?document.currentScript:null,s=function(t){var i=t.payload;if("user"!==i.mention.type)return e.createElement(e.Fragment,null);var r=i.mention.user;return"type"in r?e.createElement("span",{className:"rotion-richtext-user"},e.createElement("span",{className:"rotion-richtext-user-atsign"},"@"),r.name):e.createElement("span",{className:"rotion-richtext-user"},e.createElement("span",{className:"rotion-richtext-user-atsign"},"@"),i.plain_text.replace("@",""))},n=function(t){var i=t.name,r=t.width,s=t.height,n=t.className;switch(i){case"figma":return e.createElement("svg",{className:"rotion-icon-figma ".concat(n),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:r||"12px",height:s||"18px",viewBox:"0 0 200 300"},e.createElement("path",{d:"M50 300c27.6 0 50-22.4 50-50v-50H50c-27.6 0-50 22.4-50 50s22.4 50 50 50z",fill:"#0acf83"}),e.createElement("path",{d:"M0 150c0-27.6 22.4-50 50-50h50v100H50c-27.6 0-50-22.4-50-50z",fill:"#a259ff"}),e.createElement("path",{d:"M0 50C0 22.4 22.4 0 50 0h50v100H50C22.4 100 0 77.6 0 50z",fill:"#f24e1e"}),e.createElement("path",{d:"M100 0h50c27.6 0 50 22.4 50 50s-22.4 50-50 50h-50V0z",fill:"#ff7262"}),e.createElement("path",{d:"M200 150c0 27.6-22.4 50-50 50s-50-22.4-50-50 22.4-50 50-50 50 22.4 50 50z",fill:"#1abcfe"}));case"slack":return e.createElement("svg",{className:"rotion-icon-slack ".concat(n),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:r||"20px",height:s||"20px",viewBox:"0 0 140 140"},e.createElement("path",{d:"M27.2 80c0 7.3-5.9 13.2-13.2 13.2C6.7 93.2.8 87.3.8 80c0-7.3 5.9-13.2 13.2-13.2h13.2V80zm6.6 0c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2v33c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V80z",fill:"#E01E5A"}),e.createElement("path",{d:"M47 27c-7.3 0-13.2-5.9-13.2-13.2C33.8 6.5 39.7.6 47 .6c7.3 0 13.2 5.9 13.2 13.2V27H47zm0 6.7c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H13.9C6.6 60.1.7 54.2.7 46.9c0-7.3 5.9-13.2 13.2-13.2H47z",fill:"#36C5F0"}),e.createElement("path",{d:"M99.9 46.9c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H99.9V46.9zm-6.6 0c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V13.8C66.9 6.5 72.8.6 80.1.6c7.3 0 13.2 5.9 13.2 13.2v33.1z",fill:"#2EB67D"}),e.createElement("path",{d:"M80.1 99.8c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V99.8h13.2zm0-6.6c-7.3 0-13.2-5.9-13.2-13.2 0-7.3 5.9-13.2 13.2-13.2h33.1c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H80.1z",fill:"#ECB22E"}));case"github":return e.createElement("svg",{className:"rotion-icon-github ".concat(n),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:r||"20px",height:s||"20px",viewBox:"0 0 200 200",preserveAspectRatio:"xMidYMid meet"},e.createElement("g",{transform:"translate(0.000000,200.000000) scale(0.100000,-0.100000)",stroke:"none"},e.createElement("path",{d:"M899 1910 c-314 -38 -586 -232 -720 -515 -63 -133 -80 -205 -86 -356 -6 -144 10 -245 57 -367 88 -226 287 -429 503 -512 110 -43 117 -38 117 88 l0 97 -98 0 c-89 0 -102 2 -138 26 -27 18 -49 46 -72 90 -37 74 -54 96 -99 127 -39 28 -42 49 -9 58 43 10 110 -28 155 -90 46 -61 71 -82 122 -96 45 -13 138 5 145 28 3 10 15 38 28 63 l22 46 -76 17 c-220 47 -330 188 -330 425 0 81 19 150 59 213 29 45 30 51 21 100 -10 52 -7 95 12 157 10 33 11 33 56 28 25 -3 82 -24 128 -47 l82 -42 59 13 c79 16 232 17 324 0 76 -13 76 -13 116 13 50 34 148 68 182 64 20 -2 28 -11 37 -43 15 -49 17 -135 4 -169 -8 -21 -4 -34 25 -76 45 -67 57 -116 57 -225 -2 -235 -118 -376 -344 -416 -64 -12 -67 -13 -52 -30 34 -38 43 -91 44 -256 0 -133 3 -164 16 -177 21 -22 25 -21 115 18 147 64 292 181 385 311 50 70 109 196 136 290 19 68 23 104 23 235 0 188 -13 248 -90 405 -92 185 -230 325 -411 415 -144 72 -349 108 -505 90z"})));case"file":return e.createElement("svg",{className:"rotion-icon-file ".concat(n),width:r||"20px",height:s||"20px",viewBox:"0 0 16 16"},e.createElement("path",{d:"M4.35645 15.4678H11.6367C13.0996 15.4678 13.8584 14.6953 13.8584 13.2256V7.02539C13.8584 6.0752 13.7354 5.6377 13.1406 5.03613L9.55176 1.38574C8.97754 0.804688 8.50586 0.667969 7.65137 0.667969H4.35645C2.89355 0.667969 2.13477 1.44043 2.13477 2.91016V13.2256C2.13477 14.7021 2.89355 15.4678 4.35645 15.4678ZM4.46582 14.1279C3.80273 14.1279 3.47461 13.7793 3.47461 13.1436V2.99219C3.47461 2.36328 3.80273 2.00781 4.46582 2.00781H7.37793V5.75391C7.37793 6.73145 7.86328 7.20312 8.83398 7.20312H12.5186V13.1436C12.5186 13.7793 12.1836 14.1279 11.5205 14.1279H4.46582ZM8.95703 6.02734C8.67676 6.02734 8.56055 5.9043 8.56055 5.62402V2.19238L12.334 6.02734H8.95703ZM8.59473 12.7266V10.6279L8.54004 9.56152L9.06641 10.1152L9.59277 10.6484C9.68848 10.7646 9.8457 10.833 9.98926 10.833C10.2969 10.833 10.5293 10.6143 10.5293 10.3066C10.5293 10.1357 10.4678 10.0127 10.3379 9.90332L8.45117 8.16699C8.29395 8.02344 8.16406 7.96191 7.99316 7.96191C7.8291 7.96191 7.69922 8.02344 7.54199 8.16699L5.65527 9.90332C5.52539 10.0127 5.46387 10.1357 5.46387 10.3066C5.46387 10.6143 5.68945 10.833 6.00391 10.833C6.14746 10.833 6.29785 10.7646 6.40039 10.6484L6.92676 10.1152L7.45312 9.56152L7.39844 10.6279V12.7266C7.39844 13.0547 7.67188 13.3008 7.99316 13.3008C8.32129 13.3008 8.59473 13.0547 8.59473 12.7266Z"}));case"link":return e.createElement("svg",{className:"rotion-icon-link ".concat(n),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"13px",height:"13px",viewBox:"0 0 13 13",role:"graphics-symbol"},e.createElement("path",{d:"M6.30826 4.43292L1.76184 8.98454C1.76176 8.98462 1.76169 8.9847 1.76161 8.98477C1.76158 8.9848 1.76156 8.98482 1.76154 8.98484C1.46068 9.28584 1.25 9.6914 1.25 10.1565C1.25 10.6117 1.45865 11.0119 1.73417 11.2886C2.01014 11.5658 2.41107 11.7773 2.87078 11.7773C3.34169 11.7773 3.73758 11.5617 4.03477 11.2733L4.03482 11.2734L4.04244 11.2657L8.58864 6.72474V8.667C8.58864 9.51956 9.22729 10.2935 10.1521 10.2935C11.0528 10.2935 11.75 9.54534 11.75 8.66127V2.92671C11.75 2.48722 11.5981 2.06381 11.2838 1.74808C10.9689 1.43182 10.5446 1.27728 10.1006 1.27728H4.36028C3.46161 1.27728 2.72804 1.97749 2.72804 2.86942C2.72804 3.79734 3.51104 4.43292 4.35455 4.43292H6.30826Z",fill:"#3E3C38",stroke:"white",strokeWidth:"1.5"}));case"circledot":return e.createElement("svg",{className:"rotion-icon-circledot ".concat(n),xmlns:"http://www.w3.org/2000/svg",width:r||"15px",height:s||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"}));case"circlecheck":return e.createElement("svg",{className:"rotion-icon-circlecheck ".concat(n),xmlns:"http://www.w3.org/2000/svg",width:r||"15px",height:s||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369 209z"}));case"codemerge":return e.createElement("svg",{className:"rotion-icon-codemerge ".concat(n),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:r||"15px",height:s||"15px",viewBox:"0 0 448 512"},e.createElement("path",{d:"M80 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm32.4 97.2c28-12.4 47.6-40.5 47.6-73.2c0-44.2-35.8-80-80-80S0 35.8 0 80c0 32.8 19.7 61 48 73.3V358.7C19.7 371 0 399.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-32.8-19.7-61-48-73.3V272c26.7 20.1 60 32 96 32h86.7c12.3 28.3 40.5 48 73.3 48c44.2 0 80-35.8 80-80s-35.8-80-80-80c-32.8 0-61 19.7-73.3 48H208c-49.9 0-91-38.1-95.6-86.8zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM344 272a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"}));case"downloadfile":return e.createElement("svg",{className:"rotion-icon-downloadfile ".concat(n),xmlns:"http://www.w3.org/2000/svg",width:r||"15px",height:s||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3H304V160c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32v96H150.3C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z"}))}},a=function(t){var i=t.mention;return e.createElement("span",{className:"rotion-richtext-pageordb"},e.createElement("span",{className:"rotion-richtext-pageordb-icon"},"emoji"===i.icon.type&&i.icon.emoji,"emoji"!==i.icon.type&&e.createElement("img",{src:i.icon.src,className:"rotion-richtext-pageordb-img",alt:"icon"}),e.createElement(n,{name:"link",className:"rotion-richtext-pageordb-arrow"})),e.createElement("span",{className:"rotion-richtext-pageordb-title"},i.name))};function o(e){if(void 0===e)return"";var t=Object.entries(e).map((function(e){return"".concat(e[0],"=").concat(encodeURIComponent("".concat(e[1])))})).join("&");return"?".concat(t)}var l=function(e){var t=e.split("[");return""===e?["/",""]:t.length<2?[e,""]:[t[0],t[1].split("]")[0]]};function h(e,t){if(!("properties"in t))return"not-found-properties";if("id"===e)return t.id;if(!(e in t.properties))return"not-found-key-in-page-properties";var i=t.properties[e];return"rich_text"in i?i.rich_text.map((function(e){return e.text.content})).join(","):"not-found-richtext-in-key"}function c(e){var t=e.replace(/\/$/,""),i=t.substring(t.lastIndexOf("/")+1);return i.lastIndexOf("?")>0?i.substring(0,i.lastIndexOf("?")):i}function d(e){var t="MMMM D, YYYY",i="h:mm A";return e?(e.includes("ja")&&(t="YYYY年M月D日",i="H:mm"),{dateF:t,timeF:i}):{dateF:t,timeF:i}}function u(e){var t=e.replace(/https?:\/\//,"").split("/"),i="".concat(t.shift()),r=t.join("/");return{domain:i,omittedPath:"/".concat(r.length>12?"".concat(r.substring(0,3),"...").concat(r.substring(r.length-6)):r)}}var p=function(t){var i=t.url,r=t.text;return i.includes("slack.com")?e.createElement("a",{className:"rotion-richtext-linkpreview",href:i,rel:"noreferrer",target:"_blank"},e.createElement(n,{name:"slack",className:"rotion-richtext-linkpreview-icon",width:"17px",height:"17px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},"Message in Slack")):i.includes("figma.com")?e.createElement("a",{className:"rotion-richtext-linkpreview",href:i,rel:"noreferrer",target:"_blank"},e.createElement(n,{name:"figma",className:"rotion-richtext-linkpreview-icon",width:"10px",height:"16px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},c(r).replace(/-/g," "))):e.createElement("a",{className:"rotion-richtext-linkpreview",href:i,rel:"noreferrer",target:"_blank"},i.includes("github.com")&&e.createElement(n,{name:"github",className:"rotion-richtext-linkpreview-icon",width:"17px",height:"17px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},c(r)))};const m=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],b=["January","February","March","April","May","June","July","August","September","October","November","December"],v={"%a":e=>m[e.getDay()],"%A":e=>g[e.getDay()],"%b":e=>f[e.getMonth()],"%B":e=>b[e.getMonth()],"%p":e=>e.getHours()<12?"AM":"PM","%r":"%-I:%M:%S %p","%x":"%-m/%-d/%y","%X":"%-I:%M:%S %p"},y={year:"y",month:"M",week:"w",date:"D",day:"d",hour:"h",minute:"m",second:"s",millisecond:"ms"};Object.keys(y).forEach((e=>{const t=e+"s",i=y[e];i&&(y[t]=y[i]=i)}));const w=e=>y[e||"ms"]||y[String(e).toLowerCase()],x={h:36e5,m:6e4,s:1e3,ms:1},A={y:e=>e.getFullYear(),M:e=>e.getMonth(),D:e=>e.getDate(),d:e=>e.getDay(),h:e=>e.getHours(),m:e=>e.getMinutes(),s:e=>e.getSeconds(),ms:e=>e.getMilliseconds(),TZO:e=>e.getTimezoneOffset(),T:e=>e.getTime()},k=A.d,E=["Su","Mo","Tu","We","Th","Fr","Sa"],S=["th","st","nd","rd"],C={YY:"%y",YYYY:"%Y",M:"%-m",MM:"%m",MMM:"%b",MMMM:"%B",D:"%-d",Do:e=>{return(t=e.getDate())+(S[t]||t>20&&S[t%10]||S[0]);var t},DD:"%d",d:"%w",dd:e=>E[k(e)],ddd:"%a",dddd:"%A",H:"%-H",HH:"%H",h:"%-I",hh:"%I",m:"%-M",mm:"%M",s:"%-S",ss:"%S",SSS:"%L",Z:"%:z",ZZ:"%z",A:"%p",a:"%P",X:"%s",x:A.T},M=e=>{let t={};return i=>t[i]||(t[i]=e(i))},_=(()=>{const e="2-digit",t="medium",i="numeric",r="short",s="long",n={a:{weekday:r},A:{weekday:s},b:{month:r},B:{month:s},c:{weekday:r,year:i,month:r,day:i,hour:e,minute:e,second:e},p:{hour:i,hour12:!0},r:{timeStyle:t,hour12:!0},x:{dateStyle:r},X:{timeStyle:t}};return Object.keys(n).forEach((e=>n[e].timeZone="UTC")),n})(),T=M((e=>{const t=(t,i,r)=>{let s;const n=i=>{const n=i.getTimezoneOffset(),a=new Date(+i-6e4*n);if(s||(s=new Intl.DateTimeFormat(e,t)),r){const e=s.formatToParts(a).find((e=>e.type===r));return e&&e.value}const o=s.format(a);if(o)return o.replace(/\s+UTC$/,"")};if(!i)return n;const a={};return e=>{const t=i(e);return a[t]||(a[t]=n(e))}},i=e=>e.getDay(),r=e=>e.getMonth();return{"%a":t(_.a,i),"%A":t(_.A,i),"%b":t(_.b,r),"%B":t(_.B,r),"%c":t(_.c),"%p":t(_.p,(e=>e.getHours()),"dayPeriod"),"%r":t(_.r),"%x":t(_.x),"%X":t(_.X)}})),N=/%(?:[EO]\w|[0_#^-]?[1-9]?\w|::?z|[%+])/g,I=(()=>{let e=["\\[(.*?)\\]","[A-Za-z]o"];const t=e=>String.fromCharCode(e+65)+"+";for(let i=0;i<26;i++)e.push(t(i),t(i+32));return new RegExp(e.join("|"),"g")})(),L={ISO:"%Y-%m-%dT%H:%M:%S.%L%:z",undef:"YYYY-MM-DDTHH:mm:ssZ",NaN:new Date(NaN)+""},P=e=>{const t=(t,i)=>{let s=e(t);if("string"==typeof s){const t=e(s);null!=t&&(s=t)}return"function"==typeof s?s(i):null==s?t:r(s,i)},i={},r=(e,i)=>e.replace(N,(e=>t(e,i)));return i.strftime=(e,i)=>isNaN(+i)?t("NaN",i):null==e?t("ISO",i):r(e,i),i.format=(i,r)=>isNaN(+r)?t("NaN",r):(null==i&&(i=String(e("undef"))),i.replace(I,((e,i)=>i||t(e,r)))),i.handler=t=>{return P((r=e,(i=(s=t)&&(e=>s[e]))&&r?e=>i(e)||r(e):i||r));var i,r,s},i},R=P().handler(L).handler(v).handler(C).handler((()=>{const e=e=>t=>("0"+e(t)).substr(-2),t=e=>t=>(" "+e(t)).substr(-2),i=e=>t=>("00"+e(t)).substr(-3),r=A.y,s=A.M,n=A.D,a=A.d,o=A.h,l=A.m,h=A.s,c=A.ms,d=A.T,u=A.TZO,p=e=>Math.floor(r(e)/100),m=e=>(o(e)+11)%12+1,g=e=>s(e)+1,f=e=>r(e)%100,b=e=>e<10?"0"+e:e,v=(e,t)=>i=>{let r=-u(i);const s=r<0;s&&(r=-r);const n=Math.floor(r/60),a=Math.floor(r%60),o=t?e+b(Math.floor(r%1*60)):"";return(s?"-":"+")+b(n)+e+b(a)+o},y={"%c":"%a %b %e %T %Y","%-C":p,"%C":e(p),"%-d":n,"%d":e(n),"%D":"%m/%d/%y","%e":t(n),"%F":"%Y-%m-%d","%-H":o,"%H":e(o),"%-I":m,"%I":e(m),"%k":t(o),"%l":t(m),"%-L":i(c),"%L":i(c),"%-m":g,"%m":e(g),"%-M":l,"%M":e(l),"%P":e=>o(e)<12?"am":"pm","%R":"%H:%M","%s":e=>Math.floor(d(e)/1e3),"%-S":h,"%S":e(h),"%T":"%H:%M:%S","%-y":f,"%y":e(f),"%-Y":r,"%Y":(w=r,e=>{let t=w(e);if(0<=t&&t<=9999)return("000"+t).substr(-4);let i="+";return t<0&&(i="-",t=-t),i+("00000"+t).substr(-6)}),"%u":e=>(a(e)+6)%7+1,"%v":"%e-%b-%Y","%w":a,"%::z":v(":",!0),"%:z":v(":"),"%z":v(""),"%%":()=>"%","%n":()=>"\n","%t":()=>"\t"};var w;const x=(e,t)=>{t.split("").forEach((t=>y[e+t]=y["%"+t]))};return x("%E","cCxXyY"),x("%O","deHImMSuUVwWy"),y})());R.strftime;const D=e=>e&&e.tx||R,F=(e,t)=>{const i=e.getFullYear(),r=e.getMonth(),s=e.getDate(),n=new Date(i,r,1),a=+n,o=12*i+r+t;n.setFullYear(Math.floor(o/12));const l=o%12;n.setMonth(l);const h=Math.round((+n-a)/864e5);z(e,h);const c=e.getDate();l!==e.getMonth()&&s>c&&z(e,-c)},z=(e,t)=>{const i=e.getTimezoneOffset();e.setTime(+e+864e5*t);const r=e.getTimezoneOffset();i!==r&&e.setTime(+e+6e4*(r-i))},O=(e,t,i)=>{if(!t)return;const r=w(i),s=x[r];if(s)e.setTime(+e+t*s);else switch(r){case"y":return F(e,12*t);case"M":return F(e,t);case"w":return z(e,7*t);case"D":case"d":return z(e,t)}},B=e=>{H(e),O(e,1-e.getDate(),"day")},H=e=>{const t=e.getTimezoneOffset();q(e,864e5);const i=e.getTimezoneOffset();t!==i&&e.setTime(+e+6e4*(i-t))},q=(e,t)=>{const i=6e4*e.getTimezoneOffset();e.setTime(Math.floor((+e-i)/t)*t+i)},j=(e,t)=>{const i=w(t),r=x[i];if(r)return q(e,r);switch(i){case"y":return B(e),O(e,-e.getMonth(),"M");case"M":return B(e);case"w":return H(e),O(e,-e.getDay(),"d");case"D":case"d":return H(e)}},V={su:0,mo:1,tu:2,we:3,th:4,fr:5,sa:6},U=(e,t)=>{const i=e.formatToParts(t),r={};i.forEach((e=>r[e.type]=e.value));const s=V[(n=r.weekday,String(n).toLowerCase().substr(0,2))];var n;let a=(7+t.getUTCDay()-s)%7;a>3&&(a-=7);return-(60*(24*a+(t.getUTCHours()-r.hour%24))+(t.getUTCMinutes()-r.minute)+(t.getUTCSeconds()-r.second)/60)},G=M((e=>{let t,i={},r=0;return s=>{const n=Math.floor(s/9e5);let a=i&&i[n];if(null!=a)return a;r++>96&&(i={},r=0);const o=new Date(s);if(!t){const i="numeric";t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,weekday:"short",hour:i,minute:i,second:i})}return a=U(t,o),null==a&&(a=-o.getTimezoneOffset()),i[n]=a,a}}));class ${constructor(e){this.dt=new Date(e)}valueOf(){return+this.dt}setTime(e){return this.dt.setTime(e)}getTimezoneOffset(){return 0}getMilliseconds(){return this.dt.getUTCMilliseconds()}getSeconds(){return this.dt.getUTCSeconds()}getMinutes(){return this.dt.getUTCMinutes()}getHours(){return this.dt.getUTCHours()}getDay(){return this.dt.getUTCDay()}getDate(){return this.dt.getUTCDate()}getMonth(){return this.dt.getUTCMonth()}getFullYear(){return this.dt.getUTCFullYear()}getTime(){return+this}}class W extends ${constructor(e,t){const i=t(e);super(e+6e4*i),this.t=e,this.tzf=t,this.tzo=i}valueOf(){return this.t}setTime(e){const t=this.tzo=this.tzf(e);return this.dt.setTime(+e+6e4*t),this.t=e}getTimezoneOffset(){return-this.tzo}}const X=(e,t,i)=>{const r=e.ro(),s=t.rw();return Y(r,s,i),t.create(s)},Y=(e,t,i)=>{const r=K(e),s=K(t);if(r===s)return;if(O(t,s-r,"m"),!i)return;const n=K(t);s!==n&&O(t,n-s,"m")},K=A.TZO,Z=M((e=>{if("number"==typeof e)-16<e&&e<16&&(e*=60);else{const t=String(e).match(/(?:^|GMT)?(?:([+-])([01]?\d):?(\d[05])|$)|(UTC|Z)$/);if(!t)return;e=60*+t[2]+ +t[3]|0,"-"===t[1]&&(e=0-e)}return t=>e}));const J=e=>t=>(null==t?t=new Date:"string"==typeof t&&(t=+Q(t,e.x.rw)),e.create(+t)),Q=(e,t)=>{const i=e.match(/^(\d{4}|[-+]\d{4,6})(?:(-)(\d{2})(?:-(\d{2})(?:T((\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?))?)?)?$/)||e.match(/^(\d{4}|[-+]\d{4,6})(?:([-/])(\d+)(?:\2(\d+)(?:\s+((\d+):(\d+)(?::(\d+)(\.\d+)?)?))?)?)?$/);if(!i)return new Date(e);const r=+i[1]||0,s=+i[3]-1||0,n=+i[4]||1,a=+i[6]||0,o=+i[7]||0,l=+i[8]||0,h=1e3*+i[9]||0,c=0<=r&&r<100?100:0;if(t){const e=new Date(Date.UTC(r+c,s,n,a,o,l,h));c&&e.setUTCFullYear(r);const i=new $(+e),d=t(+e);return Y(i,d,!0),d}{const e=new Date(r+c,s,n,a,o,l,h);return c&&e.setFullYear(r),e}},ee=new class{constructor(e,t){this.t=e,"number"!=typeof e&&(this.d=e),this.x=t||Object.create({cdate:{}})}cdateFn(){return J(this)}rw(){const e=+this.t,t=this.x.rw;return t?t(e):new Date(e)}ro(){return this.d||(this.d=this.rw())}valueOf(){return+this.ro()}toDate(){return new Date(+this)}toJSON(){return this.toDate().toJSON()}plugin(e){const t=this.constructor;return new(e(t)||t)(this.t,this.x)}create(e){return new this.constructor(e,this.x)}inherit(){const e=this.create(+this);return e.x=Object.create(e.x),e}}(0,null).plugin((e=>class extends e{handler(e){const t=this.inherit(),{x:i}=t;return i.tx=D(i).handler(e),t}format(e){return D(this.x).format(e,this.ro())}text(e){return D(this.x).strftime(e,this.ro())}locale(e){return this.handler(T(e))}})).plugin((e=>class extends e{get(e){const t=A[w(e)];if(t)return t(this.ro())}set(e,t){e=w(e);const i=A[e];if(!i)return this;const r=this.rw();return O(r,t-i(r),e),this.create(r)}startOf(e){if(!(e=w(e)))return this;const t=this.rw();return j(t,e),this.create(t)}endOf(e){if(!(e=w(e)))return this;const t=this.rw();return j(t,e),O(t,1,e),O(t,-1),this.create(t)}add(e,t){if(!(t=w(t)))return this;const i=this.rw();return O(i,e,t),this.create(i)}next(e){return this.add(1,e)}prev(e){return this.add(-1,e)}})).plugin((e=>class extends e{utc(e){const t=this.inherit();return t.x.rw=e=>new $(+e),e?X(this,t):t}utcOffset(e,t){if(null==e)return 0-K(this.ro());const i=this.inherit();return i.x.rw=t=>new W(+t,Z(e)),t?X(this,i):i}tz(e,t){const i=this.inherit();return i.x.rw=t=>new W(+t,G(e)),t?X(this,i,!0):i}})).cdateFn(),te={labels:{yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",next:"Next",last:"Last",week:"dddd",others:"MMMM D, YYYY",past:"%s ago",future:"in %s",seconds:"seconds",minutes:"minutes",hours:"hours",days:"days",months:"months",years:"years"}};const ie={R:e=>function(e,t=te){const i="X",r=e.toString(),{specificNow:s,labels:n}={specificNow:t.specificNow,labels:{...te.labels,...t.labels}},a=s||new Date(Date.now()),o=ee(a),l=o.format(n.others),h=o.add(-1,"day").format(n.others),c=o.add(1,"day").format(n.others),d=-a.getTimezoneOffset(),u=ee(r).utcOffset(d),p=u.format(i);switch(u.format(n.others)){case l:return n.today;case h:return n.yesterday;case c:return n.tomorrow}const m=u.format(n.week),g=u.format(n.others),f=o.add(-1,"week").startOf("week"),b=o.add(-1,"week").endOf("week"),v=f.format(i),y=b.format(i);if(v<=p&&p<=y)return`${n.last} ${m}`;const w=o.startOf("week"),x=o.endOf("week"),A=w.format(i),k=x.format(i);if(A<=p&&p<=k)return m;const E=o.add(1,"week").startOf("week"),S=o.add(1,"week").endOf("week"),C=E.format(i),M=S.format(i);return C<=p&&p<=M?`${n.next} ${m}`:g}(e,{labels:re}),F:e=>function(e,t=te){const i=e.toString(),{specificNow:r,labels:s}={specificNow:t.specificNow,labels:{...te.labels,...t.labels}},n=3600,a=86400,o=2592e3,l=31536e3,h=r||new Date(Date.now()),c=+ee(h).format("X"),d=+ee(i).format("X"),u=c<d?d-c:c-d;let p="";switch(!0){case u<60:p=`${u} ${s.seconds}`;break;case u<n:p=`${Math.floor(u/60)} ${s.minutes}`;break;case u<a:p=`${Math.floor(u/n)} ${s.hours}`;break;case u<o:p=`${Math.floor(u/a)} ${s.days}`;break;case u<l:p=`${Math.floor(u/o)} ${s.months}`;break;default:p=`${Math.floor(u/l)} ${s.years}`}return(c<d?s.future:s.past).replace("%s",p)}(e,{labels:re})};var re,se=function(t){var i=t.dateOrDateTime,r=t.prefix;if(!i)return e.createElement(e.Fragment,null);var s=ee().handler(ie).cdateFn();return e.createElement("span",null,r,e.createElement("span",{title:s(i).format()},s(i).format(i.length>10?"R HH:mm A":"R")))},ne=function(t){var i=t.date,r=i.start,s=i.end,n=i.time_zone;return e.createElement("span",{className:"rotion-richtext-date"},e.createElement("span",{className:"rotion-richtext-atsign"},"@"),e.createElement(se,{dateOrDateTime:r}),null!==s&&e.createElement(se,{dateOrDateTime:s,prefix:" → "}),null!==n&&"(".concat(n,")"))},ae=function(t){var i=t.text,r=t.children;return e.createElement("span",{className:"rotion-mention-template"},i,r)},oe=function(t){var i=t.textObject,r=t.children;if(!i)return e.createElement(e.Fragment,null);switch(i.mention.type){case"user":return e.createElement(s,{payload:i});case"date":return e.createElement(ne,{date:i.mention.date});case"link_preview":return e.createElement(p,{url:i.mention.link_preview.url,text:i.plain_text});case"page":return e.createElement(a,{mention:i.mention.page});case"database":return e.createElement(a,{mention:i.mention.database});case"template_mention":return e.createElement(ae,{text:i.plain_text},r);default:return console.log("unsupport mention: ".concat(i.mention)),e.createElement(e.Fragment,null)}},le=function(t){var i=t.condition,r=t.textObject,s=t.children;return i?function(t){var i=t.textObject,r=t.children;return e.createElement("a",{className:"rotion-richtext-link",href:i.href,rel:"noreferrer",target:"_blank"},r)}({textObject:r,children:s}):function(t){var i=t.children;return e.createElement(e.Fragment,null,i)}({children:s})},he=function(t){var i=t.textObject,r=t.children;if(!i)return e.createElement(e.Fragment,null);var s=i.annotations,n=s.color,a=["rotion-richtext-annot"];if(a.push(s.code&&"default"===n?"":"rotion-richtext-".concat(n.replace("_background","-bg"))),s.bold&&a.push("rotion-richtext-bold"),s.italic&&a.push("rotion-richtext-italic"),s.strikethrough&&a.push("rotion-richtext-strikethrough"),s.underline&&a.push("rotion-richtext-underline"),s.code&&a.push("rotion-richtext-code ".concat("default"===n||n.includes("background")?"rotion-richtext-code-color":"")),!s.code&&n.includes("background")&&a.push("rotion-richtext-nocode-bg"),r)return e.createElement("span",{className:a.join(" ")},r);var o=i.plain_text.replace(/\n/g,"<br />");return e.createElement("span",{className:a.join(" "),dangerouslySetInnerHTML:{__html:o}})},ce=function(t){var i=t.textObject,r=i.href;return e.createElement(le,{condition:null!==r,textObject:i},e.createElement(he,{textObject:i}))};class de{constructor(e,t,i){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=i}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new de(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class ue{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new ue(t,de.range(this,e))}}class pe{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var i,r,s="KaTeX parse error: "+e,n=t&&t.loc;if(n&&n.start<=n.end){var a=n.lexer.input;i=n.start,r=n.end,i===a.length?s+=" at end of input: ":s+=" at position "+(i+1)+": ";var o=a.slice(i,r).replace(/[^]/g,"$&̲");s+=(i>15?"…"+a.slice(i-15,i):a.slice(0,i))+o+(r+15<a.length?a.slice(r,r+15)+"…":a.slice(r))}var l=new Error(s);return l.name="ParseError",l.__proto__=pe.prototype,l.position=i,null!=i&&null!=r&&(l.length=r-i),l.rawMessage=e,l}}pe.prototype.__proto__=Error.prototype;var me=/([A-Z])/g,ge={"&":"&",">":">","<":"<",'"':""","'":"'"},fe=/[&><"']/g;var be=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},ve={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(fe,(e=>ge[e]))},hyphenate:function(e){return e.replace(me,"-$1").toLowerCase()},getBaseElem:be,isCharacterBox:function(e){var t=be(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},ye={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function we(e){if(e.default)return e.default;var t=e.type,i=Array.isArray(t)?t[0]:t;if("string"!=typeof i)return i.enum[0];switch(i){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class xe{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},ye)if(ye.hasOwnProperty(t)){var i=ye[t];this[t]=void 0!==e[t]?i.processor?i.processor(e[t]):e[t]:we(i)}}reportNonstrict(e,t,i){var r=this.strict;if("function"==typeof r&&(r=r(e,t,i)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new pe("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"warn"===r?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,i){var r=this.strict;if("function"==typeof r)try{r=r(e,t,i)}catch(e){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=ve.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var i="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(i)}}class Ae{constructor(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}sup(){return ke[Ee[this.id]]}sub(){return ke[Se[this.id]]}fracNum(){return ke[Ce[this.id]]}fracDen(){return ke[Me[this.id]]}cramp(){return ke[_e[this.id]]}text(){return ke[Te[this.id]]}isTight(){return this.size>=2}}var ke=[new Ae(0,0,!1),new Ae(1,0,!0),new Ae(2,1,!1),new Ae(3,1,!0),new Ae(4,2,!1),new Ae(5,2,!0),new Ae(6,3,!1),new Ae(7,3,!0)],Ee=[4,5,4,5,6,7,6,7],Se=[5,5,5,5,7,7,7,7],Ce=[2,3,4,5,6,7,6,7],Me=[3,3,5,5,7,7,7,7],_e=[1,1,3,3,5,5,7,7],Te=[0,1,2,3,2,3,2,3],Ne={DISPLAY:ke[0],TEXT:ke[2],SCRIPT:ke[4],SCRIPTSCRIPT:ke[6]},Ie=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var Le=[];function Pe(e){for(var t=0;t<Le.length;t+=2)if(e>=Le[t]&&e<=Le[t+1])return!0;return!1}Ie.forEach((e=>e.blocks.forEach((e=>Le.push(...e)))));var Re=80,De={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class Fe{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return ve.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var ze={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Oe={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Be={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function He(e,t,i){if(!ze[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),s=ze[t][r];if(!s&&e[0]in Be&&(r=Be[e[0]].charCodeAt(0),s=ze[t][r]),s||"text"!==i||Pe(r)&&(s=ze[t][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var qe={};var je=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Ve=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ue=function(e,t){return t.size<2?e:je[e-1][t.size-1]};class Ge{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||Ge.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Ve[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return new Ge(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ue(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Ve[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ue(Ge.BASESIZE,e);return this.size===t&&this.textSize===Ge.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Ge.BASESIZE?["sizing","reset-size"+this.size,"size"+Ge.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!qe[t=e>=5?0:e>=3?1:2]){var i=qe[t]={cssEmPerMu:Oe.quad[t]/18};for(var r in Oe)Oe.hasOwnProperty(r)&&(i[r]=Oe[r][t])}return qe[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Ge.BASESIZE=6;var $e={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},We={ex:!0,em:!0,mu:!0},Xe=function(e){return"string"!=typeof e&&(e=e.unit),e in $e||e in We||"ex"===e},Ye=function(e,t){var i;if(e.unit in $e)i=$e[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)i=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new pe("Invalid unit: '"+e.unit+"'");i=r.fontMetrics().quad}r!==t&&(i*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)},Ke=function(e){return+e.toFixed(4)+"em"},Ze=function(e){return e.filter((e=>e)).join(" ")},Je=function(e,t,i){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=i||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},Qe=function(e){var t=document.createElement(e);for(var i in t.className=Ze(this.classes),this.style)this.style.hasOwnProperty(i)&&(t.style[i]=this.style[i]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var s=0;s<this.children.length;s++)t.appendChild(this.children[s].toNode());return t},et=/[\s"'>/=\x00-\x1f]/,tt=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+ve.escape(Ze(this.classes))+'"');var i="";for(var r in this.style)this.style.hasOwnProperty(r)&&(i+=ve.hyphenate(r)+":"+this.style[r]+";");for(var s in i&&(t+=' style="'+ve.escape(i)+'"'),this.attributes)if(this.attributes.hasOwnProperty(s)){if(et.test(s))throw new pe("Invalid attribute name '"+s+"'");t+=" "+s+'="'+ve.escape(this.attributes[s])+'"'}t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</"+e+">"};class it{constructor(e,t,i,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Je.call(this,e,i,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return ve.contains(this.classes,e)}toNode(){return Qe.call(this,"span")}toMarkup(){return tt.call(this,"span")}}class rt{constructor(e,t,i,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Je.call(this,t,r),this.children=i||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return ve.contains(this.classes,e)}toNode(){return Qe.call(this,"a")}toMarkup(){return tt.call(this,"a")}}class st{constructor(e,t,i){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=i}hasClass(e){return ve.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+ve.escape(this.src)+'" alt="'+ve.escape(this.alt)+'"',t="";for(var i in this.style)this.style.hasOwnProperty(i)&&(t+=ve.hyphenate(i)+":"+this.style[i]+";");return t&&(e+=' style="'+ve.escape(t)+'"'),e+="'/>"}}var nt={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class at{constructor(e,t,i,r,s,n,a,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=i||0,this.italic=r||0,this.skew=s||0,this.width=n||0,this.classes=a||[],this.style=o||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<Ie.length;t++)for(var i=Ie[t],r=0;r<i.blocks.length;r++){var s=i.blocks[r];if(e>=s[0]&&e<=s[1])return i.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=nt[this.text])}hasClass(e){return ve.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var i in this.italic>0&&((t=document.createElement("span")).style.marginRight=Ke(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=Ze(this.classes)),this.style)this.style.hasOwnProperty(i)&&((t=t||document.createElement("span")).style[i]=this.style[i]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=ve.escape(Ze(this.classes)),t+='"');var i="";for(var r in this.italic>0&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(i+=ve.hyphenate(r)+":"+this.style[r]+";");i&&(e=!0,t+=' style="'+ve.escape(i)+'"');var s=ve.escape(this.text);return e?(t+=">",t+=s,t+="</span>"):s}}class ot{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var i=0;i<this.children.length;i++)e.appendChild(this.children[i].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+ve.escape(this.attributes[t])+'"');e+=">";for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+="</svg>"}}class lt{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",De[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+ve.escape(this.alternate)+'"/>':'<path d="'+ve.escape(De[this.pathName])+'"/>'}}class ht{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+ve.escape(this.attributes[t])+'"');return e+="/>"}}function ct(e){if(e instanceof at)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var dt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ut={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},pt={math:{},text:{}};function mt(e,t,i,r,s,n){pt[e][s]={font:t,group:i,replace:r},n&&r&&(pt[e][r]=pt[e][s])}var gt="math",ft="text",bt="main",vt="ams",yt="accent-token",wt="bin",xt="close",At="inner",kt="mathord",Et="op-token",St="open",Ct="punct",Mt="rel",_t="spacing",Tt="textord";mt(gt,bt,Mt,"≡","\\equiv",!0),mt(gt,bt,Mt,"≺","\\prec",!0),mt(gt,bt,Mt,"≻","\\succ",!0),mt(gt,bt,Mt,"∼","\\sim",!0),mt(gt,bt,Mt,"⊥","\\perp"),mt(gt,bt,Mt,"⪯","\\preceq",!0),mt(gt,bt,Mt,"⪰","\\succeq",!0),mt(gt,bt,Mt,"≃","\\simeq",!0),mt(gt,bt,Mt,"∣","\\mid",!0),mt(gt,bt,Mt,"≪","\\ll",!0),mt(gt,bt,Mt,"≫","\\gg",!0),mt(gt,bt,Mt,"≍","\\asymp",!0),mt(gt,bt,Mt,"∥","\\parallel"),mt(gt,bt,Mt,"⋈","\\bowtie",!0),mt(gt,bt,Mt,"⌣","\\smile",!0),mt(gt,bt,Mt,"⊑","\\sqsubseteq",!0),mt(gt,bt,Mt,"⊒","\\sqsupseteq",!0),mt(gt,bt,Mt,"≐","\\doteq",!0),mt(gt,bt,Mt,"⌢","\\frown",!0),mt(gt,bt,Mt,"∋","\\ni",!0),mt(gt,bt,Mt,"∝","\\propto",!0),mt(gt,bt,Mt,"⊢","\\vdash",!0),mt(gt,bt,Mt,"⊣","\\dashv",!0),mt(gt,bt,Mt,"∋","\\owns"),mt(gt,bt,Ct,".","\\ldotp"),mt(gt,bt,Ct,"⋅","\\cdotp"),mt(gt,bt,Tt,"#","\\#"),mt(ft,bt,Tt,"#","\\#"),mt(gt,bt,Tt,"&","\\&"),mt(ft,bt,Tt,"&","\\&"),mt(gt,bt,Tt,"ℵ","\\aleph",!0),mt(gt,bt,Tt,"∀","\\forall",!0),mt(gt,bt,Tt,"ℏ","\\hbar",!0),mt(gt,bt,Tt,"∃","\\exists",!0),mt(gt,bt,Tt,"∇","\\nabla",!0),mt(gt,bt,Tt,"♭","\\flat",!0),mt(gt,bt,Tt,"ℓ","\\ell",!0),mt(gt,bt,Tt,"♮","\\natural",!0),mt(gt,bt,Tt,"♣","\\clubsuit",!0),mt(gt,bt,Tt,"℘","\\wp",!0),mt(gt,bt,Tt,"♯","\\sharp",!0),mt(gt,bt,Tt,"♢","\\diamondsuit",!0),mt(gt,bt,Tt,"ℜ","\\Re",!0),mt(gt,bt,Tt,"♡","\\heartsuit",!0),mt(gt,bt,Tt,"ℑ","\\Im",!0),mt(gt,bt,Tt,"♠","\\spadesuit",!0),mt(gt,bt,Tt,"§","\\S",!0),mt(ft,bt,Tt,"§","\\S"),mt(gt,bt,Tt,"¶","\\P",!0),mt(ft,bt,Tt,"¶","\\P"),mt(gt,bt,Tt,"†","\\dag"),mt(ft,bt,Tt,"†","\\dag"),mt(ft,bt,Tt,"†","\\textdagger"),mt(gt,bt,Tt,"‡","\\ddag"),mt(ft,bt,Tt,"‡","\\ddag"),mt(ft,bt,Tt,"‡","\\textdaggerdbl"),mt(gt,bt,xt,"⎱","\\rmoustache",!0),mt(gt,bt,St,"⎰","\\lmoustache",!0),mt(gt,bt,xt,"⟯","\\rgroup",!0),mt(gt,bt,St,"⟮","\\lgroup",!0),mt(gt,bt,wt,"∓","\\mp",!0),mt(gt,bt,wt,"⊖","\\ominus",!0),mt(gt,bt,wt,"⊎","\\uplus",!0),mt(gt,bt,wt,"⊓","\\sqcap",!0),mt(gt,bt,wt,"∗","\\ast"),mt(gt,bt,wt,"⊔","\\sqcup",!0),mt(gt,bt,wt,"◯","\\bigcirc",!0),mt(gt,bt,wt,"∙","\\bullet",!0),mt(gt,bt,wt,"‡","\\ddagger"),mt(gt,bt,wt,"≀","\\wr",!0),mt(gt,bt,wt,"⨿","\\amalg"),mt(gt,bt,wt,"&","\\And"),mt(gt,bt,Mt,"⟵","\\longleftarrow",!0),mt(gt,bt,Mt,"⇐","\\Leftarrow",!0),mt(gt,bt,Mt,"⟸","\\Longleftarrow",!0),mt(gt,bt,Mt,"⟶","\\longrightarrow",!0),mt(gt,bt,Mt,"⇒","\\Rightarrow",!0),mt(gt,bt,Mt,"⟹","\\Longrightarrow",!0),mt(gt,bt,Mt,"↔","\\leftrightarrow",!0),mt(gt,bt,Mt,"⟷","\\longleftrightarrow",!0),mt(gt,bt,Mt,"⇔","\\Leftrightarrow",!0),mt(gt,bt,Mt,"⟺","\\Longleftrightarrow",!0),mt(gt,bt,Mt,"↦","\\mapsto",!0),mt(gt,bt,Mt,"⟼","\\longmapsto",!0),mt(gt,bt,Mt,"↗","\\nearrow",!0),mt(gt,bt,Mt,"↩","\\hookleftarrow",!0),mt(gt,bt,Mt,"↪","\\hookrightarrow",!0),mt(gt,bt,Mt,"↘","\\searrow",!0),mt(gt,bt,Mt,"↼","\\leftharpoonup",!0),mt(gt,bt,Mt,"⇀","\\rightharpoonup",!0),mt(gt,bt,Mt,"↙","\\swarrow",!0),mt(gt,bt,Mt,"↽","\\leftharpoondown",!0),mt(gt,bt,Mt,"⇁","\\rightharpoondown",!0),mt(gt,bt,Mt,"↖","\\nwarrow",!0),mt(gt,bt,Mt,"⇌","\\rightleftharpoons",!0),mt(gt,vt,Mt,"≮","\\nless",!0),mt(gt,vt,Mt,"","\\@nleqslant"),mt(gt,vt,Mt,"","\\@nleqq"),mt(gt,vt,Mt,"⪇","\\lneq",!0),mt(gt,vt,Mt,"≨","\\lneqq",!0),mt(gt,vt,Mt,"","\\@lvertneqq"),mt(gt,vt,Mt,"⋦","\\lnsim",!0),mt(gt,vt,Mt,"⪉","\\lnapprox",!0),mt(gt,vt,Mt,"⊀","\\nprec",!0),mt(gt,vt,Mt,"⋠","\\npreceq",!0),mt(gt,vt,Mt,"⋨","\\precnsim",!0),mt(gt,vt,Mt,"⪹","\\precnapprox",!0),mt(gt,vt,Mt,"≁","\\nsim",!0),mt(gt,vt,Mt,"","\\@nshortmid"),mt(gt,vt,Mt,"∤","\\nmid",!0),mt(gt,vt,Mt,"⊬","\\nvdash",!0),mt(gt,vt,Mt,"⊭","\\nvDash",!0),mt(gt,vt,Mt,"⋪","\\ntriangleleft"),mt(gt,vt,Mt,"⋬","\\ntrianglelefteq",!0),mt(gt,vt,Mt,"⊊","\\subsetneq",!0),mt(gt,vt,Mt,"","\\@varsubsetneq"),mt(gt,vt,Mt,"⫋","\\subsetneqq",!0),mt(gt,vt,Mt,"","\\@varsubsetneqq"),mt(gt,vt,Mt,"≯","\\ngtr",!0),mt(gt,vt,Mt,"","\\@ngeqslant"),mt(gt,vt,Mt,"","\\@ngeqq"),mt(gt,vt,Mt,"⪈","\\gneq",!0),mt(gt,vt,Mt,"≩","\\gneqq",!0),mt(gt,vt,Mt,"","\\@gvertneqq"),mt(gt,vt,Mt,"⋧","\\gnsim",!0),mt(gt,vt,Mt,"⪊","\\gnapprox",!0),mt(gt,vt,Mt,"⊁","\\nsucc",!0),mt(gt,vt,Mt,"⋡","\\nsucceq",!0),mt(gt,vt,Mt,"⋩","\\succnsim",!0),mt(gt,vt,Mt,"⪺","\\succnapprox",!0),mt(gt,vt,Mt,"≆","\\ncong",!0),mt(gt,vt,Mt,"","\\@nshortparallel"),mt(gt,vt,Mt,"∦","\\nparallel",!0),mt(gt,vt,Mt,"⊯","\\nVDash",!0),mt(gt,vt,Mt,"⋫","\\ntriangleright"),mt(gt,vt,Mt,"⋭","\\ntrianglerighteq",!0),mt(gt,vt,Mt,"","\\@nsupseteqq"),mt(gt,vt,Mt,"⊋","\\supsetneq",!0),mt(gt,vt,Mt,"","\\@varsupsetneq"),mt(gt,vt,Mt,"⫌","\\supsetneqq",!0),mt(gt,vt,Mt,"","\\@varsupsetneqq"),mt(gt,vt,Mt,"⊮","\\nVdash",!0),mt(gt,vt,Mt,"⪵","\\precneqq",!0),mt(gt,vt,Mt,"⪶","\\succneqq",!0),mt(gt,vt,Mt,"","\\@nsubseteqq"),mt(gt,vt,wt,"⊴","\\unlhd"),mt(gt,vt,wt,"⊵","\\unrhd"),mt(gt,vt,Mt,"↚","\\nleftarrow",!0),mt(gt,vt,Mt,"↛","\\nrightarrow",!0),mt(gt,vt,Mt,"⇍","\\nLeftarrow",!0),mt(gt,vt,Mt,"⇏","\\nRightarrow",!0),mt(gt,vt,Mt,"↮","\\nleftrightarrow",!0),mt(gt,vt,Mt,"⇎","\\nLeftrightarrow",!0),mt(gt,vt,Mt,"△","\\vartriangle"),mt(gt,vt,Tt,"ℏ","\\hslash"),mt(gt,vt,Tt,"▽","\\triangledown"),mt(gt,vt,Tt,"◊","\\lozenge"),mt(gt,vt,Tt,"Ⓢ","\\circledS"),mt(gt,vt,Tt,"®","\\circledR"),mt(ft,vt,Tt,"®","\\circledR"),mt(gt,vt,Tt,"∡","\\measuredangle",!0),mt(gt,vt,Tt,"∄","\\nexists"),mt(gt,vt,Tt,"℧","\\mho"),mt(gt,vt,Tt,"Ⅎ","\\Finv",!0),mt(gt,vt,Tt,"⅁","\\Game",!0),mt(gt,vt,Tt,"‵","\\backprime"),mt(gt,vt,Tt,"▲","\\blacktriangle"),mt(gt,vt,Tt,"▼","\\blacktriangledown"),mt(gt,vt,Tt,"■","\\blacksquare"),mt(gt,vt,Tt,"⧫","\\blacklozenge"),mt(gt,vt,Tt,"★","\\bigstar"),mt(gt,vt,Tt,"∢","\\sphericalangle",!0),mt(gt,vt,Tt,"∁","\\complement",!0),mt(gt,vt,Tt,"ð","\\eth",!0),mt(ft,bt,Tt,"ð","ð"),mt(gt,vt,Tt,"╱","\\diagup"),mt(gt,vt,Tt,"╲","\\diagdown"),mt(gt,vt,Tt,"□","\\square"),mt(gt,vt,Tt,"□","\\Box"),mt(gt,vt,Tt,"◊","\\Diamond"),mt(gt,vt,Tt,"¥","\\yen",!0),mt(ft,vt,Tt,"¥","\\yen",!0),mt(gt,vt,Tt,"✓","\\checkmark",!0),mt(ft,vt,Tt,"✓","\\checkmark"),mt(gt,vt,Tt,"ℶ","\\beth",!0),mt(gt,vt,Tt,"ℸ","\\daleth",!0),mt(gt,vt,Tt,"ℷ","\\gimel",!0),mt(gt,vt,Tt,"ϝ","\\digamma",!0),mt(gt,vt,Tt,"ϰ","\\varkappa"),mt(gt,vt,St,"┌","\\@ulcorner",!0),mt(gt,vt,xt,"┐","\\@urcorner",!0),mt(gt,vt,St,"└","\\@llcorner",!0),mt(gt,vt,xt,"┘","\\@lrcorner",!0),mt(gt,vt,Mt,"≦","\\leqq",!0),mt(gt,vt,Mt,"⩽","\\leqslant",!0),mt(gt,vt,Mt,"⪕","\\eqslantless",!0),mt(gt,vt,Mt,"≲","\\lesssim",!0),mt(gt,vt,Mt,"⪅","\\lessapprox",!0),mt(gt,vt,Mt,"≊","\\approxeq",!0),mt(gt,vt,wt,"⋖","\\lessdot"),mt(gt,vt,Mt,"⋘","\\lll",!0),mt(gt,vt,Mt,"≶","\\lessgtr",!0),mt(gt,vt,Mt,"⋚","\\lesseqgtr",!0),mt(gt,vt,Mt,"⪋","\\lesseqqgtr",!0),mt(gt,vt,Mt,"≑","\\doteqdot"),mt(gt,vt,Mt,"≓","\\risingdotseq",!0),mt(gt,vt,Mt,"≒","\\fallingdotseq",!0),mt(gt,vt,Mt,"∽","\\backsim",!0),mt(gt,vt,Mt,"⋍","\\backsimeq",!0),mt(gt,vt,Mt,"⫅","\\subseteqq",!0),mt(gt,vt,Mt,"⋐","\\Subset",!0),mt(gt,vt,Mt,"⊏","\\sqsubset",!0),mt(gt,vt,Mt,"≼","\\preccurlyeq",!0),mt(gt,vt,Mt,"⋞","\\curlyeqprec",!0),mt(gt,vt,Mt,"≾","\\precsim",!0),mt(gt,vt,Mt,"⪷","\\precapprox",!0),mt(gt,vt,Mt,"⊲","\\vartriangleleft"),mt(gt,vt,Mt,"⊴","\\trianglelefteq"),mt(gt,vt,Mt,"⊨","\\vDash",!0),mt(gt,vt,Mt,"⊪","\\Vvdash",!0),mt(gt,vt,Mt,"⌣","\\smallsmile"),mt(gt,vt,Mt,"⌢","\\smallfrown"),mt(gt,vt,Mt,"≏","\\bumpeq",!0),mt(gt,vt,Mt,"≎","\\Bumpeq",!0),mt(gt,vt,Mt,"≧","\\geqq",!0),mt(gt,vt,Mt,"⩾","\\geqslant",!0),mt(gt,vt,Mt,"⪖","\\eqslantgtr",!0),mt(gt,vt,Mt,"≳","\\gtrsim",!0),mt(gt,vt,Mt,"⪆","\\gtrapprox",!0),mt(gt,vt,wt,"⋗","\\gtrdot"),mt(gt,vt,Mt,"⋙","\\ggg",!0),mt(gt,vt,Mt,"≷","\\gtrless",!0),mt(gt,vt,Mt,"⋛","\\gtreqless",!0),mt(gt,vt,Mt,"⪌","\\gtreqqless",!0),mt(gt,vt,Mt,"≖","\\eqcirc",!0),mt(gt,vt,Mt,"≗","\\circeq",!0),mt(gt,vt,Mt,"≜","\\triangleq",!0),mt(gt,vt,Mt,"∼","\\thicksim"),mt(gt,vt,Mt,"≈","\\thickapprox"),mt(gt,vt,Mt,"⫆","\\supseteqq",!0),mt(gt,vt,Mt,"⋑","\\Supset",!0),mt(gt,vt,Mt,"⊐","\\sqsupset",!0),mt(gt,vt,Mt,"≽","\\succcurlyeq",!0),mt(gt,vt,Mt,"⋟","\\curlyeqsucc",!0),mt(gt,vt,Mt,"≿","\\succsim",!0),mt(gt,vt,Mt,"⪸","\\succapprox",!0),mt(gt,vt,Mt,"⊳","\\vartriangleright"),mt(gt,vt,Mt,"⊵","\\trianglerighteq"),mt(gt,vt,Mt,"⊩","\\Vdash",!0),mt(gt,vt,Mt,"∣","\\shortmid"),mt(gt,vt,Mt,"∥","\\shortparallel"),mt(gt,vt,Mt,"≬","\\between",!0),mt(gt,vt,Mt,"⋔","\\pitchfork",!0),mt(gt,vt,Mt,"∝","\\varpropto"),mt(gt,vt,Mt,"◀","\\blacktriangleleft"),mt(gt,vt,Mt,"∴","\\therefore",!0),mt(gt,vt,Mt,"∍","\\backepsilon"),mt(gt,vt,Mt,"▶","\\blacktriangleright"),mt(gt,vt,Mt,"∵","\\because",!0),mt(gt,vt,Mt,"⋘","\\llless"),mt(gt,vt,Mt,"⋙","\\gggtr"),mt(gt,vt,wt,"⊲","\\lhd"),mt(gt,vt,wt,"⊳","\\rhd"),mt(gt,vt,Mt,"≂","\\eqsim",!0),mt(gt,bt,Mt,"⋈","\\Join"),mt(gt,vt,Mt,"≑","\\Doteq",!0),mt(gt,vt,wt,"∔","\\dotplus",!0),mt(gt,vt,wt,"∖","\\smallsetminus"),mt(gt,vt,wt,"⋒","\\Cap",!0),mt(gt,vt,wt,"⋓","\\Cup",!0),mt(gt,vt,wt,"⩞","\\doublebarwedge",!0),mt(gt,vt,wt,"⊟","\\boxminus",!0),mt(gt,vt,wt,"⊞","\\boxplus",!0),mt(gt,vt,wt,"⋇","\\divideontimes",!0),mt(gt,vt,wt,"⋉","\\ltimes",!0),mt(gt,vt,wt,"⋊","\\rtimes",!0),mt(gt,vt,wt,"⋋","\\leftthreetimes",!0),mt(gt,vt,wt,"⋌","\\rightthreetimes",!0),mt(gt,vt,wt,"⋏","\\curlywedge",!0),mt(gt,vt,wt,"⋎","\\curlyvee",!0),mt(gt,vt,wt,"⊝","\\circleddash",!0),mt(gt,vt,wt,"⊛","\\circledast",!0),mt(gt,vt,wt,"⋅","\\centerdot"),mt(gt,vt,wt,"⊺","\\intercal",!0),mt(gt,vt,wt,"⋒","\\doublecap"),mt(gt,vt,wt,"⋓","\\doublecup"),mt(gt,vt,wt,"⊠","\\boxtimes",!0),mt(gt,vt,Mt,"⇢","\\dashrightarrow",!0),mt(gt,vt,Mt,"⇠","\\dashleftarrow",!0),mt(gt,vt,Mt,"⇇","\\leftleftarrows",!0),mt(gt,vt,Mt,"⇆","\\leftrightarrows",!0),mt(gt,vt,Mt,"⇚","\\Lleftarrow",!0),mt(gt,vt,Mt,"↞","\\twoheadleftarrow",!0),mt(gt,vt,Mt,"↢","\\leftarrowtail",!0),mt(gt,vt,Mt,"↫","\\looparrowleft",!0),mt(gt,vt,Mt,"⇋","\\leftrightharpoons",!0),mt(gt,vt,Mt,"↶","\\curvearrowleft",!0),mt(gt,vt,Mt,"↺","\\circlearrowleft",!0),mt(gt,vt,Mt,"↰","\\Lsh",!0),mt(gt,vt,Mt,"⇈","\\upuparrows",!0),mt(gt,vt,Mt,"↿","\\upharpoonleft",!0),mt(gt,vt,Mt,"⇃","\\downharpoonleft",!0),mt(gt,bt,Mt,"⊶","\\origof",!0),mt(gt,bt,Mt,"⊷","\\imageof",!0),mt(gt,vt,Mt,"⊸","\\multimap",!0),mt(gt,vt,Mt,"↭","\\leftrightsquigarrow",!0),mt(gt,vt,Mt,"⇉","\\rightrightarrows",!0),mt(gt,vt,Mt,"⇄","\\rightleftarrows",!0),mt(gt,vt,Mt,"↠","\\twoheadrightarrow",!0),mt(gt,vt,Mt,"↣","\\rightarrowtail",!0),mt(gt,vt,Mt,"↬","\\looparrowright",!0),mt(gt,vt,Mt,"↷","\\curvearrowright",!0),mt(gt,vt,Mt,"↻","\\circlearrowright",!0),mt(gt,vt,Mt,"↱","\\Rsh",!0),mt(gt,vt,Mt,"⇊","\\downdownarrows",!0),mt(gt,vt,Mt,"↾","\\upharpoonright",!0),mt(gt,vt,Mt,"⇂","\\downharpoonright",!0),mt(gt,vt,Mt,"⇝","\\rightsquigarrow",!0),mt(gt,vt,Mt,"⇝","\\leadsto"),mt(gt,vt,Mt,"⇛","\\Rrightarrow",!0),mt(gt,vt,Mt,"↾","\\restriction"),mt(gt,bt,Tt,"‘","`"),mt(gt,bt,Tt,"$","\\$"),mt(ft,bt,Tt,"$","\\$"),mt(ft,bt,Tt,"$","\\textdollar"),mt(gt,bt,Tt,"%","\\%"),mt(ft,bt,Tt,"%","\\%"),mt(gt,bt,Tt,"_","\\_"),mt(ft,bt,Tt,"_","\\_"),mt(ft,bt,Tt,"_","\\textunderscore"),mt(gt,bt,Tt,"∠","\\angle",!0),mt(gt,bt,Tt,"∞","\\infty",!0),mt(gt,bt,Tt,"′","\\prime"),mt(gt,bt,Tt,"△","\\triangle"),mt(gt,bt,Tt,"Γ","\\Gamma",!0),mt(gt,bt,Tt,"Δ","\\Delta",!0),mt(gt,bt,Tt,"Θ","\\Theta",!0),mt(gt,bt,Tt,"Λ","\\Lambda",!0),mt(gt,bt,Tt,"Ξ","\\Xi",!0),mt(gt,bt,Tt,"Π","\\Pi",!0),mt(gt,bt,Tt,"Σ","\\Sigma",!0),mt(gt,bt,Tt,"Υ","\\Upsilon",!0),mt(gt,bt,Tt,"Φ","\\Phi",!0),mt(gt,bt,Tt,"Ψ","\\Psi",!0),mt(gt,bt,Tt,"Ω","\\Omega",!0),mt(gt,bt,Tt,"A","Α"),mt(gt,bt,Tt,"B","Β"),mt(gt,bt,Tt,"E","Ε"),mt(gt,bt,Tt,"Z","Ζ"),mt(gt,bt,Tt,"H","Η"),mt(gt,bt,Tt,"I","Ι"),mt(gt,bt,Tt,"K","Κ"),mt(gt,bt,Tt,"M","Μ"),mt(gt,bt,Tt,"N","Ν"),mt(gt,bt,Tt,"O","Ο"),mt(gt,bt,Tt,"P","Ρ"),mt(gt,bt,Tt,"T","Τ"),mt(gt,bt,Tt,"X","Χ"),mt(gt,bt,Tt,"¬","\\neg",!0),mt(gt,bt,Tt,"¬","\\lnot"),mt(gt,bt,Tt,"⊤","\\top"),mt(gt,bt,Tt,"⊥","\\bot"),mt(gt,bt,Tt,"∅","\\emptyset"),mt(gt,vt,Tt,"∅","\\varnothing"),mt(gt,bt,kt,"α","\\alpha",!0),mt(gt,bt,kt,"β","\\beta",!0),mt(gt,bt,kt,"γ","\\gamma",!0),mt(gt,bt,kt,"δ","\\delta",!0),mt(gt,bt,kt,"ϵ","\\epsilon",!0),mt(gt,bt,kt,"ζ","\\zeta",!0),mt(gt,bt,kt,"η","\\eta",!0),mt(gt,bt,kt,"θ","\\theta",!0),mt(gt,bt,kt,"ι","\\iota",!0),mt(gt,bt,kt,"κ","\\kappa",!0),mt(gt,bt,kt,"λ","\\lambda",!0),mt(gt,bt,kt,"μ","\\mu",!0),mt(gt,bt,kt,"ν","\\nu",!0),mt(gt,bt,kt,"ξ","\\xi",!0),mt(gt,bt,kt,"ο","\\omicron",!0),mt(gt,bt,kt,"π","\\pi",!0),mt(gt,bt,kt,"ρ","\\rho",!0),mt(gt,bt,kt,"σ","\\sigma",!0),mt(gt,bt,kt,"τ","\\tau",!0),mt(gt,bt,kt,"υ","\\upsilon",!0),mt(gt,bt,kt,"ϕ","\\phi",!0),mt(gt,bt,kt,"χ","\\chi",!0),mt(gt,bt,kt,"ψ","\\psi",!0),mt(gt,bt,kt,"ω","\\omega",!0),mt(gt,bt,kt,"ε","\\varepsilon",!0),mt(gt,bt,kt,"ϑ","\\vartheta",!0),mt(gt,bt,kt,"ϖ","\\varpi",!0),mt(gt,bt,kt,"ϱ","\\varrho",!0),mt(gt,bt,kt,"ς","\\varsigma",!0),mt(gt,bt,kt,"φ","\\varphi",!0),mt(gt,bt,wt,"∗","*",!0),mt(gt,bt,wt,"+","+"),mt(gt,bt,wt,"−","-",!0),mt(gt,bt,wt,"⋅","\\cdot",!0),mt(gt,bt,wt,"∘","\\circ",!0),mt(gt,bt,wt,"÷","\\div",!0),mt(gt,bt,wt,"±","\\pm",!0),mt(gt,bt,wt,"×","\\times",!0),mt(gt,bt,wt,"∩","\\cap",!0),mt(gt,bt,wt,"∪","\\cup",!0),mt(gt,bt,wt,"∖","\\setminus",!0),mt(gt,bt,wt,"∧","\\land"),mt(gt,bt,wt,"∨","\\lor"),mt(gt,bt,wt,"∧","\\wedge",!0),mt(gt,bt,wt,"∨","\\vee",!0),mt(gt,bt,Tt,"√","\\surd"),mt(gt,bt,St,"⟨","\\langle",!0),mt(gt,bt,St,"∣","\\lvert"),mt(gt,bt,St,"∥","\\lVert"),mt(gt,bt,xt,"?","?"),mt(gt,bt,xt,"!","!"),mt(gt,bt,xt,"⟩","\\rangle",!0),mt(gt,bt,xt,"∣","\\rvert"),mt(gt,bt,xt,"∥","\\rVert"),mt(gt,bt,Mt,"=","="),mt(gt,bt,Mt,":",":"),mt(gt,bt,Mt,"≈","\\approx",!0),mt(gt,bt,Mt,"≅","\\cong",!0),mt(gt,bt,Mt,"≥","\\ge"),mt(gt,bt,Mt,"≥","\\geq",!0),mt(gt,bt,Mt,"←","\\gets"),mt(gt,bt,Mt,">","\\gt",!0),mt(gt,bt,Mt,"∈","\\in",!0),mt(gt,bt,Mt,"","\\@not"),mt(gt,bt,Mt,"⊂","\\subset",!0),mt(gt,bt,Mt,"⊃","\\supset",!0),mt(gt,bt,Mt,"⊆","\\subseteq",!0),mt(gt,bt,Mt,"⊇","\\supseteq",!0),mt(gt,vt,Mt,"⊈","\\nsubseteq",!0),mt(gt,vt,Mt,"⊉","\\nsupseteq",!0),mt(gt,bt,Mt,"⊨","\\models"),mt(gt,bt,Mt,"←","\\leftarrow",!0),mt(gt,bt,Mt,"≤","\\le"),mt(gt,bt,Mt,"≤","\\leq",!0),mt(gt,bt,Mt,"<","\\lt",!0),mt(gt,bt,Mt,"→","\\rightarrow",!0),mt(gt,bt,Mt,"→","\\to"),mt(gt,vt,Mt,"≱","\\ngeq",!0),mt(gt,vt,Mt,"≰","\\nleq",!0),mt(gt,bt,_t," ","\\ "),mt(gt,bt,_t," ","\\space"),mt(gt,bt,_t," ","\\nobreakspace"),mt(ft,bt,_t," ","\\ "),mt(ft,bt,_t," "," "),mt(ft,bt,_t," ","\\space"),mt(ft,bt,_t," ","\\nobreakspace"),mt(gt,bt,_t,null,"\\nobreak"),mt(gt,bt,_t,null,"\\allowbreak"),mt(gt,bt,Ct,",",","),mt(gt,bt,Ct,";",";"),mt(gt,vt,wt,"⊼","\\barwedge",!0),mt(gt,vt,wt,"⊻","\\veebar",!0),mt(gt,bt,wt,"⊙","\\odot",!0),mt(gt,bt,wt,"⊕","\\oplus",!0),mt(gt,bt,wt,"⊗","\\otimes",!0),mt(gt,bt,Tt,"∂","\\partial",!0),mt(gt,bt,wt,"⊘","\\oslash",!0),mt(gt,vt,wt,"⊚","\\circledcirc",!0),mt(gt,vt,wt,"⊡","\\boxdot",!0),mt(gt,bt,wt,"△","\\bigtriangleup"),mt(gt,bt,wt,"▽","\\bigtriangledown"),mt(gt,bt,wt,"†","\\dagger"),mt(gt,bt,wt,"⋄","\\diamond"),mt(gt,bt,wt,"⋆","\\star"),mt(gt,bt,wt,"◃","\\triangleleft"),mt(gt,bt,wt,"▹","\\triangleright"),mt(gt,bt,St,"{","\\{"),mt(ft,bt,Tt,"{","\\{"),mt(ft,bt,Tt,"{","\\textbraceleft"),mt(gt,bt,xt,"}","\\}"),mt(ft,bt,Tt,"}","\\}"),mt(ft,bt,Tt,"}","\\textbraceright"),mt(gt,bt,St,"{","\\lbrace"),mt(gt,bt,xt,"}","\\rbrace"),mt(gt,bt,St,"[","\\lbrack",!0),mt(ft,bt,Tt,"[","\\lbrack",!0),mt(gt,bt,xt,"]","\\rbrack",!0),mt(ft,bt,Tt,"]","\\rbrack",!0),mt(gt,bt,St,"(","\\lparen",!0),mt(gt,bt,xt,")","\\rparen",!0),mt(ft,bt,Tt,"<","\\textless",!0),mt(ft,bt,Tt,">","\\textgreater",!0),mt(gt,bt,St,"⌊","\\lfloor",!0),mt(gt,bt,xt,"⌋","\\rfloor",!0),mt(gt,bt,St,"⌈","\\lceil",!0),mt(gt,bt,xt,"⌉","\\rceil",!0),mt(gt,bt,Tt,"\\","\\backslash"),mt(gt,bt,Tt,"∣","|"),mt(gt,bt,Tt,"∣","\\vert"),mt(ft,bt,Tt,"|","\\textbar",!0),mt(gt,bt,Tt,"∥","\\|"),mt(gt,bt,Tt,"∥","\\Vert"),mt(ft,bt,Tt,"∥","\\textbardbl"),mt(ft,bt,Tt,"~","\\textasciitilde"),mt(ft,bt,Tt,"\\","\\textbackslash"),mt(ft,bt,Tt,"^","\\textasciicircum"),mt(gt,bt,Mt,"↑","\\uparrow",!0),mt(gt,bt,Mt,"⇑","\\Uparrow",!0),mt(gt,bt,Mt,"↓","\\downarrow",!0),mt(gt,bt,Mt,"⇓","\\Downarrow",!0),mt(gt,bt,Mt,"↕","\\updownarrow",!0),mt(gt,bt,Mt,"⇕","\\Updownarrow",!0),mt(gt,bt,Et,"∐","\\coprod"),mt(gt,bt,Et,"⋁","\\bigvee"),mt(gt,bt,Et,"⋀","\\bigwedge"),mt(gt,bt,Et,"⨄","\\biguplus"),mt(gt,bt,Et,"⋂","\\bigcap"),mt(gt,bt,Et,"⋃","\\bigcup"),mt(gt,bt,Et,"∫","\\int"),mt(gt,bt,Et,"∫","\\intop"),mt(gt,bt,Et,"∬","\\iint"),mt(gt,bt,Et,"∭","\\iiint"),mt(gt,bt,Et,"∏","\\prod"),mt(gt,bt,Et,"∑","\\sum"),mt(gt,bt,Et,"⨂","\\bigotimes"),mt(gt,bt,Et,"⨁","\\bigoplus"),mt(gt,bt,Et,"⨀","\\bigodot"),mt(gt,bt,Et,"∮","\\oint"),mt(gt,bt,Et,"∯","\\oiint"),mt(gt,bt,Et,"∰","\\oiiint"),mt(gt,bt,Et,"⨆","\\bigsqcup"),mt(gt,bt,Et,"∫","\\smallint"),mt(ft,bt,At,"…","\\textellipsis"),mt(gt,bt,At,"…","\\mathellipsis"),mt(ft,bt,At,"…","\\ldots",!0),mt(gt,bt,At,"…","\\ldots",!0),mt(gt,bt,At,"⋯","\\@cdots",!0),mt(gt,bt,At,"⋱","\\ddots",!0),mt(gt,bt,Tt,"⋮","\\varvdots"),mt(ft,bt,Tt,"⋮","\\varvdots"),mt(gt,bt,yt,"ˊ","\\acute"),mt(gt,bt,yt,"ˋ","\\grave"),mt(gt,bt,yt,"¨","\\ddot"),mt(gt,bt,yt,"~","\\tilde"),mt(gt,bt,yt,"ˉ","\\bar"),mt(gt,bt,yt,"˘","\\breve"),mt(gt,bt,yt,"ˇ","\\check"),mt(gt,bt,yt,"^","\\hat"),mt(gt,bt,yt,"⃗","\\vec"),mt(gt,bt,yt,"˙","\\dot"),mt(gt,bt,yt,"˚","\\mathring"),mt(gt,bt,kt,"","\\@imath"),mt(gt,bt,kt,"","\\@jmath"),mt(gt,bt,Tt,"ı","ı"),mt(gt,bt,Tt,"ȷ","ȷ"),mt(ft,bt,Tt,"ı","\\i",!0),mt(ft,bt,Tt,"ȷ","\\j",!0),mt(ft,bt,Tt,"ß","\\ss",!0),mt(ft,bt,Tt,"æ","\\ae",!0),mt(ft,bt,Tt,"œ","\\oe",!0),mt(ft,bt,Tt,"ø","\\o",!0),mt(ft,bt,Tt,"Æ","\\AE",!0),mt(ft,bt,Tt,"Œ","\\OE",!0),mt(ft,bt,Tt,"Ø","\\O",!0),mt(ft,bt,yt,"ˊ","\\'"),mt(ft,bt,yt,"ˋ","\\`"),mt(ft,bt,yt,"ˆ","\\^"),mt(ft,bt,yt,"˜","\\~"),mt(ft,bt,yt,"ˉ","\\="),mt(ft,bt,yt,"˘","\\u"),mt(ft,bt,yt,"˙","\\."),mt(ft,bt,yt,"¸","\\c"),mt(ft,bt,yt,"˚","\\r"),mt(ft,bt,yt,"ˇ","\\v"),mt(ft,bt,yt,"¨",'\\"'),mt(ft,bt,yt,"˝","\\H"),mt(ft,bt,yt,"◯","\\textcircled");var Nt={"--":!0,"---":!0,"``":!0,"''":!0};mt(ft,bt,Tt,"–","--",!0),mt(ft,bt,Tt,"–","\\textendash"),mt(ft,bt,Tt,"—","---",!0),mt(ft,bt,Tt,"—","\\textemdash"),mt(ft,bt,Tt,"‘","`",!0),mt(ft,bt,Tt,"‘","\\textquoteleft"),mt(ft,bt,Tt,"’","'",!0),mt(ft,bt,Tt,"’","\\textquoteright"),mt(ft,bt,Tt,"“","``",!0),mt(ft,bt,Tt,"“","\\textquotedblleft"),mt(ft,bt,Tt,"”","''",!0),mt(ft,bt,Tt,"”","\\textquotedblright"),mt(gt,bt,Tt,"°","\\degree",!0),mt(ft,bt,Tt,"°","\\degree"),mt(ft,bt,Tt,"°","\\textdegree",!0),mt(gt,bt,Tt,"£","\\pounds"),mt(gt,bt,Tt,"£","\\mathsterling",!0),mt(ft,bt,Tt,"£","\\pounds"),mt(ft,bt,Tt,"£","\\textsterling",!0),mt(gt,vt,Tt,"✠","\\maltese"),mt(ft,vt,Tt,"✠","\\maltese");for(var It='0123456789/@."',Lt=0;Lt<14;Lt++){var Pt=It.charAt(Lt);mt(gt,bt,Tt,Pt,Pt)}for(var Rt='0123456789!@*()-=+";:?/.,',Dt=0;Dt<25;Dt++){var Ft=Rt.charAt(Dt);mt(ft,bt,Tt,Ft,Ft)}for(var zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ot=0;Ot<52;Ot++){var Bt=zt.charAt(Ot);mt(gt,bt,kt,Bt,Bt),mt(ft,bt,Tt,Bt,Bt)}mt(gt,vt,Tt,"C","ℂ"),mt(ft,vt,Tt,"C","ℂ"),mt(gt,vt,Tt,"H","ℍ"),mt(ft,vt,Tt,"H","ℍ"),mt(gt,vt,Tt,"N","ℕ"),mt(ft,vt,Tt,"N","ℕ"),mt(gt,vt,Tt,"P","ℙ"),mt(ft,vt,Tt,"P","ℙ"),mt(gt,vt,Tt,"Q","ℚ"),mt(ft,vt,Tt,"Q","ℚ"),mt(gt,vt,Tt,"R","ℝ"),mt(ft,vt,Tt,"R","ℝ"),mt(gt,vt,Tt,"Z","ℤ"),mt(ft,vt,Tt,"Z","ℤ"),mt(gt,bt,kt,"h","ℎ"),mt(ft,bt,kt,"h","ℎ");for(var Ht="",qt=0;qt<52;qt++){var jt=zt.charAt(qt);mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56320+qt)),mt(ft,bt,Tt,jt,Ht),mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56372+qt)),mt(ft,bt,Tt,jt,Ht),mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56424+qt)),mt(ft,bt,Tt,jt,Ht),mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56580+qt)),mt(ft,bt,Tt,jt,Ht),mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56684+qt)),mt(ft,bt,Tt,jt,Ht),mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56736+qt)),mt(ft,bt,Tt,jt,Ht),mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56788+qt)),mt(ft,bt,Tt,jt,Ht),mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56840+qt)),mt(ft,bt,Tt,jt,Ht),mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56944+qt)),mt(ft,bt,Tt,jt,Ht),qt<26&&(mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56632+qt)),mt(ft,bt,Tt,jt,Ht),mt(gt,bt,kt,jt,Ht=String.fromCharCode(55349,56476+qt)),mt(ft,bt,Tt,jt,Ht))}mt(gt,bt,kt,"k",Ht=String.fromCharCode(55349,56668)),mt(ft,bt,Tt,"k",Ht);for(var Vt=0;Vt<10;Vt++){var Ut=Vt.toString();mt(gt,bt,kt,Ut,Ht=String.fromCharCode(55349,57294+Vt)),mt(ft,bt,Tt,Ut,Ht),mt(gt,bt,kt,Ut,Ht=String.fromCharCode(55349,57314+Vt)),mt(ft,bt,Tt,Ut,Ht),mt(gt,bt,kt,Ut,Ht=String.fromCharCode(55349,57324+Vt)),mt(ft,bt,Tt,Ut,Ht),mt(gt,bt,kt,Ut,Ht=String.fromCharCode(55349,57334+Vt)),mt(ft,bt,Tt,Ut,Ht)}for(var Gt="ÐÞþ",$t=0;$t<3;$t++){var Wt=Gt.charAt($t);mt(gt,bt,kt,Wt,Wt),mt(ft,bt,Tt,Wt,Wt)}var Xt=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Yt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Kt=function(e,t,i){return pt[i][e]&&pt[i][e].replace&&(e=pt[i][e].replace),{value:e,metrics:He(e,t,i)}},Zt=function(e,t,i,r,s){var n,a=Kt(e,t,i),o=a.metrics;if(e=a.value,o){var l=o.italic;("text"===i||r&&"mathit"===r.font)&&(l=0),n=new at(e,o.height,o.depth,l,o.skew,o.width,s)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+i+"'"),n=new at(e,0,0,0,0,0,s);if(r){n.maxFontSize=r.sizeMultiplier,r.style.isTight()&&n.classes.push("mtight");var h=r.getColor();h&&(n.style.color=h)}return n},Jt=(e,t)=>{if(Ze(e.classes)!==Ze(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var i=e.classes[0];if("mbin"===i||"mord"===i)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var s in t.style)if(t.style.hasOwnProperty(s)&&e.style[s]!==t.style[s])return!1;return!0},Qt=function(e){for(var t=0,i=0,r=0,s=0;s<e.children.length;s++){var n=e.children[s];n.height>t&&(t=n.height),n.depth>i&&(i=n.depth),n.maxFontSize>r&&(r=n.maxFontSize)}e.height=t,e.depth=i,e.maxFontSize=r},ei=function(e,t,i,r){var s=new it(e,t,i,r);return Qt(s),s},ti=(e,t,i,r)=>new it(e,t,i,r),ii=function(e){var t=new Fe(e);return Qt(t),t},ri=function(e,t,i){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===i?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},si={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},ni={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ai={fontMap:si,makeSymbol:Zt,mathsym:function(e,t,i,r){return void 0===r&&(r=[]),"boldsymbol"===i.font&&Kt(e,"Main-Bold",t).metrics?Zt(e,"Main-Bold",t,i,r.concat(["mathbf"])):"\\"===e||"main"===pt[t][e].font?Zt(e,"Main-Regular",t,i,r):Zt(e,"AMS-Regular",t,i,r.concat(["amsrm"]))},makeSpan:ei,makeSvgSpan:ti,makeLineSpan:function(e,t,i){var r=ei([e],[],t);return r.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=Ke(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,i,r){var s=new rt(e,t,i,r);return Qt(s),s},makeFragment:ii,wrapFragment:function(e,t){return e instanceof Fe?ei([],[e],t):e},makeVList:function(e,t){for(var{children:i,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,i=[t[0]],r=-t[0].shift-t[0].elem.depth,s=r,n=1;n<t.length;n++){var a=-t[n].shift-s-t[n].elem.depth,o=a-(t[n-1].elem.height+t[n-1].elem.depth);s+=a,i.push({type:"kern",size:o}),i.push(t[n])}return{children:i,depth:r}}var l;if("top"===e.positionType){for(var h=e.positionData,c=0;c<e.children.length;c++){var d=e.children[c];h-="kern"===d.type?d.size:d.elem.height+d.elem.depth}l=h}else if("bottom"===e.positionType)l=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-u.elem.depth}}return{children:e.children,depth:l}}(e),s=0,n=0;n<i.length;n++){var a=i[n];if("elem"===a.type){var o=a.elem;s=Math.max(s,o.maxFontSize,o.height)}}s+=2;var l=ei(["pstrut"],[]);l.style.height=Ke(s);for(var h=[],c=r,d=r,u=r,p=0;p<i.length;p++){var m=i[p];if("kern"===m.type)u+=m.size;else{var g=m.elem,f=m.wrapperClasses||[],b=m.wrapperStyle||{},v=ei(f,[l,g],void 0,b);v.style.top=Ke(-s-u-g.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),h.push(v),u+=g.height+g.depth}c=Math.min(c,u),d=Math.max(d,u)}var y,w=ei(["vlist"],h);if(w.style.height=Ke(d),c<0){var x=ei([],[]),A=ei(["vlist"],[x]);A.style.height=Ke(-c);var k=ei(["vlist-s"],[new at("")]);y=[ei(["vlist-r"],[w,k]),ei(["vlist-r"],[A])]}else y=[ei(["vlist-r"],[w])];var E=ei(["vlist-t"],y);return 2===y.length&&E.classes.push("vlist-t2"),E.height=d,E.depth=-c,E},makeOrd:function(e,t,i){var r=e.mode,s=e.text,n=["mord"],a="math"===r||"text"===r&&t.font,o=a?t.font:t.fontFamily,l="",h="";if(55349===s.charCodeAt(0)&&([l,h]=function(e,t){var i=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,r="math"===t?0:1;if(119808<=i&&i<120484){var s=Math.floor((i-119808)/26);return[Xt[s][2],Xt[s][r]]}if(120782<=i&&i<=120831){var n=Math.floor((i-120782)/10);return[Yt[n][2],Yt[n][r]]}if(120485===i||120486===i)return[Xt[0][2],Xt[0][r]];if(120486<i&&i<120782)return["",""];throw new pe("Unsupported character: "+e)}(s,r)),l.length>0)return Zt(s,l,r,t,n.concat(h));if(o){var c,d;if("boldsymbol"===o){var u=function(e,t,i,r,s){return"textord"!==s&&Kt(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(s,r,0,0,i);c=u.fontName,d=[u.fontClass]}else a?(c=si[o].fontName,d=[o]):(c=ri(o,t.fontWeight,t.fontShape),d=[o,t.fontWeight,t.fontShape]);if(Kt(s,c,r).metrics)return Zt(s,c,r,t,n.concat(d));if(Nt.hasOwnProperty(s)&&"Typewriter"===c.slice(0,10)){for(var p=[],m=0;m<s.length;m++)p.push(Zt(s[m],c,r,t,n.concat(d)));return ii(p)}}if("mathord"===i)return Zt(s,"Math-Italic",r,t,n.concat(["mathnormal"]));if("textord"===i){var g=pt[r][s]&&pt[r][s].font;if("ams"===g){var f=ri("amsrm",t.fontWeight,t.fontShape);return Zt(s,f,r,t,n.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==g&&g){var b=ri(g,t.fontWeight,t.fontShape);return Zt(s,b,r,t,n.concat(b,t.fontWeight,t.fontShape))}var v=ri("textrm",t.fontWeight,t.fontShape);return Zt(s,v,r,t,n.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+i+" in makeOrd")},makeGlue:(e,t)=>{var i=ei(["mspace"],[],t),r=Ye(e,t);return i.style.marginRight=Ke(r),i},staticSvg:function(e,t){var[i,r,s]=ni[e],n=new lt(i),a=new ot([n],{width:Ke(r),height:Ke(s),style:"width:"+Ke(r),viewBox:"0 0 "+1e3*r+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),o=ti(["overlay"],[a],t);return o.height=s,o.style.height=Ke(s),o.style.width=Ke(r),o},svgData:ni,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var i=e[t],r=e[t+1];i instanceof at&&r instanceof at&&Jt(i,r)&&(i.text+=r.text,i.height=Math.max(i.height,r.height),i.depth=Math.max(i.depth,r.depth),i.italic=r.italic,e.splice(t+1,1),t--)}return e}},oi={number:3,unit:"mu"},li={number:4,unit:"mu"},hi={number:5,unit:"mu"},ci={mord:{mop:oi,mbin:li,mrel:hi,minner:oi},mop:{mord:oi,mop:oi,mrel:hi,minner:oi},mbin:{mord:li,mop:li,mopen:li,minner:li},mrel:{mord:hi,mop:hi,mopen:hi,minner:hi},mopen:{},mclose:{mop:oi,mbin:li,mrel:hi,minner:oi},mpunct:{mord:oi,mop:oi,mrel:hi,mopen:oi,mclose:oi,mpunct:oi,minner:oi},minner:{mord:oi,mop:oi,mbin:li,mrel:hi,mopen:oi,mpunct:oi,minner:oi}},di={mord:{mop:oi},mop:{mord:oi,mop:oi},mbin:{},mrel:{},mopen:{},mclose:{mop:oi},mpunct:{},minner:{mop:oi}},ui={},pi={},mi={};function gi(e){for(var{type:t,names:i,props:r,handler:s,htmlBuilder:n,mathmlBuilder:a}=e,o={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:s},l=0;l<i.length;++l)ui[i[l]]=o;t&&(n&&(pi[t]=n),a&&(mi[t]=a))}function fi(e){var{type:t,htmlBuilder:i,mathmlBuilder:r}=e;gi({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:i,mathmlBuilder:r})}var bi=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},vi=function(e){return"ordgroup"===e.type?e.body:[e]},yi=ai.makeSpan,wi=["leftmost","mbin","mopen","mrel","mop","mpunct"],xi=["rightmost","mrel","mclose","mpunct"],Ai={display:Ne.DISPLAY,text:Ne.TEXT,script:Ne.SCRIPT,scriptscript:Ne.SCRIPTSCRIPT},ki={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Ei=function(e,t,i,r){void 0===r&&(r=[null,null]);for(var s=[],n=0;n<e.length;n++){var a=Ni(e[n],t);if(a instanceof Fe){var o=a.children;s.push(...o)}else s.push(a)}if(ai.tryCombineChars(s),!i)return s;var l=t;if(1===e.length){var h=e[0];"sizing"===h.type?l=t.havingSize(h.size):"styling"===h.type&&(l=t.havingStyle(Ai[h.style]))}var c=yi([r[0]||"leftmost"],[],t),d=yi([r[1]||"rightmost"],[],t),u="root"===i;return Si(s,((e,t)=>{var i=t.classes[0],r=e.classes[0];"mbin"===i&&ve.contains(xi,r)?t.classes[0]="mord":"mbin"===r&&ve.contains(wi,i)&&(e.classes[0]="mord")}),{node:c},d,u),Si(s,((e,t)=>{var i=_i(t),r=_i(e),s=i&&r?e.hasClass("mtight")?di[i][r]:ci[i][r]:null;if(s)return ai.makeGlue(s,l)}),{node:c},d,u),s},Si=function e(t,i,r,s,n){s&&t.push(s);for(var a=0;a<t.length;a++){var o=t[a],l=Ci(o);if(l)e(l.children,i,r,null,n);else{var h=!o.hasClass("mspace");if(h){var c=i(o,r.node);c&&(r.insertAfter?r.insertAfter(c):(t.unshift(c),a++))}h?r.node=o:n&&o.hasClass("newline")&&(r.node=yi(["leftmost"])),r.insertAfter=(e=>i=>{t.splice(e+1,0,i),a++})(a)}}s&&t.pop()},Ci=function(e){return e instanceof Fe||e instanceof rt||e instanceof it&&e.hasClass("enclosing")?e:null},Mi=function e(t,i){var r=Ci(t);if(r){var s=r.children;if(s.length){if("right"===i)return e(s[s.length-1],"right");if("left"===i)return e(s[0],"left")}}return t},_i=function(e,t){return e?(t&&(e=Mi(e,t)),ki[e.classes[0]]||null):null},Ti=function(e,t){var i=["nulldelimiter"].concat(e.baseSizingClasses());return yi(t.concat(i))},Ni=function(e,t,i){if(!e)return yi();if(pi[e.type]){var r=pi[e.type](e,t);if(i&&t.size!==i.size){r=yi(t.sizingClasses(i),[r],t);var s=t.sizeMultiplier/i.sizeMultiplier;r.height*=s,r.depth*=s}return r}throw new pe("Got group of unknown type: '"+e.type+"'")};function Ii(e,t){var i=yi(["base"],e,t),r=yi(["strut"]);return r.style.height=Ke(i.height+i.depth),i.depth&&(r.style.verticalAlign=Ke(-i.depth)),i.children.unshift(r),i}function Li(e,t){var i=null;1===e.length&&"tag"===e[0].type&&(i=e[0].tag,e=e[0].body);var r,s=Ei(e,t,"root");2===s.length&&s[1].hasClass("tag")&&(r=s.pop());for(var n,a=[],o=[],l=0;l<s.length;l++)if(o.push(s[l]),s[l].hasClass("mbin")||s[l].hasClass("mrel")||s[l].hasClass("allowbreak")){for(var h=!1;l<s.length-1&&s[l+1].hasClass("mspace")&&!s[l+1].hasClass("newline");)l++,o.push(s[l]),s[l].hasClass("nobreak")&&(h=!0);h||(a.push(Ii(o,t)),o=[])}else s[l].hasClass("newline")&&(o.pop(),o.length>0&&(a.push(Ii(o,t)),o=[]),a.push(s[l]));o.length>0&&a.push(Ii(o,t)),i?((n=Ii(Ei(i,t,!0))).classes=["tag"],a.push(n)):r&&a.push(r);var c=yi(["katex-html"],a);if(c.setAttribute("aria-hidden","true"),n){var d=n.children[0];d.style.height=Ke(c.height+c.depth),c.depth&&(d.style.verticalAlign=Ke(-c.depth))}return c}function Pi(e){return new Fe(e)}class Ri{constructor(e,t,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=i||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Ze(this.classes));for(var i=0;i<this.children.length;i++)if(this.children[i]instanceof Di&&this.children[i+1]instanceof Di){for(var r=this.children[i].toText()+this.children[++i].toText();this.children[i+1]instanceof Di;)r+=this.children[++i].toText();e.appendChild(new Di(r).toNode())}else e.appendChild(this.children[i].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=ve.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+ve.escape(Ze(this.classes))+'"'),e+=">";for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class Di{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return ve.escape(this.toText())}toText(){return this.text}}var Fi={MathNode:Ri,TextNode:Di,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",Ke(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Ke(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:Pi},zi=function(e,t,i){return!pt[t][e]||!pt[t][e].replace||55349===e.charCodeAt(0)||Nt.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.slice(4,6)||i.font&&"tt"===i.font.slice(4,6))||(e=pt[t][e].replace),new Fi.TextNode(e)},Oi=function(e){return 1===e.length?e[0]:new Fi.MathNode("mrow",e)},Bi=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var i=t.font;if(!i||"mathnormal"===i)return null;var r=e.mode;if("mathit"===i)return"italic";if("boldsymbol"===i)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===i)return"bold";if("mathbb"===i)return"double-struck";if("mathsfit"===i)return"sans-serif-italic";if("mathfrak"===i)return"fraktur";if("mathscr"===i||"mathcal"===i)return"script";if("mathsf"===i)return"sans-serif";if("mathtt"===i)return"monospace";var s=e.text;return ve.contains(["\\imath","\\jmath"],s)?null:(pt[r][s]&&pt[r][s].replace&&(s=pt[r][s].replace),He(s,ai.fontMap[i].fontName,r)?ai.fontMap[i].variant:null)};function Hi(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Di&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var i=e.children[0];return i instanceof Di&&","===i.text}return!1}var qi=function(e,t,i){if(1===e.length){var r=Vi(e[0],t);return i&&r instanceof Ri&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var s,n=[],a=0;a<e.length;a++){var o=Vi(e[a],t);if(o instanceof Ri&&s instanceof Ri){if("mtext"===o.type&&"mtext"===s.type&&o.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...o.children);continue}if("mn"===o.type&&"mn"===s.type){s.children.push(...o.children);continue}if(Hi(o)&&"mn"===s.type){s.children.push(...o.children);continue}if("mn"===o.type&&Hi(s))o.children=[...s.children,...o.children],n.pop();else if(("msup"===o.type||"msub"===o.type)&&o.children.length>=1&&("mn"===s.type||Hi(s))){var l=o.children[0];l instanceof Ri&&"mn"===l.type&&(l.children=[...s.children,...l.children],n.pop())}else if("mi"===s.type&&1===s.children.length){var h=s.children[0];if(h instanceof Di&&"̸"===h.text&&("mo"===o.type||"mi"===o.type||"mn"===o.type)){var c=o.children[0];c instanceof Di&&c.text.length>0&&(c.text=c.text.slice(0,1)+"̸"+c.text.slice(1),n.pop())}}}n.push(o),s=o}return n},ji=function(e,t,i){return Oi(qi(e,t,i))},Vi=function(e,t){if(!e)return new Fi.MathNode("mrow");if(mi[e.type])return mi[e.type](e,t);throw new pe("Got group of unknown type: '"+e.type+"'")};function Ui(e,t,i,r,s){var n,a=qi(e,i);n=1===a.length&&a[0]instanceof Ri&&ve.contains(["mrow","mtable"],a[0].type)?a[0]:new Fi.MathNode("mrow",a);var o=new Fi.MathNode("annotation",[new Fi.TextNode(t)]);o.setAttribute("encoding","application/x-tex");var l=new Fi.MathNode("semantics",[n,o]),h=new Fi.MathNode("math",[l]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&h.setAttribute("display","block");var c=s?"katex":"katex-mathml";return ai.makeSpan([c],[h])}var Gi=function(e){return new Ge({style:e.displayMode?Ne.DISPLAY:Ne.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},$i=function(e,t){if(t.displayMode){var i=["katex-display"];t.leqno&&i.push("leqno"),t.fleqn&&i.push("fleqn"),e=ai.makeSpan(i,[e])}return e},Wi={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Xi={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Yi=function(e,t,i,r,s){var n,a=e.height+e.depth+i+r;if(/fbox|color|angl/.test(t)){if(n=ai.makeSpan(["stretchy",t],[],s),"fbox"===t){var o=s.color&&s.getColor();o&&(n.style.borderColor=o)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new ht({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new ht({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new ot(l,{width:"100%",height:Ke(a)});n=ai.makeSvgSpan([],[h],s)}return n.height=a,n.style.height=Ke(a),n},Ki=function(e){var t=new Fi.MathNode("mo",[new Fi.TextNode(Wi[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Zi=function(e,t){var{span:i,minWidth:r,height:s}=function(){var i=4e5,r=e.label.slice(1);if(ve.contains(["widehat","widecheck","widetilde","utilde"],r)){var s,n,a,o="ordgroup"===(p=e.base).type?p.body.length:1;if(o>5)"widehat"===r||"widecheck"===r?(s=420,i=2364,a=.42,n=r+"4"):(s=312,i=2340,a=.34,n="tilde4");else{var l=[1,1,2,2,3,3][o];"widehat"===r||"widecheck"===r?(i=[0,1062,2364,2364,2364][l],s=[0,239,300,360,420][l],a=[0,.24,.3,.3,.36,.42][l],n=r+l):(i=[0,600,1033,2339,2340][l],s=[0,260,286,306,312][l],a=[0,.26,.286,.3,.306,.34][l],n="tilde"+l)}var h=new lt(n),c=new ot([h],{width:"100%",height:Ke(a),viewBox:"0 0 "+i+" "+s,preserveAspectRatio:"none"});return{span:ai.makeSvgSpan([],[c],t),minWidth:0,height:a}}var d,u,p,m=[],g=Xi[r],[f,b,v]=g,y=v/1e3,w=f.length;if(1===w)d=["hide-tail"],u=[g[3]];else if(2===w)d=["halfarrow-left","halfarrow-right"],u=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");d=["brace-left","brace-center","brace-right"],u=["xMinYMin","xMidYMin","xMaxYMin"]}for(var x=0;x<w;x++){var A=new lt(f[x]),k=new ot([A],{width:"400em",height:Ke(y),viewBox:"0 0 "+i+" "+v,preserveAspectRatio:u[x]+" slice"}),E=ai.makeSvgSpan([d[x]],[k],t);if(1===w)return{span:E,minWidth:b,height:y};E.style.height=Ke(y),m.push(E)}return{span:ai.makeSpan(["stretchy"],m,t),minWidth:b,height:y}}();return i.height=s,i.style.height=Ke(s),r>0&&(i.style.minWidth=Ke(r)),i};function Ji(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Qi(e){var t=er(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function er(e){return e&&("atom"===e.type||ut.hasOwnProperty(e.type))?e:null}var tr=(e,t)=>{var i,r,s;e&&"supsub"===e.type?(i=(r=Ji(e.base,"accent")).base,e.base=i,s=function(e){if(e instanceof it)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Ni(e,t)),e.base=r):i=(r=Ji(e,"accent")).base;var n=Ni(i,t.havingCrampedStyle()),a=0;if(r.isShifty&&ve.isCharacterBox(i)){var o=ve.getBaseElem(i);a=ct(Ni(o,t.havingCrampedStyle())).skew}var l,h="\\c"===r.label,c=h?n.height+n.depth:Math.min(n.height,t.fontMetrics().xHeight);if(r.isStretchy)l=Zi(r,t),l=ai.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+Ke(2*a)+")",marginLeft:Ke(2*a)}:void 0}]},t);else{var d,u;"\\vec"===r.label?(d=ai.staticSvg("vec",t),u=ai.svgData.vec[1]):((d=ct(d=ai.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,u=d.width,h&&(c+=d.depth)),l=ai.makeSpan(["accent-body"],[d]);var p="\\textcircled"===r.label;p&&(l.classes.push("accent-full"),c=n.height);var m=a;p||(m-=u/2),l.style.left=Ke(m),"\\textcircled"===r.label&&(l.style.top=".2em"),l=ai.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:-c},{type:"elem",elem:l}]},t)}var g=ai.makeSpan(["mord","accent"],[l],t);return s?(s.children[0]=g,s.height=Math.max(g.height,s.height),s.classes[0]="mord",s):g},ir=(e,t)=>{var i=e.isStretchy?Ki(e.label):new Fi.MathNode("mo",[zi(e.label,e.mode)]),r=new Fi.MathNode("mover",[Vi(e.base,t),i]);return r.setAttribute("accent","true"),r},rr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));gi({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var i=bi(t[0]),r=!rr.test(e.funcName),s=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:i}},htmlBuilder:tr,mathmlBuilder:ir}),gi({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var i=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:i}},htmlBuilder:tr,mathmlBuilder:ir}),gi({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:r}=e,s=t[0];return{type:"accentUnder",mode:i.mode,label:r,base:s}},htmlBuilder:(e,t)=>{var i=Ni(e.base,t),r=Zi(e,t),s="\\utilde"===e.label?.12:0,n=ai.makeVList({positionType:"top",positionData:i.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:i}]},t);return ai.makeSpan(["mord","accentunder"],[n],t)},mathmlBuilder:(e,t)=>{var i=Ki(e.label),r=new Fi.MathNode("munder",[Vi(e.base,t),i]);return r.setAttribute("accentunder","true"),r}});var sr=e=>{var t=new Fi.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};gi({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:t[0],below:i[0]}},htmlBuilder(e,t){var i,r=t.style,s=t.havingStyle(r.sup()),n=ai.wrapFragment(Ni(e.body,s,t),t),a="\\x"===e.label.slice(0,2)?"x":"cd";n.classes.push(a+"-arrow-pad"),e.below&&(s=t.havingStyle(r.sub()),(i=ai.wrapFragment(Ni(e.below,s,t),t)).classes.push(a+"-arrow-pad"));var o,l=Zi(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,c=-t.fontMetrics().axisHeight-.5*l.height-.111;if((n.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=n.depth),i){var d=-t.fontMetrics().axisHeight+i.height+.5*l.height+.111;o=ai.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:c},{type:"elem",elem:l,shift:h},{type:"elem",elem:i,shift:d}]},t)}else o=ai.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:c},{type:"elem",elem:l,shift:h}]},t);return o.children[0].children[0].children[1].classes.push("svg-align"),ai.makeSpan(["mrel","x-arrow"],[o],t)},mathmlBuilder(e,t){var i,r=Ki(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var s=sr(Vi(e.body,t));if(e.below){var n=sr(Vi(e.below,t));i=new Fi.MathNode("munderover",[r,n,s])}else i=new Fi.MathNode("mover",[r,s])}else if(e.below){var a=sr(Vi(e.below,t));i=new Fi.MathNode("munder",[r,a])}else i=sr(),i=new Fi.MathNode("mover",[r,i]);return i}});var nr=ai.makeSpan;function ar(e,t){var i=Ei(e.body,t,!0);return nr([e.mclass],i,t)}function or(e,t){var i,r=qi(e.body,t);return"minner"===e.mclass?i=new Fi.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(i=r[0]).type="mi":i=new Fi.MathNode("mi",r):(e.isCharacterBox?(i=r[0]).type="mo":i=new Fi.MathNode("mo",r),"mbin"===e.mclass?(i.attributes.lspace="0.22em",i.attributes.rspace="0.22em"):"mpunct"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0em"):"minner"===e.mclass&&(i.attributes.lspace="0.0556em",i.attributes.width="+0.1111em")),i}gi({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:i,funcName:r}=e,s=t[0];return{type:"mclass",mode:i.mode,mclass:"m"+r.slice(5),body:vi(s),isCharacterBox:ve.isCharacterBox(s)}},htmlBuilder:ar,mathmlBuilder:or});var lr=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};gi({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:i}=e;return{type:"mclass",mode:i.mode,mclass:lr(t[0]),body:vi(t[1]),isCharacterBox:ve.isCharacterBox(t[1])}}}),gi({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var i,{parser:r,funcName:s}=e,n=t[1],a=t[0];i="\\stackrel"!==s?lr(n):"mrel";var o={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==s,body:vi(n)},l={type:"supsub",mode:a.mode,base:o,sup:"\\underset"===s?null:a,sub:"\\underset"===s?a:null};return{type:"mclass",mode:r.mode,mclass:i,body:[l],isCharacterBox:ve.isCharacterBox(l)}},htmlBuilder:ar,mathmlBuilder:or}),gi({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"pmb",mode:i.mode,mclass:lr(t[0]),body:vi(t[0])}},htmlBuilder(e,t){var i=Ei(e.body,t,!0),r=ai.makeSpan([e.mclass],i,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var i=qi(e.body,t),r=new Fi.MathNode("mstyle",i);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var hr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},cr=e=>"textord"===e.type&&"@"===e.text;function dr(e,t,i){var r=hr[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return i.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var s={type:"atom",text:r,mode:"math",family:"rel"},n={type:"ordgroup",mode:"math",body:[i.callFunction("\\\\cdleft",[t[0]],[]),i.callFunction("\\Big",[s],[]),i.callFunction("\\\\cdright",[t[1]],[])]};return i.callFunction("\\\\cdparent",[n],[]);case"\\\\cdlongequal":return i.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return i.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}gi({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:r}=e;return{type:"cdlabel",mode:i.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var i=t.havingStyle(t.style.sup()),r=ai.wrapFragment(Ni(e.label,i,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=Ke(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var i=new Fi.MathNode("mrow",[Vi(e.label,t)]);return(i=new Fi.MathNode("mpadded",[i])).setAttribute("width","0"),"left"===e.side&&i.setAttribute("lspace","-1width"),i.setAttribute("voffset","0.7em"),(i=new Fi.MathNode("mstyle",[i])).setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),i}}),gi({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:i}=e;return{type:"cdlabelparent",mode:i.mode,fragment:t[0]}},htmlBuilder(e,t){var i=ai.wrapFragment(Ni(e.fragment,t),t);return i.classes.push("cd-vert-arrow"),i},mathmlBuilder:(e,t)=>new Fi.MathNode("mrow",[Vi(e.fragment,t)])}),gi({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:i}=e,r=Ji(t[0],"ordgroup").body,s="",n=0;n<r.length;n++){s+=Ji(r[n],"textord").text}var a,o=parseInt(s);if(isNaN(o))throw new pe("\\@char has non-numeric argument "+s);if(o<0||o>=1114111)throw new pe("\\@char with invalid code point "+s);return o<=65535?a=String.fromCharCode(o):(o-=65536,a=String.fromCharCode(55296+(o>>10),56320+(1023&o))),{type:"textord",mode:i.mode,text:a}}});var ur=(e,t)=>{var i=Ei(e.body,t.withColor(e.color),!1);return ai.makeFragment(i)},pr=(e,t)=>{var i=qi(e.body,t.withColor(e.color)),r=new Fi.MathNode("mstyle",i);return r.setAttribute("mathcolor",e.color),r};gi({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:i}=e,r=Ji(t[0],"color-token").color,s=t[1];return{type:"color",mode:i.mode,color:r,body:vi(s)}},htmlBuilder:ur,mathmlBuilder:pr}),gi({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:i,breakOnTokenText:r}=e,s=Ji(t[0],"color-token").color;i.gullet.macros.set("\\current@color",s);var n=i.parseExpression(!0,r);return{type:"color",mode:i.mode,color:s,body:n}},htmlBuilder:ur,mathmlBuilder:pr}),gi({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,i){var{parser:r}=e,s="["===r.gullet.future().text?r.parseSizeGroup(!0):null,n=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:n,size:s&&Ji(s,"size").value}},htmlBuilder(e,t){var i=ai.makeSpan(["mspace"],[],t);return e.newLine&&(i.classes.push("newline"),e.size&&(i.style.marginTop=Ke(Ye(e.size,t)))),i},mathmlBuilder(e,t){var i=new Fi.MathNode("mspace");return e.newLine&&(i.setAttribute("linebreak","newline"),e.size&&i.setAttribute("height",Ke(Ye(e.size,t)))),i}});var mr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},gr=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new pe("Expected a control sequence",e);return t},fr=(e,t,i,r)=>{var s=e.gullet.macros.get(i.text);null==s&&(i.noexpand=!0,s={tokens:[i],numArgs:0,unexpandable:!e.gullet.isExpandable(i.text)}),e.gullet.macros.set(t,s,r)};gi({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:i}=e;t.consumeSpaces();var r=t.fetch();if(mr[r.text])return"\\global"!==i&&"\\\\globallong"!==i||(r.text=mr[r.text]),Ji(t.parseFunction(),"internal");throw new pe("Invalid token after macro prefix",r)}}),gi({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,r=t.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new pe("Expected a control sequence",r);for(var n,a=0,o=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){n=t.gullet.future(),o[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new pe('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new pe('Argument number "'+r.text+'" out of order');a++,o.push([])}else{if("EOF"===r.text)throw new pe("Expected a macro definition");o[a].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return n&&l.unshift(n),"\\edef"!==i&&"\\xdef"!==i||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(s,{tokens:l,numArgs:a,delimiters:o},i===mr[i]),{type:"internal",mode:t.mode}}}),gi({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,r=gr(t.gullet.popToken());t.gullet.consumeSpaces();var s=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return fr(t,r,s,"\\\\globallet"===i),{type:"internal",mode:t.mode}}}),gi({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,r=gr(t.gullet.popToken()),s=t.gullet.popToken(),n=t.gullet.popToken();return fr(t,r,n,"\\\\globalfuture"===i),t.gullet.pushToken(n),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var br=function(e,t,i){var r=He(pt.math[e]&&pt.math[e].replace||e,t,i);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},vr=function(e,t,i,r){var s=i.havingBaseStyle(t),n=ai.makeSpan(r.concat(s.sizingClasses(i)),[e],i),a=s.sizeMultiplier/i.sizeMultiplier;return n.height*=a,n.depth*=a,n.maxFontSize=s.sizeMultiplier,n},yr=function(e,t,i){var r=t.havingBaseStyle(i),s=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Ke(s),e.height-=s,e.depth+=s},wr=function(e,t,i,r,s,n){var a=function(e,t,i,r){return ai.makeSymbol(e,"Size"+t+"-Regular",i,r)}(e,t,s,r),o=vr(ai.makeSpan(["delimsizing","size"+t],[a],r),Ne.TEXT,r,n);return i&&yr(o,r,Ne.TEXT),o},xr=function(e,t,i){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:ai.makeSpan(["delimsizinginner",r],[ai.makeSpan([],[ai.makeSymbol(e,t,i)])])}},Ar=function(e,t,i){var r=ze["Size4-Regular"][e.charCodeAt(0)]?ze["Size4-Regular"][e.charCodeAt(0)][4]:ze["Size1-Regular"][e.charCodeAt(0)][4],s=new lt("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),n=new ot([s],{width:Ke(r),height:Ke(t),style:"width:"+Ke(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=ai.makeSvgSpan([],[n],i);return a.height=t,a.style.height=Ke(t),a.style.width=Ke(r),{type:"elem",elem:a}},kr={type:"kern",size:-.008},Er=["|","\\lvert","\\rvert","\\vert"],Sr=["\\|","\\lVert","\\rVert","\\Vert"],Cr=function(e,t,i,r,s,n){var a,o,l,h,c="",d=0;a=l=h=e,o=null;var u="Size1-Regular";"\\uparrow"===e?l=h="⏐":"\\Uparrow"===e?l=h="‖":"\\downarrow"===e?a=l="⏐":"\\Downarrow"===e?a=l="‖":"\\updownarrow"===e?(a="\\uparrow",l="⏐",h="\\downarrow"):"\\Updownarrow"===e?(a="\\Uparrow",l="‖",h="\\Downarrow"):ve.contains(Er,e)?(l="∣",c="vert",d=333):ve.contains(Sr,e)?(l="∥",c="doublevert",d=556):"["===e||"\\lbrack"===e?(a="⎡",l="⎢",h="⎣",u="Size4-Regular",c="lbrack",d=667):"]"===e||"\\rbrack"===e?(a="⎤",l="⎥",h="⎦",u="Size4-Regular",c="rbrack",d=667):"\\lfloor"===e||"⌊"===e?(l=a="⎢",h="⎣",u="Size4-Regular",c="lfloor",d=667):"\\lceil"===e||"⌈"===e?(a="⎡",l=h="⎢",u="Size4-Regular",c="lceil",d=667):"\\rfloor"===e||"⌋"===e?(l=a="⎥",h="⎦",u="Size4-Regular",c="rfloor",d=667):"\\rceil"===e||"⌉"===e?(a="⎤",l=h="⎥",u="Size4-Regular",c="rceil",d=667):"("===e||"\\lparen"===e?(a="⎛",l="⎜",h="⎝",u="Size4-Regular",c="lparen",d=875):")"===e||"\\rparen"===e?(a="⎞",l="⎟",h="⎠",u="Size4-Regular",c="rparen",d=875):"\\{"===e||"\\lbrace"===e?(a="⎧",o="⎨",h="⎩",l="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(a="⎫",o="⎬",h="⎭",l="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(a="⎧",h="⎩",l="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(a="⎫",h="⎭",l="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(a="⎧",h="⎭",l="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(a="⎫",h="⎩",l="⎪",u="Size4-Regular");var p=br(a,u,s),m=p.height+p.depth,g=br(l,u,s),f=g.height+g.depth,b=br(h,u,s),v=b.height+b.depth,y=0,w=1;if(null!==o){var x=br(o,u,s);y=x.height+x.depth,w=2}var A=m+v+y,k=A+Math.max(0,Math.ceil((t-A)/(w*f)))*w*f,E=r.fontMetrics().axisHeight;i&&(E*=r.sizeMultiplier);var S=k/2-E,C=[];if(c.length>0){var M=k-m-v,_=Math.round(1e3*k),T=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(c,Math.round(1e3*M)),N=new lt(c,T),I=(d/1e3).toFixed(3)+"em",L=(_/1e3).toFixed(3)+"em",P=new ot([N],{width:I,height:L,viewBox:"0 0 "+d+" "+_}),R=ai.makeSvgSpan([],[P],r);R.height=_/1e3,R.style.width=I,R.style.height=L,C.push({type:"elem",elem:R})}else{if(C.push(xr(h,u,s)),C.push(kr),null===o){var D=k-m-v+.016;C.push(Ar(l,D,r))}else{var F=(k-m-v-y)/2+.016;C.push(Ar(l,F,r)),C.push(kr),C.push(xr(o,u,s)),C.push(kr),C.push(Ar(l,F,r))}C.push(kr),C.push(xr(a,u,s))}var z=r.havingBaseStyle(Ne.TEXT),O=ai.makeVList({positionType:"bottom",positionData:S,children:C},z);return vr(ai.makeSpan(["delimsizing","mult"],[O],z),Ne.TEXT,r,n)},Mr=.08,_r=function(e,t,i,r,s){var n=function(e,t,i){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Re);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Re);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Re);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,Re);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,Re);break;case"sqrtTall":r=function(e,t,i){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(i-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,Re,i)}return r}(e,r,i),a=new lt(e,n),o=new ot([a],{width:"400em",height:Ke(t),viewBox:"0 0 400000 "+i,preserveAspectRatio:"xMinYMin slice"});return ai.makeSvgSpan(["hide-tail"],[o],s)},Tr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Nr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Ir=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Lr=[0,1.2,1.8,2.4,3],Pr=[{type:"small",style:Ne.SCRIPTSCRIPT},{type:"small",style:Ne.SCRIPT},{type:"small",style:Ne.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Rr=[{type:"small",style:Ne.SCRIPTSCRIPT},{type:"small",style:Ne.SCRIPT},{type:"small",style:Ne.TEXT},{type:"stack"}],Dr=[{type:"small",style:Ne.SCRIPTSCRIPT},{type:"small",style:Ne.SCRIPT},{type:"small",style:Ne.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Fr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},zr=function(e,t,i,r){for(var s=Math.min(2,3-r.style.size);s<i.length&&"stack"!==i[s].type;s++){var n=br(e,Fr(i[s]),"math"),a=n.height+n.depth;if("small"===i[s].type&&(a*=r.havingBaseStyle(i[s].style).sizeMultiplier),a>t)return i[s]}return i[i.length-1]},Or=function(e,t,i,r,s,n){var a;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),a=ve.contains(Ir,e)?Pr:ve.contains(Tr,e)?Dr:Rr;var o=zr(e,t,a,r);return"small"===o.type?function(e,t,i,r,s,n){var a=ai.makeSymbol(e,"Main-Regular",s,r),o=vr(a,t,r,n);return i&&yr(o,r,t),o}(e,o.style,i,r,s,n):"large"===o.type?wr(e,o.size,i,r,s,n):Cr(e,t,i,r,s,n)},Br={sqrtImage:function(e,t){var i,r,s=t.havingBaseSizing(),n=zr("\\surd",e*s.sizeMultiplier,Dr,s),a=s.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,c=0;return"small"===n.type?(e<1?a=1:e<1.4&&(a=.7),h=(1+o)/a,(i=_r("sqrtMain",l=(1+o+Mr)/a,c=1e3+1e3*o+80,o,t)).style.minWidth="0.853em",r=.833/a):"large"===n.type?(c=1080*Lr[n.size],h=(Lr[n.size]+o)/a,l=(Lr[n.size]+o+Mr)/a,(i=_r("sqrtSize"+n.size,l,c,o,t)).style.minWidth="1.02em",r=1/a):(l=e+o+Mr,h=e+o,c=Math.floor(1e3*e+o)+80,(i=_r("sqrtTall",l,c,o,t)).style.minWidth="0.742em",r=1.056),i.height=h,i.style.height=Ke(l),{span:i,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*a}},sizedDelim:function(e,t,i,r,s){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),ve.contains(Tr,e)||ve.contains(Ir,e))return wr(e,t,!1,i,r,s);if(ve.contains(Nr,e))return Cr(e,Lr[t],!1,i,r,s);throw new pe("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:Lr,customSizedDelim:Or,leftRightDelim:function(e,t,i,r,s,n){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,o=5/r.fontMetrics().ptPerEm,l=Math.max(t-a,i+a),h=Math.max(l/500*901,2*l-o);return Or(e,h,!0,r,s,n)}},Hr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},qr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function jr(e,t){var i=er(e);if(i&&ve.contains(qr,i.text))return i;throw new pe(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Vr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}gi({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var i=jr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Hr[e.funcName].size,mclass:Hr[e.funcName].mclass,delim:i.text}},htmlBuilder:(e,t)=>"."===e.delim?ai.makeSpan([e.mclass]):Br.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(zi(e.delim,e.mode));var i=new Fi.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?i.setAttribute("fence","true"):i.setAttribute("fence","false"),i.setAttribute("stretchy","true");var r=Ke(Br.sizeToMaxHeight[e.size]);return i.setAttribute("minsize",r),i.setAttribute("maxsize",r),i}}),gi({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!=typeof i)throw new pe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:jr(t[0],e).text,color:i}}}),gi({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=jr(t[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var n=Ji(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:i.text,right:n.delim,rightColor:n.color}},htmlBuilder:(e,t)=>{Vr(e);for(var i,r,s=Ei(e.body,t,!0,["mopen","mclose"]),n=0,a=0,o=!1,l=0;l<s.length;l++)s[l].isMiddle?o=!0:(n=Math.max(s[l].height,n),a=Math.max(s[l].depth,a));if(n*=t.sizeMultiplier,a*=t.sizeMultiplier,i="."===e.left?Ti(t,["mopen"]):Br.leftRightDelim(e.left,n,a,t,e.mode,["mopen"]),s.unshift(i),o)for(var h=1;h<s.length;h++){var c=s[h].isMiddle;c&&(s[h]=Br.leftRightDelim(c.delim,n,a,c.options,e.mode,[]))}if("."===e.right)r=Ti(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;r=Br.leftRightDelim(e.right,n,a,d,e.mode,["mclose"])}return s.push(r),ai.makeSpan(["minner"],s,t)},mathmlBuilder:(e,t)=>{Vr(e);var i=qi(e.body,t);if("."!==e.left){var r=new Fi.MathNode("mo",[zi(e.left,e.mode)]);r.setAttribute("fence","true"),i.unshift(r)}if("."!==e.right){var s=new Fi.MathNode("mo",[zi(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),i.push(s)}return Oi(i)}}),gi({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=jr(t[0],e);if(!e.parser.leftrightDepth)throw new pe("\\middle without preceding \\left",i);return{type:"middle",mode:e.parser.mode,delim:i.text}},htmlBuilder:(e,t)=>{var i;if("."===e.delim)i=Ti(t,[]);else{i=Br.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};i.isMiddle=r}return i},mathmlBuilder:(e,t)=>{var i="\\vert"===e.delim||"|"===e.delim?zi("|","text"):zi(e.delim,e.mode),r=new Fi.MathNode("mo",[i]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Ur=(e,t)=>{var i,r,s,n=ai.wrapFragment(Ni(e.body,t),t),a=e.label.slice(1),o=t.sizeMultiplier,l=0,h=ve.isCharacterBox(e.body);if("sout"===a)(i=ai.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/o,l=-.5*t.fontMetrics().xHeight;else if("phase"===a){var c=Ye({number:.6,unit:"pt"},t),d=Ye({number:.35,unit:"ex"},t);o/=t.havingBaseSizing().sizeMultiplier;var u=n.height+n.depth+c+d;n.style.paddingLeft=Ke(u/2+c);var p=Math.floor(1e3*u*o),m="M400000 "+(r=p)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",g=new ot([new lt("phase",m)],{width:"400em",height:Ke(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});(i=ai.makeSvgSpan(["hide-tail"],[g],t)).style.height=Ke(u),l=n.depth+c+d}else{/cancel/.test(a)?h||n.classes.push("cancel-pad"):"angl"===a?n.classes.push("anglpad"):n.classes.push("boxpad");var f=0,b=0,v=0;/box/.test(a)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=f=t.fontMetrics().fboxsep+("colorbox"===a?0:v)):"angl"===a?(f=4*(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-n.depth)):b=f=h?.2:0,i=Yi(n,a,f,b,t),/fbox|boxed|fcolorbox/.test(a)?(i.style.borderStyle="solid",i.style.borderWidth=Ke(v)):"angl"===a&&.049!==v&&(i.style.borderTopWidth=Ke(v),i.style.borderRightWidth=Ke(v)),l=n.depth+b,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}if(e.backgroundColor)s=ai.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:l},{type:"elem",elem:n,shift:0}]},t);else{var y=/cancel|phase/.test(a)?["svg-align"]:[];s=ai.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:i,shift:l,wrapperClasses:y}]},t)}return/cancel/.test(a)&&(s.height=n.height,s.depth=n.depth),/cancel/.test(a)&&!h?ai.makeSpan(["mord","cancel-lap"],[s],t):ai.makeSpan(["mord"],[s],t)},Gr=(e,t)=>{var i=0,r=new Fi.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Vi(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*i+"pt"),r.setAttribute("height","+"+2*i+"pt"),r.setAttribute("lspace",i+"pt"),r.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label){var s=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+s+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};gi({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,i){var{parser:r,funcName:s}=e,n=Ji(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:n,body:a}},htmlBuilder:Ur,mathmlBuilder:Gr}),gi({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,i){var{parser:r,funcName:s}=e,n=Ji(t[0],"color-token").color,a=Ji(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:n,body:o}},htmlBuilder:Ur,mathmlBuilder:Gr}),gi({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\fbox",body:t[0]}}}),gi({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:r}=e,s=t[0];return{type:"enclose",mode:i.mode,label:r,body:s}},htmlBuilder:Ur,mathmlBuilder:Gr}),gi({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\angl",body:t[0]}}});var $r={};function Wr(e){for(var{type:t,names:i,props:r,handler:s,htmlBuilder:n,mathmlBuilder:a}=e,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},l=0;l<i.length;++l)$r[i[l]]=o;n&&(pi[t]=n),a&&(mi[t]=a)}var Xr={};function Yr(e,t){Xr[e]=t}function Kr(e){var t=[];e.consumeSpaces();var i=e.fetch().text;for("\\relax"===i&&(e.consume(),e.consumeSpaces(),i=e.fetch().text);"\\hline"===i||"\\hdashline"===i;)e.consume(),t.push("\\hdashline"===i),e.consumeSpaces(),i=e.fetch().text;return t}var Zr=e=>{if(!e.parser.settings.displayMode)throw new pe("{"+e.envName+"} can be used only in display mode.")};function Jr(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Qr(e,t,i){var{hskipBeforeAndAfter:r,addJot:s,cols:n,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:h,emptySingleRow:c,maxNumCols:d,leqno:u}=t;if(e.gullet.beginGroup(),h||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)a=1;else if(!(a=parseFloat(p))||a<0)throw new pe("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var m=[],g=[m],f=[],b=[],v=null!=l?[]:void 0;function y(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new ue("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),b.push(Kr(e));;){var x=e.parseExpression(!1,h?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),x={type:"ordgroup",mode:e.mode,body:x},i&&(x={type:"styling",mode:e.mode,style:i,body:[x]}),m.push(x);var A=e.fetch().text;if("&"===A){if(d&&m.length===d){if(h||o)throw new pe("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===A){w(),1===m.length&&"styling"===x.type&&0===x.body[0].body.length&&(g.length>1||!c)&&g.pop(),b.length<g.length+1&&b.push([]);break}if("\\\\"!==A)throw new pe("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var k=void 0;" "!==e.gullet.future().text&&(k=e.parseSizeGroup(!0)),f.push(k?k.value:null),w(),b.push(Kr(e)),m=[],g.push(m),y()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:a,body:g,cols:n,rowGaps:f,hskipBeforeAndAfter:r,hLinesBeforeRow:b,colSeparationType:o,tags:v,leqno:u}}function es(e){return"d"===e.slice(0,1)?"display":"text"}var ts=function(e,t){var i,r,s=e.body.length,n=e.hLinesBeforeRow,a=0,o=new Array(s),l=[],h=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),c=1/t.fontMetrics().ptPerEm,d=5*c;e.colSeparationType&&"small"===e.colSeparationType&&(d=t.havingStyle(Ne.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var u="CD"===e.colSeparationType?Ye({number:3,unit:"ex"},t):12*c,p=3*c,m=e.arraystretch*u,g=.7*m,f=.3*m,b=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(b+=.25),l.push({pos:b,isDashed:e[t]})}for(v(n[0]),i=0;i<e.body.length;++i){var y=e.body[i],w=g,x=f;a<y.length&&(a=y.length);var A=new Array(y.length);for(r=0;r<y.length;++r){var k=Ni(y[r],t);x<k.depth&&(x=k.depth),w<k.height&&(w=k.height),A[r]=k}var E=e.rowGaps[i],S=0;E&&(S=Ye(E,t))>0&&(x<(S+=f)&&(x=S),S=0),e.addJot&&(x+=p),A.height=w,A.depth=x,b+=w,A.pos=b,b+=x+S,o[i]=A,v(n[i+1])}var C,M,_=b/2+t.fontMetrics().axisHeight,T=e.cols||[],N=[],I=[];if(e.tags&&e.tags.some((e=>e)))for(i=0;i<s;++i){var L=o[i],P=L.pos-_,R=e.tags[i],D=void 0;(D=!0===R?ai.makeSpan(["eqn-num"],[],t):!1===R?ai.makeSpan([],[],t):ai.makeSpan([],Ei(R,t,!0),t)).depth=L.depth,D.height=L.height,I.push({type:"elem",elem:D,shift:P})}for(r=0,M=0;r<a||M<T.length;++r,++M){for(var F=T[M]||{},z=!0;"separator"===F.type;){if(z||((C=ai.makeSpan(["arraycolsep"],[])).style.width=Ke(t.fontMetrics().doubleRuleSep),N.push(C)),"|"!==F.separator&&":"!==F.separator)throw new pe("Invalid separator type: "+F.separator);var O="|"===F.separator?"solid":"dashed",B=ai.makeSpan(["vertical-separator"],[],t);B.style.height=Ke(b),B.style.borderRightWidth=Ke(h),B.style.borderRightStyle=O,B.style.margin="0 "+Ke(-h/2);var H=b-_;H&&(B.style.verticalAlign=Ke(-H)),N.push(B),F=T[++M]||{},z=!1}if(!(r>=a)){var q=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(q=ve.deflt(F.pregap,d))&&((C=ai.makeSpan(["arraycolsep"],[])).style.width=Ke(q),N.push(C));var j=[];for(i=0;i<s;++i){var V=o[i],U=V[r];if(U){var G=V.pos-_;U.depth=V.depth,U.height=V.height,j.push({type:"elem",elem:U,shift:G})}}j=ai.makeVList({positionType:"individualShift",children:j},t),j=ai.makeSpan(["col-align-"+(F.align||"c")],[j]),N.push(j),(r<a-1||e.hskipBeforeAndAfter)&&0!==(q=ve.deflt(F.postgap,d))&&((C=ai.makeSpan(["arraycolsep"],[])).style.width=Ke(q),N.push(C))}}if(o=ai.makeSpan(["mtable"],N),l.length>0){for(var $=ai.makeLineSpan("hline",t,h),W=ai.makeLineSpan("hdashline",t,h),X=[{type:"elem",elem:o,shift:0}];l.length>0;){var Y=l.pop(),K=Y.pos-_;Y.isDashed?X.push({type:"elem",elem:W,shift:K}):X.push({type:"elem",elem:$,shift:K})}o=ai.makeVList({positionType:"individualShift",children:X},t)}if(0===I.length)return ai.makeSpan(["mord"],[o],t);var Z=ai.makeVList({positionType:"individualShift",children:I},t);return Z=ai.makeSpan(["tag"],[Z],t),ai.makeFragment([o,Z])},is={c:"center ",l:"left ",r:"right "},rs=function(e,t){for(var i=[],r=new Fi.MathNode("mtd",[],["mtr-glue"]),s=new Fi.MathNode("mtd",[],["mml-eqn-num"]),n=0;n<e.body.length;n++){for(var a=e.body[n],o=[],l=0;l<a.length;l++)o.push(new Fi.MathNode("mtd",[Vi(a[l],t)]));e.tags&&e.tags[n]&&(o.unshift(r),o.push(r),e.leqno?o.unshift(s):o.push(s)),i.push(new Fi.MathNode("mtr",o))}var h=new Fi.MathNode("mtable",i),c=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);h.setAttribute("rowspacing",Ke(c));var d="",u="";if(e.cols&&e.cols.length>0){var p=e.cols,m="",g=!1,f=0,b=p.length;"separator"===p[0].type&&(d+="top ",f=1),"separator"===p[p.length-1].type&&(d+="bottom ",b-=1);for(var v=f;v<b;v++)"align"===p[v].type?(u+=is[p[v].align],g&&(m+="none "),g=!0):"separator"===p[v].type&&g&&(m+="|"===p[v].separator?"solid ":"dashed ",g=!1);h.setAttribute("columnalign",u.trim()),/[sd]/.test(m)&&h.setAttribute("columnlines",m.trim())}if("align"===e.colSeparationType){for(var y=e.cols||[],w="",x=1;x<y.length;x++)w+=x%2?"0em ":"1em ";h.setAttribute("columnspacing",w.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?h.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?h.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?h.setAttribute("columnspacing","0.5em"):h.setAttribute("columnspacing","1em");var A="",k=e.hLinesBeforeRow;d+=k[0].length>0?"left ":"",d+=k[k.length-1].length>0?"right ":"";for(var E=1;E<k.length-1;E++)A+=0===k[E].length?"none ":k[E][0]?"dashed ":"solid ";return/[sd]/.test(A)&&h.setAttribute("rowlines",A.trim()),""!==d&&(h=new Fi.MathNode("menclose",[h])).setAttribute("notation",d.trim()),e.arraystretch&&e.arraystretch<1&&(h=new Fi.MathNode("mstyle",[h])).setAttribute("scriptlevel","1"),h},ss=function(e,t){-1===e.envName.indexOf("ed")&&Zr(e);var i,r=[],s=e.envName.indexOf("at")>-1?"alignat":"align",n="split"===e.envName,a=Qr(e.parser,{cols:r,addJot:!0,autoTag:n?void 0:Jr(e.envName),emptySingleRow:!0,colSeparationType:s,maxNumCols:n?2:void 0,leqno:e.parser.settings.leqno},"display"),o=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var h="",c=0;c<t[0].body.length;c++){h+=Ji(t[0].body[c],"textord").text}i=Number(h),o=2*i}var d=!o;a.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var r=Ji(e[t],"styling");Ji(r.body[0],"ordgroup").body.unshift(l)}if(d)o<e.length&&(o=e.length);else{var s=e.length/2;if(i<s)throw new pe("Too many math in a row: expected "+i+", but got "+s,e[0])}}));for(var u=0;u<o;++u){var p="r",m=0;u%2==1?p="l":u>0&&d&&(m=1),r[u]={type:"align",align:p,pregap:m,postgap:0}}return a.colSeparationType=d?"align":"alignat",a};Wr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var i=(er(t[0])?[t[0]]:Ji(t[0],"ordgroup").body).map((function(e){var t=Qi(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new pe("Unknown column alignment: "+t,e)})),r={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Qr(e.parser,r,es(e.envName))},htmlBuilder:ts,mathmlBuilder:rs}),Wr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],i="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:i}]};if("*"===e.envName.charAt(e.envName.length-1)){var s=e.parser;if(s.consumeSpaces(),"["===s.fetch().text){if(s.consume(),s.consumeSpaces(),i=s.fetch().text,-1==="lcr".indexOf(i))throw new pe("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:i}]}}var n=Qr(e.parser,r,es(e.envName)),a=Math.max(0,...n.body.map((e=>e.length)));return n.cols=new Array(a).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:ts,mathmlBuilder:rs}),Wr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Qr(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:ts,mathmlBuilder:rs}),Wr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var i=(er(t[0])?[t[0]]:Ji(t[0],"ordgroup").body).map((function(e){var t=Qi(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new pe("Unknown column alignment: "+t,e)}));if(i.length>1)throw new pe("{subarray} can contain only one column");var r={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=Qr(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new pe("{subarray} can contain only one column");return r},htmlBuilder:ts,mathmlBuilder:rs}),Wr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Qr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},es(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:ts,mathmlBuilder:rs}),Wr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ss,htmlBuilder:ts,mathmlBuilder:rs}),Wr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){ve.contains(["gather","gather*"],e.envName)&&Zr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Jr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Qr(e.parser,t,"display")},htmlBuilder:ts,mathmlBuilder:rs}),Wr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ss,htmlBuilder:ts,mathmlBuilder:rs}),Wr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Zr(e);var t={autoTag:Jr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Qr(e.parser,t,"display")},htmlBuilder:ts,mathmlBuilder:rs}),Wr({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Zr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var i=e.fetch().text;if("&"!==i&&"\\\\"!==i){if("\\end"===i){0===t[t.length-1].length&&t.pop();break}throw new pe("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r,s,n=[],a=[n],o=0;o<t.length;o++){for(var l=t[o],h={type:"styling",body:[],mode:"math",style:"display"},c=0;c<l.length;c++)if(cr(l[c])){n.push(h);var d=Qi(l[c+=1]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(d)>-1);else{if(!("<>AV".indexOf(d)>-1))throw new pe('Expected one of "<>AV=|." after @',l[c]);for(var p=0;p<2;p++){for(var m=!0,g=c+1;g<l.length;g++){if(s=d,("mathord"===(r=l[g]).type||"atom"===r.type)&&r.text===s){m=!1,c=g;break}if(cr(l[g]))throw new pe("Missing a "+d+" character to complete a CD arrow.",l[g]);u[p].body.push(l[g])}if(m)throw new pe("Missing a "+d+" character to complete a CD arrow.",l[c])}}var f={type:"styling",body:[dr(d,u,e)],mode:"math",style:"display"};n.push(f),h={type:"styling",body:[],mode:"math",style:"display"}}else h.body.push(l[c]);o%2==0?n.push(h):n.shift(),n=[],a.push(n)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}(e.parser)),htmlBuilder:ts,mathmlBuilder:rs}),Yr("\\nonumber","\\gdef\\@eqnsw{0}"),Yr("\\notag","\\nonumber"),gi({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new pe(e.funcName+" valid only within array environment")}});var ns=$r;gi({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:i,funcName:r}=e,s=t[0];if("ordgroup"!==s.type)throw new pe("Invalid environment name",s);for(var n="",a=0;a<s.body.length;++a)n+=Ji(s.body[a],"textord").text;if("\\begin"===r){if(!ns.hasOwnProperty(n))throw new pe("No such environment: "+n,s);var o=ns[n],{args:l,optArgs:h}=i.parseArguments("\\begin{"+n+"}",o),c={mode:i.mode,envName:n,parser:i},d=o.handler(c,l,h);i.expect("\\end",!1);var u=i.nextToken,p=Ji(i.parseFunction(),"environment");if(p.name!==n)throw new pe("Mismatch: \\begin{"+n+"} matched by \\end{"+p.name+"}",u);return d}return{type:"environment",mode:i.mode,name:n,nameGroup:s}}});var as=(e,t)=>{var i=e.font,r=t.withFont(i);return Ni(e.body,r)},os=(e,t)=>{var i=e.font,r=t.withFont(i);return Vi(e.body,r)},ls={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};gi({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:i,funcName:r}=e,s=bi(t[0]),n=r;return n in ls&&(n=ls[n]),{type:"font",mode:i.mode,font:n.slice(1),body:s}},htmlBuilder:as,mathmlBuilder:os}),gi({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:i}=e,r=t[0],s=ve.isCharacterBox(r);return{type:"mclass",mode:i.mode,mclass:lr(r),body:[{type:"font",mode:i.mode,font:"boldsymbol",body:r}],isCharacterBox:s}}}),gi({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:r,breakOnTokenText:s}=e,{mode:n}=i,a=i.parseExpression(!0,s);return{type:"font",mode:n,font:"math"+r.slice(1),body:{type:"ordgroup",mode:i.mode,body:a}}},htmlBuilder:as,mathmlBuilder:os});var hs=(e,t)=>{var i=t;return"display"===e?i=i.id>=Ne.SCRIPT.id?i.text():Ne.DISPLAY:"text"===e&&i.size===Ne.DISPLAY.size?i=Ne.TEXT:"script"===e?i=Ne.SCRIPT:"scriptscript"===e&&(i=Ne.SCRIPTSCRIPT),i},cs=(e,t)=>{var i,r=hs(e.size,t.style),s=r.fracNum(),n=r.fracDen();i=t.havingStyle(s);var a=Ni(e.numer,i,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height<o?o:a.height,a.depth=a.depth<l?l:a.depth}i=t.havingStyle(n);var h,c,d,u,p,m,g,f,b,v,y=Ni(e.denom,i,t);if(e.hasBarLine?(e.barSize?(c=Ye(e.barSize,t),h=ai.makeLineSpan("frac-line",t,c)):h=ai.makeLineSpan("frac-line",t),c=h.height,d=h.height):(h=null,c=0,d=t.fontMetrics().defaultRuleThickness),r.size===Ne.DISPLAY.size||"display"===e.size?(u=t.fontMetrics().num1,p=c>0?3*d:7*d,m=t.fontMetrics().denom1):(c>0?(u=t.fontMetrics().num2,p=d):(u=t.fontMetrics().num3,p=3*d),m=t.fontMetrics().denom2),h){var w=t.fontMetrics().axisHeight;u-a.depth-(w+.5*c)<p&&(u+=p-(u-a.depth-(w+.5*c))),w-.5*c-(y.height-m)<p&&(m+=p-(w-.5*c-(y.height-m)));var x=-(w-.5*c);g=ai.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:m},{type:"elem",elem:h,shift:x},{type:"elem",elem:a,shift:-u}]},t)}else{var A=u-a.depth-(y.height-m);A<p&&(u+=.5*(p-A),m+=.5*(p-A)),g=ai.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:m},{type:"elem",elem:a,shift:-u}]},t)}return i=t.havingStyle(r),g.height*=i.sizeMultiplier/t.sizeMultiplier,g.depth*=i.sizeMultiplier/t.sizeMultiplier,f=r.size===Ne.DISPLAY.size?t.fontMetrics().delim1:r.size===Ne.SCRIPTSCRIPT.size?t.havingStyle(Ne.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,b=null==e.leftDelim?Ti(t,["mopen"]):Br.customSizedDelim(e.leftDelim,f,!0,t.havingStyle(r),e.mode,["mopen"]),v=e.continued?ai.makeSpan([]):null==e.rightDelim?Ti(t,["mclose"]):Br.customSizedDelim(e.rightDelim,f,!0,t.havingStyle(r),e.mode,["mclose"]),ai.makeSpan(["mord"].concat(i.sizingClasses(t)),[b,ai.makeSpan(["mfrac"],[g]),v],t)},ds=(e,t)=>{var i=new Fi.MathNode("mfrac",[Vi(e.numer,t),Vi(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=Ye(e.barSize,t);i.setAttribute("linethickness",Ke(r))}}else i.setAttribute("linethickness","0px");var s=hs(e.size,t.style);if(s.size!==t.style.size){i=new Fi.MathNode("mstyle",[i]);var n=s.size===Ne.DISPLAY.size?"true":"false";i.setAttribute("displaystyle",n),i.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var a=[];if(null!=e.leftDelim){var o=new Fi.MathNode("mo",[new Fi.TextNode(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}if(a.push(i),null!=e.rightDelim){var l=new Fi.MathNode("mo",[new Fi.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return Oi(a)}return i};gi({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var i,{parser:r,funcName:s}=e,n=t[0],a=t[1],o=null,l=null,h="auto";switch(s){case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,o="(",l=")";break;case"\\\\bracefrac":i=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(s){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:n,denom:a,hasBarLine:i,leftDelim:o,rightDelim:l,size:h,barSize:null}},htmlBuilder:cs,mathmlBuilder:ds}),gi({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:i,funcName:r}=e,s=t[0],n=t[1];return{type:"genfrac",mode:i.mode,continued:!0,numer:s,denom:n,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),gi({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:i,funcName:r,token:s}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:i.mode,replaceWith:t,token:s}}});var us=["display","text","script","scriptscript"],ps=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};gi({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var i,{parser:r}=e,s=t[4],n=t[5],a=bi(t[0]),o="atom"===a.type&&"open"===a.family?ps(a.text):null,l=bi(t[1]),h="atom"===l.type&&"close"===l.family?ps(l.text):null,c=Ji(t[2],"size"),d=null;i=!!c.isBlank||(d=c.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var m=Ji(p.body[0],"textord");u=us[Number(m.text)]}}else p=Ji(p,"textord"),u=us[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:s,denom:n,continued:!1,hasBarLine:i,barSize:d,leftDelim:o,rightDelim:h,size:u}},htmlBuilder:cs,mathmlBuilder:ds}),gi({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:i,funcName:r,token:s}=e;return{type:"infix",mode:i.mode,replaceWith:"\\\\abovefrac",size:Ji(t[0],"size").value,token:s}}}),gi({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:i,funcName:r}=e,s=t[0],n=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ji(t[1],"infix").size),a=t[2],o=n.number>0;return{type:"genfrac",mode:i.mode,numer:s,denom:a,continued:!1,hasBarLine:o,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:cs,mathmlBuilder:ds});var ms=(e,t)=>{var i,r,s=t.style;"supsub"===e.type?(i=e.sup?Ni(e.sup,t.havingStyle(s.sup()),t):Ni(e.sub,t.havingStyle(s.sub()),t),r=Ji(e.base,"horizBrace")):r=Ji(e,"horizBrace");var n,a=Ni(r.base,t.havingBaseStyle(Ne.DISPLAY)),o=Zi(r,t);if(r.isOver?(n=ai.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(n=ai.makeVList({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[0].classes.push("svg-align"),i){var l=ai.makeSpan(["mord",r.isOver?"mover":"munder"],[n],t);n=r.isOver?ai.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:i}]},t):ai.makeVList({positionType:"bottom",positionData:l.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return ai.makeSpan(["mord",r.isOver?"mover":"munder"],[n],t)};gi({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:r}=e;return{type:"horizBrace",mode:i.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:ms,mathmlBuilder:(e,t)=>{var i=Ki(e.label);return new Fi.MathNode(e.isOver?"mover":"munder",[Vi(e.base,t),i])}}),gi({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[1],s=Ji(t[0],"url").url;return i.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:i.mode,href:s,body:vi(r)}:i.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var i=Ei(e.body,t,!1);return ai.makeAnchor(e.href,[],i,t)},mathmlBuilder:(e,t)=>{var i=ji(e.body,t);return i instanceof Ri||(i=new Ri("mrow",[i])),i.setAttribute("href",e.href),i}}),gi({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=Ji(t[0],"url").url;if(!i.settings.isTrusted({command:"\\url",url:r}))return i.formatUnsupportedCmd("\\url");for(var s=[],n=0;n<r.length;n++){var a=r[n];"~"===a&&(a="\\textasciitilde"),s.push({type:"textord",mode:"text",text:a})}var o={type:"text",mode:i.mode,font:"\\texttt",body:s};return{type:"href",mode:i.mode,href:r,body:vi(o)}}}),gi({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:i}=e;return{type:"hbox",mode:i.mode,body:vi(t[0])}},htmlBuilder(e,t){var i=Ei(e.body,t,!1);return ai.makeFragment(i)},mathmlBuilder:(e,t)=>new Fi.MathNode("mrow",qi(e.body,t))}),gi({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var i,{parser:r,funcName:s,token:n}=e,a=Ji(t[0],"raw").string,o=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(s){case"\\htmlClass":l.class=a,i={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,i={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,i={command:"\\htmlStyle",style:a};break;case"\\htmlData":for(var h=a.split(","),c=0;c<h.length;c++){var d=h[c].split("=");if(2!==d.length)throw new pe("Error parsing key-value for \\htmlData");l["data-"+d[0].trim()]=d[1].trim()}i={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(i)?{type:"html",mode:r.mode,attributes:l,body:vi(o)}:r.formatUnsupportedCmd(s)},htmlBuilder:(e,t)=>{var i=Ei(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=ai.makeSpan(r,i,t);for(var n in e.attributes)"class"!==n&&e.attributes.hasOwnProperty(n)&&s.setAttribute(n,e.attributes[n]);return s},mathmlBuilder:(e,t)=>ji(e.body,t)}),gi({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"htmlmathml",mode:i.mode,html:vi(t[0]),mathml:vi(t[1])}},htmlBuilder:(e,t)=>{var i=Ei(e.html,t,!1);return ai.makeFragment(i)},mathmlBuilder:(e,t)=>ji(e.mathml,t)});var gs=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new pe("Invalid size: '"+e+"' in \\includegraphics");var i={number:+(t[1]+t[2]),unit:t[3]};if(!Xe(i))throw new pe("Invalid unit: '"+i.unit+"' in \\includegraphics.");return i};gi({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,i)=>{var{parser:r}=e,s={number:0,unit:"em"},n={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(i[0])for(var l=Ji(i[0],"raw").string.split(","),h=0;h<l.length;h++){var c=l[h].split("=");if(2===c.length){var d=c[1].trim();switch(c[0].trim()){case"alt":o=d;break;case"width":s=gs(d);break;case"height":n=gs(d);break;case"totalheight":a=gs(d);break;default:throw new pe("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}var u=Ji(t[0],"url").url;return""===o&&(o=(o=(o=u).replace(/^.*[\\/]/,"")).substring(0,o.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:u})?{type:"includegraphics",mode:r.mode,alt:o,width:s,height:n,totalheight:a,src:u}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var i=Ye(e.height,t),r=0;e.totalheight.number>0&&(r=Ye(e.totalheight,t)-i);var s=0;e.width.number>0&&(s=Ye(e.width,t));var n={height:Ke(i+r)};s>0&&(n.width=Ke(s)),r>0&&(n.verticalAlign=Ke(-r));var a=new st(e.src,e.alt,n);return a.height=i,a.depth=r,a},mathmlBuilder:(e,t)=>{var i=new Fi.MathNode("mglyph",[]);i.setAttribute("alt",e.alt);var r=Ye(e.height,t),s=0;if(e.totalheight.number>0&&(s=Ye(e.totalheight,t)-r,i.setAttribute("valign",Ke(-s))),i.setAttribute("height",Ke(r+s)),e.width.number>0){var n=Ye(e.width,t);i.setAttribute("width",Ke(n))}return i.setAttribute("src",e.src),i}}),gi({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:r}=e,s=Ji(t[0],"size");if(i.settings.strict){var n="m"===r[1],a="mu"===s.value.unit;n?(a||i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+s.value.unit+" units"),"math"!==i.mode&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:i.mode,dimension:s.value}},htmlBuilder:(e,t)=>ai.makeGlue(e.dimension,t),mathmlBuilder(e,t){var i=Ye(e.dimension,t);return new Fi.SpaceNode(i)}}),gi({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:r}=e,s=t[0];return{type:"lap",mode:i.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,t)=>{var i;"clap"===e.alignment?(i=ai.makeSpan([],[Ni(e.body,t)]),i=ai.makeSpan(["inner"],[i],t)):i=ai.makeSpan(["inner"],[Ni(e.body,t)]);var r=ai.makeSpan(["fix"],[]),s=ai.makeSpan([e.alignment],[i,r],t),n=ai.makeSpan(["strut"]);return n.style.height=Ke(s.height+s.depth),s.depth&&(n.style.verticalAlign=Ke(-s.depth)),s.children.unshift(n),s=ai.makeSpan(["thinbox"],[s],t),ai.makeSpan(["mord","vbox"],[s],t)},mathmlBuilder:(e,t)=>{var i=new Fi.MathNode("mpadded",[Vi(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",r+"width")}return i.setAttribute("width","0px"),i}}),gi({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:i,parser:r}=e,s=r.mode;r.switchMode("math");var n="\\("===i?"\\)":"$",a=r.parseExpression(!1,n);return r.expect(n),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",body:a}}}),gi({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new pe("Mismatched "+e.funcName)}});var fs=(e,t)=>{switch(t.style.size){case Ne.DISPLAY.size:return e.display;case Ne.TEXT.size:return e.text;case Ne.SCRIPT.size:return e.script;case Ne.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};gi({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"mathchoice",mode:i.mode,display:vi(t[0]),text:vi(t[1]),script:vi(t[2]),scriptscript:vi(t[3])}},htmlBuilder:(e,t)=>{var i=fs(e,t),r=Ei(i,t,!1);return ai.makeFragment(r)},mathmlBuilder:(e,t)=>{var i=fs(e,t);return ji(i,t)}});var bs=(e,t,i,r,s,n,a)=>{e=ai.makeSpan([],[e]);var o,l,h,c=i&&ve.isCharacterBox(i);if(t){var d=Ni(t,r.havingStyle(s.sup()),r);l={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(i){var u=Ni(i,r.havingStyle(s.sub()),r);o={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-u.height)}}if(l&&o){var p=r.fontMetrics().bigOpSpacing5+o.elem.height+o.elem.depth+o.kern+e.depth+a;h=ai.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:Ke(-n)},{type:"kern",size:o.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Ke(n)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(o){var m=e.height-a;h=ai.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:Ke(-n)},{type:"kern",size:o.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var g=e.depth+a;h=ai.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Ke(n)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var f=[h];if(o&&0!==n&&!c){var b=ai.makeSpan(["mspace"],[],r);b.style.marginRight=Ke(n),f.unshift(b)}return ai.makeSpan(["mop","op-limits"],f,r)},vs=["\\smallint"],ys=(e,t)=>{var i,r,s,n=!1;"supsub"===e.type?(i=e.sup,r=e.sub,s=Ji(e.base,"op"),n=!0):s=Ji(e,"op");var a,o=t.style,l=!1;if(o.size===Ne.DISPLAY.size&&s.symbol&&!ve.contains(vs,s.name)&&(l=!0),s.symbol){var h=l?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==s.name&&"\\oiiint"!==s.name||(c=s.name.slice(1),s.name="oiint"===c?"\\iint":"\\iiint"),a=ai.makeSymbol(s.name,h,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),c.length>0){var d=a.italic,u=ai.staticSvg(c+"Size"+(l?"2":"1"),t);a=ai.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:u,shift:l?.08:0}]},t),s.name="\\"+c,a.classes.unshift("mop"),a.italic=d}}else if(s.body){var p=Ei(s.body,t,!0);1===p.length&&p[0]instanceof at?(a=p[0]).classes[0]="mop":a=ai.makeSpan(["mop"],p,t)}else{for(var m=[],g=1;g<s.name.length;g++)m.push(ai.mathsym(s.name[g],s.mode,t));a=ai.makeSpan(["mop"],m,t)}var f=0,b=0;return(a instanceof at||"\\oiint"===s.name||"\\oiiint"===s.name)&&!s.suppressBaseShift&&(f=(a.height-a.depth)/2-t.fontMetrics().axisHeight,b=a.italic),n?bs(a,i,r,t,o,b,f):(f&&(a.style.position="relative",a.style.top=Ke(f)),a)},ws=(e,t)=>{var i;if(e.symbol)i=new Ri("mo",[zi(e.name,e.mode)]),ve.contains(vs,e.name)&&i.setAttribute("largeop","false");else if(e.body)i=new Ri("mo",qi(e.body,t));else{i=new Ri("mi",[new Di(e.name.slice(1))]);var r=new Ri("mo",[zi("","text")]);i=e.parentIsSupSub?new Ri("mrow",[i,r]):Pi([i,r])}return i},xs={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};gi({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:i,funcName:r}=e,s=r;return 1===s.length&&(s=xs[s]),{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:ys,mathmlBuilder:ws}),gi({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:vi(r)}},htmlBuilder:ys,mathmlBuilder:ws});var As={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};gi({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:ys,mathmlBuilder:ws}),gi({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:ys,mathmlBuilder:ws}),gi({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e,r=i;return 1===r.length&&(r=As[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:ys,mathmlBuilder:ws});var ks=(e,t)=>{var i,r,s,n,a=!1;if("supsub"===e.type?(i=e.sup,r=e.sub,s=Ji(e.base,"operatorname"),a=!0):s=Ji(e,"operatorname"),s.body.length>0){for(var o=s.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=Ei(o,t.withFont("mathrm"),!0),h=0;h<l.length;h++){var c=l[h];c instanceof at&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}n=ai.makeSpan(["mop"],l,t)}else n=ai.makeSpan(["mop"],[],t);return a?bs(n,i,r,t,t.style,0,0):n};function Es(e,t,i){for(var r=Ei(e,t,!1),s=t.sizeMultiplier/i.sizeMultiplier,n=0;n<r.length;n++){var a=r[n].classes.indexOf("sizing");a<0?Array.prototype.push.apply(r[n].classes,t.sizingClasses(i)):r[n].classes[a+1]==="reset-size"+t.size&&(r[n].classes[a+1]="reset-size"+i.size),r[n].height*=s,r[n].depth*=s}return ai.makeFragment(r)}gi({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:r}=e,s=t[0];return{type:"operatorname",mode:i.mode,body:vi(s),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:ks,mathmlBuilder:(e,t)=>{for(var i=qi(e.body,t.withFont("mathrm")),r=!0,s=0;s<i.length;s++){var n=i[s];if(n instanceof Fi.SpaceNode);else if(n instanceof Fi.MathNode)switch(n.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var a=n.children[0];1===n.children.length&&a instanceof Fi.TextNode?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var o=i.map((e=>e.toText())).join("");i=[new Fi.TextNode(o)]}var l=new Fi.MathNode("mi",i);l.setAttribute("mathvariant","normal");var h=new Fi.MathNode("mo",[zi("","text")]);return e.parentIsSupSub?new Fi.MathNode("mrow",[l,h]):Fi.newDocumentFragment([l,h])}}),Yr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),fi({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?ai.makeFragment(Ei(e.body,t,!1)):ai.makeSpan(["mord"],Ei(e.body,t,!0),t),mathmlBuilder:(e,t)=>ji(e.body,t,!0)}),gi({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:i}=e,r=t[0];return{type:"overline",mode:i.mode,body:r}},htmlBuilder(e,t){var i=Ni(e.body,t.havingCrampedStyle()),r=ai.makeLineSpan("overline-line",t),s=t.fontMetrics().defaultRuleThickness,n=ai.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]},t);return ai.makeSpan(["mord","overline"],[n],t)},mathmlBuilder(e,t){var i=new Fi.MathNode("mo",[new Fi.TextNode("‾")]);i.setAttribute("stretchy","true");var r=new Fi.MathNode("mover",[Vi(e.body,t),i]);return r.setAttribute("accent","true"),r}}),gi({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"phantom",mode:i.mode,body:vi(r)}},htmlBuilder:(e,t)=>{var i=Ei(e.body,t.withPhantom(),!1);return ai.makeFragment(i)},mathmlBuilder:(e,t)=>{var i=qi(e.body,t);return new Fi.MathNode("mphantom",i)}}),gi({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"hphantom",mode:i.mode,body:r}},htmlBuilder:(e,t)=>{var i=ai.makeSpan([],[Ni(e.body,t.withPhantom())]);if(i.height=0,i.depth=0,i.children)for(var r=0;r<i.children.length;r++)i.children[r].height=0,i.children[r].depth=0;return i=ai.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i}]},t),ai.makeSpan(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var i=qi(vi(e.body),t),r=new Fi.MathNode("mphantom",i),s=new Fi.MathNode("mpadded",[r]);return s.setAttribute("height","0px"),s.setAttribute("depth","0px"),s}}),gi({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"vphantom",mode:i.mode,body:r}},htmlBuilder:(e,t)=>{var i=ai.makeSpan(["inner"],[Ni(e.body,t.withPhantom())]),r=ai.makeSpan(["fix"],[]);return ai.makeSpan(["mord","rlap"],[i,r],t)},mathmlBuilder:(e,t)=>{var i=qi(vi(e.body),t),r=new Fi.MathNode("mphantom",i),s=new Fi.MathNode("mpadded",[r]);return s.setAttribute("width","0px"),s}}),gi({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e,r=Ji(t[0],"size").value,s=t[1];return{type:"raisebox",mode:i.mode,dy:r,body:s}},htmlBuilder(e,t){var i=Ni(e.body,t),r=Ye(e.dy,t);return ai.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:i}]},t)},mathmlBuilder(e,t){var i=new Fi.MathNode("mpadded",[Vi(e.body,t)]),r=e.dy.number+e.dy.unit;return i.setAttribute("voffset",r),i}}),gi({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),gi({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,i){var{parser:r}=e,s=i[0],n=Ji(t[0],"size"),a=Ji(t[1],"size");return{type:"rule",mode:r.mode,shift:s&&Ji(s,"size").value,width:n.value,height:a.value}},htmlBuilder(e,t){var i=ai.makeSpan(["mord","rule"],[],t),r=Ye(e.width,t),s=Ye(e.height,t),n=e.shift?Ye(e.shift,t):0;return i.style.borderRightWidth=Ke(r),i.style.borderTopWidth=Ke(s),i.style.bottom=Ke(n),i.width=r,i.height=s+n,i.depth=-n,i.maxFontSize=1.125*s*t.sizeMultiplier,i},mathmlBuilder(e,t){var i=Ye(e.width,t),r=Ye(e.height,t),s=e.shift?Ye(e.shift,t):0,n=t.color&&t.getColor()||"black",a=new Fi.MathNode("mspace");a.setAttribute("mathbackground",n),a.setAttribute("width",Ke(i)),a.setAttribute("height",Ke(r));var o=new Fi.MathNode("mpadded",[a]);return s>=0?o.setAttribute("height",Ke(s)):(o.setAttribute("height",Ke(s)),o.setAttribute("depth",Ke(-s))),o.setAttribute("voffset",Ke(s)),o}});var Ss=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];gi({type:"sizing",names:Ss,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:i,funcName:r,parser:s}=e,n=s.parseExpression(!1,i);return{type:"sizing",mode:s.mode,size:Ss.indexOf(r)+1,body:n}},htmlBuilder:(e,t)=>{var i=t.havingSize(e.size);return Es(e.body,i,t)},mathmlBuilder:(e,t)=>{var i=t.havingSize(e.size),r=qi(e.body,i),s=new Fi.MathNode("mstyle",r);return s.setAttribute("mathsize",Ke(i.sizeMultiplier)),s}}),gi({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,i)=>{var{parser:r}=e,s=!1,n=!1,a=i[0]&&Ji(i[0],"ordgroup");if(a)for(var o="",l=0;l<a.body.length;++l){if("t"===(o=a.body[l].text))s=!0;else{if("b"!==o){s=!1,n=!1;break}n=!0}}else s=!0,n=!0;var h=t[0];return{type:"smash",mode:r.mode,body:h,smashHeight:s,smashDepth:n}},htmlBuilder:(e,t)=>{var i=ai.makeSpan([],[Ni(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return i;if(e.smashHeight&&(i.height=0,i.children))for(var r=0;r<i.children.length;r++)i.children[r].height=0;if(e.smashDepth&&(i.depth=0,i.children))for(var s=0;s<i.children.length;s++)i.children[s].depth=0;var n=ai.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i}]},t);return ai.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{var i=new Fi.MathNode("mpadded",[Vi(e.body,t)]);return e.smashHeight&&i.setAttribute("height","0px"),e.smashDepth&&i.setAttribute("depth","0px"),i}}),gi({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:r}=e,s=i[0],n=t[0];return{type:"sqrt",mode:r.mode,body:n,index:s}},htmlBuilder(e,t){var i=Ni(e.body,t.havingCrampedStyle());0===i.height&&(i.height=t.fontMetrics().xHeight),i=ai.wrapFragment(i,t);var r=t.fontMetrics().defaultRuleThickness,s=r;t.style.id<Ne.TEXT.id&&(s=t.fontMetrics().xHeight);var n=r+s/4,a=i.height+i.depth+n+r,{span:o,ruleWidth:l,advanceWidth:h}=Br.sqrtImage(a,t),c=o.height-l;c>i.height+i.depth+n&&(n=(n+c-i.height-i.depth)/2);var d=o.height-i.height-n-l;i.style.paddingLeft=Ke(h);var u=ai.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+d)},{type:"elem",elem:o},{type:"kern",size:l}]},t);if(e.index){var p=t.havingStyle(Ne.SCRIPTSCRIPT),m=Ni(e.index,p,t),g=.6*(u.height-u.depth),f=ai.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:m}]},t),b=ai.makeSpan(["root"],[f]);return ai.makeSpan(["mord","sqrt"],[b,u],t)}return ai.makeSpan(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:i,index:r}=e;return r?new Fi.MathNode("mroot",[Vi(i,t),Vi(r,t)]):new Fi.MathNode("msqrt",[Vi(i,t)])}});var Cs={display:Ne.DISPLAY,text:Ne.TEXT,script:Ne.SCRIPT,scriptscript:Ne.SCRIPTSCRIPT};gi({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:i,funcName:r,parser:s}=e,n=s.parseExpression(!0,i),a=r.slice(1,r.length-5);return{type:"styling",mode:s.mode,style:a,body:n}},htmlBuilder(e,t){var i=Cs[e.style],r=t.havingStyle(i).withFont("");return Es(e.body,r,t)},mathmlBuilder(e,t){var i=Cs[e.style],r=t.havingStyle(i),s=qi(e.body,r),n=new Fi.MathNode("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return n.setAttribute("scriptlevel",a[0]),n.setAttribute("displaystyle",a[1]),n}});fi({type:"supsub",htmlBuilder(e,t){var i=function(e,t){var i=e.base;return i?"op"===i.type?i.limits&&(t.style.size===Ne.DISPLAY.size||i.alwaysHandleSupSub)?ys:null:"operatorname"===i.type?i.alwaysHandleSupSub&&(t.style.size===Ne.DISPLAY.size||i.limits)?ks:null:"accent"===i.type?ve.isCharacterBox(i.base)?tr:null:"horizBrace"===i.type&&!e.sub===i.isOver?ms:null:null}(e,t);if(i)return i(e,t);var r,s,n,{base:a,sup:o,sub:l}=e,h=Ni(a,t),c=t.fontMetrics(),d=0,u=0,p=a&&ve.isCharacterBox(a);if(o){var m=t.havingStyle(t.style.sup());r=Ni(o,m,t),p||(d=h.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(l){var g=t.havingStyle(t.style.sub());s=Ni(l,g,t),p||(u=h.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}n=t.style===Ne.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var f,b=t.sizeMultiplier,v=Ke(.5/c.ptPerEm/b),y=null;if(s){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(h instanceof at||w)&&(y=Ke(-h.italic))}if(r&&s){d=Math.max(d,n,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var x=4*c.defaultRuleThickness;if(d-r.depth-(s.height-u)<x){u=x-(d-r.depth)+s.height;var A=.8*c.xHeight-(d-r.depth);A>0&&(d+=A,u-=A)}var k=[{type:"elem",elem:s,shift:u,marginRight:v,marginLeft:y},{type:"elem",elem:r,shift:-d,marginRight:v}];f=ai.makeVList({positionType:"individualShift",children:k},t)}else if(s){u=Math.max(u,c.sub1,s.height-.8*c.xHeight);var E=[{type:"elem",elem:s,marginLeft:y,marginRight:v}];f=ai.makeVList({positionType:"shift",positionData:u,children:E},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");d=Math.max(d,n,r.depth+.25*c.xHeight),f=ai.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:r,marginRight:v}]},t)}var S=_i(h,"right")||"mord";return ai.makeSpan([S],[h,ai.makeSpan(["msupsub"],[f])],t)},mathmlBuilder(e,t){var i,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,i=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var s,n=[Vi(e.base,t)];if(e.sub&&n.push(Vi(e.sub,t)),e.sup&&n.push(Vi(e.sup,t)),r)s=i?"mover":"munder";else if(e.sub)if(e.sup){var a=e.base;s=a&&"op"===a.type&&a.limits&&t.style===Ne.DISPLAY||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(t.style===Ne.DISPLAY||a.limits)?"munderover":"msubsup"}else{var o=e.base;s=o&&"op"===o.type&&o.limits&&(t.style===Ne.DISPLAY||o.alwaysHandleSupSub)||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(o.limits||t.style===Ne.DISPLAY)?"munder":"msub"}else{var l=e.base;s=l&&"op"===l.type&&l.limits&&(t.style===Ne.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===Ne.DISPLAY)?"mover":"msup"}return new Fi.MathNode(s,n)}}),fi({type:"atom",htmlBuilder:(e,t)=>ai.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var i=new Fi.MathNode("mo",[zi(e.text,e.mode)]);if("bin"===e.family){var r=Bi(e,t);"bold-italic"===r&&i.setAttribute("mathvariant",r)}else"punct"===e.family?i.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||i.setAttribute("stretchy","false");return i}});var Ms={mi:"italic",mn:"normal",mtext:"normal"};fi({type:"mathord",htmlBuilder:(e,t)=>ai.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var i=new Fi.MathNode("mi",[zi(e.text,e.mode,t)]),r=Bi(e,t)||"italic";return r!==Ms[i.type]&&i.setAttribute("mathvariant",r),i}}),fi({type:"textord",htmlBuilder:(e,t)=>ai.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var i,r=zi(e.text,e.mode,t),s=Bi(e,t)||"normal";return i="text"===e.mode?new Fi.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new Fi.MathNode("mn",[r]):"\\prime"===e.text?new Fi.MathNode("mo",[r]):new Fi.MathNode("mi",[r]),s!==Ms[i.type]&&i.setAttribute("mathvariant",s),i}});var _s={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Ts={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};fi({type:"spacing",htmlBuilder(e,t){if(Ts.hasOwnProperty(e.text)){var i=Ts[e.text].className||"";if("text"===e.mode){var r=ai.makeOrd(e,t,"textord");return r.classes.push(i),r}return ai.makeSpan(["mspace",i],[ai.mathsym(e.text,e.mode,t)],t)}if(_s.hasOwnProperty(e.text))return ai.makeSpan(["mspace",_s[e.text]],[],t);throw new pe('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Ts.hasOwnProperty(e.text)){if(_s.hasOwnProperty(e.text))return new Fi.MathNode("mspace");throw new pe('Unknown type of space "'+e.text+'"')}return new Fi.MathNode("mtext",[new Fi.TextNode(" ")])}});var Ns=()=>{var e=new Fi.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};fi({type:"tag",mathmlBuilder(e,t){var i=new Fi.MathNode("mtable",[new Fi.MathNode("mtr",[Ns(),new Fi.MathNode("mtd",[ji(e.body,t)]),Ns(),new Fi.MathNode("mtd",[ji(e.tag,t)])])]);return i.setAttribute("width","100%"),i}});var Is={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ls={"\\textbf":"textbf","\\textmd":"textmd"},Ps={"\\textit":"textit","\\textup":"textup"},Rs=(e,t)=>{var i=e.font;return i?Is[i]?t.withTextFontFamily(Is[i]):Ls[i]?t.withTextFontWeight(Ls[i]):"\\emph"===i?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Ps[i]):t};gi({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:r}=e,s=t[0];return{type:"text",mode:i.mode,body:vi(s),font:r}},htmlBuilder(e,t){var i=Rs(e,t),r=Ei(e.body,i,!0);return ai.makeSpan(["mord","text"],r,i)},mathmlBuilder(e,t){var i=Rs(e,t);return ji(e.body,i)}}),gi({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"underline",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=Ni(e.body,t),r=ai.makeLineSpan("underline-line",t),s=t.fontMetrics().defaultRuleThickness,n=ai.makeVList({positionType:"top",positionData:i.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:i}]},t);return ai.makeSpan(["mord","underline"],[n],t)},mathmlBuilder(e,t){var i=new Fi.MathNode("mo",[new Fi.TextNode("‾")]);i.setAttribute("stretchy","true");var r=new Fi.MathNode("munder",[Vi(e.body,t),i]);return r.setAttribute("accentunder","true"),r}}),gi({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"vcenter",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=Ni(e.body,t),r=t.fontMetrics().axisHeight,s=.5*(i.height-r-(i.depth+r));return ai.makeVList({positionType:"shift",positionData:s,children:[{type:"elem",elem:i}]},t)},mathmlBuilder:(e,t)=>new Fi.MathNode("mpadded",[Vi(e.body,t)],["vcenter"])}),gi({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,i){throw new pe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var i=Ds(e),r=[],s=t.havingStyle(t.style.text()),n=0;n<i.length;n++){var a=i[n];"~"===a&&(a="\\textasciitilde"),r.push(ai.makeSymbol(a,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return ai.makeSpan(["mord","text"].concat(s.sizingClasses(t)),ai.tryCombineChars(r),s)},mathmlBuilder(e,t){var i=new Fi.TextNode(Ds(e)),r=new Fi.MathNode("mtext",[i]);return r.setAttribute("mathvariant","monospace"),r}});var Ds=e=>e.body.replace(/ /g,e.star?"␣":" "),Fs=ui,zs="[ \r\n\t]",Os="(\\\\[a-zA-Z@]+)"+zs+"*",Bs="[̀-ͯ]",Hs=new RegExp(Bs+"+$"),qs="("+zs+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+Bs+"*|[\ud800-\udbff][\udc00-\udfff]"+Bs+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Os+"|\\\\[^\ud800-\udfff])";class js{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(qs,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new ue("EOF",new de(this,t,t));var i=this.tokenRegex.exec(e);if(null===i||i.index!==t)throw new pe("Unexpected character: '"+e[t]+"'",new ue(e[t],new de(this,t,t+1)));var r=i[6]||i[3]||(i[2]?"\\ ":" ");if(14===this.catcodes[r]){var s=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===s?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new ue(r,new de(this,t,this.tokenRegex.lastIndex))}}class Vs{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new pe("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,i){if(void 0===i&&(i=!1),i){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Us=Xr;Yr("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Yr("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Yr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Yr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Yr("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var i=e.future();return 1===t[0].length&&t[0][0].text===i.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Yr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Yr("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Gs={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Yr("\\char",(function(e){var t,i=e.popToken(),r="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])r=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new pe("\\char` missing argument");r=i.text.charCodeAt(0)}else t=10;if(t){if(null==(r=Gs[i.text])||r>=t)throw new pe("Invalid base-"+t+" digit "+i.text);for(var s;null!=(s=Gs[e.future().text])&&s<t;)r*=t,r+=s,e.popToken()}return"\\@char{"+r+"}"}));var $s=(e,t,i,r)=>{var s=e.consumeArg().tokens;if(1!==s.length)throw new pe("\\newcommand's first argument must be a macro name");var n=s[0].text,a=e.isDefined(n);if(a&&!t)throw new pe("\\newcommand{"+n+"} attempting to redefine "+n+"; use \\renewcommand");if(!a&&!i)throw new pe("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");var o=0;if(1===(s=e.consumeArg().tokens).length&&"["===s[0].text){for(var l="",h=e.expandNextToken();"]"!==h.text&&"EOF"!==h.text;)l+=h.text,h=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new pe("Invalid number of arguments: "+l);o=parseInt(l),s=e.consumeArg().tokens}return a&&r||e.macros.set(n,{tokens:s,numArgs:o}),""};Yr("\\newcommand",(e=>$s(e,!1,!0,!1))),Yr("\\renewcommand",(e=>$s(e,!0,!1,!1))),Yr("\\providecommand",(e=>$s(e,!0,!0,!0))),Yr("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Yr("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Yr("\\show",(e=>{var t=e.popToken(),i=t.text;return console.log(t,e.macros.get(i),Fs[i],pt.math[i],pt.text[i]),""})),Yr("\\bgroup","{"),Yr("\\egroup","}"),Yr("~","\\nobreakspace"),Yr("\\lq","`"),Yr("\\rq","'"),Yr("\\aa","\\r a"),Yr("\\AA","\\r A"),Yr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Yr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Yr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Yr("ℬ","\\mathscr{B}"),Yr("ℰ","\\mathscr{E}"),Yr("ℱ","\\mathscr{F}"),Yr("ℋ","\\mathscr{H}"),Yr("ℐ","\\mathscr{I}"),Yr("ℒ","\\mathscr{L}"),Yr("ℳ","\\mathscr{M}"),Yr("ℛ","\\mathscr{R}"),Yr("ℭ","\\mathfrak{C}"),Yr("ℌ","\\mathfrak{H}"),Yr("ℨ","\\mathfrak{Z}"),Yr("\\Bbbk","\\Bbb{k}"),Yr("·","\\cdotp"),Yr("\\llap","\\mathllap{\\textrm{#1}}"),Yr("\\rlap","\\mathrlap{\\textrm{#1}}"),Yr("\\clap","\\mathclap{\\textrm{#1}}"),Yr("\\mathstrut","\\vphantom{(}"),Yr("\\underbar","\\underline{\\text{#1}}"),Yr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Yr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Yr("\\ne","\\neq"),Yr("≠","\\neq"),Yr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Yr("∉","\\notin"),Yr("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Yr("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Yr("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Yr("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Yr("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Yr("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Yr("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Yr("⟂","\\perp"),Yr("‼","\\mathclose{!\\mkern-0.8mu!}"),Yr("∌","\\notni"),Yr("⌜","\\ulcorner"),Yr("⌝","\\urcorner"),Yr("⌞","\\llcorner"),Yr("⌟","\\lrcorner"),Yr("©","\\copyright"),Yr("®","\\textregistered"),Yr("️","\\textregistered"),Yr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Yr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Yr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Yr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Yr("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Yr("⋮","\\vdots"),Yr("\\varGamma","\\mathit{\\Gamma}"),Yr("\\varDelta","\\mathit{\\Delta}"),Yr("\\varTheta","\\mathit{\\Theta}"),Yr("\\varLambda","\\mathit{\\Lambda}"),Yr("\\varXi","\\mathit{\\Xi}"),Yr("\\varPi","\\mathit{\\Pi}"),Yr("\\varSigma","\\mathit{\\Sigma}"),Yr("\\varUpsilon","\\mathit{\\Upsilon}"),Yr("\\varPhi","\\mathit{\\Phi}"),Yr("\\varPsi","\\mathit{\\Psi}"),Yr("\\varOmega","\\mathit{\\Omega}"),Yr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Yr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Yr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Yr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Yr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Yr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Yr("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Yr("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Ws={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Yr("\\dots",(function(e){var t="\\dotso",i=e.expandAfterFuture().text;return i in Ws?t=Ws[i]:("\\not"===i.slice(0,4)||i in pt.math&&ve.contains(["bin","rel"],pt.math[i].group))&&(t="\\dotsb"),t}));var Xs={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Yr("\\dotso",(function(e){return e.future().text in Xs?"\\ldots\\,":"\\ldots"})),Yr("\\dotsc",(function(e){var t=e.future().text;return t in Xs&&","!==t?"\\ldots\\,":"\\ldots"})),Yr("\\cdots",(function(e){return e.future().text in Xs?"\\@cdots\\,":"\\@cdots"})),Yr("\\dotsb","\\cdots"),Yr("\\dotsm","\\cdots"),Yr("\\dotsi","\\!\\cdots"),Yr("\\dotsx","\\ldots\\,"),Yr("\\DOTSI","\\relax"),Yr("\\DOTSB","\\relax"),Yr("\\DOTSX","\\relax"),Yr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Yr("\\,","\\tmspace+{3mu}{.1667em}"),Yr("\\thinspace","\\,"),Yr("\\>","\\mskip{4mu}"),Yr("\\:","\\tmspace+{4mu}{.2222em}"),Yr("\\medspace","\\:"),Yr("\\;","\\tmspace+{5mu}{.2777em}"),Yr("\\thickspace","\\;"),Yr("\\!","\\tmspace-{3mu}{.1667em}"),Yr("\\negthinspace","\\!"),Yr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Yr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Yr("\\enspace","\\kern.5em "),Yr("\\enskip","\\hskip.5em\\relax"),Yr("\\quad","\\hskip1em\\relax"),Yr("\\qquad","\\hskip2em\\relax"),Yr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Yr("\\tag@paren","\\tag@literal{({#1})}"),Yr("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new pe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Yr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Yr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Yr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Yr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Yr("\\newline","\\\\\\relax"),Yr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Ys=Ke(ze["Main-Regular"]["T".charCodeAt(0)][1]-.7*ze["Main-Regular"]["A".charCodeAt(0)][1]);Yr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Ys+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Yr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Ys+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Yr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Yr("\\@hspace","\\hskip #1\\relax"),Yr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Yr("\\ordinarycolon",":"),Yr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Yr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Yr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Yr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Yr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Yr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Yr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Yr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Yr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Yr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Yr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Yr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Yr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Yr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Yr("∷","\\dblcolon"),Yr("∹","\\eqcolon"),Yr("≔","\\coloneqq"),Yr("≕","\\eqqcolon"),Yr("⩴","\\Coloneqq"),Yr("\\ratio","\\vcentcolon"),Yr("\\coloncolon","\\dblcolon"),Yr("\\colonequals","\\coloneqq"),Yr("\\coloncolonequals","\\Coloneqq"),Yr("\\equalscolon","\\eqqcolon"),Yr("\\equalscoloncolon","\\Eqqcolon"),Yr("\\colonminus","\\coloneq"),Yr("\\coloncolonminus","\\Coloneq"),Yr("\\minuscolon","\\eqcolon"),Yr("\\minuscoloncolon","\\Eqcolon"),Yr("\\coloncolonapprox","\\Colonapprox"),Yr("\\coloncolonsim","\\Colonsim"),Yr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Yr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Yr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Yr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Yr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Yr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Yr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Yr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Yr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Yr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Yr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Yr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Yr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Yr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Yr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Yr("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Yr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Yr("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Yr("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Yr("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Yr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Yr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Yr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Yr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Yr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Yr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Yr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Yr("\\imath","\\html@mathml{\\@imath}{ı}"),Yr("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Yr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Yr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Yr("⟦","\\llbracket"),Yr("⟧","\\rrbracket"),Yr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Yr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Yr("⦃","\\lBrace"),Yr("⦄","\\rBrace"),Yr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Yr("⦵","\\minuso"),Yr("\\darr","\\downarrow"),Yr("\\dArr","\\Downarrow"),Yr("\\Darr","\\Downarrow"),Yr("\\lang","\\langle"),Yr("\\rang","\\rangle"),Yr("\\uarr","\\uparrow"),Yr("\\uArr","\\Uparrow"),Yr("\\Uarr","\\Uparrow"),Yr("\\N","\\mathbb{N}"),Yr("\\R","\\mathbb{R}"),Yr("\\Z","\\mathbb{Z}"),Yr("\\alef","\\aleph"),Yr("\\alefsym","\\aleph"),Yr("\\Alpha","\\mathrm{A}"),Yr("\\Beta","\\mathrm{B}"),Yr("\\bull","\\bullet"),Yr("\\Chi","\\mathrm{X}"),Yr("\\clubs","\\clubsuit"),Yr("\\cnums","\\mathbb{C}"),Yr("\\Complex","\\mathbb{C}"),Yr("\\Dagger","\\ddagger"),Yr("\\diamonds","\\diamondsuit"),Yr("\\empty","\\emptyset"),Yr("\\Epsilon","\\mathrm{E}"),Yr("\\Eta","\\mathrm{H}"),Yr("\\exist","\\exists"),Yr("\\harr","\\leftrightarrow"),Yr("\\hArr","\\Leftrightarrow"),Yr("\\Harr","\\Leftrightarrow"),Yr("\\hearts","\\heartsuit"),Yr("\\image","\\Im"),Yr("\\infin","\\infty"),Yr("\\Iota","\\mathrm{I}"),Yr("\\isin","\\in"),Yr("\\Kappa","\\mathrm{K}"),Yr("\\larr","\\leftarrow"),Yr("\\lArr","\\Leftarrow"),Yr("\\Larr","\\Leftarrow"),Yr("\\lrarr","\\leftrightarrow"),Yr("\\lrArr","\\Leftrightarrow"),Yr("\\Lrarr","\\Leftrightarrow"),Yr("\\Mu","\\mathrm{M}"),Yr("\\natnums","\\mathbb{N}"),Yr("\\Nu","\\mathrm{N}"),Yr("\\Omicron","\\mathrm{O}"),Yr("\\plusmn","\\pm"),Yr("\\rarr","\\rightarrow"),Yr("\\rArr","\\Rightarrow"),Yr("\\Rarr","\\Rightarrow"),Yr("\\real","\\Re"),Yr("\\reals","\\mathbb{R}"),Yr("\\Reals","\\mathbb{R}"),Yr("\\Rho","\\mathrm{P}"),Yr("\\sdot","\\cdot"),Yr("\\sect","\\S"),Yr("\\spades","\\spadesuit"),Yr("\\sub","\\subset"),Yr("\\sube","\\subseteq"),Yr("\\supe","\\supseteq"),Yr("\\Tau","\\mathrm{T}"),Yr("\\thetasym","\\vartheta"),Yr("\\weierp","\\wp"),Yr("\\Zeta","\\mathrm{Z}"),Yr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Yr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Yr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Yr("\\bra","\\mathinner{\\langle{#1}|}"),Yr("\\ket","\\mathinner{|{#1}\\rangle}"),Yr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Yr("\\Bra","\\left\\langle#1\\right|"),Yr("\\Ket","\\left|#1\\right\\rangle");var Ks=e=>t=>{var i=t.consumeArg().tokens,r=t.consumeArg().tokens,s=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=t=>i=>{e&&(i.macros.set("|",a),s.length&&i.macros.set("\\|",o));var n=t;!t&&s.length&&("|"===i.future().text&&(i.popToken(),n=!0));return{tokens:n?s:r,numArgs:0}};t.macros.set("|",l(!1)),s.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,c=t.expandTokens([...n,...h,...i]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};Yr("\\bra@ket",Ks(!1)),Yr("\\bra@set",Ks(!0)),Yr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Yr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Yr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Yr("\\angln","{\\angl n}"),Yr("\\blue","\\textcolor{##6495ed}{#1}"),Yr("\\orange","\\textcolor{##ffa500}{#1}"),Yr("\\pink","\\textcolor{##ff00af}{#1}"),Yr("\\red","\\textcolor{##df0030}{#1}"),Yr("\\green","\\textcolor{##28ae7b}{#1}"),Yr("\\gray","\\textcolor{gray}{#1}"),Yr("\\purple","\\textcolor{##9d38bd}{#1}"),Yr("\\blueA","\\textcolor{##ccfaff}{#1}"),Yr("\\blueB","\\textcolor{##80f6ff}{#1}"),Yr("\\blueC","\\textcolor{##63d9ea}{#1}"),Yr("\\blueD","\\textcolor{##11accd}{#1}"),Yr("\\blueE","\\textcolor{##0c7f99}{#1}"),Yr("\\tealA","\\textcolor{##94fff5}{#1}"),Yr("\\tealB","\\textcolor{##26edd5}{#1}"),Yr("\\tealC","\\textcolor{##01d1c1}{#1}"),Yr("\\tealD","\\textcolor{##01a995}{#1}"),Yr("\\tealE","\\textcolor{##208170}{#1}"),Yr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Yr("\\greenB","\\textcolor{##8af281}{#1}"),Yr("\\greenC","\\textcolor{##74cf70}{#1}"),Yr("\\greenD","\\textcolor{##1fab54}{#1}"),Yr("\\greenE","\\textcolor{##0d923f}{#1}"),Yr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Yr("\\goldB","\\textcolor{##ffbb71}{#1}"),Yr("\\goldC","\\textcolor{##ff9c39}{#1}"),Yr("\\goldD","\\textcolor{##e07d10}{#1}"),Yr("\\goldE","\\textcolor{##a75a05}{#1}"),Yr("\\redA","\\textcolor{##fca9a9}{#1}"),Yr("\\redB","\\textcolor{##ff8482}{#1}"),Yr("\\redC","\\textcolor{##f9685d}{#1}"),Yr("\\redD","\\textcolor{##e84d39}{#1}"),Yr("\\redE","\\textcolor{##bc2612}{#1}"),Yr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Yr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Yr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Yr("\\maroonD","\\textcolor{##ca337c}{#1}"),Yr("\\maroonE","\\textcolor{##9e034e}{#1}"),Yr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Yr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Yr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Yr("\\purpleD","\\textcolor{##7854ab}{#1}"),Yr("\\purpleE","\\textcolor{##543b78}{#1}"),Yr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Yr("\\mintB","\\textcolor{##edf2df}{#1}"),Yr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Yr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Yr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Yr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Yr("\\grayD","\\textcolor{##d6d8da}{#1}"),Yr("\\grayE","\\textcolor{##babec2}{#1}"),Yr("\\grayF","\\textcolor{##888d93}{#1}"),Yr("\\grayG","\\textcolor{##626569}{#1}"),Yr("\\grayH","\\textcolor{##3b3e40}{#1}"),Yr("\\grayI","\\textcolor{##21242c}{#1}"),Yr("\\kaBlue","\\textcolor{##314453}{#1}"),Yr("\\kaGreen","\\textcolor{##71B307}{#1}");var Zs={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Js{constructor(e,t,i){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Vs(Us,t.macros),this.mode=i,this.stack=[]}feed(e){this.lexer=new js(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,i,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:i}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:i}=this.consumeArg());return this.pushToken(new ue("EOF",i.loc)),this.pushTokens(r),t.range(i,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],i=e&&e.length>0;i||this.consumeSpaces();var r,s=this.future(),n=0,a=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++n;else if("}"===r.text){if(-1===--n)throw new pe("Extra }",r)}else if("EOF"===r.text)throw new pe("Unexpected end of input in a macro argument, expected '"+(e&&i?e[a]:"}")+"'",r);if(e&&i)if((0===n||1===n&&"{"===e[a])&&r.text===e[a]){if(++a===e.length){t.splice(-a,a);break}}else a=0}while(0!==n||i);return"{"===s.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new pe("The length of delimiters doesn't match the number of args!");for(var i=t[0],r=0;r<i.length;r++){var s=this.popToken();if(i[r]!==s.text)throw new pe("Use of the macro doesn't match its definition",s)}}for(var n=[],a=0;a<e;a++)n.push(this.consumeArg(t&&t[a+1]).tokens);return n}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new pe("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),i=t.text,r=t.noexpand?null:this._getExpansion(i);if(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===i[0]&&!this.isDefined(i))throw new pe("Undefined control sequence: "+i);return this.pushToken(t),!1}this.countExpansion(1);var s=r.tokens,n=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var a=(s=s.slice()).length-1;a>=0;--a){var o=s[a];if("#"===o.text){if(0===a)throw new pe("Incomplete placeholder at end of macro body",o);if("#"===(o=s[--a]).text)s.splice(a+1,1);else{if(!/^[1-9]$/.test(o.text))throw new pe("Not a valid argument number",o);s.splice(a,2,...n[+o.text-1])}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ue(e)]):void 0}expandTokens(e){var t=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var i=this.lexer.catcodes[e];if(null!=i&&13!==i)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var s=0;if(-1!==r.indexOf("#"))for(var n=r.replace(/##/g,"");-1!==n.indexOf("#"+(s+1));)++s;for(var a=new js(r,this.settings),o=[],l=a.lex();"EOF"!==l.text;)o.push(l),l=a.lex();return o.reverse(),{tokens:o,numArgs:s}}return r}isDefined(e){return this.macros.has(e)||Fs.hasOwnProperty(e)||pt.math.hasOwnProperty(e)||pt.text.hasOwnProperty(e)||Zs.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Fs.hasOwnProperty(e)&&!Fs[e].primitive}}var Qs=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,en=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),tn={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},rn={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class sn{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Js(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new pe("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ue("}")),this.gullet.pushTokens(e);var i=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,i}parseExpression(e,t){for(var i=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==sn.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&Fs[r.text]&&Fs[r.text].infix)break;var s=this.parseAtom(t);if(!s)break;"internal"!==s.type&&i.push(s)}return"text"===this.mode&&this.formLigatures(i),this.handleInfixNodes(i)}handleInfixNodes(e){for(var t,i=-1,r=0;r<e.length;r++)if("infix"===e[r].type){if(-1!==i)throw new pe("only one infix operator per group",e[r].token);i=r,t=e[r].replaceWith}if(-1!==i&&t){var s,n,a=e.slice(0,i),o=e.slice(i+1);return s=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},n=1===o.length&&"ordgroup"===o[0].type?o[0]:{type:"ordgroup",mode:this.mode,body:o},["\\\\abovefrac"===t?this.callFunction(t,[s,e[i],n],[]):this.callFunction(t,[s,n],[])]}return e}handleSupSubscript(e){var t,i=this.fetch(),r=i.text;this.consume(),this.consumeSpaces();do{var s;t=this.parseGroup(e)}while("internal"===(null==(s=t)?void 0:s.type));if(!t)throw new pe("Expected group after '"+r+"'",i);return t}formatUnsupportedCmd(e){for(var t=[],i=0;i<e.length;i++)t.push({type:"textord",mode:"text",text:e[i]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t,i,r=this.parseGroup("atom",e);if("internal"===(null==r?void 0:r.type))return r;if("text"===this.mode)return r;for(;;){this.consumeSpaces();var s=this.fetch();if("\\limits"===s.text||"\\nolimits"===s.text){if(r&&"op"===r.type){var n="\\limits"===s.text;r.limits=n,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type)throw new pe("Limit controls must follow a math operator",s);r.alwaysHandleSupSub&&(r.limits="\\limits"===s.text)}this.consume()}else if("^"===s.text){if(t)throw new pe("Double superscript",s);t=this.handleSupSubscript("superscript")}else if("_"===s.text){if(i)throw new pe("Double subscript",s);i=this.handleSupSubscript("subscript")}else if("'"===s.text){if(t)throw new pe("Double superscript",s);var a={type:"textord",mode:this.mode,text:"\\prime"},o=[a];for(this.consume();"'"===this.fetch().text;)o.push(a),this.consume();"^"===this.fetch().text&&o.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:o}}else{if(!en[s.text])break;var l=Qs.test(s.text),h=[];for(h.push(new ue(en[s.text])),this.consume();;){var c=this.fetch().text;if(!en[c])break;if(Qs.test(c)!==l)break;h.unshift(new ue(en[c])),this.consume()}var d=this.subparse(h);l?i={type:"ordgroup",mode:"math",body:d}:t={type:"ordgroup",mode:"math",body:d}}}return t||i?{type:"supsub",mode:this.mode,base:r,sup:t,sub:i}:r}parseFunction(e,t){var i=this.fetch(),r=i.text,s=Fs[r];if(!s)return null;if(this.consume(),t&&"atom"!==t&&!s.allowedInArgument)throw new pe("Got function '"+r+"' with no arguments"+(t?" as "+t:""),i);if("text"===this.mode&&!s.allowedInText)throw new pe("Can't use function '"+r+"' in text mode",i);if("math"===this.mode&&!1===s.allowedInMath)throw new pe("Can't use function '"+r+"' in math mode",i);var{args:n,optArgs:a}=this.parseArguments(r,s);return this.callFunction(r,n,a,i,e)}callFunction(e,t,i,r,s){var n={funcName:e,parser:this,token:r,breakOnTokenText:s},a=Fs[e];if(a&&a.handler)return a.handler(n,t,i);throw new pe("No function handler for "+e)}parseArguments(e,t){var i=t.numArgs+t.numOptionalArgs;if(0===i)return{args:[],optArgs:[]};for(var r=[],s=[],n=0;n<i;n++){var a=t.argTypes&&t.argTypes[n],o=n<t.numOptionalArgs;(t.primitive&&null==a||"sqrt"===t.type&&1===n&&null==s[0])&&(a="primitive");var l=this.parseGroupOfType("argument to '"+e+"'",a,o);if(o)s.push(l);else{if(null==l)throw new pe("Null argument, please report this as a bug");r.push(l)}}return{args:r,optArgs:s}}parseGroupOfType(e,t,i){switch(t){case"color":return this.parseColorGroup(i);case"size":return this.parseSizeGroup(i);case"url":return this.parseUrlGroup(i);case"math":case"text":return this.parseArgumentGroup(i,t);case"hbox":var r=this.parseArgumentGroup(i,"text");return null!=r?{type:"styling",mode:r.mode,body:[r],style:"text"}:null;case"raw":var s=this.parseStringGroup("raw",i);return null!=s?{type:"raw",mode:"text",string:s.text}:null;case"primitive":if(i)throw new pe("A primitive argument cannot be optional");var n=this.parseGroup(e);if(null==n)throw new pe("Expected group as "+e,this.fetch());return n;case"original":case null:case void 0:return this.parseArgumentGroup(i);default:throw new pe("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var i=this.gullet.scanArgument(t);if(null==i)return null;for(var r,s="";"EOF"!==(r=this.fetch()).text;)s+=r.text,this.consume();return this.consume(),i.text=s,i}parseRegexGroup(e,t){for(var i,r=this.fetch(),s=r,n="";"EOF"!==(i=this.fetch()).text&&e.test(n+i.text);)n+=(s=i).text,this.consume();if(""===n)throw new pe("Invalid "+t+": '"+r.text+"'",r);return r.range(s,n)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var i=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!i)throw new pe("Invalid color: '"+t.text+"'",t);var r=i[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,i=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",i=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new pe("Invalid size: '"+t.text+"'",t);var s={number:+(r[1]+r[2]),unit:r[3]};if(!Xe(s))throw new pe("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:i}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var i=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:i}}parseArgumentGroup(e,t){var i=this.gullet.scanArgument(e);if(null==i)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var n={type:"ordgroup",mode:this.mode,loc:i.loc,body:s};return t&&this.switchMode(r),n}parseGroup(e,t){var i,r=this.fetch(),s=r.text;if("{"===s||"\\begingroup"===s){this.consume();var n="{"===s?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,n),o=this.fetch();this.expect(n),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:de.range(r,o),body:a,semisimple:"\\begingroup"===s||void 0}}else if(null==(i=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===s[0]&&!Zs.hasOwnProperty(s)){if(this.settings.throwOnError)throw new pe("Undefined control sequence: "+s,r);i=this.formatUnsupportedCmd(s),this.consume()}return i}formLigatures(e){for(var t=e.length-1,i=0;i<t;++i){var r=e[i],s=r.text;"-"===s&&"-"===e[i+1].text&&(i+1<t&&"-"===e[i+2].text?(e.splice(i,3,{type:"textord",mode:"text",loc:de.range(r,e[i+2]),text:"---"}),t-=2):(e.splice(i,2,{type:"textord",mode:"text",loc:de.range(r,e[i+1]),text:"--"}),t-=1)),"'"!==s&&"`"!==s||e[i+1].text!==s||(e.splice(i,2,{type:"textord",mode:"text",loc:de.range(r,e[i+1]),text:s+s}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var i=t.slice(5),r="*"===i.charAt(0);if(r&&(i=i.slice(1)),i.length<2||i.charAt(0)!==i.slice(-1))throw new pe("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:i=i.slice(1,-1),star:r}}rn.hasOwnProperty(t[0])&&!pt[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=rn[t[0]]+t.slice(1));var s,n=Hs.exec(t);if(n&&("i"===(t=t.substring(0,n.index))?t="ı":"j"===t&&(t="ȷ")),pt[this.mode][t]){this.settings.strict&&"math"===this.mode&&Gt.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a,o=pt[this.mode][t].group,l=de.range(e);if(dt.hasOwnProperty(o)){var h=o;a={type:"atom",mode:this.mode,family:h,loc:l,text:t}}else a={type:o,mode:this.mode,loc:l,text:t};s=a}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(Pe(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),s={type:"textord",mode:"text",loc:de.range(e),text:t}}if(this.consume(),n)for(var c=0;c<n[0].length;c++){var d=n[0][c];if(!tn[d])throw new pe("Unknown accent ' "+d+"'",e);var u=tn[d][this.mode]||tn[d].text;if(!u)throw new pe("Accent "+d+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:de.range(e),label:u,isStretchy:!1,isShifty:!0,base:s}}return s}}sn.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var nn=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var i=new sn(e,t);delete i.gullet.macros.current["\\df@tag"];var r=i.parse();if(delete i.gullet.macros.current["\\current@color"],delete i.gullet.macros.current["\\color"],i.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new pe("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:i.subparse([new ue("\\df@tag")])}]}return r};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."));var an=function(e,t,i){if(i.throwOnError||!(e instanceof pe))throw e;var r=ai.makeSpan(["katex-error"],[new at(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+i.errorColor),r},on=function(e,t){var i=new xe(t);try{return function(e,t,i){var r,s=Gi(i);if("mathml"===i.output)return Ui(e,t,s,i.displayMode,!0);if("html"===i.output){var n=Li(e,s);r=ai.makeSpan(["katex"],[n])}else{var a=Ui(e,t,s,i.displayMode,!1),o=Li(e,s);r=ai.makeSpan(["katex"],[a,o])}return $i(r,i)}(nn(e,i),e,i)}catch(t){return an(t,e,i)}},ln=function(e,t){return on(e,t).toMarkup()},hn=function(t){var i=t.textObject.equation.expression,r=e.useMemo((function(){return ln(i,{throwOnError:!1,output:"mathml"})}),[i]);return e.createElement("span",{className:"rotion-richtext-equation",dangerouslySetInnerHTML:{__html:r}})},cn=function(t){var i=t.textObject;if(!i)return e.createElement(e.Fragment,null);var r=i.type,s=i.plain_text;switch(r){case"text":return e.createElement(ce,{textObject:i});case"mention":return e.createElement(oe,{textObject:i},s);case"equation":return e.createElement(hn,{textObject:i});default:return e.createElement(e.Fragment,null)}},dn=function(t){var i=t.textObjects;return e.createElement("div",{className:"rotion-gallery-title"},i.map((function(t,i){return e.createElement(cn,{key:"richtext-".concat(i),textObject:t})})))},un=function(t){var i=t.date;if(null===i)return e.createElement(e.Fragment,null);var r=i.start,s=i.end,n=e.useState(""),a=n[0],o=n[1],l=e.useState(""),h=l[0],c=l[1];return e.useEffect((function(){var e,t=d(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),i=t.dateF,n=t.timeF;o(ee(r).format(r.length>10?"".concat(i," ").concat(n):i)),s&&c(ee(s).format(s.length>10?"".concat(i," ").concat(n):i))}),[a,h]),e.createElement("div",{className:"rotion-gallery-date"},a,s&&" → ".concat(h))},pn=function(t){var i=t.textObjects,r=t.size;return e.createElement("div",{className:"rotion-gallery-richtext rotion-gallery-richtext-".concat(r||"medium")},i.map((function(t,i){return e.createElement(cn,{key:"richtext-".concat(i),textObject:t})})))},mn=function(t){var i=t.pathname,r=t.link,s=t.query,n=t.children,a=s?{pathname:i,query:s}:i;if(!a)return e.createElement("span",{className:"rotion-gallery-multiselect-tag"},n);if(r){var o=r;return e.createElement(o,{className:"rotion-gallery-multiselect-tag rotion-gallery-multiselect-link",href:a},n)}return e.createElement("a",{className:"rotion-gallery-multiselect-tag rotion-gallery-multiselect-link",href:i},n)},gn=function(t){var i=t.multiSelect,r=t.options||{},s=r.pathname,n=r.link,a=r.query;return e.createElement("ul",{className:"rotion-gallery-multiselect-ul"},i.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-gallery-multiselect-li rotion-gallery-multiselect-".concat(t.color)},e.createElement(mn,{pathname:s?"".concat(s,"/").concat(encodeURIComponent(t.name)):void 0,link:n,query:a},t.name))})))},fn=function(t){var i=t.url;if(!i)return e.createElement(e.Fragment,null);var r=u(i),s=r.domain,n=r.omittedPath;return e.createElement("div",{className:"rotion-gallery-url"},e.createElement("a",{className:"rotion-gallery-url-link",href:i,rel:"noreferrer",target:"_blank"},e.createElement("svg",{className:"rotion-gallery-url-chain",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.4 3h3.085a3.4 3.4 0 0 1 3.4 3.4v.205A3.4 3.4 0 0 1 7.485 10H7V9h.485A2.4 2.4 0 0 0 9.88 6.61V6.4A2.4 2.4 0 0 0 7.49 4H4.4A2.4 2.4 0 0 0 2 6.4v.205A2.394 2.394 0 0 0 4 8.96v1a3.4 3.4 0 0 1-3-3.35V6.4A3.405 3.405 0 0 1 4.4 3zM12 7.04v-1a3.4 3.4 0 0 1 3 3.36v.205A3.405 3.405 0 0 1 11.605 13h-3.09A3.4 3.4 0 0 1 5.12 9.61V9.4A3.4 3.4 0 0 1 8.515 6H9v1h-.485A2.4 2.4 0 0 0 6.12 9.4v.205A2.4 2.4 0 0 0 8.515 12h3.09A2.4 2.4 0 0 0 14 9.61V9.4a2.394 2.394 0 0 0-2-2.36z"})),e.createElement("span",{className:"rotion-gallery-url-domain"},s),e.createElement("span",{className:"rotion-gallery-url-path"},n)))},bn=function(){return e.createElement("div",{className:"rotion-checkbox-checked"},e.createElement("div",{className:"rotion-checkbox-checked-inner"},e.createElement("svg",{className:"rotion-checkbox-checked-checkbox",viewBox:"0 0 14 14"},e.createElement("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"}))))},vn=function(){return e.createElement("div",{className:"rotion-checkbox-unchecked"},e.createElement("svg",{className:"rotion-checkbox-unchecked-checkbox",viewBox:"0 0 16 16"},e.createElement("path",{d:"M1.5,1.5 L1.5,14.5 L14.5,14.5 L14.5,1.5 L1.5,1.5 Z M0,0 L16,0 L16,16 L0,16 L0,0 Z"})))},yn=function(t){return t.bool?e.createElement(bn,null):e.createElement(vn,null)},wn=function(t){var i=t.prefix,r=t.suffix,s=t.children;return e.createElement(e.Fragment,null,i&&e.createElement("span",{className:"rotion-prefix"},i),s,r&&e.createElement("span",{className:"rotion-suffix"},r))},xn=function(t){var i=t.checked,r=t.options||{},s=r.prefix,n=r.suffix;return e.createElement("div",{className:"rotion-gallery-checkbox"},e.createElement(wn,{prefix:s,suffix:n},e.createElement(yn,{bool:i})))},An=function(t){var i=t.number,r=t.options||{},s=r.prefix,n=r.suffix;return e.createElement("div",{className:"rotion-gallery-number"},e.createElement(wn,{prefix:s,suffix:n},i))},kn=function(t){var i=t.pathname,r=t.link,s=t.query,n=t.children;if(!i)return e.createElement("span",{className:"rotion-gallery-select-tag"},n);if(r){var a=s?{pathname:i,query:s}:i,o=r;return e.createElement(o,{className:"rotion-gallery-select-tag rotion-gallery-select-link",href:a},n)}return e.createElement("a",{className:"rotion-gallery-select-tag rotion-gallery-select-link",href:i},n)},En=function(t){var i=t.select,r=t.options,s=i.name,n=i.color,a=r||{},o=a.pathname,l=a.link,h=a.query;return e.createElement("div",{className:"rotion-gallery-select"},e.createElement("span",{className:"rotion-gallery-select-wrapper rotion-gallery-select-".concat(n)},e.createElement(kn,{pathname:o?"".concat(o,"/").concat(encodeURIComponent(s)):void 0,link:l,query:h},s)))},Sn=function(t){var i=t.number,r=t.options||{},s=r.prefix,n=r.suffix;return e.createElement("div",{className:"rotion-gallery-formula"},e.createElement(wn,{prefix:s,suffix:n},i))},Cn=function(t){var i=t.property,r=t.options;if(!i||!i.type)return console.log("property empty in gallery handler: ",i),e.createElement(e.Fragment,null);switch(i.type){case"title":return e.createElement(dn,{textObjects:i.title});case"rich_text":return e.createElement(pn,{textObjects:i.rich_text});case"multi_select":return e.createElement(gn,{multiSelect:i.multi_select,options:r});case"select":return e.createElement(En,{select:i.select,options:r});case"date":return e.createElement(un,{date:i.date});case"url":return e.createElement(fn,{url:i.url});case"checkbox":return e.createElement(xn,{checked:i.checkbox,options:r});case"number":return e.createElement(An,{number:i.number,options:r});case"formula":return e.createElement(Sn,{number:i.formula.number,options:r});default:return console.log("unsupport database property:",i),e.createElement(e.Fragment,null)}},Mn=function(t){var i=t.children,r=t.link,s=t.query,n=t.pathname;if(n&&r&&s){var a=r;return e.createElement(a,{className:"rotion-gallery-card rotion-gallery-link",href:{pathname:n,query:s}},i)}if(n&&r){a=r;return e.createElement(a,{className:"rotion-gallery-card rotion-gallery-link",href:n},i)}return n?e.createElement("a",{className:"rotion-gallery-card rotion-gallery-link",href:n},i):e.createElement("div",{className:"rotion-gallery-card"},i)},_n={small:"100px",medium:"146px",large:"180px"},Tn=function(t){var i=t.src,r=t.options||{},s=r.size,n=r.height,a=r.fit,o="";return o=s&&n?"string"==typeof n?n:n[s]:_n[s||"medium"],e.createElement("div",{className:"rotion-gallery-preview",style:{height:o}},e.createElement("img",{src:i,className:"rotion-gallery-preview-img rotion-gallery-preview-".concat(a?"fit":"nofit"),style:{height:o}}))};function Nn(e,t,i){if(!i)return t;var r=i||{},s=r.href,n=r.prefix,a=r.suffix;return s&&s[e]&&(t.pathname=s[e]),n&&n[e]&&(t.prefix=n[e]),a&&a[e]&&(t.suffix=a[e]),t}var In=function(t){var i,r=t.keys,s=t.page,n=t.options,a=function(e){for(var t in e.properties)if("title"===e.properties[t].type)return t}(s);if(!a)return e.createElement(e.Fragment,null);var o=n||{},c=o.href,d=o.link,u=o.query,p=o.image,m={link:d,query:u};if(c&&c[a]){var g=l(c[a]),f=g[0],b=g[1];m.pathname=""===b?f:"".concat(f).concat(h(b,s))}return e.createElement(Mn,{pathname:m.pathname,link:d,query:u},(null==p?void 0:p.preview)&&(null===(i=s.cover)||void 0===i?void 0:i.src)&&e.createElement(Tn,{src:s.cover.src,options:p}),e.createElement("div",{className:"rotion-gallery-card-text"},r.map((function(t,i){return e.createElement("div",{key:"".concat(s.id).concat(t),className:"field".concat(i)},e.createElement(Cn,{property:s.properties[t],options:Nn(t,structuredClone(m),n)}))}))))},Ln=function(t){var i=t.textObjects,r=t.options,s=function(){return"rotion-list-title-wrapper ".concat((null==r?void 0:r.pathname)?"rotion-list-title-link":"")};if((null==r?void 0:r.link)&&(null==r?void 0:r.pathname)&&(null==r?void 0:r.query)){var n=r.link;return e.createElement(n,{className:s(),href:{pathname:r.pathname,query:r.query}},i.map((function(t,i){return e.createElement(cn,{key:"richtext-".concat(i),textObject:t})})))}if((null==r?void 0:r.link)&&(null==r?void 0:r.pathname)){n=r.link;return e.createElement(n,{className:s(),href:r.pathname},i.map((function(t,i){return e.createElement(cn,{key:"richtext-".concat(i),textObject:t})})))}return(null==r?void 0:r.pathname)?e.createElement("a",{className:s(),href:r.pathname},i.map((function(t,i){return e.createElement(cn,{key:"richtext-".concat(i),textObject:t})}))):e.createElement("span",{className:s()},i.map((function(t,i){return e.createElement(cn,{key:"richtext-".concat(i),textObject:t})})))},Pn=function(t){var i=t.textObjects,r=t.options;return e.createElement("div",{className:"rotion-list-title"},e.createElement(Ln,{textObjects:i,options:r}))},Rn=function(t){var i=t.date;if(null===i)return e.createElement(e.Fragment,null);var r=i.start,s=i.end,n=e.useState(""),a=n[0],o=n[1],l=e.useState(""),h=l[0],c=l[1];return e.useEffect((function(){var e,t=d(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),i=t.dateF,n=t.timeF;o(ee(r).format(r.length>10?"".concat(i," ").concat(n):i)),s&&c(ee(s).format(s.length>10?"".concat(i," ").concat(n):i))}),[a,h]),e.createElement("div",{className:"rotion-list-date"},a,s&&" → ".concat(h))},Dn=function(t){var i=t.textObjects;return e.createElement("div",{className:"rotion-list-richtext"},i.map((function(t,i){return e.createElement(cn,{key:"richtext-".concat(i),textObject:t})})))},Fn=function(t){var i=t.color,r=t.pathname,s=t.link,n=t.query,a=t.children,o=n?{pathname:r,query:n}:r,l=function(e){return"rotion-list-multiselect-wrapper ".concat(o?"rotion-list-multiselect-link":""," rotion-list-multiselect-").concat(e)};if(!o)return e.createElement("span",{className:l(i)},a);if(s){var h=s;return e.createElement(h,{className:l(i),href:o},a)}return e.createElement("a",{className:l(i),href:r},a)},zn=function(t){var i=t.multiSelect,r=t.options;if(!i)return e.createElement(e.Fragment,null);var s=r||{},n=s.pathname,a=s.link,o=s.query;return e.createElement("ul",{className:"rotion-list-multiselect-ul"},i.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-list-multiselect-li"},e.createElement(Fn,{pathname:n?"".concat(n,"/").concat(encodeURIComponent(t.name)):void 0,color:t.color,link:a,query:o},t.name))})))},On=function(t){var i=t.color,r=t.pathname,s=t.link,n=t.query,a=t.children,o=n?{pathname:r,query:n}:r,l=function(e){return"rotion-list-select-wrapper ".concat(o?"rotion-list-select-link":""," rotion-list-select-").concat(e)};if(!o)return e.createElement("span",{className:l(i)},a);if(s){var h=s;return e.createElement(h,{className:l(i),href:o},a)}return e.createElement("a",{className:l(i),href:r},a)},Bn=function(t){var i=t.select,r=t.options;if(!i)return e.createElement(e.Fragment,null);var s=i.name,n=i.color,a=r||{},o=a.pathname,l=a.link,h=a.query;return e.createElement("div",{className:"rotion-list-select"},e.createElement(On,{pathname:o?"".concat(o,"/").concat(encodeURIComponent(s)):void 0,color:n,link:l,query:h},s))},Hn=function(t){var i=t.url;if(!i)return e.createElement(e.Fragment,null);var r=u(i),s=r.domain,n=r.omittedPath;return e.createElement("div",{className:"rotion-list-url"},e.createElement("a",{className:"rotion-list-url-link",href:i,rel:"noreferrer",target:"_blank"},e.createElement("svg",{className:"rotion-list-url-chain",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.4 3h3.085a3.4 3.4 0 0 1 3.4 3.4v.205A3.4 3.4 0 0 1 7.485 10H7V9h.485A2.4 2.4 0 0 0 9.88 6.61V6.4A2.4 2.4 0 0 0 7.49 4H4.4A2.4 2.4 0 0 0 2 6.4v.205A2.394 2.394 0 0 0 4 8.96v1a3.4 3.4 0 0 1-3-3.35V6.4A3.405 3.405 0 0 1 4.4 3zM12 7.04v-1a3.4 3.4 0 0 1 3 3.36v.205A3.405 3.405 0 0 1 11.605 13h-3.09A3.4 3.4 0 0 1 5.12 9.61V9.4A3.4 3.4 0 0 1 8.515 6H9v1h-.485A2.4 2.4 0 0 0 6.12 9.4v.205A2.4 2.4 0 0 0 8.515 12h3.09A2.4 2.4 0 0 0 14 9.61V9.4a2.394 2.394 0 0 0-2-2.36z"})),e.createElement("span",{className:"rotion-list-url-domain"},s),e.createElement("span",{className:"rotion-list-url-path"},n)))},qn=function(t){var i=t.checked,r=t.options||{},s=r.prefix,n=r.suffix;return e.createElement("div",{className:"rotion-list-checkbox"},e.createElement(wn,{prefix:s,suffix:n},e.createElement(yn,{bool:i})))},jn=function(t){var i=t.number,r=t.options||{},s=r.prefix,n=r.suffix;return e.createElement("div",{className:"rotion-list-number"},e.createElement(wn,{prefix:s,suffix:n},i))},Vn=function(t){var i=t.number,r=t.options||{},s=r.prefix,n=r.suffix;return e.createElement("div",{className:"rotion-list-formula"},e.createElement(wn,{prefix:s,suffix:n},i))},Un=function(t){var i=t.property,r=t.options;if(!i||!i.type)return console.log("property empty in table handler: ",i),e.createElement(e.Fragment,null);switch(i.type){case"title":return e.createElement(Pn,{textObjects:i.title,options:r});case"rich_text":return e.createElement(Dn,{textObjects:i.rich_text});case"url":return e.createElement(Hn,{url:i.url});case"date":return e.createElement(Rn,{date:i.date});case"multi_select":return e.createElement(zn,{multiSelect:i.multi_select,options:r});case"checkbox":return e.createElement(qn,{checked:i.checkbox,options:r});case"number":return e.createElement(jn,{number:i.number,options:r});case"select":return e.createElement(Bn,{select:i.select,options:r});case"formula":return e.createElement(Vn,{number:i.formula.number,options:r});default:return console.log("unsupport database property:",i),e.createElement(e.Fragment,null)}},Gn=function(t){var i=t.name,r=t.page,s=t.options;if("spacer"===i||"dashed"===i||!("properties"in r))return e.createElement(e.Fragment,null);var n=r.properties[i];if(!n)return e.createElement(e.Fragment,null);var a=s||{},o=a.href,c=a.prefix,d=a.suffix,u={link:a.link,query:a.query};if(o&&o[i]){var p=l(o[i]),m=p[0],g=p[1];u.pathname=""===g?m:"".concat(m).concat(h(g,r))}return c&&c[i]&&(u.prefix=c[i]),d&&d[i]&&(u.suffix=d[i]),e.createElement(Un,{property:n,options:u})};function $n(e,t){var i=["rotion-list-column".concat(t)];switch(e){case"spacer":i.push("rotion-list-spacer");break;case"dashed":i.push("rotion-list-dashed")}return i.join(" ")}var Wn=function(t){var i=t.type,r=t.className;switch(i){case"title":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M7.73943662,8.6971831 C7.77640845,8.7834507 7.81338028,8.8943662 7.81338028,9.00528169 C7.81338028,9.49823944 7.40669014,9.89260563 6.91373239,9.89260563 C6.53169014,9.89260563 6.19894366,9.64612676 6.08802817,9.30105634 L5.75528169,8.33978873 L2.05809859,8.33978873 L1.72535211,9.30105634 C1.61443662,9.64612676 1.2693662,9.89260563 0.887323944,9.89260563 C0.394366197,9.89260563 0,9.49823944 0,9.00528169 C0,8.8943662 0.0246478873,8.7834507 0.0616197183,8.6971831 L2.46478873,2.48591549 C2.68661972,1.90669014 3.24119718,1.5 3.90669014,1.5 C4.55985915,1.5 5.12676056,1.90669014 5.34859155,2.48591549 L7.73943662,8.6971831 Z M2.60035211,6.82394366 L5.21302817,6.82394366 L3.90669014,3.10211268 L2.60035211,6.82394366 Z M11.3996479,3.70598592 C12.7552817,3.70598592 14,4.24823944 14,5.96126761 L14,9.07922535 C14,9.52288732 13.6549296,9.89260563 13.2112676,9.89260563 C12.8169014,9.89260563 12.471831,9.59683099 12.4225352,9.19014085 C12.028169,9.6584507 11.3257042,9.95422535 10.5492958,9.95422535 C9.60035211,9.95422535 8.47887324,9.31338028 8.47887324,7.98239437 C8.47887324,6.58978873 9.60035211,6.08450704 10.5492958,6.08450704 C11.3380282,6.08450704 12.040493,6.33098592 12.4348592,6.81161972 L12.4348592,5.98591549 C12.4348592,5.38204225 11.9172535,4.98767606 11.1285211,4.98767606 C10.6602113,4.98767606 10.2411972,5.11091549 9.80985915,5.38204225 C9.72359155,5.43133803 9.61267606,5.46830986 9.50176056,5.46830986 C9.18133803,5.46830986 8.91021127,5.1971831 8.91021127,4.86443662 C8.91021127,4.64260563 9.0334507,4.44542254 9.19366197,4.34683099 C9.87147887,3.90316901 10.6232394,3.70598592 11.3996479,3.70598592 Z M11.1778169,8.8943662 C11.6830986,8.8943662 12.1760563,8.72183099 12.4348592,8.37676056 L12.4348592,7.63732394 C12.1760563,7.29225352 11.6830986,7.11971831 11.1778169,7.11971831 C10.5616197,7.11971831 10.056338,7.45246479 10.056338,8.0193662 C10.056338,8.57394366 10.5616197,8.8943662 11.1778169,8.8943662 Z M0.65625,11.125 L13.34375,11.125 C13.7061869,11.125 14,11.4188131 14,11.78125 C14,12.1436869 13.7061869,12.4375 13.34375,12.4375 L0.65625,12.4375 C0.293813133,12.4375 4.43857149e-17,12.1436869 0,11.78125 C-4.43857149e-17,11.4188131 0.293813133,11.125 0.65625,11.125 Z"}));case"date":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"}));case"rich_text":return e.createElement("svg",{viewBox:"0 0 16 16",className:r},e.createElement("path",{d:"M1.56738 3.25879H14.4258C14.7676 3.25879 15.0479 2.97852 15.0479 2.63672C15.0479 2.29492 14.7744 2.02148 14.4258 2.02148H1.56738C1.21875 2.02148 0.952148 2.29492 0.952148 2.63672C0.952148 2.97852 1.22559 3.25879 1.56738 3.25879ZM1.56738 6.84082H14.4258C14.7676 6.84082 15.0479 6.56055 15.0479 6.21875C15.0479 5.87695 14.7744 5.60352 14.4258 5.60352H1.56738C1.21875 5.60352 0.952148 5.87695 0.952148 6.21875C0.952148 6.56055 1.22559 6.84082 1.56738 6.84082ZM1.56738 10.4229H14.4258C14.7676 10.4229 15.0479 10.1426 15.0479 9.80078C15.0479 9.45898 14.7744 9.18555 14.4258 9.18555H1.56738C1.21875 9.18555 0.952148 9.45898 0.952148 9.80078C0.952148 10.1426 1.22559 10.4229 1.56738 10.4229ZM1.56738 14.0049H8.75879C9.10059 14.0049 9.38086 13.7246 9.38086 13.3828C9.38086 13.041 9.10742 12.7676 8.75879 12.7676H1.56738C1.21875 12.7676 0.952148 13.041 0.952148 13.3828C0.952148 13.7246 1.22559 14.0049 1.56738 14.0049Z"}));case"multi_select":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M4,3 C4,2.447715 4.447715,2 5,2 L12,2 C12.5523,2 13,2.447716 13,3 C13,3.55228 12.5523,4 12,4 L5,4 C4.447715,4 4,3.55228 4,3 Z M4,7 C4,6.447715 4.447715,6 5,6 L12,6 C12.5523,6 13,6.447716 13,7 C13,7.55228 12.5523,8 12,8 L5,8 C4.447715,8 4,7.55228 4,7 Z M4,11 C4,10.447715 4.447715,10 5,10 L12,10 C12.5523,10 13,10.447716 13,11 C13,11.55228 12.5523,12 12,12 L5,12 C4.447715,12 4,11.55228 4,11 Z M2,4 C1.44771525,4 1,3.55228475 1,3 C1,2.44771525 1.44771525,2 2,2 C2.55228475,2 3,2.44771525 3,3 C3,3.55228475 2.55228475,4 2,4 Z M2,8 C1.44771525,8 1,7.55228475 1,7 C1,6.44771525 1.44771525,6 2,6 C2.55228475,6 3,6.44771525 3,7 C3,7.55228475 2.55228475,8 2,8 Z M2,12 C1.44771525,12 1,11.5522847 1,11 C1,10.4477153 1.44771525,10 2,10 C2.55228475,10 3,10.4477153 3,11 C3,11.5522847 2.55228475,12 2,12 Z"}));case"url":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M3.73333,3.86667 L7.46667,3.86667 C8.49613,3.86667 9.33333,4.70387 9.33333,5.73333 C9.33333,6.7628 8.49613,7.6 7.46667,7.6 L6.53333,7.6 C6.01813,7.6 5.6,8.0186 5.6,8.53333 C5.6,9.04807 6.01813,9.46667 6.53333,9.46667 L7.46667,9.46667 C9.5284,9.46667 11.2,7.79507 11.2,5.73333 C11.2,3.6716 9.5284,2 7.46667,2 L3.73333,2 C1.6716,2 0,3.6716 0,5.73333 C0,7.124 0.762067,8.33453 1.88953,8.97713 C1.87553,8.83107 1.86667,8.6836 1.86667,8.53333 C1.86667,7.92013 1.98753,7.33447 2.2036,6.7978 C1.99267,6.4954 1.86667,6.12953 1.86667,5.73333 C1.86667,4.70387 2.70387,3.86667 3.73333,3.86667 Z M12.1095,5.28907 C12.1231,5.4356 12.1333,5.58307 12.1333,5.73333 C12.1333,6.34607 12.0101,6.9294 11.7931,7.46513 C12.0059,7.768 12.1333,8.13573 12.1333,8.53333 C12.1333,9.5628 11.2961,10.4 10.2667,10.4 L6.53333,10.4 C5.50387,10.4 4.66667,9.5628 4.66667,8.53333 C4.66667,7.50387 5.50387,6.66667 6.53333,6.66667 L7.46667,6.66667 C7.98187,6.66667 8.4,6.24807 8.4,5.73333 C8.4,5.2186 7.98187,4.8 7.46667,4.8 L6.53333,4.8 C4.4716,4.8 2.8,6.4716 2.8,8.53333 C2.8,10.59507 4.4716,12.2667 6.53333,12.2667 L10.2667,12.2667 C12.3284,12.2667 14,10.59507 14,8.53333 C14,7.14267 13.2375,5.93167 12.1095,5.28907 Z"}));case"number":return e.createElement("svg",{viewBox:"0 0 16 16",className:r},e.createElement("path",{d:"M2.4834 10.9902H4.33594L3.75488 13.8887C3.74121 13.9639 3.72754 14.0664 3.72754 14.1416C3.72754 14.5381 3.99414 14.7637 4.39746 14.7637C4.81445 14.7637 5.09473 14.5449 5.18359 14.1143L5.80566 10.9902H8.79297L8.21191 13.8887C8.19824 13.9639 8.18457 14.0664 8.18457 14.1416C8.18457 14.5381 8.45117 14.7637 8.85449 14.7637C9.27148 14.7637 9.55176 14.5449 9.63379 14.1143L10.2627 10.9902H12.4502C12.9287 10.9902 13.2432 10.6758 13.2432 10.2109C13.2432 9.8418 12.9902 9.56836 12.6006 9.56836H10.5498L11.2129 6.28711H13.3662C13.8379 6.28711 14.1523 5.96582 14.1523 5.50098C14.1523 5.13184 13.9062 4.8584 13.5098 4.8584H11.5L12.0195 2.27441C12.0264 2.21973 12.0469 2.11035 12.0469 2.01465C12.0469 1.625 11.7666 1.39258 11.3633 1.39258C10.9053 1.39258 10.6797 1.63867 10.5977 2.05566L10.0303 4.8584H7.04297L7.5625 2.27441C7.57617 2.21973 7.58984 2.11035 7.58984 2.01465C7.58984 1.625 7.30957 1.39258 6.91309 1.39258C6.44824 1.39258 6.21582 1.63867 6.13379 2.05566L5.57324 4.8584H3.54297C3.06445 4.8584 2.75 5.18652 2.75 5.65137C2.75 6.03418 3.00293 6.28711 3.39258 6.28711H5.28613L4.62305 9.56836H2.63379C2.15527 9.56836 1.84082 9.89648 1.84082 10.3613C1.84082 10.7373 2.09375 10.9902 2.4834 10.9902ZM6.09277 9.56836L6.75586 6.28711H9.74316L9.08008 9.56836H6.09277Z"}));case"checkbox":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M0,3 C0,1.34314 1.34326,0 3,0 L11,0 C12.6567,0 14,1.34314 14,3 L14,11 C14,12.6569 12.6567,14 11,14 L3,14 C1.34326,14 0,12.6569 0,11 L0,3 Z M3,1.5 C2.17139,1.5 1.5,2.17157 1.5,3 L1.5,11 C1.5,11.8284 2.17139,12.5 3,12.5 L11,12.5 C11.8286,12.5 12.5,11.8284 12.5,11 L12.5,3 C12.5,2.17157 11.8286,1.5 11,1.5 L3,1.5 Z M2.83252,6.8161 L3.39893,6.27399 L3.57617,6.10425 L3.92334,5.77216 L4.26904,6.10559 L4.44531,6.27582 L5.58398,7.37402 L9.28271,3.81073 L9.45996,3.64008 L9.80664,3.3056 L10.1538,3.63989 L10.3311,3.81067 L10.8936,4.35303 L11.0708,4.52399 L11.4434,4.88379 L11.0708,5.24353 L10.8936,5.41437 L6.1084,10.0291 L5.93115,10.2 L5.58398,10.5344 L5.23682,10.2 L5.05957,10.0292 L2.83057,7.87946 L2.65283,7.70801 L2.27832,7.34674 L2.6543,6.98694 L2.83252,6.8161 Z"}));case"select":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M7,13 C10.31348,13 13,10.31371 13,7 C13,3.68629 10.31348,1 7,1 C3.68652,1 1,3.68629 1,7 C1,10.31371 3.68652,13 7,13 Z M3.75098,5.32278 C3.64893,5.19142 3.74268,5 3.90869,5 L10.09131,5 C10.25732,5 10.35107,5.19142 10.24902,5.32278 L7.15771,9.29703 C7.07764,9.39998 6.92236,9.39998 6.84229,9.29703 L3.75098,5.32278 Z"}));case"status":return e.createElement("svg",{viewBox:"0 0 16 16",className:r},e.createElement("path",{d:"M8.75488 1.02344C8.75488 0.613281 8.41309 0.264648 8.00293 0.264648C7.59277 0.264648 7.25098 0.613281 7.25098 1.02344V3.11523C7.25098 3.51855 7.59277 3.86719 8.00293 3.86719C8.41309 3.86719 8.75488 3.51855 8.75488 3.11523V1.02344ZM3.91504 5.0293C4.20215 5.31641 4.69434 5.32324 4.97461 5.03613C5.26855 4.74902 5.26855 4.25684 4.98145 3.96973L3.53906 2.52051C3.25195 2.2334 2.7666 2.21973 2.47949 2.50684C2.19238 2.79395 2.18555 3.28613 2.47266 3.57324L3.91504 5.0293ZM10.9629 4.01758C10.6826 4.30469 10.6826 4.79688 10.9697 5.08398C11.2568 5.37109 11.749 5.36426 12.0361 5.07715L13.4854 3.62793C13.7725 3.34082 13.7725 2.84863 13.4785 2.55469C13.1982 2.27441 12.7061 2.27441 12.4189 2.56152L10.9629 4.01758ZM15.0234 8.78906C15.4336 8.78906 15.7822 8.44727 15.7822 8.03711C15.7822 7.62695 15.4336 7.28516 15.0234 7.28516H12.9385C12.5283 7.28516 12.1797 7.62695 12.1797 8.03711C12.1797 8.44727 12.5283 8.78906 12.9385 8.78906H15.0234ZM0.975586 7.28516C0.56543 7.28516 0.223633 7.62695 0.223633 8.03711C0.223633 8.44727 0.56543 8.78906 0.975586 8.78906H3.07422C3.48438 8.78906 3.83301 8.44727 3.83301 8.03711C3.83301 7.62695 3.48438 7.28516 3.07422 7.28516H0.975586ZM12.0361 10.9902C11.749 10.71 11.2568 10.71 10.9629 10.9971C10.6826 11.2842 10.6826 11.7764 10.9697 12.0635L12.4258 13.5127C12.7129 13.7998 13.2051 13.793 13.4922 13.5059C13.7793 13.2256 13.7725 12.7266 13.4854 12.4395L12.0361 10.9902ZM2.52051 12.4395C2.22656 12.7266 2.22656 13.2188 2.50684 13.5059C2.79395 13.793 3.28613 13.7998 3.57324 13.5127L5.02246 12.0703C5.31641 11.7832 5.31641 11.291 5.03613 11.0039C4.74902 10.7168 4.25684 10.71 3.96973 10.9971L2.52051 12.4395ZM8.75488 12.9658C8.75488 12.5557 8.41309 12.207 8.00293 12.207C7.59277 12.207 7.25098 12.5557 7.25098 12.9658V15.0576C7.25098 15.4609 7.59277 15.8096 8.00293 15.8096C8.41309 15.8096 8.75488 15.4609 8.75488 15.0576V12.9658Z"}));case"person":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M9.625,10.8465 C8.91187,10.2891 8.12088,9.926 7,9.26013 L7,8.71938 C7.21175,8.47612 7.392,8.176 7.53813,7.83213 C7.94587,7.7315 8.3125,7.33425 8.3125,7 C8.3125,6.51788 8.1095,6.32713 7.8715,6.17137 C7.8715,6.15562 7.875,6.14162 7.875,6.125 C7.875,5.41362 7.4375,3.5 5.25,3.5 C3.0625,3.5 2.625,5.4145 2.625,6.125 C2.625,6.14162 2.6285,6.15562 2.6285,6.17137 C2.3905,6.32713 2.1875,6.51788 2.1875,7 C2.1875,7.33425 2.55413,7.7315 2.96187,7.833 C3.108,8.176 3.28825,8.47612 3.5,8.71938 L3.5,9.26013 C2.37912,9.92513 1.58812,10.2882 0.875,10.8465 C0.041125,11.4984 0,12.4688 0,14 L10.5,14 C10.5,12.4688 10.4589,11.4984 9.625,10.8465 Z M13.125,7.3465 C12.4119,6.78912 11.6209,6.426 10.5,5.76013 L10.5,5.21938 C10.7118,4.97613 10.892,4.676 11.0381,4.33213 C11.4459,4.2315 11.8125,3.83425 11.8125,3.5 C11.8125,3.01787 11.6095,2.82713 11.3715,2.67138 C11.3715,2.65562 11.375,2.64162 11.375,2.625 C11.375,1.91363 10.9375,0 8.75,0 C6.5625,0 6.125,1.9145 6.125,2.625 C6.125,2.64162 6.1285,2.65562 6.1285,2.67138 C6.11188,2.68275 6.09787,2.69588 6.08125,2.70725 C7.83212,3.066 8.59688,4.54825 8.72813,5.74787 C8.97575,6.00863 9.1875,6.39625 9.1875,7 C9.1875,7.60288 8.771,8.20312 8.18388,8.51462 C8.127,8.624 8.06662,8.729 8.00275,8.82962 C8.155,8.91537 8.30025,8.99675 8.44025,9.07463 C9.08075,9.4325 9.63375,9.74137 10.164,10.1561 C10.3022,10.2638 10.4204,10.3801 10.5289,10.4991 L14,10.4991 C14,8.96875 13.9589,7.99837 13.125,7.3465 Z"}));case"email":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M14,6.22508 C14,7.0471 13.8666,7.79918 13.5999,8.48134 C13.3332,9.16351 12.9563,9.69867 12.4692,10.0868 C11.9821,10.475 11.524,10.6862 10.9764,10.6862 C10.5473,10.6862 10.1676,10.5849 9.83705,10.3823 C9.50653,10.1796 9.2688,9.91274 9.12384,9.58165 C8.51065,10.318 7.56114,10.6862 6.5928,10.6862 C5.56647,10.6862 4.75762,10.3823 4.16618,9.77431 C3.57473,9.16636 3.27902,8.33436 3.27902,7.27829 C3.27902,6.0738 3.66752,5.10337 4.44451,4.36697 C5.2215,3.63058 6.2362,3.26239 7.48867,3.26239 C7.98734,3.26239 9.5206,3.47449 9.74131,3.53033 C10.2518,3.65949 10.6003,4.12335 10.5763,4.6417 C10.5697,4.78537 10.5175,5.88115 10.4198,7.92905 C10.4198,8.72253 10.6401,9.11927 11.0808,9.11927 C11.4519,9.11927 11.7476,8.8524 11.968,8.31865 C12.1883,7.78491 12.2985,7.08706 12.2985,6.22508 C12.2985,5.30601 12.1042,4.49399 11.7157,3.78899 C11.3272,3.08399 10.7808,2.54597 10.0762,2.17492 C9.37173,1.80387 8.56719,1.61835 7.66263,1.61835 C6.49134,1.61835 5.47373,1.85525 4.60976,2.32905 C3.74579,2.80286 3.08332,3.48644 2.62234,4.37981 C2.16136,5.27319 1.93089,6.30499 1.93089,7.47523 C1.93089,9.05077 2.35851,10.2595 3.21378,11.1015 C4.06905,11.9435 5.30847,12.3645 6.93203,12.3645 C7.54667,12.3645 8.22216,12.2975 8.95856,12.1633 C9.18419,12.1222 9.47682,12.0555 9.83645,11.9632 C10.2649,11.8532 10.7081,12.0814 10.8607,12.4905 C11.0082,12.8863 10.802,13.3249 10.4001,13.4701 C10.3865,13.475 10.3728,13.4796 10.359,13.4837 C9.30721,13.7996 8.18808,13.9716 7.00161,14 C4.7982,14 3.08041,13.4292 1.84823,12.2875 C0.616061,11.1458 0,9.55883 0,7.52661 C0,6.11661 0.314555,4.8365 0.943688,3.68624 C1.57282,2.53598 2.46867,1.63405 3.63126,0.980429 C4.79385,0.326807 6.13184,0 7.64524,0 C8.9209,0 10.1589,0.290316 11.0634,0.770643 C11.968,1.25097 12.6374,1.99796 13.1824,2.94557 C13.7275,3.89318 14,4.98634 14,6.22508 Z M5.38462,7.23555 C5.38462,8.44263 5.87335,9.04616 6.85083,9.04616 C7.3623,9.04616 7.75159,8.86452 8.01869,8.50126 C8.28579,8.13799 8.44773,7.54734 8.50456,6.72927 L8.61539,4.83286 C8.32555,4.76993 7.9988,4.73846 7.63509,4.73846 C6.92471,4.73846 6.37204,4.96157 5.97707,5.40779 C5.58211,5.854 5.38462,6.46325 5.38462,7.23555 Z"}));case"phone_number":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z"}));case"file":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M5.94578,14 C4.62416,14 3.38248,13.4963 2.44892,12.585 C1.514641,11.6736 1,10.4639 1,9.17405 C1.00086108,7.88562 1.514641,6.67434 2.44892,5.76378 L7.45612,0.985988 C8.80142,-0.327216 11.1777,-0.332396 12.5354,0.992848 C13.9369,2.36163 13.9369,4.58722 12.5354,5.95418 L8.03046,10.2414 C7.16278,11.0877 5.73682,11.0894 4.86024,10.2345 C3.98394,9.37789 3.98394,7.98769 4.86024,7.1327 L6.60422,5.4317 L7.87576,6.67196 L6.13177,8.37297 C6.01668,8.48539 6.00003,8.61545 6.00003,8.68335 C6.00003,8.75083 6.01668,8.88103 6.13177,8.99429 C6.36197,9.21689 6.53749,9.21689 6.76768,8.99429 L11.2707,4.70622 C11.9645,4.03016 11.9645,2.91757 11.2638,2.23311 C10.5843,1.57007 9.40045,1.57007 8.72077,2.23311 L3.71342,7.0109 C3.12602,7.58406 2.79837,8.35435 2.79837,9.17405 C2.79837,9.99459 3.12602,10.7654 3.72045,11.3446 C4.90947,12.5062 6.98195,12.5062 8.17096,11.3446 L10.41911,9.15165 L11.6906,10.3919 L9.4425,12.585 C8.50808,13.4963 7.2664,14 5.94578,14 Z"}));case"formula":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M7.77892,7.06304 L4.62218,11.2875 C4.58556,11.3416 4.55285,11.4392 4.5504,11.5052 C4.5504,11.7022 4.7047,11.8619 4.89562,11.8619 L11.1383,11.8619 C11.6139,11.8619 11.9996,12.2598 11.9996,12.7507 L11.9996,13.1111 C11.9996,13.602 11.6139,14 11.1383,14 L1.861927,14 C1.385853,14 1.00011061,13.602 1.00011061,13.1111 L1.00011061,12.6858 C0.99718092,12.4783 1.0523567,12.3098 1.176868,12.1466 L4.39269,7.79888 C4.74816,7.31841 4.74572,6.65139 4.38683,6.17354 L1.400013,2.19436 C1.27306,2.03028 1.216419,1.85993 1.219349,1.65006 L1.219349,0.888889 C1.219349,0.397968 1.605091,0 2.08117,0 L10.91906,0 C11.3946,0 11.7804,0.397968 11.7804,0.888889 L11.7804,1.24925 C11.7804,1.74017 11.3946,2.13814 10.91906,2.13814 L5.13634,2.13814 C4.94542,2.13814 4.79064,2.29801 4.79064,2.49522 C4.79308,2.56049 4.82482,2.65709 4.86095,2.71087 L7.78038,6.68628 C7.8297,6.74847 7.84435,6.7934 7.84142,6.87363 C7.84435,6.95493 7.82921,7.00048 7.77892,7.06304 Z"}));case"rollup":return e.createElement("svg",{viewBox:"0 0 18 18",className:r},e.createElement("path",{d:"M17,15.6l-5.119-5.119C12.583,9.499,13,8.299,13,7c0-3.314-2.686-6-6-6S1,3.686,1,7s2.686,6,6,6 c1.299,0,2.499-0.417,3.481-1.119L15.6,17L17,15.6z M7,11c-2.209,0-4-1.791-4-4c0-2.209,1.791-4,4-4s4,1.791,4,4 C11,9.209,9.209,11,7,11z"}));case"created_at":case"last_edited_at":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M7.01356 14.0001C8.8042 14.0001 10.5958 13.3107 11.9575 11.9324C14.681 9.21201 14.6808 4.7603 11.9571 2.04013C9.23336 -0.680043 4.77573 -0.680043 2.05199 2.04013C0.727519 3.36277 0 5.13301 0 6.99553C0 8.8764 0.727811 10.6285 2.05199 11.9509C3.43207 13.3106 5.22243 14.0001 7.01356 14.0001ZM3.72947 7.00914V8.461V8.65543H3.92382H5.34563H8.2794H8.4738V8.461V5.52541V3.37947V3.18502H8.2794H6.82747H6.63307V3.37947V6.81467H3.92382H3.72947V7.00914ZM1.83985 6.99553C1.83985 5.61698 2.38099 4.32597 3.36061 3.3477C5.36746 1.34337 8.64803 1.34062 10.6585 3.33944C10.6613 3.34219 10.6639 3.34494 10.6668 3.3477C12.676 5.3546 12.6763 8.63642 10.6668 10.6434C8.65705 12.6504 5.37031 12.6504 3.36061 10.6434C2.38099 9.66506 1.83985 8.37408 1.83985 6.99553Z"}));case"created_by":case"last_edited_by":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M13.125,10.0354 C12.5536,9.48588 10.801,8.53125 9.625,7.875 L9.625,7.04112 C9.849,6.71912 10.045,6.37 10.1911,5.98588 C10.5849,5.7435 10.9375,5.28412 10.9375,4.8125 C10.9375,4.35488 10.9323,3.94275 10.4668,3.605 C10.3049,1.5575 9.436,0 7,0 C4.564,0 3.69513,1.5575 3.53325,3.605 C3.06775,3.94275 3.0625,4.35488 3.0625,4.8125 C3.0625,5.28412 3.41513,5.7435 3.80888,5.98588 C3.955,6.37 4.151,6.71912 4.375,7.04112 L4.375,7.875 C3.199,8.53125 1.44638,9.48588 0.875,10.0354 C0.1645,10.7188 0,11.8125 0,14 L14,14 C14,11.8125 13.8364,10.7188 13.125,10.0354 Z"}));default:return e.createElement("span",null,"❓")}},Xn=function(t){var i=t.options,r=t.children,s=i||{},n=s.pathname,a=s.link,o=s.query;if(n&&a){var l=a;return e.createElement(l,{className:"rotion-table-title-wrapper rotion-table-title-link",href:o?{pathname:n,query:o}:n},r)}return n?e.createElement("a",{className:"rotion-table-title-wrapper rotion-table-title-link",href:n},r):e.createElement("span",{className:"rotion-table-title-wrapper"},r)},Yn=function(t){var i=t.textObjects,r=t.options;return e.createElement("div",{className:"rotion-table-title"},e.createElement(Xn,{options:r},i.map((function(t,i){return e.createElement(cn,{key:"richtext-".concat(i),textObject:t})}))))},Kn=function(t){var i=t.date;if(null===i)return e.createElement(e.Fragment,null);var r=i.start,s=i.end,n=e.useState(""),a=n[0],o=n[1],l=e.useState(""),h=l[0],c=l[1];return e.useEffect((function(){var e,t=d(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),i=t.dateF,n=t.timeF;o(ee(r).format(r.length>10?"".concat(i," ").concat(n):i)),s&&c(ee(s).format(s.length>10?"".concat(i," ").concat(n):i))}),[a,h]),e.createElement("div",{className:"rotion-table-date"},a,s&&" → ".concat(h))},Zn=function(t){var i=t.textObjects;return i?e.createElement("div",{className:"rotion-table-richtext"},i.map((function(t,i){return e.createElement(cn,{key:"richtext-".concat(i),textObject:t})}))):e.createElement(e.Fragment,null)},Jn=function(t){var i=t.color,r=t.pathname,s=t.link,n=t.query,a=t.children,o=n?{pathname:r,query:n}:r,l=function(e){return"rotion-table-multiselect-link rotion-table-multiselect-".concat(e)};if(""===o)return e.createElement("span",{className:l(i)},a);if(s){var h=s;return e.createElement(h,{className:l(i),href:o},a)}return e.createElement("a",{className:l(i),href:r},a)},Qn=function(t){var i=t.multiSelect,r=t.options||{},s=r.pathname,n=r.link,a=r.query;return e.createElement("ul",{className:"rotion-table-multiselect-ul"},i.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-table-multiselect-li"},e.createElement(Jn,{pathname:s?"".concat(s,"/").concat(encodeURIComponent(t.name)):"",color:t.color,link:n,query:a},t.name))})))},ea=function(t){var i=t.pathname,r=t.color,s=t.link,n=t.query,a=t.children,o=n?{pathname:i,query:n}:i,l=function(e){return"rotion-table-select-link rotion-table-select-".concat(e)};if(""===o)return e.createElement("span",{className:l(r)},a);if(s){var h=s;return e.createElement(h,{className:l(r),href:o},a)}return e.createElement("a",{className:l(r),href:i},a)},ta=function(t){var i=t.select,r=t.options;if(!i)return e.createElement(e.Fragment,null);var s=r||{},n=s.pathname,a=s.link,o=s.query;return e.createElement("div",{className:"rotion-table-select"},e.createElement(ea,{pathname:n?"".concat(n,"/").concat(encodeURIComponent(i.name)):"",color:i.color,link:a,query:o},i.name))},ia=function(t){var i=t.url;if(!i)return e.createElement(e.Fragment,null);var r=u(i),s=r.domain,n=r.omittedPath;return e.createElement("div",{className:"rotion-table-url"},e.createElement("a",{className:"rotion-table-url-link",href:i,rel:"noreferrer",target:"_blank"},e.createElement("span",{className:"rotion-table-url-domain"},s),e.createElement("span",{className:"rotion-table-url-path"},n)))},ra=function(t){var i=t.checked,r=t.options;return e.createElement("div",{className:"rotion-table-checkbox"},e.createElement(wn,{prefix:null==r?void 0:r.prefix,suffix:null==r?void 0:r.suffix},e.createElement(yn,{bool:i})))},sa=function(t){var i=t.number,r=t.options||{},s=r.prefix,n=r.suffix;return e.createElement("div",{className:"rotion-table-number"},e.createElement(wn,{prefix:s,suffix:n},i))},na=function(t){var i=t.number,r=t.options;return e.createElement("div",{className:"rotion-table-formula"},e.createElement(wn,{prefix:null==r?void 0:r.prefix,suffix:null==r?void 0:r.suffix},i))},aa=function(t){var i=t.property,r=t.options;if(!i||!i.type)return console.log("property empty in table handler: ",i),e.createElement(e.Fragment,null);switch(i.type){case"title":return e.createElement(Yn,{textObjects:i.title,options:r});case"rich_text":return e.createElement(Zn,{textObjects:i.rich_text});case"url":return e.createElement(ia,{url:i.url});case"date":return e.createElement(Kn,{date:i.date});case"multi_select":return e.createElement(Qn,{multiSelect:i.multi_select,options:r});case"checkbox":return e.createElement(ra,{checked:i.checkbox,options:r});case"number":return e.createElement(sa,{number:i.number,options:r});case"select":return e.createElement(ta,{select:i.select,options:r});case"formula":return e.createElement(na,{number:i.formula.number,options:r});default:return console.log("unsupport database property:",i),e.createElement(e.Fragment,null)}},oa=function(t){var i=t.name,r=t.page,s=t.options;if(!("properties"in r))return e.createElement(e.Fragment,null);var n=r.properties[i];if(!n)return e.createElement(e.Fragment,null);var a=s||{},o=a.href,c=a.link,d=a.query,u=a.prefix,p=a.suffix,m={};if(o&&o[i]){var g=l(o[i]),f=g[0],b=g[1];m.pathname=""===b?f:"".concat(f).concat(h(b,r)),c&&(m.link=c),d&&(m.query=d)}return u&&u[i]&&(m.prefix=u[i]),p&&p[i]&&(m.suffix=p[i]),e.createElement(aa,{property:n,options:m})},la=function(t){var i=t.block;if(!i.bookmark)return e.createElement(e.Fragment,null);var r=i.bookmark.site,s=r.title,n=r.desc,a=r.icon,o=r.image,l=function(){var e;return window.open(null===(e=i.bookmark)||void 0===e?void 0:e.url,"_blank","noreferrer")},h=i.bookmark.url;return""===s&&""===n&&""===o?e.createElement("div",{className:"rotion-bookmark"},e.createElement("div",{className:"rotion-bookmark-area",onClick:l},e.createElement("div",{className:"rotion-bookmark-text"},e.createElement("div",{className:"rotion-bookmark-title"},h.substring(h.lastIndexOf("/")+1)),e.createElement("div",{className:"rotion-bookmark-desc"},h)))):e.createElement("div",{className:"rotion-bookmark"},e.createElement("div",{className:"rotion-bookmark-area",onClick:l},e.createElement("div",{className:"rotion-bookmark-text"},e.createElement("div",{className:"rotion-bookmark-title"},s),e.createElement("div",{className:"rotion-bookmark-desc"},n),e.createElement("div",{className:"rotion-bookmark-url"},""!==a&&e.createElement("img",{className:"rotion-bookmark-favicon",src:a,width:"16px",alt:"icon"}),h)),e.createElement("div",{className:"rotion-bookmark-image"},""!==o&&e.createElement("img",{className:"rotion-bookmark-img",src:o,width:"200px",height:"auto",alt:"image"}))),e.createElement("div",{className:"rotion-bookmark-caption"},i.bookmark.caption.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})}))))};var ha=function(t){var i=t.breadcrumb,r=t.link,s=t.href,n=t.query,a=t.children,h=function(e,t,i){if("/"===i)return i;var r=l(i||""),s=r[0],n="";return n="id"===r[1]?e:encodeURIComponent(t.toLowerCase()).replace(/%20/g,"-"),"".concat(s).concat(n)}(i.id,i.name,s);if(r&&s){var c=r;return e.createElement(c,{className:"rotion-breadcrumb-link",href:{pathname:h,query:n}},a)}return s?e.createElement("a",{className:"rotion-breadcrumb-link",href:"".concat(h).concat(o(n))},a):e.createElement("span",{className:"rotion-breadcrumb-link"},a)},ca=function(t){var i=t.list,r=t.link,s=t.hrefs,n=t.query,a=i.length;return e.createElement("div",{className:"rotion-breadcrumb"},i.map((function(t,i){return e.createElement("span",{key:"crumb-".concat(i)},e.createElement(ha,{breadcrumb:t,href:void 0===s?void 0:s[i],link:r,query:n},"emoji"===t.icon.type&&e.createElement("span",{className:"rotion-breadcrumb-emoji"},t.icon.emoji),"emoji"!==t.icon.type&&e.createElement("img",{className:"rotion-breadcrumb-icon",src:t.icon.src,width:20,height:20,alt:t.name}),e.createElement("span",{className:"rotion-breadcrumb-title"},t.name)),i+1<a&&e.createElement("span",{className:"rotion-breadcrumb-slash"},"/"))})))},da=function(t){var i=t.block,r=t.link,s=t.hrefs,n=t.query;return e.createElement(ca,{list:i.list,link:r,hrefs:s,query:n})},ua=function(t){var i,r=t.block,s=t.href,n=t.link,a=t.query,o=lu[r.type],l=null===(i=r[r.type])||void 0===i?void 0:i.rich_text;return r.has_children&&void 0!==r.children?e.createElement(o,{key:r.id,className:"rotion-bulleted-list"},l.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})})),e.createElement(cu,{blocks:r.children,href:s,link:n,query:a})):e.createElement(o,{className:"rotion-bulleted-list"},l.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})})))},pa=function(t){var i=t.block;if(!i.callout.icon)return e.createElement(e.Fragment,null);switch(i.callout.icon.type){case"emoji":return e.createElement("span",{className:"rotion-callout-emoji"},i.callout.icon.emoji);case"external":case"file":return e.createElement("img",{className:"rotion-callout-img",src:i.callout.icon.src,alt:"Icon"});default:return e.createElement(e.Fragment,null)}},ma=function(t){var i=t.block,r=t.href,s=t.link,n=t.query,a=i.callout,o=a.color,l=a.rich_text;return e.createElement("div",{className:"rotion-callout rotion-callout-".concat(o.replace("_background","-bg"))},e.createElement("div",{className:"rotion-callout-icon"},e.createElement(pa,{block:i})),e.createElement("div",{className:"rotion-callout-text"},l.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})})),i.has_children&&void 0!==i.children&&e.createElement(cu,{blocks:i.children,href:r,link:s,query:n})))},ga=function(t){var i=t.block,r=t.href,s=t.link,n=t.query,a=t.children,h=i.child_database.title,c=l(r||""),d=c[0],u="id"===c[1]?i.database.id:encodeURIComponent(h.toLowerCase()).replace(/%20/g,"-");if(!r)return e.createElement("div",{className:"rotion-childdb-link"},a);if(s){var p=s;return void 0===n&&(n={}),e.createElement(p,{className:"rotion-childdb-link",href:{pathname:"".concat(d).concat(u),query:n}},a)}return e.createElement("a",{className:"rotion-childdb-link",href:"".concat(d).concat(u).concat(o(n))},a)},fa=function(t){var i=t.block,r=t.href,s=t.link,n=t.query;if(void 0===i.database)return e.createElement(e.Fragment,null);var a=i.child_database.title;return null===i.database||void 0===i.database.icon||null===i.database.icon?e.createElement("div",{className:"rotion-childdb"},e.createElement(ga,{block:i,href:r,link:s,query:n},e.createElement("span",{className:"rotion-childdb-icon"},"️-"),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},a)))):"emoji"===i.database.icon.type?e.createElement("div",{className:"rotion-childdb"},e.createElement(ga,{block:i,href:r,link:s,query:n},e.createElement("span",{className:"rotion-childdb-emoji"},i.database.icon.emoji),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},a)))):e.createElement("div",{className:"rotion-childdb"},e.createElement(ga,{block:i,href:r,link:s,query:n},e.createElement("span",{className:"rotion-childdb-icon"},e.createElement("img",{className:"rotion-childdb-icon-img",src:i.database.icon.src,alt:"Icon"})),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},a))))},ba=function(t){var i=t.block,r=t.href,s=t.link,n=t.query,a=t.children,h=i.child_page.title,c=l(r||""),d=c[0],u="id"===c[1]?i.page.id:encodeURIComponent(h.toLowerCase()).replace(/%20/g,"-");if(!r)return e.createElement("div",{className:"rotion-childpage-link"},a);if(s){var p=s;return void 0===n&&(n={}),e.createElement(p,{className:"rotion-childpage-link",href:{pathname:"".concat(d).concat(u),query:n}},a)}return e.createElement("a",{className:"rotion-childpage-link",href:"".concat(d).concat(u).concat(o(n))},a)},va=function(t){var i=t.block,r=t.href,s=t.link,n=t.query;if(void 0===i.page)return e.createElement(e.Fragment,null);var a=i.child_page.title;return null===i.page||void 0===i.page.icon||null===i.page.icon?e.createElement("div",{className:"rotion-childpage"},e.createElement(ba,{block:i,href:r,link:s,query:n},e.createElement("span",{className:"rotion-childpage-icon"},"️-"),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},a)))):"emoji"===i.page.icon.type?e.createElement("div",{className:"rotion-childpage"},e.createElement(ba,{block:i,href:r,link:s,query:n},e.createElement("span",{className:"rotion-childpage-emoji"},i.page.icon.emoji),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},a)))):e.createElement("div",{className:"rotion-childpage"},e.createElement(ba,{block:i,href:r,link:s,query:n},e.createElement("span",{className:"rotion-childpage-icon"},e.createElement("img",{className:"rotion-childpage-icon-img",src:i.page.icon.src,alt:"Icon"})),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},a))))};function ya(e,t,i,r){return new(i||(i=Promise))((function(s,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function o(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((r=r.apply(e,t||[])).next())}))}function wa(e,t){var i,r,s,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(l){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(n=0)),n;)try{if(i=1,r&&(s=2&o[0]?r.return:o[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;switch(r=0,s&&(o=[2&o[0],s.value]),o[0]){case 0:case 1:s=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,r=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(!(s=n.trys,(s=s.length>0&&s[s.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(6===o[0]&&n.label<s[1]){n.label=s[1],s=o;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(o);break}s[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],r=0}finally{i=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}"function"==typeof SuppressedError&&SuppressedError;var xa;xa||(xa=1,function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],cilkc:"c",cilkcpp:"cpp",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",gradle:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",cshtml:["markup","csharp"],jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",stata:["mata","java","python"],"t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup-templating",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},t={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",ino:"arduino","arm-asm":"armasm",art:"arturo",adoc:"asciidoc",avs:"avisynth",avdl:"avro-idl",gawk:"awk",sh:"bash",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript","cilk-c":"cilkc","cilk-cpp":"cilkcpp",cilk:"cilkcpp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",po:"gettext",gni:"gn",ld:"linker-script","go-mod":"go-module",hbs:"handlebars",mustache:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",plantuml:"plant-uml",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",razor:"cshtml",rpy:"renpy",res:"rescript",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",sclang:"supercollider",t4:"t4-cs",trickle:"tremor",troy:"tremor",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",webidl:"web-idl",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},i={},r="components/",s=Prism.util.currentScript();if(s){var n=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,a=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,o=s.getAttribute("data-autoloader-path");if(null!=o)r=o.trim().replace(/\/?$/,"/");else{var l=s.src;n.test(l)?r=l.replace(n,"components/"):a.test(l)&&(r=l.replace(a,"$1components/"))}}var h=Prism.plugins.autoloader={languages_path:r,use_minified:!0,loadLanguages:d};Prism.hooks.add("complete",(function(e){var t=e.element,i=e.language;if(t&&i&&"none"!==i){var r=function(e){var t=(e.getAttribute("data-dependencies")||"").trim();if(!t){var i=e.parentElement;i&&"pre"===i.tagName.toLowerCase()&&(t=(i.getAttribute("data-dependencies")||"").trim())}return t?t.split(/\s*,\s*/g):[]}(t);/^diff-./i.test(i)?(r.push("diff"),r.push(i.substr(5))):r.push(i),r.every(c)||d(r,(function(){Prism.highlightElement(t)}))}}))}function c(e){if(e.indexOf("!")>=0)return!1;if((e=t[e]||e)in Prism.languages)return!0;var r=i[e];return r&&!r.error&&!1===r.loading}function d(r,s,n){"string"==typeof r&&(r=[r]);var a=r.length,o=0,l=!1;function p(){l||++o===a&&s&&s(r)}0!==a?r.forEach((function(r){!function(r,s,n){var a=r.indexOf("!")>=0;function o(){var e=i[r];e||(e=i[r]={callbacks:[]}),e.callbacks.push({success:s,error:n}),!a&&c(r)?u(r,"success"):!a&&e.error?u(r,"error"):!a&&e.loading||(e.loading=!0,e.error=!1,function(e,t,i){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),t&&t()},r.onerror=function(){document.body.removeChild(r),i&&i()},document.body.appendChild(r)}(function(e){return h.languages_path+"prism-"+e+(h.use_minified?".min":"")+".js"}(r),(function(){e.loading=!1,u(r,"success")}),(function(){e.loading=!1,e.error=!0,u(r,"error")})))}r=r.replace("!","");var l=e[r=t[r]||r];l&&l.length?d(l,o,n):o()}(r,p,(function(){l||(l=!0,n&&n(r))}))})):s&&setTimeout(s,0)}function u(e,t){if(i[e]){for(var r=i[e].callbacks,s=0,n=r.length;s<n;s++){var a=r[s][t];a&&setTimeout(a,0)}r.length=0}}}()),i.plugins.autoloader&&(i.plugins.autoloader.languages_path="https://unpkg.com/prismjs@1.29.0/components/");var Aa=function(r){var s=r.children,n=r.language,a=void 0===n?"text":n,o=function(){return window.matchMedia("(prefers-color-scheme: dark)").matches},l=e.createRef(),h=function(e){return ya(void 0,void 0,void 0,(function(){return wa(this,(function(r){return l.current&&("mermaid"===e?(t.initialize({theme:o()?"dark":"neutral"}),t.init(void 0,l.current)):(!function(){var e="prism-theme",t=window.document.getElementById(e);if(t&&"href"in t)t.href="https://unpkg.com/prismjs@1.29.0/themes/".concat(o()?"prism-tomorrow.min.css":"prism.min.css");else{var i=window.document.createElement("link");i.rel="stylesheet",i.id=e,i.href="https://unpkg.com/prismjs@1.29.0/themes/".concat(o()?"prism-tomorrow.min.css":"prism.min.css"),window.document.head.appendChild(i)}}(),i.highlightElement(l.current))),[2]}))}))},c="mermaid"===a?"mermaid":"language-".concat(a.toLowerCase()),d=e.useState(!1),u=d[0],p=d[1];return e.useEffect((function(){h(a)}),[a,""]),e.createElement("div",{className:"rotion-code-area",onMouseOver:function(){return p(!0)},onMouseOut:function(){return p(!1)}},u&&e.createElement("div",{className:"rotion-code-lang"},a),e.createElement("pre",{className:c},e.createElement("code",{ref:l},s)))},ka=function(t){var i,r,s=t.block,n=null===(i=s.code)||void 0===i?void 0:i.rich_text.map((function(t,i){var r,n=t;return e.createElement(Aa,{language:(null===(r=s.code)||void 0===r?void 0:r.language)||"",key:"".concat(i)},n.text.content)})),a=null===(r=s.code)||void 0===r?void 0:r.caption.map((function(t,i){return e.createElement(cn,{textObject:t,key:"".concat(i)})}));return e.createElement("div",{className:"rotion-code"},n,e.createElement("div",{className:"rotion-code-caption"},a))},Ea=function(t){var i=t.block,r=t.href,s=t.link,n=t.query,a=i.columns.map((function(t,i){return e.createElement("div",{key:i,className:"rotion-columnlist-column"},e.createElement(cu,{blocks:t,href:r,link:s,query:n}))})),o=a.length,l={gridTemplate:"repeat(1, 1fr) / repeat(".concat(o,", 1fr)")};return e.createElement("div",{className:"rotion-columnlist",style:l},a)},Sa=function(t){var i=t.type,r=t.caption;return e.createElement("div",{className:"rotion-".concat(i,"-caption")},r.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})})))},Ca=function(t){var i=t.html,r=t.caption,s=i.replace(/<script>.*/,""),n="rotion-embed-html";return e.useEffect((function(){var e=document.createElement("script");e.src="https://www.instagram.com/embed.js",document.getElementsByClassName(n)[0].appendChild(e),window.instgrm&&window.instgrm.Embeds.process()}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-instagram"},e.createElement("div",{className:n,dangerouslySetInnerHTML:{__html:s}}),e.createElement(Sa,{type:"embed",caption:r})))},Ma=function(t){var i=t.html,r=t.caption,s=i.replace(/<script>.*/,""),n="rotion-embed-html";return e.useEffect((function(){var e=document.createElement("script");e.src="https://platform.twitter.com/widgets.js",document.getElementsByClassName(n)[0].appendChild(e)}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-twitter"},e.createElement("div",{className:n,dangerouslySetInnerHTML:{__html:s}}),e.createElement(Sa,{type:"embed",caption:r})))},_a=function(t){var i=t.html,r=t.caption,s=i.replace(/<script>.*/,""),n="rotion-embed-html";return e.useEffect((function(){var e=document.createElement("script");e.src="https://www.tiktok.com/embed.js",document.getElementsByClassName(n)[0].appendChild(e)}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-tiktok"},e.createElement("div",{className:n,dangerouslySetInnerHTML:{__html:s}}),e.createElement(Sa,{type:"embed",caption:r})))},Ta=function(t){var i=t.type,r=t.html,s=t.caption;return e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-".concat(i)},e.createElement("div",{className:"rotion-embed-html",dangerouslySetInnerHTML:{__html:r}}),e.createElement(Sa,{type:"embed",caption:s})))},Na=function(t){var i=t.block,r=i.embed,s=r.html,n=r.caption;return void 0===s||""===s?(console.log("The html property for this embed block was undefined:",i),e.createElement(e.Fragment,null)):s.includes("instagram")?e.createElement(Ca,{html:s,caption:n}):s.includes("twitter")?e.createElement(Ma,{html:s,caption:n}):s.includes("tiktok")?e.createElement(_a,{html:s,caption:n}):s.includes("speakerdeck")?e.createElement(Ta,{type:"speakerdeck",html:s,caption:n}):s.includes("slideshare")?e.createElement(Ta,{type:"slideshare",html:s,caption:n}):s.includes("music.apple.com")?e.createElement(Ta,{type:"applemusic",html:s,caption:n}):s.includes("google")?e.createElement(Ta,{type:"googlemap",html:s,caption:n}):e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-html",dangerouslySetInnerHTML:{__html:s}}),e.createElement(Sa,{type:"embed",caption:n}))},Ia=function(t){var i=t.block.equation.expression,r=e.useMemo((function(){return ln(i,{throwOnError:!1,output:"mathml"})}),[i]);return e.createElement("div",{className:"rotion-equation"},e.createElement("div",{className:"rotion-equation-html",dangerouslySetInnerHTML:{__html:r}}))},La=function(t){var i=t.block.file,r=i.size>9999?"".concat((Math.ceil(i.size/1024/1e3*10)/10).toFixed(1),"MB"):"".concat((Math.ceil(i.size/1024*10)/10).toFixed(1),"KB");return e.createElement("div",{className:"rotion-file"},e.createElement("a",{href:i.src,target:"_blank",className:"rotion-file-link",rel:"noreferrer"},e.createElement(n,{name:"file"}),e.createElement("span",null,i.name,e.createElement("span",{className:"rotion-file-size"},r))),i.caption.length>0&&e.createElement("div",{className:"rotion-file-caption"},i.caption.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})}))))},Pa=function(t){var i=t.tag,r=t.block;if("divider"===r.type)return e.createElement("div",{className:"rotion-text-hr"});var s={hr:"hr",heading_1:"h1",heading_2:"h2",heading_3:"h3",paragraph:"p",quote:"quote"},n=i,a=["rotion-text"];r.type in s&&a.push("rotion-text-".concat(s[r.type]));var o=r[r.type].rich_text;return e.createElement(n,{className:a.join(" ")},o.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})})))},Ra=function(t){var i,r=t.block,s="rotion-image-ratio-unknown";if(r.image&&r.image.width&&r.image.height){var n=r.image;s=n.width>n.height?"rotion-image-ratio-landscape":"rotion-image-ratio-portrait"}return e.createElement("div",{className:"rotion-image"},e.createElement("div",{className:"rotion-image-area"},e.createElement("img",{className:"rotion-image-img ".concat(s),src:null===(i=r.image)||void 0===i?void 0:i.src,alt:"Image"})),e.createElement("div",{className:"rotion-image-caption"},r.image.caption.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})}))))},Da=function(t){var i=t.url,r=t.github;if(void 0===r){var s=i.match(/github\.com\/(\w+)\/(\w+)/),a=s?s[1]:"",o=s?s[2]:"";return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(n,{name:"github",width:"32px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},a,"/",o),e.createElement("span",{className:"rotion-linkpreview-desc"},"Repository in Github")))}var l=ee().handler(ie).cdateFn();if("issue"===r.type){var h=r.issue,c=h.title,d=h.login,u=h.number,p=h.created_at,m=h.closed_at,g=h.merged_at,f=h.state,b=h.avatar_src,v=g||m||p,y="merged"===f?"codemerge":"closed"===f?"circlecheck":"circledot",w="rotion-linkpreview-github-state-icon rotion-linkpreview-issue-".concat(f);return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-githubicon"},e.createElement("img",{className:"rotion-linkpreview-githubicon-user",src:b,width:"32px",height:"32px"}),e.createElement(n,{className:"rotion-linkpreview-githubicon-octocat",name:"github",width:"15px",height:"15px"})),e.createElement("div",null,e.createElement("div",{className:"rotion-linkpreview-title"},e.createElement("span",{className:"rotion-linkpreview-github-title"},c),e.createElement("span",{className:"rotion-linkpreview-github-state"},e.createElement(n,{className:w,name:y,width:"14px",height:"14px"}),e.createElement("span",{className:"rotion-linkpreview-state"},f))),e.createElement("div",{className:"rotion-linkpreview-desc"},e.createElement(n,{className:w,name:y,width:"12px",height:"12px"})," #",u,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),d,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),e.createElement("span",{className:"rotion-linkpreview-state"},f)," ",e.createElement("span",{title:v},l(v).format("F")))))}if("repo"===r.type){var x=r.repo,A=(b=x.avatar_src,x.name),k=(d=x.login,x.updated_at);return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-githubicon"},e.createElement("img",{className:"rotion-linkpreview-githubicon-user",src:b,width:"32px",height:"32px"}),e.createElement(n,{className:"rotion-linkpreview-githubicon-octocat",name:"github",width:"15px",height:"15px"})),e.createElement("div",null,e.createElement("div",{className:"rotion-linkpreview-title"},e.createElement("span",{className:"rotion-linkpreview-github-title"},A)),e.createElement("div",{className:"rotion-linkpreview-desc"},d,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),e.createElement("span",{title:k},"Updated ",l(k).format("F")))))}},Fa=function(t){var i=t.url.replace("https://","").split("/")[0];return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-slack"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(n,{name:"slack",width:"32px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},"Message in Slack"),e.createElement("span",{className:"rotion-linkpreview-desc"},i)))},za=function(t){var i=t.url.split("/"),r=i[i.length-1].split("?")[0].replace("-"," ");return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-figma"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(n,{name:"figma",width:"21px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},r),e.createElement("span",{className:"rotion-linkpreview-desc"},"Assets in Figma")))},Oa=function(t){var i,r=t.block;if(!r.link_preview)return e.createElement(e.Fragment,null);var s=r.link_preview,n=s.url;return n.includes("figma.com")&&s.figma?e.createElement("div",{className:"rotion-linkpreview-figma",dangerouslySetInnerHTML:{__html:null===(i=s.figma)||void 0===i?void 0:i.html}}):e.createElement("div",{className:"rotion-linkpreview"},e.createElement("a",{className:"rotion-linkpreview-link",href:n,rel:"noreferrer",target:"_blank"},n.includes("github.com")&&e.createElement(Da,{url:n,github:s.github}),n.includes("slack.com")&&e.createElement(Fa,{url:n}),n.includes("figma.com")&&e.createElement(za,{url:n}),!n.includes("github.com")&&!n.includes("slack.com")&&!n.includes("figma.com")&&"".concat(n)))},Ba=function(t){var i,r=t.block,s=t.href,n=t.link,a=t.query,o=lu[r.type],l=null===(i=r[r.type])||void 0===i?void 0:i.rich_text;return r.has_children&&void 0!==r.children?e.createElement(o,{key:r.id,className:"rotion-numbered-list"},l.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})})),e.createElement(cu,{blocks:r.children,href:s,link:n,query:a})):e.createElement(o,{className:"rotion-numbered-list"},l.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})})))},Ha={d:(e,t)=>{for(var i in t)Ha.o(t,i)&&!Ha.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},qa=globalThis.pdfjsLib={};Ha.d(qa,{AbortException:()=>el,AnnotationEditorLayer:()=>Ud,AnnotationEditorParamsType:()=>io,AnnotationEditorType:()=>to,AnnotationEditorUIManager:()=>Bl,AnnotationLayer:()=>Sd,AnnotationMode:()=>eo,ColorPicker:()=>Dd,DOMSVGFactory:()=>Wc,DrawLayer:()=>Gd,FeatureTest:()=>sl,GlobalWorkerOptions:()=>Wh,ImageKind:()=>co,InvalidPDFException:()=>Ko,MissingPDFException:()=>Zo,OPS:()=>Fo,OutputScale:()=>Nl,PDFDataRangeTransport:()=>Ic,PDFDateString:()=>El,PDFWorker:()=>Dc,PasswordResponses:()=>zo,PermissionFlag:()=>ro,PixelsPerInch:()=>ul,RenderingCancelledException:()=>gl,TextLayer:()=>xc,TouchManager:()=>ql,UnexpectedResponseException:()=>Jo,Util:()=>al,VerbosityLevel:()=>Do,XfaLayer:()=>Xc,build:()=>jc,createValidAbsoluteUrl:()=>Go,fetchData:()=>pl,getDocument:()=>_c,getFilenameFromUrl:()=>vl,getPdfFilenameFromUrl:()=>yl,getXfaPageViewport:()=>Sl,isDataScheme:()=>fl,isPdfFile:()=>bl,noContextMenu:()=>Al,normalizeUnicode:()=>hl,setLayerDimensions:()=>Tl,shadow:()=>$o,stopEvent:()=>kl,version:()=>qc});const ja=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),Va=[1,0,0,1,0,0],Ua=[.001,0,0,.001,0,0],Ga=1.35,$a=1,Wa=2,Xa=4,Ya=16,Ka=32,Za=64,Ja=128,Qa=256,eo={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},to={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},io={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35,DRAW_STEP:41},ro={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},so=0,no=1,ao=2,oo=3,lo=3,ho=4,co={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},uo=1,po=2,mo=3,go=4,fo=5,bo=6,vo=7,yo=8,wo=9,xo=10,Ao=11,ko=12,Eo=13,So=14,Co=15,Mo=16,_o=17,To=20,No=1,Io=2,Lo=3,Po=4,Ro=5,Do={ERRORS:0,WARNINGS:1,INFOS:5},Fo={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},zo={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let Oo=Do.WARNINGS;function Bo(e){Number.isInteger(e)&&(Oo=e)}function Ho(){return Oo}function qo(e){Oo>=Do.INFOS&&console.log(`Info: ${e}`)}function jo(e){Oo>=Do.WARNINGS&&console.log(`Warning: ${e}`)}function Vo(e){throw new Error(e)}function Uo(e,t){e||Vo(t)}function Go(e,t=null,i=null){if(!e)return null;try{if(i&&"string"==typeof e){if(i.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t?.length>=2&&(e=`http://${e}`)}if(i.tryConvertEncoding)try{e=decodeURIComponent(escape(e))}catch{}}const r=t?new URL(e,t):new URL(e);if(function(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch{}return null}function $o(e,t,i,r=!1){return Object.defineProperty(e,t,{value:i,enumerable:!r,configurable:!0,writable:!1}),i}const Wo=function(){function e(e,t){this.message=e,this.name=t}return e.prototype=new Error,e.constructor=e,e}();class Xo extends Wo{constructor(e,t){super(e,"PasswordException"),this.code=t}}class Yo extends Wo{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}}class Ko extends Wo{constructor(e){super(e,"InvalidPDFException")}}class Zo extends Wo{constructor(e){super(e,"MissingPDFException")}}class Jo extends Wo{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}}class Qo extends Wo{constructor(e){super(e,"FormatError")}}class el extends Wo{constructor(e){super(e,"AbortException")}}function tl(e){"object"==typeof e&&void 0!==e?.length||Vo("Invalid argument for bytesToString");const t=e.length,i=8192;if(t<i)return String.fromCharCode.apply(null,e);const r=[];for(let s=0;s<t;s+=i){const n=Math.min(s+i,t),a=e.subarray(s,n);r.push(String.fromCharCode.apply(null,a))}return r.join("")}function il(e){"string"!=typeof e&&Vo("Invalid argument for stringToBytes");const t=e.length,i=new Uint8Array(t);for(let r=0;r<t;++r)i[r]=255&e.charCodeAt(r);return i}function rl(e){const t=Object.create(null);for(const[i,r]of e)t[i]=r;return t}class sl{static get isLittleEndian(){return $o(this,"isLittleEndian",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return $o(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return $o(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get isImageDecoderSupported(){return $o(this,"isImageDecoderSupported","undefined"!=typeof ImageDecoder)}static get platform(){return"undefined"!=typeof navigator&&"string"==typeof navigator?.platform?$o(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:"string"==typeof navigator?.userAgent&&navigator.userAgent.includes("Firefox")}):$o(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){return $o(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const nl=Array.from(Array(256).keys(),(e=>e.toString(16).padStart(2,"0")));class al{static makeHexColor(e,t,i){return`#${nl[e]}${nl[t]}${nl[i]}`}static scaleMinMax(e,t){let i;e[0]?(e[0]<0&&(i=t[0],t[0]=t[2],t[2]=i),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(i=t[1],t[1]=t[3],t[3]=i),t[1]*=e[3],t[3]*=e[3]):(i=t[0],t[0]=t[1],t[1]=i,i=t[2],t[2]=t[3],t[3]=i,e[1]<0&&(i=t[1],t[1]=t[3],t[3]=i),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(i=t[0],t[0]=t[2],t[2]=i),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const i=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/i,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/i]}static getAxialAlignedBoundingBox(e,t){const i=this.applyTransform(e,t),r=this.applyTransform(e.slice(2,4),t),s=this.applyTransform([e[0],e[3]],t),n=this.applyTransform([e[2],e[1]],t);return[Math.min(i[0],r[0],s[0],n[0]),Math.min(i[1],r[1],s[1],n[1]),Math.max(i[0],r[0],s[0],n[0]),Math.max(i[1],r[1],s[1],n[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],i=e[0]*t[0]+e[1]*t[2],r=e[0]*t[1]+e[1]*t[3],s=e[2]*t[0]+e[3]*t[2],n=e[2]*t[1]+e[3]*t[3],a=(i+n)/2,o=Math.sqrt((i+n)**2-4*(i*n-s*r))/2,l=a+o||1,h=a-o||1;return[Math.sqrt(l),Math.sqrt(h)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const i=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(i>r)return null;const s=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),n=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return s>n?null:[i,s,r,n]}static#e(e,t,i,r,s,n,a,o,l,h){if(l<=0||l>=1)return;const c=1-l,d=l*l,u=d*l,p=c*(c*(c*e+3*l*t)+3*d*i)+u*r,m=c*(c*(c*s+3*l*n)+3*d*a)+u*o;h[0]=Math.min(h[0],p),h[1]=Math.min(h[1],m),h[2]=Math.max(h[2],p),h[3]=Math.max(h[3],m)}static#t(e,t,i,r,s,n,a,o,l,h,c,d){if(Math.abs(l)<1e-12)return void(Math.abs(h)>=1e-12&&this.#e(e,t,i,r,s,n,a,o,-c/h,d));const u=h**2-4*c*l;if(u<0)return;const p=Math.sqrt(u),m=2*l;this.#e(e,t,i,r,s,n,a,o,(-h+p)/m,d),this.#e(e,t,i,r,s,n,a,o,(-h-p)/m,d)}static bezierBoundingBox(e,t,i,r,s,n,a,o,l){return l?(l[0]=Math.min(l[0],e,a),l[1]=Math.min(l[1],t,o),l[2]=Math.max(l[2],e,a),l[3]=Math.max(l[3],t,o)):l=[Math.min(e,a),Math.min(t,o),Math.max(e,a),Math.max(t,o)],this.#t(e,i,s,a,t,r,n,o,3*(3*(i-s)-e+a),6*(e-2*i+s),3*(i-e),l),this.#t(e,i,s,a,t,r,n,o,3*(3*(r-n)-t+o),6*(t-2*r+n),3*(r-t),l),l}}let ol=null,ll=null;function hl(e){return ol||(ol=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,ll=new Map([["ſt","ſt"]])),e.replaceAll(ol,((e,t,i)=>t?t.normalize("NFKC"):ll.get(i)))}const cl="pdfjs_internal_id_";"function"!=typeof Promise.try&&(Promise.try=function(e,...t){return new Promise((i=>{i(e(...t))}))});const dl="http://www.w3.org/2000/svg";class ul{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}async function pl(e,t="text"){if(xl(e,document.baseURI)){const i=await fetch(e);if(!i.ok)throw new Error(i.statusText);switch(t){case"arraybuffer":return i.arrayBuffer();case"blob":return i.blob();case"json":return i.json()}return i.text()}return new Promise(((i,r)=>{const s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType=t,s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE)if(200!==s.status&&0!==s.status)r(new Error(s.statusText));else{switch(t){case"arraybuffer":case"blob":case"json":return void i(s.response)}i(s.responseText)}},s.send(null)}))}class ml{constructor({viewBox:e,userUnit:t,scale:i,rotation:r,offsetX:s=0,offsetY:n=0,dontFlip:a=!1}){this.viewBox=e,this.userUnit=t,this.scale=i,this.rotation=r,this.offsetX=s,this.offsetY=n,i*=t;const o=(e[2]+e[0])/2,l=(e[3]+e[1])/2;let h,c,d,u,p,m,g,f;switch((r%=360)<0&&(r+=360),r){case 180:h=-1,c=0,d=0,u=1;break;case 90:h=0,c=1,d=1,u=0;break;case 270:h=0,c=-1,d=-1,u=0;break;case 0:h=1,c=0,d=0,u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}a&&(d=-d,u=-u),0===h?(p=Math.abs(l-e[1])*i+s,m=Math.abs(o-e[0])*i+n,g=(e[3]-e[1])*i,f=(e[2]-e[0])*i):(p=Math.abs(o-e[0])*i+s,m=Math.abs(l-e[1])*i+n,g=(e[2]-e[0])*i,f=(e[3]-e[1])*i),this.transform=[h*i,c*i,d*i,u*i,p-h*i*o-d*i*l,m-c*i*o-u*i*l],this.width=g,this.height=f}get rawDims(){const{userUnit:e,viewBox:t}=this,i=t.map((t=>t*e));return $o(this,"rawDims",{pageWidth:i[2]-i[0],pageHeight:i[3]-i[1],pageX:i[0],pageY:i[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:i=this.offsetX,offsetY:r=this.offsetY,dontFlip:s=!1}={}){return new ml({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:e,rotation:t,offsetX:i,offsetY:r,dontFlip:s})}convertToViewportPoint(e,t){return al.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=al.applyTransform([e[0],e[1]],this.transform),i=al.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],i[0],i[1]]}convertToPdfPoint(e,t){return al.applyInverseTransform([e,t],this.transform)}}class gl extends Wo{constructor(e,t=0){super(e,"RenderingCancelledException"),this.extraDelay=t}}function fl(e){const t=e.length;let i=0;for(;i<t&&""===e[i].trim();)i++;return"data:"===e.substring(i,i+5).toLowerCase()}function bl(e){return"string"==typeof e&&/\.pdf$/i.test(e)}function vl(e){return[e]=e.split(/[#?]/,1),e.substring(e.lastIndexOf("/")+1)}function yl(e,t="document.pdf"){if("string"!=typeof e)return t;if(fl(e))return jo('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const i=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,r=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let s=i.exec(r[1])||i.exec(r[2])||i.exec(r[3]);if(s&&(s=s[0],s.includes("%")))try{s=i.exec(decodeURIComponent(s))[0]}catch{}return s||t}class wl{started=Object.create(null);times=[];time(e){e in this.started&&jo(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||jo(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const{name:e}of this.times)t=Math.max(e.length,t);for(const{name:i,start:r,end:s}of this.times)e.push(`${i.padEnd(t)} ${s-r}ms\n`);return e.join("")}}function xl(e,t){try{const{protocol:i}=t?new URL(e,t):new URL(e);return"http:"===i||"https:"===i}catch{return!1}}function Al(e){e.preventDefault()}function kl(e){e.preventDefault(),e.stopPropagation()}class El{static#i;static toDateObject(e){if(!e||"string"!=typeof e)return null;this.#i||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const t=this.#i.exec(e);if(!t)return null;const i=parseInt(t[1],10);let r=parseInt(t[2],10);r=r>=1&&r<=12?r-1:0;let s=parseInt(t[3],10);s=s>=1&&s<=31?s:1;let n=parseInt(t[4],10);n=n>=0&&n<=23?n:0;let a=parseInt(t[5],10);a=a>=0&&a<=59?a:0;let o=parseInt(t[6],10);o=o>=0&&o<=59?o:0;const l=t[7]||"Z";let h=parseInt(t[8],10);h=h>=0&&h<=23?h:0;let c=parseInt(t[9],10)||0;return c=c>=0&&c<=59?c:0,"-"===l?(n+=h,a+=c):"+"===l&&(n-=h,a-=c),new Date(Date.UTC(i,r,s,n,a,o))}}function Sl(e,{scale:t=1,rotation:i=0}){const{width:r,height:s}=e.attributes.style,n=[0,0,parseInt(r),parseInt(s)];return new ml({viewBox:n,userUnit:1,scale:t,rotation:i})}function Cl(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16);return[(16711680&t)>>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map((e=>parseInt(e))):e.startsWith("rgba(")?e.slice(5,-1).split(",").map((e=>parseInt(e))).slice(0,3):(jo(`Not a valid color format: "${e}"`),[0,0,0])}function Ml(e){const{a:t,b:i,c:r,d:s,e:n,f:a}=e.getTransform();return[t,i,r,s,n,a]}function _l(e){const{a:t,b:i,c:r,d:s,e:n,f:a}=e.getTransform().invertSelf();return[t,i,r,s,n,a]}function Tl(e,t,i=!1,r=!0){if(t instanceof ml){const{pageWidth:r,pageHeight:s}=t.rawDims,{style:n}=e,a=sl.isCSSRoundSupported,o=`var(--scale-factor) * ${r}px`,l=`var(--scale-factor) * ${s}px`,h=a?`round(down, ${o}, var(--scale-round-x, 1px))`:`calc(${o})`,c=a?`round(down, ${l}, var(--scale-round-y, 1px))`:`calc(${l})`;i&&t.rotation%180!=0?(n.width=c,n.height=h):(n.width=h,n.height=c)}r&&e.setAttribute("data-main-rotation",t.rotation)}class Nl{constructor(){const e=window.devicePixelRatio||1;this.sx=e,this.sy=e}get scaled(){return 1!==this.sx||1!==this.sy}get symmetric(){return this.sx===this.sy}}class Il{#r=null;#s=null;#n;#a=null;#o=null;static#l=null;constructor(e){this.#n=e,Il.#l||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"})}render(){const e=this.#r=document.createElement("div");e.classList.add("editToolbar","hidden"),e.setAttribute("role","toolbar");const t=this.#n._uiManager._signal;e.addEventListener("contextmenu",Al,{signal:t}),e.addEventListener("pointerdown",Il.#h,{signal:t});const i=this.#a=document.createElement("div");i.className="buttons",e.append(i);const r=this.#n.toolbarPosition;if(r){const{style:t}=e,i="ltr"===this.#n._uiManager.direction?1-r[0]:r[0];t.insetInlineEnd=100*i+"%",t.top=`calc(${100*r[1]}% + var(--editor-toolbar-vert-offset))`}return this.#c(),e}get div(){return this.#r}static#h(e){e.stopPropagation()}#d(e){this.#n._focusEventsAllowed=!1,kl(e)}#u(e){this.#n._focusEventsAllowed=!0,kl(e)}#p(e){const t=this.#n._uiManager._signal;e.addEventListener("focusin",this.#d.bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",this.#u.bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",Al,{signal:t})}hide(){this.#r.classList.add("hidden"),this.#s?.hideDropdown()}show(){this.#r.classList.remove("hidden"),this.#o?.shown()}#c(){const{editorType:e,_uiManager:t}=this.#n,i=document.createElement("button");i.className="delete",i.tabIndex=0,i.setAttribute("data-l10n-id",Il.#l[e]),this.#p(i),i.addEventListener("click",(e=>{t.delete()}),{signal:t._signal}),this.#a.append(i)}get#m(){const e=document.createElement("div");return e.className="divider",e}async addAltText(e){const t=await e.render();this.#p(t),this.#a.prepend(t,this.#m),this.#o=e}addColorPicker(e){this.#s=e;const t=e.renderButton();this.#p(t),this.#a.prepend(t,this.#m)}remove(){this.#r.remove(),this.#s?.destroy(),this.#s=null}}class Ll{#a=null;#r=null;#g;constructor(e){this.#g=e}#f(){const e=this.#r=document.createElement("div");e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",Al,{signal:this.#g._signal});const t=this.#a=document.createElement("div");return t.className="buttons",e.append(t),this.#b(),e}#v(e,t){let i=0,r=0;for(const s of e){const e=s.y+s.height;if(e<i)continue;const n=s.x+(t?s.width:0);e>i?(r=n,i=e):t?n>r&&(r=n):n<r&&(r=n)}return[t?1-r:r,i]}show(e,t,i){const[r,s]=this.#v(t,i),{style:n}=this.#r||=this.#f();e.append(this.#r),n.insetInlineEnd=100*r+"%",n.top=`calc(${100*s}% + var(--editor-toolbar-vert-offset))`}hide(){this.#r.remove()}#b(){const e=document.createElement("button");e.className="highlightButton",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const t=document.createElement("span");e.append(t),t.className="visuallyHidden",t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const i=this.#g._signal;e.addEventListener("contextmenu",Al,{signal:i}),e.addEventListener("click",(()=>{this.#g.highlightSelection("floating_button")}),{signal:i}),this.#a.append(e)}}function Pl(e,t,i){for(const r of i)t.addEventListener(r,e[r].bind(e))}class Rl{#y=0;get id(){return"pdfjs_internal_editor_"+this.#y++}}class Dl{#w=function(){if("function"==typeof crypto.randomUUID)return crypto.randomUUID();const e=new Uint8Array(32);return crypto.getRandomValues(e),tl(e)}();#y=0;#x=null;static get _isSVGFittingCanvas(){const e=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),t=new Image;t.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';return $o(this,"_isSVGFittingCanvas",t.decode().then((()=>(e.drawImage(t,0,0,1,1,0,0,1,3),0===new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0]))))}async#A(e,t){this.#x||=new Map;let i=this.#x.get(e);if(null===i)return null;if(i?.bitmap)return i.refCounter+=1,i;try{let e;if(i||={bitmap:null,id:`image_${this.#w}_${this.#y++}`,refCounter:0,isSvg:!1},"string"==typeof t?(i.url=t,e=await pl(t,"blob")):t instanceof File?e=i.file=t:t instanceof Blob&&(e=t),"image/svg+xml"===e.type){const t=Dl._isSVGFittingCanvas,r=new FileReader,s=new Image,n=new Promise(((e,n)=>{s.onload=()=>{i.bitmap=s,i.isSvg=!0,e()},r.onload=async()=>{const e=i.svgUrl=r.result;s.src=await t?`${e}#svgView(preserveAspectRatio(none))`:e},s.onerror=r.onerror=n}));r.readAsDataURL(e),await n}else i.bitmap=await createImageBitmap(e);i.refCounter=1}catch(e){jo(e),i=null}return this.#x.set(e,i),i&&this.#x.set(i.id,i),i}async getFromFile(e){const{lastModified:t,name:i,size:r,type:s}=e;return this.#A(`${t}_${i}_${r}_${s}`,e)}async getFromUrl(e){return this.#A(e,e)}async getFromBlob(e,t){const i=await t;return this.#A(e,i)}async getFromId(e){this.#x||=new Map;const t=this.#x.get(e);if(!t)return null;if(t.bitmap)return t.refCounter+=1,t;if(t.file)return this.getFromFile(t.file);if(t.blobPromise){const{blobPromise:e}=t;return delete t.blobPromise,this.getFromBlob(t.id,e)}return this.getFromUrl(t.url)}getFromCanvas(e,t){this.#x||=new Map;let i=this.#x.get(e);if(i?.bitmap)return i.refCounter+=1,i;const r=new OffscreenCanvas(t.width,t.height);return r.getContext("2d").drawImage(t,0,0),i={bitmap:r.transferToImageBitmap(),id:`image_${this.#w}_${this.#y++}`,refCounter:1,isSvg:!1},this.#x.set(e,i),this.#x.set(i.id,i),i}getSvgUrl(e){const t=this.#x.get(e);return t?.isSvg?t.svgUrl:null}deleteId(e){this.#x||=new Map;const t=this.#x.get(e);if(!t)return;if(t.refCounter-=1,0!==t.refCounter)return;const{bitmap:i}=t;if(!t.url&&!t.file){const e=new OffscreenCanvas(i.width,i.height);e.getContext("bitmaprenderer").transferFromImageBitmap(i),t.blobPromise=e.convertToBlob()}i.close?.(),t.bitmap=null}isValidId(e){return e.startsWith(`image_${this.#w}_`)}}class Fl{#k=[];#E=!1;#S;#C=-1;constructor(e=128){this.#S=e}add({cmd:e,undo:t,post:i,mustExec:r,type:s=NaN,overwriteIfSameType:n=!1,keepUndo:a=!1}){if(r&&e(),this.#E)return;const o={cmd:e,undo:t,post:i,type:s};if(-1===this.#C)return this.#k.length>0&&(this.#k.length=0),this.#C=0,void this.#k.push(o);if(n&&this.#k[this.#C].type===s)return a&&(o.undo=this.#k[this.#C].undo),void(this.#k[this.#C]=o);const l=this.#C+1;l===this.#S?this.#k.splice(0,1):(this.#C=l,l<this.#k.length&&this.#k.splice(l)),this.#k.push(o)}undo(){if(-1===this.#C)return;this.#E=!0;const{undo:e,post:t}=this.#k[this.#C];e(),t?.(),this.#E=!1,this.#C-=1}redo(){if(this.#C<this.#k.length-1){this.#C+=1,this.#E=!0;const{cmd:e,post:t}=this.#k[this.#C];e(),t?.(),this.#E=!1}}hasSomethingToUndo(){return-1!==this.#C}hasSomethingToRedo(){return this.#C<this.#k.length-1}cleanType(e){if(-1!==this.#C){for(let t=this.#C;t>=0;t--)if(this.#k[t].type!==e)return this.#k.splice(t+1,this.#C-t),void(this.#C=t);this.#k.length=0,this.#C=-1}}destroy(){this.#k=null}}class zl{constructor(e){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=sl.platform;for(const[i,r,s={}]of e)for(const e of i){const i=e.startsWith("mac+");t&&i?(this.callbacks.set(e.slice(4),{callback:r,options:s}),this.allKeys.add(e.split("+").at(-1))):t||i||(this.callbacks.set(e,{callback:r,options:s}),this.allKeys.add(e.split("+").at(-1)))}}#M(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t}exec(e,t){if(!this.allKeys.has(t.key))return;const i=this.callbacks.get(this.#M(t));if(!i)return;const{callback:r,options:{bubbles:s=!1,args:n=[],checker:a=null}}=i;a&&!a(e,t)||(r.bind(e,...n,t)(),s||kl(t))}}class Ol{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return function(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const i of e.keys()){t.style.color=i;const r=window.getComputedStyle(t).color;e.set(i,Cl(r))}t.remove()}(e),$o(this,"_colors",e)}convert(e){const t=Cl(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[e,i]of this._colors)if(i.every(((e,i)=>e===t[i])))return Ol._colorsMapping.get(e);return t}getHexCode(e){const t=this._colors.get(e);return t?al.makeHexColor(...t):e}}class Bl{#_=new AbortController;#T=null;#N=new Map;#I=new Map;#L=null;#P=null;#R=null;#D=new Fl;#F=null;#z=null;#O=0;#B=new Set;#H=null;#q=null;#j=new Set;_editorUndoBar=null;#V=!1;#U=!1;#G=!1;#$=null;#W=null;#X=null;#Y=null;#K=!1;#Z=null;#J=new Rl;#Q=!1;#ee=!1;#te=null;#ie=null;#re=null;#se=null;#ne=to.NONE;#ae=new Set;#oe=null;#le=null;#he=null;#ce={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#de=[0,0];#ue=null;#pe=null;#me=null;#ge=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const e=Bl.prototype,t=e=>e.#pe.contains(document.activeElement)&&"BUTTON"!==document.activeElement.tagName&&e.hasSomethingToControl(),i=(e,{target:t})=>{if(t instanceof HTMLInputElement){const{type:e}=t;return"text"!==e&&"number"!==e}return!0},r=this.TRANSLATE_SMALL,s=this.TRANSLATE_BIG;return $o(this,"_keyboardManager",new zl([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:i}],[["ctrl+z","mac+meta+z"],e.undo,{checker:i}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:i}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:i}],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(e,{target:t})=>!(t instanceof HTMLButtonElement)&&e.#pe.contains(t)&&!e.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(e,{target:t})=>!(t instanceof HTMLButtonElement)&&e.#pe.contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-r,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-s,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[r,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[s,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-r],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-s],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,r],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,s],checker:t}]]))}constructor(e,t,i,r,s,n,a,o,l,h,c,d,u){const p=this._signal=this.#_.signal;this.#pe=e,this.#me=t,this.#L=i,this._eventBus=r,r._on("editingaction",this.onEditingAction.bind(this),{signal:p}),r._on("pagechanging",this.onPageChanging.bind(this),{signal:p}),r._on("scalechanging",this.onScaleChanging.bind(this),{signal:p}),r._on("rotationchanging",this.onRotationChanging.bind(this),{signal:p}),r._on("setpreference",this.onSetPreference.bind(this),{signal:p}),r._on("switchannotationeditorparams",(e=>this.updateParams(e.type,e.value)),{signal:p}),this.#fe(),this.#be(),this.#ve(),this.#P=s.annotationStorage,this.#$=s.filterFactory,this.#le=n,this.#Y=a||null,this.#V=o,this.#U=l,this.#G=h,this.#se=c||null,this.viewParameters={realScale:ul.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=d||null,this._supportsPinchToZoom=!1!==u}destroy(){this.#ge?.resolve(),this.#ge=null,this.#_?.abort(),this.#_=null,this._signal=null;for(const e of this.#I.values())e.destroy();this.#I.clear(),this.#N.clear(),this.#j.clear(),this.#T=null,this.#ae.clear(),this.#D.destroy(),this.#L?.destroy(),this.#Z?.hide(),this.#Z=null,this.#W&&(clearTimeout(this.#W),this.#W=null),this.#ue&&(clearTimeout(this.#ue),this.#ue=null),this._editorUndoBar?.destroy()}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return this.#se}get useNewAltTextFlow(){return this.#U}get useNewAltTextWhenAddingImage(){return this.#G}get hcmFilter(){return $o(this,"hcmFilter",this.#le?this.#$.addHCMFilter(this.#le.foreground,this.#le.background):"none")}get direction(){return $o(this,"direction",getComputedStyle(this.#pe).direction)}get highlightColors(){return $o(this,"highlightColors",this.#Y?new Map(this.#Y.split(",").map((e=>e.split("=").map((e=>e.trim()))))):null)}get highlightColorNames(){return $o(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,(e=>e.reverse()))):null)}setCurrentDrawingSession(e){e?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#z=e}setMainHighlightColorPicker(e){this.#re=e}editAltText(e,t=!1){this.#L?.editAltText(this,e,t)}switchToMode(e,t){this._eventBus.on("annotationeditormodechanged",t,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e})}setPreference(e,t){this._eventBus.dispatch("setpreference",{source:this,name:e,value:t})}onSetPreference({name:e,value:t}){if("enableNewAltTextWhenAddingImage"===e)this.#G=t}onPageChanging({pageNumber:e}){this.#O=e-1}focusMainContainer(){this.#pe.focus()}findParent(e,t){for(const i of this.#I.values()){const{x:r,y:s,width:n,height:a}=i.div.getBoundingClientRect();if(e>=r&&e<=r+n&&t>=s&&t<=s+a)return i}return null}disableUserSelect(e=!1){this.#me.classList.toggle("noUserSelect",e)}addShouldRescale(e){this.#j.add(e)}removeShouldRescale(e){this.#j.delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*ul.PDF_TO_CSS_UNITS;for(const e of this.#j)e.onScaleChanging();this.#z?.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}#ye({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e}#we(e){const{currentLayer:t}=this;if(t.hasTextLayer(e))return t;for(const t of this.#I.values())if(t.hasTextLayer(e))return t;return null}highlightSelection(e=""){const t=document.getSelection();if(!t||t.isCollapsed)return;const{anchorNode:i,anchorOffset:r,focusNode:s,focusOffset:n}=t,a=t.toString(),o=this.#ye(t).closest(".textLayer"),l=this.getSelectionBoxes(o);if(!l)return;t.empty();const h=this.#we(o),c=this.#ne===to.NONE,d=()=>{h?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:l,anchorNode:i,anchorOffset:r,focusNode:s,focusOffset:n,text:a}),c&&this.showAllEditors("highlight",!0,!0)};c?this.switchToMode(to.HIGHLIGHT,d):d()}#xe(){const e=document.getSelection();if(!e||e.isCollapsed)return;const t=this.#ye(e).closest(".textLayer"),i=this.getSelectionBoxes(t);i&&(this.#Z||=new Ll(this),this.#Z.show(t,i,"ltr"===this.direction))}addToAnnotationStorage(e){e.isEmpty()||!this.#P||this.#P.has(e.id)||this.#P.setValue(e.id,e)}#Ae(){const e=document.getSelection();if(!e||e.isCollapsed)return void(this.#oe&&(this.#Z?.hide(),this.#oe=null,this.#ke({hasSelectedText:!1})));const{anchorNode:t}=e;if(t===this.#oe)return;const i=this.#ye(e).closest(".textLayer");if(i){if(this.#Z?.hide(),this.#oe=t,this.#ke({hasSelectedText:!0}),(this.#ne===to.HIGHLIGHT||this.#ne===to.NONE)&&(this.#ne===to.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#K=this.isShiftKeyDown,!this.isShiftKeyDown)){const e=this.#ne===to.HIGHLIGHT?this.#we(i):null;e?.toggleDrawing();const t=new AbortController,r=this.combinedSignal(t),s=i=>{"pointerup"===i.type&&0!==i.button||(t.abort(),e?.toggleDrawing(!0),"pointerup"===i.type&&this.#Ee("main_toolbar"))};window.addEventListener("pointerup",s,{signal:r}),window.addEventListener("blur",s,{signal:r})}}else this.#oe&&(this.#Z?.hide(),this.#oe=null,this.#ke({hasSelectedText:!1}))}#Ee(e=""){this.#ne===to.HIGHLIGHT?this.highlightSelection(e):this.#V&&this.#xe()}#fe(){document.addEventListener("selectionchange",this.#Ae.bind(this),{signal:this._signal})}#Se(){if(this.#X)return;this.#X=new AbortController;const e=this.combinedSignal(this.#X);window.addEventListener("focus",this.focus.bind(this),{signal:e}),window.addEventListener("blur",this.blur.bind(this),{signal:e})}#Ce(){this.#X?.abort(),this.#X=null}blur(){if(this.isShiftKeyDown=!1,this.#K&&(this.#K=!1,this.#Ee("main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const t of this.#ae)if(t.div.contains(e)){this.#ie=[t,e],t._focusEventsAllowed=!1;break}}focus(){if(!this.#ie)return;const[e,t]=this.#ie;this.#ie=null,t.addEventListener("focusin",(()=>{e._focusEventsAllowed=!0}),{once:!0,signal:this._signal}),t.focus()}#ve(){if(this.#te)return;this.#te=new AbortController;const e=this.combinedSignal(this.#te);window.addEventListener("keydown",this.keydown.bind(this),{signal:e}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e})}#Me(){this.#te?.abort(),this.#te=null}#_e(){if(this.#F)return;this.#F=new AbortController;const e=this.combinedSignal(this.#F);document.addEventListener("copy",this.copy.bind(this),{signal:e}),document.addEventListener("cut",this.cut.bind(this),{signal:e}),document.addEventListener("paste",this.paste.bind(this),{signal:e})}#Te(){this.#F?.abort(),this.#F=null}#be(){const e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})}addEditListeners(){this.#ve(),this.#_e()}removeEditListeners(){this.#Me(),this.#Te()}dragOver(e){for(const{type:t}of e.dataTransfer.items)for(const i of this.#q)if(i.isHandlingMimeForPasting(t))return e.dataTransfer.dropEffect="copy",void e.preventDefault()}drop(e){for(const t of e.dataTransfer.items)for(const i of this.#q)if(i.isHandlingMimeForPasting(t.type))return i.paste(t,this.currentLayer),void e.preventDefault()}copy(e){if(e.preventDefault(),this.#T?.commitOrRemove(),!this.hasSelection)return;const t=[];for(const e of this.#ae){const i=e.serialize(!0);i&&t.push(i)}0!==t.length&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}async paste(e){e.preventDefault();const{clipboardData:t}=e;for(const e of t.items)for(const t of this.#q)if(t.isHandlingMimeForPasting(e.type))return void t.paste(e,this.currentLayer);let i=t.getData("application/pdfjs");if(!i)return;try{i=JSON.parse(i)}catch(e){return void jo(`paste: "${e.message}".`)}if(!Array.isArray(i))return;this.unselectAll();const r=this.currentLayer;try{const e=[];for(const t of i){const i=await r.deserialize(t);if(!i)return;e.push(i)}const t=()=>{for(const t of e)this.#Ne(t);this.#Ie(e)},s=()=>{for(const t of e)t.remove()};this.addCommands({cmd:t,undo:s,mustExec:!0})}catch(e){jo(`paste: "${e.message}".`)}}keydown(e){this.isShiftKeyDown||"Shift"!==e.key||(this.isShiftKeyDown=!0),this.#ne===to.NONE||this.isEditorHandlingKeyboard||Bl._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&"Shift"===e.key&&(this.isShiftKeyDown=!1,this.#K&&(this.#K=!1,this.#Ee("main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu")}}#ke(e){Object.entries(e).some((([e,t])=>this.#ce[e]!==t))&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#ce,e)}),this.#ne===to.HIGHLIGHT&&!1===e.hasSelectedEditor&&this.#Le([[io.HIGHLIGHT_FREE,!0]]))}#Le(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})}setEditingState(e){e?(this.#Se(),this.#_e(),this.#ke({isEditing:this.#ne!==to.NONE,isEmpty:this.#Pe(),hasSomethingToUndo:this.#D.hasSomethingToUndo(),hasSomethingToRedo:this.#D.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#Ce(),this.#Te(),this.#ke({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!this.#q){this.#q=e;for(const e of this.#q)this.#Le(e.defaultPropertiesToUpdate)}}getId(){return this.#J.id}get currentLayer(){return this.#I.get(this.#O)}getLayer(e){return this.#I.get(e)}get currentPageIndex(){return this.#O}addLayer(e){this.#I.set(e.pageIndex,e),this.#Q?e.enable():e.disable()}removeLayer(e){this.#I.delete(e.pageIndex)}async updateMode(e,t=null,i=!1){if(this.#ne!==e&&(!this.#ge||(await this.#ge.promise,this.#ge))){if(this.#ge=Promise.withResolvers(),this.#ne=e,e===to.NONE)return this.setEditingState(!1),this.#Re(),this._editorUndoBar?.hide(),void this.#ge.resolve();this.setEditingState(!0),await this.#De(),this.unselectAll();for(const t of this.#I.values())t.updateMode(e);if(!t)return i&&this.addNewEditorFromKeyboard(),void this.#ge.resolve();for(const e of this.#N.values())e.annotationElementId===t?(this.setSelected(e),e.enterInEditMode()):e.unselect();this.#ge.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e!==this.#ne&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){if(this.#q){switch(e){case io.CREATE:return void this.currentLayer.addNewEditor();case io.HIGHLIGHT_DEFAULT_COLOR:this.#re?.updateColor(t);break;case io.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#he||=new Map).set(e,t),this.showAllEditors("highlight",t)}for(const i of this.#ae)i.updateParams(e,t);for(const i of this.#q)i.updateDefaultParams(e,t)}}showAllEditors(e,t,i=!1){for(const i of this.#N.values())i.editorType===e&&i.show(t);(this.#he?.get(io.HIGHLIGHT_SHOW_ALL)??!0)!==t&&this.#Le([[io.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(this.#ee!==e){this.#ee=e;for(const t of this.#I.values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}async#De(){if(!this.#Q){this.#Q=!0;const e=[];for(const t of this.#I.values())e.push(t.enable());await Promise.all(e);for(const e of this.#N.values())e.enable()}}#Re(){if(this.unselectAll(),this.#Q){this.#Q=!1;for(const e of this.#I.values())e.disable();for(const e of this.#N.values())e.disable()}}getEditors(e){const t=[];for(const i of this.#N.values())i.pageIndex===e&&t.push(i);return t}getEditor(e){return this.#N.get(e)}addEditor(e){this.#N.set(e.id,e)}removeEditor(e){e.div.contains(document.activeElement)&&(this.#W&&clearTimeout(this.#W),this.#W=setTimeout((()=>{this.focusMainContainer(),this.#W=null}),0)),this.#N.delete(e.id),this.unselect(e),e.annotationElementId&&this.#B.has(e.annotationElementId)||this.#P?.remove(e.id)}addDeletedAnnotationElement(e){this.#B.add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return this.#B.has(e)}removeDeletedAnnotationElement(e){this.#B.delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}#Ne(e){const t=this.#I.get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))}setActiveEditor(e){this.#T!==e&&(this.#T=e,e&&this.#Le(e.propertiesToUpdate))}get#Fe(){let e=null;for(e of this.#ae);return e}updateUI(e){this.#Fe===e&&this.#Le(e.propertiesToUpdate)}updateUIForDefaultProperties(e){this.#Le(e.defaultPropertiesToUpdate)}toggleSelected(e){if(this.#ae.has(e))return this.#ae.delete(e),e.unselect(),void this.#ke({hasSelectedEditor:this.hasSelection});this.#ae.add(e),e.select(),this.#Le(e.propertiesToUpdate),this.#ke({hasSelectedEditor:!0})}setSelected(e){this.#z?.commitOrRemove();for(const t of this.#ae)t!==e&&t.unselect();this.#ae.clear(),this.#ae.add(e),e.select(),this.#Le(e.propertiesToUpdate),this.#ke({hasSelectedEditor:!0})}isSelected(e){return this.#ae.has(e)}get firstSelectedEditor(){return this.#ae.values().next().value}unselect(e){e.unselect(),this.#ae.delete(e),this.#ke({hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==this.#ae.size}get isEnterHandled(){return 1===this.#ae.size&&this.firstSelectedEditor.isEnterHandled}undo(){this.#D.undo(),this.#ke({hasSomethingToUndo:this.#D.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#Pe()}),this._editorUndoBar?.hide()}redo(){this.#D.redo(),this.#ke({hasSomethingToUndo:!0,hasSomethingToRedo:this.#D.hasSomethingToRedo(),isEmpty:this.#Pe()})}addCommands(e){this.#D.add(e),this.#ke({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#Pe()})}cleanUndoStack(e){this.#D.cleanType(e)}#Pe(){if(0===this.#N.size)return!0;if(1===this.#N.size)for(const e of this.#N.values())return e.isEmpty();return!1}delete(){this.commitOrRemove();const e=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!e)return;const t=e?[e]:[...this.#ae],i=()=>{for(const e of t)this.#Ne(e)};this.addCommands({cmd:()=>{this._editorUndoBar?.show(i,1===t.length?t[0].editorType:t.length);for(const e of t)e.remove()},undo:i,mustExec:!0})}commitOrRemove(){this.#T?.commitOrRemove()}hasSomethingToControl(){return this.#T||this.hasSelection}#Ie(e){for(const e of this.#ae)e.unselect();this.#ae.clear();for(const t of e)t.isEmpty()||(this.#ae.add(t),t.select());this.#ke({hasSelectedEditor:this.hasSelection})}selectAll(){for(const e of this.#ae)e.commit();this.#Ie(this.#N.values())}unselectAll(){if((!this.#T||(this.#T.commitOrRemove(),this.#ne===to.NONE))&&!this.#z?.commitOrRemove()&&this.hasSelection){for(const e of this.#ae)e.unselect();this.#ae.clear(),this.#ke({hasSelectedEditor:!1})}}translateSelectedEditors(e,t,i=!1){if(i||this.commitOrRemove(),!this.hasSelection)return;this.#de[0]+=e,this.#de[1]+=t;const[r,s]=this.#de,n=[...this.#ae];this.#ue&&clearTimeout(this.#ue),this.#ue=setTimeout((()=>{this.#ue=null,this.#de[0]=this.#de[1]=0,this.addCommands({cmd:()=>{for(const e of n)this.#N.has(e.id)&&e.translateInPage(r,s)},undo:()=>{for(const e of n)this.#N.has(e.id)&&e.translateInPage(-r,-s)},mustExec:!1})}),1e3);for(const i of n)i.translateInPage(e,t)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#H=new Map;for(const e of this.#ae)this.#H.set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#H)return!1;this.disableUserSelect(!1);const e=this.#H;this.#H=null;let t=!1;for(const[{x:i,y:r,pageIndex:s},n]of e)n.newX=i,n.newY=r,n.newPageIndex=s,t||=i!==n.savedX||r!==n.savedY||s!==n.savedPageIndex;if(!t)return!1;const i=(e,t,i,r)=>{if(this.#N.has(e.id)){const s=this.#I.get(r);s?e._setParentAndPosition(s,t,i):(e.pageIndex=r,e.x=t,e.y=i)}};return this.addCommands({cmd:()=>{for(const[t,{newX:r,newY:s,newPageIndex:n}]of e)i(t,r,s,n)},undo:()=>{for(const[t,{savedX:r,savedY:s,savedPageIndex:n}]of e)i(t,r,s,n)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(this.#H)for(const i of this.#H.keys())i.drag(e,t)}rebuild(e){if(null===e.parent){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||1===this.#ae.size&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return this.#T===e}getActive(){return this.#T}getMode(){return this.#ne}get imageManager(){return $o(this,"imageManager",new Dl)}getSelectionBoxes(e){if(!e)return null;const t=document.getSelection();for(let i=0,r=t.rangeCount;i<r;i++)if(!e.contains(t.getRangeAt(i).commonAncestorContainer))return null;const{x:i,y:r,width:s,height:n}=e.getBoundingClientRect();let a;switch(e.getAttribute("data-main-rotation")){case"90":a=(e,t,a,o)=>({x:(t-r)/n,y:1-(e+a-i)/s,width:o/n,height:a/s});break;case"180":a=(e,t,a,o)=>({x:1-(e+a-i)/s,y:1-(t+o-r)/n,width:a/s,height:o/n});break;case"270":a=(e,t,a,o)=>({x:1-(t+o-r)/n,y:(e-i)/s,width:o/n,height:a/s});break;default:a=(e,t,a,o)=>({x:(e-i)/s,y:(t-r)/n,width:a/s,height:o/n})}const o=[];for(let e=0,i=t.rangeCount;e<i;e++){const i=t.getRangeAt(e);if(!i.collapsed)for(const{x:e,y:t,width:r,height:s}of i.getClientRects())0!==r&&0!==s&&o.push(a(e,t,r,s))}return 0===o.length?null:o}addChangedExistingAnnotation({annotationElementId:e,id:t}){(this.#R||=new Map).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){this.#R?.delete(e)}renderAnnotationElement(e){const t=this.#R?.get(e.data.id);if(!t)return;const i=this.#P.getRawValue(t);i&&(this.#ne!==to.NONE||i.hasBeenModified)&&i.renderAnnotationElement(e)}}class Hl{#o=null;#ze=!1;#Oe=null;#Be=null;#He=null;#qe=null;#je=!1;#Ve=null;#n=null;#Ue=null;#Ge=null;#$e=!1;static#We=null;static _l10n=null;constructor(e){this.#n=e,this.#$e=e._uiManager.useNewAltTextFlow,Hl.#We||=Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(e){Hl._l10n??=e}async render(){const e=this.#Oe=document.createElement("button");e.className="altText",e.tabIndex="0";const t=this.#Be=document.createElement("span");e.append(t),this.#$e?(e.classList.add("new"),e.setAttribute("data-l10n-id",Hl.#We.missing),t.setAttribute("data-l10n-id",Hl.#We["missing-label"])):(e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const i=this.#n._uiManager._signal;e.addEventListener("contextmenu",Al,{signal:i}),e.addEventListener("pointerdown",(e=>e.stopPropagation()),{signal:i});const r=e=>{e.preventDefault(),this.#n._uiManager.editAltText(this.#n),this.#$e&&this.#n._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#Xe}})};return e.addEventListener("click",r,{capture:!0,signal:i}),e.addEventListener("keydown",(t=>{t.target===e&&"Enter"===t.key&&(this.#je=!0,r(t))}),{signal:i}),await this.#Ye(),e}get#Xe(){return(this.#o?"added":null===this.#o&&this.guessedText&&"review")||"missing"}finish(){this.#Oe&&(this.#Oe.focus({focusVisible:this.#je}),this.#je=!1)}isEmpty(){return this.#$e?null===this.#o:!this.#o&&!this.#ze}hasData(){return this.#$e?null!==this.#o||!!this.#Ue:this.isEmpty()}get guessedText(){return this.#Ue}async setGuessedText(e){null===this.#o&&(this.#Ue=e,this.#Ge=await Hl._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:e}),this.#Ye())}toggleAltTextBadge(e=!1){if(!this.#$e||this.#o)return this.#Ve?.remove(),void(this.#Ve=null);if(!this.#Ve){const e=this.#Ve=document.createElement("div");e.className="noAltTextBadge",this.#n.div.append(e)}this.#Ve.classList.toggle("hidden",!e)}serialize(e){let t=this.#o;return e||this.#Ue!==t||(t=this.#Ge),{altText:t,decorative:this.#ze,guessedText:this.#Ue,textWithDisclaimer:this.#Ge}}get data(){return{altText:this.#o,decorative:this.#ze}}set data({altText:e,decorative:t,guessedText:i,textWithDisclaimer:r,cancel:s=!1}){i&&(this.#Ue=i,this.#Ge=r),this.#o===e&&this.#ze===t||(s||(this.#o=e,this.#ze=t),this.#Ye())}toggle(e=!1){this.#Oe&&(!e&&this.#qe&&(clearTimeout(this.#qe),this.#qe=null),this.#Oe.disabled=!e)}shown(){this.#n._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#Xe}})}destroy(){this.#Oe?.remove(),this.#Oe=null,this.#Be=null,this.#He=null,this.#Ve?.remove(),this.#Ve=null}async#Ye(){const e=this.#Oe;if(!e)return;if(this.#$e){if(e.classList.toggle("done",!!this.#o),e.setAttribute("data-l10n-id",Hl.#We[this.#Xe]),this.#Be?.setAttribute("data-l10n-id",Hl.#We[`${this.#Xe}-label`]),!this.#o)return void this.#He?.remove()}else{if(!this.#o&&!this.#ze)return e.classList.remove("done"),void this.#He?.remove();e.classList.add("done"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let t=this.#He;if(!t){this.#He=t=document.createElement("span"),t.className="tooltip",t.setAttribute("role","tooltip"),t.id=`alt-text-tooltip-${this.#n.id}`;const i=100,r=this.#n._uiManager._signal;r.addEventListener("abort",(()=>{clearTimeout(this.#qe),this.#qe=null}),{once:!0}),e.addEventListener("mouseenter",(()=>{this.#qe=setTimeout((()=>{this.#qe=null,this.#He.classList.add("show"),this.#n._reportTelemetry({action:"alt_text_tooltip"})}),i)}),{signal:r}),e.addEventListener("mouseleave",(()=>{this.#qe&&(clearTimeout(this.#qe),this.#qe=null),this.#He?.classList.remove("show")}),{signal:r})}this.#ze?t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(t.removeAttribute("data-l10n-id"),t.textContent=this.#o),t.parentNode||e.append(t);const i=this.#n.getImageForAltText();i?.setAttribute("aria-describedby",t.id)}}class ql{#pe;#Ke=!1;#Ze=null;#Je;#Qe;#et;#tt;#it;#rt=null;#st;#nt=null;constructor({container:e,isPinchingDisabled:t=null,isPinchingStopped:i=null,onPinchStart:r=null,onPinching:s=null,onPinchEnd:n=null,signal:a}){this.#pe=e,this.#Ze=i,this.#Je=t,this.#Qe=r,this.#et=s,this.#tt=n,this.#st=new AbortController,this.#it=AbortSignal.any([a,this.#st.signal]),e.addEventListener("touchstart",this.#at.bind(this),{passive:!1,signal:this.#it})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return $o(this,"MIN_TOUCH_DISTANCE_TO_PINCH",35/(window.devicePixelRatio||1))}#at(e){if(this.#Je?.()||e.touches.length<2)return;if(!this.#nt){this.#nt=new AbortController;const e=AbortSignal.any([this.#it,this.#nt.signal]),t=this.#pe,i={signal:e,passive:!1};t.addEventListener("touchmove",this.#ot.bind(this),i),t.addEventListener("touchend",this.#lt.bind(this),i),t.addEventListener("touchcancel",this.#lt.bind(this),i),this.#Qe?.()}if(kl(e),2!==e.touches.length||this.#Ze?.())return void(this.#rt=null);let[t,i]=e.touches;t.identifier>i.identifier&&([t,i]=[i,t]),this.#rt={touch0X:t.screenX,touch0Y:t.screenY,touch1X:i.screenX,touch1Y:i.screenY}}#ot(e){if(!this.#rt||2!==e.touches.length)return;let[t,i]=e.touches;t.identifier>i.identifier&&([t,i]=[i,t]);const{screenX:r,screenY:s}=t,{screenX:n,screenY:a}=i,o=this.#rt,{touch0X:l,touch0Y:h,touch1X:c,touch1Y:d}=o,u=c-l,p=d-h,m=n-r,g=a-s,f=Math.hypot(m,g)||1,b=Math.hypot(u,p)||1;if(!this.#Ke&&Math.abs(b-f)<=ql.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(o.touch0X=r,o.touch0Y=s,o.touch1X=n,o.touch1Y=a,e.preventDefault(),!this.#Ke)return void(this.#Ke=!0);const v=[(r+n)/2,(s+a)/2];this.#et?.(v,b,f)}#lt(e){this.#nt.abort(),this.#nt=null,this.#tt?.(),this.#rt&&(e.preventDefault(),this.#rt=null,this.#Ke=!1)}destroy(){this.#st?.abort(),this.#st=null}}class jl{#ht=null;#ct=null;#o=null;#dt=!1;#ut=null;#pt="";#mt=!1;#gt=null;#ft=null;#bt=null;#vt=null;#yt="";#wt=!1;#xt=null;#At=!1;#kt=!1;#Et=!1;#St=null;#Ct=0;#Mt=0;#_t=null;#Tt=null;_editToolbar=null;_initialOptions=Object.create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#Nt=!1;#It=jl._zIndex++;static _borderLineWidth=-1;static _colorManager=new Ol;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const e=jl.prototype._resizeWithKeyboard,t=Bl.TRANSLATE_SMALL,i=Bl.TRANSLATE_BIG;return $o(this,"_resizerKeyboardManager",new zl([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-t,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-i,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[t,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[i,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-t]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-i]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,t]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,i]}],[["Escape","mac+Escape"],jl.prototype._stopResizingWithKeyboard]]))}constructor(e){this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;const{rotation:t,rawDims:{pageWidth:i,pageHeight:r,pageX:s,pageY:n}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[i,r],this.pageTranslation=[s,n];const[a,o]=this.parentDimensions;this.x=e.x/a,this.y=e.y/o,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get isDrawer(){return!1}static get _defaultLineColor(){return $o(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const t=new Vl({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t){if(jl._l10n??=e,jl._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),-1!==jl._borderLineWidth)return;const i=getComputedStyle(document.documentElement);jl._borderLineWidth=parseFloat(i.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){Vo("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#Nt}set _isDraggable(e){this.#Nt=e,this.div?.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#It}setParent(e){null!==e?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):this.#Lt(),this.parent=e}focusin(e){this._focusEventsAllowed&&(this.#wt?this.#wt=!1:this.parent.setSelected(this))}focusout(e){if(!this._focusEventsAllowed)return;if(!this.isAttachedToDOM)return;const t=e.relatedTarget;t?.closest(`#${this.id}`)||(e.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,i,r){const[s,n]=this.parentDimensions;[i,r]=this.screenToPageTranslation(i,r),this.x=(e+i)/s,this.y=(t+r)/n,this.fixAndSetPosition()}#Pt([e,t],i,r){[i,r]=this.screenToPageTranslation(i,r),this.x+=i/e,this.y+=r/t,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(e,t){this.#Pt(this.parentDimensions,e,t)}translateInPage(e,t){this.#xt||=[this.x,this.y,this.width,this.height],this.#Pt(this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){this.#xt||=[this.x,this.y,this.width,this.height];const{div:i,parentDimensions:[r,s]}=this;if(this.x+=e/r,this.y+=t/s,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:e,y:t}=this.div.getBoundingClientRect();this.parent.findNewParent(this,e,t)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:n,y:a}=this;const[o,l]=this.getBaseTranslation();n+=o,a+=l;const{style:h}=i;h.left=`${(100*n).toFixed(2)}%`,h.top=`${(100*a).toFixed(2)}%`,this._onTranslating(n,a),i.scrollIntoView({block:"nearest"})}_onTranslating(e,t){}_onTranslated(e,t){}get _hasBeenMoved(){return!!this.#xt&&(this.#xt[0]!==this.x||this.#xt[1]!==this.y)}get _hasBeenResized(){return!!this.#xt&&(this.#xt[2]!==this.width||this.#xt[3]!==this.height)}getBaseTranslation(){const[e,t]=this.parentDimensions,{_borderLineWidth:i}=jl,r=i/e,s=i/t;switch(this.rotation){case 90:return[-r,s];case 180:return[r,s];case 270:return[r,-s];default:return[-r,-s]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){const{div:{style:t},pageDimensions:[i,r]}=this;let{x:s,y:n,width:a,height:o}=this;if(a*=i,o*=r,s*=i,n*=r,this._mustFixPosition)switch(e){case 0:s=Math.max(0,Math.min(i-a,s)),n=Math.max(0,Math.min(r-o,n));break;case 90:s=Math.max(0,Math.min(i-o,s)),n=Math.min(r,Math.max(a,n));break;case 180:s=Math.min(i,Math.max(a,s)),n=Math.min(r,Math.max(o,n));break;case 270:s=Math.min(i,Math.max(o,s)),n=Math.max(0,Math.min(r-a,n))}this.x=s/=i,this.y=n/=r;const[l,h]=this.getBaseTranslation();s+=l,n+=h,t.left=`${(100*s).toFixed(2)}%`,t.top=`${(100*n).toFixed(2)}%`,this.moveInDOM()}static#Rt(e,t,i){switch(i){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}screenToPageTranslation(e,t){return jl.#Rt(e,t,this.parentRotation)}pageTranslationToScreen(e,t){return jl.#Rt(e,t,360-this.parentRotation)}#Dt(e){switch(e){case 90:{const[e,t]=this.pageDimensions;return[0,-e/t,t/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,t]=this.pageDimensions;return[0,e/t,-t/e,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,i]}=this;return[t*e,i*e]}setDims(e,t){const[i,r]=this.parentDimensions,{style:s}=this.div;s.width=`${(100*e/i).toFixed(2)}%`,this.#mt||(s.height=`${(100*t/r).toFixed(2)}%`)}fixDims(){const{style:e}=this.div,{height:t,width:i}=e,r=i.endsWith("%"),s=!this.#mt&&t.endsWith("%");if(r&&s)return;const[n,a]=this.parentDimensions;r||(e.width=`${(100*parseFloat(i)/n).toFixed(2)}%`),this.#mt||s||(e.height=`${(100*parseFloat(t)/a).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#Ft(){if(this.#gt)return;this.#gt=document.createElement("div"),this.#gt.classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(const i of e){const e=document.createElement("div");this.#gt.append(e),e.classList.add("resizer",i),e.setAttribute("data-resizer-name",i),e.addEventListener("pointerdown",this.#zt.bind(this,i),{signal:t}),e.addEventListener("contextmenu",Al,{signal:t}),e.tabIndex=-1}this.div.prepend(this.#gt)}#zt(e,t){t.preventDefault();const{isMac:i}=sl.platform;if(0!==t.button||t.ctrlKey&&i)return;this.#o?.toggle(!1);const r=this._isDraggable;this._isDraggable=!1,this.#ft=[t.screenX,t.screenY];const s=new AbortController,n=this._uiManager.combinedSignal(s);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#Ot.bind(this,e),{passive:!0,capture:!0,signal:n}),window.addEventListener("touchmove",kl,{passive:!1,signal:n}),window.addEventListener("contextmenu",Al,{signal:n}),this.#bt={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const a=this.parent.div.style.cursor,o=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const l=()=>{s.abort(),this.parent.togglePointerEvents(!0),this.#o?.toggle(!0),this._isDraggable=r,this.parent.div.style.cursor=a,this.div.style.cursor=o,this.#Bt()};window.addEventListener("pointerup",l,{signal:n}),window.addEventListener("blur",l,{signal:n})}#Ht(e,t,i,r){this.width=i,this.height=r,this.x=e,this.y=t;const[s,n]=this.parentDimensions;this.setDims(s*i,n*r),this.fixAndSetPosition(),this._onResized()}_onResized(){}#Bt(){if(!this.#bt)return;const{savedX:e,savedY:t,savedWidth:i,savedHeight:r}=this.#bt;this.#bt=null;const s=this.x,n=this.y,a=this.width,o=this.height;s===e&&n===t&&a===i&&o===r||this.addCommands({cmd:this.#Ht.bind(this,s,n,a,o),undo:this.#Ht.bind(this,e,t,i,r),mustExec:!0})}static _round(e){return Math.round(1e4*e)/1e4}#Ot(e,t){const[i,r]=this.parentDimensions,s=this.x,n=this.y,a=this.width,o=this.height,l=jl.MIN_SIZE/i,h=jl.MIN_SIZE/r,c=this.#Dt(this.rotation),d=(e,t)=>[c[0]*e+c[2]*t,c[1]*e+c[3]*t],u=this.#Dt(360-this.rotation);let p,m,g=!1,f=!1;switch(e){case"topLeft":g=!0,p=(e,t)=>[0,0],m=(e,t)=>[e,t];break;case"topMiddle":p=(e,t)=>[e/2,0],m=(e,t)=>[e/2,t];break;case"topRight":g=!0,p=(e,t)=>[e,0],m=(e,t)=>[0,t];break;case"middleRight":f=!0,p=(e,t)=>[e,t/2],m=(e,t)=>[0,t/2];break;case"bottomRight":g=!0,p=(e,t)=>[e,t],m=(e,t)=>[0,0];break;case"bottomMiddle":p=(e,t)=>[e/2,t],m=(e,t)=>[e/2,0];break;case"bottomLeft":g=!0,p=(e,t)=>[0,t],m=(e,t)=>[e,0];break;case"middleLeft":f=!0,p=(e,t)=>[0,t/2],m=(e,t)=>[e,t/2]}const b=p(a,o),v=m(a,o);let y=d(...v);const w=jl._round(s+y[0]),x=jl._round(n+y[1]);let A,k,E=1,S=1;if(t.fromKeyboard)({deltaX:A,deltaY:k}=t);else{const{screenX:e,screenY:i}=t,[r,s]=this.#ft;[A,k]=this.screenToPageTranslation(e-r,i-s),this.#ft[0]=e,this.#ft[1]=i}var C,M;if([A,k]=(C=A/i,M=k/r,[u[0]*C+u[2]*M,u[1]*C+u[3]*M]),g){const e=Math.hypot(a,o);E=S=Math.max(Math.min(Math.hypot(v[0]-b[0]-A,v[1]-b[1]-k)/e,1/a,1/o),l/a,h/o)}else f?E=Math.max(l,Math.min(1,Math.abs(v[0]-b[0]-A)))/a:S=Math.max(h,Math.min(1,Math.abs(v[1]-b[1]-k)))/o;const _=jl._round(a*E),T=jl._round(o*S);y=d(...m(_,T));const N=w-y[0],I=x-y[1];this.#xt||=[this.x,this.y,this.width,this.height],this.width=_,this.height=T,this.x=N,this.y=I,this.setDims(i*_,r*T),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#o?.finish()}async addEditToolbar(){return this._editToolbar||this.#kt||(this._editToolbar=new Il(this),this.div.append(this._editToolbar.render()),this.#o&&await this._editToolbar.addAltText(this.#o)),this._editToolbar}removeEditToolbar(){this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,this.#o?.destroy())}addContainer(e){const t=this._editToolbar?.div;t?t.before(e):this.div.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){this.#o||(Hl.initialize(jl._l10n),this.#o=new Hl(this),this.#ht&&(this.#o.data=this.#ht,this.#ht=null),await this.addEditToolbar())}get altTextData(){return this.#o?.data}set altTextData(e){this.#o&&(this.#o.data=e)}get guessedAltText(){return this.#o?.guessedText}async setGuessedAltText(e){await(this.#o?.setGuessedText(e))}serializeAltText(e){return this.#o?.serialize(e)}hasAltText(){return!!this.#o&&!this.#o.isEmpty()}hasAltTextData(){return this.#o?.hasData()??!1}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=this.#dt?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),this.#qt();const[e,t]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*t/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/t).toFixed(2)}%`);const[i,r]=this.getInitialTranslation();return this.translate(i,r),Pl(this,this.div,["pointerdown"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#Tt||=new ql({container:this.div,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#jt.bind(this),onPinching:this.#Vt.bind(this),onPinchEnd:this.#Ut.bind(this),signal:this._uiManager._signal})),this._uiManager._editorUndoBar?.hide(),this.div}#jt(){this.#bt={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#o?.toggle(!1),this.parent.togglePointerEvents(!1)}#Vt(e,t,i){let r=i/t*.7+1-.7;if(1===r)return;const s=this.#Dt(this.rotation),n=(e,t)=>[s[0]*e+s[2]*t,s[1]*e+s[3]*t],[a,o]=this.parentDimensions,l=this.x,h=this.y,c=this.width,d=this.height,u=jl.MIN_SIZE/a,p=jl.MIN_SIZE/o;r=Math.max(Math.min(r,1/c,1/d),u/c,p/d);const m=jl._round(c*r),g=jl._round(d*r);if(m===c&&g===d)return;this.#xt||=[l,h,c,d];const f=n(c/2,d/2),b=jl._round(l+f[0]),v=jl._round(h+f[1]),y=n(m/2,g/2);this.x=b-y[0],this.y=v-y[1],this.width=m,this.height=g,this.setDims(a*m,o*g),this.fixAndSetPosition(),this._onResizing()}#Ut(){this.#o?.toggle(!0),this.parent.togglePointerEvents(!0),this.#Bt()}pointerdown(e){const{isMac:t}=sl.platform;0!==e.button||e.ctrlKey&&t?e.preventDefault():(this.#wt=!0,this._isDraggable?this.#Gt(e):this.#$t(e))}get isSelected(){return this._uiManager.isSelected(this)}#$t(e){const{isMac:t}=sl.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)}#Gt(e){const{isSelected:t}=this;this._uiManager.setUpDragSession();let i=!1;const r=new AbortController,s=this._uiManager.combinedSignal(r),n={capture:!0,passive:!1,signal:s},a=e=>{r.abort(),this.#ut=null,this.#wt=!1,this._uiManager.endDragSession()||this.#$t(e),i&&this._onStopDragging()};t&&(this.#Ct=e.clientX,this.#Mt=e.clientY,this.#ut=e.pointerId,this.#pt=e.pointerType,window.addEventListener("pointermove",(e=>{i||(i=!0,this._onStartDragging());const{clientX:t,clientY:r,pointerId:s}=e;if(s!==this.#ut)return void kl(e);const[n,a]=this.screenToPageTranslation(t-this.#Ct,r-this.#Mt);this.#Ct=t,this.#Mt=r,this._uiManager.dragSelectedEditors(n,a)}),n),window.addEventListener("touchmove",kl,n),window.addEventListener("pointerdown",(e=>{e.pointerType===this.#pt&&(this.#Tt||e.isPrimary)&&a(e),kl(e)}),n));const o=e=>{this.#ut&&this.#ut!==e.pointerId?kl(e):a(e)};window.addEventListener("pointerup",o,{signal:s}),window.addEventListener("blur",o,{signal:s})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#St&&clearTimeout(this.#St),this.#St=setTimeout((()=>{this.#St=null,this.parent?.moveEditorInDOM(this)}),0)}_setParentAndPosition(e,t,i){e.changeParent(this),this.x=t,this.y=i,this.fixAndSetPosition(),this._onTranslated()}getRect(e,t,i=this.rotation){const r=this.parentScale,[s,n]=this.pageDimensions,[a,o]=this.pageTranslation,l=e/r,h=t/r,c=this.x*s,d=this.y*n,u=this.width*s,p=this.height*n;switch(i){case 0:return[c+l+a,n-d-h-p+o,c+l+u+a,n-d-h+o];case 90:return[c+h+a,n-d+l+o,c+h+p+a,n-d+l+u+o];case 180:return[c-l-u+a,n-d+h+o,c-l+a,n-d+h+p+o];case 270:return[c-h-p+a,n-d-l-u+o,c-h+a,n-d-l+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[i,r,s,n]=e,a=s-i,o=n-r;switch(this.rotation){case 0:return[i,t-n,a,o];case 90:return[i,t-r,o,a];case 180:return[s,t-r,a,o];case 270:return[s,t-n,o,a];default:throw new Error("Invalid rotation")}}onceAdded(e){}isEmpty(){return!1}enableEditMode(){this.#kt=!0}disableEditMode(){this.#kt=!1}isInEditMode(){return this.#kt}shouldGetKeyboardEvents(){return this.#Et}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:e,left:t,bottom:i,right:r}=this.getClientDimensions(),{innerHeight:s,innerWidth:n}=window;return t<n&&r>0&&e<s&&i>0}#qt(){if(this.#vt||!this.div)return;this.#vt=new AbortController;const e=this._uiManager.combinedSignal(this.#vt);this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})}rebuild(){this.#qt()}rotate(e){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(e=!1,t=null){Vo("An editor must be serializable")}static async deserialize(e,t,i){const r=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:i});r.rotation=e.rotation,r.#ht=e.accessibilityData;const[s,n]=r.pageDimensions,[a,o,l,h]=r.getRectInCurrentCoords(e.rect,n);return r.x=a/s,r.y=o/n,r.width=l/s,r.height=h/n,r}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||null!==this.serialize())}remove(){if(this.#vt?.abort(),this.#vt=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#St&&(clearTimeout(this.#St),this.#St=null),this.#Lt(),this.removeEditToolbar(),this.#_t){for(const e of this.#_t.values())clearTimeout(e);this.#_t=null}this.parent=null,this.#Tt?.destroy(),this.#Tt=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#Ft(),this.#gt.classList.remove("hidden"),Pl(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(e){if(!this.isResizable||e.target!==this.div||"Enter"!==e.key)return;this._uiManager.setSelected(this),this.#bt={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const t=this.#gt.children;if(!this.#ct){this.#ct=Array.from(t);const e=this.#Wt.bind(this),i=this.#Xt.bind(this),r=this._uiManager._signal;for(const t of this.#ct){const s=t.getAttribute("data-resizer-name");t.setAttribute("role","spinbutton"),t.addEventListener("keydown",e,{signal:r}),t.addEventListener("blur",i,{signal:r}),t.addEventListener("focus",this.#Yt.bind(this,s),{signal:r}),t.setAttribute("data-l10n-id",jl._l10nResizer[s])}}const i=this.#ct[0];let r=0;for(const e of t){if(e===i)break;r++}const s=(360-this.rotation+this.parentRotation)%360/90*(this.#ct.length/4);if(s!==r){if(s<r)for(let e=0;e<r-s;e++)this.#gt.append(this.#gt.firstChild);else if(s>r)for(let e=0;e<s-r;e++)this.#gt.firstChild.before(this.#gt.lastChild);let e=0;for(const i of t){const t=this.#ct[e++].getAttribute("data-resizer-name");i.setAttribute("data-l10n-id",jl._l10nResizer[t])}}this.#Kt(0),this.#Et=!0,this.#gt.firstChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}#Wt(e){jl._resizerKeyboardManager.exec(this,e)}#Xt(e){this.#Et&&e.relatedTarget?.parentNode!==this.#gt&&this.#Lt()}#Yt(e){this.#yt=this.#Et?e:""}#Kt(e){if(this.#ct)for(const t of this.#ct)t.tabIndex=e}_resizeWithKeyboard(e,t){this.#Et&&this.#Ot(this.#yt,{deltaX:e,deltaY:t,fromKeyboard:!0})}#Lt(){this.#Et=!1,this.#Kt(-1),this.#Bt()}_stopResizingWithKeyboard(){this.#Lt(),this.div.focus()}select(){this.makeResizable(),this.div?.classList.add("selectedEditor"),this._editToolbar?(this._editToolbar?.show(),this.#o?.toggleAltTextBadge(!1)):this.addEditToolbar().then((()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()}))}unselect(){this.#gt?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#o?.toggleAltTextBadge(!0)}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return this.#At}set isEditing(e){this.#At=e,this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){this.#mt=!0;const i=e/t,{style:r}=this.div;r.aspectRatio=i,r.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,t=!1){if(t){this.#_t||=new Map;const{action:t}=e;let i=this.#_t.get(t);return i&&clearTimeout(i),i=setTimeout((()=>{this._reportTelemetry(e),this.#_t.delete(t),0===this.#_t.size&&(this.#_t=null)}),jl._telemetryTimeout),void this.#_t.set(t,i)}e.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),this.#dt=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#dt=!0}renderAnnotationElement(e){let t=e.container.querySelector(".annotationContent");if(t){if("CANVAS"===t.nodeName){const e=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.before(t)}}else t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);return t}resetAnnotationElement(e){const{firstChild:t}=e.container;"DIV"===t?.nodeName&&t.classList.contains("annotationContent")&&t.remove()}}class Vl extends jl{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const Ul=3285377520,Gl=4294901760,$l=65535;class Wl{constructor(e){this.h1=e?4294967295&e:Ul,this.h2=e?4294967295&e:Ul}update(e){let t,i;if("string"==typeof e){t=new Uint8Array(2*e.length),i=0;for(let r=0,s=e.length;r<s;r++){const s=e.charCodeAt(r);s<=255?t[i++]=s:(t[i++]=s>>>8,t[i++]=255&s)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice(),i=t.byteLength}const r=i>>2,s=i-4*r,n=new Uint32Array(t.buffer,0,r);let a=0,o=0,l=this.h1,h=this.h2;const c=3432918353,d=461845907,u=11601,p=13715;for(let e=0;e<r;e++)1&e?(a=n[e],a=a*c&Gl|a*u&$l,a=a<<15|a>>>17,a=a*d&Gl|a*p&$l,l^=a,l=l<<13|l>>>19,l=5*l+3864292196):(o=n[e],o=o*c&Gl|o*u&$l,o=o<<15|o>>>17,o=o*d&Gl|o*p&$l,h^=o,h=h<<13|h>>>19,h=5*h+3864292196);switch(a=0,s){case 3:a^=t[4*r+2]<<16;case 2:a^=t[4*r+1]<<8;case 1:a^=t[4*r],a=a*c&Gl|a*u&$l,a=a<<15|a>>>17,a=a*d&Gl|a*p&$l,1&r?l^=a:h^=a}this.h1=l,this.h2=h}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&Gl|36045*e&$l,t=4283543511*t&Gl|(2950163797*(t<<16|e>>>16)&Gl)>>>16,e^=t>>>1,e=444984403*e&Gl|60499*e&$l,t=3301882366*t&Gl|(3120437893*(t<<16|e>>>16)&Gl)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}const Xl=Object.freeze({map:null,hash:"",transfer:void 0});class Yl{#Zt=!1;#Jt=null;#Qt=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const i=this.#Qt.get(e);return void 0===i?t:Object.assign(t,i)}getRawValue(e){return this.#Qt.get(e)}remove(e){if(this.#Qt.delete(e),0===this.#Qt.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const e of this.#Qt.values())if(e instanceof jl)return;this.onAnnotationEditor(null)}}setValue(e,t){const i=this.#Qt.get(e);let r=!1;if(void 0!==i)for(const[e,s]of Object.entries(t))i[e]!==s&&(r=!0,i[e]=s);else r=!0,this.#Qt.set(e,t);r&&this.#ei(),t instanceof jl&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return this.#Qt.has(e)}getAll(){return this.#Qt.size>0?rl(this.#Qt):null}setAll(e){for(const[t,i]of Object.entries(e))this.setValue(t,i)}get size(){return this.#Qt.size}#ei(){this.#Zt||(this.#Zt=!0,"function"==typeof this.onSetModified&&this.onSetModified())}resetModified(){this.#Zt&&(this.#Zt=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new Kl(this)}get serializable(){if(0===this.#Qt.size)return Xl;const e=new Map,t=new Wl,i=[],r=Object.create(null);let s=!1;for(const[i,n]of this.#Qt){const a=n instanceof jl?n.serialize(!1,r):n;a&&(e.set(i,a),t.update(`${i}:${JSON.stringify(a)}`),s||=!!a.bitmap)}if(s)for(const t of e.values())t.bitmap&&i.push(t.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:i}:Xl}get editorStats(){let e=null;const t=new Map;for(const i of this.#Qt.values()){if(!(i instanceof jl))continue;const r=i.telemetryFinalData;if(!r)continue;const{type:s}=r;t.has(s)||t.set(s,Object.getPrototypeOf(i).constructor),e||=Object.create(null);const n=e[s]||=new Map;for(const[e,t]of Object.entries(r)){if("type"===e)continue;let i=n.get(e);i||(i=new Map,n.set(e,i));const r=i.get(t)??0;i.set(t,r+1)}}for(const[i,r]of t)e[i]=r.computeTelemetryFinalData(e[i]);return e}resetModifiedIds(){this.#Jt=null}get modifiedIds(){if(this.#Jt)return this.#Jt;const e=[];for(const t of this.#Qt.values())t instanceof jl&&t.annotationElementId&&t.serialize()&&e.push(t.annotationElementId);return this.#Jt={ids:new Set(e),hash:e.join(",")}}}class Kl extends Yl{#ti;constructor(e){super();const{map:t,hash:i,transfer:r}=e.serializable,s=structuredClone(t,r?{transfer:r}:null);this.#ti={map:s,hash:i,transfer:r}}get print(){Vo("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#ti}get modifiedIds(){return $o(this,"modifiedIds",{ids:new Set,hash:""})}}class Zl{#ii=new Set;constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),this.#ii.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,_inspectFont:t}){if(e&&!this.#ii.has(e.loadedName))if(Uo(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:r,style:s}=e,n=new FontFace(i,r,s);this.addNativeFontFace(n);try{await n.load(),this.#ii.add(i),t?.(e)}catch{jo(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(n)}}else Vo("Not implemented: loadSystemFont without the Font Loading API.")}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo)return void await this.loadSystemFont(e);if(this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(i){throw jo(`Failed to load font '${t.family}': '${i}'.`),e.disableFontFace=!0,i}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise((t=>{const i=this._queueLoadingCallback(t);this._prepareFontLoadEvent(e,i)}))}}get isFontLoadingAPISupported(){return $o(this,"isFontLoadingAPISupported",!!this._document?.fonts)}get isSyncFontLoadingSupported(){let e=!1;return(ja||"undefined"!=typeof navigator&&"string"==typeof navigator?.userAgent&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),$o(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,i={done:!1,complete:function(){for(Uo(!i.done,"completeRequest() cannot be called twice."),i.done=!0;t.length>0&&t[0].done;){const e=t.shift();setTimeout(e.callback,0)}},callback:e};return t.push(i),i}get _loadTestFont(){return $o(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t){function i(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function r(e,t,i,r){return e.substring(0,t)+r+e.substring(t+i)}let s,n;const a=this._document.createElement("canvas");a.width=1,a.height=1;const o=a.getContext("2d");let l=0;const h=`lt${Date.now()}${this.loadTestFontId++}`;let c=this._loadTestFont;c=r(c,976,h.length,h);const d=1482184792;let u=i(c,16);for(s=0,n=h.length-3;s<n;s+=4)u=u-d+i(h,s)|0;var p;s<h.length&&(u=u-d+i(h+"XXX",s)|0),c=r(c,16,4,(p=u,String.fromCharCode(p>>24&255,p>>16&255,p>>8&255,255&p)));const m=`@font-face {font-family:"${h}";src:${`url(data:font/opentype;base64,${btoa(c)});`}}`;this.insertRule(m);const g=this._document.createElement("div");g.style.visibility="hidden",g.style.width=g.style.height="10px",g.style.position="absolute",g.style.top=g.style.left="0px";for(const t of[e.loadedName,h]){const e=this._document.createElement("span");e.textContent="Hi",e.style.fontFamily=t,g.append(e)}this._document.body.append(g),function e(t,i){if(++l>30)return jo("Load test font never loaded."),void i();o.font="30px "+t,o.fillText(".",0,20),o.getImageData(0,0,1,1).data[3]>0?i():setTimeout(e.bind(null,t,i))}(h,(()=>{g.remove(),t.complete()}))}}class Jl{constructor(e,{disableFontFace:t=!1,fontExtraProperties:i=!1,inspectFont:r=null}){this.compiledGlyphs=Object.create(null);for(const t in e)this[t]=e[t];this.disableFontFace=!0===t,this.fontExtraProperties=!0===i,this._inspectFont=r}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return this._inspectFont?.(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=`url(data:${this.mimetype};base64,${t=this.data,Uint8Array.prototype.toBase64?t.toBase64():btoa(tl(t))});`;var t;let i;if(this.cssFontInfo){let t=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(t+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),i=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${t}src:${e}}`}else i=`@font-face {font-family:"${this.loadedName}";src:${e}}`;return this._inspectFont?.(this,e),i}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];const i=this.loadedName+"_path_"+t;let r;try{r=e.get(i)}catch(e){jo(`getPathGenerator - ignoring character: "${e}".`)}const s=new Path2D(r||"");return this.fontExtraProperties||e.delete(i),this.compiledGlyphs[t]=s}}const Ql=1,eh=2,th=1,ih=2,rh=3,sh=4,nh=5,ah=6,oh=7,lh=8;function hh(){}function ch(e){if(e instanceof el||e instanceof Ko||e instanceof Zo||e instanceof Xo||e instanceof Jo||e instanceof Yo)return e;switch(e instanceof Error||"object"==typeof e&&null!==e||Vo('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new el(e.message);case"InvalidPDFException":return new Ko(e.message);case"MissingPDFException":return new Zo(e.message);case"PasswordException":return new Xo(e.message,e.code);case"UnexpectedResponseException":return new Jo(e.message,e.status);case"UnknownErrorException":return new Yo(e.message,e.details)}return new Yo(e.message,e.toString())}class dh{#ri=new AbortController;constructor(e,t,i){this.sourceName=e,this.targetName=t,this.comObj=i,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),i.addEventListener("message",this.#si.bind(this),{signal:this.#ri.signal})}#si({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream)return void this.#ni(e);if(e.callback){const t=e.callbackId,i=this.callbackCapabilities[t];if(!i)throw new Error(`Cannot resolve callback ${t}`);if(delete this.callbackCapabilities[t],e.callback===Ql)i.resolve(e.data);else{if(e.callback!==eh)throw new Error("Unexpected callback case");i.reject(ch(e.reason))}return}const t=this.actionHandler[e.action];if(!t)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const i=this.sourceName,r=e.sourceName,s=this.comObj;Promise.try(t,e.data).then((function(t){s.postMessage({sourceName:i,targetName:r,callback:Ql,callbackId:e.callbackId,data:t})}),(function(t){s.postMessage({sourceName:i,targetName:r,callback:eh,callbackId:e.callbackId,reason:ch(t)})}))}else e.streamId?this.#ai(e):t(e.data)}on(e,t){const i=this.actionHandler;if(i[e])throw new Error(`There is already an actionName called "${e}"`);i[e]=t}send(e,t,i){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},i)}sendWithPromise(e,t,i){const r=this.callbackId++,s=Promise.withResolvers();this.callbackCapabilities[r]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:r,data:t},i)}catch(e){s.reject(e)}return s.promise}sendWithStream(e,t,i,r){const s=this.streamId++,n=this.sourceName,a=this.targetName,o=this.comObj;return new ReadableStream({start:i=>{const l=Promise.withResolvers();return this.streamControllers[s]={controller:i,startCall:l,pullCall:null,cancelCall:null,isClosed:!1},o.postMessage({sourceName:n,targetName:a,action:e,streamId:s,data:t,desiredSize:i.desiredSize},r),l.promise},pull:e=>{const t=Promise.withResolvers();return this.streamControllers[s].pullCall=t,o.postMessage({sourceName:n,targetName:a,stream:ah,streamId:s,desiredSize:e.desiredSize}),t.promise},cancel:e=>{Uo(e instanceof Error,"cancel must have a valid reason");const t=Promise.withResolvers();return this.streamControllers[s].cancelCall=t,this.streamControllers[s].isClosed=!0,o.postMessage({sourceName:n,targetName:a,stream:th,streamId:s,reason:ch(e)}),t.promise}},i)}#ai(e){const t=e.streamId,i=this.sourceName,r=e.sourceName,s=this.comObj,n=this,a=this.actionHandler[e.action],o={enqueue(e,n=1,a){if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=n,o>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),s.postMessage({sourceName:i,targetName:r,stream:sh,streamId:t,chunk:e},a)},close(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:r,stream:rh,streamId:t}),delete n.streamSinks[t])},error(e){Uo(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:r,stream:nh,streamId:t,reason:ch(e)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[t]=o,Promise.try(a,e.data,o).then((function(){s.postMessage({sourceName:i,targetName:r,stream:lh,streamId:t,success:!0})}),(function(e){s.postMessage({sourceName:i,targetName:r,stream:lh,streamId:t,reason:ch(e)})}))}#ni(e){const t=e.streamId,i=this.sourceName,r=e.sourceName,s=this.comObj,n=this.streamControllers[t],a=this.streamSinks[t];switch(e.stream){case lh:e.success?n.startCall.resolve():n.startCall.reject(ch(e.reason));break;case oh:e.success?n.pullCall.resolve():n.pullCall.reject(ch(e.reason));break;case ah:if(!a){s.postMessage({sourceName:i,targetName:r,stream:oh,streamId:t,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,Promise.try(a.onPull||hh).then((function(){s.postMessage({sourceName:i,targetName:r,stream:oh,streamId:t,success:!0})}),(function(e){s.postMessage({sourceName:i,targetName:r,stream:oh,streamId:t,reason:ch(e)})}));break;case sh:if(Uo(n,"enqueue should have stream controller"),n.isClosed)break;n.controller.enqueue(e.chunk);break;case rh:if(Uo(n,"close should have stream controller"),n.isClosed)break;n.isClosed=!0,n.controller.close(),this.#oi(n,t);break;case nh:Uo(n,"error should have stream controller"),n.controller.error(ch(e.reason)),this.#oi(n,t);break;case ih:e.success?n.cancelCall.resolve():n.cancelCall.reject(ch(e.reason)),this.#oi(n,t);break;case th:if(!a)break;const o=ch(e.reason);Promise.try(a.onCancel||hh,o).then((function(){s.postMessage({sourceName:i,targetName:r,stream:ih,streamId:t,success:!0})}),(function(e){s.postMessage({sourceName:i,targetName:r,stream:ih,streamId:t,reason:ch(e)})})),a.sinkCapability.reject(o),a.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async#oi(e,t){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]),delete this.streamControllers[t]}destroy(){this.#ri?.abort(),this.#ri=null}}class uh{#li=!1;constructor({enableHWA:e=!1}){this.#li=e}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const i=this._createCanvas(e,t);return{canvas:i,context:i.getContext("2d",{willReadFrequently:!this.#li})}}reset(e,t,i){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||i<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=i}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){Vo("Abstract method `_createCanvas` called.")}}class ph{constructor({baseUrl:e=null,isCompressed:t=!0}){this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":"");return this._fetch(t).then((e=>({cMapData:e,isCompressed:this.isCompressed}))).catch((e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${t}`)}))}async _fetch(e){Vo("Abstract method `_fetch` called.")}}class mh extends ph{async _fetch(e){const t=await pl(e,this.isCompressed?"arraybuffer":"text");return t instanceof ArrayBuffer?new Uint8Array(t):il(t)}}class gh{addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,t,i,r,s){return"none"}destroy(e=!1){}}class fh{constructor({baseUrl:e=null}){this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!e)throw new Error("Font filename must be specified.");const t=`${this.baseUrl}${e}`;return this._fetch(t).catch((e=>{throw new Error(`Unable to load font data at: ${t}`)}))}async _fetch(e){Vo("Abstract method `_fetch` called.")}}class bh extends fh{async _fetch(e){const t=await pl(e,"arraybuffer");return new Uint8Array(t)}}async function vh(e){const t=process.getBuiltinModule("fs"),i=await t.promises.readFile(e);return new Uint8Array(i)}ja&&jo("Please use the `legacy` build in Node.js environments.");const yh="Fill",wh="Stroke",xh="Shading";function Ah(e,t){if(!t)return;const i=t[2]-t[0],r=t[3]-t[1],s=new Path2D;s.rect(t[0],t[1],i,r),e.clip(s)}class kh{getPattern(){Vo("Abstract method `getPattern` called.")}}class Eh extends kh{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const e of this._colorStops)t.addColorStop(e[0],e[1]);return t}getPattern(e,t,i,r){let s;if(r===wh||r===yh){const n=t.current.getClippedPathBoundingBox(r,Ml(e))||[0,0,0,0],a=Math.ceil(n[2]-n[0])||1,o=Math.ceil(n[3]-n[1])||1,l=t.cachedCanvases.getCanvas("pattern",a,o),h=l.context;h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),h.rect(0,0,h.canvas.width,h.canvas.height),h.translate(-n[0],-n[1]),i=al.transform(i,[1,0,0,1,n[0],n[1]]),h.transform(...t.baseTransform),this.matrix&&h.transform(...this.matrix),Ah(h,this._bbox),h.fillStyle=this._createGradient(h),h.fill(),s=e.createPattern(l.canvas,"no-repeat");const c=new DOMMatrix(i);s.setTransform(c)}else Ah(e,this._bbox),s=this._createGradient(e);return s}}function Sh(e,t,i,r,s,n,a,o){const l=t.coords,h=t.colors,c=e.data,d=4*e.width;let u;l[i+1]>l[r+1]&&(u=i,i=r,r=u,u=n,n=a,a=u),l[r+1]>l[s+1]&&(u=r,r=s,s=u,u=a,a=o,o=u),l[i+1]>l[r+1]&&(u=i,i=r,r=u,u=n,n=a,a=u);const p=(l[i]+t.offsetX)*t.scaleX,m=(l[i+1]+t.offsetY)*t.scaleY,g=(l[r]+t.offsetX)*t.scaleX,f=(l[r+1]+t.offsetY)*t.scaleY,b=(l[s]+t.offsetX)*t.scaleX,v=(l[s+1]+t.offsetY)*t.scaleY;if(m>=v)return;const y=h[n],w=h[n+1],x=h[n+2],A=h[a],k=h[a+1],E=h[a+2],S=h[o],C=h[o+1],M=h[o+2],_=Math.round(m),T=Math.round(v);let N,I,L,P,R,D,F,z;for(let e=_;e<=T;e++){if(e<f){const t=e<m?0:(m-e)/(m-f);N=p-(p-g)*t,I=y-(y-A)*t,L=w-(w-k)*t,P=x-(x-E)*t}else{let t;t=e>v?1:f===v?0:(f-e)/(f-v),N=g-(g-b)*t,I=A-(A-S)*t,L=k-(k-C)*t,P=E-(E-M)*t}let t;t=e<m?0:e>v?1:(m-e)/(m-v),R=p-(p-b)*t,D=y-(y-S)*t,F=w-(w-C)*t,z=x-(x-M)*t;const i=Math.round(Math.min(N,R)),r=Math.round(Math.max(N,R));let s=d*e+4*i;for(let e=i;e<=r;e++)t=(N-e)/(N-R),t<0?t=0:t>1&&(t=1),c[s++]=I-(I-D)*t|0,c[s++]=L-(L-F)*t|0,c[s++]=P-(P-z)*t|0,c[s++]=255}}function Ch(e,t,i){const r=t.coords,s=t.colors;let n,a;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(r.length/o)-1,h=o-1;for(n=0;n<l;n++){let t=n*o;for(let n=0;n<h;n++,t++)Sh(e,i,r[t],r[t+1],r[t+o],s[t],s[t+1],s[t+o]),Sh(e,i,r[t+o+1],r[t+1],r[t+o],s[t+o+1],s[t+1],s[t+o])}break;case"triangles":for(n=0,a=r.length;n<a;n+=3)Sh(e,i,r[n],r[n+1],r[n+2],s[n],s[n+1],s[n+2]);break;default:throw new Error("illegal figure")}}class Mh extends kh{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,i){const r=Math.floor(this._bounds[0]),s=Math.floor(this._bounds[1]),n=Math.ceil(this._bounds[2])-r,a=Math.ceil(this._bounds[3])-s,o=Math.min(Math.ceil(Math.abs(n*e[0]*1.1)),3e3),l=Math.min(Math.ceil(Math.abs(a*e[1]*1.1)),3e3),h=n/o,c=a/l,d={coords:this._coords,colors:this._colors,offsetX:-r,offsetY:-s,scaleX:1/h,scaleY:1/c},u=o+4,p=l+4,m=i.getCanvas("mesh",u,p),g=m.context,f=g.createImageData(o,l);if(t){const e=f.data;for(let i=0,r=e.length;i<r;i+=4)e[i]=t[0],e[i+1]=t[1],e[i+2]=t[2],e[i+3]=255}for(const e of this._figures)Ch(f,e,d);g.putImageData(f,2,2);return{canvas:m.canvas,offsetX:r-2*h,offsetY:s-2*c,scaleX:h,scaleY:c}}getPattern(e,t,i,r){let s;if(Ah(e,this._bbox),r===xh)s=al.singularValueDecompose2dScale(Ml(e));else if(s=al.singularValueDecompose2dScale(t.baseTransform),this.matrix){const e=al.singularValueDecompose2dScale(this.matrix);s=[s[0]*e[0],s[1]*e[1]]}const n=this._createMeshCanvas(s,r===xh?null:this._background,t.cachedCanvases);return r!==xh&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(n.offsetX,n.offsetY),e.scale(n.scaleX,n.scaleY),e.createPattern(n.canvas,"no-repeat")}}class _h extends kh{getPattern(){return"hotpink"}}const Th=1,Nh=2;class Ih{static MAX_PATTERN_SIZE=3e3;constructor(e,t,i,r,s){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=i,this.canvasGraphicsFactory=r,this.baseTransform=s}createPatternCanvas(e){const{bbox:t,operatorList:i,paintType:r,tilingType:s,color:n,canvasGraphicsFactory:a}=this;let{xstep:o,ystep:l}=this;o=Math.abs(o),l=Math.abs(l),qo("TilingType: "+s);const h=t[0],c=t[1],d=t[2],u=t[3],p=d-h,m=u-c,g=al.singularValueDecompose2dScale(this.matrix),f=al.singularValueDecompose2dScale(this.baseTransform),b=g[0]*f[0],v=g[1]*f[1];let y=p,w=m,x=!1,A=!1;const k=Math.ceil(o*b),E=Math.ceil(l*v);k>=Math.ceil(p*b)?y=o:x=!0,E>=Math.ceil(m*v)?w=l:A=!0;const S=this.getSizeAndScale(y,this.ctx.canvas.width,b),C=this.getSizeAndScale(w,this.ctx.canvas.height,v),M=e.cachedCanvases.getCanvas("pattern",S.size,C.size),_=M.context,T=a.createCanvasGraphics(_);if(T.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(T,r,n),_.translate(-S.scale*h,-C.scale*c),T.transform(S.scale,0,0,C.scale,0,0),_.save(),this.clipBbox(T,h,c,d,u),T.baseTransform=Ml(T.ctx),T.executeOperatorList(i),T.endDrawing(),_.restore(),x||A){const t=M.canvas;x&&(y=o),A&&(w=l);const i=this.getSizeAndScale(y,this.ctx.canvas.width,b),r=this.getSizeAndScale(w,this.ctx.canvas.height,v),s=i.size,n=r.size,a=e.cachedCanvases.getCanvas("pattern-workaround",s,n),d=a.context,u=x?Math.floor(p/o):0,g=A?Math.floor(m/l):0;for(let e=0;e<=u;e++)for(let i=0;i<=g;i++)d.drawImage(t,s*e,n*i,s,n,0,0,s,n);return{canvas:a.canvas,scaleX:i.scale,scaleY:r.scale,offsetX:h,offsetY:c}}return{canvas:M.canvas,scaleX:S.scale,scaleY:C.scale,offsetX:h,offsetY:c}}getSizeAndScale(e,t,i){const r=Math.max(Ih.MAX_PATTERN_SIZE,t);let s=Math.ceil(e*i);return s>=r?s=r:i=s/e,{scale:i,size:s}}clipBbox(e,t,i,r,s){const n=r-t,a=s-i;e.ctx.rect(t,i,n,a),e.current.updateRectMinMax(Ml(e.ctx),[t,i,r,s]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,i){const r=e.ctx,s=e.current;switch(t){case Th:const e=this.ctx;r.fillStyle=e.fillStyle,r.strokeStyle=e.strokeStyle,s.fillColor=e.fillStyle,s.strokeColor=e.strokeStyle;break;case Nh:const n=al.makeHexColor(i[0],i[1],i[2]);r.fillStyle=n,r.strokeStyle=n,s.fillColor=n,s.strokeColor=n;break;default:throw new Qo(`Unsupported paint type: ${t}`)}}getPattern(e,t,i,r){let s=i;r!==xh&&(s=al.transform(s,t.baseTransform),this.matrix&&(s=al.transform(s,this.matrix)));const n=this.createPatternCanvas(t);let a=new DOMMatrix(s);a=a.translate(n.offsetX,n.offsetY),a=a.scale(1/n.scaleX,1/n.scaleY);const o=e.createPattern(n.canvas,"repeat");return o.setTransform(a),o}}function Lh({src:e,srcPos:t=0,dest:i,width:r,height:s,nonBlackColor:n=4294967295,inverseDecode:a=!1}){const o=sl.isLittleEndian?4278190080:255,[l,h]=a?[n,o]:[o,n],c=r>>3,d=7&r,u=e.length;i=new Uint32Array(i.buffer);let p=0;for(let r=0;r<s;r++){for(const r=t+c;t<r;t++){const r=t<u?e[t]:255;i[p++]=128&r?h:l,i[p++]=64&r?h:l,i[p++]=32&r?h:l,i[p++]=16&r?h:l,i[p++]=8&r?h:l,i[p++]=4&r?h:l,i[p++]=2&r?h:l,i[p++]=1&r?h:l}if(0===d)continue;const r=t<u?e[t++]:255;for(let e=0;e<d;e++)i[p++]=r&1<<7-e?h:l}return{srcPos:t,destPos:p}}const Ph=16;class Rh{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,i){let r;return void 0!==this.cache[e]?(r=this.cache[e],this.canvasFactory.reset(r,t,i)):(r=this.canvasFactory.create(t,i),this.cache[e]=r),r}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function Dh(e,t,i,r,s,n,a,o,l,h){const[c,d,u,p,m,g]=Ml(e);if(0===d&&0===u){const f=a*c+m,b=Math.round(f),v=o*p+g,y=Math.round(v),w=(a+l)*c+m,x=Math.abs(Math.round(w)-b)||1,A=(o+h)*p+g,k=Math.abs(Math.round(A)-y)||1;return e.setTransform(Math.sign(c),0,0,Math.sign(p),b,y),e.drawImage(t,i,r,s,n,0,0,x,k),e.setTransform(c,d,u,p,m,g),[x,k]}if(0===c&&0===p){const f=o*u+m,b=Math.round(f),v=a*d+g,y=Math.round(v),w=(o+h)*u+m,x=Math.abs(Math.round(w)-b)||1,A=(a+l)*d+g,k=Math.abs(Math.round(A)-y)||1;return e.setTransform(0,Math.sign(d),Math.sign(u),0,b,y),e.drawImage(t,i,r,s,n,0,0,k,x),e.setTransform(c,d,u,p,m,g),[k,x]}e.drawImage(t,i,r,s,n,a,o,l,h);return[Math.hypot(c,d)*l,Math.hypot(u,p)*h]}class Fh{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=Va,this.textMatrixScale=1,this.fontMatrix=Ua,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=so,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.patternStroke=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,i){[t,i]=al.applyTransform([t,i],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,i),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,i)}updateRectMinMax(e,t){const i=al.applyTransform(t,e),r=al.applyTransform(t.slice(2),e),s=al.applyTransform([t[0],t[3]],e),n=al.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,i[0],r[0],s[0],n[0]),this.minY=Math.min(this.minY,i[1],r[1],s[1],n[1]),this.maxX=Math.max(this.maxX,i[0],r[0],s[0],n[0]),this.maxY=Math.max(this.maxY,i[1],r[1],s[1],n[1])}updateScalingPathMinMax(e,t){al.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,i,r,s,n,a,o,l,h){const c=al.bezierBoundingBox(t,i,r,s,n,a,o,l,h);h||this.updateRectMinMax(e,c)}getPathBoundingBox(e=yh,t=null){const i=[this.minX,this.minY,this.maxX,this.maxY];if(e===wh){t||Vo("Stroke bounding box must include transform.");const e=al.singularValueDecompose2dScale(t),r=e[0]*this.lineWidth/2,s=e[1]*this.lineWidth/2;i[0]-=r,i[1]-=s,i[2]+=r,i[3]+=s}return i}updateClipFromPath(){const e=al.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=yh,t=null){return al.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function zh(e,t){if(t instanceof ImageData)return void e.putImageData(t,0,0);const i=t.height,r=t.width,s=i%Ph,n=(i-s)/Ph,a=0===s?n:n+1,o=e.createImageData(r,Ph);let l,h=0;const c=t.data,d=o.data;let u,p,m,g;if(t.kind===co.GRAYSCALE_1BPP){const t=c.byteLength,i=new Uint32Array(d.buffer,0,d.byteLength>>2),g=i.length,f=r+7>>3,b=4294967295,v=sl.isLittleEndian?4278190080:255;for(u=0;u<a;u++){for(m=u<n?Ph:s,l=0,p=0;p<m;p++){const e=t-h;let s=0;const n=e>f?r:8*e-7,a=-8&n;let o=0,d=0;for(;s<a;s+=8)d=c[h++],i[l++]=128&d?b:v,i[l++]=64&d?b:v,i[l++]=32&d?b:v,i[l++]=16&d?b:v,i[l++]=8&d?b:v,i[l++]=4&d?b:v,i[l++]=2&d?b:v,i[l++]=1&d?b:v;for(;s<n;s++)0===o&&(d=c[h++],o=128),i[l++]=d&o?b:v,o>>=1}for(;l<g;)i[l++]=0;e.putImageData(o,0,u*Ph)}}else if(t.kind===co.RGBA_32BPP){for(p=0,g=r*Ph*4,u=0;u<n;u++)d.set(c.subarray(h,h+g)),h+=g,e.putImageData(o,0,p),p+=Ph;u<a&&(g=r*s*4,d.set(c.subarray(h,h+g)),e.putImageData(o,0,p))}else{if(t.kind!==co.RGB_24BPP)throw new Error(`bad image kind: ${t.kind}`);for(m=Ph,g=r*m,u=0;u<a;u++){for(u>=n&&(m=s,g=r*m),l=0,p=g;p--;)d[l++]=c[h++],d[l++]=c[h++],d[l++]=c[h++],d[l++]=255;e.putImageData(o,0,u*Ph)}}}function Oh(e,t){if(t.bitmap)return void e.drawImage(t.bitmap,0,0);const i=t.height,r=t.width,s=i%Ph,n=(i-s)/Ph,a=0===s?n:n+1,o=e.createImageData(r,Ph);let l=0;const h=t.data,c=o.data;for(let t=0;t<a;t++){const i=t<n?Ph:s;({srcPos:l}=Lh({src:h,srcPos:l,dest:c,width:r,height:i,nonBlackColor:0})),e.putImageData(o,0,t*Ph)}}function Bh(e,t){const i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of i)void 0!==e[r]&&(t[r]=e[r]);void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function Hh(e){if(e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0),!ja){const{filter:t}=e;"none"!==t&&""!==t&&(e.filter="none")}}function qh(e,t){if(t)return!0;const i=al.singularValueDecompose2dScale(e);i[0]=Math.fround(i[0]),i[1]=Math.fround(i[1]);const r=Math.fround((globalThis.devicePixelRatio||1)*ul.PDF_TO_CSS_UNITS);return i[0]<=r&&i[1]<=r}const jh=["butt","round","square"],Vh=["miter","round","bevel"],Uh={},Gh={};class $h{constructor(e,t,i,r,s,{optionalContentConfig:n,markedContentStack:a=null},o,l){this.ctx=e,this.current=new Fh(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=i,this.canvasFactory=r,this.filterFactory=s,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=a||[],this.optionalContentConfig=n,this.cachedCanvases=new Rh(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=o,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=l,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:i=!1,background:r=null}){const s=this.ctx.canvas.width,n=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=r||"#ffffff",this.ctx.fillRect(0,0,s,n),this.ctx.fillStyle=a,i){const e=this.cachedCanvases.getCanvas("transparent",s,n);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...Ml(this.compositeCtx))}this.ctx.save(),Hh(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=Ml(this.ctx)}executeOperatorList(e,t,i,r){const s=e.argsArray,n=e.fnArray;let a=t||0;const o=s.length;if(o===a)return a;const l=o-a>10&&"function"==typeof i,h=l?Date.now()+15:0;let c=0;const d=this.commonObjs,u=this.objs;let p;for(;;){if(void 0!==r&&a===r.nextBreakPoint)return r.breakIt(a,i),a;if(p=n[a],p!==Fo.dependency)this[p].apply(this,s[a]);else for(const e of s[a]){const t=e.startsWith("g_")?d:u;if(!t.has(e))return t.get(e,i),a}if(a++,a===o)return a;if(l&&++c>10){if(Date.now()>h)return i(),a;c=0}}}#hi(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#hi(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.#ci()}#ci(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==e){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}}_scaleImage(e,t){const i=e.width??e.displayWidth,r=e.height??e.displayHeight;let s,n,a=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),l=i,h=r,c="prescale1";for(;a>2&&l>1||o>2&&h>1;){let t=l,i=h;a>2&&l>1&&(t=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2),a/=l/t),o>2&&h>1&&(i=h>=16384?Math.floor(h/2)-1||1:Math.ceil(h)/2,o/=h/i),s=this.cachedCanvases.getCanvas(c,t,i),n=s.context,n.clearRect(0,0,t,i),n.drawImage(e,0,0,l,h,0,0,t,i),e=s.canvas,l=t,h=i,c="prescale1"===c?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:h}}_createMaskCanvas(e){const t=this.ctx,{width:i,height:r}=e,s=this.current.fillColor,n=this.current.patternFill,a=Ml(t);let o,l,h,c;if((e.bitmap||e.data)&&e.count>1){const t=e.bitmap||e.data.buffer;l=JSON.stringify(n?a:[a.slice(0,4),s]),o=this._cachedBitmapsMap.get(t),o||(o=new Map,this._cachedBitmapsMap.set(t,o));const i=o.get(l);if(i&&!n){return{canvas:i,offsetX:Math.round(Math.min(a[0],a[2])+a[4]),offsetY:Math.round(Math.min(a[1],a[3])+a[5])}}h=i}h||(c=this.cachedCanvases.getCanvas("maskCanvas",i,r),Oh(c.context,e));let d=al.transform(a,[1/i,0,0,-1/r,0,0]);d=al.transform(d,[1,0,0,1,0,-r]);const[u,p,m,g]=al.getAxialAlignedBoundingBox([0,0,i,r],d),f=Math.round(m-u)||1,b=Math.round(g-p)||1,v=this.cachedCanvases.getCanvas("fillCanvas",f,b),y=v.context,w=u,x=p;y.translate(-w,-x),y.transform(...d),h||(h=this._scaleImage(c.canvas,_l(y)),h=h.img,o&&n&&o.set(l,h)),y.imageSmoothingEnabled=qh(Ml(y),e.interpolate),Dh(y,h,0,0,h.width,h.height,0,0,i,r),y.globalCompositeOperation="source-in";const A=al.transform(_l(y),[1,0,0,1,-w,-x]);return y.fillStyle=n?s.getPattern(t,this,A,yh):s,y.fillRect(0,0,i,r),o&&!n&&(this.cachedCanvases.delete("fillCanvas"),o.set(l,v.canvas)),{canvas:v.canvas,offsetX:Math.round(w),offsetY:Math.round(x)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=jh[e]}setLineJoin(e){this.ctx.lineJoin=Vh[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const i=this.ctx;void 0!==i.setLineDash&&(i.setLineDash(e),i.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,i]of e)switch(t){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i[0],i[1]);break;case"CA":this.current.strokeAlpha=i;break;case"ca":this.current.fillAlpha=i,this.ctx.globalAlpha=i;break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask=i?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(i)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,r=this.cachedCanvases.getCanvas(i,e,t);this.suspendedCtx=this.ctx,this.ctx=r.context;const s=this.ctx;s.setTransform(...Ml(this.suspendedCtx)),Bh(this.suspendedCtx,s),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,i){t.translate(e,i),this.__originalTranslate(e,i)},e.scale=function(e,i){t.scale(e,i),this.__originalScale(e,i)},e.transform=function(e,i,r,s,n,a){t.transform(e,i,r,s,n,a),this.__originalTransform(e,i,r,s,n,a)},e.setTransform=function(e,i,r,s,n,a){t.setTransform(e,i,r,s,n,a),this.__originalSetTransform(e,i,r,s,n,a)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,i){t.moveTo(e,i),this.__originalMoveTo(e,i)},e.lineTo=function(e,i){t.lineTo(e,i),this.__originalLineTo(e,i)},e.bezierCurveTo=function(e,i,r,s,n,a){t.bezierCurveTo(e,i,r,s,n,a),this.__originalBezierCurveTo(e,i,r,s,n,a)},e.rect=function(e,i,r,s){t.rect(e,i,r,s),this.__originalRect(e,i,r,s)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(s,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),Bh(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask,i=this.suspendedCtx;this.composeSMask(i,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(e,t,i,r){const s=r[0],n=r[1],a=r[2]-s,o=r[3]-n;0!==a&&0!==o&&(this.genericComposeSMask(t.context,i,a,o,t.subtype,t.backdrop,t.transferMap,s,n,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(i.canvas,0,0),e.restore())}genericComposeSMask(e,t,i,r,s,n,a,o,l,h,c){let d=e.canvas,u=o-h,p=l-c;if(n){const t=al.makeHexColor(...n);if(u<0||p<0||u+i>d.width||p+r>d.height){const e=this.cachedCanvases.getCanvas("maskExtension",i,r),s=e.context;s.drawImage(d,-u,-p),s.globalCompositeOperation="destination-atop",s.fillStyle=t,s.fillRect(0,0,i,r),s.globalCompositeOperation="source-over",d=e.canvas,u=p=0}else{e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const s=new Path2D;s.rect(u,p,i,r),e.clip(s),e.globalCompositeOperation="destination-atop",e.fillStyle=t,e.fillRect(u,p,i,r),e.restore()}}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),"Alpha"===s&&a?t.filter=this.filterFactory.addAlphaFilter(a):"Luminosity"===s&&(t.filter=this.filterFactory.addLuminosityFilter(a));const m=new Path2D;m.rect(o,l,i,r),t.clip(m),t.globalCompositeOperation="destination-in",t.drawImage(d,u,p,i,r,o,l,i,r),t.restore()}save(){this.inSMaskMode?(Bh(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),Bh(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,i,r,s,n){this.ctx.transform(e,t,i,r,s,n),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,i){const r=this.ctx,s=this.current;let n,a,o=s.x,l=s.y;const h=Ml(r),c=0===h[0]&&0===h[3]||0===h[1]&&0===h[2],d=c?i.slice(0):null;for(let i=0,u=0,p=e.length;i<p;i++)switch(0|e[i]){case Fo.rectangle:o=t[u++],l=t[u++];const e=t[u++],i=t[u++],p=o+e,m=l+i;r.moveTo(o,l),0===e||0===i?r.lineTo(p,m):(r.lineTo(p,l),r.lineTo(p,m),r.lineTo(o,m)),c||s.updateRectMinMax(h,[o,l,p,m]),r.closePath();break;case Fo.moveTo:o=t[u++],l=t[u++],r.moveTo(o,l),c||s.updatePathMinMax(h,o,l);break;case Fo.lineTo:o=t[u++],l=t[u++],r.lineTo(o,l),c||s.updatePathMinMax(h,o,l);break;case Fo.curveTo:n=o,a=l,o=t[u+4],l=t[u+5],r.bezierCurveTo(t[u],t[u+1],t[u+2],t[u+3],o,l),s.updateCurvePathMinMax(h,n,a,t[u],t[u+1],t[u+2],t[u+3],o,l,d),u+=6;break;case Fo.curveTo2:n=o,a=l,r.bezierCurveTo(o,l,t[u],t[u+1],t[u+2],t[u+3]),s.updateCurvePathMinMax(h,n,a,o,l,t[u],t[u+1],t[u+2],t[u+3],d),o=t[u+2],l=t[u+3],u+=4;break;case Fo.curveTo3:n=o,a=l,o=t[u+2],l=t[u+3],r.bezierCurveTo(t[u],t[u+1],o,l,o,l),s.updateCurvePathMinMax(h,n,a,t[u],t[u+1],o,l,o,l,d),u+=4;break;case Fo.closePath:r.closePath()}c&&s.updateScalingPathMinMax(h,d),s.setCurrentPoint(o,l)}closePath(){this.ctx.closePath()}stroke(e=!0){const t=this.ctx,i=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof i&&i?.getPattern?(t.save(),t.strokeStyle=i.getPattern(t,this,_l(t),wh),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){const t=this.ctx,i=this.current.fillColor;let r=!1;this.current.patternFill&&(t.save(),t.fillStyle=i.getPattern(t,this,_l(t),yh),r=!0);const s=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==s&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),r&&t.restore(),e&&this.consumePath(s)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=Uh}eoClip(){this.pendingClip=Gh}beginText(){this.current.textMatrix=Va,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(void 0===e)return void t.beginPath();const i=new Path2D,r=t.getTransform().invertSelf();for(const{transform:t,x:s,y:n,fontSize:a,path:o}of e)i.addPath(o,new DOMMatrix(t).preMultiplySelf(r).translate(s,n).scale(a,-a));t.clip(i),t.beginPath(),delete this.pendingTextPaths}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){const i=this.commonObjs.get(e),r=this.current;if(!i)throw new Error(`Can't find font for ${e}`);if(r.fontMatrix=i.fontMatrix||Ua,0!==r.fontMatrix[0]&&0!==r.fontMatrix[3]||jo("Invalid font matrix for font "+e),t<0?(t=-t,r.fontDirection=-1):r.fontDirection=1,this.current.font=i,this.current.fontSize=t,i.isType3Font)return;const s=i.loadedName||"sans-serif",n=i.systemFontInfo?.css||`"${s}", ${i.fallbackName}`;let a="normal";i.black?a="900":i.bold&&(a="bold");const o=i.italic?"italic":"normal";let l=t;t<16?l=16:t>100&&(l=100),this.current.fontSizeScale=t/l,this.ctx.font=`${o} ${a} ${l}px ${n}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,i,r,s,n){this.current.textMatrix=[e,t,i,r,s,n],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}#di(e,t,i){const r=new Path2D;return r.addPath(e,new DOMMatrix(i).invertSelf().multiplySelf(t)),r}paintChar(e,t,i,r,s){const n=this.ctx,a=this.current,o=a.font,l=a.textRenderingMode,h=a.fontSize/a.fontSizeScale,c=l&lo,d=!!(l&ho),u=a.patternFill&&!o.missingFile,p=a.patternStroke&&!o.missingFile;let m;if((o.disableFontFace||d||u||p)&&(m=o.getPathGenerator(this.commonObjs,e)),o.disableFontFace||u||p){if(n.save(),n.translate(t,i),n.scale(h,-h),c===so||c===ao)if(r){const e=n.getTransform();n.setTransform(...r),n.fill(this.#di(m,e,r))}else n.fill(m);if(c===no||c===ao)if(s){const e=n.getTransform();n.setTransform(...s),n.stroke(this.#di(m,e,s))}else n.lineWidth/=h,n.stroke(m);n.restore()}else c!==so&&c!==ao||n.fillText(e,t,i),c!==no&&c!==ao||n.strokeText(e,t,i);if(d){(this.pendingTextPaths||=[]).push({transform:Ml(n),x:t,y:i,fontSize:h,path:m})}}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let i=!1;for(let e=3;e<t.length;e+=4)if(t[e]>0&&t[e]<255){i=!0;break}return $o(this,"isFontSubpixelAAEnabled",i)}showText(e){const t=this.current,i=t.font;if(i.isType3Font)return this.showType3Text(e);const r=t.fontSize;if(0===r)return;const s=this.ctx,n=t.fontSizeScale,a=t.charSpacing,o=t.wordSpacing,l=t.fontDirection,h=t.textHScale*l,c=e.length,d=i.vertical,u=d?1:-1,p=i.defaultVMetrics,m=r*t.fontMatrix[0],g=t.textRenderingMode===so&&!i.disableFontFace&&!t.patternFill;let f,b;if(s.save(),s.transform(...t.textMatrix),s.translate(t.x,t.y+t.textRise),l>0?s.scale(h,-1):s.scale(h,1),t.patternFill){s.save();const e=t.fillColor.getPattern(s,this,_l(s),yh);f=Ml(s),s.restore(),s.fillStyle=e}if(t.patternStroke){s.save();const e=t.strokeColor.getPattern(s,this,_l(s),wh);b=Ml(s),s.restore(),s.strokeStyle=e}let v=t.lineWidth;const y=t.textMatrixScale;if(0===y||0===v){const e=t.textRenderingMode&lo;e!==no&&e!==ao||(v=this.getSinglePixelWidth())}else v/=y;if(1!==n&&(s.scale(n,n),v/=n),s.lineWidth=v,i.isInvalidPDFjsFont){const i=[];let r=0;for(const t of e)i.push(t.unicode),r+=t.width;return s.fillText(i.join(""),0,0),t.x+=r*m*h,s.restore(),void this.compose()}let w,x=0;for(w=0;w<c;++w){const t=e[w];if("number"==typeof t){x+=u*t*r/1e3;continue}let h=!1;const c=(t.isSpace?o:0)+a,v=t.fontChar,y=t.accent;let A,k,E=t.width;if(d){const e=t.vmetric||p,i=-(t.vmetric?e[1]:.5*E)*m,r=e[2]*m;E=e?-e[0]:E,A=i/n,k=(x+r)/n}else A=x/n,k=0;if(i.remeasure&&E>0){const e=1e3*s.measureText(v).width/r*n;if(E<e&&this.isFontSubpixelAAEnabled){const t=E/e;h=!0,s.save(),s.scale(t,1),A/=t}else E!==e&&(A+=(E-e)/2e3*r/n)}if(this.contentVisible&&(t.isInFont||i.missingFile))if(g&&!y)s.fillText(v,A,k);else if(this.paintChar(v,A,k,f,b),y){const e=A+r*y.offset.x/n,t=k-r*y.offset.y/n;this.paintChar(y.fontChar,e,t,f,b)}x+=d?E*m-c*l:E*m+c*l,h&&s.restore()}d?t.y-=x:t.x+=x*h,s.restore(),this.compose()}showType3Text(e){const t=this.ctx,i=this.current,r=i.font,s=i.fontSize,n=i.fontDirection,a=r.vertical?1:-1,o=i.charSpacing,l=i.wordSpacing,h=i.textHScale*n,c=i.fontMatrix||Ua,d=e.length;let u,p,m,g;if(!(i.textRenderingMode===oo)&&0!==s){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...i.textMatrix),t.translate(i.x,i.y),t.scale(h,n),u=0;u<d;++u){if(p=e[u],"number"==typeof p){g=a*p*s/1e3,this.ctx.translate(g,0),i.x+=g*h;continue}const n=(p.isSpace?l:0)+o,d=r.charProcOperatorList[p.operatorListId];if(!d){jo(`Type3 character "${p.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=p,this.save(),t.scale(s,s),t.transform(...c),this.executeOperatorList(d),this.restore());m=al.applyTransform([p.width,0],c)[0]*s+n,t.translate(m,0),i.x+=m*h}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,i,r,s,n){this.ctx.rect(i,r,s-i,n-r),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if("TilingPattern"===e[0]){const i=e[1],r=this.baseTransform||Ml(this.ctx),s={createCanvasGraphics:e=>new $h(e,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};t=new Ih(e,i,this.ctx,s,r)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,i){this.ctx.strokeStyle=this.current.strokeColor=al.makeHexColor(e,t,i),this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(e,t,i){this.ctx.fillStyle=this.current.fillColor=al.makeHexColor(e,t,i),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e,t=null){let i;return this.cachedPatterns.has(e)?i=this.cachedPatterns.get(e):(i=function(e){switch(e[0]){case"RadialAxial":return new Eh(e);case"Mesh":return new Mh(e);case"Dummy":return new _h}throw new Error(`Unknown IR type: ${e[0]}`)}(this.getObject(e)),this.cachedPatterns.set(e,i)),t&&(i.matrix=t),i}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const i=this._getPattern(e);t.fillStyle=i.getPattern(t,this,_l(t),xh);const r=_l(t);if(r){const{width:e,height:i}=t.canvas,[s,n,a,o]=al.getAxialAlignedBoundingBox([0,0,e,i],r);this.ctx.fillRect(s,n,a-s,o-n)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){Vo("Should not call beginInlineImage")}beginImageData(){Vo("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=Ml(this.ctx),t)){const e=t[2]-t[0],i=t[3]-t[1];this.ctx.rect(t[0],t[1],e,i),this.current.updateRectMinMax(Ml(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||qo("TODO: Support non-isolated groups."),e.knockout&&jo("Knockout groups not supported.");const i=Ml(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let r=al.getAxialAlignedBoundingBox(e.bbox,Ml(t));const s=[0,0,t.canvas.width,t.canvas.height];r=al.intersect(r,s)||[0,0,0,0];const n=Math.floor(r[0]),a=Math.floor(r[1]),o=Math.max(Math.ceil(r[2])-n,1),l=Math.max(Math.ceil(r[3])-a,1);this.current.startNewPathAndClipBox([0,0,o,l]);let h="groupAt"+this.groupLevel;e.smask&&(h+="_smask_"+this.smaskCounter++%2);const c=this.cachedCanvases.getCanvas(h,o,l),d=c.context;d.translate(-n,-a),d.transform(...i),e.smask?this.smaskStack.push({canvas:c.canvas,context:d,offsetX:n,offsetY:a,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(n,a),t.save()),Bh(t,d),this.ctx=d,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,i=this.groupStack.pop();if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const e=Ml(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);const i=al.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(i)}}beginAnnotation(e,t,i,r,s){if(this.#hi(),Hh(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){const r=t[2]-t[0],n=t[3]-t[1];if(s&&this.annotationCanvasMap){(i=i.slice())[4]-=t[0],i[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=r,t[3]=n;const[s,a]=al.singularValueDecompose2dScale(Ml(this.ctx)),{viewportScale:o}=this,l=Math.ceil(r*this.outputScaleX*o),h=Math.ceil(n*this.outputScaleY*o);this.annotationCanvas=this.canvasFactory.create(l,h);const{canvas:c,context:d}=this.annotationCanvas;this.annotationCanvasMap.set(e,c),this.annotationCanvas.savedCtx=this.ctx,this.ctx=d,this.ctx.save(),this.ctx.setTransform(s,0,0,-a,0,n*a),Hh(this.ctx)}else Hh(this.ctx),this.endPath(),this.ctx.rect(t[0],t[1],r,n),this.ctx.clip(),this.ctx.beginPath()}this.current=new Fh(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...i),this.transform(...r)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#ci(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const i=this.ctx,r=this.processingType3;if(r&&(void 0===r.compiled&&(r.compiled=function(e){const{width:t,height:i}=e;if(t>1e3||i>1e3)return null;const r=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),s=t+1;let n,a,o,l=new Uint8Array(s*(i+1));const h=t+7&-8;let c=new Uint8Array(h*i),d=0;for(const t of e.data){let e=128;for(;e>0;)c[d++]=t&e?0:255,e>>=1}let u=0;for(d=0,0!==c[d]&&(l[0]=1,++u),a=1;a<t;a++)c[d]!==c[d+1]&&(l[a]=c[d]?2:1,++u),d++;for(0!==c[d]&&(l[a]=2,++u),n=1;n<i;n++){d=n*h,o=n*s,c[d-h]!==c[d]&&(l[o]=c[d]?1:8,++u);let e=(c[d]?4:0)+(c[d-h]?8:0);for(a=1;a<t;a++)e=(e>>2)+(c[d+1]?4:0)+(c[d-h+1]?8:0),r[e]&&(l[o+a]=r[e],++u),d++;if(c[d-h]!==c[d]&&(l[o+a]=c[d]?2:4,++u),u>1e3)return null}for(d=h*(i-1),o=n*s,0!==c[d]&&(l[o]=8,++u),a=1;a<t;a++)c[d]!==c[d+1]&&(l[o+a]=c[d]?4:8,++u),d++;if(0!==c[d]&&(l[o+a]=4,++u),u>1e3)return null;const p=new Int32Array([0,s,-1,0,-s,0,0,0,1]),m=new Path2D;for(n=0;u&&n<=i;n++){let e=n*s;const i=e+t;for(;e<i&&!l[e];)e++;if(e===i)continue;m.moveTo(e%s,n);const r=e;let a=l[e];do{const t=p[a];do{e+=t}while(!l[e]);const i=l[e];5!==i&&10!==i?(a=i,l[e]=0):(a=i&51*a>>4,l[e]&=a>>2|a<<2),m.lineTo(e%s,e/s|0),l[e]||--u}while(r!==e);--n}return c=null,l=null,function(e){e.save(),e.scale(1/t,-1/i),e.translate(0,-i),e.fill(m),e.beginPath(),e.restore()}}(e)),r.compiled))return void r.compiled(i);const s=this._createMaskCanvas(e),n=s.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(n,s.offsetX,s.offsetY),i.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,i=0,r=0,s,n){if(!this.contentVisible)return;e=this.getObject(e.data,e);const a=this.ctx;a.save();const o=Ml(a);a.transform(t,i,r,s,0,0);const l=this._createMaskCanvas(e);a.setTransform(1,0,0,1,l.offsetX-o[4],l.offsetY-o[5]);for(let e=0,h=n.length;e<h;e+=2){const h=al.transform(o,[t,i,r,s,n[e],n[e+1]]),[c,d]=al.applyTransform([0,0],h);a.drawImage(l.canvas,c,d)}a.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,i=this.current.fillColor,r=this.current.patternFill;for(const s of e){const{data:e,width:n,height:a,transform:o}=s,l=this.cachedCanvases.getCanvas("maskCanvas",n,a),h=l.context;h.save();Oh(h,this.getObject(e,s)),h.globalCompositeOperation="source-in",h.fillStyle=r?i.getPattern(h,this,_l(t),yh):i,h.fillRect(0,0,n,a),h.restore(),t.save(),t.transform(...o),t.scale(1,-1),Dh(t,l.canvas,0,0,n,a,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):jo("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,i,r){if(!this.contentVisible)return;const s=this.getObject(e);if(!s)return void jo("Dependent image isn't ready yet");const n=s.width,a=s.height,o=[];for(let e=0,s=r.length;e<s;e+=2)o.push({transform:[t,0,0,i,r[e],r[e+1]],x:0,y:0,w:n,h:a});this.paintInlineImageXObjectGroup(s,o)}applyTransferMapsToCanvas(e){return"none"!==this.current.transferMaps&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if("none"===this.current.transferMaps)return e.bitmap;const{bitmap:t,width:i,height:r}=e,s=this.cachedCanvases.getCanvas("inlineImage",i,r),n=s.context;return n.filter=this.current.transferMaps,n.drawImage(t,0,0),n.filter="none",s.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,i=e.height,r=this.ctx;if(this.save(),!ja){const{filter:e}=r;"none"!==e&&""!==e&&(r.filter="none")}let s;if(r.scale(1/t,-1/i),e.bitmap)s=this.applyTransferMapsToBitmap(e);else if("function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)s=e;else{const r=this.cachedCanvases.getCanvas("inlineImage",t,i).context;zh(r,e),s=this.applyTransferMapsToCanvas(r)}const n=this._scaleImage(s,_l(r));r.imageSmoothingEnabled=qh(Ml(r),e.interpolate),Dh(r,n.img,0,0,n.paintWidth,n.paintHeight,0,-i,t,i),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const i=this.ctx;let r;if(e.bitmap)r=e.bitmap;else{const t=e.width,i=e.height,s=this.cachedCanvases.getCanvas("inlineImage",t,i).context;zh(s,e),r=this.applyTransferMapsToCanvas(s)}for(const e of t)i.save(),i.transform(...e.transform),i.scale(1,-1),Dh(i,r,e.x,e.y,e.w,e.h,0,-1,1,1),i.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const i=this.ctx;this.pendingClip&&(t||(this.pendingClip===Gh?i.clip("evenodd"):i.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),i.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=Ml(this.ctx);if(0===e[1]&&0===e[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),i=Math.hypot(e[0],e[2]),r=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(i,r)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){const{lineWidth:e}=this.current,{a:t,b:i,c:r,d:s}=this.ctx.getTransform();let n,a;if(0===i&&0===r){const i=Math.abs(t),r=Math.abs(s);if(i===r)if(0===e)n=a=1/i;else{const t=i*e;n=a=t<1?1/t:1}else if(0===e)n=1/i,a=1/r;else{const t=i*e,s=r*e;n=t<1?1/t:1,a=s<1?1/s:1}}else{const o=Math.abs(t*s-i*r),l=Math.hypot(t,i),h=Math.hypot(r,s);if(0===e)n=h/o,a=l/o;else{const t=e*o;n=h>t?h/t:1,a=l>t?l/t:1}}this._cachedScaleForStroking[0]=n,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:i}=this.current,[r,s]=this.getScaleForStroking();if(t.lineWidth=i||1,1===r&&1===s)return void t.stroke();const n=t.getLineDash();if(e&&t.save(),t.scale(r,s),n.length>0){const e=Math.max(r,s);t.setLineDash(n.map((t=>t/e))),t.lineDashOffset/=e}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}for(const e in Fo)void 0!==$h.prototype[e]&&($h.prototype[Fo[e]]=$h.prototype[e]);class Wh{static#ui=null;static#pi="";static get workerPort(){return this.#ui}static set workerPort(e){if(!("undefined"!=typeof Worker&&e instanceof Worker)&&null!==e)throw new Error("Invalid `workerPort` type.");this.#ui=e}static get workerSrc(){return this.#pi}static set workerSrc(e){if("string"!=typeof e)throw new Error("Invalid `workerSrc` type.");this.#pi=e}}class Xh{#mi;#gi;constructor({parsedData:e,rawData:t}){this.#mi=e,this.#gi=t}getRaw(){return this.#gi}get(e){return this.#mi.get(e)??null}getAll(){return rl(this.#mi)}has(e){return this.#mi.has(e)}}const Yh=Symbol("INTERNAL");class Kh{#fi=!1;#bi=!1;#vi=!1;#yi=!0;constructor(e,{name:t,intent:i,usage:r,rbGroups:s}){this.#fi=!!(e&Wa),this.#bi=!!(e&Xa),this.name=t,this.intent=i,this.usage=r,this.rbGroups=s}get visible(){if(this.#vi)return this.#yi;if(!this.#yi)return!1;const{print:e,view:t}=this.usage;return this.#fi?"OFF"!==t?.viewState:!this.#bi||"OFF"!==e?.printState}_setVisible(e,t,i=!1){e!==Yh&&Vo("Internal method `_setVisible` called."),this.#vi=i,this.#yi=t}}class Zh{#wi=null;#xi=new Map;#Ai=null;#ki=null;constructor(e,t=Wa){if(this.renderingIntent=t,this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,this.#ki=e.order;for(const i of e.groups)this.#xi.set(i.id,new Kh(t,i));if("OFF"===e.baseState)for(const e of this.#xi.values())e._setVisible(Yh,!1);for(const t of e.on)this.#xi.get(t)._setVisible(Yh,!0);for(const t of e.off)this.#xi.get(t)._setVisible(Yh,!1);this.#Ai=this.getHash()}}#Ei(e){const t=e.length;if(t<2)return!0;const i=e[0];for(let r=1;r<t;r++){const t=e[r];let s;if(Array.isArray(t))s=this.#Ei(t);else{if(!this.#xi.has(t))return jo(`Optional content group not found: ${t}`),!0;s=this.#xi.get(t).visible}switch(i){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return"And"===i}isVisible(e){if(0===this.#xi.size)return!0;if(!e)return qo("Optional content group not defined."),!0;if("OCG"===e.type)return this.#xi.has(e.id)?this.#xi.get(e.id).visible:(jo(`Optional content group not found: ${e.id}`),!0);if("OCMD"===e.type){if(e.expression)return this.#Ei(e.expression);if(!e.policy||"AnyOn"===e.policy){for(const t of e.ids){if(!this.#xi.has(t))return jo(`Optional content group not found: ${t}`),!0;if(this.#xi.get(t).visible)return!0}return!1}if("AllOn"===e.policy){for(const t of e.ids){if(!this.#xi.has(t))return jo(`Optional content group not found: ${t}`),!0;if(!this.#xi.get(t).visible)return!1}return!0}if("AnyOff"===e.policy){for(const t of e.ids){if(!this.#xi.has(t))return jo(`Optional content group not found: ${t}`),!0;if(!this.#xi.get(t).visible)return!0}return!1}if("AllOff"===e.policy){for(const t of e.ids){if(!this.#xi.has(t))return jo(`Optional content group not found: ${t}`),!0;if(this.#xi.get(t).visible)return!1}return!0}return jo(`Unknown optional content policy ${e.policy}.`),!0}return jo(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0,i=!0){const r=this.#xi.get(e);if(r){if(i&&t&&r.rbGroups.length)for(const t of r.rbGroups)for(const i of t)i!==e&&this.#xi.get(i)?._setVisible(Yh,!1,!0);r._setVisible(Yh,!!t,!0),this.#wi=null}else jo(`Optional content group not found: ${e}`)}setOCGState({state:e,preserveRB:t}){let i;for(const r of e){switch(r){case"ON":case"OFF":case"Toggle":i=r;continue}const e=this.#xi.get(r);if(e)switch(i){case"ON":this.setVisibility(r,!0,t);break;case"OFF":this.setVisibility(r,!1,t);break;case"Toggle":this.setVisibility(r,!e.visible,t)}}this.#wi=null}get hasInitialVisibility(){return null===this.#Ai||this.getHash()===this.#Ai}getOrder(){return this.#xi.size?this.#ki?this.#ki.slice():[...this.#xi.keys()]:null}getGroups(){return this.#xi.size>0?rl(this.#xi):null}getGroup(e){return this.#xi.get(e)||null}getHash(){if(null!==this.#wi)return this.#wi;const e=new Wl;for(const[t,i]of this.#xi)e.update(`${t}:${i.visible}`);return this.#wi=e.hexdigest()}}class Jh{constructor(e,{disableRange:t=!1,disableStream:i=!1}){Uo(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:r,initialData:s,progressiveDone:n,contentDispositionFilename:a}=e;if(this._queuedChunks=[],this._progressiveDone=n,this._contentDispositionFilename=a,s?.length>0){const e=s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength?s.buffer:new Uint8Array(s).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!i,this._isRangeSupported=!t,this._contentLength=r,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),e.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),e.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),e.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),e.transportReady()}_onReceiveData({begin:e,chunk:t}){const i=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;if(void 0===e)this._fullRequestReader?this._fullRequestReader._enqueue(i):this._queuedChunks.push(i);else{Uo(this._rangeReaders.some((function(t){return t._begin===e&&(t._enqueue(i),!0)})),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){void 0===e.total?this._rangeReaders[0]?.onProgress?.({loaded:e.loaded}):this._fullRequestReader?.onProgress?.({loaded:e.loaded,total:e.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){Uo(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new Qh(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const i=new ec(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(i),i}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeReaders.slice(0))t.cancel(e);this._pdfDataRangeTransport.abort()}}class Qh{constructor(e,t,i=!1,r=null){this._stream=e,this._done=i||!1,this._filename=bl(r)?r:null,this._queuedChunks=t||[],this._loaded=0;for(const e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length>0){this._requests.shift().resolve({value:e,done:!1})}else this._queuedChunks.push(e);this._loaded+=e.byteLength}}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0){return{value:this._queuedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class ec{constructor(e,t,i){this._stream=e,this._begin=t,this._end=i,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function tc(e,t){const i=new Headers;if(!e||!t||"object"!=typeof t)return i;for(const e in t){const r=t[e];void 0!==r&&i.append(e,r)}return i}function ic(e){try{return new URL(e).origin}catch{}return null}function rc({responseHeaders:e,isHttp:t,rangeChunkSize:i,disableRange:r}){const s={allowRangeRequests:!1,suggestedLength:void 0},n=parseInt(e.get("Content-Length"),10);if(!Number.isInteger(n))return s;if(s.suggestedLength=n,n<=2*i)return s;if(r||!t)return s;if("bytes"!==e.get("Accept-Ranges"))return s;return"identity"!==(e.get("Content-Encoding")||"identity")||(s.allowRangeRequests=!0),s}function sc(e){const t=e.get("Content-Disposition");if(t){let e=function(e){let t=!0,i=r("filename\\*","i").exec(e);if(i){i=i[1];let e=a(i);return e=unescape(e),e=o(e),e=l(e),n(e)}if(i=function(e){const t=[];let i;const s=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(i=s.exec(e));){let[,e,r,s]=i;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[r,s]}const n=[];for(let e=0;e<t.length&&e in t;++e){let[i,r]=t[e];r=a(r),i&&(r=unescape(r),0===e&&(r=o(r))),n.push(r)}return n.join("")}(e),i)return n(l(i));if(i=r("filename","i").exec(e),i){i=i[1];let e=a(i);return e=l(e),n(e)}function r(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function s(e,i){if(e){if(!/^[\x00-\xFF]+$/.test(i))return i;try{const r=new TextDecoder(e,{fatal:!0}),s=il(i);i=r.decode(s),t=!1}catch{}}return i}function n(e){return t&&/[\x80-\xff]/.test(e)&&(e=s("utf-8",e),t&&(e=s("iso-8859-1",e))),e}function a(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){const i=t[e].indexOf('"');-1!==i&&(t[e]=t[e].slice(0,i),t.length=e+1),t[e]=t[e].replaceAll(/\\(.)/g,"$1")}e=t.join('"')}return e}function o(e){const t=e.indexOf("'");return-1===t?e:s(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function l(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,i,r){if("q"===i||"Q"===i)return s(t,r=(r=r.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{r=atob(r)}catch{}return s(t,r)}))}return""}(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if(bl(e))return e}return null}function nc(e,t){return 404===e||0===e&&t.startsWith("file:")?new Zo('Missing PDF "'+t+'".'):new Jo(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)}function ac(e){return 200===e||206===e}function oc(e,t,i){return{method:"GET",headers:e,signal:i.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function lc(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:(jo(`getArrayBuffer - unexpected data format: ${e}`),new Uint8Array(e).buffer)}class hc{_responseOrigin=null;constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.headers=tc(this.isHttp,e.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Uo(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new cc(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const i=new dc(this,e,t);return this._rangeRequestReaders.push(i),i}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}class cc{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange;const i=new Headers(e.headers),r=t.url;fetch(r,oc(i,this._withCredentials,this._abortController)).then((t=>{if(e._responseOrigin=ic(t.url),!ac(t.status))throw nc(t.status,r);this._reader=t.body.getReader(),this._headersCapability.resolve();const i=t.headers,{allowRangeRequests:s,suggestedLength:n}=rc({responseHeaders:i,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=n||this._contentLength,this._filename=sc(i),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new el("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:lc(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}class dc{constructor(e,t,i){this._stream=e,this._reader=null,this._loaded=0;const r=e.source;this._withCredentials=r.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!r.disableStream,this._abortController=new AbortController;const s=new Headers(e.headers);s.append("Range",`bytes=${t}-${i-1}`);const n=r.url;fetch(n,oc(s,this._withCredentials,this._abortController)).then((t=>{const i=ic(t.url);if(i!==e._responseOrigin)throw new Error(`Expected range response-origin "${i}" to match "${e._responseOrigin}".`);if(!ac(t.status))throw nc(t.status,n);this._readCapability.resolve(),this._reader=t.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded}),{value:lc(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}class uc{_responseOrigin=null;constructor({url:e,httpHeaders:t,withCredentials:i}){this.url=e,this.isHttp=/^https?:/i.test(e),this.headers=tc(this.isHttp,t),this.withCredentials=i||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(e){const t=new XMLHttpRequest,i=this.currXhrId++,r=this.pendingRequests[i]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const[e,i]of this.headers)t.setRequestHeader(e,i);return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),r.expectedStatus=206):r.expectedStatus=200,t.responseType="arraybuffer",Uo(e.onError,"Expected `onError` callback to be provided."),t.onerror=()=>{e.onError(t.status)},t.onreadystatechange=this.onStateChange.bind(this,i),t.onprogress=this.onProgress.bind(this,i),r.onHeadersReceived=e.onHeadersReceived,r.onDone=e.onDone,r.onError=e.onError,r.onProgress=e.onProgress,t.send(null),i}onProgress(e,t){const i=this.pendingRequests[e];i&&i.onProgress?.(t)}onStateChange(e,t){const i=this.pendingRequests[e];if(!i)return;const r=i.xhr;if(r.readyState>=2&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),4!==r.readyState)return;if(!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===r.status&&this.isHttp)return void i.onError(r.status);const s=r.status||200;if(!(200===s&&206===i.expectedStatus)&&s!==i.expectedStatus)return void i.onError(r.status);const n=function(e){const t=e.response;return"string"!=typeof t?t:il(t).buffer}(r);if(206===s){const e=r.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);t?i.onDone({begin:parseInt(t[1],10),chunk:n}):(jo('Missing or invalid "Content-Range" header.'),i.onError(0))}else n?i.onDone({begin:0,chunk:n}):i.onError(r.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class pc{constructor(e){this._source=e,this._manager=new uc(e),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return Uo(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new mc(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const i=new gc(this._manager,e,t);return i.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(i),i}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}class mc{constructor(e,t){this._manager=e,this._url=t.url,this._fullRequestId=e.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e);this._manager._responseOrigin=ic(t.responseURL);const i=t.getAllResponseHeaders(),r=new Headers(i?i.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map((e=>{const[t,...i]=e.split(": ");return[t,i.join(": ")]})):[]),{allowRangeRequests:s,suggestedLength:n}=rc({responseHeaders:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});s&&(this._isRangeSupported=!0),this._contentLength=n||this._contentLength,this._filename=sc(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersCapability.resolve()}_onDone(e){if(e)if(this._requests.length>0){this._requests.shift().resolve({value:e.chunk,done:!1})}else this._cachedChunks.push(e.chunk);if(this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=nc(e,this._url),this._headersCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0){return{value:this._cachedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersCapability.reject(e);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class gc{constructor(e,t,i){this._manager=e,this._url=e.url,this._requestId=e.request({begin:t,end:i,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){const e=ic(this._manager.getRequestXhr(this._requestId)?.responseURL);e!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${e}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(e){const t=e.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunk=t;this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError??=nc(e,this._url);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){this.isStreamingSupported||this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const fc=/^[a-z][a-z0-9\-+.]+:/i;class bc{constructor(e){this.source=e,this.url=function(e){if(fc.test(e))return new URL(e);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(e))}(e.url),Uo("file:"===this.url.protocol,"PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Uo(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new vc(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const i=new yc(this,e,t);return this._rangeRequestReaders.push(i),i}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}class vc{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const i=process.getBuiltinModule("fs");i.promises.lstat(this._url).then((e=>{this._contentLength=e.size,this._setReadableStream(i.createReadStream(this._url)),this._headersCapability.resolve()}),(e=>{"ENOENT"===e.code&&(e=new Zo(`Missing PDF "${this._url}".`)),this._storedError=e,this._headersCapability.reject(e)}))}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();if(null===e)return this._readCapability=Promise.withResolvers(),this.read();this._loaded+=e.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength});return{value:new Uint8Array(e).buffer,done:!1}}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new el("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class yc{constructor(e,t,i){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const r=e.source;this._isStreamingSupported=!r.disableStream;const s=process.getBuiltinModule("fs");this._setReadableStream(s.createReadStream(this._url,{start:t,end:i-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();if(null===e)return this._readCapability=Promise.withResolvers(),this.read();this._loaded+=e.length,this.onProgress?.({loaded:this._loaded});return{value:new Uint8Array(e).buffer,done:!1}}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}const wc=30;class xc{#Si=Promise.withResolvers();#pe=null;#Ci=!1;#Mi=!!globalThis.FontInspector?.enabled;#_i=null;#Ti=null;#Ni=0;#Ii=0;#Li=null;#Pi=null;#Ri=0;#Di=0;#Fi=Object.create(null);#zi=[];#Oi=null;#Bi=[];#Hi=new WeakMap;#qi=null;static#ji=new Map;static#Vi=new Map;static#Ui=new WeakMap;static#Gi=null;static#$i=new Set;constructor({textContentSource:e,container:t,viewport:i}){if(e instanceof ReadableStream)this.#Oi=e;else{if("object"!=typeof e)throw new Error('No "textContentSource" parameter specified.');this.#Oi=new ReadableStream({start(t){t.enqueue(e),t.close()}})}this.#pe=this.#Pi=t,this.#Di=i.scale*(globalThis.devicePixelRatio||1),this.#Ri=i.rotation,this.#Ti={div:null,properties:null,ctx:null};const{pageWidth:r,pageHeight:s,pageX:n,pageY:a}=i.rawDims;this.#qi=[1,0,0,-1,-n,a+s],this.#Ii=r,this.#Ni=s,xc.#Wi(),Tl(t,i),this.#Si.promise.finally((()=>{xc.#$i.delete(this),this.#Ti=null,this.#Fi=null})).catch((()=>{}))}static get fontFamilyMap(){const{isWindows:e,isFirefox:t}=sl.platform;return $o(this,"fontFamilyMap",new Map([["sans-serif",(e&&t?"Calibri, ":"")+"sans-serif"],["monospace",(e&&t?"Lucida Console, ":"")+"monospace"]]))}render(){const e=()=>{this.#Li.read().then((({value:t,done:i})=>{i?this.#Si.resolve():(this.#_i??=t.lang,Object.assign(this.#Fi,t.styles),this.#Xi(t.items),e())}),this.#Si.reject)};return this.#Li=this.#Oi.getReader(),xc.#$i.add(this),e(),this.#Si.promise}update({viewport:e,onBefore:t=null}){const i=e.scale*(globalThis.devicePixelRatio||1),r=e.rotation;if(r!==this.#Ri&&(t?.(),this.#Ri=r,Tl(this.#Pi,{rotation:r})),i!==this.#Di){t?.(),this.#Di=i;const e={div:null,properties:null,ctx:xc.#Yi(this.#_i)};for(const t of this.#Bi)e.properties=this.#Hi.get(t),e.div=t,this.#Ki(e)}}cancel(){const e=new el("TextLayer task cancelled.");this.#Li?.cancel(e).catch((()=>{})),this.#Li=null,this.#Si.reject(e)}get textDivs(){return this.#Bi}get textContentItemsStr(){return this.#zi}#Xi(e){if(this.#Ci)return;this.#Ti.ctx??=xc.#Yi(this.#_i);const t=this.#Bi,i=this.#zi;for(const r of e){if(t.length>1e5)return jo("Ignoring additional textDivs for performance reasons."),void(this.#Ci=!0);if(void 0!==r.str)i.push(r.str),this.#Zi(r);else if("beginMarkedContentProps"===r.type||"beginMarkedContent"===r.type){const e=this.#pe;this.#pe=document.createElement("span"),this.#pe.classList.add("markedContent"),null!==r.id&&this.#pe.setAttribute("id",`${r.id}`),e.append(this.#pe)}else"endMarkedContent"===r.type&&(this.#pe=this.#pe.parentNode)}}#Zi(e){const t=document.createElement("span"),i={angle:0,canvasWidth:0,hasText:""!==e.str,hasEOL:e.hasEOL,fontSize:0};this.#Bi.push(t);const r=al.transform(this.#qi,e.transform);let s=Math.atan2(r[1],r[0]);const n=this.#Fi[e.fontName];n.vertical&&(s+=Math.PI/2);let a=this.#Mi&&n.fontSubstitution||n.fontFamily;a=xc.fontFamilyMap.get(a)||a;const o=Math.hypot(r[2],r[3]),l=o*xc.#Ji(a,this.#_i);let h,c;0===s?(h=r[4],c=r[5]-l):(h=r[4]+l*Math.sin(s),c=r[5]-l*Math.cos(s));const d="calc(var(--scale-factor)*",u=t.style;this.#pe===this.#Pi?(u.left=`${(100*h/this.#Ii).toFixed(2)}%`,u.top=`${(100*c/this.#Ni).toFixed(2)}%`):(u.left=`${d}${h.toFixed(2)}px)`,u.top=`${d}${c.toFixed(2)}px)`),u.fontSize=`${d}${(xc.#Gi*o).toFixed(2)}px)`,u.fontFamily=a,i.fontSize=o,t.setAttribute("role","presentation"),t.textContent=e.str,t.dir=e.dir,this.#Mi&&(t.dataset.fontName=n.fontSubstitutionLoadedName||e.fontName),0!==s&&(i.angle=s*(180/Math.PI));let p=!1;if(e.str.length>1)p=!0;else if(" "!==e.str&&e.transform[0]!==e.transform[3]){const t=Math.abs(e.transform[0]),i=Math.abs(e.transform[3]);t!==i&&Math.max(t,i)/Math.min(t,i)>1.5&&(p=!0)}if(p&&(i.canvasWidth=n.vertical?e.height:e.width),this.#Hi.set(t,i),this.#Ti.div=t,this.#Ti.properties=i,this.#Ki(this.#Ti),i.hasText&&this.#pe.append(t),i.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation"),this.#pe.append(e)}}#Ki(e){const{div:t,properties:i,ctx:r}=e,{style:s}=t;let n="";if(xc.#Gi>1&&(n=`scale(${1/xc.#Gi})`),0!==i.canvasWidth&&i.hasText){const{fontFamily:e}=s,{canvasWidth:a,fontSize:o}=i;xc.#Qi(r,o*this.#Di,e);const{width:l}=r.measureText(t.textContent);l>0&&(n=`scaleX(${a*this.#Di/l}) ${n}`)}0!==i.angle&&(n=`rotate(${i.angle}deg) ${n}`),n.length>0&&(s.transform=n)}static cleanup(){if(!(this.#$i.size>0)){this.#ji.clear();for(const{canvas:e}of this.#Vi.values())e.remove();this.#Vi.clear()}}static#Yi(e=null){let t=this.#Vi.get(e||="");if(!t){const i=document.createElement("canvas");i.className="hiddenCanvasElement",i.lang=e,document.body.append(i),t=i.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#Vi.set(e,t),this.#Ui.set(t,{size:0,family:""})}return t}static#Qi(e,t,i){const r=this.#Ui.get(e);t===r.size&&i===r.family||(e.font=`${t}px ${i}`,r.size=t,r.family=i)}static#Wi(){if(null!==this.#Gi)return;const e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),this.#Gi=e.getBoundingClientRect().height,e.remove()}static#Ji(e,t){const i=this.#ji.get(e);if(i)return i;const r=this.#Yi(t);r.canvas.width=r.canvas.height=wc,this.#Qi(r,wc,e);const s=r.measureText("");let n=s.fontBoundingBoxAscent,a=Math.abs(s.fontBoundingBoxDescent);if(n){const t=n/(n+a);return this.#ji.set(e,t),r.canvas.width=r.canvas.height=0,t}r.strokeStyle="red",r.clearRect(0,0,wc,wc),r.strokeText("g",0,0);let o=r.getImageData(0,0,wc,wc).data;a=0;for(let e=o.length-1-3;e>=0;e-=4)if(o[e]>0){a=Math.ceil(e/4/wc);break}r.clearRect(0,0,wc,wc),r.strokeText("A",0,wc),o=r.getImageData(0,0,wc,wc).data,n=0;for(let e=0,t=o.length;e<t;e+=4)if(o[e]>0){n=wc-Math.floor(e/4/wc);break}r.canvas.width=r.canvas.height=0;const l=n?n/(n+a):.8;return this.#ji.set(e,l),l}}class Ac{static textContent(e){const t=[],i={items:t,styles:Object.create(null)};return function e(i){if(!i)return;let r=null;const s=i.name;if("#text"===s)r=i.value;else{if(!Ac.shouldBuildText(s))return;i?.attributes?.textContent?r=i.attributes.textContent:i.value&&(r=i.value)}if(null!==r&&t.push({str:r}),i.children)for(const t of i.children)e(t)}(e),i}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}const kc=65536,Ec=ja?class extends uh{_createCanvas(e,t){return process.getBuiltinModule("module").createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:r&&"SCRIPT"===r.tagName.toUpperCase()&&r.src||new URL("index.js",document.baseURI).href)("@napi-rs/canvas").createCanvas(e,t)}}:class extends uh{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){const i=this._document.createElement("canvas");return i.width=e,i.height=t,i}},Sc=ja?class extends ph{async _fetch(e){return vh(e)}}:mh,Cc=ja?class extends gh{}:class extends gh{#er;#tr;#ir;#rr;#sr;#nr;#y=0;constructor({docId:e,ownerDocument:t=globalThis.document}){super(),this.#rr=e,this.#sr=t}get#x(){return this.#tr||=new Map}get#ar(){return this.#nr||=new Map}get#or(){if(!this.#ir){const e=this.#sr.createElement("div"),{style:t}=e;t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1;const i=this.#sr.createElementNS(dl,"svg");i.setAttribute("width",0),i.setAttribute("height",0),this.#ir=this.#sr.createElementNS(dl,"defs"),e.append(i),i.append(this.#ir),this.#sr.body.append(e)}return this.#ir}#lr(e){if(1===e.length){const t=e[0],i=new Array(256);for(let e=0;e<256;e++)i[e]=t[e]/255;const r=i.join(",");return[r,r,r]}const[t,i,r]=e,s=new Array(256),n=new Array(256),a=new Array(256);for(let e=0;e<256;e++)s[e]=t[e]/255,n[e]=i[e]/255,a[e]=r[e]/255;return[s.join(","),n.join(","),a.join(",")]}#hr(e){if(void 0===this.#er){this.#er="";const e=this.#sr.URL;e!==this.#sr.baseURI&&(fl(e)?jo('#createUrl: ignore "data:"-URL for performance reasons.'):this.#er=e.split("#",1)[0])}return`url(${this.#er}#${e})`}addFilter(e){if(!e)return"none";let t=this.#x.get(e);if(t)return t;const[i,r,s]=this.#lr(e),n=1===e.length?i:`${i}${r}${s}`;if(t=this.#x.get(n),t)return this.#x.set(e,t),t;const a=`g_${this.#rr}_transfer_map_${this.#y++}`,o=this.#hr(a);this.#x.set(e,o),this.#x.set(n,o);const l=this.#cr(a);return this.#dr(i,r,s,l),o}addHCMFilter(e,t){const i=`${e}-${t}`,r="base";let s=this.#ar.get(r);if(s?.key===i)return s.url;if(s?(s.filter?.remove(),s.key=i,s.url="none",s.filter=null):(s={key:i,url:"none",filter:null},this.#ar.set(r,s)),!e||!t)return s.url;const n=this.#ur(e);e=al.makeHexColor(...n);const a=this.#ur(t);if(t=al.makeHexColor(...a),this.#or.style.color="","#000000"===e&&"#ffffff"===t||e===t)return s.url;const o=new Array(256);for(let e=0;e<=255;e++){const t=e/255;o[e]=t<=.03928?t/12.92:((t+.055)/1.055)**2.4}const l=o.join(","),h=`g_${this.#rr}_hcm_filter`,c=s.filter=this.#cr(h);this.#dr(l,l,l,c),this.#pr(c);const d=(e,t)=>{const i=n[e]/255,r=a[e]/255,s=new Array(t+1);for(let e=0;e<=t;e++)s[e]=i+e/t*(r-i);return s.join(",")};return this.#dr(d(0,5),d(1,5),d(2,5),c),s.url=this.#hr(h),s.url}addAlphaFilter(e){let t=this.#x.get(e);if(t)return t;const[i]=this.#lr([e]),r=`alpha_${i}`;if(t=this.#x.get(r),t)return this.#x.set(e,t),t;const s=`g_${this.#rr}_alpha_map_${this.#y++}`,n=this.#hr(s);this.#x.set(e,n),this.#x.set(r,n);const a=this.#cr(s);return this.#mr(i,a),n}addLuminosityFilter(e){let t,i,r=this.#x.get(e||"luminosity");if(r)return r;if(e?([t]=this.#lr([e]),i=`luminosity_${t}`):i="luminosity",r=this.#x.get(i),r)return this.#x.set(e,r),r;const s=`g_${this.#rr}_luminosity_map_${this.#y++}`,n=this.#hr(s);this.#x.set(e,n),this.#x.set(i,n);const a=this.#cr(s);return this.#gr(a),e&&this.#mr(t,a),n}addHighlightHCMFilter(e,t,i,r,s){const n=`${t}-${i}-${r}-${s}`;let a=this.#ar.get(e);if(a?.key===n)return a.url;if(a?(a.filter?.remove(),a.key=n,a.url="none",a.filter=null):(a={key:n,url:"none",filter:null},this.#ar.set(e,a)),!t||!i)return a.url;const[o,l]=[t,i].map(this.#ur.bind(this));let h=Math.round(.2126*o[0]+.7152*o[1]+.0722*o[2]),c=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),[d,u]=[r,s].map(this.#ur.bind(this));c<h&&([h,c,d,u]=[c,h,u,d]),this.#or.style.color="";const p=(e,t,i)=>{const r=new Array(256),s=(c-h)/i,n=e/255,a=(t-e)/(255*i);let o=0;for(let e=0;e<=i;e++){const t=Math.round(h+e*s),i=n+e*a;for(let e=o;e<=t;e++)r[e]=i;o=t+1}for(let e=o;e<256;e++)r[e]=r[o-1];return r.join(",")},m=`g_${this.#rr}_hcm_${e}_filter`,g=a.filter=this.#cr(m);return this.#pr(g),this.#dr(p(d[0],u[0],5),p(d[1],u[1],5),p(d[2],u[2],5),g),a.url=this.#hr(m),a.url}destroy(e=!1){e&&this.#nr?.size||(this.#ir?.parentNode.parentNode.remove(),this.#ir=null,this.#tr?.clear(),this.#tr=null,this.#nr?.clear(),this.#nr=null,this.#y=0)}#gr(e){const t=this.#sr.createElementNS(dl,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(t)}#pr(e){const t=this.#sr.createElementNS(dl,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(t)}#cr(e){const t=this.#sr.createElementNS(dl,"filter");return t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("id",e),this.#or.append(t),t}#fr(e,t,i){const r=this.#sr.createElementNS(dl,t);r.setAttribute("type","discrete"),r.setAttribute("tableValues",i),e.append(r)}#dr(e,t,i,r){const s=this.#sr.createElementNS(dl,"feComponentTransfer");r.append(s),this.#fr(s,"feFuncR",e),this.#fr(s,"feFuncG",t),this.#fr(s,"feFuncB",i)}#mr(e,t){const i=this.#sr.createElementNS(dl,"feComponentTransfer");t.append(i),this.#fr(i,"feFuncA",e)}#ur(e){return this.#or.style.color=e,Cl(getComputedStyle(this.#or).getPropertyValue("color"))}},Mc=ja?class extends fh{async _fetch(e){return vh(e)}}:bh;function _c(e={}){"string"==typeof e||e instanceof URL?e={url:e}:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e});const t=new Nc,{docId:i}=t,r=e.url?function(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch{if(ja&&"string"==typeof e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(e.url):null,s=e.data?function(e){if(ja&&"undefined"!=typeof Buffer&&e instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if("string"==typeof e)return il(e);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)||"object"==typeof e&&!isNaN(e?.length))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(e.data):null,n=e.httpHeaders||null,a=!0===e.withCredentials,o=e.password??null,l=e.range instanceof Ic?e.range:null,h=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:kc;let c=e.worker instanceof Dc?e.worker:null;const d=e.verbosity,u="string"!=typeof e.docBaseUrl||fl(e.docBaseUrl)?null:e.docBaseUrl,p="string"==typeof e.cMapUrl?e.cMapUrl:null,m=!1!==e.cMapPacked,g=e.CMapReaderFactory||Sc,f="string"==typeof e.standardFontDataUrl?e.standardFontDataUrl:null,b=e.StandardFontDataFactory||Mc,v=!0!==e.stopAtErrors,y=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,w=!1!==e.isEvalSupported,x="boolean"==typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!ja,A="boolean"==typeof e.isImageDecoderSupported?e.isImageDecoderSupported:!ja&&(sl.platform.isFirefox||!globalThis.chrome),k=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,E="boolean"==typeof e.disableFontFace?e.disableFontFace:ja,S=!0===e.fontExtraProperties,C=!0===e.enableXfa,M=e.ownerDocument||globalThis.document,_=!0===e.disableRange,T=!0===e.disableStream,N=!0===e.disableAutoFetch,I=!0===e.pdfBug,L=e.CanvasFactory||Ec,P=e.FilterFactory||Cc,R=!0===e.enableHWA,D=l?l.length:e.length??NaN,F="boolean"==typeof e.useSystemFonts?e.useSystemFonts:!ja&&!E,z="boolean"==typeof e.useWorkerFetch?e.useWorkerFetch:g===mh&&b===bh&&p&&f&&xl(p,document.baseURI)&&xl(f,document.baseURI);Bo(d);const O={canvasFactory:new L({ownerDocument:M,enableHWA:R}),filterFactory:new P({docId:i,ownerDocument:M}),cMapReaderFactory:z?null:new g({baseUrl:p,isCompressed:m}),standardFontDataFactory:z?null:new b({baseUrl:f})};if(!c){const e={verbosity:d,port:Wh.workerPort};c=e.port?Dc.fromPort(e):new Dc(e),t._worker=c}const B={docId:i,apiVersion:"4.10.38",data:s,password:o,disableAutoFetch:N,rangeChunkSize:h,length:D,docBaseUrl:u,enableXfa:C,evaluatorOptions:{maxImageSize:y,disableFontFace:E,ignoreErrors:v,isEvalSupported:w,isOffscreenCanvasSupported:x,isImageDecoderSupported:A,canvasMaxAreaInBytes:k,fontExtraProperties:S,useSystemFonts:F,cMapUrl:z?p:null,standardFontDataUrl:z?f:null}},H={disableFontFace:E,fontExtraProperties:S,ownerDocument:M,pdfBug:I,styleElement:null,loadingParams:{disableAutoFetch:N,enableXfa:C}};return c.promise.then((function(){if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const e=c.messageHandler.sendWithPromise("GetDocRequest",B,s?[s.buffer]:null);let o;if(l)o=new Jh(l,{disableRange:_,disableStream:T});else if(!s){if(!r)throw new Error("getDocument - no `url` parameter provided.");let e;if(ja)if(xl(r)){if("undefined"==typeof fetch||"undefined"==typeof Response||!("body"in Response.prototype))throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");e=hc}else e=bc;else e=xl(r)?hc:pc;o=new e({url:r,length:D,httpHeaders:n,withCredentials:a,rangeChunkSize:h,disableRange:_,disableStream:T})}return e.then((e=>{if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const r=new dh(i,e,c.port),s=new Fc(r,t,o,H,O);t._transport=s,r.send("Ready",null)}))})).catch(t._capability.reject),t}function Tc(e){return"object"==typeof e&&Number.isInteger(e?.num)&&e.num>=0&&Number.isInteger(e?.gen)&&e.gen>=0}class Nc{static#rr=0;constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d"+Nc.#rr++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await(this._transport?.destroy())}catch(e){throw this._worker?.port&&delete this._worker._pendingDestroy,e}this._transport=null,this._worker?.destroy(),this._worker=null}}class Ic{constructor(e,t,i=!1,r=null){this.length=e,this.initialData=t,this.progressiveDone=i,this.contentDispositionFilename=r,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const i of this._rangeListeners)i(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const i of this._progressListeners)i(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){Vo("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class Lc{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return $o(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class Pc{#br=null;#vr=!1;constructor(e,t,i,r=!1){this._pageIndex=e,this._pageInfo=t,this._transport=i,this._stats=r?new wl:null,this._pdfBug=r,this.commonObjs=i.commonObjs,this.objs=new Oc,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:i=0,offsetY:r=0,dontFlip:s=!1}={}){return new ml({viewBox:this.view,userUnit:this.userUnit,scale:e,rotation:t,offsetX:i,offsetY:r,dontFlip:s})}getAnnotations({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return $o(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:e,viewport:t,intent:i="display",annotationMode:r=eo.ENABLE,transform:s=null,background:n=null,optionalContentConfigPromise:a=null,annotationCanvasMap:o=null,pageColors:l=null,printAnnotationStorage:h=null,isEditing:c=!1}){this._stats?.time("Overall");const d=this._transport.getRenderingIntent(i,r,h,c),{renderingIntent:u,cacheKey:p}=d;this.#vr=!1,this.#yr(),a||=this._transport.getOptionalContentConfig(u);let m=this._intentStates.get(p);m||(m=Object.create(null),this._intentStates.set(p,m)),m.streamReaderCancelTimeout&&(clearTimeout(m.streamReaderCancelTimeout),m.streamReaderCancelTimeout=null);const g=!!(u&Xa);m.displayReadyCapability||(m.displayReadyCapability=Promise.withResolvers(),m.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(d));const f=e=>{m.renderTasks.delete(b),(this._maybeCleanupAfterRender||g)&&(this.#vr=!0),this.#wr(!g),e?(b.capability.reject(e),this._abortOperatorList({intentState:m,reason:e instanceof Error?e:new Error(e)})):b.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},b=new Hc({callback:f,params:{canvasContext:e,viewport:t,transform:s,background:n},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:o,operatorList:m.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!g,pdfBug:this._pdfBug,pageColors:l});(m.renderTasks||=new Set).add(b);const v=b.task;return Promise.all([m.displayReadyCapability.promise,a]).then((([e,t])=>{if(this.destroyed)f();else{if(this._stats?.time("Rendering"),!(t.renderingIntent&u))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");b.initializeGraphics({transparency:e,optionalContentConfig:t}),b.operatorListChanged()}})).catch(f),v}getOperatorList({intent:e="display",annotationMode:t=eo.ENABLE,printAnnotationStorage:i=null,isEditing:r=!1}={}){const s=this._transport.getRenderingIntent(e,t,i,r,!0);let n,a=this._intentStates.get(s.cacheKey);return a||(a=Object.create(null),this._intentStates.set(s.cacheKey,a)),a.opListReadCapability||(n=Object.create(null),n.operatorListChanged=function(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(n))},a.opListReadCapability=Promise.withResolvers(),(a.renderTasks||=new Set).add(n),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(s)),a.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===e,disableNormalization:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then((e=>Ac.textContent(e)));const t=this.streamTextContent(e);return new Promise((function(e,i){const r=t.getReader(),s={items:[],styles:Object.create(null),lang:null};!function t(){r.read().then((function({value:i,done:r}){r?e(s):(s.lang??=i.lang,Object.assign(s.styles,i.styles),s.items.push(...i.items),t())}),i)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const i of t.renderTasks)e.push(i.completed),i.cancel();return this.objs.clear(),this.#vr=!1,this.#yr(),Promise.all(e)}cleanup(e=!1){this.#vr=!0;const t=this.#wr(!1);return e&&t&&(this._stats&&=new wl),t}#wr(e=!1){if(this.#yr(),!this.#vr||this.destroyed)return!1;if(e)return this.#br=setTimeout((()=>{this.#br=null,this.#wr(!1)}),5e3),!1;for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#vr=!1,!0}#yr(){this.#br&&(clearTimeout(this.#br),this.#br=null)}_startRenderPage(e,t){const i=this._intentStates.get(t);i&&(this._stats?.timeEnd("Page Request"),i.displayReadyCapability?.resolve(e))}_renderPageChunk(e,t){for(let i=0,r=e.length;i<r;i++)t.operatorList.fnArray.push(e.fnArray[i]),t.operatorList.argsArray.push(e.argsArray[i]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const e of t.renderTasks)e.operatorListChanged();e.lastChunk&&this.#wr(!0)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:i,modifiedIds:r}){const{map:s,transfer:n}=i,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:s,modifiedIds:r},n).getReader(),o=this._intentStates.get(t);o.streamReader=a;const l=()=>{a.read().then((({value:e,done:t})=>{t?o.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,o),l())}),(e=>{if(o.streamReader=null,!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const e of o.renderTasks)e.operatorListChanged();this.#wr(!0)}if(o.displayReadyCapability)o.displayReadyCapability.reject(e);else{if(!o.opListReadCapability)throw e;o.opListReadCapability.reject(e)}}}))};l()}_abortOperatorList({intentState:e,reason:t,force:i=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!i){if(e.renderTasks.size>0)return;if(t instanceof gl){let i=100;return t.extraDelay>0&&t.extraDelay<1e3&&(i+=t.extraDelay),void(e.streamReaderCancelTimeout=setTimeout((()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})}),i))}}if(e.streamReader.cancel(new el(t.message)).catch((()=>{})),e.streamReader=null,!this._transport.destroyed){for(const[t,i]of this._intentStates)if(i===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}class Rc{#xr=new Map;#Ar=Promise.resolve();postMessage(e,t){const i={data:structuredClone(e,t?{transfer:t}:null)};this.#Ar.then((()=>{for(const[e]of this.#xr)e.call(this,i)}))}addEventListener(e,t,i=null){let r=null;if(i?.signal instanceof AbortSignal){const{signal:s}=i;if(s.aborted)return void jo("LoopbackPort - cannot use an `aborted` signal.");const n=()=>this.removeEventListener(e,t);r=()=>s.removeEventListener("abort",n),s.addEventListener("abort",n)}this.#xr.set(t,r)}removeEventListener(e,t){const i=this.#xr.get(t);i?.(),this.#xr.delete(t)}terminate(){for(const[,e]of this.#xr)e?.();this.#xr.clear()}}class Dc{static#kr=0;static#Er=!1;static#Sr;static{ja&&(this.#Er=!0,Wh.workerSrc||="./pdf.worker.mjs"),this._isSameOrigin=(e,t)=>{let i;try{if(i=new URL(e),!i.origin||"null"===i.origin)return!1}catch{return!1}const r=new URL(t,i);return i.origin===r.origin},this._createCDNWrapper=e=>{const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))}}constructor({name:e=null,port:t=null,verbosity:i=Ho()}={}){if(this.name=e,this.destroyed=!1,this.verbosity=i,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,t){if(Dc.#Sr?.has(t))throw new Error("Cannot use more than one PDFWorker per port.");return(Dc.#Sr||=new WeakMap).set(t,this),void this._initializeFromPort(t)}this._initialize()}get promise(){return this._readyCapability.promise}#Cr(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new dh("main","worker",e),this._messageHandler.on("ready",(function(){})),this.#Cr()}_initialize(){if(Dc.#Er||Dc.#Mr)return void this._setupFakeWorker();let{workerSrc:e}=Dc;try{Dc._isSameOrigin(window.location.href,e)||(e=Dc._createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e,{type:"module"}),i=new dh("main","worker",t),r=()=>{s.abort(),i.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},s=new AbortController;t.addEventListener("error",(()=>{this._webWorker||r()}),{signal:s.signal}),i.on("test",(e=>{s.abort(),!this.destroyed&&e?(this._messageHandler=i,this._port=t,this._webWorker=t,this.#Cr()):r()})),i.on("ready",(e=>{if(s.abort(),this.destroyed)r();else try{n()}catch{this._setupFakeWorker()}}));const n=()=>{const e=new Uint8Array;i.send("test",e,[e.buffer])};return void n()}catch{qo("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){Dc.#Er||(jo("Setting up fake worker."),Dc.#Er=!0),Dc._setupFakeWorkerGlobal.then((e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const t=new Rc;this._port=t;const i="fake"+Dc.#kr++,r=new dh(i+"_worker",i,t);e.setup(r,t),this._messageHandler=new dh(i,i+"_worker",t),this.#Cr()})).catch((e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))}))}destroy(){this.destroyed=!0,this._webWorker?.terminate(),this._webWorker=null,Dc.#Sr?.delete(this._port),this._port=null,this._messageHandler?.destroy(),this._messageHandler=null}static fromPort(e){if(!e?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const t=this.#Sr?.get(e.port);if(t){if(t._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new Dc(e)}static get workerSrc(){if(Wh.workerSrc)return Wh.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get#Mr(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return $o(this,"_setupFakeWorkerGlobal",(async()=>{if(this.#Mr)return this.#Mr;return(await import(this.workerSrc)).WorkerMessageHandler})())}}class Fc{#_r=new Map;#Tr=new Map;#Nr=new Map;#Ir=new Map;#Lr=null;constructor(e,t,i,r,s){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new Oc,this.fontLoader=new Zl({ownerDocument:r.ownerDocument,styleElement:r.styleElement}),this.loadingParams=r.loadingParams,this._params=r,this.canvasFactory=s.canvasFactory,this.filterFactory=s.filterFactory,this.cMapReaderFactory=s.cMapReaderFactory,this.standardFontDataFactory=s.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=i,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}#Pr(e,t=null){const i=this.#_r.get(e);if(i)return i;const r=this.messageHandler.sendWithPromise(e,t);return this.#_r.set(e,r),r}get annotationStorage(){return $o(this,"annotationStorage",new Yl)}getRenderingIntent(e,t=eo.ENABLE,i=null,r=!1,s=!1){let n=Wa,a=Xl;switch(e){case"any":n=$a;break;case"display":break;case"print":n=Xa;break;default:jo(`getRenderingIntent - invalid intent: ${e}`)}const o=n&Xa&&i instanceof Kl?i:this.annotationStorage;switch(t){case eo.DISABLE:n+=Za;break;case eo.ENABLE:break;case eo.ENABLE_FORMS:n+=Ya;break;case eo.ENABLE_STORAGE:n+=Ka,a=o.serializable;break;default:jo(`getRenderingIntent - invalid annotationMode: ${t}`)}r&&(n+=Ja),s&&(n+=Qa);const{ids:l,hash:h}=o.modifiedIds;return{renderingIntent:n,cacheKey:[n,a.hash,h].join("_"),annotationStorageSerializable:a,modifiedIds:l}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#Lr?.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const t of this.#Tr.values())e.push(t._destroy());this.#Tr.clear(),this.#Nr.clear(),this.#Ir.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then((()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#_r.clear(),this.filterFactory.destroy(),xc.cleanup(),this._networkStream?.cancelAllRequests(new el("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{Uo(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function({value:e,done:i}){i?t.close():(Uo(e instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(async e=>{await this._fullReader.headersReady;const{isStreamingSupported:i,isRangeSupported:r,contentLength:s}=this._fullReader;return i&&r||(this._lastProgress&&t.onProgress?.(this._lastProgress),this._fullReader.onProgress=e=>{t.onProgress?.({loaded:e.loaded,total:e.total})}),{isStreamingSupported:i,isRangeSupported:r,contentLength:s}})),e.on("GetRangeReader",((e,t)=>{Uo(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const i=this._networkStream.getRangeReader(e.begin,e.end);i?(t.onPull=()=>{i.read().then((function({value:e,done:i}){i?t.close():(Uo(e instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{i.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}):t.close()})),e.on("GetDoc",(({pdfInfo:e})=>{this._numPages=e.numPages,this._htmlForXfa=e.htmlForXfa,delete e.htmlForXfa,t._capability.resolve(new Lc(e,this))})),e.on("DocException",(e=>{t._capability.reject(ch(e))})),e.on("PasswordRequest",(e=>{this.#Lr=Promise.withResolvers();try{if(!t.onPassword)throw ch(e);const i=e=>{e instanceof Error?this.#Lr.reject(e):this.#Lr.resolve({password:e})};t.onPassword(i,e.code)}catch(e){this.#Lr.reject(e)}return this.#Lr.promise})),e.on("DataLoaded",(e=>{t.onProgress?.({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{if(this.destroyed)return;this.#Tr.get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(([t,i,r])=>{if(this.destroyed)return null;if(this.commonObjs.has(t))return null;switch(i){case"Font":const{disableFontFace:s,fontExtraProperties:n,pdfBug:a}=this._params;if("error"in r){const e=r.error;jo(`Error during font loading: ${e}`),this.commonObjs.resolve(t,e);break}const o=a&&globalThis.FontInspector?.enabled?(e,t)=>globalThis.FontInspector.fontAdded(e,t):null,l=new Jl(r,{disableFontFace:s,fontExtraProperties:n,inspectFont:o});this.fontLoader.bind(l).catch((()=>e.sendWithPromise("FontFallback",{id:t}))).finally((()=>{!n&&l.data&&(l.data=null),this.commonObjs.resolve(t,l)}));break;case"CopyLocalImage":const{imageRef:h}=r;Uo(h,"The imageRef must be defined.");for(const e of this.#Tr.values())for(const[,i]of e.objs)if(i?.ref===h)return i.dataLen?(this.commonObjs.resolve(t,structuredClone(i)),i.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(t,r);break;default:throw new Error(`Got unknown common object type ${i}`)}return null})),e.on("obj",(([e,t,i,r])=>{if(this.destroyed)return;const s=this.#Tr.get(t);if(!s.objs.has(e))if(0!==s._intentStates.size)switch(i){case"Image":s.objs.resolve(e,r),r?.dataLen>1e7&&(s._maybeCleanupAfterRender=!0);break;case"Pattern":s.objs.resolve(e,r);break;default:throw new Error(`Got unknown object type ${i}`)}else r?.bitmap?.close()})),e.on("DocProgress",(e=>{this.destroyed||t.onProgress?.({loaded:e.loaded,total:e.total})})),e.on("FetchBuiltInCMap",(async e=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(e)})),e.on("FetchStandardFontData",(async e=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(e)}))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&jo("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:this._fullReader?.filename??null},t).finally((()=>{this.annotationStorage.resetModified()}))}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,i=this.#Nr.get(t);if(i)return i;const r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((i=>{if(this.destroyed)throw new Error("Transport destroyed");i.refStr&&this.#Ir.set(i.refStr,e);const r=new Pc(t,i,this,this._params.pdfBug);return this.#Tr.set(t,r),r}));return this.#Nr.set(t,r),r}getPageIndex(e){return Tc(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return this.#Pr("GetFieldObjects")}hasJSActions(){return this.#Pr("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#Pr("GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return this.#Pr("GetOptionalContentConfig").then((t=>new Zh(t,e)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=this.#_r.get(e);if(t)return t;const i=this.messageHandler.sendWithPromise(e,null).then((e=>({info:e[0],metadata:e[1]?new Xh(e[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null})));return this.#_r.set(e,i),i}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of this.#Tr.values()){if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`)}this.commonObjs.clear(),e||this.fontLoader.clear(),this.#_r.clear(),this.filterFactory.destroy(!0),xc.cleanup()}}cachedPageNumber(e){if(!Tc(e))return null;const t=0===e.gen?`${e.num}R`:`${e.num}R${e.gen}`;return this.#Ir.get(t)??null}}const zc=Symbol("INITIAL_DATA");class Oc{#Rr=Object.create(null);#Dr(e){return this.#Rr[e]||={...Promise.withResolvers(),data:zc}}get(e,t=null){if(t){const i=this.#Dr(e);return i.promise.then((()=>t(i.data))),null}const i=this.#Rr[e];if(!i||i.data===zc)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return i.data}has(e){const t=this.#Rr[e];return!!t&&t.data!==zc}delete(e){const t=this.#Rr[e];return!(!t||t.data===zc)&&(delete this.#Rr[e],!0)}resolve(e,t=null){const i=this.#Dr(e);i.data=t,i.resolve()}clear(){for(const e in this.#Rr){const{data:t}=this.#Rr[e];t?.bitmap?.close()}this.#Rr=Object.create(null)}*[Symbol.iterator](){for(const e in this.#Rr){const{data:t}=this.#Rr[e];t!==zc&&(yield[e,t])}}}class Bc{#Fr=null;constructor(e){this.#Fr=e,this.onContinue=null}get promise(){return this.#Fr.capability.promise}cancel(e=0){this.#Fr.cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=this.#Fr.operatorList;if(!e)return!1;const{annotationCanvasMap:t}=this.#Fr;return e.form||e.canvas&&t?.size>0}}class Hc{#zr=null;static#Or=new WeakSet;constructor({callback:e,params:t,objs:i,commonObjs:r,annotationCanvasMap:s,operatorList:n,pageIndex:a,canvasFactory:o,filterFactory:l,useRequestAnimationFrame:h=!1,pdfBug:c=!1,pageColors:d=null}){this.callback=e,this.params=t,this.objs=i,this.commonObjs=r,this.annotationCanvasMap=s,this.operatorListIdx=null,this.operatorList=n,this._pageIndex=a,this.canvasFactory=o,this.filterFactory=l,this._pdfBug=c,this.pageColors=d,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"undefined"!=typeof window,this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new Bc(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){if(this.cancelled)return;if(this._canvas){if(Hc.#Or.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Hc.#Or.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:i,viewport:r,transform:s,background:n}=this.params;this.gfx=new $h(i,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:s,viewport:r,transparency:e,background:n}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(e=null,t=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#zr&&(window.cancelAnimationFrame(this.#zr),this.#zr=null),Hc.#Or.delete(this._canvas),this.callback(e||new gl(`Rendering cancelled, page ${this._pageIndex+1}`,t))}operatorListChanged(){this.graphicsReady?(this.stepper?.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||=this._continueBound}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#zr=window.requestAnimationFrame((()=>{this.#zr=null,this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Hc.#Or.delete(this._canvas),this.callback())))}}const qc="4.10.38",jc="f9bea397f";function Vc(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}function Uc(e){return Math.max(0,Math.min(255,255*e))}class Gc{static CMYK_G([e,t,i,r]){return["G",1-Math.min(1,.3*e+.59*i+.11*t+r)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return[e=Uc(e),e,e]}static G_HTML([e]){const t=Vc(e);return`#${t}${t}${t}`}static RGB_G([e,t,i]){return["G",.3*e+.59*t+.11*i]}static RGB_rgb(e){return e.map(Uc)}static RGB_HTML(e){return`#${e.map(Vc).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,i,r]){return["RGB",1-Math.min(1,e+r),1-Math.min(1,i+r),1-Math.min(1,t+r)]}static CMYK_rgb([e,t,i,r]){return[Uc(1-Math.min(1,e+r)),Uc(1-Math.min(1,i+r)),Uc(1-Math.min(1,t+r))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,i]){const r=1-e,s=1-t,n=1-i;return["CMYK",r,s,n,Math.min(r,s,n)]}}class $c{create(e,t,i=!1){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),i||(r.setAttribute("width",`${e}px`),r.setAttribute("height",`${t}px`)),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox",`0 0 ${e} ${t}`),r}createElement(e){if("string"!=typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){Vo("Abstract method `_createSVG` called.")}}class Wc extends $c{_createSVG(e){return document.createElementNS(dl,e)}}class Xc{static setupStorage(e,t,i,r,s){const n=r.getValue(t,{value:null});switch(i.name){case"textarea":if(null!==n.value&&(e.textContent=n.value),"print"===s)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===i.attributes.type||"checkbox"===i.attributes.type){if(n.value===i.attributes.xfaOn?e.setAttribute("checked",!0):n.value===i.attributes.xfaOff&&e.removeAttribute("checked"),"print"===s)break;e.addEventListener("change",(e=>{r.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==n.value&&e.setAttribute("value",n.value),"print"===s)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==n.value){e.setAttribute("value",n.value);for(const e of i.children)e.attributes.value===n.value?e.attributes.selected=!0:e.attributes.hasOwnProperty("selected")&&delete e.attributes.selected}e.addEventListener("input",(e=>{const i=e.target.options,s=-1===i.selectedIndex?"":i[i.selectedIndex].value;r.setValue(t,{value:s})}))}}static setAttributes({html:e,element:t,storage:i=null,intent:r,linkService:s}){const{attributes:n}=t,a=e instanceof HTMLAnchorElement;"radio"===n.type&&(n.name=`${n.name}-${r}`);for(const[t,i]of Object.entries(n))if(null!=i)switch(t){case"class":i.length&&e.setAttribute(t,i.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",i);break;case"style":Object.assign(e.style,i);break;case"textContent":e.textContent=i;break;default:(!a||"href"!==t&&"newWindow"!==t)&&e.setAttribute(t,i)}a&&s.addLinkAttributes(e,n.href,n.newWindow),i&&n.dataId&&this.setupStorage(e,n.dataId,t,i)}static render(e){const t=e.annotationStorage,i=e.linkService,r=e.xfaHtml,s=e.intent||"display",n=document.createElement(r.name);r.attributes&&this.setAttributes({html:n,element:r,intent:s,linkService:i});const a="richText"!==s,o=e.div;if(o.append(n),e.viewport){const t=`matrix(${e.viewport.transform.join(",")})`;o.style.transform=t}a&&o.setAttribute("class","xfaLayer xfaFont");const l=[];if(0===r.children.length){if(r.value){const e=document.createTextNode(r.value);n.append(e),a&&Ac.shouldBuildText(r.name)&&l.push(e)}return{textDivs:l}}const h=[[r,-1,n]];for(;h.length>0;){const[e,r,n]=h.at(-1);if(r+1===e.children.length){h.pop();continue}const o=e.children[++h.at(-1)[1]];if(null===o)continue;const{name:c}=o;if("#text"===c){const e=document.createTextNode(o.value);l.push(e),n.append(e);continue}const d=o?.attributes?.xmlns?document.createElementNS(o.attributes.xmlns,c):document.createElement(c);if(n.append(d),o.attributes&&this.setAttributes({html:d,element:o,storage:t,intent:s,linkService:i}),o.children?.length>0)h.push([o,-1,d]);else if(o.value){const e=document.createTextNode(o.value);a&&Ac.shouldBuildText(c)&&l.push(e),d.append(e)}}for(const e of o.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))e.setAttribute("readOnly",!0);return{textDivs:l}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}const Yc=1e3,Kc=new WeakSet;function Zc(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class Jc{static create(e){switch(e.data.annotationType){case po:return new ed(e);case uo:return new td(e);case To:switch(e.data.fieldType){case"Tx":return new rd(e);case"Btn":return e.data.radioButton?new ad(e):e.data.checkBox?new nd(e):new od(e);case"Ch":return new ld(e);case"Sig":return new sd(e)}return new id(e);case Mo:return new hd(e);case mo:return new dd(e);case go:return new ud(e);case fo:return new pd(e);case bo:return new md(e);case yo:return new gd(e);case So:return new bd(e);case Co:return new vd(e);case vo:return new fd(e);case wo:return new yd(e);case xo:return new wd(e);case Ao:return new xd(e);case ko:return new Ad(e);case Eo:return new kd(e);case _o:return new Ed(e);default:return new Qc(e)}}}class Qc{#Br=null;#Hr=!1;#qr=null;constructor(e,{isRenderable:t=!1,ignoreBorder:i=!1,createQuadrilaterals:r=!1}={}){this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(i)),r&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:i}){return!!(e?.str||t?.str||i?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return Qc._hasPopupData(this.data)}updateEdited(e){if(!this.container)return;this.#Br||={rect:this.data.rect.slice(0)};const{rect:t}=e;t&&this.#jr(t),this.#qr?.popup.updateEdited(e)}resetEdited(){this.#Br&&(this.#jr(this.#Br.rect),this.#qr?.popup.resetEdited(),this.#Br=null)}#jr(e){const{container:{style:t},data:{rect:i,rotation:r},parent:{viewport:{rawDims:{pageWidth:s,pageHeight:n,pageX:a,pageY:o}}}}=this;i?.splice(0,4,...e);const{width:l,height:h}=Zc(e);t.left=100*(e[0]-a)/s+"%",t.top=100*(n-e[3]+o)/n+"%",0===r?(t.width=100*l/s+"%",t.height=100*h/n+"%"):this.setRotation(r)}_createContainer(e){const{data:t,parent:{page:i,viewport:r}}=this,s=document.createElement("section");s.setAttribute("data-annotation-id",t.id),this instanceof id||(s.tabIndex=Yc);const{style:n}=s;if(n.zIndex=this.parent.zIndex++,t.alternativeText&&(s.title=t.alternativeText),t.noRotate&&s.classList.add("norotate"),!t.rect||this instanceof hd){const{rotation:e}=t;return t.hasOwnCanvas||0===e||this.setRotation(e,s),s}const{width:a,height:o}=Zc(t.rect);if(!e&&t.borderStyle.width>0){n.borderWidth=`${t.borderStyle.width}px`;const e=t.borderStyle.horizontalCornerRadius,i=t.borderStyle.verticalCornerRadius;if(e>0||i>0){const t=`calc(${e}px * var(--scale-factor)) / calc(${i}px * var(--scale-factor))`;n.borderRadius=t}else if(this instanceof ad){const e=`calc(${a}px * var(--scale-factor)) / calc(${o}px * var(--scale-factor))`;n.borderRadius=e}switch(t.borderStyle.style){case No:n.borderStyle="solid";break;case Io:n.borderStyle="dashed";break;case Lo:jo("Unimplemented border style: beveled");break;case Po:jo("Unimplemented border style: inset");break;case Ro:n.borderBottomStyle="solid"}const r=t.borderColor||null;r?(this.#Hr=!0,n.borderColor=al.makeHexColor(0|r[0],0|r[1],0|r[2])):n.borderWidth=0}const l=al.normalizeRect([t.rect[0],i.view[3]-t.rect[1]+i.view[1],t.rect[2],i.view[3]-t.rect[3]+i.view[1]]),{pageWidth:h,pageHeight:c,pageX:d,pageY:u}=r.rawDims;n.left=100*(l[0]-d)/h+"%",n.top=100*(l[1]-u)/c+"%";const{rotation:p}=t;return t.hasOwnCanvas||0===p?(n.width=100*a/h+"%",n.height=100*o/c+"%"):this.setRotation(p,s),s}setRotation(e,t=this.container){if(!this.data.rect)return;const{pageWidth:i,pageHeight:r}=this.parent.viewport.rawDims,{width:s,height:n}=Zc(this.data.rect);let a,o;e%180==0?(a=100*s/i,o=100*n/r):(a=100*n/i,o=100*s/r),t.style.width=`${a}%`,t.style.height=`${o}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(e,t,i)=>{const r=i.detail[e],s=r[0],n=r.slice(1);i.target.style[t]=Gc[`${s}_HTML`](n),this.annotationStorage.setValue(this.data.id,{[t]:Gc[`${s}_rgb`](n)})};return $o(this,"_commonActions",{display:e=>{const{display:t}=e.detail,i=t%2==1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:1===t||2===t})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:t}=e.detail;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:t,noView:t})},focus:e=>{setTimeout((()=>e.target.focus({preventScroll:!1})),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{const t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){const i=this._commonActions;for(const r of Object.keys(t.detail)){const s=e[r]||i[r];s?.(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const i=this._commonActions;for(const[r,s]of Object.entries(t)){const n=i[r];if(n){n({detail:{[r]:s},target:e}),delete t[r]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,i,r,s]=this.data.rect.map((e=>Math.fround(e)));if(8===e.length){const[n,a,o,l]=e.subarray(2,6);if(r===n&&s===a&&t===o&&i===l)return}const{style:n}=this.container;let a;if(this.#Hr){const{borderColor:e,borderWidth:t}=n;n.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${e}" stroke-width="${t}">`],this.container.classList.add("hasBorder")}const o=r-t,l=s-i,{svgFactory:h}=this,c=h.createElement("svg");c.classList.add("quadrilateralsContainer"),c.setAttribute("width",0),c.setAttribute("height",0);const d=h.createElement("defs");c.append(d);const u=h.createElement("clipPath"),p=`clippath_${this.data.id}`;u.setAttribute("id",p),u.setAttribute("clipPathUnits","objectBoundingBox"),d.append(u);for(let i=2,r=e.length;i<r;i+=8){const r=e[i],n=e[i+1],c=e[i+2],d=e[i+3],p=h.createElement("rect"),m=(c-t)/o,g=(s-n)/l,f=(r-c)/o,b=(n-d)/l;p.setAttribute("x",m),p.setAttribute("y",g),p.setAttribute("width",f),p.setAttribute("height",b),u.append(p),a?.push(`<rect vector-effect="non-scaling-stroke" x="${m}" y="${g}" width="${f}" height="${b}"/>`)}this.#Hr&&(a.push("</g></svg>')"),n.backgroundImage=a.join("")),this.container.append(c),this.container.style.clipPath=`url(#${p})`}_createPopup(){const{data:e}=this,t=this.#qr=new hd({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation},parent:this.parent,elements:[this]});this.parent.div.append(t.render())}render(){Vo("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const i=[];if(this._fieldObjects){const r=this._fieldObjects[e];if(r)for(const{page:e,id:s,exportValues:n}of r){if(-1===e)continue;if(s===t)continue;const r="string"==typeof n?n:null,a=document.querySelector(`[data-element-id="${s}"]`);!a||Kc.has(a)?i.push({id:s,exportValue:r,domElement:a}):jo(`_getElementsByName - element not allowed: ${s}`)}return i}for(const r of document.getElementsByName(e)){const{exportValue:e}=r,s=r.getAttribute("data-element-id");s!==t&&(Kc.has(r)&&i.push({id:s,exportValue:e,domElement:r}))}return i}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",(()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})}))}}class ed extends Qc{constructor(e,t=null){super(e,{isRenderable:!0,ignoreBorder:!!t?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:t}=this,i=document.createElement("a");i.setAttribute("data-element-id",e.id);let r=!1;return e.url?(t.addLinkAttributes(i,e.url,e.newWindow),r=!0):e.action?(this._bindNamedAction(i,e.action),r=!0):e.attachment?(this.#Vr(i,e.attachment,e.attachmentDest),r=!0):e.setOCGState?(this.#Ur(i,e.setOCGState),r=!0):e.dest?(this._bindLink(i,e.dest),r=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,e),r=!0),e.resetForm?(this._bindResetFormAction(i,e.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(i,""),r=!0)),this.container.classList.add("linkAnnotation"),r&&this.container.append(i),this.container}#Gr(){this.container.setAttribute("data-internal-link","")}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&this.#Gr()}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),this.#Gr()}#Vr(e,t,i=null){e.href=this.linkService.getAnchorUrl(""),t.description&&(e.title=t.description),e.onclick=()=>(this.downloadManager?.openOrDownloadData(t.content,t.filename,i),!1),this.#Gr()}#Ur(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),this.#Gr()}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(t.actions)){const s=i.get(r);s&&(e[s]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:r}}),!1))}e.onclick||(e.onclick=()=>!1),this.#Gr()}_bindResetFormAction(e,t){const i=e.onclick;if(i||(e.href=this.linkService.getAnchorUrl("")),this.#Gr(),!this._fieldObjects)return jo('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(i||(e.onclick=()=>!1));e.onclick=()=>{i?.();const{fields:e,refs:r,include:s}=t,n=[];if(0!==e.length||0!==r.length){const t=new Set(r);for(const i of e){const e=this._fieldObjects[i]||[];for(const{id:i}of e)t.add(i)}for(const e of Object.values(this._fieldObjects))for(const i of e)t.has(i.id)===s&&n.push(i)}else for(const e of Object.values(this._fieldObjects))n.push(...e);const a=this.annotationStorage,o=[];for(const e of n){const{id:t}=e;switch(o.push(t),e.type){case"text":{const i=e.defaultValue||"";a.setValue(t,{value:i});break}case"checkbox":case"radiobutton":{const i=e.defaultValue===e.exportValues;a.setValue(t,{value:i});break}case"combobox":case"listbox":{const i=e.defaultValue||"";a.setValue(t,{value:i});break}default:continue}const i=document.querySelector(`[data-element-id="${t}"]`);i&&(Kc.has(i)?i.dispatchEvent(new Event("resetform")):jo(`_bindResetFormAction - element not allowed: ${t}`))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:o,name:"ResetForm"}}),!1}}}class td extends Qc{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class id extends Qc{render(){return this.container}showElementAndHideCanvas(e){this.data.hasOwnCanvas&&("CANVAS"===e.previousSibling?.nodeName&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return sl.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,i,r,s){i.includes("mouse")?e.addEventListener(i,(e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:s(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})})):e.addEventListener(i,(e=>{if("blur"===i){if(!t.focused||!e.relatedTarget)return;t.focused=!1}else if("focus"===i){if(t.focused)return;t.focused=!0}s&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:s(e)}})}))}_setEventListeners(e,t,i,r){for(const[s,n]of i)("Action"===n||this.data.actions?.[n])&&("Focus"!==n&&"Blur"!==n||(t||={focused:!1}),this._setEventListener(e,t,s,n,r),"Focus"!==n||this.data.actions?.Blur?"Blur"!==n||this.data.actions?.Focus||this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":al.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:i}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||9,s=e.style;let n;const a=e=>Math.round(10*e)/10;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(Ga*r))||1);n=Math.min(r,a(t/Ga))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2);n=Math.min(r,a(e/Ga))}s.fontSize=`calc(${n}px * var(--scale-factor))`,s.color=al.makeHexColor(i[0],i[1],i[2]),null!==this.data.textAlignment&&(s.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class rd extends id{constructor(e){super(e,{isRenderable:e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,i,r){const s=this.annotationStorage;for(const n of this._getElementsByName(e.name,e.id))n.domElement&&(n.domElement[t]=i),s.setValue(n.id,{[r]:i})}render(){const e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let i=null;if(this.renderForms){const r=e.getValue(t,{value:this.data.fieldValue});let s=r.value||"";const n=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;n&&s.length>n&&(s=s.slice(0,n));let a=r.formattedValue||this.data.textContent?.join("\n")||null;a&&this.data.comb&&(a=a.replaceAll(/\s+/g,""));const o={userValue:s,formattedValue:a,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(i=document.createElement("textarea"),i.textContent=a??s,this.data.doNotScroll&&(i.style.overflowY="hidden")):(i=document.createElement("input"),i.type="text",i.setAttribute("value",a??s),this.data.doNotScroll&&(i.style.overflowX="hidden")),this.data.hasOwnCanvas&&(i.hidden=!0),Kc.add(i),i.setAttribute("data-element-id",t),i.disabled=this.data.readOnly,i.name=this.data.fieldName,i.tabIndex=Yc,this._setRequired(i,this.data.required),n&&(i.maxLength=n),i.addEventListener("input",(r=>{e.setValue(t,{value:r.target.value}),this.setPropertyOnSiblings(i,"value",r.target.value,"value"),o.formattedValue=null})),i.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue??"";i.value=o.userValue=t,o.formattedValue=null}));let l=e=>{const{formattedValue:t}=o;null!=t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){i.addEventListener("focus",(e=>{if(o.focused)return;const{target:t}=e;o.userValue&&(t.value=o.userValue),o.lastCommittedValue=t.value,o.commitKey=1,this.data.actions?.Focus||(o.focused=!0)})),i.addEventListener("updatefromsandbox",(i=>{this.showElementAndHideCanvas(i.target);const r={value(i){o.userValue=i.detail.value??"",e.setValue(t,{value:o.userValue.toString()}),i.target.value=o.userValue},formattedValue(i){const{formattedValue:r}=i.detail;o.formattedValue=r,null!=r&&i.target!==document.activeElement&&(i.target.value=r),e.setValue(t,{formattedValue:r})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:i=>{const{charLimit:r}=i.detail,{target:s}=i;if(0===r)return void s.removeAttribute("maxLength");s.setAttribute("maxLength",r);let n=o.userValue;!n||n.length<=r||(n=n.slice(0,r),s.value=o.userValue=n,e.setValue(t,{value:n}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:n,willCommit:!0,commitKey:1,selStart:s.selectionStart,selEnd:s.selectionEnd}}))}};this._dispatchEventFromSandbox(r,i)})),i.addEventListener("keydown",(e=>{o.commitKey=1;let i=-1;if("Escape"===e.key?i=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(o.commitKey=3):i=2,-1===i)return;const{value:r}=e.target;o.lastCommittedValue!==r&&(o.lastCommittedValue=r,o.userValue=r,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:r,willCommit:!0,commitKey:i,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}));const r=l;l=null,i.addEventListener("blur",(e=>{if(!o.focused||!e.relatedTarget)return;this.data.actions?.Blur||(o.focused=!1);const{value:i}=e.target;o.userValue=i,o.lastCommittedValue!==i&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:i,willCommit:!0,commitKey:o.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}),r(e)})),this.data.actions?.Keystroke&&i.addEventListener("beforeinput",(e=>{o.lastCommittedValue=null;const{data:i,target:r}=e,{value:s,selectionStart:n,selectionEnd:a}=r;let l=n,h=a;switch(e.inputType){case"deleteWordBackward":{const e=s.substring(0,n).match(/\w*[^\w]*$/);e&&(l-=e[0].length);break}case"deleteWordForward":{const e=s.substring(n).match(/^[^\w]*\w*/);e&&(h+=e[0].length);break}case"deleteContentBackward":n===a&&(l-=1);break;case"deleteContentForward":n===a&&(h+=1)}e.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:s,change:i||"",willCommit:!1,selStart:l,selEnd:h}})})),this._setEventListeners(i,o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.value))}if(l&&i.addEventListener("blur",l),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/n;i.classList.add("comb"),i.style.letterSpacing=`calc(${e}px * var(--scale-factor) - 1ch)`}}else i=document.createElement("div"),i.textContent=this.data.fieldValue,i.style.verticalAlign="middle",i.style.display="table-cell",this.data.hasOwnCanvas&&(i.hidden=!0);return this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class sd extends id{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class nd extends id{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,i=t.id;let r=e.getValue(i,{value:t.exportValue===t.fieldValue}).value;"string"==typeof r&&(r="Off"!==r,e.setValue(i,{value:r})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const s=document.createElement("input");return Kc.add(s),s.setAttribute("data-element-id",i),s.disabled=t.readOnly,this._setRequired(s,this.data.required),s.type="checkbox",s.name=t.fieldName,r&&s.setAttribute("checked",!0),s.setAttribute("exportValue",t.exportValue),s.tabIndex=Yc,s.addEventListener("change",(r=>{const{name:s,checked:n}=r.target;for(const r of this._getElementsByName(s,i)){const i=n&&r.exportValue===t.exportValue;r.domElement&&(r.domElement.checked=i),e.setValue(r.id,{value:i})}e.setValue(i,{value:n})})),s.addEventListener("resetform",(e=>{const i=t.defaultFieldValue||"Off";e.target.checked=i===t.exportValue})),this.enableScripting&&this.hasJSActions&&(s.addEventListener("updatefromsandbox",(t=>{const r={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(i,{value:t.target.checked})}};this._dispatchEventFromSandbox(r,t)})),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class ad extends id{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,t=this.data,i=t.id;let r=e.getValue(i,{value:t.fieldValue===t.buttonValue}).value;if("string"==typeof r&&(r=r!==t.buttonValue,e.setValue(i,{value:r})),r)for(const r of this._getElementsByName(t.fieldName,i))e.setValue(r.id,{value:!1});const s=document.createElement("input");if(Kc.add(s),s.setAttribute("data-element-id",i),s.disabled=t.readOnly,this._setRequired(s,this.data.required),s.type="radio",s.name=t.fieldName,r&&s.setAttribute("checked",!0),s.tabIndex=Yc,s.addEventListener("change",(t=>{const{name:r,checked:s}=t.target;for(const t of this._getElementsByName(r,i))e.setValue(t.id,{value:!1});e.setValue(i,{value:s})})),s.addEventListener("resetform",(e=>{const i=t.defaultFieldValue;e.target.checked=null!=i&&i===t.buttonValue})),this.enableScripting&&this.hasJSActions){const r=t.buttonValue;s.addEventListener("updatefromsandbox",(t=>{const s={value:t=>{const s=r===t.detail.value;for(const r of this._getElementsByName(t.target.name)){const t=s&&r.id===i;r.domElement&&(r.domElement.checked=t),e.setValue(r.id,{value:t})}}};this._dispatchEventFromSandbox(s,t)})),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}return this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class od extends ed{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({},e)}))),e}}class ld extends id{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,t=this.data.id,i=e.getValue(t,{value:this.data.fieldValue}),r=document.createElement("select");Kc.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,this._setRequired(r,this.data.required),r.name=this.data.fieldName,r.tabIndex=Yc;let s=this.data.combo&&this.data.options.length>0;this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),r.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue;for(const e of r.options)e.selected=e.value===t}));for(const e of this.data.options){const t=document.createElement("option");t.textContent=e.displayValue,t.value=e.exportValue,i.value.includes(e.exportValue)&&(t.setAttribute("selected",!0),s=!1),r.append(t)}let n=null;if(s){const e=document.createElement("option");e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),r.prepend(e),n=()=>{e.remove(),r.removeEventListener("input",n),n=null},r.addEventListener("input",n)}const a=e=>{const t=e?"value":"textContent",{options:i,multiple:s}=r;return s?Array.prototype.filter.call(i,(e=>e.selected)).map((e=>e[t])):-1===i.selectedIndex?null:i[i.selectedIndex][t]};let o=a(!1);const l=e=>{const t=e.target.options;return Array.prototype.map.call(t,(e=>({displayValue:e.textContent,exportValue:e.value})))};return this.enableScripting&&this.hasJSActions?(r.addEventListener("updatefromsandbox",(i=>{const s={value(i){n?.();const s=i.detail.value,l=new Set(Array.isArray(s)?s:[s]);for(const e of r.options)e.selected=l.has(e.value);e.setValue(t,{value:a(!0)}),o=a(!1)},multipleSelection(e){r.multiple=!0},remove(i){const s=r.options,n=i.detail.remove;if(s[n].selected=!1,r.remove(n),s.length>0){-1===Array.prototype.findIndex.call(s,(e=>e.selected))&&(s[0].selected=!0)}e.setValue(t,{value:a(!0),items:l(i)}),o=a(!1)},clear(i){for(;0!==r.length;)r.remove(0);e.setValue(t,{value:null,items:[]}),o=a(!1)},insert(i){const{index:s,displayValue:n,exportValue:h}=i.detail.insert,c=r.children[s],d=document.createElement("option");d.textContent=n,d.value=h,c?c.before(d):r.append(d),e.setValue(t,{value:a(!0),items:l(i)}),o=a(!1)},items(i){const{items:s}=i.detail;for(;0!==r.length;)r.remove(0);for(const e of s){const{displayValue:t,exportValue:i}=e,s=document.createElement("option");s.textContent=t,s.value=i,r.append(s)}r.options.length>0&&(r.options[0].selected=!0),e.setValue(t,{value:a(!0),items:l(i)}),o=a(!1)},indices(i){const r=new Set(i.detail.indices);for(const e of i.target.options)e.selected=r.has(e.index);e.setValue(t,{value:a(!0)}),o=a(!1)},editable(e){e.target.disabled=!e.detail.editable}};this._dispatchEventFromSandbox(s,i)})),r.addEventListener("input",(i=>{const r=a(!0),s=a(!1);e.setValue(t,{value:r}),i.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:o,change:s,changeEx:r,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(r,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(e=>e.target.value))):r.addEventListener("input",(function(i){e.setValue(t,{value:a(!0)})})),this.data.combo&&this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class hd extends Qc{constructor(e){const{data:t,elements:i}=e;super(e,{isRenderable:Qc._hasPopupData(t)}),this.elements=i,this.popup=null}render(){this.container.classList.add("popupAnnotation");const e=this.popup=new cd({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),t=[];for(const i of this.elements)i.popup=e,i.container.ariaHasPopup="dialog",t.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",t.map((e=>`${cl}${e}`)).join(",")),this.container}}class cd{#$r=this.#Wr.bind(this);#Xr=this.#Yr.bind(this);#Kr=this.#Zr.bind(this);#Jr=this.#Qr.bind(this);#es=null;#pe=null;#ts=null;#is=null;#rs=null;#ss=null;#ns=null;#as=!1;#os=null;#C=null;#ls=null;#hs=null;#cs=null;#Br=null;#ds=!1;constructor({container:e,color:t,elements:i,titleObj:r,modificationDate:s,contentsObj:n,richText:a,parent:o,rect:l,parentRect:h,open:c}){this.#pe=e,this.#cs=r,this.#ts=n,this.#hs=a,this.#ss=o,this.#es=t,this.#ls=l,this.#ns=h,this.#rs=i,this.#is=El.toDateObject(s),this.trigger=i.flatMap((e=>e.getElementsToTriggerPopup()));for(const e of this.trigger)e.addEventListener("click",this.#Jr),e.addEventListener("mouseenter",this.#Kr),e.addEventListener("mouseleave",this.#Xr),e.classList.add("popupTriggerArea");for(const e of i)e.container?.addEventListener("keydown",this.#$r);this.#pe.hidden=!0,c&&this.#Qr()}render(){if(this.#os)return;const e=this.#os=document.createElement("div");if(e.className="popup",this.#es){const t=e.style.outlineColor=al.makeHexColor(...this.#es);if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))e.style.backgroundColor=`color-mix(in srgb, ${t} 30%, white)`;else{const t=.7;e.style.backgroundColor=al.makeHexColor(...this.#es.map((e=>Math.floor(t*(255-e)+e))))}}const t=document.createElement("span");t.className="header";const i=document.createElement("h1");if(t.append(i),({dir:i.dir,str:i.textContent}=this.#cs),e.append(t),this.#is){const e=document.createElement("span");e.classList.add("popupDate"),e.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),e.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#is.valueOf()})),t.append(e)}const r=this.#us;if(r)Xc.render({xfaHtml:r,intent:"richText",div:e}),e.lastChild.classList.add("richText","popupContent");else{const t=this._formatContents(this.#ts);e.append(t)}this.#pe.append(e)}get#us(){const e=this.#hs,t=this.#ts;return!e?.str||t?.str&&t.str!==e.str?null:this.#hs.html||null}get#ps(){return this.#us?.attributes?.style?.fontSize||0}get#ms(){return this.#us?.attributes?.style?.color||null}#gs(e){const t=[],i={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}},r={style:{color:this.#ms,fontSize:this.#ps?`calc(${this.#ps}px * var(--scale-factor))`:""}};for(const i of e.split("\n"))t.push({name:"span",value:i,attributes:r});return i}_formatContents({str:e,dir:t}){const i=document.createElement("p");i.classList.add("popupContent"),i.dir=t;const r=e.split(/(?:\r\n?|\n)/);for(let e=0,t=r.length;e<t;++e){const s=r[e];i.append(document.createTextNode(s)),e<t-1&&i.append(document.createElement("br"))}return i}#Wr(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||("Enter"===e.key||"Escape"===e.key&&this.#as)&&this.#Qr()}updateEdited({rect:e,popupContent:t}){this.#Br||={contentsObj:this.#ts,richText:this.#hs},e&&(this.#C=null),t&&(this.#hs=this.#gs(t),this.#ts=null),this.#os?.remove(),this.#os=null}resetEdited(){this.#Br&&(({contentsObj:this.#ts,richText:this.#hs}=this.#Br),this.#Br=null,this.#os?.remove(),this.#os=null,this.#C=null)}#fs(){if(null!==this.#C)return;const{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:i,pageX:r,pageY:s}}}=this.#ss;let n=!!this.#ns,a=n?this.#ns:this.#ls;for(const e of this.#rs)if(!a||null!==al.intersect(e.data.rect,a)){a=e.data.rect,n=!0;break}const o=al.normalizeRect([a[0],e[3]-a[1]+e[1],a[2],e[3]-a[3]+e[1]]),l=n?a[2]-a[0]+5:0,h=o[0]+l,c=o[1];this.#C=[100*(h-r)/t,100*(c-s)/i];const{style:d}=this.#pe;d.left=`${this.#C[0]}%`,d.top=`${this.#C[1]}%`}#Qr(){this.#as=!this.#as,this.#as?(this.#Zr(),this.#pe.addEventListener("click",this.#Jr),this.#pe.addEventListener("keydown",this.#$r)):(this.#Yr(),this.#pe.removeEventListener("click",this.#Jr),this.#pe.removeEventListener("keydown",this.#$r))}#Zr(){this.#os||this.render(),this.isVisible?this.#as&&this.#pe.classList.add("focused"):(this.#fs(),this.#pe.hidden=!1,this.#pe.style.zIndex=parseInt(this.#pe.style.zIndex)+1e3)}#Yr(){this.#pe.classList.remove("focused"),!this.#as&&this.isVisible&&(this.#pe.hidden=!0,this.#pe.style.zIndex=parseInt(this.#pe.style.zIndex)-1e3)}forceHide(){this.#ds=this.isVisible,this.#ds&&(this.#pe.hidden=!0)}maybeShow(){this.#ds&&(this.#os||this.#Zr(),this.#ds=!1,this.#pe.hidden=!1)}get isVisible(){return!1===this.#pe.hidden}}class dd extends Qc{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=to.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const t of this.textContent){const i=document.createElement("span");i.textContent=t,e.append(i)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class ud extends Qc{#bs=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const e=this.data,{width:t,height:i}=Zc(e.rect),r=this.svgFactory.create(t,i,!0),s=this.#bs=this.svgFactory.createElement("svg:line");return s.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),s.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),s.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),s.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),s.setAttribute("stroke-width",e.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),r.append(s),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#bs}addHighlightArea(){this.container.classList.add("highlightArea")}}class pd extends Qc{#vs=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const e=this.data,{width:t,height:i}=Zc(e.rect),r=this.svgFactory.create(t,i,!0),s=e.borderStyle.width,n=this.#vs=this.svgFactory.createElement("svg:rect");return n.setAttribute("x",s/2),n.setAttribute("y",s/2),n.setAttribute("width",t-s),n.setAttribute("height",i-s),n.setAttribute("stroke-width",s||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),r.append(n),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#vs}addHighlightArea(){this.container.classList.add("highlightArea")}}class md extends Qc{#ys=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const e=this.data,{width:t,height:i}=Zc(e.rect),r=this.svgFactory.create(t,i,!0),s=e.borderStyle.width,n=this.#ys=this.svgFactory.createElement("svg:ellipse");return n.setAttribute("cx",t/2),n.setAttribute("cy",i/2),n.setAttribute("rx",t/2-s/2),n.setAttribute("ry",i/2-s/2),n.setAttribute("stroke-width",s||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),r.append(n),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#ys}addHighlightArea(){this.container.classList.add("highlightArea")}}class gd extends Qc{#ws=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,vertices:t,borderStyle:i,popupRef:r}}=this;if(!t)return this.container;const{width:s,height:n}=Zc(e),a=this.svgFactory.create(s,n,!0);let o=[];for(let i=0,r=t.length;i<r;i+=2){const r=t[i]-e[0],s=e[3]-t[i+1];o.push(`${r},${s}`)}o=o.join(" ");const l=this.#ws=this.svgFactory.createElement(this.svgElementName);return l.setAttribute("points",o),l.setAttribute("stroke-width",i.width||1),l.setAttribute("stroke","transparent"),l.setAttribute("fill","transparent"),a.append(l),this.container.append(a),!r&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#ws}addHighlightArea(){this.container.classList.add("highlightArea")}}class fd extends gd{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class bd extends Qc{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class vd extends Qc{#xs=null;#As=[];constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType="InkHighlight"===this.data.it?to.HIGHLIGHT:to.INK}#ks(e,t){switch(e){case 90:return{transform:`rotate(90) translate(${-t[0]},${t[1]}) scale(1,-1)`,width:t[3]-t[1],height:t[2]-t[0]};case 180:return{transform:`rotate(180) translate(${-t[2]},${t[1]}) scale(1,-1)`,width:t[2]-t[0],height:t[3]-t[1]};case 270:return{transform:`rotate(270) translate(${-t[2]},${t[3]}) scale(1,-1)`,width:t[3]-t[1],height:t[2]-t[0]};default:return{transform:`translate(${-t[0]},${t[3]}) scale(1,-1)`,width:t[2]-t[0],height:t[3]-t[1]}}}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,rotation:t,inkLists:i,borderStyle:r,popupRef:s}}=this,{transform:n,width:a,height:o}=this.#ks(t,e),l=this.svgFactory.create(a,o,!0),h=this.#xs=this.svgFactory.createElement("svg:g");l.append(h),h.setAttribute("stroke-width",r.width||1),h.setAttribute("stroke-linecap","round"),h.setAttribute("stroke-linejoin","round"),h.setAttribute("stroke-miterlimit",10),h.setAttribute("stroke","transparent"),h.setAttribute("fill","transparent"),h.setAttribute("transform",n);for(let e=0,t=i.length;e<t;e++){const t=this.svgFactory.createElement(this.svgElementName);this.#As.push(t),t.setAttribute("points",i[e].join(",")),h.append(t)}return!s&&this.hasPopupData&&this._createPopup(),this.container.append(l),this._editOnDoubleClick(),this.container}updateEdited(e){super.updateEdited(e);const{thickness:t,points:i,rect:r}=e,s=this.#xs;if(t>=0&&s.setAttribute("stroke-width",t||1),i)for(let e=0,t=this.#As.length;e<t;e++)this.#As[e].setAttribute("points",i[e].join(","));if(r){const{transform:e,width:t,height:i}=this.#ks(this.data.rotation,r);s.parentElement.setAttribute("viewBox",`0 0 ${t} ${i}`),s.setAttribute("transform",e)}}getElementsToTriggerPopup(){return this.#As}addHighlightArea(){this.container.classList.add("highlightArea")}}class yd extends Qc{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=to.HIGHLIGHT}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),this.container}}class wd extends Qc{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class xd extends Qc{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class Ad extends Qc{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class kd extends Qc{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=to.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class Ed extends Qc{#Es=null;constructor(e){super(e,{isRenderable:!0});const{file:t}=this.data;this.filename=t.filename,this.content=t.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...t})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:e,data:t}=this;let i;t.hasAppearance||0===t.fillAlpha?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(t.name)?"paperclip":"pushpin"}.svg`,t.fillAlpha&&t.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(100*t.fillAlpha)}%);`)),i.addEventListener("dblclick",this.#Ss.bind(this)),this.#Es=i;const{isMac:r}=sl.platform;return e.addEventListener("keydown",(e=>{"Enter"===e.key&&(r?e.metaKey:e.ctrlKey)&&this.#Ss()})),!t.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return this.#Es}addHighlightArea(){this.container.classList.add("highlightArea")}#Ss(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}class Sd{#Cs=null;#Ms=null;#_s=new Map;#Ts=null;constructor({div:e,accessibilityManager:t,annotationCanvasMap:i,annotationEditorUIManager:r,page:s,viewport:n,structTreeLayer:a}){this.div=e,this.#Cs=t,this.#Ms=i,this.#Ts=a||null,this.page=s,this.viewport=n,this.zIndex=0,this._annotationEditorUIManager=r}hasEditableAnnotations(){return this.#_s.size>0}async#Ns(e,t){const i=e.firstChild||e,r=i.id=`${cl}${t}`,s=await(this.#Ts?.getAriaAttributes(r));if(s)for(const[e,t]of s)i.setAttribute(e,t);this.div.append(e),this.#Cs?.moveElementInDOM(this.div,e,i,!1)}async render(e){const{annotations:t}=e,i=this.div;Tl(i,this.viewport);const r=new Map,s={data:null,layer:i,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new Wc,annotationStorage:e.annotationStorage||new Yl,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const e of t){if(e.noHTML)continue;const t=e.annotationType===Mo;if(t){const t=r.get(e.id);if(!t)continue;s.elements=t}else{const{width:t,height:i}=Zc(e.rect);if(t<=0||i<=0)continue}s.data=e;const i=Jc.create(s);if(!i.isRenderable)continue;if(!t&&e.popupRef){const t=r.get(e.popupRef);t?t.push(i):r.set(e.popupRef,[i])}const n=i.render();e.hidden&&(n.style.visibility="hidden"),await this.#Ns(n,e.id),i._isEditable&&(this.#_s.set(i.data.id,i),this._annotationEditorUIManager?.renderAnnotationElement(i))}this.#Is()}update({viewport:e}){const t=this.div;this.viewport=e,Tl(t,{rotation:e.rotation}),this.#Is(),t.hidden=!1}#Is(){if(!this.#Ms)return;const e=this.div;for(const[t,i]of this.#Ms){const r=e.querySelector(`[data-annotation-id="${t}"]`);if(!r)continue;i.className="annotationContent";const{firstChild:s}=r;s?"CANVAS"===s.nodeName?s.replaceWith(i):s.classList.contains("annotationContent")?s.after(i):s.before(i):r.append(i)}this.#Ms.clear()}getEditableAnnotations(){return Array.from(this.#_s.values())}getEditableAnnotation(e){return this.#_s.get(e)}}const Cd=/\r\n?|\n/g;class Md extends jl{#es;#Ls="";#Ps=`${this.id}-editor`;#Rs=null;#ps;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const e=Md.prototype,t=e=>e.isEmpty(),i=Bl.TRANSLATE_SMALL,r=Bl.TRANSLATE_BIG;return $o(this,"_keyboardManager",new zl([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[i,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[r,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:t}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,i],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,r],checker:t}]]))}static _type="freetext";static _editorType=to.FREETEXT;constructor(e){super({...e,name:"freeTextEditor"}),this.#es=e.color||Md._defaultColor||jl._defaultLineColor,this.#ps=e.fontSize||Md._defaultFontSize}static initialize(e,t){jl.initialize(e,t);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case io.FREETEXT_SIZE:Md._defaultFontSize=t;break;case io.FREETEXT_COLOR:Md._defaultColor=t}}updateParams(e,t){switch(e){case io.FREETEXT_SIZE:this.#Ds(t);break;case io.FREETEXT_COLOR:this.#Fs(t)}}static get defaultPropertiesToUpdate(){return[[io.FREETEXT_SIZE,Md._defaultFontSize],[io.FREETEXT_COLOR,Md._defaultColor||jl._defaultLineColor]]}get propertiesToUpdate(){return[[io.FREETEXT_SIZE,this.#ps],[io.FREETEXT_COLOR,this.#es]]}#Ds(e){const t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-this.#ps)*this.parentScale),this.#ps=e,this.#zs()},i=this.#ps;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:io.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#Fs(e){const t=e=>{this.#es=this.editorDiv.style.color=e},i=this.#es;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:io.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(e,t){this._uiManager.translateSelectedEditors(e,t,!0)}getInitialTranslation(){const e=this.parentScale;return[-Md._internalPadding*e,-(Md._internalPadding+this.#ps)*e]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(to.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#Rs=new AbortController;const e=this._uiManager.combinedSignal(this.#Rs);this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e})}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#Ps),this._isDraggable=!0,this.#Rs?.abort(),this.#Rs=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(e){this.width||(this.enableEditMode(),e&&this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#Os(){const e=[];this.editorDiv.normalize();let t=null;for(const i of this.editorDiv.childNodes)t?.nodeType===Node.TEXT_NODE&&"BR"===i.nodeName||(e.push(Md.#Bs(i)),t=i);return e.join("\n")}#zs(){const[e,t]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:e,div:t}=this,r=t.style.display,s=t.classList.contains("hidden");t.classList.remove("hidden"),t.style.display="hidden",e.div.append(this.div),i=t.getBoundingClientRect(),t.remove(),t.style.display=r,t.classList.toggle("hidden",s)}this.rotation%180==this.parentRotation%180?(this.width=i.width/e,this.height=i.height/t):(this.width=i.height/e,this.height=i.width/t),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=this.#Ls,t=this.#Ls=this.#Os().trimEnd();if(e===t)return;const i=e=>{this.#Ls=e,e?(this.#Hs(),this._uiManager.rebuild(this),this.#zs()):this.remove()};this.addCommands({cmd:()=>{i(t)},undo:()=>{i(e)},mustExec:!1}),this.#zs()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){Md._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#Ps),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${this.#ps}px * var(--scale-factor))`,i.color=this.#es,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),Pl(this,this.div,["dblclick","keydown"]),this.width){const[i,r]=this.parentDimensions;if(this.annotationElementId){const{position:s}=this._initialData;let[n,a]=this.getInitialTranslation();[n,a]=this.pageTranslationToScreen(n,a);const[o,l]=this.pageDimensions,[h,c]=this.pageTranslation;let d,u;switch(this.rotation){case 0:d=e+(s[0]-h)/o,u=t+this.height-(s[1]-c)/l;break;case 90:d=e+(s[0]-h)/o,u=t-(s[1]-c)/l,[n,a]=[a,-n];break;case 180:d=e-this.width+(s[0]-h)/o,u=t-(s[1]-c)/l,[n,a]=[-n,-a];break;case 270:d=e+(s[0]-h-this.height*l)/o,u=t+(s[1]-c-this.width*o)/l,[n,a]=[-a,n]}this.setAt(d*i,u*r,n,a)}else this.setAt(e*i,t*r,this.width*i,this.height*r);this.#Hs(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#Bs(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(Cd,"")}editorDivPaste(e){const t=e.clipboardData||window.clipboardData,{types:i}=t;if(1===i.length&&"text/plain"===i[0])return;e.preventDefault();const r=Md.#qs(t.getData("text")||"").replaceAll(Cd,"\n");if(!r)return;const s=window.getSelection();if(!s.rangeCount)return;this.editorDiv.normalize(),s.deleteFromDocument();const n=s.getRangeAt(0);if(!r.includes("\n"))return n.insertNode(document.createTextNode(r)),this.editorDiv.normalize(),void s.collapseToStart();const{startContainer:a,startOffset:o}=n,l=[],h=[];if(a.nodeType===Node.TEXT_NODE){const e=a.parentElement;if(h.push(a.nodeValue.slice(o).replaceAll(Cd,"")),e!==this.editorDiv){let t=l;for(const i of this.editorDiv.childNodes)i!==e?t.push(Md.#Bs(i)):t=h}l.push(a.nodeValue.slice(0,o).replaceAll(Cd,""))}else if(a===this.editorDiv){let e=l,t=0;for(const i of this.editorDiv.childNodes)t++===o&&(e=h),e.push(Md.#Bs(i))}this.#Ls=`${l.join("\n")}${r}${h.join("\n")}`,this.#Hs();const c=new Range;let d=l.reduce(((e,t)=>e+t.length),0);for(const{firstChild:e}of this.editorDiv.childNodes)if(e.nodeType===Node.TEXT_NODE){const t=e.nodeValue.length;if(d<=t){c.setStart(e,d),c.setEnd(e,d);break}d-=t}s.removeAllRanges(),s.addRange(c)}#Hs(){if(this.editorDiv.replaceChildren(),this.#Ls)for(const e of this.#Ls.split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}}#js(){return this.#Ls.replaceAll(" "," ")}static#qs(e){return e.replaceAll(" "," ")}get contentDiv(){return this.editorDiv}static async deserialize(e,t,i){let r=null;if(e instanceof dd){const{data:{defaultAppearanceData:{fontSize:t,fontColor:i},rect:s,rotation:n,id:a,popupRef:o},textContent:l,textPosition:h,parent:{page:{pageNumber:c}}}=e;if(!l||0===l.length)return null;r=e={annotationType:to.FREETEXT,color:Array.from(i),fontSize:t,value:l.join("\n"),position:h,pageIndex:c-1,rect:s.slice(0),rotation:n,id:a,deleted:!1,popupRef:o}}const s=await super.deserialize(e,t,i);return s.#ps=e.fontSize,s.#es=al.makeHexColor(...e.color),s.#Ls=Md.#qs(e.value),s.annotationElementId=e.id||null,s._initialData=r,s}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const t=Md._internalPadding*this.parentScale,i=this.getRect(t,t),r=jl._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#es),s={annotationType:to.FREETEXT,color:r,fontSize:this.#ps,value:this.#js(),pageIndex:this.pageIndex,rect:i,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?s:this.annotationElementId&&!this.#Vs(s)?null:(s.id=this.annotationElementId,s)}#Vs(e){const{value:t,fontSize:i,color:r,pageIndex:s}=this._initialData;return this._hasBeenMoved||e.value!==t||e.fontSize!==i||e.color.some(((e,t)=>e!==r[t]))||e.pageIndex!==s}renderAnnotationElement(e){const t=super.renderAnnotationElement(e);if(this.deleted)return t;const{style:i}=t;i.fontSize=`calc(${this.#ps}px * var(--scale-factor))`,i.color=this.#es,t.replaceChildren();for(const e of this.#Ls.split("\n")){const i=document.createElement("div");i.append(e?document.createTextNode(e):document.createElement("br")),t.append(i)}const r=Md._internalPadding*this.parentScale;return e.updateEdited({rect:this.getRect(r,r),popupContent:this.#Ls}),t}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}}class _d{static PRECISION=1e-4;toSVGPath(){Vo("Abstract method `toSVGPath` must be implemented.")}get box(){Vo("Abstract getter `box` must be implemented.")}serialize(e,t){Vo("Abstract method `serialize` must be implemented.")}static _rescale(e,t,i,r,s,n){n||=new Float32Array(e.length);for(let a=0,o=e.length;a<o;a+=2)n[a]=t+e[a]*r,n[a+1]=i+e[a+1]*s;return n}static _rescaleAndSwap(e,t,i,r,s,n){n||=new Float32Array(e.length);for(let a=0,o=e.length;a<o;a+=2)n[a]=t+e[a+1]*r,n[a+1]=i+e[a]*s;return n}static _translate(e,t,i,r){r||=new Float32Array(e.length);for(let s=0,n=e.length;s<n;s+=2)r[s]=t+e[s],r[s+1]=i+e[s+1];return r}static svgRound(e){return Math.round(1e4*e)}static _normalizePoint(e,t,i,r,s){switch(s){case 90:return[1-t/i,e/r];case 180:return[1-e/i,1-t/r];case 270:return[t/i,1-e/r];default:return[e/i,t/r]}}static _normalizePagePoint(e,t,i){switch(i){case 90:return[1-t,e];case 180:return[1-e,1-t];case 270:return[t,1-e];default:return[e,t]}}static createBezierPoints(e,t,i,r,s,n){return[(e+5*i)/6,(t+5*r)/6,(5*i+s)/6,(5*r+n)/6,(i+s)/2,(r+n)/2]}}class Td{#Us;#Gs=[];#$s;#Ws;#Xs=[];#Ys=new Float32Array(18);#Ks;#Zs;#Js;#Qs;#en;#tn;#in=[];static#rn=8;static#sn=2;static#nn=Td.#rn+Td.#sn;constructor({x:e,y:t},i,r,s,n,a=0){this.#Us=i,this.#tn=s*r,this.#Ws=n,this.#Ys.set([NaN,NaN,NaN,NaN,e,t],6),this.#$s=a,this.#Qs=Td.#rn*r,this.#Js=Td.#nn*r,this.#en=r,this.#in.push(e,t)}isEmpty(){return isNaN(this.#Ys[8])}#an(){const e=this.#Ys.subarray(4,6),t=this.#Ys.subarray(16,18),[i,r,s,n]=this.#Us;return[(this.#Ks+(e[0]-t[0])/2-i)/s,(this.#Zs+(e[1]-t[1])/2-r)/n,(this.#Ks+(t[0]-e[0])/2-i)/s,(this.#Zs+(t[1]-e[1])/2-r)/n]}add({x:e,y:t}){this.#Ks=e,this.#Zs=t;const[i,r,s,n]=this.#Us;let[a,o,l,h]=this.#Ys.subarray(8,12);const c=e-l,d=t-h,u=Math.hypot(c,d);if(u<this.#Js)return!1;const p=u-this.#Qs,m=p/u,g=m*c,f=m*d;let b=a,v=o;a=l,o=h,l+=g,h+=f,this.#in?.push(e,t);const y=g/p,w=-f/p*this.#tn,x=y*this.#tn;if(this.#Ys.set(this.#Ys.subarray(2,8),0),this.#Ys.set([l+w,h+x],4),this.#Ys.set(this.#Ys.subarray(14,18),12),this.#Ys.set([l-w,h-x],16),isNaN(this.#Ys[6]))return 0===this.#Xs.length&&(this.#Ys.set([a+w,o+x],2),this.#Xs.push(NaN,NaN,NaN,NaN,(a+w-i)/s,(o+x-r)/n),this.#Ys.set([a-w,o-x],14),this.#Gs.push(NaN,NaN,NaN,NaN,(a-w-i)/s,(o-x-r)/n)),this.#Ys.set([b,v,a,o,l,h],6),!this.isEmpty();this.#Ys.set([b,v,a,o,l,h],6);return Math.abs(Math.atan2(v-o,b-a)-Math.atan2(f,g))<Math.PI/2?([a,o,l,h]=this.#Ys.subarray(2,6),this.#Xs.push(NaN,NaN,NaN,NaN,((a+l)/2-i)/s,((o+h)/2-r)/n),[a,o,b,v]=this.#Ys.subarray(14,18),this.#Gs.push(NaN,NaN,NaN,NaN,((b+a)/2-i)/s,((v+o)/2-r)/n),!0):([b,v,a,o,l,h]=this.#Ys.subarray(0,6),this.#Xs.push(((b+5*a)/6-i)/s,((v+5*o)/6-r)/n,((5*a+l)/6-i)/s,((5*o+h)/6-r)/n,((a+l)/2-i)/s,((o+h)/2-r)/n),[l,h,a,o,b,v]=this.#Ys.subarray(12,18),this.#Gs.push(((b+5*a)/6-i)/s,((v+5*o)/6-r)/n,((5*a+l)/6-i)/s,((5*o+h)/6-r)/n,((a+l)/2-i)/s,((o+h)/2-r)/n),!0)}toSVGPath(){if(this.isEmpty())return"";const e=this.#Xs,t=this.#Gs;if(isNaN(this.#Ys[6])&&!this.isEmpty())return this.#on();const i=[];i.push(`M${e[4]} ${e[5]}`);for(let t=6;t<e.length;t+=6)isNaN(e[t])?i.push(`L${e[t+4]} ${e[t+5]}`):i.push(`C${e[t]} ${e[t+1]} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${e[t+5]}`);this.#ln(i);for(let e=t.length-6;e>=6;e-=6)isNaN(t[e])?i.push(`L${t[e+4]} ${t[e+5]}`):i.push(`C${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${t[e+5]}`);return this.#hn(i),i.join(" ")}#on(){const[e,t,i,r]=this.#Us,[s,n,a,o]=this.#an();return`M${(this.#Ys[2]-e)/i} ${(this.#Ys[3]-t)/r} L${(this.#Ys[4]-e)/i} ${(this.#Ys[5]-t)/r} L${s} ${n} L${a} ${o} L${(this.#Ys[16]-e)/i} ${(this.#Ys[17]-t)/r} L${(this.#Ys[14]-e)/i} ${(this.#Ys[15]-t)/r} Z`}#hn(e){const t=this.#Gs;e.push(`L${t[4]} ${t[5]} Z`)}#ln(e){const[t,i,r,s]=this.#Us,n=this.#Ys.subarray(4,6),a=this.#Ys.subarray(16,18),[o,l,h,c]=this.#an();e.push(`L${(n[0]-t)/r} ${(n[1]-i)/s} L${o} ${l} L${h} ${c} L${(a[0]-t)/r} ${(a[1]-i)/s}`)}newFreeDrawOutline(e,t,i,r,s,n){return new Nd(e,t,i,r,s,n)}getOutlines(){const e=this.#Xs,t=this.#Gs,i=this.#Ys,[r,s,n,a]=this.#Us,o=new Float32Array((this.#in?.length??0)+2);for(let e=0,t=o.length-2;e<t;e+=2)o[e]=(this.#in[e]-r)/n,o[e+1]=(this.#in[e+1]-s)/a;if(o[o.length-2]=(this.#Ks-r)/n,o[o.length-1]=(this.#Zs-s)/a,isNaN(i[6])&&!this.isEmpty())return this.#cn(o);const l=new Float32Array(this.#Xs.length+24+this.#Gs.length);let h=e.length;for(let t=0;t<h;t+=2)isNaN(e[t])?l[t]=l[t+1]=NaN:(l[t]=e[t],l[t+1]=e[t+1]);h=this.#dn(l,h);for(let e=t.length-6;e>=6;e-=6)for(let i=0;i<6;i+=2)isNaN(t[e+i])?(l[h]=l[h+1]=NaN,h+=2):(l[h]=t[e+i],l[h+1]=t[e+i+1],h+=2);return this.#un(l,h),this.newFreeDrawOutline(l,o,this.#Us,this.#en,this.#$s,this.#Ws)}#cn(e){const t=this.#Ys,[i,r,s,n]=this.#Us,[a,o,l,h]=this.#an(),c=new Float32Array(36);return c.set([NaN,NaN,NaN,NaN,(t[2]-i)/s,(t[3]-r)/n,NaN,NaN,NaN,NaN,(t[4]-i)/s,(t[5]-r)/n,NaN,NaN,NaN,NaN,a,o,NaN,NaN,NaN,NaN,l,h,NaN,NaN,NaN,NaN,(t[16]-i)/s,(t[17]-r)/n,NaN,NaN,NaN,NaN,(t[14]-i)/s,(t[15]-r)/n],0),this.newFreeDrawOutline(c,e,this.#Us,this.#en,this.#$s,this.#Ws)}#un(e,t){const i=this.#Gs;return e.set([NaN,NaN,NaN,NaN,i[4],i[5]],t),t+6}#dn(e,t){const i=this.#Ys.subarray(4,6),r=this.#Ys.subarray(16,18),[s,n,a,o]=this.#Us,[l,h,c,d]=this.#an();return e.set([NaN,NaN,NaN,NaN,(i[0]-s)/a,(i[1]-n)/o,NaN,NaN,NaN,NaN,l,h,NaN,NaN,NaN,NaN,c,d,NaN,NaN,NaN,NaN,(r[0]-s)/a,(r[1]-n)/o],t),t+24}}class Nd extends _d{#Us;#pn=new Float32Array(4);#$s;#Ws;#in;#en;#mn;constructor(e,t,i,r,s,n){super(),this.#mn=e,this.#in=t,this.#Us=i,this.#en=r,this.#$s=s,this.#Ws=n,this.lastPoint=[NaN,NaN],this.#gn(n);const[a,o,l,h]=this.#pn;for(let t=0,i=e.length;t<i;t+=2)e[t]=(e[t]-a)/l,e[t+1]=(e[t+1]-o)/h;for(let e=0,i=t.length;e<i;e+=2)t[e]=(t[e]-a)/l,t[e+1]=(t[e+1]-o)/h}toSVGPath(){const e=[`M${this.#mn[4]} ${this.#mn[5]}`];for(let t=6,i=this.#mn.length;t<i;t+=6)isNaN(this.#mn[t])?e.push(`L${this.#mn[t+4]} ${this.#mn[t+5]}`):e.push(`C${this.#mn[t]} ${this.#mn[t+1]} ${this.#mn[t+2]} ${this.#mn[t+3]} ${this.#mn[t+4]} ${this.#mn[t+5]}`);return e.push("Z"),e.join(" ")}serialize([e,t,i,r],s){const n=i-e,a=r-t;let o,l;switch(s){case 0:o=_d._rescale(this.#mn,e,r,n,-a),l=_d._rescale(this.#in,e,r,n,-a);break;case 90:o=_d._rescaleAndSwap(this.#mn,e,t,n,a),l=_d._rescaleAndSwap(this.#in,e,t,n,a);break;case 180:o=_d._rescale(this.#mn,i,t,-n,a),l=_d._rescale(this.#in,i,t,-n,a);break;case 270:o=_d._rescaleAndSwap(this.#mn,i,r,-n,-a),l=_d._rescaleAndSwap(this.#in,i,r,-n,-a)}return{outline:Array.from(o),points:[Array.from(l)]}}#gn(e){const t=this.#mn;let i=t[4],r=t[5],s=i,n=r,a=i,o=r,l=i,h=r;const c=e?Math.max:Math.min;for(let e=6,d=t.length;e<d;e+=6){if(isNaN(t[e]))s=Math.min(s,t[e+4]),n=Math.min(n,t[e+5]),a=Math.max(a,t[e+4]),o=Math.max(o,t[e+5]),h<t[e+5]?(l=t[e+4],h=t[e+5]):h===t[e+5]&&(l=c(l,t[e+4]));else{const d=al.bezierBoundingBox(i,r,...t.slice(e,e+6));s=Math.min(s,d[0]),n=Math.min(n,d[1]),a=Math.max(a,d[2]),o=Math.max(o,d[3]),h<d[3]?(l=d[2],h=d[3]):h===d[3]&&(l=c(l,d[2]))}i=t[e+4],r=t[e+5]}const d=this.#pn;d[0]=s-this.#$s,d[1]=n-this.#$s,d[2]=a-s+2*this.#$s,d[3]=o-n+2*this.#$s,this.lastPoint=[l,h]}get box(){return this.#pn}newOutliner(e,t,i,r,s,n=0){return new Td(e,t,i,r,s,n)}getNewOutline(e,t){const[i,r,s,n]=this.#pn,[a,o,l,h]=this.#Us,c=s*l,d=n*h,u=i*l+a,p=r*h+o,m=this.newOutliner({x:this.#in[0]*c+u,y:this.#in[1]*d+p},this.#Us,this.#en,e,this.#Ws,t??this.#$s);for(let e=2;e<this.#in.length;e+=2)m.add({x:this.#in[e]*c+u,y:this.#in[e+1]*d+p});return m.getOutlines()}}class Id{#Us;#fn;#bn=[];#vn=[];constructor(e,t=0,i=0,r=!0){let s=1/0,n=-1/0,a=1/0,o=-1/0;const l=10**-4;for(const{x:i,y:r,width:h,height:c}of e){const e=Math.floor((i-t)/l)*l,d=Math.ceil((i+h+t)/l)*l,u=Math.floor((r-t)/l)*l,p=Math.ceil((r+c+t)/l)*l,m=[e,u,p,!0],g=[d,u,p,!1];this.#bn.push(m,g),s=Math.min(s,e),n=Math.max(n,d),a=Math.min(a,u),o=Math.max(o,p)}const h=n-s+2*i,c=o-a+2*i,d=s-i,u=a-i,p=this.#bn.at(r?-1:-2),m=[p[0],p[2]];for(const e of this.#bn){const[t,i,r]=e;e[0]=(t-d)/h,e[1]=(i-u)/c,e[2]=(r-u)/c}this.#Us=new Float32Array([d,u,h,c]),this.#fn=m}getOutlines(){this.#bn.sort(((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2]));const e=[];for(const t of this.#bn)t[3]?(e.push(...this.#yn(t)),this.#wn(t)):(this.#xn(t),e.push(...this.#yn(t)));return this.#An(e)}#An(e){const t=[],i=new Set;for(const i of e){const[e,r,s]=i;t.push([e,r,i],[e,s,i])}t.sort(((e,t)=>e[1]-t[1]||e[0]-t[0]));for(let e=0,r=t.length;e<r;e+=2){const r=t[e][2],s=t[e+1][2];r.push(s),s.push(r),i.add(r),i.add(s)}const r=[];let s;for(;i.size>0;){const e=i.values().next().value;let[t,n,a,o,l]=e;i.delete(e);let h=t,c=n;for(s=[t,a],r.push(s);;){let e;if(i.has(o))e=o;else{if(!i.has(l))break;e=l}i.delete(e),[t,n,a,o,l]=e,h!==t&&(s.push(h,c,t,c===n?n:a),h=t),c=c===n?a:n}s.push(h,c)}return new Ld(r,this.#Us,this.#fn)}#kn(e){const t=this.#vn;let i=0,r=t.length-1;for(;i<=r;){const s=i+r>>1,n=t[s][0];if(n===e)return s;n<e?i=s+1:r=s-1}return r+1}#wn([,e,t]){const i=this.#kn(e);this.#vn.splice(i,0,[e,t])}#xn([,e,t]){const i=this.#kn(e);for(let r=i;r<this.#vn.length;r++){const[i,s]=this.#vn[r];if(i!==e)break;if(i===e&&s===t)return void this.#vn.splice(r,1)}for(let r=i-1;r>=0;r--){const[i,s]=this.#vn[r];if(i!==e)break;if(i===e&&s===t)return void this.#vn.splice(r,1)}}#yn(e){const[t,i,r]=e,s=[[t,i,r]],n=this.#kn(r);for(let e=0;e<n;e++){const[i,r]=this.#vn[e];for(let e=0,n=s.length;e<n;e++){const[,a,o]=s[e];if(!(r<=a||o<=i))if(a>=i)if(o>r)s[e][1]=r;else{if(1===n)return[];s.splice(e,1),e--,n--}else s[e][2]=i,o>r&&s.push([t,r,o])}}return s}}class Ld extends _d{#Us;#En;constructor(e,t,i){super(),this.#En=e,this.#Us=t,this.lastPoint=i}toSVGPath(){const e=[];for(const t of this.#En){let[i,r]=t;e.push(`M${i} ${r}`);for(let s=2;s<t.length;s+=2){const n=t[s],a=t[s+1];n===i?(e.push(`V${a}`),r=a):a===r&&(e.push(`H${n}`),i=n)}e.push("Z")}return e.join(" ")}serialize([e,t,i,r],s){const n=[],a=i-e,o=r-t;for(const t of this.#En){const i=new Array(t.length);for(let s=0;s<t.length;s+=2)i[s]=e+t[s]*a,i[s+1]=r-t[s+1]*o;n.push(i)}return n}get box(){return this.#Us}get classNamesForOutlining(){return["highlightOutline"]}}class Pd extends Td{newFreeDrawOutline(e,t,i,r,s,n){return new Rd(e,t,i,r,s,n)}}class Rd extends Nd{newOutliner(e,t,i,r,s,n=0){return new Pd(e,t,i,r,s,n)}}class Dd{#Sn=null;#Cn=null;#Mn;#_n=null;#Tn=!1;#Nn=!1;#n=null;#In;#Ln=null;#g=null;#Pn;static#Rn=null;static get _keyboardManager(){return $o(this,"_keyboardManager",new zl([[["Escape","mac+Escape"],Dd.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],Dd.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],Dd.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],Dd.prototype._moveToPrevious],[["Home","mac+Home"],Dd.prototype._moveToBeginning],[["End","mac+End"],Dd.prototype._moveToEnd]]))}constructor({editor:e=null,uiManager:t=null}){e?(this.#Nn=!1,this.#Pn=io.HIGHLIGHT_COLOR,this.#n=e):(this.#Nn=!0,this.#Pn=io.HIGHLIGHT_DEFAULT_COLOR),this.#g=e?._uiManager||t,this.#In=this.#g._eventBus,this.#Mn=e?.color||this.#g?.highlightColors.values().next().value||"#FFFF98",Dd.#Rn||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){const e=this.#Sn=document.createElement("button");e.className="colorPicker",e.tabIndex="0",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),e.setAttribute("aria-haspopup",!0);const t=this.#g._signal;e.addEventListener("click",this.#Dn.bind(this),{signal:t}),e.addEventListener("keydown",this.#Wr.bind(this),{signal:t});const i=this.#Cn=document.createElement("span");return i.className="swatch",i.setAttribute("aria-hidden",!0),i.style.backgroundColor=this.#Mn,e.append(i),e}renderMainDropdown(){const e=this.#_n=this.#Fn();return e.setAttribute("aria-orientation","horizontal"),e.setAttribute("aria-labelledby","highlightColorPickerLabel"),e}#Fn(){const e=document.createElement("div"),t=this.#g._signal;e.addEventListener("contextmenu",Al,{signal:t}),e.className="dropdown",e.role="listbox",e.setAttribute("aria-multiselectable",!1),e.setAttribute("aria-orientation","vertical"),e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown");for(const[i,r]of this.#g.highlightColors){const s=document.createElement("button");s.tabIndex="0",s.role="option",s.setAttribute("data-color",r),s.title=i,s.setAttribute("data-l10n-id",Dd.#Rn[i]);const n=document.createElement("span");s.append(n),n.className="swatch",n.style.backgroundColor=r,s.setAttribute("aria-selected",r===this.#Mn),s.addEventListener("click",this.#zn.bind(this,r),{signal:t}),e.append(s)}return e.addEventListener("keydown",this.#Wr.bind(this),{signal:t}),e}#zn(e,t){t.stopPropagation(),this.#In.dispatch("switchannotationeditorparams",{source:this,type:this.#Pn,value:e})}_colorSelectFromKeyboard(e){if(e.target===this.#Sn)return void this.#Dn(e);const t=e.target.getAttribute("data-color");t&&this.#zn(t,e)}_moveToNext(e){this.#On?e.target!==this.#Sn?e.target.nextSibling?.focus():this.#_n.firstChild?.focus():this.#Dn(e)}_moveToPrevious(e){e.target!==this.#_n?.firstChild&&e.target!==this.#Sn?(this.#On||this.#Dn(e),e.target.previousSibling?.focus()):this.#On&&this._hideDropdownFromKeyboard()}_moveToBeginning(e){this.#On?this.#_n.firstChild?.focus():this.#Dn(e)}_moveToEnd(e){this.#On?this.#_n.lastChild?.focus():this.#Dn(e)}#Wr(e){Dd._keyboardManager.exec(this,e)}#Dn(e){if(this.#On)return void this.hideDropdown();if(this.#Tn=0===e.detail,this.#Ln||(this.#Ln=new AbortController,window.addEventListener("pointerdown",this.#h.bind(this),{signal:this.#g.combinedSignal(this.#Ln)})),this.#_n)return void this.#_n.classList.remove("hidden");const t=this.#_n=this.#Fn();this.#Sn.append(t)}#h(e){this.#_n?.contains(e.target)||this.hideDropdown()}hideDropdown(){this.#_n?.classList.add("hidden"),this.#Ln?.abort(),this.#Ln=null}get#On(){return this.#_n&&!this.#_n.classList.contains("hidden")}_hideDropdownFromKeyboard(){this.#Nn||(this.#On?(this.hideDropdown(),this.#Sn.focus({preventScroll:!0,focusVisible:this.#Tn})):this.#n?.unselect())}updateColor(e){if(this.#Cn&&(this.#Cn.style.backgroundColor=e),!this.#_n)return;const t=this.#g.highlightColors.values();for(const i of this.#_n.children)i.setAttribute("aria-selected",t.next().value===e)}destroy(){this.#Sn?.remove(),this.#Sn=null,this.#Cn=null,this.#_n?.remove(),this.#_n=null}}class Fd extends jl{#Bn=null;#Hn=0;#qn;#jn=null;#s=null;#Vn=null;#Un=null;#Gn=0;#$n=null;#Wn=null;#y=null;#Xn=!1;#fn=null;#Yn;#Kn=null;#Zn="";#tn;#Jn="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _type="highlight";static _editorType=to.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){const e=Fd.prototype;return $o(this,"_keyboardManager",new zl([[["ArrowLeft","mac+ArrowLeft"],e._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],e._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],e._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],e._moveCaret,{args:[3]}]]))}constructor(e){super({...e,name:"highlightEditor"}),this.color=e.color||Fd._defaultColor,this.#tn=e.thickness||Fd._defaultThickness,this.#Yn=e.opacity||Fd._defaultOpacity,this.#qn=e.boxes||null,this.#Jn=e.methodOfCreation||"",this.#Zn=e.text||"",this._isDraggable=!1,e.highlightId>-1?(this.#Xn=!0,this.#Qn(e),this.#ea()):this.#qn&&(this.#Bn=e.anchorNode,this.#Hn=e.anchorOffset,this.#Un=e.focusNode,this.#Gn=e.focusOffset,this.#ta(),this.#ea(),this.rotate(this.rotation))}get telemetryInitialData(){return{action:"added",type:this.#Xn?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:this.#tn,methodOfCreation:this.#Jn}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("color").size}}#ta(){const e=new Id(this.#qn,.001);this.#Wn=e.getOutlines(),[this.x,this.y,this.width,this.height]=this.#Wn.box;const t=new Id(this.#qn,.0025,.001,"ltr"===this._uiManager.direction);this.#Vn=t.getOutlines();const{lastPoint:i}=this.#Vn;this.#fn=[(i[0]-this.x)/this.width,(i[1]-this.y)/this.height]}#Qn({highlightOutlines:e,highlightId:t,clipPathId:i}){this.#Wn=e;if(this.#Vn=e.getNewOutline(this.#tn/2+1.5,.0025),t>=0)this.#y=t,this.#jn=i,this.parent.drawLayer.finalizeDraw(t,{bbox:e.box,path:{d:e.toSVGPath()}}),this.#Kn=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#Vn.box,path:{d:this.#Vn.toSVGPath()}},!0);else if(this.parent){const t=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#y,{bbox:Fd.#ia(this.#Wn.box,(t-this.rotation+360)%360),path:{d:e.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#Kn,{bbox:Fd.#ia(this.#Vn.box,t),path:{d:this.#Vn.toSVGPath()}})}const[r,s,n,a]=e.box;switch(this.rotation){case 0:this.x=r,this.y=s,this.width=n,this.height=a;break;case 90:{const[e,t]=this.parentDimensions;this.x=s,this.y=1-r,this.width=n*t/e,this.height=a*e/t;break}case 180:this.x=1-r,this.y=1-s,this.width=n,this.height=a;break;case 270:{const[e,t]=this.parentDimensions;this.x=1-s,this.y=r,this.width=n*t/e,this.height=a*e/t;break}}const{lastPoint:o}=this.#Vn;this.#fn=[(o[0]-r)/n,(o[1]-s)/a]}static initialize(e,t){jl.initialize(e,t),Fd._defaultColor||=t.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(e,t){switch(e){case io.HIGHLIGHT_DEFAULT_COLOR:Fd._defaultColor=t;break;case io.HIGHLIGHT_THICKNESS:Fd._defaultThickness=t}}translateInPage(e,t){}get toolbarPosition(){return this.#fn}updateParams(e,t){switch(e){case io.HIGHLIGHT_COLOR:this.#Fs(t);break;case io.HIGHLIGHT_THICKNESS:this.#ra(t)}}static get defaultPropertiesToUpdate(){return[[io.HIGHLIGHT_DEFAULT_COLOR,Fd._defaultColor],[io.HIGHLIGHT_THICKNESS,Fd._defaultThickness]]}get propertiesToUpdate(){return[[io.HIGHLIGHT_COLOR,this.color||Fd._defaultColor],[io.HIGHLIGHT_THICKNESS,this.#tn||Fd._defaultThickness],[io.HIGHLIGHT_FREE,this.#Xn]]}#Fs(e){const t=(e,t)=>{this.color=e,this.#Yn=t,this.parent?.drawLayer.updateProperties(this.#y,{root:{fill:e,"fill-opacity":t}}),this.#s?.updateColor(e)},i=this.color,r=this.#Yn;this.addCommands({cmd:t.bind(this,e,Fd._defaultOpacity),undo:t.bind(this,i,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:io.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(e)},!0)}#ra(e){const t=this.#tn,i=e=>{this.#tn=e,this.#sa(e)};this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,t),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:io.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)}async addEditToolbar(){const e=await super.addEditToolbar();return e?(this._uiManager.highlightColors&&(this.#s=new Dd({editor:this}),e.addColorPicker(this.#s)),e):null}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#na())}getBaseTranslation(){return[0,0]}getRect(e,t){return super.getRect(e,t,this.#na())}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),e&&this.div.focus()}remove(){this.#aa(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.#ea(),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){let t=!1;this.parent&&!e?this.#aa():e&&(this.#ea(e),t=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(e),this.show(this._isVisible),t&&this.select()}#sa(e){if(!this.#Xn)return;this.#Qn({highlightOutlines:this.#Wn.getNewOutline(e/2)}),this.fixAndSetPosition();const[t,i]=this.parentDimensions;this.setDims(this.width*t,this.height*i)}#aa(){null!==this.#y&&this.parent&&(this.parent.drawLayer.remove(this.#y),this.#y=null,this.parent.drawLayer.remove(this.#Kn),this.#Kn=null)}#ea(e=this.parent){null===this.#y&&(({id:this.#y,clipPathId:this.#jn}=e.drawLayer.draw({bbox:this.#Wn.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.#Yn},rootClass:{highlight:!0,free:this.#Xn},path:{d:this.#Wn.toSVGPath()}},!1,!0)),this.#Kn=e.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#Xn},bbox:this.#Vn.box,path:{d:this.#Vn.toSVGPath()}},this.#Xn),this.#$n&&(this.#$n.style.clipPath=this.#jn))}static#ia([e,t,i,r],s){switch(s){case 90:return[1-t-r,e,r,i];case 180:return[1-e-i,1-t-r,i,r];case 270:return[t,1-e-i,r,i]}return[e,t,i,r]}rotate(e){const{drawLayer:t}=this.parent;let i;this.#Xn?(e=(e-this.rotation+360)%360,i=Fd.#ia(this.#Wn.box,e)):i=Fd.#ia([this.x,this.y,this.width,this.height],e),t.updateProperties(this.#y,{bbox:i,root:{"data-main-rotation":e}}),t.updateProperties(this.#Kn,{bbox:Fd.#ia(this.#Vn.box,e),root:{"data-main-rotation":e}})}render(){if(this.div)return this.div;const e=super.render();this.#Zn&&(e.setAttribute("aria-label",this.#Zn),e.setAttribute("role","mark")),this.#Xn?e.classList.add("free"):this.div.addEventListener("keydown",this.#oa.bind(this),{signal:this._uiManager._signal});const t=this.#$n=document.createElement("div");e.append(t),t.setAttribute("aria-hidden","true"),t.className="internal",t.style.clipPath=this.#jn;const[i,r]=this.parentDimensions;return this.setDims(this.width*i,this.height*r),Pl(this,this.#$n,["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#Kn,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#Kn,{rootClass:{hovered:!1}})}#oa(e){Fd._keyboardManager.exec(this,e)}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:this.#la(!0);break;case 1:case 3:this.#la(!1)}}#la(e){if(!this.#Bn)return;const t=window.getSelection();e?t.setPosition(this.#Bn,this.#Hn):t.setPosition(this.#Un,this.#Gn)}select(){super.select(),this.#Kn&&this.parent?.drawLayer.updateProperties(this.#Kn,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#Kn&&(this.parent?.drawLayer.updateProperties(this.#Kn,{rootClass:{selected:!1}}),this.#Xn||this.#la(!1))}get _mustFixPosition(){return!this.#Xn}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.updateProperties(this.#y,{rootClass:{hidden:!e}}),this.parent.drawLayer.updateProperties(this.#Kn,{rootClass:{hidden:!e}}))}#na(){return this.#Xn?this.rotation:0}#ha(){if(this.#Xn)return null;const[e,t]=this.pageDimensions,[i,r]=this.pageTranslation,s=this.#qn,n=new Float32Array(8*s.length);let a=0;for(const{x:o,y:l,width:h,height:c}of s){const s=o*e+i,d=(1-l)*t+r;n[a]=n[a+4]=s,n[a+1]=n[a+3]=d,n[a+2]=n[a+6]=s+h*e,n[a+5]=n[a+7]=d-c*t,a+=8}return n}#ca(e){return this.#Wn.serialize(e,this.#na())}static startHighlighting(e,t,{target:i,x:r,y:s}){const{x:n,y:a,width:o,height:l}=i.getBoundingClientRect(),h=new AbortController,c=e.combinedSignal(h),d=t=>{h.abort(),this.#da(e,t)};window.addEventListener("blur",d,{signal:c}),window.addEventListener("pointerup",d,{signal:c}),window.addEventListener("pointerdown",kl,{capture:!0,passive:!1,signal:c}),window.addEventListener("contextmenu",Al,{signal:c}),i.addEventListener("pointermove",this.#ua.bind(this,e),{signal:c}),this._freeHighlight=new Pd({x:r,y:s},[n,a,o,l],e.scale,this._defaultThickness/2,t,.001),({id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0))}static#ua(e,t){this._freeHighlight.add(t)&&e.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#da(e,t){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(t,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(e,t,i){let r=null;if(e instanceof yd){const{data:{quadPoints:t,rect:i,rotation:s,id:n,color:a,opacity:o,popupRef:l},parent:{page:{pageNumber:h}}}=e;r=e={annotationType:to.HIGHLIGHT,color:Array.from(a),opacity:o,quadPoints:t,boxes:null,pageIndex:h-1,rect:i.slice(0),rotation:s,id:n,deleted:!1,popupRef:l}}else if(e instanceof vd){const{data:{inkLists:t,rect:i,rotation:s,id:n,color:a,borderStyle:{rawWidth:o},popupRef:l},parent:{page:{pageNumber:h}}}=e;r=e={annotationType:to.HIGHLIGHT,color:Array.from(a),thickness:o,inkLists:t,boxes:null,pageIndex:h-1,rect:i.slice(0),rotation:s,id:n,deleted:!1,popupRef:l}}const{color:s,quadPoints:n,inkLists:a,opacity:o}=e,l=await super.deserialize(e,t,i);l.color=al.makeHexColor(...s),l.#Yn=o||1,a&&(l.#tn=e.thickness),l.annotationElementId=e.id||null,l._initialData=r;const[h,c]=l.pageDimensions,[d,u]=l.pageTranslation;if(n){const e=l.#qn=[];for(let t=0;t<n.length;t+=8)e.push({x:(n[t]-d)/h,y:1-(n[t+1]-u)/c,width:(n[t+2]-n[t])/h,height:(n[t+1]-n[t+5])/c});l.#ta(),l.#ea(),l.rotate(l.rotation)}else if(a){l.#Xn=!0;const e=a[0],i={x:e[0]-d,y:c-(e[1]-u)},r=new Pd(i,[0,0,h,c],1,l.#tn/2,!0,.001);for(let t=0,s=e.length;t<s;t+=2)i.x=e[t]-d,i.y=c-(e[t+1]-u),r.add(i);const{id:s,clipPathId:n}=t.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:l.color,"fill-opacity":l._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:r.toSVGPath()}},!0,!0);l.#Qn({highlightOutlines:r.getOutlines(),highlightId:s,clipPathId:n}),l.#ea()}return l}serialize(e=!1){if(this.isEmpty()||e)return null;if(this.deleted)return this.serializeDeleted();const t=this.getRect(0,0),i=jl._colorManager.convert(this.color),r={annotationType:to.HIGHLIGHT,color:i,opacity:this.#Yn,thickness:this.#tn,quadPoints:this.#ha(),outlines:this.#ca(t),pageIndex:this.pageIndex,rect:t,rotation:this.#na(),structTreeParentId:this._structTreeParentId};return this.annotationElementId&&!this.#Vs(r)?null:(r.id=this.annotationElementId,r)}#Vs(e){const{color:t}=this._initialData;return e.color.some(((e,i)=>e!==t[i]))}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}}class zd{#pa=Object.create(null);updateProperty(e,t){this[e]=t,this.updateSVGProperty(e,t)}updateProperties(e){if(e)for(const[t,i]of Object.entries(e))this.updateProperty(t,i)}updateSVGProperty(e,t){this.#pa[e]=t}toSVGProperties(){const e=this.#pa;return this.#pa=Object.create(null),{root:e}}reset(){this.#pa=Object.create(null)}updateAll(e=this){this.updateProperties(e)}clone(){Vo("Not implemented")}}class Od extends jl{#ma=null;#ga;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#fa=null;static#ba=null;static#va=null;static#ya=NaN;static#wa=null;static#xa=null;static#Aa=NaN;static _INNER_MARGIN=3;constructor(e){super(e),this.#ga=e.mustBeCommitted||!1,e.drawOutlines&&(this.#ka(e),this.#ea())}#ka({drawOutlines:e,drawId:t,drawingOptions:i}){this.#ma=e,this._drawingOptions||=i,t>=0?(this._drawId=t,this.parent.drawLayer.finalizeDraw(t,e.defaultProperties)):this._drawId=this.#Ea(e,this.parent),this.#Sa(e.box)}#Ea(e,t){const{id:i}=t.drawLayer.draw(Od._mergeSVGProperties(this._drawingOptions.toSVGProperties(),e.defaultSVGProperties),!1,!1);return i}static _mergeSVGProperties(e,t){const i=new Set(Object.keys(e));for(const[r,s]of Object.entries(t))i.has(r)?Object.assign(e[r],s):e[r]=s;return e}static getDefaultDrawingOptions(e){Vo("Not implemented")}static get typesMap(){Vo("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(e,t){const i=this.typesMap.get(e);i&&this._defaultDrawingOptions.updateProperty(i,t),this._currentParent&&(Od.#fa.updateProperty(i,t),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(e,t){const i=this.constructor.typesMap.get(e);i&&this._updateProperty(e,i,t)}static get defaultPropertiesToUpdate(){const e=[],t=this._defaultDrawingOptions;for(const[i,r]of this.typesMap)e.push([i,t[r]]);return e}get propertiesToUpdate(){const e=[],{_drawingOptions:t}=this;for(const[i,r]of this.constructor.typesMap)e.push([i,t[r]]);return e}_updateProperty(e,t,i){const r=this._drawingOptions,s=r[t],n=e=>{r.updateProperty(t,e);const i=this.#ma.updateProperty(t,e);i&&this.#Sa(i),this.parent?.drawLayer.updateProperties(this._drawId,r.toSVGProperties())};this.addCommands({cmd:n.bind(this,i),undo:n.bind(this,s),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:e,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,Od._mergeSVGProperties(this.#ma.getPathResizingSVGProperties(this.#Ca()),{bbox:this.#Ma()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,Od._mergeSVGProperties(this.#ma.getPathResizedSVGProperties(this.#Ca()),{bbox:this.#Ma()}))}_onTranslating(e,t){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#Ma(e,t)})}_onTranslated(){this.parent?.drawLayer.updateProperties(this._drawId,Od._mergeSVGProperties(this.#ma.getPathTranslatedSVGProperties(this.#Ca(),this.parentDimensions),{bbox:this.#Ma()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#ga&&(this.#ga=!1,this.commit(),this.parent.setSelected(this),e&&this.isOnScreen&&this.div.focus())}remove(){this.#aa(),super.remove()}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.#ea(),this.#Sa(this.#ma.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){let t=!1;this.parent&&!e?(this._uiManager.removeShouldRescale(this),this.#aa()):e&&(this._uiManager.addShouldRescale(this),this.#ea(e),t=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(e),t&&this.select()}#aa(){null!==this._drawId&&this.parent&&(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#ea(e=this.parent){null!==this._drawId&&this.parent===e||(null===this._drawId?(this._drawingOptions.updateAll(),this._drawId=this.#Ea(this.#ma,e)):this.parent.drawLayer.updateParent(this._drawId,e.drawLayer))}#_a([e,t,i,r]){const{parentDimensions:[s,n],rotation:a}=this;switch(a){case 90:return[t,1-e,i*(n/s),r*(s/n)];case 180:return[1-e,1-t,i,r];case 270:return[1-t,e,i*(n/s),r*(s/n)];default:return[e,t,i,r]}}#Ca(){const{x:e,y:t,width:i,height:r,parentDimensions:[s,n],rotation:a}=this;switch(a){case 90:return[1-t,e,i*(s/n),r*(n/s)];case 180:return[1-e,1-t,i,r];case 270:return[t,1-e,i*(s/n),r*(n/s)];default:return[e,t,i,r]}}#Sa(e){if([this.x,this.y,this.width,this.height]=this.#_a(e),this.div){this.fixAndSetPosition();const[e,t]=this.parentDimensions;this.setDims(this.width*e,this.height*t)}this._onResized()}#Ma(){const{x:e,y:t,width:i,height:r,rotation:s,parentRotation:n,parentDimensions:[a,o]}=this;switch((4*s+n)/90){case 1:return[1-t-r,e,r,i];case 2:return[1-e-i,1-t-r,i,r];case 3:return[t,1-e-i,r,i];case 4:return[e,t-i*(a/o),r*(o/a),i*(a/o)];case 5:return[1-t,e,i*(a/o),r*(o/a)];case 6:return[1-e-r*(o/a),1-t,r*(o/a),i*(a/o)];case 7:return[t-i*(a/o),1-e-r*(o/a),i*(a/o),r*(o/a)];case 8:return[e-i,t-r,i,r];case 9:return[1-t,e-i,r,i];case 10:return[1-e,1-t,i,r];case 11:return[t-r,1-e,r,i];case 12:return[e-r*(o/a),t,r*(o/a),i*(a/o)];case 13:return[1-t-i*(a/o),e-r*(o/a),i*(a/o),r*(o/a)];case 14:return[1-e,1-t-i*(a/o),r*(o/a),i*(a/o)];case 15:return[t,1-e,i*(a/o),r*(o/a)];default:return[e,t,i,r]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,Od._mergeSVGProperties({bbox:this.#Ma()},this.#ma.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#Sa(this.#ma.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;const e=super.render();e.classList.add("draw");const t=document.createElement("div");e.append(t),t.setAttribute("aria-hidden","true"),t.className="internal";const[i,r]=this.parentDimensions;return this.setDims(this.width*i,this.height*r),this._uiManager.addShouldRescale(this),this.disableEditing(),e}static createDrawerInstance(e,t,i,r,s){Vo("Not implemented")}static startDrawing(e,t,i,r){const{target:s,offsetX:n,offsetY:a,pointerId:o,pointerType:l}=r;if(Od.#wa&&Od.#wa!==l)return;const{viewport:{rotation:h}}=e,{width:c,height:d}=s.getBoundingClientRect(),u=Od.#ba=new AbortController,p=e.combinedSignal(u);Od.#ya||=o,Od.#wa??=l,window.addEventListener("pointerup",(e=>{Od.#ya===e.pointerId?this._endDraw(e):Od.#xa?.delete(e.pointerId)}),{signal:p}),window.addEventListener("pointercancel",(e=>{Od.#ya===e.pointerId?this._currentParent.endDrawingSession():Od.#xa?.delete(e.pointerId)}),{signal:p}),window.addEventListener("pointerdown",(e=>{Od.#wa===e.pointerType&&((Od.#xa||=new Set).add(e.pointerId),Od.#fa.isCancellable()&&(Od.#fa.removeLastElement(),Od.#fa.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))}),{capture:!0,passive:!1,signal:p}),window.addEventListener("contextmenu",Al,{signal:p}),s.addEventListener("pointermove",this._drawMove.bind(this),{signal:p}),s.addEventListener("touchmove",(e=>{e.timeStamp===Od.#Aa&&kl(e)}),{signal:p}),e.toggleDrawing(),t._editorUndoBar?.hide(),Od.#fa?e.drawLayer.updateProperties(this._currentDrawId,Od.#fa.startNew(n,a,c,d,h)):(t.updateUIForDefaultProperties(this),Od.#fa=this.createDrawerInstance(n,a,c,d,h),Od.#va=this.getDefaultDrawingOptions(),this._currentParent=e,({id:this._currentDrawId}=e.drawLayer.draw(this._mergeSVGProperties(Od.#va.toSVGProperties(),Od.#fa.defaultSVGProperties),!0,!1)))}static _drawMove(e){if(Od.#Aa=-1,!Od.#fa)return;const{offsetX:t,offsetY:i,pointerId:r}=e;Od.#ya===r&&(Od.#xa?.size>=1?this._endDraw(e):(this._currentParent.drawLayer.updateProperties(this._currentDrawId,Od.#fa.add(t,i)),Od.#Aa=e.timeStamp,kl(e)))}static _cleanup(e){e&&(this._currentDrawId=-1,this._currentParent=null,Od.#fa=null,Od.#va=null,Od.#wa=null,Od.#Aa=NaN),Od.#ba&&(Od.#ba.abort(),Od.#ba=null,Od.#ya=NaN,Od.#xa=null)}static _endDraw(e){const t=this._currentParent;if(t)if(t.toggleDrawing(!0),this._cleanup(!1),e&&t.drawLayer.updateProperties(this._currentDrawId,Od.#fa.end(e.offsetX,e.offsetY)),this.supportMultipleDrawings){const e=Od.#fa,i=this._currentDrawId,r=e.getLastElement();t.addCommands({cmd:()=>{t.drawLayer.updateProperties(i,e.setLastElement(r))},undo:()=>{t.drawLayer.updateProperties(i,e.removeLastElement())},mustExec:!1,type:io.DRAW_STEP})}else this.endDrawing(!1)}static endDrawing(e){const t=this._currentParent;if(!t)return null;if(t.toggleDrawing(!0),t.cleanUndoStack(io.DRAW_STEP),!Od.#fa.isEmpty()){const{pageDimensions:[i,r],scale:s}=t,n=t.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:Od.#fa.getOutlines(i*s,r*s,s,this._INNER_MARGIN),drawingOptions:Od.#va,mustBeCommitted:!e});return this._cleanup(!0),n}return t.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(e){}static deserializeDraw(e,t,i,r,s,n){Vo("Not implemented")}static async deserialize(e,t,i){const{rawDims:{pageWidth:r,pageHeight:s,pageX:n,pageY:a}}=t.viewport,o=this.deserializeDraw(n,a,r,s,this._INNER_MARGIN,e),l=await super.deserialize(e,t,i);return l.createDrawingOptions(e),l.#ka({drawOutlines:o}),l.#ea(),l.onScaleChanging(),l.rotate(),l}serializeDraw(e){const[t,i]=this.pageTranslation,[r,s]=this.pageDimensions;return this.#ma.serialize([t,i,r,s],e)}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}}class Bd{#Ys=new Float64Array(6);#bs;#Ta;#Ri;#tn;#in;#Na="";#Ia=0;#En=new Hd;#La;#Pa;constructor(e,t,i,r,s,n){this.#La=i,this.#Pa=r,this.#Ri=s,this.#tn=n,[e,t]=this.#Ra(e,t);const a=this.#bs=[NaN,NaN,NaN,NaN,e,t];this.#in=[e,t],this.#Ta=[{line:a,points:this.#in}],this.#Ys.set(a,0)}updateProperty(e,t){"stroke-width"===e&&(this.#tn=t)}#Ra(e,t){return _d._normalizePoint(e,t,this.#La,this.#Pa,this.#Ri)}isEmpty(){return!this.#Ta||0===this.#Ta.length}isCancellable(){return this.#in.length<=10}add(e,t){[e,t]=this.#Ra(e,t);const[i,r,s,n]=this.#Ys.subarray(2,6),a=e-s,o=t-n;return Math.hypot(this.#La*a,this.#Pa*o)<=2?null:(this.#in.push(e,t),isNaN(i)?(this.#Ys.set([s,n,e,t],2),this.#bs.push(NaN,NaN,NaN,NaN,e,t),{path:{d:this.toSVGPath()}}):(isNaN(this.#Ys[0])&&this.#bs.splice(6,6),this.#Ys.set([i,r,s,n,e,t],0),this.#bs.push(..._d.createBezierPoints(i,r,s,n,e,t)),{path:{d:this.toSVGPath()}}))}end(e,t){const i=this.add(e,t);return i||(2===this.#in.length?{path:{d:this.toSVGPath()}}:null)}startNew(e,t,i,r,s){this.#La=i,this.#Pa=r,this.#Ri=s,[e,t]=this.#Ra(e,t);const n=this.#bs=[NaN,NaN,NaN,NaN,e,t];this.#in=[e,t];const a=this.#Ta.at(-1);return a&&(a.line=new Float32Array(a.line),a.points=new Float32Array(a.points)),this.#Ta.push({line:n,points:this.#in}),this.#Ys.set(n,0),this.#Ia=0,this.toSVGPath(),null}getLastElement(){return this.#Ta.at(-1)}setLastElement(e){return this.#Ta?(this.#Ta.push(e),this.#bs=e.line,this.#in=e.points,this.#Ia=0,{path:{d:this.toSVGPath()}}):this.#En.setLastElement(e)}removeLastElement(){if(!this.#Ta)return this.#En.removeLastElement();this.#Ta.pop(),this.#Na="";for(let e=0,t=this.#Ta.length;e<t;e++){const{line:t,points:i}=this.#Ta[e];this.#bs=t,this.#in=i,this.#Ia=0,this.toSVGPath()}return{path:{d:this.#Na}}}toSVGPath(){const e=_d.svgRound(this.#bs[4]),t=_d.svgRound(this.#bs[5]);if(2===this.#in.length)return this.#Na=`${this.#Na} M ${e} ${t} Z`,this.#Na;if(this.#in.length<=6){const i=this.#Na.lastIndexOf("M");this.#Na=`${this.#Na.slice(0,i)} M ${e} ${t}`,this.#Ia=6}if(4===this.#in.length){const e=_d.svgRound(this.#bs[10]),t=_d.svgRound(this.#bs[11]);return this.#Na=`${this.#Na} L ${e} ${t}`,this.#Ia=12,this.#Na}const i=[];0===this.#Ia&&(i.push(`M ${e} ${t}`),this.#Ia=6);for(let e=this.#Ia,t=this.#bs.length;e<t;e+=6){const[t,r,s,n,a,o]=this.#bs.slice(e,e+6).map(_d.svgRound);i.push(`C${t} ${r} ${s} ${n} ${a} ${o}`)}return this.#Na+=i.join(" "),this.#Ia=this.#bs.length,this.#Na}getOutlines(e,t,i,r){const s=this.#Ta.at(-1);return s.line=new Float32Array(s.line),s.points=new Float32Array(s.points),this.#En.build(this.#Ta,e,t,i,this.#Ri,this.#tn,r),this.#Ys=null,this.#bs=null,this.#Ta=null,this.#Na=null,this.#En}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}class Hd extends _d{#pn;#Da=0;#$s;#Ta;#La;#Pa;#Fa;#Ri;#tn;build(e,t,i,r,s,n,a){this.#La=t,this.#Pa=i,this.#Fa=r,this.#Ri=s,this.#tn=n,this.#$s=a??0,this.#Ta=e,this.#za()}setLastElement(e){return this.#Ta.push(e),{path:{d:this.toSVGPath()}}}removeLastElement(){return this.#Ta.pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const e=[];for(const{line:t}of this.#Ta)if(e.push(`M${_d.svgRound(t[4])} ${_d.svgRound(t[5])}`),6!==t.length)if(12!==t.length)for(let i=6,r=t.length;i<r;i+=6){const[r,s,n,a,o,l]=t.subarray(i,i+6).map(_d.svgRound);e.push(`C${r} ${s} ${n} ${a} ${o} ${l}`)}else e.push(`L${_d.svgRound(t[10])} ${_d.svgRound(t[11])}`);else e.push("Z");return e.join("")}serialize([e,t,i,r],s){const n=[],a=[],[o,l,h,c]=this.#Oa();let d,u,p,m,g,f,b,v,y;switch(this.#Ri){case 0:y=_d._rescale,d=e,u=t+r,p=i,m=-r,g=e+o*i,f=t+(1-l-c)*r,b=e+(o+h)*i,v=t+(1-l)*r;break;case 90:y=_d._rescaleAndSwap,d=e,u=t,p=i,m=r,g=e+l*i,f=t+o*r,b=e+(l+c)*i,v=t+(o+h)*r;break;case 180:y=_d._rescale,d=e+i,u=t,p=-i,m=r,g=e+(1-o-h)*i,f=t+l*r,b=e+(1-o)*i,v=t+(l+c)*r;break;case 270:y=_d._rescaleAndSwap,d=e+i,u=t+r,p=-i,m=-r,g=e+(1-l-c)*i,f=t+(1-o-h)*r,b=e+(1-l)*i,v=t+(1-o)*r}for(const{line:e,points:t}of this.#Ta)n.push(y(e,d,u,p,m,s?new Array(e.length):null)),a.push(y(t,d,u,p,m,s?new Array(t.length):null));return{lines:n,points:a,rect:[g,f,b,v]}}static deserialize(e,t,i,r,s,{paths:{lines:n,points:a},rotation:o,thickness:l}){const h=[];let c,d,u,p,m;switch(o){case 0:m=_d._rescale,c=-e/i,d=t/r+1,u=1/i,p=-1/r;break;case 90:m=_d._rescaleAndSwap,c=-t/r,d=-e/i,u=1/r,p=1/i;break;case 180:m=_d._rescale,c=e/i+1,d=-t/r,u=-1/i,p=1/r;break;case 270:m=_d._rescaleAndSwap,c=t/r+1,d=e/i+1,u=-1/r,p=-1/i}if(!n){n=[];for(const e of a){const t=e.length;if(2===t){n.push(new Float32Array([NaN,NaN,NaN,NaN,e[0],e[1]]));continue}if(4===t){n.push(new Float32Array([NaN,NaN,NaN,NaN,e[0],e[1],NaN,NaN,NaN,NaN,e[2],e[3]]));continue}const i=new Float32Array(3*(t-2));n.push(i);let[r,s,a,o]=e.subarray(0,4);i.set([NaN,NaN,NaN,NaN,r,s],0);for(let n=4;n<t;n+=2){const t=e[n],l=e[n+1];i.set(_d.createBezierPoints(r,s,a,o,t,l),3*(n-2)),[r,s,a,o]=[a,o,t,l]}}}for(let e=0,t=n.length;e<t;e++)h.push({line:m(n[e].map((e=>e??NaN)),c,d,u,p),points:m(a[e].map((e=>e??NaN)),c,d,u,p)});const g=new Hd;return g.build(h,i,r,1,o,l,s),g}#Ba(e=this.#tn){const t=this.#$s+e/2*this.#Fa;return this.#Ri%180==0?[t/this.#La,t/this.#Pa]:[t/this.#Pa,t/this.#La]}#Oa(){const[e,t,i,r]=this.#pn,[s,n]=this.#Ba(0);return[e+s,t+n,i-2*s,r-2*n]}#za(){const e=this.#pn=new Float32Array([1/0,1/0,-1/0,-1/0]);for(const{line:t}of this.#Ta){if(t.length<=12){for(let i=4,r=t.length;i<r;i+=6){const[r,s]=t.subarray(i,i+2);e[0]=Math.min(e[0],r),e[1]=Math.min(e[1],s),e[2]=Math.max(e[2],r),e[3]=Math.max(e[3],s)}continue}let i=t[4],r=t[5];for(let s=6,n=t.length;s<n;s+=6){const[n,a,o,l,h,c]=t.subarray(s,s+6);al.bezierBoundingBox(i,r,n,a,o,l,h,c,e),i=h,r=c}}const[t,i]=this.#Ba();e[0]=Math.min(1,Math.max(0,e[0]-t)),e[1]=Math.min(1,Math.max(0,e[1]-i)),e[2]=Math.min(1,Math.max(0,e[2]+t)),e[3]=Math.min(1,Math.max(0,e[3]+i)),e[2]-=e[0],e[3]-=e[1]}get box(){return this.#pn}updateProperty(e,t){return"stroke-width"===e?this.#ra(t):null}#ra(e){const[t,i]=this.#Ba();this.#tn=e;const[r,s]=this.#Ba(),[n,a]=[r-t,s-i],o=this.#pn;return o[0]-=n,o[1]-=a,o[2]+=2*n,o[3]+=2*a,o}updateParentDimensions([e,t],i){const[r,s]=this.#Ba();this.#La=e,this.#Pa=t,this.#Fa=i;const[n,a]=this.#Ba(),o=n-r,l=a-s,h=this.#pn;return h[0]-=o,h[1]-=l,h[2]+=2*o,h[3]+=2*l,h}updateRotation(e){return this.#Da=e,{path:{transform:this.rotationTransform}}}get viewBox(){return this.#pn.map(_d.svgRound).join(" ")}get defaultProperties(){const[e,t]=this.#pn;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${_d.svgRound(e)} ${_d.svgRound(t)}`}}}get rotationTransform(){const[,,e,t]=this.#pn;let i=0,r=0,s=0,n=0,a=0,o=0;switch(this.#Da){case 90:r=t/e,s=-e/t,a=e;break;case 180:i=-1,n=-1,a=e,o=t;break;case 270:r=-t/e,s=e/t,o=t;break;default:return""}return`matrix(${i} ${r} ${s} ${n} ${_d.svgRound(a)} ${_d.svgRound(o)})`}getPathResizingSVGProperties([e,t,i,r]){const[s,n]=this.#Ba(),[a,o,l,h]=this.#pn;if(Math.abs(l-s)<=_d.PRECISION||Math.abs(h-n)<=_d.PRECISION){const s=e+i/2-(a+l/2),n=t+r/2-(o+h/2);return{path:{"transform-origin":`${_d.svgRound(e)} ${_d.svgRound(t)}`,transform:`${this.rotationTransform} translate(${s} ${n})`}}}const c=(i-2*s)/(l-2*s),d=(r-2*n)/(h-2*n),u=l/i,p=h/r;return{path:{"transform-origin":`${_d.svgRound(a)} ${_d.svgRound(o)}`,transform:`${this.rotationTransform} scale(${u} ${p}) translate(${_d.svgRound(s)} ${_d.svgRound(n)}) scale(${c} ${d}) translate(${_d.svgRound(-s)} ${_d.svgRound(-n)})`}}}getPathResizedSVGProperties([e,t,i,r]){const[s,n]=this.#Ba(),a=this.#pn,[o,l,h,c]=a;if(a[0]=e,a[1]=t,a[2]=i,a[3]=r,Math.abs(h-s)<=_d.PRECISION||Math.abs(c-n)<=_d.PRECISION){const s=e+i/2-(o+h/2),n=t+r/2-(l+c/2);for(const{line:e,points:t}of this.#Ta)_d._translate(e,s,n,e),_d._translate(t,s,n,t);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${_d.svgRound(e)} ${_d.svgRound(t)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const d=(i-2*s)/(h-2*s),u=(r-2*n)/(c-2*n),p=-d*(o+s)+e+s,m=-u*(l+n)+t+n;if(1!==d||1!==u||0!==p||0!==m)for(const{line:e,points:t}of this.#Ta)_d._rescale(e,p,m,d,u,e),_d._rescale(t,p,m,d,u,t);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${_d.svgRound(e)} ${_d.svgRound(t)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([e,t],i){const[r,s]=i,n=this.#pn,a=e-n[0],o=t-n[1];if(this.#La===r&&this.#Pa===s)for(const{line:e,points:t}of this.#Ta)_d._translate(e,a,o,e),_d._translate(t,a,o,t);else{const e=this.#La/r,t=this.#Pa/s;this.#La=r,this.#Pa=s;for(const{line:i,points:r}of this.#Ta)_d._rescale(i,a,o,e,t,i),_d._rescale(r,a,o,e,t,r);n[2]*=e,n[3]*=t}return n[0]=e,n[1]=t,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${_d.svgRound(e)} ${_d.svgRound(t)}`}}}get defaultSVGProperties(){const e=this.#pn;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${_d.svgRound(e[0])} ${_d.svgRound(e[1])}`,transform:this.rotationTransform||null},bbox:e}}}class qd extends zd{#Ha;constructor(e){super(),this.#Ha=e,super.updateProperties({fill:"none",stroke:jl._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(e,t){"stroke-width"===e&&(t??=this["stroke-width"],t*=this.#Ha.realScale),super.updateSVGProperty(e,t)}clone(){const e=new qd(this.#Ha);return e.updateAll(this),e}}class jd extends Od{static _type="ink";static _editorType=to.INK;static _defaultDrawingOptions=null;constructor(e){super({...e,name:"inkEditor"}),this._willKeepAspectRatio=!0}static initialize(e,t){jl.initialize(e,t),this._defaultDrawingOptions=new qd(t.viewParameters)}static getDefaultDrawingOptions(e){const t=this._defaultDrawingOptions.clone();return t.updateProperties(e),t}static get supportMultipleDrawings(){return!0}static get typesMap(){return $o(this,"typesMap",new Map([[io.INK_THICKNESS,"stroke-width"],[io.INK_COLOR,"stroke"],[io.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(e,t,i,r,s){return new Bd(e,t,i,r,s,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(e,t,i,r,s,n){return Hd.deserialize(e,t,i,r,s,n)}static async deserialize(e,t,i){let r=null;if(e instanceof vd){const{data:{inkLists:t,rect:i,rotation:s,id:n,color:a,opacity:o,borderStyle:{rawWidth:l},popupRef:h},parent:{page:{pageNumber:c}}}=e;r=e={annotationType:to.INK,color:Array.from(a),thickness:l,opacity:o,paths:{points:t},boxes:null,pageIndex:c-1,rect:i.slice(0),rotation:s,id:n,deleted:!1,popupRef:h}}const s=await super.deserialize(e,t,i);return s.annotationElementId=e.id||null,s._initialData=r,s}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:e,_drawingOptions:t,parent:i}=this;t.updateSVGProperty("stroke-width"),i.drawLayer.updateProperties(e,t.toSVGProperties())}static onScaleChangingWhenDrawing(){const e=this._currentParent;e&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),e.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:e,thickness:t,opacity:i}){this._drawingOptions=jd.getDefaultDrawingOptions({stroke:al.makeHexColor(...e),"stroke-width":t,"stroke-opacity":i})}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:t,points:i,rect:r}=this.serializeDraw(e),{_drawingOptions:{stroke:s,"stroke-opacity":n,"stroke-width":a}}=this,o={annotationType:to.INK,color:jl._colorManager.convert(s),opacity:n,thickness:a,paths:{lines:t,points:i},pageIndex:this.pageIndex,rect:r,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?o:this.annotationElementId&&!this.#Vs(o)?null:(o.id=this.annotationElementId,o)}#Vs(e){const{color:t,thickness:i,opacity:r,pageIndex:s}=this._initialData;return this._hasBeenMoved||this._hasBeenResized||e.color.some(((e,i)=>e!==t[i]))||e.thickness!==i||e.opacity!==r||e.pageIndex!==s}renderAnnotationElement(e){const{points:t,rect:i}=this.serializeDraw(!1);return e.updateEdited({rect:i,thickness:this._drawingOptions["stroke-width"],points:t}),null}}class Vd extends jl{#qa=null;#ja=null;#Va=null;#Ua=null;#Ga=null;#$a="";#Wa=null;#Xa=null;#Ya=!1;#Ka=!1;static _type="stamp";static _editorType=to.STAMP;constructor(e){super({...e,name:"stampEditor"}),this.#Ua=e.bitmapUrl,this.#Ga=e.bitmapFile}static initialize(e,t){jl.initialize(e,t)}static get supportedTypes(){return $o(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((e=>`image/${e}`)))}static get supportedTypesStr(){return $o(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,t){t.pasteEditor(to.STAMP,{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(e){const t=e.get("hasAltText");return{hasAltText:t.get(!0)??0,hasNoAltText:t.get(!1)??0}}#Za(e,t=!1){e?(this.#qa=e.bitmap,t||(this.#ja=e.id,this.#Ya=e.isSvg),e.file&&(this.#$a=e.file.name),this.#Ja()):this.remove()}#Qa(){if(this.#Va=null,this._uiManager.enableWaiting(!1),this.#Wa){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#qa)return this._editToolbar.hide(),void this._uiManager.editAltText(this,!0);if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#qa){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(e=null,t=!0){if(this.hasAltTextData())return null;const{mlManager:i}=this._uiManager;if(!i)throw new Error("No ML.");if(!await i.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:r,width:s,height:n}=e||this.copyCanvas(null,null,!0).imageData,a=await i.guess({name:"altText",request:{data:r,width:s,height:n,channels:r.length/(s*n)}});if(!a)throw new Error("No response from the AI service.");if(a.error)throw new Error("Error from the AI service.");if(a.cancel)return null;if(!a.output)throw new Error("No valid response from the AI service.");const o=a.output;return await this.setGuessedAltText(o),t&&!this.hasAltTextData()&&(this.altTextData={alt:o,decorative:!1}),o}#eo(){if(this.#ja)return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(this.#ja).then((e=>this.#Za(e,!0))).finally((()=>this.#Qa()));if(this.#Ua){const e=this.#Ua;return this.#Ua=null,this._uiManager.enableWaiting(!0),void(this.#Va=this._uiManager.imageManager.getFromUrl(e).then((e=>this.#Za(e))).finally((()=>this.#Qa())))}if(this.#Ga){const e=this.#Ga;return this.#Ga=null,this._uiManager.enableWaiting(!0),void(this.#Va=this._uiManager.imageManager.getFromFile(e).then((e=>this.#Za(e))).finally((()=>this.#Qa())))}const e=document.createElement("input");e.type="file",e.accept=Vd.supportedTypesStr;const t=this._uiManager._signal;this.#Va=new Promise((i=>{e.addEventListener("change",(async()=>{if(e.files&&0!==e.files.length){this._uiManager.enableWaiting(!0);const t=await this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#Za(t)}else this.remove();i()}),{signal:t}),e.addEventListener("cancel",(()=>{this.remove(),i()}),{signal:t})})).finally((()=>this.#Qa())),e.click()}remove(){this.#ja&&(this.#qa=null,this._uiManager.imageManager.deleteId(this.#ja),this.#Wa?.remove(),this.#Wa=null,this.#Xa&&(clearTimeout(this.#Xa),this.#Xa=null)),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(this.#ja&&null===this.#Wa&&this.#eo(),this.isAttachedToDOM||this.parent.add(this))):this.#ja&&this.#eo()}onceAdded(e){this._isDraggable=!0,e&&this.div.focus()}isEmpty(){return!(this.#Va||this.#qa||this.#Ua||this.#Ga||this.#ja)}get isResizable(){return!0}render(){if(this.div)return this.div;let e,t;if(this.width&&(e=this.x,t=this.y),super.render(),this.div.hidden=!0,this.div.setAttribute("role","figure"),this.addAltTextButton(),this.#qa?this.#Ja():this.#eo(),this.width&&!this.annotationElementId){const[i,r]=this.parentDimensions;this.setAt(e*i,t*r,this.width*i,this.height*r)}return this._uiManager.addShouldRescale(this),this.div}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;null!==this.#Xa&&clearTimeout(this.#Xa);this.#Xa=setTimeout((()=>{this.#Xa=null,this.#to()}),200)}#Ja(){const{div:e}=this;let{width:t,height:i}=this.#qa;const[r,s]=this.pageDimensions,n=.75;if(this.width)t=this.width*r,i=this.height*s;else if(t>n*r||i>n*s){const e=Math.min(n*r/t,n*s/i);t*=e,i*=e}const[a,o]=this.parentDimensions;this.setDims(t*a/r,i*o/s),this._uiManager.enableWaiting(!1);const l=this.#Wa=document.createElement("canvas");l.setAttribute("role","img"),this.addContainer(l),this.width=t/r,this.height=i/s,this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&!this.annotationElementId||(e.hidden=!1),this.#to(),this.#Ka||(this.parent.addUndoableEditor(this),this.#Ka=!0),this._reportTelemetry({action:"inserted_image"}),this.#$a&&l.setAttribute("aria-label",this.#$a)}copyCanvas(e,t,i=!1){e||(e=224);const{width:r,height:s}=this.#qa,n=new Nl;let a=this.#qa,o=r,l=s,h=null;if(t){if(r>t||s>t){const e=Math.min(t/r,t/s);o=Math.floor(r*e),l=Math.floor(s*e)}h=document.createElement("canvas");const e=h.width=Math.ceil(o*n.sx),i=h.height=Math.ceil(l*n.sy);this.#Ya||(a=this.#io(e,i));const c=h.getContext("2d");c.filter=this._uiManager.hcmFilter;let d="white",u="#cfcfd8";"none"!==this._uiManager.hcmFilter?u="black":window.matchMedia?.("(prefers-color-scheme: dark)").matches&&(d="#8f8f9d",u="#42414d");const p=15,m=p*n.sx,g=p*n.sy,f=new OffscreenCanvas(2*m,2*g),b=f.getContext("2d");b.fillStyle=d,b.fillRect(0,0,2*m,2*g),b.fillStyle=u,b.fillRect(0,0,m,g),b.fillRect(m,g,m,g),c.fillStyle=c.createPattern(f,"repeat"),c.fillRect(0,0,e,i),c.drawImage(a,0,0,a.width,a.height,0,0,e,i)}let c=null;if(i){let t,i;if(n.symmetric&&a.width<e&&a.height<e)t=a.width,i=a.height;else if(a=this.#qa,r>e||s>e){const n=Math.min(e/r,e/s);t=Math.floor(r*n),i=Math.floor(s*n),this.#Ya||(a=this.#io(t,i))}const o=new OffscreenCanvas(t,i).getContext("2d",{willReadFrequently:!0});o.drawImage(a,0,0,a.width,a.height,0,0,t,i),c={width:t,height:i,data:o.getImageData(0,0,t,i).data}}return{canvas:h,width:o,height:l,imageData:c}}#io(e,t){const{width:i,height:r}=this.#qa;let s=i,n=r,a=this.#qa;for(;s>2*e||n>2*t;){const i=s,r=n;s>2*e&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2)),n>2*t&&(n=n>=16384?Math.floor(n/2)-1:Math.ceil(n/2));const o=new OffscreenCanvas(s,n);o.getContext("2d").drawImage(a,0,0,i,r,0,0,s,n),a=o.transferToImageBitmap()}return a}#to(){const[e,t]=this.parentDimensions,{width:i,height:r}=this,s=new Nl,n=Math.ceil(i*e*s.sx),a=Math.ceil(r*t*s.sy),o=this.#Wa;if(!o||o.width===n&&o.height===a)return;o.width=n,o.height=a;const l=this.#Ya?this.#qa:this.#io(n,a),h=o.getContext("2d");h.filter=this._uiManager.hcmFilter,h.drawImage(l,0,0,l.width,l.height,0,0,n,a)}getImageForAltText(){return this.#Wa}#ro(e){if(e){if(this.#Ya){const e=this._uiManager.imageManager.getSvgUrl(this.#ja);if(e)return e}const e=document.createElement("canvas");({width:e.width,height:e.height}=this.#qa);return e.getContext("2d").drawImage(this.#qa,0,0),e.toDataURL()}if(this.#Ya){const[e,t]=this.pageDimensions,i=Math.round(this.width*e*ul.PDF_TO_CSS_UNITS),r=Math.round(this.height*t*ul.PDF_TO_CSS_UNITS),s=new OffscreenCanvas(i,r);return s.getContext("2d").drawImage(this.#qa,0,0,this.#qa.width,this.#qa.height,0,0,i,r),s.transferToImageBitmap()}return structuredClone(this.#qa)}static async deserialize(e,t,i){let r=null;if(e instanceof kd){const{data:{rect:s,rotation:n,id:a,structParent:o,popupRef:l},container:h,parent:{page:{pageNumber:c}}}=e,d=h.querySelector("canvas"),u=i.imageManager.getFromCanvas(h.id,d);d.remove();const p=(await t._structTree.getAriaAttributes(`${cl}${a}`))?.get("aria-label")||"";r=e={annotationType:to.STAMP,bitmapId:u.id,bitmap:u.bitmap,pageIndex:c-1,rect:s.slice(0),rotation:n,id:a,deleted:!1,accessibilityData:{decorative:!1,altText:p},isSvg:!1,structParent:o,popupRef:l}}const s=await super.deserialize(e,t,i),{rect:n,bitmap:a,bitmapUrl:o,bitmapId:l,isSvg:h,accessibilityData:c}=e;l&&i.imageManager.isValidId(l)?(s.#ja=l,a&&(s.#qa=a)):s.#Ua=o,s.#Ya=h;const[d,u]=s.pageDimensions;return s.width=(n[2]-n[0])/d,s.height=(n[3]-n[1])/u,s.annotationElementId=e.id||null,c&&(s.altTextData=c),s._initialData=r,s.#Ka=!!r,s}serialize(e=!1,t=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i={annotationType:to.STAMP,bitmapId:this.#ja,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#Ya,structTreeParentId:this._structTreeParentId};if(e)return i.bitmapUrl=this.#ro(!0),i.accessibilityData=this.serializeAltText(!0),i;const{decorative:r,altText:s}=this.serializeAltText(!1);if(!r&&s&&(i.accessibilityData={type:"Figure",alt:s}),this.annotationElementId){const e=this.#Vs(i);if(e.isSame)return null;e.isSameAltText?delete i.accessibilityData:i.accessibilityData.structParent=this._initialData.structParent??-1}if(i.id=this.annotationElementId,null===t)return i;t.stamps||=new Map;const n=this.#Ya?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(t.stamps.has(this.#ja)){if(this.#Ya){const e=t.stamps.get(this.#ja);n>e.area&&(e.area=n,e.serialized.bitmap.close(),e.serialized.bitmap=this.#ro(!1))}}else t.stamps.set(this.#ja,{area:n,serialized:i}),i.bitmap=this.#ro(!1);return i}#Vs(e){const{pageIndex:t,accessibilityData:{altText:i}}=this._initialData,r=e.pageIndex===t,s=(e.accessibilityData?.alt||"")===i;return{isSame:!this._hasBeenMoved&&!this._hasBeenResized&&r&&s,isSameAltText:s}}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}}class Ud{#Cs;#so=!1;#no=null;#ao=null;#oo=null;#lo=new Map;#ho=!1;#co=!1;#do=!1;#uo=null;#po=null;#mo=null;#go=null;#g;static _initialized=!1;static#q=new Map([Md,jd,Vd,Fd].map((e=>[e._editorType,e])));constructor({uiManager:e,pageIndex:t,div:i,structTreeLayer:r,accessibilityManager:s,annotationLayer:n,drawLayer:a,textLayer:o,viewport:l,l10n:h}){const c=[...Ud.#q.values()];if(!Ud._initialized){Ud._initialized=!0;for(const t of c)t.initialize(h,e)}e.registerEditorTypes(c),this.#g=e,this.pageIndex=t,this.div=i,this.#Cs=s,this.#no=n,this.viewport=l,this.#mo=o,this.drawLayer=a,this._structTree=r,this.#g.addLayer(this)}get isEmpty(){return 0===this.#lo.size}get isInvisible(){return this.isEmpty&&this.#g.getMode()===to.NONE}updateToolbar(e){this.#g.updateToolbar(e)}updateMode(e=this.#g.getMode()){switch(this.#fo(),e){case to.NONE:return this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),void this.disableClick();case to.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case to.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:t}=this.div;for(const i of Ud.#q.values())t.toggle(`${i._type}Editing`,e===i._editorType);this.div.hidden=!1}hasTextLayer(e){return e===this.#mo?.div}setEditingState(e){this.#g.setEditingState(e)}addCommands(e){this.#g.addCommands(e)}cleanUndoStack(e){this.#g.cleanUndoStack(e)}toggleDrawing(e=!1){this.div.classList.toggle("drawing",!e)}togglePointerEvents(e=!1){this.div.classList.toggle("disabled",!e)}toggleAnnotationLayerPointerEvents(e=!1){this.#no?.div.classList.toggle("disabled",!e)}async enable(){this.#do=!0,this.div.tabIndex=0,this.togglePointerEvents(!0);const e=new Set;for(const t of this.#lo.values())t.enableEditing(),t.show(!0),t.annotationElementId&&(this.#g.removeChangedExistingAnnotation(t),e.add(t.annotationElementId));if(!this.#no)return void(this.#do=!1);const t=this.#no.getEditableAnnotations();for(const i of t){if(i.hide(),this.#g.isDeletedAnnotationElement(i.data.id))continue;if(e.has(i.data.id))continue;const t=await this.deserialize(i);t&&(this.addOrRebuild(t),t.enableEditing())}this.#do=!1}disable(){this.#co=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1);const e=new Map,t=new Map;for(const i of this.#lo.values())i.disableEditing(),i.annotationElementId&&(null===i.serialize()?(t.set(i.annotationElementId,i),this.getEditableAnnotation(i.annotationElementId)?.show(),i.remove()):e.set(i.annotationElementId,i));if(this.#no){const i=this.#no.getEditableAnnotations();for(const r of i){const{id:i}=r.data;if(this.#g.isDeletedAnnotationElement(i))continue;let s=t.get(i);s?(s.resetAnnotationElement(r),s.show(!1),r.show()):(s=e.get(i),s&&(this.#g.addChangedExistingAnnotation(s),s.renderAnnotationElement(r)&&s.show(!1)),r.show())}}this.#fo(),this.isEmpty&&(this.div.hidden=!0);const{classList:i}=this.div;for(const e of Ud.#q.values())i.remove(`${e._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#co=!1}getEditableAnnotation(e){return this.#no?.getEditableAnnotation(e)||null}setActiveEditor(e){this.#g.getActive()!==e&&this.#g.setActiveEditor(e)}enableTextSelection(){if(this.div.tabIndex=-1,this.#mo?.div&&!this.#go){this.#go=new AbortController;const e=this.#g.combinedSignal(this.#go);this.#mo.div.addEventListener("pointerdown",this.#bo.bind(this),{signal:e}),this.#mo.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#mo?.div&&this.#go&&(this.#go.abort(),this.#go=null,this.#mo.div.classList.remove("highlighting"))}#bo(e){this.#g.unselectAll();const{target:t}=e;if(t===this.#mo.div||("img"===t.getAttribute("role")||t.classList.contains("endOfContent"))&&this.#mo.div.contains(t)){const{isMac:t}=sl.platform;if(0!==e.button||e.ctrlKey&&t)return;this.#g.showAllEditors("highlight",!0,!0),this.#mo.div.classList.add("free"),this.toggleDrawing(),Fd.startHighlighting(this,"ltr"===this.#g.direction,{target:this.#mo.div,x:e.x,y:e.y}),this.#mo.div.addEventListener("pointerup",(()=>{this.#mo.div.classList.remove("free"),this.toggleDrawing(!0)}),{once:!0,signal:this.#g._signal}),e.preventDefault()}}enableClick(){if(this.#ao)return;this.#ao=new AbortController;const e=this.#g.combinedSignal(this.#ao);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:e});const t=this.pointerup.bind(this);this.div.addEventListener("pointerup",t,{signal:e}),this.div.addEventListener("pointercancel",t,{signal:e})}disableClick(){this.#ao?.abort(),this.#ao=null}attach(e){this.#lo.set(e.id,e);const{annotationElementId:t}=e;t&&this.#g.isDeletedAnnotationElement(t)&&this.#g.removeDeletedAnnotationElement(e)}detach(e){this.#lo.delete(e.id),this.#Cs?.removePointerInTextLayer(e.contentDiv),!this.#co&&e.annotationElementId&&this.#g.addDeletedAnnotationElement(e)}remove(e){this.detach(e),this.#g.removeEditor(e),e.div.remove(),e.isAttachedToDOM=!1}changeParent(e){e.parent!==this&&(e.parent&&e.annotationElementId&&(this.#g.addDeletedAnnotationElement(e.annotationElementId),jl.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),e.parent?.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}add(e){if(e.parent!==this||!e.isAttachedToDOM){if(this.changeParent(e),this.#g.addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(!this.#do),this.#g.addToAnnotationStorage(e),e._reportTelemetry(e.telemetryInitialData)}}moveEditorInDOM(e){if(!e.isAttachedToDOM)return;const{activeElement:t}=document;e.div.contains(t)&&!this.#oo&&(e._focusEventsAllowed=!1,this.#oo=setTimeout((()=>{this.#oo=null,e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",(()=>{e._focusEventsAllowed=!0}),{once:!0,signal:this.#g._signal}),t.focus())}),0)),e._structTreeParentId=this.#Cs?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?(e.parent||=this,e.rebuild(),e.show()):this.add(e)}addUndoableEditor(e){this.addCommands({cmd:()=>e._uiManager.rebuild(e),undo:()=>{e.remove()},mustExec:!1})}getNextId(){return this.#g.getId()}get#vo(){return Ud.#q.get(this.#g.getMode())}combinedSignal(e){return this.#g.combinedSignal(e)}#yo(e){const t=this.#vo;return t?new t.prototype.constructor(e):null}canCreateNewEmptyEditor(){return this.#vo?.canCreateNewEmptyEditor()}pasteEditor(e,t){this.#g.updateToolbar(e),this.#g.updateMode(e);const{offsetX:i,offsetY:r}=this.#wo(),s=this.getNextId(),n=this.#yo({parent:this,id:s,x:i,y:r,uiManager:this.#g,isCentered:!0,...t});n&&this.add(n)}async deserialize(e){return await(Ud.#q.get(e.annotationType??e.annotationEditorType)?.deserialize(e,this,this.#g))||null}createAndAddNewEditor(e,t,i={}){const r=this.getNextId(),s=this.#yo({parent:this,id:r,x:e.offsetX,y:e.offsetY,uiManager:this.#g,isCentered:t,...i});return s&&this.add(s),s}#wo(){const{x:e,y:t,width:i,height:r}=this.div.getBoundingClientRect(),s=Math.max(0,e),n=Math.max(0,t),a=(s+Math.min(window.innerWidth,e+i))/2-e,o=(n+Math.min(window.innerHeight,t+r))/2-t,[l,h]=this.viewport.rotation%180==0?[a,o]:[o,a];return{offsetX:l,offsetY:h}}addNewEditor(){this.createAndAddNewEditor(this.#wo(),!0)}setSelected(e){this.#g.setSelected(e)}toggleSelected(e){this.#g.toggleSelected(e)}unselect(e){this.#g.unselect(e)}pointerup(e){const{isMac:t}=sl.platform;0!==e.button||e.ctrlKey&&t||e.target===this.div&&this.#ho&&(this.#ho=!1,this.#vo?.isDrawer&&this.#vo.supportMultipleDrawings||(this.#so?this.#g.getMode()!==to.STAMP?this.createAndAddNewEditor(e,!1):this.#g.unselectAll():this.#so=!0))}pointerdown(e){if(this.#g.getMode()===to.HIGHLIGHT&&this.enableTextSelection(),this.#ho)return void(this.#ho=!1);const{isMac:t}=sl.platform;if(0!==e.button||e.ctrlKey&&t)return;if(e.target!==this.div)return;if(this.#ho=!0,this.#vo?.isDrawer)return void this.startDrawingSession(e);const i=this.#g.getActive();this.#so=!i||i.isEmpty()}startDrawingSession(e){if(this.div.focus(),this.#uo)return void this.#vo.startDrawing(this,this.#g,!1,e);this.#g.setCurrentDrawingSession(this),this.#uo=new AbortController;const t=this.#g.combinedSignal(this.#uo);this.div.addEventListener("blur",(({relatedTarget:e})=>{e&&!this.div.contains(e)&&(this.#po=null,this.commitOrRemove())}),{signal:t}),this.#vo.startDrawing(this,this.#g,!1,e)}pause(e){if(e){const{activeElement:e}=document;this.div.contains(e)&&(this.#po=e)}else this.#po&&setTimeout((()=>{this.#po?.focus(),this.#po=null}),0)}endDrawingSession(e=!1){return this.#uo?(this.#g.setCurrentDrawingSession(null),this.#uo.abort(),this.#uo=null,this.#po=null,this.#vo.endDrawing(e)):null}findNewParent(e,t,i){const r=this.#g.findParent(t,i);return null!==r&&r!==this&&(r.changeParent(e),!0)}commitOrRemove(){return!!this.#uo&&(this.endDrawingSession(),!0)}onScaleChanging(){this.#uo&&this.#vo.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#g.getActive()?.parent===this&&(this.#g.commitOrRemove(),this.#g.setActiveEditor(null)),this.#oo&&(clearTimeout(this.#oo),this.#oo=null);for(const e of this.#lo.values())this.#Cs?.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove();this.div=null,this.#lo.clear(),this.#g.removeLayer(this)}#fo(){for(const e of this.#lo.values())e.isEmpty()&&e.remove()}render({viewport:e}){this.viewport=e,Tl(this.div,e);for(const e of this.#g.getEditors(this.pageIndex))this.add(e),e.rebuild();this.updateMode()}update({viewport:e}){this.#g.commitOrRemove(),this.#fo();const t=this.viewport.rotation,i=e.rotation;if(this.viewport=e,Tl(this.div,{rotation:i}),t!==i)for(const e of this.#lo.values())e.rotate(i)}get pageDimensions(){const{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}get scale(){return this.#g.viewParameters.realScale}}class Gd{#ss=null;#y=0;#xo=new Map;#Ao=new Map;constructor({pageIndex:e}){this.pageIndex=e}setParent(e){if(this.#ss){if(this.#ss!==e){if(this.#xo.size>0)for(const t of this.#xo.values())t.remove(),e.append(t);this.#ss=e}}else this.#ss=e}static get _svgFactory(){return $o(this,"_svgFactory",new Wc)}static#ko(e,[t,i,r,s]){const{style:n}=e;n.top=100*i+"%",n.left=100*t+"%",n.width=100*r+"%",n.height=100*s+"%"}#Eo(){const e=Gd._svgFactory.create(1,1,!0);return this.#ss.append(e),e.setAttribute("aria-hidden",!0),e}#So(e,t){const i=Gd._svgFactory.createElement("clipPath");e.append(i);const r=`clip_${t}`;i.setAttribute("id",r),i.setAttribute("clipPathUnits","objectBoundingBox");const s=Gd._svgFactory.createElement("use");return i.append(s),s.setAttribute("href",`#${t}`),s.classList.add("clip"),r}#Co(e,t){for(const[i,r]of Object.entries(t))null===r?e.removeAttribute(i):e.setAttribute(i,r)}draw(e,t=!1,i=!1){const r=this.#y++,s=this.#Eo(),n=Gd._svgFactory.createElement("defs");s.append(n);const a=Gd._svgFactory.createElement("path");n.append(a);const o=`path_p${this.pageIndex}_${r}`;a.setAttribute("id",o),a.setAttribute("vector-effect","non-scaling-stroke"),t&&this.#Ao.set(r,a);const l=i?this.#So(n,o):null,h=Gd._svgFactory.createElement("use");return s.append(h),h.setAttribute("href",`#${o}`),this.updateProperties(s,e),this.#xo.set(r,s),{id:r,clipPathId:`url(#${l})`}}drawOutline(e,t){const i=this.#y++,r=this.#Eo(),s=Gd._svgFactory.createElement("defs");r.append(s);const n=Gd._svgFactory.createElement("path");s.append(n);const a=`path_p${this.pageIndex}_${i}`;let o;if(n.setAttribute("id",a),n.setAttribute("vector-effect","non-scaling-stroke"),t){const e=Gd._svgFactory.createElement("mask");s.append(e),o=`mask_p${this.pageIndex}_${i}`,e.setAttribute("id",o),e.setAttribute("maskUnits","objectBoundingBox");const t=Gd._svgFactory.createElement("rect");e.append(t),t.setAttribute("width","1"),t.setAttribute("height","1"),t.setAttribute("fill","white");const r=Gd._svgFactory.createElement("use");e.append(r),r.setAttribute("href",`#${a}`),r.setAttribute("stroke","none"),r.setAttribute("fill","black"),r.setAttribute("fill-rule","nonzero"),r.classList.add("mask")}const l=Gd._svgFactory.createElement("use");r.append(l),l.setAttribute("href",`#${a}`),o&&l.setAttribute("mask",`url(#${o})`);const h=l.cloneNode();return r.append(h),l.classList.add("mainOutline"),h.classList.add("secondaryOutline"),this.updateProperties(r,e),this.#xo.set(i,r),i}finalizeDraw(e,t){this.#Ao.delete(e),this.updateProperties(e,t)}updateProperties(e,t){if(!t)return;const{root:i,bbox:r,rootClass:s,path:n}=t,a="number"==typeof e?this.#xo.get(e):e;if(a){if(i&&this.#Co(a,i),r&&Gd.#ko(a,r),s){const{classList:e}=a;for(const[t,i]of Object.entries(s))e.toggle(t,i)}if(n){const e=a.firstChild.firstChild;this.#Co(e,n)}}}updateParent(e,t){if(t===this)return;const i=this.#xo.get(e);i&&(t.#ss.append(i),this.#xo.delete(e),t.#xo.set(e,i))}remove(e){this.#Ao.delete(e),null!==this.#ss&&(this.#xo.get(e).remove(),this.#xo.delete(e))}destroy(){this.#ss=null;for(const e of this.#xo.values())e.remove();this.#xo.clear(),this.#Ao.clear()}}globalThis.pdfjsTestingUtils={HighlightOutliner:Id};var $d=qa.GlobalWorkerOptions,Wd=qa.getDocument,Xd=qa.version;function Yd(e){return"function"==typeof e}var Kd=function(t){var i=t.block.pdf,r=i.src,s=i.caption,a=e.useState(1),o=a[0],l=a[1],h=e.useRef(null),c=function(t){var i=t.canvasRef,r=t.file,s=t.onDocumentLoadSuccess,n=t.onDocumentLoadFail,a=t.onPageLoadSuccess,o=t.onPageLoadFail,l=t.onPageRenderSuccess,h=t.onPageRenderFail,c=t.scale,d=void 0===c?1:c,u=t.rotate,p=void 0===u?0:u,m=t.page,g=void 0===m?1:m,f=t.cMapUrl,b=t.cMapPacked,v=t.workerSrc,y=void 0===v?"//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(Xd,"/pdf.worker.mjs"):v,w=t.withCredentials,x=void 0!==w&&w,A=e.useState(),k=A[0],E=A[1],S=e.useState(),C=S[0],M=S[1],_=e.useRef(null),T=e.useRef(null),N=e.useRef(s),I=e.useRef(n),L=e.useRef(a),P=e.useRef(o),R=e.useRef(l),D=e.useRef(h);return e.useEffect((function(){N.current=s}),[s]),e.useEffect((function(){I.current=n}),[n]),e.useEffect((function(){L.current=a}),[a]),e.useEffect((function(){P.current=o}),[o]),e.useEffect((function(){R.current=l}),[l]),e.useEffect((function(){D.current=h}),[h]),e.useEffect((function(){$d.workerSrc=y}),[y]),e.useEffect((function(){var e={url:r,withCredentials:x};f&&(e.cMapUrl=f,e.cMapPacked=b),Wd(e).promise.then((function(e){E(e),Yd(N.current)&&N.current(e)}),(function(){Yd(I.current)&&I.current()}))}),[r,x,f,b]),e.useEffect((function(){var e=function(t){var r=0===p?t.rotate:t.rotate+p,s=t.getViewport({scale:d,rotation:r}),n=i.current;if(n){var a=n.getContext("2d");if(a)return n.height=s.height*window.devicePixelRatio,n.width=s.width*window.devicePixelRatio,a.scale(window.devicePixelRatio,window.devicePixelRatio),_.current?(T.current=t,void _.current.cancel()):(_.current=t.render({canvasContext:a,viewport:s}),_.current.promise.then((function(){_.current=null,Yd(R.current)&&R.current(t)}),(function(i){var r;if(_.current=null,i&&"RenderingCancelledException"===i.name){var s=null!==(r=T.current)&&void 0!==r?r:t;T.current=null,e(s)}else Yd(D.current)&&D.current()})))}};k&&k.getPage(g).then((function(t){M(t),Yd(L.current)&&L.current(t),e(t)}),(function(){Yd(P.current)&&P.current()}))}),[i,g,k,p,d]),{pdfDocument:k,pdfPage:C}}({file:r,page:o,canvasRef:h}).pdfDocument;return e.createElement("div",{className:"rotion-pdf"},Boolean(c&&c.numPages)&&e.createElement("nav",{className:"rotion-pdf-nav"},e.createElement("ul",{className:"rotion-pdf-pager"},e.createElement("li",{className:"rotion-pdf-prev"},e.createElement("span",{className:"rotion-pdf-prevnext ".concat(1===o?"rotion-pdf-prevnext-disabled":""),onClick:function(){return l(o-1)}},"◀︎")),e.createElement("li",{className:"rotion-pdf-next"},e.createElement("span",{className:"rotion-pdf-prevnext ".concat(o===c.numPages?"rotion-pdf-prevnext-disabled":""),onClick:function(){return l(o+1)}},"▶"))),e.createElement("a",{href:r,className:"rotion-pdf-link",title:"Download PDF",target:"_blank",rel:"noopener noreferrer"},e.createElement(n,{name:"downloadfile",width:"20px",height:"20px"}))),!c&&e.createElement("span",null,"Loading..."),e.createElement("canvas",{className:"rotion-pdf-canvas",ref:h}),s.length>0&&e.createElement("div",{className:"rotion-pdf-caption"},s.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})}))))},Zd=function(t){var i=t.block;return i.has_children&&void 0!==i.children?e.createElement("div",{className:"rotion-syncedblock"},i.children.results.map((function(t){return e.createElement(hu,{block:t,key:"block-".concat(t.id)})}))):e.createElement(e.Fragment,null)},Jd=function(t){var i=t.block;if(!i.table||!i.children)return e.createElement(e.Fragment,null);var r=[],s=i.table.has_column_header,n=i.table.has_row_header;return i.children.results.map((function(t,a){var o=t,l=[];if(void 0===o.table_row)return"";o.table_row.cells.map((function(t,i){var r="".concat(o.id,"-").concat(a,"-").concat(i);return 0===a&&s||0===i&&n?l.push(function(t){var i=t.richTexts,r=t.key;return e.createElement("td",{className:"rotion-table-td-header",key:r},e.createElement("div",{className:"rotion-table-td-header-inner"},i.map((function(t,i){return e.createElement(cn,{textObject:t,key:"tabletdh-".concat(i)})}))))}({richTexts:t,key:r})||e.createElement(e.Fragment,null)):l.push(function(t){var i=t.richTexts,r=t.key;return e.createElement("td",{className:"rotion-table-td",key:r},e.createElement("div",{className:"rotion-table-td-inner"},i.map((function(t,i){return e.createElement(cn,{textObject:t,key:"tabletd-".concat(i)})}))))}({richTexts:t,key:r})||e.createElement(e.Fragment,null)),""}));var h="".concat(i.id,"-").concat(a);return r.push(function(t){var i=t.children,r=t.key;return e.createElement("tr",{className:"rotion-table-tr",key:r},i)}({children:l,key:h})||e.createElement(e.Fragment,null)),""})),e.createElement("div",{className:"rotion-table"},e.createElement("table",{className:"rotion-table-area"},e.createElement("tbody",null,r)))},Qd=function(t){var i=t.block.table_of_contents;return e.createElement("div",{className:"rotion-tableofcontents"},i.color)},eu=function(t){var i=t.block;if(!i.to_do)return e.createElement(e.Fragment,null);var r=i.to_do.checked;return e.createElement("div",{className:"rotion-todo"},e.createElement("div",{className:"rotion-todo-checkbox"},e.createElement(yn,{bool:r})),e.createElement("div",{className:"rotion-todo-text"},e.createElement("div",{className:"rotion-todo-text-inner ".concat(r?"rotion-todo-text-inner-checked":"")},i.to_do.rich_text.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})})))))},tu=function(t){var i=t.open,r={transform:"rotateZ(".concat(i?180:90,"deg)")};return e.createElement("svg",{className:"rotion-toggle-icon",style:r,viewBox:"0 0 100 100"},e.createElement("polygon",{points:"5.9,88.2 50,11.8 94.1,88.2 "}))},iu=function(t){var i=t.block,r=e.useState(!1),s=r[0],n=r[1],a=i.children.results.map((function(t,i){var r=t;return e.createElement(e.Fragment,null,r.paragraph.rich_text.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})})))}));return e.createElement("div",{className:"rotion-toggle"},e.createElement("div",{className:"rotion-toggle-triangle",onClick:function(){return n(!s)}},e.createElement(tu,{open:s})),e.createElement("div",{className:"rotion-toggle-text"},e.createElement("div",null,i.toggle.rich_text.map((function(t,i){return e.createElement(cn,{textObject:t,key:"richtext-".concat(i)})}))),s?a:null))},ru=function(t){var i=t.video,r=i.html,s=i.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html rotion-video-youtube",dangerouslySetInnerHTML:{__html:r}}),e.createElement(Sa,{type:"video",caption:s})))},su=function(t){var i=t.video,r=i.html,s=i.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html rotion-video-vimeo",dangerouslySetInnerHTML:{__html:r}}),e.createElement(Sa,{type:"video",caption:s})))},nu=function(t){var i=t.video,r=i.html,s=i.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html",dangerouslySetInnerHTML:{__html:r}}),e.createElement(Sa,{type:"video",caption:s})))},au=function(t){var i=t.video,r=i.src,s=i.caption,n=i.videoType;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-file"},e.createElement("video",{controls:!0,preload:"metadata",width:"100%"},e.createElement("source",{src:r,type:n}),"Download the ",e.createElement("a",{href:r},"Video"))),e.createElement(Sa,{type:"video",caption:s})))},ou=function(t){var i=t.block,r=i.video;switch(null==r?void 0:r.type){case"file":return r.src?e.createElement(au,{video:r}):(console.log("The video source for this video block was undefined:",i),e.createElement(e.Fragment,null));case"external":return r.html?r.html.includes("youtube")?e.createElement(ru,{video:r}):r.html.includes("vimeo")?e.createElement(su,{video:r}):e.createElement(nu,{video:r}):(console.log("The html for this video block was undefined:",i),e.createElement(e.Fragment,null));default:return console.log("The video type is unknown:",i),e.createElement(e.Fragment,null)}},lu={heading_1:"h2",heading_2:"h3",heading_3:"h4",bulleted_list_item:"li",numbered_list_item:"li",divider:"hr",paragraph:"p",code:"code",quote:"blockquote"},hu=function(t){var i=t.block,r=t.href,s=t.link,n=t.query,a=t.breadcrumb_hrefs;switch(i.type){case"bookmark":return e.createElement(la,{block:i,key:i.id});case"breadcrumb":return e.createElement(da,{block:i,hrefs:a,link:s,query:n,key:i.id});case"bulleted_list_item":return e.createElement(ua,{block:i,key:i.id});case"callout":return e.createElement(ma,{block:i,href:r,link:s,query:n,key:i.id});case"child_database":return e.createElement(fa,{block:i,href:r,link:s,query:n,key:i.id});case"child_page":return e.createElement(va,{block:i,href:r,link:s,key:i.id});case"code":return e.createElement(ka,{block:i,key:i.id});case"column_list":return e.createElement(Ea,{block:i,href:r,link:s,query:n,key:i.id});case"embed":return e.createElement(Na,{block:i,key:i.id});case"equation":return e.createElement(Ia,{block:i,key:i.id});case"file":return e.createElement(La,{block:i,key:i.id});case"heading_1":case"heading_2":case"heading_3":case"paragraph":case"quote":case"divider":var o=lu[i.type];return e.createElement(Pa,{tag:o,block:i,key:i.id});case"image":return e.createElement(Ra,{block:i,key:i.id});case"link_preview":return e.createElement(Oa,{block:i,key:i.id});case"numbered_list_item":return e.createElement(Ba,{block:i,key:i.id});case"pdf":return e.createElement(Kd,{block:i,key:i.id});case"synced_block":return e.createElement(Zd,{block:i,key:i.id});case"table":return e.createElement(Jd,{block:i,key:i.id});case"table_of_contents":return e.createElement(Qd,{block:i,key:i.id});case"to_do":return e.createElement(eu,{block:i,key:i.id});case"toggle":return e.createElement(iu,{block:i,key:i.id});case"video":return e.createElement(ou,{block:i,key:i.id});default:return console.log("unknown component: ".concat(i.type),i),e.createElement(e.Fragment,null)}},cu=function(t){var i=t.blocks,r=t.href,s=t.link,n=t.query,a=t.breadcrumb_hrefs,o=i.results,l={bulleted_list_item:"ul",numbered_list_item:"ol"},h=Object.keys(l),c=!1,d=[],u=[],p=function(e){var t,i=e+1;return h.includes((null===(t=o[i])||void 0===t?void 0:t.type)||"")};return o.map((function(t,i){var o=t;if(h.includes(o.type))if(c&&p(i))u.push(o);else if(c||!p(i)){if(c=!1,u.push(o),Object.keys(l).includes(o.type)){var m=l[o.type];d.push(function(t){var i=t.tag,r=t.blocks,s=t.href,n=t.link,a=t.query,o=i;return e.createElement(o,{className:"rotion-listblocks rotion-list-".concat(i),key:i+r[0].id},r.map((function(e){return hu({block:e,href:s,link:n,query:a})})))}({tag:m,blocks:u,href:r,link:s,query:n})),u=[]}}else c=!0,u.push(o);else{var g=hu({block:o,href:r,link:s,query:n,breadcrumb_hrefs:a});d.push(g)}return""})),e.createElement("div",{className:"rotion-blocks"},d)};exports.BookmarkBlock=la,exports.BreadcrumbBlock=da,exports.Breadcrumbs=ca,exports.BuildPlainTextByPage=function(e){return e.results.map((function(e){return"type"in e&&"paragraph"===e.type?e.paragraph.rich_text:[]})).map((function(e){return e.map((function(e){return e.plain_text}))})).flat().join("")},exports.BulletedListBlock=ua,exports.CalloutBlock=ma,exports.Checkbox=yn,exports.ChildDatabaseBlock=fa,exports.ChildPageBlock=va,exports.CodeBlock=ka,exports.ColumnListBlock=Ea,exports.EmbedBlock=Na,exports.EquationBlock=Ia,exports.FileBlock=La,exports.Gallery=function(t){var i=t.keys,r=t.db,s=t.options;void 0===s&&(s={});var n=s.image;void 0===n&&(s.image={});var a=n||{},o=a.preview,l=void 0===o?"cover":o,h=a.fit,c=void 0===h||h,d=a.size,u=void 0===d?"medium":d;return s.image={preview:l,fit:c,size:u},e.createElement("div",{className:"rotion-gallery ".concat(c?"rotion-gallery-fit":"")},e.createElement("div",{className:"rotion-gallery-inner rotion-gallery-".concat(u)},r.results.map((function(t){return e.createElement(In,{key:t.id,keys:i,page:t,options:s})}))))},exports.GalleryCard=In,exports.GalleryCheckboxField=xn,exports.GalleryDateField=un,exports.GalleryFormulaField=Sn,exports.GalleryMultiSelectField=gn,exports.GalleryNumberField=An,exports.GalleryRichTextField=pn,exports.GallerySelectField=En,exports.GalleryTitleField=dn,exports.GalleryUrlField=fn,exports.Icon=n,exports.ImageBlock=Ra,exports.LinkPreviewBlock=Oa,exports.List=function(t){var i=t.keys,r=t.db,s=t.options;return e.createElement("div",{className:"rotion-list"},e.createElement("div",{className:"rotion-list-inner"},r.results.map((function(t){return e.createElement("div",{key:t.id,className:"rotion-list-line"},i.map((function(i,r){return e.createElement("div",{key:"".concat(t.id).concat(i),className:$n(i,r)},e.createElement(Gn,{name:i,page:t,options:s}))})))}))))},exports.ListCheckboxField=qn,exports.ListDateField=Rn,exports.ListFormulaField=Vn,exports.ListMultiSelectField=zn,exports.ListNumberField=jn,exports.ListRichTextField=Dn,exports.ListSelectField=Bn,exports.ListTitleField=Pn,exports.ListUrlField=Hn,exports.NumberedListBlock=Ba,exports.Page=cu,exports.PdfBlock=Kd,exports.PrefixSuffix=wn,exports.RichText=cn,exports.SyncedBlock=Zd,exports.Table=function(t){var i=t.keys,r=t.db,s=t.options,n=function(e){return r.meta.properties[e]?r.meta.properties[e].type:'Unknown "'.concat(e,'"')},a=(s||{}).verticalLines,o=void 0===a||a;return e.createElement("div",{className:"rotion-table ".concat(o?"rotion-table-verticallines":"")},e.createElement("div",{className:"rotion-table-inner"},e.createElement("div",{className:"rotion-table-header rotion-table-row"},i.map((function(t,i){return e.createElement("div",{key:"".concat(t,"-").concat(i),className:"rotion-table-cell rotion-table-column".concat(i)},e.createElement("div",{className:"rotion-table-cell-inner"},e.createElement(Wn,{type:n(t),className:"rotion-table-header-icon"}),e.createElement("div",{className:"rotion-table-header-text"},t)))}))),r.results.map((function(t){return e.createElement("div",{key:t.id,className:"rotion-table-row"},i.map((function(i,r){return e.createElement("div",{key:"".concat(t.id).concat(i),className:"rotion-table-cell rotion-table-column".concat(r)},e.createElement("div",{className:"rotion-table-cell-inner"},e.createElement(oa,{name:i,page:t,options:s})))})))}))))},exports.TableBlock=Jd,exports.TableCheckboxField=ra,exports.TableDateField=Kn,exports.TableFormulaField=na,exports.TableIcon=Wn,exports.TableMultiSelectField=Qn,exports.TableNumberField=sa,exports.TableOfContentsBlock=Qd,exports.TableRichTextField=Zn,exports.TableSelectField=ta,exports.TableTitleField=Yn,exports.TableUrlField=ia,exports.TextBlock=Pa,exports.ToDoBlock=eu,exports.ToggleBlock=iu,exports.UsePagination=function(t,i){var r=e.useState(1),s=r[0],n=r[1],a=Math.ceil(t.length/i);return{next:function(){n((function(e){return Math.min(e+1,a)}))},currentData:function(){var e=(s-1)*i+i;return t.slice(void 0,e)},currentPage:s,maxPage:a}},exports.VideoBlock=ou,exports.getDatetimeFormat=d,exports.getLinkPathAndLinkKey=l,exports.getSlug=h,exports.pathBasename=c,exports.queryToString=o,exports.splitUrl=u;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|