@livepreso/api 6.56.1 → 6.57.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/.rush/temp/chunked-rush-logs/api.build.chunks.jsonl +5 -15
  2. package/.rush/temp/operation/build/all.log +5 -15
  3. package/.rush/temp/operation/build/error.log +3 -13
  4. package/.rush/temp/operation/build/log-chunks.jsonl +5 -15
  5. package/.rush/temp/operation/build/state.json +1 -1
  6. package/CHANGELOG.json +35 -0
  7. package/CHANGELOG.md +17 -1
  8. package/cjs/collections/adjunct-sub-slides.js +13 -1
  9. package/cjs/collections/adjunct-sub-slides.js.map +1 -1
  10. package/cjs/fixtures.js +13 -2
  11. package/cjs/fixtures.js.map +1 -1
  12. package/cjs/models/base.js +12 -3
  13. package/cjs/models/base.js.map +1 -1
  14. package/cjs/models/deck-version.js +2 -0
  15. package/cjs/models/deck-version.js.map +1 -1
  16. package/cjs/models/dispatch-preview.js +0 -2
  17. package/cjs/models/dispatch-preview.js.map +1 -1
  18. package/cjs/models/dispatch.js +1 -1
  19. package/cjs/models/dispatch.js.map +1 -1
  20. package/cjs/models/manifest-json.js +0 -2
  21. package/cjs/models/manifest-json.js.map +1 -1
  22. package/cjs/models/room.js +4 -0
  23. package/cjs/models/room.js.map +1 -1
  24. package/cjs/models/user.js +1 -1
  25. package/cjs/models/user.js.map +1 -1
  26. package/cjs/presentation/base-presentation-model.js +6 -6
  27. package/cjs/presentation/base-presentation-model.js.map +1 -1
  28. package/cjs/presentation/presentation-deck.js +82 -27
  29. package/cjs/presentation/presentation-deck.js.map +1 -1
  30. package/cjs/presentation/presentation-section.js +42 -47
  31. package/cjs/presentation/presentation-section.js.map +1 -1
  32. package/cjs/presentation/presentation-slide.js +35 -39
  33. package/cjs/presentation/presentation-slide.js.map +1 -1
  34. package/cjs/sync.js +3 -3
  35. package/cjs/sync.js.map +1 -1
  36. package/cjs/utils.js +9 -6
  37. package/cjs/utils.js.map +1 -1
  38. package/package.json +2 -2
  39. package/rush-logs/api.build.error.log +3 -13
  40. package/rush-logs/api.build.log +5 -15
  41. package/src/collections/adjunct-sub-slides.js +13 -0
  42. package/src/fixtures.js +16 -2
  43. package/src/models/base.js +16 -3
  44. package/src/models/deck-version.js +2 -0
  45. package/src/models/dispatch-preview.js +0 -3
  46. package/src/models/dispatch.js +1 -1
  47. package/src/models/manifest-json.js +7 -12
  48. package/src/models/room.js +5 -0
  49. package/src/models/user.js +4 -4
  50. package/src/presentation/base-presentation-model.js +14 -6
  51. package/src/presentation/presentation-deck.js +63 -24
  52. package/src/presentation/presentation-section.js +31 -50
  53. package/src/presentation/presentation-slide.js +36 -43
  54. package/src/sync.js +3 -4
  55. package/src/utils.js +9 -6
  56. package/.rush/temp/1aebf46f78ad5c45f82f8147751890adb37bef9d.log +0 -10
  57. package/.rush/temp/256021b5963b4c0221d3dec247b697b9691a9b2c.log +0 -10
  58. package/.rush/temp/2a322f00f12cf9d1e64afe81275cc78d01c49050.log +0 -10
  59. package/.rush/temp/30061f1865447dcbb3f20a305061205f3dbe6091.log +0 -10
  60. package/.rush/temp/3cdc82c352e8ed90607952873f3aa4c200490874.log +0 -10
  61. package/.rush/temp/45522aea0dee8cb2be1a53248ba45bd235743b43.log +0 -10
  62. package/.rush/temp/5489ab737e406518983c16c57fc3e1edc07c0341.log +0 -10
  63. package/.rush/temp/58fcbb7f15a76326d40e0839ab179755da82a891.log +0 -10
  64. package/.rush/temp/5bc0bba70b733baa4dd976667ba0a1386e516186.log +0 -10
  65. package/.rush/temp/64f1bb696f8d7d7e72907b80df316b127f72e23e.log +0 -10
  66. package/.rush/temp/6f640f951414ea68adb65c17e4ed7527cde54faf.log +0 -10
  67. package/.rush/temp/7c7b958682d4ab5697530be47d0aac62efe1adf1.log +0 -10
  68. package/.rush/temp/82bfb987463fbcfebf04022e6ed00015c73879c8.log +0 -10
  69. package/.rush/temp/844034aa6e542115075e8f3dc5ffc640973e0064.log +0 -10
  70. package/.rush/temp/8b42957a7c15da1f29cb57bee125f13affa70dca.log +0 -10
  71. package/.rush/temp/924652444ab5a6063f328a2217123a2227058896.log +0 -10
  72. package/.rush/temp/9f2030f96d62f3e38052e35201819a216566f14f.log +0 -10
  73. package/.rush/temp/a769db9d81a23000c0e9b1bf4f1a9a9e721d0d7c.log +0 -10
  74. package/.rush/temp/a87d3a8b4ece87ec66f27c86226a9f205617681f.log +0 -10
  75. package/.rush/temp/bb7a5bdcc4af4ad1507f81f33774b31f5b4e4fb7.log +0 -10
  76. package/.rush/temp/build-cache-tar.log +0 -7
  77. package/.rush/temp/c20e29ccaaa9231b38a28bb24451b4ce7562cdc0.log +0 -10
  78. package/.rush/temp/chunked-rush-logs/api.test.chunks.jsonl +0 -1
  79. package/.rush/temp/e21303db8f59b4625fd184c9114377d781fd24f8.log +0 -10
  80. package/.rush/temp/e6d303862765b6a5f41dd483d0f9ae083a1fae10.log +0 -10
  81. package/.rush/temp/eaf69fbc059d2f1258d7569136180d4a1d3c7072.log +0 -10
  82. package/.rush/temp/f85d279e2674966daaec83e1c3986a96f86ef304.log +0 -10
  83. package/.rush/temp/fc0a332c5b34c6b90006850cf2d93a48fb4b9a6e.log +0 -10
  84. package/.rush/temp/operation/test/all.log +0 -21
  85. package/.rush/temp/operation/test/log-chunks.jsonl +0 -21
  86. package/.rush/temp/operation/test/state.json +0 -3
  87. package/.rush/temp/package-deps_build.json +0 -185
  88. package/api.build.log +0 -9
  89. package/api.test.cache.log +0 -1
  90. package/api.test.log +0 -19
  91. package/rush-logs/api.test.cache.log +0 -1
  92. package/rush-logs/api.test.log +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-deck.js","names":["require","collections","_interopRequireWildcard","_utils","_basePresentationModel","_models","_presentationSection","_presentationSlide","_lodash","_interopRequireDefault","_index","_log","_stateRegister","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","PresentationDeck","exports","BasePresentationModel","extend","props","html","css","id","deckID","index","thumbnail","visible","type","key","common","title","usesImpostorSections","editable","titleEditable","notesEditable","tagsEditable","tags","version","namespacedKey","cmsvalkey_set","isWelcome","isSlide","isSection","children","realSection","derived","welcomeSlide","fn","PresentationSection","getAttributes","sections","url","_url","DeckVersionModel","createFromDeckVersion","deckVersionModel","_deckVersionModel$nam","options","undefined","_","defaults","autoAdjuncts","AutoAdjunctCollection","adjunctSections","AdjunctSectionCollection","adjunctSlides","AdjunctSlideCollection","adjunctSubSlides","AdjunctSubSlideCollection","sectionSelections","SectionSelectionCollection","slideSelections","SlideSelectionCollection","screenshots","DeckVersionScreenshotCollection","rootAssetPath","templates","choicelist","screenshotsToMap","assetRoot","getAssetRoot","index_asset","concat","getTags","deck","getThumbnail","manifest_json","indexOf","isImpostorDeck","namespaced_key","log","warn","toJSON","selections","map","selection","sequence","section","slide","maxID","getMaxID","getUniqueAdjunctID","section_set","sectionModel","createFromSection","addSlides","slide_set","add","adjunctSection","createFromAdjunctSection","first","adjunctSlideLimit","adjunctslide_limit","slides","slideModel","isImpostor","createFromImpostorSection","PresentationSlide","createFromSlide","adjunctSlideModel","createFromAdjunctSlide","models","reverse","sectionSlides","Math","floor","template","createFromTemplate","autoSections","auto","Error","createFromAutoAdjunct","deckversionID","setSequentialSequences","createFromManifestJSON","manifestJSON","project","_project$welcome$edit","_project$welcome","parseInt","uniqueId","resolveURL","getAssetPath","welcome","editables","some","items","titles","ordering","splitKey","split","newKey","sortBy","item","startIndex","endIndex","slice","createFromManifestImpostor","sectionKeys","_project$templates$fi","_project$templates","_project$templates$fi2","_project$templates$fi3","cmsvals","find","getTemplateAssetPath","minID","max","_project$templates2","_project$templates2$f","projTemplate","s","replace","autoAdjunctID","register"],"sources":["../../src/presentation/presentation-deck.js"],"sourcesContent":["import \"./presentation-sections.js\";\n\nimport * as collections from \"../collections\";\n\nimport {\n\tgetMaxID,\n\tisImpostor,\n\tisImpostorDeck,\n\tsetSequentialSequences,\n} from \"../utils.js\";\n\nimport { BasePresentationModel } from \"./base-presentation-model\";\nimport { DeckVersionModel } from \"../models\";\nimport { PresentationSection } from \"./presentation-section\";\nimport { PresentationSlide } from \"./presentation-slide\";\nimport _ from \"lodash\";\nimport { getAssetRoot } from \"../index.js\";\nimport log from \"../log.js\";\nimport { register } from \"../state-register\";\nimport { resolveURL } from \"../utils.js\";\n\n/**\n * @constructor\n * @alias presentation.PresentationDeck\n * @extends presentation.BasePresentationModel\n */\nexport const PresentationDeck = BasePresentationModel.extend(\n\t/** @lends presentation.PresentationDeck# */ {\n\t\t/**\n\t\t * @property {string} html\n\t\t * @property {string} css\n\t\t * @property {number} id\n\t\t * @property {number} deckID\n\t\t * @property {number} index\n\t\t * @property {string} thumbnail\n\t\t * @property {boolean} visible\n\t\t * @property {string} key\n\t\t * @property {object} common\n\t\t * @property {string} title\n\t\t * @property {boolean} usesImpostorSections\n\t\t * @property {boolean} editable\n\t\t * @property {array} tags\n\t\t * @property {number} version\n\t\t * @property {string} namespacedKey\n\t\t * @property {string[]} cmsvalkey_set\n\t\t */\n\t\tprops: {\n\t\t\thtml: \"string\",\n\t\t\tcss: \"string\",\n\t\t\tid: \"number\",\n\t\t\tdeckID: \"number\",\n\t\t\tindex: \"number\",\n\t\t\tthumbnail: \"string\",\n\t\t\tvisible: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tvisible: true,\n\t\t\t},\n\t\t\tkey: \"string\",\n\t\t\tcommon: \"object\",\n\t\t\ttitle: \"string\",\n\t\t\tusesImpostorSections: \"boolean\",\n\t\t\teditable: \"boolean\",\n\t\t\ttitleEditable: \"boolean\",\n\t\t\tnotesEditable: \"boolean\",\n\t\t\ttagsEditable: \"boolean\",\n\t\t\ttags: \"array\",\n\t\t\tversion: \"number\",\n\t\t\tnamespacedKey: \"string\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t\tisWelcome: { type: \"boolean\", default: true },\n\t\t\tisSlide: { type: \"boolean\", default: false },\n\t\t\tisSection: { type: \"boolean\", default: false },\n\t\t},\n\n\t\t/**\n\t\t * @property {presentation.PresentationSection} realSection\n\t\t */\n\t\tchildren: {\n\t\t\trealSection: \"PresentationSection\",\n\t\t},\n\n\t\tderived: {\n\t\t\twelcomeSlide: {\n\t\t\t\tfn: function () {\n\t\t\t\t\treturn new PresentationSection({\n\t\t\t\t\t\t...this.getAttributes({ props: true }),\n\t\t\t\t\t\tisWelcome: true,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * @property {presentation.PresentationSectionCollection} sections\n\t\t */\n\t\tcollections: {\n\t\t\tsections: \"PresentationSectionCollection\",\n\t\t},\n\n\t\turl() {\n\t\t\tif (!this._url) {\n\t\t\t\tthis._url = new DeckVersionModel({ id: this.id }).url();\n\t\t\t}\n\n\t\t\treturn this._url;\n\t\t},\n\t},\n);\n\n/**\n * @function createFromURL\n * @memberof presentation.PresentationDeck\n * @param {models.DeckVersionModel} deckVersionModel\n * @param {object} [options]\n * @param {number} [options.index = 0]\n * @param {collections.AdjunctSectionCollection}} [adjunctSections]\n * @returns {presentation.PresentationDeck}\n */\nPresentationDeck.createFromDeckVersion = function (\n\tdeckVersionModel,\n\toptions = {},\n) {\n\t_.defaults(options, {\n\t\tindex: 0,\n\t\tautoAdjuncts: new collections.AutoAdjunctCollection(),\n\t\tadjunctSections: new collections.AdjunctSectionCollection(),\n\t\tadjunctSlides: new collections.AdjunctSlideCollection(),\n\t\tadjunctSubSlides: new collections.AdjunctSubSlideCollection(),\n\t\tsectionSelections: new collections.SectionSelectionCollection(),\n\t\tslideSelections: new collections.SlideSelectionCollection(),\n\t\tscreenshots: new collections.DeckVersionScreenshotCollection(),\n\t\trootAssetPath: null,\n\t\ttemplates: null,\n\t\tchoicelist: null,\n\t});\n\n\toptions.screenshots = PresentationDeck.screenshotsToMap(options.screenshots);\n\n\tconst assetRoot = getAssetRoot(deckVersionModel.index_asset.url());\n\tlet html;\n\tlet css;\n\n\tif (options.rootAssetPath) {\n\t\thtml = `${options.rootAssetPath}index.html`;\n\t\tcss = `${options.rootAssetPath}slide.css`;\n\t} else {\n\t\thtml = `${assetRoot}index.html`;\n\t\tcss = `${assetRoot}slide.css`;\n\t}\n\n\tconst tags = PresentationDeck.getTags(deckVersionModel, options);\n\n\tconst deck = new PresentationDeck({\n\t\thtml,\n\t\tcss,\n\t\tid: deckVersionModel.id,\n\t\tindex: options.index,\n\t\tthumbnail: PresentationDeck.getThumbnail(\n\t\t\tdeckVersionModel,\n\t\t\toptions.screenshots,\n\t\t),\n\t\tdeckID: deckVersionModel.deck.id,\n\t\tvisible: true,\n\t\tkey: deckVersionModel.deck.key,\n\t\tcommon: deckVersionModel.manifest_json.common,\n\t\ttitle: deckVersionModel.deck.title,\n\t\teditable: tags.indexOf(\"editable\") > -1,\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t\ttags,\n\t\tversion: deckVersionModel.version,\n\t\tusesImpostorSections: isImpostorDeck(deckVersionModel),\n\t\tcmsvalkey_set: deckVersionModel.cmsvalkey_set || [],\n\n\t\t// Prefer getting the value from the server, but if, for example, it's an old\n\t\t// cached version that doesn't have a namespaced key, we can make a very good\n\t\t// guess at a default!\n\t\tnamespacedKey: deckVersionModel.namespaced_key ?? \"\",\n\t});\n\n\tif (!deck.key) {\n\t\tlog.warn(\n\t\t\t\"Deck key not available to presentation\",\n\t\t\tdeckVersionModel.deck.toJSON(),\n\t\t);\n\t}\n\n\t// Convert the selections to an easier format to use later\n\tconst sectionSelections = options.sectionSelections;\n\tconst slideSelections = options.slideSelections;\n\n\toptions.selections = sectionSelections\n\t\t.map((selection) => {\n\t\t\treturn {\n\t\t\t\tsequence: selection.sequence,\n\t\t\t\tvisible: selection.visible,\n\t\t\t\turl: selection.section.url(),\n\t\t\t\tid: selection.id,\n\t\t\t};\n\t\t})\n\t\t.concat(\n\t\t\tslideSelections.map((selection) => {\n\t\t\t\treturn {\n\t\t\t\t\tsequence: selection.sequence,\n\t\t\t\t\tvisible: selection.visible,\n\t\t\t\t\turl: selection.slide.url(),\n\t\t\t\t\tid: selection.id,\n\t\t\t\t};\n\t\t\t}),\n\t\t);\n\n\t// We want all adjuncts to have fake ids that can't possibly overlap with the ids of\n\t// normal sections, slides and subslides, so we make a base ID that is larger than\n\t// all existing IDs then use the getUniqueAdjunctID function to retrieve an incremented ID\n\tlet maxID = getMaxID(deckVersionModel);\n\n\toptions.getUniqueAdjunctID = function () {\n\t\treturn ++maxID;\n\t};\n\n\t// We have four different ways to create a presentation structure here - we are\n\t// using either selections or a choicelist, and the deck is either a normal\n\t// deck or an impostor deck. Setting up a non-impostor deck is easier, so I've\n\t// split this up into two primary methods to cover those two branches, and the models\n\t// internally retrieve the correct sequence & visibility data depending on whether\n\t// we're using selections or a choicelist.\n\n\tif (!deck.usesImpostorSections) {\n\t\t// Non impostor deck using selections or a choicelist. Slides are already\n\t\t// associated with the correct sections, so all we have to do is turn\n\t\t// everything into a presentation model and pass the options through with\n\t\t// the selections or choicelist data.\n\n\t\tdeckVersionModel.section_set.forEach((sectionModel) => {\n\t\t\tconst section = PresentationSection.createFromSection(\n\t\t\t\tsectionModel,\n\t\t\t\toptions,\n\t\t\t);\n\n\t\t\tsection.addSlides(sectionModel.slide_set, options);\n\t\t\tdeck.sections.add(section);\n\n\t\t\tconst adjunctSlides = options.adjunctSlides.filter((slide) => {\n\t\t\t\treturn slide.section && slide.section.id === section.id;\n\t\t\t});\n\n\t\t\tsection.addSlides(adjunctSlides, options);\n\t\t});\n\n\t\toptions.adjunctSections.forEach((adjunctSection) => {\n\t\t\tconst section = PresentationSection.createFromAdjunctSection(\n\t\t\t\tadjunctSection,\n\t\t\t\tDeckVersionModel,\n\t\t\t\toptions,\n\t\t\t);\n\n\t\t\tdeck.sections.add(section);\n\t\t});\n\t} else {\n\t\t// Impostor deck using selections or a choicelist. The deckversion.section_set\n\t\t// only contains one section, which is the \"real\" section but is not used in\n\t\t// the presentation. Some slides have the tag \"section-header\", and these slides\n\t\t// will be turned into sections and may be given sets of slides.\n\n\t\tconst realSection = deckVersionModel.section_set.first();\n\n\t\tdeck.realSection = new PresentationSection({\n\t\t\tid: realSection.id,\n\t\t\tkey: realSection.key,\n\t\t\tadjunctSlideLimit: realSection.adjunctslide_limit,\n\t\t});\n\n\t\tlet slides = [];\n\n\t\t// First we go through all slides and separate the impostor sections from the\n\t\t// normal slides. If a slide is a \"section header\" then we turn it into a presentation\n\t\t// section; if it is just a slide then we add it to the slides array, which will contain\n\t\t// all slides. We can't allocate slides to sections yet because we don't know\n\t\t// which section a slide belongs to.\n\t\trealSection.slide_set.forEach((slideModel) => {\n\t\t\tconst isSection = isImpostor(slideModel);\n\n\t\t\tif (isSection) {\n\t\t\t\tconst section = PresentationSection.createFromImpostorSection(\n\t\t\t\t\tslideModel,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tdeck.sections.add(section);\n\t\t\t} else {\n\t\t\t\tconst slide = PresentationSlide.createFromSlide(slideModel, options);\n\t\t\t\tslides.push(slide);\n\t\t\t}\n\t\t});\n\n\t\t// We filter the adjunct slides and add all the non-section slides to the slides array too.\n\t\toptions.adjunctSlides\n\t\t\t.filter((slide) => !isImpostor(slide))\n\t\t\t.forEach((adjunctSlideModel) => {\n\t\t\t\tconst slide = PresentationSlide.createFromAdjunctSlide(\n\t\t\t\t\tadjunctSlideModel,\n\t\t\t\t\tnull,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tslides.push(slide);\n\t\t\t});\n\n\t\t// Next we go through the sections backwards and use the sequence to find all slides\n\t\t// which belong to a section. Doing this backwards means that we only need to know\n\t\t// one section's sequence at a time, e.g. if I went forwards and the first section\n\t\t// had the sequence 1, I know that I can start looking for slides with sequence > 1\n\t\t// but I don't know where to stop. If I start with the last section and look for\n\t\t// slides with the sequence > 110 then I know that all slides with a sequence > 110\n\t\t// are valid. I then remove those slides from the slides array and move down to the\n\t\t// next section.\n\t\tdeck.sections.models.reverse().forEach((section) => {\n\t\t\tconst sectionSlides = slides.filter(\n\t\t\t\t(slide) => slide.sequence > section.sequence,\n\t\t\t);\n\n\t\t\tsection.slides.add(sectionSlides);\n\n\t\t\t// Slides have a \"section\" on their model that represents the section\n\t\t\t// that they belong to. Because this is an impostor deck, there's a\n\t\t\t// good chance that the section is now incorrect for normal slides,\n\t\t\t// and a 100% chance that it's incorrect for adjunct slides as we\n\t\t\t// didn't populate the section field when we created the adjunct slides.\n\t\t\t// We update those now with the correct section.\n\t\t\tsection.slides.forEach((slide) => {\n\t\t\t\tslide.section = section.id;\n\t\t\t});\n\n\t\t\tslides = slides.filter((slide) => slide.sequence <= section.sequence);\n\t\t});\n\n\t\t// Average the adjunct slide limit used across the entire deck over each section\n\t\t// in the deck. We do this before we add the adjunct impostor sections, 'cause you\n\t\t// can't add custom slides to those.\n\t\tdeck.sections.forEach((section) => {\n\t\t\tsection.adjunctSlideLimit = section.adjunctSlideLimit\n\t\t\t\t? section.adjunctSlideLimit\n\t\t\t\t: Math.floor(realSection.adjunctSlideLimit / deck.sections.length);\n\t\t});\n\n\t\t// Return the sections to the correct order\n\t\tdeck.sections.models.reverse();\n\n\t\t// Finally, we add the adjunct impostor sections. These are adjunct slides with\n\t\t// the \"section-header\" tag and they work the same way as the slide impostors,\n\t\t// but because adjunct sections can't have slides we're adding them after the\n\t\t// slide-assigning process\n\t\toptions.adjunctSlides\n\t\t\t.filter((slide) => isImpostor(slide))\n\t\t\t.forEach((adjunctSlideModel) => {\n\t\t\t\tconst adjunctSection = PresentationSection.createFromAdjunctSection(\n\t\t\t\t\tadjunctSlideModel,\n\t\t\t\t\tDeckVersionModel,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tdeck.sections.add(adjunctSection);\n\t\t\t});\n\t}\n\n\t// Add templates as sections if present. This is only used by the CDK.\n\tif (options.templates && options.templates.length > 0) {\n\t\tdeck.sections.add(\n\t\t\toptions.templates.map((template, index) => {\n\t\t\t\treturn PresentationSection.createFromTemplate(\n\t\t\t\t\ttemplate,\n\t\t\t\t\tdeck.sections.length + index,\n\t\t\t\t\toptions.getUniqueAdjunctID(),\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\t}\n\n\t// This is generally only used by screenshots\n\tif (options.autoAdjuncts) {\n\t\tconst autoSections = options.autoAdjuncts.map((auto, index) => {\n\t\t\t// We already have the template on the deckversion, so we can find it here.\n\t\t\tif (!auto.template) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Attempted to use an autoadjunct that has no template.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst section = PresentationSection.createFromAutoAdjunct(auto, {\n\t\t\t\tindex: deck.sections.length + index,\n\t\t\t\tdeckversionID: deck.id,\n\t\t\t});\n\n\t\t\treturn section;\n\t\t});\n\n\t\tdeck.sections.add(autoSections);\n\t}\n\n\tsetSequentialSequences(deck);\n\n\treturn deck;\n};\n\nPresentationDeck.createFromManifestJSON = function (manifestJSON, project) {\n\tconst deck = new PresentationDeck({\n\t\tid: parseInt(_.uniqueId(), 10),\n\t\tindex: 0,\n\t\tvisible: true,\n\t\tkey: manifestJSON.key || \"manifest_deck\",\n\t\thtml: resolveURL(manifestJSON.getAssetPath(), \"index.html\"),\n\t\tcss: resolveURL(manifestJSON.getAssetPath(), \"slide.css\"),\n\t\tcommon: manifestJSON.common,\n\t\tthumbnail: null,\n\t\tdeckID: 1,\n\t\ttitle: \"Local\",\n\t\tversion: 1,\n\t\ttags: manifestJSON.tags[\"\"] || [],\n\t\tcmsvalkey_set: project?.welcome?.editables ?? [],\n\t});\n\n\tconst usesImpostorSections = _.some(\n\t\tmanifestJSON.tags,\n\t\t(tags) => tags.indexOf(\"section-header\") !== -1,\n\t);\n\tdeck.usesImpostorSections = usesImpostorSections;\n\n\tif (usesImpostorSections) {\n\t\tdeck.usesImpostorSections = true;\n\n\t\tlet items = Object.keys(manifestJSON.titles).map((key) => {\n\t\t\tconst sequence = manifestJSON.toJSON().ordering[key];\n\t\t\tconst splitKey = key.split(\"/\");\n\t\t\tconst newKey = splitKey[splitKey.length - 1];\n\n\t\t\treturn {\n\t\t\t\tkey: newKey,\n\t\t\t\tsequence,\n\t\t\t\thtml: resolveURL(manifestJSON.getAssetPath(key), \"index.html\"),\n\t\t\t\tcss: resolveURL(manifestJSON.getAssetPath(key), \"slide.css\"),\n\t\t\t\ttitle: manifestJSON.titles[key],\n\t\t\t\ttags: manifestJSON.tags[key] || [],\n\t\t\t\tcmsvalkey_set: [],\n\t\t\t};\n\t\t});\n\n\t\titems = _.sortBy(items, \"sequence\");\n\n\t\tconst sections = items.filter(\n\t\t\t(item) => item.tags.indexOf(\"section-header\") !== -1,\n\t\t);\n\n\t\tsections.forEach((item, index) => {\n\t\t\tconst startIndex = items.indexOf(item) + 1;\n\t\t\tconst endIndex = sections[index + 1]\n\t\t\t\t? items.indexOf(sections[index + 1])\n\t\t\t\t: items.length;\n\n\t\t\tconst slides = items.slice(startIndex, endIndex);\n\n\t\t\titem.slides = slides;\n\t\t});\n\n\t\tdeck.sections.add(\n\t\t\tsections.map((section, index) => {\n\t\t\t\treturn PresentationSection.createFromManifestImpostor(\n\t\t\t\t\tsection,\n\t\t\t\t\tproject,\n\t\t\t\t\tindex,\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\n\t\tdeck.realSection = PresentationSection.createFromManifestImpostor(\n\t\t\titems[0],\n\t\t\tproject,\n\t\t);\n\t} else {\n\t\tconst sectionKeys = Object.keys(manifestJSON.titles).filter((title) => {\n\t\t\treturn title.split(\"/\").length === 1;\n\t\t});\n\n\t\tdeck.sections.add(\n\t\t\tsectionKeys.map((key, index) => {\n\t\t\t\treturn PresentationSection.createFromManifestJSON(\n\t\t\t\t\tmanifestJSON,\n\t\t\t\t\tproject,\n\t\t\t\t\tkey,\n\t\t\t\t\tindex,\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (manifestJSON.templates) {\n\t\tconst templates = Object.keys(manifestJSON.templates).map((key) => {\n\t\t\tconst cmsvals =\n\t\t\t\tproject?.templates?.find?.((t) => t.key === key)?.editables ?? [];\n\n\t\t\treturn {\n\t\t\t\t...manifestJSON.templates[key],\n\t\t\t\tkey,\n\t\t\t\tsequence: manifestJSON.templates[key].ordering,\n\t\t\t\tindex_asset: {\n\t\t\t\t\turl: resolveURL(manifestJSON.getTemplateAssetPath(key), \"index.html\"),\n\t\t\t\t},\n\t\t\t\tcmsvalkey_set: cmsvals,\n\t\t\t};\n\t\t});\n\n\t\tconst minID = _.max(_.map(deck.sections.toJSON(), \"id\"));\n\n\t\tdeck.sections.add(\n\t\t\ttemplates.map((template, index) => {\n\t\t\t\tconst section = PresentationSection.createFromTemplate(\n\t\t\t\t\ttemplate,\n\t\t\t\t\tindex,\n\t\t\t\t\tminID,\n\t\t\t\t);\n\t\t\t\tconst projTemplate = project?.templates?.find?.(\n\t\t\t\t\t(s) => s.key === section.key.replace(\"template-\", \"\"),\n\t\t\t\t);\n\t\t\t\tif (projTemplate?.editables) {\n\t\t\t\t\tsection.cmsvalkey_set = projTemplate.editables.map((key) => {\n\t\t\t\t\t\treturn `${key}-autoadjunct-${section.autoAdjunctID}`;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn section;\n\t\t\t}),\n\t\t);\n\t}\n\n\treturn deck;\n};\n\nregister(\"PresentationDeck\", PresentationDeck);\n"],"mappings":";;;;;;;;;AAAAA,OAAA;AAEA,IAAAC,WAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAOA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAC,sBAAA,CAAAT,OAAA;AAC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GAAG,mBAAAsD,MAAA,CAAgBe,OAAO,CAAC4E,aAAa;QACnD,CAAC,CAAC;MACH;MACA,OAAO5E,OAAO;IACf,CAAC,CACF,CAAC;EACF;EAEA,OAAOb,IAAI;AACZ,CAAC;AAED,IAAA0F,uBAAQ,EAAC,kBAAkB,EAAE/J,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"presentation-deck.js","names":["require","collections","_interopRequireWildcard","_utils","_basePresentationModel","_models","_presentationSection","_presentationSlide","_lodash","_interopRequireDefault","_index","_log","_stateRegister","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_createForOfIteratorHelper","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","_n","F","s","done","value","TypeError","a","u","next","return","_arrayLikeToArray","toString","slice","constructor","name","from","test","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","PresentationDeck","exports","BasePresentationModel","extend","props","html","css","id","deckID","index","thumbnail","visible","type","key","common","title","usesImpostorSections","editable","titleEditable","notesEditable","tagsEditable","tags","version","namespacedKey","cmsvalkey_set","isWelcome","isSlide","isSection","children","realSection","derived","welcomeSlide","fn","PresentationSection","getAttributes","sections","url","_url","DeckVersionModel","createFromDeckVersion","deckVersionModel","_options$index","_options$autoAdjuncts","_options$adjunctSecti","_options$adjunctSlide","_options$adjunctSubSl","_options$sectionSelec","_options$slideSelecti","_options$rootAssetPat","_options$templates","_options$choicelist","_options$screenshots","_deckVersionModel$nam","options","undefined","autoAdjuncts","AutoAdjunctCollection","adjunctSections","AdjunctSectionCollection","adjunctSlides","AdjunctSlideCollection","adjunctSubSlides","AdjunctSubSlideCollection","sectionSelections","SectionSelectionCollection","slideSelections","SlideSelectionCollection","rootAssetPath","templates","choicelist","screenshots","screenshotsToMap","DeckVersionScreenshotCollection","assetRoot","getAssetRoot","index_asset","concat","getTags","deck","getThumbnail","manifest_json","indexOf","isImpostorDeck","namespaced_key","log","warn","toJSON","selections","map","selection","sequence","section","slide","selectionsMap","Map","appointmentTags","appointmentTagsMap","content_url","baseRoot","adjunctSlidesBySection","_iterator","models","_step","err","adjunctSubSlidesBySlide","_iterator2","_step2","subslide","maxID","getMaxID","getUniqueAdjunctID","section_set","sectionModel","_options$adjunctSlide2","createFromSection","addSlides","slide_set","add","adjunctSection","createFromAdjunctSection","first","adjunctSlideLimit","adjunctslide_limit","slides","slideModel","isImpostor","createFromImpostorSection","PresentationSlide","createFromSlide","adjunctSlideModel","createFromAdjunctSlide","sort","b","slideIdx","reverse","sectionSlides","_values","Math","floor","template","createFromTemplate","autoSections","auto","Error","createFromAutoAdjunct","deckversionID","setSequentialSequences","createFromManifestJSON","manifestJSON","project","_project$welcome$edit","_project$welcome","parseInt","_","uniqueId","resolveURL","getAssetPath","welcome","editables","some","items","titles","ordering","splitKey","split","newKey","sortBy","item","startIndex","endIndex","createFromManifestImpostor","sectionKeys","_project$templates$fi","_project$templates","_project$templates$fi2","_project$templates$fi3","cmsvals","find","getTemplateAssetPath","minID","max","_toConsumableArray2","_project$templates2","_project$templates2$f","projTemplate","replace","autoAdjunctID","register"],"sources":["../../src/presentation/presentation-deck.js"],"sourcesContent":["import \"./presentation-sections.js\";\n\nimport * as collections from \"../collections\";\n\nimport {\n\tgetMaxID,\n\tisImpostor,\n\tisImpostorDeck,\n\tsetSequentialSequences,\n} from \"../utils.js\";\n\nimport { BasePresentationModel } from \"./base-presentation-model\";\nimport { DeckVersionModel } from \"../models\";\nimport { PresentationSection } from \"./presentation-section\";\nimport { PresentationSlide } from \"./presentation-slide\";\nimport _ from \"lodash\";\nimport { getAssetRoot } from \"../index.js\";\nimport log from \"../log.js\";\nimport { register } from \"../state-register\";\nimport { resolveURL } from \"../utils.js\";\n\n/**\n * @constructor\n * @alias presentation.PresentationDeck\n * @extends presentation.BasePresentationModel\n */\nexport const PresentationDeck = BasePresentationModel.extend(\n\t/** @lends presentation.PresentationDeck# */ {\n\t\t/**\n\t\t * @property {string} html\n\t\t * @property {string} css\n\t\t * @property {number} id\n\t\t * @property {number} deckID\n\t\t * @property {number} index\n\t\t * @property {string} thumbnail\n\t\t * @property {boolean} visible\n\t\t * @property {string} key\n\t\t * @property {object} common\n\t\t * @property {string} title\n\t\t * @property {boolean} usesImpostorSections\n\t\t * @property {boolean} editable\n\t\t * @property {array} tags\n\t\t * @property {number} version\n\t\t * @property {string} namespacedKey\n\t\t * @property {string[]} cmsvalkey_set\n\t\t */\n\t\tprops: {\n\t\t\thtml: \"string\",\n\t\t\tcss: \"string\",\n\t\t\tid: \"number\",\n\t\t\tdeckID: \"number\",\n\t\t\tindex: \"number\",\n\t\t\tthumbnail: \"string\",\n\t\t\tvisible: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tvisible: true,\n\t\t\t},\n\t\t\tkey: \"string\",\n\t\t\tcommon: \"object\",\n\t\t\ttitle: \"string\",\n\t\t\tusesImpostorSections: \"boolean\",\n\t\t\teditable: \"boolean\",\n\t\t\ttitleEditable: \"boolean\",\n\t\t\tnotesEditable: \"boolean\",\n\t\t\ttagsEditable: \"boolean\",\n\t\t\ttags: \"array\",\n\t\t\tversion: \"number\",\n\t\t\tnamespacedKey: \"string\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t\tisWelcome: { type: \"boolean\", default: true },\n\t\t\tisSlide: { type: \"boolean\", default: false },\n\t\t\tisSection: { type: \"boolean\", default: false },\n\t\t},\n\n\t\t/**\n\t\t * @property {presentation.PresentationSection} realSection\n\t\t */\n\t\tchildren: {\n\t\t\trealSection: \"PresentationSection\",\n\t\t},\n\n\t\tderived: {\n\t\t\twelcomeSlide: {\n\t\t\t\tfn: function () {\n\t\t\t\t\treturn new PresentationSection({\n\t\t\t\t\t\t...this.getAttributes({ props: true }),\n\t\t\t\t\t\tisWelcome: true,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * @property {presentation.PresentationSectionCollection} sections\n\t\t */\n\t\tcollections: {\n\t\t\tsections: \"PresentationSectionCollection\",\n\t\t},\n\n\t\turl() {\n\t\t\tif (!this._url) {\n\t\t\t\tthis._url = new DeckVersionModel({ id: this.id }).url();\n\t\t\t}\n\n\t\t\treturn this._url;\n\t\t},\n\t},\n);\n\n/**\n * @function createFromURL\n * @memberof presentation.PresentationDeck\n * @param {models.DeckVersionModel} deckVersionModel\n * @param {object} [options]\n * @param {number} [options.index = 0]\n * @param {collections.AdjunctSectionCollection}} [adjunctSections]\n * @returns {presentation.PresentationDeck}\n */\nPresentationDeck.createFromDeckVersion = function (\n\tdeckVersionModel,\n\toptions = {},\n) {\n\toptions.index ??= 0;\n\toptions.autoAdjuncts ??= new collections.AutoAdjunctCollection();\n\toptions.adjunctSections ??= new collections.AdjunctSectionCollection();\n\toptions.adjunctSlides ??= new collections.AdjunctSlideCollection();\n\toptions.adjunctSubSlides ??= new collections.AdjunctSubSlideCollection();\n\toptions.sectionSelections ??= new collections.SectionSelectionCollection();\n\toptions.slideSelections ??= new collections.SlideSelectionCollection();\n\toptions.rootAssetPath ??= null;\n\toptions.templates ??= null;\n\toptions.choicelist ??= null;\n\toptions.screenshots = PresentationDeck.screenshotsToMap(\n\t\toptions.screenshots ?? new collections.DeckVersionScreenshotCollection(),\n\t);\n\n\tconst assetRoot = getAssetRoot(deckVersionModel.index_asset.url());\n\tlet html;\n\tlet css;\n\n\tif (options.rootAssetPath) {\n\t\thtml = `${options.rootAssetPath}index.html`;\n\t\tcss = `${options.rootAssetPath}slide.css`;\n\t} else {\n\t\thtml = `${assetRoot}index.html`;\n\t\tcss = `${assetRoot}slide.css`;\n\t}\n\n\tconst tags = PresentationDeck.getTags(deckVersionModel, options);\n\n\tconst deck = new PresentationDeck({\n\t\thtml,\n\t\tcss,\n\t\tid: deckVersionModel.id,\n\t\tindex: options.index,\n\t\tthumbnail: PresentationDeck.getThumbnail(\n\t\t\tdeckVersionModel,\n\t\t\toptions.screenshots,\n\t\t),\n\t\tdeckID: deckVersionModel.deck.id,\n\t\tvisible: true,\n\t\tkey: deckVersionModel.deck.key,\n\t\tcommon: deckVersionModel.manifest_json.common,\n\t\ttitle: deckVersionModel.deck.title,\n\t\teditable: tags.indexOf(\"editable\") > -1,\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t\ttags,\n\t\tversion: deckVersionModel.version,\n\t\tusesImpostorSections: isImpostorDeck(deckVersionModel),\n\t\tcmsvalkey_set: deckVersionModel.cmsvalkey_set || [],\n\n\t\t// Prefer getting the value from the server, but if, for example, it's an old\n\t\t// cached version that doesn't have a namespaced key, we can make a very good\n\t\t// guess at a default!\n\t\tnamespacedKey: deckVersionModel.namespaced_key ?? \"\",\n\t});\n\n\tif (!deck.key) {\n\t\tlog.warn(\n\t\t\t\"Deck key not available to presentation\",\n\t\t\tdeckVersionModel.deck.toJSON(),\n\t\t);\n\t}\n\n\t// Convert the selections to an easier format to use later\n\tconst sectionSelections = options.sectionSelections;\n\tconst slideSelections = options.slideSelections;\n\n\toptions.selections = sectionSelections\n\t\t.map((selection) => {\n\t\t\treturn {\n\t\t\t\tsequence: selection.sequence,\n\t\t\t\tvisible: selection.visible,\n\t\t\t\turl: selection.section.url(),\n\t\t\t\tid: selection.id,\n\t\t\t};\n\t\t})\n\t\t.concat(\n\t\t\tslideSelections.map((selection) => {\n\t\t\t\treturn {\n\t\t\t\t\tsequence: selection.sequence,\n\t\t\t\t\tvisible: selection.visible,\n\t\t\t\t\turl: selection.slide.url(),\n\t\t\t\t\tid: selection.id,\n\t\t\t\t};\n\t\t\t}),\n\t\t);\n\n\toptions.selectionsMap = new Map(options.selections.map((s) => [s.url, s]));\n\n\tif (options.appointmentTags) {\n\t\toptions.appointmentTagsMap = new Map(\n\t\t\toptions.appointmentTags.map((t) => [t.content_url, t]),\n\t\t);\n\t}\n\n\tif (options.rootAssetPath) {\n\t\toptions.baseRoot = getAssetRoot(deckVersionModel.index_asset.url());\n\t}\n\n\toptions.adjunctSlidesBySection = new Map();\n\tfor (const slide of options.adjunctSlides.models) {\n\t\tif (slide.section) {\n\t\t\tconst key = slide.section.id;\n\t\t\tif (!options.adjunctSlidesBySection.has(key)) {\n\t\t\t\toptions.adjunctSlidesBySection.set(key, []);\n\t\t\t}\n\t\t\toptions.adjunctSlidesBySection.get(key).push(slide);\n\t\t}\n\t}\n\n\toptions.adjunctSubSlidesBySlide = new Map();\n\tfor (const subslide of options.adjunctSubSlides.models) {\n\t\tconst key = subslide.slide.id;\n\t\tif (!options.adjunctSubSlidesBySlide.has(key)) {\n\t\t\toptions.adjunctSubSlidesBySlide.set(key, []);\n\t\t}\n\t\toptions.adjunctSubSlidesBySlide.get(key).push(subslide);\n\t}\n\n\t// We want all adjuncts to have fake ids that can't possibly overlap with the ids of\n\t// normal sections, slides and subslides, so we make a base ID that is larger than\n\t// all existing IDs then use the getUniqueAdjunctID function to retrieve an incremented ID\n\tlet maxID = getMaxID(deckVersionModel);\n\n\toptions.getUniqueAdjunctID = function () {\n\t\treturn ++maxID;\n\t};\n\n\t// We have four different ways to create a presentation structure here - we are\n\t// using either selections or a choicelist, and the deck is either a normal\n\t// deck or an impostor deck. Setting up a non-impostor deck is easier, so I've\n\t// split this up into two primary methods to cover those two branches, and the models\n\t// internally retrieve the correct sequence & visibility data depending on whether\n\t// we're using selections or a choicelist.\n\n\tif (!deck.usesImpostorSections) {\n\t\t// Non impostor deck using selections or a choicelist. Slides are already\n\t\t// associated with the correct sections, so all we have to do is turn\n\t\t// everything into a presentation model and pass the options through with\n\t\t// the selections or choicelist data.\n\n\t\tdeckVersionModel.section_set.forEach((sectionModel) => {\n\t\t\tconst section = PresentationSection.createFromSection(\n\t\t\t\tsectionModel,\n\t\t\t\toptions,\n\t\t\t);\n\n\t\t\tsection.addSlides(sectionModel.slide_set, options);\n\n\t\t\tdeck.sections.add(section);\n\n\t\t\tconst adjunctSlides =\n\t\t\t\toptions.adjunctSlidesBySection.get(section.id) ?? [];\n\n\t\t\tsection.addSlides(adjunctSlides, options);\n\t\t});\n\n\t\toptions.adjunctSections.forEach((adjunctSection) => {\n\t\t\tconst section = PresentationSection.createFromAdjunctSection(\n\t\t\t\tadjunctSection,\n\t\t\t\tDeckVersionModel,\n\t\t\t\toptions,\n\t\t\t);\n\n\t\t\tdeck.sections.add(section);\n\t\t});\n\t} else {\n\t\t// Impostor deck using selections or a choicelist. The deckversion.section_set\n\t\t// only contains one section, which is the \"real\" section but is not used in\n\t\t// the presentation. Some slides have the tag \"section-header\", and these slides\n\t\t// will be turned into sections and may be given sets of slides.\n\n\t\tconst realSection = deckVersionModel.section_set.first();\n\n\t\tdeck.realSection = new PresentationSection({\n\t\t\tid: realSection.id,\n\t\t\tkey: realSection.key,\n\t\t\tadjunctSlideLimit: realSection.adjunctslide_limit,\n\t\t});\n\n\t\tlet slides = [];\n\n\t\t// First we go through all slides and separate the impostor sections from the\n\t\t// normal slides. If a slide is a \"section header\" then we turn it into a presentation\n\t\t// section; if it is just a slide then we add it to the slides array, which will contain\n\t\t// all slides. We can't allocate slides to sections yet because we don't know\n\t\t// which section a slide belongs to.\n\t\trealSection.slide_set.forEach((slideModel) => {\n\t\t\tconst isSection = isImpostor(slideModel);\n\n\t\t\tif (isSection) {\n\t\t\t\tconst section = PresentationSection.createFromImpostorSection(\n\t\t\t\t\tslideModel,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tdeck.sections.add(section);\n\t\t\t} else {\n\t\t\t\tconst slide = PresentationSlide.createFromSlide(slideModel, options);\n\t\t\t\tslides.push(slide);\n\t\t\t}\n\t\t});\n\n\t\t// We filter the adjunct slides and add all the non-section slides to the slides array too.\n\t\toptions.adjunctSlides\n\t\t\t.filter((slide) => !isImpostor(slide))\n\t\t\t.forEach((adjunctSlideModel) => {\n\t\t\t\tconst slide = PresentationSlide.createFromAdjunctSlide(\n\t\t\t\t\tadjunctSlideModel,\n\t\t\t\t\tnull,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tslides.push(slide);\n\t\t\t});\n\n\t\t// Next we go through the sections backwards and use the sequence to find all slides\n\t\t// which belong to a section. Doing this backwards means that we only need to know\n\t\t// one section's sequence at a time, e.g. if I went forwards and the first section\n\t\t// had the sequence 1, I know that I can start looking for slides with sequence > 1\n\t\t// but I don't know where to stop. If I start with the last section and look for\n\t\t// slides with the sequence > 110 then I know that all slides with a sequence > 110\n\t\t// are valid. I then remove those slides from the slides array and move down to the\n\t\t// next section.\n\t\tslides.sort((a, b) => b.sequence - a.sequence);\n\n\t\tlet slideIdx = 0;\n\t\tdeck.sections.models.reverse().forEach((section) => {\n\t\t\tconst sectionSlides = [];\n\t\t\twhile (\n\t\t\t\tslideIdx < slides.length &&\n\t\t\t\tslides[slideIdx].sequence > section.sequence\n\t\t\t) {\n\t\t\t\tsectionSlides.push(slides[slideIdx]);\n\t\t\t\tslideIdx++;\n\t\t\t}\n\n\t\t\tsection.slides.add(sectionSlides);\n\n\t\t\t// Slides have a \"section\" on their model that represents the section\n\t\t\t// that they belong to. Because this is an impostor deck, there's a\n\t\t\t// good chance that the section is now incorrect for normal slides,\n\t\t\t// and a 100% chance that it's incorrect for adjunct slides as we\n\t\t\t// didn't populate the section field when we created the adjunct slides.\n\t\t\t// We update those now with the correct section.\n\t\t\tsection.slides.forEach((slide) => {\n\t\t\t\tslide.section = section.id;\n\t\t\t});\n\t\t\tsectionSlides.forEach((slide) => {\n\t\t\t\tslide._values.section = section.id;\n\t\t\t});\n\t\t});\n\n\t\t// Average the adjunct slide limit used across the entire deck over each section\n\t\t// in the deck. We do this before we add the adjunct impostor sections, 'cause you\n\t\t// can't add custom slides to those.\n\t\tdeck.sections.forEach((section) => {\n\t\t\tsection.adjunctSlideLimit = section.adjunctSlideLimit\n\t\t\t\t? section.adjunctSlideLimit\n\t\t\t\t: Math.floor(realSection.adjunctSlideLimit / deck.sections.length);\n\t\t});\n\n\t\t// Return the sections to the correct order\n\t\tdeck.sections.models.reverse();\n\n\t\t// Finally, we add the adjunct impostor sections. These are adjunct slides with\n\t\t// the \"section-header\" tag and they work the same way as the slide impostors,\n\t\t// but because adjunct sections can't have slides we're adding them after the\n\t\t// slide-assigning process\n\t\toptions.adjunctSlides\n\t\t\t.filter((slide) => isImpostor(slide))\n\t\t\t.forEach((adjunctSlideModel) => {\n\t\t\t\tconst adjunctSection = PresentationSection.createFromAdjunctSection(\n\t\t\t\t\tadjunctSlideModel,\n\t\t\t\t\tDeckVersionModel,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tdeck.sections.add(adjunctSection);\n\t\t\t});\n\t}\n\n\t// Add templates as sections if present. This is only used by the CDK.\n\tif (options.templates && options.templates.length > 0) {\n\t\tdeck.sections.add(\n\t\t\toptions.templates.map((template, index) => {\n\t\t\t\treturn PresentationSection.createFromTemplate(\n\t\t\t\t\ttemplate,\n\t\t\t\t\tdeck.sections.length + index,\n\t\t\t\t\toptions.getUniqueAdjunctID(),\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\t}\n\n\t// This is generally only used by screenshots\n\tif (options.autoAdjuncts) {\n\t\tconst autoSections = options.autoAdjuncts.map((auto, index) => {\n\t\t\t// We already have the template on the deckversion, so we can find it here.\n\t\t\tif (!auto.template) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Attempted to use an autoadjunct that has no template.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst section = PresentationSection.createFromAutoAdjunct(auto, {\n\t\t\t\tindex: deck.sections.length + index,\n\t\t\t\tdeckversionID: deck.id,\n\t\t\t});\n\n\t\t\treturn section;\n\t\t});\n\n\t\tdeck.sections.add(autoSections);\n\t}\n\n\tsetSequentialSequences(deck);\n\n\treturn deck;\n};\n\nPresentationDeck.createFromManifestJSON = function (manifestJSON, project) {\n\tconst deck = new PresentationDeck({\n\t\tid: parseInt(_.uniqueId(), 10),\n\t\tindex: 0,\n\t\tvisible: true,\n\t\tkey: manifestJSON.key || \"manifest_deck\",\n\t\thtml: resolveURL(manifestJSON.getAssetPath(), \"index.html\"),\n\t\tcss: resolveURL(manifestJSON.getAssetPath(), \"slide.css\"),\n\t\tcommon: manifestJSON.common,\n\t\tthumbnail: null,\n\t\tdeckID: 1,\n\t\ttitle: \"Local\",\n\t\tversion: 1,\n\t\ttags: manifestJSON.tags[\"\"] || [],\n\t\tcmsvalkey_set: project?.welcome?.editables ?? [],\n\t});\n\n\tconst usesImpostorSections = _.some(\n\t\tmanifestJSON.tags,\n\t\t(tags) => tags.indexOf(\"section-header\") !== -1,\n\t);\n\tdeck.usesImpostorSections = usesImpostorSections;\n\n\tif (usesImpostorSections) {\n\t\tdeck.usesImpostorSections = true;\n\n\t\tlet items = Object.keys(manifestJSON.titles).map((key) => {\n\t\t\tconst sequence = manifestJSON.toJSON().ordering[key];\n\t\t\tconst splitKey = key.split(\"/\");\n\t\t\tconst newKey = splitKey[splitKey.length - 1];\n\n\t\t\treturn {\n\t\t\t\tkey: newKey,\n\t\t\t\tsequence,\n\t\t\t\thtml: resolveURL(manifestJSON.getAssetPath(key), \"index.html\"),\n\t\t\t\tcss: resolveURL(manifestJSON.getAssetPath(key), \"slide.css\"),\n\t\t\t\ttitle: manifestJSON.titles[key],\n\t\t\t\ttags: manifestJSON.tags[key] || [],\n\t\t\t\tcmsvalkey_set: [],\n\t\t\t};\n\t\t});\n\n\t\titems = _.sortBy(items, \"sequence\");\n\n\t\tconst sections = items.filter(\n\t\t\t(item) => item.tags.indexOf(\"section-header\") !== -1,\n\t\t);\n\n\t\tsections.forEach((item, index) => {\n\t\t\tconst startIndex = items.indexOf(item) + 1;\n\t\t\tconst endIndex = sections[index + 1]\n\t\t\t\t? items.indexOf(sections[index + 1])\n\t\t\t\t: items.length;\n\n\t\t\tconst slides = items.slice(startIndex, endIndex);\n\n\t\t\titem.slides = slides;\n\t\t});\n\n\t\tdeck.sections.add(\n\t\t\tsections.map((section, index) => {\n\t\t\t\treturn PresentationSection.createFromManifestImpostor(\n\t\t\t\t\tsection,\n\t\t\t\t\tproject,\n\t\t\t\t\tindex,\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\n\t\tdeck.realSection = PresentationSection.createFromManifestImpostor(\n\t\t\titems[0],\n\t\t\tproject,\n\t\t);\n\t} else {\n\t\tconst sectionKeys = Object.keys(manifestJSON.titles).filter((title) => {\n\t\t\treturn title.split(\"/\").length === 1;\n\t\t});\n\n\t\tdeck.sections.add(\n\t\t\tsectionKeys.map((key, index) => {\n\t\t\t\treturn PresentationSection.createFromManifestJSON(\n\t\t\t\t\tmanifestJSON,\n\t\t\t\t\tproject,\n\t\t\t\t\tkey,\n\t\t\t\t\tindex,\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (manifestJSON.templates) {\n\t\tconst templates = Object.keys(manifestJSON.templates).map((key) => {\n\t\t\tconst cmsvals =\n\t\t\t\tproject?.templates?.find?.((t) => t.key === key)?.editables ?? [];\n\n\t\t\treturn {\n\t\t\t\t...manifestJSON.templates[key],\n\t\t\t\tkey,\n\t\t\t\tsequence: manifestJSON.templates[key].ordering,\n\t\t\t\tindex_asset: {\n\t\t\t\t\turl: resolveURL(manifestJSON.getTemplateAssetPath(key), \"index.html\"),\n\t\t\t\t},\n\t\t\t\tcmsvalkey_set: cmsvals,\n\t\t\t};\n\t\t});\n\n\t\tconst minID = Math.max(...deck.sections.map((s) => s.id));\n\n\t\tdeck.sections.add(\n\t\t\ttemplates.map((template, index) => {\n\t\t\t\tconst section = PresentationSection.createFromTemplate(\n\t\t\t\t\ttemplate,\n\t\t\t\t\tindex,\n\t\t\t\t\tminID,\n\t\t\t\t);\n\t\t\t\tconst projTemplate = project?.templates?.find?.(\n\t\t\t\t\t(s) => s.key === section.key.replace(\"template-\", \"\"),\n\t\t\t\t);\n\t\t\t\tif (projTemplate?.editables) {\n\t\t\t\t\tsection.cmsvalkey_set = projTemplate.editables.map((key) => {\n\t\t\t\t\t\treturn `${key}-autoadjunct-${section.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,UAACpH,CAAC;MAAA,OAAKA,CAAC,CAACmC,EAAE;IAAA,EAAC,EAAC;IAEzDuE,IAAI,CAAC3C,QAAQ,CAACkF,GAAG,CAChBjD,SAAS,CAACoB,GAAG,CAAC,UAACmD,QAAQ,EAAElI,KAAK,EAAK;MAAA,IAAA6K,mBAAA,EAAAC,qBAAA;MAClC,IAAM5F,OAAO,GAAG1D,wCAAmB,CAAC2G,kBAAkB,CACrDD,QAAQ,EACRlI,KAAK,EACL0K,KACD,CAAC;MACD,IAAMK,YAAY,GAAGnC,OAAO,aAAPA,OAAO,wBAAAiC,mBAAA,GAAPjC,OAAO,CAAEjF,SAAS,cAAAkH,mBAAA,wBAAAC,qBAAA,GAAlBD,mBAAA,CAAoBL,IAAI,cAAAM,qBAAA,uBAAxBA,qBAAA,CAAAhO,IAAA,CAAA+N,mBAAA,EACpB,UAAClN,CAAC;QAAA,OAAKA,CAAC,CAACyC,GAAG,KAAK8E,OAAO,CAAC9E,GAAG,CAAC4K,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;MAAA,CACtD,CAAC;MACD,IAAID,YAAY,aAAZA,YAAY,eAAZA,YAAY,CAAE1B,SAAS,EAAE;QAC5BnE,OAAO,CAACnE,aAAa,GAAGgK,YAAY,CAAC1B,SAAS,CAACtE,GAAG,CAAC,UAAC3E,GAAG,EAAK;UAC3D,UAAA+D,MAAA,CAAU/D,GAAG,mBAAA+D,MAAA,CAAgBe,OAAO,CAAC+F,aAAa;QACnD,CAAC,CAAC;MACH;MACA,OAAO/F,OAAO;IACf,CAAC,CACF,CAAC;EACF;EAEA,OAAOb,IAAI;AACZ,CAAC;AAED,IAAA6G,uBAAQ,EAAC,kBAAkB,EAAE3L,gBAAgB,CAAC","ignoreList":[]}
@@ -130,16 +130,18 @@ var PresentationSection = exports.PresentationSection = _basePresentationModel.B
130
130
  slides: "PresentationSlideCollection"
131
131
  },
132
132
  addSlides: function addSlides(slides) {
133
- var _this = this;
133
+ var _options$rootAssetPat,
134
+ _options$templates,
135
+ _options$choicelist,
136
+ _options$getUniqueAdj,
137
+ _this = this;
134
138
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
135
- _lodash.default.defaults(options, {
136
- rootAssetPath: null,
137
- templates: null,
138
- choicelist: null,
139
- getUniqueAdjunctID: function getUniqueAdjunctID() {
140
- return parseInt(_lodash.default.uniqueId(), 10);
141
- }
142
- });
139
+ (_options$rootAssetPat = options.rootAssetPath) !== null && _options$rootAssetPat !== void 0 ? _options$rootAssetPat : options.rootAssetPath = null;
140
+ (_options$templates = options.templates) !== null && _options$templates !== void 0 ? _options$templates : options.templates = null;
141
+ (_options$choicelist = options.choicelist) !== null && _options$choicelist !== void 0 ? _options$choicelist : options.choicelist = null;
142
+ (_options$getUniqueAdj = options.getUniqueAdjunctID) !== null && _options$getUniqueAdj !== void 0 ? _options$getUniqueAdj : options.getUniqueAdjunctID = function () {
143
+ return parseInt(_lodash.default.uniqueId(), 10);
144
+ };
143
145
  if (this.createdByTemplate) {
144
146
  throw new Error("Can not add slides to a template");
145
147
  }
@@ -185,19 +187,18 @@ var PresentationSection = exports.PresentationSection = _basePresentationModel.B
185
187
  * @returns {presentation.PresentationSection}
186
188
  */
187
189
  PresentationSection.createFromSection = function (sectionModel) {
190
+ var _options$rootAssetPat2, _options$selections, _options$choicelist2, _options$screenshots;
188
191
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
189
- _lodash.default.defaults(options, {
190
- rootAssetPath: null,
191
- selections: null,
192
- choicelist: null,
193
- screenshots: new collections.DeckVersionScreenshotCollection()
194
- });
195
- options.screenshots = PresentationSection.screenshotsToMap(options.screenshots);
192
+ (_options$rootAssetPat2 = options.rootAssetPath) !== null && _options$rootAssetPat2 !== void 0 ? _options$rootAssetPat2 : options.rootAssetPath = null;
193
+ (_options$selections = options.selections) !== null && _options$selections !== void 0 ? _options$selections : options.selections = null;
194
+ (_options$choicelist2 = options.choicelist) !== null && _options$choicelist2 !== void 0 ? _options$choicelist2 : options.choicelist = null;
195
+ options.screenshots = PresentationSection.screenshotsToMap((_options$screenshots = options.screenshots) !== null && _options$screenshots !== void 0 ? _options$screenshots : new collections.DeckVersionScreenshotCollection());
196
196
  var html;
197
197
  var css;
198
198
  var assetRoot = (0, _index.getAssetRoot)(sectionModel.index_asset.url());
199
199
  if (options.rootAssetPath) {
200
- var baseRoot = (0, _index.getAssetRoot)(sectionModel.deckversion.index_asset.url());
200
+ var _options$baseRoot;
201
+ var baseRoot = (_options$baseRoot = options.baseRoot) !== null && _options$baseRoot !== void 0 ? _options$baseRoot : (0, _index.getAssetRoot)(sectionModel.deckversion.index_asset.url());
201
202
  var sectionPath = assetRoot.slice(baseRoot.length);
202
203
  html = "".concat(options.rootAssetPath).concat(sectionPath, "index.html");
203
204
  css = "".concat(options.rootAssetPath).concat(sectionPath, "slide.css");
@@ -245,18 +246,15 @@ PresentationSection.createFromSection = function (sectionModel) {
245
246
  * @returns {presentation.PresentationSection}
246
247
  */
247
248
  PresentationSection.createFromAdjunctSection = function (adjunctSectionModel, deckVersionModel) {
248
- var _adjunctSectionModel$, _adjunctSectionModel$2, _adjunctSectionModel$3;
249
+ var _options$rootAssetPat3, _options$selections2, _options$choicelist3, _options$getUniqueAdj2, _options$screenshots2, _adjunctSectionModel$, _adjunctSectionModel$2, _adjunctSectionModel$3;
249
250
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
250
- _lodash.default.defaults(options, {
251
- rootAssetPath: null,
252
- selections: null,
253
- choicelist: null,
254
- getUniqueAdjunctID: function getUniqueAdjunctID() {
255
- return parseInt(_lodash.default.uniqueId(), 10);
256
- },
257
- screenshots: new collections.DeckVersionScreenshotCollection()
258
- });
259
- options.screenshots = PresentationSection.screenshotsToMap(options.screenshots);
251
+ (_options$rootAssetPat3 = options.rootAssetPath) !== null && _options$rootAssetPat3 !== void 0 ? _options$rootAssetPat3 : options.rootAssetPath = null;
252
+ (_options$selections2 = options.selections) !== null && _options$selections2 !== void 0 ? _options$selections2 : options.selections = null;
253
+ (_options$choicelist3 = options.choicelist) !== null && _options$choicelist3 !== void 0 ? _options$choicelist3 : options.choicelist = null;
254
+ (_options$getUniqueAdj2 = options.getUniqueAdjunctID) !== null && _options$getUniqueAdj2 !== void 0 ? _options$getUniqueAdj2 : options.getUniqueAdjunctID = function () {
255
+ return parseInt(_lodash.default.uniqueId(), 10);
256
+ };
257
+ options.screenshots = PresentationSection.screenshotsToMap((_options$screenshots2 = options.screenshots) !== null && _options$screenshots2 !== void 0 ? _options$screenshots2 : new collections.DeckVersionScreenshotCollection());
260
258
  var keyID = adjunctSectionModel.id || (adjunctSectionModel.creator_autoadjunct ? adjunctSectionModel.creator_autoadjunct.id : null);
261
259
  var key = null;
262
260
  if (adjunctSectionModel.key) {
@@ -322,19 +320,18 @@ PresentationSection.createFromAdjunctSection = function (adjunctSectionModel, de
322
320
  return section;
323
321
  };
324
322
  PresentationSection.createFromImpostorSection = function (slideModel) {
323
+ var _options$rootAssetPat4, _options$selections3, _options$choicelist4, _options$screenshots3;
325
324
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
326
- _lodash.default.defaults(options, {
327
- rootAssetPath: null,
328
- selections: null,
329
- choicelist: null,
330
- screenshots: new collections.DeckVersionScreenshotCollection()
331
- });
332
- options.screenshots = PresentationSection.screenshotsToMap(options.screenshots);
325
+ (_options$rootAssetPat4 = options.rootAssetPath) !== null && _options$rootAssetPat4 !== void 0 ? _options$rootAssetPat4 : options.rootAssetPath = null;
326
+ (_options$selections3 = options.selections) !== null && _options$selections3 !== void 0 ? _options$selections3 : options.selections = null;
327
+ (_options$choicelist4 = options.choicelist) !== null && _options$choicelist4 !== void 0 ? _options$choicelist4 : options.choicelist = null;
328
+ options.screenshots = PresentationSection.screenshotsToMap((_options$screenshots3 = options.screenshots) !== null && _options$screenshots3 !== void 0 ? _options$screenshots3 : new collections.DeckVersionScreenshotCollection());
333
329
  var html;
334
330
  var css;
335
331
  var assetRoot = (0, _index.getAssetRoot)(slideModel.index_asset.url());
336
332
  if (options.rootAssetPath) {
337
- var baseRoot = (0, _index.getAssetRoot)(slideModel.section.deckversion.index_asset.url());
333
+ var _options$baseRoot2;
334
+ var baseRoot = (_options$baseRoot2 = options.baseRoot) !== null && _options$baseRoot2 !== void 0 ? _options$baseRoot2 : (0, _index.getAssetRoot)(slideModel.section.deckversion.index_asset.url());
338
335
  var sectionPath = assetRoot.slice(baseRoot.length);
339
336
  html = "".concat(options.rootAssetPath).concat(sectionPath, "index.html");
340
337
  css = "".concat(options.rootAssetPath).concat(sectionPath, "slide.css");
@@ -423,7 +420,7 @@ PresentationSection.createFromManifestImpostor = function (section, project, ind
423
420
  return presentationSection;
424
421
  };
425
422
  PresentationSection.createFromAutoAdjunct = function (model) {
426
- var _autoAdjunct$template;
423
+ var _options$allowConvert, _options$visible, _options$index, _options$deckversionI, _options$sequence, _options$impostor, _options$screenshots4, _autoAdjunct$template;
427
424
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
428
425
  var requiredKeys = ["index", "deckversionID"];
429
426
  for (var _i = 0, _requiredKeys = requiredKeys; _i < _requiredKeys.length; _i++) {
@@ -432,16 +429,14 @@ PresentationSection.createFromAutoAdjunct = function (model) {
432
429
  throw new Error("Missing required key '".concat(key, "'."));
433
430
  }
434
431
  }
435
- var options = _lodash.default.defaults(opts, {
436
- allowConvert: true,
437
- visible: true,
438
- index: -1,
439
- deckversionID: -1,
440
- sequence: opts.index,
441
- impostor: false,
442
- screenshots: new collections.DeckVersionScreenshotCollection()
443
- });
444
- options.screenshots = PresentationSection.screenshotsToMap(options.screenshots);
432
+ var options = opts;
433
+ (_options$allowConvert = options.allowConvert) !== null && _options$allowConvert !== void 0 ? _options$allowConvert : options.allowConvert = true;
434
+ (_options$visible = options.visible) !== null && _options$visible !== void 0 ? _options$visible : options.visible = true;
435
+ (_options$index = options.index) !== null && _options$index !== void 0 ? _options$index : options.index = -1;
436
+ (_options$deckversionI = options.deckversionID) !== null && _options$deckversionI !== void 0 ? _options$deckversionI : options.deckversionID = -1;
437
+ (_options$sequence = options.sequence) !== null && _options$sequence !== void 0 ? _options$sequence : options.sequence = opts.index;
438
+ (_options$impostor = options.impostor) !== null && _options$impostor !== void 0 ? _options$impostor : options.impostor = false;
439
+ options.screenshots = PresentationSection.screenshotsToMap((_options$screenshots4 = options.screenshots) !== null && _options$screenshots4 !== void 0 ? _options$screenshots4 : new collections.DeckVersionScreenshotCollection());
445
440
  var tags = PresentationSection.getTags({
446
441
  isAutoAdjunct: true,
447
442
  key: model.key,
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-section.js","names":["require","collections","_interopRequireWildcard","_models","_basePresentationModel","_presentationSlide","_lodash","_interopRequireDefault","_index","_stateRegister","_utils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","PresentationSection","exports","BasePresentationModel","extend","props","id","adjunctID","autoAdjunctID","type","templateID","createdByAutoAdjunct","createdByTemplate","adjunctSlideLimit","namespacedKey","html","css","index","key","sequence","image","_orig_image","thumbnail","custom","temporary","title","visible","deckversion","selectionID","editable","titleEditable","notesEditable","tagsEditable","tags","impostor","cmsvalkey_set","isWelcome","isSlide","isSection","children","adjunct","template","slides","addSlides","_this","options","undefined","_","defaults","rootAssetPath","templates","choicelist","getUniqueAdjunctID","parseInt","uniqueId","Error","add","map","slide","modelName","PresentationSlide","createFromAdjunctSlide","createFromSlide","url","_url","isNumber","AdjunctSlideModel","AdjunctSectionModel","SlideModel","SectionModel","equals","other","createFromSection","sectionModel","selections","screenshots","DeckVersionScreenshotCollection","screenshotsToMap","assetRoot","getAssetRoot","index_asset","baseRoot","sectionPath","slice","concat","config","getVisibilityAndSequence","getTags","section","adjunctslide_limit","getThumbnail","indexOf","namespaced_key","createFromAdjunctSection","adjunctSectionModel","deckVersionModel","_adjunctSectionModel$","_adjunctSectionModel$2","_adjunctSectionModel$3","keyID","creator_autoadjunct","image_256","created_by_autoadjunct","Boolean","origPath","orig_path","image_original","createFromImpostorSection","slideModel","createFromManifestJSON","manifestJSON","project","sectionKey","_projectSection$edita","projectSection","sections","find","s","titles","resolveURL","getAssetPath","ordering","editables","slideKeys","slideKey","startsWith","split","slideIndex","createFromManifestImpostor","_projectSection$edita2","presentationSection","createFromAutoAdjunct","model","_autoAdjunct$template","opts","requiredKeys","_i","_requiredKeys","allowConvert","deckversionID","isAutoAdjunct","autoAdjunct","AutoAdjunctModel","autoAdjunctSection","name","_autoAdjunctSection$c","missingKeys","k","_toConsumableArray2","createFromTemplate","minID","templateModel","TemplateModel","DeckVersionModel","templateAssetRoot","Number","register"],"sources":["../../src/presentation/presentation-section.js"],"sourcesContent":["import \"./presentation-slides.js\";\n\nimport * as collections from \"../collections.js\";\n\nimport {\n\tAdjunctSectionModel,\n\tAdjunctSlideModel,\n\tAutoAdjunctModel,\n\tDeckVersionModel,\n\tSectionModel,\n\tSlideModel,\n\tTemplateModel,\n} from \"../models.js\";\n\nimport { BasePresentationModel } from \"./base-presentation-model.js\";\nimport { PresentationSlide } from \"./presentation-slide.js\";\nimport _ from \"lodash\";\nimport { getAssetRoot } from \"../index.js\";\nimport { register } from \"../state-register.js\";\nimport { resolveURL } from \"../utils.js\";\n\n/**\n * @constructor\n * @alias presentation.PresentationSection\n * @extends presentation.BasePresentationModel\n */\nexport const PresentationSection = BasePresentationModel.extend(\n\t/** @lends presentation.PresentationSection# */ {\n\t\t/**\n\t\t * @property {number} id\n\t\t * @property {number} adjunctID\n\t\t * @property {number} autoAdjunctID\n\t\t * @property {number} templateID\n\t\t * @property {boolean} createdByAutoAdjunct\n\t\t * @property {boolean} createdByTemplate\n\t\t * @property {number} adjunctSlideLimit\n\t\t * @property {string} namespacedKey\n\t\t * @property {string} html\n\t\t * @property {string} css\n\t\t * @property {number} index\n\t\t * @property {string} key\n\t\t * @property {number} sequence\n\t\t * @property {string} image\n\t\t * @property {string} _orig_image\n\t\t * @property {string} thumbnail\n\t\t * @property {boolean} custom\n\t\t * @property {boolean} temporary\n\t\t * @property {string} title\n\t\t * @property {boolean} visible\n\t\t * @property {number} deckversion\n\t\t * @property {number} selectionID\n\t\t * @property {bool} editable\n\t\t * @property {bool} titleEditable\n\t\t * @property {bool} notesEditable\n\t\t * @property {bool} tagsEditable\n\t\t * @property {array} tags\n\t\t * @property {boolean} impostor\n\t\t * @property {boolean} isWelcome\n\t\t * @property {string[]} cmsvalkey_set\n\t\t */\n\t\tprops: {\n\t\t\tid: \"number\",\n\t\t\tadjunctID: \"number\",\n\t\t\tautoAdjunctID: {\n\t\t\t\ttype: \"number\",\n\t\t\t\tdefault: null,\n\t\t\t},\n\t\t\ttemplateID: {\n\t\t\t\ttype: \"number\",\n\t\t\t\tdefault: null,\n\t\t\t},\n\t\t\tcreatedByAutoAdjunct: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t},\n\t\t\tcreatedByTemplate: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t},\n\t\t\tadjunctSlideLimit: {\n\t\t\t\ttype: \"number\",\n\t\t\t\tdefault: 0,\n\t\t\t},\n\t\t\tnamespacedKey: \"string\",\n\t\t\thtml: \"string\",\n\t\t\tcss: \"string\",\n\t\t\tindex: \"number\",\n\t\t\tkey: \"string\",\n\t\t\tsequence: \"number\",\n\t\t\timage: \"string\",\n\t\t\t_orig_image: \"string\",\n\t\t\tthumbnail: \"string\",\n\t\t\tcustom: \"boolean\",\n\t\t\ttemporary: \"boolean\",\n\t\t\ttitle: \"string\",\n\t\t\tvisible: \"boolean\",\n\t\t\tdeckversion: \"number\",\n\t\t\tselectionID: \"number\",\n\t\t\teditable: \"boolean\",\n\t\t\ttitleEditable: \"boolean\",\n\t\t\tnotesEditable: \"boolean\",\n\t\t\ttagsEditable: \"boolean\",\n\t\t\ttags: \"array\",\n\t\t\timpostor: \"boolean\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t\tisWelcome: { type: \"boolean\", default: false },\n\t\t\tisSlide: { type: \"boolean\", default: false },\n\t\t\tisSection: { type: \"boolean\", default: true },\n\t\t},\n\n\t\t/**\n\t\t * @property {models.AdjunctModel} adjunct\n\t\t */\n\t\tchildren: {\n\t\t\tadjunct: \"AdjunctModel\",\n\t\t\ttemplate: \"TemplateModel\",\n\t\t},\n\n\t\t/**\n\t\t * @property {presentation.PresentationSlideCollection} slides\n\t\t */\n\t\tcollections: {\n\t\t\tslides: \"PresentationSlideCollection\",\n\t\t},\n\n\t\taddSlides(slides, options = {}) {\n\t\t\t_.defaults(options, {\n\t\t\t\trootAssetPath: null,\n\t\t\t\ttemplates: null,\n\t\t\t\tchoicelist: null,\n\t\t\t\tgetUniqueAdjunctID: () => {\n\t\t\t\t\treturn parseInt(_.uniqueId(), 10);\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tif (this.createdByTemplate) {\n\t\t\t\tthrow new Error(\"Can not add slides to a template\");\n\t\t\t}\n\n\t\t\tthis.slides.add(\n\t\t\t\tslides.map((slide) => {\n\t\t\t\t\tif (slide.modelName === \"adjunctslides\") {\n\t\t\t\t\t\treturn PresentationSlide.createFromAdjunctSlide(\n\t\t\t\t\t\t\tslide,\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\toptions,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn PresentationSlide.createFromSlide(slide, options);\n\t\t\t\t}),\n\t\t\t);\n\t\t},\n\n\t\turl() {\n\t\t\tif (!this._url) {\n\t\t\t\tif (_.isNumber(this.adjunctID) && this.impostor) {\n\t\t\t\t\tthis._url = new AdjunctSlideModel({ id: this.adjunctID }).url();\n\t\t\t\t} else if (_.isNumber(this.adjunctID)) {\n\t\t\t\t\tthis._url = new AdjunctSectionModel({ id: this.adjunctID }).url();\n\t\t\t\t} else if (this.impostor) {\n\t\t\t\t\tthis._url = new SlideModel({ id: this.id }).url();\n\t\t\t\t} else {\n\t\t\t\t\tthis._url = new SectionModel({ id: this.id }).url();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this._url;\n\t\t},\n\n\t\tequals(other) {\n\t\t\treturn this.url() === other.url();\n\t\t},\n\t},\n);\n\n/**\n * @function createFromSection\n * @memberof presentation.PresentationSection\n * @param {models.SectionModel} sectionModel\n * @param {object} [options]\n * @returns {presentation.PresentationSection}\n */\nPresentationSection.createFromSection = function (sectionModel, options = {}) {\n\t_.defaults(options, {\n\t\trootAssetPath: null,\n\t\tselections: null,\n\t\tchoicelist: null,\n\t\tscreenshots: new collections.DeckVersionScreenshotCollection(),\n\t});\n\n\toptions.screenshots = PresentationSection.screenshotsToMap(\n\t\toptions.screenshots,\n\t);\n\n\tlet html;\n\tlet css;\n\n\tconst assetRoot = getAssetRoot(sectionModel.index_asset.url());\n\n\tif (options.rootAssetPath) {\n\t\tconst baseRoot = getAssetRoot(sectionModel.deckversion.index_asset.url());\n\t\tconst sectionPath = assetRoot.slice(baseRoot.length);\n\n\t\thtml = `${options.rootAssetPath}${sectionPath}index.html`;\n\t\tcss = `${options.rootAssetPath}${sectionPath}slide.css`;\n\t} else {\n\t\thtml = `${assetRoot}index.html`;\n\t\tcss = `${assetRoot}slide.css`;\n\t}\n\n\tconst config = PresentationSection.getVisibilityAndSequence(\n\t\tsectionModel,\n\t\toptions,\n\t);\n\n\tconst tags = PresentationSection.getTags(sectionModel, options);\n\n\tconst section = new PresentationSection({\n\t\tid: sectionModel.id,\n\t\tadjunctID: null,\n\t\thtml,\n\t\tcss,\n\t\tkey: sectionModel.key,\n\t\tadjunctSlideLimit: sectionModel.adjunctslide_limit,\n\t\tthumbnail: PresentationSection.getThumbnail(\n\t\t\tsectionModel,\n\t\t\toptions.screenshots,\n\t\t),\n\t\tcustom: false,\n\t\timpostor: false,\n\t\ttitle: sectionModel.title,\n\t\tdeckversion: sectionModel.deckversion.id,\n\t\teditable: tags.indexOf(\"editable\") > -1,\n\t\t// By default this is true for a deck slide. These can be changed later in PM depending\n\t\t// on the logged in user and properties of an AutoAdjunct\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t\ttags,\n\t\tindex: config.sequence,\n\t\tsequence: config.sequence,\n\t\tvisible: config.visible,\n\t\tselectionID: config.selectionID,\n\t\tcmsvalkey_set: sectionModel.cmsvalkey_set,\n\t\tnamespacedKey: sectionModel.namespaced_key,\n\t});\n\n\treturn section;\n};\n\n/**\n * @function createFromAdjunctSection\n * @memberof presentation.PresentationSection\n * @param {models.AdjunctSectionModel} adjunctSectionModel\n * @param {models.DeckVersionMOdel} deckVersionModel\n * @param {object} [options]\n * @returns {presentation.PresentationSection}\n */\nPresentationSection.createFromAdjunctSection = function (\n\tadjunctSectionModel,\n\tdeckVersionModel,\n\toptions = {},\n) {\n\t_.defaults(options, {\n\t\trootAssetPath: null,\n\t\tselections: null,\n\t\tchoicelist: null,\n\t\tgetUniqueAdjunctID: () => {\n\t\t\treturn parseInt(_.uniqueId(), 10);\n\t\t},\n\t\tscreenshots: new collections.DeckVersionScreenshotCollection(),\n\t});\n\n\toptions.screenshots = PresentationSection.screenshotsToMap(\n\t\toptions.screenshots,\n\t);\n\n\tconst keyID =\n\t\tadjunctSectionModel.id ||\n\t\t(adjunctSectionModel.creator_autoadjunct\n\t\t\t? adjunctSectionModel.creator_autoadjunct.id\n\t\t\t: null);\n\n\tlet key = null;\n\n\tif (adjunctSectionModel.key) {\n\t\tkey = adjunctSectionModel.key;\n\t} else if (keyID) {\n\t\tkey = `adjunct-${keyID}`;\n\t\tadjunctSectionModel.key = key;\n\t}\n\n\tconst config = PresentationSection.getVisibilityAndSequence(\n\t\tadjunctSectionModel,\n\t\toptions,\n\t);\n\n\tconst tags = PresentationSection.getTags(adjunctSectionModel, options);\n\tconst autoAdjunctID = adjunctSectionModel.creator_autoadjunct?.id || null;\n\n\tconst section = new PresentationSection({\n\t\tid: options.getUniqueAdjunctID(),\n\t\tadjunct: adjunctSectionModel.adjunct,\n\t\tadjunctID: adjunctSectionModel.id,\n\t\tautoAdjunctID,\n\t\tkey,\n\t\tthumbnail: adjunctSectionModel.image_256,\n\t\tcustom: !adjunctSectionModel.created_by_autoadjunct,\n\t\tcreatedByAutoAdjunct: adjunctSectionModel.created_by_autoadjunct,\n\t\tcreatedByTemplate: Boolean(adjunctSectionModel.template),\n\t\timpostor: tags.indexOf(\"section-header\") > -1,\n\t\ttags: tags,\n\t\ttemporary: adjunctSectionModel.created_by_autoadjunct,\n\t\ttitle: adjunctSectionModel.title,\n\t\tdeckversion: deckVersionModel.id,\n\t\teditable: false,\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t\tindex: config.sequence,\n\t\tsequence: config.sequence,\n\t\tvisible: config.visible,\n\t\tcmsvalkey_set: adjunctSectionModel.template?.cmsvalkey_set || [],\n\t\ttemplateID: adjunctSectionModel.template?.id || null,\n\t\ttemplate: adjunctSectionModel.template || null,\n\t\tnamespacedKey: adjunctSectionModel.namespaced_key,\n\t});\n\n\tif (adjunctSectionModel.template) {\n\t\tif (!adjunctSectionModel.template.index_asset) {\n\t\t\tthrow new Error(\n\t\t\t\t\"Template missing index_asset. Do you have the whole template available?\",\n\t\t\t);\n\t\t}\n\t\tconst origPath = adjunctSectionModel.template.index_asset.orig_path;\n\t\tlet html;\n\t\tlet css;\n\n\t\tif (options.rootAssetPath) {\n\t\t\thtml = `${options.rootAssetPath}${origPath}/index.html`;\n\t\t\tcss = `${options.rootAssetPath}${origPath}/slide.css`;\n\t\t} else {\n\t\t\tconst assetRoot = getAssetRoot(\n\t\t\t\tadjunctSectionModel.template.index_asset.url(),\n\t\t\t);\n\t\t\thtml = `${assetRoot}index.html`;\n\t\t\tcss = `${assetRoot}slide.css`;\n\t\t}\n\t\tsection.html = html;\n\t\tsection.css = css;\n\t\tsection.thumbnail =\n\t\t\t// Try and use autoadjunct screenshot (if there is one), otherwise\n\t\t\t// use the template's image as a fallback\n\t\t\tPresentationSection.getThumbnail(\n\t\t\t\tadjunctSectionModel.creator_autoadjunct,\n\t\t\t\toptions.screenshots,\n\t\t\t) || adjunctSectionModel.template.image_256;\n\t} else {\n\t\tsection.image = adjunctSectionModel.image_original;\n\t}\n\n\treturn section;\n};\n\nPresentationSection.createFromImpostorSection = function (\n\tslideModel,\n\toptions = {},\n) {\n\t_.defaults(options, {\n\t\trootAssetPath: null,\n\t\tselections: null,\n\t\tchoicelist: null,\n\t\tscreenshots: new collections.DeckVersionScreenshotCollection(),\n\t});\n\n\toptions.screenshots = PresentationSection.screenshotsToMap(\n\t\toptions.screenshots,\n\t);\n\n\tlet html;\n\tlet css;\n\n\tconst assetRoot = getAssetRoot(slideModel.index_asset.url());\n\n\tif (options.rootAssetPath) {\n\t\tconst baseRoot = getAssetRoot(\n\t\t\tslideModel.section.deckversion.index_asset.url(),\n\t\t);\n\t\tconst sectionPath = assetRoot.slice(baseRoot.length);\n\n\t\thtml = `${options.rootAssetPath}${sectionPath}index.html`;\n\t\tcss = `${options.rootAssetPath}${sectionPath}slide.css`;\n\t} else {\n\t\thtml = `${assetRoot}index.html`;\n\t\tcss = `${assetRoot}slide.css`;\n\t}\n\n\tconst config = PresentationSection.getVisibilityAndSequence(\n\t\tslideModel,\n\t\toptions,\n\t);\n\n\tconst tags = PresentationSection.getTags(slideModel, options);\n\tconst section = new PresentationSection({\n\t\tid: slideModel.id,\n\t\tadjunctID: null,\n\t\thtml,\n\t\tcss,\n\t\tkey: slideModel.key,\n\t\tadjunctSlideLimit: slideModel.adjunctslide_limit,\n\t\tthumbnail: PresentationSection.getThumbnail(\n\t\t\tslideModel,\n\t\t\toptions.screenshots,\n\t\t),\n\t\tcustom: false,\n\t\timpostor: true,\n\t\ttitle: slideModel.title,\n\t\tdeckversion: slideModel.section.deckversion.id,\n\t\teditable: tags.indexOf(\"editable\") > -1,\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t\ttags,\n\t\tindex: config.sequence,\n\t\tsequence: config.sequence,\n\t\tvisible: config.visible,\n\t\tselectionID: config.selectionID,\n\t\tcmsvalkey_set: slideModel.cmsvalkey_set,\n\t\tnamespacedKey: slideModel.namespaced_key,\n\t});\n\n\treturn section;\n};\n\nPresentationSection.createFromManifestJSON = function (\n\tmanifestJSON,\n\tproject,\n\tsectionKey,\n\tindex,\n) {\n\tconst projectSection = project?.sections.find((s) => s.key === sectionKey);\n\n\tconst section = new PresentationSection({\n\t\tid: parseInt(_.uniqueId(), 10),\n\t\tindex,\n\t\ttitle: manifestJSON.titles[sectionKey],\n\t\thtml: resolveURL(manifestJSON.getAssetPath(sectionKey), \"index.html\"),\n\t\tcss: resolveURL(manifestJSON.getAssetPath(sectionKey), \"slide.css\"),\n\t\tkey: sectionKey,\n\t\tsequence: manifestJSON.ordering[sectionKey] - 1,\n\t\tthumbnail: null,\n\t\tcustom: false,\n\t\tvisible: true,\n\t\tdeckversion: 1,\n\t\ttags: manifestJSON.tags[sectionKey] || null,\n\t\tcmsvalkey_set: projectSection?.editables ?? [],\n\t});\n\n\tconst slideKeys = Object.keys(manifestJSON.titles).filter((slideKey) => {\n\t\treturn slideKey.startsWith(sectionKey) && slideKey.split(\"/\").length > 1;\n\t});\n\n\tsection.slides.add(\n\t\tslideKeys.map((key, slideIndex) => {\n\t\t\treturn PresentationSlide.createFromManifestJSON(\n\t\t\t\tmanifestJSON,\n\t\t\t\tproject,\n\t\t\t\tkey,\n\t\t\t\tsection.id,\n\t\t\t\tslideIndex,\n\t\t\t);\n\t\t}),\n\t);\n\n\treturn section;\n};\n\nPresentationSection.createFromManifestImpostor = function (\n\tsection,\n\tproject,\n\tindex,\n) {\n\tconst slides = section.slides || [];\n\tsection.slides = null;\n\n\t// Single section with slides\n\tconst projectSection = project?.sections[0].slides.find(\n\t\t(s) => s.key === section.key,\n\t);\n\n\tconst presentationSection = new PresentationSection({\n\t\tid: parseInt(_.uniqueId(), 10),\n\t\tthumbnail: null,\n\t\tcustom: false,\n\t\tvisible: true,\n\t\tdeckversion: 1,\n\t\tindex,\n\t\t...section,\n\t\tcmsvalkey_set: projectSection?.editables ?? [],\n\t});\n\n\tslides.forEach((slide, index) => {\n\t\tpresentationSection.slides.add(\n\t\t\tPresentationSlide.createFromManifestImpostor(\n\t\t\t\tslide,\n\t\t\t\tsection,\n\t\t\t\tproject,\n\t\t\t\tindex,\n\t\t\t\tpresentationSection.id,\n\t\t\t),\n\t\t);\n\t});\n\n\treturn presentationSection;\n};\n\nPresentationSection.createFromAutoAdjunct = function (model, opts = {}) {\n\tconst requiredKeys = [\"index\", \"deckversionID\"];\n\tfor (const key of requiredKeys) {\n\t\tif (typeof opts[key] === \"undefined\") {\n\t\t\tthrow new Error(`Missing required key '${key}'.`);\n\t\t}\n\t}\n\n\tconst options = _.defaults(opts, {\n\t\tallowConvert: true,\n\t\tvisible: true,\n\t\tindex: -1,\n\t\tdeckversionID: -1,\n\t\tsequence: opts.index,\n\t\timpostor: false,\n\t\tscreenshots: new collections.DeckVersionScreenshotCollection(),\n\t});\n\n\toptions.screenshots = PresentationSection.screenshotsToMap(\n\t\toptions.screenshots,\n\t);\n\n\tconst tags = PresentationSection.getTags(\n\t\t{\n\t\t\tisAutoAdjunct: true,\n\t\t\tkey: model.key,\n\t\t\ttags: model.tags,\n\t\t},\n\t\toptions,\n\t);\n\n\tconst autoAdjunct = new AutoAdjunctModel(model);\n\n\tconst autoAdjunctSection = new PresentationSection({\n\t\tid: options.id || autoAdjunct.id,\n\t\tadjunctID: autoAdjunct.id,\n\t\tautoAdjunctID: autoAdjunct.id,\n\t\tcreatedByTemplate: autoAdjunct.template !== null,\n\t\ttemplateID: autoAdjunct.template?.id || null,\n\t\ttemplate: autoAdjunct.template || null,\n\t\thtml: \"\",\n\t\tcss: \"\",\n\t\tsequence: options.sequence,\n\t\tindex: options.index,\n\t\tkey: autoAdjunct.key,\n\t\tcreatedByAutoAdjunct: false,\n\t\tthumbnail: PresentationSection.getThumbnail(\n\t\t\tautoAdjunct,\n\t\t\toptions.screenshots,\n\t\t),\n\t\ttemporary: true,\n\t\ttitle: autoAdjunct.name,\n\t\tvisible: options.visible,\n\t\tallowConvert: options.allowConvert,\n\t\tdeckversion: options.deckversionID,\n\t\timpostor: options.impostor,\n\t\ttags,\n\t\tcmsvalkey_set: autoAdjunct.cmsvalkey_set,\n\t\tnamespacedKey: autoAdjunct.namespaced_key,\n\t\teditable: true,\n\t\ttitleEditable: true,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t});\n\n\tif (autoAdjunct.template) {\n\t\t// If we've found a new screenshot for it, we don't want to override it here\n\t\tif (!autoAdjunctSection.thumbnail) {\n\t\t\tautoAdjunctSection.thumbnail = autoAdjunct.template.image_256;\n\t\t}\n\t\tautoAdjunctSection.createdByTemplate = true;\n\t\tautoAdjunctSection.templateID = autoAdjunct.template.id;\n\t\tautoAdjunctSection.html = autoAdjunct.template.index_asset.url();\n\n\t\tconst missingKeys = autoAdjunct.template.cmsvalkey_set\n\t\t\t.filter((t) => {\n\t\t\t\treturn !autoAdjunctSection.cmsvalkey_set.find((k) => k.startsWith(t));\n\t\t\t})\n\t\t\t.map((t) => {\n\t\t\t\treturn `${t}-autoadjunct-${autoAdjunct.id}`;\n\t\t\t});\n\n\t\tautoAdjunctSection.cmsvalkey_set.push(...missingKeys);\n\t} else {\n\t\tautoAdjunctSection.image = autoAdjunct.image_original;\n\t}\n\n\treturn autoAdjunctSection;\n};\n\nPresentationSection.createFromTemplate = function (\n\ttemplate,\n\tindex,\n\tminID = 0,\n\toptions = {},\n) {\n\tconst templateModel = new TemplateModel(template);\n\n\t_.defaults(options, {\n\t\trootAssetPath: null,\n\t});\n\n\tconst deckversion = new DeckVersionModel(templateModel.deckversion);\n\n\tlet html;\n\tlet css;\n\n\tif (options.rootAssetPath) {\n\t\tconst origPath = templateModel.index_asset.orig_path;\n\t\thtml = `${options.rootAssetPath}${origPath}/index.html`;\n\t\tcss = `${options.rootAssetPath}${origPath}/slide.css`;\n\t} else {\n\t\tconst templateAssetRoot = getAssetRoot(templateModel.index_asset.url());\n\t\thtml = `${templateAssetRoot}index.html`;\n\t\tcss = `${templateAssetRoot}slide.css`;\n\t}\n\n\tconst presentationSection = new PresentationSection({\n\t\tid: minID + parseInt(_.uniqueId(), 10),\n\t\ttemplateID: templateModel.id,\n\t\ttemplate: templateModel,\n\t\tkey: `template-${templateModel.key}`,\n\t\ttitle: templateModel.title,\n\t\thtml,\n\t\tcss,\n\t\tcustom: false,\n\t\tvisible: true,\n\t\tthumbnail: templateModel.image_256,\n\t\t// Makes sure templates are rendered with unique IDs\n\t\tautoAdjunctID: Number(_.uniqueId()),\n\t\tdeckversion: deckversion.id,\n\t\t// Add a large number here to make sure it's always at the end\n\t\t// of a list of sections\n\t\tsequence: 9000 + templateModel.sequence,\n\t\tcreatedByTemplate: true,\n\t\tindex,\n\t\tcmsvalkey_set: [],\n\t\tnamespacedKey: templateModel.namespaced_key,\n\t\teditable: false,\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t});\n\n\treturn presentationSection;\n};\n\nregister(\"PresentationSection\", PresentationSection);\n"],"mappings":";;;;;;;;;;AAAAA,OAAA;AAEA,IAAAC,WAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAUA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAAyC,SAAAE,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,wBAAAS,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C,qBAAqB,EAAE3J,mBAAmB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"presentation-section.js","names":["require","collections","_interopRequireWildcard","_models","_basePresentationModel","_presentationSlide","_lodash","_interopRequireDefault","_index","_stateRegister","_utils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","PresentationSection","exports","BasePresentationModel","extend","props","id","adjunctID","autoAdjunctID","type","templateID","createdByAutoAdjunct","createdByTemplate","adjunctSlideLimit","namespacedKey","html","css","index","key","sequence","image","_orig_image","thumbnail","custom","temporary","title","visible","deckversion","selectionID","editable","titleEditable","notesEditable","tagsEditable","tags","impostor","cmsvalkey_set","isWelcome","isSlide","isSection","children","adjunct","template","slides","addSlides","_options$rootAssetPat","_options$templates","_options$choicelist","_options$getUniqueAdj","_this","options","undefined","rootAssetPath","templates","choicelist","getUniqueAdjunctID","parseInt","_","uniqueId","Error","add","map","slide","modelName","PresentationSlide","createFromAdjunctSlide","createFromSlide","url","_url","isNumber","AdjunctSlideModel","AdjunctSectionModel","SlideModel","SectionModel","equals","other","createFromSection","sectionModel","_options$rootAssetPat2","_options$selections","_options$choicelist2","_options$screenshots","selections","screenshots","screenshotsToMap","DeckVersionScreenshotCollection","assetRoot","getAssetRoot","index_asset","_options$baseRoot","baseRoot","sectionPath","slice","concat","config","getVisibilityAndSequence","getTags","section","adjunctslide_limit","getThumbnail","indexOf","namespaced_key","createFromAdjunctSection","adjunctSectionModel","deckVersionModel","_options$rootAssetPat3","_options$selections2","_options$choicelist3","_options$getUniqueAdj2","_options$screenshots2","_adjunctSectionModel$","_adjunctSectionModel$2","_adjunctSectionModel$3","keyID","creator_autoadjunct","image_256","created_by_autoadjunct","Boolean","origPath","orig_path","image_original","createFromImpostorSection","slideModel","_options$rootAssetPat4","_options$selections3","_options$choicelist4","_options$screenshots3","_options$baseRoot2","createFromManifestJSON","manifestJSON","project","sectionKey","_projectSection$edita","projectSection","sections","find","s","titles","resolveURL","getAssetPath","ordering","editables","slideKeys","slideKey","startsWith","split","slideIndex","createFromManifestImpostor","_projectSection$edita2","presentationSection","createFromAutoAdjunct","model","_options$allowConvert","_options$visible","_options$index","_options$deckversionI","_options$sequence","_options$impostor","_options$screenshots4","_autoAdjunct$template","opts","requiredKeys","_i","_requiredKeys","allowConvert","deckversionID","isAutoAdjunct","autoAdjunct","AutoAdjunctModel","autoAdjunctSection","name","_autoAdjunctSection$c","missingKeys","k","_toConsumableArray2","createFromTemplate","minID","templateModel","TemplateModel","defaults","DeckVersionModel","templateAssetRoot","Number","register"],"sources":["../../src/presentation/presentation-section.js"],"sourcesContent":["import \"./presentation-slides.js\";\n\nimport * as collections from \"../collections.js\";\n\nimport {\n\tAdjunctSectionModel,\n\tAdjunctSlideModel,\n\tAutoAdjunctModel,\n\tDeckVersionModel,\n\tSectionModel,\n\tSlideModel,\n\tTemplateModel,\n} from \"../models.js\";\n\nimport { BasePresentationModel } from \"./base-presentation-model.js\";\nimport { PresentationSlide } from \"./presentation-slide.js\";\nimport _ from \"lodash\";\nimport { getAssetRoot } from \"../index.js\";\nimport { register } from \"../state-register.js\";\nimport { resolveURL } from \"../utils.js\";\n\n/**\n * @constructor\n * @alias presentation.PresentationSection\n * @extends presentation.BasePresentationModel\n */\nexport const PresentationSection = BasePresentationModel.extend(\n\t/** @lends presentation.PresentationSection# */ {\n\t\t/**\n\t\t * @property {number} id\n\t\t * @property {number} adjunctID\n\t\t * @property {number} autoAdjunctID\n\t\t * @property {number} templateID\n\t\t * @property {boolean} createdByAutoAdjunct\n\t\t * @property {boolean} createdByTemplate\n\t\t * @property {number} adjunctSlideLimit\n\t\t * @property {string} namespacedKey\n\t\t * @property {string} html\n\t\t * @property {string} css\n\t\t * @property {number} index\n\t\t * @property {string} key\n\t\t * @property {number} sequence\n\t\t * @property {string} image\n\t\t * @property {string} _orig_image\n\t\t * @property {string} thumbnail\n\t\t * @property {boolean} custom\n\t\t * @property {boolean} temporary\n\t\t * @property {string} title\n\t\t * @property {boolean} visible\n\t\t * @property {number} deckversion\n\t\t * @property {number} selectionID\n\t\t * @property {bool} editable\n\t\t * @property {bool} titleEditable\n\t\t * @property {bool} notesEditable\n\t\t * @property {bool} tagsEditable\n\t\t * @property {array} tags\n\t\t * @property {boolean} impostor\n\t\t * @property {boolean} isWelcome\n\t\t * @property {string[]} cmsvalkey_set\n\t\t */\n\t\tprops: {\n\t\t\tid: \"number\",\n\t\t\tadjunctID: \"number\",\n\t\t\tautoAdjunctID: {\n\t\t\t\ttype: \"number\",\n\t\t\t\tdefault: null,\n\t\t\t},\n\t\t\ttemplateID: {\n\t\t\t\ttype: \"number\",\n\t\t\t\tdefault: null,\n\t\t\t},\n\t\t\tcreatedByAutoAdjunct: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t},\n\t\t\tcreatedByTemplate: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t},\n\t\t\tadjunctSlideLimit: {\n\t\t\t\ttype: \"number\",\n\t\t\t\tdefault: 0,\n\t\t\t},\n\t\t\tnamespacedKey: \"string\",\n\t\t\thtml: \"string\",\n\t\t\tcss: \"string\",\n\t\t\tindex: \"number\",\n\t\t\tkey: \"string\",\n\t\t\tsequence: \"number\",\n\t\t\timage: \"string\",\n\t\t\t_orig_image: \"string\",\n\t\t\tthumbnail: \"string\",\n\t\t\tcustom: \"boolean\",\n\t\t\ttemporary: \"boolean\",\n\t\t\ttitle: \"string\",\n\t\t\tvisible: \"boolean\",\n\t\t\tdeckversion: \"number\",\n\t\t\tselectionID: \"number\",\n\t\t\teditable: \"boolean\",\n\t\t\ttitleEditable: \"boolean\",\n\t\t\tnotesEditable: \"boolean\",\n\t\t\ttagsEditable: \"boolean\",\n\t\t\ttags: \"array\",\n\t\t\timpostor: \"boolean\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t\tisWelcome: { type: \"boolean\", default: false },\n\t\t\tisSlide: { type: \"boolean\", default: false },\n\t\t\tisSection: { type: \"boolean\", default: true },\n\t\t},\n\n\t\t/**\n\t\t * @property {models.AdjunctModel} adjunct\n\t\t */\n\t\tchildren: {\n\t\t\tadjunct: \"AdjunctModel\",\n\t\t\ttemplate: \"TemplateModel\",\n\t\t},\n\n\t\t/**\n\t\t * @property {presentation.PresentationSlideCollection} slides\n\t\t */\n\t\tcollections: {\n\t\t\tslides: \"PresentationSlideCollection\",\n\t\t},\n\n\t\taddSlides(slides, options = {}) {\n\t\t\toptions.rootAssetPath ??= null;\n\t\t\toptions.templates ??= null;\n\t\t\toptions.choicelist ??= null;\n\t\t\toptions.getUniqueAdjunctID ??= () => parseInt(_.uniqueId(), 10);\n\n\t\t\tif (this.createdByTemplate) {\n\t\t\t\tthrow new Error(\"Can not add slides to a template\");\n\t\t\t}\n\n\t\t\tthis.slides.add(\n\t\t\t\tslides.map((slide) => {\n\t\t\t\t\tif (slide.modelName === \"adjunctslides\") {\n\t\t\t\t\t\treturn PresentationSlide.createFromAdjunctSlide(\n\t\t\t\t\t\t\tslide,\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\toptions,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn PresentationSlide.createFromSlide(slide, options);\n\t\t\t\t}),\n\t\t\t);\n\t\t},\n\n\t\turl() {\n\t\t\tif (!this._url) {\n\t\t\t\tif (_.isNumber(this.adjunctID) && this.impostor) {\n\t\t\t\t\tthis._url = new AdjunctSlideModel({ id: this.adjunctID }).url();\n\t\t\t\t} else if (_.isNumber(this.adjunctID)) {\n\t\t\t\t\tthis._url = new AdjunctSectionModel({ id: this.adjunctID }).url();\n\t\t\t\t} else if (this.impostor) {\n\t\t\t\t\tthis._url = new SlideModel({ id: this.id }).url();\n\t\t\t\t} else {\n\t\t\t\t\tthis._url = new SectionModel({ id: this.id }).url();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this._url;\n\t\t},\n\n\t\tequals(other) {\n\t\t\treturn this.url() === other.url();\n\t\t},\n\t},\n);\n\n/**\n * @function createFromSection\n * @memberof presentation.PresentationSection\n * @param {models.SectionModel} sectionModel\n * @param {object} [options]\n * @returns {presentation.PresentationSection}\n */\nPresentationSection.createFromSection = function (sectionModel, options = {}) {\n\toptions.rootAssetPath ??= null;\n\toptions.selections ??= null;\n\toptions.choicelist ??= null;\n\toptions.screenshots = PresentationSection.screenshotsToMap(\n\t\toptions.screenshots ?? new collections.DeckVersionScreenshotCollection(),\n\t);\n\n\tlet html;\n\tlet css;\n\n\tconst assetRoot = getAssetRoot(sectionModel.index_asset.url());\n\n\tif (options.rootAssetPath) {\n\t\tconst baseRoot =\n\t\t\toptions.baseRoot ??\n\t\t\tgetAssetRoot(sectionModel.deckversion.index_asset.url());\n\t\tconst sectionPath = assetRoot.slice(baseRoot.length);\n\n\t\thtml = `${options.rootAssetPath}${sectionPath}index.html`;\n\t\tcss = `${options.rootAssetPath}${sectionPath}slide.css`;\n\t} else {\n\t\thtml = `${assetRoot}index.html`;\n\t\tcss = `${assetRoot}slide.css`;\n\t}\n\n\tconst config = PresentationSection.getVisibilityAndSequence(\n\t\tsectionModel,\n\t\toptions,\n\t);\n\n\tconst tags = PresentationSection.getTags(sectionModel, options);\n\n\tconst section = new PresentationSection({\n\t\tid: sectionModel.id,\n\t\tadjunctID: null,\n\t\thtml,\n\t\tcss,\n\t\tkey: sectionModel.key,\n\t\tadjunctSlideLimit: sectionModel.adjunctslide_limit,\n\t\tthumbnail: PresentationSection.getThumbnail(\n\t\t\tsectionModel,\n\t\t\toptions.screenshots,\n\t\t),\n\t\tcustom: false,\n\t\timpostor: false,\n\t\ttitle: sectionModel.title,\n\t\tdeckversion: sectionModel.deckversion.id,\n\t\teditable: tags.indexOf(\"editable\") > -1,\n\t\t// By default this is true for a deck slide. These can be changed later in PM depending\n\t\t// on the logged in user and properties of an AutoAdjunct\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t\ttags,\n\t\tindex: config.sequence,\n\t\tsequence: config.sequence,\n\t\tvisible: config.visible,\n\t\tselectionID: config.selectionID,\n\t\tcmsvalkey_set: sectionModel.cmsvalkey_set,\n\t\tnamespacedKey: sectionModel.namespaced_key,\n\t});\n\n\treturn section;\n};\n\n/**\n * @function createFromAdjunctSection\n * @memberof presentation.PresentationSection\n * @param {models.AdjunctSectionModel} adjunctSectionModel\n * @param {models.DeckVersionMOdel} deckVersionModel\n * @param {object} [options]\n * @returns {presentation.PresentationSection}\n */\nPresentationSection.createFromAdjunctSection = function (\n\tadjunctSectionModel,\n\tdeckVersionModel,\n\toptions = {},\n) {\n\toptions.rootAssetPath ??= null;\n\toptions.selections ??= null;\n\toptions.choicelist ??= null;\n\toptions.getUniqueAdjunctID ??= () => parseInt(_.uniqueId(), 10);\n\toptions.screenshots = PresentationSection.screenshotsToMap(\n\t\toptions.screenshots ?? new collections.DeckVersionScreenshotCollection(),\n\t);\n\n\tconst keyID =\n\t\tadjunctSectionModel.id ||\n\t\t(adjunctSectionModel.creator_autoadjunct\n\t\t\t? adjunctSectionModel.creator_autoadjunct.id\n\t\t\t: null);\n\n\tlet key = null;\n\n\tif (adjunctSectionModel.key) {\n\t\tkey = adjunctSectionModel.key;\n\t} else if (keyID) {\n\t\tkey = `adjunct-${keyID}`;\n\t\tadjunctSectionModel.key = key;\n\t}\n\n\tconst config = PresentationSection.getVisibilityAndSequence(\n\t\tadjunctSectionModel,\n\t\toptions,\n\t);\n\n\tconst tags = PresentationSection.getTags(adjunctSectionModel, options);\n\tconst autoAdjunctID = adjunctSectionModel.creator_autoadjunct?.id || null;\n\n\tconst section = new PresentationSection({\n\t\tid: options.getUniqueAdjunctID(),\n\t\tadjunct: adjunctSectionModel.adjunct,\n\t\tadjunctID: adjunctSectionModel.id,\n\t\tautoAdjunctID,\n\t\tkey,\n\t\tthumbnail: adjunctSectionModel.image_256,\n\t\tcustom: !adjunctSectionModel.created_by_autoadjunct,\n\t\tcreatedByAutoAdjunct: adjunctSectionModel.created_by_autoadjunct,\n\t\tcreatedByTemplate: Boolean(adjunctSectionModel.template),\n\t\timpostor: tags.indexOf(\"section-header\") > -1,\n\t\ttags: tags,\n\t\ttemporary: adjunctSectionModel.created_by_autoadjunct,\n\t\ttitle: adjunctSectionModel.title,\n\t\tdeckversion: deckVersionModel.id,\n\t\teditable: false,\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t\tindex: config.sequence,\n\t\tsequence: config.sequence,\n\t\tvisible: config.visible,\n\t\tcmsvalkey_set: adjunctSectionModel.template?.cmsvalkey_set || [],\n\t\ttemplateID: adjunctSectionModel.template?.id || null,\n\t\ttemplate: adjunctSectionModel.template || null,\n\t\tnamespacedKey: adjunctSectionModel.namespaced_key,\n\t});\n\n\tif (adjunctSectionModel.template) {\n\t\tif (!adjunctSectionModel.template.index_asset) {\n\t\t\tthrow new Error(\n\t\t\t\t\"Template missing index_asset. Do you have the whole template available?\",\n\t\t\t);\n\t\t}\n\t\tconst origPath = adjunctSectionModel.template.index_asset.orig_path;\n\t\tlet html;\n\t\tlet css;\n\n\t\tif (options.rootAssetPath) {\n\t\t\thtml = `${options.rootAssetPath}${origPath}/index.html`;\n\t\t\tcss = `${options.rootAssetPath}${origPath}/slide.css`;\n\t\t} else {\n\t\t\tconst assetRoot = getAssetRoot(\n\t\t\t\tadjunctSectionModel.template.index_asset.url(),\n\t\t\t);\n\t\t\thtml = `${assetRoot}index.html`;\n\t\t\tcss = `${assetRoot}slide.css`;\n\t\t}\n\t\tsection.html = html;\n\t\tsection.css = css;\n\t\tsection.thumbnail =\n\t\t\t// Try and use autoadjunct screenshot (if there is one), otherwise\n\t\t\t// use the template's image as a fallback\n\t\t\tPresentationSection.getThumbnail(\n\t\t\t\tadjunctSectionModel.creator_autoadjunct,\n\t\t\t\toptions.screenshots,\n\t\t\t) || adjunctSectionModel.template.image_256;\n\t} else {\n\t\tsection.image = adjunctSectionModel.image_original;\n\t}\n\n\treturn section;\n};\n\nPresentationSection.createFromImpostorSection = function (\n\tslideModel,\n\toptions = {},\n) {\n\toptions.rootAssetPath ??= null;\n\toptions.selections ??= null;\n\toptions.choicelist ??= null;\n\toptions.screenshots = PresentationSection.screenshotsToMap(\n\t\toptions.screenshots ?? new collections.DeckVersionScreenshotCollection(),\n\t);\n\n\tlet html;\n\tlet css;\n\n\tconst assetRoot = getAssetRoot(slideModel.index_asset.url());\n\n\tif (options.rootAssetPath) {\n\t\tconst baseRoot =\n\t\t\toptions.baseRoot ??\n\t\t\tgetAssetRoot(slideModel.section.deckversion.index_asset.url());\n\t\tconst sectionPath = assetRoot.slice(baseRoot.length);\n\n\t\thtml = `${options.rootAssetPath}${sectionPath}index.html`;\n\t\tcss = `${options.rootAssetPath}${sectionPath}slide.css`;\n\t} else {\n\t\thtml = `${assetRoot}index.html`;\n\t\tcss = `${assetRoot}slide.css`;\n\t}\n\n\tconst config = PresentationSection.getVisibilityAndSequence(\n\t\tslideModel,\n\t\toptions,\n\t);\n\n\tconst tags = PresentationSection.getTags(slideModel, options);\n\tconst section = new PresentationSection({\n\t\tid: slideModel.id,\n\t\tadjunctID: null,\n\t\thtml,\n\t\tcss,\n\t\tkey: slideModel.key,\n\t\tadjunctSlideLimit: slideModel.adjunctslide_limit,\n\t\tthumbnail: PresentationSection.getThumbnail(\n\t\t\tslideModel,\n\t\t\toptions.screenshots,\n\t\t),\n\t\tcustom: false,\n\t\timpostor: true,\n\t\ttitle: slideModel.title,\n\t\tdeckversion: slideModel.section.deckversion.id,\n\t\teditable: tags.indexOf(\"editable\") > -1,\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t\ttags,\n\t\tindex: config.sequence,\n\t\tsequence: config.sequence,\n\t\tvisible: config.visible,\n\t\tselectionID: config.selectionID,\n\t\tcmsvalkey_set: slideModel.cmsvalkey_set,\n\t\tnamespacedKey: slideModel.namespaced_key,\n\t});\n\n\treturn section;\n};\n\nPresentationSection.createFromManifestJSON = function (\n\tmanifestJSON,\n\tproject,\n\tsectionKey,\n\tindex,\n) {\n\tconst projectSection = project?.sections.find((s) => s.key === sectionKey);\n\n\tconst section = new PresentationSection({\n\t\tid: parseInt(_.uniqueId(), 10),\n\t\tindex,\n\t\ttitle: manifestJSON.titles[sectionKey],\n\t\thtml: resolveURL(manifestJSON.getAssetPath(sectionKey), \"index.html\"),\n\t\tcss: resolveURL(manifestJSON.getAssetPath(sectionKey), \"slide.css\"),\n\t\tkey: sectionKey,\n\t\tsequence: manifestJSON.ordering[sectionKey] - 1,\n\t\tthumbnail: null,\n\t\tcustom: false,\n\t\tvisible: true,\n\t\tdeckversion: 1,\n\t\ttags: manifestJSON.tags[sectionKey] || null,\n\t\tcmsvalkey_set: projectSection?.editables ?? [],\n\t});\n\n\tconst slideKeys = Object.keys(manifestJSON.titles).filter((slideKey) => {\n\t\treturn slideKey.startsWith(sectionKey) && slideKey.split(\"/\").length > 1;\n\t});\n\n\tsection.slides.add(\n\t\tslideKeys.map((key, slideIndex) => {\n\t\t\treturn PresentationSlide.createFromManifestJSON(\n\t\t\t\tmanifestJSON,\n\t\t\t\tproject,\n\t\t\t\tkey,\n\t\t\t\tsection.id,\n\t\t\t\tslideIndex,\n\t\t\t);\n\t\t}),\n\t);\n\n\treturn section;\n};\n\nPresentationSection.createFromManifestImpostor = function (\n\tsection,\n\tproject,\n\tindex,\n) {\n\tconst slides = section.slides || [];\n\tsection.slides = null;\n\n\t// Single section with slides\n\tconst projectSection = project?.sections[0].slides.find(\n\t\t(s) => s.key === section.key,\n\t);\n\n\tconst presentationSection = new PresentationSection({\n\t\tid: parseInt(_.uniqueId(), 10),\n\t\tthumbnail: null,\n\t\tcustom: false,\n\t\tvisible: true,\n\t\tdeckversion: 1,\n\t\tindex,\n\t\t...section,\n\t\tcmsvalkey_set: projectSection?.editables ?? [],\n\t});\n\n\tslides.forEach((slide, index) => {\n\t\tpresentationSection.slides.add(\n\t\t\tPresentationSlide.createFromManifestImpostor(\n\t\t\t\tslide,\n\t\t\t\tsection,\n\t\t\t\tproject,\n\t\t\t\tindex,\n\t\t\t\tpresentationSection.id,\n\t\t\t),\n\t\t);\n\t});\n\n\treturn presentationSection;\n};\n\nPresentationSection.createFromAutoAdjunct = function (model, opts = {}) {\n\tconst requiredKeys = [\"index\", \"deckversionID\"];\n\tfor (const key of requiredKeys) {\n\t\tif (typeof opts[key] === \"undefined\") {\n\t\t\tthrow new Error(`Missing required key '${key}'.`);\n\t\t}\n\t}\n\n\tconst options = opts;\n\toptions.allowConvert ??= true;\n\toptions.visible ??= true;\n\toptions.index ??= -1;\n\toptions.deckversionID ??= -1;\n\toptions.sequence ??= opts.index;\n\toptions.impostor ??= false;\n\toptions.screenshots = PresentationSection.screenshotsToMap(\n\t\toptions.screenshots ?? new collections.DeckVersionScreenshotCollection(),\n\t);\n\n\tconst tags = PresentationSection.getTags(\n\t\t{\n\t\t\tisAutoAdjunct: true,\n\t\t\tkey: model.key,\n\t\t\ttags: model.tags,\n\t\t},\n\t\toptions,\n\t);\n\n\tconst autoAdjunct = new AutoAdjunctModel(model);\n\n\tconst autoAdjunctSection = new PresentationSection({\n\t\tid: options.id || autoAdjunct.id,\n\t\tadjunctID: autoAdjunct.id,\n\t\tautoAdjunctID: autoAdjunct.id,\n\t\tcreatedByTemplate: autoAdjunct.template !== null,\n\t\ttemplateID: autoAdjunct.template?.id || null,\n\t\ttemplate: autoAdjunct.template || null,\n\t\thtml: \"\",\n\t\tcss: \"\",\n\t\tsequence: options.sequence,\n\t\tindex: options.index,\n\t\tkey: autoAdjunct.key,\n\t\tcreatedByAutoAdjunct: false,\n\t\tthumbnail: PresentationSection.getThumbnail(\n\t\t\tautoAdjunct,\n\t\t\toptions.screenshots,\n\t\t),\n\t\ttemporary: true,\n\t\ttitle: autoAdjunct.name,\n\t\tvisible: options.visible,\n\t\tallowConvert: options.allowConvert,\n\t\tdeckversion: options.deckversionID,\n\t\timpostor: options.impostor,\n\t\ttags,\n\t\tcmsvalkey_set: autoAdjunct.cmsvalkey_set,\n\t\tnamespacedKey: autoAdjunct.namespaced_key,\n\t\teditable: true,\n\t\ttitleEditable: true,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t});\n\n\tif (autoAdjunct.template) {\n\t\t// If we've found a new screenshot for it, we don't want to override it here\n\t\tif (!autoAdjunctSection.thumbnail) {\n\t\t\tautoAdjunctSection.thumbnail = autoAdjunct.template.image_256;\n\t\t}\n\t\tautoAdjunctSection.createdByTemplate = true;\n\t\tautoAdjunctSection.templateID = autoAdjunct.template.id;\n\t\tautoAdjunctSection.html = autoAdjunct.template.index_asset.url();\n\n\t\tconst missingKeys = autoAdjunct.template.cmsvalkey_set\n\t\t\t.filter((t) => {\n\t\t\t\treturn !autoAdjunctSection.cmsvalkey_set.find((k) => k.startsWith(t));\n\t\t\t})\n\t\t\t.map((t) => {\n\t\t\t\treturn `${t}-autoadjunct-${autoAdjunct.id}`;\n\t\t\t});\n\n\t\tautoAdjunctSection.cmsvalkey_set.push(...missingKeys);\n\t} else {\n\t\tautoAdjunctSection.image = autoAdjunct.image_original;\n\t}\n\n\treturn autoAdjunctSection;\n};\n\nPresentationSection.createFromTemplate = function (\n\ttemplate,\n\tindex,\n\tminID = 0,\n\toptions = {},\n) {\n\tconst templateModel = new TemplateModel(template);\n\n\t_.defaults(options, {\n\t\trootAssetPath: null,\n\t});\n\n\tconst deckversion = new DeckVersionModel(templateModel.deckversion);\n\n\tlet html;\n\tlet css;\n\n\tif (options.rootAssetPath) {\n\t\tconst origPath = templateModel.index_asset.orig_path;\n\t\thtml = `${options.rootAssetPath}${origPath}/index.html`;\n\t\tcss = `${options.rootAssetPath}${origPath}/slide.css`;\n\t} else {\n\t\tconst templateAssetRoot = getAssetRoot(templateModel.index_asset.url());\n\t\thtml = `${templateAssetRoot}index.html`;\n\t\tcss = `${templateAssetRoot}slide.css`;\n\t}\n\n\tconst presentationSection = new PresentationSection({\n\t\tid: minID + parseInt(_.uniqueId(), 10),\n\t\ttemplateID: templateModel.id,\n\t\ttemplate: templateModel,\n\t\tkey: `template-${templateModel.key}`,\n\t\ttitle: templateModel.title,\n\t\thtml,\n\t\tcss,\n\t\tcustom: false,\n\t\tvisible: true,\n\t\tthumbnail: templateModel.image_256,\n\t\t// Makes sure templates are rendered with unique IDs\n\t\tautoAdjunctID: Number(_.uniqueId()),\n\t\tdeckversion: deckversion.id,\n\t\t// Add a large number here to make sure it's always at the end\n\t\t// of a list of sections\n\t\tsequence: 9000 + templateModel.sequence,\n\t\tcreatedByTemplate: true,\n\t\tindex,\n\t\tcmsvalkey_set: [],\n\t\tnamespacedKey: templateModel.namespaced_key,\n\t\teditable: false,\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t});\n\n\treturn presentationSection;\n};\n\nregister(\"PresentationSection\", PresentationSection);\n"],"mappings":";;;;;;;;;;AAAAA,OAAA;AAEA,IAAAC,WAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAUA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAAyC,SAAAE,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,wBAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAA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