@livepreso/api 6.51.0 → 6.53.0

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 (88) hide show
  1. package/.rush/temp/shrinkwrap-deps.json +3 -2
  2. package/CHANGELOG.json +34 -0
  3. package/CHANGELOG.md +23 -1
  4. package/cjs/models/adjunct-section.js +2 -0
  5. package/cjs/models/adjunct-section.js.map +1 -1
  6. package/cjs/models/adjunct-slide.js +2 -0
  7. package/cjs/models/adjunct-slide.js.map +1 -1
  8. package/cjs/models/adjunct-sub-slide.js +2 -0
  9. package/cjs/models/adjunct-sub-slide.js.map +1 -1
  10. package/cjs/models/auto-adjunct.js +2 -0
  11. package/cjs/models/auto-adjunct.js.map +1 -1
  12. package/cjs/models/deck-version.js +2 -0
  13. package/cjs/models/deck-version.js.map +1 -1
  14. package/cjs/models/template.js +2 -0
  15. package/cjs/models/template.js.map +1 -1
  16. package/cjs/presentation/presentation-deck.js +36 -16
  17. package/cjs/presentation/presentation-deck.js.map +1 -1
  18. package/cjs/presentation/presentation-section.js +31 -14
  19. package/cjs/presentation/presentation-section.js.map +1 -1
  20. package/cjs/presentation/presentation-section.spec.js +5 -3
  21. package/cjs/presentation/presentation-section.spec.js.map +1 -1
  22. package/cjs/presentation/presentation-slide.js +32 -9
  23. package/cjs/presentation/presentation-slide.js.map +1 -1
  24. package/cjs/presentation/presentation-slide.spec.js +1 -0
  25. package/cjs/presentation/presentation-slide.spec.js.map +1 -1
  26. package/cjs/presentation/presentation-subslide.js +8 -3
  27. package/cjs/presentation/presentation-subslide.js.map +1 -1
  28. package/cjs/presentation/presentation-subslide.spec.js +2 -0
  29. package/cjs/presentation/presentation-subslide.spec.js.map +1 -1
  30. package/cjs/presentation/presentation.js +2 -2
  31. package/cjs/presentation/presentation.js.map +1 -1
  32. package/package.json +3 -3
  33. package/src/models/adjunct-section.js +2 -0
  34. package/src/models/adjunct-slide.js +2 -0
  35. package/src/models/adjunct-sub-slide.js +2 -0
  36. package/src/models/auto-adjunct.js +2 -0
  37. package/src/models/deck-version.js +2 -0
  38. package/src/models/template.js +2 -0
  39. package/src/presentation/presentation-deck.js +41 -17
  40. package/src/presentation/presentation-section.js +22 -3
  41. package/src/presentation/presentation-section.spec.js +4 -6
  42. package/src/presentation/presentation-slide.js +23 -2
  43. package/src/presentation/presentation-slide.spec.js +1 -0
  44. package/src/presentation/presentation-subslide.js +5 -0
  45. package/src/presentation/presentation-subslide.spec.js +2 -0
  46. package/src/presentation/presentation.js +2 -2
  47. package/.rush/temp/1aebf46f78ad5c45f82f8147751890adb37bef9d.log +0 -10
  48. package/.rush/temp/256021b5963b4c0221d3dec247b697b9691a9b2c.log +0 -10
  49. package/.rush/temp/2a322f00f12cf9d1e64afe81275cc78d01c49050.log +0 -10
  50. package/.rush/temp/30061f1865447dcbb3f20a305061205f3dbe6091.log +0 -10
  51. package/.rush/temp/3cdc82c352e8ed90607952873f3aa4c200490874.log +0 -10
  52. package/.rush/temp/45522aea0dee8cb2be1a53248ba45bd235743b43.log +0 -10
  53. package/.rush/temp/5489ab737e406518983c16c57fc3e1edc07c0341.log +0 -10
  54. package/.rush/temp/58fcbb7f15a76326d40e0839ab179755da82a891.log +0 -10
  55. package/.rush/temp/5bc0bba70b733baa4dd976667ba0a1386e516186.log +0 -10
  56. package/.rush/temp/64f1bb696f8d7d7e72907b80df316b127f72e23e.log +0 -10
  57. package/.rush/temp/6f640f951414ea68adb65c17e4ed7527cde54faf.log +0 -10
  58. package/.rush/temp/7c7b958682d4ab5697530be47d0aac62efe1adf1.log +0 -10
  59. package/.rush/temp/82bfb987463fbcfebf04022e6ed00015c73879c8.log +0 -10
  60. package/.rush/temp/844034aa6e542115075e8f3dc5ffc640973e0064.log +0 -10
  61. package/.rush/temp/8b42957a7c15da1f29cb57bee125f13affa70dca.log +0 -10
  62. package/.rush/temp/924652444ab5a6063f328a2217123a2227058896.log +0 -10
  63. package/.rush/temp/9f2030f96d62f3e38052e35201819a216566f14f.log +0 -10
  64. package/.rush/temp/a769db9d81a23000c0e9b1bf4f1a9a9e721d0d7c.log +0 -10
  65. package/.rush/temp/a87d3a8b4ece87ec66f27c86226a9f205617681f.log +0 -10
  66. package/.rush/temp/bb7a5bdcc4af4ad1507f81f33774b31f5b4e4fb7.log +0 -10
  67. package/.rush/temp/build-cache-tar.log +0 -7
  68. package/.rush/temp/c20e29ccaaa9231b38a28bb24451b4ce7562cdc0.log +0 -10
  69. package/.rush/temp/chunked-rush-logs/api.build.chunks.jsonl +0 -6
  70. package/.rush/temp/chunked-rush-logs/api.test.chunks.jsonl +0 -1
  71. package/.rush/temp/e21303db8f59b4625fd184c9114377d781fd24f8.log +0 -10
  72. package/.rush/temp/e6d303862765b6a5f41dd483d0f9ae083a1fae10.log +0 -10
  73. package/.rush/temp/eaf69fbc059d2f1258d7569136180d4a1d3c7072.log +0 -10
  74. package/.rush/temp/f85d279e2674966daaec83e1c3986a96f86ef304.log +0 -10
  75. package/.rush/temp/fc0a332c5b34c6b90006850cf2d93a48fb4b9a6e.log +0 -10
  76. package/.rush/temp/operation/build/all.log +0 -6
  77. package/.rush/temp/operation/build/log-chunks.jsonl +0 -6
  78. package/.rush/temp/operation/build/state.json +0 -3
  79. package/.rush/temp/operation/test/all.log +0 -19
  80. package/.rush/temp/operation/test/state.json +0 -3
  81. package/.rush/temp/package-deps_build.json +0 -185
  82. package/api.build.log +0 -9
  83. package/api.test.cache.log +0 -1
  84. package/api.test.log +0 -19
  85. package/rush-logs/api.build.cache.log +0 -1
  86. package/rush-logs/api.build.log +0 -6
  87. package/rush-logs/api.test.cache.log +0 -1
  88. 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","_url","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","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","tags","version","cmsvalkey_set","children","realSection","derived","welcomeSlide","fn","PresentationSection","getAttributes","isWelcome","sections","url","DeckVersionModel","createFromDeckVersion","deckVersionModel","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","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","isSection","isImpostor","createFromImpostorSection","PresentationSlide","createFromSlide","adjunctSlideModel","createFromAdjunctSlide","models","reverse","sectionSlides","Math","floor","template","createFromTemplate","autoSections","auto","Error","autoAdjunctID","name","setSequentialSequences","createFromManifestJSON","manifestJSON","parseInt","uniqueId","url2","resolve","getAssetPath","some","items","titles","ordering","splitKey","split","newKey","sortBy","item","startIndex","endIndex","slice","createFromManifestImpostor","sectionKeys","getTemplateAssetPath","minID","max","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 url2 from \"url\";\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[]} 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\ttags: \"array\",\n\t\t\tversion: \"number\",\n\t\t\tcmsvalkey_set: \"array\",\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\ttags,\n\t\tversion: deckVersionModel.version,\n\t\tusesImpostorSections: isImpostorDeck(deckVersionModel),\n\t\tcmsvalkey_set: deckVersionModel.cmsvalkey_set || [],\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\tDeckVersionModel,\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.createFromTemplate(\n\t\t\t\tauto.template,\n\t\t\t\tdeck.sections.length + index,\n\t\t\t\toptions.getUniqueAdjunctID(),\n\t\t\t);\n\n\t\t\t// We've just borrowed the \"from template\" method above. We want to add\n\t\t\t// back some of the specific keys about the auto.\n\t\t\tsection.autoAdjunctID = auto.id;\n\t\t\tsection.key = auto.key;\n\t\t\tsection.title = auto.name;\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) {\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: url2.resolve(manifestJSON.getAssetPath(), \"index.html\"),\n\t\tcss: url2.resolve(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: [],\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: url2.resolve(manifestJSON.getAssetPath(key), \"index.html\"),\n\t\t\t\tcss: url2.resolve(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(section, index);\n\t\t\t}),\n\t\t);\n\n\t\tdeck.realSection = PresentationSection.createFromManifestImpostor(items[0]);\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\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\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: url2.resolve(\n\t\t\t\t\t\tmanifestJSON.getTemplateAssetPath(key),\n\t\t\t\t\t\t\"index.html\",\n\t\t\t\t\t),\n\t\t\t\t},\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\treturn PresentationSection.createFromTemplate(template, index, minID);\n\t\t\t}),\n\t\t);\n\t}\n\n\tre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F,KAAK,EAAE4H,KAAK,CAAC;IACtE,CAAC,CACF,CAAC;EACF;EAEA,OAAOxE,IAAI;AACZ,CAAC;AAED,IAAA0E,uBAAQ,EAAC,kBAAkB,EAAEvI,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"presentation-deck.js","names":["require","collections","_interopRequireWildcard","_utils","_basePresentationModel","_models","_presentationSection","_presentationSlide","_lodash","_interopRequireDefault","_index","_log","_stateRegister","_url","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","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","tags","version","namespacedKey","cmsvalkey_set","children","realSection","derived","welcomeSlide","fn","PresentationSection","getAttributes","isWelcome","sections","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","isSection","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","url2","resolve","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 url2 from \"url\";\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\ttags: \"array\",\n\t\t\tversion: \"number\",\n\t\t\tnamespacedKey: \"string\",\n\t\t\tcmsvalkey_set: \"array\",\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\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: url2.resolve(manifestJSON.getAssetPath(), \"index.html\"),\n\t\tcss: url2.resolve(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: url2.resolve(manifestJSON.getAssetPath(key), \"index.html\"),\n\t\t\t\tcss: url2.resolve(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: url2.resolve(\n\t\t\t\t\t\tmanifestJSON.getTemplateAssetPath(key),\n\t\t\t\t\t\t\"index.html\",\n\t\t\t\t\t),\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,OA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e,OAAO,CAAC8E,aAAa;QACnD,CAAC,CAAC;MACH;MACA,OAAO9E,OAAO;IACf,CAAC,CACF,CAAC;EACF;EAEA,OAAOb,IAAI;AACZ,CAAC;AAED,IAAA4F,uBAAQ,EAAC,kBAAkB,EAAE3J,gBAAgB,CAAC","ignoreList":[]}
@@ -35,6 +35,7 @@ var PresentationSection = exports.PresentationSection = _basePresentationModel.B
35
35
  * @property {boolean} createdByAutoAdjunct
36
36
  * @property {boolean} createdByTemplate
37
37
  * @property {number} adjunctSlideLimit
38
+ * @property {string} namespacedKey
38
39
  * @property {string} html
39
40
  * @property {string} css
40
41
  * @property {number} index
@@ -78,6 +79,7 @@ var PresentationSection = exports.PresentationSection = _basePresentationModel.B
78
79
  type: "number",
79
80
  default: 0
80
81
  },
82
+ namespacedKey: "string",
81
83
  html: "string",
82
84
  css: "string",
83
85
  index: "number",
@@ -210,7 +212,8 @@ PresentationSection.createFromSection = function (sectionModel) {
210
212
  sequence: config.sequence,
211
213
  visible: config.visible,
212
214
  selectionID: config.selectionID,
213
- cmsvalkey_set: sectionModel.cmsvalkey_set
215
+ cmsvalkey_set: sectionModel.cmsvalkey_set,
216
+ namespacedKey: sectionModel.namespaced_key
214
217
  });
215
218
  return section;
216
219
  };
@@ -268,7 +271,8 @@ PresentationSection.createFromAdjunctSection = function (adjunctSectionModel, de
268
271
  visible: config.visible,
269
272
  cmsvalkey_set: ((_adjunctSectionModel$2 = adjunctSectionModel.template) === null || _adjunctSectionModel$2 === void 0 ? void 0 : _adjunctSectionModel$2.cmsvalkey_set) || [],
270
273
  templateID: ((_adjunctSectionModel$3 = adjunctSectionModel.template) === null || _adjunctSectionModel$3 === void 0 ? void 0 : _adjunctSectionModel$3.id) || null,
271
- template: adjunctSectionModel.template || null
274
+ template: adjunctSectionModel.template || null,
275
+ namespacedKey: adjunctSectionModel.namespaced_key
272
276
  });
273
277
  if (adjunctSectionModel.template) {
274
278
  if (!adjunctSectionModel.template.index_asset) {
@@ -296,8 +300,8 @@ PresentationSection.createFromAdjunctSection = function (adjunctSectionModel, de
296
300
  }
297
301
  return section;
298
302
  };
299
- PresentationSection.createFromImpostorSection = function (slideModel, DeckVersionModel) {
300
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
303
+ PresentationSection.createFromImpostorSection = function (slideModel) {
304
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
301
305
  _lodash.default.defaults(options, {
302
306
  rootAssetPath: null,
303
307
  selections: null,
@@ -337,11 +341,16 @@ PresentationSection.createFromImpostorSection = function (slideModel, DeckVersio
337
341
  sequence: config.sequence,
338
342
  visible: config.visible,
339
343
  selectionID: config.selectionID,
340
- cmsvalkey_set: slideModel.cmsvalkey_set
344
+ cmsvalkey_set: slideModel.cmsvalkey_set,
345
+ namespacedKey: slideModel.namespaced_key
341
346
  });
342
347
  return section;
343
348
  };
344
- PresentationSection.createFromManifestJSON = function (manifestJSON, sectionKey, index) {
349
+ PresentationSection.createFromManifestJSON = function (manifestJSON, project, sectionKey, index) {
350
+ var _projectSection$edita;
351
+ var projectSection = project === null || project === void 0 ? void 0 : project.sections.find(function (s) {
352
+ return s.key === sectionKey;
353
+ });
345
354
  var section = new PresentationSection({
346
355
  id: parseInt(_lodash.default.uniqueId(), 10),
347
356
  index: index,
@@ -355,29 +364,35 @@ PresentationSection.createFromManifestJSON = function (manifestJSON, sectionKey,
355
364
  visible: true,
356
365
  deckversion: 1,
357
366
  tags: manifestJSON.tags[sectionKey] || null,
358
- cmsvalkey_set: []
367
+ cmsvalkey_set: (_projectSection$edita = projectSection === null || projectSection === void 0 ? void 0 : projectSection.editables) !== null && _projectSection$edita !== void 0 ? _projectSection$edita : []
359
368
  });
360
369
  var slideKeys = Object.keys(manifestJSON.titles).filter(function (slideKey) {
361
370
  return slideKey.startsWith(sectionKey) && slideKey.split("/").length > 1;
362
371
  });
363
372
  section.slides.add(slideKeys.map(function (key, slideIndex) {
364
- return _presentationSlide.PresentationSlide.createFromManifestJSON(manifestJSON, key, section.id, slideIndex);
373
+ return _presentationSlide.PresentationSlide.createFromManifestJSON(manifestJSON, project, key, section.id, slideIndex);
365
374
  }));
366
375
  return section;
367
376
  };
368
- PresentationSection.createFromManifestImpostor = function (section, index) {
377
+ PresentationSection.createFromManifestImpostor = function (section, project, index) {
378
+ var _projectSection$edita2;
369
379
  var slides = section.slides || [];
370
380
  section.slides = null;
371
- var presentationSection = new PresentationSection(_objectSpread({
381
+ var projectSection = project === null || project === void 0 ? void 0 : project.sections.find(function (s) {
382
+ return s.key === section.key;
383
+ });
384
+ var presentationSection = new PresentationSection(_objectSpread(_objectSpread({
372
385
  id: parseInt(_lodash.default.uniqueId(), 10),
373
386
  thumbnail: null,
374
387
  custom: false,
375
388
  visible: true,
376
389
  deckversion: 1,
377
390
  index: index
378
- }, section));
391
+ }, section), {}, {
392
+ cmsvalkey_set: (_projectSection$edita2 = projectSection === null || projectSection === void 0 ? void 0 : projectSection.editables) !== null && _projectSection$edita2 !== void 0 ? _projectSection$edita2 : []
393
+ }));
379
394
  slides.forEach(function (slide, index) {
380
- presentationSection.slides.add(_presentationSlide.PresentationSlide.createFromManifestImpostor(slide, index, presentationSection.id));
395
+ presentationSection.slides.add(_presentationSlide.PresentationSlide.createFromManifestImpostor(slide, section, project, index, presentationSection.id));
381
396
  });
382
397
  return presentationSection;
383
398
  };
@@ -428,7 +443,8 @@ PresentationSection.createFromAutoAdjunct = function (model) {
428
443
  deckversion: options.deckversionID,
429
444
  impostor: options.impostor,
430
445
  tags: tags,
431
- cmsvalkey_set: autoAdjunct.cmsvalkey_set
446
+ cmsvalkey_set: autoAdjunct.cmsvalkey_set,
447
+ namespacedKey: autoAdjunct.namespaced_key
432
448
  });
433
449
  if (autoAdjunct.template) {
434
450
  var _autoAdjunctSection$c;
@@ -476,7 +492,8 @@ PresentationSection.createFromTemplate = function (template, index) {
476
492
  sequence: 9000 + templateModel.sequence,
477
493
  createdByTemplate: true,
478
494
  index: index,
479
- cmsvalkey_set: []
495
+ cmsvalkey_set: [],
496
+ namespacedKey: templateModel.namespaced_key
480
497
  });
481
498
  return presentationSection;
482
499
  };
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-section.js","names":["require","collections","_interopRequireWildcard","_models","_basePresentationModel","_presentationSlide","_lodash","_interopRequireDefault","_index","_stateRegister","_url","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","PresentationSection","exports","BasePresentationModel","extend","props","id","adjunctID","autoAdjunctID","type","templateID","createdByAutoAdjunct","createdByTemplate","adjunctSlideLimit","html","css","index","key","sequence","image","_orig_image","thumbnail","custom","temporary","title","visible","deckversion","selectionID","editable","tags","impostor","isWelcome","cmsvalkey_set","children","adjunct","template","slides","addSlides","_this","options","undefined","_","defaults","rootAssetPath","templates","choicelist","getUniqueAdjunctID","parseInt","uniqueId","Error","add","map","slide","modelName","PresentationSlide","createFromAdjunctSlide","createFromSlide","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","createFromAdjunctSection","adjunctSectionModel","deckVersionModel","_adjunctSectionModel$","_adjunctSectionModel$2","_adjunctSectionModel$3","keyID","creator_autoadjunct","image_256","created_by_autoadjunct","Boolean","origPath","orig_path","image_original","createFromImpostorSection","slideModel","DeckVersionModel","createFromManifestJSON","manifestJSON","sectionKey","titles","url2","resolve","getAssetPath","ordering","slideKeys","slideKey","startsWith","split","slideIndex","createFromManifestImpostor","presentationSection","createFromAutoAdjunct","model","_autoAdjunct$template","opts","requiredKeys","_i","_requiredKeys","allowConvert","deckversionID","isAutoAdjunct","autoAdjunct","AutoAdjunctModel","autoAdjunctSection","name","_autoAdjunctSection$c","missingKeys","find","k","_toConsumableArray2","createFromTemplate","minID","templateModel","TemplateModel","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 url2 from \"url\";\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} 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 {boolean} editable\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\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\ttags: \"array\",\n\t\t\timpostor: \"boolean\",\n\t\t\tisWelcome: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t},\n\t\t\tcmsvalkey_set: \"array\",\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\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});\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\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});\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\tDeckVersionModel,\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\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});\n\n\treturn section;\n};\n\nPresentationSection.createFromManifestJSON = function (\n\tmanifestJSON,\n\tsectionKey,\n\tindex,\n) {\n\tconst section = new PresentationSection({\n\t\tid: parseInt(_.uniqueId(), 10),\n\t\tindex,\n\t\ttitle: manifestJSON.titles[sectionKey],\n\t\thtml: url2.resolve(manifestJSON.getAssetPath(sectionKey), \"index.html\"),\n\t\tcss: url2.resolve(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: [],\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\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 (section, index) {\n\tconst slides = section.slides || [];\n\tsection.slides = null;\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});\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\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});\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 (template, index, minID = 0) {\n\tconst templateModel = new TemplateModel(template);\n\n\tconst deckversion = new DeckVersionModel(templateModel.deckversion);\n\tconst templateAssetRoot = getAssetRoot(templateModel.index_asset.url());\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: `${templateAssetRoot}index.html`,\n\t\tcss: `${templateAssetRoot}slide.css`,\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});\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,IAAA,GAAAH,sBAAA,CAAAP,OAAA;AAAuB,SAAAW,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,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E7I,mBAAmB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"presentation-section.js","names":["require","collections","_interopRequireWildcard","_models","_basePresentationModel","_presentationSlide","_lodash","_interopRequireDefault","_index","_stateRegister","_url","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","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","tags","impostor","isWelcome","cmsvalkey_set","children","adjunct","template","slides","addSlides","_this","options","undefined","_","defaults","rootAssetPath","templates","choicelist","getUniqueAdjunctID","parseInt","uniqueId","Error","add","map","slide","modelName","PresentationSlide","createFromAdjunctSlide","createFromSlide","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","url2","resolve","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 url2 from \"url\";\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 {boolean} editable\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\ttags: \"array\",\n\t\t\timpostor: \"boolean\",\n\t\t\tisWelcome: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t},\n\t\t\tcmsvalkey_set: \"array\",\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\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\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\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: url2.resolve(manifestJSON.getAssetPath(sectionKey), \"index.html\"),\n\t\tcss: url2.resolve(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\tconst projectSection = project?.sections.find((s) => s.key === section.key);\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});\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 (template, index, minID = 0) {\n\tconst templateModel = new TemplateModel(template);\n\n\tconst deckversion = new DeckVersionModel(templateModel.deckversion);\n\tconst templateAssetRoot = getAssetRoot(templateModel.index_asset.url());\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: `${templateAssetRoot}index.html`,\n\t\tcss: `${templateAssetRoot}slide.css`,\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});\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,IAAA,GAAAH,sBAAA,CAAAP,OAAA;AAAuB,SAAAW,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,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AC;EAEF,OAAOuC,mBAAmB;AAC3B,CAAC;AAED,IAAA0B,uBAAQ,EAAC,qBAAqB,EAAEtJ,mBAAmB,CAAC","ignoreList":[]}
@@ -65,6 +65,7 @@ describe("#createFromSection", function () {
65
65
  index: 0,
66
66
  isWelcome: false,
67
67
  key: "agenda",
68
+ namespacedKey: "agenda",
68
69
  selectionID: null,
69
70
  sequence: 0,
70
71
  slides: [],
@@ -308,6 +309,7 @@ describe("#createFromImpostorSection", function () {
308
309
  index: 0,
309
310
  isWelcome: false,
310
311
  key: "agenda",
312
+ namespacedKey: "test-deck/agenda",
311
313
  selectionID: null,
312
314
  sequence: 0,
313
315
  slides: [],
@@ -336,7 +338,7 @@ describe("#createFromImpostorSection", function () {
336
338
  "test-deck/agenda": ["impostorsection-tag"]
337
339
  }
338
340
  };
339
- presentationSection = _presentationSection.PresentationSection.createFromImpostorSection(impostorSection, null, options);
341
+ presentationSection = _presentationSection.PresentationSection.createFromImpostorSection(impostorSection, options);
340
342
  expect(presentationSection.tags).toEqual(["impostorsection-tag"]);
341
343
  case 4:
342
344
  case "end":
@@ -348,7 +350,7 @@ describe("#createFromImpostorSection", function () {
348
350
  it("should use the default image from the model if no screenshot found", function () {
349
351
  var data = getImpostorSectionJSON();
350
352
  var impostorSection = new _slide.SlideModel(data);
351
- var presentationSection = _presentationSection.PresentationSection.createFromImpostorSection(impostorSection, null);
353
+ var presentationSection = _presentationSection.PresentationSection.createFromImpostorSection(impostorSection);
352
354
  expect(presentationSection.thumbnail).toEqual(data.image_256);
353
355
  });
354
356
  it("should use the screenshot model if it matches", function () {
@@ -356,7 +358,7 @@ describe("#createFromImpostorSection", function () {
356
358
  var options = {
357
359
  screenshots: (0, _defineProperty2.default)({}, impostorSection.url(), "test-screenshot.png")
358
360
  };
359
- var presentationSection = _presentationSection.PresentationSection.createFromImpostorSection(impostorSection, null, options);
361
+ var presentationSection = _presentationSection.PresentationSection.createFromImpostorSection(impostorSection, options);
360
362
  expect(presentationSection.thumbnail).toEqual("test-screenshot.png");
361
363
  });
362
364
  });