@gmb/bitmark-parser-generator
Version:
A bitmark parser and generator using Peggy.js
1 lines • 667 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bitmarkParserGenerator=t():e.bitmarkParserGenerator=t()}(this,()=>(()=>{"use strict";var e={922(e,t,r){var i,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,l=(e,t,r)=>((e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),c={};((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})(c,{Ast:()=>Ge,BitType:()=>d,BitmarkGenerator:()=>dr,BitmarkParser:()=>Li,BitmarkParserGenerator:()=>eo,BitmarkParserType:()=>Tr,BitmarkStringGenerator:()=>ur,BitmarkVersion:()=>wt,BodyTextFormat:()=>Xe,BoundingBoxIndex:()=>ao,Builder:()=>ar,CardSetVersion:()=>cr,HtmlTableGenerator:()=>gr,HtmlTableParser:()=>Yi,InfoFormat:()=>_r,InfoType:()=>Cr,Input:()=>Qi,InputFormat:()=>Xi,JsonGenerator:()=>br,JsonParser:()=>Br,JsonStringGenerator:()=>to,NodeType:()=>We,Output:()=>Zi,ResourceBuilder:()=>or,StringWriter:()=>sr,TextMarkType:()=>He,TextNodeType:()=>Ue,bitmarkTextParse:()=>Wt}),e.exports=(i=c,((e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of s(t))n.call(e,l)||l===r||o(e,l,{get:()=>t[l],enumerable:!(i=a(t,l))||i.enumerable});return e})(o({},"__esModule",{value:!0}),i));var p=r(722),d=(r(722),{_error:"_error",_comment:"_comment",_standard:"_standard",advertising:"advertising",advertisingAdvertorial:"advertising-advertorial",advertisingAdvertorialPage:"advertising-advertorial-page",advertisingCallToAction:"advertising-call-to-action",advertisingCallToActionMeeting:"advertising-call-to-action-meeting",advertisingBanner:"advertising-banner",advertisingSkyscraper:"advertising-skyscraper",advertisingRectangle:"advertising-rectangle",advertisingFullPage:"advertising-full-page",advertisingHalfPage:"advertising-half-page",advertisingQuarterPage:"advertising-quarter-page",advertisingClassifiedPage:"advertising-classified-page",advertisingLandscape:"advertising-landscape",advertisingPortrait:"advertising-portrait",aiChat:"ai-chat",aiEditor:"ai-editor",aiPrompt:"ai-prompt",aiTutor:"ai-tutor",aiWbt:"ai-wbt",anchor:"anchor",appAiPrompt:"app-ai-prompt",appBitmarkFromEditor:"app-bitmark-from-editor",appBitmarkFromJavascript:"app-bitmark-from-javascript",appCalculatorLatex:"app-calculator-latex",appCodeCell:"app-code-cell",appCodeEditor:"app-code-editor",appCodeIde:"app-code-ide",appCreateBitsFromImage:"app-create-bits-from-image",appFlashcards:"app-flashcards",appFlashcardsLearn:"app-flashcards-learn",appFlashcardsQuiz:"app-flashcards-quiz",appGetScreenshot:"app-get-screenshot",appLink:"app-link",appRag:"app-rag",appSearch:"app-search",article:"article",articleAi:"article-ai",articleAlt:"article-alt",articleAttachment:"article-attachment",articleAuthor:"article-author",articleEmbed:"article-embed",articleLink:"article-link",articleResponsive:"article-responsive",articleResponsiveAlt:"article-responsive-alt",assignment:"assignment",assignmentList:"assignment-list",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",audioTranscript:"audio-transcript",author:"author",authorContentBitGenerator:"author-content-bit-generator",bitAlias:"bit-alias",bitBookEnding:"bit-book-ending",bitBookSummary:"bit-book-summary",bitmarkExample:"bitmark-example",blogArticle:"blog-article",book:"book",bookAcknowledgements:"book-acknowledgements",bookAddendum:"book-addendum",bookAfterword:"book-afterword",bookAlias:"book-alias",bookAppendix:"book-appendix",bookArticle:"book-article",bookAuthor:"book-author",bookAutherBio:"book-author-bio",bookBibliography:"book-bibliography",bookClose:"book-close",bookComingSoon:"book-coming-soon",bookConclusion:"book-conclusion",bookCopyright:"book-copyright",bookCopyrightPermissions:"book-copyright-permissions",bookCover:"book-cover",bookDedication:"book-dedication",bookDiff:"book-diff",bookEnd:"book-end",bookEndnotes:"book-endnotes",bookEpigraph:"book-epigraph",bookEpilogue:"book-epilogue",bookForword:"book-foreword",bookFrontispiece:"book-frontispiece",bookImprint:"book-imprint",bookIncitingIncident:"book-inciting-incident",bookIntroduction:"book-introduction",bookLink:"book-link",bookLinkNext:"book-link-next",bookLinkPrev:"book-link-prev",bookListOfContributors:"book-list-of-contributors",bookNotes:"book-notes",bookPostscript:"book-postscript",bookPreface:"book-preface",bookPrologue:"book-prologue",bookReadMore:"book-read-more",bookReference:"book-reference",bookReferenceList:"book-reference-list",bookRequestForABookReview:"book-request-for-a-book-review",bookSummary:"book-summary",bookTeaser:"book-teaser",bookTitle:"book-title",botActionAnnounce:"bot-action-announce",botActionRatingNumber:"bot-action-rating-number",botActionRemind:"bot-action-remind",botActionResponse:"bot-action-response",botActionSave:"bot-action-save",botActionSend:"bot-action-send",botActionTrueFalse:"bot-action-true-false",botInterview:"bot-interview",brandColor:"brand-color",browserImage:"browser-image",bug:"bug",bugAlt:"bug-alt",bugCollapsible:"bug-collapsible",buttonCopyText:"button-copy-text",catalogItemBook:"catalog-item-book",catalogItemExternalBook:"catalog-item-external-book",catalogItemProduct:"catalog-item-product",callToAction:"call-to-action",callToActionBookNow:"call-to-action-book-now",callToActionContact:"call-to-action-contact",callToActionCreateAccount:"call-to-action-create-account",callToActionDownload:"call-to-action-download",callToActionGetNow:"call-to-action-get-now",callToActionGetOffer:"call-to-action-get-offer",callToActionJoin:"call-to-action-join",callToActionLearnMore:"call-to-action-learn-more",callToActionMail:"call-to-action-mail",callToActionSeeMore:"call-to-action-see-more",callToActionShopNow:"call-to-action-shop-now",callToActionStartNow:"call-to-action-start-now",callToActionSubscribe:"call-to-action-subscribe",callToActionWatch:"call-to-action-watch",card1:"card-1",chapter:"chapter",chapterSubjectMatter:"chapter-subject-matter",chat:"chat",checklist:"checklist",cloze:"cloze",clozeAndMultipleChoiceText:"cloze-and-multiple-choice-text",clozeInstructionGrouped:"cloze-instruction-grouped",clozeList:"cloze-list",clozeSeveral:"cloze-several",clozeSolutionGrouped:"cloze-solution-grouped",coachAudioTranscript:"coach-audio-transcript",coachCallToActionChecklist:"coach-call-to-action-checklist",coachCallToActionCloze:"coach-call-to-action-cloze",coachCallToActionClozeAndMultipleChoiceText:"coach-call-to-action-cloze-and-multiple-choice-text",coachCallToActionEssay:"coach-call-to-action-essay",coachCallToActionMultipleChoiceText:"coach-call-to-action-multiple-choice-text",coachHomeRules:"coach-home-rules",coachSelfReflectionCloze:"coach-self-reflection-cloze",coachSelfReflectionEssay:"coach-self-reflection-essay",coachSelfReflectionMultipleChoice:"coach-self-reflection-multiple-choice",coachSelfReflectionMultipleChoice1:"coach-self-reflection-multiple-choice-1",coachSelfReflectionMultipleChoiceText:"coach-self-reflection-multiple-choice-text",coachSelfReflectionMultipleResponse:"coach-self-reflection-multiple-response",coachSelfReflectionMultipleResponse1:"coach-self-reflection-multiple-response-1",coachSelfReflectionRating:"coach-self-reflection-rating",coachVideoTranscript:"coach-video-transcript",code:"code",codeRuntime:"code-runtime",collapsible:"collapsible",conclusion:"conclusion",conclusionAlt:"conclusion-alt",consoleLog:"console-log",container:"container",containerAccordionTabs:"container-accordion-tabs",containerBits2:"container-bits-2",containerCards:"container-cards",containerCarousel:"container-carousel",containerCookRecipe:"container-cook-recipe",containerFolder:"container-folder",containerFolderAll:"container-folder-all",containerGallery:"container-gallery",containerGrid:"container-grid",containerGroup:"container-group",containerNewsArticle:"container-news-article",containerNowrap:"container-nowrap",containerNowrapStretch:"container-nowrap-stretch",containerPreview:"container-preview",containerScroller:"container-scroller",containerSlides:"container-slides",containerStack:"container-stack",containerTabs:"container-tabs",containerWrap:"container-wrap",conversationLeft1:"conversation-left-1",conversationLeft1Scream:"conversation-left-1-scream",conversationLeft1Thought:"conversation-left-1-thought",conversationRight1:"conversation-right-1",conversationRight1Scream:"conversation-right-1-scream",conversationRight1Thought:"conversation-right-1-thought",clozeAndMultipleChoiceTextConversationLeft1:"cloze-and-multiple-choice-text-conversation-left-1",clozeAndMultipleChoiceTextConversationLeft1Scream:"cloze-and-multiple-choice-text-conversation-left-1-scream",clozeAndMultipleChoiceTextConversationLeft1Thought:"cloze-and-multiple-choice-text-conversation-left-1-thought",clozeAndMultipleChoiceTextConversationRight1:"cloze-and-multiple-choice-text-conversation-right-1",clozeAndMultipleChoiceTextConversationRight1Scream:"cloze-and-multiple-choice-text-conversation-right-1-scream",clozeAndMultipleChoiceTextConversationRight1Thought:"cloze-and-multiple-choice-text-conversation-right-1-thought",cookArrangement:"cook-arrangement",cookIngredients:"cook-ingredients",cookInsert:"cook-insert",cookNoteOnQuantity:"cook-note-on-quantity",cookPersonalRecommendation:"cook-personal-recommendation",cookPlate:"cook-plate",cookPracticeAdvise:"cook-practice-advise",cookPreparation:"cook-preparation",cookRecommendation:"cook-recommendation",cookRemark:"cook-remark",cookSideDish:"cook-side-dish",cookSideDrink:"cook-side-drink",cookStep:"cook-step",cookTimer:"cook-timer",cookVariation:"cook-variation",correction:"correction",danger:"danger",dangerAlt:"danger-alt",dangerCollapsible:"danger-collapsible",definitionList:"definition-list",definitionListCollapsible:"definition-list-collapsible",definitionTerm:"definition-term",deleted:"deleted",details:"details",details1:"details-1",detailsImage:"details-image",diff:"diff",document:"document",documentDownload:"document-download",documentEmbed:"document-embed",documentLink:"document-link",documentUpload:"document-upload",editorial:"editorial",editorNote:"editor-note",essay:"essay",example:"example",exampleAlt:"example-alt",exampleCollapsible:"example-collapsible",exampleList:"example-list",extractorAiChat:"extractor-ai-chat",extractorBlock:"extractor-block",extractorBlueprint:"extractor-blueprint",extractorBlueprintConfiguration:"extractor-blueprint-configuration",extractorConfiguration:"extractor-configuration",extractorImage:"extractor-image",extractorImageCollapsible:"extractor-image-collapsible",extractorInformation:"extractor-information",extractorPage:"extractor-page",extractorPageCollapsible:"extractor-page-collapsible",extractorPageFooter:"extractor-page-footer",extractorPageFooterCollapsible:"extractor-page-footer-collapsible",extractorPageHeader:"extractor-page-header",extractorPageHeaderCollapsible:"extractor-page-header-collapsible",extractorPageNumber:"extractor-page-number",extractorPageNumberCollapsible:"extractor-page-number-collapsible",extractorPageWithBlocks:"extractor-page-with-blocks",extractorPageWithBlocksCollapsible:"extractor-page-with-blocks-collapsible",extractorReconcile:"extractor-reconcile",extractorRepeatedText:"extractor-repeated-text",extractorRule:"extractor-rule",extractorTheme:"extractor-theme",featured:"featured",feedback:"feedback",figure:"figure",flashcard:"flashcard",flashcard1:"flashcard-1",focusImage:"focus-image",footNote:"foot-note",formFreeText:"form-free-text",formula:"formula",formulaImage:"formula-image",gapText:"gap-text",gapTextInstructionGrouped:"gap-text-instruction-grouped",glossaryTerm:"glossary-term",groupBorn:"group-born",groupDied:"group-died",handInAudio:"hand-in-audio",handInContact:"hand-in-contact",handInDocument:"hand-in-document",handInFeedbackExpert:"hand-in-feedback-expert",handInFeedbackSelf:"hand-in-feedback-self",handInFile:"hand-in-file",handInFreeText:"hand-in-free-text",handInFreeTextExpert:"hand-in-free-text-expert",handInLocation:"hand-in-location",handInPhoto:"hand-in-photo",handInScan:"hand-in-scan",handInSubmit:"hand-in-submit",handInSystemMedia:"hand-in-system-media",handInVideo:"hand-in-video",handInVoice:"hand-in-voice",help:"help",helpAlt:"help-alt",highlightText:"highlight-text",hint:"hint",hintAlt:"hint-alt",hintCollapsible:"hint-collapsible",image:"image",imageBanner:"image-banner",imageFigure:"image-figure",imageFigureAlt:"image-figure-alt",imageLandscape:"image-landscape",imageLink:"image-link",imageMood:"image-mood",imageOnDevice:"image-on-device",imagePortrait:"image-portrait",imagePrototype:"image-prototype",imageResponsive:"image-responsive",imageScreenshot:"image-screenshot",imageSeparator:"image-separator",imageSeparatorAlt:"image-separator-alt",imagesLogoGrave:"images-logo-grave",imageStyled:"image-styled",imageSuperWide:"image-super-wide",imageZoom:"image-zoom",indexTerm:"index-term",info:"info",infoAlt:"info-alt",infoCollapsible:"info-collapsible",internalLink:"internal-link",interview:"interview",interviewInstructionGrouped:"interview-instruction-grouped",langAudioScript:"lang-audio-script",langEnablingLanguageSkills:"lang-enabling-language-skills",langEnglishAroundWorld:"lang-english-around-world",langExtraActivity:"lang-extra-activity",langGoodToKnow:"lang-good-to-know",langHomework:"lang-homework",langLearningGoal:"lang-learning-goal",langLearningOutcomes:"lang-learning-outcomes",langLearningStrategy:"lang-learning-strategy",langLevelDown:"lang-level-down",langLevelUp:"lang-level-up",langLifeSkillIcon:"lang-life-skill-icon",langLifeSkills:"lang-life-skills",langLikeALocal:"lang-like-a-local",langMaterial:"lang-material",langTeacherNote:"lang-teacher-note",langTeacherPronunciation:"lang-teacher-pronunciation",langUsefulPhrases:"lang-useful-phrases",langVideoScript:"lang-video-script",langVocabulary:"lang-vocabulary",learningDocumentationFeedback:"learning-documentation-feedback",learningPathBook:"learning-path-book",learningPathBotTraining:"learning-path-bot-training",learningPathClassroomEvent:"learning-path-classroom-event",learningPathClassroomTraining:"learning-path-classroom-training",learningPathClosing:"learning-path-closing",learningPathExternalLink:"learning-path-external-link",learningPathFeedback:"learning-path-feedback",learningPathLearningGoal:"learning-path-learning-goal",learningPathLti:"learning-path-lti",learningPathSign:"learning-path-sign",learningPathStep:"learning-path-step",learningPathVideoCall:"learning-path-video-call",leAssignment:"le-assignment",leClassroomEvent:"le-classroom-event",leCompletion:"le-completion",leExternalLink:"le-external-link",leFinishingTask:"le-finishing-task",leFollowUpTask:"le-follow-up-task",leMultiDayEvent:"le-multi-day-event",legend:"legend",leDocumentDownload:"le-document-download",leLearningObjectives:"le-learning-objectives",leLearningStep:"le-learning-step",leListenAudioEmbed:"le-listen-audio-embed",lePreparationTask:"le-preparation-task",leRead:"le-read",leReadBook:"le-read-book",leTask:"le-task",leTodo:"le-todo",leVideoCall:"le-video-call",leWatchVideoEmbed:"le-watch-video-embed",lifeSkillSticker:"life-skill-sticker",list:"list",listItem:"list-item",mark:"mark",match:"match",matchAll:"match-all",matchAllReverse:"match-all-reverse",matchAudio:"match-audio",matchMatrix:"match-matrix",matchPicture:"match-picture",matchReverse:"match-reverse",matchSolutionGrouped:"match-solution-grouped",message:"message",metalevelExplanation:"metalevel-explanation",metaSearchDefaultTerms:"meta-search-default-terms",metaSearchDefaultTopics:"meta-search-default-topics",milestone:"milestone",module:"module",moduleProduct:"module-product",multipleChoice:"multiple-choice",multipleChoice1:"multiple-choice-1",multipleChoiceText:"multiple-choice-text",multipleResponse:"multiple-response",multipleResponse1:"multiple-response-1",newspaperArticle:"newspaper-article",nonProductionPrototypeIframe:"non-production-prototype-iframe",note:"note",noteAi:"note-ai",noteAlt:"note-alt",notebookArticle:"notebook-article",noteCollapsible:"note-collapsible",output:"output",page:"page",pageAcademy:"page-academy",pageArticle:"page-article",pageArticleAlt:"page-article-alt",pageArticleResponsive:"page-article-responsive",pageBanner:"page-banner",pageBuyButton:"page-buy-button",pageBuyButtonAlt:"page-buy-button-alt",pageBuyButtonPromotion:"page-buy-button-promotion",pageCategory:"page-category",pageCollapsible:"page-collapsible",pageContainer:"page-container",pageContainerFolder:"page-container-folder",pageContainerGroup:"page-container-group",pageContainerNowrap:"page-container-nowrap",pageContainerNowrapStretch:"page-container-nowrap-stretch",pageContainerWrap:"page-container-wrap",pageCoverImage:"page-cover-image",pageFooter:"page-footer",pageHero:"page-hero",pageOpenBook:"page-open-book",pageOpenBookList:"page-open-book-list",printBook:"print-book",openBookChapter:"open-book-chapter",openBookChapterTeaser:"open-book-chapter-teaser",pagePerson:"page-person",pageProduct:"page-product",pageProductList:"page-product-list",pageProductVideo:"page-product-video",pageProductVideoList:"page-product-video-list",pagePromotion:"page-promotion",pageSectionFolder:"page-section-folder",pageShopInShop:"page-shop-in-shop",pageSpecial:"page-special",pageEnd:"page-end",pageStart:"page-start",pageSubpage:"page-subpage",pageSubscribe:"page-subscribe",parameters:"parameters",photo:"photo",platform:"platform",platformBrandTarget:"platform-brand-target",platformHeader:"platform-header",platformMain:"platform-main",platformMainButton:"platform-main-button",platformMainInput:"platform-main-input",platformPath:"platform-path",platformSection:"platform-section",platformSectionButton:"platform-section-button",platformSectionChat:"platform-section-chat",platformSectionHeader:"platform-section-header",platformSectionInput:"platform-section-input",platformSystemIcon:"platform-system-icon",preparationNote:"preparation-note",printThisBook:"print-this-book",printThisChapter:"print-this-chapter",printPageBreak:"print-page-break",pronunciationTable:"pronunciation-table",prototypeImages:"prototype-images",qAndA:"q-and-a",qAndACard:"q-and-a-card",question1:"question-1",quote:"quote",rating:"rating",recipe:"recipe",recordAudio:"record-audio",recordVideo:"record-video",releaseNote:"release-note",releaseNotesSummary:"release-notes-summary",remark:"remark",remarkAlt:"remark-alt",remarkCollapsible:"remark-collapsible",reviewApprovedNote:"review-approved-note",reviewAuthorNote:"review-author-note",reviewCustomerNote:"review-customer-note",reviewError:"review-error",reviewErrorAi:"review-error-ai",reviewErrorTranslation:"review-error-translation",reviewNote:"review-note",reviewRequestForReviewNote:"review-request-for-review-note",reviewReviewerNote:"review-reviewer-note",sampleSolution:"sample-solution",sandbox:"sandbox",sandboxOutputJson:"sandbox-output-json",sandboxOutputMarkup:"sandbox-output-markup",sandboxOutputRender:"sandbox-output-render",scorm:"scorm",screenshot:"screenshot",selfAssessment:"self-assessment",separator:"separator",separatorAlt:"separator-alt",sequence:"sequence",sideNote:"side-note",sideNoteCollapsible:"side-note-collapsible",smartStandardArticleNonNormative:"smart-standard-article-non-normative",smartStandardArticleNonNormativeCollapsible:"smart-standard-article-non-normative-collapsible",smartStandardArticleNormative:"smart-standard-article-normative",smartStandardArticleNormativeCollapsible:"smart-standard-article-normative-collapsible",smartStandardDefinitionListNonNormative:"smart-standard-definition-list-non-normative",smartStandardDefinitionListNormative:"smart-standard-definition-list-normative",smartStandardExampleNonNormative:"smart-standard-example-non-normative",smartStandardExampleNonNormativeCollapsible:"smart-standard-example-non-normative-collapsible",smartStandardExampleNormative:"smart-standard-example-normative",smartStandardExampleNormativeCollapsible:"smart-standard-example-normative-collapsible",smartStandardFormula:"smart-standard-formula",smartStandardFormulaNonNormative:"smart-standard-formula-non-normative",smartStandardFormulaNormative:"smart-standard-formula-normative",smartStandardImageFigureNonNormative:"smart-standard-image-figure-non-normative",smartStandardImageFigureNonNormativeCollapsible:"smart-standard-image-figure-non-normative-collapsible",smartStandardImageFigureNormative:"smart-standard-image-figure-normative",smartStandardImageFigureNormativeCollapsible:"smart-standard-image-figure-normative-collapsible",smartStandardLegend:"smart-standard-legend",smartStandardLegendNonNormative:"smart-standard-legend-non-normative",smartStandardLegendNormative:"smart-standard-legend-normative",smartStandardList:"smart-standard-list",smartStandardListCollapsible:"smart-standard-list-collapsible",smartStandardListItem:"smart-standard-list-item",smartStandardListItemCollapsible:"smart-standard-list-item-collapsible",smartStandardNoteNonNormative:"smart-standard-note-non-normative",smartStandardNoteNonNormativeCollapsible:"smart-standard-note-non-normative-collapsible",smartStandardNoteNormative:"smart-standard-note-normative",smartStandardNoteNormativeCollapsible:"smart-standard-note-normative-collapsible",smartStandardRemarkLegend:"smart-standard-remark-legend",smartStandardRemarkLegendNonNormative:"smart-standard-remark-legend-non-normative",smartStandardRemarkLegendNormative:"smart-standard-remark-legend-normative",smartStandardRemarkFormula:"smart-standard-remark-formula",smartStandardRemarkFormulaNonNormative:"smart-standard-remark-formula-non-normative",smartStandardRemarkFormulaNormative:"smart-standard-remark-formula-normative",smartStandardRemarkNonNormative:"smart-standard-remark-non-normative",smartStandardRemarkNonNormativeCollapsible:"smart-standard-remark-non-normative-collapsible",smartStandardRemarkNormative:"smart-standard-remark-normative",smartStandardRemarkNormativeCollapsible:"smart-standard-remark-normative-collapsible",smartStandardRemarkTableExtendedImageNonNormative:"smart-standard-remark-table-extended-image-non-normative",smartStandardRemarkTableExtendedImageNonNormativeCollapsible:"smart-standard-remark-table-extended-image-non-normative-collapsible",smartStandardRemarkTableExtendedImageNormative:"smart-standard-remark-table-extended-image-normative",smartStandardRemarkTableExtendedImageNormativeCollapsible:"smart-standard-remark-table-extended-image-normative-collapsible",smartStandardRemarkTableExtendedNonNormative:"smart-standard-remark-table-extended-non-normative",smartStandardRemarkTableExtendedNonNormativeCollapsible:"smart-standard-remark-table-extended-non-normative-collapsible",smartStandardRemarkTableExtendedNormative:"smart-standard-remark-table-extended-normative",smartStandardRemarkTableExtendedNormativeCollapsible:"smart-standard-remark-table-extended-normative-collapsible",smartStandardRemarkTableImageNonNormative:"smart-standard-remark-table-image-non-normative",smartStandardRemarkTableImageNonNormativeCollapsible:"smart-standard-remark-table-image-non-normative-collapsible",smartStandardRemarkTableImageNormative:"smart-standard-remark-table-image-normative",smartStandardRemarkTableImageNormativeCollapsible:"smart-standard-remark-table-image-normative-collapsible",smartStandardRemarkTableNonNormative:"smart-standard-remark-table-non-normative",smartStandardRemarkTableNonNormativeCollapsible:"smart-standard-remark-table-non-normative-collapsible",smartStandardRemarkTableNormative:"smart-standard-remark-table-normative",smartStandardRemarkTableNormativeCollapsible:"smart-standard-remark-table-normative-collapsible",smartStandardTableExtendedImageNonNormative:"smart-standard-table-extended-image-non-normative",smartStandardTableExtendedImageNonNormativeCollapsible:"smart-standard-table-extended-image-non-normative-collapsible",smartStandardTableExtendedImageNormative:"smart-standard-table-extended-image-normative",smartStandardTableExtendedImageNormativeCollapsible:"smart-standard-table-extended-image-normative-collapsible",smartStandardTableExtendedNonNormative:"smart-standard-table-extended-non-normative",smartStandardTableExtendedNonNormativeCollapsible:"smart-standard-table-extended-non-normative-collapsible",smartStandardTableExtendedNormative:"smart-standard-table-extended-normative",smartStandardTableExtendedNormativeCollapsible:"smart-standard-table-extended-normative-collapsible",smartStandardTableImageNonNormative:"smart-standard-table-image-non-normative",smartStandardTableImageNonNormativeCollapsible:"smart-standard-table-image-non-normative-collapsible",smartStandardTableImageNormative:"smart-standard-table-image-normative",smartStandardTableImageNormativeCollapsible:"smart-standard-table-image-normative-collapsible",smartStandardTableNonNormative:"smart-standard-table-non-normative",smartStandardTableNonNormativeCollapsible:"smart-standard-table-non-normative-collapsible",smartStandardTableNormative:"smart-standard-table-normative",smartStandardTableNormativeCollapsible:"smart-standard-table-normative-collapsible",standardArticleNonNormative:"standard-article-non-normative",standardArticleNormative:"standard-article-normative",standardDefinitionListNonNormative:"standard-definition-list-non-normative",standardDefinitionListNormative:"standard-definition-list-normative",standardExampleNonNormative:"standard-example-non-normative",standardExampleNormative:"standard-example-normative",standardImageFigureNonNormative:"standard-image-figure-non-normative",standardImageFigureNormative:"standard-image-figure-normative",standardList:"standard-list",standardListItem:"standard-list-item",standardNoteNonNormative:"standard-note-non-normative",standardNoteNormative:"standard-note-normative",standardRemarkNonNormative:"standard-remark-non-normative",standardRemarkNormative:"standard-remark-normative",standardRemarkTableExtendedImageNonNormative:"standard-remark-table-extended-image-non-normative",standardRemarkTableExtendedImageNormative:"standard-remark-table-extended-image-normative",standardRemarkTableExtendedNonNormative:"standard-remark-table-extended-non-normative",standardRemarkTableExtendedNormative:"standard-remark-table-extended-normative",standardRemarkTableImageNonNormative:"standard-remark-table-image-non-normative",standardRemarkTableImageNormative:"standard-remark-table-image-normative",standardRemarkTableNonNormative:"standard-remark-table-non-normative",standardRemarkTableNormative:"standard-remark-table-normative",standardTableExtendedImageNonNormative:"standard-table-extended-image-non-normative",standardTableExtendedImageNormative:"standard-table-extended-image-normative",standardTableExtendedNonNormative:"standard-table-extended-non-normative",standardTableExtendedNormative:"standard-table-extended-normative",standardTableImageNonNormative:"standard-table-image-non-normative",standardTableImageNormative:"standard-table-image-normative",standardTableNonNormative:"standard-table-non-normative",standardTableNormative:"standard-table-normative",statement:"statement",stdout:"stdout",step:"step",stepImageScreenshot:"step-image-screenshot",stepImageScreenshotWithPointer:"step-image-screenshot-with-pointer",sticker:"sticker",stickyNote:"sticky-note",stillImageFilm:"still-image-film",stillImageFilmEmbed:"still-image-film-embed",stillImageFilmLink:"still-image-film-link",summary:"summary",summaryAi:"summary-ai",survey:"survey",survey1:"survey-1",surveyAnonymous:"survey-anonymous",surveyAnonymous1:"survey-anonymous-1",surveyMatrix:"survey-matrix",surveyMatrixMe:"survey-matrix-me",surveyRating:"survey-rating",surveyRatingDisplay:"survey-rating-display",surveyRatingOnce:"survey-rating-once",table:"table",tableAlt:"table-alt",tableExtended:"table-extended",tableExtendedImage:"table-extended-image",tableImage:"table-image",tableImageAlt:"table-image-alt",takePicture:"take-picture",toc:"toc",tocChapter:"toc-chapter",tocInline:"toc-inline",tocResource:"toc-resource",tocContent:"toc-content",trueFalse:"true-false",trueFalse1:"true-false-1",vendorAmcharts5Chart:"vendor-amcharts-5-chart",vendorDatadogDashboard:"vendor-datadog-dashboard",vendorDatadogDashboardEmbed:"vendor-datadog-dashboard-embed",vendorFormbricksEmbed:"vendor-formbricks-embed",vendorFormbricksLink:"vendor-formbricks-link",vendorFormbricksEmbedAnonymous:"vendor-formbricks-embed-anonymous",vendorFormbricksLinkAnonymous:"vendor-formbricks-link-anonymous",vendorHighchartsChart:"vendor-highcharts-chart",vendorIframelyCard:"vendor-iframely-card",vendorIframelyEmbed:"vendor-iframely-embed",vendorIframelyPreview:"vendor-iframely-preview",vendorIframelyPreviewMini:"vendor-iframely-preview-mini",vendorJupyterCellCode:"vendor-jupyter-cell-code",vendorJupyterCellMarkdown:"vendor-jupyter-cell-markdown",vendorJupyterCellRaw:"vendor-jupyter-cell-raw",vendorJupyterIpynb:"vendor-jupyter-ipynb",vendorJupyterOutput:"vendor-jupyter-output",vendorLearndashEmbed:"vendor-learndash-embed",vendorPadletEmbed:"vendor-padlet-embed",vendorStripePricingTable:"vendor-stripe-pricing-table",vendorStripePricingTableExternal:"vendor-stripe-pricing-table-external",vendorStripePricingTablePrintOnRequest:"vendor-stripe-pricing-table-print-on-request",video:"video",videoEmbed:"video-embed",videoEmbedLandscape:"video-embed-landscape",videoEmbedPortrait:"video-embed-portrait",videoLandscape:"video-landscape",videoLink:"video-link",videoLinkLandscape:"video-link-landscape",videoLinkPortrait:"video-link-portrait",videoPortrait:"video-portrait",videoTranscript:"video-transcript",warning:"warning",warningAlt:"warning-alt",warningCollapsible:"warning-collapsible",websiteLink:"website-link",workbookArticle:"workbook-article"}),u=(r(722),"infinity"),m=(r(722),"string"),h="boolean",g=(r(722),{tag_title:"#",tag_anchor:"▼",tag_reference:"►",tag_property:"@",tag_item:"%",tag_instruction:"!",tag_hint:"?",tag_true:"+",tag_false:"-",tag_sampleSolution:"$",tag_gap:"_",tag_mark:"=",tag_resource:"&"}),f=g,y=(r(722),"plainText"),b="bitmarkText",k="number",x="boolean",v="invertedBoolean",T="enumeration",_="coordinates",C=(r(722),{plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkText:"bitmark++"}),w=(r(722),"flashcard"),A="flashcard1",B="definitionList",S="definitionListPlain",I="elements",P="statements",E="quiz",L="quizResponses",V="feedback",N="questions",R="matchPairs",F="matchAudioPairs",K="matchImagePairs",$="matchMatrix",O="table",J="tableExtended",D="pronunciationTable",j="botActionResponses",q="exampleBitList",M="pageFooterSections",z="clozeList",H="ingredients",U="bookReferenceList",W=(r(722),"standard"),G="resource",Y="comboResource",Q=(r(722),"unknown"),Z="tag",X="property",ee="resource",te="group",re=class{constructor(e){l(this,"type"),l(this,"configKey"),l(this,"tag"),l(this,"maxCount"),l(this,"minCount"),l(this,"chain"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"deprecated"),this.type=e.type,this.configKey=e.configKey,this.tag=e.tag,this.maxCount=e.maxCount,this.minCount=e.minCount,this.chain=e.chain,this.jsonKey=e.jsonKey,this.exportJsonKey=e.exportJsonKey,this.hasExportJsonKey=e.hasExportJsonKey,this.htmlKey=e.htmlKey,this.hasHtmlKey=e.hasHtmlKey,this.deprecated=e.deprecated}},ie=class extends re{constructor(e){super({type:Z,...e}),l(this,"type",Z)}toString(e){const t=Object.assign({},e);let r=`TAG[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}},oe=class extends re{constructor(e){super({type:X,...e}),l(this,"type",X),l(this,"array"),l(this,"format"),l(this,"values"),l(this,"defaultValue"),this.array=e.maxCount===u||e.maxCount>1,this.format=e.format,this.values=e.values,this.defaultValue=e.defaultValue}toString(e){const t=Object.assign({},e);let r=`PTY[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`),null!=this.array&&(r+=`, arr=${this.array}`),null!=this.format&&(r+=`, fmt=${this.format}`),null!=this.values&&(r+=`, vals=[${this.values.join(",")}]`),null!=this.defaultValue&&(r+=`, def=${this.defaultValue}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}},ae=class extends re{constructor(e){super({type:ee,...e}),l(this,"type",ee)}toString(e){const t=Object.assign({},e);let r=`RES[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}},se=class{constructor(e,t,r,i,o,a,s=!1,n,c,p=!1){l(this,"tags"),l(this,"bodyAllowed"),l(this,"bodyRequired"),l(this,"repeatCount"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"format"),this.tags=e,this.bodyAllowed=t??!0,this.bodyRequired=r,this.repeatCount=i,this.jsonKey=o,this.exportJsonKey=a,this.hasExportJsonKey=s,this.htmlKey=c,this.hasHtmlKey=p,this.format=n}toString(e){const t=Object.assign({},e);let r="";const i=[];this.bodyAllowed&&i.push("bodyAllowed"),this.bodyRequired&&i.push("bodyRequired"),null!=this.repeatCount&&i.push(`repeatCount=${this.repeatCount}`),r+=`[Flags]\n${i.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))r+=`\n${e.toString(t)}`;return r}},ne=class{constructor(e,t,r,i,o,a=!1,s,n=!1){l(this,"name"),l(this,"repeat"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"variants"),this.name=e,this.repeat=t,this.jsonKey=i,this.exportJsonKey=o,this.hasExportJsonKey=a,this.htmlKey=s,this.hasHtmlKey=n,this.variants=r}toString(e){const t=Object.assign({},e);let r="";r+=`[Side: ${this.name}]`,this.repeat&&(r+=" (repeat)");let i=0;for(const e of this.variants)r+=`\n [Variant ${i}]`,r+=`\n ${e.toString(t)}`,i++;return r}},le=class{constructor(e,t,r,i,o,a,s=void 0,n=!1){l(this,"configKey"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"sections"),l(this,"sides"),this.configKey=e,this.jsonKey=t,this.exportJsonKey=r,this.hasExportJsonKey=i,this.htmlKey=s,this.hasHtmlKey=n,this.sections=o,this.sides=a}get variants(){return this.sides.map(e=>e.variants)}toString(e){const t=Object.assign({},e);let r="";r+=`[CardSet: ${this.configKey}]`,r+=`\n jsonKey: ${this.jsonKey}`;for(const e of this.sides)r+=`\n${e.toString(t)}`;return r}},ce=class{constructor(e){l(this,"since"),l(this,"bitType"),l(this,"inheritedBitTypes"),l(this,"inheritedBitTypesSet"),l(this,"textFormatDefault"),l(this,"tags",{}),l(this,"cardSet"),l(this,"quizBit"),l(this,"deprecated"),l(this,"bodyAllowed"),l(this,"bodyRequired"),l(this,"footerAllowed"),l(this,"footerRequired"),l(this,"resourceAttachmentAllowed"),l(this,"rootExampleType"),l(this,"comboResourceConfigKey");const{since:t,bitType:r,inheritedBitTypes:i,textFormatDefault:o,tags:a,cardSet:s,quizBit:n,deprecated:c,bodyAllowed:p,bodyRequired:d,footerAllowed:u,footerRequired:m,resourceAttachmentAllowed:h,rootExampleType:g,comboResourceConfigKey:f}=e;this.since=t,this.bitType=r,this.inheritedBitTypes=i,this.inheritedBitTypesSet=new Set(i),this.textFormatDefault=o,this.tags=a,this.cardSet=s,this.quizBit=n,this.deprecated=c,this.bodyAllowed=p??!0,this.bodyRequired=d,this.footerAllowed=u??!0,this.footerRequired=m,this.resourceAttachmentAllowed=h??!0,this.rootExampleType=g,this.comboResourceConfigKey=f}toString(e){const t=Object.assign({},e);let r=`[Bit]\n${this.bitType}`;this.inheritedBitTypes.length>0&&(r+="\n\n[Inheritance]",r+=`\n${this.inheritedBitTypes.join(" => ")}`),r+=`\n\n[Default text format]\n${this.textFormatDefault}`;const i=[];null!=this.since&&i.push(`since=${this.since}`),null!=this.deprecated&&i.push(`deprecated=${this.deprecated}`),this.bodyAllowed&&i.push("bodyAllowed"),this.bodyRequired&&i.push("bodyRequired"),this.footerAllowed&&i.push("footerAllowed"),this.footerRequired&&i.push("footerRequired"),this.resourceAttachmentAllowed&&i.push("resourceAttachmentAllowed"),null!=this.rootExampleType&&i.push(`rootExampleType=${this.rootExampleType}`),null!=this.comboResourceConfigKey&&i.push(`comboResourceConfigKey=${this.comboResourceConfigKey}`),r+=`\n\n[Flags]\n${i.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))(e.maxCount===u||e.maxCount>0)&&(r+=`\n${e.toString(t)}`);return this.cardSet&&(r+=`\n\n${this.cardSet.toString(t)}`),r}},pe=r(722),de=(r(722),r(722),{property_action:"@action",property_activityType:"@activityType",property_additionalSolutions:"@additionalSolutions",property_advertisingClickUrl:"@advertisingClickUrl",property_ageRange:"@ageRange",property_aiGenerated:"@aiGenerated",property_allowedBit:"@allowedBit",property_allowPrint:"@allowPrint",property_allowSubtitles:"@allowSubtitles",property_alt:"@alt",property_altLangTag:"@altLangTag",property_analyticsTag:"@analyticsTag",property_author:"@author",property_authorFullName:"@authorFullName",property_authorJobTitle:"@authorJobTitle",property_authorPseudonym:"@authorPseudonym",property_authorTitle:"@authorTitle",property_autoplay:"@autoplay",property_availableClassifications:"@availableClassifications",property_brandColor:"@brandColor",property_brandColorName:"@brandColorName",property_backgroundImage:"@backgroundImage",property_blockId:"@blockId",property_book:"@book",property_bookAlias:"@bookAlias",property_bookDiff:"@bookDiff",property_bot:"@bot",property_bubbleTag:"@bubbleTag",property_extractorTag:"@extractorTag",property_extractorInternal:"@extractorInternal",property_bitFingerprint:"@bitFingerprint",property_buttonCaption:"@buttonCaption",property_callToActionUrl:"@callToActionUrl",property_caption:"@caption",property_categoryTag:"@categoryTag",property_chatWithBook:"@chatWithBook",property_chatWithBookBrainKey:"@chatWithBookBrainKey",property_currency:"@currency",property_bookIsbn:"@bookIsbn",property_bookAuthor:"@bookAuthor",property_bookType:"@bookType",property_bookBindingType:"@bookBindingType",property_bookNumberOfPages:"@bookNumberOfPages",property_bookRating:"@bookRating",property_bookSeriesTitle:"@bookSeriesTitle",property_bookSeriesId:"@bookSeriesId",property_bookSeriesNumber:"@bookSeriesNumber",property_bookLanguage:"@bookLanguage",property_bookPublishingDate:"@bookPublishingDate",property_bookPublisher:"@bookPublisher",property_bookTranslator:"@bookTranslator",property_bookOriginalTitle:"@bookOriginalTitle",property_gmbExternalShop:"@gmbExternalShop",property_gmbExternalShopItems:"@gmbExternalShopItems",property_citationStyle:"@citationStyle",property_classification:"@classification",property_codeLineNumbers:"@codeLineNumbers",property_codeMinimap:"@codeMinimap",property_color:"@color",property_colorTag:"@colorTag",property_computerLanguage:"@computerLanguage",property_content2Buy:"@content2Buy",property_listPrice:"@listPrice",property_customerProductId:"@customerProductId",property_customerProductShopLink:"@customerProductShopLink",property_copyright:"@copyright",property_coverColor:"@coverColor",property_coverImage:"@coverImage",property_customerExternalId:"@customerExternalId",property_customerId:"@customerId",property_date:"@date",property_dateEnd:"@dateEnd",property_decimalPlaces:"@decimalPlaces",property_deeplink:"@deeplink",property_displayName:"@displayName",property_diffContext:"@diffContext",property_diffOp:"@diffOp",property_diffRef:"@diffRef",property_diffTime:"@diffTime",property_diffTo:"@diffTo",property_disableCalculation:"@disableCalculation",property_disableFeedback:"@disableFeedback",property_duration:"@duration",property_isEditable:"@isEditable",property_needsValidation:"@needsValidation",property_validationDate:"@validationDate",property_emphasis:"@emphasis",property_example:"@example",property_externalId:"@externalId",property_externalLink:"@externalLink",property_externalLinkText:"@externalLinkText",property_feedbackEngine:"@feedbackEngine",property_feedbackType:"@feedbackType",property_userFeedbackTranslationUrl:"@userFeedbackTranslationUrl",property_userFeedbackContentUrl:"@userFeedbackContentUrl",property_flashcardSet:"@flashcardSet",property_focusX:"@focusX",property_focusY:"@focusY",property_format:"@format",property_formula:"@formula",property_fullName:"@fullName",property_groupTag:"@groupTag",property_gUri:"@gUri",property_handInAcceptFileType:"@handInAcceptFileType",property_handInInstruction:"@handInInstruction",property_handInRequirement:"@handInRequirement",property_hasBookNavigation:"@hasBookNavigation",property_hasMarkAsDone:"@hasMarkAsDone",property_height:"@height",property_icon:"@icon",property_iconTag:"@iconTag",property_id:"@id",property_iframeSrc:"@iframeSrc",property_iframeName:"@iframeName",property_imageFirst:"@imageFirst",property_imageSource:"@imageSource",property_index:"@index",property_internalComment:"@internalComment",property_internalPrintPdf:"@internalPrintPdf",property_hasPrintRestriction:"@hasPrintRestriction",property_enforceUpdateOverUserInput:"@enforceUpdateOverUserInput",property_extractorExtractionTimestamp:"@extractorExtractionTimestamp",property_isCaseSensitive:"@isCaseSensitive",property_isCollapsible:"@isCollapsible",property_isInfoOnly:"@isInfoOnly",property_isPublic:"@isPublic",property_isTemplate:"@isTemplate",property_isTemplateStripTheme:"@isTemplateStripTheme",property_isTracked:"@isTracked",property_jobTitle:"@jobTitle",property_jupyterExecutionCount:"@jupyterExecutionCount",property_jupyterId:"@jupyterId",property_kind:"@kind",property_label:"@label",property_labelFalse:"@labelFalse",property_labelTrue:"@labelTrue",property_lang:"@lang",property_language:"@language",property_layer:"@layer",property_layerRole:"@layerRole",property_levelACTFL:"@levelACTFL",property_levelCEFR:"@levelCEFR",property_levelCEFRp:"@levelCEFRp",property_levelILR:"@levelILR",property_license:"@license",property_list:"@list",property_listItemIndent:"@listItemIndent",property_location:"@location",property_machineTranslated:"@machineTranslated",property_translationOf:"@translationOf",property_translationOfBook:"@translationOfBook",property_spansPageBreak:"@spansPageBreak",property_mailingList:"@mailingList",property_mark:"@mark",property_maxCreatedBits:"@maxCreatedBits",property_maxDisplayLevel:"@maxDisplayLevel",property_maxTocChapterLevel:"@maxTocChapterLevel",property_mockupId:"@mockupId",property_mute:"@mute",property_padletId:"@padletId",property_page:"@page",property_printParentChapterLevel:"@printParentChapterLevel",property_printOnRequestCustomerId:"@printOnRequestCustomerId",property_printOnRequestProductId:"@printOnRequestProductId",property_pageNo:"@pageNo",property_partialAnswer:"@partialAnswer",property_partner:"@partner",property_path:"@path",property_platformBackgroundColor:"@platformBackgroundColor",property_platformBorderColor:"@platformBorderColor",property_platformBrandTarget:"@platformBrandTarget",property_platformButtonBackgroundColor:"@platformButtonBackgroundColor",property_platformButtonPrimaryColor:"@platformButtonPrimaryColor",property_platformMessageBackgroundColor:"@platformMessageBackgroundColor",property_platformName:"@platformName",property_platformPlaceholderColor:"@platformPlaceholderColor",property_platformPrimaryColor:"@platformPrimaryColor",property_platformScrollbarColor:"@platformScrollbarColor",property_platformSecondaryColor:"@platformSecondaryColor",property_platformSelectionColor:"@platformSelectionColor",property_platformSelectionTextColor:"@platformSelectionTextColor",property_platformBaseLayerColor:"@platformBaseLayerColor",property_platformMargin:"@platformMargin",property_platformBorderRadius:"@platformBorderRadius",property_platformSelectionBorderRadius:"@platformSelectionBorderRadius",property_platformLogoMaxHeight:"@platformLogoMaxHeight",property_platformNeedsShadow:"@platformNeedsShadow",property_platformSeparatorColor:"@platformSeparatorColor",property_platformTextSelectionColor:"@platformTextSelectionColor",property_person:"@person",property_pointerLeft:"@pointerLeft",property_pointerTop:"@pointerTop",property_posterImage:"@posterImage",property_processHandIn:"@processHandIn",property_processHandInLocation:"@processHandInLocation",property_product:"@product",property_productFolder:"@productFolder",property_productId:"@productId",property_productVideo:"@productVideo",property_progress:"@progress",property_pseudonym:"@pseudonym",property_publications:"@publications",property_publisher:"@publisher",property_publisherName:"@publisherName",property_quizCountItems:"@quizCountItems",property_quizStrikethroughSolutions:"@quizStrikethroughSolutions",property_quotedPerson:"@quotedPerson",property_ratingLevelEnd:"@ratingLevelEnd",property_ratingLevelSelected:"@ratingLevelSelected",property_ratingLevelStart:"@ratingLevelStart",property_reaction:"@reaction",property_reasonableNumOfChars:"@reasonableNumOfChars",property_reductionTag:"@reductionTag",property_refAuthor:"@refAuthor",property_refBookTitle:"@refBookTitle",property_reference:"@reference",property_refPublicationYear:"@refPublicationYear",property_refPublisher:"@refPublisher",property_relatedBook:"@relatedBook",property_releaseDate:"@releaseDate",property_releaseKind:"@releaseKind",property_releaseVersion:"@releaseVersion",property_reportTag:"@reportTag",property_resolved:"@resolved",property_resolvedBy:"@resolvedBy",property_resolvedDate:"@resolvedDate",property_revealSolutions:"@revealSolutions",property_reviewTag:"@reviewTag",property_reviewerTag:"@reviewerTag",property_rightsPolicy:"@rightsPolicy",property_sampleSolution:"@sampleSolution",property_scormSource:"@scormSource",property_search:"@search",property_searchIndex:"@searchIndex",property_selected:"@selected",property_servings:"@servings",property_showInIndex:"@showInIndex",property_showSubtitles:"@showSubtitles",property_siteName:"@siteName",property_size:"@size",property_slug:"@slug",property_sourceBB:"@sourceBB",property_sourceDocument:"@sourceDocument",property_sourceRL:"@sourceRL",property_spaceId:"@spaceId",property_src1x:"@src1x",property_src2x:"@src2x",property_src3x:"@src3x",property_src4x:"@src4x",property_srcAlt:"@srcAlt",property_stripePricingTableId:"@stripePricingTableId",property_stripePricingTableDescriptiveName:"@stripePricingTableDescriptiveName",property_stripePublishableKey:"@stripePublishableKey",property_subject:"@subject",property_subtype:"@subtype",property_tableAutoWidth:"@tableAutoWidth",property_tableColWidth:"@tableColWidth",property_tableColumnMinWidth:"@tableColumnMinWidth",property_tableFixedHeader:"@tableFixedHeader",property_tableHeaderWhitespaceNoWrap:"@tableHeaderWhitespaceNoWrap",property_tableHeight:"@tableHeight",property_tablePagination:"@tablePagination",property_tablePaginationLimit:"@tablePaginationLimit",property_tableResizableColumns:"@tableResizableColumns",property_tableSearch:"@tableSearch",property_tableSort:"@tableSort",property_tableWhitespaceNoWrap:"@tableWhitespaceNoWrap",property_tableCellType:"@tableCellType",property_tableRowSpan:"@tableRowSpan",property_tableColSpan:"@tableColSpan",property_tableScope:"@tableScope",property_tag:"@tag",property_target:"@target",property_technicalTerm:"@technicalTerm",property_textReference:"@textReference",property_theme:"@theme",property_rtl:"@rtl",property_thumbImage:"@thumbImage",property_title:"@title",property_toc:"@toc",property_tocContent:"@tocContent",property_tocResource:"@tocResource",property_topicTag:"@topicTag",property_trim:"@trim",property_unit:"@unit",property_unitAbbr:"@unitAbbr",property_unitAbbrPlural:"@unitAbbrPlural",property_unitPlural:"@unitPlural",property_vendorDashboardId:"@vendorDashboardId",property_vendorSurveyId:"@vendorSurveyId",property_vendorUrl:"@vendorUrl",property_videoCallLink:"@videoCallLink",property_width:"@width",property_x:"@x",property_y:"@y",property_zoomDisabled:"@zoomDisabled"}),ue=de,me=(r(722),r(722),new class{isString(e){return"string"==typeof e||e instanceof String}string(e){return e?`${e}`:""}trimmedString(e){return this.string(e).trim()}countOccurrences(e,t){return e.split(t).length-1}countOccurrencesAtStart(e,t){let r=0;for(;e.startsWith(t);)r++,e=e.substring(t.length);return r}countOccurrencesAtEnd(e,t){let r=0;for(;e.endsWith(t);)r++,e=e.substring(0,e.length-t.length);return r}splitPlaceholders(e,t){let r=[e];const i=(e,t)=>{const r=[];for(const i of e){const e=i.split(t);for(let i=0,o=e.length;i<o;i++){const a=e[i],s=i===o-1;r.push(a),s||r.push(t)}}return r};for(const e of t)r=i(r,e);return r}firstLine(e,t){const r=e;if(null==t&&(t=e.length),t<1||null==e||e.length<=t)return r;const i=e.split("\n");return i.length>0?i[0].substring(0,t):r}wordWrap(e,t){const r=[];if(t<1||null==e||e.length<=t)return r;const i=e.length,o=i-t;let a,s=0;for(;s<o;){let i;const o=s+t,n=e.indexOf("\n",s);if(n>-1&&n>s&&n<o){i=n-s,a=e.substr(s,i),s=s+i+1,r.push(a);continue}const l=e.lastIndexOf(" ",o);let c=0;l>-1&&l!=s-1?(i=l-s,i>0&&(c=s+i+1)):(i=t,c=s+t),a=e.slice(s,s+i),s=c,r.push(a.trim())}return s<i&&(a=e.slice(s),r.push(a)),r}kebabToCamel(e){return e?e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()):e}camelToKebab(e){return e?e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():e}}),he={unknown:"unknown",image:"image",imageResponsive:"image-responsive",imagePortrait:"image-portrait",imageLandscape:"image-landscape",imageEmbed:"image-embed",imageLink:"image-link",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",video:"video",videoEmbed:"video-embed",videoLink:"video-link",stillImageFilm:"still-image-film",stillImageFilmEmbed:"still-image-film-embed",stillImageFilmLink:"still-image-film-link",article:"article",articleEmbed:"article-embed",articleLink:"article-link",document:"document",documentEmbed:"document-embed",documentLink:"document-link",documentDownload:"document-download",appLink:"app-link",websiteLink:"website-link",icon:"icon",backgroundWallpaper:"backgroundWallpaper",imagePlaceholder:"imagePlaceholder",platformIcon:"platformIcon",platformLogo:"platformLogo",platformBackgroundImage:"platformBackgroundImage",previewImage:"previewImage",previewVideo:"previewVideo",coverImage:"coverImage",backgroundImage:"backgroundImage"};function ge(e){return`&${me.kebabToCamel(e)}`}var fe={_unknown:"_unknown",...g,resource_image:"&image",resource_imageResponsive:"&imageResponsive",resource_imagePortrait:"&imagePortrait",resource_imageLandscape:"&imageLandscape",resource_imageEmbed:"&imageEmbed",resource_imageLink:"&imageLink",resource_audio:"&audio",resource_audioEmbed:"&audioEmbed",resource_audioLink:"&audioLink",resource_video:"&video",resource_videoEmbed:"&videoEmbed",resource_videoLink:"&videoLink",resource_stillImageFilm:"&stillImageFilm",resource_stillImageFilmEmbed:"&stillImageFilmEmbed",resource_stillImageFilmLink:"&stillImageFilmLink",resource_article:"&article",resource_articleEmbed:"&articleEmbed",resource_articleLink:"&articleLink",resource_document:"&document",resource_documentEmbed:"&documentEmbed",resource_documentLink:"&documentLink",resource_documentDownload:"&documentDownload",resource_appLink:"&appLink",resource_websiteLink:"&websiteLink",resource_icon:"&icon",resource_platformBackgroundImage:"&platformBackgroundImage",resource_platformIcon:"&platformIcon",resource_platformLogo:"&platformLogo",resource_backgroundWallpaper:"&backgroundWallpaper",resource_imagePlaceholder:"&imagePlaceholder",resource_previewImage:"&previewImage",resource_previewVideo:"&previewVideo",resource_coverImage:"&coverImage",resource_backgroundImage:"&backgroundImage",...de,group_standardAllBits:"group_standardAllBits",group_standardItemLead:"group_standardItemLead",group_standardItemLeadInstructionHint:"group_standardItemLeadInstructionHint",group_standardInstructionHint:"group_standardInstructionHint",group_standardTags:"group_standardTags",group_standardTagsNoItemLead:"group_standardTagsNoItemLead",group_imageSource:"group_imageSource",group_technicalTerm:"group_technicalTerm",group_person:"group_person",group_gap:"group_gap",group_trueFalse:"group_trueFalse",group_trueFalseInlineHighlight:"group_trueFalseInlineHighlight",group_trueFalseInlineSelect:"group_trueFalseInlineSelect",group_trueFalseResponses:"group_trueFalseResponses",group_markConfig:"group_markConfig",group_mark:"group_mark",group_bookCommon:"group_bookCommon",group_learningPathCommon:"group_learningPathCommon",group_advertisingCommon:"group_advertisingCommon",group_platformStylesCommon:"group_platformStylesCommon",group_quizCommon:"group_quizCommon",group_backgroundWallpaper:"group_backgroundWallpaper",group_imageNoZoom:"group_imageNoZoom",group_resourceBitTags:"group_resourceBitTags",group_resourceCommon:"group_resourceCommon",group_resourceImageCommon:"group_resourceImageCommon",group_resourceImageCommonNoZoom:"group_resourceImageCommonNoZoom",group_resourceAudioCommon:"group_resourceAudioCommon",group_resourceVideoCommon:"group_resourceVideoCommon",group_resourceIcon:"group_resourceIcon",group_resourceImage:"group_resourceImage",group_resourceImageNoZoom:"group_resourceImageNoZoom",group_resourceImageEmbed:"group_resourceImageEmbed",group_resourceImageLink:"group_resourceImageLink",group_resourceImageResponsive:"group_resourceImageResponsive",group_resourceImagePortrait:"group_resourceImagePortrait",group_resourceImageLandscape:"group_resourceImageLandscape",group_resourceAudio:"group_resourceAudio",group_resourceAudioEmbed:"group_resourceAudioEmbed",group_resourceAudioLink:"group_resourceAudioLink",group_resourceVideo:"group_resourceVideo",group_resourceVideoEmbed:"group_resourceVideoEmbed",group_resourceVideoLink:"group_resourceVideoLink",group_resourceStillImageFilm:"group_resourceStillImageFilm",group_resourceStillImageFilmEmbed:"group_resourceStillImageFilmEmbed",group_resourceStillImageFilmLink:"group_resourceStillImageFilmLink",group_resourceArticle:"group_resourceArticle",group_resourceArticleEmbed:"group_resourceArticleEmbed",group_resourceArticleLink:"group_resourceArticleLink",group_resourceDocument:"group_resourceDocument",group_resourceDocumentEmbed:"group_resourceDocumentEmbed",group_resourceDocumentLink:"group_resourceDocumentLink",group_resourceDocumentDownload:"group_resourceDocumentDownload",group_resourceAppLink:"group_resourceAppLink",group_resourceWebsiteLink:"group_resourceWebsiteLink",group_previewImages:"group_previewImages",group_previewVideos:"group_previewVideos"};function ye(e){return e?e.startsWith("@")?X:e.startsWith("&")?ee:e.startsWith("group_")?te:Z:Q}function be(e){return e.replace(/^@/,"")}function ke(e){return(0,pe.Enum)(he).fromKey(e.replace(/^&/,""))}var xe=class{constructor(e,t,r,i){l(this,"tags"),l(this,"resourceAttachmentAllowed"),l(this,"resourceAttachmentConfigKey"),l(this,"comboResourceConfigKeysMap"),this.tags=e,this.resourceAttachmentAllowed=t??!1,this.resourceAttachmentConfigKey=r,this.comboResourceConfigKeysMap=i}getCountsMin(){const e=new Map;for(const t of Object.values(this.tags))null!=t.minCount&&e.set(t.configKey,t.minCount);return e}getCountsMax(){const e=new Map;for(const t of Object.values(this.tags))null!=t.maxCount&&e.set(t.configKey,t.maxCount);return e}},ve=new class{isFunction(e){return"[object Function]"===Object.prototype.toString.call(e)}isArray(e){return Array.isArray(e)}isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isValue(e){return!this.isObject(e)&&!this.isArray(e)}getViaPath(e,t){if(!e)return;if(!t)return;Array.isArray(t)||(t=[t]),t=t.flatMap(e=>e.split("."));let r=e;for(const e of t){if(null==r)return;r=r[e]}return r}setViaPath(e,t,r,i){if(!e)return!1;if(!t)return!1;Array.isArray(t)||(t=[t]),t=t.flatMap(e=>e.split("."));let o=e;for(let e=0;e<t.length-1;e++){const r=t[e];if(null==o[r]){if(!i)return!1;o[r]={}}o=o[r]}return o[t[t.length-1]]=r,!0}flatMapPath(e,t){if(!e)return[];if(!t)return[];Array.isArray(t)||(t=[t]);const r=e,i=t.shift();if(null==i)return r;const o=r[i];return o?Array.isArray(o)?o.flatMap(e=>this.flatMapPath(e,t.slice())):[this.flatMapPath(o,t)].flat():[]}orderProperties(e,t){const r=e,i=Object.assign({},r);for(const e of Object.keys(r))delete r[e];for(const e of t)Object.prototype.hasOwnProperty.call(i,e)&&(r[e]=i[e])}removeUndefinedProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||null==i&&delete r[e]}removeFalseProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||!1===i&&delete r[e]}removeEmptyStringProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||""===i&&delete r[e]}removeEmptyArrayProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||Array.isArray(i)&&0===i.length&&delete r[e]}removeEmptyObjectProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||this.isObject(i)&&0===Object.keys(i).length&&delete r[e]}removeUnwantedProperties(e,t){(t=Object.assign({},t)).ignoreAllUndefined||this.removeUndefinedProperties(e,t.ignoreUndefined),t.ignoreAllFalse||this.removeFalseProperties(e,t.ignoreFalse),t.ignoreAllEmptyString||this.removeEmptyStringProperties(e,t.ignoreEmptyString),t.ignoreAllEmptyArrays||this.removeEmptyArrayProperties(e,t.ignoreEmptyArrays),t.ignoreAllEmptyObjects||this.removeEmptyObjectProperties(e,t.ignoreEmptyObjects)}extractSingleValue(e,t){if(!e)return;const r=e;if(null==r[t])return;let i=r[t];if(Array.isArray(i)){if(0===i.length)return;i=i[i.length-1]}return i}deepMerge(...e){return function e(...t){function r(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function i(t,i){for(const[o,a]of Object.entries(i)){const i=r(a);void 0!==t[o]&&r(t[o])===i&&["array","object"].includes(i)?t[o]=e(t[o],a):t[o]=structuredClone(a)}}let o=structuredClone(t.shift());for(const e of t){const t=r(e);r(o)===t?"array"===t?o=[...o,...structuredClone(e)]:"object"===t?i(o,e):o=e:o=structuredClone(e)}return o}(...e)}},Te=r(722),_e={[w]:{jsonKey:"cards",exportJsonKey:{cards:"$"},sides:[{name:"question",variants:[{jsonKey:"question.text",exportJsonKey:[{"@absent":{question:{}}},{question:{text:"$"}}],tags:[{key:fe.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the flashcard."},{key:fe.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"question.icon|resource(type=image, key=image)",exportJsonKey:{question:{icon:{type:"image",image:{src:"$"}}}}},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard question.",format:b,nullable:!0}]}]},{name:"answer",variants:[{jsonKey:"answer.text",exportJsonKey:[{"@absent":{answer:{}}},{answer:{text:"$"}}],tags:[{key:fe.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the flashcard."},{key:fe.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"answer.icon|resource(type=image, key=image)",exportJsonKey:{answer:{icon:{type:"image",image:{src:"$"}}}}},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard answer.",format:b,nullable:!0}]},{jsonKey:"alternativeAnswers[].text",exportJsonKey:{alternativeAnswers:[{text:"$"}]},tags:[{key:fe.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the flashcard."},{key:fe.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"alternativeAnswers[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeAnswers:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:u}]}]},[A]:{jsonKey:"cards",exportJsonKey:{cards:"$"},sections:{default:{jsonKey:"cards",exportJsonKey:{cards:"$"},isDefault:!0,maxCount:1}},sides:[{name:"question",variants:[{jsonKey:"question.text",exportJsonKey:[{"@absent":{question:{}}},{question:{text:"$"}}],tags:[{key:fe.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the flashcard."},{key:fe.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"question.icon|resource(type=image, key=image)",exportJsonKey:{question:{icon:{type:"image",image:{src:"$"}}}}},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard question.",format:b,nullable:!0}]}]},{name:"answer",variants:[{jsonKey:"answer.text",exportJsonKey:[{"@absent":{answer:{}}},{answer:{text:"$"}}],tags:[{key:fe.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the flashcard."},{key:fe.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"answer.icon|resource(type=image, key=image)",exportJsonKey:{answer:{icon:{type:"image",image:{src:"$"}}}}},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard answer.",format:b,nullable:!0}]},{jsonKey:"alternativeAnswers[].text",exportJsonKey:{alternativeAnswers:[{text:"$"}]},tags:[{key:fe.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the flashcard."},{key:fe.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"alternativeAnswers[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeAnswers:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:u}]}]},[B]:{jsonKey:"definitions",exportJsonKey:{definitions:"$"},mappingKeys:{"xml-niso-iec":[{"@el":"def-item","@children":"$"},{"@el":"tbx:langSet","@children":"$"}]},sides:[{name:"term",mappingKeys:{"xml-niso-iec":[{"@el":"term","@text":"$"},{"@el":"tbx:tig","@children":{"@el":"tbx:term","@text":"$\n"}}]},variants:[{jsonKey:"term.text",exportJsonKey:[{"@absent":{term:{}}},{term:{text:"$"}}],tags:[{key:fe.group_standardTags,description:"Standard tags for the definition."},{key:fe.tag_title,description:"Title of the definition.",format:y,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":"title","@text":"$"}}},{key:fe.group_resourceIcon,description:"Icon resource for the definition.",format:y,jsonKey:"term.icon|resource(type=image, key=image)",exportJsonKey:{term:{icon:{type:"image",image:{src:"$"}}}}},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition term.",format:b,nullable:!0}]}]},{name:"definition",mappingKeys:{"xml-niso-iec":[{"@el":"def","@children":"$"},{"@el":"tbx:subjectField","@text":"⟨$⟩ "},{"@el":"tbx:definition","@children":"$"},{"@el":"tbx:example","@children":"BEISPIEL $"},{"@el":"tbx:note","@children":"Anmerkung zu Begriff: $"},{"@el":"tbx:source","@text":"[QUELLE: $]"}]},variants:[{jsonKey:"definition.text",exportJsonKey:[{"@absent":{definition:{}}},{definition:{text:"$"}}],tags:[{key:fe.group_standardTags,description:"Standard tags for the definition."},{key:fe.tag_title,description:"Title of the definition.",format:y,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:fe.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"definition.icon|resource(type=image, key=image)",exportJsonKey:{definition:{icon:{type:"image",image:{src:"$"}}}}},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition.",format:b,nullable:!0}]},{jsonKey:"alternativeDefinitions[].text",exportJsonKey:{alternativeDefinitions:[{text:"$"}]},tags:[{key:fe.group_standardTags,description:"Standard tags for the definition."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the definition."},{key:fe.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"alternativeDefinitions[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeDefinitions:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:u}]}]},[S]:{jsonKey:"definitions",exportJsonKey:{definitions:"$"},sides:[{name:"term",variants:[{jsonKey:"term.text",exportJsonKey:[{"@absent":{term:{}}},{term:{text:"$"}}],format:C.plainText,tags:[{key:fe.group_standardTags,description:"Standard tags for the definition."},{key:fe.tag_title,description:"Title of the definition.",format:y,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:fe.group_resourceIcon,description:"Icon resource for the definition.",format:y,jsonKey:"term.icon|resource(type=image, key=image)",exportJsonKey:{term:{icon:{type:"image",image:{src:"$"}}}}},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition term.",format:b,nullable:!0}]}]},{name:"definition",variants:[{jsonKey:"definition.text",exportJsonKey:[{"@absent":{definition:{}}},{definition:{text:"$"}}],format:C.plainText,tags:[{key:fe.group_standardTags,description:"Standard tags for the definition."},{key:fe.tag_title,description:"Title of the definition.",format:y,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:fe.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"definition.icon|resource(type=image, key=image)",exportJsonKey:{definition:{icon:{type:"image",image:{src:"$"}}}}},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition.",format:b,nullable:!0}]},{jsonKey:"alternativeDefinitions[].text",exportJsonKey:{alternativeDefinitions:[{text:"$"}]},format:C.plainText,tags:[{key:fe.group_standardTags,description:"Standard tags for the definition."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the definition."},{key:fe.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"alternativeDefinitions[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeDefinitions:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:u}]}]},[R]:{jsonKey:"pairs",exportJsonKey:{pairs:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:C.plainText,tags:[{key:fe.group_standardTags,description:"Standard tags for the match pair."},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0}}},{predicates:["@absent",{$cascade:"*"}],rule:{isExample:!0,example:"$cascade","@bit":{isExample:!0}}},{"@absent":{isExample:!0}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker / value on the match pair.",format:b,nullable:!0},{key:fe.tag_title,description:"Title of the match pair.",format:y,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:fe.property_isCaseSensitive,exportJsonKey:[{predicates:["@absent",{"@variantLacksTag":"@isCaseSensitive"}],rule:{isCaseSensitive:"$ancestor"}},{isCaseSensitive:"$"}],description:"Property to indicate if the match is case sensitive.",format:x},{key:fe.resource_audio,description:"Audio resource for the match pair.",jsonKey:"keyAudio",exportJsonKey:{keyAudio:"$"}},{key:fe.resource_image,description:"Image resource for the match pair.",jsonKey:"keyImage",exportJsonKey:{keyImage:"$"}}]}]},{name:"values",repeat:!0,variants:[{jsonKey:"values[]",exportJsonKey:{values:["$"]},format:C.plainText,tags:[{key:fe.group_standardTagsNoItemLead,description:"Standard tags for the match pair (values side, no item/lead)."},{key:fe.property_example,exportJsonKey:[{predicates:["@keyonly"],maxEmits:1,rule:{isExample:!0,example:"$parent","@bit":{isExample:!0}}},{predicates:["@absent",{$cascade:"*"}],rule:{isExample:!0,example:"$cascade","@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent","@bit":{isExample:!0}}},{predicates:[],maxEmits:1,rule:{isExample:!0,example:"$","@bit":{isExample:!0}}}],description:"Example marker / value on the match pair (values side).",format:b,nullable:!0},{key:fe.tag_title,description:"Title of the match pair.",format:y,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:fe.property_isCaseSensitive,exportJsonKey:[{predicates:["@absent",{"@variantLacksTag":"@isCaseSensitive"}],rule:{isCaseSensitive:"$ancestor"}},{isCaseSensitive:"$"}],description:"Property to indicate if the match is case sensitive.",format:x}],repeatCount:u}]}]},[F]:{jsonKey:"pairs",exportJsonKey:{pairs:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:C.plainText,tags:[{key:fe.group_standardTags,description:"Standard tags for the audio match pair."},{key:fe.tag_title,description:"Title of the audio match pair.",format:y,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:fe.resource_audio,description:"Audio resource for the match pair.",jsonKey:"keyAudio",exportJsonKey:{keyAudio:"$"}}]}]},{name:"values",repeat:!0,variants:[{jsonKey:"values[]",exportJsonKey:{values:["$"]},format:C.plainText,tags:[{key:fe.group_standardTagsNoItemLead,description:"Standard tags for the audio match pair (values side, no item/lead)."},{key:fe.tag_title,description:"Title of the audio match pair.",format:y,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:fe.resource_audio,description:"Audio resource for the match pair."}],repeatCount:u}]}]},[K]:{jsonKey:"pairs",exportJsonKey:{pairs:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:C.plainText,tags:[{key:fe.group_standardTags,description:"Standard tags for the image match pair."},{key:fe.tag_title,description:"Title of the image match pair.",format:y,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:fe.resource_image,description:"Image resource for the match pair.",jsonKey:"keyImage",exportJsonKey:{keyImage:"$"}}]}]},{name:"values",repeat:!0,variants:[{jsonKey:"values[]",exportJsonKey:{values:["$"]},format:C.plainText,tags:[{key:fe.group_standardTagsNoItemLead,description:"Standard tags for the image match pair (values side, no item/lead)."},{key:fe.tag_title,description:"Title of the image match pair.",format:y,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:fe.resource_image,description:"Image resource for the match pair."}],repeatCount:u}]}]},[$]:{jsonKey:"matrix",exportJsonKey:{matrix:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:C.plainText,tags:[{key:fe.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{isExample:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}],description:"Example text for the match matrix.",format:y,nullable:!0},{key:fe.tag_title,description:"Title of the match matrix.",format:y,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:fe.property_isCaseSensitive,exportJsonKey:{},description:"Property to indicate if the match is case sensitive.",format:x}]}]},{name:"cell",repeat:!0,variants:[{jsonKey:"cells[{s}].values[]",exportJsonKey:[{predicates:["@absent",{"@variantHasTag":"#"}],rule:{"@bit":{heading:{forValues:[""]}}}},{cells:{$s:{values:["$"]}}}],format:C.plainText,tags:[{key:fe.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:fe.property_example,exportJsonKey:[{"@keyonly":{cells:{$s:{isExample:!0,example:"$parent"}},"@bit":{isExample:!0},"@card":{isExample:!0}}},{predicates:["@absent",{$cascade:"*"}],rule:{cells:{$s:{isExample:!0,example:"$cascade"}},"@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{cells:{$s:{isExample:!0,example:"$parent"}},"@bit":{isExample:!0},"@card":{isExample:!0}}},{cells:{$s:{isExample:!0,example:"$"}},"@bit":{isExample:!0},"@card":{isExample:!0}}],description:"Example text for the match matrix.",format:b,nullable:!0},{key:fe.tag_title,description:"Title of the match matrix.",format:y,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:[{"@keyonly":{"@bit":{heading:{forValues:[""]}}}},{"@bit":{heading:{forValues:["$"]}}}]},{key:fe.property_isCaseSensitive,exportJsonKey:[{"@absent":{cells:{$s:{isCaseSensitive:"$ancestor"}}}},{cells:{$s:{isCaseSensitive:"$"}}}],description:"Property to indicate if the match is case sensitive.",format:x}],repeatCount:u}]}]},[P]:{jsonKey:"statements",exportJsonKey:{statements:"$"},sides:[{name:"statement",variants:[{jsonKey:"statement",exportJsonKey:{statement:"$"},tags:[{key:fe.tag_true,description:"Tag for true statements.",jsonKey:"statement|set(isCorrect=true)",exportJsonKey:{statement:"$",isCorrect:!0},maxCount:1},{key:fe.tag_false,description:"Tag for false statements.",jsonKey:"statement|set(isCorrect=false)",exportJsonKey:{statement:"$",isCorrect:!1},maxCount:1},{key:fe.group_standardTags,description:"Standard tags for the statement."},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker on the statement. Bare `[@example]` emits the boolean marker; valued `[@example:true|false]` emits the literal value. Cascade from bit-header fills `example` with the entry’s own `isCorrect`.",format:x,nullable:!0}],bodyAllowed:!1}]}]},[E]:{jsonKey:"quizzes",exportJsonKey:{quizzes:"$"},sides:[{name:"choices",variants:[{jsonKey:null,tags:[{key:fe.group_trueFalse,description:"Group for true/false questions."},{key:fe.group_standardTags,description:"Standard tags for the quiz."},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0}}},{isExample:!0,"@bit":{isExample:!0}}],description:"Example marker on the quiz choice (entry-local only; cascade handled by group_trueFalse chain-children).",format:x,nullable:!0}],bodyAllowed:!1}]}]},[L]:{jsonKey:"quizzes",exportJsonKey:{quizzes:"$"},sides:[{name:"responses",variants:[{jsonKey:null,tags:[{key:fe.group_trueFalseResponses,description:"Group for true/false questions."},{key:fe.group_standardTags,description:"Standard tags for the quiz."},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0}}},{isExample:!0,"@bit":{isExample:!0}}],description:"Example marker on the quiz response; cascade from bit-header fills `example` with the entry’s own `isCorrect`.",format:x,nullable:!0}],bodyAllowed:!1}]}]},[V]:{jsonKey:"feedbacks",exportJsonKey:{feedbacks:"$"},sides:[{name:"choices",variants:[{jsonKey:null,tags:[{key:fe.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:fe.tag_true,exportJsonKey:{choices:[{choice:"$",requireReason:!0}]},description:"Reason-required choice for feedback (`[+]`).",maxCount:u,format:y,chain:[{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{isExample:!0,example:"$"}],description:"Per-choice example marker for feedback `[+]`.",format:x,maxCount:1,nullable:!0},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint chained onto the feedback choice."}]},{key:fe.tag_false,exportJsonKey:{choices:[{choice:"$",requireReason:!1}]},description:"Reason-not-required choice for feedback (`[-]`).",maxCount:u,format:y,chain:[{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{isExample:!0,example:"$"}],description:"Per-choice example marker for feedback `[-]`.",format:x,maxCount:1,nullable:!0},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint chained onto the feedback choice."}]},{key:fe.group_trueFalse,description:"Group for true/false feedback."},{key:fe.tag_title,description:"Title of the feedback.",format:y,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}}],bodyAllowed:!1}]},{name:"reason",variants:[{jsonKey:"reason.text",exportJsonKey:{reason:{text:"$"}},format:C.plainText,tags:[{key:fe.tag_instruction,exportJsonKey:{reason:{instruction:"$"}},description:"Instruction for the feedback reason.",format:b},{key:fe.property_reasonableNumOfChars,exportJsonKey:[{"@absent":{reason:{reasonableNumOfChars:"$ancestor"}}},{reason:{reasonableNumOfChars:"$"}}],description:"Property for reasonable number of characters.",format:k},{key:fe.property_example,exportJsonKey:[{"@keyonly":{reason:{isExample:!0,example:[{type:"paragraph",content:[{text:"true",type:"text"}]}]},isExample:!0,example:!0,"@bit":{isExample:!0}}},{reason:{isExample:!0,example:"$"},isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example text for the feedback reason (entry-local only; no bit-header cascade).",format:b,nullable:!0},{key:fe.tag_title,description:"Title of the feedback.",format:y,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}}],bodyAllowed:!0}]}]},[N]:{jsonKey:"questions",exportJsonKey:{questions:"$"},sides:[{name:"question",variants:[{jsonKey:"question",exportJsonKey:{question:"$"},tags:[{key:fe.property_reasonableNumOfChars,exportJsonKey:[{"@absent":{reasonableNumOfChars:"$ancestor"}},{reasonableNumOfChars:"$"}],description:"Property for reasonable number of characters.",format:k},{exportJsonKey:{sampleSolution:"$"},key:fe.tag_sampleSolution,description:"Sample solution for the question.",format:y},{key:fe.property_sampleSolution,description:"Property for sample solution text.",format:y},{key:fe.property_additionalSolutions,description:"Property for additional solutions.",format:y,maxCount:u},{key:fe.property_partialAnswer,description:"Property for partial answer text.",format:y},{key:fe.group_standardTags,description:"Standard tags for the question."},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.sampleSolution","@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the question (entry-local only; no bit-header cascade).",format:b,nullable:!0}]}]}]},[I]:{jsonKey:null,sides:[{name:"element",repeat:!0,variants:[{jsonKey:"elements[]",exportJsonKey:{elements:["$"]},tags:[{key:fe.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example text for the element (entry-local only; no bit-header cascade).",format:y,nullable:!0}],repeatCount:u}]}]},[O]:{jsonKey:null,exportJsonKey:null,htmlKey:{"@el":"table","@children":"$"},sections:{"table-header":{jsonKey:"table.columns",exportJsonKey:[{predicates:[{"@cardIndex":0},{"@variantHasTag":"#"}],rule:{"@bit":{table:{columns:"$"}}}},{"@cardIndex=0":{"@bit":{table:{columns:"$"}}}},{"@bit":{table:{data:["$"]}}}],htmlKey:{"@el":"thead","@children":{"@el":"tr","@children":"$"}},sideHtmlKey:{"@el":"th","@children":"$"}},"table-body":{jsonKey:"table.data",exportJsonKey:{"@bit":{table:{data:"$"}}},htmlKey:{"@el":"tbody","@children":{"@el":"tr","@children":"$"}},isDefault:!0},"table-footer":{jsonKey:"table.data",exportJsonKey:{"@bit":{table:{data:"$"}}},htmlKey:{"@el":"tfoot","@children":{"@el":"tr","@children":"$"}}}},sides:[{name:"cell",repeat:!0,htmlKey:{"@el":"td","@children":"$"},variants:[{jsonKey:null,tags:[{key:fe.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:fe.tag_title,jsonKey:"^table.columns[]",exportJsonKey:{"@bit":{table:{columns:["$"]}}},description:"Title of the table."},{key:fe.property_tableCellType,htmlKey:[{"@value=th":{"@el":"th"}},{"@absent":{"@el":"td"}}],description:"Table cell type (th/td).",format:y},{key:fe.property_tableRowSpan,htmlKey:{"@el":{"@attr":{rowspan:"$"}}},description:"Number of rows the cell spans.",format:k},{key:fe.property_tableColSpan,htmlKey:{"@el":{"@attr":{colspan:"$"}}},description:"Number of columns the cell spans.",format:k},{key:fe.property_tableScope,htmlKey:{"@el":{"@attr":{scope:"$"}}},description:"Scope attribute for header cells.",format:y},{key:fe.property_tableColWidth,jsonKey:"^table.columnWidths[{s}]",exportJsonKey:{"@bit":{table:{columnWidths:{$s:"$"}}}},htmlKey:{"@el":{"@attr":{width:"$"}}},description:"Width for the column.",format:k}],repeatCount:u}]}]},[J]:{jsonKey:null,htmlKey:{"@el":"table","@children":"$"},sections:{"table-header":{jsonKey:"table.header.rows",exportJsonKey:[{predicates:[{"@cardIndex":0},{"@variantHasTag":"#"}],rule:{table:{header:{rows:["$"]}}}},{table:{header:{rows:["$"]}}}],htmlKey:{"@el":"thead","@children":{"@el":"tr","@children":"$"}},mappingKeys:{"xml-niso-iec":{"@el":"thead","@children":{"@el":"tr","@children":"$"}}},sideJsonKey:"cells[{s}]|set(title=true)",sideExportJsonKey:{cells:{$s:{title:!0,$:"$"}}},sideHtmlKey:{"@el":"th","@children":"$"}},"table-body":{jsonKey:"table.body.rows",exportJsonKey:{table:{body:{rows:"$"}}},htmlKey:{"@el":"tbody","@children":{"@el":"tr","@children":"$"}},mappingKeys:{"xml-niso-iec":{"@el":"tbody","@children":{"@el":"tr","@children":"$"}}},isDefault:!0},"table-footer":{jsonKey:"table.footer.rows",exportJsonKey:{table:{footer:{rows:"$"}}},htmlKey:{"@el":"tfoot","@children":{"@el":"tr","@children":"$"}},mappingKeys:{"xml-niso-iec":{"@el":"table-wrap-foot","@children":"$"}},sideJsonKey:"cells[{s}]|set(title=true)",sideExportJsonKey:{cells:{$s:{title:!0,$:"$"}}},sideHtmlKey:{"@el":"th","@children":"$"}}},sides:[{name:"cell",repeat:!0,jsonKey:"cells[{s}]",exportJsonKey:{cells:{$s:"$"}},htmlKey:{"@el":"td","@children":"$"},mappingKeys:{"xml-niso-iec":{"@el":"td","@children":"$"}},variants:[{jsonKey:"content",exportJsonKey:{content:"$"},tags:[{key:fe.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:fe.tag_title,jsonKey:"content",exportJsonKey:{content:"$"},description:"Title text of the table cell (header rows).",mappingKeys:{"xml-niso-iec":{"@el":"th","@children":"$"}}},{key:fe.property_tableCellType,jsonKey:"title|bool(th)",exportJsonKey:[{"@value=th":{title:!0}}],htmlKey:[{"@value=th":{"@el":"th"}},{"@absent":{"@el":"td"}}],description:"Table cell type (th/td).",format:y},{key:fe.property_tableRowSpan,jsonKey:"rowspan",exportJsonKey:{rowspan:"$"},htmlKey:{"@el":{"@attr":{rowspan:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":{"@attr":{rowspan:"$"}}}},description:"Number of rows the cell spans.",format:k},{key:fe.property_tableColSpan,jsonKey:"colspan",exportJsonKey:{colspan:"$"},htmlKey:{"@el":{"@attr":{colspan:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":{"@attr":{colspan:"$"}}}},description:"Number of columns the cell spans.",format:k},{key:fe.property_tableScope,jsonKey:"scope",exportJsonKey:{scope:"$"},htmlKey:{"@el":{"@attr":{scope:"$"}}},description:"Scope attribute for header cells.",format:y},{key:fe.property_tableColWidth,jsonKey:"colwidth",exportJsonKey:{colwidth:"$"},htmlKey:{"@el":{"@attr":{width:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":"col","@attr":{width:"$"}}},description:"Width for the column.",format:k}],repeatCount:u}]}]},[D]:{jsonKey:"pronunciationTable.data",exportJsonKey:{pronunciationTable:{data:"$"}},sides:[{name:"cell",repeat:!0,variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:fe.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the pronunciation table."},{key:fe.resource_audio,description:"Audio resource for the pronunciation table.",jsonKey:"audio",exportJsonKey:{audio:{type:"audio",audio:{src:"$"}}}}],repeatCount:u}]}]},[j]:{jsonKey:"responses",exportJsonKey:{responses:"$"},sides:[{name:"response",variants:[{jsonKey:"feedback",exportJsonKey:{feedback:"$"},format:C.plainText,tags:[{key:fe.property_reaction,description:"Reaction to the bot action.",format:y},{key:fe.tag_item,jsonKey:"item",exportJsonKey:{item:"$"},format:y,description:"The item for the bit",chain:[{key:fe.tag_item,jsonKey:"lead",exportJsonKey:{lead:"$"},description:"The lead for the bit",maxCount:1,chain:[{key:fe.tag_item,jsonKey:"pageNumber",exportJsonKey:{pageNumber:"$"},description:"The page number for the bit",maxCount:1,chain:[{key:fe.tag_item,jsonKey:"marginNumber",exportJsonKey:{marginNumber:"$"},description:"The margin number for the bit",maxCount:1}]}]}]},{key:fe.tag_instruction,description:"The response label for the bot action.",jsonKey:"response",exportJsonKey:{response:"$"},format:y},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example text for the bot action response (entry-local only; no bit-header cascade).",format:y,nullable:!0}]}]}]},[z]:{jsonKey:"listItems",exportJsonKey:{listItems:"$"},sides:[{name:"content",variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:fe.group_standardTags,description:"Standard tags for cloze items."},{key:fe.group_gap,description:"Group for gap tags in cloze items."}]}]}]},[q]:{jsonKey:"listItems",exportJsonKey:{listItems:"$"},sides:[{name:"item",variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:fe.group_standardTags,description:"Standard tags for example bits."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the example bit."}]}]}]},[M]:{jsonKey:"sections",exportJsonKey:{sections:"$"},sides:[{name:"item",variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:fe.group_standardTags,description:"Standard tags for page-footer section bits."},{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the page-footer section."}]}]}]},[H]:{jsonKey:"ingredients",exportJsonKey:{ingredients:"$"},sides:[{name:"ingredient",variants:[{jsonKey:"ingredient",exportJsonKey:{ingredient:"$"},tags:[{exportJsonKey:{title:"$"},key:fe.tag_title,description:"Title of the ingredient."},{key:fe.tag_true,description:"Checked state for the ingredient.",jsonKey:"|set(checked=true)",exportJsonKey:{checked:!0,$:"$"},maxCount:1},{key:fe.tag_false,description:"Unchecked state for the ingredient.",jsonKey:"|set(checked=false)",exportJsonKey:{checked:!1,$:"$"},maxCount:1},{key:fe.group_standardItemLead,description:"Item, lead, page number, and margin number for the ingredient."},{key:fe.tag_instruction,description:"The quantity of the ingredient.",jsonKey:"quantity",exportJsonKey:{quantity:"$"},format:k},{exportJsonKey:{hint:"$"},key:fe.tag_hint,description:"The hint for the ingredient."},{key:fe.property_unit,description:"Unit of measurement for the ingredient (singular).",format:y},{key:fe.property_unitPlural,description:"Unit of measurement for the ingredient (plural).",format:y},{key:fe.property_unitAbbr,description:"Abbreviation for the unit of measurement (singular).",format:y},{key:fe.property_unitAbbrPlural,description:"Abbreviation for the unit of measurement (plural).",format:y},{key:fe.property_decimalPlaces,description:"Number of decimal places for the ingredient quantity.",format:k,defaultValue:"1"},{key:fe.property_disableCalculation,description:"Disable calculation for the ingredient.",format:x}]}]}]},[U]:{jsonKey:"bookReferences",exportJsonKey:{bookReferences:"$"},sides:[{name:"reference",variants:[{jsonKey:null,tags:[{key:fe.group_standardTags,description:"Standard tags for book references."},{key:fe.property_refAuthor,description:"Author of the book.",format:y,maxCount:u},{key:fe.property_refBookTitle,description:"Title of the book.",format:y},{key:fe.property_refPublisher,description:"Publisher of the book.",format:y,maxCount:u},{key:fe.property_refPublicationYear,description:"Year of publication of the book.",format:y},{key:fe.property_citationStyle,description:"Citation style for the book reference.",format:y}]}]}]}},Ce={[fe.group_standardAllBits]:{name:"Standard",description:"Standard tags which apply to all bits",type:W,tags:[{key:fe.property_id,description:"The unique identifier(s) for the bit",format:y,maxCount:u},{key:fe.property_gUri,description:"Global URI for the bit",format:y},{key:fe.property_customerId,description:"The customer-specific identifier for the bit",format:y},{key:fe.property_externalId,description:"The external identifier for the bit",format:y,maxCount:u,mappingKeys:{"xml-niso-iec":[{"@el":"std","@children":{"@el":"std-id","@text":"$"}},{"@el":"std-ref","@attr":{type:"dated"},"@text":"$"}]}},{key:fe.property_sourceRL,description:"The original location of the information in the original source material",format:y},{key:fe.property_copyright,description:"The copyright information for the bit",format:y},{key:fe.property_license,description:"The license for the bit",format:y},{key:fe.property_rightsPolicy,description:"The rights policy or policies for the bit",format:y,maxCount:u},{key:fe.property_isTemplate,description:"If true, the bit is a template",format:x,defaultValue:"false"},{key:fe.property_isTemplateStripTheme,description:"If true, the bit is a template strip theme",format:x,defaultValue:"false"},{key:fe.property_needsValidation,description:"If true, the bit needs validation",format:x,defaultValue:"false"},{key:fe.property_validationDate,description:"The date when the bit was validated",format:y},{key:fe.property_aiGenerated,description:"If true, the bit is AI-generated",format:x,nullable:!0},{key:fe.property_machineTranslated,description:"If true, the bit is machine-translated",format:y},{key:fe.property_translationOf,description:"Translation source reference",format:y},{key:fe.property_isCollapsible,description:"If true, the bit is collapsible",format:x},{key:fe.property_spansPageBreak,description:"If true, the bit spans a page break",format:x,nullable:!0},{key:fe.property_searchIndex,description:"The search index(es) for the bit",format:y,maxCount:u},{key:fe.property_analyticsTag,description:"The analytics tag(s) for the bit",format:y,maxCount:u},{key:fe.property_categoryTag,description:"The category tag(s) for the bit",format:y,maxCount:u},{key:fe.property_topicTag,description:"The topic tag(s) for the bit",format:y,maxCount:u},{key:fe.property_reportTag,description:"The report tag(s) for the bit",format:y,maxCount:u},{key:fe.property_altLangTag,description:"The alternative language tag for the bit",format:y},{key:fe.property_feedbackEngine,description:"The feedback engine for the bit",format:y},{key:fe.property_feedbackType,description:"The feedback type for the bit",format:y},{key:fe.property_disableFeedback,description:"If true, feedback is disabled for the bit",format:x},{key:fe.property_diffTo,description:"The diff to version for the bit",format:y},{key:fe.property_diffOp,description:"The diff operation for the bit",format:y},{key:fe.property_diffRef,description:"The diff reference for the bit",format:y},{key:fe.property_diffContext,description:"The diff context for the bit",format:y},{key:fe.property_diffTime,description:"The diff time for the bit",format:k,nullable:!0},{key:fe.property_ageRange,description:"The age range for the bit",format:y,maxCount:u},{key:fe.property_lang,description:"The language for the bit",format:y,mappingKeys:{"xml-niso-iec":{"@el":"tbx:termEntry","@children":{"@el":"tbx:langSet","@attr":{"xml:lang":"$"}}}}},{key:fe.property_publisher,description:"The publisher(s) of the bit",format:y,maxCount:u},{key:fe.property_publisherName,description:"The name of the publisher of the bit",format:y},{key:fe.property_theme,description:"The theme(s) for the bit",format:y,nullable:!0,maxCount:u},{key:fe.property_rtl,description:"If true, the book is right-to-left",format:x,defaultValue:"false"},{key:fe.property_target,description:"The target(s) for the bit",format:y,maxCount:u},{key:fe.property_tag,description:"The tag(s) for the bit",format:y,nullable:!0,maxCount:u},{key:fe.property_groupTag,jsonKey:"groupTag.name",exportJsonKey:{groupTag:[{"@id":"name",name:"$"}]},description:"The group tag(s) for the bit",format:y,maxCount:u,chain:[{key:fe.property_tag,exportJsonKey:{tags:["$"]},description:"The tag(s) for the group",format:y,nullable:!0,maxCount:u}]},{key:fe.property_reviewTag,description:"The review tag(s) for the bit",format:y,maxCount:u},{key:fe.property_reviewerTag,description:"The reviewer tag(s) for the bit",format:y,maxCount:u},{key:fe.property_reductionTag,description:"The reduction tag(s) for the bit",format:y,maxCount:u},{key:fe.property_bubbleTag,description:"The bubble tag(s) for the bit",format:y,maxCount:u},{key:fe.property_extractorTag,description:"The extractor tag(s) for the bit",format:y,maxCount:u},{key:fe.property_extractorInternal,description:"Internal metadata used by the extractor for processing purposes",format:y,maxCount:u},{key:fe.property_sourceBB,description:"The source bounding box(es) for the bit (x, y, x1, y1)",format:_,maxCount:u},{key:fe.property_bitFingerprint,description:"Fingerprint(s) used by the AI extractor to identify the bit (font, style, color, pixels, etc.)",format:y,maxCount:u},{key:fe.property_levelCEFRp,description:"The CEFRp level for the bit",format:y},{key:fe.property_levelCEFR,description:"The CEFR level for the bit",format:y},{key:fe.property_levelILR,description:"The ILR level for the bit",format:y},{key:fe.property_levelACTFL,description:"The ACTFL level for the bit",format:y},{key:fe.property_icon,description:"The icon for the bit",format:y},{key:fe.property_iconTag,description:"The icon tag for the bit",format:y},{key:fe.property_colorTag,description:"The color tag(s) for the bit",format:y,maxCount:u},{exportJsonKey:{anchor:"$"},key:fe.tag_anchor,name:"Anchor",format:y,description:"The anchor for the bit"},{key:fe.property_search,description:"The search text for the bit",format:y},{key:fe.property_showInIndex,description:"If true, the bit is shown in the index",format:x,defaultValue:"false"},{key:fe.property_layer,description:"The layer(s) for the bit",format:y,maxCount:u},{key:fe.property_layerRole,description:"The layer role(s) for the bit",format:y,maxCount:u},{key:fe.property_internalComment,description:"Internal comment for the bit.",format:y,maxCount:u,exportJsonKey:{}}]},[fe.group_standardItemLead]:{type:W,description:"Standard group for item, lead, page number, and margin number tags",tags:[{key:fe.tag_item,jsonKey:"item",exportJsonKey:{item:"$"},mappingKeys:{"xml-niso-iec":{"@el":"label","@text":"$"}},description:"The item for the bit",chain:[{key:fe.tag_item,jsonKey:"lead",exportJsonKey:{lead:"$"},description:"The lead for the bit",maxCount:1,chain:[{key:fe.tag_item,jsonKey:"pageNumber",exportJsonKey:{pageNumber:"$"},description:"The page number for the bit",maxCount:1,chain:[{key:fe.tag_item,jsonKey:"marginNumber",exportJsonKey:{marginNumber:"$"},description:"The margin number for the bit",maxCount:1}]}]}]}]},[fe.group_standardItemLeadInstructionHint]:{type:W,description:"Standard group for item, lead, page number, margin number, instruction and hint tags",tags:[{key:fe.group_standardItemLead,description:"Item, lead, page number, and margin number tags"},{exportJsonKey:{instruction:"$"},key:fe.tag_instruction,name:"Instruction",description:"The instruction for the bit"},{exportJsonKey:{hint:"$"},key:fe.tag_hint,name:"Hint",description:"The hint for the bit"}]},[fe.group_standardInstructionHint]:{type:W,description:"Standard group for instruction and hint tags only (no item/lead/pageNumber/marginNumber chain). Used by sides where item/lead are owned by another side (e.g. matchPairs value-side, which BPG strips item/lead from at sideIdx > 0).",tags:[{exportJsonKey:{instruction:"$"},key:fe.tag_instruction,name:"Instruction",description:"The instruction for the bit"},{exportJsonKey:{hint:"$"},key:fe.tag_hint,name:"Hint",description:"The hint for the bit"}]},[fe.group_standardTags]:{type:W,description:"Standard tags which apply to MOST (but not all) bits",tags:[{key:fe.group_standardAllBits,description:"All standard tags which apply to all bits"},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{}},{"@absent":{isExample:!0}},{example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}]},[fe.group_standardTagsNoItemLead]:{type:W,description:"Standard tags mirror of group_standardTags but excluding the item/lead/pageNumber/marginNumber chain. Used by sides where item/lead are owned by another side (e.g. matchPairs value-side — BPG `parseMatchPairs` strips tags.item / tags.lead for sideIdx > 0).",tags:[{key:fe.group_standardAllBits,description:"All standard tags which apply to all bits"},{key:fe.group_standardInstructionHint,description:"Instruction and hint tags only (no item/lead chain)."},{key:fe.property_example,exportJsonKey:[{"@keyonly":{}},{"@absent":{isExample:!0}},{example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}]},[fe.group_imageSource]:{type:W,description:"Image source chain",tags:[{key:fe.property_imageSource,jsonKey:"imageSource.url",exportJsonKey:{imageSource:{url:"$"}},description:"The source of an image",format:y,chain:[{key:fe.property_mockupId,description:"The mockup ID for the image",format:y},{key:fe.property_size,description:"The size of the image",format:k,nullable:!0},{key:fe.property_format,description:"The format of the image",format:y},{key:fe.property_trim,description:"If true, the image is trimmed",format:x}]}]},[fe.group_technicalTerm]:{type:W,description:"Technical term chain",tags:[{key:fe.property_technicalTerm,jsonKey:"technicalTerm.technicalTerm",exportJsonKey:{technicalTerm:{technicalTerm:"$"}},description:"The technical term",format:y,chain:[{key:fe.property_lang,description:"The language of the technical term",format:y}]}]},[fe.group_person]:{type:W,description:"Person chain",tags:[{key:fe.property_person,jsonKey:"person.name",exportJsonKey:{person:{name:"$"}},description:"A person",format:y,chain:[{key:fe.property_title,description:"The person's title",format:y},{key:fe.group_resourceImage,jsonKey:"avatarImage|resource(type=image, key=image)",exportJsonKey:{avatarImage:{type:"image",image:{src:"$"}}},description:"The image of the person"}]},{key:fe.property_partner,jsonKey:"person.name",exportJsonKey:{person:{name:"$"}},description:"A partner",format:y,chain:[{key:fe.property_title,description:"The partner's title",format:y},{key:fe.group_resourceImage,jsonKey:"avatarImage|resource(type=image, key=image)",exportJsonKey:{avatarImage:{type:"image",image:{src:"$"}}},description:"The image of the partner"}]}]},[fe.group_gap]:{type:W,description:"Gap chain",tags:[{exportJsonKey:{"@body-inline":{type:"gap",attrs:{solutions:["$"]}}},key:fe.tag_gap,description:"The value of a gap in the content",maxCount:u,format:y,chain:[{key:fe.tag_gap,jsonKey:"solutions[]",exportJsonKey:{solutions:["$"]},description:"Alternative values for the gaps in the content",maxCount:u,format:y},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:fe.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.solutions[-1]","@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.solutions[-1]","@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"An example for the gap",format:b,nullable:!0},{key:fe.property_isCaseSensitive,jsonKey:"isCaseSensitive",exportJsonKey:[{"@absent":{isCaseSensitive:"$ancestor"}},{isCaseSensitive:"$"}],description:"If true, the gap text is case sensitive",format:x,defaultValue:"true"}]}]},[fe.group_trueFalse]:{type:W,description:"True/False chain",tags:[{exportJsonKey:{choices:[{choice:"$",isCorrect:!0}]},key:fe.tag_true,description:"True value for a true/false statement/question",maxCount:u,format:y,chain:[{key:fe.tag_true,jsonKey:"choices[]|set(isCorrect=true)",exportJsonKey:{choices:[{choice:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:u,format:y},{key:fe.tag_false,jsonKey:"choices[]|set(isCorrect=false)",exportJsonKey:{choices:[{choice:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:u,format:y},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:fe.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question",format:x,nullable:!0}]},{exportJsonKey:{choices:[{choice:"$",isCorrect:!1}]},key:fe.tag_false,description:"False value for a true/false statement/question",maxCount:u,format:y,chain:[{key:fe.tag_true,jsonKey:"choices[]|set(isCorrect=true)",exportJsonKey:{choices:[{choice:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:u,format:y},{key:fe.tag_false,jsonKey:"choices[]|set(isCorrect=false)",exportJsonKey:{choices:[{choice:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:u,format:y},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:fe.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question (incorrect entry — no cascade decoration: an ancestor bare example leaves incorrect choices untouched, bpg 5.31)",format:x,nullable:!0}]}]},[fe.group_trueFalseResponses]:{type:W,description:"True/False Responses chain",tags:[{exportJsonKey:{responses:[{response:"$",isCorrect:!0}]},key:fe.tag_true,description:"True value for a true/false statement/question",maxCount:u,format:y,chain:[{key:fe.tag_true,jsonKey:"responses[]|set(isCorrect=true)",exportJsonKey:{responses:[{response:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:u,format:y},{key:fe.tag_false,jsonKey:"responses[]|set(isCorrect=false)",exportJsonKey:{responses:[{response:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:u,format:y},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:fe.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{isExample:"$parent.isCorrect",example:"$parent.isCorrect","@bit":{isExample:"$parent.isCorrect"},"@card":{isExample:"$parent.isCorrect"}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question",format:x,nullable:!0}]},{exportJsonKey:{responses:[{response:"$",isCorrect:!1}]},key:fe.tag_false,description:"False value for a true/false statement/question",maxCount:u,format:y,chain:[{key:fe.tag_true,jsonKey:"responses[]|set(isCorrect=true)",exportJsonKey:{responses:[{response:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:u,format:y},{key:fe.tag_false,jsonKey:"responses[]|set(isCorrect=false)",exportJsonKey:{responses:[{response:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:u,format:y},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:fe.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question",format:x,nullable:!0}]}]},[fe.group_trueFalseInlineSelect]:{type:W,description:"True/False chain composed inline (select body-bit). +/- tags are consume-only at bit level.",tags:[{exportJsonKey:{"@body-inline":{type:"select",attrs:{options:[{text:"$",isCorrect:!0}]}}},key:fe.tag_true,description:"True value for an inline select body bit",maxCount:u,format:y,chain:[{key:fe.tag_true,exportJsonKey:{},description:"True values for an inline select body bit",maxCount:u,format:y},{key:fe.tag_false,exportJsonKey:{},description:"False values for an inline select body bit",maxCount:u,format:y},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:fe.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the inline select option (first correct only)",format:x,nullable:!0}]},{exportJsonKey:{"@body-inline":{type:"select",attrs:{options:[{text:"$",isCorrect:!1}]}}},key:fe.tag_false,description:"False value for an inline select body bit",maxCount:u,format:y,chain:[{key:fe.tag_true,exportJsonKey:{},description:"True values for an inline select body bit",maxCount:u,format:y},{key:fe.tag_false,exportJsonKey:{},description:"False values for an inline select body bit",maxCount:u,format:y},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:fe.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the inline select option (first correct only)",format:x,nullable:!0}]}]},[fe.group_trueFalseInlineHighlight]:{type:W,description:'True/False chain composed inline (highlight body-bit). +/- tags emit `{type:"highlight", attrs:{texts:[{text,isCorrect?}]}}` inline body nodes. Used by highlight-text bit.',tags:[{exportJsonKey:{"@body-inline":{type:"highlight",attrs:{texts:[{text:"$",isCorrect:!0}]}}},key:fe.tag_true,description:"Highlighted span in the body (correct)",maxCount:u,format:y,chain:[{key:fe.tag_true,exportJsonKey:{},description:"Highlighted span values (correct)",maxCount:u,format:y},{key:fe.tag_false,exportJsonKey:{},description:"Highlighted span values (incorrect)",maxCount:u,format:y},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:fe.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the highlighted span (first correct only)",format:x,nullable:!0}]},{exportJsonKey:{"@body-inline":{type:"highlight",attrs:{texts:[{text:"$",isCorrect:!1}]}}},key:fe.tag_false,description:"Highlighted span in the body (incorrect)",maxCount:u,format:y,chain:[{key:fe.tag_true,exportJsonKey:{},description:"Highlighted span values (correct)",maxCount:u,format:y},{key:fe.tag_false,exportJsonKey:{},description:"Highlighted span values (incorrect)",maxCount:u,format:y},{key:fe.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:fe.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the highlighted span (first correct only)",format:x,nullable:!0}]}]},[fe.group_markConfig]:{type:W,description:"Mark configuration chain",tags:[{key:fe.property_mark,jsonKey:"marks.mark",exportJsonKey:{marks:[{mark:"$",emphasis:"underline"}]},description:"The mark configuration",format:y,maxCount:u,chain:[{key:fe.property_color,description:"The color of the mark",format:y},{key:fe.property_emphasis,description:"The emphasis of the mark",format:y}]}]},[fe.group_mark]:{type:W,description:"Mark chain",tags:[{exportJsonKey:{"@body-inline":{type:"mark",attrs:{solution:"$"}}},key:fe.tag_mark,description:"The marked content",maxCount:u,format:y,chain:[{key:fe.property_mark,jsonKey:"mark",exportJsonKey:{mark:"$"},description:"The mark configuration",format:y},{key:fe.property_example,jsonKey:"example",exportJsonKey:{isExample:!0,example:!0,"@bit":{isExample:!0}},description:"An example for the marked content",format:x,nullable:!0}]}]},[fe.group_bookCommon]:{type:W,description:"Common book tags",tags:[{key:fe.property_language,description:"The language of the book",format:y,maxCount:u,mappingKeys:{"xml-niso-iec":[{predicates:[],maxEmits:1,rule:{"@el":"content-language","@text":"$"}}]}},{key:fe.property_displayName,description:"The display name of the book",format:y},{key:fe.property_customerExternalId,description:"The customer-specific external identifier for the book",format:y},{key:fe.property_spaceId,description:"The space ID for the book",format:y,maxCount:u},{key:fe.property_kind,description:"The kind of the book",format:y},{key:fe.property_hasMarkAsDone,description:'If true, the book has a "Mark as done" feature',format:x,defaultValue:"false"},{key:fe.property_processHandIn,description:"If true, the book will be processed when upon hand-in",format:x,defaultValue:"false"},{key:fe.property_processHandInLocation,description:"The location where the book was handed-in",format:y},{key:fe.property_isPublic,description:"If true, the book is public",format:x,defaultValue:"false"},{key:fe.property_isTemplate,description:"If true, the book is a template",format:x,defaultValue:"false"},{key:fe.property_isTemplateStripTheme,description:"If true, the book is a template strip theme",format:x,defaultValue:"false"},{key:fe.property_isEditable,description:"If true, the book is editable",format:x,defaultValue:"false"},{key:fe.property_chatWithBook,description:"If true, the user can chat about the book with an AI assistant",format:x,defaultValue:"false"},{key:fe.property_chatWithBookBrainKey,description:"The BookBrain key for the book chat",format:y},{key:fe.tag_title,name:"Title",description:"The title of the book",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],mappingKeys:{"xml-niso-iec":[{predicates:[],maxEmits:1,rule:{"@el":"title-wrap","@children":{"@el":"full","@text":"$"}}}]}},{key:fe.property_subtype,description:"The subtype of the book",format:y},{key:fe.property_coverImage,description:"The cover image(s) of the book",format:y,nullable:!0,maxCount:u},{key:fe.resource_coverImage,jsonKey:"coverImage|resource(type=image, key=image)",exportJsonKey:{coverImage:{type:"image",image:{src:"$"}}},description:"The cover image of the book",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the cover image resource"}]},{key:fe.property_backgroundImage,description:"The background image(s) of the book",format:y,maxCount:u},{key:fe.resource_backgroundImage,jsonKey:"backgroundImage|resource(type=image, key=image)",exportJsonKey:{backgroundImage:{type:"image",image:{src:"$"}}},description:"The background image of the book",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the background image resource"}]},{key:fe.property_coverColor,description:"The cover color of the book",format:y},{key:fe.property_subject,description:"The subject(s) of the book",format:y,maxCount:u},{key:fe.property_author,description:"The author(s) of the book",format:y,maxCount:u},{key:fe.property_publications,description:"The publication(s) of the book",format:y,maxCount:u},{key:fe.property_relatedBook,description:"Books related to this book",format:y,maxCount:u},{key:fe.property_translationOfBook,description:"External Id of the translated book",format:y},{key:fe.property_userFeedbackTranslationUrl,description:"URL to an external feedback form for book translation feedback",format:y},{key:fe.property_userFeedbackContentUrl,description:"URL to an external feedback form for book content feedback",format:y},{key:fe.property_duration,description:"The duration of the book",format:y},{key:fe.property_maxTocChapterLevel,description:"The maximum table of contents chapter level",format:k,defaultValue:"-1"},{key:fe.property_sourceDocument,description:"Url of the source document for the book (for example, a PDF file)",format:y},{key:fe.property_internalPrintPdf,description:"Url of the internal print PDF for the book",format:y},{key:fe.property_allowPrint,description:"If true, the book allows printing",format:T,values:["enforceFalse","enforceTrue","useSpaceConfiguration"],defaultValue:"useSpaceConfiguration"},{key:fe.property_hasPrintRestriction,description:"If true, the book has print restrictions",format:x,defaultValue:"true"},{key:fe.property_enforceUpdateOverUserInput,description:"If true, prioritize new content over legacy content from the instance API",format:x,defaultValue:"false"},{key:fe.property_extractorExtractionTimestamp,description:"Extraction timestamps for book conversion",format:y,maxCount:u}]},[fe.group_learningPathCommon]:{type:W,description:"Common learning path tags",tags:[{key:fe.property_action,description:"The action for the learning path",format:y},{key:fe.property_duration,description:"The duration of the learning path",format:y},{key:fe.property_date,description:"The date of the learning path",format:y},{key:fe.property_dateEnd,description:"The end date of the learning path",format:y},{key:fe.property_location,description:"The location of the learning path",format:y},{key:fe.property_list,description:"The list of items in the learning path",format:y,maxCount:u},{key:fe.property_textReference,description:"The text reference for the learning path",format:y},{key:fe.property_isTracked,description:"If true, the learning path is tracked",format:x,defaultValue:"true"},{key:fe.property_isInfoOnly,description:"If true, the learning path is info only",format:x,defaultValue:"false"},{key:fe.property_deeplink,description:"The deeplink(s) for the learning path",format:y,maxCount:u},{key:fe.property_buttonCaption,description:"The caption for the button of the learning path",format:y},{key:fe.property_book,description:"The book(s) associated with the learning path",format:y,chain:[{exportJsonKey:{reference:"$"},key:fe.tag_reference,format:y,description:"The reference for the book(s) in the learning path",maxCount:1,chain:[{key:fe.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:y,description:"The referenceEnd for the book(s) in the learning path",maxCount:1}]}]}]},[fe.group_advertisingCommon]:{type:W,description:"Common advertising tags",tags:[{key:fe.property_advertisingClickUrl,description:"The URL to which the advertisement should link",format:y}]},[fe.group_platformStylesCommon]:{type:W,description:"Common platform styles",tags:[{key:fe.property_platformPrimaryColor,description:"The platform system primary color",format:y},{key:fe.property_platformSecondaryColor,description:"The platform section secondary color",format:y},{key:fe.property_platformBackgroundColor,description:"The platform system background color",format:y},{key:fe.property_platformButtonPrimaryColor,description:"The platform section header button primary color",format:y},{key:fe.property_platformButtonBackgroundColor,description:"The platform section header button background color",format:y},{key:fe.property_platformScrollbarColor,description:"The platform main scrollbar color",format:y},{key:fe.property_platformSelectionColor,description:"The platform main selection color",format:y},{key:fe.property_platformTextSelectionColor,description:"The platform main input text selection color",format:y},{key:fe.property_platformSeparatorColor,description:"The platform main separator color",format:y},{key:fe.property_platformPlaceholderColor,description:"The platform main input placeholder color",format:y},{key:fe.property_platformMessageBackgroundColor,description:"The platform section chat message background color",format:y},{key:fe.property_platformBorderColor,description:"The platform border color",format:y},{key:fe.property_platformSelectionTextColor,description:"The platform selection text color",format:y},{key:fe.property_platformBaseLayerColor,description:"The platform base layer color",format:y},{key:fe.property_platformMargin,description:"The platform margin",format:k,nullable:!0},{key:fe.property_platformBorderRadius,description:"The platform border radius",format:k,nullable:!0},{key:fe.property_platformSelectionBorderRadius,description:"The platform selection border radius",format:k,nullable:!0},{key:fe.property_platformNeedsShadow,description:"If true, the platform needs shadow",format:x,nullable:!0}]},[fe.group_quizCommon]:{type:W,description:"Common quiz tags",tags:[{key:fe.property_revealSolutions,description:"If true, the quiz solutions are revealed",format:x,nullable:!0},{key:fe.property_additionalSolutions,description:"Additional solutions",format:y,maxCount:u}]},[fe.group_backgroundWallpaper]:{type:W,description:"Background wallpaper tags",tags:[{key:fe.resource_backgroundWallpaper,exportJsonKey:{backgroundWallpaper:{type:"image",image:{src:"$"}}},description:"Background wallpaper for the image, used to set a background for the image",chain:[{key:fe.group_resourceImageCommon,description:"Common resource image tags for images"}]}]},[fe.group_imageNoZoom]:{type:W,description:"Image bit tags",tags:[{key:fe.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:fe.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:fe.group_resourceImageNoZoom,description:"Resource image tags for images, used to attach images to the bit",minCount:1}]},[fe.group_resourceBitTags]:{type:W,description:"Resource bit tags",tags:[{key:fe.resource_imagePlaceholder,jsonKey:"imagePlaceholder|resource(type=image, key=image)",exportJsonKey:{imagePlaceholder:{type:"image",image:{src:"$"}}},description:"Placeholder image for the resource",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the placeholder image"}],maxCount:1}]},[fe.group_resourceCommon]:{type:W,description:"Common resource properties",tags:[{key:fe.property_license,description:"The license for the resource",format:y},{key:fe.property_copyright,description:"The copyright information for the resource",format:y},{key:fe.property_caption,description:"The caption for the resource",format:b,mappingKeys:{"xml-niso-iec":{"@el":"caption","@children":{"@el":"title","@text":"$"}}}},{key:fe.property_showInIndex,description:"If true, the resource is shown in the index",format:x,defaultValue:"false"},{key:fe.property_search,description:"The search text for the resource",format:y},{key:fe.property_selected,description:"If true, the resource is selected",format:x,defaultValue:"false"},{key:fe.property_srcAlt,description:"An alternative source for the resource",format:y,maxCount:u}]},[fe.group_resourceImageCommon]:{type:W,description:"Common properties for image resources",tags:[{key:fe.group_resourceCommon,description:"Common resource properties"},{key:fe.property_src1x,description:"The source URL for the image at 1x resolution",format:y},{key:fe.property_src2x,description:"The source URL for the image at 2x resolution",format:y},{key:fe.property_src3x,description:"The source URL for the image at 3x resolution",format:y},{key:fe.property_src4x,description:"The source URL for the image at 4x resolution",format:y},{key:fe.property_width,description:"The width of the image",format:k,nullable:!0},{key:fe.property_height,description:"The height of the image",format:k,nullable:!0},{key:fe.property_alt,description:"The alternative text for the image",format:y},{key:fe.property_zoomDisabled,description:"If true, zooming is disabled for the image",format:x}]},[fe.group_resourceImageCommonNoZoom]:{type:W,description:"Common properties for image resources where @zoomDisabled defaults to true",tags:[{key:fe.group_resourceCommon,description:"Common resource properties"},{key:fe.property_src1x,description:"The source URL for the image at 1x resolution",format:y},{key:fe.property_src2x,description:"The source URL for the image at 2x resolution",format:y},{key:fe.property_src3x,description:"The source URL for the image at 3x resolution",format:y},{key:fe.property_src4x,description:"The source URL for the image at 4x resolution",format:y},{key:fe.property_width,description:"The width of the image",format:k,nullable:!0},{key:fe.property_height,description:"The height of the image",format:k,nullable:!0},{key:fe.property_alt,description:"The alternative text for the image",format:y},{key:fe.property_zoomDisabled,description:"If true, zooming is disabled for the image (defaults to true)",format:x,defaultValue:"true"}]},[fe.group_resourceAudioCommon]:{type:W,description:"Common properties for audio resources",tags:[{key:fe.group_resourceCommon,description:"Common resource properties"},{key:fe.property_duration,description:"The duration of the audio resource",format:y},{key:fe.property_mute,description:"If true, the audio is muted",format:x},{key:fe.property_autoplay,description:"If true, the audio plays automatically",format:x}]},[fe.group_resourceVideoCommon]:{type:W,description:"Common properties for video resources",tags:[{key:fe.group_resourceCommon,description:"Common resource properties"},{key:fe.property_width,description:"The width of the video",format:k,nullable:!0},{key:fe.property_height,description:"The height of the video",format:k,nullable:!0},{key:fe.property_duration,description:"The duration of the video",format:y},{key:fe.property_mute,description:"If true, the video is muted",format:x},{key:fe.property_autoplay,description:"If true, the video plays automatically",format:x},{key:fe.property_allowSubtitles,description:"If true, subtitles are allowed for the video",format:x},{key:fe.property_showSubtitles,description:"If true, subtitles are shown in the video",format:x},{key:fe.property_alt,description:"The alternative text for the video",format:y},{key:fe.property_posterImage,jsonKey:"posterImage.src",exportJsonKey:{posterImage:{src:"$"}},description:"The poster image for the video",format:y,chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the poster image"}]},{key:fe.property_src1x,description:"The source URL for the video at 1x resolution",format:y,exportJsonKey:{thumbnails:[{src:"$"}]}},{key:fe.property_src2x,description:"The source URL for the video at 2x resolution",format:y,exportJsonKey:{thumbnails:[{src:"$"}]}},{key:fe.property_src3x,description:"The source URL for the video at 3x resolution",format:y,exportJsonKey:{thumbnails:[{src:"$"}]}},{key:fe.property_src4x,description:"The source URL for the video at 4x resolution",format:y,exportJsonKey:{thumbnails:[{src:"$"}]}}]},[fe.group_resourceIcon]:{type:W,description:"Common properties for icon resources",tags:[{key:fe.resource_icon,exportJsonKey:{resource:{type:"icon",icon:{src:"$"}}},description:"The icon resource",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the icon resource"}]}]},[fe.group_resourceImage]:{type:G,description:"Common properties for image resources",tags:[{key:fe.resource_image,exportJsonKey:{resource:{type:"image",image:{src:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":"graphic","@attr":{"xlink:href":"$"}}},description:"The image resource",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the image resource"}]}]},[fe.group_resourceImageNoZoom]:{type:G,description:"Image resource where @zoomDisabled defaults to true",tags:[{key:fe.resource_image,exportJsonKey:{resource:{type:"image",image:{src:"$"}}},description:"The image resource (no-zoom default)",chain:[{key:fe.group_resourceImageCommonNoZoom,description:"Common image properties with @zoomDisabled defaulting to true"}]}]},[fe.group_resourceImagePortrait]:{type:G,description:"Portrait image resource",tags:[{key:fe.resource_imagePortrait,exportJsonKey:{resource:{type:"image-portrait",imagePortrait:{src:"$"}}},description:"The portrait image resource",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the portrait image resource"}]}]},[fe.group_resourceImageLandscape]:{type:G,description:"Landscape image resource",tags:[{key:fe.resource_imageLandscape,exportJsonKey:{resource:{type:"image-landscape",imageLandscape:{src:"$"}}},description:"The landscape image resource",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the landscape image resource"}]}]},[fe.group_resourceImageEmbed]:{type:G,description:"Embedded image resource",tags:[{key:fe.resource_imageEmbed,exportJsonKey:{resource:{type:"image-embed",imageEmbed:{src:"$"}}},description:"The embedded image resource",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the embedded image resource"}]}]},[fe.group_resourceImageLink]:{type:G,description:"Link to an image resource",tags:[{key:fe.resource_imageLink,exportJsonKey:{resource:{type:"image-link",imageLink:{url:"$"}}},description:"The link to the image resource",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the linked image resource"}]}]},[fe.group_resourceAudio]:{type:G,description:"Audio resource",tags:[{key:fe.resource_audio,exportJsonKey:{resource:{type:"audio",audio:{src:"$"}}},description:"The audio resource",chain:[{key:fe.group_resourceAudioCommon,description:"Common audio properties for the audio resource"}]}]},[fe.group_resourceAudioEmbed]:{type:G,description:"Embedded audio resource",tags:[{key:fe.resource_audioEmbed,exportJsonKey:{resource:{type:"audio-embed",audioEmbed:{src:"$"}}},description:"The embedded audio resource",chain:[{key:fe.group_resourceAudioCommon,description:"Common audio properties for the embedded audio resource"}]}]},[fe.group_resourceAudioLink]:{type:G,description:"Link to an audio resource",tags:[{key:fe.resource_audioLink,exportJsonKey:{resource:{type:"audio-link",audioLink:{url:"$"}}},description:"The link to the audio resource",chain:[{key:fe.group_resourceAudioCommon,description:"Common audio properties for the linked audio resource"}]}]},[fe.group_resourceVideo]:{type:G,description:"Video resource",tags:[{key:fe.resource_video,exportJsonKey:{resource:{type:"video",video:{src:"$"}}},description:"The video resource",chain:[{key:fe.group_resourceVideoCommon,description:"Common video properties for the video resource"}]}]},[fe.group_resourceVideoEmbed]:{type:G,description:"Embedded video resource",tags:[{key:fe.resource_videoEmbed,exportJsonKey:{resource:{type:"video-embed",videoEmbed:{url:"$"}}},description:"The embedded video resource",chain:[{key:fe.group_resourceVideoCommon,description:"Common video properties for the embedded video resource"}]}]},[fe.group_resourceVideoLink]:{type:G,description:"Link to a video resource",tags:[{key:fe.resource_videoLink,exportJsonKey:{resource:{type:"video-link",videoLink:{url:"$"}}},description:"The link to the video resource",chain:[{key:fe.group_resourceVideoCommon,description:"Common video properties for the linked video resource"}]}]},[fe.group_resourceStillImageFilmEmbed]:{type:G,description:"Embedded still image film resource",tags:[{key:fe.resource_stillImageFilmEmbed,exportJsonKey:{resource:{type:"still-image-film-embed",stillImageFilmEmbed:{url:"$"}}},description:"The embedded still image film resource",chain:[{key:fe.group_resourceVideoCommon,description:"Common video properties for the embedded still image film resource"}]}]},[fe.group_resourceStillImageFilmLink]:{type:G,description:"Link to a still image film resource",tags:[{key:fe.resource_stillImageFilmLink,exportJsonKey:{resource:{type:"still-image-film-link",stillImageFilmLink:{url:"$"}}},description:"The link to the still image film resource",chain:[{key:fe.group_resourceVideoCommon,description:"Common video properties for the linked still image film resource"}]}]},[fe.group_resourceArticle]:{type:G,description:"Article resource",tags:[{key:fe.resource_article,exportJsonKey:{resource:{type:"article",article:{body:"$"}}},description:"The article resource",chain:[{key:fe.group_resourceCommon,description:"Common resource properties for the article resource"}]}]},[fe.group_resourceArticleEmbed]:{type:G,description:"Embedded article resource",tags:[{key:fe.resource_articleEmbed,exportJsonKey:{resource:{type:"article-embed",articleEmbed:{url:"$"}}},description:"The embedded article resource",chain:[{key:fe.group_resourceCommon,description:"Common resource properties for the embedded article resource"}]}]},[fe.group_resourceArticleLink]:{type:G,description:"Link to an article resource",tags:[{key:fe.resource_articleLink,exportJsonKey:{resource:{type:"article-link",articleLink:{url:"$"}}},description:"The link to the article resource",chain:[{key:fe.group_resourceCommon,description:"Common resource properties for the linked article resource"}]}]},[fe.group_resourceDocument]:{type:G,description:"Document resource",tags:[{key:fe.resource_document,exportJsonKey:{resource:{type:"document",document:{url:"$"}}},description:"The document resource",chain:[{key:fe.group_resourceCommon,description:"Common resource properties for the document resource"}]}]},[fe.group_resourceDocumentEmbed]:{type:G,description:"Embedded document resource",tags:[{key:fe.resource_documentEmbed,exportJsonKey:{resource:{type:"document-embed",documentEmbed:{url:"$"}}},description:"The embedded document resource",chain:[{key:fe.group_resourceCommon,description:"Common resource properties for the embedded document resource"}]}]},[fe.group_resourceDocumentLink]:{type:G,description:"Link to a document resource",tags:[{key:fe.resource_documentLink,exportJsonKey:{resource:{type:"document-link",documentLink:{url:"$"}}},description:"The link to the document resource",chain:[{key:fe.group_resourceCommon,description:"Common resource properties for the linked document resource"}]}]},[fe.group_resourceDocumentDownload]:{type:G,description:"Downloadable document resource",tags:[{key:fe.resource_documentDownload,exportJsonKey:{resource:{type:"document-download",documentDownload:{url:"$"}}},description:"The downloadable document resource",chain:[{key:fe.group_resourceCommon,description:"Common resource properties for the downloadable document resource"}]}]},[fe.group_resourceAppLink]:{type:G,description:"Link to an app resource",tags:[{key:fe.resource_appLink,exportJsonKey:{resource:{type:"app-link",appLink:{url:"$"}}},description:"The link to the app resource",chain:[{key:fe.group_resourceCommon,description:"Common resource properties for the linked app resource"}]}]},[fe.group_resourceWebsiteLink]:{type:G,description:"Link to a website resource",tags:[{key:fe.resource_websiteLink,exportJsonKey:{resource:{type:"website-link",websiteLink:{url:"$"}}},description:"The link to the website resource",chain:[{key:fe.group_resourceCommon,description:"Common resource properties for the linked website resource"}]}]},[fe.group_resourceStillImageFilm]:{type:Y,description:"Resource for still image film",comboResourceConfigKey:fe.resource_stillImageFilm,tags:[{key:fe.group_resourceImage,description:"The image resource for the still image film",maxCount:1,minCount:1},{key:fe.group_resourceAudio,description:"The audio resource for the still image film",maxCount:1,minCount:1}]},[fe.group_resourceImageResponsive]:{type:Y,description:"Responsive image resource",comboResourceConfigKey:fe.resource_imageResponsive,tags:[{key:fe.group_resourceImagePortrait,description:"The portrait image resource",maxCount:1,minCount:1},{key:fe.group_resourceImageLandscape,description:"The landscape image resource",maxCount:1,minCount:1}]},[fe.group_previewImages]:{type:G,description:"Array of preview images for catalog items",tags:[{key:fe.resource_previewImage,jsonKey:"previewImage|resource(type=image, key=image)",exportJsonKey:{previewImage:{type:"image",image:{src:"$"}}},description:"The preview image resource",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the image resource"}]}]},[fe.group_previewVideos]:{type:G,description:"Array of preview videos for catalog items",tags:[{key:fe.resource_previewVideo,jsonKey:"previewVideo|resource(type=video, key=video)",exportJsonKey:{previewVideo:{type:"video",video:{src:"$"}}},description:"The preview video resource",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the image resource"}]}]}},we=new class{hydrateTagsConfig(e){const t={tags:{}};for(const r of e){let e;switch(ye(r.key)){case Z:e=this.hydrateTagConfig(r);break;case X:e=this.hydratePropertyTagConfig(r);break;case ee:e=this.hydrateResourceTagConfig(r);break;case te:e=this.hydrateTagGroupConfig(r);break;default:throw new Error(`Unknown tag type for config key '${r.key}'`)}e&&(t.tags={...t.tags,...e.tags},t.info=Object.assign(t.info??{},e.info))}return t}hydrateCardSetConfig(e){if(!e)return;const t=_e[e];if(!t)throw new Error(`No config found for card set config key '${e}'`);const r=[];for(const e of t.sides){const t=[];for(const r of e.variants){const e=this.hydrateCardVariantConfig(r);t.push(e)}const i=new ne(e.name,e.repeat??!1,t,e.jsonKey,e.exportJsonKey,Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),e.htmlKey,Object.prototype.hasOwnProperty.call(e,"htmlKey"));r.push(i)}return new le(e,t.jsonKey,t.exportJsonKey,Object.prototype.hasOwnProperty.call(t,"exportJsonKey"),this.hydrateCardSections(t.sections),r,t.htmlKey,Object.prototype.hasOwnProperty.call(t,"htmlKey"))}hydrateCardSections(e){if(!e)return;const t={};for(const[r,i]of Object.entries(e))t[r]={jsonKey:i.jsonKey,exportJsonKey:i.exportJsonKey,hasExportJsonKey:Object.prototype.hasOwnProperty.call(i,"exportJsonKey"),htmlKey:i.htmlKey,hasHtmlKey:Object.prototype.hasOwnProperty.call(i,"htmlKey"),isDefault:i.isDefault,sideJsonKey:i.sideJsonKey,sideExportJsonKey:i.sideExportJsonKey,hasSideExportJsonKey:Object.prototype.hasOwnProperty.call(i,"sideExportJsonKey"),sideHtmlKey:i.sideHtmlKey,hasSideHtmlKey:Object.prototype.hasOwnProperty.call(i,"sideHtmlKey"),minCount:i.minCount,maxCount:i.maxCount};return t}hydrateTagConfig(e){const{key:t,maxCount:r,minCount:i,chain:o,deprecated:a,jsonKey:s,exportJsonKey:n,htmlKey:l}=e,c=(0,Te.Enum)(fe).fromValue(t)||fe._unknown;if(!c)throw new Error(`No tag key found for config key '${c}'`);const p=(0,Te.Enum)(f).fromValue(c);if(!p)throw new Error(`No tag found for tag config key '${c}'`);let d;o&&(d=this.hydrateTagsConfig(o).tags);const u=new ie({configKey:c,tag:p,maxCount:r??1,minCount:i??0,chain:d,jsonKey:s,exportJsonKey:n,hasExportJsonKey:Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),htmlKey:l,hasHtmlKey:Object.prototype.hasOwnProperty.call(e,"htmlKey"),deprecated:a});return{tags:{[c]:u}}}hydratePropertyTagConfig(e){const{key:t,maxCount:r,minCount:i,chain:o,deprecated:a,format:s,values:n,defaultValue:l,jsonKey:c,exportJsonKey:p,htmlKey:d}=e,u=(0,Te.Enum)(fe).fromValue(t)||fe._unknown;if(!u)throw new Error(`No property key found for config key '${u}'`);const m=t.substring(1);let h;o&&(h=this.hydrateTagsConfig(o).tags);const g=new oe({configKey:u,tag:m,maxCount:r??1,minCount:i??0,chain:h,jsonKey:c,exportJsonKey:p,hasExportJsonKey:Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),htmlKey:d,hasHtmlKey:Object.prototype.hasOwnProperty.call(e,"htmlKey"),format:s,values:n,defaultValue:l,deprecated:a});return{tags:{[u]:g}}}hydrateResourceTagConfig(e){const{key:t,maxCount:r,minCount:i,chain:o,deprecated:a,jsonKey:s,exportJsonKey:n,htmlKey:l}=e,c=(0,Te.Enum)(fe).fromValue(t)||fe._unknown;if(!c)throw new Error(`No resource key found for config key '${c}'`);const p=t.substring(1);let d;o&&(d=this.hydrateTagsConfig(o).tags);const u=new ae({configKey:c,tag:p,maxCount:r??1,minCount:i??0,chain:d,jsonKey:s,exportJsonKey:n,hasExportJsonKey:Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),htmlKey:l,hasHtmlKey:Object.prototype.hasOwnProperty.call(e,"htmlKey"),deprecated:a});return{tags:{[c]:u}}}hydrateTagGroupConfig(e){const{key:t}=e,r=(0,Te.Enum)(fe).fromValue(t)||fe._unknown;if(!r)throw new Error(`No group key found for config key '${r}'`);const i=Ce[r];if(!i)throw new Error(`No config found for group config key '${t}'`);const{tags:o}=i,a=this.hydrateTagsConfig(o).tags,s=Object.values(a);if(s.length>0){const t=s[0],r=t;r.maxCount=e.maxCount??t.maxCount,r.minCount=e.minCount??t.minCount}return{tags:a,info:{comboResourceConfigKey:i.comboResourceConfigKey}}}hydrateCardVariantConfig(e){const{tags:t,bodyAllowed:r,bodyRequired:i,repeatCount:o,jsonKey:a,exportJsonKey:s,htmlKey:n,format:l}=e,c=this.hydrateTagsConfig(t);return new se(c.tags,r,i,o,a,s,Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),l,n,Object.prototype.hasOwnProperty.call(e,"htmlKey"))}},Ae={[d._error]:{since:"1.3.0",description:"An error bit, rendered when the bit cannot be interpreted"},[d._comment]:{since:"1.4.12",description:"A comment bit, used when a bit is commented out by adding | between the . and the bit name, e.g [.|article]"},[d._standard]:{since:"3.2.0",description:"The standard bit type, used as a base for other bits, should not be used directly",tags:[{key:fe.group_standardTags,description:"Standard tags for (almost) all bits"}]},[d.appFlashcards]:{since:"1.3.0",baseBitType:d._standard,description:"App flashcards bit, used for flashcard quizzes in the app",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common tags for quiz bits"},{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:fe.tag_title,description:"The title of the flashcard quiz"},{key:fe.property_flashcardSet,description:"The flashcard set to use for the app flashcards",format:y,maxCount:u},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:y,nullable:!0}],rootExampleType:m},[d.appFlashcardsQuiz]:{since:"1.3.0",baseBitType:d.appFlashcards,description:"App flashcards quiz bit"},[d.appFlashcardsLearn]:{since:"1.3.0",baseBitType:d.appFlashcards,description:"App flashcards learn bit"},[d.appLink]:{since:"1.3.0",baseBitType:d._standard,description:"App link bit, used to link to other bits in the app",tags:[{key:fe.group_resourceBitTags,description:"Tags for the resource bit"},{key:fe.group_resourceAppLink,description:"Tags for the app link resource",minCount:1}],resourceAttachmentAllowed:!1},[d.appRag]:{since:"5.14.0",baseBitType:d.article,description:"App RAG (Retrieval-Augmented Generation) bit, equal to article"},[d.appSearch]:{since:"5.14.0",baseBitType:d.article,description:"App search bit, equal to article"},[d.author]:{since:"4.2.0",baseBitType:d._standard,description:"Represents an author of something",tags:[{key:fe.property_fullName,description:"Full name of the author"},{key:fe.property_pseudonym,description:"A pseudonym of the author, if any"},{key:fe.property_title,description:'The title of the author, e.g. "Dr.", "Prof.", etc.',jsonKey:"title"},{key:fe.property_jobTitle,description:'The job title of the author, e.g. "Software Engineer", "Professor", etc.'}]},[d.bookAuthor]:{since:"4.2.0",baseBitType:d.author,description:"Represents an author of a book"},[d.articleAuthor]:{since:"4.2.0",baseBitType:d.author,description:"Represents an author of a book"},[d.article]:{since:"1.3.0",baseBitType:d._standard,description:"Article bit, used for articles / paragraphs",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],mappingKeys:{"xml-niso-iec":{"@el":"title","@text":"$"}},key:fe.tag_title,description:"The title of the article"}]},[d.articleAlt]:{since:"1.15.0",baseBitType:d.article,description:"Alternative article bit"},[d.articleResponsive]:{since:"1.21.0",baseBitType:d.article,description:"Responsive article bit, used for articles that adapt to the screen size",tags:[{key:fe.property_imageFirst,description:"If the image should be displayed first in the responsive article",format:x,defaultValue:"true"}]},[d.articleResponsiveAlt]:{since:"2.0.0",baseBitType:d.articleResponsive,description:"Alternative responsive article bit"},[d.standardArticleNormative]:{since:"1.16.0",baseBitType:d.article,description:"Standard normative article bit"},[d.standardArticleNonNormative]:{since:"1.16.0",baseBitType:d.article,description:"Standard non-normative article bit"},[d.smartStandardArticleNormative]:{since:"1.28.0",baseBitType:d.standardArticleNormative,description:"Smart standard normative article bit",mappingKeys:{"xml-niso-iec":[{"@el":"p","@attr":{id:"$customerId"},"@children":"$"},{"@el":"sec","@attr":{"sec-type":"numbered-paragraph",id:"$customerId"},"@children":"$","▼":"$anchor"}]}},[d.smartStandardArticleNonNormative]:{since:"1.28.0",baseBitType:d.standardArticleNonNormative,description:"Smart standard non-normative article bit",mappingKeys:{"xml-niso-iec":[{"@el":"p","@attr":{id:"$customerId"},"@ancestor":{"@attr":{"sec-type":"foreword|intro"}},"@children":"$"},{"@el":"p","@attr":{id:"$customerId"},"@ancestor":{"@attr":{"content-type":"informative"}},"@children":"$"}]}},[d.smartStandardArticleNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardArticleNormative,description:"Smart standard normative article bit that is collapsible",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardArticleNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardArticleNonNormative,description:"Smart standard non-normative article bit that is collapsible",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.statement]:{since:"1.3.0",baseBitType:d.article,description:"Statement bit, used for statements in documents"},[d.pageArticle]:{since:"1.15.0",baseBitType:d.article,description:"Page article bit"},[d.pageArticleAlt]:{since:"1.15.0",baseBitType:d.article,description:"Alternative page article bit"},[d.pageArticleResponsive]:{since:"1.21.0",baseBitType:d.article,description:"Responsive page article bit, used for articles that adapt to the screen size",tags:[{key:fe.property_imageFirst,description:"If the image should be displayed first in the responsive article",format:x,defaultValue:"true"}]},[d.buttonCopyText]:{since:"1.4.3",baseBitType:d.article,description:"Button copy text bit, used to create a button that copies text to the clipboard",tags:[{key:fe.property_buttonCaption,description:"The caption of the button",format:y}]},[d.catalogItemBook]:{since:"4.15.0",baseBitType:d._standard,description:"Catalog item book bit, used to represent a book product in a catalog with cover and description",tags:[{key:fe.tag_title,description:"Title and subtitle of the catalog item",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:fe.property_coverImage,description:"Cover image of the catalog item",format:y,nullable:!0},{key:fe.resource_coverImage,jsonKey:"coverImage|resource(type=image, key=image)",exportJsonKey:{coverImage:{type:"image",image:{src:"$"}}},description:"Cover image of the catalog item",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the cover image resource"}]},{key:fe.property_content2Buy,description:"Content to buy identifier",format:y},{key:fe.property_listPrice,description:"List price of the catalog item",format:y},{key:fe.property_buttonCaption,description:"Caption for the buy button",format:y},{key:fe.property_customerProductId,description:"Customer-specific product identifier",format:y},{key:fe.property_currency,description:"Currency for the catalog item",format:y},{key:fe.property_bookIsbn,description:"ISBN for iBook version",format:y},{key:fe.property_bookAuthor,description:"Author of the book",format:y},{key:fe.property_bookType,description:"Type of the book",format:y},{key:fe.property_bookBindingType,description:"Binding type of the book",format:y},{key:fe.property_bookNumberOfPages,description:"Number of pages in the book",format:y},{key:fe.property_bookRating,description:"Rating of the book",format:y},{key:fe.property_bookSeriesTitle,description:"Title of the book series",format:y},{key:fe.property_bookSeriesId,description:"ID of the book series",format:y},{key:fe.property_bookSeriesNumber,description:"Number in the book series",format:y},{key:fe.property_bookLanguage,description:"Language of the book",format:y},{key:fe.property_bookPublishingDate,description:"Publishing date of the book",format:y},{key:fe.property_bookPublisher,description:"Publisher of the book",format:y},{key:fe.property_bookTranslator,description:"Translator of the book",format:y},{key:fe.property_bookOriginalTitle,description:"Original title of the book",format:y},{key:fe.property_gmbExternalShop,description:"External shop identifier",format:y},{key:fe.property_gmbExternalShopItems,description:"Array of external shop items",format:y,maxCount:u},{key:fe.group_imageSource,description:"Image source chain"},{key:fe.group_previewImages,description:"Array of preview images for the catalog item",maxCount:u},{key:fe.group_previewVideos,description:"Array of preview videos for the catalog item",maxCount:u},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:y,nullable:!0}],rootExampleType:m},[d.catalogItemExternalBook]:{since:"4.15.0",baseBitType:d._standard,description:"Catalog item external book bit, used to represent an external book product in a catalog with link to external shop",tags:[{key:fe.tag_title,description:"Title and subtitle of the catalog item",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:fe.property_coverImage,description:"Cover image of the catalog item",format:y,nullable:!0},{key:fe.resource_coverImage,jsonKey:"coverImage|resource(type=image, key=image)",exportJsonKey:{coverImage:{type:"image",image:{src:"$"}}},description:"Cover image of the catalog item",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the cover image resource"}]},{key:fe.property_customerProductShopLink,description:"Link to external shop for the product",format:y},{key:fe.property_listPrice,description:"List price of the catalog item",format:y},{key:fe.property_buttonCaption,description:"Caption for the buy button",format:y},{key:fe.property_customerProductId,description:"Customer-specific product identifier",format:y},{key:fe.property_currency,description:"Currency for the catalog item",format:y},{key:fe.property_bookIsbn,description:"ISBN for iBook version",format:y},{key:fe.property_bookAuthor,description:"Author of the book",format:y},{key:fe.property_bookType,description:"Type of the book",format:y},{key:fe.property_bookBindingType,description:"Binding type of the book",format:y},{key:fe.property_bookNumberOfPages,description:"Number of pages in the book",format:y},{key:fe.property_bookRating,description:"Rating of the book",format:y},{key:fe.property_bookSeriesTitle,description:"Title of the book series",format:y},{key:fe.property_bookSeriesId,description:"ID of the book series",format:y},{key:fe.property_bookSeriesNumber,description:"Number in the book series",format:y},{key:fe.property_bookLanguage,description:"Language of the book",format:y},{key:fe.property_bookPublishingDate,description:"Publishing date of the book",format:y},{key:fe.property_bookPublisher,description:"Publisher of the book",format:y},{key:fe.property_bookTranslator,description:"Translator of the book",format:y},{key:fe.property_bookOriginalTitle,description:"Original title of the book",format:y},{key:fe.property_gmbExternalShop,description:"External shop identifier",format:y},{key:fe.property_gmbExternalShopItems,description:"Array of external shop items",format:y,maxCount:u},{key:fe.group_imageSource,description:"Image source chain"},{key:fe.group_previewImages,description:"Array of preview images for the catalog item",maxCount:u},{key:fe.group_previewVideos,description:"Array of preview videos for the catalog item",maxCount:u},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:y,nullable:!0}],rootExampleType:m},[d.catalogItemProduct]:{since:"4.15.0",baseBitType:d._standard,description:"Catalog item product bit, used to represent a general product in a catalog with cover and description",tags:[{key:fe.tag_title,description:"Title and subtitle of the catalog item",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:fe.property_coverImage,description:"Cover image of the catalog item",format:y,nullable:!0},{key:fe.property_content2Buy,description:"Content to buy identifier",format:y},{key:fe.property_listPrice,description:"List price of the catalog item",format:y},{key:fe.property_buttonCaption,description:"Caption for the buy button",format:y},{key:fe.property_customerProductId,description:"Customer-specific product identifier",format:y},{key:fe.property_currency,description:"Currency for the catalog item",format:y},{key:fe.property_bookIsbn,description:"ISBN for iBook version",format:y},{key:fe.property_bookAuthor,description:"Author of the book",format:y},{key:fe.property_bookType,description:"Type of the book",format:y},{key:fe.property_bookBindingType,description:"Binding type of the book",format:y},{key:fe.property_bookNumberOfPages,description:"Number of pages in the book",format:y},{key:fe.property_bookRating,description:"Rating of the book",format:y},{key:fe.property_bookSeriesTitle,description:"Title of the book series",format:y},{key:fe.property_bookSeriesId,description:"ID of the book series",format:y},{key:fe.property_bookSeriesNumber,description:"Number in the book series",format:y},{key:fe.property_bookLanguage,description:"Language of the book",format:y},{key:fe.property_bookPublishingDate,description:"Publishing date of the book",format:y},{key:fe.property_bookPublisher,description:"Publisher of the book",format:y},{key:fe.property_bookTranslator,description:"Translator of the book",format:y},{key:fe.property_bookOriginalTitle,description:"Original title of the book",format:y},{key:fe.property_gmbExternalShop,description:"External shop identifier",format:y},{key:fe.property_gmbExternalShopItems,description:"Array of external shop items",format:y,maxCount:u},{key:fe.group_imageSource,description:"Image source chain"},{key:fe.group_previewImages,description:"Array of preview images for the catalog item",maxCount:u},{key:fe.group_previewVideos,description:"Array of preview videos for the catalog item",maxCount:u},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:y,nullable:!0}],rootExampleType:m},[d.callToAction]:{since:"1.15.0",baseBitType:d._standard,description:"Call to action bit, used to create a call to action button",tags:[{key:fe.property_buttonCaption,description:"The caption of the call to action button",format:y},{key:fe.property_callToActionUrl,description:"The URL to navigate to when the call to action button is clicked",format:y,minCount:1}]},[d.callToActionSubscribe]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action subscribe bit"},[d.callToActionContact]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action contact bit"},[d.callToActionJoin]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action join bit"},[d.callToActionMail]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action mail bit"},[d.callToActionLearnMore]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action learn more bit"},[d.callToActionSeeMore]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action see more bit"},[d.callToActionWatch]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action watch bit"},[d.callToActionStartNow]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action start now bit"},[d.callToActionGetOffer]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action get offer bit"},[d.callToActionBookNow]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action book now bit"},[d.callToActionShopNow]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action shop now bit"},[d.callToActionGetNow]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action get now bit"},[d.callToActionDownload]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action download bit"},[d.callToActionCreateAccount]:{since:"1.15.0",baseBitType:d.callToAction,description:"Call to action create account bit"},[d.appBitmarkFromJavascript]:{since:"1.4.5",baseBitType:d._standard,description:"App bitmark from JavaScript, used to create bits from JavaScript in the app",tags:[{key:fe.property_maxCreatedBits,description:"The maximum number of bits that can be created from this bit",format:k,nullable:!0}],textFormatDefault:C.plainText},[d.appBitmarkFromEditor]:{since:"1.4.5",baseBitType:d.appBitmarkFromJavascript,description:"App bitmark from editor, used to create bits from the editor in the app"},[d.articleEmbed]:{since:"1.3.0",baseBitType:d._standard,description:"Article embed bit, used to embed articles from other sources",tags:[{key:fe.group_resourceBitTags,description:"Tags for the resource bit"},{key:fe.group_resourceArticleEmbed,description:"Tags for the article embed resource",minCount:1}],resourceAttachmentAllowed:!1},[d.articleLink]:{since:"1.3.0",baseBitType:d._standard,description:"Article link bit, used to link to articles from other sources",tags:[{key:fe.group_resourceBitTags,description:"Tags for the resource bit"},{key:fe.group_resourceArticleLink,description:"Tags for the article link resource",minCount:1}],resourceAttachmentAllowed:!1},[d.audio]:{since:"1.3.0",baseBitType:d._standard,description:"Audio bit, used for audio files",tags:[{key:fe.group_resourceBitTags,description:"Tags for the resource bit"},{key:fe.group_resourceAudio,description:"Tags for the audio resource",minCount:1}],resourceAttachmentAllowed:!1},[d.audioEmbed]:{since:"1.3.0",baseBitType:d._standard,description:"Audio embed bit, used to embed audio files from other sources",tags:[{key:fe.group_resourceBitTags,description:"Tags for the resource bit"},{key:fe.group_resourceAudioEmbed,description:"Tags for the audio embed resource",minCount:1}],resourceAttachmentAllowed:!1},[d.audioLink]:{since:"1.3.0",baseBitType:d._standard,description:"Audio link bit, used to link to audio files from other sources",tags:[{key:fe.group_resourceBitTags,description:"Tags for the resource bit"},{key:fe.group_resourceAudioLink,description:"Tags for the audio link resource",minCount:1}],resourceAttachmentAllowed:!1},[d.bitAlias]:{since:"1.3.0",baseBitType:d._standard,description:"Bit alias, used to create an alias for a bit",tags:[{exportJsonKey:{reference:"$"},key:fe.tag_reference,format:y,description:"The reference to the bit that this alias points to"},{exportJsonKey:{anchor:"$"},key:fe.tag_anchor,format:y,description:"The anchor for the bit alias, used for linking"}]},[d.diff]:{since:"3.13.0",baseBitType:d._standard,description:"Diff bit, used to show differences between two bits",tags:[{key:fe.property_diffTo,description:"The reference to the bit that this diff compares to",format:y}]},[d.book]:{since:"1.3.0",baseBitType:d._standard,description:"Book bit, used to represent a book",mappingKeys:{"xml-niso-iec":{"@el":"std-meta"}},tags:[{key:fe.group_bookCommon,description:"Common tags for book bits"}]},[d.bookEnd]:{since:"3.27.0",baseBitType:d.article,description:"End of book bit"},[d.bookAcknowledgements]:{since:"1.17.0",baseBitType:d.article,description:"Acknowledgements section of a book"},[d.bookAddendum]:{since:"1.3.0",baseBitType:d.article,description:"Addendum section of a book"},[d.bookAfterword]:{since:"1.3.0",baseBitType:d.article,description:"Afterword section of a book"},[d.bookAppendix]:{since:"1.3.0",baseBitType:d.article,description:"Appendix section of a book"},[d.bookArticle]:{since:"1.3.0",baseBitType:d.article,description:"Article section of a book"},[d.bookAutherBio]:{since:"1.3.0",baseBitType:d.article,description:"Author biography section of a book"},[d.bookBibliography]:{since:"1.3.0",baseBitType:d.article,description:"Bibliography section of a book"},[d.bookComingSoon]:{since:"1.3.0",baseBitType:d.article,description:"Coming soon section of a book"},[d.bookConclusion]:{since:"1.3.0",baseBitType:d.article,description:"Conclusion section of a book"},[d.bookCopyright]:{since:"1.3.0",baseBitType:d.article,description:"Copyright section of a book"},[d.bookCopyrightPermissions]:{since:"1.3.0",baseBitType:d.article,description:"Copyright permissions section of a book"},[d.bookDedication]:{since:"1.3.0",baseBitType:d.article,description:"Dedication section of a book"},[d.bookEndnotes]:{since:"1.3.0",baseBitType:d.article,description:"Endnotes section of a book"},[d.bookEpigraph]:{since:"1.3.0",baseBitType:d.article,description:"Epigraph section of a book"},[d.bookEpilogue]:{since:"1.3.0",baseBitType:d.article,description:"Epilogue section of a book"},[d.bookForword]:{since:"1.3.0",baseBitType:d.article,description:"Foreword section of a book"},[d.bookFrontispiece]:{since:"1.3.0",baseBitType:d.article,description:"Frontispiece section of a book"},[d.bookImprint]:{since:"1.3.0",baseBitType:d.article,description:"Imprint section of a book"},[d.bookIncitingIncident]:{since:"1.3.0",baseBitType:d.article,description:"Inciting incident section of a book"},[d.bookIntroduction]:{since:"1.3.0",baseBitType:d.article,description:"Introduction section of a book"},[d.bookListOfContributors]:{since:"1.3.0",baseBitType:d.article,description:"List of contributors section of a book"},[d.bookNotes]:{since:"1.3.0",baseBitType:d.article,description:"Notes section of a book"},[d.bookPostscript]:{since:"1.3.0",baseBitType:d.article,description:"Postscript section of a book"},[d.bookPreface]:{since:"1.3.0",baseBitType:d.article,description:"Preface section of a book"},[d.bookPrologue]:{since:"1.3.0",baseBitType:d.article,description:"Prologue section of a book"},[d.bookReadMore]:{since:"1.3.0",baseBitType:d.article,description:"Read more section of a book"},[d.bookReferenceList]:{since:"3.2.0",baseBitType:d._standard,description:"Book reference list, used to list references in a book",cardSet:U},[d.bookRequestForABookReview]:{since:"1.3.0",baseBitType:d.article,description:"Request for a book review section of a book"},[d.bookSummary]:{since:"1.3.0",baseBitType:d.article,description:"Summary section of a book"},[d.bookTeaser]:{since:"1.3.0",baseBitType:d.article,description:"Teaser section of a book"},[d.bookTitle]:{since:"1.3.0",baseBitType:d.article,description:"Title section of a book"},[d.bookCover]:{since:"3.27.0",baseBitType:d.image,description:"Cover image of a book",tags:[{key:fe.tag_title,description:"The title of the book cover",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:fe.property_coverColor,description:"The color of the book cover",format:y}]},[d.bookAlias]:{since:"1.4.3",baseBitType:d.book,description:"Book alias, used to create an alias for a book",tags:[{key:fe.property_bookAlias,description:"The alias for the book",format:y,maxCount:u}]},[d.bookDiff]:{since:"3.10.0",baseBitType:d.book,description:"Book diff, used to show differences between two book versions",tags:[{key:fe.property_bookDiff,description:"The reference to the book that this diff compares to",format:y}]},[d.bookClose]:{since:"1.18.0",baseBitType:d.article,description:"Close section of a book, used to close the book",tags:[{key:fe.property_buttonCaption,description:"The caption of the close button",format:y}]},[d.bookReference]:{since:"2.2.0",baseBitType:d.article,description:"Book reference, used to reference a book in another book",tags:[{key:fe.property_refAuthor,description:"The author of the referenced book",format:y,maxCount:u},{key:fe.property_refBookTitle,description:"The title of the referenced book",format:y},{key:fe.property_refPublisher,description:"The publisher of the referenced book",format:y,maxCount:u},{key:fe.property_refPublicationYear,description:"The publication year of the referenced book",format:y},{key:fe.property_citationStyle,description:"The citation style to use for the book reference",format:y}]},[d.botActionResponse]:{since:"1.3.0",baseBitType:d._standard,description:"Bot action response bit, used to define responses for bot actions",cardSet:j},[d.botActionSend]:{since:"1.3.0",baseBitType:d._standard,description:"Bot action send bit, used to define actions for sending messages",tags:[{key:fe.property_date,description:"The date when the message should be sent",format:y}]},[d.browserImage]:{since:"1.3.0",baseBitType:d.image,description:"Browser image bit, used to display images in the browser",tags:[{key:fe.property_focusX,description:"The X coordinate for focusing the image in the browser",format:k,nullable:!0},{key:fe.property_focusY,description:"The Y coordinate for focusing the image in the browser",format:k,nullable:!0}]},[d.card1]:{since:"1.3.0",baseBitType:d._standard,description:"Card bit, used for cards in quizzes",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common tags for quiz bits"}]},[d.question1]:{since:"1.3.0",baseBitType:d.card1,description:"Question card bit"},[d.survey1]:{since:"1.3.0",baseBitType:d.card1,description:"Survey card bit"},[d.surveyAnonymous1]:{since:"1.3.0",baseBitType:d.card1,description:"Anonymous survey card bit"},[d.chapter]:{since:"1.3.0",baseBitType:d._standard,description:"Chapter bit, used to define chapters in books or articles",mappingKeys:{"xml-niso-iec":{"@el":"sec|app","@attr":{id:"$customerId"},"▼":"$anchor"}},tags:[{exportJsonKey:{anchor:"$"},key:fe.tag_anchor,format:y,description:"The anchor for the chapter, used for linking"},{key:fe.tag_title,description:"The title of the chapter",jsonKey:"title|setMulti(level)",exportJsonKey:{title:"$",level:"$level"},mappingKeys:{"xml-niso-iec":{"@el":"title","@text":"$"}}},{key:fe.property_toc,description:"If the chapter should be included in the table of contents",format:x,defaultValue:"true"},{key:fe.property_progress,description:"The progress of the chapter, used for tracking reading progress",format:x,defaultValue:"true"}]},[d.clozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:d._standard,description:"Cloze and multiple choice text bit, used for quizzes with cloze and multiple choice questions",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common tags for quiz bits"},{key:fe.group_gap,description:"Tags for gaps in cloze and multiple choice text bits"},{key:fe.group_trueFalseInlineSelect,description:"Tags for true/false questions in cloze and multiple choice text bits"},{key:fe.property_isCaseSensitive,exportJsonKey:{},description:"If the cloze answers are case sensitive",format:x,defaultValue:"true"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}]},[d.coachCallToActionClozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:d.clozeAndMultipleChoiceText,description:"Coach call to action cloze and multiple choice text bit"},[d.cloze]:{since:"1.3.0",baseBitType:d._standard,description:"Cloze bit, used for fill-in-the-blank questions in quizzes",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common tags for quiz bits"},{key:fe.property_isCaseSensitive,exportJsonKey:{},description:"If the cloze answers are case sensitive",format:x,defaultValue:"true"},{key:fe.property_quizCountItems,description:"The number of items in the cloze quiz",format:x,nullable:!0},{key:fe.property_quizStrikethroughSolutions,description:"If the cloze solutions should be strikethrough",format:x,nullable:!0},{key:fe.group_gap,description:"Tags for gaps in cloze bits"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}]},[d.clozeInstructionGrouped]:{since:"1.3.0",baseBitType:d.cloze,description:"Cloze instruction grouped bit, used for cloze questions with grouped instructions",tags:[{key:fe.property_quizCountItems,description:"The number of items in the cloze quiz (instruction-grouped default: true)",format:x,defaultValue:"true"}]},[d.clozeSolutionGrouped]:{since:"1.3.0",baseBitType:d.cloze,description:"Cloze solution grouped bit, used for cloze questions with grouped solutions",tags:[{key:fe.property_quizCountItems,description:"The number of items in the cloze quiz (solution-grouped default: true)",format:x,defaultValue:"true"},{key:fe.property_quizStrikethroughSolutions,description:"If the cloze solutions should be strikethrough (solution-grouped default: true)",format:x,defaultValue:"true"}]},[d.clozeSeveral]:{since:"3.5.0",baseBitType:d.cloze,description:"Cloze several bit, used for cloze questions with multiple answers"},[d.gapText]:{since:"1.5.15",baseBitType:d.cloze,description:"Gap text bit, used for fill-in-the-blank questions in quizzes with text gaps"},[d.gapTextInstructionGrouped]:{since:"1.5.15",baseBitType:d.clozeInstructionGrouped,description:"Gap text instruction grouped bit, used for fill-in-the-blank questions with grouped instructions"},[d.coachSelfReflectionCloze]:{since:"1.3.0",baseBitType:d.cloze,description:"Coach self-reflection cloze bit, used for self-reflection questions in coaching"},[d.coachCallToActionCloze]:{since:"1.3.0",baseBitType:d.cloze,description:"Coach call to action cloze bit, used for call to action questions in coaching"},[d.clozeList]:{since:"1.4.13",baseBitType:d._standard,description:"Cloze list bit, used for lists of cloze questions in quizzes",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common tags for quiz bits"},{key:fe.property_isCaseSensitive,exportJsonKey:{},description:"If the cloze answers are case sensitive",format:x,defaultValue:"true"}],cardSet:z},[d.code]:{since:"1.3.0",baseBitType:d._standard,description:"Code bit, used for code snippets in articles or documents",mappingKeys:{"xml-niso-iec":{"@el":"code","@attr":{id:"$customerId",language:"$computerLanguage"},"▼":"$anchor","@text":"$"}},tags:[{key:fe.property_computerLanguage,description:"The programming language of the code snippet",format:y,mappingKeys:{"xml-niso-iec":[{"@absent":"text"}]}},{key:fe.property_codeLineNumbers,description:"If line numbers should be displayed for the code snippet",format:x},{key:fe.property_codeMinimap,description:"If a minimap should be displayed for the code snippet",format:x}],textFormatDefault:C.plainText},[d.formula]:{since:"1.35.0",baseBitType:d._standard,description:"Formula bit, used for mathematical formulas in articles or documents",textFormatDefault:C.latex},[d.formulaImage]:{since:"5.23.0",baseBitType:d.formula,description:"Formula image bit, used for mathematical formulas rendered as images"},[d.smartStandardFormula]:{since:"3.11.0",baseBitType:d.formula,description:"Smart standard formula bit, used for mathematical formulas in smart standards"},[d.smartStandardFormulaNonNormative]:{since:"3.11.0",baseBitType:d.formula,description:"Smart standard non-normative formula bit, used for mathematical formulas in smart standards that are non-normative"},[d.smartStandardFormulaNormative]:{since:"3.11.0",baseBitType:d.formula,description:"Smart standard normative formula bit, used for mathematical formulas in smart standards that are normative",mappingKeys:{"xml-niso-iec":{"@el":"disp-formula","@attr":{id:"$customerId"},"▼":"$anchor","@children":"$"}}},[d.smartStandardRemarkFormula]:{since:"3.11.0",baseBitType:d.formula,description:"Smart standard remark formula bit, used for mathematical formulas in smart standards remarks"},[d.smartStandardRemarkFormulaNonNormative]:{since:"3.11.0",baseBitType:d.formula,description:"Smart standard non-normative remark formula bit, used for mathematical formulas in smart standards remarks that are non-normative"},[d.smartStandardRemarkFormulaNormative]:{since:"3.11.0",baseBitType:d.formula,description:"Smart standard normative remark formula bit, used for mathematical formulas in smart standards remarks that are normative"},[d.appCodeCell]:{since:"1.4.3",baseBitType:d.code,description:"App code cell, used to create code cells in the app editor"},[d.appCodeEditor]:{since:"1.4.3",baseBitType:d.code,description:"App code editor, used to create code editors in the app editor"},[d.appCodeIde]:{since:"1.4.3",baseBitType:d.code,description:"App code IDE, used to create code IDEs in the app editor"},[d.codeRuntime]:{since:"1.4.3",baseBitType:d.code,description:"Code runtime, used to define the runtime environment for code snippets"},[d.consoleLog]:{since:"1.4.3",baseBitType:d.code,description:"Console log, used to log messages to the console in code snippets"},[d.output]:{since:"1.4.3",baseBitType:d.code,description:"Output bit, used to display output from code snippets"},[d.stdout]:{since:"1.4.3",baseBitType:d.code,description:"Standard output bit, used to display standard output from code snippets"},[d.sandbox]:{since:"4.10.0",baseBitType:d.code,description:"A sandbox bit, used to create a sandboxed environment for code execution"},[d.sandboxOutputJson]:{since:"4.10.0",baseBitType:d.code,description:"A sandbox output JSON bit, used to display JSON output from sandboxed code"},[d.sandboxOutputMarkup]:{since:"4.10.0",baseBitType:d.code,description:"A sandbox output markup bit, used to display markup output from sandboxed code"},[d.sandboxOutputRender]:{since:"4.10.0",baseBitType:d.code,description:"A sandbox output render bit, used to display rendered output from sandboxed code"},[d.step]:{since:"1.5.1",baseBitType:d.article,description:"Step bit, used to define steps in a process or guide"},[d.stepImageScreenshot]:{since:"1.5.1",baseBitType:d.image,description:"Step image screenshot bit, used to display screenshots in steps"},[d.stepImageScreenshotWithPointer]:{since:"1.5.1",baseBitType:d.image,description:"Step image screenshot with pointer bit, used to display screenshots with pointers in steps",tags:[{key:fe.property_pointerTop,description:"The top position of the pointer in the screenshot",format:y,minCount:1,maxCount:1},{key:fe.property_pointerLeft,description:"The left position of the pointer in the screenshot",format:y,minCount:1,maxCount:1}]},[d.milestone]:{since:"1.20.0",baseBitType:d.step,description:"Milestone bit, used to define milestones in a process or guide"},[d.conversationLeft1]:{since:"1.3.0",baseBitType:d._standard,description:"Conversation left bit, used to create a conversation on the left side of the screen",tags:[{key:fe.group_person,exportJsonKey:{partner:{name:"$"}},description:"Tags for the person in the conversation"}]},[d.conversationLeft1Scream]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Conversation left scream bit, used to create a conversation with a scream on the left side of the screen"},[d.conversationLeft1Thought]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Conversation left thought bit, used to create a conversation with a thought on the left side of the screen"},[d.conversationRight1]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Conversation right bit, used to create a conversation on the right side of the screen"},[d.conversationRight1Scream]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Conversation right scream bit, used to create a conversation with a scream on the right side of the screen"},[d.conversationRight1Thought]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Conversation right thought bit, used to create a conversation with a thought on the right side of the screen"},[d.clozeAndMultipleChoiceTextConversationLeft1]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Cloze and multiple choice text conversation left bit, used for conversations with cloze and multiple choice text on the left side of the screen"},[d.clozeAndMultipleChoiceTextConversationLeft1Scream]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Cloze and multiple choice text conversation left scream bit, used for conversations with cloze and multiple choice text and a scream on the left side of the screen"},[d.clozeAndMultipleChoiceTextConversationLeft1Thought]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Cloze and multiple choice text conversation left thought bit, used for conversations with cloze and multiple choice text and a thought on the left side of the screen"},[d.clozeAndMultipleChoiceTextConversationRight1]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Cloze and multiple choice text conversation right bit, used for conversations with cloze and multiple choice text on the right side of the screen"},[d.clozeAndMultipleChoiceTextConversationRight1Scream]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Cloze and multiple choice text conversation right scream bit, used for conversations with cloze and multiple choice text and a scream on the right side of the screen"},[d.clozeAndMultipleChoiceTextConversationRight1Thought]:{since:"1.3.0",baseBitType:d.conversationLeft1,description:"Cloze and multiple choice text conversation right thought bit, used for conversations with cloze and multiple choice text and a thought on the right side of the screen"},[d.advertising]:{since:"4.2.0",baseBitType:d.article,description:"General advertising content bit",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingAdvertorial]:{since:"4.2.0",baseBitType:d.article,description:"Advertorial content bit (sponsored article)",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingCallToAction]:{since:"4.2.0",baseBitType:d.callToAction,description:"Call-to-action for advertising",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingCallToActionMeeting]:{since:"4.2.0",baseBitType:d.callToAction,description:"Call-to-action for meeting or appointment",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingBanner]:{since:"4.2.0",baseBitType:d.image,description:"Banner advertisement bit",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingSkyscraper]:{since:"4.2.0",baseBitType:d.image,description:"Skyscraper (vertical) advertisement bit",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingRectangle]:{since:"4.2.0",baseBitType:d.image,description:"Rectangle advertisement bit",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingFullPage]:{since:"4.2.0",baseBitType:d.image,description:"Full-page advertisement bit",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingHalfPage]:{since:"4.2.0",baseBitType:d.image,description:"Half-page advertisement bit",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingQuarterPage]:{since:"4.2.0",baseBitType:d.image,description:"Quarter-page advertisement bit",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingClassifiedPage]:{since:"4.2.0",baseBitType:d.image,description:"Classifieds advertisement page bit",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingLandscape]:{since:"4.2.0",baseBitType:d.image,description:"Landscape format advertisement bit",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.advertisingPortrait]:{since:"4.2.0",baseBitType:d.image,description:"Portrait format advertisement bit",tags:[{key:fe.group_advertisingCommon,description:"Common advertising tags"}]},[d.cookPreparation]:{since:"1.3.0",baseBitType:d.article,description:"Cook preparation bit"},[d.cookStep]:{since:"1.3.0",baseBitType:d.article,description:"Cook step bit"},[d.cookIngredients]:{since:"1.5.16",baseBitType:d._standard,description:"Cook ingredients bit, used to define ingredients for recipes",tags:[{key:fe.group_technicalTerm,description:"Tags for technical terms related to ingredients"},{key:fe.property_servings,jsonKey:"servings.servings",exportJsonKey:{servings:{servings:"$"}},description:"The number of servings for the ingredients",format:k,chain:[{key:fe.property_unit,description:"The unit of measurement for the ingredients (singular)",format:y},{key:fe.property_unitPlural,description:"The unit of measurement for the ingredients (plural)",format:y},{key:fe.property_unitAbbr,description:"The abbreviation for the unit of measurement (singular)",format:y},{key:fe.property_unitAbbrPlural,description:"The abbreviation for the unit of measurement (plural)",format:y},{key:fe.property_decimalPlaces,description:"The number of decimal places for the ingredient quantity",format:k,defaultValue:"1"},{key:fe.property_disableCalculation,description:"If the ingredient quantity calculation should be disabled",format:x},{exportJsonKey:{hint:"$"},key:fe.tag_hint,description:"Hint for the ingredient, used to provide additional information",format:y}]}],cardSet:H},[d.recipe]:{since:"1.5.24",baseBitType:d.cookIngredients,description:"Recipe bit, used to define a recipe"},[d.cookRemark]:{since:"1.3.0",baseBitType:d.article,description:"Cook remark bit, used to add remarks to recipes"},[d.cookVariation]:{since:"1.3.0",baseBitType:d.article,description:"Cook variation bit, used to define variations of recipes"},[d.cookInsert]:{since:"1.3.0",baseBitType:d.article,description:"Cook insert bit, used to insert additional content in recipes"},[d.cookNoteOnQuantity]:{since:"3.27.0",baseBitType:d.article,description:"Cook note on quantity bit, used to add notes on ingredient quantities in recipes"},[d.cookArrangement]:{since:"1.3.0",baseBitType:d.article,description:"Cook arrangement bit, used to arrange ingredients or steps in recipes"},[d.cookPracticeAdvise]:{since:"1.3.0",baseBitType:d.article,description:"Cook practice advice bit, used to provide practical advice in recipes"},[d.cookPlate]:{since:"1.3.0",baseBitType:d.article,description:"Cook plate bit, used to define the presentation of a dish"},[d.cookRecommendation]:{since:"1.3.0",baseBitType:d.article,description:"Cook recommendation bit, used to recommend dishes or ingredients"},[d.cookPersonalRecommendation]:{since:"1.3.0",baseBitType:d.article,description:"Cook personal recommendation bit, used to provide personal recommendations for dishes or ingredients"},[d.cookSideDrink]:{since:"1.3.0",baseBitType:d.article,description:"Cook side drink bit, used to define side drinks for dishes"},[d.cookSideDish]:{since:"1.3.0",baseBitType:d.article,description:"Cook side dish bit, used to define side dishes for main courses"},[d.cookTimer]:{since:"1.3.0",baseBitType:d.article,description:"Cook timer bit, used to set timers for cooking steps"},[d.document]:{since:"1.3.0",baseBitType:d._standard,description:"Document bit, used to define documents in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Tags for resource bits, used to categorize documents"},{key:fe.group_resourceDocument,description:"Tags for document resources, used to define documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[d.documentDownload]:{since:"1.3.0",baseBitType:d._standard,description:"Document download bit, used to define downloadable documents in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Tags for resource bits, used to categorize downloadable documents"},{key:fe.group_resourceDocumentDownload,description:"Tags for downloadable document resources, used to define downloadable documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[d.leDocumentDownload]:{since:"3.18.0",baseBitType:d.documentDownload,description:"LE Document download bit, used to define downloadable documents in learning experiences"},[d.documentEmbed]:{since:"1.3.0",baseBitType:d._standard,description:"Document embed bit, used to embed documents in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Tags for resource bits, used to categorize embedded documents"},{key:fe.group_resourceDocumentEmbed,description:"Tags for embedded document resources, used to define embedded documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[d.documentLink]:{since:"1.3.0",baseBitType:d._standard,description:"Document link bit, used to link to documents in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Tags for resource bits, used to categorize document links"},{key:fe.group_resourceDocumentLink,description:"Tags for document link resources, used to define links to documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[d.essay]:{since:"1.3.0",baseBitType:d._standard,description:"Essay bit, used to define essays in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common tags for quiz bits"},{key:fe.property_reasonableNumOfChars,description:"The reasonable number of characters for the essay",format:k,nullable:!0},{key:fe.property_sampleSolution,description:"Sample solution for the essay, used as a reference answer",format:y},{key:fe.property_partialAnswer,description:"Partial answer for the essay, used to indicate incomplete answers",format:y},{key:fe.property_reference,description:"Reference for the essay, used to link to external resources",format:y,maxCount:u},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the essay bit",format:b,nullable:!0}],rootExampleType:m},[d.coachSelfReflectionEssay]:{since:"1.3.0",baseBitType:d.essay,description:"Coach self-reflection essay bit"},[d.coachCallToActionEssay]:{since:"1.3.0",baseBitType:d.essay,description:"Coach call to action essay bit"},[d.example]:{since:"1.3.0",baseBitType:d._standard,description:"Example bit, used to provide examples in articles or books",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:fe.tag_title,description:"The title of the example"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the example bit",format:y,nullable:!0}],rootExampleType:m},[d.exampleAlt]:{since:"1.16.0",baseBitType:d.example,description:"Alternative example bit, used to provide alternative examples in articles or books"},[d.standardExampleNormative]:{since:"1.16.0",baseBitType:d.example,description:"Standard normative example bit, used to provide normative examples in articles or books"},[d.standardExampleNonNormative]:{since:"1.16.0",baseBitType:d.example,description:"Standard non-normative example bit, used to provide non-normative examples in articles or books"},[d.smartStandardExampleNormative]:{since:"1.28.0",baseBitType:d.standardExampleNormative,description:"Smart standard normative example bit, used to provide normative examples in smart standards"},[d.smartStandardExampleNonNormative]:{since:"1.28.0",baseBitType:d.standardExampleNonNormative,description:"Smart standard non-normative example bit, used to provide non-normative examples in smart standards"},[d.smartStandardExampleNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardExampleNormative,description:"Smart standard normative example collapsible bit, used to provide normative examples in smart standards that can be collapsed",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardExampleNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardExampleNonNormative,description:"Smart standard non-normative example collapsible bit, used to provide non-normative examples in smart standards that can be collapsed",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.authorContentBitGenerator]:{since:"4.2.0",baseBitType:d.article,description:"Body contains the content of one or more bits to be created by the bit generator",tags:[{key:fe.property_classification,description:"Classification for the created bits",format:y,maxCount:u}]},[d.appAiPrompt]:{since:"1.3.0",baseBitType:d.article,description:"App AI prompt bit, used to create AI prompts in the app editor"},[d.aiPrompt]:{since:"1.3.0",baseBitType:d.article,description:"AI prompt bit, used to create AI prompts in articles or books"},[d.aiChat]:{since:"4.2.0",baseBitType:d.article,description:"AI chat bit, used to create an AI chat"},[d.aiEditor]:{since:"4.2.0",baseBitType:d.article,description:"AI editor bit, used to create an AI editor"},[d.aiTutor]:{since:"4.2.0",baseBitType:d.article,description:"AI tutor bit, used to create an AI tutor"},[d.aiWbt]:{since:"4.2.0",baseBitType:d.article,description:"AI WBT bit, used to create an AI WBT (Web-Based Training)"},[d.articleAi]:{since:"1.3.0",baseBitType:d.article,description:"Article AI bit, used to create AI-generated articles",tags:[{key:fe.property_aiGenerated,description:"AI-generated flag, forced true for article-ai bits",format:x,defaultValue:"true",exportJsonKey:{aiGenerated:!0}}]},[d.articleAttachment]:{since:"1.3.0",baseBitType:d.article,description:"Article attachment bit, used to attach files to articles"},[d.assignment]:{since:"1.3.0",baseBitType:d.essay,description:"Assignment bit, used to define assignments in articles or books"},[d.audioTranscript]:{since:"1.3.0",baseBitType:d.article,description:"Audio transcript bit, used to provide transcripts for audio files in articles or books"},[d.bitmarkExample]:{since:"1.3.0",baseBitType:d.example,description:"Bitmark example bit, used to provide examples for bitmarks in articles or books"},[d.blogArticle]:{since:"1.3.0",baseBitType:d.article,description:"Blog article bit, used to define blog articles in articles or books"},[d.bug]:{since:"1.3.0",baseBitType:d.article,description:"Bug bit, used to report bugs in articles or books"},[d.bugAlt]:{since:"1.16.0",baseBitType:d.bug,description:"Alternative bug bit, used to report bugs in articles or books with alternative styling"},[d.checklist]:{since:"1.3.0",baseBitType:d.article,description:"Checklist bit, used to create checklists in articles or books"},[d.coachAudioTranscript]:{since:"1.3.0",baseBitType:d.article,description:"Coach audio transcript bit, used to provide transcripts for audio files in coaching articles or books"},[d.coachCallToActionChecklist]:{since:"1.3.0",baseBitType:d.article,description:"Coach call to action checklist bit, used to create checklists in coaching articles or books"},[d.coachHomeRules]:{since:"1.3.0",baseBitType:d.article,description:"Coach home rules bit, used to define home rules in coaching articles or books"},[d.coachVideoTranscript]:{since:"1.3.0",baseBitType:d.article,description:"Coach video transcript bit, used to provide transcripts for video files in coaching articles or books"},[d.correction]:{since:"1.3.0",baseBitType:d.article,description:"Correction bit, used to provide corrections in articles or books"},[d.danger]:{since:"1.3.0",baseBitType:d.article,description:"Danger bit, used to highlight dangerous or critical information in articles or books"},[d.dangerAlt]:{since:"1.16.0",baseBitType:d.article,description:"Alternative danger bit, used to highlight dangerous or critical information in articles or books with alternative styling"},[d.definitionTerm]:{since:"1.34.0",baseBitType:d.article,description:"Definition term bit, used to define terms in articles or books"},[d.deleted]:{since:"3.9.0",baseBitType:d.article,description:"Deleted bit, used to indicate deleted content in articles or books"},[d.details1]:{since:"1.3.0",baseBitType:d.article,description:"Details bit, used to provide additional details in articles or books"},[d.details]:{since:"1.3.0",baseBitType:d.article,description:"Details bit, used to provide additional details in articles or books"},[d.qAndA]:{since:"3.5.0",baseBitType:d.article,description:"Q&A bit, used to create question and answer sections in articles or books"},[d.editorial]:{since:"1.3.0",baseBitType:d.article,description:"Editorial bit, used to provide editorial content in articles or books"},[d.editorNote]:{since:"1.3.0",baseBitType:d.article,description:"Editor note bit, used to provide notes from the editor in articles or books"},[d.featured]:{since:"1.3.0",baseBitType:d.article,description:"Featured bit, used to highlight featured content in articles or books"},[d.glossaryTerm]:{since:"1.33.0",baseBitType:d.article,description:"Glossary term bit, used to define glossary terms in articles or books"},[d.help]:{since:"1.3.0",baseBitType:d.article,description:"Help bit, used to provide help or support information in articles or books"},[d.helpAlt]:{since:"1.16.0",baseBitType:d.help,description:"Alternative help bit, used to provide help or support information in articles or books with alternative styling"},[d.hint]:{since:"1.3.0",baseBitType:d.article,description:"Hint bit, used to provide hints or tips in articles or books"},[d.hintAlt]:{since:"1.16.0",baseBitType:d.hint,description:"Alternative hint bit, used to provide hints or tips in articles or books with alternative styling"},[d.indexTerm]:{since:"1.33.0",baseBitType:d.article,description:"Index term bit, used to define index terms in articles or books"},[d.info]:{since:"1.3.0",baseBitType:d.article,description:"Info bit, used to provide informational content in articles or books"},[d.infoAlt]:{since:"1.16.0",baseBitType:d.info,description:"Alternative info bit, used to provide informational content in articles or books with alternative styling"},[d.langLearningOutcomes]:{since:"1.3.0",baseBitType:d.article,description:"Language learning outcomes bit, used to define learning outcomes in language articles or books"},[d.langEnablingLanguageSkills]:{since:"1.3.0",baseBitType:d.article,description:"Language enabling skills bit, used to define enabling language skills in language articles or books"},[d.langLifeSkills]:{since:"1.3.0",baseBitType:d.article,description:"Language life skills bit, used to define life skills in language articles or books"},[d.langEnglishAroundWorld]:{since:"1.3.0",baseBitType:d.article,description:"Language English around the world bit, used to provide information about English usage around the world in language articles or books"},[d.langGoodToKnow]:{since:"1.3.0",baseBitType:d.article,description:"Language good to know bit, used to provide useful information in language articles or books"},[d.langLearningGoal]:{since:"1.3.0",baseBitType:d.article,description:"Language learning goal bit, used to define learning goals in language articles or books"},[d.langLearningStrategy]:{since:"1.3.0",baseBitType:d.article,description:"Language learning strategy bit, used to define learning strategies in language articles or books"},[d.langLikeALocal]:{since:"1.3.0",baseBitType:d.article,description:"Language like a local bit, used to provide tips for speaking like a local in language articles or books"},[d.langMaterial]:{since:"1.3.0",baseBitType:d.article,description:"Language material bit, used to provide language learning materials in language articles or books"},[d.langUsefulPhrases]:{since:"1.3.0",baseBitType:d.article,description:"Language useful phrases bit, used to provide useful phrases in language articles or books"},[d.langLevelDown]:{since:"1.3.0",baseBitType:d.article,description:"Language level down bit, used to provide information about lower language levels in language articles or books"},[d.langLevelUp]:{since:"1.3.0",baseBitType:d.article,description:"Language level up bit, used to provide information about higher language levels in language articles or books"},[d.langExtraActivity]:{since:"1.3.0",baseBitType:d.article,description:"Language extra activity bit, used to provide additional activities in language articles or books"},[d.langVideoScript]:{since:"1.3.0",baseBitType:d.article,description:"Language video script bit, used to provide scripts for language learning videos in articles or books"},[d.langAudioScript]:{since:"1.3.0",baseBitType:d.article,description:"Language audio script bit, used to provide scripts for language learning audio files in articles or books"},[d.langVocabulary]:{since:"1.3.0",baseBitType:d.article,description:"Language vocabulary bit, used to provide vocabulary lists in language articles or books"},[d.langHomework]:{since:"1.3.0",baseBitType:d.article,description:"Language homework bit, used to define homework assignments in language articles or books"},[d.langTeacherNote]:{since:"1.3.0",baseBitType:d.article,description:"Language teacher note bit, used to provide notes for teachers in language articles or books"},[d.langTeacherPronunciation]:{since:"1.3.0",baseBitType:d.article,description:"Language teacher pronunciation bit, used to provide pronunciation guidance for teachers in language articles or books"},[d.list]:{since:"1.22.0",baseBitType:d.article,description:"List bit, used to create lists in articles or books"},[d.standardList]:{since:"1.22.0",baseBitType:d.article,description:"Standard list bit, used to create standard lists in articles or books"},[d.smartStandardList]:{since:"1.28.0",baseBitType:d.standardList,description:"Smart standard list bit, used to create smart standard lists in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"ref-list","@attr":{id:"$customerId"},"▼":"$anchor"}}},[d.smartStandardListCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardList,description:"Smart standard list collapsible bit, used to create collapsible smart standard lists in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.message]:{since:"1.3.0",baseBitType:d.article,description:"Message bit, used to create messages in articles or books"},[d.newspaperArticle]:{since:"1.3.0",baseBitType:d.article,description:"Newspaper article bit, used to define newspaper articles in articles or books"},[d.note]:{since:"1.3.0",baseBitType:d.article,description:"Note bit, used to provide notes in articles or books"},[d.noteAlt]:{since:"1.16.0",baseBitType:d.note,description:"Alternative note bit, used to provide notes in articles or books with alternative styling"},[d.standardNoteNormative]:{since:"1.16.0",baseBitType:d.note,description:"Standard normative note bit, used to provide normative notes in articles or books"},[d.standardNoteNonNormative]:{since:"1.16.0",baseBitType:d.note,description:"Standard non-normative note bit, used to provide non-normative notes in articles or books"},[d.smartStandardNoteNormative]:{since:"1.28.0",baseBitType:d.standardNoteNormative,description:"Smart standard normative note bit, used to provide normative notes in smart standards"},[d.smartStandardNoteNonNormative]:{since:"1.28.0",baseBitType:d.standardNoteNonNormative,description:"Smart standard non-normative note bit, used to provide non-normative notes in smart standards",mappingKeys:{"xml-niso-iec":{"@el":"non-normative-note","@attr":{id:"$customerId"},"@children":"$","▼":"$anchor"}}},[d.smartStandardNoteNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardNoteNormative,description:"Smart standard normative note collapsible bit, used to provide normative notes in smart standards that can be collapsed",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardNoteNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardNoteNonNormative,description:"Smart standard non-normative note collapsible bit, used to provide non-normative notes in smart standards that can be collapsed",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.noteAi]:{since:"1.3.0",baseBitType:d.note,description:"Note AI bit, used to create AI-generated notes in articles or books",tags:[{key:fe.property_aiGenerated,description:"AI-generated flag, forced true for article-ai bits",format:x,defaultValue:"true",exportJsonKey:{aiGenerated:!0}}]},[d.notebookArticle]:{since:"1.3.0",baseBitType:d.article,description:"Notebook article bit, used to define notebook articles in articles or books"},[d.preparationNote]:{since:"1.3.0",baseBitType:d.article,description:"Preparation note bit, used to provide preparation notes in articles or books"},[d.printThisBook]:{since:"5.4.0",baseBitType:d._standard,description:"Print this book bit, used to create a button that prints the entire book",tags:[{key:fe.property_buttonCaption,description:"The caption of the print button",format:y}]},[d.printThisChapter]:{since:"5.4.0",baseBitType:d._standard,description:"Print this chapter bit, used to create a button that prints the current chapter",tags:[{key:fe.property_buttonCaption,description:"The caption of the print button",format:y},{key:fe.property_printParentChapterLevel,description:"The parent chapter level to print",format:k,defaultValue:"-1"}]},[d.printPageBreak]:{since:"5.4.0",baseBitType:d.separator,description:"Print page break bit, used to create page breaks for printing in articles or books"},[d.releaseNotesSummary]:{since:"1.3.0",baseBitType:d.article,description:"Release notes summary bit, used to summarize release notes in articles or books"},[d.remark]:{since:"1.3.0",baseBitType:d.article,description:"Remark bit, used to provide remarks in articles or books"},[d.remarkAlt]:{since:"1.16.0",baseBitType:d.remark,description:"Alternative remark bit, used to provide remarks in articles or books with alternative styling"},[d.standardRemarkNormative]:{since:"1.16.0",baseBitType:d.article,description:"Standard normative remark bit, used to provide normative remarks in articles or books"},[d.standardRemarkNonNormative]:{since:"1.16.0",baseBitType:d.article,description:"Standard non-normative remark bit, used to provide non-normative remarks in articles or books"},[d.smartStandardRemarkNormative]:{since:"1.28.0",baseBitType:d.standardRemarkNormative,description:"Smart standard normative remark bit, used to provide normative remarks in smart standards"},[d.smartStandardRemarkNonNormative]:{since:"1.28.0",baseBitType:d.standardRemarkNonNormative,description:"Smart standard non-normative remark bit, used to provide non-normative remarks in smart standards",mappingKeys:{"xml-niso-iec":{"@el":"non-normative-note","@attr":{"content-type":"warning|caution",id:"$customerId"},"@children":"$","▼":"$anchor"}}},[d.smartStandardRemarkNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardRemarkNormative,description:"Smart standard normative remark collapsible bit, used to provide normative remarks in smart standards that can be collapsed",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardRemarkNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardRemarkNonNormative,description:"Smart standard non-normative remark collapsible bit, used to provide non-normative remarks in smart standards that can be collapsed",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.selfAssessment]:{since:"1.3.0",baseBitType:d.article,description:"Self-assessment bit, used to create self-assessment sections in articles or books"},[d.separator]:{since:"1.4.15",baseBitType:d.article,description:"Separator bit, used to create visual separators in articles or books"},[d.separatorAlt]:{since:"1.16.0",baseBitType:d.separator,description:"Alternative separator bit, used to create visual separators in articles or books with alternative styling"},[d.sticker]:{since:"1.5.28",baseBitType:d.article,description:"Sticker bit, used to create stickers in articles or books"},[d.sideNote]:{since:"1.3.0",baseBitType:d.article,description:"Side note bit, used to provide side notes in articles or books"},[d.summary]:{since:"1.3.0",baseBitType:d.article,description:"Summary bit, used to provide summaries in articles or books"},[d.summaryAi]:{since:"1.3.0",baseBitType:d.summary,description:"AI-generated summary bit",tags:[{key:fe.property_aiGenerated,description:"AI-generated flag, forced true for article-ai bits",format:x,defaultValue:"true",exportJsonKey:{aiGenerated:!0}}]},[d.videoTranscript]:{since:"1.3.0",baseBitType:d.article,description:"Video transcript bit, used to provide transcripts for video files in articles or books"},[d.warning]:{since:"1.3.0",baseBitType:d.article,description:"Warning bit, used to highlight warnings in articles or books"},[d.warningAlt]:{since:"1.16.0",baseBitType:d.warning,description:"Alternative warning bit, used to highlight warnings in articles or books with alternative styling"},[d.workbookArticle]:{since:"1.3.0",baseBitType:d.article,description:"Workbook article bit, used to define workbook articles in articles or books"},[d.collapsible]:{since:"1.21.0",deprecated:"5.37.0",baseBitType:d.article,description:"Collapsible bit, used to create collapsible sections in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.sideNoteCollapsible]:{since:"1.21.0",deprecated:"5.37.0",baseBitType:d.sideNote,description:"Side note collapsible bit, used to create collapsible side notes in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.infoCollapsible]:{since:"1.21.0",deprecated:"5.37.0",baseBitType:d.info,description:"Info collapsible bit, used to create collapsible informational sections in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.remarkCollapsible]:{since:"1.21.0",deprecated:"5.37.0",baseBitType:d.remark,description:"Remark collapsible bit, used to create collapsible remarks in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.warningCollapsible]:{since:"1.21.0",deprecated:"5.37.0",baseBitType:d.warning,description:"Warning collapsible bit, used to create collapsible warnings in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.dangerCollapsible]:{since:"1.21.0",deprecated:"5.37.0",baseBitType:d.danger,description:"Danger collapsible bit, used to create collapsible danger sections in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.noteCollapsible]:{since:"1.21.0",deprecated:"5.37.0",baseBitType:d.note,description:"Note collapsible bit, used to create collapsible notes in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.exampleCollapsible]:{since:"1.21.0",deprecated:"5.37.0",baseBitType:d.example,description:"Example collapsible bit, used to create collapsible examples in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.hintCollapsible]:{since:"1.21.0",deprecated:"5.37.0",baseBitType:d.hint,description:"Hint collapsible bit, used to create collapsible hints in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.bugCollapsible]:{since:"1.21.0",deprecated:"5.37.0",baseBitType:d.bug,description:"Bug collapsible bit, used to create collapsible bug reports in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.platformPath]:{since:"3.14.1",baseBitType:d._standard,description:"Platform path bit, used to define paths in the platform",tags:[{key:fe.property_path,description:"The path for the platform, used to define navigation paths",format:y}]},[d.appCalculatorLatex]:{since:"4.10.0",baseBitType:d.article,description:"A LaTeX calculator bit, used to create a calculator that can interpret LaTeX expressions",tags:[{key:fe.property_formula,description:"The LaTeX formula for the calculator, used to define the calculation logic",format:y}]},[d.container]:{since:"1.9.0",baseBitType:d.article,description:"Container bit, used to group bits together in articles or books",tags:[{key:fe.property_allowedBit,description:"Allowed bits in the container, used to define which bits can be placed inside",format:y,maxCount:u}]},[d.containerWrap]:{since:"1.9.0",baseBitType:d.container,description:"Container wrap bit, used to wrap content in a container"},[d.containerNowrap]:{since:"1.9.0",baseBitType:d.container,description:"Container nowrap bit, used to prevent wrapping of content in a container"},[d.containerNowrapStretch]:{since:"1.9.0",baseBitType:d.container,description:"Container nowrap stretch bit, used to stretch content without wrapping in a container"},[d.containerGroup]:{since:"1.9.0",baseBitType:d.container,description:"Container group bit, used to group multiple containers together"},[d.containerFolder]:{since:"1.9.0",baseBitType:d.container,description:"Container folder bit, used to create folders for organizing bits"},[d.containerCarousel]:{since:"1.11.0",baseBitType:d.container,description:"Container carousel bit, used to create carousels for displaying bits"},[d.containerCards]:{since:"1.11.0",baseBitType:d.container,description:"Container cards bit, used to create card layouts for displaying bits"},[d.containerGrid]:{since:"1.11.0",baseBitType:d.container,description:"Container grid bit, used to create grid layouts for displaying bits"},[d.containerStack]:{since:"1.11.0",baseBitType:d.container,description:"Container stack bit, used to create stacked layouts for displaying bits"},[d.containerSlides]:{since:"1.11.0",baseBitType:d.container,description:"Container slides bit, used to create slide presentations for displaying bits"},[d.containerGallery]:{since:"1.11.0",baseBitType:d.container,description:"Container gallery bit, used to create galleries for displaying bits"},[d.containerScroller]:{since:"1.11.0",baseBitType:d.container,description:"Container scroller bit, used to create scrolling sections for displaying bits"},[d.containerTabs]:{since:"1.11.0",baseBitType:d.container,description:"Container tabs bit, used to create tabbed sections for displaying bits"},[d.containerAccordionTabs]:{since:"1.11.0",baseBitType:d.container,description:"Container accordion tabs bit, used to create accordion-style tabbed sections for displaying bits"},[d.containerFolderAll]:{since:"1.11.0",baseBitType:d.container,description:"Container folder all bit, used to create folders that can contain all types of bits"},[d.containerBits2]:{since:"1.11.0",baseBitType:d.container,description:"Container bits 2 bit, used to create a container for bits with additional features"},[d.containerCookRecipe]:{since:"1.11.0",baseBitType:d.container,description:"Container cook recipe bit, used to create recipe containers for displaying cooking recipes"},[d.containerNewsArticle]:{since:"1.11.0",baseBitType:d.container,description:"Container news article bit, used to create containers for news articles"},[d.containerPreview]:{since:"1.11.0",baseBitType:d.container,description:"Container preview bit, used to create preview sections for displaying bits"},[d.pageContainer]:{since:"1.9.0",baseBitType:d.container,description:"Page container bit, used to create containers for pages in articles or books"},[d.pageContainerWrap]:{since:"1.9.0",baseBitType:d.pageContainer,description:"Page container wrap bit, used to wrap content in a page container"},[d.pageContainerNowrap]:{since:"1.9.0",baseBitType:d.pageContainer,description:"Page container nowrap bit, used to prevent wrapping of content in a page container"},[d.pageContainerNowrapStretch]:{since:"1.9.0",baseBitType:d.pageContainer,description:"Page container nowrap stretch bit, used to stretch content without wrapping in a page container"},[d.pageContainerFolder]:{since:"1.9.0",baseBitType:d.pageContainer,description:"Page container folder bit, used to create folders for organizing bits in a page container"},[d.pageContainerGroup]:{since:"1.9.0",baseBitType:d.pageContainer,description:"Page container group bit, used to group multiple page containers together"},[d.metalevelExplanation]:{since:"1.10.0",baseBitType:d.article,description:"Metalevel explanation bit, used to provide explanations for metalevels in articles or books"},[d.module]:{since:"1.5.26",baseBitType:d.article,description:"Module bit, used to define modules in articles or books",tags:[{key:fe.property_hasBookNavigation,description:"Indicates if the module has book navigation",format:x,defaultValue:"true"},{key:fe.property_productId,description:"Product ID for the module, used to link to a specific product",format:y,minCount:1,maxCount:u},{key:fe.property_duration,description:"Duration of the module, used to indicate how long it takes to complete",format:y}]},[d.moduleProduct]:{since:"1.9.0",baseBitType:d.module,description:"Module product bit, used to define products in modules",tags:[{key:fe.property_productId,description:"Product ID for the module product, used to link to a specific product",format:y,minCount:1,maxCount:1}]},[d.exampleList]:{since:"1.4.13",baseBitType:d.example,description:"Example list bit, used to create lists of examples in articles or books",cardSet:q,rootExampleType:m},[d.extractorPage]:{since:"1.5.17",baseBitType:d.image,description:"Extractor page bit, used to extract pages from images"},[d.extractorPageCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:d.extractorPage,description:"Collapsible extractor page bit, used to extract pages from images with collapsible functionality",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.extractorPageWithBlocks]:{since:"1.5.21",baseBitType:d.image,description:"Extractor page with blocks bit, used to extract pages with blocks from images"},[d.extractorPageWithBlocksCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:d.extractorPageWithBlocks,description:"Collapsible extractor page with blocks bit, used to extract pages with blocks from images with collapsible functionality",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.extractorConfiguration]:{since:"1.7.1",baseBitType:d._standard,description:"Extractor configuration bit, used to configure extractors in articles or books",textFormatDefault:C.plainText},[d.extractorBlueprintConfiguration]:{since:"5.11.0",baseBitType:d._standard,description:"Extractor blueprint configuration bit, used to specify extractor blueprint configuration when extracting from blueprints",textFormatDefault:C.plainText},[d.extractorImage]:{since:"4.3.0",baseBitType:d._standard,description:"Extractor images bit, used for images extracted from PDFs",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for logo grave images, used to define additional properties"},{key:fe.group_resourceImageNoZoom,description:"Resource image tags for logo grave images, used to attach images",exportJsonKey:{images:[{type:"image",image:{src:"$"}}]},minCount:1,maxCount:u}],resourceAttachmentAllowed:!1,textFormatDefault:C.plainText},[d.extractorImageCollapsible]:{since:"4.3.0",deprecated:"5.37.0",baseBitType:d.extractorImage,description:"Collapsible extractor images bit, used for images extracted from PDFs",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.extractorBlueprint]:{since:"5.12.0",baseBitType:d._standard,description:"Extractor blueprint bit, used to provide blueprint information about extractors",textFormatDefault:C.json,tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for the blueprint reference image"},{key:fe.group_resourceImage,description:"Optional uncropped reference page image, used so authoring tools can compute crops against the original page dimensions"}],resourceAttachmentAllowed:!1},[d.extractorInformation]:{since:"3.8.0",baseBitType:d._standard,description:"Extractor information bit, used to provide information about extractors in articles or books",textFormatDefault:C.json},[d.extractorTheme]:{since:"5.7.0",baseBitType:d._standard,description:"Extractor theme bit, used to store design/theme JSON extracted from documents",textFormatDefault:C.json},[d.extractorReconcile]:{since:"5.35.0",baseBitType:d._standard,description:"Extractor reconcile bit, used to store PDF-compare reconciliation decisions (config and issues) in JSON",textFormatDefault:C.json},[d.extractorAiChat]:{since:"3.19.0",baseBitType:d._standard,description:"Extractor AI chat bit, used to create AI chat interfaces for extractors in articles or books"},[d.extractorBlock]:{since:"1.5.16",baseBitType:d._standard,description:"Extractor block bit, used to define blocks within extractor pages",tags:[{key:fe.property_blockId,description:"Unique identifier for the block, used to reference the block in extractor pages",format:y},{key:fe.property_pageNo,description:"Page number for the block, used to indicate the page on which the block appears",format:k,nullable:!0},{key:fe.property_x,description:"X-coordinate for the block, used to position the block on the page",format:k,nullable:!0},{key:fe.property_y,description:"Y-coordinate for the block, used to position the block on the page",format:k,nullable:!0},{key:fe.property_width,description:"Width of the block, used to define the size of the block on the page",format:k,nullable:!0},{key:fe.property_height,description:"Height of the block, used to define the size of the block on the page",format:k,nullable:!0},{key:fe.property_index,description:"Index of the block, used to order blocks within the extractor page",format:k,nullable:!0},{key:fe.property_classification,description:"Classification for the block, used to categorize the block within the extractor",format:y},{key:fe.property_availableClassifications,description:"Available classifications for the block, used to define possible classifications",format:y,maxCount:u},{key:fe.group_resourceImage,description:"Resource image for the block, used to attach images to the block",minCount:1}],resourceAttachmentAllowed:!1},[d.extractorRepeatedText]:{since:"1.5.21",baseBitType:d.article,description:"Extractor repeated text bit, used to define repeated text in extractor pages"},[d.extractorRule]:{since:"5.17.0",baseBitType:d._standard,description:"Extractor rule bit, used to define extraction rules with reference images and instructions",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for extraction rule images"},{key:fe.group_resourceImage,description:"Resource image tags for the rule reference image",minCount:1}],resourceAttachmentAllowed:!1,textFormatDefault:C.plainText},[d.extractorPageNumber]:{since:"1.5.21",baseBitType:d.article,description:"Extractor page number bit, used to define page numbers in extractor pages"},[d.extractorPageNumberCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:d.extractorPageNumber,description:"Collapsible extractor page number bit, used to define page numbers in extractor pages with collapsible functionality",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.extractorPageHeader]:{since:"1.5.21",baseBitType:d.article,description:"Extractor page header bit, used to define headers in extractor pages"},[d.extractorPageHeaderCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:d.extractorPageHeader,description:"Collapsible extractor page header bit, used to define headers in extractor pages with collapsible functionality",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.extractorPageFooter]:{since:"1.5.21",baseBitType:d.article,description:"Extractor page footer bit, used to define footers in extractor pages"},[d.extractorPageFooterCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:d.extractorPageFooter,description:"Collapsible extractor page footer bit, used to define footers in extractor pages with collapsible functionality",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.pageOpenBook]:{since:"1.5.10",baseBitType:d.article,description:"Page open book bit, used to create pages that open books in articles or books",tags:[{key:fe.property_slug,description:"Slug for the book, used to identify the book in the system",format:y},{key:fe.property_book,description:"Book reference for the page, used to link to a specific book",format:y,chain:[{exportJsonKey:{reference:"$"},key:fe.tag_reference,format:y,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:fe.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:y,description:"End reference tag for the book, used to specify a range",maxCount:1}]}]},{exportJsonKey:{reference:"$"},key:fe.tag_reference,format:y,description:"Reference tag for the book, used to link to the book in the system"},{key:fe.property_buttonCaption,description:"Caption for the button, used to define the text displayed on the button"},{key:fe.property_authorFullName,description:"Full name of the author",format:y},{key:fe.property_authorPseudonym,description:"A pseudonym of the author, if any",format:y},{key:fe.property_authorTitle,description:'The title of the author, e.g. "Dr.", "Prof.", etc.',format:y},{key:fe.property_authorJobTitle,description:'The job title of the author, e.g. "Software Engineer", "Professor", etc.',format:y}]},[d.printBook]:{since:"5.5.0",baseBitType:d.article,description:"Print book bit, used to create pages that open books without author information in articles or books",tags:[{key:fe.property_slug,description:"Slug for the book, used to identify the book in the system",format:y},{key:fe.property_book,description:"Book reference for the page, used to link to a specific book",format:y,chain:[{exportJsonKey:{reference:"$"},key:fe.tag_reference,format:y,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:fe.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:y,description:"End reference tag for the book, used to specify a range",maxCount:1}]}]},{exportJsonKey:{reference:"$"},key:fe.tag_reference,format:y,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:fe.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:y,description:"End reference tag for the book, used to specify a range",maxCount:1}]},{key:fe.property_buttonCaption,description:"Caption for the button, used to define the text displayed on the button"}]},[d.openBookChapter]:{since:"4.16.0",baseBitType:d.pageOpenBook,description:"Open book chapter bit, derived from page-open-book, used to create chapter pages that open books"},[d.openBookChapterTeaser]:{since:"4.16.0",baseBitType:d.openBookChapter,description:"Open book chapter teaser bit, equal to open-book-chapter, used to create teaser chapter pages that open books"},[d.pageOpenBookList]:{since:"2.1.0",baseBitType:d.article,description:"Page open book list bit, used to create pages that open lists of books in articles or books",tags:[{key:fe.property_book,exportJsonKey:{book:[{book:"$"}]},description:"Book reference for the page, used to link to a specific book",maxCount:u,chain:[{exportJsonKey:{reference:"$"},key:fe.tag_reference,format:y,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:fe.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:y,description:"End reference tag for the book, used to specify a range",maxCount:1}]}]},{key:fe.property_buttonCaption,description:"Caption for the button, used to define the text displayed on the button",format:y}]},[d.pageSubscribe]:{since:"1.5.10",baseBitType:d.article,description:"Page subscribe bit, used to create pages that allow users to subscribe to content",tags:[{key:fe.property_slug,description:"Slug for the subscription page, used to identify the page in the system",format:y},{key:fe.property_buttonCaption,description:"Caption for the subscription button, used to define the text displayed on the button",format:y},{key:fe.property_mailingList,description:"Mailing list for the subscription, used to link to a specific mailing list",format:y}]},[d.assignmentList]:{since:"1.4.13",baseBitType:d.exampleList,description:"Assignment list bit, used to create lists of assignments in articles or books"},[d.pageFooter]:{since:"1.4.13",baseBitType:d.article,description:"Page footer bit, used to create footers in articles or books",tags:[{key:fe.property_slug,description:"Slug for the footer, used to identify the footer in the system",format:y}],cardSet:M},[d.legend]:{since:"3.12.0",baseBitType:d._standard,description:"Legend bit, used to provide legends in articles or books",cardSet:B},[d.smartStandardLegend]:{since:"3.12.0",baseBitType:d.legend,description:"Smart standard legend bit, used to provide smart standard legends in articles or books"},[d.smartStandardLegendNonNormative]:{since:"3.12.0",baseBitType:d.legend,description:"Smart standard non-normative legend bit, used to provide non-normative smart standard legends in articles or books"},[d.smartStandardLegendNormative]:{since:"3.12.0",baseBitType:d.legend,description:"Smart standard normative legend bit, used to provide normative smart standard legends in articles or books",mappingKeys:{"xml-niso-iec":[{"@el":"legend","@attr":{id:"$customerId"},"▼":"$anchor"},{"@el":"def-list","@attr":{id:"$customerId"},"▼":"$anchor"}]}},[d.smartStandardRemarkLegend]:{since:"3.12.0",baseBitType:d.legend,description:"Smart standard remark legend bit, used to provide smart standard remarks in legends"},[d.smartStandardRemarkLegendNonNormative]:{since:"3.12.0",baseBitType:d.legend,description:"Smart standard non-normative remark legend bit, used to provide non-normative smart standard remarks in legends"},[d.smartStandardRemarkLegendNormative]:{since:"3.12.0",baseBitType:d.legend,description:"Smart standard normative remark legend bit, used to provide normative smart standard remarks in legends"},[d.definitionList]:{since:"1.34.0",baseBitType:d._standard,description:"Definition list bit, used to create lists of definitions in articles or books",tags:[{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}],cardSet:B},[d.definitionListCollapsible]:{since:"5.25.0",deprecated:"5.37.0",baseBitType:d.definitionList,description:"Collapsible definition list bit, used to create collapsible lists of definitions in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.standardDefinitionListNormative]:{since:"5.24.0",baseBitType:d.definitionList,description:"Standard normative definition list bit, used to create normative standard definition lists in articles or books"},[d.standardDefinitionListNonNormative]:{since:"5.24.0",baseBitType:d.definitionList,description:"Standard non-normative definition list bit, used to create non-normative standard definition lists in articles or books"},[d.smartStandardDefinitionListNormative]:{since:"5.24.0",baseBitType:d.standardDefinitionListNormative,description:"Smart standard normative definition list bit, used to create normative smart standard definition lists in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"term-sec","@attr":{id:"$customerId"},"▼":"$anchor"}}},[d.smartStandardDefinitionListNonNormative]:{since:"5.24.0",baseBitType:d.standardDefinitionListNonNormative,description:"Smart standard non-normative definition list bit, used to create non-normative smart standard definition lists in articles or books"},[d.metaSearchDefaultTerms]:{since:"3.12.0",baseBitType:d._standard,description:"Meta search default terms bit, used to define default search terms in articles",cardSet:S},[d.metaSearchDefaultTopics]:{since:"3.12.0",baseBitType:d.metaSearchDefaultTerms,description:"Meta search default topics bit, used to define default search topics in articles"},[d.flashcard]:{since:"1.3.0",baseBitType:d._standard,description:"Flashcard bit, used to create flashcards in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for flashcards"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}],cardSet:w},[d.flashcard1]:{since:"1.3.0",baseBitType:d.flashcard,description:"Flashcard 1 bit",cardSet:A},[d.qAndACard]:{since:"3.25.0",baseBitType:d.flashcard1,description:"Q&A card bit, used to create question and answer cards in articles or books",cardSet:w},[d.focusImage]:{since:"1.3.0",baseBitType:d.image,description:"Focus image bit, used to create images with focus points in articles or books",tags:[{key:fe.property_focusX,description:"X-coordinate for the focus point, used to define the focus area in the image",format:k,nullable:!0},{key:fe.property_focusY,description:"Y-coordinate for the focus point, used to define the focus area in the image",format:k,nullable:!0}]},[d.highlightText]:{since:"1.3.0",baseBitType:d._standard,description:"Highlight text bit, used to create highlighted text in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for highlighted text"},{key:fe.group_trueFalseInlineHighlight,description:"True/False quiz tags for highlighted text (inline body nodes)"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}]},[d.image]:{since:"1.3.0",baseBitType:d._standard,description:"Image bit, used to create images in articles or books",tags:[{key:fe.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:fe.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:fe.group_resourceImage,description:"Resource image tags for images, used to attach images to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.appCreateBitsFromImage]:{since:"1.3.0",baseBitType:d.image,description:"App create bits from image bit, used to create bits from images in the app"},[d.appGetScreenshot]:{since:"1.3.0",baseBitType:d.image,description:"App get screenshot bit, used to capture screenshots in the app"},[d.detailsImage]:{since:"1.3.0",baseBitType:d.image,description:"Details image bit, used to create detailed images in articles or books"},[d.figure]:{since:"1.3.0",baseBitType:d.image,description:"Figure bit, used to create figures in articles or books",cardSet:B},[d.imageBanner]:{since:"1.3.0",baseBitType:d.image,description:"Image banner bit, used to create banners in articles or books"},[d.imageFigure]:{since:"1.3.0",baseBitType:d.image,description:"Image figure bit, used to create figures with images in articles or books",cardSet:B},[d.imageFigureAlt]:{since:"1.16.0",baseBitType:d.imageFigure,description:"Alternative image figure bit, used to create figures with alternative images in articles or books"},[d.standardImageFigureNormative]:{since:"1.16.0",baseBitType:d.imageFigure,description:"Standard normative image figure bit, used to create normative image figures in articles or books"},[d.standardImageFigureNonNormative]:{since:"1.16.0",baseBitType:d.imageFigure,description:"Standard non-normative image figure bit, used to create non-normative image figures in articles or books"},[d.smartStandardImageFigureNormative]:{since:"1.28.0",baseBitType:d.standardImageFigureNormative,description:"Smart standard normative image figure bit, used to create smart standard normative image figures in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"fig","@attr":{id:"$customerId"},"▼":"$anchor"}}},[d.smartStandardImageFigureNonNormative]:{since:"1.28.0",baseBitType:d.standardImageFigureNonNormative,description:"Smart standard non-normative image figure bit, used to create smart standard non-normative image figures in articles or books"},[d.smartStandardImageFigureNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardImageFigureNormative,description:"Collapsible smart standard normative image figure bit, used to create collapsible smart standard normative image figures in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardImageFigureNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardImageFigureNonNormative,description:"Collapsible smart standard non-normative image figure bit, used to create collapsible smart standard non-normative image figures in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.imageLandscape]:{since:"1.3.0",baseBitType:d.image,description:"Image landscape bit, used to create landscape images in articles or books"},[d.imageMood]:{since:"1.3.0",baseBitType:d.image,description:"Image mood bit, used to create mood images in articles or books"},[d.imagePortrait]:{since:"1.3.0",baseBitType:d.image,description:"Image portrait bit, used to create portrait images in articles or books"},[d.imagePrototype]:{since:"1.3.0",baseBitType:d.image,description:"Image prototype bit, used to create prototype images in articles or books"},[d.imageSeparator]:{since:"1.4.15",baseBitType:d._standard,description:"Image separator bit, used to create separators in articles or books",tags:[{key:fe.group_imageNoZoom,description:"Image no zoom tags for images, used to define whether images should have zoom functionality"}],resourceAttachmentAllowed:!1},[d.imageSeparatorAlt]:{since:"1.16.0",baseBitType:d.imageSeparator,description:"Alternative image separator bit, used to create alternative separators in articles or books"},[d.imageScreenshot]:{since:"1.3.0",baseBitType:d.image,description:"Image screenshot bit, used to create screenshots in articles or books"},[d.imageStyled]:{since:"1.3.0",baseBitType:d.image,description:"Image styled bit, used to create styled images in articles or books"},[d.imageSuperWide]:{since:"1.3.0",baseBitType:d.image,description:"Image super wide bit, used to create super wide images in articles or books"},[d.imageZoom]:{since:"1.3.0",baseBitType:d.image,description:"Image zoom bit, used to create zoomable images in articles or books"},[d.langLifeSkillIcon]:{since:"1.3.0",baseBitType:d.image,description:"Language life skill icon bit, used to create icons for life skills in articles or books"},[d.lifeSkillSticker]:{since:"1.3.0",baseBitType:d.image,description:"Life skill sticker bit, used to create stickers for life skills in articles or books"},[d.pageBanner]:{since:"1.4.3",baseBitType:d._standard,description:"Page banner bit, used to create banners for pages in articles or books",tags:[{key:fe.property_slug,description:"Slug for the page banner, used to identify the banner in the system",format:y},{key:fe.group_imageNoZoom,description:"Image no zoom tags for images, used to define whether images should have zoom functionality"}],resourceAttachmentAllowed:!1},[d.pageHero]:{since:"1.11.0",baseBitType:d.pageBanner,description:"Page hero bit, used to create hero sections in articles or books"},[d.screenshot]:{since:"1.3.0",deprecated:"1.4.0",baseBitType:d.image,description:"Screenshot bit, used to create screenshots in articles or books"},[d.tableImage]:{since:"1.5.15",baseBitType:d.tableExtended,description:"Table image bit, used to create images in tables in articles or books",tags:[{key:fe.property_caption,description:"Caption for the table image, used to provide a description for the image",format:b,htmlKey:{"@el":"caption","@children":"$"}},{key:fe.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:fe.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:fe.group_resourceImage,description:"Resource image tags for images, used to attach images to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.tableImageAlt]:{since:"1.16.0",baseBitType:d.tableImage,description:"Alternative table image bit, used to create alternative images in tables in articles or books"},[d.standardTableImageNormative]:{since:"1.16.0",baseBitType:d.tableImage,description:"Standard normative table image bit, used to create normative images in tables in articles or books"},[d.standardTableImageNonNormative]:{since:"1.16.0",baseBitType:d.tableImage,description:"Standard non-normative table image bit, used to create non-normative images in tables in articles or books"},[d.standardRemarkTableImageNormative]:{since:"1.17.0",baseBitType:d.tableImage,description:"Standard normative remark table image bit, used to create normative remark images in tables in articles or books"},[d.standardRemarkTableImageNonNormative]:{since:"1.17.0",baseBitType:d.tableImage,description:"Standard non-normative remark table image bit, used to create non-normative remark images in tables in articles or books"},[d.standardTableExtendedImageNormative]:{since:"1.16.0",baseBitType:d.tableExtendedImage,description:"Standard normative extended table image bit, used to create normative extended images in tables in articles or books"},[d.standardTableExtendedImageNonNormative]:{since:"1.16.0",baseBitType:d.tableExtendedImage,description:"Standard non-normative extended table image bit, used to create non-normative extended images in tables in articles or books"},[d.standardRemarkTableExtendedImageNormative]:{since:"1.17.0",baseBitType:d.tableExtendedImage,description:"Standard normative remark extended table image bit, used to create normative remark extended images in tables in articles or books"},[d.standardRemarkTableExtendedImageNonNormative]:{since:"1.17.0",baseBitType:d.tableExtendedImage,description:"Standard non-normative remark extended table image bit, used to create non-normative remark extended images in tables in articles or books"},[d.smartStandardTableImageNormative]:{since:"1.28.0",baseBitType:d.standardTableImageNormative,description:"Smart standard normative table image bit, used to create smart standard normative images in tables in articles or books"},[d.smartStandardTableImageNonNormative]:{since:"1.28.0",baseBitType:d.standardTableImageNonNormative,description:"Smart standard non-normative table image bit, used to create smart standard non-normative images in tables in articles or books"},[d.smartStandardRemarkTableImageNormative]:{since:"1.28.0",baseBitType:d.standardRemarkTableImageNormative,description:"Smart standard normative remark table image bit, used to create smart standard normative remark images in tables in articles or books"},[d.smartStandardRemarkTableImageNonNormative]:{since:"1.28.0",baseBitType:d.standardRemarkTableImageNonNormative,description:"Smart standard non-normative remark table image bit, used to create smart standard non-normative remark images in tables in articles or books"},[d.smartStandardTableExtendedImageNormative]:{since:"1.28.0",baseBitType:d.standardTableExtendedImageNormative,description:"Smart standard normative extended table image bit, used to create smart standard normative extended images in tables in articles or books"},[d.smartStandardTableExtendedImageNonNormative]:{since:"1.28.0",baseBitType:d.standardTableExtendedImageNonNormative,description:"Smart standard non-normative extended table image bit, used to create smart standard non-normative extended images in tables in articles or books"},[d.smartStandardRemarkTableExtendedImageNormative]:{since:"1.28.0",baseBitType:d.standardRemarkTableExtendedImageNormative,description:"Smart standard normative remark extended table image bit, used to create smart standard normative remark extended images in tables in articles or books"},[d.smartStandardRemarkTableExtendedImageNonNormative]:{since:"1.28.0",baseBitType:d.standardRemarkTableExtendedImageNonNormative,description:"Smart standard non-normative remark extended table image bit, used to create smart standard non-normative remark extended images in tables in articles or books"},[d.smartStandardTableImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardTableImageNormative,description:"Collapsible smart standard normative table image bit, used to create collapsible smart standard normative images in tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardTableImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardTableImageNonNormative,description:"Collapsible smart standard non-normative table image bit, used to create collapsible smart standard non-normative images in tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardRemarkTableImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardRemarkTableImageNormative,description:"Collapsible smart standard normative remark table image bit, used to create collapsible smart standard normative remark images in tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardRemarkTableImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardRemarkTableImageNonNormative,description:"Collapsible smart standard non-normative remark table image bit, used to create collapsible smart standard non-normative remark images in tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardTableExtendedImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardTableExtendedImageNormative,description:"Collapsible smart standard normative extended table image bit, used to create collapsible smart standard normative extended images in tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardTableExtendedImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardTableExtendedImageNonNormative,description:"Collapsible smart standard non-normative extended table image bit, used to create collapsible smart standard non-normative extended images in tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardRemarkTableExtendedImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardRemarkTableExtendedImageNormative,description:"Collapsible smart standard normative remark extended table image bit, used to create collapsible smart standard normative remark extended images in tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardRemarkTableExtendedImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardRemarkTableExtendedImageNonNormative,description:"Collapsible smart standard non-normative remark extended table image bit, used to create collapsible smart standard non-normative remark extended images in tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.imageLink]:{since:"1.3.0",baseBitType:d._standard,description:"Image link bit, used to create links with images in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for image links, used to define additional properties"},{key:fe.group_resourceImageLink,description:"Resource image link tags, used to attach images to the link",minCount:1}],resourceAttachmentAllowed:!1},[d.imageOnDevice]:{since:"1.3.0",baseBitType:d._standard,description:"Image on device bit, used to create images stored on the device in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for images on device, used to define additional properties"},{key:fe.group_resourceImage,description:"Resource image tags for images on device, used to attach images"},{key:fe.group_imageSource,description:"Image source tags for images on device, used to define the source of the image"}],resourceAttachmentAllowed:!1},[d.imageResponsive]:{since:"1.3.0",baseBitType:d._standard,description:"Responsive image bit, used to create responsive images in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for responsive images, used to define additional properties"},{key:fe.group_resourceImageResponsive,description:"Resource image responsive tags, used to attach responsive images"}],resourceAttachmentAllowed:!1},[d.imagesLogoGrave]:{since:"1.5.11",baseBitType:d._standard,description:"Logo grave images bit, used to create logo grave images in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for logo grave images, used to define additional properties"},{key:fe.group_resourceImageNoZoom,description:"Resource image tags for logo grave images, used to attach images",exportJsonKey:{logos:[{type:"image",image:{src:"$"}}]},minCount:1,maxCount:u}],resourceAttachmentAllowed:!1},[d.prototypeImages]:{since:"1.6.1",baseBitType:d.imagesLogoGrave,description:"Prototype images bit, used to create prototype images in articles or books",tags:[{key:fe.group_resourceImageNoZoom,description:"Resource image tags for prototype images",exportJsonKey:{images:[{type:"image",image:{src:"$"}}]},minCount:1,maxCount:u}]},[d.internalLink]:{since:"1.3.0",baseBitType:d._standard,description:"Internal link bit, used to create links to other bits in articles or books",tags:[{exportJsonKey:{reference:"$"},key:fe.tag_reference,format:y,description:"Reference tag for the internal link, used to link to the target bit"}]},[d.interview]:{since:"1.3.0",baseBitType:d._standard,description:"Interview bit, used to create interviews in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for interviews"},{key:fe.property_reasonableNumOfChars,exportJsonKey:{},description:"Reasonable number of characters for the interview, used to limit input size",format:k},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}],cardSet:N},[d.interviewInstructionGrouped]:{since:"1.3.0",baseBitType:d.interview,description:"Grouped interview instruction bit"},[d.botInterview]:{since:"1.3.0",baseBitType:d.interview,description:"Bot interview bit, used to create bot interviews in articles or books"},[d.brandColor]:{since:"4.12.0",baseBitType:d._standard,description:"Brand color bit, used to define brand colors",tags:[{key:fe.property_brandColor,description:"The brand color",format:y},{key:fe.property_brandColorName,description:"The brand color name",format:y}]},[d.learningPathBook]:{since:"1.3.0",baseBitType:d._standard,description:"Learning path book bit, used to create learning paths in articles or books",tags:[{key:fe.group_learningPathCommon,description:"Common tags for learning path books, used to define properties of learning paths"}]},[d.bookLink]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Book link bit, used to create links to books in learning paths"},[d.bookLinkNext]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Next book link bit, used to create links to the next book in learning paths"},[d.bookLinkPrev]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Previous book link bit, used to create links to the previous book in learning paths"},[d.learningPathClassroomEvent]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path classroom event bit, used to create classroom events in learning paths"},[d.learningPathClassroomTraining]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path classroom training bit, used to create classroom training in learning paths"},[d.learningPathClosing]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path closing bit, used to close learning paths"},[d.learningPathFeedback]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path feedback bit, used to provide feedback in learning paths"},[d.learningPathLearningGoal]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path learning goal bit, used to define learning goals in learning paths"},[d.learningPathLti]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path LTI bit, used to integrate LTI tools in learning paths"},[d.learningPathSign]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path sign bit, used to create signs in learning paths"},[d.learningPathStep]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path step bit, used to create steps in learning paths"},[d.learningPathBotTraining]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path bot training bit, used to create bot training in learning paths",tags:[{key:fe.property_bot,description:"Bot reference for the training, used to link to a specific bot",format:y}]},[d.learningPathExternalLink]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path external link bit, used to create external links in learning paths",tags:[{key:fe.property_externalLink,description:"External link for the learning path, used to link to external resources",format:y},{key:fe.property_externalLinkText,description:"Text for the external link, used to define the link text displayed",format:y}]},[d.learningPathVideoCall]:{since:"1.3.0",baseBitType:d.learningPathBook,description:"Learning path video call bit, used to create video calls in learning paths",tags:[{key:fe.property_videoCallLink,description:"Video call link for the learning path, used to link to video calls",format:y}]},[d.leLearningObjectives]:{since:"1.25.0",baseBitType:d.learningPathLearningGoal,description:"Learning objectives bit, used to define learning objectives in learning paths",tags:[{key:fe.property_activityType,description:"Activity type for the learning objectives, used to categorize the activity",format:y}]},[d.leVideoCall]:{since:"1.25.0",baseBitType:d.learningPathVideoCall,description:"Video call bit, used to create video calls in learning paths",tags:[{key:fe.property_activityType,description:"Activity type for the video call, used to categorize the activity",format:y}]},[d.leClassroomEvent]:{since:"1.25.0",baseBitType:d.learningPathClassroomEvent,description:"Classroom event bit, used to create classroom events in learning paths",tags:[{key:fe.property_activityType,description:"Activity type for the classroom event, used to categorize the activity",format:y}]},[d.leMultiDayEvent]:{since:"3.32.0",baseBitType:d.leClassroomEvent,description:"Multi-day event bit, used to create multi-day events in learning paths"},[d.leCompletion]:{since:"1.25.0",baseBitType:d.learningPathClosing,description:"Completion bit, used to mark the completion of learning paths",tags:[{key:fe.property_activityType,description:"Activity type for the completion, used to categorize the activity",format:y}]},[d.leExternalLink]:{since:"1.25.0",baseBitType:d.learningPathExternalLink,description:"External link bit, used to create external links in learning paths",tags:[{key:fe.property_activityType,description:"Activity type for the external link, used to categorize the activity",format:y}]},[d.leReadBook]:{since:"1.25.0",baseBitType:d.learningPathBook,description:"Read book bit, used to create reading tasks in learning paths",tags:[{key:fe.property_activityType,description:"Activity type for the reading task, used to categorize the activity",format:y}]},[d.leLearningStep]:{since:"1.25.0",baseBitType:d.learningPathStep,description:"Learning step bit, used to create steps in learning paths",tags:[{key:fe.property_activityType,description:"Activity type for the learning step, used to categorize the activity",format:y}]},[d.lePreparationTask]:{since:"1.26.0",baseBitType:d.learningPathBook,description:"Preparation task bit, used to create preparation tasks in learning paths",tags:[{key:fe.property_activityType,format:y,description:"Activity type for the preparation task, used to categorize the activity"}]},[d.leRead]:{since:"1.27.0",baseBitType:d.lePreparationTask,description:"Read task bit, used to create reading tasks in learning paths"},[d.leTask]:{since:"1.27.0",baseBitType:d.lePreparationTask,description:"Task bit, used to create tasks in learning paths"},[d.leTodo]:{since:"1.27.0",baseBitType:d.lePreparationTask,description:"Todo bit, used to create todo tasks in learning paths"},[d.leFollowUpTask]:{since:"1.27.0",baseBitType:d.lePreparationTask,description:"Follow-up task bit, used to create follow-up tasks in learning paths"},[d.leFinishingTask]:{since:"1.27.0",baseBitType:d.lePreparationTask,description:"Finishing task bit, used to create finishing tasks in learning paths"},[d.leAssignment]:{since:"1.27.0",baseBitType:d.lePreparationTask,description:"Assignment bit, used to create assignments in learning paths"},[d.leWatchVideoEmbed]:{since:"1.27.0",baseBitType:d.learningPathBook,description:"Watch video embed bit, used to embed videos in learning paths",tags:[{key:fe.property_activityType,description:"Activity type for the video embed, used to categorize the activity",format:y},{key:fe.group_resourceBitTags,description:"Resource bit tags for video embeds, used to define additional properties"},{key:fe.group_resourceVideoEmbed,description:"Resource video embed tags, used to attach video embeds to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.leListenAudioEmbed]:{since:"1.27.0",baseBitType:d.learningPathBook,description:"Listen audio embed bit, used to embed audio in learning paths",tags:[{key:fe.property_activityType,description:"Activity type for the audio embed, used to categorize the activity",format:y},{key:fe.group_resourceBitTags,description:"Resource bit tags for audio embeds, used to define additional properties"},{key:fe.group_resourceAudioEmbed,description:"Resource audio embed tags, used to attach audio embeds to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.listItem]:{since:"1.22.0",baseBitType:d.article,description:"List item bit, used to create list items in articles or books",tags:[{key:fe.property_listItemIndent,description:"Indentation level for the list item, used to define the hierarchy of the list",format:k,defaultValue:"0"}]},[d.standardListItem]:{since:"1.22.0",baseBitType:d.listItem,description:"Standard list item bit, used to create standard list items in articles or books"},[d.smartStandardListItem]:{since:"1.28.0",baseBitType:d.standardListItem,description:"Smart standard list item bit, used to create smart standard list items in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"ref","@attr":{id:"$customerId"},"@children":"$","▼":"$anchor"}}},[d.smartStandardListItemCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardListItem,description:"Collapsible smart standard list item bit, used to create collapsible smart standard list items in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.mark]:{since:"1.3.0",baseBitType:d._standard,description:"Mark bit, used to create marks in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for marks"},{key:fe.group_markConfig,description:"Configuration tags for marks, used to define properties of marks"},{key:fe.group_mark,description:"Mark tags, used to define the content of marks"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}]},[d.match]:{since:"1.3.0",baseBitType:d._standard,description:"Match bit, used to create matching pairs in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for matching pairs"},{key:fe.property_isCaseSensitive,exportJsonKey:{},description:"Case sensitivity for matching pairs, used to define if matches are case-sensitive",format:x,defaultValue:"true"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0}],description:"The example(s) for the bit",format:b,nullable:!0}],cardSet:R},[d.matchAll]:{since:"1.3.0",baseBitType:d.match,description:"Match all bit, used to create matching pairs with all options in articles or books"},[d.matchReverse]:{since:"1.3.0",baseBitType:d.match,description:"Match reverse bit, used to create matching pairs with reversed options in articles or books"},[d.matchAllReverse]:{since:"1.3.0",baseBitType:d.match,description:"Match all reverse bit, used to create matching pairs with all options and reversed in articles or books"},[d.matchSolutionGrouped]:{since:"1.3.0",baseBitType:d.match,description:"Grouped match solution bit, used to create grouped matching solutions in articles or books"},[d.matchMatrix]:{since:"1.3.0",baseBitType:d.match,description:"Match matrix bit, used to create matching pairs in a matrix format in articles or books",cardSet:$},[d.matchAudio]:{since:"1.3.0",baseBitType:d.match,description:"Match audio bit, used to create matching pairs with audio in articles or books",cardSet:F},[d.matchPicture]:{since:"1.3.0",baseBitType:d.match,description:"Match picture bit, used to create matching pairs with pictures in articles or books",cardSet:K},[d.feedback]:{since:"3.13.0",baseBitType:d._standard,description:"Feedback bit, used to provide feedback in articles or books",tags:[{key:fe.property_reasonableNumOfChars,exportJsonKey:{},description:"Reasonable number of characters for feedback, used to limit input size",format:k}],cardSet:V},[d.learningDocumentationFeedback]:{since:"3.13.0",baseBitType:d.feedback,description:"Feedback for learning documentation"},[d.handInFeedbackExpert]:{since:"3.30.0",baseBitType:d.feedback,description:"Feedback for expert hand-in"},[d.handInFeedbackSelf]:{since:"3.30.0",baseBitType:d.feedback,description:"Self-feedback for hand-in"},[d.multipleChoice1]:{since:"1.3.0",baseBitType:d._standard,description:"Multiple choice 1 bit, used to create single-choice questions in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for multiple choice 1 questions"},{key:fe.group_trueFalse,description:"True/False tags for multiple choice 1 questions"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}]},[d.coachSelfReflectionMultipleChoice1]:{since:"1.3.0",baseBitType:d.multipleChoice1,description:"Coach self-reflection multiple choice 1 bit, used for self-reflection in coaching"},[d.multipleChoice]:{since:"1.3.0",baseBitType:d._standard,description:"Multiple choice bit, used to create multiple-choice questions in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for multiple choice questions"},{key:fe.group_trueFalse,description:"True/False tags for multiple choice questions"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}],cardSet:E},[d.coachSelfReflectionMultipleChoice]:{since:"1.3.0",baseBitType:d.multipleChoice,description:"Coach self-reflection multiple choice bit, used for self-reflection in coaching"},[d.multipleChoiceText]:{since:"1.3.0",baseBitType:d._standard,description:"Multiple choice text bit, used to create multiple-choice questions with text in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for multiple choice text questions"},{key:fe.group_trueFalseInlineSelect,description:"True/False tags for multiple choice text questions"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}]},[d.coachCallToActionMultipleChoiceText]:{since:"1.3.0",baseBitType:d.multipleChoiceText,description:"Coach call to action multiple choice text bit, used for self-reflection in coaching"},[d.coachSelfReflectionMultipleChoiceText]:{since:"1.3.0",baseBitType:d.multipleChoiceText,description:"Coach self-reflection multiple choice text bit, used for self-reflection in coaching"},[d.multipleResponse1]:{since:"1.3.0",baseBitType:d._standard,description:"Multiple response 1 bit, used to create multiple-response questions in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for multiple response 1 questions"},{key:fe.group_trueFalseResponses,description:"True/False tags for multiple response 1 questions"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}]},[d.coachSelfReflectionMultipleResponse1]:{since:"1.3.0",baseBitType:d.multipleResponse1,description:"Coach self-reflection multiple response 1 bit, used for self-reflection in coaching"},[d.multipleResponse]:{since:"1.3.0",baseBitType:d._standard,description:"Multiple response bit, used to create multiple-response questions in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for multiple response questions"},{key:fe.group_trueFalseResponses,description:"True/False tags for multiple response questions"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}],cardSet:L},[d.coachSelfReflectionMultipleResponse]:{since:"1.3.0",baseBitType:d.multipleResponse,description:"Coach self-reflection multiple response bit, used for self-reflection in coaching"},[d.page]:{since:"1.3.0",baseBitType:d._standard,description:"Page bit, used to create pages in articles or books",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:fe.tag_title,description:"Title of the page, used to display the page title"},{key:fe.property_thumbImage,description:"Thumbnail image for the page, used to display a small image representation",format:y}]},[d.pageCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:d.page,description:"Collapsible page bit, used to create collapsible sections in pages",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.pageCoverImage]:{since:"1.22.0",baseBitType:d.page,description:"Page cover image bit, used to create cover images for pages"},[d.advertisingAdvertorialPage]:{since:"4.5.0",baseBitType:d.page,description:"Advertorial Page bit, used to create advertorial pages"},[d.pageBuyButton]:{since:"1.4.3",baseBitType:d._standard,description:"Page buy button bit, used to create buy buttons on pages",tags:[{key:fe.property_slug,description:"Slug for the page, used to identify the page in URLs",format:y},{key:fe.property_content2Buy,description:"Content to buy for the page, used to define what is being sold",format:y},{key:fe.property_buttonCaption,description:"Caption for the buy button, used to define the text displayed on the button",format:y}]},[d.pageBuyButtonAlt]:{since:"1.31.0",baseBitType:d.pageBuyButton,description:"Alternative page buy button bit, used to create alternative buy buttons on pages"},[d.pageBuyButtonPromotion]:{since:"1.5.11",baseBitType:d.pageBuyButton,description:"Page buy button for promotions, used to create buy buttons on promotional pages"},[d.pageSubpage]:{since:"1.6.6",baseBitType:d._standard,description:"Page subpage bit, used to create subpages in articles or books",tags:[{key:fe.property_slug,description:"Slug for the subpage, used to identify the subpage in URLs",format:y},{key:fe.property_page,description:"Page reference for the subpage, used to link to the parent page",format:y}]},[d.pageShopInShop]:{since:"1.6.6",baseBitType:d.pageSubpage,description:"Page shop-in-shop bit, used to create shop-in-shop pages in articles or books"},[d.pageCategory]:{since:"1.6.6",baseBitType:d.pageSubpage,description:"Page category bit, used to create category pages in articles or books"},[d.pageAcademy]:{since:"1.6.6",baseBitType:d.pageSubpage,description:"Page academy bit, used to create academy pages in articles or books"},[d.pagePromotion]:{since:"1.6.6",baseBitType:d.pageSubpage,description:"Page promotion bit, used to create promotional pages in articles or books"},[d.pageSpecial]:{since:"1.6.6",baseBitType:d.pageSubpage,description:"Page special bit, used to create special pages in articles or books"},[d.pageEnd]:{since:"5.33.0",baseBitType:d.article,description:"Page end bit, used to mark the end of a page section in articles or books"},[d.pageStart]:{since:"5.33.0",baseBitType:d.article,description:"Page start bit, used to mark the start of a page section in articles or books"},[d.pagePerson]:{since:"1.5.16",baseBitType:d._standard,description:"Page person bit, used to create person pages in articles or books",tags:[{key:fe.property_slug,description:"Slug for the person page, used to identify the person in URLs",format:y},{key:fe.group_person,description:"Person tags, used to define properties of the person"},{key:fe.property_buttonCaption,description:"Caption for the button on the person page, used to define the text displayed",format:y}]},[d.pageProduct]:{since:"1.4.17",baseBitType:d._standard,description:"Page product bit, used to create product pages in articles or books",tags:[{key:fe.property_slug,description:"Slug for the product page, used to identify the product in URLs",format:y},{key:fe.property_product,description:"Product reference for the product page, used to link to the product",format:y,nullable:!0}]},[d.pageProductList]:{since:"1.4.17",baseBitType:d._standard,description:"Page product list bit, used to create product lists in articles or books",tags:[{key:fe.property_slug,description:"Slug for the product list page, used to identify the product list in URLs",format:y},{key:fe.property_product,description:"Product reference for the product list, used to link to the product",format:y,nullable:!0,maxCount:u}]},[d.pageProductVideo]:{since:"1.4.17",baseBitType:d._standard,description:"Page product video bit, used to create product video pages in articles or books",tags:[{key:fe.property_slug,description:"Slug for the product video page, used to identify the product video in URLs",format:y},{key:fe.property_productVideo,description:"Product video reference for the product video page, used to link to the video",format:y}]},[d.pageProductVideoList]:{since:"1.4.17",baseBitType:d._standard,description:"Page product video list bit, used to create product video lists in articles or books",tags:[{key:fe.property_slug,description:"Slug for the product video list page, used to identify the product video list in URLs",format:y},{key:fe.property_productVideo,description:"Product video reference for the product video list, used to link to the video",format:y,maxCount:u}]},[d.pageSectionFolder]:{since:"1.4.17",baseBitType:d._standard,description:"Page section folder bit, used to create section folders in articles or books",tags:[{key:fe.property_slug,description:"Slug for the section folder page, used to identify the section in URLs",format:y},{key:fe.property_productFolder,description:"Product folder reference for the section folder page, used to link to the folder",format:y}]},[d.photo]:{since:"1.3.0",baseBitType:d.image,description:"Photo bit, used to create photo bits in articles or books"},[d.platform]:{since:"4.12.0",baseBitType:d._standard,description:"Platform bit, used to define platform properties",tags:[{key:fe.property_platformName,description:"The platform name",format:y},{key:fe.resource_platformIcon,jsonKey:"platformIcon|resource(type=image, key=image)",exportJsonKey:{platformIcon:{type:"image",image:{src:"$"}}},description:"The platform icon",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the platform icon resource"}],maxCount:1},{key:fe.group_platformStylesCommon,description:"Common platform styles"}]},[d.platformBrandTarget]:{since:"4.15.0",baseBitType:d._standard,description:"Platform brand target bit, used to define the brand target for publishing",tags:[{key:fe.property_platformBrandTarget,description:'The platform brand target (typically "light", "dark" or "none")',format:y,defaultValue:"none"}]},[d.platformHeader]:{since:"4.12.0",baseBitType:d._standard,description:"Platform header bit, used to define platform header properties",tags:[{key:fe.resource_platformLogo,jsonKey:"platformLogo|resource(type=image, key=image)",exportJsonKey:{platformLogo:{type:"image",image:{src:"$"}}},description:"The platform logo",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the platform logo resource"}],maxCount:1},{key:fe.property_platformLogoMaxHeight,description:"Maximum height for the platform logo",format:k,defaultValue:"40"},{key:fe.group_platformStylesCommon,description:"Common platform styles"}]},[d.platformMain]:{since:"4.12.0",baseBitType:d._standard,description:"Platform main bit, used to define platform main properties",tags:[{key:fe.group_platformStylesCommon,description:"Common platform styles"}]},[d.platformMainButton]:{since:"4.12.0",baseBitType:d._standard,description:"Platform main button bit, used to define platform main button properties",tags:[{key:fe.group_platformStylesCommon,description:"Common platform styles"}]},[d.platformMainInput]:{since:"4.12.0",baseBitType:d._standard,description:"Platform main input bit, used to define platform main input properties",tags:[{key:fe.group_platformStylesCommon,description:"Common platform styles"}]},[d.platformSection]:{since:"4.12.0",baseBitType:d._standard,description:"Platform section bit, used to define platform section properties",tags:[{key:fe.group_platformStylesCommon,description:"Common platform styles"}]},[d.platformSectionButton]:{since:"4.12.0",baseBitType:d._standard,description:"Platform section button bit, used to define platform section button properties",tags:[{key:fe.group_platformStylesCommon,description:"Common platform styles"}]},[d.platformSectionChat]:{since:"4.12.0",baseBitType:d._standard,description:"Platform section chat bit, used to define platform section chat properties",tags:[{key:fe.group_platformStylesCommon,description:"Common platform styles"},{key:fe.resource_platformBackgroundImage,jsonKey:"platformBackgroundImage|resource(type=image, key=image)",exportJsonKey:{platformBackgroundImage:{type:"image",image:{src:"$"}}},description:"The platform section chat background image",chain:[{key:fe.group_resourceImageCommon,description:"Common image properties for the platform background image resource"}]}]},[d.platformSectionHeader]:{since:"4.12.0",baseBitType:d._standard,description:"Platform section header bit, used to define platform section header properties",tags:[{key:fe.group_platformStylesCommon,description:"Common platform styles"}]},[d.platformSectionInput]:{since:"4.12.0",baseBitType:d._standard,description:"Platform section input bit, used to define platform section input properties",tags:[{key:fe.group_platformStylesCommon,description:"Common platform styles"}]},[d.platformSystemIcon]:{since:"4.12.0",baseBitType:d._standard,description:"Platform system icon bit, used to define platform system icon properties",tags:[{key:fe.group_platformStylesCommon,description:"Common platform styles"}]},[d.quote]:{since:"1.3.0",baseBitType:d._standard,description:"Quote bit, used to create quotes in articles or books",tags:[{key:fe.property_quotedPerson,description:"Quoted person for the quote, used to define who is being quoted",format:y}]},[d.rating]:{since:"1.3.0",baseBitType:d._standard,description:"Rating bit, used to create rating bits in articles or books"},[d.coachSelfReflectionRating]:{since:"1.3.0",baseBitType:d.rating,description:"Coach self-reflection rating bit, used for self-reflection in coaching"},[d.releaseNote]:{since:"1.3.0",baseBitType:d._standard,description:"Release note bit, used to create release notes in articles or books",tags:[{key:fe.property_releaseVersion,description:"Release version for the release note, used to define the version of the release",format:y},{key:fe.property_releaseKind,description:"Release kind for the release note, used to define the type of release",format:y},{key:fe.property_releaseDate,description:"Release date for the release note, used to define when the release was made",format:y}]},[d.reviewNote]:{since:"1.3.0",baseBitType:d._standard,description:"Review note bit, used to create review notes in articles or books",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:fe.tag_title,description:"Title of the review note, used to display the note title"},{key:fe.property_resolved,description:"Resolved status for the review note, used to indicate if the note is resolved",format:x,defaultValue:"false"},{key:fe.property_resolvedDate,description:"Resolved date for the review note, used to define when the note was resolved",format:y},{key:fe.property_resolvedBy,description:"Resolved by for the review note, used to define who resolved the note",format:y},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the review note bit",format:y,nullable:!0}],rootExampleType:m},[d.reviewAuthorNote]:{since:"1.3.0",baseBitType:d.reviewNote,description:"Author review note bit, used to create author notes in reviews"},[d.reviewCustomerNote]:{since:"3.5.0",baseBitType:d.reviewNote,description:"Customer review note bit, used to create customer notes in reviews"},[d.reviewError]:{since:"5.8.0",baseBitType:d.reviewNote,description:"Review error note bit, used to create error notes in reviews"},[d.reviewErrorAi]:{since:"5.8.0",baseBitType:d.reviewNote,description:"Review error AI note bit, used to create AI error notes in reviews"},[d.reviewErrorTranslation]:{since:"5.8.0",baseBitType:d.reviewNote,description:"Review error translation note bit, used to create translation error notes in reviews"},[d.reviewReviewerNote]:{since:"1.3.0",baseBitType:d.reviewNote,description:"Reviewer review note bit, used to create reviewer notes in reviews"},[d.reviewRequestForReviewNote]:{since:"1.3.0",baseBitType:d.reviewNote,description:"Request for review note bit, used to create notes requesting reviews"},[d.reviewApprovedNote]:{since:"1.3.0",baseBitType:d.reviewNote,description:"Approved review note bit, used to create notes for approved reviews"},[d.sampleSolution]:{since:"1.3.0",baseBitType:d._standard,description:"Sample solution bit, used to create sample solutions in articles or books",tags:[{exportJsonKey:{anchor:"$"},key:fe.tag_anchor,format:y,description:"Anchor for the sample solution, used to link to the solution"},{exportJsonKey:{reference:"$"},key:fe.tag_reference,format:y,description:"Reference for the sample solution, used to link to the source of the solution"}]},[d.sequence]:{since:"1.3.0",baseBitType:d._standard,description:"Sequence bit, used to create sequences in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for sequences"},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{"@absent":{isExample:!0,example:!0}},{isExample:!0,example:"$"}],description:"The example flag for the bit (boolean)",format:x,nullable:!0}],cardSet:I,rootExampleType:h},[d.stillImageFilm]:{since:"1.3.0",baseBitType:d._standard,description:"Still image film bit, used to create still image films in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for still image films, used to define additional properties"},{key:fe.group_resourceStillImageFilm,description:"Resource still image film tags, used to attach still image films to the bit"}],resourceAttachmentAllowed:!1},[d.stillImageFilmEmbed]:{since:"1.3.0",baseBitType:d._standard,description:"Still image film embed bit, used to embed still image films in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for still image films, used to define additional properties"},{key:fe.group_resourceStillImageFilmEmbed,description:"Resource still image film embed tags, used to attach still image films to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.stillImageFilmLink]:{since:"1.3.0",baseBitType:d._standard,description:"Still image film link bit, used to create still image film links in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for still image films, used to define additional properties"},{key:fe.group_resourceStillImageFilmLink,description:"Resource still image film link tags, used to attach still image films to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.surveyAnonymous]:{since:"1.3.0",baseBitType:d._standard,description:"Anonymous survey bit, used to create anonymous surveys in articles or books"},[d.survey]:{since:"1.3.0",baseBitType:d._standard,description:"Survey bit, used to create surveys in articles or books"},[d.surveyMatrix]:{since:"1.6.2",baseBitType:d.image,description:"Survey matrix bit, used to create survey matrices in articles or books",tags:[{key:fe.property_pointerTop,description:"Pointer for the top of the survey matrix, used to define the top label",format:y,minCount:1,maxCount:1},{key:fe.property_pointerLeft,description:"Pointer for the left of the survey matrix, used to define the left label",format:y,minCount:1,maxCount:1},{key:fe.property_buttonCaption,description:"Caption for the button in the survey matrix, used to define the button text",format:y,minCount:1,maxCount:1}]},[d.surveyMatrixMe]:{since:"1.6.2",baseBitType:d.surveyMatrix,description:"Survey matrix me bit, used to create personal survey matrices in articles or books"},[d.surveyRating]:{since:"1.6.0",baseBitType:d._standard,description:"Survey rating bit, used to create rating surveys in articles or books",tags:[{key:fe.property_ratingLevelStart,jsonKey:"ratingLevelStart.level",exportJsonKey:{ratingLevelStart:{level:"$"}},description:"Start level for the rating survey, used to define the lowest rating",format:k,chain:[{key:fe.property_label,description:"Label for the start level of the rating survey, used to define the text displayed",format:b}]},{key:fe.property_ratingLevelEnd,jsonKey:"ratingLevelEnd.level",exportJsonKey:{ratingLevelEnd:{level:"$"}},description:"End level for the rating survey, used to define the highest rating",format:k,chain:[{key:fe.property_label,description:"Label for the end level of the rating survey, used to define the text displayed",format:b}]},{key:fe.property_ratingLevelSelected,description:"Selected level for the rating survey, used to define the default rating",format:k,nullable:!0},{key:fe.property_buttonCaption,description:"Caption for the button in the rating survey, used to define the button text",format:y}]},[d.surveyRatingOnce]:{since:"1.6.0",baseBitType:d.surveyRating,description:"Survey rating once bit, used to create one-time rating surveys in articles or books"},[d.surveyRatingDisplay]:{since:"1.6.0",baseBitType:d.surveyRating,description:"Survey rating display bit, used to display rating surveys in articles or books"},[d.scorm]:{since:"1.5.11",baseBitType:d._standard,description:"SCORM bit, used to embed SCORM content in articles or books",tags:[{key:fe.property_scormSource,description:"Source for the SCORM content, used to define the SCORM package URL",format:y},{key:fe.property_posterImage,description:"Poster image for the SCORM content, used to display a preview image",format:y}]},[d.pronunciationTable]:{since:"3.1.0",baseBitType:d._standard,description:"Pronunciation table bit, used to create pronunciation tables in articles or books",cardSet:D},[d.table]:{since:"1.5.19",baseBitType:d._standard,description:"Table bit, used to create tables in articles or books",tags:[{key:fe.property_caption,description:"Caption for the table, used to define the title of the table",format:b,htmlKey:{"@el":"caption","@children":"$"},mappingKeys:{"xml-niso-iec":{"@el":"caption","@children":{"@el":"title","@text":"$"}}}},{key:fe.property_tableFixedHeader,description:"Fixed header for the table, used to keep the header visible while scrolling",format:x,defaultValue:"false"},{key:fe.property_tableHeaderWhitespaceNoWrap,description:"No wrap for table header whitespace, used to prevent header text wrapping",format:x,defaultValue:"false"},{key:fe.property_tableSearch,description:"Search functionality for the table, used to enable searching within the table",format:x,defaultValue:"false"},{key:fe.property_tableSort,description:"Sorting functionality for the table, used to enable sorting of table columns",format:x,defaultValue:"false"},{key:fe.property_tablePagination,description:"Pagination for the table, used to limit the number of rows displayed at once",format:x,defaultValue:"false"},{key:fe.property_tablePaginationLimit,description:"Pagination limit for the table, used to define the number of rows per page",format:k,defaultValue:"0"},{key:fe.property_tableHeight,description:"Height for the table, used to define the height of the table in pixels",format:k,defaultValue:"0"},{key:fe.property_tableWhitespaceNoWrap,description:"No wrap for table whitespace, used to prevent text wrapping in table cells",format:x,defaultValue:"false"},{key:fe.property_tableAutoWidth,description:"Auto width for table columns, used to automatically adjust column widths",format:x,defaultValue:"true"},{key:fe.property_tableResizableColumns,description:"Resizable columns for the table, used to allow users to resize table columns",format:x,defaultValue:"false"},{key:fe.property_tableColumnMinWidth,description:"Minimum width for table columns, used to define the minimum width of columns",format:k,defaultValue:"0"}],cardSet:O},[d.tableExtended]:{since:"4.14.0",baseBitType:d.table,description:"Extended table bit, used to create complex tables with all HTML table features",cardSet:J},[d.tableExtendedImage]:{since:"5.13.0",baseBitType:d.tableExtended,description:"Extended table image bit, used to create complex tables with images and all HTML table features",tags:[{key:fe.property_caption,description:"Caption for the table image, used to provide a description for the image",format:b,htmlKey:{"@el":"caption","@children":"$"}},{key:fe.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:fe.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:fe.group_resourceImage,description:"Resource image tags for images, used to attach images to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.tableAlt]:{since:"1.16.0",baseBitType:d.table,description:"Alternative table bit, used to create alternative tables in articles or books"},[d.standardTableNormative]:{since:"1.16.0",baseBitType:d.table,description:"Standard normative table bit, used to create standard normative tables in articles or books"},[d.standardTableNonNormative]:{since:"1.16.0",baseBitType:d.table,description:"Standard non-normative table bit, used to create standard non-normative tables in articles or books"},[d.standardRemarkTableNormative]:{since:"1.17.0",baseBitType:d.table,description:"Standard normative remark table bit, used to create standard normative remark tables in articles or books"},[d.standardRemarkTableNonNormative]:{since:"1.17.0",baseBitType:d.table,description:"Standard non-normative remark table bit, used to create standard non-normative remark tables in articles or books"},[d.standardTableExtendedNormative]:{since:"1.16.0",baseBitType:d.tableExtended,description:"Standard normative extended table bit, used to create standard normative extended tables in articles or books"},[d.standardTableExtendedNonNormative]:{since:"1.16.0",baseBitType:d.tableExtended,description:"Standard non-normative extended table bit, used to create standard non-normative extended tables in articles or books"},[d.standardRemarkTableExtendedNormative]:{since:"1.17.0",baseBitType:d.tableExtended,description:"Standard normative remark extended table bit, used to create standard normative remark extended tables in articles or books"},[d.standardRemarkTableExtendedNonNormative]:{since:"1.17.0",baseBitType:d.tableExtended,description:"Standard non-normative remark extended table bit, used to create standard non-normative remark extended tables in articles or books"},[d.smartStandardTableNormative]:{since:"1.28.0",baseBitType:d.standardTableNormative,description:"Smart standard normative table bit, used to create smart standard normative tables in articles or books"},[d.smartStandardTableNonNormative]:{since:"1.28.0",baseBitType:d.standardTableNonNormative,description:"Smart standard non-normative table bit, used to create smart standard non-normative tables in articles or books"},[d.smartStandardRemarkTableNormative]:{since:"1.28.0",baseBitType:d.standardRemarkTableNormative,description:"Smart standard normative remark table bit, used to create smart standard normative remark tables in articles or books"},[d.smartStandardRemarkTableNonNormative]:{since:"1.28.0",baseBitType:d.standardRemarkTableNonNormative,description:"Smart standard non-normative remark table bit, used to create smart standard non-normative remark tables in articles or books"},[d.smartStandardTableExtendedNormative]:{since:"1.28.0",baseBitType:d.standardTableExtendedNormative,description:"Smart standard normative extended table bit, used to create smart standard normative extended tables in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"table-wrap","@attr":{id:"$customerId"},"▼":"$anchor"}}},[d.smartStandardTableExtendedNonNormative]:{since:"1.28.0",baseBitType:d.standardTableExtendedNonNormative,description:"Smart standard non-normative extended table bit, used to create smart standard non-normative extended tables in articles or books"},[d.smartStandardRemarkTableExtendedNormative]:{since:"1.28.0",baseBitType:d.standardRemarkTableExtendedNormative,description:"Smart standard normative remark extended table bit, used to create smart standard normative remark extended tables in articles or books"},[d.smartStandardRemarkTableExtendedNonNormative]:{since:"1.28.0",baseBitType:d.standardRemarkTableExtendedNonNormative,description:"Smart standard non-normative remark extended table bit, used to create smart standard non-normative remark extended tables in articles or books"},[d.smartStandardTableNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardTableNormative,description:"Collapsible smart standard normative table bit, used to create collapsible smart standard normative tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardTableNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardTableNonNormative,description:"Collapsible smart standard non-normative table bit, used to create collapsible smart standard non-normative tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardRemarkTableNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardRemarkTableNormative,description:"Collapsible smart standard normative remark table bit, used to create collapsible smart standard normative remark tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardRemarkTableNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardRemarkTableNonNormative,description:"Collapsible smart standard non-normative remark table bit, used to create collapsible smart standard non-normative remark tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardTableExtendedNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardTableExtendedNormative,description:"Collapsible smart standard normative extended table bit, used to create collapsible smart standard normative extended tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardTableExtendedNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardTableExtendedNonNormative,description:"Collapsible smart standard non-normative extended table bit, used to create collapsible smart standard non-normative extended tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardRemarkTableExtendedNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardRemarkTableExtendedNormative,description:"Collapsible smart standard normative remark extended table bit, used to create collapsible smart standard normative remark extended tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.smartStandardRemarkTableExtendedNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:d.smartStandardRemarkTableExtendedNonNormative,description:"Collapsible smart standard non-normative remark extended table bit, used to create collapsible smart standard non-normative remark extended tables in articles or books",tags:[{key:fe.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:x,defaultValue:"true"}]},[d.parameters]:{since:"1.18.0",baseBitType:d.table,description:"Parameters bit, used to create parameter tables in articles or books"},[d.toc]:{since:"1.3.0",baseBitType:d._standard,description:"Table of contents bit, used to create a table of contents in articles or books"},[d.tocChapter]:{since:"1.5.5",baseBitType:d.toc,description:"Table of contents chapter bit, used to create chapters in the table of contents",tags:[{key:fe.property_maxDisplayLevel,description:"Maximum display level for the chapter in the table of contents",format:k,nullable:!0}]},[d.tocInline]:{since:"3.24.0",baseBitType:d.toc,description:"Inline table of contents bit, used to create inline tables of contents in articles or books",tags:[{key:fe.property_maxTocChapterLevel,description:"Maximum chapter level for the inline table of contents",format:k,nullable:!0}]},[d.tocResource]:{since:"3.31.0",baseBitType:d.toc,description:"Table of contents resource bit, used to create resources in the table of contents",tags:[{key:fe.property_tocResource,description:"Resource content for the table of contents, used to define the resource",format:y,maxCount:u},{key:fe.property_buttonCaption,description:"Caption for the button in the table of contents resource, used to define the text displayed on the button",format:y}]},[d.tocContent]:{since:"3.31.0",baseBitType:d.toc,description:"Table of contents content bit, used to create content sections in the table of contents",tags:[{key:fe.property_tocContent,description:"Content for the table of contents, used to define the content section",format:y,maxCount:u},{key:fe.property_buttonCaption,description:"Caption for the button in the table of contents content, used to define the text displayed on the button",format:y}]},[d.anchor]:{since:"1.3.0",baseBitType:d._standard,description:"Anchor bit, used to create anchors in articles or books"},[d.bitBookEnding]:{since:"1.3.0",baseBitType:d._standard,description:"Bit book ending bit, used to create endings in articles or books"},[d.bitBookSummary]:{since:"1.3.0",baseBitType:d._standard,description:"Bit book summary bit, used to create summaries in articles or books"},[d.botActionAnnounce]:{since:"1.3.0",baseBitType:d._standard,description:"Bot action announce bit, used to create announcements in articles or books"},[d.botActionRatingNumber]:{since:"1.3.0",baseBitType:d._standard,description:"Bot action rating number bit, used to create rating number actions in articles or books"},[d.botActionRemind]:{since:"1.3.0",baseBitType:d._standard,description:"Bot action remind bit, used to create reminders in articles or books"},[d.botActionSave]:{since:"1.3.0",baseBitType:d._standard,description:"Bot action save bit, used to create save actions in articles or books"},[d.botActionTrueFalse]:{since:"1.3.0",baseBitType:d._standard,description:"Bot action true/false bit, used to create true/false actions in articles or books"},[d.chapterSubjectMatter]:{since:"1.3.0",baseBitType:d._standard,description:"Chapter subject matter bit, used to create subject matter chapters in articles or books"},[d.chat]:{since:"1.3.0",baseBitType:d._standard,description:"Chat bit, used to create chat sections in articles or books"},[d.conclusion]:{since:"1.3.0",baseBitType:d._standard,description:"Conclusion bit, used to create conclusions in articles or books"},[d.conclusionAlt]:{since:"1.16.0",baseBitType:d.conclusion,description:"Alternative conclusion bit, used to create alternative conclusions in articles or books"},[d.documentUpload]:{since:"1.3.0",baseBitType:d._standard,description:"Document upload bit, used to create document upload sections in articles or books"},[d.footNote]:{since:"1.3.0",baseBitType:d._standard,description:"Footnote bit, used to create footnotes in articles or books"},[d.formFreeText]:{since:"5.3.0",baseBitType:d.interview,description:"Form free text bit, used to create free text forms in articles or books"},[d.groupBorn]:{since:"1.3.0",baseBitType:d._standard,description:"Group born bit, used to create group born sections in articles or books"},[d.groupDied]:{since:"1.3.0",baseBitType:d._standard,description:"Group died bit, used to create group died sections in articles or books"},[d.recordAudio]:{since:"1.3.0",baseBitType:d._standard,description:"Record audio bit, used to create audio recording sections in articles or books"},[d.recordVideo]:{since:"1.5.24",baseBitType:d._standard,description:"Record video bit, used to create video recording sections in articles or books"},[d.stickyNote]:{since:"1.3.0",baseBitType:d._standard,description:"Sticky note bit, used to create sticky notes in articles or books"},[d.takePicture]:{since:"1.3.0",baseBitType:d._standard,description:"Take picture bit, used to create picture taking sections in articles or books"},[d.handInAudio]:{since:"1.5.15",baseBitType:d._standard,description:"Hand in audio bit, used to create audio submission sections in articles or books"},[d.handInContact]:{since:"1.5.15",baseBitType:d._standard,description:"Hand in contact bit, used to create contact submission sections in articles or books"},[d.handInDocument]:{since:"1.5.15",baseBitType:d._standard,description:"Hand in document bit, used to create document submission sections in articles or books"},[d.handInFile]:{since:"3.2.0",baseBitType:d._standard,description:"Hand in file bit, used to create file submission sections in articles or books",tags:[{key:fe.property_handInAcceptFileType,description:"Accepted file types for the hand-in file, used to define allowed file formats",format:y,maxCount:u}]},[d.handInFreeText]:{since:"5.3.0",baseBitType:d.interview,description:"Hand in free text bit, used to create free text submission sections in articles or books"},[d.handInFreeTextExpert]:{since:"5.3.0",baseBitType:d.interview,description:"Hand in free text expert bit, used to create free text expert submission sections in articles or books"},[d.handInLocation]:{since:"1.5.15",baseBitType:d._standard,description:"Hand in location bit, used to create location submission sections in articles or books"},[d.handInPhoto]:{since:"1.5.15",baseBitType:d._standard,description:"Hand in photo bit, used to create photo submission sections in articles or books"},[d.handInScan]:{since:"1.5.15",baseBitType:d._standard,description:"Hand in scan bit, used to create scan submission sections in articles or books"},[d.handInSystemMedia]:{since:"1.5.15",baseBitType:d._standard,description:"Hand in system media bit, used to create system media submission sections in articles or books",tags:[{key:fe.property_handInAcceptFileType,description:"Accepted file types for the hand-in system media, used to define allowed file formats",format:y,maxCount:u}]},[d.handInSubmit]:{since:"3.2.0",baseBitType:d._standard,description:"Hand in submit bit, used to create submission sections in articles or books",tags:[{key:fe.property_handInRequirement,description:"Requirement for the hand-in submission, used to define what is needed",format:y,maxCount:u},{key:fe.property_handInInstruction,description:"Instruction for the hand-in submission, used to guide the user",format:y},{key:fe.property_buttonCaption,description:"Caption for the button in the hand-in submission, used to define the button text",format:y}]},[d.handInVideo]:{since:"1.5.15",baseBitType:d._standard,description:"Hand in video bit, used to create video submission sections in articles or books"},[d.handInVoice]:{since:"1.5.15",baseBitType:d._standard,description:"Hand in voice bit, used to create voice submission sections in articles or books"},[d.trueFalse1]:{since:"1.3.0",baseBitType:d._standard,description:"True/False bit, used to create true/false questions in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for true/false questions"},{key:fe.property_labelTrue,description:"Label for the true option in the true/false question",format:y},{key:fe.property_labelFalse,description:"Label for the false option in the true/false question",format:y},{exportJsonKey:{statement:"$",isCorrect:!0},key:fe.tag_true,description:"Tag for the true option in the true/false question",format:b},{exportJsonKey:{statement:"$",isCorrect:!1},key:fe.tag_false,description:"Tag for the false option in the true/false question",format:b},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{"@absent":{isExample:!0,example:!0}},{"@value=false":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example flag for the bit (boolean)",format:x,nullable:!0}],rootExampleType:h},[d.trueFalse]:{since:"1.3.0",baseBitType:d._standard,description:"True/False bit, used to create true/false questions in articles or books",quizBit:!0,tags:[{key:fe.group_quizCommon,description:"Common quiz tags for true/false questions"},{key:fe.property_labelTrue,description:"Label for the true option in the true/false question",format:y},{key:fe.property_labelFalse,description:"Label for the false option in the true/false question",format:y},{key:fe.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:b,nullable:!0}],cardSet:P},[d.vendorAmcharts5Chart]:{since:"1.5.8",baseBitType:d.code,description:"AmCharts 5 chart bit, used to embed AmCharts 5 charts in articles or books",textFormatDefault:C.json},[d.vendorDatadogDashboard]:{since:"5.2.0",baseBitType:d.nonProductionPrototypeIframe,description:"A Datadog dashboard bit, used to embed Datadog dashboards"},[d.vendorDatadogDashboardEmbed]:{since:"3.12.0",baseBitType:d.code,description:"Datadog dashboard embed bit, used to embed Datadog dashboards in articles or books",tags:[{key:fe.property_vendorDashboardId,description:"Dashboard ID for the Datadog dashboard, used to define which dashboard to embed",format:y}],textFormatDefault:C.plainText},[d.vendorFormbricksEmbed]:{since:"3.8.0",baseBitType:d.code,description:"Formbricks embed bit, used to embed Formbricks surveys in articles or books",tags:[{key:fe.property_vendorSurveyId,description:"Survey ID for the Formbricks survey, used to define which survey to embed",format:y}],textFormatDefault:C.plainText},[d.vendorFormbricksEmbedAnonymous]:{since:"3.9.0",baseBitType:d.vendorFormbricksEmbed,description:"Anonymous Formbricks embed bit, used to embed anonymous Formbricks surveys in articles or books"},[d.vendorFormbricksLink]:{since:"3.8.0",baseBitType:d.code,description:"Formbricks link bit, used to create links to Formbricks surveys in articles or books",tags:[{key:fe.property_vendorSurveyId,description:"Survey ID for the Formbricks survey, used to define which survey to link to",format:y}],textFormatDefault:C.plainText},[d.vendorFormbricksLinkAnonymous]:{since:"3.9.0",baseBitType:d.vendorFormbricksLink,description:"Anonymous Formbricks link bit, used to create links to anonymous Formbricks surveys in articles or books"},[d.vendorHighchartsChart]:{since:"1.5.28",baseBitType:d.vendorAmcharts5Chart,description:"Highcharts chart bit, used to embed Highcharts charts in articles or books"},[d.vendorIframelyEmbed]:{since:"1.5.10",baseBitType:d.code,description:"Iframely embed bit, used to embed content from various sources in articles or books",tags:[{key:fe.property_width,description:"Width for the embedded content, used to define the width in pixels",format:k,nullable:!0},{key:fe.property_height,description:"Height for the embedded content, used to define the height in pixels",format:k,nullable:!0},{key:fe.property_vendorUrl,description:"URL for the content to be embedded, used to define the source URL",format:y}],textFormatDefault:C.plainText},[d.vendorIframelyCard]:{since:"1.5.10",baseBitType:d.vendorIframelyEmbed,description:"Iframely card bit, used to create cards for embedded content in articles or books"},[d.vendorIframelyPreview]:{since:"1.5.10",baseBitType:d.vendorIframelyEmbed,description:"Iframely preview bit, used to create previews for embedded content in articles or books"},[d.vendorIframelyPreviewMini]:{since:"1.5.10",baseBitType:d.vendorIframelyEmbed,description:"Iframely preview mini bit, used to create mini previews for embedded content in articles or books"},[d.vendorJupyterOutput]:{since:"1.4.3",baseBitType:d.code,description:"Jupyter output bit, used to embed Jupyter notebook outputs in articles or books",tags:[{key:fe.property_jupyterId,description:"Jupyter ID for the notebook, used to define which notebook to embed",format:y},{key:fe.property_jupyterExecutionCount,description:"Execution count for the Jupyter output, used to define the execution order",format:k,nullable:!0}],textFormatDefault:C.plainText},[d.vendorJupyterCellCode]:{since:"1.4.3",baseBitType:d.vendorJupyterOutput,description:"Jupyter cell code bit, used to embed Jupyter notebook cell code in articles or books"},[d.vendorJupyterCellMarkdown]:{since:"1.4.3",baseBitType:d.vendorJupyterOutput,description:"Jupyter cell markdown bit, used to embed Jupyter notebook cell markdown in articles or books"},[d.vendorJupyterCellRaw]:{since:"1.4.3",baseBitType:d.vendorJupyterOutput,description:"Jupyter cell raw bit, used to embed Jupyter notebook cell raw content in articles or books"},[d.vendorJupyterIpynb]:{since:"1.4.3",baseBitType:d.vendorJupyterOutput,description:"Jupyter IPYNB bit, used to embed Jupyter notebook files in articles or books"},[d.vendorPadletEmbed]:{since:"1.3.0",baseBitType:d.code,description:"Padlet embed bit, used to embed Padlet boards in articles or books",tags:[{key:fe.property_padletId,description:"Padlet ID for the board, used to define which Padlet to embed",format:y}],textFormatDefault:C.plainText},[d.vendorStripePricingTable]:{since:"1.20.0",baseBitType:d.article,description:"Stripe pricing table bit, used to embed Stripe pricing tables in articles or books",tags:[{key:fe.property_stripePricingTableId,description:"Stripe pricing table ID, used to define which pricing table to embed",format:y,minCount:1},{key:fe.property_stripePublishableKey,description:"Stripe publishable key, used to authenticate the Stripe pricing table",format:y,minCount:1}]},[d.vendorStripePricingTableExternal]:{since:"3.13.0",baseBitType:d.vendorStripePricingTable,description:"External Stripe pricing table bit, used to embed external Stripe pricing tables in articles or books"},[d.vendorStripePricingTablePrintOnRequest]:{since:"5.21.0",baseBitType:d.vendorStripePricingTable,description:"Stripe pricing table bit with print-on-request customer/product IDs, used to embed Stripe pricing tables tied to a specific print-on-request customer and product",tags:[{key:fe.property_stripePricingTableDescriptiveName,description:"Descriptive name for the Stripe pricing table",format:y},{key:fe.property_printOnRequestCustomerId,description:"Print-on-request customer ID, used to identify the customer for the print-on-request flow",format:y,minCount:1},{key:fe.property_printOnRequestProductId,description:"Print-on-request product ID, used to identify the product for the print-on-request flow",format:y,minCount:1}]},[d.video]:{since:"1.3.0",baseBitType:d._standard,description:"Video bit, used to embed videos in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for videos, used to define additional properties"},{key:fe.group_resourceVideo,description:"Resource video tags, used to attach videos to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.videoLandscape]:{since:"1.3.0",baseBitType:d.video,description:"Landscape video bit, used to embed landscape videos in articles or books"},[d.videoPortrait]:{since:"1.3.0",baseBitType:d.video,description:"Portrait video bit, used to embed portrait videos in articles or books"},[d.videoEmbed]:{since:"1.3.0",baseBitType:d._standard,description:"Video embed bit, used to embed videos from external sources in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for video embeds, used to define additional properties"},{key:fe.group_resourceVideoEmbed,description:"Resource video embed tags, used to attach video embeds to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.videoEmbedLandscape]:{since:"1.3.0",baseBitType:d.videoEmbed,description:"Landscape video embed bit, used to embed landscape videos from external sources in articles or books"},[d.videoEmbedPortrait]:{since:"1.3.0",baseBitType:d.videoEmbed,description:"Portrait video embed bit, used to embed portrait videos from external sources in articles or books"},[d.videoLink]:{since:"1.3.0",baseBitType:d._standard,description:"Video link bit, used to create links to videos in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for video links, used to define additional properties"},{key:fe.group_resourceVideoLink,description:"Resource video link tags, used to attach video links to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.videoLinkLandscape]:{since:"1.3.0",baseBitType:d.videoLink,description:"Landscape video link bit, used to create links to landscape videos in articles or books"},[d.videoLinkPortrait]:{since:"1.3.0",baseBitType:d.videoLink,description:"Portrait video link bit, used to create links to portrait videos in articles or books"},[d.websiteLink]:{since:"1.3.0",baseBitType:d._standard,description:"Website link bit, used to create links to websites in articles or books",tags:[{key:fe.group_resourceBitTags,description:"Resource bit tags for website links, used to define additional properties"},{key:fe.group_resourceWebsiteLink,description:"Resource website link tags, used to attach website links to the bit",minCount:1}],resourceAttachmentAllowed:!1},[d.nonProductionPrototypeIframe]:{since:"4.20.0",baseBitType:d._standard,description:"A non-production prototype iframe bit, used to embed prototype iframes",tags:[{key:fe.property_iframeSrc,description:"Iframe source URL, used to define the source of the iframe",minCount:1},{key:fe.property_iframeName,description:"Iframe name, used to define the name of the iframe"}]},[d.vendorLearndashEmbed]:{since:"5.0.0",baseBitType:d.nonProductionPrototypeIframe,description:"Learndash embed bit, used to embed Learndash content in an iframe"}},Be=new class{constructor(){l(this,"bitLevelMin",1),l(this,"bitLevelMax",7),l(this,"bitCache",new Map),l(this,"migratedBitCache",new Map),l(this,"allResourcesCache"),l(this,"comboResourcesCache",new Map)}getBitType(e){return e?.startsWith("|")&&(e=e.substring(1)),(0,p.Enum)(d).fromValue(e)??d._error}getMigratedBitType(e){const t=this.migratedBitCache.get(e);if(void 0!==t||this.migratedBitCache.has(e))return t;let r;return e!==d.collapsible&&e.endsWith("-collapsible")&&(r=Ae[e]?.baseBitType),this.migratedBitCache.set(e,r),r}isOfBitType(e,t){if(!e)return!1;if(e===t)return!0;const r=this.getBitConfig(e);if(!r)return!1;if(Array.isArray(t)){for(const e of t)if(r.inheritedBitTypesSet.has(e))return!0;return!1}return r.inheritedBitTypesSet.has(t)}isBitTypeCommented(e){return!!e?.startsWith("|")}getBitConfig(e){let t=this.bitCache.get(e);if(!t){const r=()=>{throw new Error(`No config found for bit: ${e}`)},i=[],o=[];let a=e;for(;a;){const e=Ae[a];e||r(),i.push(a),o.push(e),a=e.baseBitType}o.reverse();const s=o.reduce((e,t)=>e=ve.deepMerge(e,t),{}),{since:n,textFormatDefault:l,quizBit:c,tags:p,cardSet:d,deprecated:m,bodyAllowed:h,bodyRequired:g,footerAllowed:f,footerRequired:b,resourceAttachmentAllowed:k,rootExampleType:x}=s;p?.push({key:fe.property_internalComment,description:"Internal comment for the bit.",format:y,maxCount:u,minCount:0});const v=this.getAllResourcesTagsWithZeroCounts(),T=we.hydrateTagsConfig(p??[]),_=we.hydrateCardSetConfig(d),w=T.info?.comboResourceConfigKey,A={...T.tags};for(const[e,t]of Object.entries(v))A[e]||(A[e]=t);t=new ce({since:n,bitType:e,inheritedBitTypes:i,textFormatDefault:l??C.bitmarkText,tags:A,cardSet:_,quizBit:c,deprecated:m,bodyAllowed:h,bodyRequired:g,footerAllowed:f,footerRequired:b,resourceAttachmentAllowed:k,rootExampleType:x,comboResourceConfigKey:w}),this.bitCache.set(e,t)}return t}getTagConfigForTag(e,t){if(e)return e[t]}getTagsConfigForCardSet(e,t,r){const i=this.getCardSetVariantConfig(e,t,r);if(i)return i.tags}getCardSetVariantConfig(e,t,r){let i;const o=this.getBitConfig(e);if(!o)return;const a=o.cardSet?.variants;if(!a)return;const s=a[Math.min(t,a.length-1)],n=s.length-1;return i=r>n?s[n]:s[r],i}getBitResourcesConfig(e,t){let r={};const i=new Map,o=t?ge(t):void 0,a=this.getBitConfig(e),s={};for(const[e,t]of Object.entries(a.tags))t.type===ee&&(s[e]=t);const n=a.comboResourceConfigKey??(a.resourceAttachmentAllowed?o:void 0);if(n){const e=new Map,o=this.getComboResource(n);if(o){const t=Object.values(o).filter(e=>e.type===ee);t.map(e=>e.configKey).forEach(r=>{const i=t.find(e=>e.configKey===r);i&&e.set(r,i)});const r=this.getComboResourceConfigKeys(n);r&&r.length>0&&i.set(n,r)}if(t)for(const[t,i]of Object.entries(s)){const o=n===i.configKey,a=!!e&&e.has(i.configKey);if(o){const e=new ae({configKey:i.configKey,tag:i.tag,minCount:1,maxCount:1,chain:i.chain,jsonKey:i.jsonKey,exportJsonKey:i.exportJsonKey,hasExportJsonKey:i.hasExportJsonKey,htmlKey:i.htmlKey,hasHtmlKey:i.hasHtmlKey,deprecated:i.deprecated});r[t]=e}else if(a){if(e){const o=e.get(i.configKey);o&&(r[t]=o)}}else r[t]=i}else r=s}else r=s;return new xe(r,a.resourceAttachmentAllowed,o,i)}getComboResourceConfigKeys(e){const t=this.getComboResource(e);if(t){return Object.values(t).filter(e=>e.type===ee).map(e=>e.configKey)}}getComboResource(e){if(!e)return;let t=this.comboResourcesCache.get(e);return t||(t={},Object.values(Ce).filter(t=>t.type===Y&&t.comboResourceConfigKey===e).forEach(e=>{t={...t,...we.hydrateTagsConfig(e.tags).tags}}),0===Object.keys(t).length&&(t=void 0),this.comboResourcesCache.set(e,t)),t}getAllResourcesTagsWithZeroCounts(){let e=this.allResourcesCache;if(!e){e={},Object.values(Ce).filter(e=>e.type===G).forEach(t=>{e={...e,...we.hydrateTagsConfig(t.tags).tags}});for(const t of Object.values(e)){const e=t;e.maxCount=0,e.minCount=0}this.allResourcesCache=e}return e}},Se="@gmb/bitmark-parser-generator",Ie="5.37.0",Pe="ISC",Ee=(r(722),""),Le="node",Ve="chrome",Ne="safari",Re="firefox",Fe=(r(722),""),Ke="macos";function $e(){if("undefined"==typeof window||!window.navigator||!window.navigator.userAgent)return;const e={browser:Ee,os:Fe},t=function(e){const t=e.toLowerCase().split(new RegExp("[ /,;()]","g")).reduce((e,t)=>(t&&e.push(t),e),[]),r={keys:new Set,versions:{}};let i="";for(let e=0,o=t.length;e<o;e++){const o=t[e];let a=!1;for(let e=0;e<=9;e++)if(o.startsWith(`${e}`)){a=!0;break}a?r.versions[i]=o.replace("_","."):r.keys.add(o),i=o}return r}(window.navigator.userAgent),r=t.keys.has("firefox"),i=t.keys.has("chrome"),o=t.keys.has("chromium"),a=t.keys.has("safari"),s=i,n=r,l=t.keys.has("macintosh");return a&&!i&&!o?(e.browser=Ne,e.browserVersion=t.versions.version):s?(e.browser=Ve,e.browserVersion=t.versions.chrome):n&&(e.browser=Re,e.browserVersion=t.versions.firefox),l&&(e.os=Ke,e.osVersion=t.versions.x),e}var Oe={full:"",major:"",minor:"",patch:"",build:""},Je=new class{constructor(){l(this,"bootTimestamp"),l(this,"app"),l(this,"appVersion"),l(this,"environment"),l(this,"environmentVersion"),l(this,"os"),l(this,"osVersion"),l(this,"isBrowser"),l(this,"isNode"),l(this,"isCI"),l(this,"NODE_ENV"),l(this,"userAgentInfo"),Object.defineProperty(this,"userAgentInfo",{value:$e(),enumerable:!1}),this.bootTimestamp=Date.now(),this.app="",this.appVersion=Oe,this.environment=this.getEnvironment(),this.environmentVersion=this.getEnvironmentVersion(),this.isBrowser=this.getIsBrowser(),this.isNode=this.environment===Le,this.isCI=this.getIsCI(),this.NODE_ENV=this.getNodeEnv(),this.os=this.getOs(),this.osVersion=this.getOsVersion()}init(e,t){this.app=e,this.appVersion=this.parseMMBVersion(t)}get upTimestamp(){return Date.now()-this.bootTimestamp}getEnvironment(){return this.userAgentInfo?this.userAgentInfo.browser:"undefined"!=typeof process&&void 0!==process.versions&&process.versions.node?Le:Ee}getEnvironmentVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.browserVersion):"undefined"!=typeof process?this.parseMMBVersion(process.version):Oe}getOs(){return this.userAgentInfo?this.userAgentInfo.os:("undefined"!=typeof process&&void 0!==process.versions&&process.versions.node,Fe)}getOsVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.osVersion):"undefined"!=typeof process?this.parseMMBVersion(""):Oe}getIsBrowser(){return!("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof navigator||!navigator.userAgent)}getIsCI(){return!("undefined"==typeof process||!process.env||!process.env.CI)}getNodeEnv(){return"undefined"!=typeof process&&process.env?"production":""}parseMMBVersion(e){if(!e)return Oe;e.startsWith("v")&&(e=e.substring(1));const t=e.split(".",1e3);let r="",i="",o="",a="";for(let e=0,s=t.length;e<s;e++){const s=t[e];0===e?r=s:1===e?i=s:2===e?a=s:3===e&&(o=s)}return{full:e,major:r,minor:i,patch:a,build:o}}},De=Je.init.bind(Je),je=!1;function qe(){je||(De(Se,Ie),je=!0)}var Me=r(722),ze=(r(722),{text:"text",gap:"gap",mark:"mark",select:"select",highlight:"highlight"}),He=(r(722),{bold:"bold",light:"light",italic:"italic",highlight:"highlight",highlightOrange:"highlightOrange",highlightYellow:"highlightYellow",highlightGreen:"highlightGreen",highlightBlue:"highlightBlue",highlightPurple:"highlightPurple",highlightPink:"highlightPink",highlightBrown:"highlightBrown",highlightBlack:"highlightBlack",highlightWhite:"highlightWhite",highlightGray:"highlightGray",strike:"strike",subscript:"subscript",superscript:"superscript",ins:"ins",del:"del",underline:"underline",doubleUnderline:"doubleUnderline",smallcaps:"smallcaps",circle:"circle",languageEmRed:"languageEmRed",languageEmOrange:"languageEmOrange",languageEmYellow:"languageEmYellow",languageEmGreen:"languageEmGreen",languageEmBlue:"languageEmBlue",languageEmPurple:"languageEmPurple",languageEmPink:"languageEmPink",languageEmBrown:"languageEmBrown",languageEmBlack:"languageEmBlack",languageEmWhite:"languageEmWhite",languageEmGray:"languageEmGray",languageEm:"languageEm",userUnderline:"userUnderline",userDoubleUnderline:"userDoubleUnderline",userStrike:"userStrike",userCircle:"userCircle",userHighlight:"userHighlight",notranslate:"notranslate",link:"link",ref:"ref",xref:"xref",extref:"extref",footnote:"footnote",footnoteStar:"footnote*",symbol:"symbol",var:"var",code:"code",timer:"timer",duration:"duration",color:"color",textStyle:"textStyle",colorPicker:"colorPicker",comment:"comment"}),Ue=(r(722),{text:"text",hardBreak:"hardBreak",paragraph:"paragraph",heading:"heading",section:"section",noBulletList:"noBulletList",bulletList:"bulletList",orderedList:"orderedList",orderedListRoman:"orderedListRoman",orderedListRomanLower:"orderedListRomanLower",letteredList:"letteredList",letteredListLower:"letteredListLower",taskList:"taskList",listItem:"listItem",taskItem:"taskItem",image:"image",imageInline:"imageInline",codeBlock:"codeBlock",latex:"latex",gap:"gap",select:"select",highlight:"highlight",mark:"mark"}),We=(r(722),{unknown:"unknown",__isDefaultExample:"__isDefaultExample",__typeAlias:"__typeAlias",action:"action",actionValue:"actionValue",activityType:"activityType",activityTypeValue:"activityTypeValue",additionalSolutions:"additionalSolutions",additionalSolutionsValue:"additionalSolutionsValue",advertisingClickUrl:"advertisingClickUrl",advertisingClickUrlValue:"advertisingClickUrlValue",ageRange:"ageRange",ageRangeValue:"ageRangeValue",aiGenerated:"aiGenerated",aiGeneratedValue:"aiGeneratedValue",alias:"alias",alignment:"alignment",allowedBit:"allowedBit",allowedBitValue:"allowedBitValue",allowPrint:"allowPrint",allowPrintValue:"allowPrintValue",alt:"alt",alternativeAnswers:"alternativeAnswers",alternativeAnswersValue:"alternativeAnswersValue",alternativeDefinitions:"alternativeDefinitions",alternativeDefinitionsValue:"alternativeDefinitionsValue",altLangTag:"altLangTag",altLangTagValue:"altLangTagValue",analyticsTag:"analyticsTag",analyticsTagValue:"analyticsTagValue",anchor:"anchor",answer:"answer",appLink:"appLink",attrs:"attrs",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",author:"author",authorFullName:"authorFullName",authorFullNameValue:"authorFullNameValue",authorJobTitle:"authorJobTitle",authorJobTitleValue:"authorJobTitleValue",authorPseudonym:"authorPseudonym",authorPseudonymValue:"authorPseudonymValue",authorTitle:"authorTitle",authorTitleValue:"authorTitleValue",authorValue:"authorValue",availableClassifications:"availableClassifications",availableClassificationsValue:"availableClassificationsValue",avatarImage:"avatarImage",backgroundWallpaper:"backgroundWallpaper",backgroundWallpaperValue:"backgroundWallpaperValue",backgroundImage:"backgroundImage",backgroundImageValue:"backgroundImageValue",bitLevel:"bitLevel",bitmarkAst:"bitmarkAst",bitmarkVersion:"bitmarkVersion",bits:"bits",bitsValue:"bitsValue",bitType:"bitType",bitFingerprint:"bitFingerprint",bitFingerprintValue:"bitFingerprintValue",blockId:"blockId",blockIdValue:"blockIdValue",body:"body",bodyBit:"bodyBit",bodyBits:"bodyBits",bodyJson:"bodyJson",bodyParts:"bodyParts",bodyPartsValue:"bodyPartsValue",bodyPartText:"bodyPartText",bodyText:"bodyText",bodyValue:"bodyValue",book:"book",bookAlias:"bookAlias",bookAliasValue:"bookAliasValue",bookAuthor:"bookAuthor",bookBindingType:"bookBindingType",bookDiff:"bookDiff",bookDiffValue:"bookDiffValue",bookIsbn:"bookIsbn",bookLanguage:"bookLanguage",bookNumberOfPages:"bookNumberOfPages",bookOriginalTitle:"bookOriginalTitle",bookPublisher:"bookPublisher",bookPublishingDate:"bookPublishingDate",bookRating:"bookRating",bookSeriesId:"bookSeriesId",bookSeriesNumber:"bookSeriesNumber",bookSeriesTitle:"bookSeriesTitle",bookTranslator:"bookTranslator",bookType:"bookType",bookValue:"bookValue",bot:"bot",botResponses:"botResponses",botResponsesValue:"botResponsesValue",botValue:"botValue",brandColor:"brandColor",brandColorName:"brandColorName",brandColorNameValue:"brandColorNameValue",brandColorValue:"brandColorValue",bubbleTag:"bubbleTag",bubbleTagValue:"bubbleTagValue",buttonCaption:"buttonCaption",buttonCaptionValue:"buttonCaptionValue",callToActionUrl:"callToActionUrl",callToActionUrlValue:"callToActionUrlValue",caption:"caption",captionDefinitionList:"captionDefinitionList",captionValue:"captionValue",cardBits:"cardBits",cardBitsValue:"cardBitsValue",cardNode:"cardNode",categoryTag:"categoryTag",categoryTagValue:"categoryTagValue",cells:"cells",cellsValue:"cellsValue",chatWithBook:"chatWithBook",chatWithBookBrainKey:"chatWithBookBrainKey",chatWithBookBrainKeyValue:"chatWithBookBrainKeyValue",chatWithBookValue:"chatWithBookValue",checked:"checked",choice:"choice",choices:"choices",choicesValue:"choicesValue",citationStyle:"citationStyle",citationStyleValue:"citationStyleValue",class:"class",classification:"classification",classificationValue:"classificationValue",codeLineNumbers:"codeLineNumbers",codeLineNumbersValue:"codeLineNumbersValue",codeMinimap:"codeMinimap",codeMinimapValue:"codeMinimapValue",color:"color",colorTag:"colorTag",colorTagValue:"colorTagValue",column:"column",columns:"columns",columnsValue:"columnsValue",comment:"comment",commentedBitType:"commentedBitType",computerLanguage:"computerLanguage",computerLanguageValue:"computerLanguageValue",content:"contentValue",content2Buy:"content2Buy",contentValue:"contentValue",contentValueValue:"contentValueValue",copyright:"copyright",coverColor:"coverColor",coverColorValue:"coverColorValue",coverImage:"coverImage",coverImageValue:"coverImageValue",currency:"currency",customerExternalId:"customerExternalId",customerId:"customerId",customerIdValue:"customerIdValue",customerProductId:"customerProductId",customerProductShopLink:"customerProductShopLink",data:"data",dataValue:"dataValue",dataValueValue:"dataValueValue",date:"date",dateEnd:"dateEnd",dateEndValue:"dateEndValue",dateValue:"dateValue",decimalPlaces:"decimalPlaces",deeplink:"deeplink",deeplinkValue:"deeplinkValue",definition:"definition",definitions:"definitions",definitionsValue:"definitionsValue",displayName:"displayName",displayNameValue:"displayNameValue",diffContext:"diffContext",diffContextValue:"diffContextValue",diffOp:"diffOp",diffOpValue:"diffOpValue",diffRef:"diffRef",diffRefValue:"diffRefValue",diffTime:"diffTime",diffTimeValue:"diffTimeValue",diffTo:"diffTo",diffToValue:"diffToValue",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",disableFeedbackValue:"disableFeedbackValue",document:"document",documentDownload:"documentDownload",documentEmbed:"documentEmbed",documentLink:"documentLink",duration:"duration",durationValue:"durationValue",elements:"elements",elementsValue:"elementsValue",elementsValueValue:"elementsValueValue",emphasis:"emphasis",end:"end",enforceUpdateOverUserInput:"enforceUpdateOverUserInput",enforceUpdateOverUserInputValue:"enforceUpdateOverUserInputValue",errors:"errors",errorsValue:"errorsValue",example:"example",exampleValue:"exampleValue",externalId:"externalId",externalIdValue:"externalIdValue",externalLink:"externalLink",externalLinkText:"externalLinkText",extractorExtractionTimestamp:"extractorExtractionTimestamp",extractorExtractionTimestampValue:"extractorExtractionTimestampValue",extractorTag:"extractorTag",extractorTagValue:"extractorTagValue",extractorInternal:"extractorInternal",extractorInternalValue:"extractorInternalValue",extraProperties:"extraProperties",feedback:"feedback",feedbackEngine:"feedbackEngine",feedbackEngineValue:"feedbackEngineValue",feedbacks:"feedbacks",feedbacksValue:"feedbacksValue",feedbackType:"feedbackType",flashcards:"flashcards",flashcardSet:"flashcardSet",flashcardSetValue:"flashcardSetValue",flashcardsValue:"flashcardsValue",focusX:"focusX",focusXValue:"focusXValue",focusY:"focusY",focusYValue:"focusYValue",footer:"footer",footerText:"footerText",footerValue:"footerValue",forKeys:"forKeys",format:"format",formula:"formula",formulaValue:"formulaValue",forValues:"forValues",forValuesValue:"forValuesValue",fullName:"fullName",fullNameValue:"fullNameValue",gap:"gap",gmbExternalShop:"gmbExternalShop",gmbExternalShopItems:"gmbExternalShopItems",groupTag:"groupTag",groupTagValue:"groupTagValue",gUri:"gUri",gUriValue:"gUriValue",handInAcceptFileType:"handInAcceptFileType",handInAcceptFileTypeValue:"handInAcceptFileTypeValue",handInInstruction:"handInInstruction",handInInstructionValue:"handInInstructionValue",handInRequirement:"handInRequirement",handInRequirementValue:"handInRequirementValue",hasBookNavigation:"hasBookNavigation",hasBookNavigationValue:"hasBookNavigationValue",hasMarkAsDone:"hasMarkAsDone",hasMarkAsDoneValue:"hasMarkAsDoneValue",hasPrintRestriction:"hasPrintRestriction",hasPrintRestrictionValue:"hasPrintRestrictionValue",head:"head",heading:"heading",height:"height",heightValue:"heightValue",highlight:"highlight",hint:"hint",hintValue:"hintValue",href:"href",icon:"icon",iconTag:"iconTag",iconTagValue:"iconTagValue",iconValue:"iconValue",id:"id",idValue:"idValue",iframeName:"iframeName",iframeSrc:"iframeSrc",image:"image",imageFirst:"imageFirst",imageFirstValue:"imageFirstValue",imageLandscape:"imageLandscape",imageLink:"imageLink",imagePlaceholder:"imagePlaceholder",imagePlaceholderValue:"imagePlaceholderValue",imagePortrait:"imagePortrait",imageSource:"imageSource",index:"index",indexValue:"indexValue",ingredients:"ingredients",ingredientsValue:"ingredientsValue",ingredient:"ingredient",ingredientValue:"ingredientValue",instruction:"instruction",instructionValue:"instructionValue",internalComment:"internalComment",internalCommentValue:"internalCommentValue",internalPrintPdf:"internalPrintPdf",internalPrintPdfValue:"internalPrintPdfValue",isCaseSensitive:"isCaseSensitive",isCollapsible:"isCollapsible",isCollapsibleValue:"isCollapsibleValue",isCommented:"isCommented",isCorrect:"isCorrect",isEditable:"isEditable",isEditableValue:"isEditableValue",isExample:"isExample",isInfoOnly:"isInfoOnly",isInfoOnlyValue:"isInfoOnlyValue",isPlain:"isPlain",isPublic:"isPublic",isPublicValue:"isPublicValue",isTemplate:"isTemplate",isTemplateStripTheme:"isTemplateStripTheme",isTemplateStripThemeValue:"isTemplateStripThemeValue",isTemplateValue:"isTemplateValue",isTracked:"isTracked",isTrackedValue:"isTrackedValue",item:"item",itemLead:"itemLead",itemValue:"itemValue",jobTitle:"jobTitle",jobTitleValue:"jobTitleValue",jupyterExecutionCount:"jupyterExecutionCount",jupyterExecutionCountValue:"jupyterExecutionCountValue",jupyterId:"jupyterId",jupyterIdValue:"jupyterIdValue",key:"key",keyAudio:"keyAudio",keyImage:"keyImage",kind:"kind",kindValue:"kindValue",label:"label",labelFalse:"labelFalse",labelFalseValue:"labelFalseValue",labelTrue:"labelTrue",labelTrueValue:"labelTrueValue",lang:"lang",language:"language",languageValue:"languageValue",langValue:"langValue",layer:"layer",layerRole:"layerRole",layerRoleValue:"layerRoleValue",layerValue:"layerValue",lead:"lead",leadValue:"leadValue",level:"level",levelACTFL:"levelACTFL",levelACTFLValue:"levelACTFLValue",levelCEFR:"levelCEFR",levelCEFRp:"levelCEFRp",levelCEFRpValue:"levelCEFRpValue",levelCEFRValue:"levelCEFRValue",levelILR:"levelILR",levelILRValue:"levelILRValue",license:"license",line:"line",list:"list",listItemIndent:"listItemIndent",listItemIndentValue:"listItemIndentValue",listPrice:"listPrice",listValue:"listValue",location:"location",locationValue:"locationValue",machineTranslated:"machineTranslated",machineTranslatedValue:"machineTranslatedValue",mailingList:"mailingList",marginNumber:"marginNumber",marginNumberValue:"marginNumberValue",mark:"mark",markConfig:"markConfig",markConfigValue:"markConfigValue",marks:"marks",marksValue:"marksValue",markup:"markup",matrix:"matrix",matrixValue:"matrixValue",maxCreatedBits:"maxCreatedBits",maxCreatedBitsValue:"maxCreatedBitsValue",maxDisplayLevel:"maxDisplayLevel",maxDisplayLevelValue:"maxDisplayLevelValue",maxTocChapterLevel:"maxTocChapterLevel",maxTocChapterLevelValue:"maxTocChapterLevelValue",message:"message",mockupId:"mockupId",name:"name",needsValidation:"needsValidation",needsValidationValue:"needsValidationValue",offset:"offset",options:"options",optionsValue:"optionsValue",original:"original",padletId:"padletId",padletIdValue:"padletIdValue",page:"page",pageNo:"pageNo",pageNoValue:"pageNoValue",pageNumber:"pageNumber",pageNumberValue:"pageNumberValue",pageValue:"pageValue",pairs:"pairs",pairsValue:"pairsValue",parent:"parent",parser:"parser",partialAnswer:"partialAnswer",partialAnswerValue:"partialAnswerValue",path:"path",pathValue:"pathValue",person:"person",platformBackgroundColor:"platformBackgroundColor",platformBackgroundColorValue:"platformBackgroundColorValue",platformBackgroundImage:"platformBackgroundImage",platformBackgroundImageValue:"platformBackgroundImageValue",platformBaseLayerColor:"platformBaseLayerColor",platformBaseLayerColorValue:"platformBaseLayerColorValue",platformBorderColor:"platformBorderColor",platformBorderColorValue:"platformBorderColorValue",platformBorderRadius:"platformBorderRadius",platformBorderRadiusValue:"platformBorderRadiusValue",platformBrandTarget:"platformBrandTarget",platformBrandTargetValue:"platformBrandTargetValue",platformButtonBackgroundColor:"platformButtonBackgroundColor",platformButtonBackgroundColorValue:"platformButtonBackgroundColorValue",platformButtonPrimaryColor:"platformButtonPrimaryColor",platformButtonPrimaryColorValue:"platformButtonPrimaryColorValue",platformIcon:"platformIcon",platformIconValue:"platformIconValue",platformLogo:"platformLogo",platformLogoMaxHeight:"platformLogoMaxHeight",platformLogoMaxHeightValue:"platformLogoMaxHeightValue",platformLogoValue:"platformLogoValue",platformMargin:"platformMargin",platformMarginValue:"platformMarginValue",platformMessageBackgroundColor:"platformMessageBackgroundColor",platformMessageBackgroundColorValue:"platformMessageBackgroundColorValue",platformName:"platformName",platformNameValue:"platformNameValue",platformNeedsShadow:"platformNeedsShadow",platformNeedsShadowValue:"platformNeedsShadowValue",platformPlaceholderColor:"platformPlaceholderColor",platformPlaceholderColorValue:"platformPlaceholderColorValue",platformPrimaryColor:"platformPrimaryColor",platformPrimaryColorValue:"platformPrimaryColorValue",platformScrollbarColor:"platformScrollbarColor",platformScrollbarColorValue:"platformScrollbarColorValue",platformSecondaryColor:"platformSecondaryColor",platformSecondaryColorValue:"platformSecondaryColorValue",platformSelectionBorderRadius:"platformSelectionBorderRadius",platformSelectionBorderRadiusValue:"platformSelectionBorderRadiusValue",platformSelectionColor:"platformSelectionColor",platformSelectionColorValue:"platformSelectionColorValue",platformSelectionTextColor:"platformSelectionTextColor",platformSelectionTextColorValue:"platformSelectionTextColorValue",platformSeparatorColor:"platformSeparatorColor",platformSeparatorColorValue:"platformSeparatorColorValue",platformTextSelectionColor:"platformTextSelectionColor",platformTextSelectionColorValue:"platformTextSelectionColorValue",pointerLeft:"pointerLeft",pointerLeftValue:"pointerLeftValue",pointerTop:"pointerTop",pointerTopValue:"pointerTopValue",posterImage:"posterImage",posterImageValue:"posterImageValue",postfix:"postfix",prefix:"prefix",previewImage:"previewImage",previewImageValue:"previewImageValue",previewVideo:"previewVideo",previewVideoValue:"previewVideoValue",printParentChapterLevel:"printParentChapterLevel",printParentChapterLevelValue:"printParentChapterLevelValue",printOnRequestCustomerId:"printOnRequestCustomerId",printOnRequestCustomerIdValue:"printOnRequestCustomerIdValue",printOnRequestProductId:"printOnRequestProductId",printOnRequestProductIdValue:"printOnRequestProductIdValue",processHandIn:"processHandIn",processHandInLocation:"processHandInLocation",processHandInLocationValue:"processHandInLocationValue",processHandInValue:"processHandInValue",product:"product",productFolder:"productFolder",productFolderValue:"productFolderValue",productId:"productId",productIdValue:"productIdValue",productList:"productList",productListValue:"productListValue",productValue:"productValue",productVideo:"productVideo",productVideoList:"productVideoList",productVideoListValue:"productVideoListValue",productVideoValue:"productVideoValue",progress:"progress",progressValue:"progressValue",pronunciationTable:"pronunciationTable",properties:"properties",property:"property",propertyKey:"propertyKey",propertyValue:"propertyValue",propertyValues:"propertyValues",provider:"provider",pseudonym:"pseudonym",pseudonymValue:"pseudonymValue",publications:"publications",publicationsValue:"publicationsValue",publisher:"publisher",publisherName:"publisherName",publisherNameValue:"publisherNameValue",publisherValue:"publisherValue",quantity:"quantity",question:"question",questions:"questions",questionsValue:"questionsValue",questionValue:"questionValue",quizCountItems:"quizCountItems",quizCountItemsValue:"quizCountItemsValue",quizStrikethroughSolutions:"quizStrikethroughSolutions",quizStrikethroughSolutionsValue:"quizStrikethroughSolutionsValue",quizzes:"quizzes",quizzesValue:"quizzesValue",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelSelectedValue:"ratingLevelSelectedValue",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reason:"reason",reasonableNumOfChars:"reasonableNumOfChars",reasonableNumOfCharsValue:"reasonableNumOfCharsValue",reductionTag:"reductionTag",reductionTagValue:"reductionTagValue",refAuthor:"refAuthor",refBookTitle:"refBookTitle",reference:"reference",referenceEnd:"referenceEnd",referenceProperty:"referenceProperty",referencePropertyValue:"referencePropertyValue",refPublicationYear:"refPublicationYear",refPublisher:"refPublisher",relatedBook:"relatedBook",relatedBookValue:"relatedBookValue",translationOfBook:"translationOfBook",translationOfBookValue:"translationOfBookValue",userFeedbackTranslationUrl:"userFeedbackTranslationUrl",userFeedbackTranslationUrlValue:"userFeedbackTranslationUrlValue",userFeedbackContentUrl:"userFeedbackContentUrl",userFeedbackContentUrlValue:"userFeedbackContentUrlValue",releaseDate:"releaseDate",releaseDateValue:"releaseDateValue",releaseKind:"releaseKind",releaseKindValue:"releaseKindValue",releaseVersion:"releaseVersion",releaseVersionValue:"releaseVersionValue",reportTag:"reportTag",reportTagValue:"reportTagValue",resolved:"resolved",resolvedBy:"resolvedBy",resolvedByValue:"resolvedByValue",resolvedDate:"resolvedDate",resolvedDateValue:"resolvedDateValue",resolvedValue:"resolvedValue",resources:"resources",resourcesValue:"resourcesValue",resourceType:"resourceType",response:"response",responses:"responses",responsesValue:"responsesValue",revealSolutions:"revealSolutions",reviewTag:"reviewTag",reviewTagValue:"reviewTagValue",reviewerTag:"reviewerTag",reviewerTagValue:"reviewerTagValue",rightsPolicy:"rightsPolicy",rightsPolicyValue:"rightsPolicyValue",root:"root",rows:"rows",rowsValue:"rowsValue",rtl:"rtl",rtlValue:"rtlValue",rubric:"rubric",rubricValue:"rubricValue",sampleSolution:"sampleSolution",sampleSolutionValue:"sampleSolutionValue",scormSource:"scormSource",scormSourceValue:"scormSourceValue",search:"search",searchIndex:"searchIndex",searchIndexValue:"searchIndexValue",searchValue:"searchValue",section:"section",select:"select",selected:"selected",servings:"servings",servingsValue:"servingsValue",showInIndex:"showInIndex",showInIndexValue:"showInIndexValue",size:"size",slug:"slug",slugValue:"slugValue",solution:"solution",solutions:"solutions",solutionsValue:"solutionsValue",sourceBB:"sourceBB",sourceBBValue:"sourceBBValue",sourceDocument:"sourceDocument",sourceDocumentValue:"sourceDocumentValue",sourceRL:"sourceRL",sourceRLValue:"sourceRLValue",spaceId:"spaceId",spaceIdValue:"spaceIdValue",spansPageBreak:"spansPageBreak",spansPageBreakValue:"spansPageBreakValue",src:"src",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",srcAlt:"srcAlt",srcAltValue:"srcAltValue",start:"start",statement:"statement",statementValue:"statementValue",statements:"statements",statementsValue:"statementsValue",statementText:"statementText",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",stripePricingTableId:"stripePricingTableId",stripePricingTableIdValue:"stripePricingTableIdValue",stripePricingTableDescriptiveName:"stripePricingTableDescriptiveName",stripePricingTableDescriptiveNameValue:"stripePricingTableDescriptiveNameValue",stripePublishableKey:"stripePublishableKey",stripePublishableKeyValue:"stripePublishableKeyValue",subject:"subject",subjectValue:"subjectValue",subtitle:"subtitle",subtitleValue:"subtitleValue",subtype:"subtype",subtypeValue:"subtypeValue",table:"table",tableAutoWidth:"tableAutoWidth",tableAutoWidthValue:"tableAutoWidthValue",tableColWidth:"tableColWidth",tableColWidthValue:"tableColWidthValue",tableColumnMinWidth:"tableColumnMinWidth",tableColumnMinWidthValue:"tableColumnMinWidthValue",tableFixedHeader:"tableFixedHeader",tableFixedHeaderValue:"tableFixedHeaderValue",tableHeaderWhitespaceNoWrap:"tableHeaderWhitespaceNoWrap",tableHeaderWhitespaceNoWrapValue:"tableHeaderWhitespaceNoWrapValue",tableHeight:"tableHeight",tableHeightValue:"tableHeightValue",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tablePaginationLimitValue:"tablePaginationLimitValue",tablePaginationValue:"tablePaginationValue",tableResizableColumns:"tableResizableColumns",tableResizableColumnsValue:"tableResizableColumnsValue",tableSearch:"tableSearch",tableSearchValue:"tableSearchValue",tableSort:"tableSort",tableSortValue:"tableSortValue",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tableWhitespaceNoWrapValue:"tableWhitespaceNoWrapValue",tag:"tag",tagValue:"tagValue",target:"target",targetValue:"targetValue",technicalTerm:"technicalTerm",technicalTermValue:"technicalTermValue",term:"term",text:"text",textAlign:"textAlign",textAst:"textAst",textAstValue:"textAstValue",textFormat:"textFormat",textReference:"textReference",textReferenceValue:"textReferenceValue",texts:"texts",textsValue:"textsValue",theme:"theme",themeValue:"themeValue",thumbImage:"thumbImage",thumbImageValue:"thumbImageValue",thumbnails:"thumbnails",thumbnailsValue:"thumbnailsValue",title:"title",titleString:"titleString",titleValue:"titleValue",toc:"toc",tocContent:"tocContent",tocContentValue:"tocContentValue",tocResource:"tocResource",tocResourceValue:"tocResourceValue",tocValue:"tocValue",topicTag:"topicTag",topicTagValue:"topicTagValue",translationOf:"translationOf",translationOfValue:"translationOfValue",trim:"trim",type:"type",unit:"unit",unitAbbr:"unitAbbr",unitAbbrPlural:"unitAbbrPlural",unitPlural:"unitPlural",url:"url",validationDate:"validationDate",validationDateValue:"validationDateValue",value:"value",values:"values",valuesValue:"valuesValue",vendorDashboardId:"vendorDashboardId",vendorDashboardIdValue:"vendorDashboardIdValue",vendorSurveyId:"vendorSurveyId",vendorSurveyIdValue:"vendorSurveyIdValue",vendorUrl:"vendorUrl",vendorUrlValue:"vendorUrlValue",version:"version",video:"video",videoCallLink:"videoCallLink",videoCallLinkValue:"videoCallLinkValue",videoEmbed:"videoEmbed",videoLink:"videoLink",warnings:"warnings",warningsValue:"warningsValue",websiteLink:"websiteLink",width:"width",widthValue:"widthValue",x:"x",xValue:"xValue",y:"y",yValue:"yValue",zoomDisabled:"zoomDisabled"}),Ge=class{constructor(){qe()}walk(e,t,r,i){this.walkRecursive(e,[{index:0,key:t,value:e}],r,i)}getRouteKey(e){return e.reduce((t,r,i)=>(+r.key!==r.index&&(t+=`${r.key}`,i<e.length-1&&(t+="_")),t),"")}printTree(e,t=We.bitmarkAst){this.walkRecursive(e,[{index:0,key:t,value:e}],{enter:(e,t)=>(console.log("Enter: "+this.getRouteKey(t)),t[t.length-1].key!==We.bodyJson),between:(e,t,r,i)=>{console.log("Between: "+this.getRouteKey(i))},exit:(e,t)=>{console.log("Exit: "+this.getRouteKey(t))},leaf:(e,t)=>{console.log("Leaf: "+this.getRouteKey(t))}},void 0)}preprocessAst(e){if(me.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return}}if(this.isAst(e))return e}isAst(e){return!(!Object.prototype.hasOwnProperty.call(e,"bits")||!Array.isArray(e.bits))}walkRecursive(e,t,r,i){const{enter:o,between:a,exit:s,leaf:n}=r,l=t[t.length-1].key,c=!this.isValue(e),p=t[t.length-1];if(c){if(o){if(!1===o(p,t,i))return}}else n&&n(p,t,i);if(c){const o=this.isArray(e),s=Object.keys(e);for(let n=0,c=s.length;n<c;n++){const d=s[n],u=n===c-1,m=e,h=m[d];if(null!=h){const e={key:this.getAstKey(d,l,o),index:n,value:h},c=t.slice();if(c.push(e),this.walkRecursive(h,c,r,i),!u){const r=s[n+1],c=m[r],d={key:this.getAstKey(r,l,o),index:n+1,value:c};if(a){if(!1===a(p,e,d,t,i))break}}}}}c&&s&&s(p,t,i)}getAstKey(e,t,r){let i=e;return r&&t&&(i=`${t}Value`),(0,Me.Enum)(We).fromKey(i)||`unknown(${i})`}isArray(e){return Array.isArray(e)}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isValue(e){return!this.isObject(e)&&!this.isArray(e)}},Ye=r(722),Qe=(r(722),"tag"),Ze="body",Xe=(r(722),{plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkPlusPlus:"bitmark++"}),et=/([*`_!=])(?=\1)/,tt=/(\^*])/,rt=/(\^+)/,it=`${tt.source}|${rt.source}`,ot=`${et.source}|${/^(\|)(code[\s]*|code:|image:|[\s]*$)/.source}|${/^([#]{1,3})([^\S\r\n]+)/.source}|${/^(•)([0-9]+[iI]*|[a-zA-Z]{1}|_|\+|-|)([^\S\r\n]+)/.source}|${/(\[)([.@#▼►%!?+\-$_=&])/.source}|${/^(~)(~~~[ \t]*)$/.source}|${/^(\$)(\$\$\$[ \t]*)$/.source}|${rt.source}`,at=`${/^(\[)(\^*)(\.)/.source}`,st=new RegExp(`${et.source}|${tt.source}|${rt.source}`,"gm"),nt=new RegExp(it,"gm"),lt=new RegExp(ot,"gm"),ct=new RegExp(at,"gm"),pt=new RegExp("^(?:(\\[)(\\^*)(\\.))|(\\^+)","gm"),dt=new RegExp("\\^([\\^]*)","gm"),ut=new RegExp("^(\\[)\\^(\\^*)(\\.)","gm"),mt=new RegExp("^(\\||•|#)","gm"),ht={format:Xe.bitmarkPlusPlus,location:Ze,v2:!1};function gt(e){return"string"==typeof e||e instanceof String}var ft={format:C.bitmarkText,location:Ze,inPlaceArray:!1,v2:!1},yt=new class{constructor(){l(this,"EMPTY_STRING","")}breakscape(e,t={}){if(null==e)return;const r=Object.assign({},ht,t);if(Array.isArray(e))return e.map(e=>this.breakscape(e,r));if(!gt(e))return e;const{regex:i,replacer:o}=function(e,t,r=!1){return t===Qe?r||e!==Xe.bitmarkPlusPlus?{regex:nt,replacer:"$2^$1"}:{regex:st,replacer:"$1$3^$2"}:e===Xe.bitmarkPlusPlus?r?{regex:pt,replacer:"$1$4^$2$3"}:{regex:lt,replacer:"$1$2$4$6$9$11$13$15^$3$5$7$8$10$12$14"}:{regex:ct,replacer:"$1^$2$3"}}(r.format,r.location,r.v2);let a=e;return a=a.replace(i,o),a}unbreakscape(e,t={}){if(null==e)return;const r=Object.assign({},ht,t);if(Array.isArray(e))return e.map(e=>this.unbreakscape(e,r));if(!gt(e))return e;const{regex:i,replacer:o}=function(e,t){const r=e!==Xe.bitmarkPlusPlus;return t===Ze&&r?{regex:ut,replacer:"$1$2$3"}:{regex:dt,replacer:"$1"}}(r.format,r.location);let a=e;return a=a.replace(i,o),a}breakscapeCode(e,t){if(null==e)return e;const r=Object.assign({},ht,t),i=e=>e?e.replace(mt,"$1^"):e;if(Array.isArray(e)){const t=r.inPlaceArray?e:[e.length];for(let t=0,r=e.length;t<r;t++){const r=e[t];gt(r)&&(e[t]=i(r))}e=t}else gt(e)&&(e=i(e));return e}version(){return Ie}license(){return Pe}},bt=new class{constructor(){l(this,"EMPTY_STRING","")}breakscape(e,t){const r=Object.assign({},ft,t);return yt.breakscape(e,{format:r.format,location:r.location,inPlaceArray:r.inPlaceArray,v2:r.v2})}unbreakscape(e,t){const r=Object.assign({},ft,t);return yt.unbreakscape(e,r)}breakscapeCode(e,t){const r=Object.assign({},ft,t);return yt.breakscapeCode(e,r)}concatenate(e,t){return e+t}},kt=(r(722),{bitmarkMinusMinus:"bitmark--"});function xt(e){const t={};if(e.columns&&e.columns.length>0&&(t.header={rows:[{cells:e.columns.map(e=>({content:e,title:!0}))}]}),e.data&&e.data.length>0&&(t.body={rows:e.data.map(e=>({cells:e.map(e=>({content:e}))}))}),Array.isArray(e.columnWidths)&&e.columnWidths.length>0){const r=t.header?.rows[0]?.cells??t.body?.rows[0]?.cells;if(r)for(let t=0;t<e.columnWidths.length;t++){const i=e.columnWidths[t];"number"==typeof i&&i>0&&r[t]&&(r[t].colwidth=i)}}return t}function vt(e){const t={},r=e=>e&&Array.isArray(e.cells)?e.cells.map(e=>e?.content).filter(e=>void 0!==e):[],i=[],o=[];let a=!1,s=0;const n=e=>{e&&(e.length>s&&(s=e.length),e.forEach((e,t)=>{e&&"number"==typeof e.colwidth&&e.colwidth>0&&(o[t]=e.colwidth,a=!0)}))},l=e.header?.rows??[];if(l.forEach(e=>n(e?.cells)),(e.body?.rows??[]).forEach(e=>n(e?.cells)),(e.footer?.rows??[]).forEach(e=>n(e?.cells)),l.length>0){const e=r(l[0]);e.length>0&&(t.columns=e);l.slice(1).forEach(e=>{const t=r(e);t.length>0&&i.push(t)})}const c=e=>{e&&Array.isArray(e.rows)&&e.rows.forEach(e=>{const t=r(e);t.length>0&&i.push(t)})};if(c(e.body),c(e.footer),i.length>0&&(t.data=i),a){const e=t.columns?.length??s,r=new Array(e).fill(null);for(let t=0;t<e;t++){const e=o[t];"number"==typeof e&&(r[t]=e)}t.columnWidths=r}return t}function Tt(e,t){if(function(e){const t=e,r=!(!t.columns&&!t.data),i=!!(t.header||t.body||t.footer);return r&&i}(t)){const e=t;delete e.columns,delete e.data}const r=Be.isOfBitType(e,d.tableExtended)||Be.isOfBitType(e,d.tableImage);return r&&function(e){const t=e;return!(!t.columns&&!t.data||t.header||t.body||t.footer)}(t)?xt(t):!r&&function(e){const t=e;return!!(t.header||t.body||t.footer)}(t)?vt(t):t}var _t=new class{asArray(e){if(null!=e)return Array.isArray(e)?e:[e]}asSingle(e,t){if(null!=e)return Array.isArray(e)?e.length>0?t?e[e.length-1]:e[0]:void 0:e}removeDuplicates(e,t){const r=new Set;let i=0;for(let o=0;o<e.length;o++){const a=e[o],s=t?t(a):a;r.has(s)||(r.add(s),i!==o&&(e[i]=a),i++)}return i<e.length&&(e.length=i),e}},Ct=r(722),wt=(r(722),{v2:2,v3:3}),At=wt.v3,Bt=class{constructor(){l(this,"ast",new Ge),l(this,"debugGenerationInline",!1),l(this,"printed",!1)}enter(e,t,r){let i;const o=this,a=`enter_${e.key}`;return this.printed||(this.printed=!0),this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof o[a]&&(i=o[a](e,t,r)),i}between(e,t,r,i,o){let a;const s=this,n=`between_${e.key}`;return this.debugGenerationInline&&this.writeInlineDebug(e.key,{single:!0}),"function"==typeof s[n]&&(a=s[n](e,t,r,i,o)),a}exit(e,t,r){const i=this,o=`exit_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0}),"function"==typeof i[o]&&i[o](e,t,r)}leaf(e,t,r){const i=this,o=`leaf_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof i[o]&&i[o](e,t,r),this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0})}getParentNode(e,t=1){if(e.length>t)return e[e.length-t-1]}getSiblingNodes(e){const t=this.getParentNode(e);if(!t||!t.value||!Array.isArray(t.value))return{};const r=t.value,i=r.findIndex(t=>t===e[e.length-1]?.value);return-1===i?{}:{left:i>0?r[i-1]:void 0,right:i<r.length-1?r[i+1]:void 0}}isEmptyParagraph(e){if(!e)return!1;if(e.type!==Ue.paragraph)return!1;if(!e.content||!Array.isArray(e.content))return!0;for(const t of e.content){if(t.type!==Ue.text)return!1;if(t.text&&""!==t.text.trim())return!1}return!0}},St={bodyBitCallback:void 0,debugGenerationInline:!1},It="==",Pt=["*","`","_","!","="],Et={[He.bold]:"**",[He.light]:"``",[He.italic]:"__",[He.highlight]:"!!"},Lt=[He.bold,He.light,He.italic,He.highlight],Vt=[He.highlightOrange,He.highlightYellow,He.highlightGreen,He.highlightBlue,He.highlightPurple,He.highlightPink,He.highlightBrown,He.highlightBlack,He.highlightWhite,He.highlightGray,He.strike,He.subscript,He.superscript,He.ins,He.del,He.underline,He.doubleUnderline,He.smallcaps,He.circle,He.languageEmRed,He.languageEmOrange,He.languageEmYellow,He.languageEmGreen,He.languageEmBlue,He.languageEmPurple,He.languageEmPink,He.languageEmBrown,He.languageEmBlack,He.languageEmWhite,He.languageEmGray,He.languageEm,He.userUnderline,He.userDoubleUnderline,He.userStrike,He.userCircle,He.userHighlight,He.notranslate,He.link,He.ref,He.xref,He.extref,He.footnote,He.footnoteStar,He.symbol,He.var,He.code,He.timer,He.color,He.textStyle,He.colorPicker,He.comment],Nt=["orange","yellow","green","blue","purple","pink","brown","white","black","gray"],Rt=new RegExp(/(\n|\r\n)/,"g"),Ft=new RegExp(/https?:\/\/|mailto:(.*)/,"g"),Kt=new RegExp(/\]/,"g"),$t="enter",Ot="between",Jt="exit",Dt=class e extends Bt{constructor(t,r){super(),l(this,"ast",new Ge),l(this,"bitmarkVersion"),l(this,"options"),l(this,"internalTextGenerator",null),l(this,"generateOptions",{}),l(this,"textFormat",C.bitmarkText),l(this,"textLocation",Ze),l(this,"writerText",""),l(this,"nodeIndex",0),l(this,"currentIndent",0),l(this,"prevIndent",0),l(this,"indentationStringCache",""),l(this,"inParagraph",!1),l(this,"inHeading",!1),l(this,"inCodeBlock",!1),l(this,"inBulletList",!1),l(this,"inInline",!1),l(this,"markDepth",0),l(this,"textDepth",0),l(this,"placeholderIndex",0),l(this,"placeholders",{}),l(this,"rootParagraphNodeContentIndex",0),l(this,"previousRootParagraphContextType",Ue.text),l(this,"inPreText",!1),l(this,"thisNodeIsPreText",!1),l(this,"preTextIndexTemp",-1),l(this,"havePreText",!1),l(this,"preTextIndex",-1),this.bitmarkVersion=(0,Ct.Enum)(wt).fromValue(t)??At,this.options={...St,...r},this.debugGenerationInline=this.options.debugGenerationInline??!1,this.bitmarkVersion,wt.v2,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.options.isInternal||(this.internalTextGenerator=new e(t,{...this.options,writeCallback:void 0,isInternal:!0}))}async generate(e,t,r,i){return this.generateSync(e,t,r,i)}generateSync(e,t,r,i){if(!e||!Array.isArray(e))return"";if(this.generateOptions=Object.assign({},i),this.validateGenerateOptions(e),this.generateOptions.plainTextDividerAllowed){const i=this.options.writeCallback,o=this.options.bodyBitCallback;this.options.writeCallback=void 0,this.options.bodyBitCallback=void 0,this.resetState(t,r),this.walkAndWrite(e),this.options.writeCallback=i,this.options.bodyBitCallback=o;const a=this.havePreText,s=this.preTextIndex;this.resetState(t,r),this.havePreText=a,this.preTextIndex=s,this.walkAndWrite(e)}else this.resetState(t,r),this.walkAndWrite(e);return this.writerText}getPlaceholders(){return this.placeholders}resetState(e,t){this.printed=!1,this.textFormat=e??C.bitmarkText,this.textLocation=t,this.writerText="",this.nodeIndex=0,this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inParagraph=!1,this.inHeading=!1,this.inCodeBlock=!1,this.inBulletList=!1,this.inInline=!1,this.markDepth=0,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=Ue.hardBreak,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1}walkAndWrite(e){this.ast.walk(e,We.textAst,this,void 0)}enter_textAstValue(e,t){return this.handleEnterNode(e.value,t)}between_textAstValue(e,t,r,i){return this.handleBetweenNode(e.value,t,r,i)}exit_textAstValue(e,t){return this.handleExitNode(e.value,t)}enter_contentValue(e,t){return this.handleEnterContentValueNode(e,t)}between_contentValue(e,t,r,i){this.handleBetweenContentValueNode(e,t,r,i)}exit_contentValue(e,t){this.handleExitContentValueNode(e,t)}enter_contentValueValue(e,t){return this.handleEnterNode(e.value,t)}between_contentValueValue(e,t,r,i){this.handleBetweenNode(e.value,t,r,i)}exit_contentValueValue(e,t){return this.handleExitNode(e.value,t)}enter_marks(e,t){this.markDepth++}exit_marks(e,t){this.markDepth--}handleEnterNode(e,t){if(!(this.markDepth>0))switch(this.handleEnterNodePreTextCheck(e,t),this.handleIndent(e),e.type){case Ue.paragraph:this.inParagraph=!0,this.writeParagraph(e,t);break;case Ue.hardBreak:this.writeHardBreak(e);break;case Ue.text:this.writeMarks(e,$t),this.writeText(e),this.writeMarks(e,Ot),0===this.textDepth&&(this.inInline=!0),this.textDepth++;break;case Ue.heading:this.writeHeading(e),this.inHeading=!0;break;case Ue.section:this.writeSection(e);break;case Ue.listItem:case Ue.taskItem:this.writeBullet(e,t);break;case Ue.image:case Ue.imageInline:this.writeImage(e);break;case Ue.codeBlock:this.inCodeBlock=!0,this.writeCodeBlock(e);break;case Ue.latex:this.writeLatex(e);break;case Ue.noBulletList:case Ue.bulletList:case Ue.orderedList:case Ue.orderedListRoman:case Ue.orderedListRomanLower:case Ue.letteredList:case Ue.letteredListLower:case Ue.taskList:this.inBulletList=!0;break;case Ue.gap:case Ue.select:case Ue.highlight:case Ue.mark:return this.writeBodyBit(e,t),!1}}handleBetweenNode(e,t,r,i){e.type}handleExitNode(e,t){if(!(this.markDepth>0)){switch(e.type){case Ue.text:this.textDepth--,0===this.textDepth&&(this.inInline=!1),this.writeMarks(e,Jt);break;case Ue.paragraph:this.writeNL(),this.inParagraph=!1;break;case Ue.heading:this.inHeading=!1;case Ue.section:case Ue.image:this.inParagraph||(this.writeNL(),this.writeNL());break;case Ue.codeBlock:this.writeNL(),this.writeNL(),this.inCodeBlock=!1;break;case Ue.noBulletList:case Ue.bulletList:case Ue.orderedList:case Ue.orderedListRoman:case Ue.orderedListRomanLower:case Ue.letteredList:case Ue.letteredListLower:case Ue.taskList:this.currentIndent<=1&&(this.writeNL(),this.inBulletList=!1)}this.handleDedent(e),this.nodeIndex++}}handleIndent(e){switch(e.type){case Ue.noBulletList:case Ue.bulletList:case Ue.orderedList:case Ue.orderedListRoman:case Ue.orderedListRomanLower:case Ue.letteredList:case Ue.letteredListLower:case Ue.taskList:this.currentIndent++}}handleDedent(e){switch(e.type){case Ue.noBulletList:case Ue.bulletList:case Ue.orderedList:case Ue.orderedListRoman:case Ue.orderedListRomanLower:case Ue.letteredList:case Ue.letteredListLower:case Ue.taskList:this.currentIndent--}}handleEnterContentValueNode(e,t){3===t.length&&(this.thisNodeIsPreText=!0,this.inPreText=!1,this.previousRootParagraphContextType=Ue.hardBreak)}handleBetweenContentValueNode(e,t,r,i){if(3===i.length){const e=t.value;this.updatePreTextState(),this.thisNodeIsPreText=!0,this.previousRootParagraphContextType=e.type,this.rootParagraphNodeContentIndex++}}handleExitContentValueNode(e,t){3===t.length&&(this.updatePreTextState(),this.thisNodeIsPreText=!1,this.generateOptions.plainTextDividerAllowed&&this.inPreText&&(this.havePreText=!0,this.preTextIndex=this.preTextIndexTemp),this.inPreText=!1)}updatePreTextState(){!this.inPreText&&this.thisNodeIsPreText&&this.previousRootParagraphContextType===Ue.hardBreak?(this.inPreText=!0,this.preTextIndexTemp=this.rootParagraphNodeContentIndex):this.inPreText&&!this.thisNodeIsPreText&&(this.inPreText=!1,this.preTextIndexTemp=-1)}handleEnterNodePreTextCheck(e,t){if(4===t.length){if(this.inPreText&&e.type===Ue.hardBreak)return;if(e.type===Ue.text)return}this.thisNodeIsPreText=!1}getLinkHref(e){if(e.type===Ue.text&&e.marks){const t=e.marks.reduce((e,t)=>{if(t.type===He.link){const e=t,r=e.attrs?.href;if(r)return r}return e},"");if(t)return t}return!1}getIndentationString(){if(this.currentIndent===this.prevIndent)return this.indentationStringCache;let e="";for(let t=1;t<this.currentIndent;t++)e+="\t";return this.indentationStringCache=e,this.prevIndent=this.currentIndent,e}writeBodyBit(e,t){const r=`[!${this.placeholderIndex}]`;if(this.placeholders[r]=e,this.options.bodyBitCallback){const r=this.options.bodyBitCallback(e,this.placeholderIndex,t);this.write(r)}else this.write(r);this.placeholderIndex++}writeText(e){if(null==e.text)return;const t=this.inCodeBlock;let r=e.text;const i=this.getLinkText(e);if(i&&(r=i),r=i||this.breakscape(r,{format:this.textFormat,location:this.textLocation}),this.currentIndent>1){const e=this.getIndentationString();r=r.replace(Rt,`$1${e}`)}if(this.havePreText&&this.rootParagraphNodeContentIndex===this.preTextIndex&&(this.writePlainTextDivider(),this.writeNL()),this.havePreText&&this.rootParagraphNodeContentIndex>=this.preTextIndex){const t=this.breakscape(e.text,{format:C.plainText,location:this.textLocation});this.write(t)}else this.write(r);(this.currentIndent>1||t)&&(this.thisNodeIsPreText=!1),this.inPreText||e.text!==r||(this.thisNodeIsPreText=!1)}isSimpleLink(e){if(null==e.text)return!1;if(1!==e.marks?.length)return!1;const t=this.getLinkHref(e);if(t){return t.replace(Ft,"$1")===e.text}return!1}getLinkText(e){if(null==e.text)return!1;const t=this.getLinkHref(e);if(t){let r;return r=t.replace(Ft,"$1")===e.text?t:e.text,r=(r??"").replace(Kt,"^]"),r}return!1}getInterTextBreakscape(e){if(this.bitmarkVersion===wt.v2)return"";if(this.textFormat===C.plainText)return"";const t=this.writerText.slice(-1),r=e.slice(0,1);return t===r&&-1!==Pt.indexOf(t)||this.textLocation===Ze&&"["===t&&-1!=="@#▼►%!?+-$_=&".indexOf(r)?"^":""}validateGenerateOptions(e){this.generateOptions.plainTextDividerAllowed&&(1!==e.length||1===e.length&&e[0].type!==Ue.paragraph)&&(this.generateOptions.plainTextDividerAllowed=!1)}writeMarks(e,t){if(e.marks){const r=this.generateOptions.forceInline||!(!this.inInline&&!this.inHeading);this.thisNodeIsPreText=!1;if(0===e.marks.length)return void this.writeMarkTextWrapper(It);const i=this.getWritableMarks(e.marks);if(0===i.length)return;const o=1===i.length&&r,a=i.reduce((e,t)=>e||(this.isStandardMark(t)?o?Et[t.type]:It:this.isInlineMark(t)?It:e),void 0),s=this.isSimpleLink(e);if(null!=a&&!s){if(t!=$t&&t!=Ot||this.writeMarkTextWrapper(a),t==Ot)for(const e of i)this.isStandardMark(e)?o||(this.writeInlineMarkStartEnd(),this.writeInlineMark(e)):He.comment===e.type?(this.writeInlineMarkStartEnd(),this.writeCommentMark(e)):He.link===e.type?(this.writeInlineMarkStartEnd(),this.writeLinkMark(e)):He.ref===e.type?(this.writeInlineMarkStartEnd(),this.writeRefMark(e)):He.xref===e.type?(this.writeInlineMarkStartEnd(),this.writeXRefMark(e)):He.extref===e.type?(this.writeInlineMarkStartEnd(),this.writeExtRefMark(e)):He.footnote===e.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteMark(e)):He.footnoteStar===e.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteStarMark(e)):He.symbol===e.type?(this.writeInlineMarkStartEnd(),this.writeSymbolMark(e)):this.isInlineMark(e)&&(this.writeInlineMarkStartEnd(),this.writeInlineMark(e));if(t==Jt){let e=!1;for(const t of i)this.isStandardMark(t)?o||(e=!0):(He.comment===t.type||He.link===t.type||He.ref===t.type||He.xref===t.type||He.footnote===t.type||He.footnoteStar===t.type||this.isInlineMark(t))&&(e=!0);e&&this.writeInlineMarkStartEnd()}}}}writeParagraph(e,t){if(this.textFormat===C.bitmarkText){if(this.inBulletList)return;const r=this.getSiblingNodes(t),i=r.left?.type,o=this.textLocation===Ze,a=this.isEmptyParagraph(e);if(!o||!a&&i!==Ue.codeBlock&&i!==Ue.paragraph)return;this.write("|"),this.writeNL(),i===Ue.codeBlock&&this.writeNL()}}writeHardBreak(e){if(this.writeNL(),this.currentIndent>1){const e=this.getIndentationString();this.write(e)}}writeHeading(e){let t="";const r=e.attrs?.level??1;for(let e=0;e<+r;e++)t+="#";t+=" ",this.write(t)}writeSection(e){let t="";t=e.section?`|${e.section}: `:"|",this.write(t)}writeBullet(e,t){let r=this.getIndentationString();const i=this.getParentNode(t,2),o=i?.value,a=o?.type,s=o?.attrs?.start??1;if(a===Ue.bulletList)r+="• ";else if(a===Ue.noBulletList)r+="•_ ";else if(a===Ue.orderedList)r+=`•${s} `;else if(a===Ue.orderedListRoman)r+=`•${s}I `;else if(a===Ue.orderedListRomanLower)r+=`•${s}i `;else if(a===Ue.letteredList)r+="•A ";else if(a===Ue.letteredListLower)r+="•a ";else if(a===Ue.taskList){const t=e;r+=t.attrs?.checked??!1?"•+ ":"•- "}r&&this.write(r)}writeImage(e){if(null==e.attrs||!e.attrs.src)return;const t=e.attrs,r=e.type===Ue.imageInline;let i;if(r){i=new Set(["alt","zoomDisabled","title"]);const e=t;"top"===e.alignmentVertical&&i.add("alignmentVertical"),"line-height"===e.size&&i.add("size")}const o=this.getMediaAttrs(r?"imageInline":"image",t,{ignoreAttributes:i});let a="";r&&(a=`==${t.alt??""}==`),a+=o?`|${o}|`:"",this.write(a)}writeCodeBlock(e){if(null==e.attrs||!e.attrs.language)return;const t=`|code:${e.attrs.language}\n`;this.write(t)}writeLatex(e){if(null==e.attrs||!e.attrs.formula)return;const t=e.attrs,r=`==${this.breakscape(t.formula,{format:this.textFormat,location:this.textLocation})}==|latex|`;this.write(r)}writeMarkTextWrapper(e){e&&this.write(e)}writeInlineMark(e){const t=e.attrs??{};let r;switch(e.type){case He.textStyle:case He.color:r=`color:${t.color??""}`;break;case He.timer:r=t.name?`timer:${t.name}`:"timer",r+=`|duration:${t.duration??""}`;break;case He.highlight:case He.userHighlight:r=t.color?`${e.type}|color:${t.color}`:`${e.type}`;break;default:r=`${e.type}`;for(const[e,i]of Object.entries(t))("language"===e&&"plain text"!==i||"propertyRef"===e||"name"===e)&&(r=`${r}:${i}`)}this.write(r)}getWritableMarks(e){const t=e=>e.attrs??{};let r=[...e];const i=r.find(e=>e.type===He.timer),o=r.find(e=>e.type===He.duration);i&&o&&!t(i).duration&&(r=r.map(e=>e===i?{...i,attrs:{...t(i),duration:t(o).duration}}:e)),r=r.filter(e=>e.type!==He.duration&&(e.type!==He.timer||!!t(e).duration));const a=e=>(e.type===He.highlight||e.type===He.userHighlight)&&!t(e).color,s=e=>(e.type===He.textStyle||e.type===He.color)&&-1!==Nt.indexOf(t(e).color);for(let e=0;e<r.length-1;e++)if(a(r[e])&&s(r[e+1])){const t=r[e];r[e]=r[e+1],r[e+1]=t}return r}isStandardMark(e){return-1!==Lt.indexOf(e.type)&&!(e.attrs&&e.attrs.color)}isInlineMark(e){return-1!==Vt.indexOf(e.type)||e.type===He.highlight&&!(!e.attrs||!e.attrs.color)}writeCommentMark(e){const t=`#${e.comment||""}`;this.write(t)}writeLinkMark(e){const t=`link:${((e.attrs?.href||"")??"").replace(Kt,"^]")}`;this.write(t)}writeRefMark(e){const t=`►${e.attrs?.reference??""}`;this.write(t)}writeXRefMark(e){const t=e.attrs?.xref??"",r=e.attrs?.reference??"";let i=`xref:${t}`;r&&(i+=`|►${r}`),this.write(i)}writeExtRefMark(e){const t=e.attrs?.extref??"",r=e.attrs?.references??[],i=e.attrs?.provider??"";let o=`extref:${t}`;for(const e of r)o+=`|►${e??""}`;o+=`|provider:${i}`,this.write(o)}writeFootnoteMark(e){this.write("footnote:");const t=this.internalTextGenerator?.generateSync(e.attrs?.content,this.textFormat,this.textLocation,{...this.generateOptions,forceInline:!0})??"";this.write(t)}writeFootnoteStarMark(e){this.write("footnote*:");const t=this.internalTextGenerator?.generateSync(e.attrs?.content,this.textFormat,this.textLocation,{...this.generateOptions,forceInline:!0})??"";this.write(t)}writeSymbolMark(e){if(null==e.attrs)return;const t=e.attrs,r=this.getMediaAttrs("symbol",t)??"";this.write(r)}writeInlineMarkStartEnd(){this.write("|")}writePlainTextDivider(){this.write("==== text ====")}writeString(e){null!=e&&this.write(`${e}`)}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}getMediaAttrs(e,t,r){if(!e)return;const i=Object.assign({},r).ignoreAttributes??new Set;let o=`${e}:${t?.src??""}`;const a=Object.entries(t).filter(([e,t])=>"src"!==e);for(let e=0;e<a.length;e++){const[t,r]=a[e];if(!i.has(t))switch(t){case"textAlign":"left"!==r&&(o+=`|captionAlign:${r}`);break;case"alignment":"center"!==r&&r&&(o+=`|alignment:${r}`);break;case"title":r&&(o+=`|caption:${r}`);break;case"class":"center"!==r&&r&&(o+=`|align:${r}`);break;case"comment":r&&(o+=`|#${r}`);break;case"":me.isString(r)?o+=`|:${r}`:o+="|";break;case"zoomDisabled":r||(o+="|zoomDisabled:false");break;default:t&&r&&(o+=`|${t}:${r}`)}}return o}breakscape(e,t){return this.generateOptions.noBreakscaping?e:bt.breakscape(e,t)}getBitType(e){for(const t of e)if(t.key===We.bitsValue){const e=t.value;return e?.bitType}}write(e){return e=this.getInterTextBreakscape(e)+e,this.options.writeCallback&&this.options.writeCallback(e),this.writerText+=e,this}writeLine(e){return this.write(`${e}\n`),this}writeLines(e,t){for(const r of e)this.write(`${r}${t??""}\n`);return this}writeWhiteSpace(){return this.write(" "),this}};function jt(e){return"string"!=typeof e?null:bt.unbreakscape(e)}function qt(e){e&&"object"==typeof e&&(delete e._tempParsingParent,delete e._tempListStart,Object.keys(e).forEach(t=>{qt(e[t])}))}function Mt(e){const t=e=>e&&"text"===e.type&&!e.text;function r(e){for(let i=e.length-1;i>=0;i--){const o=e[i];t(o)?e.splice(i,1):o&&Array.isArray(o.content)&&r(o.content)}}return Array.isArray(e)?r(e):e&&Array.isArray(e.content)&&r(e.content),e}function zt(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkPlusString"}):Ut(e,{startRule:"bitmarkPlusString"})}var Ht=class extends SyntaxError{constructor(e,t,r,i){super(e),this.expected=t,this.found=r,this.location=i,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null;const i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));const o=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,s=this.location.source+":"+a.line+":"+a.column;if(r){const e=this.location.end,i="".padEnd(a.line.toString().length," "),n=r[o.line-1],l=(o.line===e.line?e.column:n.length+1)-o.column||1;t+="\n --\x3e "+s+"\n"+i+" |\n"+a.line+" | "+n+"\n"+i+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}const i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}function a(e){return o(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return o(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}const n={literal:e=>'"'+a(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return n[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+(((c=t)?'"'+a(c)+'"':"end of input")+" found.");var c}};function Ut(e,t){const r={},i=(t=void 0!==t?t:{}).grammarSource,o={version:la,bitmarkPlusPlus:function(){let e,t;if(ea++,e=[],t=ca(),t!==r)for(;t!==r;)e.push(t),t=ca();else e=r;e===r&&(e=function(){let e,t;return e=Wo,t="",Go=e,t=[],e=t,e}());ea--,e===r&&(t=r,0===ea&&sa(er));return e},bitmarkPlus:function(){let e,t;return ea++,e=Wo,t=Ka(),Go=e,t=Ho(t),e=t,ea--,e},bitmarkMinusMinus:function(){let e,t;return ea++,e=Wo,t=Ua(),Go=e,t=Uo(t),e=t,ea--,e},bitmarkPlusString:function(){let e;return ea++,e=Ka(),ea--,e},bitmarkMinusMinusString:Ua};let a=la;const s="|",n="### ",l="## ",c="# ",p="code",d=":",u="bitmark++",m="bitmark--",h="JavaScript",g="• ",f="•_ ",y="•",b=" ",k="I ",x="i ",v="•A ",T="•a ",_="•+ ",C="•- ",w="\t",A="image",B="#",S="@",I="width",P="height",E="alignment",L="captionAlign",V="left",N="center",R="right",F="alt",K="caption",$="zoomDisabled",O="true",J="false",D="=",j="|latex|",q="|imageInline:",M="srcAlt",z="alignmentVertical",H="size",U="top",W="middle",G="bottom",Y="baseline",Q="sub",Z="super",X="text-bottom",ee="text-top",te="line-height",re="font-height",ie="explicit",oe="link:",ae="extref:",se="provider:",ne="xref:",le="►",ce="symbol:",pe="footnote:",de="footnote*:",ue="var:",me="code:",he="timer",ge="duration:",fe="P",ye="timer:",be="highlight",ke="color:",xe="userHighlight",ve="colorPicker:",Te="|►",_e="bold",Ce="italic",we="light",Ae="highlightOrange",Be="highlightYellow",Se="highlightGreen",Ie="highlightBlue",Pe="highlightPurple",Ee="highlightPink",Le="highlightBrown",Ve="highlightBlack",Ne="highlightWhite",Re="highlightGray",Fe="strike",Ke="subscript",$e="superscript",Oe="ins",Je="del",De="underline",je="doubleUnderline",qe="smallcaps",Me="circle",ze="languageEmRed",He="languageEmOrange",Ue="languageEmYellow",We="languageEmGreen",Ge="languageEmBlue",Ye="languageEmPurple",Qe="languageEmPink",Ze="languageEmBrown",Xe="languageEmBlack",et="languageEmWhite",tt="languageEmGray",rt="languageEm",it="userUnderline",ot="userDoubleUnderline",at="userStrike",st="userCircle",nt="notranslate",lt="aqua",ct="black",pt="blue",dt="brown",ut="fuchsia",mt="lightgrey",ht="gray",gt="darkgray",ft="green",yt="lime",bt="magenta",kt="maroon",xt="navy",vt="olive",Tt="orange",_t="pink",Ct="purple",wt="red",At="silver",Bt="teal",St="violet",It="white",Pt="yellow",Et="*",Lt="_",Vt="`",Nt="!",Rt="[!",Ft="]",Kt="\n",$t="\r\n",Ot="http",Jt="s",Dt="://",Ut="mailto:",Wt=/^[ \t]/,Gt=/^[0-9]/,Yt=/^[\r\u2028-\u2029]/,Qt=/^[^\n\r\u2028\u2029]/,Zt=/^[!#-;=?-[\]-_a-{}-~]/,Xt={type:"any"},er=ia("StyledText"),tr=ta("|",!1),rr=ta("### ",!1),ir=ta("## ",!1),or=ta("# ",!1),ar=ta("code",!1),sr=ra([" ","\t"],!1,!1,!1),nr=ta(":",!1),lr=ta("bitmark++",!1),cr=ta("bitmark--",!1),pr=ta("JavaScript",!1),dr=ta("• ",!1),ur=ta("•_ ",!1),mr=ta("•",!1),hr=ra([["0","9"]],!1,!1,!1),gr=ta(" ",!1),fr=ta("I ",!1),yr=ta("i ",!1),br=ta("•A ",!1),kr=ta("•a ",!1),xr=ta("•+ ",!1),vr=ta("•- ",!1),Tr=ta("\t",!1),_r=ta("image",!1),Cr=ta("#",!1),wr=ta("@",!1),Ar=ta("width",!1),Br=ta("height",!1),Sr=ta("alignment",!1),Ir=ta("captionAlign",!1),Pr=ta("left",!1),Er=ta("center",!1),Lr=ta("right",!1),Vr=ta("alt",!1),Nr=ta("caption",!1),Rr=ta("zoomDisabled",!1),Fr=ta("true",!1),Kr=ta("false",!1),$r=ta("=",!1),Or=ta("|latex|",!1),Jr=ta("|imageInline:",!1),Dr=ta("srcAlt",!1),jr=ta("alignmentVertical",!1),qr=ta("size",!1),Mr=ta("top",!1),zr=ta("middle",!1),Hr=ta("bottom",!1),Ur=ta("baseline",!1),Wr=ta("sub",!1),Gr=ta("super",!1),Yr=ta("text-bottom",!1),Qr=ta("text-top",!1),Zr=ta("line-height",!1),Xr=ta("font-height",!1),ei=ta("explicit",!1),ti=ta("link:",!1),ri=ta("extref:",!1),ii=ta("provider:",!1),oi=ta("xref:",!1),ai=ta("►",!1),si=ta("symbol:",!1),ni=ta("footnote:",!1),li=ta("footnote*:",!1),ci=ta("var:",!1),pi=ta("code:",!1),di=ta("timer",!1),ui=ta("duration:",!1),mi=ta("P",!1),hi=ta("timer:",!1),gi=ta("highlight",!1),fi=ta("color:",!1),yi=ta("userHighlight",!1),bi=ta("colorPicker:",!1),ki=ta("|►",!1),xi=ta("bold",!1),vi=ta("italic",!1),Ti=ta("light",!1),_i=ta("highlightOrange",!1),Ci=ta("highlightYellow",!1),wi=ta("highlightGreen",!1),Ai=ta("highlightBlue",!1),Bi=ta("highlightPurple",!1),Si=ta("highlightPink",!1),Ii=ta("highlightBrown",!1),Pi=ta("highlightBlack",!1),Ei=ta("highlightWhite",!1),Li=ta("highlightGray",!1),Vi=ta("strike",!1),Ni=ta("subscript",!1),Ri=ta("superscript",!1),Fi=ta("ins",!1),Ki=ta("del",!1),$i=ta("underline",!1),Oi=ta("doubleUnderline",!1),Ji=ta("smallcaps",!1),Di=ta("circle",!1),ji=ta("languageEmRed",!1),qi=ta("languageEmOrange",!1),Mi=ta("languageEmYellow",!1),zi=ta("languageEmGreen",!1),Hi=ta("languageEmBlue",!1),Ui=ta("languageEmPurple",!1),Wi=ta("languageEmPink",!1),Gi=ta("languageEmBrown",!1),Yi=ta("languageEmBlack",!1),Qi=ta("languageEmWhite",!1),Zi=ta("languageEmGray",!1),Xi=ta("languageEm",!1),eo=ta("userUnderline",!1),to=ta("userDoubleUnderline",!1),ro=ta("userStrike",!1),io=ta("userCircle",!1),oo=ta("notranslate",!1),ao=ta("aqua",!1),so=ta("black",!1),no=ta("blue",!1),lo=ta("brown",!1),co=ta("fuchsia",!1),po=ta("lightgrey",!1),uo=ta("gray",!1),mo=ta("darkgray",!1),ho=ta("green",!1),go=ta("lime",!1),fo=ta("magenta",!1),yo=ta("maroon",!1),bo=ta("navy",!1),ko=ta("olive",!1),xo=ta("orange",!1),vo=ta("pink",!1),To=ta("purple",!1),_o=ta("red",!1),Co=ta("silver",!1),wo=ta("teal",!1),Ao=ta("violet",!1),Bo=ta("white",!1),So=ta("yellow",!1),Io=ta("*",!1),Po=ta("_",!1),Eo=ta("`",!1),Lo=ta("!",!1),Vo=ta("[!",!1),No=ta("]",!1),Ro=ia("Line Terminator"),Fo=ta("\n",!1),Ko=ta("\r\n",!1),$o=ra(["\r",["\u2028","\u2029"]],!1,!1,!1),Oo=ra(["\n","\r","\u2028","\u2029"],!0,!1,!1),Jo=ta("http",!1),Do=ta("s",!1),jo=ta("://",!1),qo=ta("mailto:",!1),Mo=ra(["!",["#",";"],"=",["?","["],["]","_"],["a","{"],["}","~"]],!1,!1,!1);function zo(e){let t={...e};qt(t);return Mt(t)}function Ho(e){return[{type:"paragraph",content:e,attrs:{}}]}function Uo(e){return[{type:"paragraph",content:e,attrs:{}}]}let Wo=0|t.peg$currPos,Go=Wo;const Yo=[{line:1,column:1}];let Qo,Zo=Wo,Xo=t.peg$maxFailExpected||[],ea=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=o[t.startRule]}function ta(e,t){return{type:"literal",text:e,ignoreCase:t}}function ra(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function ia(e){return{type:"other",description:e}}function oa(t){let r,i=Yo[t];if(i)return i;if(t>=Yo.length)r=Yo.length-1;else for(r=t;!Yo[--r];);for(i=Yo[r],i={line:i.line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return Yo[t]=i,i}function aa(e,t,r){const o=oa(e),a=oa(t),s={source:i,start:{offset:e,line:o.line,column:o.column},end:{offset:t,line:a.line,column:a.column}};return r&&i&&"function"==typeof i.offset&&(s.start=i.offset(s.start),s.end=i.offset(s.end)),s}function sa(e){Wo<Zo||(Wo>Zo&&(Zo=Wo,Xo=[]),Xo.push(e))}function na(e,t,r){return new Ht(Ht.buildMessage(e,t),e,t,r)}function la(){let t,i,o;for(t=Wo,i=[],e.length>Wo?(o=e.charAt(Wo),Wo++):(o=r,0===ea&&sa(Xt));o!==r;)i.push(o),e.length>Wo?(o=e.charAt(Wo),Wo++):(o=r,0===ea&&sa(Xt));return Go=t,i="8.41.1",t=i,t}function ca(){let t,i;var o;return t=Wo,i=function(){let t,i,o,a,s;if(t=Wo,i=ua(),i!==r){for(o=Wo,a=[],s=ls();s!==r;)a.push(s),s=ls();o=e.substring(o,Wo),a=cs(),a!==r?(s=ns(),s===r&&(s=null),Go=t,n=i,t={type:"heading",content:zt(o),attrs:{level:n.length-1}}):(Wo=t,t=r)}else Wo=t,t=r;var n;return t}(),i!==r&&(Go=t,o=i,i=Mt({...o})),t=i,t===r&&(t=Wo,i=function(){let e,t,i,o;if(e=Wo,t=function(){let e,t,i;e=Wo,t=Wo,ea++,i=fa(),ea--,i!==r?(Wo=t,t=void 0):t=r;t!==r&&(Go=e,t={type:"bulletList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Go=e,a=t,s=i,e={...a,content:s,attrs:{}}):(Wo=e,e=r)}else Wo=e,e=r;var a,s;if(e===r){if(e=Wo,t=function(){let e,t,i;e=Wo,t=Wo,ea++,i=ya(),ea--,i!==r?(Wo=t,t=void 0):t=r;t!==r&&(Go=e,t={type:"noBulletList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Go=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Wo=e,e=r)}else Wo=e,e=r;if(e===r){if(e=Wo,t=function(){let e,t,i;e=Wo,t=Wo,ea++,i=ba(),ea--,i!==r?(Wo=t,t=void 0):t=r;t!==r&&(Go=e,t={type:"orderedList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Go=e,e=function(e,t){return{...e,attrs:{start:t[0]._tempListStart},content:t}}(t,i)):(Wo=e,e=r)}else Wo=e,e=r;if(e===r){if(e=Wo,t=function(){let e,t,i;e=Wo,t=Wo,ea++,i=ka(),ea--,i!==r?(Wo=t,t=void 0):t=r;t!==r&&(Go=e,t={type:"orderedListRoman"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Go=e,e=function(e,t){return{...e,attrs:{start:t[0]._tempListStart},content:t}}(t,i)):(Wo=e,e=r)}else Wo=e,e=r;if(e===r){if(e=Wo,t=function(){let e,t,i;e=Wo,t=Wo,ea++,i=xa(),ea--,i!==r?(Wo=t,t=void 0):t=r;t!==r&&(Go=e,t={type:"orderedListRomanLower"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Go=e,e=function(e,t){return{...e,attrs:{start:t[0]._tempListStart},content:t}}(t,i)):(Wo=e,e=r)}else Wo=e,e=r;if(e===r){if(e=Wo,t=function(){let e,t,i;e=Wo,t=Wo,ea++,i=va(),ea--,i!==r?(Wo=t,t=void 0):t=r;t!==r&&(Go=e,t={type:"letteredList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Go=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Wo=e,e=r)}else Wo=e,e=r;if(e===r){if(e=Wo,t=function(){let e,t,i;e=Wo,t=Wo,ea++,i=Ta(),ea--,i!==r?(Wo=t,t=void 0):t=r;t!==r&&(Go=e,t={type:"letteredListLower"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Go=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Wo=e,e=r)}else Wo=e,e=r;if(e===r)if(e=Wo,t=function(){let e,t,i;e=Wo,t=Wo,ea++,i=_a(),ea--,i!==r?(Wo=t,t=void 0):t=r;t!==r&&(Go=e,t={type:"taskList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Go=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Wo=e,e=r)}else Wo=e,e=r}}}}}}return e}(),i!==r&&(Go=t,i=zo(i)),t=i,t===r&&(t=Wo,i=La(),i!==r&&(Go=t,i=function(e){return{...e}}(i)),t=i,t===r&&(t=Wo,i=function(){let t,i,o;t=Wo,i=ha(),i!==r?(o=function(){let t,i,o,a;t=Wo,i=Wo,o=[],a=ga();for(;a!==r;)o.push(a),a=ga();return i=e.substring(i,Wo),Go=t,i=function(e){return[{type:"text",text:jt(e.trim())}]}(i),t=i,t}(),Go=t,t=function(e,t){return{...e,content:t}}(i,o)):(Wo=t,t=r);return t}(),i!==r&&(Go=t,i=function(e){return{...e}}(i)),t=i,t===r&&(t=Wo,i=function(){let e,t,i;e=Wo,t=Wo,ea++,i=pa(),ea--,i===r?t=void 0:(Wo=t,t=r);t!==r?(i=Sa(),i!==r?(Go=e,e={type:"paragraph",content:zt(i.trim()),attrs:{}}):(Wo=e,e=r)):(Wo=e,e=r);e===r&&(e=Wo,t=Pa(),t!==r?(i=Sa(),i!==r?(Go=e,e=function(e){return{type:"paragraph",content:zt(e.trim()),attrs:{}}}(i)):(Wo=e,e=r)):(Wo=e,e=r),e===r&&(e=Wo,t=Pa(),t!==r?(i="",Go=e,e=function(e){return{type:"paragraph",content:zt(e.trim()),attrs:{}}}(i)):(Wo=e,e=r)));return e}(),i!==r&&(Go=t,i=function(e){return Mt({...e})}(i)),t=i)))),t}function pa(){let e;return e=ua(),e===r&&(e=Ca(),e===r&&(e=La(),e===r&&(e=ha(),e===r&&(e=Pa())))),e}function da(){let t;return 124===e.charCodeAt(Wo)?(t=s,Wo++):(t=r,0===ea&&sa(tr)),t}function ua(){let t;return e.substr(Wo,4)===n?(t=n,Wo+=4):(t=r,0===ea&&sa(rr)),t===r&&(e.substr(Wo,3)===l?(t=l,Wo+=3):(t=r,0===ea&&sa(ir)),t===r&&(e.substr(Wo,2)===c?(t=c,Wo+=2):(t=r,0===ea&&sa(or)))),t}function ma(){let t,i,o;return t=Wo,i=da(),i!==r?(o=function(){let t;return e.substr(Wo,4)===p?(t=p,Wo+=4):(t=r,0===ea&&sa(ar)),t}(),o!==r?(Go=t,t=o):(Wo=t,t=r)):(Wo=t,t=r),t}function ha(){let t,i,o,a,s,n,l,c;if(t=Wo,i=ma(),i!==r){for(o=Wo,a=Wo,s=[],n=e.charAt(Wo),Wt.test(n)?Wo++:(n=r,0===ea&&sa(sr));n!==r;)s.push(n),n=e.charAt(Wo),Wt.test(n)?Wo++:(n=r,0===ea&&sa(sr));n=cs(),n!==r?(s=[s,n],a=s):(Wo=a,a=r),o=a!==r?e.substring(o,Wo):a,o!==r?(Go=t,t={type:"codeBlock",language:""}):(Wo=t,t=r)}else Wo=t,t=r;if(t===r)if(t=Wo,i=ma(),i!==r)if(58===e.charCodeAt(Wo)?(o=d,Wo++):(o=r,0===ea&&sa(nr)),o!==r)if(a=function(){let t,i,o;e.substr(Wo,9)===u?(t=u,Wo+=9):(t=r,0===ea&&sa(lr));if(t===r&&(e.substr(Wo,9)===m?(t=m,Wo+=9):(t=r,0===ea&&sa(cr)),t===r&&(e.substr(Wo,10)===h?(t=h,Wo+=10):(t=r,0===ea&&sa(pr)),t===r))){if(t=Wo,i=[],o=ls(),o!==r)for(;o!==r;)i.push(o),o=ls();else i=r;t=i!==r?e.substring(t,Wo):i,t===r&&(t="")}return t}(),a!==r){for(s=Wo,n=Wo,l=[],c=e.charAt(Wo),Wt.test(c)?Wo++:(c=r,0===ea&&sa(sr));c!==r;)l.push(c),c=e.charAt(Wo),Wt.test(c)?Wo++:(c=r,0===ea&&sa(sr));c=cs(),c!==r?(l=[l,c],n=l):(Wo=n,n=r),s=n!==r?e.substring(s,Wo):n,s!==r?(Go=t,t={type:"codeBlock",attrs:{language:a.trim().toLowerCase()}}):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r;else Wo=t,t=r;return t}function ga(){let t,i,o,a,s,n;if(t=Wo,i=Wo,ea++,o=pa(),ea--,o===r?i=void 0:(Wo=i,i=r),i!==r){if(o=Wo,a=Wo,s=[],n=ls(),n!==r)for(;n!==r;)s.push(n),n=ls();else s=r;s!==r?(n=cs(),n!==r?(s=[s,n],a=s):(Wo=a,a=r)):(Wo=a,a=r),o=a!==r?e.substring(o,Wo):a,o!==r?(Go=t,t=o):(Wo=t,t=r)}else Wo=t,t=r;return t===r&&(t=ns()),t}function fa(){let t;return e.substr(Wo,2)===g?(t=g,Wo+=2):(t=r,0===ea&&sa(dr)),t}function ya(){let t;return e.substr(Wo,3)===f?(t=f,Wo+=3):(t=r,0===ea&&sa(ur)),t}function ba(){let t,i,o,a,s;if(t=Wo,i=Wo,8226===e.charCodeAt(Wo)?(o=y,Wo++):(o=r,0===ea&&sa(mr)),o!==r){if(a=[],s=e.charAt(Wo),Gt.test(s)?Wo++:(s=r,0===ea&&sa(hr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Wo),Gt.test(s)?Wo++:(s=r,0===ea&&sa(hr));else a=r;a!==r?(32===e.charCodeAt(Wo)?(s=b,Wo++):(s=r,0===ea&&sa(gr)),s!==r?(o=[o,a,s],i=o):(Wo=i,i=r)):(Wo=i,i=r)}else Wo=i,i=r;return t=i!==r?e.substring(t,Wo):i,t}function ka(){let t,i,o,a,s;if(t=Wo,i=Wo,8226===e.charCodeAt(Wo)?(o=y,Wo++):(o=r,0===ea&&sa(mr)),o!==r){if(a=[],s=e.charAt(Wo),Gt.test(s)?Wo++:(s=r,0===ea&&sa(hr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Wo),Gt.test(s)?Wo++:(s=r,0===ea&&sa(hr));else a=r;a!==r?(e.substr(Wo,2)===k?(s=k,Wo+=2):(s=r,0===ea&&sa(fr)),s!==r?(o=[o,a,s],i=o):(Wo=i,i=r)):(Wo=i,i=r)}else Wo=i,i=r;return t=i!==r?e.substring(t,Wo):i,t}function xa(){let t,i,o,a,s;if(t=Wo,i=Wo,8226===e.charCodeAt(Wo)?(o=y,Wo++):(o=r,0===ea&&sa(mr)),o!==r){if(a=[],s=e.charAt(Wo),Gt.test(s)?Wo++:(s=r,0===ea&&sa(hr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Wo),Gt.test(s)?Wo++:(s=r,0===ea&&sa(hr));else a=r;a!==r?(e.substr(Wo,2)===x?(s=x,Wo+=2):(s=r,0===ea&&sa(yr)),s!==r?(o=[o,a,s],i=o):(Wo=i,i=r)):(Wo=i,i=r)}else Wo=i,i=r;return t=i!==r?e.substring(t,Wo):i,t}function va(){let t;return e.substr(Wo,3)===v?(t=v,Wo+=3):(t=r,0===ea&&sa(br)),t}function Ta(){let t;return e.substr(Wo,3)===T?(t=T,Wo+=3):(t=r,0===ea&&sa(kr)),t}function _a(){let t;return e.substr(Wo,3)===_?(t=_,Wo+=3):(t=r,0===ea&&sa(xr)),t===r&&(e.substr(Wo,3)===C?(t=C,Wo+=3):(t=r,0===ea&&sa(vr))),t}function Ca(){let e;return e=fa(),e===r&&(e=ya(),e===r&&(e=ba(),e===r&&(e=ka(),e===r&&(e=xa(),e===r&&(e=va(),e===r&&(e=Ta(),e===r&&(e=_a()))))))),e}function wa(){let t,i,o,a,s,n,l,c,p;if(t=Wo,i=Ba(),i!==r)if(o=Ca(),o!==r){for(a=Wo,s=Wo,n=[],l=Wo,c=Wo,ea++,p=ns(),ea--,p===r?c=void 0:(Wo=c,c=r),c!==r?(e.length>Wo?(p=e.charAt(Wo),Wo++):(p=r,0===ea&&sa(Xt)),p!==r?(c=[c,p],l=c):(Wo=l,l=r)):(Wo=l,l=r);l!==r;)n.push(l),l=Wo,c=Wo,ea++,p=ns(),ea--,p===r?c=void 0:(Wo=c,c=r),c!==r?(e.length>Wo?(p=e.charAt(Wo),Wo++):(p=r,0===ea&&sa(Xt)),p!==r?(c=[c,p],l=c):(Wo=l,l=r)):(Wo=l,l=r);for(l=ns(),l===r&&(l=null),n=[n,l],s=n,a=e.substring(a,Wo),s=[],n=Aa();n!==r;)s.push(n),n=Aa();if(n=Wo,l=function(){let t,i,o,a;t=Wo,ea++,i=Wo,o=[],9===e.charCodeAt(Wo)?(a=w,Wo++):(a=r,0===ea&&sa(Tr));if(a!==r)for(;a!==r;)o.push(a),9===e.charCodeAt(Wo)?(a=w,Wo++):(a=r,0===ea&&sa(Tr));else o=r;o!==r?(Go=Wo,a=o.length>ms.length,a=a?void 0:r,a!==r?(Go=i,i=function(e){us.push(ms),ms=e.join("")}(o)):(Wo=i,i=r)):(Wo=i,i=r);ea--,i!==r?(Wo=t,t=void 0):t=r;return t}(),l!==r){for(c=[],p=wa();p!==r;)c.push(p),p=wa();p=function(){let e;Go=Wo,e=function(){return ms=us.pop(),!0}(),e=e?void 0:r;return e}(),p!==r?(Go=n,n=c):(Wo=n,n=r)}else Wo=n,n=r;n===r&&(n=null),Go=t,t=function(e,t,r,i){let o="bulletList";const a=e.match(/•([0-9]+)([Ii]?) /);let s=1;if(a&&(o="orderedList",a.length>1&&(s=Number(a[1])),a.length>2)){let e=a[2];"I"==e&&(o="orderedListRoman"),"i"==e&&(o="orderedListRomanLower")}"•_ "==e&&(o="noBulletList"),"•A "==e&&(o="letteredList"),"•a "==e&&(o="letteredListLower"),"•+ "!=e&&"•- "!=e||(o="taskList");let n=[{type:"paragraph",attrs:{},content:zt((t+r.join("")).trim())}];if(i&&i[0]&&i[0]._tempParsingParent){let e={type:i[0]._tempParsingParent,attrs:{start:s},content:i};if((e.type.startsWith("orderedList")||e.type.startsWith("letteredList"))&&i[0]._tempListStart){const t=i[0]._tempListStart;t>1&&(e.attrs.start=t)}n.push(e)}let l="listItem",c=null;if("taskList"==o){l="taskItem";let t=!1;"•+ "==e&&(t=!0),c={checked:t}}return c?{type:l,attrs:c,content:n,_tempParsingParent:o,_tempListStart:s}:{type:l,content:n,_tempParsingParent:o,_tempListStart:s}}(o,a,s,n)}else Wo=t,t=r;else Wo=t,t=r;return t}function Aa(){let t,i,o,a,s,n,l,c,p,d;if(t=Wo,i=Wo,ea++,o=function(){let t,i,o;t=Wo,i=[],o=e.charAt(Wo),Wt.test(o)?Wo++:(o=r,0===ea&&sa(sr));for(;o!==r;)i.push(o),o=e.charAt(Wo),Wt.test(o)?Wo++:(o=r,0===ea&&sa(sr));o=ns(),o!==r?(i=[i,o],t=i):(Wo=t,t=r);return t}(),ea--,o===r?i=void 0:(Wo=i,i=r),i!==r)if(o=Ba(),o!==r)if(a=Wo,ea++,s=Ca(),ea--,s===r?a=void 0:(Wo=a,a=r),a!==r){if(s=Wo,n=Wo,l=[],c=Wo,p=Wo,ea++,d=ns(),ea--,d===r?p=void 0:(Wo=p,p=r),p!==r?(e.length>Wo?(d=e.charAt(Wo),Wo++):(d=r,0===ea&&sa(Xt)),d!==r?(p=[p,d],c=p):(Wo=c,c=r)):(Wo=c,c=r),c!==r)for(;c!==r;)l.push(c),c=Wo,p=Wo,ea++,d=ns(),ea--,d===r?p=void 0:(Wo=p,p=r),p!==r?(e.length>Wo?(d=e.charAt(Wo),Wo++):(d=r,0===ea&&sa(Xt)),d!==r?(p=[p,d],c=p):(Wo=c,c=r)):(Wo=c,c=r);else l=r;l!==r?(c=cs(),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r),s=n!==r?e.substring(s,Wo):n,s!==r?(Go=t,t=s):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r;else Wo=t,t=r;return t}function Ba(){let t,i,o;for(t=Wo,i=[],9===e.charCodeAt(Wo)?(o=w,Wo++):(o=r,0===ea&&sa(Tr));o!==r;)i.push(o),9===e.charCodeAt(Wo)?(o=w,Wo++):(o=r,0===ea&&sa(Tr));return Go=Wo,o=i.join("")===ms,o=o?void 0:r,o!==r?(i=[i,o],t=i):(Wo=t,t=r),t}function Sa(){let t,i,o;if(t=Wo,i=[],o=Ia(),o!==r)for(;o!==r;)i.push(o),o=Ia();else i=r;return t=i!==r?e.substring(t,Wo):i,t}function Ia(){let t,i,o,a,s,n;if(t=Wo,i=Wo,ea++,o=pa(),ea--,o===r?i=void 0:(Wo=i,i=r),i!==r){if(o=Wo,a=Wo,s=[],n=ls(),n!==r)for(;n!==r;)s.push(n),n=ls();else s=r;s!==r?(n=cs(),n!==r?(s=[s,n],a=s):(Wo=a,a=r)):(Wo=a,a=r),o=a!==r?e.substring(o,Wo):a,o!==r?(i=[i,o],t=i):(Wo=t,t=r)}else Wo=t,t=r;return t===r&&(t=ns()),t}function Pa(){let t,i,o,a,s,n;if(t=Wo,i=da(),i!==r){for(o=Wo,a=Wo,s=[],n=e.charAt(Wo),Wt.test(n)?Wo++:(n=r,0===ea&&sa(sr));n!==r;)s.push(n),n=e.charAt(Wo),Wt.test(n)?Wo++:(n=r,0===ea&&sa(sr));n=cs(),n!==r?(s=[s,n],a=s):(Wo=a,a=r),o=a!==r?e.substring(o,Wo):a,o!==r?(a=ns(),a===r&&(a=null),i=[i,o,a],t=i):(Wo=t,t=r)}else Wo=t,t=r;return t}function Ea(){let t,i,o;return t=Wo,i=da(),i!==r?(o=function(){let t;return e.substr(Wo,5)===A?(t=A,Wo+=5):(t=r,0===ea&&sa(_r)),t}(),o!==r?(Go=t,t=o):(Wo=t,t=r)):(Wo=t,t=r),t}function La(){let t,i,o,a,s,n,l,c,p,u,m,h;if(t=Wo,i=Ea(),i!==r)if(58===e.charCodeAt(Wo)?(o=d,Wo++):(o=r,0===ea&&sa(nr)),o!==r)if(32===e.charCodeAt(Wo)?(a=b,Wo++):(a=r,0===ea&&sa(gr)),a===r&&(a=null),s=function(){let t,i,o,a,s,n,l,c,p;t=Wo,i=Wo,e.substr(Wo,4)===Ot?(o=Ot,Wo+=4):(o=r,0===ea&&sa(Jo));if(o!==r)if(115===e.charCodeAt(Wo)?(a=Jt,Wo++):(a=r,0===ea&&sa(Do)),a===r&&(a=null),e.substr(Wo,3)===Dt?(s=Dt,Wo+=3):(s=r,0===ea&&sa(jo)),s!==r){for(n=[],l=Wo,c=Wo,ea++,p=da(),ea--,p===r?c=void 0:(Wo=c,c=r),c!==r?(p=ds(),p!==r?(c=[c,p],l=c):(Wo=l,l=r)):(Wo=l,l=r);l!==r;)n.push(l),l=Wo,c=Wo,ea++,p=da(),ea--,p===r?c=void 0:(Wo=c,c=r),c!==r?(p=ds(),p!==r?(c=[c,p],l=c):(Wo=l,l=r)):(Wo=l,l=r);o=[o,a,s,n],i=o}else Wo=i,i=r;else Wo=i,i=r;t=i!==r?e.substring(t,Wo):i;return t}(),s!==r){for(n=[],32===e.charCodeAt(Wo)?(l=b,Wo++):(l=r,0===ea&&sa(gr));l!==r;)n.push(l),32===e.charCodeAt(Wo)?(l=b,Wo++):(l=r,0===ea&&sa(gr));if(l=da(),l!==r){for(c=Va(),p=Wo,u=Wo,m=[],h=e.charAt(Wo),Wt.test(h)?Wo++:(h=r,0===ea&&sa(sr));h!==r;)m.push(h),h=e.charAt(Wo),Wt.test(h)?Wo++:(h=r,0===ea&&sa(sr));h=cs(),h!==r?(m=[m,h],u=m):(Wo=u,u=r),p=u!==r?e.substring(p,Wo):u,p!==r?(u=ns(),u===r&&(u=null),Go=t,t=function(e,t,r){const i=Object.assign({},...r);let o=i.alignment||"center";delete i.alignment;let a=i.captionAlign||"left";delete i.captionAlign;let s=i.alt||null;delete i.alt;let n=i.caption||null;delete i.caption;let l=i.align||"center";delete i.align;let c=void 0===i.zoomDisabled||("boolean"==typeof i.zoomDisabled?i.zoomDisabled:"true"===String(i.zoomDisabled).toLowerCase());return delete i.zoomDisabled,{type:e,attrs:{alignment:o,textAlign:a,src:t,alt:jt(s),title:jt(n),class:l,zoomDisabled:c,...i}}}(i,s,c)):(Wo=t,t=r)}else Wo=t,t=r}else Wo=t,t=r;else Wo=t,t=r;else Wo=t,t=r;return t}function Va(){let e,t,i;for(e=Wo,t=[],i=Na();i!==r;)t.push(i),i=Na();return Go=e,e=t,e}function Na(){let t,i,o,a,s,n,l,c,p,u;if(t=Wo,35===e.charCodeAt(Wo)?(i=B,Wo++):(i=r,0===ea&&sa(Cr)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t={comment:o.trim()}):(Wo=t,t=r)}else Wo=t,t=r;var m,h;if(t===r){if(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Ra(),o!==r)if(58===e.charCodeAt(Wo)?(a=d,Wo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n!==r;)s.push(n),32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));if(n=Wo,l=[],c=Wo,p=Wo,ea++,u=da(),ea--,u===r?p=void 0:(Wo=p,p=r),p!==r?(u=e.charAt(Wo),Gt.test(u)?Wo++:(u=r,0===ea&&sa(hr)),u!==r?(p=[p,u],c=p):(Wo=c,c=r)):(Wo=c,c=r),c!==r)for(;c!==r;)l.push(c),c=Wo,p=Wo,ea++,u=da(),ea--,u===r?p=void 0:(Wo=p,p=r),p!==r?(u=e.charAt(Wo),Gt.test(u)?Wo++:(u=r,0===ea&&sa(hr)),u!==r?(p=[p,u],c=p):(Wo=c,c=r)):(Wo=c,c=r);else l=r;if(n=l!==r?e.substring(n,Wo):l,n!==r){for(l=[],32===e.charCodeAt(Wo)?(c=b,Wo++):(c=r,0===ea&&sa(gr));c!==r;)l.push(c),32===e.charCodeAt(Wo)?(c=b,Wo++):(c=r,0===ea&&sa(gr));c=da(),c!==r?(Go=t,m=o,h=n,t={[m]:parseInt(h)}):(Wo=t,t=r)}else Wo=t,t=r}else Wo=t,t=r;else Wo=t,t=r;if(t===r){if(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=function(){let t;e.substr(Wo,3)===F?(t=F,Wo+=3):(t=r,0===ea&&sa(Vr));t===r&&(e.substr(Wo,7)===K?(t=K,Wo+=7):(t=r,0===ea&&sa(Nr)));return t}(),o!==r)if(58===e.charCodeAt(Wo)?(a=d,Wo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n!==r;)s.push(n),32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));for(n=Wo,l=[],c=Wo,p=Wo,ea++,u=da(),ea--,u===r?p=void 0:(Wo=p,p=r),p!==r?(u=ls(),u!==r?(p=[p,u],c=p):(Wo=c,c=r)):(Wo=c,c=r);c!==r;)l.push(c),c=Wo,p=Wo,ea++,u=da(),ea--,u===r?p=void 0:(Wo=p,p=r),p!==r?(u=ls(),u!==r?(p=[p,u],c=p):(Wo=c,c=r)):(Wo=c,c=r);n=e.substring(n,Wo),l=da(),l!==r?(Go=t,t=function(e,t){return{[e]:t.trim()}}(o,n)):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r;if(t===r){if(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=function(){let t;e.substr(Wo,9)===E?(t=E,Wo+=9):(t=r,0===ea&&sa(Sr));t===r&&(e.substr(Wo,12)===L?(t=L,Wo+=12):(t=r,0===ea&&sa(Ir)));return t}(),o!==r)if(58===e.charCodeAt(Wo)?(a=d,Wo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n!==r;)s.push(n),32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));if(n=function(){let t;e.substr(Wo,4)===V?(t=V,Wo+=4):(t=r,0===ea&&sa(Pr));t===r&&(e.substr(Wo,6)===N?(t=N,Wo+=6):(t=r,0===ea&&sa(Er)),t===r&&(e.substr(Wo,5)===R?(t=R,Wo+=5):(t=r,0===ea&&sa(Lr))));return t}(),n!==r){for(l=[],32===e.charCodeAt(Wo)?(c=b,Wo++):(c=r,0===ea&&sa(gr));c!==r;)l.push(c),32===e.charCodeAt(Wo)?(c=b,Wo++):(c=r,0===ea&&sa(gr));c=da(),c!==r?(Go=t,t=function(e,t){return{[e]:t}}(o,n)):(Wo=t,t=r)}else Wo=t,t=r}else Wo=t,t=r;else Wo=t,t=r;if(t===r){if(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Fa(),o!==r)if(58===e.charCodeAt(Wo)?(a=d,Wo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n!==r;)s.push(n),32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));if(n=function(){let t;e.substr(Wo,4)===O?(t=O,Wo+=4):(t=r,0===ea&&sa(Fr));t===r&&(e.substr(Wo,5)===J?(t=J,Wo+=5):(t=r,0===ea&&sa(Kr)));return t}(),n!==r){for(l=[],32===e.charCodeAt(Wo)?(c=b,Wo++):(c=r,0===ea&&sa(gr));c!==r;)l.push(c),32===e.charCodeAt(Wo)?(c=b,Wo++):(c=r,0===ea&&sa(gr));c=da(),c!==r?(Go=t,t=function(e,t){return{[e]:t}}(o,n)):(Wo=t,t=r)}else Wo=t,t=r}else Wo=t,t=r;else Wo=t,t=r;if(t===r){if(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Fa(),o!==r){for(a=[],32===e.charCodeAt(Wo)?(s=b,Wo++):(s=r,0===ea&&sa(gr));s!==r;)a.push(s),32===e.charCodeAt(Wo)?(s=b,Wo++):(s=r,0===ea&&sa(gr));s=da(),s!==r?(Go=t,t=function(e){return{[e]:!0}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r&&(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=da(),o!==r?(Go=t,t=void 0):(Wo=t,t=r),t===r)){for(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t=function(e){return{error:"Found unknown property or invalid value: "+e}}(o)):(Wo=t,t=r)}}}}}}return t}function Ra(){let t;return e.substr(Wo,5)===I?(t=I,Wo+=5):(t=r,0===ea&&sa(Ar)),t===r&&(e.substr(Wo,6)===P?(t=P,Wo+=6):(t=r,0===ea&&sa(Br))),t}function Fa(){let t;return e.substr(Wo,12)===$?(t=$,Wo+=12):(t=r,0===ea&&sa(Rr)),t}function Ka(){let e,t,i,o;for(e=Wo,t=$a(),t===r&&(t=null),i=[],o=Da(),o===r&&(o=$a());o!==r;)i.push(o),o=Da(),o===r&&(o=$a());var a,s;return Go=e,s=i,e=Mt((a=t)?[a,...s.flat()]:s.flat()),e}function $a(){let t,i,o,a,s,n,l;if(t=Wo,i=ns(),i!==r&&(Go=t,i={type:"hardBreak"}),t=i,t===r){if(t=Wo,i=Wo,o=[],a=Wo,s=ja(),s===r&&(s=null),n=Wo,ea++,l=Da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Wo=a,a=r)):(Wo=a,a=r),a===r&&(a=Wo,s=ja(),s!==r?(n=Wo,ea++,l=Da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(s=[s,n],a=s):(Wo=a,a=r)):(Wo=a,a=r)),a!==r)for(;a!==r;)o.push(a),a=Wo,s=ja(),s===r&&(s=null),n=Wo,ea++,l=Da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Wo=a,a=r)):(Wo=a,a=r),a===r&&(a=Wo,s=ja(),s!==r?(n=Wo,ea++,l=Da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(s=[s,n],a=s):(Wo=a,a=r)):(Wo=a,a=r));else o=r;i=o!==r?e.substring(i,Wo):o,i!==r&&(Go=t,i={text:jt(i),type:"text"}),t=i}return t}function Oa(){let t;return 61===e.charCodeAt(Wo)?(t=D,Wo++):(t=r,0===ea&&sa($r)),t}function Ja(){let e,t,i;return e=Wo,t=Oa(),t!==r?(i=Oa(),i!==r?(t=[t,i],e=t):(Wo=e,e=r)):(Wo=e,e=r),e}function Da(){let t,i,o,a,n,l,c,p;if(t=Wo,i=is(),i!==r){if(o=Wo,a=[],n=e.charAt(Wo),Gt.test(n)?Wo++:(n=r,0===ea&&sa(hr)),n!==r)for(;n!==r;)a.push(n),n=e.charAt(Wo),Gt.test(n)?Wo++:(n=r,0===ea&&sa(hr));else a=r;o=a!==r?e.substring(o,Wo):a,o!==r?(a=os(),a!==r?(Go=t,t={index:+o,type:"bit"}):(Wo=t,t=r)):(Wo=t,t=r)}else Wo=t,t=r;var d,u;if(t===r){if(t=Wo,i=Ja(),i!==r){for(o=Wo,a=[],n=Wo,l=Wo,ea++,c=Ja(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);n!==r;)a.push(n),n=Wo,l=Wo,ea++,c=Ja(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);o=e.substring(o,Wo),a=Ja(),a!==r?(e.substr(Wo,7)===j?(n=j,Wo+=7):(n=r,0===ea&&sa(Or)),n!==r?(Go=t,t=function(e){return{attrs:{formula:jt(e)},type:"latex"}}(o)):(Wo=t,t=r)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,i=Ja(),i!==r){for(o=Wo,a=[],n=Wo,l=Wo,ea++,c=Ja(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);n!==r;)a.push(n),n=Wo,l=Wo,ea++,c=Ja(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);o=e.substring(o,Wo),a=Ja(),a!==r?(e.substr(Wo,13)===q?(n=q,Wo+=13):(n=r,0===ea&&sa(Jr)),n!==r?(l=ps(),l!==r?(124===e.charCodeAt(Wo)?(c=s,Wo++):(c=r,0===ea&&sa(tr)),c!==r?(p=function(){let e,t,i;e=Wo,t=[],i=qa();for(;i!==r;)t.push(i),i=qa();return Go=e,e=t,e}(),Go=t,u=p,t={attrs:{alt:o,src:((d=l).pr+d.t).trim(),alignmentVertical:"top",size:"line-height",...Object.assign({},...u),zoomDisabled:!0},type:"imageInline"}):(Wo=t,t=r)):(Wo=t,t=r)):(Wo=t,t=r)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,i=Ja(),i!==r){for(o=Wo,a=[],n=Wo,l=Wo,ea++,c=Ja(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);n!==r;)a.push(n),n=Wo,l=Wo,ea++,c=Ja(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);o=e.substring(o,Wo),a=Ja(),a!==r?(n=function(){let t,i,o,a;t=Wo,124===e.charCodeAt(Wo)?(i=s,Wo++):(i=r,0===ea&&sa(tr));if(i!==r){if(o=[],a=Ma(),a!==r)for(;a!==r;)o.push(a),a=Ma();else o=r;o!==r?(Go=t,t=o):(Wo=t,t=r)}else Wo=t,t=r;return t}(),n!==r?(Go=t,t=function(e,t){return t||(t=[]),{marks:t,text:jt(e),type:"text"}}(o,n)):(Wo=t,t=r)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,i=Xa(),i!==r){for(o=Wo,a=[],n=Wo,l=Wo,ea++,c=Xa(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);n!==r;)a.push(n),n=Wo,l=Wo,ea++,c=Xa(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);o=e.substring(o,Wo),a=Xa(),a!==r?(Go=t,t=function(e){return{marks:[{type:"bold"}],text:jt(e),type:"text"}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,i=es(),i!==r){for(o=Wo,a=[],n=Wo,l=Wo,ea++,c=es(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);n!==r;)a.push(n),n=Wo,l=Wo,ea++,c=es(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);o=e.substring(o,Wo),a=es(),a!==r?(Go=t,t=function(e){return{marks:[{type:"italic"}],text:jt(e),type:"text"}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,i=ts(),i!==r){for(o=Wo,a=[],n=Wo,l=Wo,ea++,c=ts(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);n!==r;)a.push(n),n=Wo,l=Wo,ea++,c=ts(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);o=e.substring(o,Wo),a=ts(),a!==r?(Go=t,t=function(e){return{marks:[{type:"light"}],text:jt(e),type:"text"}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,i=rs(),i!==r){for(o=Wo,a=[],n=Wo,l=Wo,ea++,c=rs(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);n!==r;)a.push(n),n=Wo,l=Wo,ea++,c=rs(),ea--,c===r?l=void 0:(Wo=l,l=r),l!==r?(e.length>Wo?(c=e.charAt(Wo),Wo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Wo=n,n=r)):(Wo=n,n=r);o=e.substring(o,Wo),a=rs(),a!==r?(Go=t,t=function(e){return{marks:[{type:"highlight"}],text:jt(e),type:"text"}}(o)):(Wo=t,t=r)}else Wo=t,t=r;t===r&&(t=Wo,i=ps(),i!==r&&(Go=t,i=function(e){return{marks:[{type:"link",attrs:{href:(e.pr+e.t).trim(),target:"_blank"}}],text:e.t,type:"text"}}(i)),t=i)}}}}}}}return t}function ja(){let t,i,o,a,s;if(t=Wo,i=Wo,o=Ja(),o!==r){if(a=[],s=Oa(),s!==r)for(;s!==r;)a.push(s),s=Oa();else a=r;a!==r?(o=[o,a],i=o):(Wo=i,i=r)}else Wo=i,i=r;if(t=i!==r?e.substring(t,Wo):i,t===r){if(t=Wo,i=Wo,o=ts(),o!==r){if(a=[],s=Qa(),s!==r)for(;s!==r;)a.push(s),s=Qa();else a=r;a!==r?(o=[o,a],i=o):(Wo=i,i=r)}else Wo=i,i=r;if(t=i!==r?e.substring(t,Wo):i,t===r){if(t=Wo,i=Wo,o=rs(),o!==r){if(a=[],s=Za(),s!==r)for(;s!==r;)a.push(s),s=Za();else a=r;a!==r?(o=[o,a],i=o):(Wo=i,i=r)}else Wo=i,i=r;t=i!==r?e.substring(t,Wo):i}}return t}function qa(){let t,i,o,a,s,n,l,c,p,u;if(t=Wo,35===e.charCodeAt(Wo)?(i=B,Wo++):(i=r,0===ea&&sa(Cr)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t={comment:o}):(Wo=t,t=r)}else Wo=t,t=r;var m,h;if(t===r){if(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),e.substr(Wo,6)===M?(o=M,Wo+=6):(o=r,0===ea&&sa(Dr)),o!==r)if(58===e.charCodeAt(Wo)?(a=d,Wo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n!==r;)s.push(n),32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));for(n=Wo,l=[],c=Wo,p=Wo,ea++,u=da(),ea--,u===r?p=void 0:(Wo=p,p=r),p!==r?(u=ls(),u!==r?(p=[p,u],c=p):(Wo=c,c=r)):(Wo=c,c=r);c!==r;)l.push(c),c=Wo,p=Wo,ea++,u=da(),ea--,u===r?p=void 0:(Wo=p,p=r),p!==r?(u=ls(),u!==r?(p=[p,u],c=p):(Wo=c,c=r)):(Wo=c,c=r);n=e.substring(n,Wo),l=da(),l!==r?(Go=t,m=o,h=n,t={[m]:h}):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r;if(t===r){if(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Ra(),o!==r)if(58===e.charCodeAt(Wo)?(a=d,Wo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n!==r;)s.push(n),32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));if(n=Wo,l=[],c=Wo,p=Wo,ea++,u=da(),ea--,u===r?p=void 0:(Wo=p,p=r),p!==r?(u=e.charAt(Wo),Gt.test(u)?Wo++:(u=r,0===ea&&sa(hr)),u!==r?(p=[p,u],c=p):(Wo=c,c=r)):(Wo=c,c=r),c!==r)for(;c!==r;)l.push(c),c=Wo,p=Wo,ea++,u=da(),ea--,u===r?p=void 0:(Wo=p,p=r),p!==r?(u=e.charAt(Wo),Gt.test(u)?Wo++:(u=r,0===ea&&sa(hr)),u!==r?(p=[p,u],c=p):(Wo=c,c=r)):(Wo=c,c=r);else l=r;n=l!==r?e.substring(n,Wo):l,n!==r?(l=da(),l!==r?(Go=t,t=function(e,t){return{[e]:parseInt(t)}}(o,n)):(Wo=t,t=r)):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r;if(t===r){if(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Ra(),o!==r)if(58===e.charCodeAt(Wo)?(a=d,Wo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n!==r;)s.push(n),32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));for(n=Wo,l=[],c=Wo,p=Wo,ea++,u=da(),ea--,u===r?p=void 0:(Wo=p,p=r),p!==r?(u=ls(),u!==r?(p=[p,u],c=p):(Wo=c,c=r)):(Wo=c,c=r);c!==r;)l.push(c),c=Wo,p=Wo,ea++,u=da(),ea--,u===r?p=void 0:(Wo=p,p=r),p!==r?(u=ls(),u!==r?(p=[p,u],c=p):(Wo=c,c=r)):(Wo=c,c=r);n=e.substring(n,Wo),l=da(),l!==r?(Go=t,t=function(e,t){return{type:"error",msg:e+" must be a positive integer.",found:t}}(o,n)):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r;if(t===r){if(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),e.substr(Wo,17)===z?(o=z,Wo+=17):(o=r,0===ea&&sa(jr)),o!==r)if(58===e.charCodeAt(Wo)?(a=d,Wo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n!==r;)s.push(n),32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n=function(){let t;e.substr(Wo,3)===U?(t=U,Wo+=3):(t=r,0===ea&&sa(Mr));t===r&&(e.substr(Wo,6)===W?(t=W,Wo+=6):(t=r,0===ea&&sa(zr)),t===r&&(e.substr(Wo,6)===G?(t=G,Wo+=6):(t=r,0===ea&&sa(Hr)),t===r&&(e.substr(Wo,8)===Y?(t=Y,Wo+=8):(t=r,0===ea&&sa(Ur)),t===r&&(e.substr(Wo,3)===Q?(t=Q,Wo+=3):(t=r,0===ea&&sa(Wr)),t===r&&(e.substr(Wo,5)===Z?(t=Z,Wo+=5):(t=r,0===ea&&sa(Gr)),t===r&&(e.substr(Wo,11)===X?(t=X,Wo+=11):(t=r,0===ea&&sa(Yr)),t===r&&(e.substr(Wo,8)===ee?(t=ee,Wo+=8):(t=r,0===ea&&sa(Qr)))))))));return t}(),n!==r?(l=da(),l!==r?(Go=t,t=function(e,t){return{[e]:t}}(o,n)):(Wo=t,t=r)):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r;if(t===r)if(t=Wo,64===e.charCodeAt(Wo)?(i=S,Wo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),e.substr(Wo,4)===H?(o=H,Wo+=4):(o=r,0===ea&&sa(qr)),o!==r)if(58===e.charCodeAt(Wo)?(a=d,Wo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n!==r;)s.push(n),32===e.charCodeAt(Wo)?(n=b,Wo++):(n=r,0===ea&&sa(gr));n=function(){let t;e.substr(Wo,11)===te?(t=te,Wo+=11):(t=r,0===ea&&sa(Zr));t===r&&(e.substr(Wo,11)===re?(t=re,Wo+=11):(t=r,0===ea&&sa(Xr)),t===r&&(e.substr(Wo,5)===Z?(t=Z,Wo+=5):(t=r,0===ea&&sa(Gr)),t===r&&(e.substr(Wo,3)===Q?(t=Q,Wo+=3):(t=r,0===ea&&sa(Wr)),t===r&&(e.substr(Wo,8)===ie?(t=ie,Wo+=8):(t=r,0===ea&&sa(ei))))));return t}(),n!==r?(l=da(),l!==r?(Go=t,t=function(e,t){return{[e]:t}}(o,n)):(Wo=t,t=r)):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r}}}}return t}function Ma(){let t,i,o,a,s,n,l,c,d,u,m,h,g;if(t=Wo,e.substr(Wo,5)===oe?(i=oe,Wo+=5):(i=r,0===ea&&sa(ti)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t={type:"link",attrs:{href:o.trim(),target:"_blank"}}):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,e.substr(Wo,7)===ae?(i=ae,Wo+=7):(i=r,0===ea&&sa(ri)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);if(o=e.substring(o,Wo),a=function(){let e,t;e=[],t=za();for(;t!==r;)e.push(t),t=za();return e}(),s=da(),s!==r)if(e.substr(Wo,9)===se?(n=se,Wo+=9):(n=r,0===ea&&sa(ii)),n!==r){for(l=Wo,c=[],d=Wo,u=Wo,ea++,m=da(),ea--,m===r?u=void 0:(Wo=u,u=r),u!==r?(m=ls(),m!==r?(u=[u,m],d=u):(Wo=d,d=r)):(Wo=d,d=r);d!==r;)c.push(d),d=Wo,u=Wo,ea++,m=da(),ea--,m===r?u=void 0:(Wo=u,u=r),u!==r?(m=ls(),m!==r?(u=[u,m],d=u):(Wo=d,d=r)):(Wo=d,d=r);l=e.substring(l,Wo),c=da(),c!==r?(Go=t,t=function(e,t,r){return{type:"extref",attrs:{extref:e.trim(),references:t,provider:r.trim()}}}(o,a,l)):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r}else Wo=t,t=r;if(t===r){if(t=Wo,e.substr(Wo,5)===ne?(i=ne,Wo+=5):(i=r,0===ea&&sa(oi)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);if(o=e.substring(o,Wo),a=da(),a!==r)if(9658===e.charCodeAt(Wo)?(s=le,Wo++):(s=r,0===ea&&sa(ai)),s!==r){for(n=Wo,l=[],c=Wo,d=Wo,ea++,u=da(),ea--,u===r?d=void 0:(Wo=d,d=r),d!==r?(u=ls(),u!==r?(d=[d,u],c=d):(Wo=c,c=r)):(Wo=c,c=r);c!==r;)l.push(c),c=Wo,d=Wo,ea++,u=da(),ea--,u===r?d=void 0:(Wo=d,d=r),d!==r?(u=ls(),u!==r?(d=[d,u],c=d):(Wo=c,c=r)):(Wo=c,c=r);n=e.substring(n,Wo),l=da(),l!==r?(Go=t,t=function(e,t){return{type:"xref",attrs:{xref:e.trim(),reference:t.trim()}}}(o,n)):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r}else Wo=t,t=r;if(t===r){if(t=Wo,e.substr(Wo,5)===ne?(i=ne,Wo+=5):(i=r,0===ea&&sa(oi)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t=function(e){return{type:"xref",attrs:{xref:e.trim(),reference:""}}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,9658===e.charCodeAt(Wo)?(i=le,Wo++):(i=r,0===ea&&sa(ai)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t=function(e){return{type:"ref",attrs:{reference:e.trim()}}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,e.substr(Wo,7)===ce?(i=ce,Wo+=7):(i=r,0===ea&&sa(si)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(s=Va(),Go=t,t=function(e,t){const r=Object.assign({},...t);return{type:"symbol",attrs:{src:e.trim(),...r}}}(o,s)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,e.substr(Wo,9)===pe?(i=pe,Wo+=9):(i=r,0===ea&&sa(ni)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t=function(e){return{type:"footnote",attrs:{content:zt(e.trim())}}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,e.substr(Wo,10)===de?(i=de,Wo+=10):(i=r,0===ea&&sa(li)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t=function(e){return{type:"footnote*",attrs:{content:zt(e.trim())}}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,e.substr(Wo,4)===ue?(i=ue,Wo+=4):(i=r,0===ea&&sa(ci)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t=function(e){return{type:"var",attrs:{name:e.trim()}}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r&&(t=Wo,e.substr(Wo,4)===p?(i=p,Wo+=4):(i=r,0===ea&&sa(ar)),i!==r?(o=da(),o!==r?(Go=t,t={type:"code",attrs:{language:"plain text"}}):(Wo=t,t=r)):(Wo=t,t=r),t===r)){if(t=Wo,e.substr(Wo,5)===me?(i=me,Wo+=5):(i=r,0===ea&&sa(pi)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t={type:"code",attrs:{language:o.trim().toLowerCase()}}):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,e.substr(Wo,5)===he?(i=he,Wo+=5):(i=r,0===ea&&sa(di)),i!==r)if(o=da(),o!==r)if(e.substr(Wo,9)===ge?(a=ge,Wo+=9):(a=r,0===ea&&sa(ui)),a!==r){if(s=Wo,n=Wo,80===e.charCodeAt(Wo)?(l=fe,Wo++):(l=r,0===ea&&sa(mi)),l!==r){for(c=Wo,d=[],u=Wo,m=Wo,ea++,h=da(),ea--,h===r?m=void 0:(Wo=m,m=r),m!==r?(h=ls(),h!==r?(m=[m,h],u=m):(Wo=u,u=r)):(Wo=u,u=r);u!==r;)d.push(u),u=Wo,m=Wo,ea++,h=da(),ea--,h===r?m=void 0:(Wo=m,m=r),m!==r?(h=ls(),h!==r?(m=[m,h],u=m):(Wo=u,u=r)):(Wo=u,u=r);c=e.substring(c,Wo),l=[l,c],n=l}else Wo=n,n=r;s=n!==r?e.substring(s,Wo):n,s!==r?(n=da(),n!==r?(Go=t,t={type:"timer",attrs:{name:"",duration:s.trim()}}):(Wo=t,t=r)):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r;else Wo=t,t=r;if(t===r){if(t=Wo,e.substr(Wo,6)===ye?(i=ye,Wo+=6):(i=r,0===ea&&sa(hi)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);if(o=e.substring(o,Wo),a=da(),a!==r)if(e.substr(Wo,9)===ge?(s=ge,Wo+=9):(s=r,0===ea&&sa(ui)),s!==r){if(n=Wo,l=Wo,80===e.charCodeAt(Wo)?(c=fe,Wo++):(c=r,0===ea&&sa(mi)),c!==r){for(d=Wo,u=[],m=Wo,h=Wo,ea++,g=da(),ea--,g===r?h=void 0:(Wo=h,h=r),h!==r?(g=ls(),g!==r?(h=[h,g],m=h):(Wo=m,m=r)):(Wo=m,m=r);m!==r;)u.push(m),m=Wo,h=Wo,ea++,g=da(),ea--,g===r?h=void 0:(Wo=h,h=r),h!==r?(g=ls(),g!==r?(h=[h,g],m=h):(Wo=m,m=r)):(Wo=m,m=r);d=e.substring(d,Wo),c=[c,d],l=c}else Wo=l,l=r;n=l!==r?e.substring(n,Wo):l,n!==r?(l=da(),l!==r?(Go=t,t=function(e,t){return{type:"timer",attrs:{name:e.trim(),duration:t.trim()}}}(o,n)):(Wo=t,t=r)):(Wo=t,t=r)}else Wo=t,t=r;else Wo=t,t=r}else Wo=t,t=r;if(t===r&&(t=Wo,e.substr(Wo,9)===be?(i=be,Wo+=9):(i=r,0===ea&&sa(gi)),i!==r?(o=da(),o!==r?(e.substr(Wo,6)===ke?(a=ke,Wo+=6):(a=r,0===ea&&sa(fi)),a!==r?(s=Ha(),s!==r?(n=da(),n!==r?(Go=t,t={type:"highlight",attrs:{color:s}}):(Wo=t,t=r)):(Wo=t,t=r)):(Wo=t,t=r)):(Wo=t,t=r)):(Wo=t,t=r),t===r&&(t=Wo,e.substr(Wo,13)===xe?(i=xe,Wo+=13):(i=r,0===ea&&sa(yi)),i!==r?(o=da(),o!==r?(e.substr(Wo,6)===ke?(a=ke,Wo+=6):(a=r,0===ea&&sa(fi)),a!==r?(s=Ha(),s!==r?(n=da(),n!==r?(Go=t,t=function(e){return{type:"userHighlight",attrs:{color:e}}}(s)):(Wo=t,t=r)):(Wo=t,t=r)):(Wo=t,t=r)):(Wo=t,t=r)):(Wo=t,t=r),t===r&&(t=Wo,e.substr(Wo,6)===ke?(i=ke,Wo+=6):(i=r,0===ea&&sa(fi)),i!==r?(o=function(){let t;e.substr(Wo,4)===lt?(t=lt,Wo+=4):(t=r,0===ea&&sa(ao));t===r&&(e.substr(Wo,5)===ct?(t=ct,Wo+=5):(t=r,0===ea&&sa(so)),t===r&&(e.substr(Wo,4)===pt?(t=pt,Wo+=4):(t=r,0===ea&&sa(no)),t===r&&(e.substr(Wo,5)===dt?(t=dt,Wo+=5):(t=r,0===ea&&sa(lo)),t===r&&(e.substr(Wo,7)===ut?(t=ut,Wo+=7):(t=r,0===ea&&sa(co)),t===r&&(e.substr(Wo,9)===mt?(t=mt,Wo+=9):(t=r,0===ea&&sa(po)),t===r&&(e.substr(Wo,4)===ht?(t=ht,Wo+=4):(t=r,0===ea&&sa(uo)),t===r&&(e.substr(Wo,8)===gt?(t=gt,Wo+=8):(t=r,0===ea&&sa(mo)),t===r&&(e.substr(Wo,5)===ft?(t=ft,Wo+=5):(t=r,0===ea&&sa(ho)),t===r&&(e.substr(Wo,4)===yt?(t=yt,Wo+=4):(t=r,0===ea&&sa(go)),t===r&&(e.substr(Wo,7)===bt?(t=bt,Wo+=7):(t=r,0===ea&&sa(fo)),t===r&&(e.substr(Wo,6)===kt?(t=kt,Wo+=6):(t=r,0===ea&&sa(yo)),t===r&&(e.substr(Wo,4)===xt?(t=xt,Wo+=4):(t=r,0===ea&&sa(bo)),t===r&&(e.substr(Wo,5)===vt?(t=vt,Wo+=5):(t=r,0===ea&&sa(ko)),t===r&&(e.substr(Wo,6)===Tt?(t=Tt,Wo+=6):(t=r,0===ea&&sa(xo)),t===r&&(e.substr(Wo,4)===_t?(t=_t,Wo+=4):(t=r,0===ea&&sa(vo)),t===r&&(e.substr(Wo,6)===Ct?(t=Ct,Wo+=6):(t=r,0===ea&&sa(To)),t===r&&(e.substr(Wo,3)===wt?(t=wt,Wo+=3):(t=r,0===ea&&sa(_o)),t===r&&(e.substr(Wo,6)===At?(t=At,Wo+=6):(t=r,0===ea&&sa(Co)),t===r&&(e.substr(Wo,4)===Bt?(t=Bt,Wo+=4):(t=r,0===ea&&sa(wo)),t===r&&(e.substr(Wo,6)===St?(t=St,Wo+=6):(t=r,0===ea&&sa(Ao)),t===r&&(e.substr(Wo,5)===It?(t=It,Wo+=5):(t=r,0===ea&&sa(Bo)),t===r&&(e.substr(Wo,6)===Pt?(t=Pt,Wo+=6):(t=r,0===ea&&sa(So))))))))))))))))))))))));return t}(),o!==r?(a=da(),a!==r?(Go=t,t=function(e){return{type:"textStyle",attrs:{color:e}}}(o)):(Wo=t,t=r)):(Wo=t,t=r)):(Wo=t,t=r),t===r)))){if(t=Wo,e.substr(Wo,12)===ve?(i=ve,Wo+=12):(i=r,0===ea&&sa(bi)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t=function(e){return{type:"colorPicker",attrs:{propertyRef:e.trim()}}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r&&(t=Wo,i=function(){let t;e.substr(Wo,4)===_e?(t=_e,Wo+=4):(t=r,0===ea&&sa(xi));t===r&&(e.substr(Wo,6)===Ce?(t=Ce,Wo+=6):(t=r,0===ea&&sa(vi)),t===r&&(e.substr(Wo,5)===we?(t=we,Wo+=5):(t=r,0===ea&&sa(Ti)),t===r&&(e.substr(Wo,15)===Ae?(t=Ae,Wo+=15):(t=r,0===ea&&sa(_i)),t===r&&(e.substr(Wo,15)===Be?(t=Be,Wo+=15):(t=r,0===ea&&sa(Ci)),t===r&&(e.substr(Wo,14)===Se?(t=Se,Wo+=14):(t=r,0===ea&&sa(wi)),t===r&&(e.substr(Wo,13)===Ie?(t=Ie,Wo+=13):(t=r,0===ea&&sa(Ai)),t===r&&(e.substr(Wo,15)===Pe?(t=Pe,Wo+=15):(t=r,0===ea&&sa(Bi)),t===r&&(e.substr(Wo,13)===Ee?(t=Ee,Wo+=13):(t=r,0===ea&&sa(Si)),t===r&&(e.substr(Wo,14)===Le?(t=Le,Wo+=14):(t=r,0===ea&&sa(Ii)),t===r&&(e.substr(Wo,14)===Ve?(t=Ve,Wo+=14):(t=r,0===ea&&sa(Pi)),t===r&&(e.substr(Wo,14)===Ne?(t=Ne,Wo+=14):(t=r,0===ea&&sa(Ei)),t===r&&(e.substr(Wo,13)===Re?(t=Re,Wo+=13):(t=r,0===ea&&sa(Li)),t===r&&(e.substr(Wo,9)===be?(t=be,Wo+=9):(t=r,0===ea&&sa(gi)),t===r&&(e.substr(Wo,6)===Fe?(t=Fe,Wo+=6):(t=r,0===ea&&sa(Vi)),t===r&&(e.substr(Wo,9)===Ke?(t=Ke,Wo+=9):(t=r,0===ea&&sa(Ni)),t===r&&(e.substr(Wo,11)===$e?(t=$e,Wo+=11):(t=r,0===ea&&sa(Ri)),t===r&&(e.substr(Wo,3)===Oe?(t=Oe,Wo+=3):(t=r,0===ea&&sa(Fi)),t===r&&(e.substr(Wo,3)===Je?(t=Je,Wo+=3):(t=r,0===ea&&sa(Ki)),t===r&&(e.substr(Wo,9)===De?(t=De,Wo+=9):(t=r,0===ea&&sa($i)),t===r&&(e.substr(Wo,15)===je?(t=je,Wo+=15):(t=r,0===ea&&sa(Oi)),t===r&&(e.substr(Wo,9)===qe?(t=qe,Wo+=9):(t=r,0===ea&&sa(Ji)),t===r&&(e.substr(Wo,6)===Me?(t=Me,Wo+=6):(t=r,0===ea&&sa(Di)),t===r&&(e.substr(Wo,13)===ze?(t=ze,Wo+=13):(t=r,0===ea&&sa(ji)),t===r&&(e.substr(Wo,16)===He?(t=He,Wo+=16):(t=r,0===ea&&sa(qi)),t===r&&(e.substr(Wo,16)===Ue?(t=Ue,Wo+=16):(t=r,0===ea&&sa(Mi)),t===r&&(e.substr(Wo,15)===We?(t=We,Wo+=15):(t=r,0===ea&&sa(zi)),t===r&&(e.substr(Wo,14)===Ge?(t=Ge,Wo+=14):(t=r,0===ea&&sa(Hi)),t===r&&(e.substr(Wo,16)===Ye?(t=Ye,Wo+=16):(t=r,0===ea&&sa(Ui)),t===r&&(e.substr(Wo,14)===Qe?(t=Qe,Wo+=14):(t=r,0===ea&&sa(Wi)),t===r&&(e.substr(Wo,15)===Ze?(t=Ze,Wo+=15):(t=r,0===ea&&sa(Gi)),t===r&&(e.substr(Wo,15)===Xe?(t=Xe,Wo+=15):(t=r,0===ea&&sa(Yi)),t===r&&(e.substr(Wo,15)===et?(t=et,Wo+=15):(t=r,0===ea&&sa(Qi)),t===r&&(e.substr(Wo,14)===tt?(t=tt,Wo+=14):(t=r,0===ea&&sa(Zi)),t===r&&(e.substr(Wo,10)===rt?(t=rt,Wo+=10):(t=r,0===ea&&sa(Xi)),t===r&&(e.substr(Wo,13)===it?(t=it,Wo+=13):(t=r,0===ea&&sa(eo)),t===r&&(e.substr(Wo,19)===ot?(t=ot,Wo+=19):(t=r,0===ea&&sa(to)),t===r&&(e.substr(Wo,10)===at?(t=at,Wo+=10):(t=r,0===ea&&sa(ro)),t===r&&(e.substr(Wo,10)===st?(t=st,Wo+=10):(t=r,0===ea&&sa(io)),t===r&&(e.substr(Wo,13)===xe?(t=xe,Wo+=13):(t=r,0===ea&&sa(yi)),t===r&&(e.substr(Wo,11)===nt?(t=nt,Wo+=11):(t=r,0===ea&&sa(oo))))))))))))))))))))))))))))))))))))))))));return t}(),i!==r?(o=da(),o!==r?(Go=t,t={type:i}):(Wo=t,t=r)):(Wo=t,t=r),t===r))if(t=Wo,35===e.charCodeAt(Wo)?(i=B,Wo++):(i=r,0===ea&&sa(Cr)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=da(),a!==r?(Go=t,t=function(e){return{type:"comment",comment:e}}(o)):(Wo=t,t=r)}else Wo=t,t=r}}}}}}}}}}}}return t}function za(){let t,i,o,a,s,n,l;if(t=Wo,e.substr(Wo,2)===Te?(i=Te,Wo+=2):(i=r,0===ea&&sa(ki)),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),Go=t,t=o.trim()}else Wo=t,t=r;return t}function Ha(){let t;return e.substr(Wo,6)===Tt?(t=Tt,Wo+=6):(t=r,0===ea&&sa(xo)),t===r&&(e.substr(Wo,6)===Pt?(t=Pt,Wo+=6):(t=r,0===ea&&sa(So)),t===r&&(e.substr(Wo,5)===ft?(t=ft,Wo+=5):(t=r,0===ea&&sa(ho)),t===r&&(e.substr(Wo,4)===pt?(t=pt,Wo+=4):(t=r,0===ea&&sa(no)),t===r&&(e.substr(Wo,6)===Ct?(t=Ct,Wo+=6):(t=r,0===ea&&sa(To)),t===r&&(e.substr(Wo,4)===_t?(t=_t,Wo+=4):(t=r,0===ea&&sa(vo)),t===r&&(e.substr(Wo,5)===dt?(t=dt,Wo+=5):(t=r,0===ea&&sa(lo)),t===r&&(e.substr(Wo,5)===It?(t=It,Wo+=5):(t=r,0===ea&&sa(Bo)),t===r&&(e.substr(Wo,5)===ct?(t=ct,Wo+=5):(t=r,0===ea&&sa(so)),t===r&&(e.substr(Wo,4)===ht?(t=ht,Wo+=4):(t=r,0===ea&&sa(uo))))))))))),t}function Ua(){let e,t,i,o;for(ea++,e=Wo,t=Wa(),t===r&&(t=null),i=[],o=as(),o===r&&(o=Wa());o!==r;)i.push(o),o=as(),o===r&&(o=Wa());var a,s;return Go=e,s=i,e=Mt((a=t)?[a,...s.flat()]:s.flat()),ea--,e}function Wa(){let t,i,o,a,s,n,l;if(t=Wo,i=ns(),i!==r&&(Go=t,i={type:"hardBreak"}),t=i,t===r){if(t=Wo,i=Wo,o=[],a=Wo,s=ss(),s===r&&(s=null),n=Wo,ea++,l=as(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Wo=a,a=r)):(Wo=a,a=r),a===r&&(a=Wo,s=ss(),s!==r?(n=Wo,ea++,l=as(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(s=[s,n],a=s):(Wo=a,a=r)):(Wo=a,a=r)),a!==r)for(;a!==r;)o.push(a),a=Wo,s=ss(),s===r&&(s=null),n=Wo,ea++,l=as(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Wo=a,a=r)):(Wo=a,a=r),a===r&&(a=Wo,s=ss(),s!==r?(n=Wo,ea++,l=as(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(s=[s,n],a=s):(Wo=a,a=r)):(Wo=a,a=r));else o=r;i=o!==r?e.substring(i,Wo):o,i!==r&&(Go=t,i={text:jt(i),type:"text"}),t=i}return t}function Ga(){let t;return 42===e.charCodeAt(Wo)?(t=Et,Wo++):(t=r,0===ea&&sa(Io)),t}function Ya(){let t;return 95===e.charCodeAt(Wo)?(t=Lt,Wo++):(t=r,0===ea&&sa(Po)),t}function Qa(){let t;return 96===e.charCodeAt(Wo)?(t=Vt,Wo++):(t=r,0===ea&&sa(Eo)),t}function Za(){let t;return 33===e.charCodeAt(Wo)?(t=Nt,Wo++):(t=r,0===ea&&sa(Lo)),t}function Xa(){let e,t,i;return e=Wo,t=Ga(),t!==r?(i=Ga(),i!==r?(t=[t,i],e=t):(Wo=e,e=r)):(Wo=e,e=r),e}function es(){let e,t,i;return e=Wo,t=Ya(),t!==r?(i=Ya(),i!==r?(t=[t,i],e=t):(Wo=e,e=r)):(Wo=e,e=r),e}function ts(){let e,t,i;return e=Wo,t=Qa(),t!==r?(i=Qa(),i!==r?(t=[t,i],e=t):(Wo=e,e=r)):(Wo=e,e=r),e}function rs(){let e,t,i;return e=Wo,t=Za(),t!==r?(i=Za(),i!==r?(t=[t,i],e=t):(Wo=e,e=r)):(Wo=e,e=r),e}function is(){let t;return e.substr(Wo,2)===Rt?(t=Rt,Wo+=2):(t=r,0===ea&&sa(Vo)),t}function os(){let t;return 93===e.charCodeAt(Wo)?(t=Ft,Wo++):(t=r,0===ea&&sa(No)),t}function as(){let t,i,o,a,s,n,l;if(t=Wo,i=is(),i!==r){if(o=Wo,a=[],s=e.charAt(Wo),Gt.test(s)?Wo++:(s=r,0===ea&&sa(hr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Wo),Gt.test(s)?Wo++:(s=r,0===ea&&sa(hr));else a=r;o=a!==r?e.substring(o,Wo):a,o!==r?(a=os(),a!==r?(Go=t,t={index:+o,type:"bit"}):(Wo=t,t=r)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,i=Xa(),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=Xa(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(e.length>Wo?(l=e.charAt(Wo),Wo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=Xa(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(e.length>Wo?(l=e.charAt(Wo),Wo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=Xa(),a!==r?(Go=t,t=function(e){return{marks:[{type:"bold"}],text:jt(e),type:"text"}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,i=es(),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=es(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(e.length>Wo?(l=e.charAt(Wo),Wo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=es(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(e.length>Wo?(l=e.charAt(Wo),Wo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=es(),a!==r?(Go=t,t=function(e){return{marks:[{type:"italic"}],text:jt(e),type:"text"}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r){if(t=Wo,i=ts(),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=ts(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(e.length>Wo?(l=e.charAt(Wo),Wo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=ts(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(e.length>Wo?(l=e.charAt(Wo),Wo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=ts(),a!==r?(Go=t,t=function(e){return{marks:[{type:"light"}],text:jt(e),type:"text"}}(o)):(Wo=t,t=r)}else Wo=t,t=r;if(t===r)if(t=Wo,i=rs(),i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=rs(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(e.length>Wo?(l=e.charAt(Wo),Wo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=rs(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(e.length>Wo?(l=e.charAt(Wo),Wo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),a=rs(),a!==r?(Go=t,t=function(e){return{marks:[{type:"highlight"}],text:jt(e),type:"text"}}(o)):(Wo=t,t=r)}else Wo=t,t=r}}}return t}function ss(){let t,i,o,a,s;if(t=Wo,i=Wo,o=ts(),o!==r){if(a=[],s=Qa(),s!==r)for(;s!==r;)a.push(s),s=Qa();else a=r;a!==r?(o=[o,a],i=o):(Wo=i,i=r)}else Wo=i,i=r;if(t=i!==r?e.substring(t,Wo):i,t===r){if(t=Wo,i=Wo,o=rs(),o!==r){if(a=[],s=Za(),s!==r)for(;s!==r;)a.push(s),s=Za();else a=r;a!==r?(o=[o,a],i=o):(Wo=i,i=r)}else Wo=i,i=r;t=i!==r?e.substring(t,Wo):i}return t}function ns(){let t,i;return ea++,10===e.charCodeAt(Wo)?(t=Kt,Wo++):(t=r,0===ea&&sa(Fo)),t===r&&(e.substr(Wo,2)===$t?(t=$t,Wo+=2):(t=r,0===ea&&sa(Ko)),t===r&&(t=e.charAt(Wo),Yt.test(t)?Wo++:(t=r,0===ea&&sa($o)))),ea--,t===r&&(i=r,0===ea&&sa(Ro)),t}function ls(){let t;return t=e.charAt(Wo),Qt.test(t)?Wo++:(t=r,0===ea&&sa(Oo)),t}function cs(){let t,i;return t=ns(),t===r&&(t=Wo,ea++,e.length>Wo?(i=e.charAt(Wo),Wo++):(i=r,0===ea&&sa(Xt)),ea--,i===r?t=void 0:(Wo=t,t=r)),t}function ps(){let t,i,o,a,s,n,l;if(t=Wo,i=Wo,o=Wo,e.substr(Wo,4)===Ot?(a=Ot,Wo+=4):(a=r,0===ea&&sa(Jo)),a!==r?(115===e.charCodeAt(Wo)?(s=Jt,Wo++):(s=r,0===ea&&sa(Do)),s===r&&(s=null),e.substr(Wo,3)===Dt?(n=Dt,Wo+=3):(n=r,0===ea&&sa(jo)),n!==r?(a=[a,s,n],o=a):(Wo=o,o=r)):(Wo=o,o=r),o===r&&(e.substr(Wo,7)===Ut?(o=Ut,Wo+=7):(o=r,0===ea&&sa(qo))),i=o!==r?e.substring(i,Wo):o,i!==r){for(o=Wo,a=[],s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ds(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);s!==r;)a.push(s),s=Wo,n=Wo,ea++,l=da(),ea--,l===r?n=void 0:(Wo=n,n=r),n!==r?(l=ds(),l!==r?(n=[n,l],s=n):(Wo=s,s=r)):(Wo=s,s=r);o=e.substring(o,Wo),Go=t,t={pr:i,t:o}}else Wo=t,t=r;return t}function ds(){let t;return t=e.charAt(Wo),Zt.test(t)?Wo++:(t=r,0===ea&&sa(Mo)),t}var us=[],ms="";e=(e=e.replace(/\s+$/,"")).trimStart(),Qo=a();const hs=Qo!==r&&Wo===e.length;function gs(){throw Qo!==r&&Wo<e.length&&sa({type:"end"}),na(Xo,Zo<e.length?function(t=Wo){const r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(Zo):null,Zo<e.length?aa(Zo,Zo+1):aa(Zo,Zo))}return t.peg$library?{peg$result:Qo,peg$currPos:Wo,peg$FAILED:r,peg$maxFailExpected:Xo,peg$maxFailPos:Zo,peg$success:hs,peg$throw:hs?void 0:gs}:hs?Qo:void gs()}var Wt=Ut,Gt=class{version(){return Wt("",{startRule:"version"})}preprocessAst(e){if(me.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return}}if(this.isAst(e))return e}isAst(e){if(Array.isArray(e)){if(0===e.length)return!0;if(Object.prototype.hasOwnProperty.call(e[0],"type"))return!0}return!1}toAst(e,t){if(Array.isArray(e))return e;let r=e??"";if(!r)return[];let i="bitmarkPlusPlus";return Object.assign({},t).location===Qe&&(i="bitmarkPlus"),r=r.trim(),Wt(r,{startRule:i})}extractBodyBits(e){if(!Array.isArray(e))return[];const t=[],r=e;for(const e of r)switch(e.type){case Ue.gap:case Ue.select:case Ue.highlight:case Ue.mark:t.push(e);break;default:{const r=this.extractBodyBits(e.content);for(const e of r)t.push(e)}}return t}walkBodyBits(e,t){if(!Array.isArray(e))return;const r=e;for(let e=0;e<r.length;e++){const i=r[e];switch(i.type){case Ue.gap:case Ue.select:case Ue.highlight:case Ue.mark:t(r,e,i);break;default:this.walkBodyBits(i.content,t)}}}},Yt=new class{isBoolean(e){return!0===e||!1===e}isBooleanString(e){return!!this.isBoolean(e)||("true"===e||"false"===e)}toBoolean(e,t){return t?!1!==e&&"false"!==e:!0===e||"true"===e}},Qt=new class{asNumber(e,t){if(null==e)return t??void 0;const r=+e;return Number.isNaN(r)||!isFinite(r)?t??void 0:r}isNumeric(e){if(null==e)return!1;const t=+e;return!Number.isNaN(t)&&isFinite(t)}},Zt=class{constructor(){l(this,"textParser"),l(this,"textGenerator"),this.textParser=new Gt,this.textGenerator=new Dt}toExample(e,t,r){if(null!=t){let e;return e=Yt.isBoolean(r)?Yt.toBoolean(t):t,{isExample:!0,example:e,__defaultExample:r??null}}return e?{isExample:!0,example:r??null,__defaultExample:r??null}:{isExample:!1,example:null,__defaultExample:r??null}}toAstProperty(e,t,r,i){if(null==r)return;let o=Be.getBitConfig(e).tags;if(i?.cardSet){const{sideNo:t,variantNo:r}=i.cardSet;o=Be.getTagsConfigForCardSet(e,t,r)??o}const a=Be.getTagConfigForTag(o,t);a?.array&&!Array.isArray(r)?r=[r]:!a?.array&&Array.isArray(r)&&(r=r[r.length-1]);const s=e=>{if(null==e)return;switch(a?.format??y){case y:return null!=Qt.asNumber(e)&&(e=`${e}`),me.isString(e)?me.trimmedString(e):void 0;case k:return Qt.asNumber(e);case x:return Yt.toBoolean(e,!0);case v:return!Yt.toBoolean(e,!0)}return e};if(Array.isArray(r)){const e=r;for(let t=0,r=e.length;t<r;t++)e[t]=s(e[t])}else r=s(r);return r}getEmptyTextAst(e){return this.handleJsonText(e,Qe," ")}handleJsonText(e,t,r){let i;const{textFormat:o}=e;if(null==r)i=[];else if(this.textParser.isAst(r))i=r;else{if(Array.isArray(r)){const e=[];for(let i=0,a=r.length;i<a;i++){const a=r[i];this.textParser.isAst(a)?e[i]=a:me.isString(a)?(e[i]=this.textParser.toAst(bt.breakscape(a,{format:o,location:t}),{format:o,location:t}),e[i].__tag="text"):e[i]=[]}return e}i=me.isString(r)?this.textParser.toAst(bt.breakscape(r,{format:o,location:t,v2:!0}),{format:o,location:t}):[]}return i.__tag="text",i}},Xt=new Gt,er=new class{fillStringExample(e,t,r,i,o){if(t){Array.isArray(t)||(t=[t]);for(const a of t)if(!a.isExample&&(r?(a.example=a.__defaultExample,a.isExample=!0):a.example=i?Xt.toAst(i,{format:e,location:Qe}):void 0,o))break}}fillBooleanExample(e,t,r,i){if(e){Array.isArray(e)||(e=[e]);for(const o of e)if(!o.isExample&&(!i||o.isCorrect)&&(t?(o.example=o.__defaultExample,o.isExample=!0):o.example=Yt.toBoolean(r),i))break}}},tr=r(722),rr=new class{fileExtensionFromUrl(e){let t;if(e)try{const r=new URL(e).pathname.split(".");r.length>1&&(t=r[r.length-1])}catch(e){}return t}domainFromUrl(e){let t;if(e)try{t=new URL(e).hostname}catch(e){}return t}},ir=new class{validateBit(e){if(!e)return e;return e}validateCardBit(e){if(!e)return e;return e}validateResource(e){if(!e)return;const t=e;let r=!0;switch(e.type){case he.image:{const t=e.image;me.isString(t.src)||(t.src="");break}case he.imageLink:{const t=e.imageLink;me.isString(t.url)||(t.url="");break}case he.audio:{const t=e.audio;me.isString(t.src)||(t.src="");break}case he.audioEmbed:{const t=e.audioEmbed;me.isString(t.src)||(t.src="");break}case he.audioLink:{const t=e.audioLink;me.isString(t.url)||(t.url="");break}case he.video:{const t=e.video;me.isString(t.src)||(t.src="");break}case he.videoEmbed:{const t=e.videoEmbed;me.isString(t.url)||(t.url="");break}case he.videoLink:{const t=e.videoLink;me.isString(t.url)||(t.url="");break}case he.stillImageFilm:{const t=e;me.isString(t.image.src)||(t.image.src=""),me.isString(t.audio.src)||(t.audio.src="");break}case he.stillImageFilmEmbed:{const t=e.stillImageFilmEmbed;me.isString(t.url)||(t.url="");break}case he.stillImageFilmLink:{const t=e.stillImageFilmLink;me.isString(t.url)||(t.url="");break}case he.article:{const t=e.article;me.isString(t.body)||(t.body="");break}case he.document:{const t=e.document;me.isString(t.url)||(t.url="");break}case he.documentEmbed:{const t=e.documentEmbed;me.isString(t.url)||(t.url="");break}case he.documentLink:{const t=e.documentLink;me.isString(t.url)||(t.url="");break}case he.documentDownload:{const t=e.documentDownload;me.isString(t.url)||(t.url="");break}case he.appLink:{const t=e.appLink;me.isString(t.url)||(t.url="");break}case he.websiteLink:{const t=e.websiteLink;me.isString(t.url)||(t.url="");break}default:r=!1}return r||e.type&&(e.__invalid=!0),t}isRequired(e,t){if(!e)throw new Error(`${t} is required but is not set`)}isOneOfRequired(e,t){if(Array.isArray(e))for(const t of e)if(t)return;throw new Error(`One of '${t.join(", ")}' is required but none is set`)}isString(e,t){if(!me.isString(e))throw new Error(`${t} is required to be a string`)}isNonEmptyString(e,t){if(!me.isString(e)||""===e)throw new Error(`${t} is required to be a non-empty string`)}isStringOrBoolean(e,t){if(!me.isString(e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a string or a boolean`)}isNonEmptyStringOrBoolean(e,t){if((!me.isString(e)||""===e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a non-empty string or a boolean`)}isArray(e,t){if(!Array.isArray(e))throw new Error(`${t} is required to be a array`)}isNonEmptyArray(e,t){if(!(Array.isArray(e)&&e.length>0))throw new Error(`${t} is required to be a non-empty array`)}isNumber(e,t){if(!Number.isFinite(e))throw new Error(`${t} is required to be a number`)}isBoolean(e,t){if(!0!==e&&!1!==e)throw new Error(`${t} is required to be a boolean`)}isStringOrNumberOrBooleanOrNullOrUndefined(e,t){if(!me.isString(e)&&!Number.isFinite(e)&&!0!==e&&!1!==e&&null!=e)throw new Error(`${t} is required to be a string or a number or a boolean or null or undefined`)}},or=class extends Zt{resourceFromResourceJson(e,t){if(!t)return;const r=[];Array.isArray(t)||(t=[t]);for(const i of t){let t=(0,tr.Enum)(he).fromValue(i.type);if(!t)return;const o=(0,tr.Enum)(he).keyFromValue(t);if(!o)return;let a;if(t=(0,tr.Enum)(he).fromValue(i.__typeAlias)??t,t===he.imageResponsive){const t=i,o=this.resourceFromResourceDataJson(e,he.imagePortrait,t.imagePortrait),a=this.resourceFromResourceDataJson(e,he.imageLandscape,t.imageLandscape);o&&r.push(o),a&&r.push(a)}else if(t===he.stillImageFilm){const t=i,o=this.resourceFromResourceDataJson(e,he.image,t.image),a=this.resourceFromResourceDataJson(e,he.audio,t.audio);o&&r.push(o),a&&r.push(a)}else{if(a=i[o],!a)return;const s=this.resourceFromResourceDataJson(e,t,a);s&&r.push(s)}}return 0!==r.length?1===r.length?r[0]:r:void 0}resourceFromResourceDataJson(e,t,r){if(!r)return;if(!(t=(0,tr.Enum)(he).fromValue(t)))return;const i=me.isString(r)?r:void 0,o=r.url||r.src||r.body||i,a=r.posterImage?this.resourceFromResourceDataJson(e,he.image,r.posterImage)?.image:void 0,s=r.thumbnails?r.thumbnails.map(t=>this.resourceFromResourceDataJson(e,he.image,t)?.image):void 0;return this.resource(e,{type:t,value:o,srcAlt:r.srcAlt,format:r.format,src1x:r.src1x,src2x:r.src2x,src3x:r.src3x,src4x:r.src4x,caption:this.handleJsonText(e,Qe,r.caption),width:r.width??void 0,height:r.height??void 0,alt:r.alt,zoomDisabled:r.zoomDisabled,duration:r.duration,mute:r.mute,autoplay:r.autoplay,allowSubtitles:r.allowSubtitles,showSubtitles:r.showSubtitles,posterImage:a,thumbnails:s,siteName:void 0,license:r.license,copyright:r.copyright,showInIndex:r.showInIndex,search:r.search,selected:r.selected})}resource(e,t){let r;const{type:i,value:o,format:a,...s}=t,n={type:i,value:o??bt.EMPTY_STRING,format:a??bt.EMPTY_STRING,...s};switch(i){case he.video:case he.videoEmbed:case he.videoLink:case he.stillImageFilmEmbed:case he.stillImageFilmLink:{const r=["src1x","src2x","src3x","src4x"],i=[];for(const o of r){const r=t[o];if(r){const t=this.resource(e,{type:he.image,value:r});t&&i.push(t.image)}}n.thumbnails=[...n.thumbnails||[],...i]}}switch(i){case he.image:case he.imagePortrait:case he.imageLandscape:case he.backgroundWallpaper:case he.imagePlaceholder:case he.icon:case he.platformIcon:case he.platformLogo:case he.platformBackgroundImage:case he.previewImage:case he.coverImage:case he.backgroundImage:r=this.imageResource(e,n,i);break;case he.imageLink:r=this.imageLinkResource(e,n);break;case he.audio:r=this.audioResource(e,n);break;case he.audioEmbed:r=this.audioEmbedResource(e,n);break;case he.audioLink:r=this.audioLinkResource(e,n);break;case he.video:case he.previewVideo:r=this.videoResource(e,n);break;case he.videoEmbed:r=this.videoEmbedResource(e,n);break;case he.videoLink:r=this.videoLinkResource(e,n);break;case he.stillImageFilmEmbed:r=this.stillImageFilmEmbedResource(e,n);break;case he.stillImageFilmLink:r=this.stillImageFilmLinkResource(e,n);break;case he.article:r=this.articleResource(e,n);break;case he.document:r=this.documentResource(e,n);break;case he.documentEmbed:r=this.documentEmbedResource(e,n);break;case he.documentLink:r=this.documentLinkResource(e,n);break;case he.documentDownload:r=this.documentDownloadResource(e,n);break;case he.appLink:r=this.appLinkResource(e,n);break;case he.websiteLink:r=this.websiteLinkResource(e,n)}return r}imageResource(e,t,r){const{value:i,srcAlt:o,src1x:a,src2x:s,src3x:n,src4x:l,width:c,height:p,alt:u,zoomDisabled:m,license:h,copyright:g,showInIndex:f,caption:y,search:b,selected:k}=t,{bitType:x}=e;let v=!1;Be.isOfBitType(x,[d.imageSeparator,d.pageBanner,d.imagesLogoGrave,d.prototypeImages,d.extractorImage])&&(v=!0);const T={type:he.image,__typeAlias:r??he.image,__configKey:ge(r??he.image),image:{format:rr.fileExtensionFromUrl(i)??void 0,provider:rr.domainFromUrl(i)??void 0,src:i??"",srcAlt:o??void 0,src1x:a??void 0,src2x:s??void 0,src3x:n??void 0,src4x:l??void 0,width:c??null,height:p??null,alt:u??"",zoomDisabled:m??v,license:h??"",copyright:g??"",showInIndex:f??!1,caption:this.handleJsonText(e,Qe,y),search:b??void 0,selected:k??!1}};return ve.removeUnwantedProperties(T.image,{ignoreFalse:["zoomDisabled","showInIndex","selected"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","alt","license","copyright"]}),ir.validateResource(T)}imageLinkResource(e,t){const{value:r,srcAlt:i,src1x:o,src2x:a,src3x:s,src4x:n,width:l,height:c,alt:p,zoomDisabled:d,license:u,copyright:m,showInIndex:h,caption:g,search:f,selected:y}=t,b={type:he.imageLink,__typeAlias:he.imageLink,__configKey:ge(he.imageLink),imageLink:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,src1x:o??void 0,src2x:a??void 0,src3x:s??void 0,src4x:n??void 0,width:l??null,height:c??null,alt:p??"",zoomDisabled:d??!1,license:u??"",copyright:m??"",showInIndex:h??!1,caption:this.handleJsonText(e,Qe,g),search:f??void 0,selected:y??!1}};return ve.removeUnwantedProperties(b.imageLink,{ignoreFalse:["zoomDisabled","showInIndex","selected"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","alt","license","copyright"]}),ir.validateResource(b)}audioResource(e,t){const{value:r,srcAlt:i,duration:o,mute:a,autoplay:s,license:n,copyright:l,showInIndex:c,caption:p,search:d,selected:u}=t,m={type:he.audio,__typeAlias:he.audio,__configKey:ge(he.audio),audio:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,src:r??"",srcAlt:i??void 0,duration:o??void 0,mute:a??void 0,autoplay:s??void 0,license:n??"",copyright:l??"",showInIndex:c??!1,caption:this.handleJsonText(e,Qe,p),search:d??void 0,selected:u??!1}};return ve.removeUnwantedProperties(m.audio,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(m)}audioEmbedResource(e,t){const{value:r,srcAlt:i,duration:o,mute:a,autoplay:s,license:n,copyright:l,showInIndex:c,caption:p,search:d,selected:u}=t,m={type:he.audioEmbed,__typeAlias:he.audioEmbed,__configKey:ge(he.audioEmbed),audioEmbed:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,src:r??"",srcAlt:i??void 0,duration:o??void 0,mute:a??void 0,autoplay:s??void 0,license:n??"",copyright:l??"",showInIndex:c??!1,caption:this.handleJsonText(e,Qe,p),search:d??void 0,selected:u??!1}};return ve.removeUnwantedProperties(m.audioEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(m)}audioLinkResource(e,t){const{value:r,srcAlt:i,duration:o,mute:a,autoplay:s,license:n,copyright:l,showInIndex:c,caption:p,search:d,selected:u}=t,m={type:he.audioLink,__typeAlias:he.audioLink,__configKey:ge(he.audioLink),audioLink:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,duration:o??void 0,mute:a??void 0,autoplay:s??void 0,license:n??"",copyright:l??"",showInIndex:c??!1,caption:this.handleJsonText(e,Qe,p),search:d??void 0,selected:u??!1}};return ve.removeUnwantedProperties(m.audioLink,{ignoreEmptyString:["url"],ignoreFalse:["selected"]}),ir.validateResource(m)}videoResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:d,posterImage:u,thumbnails:m,license:h,copyright:g,showInIndex:f,caption:y,search:b,selected:k}=t,x={type:he.video,__typeAlias:he.video,__configKey:ge(he.video),video:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,src:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:d??"",license:h??"",copyright:g??"",showInIndex:f??!1,caption:this.handleJsonText(e,Qe,y),search:b??void 0,selected:k??!1,posterImage:u??void 0,thumbnails:m??void 0}};return ve.removeUnwantedProperties(x.video,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(x)}videoEmbedResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:d,posterImage:u,thumbnails:m,license:h,copyright:g,showInIndex:f,caption:y,search:b,selected:k}=t,x={type:he.videoEmbed,__typeAlias:he.videoEmbed,__configKey:ge(he.videoEmbed),videoEmbed:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:d??"",posterImage:u??void 0,thumbnails:m??void 0,license:h??"",copyright:g??"",showInIndex:f??!1,caption:this.handleJsonText(e,Qe,y),search:b??void 0,selected:k??!1}};return ve.removeUnwantedProperties(x.videoEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(x)}videoLinkResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:d,posterImage:u,thumbnails:m,license:h,copyright:g,showInIndex:f,caption:y,search:b,selected:k}=t,x={type:he.videoLink,__typeAlias:he.videoLink,__configKey:ge(he.videoLink),videoLink:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:d??"",posterImage:u??void 0,thumbnails:m??void 0,license:h??"",copyright:g??"",showInIndex:f??!1,caption:this.handleJsonText(e,Qe,y),search:b??void 0,selected:k??!1}};return ve.removeUnwantedProperties(x.videoLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(x)}stillImageFilmEmbedResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:d,posterImage:u,thumbnails:m,license:h,copyright:g,showInIndex:f,caption:y,search:b,selected:k}=t,x={type:he.stillImageFilmEmbed,__typeAlias:he.stillImageFilmEmbed,__configKey:ge(he.stillImageFilmEmbed),stillImageFilmEmbed:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:d??"",posterImage:u??void 0,thumbnails:m??void 0,license:h??"",copyright:g??"",showInIndex:f??!1,caption:this.handleJsonText(e,Qe,y),search:b??void 0,selected:k??!1}};return ve.removeUnwantedProperties(x.stillImageFilmEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(x)}stillImageFilmLinkResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:d,posterImage:u,thumbnails:m,license:h,copyright:g,showInIndex:f,caption:y,search:b,selected:k}=t,x={type:he.stillImageFilmLink,__typeAlias:he.stillImageFilmLink,__configKey:ge(he.stillImageFilmLink),stillImageFilmLink:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:d??"",posterImage:u??void 0,thumbnails:m??void 0,license:h??"",copyright:g??"",showInIndex:f??!1,caption:this.handleJsonText(e,Qe,y),search:b??void 0,selected:k??!1}};return ve.removeUnwantedProperties(x.stillImageFilmLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(x)}articleResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:he.article,__typeAlias:he.article,__configKey:ge(he.article),article:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,body:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,Qe,n),search:l??void 0,selected:c??!1}};return ve.removeUnwantedProperties(p.article,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["body","alt","license","copyright"],ignoreFalse:["selected"]}),ir.validateResource(p)}documentResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:he.document,__typeAlias:he.document,__configKey:ge(he.document),document:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,Qe,n),search:l??void 0,selected:c??!1}};return ve.removeUnwantedProperties(p.document,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(p)}documentEmbedResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:he.documentEmbed,__typeAlias:he.documentEmbed,__configKey:ge(he.documentEmbed),documentEmbed:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,Qe,n),search:l??void 0,selected:c??!1}};return ve.removeUnwantedProperties(p.documentEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(p)}documentLinkResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:he.documentLink,__typeAlias:he.documentLink,__configKey:ge(he.documentLink),documentLink:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,Qe,n),search:l??void 0,selected:c??!1}};return ve.removeUnwantedProperties(p.documentLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(p)}documentDownloadResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:he.documentDownload,__typeAlias:he.documentDownload,__configKey:ge(he.documentDownload),documentDownload:{format:rr.fileExtensionFromUrl(r)??void 0,provider:rr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,Qe,n),search:l??void 0,selected:c??!1}};return ve.removeUnwantedProperties(p.documentDownload,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(p)}appLinkResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:he.appLink,__typeAlias:he.appLink,__configKey:ge(he.appLink),appLink:{provider:void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,Qe,n),search:l??void 0,selected:c??!1}};return ve.removeUnwantedProperties(p.appLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(p)}websiteLinkResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:he.websiteLink,__typeAlias:he.websiteLink,__configKey:ge(he.websiteLink),websiteLink:{provider:void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,Qe,n),search:l??void 0,selected:c??!1}};return ve.removeUnwantedProperties(p.websiteLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ir.validateResource(p)}},ar=class extends Zt{constructor(){super(...arguments),l(this,"resourceBuilder",new or)}buildBitmark(e){const{bits:t,errors:r}=e,i={bits:t,errors:r};return ve.removeUnwantedProperties(i),i}buildBit(e,t){e=structuredClone(e);const r=Be.getMigratedBitType(e.bitType);r&&(e.bitType=r,e.isCollapsible=e.isCollapsible??!0);const i=e.bitType,o=Be.getBitConfig(i),a="true"===o.tags[fe.property_isCollapsible]?.defaultValue,s=(0,Ye.Enum)(kt).fromValue(e.textFormat);let n=(0,Ye.Enum)(C).fromValue(e.textFormat)??o.textFormatDefault;s===kt.bitmarkMinusMinus&&(n=C.bitmarkText);const l={bitConfig:o,bitType:i,textFormat:n},c=this.buildCardNode(l,e),p=Be.isOfBitType(e.bitType,d.essay)?this.toAstProperty(i,fe.property_reasonableNumOfChars,e.reasonableNumOfChars,t):void 0,u={...this.toExample(e.__isDefaultExample,e.example)},m={bitType:i,bitLevel:e.bitLevel,textFormat:n,resourceType:(0,Ye.Enum)(he).fromValue(e.resourceType),isCommented:e.isCommented,id:this.toAstProperty(i,fe.property_id,e.id,t),gUri:this.toAstProperty(i,fe.property_gUri,e.gUri,t),internalComment:this.toAstProperty(i,fe.property_internalComment,e.internalComment,t),customerId:this.toAstProperty(i,fe.property_customerId,e.customerId,t),customerExternalId:this.toAstProperty(i,fe.property_customerExternalId,e.customerExternalId,t),externalId:this.toAstProperty(i,fe.property_externalId,e.externalId,t),spaceId:this.toAstProperty(i,fe.property_spaceId,e.spaceId,t),padletId:this.toAstProperty(i,fe.property_padletId,e.padletId,t),jupyterId:this.toAstProperty(i,fe.property_jupyterId,e.jupyterId,t),jupyterExecutionCount:this.toAstProperty(i,fe.property_jupyterExecutionCount,e.jupyterExecutionCount,t),copyright:this.toAstProperty(i,fe.property_copyright,e.copyright,t),license:this.toAstProperty(i,fe.property_license,e.license,t),rightsPolicy:this.toAstProperty(i,fe.property_rightsPolicy,e.rightsPolicy,t),sourceRL:this.toAstProperty(i,fe.property_sourceRL,e.sourceRL,t),isPublic:this.toAstProperty(i,fe.property_isPublic,e.isPublic,t),isTemplate:this.toAstProperty(i,fe.property_isTemplate,e.isTemplate,t),isTemplateStripTheme:this.toAstProperty(i,fe.property_isTemplateStripTheme,e.isTemplateStripTheme,t),isEditable:this.toAstProperty(i,fe.property_isEditable,e.isEditable,t),needsValidation:this.toAstProperty(i,fe.property_needsValidation,e.needsValidation,t),validationDate:this.toAstProperty(i,fe.property_validationDate,e.validationDate,t),aiGenerated:this.toAstProperty(i,fe.property_aiGenerated,e.aiGenerated,t),machineTranslated:this.toAstProperty(i,fe.property_machineTranslated,e.machineTranslated,t),translationOf:this.toAstProperty(i,fe.property_translationOf,e.translationOf,t),spansPageBreak:this.toAstProperty(i,fe.property_spansPageBreak,e.spansPageBreak,t),searchIndex:this.toAstProperty(i,fe.property_searchIndex,e.searchIndex,t),analyticsTag:this.toAstProperty(i,fe.property_analyticsTag,e.analyticsTag,t),categoryTag:this.toAstProperty(i,fe.property_categoryTag,e.categoryTag,t),topicTag:this.toAstProperty(i,fe.property_topicTag,e.topicTag,t),reportTag:this.toAstProperty(i,fe.property_reportTag,e.reportTag,t),altLangTag:this.toAstProperty(i,fe.property_altLangTag,e.altLangTag,t),feedbackEngine:this.toAstProperty(i,fe.property_feedbackEngine,e.feedbackEngine,t),feedbackType:this.toAstProperty(i,fe.property_feedbackType,e.feedbackType,t),disableFeedback:this.toAstProperty(i,fe.property_disableFeedback,e.disableFeedback,t),diffTo:this.toAstProperty(i,fe.property_diffTo,e.diffTo,t),diffOp:this.toAstProperty(i,fe.property_diffOp,e.diffOp,t),diffRef:this.toAstProperty(i,fe.property_diffRef,e.diffRef,t),diffContext:this.toAstProperty(i,fe.property_diffContext,e.diffContext,t),diffTime:this.toAstProperty(i,fe.property_diffTime,e.diffTime,t),path:this.toAstProperty(i,fe.property_path,e.path,t),releaseVersion:this.toAstProperty(i,fe.property_releaseVersion,e.releaseVersion,t),releaseKind:this.toAstProperty(i,fe.property_releaseKind,e.releaseKind,t),releaseDate:this.toAstProperty(i,fe.property_releaseDate,e.releaseDate,t),iframeSrc:this.toAstProperty(i,fe.property_iframeSrc,e.iframeSrc,t),iframeName:this.toAstProperty(i,fe.property_iframeName,e.iframeName,t),book:this.buildBooks(l,e.book),ageRange:this.toAstProperty(i,fe.property_ageRange,e.ageRange,t),lang:this.toAstProperty(i,fe.property_lang,e.lang,t),language:this.toAstProperty(i,fe.property_language,e.language,t),publisher:this.toAstProperty(i,fe.property_publisher,e.publisher,t),publisherName:this.toAstProperty(i,fe.property_publisherName,e.publisherName,t),displayName:this.toAstProperty(i,fe.property_displayName,e.displayName,t),theme:this.toAstProperty(i,fe.property_theme,e.theme,t),rtl:this.toAstProperty(i,fe.property_rtl,e.rtl,t),computerLanguage:this.toAstProperty(i,fe.property_computerLanguage,e.computerLanguage,t),target:this.toAstProperty(i,fe.property_target,e.target,t),slug:this.toAstProperty(i,fe.property_slug,e.slug,t),tag:this.toAstProperty(i,fe.property_tag,e.tag,t),groupTag:this.buildGroupTags(l,e.groupTag),reviewTag:this.toAstProperty(i,fe.property_reviewTag,e.reviewTag,t),reviewerTag:this.toAstProperty(i,fe.property_reviewerTag,e.reviewerTag,t),reductionTag:this.toAstProperty(i,fe.property_reductionTag,e.reductionTag,t),bubbleTag:this.toAstProperty(i,fe.property_bubbleTag,e.bubbleTag,t),extractorTag:this.toAstProperty(i,fe.property_extractorTag,e.extractorTag,t),extractorInternal:this.toAstProperty(i,fe.property_extractorInternal,e.extractorInternal,t),sourceBB:this.normaliseSourceBB(e.sourceBB),bitFingerprint:this.toAstProperty(i,fe.property_bitFingerprint,e.bitFingerprint,t),levelCEFRp:this.toAstProperty(i,fe.property_levelCEFRp,e.levelCEFRp,t),levelCEFR:this.toAstProperty(i,fe.property_levelCEFR,e.levelCEFR,t),levelILR:this.toAstProperty(i,fe.property_levelILR,e.levelILR,t),levelACTFL:this.toAstProperty(i,fe.property_levelACTFL,e.levelACTFL,t),icon:this.toAstProperty(i,fe.property_icon,e.icon,t),iconTag:this.toAstProperty(i,fe.property_iconTag,e.iconTag,t),colorTag:this.toAstProperty(i,fe.property_colorTag,e.colorTag,t),flashcardSet:this.toAstProperty(i,fe.property_flashcardSet,e.flashcardSet,t),subtype:this.toAstProperty(i,fe.property_subtype,e.subtype,t),bookAlias:this.toAstProperty(i,fe.property_bookAlias,e.bookAlias,t),bookDiff:this.toAstProperty(i,fe.property_bookDiff,e.bookDiff,t),coverImage:"string"==typeof e.coverImage||Array.isArray(e.coverImage)?this.toAstProperty(i,fe.property_coverImage,_t.asArray(e.coverImage),t):this.toImageResource(l,e.coverImage),coverColor:this.toAstProperty(i,fe.property_coverColor,e.coverColor,t),backgroundImage:"string"==typeof e.backgroundImage||Array.isArray(e.backgroundImage)?this.toAstProperty(i,fe.property_backgroundImage,_t.asArray(e.backgroundImage),t):this.toImageResource(l,e.backgroundImage),publications:this.toAstProperty(i,fe.property_publications,e.publications,t),relatedBook:this.toAstProperty(i,fe.property_relatedBook,e.relatedBook,t),translationOfBook:this.toAstProperty(i,fe.property_translationOfBook,e.translationOfBook,t),userFeedbackTranslationUrl:this.toAstProperty(i,fe.property_userFeedbackTranslationUrl,e.userFeedbackTranslationUrl,t),userFeedbackContentUrl:this.toAstProperty(i,fe.property_userFeedbackContentUrl,e.userFeedbackContentUrl,t),author:this.toAstProperty(i,fe.property_author,e.author,t),subject:this.toAstProperty(i,fe.property_subject,e.subject,t),date:this.toAstProperty(i,fe.property_date,e.date,t),dateEnd:this.toAstProperty(i,fe.property_dateEnd,e.dateEnd,t),location:this.toAstProperty(i,fe.property_location,e.location,t),kind:this.toAstProperty(i,fe.property_kind,e.kind,t),hasMarkAsDone:this.toAstProperty(i,fe.property_hasMarkAsDone,e.hasMarkAsDone,t),processHandIn:this.toAstProperty(i,fe.property_processHandIn,e.processHandIn,t),processHandInLocation:this.toAstProperty(i,fe.property_processHandInLocation,e.processHandInLocation,t),chatWithBook:this.toAstProperty(i,fe.property_chatWithBook,e.chatWithBook,t),chatWithBookBrainKey:this.toAstProperty(i,fe.property_chatWithBookBrainKey,e.chatWithBookBrainKey,t),currency:this.toAstProperty(i,fe.property_currency,e.currency,t),bookIsbn:this.toAstProperty(i,fe.property_bookIsbn,e.bookIsbn,t),bookAuthor:this.toAstProperty(i,fe.property_bookAuthor,e.bookAuthor,t),bookType:this.toAstProperty(i,fe.property_bookType,e.bookType,t),bookBindingType:this.toAstProperty(i,fe.property_bookBindingType,e.bookBindingType,t),bookNumberOfPages:this.toAstProperty(i,fe.property_bookNumberOfPages,e.bookNumberOfPages,t),bookRating:this.toAstProperty(i,fe.property_bookRating,e.bookRating,t),bookSeriesTitle:this.toAstProperty(i,fe.property_bookSeriesTitle,e.bookSeriesTitle,t),bookSeriesId:this.toAstProperty(i,fe.property_bookSeriesId,e.bookSeriesId,t),bookSeriesNumber:this.toAstProperty(i,fe.property_bookSeriesNumber,e.bookSeriesNumber,t),bookLanguage:this.toAstProperty(i,fe.property_bookLanguage,e.bookLanguage,t),bookPublishingDate:this.toAstProperty(i,fe.property_bookPublishingDate,e.bookPublishingDate,t),bookPublisher:this.toAstProperty(i,fe.property_bookPublisher,e.bookPublisher,t),bookTranslator:this.toAstProperty(i,fe.property_bookTranslator,e.bookTranslator,t),bookOriginalTitle:this.toAstProperty(i,fe.property_bookOriginalTitle,e.bookOriginalTitle,t),gmbExternalShop:this.toAstProperty(i,fe.property_gmbExternalShop,e.gmbExternalShop,t),gmbExternalShopItems:this.toAstProperty(i,fe.property_gmbExternalShopItems,e.gmbExternalShopItems,t),action:this.toAstProperty(i,fe.property_action,e.action,t),showInIndex:this.toAstProperty(i,fe.property_showInIndex,e.showInIndex,t),refAuthor:this.toAstProperty(i,fe.property_refAuthor,e.refAuthor,t),refBookTitle:this.toAstProperty(i,fe.property_refBookTitle,e.refBookTitle,t),refPublisher:this.toAstProperty(i,fe.property_refPublisher,e.refPublisher,t),refPublicationYear:this.toAstProperty(i,fe.property_refPublicationYear,e.refPublicationYear,t),citationStyle:this.toAstProperty(i,fe.property_citationStyle,e.citationStyle,t),blockId:this.toAstProperty(i,fe.property_blockId,e.blockId,t),pageNo:this.toAstProperty(i,fe.property_pageNo,e.pageNo,t),x:this.toAstProperty(i,fe.property_x,e.x,t),y:this.toAstProperty(i,fe.property_y,e.y,t),width:this.toAstProperty(i,fe.property_width,e.width,t),height:this.toAstProperty(i,fe.property_height,e.height,t),index:this.toAstProperty(i,fe.property_index,e.index,t),classification:this.toAstProperty(i,fe.property_classification,e.classification,t),availableClassifications:this.toAstProperty(i,fe.property_availableClassifications,e.availableClassifications,t),allowedBit:this.toAstProperty(i,fe.property_allowedBit,e.allowedBit,t),authorFullName:this.toAstProperty(i,fe.property_authorFullName,e.authorFullName,t),authorPseudonym:this.toAstProperty(i,fe.property_authorPseudonym,e.authorPseudonym,t),authorTitle:this.toAstProperty(i,fe.property_authorTitle,e.authorTitle,t),authorJobTitle:this.toAstProperty(i,fe.property_authorJobTitle,e.authorJobTitle,t),tableFixedHeader:this.toAstProperty(i,fe.property_tableFixedHeader,e.tableFixedHeader,t),tableHeaderWhitespaceNoWrap:this.toAstProperty(i,fe.property_tableHeaderWhitespaceNoWrap,e.tableHeaderWhitespaceNoWrap,t),tableSearch:this.toAstProperty(i,fe.property_tableSearch,e.tableSearch,t),tableSort:this.toAstProperty(i,fe.property_tableSort,e.tableSort,t),tablePagination:this.toAstProperty(i,fe.property_tablePagination,e.tablePagination,t),tablePaginationLimit:this.toAstProperty(i,fe.property_tablePaginationLimit,e.tablePaginationLimit,t),tableHeight:this.toAstProperty(i,fe.property_tableHeight,e.tableHeight,t),tableWhitespaceNoWrap:this.toAstProperty(i,fe.property_tableWhitespaceNoWrap,e.tableWhitespaceNoWrap,t),tableAutoWidth:this.toAstProperty(i,fe.property_tableAutoWidth,e.tableAutoWidth,t),tableResizableColumns:this.toAstProperty(i,fe.property_tableResizableColumns,e.tableResizableColumns,t),tableColumnMinWidth:this.toAstProperty(i,fe.property_tableColumnMinWidth,e.tableColumnMinWidth,t),quizCountItems:this.toAstProperty(i,fe.property_quizCountItems,e.quizCountItems,t),quizStrikethroughSolutions:this.toAstProperty(i,fe.property_quizStrikethroughSolutions,e.quizStrikethroughSolutions,t),codeLineNumbers:this.toAstProperty(i,fe.property_codeLineNumbers,e.codeLineNumbers,t),codeMinimap:this.toAstProperty(i,fe.property_codeMinimap,e.codeMinimap,t),stripePricingTableId:this.toAstProperty(i,fe.property_stripePricingTableId,e.stripePricingTableId,t),stripePricingTableDescriptiveName:this.toAstProperty(i,fe.property_stripePricingTableDescriptiveName,e.stripePricingTableDescriptiveName,t),stripePublishableKey:this.toAstProperty(i,fe.property_stripePublishableKey,e.stripePublishableKey,t),thumbImage:this.toAstProperty(i,fe.property_thumbImage,e.thumbImage,t),scormSource:this.toAstProperty(i,fe.property_scormSource,e.scormSource,t),posterImage:this.toAstProperty(i,fe.property_posterImage,e.posterImage,t),focusX:this.toAstProperty(i,fe.property_focusX,e.focusX,t),focusY:this.toAstProperty(i,fe.property_focusY,e.focusY,t),pointerLeft:this.toAstProperty(i,fe.property_pointerLeft,e.pointerLeft,t),pointerTop:this.toAstProperty(i,fe.property_pointerTop,e.pointerTop,t),listItemIndent:this.toAstProperty(i,fe.property_listItemIndent,e.listItemIndent,t),backgroundWallpaper:this.toImageResource(l,e.backgroundWallpaper),hasBookNavigation:this.toAstProperty(i,fe.property_hasBookNavigation,e.hasBookNavigation,t),duration:this.toAstProperty(i,fe.property_duration,e.duration,t),deeplink:this.toAstProperty(i,fe.property_deeplink,e.deeplink,t),externalLink:this.toAstProperty(i,fe.property_externalLink,e.externalLink,t),externalLinkText:this.toAstProperty(i,fe.property_externalLinkText,e.externalLinkText,t),videoCallLink:this.toAstProperty(i,fe.property_videoCallLink,e.videoCallLink,t),vendorDashboardId:this.toAstProperty(i,fe.property_vendorDashboardId,e.vendorDashboardId,t),vendorSurveyId:this.toAstProperty(i,fe.property_vendorSurveyId,e.vendorSurveyId,t),vendorUrl:this.toAstProperty(i,fe.property_vendorUrl,e.vendorUrl,t),search:this.toAstProperty(i,fe.property_search,e.search,t),list:this.toAstProperty(i,fe.property_list,e.list,t),layer:this.toAstProperty(i,fe.property_layer,e.layer,t),layerRole:this.toAstProperty(i,fe.property_layerRole,e.layerRole,t),textReference:this.toAstProperty(i,fe.property_textReference,e.textReference,t),isTracked:this.toAstProperty(i,fe.property_isTracked,e.isTracked,t),isInfoOnly:this.toAstProperty(i,fe.property_isInfoOnly,e.isInfoOnly,t),imageFirst:this.toAstProperty(i,fe.property_imageFirst,e.imageFirst,t),activityType:this.toAstProperty(i,fe.property_activityType,e.activityType,t),labelTrue:this.toAstProperty(i,fe.property_labelTrue,e.labelTrue,t),labelFalse:this.toAstProperty(i,fe.property_labelFalse,e.labelFalse,t),content2Buy:this.toAstProperty(i,fe.property_content2Buy,e.content2Buy,t),listPrice:this.toAstProperty(i,fe.property_listPrice,e.listPrice,t),customerProductId:this.toAstProperty(i,fe.property_customerProductId,e.customerProductId,t),customerProductShopLink:this.toAstProperty(i,fe.property_customerProductShopLink,e.customerProductShopLink,t),mailingList:this.toAstProperty(i,fe.property_mailingList,e.mailingList,t),buttonCaption:this.toAstProperty(i,fe.property_buttonCaption,e.buttonCaption,t),callToActionUrl:this.toAstProperty(i,fe.property_callToActionUrl,e.callToActionUrl,t),advertisingClickUrl:this.toAstProperty(i,fe.property_advertisingClickUrl,e.advertisingClickUrl,t),brandColor:this.toAstProperty(i,fe.property_brandColor,e.brandColor,t),brandColorName:this.toAstProperty(i,fe.property_brandColorName,e.brandColorName,t),caption:this.handleJsonText(l,Qe,e.caption),quotedPerson:this.toAstProperty(i,fe.property_quotedPerson,e.quotedPerson,t),reasonableNumOfChars:p,resolved:this.toAstProperty(i,fe.property_resolved,e.resolved,t),resolvedDate:this.toAstProperty(i,fe.property_resolvedDate,e.resolvedDate,t),resolvedBy:this.toAstProperty(i,fe.property_resolvedBy,e.resolvedBy,t),handInAcceptFileType:this.toAstProperty(i,fe.property_handInAcceptFileType,e.handInAcceptFileType,t),handInRequirement:this.toAstProperty(i,fe.property_handInRequirement,e.handInRequirement,t),handInInstruction:this.toAstProperty(i,fe.property_handInInstruction,e.handInInstruction,t),maxCreatedBits:this.toAstProperty(i,fe.property_maxCreatedBits,e.maxCreatedBits,t),maxDisplayLevel:this.toAstProperty(i,fe.property_maxDisplayLevel,e.maxDisplayLevel,t),maxTocChapterLevel:this.toAstProperty(i,fe.property_maxTocChapterLevel,e.maxTocChapterLevel,t),sourceDocument:this.toAstProperty(i,fe.property_sourceDocument,e.sourceDocument,t),internalPrintPdf:this.toAstProperty(i,fe.property_internalPrintPdf,e.internalPrintPdf,t),hasPrintRestriction:this.toAstProperty(i,fe.property_hasPrintRestriction,e.hasPrintRestriction,t),enforceUpdateOverUserInput:this.toAstProperty(i,fe.property_enforceUpdateOverUserInput,e.enforceUpdateOverUserInput,t),extractorExtractionTimestamp:this.toAstProperty(i,fe.property_extractorExtractionTimestamp,e.extractorExtractionTimestamp,t),tocResource:this.toAstProperty(i,fe.property_tocResource,e.tocResource,t),tocContent:this.toAstProperty(i,fe.property_tocContent,e.tocContent,t),page:this.toAstProperty(i,fe.property_page,e.page,t),allowPrint:this.toAstProperty(i,fe.property_allowPrint,e.allowPrint,t),printParentChapterLevel:this.toAstProperty(i,fe.property_printParentChapterLevel,e.printParentChapterLevel,t),printOnRequestCustomerId:this.toAstProperty(i,fe.property_printOnRequestCustomerId,e.printOnRequestCustomerId,t),printOnRequestProductId:this.toAstProperty(i,fe.property_printOnRequestProductId,e.printOnRequestProductId,t),platformBrandTarget:this.toAstProperty(i,fe.property_platformBrandTarget,e.platformBrandTarget,t),platformName:this.toAstProperty(i,fe.property_platformName,e.platformName,t),platformIcon:this.toImageResource(l,e.platformIcon),platformLogo:this.toImageResource(l,e.platformLogo),platformLogoMaxHeight:this.toAstProperty(i,fe.property_platformLogoMaxHeight,e.platformLogoMaxHeight,t),platformPrimaryColor:this.toAstProperty(i,fe.property_platformPrimaryColor,e.platformPrimaryColor,t),platformSecondaryColor:this.toAstProperty(i,fe.property_platformSecondaryColor,e.platformSecondaryColor,t),platformBackgroundColor:this.toAstProperty(i,fe.property_platformBackgroundColor,e.platformBackgroundColor,t),platformScrollbarColor:this.toAstProperty(i,fe.property_platformScrollbarColor,e.platformScrollbarColor,t),platformSelectionColor:this.toAstProperty(i,fe.property_platformSelectionColor,e.platformSelectionColor,t),platformSeparatorColor:this.toAstProperty(i,fe.property_platformSeparatorColor,e.platformSeparatorColor,t),platformPlaceholderColor:this.toAstProperty(i,fe.property_platformPlaceholderColor,e.platformPlaceholderColor,t),platformTextSelectionColor:this.toAstProperty(i,fe.property_platformTextSelectionColor,e.platformTextSelectionColor,t),platformButtonPrimaryColor:this.toAstProperty(i,fe.property_platformButtonPrimaryColor,e.platformButtonPrimaryColor,t),platformButtonBackgroundColor:this.toAstProperty(i,fe.property_platformButtonBackgroundColor,e.platformButtonBackgroundColor,t),platformMessageBackgroundColor:this.toAstProperty(i,fe.property_platformMessageBackgroundColor,e.platformMessageBackgroundColor,t),platformBackgroundImage:this.toImageResource(l,e.platformBackgroundImage),platformBorderColor:this.toAstProperty(i,fe.property_platformBorderColor,e.platformBorderColor,t),platformSelectionTextColor:this.toAstProperty(i,fe.property_platformSelectionTextColor,e.platformSelectionTextColor,t),platformBaseLayerColor:this.toAstProperty(i,fe.property_platformBaseLayerColor,e.platformBaseLayerColor,t),platformMargin:this.toAstProperty(i,fe.property_platformMargin,e.platformMargin,t),platformBorderRadius:this.toAstProperty(i,fe.property_platformBorderRadius,e.platformBorderRadius,t),platformSelectionBorderRadius:this.toAstProperty(i,fe.property_platformSelectionBorderRadius,e.platformSelectionBorderRadius,t),platformNeedsShadow:this.toAstProperty(i,fe.property_platformNeedsShadow,e.platformNeedsShadow,t),productId:this.toAstProperty(i,fe.property_productId,e.productId,t),product:this.toAstProperty(i,fe.property_product,e.product,t),productVideo:this.toAstProperty(i,fe.property_productVideo,e.productVideo,t),productFolder:this.toAstProperty(i,fe.property_productFolder,e.productFolder,t),technicalTerm:this.buildTechnicalTerm(l,e.technicalTerm),servings:this.buildServings(l,e.servings),ratingLevelStart:this.buildRatingLevelStartEnd(l,e.ratingLevelStart),ratingLevelEnd:this.buildRatingLevelStartEnd(l,e.ratingLevelEnd),ratingLevelSelected:this.toAstProperty(i,fe.property_ratingLevelSelected,e.ratingLevelSelected,t),formula:this.toAstProperty(i,fe.property_formula,e.formula,t),markConfig:this.buildMarkConfigs(l,e.markConfig),imageSource:this.buildImageSource(l,e.imageSource),person:this.buildPerson(l,e.person),bot:this.toAstProperty(i,fe.property_bot,e.bot,t),referenceProperty:this.toAstProperty(i,fe.property_reference,e.referenceProperty,t),fullName:this.toAstProperty(i,fe.property_fullName,e.fullName,t),pseudonym:this.toAstProperty(i,fe.property_pseudonym,e.pseudonym,t),titleString:this.toAstProperty(i,fe.property_title,e.titleString,t),jobTitle:this.toAstProperty(i,fe.property_jobTitle,e.jobTitle,t),title:this.handleJsonText(l,Qe,e.title),subtitle:this.handleJsonText(l,Qe,e.subtitle),level:Qt.asNumber(e.level),toc:this.toAstProperty(i,fe.property_toc,e.toc,t),progress:this.toAstProperty(i,fe.property_progress,e.progress,t),isCollapsible:this.toAstProperty(i,fe.property_isCollapsible,e.isCollapsible??(!!a||void 0),t),anchor:e.anchor,reference:e.reference,referenceEnd:e.referenceEnd,revealSolutions:this.toAstProperty(i,fe.property_revealSolutions,e.revealSolutions,t),item:this.handleJsonText(l,Qe,e.item),lead:this.handleJsonText(l,Qe,e.lead),pageNumber:this.handleJsonText(l,Qe,e.pageNumber),marginNumber:this.handleJsonText(l,Qe,e.marginNumber),hint:this.handleJsonText(l,Qe,e.hint),instruction:this.handleJsonText(l,Qe,e.instruction),partialAnswer:this.toAstProperty(i,fe.property_partialAnswer,e.partialAnswer,t),sampleSolution:this.toAstProperty(i,fe.property_sampleSolution,e.sampleSolution,t),additionalSolutions:this.toAstProperty(i,fe.property_additionalSolutions,e.additionalSolutions,t),...this.toExample(e.__isDefaultExample,e.example),previewImage:this.toImageResources(l,e.previewImage),previewVideo:this.toVideoResources(l,e.previewVideo),imagePlaceholder:this.toImageResource(l,e.imagePlaceholder),resources:_t.asArray(this.resourceBuilder.resourceFromResourceJson(l,e.resources)),body:this.buildBody(l,e.body),cardNode:c,footer:this.buildFooter(l,e.footer),extraProperties:this.parseExtraProperties(e.extraProperties),markup:e.markup,parser:e.parser,__isDefaultExample:e.__isDefaultExample??!1};return Be.isOfBitType(m.bitType,d.interview)&&this.pushDownTree(l,void 0,void 0,c,"questions","reasonableNumOfChars",e.reasonableNumOfChars),Be.isOfBitType(m.bitType,d.feedback)&&this.pushDownTree(l,void 0,void 0,c,["feedbacks","reason"],"reasonableNumOfChars",e.reasonableNumOfChars),this.pushDownTree(l,[m.body,...c?.cardBits?.map(e=>e.body)||[]],[ze.gap],void 0,void 0,"isCaseSensitive",e.isCaseSensitive??!0),this.pushDownTree(l,void 0,void 0,c,"pairs","isCaseSensitive",e.isCaseSensitive??!0),this.pushDownTree(l,void 0,void 0,c,["matrix","cells"],"isCaseSensitive",e.isCaseSensitive??!0),this.pushExampleDownTree(l,m.body,c,m.__isDefaultExample,u.example),this.setDefaultBitValues(m),this.setIsExampleFlags(m),this.addVersionToParserInfo(m),ve.removeUnwantedProperties(m,{ignoreAllFalse:!0,ignoreUndefined:["example"],ignoreEmptyArrays:["item","lead","pageNumber","marginNumber","hint","instruction"]}),ir.validateBit(m)}buildBooks(e,t){if(me.isString(t))return t;if(!Array.isArray(t))return;const r=t.map(t=>this.buildBook(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildBook(e,t){if(!t)return;const r={book:t.book??"",reference:t.reference??"",referenceEnd:t.referenceEnd??void 0};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyString:["book","reference"]}),r}buildGroupTags(e,t){if(!t)return;Array.isArray(t)||(t=[t]);let r=t.map(t=>this.buildGroupTag(e,t)).filter(e=>null!=e);const i={};for(const e of r)e&&(i[e.name]?i[e.name].tags=_t.removeDuplicates([...i[e.name].tags,...e.tags]):i[e.name]=e);return r=Object.values(i),r.length>0?r:void 0}normaliseSourceBB(e){if(null==e)return;if(!Array.isArray(e)||0===e.length)return;const t=(e.some(Array.isArray)?e:[e]).filter(e=>Array.isArray(e)&&4===e.length&&e.every(e=>"number"==typeof e));return t.length>0?t:void 0}buildGroupTag(e,t){if(!t)return;const r=Array.isArray(t.tags)?t.tags:[];return{name:t.name??"",tags:r.map(e=>e?.trim()??"")??[]}}buildFeedbackChoices(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildFeedbackChoice(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildFeedbackChoice(e,t){if(!t)return;const r={choice:t.choice??"",requireReason:!!t.requireReason,item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0)};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildFeedbackReason(e,t){if(!t)return;const r=this.handleJsonText(e,Qe,"true"),i={text:t.text??"",reasonableNumOfChars:t.reasonableNumOfChars??void 0,item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,r),__textAst:t.__textAst};return ve.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example","reasonableNumOfChars"]}),i}buildChoices(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildChoice(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildChoice(e,t){if(!t)return;const r={choice:t.choice??"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildResponses(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildResponse(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildResponse(e,t){if(!t)return;const r={response:t.response??"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildBotResponses(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.botResponse(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}botResponse(e,t){if(!t)return;const r={response:t.response??"",reaction:t.reaction??"",feedback:t.feedback??"",item:t.item??"",lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint)};return ve.removeUnwantedProperties(r,{ignoreEmptyString:["response","reaction","feedback","item"],ignoreAllFalse:!0,ignoreEmptyArrays:[],ignoreUndefined:["example"]}),r}buildFeedbacks(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildFeedback(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildFeedback(e,t){if(!t)return;let r,i;if(!t.choices)return;r=this.buildFeedbackChoices(e,t.choices),t.reason&&(i=this.buildFeedbackReason(e,t.reason));const o={item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),choices:r,reason:i};return ve.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),o}buildQuizzes(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildQuiz(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildQuiz(e,t){if(!t)return;const r={...this.toExample(t.__isDefaultExample,t.__defaultExample)};let i,o;if(t.choices)i=this.buildChoices(e,t.choices),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,r.example,!0,i);else{if(!t.responses)return;o=this.buildResponses(e,t.responses),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,r.example,!1,o)}const a={item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),isExample:!!t.__defaultExample,choices:i,responses:o};return ve.removeUnwantedProperties(a,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),a}buildHeading(e,t){if(!t)return;if(null==t.forKeys)return;const r={forKeys:t.forKeys??"",forValues:t.forValues??t.__forValuesDefault??""};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyString:["forKeys","forValues"],ignoreEmptyArrays:["forValues"]}),r}buildPairs(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildPair(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildPair(e,t){if(!t)return;const r=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,i=this.resourceBuilder.resourceFromResourceJson(e,t.keyAudio),o=this.resourceBuilder.resourceFromResourceJson(e,t.keyImage),a={key:t.key??"",keyAudio:i,keyImage:o,item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),isCaseSensitive:t.isCaseSensitive,...this.toExample(t.__isDefaultExample,t.example,r),values:t.values||[],__valuesAst:t.__valuesAst};return ve.removeUnwantedProperties(a,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction","values"],ignoreUndefined:["example","isCaseSensitive"]}),a}buildMatricies(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildMatrix(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildMatrix(e,t){if(!t)return;let r=!1;for(const e of t.cells||[])e&&(t.__isDefaultExample&&!e.isExample&&(e.isExample=!0),r=!!e.isExample||r);const i={key:t.key??"",item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),isExample:r,cells:(t.cells||[]).map(t=>this.buildMatrixCell(e,t)).filter(e=>null!=e)};return ve.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["hint","item","cells"],ignoreUndefined:["isCaseSensitive"]}),i}buildMatrixCell(e,t){if(!t)return;const r=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,i={values:t.values||[],item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),isCaseSensitive:t.isCaseSensitive,...this.toExample(t.__isDefaultExample,t.example,r),__valuesAst:t.__valuesAst};return ve.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["instruction","item","values"],ignoreUndefined:["example","isCaseSensitive"]}),i}buildPronunciationTable(e,t){if(!t)return;return{data:(t.data||[]).map(t=>(t||[]).map(t=>{const r=this.resourceBuilder.resourceFromResourceJson(e,t.audio);return{title:this.handleJsonText(e,Qe,t.title),body:this.handleJsonText(e,Qe,t.body),audio:r}}))}}buildTable(e,t){if(!t)return;const r=Tt(e.bitType,t),i=r,o=r;if(Array.isArray(i.columns)&&i.columns.length>0&&(i.columns=i.columns.map(t=>this.handleJsonText(e,Qe,t))),Array.isArray(i.data)&&i.data.length>0&&(i.data=i.data.map(t=>(t||[]).map(t=>this.handleJsonText(e,Qe,t)))),Array.isArray(i.columnWidths)){const e=Array.isArray(i.columns)?i.columns.length:void 0,t=(null!=e?i.columnWidths.slice(0,e):i.columnWidths).map(e=>"number"==typeof e&&e>0?e:null);t.some(e=>null!=e)?i.columnWidths=t:delete i.columnWidths}const a=t=>{if(!t||!Array.isArray(t.rows))return;return{rows:t.rows.map(t=>({cells:(t.cells||[]).map(t=>{const r={content:this.handleJsonText(e,Qe,t.content)};return null!=t.title&&(r.title=t.title),null!=t.rowspan&&(r.rowspan=t.rowspan),null!=t.colspan&&(r.colspan=t.colspan),t.scope&&(r.scope=t.scope),null!=t.colwidth&&(r.colwidth=t.colwidth),r})}))}},s=a(o.header);s&&s.rows?.length>0&&(o.header=s);const n=a(o.body);n&&n.rows?.length>0&&(o.body=n);const l=a(o.footer);return l&&l.rows?.length>0&&(o.footer=l),r}buildQuestions(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildQuestion(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildQuestion(e,t){if(!t)return;const r=t.__sampleSolutionAst,i={question:this.handleJsonText(e,Ze,t.question),partialAnswer:t.partialAnswer??"",sampleSolution:t.sampleSolution??"",additionalSolutions:t.additionalSolutions??void 0,reasonableNumOfChars:t.reasonableNumOfChars??void 0,item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,r),__sampleSolutionAst:t.__sampleSolutionAst};return ve.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","item","hint","instruction"],ignoreUndefined:["example"],ignoreEmptyString:["partialAnswer","sampleSolution"]}),i}buildIngredients(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildIngredient(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildIngredient(e,t){if(!t)return;const r={title:this.handleJsonText(e,Qe,t.title),checked:t.checked??!1,ingredient:this.handleJsonText(e,Qe,t.ingredient),quantity:t.quantity??0,unit:t.unit??"",unitPlural:t.unitPlural??"",unitAbbr:t.unitAbbr??"",unitAbbrPlural:t.unitAbbrPlural??"",decimalPlaces:t.decimalPlaces??1,disableCalculation:t.disableCalculation??!1,item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint)};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyString:["item","unit"]}),r}buildBody(e,t){if(!t)return;let r;const i=[],o=t.placeholders,a=t.bodyString,{textFormat:s}=e,n=()=>{let a,n=t.body;const l={};if(me.isString(t.body)?(a=(t.body??"").trim(),n=[]):Array.isArray(t.body)||(n=[]),o)for(const[e,t]of Object.entries(o))l[e]=t;if(a){a=bt.breakscape(a,{format:s,location:Ze,v2:!0});let e=0;const t=[];for(const[r,i]of Object.entries(l))if(a){const o=`[!${e}]`;a=a.replace(`${r}`,o),t.push(i),e++}n=this.textParser.toAst(a,{format:s,location:Ze});const r=e=>{for(let i=0,o=e.length;i<o;i++){const o=e[i];if("bit"===o.type){const r=o.index;null!=t[r]&&(e[i]=t[r])}else o.content&&r(o.content)}};r(n)}n=structuredClone(n),this.textParser.walkBodyBits(n,(t,r,o)=>{let a;switch(o.type){case ze.gap:a=this.buildGap(e,o);break;case ze.mark:a=this.buildMark(e,o);break;case ze.select:a=this.buildSelect(e,o);break;case ze.highlight:a=this.buildHighlight(e,o)}null!=a&&(t[r]=a,i.push(a))}),r=n,r.__tag="text"},l=s===C.bitmarkText;s===C.json?(()=>{if("string"==typeof t.body)try{r=JSON.parse(t.body)}catch(e){r=null}else r=t.body})():l?n():r=t.body;return{body:r,bodyBits:i,bodyString:a}}buildFooter(e,t){if(!t)return;return{footer:this.handleJsonText(e,Ze,t.footer)}}buildGap(e,t){if(!t)return;const r=Array.isArray(t.__solutionsAst)&&t.__solutionsAst.length>0?t.__solutionsAst[0]:null;t=this.bodyBitCopyFromAttrs(t);const i={type:ze.gap,solutions:t.solutions||[],item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),isCaseSensitive:t.isCaseSensitive,...this.toExample(t.__isDefaultExample,t.example,r),__solutionsAst:t.__solutionsAst,attrs:{}};return ve.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example","isCaseSensitive"]}),i}buildMarkConfigs(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildMarkConfig(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildMarkConfig(e,t){if(!t)return;const r={mark:t.mark??"unknown",color:t.color??"",emphasis:t.emphasis??""};return ve.removeUnwantedProperties(r,{ignoreAllEmptyString:!0}),r}buildMark(e,t){if(!t)return;t=this.bodyBitCopyFromAttrs(t);const r={type:ze.mark,solution:t.solution??"",mark:t.mark??"",item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0),attrs:{}};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"],ignoreEmptyString:["solution","mark"]}),r}buildSelect(e,t){if(!t)return;t=this.bodyBitCopyFromAttrs(t);const r={type:ze.select,options:this.buildSelectOptions(e,t.options)||[],prefix:t.prefix??"",postfix:t.postfix??"",item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(!1,void 0,void 0),__hintString:t.__hintString,__instructionString:t.__instructionString,attrs:{}};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),r}buildSelectOptions(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildSelectOption(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildSelectOption(e,t){if(!t)return;const r={text:t.text??"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),r}buildHighlight(e,t){if(!t)return;t=this.bodyBitCopyFromAttrs(t);const r={type:ze.highlight,texts:this.buildHighlightTexts(e,t.texts)||[],prefix:t.prefix??"",postfix:t.postfix??"",item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(!1,void 0,void 0),attrs:{}};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),r}buildHighlightTexts(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildHighlightText(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildHighlightText(e,t){if(!t)return;const r={text:t.text??"",isCorrect:!!t.isCorrect,isHighlighted:!!t.isHighlighted,item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),r}buildFlashcards(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildFlashcard(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildFlashcard(e,t){if(!t)return;const r={question:this.buildTextAndIcon(e,t.question),answer:this.buildTextAndIcon(e,t.answer),alternativeAnswers:(t.alternativeAnswers||[]).map(t=>this.buildTextAndIcon(e,t)).filter(e=>null!=e),item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0)};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeAnswers","item","hint","instruction"],ignoreUndefined:["example"]}),r}buildDefinitionList(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildDefinitionListItem(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildDefinitionListItem(e,t){if(!t)return;const{bitType:r}=e,i=Be.isOfBitType(r,[d.metaSearchDefaultTerms]),o={term:this.buildTextAndIcon(e,t.term,i),definition:this.buildTextAndIcon(e,t.definition,i),alternativeDefinitions:(t.alternativeDefinitions||[]).map(t=>this.buildTextAndIcon(e,t,i)).filter(e=>null!=e),item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0)};return ve.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeDefinitions","item","hint","instruction"],ignoreUndefined:["example"]}),o}buildTextAndIcon(e,t,r=!1){const i=this.resourceBuilder.resourceFromResourceJson(e,t?.icon);let o=this.handleJsonText(e,Qe,t?.text||t);r&&(o=this.textGenerator.generateSync(o,C.plainText,Ze,{noBreakscaping:!0}).trim());const a={text:o,icon:i};return ve.removeUnwantedProperties(a,{ignoreEmptyArrays:["text"],ignoreUndefined:["icon"]}),a}buildStatements(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildStatement(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildStatement(e,t){if(!t)return;const r={statement:this.handleJsonText(e,Qe,t.statement),isCorrect:!!t.isCorrect,item:this.handleJsonText(e,Qe,t.item),lead:this.handleJsonText(e,Qe,t.lead),hint:this.handleJsonText(e,Qe,t.hint),instruction:this.handleJsonText(e,Qe,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return ve.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["statement"],ignoreUndefined:["example"]}),r}buildImageSource(e,t){if(!t)return;const{url:r,mockupId:i,size:o,format:a,trim:s}=t,n={url:r??"",mockupId:i??"",size:o??null,format:a??null,trim:Yt.isBoolean(s)?s:null};return ve.removeUnwantedProperties(n,{ignoreFalse:["trim"],ignoreEmptyString:["url","mockupId"],ignoreAllUndefined:!0}),n}buildPerson(e,t){if(!t)return;const{name:r,title:i,avatarImage:o}=t,a={name:r??"",title:i??void 0,avatarImage:this.resourceBuilder.resourceFromResourceJson(e,o)};return ve.removeUnwantedProperties(a,{ignoreEmptyString:["name"],ignoreAllUndefined:!0}),a}buildTechnicalTerm(e,t){if(!t)return;const{technicalTerm:r,lang:i}=t,o={technicalTerm:r??"",lang:i??""};return ve.removeUnwantedProperties(o,{ignoreEmptyString:["technicalTerm"]}),o}buildServings(e,t){if(!t)return;const{servings:r,unit:i,unitPlural:o,unitAbbr:a,unitAbbrPlural:s,decimalPlaces:n,disableCalculation:l,hint:c}=t,p={servings:r??0,unit:i??"",unitPlural:o??"",unitAbbr:a??"",unitAbbrPlural:s??"",decimalPlaces:n??1,disableCalculation:l??!1,hint:c??""};return ve.removeUnwantedProperties(p,{ignoreEmptyString:["servings","unit"]}),p}buildRatingLevelStartEnd(e,t){if(!t)return;const{level:r,label:i}=t,o={level:r??0,label:this.handleJsonText(e,Qe,i)};return ve.removeUnwantedProperties(o,{}),o}buildCardBits(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildCardBit(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildCardBit(e,t){if(!t)return;const{bitType:r,textFormat:i}=e,o=this.buildBit({...t,bitType:r,textFormat:i},{cardSet:{sideNo:0,variantNo:0}});return ve.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),ir.validateCardBit(o)}toImageResource(e,t){return _t.asSingle(this.resourceBuilder.resourceFromResourceDataJson(e,he.image,t?.image))}toImageResources(e,t){const r=_t.asArray(t),i=[];if(r&&r.length>0)for(const t of r){const r=this.resourceBuilder.resourceFromResourceDataJson(e,he.image,t.image);i.push(r)}return i}toVideoResources(e,t){const r=_t.asArray(t),i=[];if(r&&r.length>0)for(const t of r){const r=this.resourceBuilder.resourceFromResourceDataJson(e,he.video,t.video);i.push(r)}return i}buildCardNode(e,t){const r={heading:this.buildHeading(e,t.heading),questions:this.buildQuestions(e,t.questions),elements:this.handleJsonText(e,Ze,t.elements),flashcards:this.buildFlashcards(e,t.flashcards),definitions:this.buildDefinitionList(e,t.definitions??t.legend),statement:this.buildStatement(e,t.statement),statements:this.buildStatements(e,t.statements),choices:this.buildChoices(e,t.choices),responses:this.buildResponses(e,t.responses),feedbacks:this.buildFeedbacks(e,t.feedbacks),quizzes:this.buildQuizzes(e,t.quizzes),pairs:this.buildPairs(e,t.pairs),matrix:this.buildMatricies(e,t.matrix),pronunciationTable:this.buildPronunciationTable(e,t.pronunciationTable),table:this.buildTable(e,t.table),botResponses:this.buildBotResponses(e,t.botResponses),ingredients:this.buildIngredients(e,t.ingredients),cardBits:this.buildCardBits(e,t.cardBits)};return ve.removeUnwantedProperties(r,{ignoreEmptyObjects:["table"]}),Object.keys(r).length>0?r:void 0}bodyBitCopyFromAttrs(e){const t={...e};if(e.attrs)for(const[r,i]of Object.entries(e.attrs))t[r]=i;return t}pushExampleDownTree(e,t,r,i,o){if(i||null!=o){if(r){if(this.pushExampleDownTreeString(e,i,o,r.pairs),this.pushExampleDownTreeBoolean(e,i,o,!1,r.flashcards),this.pushExampleDownTreeBoolean(e,i,o,!1,r.definitions),this.pushExampleDownTreeBoolean(e,i,o,!0,r.choices),this.pushExampleDownTreeBoolean(e,i,o,!1,r.responses,r.statements,r.statement),r.quizzes)for(const t of r.quizzes)this.pushExampleDownTreeBoolean(e,i,o,!0,t.choices),this.pushExampleDownTreeBoolean(e,i,o,!1,t.responses);if(r.matrix)for(const t of r.matrix)this.pushExampleDownTreeString(e,i,o,t.cells)}t&&this.pushExampleDownTreeBodyBits(e,i,o,t)}}pushExampleDownTreeBoolean(e,t,r,i,...o){if((t||null!=r)&&Array.isArray(o))for(const e of o)if(e){const o=Array.isArray(e)?e:[e];er.fillBooleanExample(o,t,r,i)}}pushExampleDownTreeString(e,t,r,...i){if((t||r)&&Array.isArray(i))for(const o of i)if(o){const i=Array.isArray(o)?o:[o];er.fillStringExample(e.textFormat,i,t,r,!1)}}pushExampleDownTreeBodyBits(e,t,r,i){if(!t&&!r)return;const o=this.textParser.extractBodyBits(i?.body);for(const i of o)if(i)switch(i.type){case ze.gap:{const o=i;er.fillStringExample(e.textFormat,[o],t,r,!1);break}case ze.mark:{const e=i;er.fillBooleanExample([e],t,r,!1);break}case ze.select:{const e=i;er.fillBooleanExample(e.options,t,r,!0);break}case ze.highlight:{const e=i;er.fillBooleanExample(e.texts,t,r,!0);break}}}pushDownTree(e,t,r,i,o,a,s){if(void 0!==s){if(i&&o){Array.isArray(o)||(o=[o]);const e=ve.flatMapPath(i,o);for(const t of e)null==t[a]&&(t[a]=s)}if(t){const e=Array.isArray(t)?t:[t];for(const t of e)if(t&&t.body&&r){const e=this.textParser.extractBodyBits(t.body);if(r&&e&&e.length>0)for(const t of e)if(t&&-1!==r.indexOf(t.type)){const e=t;null==e[a]&&(e[a]=s)}}}}}parseExtraProperties(e){if(!e)return;const t=Object.entries(e);if(0===t.length)return;const r={};for(const[e,i]of t)r[e]=_t.asArray(i)||[i];return r}setIsExampleFlags(e){const t=t=>!!t&&(t.isExample||null!=t.example?(t.isExample=!0,e.isExample=!0):t.isExample=t===e&&!!e.isExample,t.isExample),{body:r,cardNode:i}=e,o=this.textParser.extractBodyBits(r?.body);for(const e of o)switch(e.type){case ze.gap:case ze.mark:t(e);break;case ze.select:{const r=e;let i=!1;for(const e of r.options)i=!!t(e)||i;r.isExample=i;break}case ze.highlight:{const r=e;let i=!1;for(const e of r.texts)i=!!t(e)||i;r.isExample=i;break}}if(i){for(const e of i.flashcards||[])t(e);for(const e of i.definitions||[])t(e);for(const e of i.pairs||[])t(e);for(const e of i.matrix||[]){let r=!1;for(const i of e.cells||[])r=!!t(i)||r;e.isExample=r}for(const e of i.quizzes||[]){let r=!1;for(const i of e.responses||[])r=!!t(i)||r;for(const i of e.choices||[])r=!!t(i)||r;e.isExample=r}for(const e of i.responses||[])t(e);for(const e of i.choices||[])t(e);for(const e of i.statements||[])t(e);t(i.statement);for(const e of i.questions||[])t(e)}t(e.statement);for(const r of e.responses||[])t(r);for(const r of e.choices||[])t(r);t(e)}setDefaultBitValues(e){const{bitType:t}=e;switch(t){case d.articleAi:case d.noteAi:case d.summaryAi:e.aiGenerated=this.toAstProperty(t,fe.property_aiGenerated,!0,void 0)}}addVersionToParserInfo(e){const t=e.parser??{};t.version=Je.appVersion.full,e.parser=t}},sr=class{constructor(){l(this,"_buffer"),l(this,"_string",""),l(this,"endOfLineString","\n"),l(this,"lastWrite","")}get isSync(){return!0}getString(){return this._string}async open(){return this.openSync(),Promise.resolve()}async close(){try{this.closeSync()}catch(e){return Promise.reject(e)}return Promise.resolve()}openSync(){this._buffer=[],this._string=""}closeSync(){if(!this._buffer)throw new Error("open() or openSync() never called");this._string=this._buffer.join(""),this._buffer=[]}writeLine(e){if(!this._buffer)return this;let t;return t=null!=e?e+this.endOfLineString:this.endOfLineString,this._buffer.push(t),this.lastWrite=t,this}writeLines(e,t){if(!this._buffer)return this;if(!e)return this;let r="";for(let i=0,o=e.length;i<o;i++){const a=e[i];this._buffer.push(a),r+=a,t&&i<o-1&&(this._buffer.push(t),r+=t),this._buffer.push(this.endOfLineString),r+=this.endOfLineString}return this.lastWrite=r,this}write(e){return this._buffer?(null==e||(e&&(this.lastWrite=e),this._buffer.push(e)),this):this}writeWhiteSpace(){return this.write(" "),this}getLastWrite(){return this.lastWrite}},nr=r(722),lr=r(722),cr=(r(722),{v1:1,v2:2}),pr={debugGenerationInline:!1},dr=class extends Bt{constructor(e,t){super(),l(this,"ast",new Ge),l(this,"textGenerator"),l(this,"bitmarkVersion"),l(this,"options"),l(this,"mainWriter"),l(this,"partWriter"),l(this,"writer"),l(this,"prettifySpace"),l(this,"spacesAroundValues"),l(this,"spacesAroundValuesStr"),l(this,"bitType",d._error),l(this,"textFormat",C.bitmarkText),l(this,"isBodyBitmarkText",!1),l(this,"isCardAllowed",!1),l(this,"firstBit",!0),l(this,"hasCardSet",!1),l(this,"hasFooter",!1),l(this,"inTag",!0),l(this,"skipTableTraversal",!1),this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.write=this.write.bind(this),this.bodyBitCallback=this.bodyBitCallback.bind(this),this.bitmarkVersion=(0,lr.Enum)(wt).fromValue(t?.bitmarkVersion)??At,this.options={...pr,...t?.bitmarkOptions},this.debugGenerationInline=this.options.debugGenerationInline??!1,this.bitmarkVersion===wt.v2?void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=cr.v1):void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=cr.v2),this.prettifySpace=!0===this.options.prettifyJson?2:this.options.prettifyJson||void 0,this.spacesAroundValues=this.calcSpacesAroundValues(),this.spacesAroundValuesStr=" ".repeat(this.spacesAroundValues),this.textGenerator=new Dt(this.bitmarkVersion,{writeCallback:this.write,bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.mainWriter=e,this.partWriter=new sr,this.writer=this.mainWriter,this.generateResourceHandlers(),this.generatePropertyHandlers()}async generate(e){this.resetState(),await this.writer.open(),this.walkAndWrite(e),this.writeLine(),await this.writer.close()}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.bitType=d._error,this.textFormat=C.bitmarkText,this.isBodyBitmarkText=!1,this.isCardAllowed=!1,this.firstBit=!0,this.hasCardSet=!1,this.hasFooter=!1,this.inTag=!0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,We.bitmarkAst,this,void 0),this.writeLine()}enter_bitsValue(e,t){const r=e.value,i=Be.getBitConfig(r.bitType),o=Be.getBitResourcesConfig(r.bitType,r.resourceType);if(this.bitType=r.bitType,this.textFormat=r.textFormat??i.textFormatDefault,this.isBodyBitmarkText=this.textFormat===C.bitmarkText,this.isCardAllowed=this.calculateIsCardAllowed(),this.hasCardSet=this.haveValidCardSet(r),this.hasFooter=this.haveValidFooter(r),this.firstBit||(this.writeNL(),this.writeNL(),this.writeNL()),this.writeOPD(r.bitLevel),r.isCommented&&this.writeString("|"),this.writeTagKey(r.bitType),r.textFormat){this.isWriteTextFormat(r.textFormat,i.textFormatDefault)&&(this.writeColon(),this.writeTagKey(r.textFormat))}let a;if(i.resourceAttachmentAllowed&&r.resources&&r.resources.length>0){const e=o.comboResourceConfigKeysMap;if(o.comboResourceConfigKeysMap.size>0)for(const t of e.keys())a=ke(t);else a=r.resources[0].type}return a&&(this.writeAmpersand(),this.writeTagKey(a)),this.writeCL(),!0}exit_bitsValue(e,t){this.firstBit=!1}enter_internalComment(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==We.bitsValue)return!0;for(let e=0;e<r.length;e++){const i=r[e];this.writeNL(),this.writeProperty("internalComment",i,t,{format:y,array:!0})}return!1}enter_groupTag(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==We.bitsValue)return!0;for(const e of r){const{name:r,tags:i}=e;if(this.writeProperty("groupTag",r,t,{format:y,writeEmpty:!0}),i&&i.length>0)for(const e of i)this.writeProperty("tag",e,t,{format:y,writeEmpty:!0,forceChain:!0})}return!1}leaf_labelTrue(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==We.bitsValue)return!0;const o=i?.value;if(o){const e=""!=r,i=o.labelFalse&&""!=o.labelFalse;(e||i)&&this.writeNL(),e&&this.writeProperty("labelTrue",r,t,{format:y,forceChain:!0}),i&&this.writeProperty("labelFalse",o.labelFalse,t,{format:y,forceChain:!0})}return!1}leaf_labelFalse(e,t){return!0}enter_imageSource(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==We.bitsValue)return!0;const{url:o,mockupId:a,size:s,format:n,trim:l}=r;return this.writeProperty("imageSource",o,t,{format:y}),o&&(a&&this.writeProperty("mockupId",a,t,{format:y,forceChain:!0}),s&&this.writeProperty("size",s,t,{format:y,forceChain:!0}),n&&this.writeProperty("format",n,t,{format:y,forceChain:!0}),Yt.isBoolean(l)&&this.writeProperty("trim",l,t,{format:y,forceChain:!0})),!1}enter_technicalTerm(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==We.bitsValue)return!0;const{technicalTerm:o,lang:a}=r;return this.writeProperty("technicalTerm",o,t,{format:y}),null!=a&&this.writeProperty("lang",a,t,{format:y,forceChain:!0}),!1}enter_servings(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==We.bitsValue)return!0;const{servings:o,unit:a,unitPlural:s,unitAbbr:n,unitAbbrPlural:l,decimalPlaces:c,disableCalculation:p,hint:d}=r;return this.writeProperty("servings",o,t,{format:y}),null!=a&&this.writeProperty("unit",a,t,{format:y,forceChain:!0}),null!=s&&this.writeProperty("unitPlural",s,t,{format:y,forceChain:!0}),null!=n&&this.writeProperty("unitAbbr",n,t,{format:y,forceChain:!0}),null!=l&&this.writeProperty("unitAbbrPlural",l,t,{format:y,forceChain:!0}),null!=c&&this.writeProperty("decimalPlaces",c,t,{format:y,forceChain:!0}),null!=p&&this.writeProperty("disableCalculation",p,t,{format:y,forceChain:!0}),null!=d&&(this.writeOPQ(),this.writeTextOrValue(d,C.plainText,Qe),this.writeCL()),!1}enter_person(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==We.bitsValue)return!0;const{name:o,title:a,avatarImage:s}=r;return this.writeProperty("person",o,t,{format:y}),a&&this.writeProperty("title",a,t,{format:y,forceChain:!0}),s&&this.writeResource(he.image,s.image.src),!1}enter_text(e,t){const r=this.getParentNode(t);return!r||r.key!==We.term&&r.key!==We.definition&&r.key!==We.alternativeDefinitionsValue&&r.key!==We.question&&r.key!==We.answer&&r.key!==We.alternativeAnswersValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze)),!1)}leaf_text(e,t){const r=this.getParentNode(t);return!r||r.key!==We.term&&r.key!==We.definition&&r.key!==We.alternativeDefinitionsValue&&r.key!==We.question&&r.key!==We.answer&&r.key!==We.alternativeAnswersValue&&r.key!==We.reason||(me.isString(e.value)&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze)),!1)}enter_icon(e,t){const r=e.value,i=this.getParentNode(t);return!i||(i.key!==We.term&&i.key!==We.definition&&i.key!==We.alternativeDefinitionsValue&&i.key!==We.question&&i.key!==We.answer&&i.key!==We.alternativeAnswersValue||this.writeResource(he.icon,r.image.src),!0)}leaf_iconValue(e,t){return this.writeNL(),this.writeProperty("icon",e.value,t,{format:y}),!1}enter_ratingLevelStart(e,t){return this.enterRatingLevelStartEndCommon(e,t),!1}enter_ratingLevelEnd(e,t){return this.enterRatingLevelStartEndCommon(e,t),!1}enterRatingLevelStartEndCommon(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==We.bitsValue)return!0;const{level:o,label:a}=r,s=e.key===We.ratingLevelStart?"ratingLevelStart":"ratingLevelEnd";return this.writeProperty(s,o,t,{format:y}),a&&this.writeProperty("label",a,t,{format:b,forceChain:!0}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==We.markConfig)return!0;const{mark:o,color:a,emphasis:s}=r;return o&&(this.writeNL(),this.writeProperty("mark",o,t,{format:y}),a&&this.writeProperty("color",a,t,{format:y,forceChain:!0}),s&&this.writeProperty("emphasis",s,t,{format:y,forceChain:!0})),!1}enter_partialAnswer(e,t){return e.value&&this.writeProperty("partialAnswer",e.value,t,{format:y}),!1}leaf_partialAnswer(e,t){return e.value&&this.writeProperty("partialAnswer",e.value,t,{format:y}),!1}enter_sampleSolution(e,t){return e.value&&this.writeProperty("sampleSolution",e.value,t,{format:y}),!1}leaf_sampleSolution(e,t){return e.value&&this.writeProperty("sampleSolution",e.value,t,{format:y}),!1}leaf_reasonableNumOfChars(e,t){this.writeProperty("reasonableNumOfChars",e.value,t,{format:y})}enter_sourceBB(e,t){const r=this.getParentNode(t);if(r?.key!==We.bitsValue)return!1;const i=e.value;return!(!Array.isArray(i)||0===i.length)&&(this.writeProperty("sourceBB",i.map(e=>e.join(", ")),t,{format:y,array:!0}),!1)}leaf_additionalSolutionsValue(e,t){const r=this.getParentNode(t,2);r?.key===We.questionsValue&&(this.writeNL(),this.writeProperty("additionalSolutions",e.value,t,{format:y,array:!0,writeEmpty:!0}))}enter_item(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(!this.isEmptyText(i?.value?.lead)||(!this.isEmptyText(i?.value?.pageNumber)||(!this.isEmptyText(i?.value?.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(r,C.bitmarkText,Qe),this.writeCL(),!0))))}enter_lead(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(!this.isEmptyText(i?.value?.pageNumber)||(!this.isEmptyText(i?.value?.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(i?.value?.item??"",C.bitmarkText,Qe),this.writeCL(),this.writeOPC(),this.writeTextOrValue(r,C.bitmarkText,Qe),this.writeCL(),!0)))}enter_pageNumber(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(!this.isEmptyText(i?.value?.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(i?.value?.item??"",C.bitmarkText,Qe),this.writeCL(),this.writeOPC(),this.writeTextOrValue(i?.value?.lead??"",C.bitmarkText,Qe),this.writeCL(),this.writeOPC(),this.writeTextOrValue(r??"",C.bitmarkText,Qe),this.writeCL(),!0))}enter_marginNumber(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(i?.value?.item??"",C.bitmarkText,Qe),this.writeCL(),this.writeOPC(),this.writeTextOrValue(i?.value?.lead??"",C.bitmarkText,Qe),this.writeCL(),this.writeOPC(),this.writeTextOrValue(i?.value?.pageNumber??"",C.bitmarkText,Qe),this.writeCL(),this.writeOPC(),this.writeTextOrValue(r,C.bitmarkText,Qe),this.writeCL(),!0)}enter_body(e,t){const r=this.getParentNode(t);if(r?.key!==We.bitsValue&&r?.key!==We.cardBitsValue)return!0;this.inTag=!1;const i=e.value;if(this.textFormat===C.json){const e=i.body??null;if(Array.isArray(e)||ve.isObject(e)){const t=JSON.stringify(e,null,this.prettifySpace);t&&(this.writePlainTextDivider(),this.writeNL(),this.writeTextOrValue(t,C.plainText,Ze))}}else if(this.isBodyBitmarkText){const e=!(this.hasCardSet||this.hasFooter);this.writeNL();const t=Array.isArray(i.body)?i.body:[];this.writeTextOrValue(t,this.textFormat,Ze,{plainTextDividerAllowed:e})}else{this.writePlainTextDivider(),this.writeNL();const e=me.isString(i.body)?i.body:"";this.writeTextOrValue(`${e}`,C.plainText,Ze)}return!1}exit_body(e,t){this.inTag=!0}bodyBitCallback(e,t,r){const i=(0,lr.Enum)(We).fromValue(e.type)??We.bodyBit;return this.ast.walk(e,i,this,void 0),""}enter_gap(e,t){const r=e.value;if(r.solutions&&0===r.solutions.length)this.writeOPU(),this.writeCL();else for(const e of r.solutions)this.writeOPU(),this.writeTextOrValue(e,C.plainText,Qe),this.writeCL();return!0}enter_mark(e,t){const r=e.value;return this.writeOPE(),this.writeTextOrValue(r.solution,C.plainText,Qe),this.writeCL(),!0}enter_select(e,t){return!0}enter_highlight(e,t){return!0}enter_footer(e,t){const r=this.getParentNode(t);if(r?.key!==We.bitsValue)return!0;const i=e.value;return this.textFormat===C.json||i.footer&&i.footer.length>0&&this.isBodyBitmarkText&&(this.writeNL(),this.writeTextOrValue("==== footer ====",C.plainText,Ze),this.writeNL(),this.writeTextOrValue(i.footer,this.textFormat,Ze,{plainTextDividerAllowed:!0})),!1}enter_solutions(e,t){const r=this.getParentNode(t);if(r?.key!==We.bitsValue)return!0;const i=e.value;return i&&0===i.length&&(this.writeOPU(),this.writeCL()),!0}leaf_solution(e,t){const r=this.getParentNode(t);if(r?.key!==We.bitsValue)return;const i=e.value,o=this.getParentNode(t,2)?.value;o?.type===ze.mark&&i&&(this.writeOPE(),this.writeTextOrValue(i,C.plainText,Qe),this.writeCL())}leaf_mark(e,t){const r=t[0];if(r?.key!==We.mark)return;const i=e.value;i&&this.writeProperty("mark",i,t,{format:y})}enter_optionsValue(e,t){const r=e.value;return r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.text,C.plainText,Qe),this.writeCL(),!0}enter_textsValue(e,t){const r=e.value;return r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.text,C.plainText,Qe),this.writeCL(),!0}enter_cardNode(e,t){return!this.isCardAllowed||(this.writeCardSetStart(),!0)}between_cardNode(e,t,r,i){this.isCardAllowed&&this.writeCardSetCardDivider()}exit_cardNode(e,t){this.isCardAllowed&&(this.writeCardSetEnd(),this.options.cardSetVersion,cr.v1)}enter_elements(e,t){}between_elements(e,t,r,i){this.writeCardSetSideDivider()}between_flashcards(e,t,r,i){this.writeCardSetCardDivider()}between_flashcardsValue(e,t,r,i){this.isCardAllowed&&(r.key===We.answer?this.writeCardSetSideDivider():r.key===We.alternativeAnswers&&0!==r.value?.length&&this.writeCardSetVariantDivider())}between_alternativeAnswers(e,t){this.writeCardSetVariantDivider()}between_alternativeDefinitions(e,t){this.writeCardSetVariantDivider()}enter_statements(e,t){}between_statements(e,t,r,i){this.isOfBitType(d.trueFalse1)||this.writeCardSetCardDivider()}enter_statementsValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.statement,C.plainText,Qe),this.writeCL(),!0}enter_choicesValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect||r.requireReason?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.choice,C.plainText,Qe),this.writeCL(),!0}enter_responsesValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.response,C.plainText,Qe),this.writeCL(),!0}between_feedbacks(e,t,r,i){this.writeCardSetCardDivider()}enter_reason(e,t){return this.writeCardSetSideDivider(),!0}enter_quizzes(e,t){}between_quizzes(e,t,r,i){this.writeCardSetCardDivider()}enter_heading(e,t){}between_heading(e,t,r,i){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_forValues(e,t){}between_forValues(e,t,r,i){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_pairs(e,t){}between_pairs(e,t,r,i){this.writeCardSetCardDivider()}enter_keyAudio(e,t){const r=e.value;return this.writeNL(),this.writeResource(he.audio,r.audio.src),!1}enter_keyImage(e,t){const r=e.value;return this.writeNL(),this.writeResource(he.image,r.image.src),!1}enter_matrix(e,t){}between_matrix(e,t,r,i){this.isCardAllowed&&this.writeCardSetCardDivider()}enter_values(e,t){this.isCardAllowed&&this.writeCardSetSideDivider()}between_values(e,t,r,i){this.isCardAllowed&&this.writeCardSetVariantDivider()}between_pronunciationTable(e,t,r,i){const o=this.getParentNode(i);o?.key===We.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}enter_table(e,t){const r=this.getParentNode(t);if(r?.key!==We.cardNode)return!0;const i=e.value;return!i||!this.writeAdvancedTable(i)}between_table(e,t,r,i){const o=this.getParentNode(i);o?.key===We.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}writeAdvancedTable(e){const t=Tt(d.tableExtended,e),r=[{key:"header",qualifier:"table-header",section:t.header},{key:"body",qualifier:void 0,section:t.body},{key:"footer",qualifier:"table-footer",section:t.footer}];let i=0;for(const{key:e,qualifier:t,section:o}of r){const r=o?.rows??[];if(0!==r.length)for(const o of r)this.writeCardSetCardDivider(t),this.writeTableRow(o,e),i++}return i>0}writeTableRow(e,t){const r=e?.cells??[];if(0!==r.length)for(let e=0;e<r.length;e++)e>0&&this.writeCardSetSideDivider(),this.writeNL(),this.writeTableCell(r[e],t)}writeTableCell(e,t){const r="body"===t?"td":"th",i=e.title?"th":"td";i!==r&&(this.writeTableCellProperty("tableCellType",i),this.writeNL()),e.rowspan&&e.rowspan>1&&(this.writeTableCellProperty("tableRowSpan",e.rowspan),this.writeNL()),e.colspan&&e.colspan>1&&(this.writeTableCellProperty("tableColSpan",e.colspan),this.writeNL()),e.scope&&(this.writeTableCellProperty("tableScope",e.scope),this.writeNL()),e.colwidth&&e.colwidth>0&&(this.writeTableCellProperty("tableColWidth",e.colwidth),this.writeNL());const o=e.content??bt.EMPTY_STRING,a=this.options.noBreakscaping?{noBreakscaping:!0}:void 0;this.writeTextOrValue(o,this.textFormat,Ze,a)}writeTableCellProperty(e,t){this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(`${t}`,C.plainText,Qe),this.writeCL()}between_data(e,t,r,i){const o=this.getParentNode(i);o?.key!==We.table&&o?.key!==We.pronunciationTable||this.writeCardSetCardDivider()}between_columns(e,t,r,i){const o=this.getParentNode(i),a=o?.key;a!==We.table&&a!==We.captionDefinitionList||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL()}enter_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,C.bitmarkText,Qe),this.writeCL()}between_dataValue(e,t,r,i){const o=this.getParentNode(i,2);o?.key!==We.table&&o?.key!==We.pronunciationTable||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_dataValueValue(e,t){const r=this.getParentNode(t,3);r?.key===We.table&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze))}enter_dataValueValue(e,t){const r=this.getParentNode(t,3);if((r?.key===We.table||r?.key===We.pronunciationTable)&&e.value){if(r?.key===We.pronunciationTable){const t=e.value;return t.title&&(this.writeNL(),this.writeOP(),this.writeHash(),this.writeTextOrValue(t.title,C.bitmarkText,Qe),this.writeCL()),t.audio&&(this.writeNL(),this.writeResource(he.audio,t.audio.audio.src)),t.body&&(this.writeNL(),this.writeTextOrValue(t.body,this.textFormat,Ze)),!1}this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze)}}between_captionDefinitionList(e,t,r,i){const o=this.getParentNode(i);o?.key===We.cardNode&&this.writeCardSetCardDivider()}leaf_term(e,t){const r=this.getParentNode(t);return r?.key!==We.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze)),!1)}leaf_definition(e,t){const r=this.getParentNode(t);return r?.key!==We.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze)),!1)}between_definitions(e,t,r,i){const o=this.getParentNode(i);o?.key!==We.cardNode&&o?.key!==We.captionDefinitionList||this.writeCardSetCardDivider()}between_definitionsValue(e,t,r,i){const o=this.getParentNode(i);o?.key===We.definitions&&this.isCardAllowed&&(r.key===We.definition?this.writeCardSetSideDivider():r.key===We.alternativeDefinitions&&r.value?.length>0&&this.writeCardSetVariantDivider())}enter_questions(e,t){}between_questions(e,t,r,i){this.writeCardSetCardDivider()}enter_ingredients(e,t){}between_ingredients(e,t,r,i){this.writeCardSetCardDivider()}enter_ingredientsValue(e,t){const r=e.value;return null!=r.title&&(this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(r.title,C.bitmarkText,Qe),this.writeCL()),null!=r.ingredient&&(this.writeNL(),r.checked?this.writeOPP():this.writeOPM(),this.writeCL(),null!=r.quantity&&(this.writeOPB(),this.writeTextOrValue(`${r.quantity}`,C.plainText,Qe),this.writeCL()),null!=r.unit&&this.writeProperty("unit",r.unit,t,{format:y}),null!=r.unitPlural&&this.writeProperty("unitPlural",r.unitPlural,t,{format:y}),null!=r.unitAbbr&&this.writeProperty("unitAbbr",r.unitAbbr,t,{format:y}),null!=r.unitAbbrPlural&&this.writeProperty("unitAbbrPlural",r.unitAbbrPlural,t,{format:y}),null!=r.decimalPlaces&&this.writeProperty("decimalPlaces",r.decimalPlaces,t,{format:y}),r.disableCalculation&&this.writeProperty("disableCalculation",!0,t,{format:y}),this.writeNL(),this.writeTextOrValue(r.ingredient,this.textFormat,Ze)),!0}enter_botResponses(e,t){}between_botResponses(e,t,r,i){this.writeCardSetCardDivider()}enter_cardBits(e,t){}between_cardBits(e,t,r,i){this.writeCardSetCardDivider()}leaf_item(e,t){const r=this.getParentNode(t);r?.key===We.botResponsesValue&&(this.writeNL(),this.writeOPC(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL())}leaf_response(e,t){const r=this.getParentNode(t);r?.key===We.botResponsesValue&&(this.writeNL(),this.writeOPB(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL())}leaf_reaction(e,t){const r=this.getParentNode(t);r?.key===We.botResponsesValue&&(this.writeNL(),this.writeProperty("reaction",e.value,t,{format:y}))}leaf_feedback(e,t){const r=this.getParentNode(t);if(r?.key!==We.botResponsesValue)return;const i=e.value;i&&(this.writeNL(),this.writeTextOrValue(i,this.textFormat,Ze))}enter_backgroundWallpaper(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_imagePlaceholder(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_previewImageValue(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource("previewImage",r),!0}enter_previewVideoValue(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource("previewVideo",r),!0}enter_platformIcon(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_platformLogo(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_platformBackgroundImage(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_coverImage(e,t){const r=e.value;if(r&&"object"==typeof r&&!Array.isArray(r)&&"type"in r){const t=r;return this.writeNL(),this.writePropertyStyleResource(e.key,t),!0}if(Array.isArray(r)){if(null==r)return!0;const e=this.getParentNode(t);if(e?.key!==We.bitsValue)return!0;const i=this.getBitType(t);if(!i)return!0;const o=Be.getBitConfig(i),a=Be.getTagConfigForTag(o.tags,fe.property_coverImage);if(!a)return!0;this.writeNL_IfNotChain(t),this.writeProperty(a.tag,r,t,{format:a.format??y,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue})}return!0}leaf_coverImage(e,t){if(null==e.value)return;const r=this.getParentNode(t);if(r?.key!==We.bitsValue)return;const i=this.getBitType(t);if(!i)return;const o=Be.getBitConfig(i),a=Be.getTagConfigForTag(o.tags,fe.property_coverImage);a&&(this.writeNL_IfNotChain(t),this.writeProperty(a.tag,e.value,t,{format:a.format??y,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue}))}enter_backgroundImage(e,t){const r=e.value;if(r&&"object"==typeof r&&!Array.isArray(r)&&"type"in r){const t=r;return this.writeNL(),this.writePropertyStyleResource(e.key,t),!0}if(Array.isArray(r)){if(null==r)return!0;const e=this.getParentNode(t);if(e?.key!==We.bitsValue)return!0;const i=this.getBitType(t);if(!i)return!0;const o=Be.getBitConfig(i),a=Be.getTagConfigForTag(o.tags,fe.property_backgroundImage);if(!a)return!0;this.writeNL_IfNotChain(t),this.writeProperty(a.tag,r,t,{format:a.format??y,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue})}return!0}leaf_backgroundImage(e,t){if(null==e.value)return;const r=this.getParentNode(t);if(r?.key!==We.bitsValue)return;const i=this.getBitType(t);if(!i)return;const o=Be.getBitConfig(i),a=Be.getTagConfigForTag(o.tags,fe.property_backgroundImage);a&&(this.writeNL_IfNotChain(t),this.writeProperty(a.tag,e.value,t,{format:a.format??y,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue}))}exit_imagePlaceholder(e,t){}enter_posterImage(e,t){const r=this.getParentNode(t);if(r?.key===We.bitsValue){const r=e.value;r&&this.writeProperty("posterImage",r,t,{format:y})}else{const r=e.value;r&&r.src&&this.writeProperty("posterImage",r.src,t,{format:y})}return!0}enter_thumbnails(e,t){const r=e.value;if(Array.isArray(r)){const e=["src1x","src2x","src3x","src4x"];for(let i=0;i<r.length&&i!==e.length;i++){const o=r[i],a=e[i];this.writeProperty(a,o.src,t,{format:y})}}return!1}leaf_level(e,t){const r=this.getParentNode(t);if(r?.key!==We.bitsValue)return!0;if(!Be.isOfBitType(this.bitType,[d.chapter]))return!0;const i=e.value,o=r?.value;if(i>0&&null==o.title){this.writeNL(),this.writeOP();for(let e=0;e<+i;e++)this.writeHash();this.writeCL()}return!1}leaf_titleString(e,t){const r=this.getParentNode(t);return r?.key!==We.bitsValue||(e.value&&(this.writeNL(),this.writeProperty("title",e.value,t,{format:y})),!1)}enter_title(e,t){const r=this.getParentNode(t);if(r?.key!==We.bitsValue)return!0;const i=e.value,o=r?.value,a=o.level||1;if(a&&i){this.writeNL(),this.writeOP();for(let e=0;e<+a;e++)this.writeHash();this.writeTextOrValue(i,C.bitmarkText,Qe),this.writeCL()}return!1}enter_subtitle(e,t){const r=this.getParentNode(t);if(r?.key!==We.bitsValue)return!0;const i=e.value;if(i){this.writeNL(),this.writeOP();for(let e=0;e<2;e++)this.writeHash();this.writeTextOrValue(i,C.bitmarkText,Qe),this.writeCL()}return!1}enter_book(e,t){}enter_bookValue(e,t){const r=e.value;return r&&(this.writeNL(),this.writeProperty("book",r.book,t,{format:y,writeEmpty:!0}),r.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(r.reference,C.plainText,Qe),this.writeCL(),r.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(r.referenceEnd,C.plainText,Qe),this.writeCL()))),!1}leaf_book(e,t){const r=this.getParentNode(t),i=r?.value;i&&e.value&&(this.writeNL(),this.writeProperty("book",e.value,t,{format:y,writeEmpty:!0}),i.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(i.reference,C.plainText,Qe),this.writeCL(),i.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(i.referenceEnd,C.plainText,Qe),this.writeCL())))}leaf_anchor(e,t){e.value&&(this.writeNL(),this.writeOPDANGLE(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL())}leaf_reference(e,t){const r=this.getParentNode(t),i=r?.value;i&&e.value&&(i.book||(this.writeNL(),this.writeOPRANGLE(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL()))}enter_hint(e,t){const r=e.value;return this.isEmptyText(r)||(this.writeNL_IfNotChain(t),this.writeOPQ(),this.writeTextOrValue(r,C.bitmarkText,Qe),this.writeCL()),!1}enter_instruction(e,t){const r=e.value;return this.isEmptyText(r)||(this.writeNL_IfNotChain(t),this.writeOPB(),this.writeTextOrValue(r,C.bitmarkText,Qe),this.writeCL()),!1}leaf_lang(e,t){e.value&&this.writeProperty("lang",e.value,t,{format:x})}enter_refAuthor(e,t){e.value&&this.writeProperty("refAuthor",e.value,t,{format:y,array:!0})}leaf_refBookTitle(e,t){e.value&&this.writeProperty("refBookTitle",e.value,t,{format:y,array:!0})}enter_refPublisher(e,t){e.value&&this.writeProperty("refPublisher",e.value,t,{format:y,array:!0})}leaf_refPublicationYear(e,t){e.value&&this.writeProperty("refPublicationYear",e.value,t,{format:y})}leaf_citationStyle(e,t){e.value&&this.writeProperty("citationStyle",e.value,t,{format:y})}leaf_isExample(e,t){if(!e.value)return;const r=this.getParentNode(t),i=r?.value.example??null;null!=i&&""!==i&&(this.writeNL_IfNotChain(t),this.writeOPA(),this.writeString("example"),this.writeColon(),!0===i?this.writeString(" true "):!1===i?this.writeString(" false "):Array.isArray(i)?this.writeTextOrValue(i,C.bitmarkText,Qe):this.writeTextOrValue(i,C.plainText,Qe),this.writeCL())}enter_elementsValue(e,t){return e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze)),!1}leaf_solutionsValue(e,t){const r=this.getParentNode(t,2);r?.key===We.bitsValue&&null!=e.value&&(this.writeOPU(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL())}leaf_prefix(e,t){e.value&&(this.writeOPPRE(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL())}leaf_postfix(e,t){e.value&&(this.writeOPPOST(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL())}leaf_isCaseSensitive(e,t){this.writeProperty("isCaseSensitive",e.value,t,{format:x,writeEmpty:!0,ignoreFalse:!1,ignoreTrue:!0})}leaf_forKeys(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL()}leaf_forValues(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL()}leaf_forValuesValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,C.plainText,Qe),this.writeCL()}leaf_key(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze))}leaf_valuesValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze))}enter_question(e,t){const r=this.getParentNode(t);return r?.key!==We.questionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze)),!1)}leaf_question(e,t){const r=this.getParentNode(t);r?.key===We.flashcardsValue&&e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,Ze))}leaf_srcAltValue(e,t){this.writeProperty("srcAlt",e.value,t,{format:y})}leaf_src1x(e,t){this.writeProperty("src1x",e.value,t,{format:y})}leaf_src2x(e,t){this.writeProperty("src2x",e.value,t,{format:y})}leaf_src3x(e,t){this.writeProperty("src3x",e.value,t,{format:y})}leaf_src4x(e,t){this.writeProperty("src4x",e.value,t,{format:y})}leaf_width(e,t){this.writeProperty("width",e.value,t,{format:y})}leaf_height(e,t){this.writeProperty("height",e.value,t,{format:y})}leaf_alt(e,t){this.writeProperty("alt",e.value,t,{format:y})}leaf_zoomDisabled(e,t){Be.isOfBitType(this.bitType,[d.imageSeparator,d.pageBanner,d.imagesLogoGrave,d.prototypeImages,d.extractorImage])?this.writeProperty("zoomDisabled",e.value,t,{format:x,writeEmpty:!0,ignoreFalse:!1,ignoreTrue:!0}):this.writeProperty("zoomDisabled",e.value,t,{format:x,writeEmpty:!0,ignoreFalse:!0,ignoreTrue:!1})}leaf_license(e,t){this.writeProperty("license",e.value,t,{format:y})}leaf_copyright(e,t){this.writeProperty("copyright",e.value,t,{format:y})}leaf_provider(e,t){}leaf_showInIndex(e,t){null!=e.value&&(this.writeNL_IfNotChain(t),this.writeProperty("showInIndex",e.value,t,{format:x,ignoreFalse:!0}))}enter_caption(e,t){const r=e.value;return this.writeNL_IfNotChain(t),this.writeProperty("caption",r,t,{format:b}),!1}leaf_search(e,t){const r=e.value;r&&(this.writeNL_IfNotChain(t),this.writeProperty("search",r,t,{format:y}))}leaf_selected(e,t){null!=e.value&&(this.writeNL_IfNotChain(t),this.writeProperty("selected",e.value,t,{format:x,ignoreFalse:!0}))}leaf_duration(e,t){const r=this.getParentNode(t);r?.key===We.bitsValue&&this.writeNL(),this.writeProperty("duration",e.value,t,{format:y})}leaf_mute(e,t){this.writeProperty("mute",e.value,t,{format:x})}leaf_autoplay(e,t){this.writeProperty("autoplay",e.value,t,{format:x})}leaf_allowSubtitles(e,t){this.writeProperty("allowSubtitles",e.value,t,{format:x})}leaf_showSubtitles(e,t){this.writeProperty("showSubtitles",e.value,t,{format:x})}generateResourceHandlers(){for(const e of(0,lr.Enum)(he).keys()){if(e===(0,lr.Enum)(he).keyFromValue(he.unknown))continue;const t=`enter_${e}`;"function"!=typeof this[t]&&(this[t]=(e,t)=>{const r=e.value;if(null==r)return!1;const i=this.getParentNode(t);if(i?.key!==We.resourcesValue)return!0;const o=(0,lr.Enum)(he).fromValue(i?.value.__typeAlias)??(0,lr.Enum)(he).fromValue(i?.value.type);if(!o)return!1;const a=r.url||r.src||r.body||"";return this.writeNL(),this.writeResource(o,a),!0},this[t]=this[t].bind(this))}}generatePropertyHandlers(){for(const e of(0,lr.Enum)(ue).values()){const t=be(e),r=[`enter_${t}`,`leaf_${t}`];for(const i of r)"function"!=typeof this[i]&&"example"!==t&&(this[i]=(t,r)=>{if(null==t.value)return;const i=this.getParentNode(r);if(i?.key!==We.bitsValue)return;const o=this.getBitType(r);if(!o)return;const a=Be.getBitConfig(o),s=Be.getTagConfigForTag(a.tags,e);s&&this.writeProperty(s.tag,t.value,r,{format:s.format??y,array:s.array??!1,writeEmpty:!0,ignoreFalse:"false"===s.defaultValue,ignoreTrue:"true"===s.defaultValue})},this[i]=this[i].bind(this))}}getBitType(e){for(const t of e)if(t.key===We.bitsValue){const e=t.value;return e?.bitType}}isChain(e){const t=this.getParentNode(e);return t?.key!==We.bitsValue&&(t?.key!==We.cardBitsValue&&(t?.key!==We.feedbacksValue&&(t?.key!==We.quizzesValue&&(t?.key!==We.pairsValue&&(t?.key!==We.matrixValue&&(t?.key!==We.definitionsValue&&(t?.key!==We.questionsValue&&t?.key!==We.reason)))))))}haveValidCardSet(e){const t=Be.getBitConfig(e.bitType);return!!t&&!!t.cardSet}haveValidFooter(e){const t=e.footer;if(!t)return!1;return e.textFormat!==C.json&&(!!(t.footer&&t.footer.length>0)&&!!this.isBodyBitmarkText)}calcSpacesAroundValues(){const e=this.options.spacesAroundValues;let t=1;return null!=e&&(t=!0===e?1:!1===e?0:e),t=Math.min(Math.max(t,0),10),t}writeTagKey(e){null!=e&&this.write(bt.breakscape(`${e}`,{format:C.plainText,location:Qe}))}writeTextOrValue(e,t,r,i){const o=r===Qe,a="string"==typeof e?e:void 0,s=Array.isArray(e)?e:void 0,n=o?this.spacesAroundValuesStr:"",l=t===C.bitmarkText?t:C.plainText,c=e=>o?`${n}${e}${n}`:e,p=e=>{const t=this.writer;this.writer=this.partWriter,this.partWriter.openSync(),e(),this.partWriter.closeSync();const r=this.partWriter.getString().trim();return this.writer=t,r};if(null!=a){const e=()=>this.write(bt.breakscape(a,{format:l,location:r}));if(o){const t=p(e);t&&this.write(c(t))}else e();return}if(null!=s){const e=()=>this.textGenerator.generateSync(s,t,r,i);if(o){const t=p(e);t&&this.write(c(t))}else e()}}writeString(e){null!=e&&this.write(`${e}`)}writeOPBUL(){this.write("[•")}writeOPESC(){this.write("[^")}writeOPRANGLE(){this.write("[►")}writeOPDANGLE(){this.write("[▼")}writeOPD(e){this.write(`[${".".repeat(e)}`)}writeOPU(){this.write("[_")}writeOPE(){this.write("[=")}writeOPB(){this.write("[!")}writeOPQ(){this.write("[?")}writeOPA(){this.write("[@")}writeOPP(){this.write("[+")}writeOPM(){this.write("[-")}writeOPS(){this.write("[\\")}writeOPR(){this.write("[*")}writeOPC(){this.write("[%")}writeOPAMP(){this.write("[&")}writeOPDOLLAR(){this.write("[$")}writeOPHASH(){this.write("[#")}writeOPPRE(){this.write("['")}writeOPPOST(){this.write("[")}writeOP(){this.write("[")}writeCL(){0===this.spacesAroundValues&&this.writer.getLastWrite().endsWith("^")?this.write(" ]"):this.write("]")}writeAmpersand(){this.write("&")}writeColon(){this.write(":")}writeHash(){this.write("#")}writeSpacesAroundValues(){this.write(this.spacesAroundValuesStr)}writePlainTextDivider(){this.writeNL(),this.write("==== text ====")}writeCardSetStart(){this.writeNL(),this.options.cardSetVersion===cr.v1?this.write("==="):this.write("====")}writeCardSetEnd(){this.writeNL(),this.options.cardSetVersion===cr.v1&&this.write("===")}writeCardSetCardDivider(e){this.writeNL();const t=this.getCardDividerMarker();this.write(t),e&&this.appendCardDividerQualifier(e)}writeCardSetSideDivider(){this.writeNL(),this.options.cardSetVersion===cr.v1?this.write("=="):this.write("--")}writeCardSetVariantDivider(){this.writeNL(),this.options.cardSetVersion===cr.v1?this.write("--"):this.write("++")}getCardDividerMarker(){return this.options.cardSetVersion===cr.v1?"===":"===="}appendCardDividerQualifier(e){const t=this.getCardDividerMarker(),r=bt.breakscape(e,{format:C.plainText,location:Qe});this.write(" "),this.write(r),this.write(" "),this.write(t)}writeNL_IfNotChain(e){this.isChain(e)||this.writeNL()}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writePropertyStyleResource(e,t,r=!1){if(e&&t){const i=t[(0,lr.Enum)(he).keyFromValue(t.type)??""],o=i&&(i.src||i.url||i.body)||"";r?this.writeOPA():this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(o,C.plainText,Qe),t.type,this.writeCL()}}writeResource(e,t){e&&(this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,C.plainText,Qe),this.writeCL())}writeProperty(e,t,r,i){let o;if(void 0!==t){const a=i.format===b;if(a){if(!i.writeEmpty&&a&&this.isEmptyText(t))return;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,C.bitmarkText,Qe),this.writeCL()}else if(o=Array.isArray(t)?t:[t],o.length>0){i.array||(o=o.slice(o.length-1));let t=0;for(const a of o)if(void 0!==a){if(i.ignoreFalse&&!1===a)continue;if(i.ignoreTrue&&!0===a)continue;if(!i.writeEmpty&&""===a)continue;i.forceChain||0!==t||this.writeNL_IfNotChain(r),this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(`${a}`,C.plainText,Qe),this.writeCL(),t++}}}}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}isEmptyText(e){return!e||(!Array.isArray(e)||0===e.length)}isWriteTextFormat(e,t){return!!(!((0,lr.Enum)(C).fromValue(e)===t)||this.options.explicitTextFormat)}calculateIsCardAllowed(){return this.isBodyBitmarkText&&!this.isOfBitType1()&&!this.isTableBitType()}isTableBitType(){return this.isOfBitType([d.table])}isOfBitType1(){return this.isOfBitType([d.trueFalse1,d.multipleChoice1,d.multipleResponse1])}isOfBitType(e){return Be.isOfBitType(this.bitType,e)}write(e){return this.writer.write(e),this}writeLine(e){return this.writer.writeLine(e),this}writeLines(e,t){return this.writer.writeLines(e,t),this}writeWhiteSpace(){return this.writer.writeWhiteSpace(),this}},ur=class{constructor(e){l(this,"generator"),l(this,"writer"),this.writer=new sr,this.generator=new dr(this.writer,e)}async generate(e){return await this.generator.generate(e),this.writer.getString()}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}},mr={bold:"b",italic:"i",superscript:"sup",subscript:"sub",strike:"s",del:"del",ins:"ins",underline:"u",highlight:"mark",code:"code"},hr=/==([^=]*(?:=(?!=)[^=]*)*)==\|imageInline:([^|\s]+)((?:\|(?:@?[A-Za-z][A-Za-z0-9_-]*:[^|\s]+|#[^|\s]*))*)\|?/g,gr=class{constructor(){l(this,"indentUnit"," ")}generate(e){let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{return""}const r=this.collectBits(t),i=[];for(const e of r){const t=this.renderTableBit(e);t&&i.push(t)}return i.join("\n\n")}collectBits(e){const t=[],r=e=>{if(null==e||"object"!=typeof e)return;if(Array.isArray(e))return void e.forEach(r);const i=e;"bit"in i&&i.bit&&"object"==typeof i.bit?t.push(i.bit):"type"in i&&t.push(i)};return r(e),t}renderTableBit(e){const t=e.table;if(!t)return"";if("table"!==e.type&&"table-extended"!==e.type)return"";const r=this.toExtended(t),i=[];if(i.push("<table>"),null!=e.caption){const t=this.cellContentToHtml(this.asTextAst(e.caption));t&&i.push(`${this.indentUnit}<caption>${t}</caption>`)}return this.renderSection(i,"thead",r.header,"header"),this.renderSection(i,"tbody",r.body,"body"),this.renderSection(i,"tfoot",r.footer,"footer"),i.push("</table>"),i.join("\n")}toExtended(e){const t=e;return t.header||t.body||t.footer?e:xt(e)}renderSection(e,t,r,i){if(r&&r.rows&&0!==r.rows.length){e.push(`${this.indentUnit}<${t}>`);for(const t of r.rows){e.push(`${this.indentUnit.repeat(2)}<tr>`);for(const r of t.cells??[])e.push(`${this.indentUnit.repeat(3)}${this.renderCell(r,i)}`);e.push(`${this.indentUnit.repeat(2)}</tr>`)}e.push(`${this.indentUnit}</${t}>`)}}renderCell(e,t){const r=!0===e.title?"th":"td",i=[];e.rowspan&&e.rowspan>1&&i.push(`rowspan="${e.rowspan}"`),e.colspan&&e.colspan>1&&i.push(`colspan="${e.colspan}"`),e.scope&&i.push(`scope="${e.scope}"`),e.colwidth&&e.colwidth>0&&i.push(`width="${e.colwidth}"`);return`${i.length>0?`<${r} ${i.join(" ")}>`:`<${r}>`}${this.cellContentToHtml(this.asTextAst(e.content))}</${r}>`}asTextAst(e){return null==e?[]:"string"==typeof e?[{type:"text",text:e}]:e}cellContentToHtml(e){return 0===e.length?"":1===e.length&&"paragraph"===e[0].type?this.inlineToHtml(e[0].content??[]):e.map(e=>this.blockToHtml(e)).join("")}blockToHtml(e){switch(e.type){case"paragraph":return`<p>${this.inlineToHtml(e.content??[])}</p>`;case"bulletList":case"noBulletList":case"orderedList":case"orderedListRoman":case"orderedListRomanLower":case"letteredList":case"letteredListLower":case"taskList":return this.listToHtml(e);case"image":case"imageInline":return this.imageToHtml(e);case"latex":return this.latexToHtml(e);default:return this.inlineToHtml([e])}}inlineToHtml(e){return e.map(e=>this.inlineNodeToHtml(e)).join("")}inlineNodeToHtml(e){return"hardBreak"===e.type?"<br>":"image"===e.type||"imageInline"===e.type?this.imageToHtml(e):"latex"===e.type?this.latexToHtml(e):"text"===e.type?this.wrapMarks(this.textToHtml(e.text??""),e.marks):e.content?this.inlineToHtml(e.content):this.escapeText(e.text??"")}wrapMarks(e,t){if(!t||0===t.length)return e;let r="",i="";for(const e of t)if("link"===e.type){const t=e.attrs?.href??"";r+=`<a href="${this.escapeAttr(t)}">`,i=`</a>${i}`}else{const t=mr[e.type];t&&(r+=`<${t}>`,i=`</${t}>${i}`)}return`${r}${e}${i}`}listToHtml(e){const{tag:t,attrs:r}=this.listTag(e);return`<${t}${r}>${(e.content??[]).map(t=>this.listItemToHtml(t,"taskList"===e.type)).join("")}</${t}>`}listTag(e){const t=e.attrs?.start,r="number"==typeof t&&1!==t?` start="${t}"`:"";switch(e.type){case"orderedList":return{tag:"ol",attrs:r};case"orderedListRoman":return{tag:"ol",attrs:` type="I"${r}`};case"orderedListRomanLower":return{tag:"ol",attrs:` type="i"${r}`};case"letteredList":return{tag:"ol",attrs:` type="A"${r}`};case"letteredListLower":return{tag:"ol",attrs:` type="a"${r}`};case"noBulletList":return{tag:"ul",attrs:' style="list-style:none"'};default:return{tag:"ul",attrs:""}}}listItemToHtml(e,t){const r=(e.content??[]).map(e=>"paragraph"===e.type?this.inlineToHtml(e.content??[]):this.blockToHtml(e)).join("");if(t){return`<li><input type="checkbox"${e.attrs?.checked?" checked":""}>${r}</li>`}return`<li>${r}</li>`}imageToHtml(e){const t=e.attrs??{},r=[],i=t.src;return r.push(`src="${this.escapeAttr("string"==typeof i?i:"")}"`),"string"==typeof t.alt&&r.push(`alt="${this.escapeAttr(t.alt)}"`),"string"==typeof t.title&&r.push(`title="${this.escapeAttr(t.title)}"`),null!=t.width&&r.push(`width="${t.width}"`),null!=t.height&&r.push(`height="${t.height}"`),"string"==typeof t.class&&t.class&&r.push(`class="${this.escapeAttr(t.class)}"`),`<img ${r.join(" ")}>`}textToHtml(e){let t="",r=0;for(const i of e.matchAll(hr)){const o=i.index??0;t+=this.escapeText(e.slice(r,o)),t+=this.inlineImageTokenToHtml(i),r=o+i[0].length}return t+=this.escapeText(e.slice(r)),t}inlineImageTokenToHtml(e){const t={alt:e[1],src:e[2]},r=e[3]??"";for(const e of r.split("|")){if(!e||e.startsWith("#"))continue;const r=e.indexOf(":");if(r<1)continue;const i=e.slice(0,r).replace(/^@/,""),o=e.slice(r+1);if("width"===i||"height"===i){const e=Number.parseInt(o,10);!Number.isNaN(e)&&e>0&&e<=9999&&(t[i]=e)}else"class"!==i&&"title"!==i||(t[i]=o)}return this.imageToHtml({type:"imageInline",attrs:t})}latexToHtml(e){const t=e.attrs?.formula??"";return`<math alttext="${this.escapeAttr(t)}"></math>`}escapeText(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}escapeAttr(e){return this.escapeText(e).replace(/"/g,""")}},fr=r(722),yr={},br=class extends Bt{constructor(e,t){super(),l(this,"ast",new Ge),l(this,"textGenerator"),l(this,"bitmarkVersion"),l(this,"textParserVersion"),l(this,"textParser",new Gt),l(this,"options"),l(this,"jsonPrettifySpace"),l(this,"writer"),l(this,"json",[]),l(this,"bitWrapperJson",{}),l(this,"bitJson",{}),l(this,"textDefault",bt.EMPTY_STRING),l(this,"bodyDefault",bt.EMPTY_STRING),l(this,"bodyJson",this.bodyDefault),l(this,"listItem"),l(this,"placeholderIndex",0),this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.bodyBitCallback=this.bodyBitCallback.bind(this),this.bitmarkVersion=(0,fr.Enum)(wt).fromValue(t?.bitmarkVersion)??At,this.textParserVersion=this.textParser.version(),this.options={...yr,...t?.jsonOptions},this.debugGenerationInline=this.options.debugGenerationInline??!1,this.jsonPrettifySpace=!0===this.options.prettify?2:this.options.prettify||void 0,this.bitmarkVersion===wt.v2?void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!0):void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!1),this.textGenerator=new Dt(wt.v2,{bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.writer=e,this.generatePropertyHandlers()}async generate(e){this.resetState(),await this.writer.open(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),await this.writer.close()}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),this.writer.closeSync()}resetState(){this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=this.options.textAsPlainText?bt.EMPTY_STRING:[],this.bodyDefault=this.options.textAsPlainText?bt.EMPTY_STRING:[],this.bodyJson=this.bodyDefault,this.listItem=void 0,this.placeholderIndex=0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,We.bitmarkAst,this,void 0)}enter_bitmarkAst(e,t){this.json=[]}exit_bitmarkAst(e,t){this.options.textAsPlainText&&this.convertAllBitmarkTextsToStringsForPlainText(this.json),this.removeTemporaryProperties(this.json)}enter_bitsValue(e,t){const r=e.value;this.bitWrapperJson={},this.json.push(this.bitWrapperJson),this.bitJson=this.createBitJson(r),this.bitWrapperJson.bit=this.bitJson;const i=Be.getBitConfig(r.bitType),o=this.getTextFormat(t),a=!!i.rootExampleType,s=i.rootExampleType===h;if(a){let e;s?(e=!0,Be.isOfBitType(r.bitType,d.trueFalse1)&&void 0!==r.cardNode?.statement?.isCorrect&&(e=r.cardNode.statement.isCorrect)):e="true";const t=this.toExample(r,{defaultExample:e,isBoolean:s,textFormat:o});this.bitJson.isExample=t.isExample,this.bitJson.example=t.example}else r.isExample&&(this.bitJson.isExample=!0);this.placeholderIndex=0}exit_bitsValue(e,t){const r=this.bitJson.isExample,i=this.bitJson.example;delete this.bitJson.isExample,delete this.bitJson.example,this.bitJson.isExample=r,this.bitJson.example=i,this.cleanBitJson(this.bitJson)}enter_imageSource(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}enter_person(e,t){const r=this.getBitType(t);let i="person";return Be.isOfBitType(r,d.conversationLeft1)&&(i="partner"),this.standardHandler(e,t,We.bitsValue,{array:!1,keyOverride:i})}enter_ratingLevelStart(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}enter_ratingLevelEnd(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}enter_sourceBB(e,t){const r=e.value,i=this.getParentNode(t);return i?.key!==We.bitsValue||r&&r.length>0&&(this.bitJson.sourceBB=1===r.length?r[0]:r),!1}enter_productId(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==We.bitsValue)return!0;return this.getBitType(t)===d.module?this.addProperty(this.bitJson,"productId",r,{array:!0}):r.length>0&&this.addProperty(this.bitJson,"productId",r[r.length-1],{array:!1}),!1}leaf_isCollapsible(e,t){const r=this.getParentNode(t);return r?.key!==We.bitsValue||!0===e.value&&(this.bitJson.isCollapsible=!0),!1}enter_isCollapsible(e,t){return this.leaf_isCollapsible(e,t)}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);return i?.key!==We.markConfig||(this.bitJson.marks||(this.bitJson.marks=[]),this.bitJson.marks.push(r),!1)}enter_item(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}enter_lead(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}enter_pageNumber(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}enter_marginNumber(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}enter_hint(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}enter_instruction(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}leaf_titleString(e,t){const r=this.getParentNode(t);return r?.key!==We.bitsValue||this.standardHandler(e,t,[We.bitsValue],{array:!1,keyOverride:"title"})}enter_title(e,t){return this.standardHandler(e,t,[We.bitsValue,We.cardNode],{array:!0})}enter_subtitle(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}enter_caption(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}enter_width(e,t){let r=e.value;const i=this.getBitType(t),o=this.getParentNode(t);return o?.key===We.bitsValue&&Be.isOfBitType(i,d.extractorBlock)&&(r=Qt.asNumber(r,0)??0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:r})}enter_height(e,t){let r=e.value;const i=this.getBitType(t),o=this.getParentNode(t);return o?.key===We.bitsValue&&Be.isOfBitType(i,d.extractorBlock)&&(r=Qt.asNumber(r,0)??0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:r})}enter_extraProperties(e,t){const r=e.value;if(!this.options.excludeUnknownProperties&&r)for(const[e,t]of Object.entries(r)){let r=e;Object.prototype.hasOwnProperty.call(this.bitJson,e)&&(r=`_${e}`),this.addProperty(this.bitJson,r,t,{array:!0})}return!1}enter_cardBitsValue(e,t){const r=e.value,i=this.getBitType(t);if(!i)return;let o;if(i===d.bookReferenceList){this.bitJson.bookReferences||(this.bitJson.bookReferences=[]);const e={};this.addProperty(e,"lang",r.lang,{array:!1}),this.addProperty(e,"refAuthor",r.refAuthor??[],{array:!0}),this.addProperty(e,"refBookTitle",r.refBookTitle??[],{array:!1}),this.addProperty(e,"refPublisher",r.refPublisher??[],{array:!0}),this.addProperty(e,"refPublicationYear",r.refPublicationYear??[],{array:!1}),this.addProperty(e,"citationStyle",r.citationStyle??[],{array:!1}),this.bitJson.bookReferences.push(e)}else i===d.pageFooter?(this.bitJson.sections||(this.bitJson.sections=[]),o=this.bitJson.sections):(this.bitJson.listItems||(this.bitJson.listItems=[]),o=this.bitJson.listItems),this.listItem={item:r.item??[],lead:r.lead??[],hint:r.hint??[],instruction:r.instruction??[],body:this.bodyDefault},o.push(this.listItem)}exit_cardBitsValue(e,t){this.listItem=void 0}enter_body(e,t){const r=e.value,i=this.getParentNode(t);if(!i)return!1;const o=this.getTextFormat(t),a=o===C.bitmarkText;if(this.bodyJson=r.body,i.key===We.bitsValue){this.bitJson.body=this.bodyJson;const e=a&&this.isBitmarkText(this.bodyJson);if(this.options.textAsPlainText&&e){const e=this.textGenerator.generateSync(this.bodyJson,o,Ze,{noBreakscaping:!0});this.bitJson.body=(e??"").trim()}else e&&(this.bitJson.body=this.moveBodyBitPropertiesToAttrs(this.bodyJson))}else i.key===We.cardBitsValue&&this.listItem&&(this.listItem.body=this.bodyJson);return!1}bodyBitCallback(e,t,r){const i=`{${this.placeholderIndex}}`;return this.placeholderIndex++,this.bitJson.placeholders=this.bitJson.placeholders??{},this.bitJson.placeholders[i]=e,i}moveBodyBitPropertiesToAttrs(e,t=0){if(0===t)e=structuredClone(e);else if(t>5e3)throw new Error("Recursion limit exceeded");for(const r of e)if(r.type!==ze.text&&(0,fr.Enum)(ze).values().includes(r.type)){const e=r;e.attrs={};for(const[t,r]of Object.entries(e))"type"!==t&&"attrs"!==t&&(e.attrs[t]=r,delete e[t])}else Array.isArray(r.content)&&(t++,this.moveBodyBitPropertiesToAttrs(r.content,t));return e}enter_footer(e,t){return this.standardHandler(e,t,void 0,{array:!0,valueOverride:e.value.footer})}enter_elements(e,t){return this.standardHandler(e,t,void 0,{array:!0})}enter_flashcards(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0,keyOverride:"cards"})}enter_definitions(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0})}enter_statement(e,t){const r=e.value,i=this.getParentNode(t);i?.key===We.cardNode&&r&&(this.bitJson.statement=r.statement??[],this.bitJson.isCorrect=r.isCorrect??!1,this.bitJson.example=r.example,this.bitJson.isExample=r.isExample)}enter_statements(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0})}enter_choices(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0})}enter_responses(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0})}enter_feedbacks(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0})}enter_quizzes(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0})}enter_heading(e,t){return this.standardHandler(e,t,void 0,{array:!1})}enter_pairs(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0})}enter_matrix(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0})}enter_pronunciationTable(e,t){return this.standardHandler(e,t,We.cardNode,{array:!1})}enter_table(e,t){return this.standardHandler(e,t,We.cardNode,{array:!1})}enter_questions(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0})}enter_botResponses(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0,keyOverride:"responses"})}enter_ingredients(e,t){return this.standardHandler(e,t,We.cardNode,{array:!0})}enter_captionDefinitionList(e,t){return this.standardHandler(e,t,We.cardNode,{array:!1})}enter_backgroundWallpaper(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}enter_imagePlaceholder(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}enter_previewImage(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}enter_previewVideo(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}enter_platformIcon(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}enter_platformLogo(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}enter_platformBackgroundImage(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}enter_coverImage(e,t){return this.standardHandler(e,t,We.bitsValue,{array:Array.isArray(e.value)})}enter_backgroundImage(e,t){return this.standardHandler(e,t,We.bitsValue,{array:Array.isArray(e.value)})}enter_resources(e,t){const r=e.value,i=this.getBitType(t),o=this.getResourceType(t);if(!r||!i)return!0;let a;const s=Be.getBitConfig(i),n=Be.getBitResourcesConfig(i,o).comboResourceConfigKeysMap;if(n.size>0)for(const[e,t]of n.entries()){const i=ke(e),o={type:i,__typeAlias:i,__configKey:e};for(const e of t){const t=r.find(t=>t.__configKey===e);if(t){const e=Be.getTagConfigForTag(s.tags,t.__configKey);if(e){const r=e.jsonKey??e.tag,i=e.configKey??t.__configKey,a=t.__configKey===i?t:void 0;if(a)for(const[e,t]of Object.entries(a))"type"!==e&&(o[r]=t)}}}a=o}else if(Be.isOfBitType(i,[d.imagesLogoGrave,d.prototypeImages,d.extractorImage])){const e=[];for(const t of r)t.type===he.image&&e.push(t);i===d.imagesLogoGrave?this.bitJson.logos=e:this.bitJson.images=e}else r.length>=1&&(a=r[0]);return this.bitJson.resource=a,!1}leaf_level(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}enter_book(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!0})}leaf_book(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}leaf_anchor(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}leaf_reference(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}leaf_referenceEnd(e,t){return this.standardHandler(e,t,We.bitsValue,{array:!1})}leaf_markup(e,t){const r=e.value;return r&&(this.bitWrapperJson.bitmark=r),!1}enter_internalComment(e,t){return!1}enter_parser(e,t){const r=e.value,i=this.getBitType(t),o=this.getParentNode(t);if(r&&i){const{version:e,warnings:i,errors:a,...s}=r,n=`${this.bitmarkVersion}`,l=this.textParserVersion,c=this.getInternalComments(t);o?.key===We.bitsValue&&(this.bitWrapperJson.parser={version:e,bitmarkVersion:n,textParserVersion:l,internalComments:c,...s,warnings:i,errors:a},this.options.enableWarnings||delete this.bitWrapperJson.parser.warnings)}}generatePropertyHandlers(){for(const e of(0,fr.Enum)(ue).values()){const t=be(e),r=[`enter_${t}`,`leaf_${t}`];for(const e of r)"function"!=typeof this[e]&&"example"!==t&&(this[e]=(e,r)=>{const i=e.value;if(null==i)return;const o=this.getParentNode(r);o?.key===We.bitsValue&&(this.bitJson[t]=i)},this[e]=this[e].bind(this))}}standardHandler(e,t,r,i){if(r){const e=Array.isArray(r)?r:[r],i=this.getParentNode(t);if(!i?.key||!e.includes(i?.key))return!0}return this.addProperty(this.bitJson,i.keyOverride??e.key,i.valueOverride??e.value,i),!1}addProperty(e,t,r,i){if(void 0!==r){let o;Array.isArray(r)||(r=[r]);const a=r;o=!i.array&&a.length>=1?a[a.length-1]:a,(i.allowNull||null!=o)&&(e[t]=o)}}toExample(e,t){const{isExample:r,example:i,__isDefaultExample:o}=e,{defaultExample:a,isBoolean:s}=t;if(!r)return{isExample:!1,example:null};let n;return n=o?s?Yt.toBoolean(a):this.convertBreakscapedStringToJsonText(a,t.textFormat,Qe):s?Yt.toBoolean(i):this.convertBreakscapedStringToJsonText(i,t.textFormat,Qe),{isExample:!0,example:n}}getBitType(e){for(const t of e)if(t.key===We.bitsValue){const e=t.value;return e?.bitType}}getTextFormat(e){const t=this.getBitType(e);if(t){const r=Be.getBitConfig(t);for(const t of e)if(t.key===We.bitsValue){const e=t.value;return(0,fr.Enum)(C).fromValue(e?.textFormat)??r.textFormatDefault}}return C.bitmarkText}getResourceType(e){for(const t of e)if(t.key===We.bitsValue){const e=t.value;return e?.resourceType}}getInternalComments(e){if(this.getBitType(e))for(const t of e)if(t.key===We.bitsValue){return t.value.internalComment}}convertBreakscapedStringToJsonText(e,t,r){if(!e)return"";if(!(t===C.bitmarkText))return e||"";if(this.options.textAsPlainText)return e||"";return this.textParser.toAst(e,{format:t,location:r})}concatenatePlainTextWithJsonTexts(e,t,r){if(Array.isArray(e)){if(r=r.trim()){const i=r.split("\n"),o=[];for(let e=0;e<t;e++)o.push({type:Ue.hardBreak});for(let e=0;e<i.length;e++){const t=i[e];t&&o.push({text:t,type:Ue.text}),e<i.length-1&&o.push({type:Ue.hardBreak})}const a=e[e.length-1];a&&a.type===Ue.paragraph?a.content=[...a.content??[],...o]:e.push({type:Ue.paragraph,content:o,attrs:{}})}return e}return`${e??""}${"\n".repeat(t)}${r??""}`}isBitmarkText(e){return null!=e&&(!!Array.isArray(e)&&"text"===e.__tag)}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}writeString(e){null!=e&&this.write(`${e}`)}createBitJson(e){const t=e.textFormat;return{type:e.isCommented?d._comment:e.bitType,originalType:e.isCommented?e.bitType:void 0,format:t,bitLevel:e.bitLevel}}cleanBitJson(e){const t=Be.getBitType(e.type);if(null==e.originalType&&(e.originalType=void 0),e.item||(e.item=void 0),Be.isOfBitType(t,[d._error,d._comment]))delete e.format,delete e.item,delete e.lead,delete e.pageNumber,delete e.marginNumber,delete e.hint,delete e.instruction;else{let r=!1,i=!1;Be.isOfBitType(t,[d.page])?(null!=e.item&&0!==e.item?.length||delete e.item,null!=e.lead&&0!==e.lead?.length||delete e.lead,null!=e.pageNumber&&0!==e.pageNumber?.length||delete e.pageNumber,null!=e.marginNumber&&0!==e.marginNumber?.length||delete e.marginNumber,null!=e.hint&&0!==e.hint?.length||delete e.hint,null!=e.instruction&&0!==e.instruction?.length||delete e.instruction):(null==e.item&&(e.item=this.textDefault),null==e.lead&&(e.lead=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.pageNumber&&(e.pageNumber=this.textDefault),null==e.marginNumber&&(e.marginNumber=this.textDefault)),null==e.body&&(e.body=this.bodyDefault),Be.isOfBitType(t,[d.article]),Be.isOfBitType(t,[d.example])&&(r=!0,i=!0),Be.isOfBitType(t,[d.multipleChoice1,d.multipleResponse1,d.multipleChoiceText,d.highlightText,d.gapText,d.gapTextInstructionGrouped,d.clozeAndMultipleChoiceText,d.sequence,d.mark,d.flashcard,d.definitionList])&&(r=!0,null==e.body&&(e.body=this.bodyDefault)),Be.isOfBitType(t,[d.sequence])&&(r=!0,i=!0,null==e.body&&(e.body=this.bodyDefault)),Be.isOfBitType(t,d.cloze)&&(r=!0,Be.isOfBitType(t,d.clozeSolutionGrouped)?(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!0)):Be.isOfBitType(t,d.clozeInstructionGrouped)&&(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!1))),Be.isOfBitType(t,[d.multipleChoice,d.multipleResponse])&&(r=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault)),Be.isOfBitType(t,d.essay)&&(r=!0,i=!0,null==e.body&&(e.body=this.bodyDefault),null==e.partialAnswer&&(e.partialAnswer="")),Be.isOfBitType(t,d.trueFalse1)&&(r=!0,i=!0,null==e.isCorrect&&(e.isCorrect=!1),null==e.body&&(e.body=this.bodyDefault)),Be.isOfBitType(t,d.trueFalse)&&(r=!0,null==e.labelFalse&&(e.labelFalse=""),null==e.labelTrue&&(e.labelTrue=""),null==e.body&&(e.body=this.bodyDefault)),Be.isOfBitType(t,d.chapter)&&(null==e.toc&&(e.toc=!0),null==e.progress&&(e.progress=!0),null==e.level&&(e.level=1),null==e.body&&(e.body=this.bodyDefault)),Be.isOfBitType(t,d.interview)&&(r=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault),null==e.questions&&(e.questions=[])),Be.isOfBitType(t,d.sequence)&&null==e.elements&&(e.elements=[]),t===d.matchMatrix&&(r=!0),Be.isOfBitType(t,d.match)&&(r=!0,null==e.heading&&(e.heading={})),Be.isOfBitType(t,d.learningPathBook)&&(null==e.isTracked&&(e.isTracked=!0),null==e.isInfoOnly&&(e.isInfoOnly=!1));const o=Be.isOfBitType(t,d.tableImage)&&!this.tableIsEmpty(e.table);(Be.isOfBitType(t,d.table)&&!Be.isOfBitType(t,d.tableImage)||o)&&(null==e.tableFixedHeader&&(e.tableFixedHeader=!1),null==e.tableHeaderWhitespaceNoWrap&&(e.tableHeaderWhitespaceNoWrap=!1),null==e.tableSearch&&(e.tableSearch=!1),null==e.tableSort&&(e.tableSort=!1),null==e.tablePagination&&(e.tablePagination=!1),null==e.tablePaginationLimit&&(e.tablePaginationLimit=0),null==e.tableHeight&&(e.tableHeight=0),null==e.tableWhitespaceNoWrap&&(e.tableWhitespaceNoWrap=!1),null==e.tableAutoWidth&&(e.tableAutoWidth=!0),null==e.tableResizableColumns&&(e.tableResizableColumns=!1),null==e.tableColumnMinWidth&&(e.tableColumnMinWidth=0)),Be.isOfBitType(t,d.tableImage)&&!o&&delete e.table,Be.isOfBitType(t,d.bookReference)&&(null==e.refAuthor&&(e.refAuthor=[]),null==e.refBookTitle&&(e.refBookTitle=""),null==e.refPublisher&&(e.refPublisher=[]),null==e.refPublicationYear&&(e.refPublicationYear="")),Be.isOfBitType(t,[d.pageBanner,d.pageBuyButton,d.pageBuyButtonAlt,d.pageBuyButtonPromotion,d.pageFooter,d.pageOpenBook,d.pagePerson,d.printBook,d.pageProduct,d.pageProductList,d.pageProductVideo,d.pageProductVideoList,d.pageSectionFolder,d.pageSubscribe,d.pageSubpage])&&(null==e.slug&&(e.slug=""),null==e.body&&(e.body=this.bodyDefault),Be.isOfBitType(t,d.pageBuyButton)&&null==e.content2Buy&&(e.content2Buy="")),Be.isOfBitType(t,d.tocResource)&&null==e.tocResource&&(e.tocResource=[]),Be.isOfBitType(t,d.tocContent)&&null==e.tocContent&&(e.tocContent=[]),Be.isOfBitType(t,d.printThisChapter)&&null==e.printParentChapterLevel&&(e.printParentChapterLevel=-1),Be.isOfBitType(t,d.book)&&(null==e.maxTocChapterLevel&&(e.maxTocChapterLevel=-1),null==e.allowPrint&&(e.allowPrint="useSpaceConfiguration"),null==e.hasPrintRestriction&&(e.hasPrintRestriction=!0),null==e.enforceUpdateOverUserInput&&(e.enforceUpdateOverUserInput=!1),null==e.hasMarkAsDone&&(e.hasMarkAsDone=!1),null==e.processHandIn&&(e.processHandIn=!1),null==e.isPublic&&(e.isPublic=!1),null==e.chatWithBook&&(e.chatWithBook=!1),null==e.chatWithBookBrainKey&&(e.chatWithBookBrainKey="")),t!==d.articleAi&&t!==d.noteAi&&t!==d.summaryAi||null==e.aiGenerated&&(e.aiGenerated=!0),Be.isOfBitType(t,[d.articleResponsive,d.pageArticleResponsive])&&null==e.imageFirst&&(e.imageFirst=!0),Be.isOfBitType(t,d.reviewNote)&&(null==e.resolved&&(e.resolved=!1),null==e.resolvedDate&&(e.resolvedDate=""),null==e.resolvedBy&&(e.resolvedBy="")),Be.isOfBitType(t,[d.imagesLogoGrave,d.prototypeImages,d.extractorImage])&&(t===d.imagesLogoGrave?null==e.logos&&(e.logos=[]):null==e.images&&(e.images=[])),Be.isOfBitType(t,[d.stepImageScreenshotWithPointer,d.surveyMatrix])&&(null==e.pointerTop&&(e.pointerTop=""),null==e.pointerLeft&&(e.pointerLeft=""),Be.isOfBitType(t,[d.surveyMatrix])&&null==e.buttonCaption&&(e.buttonCaption="")),Be.isOfBitType(t,[d.listItem])&&null==e.listItemIndent&&(e.listItemIndent=0),Be.isOfBitType(t,d.surveyRating)&&(null==e.ratingLevelStart&&(e.ratingLevelStart={level:0}),null==e.ratingLevelEnd&&(e.ratingLevelEnd={level:0})),Be.isOfBitType(t,d.vendorStripePricingTable)&&(null==e.stripePricingTableId&&(e.stripePricingTableId=""),null==e.stripePublishableKey&&(e.stripePublishableKey=""),Be.isOfBitType(t,d.vendorStripePricingTablePrintOnRequest)&&(null==e.printOnRequestCustomerId&&(e.printOnRequestCustomerId=""),null==e.printOnRequestProductId&&(e.printOnRequestProductId=""))),Be.isOfBitType(t,d.callToAction)&&(null==e.buttonCaption&&(e.buttonCaption=""),null==e.callToActionUrl&&(e.callToActionUrl="")),Be.isOfBitType(t,[d.handInFile,d.handInSystemMedia])&&null==e.handInAcceptFileType&&(e.handInAcceptFileType=[]),Be.isOfBitType(t,d.handInSubmit)&&(null==e.handInRequirement&&(e.handInRequirement=[]),null==e.handInInstruction&&(e.handInInstruction=""),null==e.buttonCaption&&(e.buttonCaption="")),Be.isOfBitType(t,d.module)&&null==e.hasBookNavigation&&(e.hasBookNavigation=!0),Be.isOfBitType(t,d.container)&&null==e.allowedBit&&(e.allowedBit=[]),Be.isOfBitType(t,d.platformPath)&&null==e.path&&(e.path=""),Be.isOfBitType(t,d.platformBrandTarget)&&null==e.platformBrandTarget&&(e.platformBrandTarget="none"),Be.isOfBitType(t,d.platformHeader)&&null==e.platformLogoMaxHeight&&(e.platformLogoMaxHeight=40),r?null==e.isExample&&(e.isExample=!1):(delete e.isExample,delete e.example),i?null==e.example&&(e.example=null):delete e.example}return e}tableIsEmpty(e){if(!e)return!0;if(0===Object.keys(e).length)return!0;const t=e;if(0===t.columns?.length&&t.data?.length)return!0;const r=e;return 0===r.header?.rows.length&&0===r.body?.rows.length&&0===r.footer?.rows.length}convertAllBitmarkTextsToStringsForPlainText(e){if(!this.options.textAsPlainText)return;const t=e;for(const e in t){const r=t[e];if(this.isBitmarkText(r)){const i=this.textGenerator.generateSync(r,C.bitmarkText,Qe,{noBreakscaping:!0});t[e]=(i??"").trim()}else"object"==typeof t[e]&&this.convertAllBitmarkTextsToStringsForPlainText(t[e])}}removeTemporaryProperties(e){const t=e;for(const e in t)e.startsWith("__")?delete t[e]:"object"==typeof t[e]&&this.removeTemporaryProperties(t[e])}write(e){return this.writer.write(e),this}writeLine(e){return this.writer.writeLine(e),this}writeLines(e,t){return this.writer.writeLines(e,t),this}writeWhiteSpace(){return this.writer.writeWhiteSpace(),this}},kr=class{constructor(e){l(this,"generator"),l(this,"writer"),this.writer=new sr,this.generator=new br(this.writer,e)}async generate(e){return await this.generator.generate(e),JSON.parse(this.writer.getString())}generateSync(e){return this.generator.generateSync(e),JSON.parse(this.writer.getString())}},xr=r(722),vr=class{getSupportedBits(e){const t=e?.includeNonDeprecated??!0,r=e?.includeDeprecated??!1,i=[];for(const e of(0,xr.Enum)(d).values()){if(e===d._error||e===d._comment)continue;const o=Be.getBitType(e),a=Be.getBitConfig(o),s=a.inheritedBitTypes.length>0?a.inheritedBitTypes:void 0;(t&&!a.deprecated||r&&a.deprecated)&&i.push({name:e,since:a.since,deprecated:a.deprecated,inheritedBitTypes:s})}return i}getSupportedBitConfigs(){const e=[];for(const t of(0,xr.Enum)(d).values()){if(t===d._error||t===d._comment)continue;const r=Be.getBitType(t),i=Be.getBitConfig(r);e.push(i)}return e}},Tr=(r(722),{peggy:"peggy"}),_r=(r(722),{text:"text",json:"json",pojo:"pojo"}),Cr=(r(722),{list:"list",deprecated:"deprecated",all:"all",bit:"bit"}),wr=r(722),Ar=new ar,Br=class{toAst(e){const t=this.preprocessJson(e),r=[];for(const e of t){const{bit:t,parser:i}=e,o=this.bitToAst(t,i?.internalComments);o&&r.push(o)}const i=r.length>0?{bits:r}:{};return Ar.buildBitmark(i)}preprocessJson(e){const t=[];if(me.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return[]}}const r=e=>{if(this.isBitWrapper(e)){const r=e;t.push(r)}else if(this.isBit(e)){const r=e;t.push(this.bitToBitWrapper(r))}};if(Array.isArray(e))for(const t of e)r(t);else r(e);return t}isBitWrapper(e){if(Object.prototype.hasOwnProperty.call(e,"bit")){const t=e;return this.isBit(t.bit)}return!1}isBit(e){if(Object.prototype.hasOwnProperty.call(e,"type")){const t=e;return Be.getBitType(t.type)!==d._error}return!1}bitToBitWrapper(e){return{bit:e}}bitToAst(e,t){const{statement:r,reference:i,...o}=e,a=e.type===d._comment&&void 0!==e.originalType,s=Be.getBitType(a?e.originalType:e.type),n=Be.getBitConfig(s),l=(0,wr.Enum)(kt).fromValue(e.format);let c=(0,wr.Enum)(C).fromValue(e.format)??n.textFormatDefault;l===kt.bitmarkMinusMinus&&(c=C.bitmarkText);return Ar.buildBit({...o,bitType:s,bitLevel:Math.max(Math.min(e.bitLevel??1,Be.bitLevelMax),Be.bitLevelMin),textFormat:e.format,resourceType:this.getResourceType(e.resource),isCommented:a,internalComment:t,...this.processTitle(s,e.title),...this.processReference(i),...this.parseExample(e.example),person:e.partner??e.person,markConfig:e.marks,resources:this.processResources(s,e.resource,e.images,e.logos),body:this.processBody(e.body,e.placeholders),flashcards:e.cards,statements:this.processStatements(r,e.isCorrect,e.statements,e.example),responses:this.processResponses(s,e.responses),botResponses:this.processBotResponse(s,e.responses),cardBits:this.processListItems(e.listItems??e.sections??e.bookReferences,e.placeholders),footer:this.processFooter(e.footer)})}processStatements(e,t,r,i){const o=[];if(e){const r={statement:e??"",isCorrect:t??!1,...this.parseExample(i)};r&&o.push(r)}if(Array.isArray(r))for(const e of r)o.push(e);if(0!==o.length)return o}processResponses(e,t){if(!Be.isOfBitType(e,d.botActionResponse)&&Array.isArray(t))return t}processBotResponse(e,t){if(Be.isOfBitType(e,d.botActionResponse)&&Array.isArray(t))return t}processListItems(e,t){const r=[];if(Array.isArray(e))for(const i of e){const e={...i};e.body&&(e.body={body:e.body,placeholders:t}),e&&r.push(e)}if(0!==r.length)return r}getResourceType(e){if(e){return(0,wr.Enum)(he).fromValue(e.type)}}processResources(e,t,r,i){const o=[];if(t&&o.push(t),Be.isOfBitType(e,[d.prototypeImages,d.extractorImage])&&Array.isArray(r))for(const e of r)e&&o.push(e);if(Be.isOfBitType(e,[d.imagesLogoGrave])&&Array.isArray(i))for(const e of i)e&&o.push(e);return o}processBody(e,t){return{body:e,placeholders:t}}processFooter(e){if(e)return{footer:e}}processTitle(e,t){return Be.isOfBitType(e,d.author)?{titleString:t,title:void 0}:{titleString:void 0,title:t}}processReference(e){return Array.isArray(e)&&e.length>0?{reference:void 0,referenceProperty:e}:{reference:e,referenceProperty:void 0}}parseExample(e){if(null==e)return;if(!0===e)return{example:!0};if(!1===e)return{example:!1};const t=me.isString(e)||Array.isArray(e)?e:void 0;return t?{example:t}:{example:!!e}}},Sr=(r(722),class{constructor(e,t){l(this,"source"),l(this,"start"),this.source=e,this.start=t}toString(){return String(this.source)}offset(e){return{line:e.line+this.start.line-1,column:1===e.line?e.column+this.start.column-1:e.column,offset:e.offset+this.start.offset}}static offsetStart(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.start):e.start}static offsetEnd(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.end):e.end}}),Ir={TextFormat:"TextFormat",ResourceType:"ResourceType",Title:f.tag_title,Anchor:f.tag_anchor,Reference:f.tag_reference,ItemLead:f.tag_item,Instruction:f.tag_instruction,Hint:f.tag_hint,True:f.tag_true,False:f.tag_false,Gap:f.tag_gap,Mark:f.tag_mark,SampleSolution:f.tag_sampleSolution,Property:"Property",Resource:"Resource",TagChain:"TagChain",BodyChar:"BodyChar",BodyText:"BodyText",BodyTextPlain:"BodyTextPlain",CardSet:"CardSet",Card:"Card",CardChar:"CardChar",CardText:"CardText",GapChain:"GapChain",TrueFalseChain:"TrueFalseChain",PlainTextDivider:"PlainTextDivider",FooterDivider:"FooterDivider"},Pr="Bit",Er="Card",Lr="Chain",Vr=r(722),Nr=class{constructor(e){l(this,"cardIndex",0),l(this,"cardSideIndex",0),l(this,"cardVariantIndex",0),l(this,"currentCardQualifier"),l(this,"currentSideQualifier"),l(this,"currentVariantQualifier"),l(this,"parse"),l(this,"parserText"),l(this,"parserLocation"),this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation}handleRawBit(e){const t=e.trim();if(this.debugPrint("RAW BIT",t),!t)return;const r=this.parserLocation()?.start??{line:1,column:1,offset:0},i=this.parse(e,{startRule:"bit",grammarSource:new Sr("bit",r)});return i.value&&(i.value.markup=t),i}handleTextFormat(e){return{type:Ir.TextFormat,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceType(e){return{type:Ir.ResourceType,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleBitContent(e){let t=this.reduceToArrayOfTypes(e);return t=this.mergeCharToText(t),t}handleBitTag(e){return e}handleTag(e,t){return{type:e,key:(0,Vr.Enum)(f).fromValue(e),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handlePropertyTag(e,t){return{type:Ir.Property,key:`@${bt.unbreakscape(e,{format:C.plainText,location:Qe})}`,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceTag(e,t){const r=bt.unbreakscape(e,{format:C.plainText,location:Qe}),i=me.kebabToCamel(r);return{type:Ir.Resource,key:`&${i}`,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleTagChain(e){const t=this.reduceToArrayOfTypes(e);let r=t;if(t.length>1){const e=t[0];e.chain=t.slice(1),r=[e]}return r}handlePlainTextDivider(e){return e=this.reduceToString(e),{type:Ir.PlainTextDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleFooterDivider(e){return e=this.reduceToString(e),{type:Ir.FooterDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSet(e){const t=e,r={cards:[]},i={cards:[]};if(t){const e={text:this.parserText(),location:this.parserLocation()};for(const e of t){if(!e)continue;const{type:t,value:i,parser:o}=e;if(!t||t!==Ir.Card)continue;const{cardIndex:a,cardSideIndex:s,cardVariantIndex:n,value:l,cardQualifier:c,cardSideQualifier:p,cardVariantQualifier:d}=i;let u=r.cards[a];u?c&&!u.qualifier&&(u.qualifier=c):(u={sides:[],qualifier:c},r.cards[a]=u);let m=u.sides[s];m?p&&!m.qualifier&&(m.qualifier=p):(m={variants:[],qualifier:p},u.sides[s]=m);const h=m.variants[n];h?(m.variants[n].value+=l,d&&!h.qualifier&&(h.qualifier=d)):m.variants[n]={value:l,parser:o,qualifier:d}}r.cards=r.cards.filter(e=>e.sides.some(e=>e.variants.some(e=>0!==me.trimmedString(e.value).length)));for(const t of r.cards){const r={sides:[],qualifier:t.qualifier};i.cards.push(r);for(const i of t.sides){const t={variants:[],qualifier:i.qualifier};r.sides.push(t);for(const r of i.variants){let i={line:1,column:1,offset:0};if(r.parser.location){i=r.parser.location.start;const e=r.parser.text,t=e?e.length:0,o=1;i.offset+=t,i.line+=o}let o=this.parse(r.value,{startRule:"cardContent",grammarSource:new Sr("card-content",i)});o=this.reduceToArrayOfTypes(o),this.debugPrint("parsedCardContent",o),t.variants.push({parser:e,content:o,qualifier:r.qualifier})}}}}return{type:Ir.CardSet,value:i,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSetStart(){this.cardIndex=-1,this.cardSideIndex=0,this.cardVariantIndex=0,this.currentCardQualifier=void 0,this.currentSideQualifier=void 0,this.currentVariantQualifier=void 0}handleCardSetEnd(){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0,this.currentCardQualifier=void 0,this.currentSideQualifier=void 0,this.currentVariantQualifier=void 0}handleCards(e){return e}handleCardLineOrDivider(e,t){let r,i=!1,o=!1,a=!1;if(Array.isArray(e)&&2===e.length){const[t,i]=e;"string"==typeof t?(e=t,"string"==typeof i&&i.trim()===i&&i.length>0&&(r=i)):e=t}else if(Array.isArray(e)&&1===e.length){const[t]=e;e=t}return t===cr.v1?(i="==="===e,o="=="===e,a="--"===e):(i="===="===e,o="--"===e,a="++"===e),i?(this.cardIndex++,this.cardSideIndex=0,this.cardVariantIndex=0,this.currentCardQualifier=r,this.currentSideQualifier=void 0,this.currentVariantQualifier=void 0):o?(this.cardSideIndex++,this.cardVariantIndex=0,this.currentSideQualifier=r,this.currentVariantQualifier=void 0):a&&(this.cardVariantIndex++,this.currentVariantQualifier=r),this.isType(e,Ir.Card)?e:{type:Ir.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:"",cardQualifier:this.currentCardQualifier,cardSideQualifier:this.currentSideQualifier,cardVariantQualifier:this.currentVariantQualifier},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardLine(e){return{type:Ir.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:e,cardQualifier:this.currentCardQualifier,cardSideQualifier:this.currentSideQualifier,cardVariantQualifier:this.currentVariantQualifier},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardContent(e){return this.mergeCharToText(e)}handleCardTags(e){return e}mergeCharToText(e){const t=[];let r,i;for(const o of e)switch(o.type){case Ir.BodyChar:if(r){const e=`${r.value??""}${o.value??""}`;r.value=e}else r={type:Ir.BodyText,value:o.value??"",parser:{text:this.parserText(),location:this.parserLocation()}};break;case Ir.CardChar:if(i){const e=`${i.value??""}${o.value??""}`;i.value=e}else i={type:Ir.CardText,value:o.value??"",parser:{text:this.parserText(),location:this.parserLocation()}};break;default:r&&(t.push(r),r=void 0),i&&(t.push(i),i=void 0),t.push(o)}return r&&t.push(r),i&&t.push(i),t}isType(e,t){if(!e)return!1;const{type:r}=e;return t?Array.isArray(t)?t.indexOf(r)>=0:t===r:!!(0,Vr.Enum)(Ir).fromValue(r)}reduceToArrayOfTypes(e,t,r){if(!Array.isArray(e))return[];return e.reduce((e,i,o)=>{if(null==i)return e;const{type:a,value:s}=i;if(Array.isArray(i)){const r=this.reduceToArrayOfTypes(i,t);e.push(...r)}else{if(!this.isType(i,t))return e;if(r&&Array.isArray(s)){const r=this.reduceToArrayOfTypes(s,t);e.push(...r)}else a&&e.push(i)}return e},[])}reduceToString(e){if(!Array.isArray(e))return"";return e.reduce((e,t,r)=>{if(null==t)return e;if(Array.isArray(t)){e+=this.reduceToString(t)}else e+=t;return e},[])}debugPrint(e,t){}},Rr=r(722),Fr=r(722),Kr=["----","\n==\n","\n---\n"],$r=["==\n","--\n"],Or=["\n==","\n--"],Jr=new class{validateBitTags(e,t){if(!t)return[];const{bitConfig:r,bitType:i,resourceType:o}=e,{tags:a,cardSet:s}=r,n={...a,...Be.getBitResourcesConfig(i,o).tags};return this.validateTagChainsRecursive(e,Pr,i,t,n,s).validated}checkBody(e,t,r,i,o){if(!o)return o;const{bitConfig:a}=e,{bodyAllowed:s}=a;return o.length>0&&!s&&e.addWarning(`Bit '${r}' should not have a body.`),o}checkBodyPart(e,t,r){return r?(this.checkBodyForCommonPotentialMistakes(e,t,r),r):r}checkFooter(e,t,r){if(!r)return r;const{bitConfig:i,bitType:o}=e,{footerAllowed:a}=i;return this.checkBodyForCommonPotentialMistakes(e,t,r),a||e.addWarning(`Bit '${o}' should not have a footer.`),r}checkCardBody(e,t,r,i,o,a,s){if(!i||!i.body)return i;const{bitConfig:n}=e;if(!n.cardSet)return i;const l=Be.getCardSetVariantConfig(r,a,s);if(!l)return i;const{bodyAllowed:c}=l;return i.bodyString.length>0&&!c&&e.addWarning(`Bit '${r}' should not have a card body at card:${o+1}, side:${a+1}, variant:${s+1}.`),i}validateTagChainsRecursive(e,t,r,i,o,a,s){if(!i)return{validated:[]};let n;const l=[...i],c=this.convertTagsToTypeKeyMap(e,t,r,o),p=(e,t,r)=>{c.set(e,{maxCount:t,minCount:r,_type:e,_tag:e,_seenCount:0})};t===Pr?(a&&p(Ir.CardSet,1,0),p(Ir.TextFormat,1,0),p(Ir.BodyText,u,0),p(Ir.BodyTextPlain,u,0),p(Ir.PlainTextDivider,u,0),p(Ir.FooterDivider,u,0)):t===Er&&p(Ir.CardText,u,0);for(let i=0;i<l.length;i++){const o=l[i];if(!o)continue;const{type:p,key:d}=o;let u=(0,Fr.Enum)(Ir).fromValue(p);if(!u)continue;let m=u;u!==Ir.Property&&u!==Ir.Resource||(m=d);let h=c.get(m);if(!h&&u===Ir.Property){const t=d.replace(/^@/,"&");if((t===fe.resource_backgroundWallpaper||t===fe.resource_imagePlaceholder||t===fe.resource_platformIcon||t===fe.resource_platformLogo||t===fe.resource_platformBackgroundImage||t===fe.resource_coverImage)&&(h=c.get(t),h)){u=Ir.Resource,o.type=Ir.Resource;const r=`Falling back to '[${t}]' from '[${d}]'. Replace '[${d}]' with '[&${d}]' to avoid this warning.`;e.addWarning(r)}}const{validated:g,warning:f}=this.validateSingleTag(e,t,r,o,u,h,a);u===Ir.Resource&&(s=Ir.Resource);let y=!0;if(!g)if(t===Lr&&s!==Ir.Resource){n=o;const e=l.slice(i+1);e.length>0&&(n.chain=e),l.splice(i),y=!1}else l.splice(i,1,null);if(f&&y&&e.addWarning(f.warning??"",f.content,f.previousContent),t===Lr&&h&&h.chain&&g&&!g.chain){const e=l.slice(i+1);e.length>0&&(g.chain=e),l.splice(i+1)}if(g&&Array.isArray(g.chain)&&g.chain.length>0)if(h&&h.chain){const{validated:t,remaining:o}=this.validateTagChainsRecursive(e,Lr,r,g.chain,h.chain,void 0,g.type);t&&t.length>0?g.chain=t:g.chain=void 0,o&&l.splice(i+1,0,o)}else if(g.type!==Ir.Resource){const e=g.chain[0];g.chain.length>1&&(e.chain=g.chain.slice(1)),l.splice(i+1,0,e),g.chain=void 0}}for(const t of c.values()){const{minCount:r,_seenCount:i}=t;if(null!=r&&i<r){const i=`${this.getTagSignature(t)} is required at least ${r} time(s)`;e.addWarning(i)}}return{validated:l.filter(e=>null!=e),remaining:n}}validateSingleTag(e,t,r,i,o,a,s){const{type:n,key:l}=i,c=a?this.getTagSignature(a):this.getUnknownTagSignature(n,l),p=" It will be ignored";let d,u,m="";if(a)switch(a._seenCount++,o){case Ir.Property:{const{content:o,warning:s}=this.validatePropertyTag(e,t,r,a,i);d=o,u=s;break}case Ir.Resource:{const{content:o,warning:s}=this.validateResourceTag(e,t,r,a,i);d=o,u=s;break}case Ir.CardSet:{const{content:t,warning:o}=this.validateCardSet(e,r,a,i,s);d=t,u=o;break}default:{const{content:o,warning:s}=this.validateStandardTag(e,t,r,a,i);d=o,u=s}}else switch(o){case Ir.Property:u={extraProperty:!0},t!==Lr&&(d=i);break;case Ir.Resource:u={excessResource:!0},d=i;break;default:u={invalid:!0}}if(u){const e=a?._previous;u.invalid||u.excessResource?m=`${c} is not valid here (incorrectly chained?).${p}`:null!=u.tooMany?(m=`${c} is included more than the required ${u.tooMany} time(s).`,0===u.tooMany&&o===Ir.Resource&&(m+=` Did you forget the '${l}' in the bit header?`),u.tooMany>0&&(m+=" The earlier ones will be ignored")):u.extraProperty?m=`${c} is an unknown property. It can be excluded from the output using the 'excludeUnknownProperties' flag`:u.unexpectedCardSet?m=`${c} is not expected here.${p}`:u.unexpectedCardSideVariant&&(m=`${c} has a card / side / variant that is not expected here.${p}`),u.warning=m,u.content=d,u.previousContent=e}return a&&(a._previous=i),{validated:d,warning:u}}validateStandardTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==u&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validatePropertyTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==u&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateResourceTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==u&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateCardSet(e,t,r,i,o){if(!o||!o.variants||0===o.variants.length)return{warning:{unexpectedCardSet:!0}};const{value:a}=i,s=a;let n,l=0,c=0;for(const r of s.cards){l=0;for(const i of r.sides){c=0;for(const r of i.variants){const o=r.content;let a;const s=Be.getCardSetVariantConfig(t,l,c);if(s){a=this.validateTagChainsRecursive(e,Er,t,o,s.tags).validated}else n={unexpectedCardSideVariant:!0};a&&a.length>0?i.variants[c]={parser:r.parser,content:a}:i.variants[c]={parser:r.parser,content:[]},c++}l++}}return{content:i,warning:n}}checkBodyForCommonPotentialMistakes(e,t,r){if(!r)return;const{bitType:i}=e;for(const t of Kr)r.includes(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`);for(const t of $r)r.startsWith(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`);for(const t of Or)r.endsWith(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`)}convertTagsToTypeKeyMap(e,t,r,i){const o=new Map;for(const e of Object.values(i)){const t={minCount:e.minCount,maxCount:e.maxCount,isTag:e.type===Z,isProperty:e.type===X,isResource:e.type===ee,chain:e.chain,_configKey:e.configKey,_type:e.type,_tag:e.tag,_seenCount:0,_previous:void 0};if(t.isProperty)o.set(e.configKey,t);else if(t.isResource)o.set(e.configKey,t);else{const r=(0,Fr.Enum)(Ir).fromValue(e.tag);r&&o.set(r,t)}}return o}getTagSignature(e){switch(e._type){case Z:case X:case ee:return`[${e._configKey}]`;default:return`'${e._type}' tag '${e._tag}'`}}getUnknownTagSignature(e,t){switch(e){case Ir.Property:case Ir.Resource:return`[${t}]`;default:return t?`'${e}' tag '${t}'`:`'${e}' tag`}}},Dr=new class{concatenatePlainTextWithAstTexts(e,t,r){if(Array.isArray(e)){if(r=r&&r.trim()){const i=r.split("\n"),o=[];for(let e=0;e<t;e++)o.push({type:Ue.hardBreak});for(let e=0;e<i.length;e++){const t=i[e];t&&o.push({text:t,type:Ue.text}),e<i.length-1&&o.push({type:Ue.hardBreak})}const a=e[e.length-1];a&&a.type===Ue.paragraph?a.content=[...a.content??[],...o]:e.push({type:Ue.paragraph,content:o,attrs:{}})}return e}return`${e??""}${"\n".repeat(t)}${r??""}`}},jr=new Gt,qr=new class{process(e,t,r,i,o,a,s,n){const l=[];let c,p;const d=s.length>0?this.trimBodyParts(s):void 0,u=n?d:Jr.checkBody(e,t,r,i,d);if(i===C.json&&u){c=u.reduce((e,t)=>{if(t.type===ze.text&&t.data){return e+(t.data.bodyText??"")}return e},"");try{c=JSON.parse(c)}catch(t){c=null,e.addError("Body JSON is invalid.")}}else{let e="",t="",r="",o=0;const a=e=>`[!${e}]`;if(u)for(let i=0;i<u.length;i++){const s=u[i];if(s.type===ze.text){const i=s,o=i.data.bodyText;i.data.isPlain?t=bt.concatenate(t,o):e=bt.concatenate(e,o),r=bt.concatenate(r,o)}else{const t=a(o);e=bt.concatenate(e,t),l.push(s),o++}}const s=i===C.bitmarkText?jr.toAst(e,{format:i,location:Ze}):bt.unbreakscape(e,{format:C.plainText,location:Ze}),n=bt.unbreakscape(t,{format:C.plainText,location:Ze}),d=me.countOccurrencesAtEnd(e,"\n")+me.countOccurrencesAtStart(t,"\n");c=Dr.concatenatePlainTextWithAstTexts(s,d,n),p=bt.unbreakscape(r,{format:i,location:Ze}).trim();const m=Array.isArray(c)?c:void 0;if(m&&u){o=0;for(let e=0;e<u.length;e++){const t=u[e];if(t.type===ze.text)continue;const r=t;let i;switch(t.type){case ze.gap:case ze.mark:case ze.select:case ze.highlight:i=r}i&&this.replacePlaceholderWithBodyBit(m,i,o),o++}}}return{body:c,bodyBits:l.length>0?l:void 0,bodyString:p}}buildBodyText(e,t){return{type:ze.text,data:{bodyText:e,isPlain:t}}}replacePlaceholderWithBodyBit(e,t,r){const i=(e,o,a)=>{if(Array.isArray(e))for(let t=0;t<e.length;t++){const r=e[t];if(i(r,e,t))return!0}else{if("bit"===e.type&&e.index===r)return o[a]=t,!0;if(e.content){if(i(e.content,e,"content"))return!0}}return!1};i(e,null,null)}trimBodyParts(e){let t=!1,r=e.reduce((e,r)=>{const i=r;if(t||i.type!==ze.text)t=!0,e.push(r);else{const r=i.data.bodyText.trimStart();r&&(t=!0,i.data.bodyText=r,e.push(i))}return e},[]);return t=!1,r=r.reduceRight((e,r)=>{const i=r;if(t||i.type!==ze.text)t=!0,e.unshift(r);else{const r=i.data.bodyText.trimEnd();r&&(t=!0,i.data.bodyText=r,e.unshift(i))}return e},[]),r}};function Mr(e,t,r,i,o,a,s,n){const{bitConfig:l}=e;e.DEBUG_CARD_SET&&e.debugPrint("card set",i);let c={};const p=function(e,t){const r={cards:[],internalComments:[]};if(!t)return r;const{bitType:i}=e;let o=0,a=0,s=0;for(const n of t.cards){const t={no:o++,sides:[],qualifier:n.qualifier};r.cards.push(t);for(const o of n.sides){const n={no:a++,variants:[],qualifier:o.qualifier};t.sides.push(n);for(const l of o.variants){const{parser:o,content:c}=l,p={parser:o,no:s++,qualifier:l.qualifier};n.variants.push(p);const d=Be.getTagsConfigForCardSet(i,a,s),u=e.bitContentProcessor(Er,d,c);e.DEBUG_CARD_TAGS&&e.debugPrint("card tags",u),u.cardBody=Jr.checkCardBody(e,Er,i,u.cardBody,t.no,n.no,p.no),u.cardBodyStr=u.cardBody?.bodyString,p.data=u,u.internalComments&&r.internalComments.push(...u.internalComments)}s=0}a=0}return r}(e,i),u=l.cardSet?.configKey;switch(u){case w:case A:case B:case S:c=function(e,t,r){const i=[],o=[];let a,s,n,l="",c=[],p=0,u={};const m=t===d.flashcard1,h=zr(r);for(let g=0;g<r.cards.length;g++){const f=r.cards[g];if(!h||0!==g){a=void 0,s=void 0,c=[],p=0,u={};for(const e of f.sides)for(const t of e.variants){const{cardBody:e,resources:r,...i}=t.data;u={...u,...i};const o=r&&r.length>0?r[0]:void 0,d=e?.body;0===p?(n=t,l=e?.bodyString??"",a={text:d,icon:o}):1===p?s={text:d,icon:o}:c.push({text:d,icon:o}),p++}if(0!==g&&m){e.addWarning(`Bit '${t}' should only contain one card. Ignore subsequent card: '${l}'`,n);break}if(Be.isOfBitType(t,[d.flashcard])){const e={question:a,answer:s,alternativeAnswers:c,...u};e&&i.push(e)}else{const e={term:a,definition:s,alternativeDefinitions:c,...u};e&&o.push(e)}}}return{heading:h?.heading,flashcards:i.length>0?i:void 0,definitions:o.length>0?o:void 0}}(e,t,p);break;case I:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,r=t.cardBody?.body??t.cardBodyStr??bt.EMPTY_STRING;i.push(r)}return{elements:i.length>0?i:void 0}}(0,0,p);break;case P:c=function(e,t,r,i,o){const a=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const{statements:t,statement:r,...i}=e.data;if(Array.isArray(t))for(const e of t){const t={statement:e.statement??[],isCorrect:e.isCorrect,item:e.item,lead:e.lead,hint:e.hint,instruction:e.instruction,example:e.example,...i};t&&a.push(t)}}i&&a.push(i);Array.isArray(o)&&o.length>0&&a.push(...o);return{statements:a.length>0?a:void 0}}(0,0,p,o,a);break;case V:c=function(e,t,r){let i;const o=[],a=zr(r);for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(!a||0!==e){i=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];for(const t of r.variants){const r=t.data,{cardBody:a,cardBodyStr:s,choices:n,...l}=r;if(0===e){const e=[];if(n&&n.length>0)for(const t of n){const{__isDefaultExample:r,example:i,...o}=t,a={choice:o.choice,requireReason:o.isCorrect,item:o.item,lead:o.lead,instruction:o.instruction,__isDefaultExample:r,example:i};e.push(a)}i={...r,choices:e},i&&o.push(i)}else if(1===e){const e={text:s??"",__textAst:a?.body,...l};i&&(i.reason=e)}}}}}return{heading:a?.heading,feedbacks:o.length>0?o:void 0}}(0,0,p);break;case E:case L:c=function(e,t,r,i,o){const a=[],s=Be.isOfBitType(t,d.multipleChoice),n=Be.isOfBitType(t,d.multipleResponse);if(!s&&!n)return{};let l,c=!1;for(const e of r.cards){c=!1,l=void 0;for(const t of e.sides)for(const e of t.variants){const{__isDefaultExample:t,example:r,...i}=e.data;if(c=!0===t||c,l=r||l,i.trueFalse&&i.trueFalse.length>0){const e=[];for(const t of i.trueFalse){const{__isDefaultExample:r,example:i,...o}=t,a=r||c,s=i||l,p={isCorrect:o.isCorrect,__isDefaultExample:a,example:s};n?p.response=o.text:p.choice=o.text,p&&e.push(p)}n?i.responses=e:i.choices=e}const o={...i,choices:i.choices,responses:i.responses,__isDefaultExample:c,__defaultExample:l};o&&a.push(o)}}if(s&&Array.isArray(i)&&i.length>0){const e={choices:i};e&&a.push(e)}if(n&&Array.isArray(o)&&o.length>0){const e={responses:o};e&&a.push(e)}return{quizzes:a.length>0?a:void 0}}(0,t,p,s,n);break;case N:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,r={question:t.cardBody?.body??t.cardBodyStr??bt.EMPTY_STRING,...t};r&&i.push(r)}return{questions:i.length>0?i:void 0}}(0,0,p);break;case R:c=function(e,t,r){const i=[];let o,a,s,n,l=[],c=[],p={},u=!1;const m=Be.isOfBitType(t,d.matchMatrix),h=zr(r,m),g=h?.isDefaultExampleCardSet??!1;let f=h?.exampleCardSet;for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(h&&0===e)continue;o=void 0,l=[],c=[],a=void 0,s=void 0,p={},u=!1,n=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];for(const t of r.variants){const{cardBody:r,cardBodyStr:i,resources:d,__isDefaultExample:m,example:h,...f}=t.data;if(u=!0===m||u,n=h||n,0===e)if(Array.isArray(d)&&d.length>0){const e=d[0];e.type===he.audio?a=e:e.type===he.image&&(s=e)}else o=i;else{const e=i??"",t=r?.body;l.push(e),c.push(t),!g&&!u||n||(n=t),delete f.item,delete f.lead}p={...p,...f}}}u&&(f=void 0);const d=u||g,m=n||f,y={key:o??"",keyAudio:a,keyImage:s,values:l,__valuesAst:c,...p,__isDefaultExample:d,example:m};y&&i.push(y)}return{heading:h?.heading,pairs:i.length>0?i:void 0}}(0,t,p);break;case $:c=function(e,t,r){let i,o;const a=[];let s,n,l,c,p=[],d=[],u=[],m={},h=!1,g=!1;const f=zr(r,!0),y=f?.isDefaultExampleCardSet??!1;let b=f?.exampleCardSet;for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(f&&0===e)continue;i=void 0,o=void 0,p=[],d=[],u=[],h=!1,s=void 0,l=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];d=[],u=[],m={},g=!1,n=void 0,c=void 0;for(const t of r.variants){const r=t.data,{cardBody:a,cardBodyStr:p,__isDefaultExample:f,example:b,isCaseSensitive:k,...x}=r;if(g=!0===f||g,n=b||n,Object.assign(m,x),0===e)i=p,o=x,h=!0===f||h,s=b||s,l=null!=k?k:l;else{const e=p??bt.EMPTY_STRING,t=a?.body;d.push(e),u.push(t),!y&&!g||n||(n=t),c=null!=k?k:l}}if(e>0){g&&(s=b=void 0),h&&(b=void 0);const e=g||h||y,t=n||s||b,r={values:d,__valuesAst:u,...m,__isDefaultExample:e,example:t,isCaseSensitive:c};r&&p.push(r)}}const k={key:i??bt.EMPTY_STRING,cells:p,...o};k&&a.push(k)}return{heading:f?.heading,matrix:a.length>0?a:void 0}}(0,0,p);break;case D:c=function(e,t,r){const i=[];let o=[];for(const e of r.cards){o=[];for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,cardBody:i,resources:a}=t,s=r&&r[1].titleAst,n=a&&a.length>0?a.find(e=>e.type===he.audio):void 0,l={title:s??[],body:i?.body??[],audio:n};o.push(l)}i.push(o)}return{pronunciationTable:{data:i}}}(0,0,p);break;case O:case J:c=function(e,t,r){const i={header:[],body:[],footer:[]},o=t=>{if(!t)return;const r=t.trim().toLowerCase();return"table-header"===r?"header":"table-body"===r?"body":"table-footer"===r?"footer":void e.addWarning(`Unknown table section qualifier '${t}', defaulting to body.`)},a=(e,t)=>0===t&&e.sides.some(e=>e.variants.some(e=>{const t=e.data.title;return Array.isArray(t)&&t[1]?.titleAst})),s=(e,t)=>{if(!e)return;const r=e[t];return Array.isArray(r)?r[0]:r},n=(e,t)=>{const r=e.extraProperties;if(r){for(const e of t)Object.prototype.hasOwnProperty.call(r,e)&&delete r[e];0===Object.keys(r).length&&delete e.extraProperties}},l=(t,r)=>{if("string"==typeof t){const i=t.trim().toLowerCase();if("th"===i||"td"===i)return i;e.addWarning(`Invalid table cell type '${t}', using default for section '${r}'.`)}return"body"===r?"td":"th"},c=(t,r)=>{if(null==t)return 1;const i=Qt.asNumber(t);return null==i||!Number.isInteger(i)||i<1?(e.addWarning(`Invalid table ${r} '${t}', defaulting to 1.`),1):i},p=t=>{if(null==t)return;if("string"!=typeof t)return void e.addWarning(`Invalid table scope '${t}', ignoring.`);const r=t.trim().toLowerCase();switch(r){case"row":case"col":case"rowgroup":case"colgroup":return r;default:return void e.addWarning(`Invalid table scope '${t}', ignoring.`)}},d=(e,t)=>{const r=e.data,i=r.title&&r.title[1]?.titleAst,o=r.cardBody?.body??r.cardBodyStr??bt.EMPTY_STRING,a=i??o,d=r.tableCellType??s(r.extraProperties,"tableCellType"),u=r.tableRowSpan??s(r.extraProperties,"tableRowSpan"),m=r.tableColSpan??s(r.extraProperties,"tableColSpan"),h=r.tableScope??s(r.extraProperties,"tableScope"),g=r.tableColWidth??s(r.extraProperties,"tableColWidth");n(r,["tableCellType","tableRowSpan","tableColSpan","tableScope","tableColWidth"]);const f=l(d,t),y=c(u,"rowspan"),b=c(m,"colspan"),k=p(h),x=Qt.asNumber(g)??0,v={content:a};return"th"===f&&(v.title=!0),y>1&&(v.rowspan=y),b>1&&(v.colspan=b),k&&(v.scope=k),x>0&&(v.colwidth=x),v},u=e=>{const t=o(e.qualifier);if(t)return t;for(const t of e.sides){const e=o(t.qualifier);if(e)return e;for(const e of t.variants){const t=o(e.qualifier);if(t)return t}}};for(let e=0;e<r.cards.length;e++){const t=r.cards[e],o=u(t),s=o||(a(t,e)?"header":"body"),n=[];for(const e of t.sides)for(const t of e.variants)n.push(d(t,s));i[s].push({cells:n})}const m={},h=i.header.length>0,g=i.body.length>0,f=i.footer.length>0;h&&(m.header={rows:i.header});g&&(m.body={rows:i.body});f&&(m.footer={rows:i.footer});h||g||f||(m.header={rows:[]},m.body={rows:[]},m.footer={rows:[]});return{table:m}}(e,0,p);break;case j:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const{__instructionString:t,__itemString:r,reaction:o,cardBodyStr:a,...s}=e.data,n={response:t??bt.EMPTY_STRING,reaction:o??bt.EMPTY_STRING,feedback:a??bt.EMPTY_STRING,...s,item:r??bt.EMPTY_STRING};n&&i.push(n)}return{botResponses:i.length>0?i:void 0}}(0,0,p);break;case H:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const{title:t,__instructionString:r,unit:o,unitPlural:a,unitAbbr:s,unitAbbrPlural:n,decimalPlaces:l,disableCalculation:c,cardBodyStr:p,cardBody:d,...u}=e.data,m=Array.isArray(t)&&t.length>0?t[t.length-1].titleString:void 0;let h=!1,g=Qt.asNumber(r);if(d&&d.bodyBits){const e=d.bodyBits.find(e=>e.type===ze.select);e&&(g=e.__instructionString?Qt.asNumber(e.__instructionString):g,e.options&&e.options.length>0&&(h=e.options[0].isCorrect))}const f={title:m,checked:h,ingredient:p,quantity:g,unit:o??bt.EMPTY_STRING,unitPlural:a,unitAbbr:s??bt.EMPTY_STRING,unitAbbrPlural:n,decimalPlaces:l??1,disableCalculation:c,...u};f&&i.push(f)}return{ingredients:i.length>0?i:void 0}}(0,0,p);break;case z:case q:case M:case U:c=function(e,t,r,i){const o=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const{cardBody:t,...r}=e.data,i={body:t,...r};i&&o.push(i)}return{cardBits:o.length>0?o:void 0}}(0,0,0,p)}return c.internalComments=p.internalComments.length>0?p.internalComments:void 0,c}function zr(e,t=!1){let r,i,o=!1;const a=[];let s,n=!1;if(0===e.cards.length)return;const l=e.cards[0];for(let e=0;e<l.sides.length;e++){const t=l.sides[e];if(0===t.variants.length)continue;const r=t.variants[0].data,{title:c,__isDefaultExample:p,example:d}=r,u=c&&c[1].titleString;null!=u&&(o=!0),0===e?o&&(i=u,n=!0===p||n,s=d||s):o&&(a.push(u??""),n=!0===p||n,s=d||s)}if(o){let e=a;e=t?a:a.length>=1?a[a.length-1]:"",r={forKeys:i??"",forValues:e}}return r?{heading:r,isDefaultExampleCardSet:n,exampleCardSet:s}:void 0}function Hr(e,t,r,i,o){const{type:a,value:s}=i,{textFormat:n}=e,l=new Gt,c=me.trimmedString(s);switch(a){case Ir.Instruction:o.instruction=l.toAst(c,{format:n,location:Qe}),o.__instructionString=bt.unbreakscape(c,{format:C.bitmarkText,location:Qe});break;case Ir.Hint:o.hint=l.toAst(c,{format:n,location:Qe}),o.__hintString=bt.unbreakscape(c,{format:C.bitmarkText,location:Qe});break;case Ir.Anchor:o.anchor=bt.unbreakscape(c,{format:C.bitmarkText,location:Qe});break;case Ir.Reference:o.reference=bt.unbreakscape(c,{format:C.bitmarkText,location:Qe});break;case Ir.SampleSolution:o.sampleSolution=bt.unbreakscape(c,{format:C.bitmarkText,location:Qe}),o.__sampleSolutionAst=l.toAst(c,{format:n,location:Qe}),e.addWarning("[$...] tag is deprecated, use [@sampleSolution:...] instead",i)}}var Ur=new Gt,Wr=new class{process(e,t,r,i,o,a){const{textFormat:s}=e;let n;o=o.trimStart(),a=a.trimEnd();const l=!!o.trim(),c=!!a.trim();let p=0;if(l&&c&&(p=me.countOccurrencesAtEnd(o,"\n")+me.countOccurrencesAtStart(a,"\n")),o||a){const r=s===C.bitmarkText;o&&(o=Jr.checkFooter(e,t,o));const i=r?Ur.toAst(o,{format:s,location:Ze}):bt.unbreakscape(o,{format:C.plainText,location:Ze}),l=bt.unbreakscape(a,{format:C.plainText,location:Ze});n=Dr.concatenatePlainTextWithAstTexts(i,p,l)}return n?{footer:n}:void 0}},Gr=r(722),Yr=new Gt;function Qr(e,t,r,i,o,a){if(t===Lr)!function(e,t,r,i,o){const{textFormat:a}=e,{value:s}=i,n=o.solutions,l=o.__solutionsAst;if(n&&l&&me.isString(s)){const e=me.trimmedString(s);n.push(bt.unbreakscape(e,{format:C.bitmarkText,location:Qe}));const t=Yr.toAst(e,{format:a,location:Qe});l.push(t)}}(e,0,0,i,o);else{const t=function(e,t,r,i){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("gap content",i);const o=Be.getTagConfigForTag(r,(0,Gr.Enum)(f).fromValue(i.type)),a=[i,...i.chain??[]],s=e.bitContentProcessor(Lr,o?.chain,a);e.DEBUG_CHAIN_TAGS&&e.debugPrint("gap TAGS",s);const n={type:ze.gap,...s};return n}(e,0,r,i);t&&a.push(t)}}var Zr=r(722);function Xr(e){const t=[e];if(e.chain)for(const r of e.chain)t.push(...Xr(r));return t}function ei(e,t,r,i,o){t===Lr?function(e,t,r,i,o){const{textFormat:a}=e,{value:s}=i,n=new Gt,l=me.trimmedString(s);o.itemLead||(o.itemLead=[]);const c=n.toAst(l,{format:a,location:Qe});o.itemLead.push(c),o.__itemLeadString||(o.__itemLeadString=[]),o.__itemLeadString.push(bt.unbreakscape(l,{format:C.bitmarkText,location:Qe}))}(e,0,0,i,o):function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("item lead content",i);const a=Be.getTagConfigForTag(r,(0,Zr.Enum)(f).fromValue(i.type)),s=Xr(i),n=e.bitContentProcessor(Lr,a?.chain,s);e.DEBUG_CHAIN_TAGS&&e.debugPrint("item lead TAGS",n);o.itemLead=n.itemLead,o.__itemLeadString=n.__itemLeadString}(e,0,r,i,o)}var ti=r(722);function ri(e,t,r,i,o,a){if(t===Lr)!function(e,t,r,i){const{value:o}=r;me.isString(o)&&(i.solution=me.trimmedString(o))}(0,0,i,o);else{const t=function(e,t,r,i){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",i);const o=Be.getTagConfigForTag(r,(0,ti.Enum)(f).fromValue(i.type)),a=e.bitContentProcessor(Lr,r,[i]),s=e.bitContentProcessor(Lr,o?.chain,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",s);const{solution:n}=a,{mark:l,...c}=s,p={type:ze.mark,solution:n??"",mark:_t.asSingle(l)??"",...c};return p}(e,0,r,i);t&&a.push(t)}}var ii=r(722);function oi(e,t,r,i,o){t===Lr||function(e,t,r,i,o){const{bitConfig:a}=e;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("book content",i);const s=e.bitContentProcessor(Lr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("book TAGS",s);const{reference:n,referenceEnd:l}=s,c=bt.unbreakscape(me.trimmedString(i.value),{format:C.bitmarkText,location:Qe}),p=a.tags[fe.property_book];if(p&&(p.maxCount===u||p.maxCount>1))return Array.isArray(o.book)||(o.book=[]),void o.book.push({book:c,reference:n??"",referenceEnd:l??void 0});o.book=c,o.reference=n,o.referenceEnd=l}(e,0,r,i,o)}var ai=new Gt;function si(e,t,r,i){const{bitType:o}=e,{value:a}=r,s=a;Be.isOfBitType(o,[d.cloze,d.clozeAndMultipleChoiceText,d.multipleChoiceText,d.highlightText,d.trueFalse,d.trueFalse1,d.multipleResponse,d.multipleResponse1,d.multipleChoice,d.multipleChoice1])?function(e,t,r,i){const{bitType:o,textFormat:a}=e;let s;Array.isArray(i.trueFalse)&&i.trueFalse.length>0&&(s=i.trueFalse[i.trueFalse.length-1]??void 0);s?!0===r?(s.__isDefaultExample=!0,s.example=!!s.isCorrect):Yt.isBooleanString(r)?s.example=Yt.toBoolean(r):(s.__isDefaultExample=!0,s.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t)):Array.isArray(i.__solutionsAst)&&i.__solutionsAst.length>0?i.example=!0===r?i.__solutionsAst[i.__solutionsAst.length-1]??void 0:r?ai.toAst(r,{format:a,location:Qe}):void 0:Be.isOfBitType(o,[d.multipleChoiceText,d.highlightText,d.trueFalse,d.trueFalse1,d.multipleResponse,d.multipleResponse1])?function(e,t,r,i){if(!0===r)i.__isDefaultExample=!0,i.example=void 0;else{const o=r?bt.unbreakscape(r,{format:C.bitmarkText,location:Qe}):void 0;Yt.isBooleanString(o)?i.example=Yt.toBoolean(o):(i.__isDefaultExample=!0,i.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t))}}(e,t,r,i):Be.isOfBitType(o,[d.clozeAndMultipleChoiceText,d.multipleChoice,d.multipleChoice1])?(i.__isDefaultExample=!0,i.example=void 0,!0!==r&&e.addWarning("At this level, only default [@example] is allowed, using default",t)):ni(e,t,r,i)}(e,r,s,i):Be.isOfBitType(o,d.mark)?function(e,t,r,i){i.__isDefaultExample=!0,i.example=void 0,!0!==r&&e.addWarning("Only default [@example] is allowed, using default",t)}(e,r,s,i):ni(e,r,s,i)}function ni(e,t,r,i){const{textFormat:o}=e;!0===r||"true"===r?(i.__isDefaultExample=!0,i.example=void 0):i.example=r?ai.toAst(r,{format:o,location:Qe}):void 0}var li=r(722);function ci(e,t,r,i,o){t===Lr?function(e,t,r,i,o){const{value:a}=i,s=bt.unbreakscape(me.trimmedString(a),{format:C.bitmarkText,location:Qe});o.imageSourceUrl=s}(0,0,0,i,o):function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("imageSource content",i);const{key:a}=i,s=Be.getTagConfigForTag(r,(0,li.Enum)(fe).fromValue(a)),n=e.bitContentProcessor(Lr,r,[i]),l=e.bitContentProcessor(Lr,s?.chain,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("imageSource TAGS",l);const{imageSourceUrl:c}=n,{mockupId:p,...d}=l;c||e.addWarning("[@imageSource] is missing the image url",i);p||e.addWarning("[@mockupId:xxx] is missing from [@imageSource]",i);const u={url:c??"",mockupId:p??"",...d};o.imageSource=u}(e,0,r,i,o)}var pi=r(722);function di(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("person content",i);const a=e.bitContentProcessor(Lr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("person TAGS",a);const{propertyTitle:s,resources:n}=a,l=bt.unbreakscape(me.trimmedString(i.value),{format:C.bitmarkText,location:Qe}),c=me.trimmedString(s),p=function(e,t){let r;const i=[];if(t)for(const e of t.reverse())r||he.image!==e.type?i.push(e):r=e;i.length>0&&e.addWarning(`${i.length} excess resource(s) present in the [@person] chain.`);return r}(e,n),d={name:l,title:c,avatarImage:p};o.person=d}var ui=new Gt;var mi=new Gt;function hi(e,t,r,i,o){const{value:a}=i,{key:s}=i,n=t===Lr,l=Be.getTagConfigForTag(r,(0,ii.Enum)(ue).fromValue(s)),c=l?l.configKey:void 0;let p=be(s);if(c===fe.property_internalComment)return void function(e,t,r,i){if(!i.internalComments)return;const{value:o}=r,a=me.isString(o)?me.trimmedString(o):void 0;a&&i.internalComments.push(a)}(0,0,i,o);if(l){if(c===fe.property_example)return void si(e,0,i,o);if(c===fe.property_groupTag)return void function(e,t,r,i,o){const{value:a}=i;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("groupTag content",i);const s=e.bitContentProcessor(Lr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("groupTag TAGS",s);const{tag:n}=s,l={name:me.trimmedString(a)??"",tags:n??[]};Array.isArray(o.groupTag)||(o.groupTag=[]),o.groupTag.push(l)}(e,0,l.chain,i,o);if(c===fe.property_ratingLevelStart||c===fe.property_ratingLevelEnd)return void function(e,t,r,i,o){const{textFormat:a}=e,{key:s,value:n}=i;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("ratingLevel content",i);const l=e.bitContentProcessor(Lr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("ratingLevel TAGS",l);const{label:c}=l,p={level:Qt.asNumber(n)??0,label:c?ui.toAst(c,{format:a,location:Qe}):void 0};switch(s){case fe.property_ratingLevelStart:o.ratingLevelStart=p;break;case fe.property_ratingLevelEnd:o.ratingLevelEnd=p}}(e,0,l.chain,i,o);if(c===fe.property_technicalTerm)return void function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("technicalTerm content",i);const a=e.bitContentProcessor(Lr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("technicalTerm TAGS",a);const{lang:s}=a,n={technicalTerm:bt.unbreakscape(me.trimmedString(i.value),{format:C.bitmarkText,location:Qe}),lang:s};o.technicalTerm=n}(e,0,l.chain,i,o);if(c===fe.property_servings)return void function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("servings content",i);const a=e.bitContentProcessor(Lr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("servings TAGS",a);const{unit:s,unitPlural:n,unitAbbr:l,unitAbbrPlural:c,decimalPlaces:p,disableCalculation:d,__hintString:u}=a,m={servings:Qt.asNumber(i.value)??1,unit:s,unitPlural:n,unitAbbr:l,unitAbbrPlural:c,decimalPlaces:p??1,disableCalculation:d,hint:u};o.servings=m}(e,0,l.chain,i,o);if(c===fe.property_person||c===fe.property_partner)return void di(e,0,l.chain,i,o);if(c===fe.property_imageSource)return void ci(e,t,r,i,o);if(c===fe.property_book)return void oi(e,t,l.chain,i,o);if(c===fe.property_mark&&!n)return void function(e,t,r,i,o){const{key:a}=i;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",i);const s=o.markConfig;if(!s)return;const n=Be.getTagConfigForTag(r,(0,pi.Enum)(fe).fromValue(a)),{mark:l,...c}=e.bitContentProcessor(Lr,n?.chain,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",c);const p={mark:bt.unbreakscape(me.trimmedString(i.value)??"unknown",{format:C.bitmarkText,location:Qe}),emphasis:"underline",...c};p&&s.push(p)}(e,0,r,i,o);c===fe.property_title&&n&&(p="propertyTitle")}const d=(e,t,r,i)=>{if(r=(e=>{if(null!=e){if(i)switch(i.format){case y:return bt.unbreakscape(me.isString(e)?me.trimmedString(e):void 0,{format:C.plainText,location:Qe});case k:return Qt.asNumber(bt.unbreakscape(e,{format:C.plainText,location:Qe}));case x:return Yt.toBoolean(bt.unbreakscape(e,{format:C.plainText,location:Qe}),!0);case v:return!Yt.toBoolean(bt.unbreakscape(e,{format:C.plainText,location:Qe}),!0);case b:return e=me.isString(e)?e:"",mi.toAst(e,{format:C.bitmarkText,location:Qe});case _:const t=bt.unbreakscape(e,{format:C.plainText,location:Qe});if(null==t)return;const r=t.split(",").map(e=>Qt.asNumber(e.trim()));if(4!==r.length||r.some(e=>null==e))return;return r}return bt.unbreakscape(e,{format:C.plainText,location:Qe})}})(r),null==i||i.array)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t];e[t]=[...i,r]}else e[t]=[r];else e[t]=r};d(l?o:o.extraProperties,p,a,l),c===fe.property_sampleSolution&&d(o,"__sampleSolutionAst",a,new oe({configKey:fe.property_sampleSolution,tag:"sampleSolution",maxCount:1,minCount:1,chain:void 0,jsonKey:void 0,exportJsonKey:void 0,hasExportJsonKey:!1,htmlKey:void 0,hasHtmlKey:!1,format:b,values:void 0,defaultValue:void 0,deprecated:void 0}))}function gi(e,t,r,i,o){const{value:a,chain:s}=i,n=me.trimmedString(a);if(o.reference=bt.unbreakscape(n,{format:C.bitmarkText,location:Qe}),Array.isArray(s)&&s.length>0){const t=e.bitContentProcessor(Lr,r,s);null!=t.reference&&(o.referenceEnd=t.reference)}}var fi=r(722),yi=new or;function bi(e,t,r,i,o){const{type:a,key:s,value:n,chain:l}=i,c=o.resources;if(!c)return;const p=(0,fi.Enum)(fe).fromValue(s);if(!p)return;const d=(0,fi.Enum)(he).fromKey(p.replace(/^&/,""))??he.unknown,u=Be.getTagConfigForTag(r,p),{posterImage:m,...h}=e.bitContentProcessor(Lr,u?.chain,l);let g;if(m){const{subConfig:t,subChain:r}=function(e,t,r){let i;e&&(i=e[r]?.chain);const o=t?.reduce((e,t)=>{if(e)return e;const i=t;return i.key===r?i.chain:void 0},void 0);return{subConfig:i,subChain:o}}(u?.chain,l,fe.property_posterImage),{posterImage:i,...o}=e.bitContentProcessor(Lr,t,r);g=yi.resource(e,{type:he.image,value:m,...o}).image}const f=yi.resource(e,{type:d,value:bt.unbreakscape(n,{format:C.bitmarkText,location:Qe}),posterImage:g,...h});f&&(p===fe.resource_backgroundWallpaper||p===fe.resource_imagePlaceholder||p===fe.resource_platformIcon||p===fe.resource_platformLogo||p===fe.resource_platformBackgroundImage||p===fe.resource_previewImage||p===fe.resource_previewVideo||p===fe.resource_coverImage||p===fe.resource_backgroundImage?o.propertyStyleResources&&(o.propertyStyleResources[d]?(Array.isArray(o.propertyStyleResources[d])||(o.propertyStyleResources[d]=[o.propertyStyleResources[d]]),o.propertyStyleResources[d].push(f)):o.propertyStyleResources[d]=f):c.push(f))}var ki=new Gt;function xi(e,t,r,i,o){const{textFormat:a}=e,{value:s}=i,n=o.title;if(!n)return;const l=s,c=me.trimmedString(l.title);n[l.level.length]={titleAst:ki.toAst(c??"",{format:a,location:Qe}),titleString:c??""}}var vi=new Gt;function Ti(e,t,r,i,o,a){t===Lr?function(e,t,r,i){const{textFormat:o}=e,{type:a,value:s}=r,n=i.trueFalse;if(!n)return;const l=bt.unbreakscape(me.trimmedString(s),{format:C.bitmarkText,location:Qe}),c=vi.toAst(l??"",{format:o,location:Qe});n.push({text:l,textAst:c,isCorrect:a===Ir.True,__isDefaultExample:!1})}(e,0,i,o):function(e,t,r,i,o,a){const{bitType:s}=e,n=[i,...i.chain??[]],l=o.statements,c=o.choices,p=o.responses;if(!(l&&c&&p&&a))return;if(Be.isOfBitType(s,d.trueFalse1))o.statement=function(e,t,r){const{bitType:i}=e;if(!Be.isOfBitType(i,d.trueFalse1))return;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (statement)",r);const{trueFalse:o,...a}=e.bitContentProcessor(Lr,t,r);e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (statement)",a);let s,n;o&&o.length>0&&(n=o[0]);if(n){const{statement:e,...t}=a;s={...n,statement:n.text,...t}}return s}(e,r,n);else if(Be.isOfBitType(s,[d.trueFalse,d.multipleChoice,d.multipleChoice1,d.multipleResponse,d.multipleResponse1,d.feedback])){const t=function(e,t,r){const{bitType:i}=e,o=Be.isOfBitType(i,d.trueFalse),a=Be.isOfBitType(i,[d.multipleChoice,d.multipleChoice1,d.feedback]),s=Be.isOfBitType(i,[d.multipleResponse,d.multipleResponse1]);if(!o&&!a&&!s)return{};const n=[],l=[],c=[],p=e.splitBitContent(r,[Ir.True,Ir.False]);e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (choices/responses)",p);for(const r of p){const{trueFalse:i,...p}=e.bitContentProcessor(Lr,t,r);let d;if(e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (choices/responses)",p),i&&i.length>0&&(d=i[0]),d)if(o){const{statement:e,...t}=p,r={...d,statement:d.textAst??[],...t};r&&n.push(r)}else if(a){const e={...d,choice:d.text,...p};e&&l.push(e)}else if(s){const e={...d,response:d.text,...p};e&&c.push(e)}}const u={};o?u.statements=n:a?u.choices=l:s&&(u.responses=c);return u}(e,r,n);t.statements&&l.push(...t.statements),t.choices&&c.push(...t.choices),t.responses&&p.push(...t.responses)}else if(Be.isOfBitType(s,d.highlightText)){const t=function(e,t,r){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("highlight content",r);const{trueFalse:i,...o}=e.bitContentProcessor(Lr,t,r);e.DEBUG_CHAIN_TAGS&&e.debugPrint("highlight TAGS",{trueFalse:i,...o});const a=[];if(i)for(const e of i){const t={...e,isHighlighted:!1};t&&a.push(t)}const s={type:ze.highlight,texts:a,...o};return s}(e,r,n);t&&a.push(t)}else{const t=function(e,t,r){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("select content",r);const{trueFalse:i,...o}=e.bitContentProcessor(Lr,t,r);e.DEBUG_CHAIN_TAGS&&e.debugPrint("select TAGS",{trueFalse:i,...o});const a=[];if(i)for(const e of i){const t=e;t&&a.push(t)}const s={type:ze.select,options:a,...o};return s}(e,r,n);t&&a.push(t)}}(e,0,r,i,o,a)}var _i=!1,Ci=!0,wi=!0,Ai=!0,Bi=!0,Si=new ar,Ii=class{constructor(e){l(this,"context"),l(this,"nonFatalWarnings",[]),l(this,"nonFatalErrors",[]),l(this,"parser",{}),l(this,"parse"),l(this,"parserText"),l(this,"parserLocation"),this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation,this.context={bitConfig:Be.getBitConfig(d._error),bitType:d._error,textFormat:C.bitmarkText,DEBUG_BIT_RAW:true,DEBUG_BIT_CONTENT_RAW:_i,DEBUG_BIT_CONTENT:Ci,DEBUG_BIT_TAGS:wi,DEBUG_BODY:Ai,DEBUG_FOOTER:Bi,DEBUG_CHAIN_CONTENT:true,DEBUG_CHAIN_TAGS:true,DEBUG_CARD_SET_CONTENT:true,DEBUG_CARD_SET:true,DEBUG_CARD_TAGS:true,parser:this.parser,parse:this.parse,bitContentProcessor:this.bitContentProcessor.bind(this),splitBitContent:this.splitBitContent.bind(this),addWarning:this.addWarning.bind(this),addError:this.addError.bind(this),debugPrint:this.debugPrint.bind(this),state:{}}}buildBits(e){const t=[];let r=[];for(const i of e){if(!i)continue;const e=i.value;e?t.push(e):r=r.concat(i.errors??[])}return Si.buildBitmark({bits:t,errors:r.length>0?r:void 0})}buildBit(e,t){const{bitType:r,textFormat:i,resourceType:o,bitLevel:a,isCommented:s}=e;if(!r||Be.isOfBitType(r,d._error))return this.invalidBit();const n=Be.getBitConfig(r);this.context.bitConfig=n,this.context.bitType=r,this.context.textFormat=i,this.context.resourceType=o;const l=Be.isOfBitType(r,d.trueFalse1),c=Be.isOfBitType(r,d.multipleChoice1),p=Be.isOfBitType(r,d.multipleResponse1);this.debugPrint("BIT CONTENT",t),this.resetParserState(),t=this.squashUnwantedInlineBodyBits(t),t=Jr.validateBitTags(this.context,t);const{body:m,footer:h,cardSet:g,title:f,statement:y,statements:b,choices:k,responses:x,propertyStyleResources:v,resources:T,posterImage:_,internalComments:C,...w}=this.bitContentProcessor(Pr,n.tags,t);this.debugPrint("BIT TAGS",w),this.debugPrint("BIT BODY",m),this.debugPrint("BIT FOOTER",h);const A=function(e,t,r){if(r=r??[],Be.isOfBitType(t,d.chapter)){let e;return r.length>0&&(e=r[r.length-1]),{title:e?.titleAst??[],titleString:e?.titleString??"",level:r.length>0?r.length-1:void 0}}return Array.isArray(r)?{title:r[1]?.titleAst??void 0,titleString:r[1]?.titleString??void 0,subtitle:r[2]?.titleAst??void 0,subtitleString:r[2]?.titleString??void 0}:{title:void 0,titleString:r??void 0,subtitle:void 0,subtitleString:void 0}}(this.context,r,f),B=Mr(this.context,r,0,g,y,b,k,x),S=function(e,t,r){const{bitType:i}=e,o=[],a=[],s=(0,fi.Enum)(he).fromValue(t),n=Be.getBitResourcesConfig(i,s),l=n.resourceAttachmentAllowed,c=n.getCountsMin(),p=n.getCountsMax();if(r)for(const t of r.reverse()){const r=t.__configKey;let i=c.get(r)??0,s=p.get(r)??0;i=Math.max(0,i-1),s===u?o.unshift(t):s>0?(o.unshift(t),s--):a.unshift(t),c.set(r,i),p.set(r,s),t.__invalid&&e.addWarning(`Resource type [&${t.type}] is not valid`)}if(!l&&t){const r=`Resource type [&${t}] is specified in the bit header, but no extra resource is allowed for this bit.`;e.addWarning(r)}else 0===o.length&&t&&e.addWarning(`Resource type [&${t}] is specified in the bit header, but no such resource is present`);return a.forEach(e=>{e.__excessResource=!0,o.push(e)}),o}(this.context,o,T),I=[...C??[],...B.internalComments??[]],P=this.buildBitLevelWarnings(),E=this.buildBitLevelErrors();P&&(this.parser.warnings=P),E&&(this.parser.errors=E);return{value:Si.buildBit({bitType:r,bitLevel:a,isCommented:s,textFormat:i,resourceType:o,...A,posterImage:_,statement:l?y:void 0,choices:c?k:void 0,responses:p?x:void 0,...w,...v,resources:S,...B,body:m,footer:h,internalComment:I,parser:this.parser})}}invalidBit(e){e&&this.addError("Invalid bit"),this.parser.errors=this.buildBitLevelErrors();return{value:Si.buildBit({bitType:Be.getBitType(d._error),bitLevel:1,parser:this.parser})}}buildBitHeader(e,t,r){const i=bt.unbreakscape(e,{format:C.plainText,location:Qe}),o=Be.getBitType(i),a=Be.isBitTypeCommented(i);Be.isOfBitType(o,d._error)&&this.addError(`Invalid bit type: '${i}'`);const s=Be.getBitConfig(o);t>Be.bitLevelMax?(this.addWarning(`Bit level of ${t} too high, setting to max value of ${Be.bitLevelMax}`),t=Be.bitLevelMax):t<Be.bitLevelMin&&(this.addWarning(`Bit level of ${t} too low, setting to min value of ${Be.bitLevelMin}`),t=Be.bitLevelMin);let n=(0,Rr.Enum)(C).fromValue(r.textFormat);r.textFormat&&!n&&this.addWarning(`Invalid text format '${r.textFormat}', defaulting to '${Xe.bitmarkPlusPlus}'`);const l=(0,Rr.Enum)(kt).fromValue(r.textFormat);l&&(n=C.bitmarkText,this.addWarning(`${l} text format is deprecated. Bit will be parsed as '${Xe.bitmarkPlusPlus}'`)),n=n??s.textFormatDefault;const c=(0,Rr.Enum)(he).fromValue(r.resourceType);return r.resourceType&&!c&&this.addWarning(`Invalid resource type '${r.resourceType}', it will be ignored`),{bitType:o,bitLevel:t,textFormat:n??s.textFormatDefault,resourceType:c,isCommented:a}}buildTextAndResourceType(e,t){const r={},i=e=>{if(e){const t=bt.unbreakscape(me.string(e.value),{format:C.plainText,location:Qe});e.type===Ir.TextFormat?r.textFormat=t:r.resourceType=t}};return i(e),i(t),r}resetParserState(){this.context.state={}}squashUnwantedInlineBodyBits(e){const t=[];if(!e)return t;const{textFormat:r}=this.context,i=r===C.bitmarkText,o=(e,t="")=>{const{chain:r,parser:i}=e;if(t+=i.text,r)for(const e of r)t=o(e,t);return t};let a=!1;for(const r of e){const{type:e,value:s}=r,n=s??"";let l=!1;if(a||(e===Ir.BodyText&&!i&&n&&n.trim()&&(a=!0),e===Ir.PlainTextDivider&&(a=!0,l=!0)),l)t.push({type:Ir.BodyText,value:"\n"});else if(a)if(e===Ir.BodyText)t.push({type:Ir.BodyTextPlain,value:s});else{const e=o(r);t.push({type:Ir.BodyTextPlain,value:e})}else t.push(r)}return t}bitContentProcessor(e,t,r){const i={};if(!r)return i;const{bitType:o,textFormat:a}=this.context;i.title=[],i.solutions=[],i.__solutionsAst=[],i.statements=[],i.choices=[],i.responses=[],i.propertyStyleResources={},i.resources=[],i.trueFalse=[],i.markConfig=[],i.extraProperties={},i.internalComments=[];let s=!1;const n=[];let l=bt.EMPTY_STRING,c=bt.EMPTY_STRING,p=bt.EMPTY_STRING,d=bt.EMPTY_STRING;const u=e===Pr,m=e===Er,h=e===Lr,g=()=>{if(l){l=Jr.checkBodyPart(this.context,e,l);const t=qr.buildBodyText(l,!1);n.push(t)}l=bt.EMPTY_STRING};for(const o of r){const{type:r,value:a}=o;switch(r){case Ir.ItemLead:ei(this.context,e,t,o,i);break;case Ir.Instruction:case Ir.Hint:case Ir.Anchor:case Ir.SampleSolution:Hr(this.context,0,0,o,i);break;case Ir.Reference:gi(this.context,0,t,o,i);break;case Ir.Title:xi(this.context,0,0,o,i);break;case Ir.Property:hi(this.context,e,t,o,i);break;case Ir.Gap:h||g(),Qr(this.context,e,t,o,i,n);break;case Ir.Mark:h||g(),ri(this.context,e,t,o,i,n);break;case Ir.True:case Ir.False:h||g(),Ti(this.context,e,t,o,i,n);break;case Ir.Resource:bi(this.context,0,t,o,i);break;case Ir.CardSet:i.cardSet=a,s=!0;break;case Ir.BodyText:case Ir.CardText:s?c=bt.concatenate(c,a):l=bt.concatenate(l,a);break;case Ir.BodyTextPlain:s?d=bt.concatenate(d,a):p=bt.concatenate(p,a);break;case Ir.FooterDivider:s&&(c=bt.concatenate(c,a)),s=!0}}g();const f=p?qr.buildBodyText(p,!0):void 0;if(f&&n.push(f),i.itemLead){const e=i.itemLead.length;e>0&&(i.item=i.itemLead[0]),e>1&&(i.lead=i.itemLead[1]),e>2&&(i.pageNumber=i.itemLead[2]),e>3&&(i.marginNumber=i.itemLead[e-1])}if(i.__itemLeadString){const e=i.__itemLeadString.length;e>0&&(i.__itemString=i.__itemLeadString[0]),e>1&&(i.__leadString=i.__itemLeadString[1]),e>2&&(i.__pageNumberString=i.__itemLeadString[2]),e>3&&(i.__marginNumberString=i.__itemLeadString[e-1])}return u?i.body=qr.process(this.context,e,o,a,t,i,n,!1):m&&(i.cardBody=qr.process(this.context,e,o,a,t,i,n,!0)),i.footer=Wr.process(this.context,e,t,i,c,d),0===Object.keys(i.extraProperties).length&&delete i.extraProperties,0===i.title.length&&delete i.title,0===i.solutions.length&&delete i.solutions,0===i.statements.length&&delete i.statements,0===i.choices.length&&delete i.choices,0===i.responses.length&&delete i.responses,0===i.trueFalse.length&&delete i.trueFalse,0===i.markConfig.length&&delete i.markConfig,0===Object.keys(i.propertyStyleResources).length&&delete i.propertyStyleResources,0===i.resources.length&&delete i.resources,0===i.internalComments.length&&delete i.internalComments,i}buildBitLevelWarnings(){let e;return this.nonFatalWarnings.length>0&&(e=this.nonFatalWarnings,this.nonFatalWarnings=[]),e}buildBitLevelErrors(){let e;return this.nonFatalErrors.length>0&&(e=this.nonFatalErrors,this.nonFatalErrors=[]),e}splitBitContent(e,t){const r=[];let i=[];for(const o of e)t.includes(o.type)&&(i.length>0&&r.push(i),i=[]),i.push(o);return i.length>0&&r.push(i),r}addWarning(e,t,r){const i={message:e,text:t?.parser.text??this.parserText(),location:t?.parser.location??this.parserLocation(),original:r?.parser??void 0};i.original||delete i.original,this.nonFatalWarnings.push(i)}addError(e,t,r){const i={message:e,text:t?.parser.text??this.parserText(),location:t?.parser.location??this.parserLocation(),original:r?.parser??void 0};i.original||delete i.original,this.nonFatalErrors.push(i)}debugPrint(e,t){}},Pi=class extends SyntaxError{constructor(e,t,r,i){super(e),this.expected=t,this.found=r,this.location=i,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null;const i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));const o=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,s=this.location.source+":"+a.line+":"+a.column;if(r){const e=this.location.end,i="".padEnd(a.line.toString().length," "),n=r[o.line-1],l=(o.line===e.line?e.column:n.length+1)-o.column||1;t+="\n --\x3e "+s+"\n"+i+" |\n"+a.line+" | "+n+"\n"+i+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}const i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}function a(e){return o(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return o(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}const n={literal:e=>'"'+a(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return n[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+(((c=t)?'"'+a(c)+'"':"end of input")+" found.");var c}};var Ei=function e(t,r){const i={},o=(r=void 0!==r?r:{}).grammarSource,a={bitmark:nt,bit:function(){let e,t,r,o,a;e=He,t=[],r=Vt();for(;r!==i;)t.push(r),r=Vt();if(r=pt(),r!==i){for(o=[],a=Vt();a!==i;)o.push(a),a=Vt();Ue=e,e=r}else He=e,e=i;return e},cardContent:function(){let e,t,r;e=He,t=[],r=ht(),r===i&&(r=wt());for(;r!==i;)t.push(r),r=ht(),r===i&&(r=wt());return Ue=e,t=ze(t),e=t,e}};let s=nt;const n="[.",l="]",c="[",p=":",d="&",u="$$$$",m="====",h="text",g="~~~~",f="footer",y=" ",b="--",k="++",x="===",v="==",T="[@id",_="#",C="[▼",w="[►",A="[@",B="[%",S="[!",I="[?",P="[+",E="[-",L="[$",V="[_",N="[=",R="[&",F="^]",K="id:",$=".",O="\n",J="\r\n",D=/^[^\]]/,j=/^[a-z]/,q=/^[a-z0-9\-]/,M=/^[^:\]]/,z=/^[^&:\]]/,H=/^[^\n\r\u2028\u2029]/,U=/^[ \t]/,W=/^[\r\u2028-\u2029]/,G=/^[ \t\n\r\u2028\u2029]/,Y=et("[.",!1),Q=tt(["]"],!0,!1,!1),Z=et("]",!1),X=et("[",!1),ee=et(":",!1),te=et("&",!1),re={type:"any"},ie=et("$$$$",!1),oe=et("====",!1),ae=et("text",!1),se=et("~~~~",!1),ne=et("footer",!1),le=et(" ",!1),ce=et("--",!1),pe=et("++",!1),de=et("===",!1),ue=et("==",!1),me=tt([["a","z"]],!1,!1,!1),he=tt([["a","z"],["0","9"],"-"],!1,!1,!1),ge=et("[@id",!1),fe=et("#",!1),ye=et("[▼",!1),be=et("[►",!1),ke=et("[@",!1),xe=et("[%",!1),ve=et("[!",!1),Te=et("[?",!1),_e=et("[+",!1),Ce=et("[-",!1),we=et("[$",!1),Ae=et("[_",!1),Be=et("[=",!1),Se=et("[&",!1),Ie=et("^]",!1),Pe=et("id:",!1),Ee=tt([":","]"],!0,!1,!1),Le=et(".",!1),Ve=tt(["&",":","]"],!0,!1,!1),Ne=rt("Character"),Re=tt(["\n","\r","\u2028","\u2029"],!0,!1,!1),Fe=rt("Blank Line"),Ke=tt([" ","\t"],!1,!1,!1),$e=rt("Line Terminator"),Oe=et("\n",!1),Je=et("\r\n",!1),De=tt(["\r",["\u2028","\u2029"]],!1,!1,!1),je=rt("Whitespace, then Line Terminator"),qe=rt("whitespace"),Me=tt([" ","\t","\n","\r","\u2028","\u2029"],!1,!1,!1);function ze(e){return Ot.handleCardContent(e)}let He=0|r.peg$currPos,Ue=He;const We=[{line:1,column:1}];let Ge,Ye=He,Qe=r.peg$maxFailExpected||[],Ze=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in a))throw new Error("Can't start parsing from rule \""+r.startRule+'".');s=a[r.startRule]}function Xe(){return t.substring(Ue,He)}function et(e,t){return{type:"literal",text:e,ignoreCase:t}}function tt(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function rt(e){return{type:"other",description:e}}function it(e){let r,i=We[e];if(i)return i;if(e>=We.length)r=We.length-1;else for(r=e;!We[--r];);for(i=We[r],i={line:i.line,column:i.column};r<e;)10===t.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return We[e]=i,i}function ot(e,t,r){const i=it(e),a=it(t),s={source:o,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:a.line,column:a.column}};return r&&o&&"function"==typeof o.offset&&(s.start=o.offset(s.start),s.end=o.offset(s.end)),s}function at(e){He<Ye||(He>Ye&&(Ye=He,Qe=[]),Qe.push(e))}function st(e,t,r){return new Pi(Pi.buildMessage(e,t),e,t,r)}function nt(){let e;return e=function(){let e,r,o,a;e=He,r=[],o=Ft();for(;o!==i;)r.push(o),o=Ft();return o=function(){let e,r,o,a;e=He,r=He,o=[],a=ct();for(;a!==i;)o.push(a),a=ct();return r=t.substring(r,He),Ue=e,r=function(e){return Ot.handleRawBit(e)}(r),e=r,e}(),a=function(){let e,t;e=[],t=lt();for(;t!==i;)e.push(t),t=lt();return e}(),Ue=e,e=function(e,t){return Jt.buildBits([e,...t])}(o,a),e}(),e}function lt(){let e,r,o,a;for(e=He,r=[],o=Vt();o!==i;)r.push(o),o=Vt();return o=Nt(),o===i&&(o=null),a=function(){let e,r,o,a,s,c;if(e=He,r=He,o=He,a=function(){let e,r,o,a;e=He,t.substr(He,2)===n?(r=n,He+=2):(r=i,0===Ze&&at(Y));if(r!==i){for(o=[],a=t.charAt(He),D.test(a)?He++:(a=i,0===Ze&&at(Q));a!==i;)o.push(a),a=t.charAt(He),D.test(a)?He++:(a=i,0===Ze&&at(Q));93===t.charCodeAt(He)?(a=l,He++):(a=i,0===Ze&&at(Z)),a!==i?(Ue=e,e=r):(He=e,e=i)}else He=e,e=i;return e}(),a!==i){for(s=[],c=ct();c!==i;)s.push(c),c=ct();a=[a,s],o=a}else He=o,o=i;r=o!==i?t.substring(r,He):o;r!==i&&(Ue=e,p=r,r=Ot.handleRawBit(p));var p;return e=r,e}(),a!==i?(Ue=e,e=a):(He=e,e=i),e}function ct(){let e,t,r,o;if(e=He,t=Nt(),t!==i?(r=He,Ze++,o=dt(),Ze--,o===i?r=void 0:(He=r,r=i),r!==i?(t=[t,r],e=t):(He=e,e=i)):(He=e,e=i),e===i)if(e=[],t=Et(),t!==i)for(;t!==i;)e.push(t),t=Et();else e=i;return e}function pt(){let e,r,o;var a,s,n;return e=He,r=dt(),r!==i?(o=function(){let e,t,r;e=He,t=[],r=bt(),r===i&&(r=xt(),r===i&&(r=Tt(),r===i&&(r=ht(),r===i&&(r=yt()))));for(;r!==i;)t.push(r),r=bt(),r===i&&(r=xt(),r===i&&(r=Tt(),r===i&&(r=ht(),r===i&&(r=yt()))));return Ue=e,t=function(e){return Ot.handleBitContent(e)}(t),e=t,e}(),Ue=e,a=r,s=o,e=Jt.buildBit(a,s)):(He=e,e=i),e===i&&(e=He,r=He,o=function(){let e,r;Ze++,e=[],t.length>He?(r=t.charAt(He),He++):(r=i,0===Ze&&at(re));for(;r!==i;)e.push(r),t.length>He?(r=t.charAt(He),He++):(r=i,0===Ze&&at(re));return Ze--,e}(),r=t.substring(r,He),Ue=e,n=r,r=Jt.invalidBit(n),e=r),e}function dt(){let e,r,o,a,s,n;var p,d,u;return e=He,91===t.charCodeAt(He)?(r=c,He++):(r=i,0===Ze&&at(X)),r!==i?(o=function(){let e,r,o;e=He,r=[],46===t.charCodeAt(He)?(o=$,He++):(o=i,0===Ze&&at(Le));if(o!==i)for(;o!==i;)r.push(o),46===t.charCodeAt(He)?(o=$,He++):(o=i,0===Ze&&at(Le));else r=i;r!==i&&(Ue=e,r=r.length);return e=r,e}(),o!==i?(a=It(),s=function(){let e,t,r;e=He,t=ut(),t===i&&(t=mt());t===i&&(t=null);r=ut(),r===i&&(r=mt());r===i&&(r=null);return Ue=e,e=function(e,t){return Jt.buildTextAndResourceType(e,t)}(t,r),e}(),93===t.charCodeAt(He)?(n=l,He++):(n=i,0===Ze&&at(Z)),n!==i?(Ue=e,p=o,d=a,u=s,e=Jt.buildBitHeader(d,p,u)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i),e}function ut(){let e,r,o;var a;return e=He,58===t.charCodeAt(He)?(r=p,He++):(r=i,0===Ze&&at(ee)),r!==i?(o=It(),Ue=e,a=o,e=Ot.handleTextFormat(a)):(He=e,e=i),e}function mt(){let e,r,o;var a;return e=He,38===t.charCodeAt(He)?(r=d,He++):(r=i,0===Ze&&at(te)),r!==i?(o=It(),Ue=e,a=o,e=Ot.handleResourceType(a)):(He=e,e=i),e}function ht(){let e,t,r,o,a;if(e=He,t=He,r=ft(),r!==i){for(o=[],a=gt();a!==i;)o.push(a),a=gt();r=[r,o],t=r}else He=t,t=i;var s;return t!==i&&(Ue=e,s=t,t=Ot.handleTagChain(s)),e=t,e}function gt(){let e,t;return e=He,t=ft(),t!==i&&(Ue=e),e=t,e}function ft(){let e,r;var o;return e=He,r=function(){let e,r,o,a;e=He,t.substr(He,4)===T?(r=T,He+=4):(r=i,0===Ze&&at(ge));r!==i?(o=Pt(),o!==i?(a=function(){let e;93===t.charCodeAt(He)?(e=l,He++):(e=i,0===Ze&&at(Z));return e}(),a!==i?(Ue=e,s=o,e=Ot.handlePropertyTag("id",s)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a,s;e=He,t.substr(He,2)===A?(r=A,He+=2):(r=i,0===Ze&&at(ke));r!==i?(o=Bt(),o!==i?(a=Pt(),a!==i?(s=St(),s!==i?(Ue=e,n=o,l=a,e=Ot.handlePropertyTag(n,l)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i);var n,l;return e}(),r===i&&(r=function(){let e,r,o,a,s;e=He,91===t.charCodeAt(He)?(r=c,He++):(r=i,0===Ze&&at(X));if(r!==i){if(o=[],35===t.charCodeAt(He)?(a=_,He++):(a=i,0===Ze&&at(fe)),a!==i)for(;a!==i;)o.push(a),35===t.charCodeAt(He)?(a=_,He++):(a=i,0===Ze&&at(fe));else o=i;o!==i?(a=At(),s=St(),s!==i?(Ue=e,n=o,l=a,e=Ot.handleTag(Ir.Title,{level:n,title:l})):(He=e,e=i)):(He=e,e=i)}else He=e,e=i;var n,l;return e}(),r===i&&(r=function(){let e,r,o,a;e=He,t.substr(He,2)===C?(r=C,He+=2):(r=i,0===Ze&&at(ye));r!==i?(o=At(),a=St(),a!==i?(Ue=e,s=o,e=Ot.handleTag(Ir.Anchor,s)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=He,t.substr(He,2)===w?(r=w,He+=2):(r=i,0===Ze&&at(be));r!==i?(o=At(),a=St(),a!==i?(Ue=e,s=o,e=Ot.handleTag(Ir.Reference,s)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=He,t.substr(He,2)===B?(r=B,He+=2):(r=i,0===Ze&&at(xe));r!==i?(o=At(),a=St(),a!==i?(Ue=e,s=o,e=Ot.handleTag(Ir.ItemLead,s)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=He,t.substr(He,2)===S?(r=S,He+=2):(r=i,0===Ze&&at(ve));r!==i?(o=At(),a=St(),a!==i?(Ue=e,s=o,e=Ot.handleTag(Ir.Instruction,s)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=He,t.substr(He,2)===I?(r=I,He+=2):(r=i,0===Ze&&at(Te));r!==i?(o=At(),a=St(),a!==i?(Ue=e,s=o,e=Ot.handleTag(Ir.Hint,s)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=He,t.substr(He,2)===V?(r=V,He+=2):(r=i,0===Ze&&at(Ae));r!==i?(o=At(),a=St(),a!==i?(Ue=e,s=o,e=Ot.handleTag(Ir.Gap,s)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=He,t.substr(He,2)===N?(r=N,He+=2):(r=i,0===Ze&&at(Be));r!==i?(o=At(),a=St(),a!==i?(Ue=e,s=o,e=Ot.handleTag(Ir.Mark,s)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=He,t.substr(He,2)===L?(r=L,He+=2):(r=i,0===Ze&&at(we));r!==i?(o=At(),a=St(),a!==i?(Ue=e,s=o,e=Ot.handleTag(Ir.SampleSolution,s)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=He,t.substr(He,2)===P?(r=P,He+=2):(r=i,0===Ze&&at(_e));r!==i?(o=At(),a=St(),a!==i?(Ue=e,s=o,e=Ot.handleTag(Ir.True,s)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=He,t.substr(He,2)===E?(r=E,He+=2):(r=i,0===Ze&&at(Ce));r!==i?(o=At(),a=St(),a!==i?(Ue=e,s=o,e=Ot.handleTag(Ir.False,s)):(He=e,e=i)):(He=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a,s;e=He,t.substr(He,2)===R?(r=R,He+=2):(r=i,0===Ze&&at(Se));r!==i?(o=Bt(),o!==i?(a=Pt(),a!==i?(s=St(),s!==i?(Ue=e,n=o,l=a,e=Ot.handleResourceTag(n,l)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i);var n,l;return e}()))))))))))))),r!==i&&(Ue=e,o=r,r=Ot.handleBitTag(o)),e=r,e}function yt(){let e,r;return e=He,t.length>He?(r=t.charAt(He),He++):(r=i,0===Ze&&at(re)),r!==i&&(Ue=e,r={type:Ir.BodyChar,value:r}),e=r,e}function bt(){let e;return e=function(){let e,t,r,o,a;e=He,t=He,r=Nt(),r!==i?(o=kt(),o!==i?(a=Rt(),a!==i?(r=[r,o,a],t=r):(He=t,t=i)):(He=t,t=i)):(He=t,t=i);t!==i&&(Ue=e,s=t,t=Ot.handleFooterDivider(s));var s;return e=t,e}(),e===i&&(e=function(){let e,r,o,a,s;e=He,r=He,o=Nt(),o!==i?(a=function(){let e,r,o,a,s,n;t.substr(He,4)===u?(e=u,He+=4):(e=i,0===Ze&&at(ie));if(e===i)if(e=He,t.substr(He,4)===m?(r=m,He+=4):(r=i,0===Ze&&at(oe)),r!==i){if(o=[],a=Ft(),a!==i)for(;a!==i;)o.push(a),a=Ft();else o=i;if(o!==i)if(t.substr(He,4)===h?(a=h,He+=4):(a=i,0===Ze&&at(ae)),a!==i){if(s=[],n=Ft(),n!==i)for(;n!==i;)s.push(n),n=Ft();else s=i;s!==i?(t.substr(He,4)===m?(n=m,He+=4):(n=i,0===Ze&&at(oe)),n!==i?(r=[r,o,a,s,n],e=r):(He=e,e=i)):(He=e,e=i)}else He=e,e=i;else He=e,e=i}else He=e,e=i;return e}(),a!==i?(s=Rt(),s!==i?(o=[o,a,s],r=o):(He=r,r=i)):(He=r,r=i)):(He=r,r=i);r!==i&&(Ue=e,n=r,r=Ot.handlePlainTextDivider(n));var n;return e=r,e}()),e}function kt(){let e,r,o,a,s,n;if(t.substr(He,4)===g?(e=g,He+=4):(e=i,0===Ze&&at(se)),e===i)if(e=He,t.substr(He,4)===m?(r=m,He+=4):(r=i,0===Ze&&at(oe)),r!==i){if(o=[],a=Ft(),a!==i)for(;a!==i;)o.push(a),a=Ft();else o=i;if(o!==i)if(t.substr(He,6)===f?(a=f,He+=6):(a=i,0===Ze&&at(ne)),a!==i){if(s=[],n=Ft(),n!==i)for(;n!==i;)s.push(n),n=Ft();else s=i;s!==i?(t.substr(He,4)===m?(n=m,He+=4):(n=i,0===Ze&&at(oe)),n!==i?(r=[r,o,a,s,n],e=r):(He=e,e=i)):(He=e,e=i)}else He=e,e=i;else He=e,e=i}else He=e,e=i;return e}function xt(){let e,r,o,a,s;if(e=He,r=He,o=function(){let e,r,o,a;e=He,r=[],o=Rt(),o===i&&(o=Nt());if(o!==i)for(;o!==i;)r.push(o),o=Rt(),o===i&&(o=Nt());else r=i;r!==i?(o=He,Ze++,a=function(){let e,r,o,a,s,n,l;e=He,t.substr(He,4)===m?(r=m,He+=4):(r=i,0===Ze&&at(oe));r!==i?(o=He,32===t.charCodeAt(He)?(a=y,He++):(a=i,0===Ze&&at(le)),a!==i?(s=Ct(),s!==i?(32===t.charCodeAt(He)?(n=y,He++):(n=i,0===Ze&&at(le)),n!==i?(t.substr(He,4)===m?(l=m,He+=4):(l=i,0===Ze&&at(oe)),l!==i?(a=[a,s,n,l],o=a):(He=o,o=i)):(He=o,o=i)):(He=o,o=i)):(He=o,o=i),o===i&&(o=null),a=Rt(),a===i&&(a=$t()),a!==i?(r=[r,o,a],e=r):(He=e,e=i)):(He=e,e=i);return e}(),Ze--,a!==i?(He=o,o=void 0):o=i,o!==i?(Ue=e,e=void Ot.handleCardSetStart()):(He=e,e=i)):(He=e,e=i);return e}(),o!==i){for(a=[],s=vt();s!==i;)a.push(s),s=vt();s=function(){let e,t,r,o,a;e=He,t=He,r=kt(),r===i&&(r=null);o=He,Ze++,a=$t(),Ze--,a!==i?(He=o,o=void 0):o=i;o!==i?(r=[r,o],t=r):(He=t,t=i);t!==i&&(Ue=e,t=void Ot.handleCardSetEnd());return e=t,e}(),s!==i?(o=[o,a,s],r=o):(He=r,r=i)}else He=r,r=i;var n;return r!==i&&(Ue=e,n=r,r=Ot.handleCardSet(n[1].flat())),e=r,e}function vt(){let e,r;var o;return e=He,r=function(){let e,r;e=He,r=function(){let e,r,o,a,s,n,l;e=He,t.substr(He,4)===m?(r=m,He+=4):(r=i,0===Ze&&at(oe));r!==i?(32===t.charCodeAt(He)?(o=y,He++):(o=i,0===Ze&&at(le)),o!==i?(a=Ct(),a!==i?(32===t.charCodeAt(He)?(s=y,He++):(s=i,0===Ze&&at(le)),s!==i?(t.substr(He,4)===m?(n=m,He+=4):(n=i,0===Ze&&at(oe)),n!==i?(l=Rt(),l===i&&(l=$t()),l!==i?(Ue=e,e=["====",a]):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i);e===i&&(e=He,t.substr(He,4)===m?(r=m,He+=4):(r=i,0===Ze&&at(oe)),r!==i?(o=Rt(),o===i&&(o=$t()),o!==i?(Ue=e,e=["===="]):(He=e,e=i)):(He=e,e=i));return e}(),r===i&&(r=function(){let e,r,o,a,s,n,l;e=He,t.substr(He,2)===b?(r=b,He+=2):(r=i,0===Ze&&at(ce));r!==i?(32===t.charCodeAt(He)?(o=y,He++):(o=i,0===Ze&&at(le)),o!==i?(a=Ct(),a!==i?(32===t.charCodeAt(He)?(s=y,He++):(s=i,0===Ze&&at(le)),s!==i?(t.substr(He,2)===b?(n=b,He+=2):(n=i,0===Ze&&at(ce)),n!==i?(l=Rt(),l===i&&(l=$t()),l!==i?(Ue=e,e=["--",a]):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i);e===i&&(e=He,t.substr(He,2)===b?(r=b,He+=2):(r=i,0===Ze&&at(ce)),r!==i?(o=Rt(),o===i&&(o=$t()),o!==i?(Ue=e,e=["--"]):(He=e,e=i)):(He=e,e=i));return e}(),r===i&&(r=function(){let e,r,o,a,s,n,l;e=He,t.substr(He,2)===k?(r=k,He+=2):(r=i,0===Ze&&at(pe));r!==i?(32===t.charCodeAt(He)?(o=y,He++):(o=i,0===Ze&&at(le)),o!==i?(a=Ct(),a!==i?(32===t.charCodeAt(He)?(s=y,He++):(s=i,0===Ze&&at(le)),s!==i?(t.substr(He,2)===k?(n=k,He+=2):(n=i,0===Ze&&at(pe)),n!==i?(l=Rt(),l===i&&(l=$t()),l!==i?(Ue=e,e=["++",a]):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i)):(He=e,e=i);e===i&&(e=He,t.substr(He,2)===k?(r=k,He+=2):(r=i,0===Ze&&at(pe)),r!==i?(o=Rt(),o===i&&(o=$t()),o!==i?(Ue=e,e=["++"]):(He=e,e=i)):(He=e,e=i));return e}(),r===i&&(r=function(){let e,r,o,a,s,n;e=He,r=He,Ze++,o=He,a=kt(),a!==i?(s=$t(),s!==i?(a=[a,s],o=a):(He=o,o=i)):(He=o,o=i);Ze--,o===i?r=void 0:(He=r,r=i);if(r!==i){if(o=He,a=He,s=Lt(),n=Nt(),n!==i?(s=[s,n],a=s):(He=a,a=i),a===i){if(a=He,s=[],n=Et(),n!==i)for(;n!==i;)s.push(n),n=Et();else s=i;s!==i?(n=Kt(),n!==i?(s=[s,n],a=s):(He=a,a=i)):(He=a,a=i)}o=a!==i?t.substring(o,He):a,o!==i?(Ue=e,l=o,e=Ot.handleCardLine(l)):(He=e,e=i)}else He=e,e=i;var l;return e}())));r!==i&&(Ue=e,o=r,r=Ot.handleCardLineOrDivider(o,2));var o;return e=r,e}(),r!==i&&(Ue=e,o=r,r=Ot.handleCards(o)),e=r,e}function Tt(){let e,r,o,a,s;if(e=He,r=He,o=function(){let e,r,o,a,s,n;e=He,r=[],o=Rt(),o===i&&(o=Nt());if(o!==i)for(;o!==i;)r.push(o),o=Rt(),o===i&&(o=Nt());else r=i;r!==i?(o=He,Ze++,a=He,t.substr(He,3)===x?(s=x,He+=3):(s=i,0===Ze&&at(de)),s!==i?(n=Rt(),n!==i?(s=[s,n],a=s):(He=a,a=i)):(He=a,a=i),Ze--,a!==i?(He=o,o=void 0):o=i,o!==i?(Ue=e,e=void Ot.handleCardSetStart()):(He=e,e=i)):(He=e,e=i);return e}(),o!==i){for(a=[],s=_t();s!==i;)a.push(s),s=_t();s=function(){let e,t,r,o,a;e=He,t=He,r=kt(),r===i&&(r=null);o=He,Ze++,a=$t(),Ze--,a!==i?(He=o,o=void 0):o=i;o!==i?(r=[r,o],t=r):(He=t,t=i);t!==i&&(Ue=e,t=void Ot.handleCardSetEnd());return e=t,e}(),s!==i?(o=[o,a,s],r=o):(He=r,r=i)}else He=r,r=i;var n;return r!==i&&(Ue=e,n=r,r=Ot.handleCardSet(n[1].flat())),e=r,e}function _t(){let e,r;var o;return e=He,r=function(){let e,r,o,a;e=He,r=He,t.substr(He,3)===x?(o=x,He+=3):(o=i,0===Ze&&at(de));o!==i?(a=Rt(),a===i&&(a=$t()),a!==i?(o=[o,a],r=o):(He=r,r=i)):(He=r,r=i);r===i&&(r=He,t.substr(He,2)===v?(o=v,He+=2):(o=i,0===Ze&&at(ue)),o!==i?(a=Rt(),a===i&&(a=$t()),a!==i?(o=[o,a],r=o):(He=r,r=i)):(He=r,r=i),r===i&&(r=He,t.substr(He,2)===b?(o=b,He+=2):(o=i,0===Ze&&at(ce)),o!==i?(a=Rt(),a===i&&(a=$t()),a!==i?(o=[o,a],r=o):(He=r,r=i)):(He=r,r=i),r===i&&(r=function(){let e,r,o,a,s,n;e=He,r=He,Ze++,o=He,a=kt(),a!==i?(s=$t(),s!==i?(a=[a,s],o=a):(He=o,o=i)):(He=o,o=i);Ze--,o===i?r=void 0:(He=r,r=i);if(r!==i){if(o=He,a=He,s=Lt(),n=Nt(),n!==i?(s=[s,n],a=s):(He=a,a=i),a===i){if(a=He,s=[],n=Et(),n!==i)for(;n!==i;)s.push(n),n=Et();else s=i;s!==i?(n=Kt(),n!==i?(s=[s,n],a=s):(He=a,a=i)):(He=a,a=i)}o=a!==i?t.substring(o,He):a,o!==i?(Ue=e,l=o,e=Ot.handleCardLine(l)):(He=e,e=i)}else He=e,e=i;var l;return e}())));r!==i&&(Ue=e,s=r,r=Ot.handleCardLineOrDivider(s,1));var s;return e=r,e}(),r!==i&&(Ue=e,o=r,r=Ot.handleCards(o)),e=r,e}function Ct(){let e,r,o;return e=He,r=He,Ze++,t.substr(He,6)===f?(o=f,He+=6):(o=i,0===Ze&&at(ne)),o===i&&(t.substr(He,4)===h?(o=h,He+=4):(o=i,0===Ze&&at(ae))),Ze--,o===i?r=void 0:(He=r,r=i),r!==i?(o=function(){let e,r,o,a,s;e=He,r=He,o=t.charAt(He),j.test(o)?He++:(o=i,0===Ze&&at(me));if(o!==i){for(a=[],s=t.charAt(He),q.test(s)?He++:(s=i,0===Ze&&at(he));s!==i;)a.push(s),s=t.charAt(He),q.test(s)?He++:(s=i,0===Ze&&at(he));o=[o,a],r=o}else He=r,r=i;e=r!==i?t.substring(e,He):r;return e}(),o!==i?(Ue=e,e=o):(He=e,e=i)):(He=e,e=i),e}function wt(){let e,r;return e=He,t.length>He?(r=t.charAt(He),He++):(r=i,0===Ze&&at(re)),r!==i&&(Ue=e,r={type:Ir.CardChar,value:r}),e=r,e}function At(){let e,r,o,a;for(e=He,r=He,o=[],t.substr(He,2)===F?(a=F,He+=2):(a=i,0===Ze&&at(Ie)),a===i&&(a=t.charAt(He),D.test(a)?He++:(a=i,0===Ze&&at(Q)));a!==i;)o.push(a),t.substr(He,2)===F?(a=F,He+=2):(a=i,0===Ze&&at(Ie)),a===i&&(a=t.charAt(He),D.test(a)?He++:(a=i,0===Ze&&at(Q)));return r=t.substring(r,He),Ue=e,e=r,e}function Bt(){let e,r,o,a,s;if(e=He,r=He,Ze++,t.substr(He,3)===K?(o=K,He+=3):(o=i,0===Ze&&at(Pe)),Ze--,o===i?r=void 0:(He=r,r=i),r!==i){for(o=He,a=[],s=t.charAt(He),M.test(s)?He++:(s=i,0===Ze&&at(Ee));s!==i;)a.push(s),s=t.charAt(He),M.test(s)?He++:(s=i,0===Ze&&at(Ee));o=t.substring(o,He),Ue=e,e=(n=o)?n.trim():""}else He=e,e=i;var n;return e}function St(){let e,r,o;if(93===t.charCodeAt(He)?(e=l,He++):(e=i,0===Ze&&at(Z)),e===i){for(e=He,r=[],o=Ft();o!==i;)r.push(o),o=Ft();o=function(){let e,r;e=He,Ze++,t.length>He?(r=t.charAt(He),He++):(r=i,0===Ze&&at(re));Ze--,r===i?e=void 0:(He=e,e=i);return e}(),o!==i?(r=[r,o],e=r):(He=e,e=i)}return e}function It(){let e,r,o,a;for(e=He,r=He,o=[],a=t.charAt(He),z.test(a)?He++:(a=i,0===Ze&&at(Ve));a!==i;)o.push(a),a=t.charAt(He),z.test(a)?He++:(a=i,0===Ze&&at(Ve));var s;return r=t.substring(r,He),Ue=e,r=(s=r)?s.trim():null,e=r,e}function Pt(){let e,r,o;var a;return e=He,58===t.charCodeAt(He)?(r=p,He++):(r=i,0===Ze&&at(ee)),r!==i?(o=At(),Ue=e,e=(a=o)?a.trim():""):(He=e,e=i),e===i&&(e=He,r="",Ue=e,r=!0,e=r),e}function Et(){let e,r;return Ze++,e=t.charAt(He),H.test(e)?He++:(e=i,0===Ze&&at(Re)),Ze--,e===i&&(r=i,0===Ze&&at(Ne)),e}function Lt(){let e,t;for(Ze++,e=[],t=Et();t!==i;)e.push(t),t=Et();return Ze--,e}function Vt(){let e,r,o;for(Ze++,e=He,r=[],o=t.charAt(He),U.test(o)?He++:(o=i,0===Ze&&at(Ke));o!==i;)r.push(o),o=t.charAt(He),U.test(o)?He++:(o=i,0===Ze&&at(Ke));return o=Nt(),o!==i?(r=[r,o],e=r):(He=e,e=i),Ze--,e===i&&(r=i,0===Ze&&at(Fe)),e}function Nt(){let e,r;return Ze++,10===t.charCodeAt(He)?(e=O,He++):(e=i,0===Ze&&at(Oe)),e===i&&(t.substr(He,2)===J?(e=J,He+=2):(e=i,0===Ze&&at(Je)),e===i&&(e=t.charAt(He),W.test(e)?He++:(e=i,0===Ze&&at(De)))),Ze--,e===i&&(r=i,0===Ze&&at($e)),e}function Rt(){let e,r,o;for(Ze++,e=He,r=[],o=t.charAt(He),U.test(o)?He++:(o=i,0===Ze&&at(Ke));o!==i;)r.push(o),o=t.charAt(He),U.test(o)?He++:(o=i,0===Ze&&at(Ke));return o=Nt(),o!==i?(r=[r,o],e=r):(He=e,e=i),Ze--,e===i&&(r=i,0===Ze&&at(je)),e}function Ft(){let e,r;return Ze++,e=t.charAt(He),G.test(e)?He++:(e=i,0===Ze&&at(Me)),Ze--,e===i&&(r=i,0===Ze&&at(qe)),e}function Kt(){let e,r;return e=Nt(),e===i&&(e=He,Ze++,t.length>He?(r=t.charAt(He),He++):(r=i,0===Ze&&at(re)),Ze--,r===i?e=void 0:(He=e,e=i)),e}function $t(){let e,r;return e=Rt(),e===i&&(e=He,Ze++,t.length>He?(r=t.charAt(He),He++):(r=i,0===Ze&&at(re)),Ze--,r===i?e=void 0:(He=e,e=i)),e}const Ot=new Nr({parse:e,parserText:Xe,parserLocation:Dt}),Jt=new Ii({parse:e,parserText:Xe,parserLocation:Dt});function Dt(){const e=ot(Ue,He);return e?(delete e.source,e):e}function ot(e,t,r){var i=it(e),a=it(t),s={source:o,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:a.line,column:a.column}};return o&&"function"==typeof o.offset&&(s.start=o.offset(s.start),s.end=o.offset(s.end)),s}Ge=s();const jt=Ge!==i&&He===t.length;function qt(){throw Ge!==i&&He<t.length&&at({type:"end"}),st(Qe,Ye<t.length?function(e=He){const r=t.codePointAt(e);return void 0===r?"":String.fromCodePoint(r)}(Ye):null,Ye<t.length?ot(Ye,Ye+1):ot(Ye,Ye))}return r.peg$library?{peg$result:Ge,peg$currPos:He,peg$FAILED:i,peg$maxFailExpected:Qe,peg$maxFailPos:Ye,peg$success:jt,peg$throw:jt?void 0:qt}:jt?Ge:void qt()},Li=class{constructor(){l(this,"jsonParser",new Br)}toAst(e,t){return Ei(e)}},Vi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ni={li:new Set(["li"]),td:new Set(["td","th"]),th:new Set(["td","th"]),tr:new Set(["td","th","tr"]),thead:new Set(["td","th","tr","thead","tbody","tfoot"]),tbody:new Set(["td","th","tr","thead","tbody","tfoot"]),tfoot:new Set(["td","th","tr","thead","tbody","tfoot"]),p:new Set(["p"]),option:new Set(["option"])},Ri=/<(\/)?([a-zA-Z][a-zA-Z0-9:-]*)((?:\s+(?:"[^"]*"|'[^']*'|[^<>"'])*)?)(\/)?>/g,Fi=/([a-zA-Z_:][a-zA-Z0-9:._-]*)(?:\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+))?/g;function Ki(e){const t={};if(!e)return t;let r;for(Fi.lastIndex=0;null!==(r=Fi.exec(e));){const e=r[1].toLowerCase();let i=r[2]??"";i.length>=2&&('"'===i[0]||"'"===i[0])&&(i=i.slice(1,-1)),t[e]=i}return t}function $i(e){const t={type:"element",name:"#root",attrs:{},children:[]},r=[t],i=()=>r[r.length-1];for(const t of function(e){const t=[],r=function(e){return e.replace(/<!--[\s\S]*?-->/g,"").replace(/<!\[CDATA\[[\s\S]*?\]\]>/g,"").replace(/<!doctype[^>]*>/gi,"").replace(/<script\b[\s\S]*?<\/script>/gi,"").replace(/<style\b[\s\S]*?<\/style>/gi,"")}(e);Ri.lastIndex=0;let i,o=0;for(;null!==(i=Ri.exec(r));){i.index>o&&t.push({kind:"text",text:r.slice(o,i.index)}),o=Ri.lastIndex;const e="/"===i[1],a=i[2].toLowerCase();e?t.push({kind:"close",name:a}):t.push({kind:"open",name:a,attrs:Ki(i[3]),selfClose:"/"===i[4]})}return o<r.length&&t.push({kind:"text",text:r.slice(o)}),t}(e))if("text"!==t.kind){if("open"===t.kind){const e=t.name,o=Ni[e];if(o)for(;r.length>1&&o.has(i().name);)r.pop();const a={type:"element",name:e,attrs:t.attrs??{},children:[]};i().children.push(a),t.selfClose||Vi.has(e)||r.push(a);continue}for(let e=r.length-1;e>0;e--)if(r[e].name===t.name){r.length=e;break}}else t.text&&i().children.push({type:"text",value:t.text});return t.children}function Oi(e,t){return e.children.filter(e=>"element"===e.type&&t.has(e.name))}var Ji={b:"bold",strong:"bold",i:"italic",em:"italic",sup:"superscript",sub:"subscript",s:"strike",strike:"strike",del:"del",ins:"ins",u:"underline",mark:"highlight",code:"code"},Di=new Set(["thead","tbody","tfoot"]),ji=new Set(["tr"]),qi=new Set(["td","th"]),Mi=new Set(["li"]),zi=new Set(["row","col","rowgroup","colgroup"]),Hi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "};function Ui(e){return e.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g,(e,t)=>{if("#"===t[0]){const r="x"===t[1]||"X"===t[1]?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);if(Number.isFinite(r)&&r>=0&&r<=1114111)try{return String.fromCodePoint(r)}catch{return e}return e}return Hi[t]??e})}function Wi(e){if(null==e)return;const t=Number.parseInt(e,10);return Number.isInteger(t)?t:void 0}function Gi(e){return"element"===e.type}var Yi=class{constructor(){l(this,"keepUnknownTags",!1)}parse(e,t){this.keepUnknownTags=t?.keepUnknownTags??!1;const r=t?.tableFormat??"table-extended",i=t?.onWarning,o=this.collectTopLevelTables($i(e)),a=[];for(const e of o){const t=this.tableToBit(e,r,i);t&&a.push(t)}return a}collectTopLevelTables(e){const t=[],r=e=>{Gi(e)&&("table"!==e.name?e.children.forEach(r):t.push(e))};return e.forEach(r),t}tableToBit(e,t,r){const i=[],o=[],a=[];let s;for(const t of e.children)if(Gi(t))if("caption"===t.name){const e=this.inlineNodes(t.children,[]),r=this.trimInline(e);r.length>0&&(s=r)}else if(Di.has(t.name)){const e="thead"===t.name?i:"tfoot"===t.name?a:o;for(const r of Oi(t,ji))e.push(this.rowToCells(r))}else ji.has(t.name)&&o.push(this.rowToCells(t));if(0===i.length&&0===o.length&&0===a.length)return;const n={};i.length>0&&(n.header={rows:i}),o.length>0&&(n.body={rows:o}),a.length>0&&(n.footer={rows:a});let l=n;"table"===t&&(this.isLossyAsBasic(n)&&r?.("Converting an HTML table to [.table] loses rowspan/colspan/scope and multi-section structure; use --tableFormat table-extended to preserve them."),l=vt(n));const c={type:t,format:"bitmark++",table:l};return s&&(c.caption=s),c}rowToCells(e){const t=[];for(const r of Oi(e,qi))t.push(this.cellToJson(r));return{cells:t}}cellToJson(e){const t={content:this.blockNodes(e.children)};"th"===e.name&&(t.title=!0);const r=Wi(e.attrs.rowspan);null!=r&&r>=2&&(t.rowspan=r);const i=Wi(e.attrs.colspan);null!=i&&i>=2&&(t.colspan=i);const o=e.attrs.scope?.toLowerCase();o&&zi.has(o)&&(t.scope=o);const a=this.widthFromCell(e);return null!=a&&(t.colwidth=a),t}widthFromCell(e){const t=Wi(e.attrs.width);if(null!=t&&t>0)return t;const r=e.attrs.style;if(r){const e=r.match(/width\s*:\s*(\d+)\s*px/i);if(e){const t=Number.parseInt(e[1],10);if(Number.isInteger(t)&&t>0)return t}}}isLossyAsBasic(e){if(e.footer)return!0;if(e.header&&e.header.rows.length>1)return!0;const t=[e.header,e.body,e.footer];for(const e of t)if(e)for(const t of e.rows)for(const e of t.cells)if(e.rowspan||e.colspan||e.scope)return!0;return!1}blockNodes(e){const t=[];let r=[];const i=()=>{const e=this.trimInline(r);r=[],0!==e.length&&(1===e.length&&"imageInline"===e[0].type?t.push({...e[0],type:"image"}):t.push({type:"paragraph",content:e,attrs:{}}))};for(const o of e){if(!Gi(o)){r.push(...this.inlineText(o.value,[]));continue}const e=o.name;if("p"===e){i();const e=this.trimInline(this.inlineNodes(o.children,[]));e.length>0&&t.push({type:"paragraph",content:e,attrs:{}})}else if(this.isListTag(e)){i();const e=this.listNode(o);e&&t.push(e)}else r.push(...this.inlineFromElement(o,[]))}return i(),t}inlineNodes(e,t){const r=[];for(const i of e)Gi(i)?r.push(...this.inlineFromElement(i,t)):r.push(...this.inlineText(i.value,t));return r}inlineFromElement(e,t){const r=e.name;if("br"===r)return[{type:"hardBreak"}];if("img"===r)return[this.imageNode(e,!0)];if(this.isMathTag(r))return[this.latexNode(e)];const i=Ji[r];if(i)return this.inlineNodes(e.children,[...t,{type:i}]);if("a"===r){const r={type:"link",attrs:{href:e.attrs.href??"",...e.attrs.target?{target:e.attrs.target}:{}}};return this.inlineNodes(e.children,[...t,r])}if(this.keepUnknownTags){const i=this.serializeOpenTag(e),o=`</${r}>`;return[...this.inlineText(i,t),...this.inlineNodes(e.children,t),...this.inlineText(o,t)]}return this.inlineNodes(e.children,t)}inlineText(e,t){const r=Ui(e).replace(/\s+/g," ");if(""===r)return[];const i={text:r,type:"text"};return t.length>0&&(i.marks=t.map(e=>({...e}))),[i]}serializeOpenTag(e){const t=Object.entries(e.attrs).map(([e,t])=>""===t?` ${e}`:` ${e}="${t}"`).join("");return`<${e.name}${t}>`}isListTag(e){return"ul"===e||"ol"===e}listNode(e){const t=Oi(e,Mi);if(0===t.length)return;if("ul"===e.name&&t.some(e=>{const t=e.children.find(Gi);return"input"===t?.name&&"checkbox"===t.attrs.type?.toLowerCase()}))return{type:"taskList",content:t.map(e=>this.taskItemNode(e))};const r={type:this.listType(e),content:t.map(e=>this.listItemNode(e))};if("ol"===e.name){const t=Wi(e.attrs.start);null!=t&&(r.attrs={start:t})}return r}listType(e){if("ol"===e.name)switch(e.attrs.type){case"i":return"orderedListRomanLower";case"I":return"orderedListRoman";case"a":return"letteredListLower";case"A":return"letteredList";default:return"orderedList"}const t=e.attrs.style??"";return/list-style(-type)?\s*:\s*none/i.test(t)?"noBulletList":"bulletList"}listItemNode(e){let t=this.blockNodes(e.children);return 0===t.length&&(t=[{type:"paragraph",content:[],attrs:{}}]),{type:"listItem",content:t}}taskItemNode(e){const t=e.children.find(e=>Gi(e)&&"input"===e.name&&"checkbox"===e.attrs.type?.toLowerCase()),r=!!t&&"checked"in t.attrs,i=e.children.filter(e=>e!==t);let o=this.blockNodes(i);return 0===o.length&&(o=[{type:"paragraph",content:[],attrs:{}}]),{type:"taskItem",attrs:{checked:r},content:o}}imageNode(e,t){const r={src:e.attrs.src??""};r.alt=e.attrs.alt??null,r.title=e.attrs.title??null;const i=Wi(e.attrs.width);null!=i&&(r.width=i);const o=Wi(e.attrs.height);return null!=o&&(r.height=o),e.attrs.class&&(r.class=e.attrs.class),{type:t?"imageInline":"image",attrs:r}}isMathTag(e){return"math"===this.localName(e)}latexNode(e){return{type:"latex",attrs:{formula:this.latexFromMath(e)}}}latexFromMath(e){const t=e.attrs.alttext??e.attrs.alt??e.attrs.title;if(null!=t)return Ui(t);const r=this.findLatexAnnotation(e);return r?this.textContent(r).trim():this.textContent(e).trim()}findLatexAnnotation(e){for(const t of e.children){if(!Gi(t))continue;const e=(t.attrs.encoding??"").toLowerCase();if("annotation"===this.localName(t.name)&&(/\btex\b/.test(e)||/\blatex\b/.test(e)))return t;const r=this.findLatexAnnotation(t);if(r)return r}}textContent(e){return e.children.map(e=>Gi(e)?this.textContent(e):Ui(e.value)).join("").replace(/\s+/g," ")}localName(e){return e.includes(":")?e.slice(e.indexOf(":")+1):e}trimInline(e){const t=e.slice(),r=e=>"text"===e.type&&/^\s*$/.test(e.text??"");for(;t.length>0&&r(t[0]);)t.shift();for(t.length>0&&"text"===t[0].type&&(t[0]={...t[0],text:(t[0].text??"").replace(/^\s+/,"")});t.length>0&&r(t[t.length-1]);)t.pop();if(t.length>0&&"text"===t[t.length-1].type){const e=t.length-1;t[e]={...t[e],text:(t[e].text??"").replace(/\s+$/,"")}}return t.filter(e=>!("text"===e.type&&""===e.text))}},Qi={string:"string",file:"file"},Zi={bitmark:"bitmark",json:"json",ast:"ast",text:"text"},Xi={bitmark:"bitmark",bitmarkText:"bitmarkText",plainText:"plainText",html:"html"},eo=class{constructor(){l(this,"ast",new Ge),l(this,"jsonParser",new Br),l(this,"bitmarkParser",new Li),l(this,"textParser",new Gt),l(this,"textGenerator",new Dt),l(this,"jsonStringifyPrettify",(e,t,r)=>{const i=!0===t.prettify?2:t.prettify||void 0;return r||!0===t.stringify||void 0!==i?JSON.stringify(e,null,i):e})}version(){return Je.appVersion.full}info(e){const t=Object.assign({},e),r=new vr;let i;const o=!t.outputFormat||t.outputFormat===_r.text,a=t.outputFormat===_r.json,s=t.type===Cr.all,n=t.type===Cr.deprecated,l=s||!n,c=s||n;if(t.type===Cr.bit){const e=r.getSupportedBitConfigs().filter(e=>{if(!t.bit)return!0;return Be.getBitType(t.bit)===e.bitType});i=o?e.map(e=>e.toString({includeChains:!0,includeConfigs:!0})).join("\n\n--------------\n\n"):e}else{const e=r.getSupportedBits({includeNonDeprecated:l,includeDeprecated:c}).filter(e=>{if(!t.bit)return!0;const r=Be.getBitType(t.bit);return e.name===r||void 0});i=o?this.supportedBitsAsString(e):e}if(a){const e=!0===t.prettify?2:t.prettify||void 0;i=JSON.stringify(i,null,e)}return i}generateConfig(e){const t=Object.assign({},e);(new ConfigBuilder).build(t)}convert(e,t){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),a=i.outputFormat,s=a===Zi.bitmark,n=a===Zi.json,l=a===Zi.ast,c=a===Zi.text,p=Tr.peggy;let d=e;const u="string"==typeof e;if(Je.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");i.inputFormat&&i.inputFormat!==Qi.file||Je.isNode&&u&&fs.existsSync(d)&&(d=fs.readFileSync(d,{encoding:"utf8"}));let m=this.ast.preprocessAst(d);const h=!!m;h||(m=this.jsonParser.toAst(d));const g=!!m?.bits,f=e=>{r=this.bitmarkParser.toAst(e,{parserType:p})},y=e=>{if(p===Tr.peggy)if(m=this.bitmarkParser.toAst(e,{parserType:p}),i.outputFile){new JsonFileGenerator(i.outputFile,i).generateSync(m)}else{const e=new kr(i).generateSync(m);r=this.jsonStringifyPrettify(e,o)}},b=e=>{m=this.bitmarkParser.toAst(e,{parserType:p});const t=new kr(i).generateSync(m),o=(new PlainTextGenerator).generate(t);i.outputFile?fs.writeFileSync(i.outputFile,o,{encoding:"utf8"}):r=o},k=e=>{if(i.outputFile){new BitmarkFileGenerator(i.outputFile,i).generateSync(e)}else{const t=new ur(i);r=t.generateSync(e)}},x=e=>{r=this.jsonStringifyPrettify(e,o)},v=e=>{if(i.outputFile){new JsonFileGenerator(i.outputFile,i).generateSync(e)}else{const t=new kr(i).generateSync(e);r=this.jsonStringifyPrettify(t,o)}},T=e=>{r=this.jsonStringifyPrettify(e,o)};return u&&!g&&!h?s?(f(d),k(r)):l?f(d):c?b(d):y(d):h?l?x(m):n?v(m):c?(e=>{const t=new kr(i).generateSync(e),o=(new PlainTextGenerator).generate(t);i.outputFile?fs.writeFileSync(i.outputFile,o,{encoding:"utf8"}):r=o})(m):k(m):g?n?v(m):l?T(m):c?(e=>{const t=new kr(i).generateSync(e),o=(new PlainTextGenerator).generate(t);i.outputFile?fs.writeFileSync(i.outputFile,o,{encoding:"utf8"}):r=o})(m):(e=>{if(i.outputFile)new BitmarkFileGenerator(i.outputFile,i).generateSync(e);else{const t=new ur(i);r=t.generateSync(e)}})(m):r="",r}upgrade(e,t){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),a=i.bitmarkParserType;let s=e;const n="string"==typeof e;if(Je.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");i.inputFormat&&i.inputFormat!==Qi.file||Je.isNode&&n&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));let l=this.jsonParser.toAst(s);const c=!!l?.bits,p=e=>{if(i.outputFile){new JsonFileGenerator(i.outputFile,i).generateSync(e)}else{const t=new kr(i).generateSync(e);r=this.jsonStringifyPrettify(t,o)}};if(n&&!c)(e=>{const t=this.bitmarkParser.toAst(e,{parserType:a});if(i.outputFile){new BitmarkFileGenerator(i.outputFile,i).generateSync(t)}else{const e=new ur(i);r=e.generateSync(t)}})(s);else{if(!c)return;p(l)}return r}createAst(e,t){let r,i=e;const o="string"==typeof e,a=Object.assign({},t);a.inputFormat&&a.inputFormat!==Qi.file||Je.isNode&&o&&fs.existsSync(i)&&(i=fs.readFileSync(i,{encoding:"utf8"}));let s=this.ast.preprocessAst(i);const n=!!s;n||(s=this.jsonParser.toAst(i));const l=!!s?.bits;return r=o&&!l&&!n?this.bitmarkParser.toAst(i):l?s:{},r}convertText(e,t){let r,i;const o=Object.assign({},t),a=Object.assign({},o.fileOptions),s=Object.assign({},o.jsonOptions),n=(0,nr.Enum)(TextFormat).fromValue(o.textFormat)??TextFormat.bitmarkText,l=o.textLocation??TextLocation.body;let c=e;const p="string"==typeof e;if(Je.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==Qi.file||Je.isNode&&p&&fs.existsSync(c)&&(c=fs.readFileSync(c,{encoding:"utf8"}));const d=this.textParser.preprocessAst(c),u=!!d;if(i=u?this.textGenerator.generateSync(d,n,l):this.textParser.toAst(c,{format:n,location:TextLocation.body}),o.outputFile){const e=o.outputFile.toString();let t=i;u||(t=this.jsonStringifyPrettify(i,s,!0));const r=a.append?"a":"w";fs.ensureDirSync(path.dirname(e)),fs.writeFileSync(e,t,{flag:r})}else r=u?i:this.jsonStringifyPrettify(i,s);return r}extractPlainText(e,t){const r=e,i=t?.inputFormat,o="string"==typeof e;let a;const s=()=>{let e=r;if("string"==typeof r)try{e=JSON.parse(r)}catch(t){let i=!1;const o=this.convert(r,{outputFormat:Zi.json});if(o.length>0){o[0].bit.type===BitType._error||(i=!0,e=o)}i||(e=this.convertText(r,{textFormat:TextFormat.bitmarkText}))}return e};i===Xi.bitmark?a=this.convert(r,{outputFormat:Zi.json}):i===Xi.bitmarkText?a=this.convertText(r,{textFormat:TextFormat.bitmarkText}):i===Xi.plainText?o&&(a=String(e)):a=s();return(new PlainTextGenerator).generate(a)}convertHtmlTable(e,t){const r=Object.assign({},t);if(Je.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");let i=e;const o="string"==typeof e;Je.isNode&&o&&fs.existsSync(i)&&(i=fs.readFileSync(i,{encoding:"utf8"}));let a;if(a=r.inputFormat===Xi.html||null==r.inputFormat&&(o&&(e=>{const t=e.replace(/^\s+/,"");return t.startsWith("<")&&/<table/i.test(t)})(i)),a){const e=(new Yi).parse(i,{tableFormat:r.tableFormat??"table-extended",keepUnknownTags:r.keepUnknownTags,onWarning:e=>console.warn(e)}),t=r.outputFormat??Zi.bitmark;if("html"===t){const t=this.convert(e,{outputFormat:Zi.json});return this.outputHtml((new gr).generate(t),r)}return this.convert(e,{outputFormat:(0,nr.Enum)(Zi).fromValue(t),outputFile:r.outputFile,fileOptions:r.fileOptions,jsonOptions:r.jsonOptions,bitmarkOptions:{...r.bitmarkOptions,...r.noBreakscaping?{noBreakscaping:!0}:{}}})}if("html"!==(r.outputFormat??"html"))throw new Error("convertHtmlTable: non-HTML input can only be converted to HTML. Use convert() for bitmark/JSON/AST conversions.");const s=this.convert(o?i:e,{outputFormat:Zi.json});return this.outputHtml((new gr).generate(s),r)}outputHtml(e,t){if(t.outputFile){const r=t.outputFile.toString(),i=t.fileOptions?.append?"a":"w";return fs.ensureDirSync(path.dirname(r)),void fs.writeFileSync(r,e,{flag:i})}return e}breakscapeText(e,t){if(!e)return e;const r=Object.assign({},t),i=Object.assign({},r.fileOptions),o=(0,nr.Enum)(TextFormat).fromValue(r.textFormat)??TextFormat.bitmarkText,a=r.textLocation??TextLocation.body;let s=e;const n="string"==typeof e;if(Je.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");r.inputFormat&&r.inputFormat!==Qi.file||Je.isNode&&n&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));const l=Breakscape.breakscape(s,{format:o,location:a});if(!r.outputFile)return l;{const e=r.outputFile.toString(),t=i.append?"a":"w";fs.ensureDirSync(path.dirname(e)),fs.writeFileSync(e,l,{flag:t})}}unbreakscapeText(e,t){if(!e)return e;const r=Object.assign({},t),i=Object.assign({},r.fileOptions),o=(0,nr.Enum)(TextFormat).fromValue(r.textFormat)??TextFormat.bitmarkText,a=r.textLocation??TextLocation.body;let s=e;const n="string"==typeof e;if(Je.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");r.inputFormat&&r.inputFormat!==Qi.file||Je.isNode&&n&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));const l=Breakscape.unbreakscape(s,{format:o,location:a});if(!r.outputFile)return l;{const e=r.outputFile.toString(),t=i.append?"a":"w";fs.ensureDirSync(path.dirname(e)),fs.writeFileSync(e,l,{flag:t})}}textAstToPlainText(e,t){return new Dt(wt.v3,{}).generateSync(e,TextFormat.bitmarkText,TextLocation.body,{noBreakscaping:!0,noMarkup:!0})}supportedBitsAsString(e){let t="";for(const r of e)t+=`${r.name} (since: ${r.since}`,r.deprecated&&(t+=`, deprecated: ${r.deprecated}`),t+=")\n";return t}},to=class{constructor(e){l(this,"generator"),l(this,"writer"),this.writer=new sr,this.generator=new br(this.writer,e)}async generate(e){return await this.generator.generate(e),this.writer.getString()}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}};function ro(e){return Array.isArray(e)&&4===e.length&&e.every(Number.isFinite)?[e[0],e[1],e[2],e[3]]:null}function io(e){if(null==e)return[];if(!Array.isArray(e)||0===e.length)return[];const t=e.some(Array.isArray)?e:[e],r=[];for(const e of t){const t=ro(e);t&&r.push(t)}return r}function oo(e,t){return e[0]<t[2]&&e[2]>t[0]&&e[1]<t[3]&&e[3]>t[1]}var ao=class e{constructor(e){l(this,"_entries"),l(this,"bitmarkParser",new eo),this._entries=e}static fromBits(t,r){const i=r?.sourceRL,o=[];for(const e of t){if(!e?.bit)continue;if(void 0!==i&&e.bit.sourceRL!==i)continue;const t=io(e.bit.sourceBB);0!==t.length&&o.push({bit:e.bit,wrapper:e,boxes:t})}return new e(o)}get entries(){return this._entries}intersecting(e){const t=[];for(const r of this._entries)r.boxes.some(t=>oo(e,t))&&t.push(r);return t}intersectingBoxes(e){const t=[];for(const r of this._entries)for(const i of r.boxes)oo(e,i)&&t.push(i);return t}enclosingBoundingBox(e){return function(e){if(0===e.length)return null;let[t,r,i,o]=e[0];for(let a=1;a<e.length;a++){const s=e[a];s[0]<t&&(t=s[0]),s[1]<r&&(r=s[1]),s[2]>i&&(i=s[2]),s[3]>o&&(o=s[3])}return[t,r,i,o]}(this.intersectingBoxes(e))}toBitmark(e){if(0===e.length)return"";const t=e.map(e=>e.wrapper);return this.bitmarkParser.convert(t,{outputFormat:Zi.bitmark,bitmarkOptions:{prettifyJson:!0}})}};qe()},722(e){var t,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var i in t)r(e,i,{get:t[i],enumerable:!0})})(s,{Enum:()=>l}),e.exports=(t=s,((e,t,s,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))a.call(e,l)||l===s||r(e,l,{get:()=>t[l],enumerable:!(n=i(t,l))||n.enumerable});return e})(r({},"__esModule",{value:!0}),t));var n=new WeakMap;function l(e){let t=n.get(e);const r=e;if(!t){const i=[];for(const t in e){const e=Number(t);!isNaN(e)&&r[r[e]]===e||i.push(t)}const o={_keys:i,_valueKeyMap:new Map};for(const e of o._keys){const t=r[e];o._valueKeyMap.set(t,e)}n.set(e,o),t=o}function i(){const e=new Map;for(const i of t._keys){const t=r[i];e.set(i,t)}return t._keyValueMap=e,e}function o(){const e=new Map;for(const i of t._keys){const t=r[i],o="string"==typeof t?t.toLowerCase():t;e.set(o,i)}return t._lcValueKeyMap=e,e}function a(){const e=new Map;return t._valueLabelMap=e,e}function s(e,r){if(r?.ignoreCase&&"string"==typeof e){const r=t._keyValueMap??i(),a=(t._lcValueKeyMap??o()).get(e.toLowerCase());if(!a)return;return r.get(a)}if(t._valueKeyMap.has(e))return e}function l(e,o){const a=t._keyValueMap??i();if(o?.ignoreCase&&"string"==typeof e){const i=t._lcKeyValueMap??function(){const e=new Map;for(const i of t._keys){const t=r[i];e.set(i.toLowerCase(),t)}return t._lcKeyValueMap=e,e}();return i.get(e.toLowerCase())}return a.get(`${e}`)}function c(){return t._values??function(){const e=t._keyValueMap??i();return t._values=t._keys.map(t=>e.get(t)),t._values}()}function p(){return t._entries??function(){const e=t._keyValueMap??i();return t._entries=t._keys.map(t=>[t,e.get(t)]),t._entries}()}return{fromValue:s,fromKey:l,keyFromValue:function(e,r){if(r?.ignoreCase&&"string"==typeof e){return(t._lcValueKeyMap??o()).get(e.toLowerCase())}return t._valueKeyMap.get(e)},hasKey:function(e,t){return null!=l(e,t)},hasValue:function(e,t){return null!=s(e,t)},keys:()=>t._keys,values:()=>c(),entries:()=>p(),[Symbol.iterator]:function*(){for(const e of c())yield e},setAllLabels:function(e){const r=t._valueLabelMap??a();for(const[t,i]of Object.entries(e)){const e=s(t);null!=e&&r.set(e,i)}},setLabels:function(e,r){(t._valueLabelMap??a()).set(e,r)},getLabels:function(e){return(t._valueLabelMap??a()).get(e)??{}},getLabel:function(e,r){const i=(t._valueLabelMap??a()).get(e)??{};if(!r)for(const t of Object.values(i))return t??`${e}`;return i[r]??`${e}`}}}l.fromArray=e=>{let t=e;Array.isArray(t)||(t=[]);return t.reduce((e,t)=>(e[t]=t,e),{})}}};const t={};let r=function r(i){const o=t[i];if(void 0!==o)return o.exports;const a=t[i]={exports:{}};return e[i](a,a.exports,r),a.exports}(922);return r})());