@gmb/bitmark-parser-generator 1.6.3 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/cjs/ast/Builder.js +2 -2
- package/dist/cjs/ast/Builder.js.map +1 -1
- package/dist/cjs/breakscaping/Breakscape.js +4 -3
- package/dist/cjs/breakscaping/Breakscape.js.map +1 -1
- package/dist/cjs/config/raw/bits.js +4 -0
- package/dist/cjs/config/raw/bits.js.map +1 -1
- package/dist/cjs/config/raw/groups.js +14 -0
- package/dist/cjs/config/raw/groups.js.map +1 -1
- package/dist/cjs/config/raw/properties.js +13 -0
- package/dist/cjs/config/raw/properties.js.map +1 -1
- package/dist/cjs/generated/build-info.js +1 -1
- package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +145 -90
- package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -1
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js +9 -2
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -1
- package/dist/cjs/generator/json/JsonGenerator.js +9 -0
- package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
- package/dist/cjs/model/ast/NodeType.js +6 -0
- package/dist/cjs/model/ast/NodeType.js.map +1 -1
- package/dist/cjs/model/config/enum/PropertyConfigKey.js +3 -0
- package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +41 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +8 -4
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js +2 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +1 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -1
- package/dist/cjs/parser/json/JsonParser.js +2 -2
- package/dist/cjs/parser/json/JsonParser.js.map +1 -1
- package/dist/esm/ast/Builder.js +2 -2
- package/dist/esm/ast/Builder.js.map +1 -1
- package/dist/esm/breakscaping/Breakscape.js +4 -3
- package/dist/esm/breakscaping/Breakscape.js.map +1 -1
- package/dist/esm/config/raw/bits.js +4 -0
- package/dist/esm/config/raw/bits.js.map +1 -1
- package/dist/esm/config/raw/groups.js +14 -0
- package/dist/esm/config/raw/groups.js.map +1 -1
- package/dist/esm/config/raw/properties.js +13 -0
- package/dist/esm/config/raw/properties.js.map +1 -1
- package/dist/esm/generated/build-info.js +1 -1
- package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +145 -90
- package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -1
- package/dist/esm/generator/bitmark/BitmarkGenerator.js +9 -2
- package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -1
- package/dist/esm/generator/json/JsonGenerator.js +9 -0
- package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
- package/dist/esm/model/ast/NodeType.js +6 -0
- package/dist/esm/model/ast/NodeType.js.map +1 -1
- package/dist/esm/model/config/enum/PropertyConfigKey.js +3 -0
- package/dist/esm/model/config/enum/PropertyConfigKey.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +41 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +8 -4
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js +2 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +1 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -1
- package/dist/esm/parser/json/JsonParser.js +2 -2
- package/dist/esm/parser/json/JsonParser.js.map +1 -1
- package/dist/types/ast/Builder.d.ts +3 -0
- package/dist/types/ast/Builder.d.ts.map +1 -1
- package/dist/types/breakscaping/Breakscape.d.ts.map +1 -1
- package/dist/types/config/raw/bits.d.ts.map +1 -1
- package/dist/types/config/raw/groups.d.ts.map +1 -1
- package/dist/types/config/raw/properties.d.ts.map +1 -1
- package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +1 -1
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +1 -0
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -1
- package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
- package/dist/types/model/ast/NodeType.d.ts +12 -0
- package/dist/types/model/ast/NodeType.d.ts.map +1 -1
- package/dist/types/model/ast/Nodes.d.ts +3 -0
- package/dist/types/model/ast/Nodes.d.ts.map +1 -1
- package/dist/types/model/config/enum/ConfigKey.d.ts +6 -0
- package/dist/types/model/config/enum/ConfigKey.d.ts.map +1 -1
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts +9 -0
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +1 -1
- package/dist/types/model/enum/PropertyTag.d.ts +6 -0
- package/dist/types/model/enum/PropertyTag.d.ts.map +1 -1
- package/dist/types/model/json/BitJson.d.ts +3 -0
- package/dist/types/model/json/BitJson.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts +10 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +2 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +1 -1
- package/dist/types/parser/json/JsonParser.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!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={4718:(e,t,r)=>{function i(e,t){var r;const i=Object.freeze,o=Object.defineProperty,n=Object.assign,a={enumerable:!1},s=new Map,l=new Map,u=new Map,p=new Map,c=new Map,g=(null!==(r=null==t?void 0:t.iterationKeys)&&void 0!==r?r:Object.keys(e)).map((e=>`${e}`));for(const[t,r]of Object.entries(e))s.set(t,r),u.set(t.toLowerCase(),r);for(const[e,t]of s){const r="string"==typeof t?t.toLowerCase():t;l.set(t,e),p.set(r,e)}const y=g.map((e=>s.get(e))),d=g.map((e=>[e,s.get(e)]));return(t=>{let r=e;function f(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?s.get(p.get(e.toLowerCase())):!e||l.has(e)?e:void 0}Object.isExtensible(e)||(r=n({},e)),o(r,"fromKey",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?u.get(e.toLowerCase()):s.get(`${e}`)}},a)),o(r,"fromValue",n({value:f},a)),o(r,"keyFromValue",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?p.get(e.toLowerCase()):l.get(e)}},a)),o(r,"setMetadata",n({value:function(e,t,r){const i=f(e);i&&c.set(i,t)}},a)),o(r,"getMetadata",n({value:function(e,t){return c.get(e)}},a)),o(r,Symbol.iterator,n({value:function(){let e=0;return{next:()=>e<g.length?{value:s.get(`${g[e++]}`),done:!1}:{done:!0}}}},a)),o(r,"values",n({value:()=>y},a)),o(r,"keys",n({value:()=>g},a)),o(r,"entries",n({value:()=>d},a));let m=r;return(null==t?void 0:t.noFreeze)||(m=i(r),i(g),i(y),i(d)),m})(t)}r.r(t),r.d(t,{superenum:()=>o});const o=i;o.fromObject=i,o.fromArray=function(e,t){Array.isArray(e)||(e=[]);const r=e.reduce(((e,t)=>(e[`${t}`]=t,e)),{});return(!t||t&&!t.iterationKeys)&&((t=Object.assign({},t)).iterationKeys=e),i(r,t)}},1791:function(e,t,r){var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,o)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=(this&&this.__importStar,this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))});this&&this.__importDefault;Object.defineProperty(t,"__esModule",{value:!0}),t.Output=t.BitmarkParserGenerator=void 0;const a=r(4718),s=r(5126),l=r(3968),u=r(7984),p=r(8588),c=r(5633),g=r(5663),y=r(6936),d=r(3881),f=r(486),m=r(3069),h=r(2028),T=r(385),b=r(431),v=r(777),B=(0,a.superenum)({bitmark:"bitmark",json:"json",ast:"ast"});t.Output=B;t.BitmarkParserGenerator=class{constructor(){this.ast=new s.Ast,this.jsonParser=new g.JsonParser,this.bitmarkParser=new c.BitmarkParser,this.textParser=new v.TextParser,this.textGenerator=new b.TextGenerator,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 y.env.appVersion.full}info(e){const t=Object.assign({},e),r=new d.InfoBuilder;let i;const o=!t.outputFormat||t.outputFormat===m.InfoFormat.text,n=t.outputFormat===m.InfoFormat.json,a=t.type===f.InfoType.all,s=t.type===f.InfoType.deprecated,l=a||!s,u=a||s;if(t.type===f.InfoType.bit){const e=r.getSupportedBitConfigs().filter((e=>{if(!t.bit)return!0;return h.Config.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:u}).filter((e=>{if(!t.bit)return!0;const r=h.Config.getBitType(t.bit);return e.name===r||void 0}));i=o?this.supportedBitsAsString(e):e}if(n){const e=!0===t.prettify?2:t.prettify||void 0;i=JSON.stringify(i,null,e)}return i}convert(e,t){return n(this,void 0,void 0,(function*(){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),a=i.outputFormat,s=a===B.bitmark,c=a===B.json,g=a===B.ast,d=p.BitmarkParserType.peggy;let f=e;if(y.env.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");y.env.isNode&&fs.existsSync(f)&&(f=fs.readFileSync(f,{encoding:"utf8"}));let m=this.ast.preprocessAst(f);const h=!!m;h||(m=this.jsonParser.toAst(f));const T=!!(null==m?void 0:m.bits),b=e=>n(this,void 0,void 0,(function*(){yield v(e),yield P(r)})),v=e=>n(this,void 0,void 0,(function*(){r=this.bitmarkParser.toAst(e,{parserType:d})})),C=e=>n(this,void 0,void 0,(function*(){if(d===p.BitmarkParserType.peggy)if(m=this.bitmarkParser.toAst(e,{parserType:d}),i.outputFile){const e=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield e.generate(m)}else{const e=new u.JsonObjectGenerator(i),t=yield e.generate(m);r=this.jsonStringifyPrettify(t,o)}})),P=e=>n(this,void 0,void 0,(function*(){if(i.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new l.BitmarkStringGenerator(i);r=yield t.generate(e)}})),k=e=>n(this,void 0,void 0,(function*(){r=this.jsonStringifyPrettify(e,o)})),x=e=>n(this,void 0,void 0,(function*(){if(i.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new u.JsonObjectGenerator(i),n=yield t.generate(e);r=this.jsonStringifyPrettify(n,o)}})),S=e=>n(this,void 0,void 0,(function*(){if(i.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new l.BitmarkStringGenerator(i);r=yield t.generate(e)}})),K=e=>n(this,void 0,void 0,(function*(){r=this.jsonStringifyPrettify(e,o)})),w=e=>n(this,void 0,void 0,(function*(){yield x(e)}));return!T&&!h?s?yield b(f):g?yield v(f):yield C(f):h?g?yield k(m):c?yield x(m):yield P(m):c?yield w(m):g?yield K(m):yield S(m),r}))}upgrade(e,t){return n(this,void 0,void 0,(function*(){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),a=i.bitmarkParserType;let s=e;if(y.env.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");y.env.isNode&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));let p=this.jsonParser.toAst(s);const c=e=>n(this,void 0,void 0,(function*(){const t=this.bitmarkParser.toAst(e,{parserType:a});if(i.outputFile){const e=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield e.generate(t)}else{const e=new l.BitmarkStringGenerator(i);r=yield e.generate(t)}})),g=e=>n(this,void 0,void 0,(function*(){if(i.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new u.JsonObjectGenerator(i),n=yield t.generate(e);r=this.jsonStringifyPrettify(n,o)}}));return!!!(null==p?void 0:p.bits)?yield c(s):yield g(p),r}))}createAst(e){let t,r=e;y.env.isNode&&fs.existsSync(r)&&(r=fs.readFileSync(r,{encoding:"utf8"}));let i=this.ast.preprocessAst(r);const o=!!i;o||(i=this.jsonParser.toAst(r));return t=!!!(null==i?void 0:i.bits)&&!o?this.bitmarkParser.toAst(r):i,t}convertText(e,t){return n(this,void 0,void 0,(function*(){var r;let i,o;const n=Object.assign({},t),a=Object.assign({},n.fileOptions),s=Object.assign({},n.jsonOptions),l=null!==(r=n.textFormat)&&void 0!==r?r:T.TextFormat.bitmarkMinusMinus;let u=e;if(y.env.isBrowser&&n.outputFile)throw new Error("Cannot write to file in browser environment");y.env.isNode&&fs.existsSync(u)&&(u=fs.readFileSync(u,{encoding:"utf8"}));const p=this.textParser.preprocessAst(u),c=!!p;if(o=c?yield this.textGenerator.generate(p,l):this.textParser.toAst(u,{textFormat:l}),n.outputFile){const e=n.outputFile.toString();let t=o;c||(t=this.jsonStringifyPrettify(o,s,!0));const r=a.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,t,{flag:r})}else i=c?o:this.jsonStringifyPrettify(o,s);return i}))}breakscapeText(e,t){if(!e)return e;const r=Object.assign({},t),i=Object.assign({},r.fileOptions);let o=e;if(y.env.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");y.env.isNode&&fs.existsSync(o)&&(o=fs.readFileSync(o,{encoding:"utf8"}));const n=Breakscape_1.Breakscape.breakscape(o,{});if(!r.outputFile)return n;{const e=r.outputFile.toString(),t=i.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,n,{flag:t})}}unbreakscapeText(e,t){if(!e)return e;const r=Object.assign({},t),i=Object.assign({},r.fileOptions);let o=e;if(y.env.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");y.env.isNode&&fs.existsSync(o)&&(o=fs.readFileSync(o,{encoding:"utf8"}));const n=Breakscape_1.Breakscape.unbreakscape(o);if(!r.outputFile)return n;{const e=r.outputFile.toString(),t=i.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,n,{flag:t})}}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}}},5126:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ast=void 0;const i=r(1412),o=r(126),n=r(9681);t.Ast=class{constructor(){(0,i.init)()}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=o.NodeType.bitmarkAst){this.walkRecursive(e,[{index:0,key:t,value:e}],{enter:(e,t)=>{if(console.log("Enter: "+this.getRouteKey(t)),t[t.length-1].key===o.NodeType.bodyJson)return!1},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(n.StringUtils.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:n,exit:a,leaf:s}=r,l=t[t.length-1].key,u=!this.isValue(e),p=t[t.length-1];if(u){if(o){if(!1===o(p,t,i))return}}else s&&s(p,t,i);if(u){const o=this.isArray(e),a=Object.keys(e);for(let s=0,u=a.length;s<u;s++){const c=a[s],g=s===u-1,y=e,d=y[c];if(null!=d){const e={key:this.getAstKey(c,l,o),index:s,value:d},u=t.slice();if(u.push(e),this.walkRecursive(d,u,r,i),!g){const r=a[s+1],u=y[r],c={key:this.getAstKey(r,l,o),index:s+1,value:u};if(n){if(!1===n(p,e,c,t,i))break}}}}}u&&a&&a(p,t,i)}getAstKey(e,t,r){let i=e;return r&&t&&(i=`${t}Value`),o.NodeType.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)}}},4470:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseBuilder=void 0;const i=r(7735),o=r(2028),n=r(9727),a=r(6989),s=r(4078),l=r(8025),u=r(9681);t.BaseBuilder=class{toExample(e,t){return null!=t?(!0===t&&(t=i.Breakscape.breakscape("true")),!1===t&&(t=i.Breakscape.breakscape("false")),{isDefaultExample:!1,isExample:!0,example:t}):e?{isDefaultExample:!0,isExample:!0}:{isDefaultExample:!1,isExample:!1}}toExampleBoolean(e,t){const r=null!=t&&!s.BooleanUtils.isBooleanString(t);return null==t||r?e||r?{isDefaultExample:!0,isExample:!0}:{isDefaultExample:!1,isExample:!1}:{isDefaultExample:!1,isExample:!0,example:s.BooleanUtils.toBoolean(t)}}toAstProperty(e,t){if(null==t)return;const r=o.Config.getRawPropertiesConfig()[e],i=e=>{if(null!=e){switch(r.format){case n.PropertyFormat.string:return null!=l.NumberUtils.asNumber(e)&&(e=`${e}`),u.StringUtils.isString(e)?u.StringUtils.string(e):void 0;case n.PropertyFormat.trimmedString:return null!=l.NumberUtils.asNumber(e)&&(e=`${e}`),u.StringUtils.isString(e)?u.StringUtils.trimmedString(e):void 0;case n.PropertyFormat.number:return l.NumberUtils.asNumber(e);case n.PropertyFormat.boolean:return s.BooleanUtils.toBoolean(e,!0);case n.PropertyFormat.invertedBoolean:return!s.BooleanUtils.toBoolean(e,!0)}return e}};if(Array.isArray(t)){const e=t;for(let t=0,r=e.length;t<r;t++)e[t]=i(e[t])}else t=i(t);return a.ArrayUtils.asArray(t)}}},5809:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;const i=r(7735),o=r(2028),n=r(9888),a=r(5854),s=r(4410),l=r(6149),u=r(385),p=r(6989),c=r(8903),g=r(8025),y=r(955),d=r(6936),f=r(4470),m=r(4564);class h extends f.BaseBuilder{bitmark(e){const{bits:t,errors:r}=e,i={bits:t,errors:r};return y.ObjectUtils.removeUnwantedProperties(i),i}bit(e){var t;const{bitType:r,textFormat:i,resourceType:c,isCommented:d,id:f,internalComment:h,externalId:T,spaceId:b,padletId:v,jupyterId:B,jupyterExecutionCount:C,isPublic:P,aiGenerated:k,releaseVersion:x,releaseKind:S,releaseDate:K,ageRange:w,lang:A,language:_,publisher:I,publisherName:L,theme:O,computerLanguage:E,target:R,tag:N,icon:V,iconTag:F,colorTag:j,flashcardSet:G,subtype:D,bookAlias:M,coverImage:U,coverColor:J,publications:$,author:z,subject:q,date:H,location:W,kind:Y,hasMarkAsDone:X,action:Z,blockId:Q,pageNo:ee,x:te,y:re,width:ie,height:oe,index:ne,classification:ae,availableClassifications:se,tableFixedHeader:le,tableSearch:ue,tableSort:pe,tablePagination:ce,tablePaginationLimit:ge,tableHeight:ye,tableWhitespaceNoWrap:de,tableAutoWidth:fe,tableResizableColumns:me,quizCountItems:he,quizStrikethroughSolutions:Te,codeLineNumbers:be,codeMinimap:ve,thumbImage:Be,scormSource:Ce,posterImage:Pe,focusX:ke,focusY:xe,pointerLeft:Se,pointerTop:Ke,backgroundWallpaper:we,hasBookNavigation:Ae,duration:_e,referenceProperty:Ie,deeplink:Le,externalLink:Oe,externalLinkText:Ee,videoCallLink:Re,vendorUrl:Ne,search:Ve,bot:Fe,list:je,textReference:Ge,isTracked:De,isInfoOnly:Me,labelTrue:Ue,labelFalse:Je,content2Buy:$e,mailingList:ze,buttonCaption:qe,caption:He,book:We,quotedPerson:Ye,partialAnswer:Xe,reasonableNumOfChars:Ze,resolved:Qe,resolvedDate:et,resolvedBy:tt,maxCreatedBits:rt,maxDisplayLevel:it,productId:ot,product:nt,productList:at,productVideo:st,productVideoList:lt,productFolder:ut,technicalTerm:pt,servings:ct,ratingLevelStart:gt,ratingLevelEnd:yt,ratingLevelSelected:dt,title:ft,subtitle:mt,level:ht,toc:Tt,progress:bt,anchor:vt,reference:Bt,referenceEnd:Ct,isCaseSensitive:Pt,item:kt,lead:xt,pageNumber:St,marginNumber:Kt,hint:wt,instruction:At,isDefaultExample:_t,example:It,imageSource:Lt,person:Ot,markConfig:Et,extraProperties:Rt,resources:Nt,body:Vt,sampleSolution:Ft,footer:jt,markup:Gt,parser:Dt}=e,Mt=o.Config.getBitConfig(r),Ut=p.ArrayUtils.asArray(Nt),Jt=this.cardNode(e),$t=o.Config.isOfBitType(r,a.BitType.essay)?this.toAstProperty(n.PropertyConfigKey.reasonableNumOfChars,Ze):void 0,zt=Object.assign(Object.assign({bitType:r,textFormat:null!==(t=u.TextFormat.fromValue(i))&&void 0!==t?t:Mt.textFormatDefault,resourceType:l.ResourceTag.fromValue(c),isCommented:d,id:this.toAstProperty(n.PropertyConfigKey.id,f),internalComment:this.toAstProperty(n.PropertyConfigKey.internalComment,h),externalId:this.toAstProperty(n.PropertyConfigKey.externalId,T),spaceId:this.toAstProperty(n.PropertyConfigKey.spaceId,b),padletId:this.toAstProperty(n.PropertyConfigKey.padletId,v),jupyterId:this.toAstProperty(n.PropertyConfigKey.jupyterId,B),jupyterExecutionCount:this.toAstProperty(n.PropertyConfigKey.jupyterExecutionCount,C),isPublic:this.toAstProperty(n.PropertyConfigKey.isPublic,P),aiGenerated:this.toAstProperty(n.PropertyConfigKey.aiGenerated,k),releaseVersion:this.toAstProperty(n.PropertyConfigKey.releaseVersion,x),releaseKind:this.toAstProperty(n.PropertyConfigKey.releaseKind,S),releaseDate:this.toAstProperty(n.PropertyConfigKey.releaseDate,K),book:We,ageRange:this.toAstProperty(n.PropertyConfigKey.ageRange,w),lang:this.toAstProperty(n.PropertyConfigKey.lang,A),language:this.toAstProperty(n.PropertyConfigKey.language,_),publisher:this.toAstProperty(n.PropertyConfigKey.publisher,I),publisherName:this.toAstProperty(n.PropertyConfigKey.publisherName,L),theme:this.toAstProperty(n.PropertyConfigKey.theme,O),computerLanguage:this.toAstProperty(n.PropertyConfigKey.computerLanguage,E),target:this.toAstProperty(n.PropertyConfigKey.target,R),tag:this.toAstProperty(n.PropertyConfigKey.tag,N),icon:this.toAstProperty(n.PropertyConfigKey.icon,V),iconTag:this.toAstProperty(n.PropertyConfigKey.iconTag,F),colorTag:this.toAstProperty(n.PropertyConfigKey.colorTag,j),flashcardSet:this.toAstProperty(n.PropertyConfigKey.flashcardSet,G),subtype:this.toAstProperty(n.PropertyConfigKey.subtype,D),bookAlias:this.toAstProperty(n.PropertyConfigKey.bookAlias,M),coverImage:this.toAstProperty(n.PropertyConfigKey.coverImage,U),coverColor:this.toAstProperty(n.PropertyConfigKey.coverColor,J),publications:this.toAstProperty(n.PropertyConfigKey.publications,$),author:this.toAstProperty(n.PropertyConfigKey.author,z),subject:this.toAstProperty(n.PropertyConfigKey.subject,q),date:this.toAstProperty(n.PropertyConfigKey.date,H),location:this.toAstProperty(n.PropertyConfigKey.location,W),kind:this.toAstProperty(n.PropertyConfigKey.kind,Y),hasMarkAsDone:this.toAstProperty(n.PropertyConfigKey.hasMarkAsDone,X),action:this.toAstProperty(n.PropertyConfigKey.action,Z),blockId:this.toAstProperty(n.PropertyConfigKey.blockId,Q),pageNo:this.toAstProperty(n.PropertyConfigKey.pageNo,ee),x:this.toAstProperty(n.PropertyConfigKey.x,te),y:this.toAstProperty(n.PropertyConfigKey.y,re),width:this.toAstProperty(n.PropertyConfigKey.width,ie),height:this.toAstProperty(n.PropertyConfigKey.height,oe),index:this.toAstProperty(n.PropertyConfigKey.index,ne),classification:this.toAstProperty(n.PropertyConfigKey.classification,ae),availableClassifications:this.toAstProperty(n.PropertyConfigKey.availableClassifications,se),tableFixedHeader:this.toAstProperty(n.PropertyConfigKey.tableFixedHeader,le),tableSearch:this.toAstProperty(n.PropertyConfigKey.tableSearch,ue),tableSort:this.toAstProperty(n.PropertyConfigKey.tableSort,pe),tablePagination:this.toAstProperty(n.PropertyConfigKey.tablePagination,ce),tablePaginationLimit:this.toAstProperty(n.PropertyConfigKey.tablePaginationLimit,ge),tableHeight:this.toAstProperty(n.PropertyConfigKey.tableHeight,ye),tableWhitespaceNoWrap:this.toAstProperty(n.PropertyConfigKey.tableWhitespaceNoWrap,de),tableAutoWidth:this.toAstProperty(n.PropertyConfigKey.tableAutoWidth,fe),tableResizableColumns:this.toAstProperty(n.PropertyConfigKey.tableResizableColumns,me),quizCountItems:this.toAstProperty(n.PropertyConfigKey.quizCountItems,he),quizStrikethroughSolutions:this.toAstProperty(n.PropertyConfigKey.quizStrikethroughSolutions,Te),codeLineNumbers:this.toAstProperty(n.PropertyConfigKey.codeLineNumbers,be),codeMinimap:this.toAstProperty(n.PropertyConfigKey.codeMinimap,ve),thumbImage:this.toAstProperty(n.PropertyConfigKey.thumbImage,Be),scormSource:this.toAstProperty(n.PropertyConfigKey.scormSource,Ce),posterImage:this.toAstProperty(n.PropertyConfigKey.posterImage,Pe),focusX:this.toAstProperty(n.PropertyConfigKey.focusX,ke),focusY:this.toAstProperty(n.PropertyConfigKey.focusY,xe),pointerLeft:this.toAstProperty(n.PropertyConfigKey.pointerLeft,Se),pointerTop:this.toAstProperty(n.PropertyConfigKey.pointerTop,Ke),backgroundWallpaper:this.toAstProperty(n.PropertyConfigKey.backgroundWallpaper,we),hasBookNavigation:this.toAstProperty(n.PropertyConfigKey.hasBookNavigation,Ae),deeplink:this.toAstProperty(n.PropertyConfigKey.deeplink,Le),externalLink:this.toAstProperty(n.PropertyConfigKey.externalLink,Oe),externalLinkText:this.toAstProperty(n.PropertyConfigKey.externalLinkText,Ee),videoCallLink:this.toAstProperty(n.PropertyConfigKey.videoCallLink,Re),vendorUrl:this.toAstProperty(n.PropertyConfigKey.vendorUrl,Ne),search:this.toAstProperty(n.PropertyConfigKey.search,Ve),bot:this.toAstProperty(n.PropertyConfigKey.bot,Fe),duration:this.toAstProperty(n.PropertyConfigKey.duration,_e),referenceProperty:this.toAstProperty(n.PropertyConfigKey.property_reference,Ie),list:this.toAstProperty(n.PropertyConfigKey.list,je),textReference:this.toAstProperty(n.PropertyConfigKey.textReference,Ge),isTracked:this.toAstProperty(n.PropertyConfigKey.isTracked,De),isInfoOnly:this.toAstProperty(n.PropertyConfigKey.isInfoOnly,Me),labelTrue:this.toAstProperty(n.PropertyConfigKey.labelTrue,Ue),labelFalse:this.toAstProperty(n.PropertyConfigKey.labelFalse,Je),content2Buy:this.toAstProperty(n.PropertyConfigKey.content2Buy,$e),mailingList:this.toAstProperty(n.PropertyConfigKey.mailingList,ze),buttonCaption:this.toAstProperty(n.PropertyConfigKey.buttonCaption,qe),caption:He,quotedPerson:this.toAstProperty(n.PropertyConfigKey.quotedPerson,Ye),partialAnswer:this.toAstProperty(n.PropertyConfigKey.partialAnswer,Xe),reasonableNumOfChars:$t,resolved:this.toAstProperty(n.PropertyConfigKey.resolved,Qe),resolvedDate:this.toAstProperty(n.PropertyConfigKey.resolvedDate,et),resolvedBy:this.toAstProperty(n.PropertyConfigKey.resolvedBy,tt),maxCreatedBits:this.toAstProperty(n.PropertyConfigKey.maxCreatedBits,rt),maxDisplayLevel:this.toAstProperty(n.PropertyConfigKey.maxDisplayLevel,it),productId:this.toAstProperty(n.PropertyConfigKey.productId,ot),product:this.toAstProperty(n.PropertyConfigKey.product,nt),productList:this.toAstProperty(n.PropertyConfigKey.productList,at),productVideo:this.toAstProperty(n.PropertyConfigKey.productVideo,st),productVideoList:this.toAstProperty(n.PropertyConfigKey.productVideoList,lt),productFolder:this.toAstProperty(n.PropertyConfigKey.productFolder,ut),technicalTerm:pt,servings:ct,ratingLevelStart:gt,ratingLevelEnd:yt,ratingLevelSelected:this.toAstProperty(n.PropertyConfigKey.ratingLevelSelected,dt),title:ft,subtitle:mt,level:g.NumberUtils.asNumber(ht),toc:this.toAstProperty(n.PropertyConfigKey.toc,Tt),progress:this.toAstProperty(n.PropertyConfigKey.progress,bt),anchor:vt,reference:Bt,referenceEnd:Ct,markConfig:Et,itemLead:this.itemLead(kt,xt,St,Kt),hint:wt,instruction:At},this.toExample(_t,It)),{imageSource:Lt,person:Ot,resources:Ut,body:Vt,sampleSolution:p.ArrayUtils.asSingle(Ft),cardNode:Jt,footer:jt,markup:Gt,parser:Dt,extraProperties:this.parseExtraProperties(Rt)});return o.Config.isOfBitType(r,a.BitType.interview)&&this.pushDownTree(void 0,void 0,Jt,"questions",n.PropertyConfigKey.reasonableNumOfChars,Ze),this.pushDownTree(Vt,[s.BodyBitType.gap],void 0,void 0,n.PropertyConfigKey.isCaseSensitive,Pt),this.pushDownTree(void 0,void 0,Jt,"pairs",n.PropertyConfigKey.isCaseSensitive,Pt),this.pushDownTree(void 0,void 0,Jt,["matrix","cells"],n.PropertyConfigKey.isCaseSensitive,Pt),this.pushExampleDownTree(Vt,Jt,_t,It),this.setDefaultBitValues(zt),this.setIsExampleFlags(zt),this.addVersionToParserInfo(zt),y.ObjectUtils.removeUnwantedProperties(zt,{ignoreAllFalse:!0,ignoreEmptyString:["example"]}),m.NodeValidator.validateBit(zt)}choice(e){const{text:t,isCorrect:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u,example:p}=e,c=Object.assign({text:t,isCorrect:!!r,itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l},this.toExampleBoolean(u,p));return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}response(e){const{text:t,isCorrect:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u,example:p}=e,c=Object.assign({text:t,isCorrect:!!r,itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l},this.toExampleBoolean(u,p));return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}botResponse(e){const{response:t,reaction:r,feedback:i,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l}=e,u={response:t,reaction:r,feedback:i,itemLead:this.itemLead(o,n,a,s),hint:l};return y.ObjectUtils.removeUnwantedProperties(u,{ignoreEmptyString:["response","reaction","feedback"]}),u}quiz(e){const{choices:t,responses:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u,example:p}=e;this.pushExampleDownTreeBoolean(u,p,!0,t),this.pushExampleDownTreeBoolean(u,p,!1,r);const c={itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l,isExample:u||null!=p,choices:t,responses:r};return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}heading(e){var t;const{forKeys:r,forValues:o}=e;if(null==r)return;return{forKeys:r||i.Breakscape.EMPTY_STRING,forValues:null!==(t=p.ArrayUtils.asArray(o))&&void 0!==t?t:[]}}pair(e){const{key:t,keyAudio:r,keyImage:i,values:o,item:n,lead:a,pageNumber:s,marginNumber:l,hint:u,instruction:p,isCaseSensitive:c,isDefaultExample:g,example:d}=e,f=Object.assign(Object.assign({key:t,keyAudio:r,keyImage:i,itemLead:this.itemLead(n,a,s,l),hint:u,instruction:p},this.toExample(g,d)),{isCaseSensitive:c,values:o});return y.ObjectUtils.removeUnwantedProperties(f,{ignoreAllFalse:!0}),f}matrix(e){const{key:t,cells:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u}=e;let p=!1;for(const e of null!=r?r:[])u&&!e.isExample&&(e.isDefaultExample=!0,e.isExample=!0),p=!!e.isExample||p;const c={key:t,itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l,isExample:p,cells:r};return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}matrixCell(e){const{values:t,item:r,lead:i,pageNumber:o,marginNumber:n,hint:a,instruction:s,isCaseSensitive:l,isDefaultExample:u,example:p}=e,c=Object.assign({values:t,itemLead:this.itemLead(r,i,o,n),hint:a,instruction:s,isCaseSensitive:l},this.toExample(u,p));return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}table(e){const{columns:t,rows:r}=e;return{columns:t,rows:r}}question(e){const{question:t,partialAnswer:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,reasonableNumOfChars:u,sampleSolution:p,isDefaultExample:c,example:g}=e,d=Object.assign(Object.assign({itemLead:this.itemLead(i,o,n,a),question:t,partialAnswer:r,hint:s,instruction:l},this.toExample(c,g)),{reasonableNumOfChars:u,sampleSolution:p});return y.ObjectUtils.removeUnwantedProperties(d,{ignoreEmptyString:["question"],ignoreAllFalse:!0}),d}ingredient(e){const{title:t,checked:r,item:i,quantity:o,unit:n,unitAbbr:a,decimalPlaces:s,disableCalculation:l}=e,u={title:t,checked:null!=r&&r,item:i,quantity:o,unit:n,unitAbbr:a,decimalPlaces:s,disableCalculation:l};return y.ObjectUtils.removeUnwantedProperties(u,{ignoreAllFalse:!0}),u}body(e){const{bodyParts:t,bodyJson:r}=e;return{bodyParts:t,bodyJson:r}}bodyText(e){const{text:t}=e;return{type:s.BodyBitType.text,data:{bodyText:t}}}footerText(e){const{text:t}=e;return{footerText:t}}gap(e){const{solutions:t,item:r,lead:i,pageNumber:o,marginNumber:n,hint:a,instruction:l,isCaseSensitive:u,isDefaultExample:p,example:c}=e,g={type:s.BodyBitType.gap,data:Object.assign({solutions:t,itemLead:this.itemLead(r,i,o,n),hint:a,instruction:l,isCaseSensitive:u},this.toExample(p,c))};return y.ObjectUtils.removeUnwantedProperties(g,{ignoreAllFalse:!0}),g}markConfig(e){const{mark:t,color:r,emphasis:i}=e,o={mark:t,color:r,emphasis:i};return y.ObjectUtils.removeUnwantedProperties(o),o}mark(e){const{solution:t,mark:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:l,instruction:u,isDefaultExample:p,example:c}=e,g={type:s.BodyBitType.mark,data:Object.assign({solution:t,mark:r,itemLead:this.itemLead(i,o,n,a),hint:l,instruction:u},this.toExample(p,c))};return y.ObjectUtils.removeUnwantedProperties(g),g}select(e){const{options:t,prefix:r,postfix:i,item:o,lead:n,pageNumber:a,marginNumber:l,hint:u,instruction:p}=e,c={type:s.BodyBitType.select,data:{prefix:r,options:t,postfix:i,itemLead:this.itemLead(o,n,a,l),hint:u,instruction:p}};return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}selectOption(e){const{text:t,isCorrect:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u,example:p}=e,c=Object.assign({text:t,isCorrect:!!r,itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l},this.toExample(u,p));return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}highlight(e){const{texts:t,prefix:r,postfix:i,item:o,lead:n,pageNumber:a,marginNumber:l,hint:u,instruction:p}=e,c={type:s.BodyBitType.highlight,data:{prefix:r,texts:t,postfix:i,itemLead:this.itemLead(o,n,a,l),hint:u,instruction:p}};return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}highlightText(e){const{text:t,isCorrect:r,isHighlighted:i,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,isDefaultExample:p,example:c}=e,g=Object.assign({text:t,isCorrect:!!r,isHighlighted:!!i,itemLead:this.itemLead(o,n,a,s),hint:l,instruction:u},this.toExample(p,c));return y.ObjectUtils.removeUnwantedProperties(g,{ignoreAllFalse:!0}),g}flashcard(e){const{question:t,answer:r,alternativeAnswers:i,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,isDefaultExample:p,example:c}=e,g=Object.assign({question:t,answer:r,alternativeAnswers:i,itemLead:this.itemLead(o,n,a,s),hint:l,instruction:u},this.toExampleBoolean(p,c));return y.ObjectUtils.removeUnwantedProperties(g,{ignoreAllFalse:!0}),g}statement(e){const{text:t,isCorrect:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u,example:p}=e,c=Object.assign({text:t,isCorrect:!!r,itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l},this.toExampleBoolean(u,p));return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}imageSource(e){const{url:t,mockupId:r,size:i,format:o,trim:n}=e,a={url:t,mockupId:r,size:i,format:o,trim:n};return y.ObjectUtils.removeUnwantedProperties(a,{ignoreFalse:["trim"]}),a}person(e){const{name:t,title:r,avatarImage:i}=e,o={name:t,title:r,avatarImage:i};return y.ObjectUtils.removeUnwantedProperties(o),o}technicalTerm(e){const{technicalTerm:t,lang:r}=e,i={technicalTerm:t,lang:r};return y.ObjectUtils.removeUnwantedProperties(i),i}servings(e){const{servings:t,unit:r,unitAbbr:i,decimalPlaces:o,disableCalculation:n,hint:a}=e,s={servings:t,unit:r,unitAbbr:i,decimalPlaces:o,disableCalculation:n,hint:a};return y.ObjectUtils.removeUnwantedProperties(s),s}ratingLevelStartEnd(e){const{level:t,label:r}=e,i={level:t,label:r};return y.ObjectUtils.removeUnwantedProperties(i),i}itemLead(e,t,r,i){let o;return(e||t||r||i)&&(o={item:e,lead:t,pageNumber:r,marginNumber:i}),o}cardBit(e){const{item:t,lead:r,pageNumber:i,marginNumber:o,hint:n,instruction:a,isDefaultExample:s,example:l,extraProperties:u,body:p}=e,c=Object.assign(Object.assign({itemLead:this.itemLead(t,r,i,o),hint:n,instruction:a},this.toExample(s,l)),{body:p,extraProperties:this.parseExtraProperties(u)});return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0,ignoreEmptyString:["example"]}),m.NodeValidator.validateCardBit(c)}cardNode(e){let t;const{questions:r,elements:i,flashcards:o,statement:n,statements:a,choices:s,responses:l,quizzes:u,heading:p,pairs:c,matrix:g,table:d,botResponses:f,ingredients:m,cardBits:h}=e;return(r||i||o||n||a||s||l||u||p||c||g||d||f||m||h)&&(t={questions:r,elements:i,flashcards:o,statement:n,statements:a,choices:s,responses:l,quizzes:u,heading:p,pairs:c,matrix:g,table:d,botResponses:f,ingredients:m,cardBits:h},y.ObjectUtils.removeUnwantedProperties(t)),t}pushExampleDownTree(e,t,r,i){if(r||i){if(t){if(this.pushExampleDownTreeString(r,i,t.pairs),this.pushExampleDownTreeBoolean(r,i,!1,t.flashcards),this.pushExampleDownTreeBoolean(r,i,!0,t.choices),this.pushExampleDownTreeBoolean(r,i,!1,t.responses,t.statements,t.statement),t.quizzes)for(const e of t.quizzes)this.pushExampleDownTreeBoolean(r,i,!0,e.choices),this.pushExampleDownTreeBoolean(r,i,!1,e.responses);if(t.matrix)for(const e of t.matrix)this.pushExampleDownTreeString(r,i,e.cells)}e&&this.pushExampleDownTreeBodyBits(r,i,e)}}pushExampleDownTreeBoolean(e,t,r,...i){if((e||t)&&Array.isArray(i))for(const o of i)if(o){const i=Array.isArray(o)?o:[o];c.BitUtils.fillBooleanExample(i,e,t,r)}}pushExampleDownTreeString(e,t,...r){if((e||t)&&Array.isArray(r))for(const i of r)if(i){const r=Array.isArray(i)?i:[i];c.BitUtils.fillStringExample(r,e,t,!1)}}pushExampleDownTreeBodyBits(e,t,r){if((e||t)&&r&&r.bodyParts&&0!==r.bodyParts.length)for(const i of r.bodyParts)if(i)switch(i.type){case s.BodyBitType.gap:{const r=i;c.BitUtils.fillStringExample([r.data],e,t,!1);break}case s.BodyBitType.mark:{const r=i;c.BitUtils.fillBooleanExample([r.data],e,t,!1);break}case s.BodyBitType.select:{const r=i;c.BitUtils.fillBooleanExample(r.data.options,e,t,!0);break}case s.BodyBitType.highlight:{const r=i;c.BitUtils.fillBooleanExample(r.data.texts,e,t,!0);break}}}pushDownTree(e,t,r,i,o,n){if(void 0!==n){if(r&&i){Array.isArray(i)||(i=[i]);const e=y.ObjectUtils.flatMapPath(r,i);for(const t of e)null==t[o]&&(t[o]=n)}if(t&&e&&e.bodyParts&&e.bodyParts.length>0)for(const r of e.bodyParts)if(r&&-1!==t.indexOf(r.type)){const e=r.data;null==e[o]&&(e[o]=n)}}}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]=p.ArrayUtils.asArray(i)||[i];return r}setIsExampleFlags(e){var t,r,i,o,n,a,l,u,p,c,g,y,d;e.isExample=!1;const f=t=>!!t&&(t.isDefaultExample||null!=t.example?(t.isExample=!0,e.isExample=!0):t.isExample=t===e&&!!e.isExample,t.isExample),{body:m,cardNode:h}=e;if(m&&m.bodyParts)for(const e of m.bodyParts)switch(e.type){case s.BodyBitType.gap:case s.BodyBitType.mark:f(e.data);break;case s.BodyBitType.select:{const t=e;let r=!1;for(const e of t.data.options)r=!!f(e)||r;t.data.isExample=r;break}case s.BodyBitType.highlight:{const t=e;let r=!1;for(const e of t.data.texts)r=!!f(e)||r;t.data.isExample=r;break}}if(h){for(const e of null!==(t=h.flashcards)&&void 0!==t?t:[])f(e);for(const e of null!==(r=h.pairs)&&void 0!==r?r:[])f(e);for(const e of null!==(i=h.matrix)&&void 0!==i?i:[]){let t=!1;for(const r of null!==(o=e.cells)&&void 0!==o?o:[])t=!!f(r)||t;e.isExample=t}for(const e of null!==(n=h.quizzes)&&void 0!==n?n:[]){let t=!1;for(const r of null!==(a=e.responses)&&void 0!==a?a:[])t=!!f(r)||t;for(const r of null!==(l=e.choices)&&void 0!==l?l:[])t=!!f(r)||t;e.isExample=t}for(const e of null!==(u=h.responses)&&void 0!==u?u:[])f(e);for(const e of null!==(p=h.choices)&&void 0!==p?p:[])f(e);for(const e of null!==(c=h.statements)&&void 0!==c?c:[])f(e);f(h.statement);for(const e of null!==(g=h.questions)&&void 0!==g?g:[])f(e)}f(e.statement);for(const t of null!==(y=e.responses)&&void 0!==y?y:[])f(t);for(const t of null!==(d=e.choices)&&void 0!==d?d:[])f(t);f(e)}setDefaultBitValues(e){switch(e.bitType){case a.BitType.articleAi:case a.BitType.noteAi:case a.BitType.summaryAi:e.aiGenerated=this.toAstProperty(n.PropertyConfigKey.aiGenerated,!0)}}addVersionToParserInfo(e){var t;const r=null!==(t=e.parser)&&void 0!==t?t:{};r.version=d.env.appVersion.full,e.parser=r}}t.Builder=h},5533:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceBuilder=void 0;const o=r(7735),n=r(6149),a=r(955),s=r(201),l=r(4470),u=r(4564);class p extends l.BaseBuilder{resource(e){var t;let r;const{type:a,value:s,format:l}=e,u=i(e,["type","value","format"]),p=Object.assign({type:a,value:null!=s?s:o.Breakscape.EMPTY_STRING,format:null!=l?l:o.Breakscape.EMPTY_STRING},u);switch(a){case n.ResourceTag.video:case n.ResourceTag.videoEmbed:case n.ResourceTag.videoLink:case n.ResourceTag.stillImageFilmEmbed:case n.ResourceTag.stillImageFilmLink:{const r=["src1x","src2x","src3x","src4x"],i=[];for(const t of r){const r=e[t];if(r){const e=this.resource({type:n.ResourceTag.image,value:r});e&&i.push(e)}}p.thumbnails=[...null!==(t=p.thumbnails)&&void 0!==t?t:[],...i]}}switch(a){case n.ResourceTag.image:case n.ResourceTag.imagePortrait:case n.ResourceTag.imageLandscape:r=this.imageResource(p,a);break;case n.ResourceTag.imageLink:r=this.imageLinkResource(p);break;case n.ResourceTag.audio:r=this.audioResource(p);break;case n.ResourceTag.audioEmbed:r=this.audioEmbedResource(p);break;case n.ResourceTag.audioLink:r=this.audioLinkResource(p);break;case n.ResourceTag.video:r=this.videoResource(p);break;case n.ResourceTag.videoEmbed:r=this.videoEmbedResource(p);break;case n.ResourceTag.videoLink:r=this.videoLinkResource(p);break;case n.ResourceTag.stillImageFilmEmbed:r=this.stillImageFilmEmbedResource(p);break;case n.ResourceTag.stillImageFilmLink:r=this.stillImageFilmLinkResource(p);break;case n.ResourceTag.article:r=this.articleResource(p);break;case n.ResourceTag.document:r=this.documentResource(p);break;case n.ResourceTag.documentEmbed:r=this.documentEmbedResource(p);break;case n.ResourceTag.documentLink:r=this.documentLinkResource(p);break;case n.ResourceTag.documentDownload:r=this.documentDownloadResource(p);break;case n.ResourceTag.appLink:r=this.appLinkResource(p);break;case n.ResourceTag.websiteLink:r=this.websiteLinkResource(p)}return r}imageResource(e,t){const{value:r,src1x:i,src2x:o,src3x:l,src4x:p,width:c,height:g,alt:y,zoomDisabled:d,license:f,copyright:m,showInIndex:h,caption:T}=e,b={type:n.ResourceTag.image,typeAlias:null!=t?t:n.ResourceTag.image,format:s.UrlUtils.fileExtensionFromUrl(r),provider:s.UrlUtils.domainFromUrl(r),value:r,src1x:i,src2x:o,src3x:l,src4x:p,width:c,height:g,alt:y,zoomDisabled:d,license:f,copyright:m,showInIndex:h,caption:T};return a.ObjectUtils.removeUnwantedProperties(b,{ignoreFalse:["zoomDisabled"]}),u.NodeValidator.validateResource(b)}imageLinkResource(e){const{value:t,src1x:r,src2x:i,src3x:o,src4x:l,width:p,height:c,alt:g,zoomDisabled:y,license:d,copyright:f,showInIndex:m,caption:h}=e,T={type:n.ResourceTag.imageLink,typeAlias:n.ResourceTag.imageLink,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,src1x:r,src2x:i,src3x:o,src4x:l,zoomDisabled:y,width:p,height:c,alt:g,license:d,copyright:f,showInIndex:m,caption:h};return a.ObjectUtils.removeUnwantedProperties(T,{ignoreFalse:["zoomDisabled"]}),u.NodeValidator.validateResource(T)}audioResource(e){const{value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g}=e,y={type:n.ResourceTag.audio,typeAlias:n.ResourceTag.audio,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g};return a.ObjectUtils.removeUnwantedProperties(y),u.NodeValidator.validateResource(y)}audioEmbedResource(e){const{value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g}=e,y={type:n.ResourceTag.audioEmbed,typeAlias:n.ResourceTag.audioEmbed,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g};return a.ObjectUtils.removeUnwantedProperties(y),u.NodeValidator.validateResource(y)}audioLinkResource(e){const{value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g}=e,y={type:n.ResourceTag.audioLink,typeAlias:n.ResourceTag.audioLink,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g};return a.ObjectUtils.removeUnwantedProperties(y),u.NodeValidator.validateResource(y)}videoResource(e){const{value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b}=e,v={type:n.ResourceTag.video,typeAlias:n.ResourceTag.video,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b};return a.ObjectUtils.removeUnwantedProperties(v),u.NodeValidator.validateResource(v)}videoEmbedResource(e){const{value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b}=e,v={type:n.ResourceTag.videoEmbed,typeAlias:n.ResourceTag.videoEmbed,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b};return a.ObjectUtils.removeUnwantedProperties(v),u.NodeValidator.validateResource(v)}videoLinkResource(e){const{value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b}=e,v={type:n.ResourceTag.videoLink,typeAlias:n.ResourceTag.videoLink,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b};return a.ObjectUtils.removeUnwantedProperties(v),u.NodeValidator.validateResource(v)}stillImageFilmEmbedResource(e){const{value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b}=e,v={type:n.ResourceTag.stillImageFilmEmbed,typeAlias:n.ResourceTag.stillImageFilmEmbed,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b};return a.ObjectUtils.removeUnwantedProperties(v),u.NodeValidator.validateResource(v)}stillImageFilmLinkResource(e){const{value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b}=e,v={type:n.ResourceTag.stillImageFilmLink,typeAlias:n.ResourceTag.stillImageFilmLink,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b};return a.ObjectUtils.removeUnwantedProperties(v),u.NodeValidator.validateResource(v)}articleResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:l}=e,p={type:n.ResourceTag.article,typeAlias:n.ResourceTag.article,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,license:r,copyright:i,showInIndex:o,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}documentResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:l}=e,p={type:n.ResourceTag.document,typeAlias:n.ResourceTag.document,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,license:r,copyright:i,showInIndex:o,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}documentEmbedResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:l}=e,p={type:n.ResourceTag.documentEmbed,typeAlias:n.ResourceTag.documentEmbed,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,license:r,copyright:i,showInIndex:o,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}documentLinkResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:l}=e,p={type:n.ResourceTag.documentLink,typeAlias:n.ResourceTag.documentLink,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,license:r,copyright:i,showInIndex:o,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}documentDownloadResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:l}=e,p={type:n.ResourceTag.documentDownload,typeAlias:n.ResourceTag.documentDownload,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,license:r,copyright:i,showInIndex:o,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}appLinkResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:s}=e,l={type:n.ResourceTag.appLink,typeAlias:n.ResourceTag.appLink,value:t,license:r,copyright:i,showInIndex:o,caption:s};return a.ObjectUtils.removeUnwantedProperties(l),u.NodeValidator.validateResource(l)}websiteLinkResource(e){const{value:t,siteName:r,license:i,copyright:o,showInIndex:s,caption:l}=e,p={type:n.ResourceTag.websiteLink,typeAlias:n.ResourceTag.websiteLink,value:t,siteName:r,license:i,copyright:o,showInIndex:s,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}}t.ResourceBuilder=p},4564:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValidator=void 0;const i=r(9681);const o=new class{validateBit(e){if(!e)return e;return e}validateCardBit(e){if(!e)return e;return e}validateResource(e){if(!e)return;let t=e,r=!1;return e.type,r=!!e.value,r||e.type&&(t={type:e.type,typeAlias:e.type}),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(!i.StringUtils.isString(e))throw new Error(`${t} is required to be a string`)}isNonEmptyString(e,t){if(!i.StringUtils.isString(e)||""===e)throw new Error(`${t} is required to be a non-empty string`)}isStringOrBoolean(e,t){if(!i.StringUtils.isString(e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a string or a boolean`)}isNonEmptyStringOrBoolean(e,t){if((!i.StringUtils.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(!i.StringUtils.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`)}};t.NodeValidator=o},6772:function(e,t){var r=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StringWriter=void 0;t.StringWriter=class{constructor(){this._string="",this.endOfLineString="\n"}get isSync(){return!0}getString(){return this._string}open(){return r(this,void 0,void 0,(function*(){this.openSync(),Promise.resolve()}))}close(){return r(this,void 0,void 0,(function*(){try{this.closeSync()}catch(e){return Promise.reject(e)}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){return this._buffer?(null!=e?this._buffer.push(e+this.endOfLineString):this._buffer.push(this.endOfLineString),this):this}writeLines(e,t){if(!this._buffer)return this;if(!e)return this;for(let r=0,i=e.length;r<i;r++){const o=e[r];this._buffer.push(o),t&&r<i-1&&this._buffer.push(t),this._buffer.push(this.endOfLineString)}return this}write(e){return this._buffer?(null==e||this._buffer.push(e),this):this}writeWhiteSpace(){return this.write(" "),this}}},7735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Breakscape=void 0;const i=r(9681),o=`${/([*`_!=])([\^]*)\1/.source}|${/^(\|)([\^]*)(code[\s]*|code:|image:|[\s]*$)/.source}|${/^([#]{1,3})([\^]*)([^\S\r\n]+)/.source}|${/^(•)([\^]*)(1|\+|-|)([^\S\r\n]+)/.source}|${/(\[)([\^]*)([.@#▼►%!?+\-$_=&])/.source}|${/([\^]*)(])/.source}`,n=o.replace(/(\(\[\\\^\]\*\))/g,"\\^$1"),a=new RegExp(o,"gm"),s="$1$3$6$9$13^$2$1$4$5$7$8$10$11$12$14$15$16$17",l=new RegExp(n,"gm"),u=s.replace(/\^/g,""),p=new RegExp("^(\\||•|#)","gm");const c=new class{constructor(){this.EMPTY_STRING=""}breakscape(e,t){if(null==e)return e;const r=Object.assign({},t),o=e=>e?e=e.replace(a,s):e;if(Array.isArray(e)){const t=r.modifyArray?e:[e.length];for(let r=0,n=e.length;r<n;r++){const n=e[r];i.StringUtils.isString(n)&&(t[r]=o(n))}e=t}else i.StringUtils.isString(e)&&(e=o(e));return e}unbreakscape(e,t){if(null==e)return e;const r=Object.assign({},t),o=e=>e?e=e.replace(l,u):e;if(Array.isArray(e)){const t=r.modifyArray?e:[];for(let r=0,n=e.length;r<n;r++){const n=e[r];i.StringUtils.isString(n)?t[r]=o(n):t[r]=n}e=t}else i.StringUtils.isString(e)&&(e=o(e));return e}breakscapeCode(e,t){if(null==e)return e;const r=Object.assign({},t),o=e=>e?e.replace(p,"$1^"):e;if(Array.isArray(e)){const t=r.modifyArray?e:[e.length];for(let t=0,r=e.length;t<r;t++){const r=e[t];i.StringUtils.isString(r)&&(e[t]=o(r))}e=t}else i.StringUtils.isString(e)&&(e=o(e));return e}concatenate(e,t){return e+t}};t.Breakscape=c},2028:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;const i=r(3619),o=r(9600),n=r(1457),a=r(6915),s=r(5512),l=r(5854),u=r(385),p=r(955),c=r(4445),g=r(6853),y=r(5837),d=r(9916);const f=new class{constructor(){this.bitCache=new Map,this.comboResourcesCache=new Map}getBitType(e){var t;return(null==e?void 0:e.startsWith("|"))&&(e=e.substring(1)),null!==(t=l.BitType.fromValue(e))&&void 0!==t?t:l.BitType._error}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!!(null==e?void 0:e.startsWith("|"))}getBitConfig(e){var t;let r=this.bitCache.get(e);if(!r){const o=()=>{throw new Error(`No config found for bit: ${e}`)},n=[],a=[];let s=e;for(;s;){const e=g.BITS[s];e||o(),n.push(s),a.push(e),s=e.baseBitType}a.reverse();const l=a.reduce(((e,t)=>e=p.ObjectUtils.deepMerge(e,t)),{}),{since:y,textFormatDefault:d,tags:f,cardSet:m,deprecated:h,bodyAllowed:T,bodyRequired:b,footerAllowed:v,footerRequired:B,resourceAttachmentAllowed:C,rootExampleType:P}=l,k=this.getAllResourcesTagsWithZeroCounts(),x=c.ConfigHydrator.hydrateTagsConfig(null!=f?f:[]),S=c.ConfigHydrator.hydrateCardSetConfig(m),K=null===(t=x.info)||void 0===t?void 0:t.comboResourceType,w=Object.assign({},x.tags);for(const[e,t]of Object.entries(k))w[e]||(w[e]=t);r=new i.BitConfig(y,e,n,null!=d?d:u.TextFormat.bitmarkMinusMinus,w,S,h,T,b,v,B,C,P,K),this.bitCache.set(e,r)}return r}getRawPropertiesConfig(){return d.PROPERTIES}getTagConfigForTag(e,t){if(e)for(const[,r]of Object.entries(e))if(r.tag===t)return r}getTagsConfigForCardSet(e,t,r){const i=this.getBitConfig(e);if(!i)return;const o=i.cardSet;if(!o)return;t=Math.min(t,o.variants.length-1);const n=o.variants[t];return n[r=Math.min(r,n.length-1)].tags}getBitResourcesConfig(e,t){var r;let i={};const a=new Map,l=this.getBitConfig(e),u={};for(const[e,t]of Object.entries(l.tags))t.type===s.BitTagType.resource&&(u[e]=t);const p=null!==(r=l.comboResourceType)&&void 0!==r?r:l.resourceAttachmentAllowed&&t;if(p){const e=new Map,r=this.getComboResource(p);if(r){const t=Object.values(r).filter((e=>e.type===s.BitTagType.resource));t.map((e=>e.tag)).forEach((r=>{const i=t.find((e=>e.tag===r));i&&e.set(r,i)}));const i=this.getComboResourceTagTypes(p);i&&i.length>0&&a.set(p,i)}if(t)for(const[t,r]of Object.entries(u)){const n=p===r.tag,a=!!e&&e.has(r.tag);if(n){const e=new o.ResourceTagConfig(r.configKey,r.tag,1,1,r.chain,r.jsonKey,r.deprecated);i[t]=e}else if(a){if(e){const o=e.get(r.tag);o&&(i[t]=o)}}else i[t]=r}else i=u}else i=u;return new n.ResourcesConfig(i,l.resourceAttachmentAllowed,t,a)}getComboResourceTagTypes(e){const t=this.getComboResource(e);if(t){return Object.values(t).filter((e=>e.type===s.BitTagType.resource)).map((e=>e.tag))}}getComboResource(e){if(!e)return;let t=this.comboResourcesCache.get(e);return t||(t={},Object.values(y.GROUPS).filter((t=>t.type===a.GroupConfigType.comboResource&&t.comboResourceType===e)).forEach((e=>{t=Object.assign(Object.assign({},t),c.ConfigHydrator.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(y.GROUPS).filter((e=>e.type===a.GroupConfigType.resource)).forEach((t=>{e=Object.assign(Object.assign({},e),c.ConfigHydrator.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}};t.Config=f},4445:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigHydrator=void 0;const i=r(5814),o=r(9371),n=r(9788),a=r(1519),s=r(9600),l=r(5591),u=r(7112),p=r(9888),c=r(5051),g=r(7797),y=r(5512),d=r(5554),f=r(5837),m=r(9916),h=r(168),T=r(9248);const b=new class{hydrateTagsConfig(e){var t;const r={tags:{}};for(const i of e){let e;switch(i.type){case y.BitTagType.tag:e=this.hydrateTagConfig(i);break;case y.BitTagType.property:e=this.hydratePropertyTagConfig(i);break;case y.BitTagType.resource:e=this.hydrateResourceTagConfig(i);break;case y.BitTagType.group:e=this.hydrateTagGroupConfig(i)}e&&(r.tags=Object.assign(Object.assign({},r.tags),e.tags),r.info=Object.assign(null!==(t=r.info)&&void 0!==t?t:{},e.info))}return r}hydrateCardSetConfig(e){if(!e)return;const t=d.CARDS[e];if(!t)throw new Error(`No config found for card set config key '${e}'`);const r=[];for(const e of t.variants){const t=[];for(const r of e){const e=this.hydrateCardVariantConfig(r);t.push(e)}r.push(t)}return new i.CardSetConfig(e,r)}hydrateTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,a=g.TagConfigKey.fromKey(t)||l.ConfigKey._unknown,s=T.TAGS[a];if(!s)throw new Error(`No config found for tag config key '${t}'`);const{tag:u,deprecated:p}=s;let c;o&&(c=this.hydrateTagsConfig(o).tags);return{tags:{[a]:new n.MarkupTagConfig(a,u,null!=r?r:1,null!=i?i:0,c,p)}}}hydratePropertyTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,n=p.PropertyConfigKey.fromKey(t)||l.ConfigKey._unknown,s=m.PROPERTIES[n];if(!s)throw new Error(`No config found for property config key '${t}'`);const{tag:u,deprecated:c,single:g,format:y,defaultValue:d,jsonKey:f,astKey:h}=s;let T;o&&(T=this.hydrateTagsConfig(o).tags);return{tags:{[n]:new a.PropertyTagConfig(n,u,null!=r?r:1,null!=i?i:0,T,f,h,g,y,d,c)}}}hydrateResourceTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,n=c.ResourceConfigKey.fromKey(t)||l.ConfigKey._unknown,a=h.RESOURCES[n];if(!a)throw new Error(`No config found for resource config key '${t}'`);const{tag:u,deprecated:p,jsonKey:g}=a;let y;o&&(y=this.hydrateTagsConfig(o).tags);return{tags:{[n]:new s.ResourceTagConfig(n,u,null!=r?r:1,null!=i?i:0,y,g,p)}}}hydrateTagGroupConfig(e){var t,r;const{configKey:i}=e,o=u.GroupConfigKey.fromKey(i)||l.ConfigKey._unknown,n=f.GROUPS[o];if(!n)throw new Error(`No config found for group config key '${i}'`);const{tags:a}=n,s=this.hydrateTagsConfig(a).tags,p=Object.values(s);if(p.length>0){const i=p[0],o=i;o.maxCount=null!==(t=e.maxCount)&&void 0!==t?t:i.maxCount,o.minCount=null!==(r=e.minCount)&&void 0!==r?r:i.minCount}return{tags:s,info:{comboResourceType:n.comboResourceType}}}hydrateCardVariantConfig(e){const{tags:t,bodyAllowed:r,bodyRequired:i,repeatCount:n}=e,a=this.hydrateTagsConfig(t);return new o.CardVariantConfig(a.tags,r,i,n)}};t.ConfigHydrator=b},6853:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BITS=void 0;const i=r(8199),o=r(7112),n=r(9888),a=r(7797),s=r(5512),l=r(5854),u=r(3778),p=r(363),c=r(385),g={[l.BitType._error]:{since:"1.3.0",tags:[]},[l.BitType._comment]:{since:"1.4.12",tags:[]},[l.BitType.appFlashcards]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.flashcardSet,maxCount:u.Count.infinity}],rootExampleType:p.ExampleType.string},[l.BitType.appFlashcardsQuiz]:{since:"1.3.0",baseBitType:l.BitType.appFlashcards},[l.BitType.appFlashcardsLearn]:{since:"1.3.0",baseBitType:l.BitType.appFlashcards},[l.BitType.appLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAppLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.article]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title}]},[l.BitType.statement]:{since:"1.3.0",baseBitType:l.BitType.article},[l.BitType.buttonCopyText]:{since:"1.4.3",baseBitType:l.BitType.article,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[l.BitType.appBitmarkFromJavascript]:{since:"1.4.5",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.maxCreatedBits}],textFormatDefault:c.TextFormat.text},[l.BitType.appBitmarkFromEditor]:{since:"1.4.5",baseBitType:l.BitType.appBitmarkFromJavascript},[l.BitType.articleEmbed]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleEmbed,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.articleLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.audio]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudio,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.audioEmbed]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioEmbed,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.audioLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.bitAlias]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.tag_reference},{type:s.BitTagType.tag,configKey:a.TagConfigKey.anchor}]},[l.BitType.book]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_bookCommon}]},[l.BitType.bookAcknowledgments]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookAddendum]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookAfterword]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookAppendix]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookArticle]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookAutherBio]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookBibliography]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookComingSoon]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookConclusion]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookCopyright]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookCopyrightPermissions]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookDedication]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookEndnotes]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookEpigraph]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookEpilogue]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookForword]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookFrontispiece]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookImprint]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookIncitingIncident]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookIntroduction]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookListOfContributors]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookNotes]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookPostscript]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookPreface]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookPrologue]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookReadMore]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookReferenceList]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookRequestForABookReview]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookSummary]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookTeaser]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookTitle]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookAlias]:{since:"1.4.3",baseBitType:l.BitType.book,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.bookAlias,maxCount:u.Count.infinity}]},[l.BitType.botActionResponse]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}],cardSet:i.CardSetConfigKey._botActionResponses},[l.BitType.botActionSend]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.date}]},[l.BitType.browserImage]:{since:"1.3.0",baseBitType:l.BitType.image,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[l.BitType.card1]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[l.BitType.question1]:{since:"1.3.0",baseBitType:l.BitType.card1},[l.BitType.survey1]:{since:"1.3.0",baseBitType:l.BitType.card1},[l.BitType.surveyAnonymous1]:{since:"1.3.0",baseBitType:l.BitType.card1},[l.BitType.chapter]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.anchor},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.toc},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.progress}]},[l.BitType.clozeAndMultipleChoiceText]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_gap},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[l.BitType.coachCallToActionClozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:l.BitType.clozeAndMultipleChoiceText},[l.BitType.cloze]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.quizCountItems},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.quizStrikethroughSolutions},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]},[l.BitType.clozeInstructionGrouped]:{since:"1.3.0",baseBitType:l.BitType.cloze},[l.BitType.clozeSolutionGrouped]:{since:"1.3.0",baseBitType:l.BitType.cloze},[l.BitType.gapText]:{since:"1.5.15",baseBitType:l.BitType.cloze},[l.BitType.gapTextInstructionGrouped]:{since:"1.5.15",baseBitType:l.BitType.clozeInstructionGrouped},[l.BitType.coachSelfReflectionCloze]:{since:"1.3.0",baseBitType:l.BitType.cloze},[l.BitType.coachCallToActionCloze]:{since:"1.3.0",baseBitType:l.BitType.cloze},[l.BitType.clozeList]:{since:"1.4.13",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}],cardSet:i.CardSetConfigKey._clozeList},[l.BitType.code]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.computerLanguage},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.codeLineNumbers},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.codeMinimap}],textFormatDefault:c.TextFormat.text},[l.BitType.appCodeCell]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.appCodeEditor]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.appCodeIde]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.codeRuntime]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.consoleLog]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.output]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.stdout]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.step]:{since:"1.5.1",baseBitType:l.BitType.example},[l.BitType.stepImageScreenshot]:{since:"1.5.1",baseBitType:l.BitType.image},[l.BitType.stepImageScreenshotWithPointer]:{since:"1.5.1",baseBitType:l.BitType.image,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1}]},[l.BitType.conversationLeft1]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_person}]},[l.BitType.conversationLeft1Scream]:{since:"1.3.0",baseBitType:l.BitType.conversationLeft1},[l.BitType.conversationLeft1Thought]:{since:"1.3.0",baseBitType:l.BitType.conversationLeft1},[l.BitType.conversationRight1]:{since:"1.3.0",baseBitType:l.BitType.conversationLeft1},[l.BitType.conversationRight1Scream]:{since:"1.3.0",baseBitType:l.BitType.conversationLeft1},[l.BitType.conversationRight1Thought]:{since:"1.3.0",baseBitType:l.BitType.conversationLeft1},[l.BitType.cookPreparation]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookStep]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookIngredients]:{since:"1.5.16",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_technicalTerm},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.servings,chain:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation},{type:s.BitTagType.tag,configKey:a.TagConfigKey.hint}]}],cardSet:i.CardSetConfigKey._ingredients},[l.BitType.recipe]:{since:"1.5.24",baseBitType:l.BitType.cookIngredients},[l.BitType.cookRemark]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookVariation]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookInsert]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookArrangement]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookPracticeAdvise]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookPlate]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookRecommendation]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookPersonalRecommendation]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookSideDrink]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookSideDish]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookTimer]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.document]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocument,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.documentDownload]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentDownload,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.documentEmbed]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentEmbed,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.documentLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.essay]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.partialAnswer},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.property_reference,maxCount:u.Count.infinity}],rootExampleType:p.ExampleType.string},[l.BitType.coachSelfReflectionEssay]:{since:"1.3.0",baseBitType:l.BitType.essay},[l.BitType.coachCallToActionEssay]:{since:"1.3.0",baseBitType:l.BitType.essay},[l.BitType.example]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title}],rootExampleType:p.ExampleType.string},[l.BitType.appAiPrompt]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.aiPrompt]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.articleAi]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.articleAttachment]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.assignment]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.audioTranscript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.bitmarkExample]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.blogArticle]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.bug]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.checklist]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.coachAudioTranscript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.coachCallToActionChecklist]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.coachHomeRules]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.coachVideoTranscript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.correction]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.danger]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.details1]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.details]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.editorial]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.editorNote]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.featured]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.help]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.hint]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.info]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLearningOutcomes]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langEnablingLanguageSkills]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLifeSkills]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langEnglishAroundWorld]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langGoodToKnow]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLearningGoal]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLearningStrategy]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLikeALocal]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langMaterial]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langUsefulPhrases]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLevelDown]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLevelUp]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langExtraActivity]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langVideoScript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langAudioScript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langVocabulary]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langHomework]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langTeacherNote]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langTeacherPronunciation]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.message]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.newspaperArticle]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.note]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.noteAi]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.notebookArticle]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.preparationNote]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.releaseNotesSummary]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.remark]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.selfAssessment]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.separator]:{since:"1.4.15",baseBitType:l.BitType.example},[l.BitType.sticker]:{since:"1.5.28",baseBitType:l.BitType.example},[l.BitType.sideNote]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.summary]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.summaryAi]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.videoTranscript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.warning]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.workbookArticle]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.module]:{since:"1.5.26",baseBitType:l.BitType.example,tags:[{type:s.BitTagType.property,configKey:n.propertyConfigKeys.hasBookNavigation},{type:s.BitTagType.property,configKey:n.propertyConfigKeys.productId,maxCount:u.Count.infinity},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.duration}]},[l.BitType.exampleList]:{since:"1.4.13",baseBitType:l.BitType.example,cardSet:i.CardSetConfigKey._exampleBitList,rootExampleType:p.ExampleType.string},[l.BitType.extractorPage]:{since:"1.5.17",baseBitType:l.BitType.image},[l.BitType.extractorPageWithBlocks]:{since:"1.5.21",baseBitType:l.BitType.image},[l.BitType.extractorBlock]:{since:"1.5.16",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.blockId},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.pageNo},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.x},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.y},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.index},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.classification},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.availableClassifications,maxCount:u.Count.infinity},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.extractorRepeatedText]:{since:"1.5.21",baseBitType:l.BitType.article},[l.BitType.extractorPageNumber]:{since:"1.5.21",baseBitType:l.BitType.article},[l.BitType.extractorPageHeader]:{since:"1.5.21",baseBitType:l.BitType.article},[l.BitType.extractorPageFooter]:{since:"1.5.21",baseBitType:l.BitType.article},[l.BitType.pageOpenBook]:{since:"1.5.10",baseBitType:l.BitType.example,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.book},{type:s.BitTagType.tag,configKey:a.TagConfigKey.tag_reference},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[l.BitType.pageSubscribe]:{since:"1.5.10",baseBitType:l.BitType.example,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.mailingList}]},[l.BitType.assignmentList]:{since:"1.4.13",baseBitType:l.BitType.exampleList},[l.BitType.pageFooter]:{since:"1.4.13",baseBitType:l.BitType.exampleList},[l.BitType.flashcard]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}],cardSet:i.CardSetConfigKey._flashcards},[l.BitType.flashcard1]:{since:"1.3.0",baseBitType:l.BitType.flashcard},[l.BitType.focusImage]:{since:"1.3.0",baseBitType:l.BitType.image,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[l.BitType.highlightText]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[l.BitType.image]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.backgroundWallpaper},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.appCreateBitsFromImage]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.appGetScreenshot]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.detailsImage]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.figure]:{since:"1.3.0",deprecated:"1.4.0",baseBitType:l.BitType.image},[l.BitType.imageBanner]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageFigure]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageLandscape]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageMood]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imagePortrait]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imagePrototype]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageSeparator]:{since:"1.4.15",baseBitType:l.BitType.image},[l.BitType.imageScreenshot]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageStyled]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageSuperWide]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageZoom]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.langLifeSkillIcon]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.lifeSkillSticker]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.pageBanner]:{since:"1.4.3",baseBitType:l.BitType.image},[l.BitType.screenshot]:{since:"1.3.0",deprecated:"1.4.0",baseBitType:l.BitType.image},[l.BitType.tableImage]:{since:"1.5.15",baseBitType:l.BitType.image,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.caption}]},[l.BitType.imageLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.imageOnDevice]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_imageSource}],resourceAttachmentAllowed:!1},[l.BitType.imageResponsive]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageResponsive}],resourceAttachmentAllowed:!1},[l.BitType.imagesLogoGrave]:{since:"1.5.11",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1,maxCount:u.Count.infinity}],resourceAttachmentAllowed:!1},[l.BitType.prototypeImages]:{since:"1.6.1",baseBitType:l.BitType.imagesLogoGrave},[l.BitType.internalLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.tag_reference}]},[l.BitType.interview]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars}],cardSet:i.CardSetConfigKey._questions},[l.BitType.interviewInstructionGrouped]:{since:"1.3.0",baseBitType:l.BitType.interview},[l.BitType.botInterview]:{since:"1.3.0",baseBitType:l.BitType.interview},[l.BitType.learningPathBook]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_learningPathCommon}]},[l.BitType.bookLink]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.bookLinkNext]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.bookLinkPrev]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathClassroomEvent]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathClassroomTraining]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathClosing]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathFeedback]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathLearningGoal]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathLti]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathSign]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathStep]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathBotTraining]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.bot}]},[l.BitType.learningPathExternalLink]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.externalLink},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.externalLinkText}]},[l.BitType.learningPathVideoCall]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.videoCallLink}]},[l.BitType.mark]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_markConfig},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_mark}]},[l.BitType.match]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],cardSet:i.CardSetConfigKey._matchPairs},[l.BitType.matchAll]:{since:"1.3.0",baseBitType:l.BitType.match},[l.BitType.matchReverse]:{since:"1.3.0",baseBitType:l.BitType.match},[l.BitType.matchAllReverse]:{since:"1.3.0",baseBitType:l.BitType.match},[l.BitType.matchSolutionGrouped]:{since:"1.3.0",baseBitType:l.BitType.match},[l.BitType.matchMatrix]:{since:"1.3.0",baseBitType:l.BitType.match,cardSet:i.CardSetConfigKey._matchMatrix},[l.BitType.matchAudio]:{since:"1.3.0",baseBitType:l.BitType.match,cardSet:i.CardSetConfigKey._matchAudioPairs},[l.BitType.matchPicture]:{since:"1.3.0",baseBitType:l.BitType.match,cardSet:i.CardSetConfigKey._matchImagePairs},[l.BitType.multipleChoice1]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[l.BitType.coachSelfReflectionMultipleChoice1]:{since:"1.3.0",baseBitType:l.BitType.multipleChoice1},[l.BitType.multipleChoice]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:i.CardSetConfigKey._quiz},[l.BitType.coachSelfReflectionMultipleChoice]:{since:"1.3.0",baseBitType:l.BitType.multipleChoice},[l.BitType.multipleChoiceText]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[l.BitType.coachCallToActionMultipleChoiceText]:{since:"1.3.0",baseBitType:l.BitType.multipleChoiceText},[l.BitType.coachSelfReflectionMultipleChoiceText]:{since:"1.3.0",baseBitType:l.BitType.multipleChoiceText},[l.BitType.multipleResponse1]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[l.BitType.coachSelfReflectionMultipleResponse1]:{since:"1.3.0",baseBitType:l.BitType.multipleResponse1},[l.BitType.multipleResponse]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:i.CardSetConfigKey._quiz},[l.BitType.coachSelfReflectionMultipleResponse]:{since:"1.3.0",baseBitType:l.BitType.multipleResponse},[l.BitType.page]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.thumbImage}]},[l.BitType.pageBuyButton]:{since:"1.4.3",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.content2Buy},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[l.BitType.pageBuyButtonPromotion]:{since:"1.5.11",baseBitType:l.BitType.pageBuyButton},[l.BitType.pagePerson]:{since:"1.5.16",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_person},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[l.BitType.pageProduct]:{since:"1.4.17",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.product}]},[l.BitType.pageProductList]:{since:"1.4.17",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.productList,maxCount:u.Count.infinity}]},[l.BitType.pageProductVideo]:{since:"1.4.17",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.productVideo}]},[l.BitType.pageProductVideoList]:{since:"1.4.17",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.productVideoList,maxCount:u.Count.infinity}]},[l.BitType.pageSectionFolder]:{since:"1.4.17",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.productFolder}]},[l.BitType.photo]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.quote]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.quotedPerson}]},[l.BitType.rating]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[l.BitType.coachSelfReflectionRating]:{since:"1.3.0",baseBitType:l.BitType.rating},[l.BitType.releaseNote]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.releaseVersion},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.releaseKind},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.releaseDate}]},[l.BitType.reviewNote]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.resolved},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.resolvedDate},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.resolvedBy}],rootExampleType:p.ExampleType.string},[l.BitType.reviewAuthorNote]:{since:"1.3.0",baseBitType:l.BitType.reviewNote},[l.BitType.reviewReviewerNote]:{since:"1.3.0",baseBitType:l.BitType.reviewNote},[l.BitType.reviewRequestForReviewNote]:{since:"1.3.0",baseBitType:l.BitType.reviewNote},[l.BitType.reviewApprovedNote]:{since:"1.3.0",baseBitType:l.BitType.reviewNote},[l.BitType.sampleSolution]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.anchor},{type:s.BitTagType.tag,configKey:a.TagConfigKey.tag_reference}]},[l.BitType.sequence]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}],cardSet:i.CardSetConfigKey._elements,rootExampleType:p.ExampleType.boolean},[l.BitType.stillImageFilm]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilm}],resourceAttachmentAllowed:!1},[l.BitType.stillImageFilmEmbed]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmEmbed,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.stillImageFilmLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.surveyAnonymous]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[l.BitType.survey]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[l.BitType.surveyMatrix]:{since:"1.6.2",baseBitType:l.BitType.image,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption,minCount:1,maxCount:1}]},[l.BitType.surveyMatrixMe]:{since:"1.6.2",baseBitType:l.BitType.surveyMatrix},[l.BitType.surveyRating]:{since:"1.6.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelStart,chain:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelEnd,chain:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelSelected}]},[l.BitType.surveyRatingOnce]:{since:"1.6.0",baseBitType:l.BitType.surveyRating},[l.BitType.surveyRatingDisplay]:{since:"1.6.0",baseBitType:l.BitType.surveyRating},[l.BitType.scorm]:{since:"1.5.11",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.scormSource},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.posterImage}]},[l.BitType.table]:{since:"1.5.19",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableFixedHeader},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableSearch},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableSort},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tablePagination},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tablePaginationLimit},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableHeight},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableWhitespaceNoWrap},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableAutoWidth},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableResizableColumns}],cardSet:i.CardSetConfigKey._table},[l.BitType.toc]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[l.BitType.tocChapter]:{since:"1.5.5",baseBitType:l.BitType.toc,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.maxDisplayLevel}]},[l.BitType.anchor]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.bitBookEnding]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.bitBookSummary]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.botActionAnnounce]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.botActionRatingNumber]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.botActionRemind]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.botActionSave]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.botActionTrueFalse]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.chapterSubjectMatter]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.chat]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.conclusion]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.documentUpload]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.footNote]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.groupBorn]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.groupDied]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.recordAudio]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.recordVideo]:{since:"1.5.24",baseBitType:l.BitType.toc},[l.BitType.stickyNote]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.takePicture]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.handInAudio]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInContact]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInDocument]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInLocation]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInPhoto]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInScan]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInVideo]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInVoice]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.trueFalse1]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse},{type:s.BitTagType.tag,configKey:a.TagConfigKey.true},{type:s.BitTagType.tag,configKey:a.TagConfigKey.false}],rootExampleType:p.ExampleType.boolean},[l.BitType.trueFalse]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse}],cardSet:i.CardSetConfigKey._statements},[l.BitType.vendorAmcharts5Chart]:{since:"1.5.8",baseBitType:l.BitType.code,tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}],textFormatDefault:c.TextFormat.json},[l.BitType.vendorHighchartsChart]:{since:"1.5.28",baseBitType:l.BitType.vendorAmcharts5Chart},[l.BitType.vendorIframelyEmbed]:{since:"1.5.10",baseBitType:l.BitType.code,tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.vendorUrl}],textFormatDefault:c.TextFormat.text},[l.BitType.vendorIframelyCard]:{since:"1.5.10",baseBitType:l.BitType.vendorIframelyEmbed},[l.BitType.vendorIframelyPreview]:{since:"1.5.10",baseBitType:l.BitType.vendorIframelyEmbed},[l.BitType.vendorIframelyPreviewMini]:{since:"1.5.10",baseBitType:l.BitType.vendorIframelyEmbed},[l.BitType.vendorJupyterOutput]:{since:"1.4.3",baseBitType:l.BitType.code,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.jupyterId},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.jupyterExecutionCount}],textFormatDefault:c.TextFormat.text},[l.BitType.vendorJupyterCellCode]:{since:"1.4.3",baseBitType:l.BitType.vendorJupyterOutput},[l.BitType.vendorJupyterCellMarkdown]:{since:"1.4.3",baseBitType:l.BitType.vendorJupyterOutput},[l.BitType.vendorJupyterCellRaw]:{since:"1.4.3",baseBitType:l.BitType.vendorJupyterOutput},[l.BitType.vendorJupyterIpynb]:{since:"1.4.3",baseBitType:l.BitType.vendorJupyterOutput},[l.BitType.vendorPadletEmbed]:{since:"1.3.0",baseBitType:l.BitType.code,tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.padletId}],textFormatDefault:c.TextFormat.text},[l.BitType.video]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideo,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.videoLandscape]:{since:"1.3.0",baseBitType:l.BitType.video},[l.BitType.videoPortrait]:{since:"1.3.0",baseBitType:l.BitType.video},[l.BitType.videoEmbed]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoEmbed,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.videoEmbedLandscape]:{since:"1.3.0",baseBitType:l.BitType.videoEmbed},[l.BitType.videoEmbedPortrait]:{since:"1.3.0",baseBitType:l.BitType.videoEmbed},[l.BitType.videoLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.videoLinkLandscape]:{since:"1.3.0",baseBitType:l.BitType.videoLink},[l.BitType.videoLinkPortrait]:{since:"1.3.0",baseBitType:l.BitType.videoLink},[l.BitType.websiteLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceWebsiteLink,minCount:1}],resourceAttachmentAllowed:!1}};t.BITS=g},5554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARDS=void 0;const i=r(8199),o=r(7112),n=r(9888),a=r(5051),s=r(7797),l=r(5512),u=r(3778),p={[i.CardSetConfigKey._flashcards]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._elements]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._statements]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:1},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:1},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[i.CardSetConfigKey._quiz]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[i.CardSetConfigKey._questions]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.tag,configKey:s.TagConfigKey.sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._matchPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._matchAudioPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._matchImagePairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._matchMatrix]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._table]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._botActionResponses]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reaction},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}]}]]},[i.CardSetConfigKey._clozeList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]}]]},[i.CardSetConfigKey._exampleBitList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._ingredients]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation}],repeatCount:u.Count.infinity}]]}};t.CARDS=p},5837:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GROUPS=void 0;const i=r(7112),o=r(6915),n=r(9888),a=r(5051),s=r(7797),l=r(5512),u=r(3778),p=r(6149),c={[i.GroupConfigKey.group_standardAllBits]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.id,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalId,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.aiGenerated},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ageRange,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisher,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisherName,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.theme,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.target,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tag,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.icon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.iconTag},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.colorTag,maxCount:u.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.search}]},[i.GroupConfigKey.group_standardItemLeadInstructionHint]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,maxCount:3}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.instruction},{type:l.BitTagType.tag,configKey:s.TagConfigKey.hint}]},[i.GroupConfigKey.group_standardExample]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.example}]},[i.GroupConfigKey.group_standardTags]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardAllBits},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]},[i.GroupConfigKey.group_imageSource]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageSource,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mockupId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.size},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.format},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.trim}]}]},[i.GroupConfigKey.group_technicalTerm]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.technicalTerm,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang}]}]},[i.GroupConfigKey.group_person]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.person,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partner,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage}]}]},[i.GroupConfigKey.group_gap]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:u.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:u.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}]}]},[i.GroupConfigKey.group_trueFalse]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:u.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:u.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:u.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:u.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:u.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:u.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]}]},[i.GroupConfigKey.group_markConfig]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.markConfig,maxCount:u.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.color},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.emphasis}]}]},[i.GroupConfigKey.group_mark]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_mark,maxCount:u.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_mark},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]}]},[i.GroupConfigKey.group_bookCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.language,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.spaceId,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.kind},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.hasMarkAsDone},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isPublic},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title,maxCount:2},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subtype,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverImage,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverColor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subject,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.author,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publications,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration}]},[i.GroupConfigKey.group_learningPathCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.action},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.date},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.location},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.list,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.textReference},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTracked},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isInfoOnly},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.deeplink},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]}]},[i.GroupConfigKey.group_resourceCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.license},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.copyright},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showInIndex}]},[i.GroupConfigKey.group_resourceImageCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.zoomDisabled}]},[i.GroupConfigKey.group_resourceAudioCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay}]},[i.GroupConfigKey.group_resourceVideoCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.allowSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.posterImage},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x}]},[i.GroupConfigKey.group_resourceImage]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImagePortrait]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imagePortrait,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageLandscape]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLandscape,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceAudio]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceAudioEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceAudioLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceVideo]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.video,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceVideoEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceVideoLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilmEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilmLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceArticle]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.article,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceArticleEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceArticleLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocument]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.document,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentDownload]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentDownload,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceAppLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.appLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceWebsiteLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.websiteLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilm]:{type:o.GroupConfigType.comboResource,comboResourceType:p.ResourceTag.stillImageFilm,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudio,maxCount:1,minCount:1}]},[i.GroupConfigKey.group_resourceImageResponsive]:{type:o.GroupConfigType.comboResource,comboResourceType:p.ResourceTag.imageResponsive,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImagePortrait,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageLandscape,maxCount:1,minCount:1}]}};t.GROUPS=c},9916:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTIES=void 0;const i=r(9888),o=r(7203),n=r(9727),a=r(166),s={[i.PropertyConfigKey.id]:{tag:a.PropertyTag.id,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.internalComment]:{tag:a.PropertyTag.internalComment,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.externalId]:{tag:a.PropertyTag.externalId,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.spaceId]:{tag:a.PropertyTag.spaceId,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.padletId]:{tag:a.PropertyTag.padletId,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.jupyterId]:{tag:a.PropertyTag.jupyterId,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.jupyterExecutionCount]:{tag:a.PropertyTag.jupyterExecutionCount,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.aiGenerated]:{tag:a.PropertyTag.tag_aiGenerated,single:!0,format:n.PropertyFormat.boolean,astKey:o.PropertyAstKey.ast_aiGenerated},[i.PropertyConfigKey.releaseVersion]:{tag:a.PropertyTag.releaseVersion,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.releaseKind]:{tag:a.PropertyTag.releaseKind,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.releaseDate]:{tag:a.PropertyTag.releaseDate,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.resolved]:{tag:a.PropertyTag.resolved,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.resolvedDate]:{tag:a.PropertyTag.resolvedDate,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.resolvedBy]:{tag:a.PropertyTag.resolvedBy,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.ageRange]:{tag:a.PropertyTag.ageRange,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.lang]:{tag:a.PropertyTag.lang,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.language]:{tag:a.PropertyTag.language,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.computerLanguage]:{tag:a.PropertyTag.computerLanguage,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.target]:{tag:a.PropertyTag.target,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.tag]:{tag:a.PropertyTag.tag,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.icon]:{tag:a.PropertyTag.icon,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.iconTag]:{tag:a.PropertyTag.iconTag,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.colorTag]:{tag:a.PropertyTag.colorTag,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.flashcardSet]:{tag:a.PropertyTag.flashcardSet,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.subtype]:{tag:a.PropertyTag.subtype,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.bookAlias]:{tag:a.PropertyTag.bookAlias,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.coverImage]:{tag:a.PropertyTag.coverImage,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.coverColor]:{tag:a.PropertyTag.coverColor,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.publisher]:{tag:a.PropertyTag.publisher,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.publisherName]:{tag:a.PropertyTag.publisherName,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.publications]:{tag:a.PropertyTag.publications,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.author]:{tag:a.PropertyTag.author,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.subject]:{tag:a.PropertyTag.subject,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.date]:{tag:a.PropertyTag.date,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.location]:{tag:a.PropertyTag.location,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.theme]:{tag:a.PropertyTag.theme,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.kind]:{tag:a.PropertyTag.kind,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.hasMarkAsDone]:{tag:a.PropertyTag.hasMarkAsDone,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.isPublic]:{tag:a.PropertyTag.isPublic,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.action]:{tag:a.PropertyTag.action,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.thumbImage]:{tag:a.PropertyTag.thumbImage,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.scormSource]:{tag:a.PropertyTag.scormSource,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.posterImage]:{tag:a.PropertyTag.posterImage,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.focusX]:{tag:a.PropertyTag.focusX,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.focusY]:{tag:a.PropertyTag.focusY,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.deeplink]:{tag:a.PropertyTag.deeplink,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.externalLink]:{tag:a.PropertyTag.externalLink,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.externalLinkText]:{tag:a.PropertyTag.externalLinkText,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.videoCallLink]:{tag:a.PropertyTag.videoCallLink,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.vendorUrl]:{tag:a.PropertyTag.vendorUrl,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.search]:{tag:a.PropertyTag.search,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.bot]:{tag:a.PropertyTag.bot,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.duration]:{tag:a.PropertyTag.duration,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.property_reference]:{tag:a.PropertyTag.tag_reference,format:n.PropertyFormat.trimmedString,astKey:o.PropertyAstKey.ast_referenceProperty},[i.PropertyConfigKey.list]:{tag:a.PropertyTag.list,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.textReference]:{tag:a.PropertyTag.textReference,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.isTracked]:{tag:a.PropertyTag.isTracked,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.isInfoOnly]:{tag:a.PropertyTag.isInfoOnly,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.labelTrue]:{tag:a.PropertyTag.labelTrue,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.labelFalse]:{tag:a.PropertyTag.labelFalse,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.content2Buy]:{tag:a.PropertyTag.content2Buy,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.quotedPerson]:{tag:a.PropertyTag.quotedPerson,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.partialAnswer]:{tag:a.PropertyTag.partialAnswer,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.reasonableNumOfChars]:{tag:a.PropertyTag.reasonableNumOfChars,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.maxCreatedBits]:{tag:a.PropertyTag.maxCreatedBits,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.maxDisplayLevel]:{tag:a.PropertyTag.maxDisplayLevel,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.technicalTerm]:{tag:a.PropertyTag.technicalTerm,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.servings]:{tag:a.PropertyTag.servings,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.unit]:{tag:a.PropertyTag.unit,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.unitAbbr]:{tag:a.PropertyTag.unitAbbr,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.decimalPlaces]:{tag:a.PropertyTag.decimalPlaces,single:!0,format:n.PropertyFormat.number,defaultValue:"1"},[i.PropertyConfigKey.disableCalculation]:{tag:a.PropertyTag.disableCalculation,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.example]:{tag:a.PropertyTag.example,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.toc]:{tag:a.PropertyTag.toc,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[i.PropertyConfigKey.product]:{tag:a.PropertyTag.product,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.productId]:{tag:a.PropertyTag.productId,single:!1,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.productList]:{tag:a.PropertyTag.product,single:!1,format:n.PropertyFormat.trimmedString,astKey:o.PropertyAstKey.ast_productList},[i.PropertyConfigKey.productVideo]:{tag:a.PropertyTag.productVideo,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.productVideoList]:{tag:a.PropertyTag.productVideo,single:!1,format:n.PropertyFormat.trimmedString,astKey:o.PropertyAstKey.ast_productVideoList},[i.PropertyConfigKey.productFolder]:{tag:a.PropertyTag.productFolder,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.progress]:{tag:a.PropertyTag.progress,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[i.PropertyConfigKey.book]:{tag:a.PropertyTag.book,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.person]:{tag:a.PropertyTag.person,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.partner]:{tag:a.PropertyTag.partner,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.property_sampleSolution]:{tag:a.PropertyTag.tag_sampleSolution,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.markConfig]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.trimmedString,astKey:o.PropertyAstKey.ast_markConfig},[i.PropertyConfigKey.property_mark]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.color]:{tag:a.PropertyTag.color,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.emphasis]:{tag:a.PropertyTag.emphasis,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.isCaseSensitive]:{tag:a.PropertyTag.isCaseSensitive,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.reaction]:{tag:a.PropertyTag.reaction,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.imageSource]:{tag:a.PropertyTag.imageSource,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.mockupId]:{tag:a.PropertyTag.mockupId,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.size]:{tag:a.PropertyTag.size,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.format]:{tag:a.PropertyTag.format,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.property_title]:{tag:a.PropertyTag.tag_title,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.trim]:{tag:a.PropertyTag.trim,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.width]:{tag:a.PropertyTag.width,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.height]:{tag:a.PropertyTag.height,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.license]:{tag:a.PropertyTag.license,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.copyright]:{tag:a.PropertyTag.copyright,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.mailingList]:{tag:a.PropertyTag.mailingList,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.buttonCaption]:{tag:a.PropertyTag.buttonCaption,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.caption]:{tag:a.PropertyTag.caption,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.showInIndex]:{tag:a.PropertyTag.showInIndex,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.alt]:{tag:a.PropertyTag.alt,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.zoomDisabled]:{tag:a.PropertyTag.zoomDisabled,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.src1x]:{tag:a.PropertyTag.src1x,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.src2x]:{tag:a.PropertyTag.src2x,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.src3x]:{tag:a.PropertyTag.src3x,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.src4x]:{tag:a.PropertyTag.src4x,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.mute]:{tag:a.PropertyTag.mute,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.autoplay]:{tag:a.PropertyTag.autoplay,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.allowSubtitles]:{tag:a.PropertyTag.allowSubtitles,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.showSubtitles]:{tag:a.PropertyTag.showSubtitles,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.siteName]:{tag:a.PropertyTag.siteName,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.pointerLeft]:{tag:a.PropertyTag.pointerLeft,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.pointerTop]:{tag:a.PropertyTag.pointerTop,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.backgroundWallpaper]:{tag:a.PropertyTag.backgroundWallpaper,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.hasBookNavigation]:{tag:a.PropertyTag.hasBookNavigation,single:!0,defaultValue:"true",format:n.PropertyFormat.boolean},[i.PropertyConfigKey.blockId]:{tag:a.PropertyTag.blockId,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.pageNo]:{tag:a.PropertyTag.pageNo,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.x]:{tag:a.PropertyTag.x,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.y]:{tag:a.PropertyTag.y,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.index]:{tag:a.PropertyTag.index,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.classification]:{tag:a.PropertyTag.classification,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.availableClassifications]:{tag:a.PropertyTag.availableClassifications,single:!1,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.tableFixedHeader]:{tag:a.PropertyTag.tableFixedHeader,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableSearch]:{tag:a.PropertyTag.tableSearch,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableSort]:{tag:a.PropertyTag.tableSort,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tablePagination]:{tag:a.PropertyTag.tablePagination,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tablePaginationLimit]:{tag:a.PropertyTag.tablePaginationLimit,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[i.PropertyConfigKey.tableHeight]:{tag:a.PropertyTag.tableHeight,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[i.PropertyConfigKey.tableWhitespaceNoWrap]:{tag:a.PropertyTag.tableWhitespaceNoWrap,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableAutoWidth]:{tag:a.PropertyTag.tableAutoWidth,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableResizableColumns]:{tag:a.PropertyTag.tableResizableColumns,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.quizCountItems]:{tag:a.PropertyTag.quizCountItems,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.quizStrikethroughSolutions]:{tag:a.PropertyTag.quizStrikethroughSolutions,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.codeLineNumbers]:{tag:a.PropertyTag.codeLineNumbers,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.codeMinimap]:{tag:a.PropertyTag.codeMinimap,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.ratingLevelStart]:{tag:a.PropertyTag.ratingLevelStart,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.ratingLevelEnd]:{tag:a.PropertyTag.ratingLevelEnd,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.ratingLevelSelected]:{tag:a.PropertyTag.ratingLevelSelected,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.label]:{tag:a.PropertyTag.label,single:!0,format:n.PropertyFormat.trimmedString}};t.PROPERTIES=s},168:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RESOURCES=void 0;const i=r(5051),o=r(9984),n=r(6149),a={[i.ResourceConfigKey.image]:{tag:n.ResourceTag.image},[i.ResourceConfigKey.imagePortrait]:{tag:n.ResourceTag.imagePortrait,jsonKey:o.ResourceJsonKey.imagePortrait},[i.ResourceConfigKey.imageLandscape]:{tag:n.ResourceTag.imageLandscape,jsonKey:o.ResourceJsonKey.imageLandscape},[i.ResourceConfigKey.imageEmbed]:{tag:n.ResourceTag.imageEmbed,jsonKey:o.ResourceJsonKey.imageEmbed},[i.ResourceConfigKey.imageLink]:{tag:n.ResourceTag.imageLink,jsonKey:o.ResourceJsonKey.imageLink},[i.ResourceConfigKey.audio]:{tag:n.ResourceTag.audio},[i.ResourceConfigKey.audioEmbed]:{tag:n.ResourceTag.audioEmbed,jsonKey:o.ResourceJsonKey.audioEmbed},[i.ResourceConfigKey.audioLink]:{tag:n.ResourceTag.audioLink,jsonKey:o.ResourceJsonKey.audioLink},[i.ResourceConfigKey.video]:{tag:n.ResourceTag.video},[i.ResourceConfigKey.videoEmbed]:{tag:n.ResourceTag.videoEmbed,jsonKey:o.ResourceJsonKey.videoEmbed},[i.ResourceConfigKey.videoLink]:{tag:n.ResourceTag.videoLink,jsonKey:o.ResourceJsonKey.videoLink},[i.ResourceConfigKey.stillImageFilmEmbed]:{tag:n.ResourceTag.stillImageFilmEmbed,jsonKey:o.ResourceJsonKey.stillImageFilmEmbed},[i.ResourceConfigKey.stillImageFilmLink]:{tag:n.ResourceTag.stillImageFilmLink,jsonKey:o.ResourceJsonKey.stillImageFilmLink},[i.ResourceConfigKey.article]:{tag:n.ResourceTag.article},[i.ResourceConfigKey.articleEmbed]:{tag:n.ResourceTag.articleEmbed,jsonKey:o.ResourceJsonKey.articleEmbed},[i.ResourceConfigKey.articleLink]:{tag:n.ResourceTag.articleLink,jsonKey:o.ResourceJsonKey.articleLink},[i.ResourceConfigKey.document]:{tag:n.ResourceTag.document},[i.ResourceConfigKey.documentEmbed]:{tag:n.ResourceTag.documentEmbed,jsonKey:o.ResourceJsonKey.documentEmbed},[i.ResourceConfigKey.documentLink]:{tag:n.ResourceTag.documentLink,jsonKey:o.ResourceJsonKey.documentLink},[i.ResourceConfigKey.documentDownload]:{tag:n.ResourceTag.documentDownload,jsonKey:o.ResourceJsonKey.documentDownload},[i.ResourceConfigKey.appLink]:{tag:n.ResourceTag.appLink,jsonKey:o.ResourceJsonKey.appLink},[i.ResourceConfigKey.websiteLink]:{tag:n.ResourceTag.websiteLink,jsonKey:o.ResourceJsonKey.websiteLink}};t.RESOURCES=a},9248:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TAGS=void 0;const i=r(7797),o=r(9917),n={[i.TagConfigKey.title]:{tag:o.Tag.tag_title},[i.TagConfigKey.anchor]:{tag:o.Tag.tag_anchor},[i.TagConfigKey.tag_reference]:{tag:o.Tag.tag_reference},[i.TagConfigKey.property]:{tag:o.Tag.tag_property},[i.TagConfigKey.itemLead]:{tag:o.Tag.tag_itemLead},[i.TagConfigKey.instruction]:{tag:o.Tag.tag_instruction},[i.TagConfigKey.hint]:{tag:o.Tag.tag_hint},[i.TagConfigKey.true]:{tag:o.Tag.tag_true},[i.TagConfigKey.false]:{tag:o.Tag.tag_false},[i.TagConfigKey.sampleSolution]:{tag:o.Tag.tag_sampleSolution},[i.TagConfigKey.gap]:{tag:o.Tag.tag_gap},[i.TagConfigKey.tag_mark]:{tag:o.Tag.tag_mark},[i.TagConfigKey.resource]:{tag:o.Tag.tag_resource}};t.TAGS=n},1464:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildInfo=void 0,t.buildInfo={name:"@gmb/bitmark-parser-generator",version:"1.6.3",author:"Get More Brain Ltd",license:"ISC",description:"A bitmark parser and generator using Peggy.js"}},5057:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.SyntaxError=t.StartRules=void 0;const i=r(3029),o=r(3206),n=r(7124);function a(e,t,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,a.prototype),o.expected=t,o.found=r,o.location=i,o.name="SyntaxError",o}function s(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}t.SyntaxError=a,function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(a,Error),a.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(i){var l=this.location.end,u=s("",n.line.toString().length," "),p=i[o.line-1],c=(o.line===l.line?l.column:p.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+u+" |\n"+n.line+" | "+p+"\n"+u+" | "+s("",o.column-1," ")+s("",c,"^")}else t+="\n at "+a}return t},a.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return 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,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return 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,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(a);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."},t.parse=function e(t,r){var s,l={},u=(r=void 0!==r?r:{}).grammarSource,p={bitmark:Ht,bit:function(){var e,t,r,i,o;e=Et,t=[],r=hr();for(;r!==l;)t.push(r),r=hr();if((r=Xt())!==l){for(i=[],o=hr();o!==l;)i.push(o),o=hr();Rt=e,e=Ue(r)}else Et=e,e=l;return e},cardContent:function(){var e,t,r;e=Et,t=[],(r=tr())===l&&(r=ur());for(;r!==l;)t.push(r),(r=tr())===l&&(r=ur());return Rt=e,t=yt(t),e=t}},c=Ht,g="[.",y="]",d=":",f="&",m="====",h="~~~~",T="--",b="++",v="===",B="==",C="[@id",P="[",k="#",x="[▼",S="[►",K="[@",w="[%",A="[!",_="[?",I="[+",L="[-",O="[$",E="[_",R="[=",N="[&",V="^]",F="id:",j="\n",G="\r\n",D=/^[^\]]/,M=/^[^:\]]/,U=/^[^&:\]]/,J=/^[ \t]/,$=/^[^\n\r\u2028\u2029]/,z=/^[\r\u2028-\u2029]/,q=/^[ \t\n\r\u2028\u2029]/,H=Dt("[.",!1),W=Mt(["]"],!0,!1),Y=Dt("]",!1),X=Dt(":",!1),Z=Dt("&",!1),Q={type:"any"},ee=Dt("====",!1),te=Dt("~~~~",!1),re=Dt("--",!1),ie=Dt("++",!1),oe=Dt("===",!1),ne=Dt("==",!1),ae=Dt("[@id",!1),se=Dt("[",!1),le=Dt("#",!1),ue=Dt("[▼",!1),pe=Dt("[►",!1),ce=Dt("[@",!1),ge=Dt("[%",!1),ye=Dt("[!",!1),de=Dt("[?",!1),fe=Dt("[+",!1),me=Dt("[-",!1),he=Dt("[$",!1),Te=Dt("[_",!1),be=Dt("[=",!1),ve=Dt("[&",!1),Be=Dt("^]",!1),Ce=Dt("id:",!1),Pe=Mt([":","]"],!0,!1),ke=Mt(["&",":","]"],!0,!1),xe=(Ut("Empty"),Mt([" ","\t"],!1,!1)),Se=Ut("Anything"),Ke=Ut("Character"),we=Mt(["\n","\r","\u2028","\u2029"],!0,!1),Ae=Ut("Line"),_e=(Ut("whitespace in line"),Ut("Blank Line")),Ie=Ut("Line Terminator"),Le=Dt("\n",!1),Oe=Dt("\r\n",!1),Ee=Mt(["\r",["\u2028","\u2029"]],!1,!1),Re=Ut("Whitespace, then Line Terminator"),Ne=Ut("whitespace"),Ve=Mt([" ","\t","\n","\r","\u2028","\u2029"],!1,!1),Fe=function(e,t){return kr.buildBits([e,...t])},je=function(e){return Pr.handleRawBit(e)},Ge=function(e){return e},De=function(e){return Pr.handleRawBit(e)},Me=function(e){return e},Ue=function(e){return e},Je=function(e,t){return kr.buildBit(e,t)},$e=function(e){return kr.invalidBit(e)},ze=function(e,t){return kr.buildBitHeader(e,t)},qe=function(e,t){return kr.buildTextAndResourceType(e,t)},He=function(e){return Pr.handleTextFormat(e)},We=function(e){return Pr.handleResourceType(e)},Ye=function(e){return Pr.handleBitContent(e)},Xe=function(e){return Pr.handleTagChain(e)},Ze=function(e){return e},Qe=function(e){return Pr.handleBitTag(e)},et=function(e){return{type:i.TypeKey.BodyChar,value:e}},tt=function(e){return Pr.handleCardSet(e[1].flat())},rt=function(){Pr.handleCardSetStart()},it=function(){Pr.handleCardSetEnd()},ot=function(e){return Pr.handleCards(e)},nt=function(e){return Pr.handleCardLineOrDivider(e,2)},at=function(e){return Pr.handleCardLine(e)},st=function(e){return Pr.handleCardSet(e[1].flat())},lt=function(){Pr.handleCardSetStart()},ut=function(){Pr.handleCardSetEnd()},pt=function(e){return Pr.handleCards(e)},ct=function(e){return Pr.handleCardLineOrDivider(e,1)},gt=function(e){return Pr.handleCardLine(e)},yt=function(e){return Pr.handleCardContent(e)},dt=function(e){return{type:i.TypeKey.CardChar,value:e}},ft=function(e){return Pr.handlePropertyTag("id",e)},mt=function(e,t){return Pr.handleTag(i.TypeKey.Title,{level:e,title:t})},ht=function(e){return Pr.handleTag(i.TypeKey.Anchor,e)},Tt=function(e){return Pr.handleTag(i.TypeKey.Reference,e)},bt=function(e,t){return Pr.handlePropertyTag(e,t)},vt=function(e){return Pr.handleTag(i.TypeKey.ItemLead,e)},Bt=function(e){return Pr.handleTag(i.TypeKey.Instruction,e)},Ct=function(e){return Pr.handleTag(i.TypeKey.Hint,e)},Pt=function(e){return Pr.handleTag(i.TypeKey.True,e)},kt=function(e){return Pr.handleTag(i.TypeKey.False,e)},xt=function(e){return Pr.handleTag(i.TypeKey.SampleSolution,e)},St=function(e){return Pr.handleTag(i.TypeKey.Gap,e)},Kt=function(e){return Pr.handleTag(i.TypeKey.Mark,e)},wt=function(e,t){return Pr.handleResourceTag(e,t)},At=function(e){return e},_t=function(e){return e?e.trim():""},It=function(e){return e?e.trim():null},Lt=function(e){return e?e.trim():""},Ot=function(){return!0},Et=0|r.peg$currPos,Rt=Et,Nt=[{line:1,column:1}],Vt=Et,Ft=r.peg$maxFailExpected||[],jt=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in p))throw new Error("Can't start parsing from rule \""+r.startRule+'".');c=p[r.startRule]}function Gt(){return t.substring(Rt,Et)}function Dt(e,t){return{type:"literal",text:e,ignoreCase:t}}function Mt(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Ut(e){return{type:"other",description:e}}function Jt(e){var r,i=Nt[e];if(i)return i;if(e>=Nt.length)r=Nt.length-1;else for(r=e;!Nt[--r];);for(i={line:(i=Nt[r]).line,column:i.column};r<e;)10===t.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return Nt[e]=i,i}function $t(e,t,r){var i=Jt(e),o=Jt(t),n={source:u,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return r&&u&&"function"==typeof u.offset&&(n.start=u.offset(n.start),n.end=u.offset(n.end)),n}function zt(e){Et<Vt||(Et>Vt&&(Vt=Et,Ft=[]),Ft.push(e))}function qt(e,t,r){return new a(a.buildMessage(e,t),e,t,r)}function Ht(){return function(){var e,r,i,o;e=Et,r=[],i=vr();for(;i!==l;)r.push(i),i=vr();return i=function(){var e,r,i,o;e=Et,r=Et,i=[],o=Yt();for(;o!==l;)i.push(o),o=Yt();return r=t.substring(r,Et),Rt=e,r=je(r),e=r,e}(),o=function(){var e,t;e=[],t=Wt();for(;t!==l;)e.push(t),t=Wt();return e}(),Rt=e,e=Fe(i,o),e}()}function Wt(){var e,r,i,o;for(e=Et,r=[],i=hr();i!==l;)r.push(i),i=hr();return(i=Tr())===l&&(i=null),o=function(){var e,r,i,o,n,a;if(e=Et,r=Et,i=Et,o=function(){var e,r,i,o;e=Et,t.substr(Et,2)===g?(r=g,Et+=2):(r=l,0===jt&&zt(H));if(r!==l){for(i=[],o=t.charAt(Et),D.test(o)?Et++:(o=l,0===jt&&zt(W));o!==l;)i.push(o),o=t.charAt(Et),D.test(o)?Et++:(o=l,0===jt&&zt(W));93===t.charCodeAt(Et)?(o=y,Et++):(o=l,0===jt&&zt(Y)),o!==l?(Rt=e,e=Me(r)):(Et=e,e=l)}else Et=e,e=l;return e}(),o!==l){for(n=[],a=Yt();a!==l;)n.push(a),a=Yt();i=o=[o,n]}else Et=i,i=l;r=i!==l?t.substring(r,Et):i;r!==l&&(Rt=e,r=De(r));return e=r,e}(),o!==l?(Rt=e,e=Ge(o)):(Et=e,e=l),e}function Yt(){var e,t,r,i;if(e=Et,(t=Tr())!==l?(r=Et,jt++,i=Zt(),jt--,i===l?r=void 0:(Et=r,r=l),r!==l?e=t=[t,r]:(Et=e,e=l)):(Et=e,e=l),e===l)if(e=[],(t=fr())!==l)for(;t!==l;)e.push(t),t=fr();else e=l;return e}function Xt(){var e,r,i;return e=Et,(r=Zt())!==l?(i=function(){var e,t,r;e=Et,t=[],r=nr(),r===l&&(r=sr())===l&&(r=tr())===l&&(r=or());for(;r!==l;)t.push(r),(r=nr())===l&&(r=sr())===l&&(r=tr())===l&&(r=or());return Rt=e,t=Ye(t),e=t,e}(),Rt=e,e=Je(r,i)):(Et=e,e=l),e===l&&(e=Et,r=Et,i=function(){var e,r;jt++,e=[],t.length>Et?(r=t.charAt(Et),Et++):(r=l,0===jt&&zt(Q));for(;r!==l;)e.push(r),t.length>Et?(r=t.charAt(Et),Et++):(r=l,0===jt&&zt(Q));jt--,r=l,0===jt&&zt(Se);return e}(),r=t.substring(r,Et),Rt=e,e=r=$e(r)),e}function Zt(){var e,r,i,o,n;return e=Et,t.substr(Et,2)===g?(r=g,Et+=2):(r=l,0===jt&&zt(H)),r!==l?(i=yr(),o=function(){var e,t,r;e=Et,t=Qt(),t===l&&(t=er());t===l&&(t=null);r=Qt(),r===l&&(r=er());r===l&&(r=null);return Rt=e,e=qe(t,r),e}(),93===t.charCodeAt(Et)?(n=y,Et++):(n=l,0===jt&&zt(Y)),n!==l?(Rt=e,e=ze(i,o)):(Et=e,e=l)):(Et=e,e=l),e}function Qt(){var e,r,i;return e=Et,58===t.charCodeAt(Et)?(r=d,Et++):(r=l,0===jt&&zt(X)),r!==l?(i=yr(),Rt=e,e=He(i)):(Et=e,e=l),e}function er(){var e,r,i;return e=Et,38===t.charCodeAt(Et)?(r=f,Et++):(r=l,0===jt&&zt(Z)),r!==l?(i=yr(),Rt=e,e=We(i)):(Et=e,e=l),e}function tr(){var e,t,r,i,o;if(e=Et,t=Et,(r=ir())!==l){for(i=[],o=rr();o!==l;)i.push(o),o=rr();t=r=[r,i]}else Et=t,t=l;return t!==l&&(Rt=e,t=Xe(t)),e=t}function rr(){var e,t;return e=Et,(t=ir())!==l&&(Rt=e,t=Ze(t)),e=t}function ir(){var e,r;return e=Et,r=function(){var e,r,i,o;e=Et,t.substr(Et,4)===C?(r=C,Et+=4):(r=l,0===jt&&zt(ae));r!==l&&(i=dr())!==l?(o=function(){var e;93===t.charCodeAt(Et)?(e=y,Et++):(e=l,0===jt&&zt(Y));return e}(),o!==l?(Rt=e,e=ft(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=Et,t.substr(Et,2)===K?(r=K,Et+=2):(r=l,0===jt&&zt(ce));r!==l&&(i=cr())!==l&&(o=dr())!==l&&gr()!==l?(Rt=e,e=bt(i,o)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=Et,91===t.charCodeAt(Et)?(r=P,Et++):(r=l,0===jt&&zt(se));if(r!==l){if(i=[],35===t.charCodeAt(Et)?(o=k,Et++):(o=l,0===jt&&zt(le)),o!==l)for(;o!==l;)i.push(o),35===t.charCodeAt(Et)?(o=k,Et++):(o=l,0===jt&&zt(le));else i=l;i!==l?(o=pr(),gr()!==l?(Rt=e,e=mt(i,o)):(Et=e,e=l)):(Et=e,e=l)}else Et=e,e=l;return e}(),r===l&&(r=function(){var e,r,i;e=Et,t.substr(Et,2)===x?(r=x,Et+=2):(r=l,0===jt&&zt(ue));r!==l?(i=pr(),gr()!==l?(Rt=e,e=ht(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Et,t.substr(Et,2)===S?(r=S,Et+=2):(r=l,0===jt&&zt(pe));r!==l?(i=pr(),gr()!==l?(Rt=e,e=Tt(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Et,t.substr(Et,2)===w?(r=w,Et+=2):(r=l,0===jt&&zt(ge));r!==l?(i=pr(),gr()!==l?(Rt=e,e=vt(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Et,t.substr(Et,2)===A?(r=A,Et+=2):(r=l,0===jt&&zt(ye));r!==l?(i=pr(),gr()!==l?(Rt=e,e=Bt(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Et,t.substr(Et,2)===_?(r=_,Et+=2):(r=l,0===jt&&zt(de));r!==l?(i=pr(),gr()!==l?(Rt=e,e=Ct(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Et,t.substr(Et,2)===E?(r=E,Et+=2):(r=l,0===jt&&zt(Te));r!==l?(i=pr(),gr()!==l?(Rt=e,e=St(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Et,t.substr(Et,2)===R?(r=R,Et+=2):(r=l,0===jt&&zt(be));r!==l?(i=pr(),gr()!==l?(Rt=e,e=Kt(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Et,t.substr(Et,2)===O?(r=O,Et+=2):(r=l,0===jt&&zt(he));r!==l?(i=pr(),gr()!==l?(Rt=e,e=xt(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Et,t.substr(Et,2)===I?(r=I,Et+=2):(r=l,0===jt&&zt(fe));r!==l?(i=pr(),gr()!==l?(Rt=e,e=Pt(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Et,t.substr(Et,2)===L?(r=L,Et+=2):(r=l,0===jt&&zt(me));r!==l?(i=pr(),gr()!==l?(Rt=e,e=kt(i)):(Et=e,e=l)):(Et=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=Et,t.substr(Et,2)===N?(r=N,Et+=2):(r=l,0===jt&&zt(ve));r!==l&&(i=cr())!==l&&(o=dr())!==l&&gr()!==l?(Rt=e,e=wt(i,o)):(Et=e,e=l);return e}()))))))))))))),r!==l&&(Rt=e,r=Qe(r)),e=r}function or(){var e,r;return e=Et,t.length>Et?(r=t.charAt(Et),Et++):(r=l,0===jt&&zt(Q)),r!==l&&(Rt=e,r=et(r)),e=r}function nr(){var e,r,i,o,n;if(e=Et,r=Et,i=function(){var e,r,i,o,n,a;e=Et,r=Tr(),r!==l?(i=Et,jt++,o=Et,t.substr(Et,4)===m?(n=m,Et+=4):(n=l,0===jt&&zt(ee)),n!==l&&(a=br())!==l?o=n=[n,a]:(Et=o,o=l),jt--,o!==l?(Et=i,i=void 0):i=l,i!==l?(Rt=e,e=rt()):(Et=e,e=l)):(Et=e,e=l);return e}(),i!==l){for(o=[],n=ar();n!==l;)o.push(n),n=ar();n=function(){var e,r,i,o,n;e=Et,r=Et,t.substr(Et,4)===h?(i=h,Et+=4):(i=l,0===jt&&zt(te));i===l&&(i=null);o=Et,jt++,n=Br(),jt--,n!==l?(Et=o,o=void 0):o=l;o!==l?r=i=[i,o]:(Et=r,r=l);r!==l&&(Rt=e,r=it());return e=r,e}(),n!==l?r=i=[i,o,n]:(Et=r,r=l)}else Et=r,r=l;return r!==l&&(Rt=e,r=tt(r)),e=r}function ar(){var e,r;return e=Et,r=function(){var e,r,i,o;e=Et,r=Et,t.substr(Et,4)===m?(i=m,Et+=4):(i=l,0===jt&&zt(ee));i!==l?((o=br())===l&&(o=Br()),o!==l?r=i=[i,o]:(Et=r,r=l)):(Et=r,r=l);r===l&&(r=Et,t.substr(Et,2)===T?(i=T,Et+=2):(i=l,0===jt&&zt(re)),i!==l?((o=br())===l&&(o=Br()),o!==l?r=i=[i,o]:(Et=r,r=l)):(Et=r,r=l),r===l&&(r=Et,t.substr(Et,2)===b?(i=b,Et+=2):(i=l,0===jt&&zt(ie)),i!==l?((o=br())===l&&(o=Br()),o!==l?r=i=[i,o]:(Et=r,r=l)):(Et=r,r=l),r===l&&(r=function(){var e,r,i,o,n,a;e=Et,r=Et,jt++,i=Et,t.substr(Et,4)===h?(o=h,Et+=4):(o=l,0===jt&&zt(te));o!==l&&(n=Br())!==l?i=o=[o,n]:(Et=i,i=l);jt--,i===l?r=void 0:(Et=r,r=l);if(r!==l){if(i=Et,o=Et,n=mr(),(a=Tr())!==l?o=n=[n,a]:(Et=o,o=l),o===l){if(o=Et,n=[],(a=fr())!==l)for(;a!==l;)n.push(a),a=fr();else n=l;n!==l?(a=function(){var e,r;e=Tr(),e===l&&(e=Et,jt++,t.length>Et?(r=t.charAt(Et),Et++):(r=l,0===jt&&zt(Q)),jt--,r===l?e=void 0:(Et=e,e=l));return e}(),a!==l?o=n=[n,a]:(Et=o,o=l)):(Et=o,o=l)}(i=o!==l?t.substring(i,Et):o)!==l?(Rt=e,e=at(i)):(Et=e,e=l)}else Et=e,e=l;return e}())));r!==l&&(Rt=e,r=nt(r));return e=r,e}(),r!==l&&(Rt=e,r=ot(r)),e=r}function sr(){var e,r,i,o,n;if(e=Et,r=Et,i=function(){var e,r,i,o,n,a;e=Et,r=Tr(),r!==l?(i=Et,jt++,o=Et,t.substr(Et,3)===v?(n=v,Et+=3):(n=l,0===jt&&zt(oe)),n!==l&&(a=br())!==l?o=n=[n,a]:(Et=o,o=l),jt--,o!==l?(Et=i,i=void 0):i=l,i!==l?(Rt=e,e=lt()):(Et=e,e=l)):(Et=e,e=l);return e}(),i!==l){for(o=[],n=lr();n!==l;)o.push(n),n=lr();n=function(){var e,r,i,o,n;e=Et,r=Et,t.substr(Et,3)===v?(i=v,Et+=3):(i=l,0===jt&&zt(oe));i!==l?(o=Et,jt++,n=Br(),jt--,n!==l?(Et=o,o=void 0):o=l,o!==l?r=i=[i,o]:(Et=r,r=l)):(Et=r,r=l);r!==l&&(Rt=e,r=ut());return e=r,e}(),n!==l?r=i=[i,o,n]:(Et=r,r=l)}else Et=r,r=l;return r!==l&&(Rt=e,r=st(r)),e=r}function lr(){var e,r,i,o,n,a,s,u,p,c,g;if(e=Et,r=Et,jt++,i=Et,t.substr(Et,3)===v?(o=v,Et+=3):(o=l,0===jt&&zt(oe)),o!==l){for(n=[],a=vr();a!==l;)n.push(a),a=vr();for(a=[],s=Et,u=Et,jt++,p=Et,(c=Tr())!==l?(t.substr(Et,3)===v?(g=v,Et+=3):(g=l,0===jt&&zt(oe)),g!==l?p=c=[c,g]:(Et=p,p=l)):(Et=p,p=l),jt--,p===l?u=void 0:(Et=u,u=l),u!==l?(t.length>Et?(p=t.charAt(Et),Et++):(p=l,0===jt&&zt(Q)),p!==l?s=u=[u,p]:(Et=s,s=l)):(Et=s,s=l);s!==l;)a.push(s),s=Et,u=Et,jt++,p=Et,(c=Tr())!==l?(t.substr(Et,3)===v?(g=v,Et+=3):(g=l,0===jt&&zt(oe)),g!==l?p=c=[c,g]:(Et=p,p=l)):(Et=p,p=l),jt--,p===l?u=void 0:(Et=u,u=l),u!==l?(t.length>Et?(p=t.charAt(Et),Et++):(p=l,0===jt&&zt(Q)),p!==l?s=u=[u,p]:(Et=s,s=l)):(Et=s,s=l);(s=Cr())!==l?i=o=[o,n,a,s]:(Et=i,i=l)}else Et=i,i=l;return jt--,i===l?r=void 0:(Et=r,r=l),r!==l?(i=function(){var e,r,i,o;e=Et,r=Et,t.substr(Et,3)===v?(i=v,Et+=3):(i=l,0===jt&&zt(oe));i!==l&&(o=br())!==l?r=i=[i,o]:(Et=r,r=l);r===l&&(r=Et,t.substr(Et,2)===B?(i=B,Et+=2):(i=l,0===jt&&zt(ne)),i!==l&&(o=br())!==l?r=i=[i,o]:(Et=r,r=l),r===l&&(r=Et,t.substr(Et,2)===T?(i=T,Et+=2):(i=l,0===jt&&zt(re)),i!==l&&(o=br())!==l?r=i=[i,o]:(Et=r,r=l),r===l&&(r=function(){var e,r,i,o,n;e=Et,r=Et,i=Et,o=mr(),n=Tr(),n!==l?i=o=[o,n]:(Et=i,i=l);r=i!==l?t.substring(r,Et):i;r!==l&&(Rt=e,r=gt(r));return e=r,e}())));r!==l&&(Rt=e,r=ct(r));return e=r,e}(),i!==l?(Rt=e,e=pt(i)):(Et=e,e=l)):(Et=e,e=l),e}function ur(){var e,r;return e=Et,t.length>Et?(r=t.charAt(Et),Et++):(r=l,0===jt&&zt(Q)),r!==l&&(Rt=e,r=dt(r)),e=r}function pr(){var e,r,i,o;for(e=Et,r=Et,i=[],t.substr(Et,2)===V?(o=V,Et+=2):(o=l,0===jt&&zt(Be)),o===l&&(o=t.charAt(Et),D.test(o)?Et++:(o=l,0===jt&&zt(W)));o!==l;)i.push(o),t.substr(Et,2)===V?(o=V,Et+=2):(o=l,0===jt&&zt(Be)),o===l&&(o=t.charAt(Et),D.test(o)?Et++:(o=l,0===jt&&zt(W)));return r=t.substring(r,Et),Rt=e,e=r=At(r)}function cr(){var e,r,i,o,n;if(e=Et,r=Et,jt++,t.substr(Et,3)===F?(i=F,Et+=3):(i=l,0===jt&&zt(Ce)),jt--,i===l?r=void 0:(Et=r,r=l),r!==l){for(i=Et,o=[],n=t.charAt(Et),M.test(n)?Et++:(n=l,0===jt&&zt(Pe));n!==l;)o.push(n),n=t.charAt(Et),M.test(n)?Et++:(n=l,0===jt&&zt(Pe));i=t.substring(i,Et),Rt=e,e=_t(i)}else Et=e,e=l;return e}function gr(){var e,r,i;if(93===t.charCodeAt(Et)?(e=y,Et++):(e=l,0===jt&&zt(Y)),e===l){for(e=Et,r=[],i=vr();i!==l;)r.push(i),i=vr();(i=Cr())!==l?e=r=[r,i]:(Et=e,e=l)}return e}function yr(){var e,r,i,o;for(e=Et,r=Et,i=[],o=t.charAt(Et),U.test(o)?Et++:(o=l,0===jt&&zt(ke));o!==l;)i.push(o),o=t.charAt(Et),U.test(o)?Et++:(o=l,0===jt&&zt(ke));return r=t.substring(r,Et),Rt=e,e=r=It(r)}function dr(){var e,r,i;return e=Et,58===t.charCodeAt(Et)?(r=d,Et++):(r=l,0===jt&&zt(X)),r!==l?(i=pr(),Rt=e,e=Lt(i)):(Et=e,e=l),e===l&&(r="",Rt=e=Et,e=r=Ot()),e}function fr(){var e;return jt++,e=t.charAt(Et),$.test(e)?Et++:(e=l,0===jt&&zt(we)),jt--,e===l&&(l,0===jt&&zt(Ke)),e}function mr(){var e,t;for(jt++,e=[],t=fr();t!==l;)e.push(t),t=fr();return jt--,t=l,0===jt&&zt(Ae),e}function hr(){var e,r,i;for(jt++,e=Et,r=[],i=t.charAt(Et),J.test(i)?Et++:(i=l,0===jt&&zt(xe));i!==l;)r.push(i),i=t.charAt(Et),J.test(i)?Et++:(i=l,0===jt&&zt(xe));return(i=Tr())!==l?e=r=[r,i]:(Et=e,e=l),jt--,e===l&&(r=l,0===jt&&zt(_e)),e}function Tr(){var e;return jt++,10===t.charCodeAt(Et)?(e=j,Et++):(e=l,0===jt&&zt(Le)),e===l&&(t.substr(Et,2)===G?(e=G,Et+=2):(e=l,0===jt&&zt(Oe)),e===l&&(e=t.charAt(Et),z.test(e)?Et++:(e=l,0===jt&&zt(Ee)))),jt--,e===l&&(l,0===jt&&zt(Ie)),e}function br(){var e,r,i;for(jt++,e=Et,r=[],i=t.charAt(Et),J.test(i)?Et++:(i=l,0===jt&&zt(xe));i!==l;)r.push(i),i=t.charAt(Et),J.test(i)?Et++:(i=l,0===jt&&zt(xe));return(i=Tr())!==l?e=r=[r,i]:(Et=e,e=l),jt--,e===l&&(r=l,0===jt&&zt(Re)),e}function vr(){var e;return jt++,e=t.charAt(Et),q.test(e)?Et++:(e=l,0===jt&&zt(Ve)),jt--,e===l&&(l,0===jt&&zt(Ne)),e}function Br(){var e,r;return(e=br())===l&&(e=Et,jt++,t.length>Et?(r=t.charAt(Et),Et++):(r=l,0===jt&&zt(Q)),jt--,r===l?e=void 0:(Et=e,e=l)),e}function Cr(){var e,r;return e=Et,jt++,t.length>Et?(r=t.charAt(Et),Et++):(r=l,0===jt&&zt(Q)),jt--,r===l?e=void 0:(Et=e,e=l),e}const Pr=new o.BitmarkPegParserHelper({parse:e,parserText:Gt,parserLocation:xr}),kr=new n.BitmarkPegParserProcessor({parse:e,parserText:Gt,parserLocation:xr});function xr(){const e=$t(Rt,Et);return e?(delete e.source,e):e}function $t(e,t,r){var i=Jt(e),o=Jt(t),n={source:u,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return u&&"function"==typeof u.offset&&(n.start=u.offset(n.start),n.end=u.offset(n.end)),n}if(s=c(),r.peg$library)return{peg$result:s,peg$currPos:Et,peg$FAILED:l,peg$maxFailExpected:Ft,peg$maxFailPos:Vt};if(s!==l&&Et===t.length)return s;throw s!==l&&Et<t.length&&zt({type:"end"}),qt(Ft,Vt<t.length?t.charAt(Vt):null,Vt<t.length?$t(Vt,Vt+1):$t(Vt,Vt))};t.StartRules=["bitmark","bit","cardContent"]},8321:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.SyntaxError=t.StartRules=void 0;const i=r(7735),o="8.10.3";function n(e){let t=e||"";return t=i.Breakscape.unbreakscape(t),t}function a(e){e&&"object"==typeof e&&(delete e._tempParsingParent,delete e._tempListStart,Object.keys(e).forEach((t=>{a(e[t])})))}function s(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkPlusString"}):c(e,{startRule:"bitmarkPlusString"})}function l(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkMinusMinusString"}):c(e,{startRule:"bitmarkMinusMinusString"})}function u(e,t,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,u.prototype),o.expected=t,o.found=r,o.location=i,o.name="SyntaxError",o}function p(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function c(e,t){var r,i={},p=(t=void 0!==t?t:{}).grammarSource,c={version:Co,bitmarkPlusPlus:function(){var e,t;if(yo++,e=[],(t=Po())!==i)for(;t!==i;)e.push(t),t=Po();else e=i;e===i&&(e=function(){var e,t;return e=uo,t="",e,t=Xr(),e=t,e}());yo--,e===i&&(t=i,0===yo&&vo(et));return e},bitmarkPlus:function(){var e,t;yo++,e=uo,t=zo(),e,t=Li(t),e=t,yo--,t=i,0===yo&&vo(et);return e},bitmarkMinusMinus:function(){var e,t;yo++,e=uo,t=en(),e,t=eo(t),e=t,yo--,t=i,0===yo&&vo(Kr);return e},bitmarkPlusString:function(){var e;yo++,e=zo(),yo--,i,0===yo&&vo(_t);return e},bitmarkMinusMinusString:en},g=Co,y="|",d=":",f="### ",m="## ",h="# ",T="code",b="bitmark++",v="bitmark--",B="JavaScript",C="• ",P="•",k=" ",x="•A ",S="•+ ",K="•- ",w="\t",A="image",_="#",I="@",L="width",O="height",E="alignment",R="captionAlign",N="left",V="center",F="right",j="=",G="𝑓",D="link:",M="var:",U="code:",J="timer",$="timer:",z="duration:",q="P",H="color:",W="bold",Y="italic",X="light",Z="highlight",Q="strike",ee="subscript",te="superscript",re="ins",ie="del",oe="underline",ne="doubleUnderline",ae="circle",se="languageEm",le="userUnderline",ue="userDoubleUnderline",pe="userStrike",ce="userCircle",ge="userHighlight",ye="aqua",de="black",fe="blue",me="pink",he="fuchsia",Te="lightgrey",be="gray",ve="darkgray",Be="green",Ce="lime",Pe="magenta",ke="maroon",xe="navy",Se="olive",Ke="orange",we="purple",Ae="red",_e="silver",Ie="teal",Le="violet",Oe="white",Ee="yellow",Re="*",Ne="_",Ve="`",Fe="!",je="[!",Ge="]",De="\n",Me="\r\n",Ue="http",Je="s",$e="://",ze="mailto:",qe=/^[ \t]/,He=/^[0-9]/,We=/^[:|]/,Ye=/^[\r\u2028-\u2029]/,Xe=/^[^\n\r\u2028\u2029]/,Ze=/^[!#-;=?-[\]-_a-{}-~]/,Qe={type:"any"},et=ho("StyledText"),tt=fo("|",!1),rt=fo(":",!1),it=fo("### ",!1),ot=fo("## ",!1),nt=fo("# ",!1),at=fo("code",!1),st=mo([" ","\t"],!1,!1),lt=fo("bitmark++",!1),ut=fo("bitmark--",!1),pt=fo("JavaScript",!1),ct=fo("• ",!1),gt=fo("•",!1),yt=mo([["0","9"]],!1,!1),dt=fo(" ",!1),ft=fo("•A ",!1),mt=fo("•+ ",!1),ht=fo("•- ",!1),Tt=fo("\t",!1),bt=fo("image",!1),vt=fo("#",!1),Bt=fo("@",!1),Ct=mo([":","|"],!1,!1),Pt=fo("width",!1),kt=fo("height",!1),xt=fo("alignment",!1),St=fo("captionAlign",!1),Kt=fo("left",!1),wt=fo("center",!1),At=fo("right",!1),_t=ho("StyledString"),It=fo("=",!1),Lt=fo("𝑓",!1),Ot=fo("link:",!1),Et=fo("var:",!1),Rt=fo("code:",!1),Nt=fo("timer",!1),Vt=fo("timer:",!1),Ft=fo("duration:",!1),jt=fo("P",!1),Gt=fo("color:",!1),Dt=fo("bold",!1),Mt=fo("italic",!1),Ut=fo("light",!1),Jt=fo("highlight",!1),$t=fo("strike",!1),zt=fo("subscript",!1),qt=fo("superscript",!1),Ht=fo("ins",!1),Wt=fo("del",!1),Yt=fo("underline",!1),Xt=fo("doubleUnderline",!1),Zt=fo("circle",!1),Qt=fo("languageEm",!1),er=fo("userUnderline",!1),tr=fo("userDoubleUnderline",!1),rr=fo("userStrike",!1),ir=fo("userCircle",!1),or=fo("userHighlight",!1),nr=fo("aqua",!1),ar=fo("black",!1),sr=fo("blue",!1),lr=fo("pink",!1),ur=fo("fuchsia",!1),pr=fo("lightgrey",!1),cr=fo("gray",!1),gr=fo("darkgray",!1),yr=fo("green",!1),dr=fo("lime",!1),fr=fo("magenta",!1),mr=fo("maroon",!1),hr=fo("navy",!1),Tr=fo("olive",!1),br=fo("orange",!1),vr=fo("purple",!1),Br=fo("red",!1),Cr=fo("silver",!1),Pr=fo("teal",!1),kr=fo("violet",!1),xr=fo("white",!1),Sr=fo("yellow",!1),Kr=ho("MinimalStyledText"),wr=ho("MinimalStyledString"),Ar=fo("*",!1),_r=fo("_",!1),Ir=fo("`",!1),Lr=fo("!",!1),Or=fo("[!",!1),Er=fo("]",!1),Rr=ho("Line Terminator"),Nr=fo("\n",!1),Vr=fo("\r\n",!1),Fr=mo(["\r",["\u2028","\u2029"]],!1,!1),jr=(ho("whitespace in line"),ho("space"),ho("language tag separator"),ho("white space, separator"),mo(["\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!1,!1),mo(["\n","\r","\u2028","\u2029"],!1,!1),mo(["\n","\r","\u2028","\u2029"],!0,!1)),Gr=(mo(["\n","\r","\u2028","\u2029","\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!0,!1),fo("http",!1)),Dr=fo("s",!1),Mr=fo("://",!1),Ur=fo("mailto:",!1),Jr=mo(["!",["#",";"],"=",["?","["],["]","_"],["a","{"],["}","~"]],!1,!1),$r=function(){return o},zr=function(e){return Object.assign({},e)},qr=function(e){let t=Object.assign({},e);return a(t),t},Hr=function(e){return Object.assign({},e)},Wr=function(e){return Object.assign({},e)},Yr=function(e){return Object.assign({},e)},Xr=function(){return[]},Zr=function(e,t){return{type:"heading",content:l(t),attrs:{level:e.length-1}}},Qr=function(e){return e},ei=function(e,t){return Object.assign(Object.assign({},e),{content:t})},ti=function(){return{type:"codeBlock",language:""}},ri=function(e){return{type:"codeBlock",attrs:{language:e.trim().toLowerCase()}}},ii=function(e){return[{type:"text",text:n(e.trim())}]},oi=function(e){return e},ni=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},ai=function(e,t){let r=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:r},content:t})},si=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},li=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},ui=function(){return{type:"bulletList"}},pi=function(){return{type:"orderedList"}},ci=function(){return{type:"letteredList"}},gi=function(){return{type:"taskList"}},yi=function(e,t,r,i){return i},di=function(e,t,r,i){let o="bulletList";const n=e.match(/•([0-9]+) /);let a=1;n&&(o="orderedList",n.length>1&&(a=Number(n[1]))),"•A "==e&&(o="letteredList"),"•+ "!=e&&"•- "!=e||(o="taskList");let l=[{type:"paragraph",attrs:{},content:s((t+r.join("")).trim())}];if(i&&i[0]&&i[0]._tempParsingParent){let e={type:i[0]._tempParsingParent,attrs:{start:a},content:i};if(("orderedList"==e.type||"letteredList"==e.type)&&i[0]._tempListStart){const t=i[0]._tempListStart;t>1&&(e.attrs.start=t)}l.push(e)}let u="listItem",p=null;if("taskList"==o){u="taskItem";let t=!1;"•+ "==e&&(t=!0),p={checked:t}}return p?{type:u,attrs:p,content:l,_tempParsingParent:o,_tempListStart:a}:{type:u,content:l,_tempParsingParent:o,_tempListStart:a}},fi=function(e){return e},mi=function(e){return e.join("")===vn},hi=function(e){return e.length>vn.length},Ti=function(e){bn.push(vn),vn=e.join("")},bi=function(){return vn=bn.pop(),!0},vi=function(e){return{type:"paragraph",content:s(e.trim()),attrs:{}}},Bi=function(e){return{type:"paragraph",content:s(e.trim()),attrs:{}}},Ci=function(e){return{type:"paragraph",content:s(e.trim()),attrs:{}}},Pi=function(e){return e},ki=function(e,t,r){const i=Object.assign({},...r);let o=i.alignment||"center";delete i.alignment;let n=i.captionAlign||"left";delete i.captionAlign;let a=i.alt||null;delete i.alt;let s=i.caption||null;delete i.caption;let l=i.align||"center";delete i.align;let u=i.zoomDisabled||Boolean(i.zoomDisabled);return delete i.zoomDisabled,{type:e,attrs:Object.assign({alignment:o,textAlign:n,src:t,alt:a,title:s,class:l,zoomDisabled:u},i)}},xi=function(e){return e},Si=function(e){return{comment:e}},Ki=function(e,t){return{[e]:parseInt(t)}},wi=function(e,t){return{type:"error",msg:e+" must be an positive integer.",found:t}},Ai=function(e,t){return{[e]:t}},_i=function(e,t){return{[e]:t}},Ii=function(e){return{[e]:!0}},Li=function(e){return[{type:"paragraph",content:e,attrs:{}}]},Oi=function(e,t){return e?[e,...t.flat()]:t.flat()},Ei=function(){return{type:"hardBreak"}},Ri=function(e){return{text:n(e),type:"text"}},Ni=function(e){return{index:+e,type:"bit"}},Vi=function(e,t){return t||(t=[]),{marks:t,text:n(e),type:"text"}},Fi=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},ji=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},Gi=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},Di=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},Mi=function(e){return{marks:[{type:"link",attrs:{href:(e.pr+e.t).trim(),target:"_blank"}}],text:e.t,type:"text"}},Ui=function(e){return e},Ji=function(e){return{type:"link",attrs:{href:e.trim(),target:"_blank"}}},$i=function(e){return{type:"var",attrs:{name:e.trim()}}},zi=function(){return{type:"code",attrs:{language:"plain text"}}},qi=function(e){return{type:"code",attrs:{language:e.trim().toLowerCase()}}},Hi=function(){return{type:"timer",attrs:{name:""}}},Wi=function(e){return{type:"timer",attrs:{name:e.trim()}}},Yi=function(e){return{type:"duration",attrs:{duration:e}}},Xi=function(e){return{type:"color",attrs:{color:e}}},Zi=function(e){return{type:e}},Qi=function(e){return{type:"comment",comment:e}},eo=function(e){return[{type:"paragraph",content:e,attrs:{}}]},to=function(e,t){return e?[e,...t.flat()]:t.flat()},ro=function(e){return{text:n(e),type:"text"}},io=function(e){return{index:+e,type:"bit"}},oo=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},no=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},ao=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},so=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},lo=function(e,t){return{pr:e,t}},uo=0|t.peg$currPos,po=[{line:1,column:1}],co=uo,go=t.peg$maxFailExpected||[],yo=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in c))throw new Error("Can't start parsing from rule \""+t.startRule+'".');g=c[t.startRule]}function fo(e,t){return{type:"literal",text:e,ignoreCase:t}}function mo(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function ho(e){return{type:"other",description:e}}function To(t){var r,i=po[t];if(i)return i;if(t>=po.length)r=po.length-1;else for(r=t;!po[--r];);for(i={line:(i=po[r]).line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return po[t]=i,i}function bo(e,t,r){var i=To(e),o=To(t),n={source:p,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return r&&p&&"function"==typeof p.offset&&(n.start=p.offset(n.start),n.end=p.offset(n.end)),n}function vo(e){uo<co||(uo>co&&(co=uo,go=[]),go.push(e))}function Bo(e,t,r){return new u(u.buildMessage(e,t),e,t,r)}function Co(){var t,r,o;for(t=uo,r=[],e.length>uo?(o=e.charAt(uo),uo++):(o=i,0===yo&&vo(Qe));o!==i;)r.push(o),e.length>uo?(o=e.charAt(uo),uo++):(o=i,0===yo&&vo(Qe));return t,t=r=$r()}function Po(){var t,r;return t=uo,r=function(){var t,r,o,n,a;if(t=uo,r=So(),r!==i){for(o=uo,n=[],a=mn();a!==i;)n.push(a),a=mn();o=e.substring(o,uo),(n=hn())!==i?((a=fn())===i&&(a=null),t,t=Zr(r,o)):(uo=t,t=i)}else uo=t,t=i;return t}(),r!==i&&(t,r=zr(r)),(t=r)===i&&(t=uo,r=function(){var e,t,r,o;if(e=uo,t=function(){var e,t,r;e=uo,t=uo,yo++,r=_o(),yo--,r!==i?(uo=t,t=void 0):t=i;t!==i&&(e,t=ui());return e=t,e}(),t!==i){if(r=[],(o=Ro())!==i)for(;o!==i;)r.push(o),o=Ro();else r=i;r!==i?((o=fn())===i&&(o=null),e,e=ni(t,r)):(uo=e,e=i)}else uo=e,e=i;if(e===i){if(e=uo,t=function(){var e,t,r;e=uo,t=uo,yo++,r=Io(),yo--,r!==i?(uo=t,t=void 0):t=i;t!==i&&(e,t=pi());return e=t,e}(),t!==i){if(r=[],(o=Ro())!==i)for(;o!==i;)r.push(o),o=Ro();else r=i;r!==i?((o=fn())===i&&(o=null),e,e=ai(t,r)):(uo=e,e=i)}else uo=e,e=i;if(e===i){if(e=uo,t=function(){var e,t,r;e=uo,t=uo,yo++,r=Lo(),yo--,r!==i?(uo=t,t=void 0):t=i;t!==i&&(e,t=ci());return e=t,e}(),t!==i){if(r=[],(o=Ro())!==i)for(;o!==i;)r.push(o),o=Ro();else r=i;r!==i?((o=fn())===i&&(o=null),e,e=si(t,r)):(uo=e,e=i)}else uo=e,e=i;if(e===i)if(e=uo,t=function(){var e,t,r;e=uo,t=uo,yo++,r=Oo(),yo--,r!==i?(uo=t,t=void 0):t=i;t!==i&&(e,t=gi());return e=t,e}(),t!==i){if(r=[],(o=Ro())!==i)for(;o!==i;)r.push(o),o=Ro();else r=i;r!==i?((o=fn())===i&&(o=null),e,e=li(t,r)):(uo=e,e=i)}else uo=e,e=i}}return e}(),r!==i&&(t,r=qr(r)),(t=r)===i&&(t=uo,(r=Mo())!==i&&(t,r=Hr(r)),(t=r)===i&&(t=uo,r=function(){var t,r,o;t=uo,r=wo(),r!==i?(o=function(){var t,r,o,n;t=uo,r=uo,o=[],n=Ao();for(;n!==i;)o.push(n),n=Ao();return r=e.substring(r,uo),t,r=ii(r),t=r,t}(),t,t=ei(r,o)):(uo=t,t=i);return t}(),r!==i&&(t,r=Wr(r)),(t=r)===i&&(t=uo,r=function(){var e,t,r;e=uo,t=uo,yo++,r=ko(),yo--,r===i?t=void 0:(uo=t,t=i);t!==i&&(r=Fo())!==i?(e,e=vi(r)):(uo=e,e=i);e===i&&(e=uo,(t=Go())!==i&&(r=Fo())!==i?(e,e=Bi(r)):(uo=e,e=i),e===i&&(e=uo,(t=Go())!==i?(e,e=Ci(r="")):(uo=e,e=i)));return e}(),r!==i&&(t,r=Yr(r)),t=r)))),t}function ko(){var e;return(e=So())===i&&(e=Eo())===i&&(e=Mo())===i&&(e=wo())===i&&(e=Go()),e}function xo(){var t;return 124===e.charCodeAt(uo)?(t=y,uo++):(t=i,0===yo&&vo(tt)),t}function So(){var t;return e.substr(uo,4)===f?(t=f,uo+=4):(t=i,0===yo&&vo(it)),t===i&&(e.substr(uo,3)===m?(t=m,uo+=3):(t=i,0===yo&&vo(ot)),t===i&&(e.substr(uo,2)===h?(t=h,uo+=2):(t=i,0===yo&&vo(nt)))),t}function Ko(){var t,r;return t=uo,xo()!==i?(r=function(){var t;return e.substr(uo,4)===T?(t=T,uo+=4):(t=i,0===yo&&vo(at)),t}(),r!==i?(t,t=Qr(r)):(uo=t,t=i)):(uo=t,t=i),t}function wo(){var t,r,o,n,a,s,l;if(t=uo,Ko()!==i){for(r=uo,o=uo,n=[],a=e.charAt(uo),qe.test(a)?uo++:(a=i,0===yo&&vo(st));a!==i;)n.push(a),a=e.charAt(uo),qe.test(a)?uo++:(a=i,0===yo&&vo(st));(a=hn())!==i?o=n=[n,a]:(uo=o,o=i),(r=o!==i?e.substring(r,uo):o)!==i?(t,t=ti()):(uo=t,t=i)}else uo=t,t=i;if(t===i)if(t=uo,Ko()!==i)if(58===e.charCodeAt(uo)?(r=d,uo++):(r=i,0===yo&&vo(rt)),r!==i)if(o=function(){var t,r,o;e.substr(uo,9)===b?(t=b,uo+=9):(t=i,0===yo&&vo(lt));if(t===i&&(e.substr(uo,9)===v?(t=v,uo+=9):(t=i,0===yo&&vo(ut)),t===i&&(e.substr(uo,10)===B?(t=B,uo+=10):(t=i,0===yo&&vo(pt)),t===i))){if(t=uo,r=[],(o=mn())!==i)for(;o!==i;)r.push(o),o=mn();else r=i;(t=r!==i?e.substring(t,uo):r)===i&&(t="")}return t}(),o!==i){for(n=uo,a=uo,s=[],l=e.charAt(uo),qe.test(l)?uo++:(l=i,0===yo&&vo(st));l!==i;)s.push(l),l=e.charAt(uo),qe.test(l)?uo++:(l=i,0===yo&&vo(st));(l=hn())!==i?a=s=[s,l]:(uo=a,a=i),(n=a!==i?e.substring(n,uo):a)!==i?(t,t=ri(o)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;else uo=t,t=i;return t}function Ao(){var t,r,o,n,a,s;if(t=uo,r=uo,yo++,o=ko(),yo--,o===i?r=void 0:(uo=r,r=i),r!==i){if(o=uo,n=uo,a=[],(s=mn())!==i)for(;s!==i;)a.push(s),s=mn();else a=i;a!==i&&(s=hn())!==i?n=a=[a,s]:(uo=n,n=i),(o=n!==i?e.substring(o,uo):n)!==i?(t,t=oi(o)):(uo=t,t=i)}else uo=t,t=i;return t===i&&(t=fn()),t}function _o(){var t;return e.substr(uo,2)===C?(t=C,uo+=2):(t=i,0===yo&&vo(ct)),t}function Io(){var t,r,o,n,a;if(t=uo,r=uo,8226===e.charCodeAt(uo)?(o=P,uo++):(o=i,0===yo&&vo(gt)),o!==i){for(n=[],a=e.charAt(uo),He.test(a)?uo++:(a=i,0===yo&&vo(yt));a!==i;)n.push(a),a=e.charAt(uo),He.test(a)?uo++:(a=i,0===yo&&vo(yt));32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a!==i?r=o=[o,n,a]:(uo=r,r=i)}else uo=r,r=i;return t=r!==i?e.substring(t,uo):r}function Lo(){var t;return e.substr(uo,3)===x?(t=x,uo+=3):(t=i,0===yo&&vo(ft)),t}function Oo(){var t;return e.substr(uo,3)===S?(t=S,uo+=3):(t=i,0===yo&&vo(mt)),t===i&&(e.substr(uo,3)===K?(t=K,uo+=3):(t=i,0===yo&&vo(ht))),t}function Eo(){var e;return(e=_o())===i&&(e=Io())===i&&(e=Lo())===i&&(e=Oo()),e}function Ro(){var t,r,o,n,a,s,l,u;if(t=uo,Vo()!==i)if((r=Eo())!==i){for(o=uo,n=uo,a=[],s=uo,l=uo,yo++,u=fn(),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=fn(),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);for((s=fn())===i&&(s=null),n=a=[a,s],o=e.substring(o,uo),n=[],a=No();a!==i;)n.push(a),a=No();if(a=uo,s=function(){var t,r,o,n;t=uo,yo++,r=uo,o=[],9===e.charCodeAt(uo)?(n=w,uo++):(n=i,0===yo&&vo(Tt));if(n!==i)for(;n!==i;)o.push(n),9===e.charCodeAt(uo)?(n=w,uo++):(n=i,0===yo&&vo(Tt));else o=i;o!==i?(uo,(n=(n=hi(o))?void 0:i)!==i?(r,r=Ti(o)):(uo=r,r=i)):(uo=r,r=i);yo--,r!==i?(uo=t,t=void 0):t=i;return t}(),s!==i){for(l=[],u=Ro();u!==i;)l.push(u),u=Ro();u=function(){var e;uo,e=bi(),e=e?void 0:i;return e}(),u!==i?(a,a=yi(r,o,n,l)):(uo=a,a=i)}else uo=a,a=i;a===i&&(a=null),t,t=di(r,o,n,a)}else uo=t,t=i;else uo=t,t=i;return t}function No(){var t,r,o,n,a,s,l,u,p,c;if(t=uo,r=uo,yo++,o=function(){var t,r,o;t=uo,r=[],o=e.charAt(uo),qe.test(o)?uo++:(o=i,0===yo&&vo(st));for(;o!==i;)r.push(o),o=e.charAt(uo),qe.test(o)?uo++:(o=i,0===yo&&vo(st));o=fn(),o!==i?t=r=[r,o]:(uo=t,t=i);return t}(),yo--,o===i?r=void 0:(uo=r,r=i),r!==i)if((o=Vo())!==i)if(n=uo,yo++,a=Eo(),yo--,a===i?n=void 0:(uo=n,n=i),n!==i){if(a=uo,s=uo,l=[],u=uo,p=uo,yo++,c=fn(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i?(e.length>uo?(c=e.charAt(uo),uo++):(c=i,0===yo&&vo(Qe)),c!==i?u=p=[p,c]:(uo=u,u=i)):(uo=u,u=i),u!==i)for(;u!==i;)l.push(u),u=uo,p=uo,yo++,c=fn(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i?(e.length>uo?(c=e.charAt(uo),uo++):(c=i,0===yo&&vo(Qe)),c!==i?u=p=[p,c]:(uo=u,u=i)):(uo=u,u=i);else l=i;l!==i&&(u=hn())!==i?s=l=[l,u]:(uo=s,s=i),(a=s!==i?e.substring(a,uo):s)!==i?(t,t=fi(a)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;else uo=t,t=i;return t}function Vo(){var t,r,o;for(t=uo,r=[],9===e.charCodeAt(uo)?(o=w,uo++):(o=i,0===yo&&vo(Tt));o!==i;)r.push(o),9===e.charCodeAt(uo)?(o=w,uo++):(o=i,0===yo&&vo(Tt));return uo,(o=(o=mi(r))?void 0:i)!==i?t=r=[r,o]:(uo=t,t=i),t}function Fo(){var t,r,o;if(t=uo,r=[],(o=jo())!==i)for(;o!==i;)r.push(o),o=jo();else r=i;return t=r!==i?e.substring(t,uo):r}function jo(){var t,r,o,n,a,s;if(t=uo,r=uo,yo++,o=ko(),yo--,o===i?r=void 0:(uo=r,r=i),r!==i){if(o=uo,n=uo,a=[],(s=mn())!==i)for(;s!==i;)a.push(s),s=mn();else a=i;a!==i&&(s=hn())!==i?n=a=[a,s]:(uo=n,n=i),(o=n!==i?e.substring(o,uo):n)!==i?t=r=[r,o]:(uo=t,t=i)}else uo=t,t=i;return t===i&&(t=fn()),t}function Go(){var t,r,o,n,a,s;if(t=uo,(r=xo())!==i){for(o=uo,n=uo,a=[],s=e.charAt(uo),qe.test(s)?uo++:(s=i,0===yo&&vo(st));s!==i;)a.push(s),s=e.charAt(uo),qe.test(s)?uo++:(s=i,0===yo&&vo(st));(s=hn())!==i?n=a=[a,s]:(uo=n,n=i),(o=n!==i?e.substring(o,uo):n)!==i?((n=fn())===i&&(n=null),t=r=[r,o,n]):(uo=t,t=i)}else uo=t,t=i;return t}function Do(){var t,r;return t=uo,xo()!==i?(r=function(){var t;return e.substr(uo,5)===A?(t=A,uo+=5):(t=i,0===yo&&vo(bt)),t}(),r!==i?(t,t=Pi(r)):(uo=t,t=i)):(uo=t,t=i),t}function Mo(){var t,r,o,n,a,s,l,u,p,c;if(t=uo,(r=Do())!==i)if(58===e.charCodeAt(uo)?(o=d,uo++):(o=i,0===yo&&vo(rt)),o!==i)if(32===e.charCodeAt(uo)?(n=k,uo++):(n=i,0===yo&&vo(dt)),n===i&&(n=null),a=function(){var t,r,o,n,a,s,l,u,p;t=uo,r=uo,e.substr(uo,4)===Ue?(o=Ue,uo+=4):(o=i,0===yo&&vo(Gr));if(o!==i)if(115===e.charCodeAt(uo)?(n=Je,uo++):(n=i,0===yo&&vo(Dr)),n===i&&(n=null),e.substr(uo,3)===$e?(a=$e,uo+=3):(a=i,0===yo&&vo(Mr)),a!==i){for(s=[],l=uo,u=uo,yo++,p=xo(),yo--,p===i?u=void 0:(uo=u,u=i),u!==i&&(p=Tn())!==i?l=u=[u,p]:(uo=l,l=i);l!==i;)s.push(l),l=uo,u=uo,yo++,p=xo(),yo--,p===i?u=void 0:(uo=u,u=i),u!==i&&(p=Tn())!==i?l=u=[u,p]:(uo=l,l=i);r=o=[o,n,a,s]}else uo=r,r=i;else uo=r,r=i;t=r!==i?e.substring(t,uo):r;return t}(),a!==i)if(xo()!==i){for(s=function(){var e,t,r;e=uo,t=[],r=Uo();for(;r!==i;)t.push(r),r=Uo();return e,t=xi(t),e=t,e}(),l=uo,u=uo,p=[],c=e.charAt(uo),qe.test(c)?uo++:(c=i,0===yo&&vo(st));c!==i;)p.push(c),c=e.charAt(uo),qe.test(c)?uo++:(c=i,0===yo&&vo(st));(c=hn())!==i?u=p=[p,c]:(uo=u,u=i),(l=u!==i?e.substring(l,uo):u)!==i?((u=fn())===i&&(u=null),t,t=ki(r,a,s)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;else uo=t,t=i;else uo=t,t=i;return t}function Uo(){var t,r,o,n,a,s,l,u,p,c;if(t=uo,35===e.charCodeAt(uo)?(r=_,uo++):(r=i,0===yo&&vo(vt)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=Si(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,64===e.charCodeAt(uo)?(r=I,uo++):(r=i,0===yo&&vo(Bt)),r===i&&(r=null),(o=Jo())!==i)if(58===e.charCodeAt(uo)?(n=d,uo++):(n=i,0===yo&&vo(rt)),n!==i){for(a=[],32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));s!==i;)a.push(s),32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));if(s=uo,l=[],u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i?(c=e.charAt(uo),He.test(c)?uo++:(c=i,0===yo&&vo(yt)),c!==i?u=p=[p,c]:(uo=u,u=i)):(uo=u,u=i),u!==i)for(;u!==i;)l.push(u),u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i?(c=e.charAt(uo),He.test(c)?uo++:(c=i,0===yo&&vo(yt)),c!==i?u=p=[p,c]:(uo=u,u=i)):(uo=u,u=i);else l=i;(s=l!==i?e.substring(s,uo):l)!==i&&(l=xo())!==i?(t,t=Ki(o,s)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;if(t===i){if(t=uo,64===e.charCodeAt(uo)?(r=I,uo++):(r=i,0===yo&&vo(Bt)),r===i&&(r=null),(o=Jo())!==i)if(58===e.charCodeAt(uo)?(n=d,uo++):(n=i,0===yo&&vo(rt)),n!==i){for(a=[],32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));s!==i;)a.push(s),32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));for(s=uo,l=[],u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);u!==i;)l.push(u),u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);s=e.substring(s,uo),(l=xo())!==i?(t,t=wi(o,s)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;if(t===i){if(t=uo,64===e.charCodeAt(uo)?(r=I,uo++):(r=i,0===yo&&vo(Bt)),r===i&&(r=null),(o=$o())!==i)if(58===e.charCodeAt(uo)?(n=d,uo++):(n=i,0===yo&&vo(rt)),n!==i){for(a=[],32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));s!==i;)a.push(s),32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));s=function(){var t;e.substr(uo,4)===N?(t=N,uo+=4):(t=i,0===yo&&vo(Kt));t===i&&(e.substr(uo,6)===V?(t=V,uo+=6):(t=i,0===yo&&vo(wt)),t===i&&(e.substr(uo,5)===F?(t=F,uo+=5):(t=i,0===yo&&vo(At))));return t}(),s!==i&&(l=xo())!==i?(t,t=Ai(o,s)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;if(t===i){for(t=uo,64===e.charCodeAt(uo)?(r=I,uo++):(r=i,0===yo&&vo(Bt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,l=e.charAt(uo),We.test(l)?uo++:(l=i,0===yo&&vo(Ct)),l===i&&(l=uo,(u=$o())!==i?(58===e.charCodeAt(uo)?(p=d,uo++):(p=i,0===yo&&vo(rt)),p!==i?l=u=[u,p]:(uo=l,l=i)):(uo=l,l=i)),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=e.charAt(uo),We.test(l)?uo++:(l=i,0===yo&&vo(Ct)),l===i&&(l=uo,(u=$o())!==i?(58===e.charCodeAt(uo)?(p=d,uo++):(p=i,0===yo&&vo(rt)),p!==i?l=u=[u,p]:(uo=l,l=i)):(uo=l,l=i)),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);if(o=e.substring(o,uo),58===e.charCodeAt(uo)?(n=d,uo++):(n=i,0===yo&&vo(rt)),n!==i){for(32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),s=uo,l=[],u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);u!==i;)l.push(u),u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);s=e.substring(s,uo),(l=xo())!==i?(t,t=_i(o,s)):(uo=t,t=i)}else uo=t,t=i;if(t===i){for(t=uo,64===e.charCodeAt(uo)?(r=I,uo++):(r=i,0===yo&&vo(Bt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,(l=xo())===i&&(l=uo,(u=$o())!==i?(58===e.charCodeAt(uo)?(p=d,uo++):(p=i,0===yo&&vo(rt)),p!==i?l=u=[u,p]:(uo=l,l=i)):(uo=l,l=i)),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,(l=xo())===i&&(l=uo,(u=$o())!==i?(58===e.charCodeAt(uo)?(p=d,uo++):(p=i,0===yo&&vo(rt)),p!==i?l=u=[u,p]:(uo=l,l=i)):(uo=l,l=i)),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=Ii(o)):(uo=t,t=i)}}}}}return t}function Jo(){var t;return e.substr(uo,5)===L?(t=L,uo+=5):(t=i,0===yo&&vo(Pt)),t===i&&(e.substr(uo,6)===O?(t=O,uo+=6):(t=i,0===yo&&vo(kt))),t}function $o(){var t;return e.substr(uo,9)===E?(t=E,uo+=9):(t=i,0===yo&&vo(xt)),t===i&&(e.substr(uo,12)===R?(t=R,uo+=12):(t=i,0===yo&&vo(St))),t}function zo(){var e,t,r,o;for(e=uo,(t=qo())===i&&(t=null),r=[],(o=Xo())===i&&(o=qo());o!==i;)r.push(o),(o=Xo())===i&&(o=qo());return e,e=Oi(t,r)}function qo(){var t,r,o,n,a,s,l;if(t=uo,(r=fn())!==i&&(t,r=Ei()),(t=r)===i){if(t=uo,r=uo,o=[],n=uo,(a=Zo())===i&&(a=null),s=uo,yo++,l=Xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?n=a=[a,s,l]:(uo=n,n=i),n===i&&(n=uo,(a=Zo())!==i?(s=uo,yo++,l=Xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?n=a=[a,s]:(uo=n,n=i)):(uo=n,n=i)),n!==i)for(;n!==i;)o.push(n),n=uo,(a=Zo())===i&&(a=null),s=uo,yo++,l=Xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?n=a=[a,s,l]:(uo=n,n=i),n===i&&(n=uo,(a=Zo())!==i?(s=uo,yo++,l=Xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?n=a=[a,s]:(uo=n,n=i)):(uo=n,n=i));else o=i;(r=o!==i?e.substring(r,uo):o)!==i&&(t,r=Ri(r)),t=r}return t}function Ho(){var t;return 61===e.charCodeAt(uo)?(t=j,uo++):(t=i,0===yo&&vo(It)),t}function Wo(){var t;return e.substr(uo,2)===G?(t=G,uo+=2):(t=i,0===yo&&vo(Lt)),t}function Yo(){var e,t,r;return e=uo,(t=Ho())!==i&&(r=Ho())!==i?e=t=[t,r]:(uo=e,e=i),e}function Xo(){var t,r,o,n,a,s,l,u,p,c;if(t=uo,(r=cn())!==i){if(o=uo,n=[],a=e.charAt(uo),He.test(a)?uo++:(a=i,0===yo&&vo(yt)),a!==i)for(;a!==i;)n.push(a),a=e.charAt(uo),He.test(a)?uo++:(a=i,0===yo&&vo(yt));else n=i;(o=n!==i?e.substring(o,uo):n)!==i&&(n=gn())!==i?(t,t=Ni(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,(r=Yo())!==i){for(32===e.charCodeAt(uo)?(o=k,uo++):(o=i,0===yo&&vo(dt)),o===i&&(o=null),n=uo,a=[],s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=Yo())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=Yo())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);n=e.substring(n,uo),32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),(s=Yo())!==i?(l=function(){var t,r,o,n;t=uo,124===e.charCodeAt(uo)?(r=y,uo++):(r=i,0===yo&&vo(tt));if(r!==i){if(o=[],(n=Qo())!==i)for(;n!==i;)o.push(n),n=Qo();else o=i;o!==i?(t,t=Ui(o)):(uo=t,t=i)}else uo=t,t=i;return t}(),l!==i?(t,t=Vi(n,l)):(uo=t,t=i)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,(r=sn())!==i){for(32===e.charCodeAt(uo)?(o=k,uo++):(o=i,0===yo&&vo(dt)),o===i&&(o=null),n=uo,a=[],s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=sn())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=sn())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);n=e.substring(n,uo),32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),(s=sn())!==i?(t,t=Fi(n)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,(r=ln())!==i){for(32===e.charCodeAt(uo)?(o=k,uo++):(o=i,0===yo&&vo(dt)),o===i&&(o=null),n=uo,a=[],s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=ln())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=ln())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);n=e.substring(n,uo),32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),(s=ln())!==i?(t,t=ji(n)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,(r=un())!==i){for(32===e.charCodeAt(uo)?(o=k,uo++):(o=i,0===yo&&vo(dt)),o===i&&(o=null),n=uo,a=[],s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=un())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=un())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);n=e.substring(n,uo),32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),(s=un())!==i?(t,t=Gi(n)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,(r=pn())!==i){for(32===e.charCodeAt(uo)?(o=k,uo++):(o=i,0===yo&&vo(dt)),o===i&&(o=null),n=uo,a=[],s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=pn())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=pn())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);n=e.substring(n,uo),32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),(s=pn())!==i?(t,t=Di(n)):(uo=t,t=i)}else uo=t,t=i;t===i&&(t=uo,r=function(){var t,r,o,n,a,s,l;t=uo,r=uo,o=uo,e.substr(uo,4)===Ue?(n=Ue,uo+=4):(n=i,0===yo&&vo(Gr));n!==i?(115===e.charCodeAt(uo)?(a=Je,uo++):(a=i,0===yo&&vo(Dr)),a===i&&(a=null),e.substr(uo,3)===$e?(s=$e,uo+=3):(s=i,0===yo&&vo(Mr)),s!==i?o=n=[n,a,s]:(uo=o,o=i)):(uo=o,o=i);o===i&&(e.substr(uo,7)===ze?(o=ze,uo+=7):(o=i,0===yo&&vo(Ur)));r=o!==i?e.substring(r,uo):o;if(r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=Tn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=Tn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),t,t=lo(r,o)}else uo=t,t=i;return t}(),r!==i&&(t,r=Mi(r)),t=r)}}}}}return t}function Zo(){var t,r,o,n,a;if(t=uo,r=uo,(o=Yo())!==i){if(n=[],(a=Ho())!==i)for(;a!==i;)n.push(a),a=Ho();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,o=function(){var e,t,r;return e=uo,(t=Wo())!==i&&(r=Wo())!==i?e=t=[t,r]:(uo=e,e=i),e}(),o!==i){if(n=[],(a=Wo())!==i)for(;a!==i;)n.push(a),a=Wo();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,(o=un())!==i){if(n=[],(a=nn())!==i)for(;a!==i;)n.push(a),a=nn();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,(o=pn())!==i){if(n=[],(a=an())!==i)for(;a!==i;)n.push(a),a=an();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;t=r!==i?e.substring(t,uo):r}}}return t}function Qo(){var t,r,o,n,a,s,l,u,p,c;if(t=uo,e.substr(uo,5)===D?(r=D,uo+=5):(r=i,0===yo&&vo(Ot)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=Ji(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,e.substr(uo,4)===M?(r=M,uo+=4):(r=i,0===yo&&vo(Et)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=$i(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i&&(t=uo,e.substr(uo,4)===T?(r=T,uo+=4):(r=i,0===yo&&vo(at)),r!==i&&(o=xo())!==i?(t,t=zi()):(uo=t,t=i),t===i)){if(t=uo,e.substr(uo,5)===U?(r=U,uo+=5):(r=i,0===yo&&vo(Rt)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=qi(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i&&(t=uo,e.substr(uo,5)===J?(r=J,uo+=5):(r=i,0===yo&&vo(Nt)),r!==i&&(o=xo())!==i?(t,t=Hi()):(uo=t,t=i),t===i)){if(t=uo,e.substr(uo,6)===$?(r=$,uo+=6):(r=i,0===yo&&vo(Vt)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=Wi(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,e.substr(uo,9)===z?(r=z,uo+=9):(r=i,0===yo&&vo(Ft)),r!==i){if(o=uo,n=uo,80===e.charCodeAt(uo)?(a=q,uo++):(a=i,0===yo&&vo(jt)),a!==i){for(s=uo,l=[],u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);u!==i;)l.push(u),u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);n=a=[a,s=e.substring(s,uo)]}else uo=n,n=i;(o=n!==i?e.substring(o,uo):n)!==i&&(n=xo())!==i?(t,t=Yi(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i&&(t=uo,e.substr(uo,6)===H?(r=H,uo+=6):(r=i,0===yo&&vo(Gt)),r!==i?(o=function(){var t;e.substr(uo,4)===ye?(t=ye,uo+=4):(t=i,0===yo&&vo(nr));t===i&&(e.substr(uo,5)===de?(t=de,uo+=5):(t=i,0===yo&&vo(ar)),t===i&&(e.substr(uo,4)===fe?(t=fe,uo+=4):(t=i,0===yo&&vo(sr)),t===i&&(e.substr(uo,4)===me?(t=me,uo+=4):(t=i,0===yo&&vo(lr)),t===i&&(e.substr(uo,7)===he?(t=he,uo+=7):(t=i,0===yo&&vo(ur)),t===i&&(e.substr(uo,9)===Te?(t=Te,uo+=9):(t=i,0===yo&&vo(pr)),t===i&&(e.substr(uo,4)===be?(t=be,uo+=4):(t=i,0===yo&&vo(cr)),t===i&&(e.substr(uo,8)===ve?(t=ve,uo+=8):(t=i,0===yo&&vo(gr)),t===i&&(e.substr(uo,5)===Be?(t=Be,uo+=5):(t=i,0===yo&&vo(yr)),t===i&&(e.substr(uo,4)===Ce?(t=Ce,uo+=4):(t=i,0===yo&&vo(dr)),t===i&&(e.substr(uo,7)===Pe?(t=Pe,uo+=7):(t=i,0===yo&&vo(fr)),t===i&&(e.substr(uo,6)===ke?(t=ke,uo+=6):(t=i,0===yo&&vo(mr)),t===i&&(e.substr(uo,4)===xe?(t=xe,uo+=4):(t=i,0===yo&&vo(hr)),t===i&&(e.substr(uo,5)===Se?(t=Se,uo+=5):(t=i,0===yo&&vo(Tr)),t===i&&(e.substr(uo,6)===Ke?(t=Ke,uo+=6):(t=i,0===yo&&vo(br)),t===i&&(e.substr(uo,6)===we?(t=we,uo+=6):(t=i,0===yo&&vo(vr)),t===i&&(e.substr(uo,3)===Ae?(t=Ae,uo+=3):(t=i,0===yo&&vo(Br)),t===i&&(e.substr(uo,6)===_e?(t=_e,uo+=6):(t=i,0===yo&&vo(Cr)),t===i&&(e.substr(uo,4)===Ie?(t=Ie,uo+=4):(t=i,0===yo&&vo(Pr)),t===i&&(e.substr(uo,6)===Le?(t=Le,uo+=6):(t=i,0===yo&&vo(kr)),t===i&&(e.substr(uo,5)===Oe?(t=Oe,uo+=5):(t=i,0===yo&&vo(xr)),t===i&&(e.substr(uo,6)===Ee?(t=Ee,uo+=6):(t=i,0===yo&&vo(Sr)))))))))))))))))))))));return t}(),o!==i&&(n=xo())!==i?(t,t=Xi(o)):(uo=t,t=i)):(uo=t,t=i),t===i&&(t=uo,r=function(){var t;e.substr(uo,4)===W?(t=W,uo+=4):(t=i,0===yo&&vo(Dt));t===i&&(e.substr(uo,6)===Y?(t=Y,uo+=6):(t=i,0===yo&&vo(Mt)),t===i&&(e.substr(uo,5)===X?(t=X,uo+=5):(t=i,0===yo&&vo(Ut)),t===i&&(e.substr(uo,9)===Z?(t=Z,uo+=9):(t=i,0===yo&&vo(Jt)),t===i&&(e.substr(uo,6)===Q?(t=Q,uo+=6):(t=i,0===yo&&vo($t)),t===i&&(e.substr(uo,9)===ee?(t=ee,uo+=9):(t=i,0===yo&&vo(zt)),t===i&&(e.substr(uo,11)===te?(t=te,uo+=11):(t=i,0===yo&&vo(qt)),t===i&&(e.substr(uo,3)===re?(t=re,uo+=3):(t=i,0===yo&&vo(Ht)),t===i&&(e.substr(uo,3)===ie?(t=ie,uo+=3):(t=i,0===yo&&vo(Wt)),t===i&&(e.substr(uo,9)===oe?(t=oe,uo+=9):(t=i,0===yo&&vo(Yt)),t===i&&(e.substr(uo,15)===ne?(t=ne,uo+=15):(t=i,0===yo&&vo(Xt)),t===i&&(e.substr(uo,6)===ae?(t=ae,uo+=6):(t=i,0===yo&&vo(Zt)),t===i&&(e.substr(uo,10)===se?(t=se,uo+=10):(t=i,0===yo&&vo(Qt)),t===i&&(e.substr(uo,13)===le?(t=le,uo+=13):(t=i,0===yo&&vo(er)),t===i&&(e.substr(uo,19)===ue?(t=ue,uo+=19):(t=i,0===yo&&vo(tr)),t===i&&(e.substr(uo,10)===pe?(t=pe,uo+=10):(t=i,0===yo&&vo(rr)),t===i&&(e.substr(uo,10)===ce?(t=ce,uo+=10):(t=i,0===yo&&vo(ir)),t===i&&(e.substr(uo,13)===ge?(t=ge,uo+=13):(t=i,0===yo&&vo(or)))))))))))))))))));return t}(),r!==i&&(o=xo())!==i?(t,t=Zi(r)):(uo=t,t=i),t===i)))if(t=uo,35===e.charCodeAt(uo)?(r=_,uo++):(r=i,0===yo&&vo(vt)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=Qi(o)):(uo=t,t=i)}else uo=t,t=i}}}}return t}function en(){var e,t,r,o;for(yo++,e=uo,(t=tn())===i&&(t=null),r=[],(o=yn())===i&&(o=tn());o!==i;)r.push(o),(o=yn())===i&&(o=tn());return e,e=to(t,r),yo--,t=i,0===yo&&vo(wr),e}function tn(){var t,r,o,n,a,s,l;if(t=uo,r=uo,o=[],n=uo,(a=dn())===i&&(a=null),s=uo,yo++,l=yn(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?n=a=[a,s,l]:(uo=n,n=i)):(uo=n,n=i),n!==i)for(;n!==i;)o.push(n),n=uo,(a=dn())===i&&(a=null),s=uo,yo++,l=yn(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?n=a=[a,s,l]:(uo=n,n=i)):(uo=n,n=i);else o=i;return(r=o!==i?e.substring(r,uo):o)!==i&&(t,r=ro(r)),(t=r)===i&&(t=fn()),t}function rn(){var t;return 42===e.charCodeAt(uo)?(t=Re,uo++):(t=i,0===yo&&vo(Ar)),t}function on(){var t;return 95===e.charCodeAt(uo)?(t=Ne,uo++):(t=i,0===yo&&vo(_r)),t}function nn(){var t;return 96===e.charCodeAt(uo)?(t=Ve,uo++):(t=i,0===yo&&vo(Ir)),t}function an(){var t;return 33===e.charCodeAt(uo)?(t=Fe,uo++):(t=i,0===yo&&vo(Lr)),t}function sn(){var e,t,r;return e=uo,(t=rn())!==i&&(r=rn())!==i?e=t=[t,r]:(uo=e,e=i),e}function ln(){var e,t,r;return e=uo,(t=on())!==i&&(r=on())!==i?e=t=[t,r]:(uo=e,e=i),e}function un(){var e,t,r;return e=uo,(t=nn())!==i&&(r=nn())!==i?e=t=[t,r]:(uo=e,e=i),e}function pn(){var e,t,r;return e=uo,(t=an())!==i&&(r=an())!==i?e=t=[t,r]:(uo=e,e=i),e}function cn(){var t;return e.substr(uo,2)===je?(t=je,uo+=2):(t=i,0===yo&&vo(Or)),t}function gn(){var t;return 93===e.charCodeAt(uo)?(t=Ge,uo++):(t=i,0===yo&&vo(Er)),t}function yn(){var t,r,o,n,a,s,l,u,p;if(t=uo,cn()!==i){if(r=uo,o=[],n=e.charAt(uo),He.test(n)?uo++:(n=i,0===yo&&vo(yt)),n!==i)for(;n!==i;)o.push(n),n=e.charAt(uo),He.test(n)?uo++:(n=i,0===yo&&vo(yt));else o=i;(r=o!==i?e.substring(r,uo):o)!==i&&(o=gn())!==i?(t,t=io(r)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,sn()!==i){for(32===e.charCodeAt(uo)?(r=k,uo++):(r=i,0===yo&&vo(dt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=sn())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=sn())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);o=e.substring(o,uo),32===e.charCodeAt(uo)?(n=k,uo++):(n=i,0===yo&&vo(dt)),n===i&&(n=null),(a=sn())!==i?(t,t=oo(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,ln()!==i){for(32===e.charCodeAt(uo)?(r=k,uo++):(r=i,0===yo&&vo(dt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=ln())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=ln())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);o=e.substring(o,uo),32===e.charCodeAt(uo)?(n=k,uo++):(n=i,0===yo&&vo(dt)),n===i&&(n=null),(a=ln())!==i?(t,t=no(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,un()!==i){for(32===e.charCodeAt(uo)?(r=k,uo++):(r=i,0===yo&&vo(dt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=un())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=un())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);o=e.substring(o,uo),32===e.charCodeAt(uo)?(n=k,uo++):(n=i,0===yo&&vo(dt)),n===i&&(n=null),(a=un())!==i?(t,t=ao(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i)if(t=uo,pn()!==i){for(32===e.charCodeAt(uo)?(r=k,uo++):(r=i,0===yo&&vo(dt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=pn())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=pn())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);o=e.substring(o,uo),32===e.charCodeAt(uo)?(n=k,uo++):(n=i,0===yo&&vo(dt)),n===i&&(n=null),(a=pn())!==i?(t,t=so(o)):(uo=t,t=i)}else uo=t,t=i}}}return t}function dn(){var t,r,o,n,a;if(t=uo,r=uo,(o=sn())!==i){if(n=[],(a=rn())!==i)for(;a!==i;)n.push(a),a=rn();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,(o=ln())!==i){if(n=[],(a=on())!==i)for(;a!==i;)n.push(a),a=on();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,(o=un())!==i){if(n=[],(a=nn())!==i)for(;a!==i;)n.push(a),a=nn();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,(o=pn())!==i){if(n=[],(a=an())!==i)for(;a!==i;)n.push(a),a=an();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;t=r!==i?e.substring(t,uo):r}}}return t}function fn(){var t;return yo++,10===e.charCodeAt(uo)?(t=De,uo++):(t=i,0===yo&&vo(Nr)),t===i&&(e.substr(uo,2)===Me?(t=Me,uo+=2):(t=i,0===yo&&vo(Vr)),t===i&&(t=e.charAt(uo),Ye.test(t)?uo++:(t=i,0===yo&&vo(Fr)))),yo--,t===i&&(i,0===yo&&vo(Rr)),t}function mn(){var t;return t=e.charAt(uo),Xe.test(t)?uo++:(t=i,0===yo&&vo(jr)),t}function hn(){var t,r;return(t=fn())===i&&(t=uo,yo++,e.length>uo?(r=e.charAt(uo),uo++):(r=i,0===yo&&vo(Qe)),yo--,r===i?t=void 0:(uo=t,t=i)),t}function Tn(){var t;return t=e.charAt(uo),Ze.test(t)?uo++:(t=i,0===yo&&vo(Jr)),t}var bn=[],vn="";if(e=e.trimStart(),r=g(),t.peg$library)return{peg$result:r,peg$currPos:uo,peg$FAILED:i,peg$maxFailExpected:go,peg$maxFailPos:co};if(r!==i&&uo===e.length)return r;throw r!==i&&uo<e.length&&vo({type:"end"}),Bo(go,co<e.length?e.charAt(co):null,co<e.length?bo(co,co+1):bo(co,co))}t.SyntaxError=u,function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(u,Error),u.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(i){var s=this.location.end,l=p("",n.line.toString().length," "),u=i[o.line-1],c=(o.line===s.line?s.column:u.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+l+" |\n"+n.line+" | "+u+"\n"+l+" | "+p("",o.column-1," ")+p("",c,"^")}else t+="\n at "+a}return t},u.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return 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,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return 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,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(a);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."},t.parse=c;t.StartRules=["version","bitmarkPlusPlus","bitmarkPlus","bitmarkMinusMinus","bitmarkPlusString","bitmarkMinusMinusString"]},4:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AstWalkerGenerator=void 0;const i=r(5126);t.AstWalkerGenerator=class{constructor(){this.ast=new i.Ast,this.debugGenerationInline=!1,this.printed=!1}enter(e,t,r){let i;const o=this,n=`enter_${e.key}`;return this.printed||(this.printed=!0),this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof o[n]&&(i=o[n](e,t,r)),i}between(e,t,r,i,o){let n;const a=this,s=`between_${e.key}`;return this.debugGenerationInline&&this.writeInlineDebug(e.key,{single:!0}),"function"==typeof a[s]&&(n=a[s](e,t,r,i,o)),n}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+1)return e[e.length-t-1]}}},5087:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkGenerator=void 0;const o=r(5126),n=r(2028),a=r(126),s=r(5854),l=r(3811),u=r(4410),p=r(1163),c=r(7203),g=r(166),y=r(6149),d=r(385),f=r(4078),m=r(955),h=r(4),T={debugGenerationInline:!1};class b extends h.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new o.Ast,this.skipNLBetweenBitsValue=!1,this.bitmarkVersion=null!==(r=l.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==r?r:l.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},T),null==t?void 0:t.bitmarkOptions),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.bitmarkVersion===l.BitmarkVersion.v2?void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=p.CardSetVersion.v1):void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=p.CardSetVersion.v2),this.prettifySpace=!0===this.options.prettifyJson?2:this.options.prettifyJson||void 0,this.writer=e,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.generatePropertyHandlers()}generate(e){return i(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.writeLine(),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.skipNLBetweenBitsValue=!1,this.printed=!1}walkAndWrite(e){this.ast.walk(e,a.NodeType.bitmarkAst,this,void 0),this.writeLine()}between_bits(e,t,r,i){this.writeNL(),this.writeNL(),this.writeNL()}enter_bitsValue(e,t){const r=e.value,i=n.Config.getBitConfig(r.bitType),o=n.Config.getBitResourcesConfig(r.bitType,r.resourceType);if(this.writeOPD(),r.isCommented&&this.writeString("|"),this.writeString(r.bitType),r.textFormat){this.isWriteTextFormat(r.textFormat,i.textFormatDefault)&&(this.writeColon(),this.writeString(r.textFormat))}let a;if(i.resourceAttachmentAllowed&&r.resources&&r.resources.length>0){const e=o.comboResourceTagTypesMap;if(o.comboResourceTagTypesMap.size>0)for(const t of e.keys())a=t;else a=r.resources[0].type}a&&(this.writeAmpersand(),this.writeString(a)),this.writeCL(),this.writeNL()}between_bitsValue(e,t,r,i){const o=[a.NodeType.bitType,a.NodeType.textFormat,a.NodeType.level,a.NodeType.progress,a.NodeType.toc,a.NodeType.referenceEnd,a.NodeType.labelFalse];e.value.book&&o.push(a.NodeType.reference);(()=>{if(this.skipNLBetweenBitsValue)return this.skipNLBetweenBitsValue=!1,!0;for(const e of o)if(t.key===e)return!0;return!1})()||this.writeNL()}enter_internalComment(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)===a.NodeType.bitsValue)for(let e=0;e<r.length;e++){const t=r[e],i=e===r.length-1;this.writeProperty("internalComment",t),i||this.writeNL()}}enter_labelTrue(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const o=null==i?void 0:i.value;o&&(""!=r&&this.writeProperty(g.PropertyTag.labelTrue,r,!0),o.labelFalse&&""!=o.labelFalse[0]&&this.writeProperty(g.PropertyTag.labelFalse,o.labelFalse,!0))}enter_imageSource(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const{url:o,mockupId:n,size:s,format:l,trim:u}=r;this.writeProperty("imageSource",o,!0),o&&(n&&this.writeProperty("mockupId",n,!0),s&&this.writeProperty("size",s,!0),l&&this.writeProperty("format",l,!0),f.BooleanUtils.isBoolean(u)&&this.writeProperty("trim",u,!0))}enter_technicalTerm(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const{technicalTerm:o,lang:n}=r;this.writeProperty("technicalTerm",o,!0),null!=n&&this.writeProperty("lang",n)}enter_servings(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const{servings:o,unit:n,unitAbbr:s,decimalPlaces:l,disableCalculation:u}=r;this.writeProperty("servings",o,!0),null!=n&&this.writeProperty("unit",n),null!=s&&this.writeProperty("unitAbbr",s),null!=l&&this.writeProperty("decimalPlaces",l),null!=u&&this.writeProperty("disableCalculation",u)}enter_person(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const{name:o,title:n,avatarImage:s}=r;this.writeProperty("person",o,!0),n&&this.writeProperty("title",n,!0),s&&this.writeResource(s)}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((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const{level:o,label:n}=r,s=e.key===a.NodeType.ratingLevelStart?g.PropertyTag.ratingLevelStart:g.PropertyTag.ratingLevelEnd;this.writeProperty(s,o,!0),n&&this.writeProperty("label",n,!0)}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.markConfig)return;const{mark:o,color:n,emphasis:s}=r;o&&(this.writeProperty("mark",o,!0),n&&this.writeProperty("color",n,!0),s&&this.writeProperty("emphasis",s,!0),this.writeNL())}leaf_sampleSolution(e,t){this.writeProperty("sampleSolution",e.value)}leaf_reasonableNumOfChars(e,t){this.writeProperty("reasonableNumOfChars",e.value)}enter_itemLead(e,t){const r=e.value;r&&(r.item||r.lead||r.pageNumber||r.marginNumber)&&(this.writeOPC(),this.writeString(r.item||""),this.writeCL(),(r.lead||r.pageNumber||r.marginNumber)&&(this.writeOPC(),this.writeString(r.lead||""),this.writeCL()),(r.pageNumber||r.marginNumber)&&(this.writeOPC(),this.writeString(r.pageNumber||""),this.writeCL()),r.marginNumber&&(this.writeOPC(),this.writeString(r.marginNumber||""),this.writeCL()))}enter_body(e,t){const r=e.value;(r.bodyParts&&r.bodyParts.length>0||r.bodyJson)&&this.writeNL()}enter_solutions(e,t){const r=e.value;r&&0===r.length&&(this.writeOPU(),this.writeCL())}leaf_solution(e,t){var r;const i=e.value,o=null===(r=this.getParentNode(t,2))||void 0===r?void 0:r.value;(null==o?void 0:o.type)===u.BodyBitType.mark&&i&&(this.writeOPE(),this.writeString(i),this.writeCL())}leaf_mark(e,t){var r;const i=e.value,o=null===(r=this.getParentNode(t,2))||void 0===r?void 0:r.value;(null==o?void 0:o.type)===u.BodyBitType.mark&&i&&this.writeProperty("mark",i,!0)}enter_optionsValue(e,t){const r=e.value;r.isCorrect?this.writeOPP():this.writeOPM(),this.write(r.text),this.writeCL()}enter_textsValue(e,t){const r=e.value;r.isCorrect?this.writeOPP():this.writeOPM(),this.write(r.text),this.writeCL()}enter_cardNode(e,t){this.isOfBitType1(t)||(this.writeCardSetStart(),this.writeNL())}between_cardNode(e,t,r,i){this.isOfBitType1(i)||(this.writeNL(),this.writeCardSetCardDivider(),this.writeNL())}exit_cardNode(e,t){this.isOfBitType1(t)||(this.writeNL(),this.writeCardSetEnd(),this.writeNL())}enter_elements(e,t){}between_elements(e,t,r,i){this.writeNL(),this.writeCardSetVariantDivider(),this.writeNL()}exit_elements(e,t){}between_flashcards(e,t,r,i){this.writeNL(),this.writeCardSetCardDivider(),this.writeNL()}between_flashcardsValue(e,t,r,i){r.key===a.NodeType.answer?(this.writeNL(),this.writeCardSetSideDivider(),this.writeNL()):r.key===a.NodeType.alternativeAnswers&&(this.writeNL(),this.writeCardSetVariantDivider(),this.writeNL())}leaf_answer(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)===a.NodeType.flashcardsValue&&e.value&&this.writeString(e.value)}between_alternativeAnswers(e,t){this.writeNL(),this.writeCardSetVariantDivider(),this.writeNL()}leaf_alternativeAnswersValue(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)===a.NodeType.alternativeAnswers&&e.value&&this.writeString(e.value)}enter_statements(e,t){}between_statements(e,t,r,i){this.isOfBitType(i,s.BitType.trueFalse1)||(this.writeNL(),this.writeCardSetCardDivider()),this.writeNL()}exit_statements(e,t){}enter_statementsValue(e,t){const r=e.value;r.isCorrect?this.writeOPP():this.writeOPM(),this.write(r.text),this.writeCL()}between_choices(e,t,r,i){this.writeNL()}exit_choices(e,t){this.writeNL()}enter_choicesValue(e,t){const r=e.value;r.isCorrect?this.writeOPP():this.writeOPM(),this.write(r.text),this.writeCL()}between_responses(e,t,r,i){this.writeNL()}exit_responses(e,t){this.writeNL()}enter_responsesValue(e,t){const r=e.value;r.isCorrect?this.writeOPP():this.writeOPM(),this.write(r.text),this.writeCL()}enter_quizzes(e,t){}between_quizzes(e,t,r,i){this.writeCardSetCardDivider(),this.writeNL()}exit_quizzes(e,t){}between_quizzesValue(e,t,r,i){r.key!==a.NodeType.choices&&r.key!==a.NodeType.responses||this.writeNL()}enter_heading(e,t){}between_heading(e,t,r,i){this.writeNL(),this.writeCardSetSideDivider(),this.writeNL()}exit_heading(e,t){}enter_forValues(e,t){}between_forValues(e,t,r,i){this.writeNL(),this.writeCardSetSideDivider(),this.writeNL()}exit_forValues(e,t){}enter_pairs(e,t){}between_pairs(e,t,r,i){this.writeNL(),this.writeCardSetCardDivider(),this.writeNL()}exit_pairs(e,t){}between_pairsValue(e,t,r,i){}enter_keyAudio(e,t){const r=e.value;this.writeResource(r)}enter_keyImage(e,t){const r=e.value;this.writeResource(r)}enter_matrix(e,t){}between_matrix(e,t,r,i){this.writeNL(),this.writeCardSetCardDivider(),this.writeNL()}exit_matrix(e,t){}between_matrixValue(e,t,r,i){}enter_values(e,t){this.writeNL(),this.writeCardSetSideDivider(),this.writeNL()}between_values(e,t,r,i){this.writeNL(),this.writeCardSetVariantDivider(),this.writeNL()}between_table(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===a.NodeType.cardNode&&(this.writeNL(),this.writeCardSetCardDivider(),this.writeNL())}between_rows(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===a.NodeType.table&&(this.writeNL(),this.writeCardSetCardDivider(),this.writeNL())}between_columns(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===a.NodeType.table&&(this.writeNL(),this.writeCardSetSideDivider(),this.writeNL())}leaf_columnsValue(e,t,r,i){this.writeOPHASH(),e.value&&this.writeString(e.value),this.writeCL()}between_rowsValue(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===a.NodeType.rows&&(this.writeNL(),this.writeCardSetSideDivider(),this.writeNL())}leaf_rowsValueValue(e,t,r,i){e.value&&this.write(e.value)}enter_questions(e,t){}between_questions(e,t,r,i){this.writeCardSetCardDivider(),this.writeNL()}exit_questions(e,t){}between_questionsValue(e,t,r,i){r.key===a.NodeType.sampleSolution&&this.writeNL()}exit_questionsValue(e,t){this.writeNL()}enter_ingredients(e,t){}between_ingredients(e,t,r,i){this.writeNL(),this.writeCardSetCardDivider(),this.writeNL()}exit_ingredients(e,t){}enter_ingredientsValue(e,t){const r=e.value;null!=r.title&&(this.writeOPHASH(),this.writeString(r.title),this.writeCL(),this.writeNL()),r.checked?this.writeOPP():this.writeOPM(),this.writeCL(),null!=r.quantity&&(this.writeOPB(),this.writeString(`${r.quantity}`),this.writeCL()),null!=r.unit&&this.writeProperty("unit",r.unit,!0),null!=r.unitAbbr&&this.writeProperty("unitAbbr",r.unitAbbr,!0),null!=r.decimalPlaces&&this.writeProperty("decimalPlaces",r.decimalPlaces,!0),r.disableCalculation&&this.writeProperty("disableCalculation",!0,!0),null!=r.item&&this.write(r.item)}enter_botResponses(e,t){}between_botResponses(e,t,r,i){this.writeCardSetCardDivider(),this.writeNL()}exit_botResponses(e,t){}between_botResponsesValue(e,t,r,i){this.writeNL()}exit_botResponsesValue(e,t){this.writeNL()}enter_cardBits(e,t){}between_cardBits(e,t,r,i){this.writeNL(),this.writeCardSetCardDivider(),this.writeNL()}exit_cardBits(e,t){}leaf_response(e,t){this.writeOPB(),this.writeString(e.value),this.writeCL()}leaf_reaction(e,t){this.writeProperty("reaction",e.value,!0)}leaf_feedback(e,t){const r=e.value;r&&this.write(r)}between_resources(e,t,r,i){this.writeNL()}enter_resourcesValue(e,t){const r=e.value;this.writeResource(r)}enter_posterImage(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)===a.NodeType.bitsValue){const t=e.value;t&&this.writeProperty("posterImage",t)}else{const t=e.value;t&&t.value&&this.writeProperty("posterImage",t.value)}}enter_thumbnails(e,t){const r=e.value;if(Array.isArray(r)){const e=["src1x","src2x","src3x","src4x"];for(let t=0;t<r.length&&t!==e.length;t++){const i=r[t],o=e[t];this.writeProperty(o,i.value,!0)}}}leaf_title(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==a.NodeType.bitsValue)return;const i=e.value,o=(null==r?void 0:r.value).level||1;if(o&&i){this.writeOP();for(let e=0;e<+o;e++)this.writeHash();this.writeString(i),this.writeCL()}}leaf_subtitle(e,t){const r=e.value;if(r){this.writeOP();for(let e=0;e<2;e++)this.writeHash();this.writeString(r),this.writeCL()}}leaf_book(e,t){const r=this.getParentNode(t),i=null==r?void 0:r.value;i&&e.value&&(this.writeProperty("book",e.value),i.reference&&(this.writeOPRANGLE(),this.writeString(i.reference),this.writeCL(),i.referenceEnd&&(this.writeOPRANGLE(),this.writeString(i.referenceEnd),this.writeCL())))}leaf_anchor(e,t){e.value&&(this.writeOPDANGLE(),this.writeString(e.value),this.writeCL())}leaf_reference(e,t){const r=this.getParentNode(t),i=null==r?void 0:r.value;i&&e.value&&(i.book||(this.writeOPRANGLE(),this.writeString(e.value),this.writeCL()))}leaf_hint(e,t){const r=e.value;r&&(this.writeOPQ(),this.writeString(r),this.writeCL())}leaf_instruction(e,t){const r=e.value;r&&(this.writeOPB(),this.writeString(r),this.writeCL())}leaf_example(e,t){var r,i;const o=e.value,n=this.getParentNode(t),a=null!==(r=null==n?void 0:n.value.isExample)&&void 0!==r&&r,s=null!==(i=null==n?void 0:n.value.isDefaultExample)&&void 0!==i&&i;a&&(s?(this.writeOPA(),this.writeString("example"),this.writeCL()):null!=o&&(this.writeOPA(),this.writeString("example"),this.writeColon(),!0===o?this.writeString("true"):!1===o?this.writeString("false"):this.writeString(o),this.writeCL()))}leaf_bodyText(e,t){const r=e.value;r&&this.writeString(r)}enter_bodyJson(e,t){const r=e.value;if(Array.isArray(r)||m.ObjectUtils.isObject(r)){const e=JSON.stringify(r,null,this.prettifySpace);e&&this.writeString(e)}return!1}leaf_footerText(e,t){const r=e.value;r&&this.writeString(r)}leaf_elementsValue(e,t){e.value&&this.writeString(e.value)}leaf_solutionsValue(e,t){null!=e.value&&(this.writeOPU(),this.writeString(e.value),this.writeCL())}leaf_prefix(e,t){e.value&&(this.writeOPPRE(),this.writeString(e.value),this.writeCL())}leaf_postfix(e,t){e.value&&(this.writeOPPOST(),this.writeString(e.value),this.writeCL())}leaf_isCaseSensitive(e,t){this.writeProperty("isCaseSensitive",e.value,!0,!1,!0)}leaf_forKeys(e,t){this.writeOPHASH(),this.writeString(e.value),this.writeCL()}leaf_forValuesValue(e,t){this.writeOPHASH(),this.writeString(e.value),this.writeCL()}leaf_key(e,t){e.value&&this.writeString(e.value)}leaf_valuesValue(e,t){e.value&&this.writeString(e.value)}leaf_question(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)!==a.NodeType.questionsValue&&(null==r?void 0:r.key)!==a.NodeType.flashcardsValue||e.value&&this.writeString(e.value)}leaf_src1x(e,t){this.writeProperty("src1x",e.value)}leaf_src2x(e,t){this.writeProperty("src2x",e.value)}leaf_src3x(e,t){this.writeProperty("src3x",e.value)}leaf_src4x(e,t){this.writeProperty("src4x",e.value)}leaf_width(e,t){this.writeProperty("width",e.value)}leaf_height(e,t){this.writeProperty("height",e.value)}leaf_alt(e,t){this.writeProperty("alt",e.value)}leaf_zoomDisabled(e,t){const r=this.getBitType(t);n.Config.isOfBitType(r,[s.BitType.imageSeparator,s.BitType.pageBanner,s.BitType.imagesLogoGrave,s.BitType.prototypeImages])?this.writeProperty("zoomDisabled",e.value,void 0,!1,!0):this.writeProperty("zoomDisabled",e.value,void 0,!0,!1)}leaf_license(e,t){this.writeProperty("license",e.value)}leaf_copyright(e,t){this.writeProperty("copyright",e.value)}leaf_provider(e,t){}leaf_showInIndex(e,t){this.writeProperty("showInIndex",e.value)}leaf_caption(e,t){const r=e.value;this.writeProperty("caption",r)}leaf_duration(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)!==a.NodeType.bitsValue&&this.writeProperty("duration",e.value)}leaf_mute(e,t){this.writeProperty("mute",e.value)}leaf_autoplay(e,t){this.writeProperty("autoplay",e.value)}leaf_allowSubtitles(e,t){this.writeProperty("allowSubtitles",e.value)}leaf_showSubtitles(e,t){this.writeProperty("showSubtitles",e.value)}generatePropertyHandlers(){var e;const t=n.Config.getRawPropertiesConfig();for(const r of Object.values(t)){const t=null!==(e=r.astKey)&&void 0!==e?e:r.tag;if(t===g.PropertyTag.internalComment)continue;if(t===g.PropertyTag.example)continue;if(t===g.PropertyTag.labelTrue)continue;if(t===g.PropertyTag.labelFalse)continue;if(t===g.PropertyTag.posterImage)continue;if(t===g.PropertyTag.imageSource)continue;if(t===g.PropertyTag.technicalTerm)continue;if(t===g.PropertyTag.servings)continue;if(t===g.PropertyTag.person)continue;if(t===c.PropertyAstKey.ast_markConfig)continue;if(t===g.PropertyTag.ratingLevelStart)continue;if(t===g.PropertyTag.ratingLevelEnd)continue;const i=`enter_${t}`;this[i]=(e,t)=>{if(null==e.value)return;const i=this.getParentNode(t);(null==i?void 0:i.key)===a.NodeType.bitsValue&&this.writeProperty(r.tag,e.value,r.single,"false"===r.defaultValue,"true"===r.defaultValue)},this[i]=this[i].bind(this)}}writeString(e){null!=e&&this.write(`${e}`)}writeOPBUL(){this.write("[•")}writeOPESC(){this.write("[^")}writeOPRANGLE(){this.write("[►")}writeOPDANGLE(){this.write("[▼")}writeOPD(){this.write("[.")}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(){this.write("]")}writeAmpersand(){this.write("&")}writeColon(){this.write(":")}writeHash(){this.write("#")}writeCardSetStart(){this.options.cardSetVersion===p.CardSetVersion.v1?this.write("\n==="):this.write("\n====")}writeCardSetEnd(){this.options.cardSetVersion===p.CardSetVersion.v1?this.write("==="):this.write("~~~~")}writeCardSetCardDivider(){this.options.cardSetVersion===p.CardSetVersion.v1?this.write("==="):this.write("====")}writeCardSetSideDivider(){this.options.cardSetVersion===p.CardSetVersion.v1?this.write("=="):this.write("--")}writeCardSetVariantDivider(){this.options.cardSetVersion===p.CardSetVersion.v1?this.write("--"):this.write("++")}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writeResource(e){var t;const r=e;e&&(this.writeOPAMP(),this.writeString(null!==(t=e.typeAlias)&&void 0!==t?t:e.type),e.type===y.ResourceTag.article&&r.value?(this.writeColon(),this.writeString(r.value),this.writeNL()):e.value&&(this.writeColon(),this.writeString(e.value)),this.writeCL())}writeProperty(e,t,r,i,o){let n,a=!1;if(void 0!==t&&(n=Array.isArray(t)?t:[t],n.length>0)){r&&(n=n.slice(n.length-1));for(const t of n)if(void 0!==t){if(i&&!1===t)continue;if(o&&!0===t)continue;this.writeOPA(),this.writeString(e),this.writeColon(),this.writeString(`${t}`),this.writeCL(),a=!0}}a||(this.skipNLBetweenBitsValue=!0)}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}isWriteTextFormat(e,t){return!!(!(d.TextFormat.fromValue(e)===t)||this.options.explicitTextFormat)}isOfBitType1(e){return this.isOfBitType(e,[s.BitType.trueFalse1,s.BitType.multipleChoice1,s.BitType.multipleResponse1])}isOfBitType(e,t){const r=this.getBitType(e);return n.Config.isOfBitType(r,t)}getBitType(e){for(const t of e)if(t.key===a.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}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}}t.BitmarkGenerator=b},3968:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkStringGenerator=void 0;const o=r(6772),n=r(5087);t.BitmarkStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.BitmarkGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},2497:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonGenerator=void 0;const n=r(5126),a=r(7735),s=r(2028),l=r(126),u=r(5854),p=r(3811),c=r(4410),g=r(363),y=r(7203),d=r(166),f=r(6149),m=r(385),h=r(777),T=r(6989),b=r(4078),v=r(8025),B=r(9681),C=r(201),P=r(4),k={};class x extends P.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new n.Ast,this.textParser=new h.TextParser,this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=a.Breakscape.EMPTY_STRING,this.bodyDefault=a.Breakscape.EMPTY_STRING,this.bodyJson=this.bodyDefault,this.startPlaceholderIndex=0,this.bitmarkVersion=null!==(r=p.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==r?r:p.DEFAULT_BITMARK_VERSION,this.textParserVersion=this.textParser.version(),this.options=Object.assign(Object.assign({},k),null==t?void 0:t.jsonOptions),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.jsonPrettifySpace=!0===this.options.prettify?2:this.options.prettify||void 0,this.bitmarkVersion===p.BitmarkVersion.v2?void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!0):void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!1),this.writer=e,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.generatePropertyHandlers()}generate(e){return i(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=this.options.textAsPlainText?a.Breakscape.EMPTY_STRING:[],this.bodyDefault=this.options.textAsPlainText?a.Breakscape.EMPTY_STRING:[],this.bodyJson=this.bodyDefault,this.startPlaceholderIndex=0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,l.NodeType.bitmarkAst,this,void 0)}enter_bitmarkAst(e,t){this.json=[]}enter_bitsValue(e,t){var r,i,o;const n=e.value;this.bitWrapperJson={},this.json.push(this.bitWrapperJson),this.bitJson=this.createBitJson(n),this.bitWrapperJson.bit=this.bitJson;const a=s.Config.getBitConfig(n.bitType),l=!!a.rootExampleType,p=a.rootExampleType===g.ExampleType.boolean;if(l){let e;p?(e=!0,s.Config.isOfBitType(n.bitType,u.BitType.trueFalse1)&&void 0!==(null===(i=null===(r=n.cardNode)||void 0===r?void 0:r.statement)||void 0===i?void 0:i.isCorrect)&&(e=n.cardNode.statement.isCorrect)):e=null!==(o=n.sampleSolution)&&void 0!==o?o:"";const t=this.toExample(n,{defaultExample:e,isBoolean:p});this.bitJson.isExample=t.isExample,this.bitJson.example=t.example}else n.isExample&&(this.bitJson.isExample=!0)}exit_bitsValue(e,t){this.cleanAndSetDefaultsForBitJson(this.bitJson)}enter_imageSource(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return;const{url:o,mockupId:n,size:a,format:s,trim:u}=r,p={};this.addProperty(p,"url",null!=o?o:"",!0),this.addProperty(p,"mockupId",null!=n?n:"",!0),this.addProperty(p,"size",null!=a?a:null,!0),this.addProperty(p,"format",null!=s?s:null,!0),this.addProperty(p,"trim",b.BooleanUtils.isBoolean(u)?u:null,!0),this.bitJson.imageSource=p}enter_person(e,t){const r=e.value,i=this.getBitType(t),o=this.getParentNode(t);if((null==o?void 0:o.key)!==l.NodeType.bitsValue||!i)return;const{name:n,title:a,avatarImage:p}=r,c={};if(this.addProperty(c,"name",null!=n?n:"",!0),a&&this.addProperty(c,"title",a,!0),p){const e=this.parseResourceToJson(i,p);e&&e.type===f.ResourceTag.image&&(c.avatarImage=e.image)}s.Config.isOfBitType(i,u.BitType.conversationLeft1)?this.bitJson.partner=c:this.bitJson.person=c}enter_ratingLevelStart(e,t){const r=this.enterRatingLevelStartEndCommon(e,t);return r&&(this.bitJson.ratingLevelStart=r),!1}enter_ratingLevelEnd(e,t){const r=this.enterRatingLevelStartEndCommon(e,t);return r&&(this.bitJson.ratingLevelEnd=r),!1}enterRatingLevelStartEndCommon(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return;const o={};return this.addProperty(o,"level",r.level,!0),r.label&&(o.label=this.convertBreakscapedStringToJsonText(r.label,m.TextFormat.bitmarkMinusMinus)),null==(null==o?void 0:o.label)&&delete o.label,o}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.markConfig)return;const{mark:o,color:n,emphasis:a}=r,s={};this.addProperty(s,"mark",null!=o?o:"unknown",!0),n&&this.addProperty(s,"color",null!=n?n:"",!0),a&&this.addProperty(s,"emphasis",null!=a?a:"",!0),this.bitJson.marks||(this.bitJson.marks=[]),this.bitJson.marks.push(s)}leaf_sampleSolution(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)===l.NodeType.bitsValue&&null!=e.value&&this.addProperty(this.bitJson,"sampleSolution",e.value,!0)}enter_itemLead(e,t){const r=e.value,{item:i,lead:o,pageNumber:n,marginNumber:a}=r,s=this.getParentNode(t);(null==s?void 0:s.key)===l.NodeType.bitsValue&&(null!=i&&(this.bitJson.item=this.convertBreakscapedStringToJsonText(i,m.TextFormat.bitmarkMinusMinus)),null!=o&&(this.bitJson.lead=this.convertBreakscapedStringToJsonText(o,m.TextFormat.bitmarkMinusMinus)),null!=n&&(this.bitJson.pageNumber=this.convertBreakscapedStringToJsonText(n,m.TextFormat.bitmarkMinusMinus)),null!=a&&(this.bitJson.marginNumber=this.convertBreakscapedStringToJsonText(a,m.TextFormat.bitmarkMinusMinus)))}enter_width(e,t){var r;let i=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===l.NodeType.bitsValue&&s.Config.isOfBitType(o,u.BitType.extractorBlock)&&(i=null!==(r=v.NumberUtils.asNumber(i,0))&&void 0!==r?r:0),this.addProperty(this.bitJson,"width",i,!0),!1}enter_height(e,t){var r;let i=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===l.NodeType.bitsValue&&s.Config.isOfBitType(o,u.BitType.extractorBlock)&&(i=null!==(r=v.NumberUtils.asNumber(i,0))&&void 0!==r?r:0),this.addProperty(this.bitJson,"height",i,!0),!1}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)}}enter_cardBitsValue(e,t){const r=this.getBitType(t);if(!r)return;let i;r===u.BitType.pageFooter?(this.bitJson.sections||(this.bitJson.sections=[]),i=this.bitJson.sections):(this.bitJson.listItems||(this.bitJson.listItems=[]),i=this.bitJson.listItems),this.listItem=Object.assign(Object.assign({},this.toItemLeadHintInstruction(e.value)),{body:this.bodyDefault});const o=e.value,n=this.listItem;null==o.pageNumber&&delete n.pageNumber,null==o.marginNumber&&delete n.marginNumber,i.push(this.listItem)}exit_cardBitsValue(e,t){this.listItem=void 0}enter_body(e,t){this.getTextFormat(t)===m.TextFormat.json&&(this.bodyDefault=null),this.bodyJson=this.bodyDefault}exit_body(e,t){const r=this.getParentNode(t);r&&(r.key===l.NodeType.bitsValue?this.bitJson.body=this.bodyJson:r.key===l.NodeType.cardBitsValue&&this.listItem&&(this.listItem.body=this.bodyJson))}enter_bodyParts(e,t){const r=e.value,i=this.options.textAsPlainText,o=this.getTextFormat(t);let n="",s=this.startPlaceholderIndex;const l=e=>({legacyPlaceholderKey:`{${e}}`,placeholderKey:`[!${e}]`});for(let e=0;e<r.length;e++){const t=r[e];if(t.type===c.BodyBitType.text){const e=t.data.bodyText;n=a.Breakscape.concatenate(n,e)}else{const{legacyPlaceholderKey:e,placeholderKey:t}=l(s);n=a.Breakscape.concatenate(n,i?e:t),s++}}this.bodyJson=this.convertBreakscapedStringToJsonText(n,o);const u=this.bodyJson;s=this.startPlaceholderIndex;for(let e=0;e<r.length;e++){const t=r[e];if(t.type===c.BodyBitType.text)continue;const o=t;let n;const{legacyPlaceholderKey:a}=l(s);switch(t.type){case c.BodyBitType.gap:{const e=o;n=this.createGapJson(e);break}case c.BodyBitType.mark:{const e=o;n=this.createMarkJson(e);break}case c.BodyBitType.select:{const e=o;n=this.createSelectJson(e);break}case c.BodyBitType.highlight:{const e=o;n=this.createHighlightJson(e);break}}n&&(i?(this.bitJson.placeholders||(this.bitJson.placeholders={}),this.bitJson.placeholders[a]=n):this.replacePlaceholderWithBodyBit(u,n,s)),s++}return this.startPlaceholderIndex=s,!1}enter_bodyJson(e,t){const r=e.value;return this.bodyJson=r,!1}enter_elements(e,t){const r=e.value;r&&r.length>0&&(this.bitJson.elements=a.Breakscape.unbreakscape(r))}enter_flashcards(e,t){var r,i,o,n,s,u;const p=e.value,c=this.getParentNode(t);if((null==c?void 0:c.key)!==l.NodeType.cardNode)return;const g=[];if(p)for(const e of p){const t=Object.assign(Object.assign({question:this.convertBreakscapedStringToJsonText(null!==(r=e.question)&&void 0!==r?r:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),answer:this.convertBreakscapedStringToJsonText(null!==(i=e.answer)&&void 0!==i?i:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),alternativeAnswers:(null!==(o=e.alternativeAnswers)&&void 0!==o?o:[]).map((e=>this.convertBreakscapedStringToJsonText(null!=e?e:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus)))},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:e.isDefaultExample,isBoolean:!0}));null==(null===(n=e.itemLead)||void 0===n?void 0:n.lead)&&delete t.lead,null==(null===(s=e.itemLead)||void 0===s?void 0:s.pageNumber)&&delete t.pageNumber,null==(null===(u=e.itemLead)||void 0===u?void 0:u.marginNumber)&&delete t.marginNumber,g.push(t)}g.length>0&&(this.bitJson.cards=g)}enter_statement(e,t){var r,i;const o=e.value,n=this.getParentNode(t);(null==n?void 0:n.key)===l.NodeType.cardNode&&o&&(this.bitJson.statement=null!==(r=a.Breakscape.unbreakscape(o.text))&&void 0!==r?r:"",this.bitJson.isCorrect=null!==(i=o.isCorrect)&&void 0!==i&&i)}enter_statements(e,t){var r,i,o,n,s;const u=e.value,p=this.getParentNode(t);if((null==p?void 0:p.key)!==l.NodeType.cardNode)return;const c=[];if(u)for(const e of u){const t=Object.assign(Object.assign({statement:null!==(r=a.Breakscape.unbreakscape(e.text))&&void 0!==r?r:"",isCorrect:!!e.isCorrect},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:!!e.isCorrect,isBoolean:!0}));null==(null===(i=e.itemLead)||void 0===i?void 0:i.item)&&delete t.item,null==(null===(o=e.itemLead)||void 0===o?void 0:o.lead)&&delete t.lead,null==(null===(n=e.itemLead)||void 0===n?void 0:n.pageNumber)&&delete t.pageNumber,null==(null===(s=e.itemLead)||void 0===s?void 0:s.marginNumber)&&delete t.marginNumber,null==(null==e?void 0:e.hint)&&delete t.hint,null==(null==e?void 0:e.instruction)&&delete t.instruction,c.push(t)}c.length>0&&(this.bitJson.statements=c)}enter_choices(e,t){var r,i,o,n,s;const u=e.value,p=this.getParentNode(t);if((null==p?void 0:p.key)!==l.NodeType.cardNode)return;const c=[];if(u)for(const e of u){const t=Object.assign(Object.assign({choice:null!==(r=a.Breakscape.unbreakscape(e.text))&&void 0!==r?r:"",isCorrect:null!==(i=e.isCorrect)&&void 0!==i&&i},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:!!e.isCorrect,isBoolean:!0}));null==(null===(o=e.itemLead)||void 0===o?void 0:o.lead)&&delete t.lead,null==(null===(n=e.itemLead)||void 0===n?void 0:n.pageNumber)&&delete t.pageNumber,null==(null===(s=e.itemLead)||void 0===s?void 0:s.marginNumber)&&delete t.marginNumber,c.push(t)}c.length>0&&(this.bitJson.choices=c)}enter_responses(e,t){var r,i,o,n,s;const u=e.value,p=this.getParentNode(t);if((null==p?void 0:p.key)!==l.NodeType.cardNode)return;const c=[];if(u)for(const e of u){const t=Object.assign(Object.assign({response:null!==(r=a.Breakscape.unbreakscape(e.text))&&void 0!==r?r:"",isCorrect:null!==(i=e.isCorrect)&&void 0!==i&&i},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:!!e.isCorrect,isBoolean:!0}));null==(null===(o=e.itemLead)||void 0===o?void 0:o.lead)&&delete t.lead,null==(null===(n=e.itemLead)||void 0===n?void 0:n.pageNumber)&&delete t.pageNumber,null==(null===(s=e.itemLead)||void 0===s?void 0:s.marginNumber)&&delete t.marginNumber,c.push(t)}c.length>0&&(this.bitJson.responses=c)}enter_quizzes(e,t){var r,i,o,n,s,l,u,p,c,g,y,d,f,m;const h=e.value,T=[];if(h)for(const e of h){const t=[];if(e.choices)for(const l of e.choices){const u=Object.assign(Object.assign({choice:null!==(r=a.Breakscape.unbreakscape(l.text))&&void 0!==r?r:"",isCorrect:null!==(i=l.isCorrect)&&void 0!==i&&i},this.toItemLeadHintInstruction(l)),this.toExample(l,{defaultExample:!!l.isCorrect,isBoolean:!0}));null==(null===(o=e.itemLead)||void 0===o?void 0:o.lead)&&delete u.lead,null==(null===(n=e.itemLead)||void 0===n?void 0:n.pageNumber)&&delete u.pageNumber,null==(null===(s=e.itemLead)||void 0===s?void 0:s.marginNumber)&&delete u.marginNumber,t.push(u)}const h=[];if(e.responses)for(const t of e.responses){const r=Object.assign(Object.assign({response:null!==(l=a.Breakscape.unbreakscape(t.text))&&void 0!==l?l:"",isCorrect:null!==(u=t.isCorrect)&&void 0!==u&&u},this.toItemLeadHintInstruction(t)),this.toExample(t,{defaultExample:!!t.isCorrect,isBoolean:!0}));null==(null===(p=e.itemLead)||void 0===p?void 0:p.lead)&&delete r.lead,null==(null===(c=e.itemLead)||void 0===c?void 0:c.pageNumber)&&delete r.pageNumber,null==(null===(g=e.itemLead)||void 0===g?void 0:g.marginNumber)&&delete r.marginNumber,h.push(r)}const b=Object.assign(Object.assign({},this.toItemLeadHintInstruction(e)),{isExample:null!==(y=e.isExample)&&void 0!==y&&y,choices:e.choices?t:void 0,responses:e.responses?h:void 0});null==(null===(d=e.itemLead)||void 0===d?void 0:d.lead)&&delete b.lead,null==(null===(f=e.itemLead)||void 0===f?void 0:f.pageNumber)&&delete b.pageNumber,null==(null===(m=e.itemLead)||void 0===m?void 0:m.marginNumber)&&delete b.marginNumber,T.push(b)}T.length>0&&(this.bitJson.quizzes=T)}enter_heading(e,t){var r;const i=e.value,o=this.getBitType(t),n=s.Config.isOfBitType(o,u.BitType.matchMatrix),l={forKeys:null!==(r=a.Breakscape.unbreakscape(i.forKeys))&&void 0!==r?r:""};n?(l.forValues=[],Array.isArray(i.forValues)&&i.forValues.length>=1&&(l.forValues=a.Breakscape.unbreakscape(i.forValues))):(l.forValues="",Array.isArray(i.forValues)&&i.forValues.length>=1&&(l.forValues=a.Breakscape.unbreakscape(i.forValues[i.forValues.length-1]))),this.bitJson.heading=l}enter_pairs(e,t){var r,i,o,n,s,l;const u=e.value,p=[],c=this.getBitType(t);if(u&&c)for(const e of u){const t=Array.isArray(e.values)&&e.values.length>0&&e.values[0],u=Object.assign(Object.assign(Object.assign({key:null!==(r=a.Breakscape.unbreakscape(e.key))&&void 0!==r?r:"",keyAudio:e.keyAudio?this.addAudioResource(c,e.keyAudio):void 0,keyImage:e.keyImage?this.addImageResource(c,e.keyImage):void 0,values:null!==(i=a.Breakscape.unbreakscape(e.values))&&void 0!==i?i:[]},this.toItemLeadHintInstruction(e)),{isCaseSensitive:null===(o=e.isCaseSensitive)||void 0===o||o}),this.toExample(e,{defaultExample:t,isBoolean:!1}));null==(null===(n=e.itemLead)||void 0===n?void 0:n.lead)&&delete u.lead,null==(null===(s=e.itemLead)||void 0===s?void 0:s.pageNumber)&&delete u.pageNumber,null==(null===(l=e.itemLead)||void 0===l?void 0:l.marginNumber)&&delete u.marginNumber,u.key&&(delete u.keyAudio,delete u.keyImage),null!=u.keyAudio&&(delete u.key,delete u.keyImage),null!=u.keyImage&&(delete u.key,delete u.keyAudio),p.push(u)}p.length>0&&(this.bitJson.pairs=p)}enter_matrix(e,t){var r,i,o,n,s,l,u,p,c,g;const y=e.value,d=[];if(y)for(const e of y){const t=[];if(e.cells)for(const l of e.cells){const e=Array.isArray(l.values)&&l.values.length>0&&l.values[0],u=Object.assign(Object.assign(Object.assign({values:null!==(r=a.Breakscape.unbreakscape(l.values))&&void 0!==r?r:[]},this.toItemLeadHintInstruction(l)),{isCaseSensitive:null===(i=l.isCaseSensitive)||void 0===i||i}),this.toExample(l,{defaultExample:e,isBoolean:!1}));null==(null===(o=l.itemLead)||void 0===o?void 0:o.lead)&&delete u.lead,null==(null===(n=l.itemLead)||void 0===n?void 0:n.pageNumber)&&delete u.pageNumber,null==(null===(s=l.itemLead)||void 0===s?void 0:s.marginNumber)&&delete u.marginNumber,null==l.hint&&delete u.hint,t.push(u)}const y=Object.assign(Object.assign({key:null!==(l=a.Breakscape.unbreakscape(e.key))&&void 0!==l?l:"",cells:null!=t?t:[]},this.toItemLeadHintInstruction(e)),{isExample:null!==(u=e.isExample)&&void 0!==u&&u});null==(null===(p=e.itemLead)||void 0===p?void 0:p.lead)&&delete y.lead,null==(null===(c=e.itemLead)||void 0===c?void 0:c.pageNumber)&&delete y.pageNumber,null==(null===(g=e.itemLead)||void 0===g?void 0:g.marginNumber)&&delete y.marginNumber,null==e.instruction&&delete y.instruction,d.push(y)}d.length>0&&(this.bitJson.matrix=d)}enter_table(e,t){const r=e.value;if(r){const e={columns:a.Breakscape.unbreakscape(r.columns),data:r.rows.map((e=>a.Breakscape.unbreakscape(e)))};this.bitJson.table=e}}enter_questions(e,t){var r,i,o,n,s,l;const u=e.value,p=[];if(u)for(const e of u){const t=Object.assign(Object.assign(Object.assign({question:null!==(r=a.Breakscape.unbreakscape(e.question))&&void 0!==r?r:"",partialAnswer:null!==(i=a.Breakscape.unbreakscape(T.ArrayUtils.asSingle(e.partialAnswer)))&&void 0!==i?i:"",sampleSolution:null!==(o=a.Breakscape.unbreakscape(e.sampleSolution))&&void 0!==o?o:""},this.toItemLeadHintInstruction(e)),{reasonableNumOfChars:e.reasonableNumOfChars}),this.toExample(e,{defaultExample:e.sampleSolution||"",isBoolean:!1}));null==(null===(n=e.itemLead)||void 0===n?void 0:n.lead)&&delete t.lead,null==(null===(s=e.itemLead)||void 0===s?void 0:s.pageNumber)&&delete t.pageNumber,null==(null===(l=e.itemLead)||void 0===l?void 0:l.marginNumber)&&delete t.marginNumber,p.push(t)}p.length>0&&(this.bitJson.questions=p)}enter_botResponses(e,t){var r,i,o,n,s,u;const p=e.value,c=this.getParentNode(t);if((null==c?void 0:c.key)!==l.NodeType.cardNode)return;const g=[];if(p)for(const e of p){const t=Object.assign({response:null!==(r=a.Breakscape.unbreakscape(e.response))&&void 0!==r?r:"",reaction:null!==(i=a.Breakscape.unbreakscape(e.reaction))&&void 0!==i?i:"",feedback:null!==(o=a.Breakscape.unbreakscape(e.feedback))&&void 0!==o?o:""},this.toItemLeadHintInstruction(e));null==(null===(n=e.itemLead)||void 0===n?void 0:n.lead)&&delete t.lead,null==(null===(s=e.itemLead)||void 0===s?void 0:s.pageNumber)&&delete t.pageNumber,null==(null===(u=e.itemLead)||void 0===u?void 0:u.marginNumber)&&delete t.marginNumber,null==e.hint&&delete t.hint,delete t.instruction,g.push(t)}g.length>0&&(this.bitJson.responses=g)}enter_ingredients(e,t){var r,i,o,n,s,u,p,c;const g=e.value,y=this.getParentNode(t);if((null==y?void 0:y.key)!==l.NodeType.cardNode)return;const d=[];if(g)for(const e of g){const t={title:null!==(r=a.Breakscape.unbreakscape(e.title))&&void 0!==r?r:"",checked:null!==(i=e.checked)&&void 0!==i&&i,item:null!==(o=a.Breakscape.unbreakscape(e.item))&&void 0!==o?o:"",quantity:null!==(n=e.quantity)&&void 0!==n?n:0,unit:null!==(s=a.Breakscape.unbreakscape(e.unit))&&void 0!==s?s:"",unitAbbr:null!==(u=a.Breakscape.unbreakscape(e.unitAbbr))&&void 0!==u?u:"",decimalPlaces:null!==(p=e.decimalPlaces)&&void 0!==p?p:1,disableCalculation:null!==(c=e.disableCalculation)&&void 0!==c&&c};null==(null==e?void 0:e.title)&&delete t.title,null==(null==e?void 0:e.unitAbbr)&&delete t.unitAbbr,d.push(t)}d.length>0&&(this.bitJson.ingredients=d)}enter_resources(e,t){var r;const i=e.value,o=this.getBitType(t),n=this.getResourceType(t);if(!i||!o)return;let a;const l=s.Config.getBitConfig(o),p=s.Config.getBitResourcesConfig(o,n),c=p.comboResourceTagTypesMap;if(p.comboResourceTagTypesMap.size>0)for(const[e,t]of c.entries()){const n={type:e};for(const e of t){const t=i.find((t=>t.typeAlias===e));if(t){const e=s.Config.getTagConfigForTag(l.tags,t.typeAlias),i=null!==(r=null==e?void 0:e.jsonKey)&&void 0!==r?r:t.typeAlias,a=this.parseResourceToJson(o,t);if(a)for(const[e,t]of Object.entries(a))"type"!==e&&(n[i]=t)}}a=n}else if(s.Config.isOfBitType(o,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])){const e=[];for(const t of i){const r=this.parseResourceToJson(o,t);r&&e.push(r)}o===u.BitType.imagesLogoGrave?this.bitJson.logos=e:this.bitJson.images=e}else i.length>=1&&(a=this.parseResourceToJson(o,i[0]));this.bitJson.resource=a}leaf_title(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)!==l.NodeType.bitsValue&&(null==r?void 0:r.key)!==l.NodeType.cardNode||(this.bitJson.title=this.convertBreakscapedStringToJsonText(e.value,m.TextFormat.bitmarkMinusMinus))}leaf_subtitle(e,t){this.bitJson.subtitle=this.convertBreakscapedStringToJsonText(e.value,m.TextFormat.bitmarkMinusMinus)}leaf_level(e,t){var r;null!=e.value&&this.addProperty(this.bitJson,"level",null!==(r=e.value)&&void 0!==r?r:1,!0)}leaf_book(e,t){null!=e.value&&this.addProperty(this.bitJson,"book",e.value,!0)}leaf_anchor(e,t){null!=e.value&&this.addProperty(this.bitJson,"anchor",e.value,!0)}leaf_reference(e,t){null!=e.value&&this.addProperty(this.bitJson,"reference",e.value,!0)}leaf_referenceEnd(e,t){null!=e.value&&this.addProperty(this.bitJson,"referenceEnd",e.value,!0)}leaf_caption(e,t){const r=e.value,i=this.getParentNode(t);(null==i?void 0:i.key)===l.NodeType.bitsValue&&(this.bitJson.caption=this.convertBreakscapedStringToJsonText(r,m.TextFormat.bitmarkMinusMinus))}leaf_hint(e,t){const r=e.value,i=this.getParentNode(t);(null==i?void 0:i.key)===l.NodeType.bitsValue&&(this.bitJson.hint=this.convertBreakscapedStringToJsonText(r,m.TextFormat.bitmarkMinusMinus))}leaf_instruction(e,t){const r=e.value,i=this.getParentNode(t);(null==i?void 0:i.key)===l.NodeType.bitsValue&&(this.bitJson.instruction=this.convertBreakscapedStringToJsonText(r,m.TextFormat.bitmarkMinusMinus))}leaf_footerText(e,t){const r=e.value;this.bitJson.footer=this.convertBreakscapedStringToJsonText(r,m.TextFormat.bitmarkMinusMinus)}leaf_markup(e,t){const r=e.value;r&&(this.bitWrapperJson.bitmark=r)}enter_parser(e,t){const r=e.value,i=this.getBitType(t),n=this.getParentNode(t);if(r&&i){const{version:e,excessResources:s,warnings:u,errors:p}=r,c=o(r,["version","excessResources","warnings","errors"]),g=`${this.bitmarkVersion}`,y=this.textParserVersion;let d;if(Array.isArray(s)&&s.length>0){d=[];for(const e of s){const t=this.parseResourceToJson(i,e);t&&d.push(t)}}const f=a.Breakscape.unbreakscape(this.getInternalComments(t));(null==n?void 0:n.key)===l.NodeType.bitsValue&&(this.bitWrapperJson.parser=Object.assign(Object.assign({version:e,bitmarkVersion:g,textParserVersion:y,internalComments:f},c),{warnings:u,errors:p,excessResources:d}),this.options.enableWarnings||delete this.bitWrapperJson.parser.warnings)}}generatePropertyHandlers(){var e;const t=s.Config.getRawPropertiesConfig();for(const r of Object.values(t)){const t=null!==(e=r.astKey)&&void 0!==e?e:r.tag;if(t===d.PropertyTag.internalComment)continue;if(t===d.PropertyTag.caption)continue;if(t===d.PropertyTag.example)continue;if(t===d.PropertyTag.imageSource)continue;if(t===d.PropertyTag.person)continue;if(t===d.PropertyTag.width)continue;if(t===d.PropertyTag.height)continue;if(t===y.PropertyAstKey.ast_markConfig)continue;if(t===d.PropertyTag.ratingLevelStart)continue;if(t===d.PropertyTag.ratingLevelEnd)continue;const i=`enter_${t}`;this[i]=(e,t)=>{var i;const o=e.value;if(null==o)return;const n=this.getParentNode(t);if((null==n?void 0:n.key)!==l.NodeType.bitsValue)return;const a=null!==(i=r.jsonKey)&&void 0!==i?i:r.tag;this.addProperty(this.bitJson,a,o,r.single)},this[i]=this[i].bind(this)}}createGapJson(e){var t;const r=e.data,i=r.solutions&&r.solutions.length>0?r.solutions[0]:"";return Object.assign(Object.assign(Object.assign(Object.assign({type:"gap"},this.toItemLeadHintInstruction(r)),{isCaseSensitive:null===(t=r.isCaseSensitive)||void 0===t||t}),this.toExample(r,{defaultExample:i,isBoolean:!1})),{solutions:a.Breakscape.unbreakscape(r.solutions)})}createMarkJson(e){const t=e.data;return Object.assign(Object.assign({type:"mark",solution:a.Breakscape.unbreakscape(t.solution),mark:a.Breakscape.unbreakscape(t.mark)},this.toItemLeadHintInstruction(t)),this.toExample(t,{defaultExample:!0,isBoolean:!0}))}createSelectJson(e){var t,r,i,o;const n=e.data,s=[];for(const e of n.options){const r=Object.assign(Object.assign({text:a.Breakscape.unbreakscape(e.text),isCorrect:null!==(t=e.isCorrect)&&void 0!==t&&t},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:!!e.isCorrect,isBoolean:!0}));s.push(r)}return Object.assign(Object.assign({type:"select",prefix:null!==(r=a.Breakscape.unbreakscape(n.prefix))&&void 0!==r?r:"",postfix:null!==(i=a.Breakscape.unbreakscape(n.postfix))&&void 0!==i?i:""},this.toItemLeadHintInstruction(n)),{isExample:null!==(o=n.isExample)&&void 0!==o&&o,options:s})}createHighlightJson(e){var t,r,i,o,n;const s=e.data,l=[];for(const e of s.texts){const i=Object.assign(Object.assign({text:a.Breakscape.unbreakscape(e.text),isCorrect:null!==(t=e.isCorrect)&&void 0!==t&&t,isHighlighted:null!==(r=e.isHighlighted)&&void 0!==r&&r},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:!!e.isCorrect,isBoolean:!0}));l.push(i)}return Object.assign(Object.assign({type:"highlight",prefix:null!==(i=a.Breakscape.unbreakscape(s.prefix))&&void 0!==i?i:"",postfix:null!==(o=a.Breakscape.unbreakscape(s.postfix))&&void 0!==o?o:""},this.toItemLeadHintInstruction(s)),{isExample:null!==(n=s.isExample)&&void 0!==n&&n,texts:l})}parseResourceToJson(e,t){if(!t)return;let r;switch(t.type){case f.ResourceTag.image:r={type:f.ResourceTag.image,image:this.addImageResource(e,t)};break;case f.ResourceTag.imageLink:r={type:f.ResourceTag.imageLink,imageLink:this.addImageLinkResource(e,t)};break;case f.ResourceTag.audio:r={type:f.ResourceTag.audio,audio:this.addAudioResource(e,t)};break;case f.ResourceTag.audioEmbed:r={type:f.ResourceTag.audioEmbed,audioEmbed:this.addAudioEmbedResource(e,t)};break;case f.ResourceTag.audioLink:r={type:f.ResourceTag.audioLink,audioLink:this.addAudioLinkResource(e,t)};break;case f.ResourceTag.video:r={type:f.ResourceTag.video,video:this.addVideoResource(e,t)};break;case f.ResourceTag.videoEmbed:r={type:f.ResourceTag.videoEmbed,videoEmbed:this.addVideoEmbedResource(e,t)},r.videoEmbed=this.addVideoLinkResource(e,t);break;case f.ResourceTag.videoLink:r={type:f.ResourceTag.videoLink,videoLink:this.addVideoLinkResource(e,t)};break;case f.ResourceTag.stillImageFilmEmbed:r={type:f.ResourceTag.stillImageFilmEmbed,stillImageFilmEmbed:this.addStillImageFilmEmbedResource(e,t)};break;case f.ResourceTag.stillImageFilmLink:r={type:f.ResourceTag.stillImageFilmLink,stillImageFilmLink:this.addStillImageFilmLinkResource(e,t)};break;case f.ResourceTag.article:r={type:f.ResourceTag.article,article:this.addArticleResource(e,t)};break;case f.ResourceTag.document:r={type:f.ResourceTag.document,document:this.addDocumentResource(e,t)};break;case f.ResourceTag.documentEmbed:r={type:f.ResourceTag.documentEmbed,documentEmbed:this.addDocumentEmbedResource(e,t)};break;case f.ResourceTag.documentLink:r={type:f.ResourceTag.documentLink,documentLink:this.addDocumentLinkResource(e,t)};break;case f.ResourceTag.documentDownload:r={type:f.ResourceTag.documentDownload,documentDownload:this.addDocumentDownloadResource(e,t)};break;case f.ResourceTag.appLink:r={type:f.ResourceTag.appLink,appLink:this.addAppLinkResource(e,t)};break;case f.ResourceTag.websiteLink:r={type:f.ResourceTag.websiteLink,websiteLink:this.addWebsiteLinkResource(e,t)}}return r}addImageResource(e,t){var r,i,o;const n={};if(B.StringUtils.isString(t)){const e=t;t={type:f.ResourceTag.image,typeAlias:f.ResourceTag.image,value:e,format:C.UrlUtils.fileExtensionFromUrl(e),provider:C.UrlUtils.domainFromUrl(e)}}return null!=t.format&&(n.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(n.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(n.src=a.Breakscape.unbreakscape(t.value)),null!=t.src1x&&(n.src1x=a.Breakscape.unbreakscape(t.src1x)),null!=t.src2x&&(n.src2x=a.Breakscape.unbreakscape(t.src2x)),null!=t.src3x&&(n.src3x=a.Breakscape.unbreakscape(t.src3x)),null!=t.src4x&&(n.src4x=a.Breakscape.unbreakscape(t.src4x)),n.width=null!==(r=t.width)&&void 0!==r?r:null,n.height=null!==(i=t.height)&&void 0!==i?i:null,n.alt=null!==(o=a.Breakscape.unbreakscape(t.alt))&&void 0!==o?o:"",n.zoomDisabled=this.getZoomDisabled(e,t.zoomDisabled),this.addGenericResourceProperties(e,t,n),n}addImageLinkResource(e,t){var r,i,o;const n={};if(B.StringUtils.isString(t)){const e=t;t={type:f.ResourceTag.imageLink,typeAlias:f.ResourceTag.imageLink,value:e,format:C.UrlUtils.fileExtensionFromUrl(e),provider:C.UrlUtils.domainFromUrl(e)}}return null!=t.format&&(n.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(n.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(n.url=a.Breakscape.unbreakscape(t.value)),null!=t.src1x&&(n.src1x=a.Breakscape.unbreakscape(t.src1x)),null!=t.src2x&&(n.src2x=a.Breakscape.unbreakscape(t.src2x)),null!=t.src3x&&(n.src3x=a.Breakscape.unbreakscape(t.src3x)),null!=t.src4x&&(n.src4x=a.Breakscape.unbreakscape(t.src4x)),n.width=null!==(r=t.width)&&void 0!==r?r:null,n.height=null!==(i=t.height)&&void 0!==i?i:null,n.alt=null!==(o=a.Breakscape.unbreakscape(t.alt))&&void 0!==o?o:"",n.zoomDisabled=this.getZoomDisabled(e,t.zoomDisabled),this.addGenericResourceProperties(e,t,n),n}addAudioResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.src=a.Breakscape.unbreakscape(t.value)),null!=t.duration&&(r.duration=t.duration),null!=t.mute&&(r.mute=t.mute),null!=t.autoplay&&(r.autoplay=t.autoplay),this.addGenericResourceProperties(e,t,r),r}addAudioEmbedResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.src=a.Breakscape.unbreakscape(t.value)),null!=t.duration&&(r.duration=t.duration),null!=t.mute&&(r.mute=t.mute),null!=t.autoplay&&(r.autoplay=t.autoplay),this.addGenericResourceProperties(e,t,r),r}addAudioLinkResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),null!=t.duration&&(r.duration=t.duration),null!=t.mute&&(r.mute=t.mute),null!=t.autoplay&&(r.autoplay=t.autoplay),this.addGenericResourceProperties(e,t,r,!0),r}addVideoResource(e,t){var r,i;const o={};if(null!=t.format&&(o.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(o.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(o.src=a.Breakscape.unbreakscape(t.value)),o.width=null!==(r=t.width)&&void 0!==r?r:null,o.height=null!==(i=t.height)&&void 0!==i?i:null,null!=t.duration&&(o.duration=t.duration),null!=t.mute&&(o.mute=t.mute),null!=t.autoplay&&(o.autoplay=t.autoplay),null!=t.allowSubtitles&&(o.allowSubtitles=t.allowSubtitles),null!=t.showSubtitles&&(o.showSubtitles=t.showSubtitles),null!=t.alt&&(o.alt=a.Breakscape.unbreakscape(t.alt)),null!=t.posterImage&&(o.posterImage=this.addImageResource(e,t.posterImage)),null!=t.thumbnails&&t.thumbnails.length>0){o.thumbnails=[];for(const r of t.thumbnails)o.thumbnails.push(this.addImageResource(e,r))}return this.addGenericResourceProperties(e,t,o),o}addVideoEmbedResource(e,t){var r,i;const o={};if(null!=t.format&&(o.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(o.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(o.src=a.Breakscape.unbreakscape(t.value)),o.width=null!==(r=t.width)&&void 0!==r?r:null,o.height=null!==(i=t.height)&&void 0!==i?i:null,null!=t.duration&&(o.duration=t.duration),null!=t.mute&&(o.mute=t.mute),null!=t.autoplay&&(o.autoplay=t.autoplay),null!=t.allowSubtitles&&(o.allowSubtitles=t.allowSubtitles),null!=t.showSubtitles&&(o.showSubtitles=t.showSubtitles),null!=t.alt&&(o.alt=a.Breakscape.unbreakscape(t.alt)),null!=t.posterImage&&(o.posterImage=this.addImageResource(e,t.posterImage)),null!=t.thumbnails&&t.thumbnails.length>0){o.thumbnails=[];for(const r of t.thumbnails)o.thumbnails.push(this.addImageResource(e,r))}return this.addGenericResourceProperties(e,t,o),o}addVideoLinkResource(e,t){var r,i;const o={};if(null!=t.format&&(o.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(o.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(o.url=a.Breakscape.unbreakscape(t.value)),o.width=null!==(r=t.width)&&void 0!==r?r:null,o.height=null!==(i=t.height)&&void 0!==i?i:null,null!=t.duration&&(o.duration=t.duration),null!=t.mute&&(o.mute=t.mute),null!=t.autoplay&&(o.autoplay=t.autoplay),null!=t.allowSubtitles&&(o.allowSubtitles=t.allowSubtitles),null!=t.showSubtitles&&(o.showSubtitles=t.showSubtitles),null!=t.alt&&(o.alt=a.Breakscape.unbreakscape(t.alt)),null!=t.posterImage&&(o.posterImage=this.addImageResource(e,t.posterImage)),null!=t.thumbnails&&t.thumbnails.length>0){o.thumbnails=[];for(const r of t.thumbnails)o.thumbnails.push(this.addImageResource(e,r))}return this.addGenericResourceProperties(e,t,o),o}addStillImageFilmEmbedResource(e,t){var r,i;const o={};if(null!=t.format&&(o.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(o.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(o.url=a.Breakscape.unbreakscape(t.value)),o.width=null!==(r=t.width)&&void 0!==r?r:null,o.height=null!==(i=t.height)&&void 0!==i?i:null,null!=t.duration&&(o.duration=t.duration),null!=t.mute&&(o.mute=t.mute),null!=t.autoplay&&(o.autoplay=t.autoplay),null!=t.allowSubtitles&&(o.allowSubtitles=t.allowSubtitles),null!=t.showSubtitles&&(o.showSubtitles=t.showSubtitles),null!=t.alt&&(o.alt=a.Breakscape.unbreakscape(t.alt)),null!=t.posterImage&&(o.posterImage=this.addImageResource(e,t.posterImage)),null!=t.thumbnails&&t.thumbnails.length>0){o.thumbnails=[];for(const r of t.thumbnails)o.thumbnails.push(this.addImageResource(e,r))}return this.addGenericResourceProperties(e,t,o),o}addStillImageFilmLinkResource(e,t){var r,i;const o={};if(null!=t.format&&(o.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(o.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(o.url=a.Breakscape.unbreakscape(t.value)),o.width=null!==(r=t.width)&&void 0!==r?r:null,o.height=null!==(i=t.height)&&void 0!==i?i:null,null!=t.duration&&(o.duration=t.duration),null!=t.mute&&(o.mute=t.mute),null!=t.autoplay&&(o.autoplay=t.autoplay),null!=t.allowSubtitles&&(o.allowSubtitles=t.allowSubtitles),null!=t.showSubtitles&&(o.showSubtitles=t.showSubtitles),null!=t.alt&&(o.alt=a.Breakscape.unbreakscape(t.alt)),null!=t.posterImage&&(o.posterImage=this.addImageResource(e,t.posterImage)),null!=t.thumbnails&&t.thumbnails.length>0){o.thumbnails=[];for(const r of t.thumbnails)o.thumbnails.push(this.addImageResource(e,r))}return this.addGenericResourceProperties(e,t,o),o}addArticleResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.body=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addDocumentResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addDocumentEmbedResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addDocumentLinkResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addDocumentDownloadResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addAppLinkResource(e,t){const r={};return null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addWebsiteLinkResource(e,t){const r={};return null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),null!=t.siteName&&(r.siteName=a.Breakscape.unbreakscape(t.siteName)),this.addGenericResourceProperties(e,t,r),r}addGenericResourceProperties(e,t,r,i){var o,n,s,l,u,p,c,g;return i?(null!=t.license&&(r.license=null!==(o=a.Breakscape.unbreakscape(t.license))&&void 0!==o?o:""),null!=t.copyright&&(r.copyright=null!==(n=a.Breakscape.unbreakscape(t.copyright))&&void 0!==n?n:""),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.showInIndex&&(r.showInIndex=null!==(s=t.showInIndex)&&void 0!==s&&s),null!=t.caption&&(r.caption=this.convertBreakscapedStringToJsonText(null!==(l=t.caption)&&void 0!==l?l:"",m.TextFormat.bitmarkMinusMinus))):(r.license=null!==(u=a.Breakscape.unbreakscape(t.license))&&void 0!==u?u:"",r.copyright=null!==(p=a.Breakscape.unbreakscape(t.copyright))&&void 0!==p?p:"",null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),r.showInIndex=null!==(c=t.showInIndex)&&void 0!==c&&c,r.caption=this.convertBreakscapedStringToJsonText(null!==(g=t.caption)&&void 0!==g?g:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus)),r}toItemLeadHintInstruction(e){var t,r,i,o,n,s,l,u,p,c;return{item:this.convertBreakscapedStringToJsonText(null!==(r=null===(t=e.itemLead)||void 0===t?void 0:t.item)&&void 0!==r?r:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),lead:this.convertBreakscapedStringToJsonText(null!==(o=null===(i=e.itemLead)||void 0===i?void 0:i.lead)&&void 0!==o?o:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),pageNumber:this.convertBreakscapedStringToJsonText(null!==(s=null===(n=e.itemLead)||void 0===n?void 0:n.pageNumber)&&void 0!==s?s:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),marginNumber:this.convertBreakscapedStringToJsonText(null!==(u=null===(l=e.itemLead)||void 0===l?void 0:l.marginNumber)&&void 0!==u?u:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),hint:this.convertBreakscapedStringToJsonText(null!==(p=e.hint)&&void 0!==p?p:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),instruction:this.convertBreakscapedStringToJsonText(null!==(c=e.instruction)&&void 0!==c?c:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus)}}toExample(e,t){const{isExample:r,example:i,isDefaultExample:o}=e,{defaultExample:n,isBoolean:a}=t;if(!r)return{isExample:!1,example:null};let s;return s=o?a?b.BooleanUtils.toBoolean(n):this.convertBreakscapedStringToJsonText(n,m.TextFormat.bitmarkMinusMinus):a?b.BooleanUtils.toBoolean(i):this.convertBreakscapedStringToJsonText(i,m.TextFormat.bitmarkMinusMinus),{isExample:!0,example:s}}addProperty(e,t,r,i){if(void 0!==r){let o;Array.isArray(r)||(r=[r]),Array.isArray(r)&&r.length>0&&(r=a.Breakscape.unbreakscape(r),o=Array.isArray(r)&&i&&r.length>=1?r[r.length-1]:r),e[t]=o}}getZoomDisabled(e,t){return null!=t?t:!!s.Config.isOfBitType(e,[u.BitType.imageSeparator,u.BitType.pageBanner,u.BitType.imagesLogoGrave,u.BitType.prototypeImages])}getBitType(e){for(const t of e)if(t.key===l.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}getTextFormat(e){var t;const r=this.getBitType(e);if(r){const i=s.Config.getBitConfig(r);for(const r of e)if(r.key===l.NodeType.bitsValue){const e=r.value;return null!==(t=m.TextFormat.fromValue(null==e?void 0:e.textFormat))&&void 0!==t?t:i.textFormatDefault}}return m.TextFormat.bitmarkMinusMinus}getResourceType(e){for(const t of e)if(t.key===l.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.resourceType}}getInternalComments(e){if(this.getBitType(e))for(const t of e)if(t.key===l.NodeType.bitsValue){return t.value.internalComment}}convertBreakscapedStringToJsonText(e,t){if(this.options.textAsPlainText||t===m.TextFormat.text||t===m.TextFormat.json)return e||a.Breakscape.EMPTY_STRING;return this.textParser.toAst(e,{textFormat:t})}replacePlaceholderWithBodyBit(e,t,r){const i=(e,o,n)=>{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[n]=t,!0;if(e.content){if(i(e.content,e,"content"))return!0}}return!1};i(e,null,null)}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){return{type:e.isCommented?u.BitType._comment:e.bitType,originalType:e.isCommented?e.bitType:void 0,format:e.textFormat,id:void 0,internalComment:void 0,externalId:void 0,spaceId:void 0,padletId:void 0,jupyterId:void 0,jupyterExecutionCount:void 0,isPublic:void 0,AIGenerated:void 0,releaseVersion:void 0,releaseKind:void 0,releaseDate:void 0,book:void 0,ageRange:void 0,lang:void 0,language:void 0,publisher:void 0,publisherName:void 0,theme:void 0,computerLanguage:void 0,target:void 0,tag:void 0,icon:void 0,iconTag:void 0,colorTag:void 0,flashcardSet:void 0,subtype:void 0,bookAlias:void 0,coverImage:void 0,coverColor:void 0,publications:void 0,author:void 0,subject:void 0,date:void 0,location:void 0,kind:void 0,hasMarkAsDone:void 0,action:void 0,blockId:void 0,pageNo:void 0,x:void 0,y:void 0,width:void 0,height:void 0,index:void 0,classification:void 0,availableClassifications:void 0,tableFixedHeader:void 0,tableSearch:void 0,tableSort:void 0,tablePagination:void 0,tablePaginationLimit:void 0,tableHeight:void 0,tableWhitespaceNoWrap:void 0,tableAutoWidth:void 0,tableResizableColumns:void 0,quizCountItems:void 0,quizStrikethroughSolutions:void 0,codeLineNumbers:void 0,codeMinimap:void 0,thumbImage:void 0,scormSource:void 0,posterImage:void 0,focusX:void 0,focusY:void 0,pointerLeft:void 0,pointerTop:void 0,backgroundWallpaper:void 0,hasBookNavigation:void 0,deeplink:void 0,externalLink:void 0,externalLinkText:void 0,videoCallLink:void 0,vendorUrl:void 0,search:void 0,duration:void 0,list:void 0,textReference:void 0,isTracked:void 0,isInfoOnly:void 0,labelTrue:void 0,labelFalse:void 0,content2Buy:void 0,mailingList:void 0,buttonCaption:void 0,caption:void 0,quotedPerson:void 0,reasonableNumOfChars:void 0,resolved:void 0,resolvedDate:void 0,resolvedBy:void 0,maxCreatedBits:void 0,maxDisplayLevel:void 0,productId:void 0,product:void 0,productVideo:void 0,productFolder:void 0,technicalTerm:void 0,servings:void 0,ratingLevelStart:void 0,ratingLevelEnd:void 0,ratingLevelSelected:void 0,title:void 0,subtitle:void 0,level:void 0,toc:void 0,progress:void 0,anchor:void 0,reference:void 0,referenceEnd:void 0,item:void 0,lead:void 0,pageNumber:void 0,marginNumber:void 0,hint:void 0,instruction:void 0,isExample:void 0,example:void 0,person:void 0,marks:void 0,extraProperties:void 0,body:void 0,resource:void 0,logos:void 0,images:void 0,statement:void 0,isCorrect:void 0,sampleSolution:void 0,partialAnswer:void 0,elements:void 0,statements:void 0,responses:void 0,quizzes:void 0,heading:void 0,pairs:void 0,matrix:void 0,choices:void 0,questions:void 0,listItems:void 0,sections:void 0,placeholders:void 0,footer:void 0}}cleanAndSetDefaultsForBitJson(e){const t=s.Config.getBitType(e.type),r=e.format,i=this.options.textAsPlainText;return null==e.originalType&&(e.originalType=void 0),e.item||(e.item=void 0),s.Config.isOfBitType(t,[u.BitType._error,u.BitType._comment])?delete e.format:s.Config.isOfBitType(t,[u.BitType.article,u.BitType.sampleSolution,u.BitType.page])?null==e.body&&(e.body=this.bodyDefault):s.Config.isOfBitType(t,[u.BitType.multipleChoice1,u.BitType.multipleResponse1,u.BitType.multipleChoiceText,u.BitType.highlightText,u.BitType.clozeAndMultipleChoiceText,u.BitType.sequence,u.BitType.mark,u.BitType.flashcard])?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.cloze)?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.body&&(e.body=this.bodyDefault),s.Config.isOfBitType(t,u.BitType.clozeSolutionGrouped)?(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!0)):s.Config.isOfBitType(t,u.BitType.clozeInstructionGrouped)&&(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!1))):s.Config.isOfBitType(t,[u.BitType.multipleChoice,u.BitType.multipleResponse])?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault)):s.Config.isOfBitType(t,u.BitType.essay)?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.example&&(e.example=null),null==e.body&&(e.body=this.bodyDefault),null==e.partialAnswer&&(e.partialAnswer="")):s.Config.isOfBitType(t,u.BitType.trueFalse1)?(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.isExample&&(e.isExample=!1),null==e.example&&(e.example=null),null==e.isCorrect&&(e.isCorrect=!1),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.trueFalse)?(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.isExample&&(e.isExample=!1),null==e.labelFalse&&(e.labelFalse=""),null==e.labelTrue&&(e.labelTrue=""),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.chapter)?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.example&&(e.example=null),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)):s.Config.isOfBitType(t,u.BitType.interview)?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault),null==e.questions&&(e.questions=[])):t===u.BitType.matchMatrix?(null==e.item&&(e.item=this.textDefault),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.match)?(null==e.item&&(e.item=this.textDefault),null==e.heading&&(e.heading={}),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.learningPathBook)?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.example&&(e.example=null),null==e.isTracked&&(e.isTracked=!0),null==e.isInfoOnly&&(e.isInfoOnly=!1),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.pageBuyButton)?(null==e.content2Buy&&(e.content2Buy=""),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.table)?(null==e.tableFixedHeader&&(e.tableFixedHeader=!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=!0),null==e.tableAutoWidth&&(e.tableAutoWidth=!0),null==e.tableResizableColumns&&(e.tableResizableColumns=!1),null==e.body&&(e.body=this.bodyDefault)):(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.example&&(e.example=null),null==e.body&&(e.body=this.bodyDefault),s.Config.isOfBitType(t,u.BitType.book)&&(null==e.isPublic&&(e.isPublic=!1),null==e.hasMarkAsDone&&(e.hasMarkAsDone=!1)),t!==u.BitType.articleAi&&t!==u.BitType.noteAi&&t!==u.BitType.summaryAi||null==e.AIGenerated&&(e.AIGenerated=!0),s.Config.isOfBitType(t,u.BitType.reviewNote)&&(null==e.resolved&&(e.resolved=!1),null==e.resolvedDate&&(e.resolvedDate=""),null==e.resolvedBy&&(e.resolvedBy="")),s.Config.isOfBitType(t,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])&&(t===u.BitType.imagesLogoGrave?null==e.logos&&(e.logos=[]):null==e.images&&(e.images=[])),s.Config.isOfBitType(t,[u.BitType.stepImageScreenshotWithPointer,u.BitType.surveyMatrix])&&(null==e.pointerTop&&(e.pointerTop=""),null==e.pointerLeft&&(e.pointerLeft=""),s.Config.isOfBitType(t,[u.BitType.surveyMatrix])&&null==e.buttonCaption&&(e.buttonCaption="")),s.Config.isOfBitType(t,u.BitType.surveyRating)&&(null==e.ratingLevelStart&&(e.ratingLevelStart={level:0}),null==e.ratingLevelEnd&&(e.ratingLevelEnd={level:0})),s.Config.isOfBitType(t,u.BitType.module)&&null==e.hasBookNavigation&&(e.hasBookNavigation=!0)),null==e.id&&delete e.id,null==e.internalComment&&delete e.internalComment,null==e.externalId&&delete e.externalId,null==e.spaceId&&delete e.spaceId,null==e.padletId&&delete e.padletId,null==e.jupyterId&&delete e.jupyterId,null==e.jupyterExecutionCount&&delete e.jupyterExecutionCount,null==e.isPublic&&delete e.isPublic,null==e.AIGenerated&&delete e.AIGenerated,null==e.releaseVersion&&delete e.releaseVersion,null==e.releaseKind&&delete e.releaseKind,null==e.releaseDate&&delete e.releaseDate,null==e.book&&delete e.book,null==e.ageRange&&delete e.ageRange,null==e.lang&&delete e.lang,null==e.language&&delete e.language,null==e.publisher&&delete e.publisher,null==e.publisherName&&delete e.publisherName,null==e.theme&&delete e.theme,null==e.computerLanguage&&delete e.computerLanguage,null==e.target&&delete e.target,null==e.tag&&delete e.tag,null==e.icon&&delete e.icon,null==e.iconTag&&delete e.iconTag,null==e.colorTag&&delete e.colorTag,null==e.flashcardSet&&delete e.flashcardSet,null==e.subtype&&delete e.subtype,null==e.bookAlias&&delete e.bookAlias,null==e.coverImage&&delete e.coverImage,null==e.coverColor&&delete e.coverColor,null==e.publications&&delete e.publications,null==e.author&&delete e.author,null==e.subject&&delete e.subject,null==e.date&&delete e.date,null==e.location&&delete e.location,null==e.kind&&delete e.kind,null==e.hasMarkAsDone&&delete e.hasMarkAsDone,null==e.action&&delete e.action,null==e.blockId&&delete e.blockId,null==e.pageNo&&delete e.pageNo,null==e.x&&delete e.x,null==e.y&&delete e.y,null==e.width&&delete e.width,null==e.height&&delete e.height,null==e.index&&delete e.index,null==e.classification&&delete e.classification,null==e.availableClassifications&&delete e.availableClassifications,null==e.tableFixedHeader&&delete e.tableFixedHeader,null==e.tableSearch&&delete e.tableSearch,null==e.tableSort&&delete e.tableSort,null==e.tablePagination&&delete e.tablePagination,null==e.tablePaginationLimit&&delete e.tablePaginationLimit,null==e.tableHeight&&delete e.tableHeight,null==e.tableWhitespaceNoWrap&&delete e.tableWhitespaceNoWrap,null==e.tableAutoWidth&&delete e.tableAutoWidth,null==e.tableResizableColumns&&delete e.tableResizableColumns,null==e.quizCountItems&&delete e.quizCountItems,null==e.quizStrikethroughSolutions&&delete e.quizStrikethroughSolutions,null==e.codeLineNumbers&&delete e.codeLineNumbers,null==e.codeMinimap&&delete e.codeMinimap,null==e.thumbImage&&delete e.thumbImage,null==e.scormSource&&delete e.scormSource,null==e.posterImage&&delete e.posterImage,null==e.focusX&&delete e.focusX,null==e.focusY&&delete e.focusY,null==e.pointerLeft&&delete e.pointerLeft,null==e.pointerTop&&delete e.pointerTop,null==e.backgroundWallpaper&&delete e.backgroundWallpaper,null==e.hasBookNavigation&&delete e.hasBookNavigation,null==e.deeplink&&delete e.deeplink,null==e.externalLink&&delete e.externalLink,null==e.externalLinkText&&delete e.externalLinkText,null==e.videoCallLink&&delete e.videoCallLink,null==e.vendorUrl&&delete e.vendorUrl,null==e.search&&delete e.search,null==e.duration&&delete e.duration,null==e.list&&delete e.list,null==e.textReference&&delete e.textReference,null==e.isTracked&&delete e.isTracked,null==e.isInfoOnly&&delete e.isInfoOnly,null==e.labelTrue&&delete e.labelTrue,null==e.labelFalse&&delete e.labelFalse,null==e.content2Buy&&delete e.content2Buy,null==e.mailingList&&delete e.mailingList,null==e.buttonCaption&&delete e.buttonCaption,null==e.caption&&delete e.caption,null==e.quotedPerson&&delete e.quotedPerson,null==e.resolved&&delete e.resolved,null==e.resolvedDate&&delete e.resolvedDate,null==e.resolvedBy&&delete e.resolvedBy,null==e.maxCreatedBits&&delete e.maxCreatedBits,null==e.maxDisplayLevel&&delete e.maxDisplayLevel,null==e.productId&&delete e.productId,null==e.product&&delete e.product,null==e.productVideo&&delete e.productVideo,null==e.productFolder&&delete e.productFolder,null==e.technicalTerm&&delete e.technicalTerm,null==e.servings&&delete e.servings,null==e.ratingLevelStart&&delete e.ratingLevelStart,null==e.ratingLevelEnd&&delete e.ratingLevelEnd,null==e.ratingLevelSelected&&delete e.ratingLevelSelected,null==e.title&&delete e.title,null==e.subtitle&&delete e.subtitle,null==e.level&&delete e.level,null==e.toc&&delete e.toc,null==e.progress&&delete e.progress,null==e.anchor&&delete e.anchor,null==e.reference&&delete e.reference,null==e.referenceEnd&&delete e.referenceEnd,null==e.item&&delete e.item,null==e.lead&&delete e.lead,null==e.pageNumber&&delete e.pageNumber,null==e.marginNumber&&delete e.marginNumber,null==e.hint&&delete e.hint,null==e.instruction&&delete e.instruction,void 0===e.example&&delete e.example,null==e.isExample&&delete e.isExample,null==e.marks&&delete e.marks,null==e.extraProperties&&delete e.extraProperties,null==e.body&&r!==m.TextFormat.json&&delete e.body,null!=e.placeholders&&0!==Object.keys(e.placeholders).length||delete e.placeholders,null==e.resource&&delete e.resource,null==e.logos&&delete e.logos,null==e.images&&delete e.images,null==e.statement&&delete e.statement,null==e.isCorrect&&delete e.isCorrect,null==e.sampleSolution&&delete e.sampleSolution,null==e.partialAnswer&&delete e.partialAnswer,null==e.elements&&delete e.elements,null==e.statements&&delete e.statements,null==e.responses&&delete e.responses,null==e.quizzes&&delete e.quizzes,null==e.heading&&delete e.heading,null==e.pairs&&delete e.pairs,null==e.matrix&&delete e.matrix,null==e.table&&delete e.table,null==e.choices&&delete e.choices,null==e.questions&&delete e.questions,null==e.listItems&&delete e.listItems,null==e.sections&&delete e.sections,i&&null!=e.placeholders||delete e.placeholders,null==e.footer&&delete e.footer,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}}t.JsonGenerator=x},7984:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonObjectGenerator=void 0;const o=r(6772),n=r(2497);t.JsonObjectGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),JSON.parse(this.writer.getString())}))}generateSync(e){return this.generator.generateSync(e),JSON.parse(this.writer.getString())}}},98:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonStringGenerator=void 0;const o=r(6772),n=r(2497);t.JsonStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},431:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TextGenerator=void 0;const o=r(5126),n=r(7735),a=r(126),s=r(3811),l=r(385),u=r(2483),p=r(9554),c=r(4),g={debugGenerationInline:!1},y="==",d={[u.TextMarkType.bold]:"**",[u.TextMarkType.light]:"``",[u.TextMarkType.italic]:"__",[u.TextMarkType.highlight]:"!!"},f=[u.TextMarkType.bold,u.TextMarkType.light,u.TextMarkType.italic,u.TextMarkType.highlight],m=[u.TextMarkType.strike,u.TextMarkType.subscript,u.TextMarkType.superscript,u.TextMarkType.ins,u.TextMarkType.del,u.TextMarkType.underline,u.TextMarkType.doubleUnderline,u.TextMarkType.circle,u.TextMarkType.languageEm,u.TextMarkType.userUnderline,u.TextMarkType.userDoubleUnderline,u.TextMarkType.userStrike,u.TextMarkType.userCircle,u.TextMarkType.userHighlight,u.TextMarkType.var,u.TextMarkType.code,u.TextMarkType.timer,u.TextMarkType.duration,u.TextMarkType.color,u.TextMarkType.comment],h=new RegExp(/(\n|\r\n)/,"g"),T=new RegExp(/https?:\/\/|mailto:(.*)/,"g");class b extends c.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new o.Ast,this.textFormat=l.TextFormat.bitmarkMinusMinus,this.writerText="",this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.placeholderIndex=0,this.placeholders={},this.bitmarkVersion=null!==(r=s.BitmarkVersion.fromValue(e))&&void 0!==r?r:s.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},g),t),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.bitmarkVersion,s.BitmarkVersion.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)}generate(e,t){return i(this,void 0,void 0,(function*(){return this.resetState(t),this.walkAndWrite(e),this.writerText}))}generateSync(e,t){return this.resetState(t),this.walkAndWrite(e),this.writerText}getPlaceholders(){return this.placeholders}resetState(e){this.printed=!1,this.textFormat=e,this.writerText="",this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.placeholderIndex=0,this.placeholders={}}walkAndWrite(e){this.ast.walk(e,a.NodeType.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_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)}handleEnterNode(e,t){switch(this.handleIndent(e),e.type){case p.TextNodeType.paragraph:this.writeParagraph(e);break;case p.TextNodeType.hardBreak:this.writeHardBreak(e);break;case p.TextNodeType.text:this.writeMarks(e,!0),this.writeText(e);break;case p.TextNodeType.heading:this.writeHeading(e);break;case p.TextNodeType.section:this.writeSection(e);break;case p.TextNodeType.listItem:case p.TextNodeType.taskItem:this.writeBullet(e,t);break;case p.TextNodeType.image:this.writeImage(e);break;case p.TextNodeType.codeBlock:this.inCodeBlock=!0,this.writeCodeBlock(e);break;case p.TextNodeType.gap:case p.TextNodeType.select:case p.TextNodeType.highlight:case p.TextNodeType.mark:return this.writeBodyBit(e),!1}this.exitedCodeBlock=!1}handleBetweenNode(e,t,r,i){e.type}handleExitNode(e,t){switch(e.type){case p.TextNodeType.text:this.writeMarks(e,!1);break;case p.TextNodeType.paragraph:this.textFormat!==l.TextFormat.bitmarkMinusMinus&&this.writeNL();break;case p.TextNodeType.heading:case p.TextNodeType.section:case p.TextNodeType.image:this.writeNL(),this.writeNL();break;case p.TextNodeType.codeBlock:this.writeNL(),this.writeNL(),this.inCodeBlock=!1,this.exitedCodeBlock=!0;break;case p.TextNodeType.bulletList:case p.TextNodeType.orderedList:case p.TextNodeType.letteredList:case p.TextNodeType.taskList:this.currentIndent<=1&&this.writeNL()}this.handleDedent(e)}handleIndent(e){switch(e.type){case p.TextNodeType.bulletList:case p.TextNodeType.orderedList:case p.TextNodeType.letteredList:case p.TextNodeType.taskList:this.currentIndent++}}handleDedent(e){switch(e.type){case p.TextNodeType.bulletList:case p.TextNodeType.orderedList:case p.TextNodeType.letteredList:case p.TextNodeType.taskList:this.currentIndent--}}getLinkHref(e){if(e.type===p.TextNodeType.text&&e.marks){const t=e.marks.reduce(((e,t)=>{var r;if(t.type===u.TextMarkType.link){const e=null===(r=t.attrs)||void 0===r?void 0:r.href;if(e)return e}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){const t=`[!${this.placeholderIndex}]`;this.writerText+=t,this.placeholders[t]=e,this.placeholderIndex++}writeText(e){if(null==e.text)return;if(this.writeLink(e))return;this.inCodeBlock;let t=e.text;if(t=n.Breakscape.breakscape(t),this.currentIndent>1){const e=this.getIndentationString();t=t.replace(h,`$1${e}`)}this.write(t)}writeLink(e){if(null==e.text)return!1;const t=this.getLinkHref(e);if(t){let r=n.Breakscape.breakscape(e.text);if(this.currentIndent>1){const e=this.getIndentationString();r=r.replace(h,`$1${e}`)}return t.replace(T,"$1")===r?this.write(t):(r=`==${r}==|link:${t}|`,this.write(r)),!0}return!1}writeMarks(e,t){if(e.marks){if(0===e.marks.length)return void this.writeMarkTextWrapper(y);const r=1===e.marks.length,i=e.marks.reduce(((e,t)=>e||(-1!==f.indexOf(t.type)?r?d[t.type]:y:-1!==m.indexOf(t.type)?y:e)),void 0);if(null!=i&&(this.writeMarkTextWrapper(i),!t)){let t=!1;for(const i of e.marks)-1!==f.indexOf(i.type)?r||(this.writeInlineMarkStartEnd(),this.writeInlineMark(i),t=!0):u.TextMarkType.comment===i.type?(this.writeInlineMarkStartEnd(),this.writeCommentMark(i),t=!0):-1!==m.indexOf(i.type)&&(this.writeInlineMarkStartEnd(),this.writeInlineMark(i),t=!0);t&&this.writeInlineMarkStartEnd()}}}writeParagraph(e){this.exitedCodeBlock&&(this.write("|"),this.writeNL(),this.writeNL())}writeHardBreak(e){if(this.writeNL(),this.currentIndent>1){const e=this.getIndentationString();this.write(e)}}writeHeading(e){var t,r;let i="";const o=null!==(r=null===(t=e.attrs)||void 0===t?void 0:t.level)&&void 0!==r?r:1;for(let e=0;e<+o;e++)i+="#";i+=" ",this.write(i)}writeSection(e){let t="";t=e.section?`|${e.section}: `:"|",this.write(t)}writeBullet(e,t){var r,i;let o=this.getIndentationString();const n=this.getParentNode(t,2),a=null==n?void 0:n.value.type;if(a===p.TextNodeType.bulletList)o+="• ";else if(a===p.TextNodeType.orderedList)o+="•1 ";else if(a===p.TextNodeType.letteredList)o+="•A ";else if(a===p.TextNodeType.taskList){o+=null!==(i=null===(r=e.attrs)||void 0===r?void 0:r.checked)&&void 0!==i&&i?"•+ ":"•- "}o&&this.write(o)}writeImage(e){if(null==e.attrs||!e.attrs.src)return;const t=e.attrs;let r=`|image:${t.src}|`;for(const[e,i]of Object.entries(t))switch(e){case"textAlign":"left"!==i&&(r+=`@captionAlign:${i}|`);break;case"alignment":"center"!==i&&i&&(r+=`@alignment:${i}|`);break;case"title":i&&(r+=`@caption:${i}|`);break;case"class":"center"!==i&&i&&(r+=`@align:${i}|`);break;case"comment":i&&(r+=`#${i}|`);break;case"alt":case"width":case"height":default:i&&(r+=`@${e}:${i}|`);case"src":}this.write(r)}writeCodeBlock(e){if(null==e.attrs||!e.attrs.language)return;const t=`|code:${e.attrs.language}\n`;this.write(t)}writeMarkTextWrapper(e){e&&this.write(e)}writeInlineMark(e){let t=`${e.type}`;if(e.attrs)for(const[r,i]of Object.entries(e.attrs))("language"===r&&"plain text"!==i||"color"===r||"name"===r||"duration"===r)&&(t=`${t}:${i}`);this.write(t)}writeCommentMark(e){if(e.comment){const t=`#${e.comment}`;this.write(t)}}writeInlineMarkStartEnd(){this.write("|")}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)}getBitType(e){for(const t of e)if(t.key===a.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}write(e){return this.writerText+=e,this}writeLine(e){return this.write(`${e}\n`),this}writeLines(e,t){for(const r of e)this.write(`${r}${null!=t?t:""}\n`);return this}writeWhiteSpace(){return this.write(" "),this}}t.TextGenerator=b},3881:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoBuilder=void 0;const i=r(2028),o=r(5854);t.InfoBuilder=class{getSupportedBits(e){var t,r;const n=null===(t=null==e?void 0:e.includeNonDeprecated)||void 0===t||t,a=null!==(r=null==e?void 0:e.includeDeprecated)&&void 0!==r&&r,s=[];for(const e of o.BitType.values()){if(e===o.BitType._error||e===o.BitType._comment)continue;const t=i.Config.getBitType(e),r=i.Config.getBitConfig(t),l=r.inheritedBitTypes.length>0?r.inheritedBitTypes:void 0;(n&&!r.deprecated||a&&r.deprecated)&&s.push({name:e,since:r.since,deprecated:r.deprecated,inheritedBitTypes:l})}return s}getSupportedBitConfigs(){const e=[];for(const t of o.BitType.values()){if(t===o.BitType._error||t===o.BitType._comment)continue;const r=i.Config.getBitType(t),n=i.Config.getBitConfig(r);e.push(n)}return e}}},1412:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0;const i=r(1464),o=r(6936);r(2028);let n=!1;t.init=function(){n||((0,o.initEnv)(i.buildInfo.name,i.buildInfo.version),n=!0)}},126:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0;const i=(0,r(4718).superenum)({unknown:"unknown",action:"action",actionValue:"actionValue",ageRange:"ageRange",ageRangeValue:"ageRangeValue",aiGenerated:"aiGenerated",aiGeneratedValue:"aiGeneratedValue",alias:"alias",alignment:"alignment",alt:"alt",alternativeAnswers:"alternativeAnswers",alternativeAnswersValue:"alternativeAnswersValue",anchor:"anchor",answer:"answer",attrs:"attrs",audio:"audio",author:"author",authorValue:"authorValue",availableClassifications:"availableClassifications",availableClassificationsValue:"availableClassificationsValue",avatarImage:"avatarImage",backgroundWallpaper:"backgroundWallpaper",backgroundWallpaperValue:"backgroundWallpaperValue",hasBookNavigation:"hasBookNavigation",hasBookNavigationValue:"hasBookNavigationValue",bitmarkAst:"bitmarkAst",bitmarkVersion:"bitmarkVersion",bits:"bits",bitsValue:"bitsValue",bitType:"bitType",blockId:"blockId",blockIdValue:"blockIdValue",body:"body",bodyJson:"bodyJson",bodyParts:"bodyParts",bodyPartsValue:"bodyPartsValue",bodyPartText:"bodyPartText",bodyText:"bodyText",book:"book",bookAlias:"bookAlias",bookAliasValue:"bookAliasValue",bot:"bot",botResponses:"botResponses",botResponsesValue:"botResponsesValue",botValue:"botValue",buttonCaption:"buttonCaption",buttonCaptionValue:"buttonCaptionValue",caption:"caption",captionValue:"captionValue",cardBits:"cardBits",cardBitsValue:"cardBitsValue",cardNode:"cardNode",cells:"cells",cellsValue:"cellsValue",checked:"checked",choices:"choices",choicesValue:"choicesValue",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",data:"data",date:"date",dateValue:"dateValue",decimalPlaces:"decimalPlaces",deeplink:"deeplink",deeplinkValue:"deeplinkValue",disableCalculation:"disableCalculation",duration:"duration",durationValue:"durationValue",elements:"elements",elementsValue:"elementsValue",emphasis:"emphasis",end:"end",errors:"errors",errorsValue:"errorsValue",example:"example",exampleValue:"exampleValue",externalId:"externalId",externalIdValue:"externalIdValue",externalLink:"externalLink",externalLinkText:"externalLinkText",extraProperties:"extraProperties",feedback:"feedback",flashcards:"flashcards",flashcardSet:"flashcardSet",flashcardSetValue:"flashcardSetValue",flashcardsValue:"flashcardsValue",focusX:"focusX",focusXValue:"focusXValue",focusY:"focusY",focusYValue:"focusYValue",footer:"footer",footerText:"footerText",forKeys:"forKeys",format:"format",forValues:"forValues",forValuesValue:"forValuesValue",gap:"gap",hasMarkAsDone:"hasMarkAsDone",hasMarkAsDoneValue:"hasMarkAsDoneValue",heading:"heading",height:"height",heightValue:"heightValue",highlight:"highlight",hint:"hint",href:"href",icon:"icon",iconTag:"iconTag",iconTagValue:"iconTagValue",iconValue:"iconValue",id:"id",idValue:"idValue",image:"image",imageLandscape:"imageLandscape",imagePortrait:"imagePortrait",imageSource:"imageSource",index:"index",indexValue:"indexValue",ingredients:"ingredients",ingredientsValue:"ingredientsValue",instruction:"instruction",internalComment:"internalComment",internalCommentValue:"internalCommentValue",isCaseSensitive:"isCaseSensitive",isCommented:"isCommented",isCorrect:"isCorrect",isDefaultExample:"isDefaultExample",isExample:"isExample",isInfoOnly:"isInfoOnly",isInfoOnlyValue:"isInfoOnlyValue",isPublic:"isPublic",isPublicValue:"isPublicValue",isTracked:"isTracked",isTrackedValue:"isTrackedValue",item:"item",itemLead:"itemLead",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",lead:"lead",level:"level",license:"license",line:"line",list:"list",listValue:"listValue",location:"location",locationValue:"locationValue",mailingList:"mailingList",marginNumber:"marginNumber",mark:"mark",markConfig:"markConfig",markConfigValue:"markConfigValue",marks:"marks",marksValue:"marksValue",markup:"markup",matrix:"matrix",matrixValue:"matrixValue",maxCreatedBits:"maxCreatedBits",maxCreatedBitsValue:"maxCreatedBitsValue",maxDisplayLevel:"maxDisplayLevel",maxDisplayLevelValue:"maxDisplayLevelValue",message:"message",mockupId:"mockupId",name:"name",offset:"offset",options:"options",optionsValue:"optionsValue",original:"original",padletId:"padletId",padletIdValue:"padletIdValue",pageNo:"pageNo",pageNoValue:"pageNoValue",pageNumber:"pageNumber",pairs:"pairs",pairsValue:"pairsValue",parent:"parent",parser:"parser",partialAnswer:"partialAnswer",partialAnswerValue:"partialAnswerValue",person:"person",pointerLeft:"pointerLeft",pointerLeftValue:"pointerLeftValue",pointerTop:"pointerTop",pointerTopValue:"pointerTopValue",posterImage:"posterImage",posterImageValue:"posterImageValue",postfix:"postfix",prefix:"prefix",productId:"productId",productIdValue:"productIdValue",product:"product",productFolder:"productFolder",productFolderValue:"productFolderValue",productList:"productList",productListValue:"productListValue",productValue:"productValue",productVideo:"productVideo",productVideoList:"productVideoList",productVideoListValue:"productVideoListValue",productVideoValue:"productVideoValue",progress:"progress",progressValue:"progressValue",properties:"properties",property:"property",propertyKey:"propertyKey",propertyValue:"propertyValue",propertyValues:"propertyValues",provider:"provider",publications:"publications",publicationsValue:"publicationsValue",publisher:"publisher",publisherName:"publisherName",publisherNameValue:"publisherNameValue",publisherValue:"publisherValue",quantity:"quantity",question:"question",questions:"questions",questionsValue:"questionsValue",quizCountItems:"quizCountItems",quizCountItemsValue:"quizCountItemsValue",quizStrikethroughSolutions:"quizStrikethroughSolutions",quizStrikethroughSolutionsValue:"quizStrikethroughSolutionsValue",quizzes:"quizzes",quizzesValue:"quizzesValue",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelSelectedValue:"ratingLevelSelectedValue",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reasonableNumOfChars:"reasonableNumOfChars",reasonableNumOfCharsValue:"reasonableNumOfCharsValue",reference:"reference",referenceEnd:"referenceEnd",referenceProperty:"referenceProperty",referencePropertyValue:"referencePropertyValue",releaseDate:"releaseDate",releaseDateValue:"releaseDateValue",releaseKind:"releaseKind",releaseKindValue:"releaseKindValue",releaseVersion:"releaseVersion",releaseVersionValue:"releaseVersionValue",resolved:"resolved",resolvedBy:"resolvedBy",resolvedByValue:"resolvedByValue",resolvedDate:"resolvedDate",resolvedDateValue:"resolvedDateValue",resolvedValue:"resolvedValue",resources:"resources",resourcesValue:"resourcesValue",resourceType:"resourceType",response:"response",responses:"responses",responsesValue:"responsesValue",root:"root",rows:"rows",rowsValue:"rowsValue",rowsValueValue:"rowsValueValue",sampleSolution:"sampleSolution",sampleSolutionValue:"sampleSolutionValue",scormSource:"scormSource",scormSourceValue:"scormSourceValue",search:"search",searchValue:"searchValue",section:"section",select:"select",servings:"servings",servingsValue:"servingsValue",showInIndex:"showInIndex",size:"size",solution:"solution",solutions:"solutions",solutionsValue:"solutionsValue",spaceId:"spaceId",spaceIdValue:"spaceIdValue",src:"src",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",start:"start",statement:"statement",statements:"statements",statementsValue:"statementsValue",statementText:"statementText",subject:"subject",subjectValue:"subjectValue",subtitle:"subtitle",subtype:"subtype",subtypeValue:"subtypeValue",table:"table",tableAutoWidth:"tableAutoWidth",tableAutoWidthValue:"tableAutoWidthValue",tableFixedHeader:"tableFixedHeader",tableFixedHeaderValue:"tableFixedHeaderValue",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",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",toc:"toc",tocValue:"tocValue",trim:"trim",type:"type",typeAlias:"typeAlias",unit:"unit",unitAbbr:"unitAbbr",url:"url",value:"value",values:"values",valuesValue:"valuesValue",vendorUrl:"vendorUrl",vendorUrlValue:"vendorUrlValue",version:"version",videoCallLink:"videoCallLink",videoCallLinkValue:"videoCallLinkValue",warnings:"warnings",warningsValue:"warningsValue",width:"width",widthValue:"widthValue",x:"x",xValue:"xValue",y:"y",yValue:"yValue",zoomDisabled:"zoomDisabled"});t.NodeType=i},6634:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTagConfig=void 0;t.AbstractTagConfig=class{constructor(e,t,r,i,o,n,a,s,l){this.type=e,this.configKey=t,this.tag=r,this.maxCount=i,this.minCount=o,this.chain=n,this.jsonKey=a,this.astKey=s,this.deprecated=l}}},3619:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitConfig=void 0;const i=r(3778);t.BitConfig=class{constructor(e,t,r,i,o,n,a,s,l,u,p,c,g,y){this.tags={},this.since=e,this.bitType=t,this.inheritedBitTypes=r,this.inheritedBitTypesSet=new Set(r),this.textFormatDefault=i,this.tags=o,this.cardSet=n,this.deprecated=a,this.bodyAllowed=s??!0,this.bodyRequired=l,this.footerAllowed=u??!0,this.footerRequired=p,this.resourceAttachmentAllowed=c??!0,this.rootExampleType=g,this.comboResourceType=y}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 o=[];null!=this.since&&o.push(`since=${this.since}`),null!=this.deprecated&&o.push(`deprecated=${this.deprecated}`),this.bodyAllowed&&o.push("bodyAllowed"),this.bodyRequired&&o.push("bodyRequired"),this.footerAllowed&&o.push("footerAllowed"),this.footerRequired&&o.push("footerRequired"),this.resourceAttachmentAllowed&&o.push("resourceAttachmentAllowed"),null!=this.rootExampleType&&o.push(`rootExampleType=${this.rootExampleType}`),null!=this.comboResourceType&&o.push(`comboResourceType=${this.comboResourceType}`),r+=`\n\n[Flags]\n${o.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))(e.maxCount===i.Count.infinity||e.maxCount>0)&&(r+=`\n${e.toString(t)}`);return this.cardSet&&(r+=`\n\n${this.cardSet.toString(t)}`),r}}},5814:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfig=void 0;t.CardSetConfig=class{constructor(e,t){this.configKey=e,this.variants=t}toString(e){const t=Object.assign({},e);let r="",i=0,o=0;for(const e of this.variants){for(const n of e)r+=`[Card - Side ${i}, Variant ${o}]`,r+=`\n${n.toString(t)}`,o++;i++}return r}}},9371:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardVariantConfig=void 0;t.CardVariantConfig=class{constructor(e,t,r,i){this.tags=e,this.bodyAllowed=t??!0,this.bodyRequired=r,this.repeatCount=i}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}}},9788:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MarkupTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a){super(i.BitTagType.tag,e,t,r,o,n,void 0,void 0,a),this.type=i.BitTagType.tag}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}}t.MarkupTagConfig=n},1519:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a,s,l,u,p,c){super(i.BitTagType.property,e,t,r,o,n,a,s,c),this.type=i.BitTagType.property,this.single=l,this.format=u,this.defaultValue=p}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.single&&(r+=`, sgl=${this.single}`),null!=this.format&&(r+=`, fmt=${this.format}`),null!=this.defaultValue&&(r+=`, def=${this.defaultValue}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`),null!=this.astKey&&(r+=`, ast=${this.astKey}`)),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}}t.PropertyTagConfig=n},9600:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a,s){super(i.BitTagType.resource,e,t,r,o,n,a,void 0,s),this.type=i.BitTagType.resource}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}}t.ResourceTagConfig=n},1457:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourcesConfig=void 0;t.ResourcesConfig=class{constructor(e,t,r,i){this.tags=e,this.resourceAttachmentAllowed=null!=t&&t,this.resourceTypeAttachment=r,this.comboResourceTagTypesMap=i}getCountsMin(){const e=new Map;for(const t of Object.values(this.tags))null!=t.minCount&&e.set(t.tag,t.minCount);return e}getCountsMax(){const e=new Map;for(const t of Object.values(this.tags))null!=t.maxCount&&e.set(t.tag,t.maxCount);return e}}},8199:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfigKey=void 0;const i=(0,r(4718).superenum)({_flashcards:"_flashcards",_elements:"_elements",_statements:"_statements",_quiz:"_quiz",_questions:"_questions",_matchPairs:"_matchPairs",_matchAudioPairs:"_matchAudioPairs",_matchImagePairs:"_matchImagePairs",_matchMatrix:"_matchMatrix",_table:"_table",_botActionResponses:"_botActionResponses",_exampleBitList:"_exampleBitList",_clozeList:"_clozeList",_ingredients:"_ingredients"});t.CardSetConfigKey=i},5591:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigKey=void 0;const i=r(4718),o=r(7112),n=r(9888),a=r(5051),s=r(7797),l=(0,i.superenum)(Object.assign(Object.assign(Object.assign(Object.assign({_unknown:"_unknown"},s.tagConfigKeys),n.propertyConfigKeys),a.resourceConfigKeys),o.groupConfigKeys));t.ConfigKey=l,function(){const e=new Set,t=[s.tagConfigKeys,n.propertyConfigKeys,a.resourceConfigKeys,o.groupConfigKeys];for(const r of t)for(const t in r){if(e.has(t))throw new Error(`Duplicate ConfigKey: ${t}`);e.add(t)}}()},7112:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupConfigKeys=t.GroupConfigKey=void 0;const i=r(4718),o={group_standardAllBits:"group_standardAllBits",group_standardItemLeadInstructionHint:"group_standardItemLeadInstructionHint",group_standardExample:"group_standardExample",group_standardTags:"group_standardTags",group_imageSource:"group_imageSource",group_technicalTerm:"group_technicalTerm",group_person:"group_person",group_gap:"group_gap",group_trueFalse:"group_trueFalse",group_markConfig:"group_markConfig",group_mark:"group_mark",group_bookCommon:"group_bookCommon",group_learningPathCommon:"group_learningPathCommon",group_resourceCommon:"group_resourceCommon",group_resourceImageCommon:"group_resourceImageCommon",group_resourceAudioCommon:"group_resourceAudioCommon",group_resourceVideoCommon:"group_resourceVideoCommon",group_resourceImage:"group_resourceImage",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"};t.groupConfigKeys=o;const n=(0,i.superenum)(o);t.GroupConfigKey=n},6915:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConfigType=void 0;const i=(0,r(4718).superenum)({standard:"standard",resource:"resource",comboResource:"comboResource"});t.GroupConfigType=i},9888:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyConfigKeys=t.PropertyConfigKey=void 0;const i=r(4718),o={action:"action",ageRange:"ageRange",aiGenerated:"aiGenerated",allowSubtitles:"allowSubtitles",alt:"alt",author:"author",autoplay:"autoplay",availableClassifications:"availableClassifications",backgroundWallpaper:"backgroundWallpaper",blockId:"blockId",book:"book",bookAlias:"bookAlias",bot:"bot",buttonCaption:"buttonCaption",caption:"caption",classification:"classification",codeLineNumbers:"codeLineNumbers",codeMinimap:"codeMinimap",color:"color",colorTag:"colorTag",computerLanguage:"computerLanguage",content2Buy:"content2Buy",copyright:"copyright",coverColor:"coverColor",coverImage:"coverImage",date:"date",decimalPlaces:"decimalPlaces",deeplink:"deeplink",disableCalculation:"disableCalculation",duration:"duration",emphasis:"emphasis",example:"example",externalId:"externalId",externalLink:"externalLink",externalLinkText:"externalLinkText",flashcardSet:"flashcardSet",focusX:"focusX",focusY:"focusY",format:"format",hasBookNavigation:"hasBookNavigation",hasMarkAsDone:"hasMarkAsDone",height:"height",icon:"icon",iconTag:"iconTag",id:"id",imageSource:"imageSource",index:"index",internalComment:"internalComment",isCaseSensitive:"isCaseSensitive",isInfoOnly:"isInfoOnly",isPublic:"isPublic",isTracked:"isTracked",jupyterExecutionCount:"jupyterExecutionCount",jupyterId:"jupyterId",kind:"kind",label:"label",labelFalse:"labelFalse",labelTrue:"labelTrue",lang:"lang",language:"language",license:"license",list:"list",location:"location",mailingList:"mailingList",markConfig:"markConfig",maxCreatedBits:"maxCreatedBits",maxDisplayLevel:"maxDisplayLevel",mockupId:"mockupId",mute:"mute",padletId:"padletId",pageNo:"pageNo",partialAnswer:"partialAnswer",partner:"partner",person:"person",pointerLeft:"pointerLeft",pointerTop:"pointerTop",posterImage:"posterImage",product:"product",productFolder:"productFolder",productId:"productId",productList:"productList",productVideo:"productVideo",productVideoList:"productVideoList",progress:"progress",property_mark:"property_mark",property_reference:"property_reference",property_sampleSolution:"property_sampleSolution",property_title:"property_title",publications:"publications",publisher:"publisher",publisherName:"publisherName",quizCountItems:"quizCountItems",quizStrikethroughSolutions:"quizStrikethroughSolutions",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reasonableNumOfChars:"reasonableNumOfChars",releaseDate:"releaseDate",releaseKind:"releaseKind",releaseVersion:"releaseVersion",resolved:"resolved",resolvedBy:"resolvedBy",resolvedDate:"resolvedDate",scormSource:"scormSource",search:"search",servings:"servings",showInIndex:"showInIndex",showSubtitles:"showSubtitles",siteName:"siteName",size:"size",spaceId:"spaceId",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",subject:"subject",subtype:"subtype",tableAutoWidth:"tableAutoWidth",tableFixedHeader:"tableFixedHeader",tableHeight:"tableHeight",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tableResizableColumns:"tableResizableColumns",tableSearch:"tableSearch",tableSort:"tableSort",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tag:"tag",target:"target",technicalTerm:"technicalTerm",textReference:"textReference",theme:"theme",thumbImage:"thumbImage",toc:"toc",trim:"trim",unit:"unit",unitAbbr:"unitAbbr",vendorUrl:"vendorUrl",videoCallLink:"videoCallLink",width:"width",x:"x",y:"y",zoomDisabled:"zoomDisabled"};t.propertyConfigKeys=o;const n=(0,i.superenum)(o);t.PropertyConfigKey=n},5051:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resourceConfigKeys=t.ResourceConfigKey=void 0;const i=r(4718),o={image:"image",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",video:"video",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",article:"article",articleEmbed:"articleEmbed",articleLink:"articleLink",document:"document",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink"};t.resourceConfigKeys=o;const n=(0,i.superenum)(o);t.ResourceConfigKey=n},7797:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tagConfigKeys=t.TagConfigKey=void 0;const i=r(4718),o={title:"title",anchor:"anchor",tag_reference:"tag_reference",property:"property",itemLead:"itemLead",instruction:"instruction",hint:"hint",true:"true",false:"false",sampleSolution:"sampleSolution",gap:"gap",tag_mark:"tag_mark",resource:"resource"};t.tagConfigKeys=o;const n=(0,i.superenum)(o);t.TagConfigKey=n},5512:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitTagType=void 0;const i=(0,r(4718).superenum)({tag:"tag",property:"property",resource:"resource",group:"group"});t.BitTagType=i},5854:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitType=void 0;const i=(0,r(4718).superenum)({_error:"_error",_comment:"_comment",aiPrompt:"ai-prompt",anchor:"anchor",appAiPrompt:"app-ai-prompt",appBitmarkFromEditor:"app-bitmark-from-editor",appBitmarkFromJavascript:"app-bitmark-from-javascript",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",article:"article",articleAi:"article-ai",articleAttachment:"article-attachment",articleEmbed:"article-embed",articleLink:"article-link",assignment:"assignment",assignmentList:"assignment-list",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",audioTranscript:"audio-transcript",bitAlias:"bit-alias",bitBookEnding:"bit-book-ending",bitBookSummary:"bit-book-summary",bitmarkExample:"bitmark-example",blogArticle:"blog-article",book:"book",bookAcknowledgments:"book-acknowledgments",bookAddendum:"book-addendum",bookAfterword:"book-afterword",bookAlias:"book-alias",bookAppendix:"book-appendix",bookArticle:"book-article",bookAutherBio:"book-author-bio",bookBibliography:"book-bibliography",bookComingSoon:"book-coming-soon",bookConclusion:"book-conclusion",bookCopyright:"book-copyright",bookCopyrightPermissions:"book-copyright-permissions",bookDedication:"book-dedication",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",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",browserImage:"browser-image",bug:"bug",buttonCopyText:"button-copy-text",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",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",conclusion:"conclusion",consoleLog:"console-log",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",cookArrangement:"cook-arrangement",cookIngredients:"cook-ingredients",cookInsert:"cook-insert",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",details:"details",details1:"details-1",detailsImage:"details-image",document:"document",documentDownload:"document-download",documentEmbed:"document-embed",documentLink:"document-link",documentUpload:"document-upload",editorial:"editorial",editorNote:"editor-note",essay:"essay",example:"example",exampleList:"example-list",extractorPage:"extractor-page",extractorPageWithBlocks:"extractor-page-with-blocks",extractorBlock:"extractor-block",extractorRepeatedText:"extractor-repeated-text",extractorPageNumber:"extractor-page-number",extractorPageHeader:"extractor-page-header",extractorPageFooter:"extractor-page-footer",featured:"featured",figure:"figure",flashcard:"flashcard",flashcard1:"flashcard-1",focusImage:"focus-image",footNote:"foot-note",gapText:"gap-text",gapTextInstructionGrouped:"gap-text-instruction-grouped",groupBorn:"group-born",groupDied:"group-died",handInAudio:"hand-in-audio",handInContact:"hand-in-contact",handInDocument:"hand-in-document",handInLocation:"hand-in-location",handInPhoto:"hand-in-photo",handInScan:"hand-in-scan",handInVideo:"hand-in-video",handInVoice:"hand-in-voice",help:"help",highlightText:"highlight-text",hint:"hint",image:"image",imageBanner:"image-banner",imageFigure:"image-figure",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",imageStyled:"image-styled",imageSuperWide:"image-super-wide",imageZoom:"image-zoom",imagesLogoGrave:"images-logo-grave",info:"info",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",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",lifeSkillSticker:"life-skill-sticker",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",module:"module",multipleChoice:"multiple-choice",multipleChoice1:"multiple-choice-1",multipleChoiceText:"multiple-choice-text",multipleResponse:"multiple-response",multipleResponse1:"multiple-response-1",newspaperArticle:"newspaper-article",note:"note",noteAi:"note-ai",notebookArticle:"notebook-article",output:"output",page:"page",pageBanner:"page-banner",pageBuyButton:"page-buy-button",pageBuyButtonPromotion:"page-buy-button-promotion",pageFooter:"page-footer",pageOpenBook:"page-open-book",pagePerson:"page-person",pageProduct:"page-product",pageProductList:"page-product-list",pageProductVideo:"page-product-video",pageProductVideoList:"page-product-video-list",pageSectionFolder:"page-section-folder",pageSubscribe:"page-subscribe",photo:"photo",preparationNote:"preparation-note",prototypeImages:"prototype-images",question1:"question-1",quote:"quote",rating:"rating",recordAudio:"record-audio",recordVideo:"record-video",recipe:"recipe",releaseNote:"release-note",releaseNotesSummary:"release-notes-summary",remark:"remark",reviewApprovedNote:"review-approved-note",reviewAuthorNote:"review-author-note",reviewNote:"review-note",reviewRequestForReviewNote:"review-request-for-review-note",reviewReviewerNote:"review-reviewer-note",sampleSolution:"sample-solution",scorm:"scorm",screenshot:"screenshot",selfAssessment:"self-assessment",separator:"separator",sequence:"sequence",sideNote:"side-note",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",surveyRatingOnce:"survey-rating-once",surveyRatingDisplay:"survey-rating-display",table:"table",tableImage:"table-image",takePicture:"take-picture",toc:"toc",tocChapter:"toc-chapter",trueFalse:"true-false",trueFalse1:"true-false-1",vendorAmcharts5Chart:"vendor-amcharts-5-chart",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",vendorPadletEmbed:"vendor-padlet-embed",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",websiteLink:"website-link",workbookArticle:"workbook-article"});t.BitType=i},8588:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParserType=void 0;const i=(0,r(4718).superenum)({peggy:"peggy"});t.BitmarkParserType=i},3811:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BITMARK_VERSION=t.BitmarkVersion=void 0;const i=(0,r(4718).superenum)({v2:2,v3:3});t.BitmarkVersion=i;const o=i.v3;t.DEFAULT_BITMARK_VERSION=o},4410:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyBitType=void 0;const i=(0,r(4718).superenum)({text:"text",gap:"gap",mark:"mark",select:"select",highlight:"highlight"});t.BodyBitType=i},1163:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetVersion=void 0;const i=(0,r(4718).superenum)({v1:1,v2:2});t.CardSetVersion=i},3778:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const i=(0,r(4718).superenum)({infinity:"infinity"});t.Count=i},363:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExampleType=void 0;const i=(0,r(4718).superenum)({none:"none",string:"string",boolean:"boolean"});t.ExampleType=i},7203:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyAstKey=void 0;const i=(0,r(4718).superenum)({ast_aiGenerated:"aiGenerated",ast_isCaseSensitive:"isCaseSensitive",ast_referenceProperty:"referenceProperty",ast_markConfig:"markConfig",ast_productList:"productList",ast_productVideoList:"productVideoList"});t.PropertyAstKey=i},9727:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyFormat=void 0;const i=(0,r(4718).superenum)({none:"none",string:"string",trimmedString:"trimmedString",number:"number",boolean:"boolean",invertedBoolean:"invertedBoolean"});t.PropertyFormat=i},166:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTag=void 0;const i=r(4718),o=r(9888),n=(0,i.superenum)(Object.assign(Object.assign({},o.propertyConfigKeys),{tag_aiGenerated:"AIGenerated",tag_mark:"mark",tag_reference:"reference",tag_sampleSolution:"sampleSolution",tag_title:"title"}));t.PropertyTag=n},9984:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceJsonKey=void 0;const i=(0,r(4718).superenum)({imageResponsive:"imageResponsive",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audioEmbed:"audioEmbed",audioLink:"audioLink",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilm:"stillImageFilm",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",articleEmbed:"articleEmbed",articleLink:"articleLink",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink"});t.ResourceJsonKey=i},6149:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTag=void 0;const i=(0,r(4718).superenum)({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"});t.ResourceTag=i},9917:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Tag=void 0;const i=(0,r(4718).superenum)({tag_title:"#",tag_anchor:"▼",tag_reference:"►",tag_property:"@",tag_itemLead:"%",tag_instruction:"!",tag_hint:"?",tag_true:"+",tag_false:"-",tag_sampleSolution:"$",tag_gap:"_",tag_mark:"=",tag_resource:"&"});t.Tag=i},385:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextFormat=void 0;const i=(0,r(4718).superenum)({text:"text",json:"json",bitmarkMinusMinus:"bitmark--",bitmarkPlusPlus:"bitmark++"});t.TextFormat=i},2483:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextMarkType=void 0;const i=(0,r(4718).superenum)({bold:"bold",light:"light",italic:"italic",highlight:"highlight",strike:"strike",subscript:"subscript",superscript:"superscript",ins:"ins",del:"del",underline:"underline",doubleUnderline:"doubleUnderline",circle:"circle",languageEm:"languageEm",userUnderline:"userUnderline",userDoubleUnderline:"userDoubleUnderline",userStrike:"userStrike",userCircle:"userCircle",userHighlight:"userHighlight",link:"link",var:"var",code:"code",timer:"timer",duration:"duration",color:"color",hash:"#",comment:"comment"});t.TextMarkType=i},9554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextNodeType=void 0;const i=(0,r(4718).superenum)({text:"text",hardBreak:"hardBreak",paragraph:"paragraph",heading:"heading",section:"section",bulletList:"bulletList",orderedList:"orderedList",letteredList:"letteredList",taskList:"taskList",listItem:"listItem",taskItem:"taskItem",image:"image",codeBlock:"codeBlock",gap:"gap",select:"select",highlight:"highlight",mark:"mark"});t.TextNodeType=i},3069:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoFormat=void 0;const i=(0,r(4718).superenum)({text:"text",json:"json",pojo:"pojo"});t.InfoFormat=i},486:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoType=void 0;const i=(0,r(4718).superenum)({list:"list",deprecated:"deprecated",all:"all",bit:"bit"});t.InfoType=i},5633:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParser=void 0;const i=r(5663),o=r(5078);t.BitmarkParser=class{constructor(){this.jsonParser=new i.JsonParser}toAst(e,t){return(0,o.parse)(e)}}},5078:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const i=r(5057).parse;t.parse=i},3206:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserHelper=void 0;const i=r(1163),o=r(9681),n=r(7461),a=r(3029);r(2028);t.BitmarkPegParserHelper=class{constructor(e){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0,this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation}handleRawBit(e){var t,r;const i=e.trim();if(this.debugPrint("RAW BIT",i),!i)return;const o=null!==(r=null===(t=this.parserLocation())||void 0===t?void 0:t.start)&&void 0!==r?r:{line:1,column:1,offset:0},a=this.parse(e,{startRule:"bit",grammarSource:new n.PeggyGrammarLocation("bit",o)});return a.value&&(a.value.markup=i),a}handleTextFormat(e){return{type:a.TypeKey.TextFormat,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceType(e){return{type:a.TypeKey.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,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handlePropertyTag(e,t){return{type:a.TypeKey.Property,key:e,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceTag(e,t){return{type:a.TypeKey.Resource,key:e,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}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!==a.TypeKey.Card)continue;const{cardIndex:n,cardSideIndex:s,cardVariantIndex:l,value:u}=i;let p=r.cards[n];p||(p={sides:[]},r.cards[n]=p);let c=p.sides[s];c||(c={variants:[]},p.sides[s]=c);c.variants[l]?c.variants[l].value+=u:c.variants[l]={value:u,parser:o}}r.cards=r.cards.filter((e=>e.sides.some((e=>e.variants.some((e=>0!==o.StringUtils.trimmedString(e.value).length))))));for(const t of r.cards){const r={sides:[]};i.cards.push(r);for(const i of t.sides){const t={variants:[]};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 n.PeggyGrammarLocation("card-content",i)});o=this.reduceToArrayOfTypes(o),this.debugPrint("parsedCardContent",o),t.variants.push({parser:e,content:o})}}}}return{type:a.TypeKey.CardSet,value:i,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSetStart(){this.cardIndex=-1,this.cardSideIndex=0,this.cardVariantIndex=0}handleCardSetEnd(){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0}handleCards(e){return e}handleCardLineOrDivider(e,t){let r=!1,o=!1,n=!1;return Array.isArray(e)&&2===e.length&&(e=e[0],t===i.CardSetVersion.v1?(r=e===a.CARD_DIVIDER_V1,o=e===a.CARD_SIDE_DIVIDER_V1,n=e===a.CARD_VARIANT_DIVIDER_V1):(r=e===a.CARD_DIVIDER_V2,o=e===a.CARD_SIDE_DIVIDER_V2,n=e===a.CARD_VARIANT_DIVIDER_V2)),r?(this.cardIndex++,this.cardSideIndex=0,this.cardVariantIndex=0):o?(this.cardSideIndex++,this.cardVariantIndex=0):n&&this.cardVariantIndex++,this.isType(e,a.TypeKey.Card)?e:{type:a.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:""},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardLine(e){return{type:a.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:e},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardContent(e){return this.mergeCharToText(e)}handleCardTags(e){return e}mergeCharToText(e){var t,r,i,o,n,s;const l=[];let u,p;for(const c of e)switch(c.type){case a.TypeKey.BodyChar:if(u){const e=`${null!==(t=u.value)&&void 0!==t?t:""}${null!==(r=c.value)&&void 0!==r?r:""}`;u.value=e}else u={type:a.TypeKey.BodyText,value:null!==(i=c.value)&&void 0!==i?i:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;case a.TypeKey.CardChar:if(p){const e=`${null!==(o=p.value)&&void 0!==o?o:""}${null!==(n=c.value)&&void 0!==n?n:""}`;p.value=e}else p={type:a.TypeKey.CardText,value:null!==(s=c.value)&&void 0!==s?s:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;default:u&&(l.push(u),u=void 0),p&&(l.push(p),p=void 0),l.push(c)}return u&&l.push(u),p&&l.push(p),l}isType(e,t){if(!e)return!1;const{type:r}=e;return t?Array.isArray(t)?t.indexOf(r)>=0:t===r:!!a.TypeKey.fromValue(r)}reduceToArrayOfTypes(e,t,r){if(!Array.isArray(e))return[];return e.reduce(((e,i,o)=>{if(null==i)return e;const{type:n,value:a}=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(a)){const r=this.reduceToArrayOfTypes(a,t);e.push(...r)}else n&&e.push(i)}return e}),[])}debugPrint(e,t){}}},7124:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserProcessor=void 0;const o=r(5809),n=r(7735),a=r(2028),s=r(5854),l=r(4410),u=r(6149),p=r(385),c=r(9681),g=r(4266),y=r(1083),d=r(4402),f=r(3904),m=r(9289),h=r(5189),T=r(9647),b=r(3990),v=r(6521),B=r(7667),C=r(9885),P=r(3029),k=!1,x=!0,S=!0,K=!0,w=!0,A=new o.Builder;t.BitmarkPegParserProcessor=class{constructor(e){this.nonFatalWarnings=[],this.nonFatalErrors=[],this.parser={},this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation,this.context={DEBUG_BIT_RAW:true,DEBUG_BIT_CONTENT_RAW:k,DEBUG_BIT_CONTENT:x,DEBUG_BIT_TAGS:S,DEBUG_BODY:K,DEBUG_FOOTER:w,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){var t;const r=[];let i=[];for(const o of e){if(!o)continue;const e=o.value;e?r.push(e):i=i.concat(null!==(t=o.errors)&&void 0!==t?t:[])}return A.bitmark({bits:r,errors:i.length>0?i:void 0})}buildBit(e,t){var r;const{bitType:o,textFormat:n,resourceType:l,isCommented:u}=e;if(!o||a.Config.isOfBitType(o,s.BitType._error))return this.invalidBit();const p=a.Config.isOfBitType(o,s.BitType.trueFalse1),c=a.Config.isOfBitType(o,s.BitType.multipleChoice1),d=a.Config.isOfBitType(o,s.BitType.multipleResponse1);this.debugPrint("BIT CONTENT",t),this.resetParserState(),t=this.squashUnwantedInlineBodyBits(o,n,t),t=g.BitmarkPegParserValidator.validateBitTags(this.context,o,l,t);const f=a.Config.getBitConfig(o),m=this.bitContentProcessor(o,n,P.BitContentLevel.Bit,f.tags,t),{body:h,footer:T,cardSet:b,title:C,statement:k,statements:x,choices:S,responses:K,resources:w,posterImage:_,internalComments:I}=m,L=i(m,["body","footer","cardSet","title","statement","statements","choices","responses","resources","posterImage","internalComments"]);this.debugPrint("BIT TAGS",L),this.debugPrint("BIT BODY",h),this.debugPrint("BIT FOOTER",T);const O=(0,B.buildTitles)(this.context,o,C),E=(0,y.buildCards)(this.context,o,n,b,k,x,S,K),R=(0,v.buildResources)(this.context,o,l,w),N=[...null!=I?I:[],...null!==(r=E.internalComments)&&void 0!==r?r:[]],V=this.buildBitLevelWarnings(),F=this.buildBitLevelErrors();V&&(this.parser.warnings=V),F&&(this.parser.errors=F);return{value:A.bit(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({bitType:o,isCommented:u,textFormat:n,resourceType:l},O),{posterImage:_,statement:p?k:void 0,choices:c?S:void 0,responses:d?K:void 0}),L),{resources:R}),E),{body:h,footer:T,internalComment:N,parser:this.parser}))}}invalidBit(e){e&&this.addError("Invalid bit"),this.parser.errors=this.buildBitLevelErrors();return{value:A.bit({bitType:a.Config.getBitType(s.BitType._error),parser:this.parser})}}buildBitHeader(e,t){const r=a.Config.getBitType(e),i=a.Config.isBitTypeCommented(e);a.Config.isOfBitType(r,s.BitType._error)&&this.addError(`Invalid bit type: '${e}'`);const o=a.Config.getBitConfig(r);let n=p.TextFormat.fromValue(t.textFormat);t.textFormat&&!n&&this.addWarning(`Invalid text format '${t.textFormat}', defaulting to '${o.textFormatDefault}'`),n=null!=n?n:o.textFormatDefault;const l=u.ResourceTag.fromValue(t.resourceType);return t.resourceType&&!l&&this.addWarning(`Invalid resource type '${t.resourceType}', it will be ignored`),{bitType:r,textFormat:null!=n?n:o.textFormatDefault,resourceType:l,isCommented:i}}buildTextAndResourceType(e,t){const r={},i=e=>{e&&(e.type===P.TypeKey.TextFormat?r.textFormat=c.StringUtils.string(e.value):r.resourceType=c.StringUtils.string(e.value))};return i(e),i(t),r}resetParserState(){this.context.state={}}squashUnwantedInlineBodyBits(e,t,r){const i=[];if(!r)return i;if(t===p.TextFormat.bitmarkMinusMinus||t===p.TextFormat.bitmarkPlusPlus)return r;const 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 n=!1;for(const e of r){const{type:t,value:r}=e,a=null!=r?r:"";if(t===P.TypeKey.BodyText){n=!a.replace(/[ \t]/gm,"").endsWith("\n"),i.push(e)}else{if(n){const t=o(e);i.push({type:P.TypeKey.BodyText,value:t})}else i.push(e);n=!1}}return i}bitContentProcessor(e,t,r,i,o){const a={};if(!o)return a;a.title=[],a.solutions=[],a.statements=[],a.choices=[],a.responses=[],a.resources=[],a.trueFalse=[],a.markConfig=[],a.extraProperties={},a.internalComments=[];let s=!1,l=!1;const u=[];let p=n.Breakscape.EMPTY_STRING,c=n.Breakscape.EMPTY_STRING;const y=r===P.BitContentLevel.Bit,k=r===P.BitContentLevel.Card,x=r===P.BitContentLevel.Chain,S=()=>{if(p){p=g.BitmarkPegParserValidator.checkBodyPart(this.context,e,r,p);const t=A.bodyText({text:p});u.push(t)}p=n.Breakscape.EMPTY_STRING};if(o.forEach(((o,g)=>{const{type:y,value:k}=o;switch(y){case P.TypeKey.ItemLead:(0,m.itemLeadChainContentProcessor)(this.context,e,t,r,i,o,a);break;case P.TypeKey.Instruction:case P.TypeKey.Hint:case P.TypeKey.Anchor:case P.TypeKey.SampleSolution:(0,d.defaultTagContentProcessor)(this.context,e,t,r,i,o,a);break;case P.TypeKey.Reference:(0,b.referenceTagContentProcessor)(this.context,e,t,r,i,o,a,s),s=!0;break;case P.TypeKey.Title:(0,B.titleTagContentProcessor)(this.context,e,t,r,i,o,a);break;case P.TypeKey.Property:(0,T.propertyContentProcessor)(this.context,e,t,r,i,o,a);break;case P.TypeKey.Gap:x||S(),(0,f.gapChainContentProcessor)(this.context,e,t,r,i,o,a,u);break;case P.TypeKey.Mark:x||S(),(0,h.markChainContentProcessor)(this.context,e,t,r,i,o,a,u);break;case P.TypeKey.True:case P.TypeKey.False:x||S(),(0,C.trueFalseChainContentProcessor)(this.context,e,t,r,i,o,a,u);break;case P.TypeKey.Resource:(0,v.resourceContentProcessor)(this.context,e,t,r,i,o,a);break;case P.TypeKey.CardSet:a.cardSet=k,l=!0;break;case P.TypeKey.BodyText:case P.TypeKey.CardText:l?c=n.Breakscape.concatenate(c,k):p=n.Breakscape.concatenate(p,k)}})),S(),a.itemLead){const e=a.itemLead.length;e>0&&(a.item=a.itemLead[0]),e>1&&(a.lead=a.itemLead[1]),e>2&&(a.pageNumber=a.itemLead[2]),e>3&&(a.marginNumber=a.itemLead[e-1])}return y?(a.body=u.length>0?A.body({bodyParts:this.trimBodyParts(u)}):void 0,a.body=g.BitmarkPegParserValidator.checkBody(this.context,e,r,t,a.body)):k&&(a.cardBody=u.length>0?A.body({bodyParts:this.trimBodyParts(u)}):void 0),c=c.trim(),c&&(c=g.BitmarkPegParserValidator.checkFooter(this.context,e,r,c),c&&(a.footer=A.footerText({text:c}))),0===Object.keys(a.extraProperties).length&&delete a.extraProperties,0===a.title.length&&delete a.title,0===a.solutions.length&&delete a.solutions,0===a.statements.length&&delete a.statements,0===a.choices.length&&delete a.choices,0===a.responses.length&&delete a.responses,0===a.trueFalse.length&&delete a.trueFalse,0===a.markConfig.length&&delete a.markConfig,0===a.resources.length&&delete a.resources,0===a.internalComments.length&&delete a.internalComments,a}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}trimBodyParts(e){let t=!1,r=e.reduce(((e,r)=>{const i=r;if(t||i.type!==l.BodyBitType.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!==l.BodyBitType.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}addWarning(e,t,r){var i,o,n;const a={message:e,text:null!==(i=null==t?void 0:t.parser.text)&&void 0!==i?i:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==r?void 0:r.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalWarnings.push(a)}addError(e,t,r){var i,o,n;const a={message:e,text:null!==(i=null==t?void 0:t.parser.text)&&void 0!==i?i:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==r?void 0:r.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalErrors.push(a)}debugPrint(e,t){}}},3029:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARD_VARIANT_DIVIDER_V1=t.CARD_SIDE_DIVIDER_V1=t.CARD_DIVIDER_V1=t.CARD_VARIANT_DIVIDER_V2=t.CARD_SIDE_DIVIDER_V2=t.CARD_DIVIDER_V2=t.BitContentLevel=t.TypeKey=void 0;const i=r(4718),o=r(9917);t.CARD_DIVIDER_V2="====";t.CARD_SIDE_DIVIDER_V2="--";t.CARD_VARIANT_DIVIDER_V2="++";t.CARD_DIVIDER_V1="===";t.CARD_SIDE_DIVIDER_V1="==";t.CARD_VARIANT_DIVIDER_V1="--";const n=(0,i.superenum)({TextFormat:"TextFormat",ResourceType:"ResourceType",Title:o.Tag.tag_title,Anchor:o.Tag.tag_anchor,Reference:o.Tag.tag_reference,ItemLead:o.Tag.tag_itemLead,Instruction:o.Tag.tag_instruction,Hint:o.Tag.tag_hint,True:o.Tag.tag_true,False:o.Tag.tag_false,Gap:o.Tag.tag_gap,Mark:o.Tag.tag_mark,SampleSolution:o.Tag.tag_sampleSolution,Property:"Property",Resource:"Resource",TagChain:"TagChain",BodyChar:"BodyChar",BodyText:"BodyText",CardSet:"CardSet",Card:"Card",CardChar:"CardChar",CardText:"CardText",GapChain:"GapChain",TrueFalseChain:"TrueFalseChain"});t.TypeKey=n;const a=(0,i.superenum)({Bit:"Bit",Card:"Card",Chain:"Chain"});t.BitContentLevel=a},4266:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserValidator=void 0;const i=r(5809),o=r(2028),n=r(5512),a=r(4410),s=r(3778),l=r(166),u=r(9917),p=r(385),c=r(3029),g=["====","----","\n==\n","\n---\n","\n--\n",":::","::::","|||","||||"],y=["==\n","---\n","--\n"],d=["\n==","\n---","\n--"],f=new i.Builder;const m=new class{validateBitTags(e,t,r,i){if(!i)return[];const n=o.Config.getBitConfig(t),{tags:a,cardSet:s}=n,l=o.Config.getBitResourcesConfig(t,r),u=Object.assign(Object.assign({},a),l.tags);return this.validateTagChainsRecursive(e,t,c.BitContentLevel.Bit,i,u,s).validated}checkBody(e,t,r,i,n){if(!n||!n.bodyParts)return n;const s=o.Config.getBitConfig(t),{bodyAllowed:l}=s;if(n.bodyParts.length>0&&!l&&e.addWarning(`Bit '${t}' should not have a body.`),i===p.TextFormat.json){let t=n.bodyParts.reduce(((e,t)=>{var r;if(t.type===a.BodyBitType.text&&t.data){return e+(null!==(r=t.data.bodyText)&&void 0!==r?r:"")}return e}),"");try{t=JSON.parse(t)}catch(r){t=null,e.addError("Body JSON is invalid.")}n=f.body({bodyJson:t})}return n}checkBodyPart(e,t,r,i){return i?(this.checkBodyForCommonPotentialMistakes(e,r,t,i),i):i}checkFooter(e,t,r,i){if(!i)return i;const n=o.Config.getBitConfig(t),{footerAllowed:a}=n;return this.checkBodyForCommonPotentialMistakes(e,r,t,i),a||e.addWarning(`Bit '${t}' should not have a footer.`),i}checkCardBody(e,t,r,i,n,a,s){if(!i||!i.bodyParts)return i;const l=o.Config.getBitConfig(t);if(!l.cardSet)return i;const u=this.getVariantConfig(l.cardSet.variants,a,s);if(!u)return i;const{bodyAllowed:p}=u;return i.bodyParts.length>0&&!p&&e.addWarning(`Bit '${t}' should not have a card body at card:${n+1}, side:${a+1}, variant:${s+1}.`),i}validateTagChainsRecursive(e,t,r,i,o,a,p){var g;if(!i)return{validated:[]};let y;const d=[...i],f=this.convertTagsToTypeKeyMap(e,r,t,o),m=(e,t,r)=>{f.set(e,{maxCount:t,minCount:r,_type:e,_tag:e,_seenCount:0})};var h,T,b;h=l.PropertyTag.internalComment,T=s.Count.infinity,b=0,f.set(`${c.TypeKey.Property}:${h}`,{maxCount:T,minCount:b,_type:n.BitTagType.property,_tag:u.Tag.tag_property,_seenCount:0}),r===c.BitContentLevel.Bit?(a&&m(c.TypeKey.CardSet,1,0),m(c.TypeKey.TextFormat,1,0),m(c.TypeKey.BodyText,s.Count.infinity,0)):r===c.BitContentLevel.Card&&m(c.TypeKey.CardText,s.Count.infinity,0);for(let i=0;i<d.length;i++){const o=d[i];if(!o)continue;const{type:n,key:s}=o,l=c.TypeKey.fromValue(n);if(!l)continue;let u=l;l!==c.TypeKey.Property&&l!==c.TypeKey.Resource||(u=`${l}:${s}`);const m=f.get(u),{validated:h,warning:T}=this.validateSingleTag(e,t,r,o,l,m,a);l===c.TypeKey.Resource&&(p=c.TypeKey.Resource);let b=!0;if(!h)if(r===c.BitContentLevel.Chain&&p!==c.TypeKey.Resource){y=o;const e=d.slice(i+1);e.length>0&&(y.chain=e),d.splice(i),b=!1}else d.splice(i,1,null);if(T&&b&&e.addWarning(null!==(g=T.warning)&&void 0!==g?g:"",T.content,T.previousContent),h&&Array.isArray(h.chain)&&h.chain.length>0)if(m&&m.chain){const{validated:r,remaining:o}=this.validateTagChainsRecursive(e,t,c.BitContentLevel.Chain,h.chain,m.chain,void 0,h.type);r&&r.length>0?h.chain=r:h.chain=void 0,o&&d.splice(i+1,0,o)}else if(h.type!==c.TypeKey.Resource){const e=h.chain[0];h.chain.length>1&&(e.chain=h.chain.slice(1)),d.splice(i+1,0,e),h.chain=void 0}}for(const t of f.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:d.filter((e=>null!=e)),remaining:y}}validateSingleTag(e,t,r,i,o,n,a){const{type:s,key:l}=i,u=n?this.getTagSignature(n):this.getUnknownTagSignature(s,l),p=" It will be ignored";let g,y,d="";if(n)switch(n._seenCount++,o){case c.TypeKey.Property:{const{content:o,warning:a}=this.validatePropertyTag(e,r,t,n,i);g=o,y=a;break}case c.TypeKey.Resource:{const{content:o,warning:a}=this.validateResourceTag(e,r,t,n,i);g=o,y=a;break}case c.TypeKey.CardSet:{const{content:r,warning:o}=this.validateCardSet(e,t,n,i,a);g=r,y=o;break}default:{const{content:o,warning:a}=this.validateStandardTag(e,r,t,n,i);g=o,y=a}}else switch(o){case c.TypeKey.Property:y={extraProperty:!0},r!==c.BitContentLevel.Chain&&(g=i);break;case c.TypeKey.Resource:y={excessResource:!0},g=i;break;default:y={invalid:!0}}if(y){const e=null==n?void 0:n._previous;y.invalid||y.excessResource?d=`${u} is not valid here (incorrectly chained?).${p}`:null!=y.tooMany?(d=`${u} is included more than ${y.tooMany} time(s).`,y.tooMany>0&&(d+=" The earlier ones will be ignored")):y.extraProperty?d=`${u} is an unknown property. It can be excluded from the output using the 'excludeUnknownProperties' flag`:y.unexpectedCardSet?d=`${u} is not expected here.${p}`:y.unexpectedCardSideVariant&&(d=`${u} has a card / side / variant that is not expected here.${p}`),y.warning=d,y.content=g,y.previousContent=e}return n&&(n._previous=i),{validated:g,warning:y}}validateStandardTag(e,t,r,i,o){const n=null==i.maxCount?1:i.maxCount;return n!==s.Count.infinity&&i._seenCount>n?{warning:{tooMany:n},content:o}:{content:o}}validatePropertyTag(e,t,r,i,o){const n=null==i.maxCount?1:i.maxCount;return n!==s.Count.infinity&&i._seenCount>n?{warning:{tooMany:n},content:o}:{content:o}}validateResourceTag(e,t,r,i,o){const n=null==i.maxCount?1:i.maxCount;return n!==s.Count.infinity&&i._seenCount>n?{warning:{tooMany:n},content:o}:{content:o}}validateCardSet(e,t,r,i,o){if(!o||!o.variants||0===o.variants.length)return{warning:{unexpectedCardSet:!0}};const{value:n}=i,a=n;let s,l=0,u=0;for(const r of a.cards){l=0;for(const i of r.sides){u=0;for(const r of i.variants){const n=r.content;let a;const p=this.getVariantConfig(o.variants,l,u);if(p){a=this.validateTagChainsRecursive(e,t,c.BitContentLevel.Card,n,p.tags).validated}else s={unexpectedCardSideVariant:!0};a&&a.length>0?i.variants[u]={parser:r.parser,content:a}:i.variants[u]={parser:r.parser,content:[]},u++}l++}}return{content:i,warning:s}}checkBodyForCommonPotentialMistakes(e,t,r,i){if(i){for(const t of g)i.includes(t)&&e.addWarning(`Bit '${r}' might contain a mistake: ${t}`);for(const t of y)i.startsWith(t)&&e.addWarning(`Bit '${r}' might contain a mistake: ${t}`);for(const t of d)i.endsWith(t)&&e.addWarning(`Bit '${r}' 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===n.BitTagType.tag,isProperty:e.type===n.BitTagType.property,isResource:e.type===n.BitTagType.resource,chain:e.chain,_configKey:e.configKey,_type:e.type,_tag:e.tag,_seenCount:0,_previous:void 0};if(t.isProperty)o.set(`${c.TypeKey.Property}:${e.tag}`,t);else if(t.isResource)o.set(`${c.TypeKey.Resource}:${e.tag}`,t);else{const r=c.TypeKey.fromValue(e.tag);r&&o.set(r,t)}}return o}getVariantConfig(e,t,r){let i;if(0===e.length)return;const o=e[Math.min(t,e.length-1)],n=o.length-1;if(r>n){if(i=o[n],i.repeatCount!==s.Count.infinity)return}else i=o[r];return i}getTagSignature(e){switch(e._type){case n.BitTagType.tag:return`[${e._tag}]`;case n.BitTagType.property:return`[@${e._tag}]`;case n.BitTagType.resource:return`[&${e._tag}]`;default:return`'${e._type}' tag '${e._tag}'`}}getUnknownTagSignature(e,t){switch(e){case c.TypeKey.Property:return`[@${t}]`;case c.TypeKey.Resource:return`[&${t}]`;default:return t?`'${e}' tag '${t}'`:`'${e}' tag`}}};t.BitmarkPegParserValidator=m},7461:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PeggyGrammarLocation=void 0;t.PeggyGrammarLocation=class{constructor(e,t){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}}},3045:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bookChainContentProcessor=void 0;const i=r(9681),o=r(3029);t.bookChainContentProcessor=function(e,t,r,n,a,s,l){if(n===o.BitContentLevel.Chain);else{const n=function(e,t,r,n,a,s){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("book content",s);const l=e.bitContentProcessor(t,r,o.BitContentLevel.Chain,a,s.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("book TAGS",l);const{reference:u,referenceEnd:p}=l,c=i.StringUtils.trimmedString(s.value);return{book:c,reference:u,referenceEnd:p}}(e,t,r,0,a,s);l.book=n.book,l.reference=n.reference,l.referenceEnd=n.referenceEnd}}},1083:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.buildCards=void 0;const o=r(5809),n=r(7735),a=r(2028),s=r(8199),l=r(5854),u=r(4410),p=r(6149),c=r(8025),g=r(4266),y=r(3029),d=new o.Builder;function f(e){let t="";if(e&&e.bodyParts)for(const r of e.bodyParts)if(r.type===u.BodyBitType.text){t+=r.data.bodyText}return t}t.buildCards=function(e,t,r,o,m,h,T,b){var v;e.DEBUG_CARD_SET&&e.debugPrint("card set",o);let B={};const C=function(e,t,r,i){const o={cards:[],internalComments:[]};if(!i)return o;let n=0,s=0,l=0;for(const u of i.cards){const i={no:n++,sides:[]};o.cards.push(i);for(const n of u.sides){const u={no:s++,variants:[]};i.sides.push(u);for(const p of n.variants){const{parser:n,content:c}=p,d={parser:n,no:l++};u.variants.push(d);const m=a.Config.getTagsConfigForCardSet(t,s,l),h=e.bitContentProcessor(t,r,y.BitContentLevel.Card,m,c);e.DEBUG_CARD_TAGS&&e.debugPrint("card tags",h),h.cardBody=g.BitmarkPegParserValidator.checkCardBody(e,t,y.BitContentLevel.Card,h.cardBody,i.no,u.no,d.no),h.cardBodyStr=f(h.cardBody),d.data=h,h.internalComments&&o.internalComments.push(...h.internalComments)}l=0}s=0}return o}(e,t,r,o);switch(null===(v=a.Config.getBitConfig(t).cardSet)||void 0===v?void 0:v.configKey){case s.CardSetConfigKey._flashcards:B=function(e,t,r){const o=[];let a,s,u=n.Breakscape.EMPTY_STRING,p=[],c=0,g=0,y={};const f=t===l.BitType.flashcard1;for(const l of r.cards){u=n.Breakscape.EMPTY_STRING,a=void 0,p=[],g=0,y={};for(const e of l.sides)for(const t of e.variants){const e=t.data,{cardBodyStr:r}=e,o=i(e,["cardBodyStr"]);y=Object.assign(Object.assign({},y),o),0===g?(s=t,u=null!=r?r:n.Breakscape.EMPTY_STRING):1===g?a=null!=r?r:n.Breakscape.EMPTY_STRING:p.push(null!=r?r:n.Breakscape.EMPTY_STRING),g++}if(0!==c&&f){e.addWarning(`Bit '${t}' should only contain one card. Ignore subsequent card: '${u}'`,s);break}o.push(d.flashcard(Object.assign({question:u,answer:a,alternativeAnswers:p.length>0?p:void 0},y))),c++}return{flashcards:o.length>0?o:void 0}}(e,t,C);break;case s.CardSetConfigKey._elements:B=function(e,t,r){var i;const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data;o.push(null!==(i=t.cardBodyStr)&&void 0!==i?i:n.Breakscape.EMPTY_STRING)}return{elements:o.length>0?o:void 0}}(0,0,C);break;case s.CardSetConfigKey._statements:B=function(e,t,r,o,n){const a=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{statements:r}=t,o=i(t,["statements"]);if(Array.isArray(r))for(const e of r){const t=d.statement(Object.assign(Object.assign(Object.assign({},e),e.itemLead),o));a.push(t)}}o&&a.push(o);Array.isArray(n)&&n.length>0&&a.push(...n);return{statements:a.length>0?a:void 0}}(0,0,C,m,h);break;case s.CardSetConfigKey._quiz:B=function(e,t,r,o,s){const u=[],p=a.Config.isOfBitType(t,l.BitType.multipleChoice),c=a.Config.isOfBitType(t,l.BitType.multipleResponse);if(!p&&!c)return{};let g,y=!1;for(const e of r.cards){y=!1,g=n.Breakscape.EMPTY_STRING;for(const t of e.sides)for(const e of t.variants){const t=e.data,{isDefaultExample:r,example:o}=t,n=i(t,["isDefaultExample","example"]);if(y=!0===r||y,g=o||g,n.trueFalse&&n.trueFalse.length>0){const e=[],t=c?d.response:d.choice;for(const r of n.trueFalse){const{isDefaultExample:o,example:n}=r,a=i(r,["isDefaultExample","example"]),s=o||y,l=n||g,u=t(Object.assign(Object.assign({},a),{isDefaultExample:s,example:l}));e.push(u)}c?n.responses=e:n.choices=e}const a=d.quiz(Object.assign(Object.assign({},n),{isDefaultExample:y,example:g}));u.push(a)}}if(p&&Array.isArray(o)&&o.length>0){const e=d.quiz({choices:o});u.push(e)}if(c&&Array.isArray(s)&&s.length>0){const e=d.quiz({responses:s});u.push(e)}return{quizzes:u.length>0?u:void 0}}(0,t,C,T,b);break;case s.CardSetConfigKey._questions:B=function(e,t,r){var i;const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,r=d.question(Object.assign({question:null!==(i=t.cardBodyStr)&&void 0!==i?i:n.Breakscape.EMPTY_STRING},t));o.push(r)}return{questions:o.length>0?o:void 0}}(0,0,C);break;case s.CardSetConfigKey._matchPairs:B=function(e,t,r){let o,a=0,s=!1;const l=[];let u,c,g,y,f,m,h=[],T=[],b={},v=!1,B=!1;for(const e of r.cards){s=!1,u=void 0,h=[],c=void 0,T=[],g=void 0,y=void 0,a=0,b={},B=!1,m=n.Breakscape.EMPTY_STRING;for(const t of e.sides){for(const e of t.variants){const t=e.data,{cardBodyStr:r,title:o,resources:l,isDefaultExample:d,example:C}=t,P=i(t,["cardBodyStr","title","resources","isDefaultExample","example"]);B=!0===d||B,m=C||m;const k=o&&o[1];if(null!=k&&(s=!0),0===a)if(u=k,null!=k)v=!0===d||v,f=C||f;else if(Array.isArray(l)&&l.length>0){const e=l[0];e.type===p.ResourceTag.audio?g=e:e.type===p.ResourceTag.image&&(y=e)}else c=r;else{if(h.push(null!=k?k:n.Breakscape.EMPTY_STRING),null!=k)v=!0===d||v,f=C||f;else if(null==o){const e=null!=r?r:n.Breakscape.EMPTY_STRING;T.push(e),!v&&!B||m||(m=e)}delete P.item,delete P.lead}b=Object.assign(Object.assign({},b),P)}a++}if(s)o=d.heading({forKeys:null!=u?u:n.Breakscape.EMPTY_STRING,forValues:h});else{B&&(f=void 0);const e=B||v,t=m||f,r=d.pair(Object.assign(Object.assign({key:null!=c?c:n.Breakscape.EMPTY_STRING,keyAudio:g,keyImage:y,values:T},b),{isDefaultExample:e,example:t}));l.push(r)}}return{heading:o,pairs:l.length>0?l:void 0}}(0,0,C);break;case s.CardSetConfigKey._matchMatrix:B=function(e,t,r){let o,a,s,l,u=0,p=!1,c=[];const g=[];let y,f,m,h,T,b=[],v=[],B={},C=!1,P=!1,k=!1;for(const e of r.cards){p=!1,a=void 0,s=void 0,l=void 0,c=[],b=[],v=[],u=0,P=!1,f=n.Breakscape.EMPTY_STRING,h=void 0;for(const t of e.sides){v=[],B={},k=!1,m=n.Breakscape.EMPTY_STRING,T=void 0;for(const e of t.variants){const t=e.data,{title:r,cardBodyStr:o,isDefaultExample:g,example:d,isCaseSensitive:b}=t,x=i(t,["title","cardBodyStr","isDefaultExample","example","isCaseSensitive"]);k=!0===g||k,m=d||m,Object.assign(B,x);const S=r&&r[1];if(null!=S&&(p=!0),0===u)a=S,null!=S?(C=!0===g||C,y=d||y):(s=o,l=x,P=!0===g||P,f=d||f,h=null!=b?b:h);else if(c.push(null!=S?S:n.Breakscape.EMPTY_STRING),null!=S)C=!0===g||C,y=d||y;else if(null==t.title){const e=null!=o?o:n.Breakscape.EMPTY_STRING;v.push(e),!C&&!k||m||(m=e),T=null!=b?b:h}}if(u>0){k&&(f=y=void 0),P&&(y=void 0);const e=k||P||C,t=m||f||y,r=d.matrixCell(Object.assign(Object.assign({values:v},B),{isDefaultExample:e,example:t,isCaseSensitive:T}));b.push(r)}u++}if(p)o=d.heading({forKeys:null!=a?a:n.Breakscape.EMPTY_STRING,forValues:c});else{const e=d.matrix(Object.assign({key:null!=s?s:n.Breakscape.EMPTY_STRING,cells:b},l));g.push(e)}}return{heading:o,matrix:g.length>0?g:void 0}}(0,0,C);break;case s.CardSetConfigKey._table:B=function(e,t,r){let i=0,o=!1;const a=[],s=[];let l=[];for(const e of r.cards){o=!1,l=[];for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,cardBodyStr:s}=t,u=r&&r[1];if(0===i&&null!=u&&(o=!0),o)a.push(null!=u?u:n.Breakscape.EMPTY_STRING);else{const e=null!=s?s:n.Breakscape.EMPTY_STRING;l.push(e)}}o||s.push(l),i++}return{table:d.table({columns:a,rows:s})}}(0,0,C);break;case s.CardSetConfigKey._botActionResponses:B=function(e,t,r){const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{instruction:r,reaction:a,cardBodyStr:s}=t,l=i(t,["instruction","reaction","cardBodyStr"]),u=d.botResponse(Object.assign({response:null!=r?r:n.Breakscape.EMPTY_STRING,reaction:null!=a?a:n.Breakscape.EMPTY_STRING,feedback:null!=s?s:n.Breakscape.EMPTY_STRING},l));o.push(u)}return{botResponses:o.length>0?o:void 0}}(0,0,C);break;case s.CardSetConfigKey._ingredients:B=function(e,t,r){const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,instruction:a,unit:s,unitAbbr:l,decimalPlaces:p,disableCalculation:g,cardBodyStr:y,cardBody:f}=t,m=i(t,["title","instruction","unit","unitAbbr","decimalPlaces","disableCalculation","cardBodyStr","cardBody"]),h=Array.isArray(r)&&r.length>0?r[r.length-1]:void 0;let T=!1,b=c.NumberUtils.asNumber(a);if(f&&f.bodyParts){const e=f.bodyParts.find((e=>e.type===u.BodyBitType.select));e&&(b=e.data.instruction?c.NumberUtils.asNumber(e.data.instruction):b,e.data.options&&e.data.options.length>0&&(T=e.data.options[0].isCorrect))}const v=y?y.trim():n.Breakscape.EMPTY_STRING,B=d.ingredient(Object.assign({title:h,checked:T,item:v,quantity:b,unit:null!=s?s:n.Breakscape.EMPTY_STRING,unitAbbr:null!=l?l:n.Breakscape.EMPTY_STRING,decimalPlaces:null!=p?p:1,disableCalculation:g},m));o.push(B)}return{ingredients:o.length>0?o:void 0}}(0,0,C);break;case s.CardSetConfigKey._clozeList:case s.CardSetConfigKey._exampleBitList:B=function(e,t,r){const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{cardBody:r}=t,n=i(t,["cardBody"]),a=d.cardBit(Object.assign({body:r},n));a&&o.push(a)}return{cardBits:o.length>0?o:void 0}}(0,0,C)}return B.internalComments=C.internalComments.length>0?C.internalComments:void 0,B}},554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clozeTagContentProcessor=void 0;const i=r(9681);t.clozeTagContentProcessor=function(e,t,r,o,n,a,s){const{value:l}=a,u=s.solutions;if(u&&i.StringUtils.isString(l)){const e=i.StringUtils.trimmedString(l);u.push(e)}}},4402:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTagContentProcessor=void 0;const i=r(9681),o=r(3029);t.defaultTagContentProcessor=function(e,t,r,n,a,s,l){const{type:u,value:p}=s,c=i.StringUtils.trimmedString(p);switch(u){case o.TypeKey.Instruction:l.instruction=c;break;case o.TypeKey.Hint:l.hint=c;break;case o.TypeKey.Anchor:l.anchor=c;break;case o.TypeKey.Reference:l.reference=c;break;case o.TypeKey.SampleSolution:l.sampleSolution=c,e.addWarning("[$...] tag is deprecated, use [@sampleSolution:...] instead",s)}}},4091:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exampleTagContentProcessor=void 0;const i=r(2028),o=r(5854),n=r(4078);function a(e,t,r,i,o){!0===i?(o.isDefaultExample=!0,o.example=void 0):o.example=i}t.exampleTagContentProcessor=function(e,t,r,s,l,u){const{value:p}=l,c=p;i.Config.isOfBitType(t,[o.BitType.cloze,o.BitType.clozeAndMultipleChoiceText,o.BitType.multipleChoiceText,o.BitType.highlightText,o.BitType.trueFalse,o.BitType.trueFalse1,o.BitType.multipleResponse,o.BitType.multipleResponse1,o.BitType.multipleChoice,o.BitType.multipleChoice1])?function(e,t,r,s,l){var u,p;let c;Array.isArray(l.trueFalse)&&l.trueFalse.length>0&&(c=null!==(u=l.trueFalse[l.trueFalse.length-1])&&void 0!==u?u:void 0);c?!0===s?(c.isDefaultExample=!0,c.example=void 0):n.BooleanUtils.isBooleanString(s)?c.example=s:(c.isDefaultExample=!0,c.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",r)):Array.isArray(l.solutions)&&l.solutions.length>0?l.example=!0===s?null!==(p=l.solutions[l.solutions.length-1])&&void 0!==p?p:void 0:s:(i.Config.isOfBitType(t,[o.BitType.multipleChoiceText,o.BitType.highlightText,o.BitType.trueFalse,o.BitType.trueFalse1,o.BitType.multipleResponse,o.BitType.multipleResponse1])&&function(e,t,r,i,o){!0===i?(o.isDefaultExample=!0,o.example=void 0):n.BooleanUtils.isBooleanString(i)?o.example=i:(o.isDefaultExample=!0,o.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",r))}(e,0,r,s,l),i.Config.isOfBitType(t,[o.BitType.clozeAndMultipleChoiceText,o.BitType.multipleChoice,o.BitType.multipleChoice1])?(l.isDefaultExample=!0,l.example=void 0,!0!==s&&e.addWarning("At this level, only default [@example] is allowed, using default",r)):a(e,t,r,s,l))}(e,t,l,c,u):i.Config.isOfBitType(t,o.BitType.mark)?function(e,t,r,i,o){o.isDefaultExample=!0,o.example=void 0,!0!==i&&e.addWarning("Only default [@example] is allowed, using default",r)}(e,0,l,c,u):a(e,t,l,c,u)}},3904:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.gapChainContentProcessor=void 0;const o=r(5809),n=r(2028),a=r(9917),s=r(554),l=r(3029),u=new o.Builder;t.gapChainContentProcessor=function(e,t,r,o,p,c,g,y){if(o===l.BitContentLevel.Chain)(0,s.clozeTagContentProcessor)(e,t,r,o,p,c,g);else{const o=function(e,t,r,o,s,p){var c;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("gap content",p);const g=n.Config.getTagConfigForTag(s,a.Tag.fromValue(p.type)),y=[p,...null!==(c=p.chain)&&void 0!==c?c:[]],d=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,null==g?void 0:g.chain,y);e.DEBUG_CHAIN_TAGS&&e.debugPrint("gap TAGS",d);const{solutions:f}=d,m=i(d,["solutions"]),h=u.gap(Object.assign({solutions:null!=f?f:[]},m));return h}(e,t,r,0,p,c);o&&y.push(o)}}},8848:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.imageSourceChainContentProcessor=void 0;const o=r(5809),n=r(7735),a=r(2028),s=r(166),l=r(9681),u=r(3029),p=new o.Builder;t.imageSourceChainContentProcessor=function(e,t,r,o,c,g,y){o===u.BitContentLevel.Chain?function(e,t,r,i,o,n,a){const{value:s}=n,u=l.StringUtils.trimmedString(s);a.imageSourceUrl=u}(0,0,0,0,0,g,y):function(e,t,r,o,l,c,g){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("imageSource content",c);const{key:y}=c,d=a.Config.getTagConfigForTag(l,s.PropertyTag.fromValue(y)),f=e.bitContentProcessor(t,r,u.BitContentLevel.Chain,l,[c]),m=e.bitContentProcessor(t,r,u.BitContentLevel.Chain,null==d?void 0:d.chain,c.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("imageSource TAGS",m);const{imageSourceUrl:h}=f,{mockupId:T}=m,b=i(m,["mockupId"]);h||e.addWarning("[@imageSource] is missing the image url",c);T||e.addWarning("[@mockupId:xxx] is missing from [@imageSource]",c);const v=p.imageSource(Object.assign({url:null!=h?h:n.Breakscape.EMPTY_STRING,mockupId:null!=T?T:n.Breakscape.EMPTY_STRING},b));g.imageSource=v}(e,t,r,0,c,g,y)}},6991:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.commentTagContentProcessor=void 0;const i=r(9681);t.commentTagContentProcessor=function(e,t,r,o,n){if(!n.internalComments)return;const{value:a}=o,s=i.StringUtils.isString(a)?i.StringUtils.trimmedString(a):void 0;s&&n.internalComments.push(s)}},9289:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadChainContentProcessor=void 0;const i=r(2028),o=r(9917),n=r(8216),a=r(3029);t.itemLeadChainContentProcessor=function(e,t,r,s,l,u,p){s===a.BitContentLevel.Chain?(0,n.itemLeadTagContentProcessor)(e,t,r,s,l,u,p):function(e,t,r,n,s,l,u){var p;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("item lead content",l);const c=i.Config.getTagConfigForTag(s,o.Tag.fromValue(l.type)),g=[l,...null!==(p=l.chain)&&void 0!==p?p:[]],y=e.bitContentProcessor(t,r,a.BitContentLevel.Chain,null==c?void 0:c.chain,g);e.DEBUG_CHAIN_TAGS&&e.debugPrint("item lead TAGS",y);u.itemLead=y.itemLead}(e,t,r,0,l,u,p)}},8216:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadTagContentProcessor=void 0;const i=r(9681);t.itemLeadTagContentProcessor=function(e,t,r,o,n,a,s){const{value:l}=a,u=i.StringUtils.trimmedString(l);s.itemLead||(s.itemLead=[]),s.itemLead.push(u)}},5189:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.markChainContentProcessor=void 0;const o=r(5809),n=r(7735),a=r(2028),s=r(9917),l=r(6989),u=r(5980),p=r(3029),c=new o.Builder;t.markChainContentProcessor=function(e,t,r,o,g,y,d,f){if(o===p.BitContentLevel.Chain)(0,u.markTagContentProcessor)(e,p.BitContentLevel.Chain,t,y,d);else{const o=function(e,t,r,o,u,g){var y;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",g);const d=a.Config.getTagConfigForTag(u,s.Tag.fromValue(g.type)),f=e.bitContentProcessor(t,r,p.BitContentLevel.Chain,u,[g]),m=e.bitContentProcessor(t,r,p.BitContentLevel.Chain,null==d?void 0:d.chain,g.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",m);const{solution:h}=f,{mark:T}=m,b=i(m,["mark"]),v=c.mark(Object.assign({solution:null!=h?h:n.Breakscape.EMPTY_STRING,mark:null!==(y=l.ArrayUtils.asSingle(T))&&void 0!==y?y:n.Breakscape.EMPTY_STRING},b));return v}(e,t,r,0,g,y);o&&f.push(o)}}},3063:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.markConfigChainContentProcessor=void 0;const o=r(5809),n=r(2028),a=r(166),s=r(9681),l=r(3029),u=new o.Builder;t.markConfigChainContentProcessor=function(e,t,r,o,p,c,g){var y;const{key:d}=c;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",c);const f=g.markConfig;if(!f)return;const m=n.Config.getTagConfigForTag(p,a.PropertyTag.fromValue(d)),h=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,null==m?void 0:m.chain,c.chain),{mark:T}=h,b=i(h,["mark"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",b);const v=null!==(y=s.StringUtils.trimmedString(c.value))&&void 0!==y?y:"unknown",B=u.markConfig(Object.assign({mark:v,emphasis:"underline"},b));f.push(B)}},5980:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.markTagContentProcessor=void 0;const i=r(9681);t.markTagContentProcessor=function(e,t,r,o,n){const{value:a}=o;i.StringUtils.isString(a)&&(n.solution=a)}},21:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.personChainContentProcessor=void 0;const i=r(5809),o=r(6149),n=r(9681),a=r(3029),s=new i.Builder;t.personChainContentProcessor=function(e,t,r,i,l,u,p){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("person content",u);const c=e.bitContentProcessor(t,r,a.BitContentLevel.Chain,l,u.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("person TAGS",c);const{propertyTitle:g,resources:y}=c,d=n.StringUtils.trimmedString(u.value),f=n.StringUtils.trimmedString(g),m=function(e,t){let r;const i=[];if(t)for(const e of t.reverse())r||o.ResourceTag.image!==e.type?i.push(e):r=e;i.length>0&&(e.parser.excessResources=i,e.addWarning(`${i.length} excess resource(s) present in the [@person] chain.`));return r}(e,y),h=s.person({name:d,title:f,avatarImage:m});p.person=h}},9647:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyContentProcessor=void 0;const i=r(2028),o=r(9888),n=r(9727),a=r(166),s=r(4078),l=r(8025),u=r(9681),p=r(3045),c=r(4091),g=r(8848),y=r(6991),d=r(3063),f=r(21),m=r(3967),h=r(4953),T=r(4475),b=r(3029);t.propertyContentProcessor=function(e,t,r,v,B,C,P){const{value:k}=C;let{key:x}=C;const S=v===b.BitContentLevel.Chain,K=i.Config.getTagConfigForTag(B,a.PropertyTag.fromValue(x)),w=K?K.configKey:void 0;if(x===a.PropertyTag.internalComment)return void(0,y.commentTagContentProcessor)(e,t,v,C,P);if(K){if(w===o.PropertyConfigKey.example)return void(0,c.exampleTagContentProcessor)(e,t,r,v,C,P);if(w===o.PropertyConfigKey.ratingLevelStart||w===o.PropertyConfigKey.ratingLevelEnd)return void(0,m.ratingLevelChainContentProcessor)(e,t,r,v,K.chain,C,P);if(w===o.PropertyConfigKey.technicalTerm)return void(0,T.technicalTermChainContentProcessor)(e,t,r,v,K.chain,C,P);if(w===o.PropertyConfigKey.servings)return void(0,h.servingsChainContentProcessor)(e,t,r,v,K.chain,C,P);if(w===o.PropertyConfigKey.person||w===o.PropertyConfigKey.partner)return void(0,f.personChainContentProcessor)(e,t,r,v,K.chain,C,P);if(w===o.PropertyConfigKey.imageSource)return void(0,g.imageSourceChainContentProcessor)(e,t,r,v,B,C,P);if(w===o.PropertyConfigKey.book)return void(0,p.bookChainContentProcessor)(e,t,r,v,K.chain,C,P);if(w===o.PropertyConfigKey.markConfig&&!S)return void(0,d.markConfigChainContentProcessor)(e,t,r,v,B,C,P);w===o.PropertyConfigKey.property_title&&S&&(x="propertyTitle")}const A=(e,t,r,i)=>{if(r=(e=>{if(null!=e){if(i)switch(i.format){case n.PropertyFormat.string:return u.StringUtils.isString(e)?u.StringUtils.string(e):void 0;case n.PropertyFormat.trimmedString:return u.StringUtils.isString(e)?u.StringUtils.trimmedString(e):void 0;case n.PropertyFormat.number:return l.NumberUtils.asNumber(e);case n.PropertyFormat.boolean:return s.BooleanUtils.toBoolean(e,!0);case n.PropertyFormat.invertedBoolean:return!s.BooleanUtils.toBoolean(e,!0)}return e}})(r),(null==i?void 0:i.astKey)&&(t=i.astKey),null==i?void 0:i.single)e[t]=r;else if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t];e[t]=[...i,r]}else e[t]=[r]};A(K?P:P.extraProperties,x,k,K)}},3967:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ratingLevelChainContentProcessor=void 0;const i=r(5809),o=r(166),n=r(8025),a=r(3029),s=new i.Builder;t.ratingLevelChainContentProcessor=function(e,t,r,i,l,u,p){var c;const{key:g,value:y}=u;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("ratingLevel content",u);const d=e.bitContentProcessor(t,r,a.BitContentLevel.Chain,l,u.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("ratingLevel TAGS",d);const{label:f}=d,m=null!==(c=n.NumberUtils.asNumber(y))&&void 0!==c?c:0,h=s.ratingLevelStartEnd({level:m,label:f});switch(g){case o.PropertyTag.ratingLevelStart:p.ratingLevelStart=h;break;case o.PropertyTag.ratingLevelEnd:p.ratingLevelEnd=h}}},3990:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.referenceTagContentProcessor=void 0;const i=r(9681);t.referenceTagContentProcessor=function(e,t,r,o,n,a,s,l){const{value:u}=a,p=i.StringUtils.trimmedString(u);l?s.referenceEnd=p:s.reference=p}},6521:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.resourceContentProcessor=t.buildResources=void 0;const o=r(5533),n=r(2028),a=r(3778),s=r(6149),l=r(3029),u=new o.ResourceBuilder;t.buildResources=function(e,t,r,i){var o,l;const u=[],p=[],c=s.ResourceTag.fromValue(r),g=n.Config.getBitResourcesConfig(t,c),y=g.resourceAttachmentAllowed,d=g.getCountsMin(),f=g.getCountsMax();if(i)for(const e of i.reverse()){let t=null!==(o=d.get(e.typeAlias))&&void 0!==o?o:0,r=null!==(l=f.get(e.typeAlias))&&void 0!==l?l:0;t=Math.max(0,t-1),r===a.Count.infinity?u.unshift(e):r>0?(u.unshift(e),r--):p.unshift(e),d.set(e.typeAlias,t),f.set(e.typeAlias,r)}if(!y&&r){const t=`Resource type [&${r}] is specified in the bit header, but no extra resource is allowed for this bit.`;e.addWarning(t)}else 0===u.length&&r&&e.addWarning(`Resource type [&${r}] is specified in the bit header, but no such a resource is present`);return p.length>0&&(e.parser.excessResources=p),u},t.resourceContentProcessor=function(e,t,r,o,a,p,c){const{type:g,key:y,value:d,chain:f}=p,m=c.resources;if(!m)return;const h=s.ResourceTag.fromValue(y);if(h){const o=n.Config.getTagConfigForTag(a,h),s=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,null==o?void 0:o.chain,f),{posterImage:p}=s,c=i(s,["posterImage"]),g=u.resource(Object.assign({type:h,value:d,posterImage:p},c));g&&m.push(g)}}},4953:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.servingsChainContentProcessor=void 0;const i=r(5809),o=r(8025),n=r(3029),a=new i.Builder;t.servingsChainContentProcessor=function(e,t,r,i,s,l,u){var p;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("servings content",l);const c=e.bitContentProcessor(t,r,n.BitContentLevel.Chain,s,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("servings TAGS",c);const{unit:g,unitAbbr:y,decimalPlaces:d,disableCalculation:f,hint:m}=c,h=null!==(p=o.NumberUtils.asNumber(l.value))&&void 0!==p?p:1,T=a.servings({servings:h,unit:g,unitAbbr:y,decimalPlaces:null!=d?d:1,disableCalculation:f,hint:m});u.servings=T}},4475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.technicalTermChainContentProcessor=void 0;const i=r(5809),o=r(9681),n=r(3029),a=new i.Builder;t.technicalTermChainContentProcessor=function(e,t,r,i,s,l,u){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("technicalTerm content",l);const p=e.bitContentProcessor(t,r,n.BitContentLevel.Chain,s,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("technicalTerm TAGS",p);const{lang:c}=p,g=o.StringUtils.trimmedString(l.value),y=a.technicalTerm({technicalTerm:g,lang:c});u.technicalTerm=y}},7667:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildTitles=t.titleTagContentProcessor=void 0;const i=r(2028),o=r(5854),n=r(9681);t.titleTagContentProcessor=function(e,t,r,i,o,a,s){const{value:l}=a,u=s.title;if(!u)return;const p=l,c=n.StringUtils.trimmedString(p.title);u[p.level.length]=c},t.buildTitles=function(e,t,r){var n,a;if(r=null!=r?r:[],i.Config.isOfBitType(t,o.BitType.chapter)){let e;return r.length>0&&(e=r[r.length-1]),{title:e,level:r.length>0?r.length-1:void 0}}return{title:null!==(n=r[1])&&void 0!==n?n:void 0,subtitle:null!==(a=r[2])&&void 0!==a?a:void 0}}},9885:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseChainContentProcessor=void 0;const o=r(5809),n=r(2028),a=r(5854),s=r(4020),l=r(3029),u=new o.Builder;t.trueFalseChainContentProcessor=function(e,t,r,o,p,c,g,y){o===l.BitContentLevel.Chain?(0,s.trueFalseTagContentProcessor)(e,t,r,l.BitContentLevel.Chain,c,g):function(e,t,r,o,s,p,c,g){var y;const d=[p,...null!==(y=p.chain)&&void 0!==y?y:[]],f=c.statements,m=c.choices,h=c.responses;if(!(f&&m&&h&&g))return;if(n.Config.isOfBitType(t,a.BitType.trueFalse1))c.statement=function(e,t,r,o,s){if(!n.Config.isOfBitType(t,a.BitType.trueFalse1))return;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (statement)",s);const p=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,o,s),{trueFalse:c}=p,g=i(p,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (statement)",g);let y;c&&c.length>0&&(y=u.statement(Object.assign(Object.assign({},c[0]),g)));return y}(e,t,r,s,d);else if(n.Config.isOfBitType(t,[a.BitType.trueFalse,a.BitType.multipleChoice,a.BitType.multipleChoice1,a.BitType.multipleResponse,a.BitType.multipleResponse1])){const o=function(e,t,r,o,s){const p=n.Config.isOfBitType(t,a.BitType.trueFalse),c=n.Config.isOfBitType(t,[a.BitType.multipleChoice,a.BitType.multipleChoice1]),g=n.Config.isOfBitType(t,[a.BitType.multipleResponse,a.BitType.multipleResponse1]);if(!p&&!c&&!g)return{};const y=[],d=[],f=[],m=e.splitBitContent(s,[l.TypeKey.True,l.TypeKey.False]);e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (choices/responses)",m);for(const n of m){const a=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,o,n),{trueFalse:s}=a,m=i(a,["trueFalse"]);if(e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (choices/responses)",m),p){if(s&&s.length>0){const e=u.statement(Object.assign(Object.assign({},s[0]),m));y.push(e)}}else if(c){if(s&&s.length>0){const e=u.choice(Object.assign(Object.assign({},s[0]),m));d.push(e)}}else if(g&&s&&s.length>0){const e=u.response(Object.assign(Object.assign({},s[0]),m));f.push(e)}}const h={};p?h.statements=y:c?h.choices=d:g&&(h.responses=f);return h}(e,t,r,s,d);o.statements&&f.push(...o.statements),o.choices&&m.push(...o.choices),o.responses&&h.push(...o.responses)}else if(n.Config.isOfBitType(t,a.BitType.highlightText)){const o=function(e,t,r,o,n){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("highlight content",n);const a=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,o,n),{trueFalse:s}=a,p=i(a,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("highlight TAGS",Object.assign({trueFalse:s},p));const c=[];if(s)for(const e of s)c.push(u.highlightText(Object.assign(Object.assign({},e),{isHighlighted:!1})));const g=u.highlight(Object.assign({texts:c},p));return g}(e,t,r,s,d);o&&g.push(o)}else{const o=function(e,t,r,o,n){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("select content",n);const a=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,o,n),{trueFalse:s}=a,p=i(a,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("select TAGS",Object.assign({trueFalse:s},p));const c=[];if(s)for(const e of s)c.push(u.selectOption(e));const g=u.select(Object.assign({options:c},p));return g}(e,t,r,s,d);o&&g.push(o)}}(e,t,r,0,p,c,g,y)}},4020:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseTagContentProcessor=void 0;const i=r(9681),o=r(3029);t.trueFalseTagContentProcessor=function(e,t,r,n,a,s){const{type:l,value:u}=a,p=s.trueFalse;if(!p)return;const c=i.StringUtils.trimmedString(u);p.push({text:c,isCorrect:l===o.TypeKey.True,isDefaultExample:!1})}},5663:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JsonParser=void 0;const i=r(5809),o=r(5533),n=r(7735),a=r(2028),s=r(431),l=r(5854),u=r(4410),p=r(6149),c=r(385),g=r(9681),y=r(777),d=new i.Builder,f=new o.ResourceBuilder;t.JsonParser=class{constructor(){this.textGenerator=new s.TextGenerator,this.textParser=new y.TextParser}toAst(e){const t=this.preprocessJson(e),r=[];for(const e of t){const{bit:t,parser:i}=e,o=this.bitToAst(t,null==i?void 0:i.internalComments);o&&r.push(o)}const i=r.length>0?{bits:r}:{};return d.bitmark(i)}preprocessJson(e){const t=[];if(g.StringUtils.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 a.Config.getBitType(t.type)!==l.BitType._error}return!1}bitToBitWrapper(e){return{bit:e}}bitToAst(e,t){var r;const{type:i,originalType:o,format:n,id:s,externalId:u,spaceId:p,padletId:g,jupyterId:y,jupyterExecutionCount:f,isPublic:m,AIGenerated:h,releaseVersion:T,releaseKind:b,releaseDate:v,ageRange:B,lang:C,language:P,publisher:k,publisherName:x,theme:S,computerLanguage:K,target:w,tag:A,icon:_,iconTag:I,colorTag:L,flashcardSet:O,subtype:E,bookAlias:R,coverImage:N,coverColor:V,publications:F,author:j,date:G,location:D,kind:M,hasMarkAsDone:U,blockId:J,pageNo:$,x:z,y:q,width:H,height:W,index:Y,classification:X,availableClassifications:Z,tableFixedHeader:Q,tableSearch:ee,tableSort:te,tablePagination:re,tablePaginationLimit:ie,tableHeight:oe,tableWhitespaceNoWrap:ne,tableAutoWidth:ae,tableResizableColumns:se,quizCountItems:le,quizStrikethroughSolutions:ue,codeLineNumbers:pe,codeMinimap:ce,action:ge,thumbImage:ye,scormSource:de,posterImage:fe,focusX:me,focusY:he,pointerLeft:Te,pointerTop:be,backgroundWallpaper:ve,hasBookNavigation:Be,duration:Ce,deeplink:Pe,externalLink:ke,externalLinkText:xe,videoCallLink:Se,vendorUrl:Ke,search:we,bot:Ae,list:_e,textReference:Ie,isTracked:Le,isInfoOnly:Oe,labelTrue:Ee,labelFalse:Re,content2Buy:Ne,mailingList:Ve,buttonCaption:Fe,caption:je,quotedPerson:Ge,reasonableNumOfChars:De,resolved:Me,resolvedDate:Ue,resolvedBy:Je,maxCreatedBits:$e,maxDisplayLevel:ze,productId:qe,product:He,productVideo:We,productFolder:Ye,technicalTerm:Xe,servings:Ze,ratingLevelStart:Qe,ratingLevelEnd:et,ratingLevelSelected:tt,book:rt,title:it,subtitle:ot,level:nt,toc:at,progress:st,anchor:lt,reference:ut,referenceEnd:pt,item:ct,lead:gt,pageNumber:yt,marginNumber:dt,hint:ft,instruction:mt,example:ht,imageSource:Tt,person:bt,partner:vt,marks:Bt,resource:Ct,logos:Pt,images:kt,body:xt,sampleSolution:St,elements:Kt,statement:wt,isCorrect:At,cards:_t,statements:It,responses:Lt,quizzes:Ot,heading:Et,pairs:Rt,matrix:Nt,table:Vt,choices:Ft,questions:jt,ingredients:Gt,listItems:Dt,sections:Mt,footer:Ut,placeholders:Jt}=e,$t=i===l.BitType._comment&&void 0!==o,zt=a.Config.getBitType($t?o:i),qt=a.Config.getBitConfig(zt),Ht=null!==(r=c.TextFormat.fromValue(n))&&void 0!==r?r:qt.textFormatDefault,Wt=this.getResourceType(Ct),Yt=this.resourceBitToAst(zt,Ct,null!=kt?kt:Pt),Xt=this.bodyToAst(xt,Ht,Jt),Zt=this.imageSourceBitToAst(Tt),Qt=this.personBitToAst(null!=bt?bt:vt),er=this.markConfigBitToAst(Bt),tr=this.flashcardBitsToAst(_t),rr=this.statementBitsToAst(wt,At,It,ht),ir=this.responseBitsToAst(zt,Lt),or=this.quizBitsToAst(zt,Ot),nr=this.headingBitToAst(Et),ar=this.pairBitsToAst(Rt),sr=this.matrixBitsToAst(Nt),lr=this.tableToAst(Vt),ur=this.choiceBitsToAst(Ft),pr=this.questionBitsToAst(jt),cr=this.botResponseBitsToAst(zt,Lt),gr=this.technicalTermToAst(Xe),yr=this.servingsToAst(Ze),dr=this.ingredientsBitsToAst(Gt),fr=this.ratingLevelStartEndToAst(Qe),mr=this.ratingLevelStartEndToAst(et),hr=this.listItemsToAst(null!=Dt?Dt:Mt,Ht,Jt),Tr=this.footerToAst(Ut,Ht),{reference:br,referenceProperty:vr}=this.referenceToAst(ut);return d.bit(Object.assign(Object.assign(Object.assign({bitType:zt,textFormat:n,resourceType:Wt,isCommented:$t,id:this.convertStringToBreakscapedString(s),internalComment:this.convertStringToBreakscapedString(t),externalId:this.convertStringToBreakscapedString(u),spaceId:this.convertStringToBreakscapedString(p),padletId:this.convertStringToBreakscapedString(g),jupyterId:this.convertStringToBreakscapedString(y),jupyterExecutionCount:f,isPublic:m,aiGenerated:h,releaseVersion:this.convertStringToBreakscapedString(T),releaseKind:this.convertStringToBreakscapedString(b),releaseDate:this.convertStringToBreakscapedString(v),ageRange:B,lang:this.convertStringToBreakscapedString(C),language:this.convertStringToBreakscapedString(P),publisher:this.convertStringToBreakscapedString(k),publisherName:this.convertStringToBreakscapedString(x),theme:this.convertStringToBreakscapedString(S),computerLanguage:this.convertStringToBreakscapedString(K),target:this.convertStringToBreakscapedString(w),tag:this.convertStringToBreakscapedString(A),icon:this.convertStringToBreakscapedString(_),iconTag:this.convertStringToBreakscapedString(I),colorTag:this.convertStringToBreakscapedString(L),flashcardSet:this.convertStringToBreakscapedString(O),subtype:this.convertStringToBreakscapedString(E),bookAlias:this.convertStringToBreakscapedString(R),coverImage:this.convertStringToBreakscapedString(N),coverColor:this.convertStringToBreakscapedString(V),publications:this.convertStringToBreakscapedString(F),author:this.convertStringToBreakscapedString(j),date:this.convertStringToBreakscapedString(G),location:this.convertStringToBreakscapedString(D),kind:this.convertStringToBreakscapedString(M),hasMarkAsDone:U,action:this.convertStringToBreakscapedString(ge),blockId:this.convertStringToBreakscapedString(J),pageNo:$,x:z,y:q,width:H,height:W,index:Y,classification:this.convertStringToBreakscapedString(X),availableClassifications:this.convertStringToBreakscapedString(Z),tableFixedHeader:Q,tableSearch:ee,tableSort:te,tablePagination:re,tablePaginationLimit:ie,tableHeight:oe,tableWhitespaceNoWrap:ne,tableAutoWidth:ae,tableResizableColumns:se,quizCountItems:le,quizStrikethroughSolutions:ue,codeLineNumbers:pe,codeMinimap:ce,duration:this.convertStringToBreakscapedString(Ce),referenceProperty:this.convertStringToBreakscapedString(vr),thumbImage:this.convertStringToBreakscapedString(ye),scormSource:this.convertStringToBreakscapedString(de),posterImage:this.convertStringToBreakscapedString(fe),focusX:me,focusY:he,pointerLeft:this.convertStringToBreakscapedString(Te),pointerTop:this.convertStringToBreakscapedString(be),backgroundWallpaper:this.convertStringToBreakscapedString(ve),hasBookNavigation:Be,deeplink:this.convertStringToBreakscapedString(Pe),externalLink:this.convertStringToBreakscapedString(ke),externalLinkText:this.convertStringToBreakscapedString(xe),videoCallLink:this.convertStringToBreakscapedString(Se),vendorUrl:this.convertStringToBreakscapedString(Ke),search:this.convertStringToBreakscapedString(we),bot:this.convertStringToBreakscapedString(Ae),list:this.convertStringToBreakscapedString(_e),textReference:this.convertStringToBreakscapedString(Ie),isTracked:Le,isInfoOnly:Oe,labelTrue:this.convertStringToBreakscapedString(Ee),labelFalse:this.convertStringToBreakscapedString(Re),content2Buy:this.convertStringToBreakscapedString(Ne),mailingList:this.convertStringToBreakscapedString(Ve),buttonCaption:this.convertStringToBreakscapedString(Fe),caption:this.convertJsonTextToBreakscapedString(je),quotedPerson:this.convertStringToBreakscapedString(Ge),reasonableNumOfChars:De,resolved:Me,resolvedDate:this.convertStringToBreakscapedString(Ue),resolvedBy:this.convertStringToBreakscapedString(Je),maxCreatedBits:$e,maxDisplayLevel:ze,productId:this.convertStringToBreakscapedString(qe),productList:this.convertStringToBreakscapedString(He),productVideoList:this.convertStringToBreakscapedString(We),productFolder:this.convertStringToBreakscapedString(Ye),technicalTerm:gr,servings:yr,ratingLevelStart:fr,ratingLevelEnd:mr,ratingLevelSelected:tt,book:this.convertStringToBreakscapedString(rt),title:this.convertJsonTextToBreakscapedString(it),subtitle:this.convertJsonTextToBreakscapedString(ot),level:nt,toc:at,progress:st,anchor:this.convertStringToBreakscapedString(lt),reference:this.convertStringToBreakscapedString(br),referenceEnd:this.convertStringToBreakscapedString(pt)},this.parseItemLeadHintInstruction(ct,gt,yt,dt,ft,mt)),this.parseExample(ht)),{imageSource:Zt,person:Qt,markConfig:er,resources:Yt,body:Xt,sampleSolution:this.convertStringToBreakscapedString(St),elements:this.convertStringToBreakscapedString(Kt),flashcards:tr,statements:rr,responses:ir,quizzes:or,heading:nr,pairs:ar,matrix:sr,table:lr,choices:ur,questions:pr,botResponses:cr,ingredients:dr,cardBits:hr,footer:Tr}))}imageSourceBitToAst(e){var t,r;let i;if(e){const{url:o,mockupId:a,format:s,size:l,trim:u}=e;i=d.imageSource({url:null!==(t=this.convertStringToBreakscapedString(o))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,mockupId:null!==(r=this.convertStringToBreakscapedString(a))&&void 0!==r?r:n.Breakscape.EMPTY_STRING,format:this.convertStringToBreakscapedString(s),size:l,trim:u})}return i}personBitToAst(e){var t;let r;if(e){const i=this.resourceDataToAst(p.ResourceTag.image,e.avatarImage);r=d.person({name:null!==(t=this.convertStringToBreakscapedString(e.name))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,title:this.convertStringToBreakscapedString(e.title),avatarImage:i})}return r}markConfigBitToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{mark:e,color:o,emphasis:a}=i,s=d.markConfig({mark:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,color:this.convertStringToBreakscapedString(o),emphasis:this.convertStringToBreakscapedString(a)});r.push(s)}if(0!==r.length)return r}flashcardBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{question:e,answer:o,alternativeAnswers:a,item:s,lead:l,pageNumber:u,marginNumber:p,hint:c,instruction:g,example:y}=i,f=d.flashcard(Object.assign(Object.assign({question:null!==(t=this.convertJsonTextToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,answer:this.convertJsonTextToBreakscapedString(o),alternativeAnswers:this.convertJsonTextToBreakscapedString(a)},this.parseItemLeadHintInstruction(s,l,u,p,c,g)),this.parseExample(y)));r.push(f)}if(0!==r.length)return r}statementBitsToAst(e,t,r,i){var o,a;const s=[];if(e){const r=d.statement(Object.assign({text:null!==(o=this.convertStringToBreakscapedString(e))&&void 0!==o?o:n.Breakscape.EMPTY_STRING,isCorrect:null!=t&&t},this.parseExample(i)));s.push(r)}if(Array.isArray(r))for(const e of r){const{statement:t,isCorrect:r,item:i,lead:o,pageNumber:l,marginNumber:u,hint:p,instruction:c,example:g}=e,y=d.statement(Object.assign(Object.assign({text:null!==(a=this.convertStringToBreakscapedString(t))&&void 0!==a?a:n.Breakscape.EMPTY_STRING,isCorrect:r},this.parseItemLeadHintInstruction(i,o,l,u,p,c)),this.parseExample(g)));s.push(y)}if(0!==s.length)return s}choiceBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{choice:e,isCorrect:o,item:a,lead:s,pageNumber:l,marginNumber:u,hint:p,instruction:c,example:g}=i,y=d.choice(Object.assign(Object.assign({text:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,isCorrect:o},this.parseItemLeadHintInstruction(a,s,l,u,p,c)),this.parseExample(g)));r.push(y)}if(0!==r.length)return r}responseBitsToAst(e,t){var r;const i=[];if(!a.Config.isOfBitType(e,l.BitType.botActionResponse)){if(Array.isArray(t))for(const e of t){const{response:t,isCorrect:o,item:a,lead:s,pageNumber:l,marginNumber:u,hint:p,instruction:c,example:g}=e,y=d.response(Object.assign(Object.assign({text:null!==(r=this.convertStringToBreakscapedString(t))&&void 0!==r?r:n.Breakscape.EMPTY_STRING,isCorrect:o},this.parseItemLeadHintInstruction(a,s,l,u,p,c)),this.parseExample(g)));i.push(y)}if(0!==i.length)return i}}selectOptionBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{text:e,isCorrect:o,item:a,lead:s,pageNumber:l,marginNumber:u,hint:p,instruction:c,example:g}=i,y=d.selectOption(Object.assign(Object.assign({text:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,isCorrect:o},this.parseItemLeadHintInstruction(a,s,l,u,p,c)),this.parseExample(g)));r.push(y)}return r}highlightTextBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{text:e,isCorrect:o,isHighlighted:a,item:s,lead:l,pageNumber:u,marginNumber:p,hint:c,instruction:g,example:y}=i,f=d.highlightText(Object.assign(Object.assign({text:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,isCorrect:o,isHighlighted:a},this.parseItemLeadHintInstruction(s,l,u,p,c,g)),this.parseExample(y)));r.push(f)}return r}quizBitsToAst(e,t){const r=[];if(Array.isArray(t))for(const i of t){const{item:t,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,choices:u,responses:p}=i,c=this.choiceBitsToAst(u),g=this.responseBitsToAst(e,p),y=d.quiz(Object.assign(Object.assign({},this.parseItemLeadHintInstruction(t,o,n,a,s,l)),{choices:c,responses:g}));r.push(y)}if(0!==r.length)return r}headingBitToAst(e){var t,r;let i;return e&&Object.keys(e).length>0&&(i=d.heading({forKeys:null!==(t=this.convertStringToBreakscapedString(e.forKeys))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,forValues:null!==(r=this.convertStringToBreakscapedString(e.forValues))&&void 0!==r?r:[]})),i}pairBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{key:e,keyAudio:o,keyImage:n,values:a,item:s,lead:l,pageNumber:u,marginNumber:c,hint:g,instruction:y,example:f,isCaseSensitive:m}=i,h=this.resourceDataToAst(p.ResourceTag.audio,o),T=this.resourceDataToAst(p.ResourceTag.image,n),b=d.pair(Object.assign(Object.assign(Object.assign({key:this.convertStringToBreakscapedString(e),keyAudio:h,keyImage:T,values:null!==(t=this.convertStringToBreakscapedString(a))&&void 0!==t?t:[]},this.parseItemLeadHintInstruction(s,l,u,c,g,y)),this.parseExample(f)),{isCaseSensitive:m}));r.push(b)}if(0!==r.length)return r}matrixBitsToAst(e){var t,r;const i=[];if(Array.isArray(e))for(const o of e){const{key:e,cells:a,item:s,lead:l,pageNumber:u,marginNumber:p,hint:c,instruction:g,example:y}=o,f=d.matrix(Object.assign(Object.assign({key:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,cells:null!==(r=this.matrixCellsToAst(a))&&void 0!==r?r:[]},this.parseItemLeadHintInstruction(s,l,u,p,c,g)),this.parseExample(y)));i.push(f)}if(0!==i.length)return i}matrixCellsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{values:e,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,isCaseSensitive:p,example:c}=i,g=d.matrixCell(Object.assign(Object.assign(Object.assign({values:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:[]},this.parseItemLeadHintInstruction(o,n,a,s,l,u)),{isCaseSensitive:p}),this.parseExample(c)));r.push(g)}if(0!==r.length)return r}tableToAst(e){var t,r;let i;if(e){const{columns:o,data:n}=e;i=d.table({columns:null!==(t=this.convertStringToBreakscapedString(o))&&void 0!==t?t:[],rows:n&&null!==(r=n.map((e=>{var t;return null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:[]})))&&void 0!==r?r:[]})}return i}questionBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{question:e,partialAnswer:o,sampleSolution:a,item:s,lead:l,pageNumber:u,marginNumber:p,hint:c,instruction:g,example:y,reasonableNumOfChars:f}=i,m=d.question(Object.assign(Object.assign(Object.assign({question:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,partialAnswer:this.convertStringToBreakscapedString(o),sampleSolution:this.convertStringToBreakscapedString(a)},this.parseItemLeadHintInstruction(s,l,u,p,c,g)),this.parseExample(y)),{reasonableNumOfChars:f}));r.push(m)}if(0!==r.length)return r}botResponseBitsToAst(e,t){var r,i,o;const s=[];if(a.Config.isOfBitType(e,l.BitType.botActionResponse)){if(Array.isArray(t))for(const e of t){const{response:t,reaction:a,feedback:l,item:u,lead:p,pageNumber:c,marginNumber:g,hint:y}=e,f=d.botResponse(Object.assign({response:null!==(r=this.convertStringToBreakscapedString(t))&&void 0!==r?r:n.Breakscape.EMPTY_STRING,reaction:null!==(i=this.convertStringToBreakscapedString(a))&&void 0!==i?i:n.Breakscape.EMPTY_STRING,feedback:null!==(o=this.convertStringToBreakscapedString(l))&&void 0!==o?o:n.Breakscape.EMPTY_STRING},this.parseItemLeadHintInstruction(u,p,c,g,y,n.Breakscape.EMPTY_STRING)));s.push(f)}if(0!==s.length)return s}}technicalTermToAst(e){var t,r;let i;if(e){const{technicalTerm:o,lang:a}=e;i=d.technicalTerm({technicalTerm:null!==(t=this.convertStringToBreakscapedString(o))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,lang:null!==(r=this.convertStringToBreakscapedString(a))&&void 0!==r?r:n.Breakscape.EMPTY_STRING})}return i}servingsToAst(e){var t,r,i;let o;if(e){const{servings:a,unit:s,unitAbbr:l,decimalPlaces:u,disableCalculation:p,hint:c}=e;o=d.servings({servings:a,unit:null!==(t=this.convertStringToBreakscapedString(s))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,unitAbbr:null!==(r=this.convertStringToBreakscapedString(l))&&void 0!==r?r:n.Breakscape.EMPTY_STRING,decimalPlaces:null!=u?u:1,disableCalculation:null!=p&&p,hint:null!==(i=this.convertStringToBreakscapedString(c))&&void 0!==i?i:n.Breakscape.EMPTY_STRING})}return o}ingredientsBitsToAst(e){var t,r;const i=[];if(Array.isArray(e))for(const o of e){const{title:e,checked:a,item:s,quantity:l,unit:u,unitAbbr:p,decimalPlaces:c,disableCalculation:g}=o,y=d.ingredient({title:this.convertStringToBreakscapedString(e),checked:a,item:null!==(t=this.convertStringToBreakscapedString(s))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,quantity:l,unit:null!==(r=this.convertStringToBreakscapedString(u))&&void 0!==r?r:n.Breakscape.EMPTY_STRING,unitAbbr:this.convertStringToBreakscapedString(p),decimalPlaces:null!=c?c:1,disableCalculation:g});i.push(y)}if(0!==i.length)return i}ratingLevelStartEndToAst(e){var t;let r;if(e){const{level:i,label:o}=e;r=d.ratingLevelStartEnd({level:i,label:null!==(t=this.convertJsonTextToBreakscapedString(o))&&void 0!==t?t:n.Breakscape.EMPTY_STRING})}return r}listItemsToAst(e,t,r){const i=[];if(Array.isArray(e))for(const o of e){const{item:e,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,body:p}=o,c=d.cardBit(Object.assign(Object.assign({},this.parseItemLeadHintInstruction(e,n,a,s,l,u)),{body:this.bodyToAst(p,t,r)}));c&&i.push(c)}if(0!==i.length)return i}getResourceType(e){if(e){return p.ResourceTag.fromValue(e.type)}}resourceBitToAst(e,t,r){var i;const o=[];if(t){const e=null!==(i=p.ResourceTag.keyFromValue(t.type))&&void 0!==i?i:p.ResourceTag.unknown;let r;if(t.type===p.ResourceTag.imageResponsive){const e=t,r=this.resourceDataToAst(p.ResourceTag.imagePortrait,e.imagePortrait),i=this.resourceDataToAst(p.ResourceTag.imageLandscape,e.imageLandscape);r&&o.push(r),i&&o.push(i)}else if(t.type===p.ResourceTag.stillImageFilm){const e=t,r=this.resourceDataToAst(p.ResourceTag.image,e.image),i=this.resourceDataToAst(p.ResourceTag.audio,e.audio);r&&o.push(r),i&&o.push(i)}else{if(r=t[e],!r)return;const i=this.resourceDataToAst(t.type,r);i&&o.push(i)}}if(a.Config.isOfBitType(e,[l.BitType.imagesLogoGrave,l.BitType.prototypeImages])&&Array.isArray(r))for(const e of r){const t=this.resourceDataToAst(p.ResourceTag.image,e.image);t&&o.push(t)}return o}resourceDataToAst(e,t){var r,i;let o;if(t){if(!t)return;const n=g.StringUtils.isString(t)?t:void 0,a=t.url||t.src||t.href||t.app||t.body||n,s=this.resourceDataToAst(p.ResourceTag.image,t.posterImage),l=t.thumbnails?t.thumbnails.map((e=>this.resourceDataToAst(p.ResourceTag.image,e))):void 0;o=f.resource({type:e,value:this.convertStringToBreakscapedString(a),format:this.convertStringToBreakscapedString(t.format),src1x:this.convertStringToBreakscapedString(t.src1x),src2x:this.convertStringToBreakscapedString(t.src2x),src3x:this.convertStringToBreakscapedString(t.src3x),src4x:this.convertStringToBreakscapedString(t.src4x),caption:this.convertJsonTextToBreakscapedString(t.caption),width:null!==(r=t.width)&&void 0!==r?r:void 0,height:null!==(i=t.height)&&void 0!==i?i:void 0,alt:this.convertStringToBreakscapedString(t.alt),zoomDisabled:t.zoomDisabled,duration:t.duration,mute:t.mute,autoplay:t.autoplay,allowSubtitles:t.allowSubtitles,showSubtitles:t.showSubtitles,posterImage:s,thumbnails:l,siteName:this.convertStringToBreakscapedString(t.siteName),license:this.convertStringToBreakscapedString(t.license),copyright:this.convertStringToBreakscapedString(t.copyright),showInIndex:t.showInIndex})}return o}bodyToAst(e,t,r){let i,o;const n={};if(t===c.TextFormat.json){let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t=null}i=d.body({bodyJson:t})}else{if(Array.isArray(e)?(o=this.convertJsonTextToBreakscapedString(e,t),r=this.textGenerator.getPlaceholders()):o=e,r)for(const[e,t]of Object.entries(r)){const r=this.bodyBitToAst(t);n[e]=r}if(o){const e=[],t=g.StringUtils.splitPlaceholders(o,Object.keys(n));for(let r=0,i=t.length;r<i;r++){const i=t[r];if(n[i])e.push(n[i]);else{const t=this.bodyTextToAst(i);e.push(t)}}i=d.body({bodyParts:e})}}return i}bodyTextToAst(e){return d.bodyText({text:null!=e?e:n.Breakscape.EMPTY_STRING})}bodyBitToAst(e){switch(e.type){case u.BodyBitType.gap:return this.gapBitToAst(e);case u.BodyBitType.mark:return this.markBitToAst(e);case u.BodyBitType.select:return this.selectBitToAst(e);case u.BodyBitType.highlight:return this.highlightBitToAst(e)}return this.bodyTextToAst(n.Breakscape.EMPTY_STRING)}footerToAst(e,t){const r=this.convertJsonTextToBreakscapedString(e,t);if(r)return d.footerText({text:r})}referenceToAst(e){return Array.isArray(e)&&e.length>0?{reference:void 0,referenceProperty:e}:{reference:e,referenceProperty:void 0}}gapBitToAst(e){var t;const{item:r,lead:i,pageNumber:o,marginNumber:n,hint:a,instruction:s,example:l,isCaseSensitive:u,solutions:p}=e;return d.gap(Object.assign(Object.assign(Object.assign({solutions:null!==(t=this.convertStringToBreakscapedString(p))&&void 0!==t?t:[]},this.parseItemLeadHintInstruction(r,i,o,n,a,s)),this.parseExample(l)),{isCaseSensitive:u}))}markBitToAst(e){var t;const{solution:r,mark:i,item:o,lead:a,pageNumber:s,marginNumber:l,hint:u,instruction:p,example:c}=e;return d.mark(Object.assign(Object.assign({solution:null!==(t=this.convertStringToBreakscapedString(r))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,mark:this.convertStringToBreakscapedString(i)},this.parseItemLeadHintInstruction(o,a,s,l,u,p)),this.parseExample(c)))}selectBitToAst(e){const{options:t,prefix:r,postfix:i,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,example:p}=e,c=this.selectOptionBitsToAst(t);return d.select(Object.assign(Object.assign({options:c,prefix:this.convertStringToBreakscapedString(r),postfix:this.convertStringToBreakscapedString(i)},this.parseItemLeadHintInstruction(o,n,a,s,l,u)),this.parseExample(p)))}highlightBitToAst(e){const{texts:t,prefix:r,postfix:i,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,example:p}=e,c=this.highlightTextBitsToAst(t);return d.highlight(Object.assign(Object.assign({texts:c,prefix:this.convertStringToBreakscapedString(r),postfix:this.convertStringToBreakscapedString(i)},this.parseItemLeadHintInstruction(o,n,a,s,l,u)),this.parseExample(p)))}parseItemLeadHintInstruction(e,t,r,i,o,n){return{item:this.convertJsonTextToBreakscapedString(e),lead:this.convertJsonTextToBreakscapedString(t),pageNumber:this.convertJsonTextToBreakscapedString(r),marginNumber:this.convertJsonTextToBreakscapedString(i),hint:this.convertJsonTextToBreakscapedString(o),instruction:this.convertJsonTextToBreakscapedString(n)}}parseExample(e){if(null==e)return;const t=this.convertJsonTextToBreakscapedString(e);return t?{example:t}:{example:!!e}}convertJsonTextToBreakscapedString(e,t){if(t=null!=t?t:c.TextFormat.bitmarkMinusMinus,null!=e){if(this.textParser.isAst(e)){return this.textGenerator.generateSync(e,t)}if(Array.isArray(e)){const r=[];for(let i=0,o=e.length;i<o;i++){const o=e[i];if(this.textParser.isAst(o)){const e=this.textGenerator.generateSync(o,t);r[i]=e}else r[i]=o}return r}return e}}convertStringToBreakscapedString(e){if(null!=e){if(Array.isArray(e)){const t=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];t[r]=n.Breakscape.breakscape(i)}return t}return n.Breakscape.breakscape(e)}}}},777:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;const i=r(385),o=r(9681),n=r(2220);t.TextParser=class{version(){return(0,n.parse)("",{startRule:"version"})}preprocessAst(e){if(o.StringUtils.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){var r;if(Array.isArray(e))return e;const o=null!==(r=e)&&void 0!==r?r:"";if(!o)return[];const a=Object.assign({},t);a.textFormat||(a.textFormat=i.TextFormat.bitmarkMinusMinus);const s=a.textFormat===i.TextFormat.bitmarkPlusPlus?"bitmarkPlusPlus":"bitmarkMinusMinus";return(0,n.parse)(o,{startRule:s})}}},2220:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const i=r(8321).parse;t.parse=i},6989:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayUtils=void 0;const r=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}};t.ArrayUtils=r},8903:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitUtils=void 0;const i=r(4078);const o=new class{fillStringExample(e,t,r,i){if(e){Array.isArray(e)||(e=[e]);for(const o of e)if(!o.isExample&&(t?(o.isDefaultExample=!0,o.isExample=!0):(o.isDefaultExample=!1,o.example=r),i))break}}fillBooleanExample(e,t,r,o){if(e){Array.isArray(e)||(e=[e]);for(const n of e)if(!n.isExample&&(!o||n.isCorrect)&&(t?(n.isDefaultExample=!0,n.isExample=!0):(n.isDefaultExample=!1,n.example=i.BooleanUtils.toBoolean(r)),o))break}}};t.BitUtils=o},4078:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanUtils=void 0;const r=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}};t.BooleanUtils=r},8025:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NumberUtils=void 0;const r=new class{asNumber(e,t){if(null==e)return null!=t?t:void 0;const r=+e;return Number.isNaN(r)||!isFinite(r)?null!=t?t:void 0:r}isNumeric(e){if(null==e)return!1;const t=+e;return!Number.isNaN(t)&&isFinite(t)}};t.NumberUtils=r},955:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;const o=i(r(7678));const n=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)}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[n,a]of Object.entries(i)){const i=r(a);void 0!==t[n]&&r(t[n])===i&&["array","object"].includes(i)?t[n]=e(t[n],a):t[n]=(0,o.default)(a)}}let n=(0,o.default)(t.shift());for(const e of t){const t=r(e);r(n)===t?"array"===t?n=[...n,...(0,o.default)(e)]:"object"===t?i(n,e):n=e:n=(0,o.default)(e)}return n}(...e)}};t.ObjectUtils=n},9681:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtils=void 0;const r=new class{isString(e){return"string"==typeof e||e instanceof String}string(e){return e?`${e}`:""}trimmedString(e){return this.string(e).trim()}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 n=e[i],a=i===o-1;r.push(n),a||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 n,a=0;for(;a<o;){let i;const o=a+t,s=e.indexOf("\n",a);if(s>-1&&s>a&&s<o){i=s-a,n=e.substr(a,i),a=a+i+1,r.push(n);continue}const l=e.lastIndexOf(" ",o);let u=0;l>-1&&l!=a-1?(i=l-a,i>0&&(u=a+i+1)):(i=t,u=a+t),n=e.substr(a,i),a=u,r.push(n.trim())}return a<i&&(n=e.substr(a),r.push(n)),r}};t.StringUtils=r},201:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtils=void 0;const r=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}};t.UrlUtils=r},6936:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initEnv=t.env=void 0;const i=r(6278),o=r(9561),n=r(2287),a=r(5659);const s=new class{constructor(){Object.defineProperty(this,"userAgentInfo",{value:(0,a.parseUserAgent)(),enumerable:!1}),this.bootTimestamp=Date.now(),this.app="",this.appVersion=n.EMPTY_VERSION,this.environment=this.getEnvironment(),this.environmentVersion=this.getEnvironmentVersion(),this.isBrowser=this.getIsBrowser(),this.isNode=this.environment===i.Environment.node,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?i.Environment.node:i.Environment.unknown}getEnvironmentVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.browserVersion):"undefined"!=typeof process?this.parseMMBVersion(process.version):n.EMPTY_VERSION}getOs(){return this.userAgentInfo?this.userAgentInfo.os:("undefined"!=typeof process&&void 0!==process.versions&&process.versions.node,o.Os.unknown)}getOsVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.osVersion):"undefined"!=typeof process?this.parseMMBVersion(""):n.EMPTY_VERSION}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 n.EMPTY_VERSION;e.startsWith("v")&&(e=e.substring(1));const t=e.split(".",1e3);let r="",i="",o="",a="";for(let e=0,n=t.length;e<n;e++){const n=t[e];0===e?r=n:1===e?i=n:2===e?a=n:3===e&&(o=n)}return{full:e,major:r,minor:i,patch:a,build:o}}};t.env=s;const l=s.init.bind(s);t.initEnv=l},6278:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;const i=(0,r(4718).superenum)({unknown:"",node:"node",chrome:"chrome",safari:"safari",firefox:"firefox",edge:"edge",ie:"ie"});t.Environment=i},9561:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Os=void 0;const i=(0,r(4718).superenum)({unknown:"",macos:"macos",windows:"windows",linux:"linux",android:"android",ios:"ios"});t.Os=i},2287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_VERSION=void 0;t.EMPTY_VERSION={full:"",major:"",minor:"",patch:"",build:""}},5659:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUserAgent=void 0;const i=r(6278),o=r(9561);t.parseUserAgent=function(){if("undefined"==typeof window||!window.navigator||!window.navigator.userAgent)return;const e={browser:i.Environment.unknown,os:o.Os.unknown},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 n=!1;for(let e=0;e<=9;e++)if(o.startsWith(`${e}`)){n=!0;break}n?r.versions[i]=o.replace("_","."):r.keys.add(o),i=o}return r}(window.navigator.userAgent),r=t.keys.has("firefox"),n=t.keys.has("chrome"),a=t.keys.has("chromium"),s=t.keys.has("safari"),l=n,u=r,p=t.keys.has("macintosh");return s&&!n&&!a?(e.browser=i.Environment.safari,e.browserVersion=t.versions.version):l?(e.browser=i.Environment.chrome,e.browserVersion=t.versions.chrome):u&&(e.browser=i.Environment.firefox,e.browserVersion=t.versions.firefox),p&&(e.os=o.Os.macos,e.osVersion=t.versions.x),e}},5005:(e,t,r)=>{const{VOID:i,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:u,SET:p,ERROR:c,BIGINT:g}=r(1731),y="object"==typeof self?self:globalThis;t.deserialize=e=>((e,t)=>{const r=(t,r)=>(e.set(r,t),t),d=f=>{if(e.has(f))return e.get(f);const[m,h]=t[f];switch(m){case o:case i:return r(h,f);case n:{const e=r([],f);for(const t of h)e.push(d(t));return e}case a:{const e=r({},f);for(const[t,r]of h)e[d(t)]=d(r);return e}case s:return r(new Date(h),f);case l:{const{source:e,flags:t}=h;return r(new RegExp(e,t),f)}case u:{const e=r(new Map,f);for(const[t,r]of h)e.set(d(t),d(r));return e}case p:{const e=r(new Set,f);for(const t of h)e.add(d(t));return e}case c:{const{name:e,message:t}=h;return r(new y[e](t),f)}case g:return r(BigInt(h),f);case"BigInt":return r(Object(BigInt(h)),f)}return r(new y[m](h),f)};return d})(new Map,e)(0)},7678:(e,t,r)=>{const{deserialize:i}=r(5005),{serialize:o}=r(5416);Object.defineProperty(t,"__esModule",{value:!0}).default="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?i(o(e,t)):structuredClone(e):(e,t)=>i(o(e,t)),t.deserialize=i,t.serialize=o},5416:(e,t,r)=>{const{VOID:i,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:u,SET:p,ERROR:c,BIGINT:g}=r(1731),y="",{toString:d}={},{keys:f}=Object,m=e=>{const t=typeof e;if("object"!==t||!e)return[o,t];const r=d.call(e).slice(8,-1);switch(r){case"Array":return[n,y];case"Object":return[a,y];case"Date":return[s,y];case"RegExp":return[l,y];case"Map":return[u,y];case"Set":return[p,y]}return r.includes("Array")?[n,r]:r.includes("Error")?[c,r]:[a,r]},h=([e,t])=>e===o&&("function"===t||"symbol"===t);t.serialize=(e,{json:t,lossy:r}={})=>{const c=[];return((e,t,r,c)=>{const y=(e,t)=>{const i=c.push(e)-1;return r.set(t,i),i},d=c=>{if(r.has(c))return r.get(c);let[T,b]=m(c);switch(T){case o:{let t=c;switch(b){case"bigint":T=g,t=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+b);t=null;break;case"undefined":return y([i],c)}return y([T,t],c)}case n:{if(b)return y([b,[...c]],c);const e=[],t=y([T,e],c);for(const t of c)e.push(d(t));return t}case a:{if(b)switch(b){case"BigInt":return y([b,c.toString()],c);case"Boolean":case"Number":case"String":return y([b,c.valueOf()],c)}if(t&&"toJSON"in c)return d(c.toJSON());const r=[],i=y([T,r],c);for(const t of f(c))!e&&h(m(c[t]))||r.push([d(t),d(c[t])]);return i}case s:return y([T,c.toISOString()],c);case l:{const{source:e,flags:t}=c;return y([T,{source:e,flags:t}],c)}case u:{const t=[],r=y([T,t],c);for(const[r,i]of c)(e||!h(m(r))&&!h(m(i)))&&t.push([d(r),d(i)]);return r}case p:{const t=[],r=y([T,t],c);for(const r of c)!e&&h(m(r))||t.push(d(r));return r}}const{message:v}=c;return y([T,{name:b,message:v}],c)};return d})(!(t||r),!!t,new Map,c)(e),c}},1731:(e,t)=>{t.VOID=-1;t.PRIMITIVE=0;t.ARRAY=1;t.OBJECT=2;t.DATE=3;t.REGEXP=4;t.MAP=5;t.SET=6;t.ERROR=7;t.BIGINT=8}},t={};function r(i){var o=t[i];if(void 0!==o)return o.exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,r),n.exports}r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.StreamWriter=e.FileWriter=e.BitmarkFileGenerator=e.JsonFileGenerator=e.InfoFormat=e.InfoType=e.CardSetVersion=e.BitmarkVersion=e.BitmarkParserType=e.NodeType=e.ResourceTag=e.TextFormat=e.BitType=e.StringWriter=e.BitmarkStringGenerator=e.BitmarkGenerator=e.BitmarkParser=e.JsonStringGenerator=e.JsonGenerator=e.JsonParser=e.Ast=e.ResourceBuilder=e.Builder=e.Output=e.BitmarkParserGenerator=void 0;const t=r(1412);var o=r(1791);Object.defineProperty(e,"BitmarkParserGenerator",{enumerable:!0,get:function(){return o.BitmarkParserGenerator}}),Object.defineProperty(e,"Output",{enumerable:!0,get:function(){return o.Output}});var n=r(5809);Object.defineProperty(e,"Builder",{enumerable:!0,get:function(){return n.Builder}});var a=r(5533);Object.defineProperty(e,"ResourceBuilder",{enumerable:!0,get:function(){return a.ResourceBuilder}});var s=r(5126);Object.defineProperty(e,"Ast",{enumerable:!0,get:function(){return s.Ast}});var l=r(5663);Object.defineProperty(e,"JsonParser",{enumerable:!0,get:function(){return l.JsonParser}});var u=r(2497);Object.defineProperty(e,"JsonGenerator",{enumerable:!0,get:function(){return u.JsonGenerator}});var p=r(98);Object.defineProperty(e,"JsonStringGenerator",{enumerable:!0,get:function(){return p.JsonStringGenerator}});var c=r(5633);Object.defineProperty(e,"BitmarkParser",{enumerable:!0,get:function(){return c.BitmarkParser}});var g=r(5087);Object.defineProperty(e,"BitmarkGenerator",{enumerable:!0,get:function(){return g.BitmarkGenerator}});var y=r(3968);Object.defineProperty(e,"BitmarkStringGenerator",{enumerable:!0,get:function(){return y.BitmarkStringGenerator}});var d=r(6772);Object.defineProperty(e,"StringWriter",{enumerable:!0,get:function(){return d.StringWriter}});var f=r(5854);Object.defineProperty(e,"BitType",{enumerable:!0,get:function(){return f.BitType}});var m=r(385);Object.defineProperty(e,"TextFormat",{enumerable:!0,get:function(){return m.TextFormat}});var h=r(6149);Object.defineProperty(e,"ResourceTag",{enumerable:!0,get:function(){return h.ResourceTag}});var T=r(126);Object.defineProperty(e,"NodeType",{enumerable:!0,get:function(){return T.NodeType}});var b=r(8588);Object.defineProperty(e,"BitmarkParserType",{enumerable:!0,get:function(){return b.BitmarkParserType}});var v=r(3811);Object.defineProperty(e,"BitmarkVersion",{enumerable:!0,get:function(){return v.BitmarkVersion}});var B=r(1163);Object.defineProperty(e,"CardSetVersion",{enumerable:!0,get:function(){return B.CardSetVersion}});var C=r(486);Object.defineProperty(e,"InfoType",{enumerable:!0,get:function(){return C.InfoType}});var P=r(3069);Object.defineProperty(e,"InfoFormat",{enumerable:!0,get:function(){return P.InfoFormat}});(0,t.init)()})(),i})()));
|
|
1
|
+
!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={4718:(e,t,r)=>{function i(e,t){var r;const i=Object.freeze,o=Object.defineProperty,n=Object.assign,a={enumerable:!1},s=new Map,l=new Map,u=new Map,p=new Map,c=new Map,g=(null!==(r=null==t?void 0:t.iterationKeys)&&void 0!==r?r:Object.keys(e)).map((e=>`${e}`));for(const[t,r]of Object.entries(e))s.set(t,r),u.set(t.toLowerCase(),r);for(const[e,t]of s){const r="string"==typeof t?t.toLowerCase():t;l.set(t,e),p.set(r,e)}const y=g.map((e=>s.get(e))),d=g.map((e=>[e,s.get(e)]));return(t=>{let r=e;function f(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?s.get(p.get(e.toLowerCase())):!e||l.has(e)?e:void 0}Object.isExtensible(e)||(r=n({},e)),o(r,"fromKey",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?u.get(e.toLowerCase()):s.get(`${e}`)}},a)),o(r,"fromValue",n({value:f},a)),o(r,"keyFromValue",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?p.get(e.toLowerCase()):l.get(e)}},a)),o(r,"setMetadata",n({value:function(e,t,r){const i=f(e);i&&c.set(i,t)}},a)),o(r,"getMetadata",n({value:function(e,t){return c.get(e)}},a)),o(r,Symbol.iterator,n({value:function(){let e=0;return{next:()=>e<g.length?{value:s.get(`${g[e++]}`),done:!1}:{done:!0}}}},a)),o(r,"values",n({value:()=>y},a)),o(r,"keys",n({value:()=>g},a)),o(r,"entries",n({value:()=>d},a));let m=r;return(null==t?void 0:t.noFreeze)||(m=i(r),i(g),i(y),i(d)),m})(t)}r.r(t),r.d(t,{superenum:()=>o});const o=i;o.fromObject=i,o.fromArray=function(e,t){Array.isArray(e)||(e=[]);const r=e.reduce(((e,t)=>(e[`${t}`]=t,e)),{});return(!t||t&&!t.iterationKeys)&&((t=Object.assign({},t)).iterationKeys=e),i(r,t)}},1791:function(e,t,r){var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,o)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=(this&&this.__importStar,this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))});this&&this.__importDefault;Object.defineProperty(t,"__esModule",{value:!0}),t.Output=t.BitmarkParserGenerator=void 0;const a=r(4718),s=r(5126),l=r(3968),u=r(7984),p=r(8588),c=r(5633),g=r(5663),y=r(6936),d=r(3881),f=r(486),m=r(3069),h=r(2028),T=r(385),b=r(431),v=r(777),B=(0,a.superenum)({bitmark:"bitmark",json:"json",ast:"ast"});t.Output=B;t.BitmarkParserGenerator=class{constructor(){this.ast=new s.Ast,this.jsonParser=new g.JsonParser,this.bitmarkParser=new c.BitmarkParser,this.textParser=new v.TextParser,this.textGenerator=new b.TextGenerator,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 y.env.appVersion.full}info(e){const t=Object.assign({},e),r=new d.InfoBuilder;let i;const o=!t.outputFormat||t.outputFormat===m.InfoFormat.text,n=t.outputFormat===m.InfoFormat.json,a=t.type===f.InfoType.all,s=t.type===f.InfoType.deprecated,l=a||!s,u=a||s;if(t.type===f.InfoType.bit){const e=r.getSupportedBitConfigs().filter((e=>{if(!t.bit)return!0;return h.Config.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:u}).filter((e=>{if(!t.bit)return!0;const r=h.Config.getBitType(t.bit);return e.name===r||void 0}));i=o?this.supportedBitsAsString(e):e}if(n){const e=!0===t.prettify?2:t.prettify||void 0;i=JSON.stringify(i,null,e)}return i}convert(e,t){return n(this,void 0,void 0,(function*(){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),a=i.outputFormat,s=a===B.bitmark,c=a===B.json,g=a===B.ast,d=p.BitmarkParserType.peggy;let f=e;if(y.env.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");y.env.isNode&&fs.existsSync(f)&&(f=fs.readFileSync(f,{encoding:"utf8"}));let m=this.ast.preprocessAst(f);const h=!!m;h||(m=this.jsonParser.toAst(f));const T=!!(null==m?void 0:m.bits),b=e=>n(this,void 0,void 0,(function*(){yield v(e),yield P(r)})),v=e=>n(this,void 0,void 0,(function*(){r=this.bitmarkParser.toAst(e,{parserType:d})})),C=e=>n(this,void 0,void 0,(function*(){if(d===p.BitmarkParserType.peggy)if(m=this.bitmarkParser.toAst(e,{parserType:d}),i.outputFile){const e=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield e.generate(m)}else{const e=new u.JsonObjectGenerator(i),t=yield e.generate(m);r=this.jsonStringifyPrettify(t,o)}})),P=e=>n(this,void 0,void 0,(function*(){if(i.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new l.BitmarkStringGenerator(i);r=yield t.generate(e)}})),k=e=>n(this,void 0,void 0,(function*(){r=this.jsonStringifyPrettify(e,o)})),x=e=>n(this,void 0,void 0,(function*(){if(i.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new u.JsonObjectGenerator(i),n=yield t.generate(e);r=this.jsonStringifyPrettify(n,o)}})),S=e=>n(this,void 0,void 0,(function*(){if(i.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new l.BitmarkStringGenerator(i);r=yield t.generate(e)}})),K=e=>n(this,void 0,void 0,(function*(){r=this.jsonStringifyPrettify(e,o)})),w=e=>n(this,void 0,void 0,(function*(){yield x(e)}));return!T&&!h?s?yield b(f):g?yield v(f):yield C(f):h?g?yield k(m):c?yield x(m):yield P(m):c?yield w(m):g?yield K(m):yield S(m),r}))}upgrade(e,t){return n(this,void 0,void 0,(function*(){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),a=i.bitmarkParserType;let s=e;if(y.env.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");y.env.isNode&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));let p=this.jsonParser.toAst(s);const c=e=>n(this,void 0,void 0,(function*(){const t=this.bitmarkParser.toAst(e,{parserType:a});if(i.outputFile){const e=new BitmarkFileGenerator_1.BitmarkFileGenerator(i.outputFile,i);yield e.generate(t)}else{const e=new l.BitmarkStringGenerator(i);r=yield e.generate(t)}})),g=e=>n(this,void 0,void 0,(function*(){if(i.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(i.outputFile,i);yield t.generate(e)}else{const t=new u.JsonObjectGenerator(i),n=yield t.generate(e);r=this.jsonStringifyPrettify(n,o)}}));return!!!(null==p?void 0:p.bits)?yield c(s):yield g(p),r}))}createAst(e){let t,r=e;y.env.isNode&&fs.existsSync(r)&&(r=fs.readFileSync(r,{encoding:"utf8"}));let i=this.ast.preprocessAst(r);const o=!!i;o||(i=this.jsonParser.toAst(r));return t=!!!(null==i?void 0:i.bits)&&!o?this.bitmarkParser.toAst(r):i,t}convertText(e,t){return n(this,void 0,void 0,(function*(){var r;let i,o;const n=Object.assign({},t),a=Object.assign({},n.fileOptions),s=Object.assign({},n.jsonOptions),l=null!==(r=n.textFormat)&&void 0!==r?r:T.TextFormat.bitmarkMinusMinus;let u=e;if(y.env.isBrowser&&n.outputFile)throw new Error("Cannot write to file in browser environment");y.env.isNode&&fs.existsSync(u)&&(u=fs.readFileSync(u,{encoding:"utf8"}));const p=this.textParser.preprocessAst(u),c=!!p;if(o=c?yield this.textGenerator.generate(p,l):this.textParser.toAst(u,{textFormat:l}),n.outputFile){const e=n.outputFile.toString();let t=o;c||(t=this.jsonStringifyPrettify(o,s,!0));const r=a.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,t,{flag:r})}else i=c?o:this.jsonStringifyPrettify(o,s);return i}))}breakscapeText(e,t){if(!e)return e;const r=Object.assign({},t),i=Object.assign({},r.fileOptions);let o=e;if(y.env.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");y.env.isNode&&fs.existsSync(o)&&(o=fs.readFileSync(o,{encoding:"utf8"}));const n=Breakscape_1.Breakscape.breakscape(o,{});if(!r.outputFile)return n;{const e=r.outputFile.toString(),t=i.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,n,{flag:t})}}unbreakscapeText(e,t){if(!e)return e;const r=Object.assign({},t),i=Object.assign({},r.fileOptions);let o=e;if(y.env.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");y.env.isNode&&fs.existsSync(o)&&(o=fs.readFileSync(o,{encoding:"utf8"}));const n=Breakscape_1.Breakscape.unbreakscape(o);if(!r.outputFile)return n;{const e=r.outputFile.toString(),t=i.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,n,{flag:t})}}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}}},5126:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ast=void 0;const i=r(1412),o=r(126),n=r(9681);t.Ast=class{constructor(){(0,i.init)()}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=o.NodeType.bitmarkAst){this.walkRecursive(e,[{index:0,key:t,value:e}],{enter:(e,t)=>{if(console.log("Enter: "+this.getRouteKey(t)),t[t.length-1].key===o.NodeType.bodyJson)return!1},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(n.StringUtils.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:n,exit:a,leaf:s}=r,l=t[t.length-1].key,u=!this.isValue(e),p=t[t.length-1];if(u){if(o){if(!1===o(p,t,i))return}}else s&&s(p,t,i);if(u){const o=this.isArray(e),a=Object.keys(e);for(let s=0,u=a.length;s<u;s++){const c=a[s],g=s===u-1,y=e,d=y[c];if(null!=d){const e={key:this.getAstKey(c,l,o),index:s,value:d},u=t.slice();if(u.push(e),this.walkRecursive(d,u,r,i),!g){const r=a[s+1],u=y[r],c={key:this.getAstKey(r,l,o),index:s+1,value:u};if(n){if(!1===n(p,e,c,t,i))break}}}}}u&&a&&a(p,t,i)}getAstKey(e,t,r){let i=e;return r&&t&&(i=`${t}Value`),o.NodeType.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)}}},4470:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseBuilder=void 0;const i=r(7735),o=r(2028),n=r(9727),a=r(6989),s=r(4078),l=r(8025),u=r(9681);t.BaseBuilder=class{toExample(e,t){return null!=t?(!0===t&&(t=i.Breakscape.breakscape("true")),!1===t&&(t=i.Breakscape.breakscape("false")),{isDefaultExample:!1,isExample:!0,example:t}):e?{isDefaultExample:!0,isExample:!0}:{isDefaultExample:!1,isExample:!1}}toExampleBoolean(e,t){const r=null!=t&&!s.BooleanUtils.isBooleanString(t);return null==t||r?e||r?{isDefaultExample:!0,isExample:!0}:{isDefaultExample:!1,isExample:!1}:{isDefaultExample:!1,isExample:!0,example:s.BooleanUtils.toBoolean(t)}}toAstProperty(e,t){if(null==t)return;const r=o.Config.getRawPropertiesConfig()[e],i=e=>{if(null!=e){switch(r.format){case n.PropertyFormat.string:return null!=l.NumberUtils.asNumber(e)&&(e=`${e}`),u.StringUtils.isString(e)?u.StringUtils.string(e):void 0;case n.PropertyFormat.trimmedString:return null!=l.NumberUtils.asNumber(e)&&(e=`${e}`),u.StringUtils.isString(e)?u.StringUtils.trimmedString(e):void 0;case n.PropertyFormat.number:return l.NumberUtils.asNumber(e);case n.PropertyFormat.boolean:return s.BooleanUtils.toBoolean(e,!0);case n.PropertyFormat.invertedBoolean:return!s.BooleanUtils.toBoolean(e,!0)}return e}};if(Array.isArray(t)){const e=t;for(let t=0,r=e.length;t<r;t++)e[t]=i(e[t])}else t=i(t);return a.ArrayUtils.asArray(t)}}},5809:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;const i=r(7735),o=r(2028),n=r(9888),a=r(5854),s=r(4410),l=r(6149),u=r(385),p=r(6989),c=r(8903),g=r(8025),y=r(955),d=r(6936),f=r(4470),m=r(4564);class h extends f.BaseBuilder{bitmark(e){const{bits:t,errors:r}=e,i={bits:t,errors:r};return y.ObjectUtils.removeUnwantedProperties(i),i}bit(e){var t;const{bitType:r,textFormat:i,resourceType:c,isCommented:d,id:f,internalComment:h,externalId:T,spaceId:b,padletId:v,jupyterId:B,jupyterExecutionCount:C,isPublic:P,aiGenerated:k,analyticsTag:x,disableFeedback:S,releaseVersion:K,releaseKind:w,releaseDate:A,ageRange:_,lang:I,language:L,publisher:O,publisherName:E,theme:R,computerLanguage:N,target:V,tag:F,reductionTag:j,icon:G,iconTag:D,colorTag:M,flashcardSet:U,subtype:J,bookAlias:$,coverImage:z,coverColor:q,publications:H,author:W,subject:Y,date:X,location:Z,kind:Q,hasMarkAsDone:ee,action:te,blockId:re,pageNo:ie,x:oe,y:ne,width:ae,height:se,index:le,classification:ue,availableClassifications:pe,tableFixedHeader:ce,tableSearch:ge,tableSort:ye,tablePagination:de,tablePaginationLimit:fe,tableHeight:me,tableWhitespaceNoWrap:he,tableAutoWidth:Te,tableResizableColumns:be,quizCountItems:ve,quizStrikethroughSolutions:Be,codeLineNumbers:Ce,codeMinimap:Pe,thumbImage:ke,scormSource:xe,posterImage:Se,focusX:Ke,focusY:we,pointerLeft:Ae,pointerTop:_e,backgroundWallpaper:Ie,hasBookNavigation:Le,duration:Oe,referenceProperty:Ee,deeplink:Re,externalLink:Ne,externalLinkText:Ve,videoCallLink:Fe,vendorUrl:je,search:Ge,bot:De,list:Me,textReference:Ue,isTracked:Je,isInfoOnly:$e,labelTrue:ze,labelFalse:qe,content2Buy:He,mailingList:We,buttonCaption:Ye,caption:Xe,book:Ze,quotedPerson:Qe,partialAnswer:et,reasonableNumOfChars:tt,resolved:rt,resolvedDate:it,resolvedBy:ot,maxCreatedBits:nt,maxDisplayLevel:at,productId:st,product:lt,productList:ut,productVideo:pt,productVideoList:ct,productFolder:gt,technicalTerm:yt,servings:dt,ratingLevelStart:ft,ratingLevelEnd:mt,ratingLevelSelected:ht,title:Tt,subtitle:bt,level:vt,toc:Bt,progress:Ct,anchor:Pt,reference:kt,referenceEnd:xt,isCaseSensitive:St,item:Kt,lead:wt,pageNumber:At,marginNumber:_t,hint:It,instruction:Lt,isDefaultExample:Ot,example:Et,imageSource:Rt,person:Nt,markConfig:Vt,extraProperties:Ft,resources:jt,body:Gt,sampleSolution:Dt,footer:Mt,markup:Ut,parser:Jt}=e,$t=o.Config.getBitConfig(r),zt=p.ArrayUtils.asArray(jt),qt=this.cardNode(e),Ht=o.Config.isOfBitType(r,a.BitType.essay)?this.toAstProperty(n.PropertyConfigKey.reasonableNumOfChars,tt):void 0,Wt=Object.assign(Object.assign({bitType:r,textFormat:null!==(t=u.TextFormat.fromValue(i))&&void 0!==t?t:$t.textFormatDefault,resourceType:l.ResourceTag.fromValue(c),isCommented:d,id:this.toAstProperty(n.PropertyConfigKey.id,f),internalComment:this.toAstProperty(n.PropertyConfigKey.internalComment,h),externalId:this.toAstProperty(n.PropertyConfigKey.externalId,T),spaceId:this.toAstProperty(n.PropertyConfigKey.spaceId,b),padletId:this.toAstProperty(n.PropertyConfigKey.padletId,v),jupyterId:this.toAstProperty(n.PropertyConfigKey.jupyterId,B),jupyterExecutionCount:this.toAstProperty(n.PropertyConfigKey.jupyterExecutionCount,C),isPublic:this.toAstProperty(n.PropertyConfigKey.isPublic,P),aiGenerated:this.toAstProperty(n.PropertyConfigKey.aiGenerated,k),analyticsTag:this.toAstProperty(n.PropertyConfigKey.analyticsTag,x),disableFeedback:this.toAstProperty(n.PropertyConfigKey.disableFeedback,S),releaseVersion:this.toAstProperty(n.PropertyConfigKey.releaseVersion,K),releaseKind:this.toAstProperty(n.PropertyConfigKey.releaseKind,w),releaseDate:this.toAstProperty(n.PropertyConfigKey.releaseDate,A),book:Ze,ageRange:this.toAstProperty(n.PropertyConfigKey.ageRange,_),lang:this.toAstProperty(n.PropertyConfigKey.lang,I),language:this.toAstProperty(n.PropertyConfigKey.language,L),publisher:this.toAstProperty(n.PropertyConfigKey.publisher,O),publisherName:this.toAstProperty(n.PropertyConfigKey.publisherName,E),theme:this.toAstProperty(n.PropertyConfigKey.theme,R),computerLanguage:this.toAstProperty(n.PropertyConfigKey.computerLanguage,N),target:this.toAstProperty(n.PropertyConfigKey.target,V),tag:this.toAstProperty(n.PropertyConfigKey.tag,F),reductionTag:this.toAstProperty(n.PropertyConfigKey.reductionTag,j),icon:this.toAstProperty(n.PropertyConfigKey.icon,G),iconTag:this.toAstProperty(n.PropertyConfigKey.iconTag,D),colorTag:this.toAstProperty(n.PropertyConfigKey.colorTag,M),flashcardSet:this.toAstProperty(n.PropertyConfigKey.flashcardSet,U),subtype:this.toAstProperty(n.PropertyConfigKey.subtype,J),bookAlias:this.toAstProperty(n.PropertyConfigKey.bookAlias,$),coverImage:this.toAstProperty(n.PropertyConfigKey.coverImage,z),coverColor:this.toAstProperty(n.PropertyConfigKey.coverColor,q),publications:this.toAstProperty(n.PropertyConfigKey.publications,H),author:this.toAstProperty(n.PropertyConfigKey.author,W),subject:this.toAstProperty(n.PropertyConfigKey.subject,Y),date:this.toAstProperty(n.PropertyConfigKey.date,X),location:this.toAstProperty(n.PropertyConfigKey.location,Z),kind:this.toAstProperty(n.PropertyConfigKey.kind,Q),hasMarkAsDone:this.toAstProperty(n.PropertyConfigKey.hasMarkAsDone,ee),action:this.toAstProperty(n.PropertyConfigKey.action,te),blockId:this.toAstProperty(n.PropertyConfigKey.blockId,re),pageNo:this.toAstProperty(n.PropertyConfigKey.pageNo,ie),x:this.toAstProperty(n.PropertyConfigKey.x,oe),y:this.toAstProperty(n.PropertyConfigKey.y,ne),width:this.toAstProperty(n.PropertyConfigKey.width,ae),height:this.toAstProperty(n.PropertyConfigKey.height,se),index:this.toAstProperty(n.PropertyConfigKey.index,le),classification:this.toAstProperty(n.PropertyConfigKey.classification,ue),availableClassifications:this.toAstProperty(n.PropertyConfigKey.availableClassifications,pe),tableFixedHeader:this.toAstProperty(n.PropertyConfigKey.tableFixedHeader,ce),tableSearch:this.toAstProperty(n.PropertyConfigKey.tableSearch,ge),tableSort:this.toAstProperty(n.PropertyConfigKey.tableSort,ye),tablePagination:this.toAstProperty(n.PropertyConfigKey.tablePagination,de),tablePaginationLimit:this.toAstProperty(n.PropertyConfigKey.tablePaginationLimit,fe),tableHeight:this.toAstProperty(n.PropertyConfigKey.tableHeight,me),tableWhitespaceNoWrap:this.toAstProperty(n.PropertyConfigKey.tableWhitespaceNoWrap,he),tableAutoWidth:this.toAstProperty(n.PropertyConfigKey.tableAutoWidth,Te),tableResizableColumns:this.toAstProperty(n.PropertyConfigKey.tableResizableColumns,be),quizCountItems:this.toAstProperty(n.PropertyConfigKey.quizCountItems,ve),quizStrikethroughSolutions:this.toAstProperty(n.PropertyConfigKey.quizStrikethroughSolutions,Be),codeLineNumbers:this.toAstProperty(n.PropertyConfigKey.codeLineNumbers,Ce),codeMinimap:this.toAstProperty(n.PropertyConfigKey.codeMinimap,Pe),thumbImage:this.toAstProperty(n.PropertyConfigKey.thumbImage,ke),scormSource:this.toAstProperty(n.PropertyConfigKey.scormSource,xe),posterImage:this.toAstProperty(n.PropertyConfigKey.posterImage,Se),focusX:this.toAstProperty(n.PropertyConfigKey.focusX,Ke),focusY:this.toAstProperty(n.PropertyConfigKey.focusY,we),pointerLeft:this.toAstProperty(n.PropertyConfigKey.pointerLeft,Ae),pointerTop:this.toAstProperty(n.PropertyConfigKey.pointerTop,_e),backgroundWallpaper:this.toAstProperty(n.PropertyConfigKey.backgroundWallpaper,Ie),hasBookNavigation:this.toAstProperty(n.PropertyConfigKey.hasBookNavigation,Le),deeplink:this.toAstProperty(n.PropertyConfigKey.deeplink,Re),externalLink:this.toAstProperty(n.PropertyConfigKey.externalLink,Ne),externalLinkText:this.toAstProperty(n.PropertyConfigKey.externalLinkText,Ve),videoCallLink:this.toAstProperty(n.PropertyConfigKey.videoCallLink,Fe),vendorUrl:this.toAstProperty(n.PropertyConfigKey.vendorUrl,je),search:this.toAstProperty(n.PropertyConfigKey.search,Ge),bot:this.toAstProperty(n.PropertyConfigKey.bot,De),duration:this.toAstProperty(n.PropertyConfigKey.duration,Oe),referenceProperty:this.toAstProperty(n.PropertyConfigKey.property_reference,Ee),list:this.toAstProperty(n.PropertyConfigKey.list,Me),textReference:this.toAstProperty(n.PropertyConfigKey.textReference,Ue),isTracked:this.toAstProperty(n.PropertyConfigKey.isTracked,Je),isInfoOnly:this.toAstProperty(n.PropertyConfigKey.isInfoOnly,$e),labelTrue:this.toAstProperty(n.PropertyConfigKey.labelTrue,ze),labelFalse:this.toAstProperty(n.PropertyConfigKey.labelFalse,qe),content2Buy:this.toAstProperty(n.PropertyConfigKey.content2Buy,He),mailingList:this.toAstProperty(n.PropertyConfigKey.mailingList,We),buttonCaption:this.toAstProperty(n.PropertyConfigKey.buttonCaption,Ye),caption:Xe,quotedPerson:this.toAstProperty(n.PropertyConfigKey.quotedPerson,Qe),partialAnswer:this.toAstProperty(n.PropertyConfigKey.partialAnswer,et),reasonableNumOfChars:Ht,resolved:this.toAstProperty(n.PropertyConfigKey.resolved,rt),resolvedDate:this.toAstProperty(n.PropertyConfigKey.resolvedDate,it),resolvedBy:this.toAstProperty(n.PropertyConfigKey.resolvedBy,ot),maxCreatedBits:this.toAstProperty(n.PropertyConfigKey.maxCreatedBits,nt),maxDisplayLevel:this.toAstProperty(n.PropertyConfigKey.maxDisplayLevel,at),productId:this.toAstProperty(n.PropertyConfigKey.productId,st),product:this.toAstProperty(n.PropertyConfigKey.product,lt),productList:this.toAstProperty(n.PropertyConfigKey.productList,ut),productVideo:this.toAstProperty(n.PropertyConfigKey.productVideo,pt),productVideoList:this.toAstProperty(n.PropertyConfigKey.productVideoList,ct),productFolder:this.toAstProperty(n.PropertyConfigKey.productFolder,gt),technicalTerm:yt,servings:dt,ratingLevelStart:ft,ratingLevelEnd:mt,ratingLevelSelected:this.toAstProperty(n.PropertyConfigKey.ratingLevelSelected,ht),title:Tt,subtitle:bt,level:g.NumberUtils.asNumber(vt),toc:this.toAstProperty(n.PropertyConfigKey.toc,Bt),progress:this.toAstProperty(n.PropertyConfigKey.progress,Ct),anchor:Pt,reference:kt,referenceEnd:xt,markConfig:Vt,itemLead:this.itemLead(Kt,wt,At,_t),hint:It,instruction:Lt},this.toExample(Ot,Et)),{imageSource:Rt,person:Nt,resources:zt,body:Gt,sampleSolution:p.ArrayUtils.asSingle(Dt),cardNode:qt,footer:Mt,markup:Ut,parser:Jt,extraProperties:this.parseExtraProperties(Ft)});return o.Config.isOfBitType(r,a.BitType.interview)&&this.pushDownTree(void 0,void 0,qt,"questions",n.PropertyConfigKey.reasonableNumOfChars,tt),this.pushDownTree(Gt,[s.BodyBitType.gap],void 0,void 0,n.PropertyConfigKey.isCaseSensitive,St),this.pushDownTree(void 0,void 0,qt,"pairs",n.PropertyConfigKey.isCaseSensitive,St),this.pushDownTree(void 0,void 0,qt,["matrix","cells"],n.PropertyConfigKey.isCaseSensitive,St),this.pushExampleDownTree(Gt,qt,Ot,Et),this.setDefaultBitValues(Wt),this.setIsExampleFlags(Wt),this.addVersionToParserInfo(Wt),y.ObjectUtils.removeUnwantedProperties(Wt,{ignoreAllFalse:!0,ignoreEmptyString:["example"]}),m.NodeValidator.validateBit(Wt)}choice(e){const{text:t,isCorrect:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u,example:p}=e,c=Object.assign({text:t,isCorrect:!!r,itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l},this.toExampleBoolean(u,p));return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}response(e){const{text:t,isCorrect:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u,example:p}=e,c=Object.assign({text:t,isCorrect:!!r,itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l},this.toExampleBoolean(u,p));return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}botResponse(e){const{response:t,reaction:r,feedback:i,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l}=e,u={response:t,reaction:r,feedback:i,itemLead:this.itemLead(o,n,a,s),hint:l};return y.ObjectUtils.removeUnwantedProperties(u,{ignoreEmptyString:["response","reaction","feedback"]}),u}quiz(e){const{choices:t,responses:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u,example:p}=e;this.pushExampleDownTreeBoolean(u,p,!0,t),this.pushExampleDownTreeBoolean(u,p,!1,r);const c={itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l,isExample:u||null!=p,choices:t,responses:r};return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}heading(e){var t;const{forKeys:r,forValues:o}=e;if(null==r)return;return{forKeys:r||i.Breakscape.EMPTY_STRING,forValues:null!==(t=p.ArrayUtils.asArray(o))&&void 0!==t?t:[]}}pair(e){const{key:t,keyAudio:r,keyImage:i,values:o,item:n,lead:a,pageNumber:s,marginNumber:l,hint:u,instruction:p,isCaseSensitive:c,isDefaultExample:g,example:d}=e,f=Object.assign(Object.assign({key:t,keyAudio:r,keyImage:i,itemLead:this.itemLead(n,a,s,l),hint:u,instruction:p},this.toExample(g,d)),{isCaseSensitive:c,values:o});return y.ObjectUtils.removeUnwantedProperties(f,{ignoreAllFalse:!0}),f}matrix(e){const{key:t,cells:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u}=e;let p=!1;for(const e of null!=r?r:[])u&&!e.isExample&&(e.isDefaultExample=!0,e.isExample=!0),p=!!e.isExample||p;const c={key:t,itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l,isExample:p,cells:r};return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}matrixCell(e){const{values:t,item:r,lead:i,pageNumber:o,marginNumber:n,hint:a,instruction:s,isCaseSensitive:l,isDefaultExample:u,example:p}=e,c=Object.assign({values:t,itemLead:this.itemLead(r,i,o,n),hint:a,instruction:s,isCaseSensitive:l},this.toExample(u,p));return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}table(e){const{columns:t,rows:r}=e;return{columns:t,rows:r}}question(e){const{question:t,partialAnswer:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,reasonableNumOfChars:u,sampleSolution:p,isDefaultExample:c,example:g}=e,d=Object.assign(Object.assign({itemLead:this.itemLead(i,o,n,a),question:t,partialAnswer:r,hint:s,instruction:l},this.toExample(c,g)),{reasonableNumOfChars:u,sampleSolution:p});return y.ObjectUtils.removeUnwantedProperties(d,{ignoreEmptyString:["question"],ignoreAllFalse:!0}),d}ingredient(e){const{title:t,checked:r,item:i,quantity:o,unit:n,unitAbbr:a,decimalPlaces:s,disableCalculation:l}=e,u={title:t,checked:null!=r&&r,item:i,quantity:o,unit:n,unitAbbr:a,decimalPlaces:s,disableCalculation:l};return y.ObjectUtils.removeUnwantedProperties(u,{ignoreAllFalse:!0}),u}body(e){const{bodyParts:t,bodyJson:r}=e;return{bodyParts:t,bodyJson:r}}bodyText(e){const{text:t}=e;return{type:s.BodyBitType.text,data:{bodyText:t}}}footerText(e){const{text:t}=e;return{footerText:t}}gap(e){const{solutions:t,item:r,lead:i,pageNumber:o,marginNumber:n,hint:a,instruction:l,isCaseSensitive:u,isDefaultExample:p,example:c}=e,g={type:s.BodyBitType.gap,data:Object.assign({solutions:t,itemLead:this.itemLead(r,i,o,n),hint:a,instruction:l,isCaseSensitive:u},this.toExample(p,c))};return y.ObjectUtils.removeUnwantedProperties(g,{ignoreAllFalse:!0}),g}markConfig(e){const{mark:t,color:r,emphasis:i}=e,o={mark:t,color:r,emphasis:i};return y.ObjectUtils.removeUnwantedProperties(o),o}mark(e){const{solution:t,mark:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:l,instruction:u,isDefaultExample:p,example:c}=e,g={type:s.BodyBitType.mark,data:Object.assign({solution:t,mark:r,itemLead:this.itemLead(i,o,n,a),hint:l,instruction:u},this.toExample(p,c))};return y.ObjectUtils.removeUnwantedProperties(g),g}select(e){const{options:t,prefix:r,postfix:i,item:o,lead:n,pageNumber:a,marginNumber:l,hint:u,instruction:p}=e,c={type:s.BodyBitType.select,data:{prefix:r,options:t,postfix:i,itemLead:this.itemLead(o,n,a,l),hint:u,instruction:p}};return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}selectOption(e){const{text:t,isCorrect:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u,example:p}=e,c=Object.assign({text:t,isCorrect:!!r,itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l},this.toExample(u,p));return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}highlight(e){const{texts:t,prefix:r,postfix:i,item:o,lead:n,pageNumber:a,marginNumber:l,hint:u,instruction:p}=e,c={type:s.BodyBitType.highlight,data:{prefix:r,texts:t,postfix:i,itemLead:this.itemLead(o,n,a,l),hint:u,instruction:p}};return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}highlightText(e){const{text:t,isCorrect:r,isHighlighted:i,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,isDefaultExample:p,example:c}=e,g=Object.assign({text:t,isCorrect:!!r,isHighlighted:!!i,itemLead:this.itemLead(o,n,a,s),hint:l,instruction:u},this.toExample(p,c));return y.ObjectUtils.removeUnwantedProperties(g,{ignoreAllFalse:!0}),g}flashcard(e){const{question:t,answer:r,alternativeAnswers:i,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,isDefaultExample:p,example:c}=e,g=Object.assign({question:t,answer:r,alternativeAnswers:i,itemLead:this.itemLead(o,n,a,s),hint:l,instruction:u},this.toExampleBoolean(p,c));return y.ObjectUtils.removeUnwantedProperties(g,{ignoreAllFalse:!0}),g}statement(e){const{text:t,isCorrect:r,item:i,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,isDefaultExample:u,example:p}=e,c=Object.assign({text:t,isCorrect:!!r,itemLead:this.itemLead(i,o,n,a),hint:s,instruction:l},this.toExampleBoolean(u,p));return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0}),c}imageSource(e){const{url:t,mockupId:r,size:i,format:o,trim:n}=e,a={url:t,mockupId:r,size:i,format:o,trim:n};return y.ObjectUtils.removeUnwantedProperties(a,{ignoreFalse:["trim"]}),a}person(e){const{name:t,title:r,avatarImage:i}=e,o={name:t,title:r,avatarImage:i};return y.ObjectUtils.removeUnwantedProperties(o),o}technicalTerm(e){const{technicalTerm:t,lang:r}=e,i={technicalTerm:t,lang:r};return y.ObjectUtils.removeUnwantedProperties(i),i}servings(e){const{servings:t,unit:r,unitAbbr:i,decimalPlaces:o,disableCalculation:n,hint:a}=e,s={servings:t,unit:r,unitAbbr:i,decimalPlaces:o,disableCalculation:n,hint:a};return y.ObjectUtils.removeUnwantedProperties(s),s}ratingLevelStartEnd(e){const{level:t,label:r}=e,i={level:t,label:r};return y.ObjectUtils.removeUnwantedProperties(i),i}itemLead(e,t,r,i){let o;return(e||t||r||i)&&(o={item:e,lead:t,pageNumber:r,marginNumber:i}),o}cardBit(e){const{item:t,lead:r,pageNumber:i,marginNumber:o,hint:n,instruction:a,isDefaultExample:s,example:l,extraProperties:u,body:p}=e,c=Object.assign(Object.assign({itemLead:this.itemLead(t,r,i,o),hint:n,instruction:a},this.toExample(s,l)),{body:p,extraProperties:this.parseExtraProperties(u)});return y.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0,ignoreEmptyString:["example"]}),m.NodeValidator.validateCardBit(c)}cardNode(e){let t;const{questions:r,elements:i,flashcards:o,statement:n,statements:a,choices:s,responses:l,quizzes:u,heading:p,pairs:c,matrix:g,table:d,botResponses:f,ingredients:m,cardBits:h}=e;return(r||i||o||n||a||s||l||u||p||c||g||d||f||m||h)&&(t={questions:r,elements:i,flashcards:o,statement:n,statements:a,choices:s,responses:l,quizzes:u,heading:p,pairs:c,matrix:g,table:d,botResponses:f,ingredients:m,cardBits:h},y.ObjectUtils.removeUnwantedProperties(t)),t}pushExampleDownTree(e,t,r,i){if(r||i){if(t){if(this.pushExampleDownTreeString(r,i,t.pairs),this.pushExampleDownTreeBoolean(r,i,!1,t.flashcards),this.pushExampleDownTreeBoolean(r,i,!0,t.choices),this.pushExampleDownTreeBoolean(r,i,!1,t.responses,t.statements,t.statement),t.quizzes)for(const e of t.quizzes)this.pushExampleDownTreeBoolean(r,i,!0,e.choices),this.pushExampleDownTreeBoolean(r,i,!1,e.responses);if(t.matrix)for(const e of t.matrix)this.pushExampleDownTreeString(r,i,e.cells)}e&&this.pushExampleDownTreeBodyBits(r,i,e)}}pushExampleDownTreeBoolean(e,t,r,...i){if((e||t)&&Array.isArray(i))for(const o of i)if(o){const i=Array.isArray(o)?o:[o];c.BitUtils.fillBooleanExample(i,e,t,r)}}pushExampleDownTreeString(e,t,...r){if((e||t)&&Array.isArray(r))for(const i of r)if(i){const r=Array.isArray(i)?i:[i];c.BitUtils.fillStringExample(r,e,t,!1)}}pushExampleDownTreeBodyBits(e,t,r){if((e||t)&&r&&r.bodyParts&&0!==r.bodyParts.length)for(const i of r.bodyParts)if(i)switch(i.type){case s.BodyBitType.gap:{const r=i;c.BitUtils.fillStringExample([r.data],e,t,!1);break}case s.BodyBitType.mark:{const r=i;c.BitUtils.fillBooleanExample([r.data],e,t,!1);break}case s.BodyBitType.select:{const r=i;c.BitUtils.fillBooleanExample(r.data.options,e,t,!0);break}case s.BodyBitType.highlight:{const r=i;c.BitUtils.fillBooleanExample(r.data.texts,e,t,!0);break}}}pushDownTree(e,t,r,i,o,n){if(void 0!==n){if(r&&i){Array.isArray(i)||(i=[i]);const e=y.ObjectUtils.flatMapPath(r,i);for(const t of e)null==t[o]&&(t[o]=n)}if(t&&e&&e.bodyParts&&e.bodyParts.length>0)for(const r of e.bodyParts)if(r&&-1!==t.indexOf(r.type)){const e=r.data;null==e[o]&&(e[o]=n)}}}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]=p.ArrayUtils.asArray(i)||[i];return r}setIsExampleFlags(e){var t,r,i,o,n,a,l,u,p,c,g,y,d;e.isExample=!1;const f=t=>!!t&&(t.isDefaultExample||null!=t.example?(t.isExample=!0,e.isExample=!0):t.isExample=t===e&&!!e.isExample,t.isExample),{body:m,cardNode:h}=e;if(m&&m.bodyParts)for(const e of m.bodyParts)switch(e.type){case s.BodyBitType.gap:case s.BodyBitType.mark:f(e.data);break;case s.BodyBitType.select:{const t=e;let r=!1;for(const e of t.data.options)r=!!f(e)||r;t.data.isExample=r;break}case s.BodyBitType.highlight:{const t=e;let r=!1;for(const e of t.data.texts)r=!!f(e)||r;t.data.isExample=r;break}}if(h){for(const e of null!==(t=h.flashcards)&&void 0!==t?t:[])f(e);for(const e of null!==(r=h.pairs)&&void 0!==r?r:[])f(e);for(const e of null!==(i=h.matrix)&&void 0!==i?i:[]){let t=!1;for(const r of null!==(o=e.cells)&&void 0!==o?o:[])t=!!f(r)||t;e.isExample=t}for(const e of null!==(n=h.quizzes)&&void 0!==n?n:[]){let t=!1;for(const r of null!==(a=e.responses)&&void 0!==a?a:[])t=!!f(r)||t;for(const r of null!==(l=e.choices)&&void 0!==l?l:[])t=!!f(r)||t;e.isExample=t}for(const e of null!==(u=h.responses)&&void 0!==u?u:[])f(e);for(const e of null!==(p=h.choices)&&void 0!==p?p:[])f(e);for(const e of null!==(c=h.statements)&&void 0!==c?c:[])f(e);f(h.statement);for(const e of null!==(g=h.questions)&&void 0!==g?g:[])f(e)}f(e.statement);for(const t of null!==(y=e.responses)&&void 0!==y?y:[])f(t);for(const t of null!==(d=e.choices)&&void 0!==d?d:[])f(t);f(e)}setDefaultBitValues(e){switch(e.bitType){case a.BitType.articleAi:case a.BitType.noteAi:case a.BitType.summaryAi:e.aiGenerated=this.toAstProperty(n.PropertyConfigKey.aiGenerated,!0)}}addVersionToParserInfo(e){var t;const r=null!==(t=e.parser)&&void 0!==t?t:{};r.version=d.env.appVersion.full,e.parser=r}}t.Builder=h},5533:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceBuilder=void 0;const o=r(7735),n=r(6149),a=r(955),s=r(201),l=r(4470),u=r(4564);class p extends l.BaseBuilder{resource(e){var t;let r;const{type:a,value:s,format:l}=e,u=i(e,["type","value","format"]),p=Object.assign({type:a,value:null!=s?s:o.Breakscape.EMPTY_STRING,format:null!=l?l:o.Breakscape.EMPTY_STRING},u);switch(a){case n.ResourceTag.video:case n.ResourceTag.videoEmbed:case n.ResourceTag.videoLink:case n.ResourceTag.stillImageFilmEmbed:case n.ResourceTag.stillImageFilmLink:{const r=["src1x","src2x","src3x","src4x"],i=[];for(const t of r){const r=e[t];if(r){const e=this.resource({type:n.ResourceTag.image,value:r});e&&i.push(e)}}p.thumbnails=[...null!==(t=p.thumbnails)&&void 0!==t?t:[],...i]}}switch(a){case n.ResourceTag.image:case n.ResourceTag.imagePortrait:case n.ResourceTag.imageLandscape:r=this.imageResource(p,a);break;case n.ResourceTag.imageLink:r=this.imageLinkResource(p);break;case n.ResourceTag.audio:r=this.audioResource(p);break;case n.ResourceTag.audioEmbed:r=this.audioEmbedResource(p);break;case n.ResourceTag.audioLink:r=this.audioLinkResource(p);break;case n.ResourceTag.video:r=this.videoResource(p);break;case n.ResourceTag.videoEmbed:r=this.videoEmbedResource(p);break;case n.ResourceTag.videoLink:r=this.videoLinkResource(p);break;case n.ResourceTag.stillImageFilmEmbed:r=this.stillImageFilmEmbedResource(p);break;case n.ResourceTag.stillImageFilmLink:r=this.stillImageFilmLinkResource(p);break;case n.ResourceTag.article:r=this.articleResource(p);break;case n.ResourceTag.document:r=this.documentResource(p);break;case n.ResourceTag.documentEmbed:r=this.documentEmbedResource(p);break;case n.ResourceTag.documentLink:r=this.documentLinkResource(p);break;case n.ResourceTag.documentDownload:r=this.documentDownloadResource(p);break;case n.ResourceTag.appLink:r=this.appLinkResource(p);break;case n.ResourceTag.websiteLink:r=this.websiteLinkResource(p)}return r}imageResource(e,t){const{value:r,src1x:i,src2x:o,src3x:l,src4x:p,width:c,height:g,alt:y,zoomDisabled:d,license:f,copyright:m,showInIndex:h,caption:T}=e,b={type:n.ResourceTag.image,typeAlias:null!=t?t:n.ResourceTag.image,format:s.UrlUtils.fileExtensionFromUrl(r),provider:s.UrlUtils.domainFromUrl(r),value:r,src1x:i,src2x:o,src3x:l,src4x:p,width:c,height:g,alt:y,zoomDisabled:d,license:f,copyright:m,showInIndex:h,caption:T};return a.ObjectUtils.removeUnwantedProperties(b,{ignoreFalse:["zoomDisabled"]}),u.NodeValidator.validateResource(b)}imageLinkResource(e){const{value:t,src1x:r,src2x:i,src3x:o,src4x:l,width:p,height:c,alt:g,zoomDisabled:y,license:d,copyright:f,showInIndex:m,caption:h}=e,T={type:n.ResourceTag.imageLink,typeAlias:n.ResourceTag.imageLink,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,src1x:r,src2x:i,src3x:o,src4x:l,zoomDisabled:y,width:p,height:c,alt:g,license:d,copyright:f,showInIndex:m,caption:h};return a.ObjectUtils.removeUnwantedProperties(T,{ignoreFalse:["zoomDisabled"]}),u.NodeValidator.validateResource(T)}audioResource(e){const{value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g}=e,y={type:n.ResourceTag.audio,typeAlias:n.ResourceTag.audio,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g};return a.ObjectUtils.removeUnwantedProperties(y),u.NodeValidator.validateResource(y)}audioEmbedResource(e){const{value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g}=e,y={type:n.ResourceTag.audioEmbed,typeAlias:n.ResourceTag.audioEmbed,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g};return a.ObjectUtils.removeUnwantedProperties(y),u.NodeValidator.validateResource(y)}audioLinkResource(e){const{value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g}=e,y={type:n.ResourceTag.audioLink,typeAlias:n.ResourceTag.audioLink,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,duration:r,mute:i,autoplay:o,license:l,copyright:p,showInIndex:c,caption:g};return a.ObjectUtils.removeUnwantedProperties(y),u.NodeValidator.validateResource(y)}videoResource(e){const{value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b}=e,v={type:n.ResourceTag.video,typeAlias:n.ResourceTag.video,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b};return a.ObjectUtils.removeUnwantedProperties(v),u.NodeValidator.validateResource(v)}videoEmbedResource(e){const{value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b}=e,v={type:n.ResourceTag.videoEmbed,typeAlias:n.ResourceTag.videoEmbed,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b};return a.ObjectUtils.removeUnwantedProperties(v),u.NodeValidator.validateResource(v)}videoLinkResource(e){const{value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b}=e,v={type:n.ResourceTag.videoLink,typeAlias:n.ResourceTag.videoLink,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b};return a.ObjectUtils.removeUnwantedProperties(v),u.NodeValidator.validateResource(v)}stillImageFilmEmbedResource(e){const{value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b}=e,v={type:n.ResourceTag.stillImageFilmEmbed,typeAlias:n.ResourceTag.stillImageFilmEmbed,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b};return a.ObjectUtils.removeUnwantedProperties(v),u.NodeValidator.validateResource(v)}stillImageFilmLinkResource(e){const{value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b}=e,v={type:n.ResourceTag.stillImageFilmLink,typeAlias:n.ResourceTag.stillImageFilmLink,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,width:r,height:i,duration:o,mute:l,autoplay:p,allowSubtitles:c,showSubtitles:g,alt:y,posterImage:d,thumbnails:f,license:m,copyright:h,showInIndex:T,caption:b};return a.ObjectUtils.removeUnwantedProperties(v),u.NodeValidator.validateResource(v)}articleResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:l}=e,p={type:n.ResourceTag.article,typeAlias:n.ResourceTag.article,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,license:r,copyright:i,showInIndex:o,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}documentResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:l}=e,p={type:n.ResourceTag.document,typeAlias:n.ResourceTag.document,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,license:r,copyright:i,showInIndex:o,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}documentEmbedResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:l}=e,p={type:n.ResourceTag.documentEmbed,typeAlias:n.ResourceTag.documentEmbed,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,license:r,copyright:i,showInIndex:o,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}documentLinkResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:l}=e,p={type:n.ResourceTag.documentLink,typeAlias:n.ResourceTag.documentLink,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,license:r,copyright:i,showInIndex:o,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}documentDownloadResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:l}=e,p={type:n.ResourceTag.documentDownload,typeAlias:n.ResourceTag.documentDownload,format:s.UrlUtils.fileExtensionFromUrl(t),provider:s.UrlUtils.domainFromUrl(t),value:t,license:r,copyright:i,showInIndex:o,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}appLinkResource(e){const{value:t,license:r,copyright:i,showInIndex:o,caption:s}=e,l={type:n.ResourceTag.appLink,typeAlias:n.ResourceTag.appLink,value:t,license:r,copyright:i,showInIndex:o,caption:s};return a.ObjectUtils.removeUnwantedProperties(l),u.NodeValidator.validateResource(l)}websiteLinkResource(e){const{value:t,siteName:r,license:i,copyright:o,showInIndex:s,caption:l}=e,p={type:n.ResourceTag.websiteLink,typeAlias:n.ResourceTag.websiteLink,value:t,siteName:r,license:i,copyright:o,showInIndex:s,caption:l};return a.ObjectUtils.removeUnwantedProperties(p),u.NodeValidator.validateResource(p)}}t.ResourceBuilder=p},4564:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValidator=void 0;const i=r(9681);const o=new class{validateBit(e){if(!e)return e;return e}validateCardBit(e){if(!e)return e;return e}validateResource(e){if(!e)return;let t=e,r=!1;return e.type,r=!!e.value,r||e.type&&(t={type:e.type,typeAlias:e.type}),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(!i.StringUtils.isString(e))throw new Error(`${t} is required to be a string`)}isNonEmptyString(e,t){if(!i.StringUtils.isString(e)||""===e)throw new Error(`${t} is required to be a non-empty string`)}isStringOrBoolean(e,t){if(!i.StringUtils.isString(e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a string or a boolean`)}isNonEmptyStringOrBoolean(e,t){if((!i.StringUtils.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(!i.StringUtils.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`)}};t.NodeValidator=o},6772:function(e,t){var r=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StringWriter=void 0;t.StringWriter=class{constructor(){this._string="",this.endOfLineString="\n"}get isSync(){return!0}getString(){return this._string}open(){return r(this,void 0,void 0,(function*(){this.openSync(),Promise.resolve()}))}close(){return r(this,void 0,void 0,(function*(){try{this.closeSync()}catch(e){return Promise.reject(e)}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){return this._buffer?(null!=e?this._buffer.push(e+this.endOfLineString):this._buffer.push(this.endOfLineString),this):this}writeLines(e,t){if(!this._buffer)return this;if(!e)return this;for(let r=0,i=e.length;r<i;r++){const o=e[r];this._buffer.push(o),t&&r<i-1&&this._buffer.push(t),this._buffer.push(this.endOfLineString)}return this}write(e){return this._buffer?(null==e||this._buffer.push(e),this):this}writeWhiteSpace(){return this.write(" "),this}}},7735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Breakscape=void 0;const i=r(9681),o=`${/([*`_!=~])([\^]*)\1/.source}|${/^(\|)([\^]*)(code[\s]*|code:|image:|[\s]*$)/.source}|${/^([#]{1,3})([\^]*)([^\S\r\n]+)/.source}|${/^(•)([\^]*)(1|\+|-|)([^\S\r\n]+)/.source}|${/(\[)([\^]*)([.@#▼►%!?+\-$_=&])/.source}|${/([\^]*)(])/.source}`,n=o.replace(/(\(\[\\\^\]\*\))/g,"\\^$1"),a=new RegExp(o,"gm"),s="$1$3$6$9$13^$2$1$4$5$7$8$10$11$12$14$15$16$17",l=new RegExp(n,"gm"),u=s.replace(/\^/g,""),p=new RegExp("^(\\||•|#)","gm");const c=new class{constructor(){this.EMPTY_STRING=""}breakscape(e,t){if(null==e)return e;const r=Object.assign({},t),o=e=>e?e=e.replace(a,s):e;if(Array.isArray(e)){const t=r.modifyArray?e:[e.length];for(let r=0,n=e.length;r<n;r++){const n=e[r];i.StringUtils.isString(n)&&(t[r]=o(n))}e=t}else i.StringUtils.isString(e)&&(e=o(e));return e}unbreakscape(e,t){if(null==e)return e;const r=Object.assign({},t),o=e=>e?e=e.replace(l,u):e;if(Array.isArray(e)){const t=r.modifyArray?e:[];for(let r=0,n=e.length;r<n;r++){const n=e[r];i.StringUtils.isString(n)?t[r]=o(n):t[r]=n}e=t}else i.StringUtils.isString(e)&&(e=o(e));return e}breakscapeCode(e,t){if(null==e)return e;const r=Object.assign({},t),o=e=>e?e.replace(p,"$1^"):e;if(Array.isArray(e)){const t=r.modifyArray?e:[e.length];for(let t=0,r=e.length;t<r;t++){const r=e[t];i.StringUtils.isString(r)&&(e[t]=o(r))}e=t}else i.StringUtils.isString(e)&&(e=o(e));return e}concatenate(e,t){return e+t}};t.Breakscape=c},2028:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;const i=r(3619),o=r(9600),n=r(1457),a=r(6915),s=r(5512),l=r(5854),u=r(385),p=r(955),c=r(4445),g=r(6853),y=r(5837),d=r(9916);const f=new class{constructor(){this.bitCache=new Map,this.comboResourcesCache=new Map}getBitType(e){var t;return(null==e?void 0:e.startsWith("|"))&&(e=e.substring(1)),null!==(t=l.BitType.fromValue(e))&&void 0!==t?t:l.BitType._error}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!!(null==e?void 0:e.startsWith("|"))}getBitConfig(e){var t;let r=this.bitCache.get(e);if(!r){const o=()=>{throw new Error(`No config found for bit: ${e}`)},n=[],a=[];let s=e;for(;s;){const e=g.BITS[s];e||o(),n.push(s),a.push(e),s=e.baseBitType}a.reverse();const l=a.reduce(((e,t)=>e=p.ObjectUtils.deepMerge(e,t)),{}),{since:y,textFormatDefault:d,tags:f,cardSet:m,deprecated:h,bodyAllowed:T,bodyRequired:b,footerAllowed:v,footerRequired:B,resourceAttachmentAllowed:C,rootExampleType:P}=l,k=this.getAllResourcesTagsWithZeroCounts(),x=c.ConfigHydrator.hydrateTagsConfig(null!=f?f:[]),S=c.ConfigHydrator.hydrateCardSetConfig(m),K=null===(t=x.info)||void 0===t?void 0:t.comboResourceType,w=Object.assign({},x.tags);for(const[e,t]of Object.entries(k))w[e]||(w[e]=t);r=new i.BitConfig(y,e,n,null!=d?d:u.TextFormat.bitmarkMinusMinus,w,S,h,T,b,v,B,C,P,K),this.bitCache.set(e,r)}return r}getRawPropertiesConfig(){return d.PROPERTIES}getTagConfigForTag(e,t){if(e)for(const[,r]of Object.entries(e))if(r.tag===t)return r}getTagsConfigForCardSet(e,t,r){const i=this.getBitConfig(e);if(!i)return;const o=i.cardSet;if(!o)return;t=Math.min(t,o.variants.length-1);const n=o.variants[t];return n[r=Math.min(r,n.length-1)].tags}getBitResourcesConfig(e,t){var r;let i={};const a=new Map,l=this.getBitConfig(e),u={};for(const[e,t]of Object.entries(l.tags))t.type===s.BitTagType.resource&&(u[e]=t);const p=null!==(r=l.comboResourceType)&&void 0!==r?r:l.resourceAttachmentAllowed&&t;if(p){const e=new Map,r=this.getComboResource(p);if(r){const t=Object.values(r).filter((e=>e.type===s.BitTagType.resource));t.map((e=>e.tag)).forEach((r=>{const i=t.find((e=>e.tag===r));i&&e.set(r,i)}));const i=this.getComboResourceTagTypes(p);i&&i.length>0&&a.set(p,i)}if(t)for(const[t,r]of Object.entries(u)){const n=p===r.tag,a=!!e&&e.has(r.tag);if(n){const e=new o.ResourceTagConfig(r.configKey,r.tag,1,1,r.chain,r.jsonKey,r.deprecated);i[t]=e}else if(a){if(e){const o=e.get(r.tag);o&&(i[t]=o)}}else i[t]=r}else i=u}else i=u;return new n.ResourcesConfig(i,l.resourceAttachmentAllowed,t,a)}getComboResourceTagTypes(e){const t=this.getComboResource(e);if(t){return Object.values(t).filter((e=>e.type===s.BitTagType.resource)).map((e=>e.tag))}}getComboResource(e){if(!e)return;let t=this.comboResourcesCache.get(e);return t||(t={},Object.values(y.GROUPS).filter((t=>t.type===a.GroupConfigType.comboResource&&t.comboResourceType===e)).forEach((e=>{t=Object.assign(Object.assign({},t),c.ConfigHydrator.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(y.GROUPS).filter((e=>e.type===a.GroupConfigType.resource)).forEach((t=>{e=Object.assign(Object.assign({},e),c.ConfigHydrator.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}};t.Config=f},4445:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigHydrator=void 0;const i=r(5814),o=r(9371),n=r(9788),a=r(1519),s=r(9600),l=r(5591),u=r(7112),p=r(9888),c=r(5051),g=r(7797),y=r(5512),d=r(5554),f=r(5837),m=r(9916),h=r(168),T=r(9248);const b=new class{hydrateTagsConfig(e){var t;const r={tags:{}};for(const i of e){let e;switch(i.type){case y.BitTagType.tag:e=this.hydrateTagConfig(i);break;case y.BitTagType.property:e=this.hydratePropertyTagConfig(i);break;case y.BitTagType.resource:e=this.hydrateResourceTagConfig(i);break;case y.BitTagType.group:e=this.hydrateTagGroupConfig(i)}e&&(r.tags=Object.assign(Object.assign({},r.tags),e.tags),r.info=Object.assign(null!==(t=r.info)&&void 0!==t?t:{},e.info))}return r}hydrateCardSetConfig(e){if(!e)return;const t=d.CARDS[e];if(!t)throw new Error(`No config found for card set config key '${e}'`);const r=[];for(const e of t.variants){const t=[];for(const r of e){const e=this.hydrateCardVariantConfig(r);t.push(e)}r.push(t)}return new i.CardSetConfig(e,r)}hydrateTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,a=g.TagConfigKey.fromKey(t)||l.ConfigKey._unknown,s=T.TAGS[a];if(!s)throw new Error(`No config found for tag config key '${t}'`);const{tag:u,deprecated:p}=s;let c;o&&(c=this.hydrateTagsConfig(o).tags);return{tags:{[a]:new n.MarkupTagConfig(a,u,null!=r?r:1,null!=i?i:0,c,p)}}}hydratePropertyTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,n=p.PropertyConfigKey.fromKey(t)||l.ConfigKey._unknown,s=m.PROPERTIES[n];if(!s)throw new Error(`No config found for property config key '${t}'`);const{tag:u,deprecated:c,single:g,format:y,defaultValue:d,jsonKey:f,astKey:h}=s;let T;o&&(T=this.hydrateTagsConfig(o).tags);return{tags:{[n]:new a.PropertyTagConfig(n,u,null!=r?r:1,null!=i?i:0,T,f,h,g,y,d,c)}}}hydrateResourceTagConfig(e){const{configKey:t,maxCount:r,minCount:i,chain:o}=e,n=c.ResourceConfigKey.fromKey(t)||l.ConfigKey._unknown,a=h.RESOURCES[n];if(!a)throw new Error(`No config found for resource config key '${t}'`);const{tag:u,deprecated:p,jsonKey:g}=a;let y;o&&(y=this.hydrateTagsConfig(o).tags);return{tags:{[n]:new s.ResourceTagConfig(n,u,null!=r?r:1,null!=i?i:0,y,g,p)}}}hydrateTagGroupConfig(e){var t,r;const{configKey:i}=e,o=u.GroupConfigKey.fromKey(i)||l.ConfigKey._unknown,n=f.GROUPS[o];if(!n)throw new Error(`No config found for group config key '${i}'`);const{tags:a}=n,s=this.hydrateTagsConfig(a).tags,p=Object.values(s);if(p.length>0){const i=p[0],o=i;o.maxCount=null!==(t=e.maxCount)&&void 0!==t?t:i.maxCount,o.minCount=null!==(r=e.minCount)&&void 0!==r?r:i.minCount}return{tags:s,info:{comboResourceType:n.comboResourceType}}}hydrateCardVariantConfig(e){const{tags:t,bodyAllowed:r,bodyRequired:i,repeatCount:n}=e,a=this.hydrateTagsConfig(t);return new o.CardVariantConfig(a.tags,r,i,n)}};t.ConfigHydrator=b},6853:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BITS=void 0;const i=r(8199),o=r(7112),n=r(9888),a=r(7797),s=r(5512),l=r(5854),u=r(3778),p=r(363),c=r(385),g={[l.BitType._error]:{since:"1.3.0",tags:[]},[l.BitType._comment]:{since:"1.4.12",tags:[]},[l.BitType.appFlashcards]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.flashcardSet,maxCount:u.Count.infinity}],rootExampleType:p.ExampleType.string},[l.BitType.appFlashcardsQuiz]:{since:"1.3.0",baseBitType:l.BitType.appFlashcards},[l.BitType.appFlashcardsLearn]:{since:"1.3.0",baseBitType:l.BitType.appFlashcards},[l.BitType.appLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAppLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.article]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title}]},[l.BitType.statement]:{since:"1.3.0",baseBitType:l.BitType.article},[l.BitType.buttonCopyText]:{since:"1.4.3",baseBitType:l.BitType.article,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[l.BitType.appBitmarkFromJavascript]:{since:"1.4.5",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.maxCreatedBits}],textFormatDefault:c.TextFormat.text},[l.BitType.appBitmarkFromEditor]:{since:"1.4.5",baseBitType:l.BitType.appBitmarkFromJavascript},[l.BitType.articleEmbed]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleEmbed,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.articleLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.audio]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudio,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.audioEmbed]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioEmbed,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.audioLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.bitAlias]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.tag_reference},{type:s.BitTagType.tag,configKey:a.TagConfigKey.anchor}]},[l.BitType.book]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_bookCommon}]},[l.BitType.bookAcknowledgments]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookAddendum]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookAfterword]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookAppendix]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookArticle]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookAutherBio]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookBibliography]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookComingSoon]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookConclusion]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookCopyright]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookCopyrightPermissions]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookDedication]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookEndnotes]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookEpigraph]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookEpilogue]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookForword]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookFrontispiece]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookImprint]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookIncitingIncident]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookIntroduction]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookListOfContributors]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookNotes]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookPostscript]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookPreface]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookPrologue]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookReadMore]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookReferenceList]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookRequestForABookReview]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookSummary]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookTeaser]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookTitle]:{since:"1.3.0",baseBitType:l.BitType.book},[l.BitType.bookAlias]:{since:"1.4.3",baseBitType:l.BitType.book,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.bookAlias,maxCount:u.Count.infinity}]},[l.BitType.botActionResponse]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}],cardSet:i.CardSetConfigKey._botActionResponses},[l.BitType.botActionSend]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.date}]},[l.BitType.browserImage]:{since:"1.3.0",baseBitType:l.BitType.image,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[l.BitType.card1]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[l.BitType.question1]:{since:"1.3.0",baseBitType:l.BitType.card1},[l.BitType.survey1]:{since:"1.3.0",baseBitType:l.BitType.card1},[l.BitType.surveyAnonymous1]:{since:"1.3.0",baseBitType:l.BitType.card1},[l.BitType.chapter]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.anchor},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.toc},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.progress}]},[l.BitType.clozeAndMultipleChoiceText]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_gap},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[l.BitType.coachCallToActionClozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:l.BitType.clozeAndMultipleChoiceText},[l.BitType.cloze]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.quizCountItems},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.quizStrikethroughSolutions},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]},[l.BitType.clozeInstructionGrouped]:{since:"1.3.0",baseBitType:l.BitType.cloze},[l.BitType.clozeSolutionGrouped]:{since:"1.3.0",baseBitType:l.BitType.cloze},[l.BitType.gapText]:{since:"1.5.15",baseBitType:l.BitType.cloze},[l.BitType.gapTextInstructionGrouped]:{since:"1.5.15",baseBitType:l.BitType.clozeInstructionGrouped},[l.BitType.coachSelfReflectionCloze]:{since:"1.3.0",baseBitType:l.BitType.cloze},[l.BitType.coachCallToActionCloze]:{since:"1.3.0",baseBitType:l.BitType.cloze},[l.BitType.clozeList]:{since:"1.4.13",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}],cardSet:i.CardSetConfigKey._clozeList},[l.BitType.code]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.computerLanguage},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.codeLineNumbers},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.codeMinimap}],textFormatDefault:c.TextFormat.text},[l.BitType.appCodeCell]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.appCodeEditor]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.appCodeIde]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.codeRuntime]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.consoleLog]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.output]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.stdout]:{since:"1.4.3",baseBitType:l.BitType.code},[l.BitType.step]:{since:"1.5.1",baseBitType:l.BitType.example},[l.BitType.stepImageScreenshot]:{since:"1.5.1",baseBitType:l.BitType.image},[l.BitType.stepImageScreenshotWithPointer]:{since:"1.5.1",baseBitType:l.BitType.image,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1}]},[l.BitType.conversationLeft1]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_person}]},[l.BitType.conversationLeft1Scream]:{since:"1.3.0",baseBitType:l.BitType.conversationLeft1},[l.BitType.conversationLeft1Thought]:{since:"1.3.0",baseBitType:l.BitType.conversationLeft1},[l.BitType.conversationRight1]:{since:"1.3.0",baseBitType:l.BitType.conversationLeft1},[l.BitType.conversationRight1Scream]:{since:"1.3.0",baseBitType:l.BitType.conversationLeft1},[l.BitType.conversationRight1Thought]:{since:"1.3.0",baseBitType:l.BitType.conversationLeft1},[l.BitType.cookPreparation]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookStep]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookIngredients]:{since:"1.5.16",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_technicalTerm},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.servings,chain:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation},{type:s.BitTagType.tag,configKey:a.TagConfigKey.hint}]}],cardSet:i.CardSetConfigKey._ingredients},[l.BitType.recipe]:{since:"1.5.24",baseBitType:l.BitType.cookIngredients},[l.BitType.cookRemark]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookVariation]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookInsert]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookArrangement]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookPracticeAdvise]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookPlate]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookRecommendation]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookPersonalRecommendation]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookSideDrink]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookSideDish]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.cookTimer]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.document]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocument,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.documentDownload]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentDownload,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.documentEmbed]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentEmbed,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.documentLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.essay]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.partialAnswer},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.property_reference,maxCount:u.Count.infinity}],rootExampleType:p.ExampleType.string},[l.BitType.coachSelfReflectionEssay]:{since:"1.3.0",baseBitType:l.BitType.essay},[l.BitType.coachCallToActionEssay]:{since:"1.3.0",baseBitType:l.BitType.essay},[l.BitType.example]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title}],rootExampleType:p.ExampleType.string},[l.BitType.appAiPrompt]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.aiPrompt]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.articleAi]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.articleAttachment]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.assignment]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.audioTranscript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.bitmarkExample]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.blogArticle]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.bug]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.checklist]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.coachAudioTranscript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.coachCallToActionChecklist]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.coachHomeRules]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.coachVideoTranscript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.correction]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.danger]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.details1]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.details]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.editorial]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.editorNote]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.featured]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.help]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.hint]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.info]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLearningOutcomes]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langEnablingLanguageSkills]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLifeSkills]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langEnglishAroundWorld]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langGoodToKnow]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLearningGoal]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLearningStrategy]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLikeALocal]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langMaterial]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langUsefulPhrases]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLevelDown]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langLevelUp]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langExtraActivity]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langVideoScript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langAudioScript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langVocabulary]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langHomework]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langTeacherNote]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.langTeacherPronunciation]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.message]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.newspaperArticle]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.note]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.noteAi]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.notebookArticle]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.preparationNote]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.releaseNotesSummary]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.remark]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.selfAssessment]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.separator]:{since:"1.4.15",baseBitType:l.BitType.example},[l.BitType.sticker]:{since:"1.5.28",baseBitType:l.BitType.example},[l.BitType.sideNote]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.summary]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.summaryAi]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.videoTranscript]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.warning]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.workbookArticle]:{since:"1.3.0",baseBitType:l.BitType.example},[l.BitType.module]:{since:"1.5.26",baseBitType:l.BitType.example,tags:[{type:s.BitTagType.property,configKey:n.propertyConfigKeys.hasBookNavigation},{type:s.BitTagType.property,configKey:n.propertyConfigKeys.productId,maxCount:u.Count.infinity},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.duration}]},[l.BitType.exampleList]:{since:"1.4.13",baseBitType:l.BitType.example,cardSet:i.CardSetConfigKey._exampleBitList,rootExampleType:p.ExampleType.string},[l.BitType.extractorPage]:{since:"1.5.17",baseBitType:l.BitType.image},[l.BitType.extractorPageWithBlocks]:{since:"1.5.21",baseBitType:l.BitType.image},[l.BitType.extractorBlock]:{since:"1.5.16",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.blockId},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.pageNo},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.x},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.y},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.index},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.classification},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.availableClassifications,maxCount:u.Count.infinity},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.extractorRepeatedText]:{since:"1.5.21",baseBitType:l.BitType.article},[l.BitType.extractorPageNumber]:{since:"1.5.21",baseBitType:l.BitType.article},[l.BitType.extractorPageHeader]:{since:"1.5.21",baseBitType:l.BitType.article},[l.BitType.extractorPageFooter]:{since:"1.5.21",baseBitType:l.BitType.article},[l.BitType.pageOpenBook]:{since:"1.5.10",baseBitType:l.BitType.example,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.book},{type:s.BitTagType.tag,configKey:a.TagConfigKey.tag_reference},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[l.BitType.pageSubscribe]:{since:"1.5.10",baseBitType:l.BitType.example,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.mailingList}]},[l.BitType.assignmentList]:{since:"1.4.13",baseBitType:l.BitType.exampleList},[l.BitType.pageFooter]:{since:"1.4.13",baseBitType:l.BitType.exampleList},[l.BitType.flashcard]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}],cardSet:i.CardSetConfigKey._flashcards},[l.BitType.flashcard1]:{since:"1.3.0",baseBitType:l.BitType.flashcard},[l.BitType.focusImage]:{since:"1.3.0",baseBitType:l.BitType.image,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[l.BitType.highlightText]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[l.BitType.image]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.backgroundWallpaper},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.appCreateBitsFromImage]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.appGetScreenshot]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.detailsImage]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.figure]:{since:"1.3.0",deprecated:"1.4.0",baseBitType:l.BitType.image},[l.BitType.imageBanner]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageFigure]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageLandscape]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageMood]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imagePortrait]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imagePrototype]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageSeparator]:{since:"1.4.15",baseBitType:l.BitType.image},[l.BitType.imageScreenshot]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageStyled]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageSuperWide]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.imageZoom]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.langLifeSkillIcon]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.lifeSkillSticker]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.pageBanner]:{since:"1.4.3",baseBitType:l.BitType.image},[l.BitType.screenshot]:{since:"1.3.0",deprecated:"1.4.0",baseBitType:l.BitType.image},[l.BitType.tableImage]:{since:"1.5.15",baseBitType:l.BitType.image,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.caption}]},[l.BitType.imageLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.imageOnDevice]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_imageSource}],resourceAttachmentAllowed:!1},[l.BitType.imageResponsive]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageResponsive}],resourceAttachmentAllowed:!1},[l.BitType.imagesLogoGrave]:{since:"1.5.11",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1,maxCount:u.Count.infinity}],resourceAttachmentAllowed:!1},[l.BitType.prototypeImages]:{since:"1.6.1",baseBitType:l.BitType.imagesLogoGrave},[l.BitType.internalLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.tag_reference}]},[l.BitType.interview]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars}],cardSet:i.CardSetConfigKey._questions},[l.BitType.interviewInstructionGrouped]:{since:"1.3.0",baseBitType:l.BitType.interview},[l.BitType.botInterview]:{since:"1.3.0",baseBitType:l.BitType.interview},[l.BitType.learningPathBook]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_learningPathCommon}]},[l.BitType.bookLink]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.bookLinkNext]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.bookLinkPrev]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathClassroomEvent]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathClassroomTraining]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathClosing]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathFeedback]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathLearningGoal]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathLti]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathSign]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathStep]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook},[l.BitType.learningPathBotTraining]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.bot}]},[l.BitType.learningPathExternalLink]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.externalLink},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.externalLinkText}]},[l.BitType.learningPathVideoCall]:{since:"1.3.0",baseBitType:l.BitType.learningPathBook,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.videoCallLink}]},[l.BitType.mark]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_markConfig},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_mark}]},[l.BitType.match]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],cardSet:i.CardSetConfigKey._matchPairs},[l.BitType.matchAll]:{since:"1.3.0",baseBitType:l.BitType.match},[l.BitType.matchReverse]:{since:"1.3.0",baseBitType:l.BitType.match},[l.BitType.matchAllReverse]:{since:"1.3.0",baseBitType:l.BitType.match},[l.BitType.matchSolutionGrouped]:{since:"1.3.0",baseBitType:l.BitType.match},[l.BitType.matchMatrix]:{since:"1.3.0",baseBitType:l.BitType.match,cardSet:i.CardSetConfigKey._matchMatrix},[l.BitType.matchAudio]:{since:"1.3.0",baseBitType:l.BitType.match,cardSet:i.CardSetConfigKey._matchAudioPairs},[l.BitType.matchPicture]:{since:"1.3.0",baseBitType:l.BitType.match,cardSet:i.CardSetConfigKey._matchImagePairs},[l.BitType.multipleChoice1]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[l.BitType.coachSelfReflectionMultipleChoice1]:{since:"1.3.0",baseBitType:l.BitType.multipleChoice1},[l.BitType.multipleChoice]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:i.CardSetConfigKey._quiz},[l.BitType.coachSelfReflectionMultipleChoice]:{since:"1.3.0",baseBitType:l.BitType.multipleChoice},[l.BitType.multipleChoiceText]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[l.BitType.coachCallToActionMultipleChoiceText]:{since:"1.3.0",baseBitType:l.BitType.multipleChoiceText},[l.BitType.coachSelfReflectionMultipleChoiceText]:{since:"1.3.0",baseBitType:l.BitType.multipleChoiceText},[l.BitType.multipleResponse1]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[l.BitType.coachSelfReflectionMultipleResponse1]:{since:"1.3.0",baseBitType:l.BitType.multipleResponse1},[l.BitType.multipleResponse]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:i.CardSetConfigKey._quiz},[l.BitType.coachSelfReflectionMultipleResponse]:{since:"1.3.0",baseBitType:l.BitType.multipleResponse},[l.BitType.page]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.thumbImage}]},[l.BitType.pageBuyButton]:{since:"1.4.3",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.content2Buy},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[l.BitType.pageBuyButtonPromotion]:{since:"1.5.11",baseBitType:l.BitType.pageBuyButton},[l.BitType.pagePerson]:{since:"1.5.16",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_person},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[l.BitType.pageProduct]:{since:"1.4.17",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.product}]},[l.BitType.pageProductList]:{since:"1.4.17",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.productList,maxCount:u.Count.infinity}]},[l.BitType.pageProductVideo]:{since:"1.4.17",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.productVideo}]},[l.BitType.pageProductVideoList]:{since:"1.4.17",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.productVideoList,maxCount:u.Count.infinity}]},[l.BitType.pageSectionFolder]:{since:"1.4.17",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.productFolder}]},[l.BitType.photo]:{since:"1.3.0",baseBitType:l.BitType.image},[l.BitType.quote]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.quotedPerson}]},[l.BitType.rating]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[l.BitType.coachSelfReflectionRating]:{since:"1.3.0",baseBitType:l.BitType.rating},[l.BitType.releaseNote]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.releaseVersion},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.releaseKind},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.releaseDate}]},[l.BitType.reviewNote]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.title},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.resolved},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.resolvedDate},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.resolvedBy}],rootExampleType:p.ExampleType.string},[l.BitType.reviewAuthorNote]:{since:"1.3.0",baseBitType:l.BitType.reviewNote},[l.BitType.reviewReviewerNote]:{since:"1.3.0",baseBitType:l.BitType.reviewNote},[l.BitType.reviewRequestForReviewNote]:{since:"1.3.0",baseBitType:l.BitType.reviewNote},[l.BitType.reviewApprovedNote]:{since:"1.3.0",baseBitType:l.BitType.reviewNote},[l.BitType.sampleSolution]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.tag,configKey:a.TagConfigKey.anchor},{type:s.BitTagType.tag,configKey:a.TagConfigKey.tag_reference}]},[l.BitType.sequence]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}],cardSet:i.CardSetConfigKey._elements,rootExampleType:p.ExampleType.boolean},[l.BitType.stillImageFilm]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilm}],resourceAttachmentAllowed:!1},[l.BitType.stillImageFilmEmbed]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmEmbed,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.stillImageFilmLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.surveyAnonymous]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[l.BitType.survey]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[l.BitType.surveyMatrix]:{since:"1.6.2",baseBitType:l.BitType.image,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption,minCount:1,maxCount:1}]},[l.BitType.surveyMatrixMe]:{since:"1.6.2",baseBitType:l.BitType.surveyMatrix},[l.BitType.surveyRating]:{since:"1.6.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelStart,chain:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelEnd,chain:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelSelected},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[l.BitType.surveyRatingOnce]:{since:"1.6.0",baseBitType:l.BitType.surveyRating},[l.BitType.surveyRatingDisplay]:{since:"1.6.0",baseBitType:l.BitType.surveyRating},[l.BitType.scorm]:{since:"1.5.11",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.scormSource},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.posterImage}]},[l.BitType.table]:{since:"1.5.19",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableFixedHeader},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableSearch},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableSort},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tablePagination},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tablePaginationLimit},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableHeight},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableWhitespaceNoWrap},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableAutoWidth},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.tableResizableColumns}],cardSet:i.CardSetConfigKey._table},[l.BitType.toc]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[l.BitType.tocChapter]:{since:"1.5.5",baseBitType:l.BitType.toc,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.maxDisplayLevel}]},[l.BitType.anchor]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.bitBookEnding]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.bitBookSummary]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.botActionAnnounce]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.botActionRatingNumber]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.botActionRemind]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.botActionSave]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.botActionTrueFalse]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.chapterSubjectMatter]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.chat]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.conclusion]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.documentUpload]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.footNote]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.groupBorn]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.groupDied]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.recordAudio]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.recordVideo]:{since:"1.5.24",baseBitType:l.BitType.toc},[l.BitType.stickyNote]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.takePicture]:{since:"1.3.0",baseBitType:l.BitType.toc},[l.BitType.handInAudio]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInContact]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInDocument]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInLocation]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInPhoto]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInScan]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInVideo]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.handInVoice]:{since:"1.5.15",baseBitType:l.BitType.takePicture},[l.BitType.trueFalse1]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse},{type:s.BitTagType.tag,configKey:a.TagConfigKey.true},{type:s.BitTagType.tag,configKey:a.TagConfigKey.false}],rootExampleType:p.ExampleType.boolean},[l.BitType.trueFalse]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse}],cardSet:i.CardSetConfigKey._statements},[l.BitType.vendorAmcharts5Chart]:{since:"1.5.8",baseBitType:l.BitType.code,tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}],textFormatDefault:c.TextFormat.json},[l.BitType.vendorHighchartsChart]:{since:"1.5.28",baseBitType:l.BitType.vendorAmcharts5Chart},[l.BitType.vendorIframelyEmbed]:{since:"1.5.10",baseBitType:l.BitType.code,tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.vendorUrl}],textFormatDefault:c.TextFormat.text},[l.BitType.vendorIframelyCard]:{since:"1.5.10",baseBitType:l.BitType.vendorIframelyEmbed},[l.BitType.vendorIframelyPreview]:{since:"1.5.10",baseBitType:l.BitType.vendorIframelyEmbed},[l.BitType.vendorIframelyPreviewMini]:{since:"1.5.10",baseBitType:l.BitType.vendorIframelyEmbed},[l.BitType.vendorJupyterOutput]:{since:"1.4.3",baseBitType:l.BitType.code,tags:[{type:s.BitTagType.property,configKey:n.PropertyConfigKey.jupyterId},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.jupyterExecutionCount}],textFormatDefault:c.TextFormat.text},[l.BitType.vendorJupyterCellCode]:{since:"1.4.3",baseBitType:l.BitType.vendorJupyterOutput},[l.BitType.vendorJupyterCellMarkdown]:{since:"1.4.3",baseBitType:l.BitType.vendorJupyterOutput},[l.BitType.vendorJupyterCellRaw]:{since:"1.4.3",baseBitType:l.BitType.vendorJupyterOutput},[l.BitType.vendorJupyterIpynb]:{since:"1.4.3",baseBitType:l.BitType.vendorJupyterOutput},[l.BitType.vendorPadletEmbed]:{since:"1.3.0",baseBitType:l.BitType.code,tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.property,configKey:n.PropertyConfigKey.padletId}],textFormatDefault:c.TextFormat.text},[l.BitType.video]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideo,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.videoLandscape]:{since:"1.3.0",baseBitType:l.BitType.video},[l.BitType.videoPortrait]:{since:"1.3.0",baseBitType:l.BitType.video},[l.BitType.videoEmbed]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoEmbed,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.videoEmbedLandscape]:{since:"1.3.0",baseBitType:l.BitType.videoEmbed},[l.BitType.videoEmbedPortrait]:{since:"1.3.0",baseBitType:l.BitType.videoEmbed},[l.BitType.videoLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoLink,minCount:1}],resourceAttachmentAllowed:!1},[l.BitType.videoLinkLandscape]:{since:"1.3.0",baseBitType:l.BitType.videoLink},[l.BitType.videoLinkPortrait]:{since:"1.3.0",baseBitType:l.BitType.videoLink},[l.BitType.websiteLink]:{since:"1.3.0",tags:[{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:s.BitTagType.group,configKey:o.GroupConfigKey.group_resourceWebsiteLink,minCount:1}],resourceAttachmentAllowed:!1}};t.BITS=g},5554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARDS=void 0;const i=r(8199),o=r(7112),n=r(9888),a=r(5051),s=r(7797),l=r(5512),u=r(3778),p={[i.CardSetConfigKey._flashcards]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._elements]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._statements]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:1},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:1},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[i.CardSetConfigKey._quiz]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[i.CardSetConfigKey._questions]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.tag,configKey:s.TagConfigKey.sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._matchPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._matchAudioPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._matchImagePairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._matchMatrix]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._table]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._botActionResponses]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reaction},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}]}]]},[i.CardSetConfigKey._clozeList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]}]]},[i.CardSetConfigKey._exampleBitList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:u.Count.infinity}]]},[i.CardSetConfigKey._ingredients]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation}],repeatCount:u.Count.infinity}]]}};t.CARDS=p},5837:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GROUPS=void 0;const i=r(7112),o=r(6915),n=r(9888),a=r(5051),s=r(7797),l=r(5512),u=r(3778),p=r(6149),c={[i.GroupConfigKey.group_standardAllBits]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.id,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalId,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.aiGenerated},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.analyticsTag,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableFeedback},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ageRange,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisher,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisherName,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.theme,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.target,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tag,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reductionTag,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.icon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.iconTag},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.colorTag,maxCount:u.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.search}]},[i.GroupConfigKey.group_standardItemLeadInstructionHint]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,maxCount:3}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.instruction},{type:l.BitTagType.tag,configKey:s.TagConfigKey.hint}]},[i.GroupConfigKey.group_standardExample]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.example}]},[i.GroupConfigKey.group_standardTags]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardAllBits},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]},[i.GroupConfigKey.group_imageSource]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageSource,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mockupId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.size},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.format},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.trim}]}]},[i.GroupConfigKey.group_technicalTerm]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.technicalTerm,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang}]}]},[i.GroupConfigKey.group_person]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.person,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partner,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage}]}]},[i.GroupConfigKey.group_gap]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:u.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:u.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}]}]},[i.GroupConfigKey.group_trueFalse]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:u.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:u.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:u.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:u.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:u.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:u.Count.infinity},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]}]},[i.GroupConfigKey.group_markConfig]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.markConfig,maxCount:u.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.color},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.emphasis}]}]},[i.GroupConfigKey.group_mark]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_mark,maxCount:u.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_mark},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_standardExample}]}]},[i.GroupConfigKey.group_bookCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.language,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.spaceId,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.kind},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.hasMarkAsDone},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isPublic},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title,maxCount:2},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subtype,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverImage,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverColor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subject,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.author,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publications,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration}]},[i.GroupConfigKey.group_learningPathCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.action},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.date},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.location},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.list,maxCount:u.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.textReference},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTracked},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isInfoOnly},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.deeplink},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]}]},[i.GroupConfigKey.group_resourceCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.license},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.copyright},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showInIndex}]},[i.GroupConfigKey.group_resourceImageCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.zoomDisabled}]},[i.GroupConfigKey.group_resourceAudioCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay}]},[i.GroupConfigKey.group_resourceVideoCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.allowSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.posterImage},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x}]},[i.GroupConfigKey.group_resourceImage]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImagePortrait]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imagePortrait,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageLandscape]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLandscape,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceImageLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageCommon}]}]},[i.GroupConfigKey.group_resourceAudio]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceAudioEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceAudioLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudioCommon}]}]},[i.GroupConfigKey.group_resourceVideo]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.video,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceVideoEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceVideoLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilmEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilmLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceVideoCommon}]}]},[i.GroupConfigKey.group_resourceArticle]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.article,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceArticleEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceArticleLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocument]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.document,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentEmbed,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceDocumentDownload]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentDownload,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceAppLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.appLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceWebsiteLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.websiteLink,chain:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceCommon}]}]},[i.GroupConfigKey.group_resourceStillImageFilm]:{type:o.GroupConfigType.comboResource,comboResourceType:p.ResourceTag.stillImageFilm,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImage,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceAudio,maxCount:1,minCount:1}]},[i.GroupConfigKey.group_resourceImageResponsive]:{type:o.GroupConfigType.comboResource,comboResourceType:p.ResourceTag.imageResponsive,tags:[{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImagePortrait,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:i.GroupConfigKey.group_resourceImageLandscape,maxCount:1,minCount:1}]}};t.GROUPS=c},9916:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTIES=void 0;const i=r(9888),o=r(7203),n=r(9727),a=r(166),s={[i.PropertyConfigKey.id]:{tag:a.PropertyTag.id,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.internalComment]:{tag:a.PropertyTag.internalComment,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.externalId]:{tag:a.PropertyTag.externalId,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.spaceId]:{tag:a.PropertyTag.spaceId,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.padletId]:{tag:a.PropertyTag.padletId,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.jupyterId]:{tag:a.PropertyTag.jupyterId,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.jupyterExecutionCount]:{tag:a.PropertyTag.jupyterExecutionCount,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.aiGenerated]:{tag:a.PropertyTag.tag_aiGenerated,single:!0,format:n.PropertyFormat.boolean,astKey:o.PropertyAstKey.ast_aiGenerated},[i.PropertyConfigKey.analyticsTag]:{tag:a.PropertyTag.analyticsTag,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.disableFeedback]:{tag:a.PropertyTag.disableFeedback,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.releaseVersion]:{tag:a.PropertyTag.releaseVersion,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.releaseKind]:{tag:a.PropertyTag.releaseKind,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.releaseDate]:{tag:a.PropertyTag.releaseDate,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.resolved]:{tag:a.PropertyTag.resolved,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.resolvedDate]:{tag:a.PropertyTag.resolvedDate,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.resolvedBy]:{tag:a.PropertyTag.resolvedBy,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.ageRange]:{tag:a.PropertyTag.ageRange,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.lang]:{tag:a.PropertyTag.lang,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.language]:{tag:a.PropertyTag.language,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.computerLanguage]:{tag:a.PropertyTag.computerLanguage,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.target]:{tag:a.PropertyTag.target,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.tag]:{tag:a.PropertyTag.tag,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.reductionTag]:{tag:a.PropertyTag.reductionTag,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.icon]:{tag:a.PropertyTag.icon,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.iconTag]:{tag:a.PropertyTag.iconTag,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.colorTag]:{tag:a.PropertyTag.colorTag,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.flashcardSet]:{tag:a.PropertyTag.flashcardSet,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.subtype]:{tag:a.PropertyTag.subtype,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.bookAlias]:{tag:a.PropertyTag.bookAlias,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.coverImage]:{tag:a.PropertyTag.coverImage,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.coverColor]:{tag:a.PropertyTag.coverColor,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.publisher]:{tag:a.PropertyTag.publisher,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.publisherName]:{tag:a.PropertyTag.publisherName,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.publications]:{tag:a.PropertyTag.publications,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.author]:{tag:a.PropertyTag.author,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.subject]:{tag:a.PropertyTag.subject,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.date]:{tag:a.PropertyTag.date,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.location]:{tag:a.PropertyTag.location,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.theme]:{tag:a.PropertyTag.theme,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.kind]:{tag:a.PropertyTag.kind,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.hasMarkAsDone]:{tag:a.PropertyTag.hasMarkAsDone,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.isPublic]:{tag:a.PropertyTag.isPublic,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.action]:{tag:a.PropertyTag.action,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.thumbImage]:{tag:a.PropertyTag.thumbImage,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.scormSource]:{tag:a.PropertyTag.scormSource,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.posterImage]:{tag:a.PropertyTag.posterImage,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.focusX]:{tag:a.PropertyTag.focusX,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.focusY]:{tag:a.PropertyTag.focusY,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.deeplink]:{tag:a.PropertyTag.deeplink,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.externalLink]:{tag:a.PropertyTag.externalLink,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.externalLinkText]:{tag:a.PropertyTag.externalLinkText,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.videoCallLink]:{tag:a.PropertyTag.videoCallLink,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.vendorUrl]:{tag:a.PropertyTag.vendorUrl,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.search]:{tag:a.PropertyTag.search,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.bot]:{tag:a.PropertyTag.bot,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.duration]:{tag:a.PropertyTag.duration,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.property_reference]:{tag:a.PropertyTag.tag_reference,format:n.PropertyFormat.trimmedString,astKey:o.PropertyAstKey.ast_referenceProperty},[i.PropertyConfigKey.list]:{tag:a.PropertyTag.list,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.textReference]:{tag:a.PropertyTag.textReference,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.isTracked]:{tag:a.PropertyTag.isTracked,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.isInfoOnly]:{tag:a.PropertyTag.isInfoOnly,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.labelTrue]:{tag:a.PropertyTag.labelTrue,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.labelFalse]:{tag:a.PropertyTag.labelFalse,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.content2Buy]:{tag:a.PropertyTag.content2Buy,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.quotedPerson]:{tag:a.PropertyTag.quotedPerson,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.partialAnswer]:{tag:a.PropertyTag.partialAnswer,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.reasonableNumOfChars]:{tag:a.PropertyTag.reasonableNumOfChars,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.maxCreatedBits]:{tag:a.PropertyTag.maxCreatedBits,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.maxDisplayLevel]:{tag:a.PropertyTag.maxDisplayLevel,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.technicalTerm]:{tag:a.PropertyTag.technicalTerm,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.servings]:{tag:a.PropertyTag.servings,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.unit]:{tag:a.PropertyTag.unit,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.unitAbbr]:{tag:a.PropertyTag.unitAbbr,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.decimalPlaces]:{tag:a.PropertyTag.decimalPlaces,single:!0,format:n.PropertyFormat.number,defaultValue:"1"},[i.PropertyConfigKey.disableCalculation]:{tag:a.PropertyTag.disableCalculation,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.example]:{tag:a.PropertyTag.example,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.toc]:{tag:a.PropertyTag.toc,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[i.PropertyConfigKey.product]:{tag:a.PropertyTag.product,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.productId]:{tag:a.PropertyTag.productId,single:!1,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.productList]:{tag:a.PropertyTag.product,single:!1,format:n.PropertyFormat.trimmedString,astKey:o.PropertyAstKey.ast_productList},[i.PropertyConfigKey.productVideo]:{tag:a.PropertyTag.productVideo,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.productVideoList]:{tag:a.PropertyTag.productVideo,single:!1,format:n.PropertyFormat.trimmedString,astKey:o.PropertyAstKey.ast_productVideoList},[i.PropertyConfigKey.productFolder]:{tag:a.PropertyTag.productFolder,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.progress]:{tag:a.PropertyTag.progress,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[i.PropertyConfigKey.book]:{tag:a.PropertyTag.book,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.person]:{tag:a.PropertyTag.person,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.partner]:{tag:a.PropertyTag.partner,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.property_sampleSolution]:{tag:a.PropertyTag.tag_sampleSolution,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.markConfig]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.trimmedString,astKey:o.PropertyAstKey.ast_markConfig},[i.PropertyConfigKey.property_mark]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.color]:{tag:a.PropertyTag.color,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.emphasis]:{tag:a.PropertyTag.emphasis,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.isCaseSensitive]:{tag:a.PropertyTag.isCaseSensitive,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.reaction]:{tag:a.PropertyTag.reaction,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.imageSource]:{tag:a.PropertyTag.imageSource,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.mockupId]:{tag:a.PropertyTag.mockupId,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.size]:{tag:a.PropertyTag.size,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.format]:{tag:a.PropertyTag.format,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.property_title]:{tag:a.PropertyTag.tag_title,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.trim]:{tag:a.PropertyTag.trim,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.width]:{tag:a.PropertyTag.width,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.height]:{tag:a.PropertyTag.height,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.license]:{tag:a.PropertyTag.license,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.copyright]:{tag:a.PropertyTag.copyright,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.mailingList]:{tag:a.PropertyTag.mailingList,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.buttonCaption]:{tag:a.PropertyTag.buttonCaption,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.caption]:{tag:a.PropertyTag.caption,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.showInIndex]:{tag:a.PropertyTag.showInIndex,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.alt]:{tag:a.PropertyTag.alt,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.zoomDisabled]:{tag:a.PropertyTag.zoomDisabled,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.src1x]:{tag:a.PropertyTag.src1x,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.src2x]:{tag:a.PropertyTag.src2x,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.src3x]:{tag:a.PropertyTag.src3x,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.src4x]:{tag:a.PropertyTag.src4x,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.mute]:{tag:a.PropertyTag.mute,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.autoplay]:{tag:a.PropertyTag.autoplay,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.allowSubtitles]:{tag:a.PropertyTag.allowSubtitles,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.showSubtitles]:{tag:a.PropertyTag.showSubtitles,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.siteName]:{tag:a.PropertyTag.siteName,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.pointerLeft]:{tag:a.PropertyTag.pointerLeft,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.pointerTop]:{tag:a.PropertyTag.pointerTop,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.backgroundWallpaper]:{tag:a.PropertyTag.backgroundWallpaper,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.hasBookNavigation]:{tag:a.PropertyTag.hasBookNavigation,single:!0,defaultValue:"true",format:n.PropertyFormat.boolean},[i.PropertyConfigKey.blockId]:{tag:a.PropertyTag.blockId,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.pageNo]:{tag:a.PropertyTag.pageNo,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.x]:{tag:a.PropertyTag.x,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.y]:{tag:a.PropertyTag.y,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.index]:{tag:a.PropertyTag.index,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.classification]:{tag:a.PropertyTag.classification,single:!0,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.availableClassifications]:{tag:a.PropertyTag.availableClassifications,single:!1,format:n.PropertyFormat.trimmedString},[i.PropertyConfigKey.tableFixedHeader]:{tag:a.PropertyTag.tableFixedHeader,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableSearch]:{tag:a.PropertyTag.tableSearch,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableSort]:{tag:a.PropertyTag.tableSort,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tablePagination]:{tag:a.PropertyTag.tablePagination,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tablePaginationLimit]:{tag:a.PropertyTag.tablePaginationLimit,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[i.PropertyConfigKey.tableHeight]:{tag:a.PropertyTag.tableHeight,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[i.PropertyConfigKey.tableWhitespaceNoWrap]:{tag:a.PropertyTag.tableWhitespaceNoWrap,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableAutoWidth]:{tag:a.PropertyTag.tableAutoWidth,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.tableResizableColumns]:{tag:a.PropertyTag.tableResizableColumns,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.quizCountItems]:{tag:a.PropertyTag.quizCountItems,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.quizStrikethroughSolutions]:{tag:a.PropertyTag.quizStrikethroughSolutions,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.codeLineNumbers]:{tag:a.PropertyTag.codeLineNumbers,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.codeMinimap]:{tag:a.PropertyTag.codeMinimap,single:!0,format:n.PropertyFormat.boolean},[i.PropertyConfigKey.ratingLevelStart]:{tag:a.PropertyTag.ratingLevelStart,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.ratingLevelEnd]:{tag:a.PropertyTag.ratingLevelEnd,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.ratingLevelSelected]:{tag:a.PropertyTag.ratingLevelSelected,single:!0,format:n.PropertyFormat.number},[i.PropertyConfigKey.label]:{tag:a.PropertyTag.label,single:!0,format:n.PropertyFormat.trimmedString}};t.PROPERTIES=s},168:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RESOURCES=void 0;const i=r(5051),o=r(9984),n=r(6149),a={[i.ResourceConfigKey.image]:{tag:n.ResourceTag.image},[i.ResourceConfigKey.imagePortrait]:{tag:n.ResourceTag.imagePortrait,jsonKey:o.ResourceJsonKey.imagePortrait},[i.ResourceConfigKey.imageLandscape]:{tag:n.ResourceTag.imageLandscape,jsonKey:o.ResourceJsonKey.imageLandscape},[i.ResourceConfigKey.imageEmbed]:{tag:n.ResourceTag.imageEmbed,jsonKey:o.ResourceJsonKey.imageEmbed},[i.ResourceConfigKey.imageLink]:{tag:n.ResourceTag.imageLink,jsonKey:o.ResourceJsonKey.imageLink},[i.ResourceConfigKey.audio]:{tag:n.ResourceTag.audio},[i.ResourceConfigKey.audioEmbed]:{tag:n.ResourceTag.audioEmbed,jsonKey:o.ResourceJsonKey.audioEmbed},[i.ResourceConfigKey.audioLink]:{tag:n.ResourceTag.audioLink,jsonKey:o.ResourceJsonKey.audioLink},[i.ResourceConfigKey.video]:{tag:n.ResourceTag.video},[i.ResourceConfigKey.videoEmbed]:{tag:n.ResourceTag.videoEmbed,jsonKey:o.ResourceJsonKey.videoEmbed},[i.ResourceConfigKey.videoLink]:{tag:n.ResourceTag.videoLink,jsonKey:o.ResourceJsonKey.videoLink},[i.ResourceConfigKey.stillImageFilmEmbed]:{tag:n.ResourceTag.stillImageFilmEmbed,jsonKey:o.ResourceJsonKey.stillImageFilmEmbed},[i.ResourceConfigKey.stillImageFilmLink]:{tag:n.ResourceTag.stillImageFilmLink,jsonKey:o.ResourceJsonKey.stillImageFilmLink},[i.ResourceConfigKey.article]:{tag:n.ResourceTag.article},[i.ResourceConfigKey.articleEmbed]:{tag:n.ResourceTag.articleEmbed,jsonKey:o.ResourceJsonKey.articleEmbed},[i.ResourceConfigKey.articleLink]:{tag:n.ResourceTag.articleLink,jsonKey:o.ResourceJsonKey.articleLink},[i.ResourceConfigKey.document]:{tag:n.ResourceTag.document},[i.ResourceConfigKey.documentEmbed]:{tag:n.ResourceTag.documentEmbed,jsonKey:o.ResourceJsonKey.documentEmbed},[i.ResourceConfigKey.documentLink]:{tag:n.ResourceTag.documentLink,jsonKey:o.ResourceJsonKey.documentLink},[i.ResourceConfigKey.documentDownload]:{tag:n.ResourceTag.documentDownload,jsonKey:o.ResourceJsonKey.documentDownload},[i.ResourceConfigKey.appLink]:{tag:n.ResourceTag.appLink,jsonKey:o.ResourceJsonKey.appLink},[i.ResourceConfigKey.websiteLink]:{tag:n.ResourceTag.websiteLink,jsonKey:o.ResourceJsonKey.websiteLink}};t.RESOURCES=a},9248:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TAGS=void 0;const i=r(7797),o=r(9917),n={[i.TagConfigKey.title]:{tag:o.Tag.tag_title},[i.TagConfigKey.anchor]:{tag:o.Tag.tag_anchor},[i.TagConfigKey.tag_reference]:{tag:o.Tag.tag_reference},[i.TagConfigKey.property]:{tag:o.Tag.tag_property},[i.TagConfigKey.itemLead]:{tag:o.Tag.tag_itemLead},[i.TagConfigKey.instruction]:{tag:o.Tag.tag_instruction},[i.TagConfigKey.hint]:{tag:o.Tag.tag_hint},[i.TagConfigKey.true]:{tag:o.Tag.tag_true},[i.TagConfigKey.false]:{tag:o.Tag.tag_false},[i.TagConfigKey.sampleSolution]:{tag:o.Tag.tag_sampleSolution},[i.TagConfigKey.gap]:{tag:o.Tag.tag_gap},[i.TagConfigKey.tag_mark]:{tag:o.Tag.tag_mark},[i.TagConfigKey.resource]:{tag:o.Tag.tag_resource}};t.TAGS=n},1464:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildInfo=void 0,t.buildInfo={name:"@gmb/bitmark-parser-generator",version:"1.6.5",author:"Get More Brain Ltd",license:"ISC",description:"A bitmark parser and generator using Peggy.js"}},5057:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.SyntaxError=t.StartRules=void 0;const i=r(3029),o=r(3206),n=r(7124);function a(e,t,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,a.prototype),o.expected=t,o.found=r,o.location=i,o.name="SyntaxError",o}function s(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}t.SyntaxError=a,function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(a,Error),a.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(i){var l=this.location.end,u=s("",n.line.toString().length," "),p=i[o.line-1],c=(o.line===l.line?l.column:p.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+u+" |\n"+n.line+" | "+p+"\n"+u+" | "+s("",o.column-1," ")+s("",c,"^")}else t+="\n at "+a}return t},a.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return 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,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return 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,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(a);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."},t.parse=function e(t,r){var s,l={},u=(r=void 0!==r?r:{}).grammarSource,p={bitmark:Wt,bit:function(){var e,t,r,i,o;e=Rt,t=[],r=br();for(;r!==l;)t.push(r),r=br();if((r=Zt())!==l){for(i=[],o=br();o!==l;)i.push(o),o=br();Nt=e,e=Ue(r)}else Rt=e,e=l;return e},cardContent:function(){var e,t,r;e=Rt,t=[],(r=rr())===l&&(r=cr());for(;r!==l;)t.push(r),(r=rr())===l&&(r=cr());return Nt=e,t=dt(t),e=t}},c=Wt,g="[.",y="]",d=":",f="&",m="~~~~",h="====",T="--",b="++",v="===",B="==",C="[@id",P="[",k="#",x="[▼",S="[►",K="[@",w="[%",A="[!",_="[?",I="[+",L="[-",O="[$",E="[_",R="[=",N="[&",V="^]",F="id:",j="\n",G="\r\n",D=/^[^\]]/,M=/^[^:\]]/,U=/^[^&:\]]/,J=/^[ \t]/,$=/^[^\n\r\u2028\u2029]/,z=/^[\r\u2028-\u2029]/,q=/^[ \t\n\r\u2028\u2029]/,H=Mt("[.",!1),W=Ut(["]"],!0,!1),Y=Mt("]",!1),X=Mt(":",!1),Z=Mt("&",!1),Q={type:"any"},ee=Mt("~~~~",!1),te=Mt("====",!1),re=Mt("--",!1),ie=Mt("++",!1),oe=Mt("===",!1),ne=Mt("==",!1),ae=Mt("[@id",!1),se=Mt("[",!1),le=Mt("#",!1),ue=Mt("[▼",!1),pe=Mt("[►",!1),ce=Mt("[@",!1),ge=Mt("[%",!1),ye=Mt("[!",!1),de=Mt("[?",!1),fe=Mt("[+",!1),me=Mt("[-",!1),he=Mt("[$",!1),Te=Mt("[_",!1),be=Mt("[=",!1),ve=Mt("[&",!1),Be=Mt("^]",!1),Ce=Mt("id:",!1),Pe=Ut([":","]"],!0,!1),ke=Ut(["&",":","]"],!0,!1),xe=(Jt("Empty"),Ut([" ","\t"],!1,!1)),Se=Jt("Anything"),Ke=Jt("Character"),we=Ut(["\n","\r","\u2028","\u2029"],!0,!1),Ae=Jt("Line"),_e=(Jt("whitespace in line"),Jt("Blank Line")),Ie=Jt("Line Terminator"),Le=Mt("\n",!1),Oe=Mt("\r\n",!1),Ee=Ut(["\r",["\u2028","\u2029"]],!1,!1),Re=Jt("Whitespace, then Line Terminator"),Ne=Jt("whitespace"),Ve=Ut([" ","\t","\n","\r","\u2028","\u2029"],!1,!1),Fe=function(e,t){return Sr.buildBits([e,...t])},je=function(e){return xr.handleRawBit(e)},Ge=function(e){return e},De=function(e){return xr.handleRawBit(e)},Me=function(e){return e},Ue=function(e){return e},Je=function(e,t){return Sr.buildBit(e,t)},$e=function(e){return Sr.invalidBit(e)},ze=function(e,t){return Sr.buildBitHeader(e,t)},qe=function(e,t){return Sr.buildTextAndResourceType(e,t)},He=function(e){return xr.handleTextFormat(e)},We=function(e){return xr.handleResourceType(e)},Ye=function(e){return xr.handleBitContent(e)},Xe=function(e){return xr.handleTagChain(e)},Ze=function(e){return e},Qe=function(e){return xr.handleBitTag(e)},et=function(e){return{type:i.TypeKey.BodyChar,value:e}},tt=function(e){return xr.handleFooterDivider(e)},rt=function(e){return xr.handleCardSet(e[1].flat())},it=function(){xr.handleCardSetStart()},ot=function(){xr.handleCardSetEnd()},nt=function(e){return xr.handleCards(e)},at=function(e){return xr.handleCardLineOrDivider(e,2)},st=function(e){return xr.handleCardLine(e)},lt=function(e){return xr.handleCardSet(e[1].flat())},ut=function(){xr.handleCardSetStart()},pt=function(){xr.handleCardSetEnd()},ct=function(e){return xr.handleCards(e)},gt=function(e){return xr.handleCardLineOrDivider(e,1)},yt=function(e){return xr.handleCardLine(e)},dt=function(e){return xr.handleCardContent(e)},ft=function(e){return{type:i.TypeKey.CardChar,value:e}},mt=function(e){return xr.handlePropertyTag("id",e)},ht=function(e,t){return xr.handleTag(i.TypeKey.Title,{level:e,title:t})},Tt=function(e){return xr.handleTag(i.TypeKey.Anchor,e)},bt=function(e){return xr.handleTag(i.TypeKey.Reference,e)},vt=function(e,t){return xr.handlePropertyTag(e,t)},Bt=function(e){return xr.handleTag(i.TypeKey.ItemLead,e)},Ct=function(e){return xr.handleTag(i.TypeKey.Instruction,e)},Pt=function(e){return xr.handleTag(i.TypeKey.Hint,e)},kt=function(e){return xr.handleTag(i.TypeKey.True,e)},xt=function(e){return xr.handleTag(i.TypeKey.False,e)},St=function(e){return xr.handleTag(i.TypeKey.SampleSolution,e)},Kt=function(e){return xr.handleTag(i.TypeKey.Gap,e)},wt=function(e){return xr.handleTag(i.TypeKey.Mark,e)},At=function(e,t){return xr.handleResourceTag(e,t)},_t=function(e){return e},It=function(e){return e?e.trim():""},Lt=function(e){return e?e.trim():null},Ot=function(e){return e?e.trim():""},Et=function(){return!0},Rt=0|r.peg$currPos,Nt=Rt,Vt=[{line:1,column:1}],Ft=Rt,jt=r.peg$maxFailExpected||[],Gt=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in p))throw new Error("Can't start parsing from rule \""+r.startRule+'".');c=p[r.startRule]}function Dt(){return t.substring(Nt,Rt)}function Mt(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ut(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Jt(e){return{type:"other",description:e}}function $t(e){var r,i=Vt[e];if(i)return i;if(e>=Vt.length)r=Vt.length-1;else for(r=e;!Vt[--r];);for(i={line:(i=Vt[r]).line,column:i.column};r<e;)10===t.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return Vt[e]=i,i}function zt(e,t,r){var i=$t(e),o=$t(t),n={source:u,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return r&&u&&"function"==typeof u.offset&&(n.start=u.offset(n.start),n.end=u.offset(n.end)),n}function qt(e){Rt<Ft||(Rt>Ft&&(Ft=Rt,jt=[]),jt.push(e))}function Ht(e,t,r){return new a(a.buildMessage(e,t),e,t,r)}function Wt(){return function(){var e,r,i,o;e=Rt,r=[],i=Cr();for(;i!==l;)r.push(i),i=Cr();return i=function(){var e,r,i,o;e=Rt,r=Rt,i=[],o=Xt();for(;o!==l;)i.push(o),o=Xt();return r=t.substring(r,Rt),Nt=e,r=je(r),e=r,e}(),o=function(){var e,t;e=[],t=Yt();for(;t!==l;)e.push(t),t=Yt();return e}(),Nt=e,e=Fe(i,o),e}()}function Yt(){var e,r,i,o;for(e=Rt,r=[],i=br();i!==l;)r.push(i),i=br();return(i=vr())===l&&(i=null),o=function(){var e,r,i,o,n,a;if(e=Rt,r=Rt,i=Rt,o=function(){var e,r,i,o;e=Rt,t.substr(Rt,2)===g?(r=g,Rt+=2):(r=l,0===Gt&&qt(H));if(r!==l){for(i=[],o=t.charAt(Rt),D.test(o)?Rt++:(o=l,0===Gt&&qt(W));o!==l;)i.push(o),o=t.charAt(Rt),D.test(o)?Rt++:(o=l,0===Gt&&qt(W));93===t.charCodeAt(Rt)?(o=y,Rt++):(o=l,0===Gt&&qt(Y)),o!==l?(Nt=e,e=Me(r)):(Rt=e,e=l)}else Rt=e,e=l;return e}(),o!==l){for(n=[],a=Xt();a!==l;)n.push(a),a=Xt();i=o=[o,n]}else Rt=i,i=l;r=i!==l?t.substring(r,Rt):i;r!==l&&(Nt=e,r=De(r));return e=r,e}(),o!==l?(Nt=e,e=Ge(o)):(Rt=e,e=l),e}function Xt(){var e,t,r,i;if(e=Rt,(t=vr())!==l?(r=Rt,Gt++,i=Qt(),Gt--,i===l?r=void 0:(Rt=r,r=l),r!==l?e=t=[t,r]:(Rt=e,e=l)):(Rt=e,e=l),e===l)if(e=[],(t=hr())!==l)for(;t!==l;)e.push(t),t=hr();else e=l;return e}function Zt(){var e,r,i;return e=Rt,(r=Qt())!==l?(i=function(){var e,t,r;e=Rt,t=[],r=ar(),r===l&&(r=sr())===l&&(r=ur())===l&&(r=rr())===l&&(r=nr());for(;r!==l;)t.push(r),(r=ar())===l&&(r=sr())===l&&(r=ur())===l&&(r=rr())===l&&(r=nr());return Nt=e,t=Ye(t),e=t,e}(),Nt=e,e=Je(r,i)):(Rt=e,e=l),e===l&&(e=Rt,r=Rt,i=function(){var e,r;Gt++,e=[],t.length>Rt?(r=t.charAt(Rt),Rt++):(r=l,0===Gt&&qt(Q));for(;r!==l;)e.push(r),t.length>Rt?(r=t.charAt(Rt),Rt++):(r=l,0===Gt&&qt(Q));Gt--,r=l,0===Gt&&qt(Se);return e}(),r=t.substring(r,Rt),Nt=e,e=r=$e(r)),e}function Qt(){var e,r,i,o,n;return e=Rt,t.substr(Rt,2)===g?(r=g,Rt+=2):(r=l,0===Gt&&qt(H)),r!==l?(i=fr(),o=function(){var e,t,r;e=Rt,t=er(),t===l&&(t=tr());t===l&&(t=null);r=er(),r===l&&(r=tr());r===l&&(r=null);return Nt=e,e=qe(t,r),e}(),93===t.charCodeAt(Rt)?(n=y,Rt++):(n=l,0===Gt&&qt(Y)),n!==l?(Nt=e,e=ze(i,o)):(Rt=e,e=l)):(Rt=e,e=l),e}function er(){var e,r,i;return e=Rt,58===t.charCodeAt(Rt)?(r=d,Rt++):(r=l,0===Gt&&qt(X)),r!==l?(i=fr(),Nt=e,e=He(i)):(Rt=e,e=l),e}function tr(){var e,r,i;return e=Rt,38===t.charCodeAt(Rt)?(r=f,Rt++):(r=l,0===Gt&&qt(Z)),r!==l?(i=fr(),Nt=e,e=We(i)):(Rt=e,e=l),e}function rr(){var e,t,r,i,o;if(e=Rt,t=Rt,(r=or())!==l){for(i=[],o=ir();o!==l;)i.push(o),o=ir();t=r=[r,i]}else Rt=t,t=l;return t!==l&&(Nt=e,t=Xe(t)),e=t}function ir(){var e,t;return e=Rt,(t=or())!==l&&(Nt=e,t=Ze(t)),e=t}function or(){var e,r;return e=Rt,r=function(){var e,r,i,o;e=Rt,t.substr(Rt,4)===C?(r=C,Rt+=4):(r=l,0===Gt&&qt(ae));r!==l&&(i=mr())!==l?(o=function(){var e;93===t.charCodeAt(Rt)?(e=y,Rt++):(e=l,0===Gt&&qt(Y));return e}(),o!==l?(Nt=e,e=mt(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=Rt,t.substr(Rt,2)===K?(r=K,Rt+=2):(r=l,0===Gt&&qt(ce));r!==l&&(i=yr())!==l&&(o=mr())!==l&&dr()!==l?(Nt=e,e=vt(i,o)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=Rt,91===t.charCodeAt(Rt)?(r=P,Rt++):(r=l,0===Gt&&qt(se));if(r!==l){if(i=[],35===t.charCodeAt(Rt)?(o=k,Rt++):(o=l,0===Gt&&qt(le)),o!==l)for(;o!==l;)i.push(o),35===t.charCodeAt(Rt)?(o=k,Rt++):(o=l,0===Gt&&qt(le));else i=l;i!==l?(o=gr(),dr()!==l?(Nt=e,e=ht(i,o)):(Rt=e,e=l)):(Rt=e,e=l)}else Rt=e,e=l;return e}(),r===l&&(r=function(){var e,r,i;e=Rt,t.substr(Rt,2)===x?(r=x,Rt+=2):(r=l,0===Gt&&qt(ue));r!==l?(i=gr(),dr()!==l?(Nt=e,e=Tt(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Rt,t.substr(Rt,2)===S?(r=S,Rt+=2):(r=l,0===Gt&&qt(pe));r!==l?(i=gr(),dr()!==l?(Nt=e,e=bt(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Rt,t.substr(Rt,2)===w?(r=w,Rt+=2):(r=l,0===Gt&&qt(ge));r!==l?(i=gr(),dr()!==l?(Nt=e,e=Bt(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Rt,t.substr(Rt,2)===A?(r=A,Rt+=2):(r=l,0===Gt&&qt(ye));r!==l?(i=gr(),dr()!==l?(Nt=e,e=Ct(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Rt,t.substr(Rt,2)===_?(r=_,Rt+=2):(r=l,0===Gt&&qt(de));r!==l?(i=gr(),dr()!==l?(Nt=e,e=Pt(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Rt,t.substr(Rt,2)===E?(r=E,Rt+=2):(r=l,0===Gt&&qt(Te));r!==l?(i=gr(),dr()!==l?(Nt=e,e=Kt(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Rt,t.substr(Rt,2)===R?(r=R,Rt+=2):(r=l,0===Gt&&qt(be));r!==l?(i=gr(),dr()!==l?(Nt=e,e=wt(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Rt,t.substr(Rt,2)===O?(r=O,Rt+=2):(r=l,0===Gt&&qt(he));r!==l?(i=gr(),dr()!==l?(Nt=e,e=St(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Rt,t.substr(Rt,2)===I?(r=I,Rt+=2):(r=l,0===Gt&&qt(fe));r!==l?(i=gr(),dr()!==l?(Nt=e,e=kt(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i;e=Rt,t.substr(Rt,2)===L?(r=L,Rt+=2):(r=l,0===Gt&&qt(me));r!==l?(i=gr(),dr()!==l?(Nt=e,e=xt(i)):(Rt=e,e=l)):(Rt=e,e=l);return e}(),r===l&&(r=function(){var e,r,i,o;e=Rt,t.substr(Rt,2)===N?(r=N,Rt+=2):(r=l,0===Gt&&qt(ve));r!==l&&(i=yr())!==l&&(o=mr())!==l&&dr()!==l?(Nt=e,e=At(i,o)):(Rt=e,e=l);return e}()))))))))))))),r!==l&&(Nt=e,r=Qe(r)),e=r}function nr(){var e,r;return e=Rt,t.length>Rt?(r=t.charAt(Rt),Rt++):(r=l,0===Gt&&qt(Q)),r!==l&&(Nt=e,r=et(r)),e=r}function ar(){return function(){var e,r,i,o,n;e=Rt,r=Rt,(i=vr())!==l?(t.substr(Rt,4)===m?(o=m,Rt+=4):(o=l,0===Gt&&qt(ee)),o!==l&&(n=Br())!==l?r=i=[i,o,n]:(Rt=r,r=l)):(Rt=r,r=l);r!==l&&(Nt=e,r=tt(r));return e=r,e}()}function sr(){var e,r,i,o,n;if(e=Rt,r=Rt,i=function(){var e,r,i,o,n,a;e=Rt,r=vr(),r!==l?(i=Rt,Gt++,o=Rt,t.substr(Rt,4)===h?(n=h,Rt+=4):(n=l,0===Gt&&qt(te)),n!==l&&(a=Br())!==l?o=n=[n,a]:(Rt=o,o=l),Gt--,o!==l?(Rt=i,i=void 0):i=l,i!==l?(Nt=e,e=it()):(Rt=e,e=l)):(Rt=e,e=l);return e}(),i!==l){for(o=[],n=lr();n!==l;)o.push(n),n=lr();n=function(){var e,r,i,o,n;e=Rt,r=Rt,t.substr(Rt,4)===m?(i=m,Rt+=4):(i=l,0===Gt&&qt(ee));i===l&&(i=null);o=Rt,Gt++,n=Pr(),Gt--,n!==l?(Rt=o,o=void 0):o=l;o!==l?r=i=[i,o]:(Rt=r,r=l);r!==l&&(Nt=e,r=ot());return e=r,e}(),n!==l?r=i=[i,o,n]:(Rt=r,r=l)}else Rt=r,r=l;return r!==l&&(Nt=e,r=rt(r)),e=r}function lr(){var e,r;return e=Rt,r=function(){var e,r,i,o;e=Rt,r=Rt,t.substr(Rt,4)===h?(i=h,Rt+=4):(i=l,0===Gt&&qt(te));i!==l?((o=Br())===l&&(o=Pr()),o!==l?r=i=[i,o]:(Rt=r,r=l)):(Rt=r,r=l);r===l&&(r=Rt,t.substr(Rt,2)===T?(i=T,Rt+=2):(i=l,0===Gt&&qt(re)),i!==l?((o=Br())===l&&(o=Pr()),o!==l?r=i=[i,o]:(Rt=r,r=l)):(Rt=r,r=l),r===l&&(r=Rt,t.substr(Rt,2)===b?(i=b,Rt+=2):(i=l,0===Gt&&qt(ie)),i!==l?((o=Br())===l&&(o=Pr()),o!==l?r=i=[i,o]:(Rt=r,r=l)):(Rt=r,r=l),r===l&&(r=function(){var e,r,i,o,n,a;e=Rt,r=Rt,Gt++,i=Rt,t.substr(Rt,4)===m?(o=m,Rt+=4):(o=l,0===Gt&&qt(ee));o!==l&&(n=Pr())!==l?i=o=[o,n]:(Rt=i,i=l);Gt--,i===l?r=void 0:(Rt=r,r=l);if(r!==l){if(i=Rt,o=Rt,n=Tr(),(a=vr())!==l?o=n=[n,a]:(Rt=o,o=l),o===l){if(o=Rt,n=[],(a=hr())!==l)for(;a!==l;)n.push(a),a=hr();else n=l;n!==l?(a=function(){var e,r;e=vr(),e===l&&(e=Rt,Gt++,t.length>Rt?(r=t.charAt(Rt),Rt++):(r=l,0===Gt&&qt(Q)),Gt--,r===l?e=void 0:(Rt=e,e=l));return e}(),a!==l?o=n=[n,a]:(Rt=o,o=l)):(Rt=o,o=l)}(i=o!==l?t.substring(i,Rt):o)!==l?(Nt=e,e=st(i)):(Rt=e,e=l)}else Rt=e,e=l;return e}())));r!==l&&(Nt=e,r=at(r));return e=r,e}(),r!==l&&(Nt=e,r=nt(r)),e=r}function ur(){var e,r,i,o,n;if(e=Rt,r=Rt,i=function(){var e,r,i,o,n,a;e=Rt,r=vr(),r!==l?(i=Rt,Gt++,o=Rt,t.substr(Rt,3)===v?(n=v,Rt+=3):(n=l,0===Gt&&qt(oe)),n!==l&&(a=Br())!==l?o=n=[n,a]:(Rt=o,o=l),Gt--,o!==l?(Rt=i,i=void 0):i=l,i!==l?(Nt=e,e=ut()):(Rt=e,e=l)):(Rt=e,e=l);return e}(),i!==l){for(o=[],n=pr();n!==l;)o.push(n),n=pr();n=function(){var e,r,i,o,n;e=Rt,r=Rt,t.substr(Rt,3)===v?(i=v,Rt+=3):(i=l,0===Gt&&qt(oe));i!==l?(o=Rt,Gt++,n=Pr(),Gt--,n!==l?(Rt=o,o=void 0):o=l,o!==l?r=i=[i,o]:(Rt=r,r=l)):(Rt=r,r=l);r!==l&&(Nt=e,r=pt());return e=r,e}(),n!==l?r=i=[i,o,n]:(Rt=r,r=l)}else Rt=r,r=l;return r!==l&&(Nt=e,r=lt(r)),e=r}function pr(){var e,r,i,o,n,a,s,u,p,c,g;if(e=Rt,r=Rt,Gt++,i=Rt,t.substr(Rt,3)===v?(o=v,Rt+=3):(o=l,0===Gt&&qt(oe)),o!==l){for(n=[],a=Cr();a!==l;)n.push(a),a=Cr();for(a=[],s=Rt,u=Rt,Gt++,p=Rt,(c=vr())!==l?(t.substr(Rt,3)===v?(g=v,Rt+=3):(g=l,0===Gt&&qt(oe)),g!==l?p=c=[c,g]:(Rt=p,p=l)):(Rt=p,p=l),Gt--,p===l?u=void 0:(Rt=u,u=l),u!==l?(t.length>Rt?(p=t.charAt(Rt),Rt++):(p=l,0===Gt&&qt(Q)),p!==l?s=u=[u,p]:(Rt=s,s=l)):(Rt=s,s=l);s!==l;)a.push(s),s=Rt,u=Rt,Gt++,p=Rt,(c=vr())!==l?(t.substr(Rt,3)===v?(g=v,Rt+=3):(g=l,0===Gt&&qt(oe)),g!==l?p=c=[c,g]:(Rt=p,p=l)):(Rt=p,p=l),Gt--,p===l?u=void 0:(Rt=u,u=l),u!==l?(t.length>Rt?(p=t.charAt(Rt),Rt++):(p=l,0===Gt&&qt(Q)),p!==l?s=u=[u,p]:(Rt=s,s=l)):(Rt=s,s=l);(s=kr())!==l?i=o=[o,n,a,s]:(Rt=i,i=l)}else Rt=i,i=l;return Gt--,i===l?r=void 0:(Rt=r,r=l),r!==l?(i=function(){var e,r,i,o;e=Rt,r=Rt,t.substr(Rt,3)===v?(i=v,Rt+=3):(i=l,0===Gt&&qt(oe));i!==l&&(o=Br())!==l?r=i=[i,o]:(Rt=r,r=l);r===l&&(r=Rt,t.substr(Rt,2)===B?(i=B,Rt+=2):(i=l,0===Gt&&qt(ne)),i!==l&&(o=Br())!==l?r=i=[i,o]:(Rt=r,r=l),r===l&&(r=Rt,t.substr(Rt,2)===T?(i=T,Rt+=2):(i=l,0===Gt&&qt(re)),i!==l&&(o=Br())!==l?r=i=[i,o]:(Rt=r,r=l),r===l&&(r=function(){var e,r,i,o,n;e=Rt,r=Rt,i=Rt,o=Tr(),n=vr(),n!==l?i=o=[o,n]:(Rt=i,i=l);r=i!==l?t.substring(r,Rt):i;r!==l&&(Nt=e,r=yt(r));return e=r,e}())));r!==l&&(Nt=e,r=gt(r));return e=r,e}(),i!==l?(Nt=e,e=ct(i)):(Rt=e,e=l)):(Rt=e,e=l),e}function cr(){var e,r;return e=Rt,t.length>Rt?(r=t.charAt(Rt),Rt++):(r=l,0===Gt&&qt(Q)),r!==l&&(Nt=e,r=ft(r)),e=r}function gr(){var e,r,i,o;for(e=Rt,r=Rt,i=[],t.substr(Rt,2)===V?(o=V,Rt+=2):(o=l,0===Gt&&qt(Be)),o===l&&(o=t.charAt(Rt),D.test(o)?Rt++:(o=l,0===Gt&&qt(W)));o!==l;)i.push(o),t.substr(Rt,2)===V?(o=V,Rt+=2):(o=l,0===Gt&&qt(Be)),o===l&&(o=t.charAt(Rt),D.test(o)?Rt++:(o=l,0===Gt&&qt(W)));return r=t.substring(r,Rt),Nt=e,e=r=_t(r)}function yr(){var e,r,i,o,n;if(e=Rt,r=Rt,Gt++,t.substr(Rt,3)===F?(i=F,Rt+=3):(i=l,0===Gt&&qt(Ce)),Gt--,i===l?r=void 0:(Rt=r,r=l),r!==l){for(i=Rt,o=[],n=t.charAt(Rt),M.test(n)?Rt++:(n=l,0===Gt&&qt(Pe));n!==l;)o.push(n),n=t.charAt(Rt),M.test(n)?Rt++:(n=l,0===Gt&&qt(Pe));i=t.substring(i,Rt),Nt=e,e=It(i)}else Rt=e,e=l;return e}function dr(){var e,r,i;if(93===t.charCodeAt(Rt)?(e=y,Rt++):(e=l,0===Gt&&qt(Y)),e===l){for(e=Rt,r=[],i=Cr();i!==l;)r.push(i),i=Cr();(i=kr())!==l?e=r=[r,i]:(Rt=e,e=l)}return e}function fr(){var e,r,i,o;for(e=Rt,r=Rt,i=[],o=t.charAt(Rt),U.test(o)?Rt++:(o=l,0===Gt&&qt(ke));o!==l;)i.push(o),o=t.charAt(Rt),U.test(o)?Rt++:(o=l,0===Gt&&qt(ke));return r=t.substring(r,Rt),Nt=e,e=r=Lt(r)}function mr(){var e,r,i;return e=Rt,58===t.charCodeAt(Rt)?(r=d,Rt++):(r=l,0===Gt&&qt(X)),r!==l?(i=gr(),Nt=e,e=Ot(i)):(Rt=e,e=l),e===l&&(r="",Nt=e=Rt,e=r=Et()),e}function hr(){var e;return Gt++,e=t.charAt(Rt),$.test(e)?Rt++:(e=l,0===Gt&&qt(we)),Gt--,e===l&&(l,0===Gt&&qt(Ke)),e}function Tr(){var e,t;for(Gt++,e=[],t=hr();t!==l;)e.push(t),t=hr();return Gt--,t=l,0===Gt&&qt(Ae),e}function br(){var e,r,i;for(Gt++,e=Rt,r=[],i=t.charAt(Rt),J.test(i)?Rt++:(i=l,0===Gt&&qt(xe));i!==l;)r.push(i),i=t.charAt(Rt),J.test(i)?Rt++:(i=l,0===Gt&&qt(xe));return(i=vr())!==l?e=r=[r,i]:(Rt=e,e=l),Gt--,e===l&&(r=l,0===Gt&&qt(_e)),e}function vr(){var e;return Gt++,10===t.charCodeAt(Rt)?(e=j,Rt++):(e=l,0===Gt&&qt(Le)),e===l&&(t.substr(Rt,2)===G?(e=G,Rt+=2):(e=l,0===Gt&&qt(Oe)),e===l&&(e=t.charAt(Rt),z.test(e)?Rt++:(e=l,0===Gt&&qt(Ee)))),Gt--,e===l&&(l,0===Gt&&qt(Ie)),e}function Br(){var e,r,i;for(Gt++,e=Rt,r=[],i=t.charAt(Rt),J.test(i)?Rt++:(i=l,0===Gt&&qt(xe));i!==l;)r.push(i),i=t.charAt(Rt),J.test(i)?Rt++:(i=l,0===Gt&&qt(xe));return(i=vr())!==l?e=r=[r,i]:(Rt=e,e=l),Gt--,e===l&&(r=l,0===Gt&&qt(Re)),e}function Cr(){var e;return Gt++,e=t.charAt(Rt),q.test(e)?Rt++:(e=l,0===Gt&&qt(Ve)),Gt--,e===l&&(l,0===Gt&&qt(Ne)),e}function Pr(){var e,r;return(e=Br())===l&&(e=Rt,Gt++,t.length>Rt?(r=t.charAt(Rt),Rt++):(r=l,0===Gt&&qt(Q)),Gt--,r===l?e=void 0:(Rt=e,e=l)),e}function kr(){var e,r;return e=Rt,Gt++,t.length>Rt?(r=t.charAt(Rt),Rt++):(r=l,0===Gt&&qt(Q)),Gt--,r===l?e=void 0:(Rt=e,e=l),e}const xr=new o.BitmarkPegParserHelper({parse:e,parserText:Dt,parserLocation:Kr}),Sr=new n.BitmarkPegParserProcessor({parse:e,parserText:Dt,parserLocation:Kr});function Kr(){const e=zt(Nt,Rt);return e?(delete e.source,e):e}function zt(e,t,r){var i=$t(e),o=$t(t),n={source:u,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return u&&"function"==typeof u.offset&&(n.start=u.offset(n.start),n.end=u.offset(n.end)),n}if(s=c(),r.peg$library)return{peg$result:s,peg$currPos:Rt,peg$FAILED:l,peg$maxFailExpected:jt,peg$maxFailPos:Ft};if(s!==l&&Rt===t.length)return s;throw s!==l&&Rt<t.length&&qt({type:"end"}),Ht(jt,Ft<t.length?t.charAt(Ft):null,Ft<t.length?zt(Ft,Ft+1):zt(Ft,Ft))};t.StartRules=["bitmark","bit","cardContent"]},8321:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.SyntaxError=t.StartRules=void 0;const i=r(7735),o="8.10.3";function n(e){let t=e||"";return t=i.Breakscape.unbreakscape(t),t}function a(e){e&&"object"==typeof e&&(delete e._tempParsingParent,delete e._tempListStart,Object.keys(e).forEach((t=>{a(e[t])})))}function s(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkPlusString"}):c(e,{startRule:"bitmarkPlusString"})}function l(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkMinusMinusString"}):c(e,{startRule:"bitmarkMinusMinusString"})}function u(e,t,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,u.prototype),o.expected=t,o.found=r,o.location=i,o.name="SyntaxError",o}function p(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function c(e,t){var r,i={},p=(t=void 0!==t?t:{}).grammarSource,c={version:Co,bitmarkPlusPlus:function(){var e,t;if(yo++,e=[],(t=Po())!==i)for(;t!==i;)e.push(t),t=Po();else e=i;e===i&&(e=function(){var e,t;return e=uo,t="",e,t=Xr(),e=t,e}());yo--,e===i&&(t=i,0===yo&&vo(et));return e},bitmarkPlus:function(){var e,t;yo++,e=uo,t=zo(),e,t=Li(t),e=t,yo--,t=i,0===yo&&vo(et);return e},bitmarkMinusMinus:function(){var e,t;yo++,e=uo,t=en(),e,t=eo(t),e=t,yo--,t=i,0===yo&&vo(Kr);return e},bitmarkPlusString:function(){var e;yo++,e=zo(),yo--,i,0===yo&&vo(_t);return e},bitmarkMinusMinusString:en},g=Co,y="|",d=":",f="### ",m="## ",h="# ",T="code",b="bitmark++",v="bitmark--",B="JavaScript",C="• ",P="•",k=" ",x="•A ",S="•+ ",K="•- ",w="\t",A="image",_="#",I="@",L="width",O="height",E="alignment",R="captionAlign",N="left",V="center",F="right",j="=",G="𝑓",D="link:",M="var:",U="code:",J="timer",$="timer:",z="duration:",q="P",H="color:",W="bold",Y="italic",X="light",Z="highlight",Q="strike",ee="subscript",te="superscript",re="ins",ie="del",oe="underline",ne="doubleUnderline",ae="circle",se="languageEm",le="userUnderline",ue="userDoubleUnderline",pe="userStrike",ce="userCircle",ge="userHighlight",ye="aqua",de="black",fe="blue",me="pink",he="fuchsia",Te="lightgrey",be="gray",ve="darkgray",Be="green",Ce="lime",Pe="magenta",ke="maroon",xe="navy",Se="olive",Ke="orange",we="purple",Ae="red",_e="silver",Ie="teal",Le="violet",Oe="white",Ee="yellow",Re="*",Ne="_",Ve="`",Fe="!",je="[!",Ge="]",De="\n",Me="\r\n",Ue="http",Je="s",$e="://",ze="mailto:",qe=/^[ \t]/,He=/^[0-9]/,We=/^[:|]/,Ye=/^[\r\u2028-\u2029]/,Xe=/^[^\n\r\u2028\u2029]/,Ze=/^[!#-;=?-[\]-_a-{}-~]/,Qe={type:"any"},et=ho("StyledText"),tt=fo("|",!1),rt=fo(":",!1),it=fo("### ",!1),ot=fo("## ",!1),nt=fo("# ",!1),at=fo("code",!1),st=mo([" ","\t"],!1,!1),lt=fo("bitmark++",!1),ut=fo("bitmark--",!1),pt=fo("JavaScript",!1),ct=fo("• ",!1),gt=fo("•",!1),yt=mo([["0","9"]],!1,!1),dt=fo(" ",!1),ft=fo("•A ",!1),mt=fo("•+ ",!1),ht=fo("•- ",!1),Tt=fo("\t",!1),bt=fo("image",!1),vt=fo("#",!1),Bt=fo("@",!1),Ct=mo([":","|"],!1,!1),Pt=fo("width",!1),kt=fo("height",!1),xt=fo("alignment",!1),St=fo("captionAlign",!1),Kt=fo("left",!1),wt=fo("center",!1),At=fo("right",!1),_t=ho("StyledString"),It=fo("=",!1),Lt=fo("𝑓",!1),Ot=fo("link:",!1),Et=fo("var:",!1),Rt=fo("code:",!1),Nt=fo("timer",!1),Vt=fo("timer:",!1),Ft=fo("duration:",!1),jt=fo("P",!1),Gt=fo("color:",!1),Dt=fo("bold",!1),Mt=fo("italic",!1),Ut=fo("light",!1),Jt=fo("highlight",!1),$t=fo("strike",!1),zt=fo("subscript",!1),qt=fo("superscript",!1),Ht=fo("ins",!1),Wt=fo("del",!1),Yt=fo("underline",!1),Xt=fo("doubleUnderline",!1),Zt=fo("circle",!1),Qt=fo("languageEm",!1),er=fo("userUnderline",!1),tr=fo("userDoubleUnderline",!1),rr=fo("userStrike",!1),ir=fo("userCircle",!1),or=fo("userHighlight",!1),nr=fo("aqua",!1),ar=fo("black",!1),sr=fo("blue",!1),lr=fo("pink",!1),ur=fo("fuchsia",!1),pr=fo("lightgrey",!1),cr=fo("gray",!1),gr=fo("darkgray",!1),yr=fo("green",!1),dr=fo("lime",!1),fr=fo("magenta",!1),mr=fo("maroon",!1),hr=fo("navy",!1),Tr=fo("olive",!1),br=fo("orange",!1),vr=fo("purple",!1),Br=fo("red",!1),Cr=fo("silver",!1),Pr=fo("teal",!1),kr=fo("violet",!1),xr=fo("white",!1),Sr=fo("yellow",!1),Kr=ho("MinimalStyledText"),wr=ho("MinimalStyledString"),Ar=fo("*",!1),_r=fo("_",!1),Ir=fo("`",!1),Lr=fo("!",!1),Or=fo("[!",!1),Er=fo("]",!1),Rr=ho("Line Terminator"),Nr=fo("\n",!1),Vr=fo("\r\n",!1),Fr=mo(["\r",["\u2028","\u2029"]],!1,!1),jr=(ho("whitespace in line"),ho("space"),ho("language tag separator"),ho("white space, separator"),mo(["\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!1,!1),mo(["\n","\r","\u2028","\u2029"],!1,!1),mo(["\n","\r","\u2028","\u2029"],!0,!1)),Gr=(mo(["\n","\r","\u2028","\u2029","\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!0,!1),fo("http",!1)),Dr=fo("s",!1),Mr=fo("://",!1),Ur=fo("mailto:",!1),Jr=mo(["!",["#",";"],"=",["?","["],["]","_"],["a","{"],["}","~"]],!1,!1),$r=function(){return o},zr=function(e){return Object.assign({},e)},qr=function(e){let t=Object.assign({},e);return a(t),t},Hr=function(e){return Object.assign({},e)},Wr=function(e){return Object.assign({},e)},Yr=function(e){return Object.assign({},e)},Xr=function(){return[]},Zr=function(e,t){return{type:"heading",content:l(t),attrs:{level:e.length-1}}},Qr=function(e){return e},ei=function(e,t){return Object.assign(Object.assign({},e),{content:t})},ti=function(){return{type:"codeBlock",language:""}},ri=function(e){return{type:"codeBlock",attrs:{language:e.trim().toLowerCase()}}},ii=function(e){return[{type:"text",text:n(e.trim())}]},oi=function(e){return e},ni=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},ai=function(e,t){let r=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:r},content:t})},si=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},li=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},ui=function(){return{type:"bulletList"}},pi=function(){return{type:"orderedList"}},ci=function(){return{type:"letteredList"}},gi=function(){return{type:"taskList"}},yi=function(e,t,r,i){return i},di=function(e,t,r,i){let o="bulletList";const n=e.match(/•([0-9]+) /);let a=1;n&&(o="orderedList",n.length>1&&(a=Number(n[1]))),"•A "==e&&(o="letteredList"),"•+ "!=e&&"•- "!=e||(o="taskList");let l=[{type:"paragraph",attrs:{},content:s((t+r.join("")).trim())}];if(i&&i[0]&&i[0]._tempParsingParent){let e={type:i[0]._tempParsingParent,attrs:{start:a},content:i};if(("orderedList"==e.type||"letteredList"==e.type)&&i[0]._tempListStart){const t=i[0]._tempListStart;t>1&&(e.attrs.start=t)}l.push(e)}let u="listItem",p=null;if("taskList"==o){u="taskItem";let t=!1;"•+ "==e&&(t=!0),p={checked:t}}return p?{type:u,attrs:p,content:l,_tempParsingParent:o,_tempListStart:a}:{type:u,content:l,_tempParsingParent:o,_tempListStart:a}},fi=function(e){return e},mi=function(e){return e.join("")===vn},hi=function(e){return e.length>vn.length},Ti=function(e){bn.push(vn),vn=e.join("")},bi=function(){return vn=bn.pop(),!0},vi=function(e){return{type:"paragraph",content:s(e.trim()),attrs:{}}},Bi=function(e){return{type:"paragraph",content:s(e.trim()),attrs:{}}},Ci=function(e){return{type:"paragraph",content:s(e.trim()),attrs:{}}},Pi=function(e){return e},ki=function(e,t,r){const i=Object.assign({},...r);let o=i.alignment||"center";delete i.alignment;let n=i.captionAlign||"left";delete i.captionAlign;let a=i.alt||null;delete i.alt;let s=i.caption||null;delete i.caption;let l=i.align||"center";delete i.align;let u=i.zoomDisabled||Boolean(i.zoomDisabled);return delete i.zoomDisabled,{type:e,attrs:Object.assign({alignment:o,textAlign:n,src:t,alt:a,title:s,class:l,zoomDisabled:u},i)}},xi=function(e){return e},Si=function(e){return{comment:e}},Ki=function(e,t){return{[e]:parseInt(t)}},wi=function(e,t){return{type:"error",msg:e+" must be an positive integer.",found:t}},Ai=function(e,t){return{[e]:t}},_i=function(e,t){return{[e]:t}},Ii=function(e){return{[e]:!0}},Li=function(e){return[{type:"paragraph",content:e,attrs:{}}]},Oi=function(e,t){return e?[e,...t.flat()]:t.flat()},Ei=function(){return{type:"hardBreak"}},Ri=function(e){return{text:n(e),type:"text"}},Ni=function(e){return{index:+e,type:"bit"}},Vi=function(e,t){return t||(t=[]),{marks:t,text:n(e),type:"text"}},Fi=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},ji=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},Gi=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},Di=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},Mi=function(e){return{marks:[{type:"link",attrs:{href:(e.pr+e.t).trim(),target:"_blank"}}],text:e.t,type:"text"}},Ui=function(e){return e},Ji=function(e){return{type:"link",attrs:{href:e.trim(),target:"_blank"}}},$i=function(e){return{type:"var",attrs:{name:e.trim()}}},zi=function(){return{type:"code",attrs:{language:"plain text"}}},qi=function(e){return{type:"code",attrs:{language:e.trim().toLowerCase()}}},Hi=function(){return{type:"timer",attrs:{name:""}}},Wi=function(e){return{type:"timer",attrs:{name:e.trim()}}},Yi=function(e){return{type:"duration",attrs:{duration:e}}},Xi=function(e){return{type:"color",attrs:{color:e}}},Zi=function(e){return{type:e}},Qi=function(e){return{type:"comment",comment:e}},eo=function(e){return[{type:"paragraph",content:e,attrs:{}}]},to=function(e,t){return e?[e,...t.flat()]:t.flat()},ro=function(e){return{text:n(e),type:"text"}},io=function(e){return{index:+e,type:"bit"}},oo=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},no=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},ao=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},so=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},lo=function(e,t){return{pr:e,t}},uo=0|t.peg$currPos,po=[{line:1,column:1}],co=uo,go=t.peg$maxFailExpected||[],yo=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in c))throw new Error("Can't start parsing from rule \""+t.startRule+'".');g=c[t.startRule]}function fo(e,t){return{type:"literal",text:e,ignoreCase:t}}function mo(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function ho(e){return{type:"other",description:e}}function To(t){var r,i=po[t];if(i)return i;if(t>=po.length)r=po.length-1;else for(r=t;!po[--r];);for(i={line:(i=po[r]).line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return po[t]=i,i}function bo(e,t,r){var i=To(e),o=To(t),n={source:p,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}};return r&&p&&"function"==typeof p.offset&&(n.start=p.offset(n.start),n.end=p.offset(n.end)),n}function vo(e){uo<co||(uo>co&&(co=uo,go=[]),go.push(e))}function Bo(e,t,r){return new u(u.buildMessage(e,t),e,t,r)}function Co(){var t,r,o;for(t=uo,r=[],e.length>uo?(o=e.charAt(uo),uo++):(o=i,0===yo&&vo(Qe));o!==i;)r.push(o),e.length>uo?(o=e.charAt(uo),uo++):(o=i,0===yo&&vo(Qe));return t,t=r=$r()}function Po(){var t,r;return t=uo,r=function(){var t,r,o,n,a;if(t=uo,r=So(),r!==i){for(o=uo,n=[],a=mn();a!==i;)n.push(a),a=mn();o=e.substring(o,uo),(n=hn())!==i?((a=fn())===i&&(a=null),t,t=Zr(r,o)):(uo=t,t=i)}else uo=t,t=i;return t}(),r!==i&&(t,r=zr(r)),(t=r)===i&&(t=uo,r=function(){var e,t,r,o;if(e=uo,t=function(){var e,t,r;e=uo,t=uo,yo++,r=_o(),yo--,r!==i?(uo=t,t=void 0):t=i;t!==i&&(e,t=ui());return e=t,e}(),t!==i){if(r=[],(o=Ro())!==i)for(;o!==i;)r.push(o),o=Ro();else r=i;r!==i?((o=fn())===i&&(o=null),e,e=ni(t,r)):(uo=e,e=i)}else uo=e,e=i;if(e===i){if(e=uo,t=function(){var e,t,r;e=uo,t=uo,yo++,r=Io(),yo--,r!==i?(uo=t,t=void 0):t=i;t!==i&&(e,t=pi());return e=t,e}(),t!==i){if(r=[],(o=Ro())!==i)for(;o!==i;)r.push(o),o=Ro();else r=i;r!==i?((o=fn())===i&&(o=null),e,e=ai(t,r)):(uo=e,e=i)}else uo=e,e=i;if(e===i){if(e=uo,t=function(){var e,t,r;e=uo,t=uo,yo++,r=Lo(),yo--,r!==i?(uo=t,t=void 0):t=i;t!==i&&(e,t=ci());return e=t,e}(),t!==i){if(r=[],(o=Ro())!==i)for(;o!==i;)r.push(o),o=Ro();else r=i;r!==i?((o=fn())===i&&(o=null),e,e=si(t,r)):(uo=e,e=i)}else uo=e,e=i;if(e===i)if(e=uo,t=function(){var e,t,r;e=uo,t=uo,yo++,r=Oo(),yo--,r!==i?(uo=t,t=void 0):t=i;t!==i&&(e,t=gi());return e=t,e}(),t!==i){if(r=[],(o=Ro())!==i)for(;o!==i;)r.push(o),o=Ro();else r=i;r!==i?((o=fn())===i&&(o=null),e,e=li(t,r)):(uo=e,e=i)}else uo=e,e=i}}return e}(),r!==i&&(t,r=qr(r)),(t=r)===i&&(t=uo,(r=Mo())!==i&&(t,r=Hr(r)),(t=r)===i&&(t=uo,r=function(){var t,r,o;t=uo,r=wo(),r!==i?(o=function(){var t,r,o,n;t=uo,r=uo,o=[],n=Ao();for(;n!==i;)o.push(n),n=Ao();return r=e.substring(r,uo),t,r=ii(r),t=r,t}(),t,t=ei(r,o)):(uo=t,t=i);return t}(),r!==i&&(t,r=Wr(r)),(t=r)===i&&(t=uo,r=function(){var e,t,r;e=uo,t=uo,yo++,r=ko(),yo--,r===i?t=void 0:(uo=t,t=i);t!==i&&(r=Fo())!==i?(e,e=vi(r)):(uo=e,e=i);e===i&&(e=uo,(t=Go())!==i&&(r=Fo())!==i?(e,e=Bi(r)):(uo=e,e=i),e===i&&(e=uo,(t=Go())!==i?(e,e=Ci(r="")):(uo=e,e=i)));return e}(),r!==i&&(t,r=Yr(r)),t=r)))),t}function ko(){var e;return(e=So())===i&&(e=Eo())===i&&(e=Mo())===i&&(e=wo())===i&&(e=Go()),e}function xo(){var t;return 124===e.charCodeAt(uo)?(t=y,uo++):(t=i,0===yo&&vo(tt)),t}function So(){var t;return e.substr(uo,4)===f?(t=f,uo+=4):(t=i,0===yo&&vo(it)),t===i&&(e.substr(uo,3)===m?(t=m,uo+=3):(t=i,0===yo&&vo(ot)),t===i&&(e.substr(uo,2)===h?(t=h,uo+=2):(t=i,0===yo&&vo(nt)))),t}function Ko(){var t,r;return t=uo,xo()!==i?(r=function(){var t;return e.substr(uo,4)===T?(t=T,uo+=4):(t=i,0===yo&&vo(at)),t}(),r!==i?(t,t=Qr(r)):(uo=t,t=i)):(uo=t,t=i),t}function wo(){var t,r,o,n,a,s,l;if(t=uo,Ko()!==i){for(r=uo,o=uo,n=[],a=e.charAt(uo),qe.test(a)?uo++:(a=i,0===yo&&vo(st));a!==i;)n.push(a),a=e.charAt(uo),qe.test(a)?uo++:(a=i,0===yo&&vo(st));(a=hn())!==i?o=n=[n,a]:(uo=o,o=i),(r=o!==i?e.substring(r,uo):o)!==i?(t,t=ti()):(uo=t,t=i)}else uo=t,t=i;if(t===i)if(t=uo,Ko()!==i)if(58===e.charCodeAt(uo)?(r=d,uo++):(r=i,0===yo&&vo(rt)),r!==i)if(o=function(){var t,r,o;e.substr(uo,9)===b?(t=b,uo+=9):(t=i,0===yo&&vo(lt));if(t===i&&(e.substr(uo,9)===v?(t=v,uo+=9):(t=i,0===yo&&vo(ut)),t===i&&(e.substr(uo,10)===B?(t=B,uo+=10):(t=i,0===yo&&vo(pt)),t===i))){if(t=uo,r=[],(o=mn())!==i)for(;o!==i;)r.push(o),o=mn();else r=i;(t=r!==i?e.substring(t,uo):r)===i&&(t="")}return t}(),o!==i){for(n=uo,a=uo,s=[],l=e.charAt(uo),qe.test(l)?uo++:(l=i,0===yo&&vo(st));l!==i;)s.push(l),l=e.charAt(uo),qe.test(l)?uo++:(l=i,0===yo&&vo(st));(l=hn())!==i?a=s=[s,l]:(uo=a,a=i),(n=a!==i?e.substring(n,uo):a)!==i?(t,t=ri(o)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;else uo=t,t=i;return t}function Ao(){var t,r,o,n,a,s;if(t=uo,r=uo,yo++,o=ko(),yo--,o===i?r=void 0:(uo=r,r=i),r!==i){if(o=uo,n=uo,a=[],(s=mn())!==i)for(;s!==i;)a.push(s),s=mn();else a=i;a!==i&&(s=hn())!==i?n=a=[a,s]:(uo=n,n=i),(o=n!==i?e.substring(o,uo):n)!==i?(t,t=oi(o)):(uo=t,t=i)}else uo=t,t=i;return t===i&&(t=fn()),t}function _o(){var t;return e.substr(uo,2)===C?(t=C,uo+=2):(t=i,0===yo&&vo(ct)),t}function Io(){var t,r,o,n,a;if(t=uo,r=uo,8226===e.charCodeAt(uo)?(o=P,uo++):(o=i,0===yo&&vo(gt)),o!==i){for(n=[],a=e.charAt(uo),He.test(a)?uo++:(a=i,0===yo&&vo(yt));a!==i;)n.push(a),a=e.charAt(uo),He.test(a)?uo++:(a=i,0===yo&&vo(yt));32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a!==i?r=o=[o,n,a]:(uo=r,r=i)}else uo=r,r=i;return t=r!==i?e.substring(t,uo):r}function Lo(){var t;return e.substr(uo,3)===x?(t=x,uo+=3):(t=i,0===yo&&vo(ft)),t}function Oo(){var t;return e.substr(uo,3)===S?(t=S,uo+=3):(t=i,0===yo&&vo(mt)),t===i&&(e.substr(uo,3)===K?(t=K,uo+=3):(t=i,0===yo&&vo(ht))),t}function Eo(){var e;return(e=_o())===i&&(e=Io())===i&&(e=Lo())===i&&(e=Oo()),e}function Ro(){var t,r,o,n,a,s,l,u;if(t=uo,Vo()!==i)if((r=Eo())!==i){for(o=uo,n=uo,a=[],s=uo,l=uo,yo++,u=fn(),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=fn(),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);for((s=fn())===i&&(s=null),n=a=[a,s],o=e.substring(o,uo),n=[],a=No();a!==i;)n.push(a),a=No();if(a=uo,s=function(){var t,r,o,n;t=uo,yo++,r=uo,o=[],9===e.charCodeAt(uo)?(n=w,uo++):(n=i,0===yo&&vo(Tt));if(n!==i)for(;n!==i;)o.push(n),9===e.charCodeAt(uo)?(n=w,uo++):(n=i,0===yo&&vo(Tt));else o=i;o!==i?(uo,(n=(n=hi(o))?void 0:i)!==i?(r,r=Ti(o)):(uo=r,r=i)):(uo=r,r=i);yo--,r!==i?(uo=t,t=void 0):t=i;return t}(),s!==i){for(l=[],u=Ro();u!==i;)l.push(u),u=Ro();u=function(){var e;uo,e=bi(),e=e?void 0:i;return e}(),u!==i?(a,a=yi(r,o,n,l)):(uo=a,a=i)}else uo=a,a=i;a===i&&(a=null),t,t=di(r,o,n,a)}else uo=t,t=i;else uo=t,t=i;return t}function No(){var t,r,o,n,a,s,l,u,p,c;if(t=uo,r=uo,yo++,o=function(){var t,r,o;t=uo,r=[],o=e.charAt(uo),qe.test(o)?uo++:(o=i,0===yo&&vo(st));for(;o!==i;)r.push(o),o=e.charAt(uo),qe.test(o)?uo++:(o=i,0===yo&&vo(st));o=fn(),o!==i?t=r=[r,o]:(uo=t,t=i);return t}(),yo--,o===i?r=void 0:(uo=r,r=i),r!==i)if((o=Vo())!==i)if(n=uo,yo++,a=Eo(),yo--,a===i?n=void 0:(uo=n,n=i),n!==i){if(a=uo,s=uo,l=[],u=uo,p=uo,yo++,c=fn(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i?(e.length>uo?(c=e.charAt(uo),uo++):(c=i,0===yo&&vo(Qe)),c!==i?u=p=[p,c]:(uo=u,u=i)):(uo=u,u=i),u!==i)for(;u!==i;)l.push(u),u=uo,p=uo,yo++,c=fn(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i?(e.length>uo?(c=e.charAt(uo),uo++):(c=i,0===yo&&vo(Qe)),c!==i?u=p=[p,c]:(uo=u,u=i)):(uo=u,u=i);else l=i;l!==i&&(u=hn())!==i?s=l=[l,u]:(uo=s,s=i),(a=s!==i?e.substring(a,uo):s)!==i?(t,t=fi(a)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;else uo=t,t=i;return t}function Vo(){var t,r,o;for(t=uo,r=[],9===e.charCodeAt(uo)?(o=w,uo++):(o=i,0===yo&&vo(Tt));o!==i;)r.push(o),9===e.charCodeAt(uo)?(o=w,uo++):(o=i,0===yo&&vo(Tt));return uo,(o=(o=mi(r))?void 0:i)!==i?t=r=[r,o]:(uo=t,t=i),t}function Fo(){var t,r,o;if(t=uo,r=[],(o=jo())!==i)for(;o!==i;)r.push(o),o=jo();else r=i;return t=r!==i?e.substring(t,uo):r}function jo(){var t,r,o,n,a,s;if(t=uo,r=uo,yo++,o=ko(),yo--,o===i?r=void 0:(uo=r,r=i),r!==i){if(o=uo,n=uo,a=[],(s=mn())!==i)for(;s!==i;)a.push(s),s=mn();else a=i;a!==i&&(s=hn())!==i?n=a=[a,s]:(uo=n,n=i),(o=n!==i?e.substring(o,uo):n)!==i?t=r=[r,o]:(uo=t,t=i)}else uo=t,t=i;return t===i&&(t=fn()),t}function Go(){var t,r,o,n,a,s;if(t=uo,(r=xo())!==i){for(o=uo,n=uo,a=[],s=e.charAt(uo),qe.test(s)?uo++:(s=i,0===yo&&vo(st));s!==i;)a.push(s),s=e.charAt(uo),qe.test(s)?uo++:(s=i,0===yo&&vo(st));(s=hn())!==i?n=a=[a,s]:(uo=n,n=i),(o=n!==i?e.substring(o,uo):n)!==i?((n=fn())===i&&(n=null),t=r=[r,o,n]):(uo=t,t=i)}else uo=t,t=i;return t}function Do(){var t,r;return t=uo,xo()!==i?(r=function(){var t;return e.substr(uo,5)===A?(t=A,uo+=5):(t=i,0===yo&&vo(bt)),t}(),r!==i?(t,t=Pi(r)):(uo=t,t=i)):(uo=t,t=i),t}function Mo(){var t,r,o,n,a,s,l,u,p,c;if(t=uo,(r=Do())!==i)if(58===e.charCodeAt(uo)?(o=d,uo++):(o=i,0===yo&&vo(rt)),o!==i)if(32===e.charCodeAt(uo)?(n=k,uo++):(n=i,0===yo&&vo(dt)),n===i&&(n=null),a=function(){var t,r,o,n,a,s,l,u,p;t=uo,r=uo,e.substr(uo,4)===Ue?(o=Ue,uo+=4):(o=i,0===yo&&vo(Gr));if(o!==i)if(115===e.charCodeAt(uo)?(n=Je,uo++):(n=i,0===yo&&vo(Dr)),n===i&&(n=null),e.substr(uo,3)===$e?(a=$e,uo+=3):(a=i,0===yo&&vo(Mr)),a!==i){for(s=[],l=uo,u=uo,yo++,p=xo(),yo--,p===i?u=void 0:(uo=u,u=i),u!==i&&(p=Tn())!==i?l=u=[u,p]:(uo=l,l=i);l!==i;)s.push(l),l=uo,u=uo,yo++,p=xo(),yo--,p===i?u=void 0:(uo=u,u=i),u!==i&&(p=Tn())!==i?l=u=[u,p]:(uo=l,l=i);r=o=[o,n,a,s]}else uo=r,r=i;else uo=r,r=i;t=r!==i?e.substring(t,uo):r;return t}(),a!==i)if(xo()!==i){for(s=function(){var e,t,r;e=uo,t=[],r=Uo();for(;r!==i;)t.push(r),r=Uo();return e,t=xi(t),e=t,e}(),l=uo,u=uo,p=[],c=e.charAt(uo),qe.test(c)?uo++:(c=i,0===yo&&vo(st));c!==i;)p.push(c),c=e.charAt(uo),qe.test(c)?uo++:(c=i,0===yo&&vo(st));(c=hn())!==i?u=p=[p,c]:(uo=u,u=i),(l=u!==i?e.substring(l,uo):u)!==i?((u=fn())===i&&(u=null),t,t=ki(r,a,s)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;else uo=t,t=i;else uo=t,t=i;return t}function Uo(){var t,r,o,n,a,s,l,u,p,c;if(t=uo,35===e.charCodeAt(uo)?(r=_,uo++):(r=i,0===yo&&vo(vt)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=Si(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,64===e.charCodeAt(uo)?(r=I,uo++):(r=i,0===yo&&vo(Bt)),r===i&&(r=null),(o=Jo())!==i)if(58===e.charCodeAt(uo)?(n=d,uo++):(n=i,0===yo&&vo(rt)),n!==i){for(a=[],32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));s!==i;)a.push(s),32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));if(s=uo,l=[],u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i?(c=e.charAt(uo),He.test(c)?uo++:(c=i,0===yo&&vo(yt)),c!==i?u=p=[p,c]:(uo=u,u=i)):(uo=u,u=i),u!==i)for(;u!==i;)l.push(u),u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i?(c=e.charAt(uo),He.test(c)?uo++:(c=i,0===yo&&vo(yt)),c!==i?u=p=[p,c]:(uo=u,u=i)):(uo=u,u=i);else l=i;(s=l!==i?e.substring(s,uo):l)!==i&&(l=xo())!==i?(t,t=Ki(o,s)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;if(t===i){if(t=uo,64===e.charCodeAt(uo)?(r=I,uo++):(r=i,0===yo&&vo(Bt)),r===i&&(r=null),(o=Jo())!==i)if(58===e.charCodeAt(uo)?(n=d,uo++):(n=i,0===yo&&vo(rt)),n!==i){for(a=[],32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));s!==i;)a.push(s),32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));for(s=uo,l=[],u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);u!==i;)l.push(u),u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);s=e.substring(s,uo),(l=xo())!==i?(t,t=wi(o,s)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;if(t===i){if(t=uo,64===e.charCodeAt(uo)?(r=I,uo++):(r=i,0===yo&&vo(Bt)),r===i&&(r=null),(o=$o())!==i)if(58===e.charCodeAt(uo)?(n=d,uo++):(n=i,0===yo&&vo(rt)),n!==i){for(a=[],32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));s!==i;)a.push(s),32===e.charCodeAt(uo)?(s=k,uo++):(s=i,0===yo&&vo(dt));s=function(){var t;e.substr(uo,4)===N?(t=N,uo+=4):(t=i,0===yo&&vo(Kt));t===i&&(e.substr(uo,6)===V?(t=V,uo+=6):(t=i,0===yo&&vo(wt)),t===i&&(e.substr(uo,5)===F?(t=F,uo+=5):(t=i,0===yo&&vo(At))));return t}(),s!==i&&(l=xo())!==i?(t,t=Ai(o,s)):(uo=t,t=i)}else uo=t,t=i;else uo=t,t=i;if(t===i){for(t=uo,64===e.charCodeAt(uo)?(r=I,uo++):(r=i,0===yo&&vo(Bt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,l=e.charAt(uo),We.test(l)?uo++:(l=i,0===yo&&vo(Ct)),l===i&&(l=uo,(u=$o())!==i?(58===e.charCodeAt(uo)?(p=d,uo++):(p=i,0===yo&&vo(rt)),p!==i?l=u=[u,p]:(uo=l,l=i)):(uo=l,l=i)),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=e.charAt(uo),We.test(l)?uo++:(l=i,0===yo&&vo(Ct)),l===i&&(l=uo,(u=$o())!==i?(58===e.charCodeAt(uo)?(p=d,uo++):(p=i,0===yo&&vo(rt)),p!==i?l=u=[u,p]:(uo=l,l=i)):(uo=l,l=i)),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);if(o=e.substring(o,uo),58===e.charCodeAt(uo)?(n=d,uo++):(n=i,0===yo&&vo(rt)),n!==i){for(32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),s=uo,l=[],u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);u!==i;)l.push(u),u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);s=e.substring(s,uo),(l=xo())!==i?(t,t=_i(o,s)):(uo=t,t=i)}else uo=t,t=i;if(t===i){for(t=uo,64===e.charCodeAt(uo)?(r=I,uo++):(r=i,0===yo&&vo(Bt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,(l=xo())===i&&(l=uo,(u=$o())!==i?(58===e.charCodeAt(uo)?(p=d,uo++):(p=i,0===yo&&vo(rt)),p!==i?l=u=[u,p]:(uo=l,l=i)):(uo=l,l=i)),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,(l=xo())===i&&(l=uo,(u=$o())!==i?(58===e.charCodeAt(uo)?(p=d,uo++):(p=i,0===yo&&vo(rt)),p!==i?l=u=[u,p]:(uo=l,l=i)):(uo=l,l=i)),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=Ii(o)):(uo=t,t=i)}}}}}return t}function Jo(){var t;return e.substr(uo,5)===L?(t=L,uo+=5):(t=i,0===yo&&vo(Pt)),t===i&&(e.substr(uo,6)===O?(t=O,uo+=6):(t=i,0===yo&&vo(kt))),t}function $o(){var t;return e.substr(uo,9)===E?(t=E,uo+=9):(t=i,0===yo&&vo(xt)),t===i&&(e.substr(uo,12)===R?(t=R,uo+=12):(t=i,0===yo&&vo(St))),t}function zo(){var e,t,r,o;for(e=uo,(t=qo())===i&&(t=null),r=[],(o=Xo())===i&&(o=qo());o!==i;)r.push(o),(o=Xo())===i&&(o=qo());return e,e=Oi(t,r)}function qo(){var t,r,o,n,a,s,l;if(t=uo,(r=fn())!==i&&(t,r=Ei()),(t=r)===i){if(t=uo,r=uo,o=[],n=uo,(a=Zo())===i&&(a=null),s=uo,yo++,l=Xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?n=a=[a,s,l]:(uo=n,n=i),n===i&&(n=uo,(a=Zo())!==i?(s=uo,yo++,l=Xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?n=a=[a,s]:(uo=n,n=i)):(uo=n,n=i)),n!==i)for(;n!==i;)o.push(n),n=uo,(a=Zo())===i&&(a=null),s=uo,yo++,l=Xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?n=a=[a,s,l]:(uo=n,n=i),n===i&&(n=uo,(a=Zo())!==i?(s=uo,yo++,l=Xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?n=a=[a,s]:(uo=n,n=i)):(uo=n,n=i));else o=i;(r=o!==i?e.substring(r,uo):o)!==i&&(t,r=Ri(r)),t=r}return t}function Ho(){var t;return 61===e.charCodeAt(uo)?(t=j,uo++):(t=i,0===yo&&vo(It)),t}function Wo(){var t;return e.substr(uo,2)===G?(t=G,uo+=2):(t=i,0===yo&&vo(Lt)),t}function Yo(){var e,t,r;return e=uo,(t=Ho())!==i&&(r=Ho())!==i?e=t=[t,r]:(uo=e,e=i),e}function Xo(){var t,r,o,n,a,s,l,u,p,c;if(t=uo,(r=cn())!==i){if(o=uo,n=[],a=e.charAt(uo),He.test(a)?uo++:(a=i,0===yo&&vo(yt)),a!==i)for(;a!==i;)n.push(a),a=e.charAt(uo),He.test(a)?uo++:(a=i,0===yo&&vo(yt));else n=i;(o=n!==i?e.substring(o,uo):n)!==i&&(n=gn())!==i?(t,t=Ni(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,(r=Yo())!==i){for(32===e.charCodeAt(uo)?(o=k,uo++):(o=i,0===yo&&vo(dt)),o===i&&(o=null),n=uo,a=[],s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=Yo())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=Yo())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);n=e.substring(n,uo),32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),(s=Yo())!==i?(l=function(){var t,r,o,n;t=uo,124===e.charCodeAt(uo)?(r=y,uo++):(r=i,0===yo&&vo(tt));if(r!==i){if(o=[],(n=Qo())!==i)for(;n!==i;)o.push(n),n=Qo();else o=i;o!==i?(t,t=Ui(o)):(uo=t,t=i)}else uo=t,t=i;return t}(),l!==i?(t,t=Vi(n,l)):(uo=t,t=i)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,(r=sn())!==i){for(32===e.charCodeAt(uo)?(o=k,uo++):(o=i,0===yo&&vo(dt)),o===i&&(o=null),n=uo,a=[],s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=sn())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=sn())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);n=e.substring(n,uo),32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),(s=sn())!==i?(t,t=Fi(n)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,(r=ln())!==i){for(32===e.charCodeAt(uo)?(o=k,uo++):(o=i,0===yo&&vo(dt)),o===i&&(o=null),n=uo,a=[],s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=ln())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=ln())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);n=e.substring(n,uo),32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),(s=ln())!==i?(t,t=ji(n)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,(r=un())!==i){for(32===e.charCodeAt(uo)?(o=k,uo++):(o=i,0===yo&&vo(dt)),o===i&&(o=null),n=uo,a=[],s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=un())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=un())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);n=e.substring(n,uo),32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),(s=un())!==i?(t,t=Gi(n)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,(r=pn())!==i){for(32===e.charCodeAt(uo)?(o=k,uo++):(o=i,0===yo&&vo(dt)),o===i&&(o=null),n=uo,a=[],s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=pn())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);s!==i;)a.push(s),s=uo,l=uo,yo++,u=uo,32===e.charCodeAt(uo)?(p=k,uo++):(p=i,0===yo&&vo(dt)),p===i&&(p=null),(c=pn())!==i?u=p=[p,c]:(uo=u,u=i),yo--,u===i?l=void 0:(uo=l,l=i),l!==i?(e.length>uo?(u=e.charAt(uo),uo++):(u=i,0===yo&&vo(Qe)),u!==i?s=l=[l,u]:(uo=s,s=i)):(uo=s,s=i);n=e.substring(n,uo),32===e.charCodeAt(uo)?(a=k,uo++):(a=i,0===yo&&vo(dt)),a===i&&(a=null),(s=pn())!==i?(t,t=Di(n)):(uo=t,t=i)}else uo=t,t=i;t===i&&(t=uo,r=function(){var t,r,o,n,a,s,l;t=uo,r=uo,o=uo,e.substr(uo,4)===Ue?(n=Ue,uo+=4):(n=i,0===yo&&vo(Gr));n!==i?(115===e.charCodeAt(uo)?(a=Je,uo++):(a=i,0===yo&&vo(Dr)),a===i&&(a=null),e.substr(uo,3)===$e?(s=$e,uo+=3):(s=i,0===yo&&vo(Mr)),s!==i?o=n=[n,a,s]:(uo=o,o=i)):(uo=o,o=i);o===i&&(e.substr(uo,7)===ze?(o=ze,uo+=7):(o=i,0===yo&&vo(Ur)));r=o!==i?e.substring(r,uo):o;if(r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=Tn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=Tn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),t,t=lo(r,o)}else uo=t,t=i;return t}(),r!==i&&(t,r=Mi(r)),t=r)}}}}}return t}function Zo(){var t,r,o,n,a;if(t=uo,r=uo,(o=Yo())!==i){if(n=[],(a=Ho())!==i)for(;a!==i;)n.push(a),a=Ho();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,o=function(){var e,t,r;return e=uo,(t=Wo())!==i&&(r=Wo())!==i?e=t=[t,r]:(uo=e,e=i),e}(),o!==i){if(n=[],(a=Wo())!==i)for(;a!==i;)n.push(a),a=Wo();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,(o=un())!==i){if(n=[],(a=nn())!==i)for(;a!==i;)n.push(a),a=nn();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,(o=pn())!==i){if(n=[],(a=an())!==i)for(;a!==i;)n.push(a),a=an();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;t=r!==i?e.substring(t,uo):r}}}return t}function Qo(){var t,r,o,n,a,s,l,u,p,c;if(t=uo,e.substr(uo,5)===D?(r=D,uo+=5):(r=i,0===yo&&vo(Ot)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=Ji(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,e.substr(uo,4)===M?(r=M,uo+=4):(r=i,0===yo&&vo(Et)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=$i(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i&&(t=uo,e.substr(uo,4)===T?(r=T,uo+=4):(r=i,0===yo&&vo(at)),r!==i&&(o=xo())!==i?(t,t=zi()):(uo=t,t=i),t===i)){if(t=uo,e.substr(uo,5)===U?(r=U,uo+=5):(r=i,0===yo&&vo(Rt)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=qi(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i&&(t=uo,e.substr(uo,5)===J?(r=J,uo+=5):(r=i,0===yo&&vo(Nt)),r!==i&&(o=xo())!==i?(t,t=Hi()):(uo=t,t=i),t===i)){if(t=uo,e.substr(uo,6)===$?(r=$,uo+=6):(r=i,0===yo&&vo(Vt)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=Wi(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,e.substr(uo,9)===z?(r=z,uo+=9):(r=i,0===yo&&vo(Ft)),r!==i){if(o=uo,n=uo,80===e.charCodeAt(uo)?(a=q,uo++):(a=i,0===yo&&vo(jt)),a!==i){for(s=uo,l=[],u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);u!==i;)l.push(u),u=uo,p=uo,yo++,c=xo(),yo--,c===i?p=void 0:(uo=p,p=i),p!==i&&(c=mn())!==i?u=p=[p,c]:(uo=u,u=i);n=a=[a,s=e.substring(s,uo)]}else uo=n,n=i;(o=n!==i?e.substring(o,uo):n)!==i&&(n=xo())!==i?(t,t=Yi(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i&&(t=uo,e.substr(uo,6)===H?(r=H,uo+=6):(r=i,0===yo&&vo(Gt)),r!==i?(o=function(){var t;e.substr(uo,4)===ye?(t=ye,uo+=4):(t=i,0===yo&&vo(nr));t===i&&(e.substr(uo,5)===de?(t=de,uo+=5):(t=i,0===yo&&vo(ar)),t===i&&(e.substr(uo,4)===fe?(t=fe,uo+=4):(t=i,0===yo&&vo(sr)),t===i&&(e.substr(uo,4)===me?(t=me,uo+=4):(t=i,0===yo&&vo(lr)),t===i&&(e.substr(uo,7)===he?(t=he,uo+=7):(t=i,0===yo&&vo(ur)),t===i&&(e.substr(uo,9)===Te?(t=Te,uo+=9):(t=i,0===yo&&vo(pr)),t===i&&(e.substr(uo,4)===be?(t=be,uo+=4):(t=i,0===yo&&vo(cr)),t===i&&(e.substr(uo,8)===ve?(t=ve,uo+=8):(t=i,0===yo&&vo(gr)),t===i&&(e.substr(uo,5)===Be?(t=Be,uo+=5):(t=i,0===yo&&vo(yr)),t===i&&(e.substr(uo,4)===Ce?(t=Ce,uo+=4):(t=i,0===yo&&vo(dr)),t===i&&(e.substr(uo,7)===Pe?(t=Pe,uo+=7):(t=i,0===yo&&vo(fr)),t===i&&(e.substr(uo,6)===ke?(t=ke,uo+=6):(t=i,0===yo&&vo(mr)),t===i&&(e.substr(uo,4)===xe?(t=xe,uo+=4):(t=i,0===yo&&vo(hr)),t===i&&(e.substr(uo,5)===Se?(t=Se,uo+=5):(t=i,0===yo&&vo(Tr)),t===i&&(e.substr(uo,6)===Ke?(t=Ke,uo+=6):(t=i,0===yo&&vo(br)),t===i&&(e.substr(uo,6)===we?(t=we,uo+=6):(t=i,0===yo&&vo(vr)),t===i&&(e.substr(uo,3)===Ae?(t=Ae,uo+=3):(t=i,0===yo&&vo(Br)),t===i&&(e.substr(uo,6)===_e?(t=_e,uo+=6):(t=i,0===yo&&vo(Cr)),t===i&&(e.substr(uo,4)===Ie?(t=Ie,uo+=4):(t=i,0===yo&&vo(Pr)),t===i&&(e.substr(uo,6)===Le?(t=Le,uo+=6):(t=i,0===yo&&vo(kr)),t===i&&(e.substr(uo,5)===Oe?(t=Oe,uo+=5):(t=i,0===yo&&vo(xr)),t===i&&(e.substr(uo,6)===Ee?(t=Ee,uo+=6):(t=i,0===yo&&vo(Sr)))))))))))))))))))))));return t}(),o!==i&&(n=xo())!==i?(t,t=Xi(o)):(uo=t,t=i)):(uo=t,t=i),t===i&&(t=uo,r=function(){var t;e.substr(uo,4)===W?(t=W,uo+=4):(t=i,0===yo&&vo(Dt));t===i&&(e.substr(uo,6)===Y?(t=Y,uo+=6):(t=i,0===yo&&vo(Mt)),t===i&&(e.substr(uo,5)===X?(t=X,uo+=5):(t=i,0===yo&&vo(Ut)),t===i&&(e.substr(uo,9)===Z?(t=Z,uo+=9):(t=i,0===yo&&vo(Jt)),t===i&&(e.substr(uo,6)===Q?(t=Q,uo+=6):(t=i,0===yo&&vo($t)),t===i&&(e.substr(uo,9)===ee?(t=ee,uo+=9):(t=i,0===yo&&vo(zt)),t===i&&(e.substr(uo,11)===te?(t=te,uo+=11):(t=i,0===yo&&vo(qt)),t===i&&(e.substr(uo,3)===re?(t=re,uo+=3):(t=i,0===yo&&vo(Ht)),t===i&&(e.substr(uo,3)===ie?(t=ie,uo+=3):(t=i,0===yo&&vo(Wt)),t===i&&(e.substr(uo,9)===oe?(t=oe,uo+=9):(t=i,0===yo&&vo(Yt)),t===i&&(e.substr(uo,15)===ne?(t=ne,uo+=15):(t=i,0===yo&&vo(Xt)),t===i&&(e.substr(uo,6)===ae?(t=ae,uo+=6):(t=i,0===yo&&vo(Zt)),t===i&&(e.substr(uo,10)===se?(t=se,uo+=10):(t=i,0===yo&&vo(Qt)),t===i&&(e.substr(uo,13)===le?(t=le,uo+=13):(t=i,0===yo&&vo(er)),t===i&&(e.substr(uo,19)===ue?(t=ue,uo+=19):(t=i,0===yo&&vo(tr)),t===i&&(e.substr(uo,10)===pe?(t=pe,uo+=10):(t=i,0===yo&&vo(rr)),t===i&&(e.substr(uo,10)===ce?(t=ce,uo+=10):(t=i,0===yo&&vo(ir)),t===i&&(e.substr(uo,13)===ge?(t=ge,uo+=13):(t=i,0===yo&&vo(or)))))))))))))))))));return t}(),r!==i&&(o=xo())!==i?(t,t=Zi(r)):(uo=t,t=i),t===i)))if(t=uo,35===e.charCodeAt(uo)?(r=_,uo++):(r=i,0===yo&&vo(vt)),r!==i){for(o=uo,n=[],a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=xo(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i&&(l=mn())!==i?a=s=[s,l]:(uo=a,a=i);o=e.substring(o,uo),(n=xo())!==i?(t,t=Qi(o)):(uo=t,t=i)}else uo=t,t=i}}}}return t}function en(){var e,t,r,o;for(yo++,e=uo,(t=tn())===i&&(t=null),r=[],(o=yn())===i&&(o=tn());o!==i;)r.push(o),(o=yn())===i&&(o=tn());return e,e=to(t,r),yo--,t=i,0===yo&&vo(wr),e}function tn(){var t,r,o,n,a,s,l;if(t=uo,r=uo,o=[],n=uo,(a=dn())===i&&(a=null),s=uo,yo++,l=yn(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?n=a=[a,s,l]:(uo=n,n=i)):(uo=n,n=i),n!==i)for(;n!==i;)o.push(n),n=uo,(a=dn())===i&&(a=null),s=uo,yo++,l=yn(),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?n=a=[a,s,l]:(uo=n,n=i)):(uo=n,n=i);else o=i;return(r=o!==i?e.substring(r,uo):o)!==i&&(t,r=ro(r)),(t=r)===i&&(t=fn()),t}function rn(){var t;return 42===e.charCodeAt(uo)?(t=Re,uo++):(t=i,0===yo&&vo(Ar)),t}function on(){var t;return 95===e.charCodeAt(uo)?(t=Ne,uo++):(t=i,0===yo&&vo(_r)),t}function nn(){var t;return 96===e.charCodeAt(uo)?(t=Ve,uo++):(t=i,0===yo&&vo(Ir)),t}function an(){var t;return 33===e.charCodeAt(uo)?(t=Fe,uo++):(t=i,0===yo&&vo(Lr)),t}function sn(){var e,t,r;return e=uo,(t=rn())!==i&&(r=rn())!==i?e=t=[t,r]:(uo=e,e=i),e}function ln(){var e,t,r;return e=uo,(t=on())!==i&&(r=on())!==i?e=t=[t,r]:(uo=e,e=i),e}function un(){var e,t,r;return e=uo,(t=nn())!==i&&(r=nn())!==i?e=t=[t,r]:(uo=e,e=i),e}function pn(){var e,t,r;return e=uo,(t=an())!==i&&(r=an())!==i?e=t=[t,r]:(uo=e,e=i),e}function cn(){var t;return e.substr(uo,2)===je?(t=je,uo+=2):(t=i,0===yo&&vo(Or)),t}function gn(){var t;return 93===e.charCodeAt(uo)?(t=Ge,uo++):(t=i,0===yo&&vo(Er)),t}function yn(){var t,r,o,n,a,s,l,u,p;if(t=uo,cn()!==i){if(r=uo,o=[],n=e.charAt(uo),He.test(n)?uo++:(n=i,0===yo&&vo(yt)),n!==i)for(;n!==i;)o.push(n),n=e.charAt(uo),He.test(n)?uo++:(n=i,0===yo&&vo(yt));else o=i;(r=o!==i?e.substring(r,uo):o)!==i&&(o=gn())!==i?(t,t=io(r)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,sn()!==i){for(32===e.charCodeAt(uo)?(r=k,uo++):(r=i,0===yo&&vo(dt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=sn())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=sn())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);o=e.substring(o,uo),32===e.charCodeAt(uo)?(n=k,uo++):(n=i,0===yo&&vo(dt)),n===i&&(n=null),(a=sn())!==i?(t,t=oo(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,ln()!==i){for(32===e.charCodeAt(uo)?(r=k,uo++):(r=i,0===yo&&vo(dt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=ln())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=ln())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);o=e.substring(o,uo),32===e.charCodeAt(uo)?(n=k,uo++):(n=i,0===yo&&vo(dt)),n===i&&(n=null),(a=ln())!==i?(t,t=no(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i){if(t=uo,un()!==i){for(32===e.charCodeAt(uo)?(r=k,uo++):(r=i,0===yo&&vo(dt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=un())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=un())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);o=e.substring(o,uo),32===e.charCodeAt(uo)?(n=k,uo++):(n=i,0===yo&&vo(dt)),n===i&&(n=null),(a=un())!==i?(t,t=ao(o)):(uo=t,t=i)}else uo=t,t=i;if(t===i)if(t=uo,pn()!==i){for(32===e.charCodeAt(uo)?(r=k,uo++):(r=i,0===yo&&vo(dt)),r===i&&(r=null),o=uo,n=[],a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=pn())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);a!==i;)n.push(a),a=uo,s=uo,yo++,l=uo,32===e.charCodeAt(uo)?(u=k,uo++):(u=i,0===yo&&vo(dt)),u===i&&(u=null),(p=pn())!==i?l=u=[u,p]:(uo=l,l=i),yo--,l===i?s=void 0:(uo=s,s=i),s!==i?(e.length>uo?(l=e.charAt(uo),uo++):(l=i,0===yo&&vo(Qe)),l!==i?a=s=[s,l]:(uo=a,a=i)):(uo=a,a=i);o=e.substring(o,uo),32===e.charCodeAt(uo)?(n=k,uo++):(n=i,0===yo&&vo(dt)),n===i&&(n=null),(a=pn())!==i?(t,t=so(o)):(uo=t,t=i)}else uo=t,t=i}}}return t}function dn(){var t,r,o,n,a;if(t=uo,r=uo,(o=sn())!==i){if(n=[],(a=rn())!==i)for(;a!==i;)n.push(a),a=rn();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,(o=ln())!==i){if(n=[],(a=on())!==i)for(;a!==i;)n.push(a),a=on();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,(o=un())!==i){if(n=[],(a=nn())!==i)for(;a!==i;)n.push(a),a=nn();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;if((t=r!==i?e.substring(t,uo):r)===i){if(t=uo,r=uo,(o=pn())!==i){if(n=[],(a=an())!==i)for(;a!==i;)n.push(a),a=an();else n=i;n!==i?r=o=[o,n]:(uo=r,r=i)}else uo=r,r=i;t=r!==i?e.substring(t,uo):r}}}return t}function fn(){var t;return yo++,10===e.charCodeAt(uo)?(t=De,uo++):(t=i,0===yo&&vo(Nr)),t===i&&(e.substr(uo,2)===Me?(t=Me,uo+=2):(t=i,0===yo&&vo(Vr)),t===i&&(t=e.charAt(uo),Ye.test(t)?uo++:(t=i,0===yo&&vo(Fr)))),yo--,t===i&&(i,0===yo&&vo(Rr)),t}function mn(){var t;return t=e.charAt(uo),Xe.test(t)?uo++:(t=i,0===yo&&vo(jr)),t}function hn(){var t,r;return(t=fn())===i&&(t=uo,yo++,e.length>uo?(r=e.charAt(uo),uo++):(r=i,0===yo&&vo(Qe)),yo--,r===i?t=void 0:(uo=t,t=i)),t}function Tn(){var t;return t=e.charAt(uo),Ze.test(t)?uo++:(t=i,0===yo&&vo(Jr)),t}var bn=[],vn="";if(e=e.trimStart(),r=g(),t.peg$library)return{peg$result:r,peg$currPos:uo,peg$FAILED:i,peg$maxFailExpected:go,peg$maxFailPos:co};if(r!==i&&uo===e.length)return r;throw r!==i&&uo<e.length&&vo({type:"end"}),Bo(go,co<e.length?e.charAt(co):null,co<e.length?bo(co,co+1):bo(co,co))}t.SyntaxError=u,function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(u,Error),u.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(i){var s=this.location.end,l=p("",n.line.toString().length," "),u=i[o.line-1],c=(o.line===s.line?s.column:u.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+l+" |\n"+n.line+" | "+u+"\n"+l+" | "+p("",o.column-1," ")+p("",c,"^")}else t+="\n at "+a}return t},u.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return 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,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return 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,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(a);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."},t.parse=c;t.StartRules=["version","bitmarkPlusPlus","bitmarkPlus","bitmarkMinusMinus","bitmarkPlusString","bitmarkMinusMinusString"]},4:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AstWalkerGenerator=void 0;const i=r(5126);t.AstWalkerGenerator=class{constructor(){this.ast=new i.Ast,this.debugGenerationInline=!1,this.printed=!1}enter(e,t,r){let i;const o=this,n=`enter_${e.key}`;return this.printed||(this.printed=!0),this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof o[n]&&(i=o[n](e,t,r)),i}between(e,t,r,i,o){let n;const a=this,s=`between_${e.key}`;return this.debugGenerationInline&&this.writeInlineDebug(e.key,{single:!0}),"function"==typeof a[s]&&(n=a[s](e,t,r,i,o)),n}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+1)return e[e.length-t-1]}}},5087:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkGenerator=void 0;const o=r(5126),n=r(2028),a=r(126),s=r(5854),l=r(3811),u=r(4410),p=r(1163),c=r(7203),g=r(166),y=r(6149),d=r(385),f=r(4078),m=r(955),h=r(4),T={debugGenerationInline:!1};class b extends h.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new o.Ast,this.skipNLBetweenBitsValue=!1,this.bitmarkVersion=null!==(r=l.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==r?r:l.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},T),null==t?void 0:t.bitmarkOptions),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.bitmarkVersion===l.BitmarkVersion.v2?void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=p.CardSetVersion.v1):void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=p.CardSetVersion.v2),this.prettifySpace=!0===this.options.prettifyJson?2:this.options.prettifyJson||void 0,this.writer=e,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.generatePropertyHandlers()}generate(e){return i(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.writeLine(),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.skipNLBetweenBitsValue=!1,this.printed=!1}walkAndWrite(e){this.ast.walk(e,a.NodeType.bitmarkAst,this,void 0),this.writeLine()}between_bits(e,t,r,i){this.writeNL(),this.writeNL(),this.writeNL()}enter_bitsValue(e,t){const r=e.value,i=n.Config.getBitConfig(r.bitType),o=n.Config.getBitResourcesConfig(r.bitType,r.resourceType);if(this.writeOPD(),r.isCommented&&this.writeString("|"),this.writeString(r.bitType),r.textFormat){this.isWriteTextFormat(r.textFormat,i.textFormatDefault)&&(this.writeColon(),this.writeString(r.textFormat))}let a;if(i.resourceAttachmentAllowed&&r.resources&&r.resources.length>0){const e=o.comboResourceTagTypesMap;if(o.comboResourceTagTypesMap.size>0)for(const t of e.keys())a=t;else a=r.resources[0].type}a&&(this.writeAmpersand(),this.writeString(a)),this.writeCL(),this.writeNL()}between_bitsValue(e,t,r,i){const o=[a.NodeType.bitType,a.NodeType.textFormat,a.NodeType.level,a.NodeType.progress,a.NodeType.toc,a.NodeType.referenceEnd,a.NodeType.labelFalse];e.value.book&&o.push(a.NodeType.reference);(()=>{if(this.skipNLBetweenBitsValue)return this.skipNLBetweenBitsValue=!1,!0;for(const e of o)if(t.key===e)return!0;return!1})()||this.writeNL()}enter_internalComment(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)===a.NodeType.bitsValue)for(let e=0;e<r.length;e++){const t=r[e],i=e===r.length-1;this.writeProperty("internalComment",t),i||this.writeNL()}}enter_labelTrue(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const o=null==i?void 0:i.value;o&&(""!=r&&this.writeProperty(g.PropertyTag.labelTrue,r,!0),o.labelFalse&&""!=o.labelFalse[0]&&this.writeProperty(g.PropertyTag.labelFalse,o.labelFalse,!0))}enter_imageSource(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const{url:o,mockupId:n,size:s,format:l,trim:u}=r;this.writeProperty("imageSource",o,!0),o&&(n&&this.writeProperty("mockupId",n,!0),s&&this.writeProperty("size",s,!0),l&&this.writeProperty("format",l,!0),f.BooleanUtils.isBoolean(u)&&this.writeProperty("trim",u,!0))}enter_technicalTerm(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const{technicalTerm:o,lang:n}=r;this.writeProperty("technicalTerm",o,!0),null!=n&&this.writeProperty("lang",n)}enter_servings(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const{servings:o,unit:n,unitAbbr:s,decimalPlaces:l,disableCalculation:u}=r;this.writeProperty("servings",o,!0),null!=n&&this.writeProperty("unit",n),null!=s&&this.writeProperty("unitAbbr",s),null!=l&&this.writeProperty("decimalPlaces",l),null!=u&&this.writeProperty("disableCalculation",u)}enter_person(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const{name:o,title:n,avatarImage:s}=r;this.writeProperty("person",o,!0),n&&this.writeProperty("title",n,!0),s&&this.writeResource(s)}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((null==i?void 0:i.key)!==a.NodeType.bitsValue)return;const{level:o,label:n}=r,s=e.key===a.NodeType.ratingLevelStart?g.PropertyTag.ratingLevelStart:g.PropertyTag.ratingLevelEnd;this.writeProperty(s,o,!0),n&&this.writeProperty("label",n,!0)}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==a.NodeType.markConfig)return;const{mark:o,color:n,emphasis:s}=r;o&&(this.writeProperty("mark",o,!0),n&&this.writeProperty("color",n,!0),s&&this.writeProperty("emphasis",s,!0),this.writeNL())}leaf_sampleSolution(e,t){this.writeProperty("sampleSolution",e.value)}leaf_reasonableNumOfChars(e,t){this.writeProperty("reasonableNumOfChars",e.value)}enter_itemLead(e,t){const r=e.value;r&&(r.item||r.lead||r.pageNumber||r.marginNumber)&&(this.writeOPC(),this.writeString(r.item||""),this.writeCL(),(r.lead||r.pageNumber||r.marginNumber)&&(this.writeOPC(),this.writeString(r.lead||""),this.writeCL()),(r.pageNumber||r.marginNumber)&&(this.writeOPC(),this.writeString(r.pageNumber||""),this.writeCL()),r.marginNumber&&(this.writeOPC(),this.writeString(r.marginNumber||""),this.writeCL()))}enter_body(e,t){const r=e.value;(r.bodyParts&&r.bodyParts.length>0||r.bodyJson)&&this.writeNL()}enter_solutions(e,t){const r=e.value;r&&0===r.length&&(this.writeOPU(),this.writeCL())}leaf_solution(e,t){var r;const i=e.value,o=null===(r=this.getParentNode(t,2))||void 0===r?void 0:r.value;(null==o?void 0:o.type)===u.BodyBitType.mark&&i&&(this.writeOPE(),this.writeString(i),this.writeCL())}leaf_mark(e,t){var r;const i=e.value,o=null===(r=this.getParentNode(t,2))||void 0===r?void 0:r.value;(null==o?void 0:o.type)===u.BodyBitType.mark&&i&&this.writeProperty("mark",i,!0)}enter_optionsValue(e,t){const r=e.value;r.isCorrect?this.writeOPP():this.writeOPM(),this.write(r.text),this.writeCL()}enter_textsValue(e,t){const r=e.value;r.isCorrect?this.writeOPP():this.writeOPM(),this.write(r.text),this.writeCL()}enter_cardNode(e,t){this.isOfBitType1(t)||(this.writeCardSetStart(),this.writeNL())}between_cardNode(e,t,r,i){this.isOfBitType1(i)||(this.writeNL(),this.writeCardSetCardDivider(),this.writeNL())}exit_cardNode(e,t){this.isOfBitType1(t)||(this.writeNL(),this.writeCardSetEnd(),this.options.cardSetVersion===p.CardSetVersion.v1&&this.writeNL())}enter_elements(e,t){}between_elements(e,t,r,i){this.writeNL(),this.writeCardSetVariantDivider(),this.writeNL()}exit_elements(e,t){}between_flashcards(e,t,r,i){this.writeNL(),this.writeCardSetCardDivider(),this.writeNL()}between_flashcardsValue(e,t,r,i){r.key===a.NodeType.answer?(this.writeNL(),this.writeCardSetSideDivider(),this.writeNL()):r.key===a.NodeType.alternativeAnswers&&(this.writeNL(),this.writeCardSetVariantDivider(),this.writeNL())}leaf_answer(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)===a.NodeType.flashcardsValue&&e.value&&this.writeString(e.value)}between_alternativeAnswers(e,t){this.writeNL(),this.writeCardSetVariantDivider(),this.writeNL()}leaf_alternativeAnswersValue(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)===a.NodeType.alternativeAnswers&&e.value&&this.writeString(e.value)}enter_statements(e,t){}between_statements(e,t,r,i){this.isOfBitType(i,s.BitType.trueFalse1)||(this.writeNL(),this.writeCardSetCardDivider()),this.writeNL()}exit_statements(e,t){}enter_statementsValue(e,t){const r=e.value;r.isCorrect?this.writeOPP():this.writeOPM(),this.write(r.text),this.writeCL()}between_choices(e,t,r,i){this.writeNL()}exit_choices(e,t){this.writeNL()}enter_choicesValue(e,t){const r=e.value;r.isCorrect?this.writeOPP():this.writeOPM(),this.write(r.text),this.writeCL()}between_responses(e,t,r,i){this.writeNL()}exit_responses(e,t){this.writeNL()}enter_responsesValue(e,t){const r=e.value;r.isCorrect?this.writeOPP():this.writeOPM(),this.write(r.text),this.writeCL()}enter_quizzes(e,t){}between_quizzes(e,t,r,i){this.writeCardSetCardDivider(),this.writeNL()}exit_quizzes(e,t){}between_quizzesValue(e,t,r,i){r.key!==a.NodeType.choices&&r.key!==a.NodeType.responses||this.writeNL()}enter_heading(e,t){}between_heading(e,t,r,i){this.writeNL(),this.writeCardSetSideDivider(),this.writeNL()}exit_heading(e,t){}enter_forValues(e,t){}between_forValues(e,t,r,i){this.writeNL(),this.writeCardSetSideDivider(),this.writeNL()}exit_forValues(e,t){}enter_pairs(e,t){}between_pairs(e,t,r,i){this.writeNL(),this.writeCardSetCardDivider(),this.writeNL()}exit_pairs(e,t){}between_pairsValue(e,t,r,i){}enter_keyAudio(e,t){const r=e.value;this.writeResource(r)}enter_keyImage(e,t){const r=e.value;this.writeResource(r)}enter_matrix(e,t){}between_matrix(e,t,r,i){this.writeNL(),this.writeCardSetCardDivider(),this.writeNL()}exit_matrix(e,t){}between_matrixValue(e,t,r,i){}enter_values(e,t){this.writeNL(),this.writeCardSetSideDivider(),this.writeNL()}between_values(e,t,r,i){this.writeNL(),this.writeCardSetVariantDivider(),this.writeNL()}between_table(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===a.NodeType.cardNode&&(this.writeNL(),this.writeCardSetCardDivider(),this.writeNL())}between_rows(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===a.NodeType.table&&(this.writeNL(),this.writeCardSetCardDivider(),this.writeNL())}between_columns(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===a.NodeType.table&&(this.writeNL(),this.writeCardSetSideDivider(),this.writeNL())}leaf_columnsValue(e,t,r,i){this.writeOPHASH(),e.value&&this.writeString(e.value),this.writeCL()}between_rowsValue(e,t,r,i){const o=this.getParentNode(i);(null==o?void 0:o.key)===a.NodeType.rows&&(this.writeNL(),this.writeCardSetSideDivider(),this.writeNL())}leaf_rowsValueValue(e,t,r,i){e.value&&this.write(e.value)}enter_questions(e,t){}between_questions(e,t,r,i){this.writeCardSetCardDivider(),this.writeNL()}exit_questions(e,t){}between_questionsValue(e,t,r,i){r.key===a.NodeType.sampleSolution&&this.writeNL()}exit_questionsValue(e,t){this.writeNL()}enter_ingredients(e,t){}between_ingredients(e,t,r,i){this.writeNL(),this.writeCardSetCardDivider(),this.writeNL()}exit_ingredients(e,t){}enter_ingredientsValue(e,t){const r=e.value;null!=r.title&&(this.writeOPHASH(),this.writeString(r.title),this.writeCL(),this.writeNL()),r.checked?this.writeOPP():this.writeOPM(),this.writeCL(),null!=r.quantity&&(this.writeOPB(),this.writeString(`${r.quantity}`),this.writeCL()),null!=r.unit&&this.writeProperty("unit",r.unit,!0),null!=r.unitAbbr&&this.writeProperty("unitAbbr",r.unitAbbr,!0),null!=r.decimalPlaces&&this.writeProperty("decimalPlaces",r.decimalPlaces,!0),r.disableCalculation&&this.writeProperty("disableCalculation",!0,!0),null!=r.item&&this.write(r.item)}enter_botResponses(e,t){}between_botResponses(e,t,r,i){this.writeCardSetCardDivider(),this.writeNL()}exit_botResponses(e,t){}between_botResponsesValue(e,t,r,i){this.writeNL()}exit_botResponsesValue(e,t){this.writeNL()}enter_cardBits(e,t){}between_cardBits(e,t,r,i){this.writeNL(),this.writeCardSetCardDivider(),this.writeNL()}exit_cardBits(e,t){}leaf_response(e,t){this.writeOPB(),this.writeString(e.value),this.writeCL()}leaf_reaction(e,t){this.writeProperty("reaction",e.value,!0)}leaf_feedback(e,t){const r=e.value;r&&this.write(r)}between_resources(e,t,r,i){this.writeNL()}enter_resourcesValue(e,t){const r=e.value;this.writeResource(r)}enter_posterImage(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)===a.NodeType.bitsValue){const t=e.value;t&&this.writeProperty("posterImage",t)}else{const t=e.value;t&&t.value&&this.writeProperty("posterImage",t.value)}}enter_thumbnails(e,t){const r=e.value;if(Array.isArray(r)){const e=["src1x","src2x","src3x","src4x"];for(let t=0;t<r.length&&t!==e.length;t++){const i=r[t],o=e[t];this.writeProperty(o,i.value,!0)}}}leaf_title(e,t){const r=this.getParentNode(t);if((null==r?void 0:r.key)!==a.NodeType.bitsValue)return;const i=e.value,o=(null==r?void 0:r.value).level||1;if(o&&i){this.writeOP();for(let e=0;e<+o;e++)this.writeHash();this.writeString(i),this.writeCL()}}leaf_subtitle(e,t){const r=e.value;if(r){this.writeOP();for(let e=0;e<2;e++)this.writeHash();this.writeString(r),this.writeCL()}}leaf_book(e,t){const r=this.getParentNode(t),i=null==r?void 0:r.value;i&&e.value&&(this.writeProperty("book",e.value),i.reference&&(this.writeOPRANGLE(),this.writeString(i.reference),this.writeCL(),i.referenceEnd&&(this.writeOPRANGLE(),this.writeString(i.referenceEnd),this.writeCL())))}leaf_anchor(e,t){e.value&&(this.writeOPDANGLE(),this.writeString(e.value),this.writeCL())}leaf_reference(e,t){const r=this.getParentNode(t),i=null==r?void 0:r.value;i&&e.value&&(i.book||(this.writeOPRANGLE(),this.writeString(e.value),this.writeCL()))}leaf_hint(e,t){const r=e.value;r&&(this.writeOPQ(),this.writeString(r),this.writeCL())}leaf_instruction(e,t){const r=e.value;r&&(this.writeOPB(),this.writeString(r),this.writeCL())}leaf_example(e,t){var r,i;const o=e.value,n=this.getParentNode(t),a=null!==(r=null==n?void 0:n.value.isExample)&&void 0!==r&&r,s=null!==(i=null==n?void 0:n.value.isDefaultExample)&&void 0!==i&&i;a&&(s?(this.writeOPA(),this.writeString("example"),this.writeCL()):null!=o&&(this.writeOPA(),this.writeString("example"),this.writeColon(),!0===o?this.writeString("true"):!1===o?this.writeString("false"):this.writeString(o),this.writeCL()))}leaf_bodyText(e,t){const r=e.value;r&&this.writeString(r)}enter_bodyJson(e,t){const r=e.value;if(Array.isArray(r)||m.ObjectUtils.isObject(r)){const e=JSON.stringify(r,null,this.prettifySpace);e&&this.writeString(e)}return!1}enter_footer(e,t){this.write("~~~~"),this.writeNL()}leaf_footerText(e,t){const r=e.value;r&&this.writeString(r)}leaf_elementsValue(e,t){e.value&&this.writeString(e.value)}leaf_solutionsValue(e,t){null!=e.value&&(this.writeOPU(),this.writeString(e.value),this.writeCL())}leaf_prefix(e,t){e.value&&(this.writeOPPRE(),this.writeString(e.value),this.writeCL())}leaf_postfix(e,t){e.value&&(this.writeOPPOST(),this.writeString(e.value),this.writeCL())}leaf_isCaseSensitive(e,t){this.writeProperty("isCaseSensitive",e.value,!0,!1,!0)}leaf_forKeys(e,t){this.writeOPHASH(),this.writeString(e.value),this.writeCL()}leaf_forValuesValue(e,t){this.writeOPHASH(),this.writeString(e.value),this.writeCL()}leaf_key(e,t){e.value&&this.writeString(e.value)}leaf_valuesValue(e,t){e.value&&this.writeString(e.value)}leaf_question(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)!==a.NodeType.questionsValue&&(null==r?void 0:r.key)!==a.NodeType.flashcardsValue||e.value&&this.writeString(e.value)}leaf_src1x(e,t){this.writeProperty("src1x",e.value)}leaf_src2x(e,t){this.writeProperty("src2x",e.value)}leaf_src3x(e,t){this.writeProperty("src3x",e.value)}leaf_src4x(e,t){this.writeProperty("src4x",e.value)}leaf_width(e,t){this.writeProperty("width",e.value)}leaf_height(e,t){this.writeProperty("height",e.value)}leaf_alt(e,t){this.writeProperty("alt",e.value)}leaf_zoomDisabled(e,t){const r=this.getBitType(t);n.Config.isOfBitType(r,[s.BitType.imageSeparator,s.BitType.pageBanner,s.BitType.imagesLogoGrave,s.BitType.prototypeImages])?this.writeProperty("zoomDisabled",e.value,void 0,!1,!0):this.writeProperty("zoomDisabled",e.value,void 0,!0,!1)}leaf_license(e,t){this.writeProperty("license",e.value)}leaf_copyright(e,t){this.writeProperty("copyright",e.value)}leaf_provider(e,t){}leaf_showInIndex(e,t){this.writeProperty("showInIndex",e.value)}leaf_caption(e,t){const r=e.value;this.writeProperty("caption",r)}leaf_duration(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)!==a.NodeType.bitsValue&&this.writeProperty("duration",e.value)}leaf_mute(e,t){this.writeProperty("mute",e.value)}leaf_autoplay(e,t){this.writeProperty("autoplay",e.value)}leaf_allowSubtitles(e,t){this.writeProperty("allowSubtitles",e.value)}leaf_showSubtitles(e,t){this.writeProperty("showSubtitles",e.value)}generatePropertyHandlers(){var e;const t=n.Config.getRawPropertiesConfig();for(const r of Object.values(t)){const t=null!==(e=r.astKey)&&void 0!==e?e:r.tag;if(t===g.PropertyTag.internalComment)continue;if(t===g.PropertyTag.example)continue;if(t===g.PropertyTag.labelTrue)continue;if(t===g.PropertyTag.labelFalse)continue;if(t===g.PropertyTag.posterImage)continue;if(t===g.PropertyTag.imageSource)continue;if(t===g.PropertyTag.technicalTerm)continue;if(t===g.PropertyTag.servings)continue;if(t===g.PropertyTag.person)continue;if(t===c.PropertyAstKey.ast_markConfig)continue;if(t===g.PropertyTag.ratingLevelStart)continue;if(t===g.PropertyTag.ratingLevelEnd)continue;const i=`enter_${t}`;this[i]=(e,t)=>{if(null==e.value)return;const i=this.getParentNode(t);(null==i?void 0:i.key)===a.NodeType.bitsValue&&this.writeProperty(r.tag,e.value,r.single,"false"===r.defaultValue,"true"===r.defaultValue)},this[i]=this[i].bind(this)}}writeString(e){null!=e&&this.write(`${e}`)}writeOPBUL(){this.write("[•")}writeOPESC(){this.write("[^")}writeOPRANGLE(){this.write("[►")}writeOPDANGLE(){this.write("[▼")}writeOPD(){this.write("[.")}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(){this.write("]")}writeAmpersand(){this.write("&")}writeColon(){this.write(":")}writeHash(){this.write("#")}writeCardSetStart(){this.options.cardSetVersion===p.CardSetVersion.v1?this.write("\n==="):this.write("\n====")}writeCardSetEnd(){this.options.cardSetVersion===p.CardSetVersion.v1&&this.write("===")}writeCardSetCardDivider(){this.options.cardSetVersion===p.CardSetVersion.v1?this.write("==="):this.write("====")}writeCardSetSideDivider(){this.options.cardSetVersion===p.CardSetVersion.v1?this.write("=="):this.write("--")}writeCardSetVariantDivider(){this.options.cardSetVersion===p.CardSetVersion.v1?this.write("--"):this.write("++")}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writeResource(e){var t;const r=e;e&&(this.writeOPAMP(),this.writeString(null!==(t=e.typeAlias)&&void 0!==t?t:e.type),e.type===y.ResourceTag.article&&r.value?(this.writeColon(),this.writeString(r.value),this.writeNL()):e.value&&(this.writeColon(),this.writeString(e.value)),this.writeCL())}writeProperty(e,t,r,i,o){let n,a=!1;if(void 0!==t&&(n=Array.isArray(t)?t:[t],n.length>0)){r&&(n=n.slice(n.length-1));for(const t of n)if(void 0!==t){if(i&&!1===t)continue;if(o&&!0===t)continue;this.writeOPA(),this.writeString(e),this.writeColon(),this.writeString(`${t}`),this.writeCL(),a=!0}}a||(this.skipNLBetweenBitsValue=!0)}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}isWriteTextFormat(e,t){return!!(!(d.TextFormat.fromValue(e)===t)||this.options.explicitTextFormat)}isOfBitType1(e){return this.isOfBitType(e,[s.BitType.trueFalse1,s.BitType.multipleChoice1,s.BitType.multipleResponse1])}isOfBitType(e,t){const r=this.getBitType(e);return n.Config.isOfBitType(r,t)}getBitType(e){for(const t of e)if(t.key===a.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}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}}t.BitmarkGenerator=b},3968:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkStringGenerator=void 0;const o=r(6772),n=r(5087);t.BitmarkStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.BitmarkGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},2497:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonGenerator=void 0;const n=r(5126),a=r(7735),s=r(2028),l=r(126),u=r(5854),p=r(3811),c=r(4410),g=r(363),y=r(7203),d=r(166),f=r(6149),m=r(385),h=r(777),T=r(6989),b=r(4078),v=r(8025),B=r(9681),C=r(201),P=r(4),k={};class x extends P.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new n.Ast,this.textParser=new h.TextParser,this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=a.Breakscape.EMPTY_STRING,this.bodyDefault=a.Breakscape.EMPTY_STRING,this.bodyJson=this.bodyDefault,this.startPlaceholderIndex=0,this.bitmarkVersion=null!==(r=p.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==r?r:p.DEFAULT_BITMARK_VERSION,this.textParserVersion=this.textParser.version(),this.options=Object.assign(Object.assign({},k),null==t?void 0:t.jsonOptions),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.jsonPrettifySpace=!0===this.options.prettify?2:this.options.prettify||void 0,this.bitmarkVersion===p.BitmarkVersion.v2?void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!0):void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!1),this.writer=e,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.generatePropertyHandlers()}generate(e){return i(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=this.options.textAsPlainText?a.Breakscape.EMPTY_STRING:[],this.bodyDefault=this.options.textAsPlainText?a.Breakscape.EMPTY_STRING:[],this.bodyJson=this.bodyDefault,this.startPlaceholderIndex=0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,l.NodeType.bitmarkAst,this,void 0)}enter_bitmarkAst(e,t){this.json=[]}enter_bitsValue(e,t){var r,i,o;const n=e.value;this.bitWrapperJson={},this.json.push(this.bitWrapperJson),this.bitJson=this.createBitJson(n),this.bitWrapperJson.bit=this.bitJson;const a=s.Config.getBitConfig(n.bitType),l=!!a.rootExampleType,p=a.rootExampleType===g.ExampleType.boolean;if(l){let e;p?(e=!0,s.Config.isOfBitType(n.bitType,u.BitType.trueFalse1)&&void 0!==(null===(i=null===(r=n.cardNode)||void 0===r?void 0:r.statement)||void 0===i?void 0:i.isCorrect)&&(e=n.cardNode.statement.isCorrect)):e=null!==(o=n.sampleSolution)&&void 0!==o?o:"";const t=this.toExample(n,{defaultExample:e,isBoolean:p});this.bitJson.isExample=t.isExample,this.bitJson.example=t.example}else n.isExample&&(this.bitJson.isExample=!0)}exit_bitsValue(e,t){this.cleanAndSetDefaultsForBitJson(this.bitJson)}enter_imageSource(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return;const{url:o,mockupId:n,size:a,format:s,trim:u}=r,p={};this.addProperty(p,"url",null!=o?o:"",!0),this.addProperty(p,"mockupId",null!=n?n:"",!0),this.addProperty(p,"size",null!=a?a:null,!0),this.addProperty(p,"format",null!=s?s:null,!0),this.addProperty(p,"trim",b.BooleanUtils.isBoolean(u)?u:null,!0),this.bitJson.imageSource=p}enter_person(e,t){const r=e.value,i=this.getBitType(t),o=this.getParentNode(t);if((null==o?void 0:o.key)!==l.NodeType.bitsValue||!i)return;const{name:n,title:a,avatarImage:p}=r,c={};if(this.addProperty(c,"name",null!=n?n:"",!0),a&&this.addProperty(c,"title",a,!0),p){const e=this.parseResourceToJson(i,p);e&&e.type===f.ResourceTag.image&&(c.avatarImage=e.image)}s.Config.isOfBitType(i,u.BitType.conversationLeft1)?this.bitJson.partner=c:this.bitJson.person=c}enter_ratingLevelStart(e,t){const r=this.enterRatingLevelStartEndCommon(e,t);return r&&(this.bitJson.ratingLevelStart=r),!1}enter_ratingLevelEnd(e,t){const r=this.enterRatingLevelStartEndCommon(e,t);return r&&(this.bitJson.ratingLevelEnd=r),!1}enterRatingLevelStartEndCommon(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return;const o={};return this.addProperty(o,"level",r.level,!0),r.label&&(o.label=this.convertBreakscapedStringToJsonText(r.label,m.TextFormat.bitmarkMinusMinus)),null==(null==o?void 0:o.label)&&delete o.label,o}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.markConfig)return;const{mark:o,color:n,emphasis:a}=r,s={};this.addProperty(s,"mark",null!=o?o:"unknown",!0),n&&this.addProperty(s,"color",null!=n?n:"",!0),a&&this.addProperty(s,"emphasis",null!=a?a:"",!0),this.bitJson.marks||(this.bitJson.marks=[]),this.bitJson.marks.push(s)}leaf_sampleSolution(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)===l.NodeType.bitsValue&&null!=e.value&&this.addProperty(this.bitJson,"sampleSolution",e.value,!0)}enter_itemLead(e,t){const r=e.value,{item:i,lead:o,pageNumber:n,marginNumber:a}=r,s=this.getParentNode(t);(null==s?void 0:s.key)===l.NodeType.bitsValue&&(null!=i&&(this.bitJson.item=this.convertBreakscapedStringToJsonText(i,m.TextFormat.bitmarkMinusMinus)),null!=o&&(this.bitJson.lead=this.convertBreakscapedStringToJsonText(o,m.TextFormat.bitmarkMinusMinus)),null!=n&&(this.bitJson.pageNumber=this.convertBreakscapedStringToJsonText(n,m.TextFormat.bitmarkMinusMinus)),null!=a&&(this.bitJson.marginNumber=this.convertBreakscapedStringToJsonText(a,m.TextFormat.bitmarkMinusMinus)))}enter_width(e,t){var r;let i=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===l.NodeType.bitsValue&&s.Config.isOfBitType(o,u.BitType.extractorBlock)&&(i=null!==(r=v.NumberUtils.asNumber(i,0))&&void 0!==r?r:0),this.addProperty(this.bitJson,"width",i,!0),!1}enter_height(e,t){var r;let i=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===l.NodeType.bitsValue&&s.Config.isOfBitType(o,u.BitType.extractorBlock)&&(i=null!==(r=v.NumberUtils.asNumber(i,0))&&void 0!==r?r:0),this.addProperty(this.bitJson,"height",i,!0),!1}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)}}enter_cardBitsValue(e,t){const r=this.getBitType(t);if(!r)return;let i;r===u.BitType.pageFooter?(this.bitJson.sections||(this.bitJson.sections=[]),i=this.bitJson.sections):(this.bitJson.listItems||(this.bitJson.listItems=[]),i=this.bitJson.listItems),this.listItem=Object.assign(Object.assign({},this.toItemLeadHintInstruction(e.value)),{body:this.bodyDefault});const o=e.value,n=this.listItem;null==o.pageNumber&&delete n.pageNumber,null==o.marginNumber&&delete n.marginNumber,i.push(this.listItem)}exit_cardBitsValue(e,t){this.listItem=void 0}enter_body(e,t){this.getTextFormat(t)===m.TextFormat.json&&(this.bodyDefault=null),this.bodyJson=this.bodyDefault}exit_body(e,t){const r=this.getParentNode(t);r&&(r.key===l.NodeType.bitsValue?this.bitJson.body=this.bodyJson:r.key===l.NodeType.cardBitsValue&&this.listItem&&(this.listItem.body=this.bodyJson))}enter_bodyParts(e,t){const r=e.value,i=this.options.textAsPlainText,o=this.getTextFormat(t);let n="",s=this.startPlaceholderIndex;const l=e=>({legacyPlaceholderKey:`{${e}}`,placeholderKey:`[!${e}]`});for(let e=0;e<r.length;e++){const t=r[e];if(t.type===c.BodyBitType.text){const e=t.data.bodyText;n=a.Breakscape.concatenate(n,e)}else{const{legacyPlaceholderKey:e,placeholderKey:t}=l(s);n=a.Breakscape.concatenate(n,i?e:t),s++}}this.bodyJson=this.convertBreakscapedStringToJsonText(n,o);const u=this.bodyJson;s=this.startPlaceholderIndex;for(let e=0;e<r.length;e++){const t=r[e];if(t.type===c.BodyBitType.text)continue;const o=t;let n;const{legacyPlaceholderKey:a}=l(s);switch(t.type){case c.BodyBitType.gap:{const e=o;n=this.createGapJson(e);break}case c.BodyBitType.mark:{const e=o;n=this.createMarkJson(e);break}case c.BodyBitType.select:{const e=o;n=this.createSelectJson(e);break}case c.BodyBitType.highlight:{const e=o;n=this.createHighlightJson(e);break}}n&&(i?(this.bitJson.placeholders||(this.bitJson.placeholders={}),this.bitJson.placeholders[a]=n):this.replacePlaceholderWithBodyBit(u,n,s)),s++}return this.startPlaceholderIndex=s,!1}enter_bodyJson(e,t){const r=e.value;return this.bodyJson=r,!1}enter_elements(e,t){const r=e.value;r&&r.length>0&&(this.bitJson.elements=a.Breakscape.unbreakscape(r))}enter_flashcards(e,t){var r,i,o,n,s,u;const p=e.value,c=this.getParentNode(t);if((null==c?void 0:c.key)!==l.NodeType.cardNode)return;const g=[];if(p)for(const e of p){const t=Object.assign(Object.assign({question:this.convertBreakscapedStringToJsonText(null!==(r=e.question)&&void 0!==r?r:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),answer:this.convertBreakscapedStringToJsonText(null!==(i=e.answer)&&void 0!==i?i:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),alternativeAnswers:(null!==(o=e.alternativeAnswers)&&void 0!==o?o:[]).map((e=>this.convertBreakscapedStringToJsonText(null!=e?e:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus)))},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:e.isDefaultExample,isBoolean:!0}));null==(null===(n=e.itemLead)||void 0===n?void 0:n.lead)&&delete t.lead,null==(null===(s=e.itemLead)||void 0===s?void 0:s.pageNumber)&&delete t.pageNumber,null==(null===(u=e.itemLead)||void 0===u?void 0:u.marginNumber)&&delete t.marginNumber,g.push(t)}g.length>0&&(this.bitJson.cards=g)}enter_statement(e,t){var r,i;const o=e.value,n=this.getParentNode(t);(null==n?void 0:n.key)===l.NodeType.cardNode&&o&&(this.bitJson.statement=null!==(r=a.Breakscape.unbreakscape(o.text))&&void 0!==r?r:"",this.bitJson.isCorrect=null!==(i=o.isCorrect)&&void 0!==i&&i)}enter_statements(e,t){var r,i,o,n,s;const u=e.value,p=this.getParentNode(t);if((null==p?void 0:p.key)!==l.NodeType.cardNode)return;const c=[];if(u)for(const e of u){const t=Object.assign(Object.assign({statement:null!==(r=a.Breakscape.unbreakscape(e.text))&&void 0!==r?r:"",isCorrect:!!e.isCorrect},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:!!e.isCorrect,isBoolean:!0}));null==(null===(i=e.itemLead)||void 0===i?void 0:i.item)&&delete t.item,null==(null===(o=e.itemLead)||void 0===o?void 0:o.lead)&&delete t.lead,null==(null===(n=e.itemLead)||void 0===n?void 0:n.pageNumber)&&delete t.pageNumber,null==(null===(s=e.itemLead)||void 0===s?void 0:s.marginNumber)&&delete t.marginNumber,null==(null==e?void 0:e.hint)&&delete t.hint,null==(null==e?void 0:e.instruction)&&delete t.instruction,c.push(t)}c.length>0&&(this.bitJson.statements=c)}enter_choices(e,t){var r,i,o,n,s;const u=e.value,p=this.getParentNode(t);if((null==p?void 0:p.key)!==l.NodeType.cardNode)return;const c=[];if(u)for(const e of u){const t=Object.assign(Object.assign({choice:null!==(r=a.Breakscape.unbreakscape(e.text))&&void 0!==r?r:"",isCorrect:null!==(i=e.isCorrect)&&void 0!==i&&i},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:!!e.isCorrect,isBoolean:!0}));null==(null===(o=e.itemLead)||void 0===o?void 0:o.lead)&&delete t.lead,null==(null===(n=e.itemLead)||void 0===n?void 0:n.pageNumber)&&delete t.pageNumber,null==(null===(s=e.itemLead)||void 0===s?void 0:s.marginNumber)&&delete t.marginNumber,c.push(t)}c.length>0&&(this.bitJson.choices=c)}enter_responses(e,t){var r,i,o,n,s;const u=e.value,p=this.getParentNode(t);if((null==p?void 0:p.key)!==l.NodeType.cardNode)return;const c=[];if(u)for(const e of u){const t=Object.assign(Object.assign({response:null!==(r=a.Breakscape.unbreakscape(e.text))&&void 0!==r?r:"",isCorrect:null!==(i=e.isCorrect)&&void 0!==i&&i},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:!!e.isCorrect,isBoolean:!0}));null==(null===(o=e.itemLead)||void 0===o?void 0:o.lead)&&delete t.lead,null==(null===(n=e.itemLead)||void 0===n?void 0:n.pageNumber)&&delete t.pageNumber,null==(null===(s=e.itemLead)||void 0===s?void 0:s.marginNumber)&&delete t.marginNumber,c.push(t)}c.length>0&&(this.bitJson.responses=c)}enter_quizzes(e,t){var r,i,o,n,s,l,u,p,c,g,y,d,f,m;const h=e.value,T=[];if(h)for(const e of h){const t=[];if(e.choices)for(const l of e.choices){const u=Object.assign(Object.assign({choice:null!==(r=a.Breakscape.unbreakscape(l.text))&&void 0!==r?r:"",isCorrect:null!==(i=l.isCorrect)&&void 0!==i&&i},this.toItemLeadHintInstruction(l)),this.toExample(l,{defaultExample:!!l.isCorrect,isBoolean:!0}));null==(null===(o=e.itemLead)||void 0===o?void 0:o.lead)&&delete u.lead,null==(null===(n=e.itemLead)||void 0===n?void 0:n.pageNumber)&&delete u.pageNumber,null==(null===(s=e.itemLead)||void 0===s?void 0:s.marginNumber)&&delete u.marginNumber,t.push(u)}const h=[];if(e.responses)for(const t of e.responses){const r=Object.assign(Object.assign({response:null!==(l=a.Breakscape.unbreakscape(t.text))&&void 0!==l?l:"",isCorrect:null!==(u=t.isCorrect)&&void 0!==u&&u},this.toItemLeadHintInstruction(t)),this.toExample(t,{defaultExample:!!t.isCorrect,isBoolean:!0}));null==(null===(p=e.itemLead)||void 0===p?void 0:p.lead)&&delete r.lead,null==(null===(c=e.itemLead)||void 0===c?void 0:c.pageNumber)&&delete r.pageNumber,null==(null===(g=e.itemLead)||void 0===g?void 0:g.marginNumber)&&delete r.marginNumber,h.push(r)}const b=Object.assign(Object.assign({},this.toItemLeadHintInstruction(e)),{isExample:null!==(y=e.isExample)&&void 0!==y&&y,choices:e.choices?t:void 0,responses:e.responses?h:void 0});null==(null===(d=e.itemLead)||void 0===d?void 0:d.lead)&&delete b.lead,null==(null===(f=e.itemLead)||void 0===f?void 0:f.pageNumber)&&delete b.pageNumber,null==(null===(m=e.itemLead)||void 0===m?void 0:m.marginNumber)&&delete b.marginNumber,T.push(b)}T.length>0&&(this.bitJson.quizzes=T)}enter_heading(e,t){var r;const i=e.value,o=this.getBitType(t),n=s.Config.isOfBitType(o,u.BitType.matchMatrix),l={forKeys:null!==(r=a.Breakscape.unbreakscape(i.forKeys))&&void 0!==r?r:""};n?(l.forValues=[],Array.isArray(i.forValues)&&i.forValues.length>=1&&(l.forValues=a.Breakscape.unbreakscape(i.forValues))):(l.forValues="",Array.isArray(i.forValues)&&i.forValues.length>=1&&(l.forValues=a.Breakscape.unbreakscape(i.forValues[i.forValues.length-1]))),this.bitJson.heading=l}enter_pairs(e,t){var r,i,o,n,s,l;const u=e.value,p=[],c=this.getBitType(t);if(u&&c)for(const e of u){const t=Array.isArray(e.values)&&e.values.length>0&&e.values[0],u=Object.assign(Object.assign(Object.assign({key:null!==(r=a.Breakscape.unbreakscape(e.key))&&void 0!==r?r:"",keyAudio:e.keyAudio?this.addAudioResource(c,e.keyAudio):void 0,keyImage:e.keyImage?this.addImageResource(c,e.keyImage):void 0,values:null!==(i=a.Breakscape.unbreakscape(e.values))&&void 0!==i?i:[]},this.toItemLeadHintInstruction(e)),{isCaseSensitive:null===(o=e.isCaseSensitive)||void 0===o||o}),this.toExample(e,{defaultExample:t,isBoolean:!1}));null==(null===(n=e.itemLead)||void 0===n?void 0:n.lead)&&delete u.lead,null==(null===(s=e.itemLead)||void 0===s?void 0:s.pageNumber)&&delete u.pageNumber,null==(null===(l=e.itemLead)||void 0===l?void 0:l.marginNumber)&&delete u.marginNumber,u.key&&(delete u.keyAudio,delete u.keyImage),null!=u.keyAudio&&(delete u.key,delete u.keyImage),null!=u.keyImage&&(delete u.key,delete u.keyAudio),p.push(u)}p.length>0&&(this.bitJson.pairs=p)}enter_matrix(e,t){var r,i,o,n,s,l,u,p,c,g;const y=e.value,d=[];if(y)for(const e of y){const t=[];if(e.cells)for(const l of e.cells){const e=Array.isArray(l.values)&&l.values.length>0&&l.values[0],u=Object.assign(Object.assign(Object.assign({values:null!==(r=a.Breakscape.unbreakscape(l.values))&&void 0!==r?r:[]},this.toItemLeadHintInstruction(l)),{isCaseSensitive:null===(i=l.isCaseSensitive)||void 0===i||i}),this.toExample(l,{defaultExample:e,isBoolean:!1}));null==(null===(o=l.itemLead)||void 0===o?void 0:o.lead)&&delete u.lead,null==(null===(n=l.itemLead)||void 0===n?void 0:n.pageNumber)&&delete u.pageNumber,null==(null===(s=l.itemLead)||void 0===s?void 0:s.marginNumber)&&delete u.marginNumber,null==l.hint&&delete u.hint,t.push(u)}const y=Object.assign(Object.assign({key:null!==(l=a.Breakscape.unbreakscape(e.key))&&void 0!==l?l:"",cells:null!=t?t:[]},this.toItemLeadHintInstruction(e)),{isExample:null!==(u=e.isExample)&&void 0!==u&&u});null==(null===(p=e.itemLead)||void 0===p?void 0:p.lead)&&delete y.lead,null==(null===(c=e.itemLead)||void 0===c?void 0:c.pageNumber)&&delete y.pageNumber,null==(null===(g=e.itemLead)||void 0===g?void 0:g.marginNumber)&&delete y.marginNumber,null==e.instruction&&delete y.instruction,d.push(y)}d.length>0&&(this.bitJson.matrix=d)}enter_table(e,t){const r=e.value;if(r){const e={columns:a.Breakscape.unbreakscape(r.columns),data:r.rows.map((e=>a.Breakscape.unbreakscape(e)))};this.bitJson.table=e}}enter_questions(e,t){var r,i,o,n,s,l;const u=e.value,p=[];if(u)for(const e of u){const t=Object.assign(Object.assign(Object.assign({question:null!==(r=a.Breakscape.unbreakscape(e.question))&&void 0!==r?r:"",partialAnswer:null!==(i=a.Breakscape.unbreakscape(T.ArrayUtils.asSingle(e.partialAnswer)))&&void 0!==i?i:"",sampleSolution:null!==(o=a.Breakscape.unbreakscape(e.sampleSolution))&&void 0!==o?o:""},this.toItemLeadHintInstruction(e)),{reasonableNumOfChars:e.reasonableNumOfChars}),this.toExample(e,{defaultExample:e.sampleSolution||"",isBoolean:!1}));null==(null===(n=e.itemLead)||void 0===n?void 0:n.lead)&&delete t.lead,null==(null===(s=e.itemLead)||void 0===s?void 0:s.pageNumber)&&delete t.pageNumber,null==(null===(l=e.itemLead)||void 0===l?void 0:l.marginNumber)&&delete t.marginNumber,p.push(t)}p.length>0&&(this.bitJson.questions=p)}enter_botResponses(e,t){var r,i,o,n,s,u;const p=e.value,c=this.getParentNode(t);if((null==c?void 0:c.key)!==l.NodeType.cardNode)return;const g=[];if(p)for(const e of p){const t=Object.assign({response:null!==(r=a.Breakscape.unbreakscape(e.response))&&void 0!==r?r:"",reaction:null!==(i=a.Breakscape.unbreakscape(e.reaction))&&void 0!==i?i:"",feedback:null!==(o=a.Breakscape.unbreakscape(e.feedback))&&void 0!==o?o:""},this.toItemLeadHintInstruction(e));null==(null===(n=e.itemLead)||void 0===n?void 0:n.lead)&&delete t.lead,null==(null===(s=e.itemLead)||void 0===s?void 0:s.pageNumber)&&delete t.pageNumber,null==(null===(u=e.itemLead)||void 0===u?void 0:u.marginNumber)&&delete t.marginNumber,null==e.hint&&delete t.hint,delete t.instruction,g.push(t)}g.length>0&&(this.bitJson.responses=g)}enter_ingredients(e,t){var r,i,o,n,s,u,p,c;const g=e.value,y=this.getParentNode(t);if((null==y?void 0:y.key)!==l.NodeType.cardNode)return;const d=[];if(g)for(const e of g){const t={title:null!==(r=a.Breakscape.unbreakscape(e.title))&&void 0!==r?r:"",checked:null!==(i=e.checked)&&void 0!==i&&i,item:null!==(o=a.Breakscape.unbreakscape(e.item))&&void 0!==o?o:"",quantity:null!==(n=e.quantity)&&void 0!==n?n:0,unit:null!==(s=a.Breakscape.unbreakscape(e.unit))&&void 0!==s?s:"",unitAbbr:null!==(u=a.Breakscape.unbreakscape(e.unitAbbr))&&void 0!==u?u:"",decimalPlaces:null!==(p=e.decimalPlaces)&&void 0!==p?p:1,disableCalculation:null!==(c=e.disableCalculation)&&void 0!==c&&c};null==(null==e?void 0:e.title)&&delete t.title,null==(null==e?void 0:e.unitAbbr)&&delete t.unitAbbr,d.push(t)}d.length>0&&(this.bitJson.ingredients=d)}enter_resources(e,t){var r;const i=e.value,o=this.getBitType(t),n=this.getResourceType(t);if(!i||!o)return;let a;const l=s.Config.getBitConfig(o),p=s.Config.getBitResourcesConfig(o,n),c=p.comboResourceTagTypesMap;if(p.comboResourceTagTypesMap.size>0)for(const[e,t]of c.entries()){const n={type:e};for(const e of t){const t=i.find((t=>t.typeAlias===e));if(t){const e=s.Config.getTagConfigForTag(l.tags,t.typeAlias),i=null!==(r=null==e?void 0:e.jsonKey)&&void 0!==r?r:t.typeAlias,a=this.parseResourceToJson(o,t);if(a)for(const[e,t]of Object.entries(a))"type"!==e&&(n[i]=t)}}a=n}else if(s.Config.isOfBitType(o,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])){const e=[];for(const t of i){const r=this.parseResourceToJson(o,t);r&&e.push(r)}o===u.BitType.imagesLogoGrave?this.bitJson.logos=e:this.bitJson.images=e}else i.length>=1&&(a=this.parseResourceToJson(o,i[0]));this.bitJson.resource=a}leaf_title(e,t){const r=this.getParentNode(t);(null==r?void 0:r.key)!==l.NodeType.bitsValue&&(null==r?void 0:r.key)!==l.NodeType.cardNode||(this.bitJson.title=this.convertBreakscapedStringToJsonText(e.value,m.TextFormat.bitmarkMinusMinus))}leaf_subtitle(e,t){this.bitJson.subtitle=this.convertBreakscapedStringToJsonText(e.value,m.TextFormat.bitmarkMinusMinus)}leaf_level(e,t){var r;null!=e.value&&this.addProperty(this.bitJson,"level",null!==(r=e.value)&&void 0!==r?r:1,!0)}leaf_book(e,t){null!=e.value&&this.addProperty(this.bitJson,"book",e.value,!0)}leaf_anchor(e,t){null!=e.value&&this.addProperty(this.bitJson,"anchor",e.value,!0)}leaf_reference(e,t){null!=e.value&&this.addProperty(this.bitJson,"reference",e.value,!0)}leaf_referenceEnd(e,t){null!=e.value&&this.addProperty(this.bitJson,"referenceEnd",e.value,!0)}leaf_caption(e,t){const r=e.value,i=this.getParentNode(t);(null==i?void 0:i.key)===l.NodeType.bitsValue&&(this.bitJson.caption=this.convertBreakscapedStringToJsonText(r,m.TextFormat.bitmarkMinusMinus))}leaf_hint(e,t){const r=e.value,i=this.getParentNode(t);(null==i?void 0:i.key)===l.NodeType.bitsValue&&(this.bitJson.hint=this.convertBreakscapedStringToJsonText(r,m.TextFormat.bitmarkMinusMinus))}leaf_instruction(e,t){const r=e.value,i=this.getParentNode(t);(null==i?void 0:i.key)===l.NodeType.bitsValue&&(this.bitJson.instruction=this.convertBreakscapedStringToJsonText(r,m.TextFormat.bitmarkMinusMinus))}leaf_footerText(e,t){const r=e.value;this.bitJson.footer=this.convertBreakscapedStringToJsonText(r,m.TextFormat.bitmarkMinusMinus)}leaf_markup(e,t){const r=e.value;r&&(this.bitWrapperJson.bitmark=r)}enter_parser(e,t){const r=e.value,i=this.getBitType(t),n=this.getParentNode(t);if(r&&i){const{version:e,excessResources:s,warnings:u,errors:p}=r,c=o(r,["version","excessResources","warnings","errors"]),g=`${this.bitmarkVersion}`,y=this.textParserVersion;let d;if(Array.isArray(s)&&s.length>0){d=[];for(const e of s){const t=this.parseResourceToJson(i,e);t&&d.push(t)}}const f=a.Breakscape.unbreakscape(this.getInternalComments(t));(null==n?void 0:n.key)===l.NodeType.bitsValue&&(this.bitWrapperJson.parser=Object.assign(Object.assign({version:e,bitmarkVersion:g,textParserVersion:y,internalComments:f},c),{warnings:u,errors:p,excessResources:d}),this.options.enableWarnings||delete this.bitWrapperJson.parser.warnings)}}generatePropertyHandlers(){var e;const t=s.Config.getRawPropertiesConfig();for(const r of Object.values(t)){const t=null!==(e=r.astKey)&&void 0!==e?e:r.tag;if(t===d.PropertyTag.internalComment)continue;if(t===d.PropertyTag.caption)continue;if(t===d.PropertyTag.example)continue;if(t===d.PropertyTag.imageSource)continue;if(t===d.PropertyTag.person)continue;if(t===d.PropertyTag.width)continue;if(t===d.PropertyTag.height)continue;if(t===y.PropertyAstKey.ast_markConfig)continue;if(t===d.PropertyTag.ratingLevelStart)continue;if(t===d.PropertyTag.ratingLevelEnd)continue;const i=`enter_${t}`;this[i]=(e,t)=>{var i;const o=e.value;if(null==o)return;const n=this.getParentNode(t);if((null==n?void 0:n.key)!==l.NodeType.bitsValue)return;const a=null!==(i=r.jsonKey)&&void 0!==i?i:r.tag;this.addProperty(this.bitJson,a,o,r.single)},this[i]=this[i].bind(this)}}createGapJson(e){var t;const r=e.data,i=r.solutions&&r.solutions.length>0?r.solutions[0]:"";return Object.assign(Object.assign(Object.assign(Object.assign({type:"gap"},this.toItemLeadHintInstruction(r)),{isCaseSensitive:null===(t=r.isCaseSensitive)||void 0===t||t}),this.toExample(r,{defaultExample:i,isBoolean:!1})),{solutions:a.Breakscape.unbreakscape(r.solutions)})}createMarkJson(e){const t=e.data;return Object.assign(Object.assign({type:"mark",solution:a.Breakscape.unbreakscape(t.solution),mark:a.Breakscape.unbreakscape(t.mark)},this.toItemLeadHintInstruction(t)),this.toExample(t,{defaultExample:!0,isBoolean:!0}))}createSelectJson(e){var t,r,i,o;const n=e.data,s=[];for(const e of n.options){const r=Object.assign(Object.assign({text:a.Breakscape.unbreakscape(e.text),isCorrect:null!==(t=e.isCorrect)&&void 0!==t&&t},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:!!e.isCorrect,isBoolean:!0}));s.push(r)}return Object.assign(Object.assign({type:"select",prefix:null!==(r=a.Breakscape.unbreakscape(n.prefix))&&void 0!==r?r:"",postfix:null!==(i=a.Breakscape.unbreakscape(n.postfix))&&void 0!==i?i:""},this.toItemLeadHintInstruction(n)),{isExample:null!==(o=n.isExample)&&void 0!==o&&o,options:s})}createHighlightJson(e){var t,r,i,o,n;const s=e.data,l=[];for(const e of s.texts){const i=Object.assign(Object.assign({text:a.Breakscape.unbreakscape(e.text),isCorrect:null!==(t=e.isCorrect)&&void 0!==t&&t,isHighlighted:null!==(r=e.isHighlighted)&&void 0!==r&&r},this.toItemLeadHintInstruction(e)),this.toExample(e,{defaultExample:!!e.isCorrect,isBoolean:!0}));l.push(i)}return Object.assign(Object.assign({type:"highlight",prefix:null!==(i=a.Breakscape.unbreakscape(s.prefix))&&void 0!==i?i:"",postfix:null!==(o=a.Breakscape.unbreakscape(s.postfix))&&void 0!==o?o:""},this.toItemLeadHintInstruction(s)),{isExample:null!==(n=s.isExample)&&void 0!==n&&n,texts:l})}parseResourceToJson(e,t){if(!t)return;let r;switch(t.type){case f.ResourceTag.image:r={type:f.ResourceTag.image,image:this.addImageResource(e,t)};break;case f.ResourceTag.imageLink:r={type:f.ResourceTag.imageLink,imageLink:this.addImageLinkResource(e,t)};break;case f.ResourceTag.audio:r={type:f.ResourceTag.audio,audio:this.addAudioResource(e,t)};break;case f.ResourceTag.audioEmbed:r={type:f.ResourceTag.audioEmbed,audioEmbed:this.addAudioEmbedResource(e,t)};break;case f.ResourceTag.audioLink:r={type:f.ResourceTag.audioLink,audioLink:this.addAudioLinkResource(e,t)};break;case f.ResourceTag.video:r={type:f.ResourceTag.video,video:this.addVideoResource(e,t)};break;case f.ResourceTag.videoEmbed:r={type:f.ResourceTag.videoEmbed,videoEmbed:this.addVideoEmbedResource(e,t)},r.videoEmbed=this.addVideoLinkResource(e,t);break;case f.ResourceTag.videoLink:r={type:f.ResourceTag.videoLink,videoLink:this.addVideoLinkResource(e,t)};break;case f.ResourceTag.stillImageFilmEmbed:r={type:f.ResourceTag.stillImageFilmEmbed,stillImageFilmEmbed:this.addStillImageFilmEmbedResource(e,t)};break;case f.ResourceTag.stillImageFilmLink:r={type:f.ResourceTag.stillImageFilmLink,stillImageFilmLink:this.addStillImageFilmLinkResource(e,t)};break;case f.ResourceTag.article:r={type:f.ResourceTag.article,article:this.addArticleResource(e,t)};break;case f.ResourceTag.document:r={type:f.ResourceTag.document,document:this.addDocumentResource(e,t)};break;case f.ResourceTag.documentEmbed:r={type:f.ResourceTag.documentEmbed,documentEmbed:this.addDocumentEmbedResource(e,t)};break;case f.ResourceTag.documentLink:r={type:f.ResourceTag.documentLink,documentLink:this.addDocumentLinkResource(e,t)};break;case f.ResourceTag.documentDownload:r={type:f.ResourceTag.documentDownload,documentDownload:this.addDocumentDownloadResource(e,t)};break;case f.ResourceTag.appLink:r={type:f.ResourceTag.appLink,appLink:this.addAppLinkResource(e,t)};break;case f.ResourceTag.websiteLink:r={type:f.ResourceTag.websiteLink,websiteLink:this.addWebsiteLinkResource(e,t)}}return r}addImageResource(e,t){var r,i,o;const n={};if(B.StringUtils.isString(t)){const e=t;t={type:f.ResourceTag.image,typeAlias:f.ResourceTag.image,value:e,format:C.UrlUtils.fileExtensionFromUrl(e),provider:C.UrlUtils.domainFromUrl(e)}}return null!=t.format&&(n.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(n.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(n.src=a.Breakscape.unbreakscape(t.value)),null!=t.src1x&&(n.src1x=a.Breakscape.unbreakscape(t.src1x)),null!=t.src2x&&(n.src2x=a.Breakscape.unbreakscape(t.src2x)),null!=t.src3x&&(n.src3x=a.Breakscape.unbreakscape(t.src3x)),null!=t.src4x&&(n.src4x=a.Breakscape.unbreakscape(t.src4x)),n.width=null!==(r=t.width)&&void 0!==r?r:null,n.height=null!==(i=t.height)&&void 0!==i?i:null,n.alt=null!==(o=a.Breakscape.unbreakscape(t.alt))&&void 0!==o?o:"",n.zoomDisabled=this.getZoomDisabled(e,t.zoomDisabled),this.addGenericResourceProperties(e,t,n),n}addImageLinkResource(e,t){var r,i,o;const n={};if(B.StringUtils.isString(t)){const e=t;t={type:f.ResourceTag.imageLink,typeAlias:f.ResourceTag.imageLink,value:e,format:C.UrlUtils.fileExtensionFromUrl(e),provider:C.UrlUtils.domainFromUrl(e)}}return null!=t.format&&(n.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(n.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(n.url=a.Breakscape.unbreakscape(t.value)),null!=t.src1x&&(n.src1x=a.Breakscape.unbreakscape(t.src1x)),null!=t.src2x&&(n.src2x=a.Breakscape.unbreakscape(t.src2x)),null!=t.src3x&&(n.src3x=a.Breakscape.unbreakscape(t.src3x)),null!=t.src4x&&(n.src4x=a.Breakscape.unbreakscape(t.src4x)),n.width=null!==(r=t.width)&&void 0!==r?r:null,n.height=null!==(i=t.height)&&void 0!==i?i:null,n.alt=null!==(o=a.Breakscape.unbreakscape(t.alt))&&void 0!==o?o:"",n.zoomDisabled=this.getZoomDisabled(e,t.zoomDisabled),this.addGenericResourceProperties(e,t,n),n}addAudioResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.src=a.Breakscape.unbreakscape(t.value)),null!=t.duration&&(r.duration=t.duration),null!=t.mute&&(r.mute=t.mute),null!=t.autoplay&&(r.autoplay=t.autoplay),this.addGenericResourceProperties(e,t,r),r}addAudioEmbedResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.src=a.Breakscape.unbreakscape(t.value)),null!=t.duration&&(r.duration=t.duration),null!=t.mute&&(r.mute=t.mute),null!=t.autoplay&&(r.autoplay=t.autoplay),this.addGenericResourceProperties(e,t,r),r}addAudioLinkResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),null!=t.duration&&(r.duration=t.duration),null!=t.mute&&(r.mute=t.mute),null!=t.autoplay&&(r.autoplay=t.autoplay),this.addGenericResourceProperties(e,t,r,!0),r}addVideoResource(e,t){var r,i;const o={};if(null!=t.format&&(o.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(o.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(o.src=a.Breakscape.unbreakscape(t.value)),o.width=null!==(r=t.width)&&void 0!==r?r:null,o.height=null!==(i=t.height)&&void 0!==i?i:null,null!=t.duration&&(o.duration=t.duration),null!=t.mute&&(o.mute=t.mute),null!=t.autoplay&&(o.autoplay=t.autoplay),null!=t.allowSubtitles&&(o.allowSubtitles=t.allowSubtitles),null!=t.showSubtitles&&(o.showSubtitles=t.showSubtitles),null!=t.alt&&(o.alt=a.Breakscape.unbreakscape(t.alt)),null!=t.posterImage&&(o.posterImage=this.addImageResource(e,t.posterImage)),null!=t.thumbnails&&t.thumbnails.length>0){o.thumbnails=[];for(const r of t.thumbnails)o.thumbnails.push(this.addImageResource(e,r))}return this.addGenericResourceProperties(e,t,o),o}addVideoEmbedResource(e,t){var r,i;const o={};if(null!=t.format&&(o.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(o.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(o.src=a.Breakscape.unbreakscape(t.value)),o.width=null!==(r=t.width)&&void 0!==r?r:null,o.height=null!==(i=t.height)&&void 0!==i?i:null,null!=t.duration&&(o.duration=t.duration),null!=t.mute&&(o.mute=t.mute),null!=t.autoplay&&(o.autoplay=t.autoplay),null!=t.allowSubtitles&&(o.allowSubtitles=t.allowSubtitles),null!=t.showSubtitles&&(o.showSubtitles=t.showSubtitles),null!=t.alt&&(o.alt=a.Breakscape.unbreakscape(t.alt)),null!=t.posterImage&&(o.posterImage=this.addImageResource(e,t.posterImage)),null!=t.thumbnails&&t.thumbnails.length>0){o.thumbnails=[];for(const r of t.thumbnails)o.thumbnails.push(this.addImageResource(e,r))}return this.addGenericResourceProperties(e,t,o),o}addVideoLinkResource(e,t){var r,i;const o={};if(null!=t.format&&(o.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(o.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(o.url=a.Breakscape.unbreakscape(t.value)),o.width=null!==(r=t.width)&&void 0!==r?r:null,o.height=null!==(i=t.height)&&void 0!==i?i:null,null!=t.duration&&(o.duration=t.duration),null!=t.mute&&(o.mute=t.mute),null!=t.autoplay&&(o.autoplay=t.autoplay),null!=t.allowSubtitles&&(o.allowSubtitles=t.allowSubtitles),null!=t.showSubtitles&&(o.showSubtitles=t.showSubtitles),null!=t.alt&&(o.alt=a.Breakscape.unbreakscape(t.alt)),null!=t.posterImage&&(o.posterImage=this.addImageResource(e,t.posterImage)),null!=t.thumbnails&&t.thumbnails.length>0){o.thumbnails=[];for(const r of t.thumbnails)o.thumbnails.push(this.addImageResource(e,r))}return this.addGenericResourceProperties(e,t,o),o}addStillImageFilmEmbedResource(e,t){var r,i;const o={};if(null!=t.format&&(o.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(o.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(o.url=a.Breakscape.unbreakscape(t.value)),o.width=null!==(r=t.width)&&void 0!==r?r:null,o.height=null!==(i=t.height)&&void 0!==i?i:null,null!=t.duration&&(o.duration=t.duration),null!=t.mute&&(o.mute=t.mute),null!=t.autoplay&&(o.autoplay=t.autoplay),null!=t.allowSubtitles&&(o.allowSubtitles=t.allowSubtitles),null!=t.showSubtitles&&(o.showSubtitles=t.showSubtitles),null!=t.alt&&(o.alt=a.Breakscape.unbreakscape(t.alt)),null!=t.posterImage&&(o.posterImage=this.addImageResource(e,t.posterImage)),null!=t.thumbnails&&t.thumbnails.length>0){o.thumbnails=[];for(const r of t.thumbnails)o.thumbnails.push(this.addImageResource(e,r))}return this.addGenericResourceProperties(e,t,o),o}addStillImageFilmLinkResource(e,t){var r,i;const o={};if(null!=t.format&&(o.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(o.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(o.url=a.Breakscape.unbreakscape(t.value)),o.width=null!==(r=t.width)&&void 0!==r?r:null,o.height=null!==(i=t.height)&&void 0!==i?i:null,null!=t.duration&&(o.duration=t.duration),null!=t.mute&&(o.mute=t.mute),null!=t.autoplay&&(o.autoplay=t.autoplay),null!=t.allowSubtitles&&(o.allowSubtitles=t.allowSubtitles),null!=t.showSubtitles&&(o.showSubtitles=t.showSubtitles),null!=t.alt&&(o.alt=a.Breakscape.unbreakscape(t.alt)),null!=t.posterImage&&(o.posterImage=this.addImageResource(e,t.posterImage)),null!=t.thumbnails&&t.thumbnails.length>0){o.thumbnails=[];for(const r of t.thumbnails)o.thumbnails.push(this.addImageResource(e,r))}return this.addGenericResourceProperties(e,t,o),o}addArticleResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.body=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addDocumentResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addDocumentEmbedResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addDocumentLinkResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addDocumentDownloadResource(e,t){const r={};return null!=t.format&&(r.format=a.Breakscape.unbreakscape(t.format)),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addAppLinkResource(e,t){const r={};return null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),this.addGenericResourceProperties(e,t,r),r}addWebsiteLinkResource(e,t){const r={};return null!=t.value&&(r.url=a.Breakscape.unbreakscape(t.value)),null!=t.siteName&&(r.siteName=a.Breakscape.unbreakscape(t.siteName)),this.addGenericResourceProperties(e,t,r),r}addGenericResourceProperties(e,t,r,i){var o,n,s,l,u,p,c,g;return i?(null!=t.license&&(r.license=null!==(o=a.Breakscape.unbreakscape(t.license))&&void 0!==o?o:""),null!=t.copyright&&(r.copyright=null!==(n=a.Breakscape.unbreakscape(t.copyright))&&void 0!==n?n:""),null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),null!=t.showInIndex&&(r.showInIndex=null!==(s=t.showInIndex)&&void 0!==s&&s),null!=t.caption&&(r.caption=this.convertBreakscapedStringToJsonText(null!==(l=t.caption)&&void 0!==l?l:"",m.TextFormat.bitmarkMinusMinus))):(r.license=null!==(u=a.Breakscape.unbreakscape(t.license))&&void 0!==u?u:"",r.copyright=null!==(p=a.Breakscape.unbreakscape(t.copyright))&&void 0!==p?p:"",null!=t.provider&&(r.provider=a.Breakscape.unbreakscape(t.provider)),r.showInIndex=null!==(c=t.showInIndex)&&void 0!==c&&c,r.caption=this.convertBreakscapedStringToJsonText(null!==(g=t.caption)&&void 0!==g?g:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus)),r}toItemLeadHintInstruction(e){var t,r,i,o,n,s,l,u,p,c;return{item:this.convertBreakscapedStringToJsonText(null!==(r=null===(t=e.itemLead)||void 0===t?void 0:t.item)&&void 0!==r?r:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),lead:this.convertBreakscapedStringToJsonText(null!==(o=null===(i=e.itemLead)||void 0===i?void 0:i.lead)&&void 0!==o?o:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),pageNumber:this.convertBreakscapedStringToJsonText(null!==(s=null===(n=e.itemLead)||void 0===n?void 0:n.pageNumber)&&void 0!==s?s:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),marginNumber:this.convertBreakscapedStringToJsonText(null!==(u=null===(l=e.itemLead)||void 0===l?void 0:l.marginNumber)&&void 0!==u?u:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),hint:this.convertBreakscapedStringToJsonText(null!==(p=e.hint)&&void 0!==p?p:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus),instruction:this.convertBreakscapedStringToJsonText(null!==(c=e.instruction)&&void 0!==c?c:a.Breakscape.EMPTY_STRING,m.TextFormat.bitmarkMinusMinus)}}toExample(e,t){const{isExample:r,example:i,isDefaultExample:o}=e,{defaultExample:n,isBoolean:a}=t;if(!r)return{isExample:!1,example:null};let s;return s=o?a?b.BooleanUtils.toBoolean(n):this.convertBreakscapedStringToJsonText(n,m.TextFormat.bitmarkMinusMinus):a?b.BooleanUtils.toBoolean(i):this.convertBreakscapedStringToJsonText(i,m.TextFormat.bitmarkMinusMinus),{isExample:!0,example:s}}addProperty(e,t,r,i){if(void 0!==r){let o;Array.isArray(r)||(r=[r]),Array.isArray(r)&&r.length>0&&(r=a.Breakscape.unbreakscape(r),o=Array.isArray(r)&&i&&r.length>=1?r[r.length-1]:r),e[t]=o}}getZoomDisabled(e,t){return null!=t?t:!!s.Config.isOfBitType(e,[u.BitType.imageSeparator,u.BitType.pageBanner,u.BitType.imagesLogoGrave,u.BitType.prototypeImages])}getBitType(e){for(const t of e)if(t.key===l.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}getTextFormat(e){var t;const r=this.getBitType(e);if(r){const i=s.Config.getBitConfig(r);for(const r of e)if(r.key===l.NodeType.bitsValue){const e=r.value;return null!==(t=m.TextFormat.fromValue(null==e?void 0:e.textFormat))&&void 0!==t?t:i.textFormatDefault}}return m.TextFormat.bitmarkMinusMinus}getResourceType(e){for(const t of e)if(t.key===l.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.resourceType}}getInternalComments(e){if(this.getBitType(e))for(const t of e)if(t.key===l.NodeType.bitsValue){return t.value.internalComment}}convertBreakscapedStringToJsonText(e,t){if(this.options.textAsPlainText||t===m.TextFormat.text||t===m.TextFormat.json)return e||a.Breakscape.EMPTY_STRING;return this.textParser.toAst(e,{textFormat:t})}replacePlaceholderWithBodyBit(e,t,r){const i=(e,o,n)=>{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[n]=t,!0;if(e.content){if(i(e.content,e,"content"))return!0}}return!1};i(e,null,null)}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){return{type:e.isCommented?u.BitType._comment:e.bitType,originalType:e.isCommented?e.bitType:void 0,format:e.textFormat,id:void 0,internalComment:void 0,externalId:void 0,spaceId:void 0,padletId:void 0,jupyterId:void 0,jupyterExecutionCount:void 0,isPublic:void 0,AIGenerated:void 0,analyticsTag:void 0,disableFeedback:void 0,releaseVersion:void 0,releaseKind:void 0,releaseDate:void 0,book:void 0,ageRange:void 0,lang:void 0,language:void 0,publisher:void 0,publisherName:void 0,theme:void 0,computerLanguage:void 0,target:void 0,tag:void 0,reductionTag:void 0,icon:void 0,iconTag:void 0,colorTag:void 0,flashcardSet:void 0,subtype:void 0,bookAlias:void 0,coverImage:void 0,coverColor:void 0,publications:void 0,author:void 0,subject:void 0,date:void 0,location:void 0,kind:void 0,hasMarkAsDone:void 0,action:void 0,blockId:void 0,pageNo:void 0,x:void 0,y:void 0,width:void 0,height:void 0,index:void 0,classification:void 0,availableClassifications:void 0,tableFixedHeader:void 0,tableSearch:void 0,tableSort:void 0,tablePagination:void 0,tablePaginationLimit:void 0,tableHeight:void 0,tableWhitespaceNoWrap:void 0,tableAutoWidth:void 0,tableResizableColumns:void 0,quizCountItems:void 0,quizStrikethroughSolutions:void 0,codeLineNumbers:void 0,codeMinimap:void 0,thumbImage:void 0,scormSource:void 0,posterImage:void 0,focusX:void 0,focusY:void 0,pointerLeft:void 0,pointerTop:void 0,backgroundWallpaper:void 0,hasBookNavigation:void 0,deeplink:void 0,externalLink:void 0,externalLinkText:void 0,videoCallLink:void 0,vendorUrl:void 0,search:void 0,duration:void 0,list:void 0,textReference:void 0,isTracked:void 0,isInfoOnly:void 0,labelTrue:void 0,labelFalse:void 0,content2Buy:void 0,mailingList:void 0,buttonCaption:void 0,caption:void 0,quotedPerson:void 0,reasonableNumOfChars:void 0,resolved:void 0,resolvedDate:void 0,resolvedBy:void 0,maxCreatedBits:void 0,maxDisplayLevel:void 0,productId:void 0,product:void 0,productVideo:void 0,productFolder:void 0,technicalTerm:void 0,servings:void 0,ratingLevelStart:void 0,ratingLevelEnd:void 0,ratingLevelSelected:void 0,title:void 0,subtitle:void 0,level:void 0,toc:void 0,progress:void 0,anchor:void 0,reference:void 0,referenceEnd:void 0,item:void 0,lead:void 0,pageNumber:void 0,marginNumber:void 0,hint:void 0,instruction:void 0,isExample:void 0,example:void 0,person:void 0,marks:void 0,extraProperties:void 0,body:void 0,resource:void 0,logos:void 0,images:void 0,statement:void 0,isCorrect:void 0,sampleSolution:void 0,partialAnswer:void 0,elements:void 0,statements:void 0,responses:void 0,quizzes:void 0,heading:void 0,pairs:void 0,matrix:void 0,choices:void 0,questions:void 0,listItems:void 0,sections:void 0,placeholders:void 0,footer:void 0}}cleanAndSetDefaultsForBitJson(e){const t=s.Config.getBitType(e.type),r=e.format,i=this.options.textAsPlainText;return null==e.originalType&&(e.originalType=void 0),e.item||(e.item=void 0),s.Config.isOfBitType(t,[u.BitType._error,u.BitType._comment])?delete e.format:s.Config.isOfBitType(t,[u.BitType.article,u.BitType.sampleSolution,u.BitType.page])?null==e.body&&(e.body=this.bodyDefault):s.Config.isOfBitType(t,[u.BitType.multipleChoice1,u.BitType.multipleResponse1,u.BitType.multipleChoiceText,u.BitType.highlightText,u.BitType.clozeAndMultipleChoiceText,u.BitType.sequence,u.BitType.mark,u.BitType.flashcard])?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.cloze)?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.body&&(e.body=this.bodyDefault),s.Config.isOfBitType(t,u.BitType.clozeSolutionGrouped)?(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!0)):s.Config.isOfBitType(t,u.BitType.clozeInstructionGrouped)&&(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!1))):s.Config.isOfBitType(t,[u.BitType.multipleChoice,u.BitType.multipleResponse])?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault)):s.Config.isOfBitType(t,u.BitType.essay)?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.example&&(e.example=null),null==e.body&&(e.body=this.bodyDefault),null==e.partialAnswer&&(e.partialAnswer="")):s.Config.isOfBitType(t,u.BitType.trueFalse1)?(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.isExample&&(e.isExample=!1),null==e.example&&(e.example=null),null==e.isCorrect&&(e.isCorrect=!1),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.trueFalse)?(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.isExample&&(e.isExample=!1),null==e.labelFalse&&(e.labelFalse=""),null==e.labelTrue&&(e.labelTrue=""),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.chapter)?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.example&&(e.example=null),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)):s.Config.isOfBitType(t,u.BitType.interview)?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault),null==e.questions&&(e.questions=[])):t===u.BitType.matchMatrix?(null==e.item&&(e.item=this.textDefault),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.match)?(null==e.item&&(e.item=this.textDefault),null==e.heading&&(e.heading={}),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.learningPathBook)?(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.example&&(e.example=null),null==e.isTracked&&(e.isTracked=!0),null==e.isInfoOnly&&(e.isInfoOnly=!1),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.pageBuyButton)?(null==e.content2Buy&&(e.content2Buy=""),null==e.body&&(e.body=this.bodyDefault)):s.Config.isOfBitType(t,u.BitType.table)?(null==e.tableFixedHeader&&(e.tableFixedHeader=!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=!0),null==e.tableAutoWidth&&(e.tableAutoWidth=!0),null==e.tableResizableColumns&&(e.tableResizableColumns=!1),null==e.body&&(e.body=this.bodyDefault)):(null==e.item&&(e.item=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.isExample&&(e.isExample=!1),null==e.example&&(e.example=null),null==e.body&&(e.body=this.bodyDefault),s.Config.isOfBitType(t,u.BitType.book)&&(null==e.isPublic&&(e.isPublic=!1),null==e.hasMarkAsDone&&(e.hasMarkAsDone=!1)),t!==u.BitType.articleAi&&t!==u.BitType.noteAi&&t!==u.BitType.summaryAi||null==e.AIGenerated&&(e.AIGenerated=!0),s.Config.isOfBitType(t,u.BitType.reviewNote)&&(null==e.resolved&&(e.resolved=!1),null==e.resolvedDate&&(e.resolvedDate=""),null==e.resolvedBy&&(e.resolvedBy="")),s.Config.isOfBitType(t,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])&&(t===u.BitType.imagesLogoGrave?null==e.logos&&(e.logos=[]):null==e.images&&(e.images=[])),s.Config.isOfBitType(t,[u.BitType.stepImageScreenshotWithPointer,u.BitType.surveyMatrix])&&(null==e.pointerTop&&(e.pointerTop=""),null==e.pointerLeft&&(e.pointerLeft=""),s.Config.isOfBitType(t,[u.BitType.surveyMatrix])&&null==e.buttonCaption&&(e.buttonCaption="")),s.Config.isOfBitType(t,u.BitType.surveyRating)&&(null==e.ratingLevelStart&&(e.ratingLevelStart={level:0}),null==e.ratingLevelEnd&&(e.ratingLevelEnd={level:0})),s.Config.isOfBitType(t,u.BitType.module)&&null==e.hasBookNavigation&&(e.hasBookNavigation=!0)),null==e.id&&delete e.id,null==e.internalComment&&delete e.internalComment,null==e.externalId&&delete e.externalId,null==e.spaceId&&delete e.spaceId,null==e.padletId&&delete e.padletId,null==e.jupyterId&&delete e.jupyterId,null==e.jupyterExecutionCount&&delete e.jupyterExecutionCount,null==e.isPublic&&delete e.isPublic,null==e.AIGenerated&&delete e.AIGenerated,null==e.analyticsTag&&delete e.analyticsTag,null==e.disableFeedback&&delete e.disableFeedback,null==e.releaseVersion&&delete e.releaseVersion,null==e.releaseKind&&delete e.releaseKind,null==e.releaseDate&&delete e.releaseDate,null==e.book&&delete e.book,null==e.ageRange&&delete e.ageRange,null==e.lang&&delete e.lang,null==e.language&&delete e.language,null==e.publisher&&delete e.publisher,null==e.publisherName&&delete e.publisherName,null==e.theme&&delete e.theme,null==e.computerLanguage&&delete e.computerLanguage,null==e.target&&delete e.target,null==e.tag&&delete e.tag,null==e.reductionTag&&delete e.reductionTag,null==e.icon&&delete e.icon,null==e.iconTag&&delete e.iconTag,null==e.colorTag&&delete e.colorTag,null==e.flashcardSet&&delete e.flashcardSet,null==e.subtype&&delete e.subtype,null==e.bookAlias&&delete e.bookAlias,null==e.coverImage&&delete e.coverImage,null==e.coverColor&&delete e.coverColor,null==e.publications&&delete e.publications,null==e.author&&delete e.author,null==e.subject&&delete e.subject,null==e.date&&delete e.date,null==e.location&&delete e.location,null==e.kind&&delete e.kind,null==e.hasMarkAsDone&&delete e.hasMarkAsDone,null==e.action&&delete e.action,null==e.blockId&&delete e.blockId,null==e.pageNo&&delete e.pageNo,null==e.x&&delete e.x,null==e.y&&delete e.y,null==e.width&&delete e.width,null==e.height&&delete e.height,null==e.index&&delete e.index,null==e.classification&&delete e.classification,null==e.availableClassifications&&delete e.availableClassifications,null==e.tableFixedHeader&&delete e.tableFixedHeader,null==e.tableSearch&&delete e.tableSearch,null==e.tableSort&&delete e.tableSort,null==e.tablePagination&&delete e.tablePagination,null==e.tablePaginationLimit&&delete e.tablePaginationLimit,null==e.tableHeight&&delete e.tableHeight,null==e.tableWhitespaceNoWrap&&delete e.tableWhitespaceNoWrap,null==e.tableAutoWidth&&delete e.tableAutoWidth,null==e.tableResizableColumns&&delete e.tableResizableColumns,null==e.quizCountItems&&delete e.quizCountItems,null==e.quizStrikethroughSolutions&&delete e.quizStrikethroughSolutions,null==e.codeLineNumbers&&delete e.codeLineNumbers,null==e.codeMinimap&&delete e.codeMinimap,null==e.thumbImage&&delete e.thumbImage,null==e.scormSource&&delete e.scormSource,null==e.posterImage&&delete e.posterImage,null==e.focusX&&delete e.focusX,null==e.focusY&&delete e.focusY,null==e.pointerLeft&&delete e.pointerLeft,null==e.pointerTop&&delete e.pointerTop,null==e.backgroundWallpaper&&delete e.backgroundWallpaper,null==e.hasBookNavigation&&delete e.hasBookNavigation,null==e.deeplink&&delete e.deeplink,null==e.externalLink&&delete e.externalLink,null==e.externalLinkText&&delete e.externalLinkText,null==e.videoCallLink&&delete e.videoCallLink,null==e.vendorUrl&&delete e.vendorUrl,null==e.search&&delete e.search,null==e.duration&&delete e.duration,null==e.list&&delete e.list,null==e.textReference&&delete e.textReference,null==e.isTracked&&delete e.isTracked,null==e.isInfoOnly&&delete e.isInfoOnly,null==e.labelTrue&&delete e.labelTrue,null==e.labelFalse&&delete e.labelFalse,null==e.content2Buy&&delete e.content2Buy,null==e.mailingList&&delete e.mailingList,null==e.buttonCaption&&delete e.buttonCaption,null==e.caption&&delete e.caption,null==e.quotedPerson&&delete e.quotedPerson,null==e.resolved&&delete e.resolved,null==e.resolvedDate&&delete e.resolvedDate,null==e.resolvedBy&&delete e.resolvedBy,null==e.maxCreatedBits&&delete e.maxCreatedBits,null==e.maxDisplayLevel&&delete e.maxDisplayLevel,null==e.productId&&delete e.productId,null==e.product&&delete e.product,null==e.productVideo&&delete e.productVideo,null==e.productFolder&&delete e.productFolder,null==e.technicalTerm&&delete e.technicalTerm,null==e.servings&&delete e.servings,null==e.ratingLevelStart&&delete e.ratingLevelStart,null==e.ratingLevelEnd&&delete e.ratingLevelEnd,null==e.ratingLevelSelected&&delete e.ratingLevelSelected,null==e.title&&delete e.title,null==e.subtitle&&delete e.subtitle,null==e.level&&delete e.level,null==e.toc&&delete e.toc,null==e.progress&&delete e.progress,null==e.anchor&&delete e.anchor,null==e.reference&&delete e.reference,null==e.referenceEnd&&delete e.referenceEnd,null==e.item&&delete e.item,null==e.lead&&delete e.lead,null==e.pageNumber&&delete e.pageNumber,null==e.marginNumber&&delete e.marginNumber,null==e.hint&&delete e.hint,null==e.instruction&&delete e.instruction,void 0===e.example&&delete e.example,null==e.isExample&&delete e.isExample,null==e.marks&&delete e.marks,null==e.extraProperties&&delete e.extraProperties,null==e.body&&r!==m.TextFormat.json&&delete e.body,null!=e.placeholders&&0!==Object.keys(e.placeholders).length||delete e.placeholders,null==e.resource&&delete e.resource,null==e.logos&&delete e.logos,null==e.images&&delete e.images,null==e.statement&&delete e.statement,null==e.isCorrect&&delete e.isCorrect,null==e.sampleSolution&&delete e.sampleSolution,null==e.partialAnswer&&delete e.partialAnswer,null==e.elements&&delete e.elements,null==e.statements&&delete e.statements,null==e.responses&&delete e.responses,null==e.quizzes&&delete e.quizzes,null==e.heading&&delete e.heading,null==e.pairs&&delete e.pairs,null==e.matrix&&delete e.matrix,null==e.table&&delete e.table,null==e.choices&&delete e.choices,null==e.questions&&delete e.questions,null==e.listItems&&delete e.listItems,null==e.sections&&delete e.sections,i&&null!=e.placeholders||delete e.placeholders,null==e.footer&&delete e.footer,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}}t.JsonGenerator=x},7984:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonObjectGenerator=void 0;const o=r(6772),n=r(2497);t.JsonObjectGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),JSON.parse(this.writer.getString())}))}generateSync(e){return this.generator.generateSync(e),JSON.parse(this.writer.getString())}}},98:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonStringGenerator=void 0;const o=r(6772),n=r(2497);t.JsonStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return i(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},431:function(e,t,r){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(o,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TextGenerator=void 0;const o=r(5126),n=r(7735),a=r(126),s=r(3811),l=r(385),u=r(2483),p=r(9554),c=r(4),g={debugGenerationInline:!1},y="==",d={[u.TextMarkType.bold]:"**",[u.TextMarkType.light]:"``",[u.TextMarkType.italic]:"__",[u.TextMarkType.highlight]:"!!"},f=[u.TextMarkType.bold,u.TextMarkType.light,u.TextMarkType.italic,u.TextMarkType.highlight],m=[u.TextMarkType.strike,u.TextMarkType.subscript,u.TextMarkType.superscript,u.TextMarkType.ins,u.TextMarkType.del,u.TextMarkType.underline,u.TextMarkType.doubleUnderline,u.TextMarkType.circle,u.TextMarkType.languageEm,u.TextMarkType.userUnderline,u.TextMarkType.userDoubleUnderline,u.TextMarkType.userStrike,u.TextMarkType.userCircle,u.TextMarkType.userHighlight,u.TextMarkType.var,u.TextMarkType.code,u.TextMarkType.timer,u.TextMarkType.duration,u.TextMarkType.color,u.TextMarkType.comment],h=new RegExp(/(\n|\r\n)/,"g"),T=new RegExp(/https?:\/\/|mailto:(.*)/,"g");class b extends c.AstWalkerGenerator{constructor(e,t){var r,i;super(),this.ast=new o.Ast,this.textFormat=l.TextFormat.bitmarkMinusMinus,this.writerText="",this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.placeholderIndex=0,this.placeholders={},this.bitmarkVersion=null!==(r=s.BitmarkVersion.fromValue(e))&&void 0!==r?r:s.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},g),t),this.debugGenerationInline=null!==(i=this.options.debugGenerationInline)&&void 0!==i&&i,this.bitmarkVersion,s.BitmarkVersion.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)}generate(e,t){return i(this,void 0,void 0,(function*(){return this.resetState(t),this.walkAndWrite(e),this.writerText}))}generateSync(e,t){return this.resetState(t),this.walkAndWrite(e),this.writerText}getPlaceholders(){return this.placeholders}resetState(e){this.printed=!1,this.textFormat=e,this.writerText="",this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.placeholderIndex=0,this.placeholders={}}walkAndWrite(e){this.ast.walk(e,a.NodeType.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_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)}handleEnterNode(e,t){switch(this.handleIndent(e),e.type){case p.TextNodeType.paragraph:this.writeParagraph(e);break;case p.TextNodeType.hardBreak:this.writeHardBreak(e);break;case p.TextNodeType.text:this.writeMarks(e,!0),this.writeText(e);break;case p.TextNodeType.heading:this.writeHeading(e);break;case p.TextNodeType.section:this.writeSection(e);break;case p.TextNodeType.listItem:case p.TextNodeType.taskItem:this.writeBullet(e,t);break;case p.TextNodeType.image:this.writeImage(e);break;case p.TextNodeType.codeBlock:this.inCodeBlock=!0,this.writeCodeBlock(e);break;case p.TextNodeType.gap:case p.TextNodeType.select:case p.TextNodeType.highlight:case p.TextNodeType.mark:return this.writeBodyBit(e),!1}this.exitedCodeBlock=!1}handleBetweenNode(e,t,r,i){e.type}handleExitNode(e,t){switch(e.type){case p.TextNodeType.text:this.writeMarks(e,!1);break;case p.TextNodeType.paragraph:this.textFormat!==l.TextFormat.bitmarkMinusMinus&&this.writeNL();break;case p.TextNodeType.heading:case p.TextNodeType.section:case p.TextNodeType.image:this.writeNL(),this.writeNL();break;case p.TextNodeType.codeBlock:this.writeNL(),this.writeNL(),this.inCodeBlock=!1,this.exitedCodeBlock=!0;break;case p.TextNodeType.bulletList:case p.TextNodeType.orderedList:case p.TextNodeType.letteredList:case p.TextNodeType.taskList:this.currentIndent<=1&&this.writeNL()}this.handleDedent(e)}handleIndent(e){switch(e.type){case p.TextNodeType.bulletList:case p.TextNodeType.orderedList:case p.TextNodeType.letteredList:case p.TextNodeType.taskList:this.currentIndent++}}handleDedent(e){switch(e.type){case p.TextNodeType.bulletList:case p.TextNodeType.orderedList:case p.TextNodeType.letteredList:case p.TextNodeType.taskList:this.currentIndent--}}getLinkHref(e){if(e.type===p.TextNodeType.text&&e.marks){const t=e.marks.reduce(((e,t)=>{var r;if(t.type===u.TextMarkType.link){const e=null===(r=t.attrs)||void 0===r?void 0:r.href;if(e)return e}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){const t=`[!${this.placeholderIndex}]`;this.writerText+=t,this.placeholders[t]=e,this.placeholderIndex++}writeText(e){if(null==e.text)return;if(this.writeLink(e))return;this.inCodeBlock;let t=e.text;if(t=n.Breakscape.breakscape(t),this.currentIndent>1){const e=this.getIndentationString();t=t.replace(h,`$1${e}`)}this.write(t)}writeLink(e){if(null==e.text)return!1;const t=this.getLinkHref(e);if(t){let r=n.Breakscape.breakscape(e.text);if(this.currentIndent>1){const e=this.getIndentationString();r=r.replace(h,`$1${e}`)}return t.replace(T,"$1")===r?this.write(t):(r=`==${r}==|link:${t}|`,this.write(r)),!0}return!1}writeMarks(e,t){if(e.marks){if(0===e.marks.length)return void this.writeMarkTextWrapper(y);const r=1===e.marks.length,i=e.marks.reduce(((e,t)=>e||(-1!==f.indexOf(t.type)?r?d[t.type]:y:-1!==m.indexOf(t.type)?y:e)),void 0);if(null!=i&&(this.writeMarkTextWrapper(i),!t)){let t=!1;for(const i of e.marks)-1!==f.indexOf(i.type)?r||(this.writeInlineMarkStartEnd(),this.writeInlineMark(i),t=!0):u.TextMarkType.comment===i.type?(this.writeInlineMarkStartEnd(),this.writeCommentMark(i),t=!0):-1!==m.indexOf(i.type)&&(this.writeInlineMarkStartEnd(),this.writeInlineMark(i),t=!0);t&&this.writeInlineMarkStartEnd()}}}writeParagraph(e){this.exitedCodeBlock&&(this.write("|"),this.writeNL(),this.writeNL())}writeHardBreak(e){if(this.writeNL(),this.currentIndent>1){const e=this.getIndentationString();this.write(e)}}writeHeading(e){var t,r;let i="";const o=null!==(r=null===(t=e.attrs)||void 0===t?void 0:t.level)&&void 0!==r?r:1;for(let e=0;e<+o;e++)i+="#";i+=" ",this.write(i)}writeSection(e){let t="";t=e.section?`|${e.section}: `:"|",this.write(t)}writeBullet(e,t){var r,i;let o=this.getIndentationString();const n=this.getParentNode(t,2),a=null==n?void 0:n.value.type;if(a===p.TextNodeType.bulletList)o+="• ";else if(a===p.TextNodeType.orderedList)o+="•1 ";else if(a===p.TextNodeType.letteredList)o+="•A ";else if(a===p.TextNodeType.taskList){o+=null!==(i=null===(r=e.attrs)||void 0===r?void 0:r.checked)&&void 0!==i&&i?"•+ ":"•- "}o&&this.write(o)}writeImage(e){if(null==e.attrs||!e.attrs.src)return;const t=e.attrs;let r=`|image:${t.src}|`;for(const[e,i]of Object.entries(t))switch(e){case"textAlign":"left"!==i&&(r+=`@captionAlign:${i}|`);break;case"alignment":"center"!==i&&i&&(r+=`@alignment:${i}|`);break;case"title":i&&(r+=`@caption:${i}|`);break;case"class":"center"!==i&&i&&(r+=`@align:${i}|`);break;case"comment":i&&(r+=`#${i}|`);break;case"alt":case"width":case"height":default:i&&(r+=`@${e}:${i}|`);case"src":}this.write(r)}writeCodeBlock(e){if(null==e.attrs||!e.attrs.language)return;const t=`|code:${e.attrs.language}\n`;this.write(t)}writeMarkTextWrapper(e){e&&this.write(e)}writeInlineMark(e){let t=`${e.type}`;if(e.attrs)for(const[r,i]of Object.entries(e.attrs))("language"===r&&"plain text"!==i||"color"===r||"name"===r||"duration"===r)&&(t=`${t}:${i}`);this.write(t)}writeCommentMark(e){if(e.comment){const t=`#${e.comment}`;this.write(t)}}writeInlineMarkStartEnd(){this.write("|")}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)}getBitType(e){for(const t of e)if(t.key===a.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}write(e){return this.writerText+=e,this}writeLine(e){return this.write(`${e}\n`),this}writeLines(e,t){for(const r of e)this.write(`${r}${null!=t?t:""}\n`);return this}writeWhiteSpace(){return this.write(" "),this}}t.TextGenerator=b},3881:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoBuilder=void 0;const i=r(2028),o=r(5854);t.InfoBuilder=class{getSupportedBits(e){var t,r;const n=null===(t=null==e?void 0:e.includeNonDeprecated)||void 0===t||t,a=null!==(r=null==e?void 0:e.includeDeprecated)&&void 0!==r&&r,s=[];for(const e of o.BitType.values()){if(e===o.BitType._error||e===o.BitType._comment)continue;const t=i.Config.getBitType(e),r=i.Config.getBitConfig(t),l=r.inheritedBitTypes.length>0?r.inheritedBitTypes:void 0;(n&&!r.deprecated||a&&r.deprecated)&&s.push({name:e,since:r.since,deprecated:r.deprecated,inheritedBitTypes:l})}return s}getSupportedBitConfigs(){const e=[];for(const t of o.BitType.values()){if(t===o.BitType._error||t===o.BitType._comment)continue;const r=i.Config.getBitType(t),n=i.Config.getBitConfig(r);e.push(n)}return e}}},1412:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0;const i=r(1464),o=r(6936);r(2028);let n=!1;t.init=function(){n||((0,o.initEnv)(i.buildInfo.name,i.buildInfo.version),n=!0)}},126:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0;const i=(0,r(4718).superenum)({unknown:"unknown",action:"action",actionValue:"actionValue",ageRange:"ageRange",ageRangeValue:"ageRangeValue",aiGenerated:"aiGenerated",aiGeneratedValue:"aiGeneratedValue",analyticsTag:"analyticsTag",analyticsTagValue:"analyticsTagValue",disableFeedback:"disableFeedback",disableFeedbackValue:"disableFeedbackValue",alias:"alias",alignment:"alignment",alt:"alt",alternativeAnswers:"alternativeAnswers",alternativeAnswersValue:"alternativeAnswersValue",anchor:"anchor",answer:"answer",attrs:"attrs",audio:"audio",author:"author",authorValue:"authorValue",availableClassifications:"availableClassifications",availableClassificationsValue:"availableClassificationsValue",avatarImage:"avatarImage",backgroundWallpaper:"backgroundWallpaper",backgroundWallpaperValue:"backgroundWallpaperValue",hasBookNavigation:"hasBookNavigation",hasBookNavigationValue:"hasBookNavigationValue",bitmarkAst:"bitmarkAst",bitmarkVersion:"bitmarkVersion",bits:"bits",bitsValue:"bitsValue",bitType:"bitType",blockId:"blockId",blockIdValue:"blockIdValue",body:"body",bodyJson:"bodyJson",bodyParts:"bodyParts",bodyPartsValue:"bodyPartsValue",bodyPartText:"bodyPartText",bodyText:"bodyText",book:"book",bookAlias:"bookAlias",bookAliasValue:"bookAliasValue",bot:"bot",botResponses:"botResponses",botResponsesValue:"botResponsesValue",botValue:"botValue",buttonCaption:"buttonCaption",buttonCaptionValue:"buttonCaptionValue",caption:"caption",captionValue:"captionValue",cardBits:"cardBits",cardBitsValue:"cardBitsValue",cardNode:"cardNode",cells:"cells",cellsValue:"cellsValue",checked:"checked",choices:"choices",choicesValue:"choicesValue",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",data:"data",date:"date",dateValue:"dateValue",decimalPlaces:"decimalPlaces",deeplink:"deeplink",deeplinkValue:"deeplinkValue",disableCalculation:"disableCalculation",duration:"duration",durationValue:"durationValue",elements:"elements",elementsValue:"elementsValue",emphasis:"emphasis",end:"end",errors:"errors",errorsValue:"errorsValue",example:"example",exampleValue:"exampleValue",externalId:"externalId",externalIdValue:"externalIdValue",externalLink:"externalLink",externalLinkText:"externalLinkText",extraProperties:"extraProperties",feedback:"feedback",flashcards:"flashcards",flashcardSet:"flashcardSet",flashcardSetValue:"flashcardSetValue",flashcardsValue:"flashcardsValue",focusX:"focusX",focusXValue:"focusXValue",focusY:"focusY",focusYValue:"focusYValue",footer:"footer",footerText:"footerText",forKeys:"forKeys",format:"format",forValues:"forValues",forValuesValue:"forValuesValue",gap:"gap",hasMarkAsDone:"hasMarkAsDone",hasMarkAsDoneValue:"hasMarkAsDoneValue",heading:"heading",height:"height",heightValue:"heightValue",highlight:"highlight",hint:"hint",href:"href",icon:"icon",iconTag:"iconTag",iconTagValue:"iconTagValue",iconValue:"iconValue",id:"id",idValue:"idValue",image:"image",imageLandscape:"imageLandscape",imagePortrait:"imagePortrait",imageSource:"imageSource",index:"index",indexValue:"indexValue",ingredients:"ingredients",ingredientsValue:"ingredientsValue",instruction:"instruction",internalComment:"internalComment",internalCommentValue:"internalCommentValue",isCaseSensitive:"isCaseSensitive",isCommented:"isCommented",isCorrect:"isCorrect",isDefaultExample:"isDefaultExample",isExample:"isExample",isInfoOnly:"isInfoOnly",isInfoOnlyValue:"isInfoOnlyValue",isPublic:"isPublic",isPublicValue:"isPublicValue",isTracked:"isTracked",isTrackedValue:"isTrackedValue",item:"item",itemLead:"itemLead",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",lead:"lead",level:"level",license:"license",line:"line",list:"list",listValue:"listValue",location:"location",locationValue:"locationValue",mailingList:"mailingList",marginNumber:"marginNumber",mark:"mark",markConfig:"markConfig",markConfigValue:"markConfigValue",marks:"marks",marksValue:"marksValue",markup:"markup",matrix:"matrix",matrixValue:"matrixValue",maxCreatedBits:"maxCreatedBits",maxCreatedBitsValue:"maxCreatedBitsValue",maxDisplayLevel:"maxDisplayLevel",maxDisplayLevelValue:"maxDisplayLevelValue",message:"message",mockupId:"mockupId",name:"name",offset:"offset",options:"options",optionsValue:"optionsValue",original:"original",padletId:"padletId",padletIdValue:"padletIdValue",pageNo:"pageNo",pageNoValue:"pageNoValue",pageNumber:"pageNumber",pairs:"pairs",pairsValue:"pairsValue",parent:"parent",parser:"parser",partialAnswer:"partialAnswer",partialAnswerValue:"partialAnswerValue",person:"person",pointerLeft:"pointerLeft",pointerLeftValue:"pointerLeftValue",pointerTop:"pointerTop",pointerTopValue:"pointerTopValue",posterImage:"posterImage",posterImageValue:"posterImageValue",postfix:"postfix",prefix:"prefix",productId:"productId",productIdValue:"productIdValue",product:"product",productFolder:"productFolder",productFolderValue:"productFolderValue",productList:"productList",productListValue:"productListValue",productValue:"productValue",productVideo:"productVideo",productVideoList:"productVideoList",productVideoListValue:"productVideoListValue",productVideoValue:"productVideoValue",progress:"progress",progressValue:"progressValue",properties:"properties",property:"property",propertyKey:"propertyKey",propertyValue:"propertyValue",propertyValues:"propertyValues",provider:"provider",publications:"publications",publicationsValue:"publicationsValue",publisher:"publisher",publisherName:"publisherName",publisherNameValue:"publisherNameValue",publisherValue:"publisherValue",quantity:"quantity",question:"question",questions:"questions",questionsValue:"questionsValue",quizCountItems:"quizCountItems",quizCountItemsValue:"quizCountItemsValue",quizStrikethroughSolutions:"quizStrikethroughSolutions",quizStrikethroughSolutionsValue:"quizStrikethroughSolutionsValue",quizzes:"quizzes",quizzesValue:"quizzesValue",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelSelectedValue:"ratingLevelSelectedValue",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reasonableNumOfChars:"reasonableNumOfChars",reasonableNumOfCharsValue:"reasonableNumOfCharsValue",reductionTag:"reductionTag",reductionTagValue:"reductionTagValue",reference:"reference",referenceEnd:"referenceEnd",referenceProperty:"referenceProperty",referencePropertyValue:"referencePropertyValue",releaseDate:"releaseDate",releaseDateValue:"releaseDateValue",releaseKind:"releaseKind",releaseKindValue:"releaseKindValue",releaseVersion:"releaseVersion",releaseVersionValue:"releaseVersionValue",resolved:"resolved",resolvedBy:"resolvedBy",resolvedByValue:"resolvedByValue",resolvedDate:"resolvedDate",resolvedDateValue:"resolvedDateValue",resolvedValue:"resolvedValue",resources:"resources",resourcesValue:"resourcesValue",resourceType:"resourceType",response:"response",responses:"responses",responsesValue:"responsesValue",root:"root",rows:"rows",rowsValue:"rowsValue",rowsValueValue:"rowsValueValue",sampleSolution:"sampleSolution",sampleSolutionValue:"sampleSolutionValue",scormSource:"scormSource",scormSourceValue:"scormSourceValue",search:"search",searchValue:"searchValue",section:"section",select:"select",servings:"servings",servingsValue:"servingsValue",showInIndex:"showInIndex",size:"size",solution:"solution",solutions:"solutions",solutionsValue:"solutionsValue",spaceId:"spaceId",spaceIdValue:"spaceIdValue",src:"src",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",start:"start",statement:"statement",statements:"statements",statementsValue:"statementsValue",statementText:"statementText",subject:"subject",subjectValue:"subjectValue",subtitle:"subtitle",subtype:"subtype",subtypeValue:"subtypeValue",table:"table",tableAutoWidth:"tableAutoWidth",tableAutoWidthValue:"tableAutoWidthValue",tableFixedHeader:"tableFixedHeader",tableFixedHeaderValue:"tableFixedHeaderValue",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",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",toc:"toc",tocValue:"tocValue",trim:"trim",type:"type",typeAlias:"typeAlias",unit:"unit",unitAbbr:"unitAbbr",url:"url",value:"value",values:"values",valuesValue:"valuesValue",vendorUrl:"vendorUrl",vendorUrlValue:"vendorUrlValue",version:"version",videoCallLink:"videoCallLink",videoCallLinkValue:"videoCallLinkValue",warnings:"warnings",warningsValue:"warningsValue",width:"width",widthValue:"widthValue",x:"x",xValue:"xValue",y:"y",yValue:"yValue",zoomDisabled:"zoomDisabled"});t.NodeType=i},6634:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTagConfig=void 0;t.AbstractTagConfig=class{constructor(e,t,r,i,o,n,a,s,l){this.type=e,this.configKey=t,this.tag=r,this.maxCount=i,this.minCount=o,this.chain=n,this.jsonKey=a,this.astKey=s,this.deprecated=l}}},3619:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitConfig=void 0;const i=r(3778);t.BitConfig=class{constructor(e,t,r,i,o,n,a,s,l,u,p,c,g,y){this.tags={},this.since=e,this.bitType=t,this.inheritedBitTypes=r,this.inheritedBitTypesSet=new Set(r),this.textFormatDefault=i,this.tags=o,this.cardSet=n,this.deprecated=a,this.bodyAllowed=s??!0,this.bodyRequired=l,this.footerAllowed=u??!0,this.footerRequired=p,this.resourceAttachmentAllowed=c??!0,this.rootExampleType=g,this.comboResourceType=y}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 o=[];null!=this.since&&o.push(`since=${this.since}`),null!=this.deprecated&&o.push(`deprecated=${this.deprecated}`),this.bodyAllowed&&o.push("bodyAllowed"),this.bodyRequired&&o.push("bodyRequired"),this.footerAllowed&&o.push("footerAllowed"),this.footerRequired&&o.push("footerRequired"),this.resourceAttachmentAllowed&&o.push("resourceAttachmentAllowed"),null!=this.rootExampleType&&o.push(`rootExampleType=${this.rootExampleType}`),null!=this.comboResourceType&&o.push(`comboResourceType=${this.comboResourceType}`),r+=`\n\n[Flags]\n${o.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))(e.maxCount===i.Count.infinity||e.maxCount>0)&&(r+=`\n${e.toString(t)}`);return this.cardSet&&(r+=`\n\n${this.cardSet.toString(t)}`),r}}},5814:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfig=void 0;t.CardSetConfig=class{constructor(e,t){this.configKey=e,this.variants=t}toString(e){const t=Object.assign({},e);let r="",i=0,o=0;for(const e of this.variants){for(const n of e)r+=`[Card - Side ${i}, Variant ${o}]`,r+=`\n${n.toString(t)}`,o++;i++}return r}}},9371:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardVariantConfig=void 0;t.CardVariantConfig=class{constructor(e,t,r,i){this.tags=e,this.bodyAllowed=t??!0,this.bodyRequired=r,this.repeatCount=i}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}}},9788:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MarkupTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a){super(i.BitTagType.tag,e,t,r,o,n,void 0,void 0,a),this.type=i.BitTagType.tag}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}}t.MarkupTagConfig=n},1519:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a,s,l,u,p,c){super(i.BitTagType.property,e,t,r,o,n,a,s,c),this.type=i.BitTagType.property,this.single=l,this.format=u,this.defaultValue=p}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.single&&(r+=`, sgl=${this.single}`),null!=this.format&&(r+=`, fmt=${this.format}`),null!=this.defaultValue&&(r+=`, def=${this.defaultValue}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`),null!=this.astKey&&(r+=`, ast=${this.astKey}`)),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}}t.PropertyTagConfig=n},9600:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTagConfig=void 0;const i=r(5512),o=r(6634);class n extends o.AbstractTagConfig{constructor(e,t,r,o,n,a,s){super(i.BitTagType.resource,e,t,r,o,n,a,void 0,s),this.type=i.BitTagType.resource}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}}t.ResourceTagConfig=n},1457:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourcesConfig=void 0;t.ResourcesConfig=class{constructor(e,t,r,i){this.tags=e,this.resourceAttachmentAllowed=null!=t&&t,this.resourceTypeAttachment=r,this.comboResourceTagTypesMap=i}getCountsMin(){const e=new Map;for(const t of Object.values(this.tags))null!=t.minCount&&e.set(t.tag,t.minCount);return e}getCountsMax(){const e=new Map;for(const t of Object.values(this.tags))null!=t.maxCount&&e.set(t.tag,t.maxCount);return e}}},8199:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfigKey=void 0;const i=(0,r(4718).superenum)({_flashcards:"_flashcards",_elements:"_elements",_statements:"_statements",_quiz:"_quiz",_questions:"_questions",_matchPairs:"_matchPairs",_matchAudioPairs:"_matchAudioPairs",_matchImagePairs:"_matchImagePairs",_matchMatrix:"_matchMatrix",_table:"_table",_botActionResponses:"_botActionResponses",_exampleBitList:"_exampleBitList",_clozeList:"_clozeList",_ingredients:"_ingredients"});t.CardSetConfigKey=i},5591:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigKey=void 0;const i=r(4718),o=r(7112),n=r(9888),a=r(5051),s=r(7797),l=(0,i.superenum)(Object.assign(Object.assign(Object.assign(Object.assign({_unknown:"_unknown"},s.tagConfigKeys),n.propertyConfigKeys),a.resourceConfigKeys),o.groupConfigKeys));t.ConfigKey=l,function(){const e=new Set,t=[s.tagConfigKeys,n.propertyConfigKeys,a.resourceConfigKeys,o.groupConfigKeys];for(const r of t)for(const t in r){if(e.has(t))throw new Error(`Duplicate ConfigKey: ${t}`);e.add(t)}}()},7112:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupConfigKeys=t.GroupConfigKey=void 0;const i=r(4718),o={group_standardAllBits:"group_standardAllBits",group_standardItemLeadInstructionHint:"group_standardItemLeadInstructionHint",group_standardExample:"group_standardExample",group_standardTags:"group_standardTags",group_imageSource:"group_imageSource",group_technicalTerm:"group_technicalTerm",group_person:"group_person",group_gap:"group_gap",group_trueFalse:"group_trueFalse",group_markConfig:"group_markConfig",group_mark:"group_mark",group_bookCommon:"group_bookCommon",group_learningPathCommon:"group_learningPathCommon",group_resourceCommon:"group_resourceCommon",group_resourceImageCommon:"group_resourceImageCommon",group_resourceAudioCommon:"group_resourceAudioCommon",group_resourceVideoCommon:"group_resourceVideoCommon",group_resourceImage:"group_resourceImage",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"};t.groupConfigKeys=o;const n=(0,i.superenum)(o);t.GroupConfigKey=n},6915:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConfigType=void 0;const i=(0,r(4718).superenum)({standard:"standard",resource:"resource",comboResource:"comboResource"});t.GroupConfigType=i},9888:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyConfigKeys=t.PropertyConfigKey=void 0;const i=r(4718),o={action:"action",ageRange:"ageRange",aiGenerated:"aiGenerated",analyticsTag:"analyticsTag",allowSubtitles:"allowSubtitles",alt:"alt",author:"author",autoplay:"autoplay",availableClassifications:"availableClassifications",backgroundWallpaper:"backgroundWallpaper",blockId:"blockId",book:"book",bookAlias:"bookAlias",bot:"bot",buttonCaption:"buttonCaption",caption:"caption",classification:"classification",codeLineNumbers:"codeLineNumbers",codeMinimap:"codeMinimap",color:"color",colorTag:"colorTag",computerLanguage:"computerLanguage",content2Buy:"content2Buy",copyright:"copyright",coverColor:"coverColor",coverImage:"coverImage",date:"date",decimalPlaces:"decimalPlaces",deeplink:"deeplink",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",duration:"duration",emphasis:"emphasis",example:"example",externalId:"externalId",externalLink:"externalLink",externalLinkText:"externalLinkText",flashcardSet:"flashcardSet",focusX:"focusX",focusY:"focusY",format:"format",hasBookNavigation:"hasBookNavigation",hasMarkAsDone:"hasMarkAsDone",height:"height",icon:"icon",iconTag:"iconTag",id:"id",imageSource:"imageSource",index:"index",internalComment:"internalComment",isCaseSensitive:"isCaseSensitive",isInfoOnly:"isInfoOnly",isPublic:"isPublic",isTracked:"isTracked",jupyterExecutionCount:"jupyterExecutionCount",jupyterId:"jupyterId",kind:"kind",label:"label",labelFalse:"labelFalse",labelTrue:"labelTrue",lang:"lang",language:"language",license:"license",list:"list",location:"location",mailingList:"mailingList",markConfig:"markConfig",maxCreatedBits:"maxCreatedBits",maxDisplayLevel:"maxDisplayLevel",mockupId:"mockupId",mute:"mute",padletId:"padletId",pageNo:"pageNo",partialAnswer:"partialAnswer",partner:"partner",person:"person",pointerLeft:"pointerLeft",pointerTop:"pointerTop",posterImage:"posterImage",product:"product",productFolder:"productFolder",productId:"productId",productList:"productList",productVideo:"productVideo",productVideoList:"productVideoList",progress:"progress",property_mark:"property_mark",property_reference:"property_reference",property_sampleSolution:"property_sampleSolution",property_title:"property_title",publications:"publications",publisher:"publisher",publisherName:"publisherName",quizCountItems:"quizCountItems",quizStrikethroughSolutions:"quizStrikethroughSolutions",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reasonableNumOfChars:"reasonableNumOfChars",reductionTag:"reductionTag",releaseDate:"releaseDate",releaseKind:"releaseKind",releaseVersion:"releaseVersion",resolved:"resolved",resolvedBy:"resolvedBy",resolvedDate:"resolvedDate",scormSource:"scormSource",search:"search",servings:"servings",showInIndex:"showInIndex",showSubtitles:"showSubtitles",siteName:"siteName",size:"size",spaceId:"spaceId",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",subject:"subject",subtype:"subtype",tableAutoWidth:"tableAutoWidth",tableFixedHeader:"tableFixedHeader",tableHeight:"tableHeight",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tableResizableColumns:"tableResizableColumns",tableSearch:"tableSearch",tableSort:"tableSort",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tag:"tag",target:"target",technicalTerm:"technicalTerm",textReference:"textReference",theme:"theme",thumbImage:"thumbImage",toc:"toc",trim:"trim",unit:"unit",unitAbbr:"unitAbbr",vendorUrl:"vendorUrl",videoCallLink:"videoCallLink",width:"width",x:"x",y:"y",zoomDisabled:"zoomDisabled"};t.propertyConfigKeys=o;const n=(0,i.superenum)(o);t.PropertyConfigKey=n},5051:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resourceConfigKeys=t.ResourceConfigKey=void 0;const i=r(4718),o={image:"image",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",video:"video",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",article:"article",articleEmbed:"articleEmbed",articleLink:"articleLink",document:"document",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink"};t.resourceConfigKeys=o;const n=(0,i.superenum)(o);t.ResourceConfigKey=n},7797:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tagConfigKeys=t.TagConfigKey=void 0;const i=r(4718),o={title:"title",anchor:"anchor",tag_reference:"tag_reference",property:"property",itemLead:"itemLead",instruction:"instruction",hint:"hint",true:"true",false:"false",sampleSolution:"sampleSolution",gap:"gap",tag_mark:"tag_mark",resource:"resource"};t.tagConfigKeys=o;const n=(0,i.superenum)(o);t.TagConfigKey=n},5512:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitTagType=void 0;const i=(0,r(4718).superenum)({tag:"tag",property:"property",resource:"resource",group:"group"});t.BitTagType=i},5854:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitType=void 0;const i=(0,r(4718).superenum)({_error:"_error",_comment:"_comment",aiPrompt:"ai-prompt",anchor:"anchor",appAiPrompt:"app-ai-prompt",appBitmarkFromEditor:"app-bitmark-from-editor",appBitmarkFromJavascript:"app-bitmark-from-javascript",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",article:"article",articleAi:"article-ai",articleAttachment:"article-attachment",articleEmbed:"article-embed",articleLink:"article-link",assignment:"assignment",assignmentList:"assignment-list",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",audioTranscript:"audio-transcript",bitAlias:"bit-alias",bitBookEnding:"bit-book-ending",bitBookSummary:"bit-book-summary",bitmarkExample:"bitmark-example",blogArticle:"blog-article",book:"book",bookAcknowledgments:"book-acknowledgments",bookAddendum:"book-addendum",bookAfterword:"book-afterword",bookAlias:"book-alias",bookAppendix:"book-appendix",bookArticle:"book-article",bookAutherBio:"book-author-bio",bookBibliography:"book-bibliography",bookComingSoon:"book-coming-soon",bookConclusion:"book-conclusion",bookCopyright:"book-copyright",bookCopyrightPermissions:"book-copyright-permissions",bookDedication:"book-dedication",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",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",browserImage:"browser-image",bug:"bug",buttonCopyText:"button-copy-text",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",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",conclusion:"conclusion",consoleLog:"console-log",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",cookArrangement:"cook-arrangement",cookIngredients:"cook-ingredients",cookInsert:"cook-insert",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",details:"details",details1:"details-1",detailsImage:"details-image",document:"document",documentDownload:"document-download",documentEmbed:"document-embed",documentLink:"document-link",documentUpload:"document-upload",editorial:"editorial",editorNote:"editor-note",essay:"essay",example:"example",exampleList:"example-list",extractorPage:"extractor-page",extractorPageWithBlocks:"extractor-page-with-blocks",extractorBlock:"extractor-block",extractorRepeatedText:"extractor-repeated-text",extractorPageNumber:"extractor-page-number",extractorPageHeader:"extractor-page-header",extractorPageFooter:"extractor-page-footer",featured:"featured",figure:"figure",flashcard:"flashcard",flashcard1:"flashcard-1",focusImage:"focus-image",footNote:"foot-note",gapText:"gap-text",gapTextInstructionGrouped:"gap-text-instruction-grouped",groupBorn:"group-born",groupDied:"group-died",handInAudio:"hand-in-audio",handInContact:"hand-in-contact",handInDocument:"hand-in-document",handInLocation:"hand-in-location",handInPhoto:"hand-in-photo",handInScan:"hand-in-scan",handInVideo:"hand-in-video",handInVoice:"hand-in-voice",help:"help",highlightText:"highlight-text",hint:"hint",image:"image",imageBanner:"image-banner",imageFigure:"image-figure",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",imageStyled:"image-styled",imageSuperWide:"image-super-wide",imageZoom:"image-zoom",imagesLogoGrave:"images-logo-grave",info:"info",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",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",lifeSkillSticker:"life-skill-sticker",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",module:"module",multipleChoice:"multiple-choice",multipleChoice1:"multiple-choice-1",multipleChoiceText:"multiple-choice-text",multipleResponse:"multiple-response",multipleResponse1:"multiple-response-1",newspaperArticle:"newspaper-article",note:"note",noteAi:"note-ai",notebookArticle:"notebook-article",output:"output",page:"page",pageBanner:"page-banner",pageBuyButton:"page-buy-button",pageBuyButtonPromotion:"page-buy-button-promotion",pageFooter:"page-footer",pageOpenBook:"page-open-book",pagePerson:"page-person",pageProduct:"page-product",pageProductList:"page-product-list",pageProductVideo:"page-product-video",pageProductVideoList:"page-product-video-list",pageSectionFolder:"page-section-folder",pageSubscribe:"page-subscribe",photo:"photo",preparationNote:"preparation-note",prototypeImages:"prototype-images",question1:"question-1",quote:"quote",rating:"rating",recordAudio:"record-audio",recordVideo:"record-video",recipe:"recipe",releaseNote:"release-note",releaseNotesSummary:"release-notes-summary",remark:"remark",reviewApprovedNote:"review-approved-note",reviewAuthorNote:"review-author-note",reviewNote:"review-note",reviewRequestForReviewNote:"review-request-for-review-note",reviewReviewerNote:"review-reviewer-note",sampleSolution:"sample-solution",scorm:"scorm",screenshot:"screenshot",selfAssessment:"self-assessment",separator:"separator",sequence:"sequence",sideNote:"side-note",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",surveyRatingOnce:"survey-rating-once",surveyRatingDisplay:"survey-rating-display",table:"table",tableImage:"table-image",takePicture:"take-picture",toc:"toc",tocChapter:"toc-chapter",trueFalse:"true-false",trueFalse1:"true-false-1",vendorAmcharts5Chart:"vendor-amcharts-5-chart",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",vendorPadletEmbed:"vendor-padlet-embed",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",websiteLink:"website-link",workbookArticle:"workbook-article"});t.BitType=i},8588:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParserType=void 0;const i=(0,r(4718).superenum)({peggy:"peggy"});t.BitmarkParserType=i},3811:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BITMARK_VERSION=t.BitmarkVersion=void 0;const i=(0,r(4718).superenum)({v2:2,v3:3});t.BitmarkVersion=i;const o=i.v3;t.DEFAULT_BITMARK_VERSION=o},4410:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyBitType=void 0;const i=(0,r(4718).superenum)({text:"text",gap:"gap",mark:"mark",select:"select",highlight:"highlight"});t.BodyBitType=i},1163:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetVersion=void 0;const i=(0,r(4718).superenum)({v1:1,v2:2});t.CardSetVersion=i},3778:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const i=(0,r(4718).superenum)({infinity:"infinity"});t.Count=i},363:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExampleType=void 0;const i=(0,r(4718).superenum)({none:"none",string:"string",boolean:"boolean"});t.ExampleType=i},7203:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyAstKey=void 0;const i=(0,r(4718).superenum)({ast_aiGenerated:"aiGenerated",ast_isCaseSensitive:"isCaseSensitive",ast_referenceProperty:"referenceProperty",ast_markConfig:"markConfig",ast_productList:"productList",ast_productVideoList:"productVideoList"});t.PropertyAstKey=i},9727:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyFormat=void 0;const i=(0,r(4718).superenum)({none:"none",string:"string",trimmedString:"trimmedString",number:"number",boolean:"boolean",invertedBoolean:"invertedBoolean"});t.PropertyFormat=i},166:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTag=void 0;const i=r(4718),o=r(9888),n=(0,i.superenum)(Object.assign(Object.assign({},o.propertyConfigKeys),{tag_aiGenerated:"AIGenerated",tag_mark:"mark",tag_reference:"reference",tag_sampleSolution:"sampleSolution",tag_title:"title"}));t.PropertyTag=n},9984:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceJsonKey=void 0;const i=(0,r(4718).superenum)({imageResponsive:"imageResponsive",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audioEmbed:"audioEmbed",audioLink:"audioLink",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilm:"stillImageFilm",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",articleEmbed:"articleEmbed",articleLink:"articleLink",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink"});t.ResourceJsonKey=i},6149:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTag=void 0;const i=(0,r(4718).superenum)({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"});t.ResourceTag=i},9917:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Tag=void 0;const i=(0,r(4718).superenum)({tag_title:"#",tag_anchor:"▼",tag_reference:"►",tag_property:"@",tag_itemLead:"%",tag_instruction:"!",tag_hint:"?",tag_true:"+",tag_false:"-",tag_sampleSolution:"$",tag_gap:"_",tag_mark:"=",tag_resource:"&"});t.Tag=i},385:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextFormat=void 0;const i=(0,r(4718).superenum)({text:"text",json:"json",bitmarkMinusMinus:"bitmark--",bitmarkPlusPlus:"bitmark++"});t.TextFormat=i},2483:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextMarkType=void 0;const i=(0,r(4718).superenum)({bold:"bold",light:"light",italic:"italic",highlight:"highlight",strike:"strike",subscript:"subscript",superscript:"superscript",ins:"ins",del:"del",underline:"underline",doubleUnderline:"doubleUnderline",circle:"circle",languageEm:"languageEm",userUnderline:"userUnderline",userDoubleUnderline:"userDoubleUnderline",userStrike:"userStrike",userCircle:"userCircle",userHighlight:"userHighlight",link:"link",var:"var",code:"code",timer:"timer",duration:"duration",color:"color",hash:"#",comment:"comment"});t.TextMarkType=i},9554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextNodeType=void 0;const i=(0,r(4718).superenum)({text:"text",hardBreak:"hardBreak",paragraph:"paragraph",heading:"heading",section:"section",bulletList:"bulletList",orderedList:"orderedList",letteredList:"letteredList",taskList:"taskList",listItem:"listItem",taskItem:"taskItem",image:"image",codeBlock:"codeBlock",gap:"gap",select:"select",highlight:"highlight",mark:"mark"});t.TextNodeType=i},3069:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoFormat=void 0;const i=(0,r(4718).superenum)({text:"text",json:"json",pojo:"pojo"});t.InfoFormat=i},486:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoType=void 0;const i=(0,r(4718).superenum)({list:"list",deprecated:"deprecated",all:"all",bit:"bit"});t.InfoType=i},5633:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParser=void 0;const i=r(5663),o=r(5078);t.BitmarkParser=class{constructor(){this.jsonParser=new i.JsonParser}toAst(e,t){return(0,o.parse)(e)}}},5078:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const i=r(5057).parse;t.parse=i},3206:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserHelper=void 0;const i=r(1163),o=r(9681),n=r(7461),a=r(3029);r(2028);t.BitmarkPegParserHelper=class{constructor(e){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0,this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation}handleRawBit(e){var t,r;const i=e.trim();if(this.debugPrint("RAW BIT",i),!i)return;const o=null!==(r=null===(t=this.parserLocation())||void 0===t?void 0:t.start)&&void 0!==r?r:{line:1,column:1,offset:0},a=this.parse(e,{startRule:"bit",grammarSource:new n.PeggyGrammarLocation("bit",o)});return a.value&&(a.value.markup=i),a}handleTextFormat(e){return{type:a.TypeKey.TextFormat,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceType(e){return{type:a.TypeKey.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,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handlePropertyTag(e,t){return{type:a.TypeKey.Property,key:e,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceTag(e,t){return{type:a.TypeKey.Resource,key:e,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}handleFooterDivider(e){return e=this.reduceToString(e),{type:a.TypeKey.Footer,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!==a.TypeKey.Card)continue;const{cardIndex:n,cardSideIndex:s,cardVariantIndex:l,value:u}=i;let p=r.cards[n];p||(p={sides:[]},r.cards[n]=p);let c=p.sides[s];c||(c={variants:[]},p.sides[s]=c);c.variants[l]?c.variants[l].value+=u:c.variants[l]={value:u,parser:o}}r.cards=r.cards.filter((e=>e.sides.some((e=>e.variants.some((e=>0!==o.StringUtils.trimmedString(e.value).length))))));for(const t of r.cards){const r={sides:[]};i.cards.push(r);for(const i of t.sides){const t={variants:[]};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 n.PeggyGrammarLocation("card-content",i)});o=this.reduceToArrayOfTypes(o),this.debugPrint("parsedCardContent",o),t.variants.push({parser:e,content:o})}}}}return{type:a.TypeKey.CardSet,value:i,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSetStart(){this.cardIndex=-1,this.cardSideIndex=0,this.cardVariantIndex=0}handleCardSetEnd(){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0}handleCards(e){return e}handleCardLineOrDivider(e,t){let r=!1,o=!1,n=!1;return Array.isArray(e)&&2===e.length&&(e=e[0],t===i.CardSetVersion.v1?(r=e===a.CARD_DIVIDER_V1,o=e===a.CARD_SIDE_DIVIDER_V1,n=e===a.CARD_VARIANT_DIVIDER_V1):(r=e===a.CARD_DIVIDER_V2,o=e===a.CARD_SIDE_DIVIDER_V2,n=e===a.CARD_VARIANT_DIVIDER_V2)),r?(this.cardIndex++,this.cardSideIndex=0,this.cardVariantIndex=0):o?(this.cardSideIndex++,this.cardVariantIndex=0):n&&this.cardVariantIndex++,this.isType(e,a.TypeKey.Card)?e:{type:a.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:""},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardLine(e){return{type:a.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:e},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardContent(e){return this.mergeCharToText(e)}handleCardTags(e){return e}mergeCharToText(e){var t,r,i,o,n,s;const l=[];let u,p;for(const c of e)switch(c.type){case a.TypeKey.BodyChar:if(u){const e=`${null!==(t=u.value)&&void 0!==t?t:""}${null!==(r=c.value)&&void 0!==r?r:""}`;u.value=e}else u={type:a.TypeKey.BodyText,value:null!==(i=c.value)&&void 0!==i?i:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;case a.TypeKey.CardChar:if(p){const e=`${null!==(o=p.value)&&void 0!==o?o:""}${null!==(n=c.value)&&void 0!==n?n:""}`;p.value=e}else p={type:a.TypeKey.CardText,value:null!==(s=c.value)&&void 0!==s?s:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;default:u&&(l.push(u),u=void 0),p&&(l.push(p),p=void 0),l.push(c)}return u&&l.push(u),p&&l.push(p),l}isType(e,t){if(!e)return!1;const{type:r}=e;return t?Array.isArray(t)?t.indexOf(r)>=0:t===r:!!a.TypeKey.fromValue(r)}reduceToArrayOfTypes(e,t,r){if(!Array.isArray(e))return[];return e.reduce(((e,i,o)=>{if(null==i)return e;const{type:n,value:a}=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(a)){const r=this.reduceToArrayOfTypes(a,t);e.push(...r)}else n&&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){}}},7124:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserProcessor=void 0;const o=r(5809),n=r(7735),a=r(2028),s=r(5854),l=r(4410),u=r(6149),p=r(385),c=r(9681),g=r(4266),y=r(1083),d=r(4402),f=r(3904),m=r(9289),h=r(5189),T=r(9647),b=r(3990),v=r(6521),B=r(7667),C=r(9885),P=r(3029),k=!1,x=!0,S=!0,K=!0,w=!0,A=new o.Builder;t.BitmarkPegParserProcessor=class{constructor(e){this.nonFatalWarnings=[],this.nonFatalErrors=[],this.parser={},this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation,this.context={DEBUG_BIT_RAW:true,DEBUG_BIT_CONTENT_RAW:k,DEBUG_BIT_CONTENT:x,DEBUG_BIT_TAGS:S,DEBUG_BODY:K,DEBUG_FOOTER:w,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){var t;const r=[];let i=[];for(const o of e){if(!o)continue;const e=o.value;e?r.push(e):i=i.concat(null!==(t=o.errors)&&void 0!==t?t:[])}return A.bitmark({bits:r,errors:i.length>0?i:void 0})}buildBit(e,t){var r;const{bitType:o,textFormat:n,resourceType:l,isCommented:u}=e;if(!o||a.Config.isOfBitType(o,s.BitType._error))return this.invalidBit();const p=a.Config.isOfBitType(o,s.BitType.trueFalse1),c=a.Config.isOfBitType(o,s.BitType.multipleChoice1),d=a.Config.isOfBitType(o,s.BitType.multipleResponse1);this.debugPrint("BIT CONTENT",t),this.resetParserState(),t=this.squashUnwantedInlineBodyBits(o,n,t),t=g.BitmarkPegParserValidator.validateBitTags(this.context,o,l,t);const f=a.Config.getBitConfig(o),m=this.bitContentProcessor(o,n,P.BitContentLevel.Bit,f.tags,t),{body:h,footer:T,cardSet:b,title:C,statement:k,statements:x,choices:S,responses:K,resources:w,posterImage:_,internalComments:I}=m,L=i(m,["body","footer","cardSet","title","statement","statements","choices","responses","resources","posterImage","internalComments"]);this.debugPrint("BIT TAGS",L),this.debugPrint("BIT BODY",h),this.debugPrint("BIT FOOTER",T);const O=(0,B.buildTitles)(this.context,o,C),E=(0,y.buildCards)(this.context,o,n,b,k,x,S,K),R=(0,v.buildResources)(this.context,o,l,w),N=[...null!=I?I:[],...null!==(r=E.internalComments)&&void 0!==r?r:[]],V=this.buildBitLevelWarnings(),F=this.buildBitLevelErrors();V&&(this.parser.warnings=V),F&&(this.parser.errors=F);return{value:A.bit(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({bitType:o,isCommented:u,textFormat:n,resourceType:l},O),{posterImage:_,statement:p?k:void 0,choices:c?S:void 0,responses:d?K:void 0}),L),{resources:R}),E),{body:h,footer:T,internalComment:N,parser:this.parser}))}}invalidBit(e){e&&this.addError("Invalid bit"),this.parser.errors=this.buildBitLevelErrors();return{value:A.bit({bitType:a.Config.getBitType(s.BitType._error),parser:this.parser})}}buildBitHeader(e,t){const r=a.Config.getBitType(e),i=a.Config.isBitTypeCommented(e);a.Config.isOfBitType(r,s.BitType._error)&&this.addError(`Invalid bit type: '${e}'`);const o=a.Config.getBitConfig(r);let n=p.TextFormat.fromValue(t.textFormat);t.textFormat&&!n&&this.addWarning(`Invalid text format '${t.textFormat}', defaulting to '${o.textFormatDefault}'`),n=null!=n?n:o.textFormatDefault;const l=u.ResourceTag.fromValue(t.resourceType);return t.resourceType&&!l&&this.addWarning(`Invalid resource type '${t.resourceType}', it will be ignored`),{bitType:r,textFormat:null!=n?n:o.textFormatDefault,resourceType:l,isCommented:i}}buildTextAndResourceType(e,t){const r={},i=e=>{e&&(e.type===P.TypeKey.TextFormat?r.textFormat=c.StringUtils.string(e.value):r.resourceType=c.StringUtils.string(e.value))};return i(e),i(t),r}resetParserState(){this.context.state={}}squashUnwantedInlineBodyBits(e,t,r){const i=[];if(!r)return i;if(t===p.TextFormat.bitmarkMinusMinus||t===p.TextFormat.bitmarkPlusPlus)return r;const 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 n=!1;for(const e of r){const{type:t,value:r}=e,a=null!=r?r:"";if(t===P.TypeKey.BodyText){n=!a.replace(/[ \t]/gm,"").endsWith("\n"),i.push(e)}else{if(n){const t=o(e);i.push({type:P.TypeKey.BodyText,value:t})}else i.push(e);n=!1}}return i}bitContentProcessor(e,t,r,i,o){const a={};if(!o)return a;a.title=[],a.solutions=[],a.statements=[],a.choices=[],a.responses=[],a.resources=[],a.trueFalse=[],a.markConfig=[],a.extraProperties={},a.internalComments=[];let s=!1,l=!1;const u=[];let p=n.Breakscape.EMPTY_STRING,c=n.Breakscape.EMPTY_STRING;const y=r===P.BitContentLevel.Bit,k=r===P.BitContentLevel.Card,x=r===P.BitContentLevel.Chain,S=()=>{if(p){p=g.BitmarkPegParserValidator.checkBodyPart(this.context,e,r,p);const t=A.bodyText({text:p});u.push(t)}p=n.Breakscape.EMPTY_STRING};if(o.forEach(((o,g)=>{const{type:y,value:k}=o;switch(y){case P.TypeKey.ItemLead:(0,m.itemLeadChainContentProcessor)(this.context,e,t,r,i,o,a);break;case P.TypeKey.Instruction:case P.TypeKey.Hint:case P.TypeKey.Anchor:case P.TypeKey.SampleSolution:(0,d.defaultTagContentProcessor)(this.context,e,t,r,i,o,a);break;case P.TypeKey.Reference:(0,b.referenceTagContentProcessor)(this.context,e,t,r,i,o,a,s),s=!0;break;case P.TypeKey.Title:(0,B.titleTagContentProcessor)(this.context,e,t,r,i,o,a);break;case P.TypeKey.Property:(0,T.propertyContentProcessor)(this.context,e,t,r,i,o,a);break;case P.TypeKey.Gap:x||S(),(0,f.gapChainContentProcessor)(this.context,e,t,r,i,o,a,u);break;case P.TypeKey.Mark:x||S(),(0,h.markChainContentProcessor)(this.context,e,t,r,i,o,a,u);break;case P.TypeKey.True:case P.TypeKey.False:x||S(),(0,C.trueFalseChainContentProcessor)(this.context,e,t,r,i,o,a,u);break;case P.TypeKey.Resource:(0,v.resourceContentProcessor)(this.context,e,t,r,i,o,a);break;case P.TypeKey.CardSet:a.cardSet=k,l=!0;break;case P.TypeKey.BodyText:case P.TypeKey.CardText:l?c=n.Breakscape.concatenate(c,k):p=n.Breakscape.concatenate(p,k);break;case P.TypeKey.Footer:l&&(c=n.Breakscape.concatenate(c,k)),l=!0}})),S(),a.itemLead){const e=a.itemLead.length;e>0&&(a.item=a.itemLead[0]),e>1&&(a.lead=a.itemLead[1]),e>2&&(a.pageNumber=a.itemLead[2]),e>3&&(a.marginNumber=a.itemLead[e-1])}return y?(a.body=u.length>0?A.body({bodyParts:this.trimBodyParts(u)}):void 0,a.body=g.BitmarkPegParserValidator.checkBody(this.context,e,r,t,a.body)):k&&(a.cardBody=u.length>0?A.body({bodyParts:this.trimBodyParts(u)}):void 0),c=c.trim(),c&&(c=g.BitmarkPegParserValidator.checkFooter(this.context,e,r,c),c&&(a.footer=A.footerText({text:c}))),0===Object.keys(a.extraProperties).length&&delete a.extraProperties,0===a.title.length&&delete a.title,0===a.solutions.length&&delete a.solutions,0===a.statements.length&&delete a.statements,0===a.choices.length&&delete a.choices,0===a.responses.length&&delete a.responses,0===a.trueFalse.length&&delete a.trueFalse,0===a.markConfig.length&&delete a.markConfig,0===a.resources.length&&delete a.resources,0===a.internalComments.length&&delete a.internalComments,a}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}trimBodyParts(e){let t=!1,r=e.reduce(((e,r)=>{const i=r;if(t||i.type!==l.BodyBitType.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!==l.BodyBitType.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}addWarning(e,t,r){var i,o,n;const a={message:e,text:null!==(i=null==t?void 0:t.parser.text)&&void 0!==i?i:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==r?void 0:r.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalWarnings.push(a)}addError(e,t,r){var i,o,n;const a={message:e,text:null!==(i=null==t?void 0:t.parser.text)&&void 0!==i?i:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==r?void 0:r.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalErrors.push(a)}debugPrint(e,t){}}},3029:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARD_VARIANT_DIVIDER_V1=t.CARD_SIDE_DIVIDER_V1=t.CARD_DIVIDER_V1=t.CARD_VARIANT_DIVIDER_V2=t.CARD_SIDE_DIVIDER_V2=t.CARD_DIVIDER_V2=t.BitContentLevel=t.TypeKey=void 0;const i=r(4718),o=r(9917);t.CARD_DIVIDER_V2="====";t.CARD_SIDE_DIVIDER_V2="--";t.CARD_VARIANT_DIVIDER_V2="++";t.CARD_DIVIDER_V1="===";t.CARD_SIDE_DIVIDER_V1="==";t.CARD_VARIANT_DIVIDER_V1="--";const n=(0,i.superenum)({TextFormat:"TextFormat",ResourceType:"ResourceType",Title:o.Tag.tag_title,Anchor:o.Tag.tag_anchor,Reference:o.Tag.tag_reference,ItemLead:o.Tag.tag_itemLead,Instruction:o.Tag.tag_instruction,Hint:o.Tag.tag_hint,True:o.Tag.tag_true,False:o.Tag.tag_false,Gap:o.Tag.tag_gap,Mark:o.Tag.tag_mark,SampleSolution:o.Tag.tag_sampleSolution,Property:"Property",Resource:"Resource",TagChain:"TagChain",BodyChar:"BodyChar",BodyText:"BodyText",CardSet:"CardSet",Card:"Card",CardChar:"CardChar",CardText:"CardText",GapChain:"GapChain",TrueFalseChain:"TrueFalseChain",Footer:"Footer"});t.TypeKey=n;const a=(0,i.superenum)({Bit:"Bit",Card:"Card",Chain:"Chain"});t.BitContentLevel=a},4266:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserValidator=void 0;const i=r(5809),o=r(2028),n=r(5512),a=r(4410),s=r(3778),l=r(166),u=r(9917),p=r(385),c=r(3029),g=["====","----","\n==\n","\n---\n","\n--\n",":::","::::","|||","||||"],y=["==\n","---\n","--\n"],d=["\n==","\n---","\n--"],f=new i.Builder;const m=new class{validateBitTags(e,t,r,i){if(!i)return[];const n=o.Config.getBitConfig(t),{tags:a,cardSet:s}=n,l=o.Config.getBitResourcesConfig(t,r),u=Object.assign(Object.assign({},a),l.tags);return this.validateTagChainsRecursive(e,t,c.BitContentLevel.Bit,i,u,s).validated}checkBody(e,t,r,i,n){if(!n||!n.bodyParts)return n;const s=o.Config.getBitConfig(t),{bodyAllowed:l}=s;if(n.bodyParts.length>0&&!l&&e.addWarning(`Bit '${t}' should not have a body.`),i===p.TextFormat.json){let t=n.bodyParts.reduce(((e,t)=>{var r;if(t.type===a.BodyBitType.text&&t.data){return e+(null!==(r=t.data.bodyText)&&void 0!==r?r:"")}return e}),"");try{t=JSON.parse(t)}catch(r){t=null,e.addError("Body JSON is invalid.")}n=f.body({bodyJson:t})}return n}checkBodyPart(e,t,r,i){return i?(this.checkBodyForCommonPotentialMistakes(e,r,t,i),i):i}checkFooter(e,t,r,i){if(!i)return i;const n=o.Config.getBitConfig(t),{footerAllowed:a}=n;return this.checkBodyForCommonPotentialMistakes(e,r,t,i),a||e.addWarning(`Bit '${t}' should not have a footer.`),i}checkCardBody(e,t,r,i,n,a,s){if(!i||!i.bodyParts)return i;const l=o.Config.getBitConfig(t);if(!l.cardSet)return i;const u=this.getVariantConfig(l.cardSet.variants,a,s);if(!u)return i;const{bodyAllowed:p}=u;return i.bodyParts.length>0&&!p&&e.addWarning(`Bit '${t}' should not have a card body at card:${n+1}, side:${a+1}, variant:${s+1}.`),i}validateTagChainsRecursive(e,t,r,i,o,a,p){var g;if(!i)return{validated:[]};let y;const d=[...i],f=this.convertTagsToTypeKeyMap(e,r,t,o),m=(e,t,r)=>{f.set(e,{maxCount:t,minCount:r,_type:e,_tag:e,_seenCount:0})};var h,T,b;h=l.PropertyTag.internalComment,T=s.Count.infinity,b=0,f.set(`${c.TypeKey.Property}:${h}`,{maxCount:T,minCount:b,_type:n.BitTagType.property,_tag:u.Tag.tag_property,_seenCount:0}),r===c.BitContentLevel.Bit?(a&&m(c.TypeKey.CardSet,1,0),m(c.TypeKey.TextFormat,1,0),m(c.TypeKey.BodyText,s.Count.infinity,0),m(c.TypeKey.Footer,s.Count.infinity,0)):r===c.BitContentLevel.Card&&m(c.TypeKey.CardText,s.Count.infinity,0);for(let i=0;i<d.length;i++){const o=d[i];if(!o)continue;const{type:n,key:s}=o,l=c.TypeKey.fromValue(n);if(!l)continue;let u=l;l!==c.TypeKey.Property&&l!==c.TypeKey.Resource||(u=`${l}:${s}`);const m=f.get(u),{validated:h,warning:T}=this.validateSingleTag(e,t,r,o,l,m,a);l===c.TypeKey.Resource&&(p=c.TypeKey.Resource);let b=!0;if(!h)if(r===c.BitContentLevel.Chain&&p!==c.TypeKey.Resource){y=o;const e=d.slice(i+1);e.length>0&&(y.chain=e),d.splice(i),b=!1}else d.splice(i,1,null);if(T&&b&&e.addWarning(null!==(g=T.warning)&&void 0!==g?g:"",T.content,T.previousContent),h&&Array.isArray(h.chain)&&h.chain.length>0)if(m&&m.chain){const{validated:r,remaining:o}=this.validateTagChainsRecursive(e,t,c.BitContentLevel.Chain,h.chain,m.chain,void 0,h.type);r&&r.length>0?h.chain=r:h.chain=void 0,o&&d.splice(i+1,0,o)}else if(h.type!==c.TypeKey.Resource){const e=h.chain[0];h.chain.length>1&&(e.chain=h.chain.slice(1)),d.splice(i+1,0,e),h.chain=void 0}}for(const t of f.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:d.filter((e=>null!=e)),remaining:y}}validateSingleTag(e,t,r,i,o,n,a){const{type:s,key:l}=i,u=n?this.getTagSignature(n):this.getUnknownTagSignature(s,l),p=" It will be ignored";let g,y,d="";if(n)switch(n._seenCount++,o){case c.TypeKey.Property:{const{content:o,warning:a}=this.validatePropertyTag(e,r,t,n,i);g=o,y=a;break}case c.TypeKey.Resource:{const{content:o,warning:a}=this.validateResourceTag(e,r,t,n,i);g=o,y=a;break}case c.TypeKey.CardSet:{const{content:r,warning:o}=this.validateCardSet(e,t,n,i,a);g=r,y=o;break}default:{const{content:o,warning:a}=this.validateStandardTag(e,r,t,n,i);g=o,y=a}}else switch(o){case c.TypeKey.Property:y={extraProperty:!0},r!==c.BitContentLevel.Chain&&(g=i);break;case c.TypeKey.Resource:y={excessResource:!0},g=i;break;default:y={invalid:!0}}if(y){const e=null==n?void 0:n._previous;y.invalid||y.excessResource?d=`${u} is not valid here (incorrectly chained?).${p}`:null!=y.tooMany?(d=`${u} is included more than ${y.tooMany} time(s).`,y.tooMany>0&&(d+=" The earlier ones will be ignored")):y.extraProperty?d=`${u} is an unknown property. It can be excluded from the output using the 'excludeUnknownProperties' flag`:y.unexpectedCardSet?d=`${u} is not expected here.${p}`:y.unexpectedCardSideVariant&&(d=`${u} has a card / side / variant that is not expected here.${p}`),y.warning=d,y.content=g,y.previousContent=e}return n&&(n._previous=i),{validated:g,warning:y}}validateStandardTag(e,t,r,i,o){const n=null==i.maxCount?1:i.maxCount;return n!==s.Count.infinity&&i._seenCount>n?{warning:{tooMany:n},content:o}:{content:o}}validatePropertyTag(e,t,r,i,o){const n=null==i.maxCount?1:i.maxCount;return n!==s.Count.infinity&&i._seenCount>n?{warning:{tooMany:n},content:o}:{content:o}}validateResourceTag(e,t,r,i,o){const n=null==i.maxCount?1:i.maxCount;return n!==s.Count.infinity&&i._seenCount>n?{warning:{tooMany:n},content:o}:{content:o}}validateCardSet(e,t,r,i,o){if(!o||!o.variants||0===o.variants.length)return{warning:{unexpectedCardSet:!0}};const{value:n}=i,a=n;let s,l=0,u=0;for(const r of a.cards){l=0;for(const i of r.sides){u=0;for(const r of i.variants){const n=r.content;let a;const p=this.getVariantConfig(o.variants,l,u);if(p){a=this.validateTagChainsRecursive(e,t,c.BitContentLevel.Card,n,p.tags).validated}else s={unexpectedCardSideVariant:!0};a&&a.length>0?i.variants[u]={parser:r.parser,content:a}:i.variants[u]={parser:r.parser,content:[]},u++}l++}}return{content:i,warning:s}}checkBodyForCommonPotentialMistakes(e,t,r,i){if(i){for(const t of g)i.includes(t)&&e.addWarning(`Bit '${r}' might contain a mistake: ${t}`);for(const t of y)i.startsWith(t)&&e.addWarning(`Bit '${r}' might contain a mistake: ${t}`);for(const t of d)i.endsWith(t)&&e.addWarning(`Bit '${r}' 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===n.BitTagType.tag,isProperty:e.type===n.BitTagType.property,isResource:e.type===n.BitTagType.resource,chain:e.chain,_configKey:e.configKey,_type:e.type,_tag:e.tag,_seenCount:0,_previous:void 0};if(t.isProperty)o.set(`${c.TypeKey.Property}:${e.tag}`,t);else if(t.isResource)o.set(`${c.TypeKey.Resource}:${e.tag}`,t);else{const r=c.TypeKey.fromValue(e.tag);r&&o.set(r,t)}}return o}getVariantConfig(e,t,r){let i;if(0===e.length)return;const o=e[Math.min(t,e.length-1)],n=o.length-1;if(r>n){if(i=o[n],i.repeatCount!==s.Count.infinity)return}else i=o[r];return i}getTagSignature(e){switch(e._type){case n.BitTagType.tag:return`[${e._tag}]`;case n.BitTagType.property:return`[@${e._tag}]`;case n.BitTagType.resource:return`[&${e._tag}]`;default:return`'${e._type}' tag '${e._tag}'`}}getUnknownTagSignature(e,t){switch(e){case c.TypeKey.Property:return`[@${t}]`;case c.TypeKey.Resource:return`[&${t}]`;default:return t?`'${e}' tag '${t}'`:`'${e}' tag`}}};t.BitmarkPegParserValidator=m},7461:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PeggyGrammarLocation=void 0;t.PeggyGrammarLocation=class{constructor(e,t){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}}},3045:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bookChainContentProcessor=void 0;const i=r(9681),o=r(3029);t.bookChainContentProcessor=function(e,t,r,n,a,s,l){if(n===o.BitContentLevel.Chain);else{const n=function(e,t,r,n,a,s){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("book content",s);const l=e.bitContentProcessor(t,r,o.BitContentLevel.Chain,a,s.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("book TAGS",l);const{reference:u,referenceEnd:p}=l,c=i.StringUtils.trimmedString(s.value);return{book:c,reference:u,referenceEnd:p}}(e,t,r,0,a,s);l.book=n.book,l.reference=n.reference,l.referenceEnd=n.referenceEnd}}},1083:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.buildCards=void 0;const o=r(5809),n=r(7735),a=r(2028),s=r(8199),l=r(5854),u=r(4410),p=r(6149),c=r(8025),g=r(4266),y=r(3029),d=new o.Builder;function f(e){let t="";if(e&&e.bodyParts)for(const r of e.bodyParts)if(r.type===u.BodyBitType.text){t+=r.data.bodyText}return t}t.buildCards=function(e,t,r,o,m,h,T,b){var v;e.DEBUG_CARD_SET&&e.debugPrint("card set",o);let B={};const C=function(e,t,r,i){const o={cards:[],internalComments:[]};if(!i)return o;let n=0,s=0,l=0;for(const u of i.cards){const i={no:n++,sides:[]};o.cards.push(i);for(const n of u.sides){const u={no:s++,variants:[]};i.sides.push(u);for(const p of n.variants){const{parser:n,content:c}=p,d={parser:n,no:l++};u.variants.push(d);const m=a.Config.getTagsConfigForCardSet(t,s,l),h=e.bitContentProcessor(t,r,y.BitContentLevel.Card,m,c);e.DEBUG_CARD_TAGS&&e.debugPrint("card tags",h),h.cardBody=g.BitmarkPegParserValidator.checkCardBody(e,t,y.BitContentLevel.Card,h.cardBody,i.no,u.no,d.no),h.cardBodyStr=f(h.cardBody),d.data=h,h.internalComments&&o.internalComments.push(...h.internalComments)}l=0}s=0}return o}(e,t,r,o);switch(null===(v=a.Config.getBitConfig(t).cardSet)||void 0===v?void 0:v.configKey){case s.CardSetConfigKey._flashcards:B=function(e,t,r){const o=[];let a,s,u=n.Breakscape.EMPTY_STRING,p=[],c=0,g=0,y={};const f=t===l.BitType.flashcard1;for(const l of r.cards){u=n.Breakscape.EMPTY_STRING,a=void 0,p=[],g=0,y={};for(const e of l.sides)for(const t of e.variants){const e=t.data,{cardBodyStr:r}=e,o=i(e,["cardBodyStr"]);y=Object.assign(Object.assign({},y),o),0===g?(s=t,u=null!=r?r:n.Breakscape.EMPTY_STRING):1===g?a=null!=r?r:n.Breakscape.EMPTY_STRING:p.push(null!=r?r:n.Breakscape.EMPTY_STRING),g++}if(0!==c&&f){e.addWarning(`Bit '${t}' should only contain one card. Ignore subsequent card: '${u}'`,s);break}o.push(d.flashcard(Object.assign({question:u,answer:a,alternativeAnswers:p.length>0?p:void 0},y))),c++}return{flashcards:o.length>0?o:void 0}}(e,t,C);break;case s.CardSetConfigKey._elements:B=function(e,t,r){var i;const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data;o.push(null!==(i=t.cardBodyStr)&&void 0!==i?i:n.Breakscape.EMPTY_STRING)}return{elements:o.length>0?o:void 0}}(0,0,C);break;case s.CardSetConfigKey._statements:B=function(e,t,r,o,n){const a=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{statements:r}=t,o=i(t,["statements"]);if(Array.isArray(r))for(const e of r){const t=d.statement(Object.assign(Object.assign(Object.assign({},e),e.itemLead),o));a.push(t)}}o&&a.push(o);Array.isArray(n)&&n.length>0&&a.push(...n);return{statements:a.length>0?a:void 0}}(0,0,C,m,h);break;case s.CardSetConfigKey._quiz:B=function(e,t,r,o,s){const u=[],p=a.Config.isOfBitType(t,l.BitType.multipleChoice),c=a.Config.isOfBitType(t,l.BitType.multipleResponse);if(!p&&!c)return{};let g,y=!1;for(const e of r.cards){y=!1,g=n.Breakscape.EMPTY_STRING;for(const t of e.sides)for(const e of t.variants){const t=e.data,{isDefaultExample:r,example:o}=t,n=i(t,["isDefaultExample","example"]);if(y=!0===r||y,g=o||g,n.trueFalse&&n.trueFalse.length>0){const e=[],t=c?d.response:d.choice;for(const r of n.trueFalse){const{isDefaultExample:o,example:n}=r,a=i(r,["isDefaultExample","example"]),s=o||y,l=n||g,u=t(Object.assign(Object.assign({},a),{isDefaultExample:s,example:l}));e.push(u)}c?n.responses=e:n.choices=e}const a=d.quiz(Object.assign(Object.assign({},n),{isDefaultExample:y,example:g}));u.push(a)}}if(p&&Array.isArray(o)&&o.length>0){const e=d.quiz({choices:o});u.push(e)}if(c&&Array.isArray(s)&&s.length>0){const e=d.quiz({responses:s});u.push(e)}return{quizzes:u.length>0?u:void 0}}(0,t,C,T,b);break;case s.CardSetConfigKey._questions:B=function(e,t,r){var i;const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,r=d.question(Object.assign({question:null!==(i=t.cardBodyStr)&&void 0!==i?i:n.Breakscape.EMPTY_STRING},t));o.push(r)}return{questions:o.length>0?o:void 0}}(0,0,C);break;case s.CardSetConfigKey._matchPairs:B=function(e,t,r){let o,a=0,s=!1;const l=[];let u,c,g,y,f,m,h=[],T=[],b={},v=!1,B=!1;for(const e of r.cards){s=!1,u=void 0,h=[],c=void 0,T=[],g=void 0,y=void 0,a=0,b={},B=!1,m=n.Breakscape.EMPTY_STRING;for(const t of e.sides){for(const e of t.variants){const t=e.data,{cardBodyStr:r,title:o,resources:l,isDefaultExample:d,example:C}=t,P=i(t,["cardBodyStr","title","resources","isDefaultExample","example"]);B=!0===d||B,m=C||m;const k=o&&o[1];if(null!=k&&(s=!0),0===a)if(u=k,null!=k)v=!0===d||v,f=C||f;else if(Array.isArray(l)&&l.length>0){const e=l[0];e.type===p.ResourceTag.audio?g=e:e.type===p.ResourceTag.image&&(y=e)}else c=r;else{if(h.push(null!=k?k:n.Breakscape.EMPTY_STRING),null!=k)v=!0===d||v,f=C||f;else if(null==o){const e=null!=r?r:n.Breakscape.EMPTY_STRING;T.push(e),!v&&!B||m||(m=e)}delete P.item,delete P.lead}b=Object.assign(Object.assign({},b),P)}a++}if(s)o=d.heading({forKeys:null!=u?u:n.Breakscape.EMPTY_STRING,forValues:h});else{B&&(f=void 0);const e=B||v,t=m||f,r=d.pair(Object.assign(Object.assign({key:null!=c?c:n.Breakscape.EMPTY_STRING,keyAudio:g,keyImage:y,values:T},b),{isDefaultExample:e,example:t}));l.push(r)}}return{heading:o,pairs:l.length>0?l:void 0}}(0,0,C);break;case s.CardSetConfigKey._matchMatrix:B=function(e,t,r){let o,a,s,l,u=0,p=!1,c=[];const g=[];let y,f,m,h,T,b=[],v=[],B={},C=!1,P=!1,k=!1;for(const e of r.cards){p=!1,a=void 0,s=void 0,l=void 0,c=[],b=[],v=[],u=0,P=!1,f=n.Breakscape.EMPTY_STRING,h=void 0;for(const t of e.sides){v=[],B={},k=!1,m=n.Breakscape.EMPTY_STRING,T=void 0;for(const e of t.variants){const t=e.data,{title:r,cardBodyStr:o,isDefaultExample:g,example:d,isCaseSensitive:b}=t,x=i(t,["title","cardBodyStr","isDefaultExample","example","isCaseSensitive"]);k=!0===g||k,m=d||m,Object.assign(B,x);const S=r&&r[1];if(null!=S&&(p=!0),0===u)a=S,null!=S?(C=!0===g||C,y=d||y):(s=o,l=x,P=!0===g||P,f=d||f,h=null!=b?b:h);else if(c.push(null!=S?S:n.Breakscape.EMPTY_STRING),null!=S)C=!0===g||C,y=d||y;else if(null==t.title){const e=null!=o?o:n.Breakscape.EMPTY_STRING;v.push(e),!C&&!k||m||(m=e),T=null!=b?b:h}}if(u>0){k&&(f=y=void 0),P&&(y=void 0);const e=k||P||C,t=m||f||y,r=d.matrixCell(Object.assign(Object.assign({values:v},B),{isDefaultExample:e,example:t,isCaseSensitive:T}));b.push(r)}u++}if(p)o=d.heading({forKeys:null!=a?a:n.Breakscape.EMPTY_STRING,forValues:c});else{const e=d.matrix(Object.assign({key:null!=s?s:n.Breakscape.EMPTY_STRING,cells:b},l));g.push(e)}}return{heading:o,matrix:g.length>0?g:void 0}}(0,0,C);break;case s.CardSetConfigKey._table:B=function(e,t,r){let i=0,o=!1;const a=[],s=[];let l=[];for(const e of r.cards){o=!1,l=[];for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,cardBodyStr:s}=t,u=r&&r[1];if(0===i&&null!=u&&(o=!0),o)a.push(null!=u?u:n.Breakscape.EMPTY_STRING);else{const e=null!=s?s:n.Breakscape.EMPTY_STRING;l.push(e)}}o||s.push(l),i++}return{table:d.table({columns:a,rows:s})}}(0,0,C);break;case s.CardSetConfigKey._botActionResponses:B=function(e,t,r){const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{instruction:r,reaction:a,cardBodyStr:s}=t,l=i(t,["instruction","reaction","cardBodyStr"]),u=d.botResponse(Object.assign({response:null!=r?r:n.Breakscape.EMPTY_STRING,reaction:null!=a?a:n.Breakscape.EMPTY_STRING,feedback:null!=s?s:n.Breakscape.EMPTY_STRING},l));o.push(u)}return{botResponses:o.length>0?o:void 0}}(0,0,C);break;case s.CardSetConfigKey._ingredients:B=function(e,t,r){const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,instruction:a,unit:s,unitAbbr:l,decimalPlaces:p,disableCalculation:g,cardBodyStr:y,cardBody:f}=t,m=i(t,["title","instruction","unit","unitAbbr","decimalPlaces","disableCalculation","cardBodyStr","cardBody"]),h=Array.isArray(r)&&r.length>0?r[r.length-1]:void 0;let T=!1,b=c.NumberUtils.asNumber(a);if(f&&f.bodyParts){const e=f.bodyParts.find((e=>e.type===u.BodyBitType.select));e&&(b=e.data.instruction?c.NumberUtils.asNumber(e.data.instruction):b,e.data.options&&e.data.options.length>0&&(T=e.data.options[0].isCorrect))}const v=y?y.trim():n.Breakscape.EMPTY_STRING,B=d.ingredient(Object.assign({title:h,checked:T,item:v,quantity:b,unit:null!=s?s:n.Breakscape.EMPTY_STRING,unitAbbr:null!=l?l:n.Breakscape.EMPTY_STRING,decimalPlaces:null!=p?p:1,disableCalculation:g},m));o.push(B)}return{ingredients:o.length>0?o:void 0}}(0,0,C);break;case s.CardSetConfigKey._clozeList:case s.CardSetConfigKey._exampleBitList:B=function(e,t,r){const o=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{cardBody:r}=t,n=i(t,["cardBody"]),a=d.cardBit(Object.assign({body:r},n));a&&o.push(a)}return{cardBits:o.length>0?o:void 0}}(0,0,C)}return B.internalComments=C.internalComments.length>0?C.internalComments:void 0,B}},554:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clozeTagContentProcessor=void 0;const i=r(9681);t.clozeTagContentProcessor=function(e,t,r,o,n,a,s){const{value:l}=a,u=s.solutions;if(u&&i.StringUtils.isString(l)){const e=i.StringUtils.trimmedString(l);u.push(e)}}},4402:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTagContentProcessor=void 0;const i=r(9681),o=r(3029);t.defaultTagContentProcessor=function(e,t,r,n,a,s,l){const{type:u,value:p}=s,c=i.StringUtils.trimmedString(p);switch(u){case o.TypeKey.Instruction:l.instruction=c;break;case o.TypeKey.Hint:l.hint=c;break;case o.TypeKey.Anchor:l.anchor=c;break;case o.TypeKey.Reference:l.reference=c;break;case o.TypeKey.SampleSolution:l.sampleSolution=c,e.addWarning("[$...] tag is deprecated, use [@sampleSolution:...] instead",s)}}},4091:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exampleTagContentProcessor=void 0;const i=r(2028),o=r(5854),n=r(4078);function a(e,t,r,i,o){!0===i?(o.isDefaultExample=!0,o.example=void 0):o.example=i}t.exampleTagContentProcessor=function(e,t,r,s,l,u){const{value:p}=l,c=p;i.Config.isOfBitType(t,[o.BitType.cloze,o.BitType.clozeAndMultipleChoiceText,o.BitType.multipleChoiceText,o.BitType.highlightText,o.BitType.trueFalse,o.BitType.trueFalse1,o.BitType.multipleResponse,o.BitType.multipleResponse1,o.BitType.multipleChoice,o.BitType.multipleChoice1])?function(e,t,r,s,l){var u,p;let c;Array.isArray(l.trueFalse)&&l.trueFalse.length>0&&(c=null!==(u=l.trueFalse[l.trueFalse.length-1])&&void 0!==u?u:void 0);c?!0===s?(c.isDefaultExample=!0,c.example=void 0):n.BooleanUtils.isBooleanString(s)?c.example=s:(c.isDefaultExample=!0,c.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",r)):Array.isArray(l.solutions)&&l.solutions.length>0?l.example=!0===s?null!==(p=l.solutions[l.solutions.length-1])&&void 0!==p?p:void 0:s:(i.Config.isOfBitType(t,[o.BitType.multipleChoiceText,o.BitType.highlightText,o.BitType.trueFalse,o.BitType.trueFalse1,o.BitType.multipleResponse,o.BitType.multipleResponse1])&&function(e,t,r,i,o){!0===i?(o.isDefaultExample=!0,o.example=void 0):n.BooleanUtils.isBooleanString(i)?o.example=i:(o.isDefaultExample=!0,o.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",r))}(e,0,r,s,l),i.Config.isOfBitType(t,[o.BitType.clozeAndMultipleChoiceText,o.BitType.multipleChoice,o.BitType.multipleChoice1])?(l.isDefaultExample=!0,l.example=void 0,!0!==s&&e.addWarning("At this level, only default [@example] is allowed, using default",r)):a(e,t,r,s,l))}(e,t,l,c,u):i.Config.isOfBitType(t,o.BitType.mark)?function(e,t,r,i,o){o.isDefaultExample=!0,o.example=void 0,!0!==i&&e.addWarning("Only default [@example] is allowed, using default",r)}(e,0,l,c,u):a(e,t,l,c,u)}},3904:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.gapChainContentProcessor=void 0;const o=r(5809),n=r(2028),a=r(9917),s=r(554),l=r(3029),u=new o.Builder;t.gapChainContentProcessor=function(e,t,r,o,p,c,g,y){if(o===l.BitContentLevel.Chain)(0,s.clozeTagContentProcessor)(e,t,r,o,p,c,g);else{const o=function(e,t,r,o,s,p){var c;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("gap content",p);const g=n.Config.getTagConfigForTag(s,a.Tag.fromValue(p.type)),y=[p,...null!==(c=p.chain)&&void 0!==c?c:[]],d=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,null==g?void 0:g.chain,y);e.DEBUG_CHAIN_TAGS&&e.debugPrint("gap TAGS",d);const{solutions:f}=d,m=i(d,["solutions"]),h=u.gap(Object.assign({solutions:null!=f?f:[]},m));return h}(e,t,r,0,p,c);o&&y.push(o)}}},8848:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.imageSourceChainContentProcessor=void 0;const o=r(5809),n=r(7735),a=r(2028),s=r(166),l=r(9681),u=r(3029),p=new o.Builder;t.imageSourceChainContentProcessor=function(e,t,r,o,c,g,y){o===u.BitContentLevel.Chain?function(e,t,r,i,o,n,a){const{value:s}=n,u=l.StringUtils.trimmedString(s);a.imageSourceUrl=u}(0,0,0,0,0,g,y):function(e,t,r,o,l,c,g){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("imageSource content",c);const{key:y}=c,d=a.Config.getTagConfigForTag(l,s.PropertyTag.fromValue(y)),f=e.bitContentProcessor(t,r,u.BitContentLevel.Chain,l,[c]),m=e.bitContentProcessor(t,r,u.BitContentLevel.Chain,null==d?void 0:d.chain,c.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("imageSource TAGS",m);const{imageSourceUrl:h}=f,{mockupId:T}=m,b=i(m,["mockupId"]);h||e.addWarning("[@imageSource] is missing the image url",c);T||e.addWarning("[@mockupId:xxx] is missing from [@imageSource]",c);const v=p.imageSource(Object.assign({url:null!=h?h:n.Breakscape.EMPTY_STRING,mockupId:null!=T?T:n.Breakscape.EMPTY_STRING},b));g.imageSource=v}(e,t,r,0,c,g,y)}},6991:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.commentTagContentProcessor=void 0;const i=r(9681);t.commentTagContentProcessor=function(e,t,r,o,n){if(!n.internalComments)return;const{value:a}=o,s=i.StringUtils.isString(a)?i.StringUtils.trimmedString(a):void 0;s&&n.internalComments.push(s)}},9289:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadChainContentProcessor=void 0;const i=r(2028),o=r(9917),n=r(8216),a=r(3029);t.itemLeadChainContentProcessor=function(e,t,r,s,l,u,p){s===a.BitContentLevel.Chain?(0,n.itemLeadTagContentProcessor)(e,t,r,s,l,u,p):function(e,t,r,n,s,l,u){var p;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("item lead content",l);const c=i.Config.getTagConfigForTag(s,o.Tag.fromValue(l.type)),g=[l,...null!==(p=l.chain)&&void 0!==p?p:[]],y=e.bitContentProcessor(t,r,a.BitContentLevel.Chain,null==c?void 0:c.chain,g);e.DEBUG_CHAIN_TAGS&&e.debugPrint("item lead TAGS",y);u.itemLead=y.itemLead}(e,t,r,0,l,u,p)}},8216:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadTagContentProcessor=void 0;const i=r(9681);t.itemLeadTagContentProcessor=function(e,t,r,o,n,a,s){const{value:l}=a,u=i.StringUtils.trimmedString(l);s.itemLead||(s.itemLead=[]),s.itemLead.push(u)}},5189:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.markChainContentProcessor=void 0;const o=r(5809),n=r(7735),a=r(2028),s=r(9917),l=r(6989),u=r(5980),p=r(3029),c=new o.Builder;t.markChainContentProcessor=function(e,t,r,o,g,y,d,f){if(o===p.BitContentLevel.Chain)(0,u.markTagContentProcessor)(e,p.BitContentLevel.Chain,t,y,d);else{const o=function(e,t,r,o,u,g){var y;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",g);const d=a.Config.getTagConfigForTag(u,s.Tag.fromValue(g.type)),f=e.bitContentProcessor(t,r,p.BitContentLevel.Chain,u,[g]),m=e.bitContentProcessor(t,r,p.BitContentLevel.Chain,null==d?void 0:d.chain,g.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",m);const{solution:h}=f,{mark:T}=m,b=i(m,["mark"]),v=c.mark(Object.assign({solution:null!=h?h:n.Breakscape.EMPTY_STRING,mark:null!==(y=l.ArrayUtils.asSingle(T))&&void 0!==y?y:n.Breakscape.EMPTY_STRING},b));return v}(e,t,r,0,g,y);o&&f.push(o)}}},3063:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.markConfigChainContentProcessor=void 0;const o=r(5809),n=r(2028),a=r(166),s=r(9681),l=r(3029),u=new o.Builder;t.markConfigChainContentProcessor=function(e,t,r,o,p,c,g){var y;const{key:d}=c;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",c);const f=g.markConfig;if(!f)return;const m=n.Config.getTagConfigForTag(p,a.PropertyTag.fromValue(d)),h=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,null==m?void 0:m.chain,c.chain),{mark:T}=h,b=i(h,["mark"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",b);const v=null!==(y=s.StringUtils.trimmedString(c.value))&&void 0!==y?y:"unknown",B=u.markConfig(Object.assign({mark:v,emphasis:"underline"},b));f.push(B)}},5980:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.markTagContentProcessor=void 0;const i=r(9681);t.markTagContentProcessor=function(e,t,r,o,n){const{value:a}=o;i.StringUtils.isString(a)&&(n.solution=a)}},21:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.personChainContentProcessor=void 0;const i=r(5809),o=r(6149),n=r(9681),a=r(3029),s=new i.Builder;t.personChainContentProcessor=function(e,t,r,i,l,u,p){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("person content",u);const c=e.bitContentProcessor(t,r,a.BitContentLevel.Chain,l,u.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("person TAGS",c);const{propertyTitle:g,resources:y}=c,d=n.StringUtils.trimmedString(u.value),f=n.StringUtils.trimmedString(g),m=function(e,t){let r;const i=[];if(t)for(const e of t.reverse())r||o.ResourceTag.image!==e.type?i.push(e):r=e;i.length>0&&(e.parser.excessResources=i,e.addWarning(`${i.length} excess resource(s) present in the [@person] chain.`));return r}(e,y),h=s.person({name:d,title:f,avatarImage:m});p.person=h}},9647:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyContentProcessor=void 0;const i=r(2028),o=r(9888),n=r(9727),a=r(166),s=r(4078),l=r(8025),u=r(9681),p=r(3045),c=r(4091),g=r(8848),y=r(6991),d=r(3063),f=r(21),m=r(3967),h=r(4953),T=r(4475),b=r(3029);t.propertyContentProcessor=function(e,t,r,v,B,C,P){const{value:k}=C;let{key:x}=C;const S=v===b.BitContentLevel.Chain,K=i.Config.getTagConfigForTag(B,a.PropertyTag.fromValue(x)),w=K?K.configKey:void 0;if(x===a.PropertyTag.internalComment)return void(0,y.commentTagContentProcessor)(e,t,v,C,P);if(K){if(w===o.PropertyConfigKey.example)return void(0,c.exampleTagContentProcessor)(e,t,r,v,C,P);if(w===o.PropertyConfigKey.ratingLevelStart||w===o.PropertyConfigKey.ratingLevelEnd)return void(0,m.ratingLevelChainContentProcessor)(e,t,r,v,K.chain,C,P);if(w===o.PropertyConfigKey.technicalTerm)return void(0,T.technicalTermChainContentProcessor)(e,t,r,v,K.chain,C,P);if(w===o.PropertyConfigKey.servings)return void(0,h.servingsChainContentProcessor)(e,t,r,v,K.chain,C,P);if(w===o.PropertyConfigKey.person||w===o.PropertyConfigKey.partner)return void(0,f.personChainContentProcessor)(e,t,r,v,K.chain,C,P);if(w===o.PropertyConfigKey.imageSource)return void(0,g.imageSourceChainContentProcessor)(e,t,r,v,B,C,P);if(w===o.PropertyConfigKey.book)return void(0,p.bookChainContentProcessor)(e,t,r,v,K.chain,C,P);if(w===o.PropertyConfigKey.markConfig&&!S)return void(0,d.markConfigChainContentProcessor)(e,t,r,v,B,C,P);w===o.PropertyConfigKey.property_title&&S&&(x="propertyTitle")}const A=(e,t,r,i)=>{if(r=(e=>{if(null!=e){if(i)switch(i.format){case n.PropertyFormat.string:return u.StringUtils.isString(e)?u.StringUtils.string(e):void 0;case n.PropertyFormat.trimmedString:return u.StringUtils.isString(e)?u.StringUtils.trimmedString(e):void 0;case n.PropertyFormat.number:return l.NumberUtils.asNumber(e);case n.PropertyFormat.boolean:return s.BooleanUtils.toBoolean(e,!0);case n.PropertyFormat.invertedBoolean:return!s.BooleanUtils.toBoolean(e,!0)}return e}})(r),(null==i?void 0:i.astKey)&&(t=i.astKey),null==i?void 0:i.single)e[t]=r;else if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t];e[t]=[...i,r]}else e[t]=[r]};A(K?P:P.extraProperties,x,k,K)}},3967:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ratingLevelChainContentProcessor=void 0;const i=r(5809),o=r(166),n=r(8025),a=r(3029),s=new i.Builder;t.ratingLevelChainContentProcessor=function(e,t,r,i,l,u,p){var c;const{key:g,value:y}=u;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("ratingLevel content",u);const d=e.bitContentProcessor(t,r,a.BitContentLevel.Chain,l,u.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("ratingLevel TAGS",d);const{label:f}=d,m=null!==(c=n.NumberUtils.asNumber(y))&&void 0!==c?c:0,h=s.ratingLevelStartEnd({level:m,label:f});switch(g){case o.PropertyTag.ratingLevelStart:p.ratingLevelStart=h;break;case o.PropertyTag.ratingLevelEnd:p.ratingLevelEnd=h}}},3990:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.referenceTagContentProcessor=void 0;const i=r(9681);t.referenceTagContentProcessor=function(e,t,r,o,n,a,s,l){const{value:u}=a,p=i.StringUtils.trimmedString(u);l?s.referenceEnd=p:s.reference=p}},6521:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.resourceContentProcessor=t.buildResources=void 0;const o=r(5533),n=r(2028),a=r(3778),s=r(6149),l=r(3029),u=new o.ResourceBuilder;t.buildResources=function(e,t,r,i){var o,l;const u=[],p=[],c=s.ResourceTag.fromValue(r),g=n.Config.getBitResourcesConfig(t,c),y=g.resourceAttachmentAllowed,d=g.getCountsMin(),f=g.getCountsMax();if(i)for(const e of i.reverse()){let t=null!==(o=d.get(e.typeAlias))&&void 0!==o?o:0,r=null!==(l=f.get(e.typeAlias))&&void 0!==l?l:0;t=Math.max(0,t-1),r===a.Count.infinity?u.unshift(e):r>0?(u.unshift(e),r--):p.unshift(e),d.set(e.typeAlias,t),f.set(e.typeAlias,r)}if(!y&&r){const t=`Resource type [&${r}] is specified in the bit header, but no extra resource is allowed for this bit.`;e.addWarning(t)}else 0===u.length&&r&&e.addWarning(`Resource type [&${r}] is specified in the bit header, but no such a resource is present`);return p.length>0&&(e.parser.excessResources=p),u},t.resourceContentProcessor=function(e,t,r,o,a,p,c){const{type:g,key:y,value:d,chain:f}=p,m=c.resources;if(!m)return;const h=s.ResourceTag.fromValue(y);if(h){const o=n.Config.getTagConfigForTag(a,h),s=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,null==o?void 0:o.chain,f),{posterImage:p}=s,c=i(s,["posterImage"]),g=u.resource(Object.assign({type:h,value:d,posterImage:p},c));g&&m.push(g)}}},4953:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.servingsChainContentProcessor=void 0;const i=r(5809),o=r(8025),n=r(3029),a=new i.Builder;t.servingsChainContentProcessor=function(e,t,r,i,s,l,u){var p;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("servings content",l);const c=e.bitContentProcessor(t,r,n.BitContentLevel.Chain,s,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("servings TAGS",c);const{unit:g,unitAbbr:y,decimalPlaces:d,disableCalculation:f,hint:m}=c,h=null!==(p=o.NumberUtils.asNumber(l.value))&&void 0!==p?p:1,T=a.servings({servings:h,unit:g,unitAbbr:y,decimalPlaces:null!=d?d:1,disableCalculation:f,hint:m});u.servings=T}},4475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.technicalTermChainContentProcessor=void 0;const i=r(5809),o=r(9681),n=r(3029),a=new i.Builder;t.technicalTermChainContentProcessor=function(e,t,r,i,s,l,u){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("technicalTerm content",l);const p=e.bitContentProcessor(t,r,n.BitContentLevel.Chain,s,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("technicalTerm TAGS",p);const{lang:c}=p,g=o.StringUtils.trimmedString(l.value),y=a.technicalTerm({technicalTerm:g,lang:c});u.technicalTerm=y}},7667:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildTitles=t.titleTagContentProcessor=void 0;const i=r(2028),o=r(5854),n=r(9681);t.titleTagContentProcessor=function(e,t,r,i,o,a,s){const{value:l}=a,u=s.title;if(!u)return;const p=l,c=n.StringUtils.trimmedString(p.title);u[p.level.length]=c},t.buildTitles=function(e,t,r){var n,a;if(r=null!=r?r:[],i.Config.isOfBitType(t,o.BitType.chapter)){let e;return r.length>0&&(e=r[r.length-1]),{title:e,level:r.length>0?r.length-1:void 0}}return{title:null!==(n=r[1])&&void 0!==n?n:void 0,subtitle:null!==(a=r[2])&&void 0!==a?a:void 0}}},9885:function(e,t,r){var i=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseChainContentProcessor=void 0;const o=r(5809),n=r(2028),a=r(5854),s=r(4020),l=r(3029),u=new o.Builder;t.trueFalseChainContentProcessor=function(e,t,r,o,p,c,g,y){o===l.BitContentLevel.Chain?(0,s.trueFalseTagContentProcessor)(e,t,r,l.BitContentLevel.Chain,c,g):function(e,t,r,o,s,p,c,g){var y;const d=[p,...null!==(y=p.chain)&&void 0!==y?y:[]],f=c.statements,m=c.choices,h=c.responses;if(!(f&&m&&h&&g))return;if(n.Config.isOfBitType(t,a.BitType.trueFalse1))c.statement=function(e,t,r,o,s){if(!n.Config.isOfBitType(t,a.BitType.trueFalse1))return;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (statement)",s);const p=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,o,s),{trueFalse:c}=p,g=i(p,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (statement)",g);let y;c&&c.length>0&&(y=u.statement(Object.assign(Object.assign({},c[0]),g)));return y}(e,t,r,s,d);else if(n.Config.isOfBitType(t,[a.BitType.trueFalse,a.BitType.multipleChoice,a.BitType.multipleChoice1,a.BitType.multipleResponse,a.BitType.multipleResponse1])){const o=function(e,t,r,o,s){const p=n.Config.isOfBitType(t,a.BitType.trueFalse),c=n.Config.isOfBitType(t,[a.BitType.multipleChoice,a.BitType.multipleChoice1]),g=n.Config.isOfBitType(t,[a.BitType.multipleResponse,a.BitType.multipleResponse1]);if(!p&&!c&&!g)return{};const y=[],d=[],f=[],m=e.splitBitContent(s,[l.TypeKey.True,l.TypeKey.False]);e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (choices/responses)",m);for(const n of m){const a=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,o,n),{trueFalse:s}=a,m=i(a,["trueFalse"]);if(e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (choices/responses)",m),p){if(s&&s.length>0){const e=u.statement(Object.assign(Object.assign({},s[0]),m));y.push(e)}}else if(c){if(s&&s.length>0){const e=u.choice(Object.assign(Object.assign({},s[0]),m));d.push(e)}}else if(g&&s&&s.length>0){const e=u.response(Object.assign(Object.assign({},s[0]),m));f.push(e)}}const h={};p?h.statements=y:c?h.choices=d:g&&(h.responses=f);return h}(e,t,r,s,d);o.statements&&f.push(...o.statements),o.choices&&m.push(...o.choices),o.responses&&h.push(...o.responses)}else if(n.Config.isOfBitType(t,a.BitType.highlightText)){const o=function(e,t,r,o,n){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("highlight content",n);const a=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,o,n),{trueFalse:s}=a,p=i(a,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("highlight TAGS",Object.assign({trueFalse:s},p));const c=[];if(s)for(const e of s)c.push(u.highlightText(Object.assign(Object.assign({},e),{isHighlighted:!1})));const g=u.highlight(Object.assign({texts:c},p));return g}(e,t,r,s,d);o&&g.push(o)}else{const o=function(e,t,r,o,n){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("select content",n);const a=e.bitContentProcessor(t,r,l.BitContentLevel.Chain,o,n),{trueFalse:s}=a,p=i(a,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("select TAGS",Object.assign({trueFalse:s},p));const c=[];if(s)for(const e of s)c.push(u.selectOption(e));const g=u.select(Object.assign({options:c},p));return g}(e,t,r,s,d);o&&g.push(o)}}(e,t,r,0,p,c,g,y)}},4020:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseTagContentProcessor=void 0;const i=r(9681),o=r(3029);t.trueFalseTagContentProcessor=function(e,t,r,n,a,s){const{type:l,value:u}=a,p=s.trueFalse;if(!p)return;const c=i.StringUtils.trimmedString(u);p.push({text:c,isCorrect:l===o.TypeKey.True,isDefaultExample:!1})}},5663:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JsonParser=void 0;const i=r(5809),o=r(5533),n=r(7735),a=r(2028),s=r(431),l=r(5854),u=r(4410),p=r(6149),c=r(385),g=r(9681),y=r(777),d=new i.Builder,f=new o.ResourceBuilder;t.JsonParser=class{constructor(){this.textGenerator=new s.TextGenerator,this.textParser=new y.TextParser}toAst(e){const t=this.preprocessJson(e),r=[];for(const e of t){const{bit:t,parser:i}=e,o=this.bitToAst(t,null==i?void 0:i.internalComments);o&&r.push(o)}const i=r.length>0?{bits:r}:{};return d.bitmark(i)}preprocessJson(e){const t=[];if(g.StringUtils.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 a.Config.getBitType(t.type)!==l.BitType._error}return!1}bitToBitWrapper(e){return{bit:e}}bitToAst(e,t){var r;const{type:i,originalType:o,format:n,id:s,externalId:u,spaceId:p,padletId:g,jupyterId:y,jupyterExecutionCount:f,isPublic:m,AIGenerated:h,analyticsTag:T,disableFeedback:b,releaseVersion:v,releaseKind:B,releaseDate:C,ageRange:P,lang:k,language:x,publisher:S,publisherName:K,theme:w,computerLanguage:A,target:_,tag:I,reductionTag:L,icon:O,iconTag:E,colorTag:R,flashcardSet:N,subtype:V,bookAlias:F,coverImage:j,coverColor:G,publications:D,author:M,date:U,location:J,kind:$,hasMarkAsDone:z,blockId:q,pageNo:H,x:W,y:Y,width:X,height:Z,index:Q,classification:ee,availableClassifications:te,tableFixedHeader:re,tableSearch:ie,tableSort:oe,tablePagination:ne,tablePaginationLimit:ae,tableHeight:se,tableWhitespaceNoWrap:le,tableAutoWidth:ue,tableResizableColumns:pe,quizCountItems:ce,quizStrikethroughSolutions:ge,codeLineNumbers:ye,codeMinimap:de,action:fe,thumbImage:me,scormSource:he,posterImage:Te,focusX:be,focusY:ve,pointerLeft:Be,pointerTop:Ce,backgroundWallpaper:Pe,hasBookNavigation:ke,duration:xe,deeplink:Se,externalLink:Ke,externalLinkText:we,videoCallLink:Ae,vendorUrl:_e,search:Ie,bot:Le,list:Oe,textReference:Ee,isTracked:Re,isInfoOnly:Ne,labelTrue:Ve,labelFalse:Fe,content2Buy:je,mailingList:Ge,buttonCaption:De,caption:Me,quotedPerson:Ue,reasonableNumOfChars:Je,resolved:$e,resolvedDate:ze,resolvedBy:qe,maxCreatedBits:He,maxDisplayLevel:We,productId:Ye,product:Xe,productVideo:Ze,productFolder:Qe,technicalTerm:et,servings:tt,ratingLevelStart:rt,ratingLevelEnd:it,ratingLevelSelected:ot,book:nt,title:at,subtitle:st,level:lt,toc:ut,progress:pt,anchor:ct,reference:gt,referenceEnd:yt,item:dt,lead:ft,pageNumber:mt,marginNumber:ht,hint:Tt,instruction:bt,example:vt,imageSource:Bt,person:Ct,partner:Pt,marks:kt,resource:xt,logos:St,images:Kt,body:wt,sampleSolution:At,elements:_t,statement:It,isCorrect:Lt,cards:Ot,statements:Et,responses:Rt,quizzes:Nt,heading:Vt,pairs:Ft,matrix:jt,table:Gt,choices:Dt,questions:Mt,ingredients:Ut,listItems:Jt,sections:$t,footer:zt,placeholders:qt}=e,Ht=i===l.BitType._comment&&void 0!==o,Wt=a.Config.getBitType(Ht?o:i),Yt=a.Config.getBitConfig(Wt),Xt=null!==(r=c.TextFormat.fromValue(n))&&void 0!==r?r:Yt.textFormatDefault,Zt=this.getResourceType(xt),Qt=this.resourceBitToAst(Wt,xt,null!=Kt?Kt:St),er=this.bodyToAst(wt,Xt,qt),tr=this.imageSourceBitToAst(Bt),rr=this.personBitToAst(null!=Ct?Ct:Pt),ir=this.markConfigBitToAst(kt),or=this.flashcardBitsToAst(Ot),nr=this.statementBitsToAst(It,Lt,Et,vt),ar=this.responseBitsToAst(Wt,Rt),sr=this.quizBitsToAst(Wt,Nt),lr=this.headingBitToAst(Vt),ur=this.pairBitsToAst(Ft),pr=this.matrixBitsToAst(jt),cr=this.tableToAst(Gt),gr=this.choiceBitsToAst(Dt),yr=this.questionBitsToAst(Mt),dr=this.botResponseBitsToAst(Wt,Rt),fr=this.technicalTermToAst(et),mr=this.servingsToAst(tt),hr=this.ingredientsBitsToAst(Ut),Tr=this.ratingLevelStartEndToAst(rt),br=this.ratingLevelStartEndToAst(it),vr=this.listItemsToAst(null!=Jt?Jt:$t,Xt,qt),Br=this.footerToAst(zt,Xt),{reference:Cr,referenceProperty:Pr}=this.referenceToAst(gt);return d.bit(Object.assign(Object.assign(Object.assign({bitType:Wt,textFormat:n,resourceType:Zt,isCommented:Ht,id:this.convertStringToBreakscapedString(s),internalComment:this.convertStringToBreakscapedString(t),externalId:this.convertStringToBreakscapedString(u),spaceId:this.convertStringToBreakscapedString(p),padletId:this.convertStringToBreakscapedString(g),jupyterId:this.convertStringToBreakscapedString(y),jupyterExecutionCount:f,isPublic:m,aiGenerated:h,analyticsTag:this.convertStringToBreakscapedString(T),disableFeedback:b,releaseVersion:this.convertStringToBreakscapedString(v),releaseKind:this.convertStringToBreakscapedString(B),releaseDate:this.convertStringToBreakscapedString(C),ageRange:P,lang:this.convertStringToBreakscapedString(k),language:this.convertStringToBreakscapedString(x),publisher:this.convertStringToBreakscapedString(S),publisherName:this.convertStringToBreakscapedString(K),theme:this.convertStringToBreakscapedString(w),computerLanguage:this.convertStringToBreakscapedString(A),target:this.convertStringToBreakscapedString(_),tag:this.convertStringToBreakscapedString(I),reductionTag:this.convertStringToBreakscapedString(L),icon:this.convertStringToBreakscapedString(O),iconTag:this.convertStringToBreakscapedString(E),colorTag:this.convertStringToBreakscapedString(R),flashcardSet:this.convertStringToBreakscapedString(N),subtype:this.convertStringToBreakscapedString(V),bookAlias:this.convertStringToBreakscapedString(F),coverImage:this.convertStringToBreakscapedString(j),coverColor:this.convertStringToBreakscapedString(G),publications:this.convertStringToBreakscapedString(D),author:this.convertStringToBreakscapedString(M),date:this.convertStringToBreakscapedString(U),location:this.convertStringToBreakscapedString(J),kind:this.convertStringToBreakscapedString($),hasMarkAsDone:z,action:this.convertStringToBreakscapedString(fe),blockId:this.convertStringToBreakscapedString(q),pageNo:H,x:W,y:Y,width:X,height:Z,index:Q,classification:this.convertStringToBreakscapedString(ee),availableClassifications:this.convertStringToBreakscapedString(te),tableFixedHeader:re,tableSearch:ie,tableSort:oe,tablePagination:ne,tablePaginationLimit:ae,tableHeight:se,tableWhitespaceNoWrap:le,tableAutoWidth:ue,tableResizableColumns:pe,quizCountItems:ce,quizStrikethroughSolutions:ge,codeLineNumbers:ye,codeMinimap:de,duration:this.convertStringToBreakscapedString(xe),referenceProperty:this.convertStringToBreakscapedString(Pr),thumbImage:this.convertStringToBreakscapedString(me),scormSource:this.convertStringToBreakscapedString(he),posterImage:this.convertStringToBreakscapedString(Te),focusX:be,focusY:ve,pointerLeft:this.convertStringToBreakscapedString(Be),pointerTop:this.convertStringToBreakscapedString(Ce),backgroundWallpaper:this.convertStringToBreakscapedString(Pe),hasBookNavigation:ke,deeplink:this.convertStringToBreakscapedString(Se),externalLink:this.convertStringToBreakscapedString(Ke),externalLinkText:this.convertStringToBreakscapedString(we),videoCallLink:this.convertStringToBreakscapedString(Ae),vendorUrl:this.convertStringToBreakscapedString(_e),search:this.convertStringToBreakscapedString(Ie),bot:this.convertStringToBreakscapedString(Le),list:this.convertStringToBreakscapedString(Oe),textReference:this.convertStringToBreakscapedString(Ee),isTracked:Re,isInfoOnly:Ne,labelTrue:this.convertStringToBreakscapedString(Ve),labelFalse:this.convertStringToBreakscapedString(Fe),content2Buy:this.convertStringToBreakscapedString(je),mailingList:this.convertStringToBreakscapedString(Ge),buttonCaption:this.convertStringToBreakscapedString(De),caption:this.convertJsonTextToBreakscapedString(Me),quotedPerson:this.convertStringToBreakscapedString(Ue),reasonableNumOfChars:Je,resolved:$e,resolvedDate:this.convertStringToBreakscapedString(ze),resolvedBy:this.convertStringToBreakscapedString(qe),maxCreatedBits:He,maxDisplayLevel:We,productId:this.convertStringToBreakscapedString(Ye),productList:this.convertStringToBreakscapedString(Xe),productVideoList:this.convertStringToBreakscapedString(Ze),productFolder:this.convertStringToBreakscapedString(Qe),technicalTerm:fr,servings:mr,ratingLevelStart:Tr,ratingLevelEnd:br,ratingLevelSelected:ot,book:this.convertStringToBreakscapedString(nt),title:this.convertJsonTextToBreakscapedString(at),subtitle:this.convertJsonTextToBreakscapedString(st),level:lt,toc:ut,progress:pt,anchor:this.convertStringToBreakscapedString(ct),reference:this.convertStringToBreakscapedString(Cr),referenceEnd:this.convertStringToBreakscapedString(yt)},this.parseItemLeadHintInstruction(dt,ft,mt,ht,Tt,bt)),this.parseExample(vt)),{imageSource:tr,person:rr,markConfig:ir,resources:Qt,body:er,sampleSolution:this.convertStringToBreakscapedString(At),elements:this.convertStringToBreakscapedString(_t),flashcards:or,statements:nr,responses:ar,quizzes:sr,heading:lr,pairs:ur,matrix:pr,table:cr,choices:gr,questions:yr,botResponses:dr,ingredients:hr,cardBits:vr,footer:Br}))}imageSourceBitToAst(e){var t,r;let i;if(e){const{url:o,mockupId:a,format:s,size:l,trim:u}=e;i=d.imageSource({url:null!==(t=this.convertStringToBreakscapedString(o))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,mockupId:null!==(r=this.convertStringToBreakscapedString(a))&&void 0!==r?r:n.Breakscape.EMPTY_STRING,format:this.convertStringToBreakscapedString(s),size:l,trim:u})}return i}personBitToAst(e){var t;let r;if(e){const i=this.resourceDataToAst(p.ResourceTag.image,e.avatarImage);r=d.person({name:null!==(t=this.convertStringToBreakscapedString(e.name))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,title:this.convertStringToBreakscapedString(e.title),avatarImage:i})}return r}markConfigBitToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{mark:e,color:o,emphasis:a}=i,s=d.markConfig({mark:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,color:this.convertStringToBreakscapedString(o),emphasis:this.convertStringToBreakscapedString(a)});r.push(s)}if(0!==r.length)return r}flashcardBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{question:e,answer:o,alternativeAnswers:a,item:s,lead:l,pageNumber:u,marginNumber:p,hint:c,instruction:g,example:y}=i,f=d.flashcard(Object.assign(Object.assign({question:null!==(t=this.convertJsonTextToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,answer:this.convertJsonTextToBreakscapedString(o),alternativeAnswers:this.convertJsonTextToBreakscapedString(a)},this.parseItemLeadHintInstruction(s,l,u,p,c,g)),this.parseExample(y)));r.push(f)}if(0!==r.length)return r}statementBitsToAst(e,t,r,i){var o,a;const s=[];if(e){const r=d.statement(Object.assign({text:null!==(o=this.convertStringToBreakscapedString(e))&&void 0!==o?o:n.Breakscape.EMPTY_STRING,isCorrect:null!=t&&t},this.parseExample(i)));s.push(r)}if(Array.isArray(r))for(const e of r){const{statement:t,isCorrect:r,item:i,lead:o,pageNumber:l,marginNumber:u,hint:p,instruction:c,example:g}=e,y=d.statement(Object.assign(Object.assign({text:null!==(a=this.convertStringToBreakscapedString(t))&&void 0!==a?a:n.Breakscape.EMPTY_STRING,isCorrect:r},this.parseItemLeadHintInstruction(i,o,l,u,p,c)),this.parseExample(g)));s.push(y)}if(0!==s.length)return s}choiceBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{choice:e,isCorrect:o,item:a,lead:s,pageNumber:l,marginNumber:u,hint:p,instruction:c,example:g}=i,y=d.choice(Object.assign(Object.assign({text:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,isCorrect:o},this.parseItemLeadHintInstruction(a,s,l,u,p,c)),this.parseExample(g)));r.push(y)}if(0!==r.length)return r}responseBitsToAst(e,t){var r;const i=[];if(!a.Config.isOfBitType(e,l.BitType.botActionResponse)){if(Array.isArray(t))for(const e of t){const{response:t,isCorrect:o,item:a,lead:s,pageNumber:l,marginNumber:u,hint:p,instruction:c,example:g}=e,y=d.response(Object.assign(Object.assign({text:null!==(r=this.convertStringToBreakscapedString(t))&&void 0!==r?r:n.Breakscape.EMPTY_STRING,isCorrect:o},this.parseItemLeadHintInstruction(a,s,l,u,p,c)),this.parseExample(g)));i.push(y)}if(0!==i.length)return i}}selectOptionBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{text:e,isCorrect:o,item:a,lead:s,pageNumber:l,marginNumber:u,hint:p,instruction:c,example:g}=i,y=d.selectOption(Object.assign(Object.assign({text:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,isCorrect:o},this.parseItemLeadHintInstruction(a,s,l,u,p,c)),this.parseExample(g)));r.push(y)}return r}highlightTextBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{text:e,isCorrect:o,isHighlighted:a,item:s,lead:l,pageNumber:u,marginNumber:p,hint:c,instruction:g,example:y}=i,f=d.highlightText(Object.assign(Object.assign({text:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,isCorrect:o,isHighlighted:a},this.parseItemLeadHintInstruction(s,l,u,p,c,g)),this.parseExample(y)));r.push(f)}return r}quizBitsToAst(e,t){const r=[];if(Array.isArray(t))for(const i of t){const{item:t,lead:o,pageNumber:n,marginNumber:a,hint:s,instruction:l,choices:u,responses:p}=i,c=this.choiceBitsToAst(u),g=this.responseBitsToAst(e,p),y=d.quiz(Object.assign(Object.assign({},this.parseItemLeadHintInstruction(t,o,n,a,s,l)),{choices:c,responses:g}));r.push(y)}if(0!==r.length)return r}headingBitToAst(e){var t,r;let i;return e&&Object.keys(e).length>0&&(i=d.heading({forKeys:null!==(t=this.convertStringToBreakscapedString(e.forKeys))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,forValues:null!==(r=this.convertStringToBreakscapedString(e.forValues))&&void 0!==r?r:[]})),i}pairBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{key:e,keyAudio:o,keyImage:n,values:a,item:s,lead:l,pageNumber:u,marginNumber:c,hint:g,instruction:y,example:f,isCaseSensitive:m}=i,h=this.resourceDataToAst(p.ResourceTag.audio,o),T=this.resourceDataToAst(p.ResourceTag.image,n),b=d.pair(Object.assign(Object.assign(Object.assign({key:this.convertStringToBreakscapedString(e),keyAudio:h,keyImage:T,values:null!==(t=this.convertStringToBreakscapedString(a))&&void 0!==t?t:[]},this.parseItemLeadHintInstruction(s,l,u,c,g,y)),this.parseExample(f)),{isCaseSensitive:m}));r.push(b)}if(0!==r.length)return r}matrixBitsToAst(e){var t,r;const i=[];if(Array.isArray(e))for(const o of e){const{key:e,cells:a,item:s,lead:l,pageNumber:u,marginNumber:p,hint:c,instruction:g,example:y}=o,f=d.matrix(Object.assign(Object.assign({key:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,cells:null!==(r=this.matrixCellsToAst(a))&&void 0!==r?r:[]},this.parseItemLeadHintInstruction(s,l,u,p,c,g)),this.parseExample(y)));i.push(f)}if(0!==i.length)return i}matrixCellsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{values:e,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,isCaseSensitive:p,example:c}=i,g=d.matrixCell(Object.assign(Object.assign(Object.assign({values:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:[]},this.parseItemLeadHintInstruction(o,n,a,s,l,u)),{isCaseSensitive:p}),this.parseExample(c)));r.push(g)}if(0!==r.length)return r}tableToAst(e){var t,r;let i;if(e){const{columns:o,data:n}=e;i=d.table({columns:null!==(t=this.convertStringToBreakscapedString(o))&&void 0!==t?t:[],rows:n&&null!==(r=n.map((e=>{var t;return null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:[]})))&&void 0!==r?r:[]})}return i}questionBitsToAst(e){var t;const r=[];if(Array.isArray(e))for(const i of e){const{question:e,partialAnswer:o,sampleSolution:a,item:s,lead:l,pageNumber:u,marginNumber:p,hint:c,instruction:g,example:y,reasonableNumOfChars:f}=i,m=d.question(Object.assign(Object.assign(Object.assign({question:null!==(t=this.convertStringToBreakscapedString(e))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,partialAnswer:this.convertStringToBreakscapedString(o),sampleSolution:this.convertStringToBreakscapedString(a)},this.parseItemLeadHintInstruction(s,l,u,p,c,g)),this.parseExample(y)),{reasonableNumOfChars:f}));r.push(m)}if(0!==r.length)return r}botResponseBitsToAst(e,t){var r,i,o;const s=[];if(a.Config.isOfBitType(e,l.BitType.botActionResponse)){if(Array.isArray(t))for(const e of t){const{response:t,reaction:a,feedback:l,item:u,lead:p,pageNumber:c,marginNumber:g,hint:y}=e,f=d.botResponse(Object.assign({response:null!==(r=this.convertStringToBreakscapedString(t))&&void 0!==r?r:n.Breakscape.EMPTY_STRING,reaction:null!==(i=this.convertStringToBreakscapedString(a))&&void 0!==i?i:n.Breakscape.EMPTY_STRING,feedback:null!==(o=this.convertStringToBreakscapedString(l))&&void 0!==o?o:n.Breakscape.EMPTY_STRING},this.parseItemLeadHintInstruction(u,p,c,g,y,n.Breakscape.EMPTY_STRING)));s.push(f)}if(0!==s.length)return s}}technicalTermToAst(e){var t,r;let i;if(e){const{technicalTerm:o,lang:a}=e;i=d.technicalTerm({technicalTerm:null!==(t=this.convertStringToBreakscapedString(o))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,lang:null!==(r=this.convertStringToBreakscapedString(a))&&void 0!==r?r:n.Breakscape.EMPTY_STRING})}return i}servingsToAst(e){var t,r,i;let o;if(e){const{servings:a,unit:s,unitAbbr:l,decimalPlaces:u,disableCalculation:p,hint:c}=e;o=d.servings({servings:a,unit:null!==(t=this.convertStringToBreakscapedString(s))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,unitAbbr:null!==(r=this.convertStringToBreakscapedString(l))&&void 0!==r?r:n.Breakscape.EMPTY_STRING,decimalPlaces:null!=u?u:1,disableCalculation:null!=p&&p,hint:null!==(i=this.convertStringToBreakscapedString(c))&&void 0!==i?i:n.Breakscape.EMPTY_STRING})}return o}ingredientsBitsToAst(e){var t,r;const i=[];if(Array.isArray(e))for(const o of e){const{title:e,checked:a,item:s,quantity:l,unit:u,unitAbbr:p,decimalPlaces:c,disableCalculation:g}=o,y=d.ingredient({title:this.convertStringToBreakscapedString(e),checked:a,item:null!==(t=this.convertStringToBreakscapedString(s))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,quantity:l,unit:null!==(r=this.convertStringToBreakscapedString(u))&&void 0!==r?r:n.Breakscape.EMPTY_STRING,unitAbbr:this.convertStringToBreakscapedString(p),decimalPlaces:null!=c?c:1,disableCalculation:g});i.push(y)}if(0!==i.length)return i}ratingLevelStartEndToAst(e){var t;let r;if(e){const{level:i,label:o}=e;r=d.ratingLevelStartEnd({level:i,label:null!==(t=this.convertJsonTextToBreakscapedString(o))&&void 0!==t?t:n.Breakscape.EMPTY_STRING})}return r}listItemsToAst(e,t,r){const i=[];if(Array.isArray(e))for(const o of e){const{item:e,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,body:p}=o,c=d.cardBit(Object.assign(Object.assign({},this.parseItemLeadHintInstruction(e,n,a,s,l,u)),{body:this.bodyToAst(p,t,r)}));c&&i.push(c)}if(0!==i.length)return i}getResourceType(e){if(e){return p.ResourceTag.fromValue(e.type)}}resourceBitToAst(e,t,r){var i;const o=[];if(t){const e=null!==(i=p.ResourceTag.keyFromValue(t.type))&&void 0!==i?i:p.ResourceTag.unknown;let r;if(t.type===p.ResourceTag.imageResponsive){const e=t,r=this.resourceDataToAst(p.ResourceTag.imagePortrait,e.imagePortrait),i=this.resourceDataToAst(p.ResourceTag.imageLandscape,e.imageLandscape);r&&o.push(r),i&&o.push(i)}else if(t.type===p.ResourceTag.stillImageFilm){const e=t,r=this.resourceDataToAst(p.ResourceTag.image,e.image),i=this.resourceDataToAst(p.ResourceTag.audio,e.audio);r&&o.push(r),i&&o.push(i)}else{if(r=t[e],!r)return;const i=this.resourceDataToAst(t.type,r);i&&o.push(i)}}if(a.Config.isOfBitType(e,[l.BitType.imagesLogoGrave,l.BitType.prototypeImages])&&Array.isArray(r))for(const e of r){const t=this.resourceDataToAst(p.ResourceTag.image,e.image);t&&o.push(t)}return o}resourceDataToAst(e,t){var r,i;let o;if(t){if(!t)return;const n=g.StringUtils.isString(t)?t:void 0,a=t.url||t.src||t.href||t.app||t.body||n,s=this.resourceDataToAst(p.ResourceTag.image,t.posterImage),l=t.thumbnails?t.thumbnails.map((e=>this.resourceDataToAst(p.ResourceTag.image,e))):void 0;o=f.resource({type:e,value:this.convertStringToBreakscapedString(a),format:this.convertStringToBreakscapedString(t.format),src1x:this.convertStringToBreakscapedString(t.src1x),src2x:this.convertStringToBreakscapedString(t.src2x),src3x:this.convertStringToBreakscapedString(t.src3x),src4x:this.convertStringToBreakscapedString(t.src4x),caption:this.convertJsonTextToBreakscapedString(t.caption),width:null!==(r=t.width)&&void 0!==r?r:void 0,height:null!==(i=t.height)&&void 0!==i?i:void 0,alt:this.convertStringToBreakscapedString(t.alt),zoomDisabled:t.zoomDisabled,duration:t.duration,mute:t.mute,autoplay:t.autoplay,allowSubtitles:t.allowSubtitles,showSubtitles:t.showSubtitles,posterImage:s,thumbnails:l,siteName:this.convertStringToBreakscapedString(t.siteName),license:this.convertStringToBreakscapedString(t.license),copyright:this.convertStringToBreakscapedString(t.copyright),showInIndex:t.showInIndex})}return o}bodyToAst(e,t,r){let i,o;const n={};if(t===c.TextFormat.json){let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t=null}i=d.body({bodyJson:t})}else{if(Array.isArray(e)?(o=this.convertJsonTextToBreakscapedString(e,t),r=this.textGenerator.getPlaceholders()):o=e,r)for(const[e,t]of Object.entries(r)){const r=this.bodyBitToAst(t);n[e]=r}if(o){const e=[],t=g.StringUtils.splitPlaceholders(o,Object.keys(n));for(let r=0,i=t.length;r<i;r++){const i=t[r];if(n[i])e.push(n[i]);else{const t=this.bodyTextToAst(i);e.push(t)}}i=d.body({bodyParts:e})}}return i}bodyTextToAst(e){return d.bodyText({text:null!=e?e:n.Breakscape.EMPTY_STRING})}bodyBitToAst(e){switch(e.type){case u.BodyBitType.gap:return this.gapBitToAst(e);case u.BodyBitType.mark:return this.markBitToAst(e);case u.BodyBitType.select:return this.selectBitToAst(e);case u.BodyBitType.highlight:return this.highlightBitToAst(e)}return this.bodyTextToAst(n.Breakscape.EMPTY_STRING)}footerToAst(e,t){const r=this.convertJsonTextToBreakscapedString(e,t);if(r)return d.footerText({text:r})}referenceToAst(e){return Array.isArray(e)&&e.length>0?{reference:void 0,referenceProperty:e}:{reference:e,referenceProperty:void 0}}gapBitToAst(e){var t;const{item:r,lead:i,pageNumber:o,marginNumber:n,hint:a,instruction:s,example:l,isCaseSensitive:u,solutions:p}=e;return d.gap(Object.assign(Object.assign(Object.assign({solutions:null!==(t=this.convertStringToBreakscapedString(p))&&void 0!==t?t:[]},this.parseItemLeadHintInstruction(r,i,o,n,a,s)),this.parseExample(l)),{isCaseSensitive:u}))}markBitToAst(e){var t;const{solution:r,mark:i,item:o,lead:a,pageNumber:s,marginNumber:l,hint:u,instruction:p,example:c}=e;return d.mark(Object.assign(Object.assign({solution:null!==(t=this.convertStringToBreakscapedString(r))&&void 0!==t?t:n.Breakscape.EMPTY_STRING,mark:this.convertStringToBreakscapedString(i)},this.parseItemLeadHintInstruction(o,a,s,l,u,p)),this.parseExample(c)))}selectBitToAst(e){const{options:t,prefix:r,postfix:i,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,example:p}=e,c=this.selectOptionBitsToAst(t);return d.select(Object.assign(Object.assign({options:c,prefix:this.convertStringToBreakscapedString(r),postfix:this.convertStringToBreakscapedString(i)},this.parseItemLeadHintInstruction(o,n,a,s,l,u)),this.parseExample(p)))}highlightBitToAst(e){const{texts:t,prefix:r,postfix:i,item:o,lead:n,pageNumber:a,marginNumber:s,hint:l,instruction:u,example:p}=e,c=this.highlightTextBitsToAst(t);return d.highlight(Object.assign(Object.assign({texts:c,prefix:this.convertStringToBreakscapedString(r),postfix:this.convertStringToBreakscapedString(i)},this.parseItemLeadHintInstruction(o,n,a,s,l,u)),this.parseExample(p)))}parseItemLeadHintInstruction(e,t,r,i,o,n){return{item:this.convertJsonTextToBreakscapedString(e),lead:this.convertJsonTextToBreakscapedString(t),pageNumber:this.convertJsonTextToBreakscapedString(r),marginNumber:this.convertJsonTextToBreakscapedString(i),hint:this.convertJsonTextToBreakscapedString(o),instruction:this.convertJsonTextToBreakscapedString(n)}}parseExample(e){if(null==e)return;const t=this.convertJsonTextToBreakscapedString(e);return t?{example:t}:{example:!!e}}convertJsonTextToBreakscapedString(e,t){if(t=null!=t?t:c.TextFormat.bitmarkMinusMinus,null!=e){if(this.textParser.isAst(e)){return this.textGenerator.generateSync(e,t)}if(Array.isArray(e)){const r=[];for(let i=0,o=e.length;i<o;i++){const o=e[i];if(this.textParser.isAst(o)){const e=this.textGenerator.generateSync(o,t);r[i]=e}else r[i]=o}return r}return e}}convertStringToBreakscapedString(e){if(null!=e){if(Array.isArray(e)){const t=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];t[r]=n.Breakscape.breakscape(i)}return t}return n.Breakscape.breakscape(e)}}}},777:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;const i=r(385),o=r(9681),n=r(2220);t.TextParser=class{version(){return(0,n.parse)("",{startRule:"version"})}preprocessAst(e){if(o.StringUtils.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){var r;if(Array.isArray(e))return e;const o=null!==(r=e)&&void 0!==r?r:"";if(!o)return[];const a=Object.assign({},t);a.textFormat||(a.textFormat=i.TextFormat.bitmarkMinusMinus);const s=a.textFormat===i.TextFormat.bitmarkPlusPlus?"bitmarkPlusPlus":"bitmarkMinusMinus";return(0,n.parse)(o,{startRule:s})}}},2220:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const i=r(8321).parse;t.parse=i},6989:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayUtils=void 0;const r=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}};t.ArrayUtils=r},8903:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitUtils=void 0;const i=r(4078);const o=new class{fillStringExample(e,t,r,i){if(e){Array.isArray(e)||(e=[e]);for(const o of e)if(!o.isExample&&(t?(o.isDefaultExample=!0,o.isExample=!0):(o.isDefaultExample=!1,o.example=r),i))break}}fillBooleanExample(e,t,r,o){if(e){Array.isArray(e)||(e=[e]);for(const n of e)if(!n.isExample&&(!o||n.isCorrect)&&(t?(n.isDefaultExample=!0,n.isExample=!0):(n.isDefaultExample=!1,n.example=i.BooleanUtils.toBoolean(r)),o))break}}};t.BitUtils=o},4078:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanUtils=void 0;const r=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}};t.BooleanUtils=r},8025:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NumberUtils=void 0;const r=new class{asNumber(e,t){if(null==e)return null!=t?t:void 0;const r=+e;return Number.isNaN(r)||!isFinite(r)?null!=t?t:void 0:r}isNumeric(e){if(null==e)return!1;const t=+e;return!Number.isNaN(t)&&isFinite(t)}};t.NumberUtils=r},955:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;const o=i(r(7678));const n=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)}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[n,a]of Object.entries(i)){const i=r(a);void 0!==t[n]&&r(t[n])===i&&["array","object"].includes(i)?t[n]=e(t[n],a):t[n]=(0,o.default)(a)}}let n=(0,o.default)(t.shift());for(const e of t){const t=r(e);r(n)===t?"array"===t?n=[...n,...(0,o.default)(e)]:"object"===t?i(n,e):n=e:n=(0,o.default)(e)}return n}(...e)}};t.ObjectUtils=n},9681:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtils=void 0;const r=new class{isString(e){return"string"==typeof e||e instanceof String}string(e){return e?`${e}`:""}trimmedString(e){return this.string(e).trim()}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 n=e[i],a=i===o-1;r.push(n),a||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 n,a=0;for(;a<o;){let i;const o=a+t,s=e.indexOf("\n",a);if(s>-1&&s>a&&s<o){i=s-a,n=e.substr(a,i),a=a+i+1,r.push(n);continue}const l=e.lastIndexOf(" ",o);let u=0;l>-1&&l!=a-1?(i=l-a,i>0&&(u=a+i+1)):(i=t,u=a+t),n=e.substr(a,i),a=u,r.push(n.trim())}return a<i&&(n=e.substr(a),r.push(n)),r}};t.StringUtils=r},201:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtils=void 0;const r=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}};t.UrlUtils=r},6936:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initEnv=t.env=void 0;const i=r(6278),o=r(9561),n=r(2287),a=r(5659);const s=new class{constructor(){Object.defineProperty(this,"userAgentInfo",{value:(0,a.parseUserAgent)(),enumerable:!1}),this.bootTimestamp=Date.now(),this.app="",this.appVersion=n.EMPTY_VERSION,this.environment=this.getEnvironment(),this.environmentVersion=this.getEnvironmentVersion(),this.isBrowser=this.getIsBrowser(),this.isNode=this.environment===i.Environment.node,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?i.Environment.node:i.Environment.unknown}getEnvironmentVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.browserVersion):"undefined"!=typeof process?this.parseMMBVersion(process.version):n.EMPTY_VERSION}getOs(){return this.userAgentInfo?this.userAgentInfo.os:("undefined"!=typeof process&&void 0!==process.versions&&process.versions.node,o.Os.unknown)}getOsVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.osVersion):"undefined"!=typeof process?this.parseMMBVersion(""):n.EMPTY_VERSION}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 n.EMPTY_VERSION;e.startsWith("v")&&(e=e.substring(1));const t=e.split(".",1e3);let r="",i="",o="",a="";for(let e=0,n=t.length;e<n;e++){const n=t[e];0===e?r=n:1===e?i=n:2===e?a=n:3===e&&(o=n)}return{full:e,major:r,minor:i,patch:a,build:o}}};t.env=s;const l=s.init.bind(s);t.initEnv=l},6278:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;const i=(0,r(4718).superenum)({unknown:"",node:"node",chrome:"chrome",safari:"safari",firefox:"firefox",edge:"edge",ie:"ie"});t.Environment=i},9561:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Os=void 0;const i=(0,r(4718).superenum)({unknown:"",macos:"macos",windows:"windows",linux:"linux",android:"android",ios:"ios"});t.Os=i},2287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_VERSION=void 0;t.EMPTY_VERSION={full:"",major:"",minor:"",patch:"",build:""}},5659:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUserAgent=void 0;const i=r(6278),o=r(9561);t.parseUserAgent=function(){if("undefined"==typeof window||!window.navigator||!window.navigator.userAgent)return;const e={browser:i.Environment.unknown,os:o.Os.unknown},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 n=!1;for(let e=0;e<=9;e++)if(o.startsWith(`${e}`)){n=!0;break}n?r.versions[i]=o.replace("_","."):r.keys.add(o),i=o}return r}(window.navigator.userAgent),r=t.keys.has("firefox"),n=t.keys.has("chrome"),a=t.keys.has("chromium"),s=t.keys.has("safari"),l=n,u=r,p=t.keys.has("macintosh");return s&&!n&&!a?(e.browser=i.Environment.safari,e.browserVersion=t.versions.version):l?(e.browser=i.Environment.chrome,e.browserVersion=t.versions.chrome):u&&(e.browser=i.Environment.firefox,e.browserVersion=t.versions.firefox),p&&(e.os=o.Os.macos,e.osVersion=t.versions.x),e}},5005:(e,t,r)=>{const{VOID:i,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:u,SET:p,ERROR:c,BIGINT:g}=r(1731),y="object"==typeof self?self:globalThis;t.deserialize=e=>((e,t)=>{const r=(t,r)=>(e.set(r,t),t),d=f=>{if(e.has(f))return e.get(f);const[m,h]=t[f];switch(m){case o:case i:return r(h,f);case n:{const e=r([],f);for(const t of h)e.push(d(t));return e}case a:{const e=r({},f);for(const[t,r]of h)e[d(t)]=d(r);return e}case s:return r(new Date(h),f);case l:{const{source:e,flags:t}=h;return r(new RegExp(e,t),f)}case u:{const e=r(new Map,f);for(const[t,r]of h)e.set(d(t),d(r));return e}case p:{const e=r(new Set,f);for(const t of h)e.add(d(t));return e}case c:{const{name:e,message:t}=h;return r(new y[e](t),f)}case g:return r(BigInt(h),f);case"BigInt":return r(Object(BigInt(h)),f)}return r(new y[m](h),f)};return d})(new Map,e)(0)},7678:(e,t,r)=>{const{deserialize:i}=r(5005),{serialize:o}=r(5416);Object.defineProperty(t,"__esModule",{value:!0}).default="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?i(o(e,t)):structuredClone(e):(e,t)=>i(o(e,t)),t.deserialize=i,t.serialize=o},5416:(e,t,r)=>{const{VOID:i,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:u,SET:p,ERROR:c,BIGINT:g}=r(1731),y="",{toString:d}={},{keys:f}=Object,m=e=>{const t=typeof e;if("object"!==t||!e)return[o,t];const r=d.call(e).slice(8,-1);switch(r){case"Array":return[n,y];case"Object":return[a,y];case"Date":return[s,y];case"RegExp":return[l,y];case"Map":return[u,y];case"Set":return[p,y]}return r.includes("Array")?[n,r]:r.includes("Error")?[c,r]:[a,r]},h=([e,t])=>e===o&&("function"===t||"symbol"===t);t.serialize=(e,{json:t,lossy:r}={})=>{const c=[];return((e,t,r,c)=>{const y=(e,t)=>{const i=c.push(e)-1;return r.set(t,i),i},d=c=>{if(r.has(c))return r.get(c);let[T,b]=m(c);switch(T){case o:{let t=c;switch(b){case"bigint":T=g,t=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+b);t=null;break;case"undefined":return y([i],c)}return y([T,t],c)}case n:{if(b)return y([b,[...c]],c);const e=[],t=y([T,e],c);for(const t of c)e.push(d(t));return t}case a:{if(b)switch(b){case"BigInt":return y([b,c.toString()],c);case"Boolean":case"Number":case"String":return y([b,c.valueOf()],c)}if(t&&"toJSON"in c)return d(c.toJSON());const r=[],i=y([T,r],c);for(const t of f(c))!e&&h(m(c[t]))||r.push([d(t),d(c[t])]);return i}case s:return y([T,c.toISOString()],c);case l:{const{source:e,flags:t}=c;return y([T,{source:e,flags:t}],c)}case u:{const t=[],r=y([T,t],c);for(const[r,i]of c)(e||!h(m(r))&&!h(m(i)))&&t.push([d(r),d(i)]);return r}case p:{const t=[],r=y([T,t],c);for(const r of c)!e&&h(m(r))||t.push(d(r));return r}}const{message:v}=c;return y([T,{name:b,message:v}],c)};return d})(!(t||r),!!t,new Map,c)(e),c}},1731:(e,t)=>{t.VOID=-1;t.PRIMITIVE=0;t.ARRAY=1;t.OBJECT=2;t.DATE=3;t.REGEXP=4;t.MAP=5;t.SET=6;t.ERROR=7;t.BIGINT=8}},t={};function r(i){var o=t[i];if(void 0!==o)return o.exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,r),n.exports}r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.StreamWriter=e.FileWriter=e.BitmarkFileGenerator=e.JsonFileGenerator=e.InfoFormat=e.InfoType=e.CardSetVersion=e.BitmarkVersion=e.BitmarkParserType=e.NodeType=e.ResourceTag=e.TextFormat=e.BitType=e.StringWriter=e.BitmarkStringGenerator=e.BitmarkGenerator=e.BitmarkParser=e.JsonStringGenerator=e.JsonGenerator=e.JsonParser=e.Ast=e.ResourceBuilder=e.Builder=e.Output=e.BitmarkParserGenerator=void 0;const t=r(1412);var o=r(1791);Object.defineProperty(e,"BitmarkParserGenerator",{enumerable:!0,get:function(){return o.BitmarkParserGenerator}}),Object.defineProperty(e,"Output",{enumerable:!0,get:function(){return o.Output}});var n=r(5809);Object.defineProperty(e,"Builder",{enumerable:!0,get:function(){return n.Builder}});var a=r(5533);Object.defineProperty(e,"ResourceBuilder",{enumerable:!0,get:function(){return a.ResourceBuilder}});var s=r(5126);Object.defineProperty(e,"Ast",{enumerable:!0,get:function(){return s.Ast}});var l=r(5663);Object.defineProperty(e,"JsonParser",{enumerable:!0,get:function(){return l.JsonParser}});var u=r(2497);Object.defineProperty(e,"JsonGenerator",{enumerable:!0,get:function(){return u.JsonGenerator}});var p=r(98);Object.defineProperty(e,"JsonStringGenerator",{enumerable:!0,get:function(){return p.JsonStringGenerator}});var c=r(5633);Object.defineProperty(e,"BitmarkParser",{enumerable:!0,get:function(){return c.BitmarkParser}});var g=r(5087);Object.defineProperty(e,"BitmarkGenerator",{enumerable:!0,get:function(){return g.BitmarkGenerator}});var y=r(3968);Object.defineProperty(e,"BitmarkStringGenerator",{enumerable:!0,get:function(){return y.BitmarkStringGenerator}});var d=r(6772);Object.defineProperty(e,"StringWriter",{enumerable:!0,get:function(){return d.StringWriter}});var f=r(5854);Object.defineProperty(e,"BitType",{enumerable:!0,get:function(){return f.BitType}});var m=r(385);Object.defineProperty(e,"TextFormat",{enumerable:!0,get:function(){return m.TextFormat}});var h=r(6149);Object.defineProperty(e,"ResourceTag",{enumerable:!0,get:function(){return h.ResourceTag}});var T=r(126);Object.defineProperty(e,"NodeType",{enumerable:!0,get:function(){return T.NodeType}});var b=r(8588);Object.defineProperty(e,"BitmarkParserType",{enumerable:!0,get:function(){return b.BitmarkParserType}});var v=r(3811);Object.defineProperty(e,"BitmarkVersion",{enumerable:!0,get:function(){return v.BitmarkVersion}});var B=r(1163);Object.defineProperty(e,"CardSetVersion",{enumerable:!0,get:function(){return B.CardSetVersion}});var C=r(486);Object.defineProperty(e,"InfoType",{enumerable:!0,get:function(){return C.InfoType}});var P=r(3069);Object.defineProperty(e,"InfoFormat",{enumerable:!0,get:function(){return P.InfoFormat}});(0,t.init)()})(),i})()));
|